@bitovi/vybit 0.9.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/overlay/dist/overlay.js +5 -0
- package/package.json +7 -2
- package/panel/dist/assets/{DesignMode-CZvwfLMn.js → DesignMode-D6tjMRjM.js} +1 -1
- package/panel/dist/assets/index-D5VCKvC6.js +62 -0
- package/panel/dist/index.html +1 -1
- package/server/app.ts +24 -0
- package/server/ghost-cache.ts +154 -0
- package/server/websocket.ts +3 -0
- package/shared/types.ts +21 -1
- package/storybook-addon/index.js +1 -0
- package/storybook-addon/manager.tsx +33 -0
- package/storybook-addon/package.json +10 -0
- package/storybook-addon/preset.js +10 -0
- package/storybook-addon/preview.ts +29 -0
- package/panel/dist/assets/index-CzGpZV08.js +0 -62
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
var Fm=Object.defineProperty;var Wm=(e,t,n)=>t in e?Fm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var pr=(e,t,n)=>Wm(e,typeof t!="symbol"?t+"":t,n);function Vm(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const l=Object.getOwnPropertyDescriptor(r,o);l&&Object.defineProperty(e,o,l.get?l:{enumerable:!0,get:()=>r[o]})}}}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 o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const s of l.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();function Hm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ld={exports:{}},ks={},Id={exports:{}},se={};/**
|
|
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 Xo=Symbol.for("react.element"),Bm=Symbol.for("react.portal"),Um=Symbol.for("react.fragment"),Gm=Symbol.for("react.strict_mode"),Ym=Symbol.for("react.profiler"),Qm=Symbol.for("react.provider"),Xm=Symbol.for("react.context"),Zm=Symbol.for("react.forward_ref"),Jm=Symbol.for("react.suspense"),qm=Symbol.for("react.memo"),eh=Symbol.for("react.lazy"),Ku=Symbol.iterator;function th(e){return e===null||typeof e!="object"?null:(e=Ku&&e[Ku]||e["@@iterator"],typeof e=="function"?e:null)}var Od={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Dd=Object.assign,Md={};function Xr(e,t,n){this.props=e,this.context=t,this.refs=Md,this.updater=n||Od}Xr.prototype.isReactComponent={};Xr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};Xr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function zd(){}zd.prototype=Xr.prototype;function za(e,t,n){this.props=e,this.context=t,this.refs=Md,this.updater=n||Od}var $a=za.prototype=new zd;$a.constructor=za;Dd($a,Xr.prototype);$a.isPureReactComponent=!0;var Fu=Array.isArray,$d=Object.prototype.hasOwnProperty,Ka={current:null},Kd={key:!0,ref:!0,__self:!0,__source:!0};function Fd(e,t,n){var r,o={},l=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(l=""+t.key),t)$d.call(t,r)&&!Kd.hasOwnProperty(r)&&(o[r]=t[r]);var i=arguments.length-2;if(i===1)o.children=n;else if(1<i){for(var u=Array(i),c=0;c<i;c++)u[c]=arguments[c+2];o.children=u}if(e&&e.defaultProps)for(r in i=e.defaultProps,i)o[r]===void 0&&(o[r]=i[r]);return{$$typeof:Xo,type:e,key:l,ref:s,props:o,_owner:Ka.current}}function nh(e,t){return{$$typeof:Xo,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Fa(e){return typeof e=="object"&&e!==null&&e.$$typeof===Xo}function rh(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Wu=/\/+/g;function Us(e,t){return typeof e=="object"&&e!==null&&e.key!=null?rh(""+e.key):t.toString(36)}function Cl(e,t,n,r,o){var l=typeof e;(l==="undefined"||l==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(l){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Xo:case Bm:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+Us(s,0):r,Fu(o)?(n="",e!=null&&(n=e.replace(Wu,"$&/")+"/"),Cl(o,t,n,"",function(c){return c})):o!=null&&(Fa(o)&&(o=nh(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(Wu,"$&/")+"/")+e)),t.push(o)),1;if(s=0,r=r===""?".":r+":",Fu(e))for(var i=0;i<e.length;i++){l=e[i];var u=r+Us(l,i);s+=Cl(l,t,n,u,o)}else if(u=th(e),typeof u=="function")for(e=u.call(e),i=0;!(l=e.next()).done;)l=l.value,u=r+Us(l,i++),s+=Cl(l,t,n,u,o);else if(l==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function ll(e,t,n){if(e==null)return e;var r=[],o=0;return Cl(e,r,"","",function(l){return t.call(n,l,o++)}),r}function oh(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var qe={current:null},jl={transition:null},lh={ReactCurrentDispatcher:qe,ReactCurrentBatchConfig:jl,ReactCurrentOwner:Ka};function Wd(){throw Error("act(...) is not supported in production builds of React.")}se.Children={map:ll,forEach:function(e,t,n){ll(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ll(e,function(){t++}),t},toArray:function(e){return ll(e,function(t){return t})||[]},only:function(e){if(!Fa(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};se.Component=Xr;se.Fragment=Um;se.Profiler=Ym;se.PureComponent=za;se.StrictMode=Gm;se.Suspense=Jm;se.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=lh;se.act=Wd;se.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Dd({},e.props),o=e.key,l=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(l=t.ref,s=Ka.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var i=e.type.defaultProps;for(u in t)$d.call(t,u)&&!Kd.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&i!==void 0?i[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){i=Array(u);for(var c=0;c<u;c++)i[c]=arguments[c+2];r.children=i}return{$$typeof:Xo,type:e.type,key:o,ref:l,props:r,_owner:s}};se.createContext=function(e){return e={$$typeof:Xm,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Qm,_context:e},e.Consumer=e};se.createElement=Fd;se.createFactory=function(e){var t=Fd.bind(null,e);return t.type=e,t};se.createRef=function(){return{current:null}};se.forwardRef=function(e){return{$$typeof:Zm,render:e}};se.isValidElement=Fa;se.lazy=function(e){return{$$typeof:eh,_payload:{_status:-1,_result:e},_init:oh}};se.memo=function(e,t){return{$$typeof:qm,type:e,compare:t===void 0?null:t}};se.startTransition=function(e){var t=jl.transition;jl.transition={};try{e()}finally{jl.transition=t}};se.unstable_act=Wd;se.useCallback=function(e,t){return qe.current.useCallback(e,t)};se.useContext=function(e){return qe.current.useContext(e)};se.useDebugValue=function(){};se.useDeferredValue=function(e){return qe.current.useDeferredValue(e)};se.useEffect=function(e,t){return qe.current.useEffect(e,t)};se.useId=function(){return qe.current.useId()};se.useImperativeHandle=function(e,t,n){return qe.current.useImperativeHandle(e,t,n)};se.useInsertionEffect=function(e,t){return qe.current.useInsertionEffect(e,t)};se.useLayoutEffect=function(e,t){return qe.current.useLayoutEffect(e,t)};se.useMemo=function(e,t){return qe.current.useMemo(e,t)};se.useReducer=function(e,t,n){return qe.current.useReducer(e,t,n)};se.useRef=function(e){return qe.current.useRef(e)};se.useState=function(e){return qe.current.useState(e)};se.useSyncExternalStore=function(e,t,n){return qe.current.useSyncExternalStore(e,t,n)};se.useTransition=function(){return qe.current.useTransition()};se.version="18.3.1";Id.exports=se;var b=Id.exports;const Vd=Hm(b),Hd=Vm({__proto__:null,default:Vd},[b]);/**
|
|
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 sh=b,ih=Symbol.for("react.element"),ah=Symbol.for("react.fragment"),uh=Object.prototype.hasOwnProperty,ch=sh.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,dh={key:!0,ref:!0,__self:!0,__source:!0};function Bd(e,t,n){var r,o={},l=null,s=null;n!==void 0&&(l=""+n),t.key!==void 0&&(l=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)uh.call(t,r)&&!dh.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:ih,type:e,key:l,ref:s,props:o,_owner:ch.current}}ks.Fragment=ah;ks.jsx=Bd;ks.jsxs=Bd;Ld.exports=ks;var a=Ld.exports,Ii={},Ud={exports:{}},pt={},Gd={exports:{}},Yd={};/**
|
|
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
|
-
*/(function(e){function t(N,L){var P=N.length;N.push(L);e:for(;0<P;){var U=P-1>>>1,Z=N[U];if(0<o(Z,L))N[U]=L,N[P]=Z,P=U;else break e}}function n(N){return N.length===0?null:N[0]}function r(N){if(N.length===0)return null;var L=N[0],P=N.pop();if(P!==L){N[0]=P;e:for(var U=0,Z=N.length,Qe=Z>>>1;U<Qe;){var $e=2*(U+1)-1,je=N[$e],ae=$e+1,Re=N[ae];if(0>o(je,P))ae<Z&&0>o(Re,je)?(N[U]=Re,N[ae]=P,U=ae):(N[U]=je,N[$e]=P,U=$e);else if(ae<Z&&0>o(Re,P))N[U]=Re,N[ae]=P,U=ae;else break e}}return L}function o(N,L){var P=N.sortIndex-L.sortIndex;return P!==0?P:N.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var s=Date,i=s.now();e.unstable_now=function(){return s.now()-i}}var u=[],c=[],d=1,m=null,f=3,g=!1,v=!1,w=!1,S=typeof setTimeout=="function"?setTimeout:null,h=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(N){for(var L=n(c);L!==null;){if(L.callback===null)r(c);else if(L.startTime<=N)r(c),L.sortIndex=L.expirationTime,t(u,L);else break;L=n(c)}}function x(N){if(w=!1,y(N),!v)if(n(u)!==null)v=!0,W(j);else{var L=n(c);L!==null&&le(x,L.startTime-N)}}function j(N,L){v=!1,w&&(w=!1,h(T),T=-1),g=!0;var P=f;try{for(y(L),m=n(u);m!==null&&(!(m.expirationTime>L)||N&&!F());){var U=m.callback;if(typeof U=="function"){m.callback=null,f=m.priorityLevel;var Z=U(m.expirationTime<=L);L=e.unstable_now(),typeof Z=="function"?m.callback=Z:m===n(u)&&r(u),y(L)}else r(u);m=n(u)}if(m!==null)var Qe=!0;else{var $e=n(c);$e!==null&&le(x,$e.startTime-L),Qe=!1}return Qe}finally{m=null,f=P,g=!1}}var k=!1,C=null,T=-1,M=5,_=-1;function F(){return!(e.unstable_now()-_<M)}function z(){if(C!==null){var N=e.unstable_now();_=N;var L=!0;try{L=C(!0,N)}finally{L?R():(k=!1,C=null)}}else k=!1}var R;if(typeof p=="function")R=function(){p(z)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,J=I.port2;I.port1.onmessage=z,R=function(){J.postMessage(null)}}else R=function(){S(z,0)};function W(N){C=N,k||(k=!0,R())}function le(N,L){T=S(function(){N(e.unstable_now())},L)}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(N){N.callback=null},e.unstable_continueExecution=function(){v||g||(v=!0,W(j))},e.unstable_forceFrameRate=function(N){0>N||125<N?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<N?Math.floor(1e3/N):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(N){switch(f){case 1:case 2:case 3:var L=3;break;default:L=f}var P=f;f=L;try{return N()}finally{f=P}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(N,L){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var P=f;f=N;try{return L()}finally{f=P}},e.unstable_scheduleCallback=function(N,L,P){var U=e.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?U+P:U):P=U,N){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=P+Z,N={id:d++,callback:L,priorityLevel:N,startTime:P,expirationTime:Z,sortIndex:-1},P>U?(N.sortIndex=P,t(c,N),n(u)===null&&N===n(c)&&(w?(h(T),T=-1):w=!0,le(x,P-U))):(N.sortIndex=Z,t(u,N),v||g||(v=!0,W(j))),N},e.unstable_shouldYield=F,e.unstable_wrapCallback=function(N){var L=f;return function(){var P=f;f=L;try{return N.apply(this,arguments)}finally{f=P}}}})(Yd);Gd.exports=Yd;var fh=Gd.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 ph=b,ft=fh;function D(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Qd=new Set,_o={};function ur(e,t){Fr(e,t),Fr(e+"Capture",t)}function Fr(e,t){for(_o[e]=t,e=0;e<t.length;e++)Qd.add(t[e])}var nn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Oi=Object.prototype.hasOwnProperty,mh=/^[: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]*$/,Vu={},Hu={};function hh(e){return Oi.call(Hu,e)?!0:Oi.call(Vu,e)?!1:mh.test(e)?Hu[e]=!0:(Vu[e]=!0,!1)}function gh(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function yh(e,t,n,r){if(t===null||typeof t>"u"||gh(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function et(e,t,n,r,o,l,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=l,this.removeEmptyString=s}var Ve={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ve[e]=new et(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ve[t]=new et(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ve[e]=new et(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ve[e]=new et(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ve[e]=new et(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ve[e]=new et(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ve[e]=new et(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ve[e]=new et(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ve[e]=new et(e,5,!1,e.toLowerCase(),null,!1,!1)});var Wa=/[\-:]([a-z])/g;function Va(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Wa,Va);Ve[t]=new et(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Wa,Va);Ve[t]=new et(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Wa,Va);Ve[t]=new et(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ve[e]=new et(e,1,!1,e.toLowerCase(),null,!1,!1)});Ve.xlinkHref=new et("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ve[e]=new et(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ha(e,t,n,r){var o=Ve.hasOwnProperty(t)?Ve[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(yh(t,n,o,r)&&(n=null),r||o===null?hh(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var mn=ph.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,sl=Symbol.for("react.element"),xr=Symbol.for("react.portal"),wr=Symbol.for("react.fragment"),Ba=Symbol.for("react.strict_mode"),Di=Symbol.for("react.profiler"),Xd=Symbol.for("react.provider"),Zd=Symbol.for("react.context"),Ua=Symbol.for("react.forward_ref"),Mi=Symbol.for("react.suspense"),zi=Symbol.for("react.suspense_list"),Ga=Symbol.for("react.memo"),gn=Symbol.for("react.lazy"),Jd=Symbol.for("react.offscreen"),Bu=Symbol.iterator;function io(e){return e===null||typeof e!="object"?null:(e=Bu&&e[Bu]||e["@@iterator"],typeof e=="function"?e:null)}var Se=Object.assign,Gs;function yo(e){if(Gs===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Gs=t&&t[1]||""}return`
|
|
34
|
-
`+Gs+e}var Ys=!1;function Qs(e,t){if(!e||Ys)return"";Ys=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var o=c.stack.split(`
|
|
35
|
-
`),l=r.stack.split(`
|
|
36
|
-
`),s=o.length-1,i=l.length-1;1<=s&&0<=i&&o[s]!==l[i];)i--;for(;1<=s&&0<=i;s--,i--)if(o[s]!==l[i]){if(s!==1||i!==1)do if(s--,i--,0>i||o[s]!==l[i]){var u=`
|
|
37
|
-
`+o[s].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=s&&0<=i);break}}}finally{Ys=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?yo(e):""}function vh(e){switch(e.tag){case 5:return yo(e.type);case 16:return yo("Lazy");case 13:return yo("Suspense");case 19:return yo("SuspenseList");case 0:case 2:case 15:return e=Qs(e.type,!1),e;case 11:return e=Qs(e.type.render,!1),e;case 1:return e=Qs(e.type,!0),e;default:return""}}function $i(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case wr:return"Fragment";case xr:return"Portal";case Di:return"Profiler";case Ba:return"StrictMode";case Mi:return"Suspense";case zi:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Zd:return(e.displayName||"Context")+".Consumer";case Xd:return(e._context.displayName||"Context")+".Provider";case Ua:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ga:return t=e.displayName||null,t!==null?t:$i(e.type)||"Memo";case gn:t=e._payload,e=e._init;try{return $i(e(t))}catch{}}return null}function xh(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return $i(t);case 8:return t===Ba?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function An(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function qd(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function wh(e){var t=qd(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,l=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,l.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function il(e){e._valueTracker||(e._valueTracker=wh(e))}function ef(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=qd(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Vl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ki(e,t){var n=t.checked;return Se({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Uu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=An(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function tf(e,t){t=t.checked,t!=null&&Ha(e,"checked",t,!1)}function Fi(e,t){tf(e,t);var n=An(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Wi(e,t.type,n):t.hasOwnProperty("defaultValue")&&Wi(e,t.type,An(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Gu(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Wi(e,t,n){(t!=="number"||Vl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var vo=Array.isArray;function Lr(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+An(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Vi(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(D(91));return Se({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Yu(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(D(92));if(vo(n)){if(1<n.length)throw Error(D(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:An(n)}}function nf(e,t){var n=An(t.value),r=An(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Qu(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function rf(e){switch(e){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 Hi(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?rf(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var al,of=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(al=al||document.createElement("div"),al.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=al.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ao(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var So={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},bh=["Webkit","ms","Moz","O"];Object.keys(So).forEach(function(e){bh.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),So[t]=So[e]})});function lf(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||So.hasOwnProperty(e)&&So[e]?(""+t).trim():t+"px"}function sf(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=lf(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var Sh=Se({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 Bi(e,t){if(t){if(Sh[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(D(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(D(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(D(61))}if(t.style!=null&&typeof t.style!="object")throw Error(D(62))}}function Ui(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Gi=null;function Ya(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Yi=null,Ir=null,Or=null;function Xu(e){if(e=qo(e)){if(typeof Yi!="function")throw Error(D(280));var t=e.stateNode;t&&(t=Ns(t),Yi(e.stateNode,e.type,t))}}function af(e){Ir?Or?Or.push(e):Or=[e]:Ir=e}function uf(){if(Ir){var e=Ir,t=Or;if(Or=Ir=null,Xu(e),t)for(e=0;e<t.length;e++)Xu(t[e])}}function cf(e,t){return e(t)}function df(){}var Xs=!1;function ff(e,t,n){if(Xs)return e(t,n);Xs=!0;try{return cf(e,t,n)}finally{Xs=!1,(Ir!==null||Or!==null)&&(df(),uf())}}function Lo(e,t){var n=e.stateNode;if(n===null)return null;var r=Ns(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(D(231,t,typeof n));return n}var Qi=!1;if(nn)try{var ao={};Object.defineProperty(ao,"passive",{get:function(){Qi=!0}}),window.addEventListener("test",ao,ao),window.removeEventListener("test",ao,ao)}catch{Qi=!1}function kh(e,t,n,r,o,l,s,i,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(d){this.onError(d)}}var ko=!1,Hl=null,Bl=!1,Xi=null,Ch={onError:function(e){ko=!0,Hl=e}};function jh(e,t,n,r,o,l,s,i,u){ko=!1,Hl=null,kh.apply(Ch,arguments)}function Eh(e,t,n,r,o,l,s,i,u){if(jh.apply(this,arguments),ko){if(ko){var c=Hl;ko=!1,Hl=null}else throw Error(D(198));Bl||(Bl=!0,Xi=c)}}function cr(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function pf(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Zu(e){if(cr(e)!==e)throw Error(D(188))}function Th(e){var t=e.alternate;if(!t){if(t=cr(e),t===null)throw Error(D(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var l=o.alternate;if(l===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===l.child){for(l=o.child;l;){if(l===n)return Zu(o),e;if(l===r)return Zu(o),t;l=l.sibling}throw Error(D(188))}if(n.return!==r.return)n=o,r=l;else{for(var s=!1,i=o.child;i;){if(i===n){s=!0,n=o,r=l;break}if(i===r){s=!0,r=o,n=l;break}i=i.sibling}if(!s){for(i=l.child;i;){if(i===n){s=!0,n=l,r=o;break}if(i===r){s=!0,r=l,n=o;break}i=i.sibling}if(!s)throw Error(D(189))}}if(n.alternate!==r)throw Error(D(190))}if(n.tag!==3)throw Error(D(188));return n.stateNode.current===n?e:t}function mf(e){return e=Th(e),e!==null?hf(e):null}function hf(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=hf(e);if(t!==null)return t;e=e.sibling}return null}var gf=ft.unstable_scheduleCallback,Ju=ft.unstable_cancelCallback,Nh=ft.unstable_shouldYield,Rh=ft.unstable_requestPaint,Te=ft.unstable_now,Ph=ft.unstable_getCurrentPriorityLevel,Qa=ft.unstable_ImmediatePriority,yf=ft.unstable_UserBlockingPriority,Ul=ft.unstable_NormalPriority,_h=ft.unstable_LowPriority,vf=ft.unstable_IdlePriority,Cs=null,It=null;function Ah(e){if(It&&typeof It.onCommitFiberRoot=="function")try{It.onCommitFiberRoot(Cs,e,void 0,(e.current.flags&128)===128)}catch{}}var Nt=Math.clz32?Math.clz32:Oh,Lh=Math.log,Ih=Math.LN2;function Oh(e){return e>>>=0,e===0?32:31-(Lh(e)/Ih|0)|0}var ul=64,cl=4194304;function xo(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Gl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,l=e.pingedLanes,s=n&268435455;if(s!==0){var i=s&~o;i!==0?r=xo(i):(l&=s,l!==0&&(r=xo(l)))}else s=n&~o,s!==0?r=xo(s):l!==0&&(r=xo(l));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,l=t&-t,o>=l||o===16&&(l&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Nt(t),o=1<<n,r|=e[n],t&=~o;return r}function Dh(e,t){switch(e){case 1:case 2:case 4:return t+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 t+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 Mh(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,l=e.pendingLanes;0<l;){var s=31-Nt(l),i=1<<s,u=o[s];u===-1?(!(i&n)||i&r)&&(o[s]=Dh(i,t)):u<=t&&(e.expiredLanes|=i),l&=~i}}function Zi(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function xf(){var e=ul;return ul<<=1,!(ul&4194240)&&(ul=64),e}function Zs(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Zo(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Nt(t),e[t]=n}function zh(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-Nt(n),l=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~l}}function Xa(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Nt(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var ce=0;function wf(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var bf,Za,Sf,kf,Cf,Ji=!1,dl=[],kn=null,Cn=null,jn=null,Io=new Map,Oo=new Map,xn=[],$h="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 qu(e,t){switch(e){case"focusin":case"focusout":kn=null;break;case"dragenter":case"dragleave":Cn=null;break;case"mouseover":case"mouseout":jn=null;break;case"pointerover":case"pointerout":Io.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Oo.delete(t.pointerId)}}function uo(e,t,n,r,o,l){return e===null||e.nativeEvent!==l?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:l,targetContainers:[o]},t!==null&&(t=qo(t),t!==null&&Za(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function Kh(e,t,n,r,o){switch(t){case"focusin":return kn=uo(kn,e,t,n,r,o),!0;case"dragenter":return Cn=uo(Cn,e,t,n,r,o),!0;case"mouseover":return jn=uo(jn,e,t,n,r,o),!0;case"pointerover":var l=o.pointerId;return Io.set(l,uo(Io.get(l)||null,e,t,n,r,o)),!0;case"gotpointercapture":return l=o.pointerId,Oo.set(l,uo(Oo.get(l)||null,e,t,n,r,o)),!0}return!1}function jf(e){var t=Un(e.target);if(t!==null){var n=cr(t);if(n!==null){if(t=n.tag,t===13){if(t=pf(n),t!==null){e.blockedOn=t,Cf(e.priority,function(){Sf(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function El(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=qi(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Gi=r,n.target.dispatchEvent(r),Gi=null}else return t=qo(n),t!==null&&Za(t),e.blockedOn=n,!1;t.shift()}return!0}function ec(e,t,n){El(e)&&n.delete(t)}function Fh(){Ji=!1,kn!==null&&El(kn)&&(kn=null),Cn!==null&&El(Cn)&&(Cn=null),jn!==null&&El(jn)&&(jn=null),Io.forEach(ec),Oo.forEach(ec)}function co(e,t){e.blockedOn===t&&(e.blockedOn=null,Ji||(Ji=!0,ft.unstable_scheduleCallback(ft.unstable_NormalPriority,Fh)))}function Do(e){function t(o){return co(o,e)}if(0<dl.length){co(dl[0],e);for(var n=1;n<dl.length;n++){var r=dl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(kn!==null&&co(kn,e),Cn!==null&&co(Cn,e),jn!==null&&co(jn,e),Io.forEach(t),Oo.forEach(t),n=0;n<xn.length;n++)r=xn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<xn.length&&(n=xn[0],n.blockedOn===null);)jf(n),n.blockedOn===null&&xn.shift()}var Dr=mn.ReactCurrentBatchConfig,Yl=!0;function Wh(e,t,n,r){var o=ce,l=Dr.transition;Dr.transition=null;try{ce=1,Ja(e,t,n,r)}finally{ce=o,Dr.transition=l}}function Vh(e,t,n,r){var o=ce,l=Dr.transition;Dr.transition=null;try{ce=4,Ja(e,t,n,r)}finally{ce=o,Dr.transition=l}}function Ja(e,t,n,r){if(Yl){var o=qi(e,t,n,r);if(o===null)ii(e,t,r,Ql,n),qu(e,r);else if(Kh(o,e,t,n,r))r.stopPropagation();else if(qu(e,r),t&4&&-1<$h.indexOf(e)){for(;o!==null;){var l=qo(o);if(l!==null&&bf(l),l=qi(e,t,n,r),l===null&&ii(e,t,r,Ql,n),l===o)break;o=l}o!==null&&r.stopPropagation()}else ii(e,t,r,null,n)}}var Ql=null;function qi(e,t,n,r){if(Ql=null,e=Ya(r),e=Un(e),e!==null)if(t=cr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=pf(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Ql=e,null}function Ef(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"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(Ph()){case Qa:return 1;case yf:return 4;case Ul:case _h:return 16;case vf:return 536870912;default:return 16}default:return 16}}var bn=null,qa=null,Tl=null;function Tf(){if(Tl)return Tl;var e,t=qa,n=t.length,r,o="value"in bn?bn.value:bn.textContent,l=o.length;for(e=0;e<n&&t[e]===o[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===o[l-r];r++);return Tl=o.slice(e,1<r?1-r:void 0)}function Nl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function fl(){return!0}function tc(){return!1}function mt(e){function t(n,r,o,l,s){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=l,this.target=s,this.currentTarget=null;for(var i in e)e.hasOwnProperty(i)&&(n=e[i],this[i]=n?n(l):l[i]);return this.isDefaultPrevented=(l.defaultPrevented!=null?l.defaultPrevented:l.returnValue===!1)?fl:tc,this.isPropagationStopped=tc,this}return Se(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=fl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=fl)},persist:function(){},isPersistent:fl}),t}var Zr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},eu=mt(Zr),Jo=Se({},Zr,{view:0,detail:0}),Hh=mt(Jo),Js,qs,fo,js=Se({},Jo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:tu,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==fo&&(fo&&e.type==="mousemove"?(Js=e.screenX-fo.screenX,qs=e.screenY-fo.screenY):qs=Js=0,fo=e),Js)},movementY:function(e){return"movementY"in e?e.movementY:qs}}),nc=mt(js),Bh=Se({},js,{dataTransfer:0}),Uh=mt(Bh),Gh=Se({},Jo,{relatedTarget:0}),ei=mt(Gh),Yh=Se({},Zr,{animationName:0,elapsedTime:0,pseudoElement:0}),Qh=mt(Yh),Xh=Se({},Zr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Zh=mt(Xh),Jh=Se({},Zr,{data:0}),rc=mt(Jh),qh={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},eg={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"},tg={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ng(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=tg[e])?!!t[e]:!1}function tu(){return ng}var rg=Se({},Jo,{key:function(e){if(e.key){var t=qh[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Nl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?eg[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:tu,charCode:function(e){return e.type==="keypress"?Nl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Nl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),og=mt(rg),lg=Se({},js,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),oc=mt(lg),sg=Se({},Jo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:tu}),ig=mt(sg),ag=Se({},Zr,{propertyName:0,elapsedTime:0,pseudoElement:0}),ug=mt(ag),cg=Se({},js,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),dg=mt(cg),fg=[9,13,27,32],nu=nn&&"CompositionEvent"in window,Co=null;nn&&"documentMode"in document&&(Co=document.documentMode);var pg=nn&&"TextEvent"in window&&!Co,Nf=nn&&(!nu||Co&&8<Co&&11>=Co),lc=" ",sc=!1;function Rf(e,t){switch(e){case"keyup":return fg.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Pf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var br=!1;function mg(e,t){switch(e){case"compositionend":return Pf(t);case"keypress":return t.which!==32?null:(sc=!0,lc);case"textInput":return e=t.data,e===lc&&sc?null:e;default:return null}}function hg(e,t){if(br)return e==="compositionend"||!nu&&Rf(e,t)?(e=Tf(),Tl=qa=bn=null,br=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Nf&&t.locale!=="ko"?null:t.data;default:return null}}var gg={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 ic(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!gg[e.type]:t==="textarea"}function _f(e,t,n,r){af(r),t=Xl(t,"onChange"),0<t.length&&(n=new eu("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var jo=null,Mo=null;function yg(e){Wf(e,0)}function Es(e){var t=Cr(e);if(ef(t))return e}function vg(e,t){if(e==="change")return t}var Af=!1;if(nn){var ti;if(nn){var ni="oninput"in document;if(!ni){var ac=document.createElement("div");ac.setAttribute("oninput","return;"),ni=typeof ac.oninput=="function"}ti=ni}else ti=!1;Af=ti&&(!document.documentMode||9<document.documentMode)}function uc(){jo&&(jo.detachEvent("onpropertychange",Lf),Mo=jo=null)}function Lf(e){if(e.propertyName==="value"&&Es(Mo)){var t=[];_f(t,Mo,e,Ya(e)),ff(yg,t)}}function xg(e,t,n){e==="focusin"?(uc(),jo=t,Mo=n,jo.attachEvent("onpropertychange",Lf)):e==="focusout"&&uc()}function wg(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Es(Mo)}function bg(e,t){if(e==="click")return Es(t)}function Sg(e,t){if(e==="input"||e==="change")return Es(t)}function kg(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Pt=typeof Object.is=="function"?Object.is:kg;function zo(e,t){if(Pt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!Oi.call(t,o)||!Pt(e[o],t[o]))return!1}return!0}function cc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function dc(e,t){var n=cc(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=cc(n)}}function If(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?If(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Of(){for(var e=window,t=Vl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Vl(e.document)}return t}function ru(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Cg(e){var t=Of(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&If(n.ownerDocument.documentElement,n)){if(r!==null&&ru(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,l=Math.min(r.start,o);r=r.end===void 0?l:Math.min(r.end,o),!e.extend&&l>r&&(o=r,r=l,l=o),o=dc(n,l);var s=dc(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),l>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var jg=nn&&"documentMode"in document&&11>=document.documentMode,Sr=null,ea=null,Eo=null,ta=!1;function fc(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ta||Sr==null||Sr!==Vl(r)||(r=Sr,"selectionStart"in r&&ru(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Eo&&zo(Eo,r)||(Eo=r,r=Xl(ea,"onSelect"),0<r.length&&(t=new eu("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Sr)))}function pl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var kr={animationend:pl("Animation","AnimationEnd"),animationiteration:pl("Animation","AnimationIteration"),animationstart:pl("Animation","AnimationStart"),transitionend:pl("Transition","TransitionEnd")},ri={},Df={};nn&&(Df=document.createElement("div").style,"AnimationEvent"in window||(delete kr.animationend.animation,delete kr.animationiteration.animation,delete kr.animationstart.animation),"TransitionEvent"in window||delete kr.transitionend.transition);function Ts(e){if(ri[e])return ri[e];if(!kr[e])return e;var t=kr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Df)return ri[e]=t[n];return e}var Mf=Ts("animationend"),zf=Ts("animationiteration"),$f=Ts("animationstart"),Kf=Ts("transitionend"),Ff=new Map,pc="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 Dn(e,t){Ff.set(e,t),ur(t,[e])}for(var oi=0;oi<pc.length;oi++){var li=pc[oi],Eg=li.toLowerCase(),Tg=li[0].toUpperCase()+li.slice(1);Dn(Eg,"on"+Tg)}Dn(Mf,"onAnimationEnd");Dn(zf,"onAnimationIteration");Dn($f,"onAnimationStart");Dn("dblclick","onDoubleClick");Dn("focusin","onFocus");Dn("focusout","onBlur");Dn(Kf,"onTransitionEnd");Fr("onMouseEnter",["mouseout","mouseover"]);Fr("onMouseLeave",["mouseout","mouseover"]);Fr("onPointerEnter",["pointerout","pointerover"]);Fr("onPointerLeave",["pointerout","pointerover"]);ur("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ur("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ur("onBeforeInput",["compositionend","keypress","textInput","paste"]);ur("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ur("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ur("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var wo="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(" "),Ng=new Set("cancel close invalid load scroll toggle".split(" ").concat(wo));function mc(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Eh(r,t,void 0,e),e.currentTarget=null}function Wf(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var l=void 0;if(t)for(var s=r.length-1;0<=s;s--){var i=r[s],u=i.instance,c=i.currentTarget;if(i=i.listener,u!==l&&o.isPropagationStopped())break e;mc(o,i,c),l=u}else for(s=0;s<r.length;s++){if(i=r[s],u=i.instance,c=i.currentTarget,i=i.listener,u!==l&&o.isPropagationStopped())break e;mc(o,i,c),l=u}}}if(Bl)throw e=Xi,Bl=!1,Xi=null,e}function ye(e,t){var n=t[sa];n===void 0&&(n=t[sa]=new Set);var r=e+"__bubble";n.has(r)||(Vf(t,e,2,!1),n.add(r))}function si(e,t,n){var r=0;t&&(r|=4),Vf(n,e,r,t)}var ml="_reactListening"+Math.random().toString(36).slice(2);function $o(e){if(!e[ml]){e[ml]=!0,Qd.forEach(function(n){n!=="selectionchange"&&(Ng.has(n)||si(n,!1,e),si(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ml]||(t[ml]=!0,si("selectionchange",!1,t))}}function Vf(e,t,n,r){switch(Ef(t)){case 1:var o=Wh;break;case 4:o=Vh;break;default:o=Ja}n=o.bind(null,t,n,e),o=void 0,!Qi||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function ii(e,t,n,r,o){var l=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var i=r.stateNode.containerInfo;if(i===o||i.nodeType===8&&i.parentNode===o)break;if(s===4)for(s=r.return;s!==null;){var u=s.tag;if((u===3||u===4)&&(u=s.stateNode.containerInfo,u===o||u.nodeType===8&&u.parentNode===o))return;s=s.return}for(;i!==null;){if(s=Un(i),s===null)return;if(u=s.tag,u===5||u===6){r=l=s;continue e}i=i.parentNode}}r=r.return}ff(function(){var c=l,d=Ya(n),m=[];e:{var f=Ff.get(e);if(f!==void 0){var g=eu,v=e;switch(e){case"keypress":if(Nl(n)===0)break e;case"keydown":case"keyup":g=og;break;case"focusin":v="focus",g=ei;break;case"focusout":v="blur",g=ei;break;case"beforeblur":case"afterblur":g=ei;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":g=nc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":g=Uh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":g=ig;break;case Mf:case zf:case $f:g=Qh;break;case Kf:g=ug;break;case"scroll":g=Hh;break;case"wheel":g=dg;break;case"copy":case"cut":case"paste":g=Zh;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":g=oc}var w=(t&4)!==0,S=!w&&e==="scroll",h=w?f!==null?f+"Capture":null:f;w=[];for(var p=c,y;p!==null;){y=p;var x=y.stateNode;if(y.tag===5&&x!==null&&(y=x,h!==null&&(x=Lo(p,h),x!=null&&w.push(Ko(p,x,y)))),S)break;p=p.return}0<w.length&&(f=new g(f,v,null,n,d),m.push({event:f,listeners:w}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",g=e==="mouseout"||e==="pointerout",f&&n!==Gi&&(v=n.relatedTarget||n.fromElement)&&(Un(v)||v[rn]))break e;if((g||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,g?(v=n.relatedTarget||n.toElement,g=c,v=v?Un(v):null,v!==null&&(S=cr(v),v!==S||v.tag!==5&&v.tag!==6)&&(v=null)):(g=null,v=c),g!==v)){if(w=nc,x="onMouseLeave",h="onMouseEnter",p="mouse",(e==="pointerout"||e==="pointerover")&&(w=oc,x="onPointerLeave",h="onPointerEnter",p="pointer"),S=g==null?f:Cr(g),y=v==null?f:Cr(v),f=new w(x,p+"leave",g,n,d),f.target=S,f.relatedTarget=y,x=null,Un(d)===c&&(w=new w(h,p+"enter",v,n,d),w.target=y,w.relatedTarget=S,x=w),S=x,g&&v)t:{for(w=g,h=v,p=0,y=w;y;y=mr(y))p++;for(y=0,x=h;x;x=mr(x))y++;for(;0<p-y;)w=mr(w),p--;for(;0<y-p;)h=mr(h),y--;for(;p--;){if(w===h||h!==null&&w===h.alternate)break t;w=mr(w),h=mr(h)}w=null}else w=null;g!==null&&hc(m,f,g,w,!1),v!==null&&S!==null&&hc(m,S,v,w,!0)}}e:{if(f=c?Cr(c):window,g=f.nodeName&&f.nodeName.toLowerCase(),g==="select"||g==="input"&&f.type==="file")var j=vg;else if(ic(f))if(Af)j=Sg;else{j=wg;var k=xg}else(g=f.nodeName)&&g.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(j=bg);if(j&&(j=j(e,c))){_f(m,j,n,d);break e}k&&k(e,f,c),e==="focusout"&&(k=f._wrapperState)&&k.controlled&&f.type==="number"&&Wi(f,"number",f.value)}switch(k=c?Cr(c):window,e){case"focusin":(ic(k)||k.contentEditable==="true")&&(Sr=k,ea=c,Eo=null);break;case"focusout":Eo=ea=Sr=null;break;case"mousedown":ta=!0;break;case"contextmenu":case"mouseup":case"dragend":ta=!1,fc(m,n,d);break;case"selectionchange":if(jg)break;case"keydown":case"keyup":fc(m,n,d)}var C;if(nu)e:{switch(e){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else br?Rf(e,n)&&(T="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(Nf&&n.locale!=="ko"&&(br||T!=="onCompositionStart"?T==="onCompositionEnd"&&br&&(C=Tf()):(bn=d,qa="value"in bn?bn.value:bn.textContent,br=!0)),k=Xl(c,T),0<k.length&&(T=new rc(T,e,null,n,d),m.push({event:T,listeners:k}),C?T.data=C:(C=Pf(n),C!==null&&(T.data=C)))),(C=pg?mg(e,n):hg(e,n))&&(c=Xl(c,"onBeforeInput"),0<c.length&&(d=new rc("onBeforeInput","beforeinput",null,n,d),m.push({event:d,listeners:c}),d.data=C))}Wf(m,t)})}function Ko(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Xl(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,l=o.stateNode;o.tag===5&&l!==null&&(o=l,l=Lo(e,n),l!=null&&r.unshift(Ko(e,l,o)),l=Lo(e,t),l!=null&&r.push(Ko(e,l,o))),e=e.return}return r}function mr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function hc(e,t,n,r,o){for(var l=t._reactName,s=[];n!==null&&n!==r;){var i=n,u=i.alternate,c=i.stateNode;if(u!==null&&u===r)break;i.tag===5&&c!==null&&(i=c,o?(u=Lo(n,l),u!=null&&s.unshift(Ko(n,u,i))):o||(u=Lo(n,l),u!=null&&s.push(Ko(n,u,i)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var Rg=/\r\n?/g,Pg=/\u0000|\uFFFD/g;function gc(e){return(typeof e=="string"?e:""+e).replace(Rg,`
|
|
38
|
-
`).replace(Pg,"")}function hl(e,t,n){if(t=gc(t),gc(e)!==t&&n)throw Error(D(425))}function Zl(){}var na=null,ra=null;function oa(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var la=typeof setTimeout=="function"?setTimeout:void 0,_g=typeof clearTimeout=="function"?clearTimeout:void 0,yc=typeof Promise=="function"?Promise:void 0,Ag=typeof queueMicrotask=="function"?queueMicrotask:typeof yc<"u"?function(e){return yc.resolve(null).then(e).catch(Lg)}:la;function Lg(e){setTimeout(function(){throw e})}function ai(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),Do(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);Do(t)}function En(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function vc(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Jr=Math.random().toString(36).slice(2),Lt="__reactFiber$"+Jr,Fo="__reactProps$"+Jr,rn="__reactContainer$"+Jr,sa="__reactEvents$"+Jr,Ig="__reactListeners$"+Jr,Og="__reactHandles$"+Jr;function Un(e){var t=e[Lt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[rn]||n[Lt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=vc(e);e!==null;){if(n=e[Lt])return n;e=vc(e)}return t}e=n,n=e.parentNode}return null}function qo(e){return e=e[Lt]||e[rn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Cr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(D(33))}function Ns(e){return e[Fo]||null}var ia=[],jr=-1;function Mn(e){return{current:e}}function ve(e){0>jr||(e.current=ia[jr],ia[jr]=null,jr--)}function me(e,t){jr++,ia[jr]=e.current,e.current=t}var Ln={},Ye=Mn(Ln),ot=Mn(!1),qn=Ln;function Wr(e,t){var n=e.type.contextTypes;if(!n)return Ln;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},l;for(l in n)o[l]=t[l];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function lt(e){return e=e.childContextTypes,e!=null}function Jl(){ve(ot),ve(Ye)}function xc(e,t,n){if(Ye.current!==Ln)throw Error(D(168));me(Ye,t),me(ot,n)}function Hf(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(D(108,xh(e)||"Unknown",o));return Se({},n,r)}function ql(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ln,qn=Ye.current,me(Ye,e),me(ot,ot.current),!0}function wc(e,t,n){var r=e.stateNode;if(!r)throw Error(D(169));n?(e=Hf(e,t,qn),r.__reactInternalMemoizedMergedChildContext=e,ve(ot),ve(Ye),me(Ye,e)):ve(ot),me(ot,n)}var Yt=null,Rs=!1,ui=!1;function Bf(e){Yt===null?Yt=[e]:Yt.push(e)}function Dg(e){Rs=!0,Bf(e)}function zn(){if(!ui&&Yt!==null){ui=!0;var e=0,t=ce;try{var n=Yt;for(ce=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Yt=null,Rs=!1}catch(o){throw Yt!==null&&(Yt=Yt.slice(e+1)),gf(Qa,zn),o}finally{ce=t,ui=!1}}return null}var Er=[],Tr=0,es=null,ts=0,gt=[],yt=0,er=null,Xt=1,Zt="";function Hn(e,t){Er[Tr++]=ts,Er[Tr++]=es,es=e,ts=t}function Uf(e,t,n){gt[yt++]=Xt,gt[yt++]=Zt,gt[yt++]=er,er=e;var r=Xt;e=Zt;var o=32-Nt(r)-1;r&=~(1<<o),n+=1;var l=32-Nt(t)+o;if(30<l){var s=o-o%5;l=(r&(1<<s)-1).toString(32),r>>=s,o-=s,Xt=1<<32-Nt(t)+o|n<<o|r,Zt=l+e}else Xt=1<<l|n<<o|r,Zt=e}function ou(e){e.return!==null&&(Hn(e,1),Uf(e,1,0))}function lu(e){for(;e===es;)es=Er[--Tr],Er[Tr]=null,ts=Er[--Tr],Er[Tr]=null;for(;e===er;)er=gt[--yt],gt[yt]=null,Zt=gt[--yt],gt[yt]=null,Xt=gt[--yt],gt[yt]=null}var ct=null,ut=null,xe=!1,Tt=null;function Gf(e,t){var n=vt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function bc(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,ct=e,ut=En(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,ct=e,ut=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=er!==null?{id:Xt,overflow:Zt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=vt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,ct=e,ut=null,!0):!1;default:return!1}}function aa(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ua(e){if(xe){var t=ut;if(t){var n=t;if(!bc(e,t)){if(aa(e))throw Error(D(418));t=En(n.nextSibling);var r=ct;t&&bc(e,t)?Gf(r,n):(e.flags=e.flags&-4097|2,xe=!1,ct=e)}}else{if(aa(e))throw Error(D(418));e.flags=e.flags&-4097|2,xe=!1,ct=e}}}function Sc(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;ct=e}function gl(e){if(e!==ct)return!1;if(!xe)return Sc(e),xe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!oa(e.type,e.memoizedProps)),t&&(t=ut)){if(aa(e))throw Yf(),Error(D(418));for(;t;)Gf(e,t),t=En(t.nextSibling)}if(Sc(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(D(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){ut=En(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}ut=null}}else ut=ct?En(e.stateNode.nextSibling):null;return!0}function Yf(){for(var e=ut;e;)e=En(e.nextSibling)}function Vr(){ut=ct=null,xe=!1}function su(e){Tt===null?Tt=[e]:Tt.push(e)}var Mg=mn.ReactCurrentBatchConfig;function po(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(D(309));var r=n.stateNode}if(!r)throw Error(D(147,e));var o=r,l=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===l?t.ref:(t=function(s){var i=o.refs;s===null?delete i[l]:i[l]=s},t._stringRef=l,t)}if(typeof e!="string")throw Error(D(284));if(!n._owner)throw Error(D(290,e))}return e}function yl(e,t){throw e=Object.prototype.toString.call(t),Error(D(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function kc(e){var t=e._init;return t(e._payload)}function Qf(e){function t(h,p){if(e){var y=h.deletions;y===null?(h.deletions=[p],h.flags|=16):y.push(p)}}function n(h,p){if(!e)return null;for(;p!==null;)t(h,p),p=p.sibling;return null}function r(h,p){for(h=new Map;p!==null;)p.key!==null?h.set(p.key,p):h.set(p.index,p),p=p.sibling;return h}function o(h,p){return h=Pn(h,p),h.index=0,h.sibling=null,h}function l(h,p,y){return h.index=y,e?(y=h.alternate,y!==null?(y=y.index,y<p?(h.flags|=2,p):y):(h.flags|=2,p)):(h.flags|=1048576,p)}function s(h){return e&&h.alternate===null&&(h.flags|=2),h}function i(h,p,y,x){return p===null||p.tag!==6?(p=gi(y,h.mode,x),p.return=h,p):(p=o(p,y),p.return=h,p)}function u(h,p,y,x){var j=y.type;return j===wr?d(h,p,y.props.children,x,y.key):p!==null&&(p.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===gn&&kc(j)===p.type)?(x=o(p,y.props),x.ref=po(h,p,y),x.return=h,x):(x=Ol(y.type,y.key,y.props,null,h.mode,x),x.ref=po(h,p,y),x.return=h,x)}function c(h,p,y,x){return p===null||p.tag!==4||p.stateNode.containerInfo!==y.containerInfo||p.stateNode.implementation!==y.implementation?(p=yi(y,h.mode,x),p.return=h,p):(p=o(p,y.children||[]),p.return=h,p)}function d(h,p,y,x,j){return p===null||p.tag!==7?(p=Zn(y,h.mode,x,j),p.return=h,p):(p=o(p,y),p.return=h,p)}function m(h,p,y){if(typeof p=="string"&&p!==""||typeof p=="number")return p=gi(""+p,h.mode,y),p.return=h,p;if(typeof p=="object"&&p!==null){switch(p.$$typeof){case sl:return y=Ol(p.type,p.key,p.props,null,h.mode,y),y.ref=po(h,null,p),y.return=h,y;case xr:return p=yi(p,h.mode,y),p.return=h,p;case gn:var x=p._init;return m(h,x(p._payload),y)}if(vo(p)||io(p))return p=Zn(p,h.mode,y,null),p.return=h,p;yl(h,p)}return null}function f(h,p,y,x){var j=p!==null?p.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return j!==null?null:i(h,p,""+y,x);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case sl:return y.key===j?u(h,p,y,x):null;case xr:return y.key===j?c(h,p,y,x):null;case gn:return j=y._init,f(h,p,j(y._payload),x)}if(vo(y)||io(y))return j!==null?null:d(h,p,y,x,null);yl(h,y)}return null}function g(h,p,y,x,j){if(typeof x=="string"&&x!==""||typeof x=="number")return h=h.get(y)||null,i(p,h,""+x,j);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case sl:return h=h.get(x.key===null?y:x.key)||null,u(p,h,x,j);case xr:return h=h.get(x.key===null?y:x.key)||null,c(p,h,x,j);case gn:var k=x._init;return g(h,p,y,k(x._payload),j)}if(vo(x)||io(x))return h=h.get(y)||null,d(p,h,x,j,null);yl(p,x)}return null}function v(h,p,y,x){for(var j=null,k=null,C=p,T=p=0,M=null;C!==null&&T<y.length;T++){C.index>T?(M=C,C=null):M=C.sibling;var _=f(h,C,y[T],x);if(_===null){C===null&&(C=M);break}e&&C&&_.alternate===null&&t(h,C),p=l(_,p,T),k===null?j=_:k.sibling=_,k=_,C=M}if(T===y.length)return n(h,C),xe&&Hn(h,T),j;if(C===null){for(;T<y.length;T++)C=m(h,y[T],x),C!==null&&(p=l(C,p,T),k===null?j=C:k.sibling=C,k=C);return xe&&Hn(h,T),j}for(C=r(h,C);T<y.length;T++)M=g(C,h,T,y[T],x),M!==null&&(e&&M.alternate!==null&&C.delete(M.key===null?T:M.key),p=l(M,p,T),k===null?j=M:k.sibling=M,k=M);return e&&C.forEach(function(F){return t(h,F)}),xe&&Hn(h,T),j}function w(h,p,y,x){var j=io(y);if(typeof j!="function")throw Error(D(150));if(y=j.call(y),y==null)throw Error(D(151));for(var k=j=null,C=p,T=p=0,M=null,_=y.next();C!==null&&!_.done;T++,_=y.next()){C.index>T?(M=C,C=null):M=C.sibling;var F=f(h,C,_.value,x);if(F===null){C===null&&(C=M);break}e&&C&&F.alternate===null&&t(h,C),p=l(F,p,T),k===null?j=F:k.sibling=F,k=F,C=M}if(_.done)return n(h,C),xe&&Hn(h,T),j;if(C===null){for(;!_.done;T++,_=y.next())_=m(h,_.value,x),_!==null&&(p=l(_,p,T),k===null?j=_:k.sibling=_,k=_);return xe&&Hn(h,T),j}for(C=r(h,C);!_.done;T++,_=y.next())_=g(C,h,T,_.value,x),_!==null&&(e&&_.alternate!==null&&C.delete(_.key===null?T:_.key),p=l(_,p,T),k===null?j=_:k.sibling=_,k=_);return e&&C.forEach(function(z){return t(h,z)}),xe&&Hn(h,T),j}function S(h,p,y,x){if(typeof y=="object"&&y!==null&&y.type===wr&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case sl:e:{for(var j=y.key,k=p;k!==null;){if(k.key===j){if(j=y.type,j===wr){if(k.tag===7){n(h,k.sibling),p=o(k,y.props.children),p.return=h,h=p;break e}}else if(k.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===gn&&kc(j)===k.type){n(h,k.sibling),p=o(k,y.props),p.ref=po(h,k,y),p.return=h,h=p;break e}n(h,k);break}else t(h,k);k=k.sibling}y.type===wr?(p=Zn(y.props.children,h.mode,x,y.key),p.return=h,h=p):(x=Ol(y.type,y.key,y.props,null,h.mode,x),x.ref=po(h,p,y),x.return=h,h=x)}return s(h);case xr:e:{for(k=y.key;p!==null;){if(p.key===k)if(p.tag===4&&p.stateNode.containerInfo===y.containerInfo&&p.stateNode.implementation===y.implementation){n(h,p.sibling),p=o(p,y.children||[]),p.return=h,h=p;break e}else{n(h,p);break}else t(h,p);p=p.sibling}p=yi(y,h.mode,x),p.return=h,h=p}return s(h);case gn:return k=y._init,S(h,p,k(y._payload),x)}if(vo(y))return v(h,p,y,x);if(io(y))return w(h,p,y,x);yl(h,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,p!==null&&p.tag===6?(n(h,p.sibling),p=o(p,y),p.return=h,h=p):(n(h,p),p=gi(y,h.mode,x),p.return=h,h=p),s(h)):n(h,p)}return S}var Hr=Qf(!0),Xf=Qf(!1),ns=Mn(null),rs=null,Nr=null,iu=null;function au(){iu=Nr=rs=null}function uu(e){var t=ns.current;ve(ns),e._currentValue=t}function ca(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Mr(e,t){rs=e,iu=Nr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(rt=!0),e.firstContext=null)}function bt(e){var t=e._currentValue;if(iu!==e)if(e={context:e,memoizedValue:t,next:null},Nr===null){if(rs===null)throw Error(D(308));Nr=e,rs.dependencies={lanes:0,firstContext:e}}else Nr=Nr.next=e;return t}var Gn=null;function cu(e){Gn===null?Gn=[e]:Gn.push(e)}function Zf(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,cu(t)):(n.next=o.next,o.next=n),t.interleaved=n,on(e,r)}function on(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var yn=!1;function du(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Jf(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function qt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Tn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ie&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,on(e,n)}return o=r.interleaved,o===null?(t.next=t,cu(r)):(t.next=o.next,o.next=t),r.interleaved=t,on(e,n)}function Rl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Xa(e,n)}}function Cc(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,l=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};l===null?o=l=s:l=l.next=s,n=n.next}while(n!==null);l===null?o=l=t:l=l.next=t}else o=l=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:l,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function os(e,t,n,r){var o=e.updateQueue;yn=!1;var l=o.firstBaseUpdate,s=o.lastBaseUpdate,i=o.shared.pending;if(i!==null){o.shared.pending=null;var u=i,c=u.next;u.next=null,s===null?l=c:s.next=c,s=u;var d=e.alternate;d!==null&&(d=d.updateQueue,i=d.lastBaseUpdate,i!==s&&(i===null?d.firstBaseUpdate=c:i.next=c,d.lastBaseUpdate=u))}if(l!==null){var m=o.baseState;s=0,d=c=u=null,i=l;do{var f=i.lane,g=i.eventTime;if((r&f)===f){d!==null&&(d=d.next={eventTime:g,lane:0,tag:i.tag,payload:i.payload,callback:i.callback,next:null});e:{var v=e,w=i;switch(f=t,g=n,w.tag){case 1:if(v=w.payload,typeof v=="function"){m=v.call(g,m,f);break e}m=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=w.payload,f=typeof v=="function"?v.call(g,m,f):v,f==null)break e;m=Se({},m,f);break e;case 2:yn=!0}}i.callback!==null&&i.lane!==0&&(e.flags|=64,f=o.effects,f===null?o.effects=[i]:f.push(i))}else g={eventTime:g,lane:f,tag:i.tag,payload:i.payload,callback:i.callback,next:null},d===null?(c=d=g,u=m):d=d.next=g,s|=f;if(i=i.next,i===null){if(i=o.shared.pending,i===null)break;f=i,i=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(!0);if(d===null&&(u=m),o.baseState=u,o.firstBaseUpdate=c,o.lastBaseUpdate=d,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else l===null&&(o.shared.lanes=0);nr|=s,e.lanes=s,e.memoizedState=m}}function jc(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(D(191,o));o.call(r)}}}var el={},Ot=Mn(el),Wo=Mn(el),Vo=Mn(el);function Yn(e){if(e===el)throw Error(D(174));return e}function fu(e,t){switch(me(Vo,t),me(Wo,e),me(Ot,el),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Hi(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Hi(t,e)}ve(Ot),me(Ot,t)}function Br(){ve(Ot),ve(Wo),ve(Vo)}function qf(e){Yn(Vo.current);var t=Yn(Ot.current),n=Hi(t,e.type);t!==n&&(me(Wo,e),me(Ot,n))}function pu(e){Wo.current===e&&(ve(Ot),ve(Wo))}var we=Mn(0);function ls(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ci=[];function mu(){for(var e=0;e<ci.length;e++)ci[e]._workInProgressVersionPrimary=null;ci.length=0}var Pl=mn.ReactCurrentDispatcher,di=mn.ReactCurrentBatchConfig,tr=0,be=null,Le=null,Me=null,ss=!1,To=!1,Ho=0,zg=0;function Be(){throw Error(D(321))}function hu(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Pt(e[n],t[n]))return!1;return!0}function gu(e,t,n,r,o,l){if(tr=l,be=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Pl.current=e===null||e.memoizedState===null?Wg:Vg,e=n(r,o),To){l=0;do{if(To=!1,Ho=0,25<=l)throw Error(D(301));l+=1,Me=Le=null,t.updateQueue=null,Pl.current=Hg,e=n(r,o)}while(To)}if(Pl.current=is,t=Le!==null&&Le.next!==null,tr=0,Me=Le=be=null,ss=!1,t)throw Error(D(300));return e}function yu(){var e=Ho!==0;return Ho=0,e}function At(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Me===null?be.memoizedState=Me=e:Me=Me.next=e,Me}function St(){if(Le===null){var e=be.alternate;e=e!==null?e.memoizedState:null}else e=Le.next;var t=Me===null?be.memoizedState:Me.next;if(t!==null)Me=t,Le=e;else{if(e===null)throw Error(D(310));Le=e,e={memoizedState:Le.memoizedState,baseState:Le.baseState,baseQueue:Le.baseQueue,queue:Le.queue,next:null},Me===null?be.memoizedState=Me=e:Me=Me.next=e}return Me}function Bo(e,t){return typeof t=="function"?t(e):t}function fi(e){var t=St(),n=t.queue;if(n===null)throw Error(D(311));n.lastRenderedReducer=e;var r=Le,o=r.baseQueue,l=n.pending;if(l!==null){if(o!==null){var s=o.next;o.next=l.next,l.next=s}r.baseQueue=o=l,n.pending=null}if(o!==null){l=o.next,r=r.baseState;var i=s=null,u=null,c=l;do{var d=c.lane;if((tr&d)===d)u!==null&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var m={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};u===null?(i=u=m,s=r):u=u.next=m,be.lanes|=d,nr|=d}c=c.next}while(c!==null&&c!==l);u===null?s=r:u.next=i,Pt(r,t.memoizedState)||(rt=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do l=o.lane,be.lanes|=l,nr|=l,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function pi(e){var t=St(),n=t.queue;if(n===null)throw Error(D(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,l=t.memoizedState;if(o!==null){n.pending=null;var s=o=o.next;do l=e(l,s.action),s=s.next;while(s!==o);Pt(l,t.memoizedState)||(rt=!0),t.memoizedState=l,t.baseQueue===null&&(t.baseState=l),n.lastRenderedState=l}return[l,r]}function ep(){}function tp(e,t){var n=be,r=St(),o=t(),l=!Pt(r.memoizedState,o);if(l&&(r.memoizedState=o,rt=!0),r=r.queue,vu(op.bind(null,n,r,e),[e]),r.getSnapshot!==t||l||Me!==null&&Me.memoizedState.tag&1){if(n.flags|=2048,Uo(9,rp.bind(null,n,r,o,t),void 0,null),ze===null)throw Error(D(349));tr&30||np(n,t,o)}return o}function np(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=be.updateQueue,t===null?(t={lastEffect:null,stores:null},be.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function rp(e,t,n,r){t.value=n,t.getSnapshot=r,lp(t)&&sp(e)}function op(e,t,n){return n(function(){lp(t)&&sp(e)})}function lp(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Pt(e,n)}catch{return!0}}function sp(e){var t=on(e,1);t!==null&&Rt(t,e,1,-1)}function Ec(e){var t=At();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Bo,lastRenderedState:e},t.queue=e,e=e.dispatch=Fg.bind(null,be,e),[t.memoizedState,e]}function Uo(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=be.updateQueue,t===null?(t={lastEffect:null,stores:null},be.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function ip(){return St().memoizedState}function _l(e,t,n,r){var o=At();be.flags|=e,o.memoizedState=Uo(1|t,n,void 0,r===void 0?null:r)}function Ps(e,t,n,r){var o=St();r=r===void 0?null:r;var l=void 0;if(Le!==null){var s=Le.memoizedState;if(l=s.destroy,r!==null&&hu(r,s.deps)){o.memoizedState=Uo(t,n,l,r);return}}be.flags|=e,o.memoizedState=Uo(1|t,n,l,r)}function Tc(e,t){return _l(8390656,8,e,t)}function vu(e,t){return Ps(2048,8,e,t)}function ap(e,t){return Ps(4,2,e,t)}function up(e,t){return Ps(4,4,e,t)}function cp(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function dp(e,t,n){return n=n!=null?n.concat([e]):null,Ps(4,4,cp.bind(null,t,e),n)}function xu(){}function fp(e,t){var n=St();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&hu(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function pp(e,t){var n=St();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&hu(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function mp(e,t,n){return tr&21?(Pt(n,t)||(n=xf(),be.lanes|=n,nr|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,rt=!0),e.memoizedState=n)}function $g(e,t){var n=ce;ce=n!==0&&4>n?n:4,e(!0);var r=di.transition;di.transition={};try{e(!1),t()}finally{ce=n,di.transition=r}}function hp(){return St().memoizedState}function Kg(e,t,n){var r=Rn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},gp(e))yp(t,n);else if(n=Zf(e,t,n,r),n!==null){var o=Ze();Rt(n,e,r,o),vp(n,t,r)}}function Fg(e,t,n){var r=Rn(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(gp(e))yp(t,o);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var s=t.lastRenderedState,i=l(s,n);if(o.hasEagerState=!0,o.eagerState=i,Pt(i,s)){var u=t.interleaved;u===null?(o.next=o,cu(t)):(o.next=u.next,u.next=o),t.interleaved=o;return}}catch{}finally{}n=Zf(e,t,o,r),n!==null&&(o=Ze(),Rt(n,e,r,o),vp(n,t,r))}}function gp(e){var t=e.alternate;return e===be||t!==null&&t===be}function yp(e,t){To=ss=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function vp(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Xa(e,n)}}var is={readContext:bt,useCallback:Be,useContext:Be,useEffect:Be,useImperativeHandle:Be,useInsertionEffect:Be,useLayoutEffect:Be,useMemo:Be,useReducer:Be,useRef:Be,useState:Be,useDebugValue:Be,useDeferredValue:Be,useTransition:Be,useMutableSource:Be,useSyncExternalStore:Be,useId:Be,unstable_isNewReconciler:!1},Wg={readContext:bt,useCallback:function(e,t){return At().memoizedState=[e,t===void 0?null:t],e},useContext:bt,useEffect:Tc,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,_l(4194308,4,cp.bind(null,t,e),n)},useLayoutEffect:function(e,t){return _l(4194308,4,e,t)},useInsertionEffect:function(e,t){return _l(4,2,e,t)},useMemo:function(e,t){var n=At();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=At();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Kg.bind(null,be,e),[r.memoizedState,e]},useRef:function(e){var t=At();return e={current:e},t.memoizedState=e},useState:Ec,useDebugValue:xu,useDeferredValue:function(e){return At().memoizedState=e},useTransition:function(){var e=Ec(!1),t=e[0];return e=$g.bind(null,e[1]),At().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=be,o=At();if(xe){if(n===void 0)throw Error(D(407));n=n()}else{if(n=t(),ze===null)throw Error(D(349));tr&30||np(r,t,n)}o.memoizedState=n;var l={value:n,getSnapshot:t};return o.queue=l,Tc(op.bind(null,r,l,e),[e]),r.flags|=2048,Uo(9,rp.bind(null,r,l,n,t),void 0,null),n},useId:function(){var e=At(),t=ze.identifierPrefix;if(xe){var n=Zt,r=Xt;n=(r&~(1<<32-Nt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ho++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=zg++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Vg={readContext:bt,useCallback:fp,useContext:bt,useEffect:vu,useImperativeHandle:dp,useInsertionEffect:ap,useLayoutEffect:up,useMemo:pp,useReducer:fi,useRef:ip,useState:function(){return fi(Bo)},useDebugValue:xu,useDeferredValue:function(e){var t=St();return mp(t,Le.memoizedState,e)},useTransition:function(){var e=fi(Bo)[0],t=St().memoizedState;return[e,t]},useMutableSource:ep,useSyncExternalStore:tp,useId:hp,unstable_isNewReconciler:!1},Hg={readContext:bt,useCallback:fp,useContext:bt,useEffect:vu,useImperativeHandle:dp,useInsertionEffect:ap,useLayoutEffect:up,useMemo:pp,useReducer:pi,useRef:ip,useState:function(){return pi(Bo)},useDebugValue:xu,useDeferredValue:function(e){var t=St();return Le===null?t.memoizedState=e:mp(t,Le.memoizedState,e)},useTransition:function(){var e=pi(Bo)[0],t=St().memoizedState;return[e,t]},useMutableSource:ep,useSyncExternalStore:tp,useId:hp,unstable_isNewReconciler:!1};function jt(e,t){if(e&&e.defaultProps){t=Se({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function da(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Se({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var _s={isMounted:function(e){return(e=e._reactInternals)?cr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ze(),o=Rn(e),l=qt(r,o);l.payload=t,n!=null&&(l.callback=n),t=Tn(e,l,o),t!==null&&(Rt(t,e,o,r),Rl(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ze(),o=Rn(e),l=qt(r,o);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=Tn(e,l,o),t!==null&&(Rt(t,e,o,r),Rl(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ze(),r=Rn(e),o=qt(n,r);o.tag=2,t!=null&&(o.callback=t),t=Tn(e,o,r),t!==null&&(Rt(t,e,r,n),Rl(t,e,r))}};function Nc(e,t,n,r,o,l,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,l,s):t.prototype&&t.prototype.isPureReactComponent?!zo(n,r)||!zo(o,l):!0}function xp(e,t,n){var r=!1,o=Ln,l=t.contextType;return typeof l=="object"&&l!==null?l=bt(l):(o=lt(t)?qn:Ye.current,r=t.contextTypes,l=(r=r!=null)?Wr(e,o):Ln),t=new t(n,l),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=_s,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=l),t}function Rc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&_s.enqueueReplaceState(t,t.state,null)}function fa(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},du(e);var l=t.contextType;typeof l=="object"&&l!==null?o.context=bt(l):(l=lt(t)?qn:Ye.current,o.context=Wr(e,l)),o.state=e.memoizedState,l=t.getDerivedStateFromProps,typeof l=="function"&&(da(e,t,l,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&_s.enqueueReplaceState(o,o.state,null),os(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Ur(e,t){try{var n="",r=t;do n+=vh(r),r=r.return;while(r);var o=n}catch(l){o=`
|
|
39
|
-
Error generating stack: `+l.message+`
|
|
40
|
-
`+l.stack}return{value:e,source:t,stack:o,digest:null}}function mi(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function pa(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Bg=typeof WeakMap=="function"?WeakMap:Map;function wp(e,t,n){n=qt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){us||(us=!0,ka=r),pa(e,t)},n}function bp(e,t,n){n=qt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){pa(e,t)}}var l=e.stateNode;return l!==null&&typeof l.componentDidCatch=="function"&&(n.callback=function(){pa(e,t),typeof r!="function"&&(Nn===null?Nn=new Set([this]):Nn.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function Pc(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Bg;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=ly.bind(null,e,t,n),t.then(e,e))}function _c(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Ac(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=qt(-1,1),t.tag=2,Tn(n,t,1))),n.lanes|=1),e)}var Ug=mn.ReactCurrentOwner,rt=!1;function Xe(e,t,n,r){t.child=e===null?Xf(t,null,n,r):Hr(t,e.child,n,r)}function Lc(e,t,n,r,o){n=n.render;var l=t.ref;return Mr(t,o),r=gu(e,t,n,r,l,o),n=yu(),e!==null&&!rt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,ln(e,t,o)):(xe&&n&&ou(t),t.flags|=1,Xe(e,t,r,o),t.child)}function Ic(e,t,n,r,o){if(e===null){var l=n.type;return typeof l=="function"&&!Tu(l)&&l.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=l,Sp(e,t,l,r,o)):(e=Ol(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(l=e.child,!(e.lanes&o)){var s=l.memoizedProps;if(n=n.compare,n=n!==null?n:zo,n(s,r)&&e.ref===t.ref)return ln(e,t,o)}return t.flags|=1,e=Pn(l,r),e.ref=t.ref,e.return=t,t.child=e}function Sp(e,t,n,r,o){if(e!==null){var l=e.memoizedProps;if(zo(l,r)&&e.ref===t.ref)if(rt=!1,t.pendingProps=r=l,(e.lanes&o)!==0)e.flags&131072&&(rt=!0);else return t.lanes=e.lanes,ln(e,t,o)}return ma(e,t,n,r,o)}function kp(e,t,n){var r=t.pendingProps,o=r.children,l=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},me(Pr,it),it|=n;else{if(!(n&1073741824))return e=l!==null?l.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,me(Pr,it),it|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=l!==null?l.baseLanes:n,me(Pr,it),it|=r}else l!==null?(r=l.baseLanes|n,t.memoizedState=null):r=n,me(Pr,it),it|=r;return Xe(e,t,o,n),t.child}function Cp(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ma(e,t,n,r,o){var l=lt(n)?qn:Ye.current;return l=Wr(t,l),Mr(t,o),n=gu(e,t,n,r,l,o),r=yu(),e!==null&&!rt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,ln(e,t,o)):(xe&&r&&ou(t),t.flags|=1,Xe(e,t,n,o),t.child)}function Oc(e,t,n,r,o){if(lt(n)){var l=!0;ql(t)}else l=!1;if(Mr(t,o),t.stateNode===null)Al(e,t),xp(t,n,r),fa(t,n,r,o),r=!0;else if(e===null){var s=t.stateNode,i=t.memoizedProps;s.props=i;var u=s.context,c=n.contextType;typeof c=="object"&&c!==null?c=bt(c):(c=lt(n)?qn:Ye.current,c=Wr(t,c));var d=n.getDerivedStateFromProps,m=typeof d=="function"||typeof s.getSnapshotBeforeUpdate=="function";m||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(i!==r||u!==c)&&Rc(t,s,r,c),yn=!1;var f=t.memoizedState;s.state=f,os(t,r,s,o),u=t.memoizedState,i!==r||f!==u||ot.current||yn?(typeof d=="function"&&(da(t,n,d,r),u=t.memoizedState),(i=yn||Nc(t,n,i,r,f,u,c))?(m||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),s.props=r,s.state=u,s.context=c,r=i):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,Jf(e,t),i=t.memoizedProps,c=t.type===t.elementType?i:jt(t.type,i),s.props=c,m=t.pendingProps,f=s.context,u=n.contextType,typeof u=="object"&&u!==null?u=bt(u):(u=lt(n)?qn:Ye.current,u=Wr(t,u));var g=n.getDerivedStateFromProps;(d=typeof g=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(i!==m||f!==u)&&Rc(t,s,r,u),yn=!1,f=t.memoizedState,s.state=f,os(t,r,s,o);var v=t.memoizedState;i!==m||f!==v||ot.current||yn?(typeof g=="function"&&(da(t,n,g,r),v=t.memoizedState),(c=yn||Nc(t,n,c,r,f,v,u)||!1)?(d||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,v,u),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,v,u)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||i===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||i===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),s.props=r,s.state=v,s.context=u,r=c):(typeof s.componentDidUpdate!="function"||i===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||i===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return ha(e,t,n,r,l,o)}function ha(e,t,n,r,o,l){Cp(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return o&&wc(t,n,!1),ln(e,t,l);r=t.stateNode,Ug.current=t;var i=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Hr(t,e.child,null,l),t.child=Hr(t,null,i,l)):Xe(e,t,i,l),t.memoizedState=r.state,o&&wc(t,n,!0),t.child}function jp(e){var t=e.stateNode;t.pendingContext?xc(e,t.pendingContext,t.pendingContext!==t.context):t.context&&xc(e,t.context,!1),fu(e,t.containerInfo)}function Dc(e,t,n,r,o){return Vr(),su(o),t.flags|=256,Xe(e,t,n,r),t.child}var ga={dehydrated:null,treeContext:null,retryLane:0};function ya(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ep(e,t,n){var r=t.pendingProps,o=we.current,l=!1,s=(t.flags&128)!==0,i;if((i=s)||(i=e!==null&&e.memoizedState===null?!1:(o&2)!==0),i?(l=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),me(we,o&1),e===null)return ua(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,l?(r=t.mode,l=t.child,s={mode:"hidden",children:s},!(r&1)&&l!==null?(l.childLanes=0,l.pendingProps=s):l=Is(s,r,0,null),e=Zn(e,r,n,null),l.return=t,e.return=t,l.sibling=e,t.child=l,t.child.memoizedState=ya(n),t.memoizedState=ga,e):wu(t,s));if(o=e.memoizedState,o!==null&&(i=o.dehydrated,i!==null))return Gg(e,t,s,r,i,o,n);if(l){l=r.fallback,s=t.mode,o=e.child,i=o.sibling;var u={mode:"hidden",children:r.children};return!(s&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=Pn(o,u),r.subtreeFlags=o.subtreeFlags&14680064),i!==null?l=Pn(i,l):(l=Zn(l,s,n,null),l.flags|=2),l.return=t,r.return=t,r.sibling=l,t.child=r,r=l,l=t.child,s=e.child.memoizedState,s=s===null?ya(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},l.memoizedState=s,l.childLanes=e.childLanes&~n,t.memoizedState=ga,r}return l=e.child,e=l.sibling,r=Pn(l,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function wu(e,t){return t=Is({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function vl(e,t,n,r){return r!==null&&su(r),Hr(t,e.child,null,n),e=wu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Gg(e,t,n,r,o,l,s){if(n)return t.flags&256?(t.flags&=-257,r=mi(Error(D(422))),vl(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(l=r.fallback,o=t.mode,r=Is({mode:"visible",children:r.children},o,0,null),l=Zn(l,o,s,null),l.flags|=2,r.return=t,l.return=t,r.sibling=l,t.child=r,t.mode&1&&Hr(t,e.child,null,s),t.child.memoizedState=ya(s),t.memoizedState=ga,l);if(!(t.mode&1))return vl(e,t,s,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var i=r.dgst;return r=i,l=Error(D(419)),r=mi(l,r,void 0),vl(e,t,s,r)}if(i=(s&e.childLanes)!==0,rt||i){if(r=ze,r!==null){switch(s&-s){case 4:o=2;break;case 16:o=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:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|s)?0:o,o!==0&&o!==l.retryLane&&(l.retryLane=o,on(e,o),Rt(r,e,o,-1))}return Eu(),r=mi(Error(D(421))),vl(e,t,s,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=sy.bind(null,e),o._reactRetry=t,null):(e=l.treeContext,ut=En(o.nextSibling),ct=t,xe=!0,Tt=null,e!==null&&(gt[yt++]=Xt,gt[yt++]=Zt,gt[yt++]=er,Xt=e.id,Zt=e.overflow,er=t),t=wu(t,r.children),t.flags|=4096,t)}function Mc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ca(e.return,t,n)}function hi(e,t,n,r,o){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=r,l.tail=n,l.tailMode=o)}function Tp(e,t,n){var r=t.pendingProps,o=r.revealOrder,l=r.tail;if(Xe(e,t,r.children,n),r=we.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Mc(e,n,t);else if(e.tag===19)Mc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(me(we,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&ls(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),hi(t,!1,o,n,l);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&ls(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}hi(t,!0,n,null,l);break;case"together":hi(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Al(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ln(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),nr|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(D(153));if(t.child!==null){for(e=t.child,n=Pn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Pn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Yg(e,t,n){switch(t.tag){case 3:jp(t),Vr();break;case 5:qf(t);break;case 1:lt(t.type)&&ql(t);break;case 4:fu(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;me(ns,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(me(we,we.current&1),t.flags|=128,null):n&t.child.childLanes?Ep(e,t,n):(me(we,we.current&1),e=ln(e,t,n),e!==null?e.sibling:null);me(we,we.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Tp(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),me(we,we.current),r)break;return null;case 22:case 23:return t.lanes=0,kp(e,t,n)}return ln(e,t,n)}var Np,va,Rp,Pp;Np=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};va=function(){};Rp=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Yn(Ot.current);var l=null;switch(n){case"input":o=Ki(e,o),r=Ki(e,r),l=[];break;case"select":o=Se({},o,{value:void 0}),r=Se({},r,{value:void 0}),l=[];break;case"textarea":o=Vi(e,o),r=Vi(e,r),l=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Zl)}Bi(n,r);var s;n=null;for(c in o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&o[c]!=null)if(c==="style"){var i=o[c];for(s in i)i.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(_o.hasOwnProperty(c)?l||(l=[]):(l=l||[]).push(c,null));for(c in r){var u=r[c];if(i=o!=null?o[c]:void 0,r.hasOwnProperty(c)&&u!==i&&(u!=null||i!=null))if(c==="style")if(i){for(s in i)!i.hasOwnProperty(s)||u&&u.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in u)u.hasOwnProperty(s)&&i[s]!==u[s]&&(n||(n={}),n[s]=u[s])}else n||(l||(l=[]),l.push(c,n)),n=u;else c==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,i=i?i.__html:void 0,u!=null&&i!==u&&(l=l||[]).push(c,u)):c==="children"?typeof u!="string"&&typeof u!="number"||(l=l||[]).push(c,""+u):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(_o.hasOwnProperty(c)?(u!=null&&c==="onScroll"&&ye("scroll",e),l||i===u||(l=[])):(l=l||[]).push(c,u))}n&&(l=l||[]).push("style",n);var c=l;(t.updateQueue=c)&&(t.flags|=4)}};Pp=function(e,t,n,r){n!==r&&(t.flags|=4)};function mo(e,t){if(!xe)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ue(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Qg(e,t,n){var r=t.pendingProps;switch(lu(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ue(t),null;case 1:return lt(t.type)&&Jl(),Ue(t),null;case 3:return r=t.stateNode,Br(),ve(ot),ve(Ye),mu(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(gl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Tt!==null&&(Ea(Tt),Tt=null))),va(e,t),Ue(t),null;case 5:pu(t);var o=Yn(Vo.current);if(n=t.type,e!==null&&t.stateNode!=null)Rp(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(D(166));return Ue(t),null}if(e=Yn(Ot.current),gl(t)){r=t.stateNode,n=t.type;var l=t.memoizedProps;switch(r[Lt]=t,r[Fo]=l,e=(t.mode&1)!==0,n){case"dialog":ye("cancel",r),ye("close",r);break;case"iframe":case"object":case"embed":ye("load",r);break;case"video":case"audio":for(o=0;o<wo.length;o++)ye(wo[o],r);break;case"source":ye("error",r);break;case"img":case"image":case"link":ye("error",r),ye("load",r);break;case"details":ye("toggle",r);break;case"input":Uu(r,l),ye("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!l.multiple},ye("invalid",r);break;case"textarea":Yu(r,l),ye("invalid",r)}Bi(n,l),o=null;for(var s in l)if(l.hasOwnProperty(s)){var i=l[s];s==="children"?typeof i=="string"?r.textContent!==i&&(l.suppressHydrationWarning!==!0&&hl(r.textContent,i,e),o=["children",i]):typeof i=="number"&&r.textContent!==""+i&&(l.suppressHydrationWarning!==!0&&hl(r.textContent,i,e),o=["children",""+i]):_o.hasOwnProperty(s)&&i!=null&&s==="onScroll"&&ye("scroll",r)}switch(n){case"input":il(r),Gu(r,l,!0);break;case"textarea":il(r),Qu(r);break;case"select":case"option":break;default:typeof l.onClick=="function"&&(r.onclick=Zl)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=rf(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Lt]=t,e[Fo]=r,Np(e,t,!1,!1),t.stateNode=e;e:{switch(s=Ui(n,r),n){case"dialog":ye("cancel",e),ye("close",e),o=r;break;case"iframe":case"object":case"embed":ye("load",e),o=r;break;case"video":case"audio":for(o=0;o<wo.length;o++)ye(wo[o],e);o=r;break;case"source":ye("error",e),o=r;break;case"img":case"image":case"link":ye("error",e),ye("load",e),o=r;break;case"details":ye("toggle",e),o=r;break;case"input":Uu(e,r),o=Ki(e,r),ye("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=Se({},r,{value:void 0}),ye("invalid",e);break;case"textarea":Yu(e,r),o=Vi(e,r),ye("invalid",e);break;default:o=r}Bi(n,o),i=o;for(l in i)if(i.hasOwnProperty(l)){var u=i[l];l==="style"?sf(e,u):l==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&of(e,u)):l==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&Ao(e,u):typeof u=="number"&&Ao(e,""+u):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(_o.hasOwnProperty(l)?u!=null&&l==="onScroll"&&ye("scroll",e):u!=null&&Ha(e,l,u,s))}switch(n){case"input":il(e),Gu(e,r,!1);break;case"textarea":il(e),Qu(e);break;case"option":r.value!=null&&e.setAttribute("value",""+An(r.value));break;case"select":e.multiple=!!r.multiple,l=r.value,l!=null?Lr(e,!!r.multiple,l,!1):r.defaultValue!=null&&Lr(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Zl)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ue(t),null;case 6:if(e&&t.stateNode!=null)Pp(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(D(166));if(n=Yn(Vo.current),Yn(Ot.current),gl(t)){if(r=t.stateNode,n=t.memoizedProps,r[Lt]=t,(l=r.nodeValue!==n)&&(e=ct,e!==null))switch(e.tag){case 3:hl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&hl(r.nodeValue,n,(e.mode&1)!==0)}l&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Lt]=t,t.stateNode=r}return Ue(t),null;case 13:if(ve(we),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(xe&&ut!==null&&t.mode&1&&!(t.flags&128))Yf(),Vr(),t.flags|=98560,l=!1;else if(l=gl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!l)throw Error(D(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(D(317));l[Lt]=t}else Vr(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ue(t),l=!1}else Tt!==null&&(Ea(Tt),Tt=null),l=!0;if(!l)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||we.current&1?Ie===0&&(Ie=3):Eu())),t.updateQueue!==null&&(t.flags|=4),Ue(t),null);case 4:return Br(),va(e,t),e===null&&$o(t.stateNode.containerInfo),Ue(t),null;case 10:return uu(t.type._context),Ue(t),null;case 17:return lt(t.type)&&Jl(),Ue(t),null;case 19:if(ve(we),l=t.memoizedState,l===null)return Ue(t),null;if(r=(t.flags&128)!==0,s=l.rendering,s===null)if(r)mo(l,!1);else{if(Ie!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=ls(e),s!==null){for(t.flags|=128,mo(l,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)l=n,e=r,l.flags&=14680066,s=l.alternate,s===null?(l.childLanes=0,l.lanes=e,l.child=null,l.subtreeFlags=0,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=s.childLanes,l.lanes=s.lanes,l.child=s.child,l.subtreeFlags=0,l.deletions=null,l.memoizedProps=s.memoizedProps,l.memoizedState=s.memoizedState,l.updateQueue=s.updateQueue,l.type=s.type,e=s.dependencies,l.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return me(we,we.current&1|2),t.child}e=e.sibling}l.tail!==null&&Te()>Gr&&(t.flags|=128,r=!0,mo(l,!1),t.lanes=4194304)}else{if(!r)if(e=ls(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),mo(l,!0),l.tail===null&&l.tailMode==="hidden"&&!s.alternate&&!xe)return Ue(t),null}else 2*Te()-l.renderingStartTime>Gr&&n!==1073741824&&(t.flags|=128,r=!0,mo(l,!1),t.lanes=4194304);l.isBackwards?(s.sibling=t.child,t.child=s):(n=l.last,n!==null?n.sibling=s:t.child=s,l.last=s)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=Te(),t.sibling=null,n=we.current,me(we,r?n&1|2:n&1),t):(Ue(t),null);case 22:case 23:return ju(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?it&1073741824&&(Ue(t),t.subtreeFlags&6&&(t.flags|=8192)):Ue(t),null;case 24:return null;case 25:return null}throw Error(D(156,t.tag))}function Xg(e,t){switch(lu(t),t.tag){case 1:return lt(t.type)&&Jl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Br(),ve(ot),ve(Ye),mu(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return pu(t),null;case 13:if(ve(we),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(D(340));Vr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ve(we),null;case 4:return Br(),null;case 10:return uu(t.type._context),null;case 22:case 23:return ju(),null;case 24:return null;default:return null}}var xl=!1,Ge=!1,Zg=typeof WeakSet=="function"?WeakSet:Set,V=null;function Rr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ce(e,t,r)}else n.current=null}function xa(e,t,n){try{n()}catch(r){Ce(e,t,r)}}var zc=!1;function Jg(e,t){if(na=Yl,e=Of(),ru(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,l=r.focusNode;r=r.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var s=0,i=-1,u=-1,c=0,d=0,m=e,f=null;t:for(;;){for(var g;m!==n||o!==0&&m.nodeType!==3||(i=s+o),m!==l||r!==0&&m.nodeType!==3||(u=s+r),m.nodeType===3&&(s+=m.nodeValue.length),(g=m.firstChild)!==null;)f=m,m=g;for(;;){if(m===e)break t;if(f===n&&++c===o&&(i=s),f===l&&++d===r&&(u=s),(g=m.nextSibling)!==null)break;m=f,f=m.parentNode}m=g}n=i===-1||u===-1?null:{start:i,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(ra={focusedElem:e,selectionRange:n},Yl=!1,V=t;V!==null;)if(t=V,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,V=e;else for(;V!==null;){t=V;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var w=v.memoizedProps,S=v.memoizedState,h=t.stateNode,p=h.getSnapshotBeforeUpdate(t.elementType===t.type?w:jt(t.type,w),S);h.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(D(163))}}catch(x){Ce(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,V=e;break}V=t.return}return v=zc,zc=!1,v}function No(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var l=o.destroy;o.destroy=void 0,l!==void 0&&xa(t,n,l)}o=o.next}while(o!==r)}}function As(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function wa(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function _p(e){var t=e.alternate;t!==null&&(e.alternate=null,_p(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Lt],delete t[Fo],delete t[sa],delete t[Ig],delete t[Og])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Ap(e){return e.tag===5||e.tag===3||e.tag===4}function $c(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ap(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ba(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Zl));else if(r!==4&&(e=e.child,e!==null))for(ba(e,t,n),e=e.sibling;e!==null;)ba(e,t,n),e=e.sibling}function Sa(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Sa(e,t,n),e=e.sibling;e!==null;)Sa(e,t,n),e=e.sibling}var Fe=null,Et=!1;function hn(e,t,n){for(n=n.child;n!==null;)Lp(e,t,n),n=n.sibling}function Lp(e,t,n){if(It&&typeof It.onCommitFiberUnmount=="function")try{It.onCommitFiberUnmount(Cs,n)}catch{}switch(n.tag){case 5:Ge||Rr(n,t);case 6:var r=Fe,o=Et;Fe=null,hn(e,t,n),Fe=r,Et=o,Fe!==null&&(Et?(e=Fe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Fe.removeChild(n.stateNode));break;case 18:Fe!==null&&(Et?(e=Fe,n=n.stateNode,e.nodeType===8?ai(e.parentNode,n):e.nodeType===1&&ai(e,n),Do(e)):ai(Fe,n.stateNode));break;case 4:r=Fe,o=Et,Fe=n.stateNode.containerInfo,Et=!0,hn(e,t,n),Fe=r,Et=o;break;case 0:case 11:case 14:case 15:if(!Ge&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var l=o,s=l.destroy;l=l.tag,s!==void 0&&(l&2||l&4)&&xa(n,t,s),o=o.next}while(o!==r)}hn(e,t,n);break;case 1:if(!Ge&&(Rr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(i){Ce(n,t,i)}hn(e,t,n);break;case 21:hn(e,t,n);break;case 22:n.mode&1?(Ge=(r=Ge)||n.memoizedState!==null,hn(e,t,n),Ge=r):hn(e,t,n);break;default:hn(e,t,n)}}function Kc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Zg),t.forEach(function(r){var o=iy.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Ct(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var l=e,s=t,i=s;e:for(;i!==null;){switch(i.tag){case 5:Fe=i.stateNode,Et=!1;break e;case 3:Fe=i.stateNode.containerInfo,Et=!0;break e;case 4:Fe=i.stateNode.containerInfo,Et=!0;break e}i=i.return}if(Fe===null)throw Error(D(160));Lp(l,s,o),Fe=null,Et=!1;var u=o.alternate;u!==null&&(u.return=null),o.return=null}catch(c){Ce(o,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Ip(t,e),t=t.sibling}function Ip(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ct(t,e),_t(e),r&4){try{No(3,e,e.return),As(3,e)}catch(w){Ce(e,e.return,w)}try{No(5,e,e.return)}catch(w){Ce(e,e.return,w)}}break;case 1:Ct(t,e),_t(e),r&512&&n!==null&&Rr(n,n.return);break;case 5:if(Ct(t,e),_t(e),r&512&&n!==null&&Rr(n,n.return),e.flags&32){var o=e.stateNode;try{Ao(o,"")}catch(w){Ce(e,e.return,w)}}if(r&4&&(o=e.stateNode,o!=null)){var l=e.memoizedProps,s=n!==null?n.memoizedProps:l,i=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{i==="input"&&l.type==="radio"&&l.name!=null&&tf(o,l),Ui(i,s);var c=Ui(i,l);for(s=0;s<u.length;s+=2){var d=u[s],m=u[s+1];d==="style"?sf(o,m):d==="dangerouslySetInnerHTML"?of(o,m):d==="children"?Ao(o,m):Ha(o,d,m,c)}switch(i){case"input":Fi(o,l);break;case"textarea":nf(o,l);break;case"select":var f=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!l.multiple;var g=l.value;g!=null?Lr(o,!!l.multiple,g,!1):f!==!!l.multiple&&(l.defaultValue!=null?Lr(o,!!l.multiple,l.defaultValue,!0):Lr(o,!!l.multiple,l.multiple?[]:"",!1))}o[Fo]=l}catch(w){Ce(e,e.return,w)}}break;case 6:if(Ct(t,e),_t(e),r&4){if(e.stateNode===null)throw Error(D(162));o=e.stateNode,l=e.memoizedProps;try{o.nodeValue=l}catch(w){Ce(e,e.return,w)}}break;case 3:if(Ct(t,e),_t(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Do(t.containerInfo)}catch(w){Ce(e,e.return,w)}break;case 4:Ct(t,e),_t(e);break;case 13:Ct(t,e),_t(e),o=e.child,o.flags&8192&&(l=o.memoizedState!==null,o.stateNode.isHidden=l,!l||o.alternate!==null&&o.alternate.memoizedState!==null||(ku=Te())),r&4&&Kc(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Ge=(c=Ge)||d,Ct(t,e),Ge=c):Ct(t,e),_t(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&e.mode&1)for(V=e,d=e.child;d!==null;){for(m=V=d;V!==null;){switch(f=V,g=f.child,f.tag){case 0:case 11:case 14:case 15:No(4,f,f.return);break;case 1:Rr(f,f.return);var v=f.stateNode;if(typeof v.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(w){Ce(r,n,w)}}break;case 5:Rr(f,f.return);break;case 22:if(f.memoizedState!==null){Wc(m);continue}}g!==null?(g.return=f,V=g):Wc(m)}d=d.sibling}e:for(d=null,m=e;;){if(m.tag===5){if(d===null){d=m;try{o=m.stateNode,c?(l=o.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none"):(i=m.stateNode,u=m.memoizedProps.style,s=u!=null&&u.hasOwnProperty("display")?u.display:null,i.style.display=lf("display",s))}catch(w){Ce(e,e.return,w)}}}else if(m.tag===6){if(d===null)try{m.stateNode.nodeValue=c?"":m.memoizedProps}catch(w){Ce(e,e.return,w)}}else if((m.tag!==22&&m.tag!==23||m.memoizedState===null||m===e)&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===e)break e;for(;m.sibling===null;){if(m.return===null||m.return===e)break e;d===m&&(d=null),m=m.return}d===m&&(d=null),m.sibling.return=m.return,m=m.sibling}}break;case 19:Ct(t,e),_t(e),r&4&&Kc(e);break;case 21:break;default:Ct(t,e),_t(e)}}function _t(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Ap(n)){var r=n;break e}n=n.return}throw Error(D(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(Ao(o,""),r.flags&=-33);var l=$c(e);Sa(e,l,o);break;case 3:case 4:var s=r.stateNode.containerInfo,i=$c(e);ba(e,i,s);break;default:throw Error(D(161))}}catch(u){Ce(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function qg(e,t,n){V=e,Op(e)}function Op(e,t,n){for(var r=(e.mode&1)!==0;V!==null;){var o=V,l=o.child;if(o.tag===22&&r){var s=o.memoizedState!==null||xl;if(!s){var i=o.alternate,u=i!==null&&i.memoizedState!==null||Ge;i=xl;var c=Ge;if(xl=s,(Ge=u)&&!c)for(V=o;V!==null;)s=V,u=s.child,s.tag===22&&s.memoizedState!==null?Vc(o):u!==null?(u.return=s,V=u):Vc(o);for(;l!==null;)V=l,Op(l),l=l.sibling;V=o,xl=i,Ge=c}Fc(e)}else o.subtreeFlags&8772&&l!==null?(l.return=o,V=l):Fc(e)}}function Fc(e){for(;V!==null;){var t=V;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ge||As(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ge)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:jt(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var l=t.updateQueue;l!==null&&jc(t,l,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}jc(t,s,n)}break;case 5:var i=t.stateNode;if(n===null&&t.flags&4){n=i;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var d=c.memoizedState;if(d!==null){var m=d.dehydrated;m!==null&&Do(m)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(D(163))}Ge||t.flags&512&&wa(t)}catch(f){Ce(t,t.return,f)}}if(t===e){V=null;break}if(n=t.sibling,n!==null){n.return=t.return,V=n;break}V=t.return}}function Wc(e){for(;V!==null;){var t=V;if(t===e){V=null;break}var n=t.sibling;if(n!==null){n.return=t.return,V=n;break}V=t.return}}function Vc(e){for(;V!==null;){var t=V;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{As(4,t)}catch(u){Ce(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(u){Ce(t,o,u)}}var l=t.return;try{wa(t)}catch(u){Ce(t,l,u)}break;case 5:var s=t.return;try{wa(t)}catch(u){Ce(t,s,u)}}}catch(u){Ce(t,t.return,u)}if(t===e){V=null;break}var i=t.sibling;if(i!==null){i.return=t.return,V=i;break}V=t.return}}var ey=Math.ceil,as=mn.ReactCurrentDispatcher,bu=mn.ReactCurrentOwner,xt=mn.ReactCurrentBatchConfig,ie=0,ze=null,_e=null,We=0,it=0,Pr=Mn(0),Ie=0,Go=null,nr=0,Ls=0,Su=0,Ro=null,nt=null,ku=0,Gr=1/0,Bt=null,us=!1,ka=null,Nn=null,wl=!1,Sn=null,cs=0,Po=0,Ca=null,Ll=-1,Il=0;function Ze(){return ie&6?Te():Ll!==-1?Ll:Ll=Te()}function Rn(e){return e.mode&1?ie&2&&We!==0?We&-We:Mg.transition!==null?(Il===0&&(Il=xf()),Il):(e=ce,e!==0||(e=window.event,e=e===void 0?16:Ef(e.type)),e):1}function Rt(e,t,n,r){if(50<Po)throw Po=0,Ca=null,Error(D(185));Zo(e,n,r),(!(ie&2)||e!==ze)&&(e===ze&&(!(ie&2)&&(Ls|=n),Ie===4&&wn(e,We)),st(e,r),n===1&&ie===0&&!(t.mode&1)&&(Gr=Te()+500,Rs&&zn()))}function st(e,t){var n=e.callbackNode;Mh(e,t);var r=Gl(e,e===ze?We:0);if(r===0)n!==null&&Ju(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Ju(n),t===1)e.tag===0?Dg(Hc.bind(null,e)):Bf(Hc.bind(null,e)),Ag(function(){!(ie&6)&&zn()}),n=null;else{switch(wf(r)){case 1:n=Qa;break;case 4:n=yf;break;case 16:n=Ul;break;case 536870912:n=vf;break;default:n=Ul}n=Vp(n,Dp.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Dp(e,t){if(Ll=-1,Il=0,ie&6)throw Error(D(327));var n=e.callbackNode;if(zr()&&e.callbackNode!==n)return null;var r=Gl(e,e===ze?We:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=ds(e,r);else{t=r;var o=ie;ie|=2;var l=zp();(ze!==e||We!==t)&&(Bt=null,Gr=Te()+500,Xn(e,t));do try{ry();break}catch(i){Mp(e,i)}while(!0);au(),as.current=l,ie=o,_e!==null?t=0:(ze=null,We=0,t=Ie)}if(t!==0){if(t===2&&(o=Zi(e),o!==0&&(r=o,t=ja(e,o))),t===1)throw n=Go,Xn(e,0),wn(e,r),st(e,Te()),n;if(t===6)wn(e,r);else{if(o=e.current.alternate,!(r&30)&&!ty(o)&&(t=ds(e,r),t===2&&(l=Zi(e),l!==0&&(r=l,t=ja(e,l))),t===1))throw n=Go,Xn(e,0),wn(e,r),st(e,Te()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(D(345));case 2:Bn(e,nt,Bt);break;case 3:if(wn(e,r),(r&130023424)===r&&(t=ku+500-Te(),10<t)){if(Gl(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){Ze(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=la(Bn.bind(null,e,nt,Bt),t);break}Bn(e,nt,Bt);break;case 4:if(wn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var s=31-Nt(r);l=1<<s,s=t[s],s>o&&(o=s),r&=~l}if(r=o,r=Te()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ey(r/1960))-r,10<r){e.timeoutHandle=la(Bn.bind(null,e,nt,Bt),r);break}Bn(e,nt,Bt);break;case 5:Bn(e,nt,Bt);break;default:throw Error(D(329))}}}return st(e,Te()),e.callbackNode===n?Dp.bind(null,e):null}function ja(e,t){var n=Ro;return e.current.memoizedState.isDehydrated&&(Xn(e,t).flags|=256),e=ds(e,t),e!==2&&(t=nt,nt=n,t!==null&&Ea(t)),e}function Ea(e){nt===null?nt=e:nt.push.apply(nt,e)}function ty(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],l=o.getSnapshot;o=o.value;try{if(!Pt(l(),o))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function wn(e,t){for(t&=~Su,t&=~Ls,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Nt(t),r=1<<n;e[n]=-1,t&=~r}}function Hc(e){if(ie&6)throw Error(D(327));zr();var t=Gl(e,0);if(!(t&1))return st(e,Te()),null;var n=ds(e,t);if(e.tag!==0&&n===2){var r=Zi(e);r!==0&&(t=r,n=ja(e,r))}if(n===1)throw n=Go,Xn(e,0),wn(e,t),st(e,Te()),n;if(n===6)throw Error(D(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Bn(e,nt,Bt),st(e,Te()),null}function Cu(e,t){var n=ie;ie|=1;try{return e(t)}finally{ie=n,ie===0&&(Gr=Te()+500,Rs&&zn())}}function rr(e){Sn!==null&&Sn.tag===0&&!(ie&6)&&zr();var t=ie;ie|=1;var n=xt.transition,r=ce;try{if(xt.transition=null,ce=1,e)return e()}finally{ce=r,xt.transition=n,ie=t,!(ie&6)&&zn()}}function ju(){it=Pr.current,ve(Pr)}function Xn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,_g(n)),_e!==null)for(n=_e.return;n!==null;){var r=n;switch(lu(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Jl();break;case 3:Br(),ve(ot),ve(Ye),mu();break;case 5:pu(r);break;case 4:Br();break;case 13:ve(we);break;case 19:ve(we);break;case 10:uu(r.type._context);break;case 22:case 23:ju()}n=n.return}if(ze=e,_e=e=Pn(e.current,null),We=it=t,Ie=0,Go=null,Su=Ls=nr=0,nt=Ro=null,Gn!==null){for(t=0;t<Gn.length;t++)if(n=Gn[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,l=n.pending;if(l!==null){var s=l.next;l.next=o,r.next=s}n.pending=r}Gn=null}return e}function Mp(e,t){do{var n=_e;try{if(au(),Pl.current=is,ss){for(var r=be.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}ss=!1}if(tr=0,Me=Le=be=null,To=!1,Ho=0,bu.current=null,n===null||n.return===null){Ie=1,Go=t,_e=null;break}e:{var l=e,s=n.return,i=n,u=t;if(t=We,i.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var c=u,d=i,m=d.tag;if(!(d.mode&1)&&(m===0||m===11||m===15)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var g=_c(s);if(g!==null){g.flags&=-257,Ac(g,s,i,l,t),g.mode&1&&Pc(l,c,t),t=g,u=c;var v=t.updateQueue;if(v===null){var w=new Set;w.add(u),t.updateQueue=w}else v.add(u);break e}else{if(!(t&1)){Pc(l,c,t),Eu();break e}u=Error(D(426))}}else if(xe&&i.mode&1){var S=_c(s);if(S!==null){!(S.flags&65536)&&(S.flags|=256),Ac(S,s,i,l,t),su(Ur(u,i));break e}}l=u=Ur(u,i),Ie!==4&&(Ie=2),Ro===null?Ro=[l]:Ro.push(l),l=s;do{switch(l.tag){case 3:l.flags|=65536,t&=-t,l.lanes|=t;var h=wp(l,u,t);Cc(l,h);break e;case 1:i=u;var p=l.type,y=l.stateNode;if(!(l.flags&128)&&(typeof p.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(Nn===null||!Nn.has(y)))){l.flags|=65536,t&=-t,l.lanes|=t;var x=bp(l,i,t);Cc(l,x);break e}}l=l.return}while(l!==null)}Kp(n)}catch(j){t=j,_e===n&&n!==null&&(_e=n=n.return);continue}break}while(!0)}function zp(){var e=as.current;return as.current=is,e===null?is:e}function Eu(){(Ie===0||Ie===3||Ie===2)&&(Ie=4),ze===null||!(nr&268435455)&&!(Ls&268435455)||wn(ze,We)}function ds(e,t){var n=ie;ie|=2;var r=zp();(ze!==e||We!==t)&&(Bt=null,Xn(e,t));do try{ny();break}catch(o){Mp(e,o)}while(!0);if(au(),ie=n,as.current=r,_e!==null)throw Error(D(261));return ze=null,We=0,Ie}function ny(){for(;_e!==null;)$p(_e)}function ry(){for(;_e!==null&&!Nh();)$p(_e)}function $p(e){var t=Wp(e.alternate,e,it);e.memoizedProps=e.pendingProps,t===null?Kp(e):_e=t,bu.current=null}function Kp(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Xg(n,t),n!==null){n.flags&=32767,_e=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ie=6,_e=null;return}}else if(n=Qg(n,t,it),n!==null){_e=n;return}if(t=t.sibling,t!==null){_e=t;return}_e=t=e}while(t!==null);Ie===0&&(Ie=5)}function Bn(e,t,n){var r=ce,o=xt.transition;try{xt.transition=null,ce=1,oy(e,t,n,r)}finally{xt.transition=o,ce=r}return null}function oy(e,t,n,r){do zr();while(Sn!==null);if(ie&6)throw Error(D(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(D(177));e.callbackNode=null,e.callbackPriority=0;var l=n.lanes|n.childLanes;if(zh(e,l),e===ze&&(_e=ze=null,We=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||wl||(wl=!0,Vp(Ul,function(){return zr(),null})),l=(n.flags&15990)!==0,n.subtreeFlags&15990||l){l=xt.transition,xt.transition=null;var s=ce;ce=1;var i=ie;ie|=4,bu.current=null,Jg(e,n),Ip(n,e),Cg(ra),Yl=!!na,ra=na=null,e.current=n,qg(n),Rh(),ie=i,ce=s,xt.transition=l}else e.current=n;if(wl&&(wl=!1,Sn=e,cs=o),l=e.pendingLanes,l===0&&(Nn=null),Ah(n.stateNode),st(e,Te()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(us)throw us=!1,e=ka,ka=null,e;return cs&1&&e.tag!==0&&zr(),l=e.pendingLanes,l&1?e===Ca?Po++:(Po=0,Ca=e):Po=0,zn(),null}function zr(){if(Sn!==null){var e=wf(cs),t=xt.transition,n=ce;try{if(xt.transition=null,ce=16>e?16:e,Sn===null)var r=!1;else{if(e=Sn,Sn=null,cs=0,ie&6)throw Error(D(331));var o=ie;for(ie|=4,V=e.current;V!==null;){var l=V,s=l.child;if(V.flags&16){var i=l.deletions;if(i!==null){for(var u=0;u<i.length;u++){var c=i[u];for(V=c;V!==null;){var d=V;switch(d.tag){case 0:case 11:case 15:No(8,d,l)}var m=d.child;if(m!==null)m.return=d,V=m;else for(;V!==null;){d=V;var f=d.sibling,g=d.return;if(_p(d),d===c){V=null;break}if(f!==null){f.return=g,V=f;break}V=g}}}var v=l.alternate;if(v!==null){var w=v.child;if(w!==null){v.child=null;do{var S=w.sibling;w.sibling=null,w=S}while(w!==null)}}V=l}}if(l.subtreeFlags&2064&&s!==null)s.return=l,V=s;else e:for(;V!==null;){if(l=V,l.flags&2048)switch(l.tag){case 0:case 11:case 15:No(9,l,l.return)}var h=l.sibling;if(h!==null){h.return=l.return,V=h;break e}V=l.return}}var p=e.current;for(V=p;V!==null;){s=V;var y=s.child;if(s.subtreeFlags&2064&&y!==null)y.return=s,V=y;else e:for(s=p;V!==null;){if(i=V,i.flags&2048)try{switch(i.tag){case 0:case 11:case 15:As(9,i)}}catch(j){Ce(i,i.return,j)}if(i===s){V=null;break e}var x=i.sibling;if(x!==null){x.return=i.return,V=x;break e}V=i.return}}if(ie=o,zn(),It&&typeof It.onPostCommitFiberRoot=="function")try{It.onPostCommitFiberRoot(Cs,e)}catch{}r=!0}return r}finally{ce=n,xt.transition=t}}return!1}function Bc(e,t,n){t=Ur(n,t),t=wp(e,t,1),e=Tn(e,t,1),t=Ze(),e!==null&&(Zo(e,1,t),st(e,t))}function Ce(e,t,n){if(e.tag===3)Bc(e,e,n);else for(;t!==null;){if(t.tag===3){Bc(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Nn===null||!Nn.has(r))){e=Ur(n,e),e=bp(t,e,1),t=Tn(t,e,1),e=Ze(),t!==null&&(Zo(t,1,e),st(t,e));break}}t=t.return}}function ly(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ze(),e.pingedLanes|=e.suspendedLanes&n,ze===e&&(We&n)===n&&(Ie===4||Ie===3&&(We&130023424)===We&&500>Te()-ku?Xn(e,0):Su|=n),st(e,t)}function Fp(e,t){t===0&&(e.mode&1?(t=cl,cl<<=1,!(cl&130023424)&&(cl=4194304)):t=1);var n=Ze();e=on(e,t),e!==null&&(Zo(e,t,n),st(e,n))}function sy(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Fp(e,n)}function iy(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(D(314))}r!==null&&r.delete(t),Fp(e,n)}var Wp;Wp=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ot.current)rt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return rt=!1,Yg(e,t,n);rt=!!(e.flags&131072)}else rt=!1,xe&&t.flags&1048576&&Uf(t,ts,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Al(e,t),e=t.pendingProps;var o=Wr(t,Ye.current);Mr(t,n),o=gu(null,t,r,e,o,n);var l=yu();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,lt(r)?(l=!0,ql(t)):l=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,du(t),o.updater=_s,t.stateNode=o,o._reactInternals=t,fa(t,r,e,n),t=ha(null,t,r,!0,l,n)):(t.tag=0,xe&&l&&ou(t),Xe(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Al(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=uy(r),e=jt(r,e),o){case 0:t=ma(null,t,r,e,n);break e;case 1:t=Oc(null,t,r,e,n);break e;case 11:t=Lc(null,t,r,e,n);break e;case 14:t=Ic(null,t,r,jt(r.type,e),n);break e}throw Error(D(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:jt(r,o),ma(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:jt(r,o),Oc(e,t,r,o,n);case 3:e:{if(jp(t),e===null)throw Error(D(387));r=t.pendingProps,l=t.memoizedState,o=l.element,Jf(e,t),os(t,r,null,n);var s=t.memoizedState;if(r=s.element,l.isDehydrated)if(l={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){o=Ur(Error(D(423)),t),t=Dc(e,t,r,n,o);break e}else if(r!==o){o=Ur(Error(D(424)),t),t=Dc(e,t,r,n,o);break e}else for(ut=En(t.stateNode.containerInfo.firstChild),ct=t,xe=!0,Tt=null,n=Xf(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Vr(),r===o){t=ln(e,t,n);break e}Xe(e,t,r,n)}t=t.child}return t;case 5:return qf(t),e===null&&ua(t),r=t.type,o=t.pendingProps,l=e!==null?e.memoizedProps:null,s=o.children,oa(r,o)?s=null:l!==null&&oa(r,l)&&(t.flags|=32),Cp(e,t),Xe(e,t,s,n),t.child;case 6:return e===null&&ua(t),null;case 13:return Ep(e,t,n);case 4:return fu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Hr(t,null,r,n):Xe(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:jt(r,o),Lc(e,t,r,o,n);case 7:return Xe(e,t,t.pendingProps,n),t.child;case 8:return Xe(e,t,t.pendingProps.children,n),t.child;case 12:return Xe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,l=t.memoizedProps,s=o.value,me(ns,r._currentValue),r._currentValue=s,l!==null)if(Pt(l.value,s)){if(l.children===o.children&&!ot.current){t=ln(e,t,n);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var i=l.dependencies;if(i!==null){s=l.child;for(var u=i.firstContext;u!==null;){if(u.context===r){if(l.tag===1){u=qt(-1,n&-n),u.tag=2;var c=l.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?u.next=u:(u.next=d.next,d.next=u),c.pending=u}}l.lanes|=n,u=l.alternate,u!==null&&(u.lanes|=n),ca(l.return,n,t),i.lanes|=n;break}u=u.next}}else if(l.tag===10)s=l.type===t.type?null:l.child;else if(l.tag===18){if(s=l.return,s===null)throw Error(D(341));s.lanes|=n,i=s.alternate,i!==null&&(i.lanes|=n),ca(s,n,t),s=l.sibling}else s=l.child;if(s!==null)s.return=l;else for(s=l;s!==null;){if(s===t){s=null;break}if(l=s.sibling,l!==null){l.return=s.return,s=l;break}s=s.return}l=s}Xe(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Mr(t,n),o=bt(o),r=r(o),t.flags|=1,Xe(e,t,r,n),t.child;case 14:return r=t.type,o=jt(r,t.pendingProps),o=jt(r.type,o),Ic(e,t,r,o,n);case 15:return Sp(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:jt(r,o),Al(e,t),t.tag=1,lt(r)?(e=!0,ql(t)):e=!1,Mr(t,n),xp(t,r,o),fa(t,r,o,n),ha(null,t,r,!0,e,n);case 19:return Tp(e,t,n);case 22:return kp(e,t,n)}throw Error(D(156,t.tag))};function Vp(e,t){return gf(e,t)}function ay(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function vt(e,t,n,r){return new ay(e,t,n,r)}function Tu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function uy(e){if(typeof e=="function")return Tu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ua)return 11;if(e===Ga)return 14}return 2}function Pn(e,t){var n=e.alternate;return n===null?(n=vt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ol(e,t,n,r,o,l){var s=2;if(r=e,typeof e=="function")Tu(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case wr:return Zn(n.children,o,l,t);case Ba:s=8,o|=8;break;case Di:return e=vt(12,n,t,o|2),e.elementType=Di,e.lanes=l,e;case Mi:return e=vt(13,n,t,o),e.elementType=Mi,e.lanes=l,e;case zi:return e=vt(19,n,t,o),e.elementType=zi,e.lanes=l,e;case Jd:return Is(n,o,l,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Xd:s=10;break e;case Zd:s=9;break e;case Ua:s=11;break e;case Ga:s=14;break e;case gn:s=16,r=null;break e}throw Error(D(130,e==null?e:typeof e,""))}return t=vt(s,n,t,o),t.elementType=e,t.type=r,t.lanes=l,t}function Zn(e,t,n,r){return e=vt(7,e,r,t),e.lanes=n,e}function Is(e,t,n,r){return e=vt(22,e,r,t),e.elementType=Jd,e.lanes=n,e.stateNode={isHidden:!1},e}function gi(e,t,n){return e=vt(6,e,null,t),e.lanes=n,e}function yi(e,t,n){return t=vt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function cy(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Zs(0),this.expirationTimes=Zs(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zs(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Nu(e,t,n,r,o,l,s,i,u){return e=new cy(e,t,n,i,u),t===1?(t=1,l===!0&&(t|=8)):t=0,l=vt(3,null,null,t),e.current=l,l.stateNode=e,l.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},du(l),e}function dy(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:xr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Hp(e){if(!e)return Ln;e=e._reactInternals;e:{if(cr(e)!==e||e.tag!==1)throw Error(D(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(lt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(D(171))}if(e.tag===1){var n=e.type;if(lt(n))return Hf(e,n,t)}return t}function Bp(e,t,n,r,o,l,s,i,u){return e=Nu(n,r,!0,e,o,l,s,i,u),e.context=Hp(null),n=e.current,r=Ze(),o=Rn(n),l=qt(r,o),l.callback=t??null,Tn(n,l,o),e.current.lanes=o,Zo(e,o,r),st(e,r),e}function Os(e,t,n,r){var o=t.current,l=Ze(),s=Rn(o);return n=Hp(n),t.context===null?t.context=n:t.pendingContext=n,t=qt(l,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Tn(o,t,s),e!==null&&(Rt(e,o,s,l),Rl(e,o,s)),s}function fs(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Uc(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Ru(e,t){Uc(e,t),(e=e.alternate)&&Uc(e,t)}function fy(){return null}var Up=typeof reportError=="function"?reportError:function(e){console.error(e)};function Pu(e){this._internalRoot=e}Ds.prototype.render=Pu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(D(409));Os(e,t,null,null)};Ds.prototype.unmount=Pu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;rr(function(){Os(null,e,null,null)}),t[rn]=null}};function Ds(e){this._internalRoot=e}Ds.prototype.unstable_scheduleHydration=function(e){if(e){var t=kf();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xn.length&&t!==0&&t<xn[n].priority;n++);xn.splice(n,0,e),n===0&&jf(e)}};function _u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ms(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Gc(){}function py(e,t,n,r,o){if(o){if(typeof r=="function"){var l=r;r=function(){var c=fs(s);l.call(c)}}var s=Bp(t,r,e,0,null,!1,!1,"",Gc);return e._reactRootContainer=s,e[rn]=s.current,$o(e.nodeType===8?e.parentNode:e),rr(),s}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var i=r;r=function(){var c=fs(u);i.call(c)}}var u=Nu(e,0,!1,null,null,!1,!1,"",Gc);return e._reactRootContainer=u,e[rn]=u.current,$o(e.nodeType===8?e.parentNode:e),rr(function(){Os(t,u,n,r)}),u}function zs(e,t,n,r,o){var l=n._reactRootContainer;if(l){var s=l;if(typeof o=="function"){var i=o;o=function(){var u=fs(s);i.call(u)}}Os(t,s,e,o)}else s=py(n,t,e,o,r);return fs(s)}bf=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=xo(t.pendingLanes);n!==0&&(Xa(t,n|1),st(t,Te()),!(ie&6)&&(Gr=Te()+500,zn()))}break;case 13:rr(function(){var r=on(e,1);if(r!==null){var o=Ze();Rt(r,e,1,o)}}),Ru(e,1)}};Za=function(e){if(e.tag===13){var t=on(e,134217728);if(t!==null){var n=Ze();Rt(t,e,134217728,n)}Ru(e,134217728)}};Sf=function(e){if(e.tag===13){var t=Rn(e),n=on(e,t);if(n!==null){var r=Ze();Rt(n,e,t,r)}Ru(e,t)}};kf=function(){return ce};Cf=function(e,t){var n=ce;try{return ce=e,t()}finally{ce=n}};Yi=function(e,t,n){switch(t){case"input":if(Fi(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=Ns(r);if(!o)throw Error(D(90));ef(r),Fi(r,o)}}}break;case"textarea":nf(e,n);break;case"select":t=n.value,t!=null&&Lr(e,!!n.multiple,t,!1)}};cf=Cu;df=rr;var my={usingClientEntryPoint:!1,Events:[qo,Cr,Ns,af,uf,Cu]},ho={findFiberByHostInstance:Un,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},hy={bundleType:ho.bundleType,version:ho.version,rendererPackageName:ho.rendererPackageName,rendererConfig:ho.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:mn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=mf(e),e===null?null:e.stateNode},findFiberByHostInstance:ho.findFiberByHostInstance||fy,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 bl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!bl.isDisabled&&bl.supportsFiber)try{Cs=bl.inject(hy),It=bl}catch{}}pt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=my;pt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!_u(t))throw Error(D(200));return dy(e,t,null,n)};pt.createRoot=function(e,t){if(!_u(e))throw Error(D(299));var n=!1,r="",o=Up;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Nu(e,1,!1,null,null,n,!1,r,o),e[rn]=t.current,$o(e.nodeType===8?e.parentNode:e),new Pu(t)};pt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(D(188)):(e=Object.keys(e).join(","),Error(D(268,e)));return e=mf(t),e=e===null?null:e.stateNode,e};pt.flushSync=function(e){return rr(e)};pt.hydrate=function(e,t,n){if(!Ms(t))throw Error(D(200));return zs(null,e,t,!0,n)};pt.hydrateRoot=function(e,t,n){if(!_u(e))throw Error(D(405));var r=n!=null&&n.hydratedSources||null,o=!1,l="",s=Up;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=Bp(t,null,e,1,n??null,o,!1,l,s),e[rn]=t.current,$o(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Ds(t)};pt.render=function(e,t,n){if(!Ms(t))throw Error(D(200));return zs(null,e,t,!1,n)};pt.unmountComponentAtNode=function(e){if(!Ms(e))throw Error(D(40));return e._reactRootContainer?(rr(function(){zs(null,null,e,!1,function(){e._reactRootContainer=null,e[rn]=null})}),!0):!1};pt.unstable_batchedUpdates=Cu;pt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ms(n))throw Error(D(200));if(e==null||e._reactInternals===void 0)throw Error(D(38));return zs(e,t,n,!1,r)};pt.version="18.3.1-next-f1338f8080-20240426";function Gp(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Gp)}catch(e){console.error(e)}}Gp(),Ud.exports=pt;var Au=Ud.exports,Yc=Au;Ii.createRoot=Yc.createRoot,Ii.hydrateRoot=Yc.hydrateRoot;const gy="modulepreload",yy=function(e){return"/panel/"+e},Qc={},vy=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),i=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));o=Promise.allSettled(n.map(u=>{if(u=yy(u),u in Qc)return;Qc[u]=!0;const c=u.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${d}`))return;const m=document.createElement("link");if(m.rel=c?"stylesheet":gy,c||(m.as="script"),m.crossOrigin="",m.href=u,i&&m.setAttribute("nonce",i),document.head.appendChild(m),c)return new Promise((f,g)=>{m.addEventListener("load",f),m.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${u}`)))})}))}function l(s){const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=s,window.dispatchEvent(i),!i.defaultPrevented)throw s}return o.then(s=>{for(const i of s||[])i.status==="rejected"&&l(i.reason);return t().catch(l)})},Lu=["none","2xs","xs","sm","md","lg","xl","2xl"],Yp=["none","2xs","xs","sm"],Ta=["0","1","2","4","8"],Iu=["none","2xs","xs","sm","md","lg"],ps=new Set(Lu),ms=new Set(Yp),Yr=new Set(Ta),hs=new Set(Iu),xy=["text-xs","text-sm","text-base","text-lg","text-xl","text-2xl","text-3xl","text-4xl","text-5xl","text-6xl","text-7xl","text-8xl","text-9xl"],wy=["font-thin","font-extralight","font-light","font-normal","font-medium","font-semibold","font-bold","font-extrabold","font-black"],by=["leading-none","leading-tight","leading-snug","leading-normal","leading-relaxed","leading-loose","leading-3","leading-4","leading-5","leading-6","leading-7","leading-8","leading-9","leading-10"],Sy=["tracking-tighter","tracking-tight","tracking-normal","tracking-wide","tracking-wider","tracking-widest"],ky=Array.from({length:21},(e,t)=>`opacity-${t*5}`),Qp=["none","sm","","md","lg","xl","2xl","3xl","full"],Na=Qp.map(e=>e?`rounded-${e}`:"rounded");function Cy(e){return Qp.map(t=>t?`${e}-${t}`:e)}const Xp=["0","","2","3","4","5","6","8","10","12","16","20","24","32","40","48","56","64"],jy=["solid","dashed","dotted","double","hidden","none"],Ra=["0","px","0.5","1","1.5","2","2.5","3","3.5","4","5","6","7","8","9","10","11","12","14","16","20","24","28","32","36","40","44","48","52","56","60","64","72","80","96"],Ey=["slate","gray","zinc","neutral","stone","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"],Ty=["50","100","200","300","400","500","600","700","800","900","950"];function X(){return e=>e===""?{props:{}}:null}function Pe(e,t){const n=new Set(t);return r=>n.has(r)?{props:{[e]:r}}:null}function ht(e="color"){return t=>t!==""?{props:{[e]:t}}:null}function G(e,t="scale"){return n=>n!==""?{props:{[t]:n,scaleName:e}}:null}const Ny=["t","r","b","l","x","y"],vi=["t","r","b","l","x","y","s","e","bs","be"];function Ee(...e){return t=>{for(const n of e){const r=n(t);if(r)return r}return null}}function K(e,t){return{prefix:e,segment:t}}function Vt(e,t){return t.map(n=>({...n,section:e}))}function xi(e,t,n=Ny){return[...n.map(o=>({prefix:e+o,segment:t,canonical:e,extraProps:{side:o}})),{prefix:e,segment:t}]}function Ry(e,t){const n=["tl","tr","br","bl"],r=["t","r","b","l"],o=n.map(s=>({prefix:e+"-"+s,segment:t,canonical:e,extraProps:{corner:s}})),l=r.map(s=>({prefix:e+"-"+s,segment:t,canonical:e,extraProps:{side:s}}));return[...o,...l,{prefix:e,segment:Ee(X(),t)}]}function Xc(e,t){const n=new Set(t);return{prefix:e,segment:X(),matches:r=>n.has(r)?{props:{value:r}}:null}}function Py(e,t){for(const n of t){const{prefix:r,matches:o,segment:l,canonical:s,section:i,extraProps:u}=n;if(o){const m=o(e);if(!m)continue;const f={property:s??r,fullClass:e};if(i&&(f.section=i),u)for(const[g,v]of Object.entries(u))f[g]=v;for(const[g,v]of Object.entries(m.props))f[g]=v;return f}let c;if(e===r)c="";else if(e.startsWith(r+"-"))c=e.slice(r.length+1);else continue;const d=l(c);if(d){const m={property:s??r,fullClass:e};if(i&&(m.section=i),u)for(const[f,g]of Object.entries(u))m[f]=g;for(const[f,g]of Object.entries(d.props))m[f]=g;return m}return{property:s??r,fullClass:e,unknown:!0}}return null}function _y(e,t){const n=e.trim().split(/\s+/).filter(Boolean),r=[];for(const o of n){const l=Py(o,t);l&&r.push(l)}return r}const Ay=["solid","dashed","dotted","double","none","hidden"],Ly=["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],Iy=["xs","sm","base","lg","xl","2xl","3xl","4xl","5xl","6xl","7xl","8xl","9xl"],Oy=["tighter","tight","normal","wide","wider","widest"],Dy=["left","center","right","justify","start","end"],My=["inline-block","inline-grid","inline-flex","inline","flow-root","block","flex","grid","contents","hidden","table-header-group","table-footer-group","table-row-group","table-column-group","table-caption","table-column","table-row","table-cell","table"],zy=["static","relative","absolute","fixed","sticky"],$y=["t","tr","r","br","b","bl","l","tl"],Ky=["start","end","end-safe","center","center-safe","between","around","evenly","stretch","baseline","normal"],Fy=["start","end","end-safe","center","center-safe","baseline","baseline-last","stretch"],Wy=["normal","start","end","center","between","around","evenly","baseline","stretch"],Vy=["start","end","center","stretch"],Hy=["auto","start","end","center","stretch","baseline"],By=[...Vt("spacing",[...xi("m",G("spacing"),vi),...xi("-m",G("spacing"),vi),...xi("p",G("spacing"),vi),K("gap-x",G("spacing")),K("gap-y",G("spacing")),K("gap",G("spacing")),K("space-x-reverse",X()),K("space-y-reverse",X()),K("space-x",G("spacing")),K("space-y",G("spacing"))]),...Vt("sizing",[K("min-w",G("spacing")),K("max-w",G("spacing")),K("min-h",G("spacing")),K("max-h",G("spacing")),K("size",G("spacing")),K("w",G("spacing")),K("h",G("spacing"))]),...Vt("typography",[K("font-sans",X()),K("font-serif",X()),K("font-mono",X()),K("font",Pe("scale",Ly)),K("text-shadow",Ee(Pe("size",Iu),ht())),K("text",Ee(Pe("align",Dy),e=>Iy.includes(e)?{props:{size:e,scaleName:"fontSize"}}:null,ht())),K("leading",Ee(Pe("scale",["none"]),G("spacing"))),K("tracking",Pe("scale",Oy)),K("italic",X()),K("not-italic",X()),K("underline",X()),K("line-through",X()),K("overline",X()),K("no-underline",X()),K("uppercase",X()),K("lowercase",X()),K("capitalize",X()),K("normal-case",X()),K("truncate",X()),K("align-text-top",X()),K("align-text-bottom",X()),K("align-baseline",X()),K("align-top",X()),K("align-middle",X()),K("align-bottom",X()),K("align-sub",X()),K("align-super",X())]),...Vt("color",[K("bg-gradient-to",Pe("direction",$y)),K("bg",ht()),K("from",ht()),K("via",ht()),K("to",ht()),K("ring",ht()),K("outline",Ee(Pe("style",["solid","dashed","dotted","double","none"]),ht())),K("fill",ht()),K("stroke",ht()),K("decoration",ht())]),...Vt("borders",[{prefix:"border-bs",segment:Ee(X(),G("borderWidth")),canonical:"border",extraProps:{side:"bs"}},{prefix:"border-be",segment:Ee(X(),G("borderWidth")),canonical:"border",extraProps:{side:"be"}},{prefix:"border-x",segment:Ee(X(),G("borderWidth")),canonical:"border",extraProps:{side:"x"}},{prefix:"border-y",segment:Ee(X(),G("borderWidth")),canonical:"border",extraProps:{side:"y"}},{prefix:"border-s",segment:Ee(X(),G("borderWidth")),canonical:"border",extraProps:{side:"s"}},{prefix:"border-e",segment:Ee(X(),G("borderWidth")),canonical:"border",extraProps:{side:"e"}},{prefix:"border-t",segment:Ee(X(),G("borderWidth")),canonical:"border",extraProps:{side:"t"}},{prefix:"border-r",segment:Ee(X(),G("borderWidth")),canonical:"border",extraProps:{side:"r"}},{prefix:"border-b",segment:Ee(X(),G("borderWidth")),canonical:"border",extraProps:{side:"b"}},{prefix:"border-l",segment:Ee(X(),G("borderWidth")),canonical:"border",extraProps:{side:"l"}},K("border",Ee(X(),Pe("style",Ay),e=>/^\d+$/.test(e)||e==="px"?{props:{scale:e,scaleName:"borderWidth"}}:null,ht())),...Ry("rounded",G("borderRadius"))]),...Vt("effects",[K("opacity",G("opacity")),K("shadow",Pe("size",Lu))]),...Vt("layout",[Xc("display",My),Xc("position",zy),{prefix:"inset-bs",segment:G("spacing"),canonical:"inset",extraProps:{side:"bs"}},{prefix:"inset-be",segment:G("spacing"),canonical:"inset",extraProps:{side:"be"}},{prefix:"inset-x",segment:G("spacing"),canonical:"inset",extraProps:{side:"x"}},{prefix:"inset-y",segment:G("spacing"),canonical:"inset",extraProps:{side:"y"}},{prefix:"inset-s",segment:G("spacing"),canonical:"inset",extraProps:{side:"s"}},{prefix:"inset-e",segment:G("spacing"),canonical:"inset",extraProps:{side:"e"}},{prefix:"top",segment:G("spacing"),canonical:"inset",extraProps:{side:"top"}},{prefix:"right",segment:G("spacing"),canonical:"inset",extraProps:{side:"right"}},{prefix:"bottom",segment:G("spacing"),canonical:"inset",extraProps:{side:"bottom"}},{prefix:"left",segment:G("spacing"),canonical:"inset",extraProps:{side:"left"}},{prefix:"start",segment:G("spacing"),canonical:"inset",extraProps:{side:"start"}},{prefix:"end",segment:G("spacing"),canonical:"inset",extraProps:{side:"end"}},K("inset",G("spacing")),K("z",G("zIndex"))]),...Vt("flexbox",[K("flex-row-reverse",X()),K("flex-col-reverse",X()),K("flex-wrap-reverse",X()),K("flex-row",X()),K("flex-col",X()),K("flex-wrap",X()),K("flex-nowrap",X()),K("flex",Ee(X(),Pe("value",["auto","initial","none"]),G("number"))),K("grow",Ee(X(),G("number"))),K("shrink",Ee(X(),G("number"))),K("justify-items",Pe("value",Vy)),K("justify",Pe("value",Ky)),K("items",Pe("value",Fy)),K("content",Pe("value",Wy)),K("self",Pe("value",Hy)),K("basis",G("spacing")),K("grid-cols",Ee(Pe("value",["none","subgrid"]),G("gridCols"))),K("grid-rows",Ee(Pe("value",["none","subgrid"]),G("gridRows"))),K("col-span",G("colSpan")),K("row-span",G("rowSpan")),K("order",G("order"))]),...Vt("overflow",[K("overflow-x",Pe("value",["auto","hidden","clip","visible","scroll"])),K("overflow-y",Pe("value",["auto","hidden","clip","visible","scroll"])),K("overflow",Pe("value",["auto","hidden","clip","visible","scroll"]))])];let Ut=null,gs=!1;const Dl=[],Ml=[],zl=[];function Uy(){return window.location.origin.replace(/^http/,"ws")}function Zp(){if(Ut)return;const e=Uy();Ut=new WebSocket(e),Ut.addEventListener("open",()=>{gs=!0,_r({type:"REGISTER",role:"panel"});for(const t of Ml)t()}),Ut.addEventListener("close",()=>{gs=!1,Ut=null;for(const t of zl)t();setTimeout(()=>Zp(),3e3)}),Ut.addEventListener("message",t=>{try{const n=JSON.parse(t.data);for(const r of Dl)r(n)}catch(n){console.error("[tw-panel] Failed to parse message:",n)}}),Ut.addEventListener("error",t=>{console.error("[tw-panel] WebSocket error:",t)})}function _r(e){gs&&Ut&&Ut.send(JSON.stringify(e))}function pe(e,t){_r({...t,to:e})}function Jp(e){return Dl.push(e),()=>{const t=Dl.indexOf(e);t!==-1&&Dl.splice(t,1)}}function Gy(e){return Ml.push(e),()=>{const t=Ml.indexOf(e);t!==-1&&Ml.splice(t,1)}}function Yy(e){return zl.push(e),()=>{const t=zl.indexOf(e);t!==-1&&zl.splice(t,1)}}function Qy(){return gs}const qp=[{name:"popover",label:"Popover",icon:a.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[a.jsx("rect",{x:"1",y:"1",width:"14",height:"14",rx:"1.5",stroke:"currentColor",strokeWidth:"1.1",opacity:"0.3"}),a.jsx("rect",{x:"4",y:"4",width:"8",height:"6",rx:"1",fill:"currentColor"})]})},{name:"sidebar",label:"Sidebar",icon:a.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[a.jsx("rect",{x:"1",y:"1",width:"14",height:"14",rx:"1.5",stroke:"currentColor",strokeWidth:"1.1",opacity:"0.3"}),a.jsx("rect",{x:"9",y:"1",width:"6",height:"14",rx:"1.5",fill:"currentColor",opacity:"0.85"})]})},{name:"modal",label:"Modal",icon:a.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[a.jsx("rect",{x:"1",y:"1",width:"14",height:"14",rx:"1.5",fill:"currentColor",opacity:"0.12"}),a.jsx("rect",{x:"3",y:"4",width:"10",height:"8",rx:"1",fill:"currentColor",opacity:"0.9"})]})},{name:"popup",label:"Popup",icon:a.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[a.jsx("rect",{x:"1",y:"1",width:"14",height:"14",rx:"1.5",stroke:"currentColor",strokeWidth:"1.1",opacity:"0.3"}),a.jsx("rect",{x:"8",y:"8",width:"7",height:"7",rx:"1",fill:"currentColor",opacity:"0.85"})]})}],em="tw-panel-container";function Xy(){try{const e=localStorage.getItem(em);if(e&&qp.some(t=>t.name===e))return e}catch{}return"popover"}function Zc(){const[e,t]=b.useState(Xy),[n,r]=b.useState(!1),o=b.useRef(null);b.useEffect(()=>{function s(i){o.current&&!o.current.contains(i.target)&&r(!1)}return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[]);function l(s){if(s!==e){try{localStorage.setItem(em,s)}catch{}t(s),pe("overlay",{type:"SWITCH_CONTAINER",container:s})}r(!1)}return a.jsxs("div",{ref:o,className:"relative",children:[a.jsx("button",{title:"Change container",onClick:()=>r(s=>!s),className:"w-7 h-7 flex items-center justify-center rounded border border-transparent text-bv-text-mid bg-transparent cursor-pointer transition-colors hover:bg-bv-surface hover:border-bv-border hover:text-bv-text",children:a.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("rect",{x:".5",y:"1.5",width:"15",height:"13",rx:"1.5",ry:"1.5"}),a.jsx("line",{x1:"8.5",y1:"1.5",x2:"8.5",y2:"14.5"}),a.jsx("line",{x1:"11",y1:"5",x2:"13",y2:"5"}),a.jsx("line",{x1:"11",y1:"8",x2:"13",y2:"8"}),a.jsx("line",{x1:"11",y1:"11",x2:"13",y2:"11"})]})}),n&&a.jsxs("div",{className:"absolute top-[calc(100%+4px)] right-0 bg-bv-surface border border-[#4f4f4f] rounded-lg shadow-[0_4px_16px_rgba(0,0,0,0.25)] p-1.5 flex flex-col gap-px min-w-[148px] z-50",children:[a.jsx("div",{className:"text-[9px] font-semibold uppercase tracking-[0.8px] text-bv-muted px-2 pt-1 pb-1.5",children:"Container"}),qp.map(s=>a.jsxs("button",{onClick:()=>l(s.name),className:`flex items-center gap-2 px-2 py-1.5 rounded text-[12px] cursor-pointer border-none w-full text-left transition-colors ${s.name===e?"bg-bv-teal/9 text-bv-teal":"bg-transparent text-bv-text-mid hover:bg-bv-surface hover:text-bv-text"}`,children:[s.icon,s.label]},s.name)),a.jsx("div",{className:"h-px bg-[#4f4f4f] mx-1 my-1"}),a.jsxs("button",{onClick:()=>{r(!1),pe("overlay",{type:"CLOSE_PANEL"})},className:"flex items-center gap-2 px-2 py-1.5 rounded text-[12px] cursor-pointer border-none w-full text-left transition-colors bg-transparent text-red-400 hover:bg-red-500/10 hover:text-red-300",children:[a.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[a.jsx("line",{x1:"4",y1:"4",x2:"12",y2:"12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),a.jsx("line",{x1:"12",y1:"4",x2:"4",y2:"12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),"Close panel"]})]})]})}function Zy(e){const t={};for(const[n,r]of Object.entries(e)){if(!r||typeof r!="object")continue;const o=r,l=typeof o.control=="string"?o.control:typeof o.control=="object"&&o.control!==null?o.control.type??"text":"text";t[n]={control:l,options:Array.isArray(o.options)?o.options:void 0,description:typeof o.description=="string"?o.description:void 0,defaultValue:o.defaultValue}}return t}function Jy(e){const[t,n]=b.useState(null),[r,o]=b.useState(!0),[l,s]=b.useState({}),[i,u]=b.useState({}),c=b.useRef(0),d=b.useRef(null),m=b.useRef(!1);return b.useEffect(()=>{if(e.length===0){o(!1);return}m.current=!1,c.current=0;const f=document.createElement("iframe");Object.assign(f.style,{position:"fixed",left:"-99999px",top:"-99999px",width:"800px",height:"600px",visibility:"hidden",pointerEvents:"none",border:"none"}),d.current=f,document.body.appendChild(f);function g(h){if(h>=e.length){m.current||(m.current=!0,n(e[0]),s({}),u({}),o(!1));return}c.current=h,f.src=`/storybook/iframe.html?id=${e[h].id}&viewMode=story`}let v=null;function w(h){var x,j,k,C;if(m.current)return;let p=h.data;if(typeof p=="string")try{p=JSON.parse(p)}catch{return}const y=e[c.current];if((p==null?void 0:p.key)==="storybook-channel"&&((x=p==null?void 0:p.event)==null?void 0:x.type)==="storyPrepared"&&((C=(k=(j=p==null?void 0:p.event)==null?void 0:j.args)==null?void 0:k[0])==null?void 0:C.id)===(y==null?void 0:y.id)){const T=p.event.args[0].argTypes??{},M=p.event.args[0].initialArgs??p.event.args[0].args??{};if(Object.keys(T).length>0)m.current=!0,n(y),s(Zy(T)),u(M),o(!1);else{v&&clearTimeout(v);const _=c.current+1;v=setTimeout(()=>g(_),50)}}}window.addEventListener("message",w);function S(){v&&clearTimeout(v),v=setTimeout(()=>{!m.current&&c.current<e.length&&(g(c.current+1),S())},5e3)}return f.addEventListener("load",()=>{S()}),g(0),()=>{m.current=!0,window.removeEventListener("message",w),v&&clearTimeout(v),f.remove(),d.current=null}},[e]),{bestStory:t,probing:r,argTypes:l,defaultArgs:i}}function qy(e,t={},n="/storybook"){const r=`${n}/iframe.html?id=${encodeURIComponent(e)}&viewMode=story`,o=Object.entries(t).filter(([,s])=>s!=null);if(o.length===0)return r;const l=o.map(([s,i])=>`${encodeURIComponent(s)}:${encodeURIComponent(String(i))}`).join(";");return`${r}&args=${l}`}function ev({argTypes:e,args:t,onArgsChange:n}){const r=Object.entries(e);if(r.length===0)return null;function o(l,s){n({...t,[l]:s})}return a.jsx("div",{className:"flex flex-col gap-1.5 px-1",children:r.map(([l,s])=>a.jsx(tv,{name:l,argType:s,value:t[l],onChange:i=>o(l,i)},l))})}function tv({name:e,argType:t,value:n,onChange:r}){const o=typeof t.control=="string"?t.control:typeof t.control=="object"&&t.control!==null?t.control.type??"text":"text";return a.jsxs("label",{className:"flex items-center gap-2 text-[10px]",children:[a.jsx("span",{className:"text-bv-text-mid font-mono min-w-[60px] shrink-0",children:e}),o==="select"&&t.options?a.jsx("select",{className:"flex-1 bg-bv-surface border border-bv-border rounded px-1.5 py-0.5 text-[10px] text-bv-text",value:String(n??""),onChange:l=>r(l.target.value),children:t.options.map(l=>a.jsx("option",{value:l,children:l},l))}):o==="boolean"?a.jsx("input",{type:"checkbox",checked:!!n,onChange:l=>r(l.target.checked),className:"accent-bv-teal"}):o==="number"?a.jsx("input",{type:"number",className:"flex-1 bg-bv-surface border border-bv-border rounded px-1.5 py-0.5 text-[10px] text-bv-text",value:n!=null?String(n):"",onChange:l=>r(l.target.value===""?void 0:Number(l.target.value))}):a.jsx("input",{type:"text",className:"flex-1 bg-bv-surface border border-bv-border rounded px-1.5 py-0.5 text-[10px] text-bv-text",value:String(n??""),onChange:l=>r(l.target.value)})]})}const nv=["display","position","float","clear","width","height","min-width","min-height","max-width","max-height","padding-top","padding-right","padding-bottom","padding-left","margin-top","margin-right","margin-bottom","margin-left","border-top-width","border-right-width","border-bottom-width","border-left-width","border-top-style","border-right-style","border-bottom-style","border-left-style","border-top-color","border-right-color","border-bottom-color","border-left-color","box-sizing","background-color","background-image","background-size","background-position","background-repeat","color","font-family","font-size","font-weight","font-style","border-top-left-radius","border-top-right-radius","border-bottom-left-radius","border-bottom-right-radius","box-shadow","opacity","text-decoration","text-transform","line-height","letter-spacing","word-spacing","text-align"],tm=["color","font-family","font-size","font-weight","font-style","line-height","background-color","background-image","border-top-left-radius","border-top-right-radius","border-bottom-left-radius","border-bottom-right-radius","padding-top","padding-right","padding-bottom","padding-left","margin-top","margin-right","margin-bottom","margin-left","display","box-shadow","text-decoration","text-transform","letter-spacing","text-align","opacity","border-top-width","border-right-width","border-bottom-width","border-left-width","border-top-style","border-right-style","border-bottom-style","border-left-style","border-top-color","border-right-color","border-bottom-color","border-left-color"];function rv(e){const t=getComputedStyle(e),n={};for(const r of nv)n[r]=t.getPropertyValue(r);return n}function ov(e,t,n){for(const[r,o]of Object.entries(t))if(r!=="height"){if(r==="width"&&n!=null){const l=parseFloat(o);if(!isNaN(l)&&Math.abs(l-n)<1)continue}e.style.setProperty(r,o)}}function nm(e,t){if(!e||!t)return;const n=getComputedStyle(e),r=t;if(r.style)for(const i of tm)r.style.setProperty(i,n.getPropertyValue(i));const o=e.children,l=t.children,s=Math.min(o.length,l.length);for(let i=0;i<s;i++)nm(o[i],l[i])}const rm=tm;function om(e,t){const n=e.children,r=t.children,o=Math.min(n.length,r.length);for(let l=0;l<o;l++){const s=n[l],i=r[l],u=getComputedStyle(s);if(i.style)for(const c of rm)i.style.setProperty(c,u.getPropertyValue(c));om(s,i)}}class lm extends HTMLElement{constructor(){super();pr(this,"shadow");pr(this,"ghostEl");pr(this,"hiddenIframe");pr(this,"observer",null);this.shadow=this.attachShadow({mode:"open"}),this.ghostEl=document.createElement("div"),this.ghostEl.setAttribute("part","ghost"),this.ghostEl.style.display="contents";const n=document.createElement("style");n.textContent=`
|
|
41
|
-
iframe {
|
|
42
|
-
position: absolute; inset: 0;
|
|
43
|
-
width: 100%; height: 100%;
|
|
44
|
-
border: none;
|
|
45
|
-
opacity: 0;
|
|
46
|
-
transition: opacity 0.2s ease-in;
|
|
47
|
-
pointer-events: none;
|
|
48
|
-
}
|
|
49
|
-
iframe.visible {
|
|
50
|
-
opacity: 1;
|
|
51
|
-
pointer-events: auto;
|
|
52
|
-
}
|
|
53
|
-
`,this.shadow.append(n,this.ghostEl),this.hiddenIframe=document.createElement("iframe"),Object.assign(this.hiddenIframe.style,{position:"fixed",left:"-99999px",top:"-99999px",width:"800px",height:"99999px",visibility:"hidden",pointerEvents:"none",border:"none"}),this.hiddenIframe.addEventListener("load",()=>this.onIframeLoad())}connectedCallback(){document.body.appendChild(this.hiddenIframe),this.triggerLoad()}disconnectedCallback(){var n;(n=this.observer)==null||n.disconnect(),this.observer=null,this.hiddenIframe.remove()}attributeChangedCallback(){this.isConnected&&this.triggerLoad()}triggerLoad(){var o;(o=this.observer)==null||o.disconnect(),this.observer=null;const n=this.getAttribute("src"),r=this.getAttribute("srcdoc");r!=null?this.hiddenIframe.srcdoc=r:n&&(this.hiddenIframe.src=n)}onIframeLoad(){const n=this.hiddenIframe.contentDocument;if(!n)return;const r=n.createElement("style");if(r.textContent="body,html{margin:0!important;padding:0!important}",n.head.appendChild(r),this.getAttribute("srcdoc")!=null){this.extractAndApply(n);return}this.waitForStoryContent(n)}updateArgs(n,r){const o=this.hiddenIframe.contentWindow;o&&o.postMessage(JSON.stringify({key:"storybook-channel",event:{type:"updateStoryArgs",args:[{storyId:n,updatedArgs:r}]}}),"*")}waitForStoryContent(n){var u;(u=this.observer)==null||u.disconnect();let r=!1,o=null;const l=()=>this.findStoryRoot(n)?(r=!0,this.extractAndApply(n),!0):!1;l();const s=n.querySelector("#storybook-root")??n.body;if(!s)return;const i=new MutationObserver(()=>{r?(o&&clearTimeout(o),o=setTimeout(()=>l(),50)):l()});this.observer=i,i.observe(s,{childList:!0,subtree:!0,characterData:!0,attributes:!0}),setTimeout(()=>{!r&&this.observer===i&&(this.observer.disconnect(),this.observer=null)},1e4)}findStoryRoot(n){const r=n.querySelector("#storybook-root");if(r){for(const o of r.children)if(!o.classList.contains("sb-loader"))return o;return null}return n.body.firstElementChild}getComponentHtml(){const n=this.hiddenIframe.contentDocument;if(!n)return"";const r=this.findStoryRoot(n);if(!r)return this.ghostEl.innerHTML;const o=r.cloneNode(!0),l=getComputedStyle(r);for(const s of rm)o.style.setProperty(s,l.getPropertyValue(s));return om(r,o),o.outerHTML}extractAndApply(n){const r=this.findStoryRoot(n);if(!r)return;const o=this.clientWidth||800;this.hiddenIframe.style.width=o+"px";const l=rv(r);ov(this,l,o),this.ghostEl.innerHTML=r.innerHTML;const s=r.children,i=this.ghostEl.children,u=Math.min(s.length,i.length);for(let c=0;c<u;c++)nm(s[c],i[c])}}pr(lm,"observedAttributes",["src","srcdoc"]);customElements.get("adaptive-iframe")||customElements.define("adaptive-iframe",lm);function lv({group:e,isArmed:t,onArm:n,onDisarm:r}){const{bestStory:o,probing:l,argTypes:s,defaultArgs:i}=Jy(e.stories),[u,c]=b.useState({}),[d,m]=b.useState(!1),f=b.useRef(null),g=b.useRef(!1);b.useEffect(()=>{!l&&i&&c(i)},[l,i]),b.useEffect(()=>{if(!f.current||!o||g.current)return;g.current=!0;const h=qy(o.id,{});f.current.setAttribute("src",h)},[o]);const v=b.useCallback(h=>{if(c(h),!f.current||!o)return;const p=f.current;typeof p.updateArgs=="function"&&p.updateArgs(o.id,h)},[o]),w=b.useCallback(h=>{var x;if(h.stopPropagation(),t){r();return}const p=f.current,y=((x=p.getComponentHtml)==null?void 0:x.call(p))??"";n(y,u)},[t,n,r,u]),S=Object.keys(s).length>0;return a.jsxs("li",{className:`group rounded border overflow-hidden cursor-pointer transition-[border-color,box-shadow] ${t?"border-bv-teal shadow-[0_0_0_2px_var(--color-bv-teal),0_0_12px_rgba(0,132,139,0.2)]":"border-bv-border hover:border-[#555]"}`,onClick:w,children:[a.jsxs("div",{className:`flex items-center justify-center min-h-14 overflow-hidden ${t?"bg-[rgba(0,132,139,0.06)]":"bg-bv-surface"}`,children:[l&&a.jsx("span",{className:"text-[10px] text-bv-muted",children:"Loading preview…"}),!l&&o&&a.jsx("adaptive-iframe",{ref:f,style:{pointerEvents:"none"}}),!l&&!o&&a.jsx("span",{className:"text-[10px] text-bv-muted",children:"No stories found."})]}),a.jsxs("div",{className:"flex items-center justify-between px-2.5 py-1.5 border-t border-bv-border bg-bv-bg",children:[t?a.jsx("span",{className:"text-[11px] font-medium text-bv-teal",children:"Click the page to place"}):a.jsx("span",{className:"text-[11px] font-semibold text-bv-text",children:e.name}),S&&a.jsx("button",{className:`w-5.5 h-5.5 rounded flex items-center justify-center transition-colors opacity-0 group-hover:opacity-100 ${d?"opacity-100 bg-bv-surface-hi text-bv-text":"text-bv-muted hover:bg-bv-surface-hi hover:text-bv-text"}`,title:"Customize props",onClick:h=>{h.stopPropagation(),m(p=>!p)},children:a.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[a.jsx("circle",{cx:"12",cy:"12",r:"3"}),a.jsx("path",{d:"M12 1v2m0 18v2M4.22 4.22l1.42 1.42m12.72 12.72 1.42 1.42M1 12h2m18 0h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"})]})})]}),d&&S&&a.jsxs("div",{className:"px-2.5 py-2 border-t border-bv-border bg-bv-surface",onClick:h=>h.stopPropagation(),children:[a.jsx("div",{className:"text-[9px] font-semibold uppercase tracking-wider text-bv-muted mb-1.5",children:"Props"}),a.jsx(ev,{argTypes:s,args:u,onArgsChange:v})]})]})}function Jc(){const{groups:e,loading:t,error:n}=sv(),[r,o]=b.useState(null),l=b.useCallback((i,u,c)=>{var d;o(i.name),pe("overlay",{type:"COMPONENT_ARM",componentName:i.name,storyId:((d=i.stories[0])==null?void 0:d.id)??"",ghostHtml:u,componentPath:i.componentPath,args:c})},[]),s=b.useCallback(()=>{o(null),pe("overlay",{type:"COMPONENT_DISARM"})},[]);return b.useEffect(()=>Jp(i=>{i.type==="COMPONENT_DISARMED"&&o(null)}),[]),b.useEffect(()=>{if(!r)return;const i=()=>{o(null),pe("overlay",{type:"COMPONENT_DISARM"})};return document.addEventListener("click",i),()=>document.removeEventListener("click",i)},[r]),a.jsx("div",{className:"p-3 flex flex-col gap-3",children:a.jsxs("div",{className:"flex flex-col gap-1.5",children:[t&&a.jsx("div",{className:"text-[11px] text-bv-muted",children:"Loading components…"}),!t&&n&&a.jsxs("div",{className:"text-[11px] text-bv-text-mid leading-relaxed",children:[a.jsx("span",{className:"block mb-0.5",children:"Storybook not detected."}),a.jsx("span",{className:"text-bv-muted",children:"Start Storybook on port 6006–6010 to browse components."})]}),!t&&!n&&e.length===0&&a.jsx("div",{className:"text-[11px] text-bv-muted",children:"No stories found."}),!t&&!n&&e.length>0&&a.jsx("ul",{className:"flex flex-col gap-2",children:e.map(i=>a.jsx(lv,{group:i,isArmed:r===i.name,onArm:(u,c)=>l(i,u,c),onDisarm:s},i.name))})]})})}function sv(){const[e,t]=b.useState([]),[n,r]=b.useState(!0),[o,l]=b.useState(!1);return b.useEffect(()=>{let s=!1;return(async()=>{var i,u;try{const c=await fetch("/api/storybook-data").then(m=>m.json());if(!c.available){s||(l(!0),r(!1));return}const d=Object.values(((i=c.index)==null?void 0:i.entries)??((u=c.index)==null?void 0:u.stories)??{});s||t(iv(d,c.argTypes??{}))}catch{s||l(!0)}finally{s||r(!1)}})(),()=>{s=!0}},[]),{groups:e,loading:n,error:o}}function iv(e,t={}){const n=new Map;for(const r of e){const o=r.title.split("/").at(-1)??r.title;n.has(o)||n.set(o,[]),n.get(o).push(r)}return Array.from(n.entries()).map(([r,o])=>{var l;return{name:r,stories:o,argTypes:t[r]??av(o),componentPath:(l=o[0])==null?void 0:l.componentPath}})}function av(e){const t={};for(const n of e)for(const[r,o]of Object.entries(n.argTypes??{}))r in t||(t[r]=o);return t}const wi=typeof window<"u"?window.SpeechRecognition??window.webkitSpeechRecognition??null:null;function qc({draft:e,currentElementKey:t,onAddMessage:n,onDiscard:r}){const[o,l]=b.useState(""),[s,i]=b.useState(!1),[u,c]=b.useState(null),d=b.useRef(null),m=b.useRef(null),f=b.useRef("");b.useEffect(()=>{var p;(p=d.current)==null||p.focus()},[]);const g=e.filter(p=>p.kind==="message"),v=!!o.trim()&&!!t;function w(){var y;const p=o.trim();!p||!t||(n(p,t),l(""),(y=d.current)==null||y.focus())}function S(){var y;if(s){(y=m.current)==null||y.stop();return}if(!wi)return;f.current=o;const p=new wi;p.continuous=!1,p.interimResults=!0,p.lang="en-US",p.onresult=x=>{let j="";for(let C=0;C<x.results.length;C++)j+=x.results[C][0].transcript;const k=f.current.trimEnd();l(k?`${k} ${j}`:j)},p.onend=()=>i(!1),p.onerror=x=>{console.error("[mic] SpeechRecognition error:",x.error,x.message),i(!1),x.error==="not-allowed"&&c("Microphone blocked — allow access in your browser's address bar, then reload.")},m.current=p;try{p.start(),i(!0),console.log("[mic] recognition started")}catch(x){console.error("[mic] recognition.start() threw:",x)}}function h(p){(p.metaKey||p.ctrlKey)&&p.key==="Enter"&&(p.preventDefault(),w())}return a.jsxs("div",{className:"p-3 flex flex-col gap-3",children:[a.jsxs("div",{className:"flex flex-col gap-2",children:[a.jsx("textarea",{ref:d,className:"w-full min-h-[80px] p-2 bg-bv-bg border border-bv-border rounded text-[13px] font-[family-name:var(--font-ui)] text-bv-text placeholder:text-bv-muted resize-y focus:outline-none focus:border-bv-teal",placeholder:t?"Add context for the AI agent…":"Select an element to add contextual message…",value:o,onChange:p=>l(p.target.value),onKeyDown:h,disabled:!t}),a.jsxs("div",{className:"flex items-center justify-between",children:[wi?a.jsx("button",{type:"button",title:s?"Stop recording":"Record voice message",onClick:S,className:`flex items-center justify-center w-7 h-7 rounded-full border-none cursor-pointer transition-colors ${s?"bg-bv-orange text-white":u?"bg-bv-surface text-bv-orange hover:bg-bv-surface-hi":"bg-bv-surface text-bv-text-mid hover:text-bv-teal hover:bg-bv-surface-hi"}`,children:s?a.jsx("span",{className:"w-2.5 h-2.5 rounded-full bg-white animate-pulse"}):a.jsx("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"currentColor",children:a.jsx("path",{d:"M12 1a4 4 0 0 1 4 4v7a4 4 0 0 1-8 0V5a4 4 0 0 1 4-4zm-1.5 4v7a1.5 1.5 0 0 0 3 0V5a1.5 1.5 0 0 0-3 0zM6 11a1 1 0 0 1 1 1 5 5 0 0 0 10 0 1 1 0 1 1 2 0 7 7 0 0 1-6 6.93V21h2a1 1 0 1 1 0 2H9a1 1 0 1 1 0-2h2v-2.07A7 7 0 0 1 5 12a1 1 0 0 1 1-1z"})})}):a.jsx("span",{}),a.jsx("button",{type:"button",className:"px-3 py-1 text-[11px] font-semibold rounded bg-bv-teal text-white border-none cursor-pointer hover:opacity-90 transition-opacity disabled:opacity-50 disabled:cursor-not-allowed",disabled:!v,onClick:w,children:"Add Message"})]}),u&&a.jsx("p",{className:"text-[11px] text-bv-orange mt-1",children:u})]}),g.length>0&&a.jsxs("div",{className:"flex flex-col gap-1",children:[a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsx("span",{className:"w-[5px] h-[5px] rounded-full bg-bv-teal opacity-50 shrink-0"}),a.jsx("span",{className:"text-[9px] font-semibold uppercase tracking-[1px] text-bv-text-mid",children:"Staged Messages"})]}),g.map(p=>{var y;return a.jsxs("div",{className:"flex items-start gap-2 p-2 bg-bv-surface rounded border border-bv-border group",children:[a.jsx("span",{className:"text-[12px] shrink-0 mt-0.5",children:"💬"}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsxs("div",{className:"text-[12px] font-[family-name:var(--font-ui)] text-bv-text break-words",children:['"',p.message,'"']}),p.elementKey&&a.jsx("div",{className:"text-[11px] text-bv-text-mid mt-0.5",children:((y=p.component)==null?void 0:y.name)||p.elementKey})]}),a.jsx("button",{type:"button",className:"shrink-0 text-[10px] px-1 py-0.5 rounded border-none cursor-pointer bg-transparent text-bv-muted hover:text-bv-orange transition-colors opacity-0 group-hover:opacity-100",onClick:()=>r(p.id),title:"Discard",children:"✕"})]},p.id)})]})]})}function uv(e){var c,d;const n=`<${((c=e.component)==null?void 0:c.name)??"component"}>`,r="insertMode"in e?e.insertMode:void 0,o="targetComponentName"in e&&e.targetComponentName||"parentComponent"in e&&((d=e.parentComponent)==null?void 0:d.name)||null,l=o||e.elementKey||null,s=o?`<${l}>`:l,i="targetPatchId"in e&&!!e.targetPatchId,u=s&&i?`new ${s}`:s;switch(r){case"after":return u?`Appended ${n} after ${u}`:`Appended ${n}`;case"before":return u?`Prepended ${n} before ${u}`:`Prepended ${n}`;case"last-child":return u?`Inserted ${n} bottom of ${u}`:`Inserted ${n}`;case"first-child":return u?`Inserted ${n} top of ${u}`:`Inserted ${n}`;default:return u?`Inserted ${n} in ${u}`:`Inserted ${n}`}}function Sl({label:e,count:t,items:n,activeColor:r,dotColor:o,onCommit:l,onDiscard:s,onCommitAll:i,onDiscardAll:u}){const[c,d]=b.useState(!1),m=b.useRef(null),f=b.useRef(null),[g,v]=b.useState(void 0);b.useEffect(()=>{if(!c||!f.current)return;const p=f.current.getBoundingClientRect(),y=220,x=window.innerWidth,j=4;let k=p.left+p.width/2-y/2;k=Math.max(j,Math.min(k,x-y-j)),v(k-p.left)},[c]),b.useEffect(()=>{if(!c)return;function h(p){m.current&&!m.current.contains(p.target)&&d(!1)}return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[c]),b.useEffect(()=>{if(!c)return;function h(p){p.key==="Escape"&&d(!1)}return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[c]);const w=t>0,S=l||s||i||u;return a.jsxs("div",{ref:m,className:"relative",children:[a.jsxs("button",{ref:f,className:`flex items-center gap-1 text-[11px] tabular-nums border-none bg-transparent cursor-pointer px-0 py-0 ${w?`${r} font-medium`:"text-bv-muted"} ${w?"hover:underline":""}`,onClick:()=>w&&d(!c),disabled:!w,type:"button",children:[o&&a.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${o}`}),t," ",e]}),c&&a.jsxs("div",{className:"absolute bottom-full mb-1 min-w-[220px] bg-bv-surface border border-bv-border rounded-lg shadow-lg overflow-hidden flex flex-col z-[9999]",style:g!==void 0?{left:`${g}px`}:void 0,children:[a.jsxs("div",{className:"px-3 py-1.5 border-b border-bv-border text-[11px] font-semibold text-bv-text-mid uppercase tracking-wide",children:[e," (",t,")"]}),a.jsx("div",{className:"flex-1 overflow-auto",children:n.length===0?a.jsx("div",{className:"px-3 py-2 text-[11px] text-bv-muted italic",children:"No patches"}):n.map(h=>{var j,k;const p="kind"in h&&h.kind==="message",y="kind"in h&&h.kind==="design",x="kind"in h&&h.kind==="component-drop";return a.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1.5 border-b border-bv-border last:border-b-0 group",children:[a.jsxs("div",{className:"flex-1 min-w-0",children:[!p&&!y&&!x&&((j=h.component)==null?void 0:j.name)&&a.jsx("div",{className:"text-[10px] text-bv-muted truncate",children:h.component.name}),x?a.jsx("div",{className:"text-[11px] text-bv-text truncate",children:uv(h)}):y?a.jsxs("div",{className:"text-[11px] text-bv-text",children:[a.jsxs("div",{className:"flex items-center gap-1.5 mb-1",children:[a.jsx("span",{children:"✏️"}),a.jsxs("span",{className:"truncate",children:["Drawing",(k=h.component)!=null&&k.name?` in ${h.component.name}`:""]})]}),"image"in h&&h.image&&a.jsx("img",{src:h.image,alt:"Design drawing",className:"w-full max-h-16 object-contain rounded border border-bv-border bg-white"})]}):p?a.jsxs("div",{className:"text-[11px] text-bv-text truncate",children:[a.jsx("span",{className:"mr-1",children:"💬"}),'"',"message"in h&&h.message||"",'"']}):a.jsx("div",{className:"text-[11px] font-mono text-bv-text truncate",children:h.originalClass?a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"line-through text-bv-muted",children:h.originalClass})," → ",a.jsx("span",{className:"text-bv-teal",children:h.newClass})]}):a.jsxs("span",{className:"text-bv-teal",children:["+",h.newClass]})})]}),(l||s)&&a.jsxs("div",{className:"flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:[l&&a.jsx("button",{className:"text-[10px] px-1.5 py-0.5 rounded border-none cursor-pointer bg-bv-teal text-white hover:bg-bv-teal-dark transition-colors",onClick:C=>{C.stopPropagation(),l(h.id)},title:"Commit to Agent",type:"button",children:"✓"}),s&&a.jsx("button",{className:"text-[10px] px-1.5 py-0.5 rounded border-none cursor-pointer bg-transparent text-bv-muted hover:text-bv-orange hover:bg-bv-surface-hi transition-colors",onClick:C=>{C.stopPropagation(),s(h.id)},title:"Discard",type:"button",children:"✕"})]})]},h.id)})}),S&&n.length>0&&(i||u)&&a.jsxs("div",{className:"flex gap-2 px-3 py-1.5 border-t border-bv-border",children:[i&&a.jsx("button",{className:"text-[10px] px-2 py-1 rounded border-none cursor-pointer font-semibold bg-bv-teal text-white hover:bg-bv-teal-dark transition-colors",onClick:()=>{i(),d(!1)},type:"button",children:"Commit All"}),u&&a.jsx("button",{className:"text-[10px] px-2 py-1 rounded cursor-pointer font-semibold bg-transparent border border-bv-border text-bv-text-mid hover:text-bv-orange hover:border-bv-orange transition-colors",onClick:()=>{u(),d(!1)},type:"button",children:"Discard All"})]})]})]})}function ed({tabs:e,activeTab:t,onTabChange:n}){const[r,o]=b.useState(null);return a.jsx("div",{className:"relative flex border-b border-bv-border px-3",children:e.map(l=>{const s=l.id===t,i=l.disabled===!0;return a.jsxs("div",{className:"relative",onMouseEnter:()=>i&&l.tooltip&&o(l.id),onMouseLeave:()=>o(null),children:[a.jsxs("button",{type:"button",className:`relative px-3 py-2 text-[11px] font-medium font-[family-name:var(--font-ui)] border-none bg-transparent cursor-pointer transition-colors ${i?"text-bv-muted cursor-not-allowed":s?"text-bv-text":"text-bv-text-mid hover:text-bv-text"}`,disabled:i,onClick:()=>!i&&n(l.id),"aria-selected":s,role:"tab",children:[l.label,s&&a.jsx("span",{className:"absolute bottom-0 left-0 right-0 h-[2px] bg-bv-teal"})]}),r===l.id&&l.tooltip&&a.jsx("div",{className:"absolute top-full left-1/2 -translate-x-1/2 mt-1 px-2 py-1 text-[10px] text-white bg-bv-text rounded whitespace-nowrap z-[9999]",children:l.tooltip})]},l.id)})})}function cv(){const[e,t]=b.useState([]),[n,r]=b.useState({draft:0,committed:0,implementing:0,implemented:0,partial:0,error:0}),[o,l]=b.useState({draft:[],commits:[]}),[s,i]=b.useState(!1),u=b.useRef(e);u.current=e;const c=b.useRef(o);c.current=o;const d=b.useCallback((C,T)=>{pe("overlay",{type:"PATCH_PREVIEW",oldClass:C,newClass:T})},[]),m=b.useCallback(C=>{pe("overlay",{type:"PATCH_PREVIEW_BATCH",pairs:C})},[]),f=b.useCallback(()=>{pe("overlay",{type:"PATCH_REVERT"})},[]),g=b.useCallback((C,T,M,_)=>{if(_===M){t(z=>{const R=z.find(I=>I.kind==="class-change"&&I.elementKey===C&&I.property===T);return R&&R.kind==="class-change"&&R.newClass!==M?pe("overlay",{type:"PATCH_REVERT_STAGED",oldClass:R.newClass,newClass:M}):pe("overlay",{type:"PATCH_REVERT"}),z.filter(I=>!(I.kind==="class-change"&&I.elementKey===C&&I.property===T))});return}const F=crypto.randomUUID();t(z=>{const R=z.filter(J=>!(J.kind==="class-change"&&J.elementKey===C&&J.property===T)),I={id:F,kind:"class-change",elementKey:C,status:"staged",originalClass:M,newClass:_,property:T,timestamp:new Date().toISOString()};return[...R,I]}),pe("overlay",{type:"PATCH_STAGE",id:F,oldClass:M,newClass:_,property:T})},[]),v=b.useCallback((C,T,M)=>{const _=crypto.randomUUID(),F=M?{name:M}:void 0;t(z=>{const R={id:_,kind:"message",elementKey:T,status:"staged",originalClass:"",newClass:"",property:"",timestamp:new Date().toISOString(),message:C,component:F};return[...z,R]}),_r(F?{type:"MESSAGE_STAGE",id:_,message:C,elementKey:T,component:F}:{type:"MESSAGE_STAGE",id:_,message:C,elementKey:T})},[]),w=b.useCallback(()=>{const C=c.current.draft.map(_=>_.id),T=u.current.filter(_=>_.status==="staged").map(_=>_.id),M=Array.from(new Set([...C,...T]));M.length!==0&&(_r({type:"PATCH_COMMIT",ids:M}),t([]))},[]),S=b.useCallback(C=>{t(T=>T.filter(M=>M.id!==C)),_r({type:"DISCARD_DRAFTS",ids:[C]}),pe("overlay",{type:"PATCH_REVERT"})},[]),h=b.useCallback(()=>{const C=c.current.draft.map(_=>_.id),T=u.current.filter(_=>_.status==="staged").map(_=>_.id),M=Array.from(new Set([...C,...T]));t([]),M.length>0&&_r({type:"DISCARD_DRAFTS",ids:M}),pe("overlay",{type:"PATCH_REVERT"})},[]),p=b.useCallback(()=>{},[]),y=b.useCallback(C=>{r({draft:C.draftCount,committed:C.committedCount,implementing:C.implementingCount,implemented:C.implementedCount,partial:C.partialCount,error:C.errorCount}),l({draft:C.draft,commits:C.commits}),i(!!C.agentWaiting)},[]),x=b.useCallback(C=>{r({draft:C.staged,committed:C.committed,implementing:C.implementing,implemented:C.implemented,partial:0,error:0})},[]),j=e.filter(C=>C.status==="staged").length,k={draft:Math.max(j,n.draft),committed:n.committed,implementing:n.implementing,implemented:n.implemented,partial:n.partial,error:n.error};return{patches:e,counts:k,queueState:o,agentWaiting:s,preview:d,previewBatch:m,revertPreview:f,stage:g,stageMessage:v,commitAll:w,discard:S,discardAll:h,reset:p,handleQueueUpdate:y,handlePatchUpdate:x}}function $s(){return typeof window<"u"}function qr(e){return Ou(e)?(e.nodeName||"").toLowerCase():"#document"}function dt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function zt(e){var t;return(t=(Ou(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ou(e){return $s()?e instanceof Node||e instanceof dt(e).Node:!1}function Ne(e){return $s()?e instanceof Element||e instanceof dt(e).Element:!1}function $t(e){return $s()?e instanceof HTMLElement||e instanceof dt(e).HTMLElement:!1}function Pa(e){return!$s()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof dt(e).ShadowRoot}function tl(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=kt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function dv(e){return/^(table|td|th)$/.test(qr(e))}function Ks(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const fv=/transform|translate|scale|rotate|perspective|filter/,pv=/paint|layout|strict|content/,Kn=e=>!!e&&e!=="none";let bi;function Du(e){const t=Ne(e)?kt(e):e;return Kn(t.transform)||Kn(t.translate)||Kn(t.scale)||Kn(t.rotate)||Kn(t.perspective)||!Fs()&&(Kn(t.backdropFilter)||Kn(t.filter))||fv.test(t.willChange||"")||pv.test(t.contain||"")}function mv(e){let t=sn(e);for(;$t(t)&&!en(t);){if(Du(t))return t;if(Ks(t))return null;t=sn(t)}return null}function Fs(){return bi==null&&(bi=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),bi}function en(e){return/^(html|body|#document)$/.test(qr(e))}function kt(e){return dt(e).getComputedStyle(e)}function Ws(e){return Ne(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function sn(e){if(qr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Pa(e)&&e.host||zt(e);return Pa(t)?t.host:t}function sm(e){const t=sn(e);return en(t)?e.ownerDocument?e.ownerDocument.body:e.body:$t(t)&&tl(t)?t:sm(t)}function _n(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=sm(e),l=o===((r=e.ownerDocument)==null?void 0:r.body),s=dt(o);if(l){const i=_a(s);return t.concat(s,s.visualViewport||[],tl(o)?o:[],i&&n?_n(i):[])}else return t.concat(o,_n(o,[],n))}function _a(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Qr=Math.min,at=Math.max,ys=Math.round,kl=Math.floor,Dt=e=>({x:e,y:e}),hv={left:"right",right:"left",bottom:"top",top:"bottom"};function td(e,t,n){return at(e,Qr(t,n))}function nl(e,t){return typeof e=="function"?e(t):e}function In(e){return e.split("-")[0]}function rl(e){return e.split("-")[1]}function im(e){return e==="x"?"y":"x"}function am(e){return e==="y"?"height":"width"}function Jt(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function um(e){return im(Jt(e))}function gv(e,t,n){n===void 0&&(n=!1);const r=rl(e),o=um(e),l=am(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(s=vs(s)),[s,vs(s)]}function yv(e){const t=vs(e);return[Aa(e),t,Aa(t)]}function Aa(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const nd=["left","right"],rd=["right","left"],vv=["top","bottom"],xv=["bottom","top"];function wv(e,t,n){switch(e){case"top":case"bottom":return n?t?rd:nd:t?nd:rd;case"left":case"right":return t?vv:xv;default:return[]}}function bv(e,t,n,r){const o=rl(e);let l=wv(In(e),n==="start",r);return o&&(l=l.map(s=>s+"-"+o),t&&(l=l.concat(l.map(Aa)))),l}function vs(e){const t=In(e);return hv[t]+e.slice(t.length)}function Sv(e){return{top:0,right:0,bottom:0,left:0,...e}}function kv(e){return typeof e!="number"?Sv(e):{top:e,right:e,bottom:e,left:e}}function xs(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}/*!
|
|
54
|
-
* tabbable 6.4.0
|
|
55
|
-
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
56
|
-
*/var Cv=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],La=Cv.join(","),cm=typeof Element>"u",Yo=cm?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ws=!cm&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},bs=function(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),l=o===""||o==="true",s=l||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):bs(t.parentNode));return s},jv=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},Ev=function(t,n,r){if(bs(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(La));return n&&Yo.call(t,La)&&o.unshift(t),o=o.filter(r),o},Ia=function(t,n,r){for(var o=[],l=Array.from(t);l.length;){var s=l.shift();if(!bs(s,!1))if(s.tagName==="SLOT"){var i=s.assignedElements(),u=i.length?i:s.children,c=Ia(u,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:s,candidates:c})}else{var d=Yo.call(s,La);d&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var m=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),f=!bs(m,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(m&&f){var g=Ia(m===!0?s.children:m.children,!0,r);r.flatten?o.push.apply(o,g):o.push({scopeParent:s,candidates:g})}else l.unshift.apply(l,s.children)}}return o},dm=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},fm=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||jv(t))&&!dm(t)?0:t.tabIndex},Tv=function(t,n){var r=fm(t);return r<0&&n&&!dm(t)?0:r},Nv=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},pm=function(t){return t.tagName==="INPUT"},Rv=function(t){return pm(t)&&t.type==="hidden"},Pv=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},_v=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},Av=function(t){if(!t.name)return!0;var n=t.form||ws(t),r=function(i){return n.querySelectorAll('input[type="radio"][name="'+i+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var l=_v(o,t.form);return!l||l===t},Lv=function(t){return pm(t)&&t.type==="radio"},Iv=function(t){return Lv(t)&&!Av(t)},Ov=function(t){var n,r=t&&ws(t),o=(n=r)===null||n===void 0?void 0:n.host,l=!1;if(r&&r!==t){var s,i,u;for(l=!!((s=o)!==null&&s!==void 0&&(i=s.ownerDocument)!==null&&i!==void 0&&i.contains(o)||t!=null&&(u=t.ownerDocument)!==null&&u!==void 0&&u.contains(t));!l&&o;){var c,d,m;r=ws(o),o=(c=r)===null||c===void 0?void 0:c.host,l=!!((d=o)!==null&&d!==void 0&&(m=d.ownerDocument)!==null&&m!==void 0&&m.contains(o))}}return l},od=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},Dv=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var l=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!l}if(getComputedStyle(t).visibility==="hidden")return!0;var s=Yo.call(t,"details>summary:first-of-type"),i=s?t.parentElement:t;if(Yo.call(i,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof o=="function"){for(var u=t;t;){var c=t.parentElement,d=ws(t);if(c&&!c.shadowRoot&&o(c)===!0)return od(t);t.assignedSlot?t=t.assignedSlot:!c&&d!==t.ownerDocument?t=d.host:t=c}t=u}if(Ov(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return od(t);return!1},Mv=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return Yo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},zv=function(t,n){return!(n.disabled||Rv(n)||Dv(n,t)||Pv(n)||Mv(n))},ld=function(t,n){return!(Iv(n)||fm(n)<0||!zv(t,n))},$v=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},mm=function(t){var n=[],r=[];return t.forEach(function(o,l){var s=!!o.scopeParent,i=s?o.scopeParent:o,u=Tv(i,s),c=s?mm(o.candidates):i;u===0?s?n.push.apply(n,c):n.push(i):r.push({documentOrder:l,tabIndex:u,item:o,isScope:s,content:c})}),r.sort(Nv).reduce(function(o,l){return l.isScope?o.push.apply(o,l.content):o.push(l.content),o},[]).concat(n)},hm=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Ia([t],n.includeContainer,{filter:ld.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:$v}):r=Ev(t,n.includeContainer,ld.bind(null,n)),mm(r)};function Kv(){return/apple/i.test(navigator.vendor)}function Fv(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function Oa(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Pa(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function go(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Si(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function Wv(e){return e.matches("html,body")}function Qo(e){return(e==null?void 0:e.ownerDocument)||document}function $l(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var l;return o.parentId===t&&(!n||((l=o.context)==null?void 0:l.open))}).flatMap(o=>[o,...$l(e,o.id,n)])}function Vv(e){return"nativeEvent"in e}var Hv=typeof document<"u",Bv=function(){},Jn=Hv?b.useLayoutEffect:Bv;const Uv={...Hd},Gv=Uv.useInsertionEffect,Yv=Gv||(e=>e());function vr(e){const t=b.useRef(()=>{});return Yv(()=>{t.current=e}),b.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const gm=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function ym(e,t){const n=hm(e,gm()),r=n.length;if(r===0)return;const o=Fv(Qo(e)),l=n.indexOf(o),s=l===-1?t===1?0:r-1:l+t;return n[s]}function Qv(e){return ym(Qo(e).body,1)||e}function Xv(e){return ym(Qo(e).body,-1)||e}function ki(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Oa(n,r)}function Zv(e){hm(e,gm()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function sd(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function id(e,t,n){let{reference:r,floating:o}=e;const l=Jt(t),s=um(t),i=am(s),u=In(t),c=l==="y",d=r.x+r.width/2-o.width/2,m=r.y+r.height/2-o.height/2,f=r[i]/2-o[i]/2;let g;switch(u){case"top":g={x:d,y:r.y-o.height};break;case"bottom":g={x:d,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:m};break;case"left":g={x:r.x-o.width,y:m};break;default:g={x:r.x,y:r.y}}switch(rl(t)){case"start":g[s]-=f*(n&&c?-1:1);break;case"end":g[s]+=f*(n&&c?-1:1);break}return g}async function Jv(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:l,rects:s,elements:i,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:m="floating",altBoundary:f=!1,padding:g=0}=nl(t,e),v=kv(g),S=i[f?m==="floating"?"reference":"floating":m],h=xs(await l.getClippingRect({element:(n=await(l.isElement==null?void 0:l.isElement(S)))==null||n?S:S.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(i.floating)),boundary:c,rootBoundary:d,strategy:u})),p=m==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,y=await(l.getOffsetParent==null?void 0:l.getOffsetParent(i.floating)),x=await(l.isElement==null?void 0:l.isElement(y))?await(l.getScale==null?void 0:l.getScale(y))||{x:1,y:1}:{x:1,y:1},j=xs(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:p,offsetParent:y,strategy:u}):p);return{top:(h.top-j.top+v.top)/x.y,bottom:(j.bottom-h.bottom+v.bottom)/x.y,left:(h.left-j.left+v.left)/x.x,right:(j.right-h.right+v.right)/x.x}}const qv=50,ex=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:l=[],platform:s}=n,i=s.detectOverflow?s:{...s,detectOverflow:Jv},u=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:m}=id(c,r,u),f=r,g=0;const v={};for(let w=0;w<l.length;w++){const S=l[w];if(!S)continue;const{name:h,fn:p}=S,{x:y,y:x,data:j,reset:k}=await p({x:d,y:m,initialPlacement:r,placement:f,strategy:o,middlewareData:v,rects:c,platform:i,elements:{reference:e,floating:t}});d=y??d,m=x??m,v[h]={...v[h],...j},k&&g<qv&&(g++,typeof k=="object"&&(k.placement&&(f=k.placement),k.rects&&(c=k.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):k.rects),{x:d,y:m}=id(c,f,u)),w=-1)}return{x:d,y:m,placement:f,strategy:o,middlewareData:v}},tx=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:l,rects:s,initialPlacement:i,platform:u,elements:c}=t,{mainAxis:d=!0,crossAxis:m=!0,fallbackPlacements:f,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:w=!0,...S}=nl(e,t);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const h=In(o),p=Jt(i),y=In(i)===i,x=await(u.isRTL==null?void 0:u.isRTL(c.floating)),j=f||(y||!w?[vs(i)]:yv(i)),k=v!=="none";!f&&k&&j.push(...bv(i,w,v,x));const C=[i,...j],T=await u.detectOverflow(t,S),M=[];let _=((r=l.flip)==null?void 0:r.overflows)||[];if(d&&M.push(T[h]),m){const I=gv(o,s,x);M.push(T[I[0]],T[I[1]])}if(_=[..._,{placement:o,overflows:M}],!M.every(I=>I<=0)){var F,z;const I=(((F=l.flip)==null?void 0:F.index)||0)+1,J=C[I];if(J&&(!(m==="alignment"?p!==Jt(J):!1)||_.every(N=>Jt(N.placement)===p?N.overflows[0]>0:!0)))return{data:{index:I,overflows:_},reset:{placement:J}};let W=(z=_.filter(le=>le.overflows[0]<=0).sort((le,N)=>le.overflows[1]-N.overflows[1])[0])==null?void 0:z.placement;if(!W)switch(g){case"bestFit":{var R;const le=(R=_.filter(N=>{if(k){const L=Jt(N.placement);return L===p||L==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(L=>L>0).reduce((L,P)=>L+P,0)]).sort((N,L)=>N[1]-L[1])[0])==null?void 0:R[0];le&&(W=le);break}case"initialPlacement":W=i;break}if(o!==W)return{reset:{placement:W}}}return{}}}},nx=new Set(["left","top"]);async function rx(e,t){const{placement:n,platform:r,elements:o}=e,l=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=In(n),i=rl(n),u=Jt(n)==="y",c=nx.has(s)?-1:1,d=l&&u?-1:1,m=nl(t,e);let{mainAxis:f,crossAxis:g,alignmentAxis:v}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return i&&typeof v=="number"&&(g=i==="end"?v*-1:v),u?{x:g*d,y:f*c}:{x:f*c,y:g*d}}const ox=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:l,placement:s,middlewareData:i}=t,u=await rx(t,e);return s===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:l+u.y,data:{...u,placement:s}}}}},lx=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:l}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:u={fn:h=>{let{x:p,y}=h;return{x:p,y}}},...c}=nl(e,t),d={x:n,y:r},m=await l.detectOverflow(t,c),f=Jt(In(o)),g=im(f);let v=d[g],w=d[f];if(s){const h=g==="y"?"top":"left",p=g==="y"?"bottom":"right",y=v+m[h],x=v-m[p];v=td(y,v,x)}if(i){const h=f==="y"?"top":"left",p=f==="y"?"bottom":"right",y=w+m[h],x=w-m[p];w=td(y,w,x)}const S=u.fn({...t,[g]:v,[f]:w});return{...S,data:{x:S.x-n,y:S.y-r,enabled:{[g]:s,[f]:i}}}}}},sx=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:l,platform:s,elements:i}=t,{apply:u=()=>{},...c}=nl(e,t),d=await s.detectOverflow(t,c),m=In(o),f=rl(o),g=Jt(o)==="y",{width:v,height:w}=l.floating;let S,h;m==="top"||m==="bottom"?(S=m,h=f===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(h=m,S=f==="end"?"top":"bottom");const p=w-d.top-d.bottom,y=v-d.left-d.right,x=Qr(w-d[S],p),j=Qr(v-d[h],y),k=!t.middlewareData.shift;let C=x,T=j;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(T=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=p),k&&!f){const _=at(d.left,0),F=at(d.right,0),z=at(d.top,0),R=at(d.bottom,0);g?T=v-2*(_!==0||F!==0?_+F:at(d.left,d.right)):C=w-2*(z!==0||R!==0?z+R:at(d.top,d.bottom))}await u({...t,availableWidth:T,availableHeight:C});const M=await s.getDimensions(i.floating);return v!==M.width||w!==M.height?{reset:{rects:!0}}:{}}}};function vm(e){const t=kt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=$t(e),l=o?e.offsetWidth:n,s=o?e.offsetHeight:r,i=ys(n)!==l||ys(r)!==s;return i&&(n=l,r=s),{width:n,height:r,$:i}}function Mu(e){return Ne(e)?e:e.contextElement}function $r(e){const t=Mu(e);if(!$t(t))return Dt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:l}=vm(t);let s=(l?ys(n.width):n.width)/r,i=(l?ys(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const ix=Dt(0);function xm(e){const t=dt(e);return!Fs()||!t.visualViewport?ix:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ax(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==dt(e)?!1:t}function or(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),l=Mu(e);let s=Dt(1);t&&(r?Ne(r)&&(s=$r(r)):s=$r(e));const i=ax(l,n,r)?xm(l):Dt(0);let u=(o.left+i.x)/s.x,c=(o.top+i.y)/s.y,d=o.width/s.x,m=o.height/s.y;if(l){const f=dt(l),g=r&&Ne(r)?dt(r):r;let v=f,w=_a(v);for(;w&&r&&g!==v;){const S=$r(w),h=w.getBoundingClientRect(),p=kt(w),y=h.left+(w.clientLeft+parseFloat(p.paddingLeft))*S.x,x=h.top+(w.clientTop+parseFloat(p.paddingTop))*S.y;u*=S.x,c*=S.y,d*=S.x,m*=S.y,u+=y,c+=x,v=dt(w),w=_a(v)}}return xs({width:d,height:m,x:u,y:c})}function Vs(e,t){const n=Ws(e).scrollLeft;return t?t.left+n:or(zt(e)).left+n}function wm(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Vs(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function ux(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const l=o==="fixed",s=zt(r),i=t?Ks(t.floating):!1;if(r===s||i&&l)return n;let u={scrollLeft:0,scrollTop:0},c=Dt(1);const d=Dt(0),m=$t(r);if((m||!m&&!l)&&((qr(r)!=="body"||tl(s))&&(u=Ws(r)),m)){const g=or(r);c=$r(r),d.x=g.x+r.clientLeft,d.y=g.y+r.clientTop}const f=s&&!m&&!l?wm(s,u):Dt(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+d.x+f.x,y:n.y*c.y-u.scrollTop*c.y+d.y+f.y}}function cx(e){return Array.from(e.getClientRects())}function dx(e){const t=zt(e),n=Ws(e),r=e.ownerDocument.body,o=at(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),l=at(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Vs(e);const i=-n.scrollTop;return kt(r).direction==="rtl"&&(s+=at(t.clientWidth,r.clientWidth)-o),{width:o,height:l,x:s,y:i}}const ad=25;function fx(e,t){const n=dt(e),r=zt(e),o=n.visualViewport;let l=r.clientWidth,s=r.clientHeight,i=0,u=0;if(o){l=o.width,s=o.height;const d=Fs();(!d||d&&t==="fixed")&&(i=o.offsetLeft,u=o.offsetTop)}const c=Vs(r);if(c<=0){const d=r.ownerDocument,m=d.body,f=getComputedStyle(m),g=d.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,v=Math.abs(r.clientWidth-m.clientWidth-g);v<=ad&&(l-=v)}else c<=ad&&(l+=c);return{width:l,height:s,x:i,y:u}}function px(e,t){const n=or(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,l=$t(e)?$r(e):Dt(1),s=e.clientWidth*l.x,i=e.clientHeight*l.y,u=o*l.x,c=r*l.y;return{width:s,height:i,x:u,y:c}}function ud(e,t,n){let r;if(t==="viewport")r=fx(e,n);else if(t==="document")r=dx(zt(e));else if(Ne(t))r=px(t,n);else{const o=xm(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return xs(r)}function bm(e,t){const n=sn(e);return n===t||!Ne(n)||en(n)?!1:kt(n).position==="fixed"||bm(n,t)}function mx(e,t){const n=t.get(e);if(n)return n;let r=_n(e,[],!1).filter(i=>Ne(i)&&qr(i)!=="body"),o=null;const l=kt(e).position==="fixed";let s=l?sn(e):e;for(;Ne(s)&&!en(s);){const i=kt(s),u=Du(s);!u&&i.position==="fixed"&&(o=null),(l?!u&&!o:!u&&i.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||tl(s)&&!u&&bm(e,s))?r=r.filter(d=>d!==s):o=i,s=sn(s)}return t.set(e,r),r}function hx(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Ks(t)?[]:mx(t,this._c):[].concat(n),r],i=ud(t,s[0],o);let u=i.top,c=i.right,d=i.bottom,m=i.left;for(let f=1;f<s.length;f++){const g=ud(t,s[f],o);u=at(g.top,u),c=Qr(g.right,c),d=Qr(g.bottom,d),m=at(g.left,m)}return{width:c-m,height:d-u,x:m,y:u}}function gx(e){const{width:t,height:n}=vm(e);return{width:t,height:n}}function yx(e,t,n){const r=$t(t),o=zt(t),l=n==="fixed",s=or(e,!0,l,t);let i={scrollLeft:0,scrollTop:0};const u=Dt(0);function c(){u.x=Vs(o)}if(r||!r&&!l)if((qr(t)!=="body"||tl(o))&&(i=Ws(t)),r){const g=or(t,!0,l,t);u.x=g.x+t.clientLeft,u.y=g.y+t.clientTop}else o&&c();l&&!r&&o&&c();const d=o&&!r&&!l?wm(o,i):Dt(0),m=s.left+i.scrollLeft-u.x-d.x,f=s.top+i.scrollTop-u.y-d.y;return{x:m,y:f,width:s.width,height:s.height}}function Ci(e){return kt(e).position==="static"}function cd(e,t){if(!$t(e)||kt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return zt(e)===n&&(n=n.ownerDocument.body),n}function Sm(e,t){const n=dt(e);if(Ks(e))return n;if(!$t(e)){let o=sn(e);for(;o&&!en(o);){if(Ne(o)&&!Ci(o))return o;o=sn(o)}return n}let r=cd(e,t);for(;r&&dv(r)&&Ci(r);)r=cd(r,t);return r&&en(r)&&Ci(r)&&!Du(r)?n:r||mv(e)||n}const vx=async function(e){const t=this.getOffsetParent||Sm,n=this.getDimensions,r=await n(e.floating);return{reference:yx(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function xx(e){return kt(e).direction==="rtl"}const wx={convertOffsetParentRelativeRectToViewportRelativeRect:ux,getDocumentElement:zt,getClippingRect:hx,getOffsetParent:Sm,getElementRects:vx,getClientRects:cx,getDimensions:gx,getScale:$r,isElement:Ne,isRTL:xx};function km(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function bx(e,t){let n=null,r;const o=zt(e);function l(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function s(i,u){i===void 0&&(i=!1),u===void 0&&(u=1),l();const c=e.getBoundingClientRect(),{left:d,top:m,width:f,height:g}=c;if(i||t(),!f||!g)return;const v=kl(m),w=kl(o.clientWidth-(d+f)),S=kl(o.clientHeight-(m+g)),h=kl(d),y={rootMargin:-v+"px "+-w+"px "+-S+"px "+-h+"px",threshold:at(0,Qr(1,u))||1};let x=!0;function j(k){const C=k[0].intersectionRatio;if(C!==u){if(!x)return s();C?s(!1,C):r=setTimeout(()=>{s(!1,1e-7)},1e3)}C===1&&!km(c,e.getBoundingClientRect())&&s(),x=!1}try{n=new IntersectionObserver(j,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(j,y)}n.observe(e)}return s(!0),l}function an(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:l=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,c=Mu(e),d=o||l?[...c?_n(c):[],...t?_n(t):[]]:[];d.forEach(h=>{o&&h.addEventListener("scroll",n,{passive:!0}),l&&h.addEventListener("resize",n)});const m=c&&i?bx(c,n):null;let f=-1,g=null;s&&(g=new ResizeObserver(h=>{let[p]=h;p&&p.target===c&&g&&t&&(g.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var y;(y=g)==null||y.observe(t)})),n()}),c&&!u&&g.observe(c),t&&g.observe(t));let v,w=u?or(e):null;u&&S();function S(){const h=or(e);w&&!km(w,h)&&n(),w=h,v=requestAnimationFrame(S)}return n(),()=>{var h;d.forEach(p=>{o&&p.removeEventListener("scroll",n),l&&p.removeEventListener("resize",n)}),m==null||m(),(h=g)==null||h.disconnect(),g=null,u&&cancelAnimationFrame(v)}}const Sx=ox,kx=lx,Cx=tx,jx=sx,Ex=(e,t,n)=>{const r=new Map,o={platform:wx,...n},l={...o.platform,_c:r};return ex(e,t,{...o,platform:l})};var Tx=typeof document<"u",Nx=function(){},Kl=Tx?b.useLayoutEffect:Nx;function Ss(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,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ss(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const l=o[r];if(!(l==="_owner"&&e.$$typeof)&&!Ss(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function Cm(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function dd(e,t){const n=Cm(e);return Math.round(t*n)/n}function ji(e){const t=b.useRef(e);return Kl(()=>{t.current=e}),t}function Rx(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:l,floating:s}={},transform:i=!0,whileElementsMounted:u,open:c}=e,[d,m]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,g]=b.useState(r);Ss(f,r)||g(r);const[v,w]=b.useState(null),[S,h]=b.useState(null),p=b.useCallback(N=>{N!==k.current&&(k.current=N,w(N))},[]),y=b.useCallback(N=>{N!==C.current&&(C.current=N,h(N))},[]),x=l||v,j=s||S,k=b.useRef(null),C=b.useRef(null),T=b.useRef(d),M=u!=null,_=ji(u),F=ji(o),z=ji(c),R=b.useCallback(()=>{if(!k.current||!C.current)return;const N={placement:t,strategy:n,middleware:f};F.current&&(N.platform=F.current),Ex(k.current,C.current,N).then(L=>{const P={...L,isPositioned:z.current!==!1};I.current&&!Ss(T.current,P)&&(T.current=P,Au.flushSync(()=>{m(P)}))})},[f,t,n,F,z]);Kl(()=>{c===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,m(N=>({...N,isPositioned:!1})))},[c]);const I=b.useRef(!1);Kl(()=>(I.current=!0,()=>{I.current=!1}),[]),Kl(()=>{if(x&&(k.current=x),j&&(C.current=j),x&&j){if(_.current)return _.current(x,j,R);R()}},[x,j,R,_,M]);const J=b.useMemo(()=>({reference:k,floating:C,setReference:p,setFloating:y}),[p,y]),W=b.useMemo(()=>({reference:x,floating:j}),[x,j]),le=b.useMemo(()=>{const N={position:n,left:0,top:0};if(!W.floating)return N;const L=dd(W.floating,d.x),P=dd(W.floating,d.y);return i?{...N,transform:"translate("+L+"px, "+P+"px)",...Cm(W.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:L,top:P}},[n,i,W.floating,d.x,d.y]);return b.useMemo(()=>({...d,update:R,refs:J,elements:W,floatingStyles:le}),[d,R,J,W,le])}const un=(e,t)=>{const n=Sx(e);return{name:n.name,fn:n.fn,options:[e,t]}},cn=(e,t)=>{const n=kx(e);return{name:n.name,fn:n.fn,options:[e,t]}},dn=(e,t)=>{const n=Cx(e);return{name:n.name,fn:n.fn,options:[e,t]}},Da=(e,t)=>{const n=jx(e);return{name:n.name,fn:n.fn,options:[e,t]}},Px="data-floating-ui-focusable",fd="active",pd="selected",_x={...Hd};let md=!1,Ax=0;const hd=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Ax++;function Lx(){const[e,t]=b.useState(()=>md?hd():void 0);return Jn(()=>{e==null&&t(hd())},[]),b.useEffect(()=>{md=!0},[]),e}const Ix=_x.useId,jm=Ix||Lx;function Ox(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const Dx=b.createContext(null),Mx=b.createContext(null),zx=()=>{var e;return((e=b.useContext(Dx))==null?void 0:e.id)||null},Em=()=>b.useContext(Mx);function zu(e){return"data-floating-ui-"+e}const $x={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},gd=b.forwardRef(function(t,n){const[r,o]=b.useState();Jn(()=>{Kv()&&o("button")},[]);const l={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[zu("focus-guard")]:"",style:$x};return a.jsx("span",{...t,...l})}),Kx={clipPath:"inset(50%)",position:"fixed",top:0,left:0},Tm=b.createContext(null),yd=zu("portal");function Fx(e){e===void 0&&(e={});const{id:t,root:n}=e,r=jm(),o=Wx(),[l,s]=b.useState(null),i=b.useRef(null);return Jn(()=>()=>{l==null||l.remove(),queueMicrotask(()=>{i.current=null})},[l]),Jn(()=>{if(!r||i.current)return;const u=t?document.getElementById(t):null;if(!u)return;const c=document.createElement("div");c.id=r,c.setAttribute(yd,""),u.appendChild(c),i.current=c,s(c)},[t,r]),Jn(()=>{if(n===null||!r||i.current)return;let u=n||(o==null?void 0:o.portalNode);u&&!Ou(u)&&(u=u.current),u=u||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,u.appendChild(c));const d=document.createElement("div");d.id=r,d.setAttribute(yd,""),u=c||u,u.appendChild(d),i.current=d,s(d)},[t,n,r,o]),l}function fn(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,l=Fx({id:n,root:r}),[s,i]=b.useState(null),u=b.useRef(null),c=b.useRef(null),d=b.useRef(null),m=b.useRef(null),f=s==null?void 0:s.modal,g=s==null?void 0:s.open,v=!!s&&!s.modal&&s.open&&o&&!!(r||l);return b.useEffect(()=>{if(!l||!o||f)return;function w(S){l&&ki(S)&&(S.type==="focusin"?sd:Zv)(l)}return l.addEventListener("focusin",w,!0),l.addEventListener("focusout",w,!0),()=>{l.removeEventListener("focusin",w,!0),l.removeEventListener("focusout",w,!0)}},[l,o,f]),b.useEffect(()=>{l&&(g||sd(l))},[g,l]),a.jsxs(Tm.Provider,{value:b.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:u,afterOutsideRef:c,beforeInsideRef:d,afterInsideRef:m,portalNode:l,setFocusManagerState:i}),[o,l]),children:[v&&l&&a.jsx(gd,{"data-type":"outside",ref:u,onFocus:w=>{if(ki(w,l)){var S;(S=d.current)==null||S.focus()}else{const h=s?s.domReference:null,p=Xv(h);p==null||p.focus()}}}),v&&l&&a.jsx("span",{"aria-owns":l.id,style:Kx}),l&&Au.createPortal(t,l),v&&l&&a.jsx(gd,{"data-type":"outside",ref:c,onFocus:w=>{if(ki(w,l)){var S;(S=m.current)==null||S.focus()}else{const h=s?s.domReference:null,p=Qv(h);p==null||p.focus(),s!=null&&s.closeOnFocusOut&&(s==null||s.onOpenChange(!1,w.nativeEvent,"focus-out"))}}})]})}const Wx=()=>b.useContext(Tm),Vx={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Hx={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},vd=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function lr(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:l}=e,{enabled:s=!0,escapeKey:i=!0,outsidePress:u=!0,outsidePressEvent:c="pointerdown",referencePress:d=!1,referencePressEvent:m="pointerdown",ancestorScroll:f=!1,bubbles:g,capture:v}=t,w=Em(),S=vr(typeof u=="function"?u:()=>!1),h=typeof u=="function"?S:u,p=b.useRef(!1),{escapeKey:y,outsidePress:x}=vd(g),{escapeKey:j,outsidePress:k}=vd(v),C=b.useRef(!1),T=vr(I=>{var J;if(!n||!s||!i||I.key!=="Escape"||C.current)return;const W=(J=l.current.floatingContext)==null?void 0:J.nodeId,le=w?$l(w.nodesRef.current,W):[];if(!y&&(I.stopPropagation(),le.length>0)){let N=!0;if(le.forEach(L=>{var P;if((P=L.context)!=null&&P.open&&!L.context.dataRef.current.__escapeKeyBubbles){N=!1;return}}),!N)return}r(!1,Vv(I)?I.nativeEvent:I,"escape-key")}),M=vr(I=>{var J;const W=()=>{var le;T(I),(le=go(I))==null||le.removeEventListener("keydown",W)};(J=go(I))==null||J.addEventListener("keydown",W)}),_=vr(I=>{var J;const W=l.current.insideReactTree;l.current.insideReactTree=!1;const le=p.current;if(p.current=!1,c==="click"&&le||W||typeof h=="function"&&!h(I))return;const N=go(I),L="["+zu("inert")+"]",P=Qo(o.floating).querySelectorAll(L);let U=Ne(N)?N:null;for(;U&&!en(U);){const je=sn(U);if(en(je)||!Ne(je))break;U=je}if(P.length&&Ne(N)&&!Wv(N)&&!Oa(N,o.floating)&&Array.from(P).every(je=>!Oa(U,je)))return;if($t(N)&&R){const je=en(N),ae=kt(N),Re=/auto|scroll/,he=je||Re.test(ae.overflowX),eo=je||Re.test(ae.overflowY),to=he&&N.clientWidth>0&&N.scrollWidth>N.clientWidth,fr=eo&&N.clientHeight>0&&N.scrollHeight>N.clientHeight,no=ae.direction==="rtl",ro=fr&&(no?I.offsetX<=N.offsetWidth-N.clientWidth:I.offsetX>N.clientWidth),Kt=to&&I.offsetY>N.clientHeight;if(ro||Kt)return}const Z=(J=l.current.floatingContext)==null?void 0:J.nodeId,Qe=w&&$l(w.nodesRef.current,Z).some(je=>{var ae;return Si(I,(ae=je.context)==null?void 0:ae.elements.floating)});if(Si(I,o.floating)||Si(I,o.domReference)||Qe)return;const $e=w?$l(w.nodesRef.current,Z):[];if($e.length>0){let je=!0;if($e.forEach(ae=>{var Re;if((Re=ae.context)!=null&&Re.open&&!ae.context.dataRef.current.__outsidePressBubbles){je=!1;return}}),!je)return}r(!1,I,"outside-press")}),F=vr(I=>{var J;const W=()=>{var le;_(I),(le=go(I))==null||le.removeEventListener(c,W)};(J=go(I))==null||J.addEventListener(c,W)});b.useEffect(()=>{if(!n||!s)return;l.current.__escapeKeyBubbles=y,l.current.__outsidePressBubbles=x;let I=-1;function J(P){r(!1,P,"ancestor-scroll")}function W(){window.clearTimeout(I),C.current=!0}function le(){I=window.setTimeout(()=>{C.current=!1},Fs()?5:0)}const N=Qo(o.floating);i&&(N.addEventListener("keydown",j?M:T,j),N.addEventListener("compositionstart",W),N.addEventListener("compositionend",le)),h&&N.addEventListener(c,k?F:_,k);let L=[];return f&&(Ne(o.domReference)&&(L=_n(o.domReference)),Ne(o.floating)&&(L=L.concat(_n(o.floating))),!Ne(o.reference)&&o.reference&&o.reference.contextElement&&(L=L.concat(_n(o.reference.contextElement)))),L=L.filter(P=>{var U;return P!==((U=N.defaultView)==null?void 0:U.visualViewport)}),L.forEach(P=>{P.addEventListener("scroll",J,{passive:!0})}),()=>{i&&(N.removeEventListener("keydown",j?M:T,j),N.removeEventListener("compositionstart",W),N.removeEventListener("compositionend",le)),h&&N.removeEventListener(c,k?F:_,k),L.forEach(P=>{P.removeEventListener("scroll",J)}),window.clearTimeout(I)}},[l,o,i,h,c,n,r,f,s,y,x,T,j,M,_,k,F]),b.useEffect(()=>{l.current.insideReactTree=!1},[l,h,c]);const z=b.useMemo(()=>({onKeyDown:T,...d&&{[Vx[m]]:I=>{r(!1,I.nativeEvent,"reference-press")},...m!=="click"&&{onClick(I){r(!1,I.nativeEvent,"reference-press")}}}}),[T,r,d,m]),R=b.useMemo(()=>{function I(J){J.button===0&&(p.current=!0)}return{onKeyDown:T,onMouseDown:I,onMouseUp:I,[Hx[c]]:()=>{l.current.insideReactTree=!0}}},[T,c,l]);return b.useMemo(()=>s?{reference:z,floating:R}:{},[s,z,R])}function Bx(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=jm(),l=b.useRef({}),[s]=b.useState(()=>Ox()),i=zx()!=null,[u,c]=b.useState(r.reference),d=vr((g,v,w)=>{l.current.openEvent=g?v:void 0,s.emit("openchange",{open:g,event:v,reason:w,nested:i}),n==null||n(g,v,w)}),m=b.useMemo(()=>({setPositionReference:c}),[]),f=b.useMemo(()=>({reference:u||r.reference||null,floating:r.floating||null,domReference:r.reference}),[u,r.reference,r.floating]);return b.useMemo(()=>({dataRef:l,open:t,onOpenChange:d,elements:f,events:s,floatingId:o,refs:m}),[t,d,f,s,o,m])}function pn(e){e===void 0&&(e={});const{nodeId:t}=e,n=Bx({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[l,s]=b.useState(null),[i,u]=b.useState(null),d=(o==null?void 0:o.domReference)||l,m=b.useRef(null),f=Em();Jn(()=>{d&&(m.current=d)},[d]);const g=Rx({...e,elements:{...o,...i&&{reference:i}}}),v=b.useCallback(y=>{const x=Ne(y)?{getBoundingClientRect:()=>y.getBoundingClientRect(),getClientRects:()=>y.getClientRects(),contextElement:y}:y;u(x),g.refs.setReference(x)},[g.refs]),w=b.useCallback(y=>{(Ne(y)||y===null)&&(m.current=y,s(y)),(Ne(g.refs.reference.current)||g.refs.reference.current===null||y!==null&&!Ne(y))&&g.refs.setReference(y)},[g.refs]),S=b.useMemo(()=>({...g.refs,setReference:w,setPositionReference:v,domReference:m}),[g.refs,w,v]),h=b.useMemo(()=>({...g.elements,domReference:d}),[g.elements,d]),p=b.useMemo(()=>({...g,...r,refs:S,elements:h,nodeId:t}),[g,S,h,t,r]);return Jn(()=>{r.dataRef.current.floatingContext=p;const y=f==null?void 0:f.nodesRef.current.find(x=>x.id===t);y&&(y.context=p)}),b.useMemo(()=>({...g,context:p,refs:S,elements:h}),[g,S,h,p])}function Ei(e,t,n){const r=new Map,o=n==="item";let l=e;if(o&&e){const{[fd]:s,[pd]:i,...u}=e;l=u}return{...n==="floating"&&{tabIndex:-1,[Px]:""},...l,...t.map(s=>{const i=s?s[n]:null;return typeof i=="function"?e?i(e):null:i}).concat(e).reduce((s,i)=>(i&&Object.entries(i).forEach(u=>{let[c,d]=u;if(!(o&&[fd,pd].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof d=="function"){var m;(m=r.get(c))==null||m.push(d),s[c]=function(){for(var f,g=arguments.length,v=new Array(g),w=0;w<g;w++)v[w]=arguments[w];return(f=r.get(c))==null?void 0:f.map(S=>S(...v)).find(S=>S!==void 0)}}}else s[c]=d}),s),{})}}function sr(e){e===void 0&&(e=[]);const t=e.map(i=>i==null?void 0:i.reference),n=e.map(i=>i==null?void 0:i.floating),r=e.map(i=>i==null?void 0:i.item),o=b.useCallback(i=>Ei(i,e,"reference"),t),l=b.useCallback(i=>Ei(i,e,"floating"),n),s=b.useCallback(i=>Ei(i,e,"item"),r);return b.useMemo(()=>({getReferenceProps:o,getFloatingProps:l,getItemProps:s}),[o,l,s])}const ir={"m-":{category:"spacing",themeKey:"spacing",valueType:"scalar",renderMode:"boxmodel",isComposite:!0,compositeRelatedPrefixes:["m-","mx-","my-","mt-","mr-","mb-","ml-","ms-","me-","p-","px-","py-","pt-","pr-","pb-","pl-","ps-","pe-","space-x-","space-y-","border-","border-t-","border-r-","border-b-","border-l-","rounded-","rounded-t-","rounded-r-","rounded-b-","rounded-l-","rounded-tl-","rounded-tr-","rounded-br-","rounded-bl-"],compositeExactMatches:["border","rounded"]},"mx-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"my-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"mt-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"mr-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"mb-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"ml-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"ms-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"me-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"p-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"px-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"py-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"pt-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"pr-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"pb-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"pl-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"ps-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"pe-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"gap-":{category:"flexbox",themeKey:"spacing",valueType:"scalar",addable:!0,controlGroup:"flex-container",propertyKey:"gap"},"gap-x-":{category:"flexbox",themeKey:"spacing",valueType:"scalar",controlGroup:"flex-container",propertyKey:"gap-x"},"gap-y-":{category:"flexbox",themeKey:"spacing",valueType:"scalar",controlGroup:"flex-container",propertyKey:"gap-y"},"space-x-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"space-y-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"w-":{category:"sizing",themeKey:"spacing",valueType:"scalar",addable:!0,propertyKey:"width"},"h-":{category:"sizing",themeKey:"spacing",valueType:"scalar",addable:!0,propertyKey:"height"},"min-w-":{category:"sizing",themeKey:"spacing",valueType:"scalar",addable:!0,propertyKey:"min-width"},"max-w-":{category:"sizing",themeKey:"spacing",valueType:"scalar",addable:!0,propertyKey:"max-width"},"min-h-":{category:"sizing",themeKey:"spacing",valueType:"scalar",addable:!0,propertyKey:"min-height"},"max-h-":{category:"sizing",themeKey:"spacing",valueType:"scalar",addable:!0,propertyKey:"max-height"},"size-":{category:"sizing",themeKey:"spacing",valueType:"scalar",addable:!0,propertyKey:"size"},"font-":{category:"typography",themeKey:"fontWeight",valueType:"scalar",addable:!0},"text-":{category:"typography",themeKey:null,valueType:"enum"},"leading-":{category:"typography",themeKey:"lineHeight",valueType:"scalar",addable:!0},"tracking-":{category:"typography",themeKey:"letterSpacing",valueType:"scalar",addable:!0},"text-left":{category:"typography",themeKey:null,valueType:"enum",addable:!0,propertyKey:"text-align",enumAlts:["text-left","text-center","text-right","text-justify","text-start","text-end"]},"text-center":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"text-align",enumAlts:["text-left","text-center","text-right","text-justify","text-start","text-end"]},"text-right":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"text-align",enumAlts:["text-left","text-center","text-right","text-justify","text-start","text-end"]},"text-justify":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"text-align",enumAlts:["text-left","text-center","text-right","text-justify","text-start","text-end"]},"text-start":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"text-align",enumAlts:["text-left","text-center","text-right","text-justify","text-start","text-end"]},"text-end":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"text-align",enumAlts:["text-left","text-center","text-right","text-justify","text-start","text-end"]},italic:{category:"typography",themeKey:null,valueType:"enum",addable:!0,propertyKey:"font-style",enumAlts:["italic","not-italic"]},"not-italic":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"font-style",enumAlts:["italic","not-italic"]},underline:{category:"typography",themeKey:null,valueType:"enum",addable:!0,propertyKey:"text-decoration",enumAlts:["underline","line-through","overline","no-underline"]},"line-through":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"text-decoration",enumAlts:["underline","line-through","overline","no-underline"]},overline:{category:"typography",themeKey:null,valueType:"enum",propertyKey:"text-decoration",enumAlts:["underline","line-through","overline","no-underline"]},"no-underline":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"text-decoration",enumAlts:["underline","line-through","overline","no-underline"]},uppercase:{category:"typography",themeKey:null,valueType:"enum",addable:!0,propertyKey:"text-transform",enumAlts:["uppercase","lowercase","capitalize","normal-case"]},lowercase:{category:"typography",themeKey:null,valueType:"enum",propertyKey:"text-transform",enumAlts:["uppercase","lowercase","capitalize","normal-case"]},capitalize:{category:"typography",themeKey:null,valueType:"enum",propertyKey:"text-transform",enumAlts:["uppercase","lowercase","capitalize","normal-case"]},"normal-case":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"text-transform",enumAlts:["uppercase","lowercase","capitalize","normal-case"]},truncate:{category:"typography",themeKey:null,valueType:"enum"},"font-sans":{category:"typography",themeKey:null,valueType:"enum",addable:!0,propertyKey:"font-family",enumAlts:["font-sans","font-serif","font-mono"]},"font-serif":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"font-family",enumAlts:["font-sans","font-serif","font-mono"]},"font-mono":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"font-family",enumAlts:["font-sans","font-serif","font-mono"]},"align-baseline":{category:"typography",themeKey:null,valueType:"enum",addable:!0,propertyKey:"vertical-align",enumAlts:["align-baseline","align-top","align-middle","align-bottom","align-text-top","align-text-bottom","align-sub","align-super"]},"align-top":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"vertical-align",enumAlts:["align-baseline","align-top","align-middle","align-bottom","align-text-top","align-text-bottom","align-sub","align-super"]},"align-middle":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"vertical-align",enumAlts:["align-baseline","align-top","align-middle","align-bottom","align-text-top","align-text-bottom","align-sub","align-super"]},"align-bottom":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"vertical-align",enumAlts:["align-baseline","align-top","align-middle","align-bottom","align-text-top","align-text-bottom","align-sub","align-super"]},"align-text-top":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"vertical-align",enumAlts:["align-baseline","align-top","align-middle","align-bottom","align-text-top","align-text-bottom","align-sub","align-super"]},"align-text-bottom":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"vertical-align",enumAlts:["align-baseline","align-top","align-middle","align-bottom","align-text-top","align-text-bottom","align-sub","align-super"]},"align-sub":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"vertical-align",enumAlts:["align-baseline","align-top","align-middle","align-bottom","align-text-top","align-text-bottom","align-sub","align-super"]},"align-super":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"vertical-align",enumAlts:["align-baseline","align-top","align-middle","align-bottom","align-text-top","align-text-bottom","align-sub","align-super"]},"bg-":{category:"color",themeKey:"colors",valueType:"color",renderMode:"gradient-editor",isComposite:!0,compositeRelatedPrefixes:["bg-","bg-gradient-to-","from-","via-","to-"]},"bg-gradient-to-":{category:"gradient",themeKey:null,valueType:"enum"},"from-":{category:"gradient",themeKey:"colors",valueType:"color"},"via-":{category:"gradient",themeKey:"colors",valueType:"color"},"to-":{category:"gradient",themeKey:"colors",valueType:"color"},"ring-":{category:"color",themeKey:"colors",valueType:"color"},"outline-":{category:"color",themeKey:"colors",valueType:"color"},"fill-":{category:"color",themeKey:"colors",valueType:"color"},"stroke-":{category:"color",themeKey:"colors",valueType:"color"},"decoration-":{category:"color",themeKey:"colors",valueType:"color"},border:{category:"borders",themeKey:"borderWidth",valueType:"scalar"},"border-":{category:"borders",themeKey:"borderWidth",valueType:"scalar"},"border-t-":{category:"borders",themeKey:"borderWidth",valueType:"scalar"},"border-r-":{category:"borders",themeKey:"borderWidth",valueType:"scalar"},"border-b-":{category:"borders",themeKey:"borderWidth",valueType:"scalar"},"border-l-":{category:"borders",themeKey:"borderWidth",valueType:"scalar"},rounded:{category:"borders",themeKey:"borderRadius",valueType:"scalar"},"rounded-":{category:"borders",themeKey:"borderRadius",valueType:"scalar"},"rounded-t-":{category:"borders",themeKey:"borderRadius",valueType:"scalar"},"rounded-r-":{category:"borders",themeKey:"borderRadius",valueType:"scalar"},"rounded-b-":{category:"borders",themeKey:"borderRadius",valueType:"scalar"},"rounded-l-":{category:"borders",themeKey:"borderRadius",valueType:"scalar"},"rounded-tl-":{category:"borders",themeKey:"borderRadius",valueType:"scalar"},"rounded-tr-":{category:"borders",themeKey:"borderRadius",valueType:"scalar"},"rounded-br-":{category:"borders",themeKey:"borderRadius",valueType:"scalar"},"rounded-bl-":{category:"borders",themeKey:"borderRadius",valueType:"scalar"},"opacity-":{category:"effects",themeKey:"opacity",valueType:"scalar",addable:!0},"shadow-":{category:"effects",themeKey:null,valueType:"enum"},block:{category:"layout",themeKey:null,valueType:"enum",addable:!0,propertyKey:"display",enumAlts:["block","inline-block","inline","flex","inline-flex","grid","inline-grid","hidden","table","contents"]},"inline-block":{category:"layout",themeKey:null,valueType:"enum",propertyKey:"display",enumAlts:["block","inline-block","inline","flex","inline-flex","grid","inline-grid","hidden","table","contents"]},inline:{category:"layout",themeKey:null,valueType:"enum",propertyKey:"display",enumAlts:["block","inline-block","inline","flex","inline-flex","grid","inline-grid","hidden","table","contents"]},grid:{category:"layout",themeKey:null,valueType:"enum",propertyKey:"display",enumAlts:["block","inline-block","inline","flex","inline-flex","grid","inline-grid","hidden","table","contents"]},"inline-grid":{category:"layout",themeKey:null,valueType:"enum",propertyKey:"display",enumAlts:["block","inline-block","inline","flex","inline-flex","grid","inline-grid","hidden","table","contents"]},hidden:{category:"layout",themeKey:null,valueType:"enum",propertyKey:"display",enumAlts:["block","inline-block","inline","flex","inline-flex","grid","inline-grid","hidden","table","contents"]},table:{category:"layout",themeKey:null,valueType:"enum",propertyKey:"display",enumAlts:["block","inline-block","inline","flex","inline-flex","grid","inline-grid","hidden","table","contents"]},contents:{category:"layout",themeKey:null,valueType:"enum",propertyKey:"display",enumAlts:["block","inline-block","inline","flex","inline-flex","grid","inline-grid","hidden","table","contents"]},static:{category:"layout",themeKey:null,valueType:"enum"},fixed:{category:"layout",themeKey:null,valueType:"enum"},absolute:{category:"layout",themeKey:null,valueType:"enum"},relative:{category:"layout",themeKey:null,valueType:"enum"},sticky:{category:"layout",themeKey:null,valueType:"enum"},"inset-":{category:"layout",themeKey:"spacing",valueType:"scalar"},"top-":{category:"layout",themeKey:"spacing",valueType:"scalar"},"right-":{category:"layout",themeKey:"spacing",valueType:"scalar"},"bottom-":{category:"layout",themeKey:"spacing",valueType:"scalar"},"left-":{category:"layout",themeKey:"spacing",valueType:"scalar"},"z-":{category:"layout",themeKey:null,valueType:"enum"},flex:{category:"layout",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"display",enumAlts:["block","inline-block","inline","flex","inline-flex","grid","inline-grid","hidden","table","contents"]},"inline-flex":{category:"layout",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"display",enumAlts:["block","inline-block","inline","flex","inline-flex","grid","inline-grid","hidden","table","contents"]},"flex-row":{category:"flexbox",themeKey:null,valueType:"enum",addable:!0,controlGroup:"flex-container",propertyKey:"flex-direction",enumAlts:["flex-row","flex-col","flex-row-reverse","flex-col-reverse"]},"flex-col":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"flex-direction",enumAlts:["flex-row","flex-col","flex-row-reverse","flex-col-reverse"]},"flex-row-reverse":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"flex-direction",enumAlts:["flex-row","flex-col","flex-row-reverse","flex-col-reverse"]},"flex-col-reverse":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"flex-direction",enumAlts:["flex-row","flex-col","flex-row-reverse","flex-col-reverse"]},"flex-wrap":{category:"flexbox",themeKey:null,valueType:"enum",addable:!0,controlGroup:"flex-container",propertyKey:"flex-wrap",enumAlts:["flex-wrap","flex-nowrap","flex-wrap-reverse"]},"flex-nowrap":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"flex-wrap",enumAlts:["flex-wrap","flex-nowrap","flex-wrap-reverse"]},"flex-wrap-reverse":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"flex-wrap",enumAlts:["flex-wrap","flex-nowrap","flex-wrap-reverse"]},"flex-1":{category:"flexbox",themeKey:null,valueType:"enum"},"flex-auto":{category:"flexbox",themeKey:null,valueType:"enum"},"flex-initial":{category:"flexbox",themeKey:null,valueType:"enum"},"flex-none":{category:"flexbox",themeKey:null,valueType:"enum"},grow:{category:"flexbox",themeKey:null,valueType:"enum"},"grow-0":{category:"flexbox",themeKey:null,valueType:"enum"},shrink:{category:"flexbox",themeKey:null,valueType:"enum"},"shrink-0":{category:"flexbox",themeKey:null,valueType:"enum"},"justify-start":{category:"flexbox",themeKey:null,valueType:"enum",addable:!0,controlGroup:"flex-container",propertyKey:"justify-content",enumAlts:["justify-start","justify-end","justify-center","justify-between","justify-around","justify-evenly","justify-stretch"]},"justify-end":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"justify-content",enumAlts:["justify-start","justify-end","justify-center","justify-between","justify-around","justify-evenly","justify-stretch"]},"justify-center":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"justify-content",enumAlts:["justify-start","justify-end","justify-center","justify-between","justify-around","justify-evenly","justify-stretch"]},"justify-between":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"justify-content",enumAlts:["justify-start","justify-end","justify-center","justify-between","justify-around","justify-evenly","justify-stretch"]},"justify-around":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"justify-content",enumAlts:["justify-start","justify-end","justify-center","justify-between","justify-around","justify-evenly","justify-stretch"]},"justify-evenly":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"justify-content",enumAlts:["justify-start","justify-end","justify-center","justify-between","justify-around","justify-evenly","justify-stretch"]},"justify-stretch":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"justify-content",enumAlts:["justify-start","justify-end","justify-center","justify-between","justify-around","justify-evenly","justify-stretch"]},"items-start":{category:"flexbox",themeKey:null,valueType:"enum",addable:!0,controlGroup:"flex-container",propertyKey:"align-items",enumAlts:["items-start","items-end","items-center","items-baseline","items-stretch"]},"items-end":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"align-items",enumAlts:["items-start","items-end","items-center","items-baseline","items-stretch"]},"items-center":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"align-items",enumAlts:["items-start","items-end","items-center","items-baseline","items-stretch"]},"items-baseline":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"align-items",enumAlts:["items-start","items-end","items-center","items-baseline","items-stretch"]},"items-stretch":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"align-items",enumAlts:["items-start","items-end","items-center","items-baseline","items-stretch"]},"content-normal":{category:"flexbox",themeKey:null,valueType:"enum",addable:!0,propertyKey:"align-content",enumAlts:["content-normal","content-start","content-end","content-center","content-between","content-around","content-evenly","content-baseline","content-stretch"]},"content-start":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"align-content",enumAlts:["content-normal","content-start","content-end","content-center","content-between","content-around","content-evenly","content-baseline","content-stretch"]},"content-end":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"align-content",enumAlts:["content-normal","content-start","content-end","content-center","content-between","content-around","content-evenly","content-baseline","content-stretch"]},"content-center":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"align-content",enumAlts:["content-normal","content-start","content-end","content-center","content-between","content-around","content-evenly","content-baseline","content-stretch"]},"content-between":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"align-content",enumAlts:["content-normal","content-start","content-end","content-center","content-between","content-around","content-evenly","content-baseline","content-stretch"]},"content-around":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"align-content",enumAlts:["content-normal","content-start","content-end","content-center","content-between","content-around","content-evenly","content-baseline","content-stretch"]},"content-evenly":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"align-content",enumAlts:["content-normal","content-start","content-end","content-center","content-between","content-around","content-evenly","content-baseline","content-stretch"]},"content-baseline":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"align-content",enumAlts:["content-normal","content-start","content-end","content-center","content-between","content-around","content-evenly","content-baseline","content-stretch"]},"content-stretch":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"align-content",enumAlts:["content-normal","content-start","content-end","content-center","content-between","content-around","content-evenly","content-baseline","content-stretch"]},"justify-items-start":{category:"flexbox",themeKey:null,valueType:"enum",addable:!0,propertyKey:"justify-items",enumAlts:["justify-items-start","justify-items-end","justify-items-center","justify-items-stretch"]},"justify-items-end":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"justify-items",enumAlts:["justify-items-start","justify-items-end","justify-items-center","justify-items-stretch"]},"justify-items-center":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"justify-items",enumAlts:["justify-items-start","justify-items-end","justify-items-center","justify-items-stretch"]},"justify-items-stretch":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"justify-items",enumAlts:["justify-items-start","justify-items-end","justify-items-center","justify-items-stretch"]},"self-auto":{category:"flexbox",themeKey:null,valueType:"enum"},"self-start":{category:"flexbox",themeKey:null,valueType:"enum"},"self-end":{category:"flexbox",themeKey:null,valueType:"enum"},"self-center":{category:"flexbox",themeKey:null,valueType:"enum"},"self-stretch":{category:"flexbox",themeKey:null,valueType:"enum"},"self-baseline":{category:"flexbox",themeKey:null,valueType:"enum"},"basis-":{category:"flexbox",themeKey:"spacing",valueType:"scalar"},"grid-cols-":{category:"flexbox",themeKey:null,valueType:"enum"},"grid-rows-":{category:"flexbox",themeKey:null,valueType:"enum"},"col-span-":{category:"flexbox",themeKey:null,valueType:"enum"},"row-span-":{category:"flexbox",themeKey:null,valueType:"enum"},"order-":{category:"flexbox",themeKey:null,valueType:"enum"}},Ux=(()=>{const e=new Map;for(const[t,n]of Object.entries(ir)){if(!n.controlGroup)continue;const r=n.propertyKey??t.replace(/-$/g,"");e.has(n.controlGroup)||e.set(n.controlGroup,new Set),e.get(n.controlGroup).add(r)}return e})(),Gx=(()=>{const e=new Map;for(const[t,n]of Object.entries(ir))n.controlGroup&&(e.has(n.controlGroup)||e.set(n.controlGroup,new Set),e.get(n.controlGroup).add(t));return e})();function Yx(){const e={};for(const[t,n]of Object.entries(ir))if(n.valueType==="enum"&&n.enumAlts){const r=n.propertyKey??t.replace(/-$/g,"");for(const o of n.enumAlts)e[o]||(e[o]={alternatives:n.enumAlts,propertyKey:r})}return e}function Qx(){const e={spacing:[],sizing:[],typography:[],color:[],borders:[],effects:[],layout:[],flexbox:[],gradient:[]},t=new Set;for(const[n,r]of Object.entries(ir)){if(!r.addable)continue;const o=r.propertyKey??n.replace(/-$/g,"");if(t.has(o))continue;t.add(o);const l=o.replace(/-/g," ").replace(/\b\w/g,i=>i.toUpperCase()),s=r.enumAlts?r.enumAlts.slice(0,2).join("/")+(r.enumAlts.length>2?"/…":""):`${n}*`;e[r.category].push({name:l,prefixHint:s,prefix:n})}return e}function Fl({prefix:e,currentValue:t,colors:n,locked:r,lockedValue:o,onHover:l,onLeave:s,onClick:i,onRemove:u,onRemoveHover:c}){return a.jsxs("div",{className:"p-2 bg-bv-surface border border-bv-border rounded-md my-2",onMouseLeave:()=>{r||s()},children:[a.jsxs("div",{className:"flex items-center gap-0.5 mb-0.5",children:[a.jsx("span",{className:"w-[52px] text-[10px] text-bv-muted text-right pr-1.5 shrink-0"}),u&&a.jsx("div",{title:"Remove class",className:`w-5 h-5 rounded cursor-pointer border-2 shrink-0 transition-[border-color,transform] flex items-center justify-center ${t===""?"outline outline-2 outline-offset-2 outline-bv-orange border-transparent":"border-transparent hover:border-bv-orange hover:scale-110"}`,onMouseEnter:()=>{!r&&c&&c()},onClick:u,children:a.jsxs("svg",{viewBox:"0 0 10 10",width:"14",height:"14",xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("line",{x1:"1",y1:"1",x2:"9",y2:"9",stroke:"#F5532D",strokeWidth:"1.8",strokeLinecap:"round"}),a.jsx("line",{x1:"9",y1:"1",x2:"1",y2:"9",stroke:"#F5532D",strokeWidth:"1.8",strokeLinecap:"round"})]})}),["black","white","transparent"].map(d=>n[d]!==void 0?a.jsx(xd,{prefix:e,colorName:d,colorValue:n[d],isCurrent:d===t,isLocked:o===`${e}${d}`,locked:r,onHover:l,onClick:i},d):null)]}),Ey.map(d=>{const m=n[d];return!m||typeof m!="object"?null:a.jsxs("div",{className:"flex items-center gap-0.5 mb-0.5",children:[a.jsx("span",{className:"w-[52px] text-[10px] text-bv-muted text-right pr-1.5 shrink-0",children:d}),Ty.map(f=>m[f]!==void 0?a.jsx(xd,{prefix:e,colorName:`${d}-${f}`,colorValue:m[f],isCurrent:`${d}-${f}`===t,isLocked:o===`${e}${d}-${f}`,locked:r,onHover:l,onClick:i},`${d}-${f}`):null)]},d)})]})}function xd({prefix:e,colorName:t,colorValue:n,isCurrent:r,isLocked:o,locked:l,onHover:s,onClick:i}){const u=`${e}${t}`,c=o?"outline outline-2 outline-offset-2 outline-bv-teal border-transparent":r?"outline outline-2 outline-offset-2 outline-bv-orange border-transparent":l?"border-transparent":"border-transparent hover:border-bv-text hover:scale-110 hover:z-10",d=t==="transparent"?{background:"repeating-conic-gradient(#808080 0% 25%, transparent 0% 50%) 50% / 8px 8px"}:{backgroundColor:n};return a.jsx("div",{title:u,className:`w-5 h-5 rounded cursor-pointer border-2 shrink-0 transition-[border-color,transform] ${c}`,style:d,onMouseEnter:()=>{l||s(u)},onClick:m=>{m.stopPropagation(),i(u)}})}const dr=b.forwardRef(function({onClose:t,children:n,...r},o){const l=b.useRef(null);return b.useEffect(()=>{var s;(s=l.current)==null||s.focus({preventScroll:!0})},[]),a.jsx("div",{ref:s=>{l.current=s,typeof o=="function"?o(s):o&&(o.current=s)},tabIndex:-1,onBlur:s=>{var i;(i=l.current)!=null&&i.contains(s.relatedTarget)||t()},onKeyDown:s=>{s.code==="Escape"&&t()},...r,children:n})}),Xx=4,Zx=10;function vn({values:e,currentValue:t,lockedValue:n,locked:r,ghost:o,onStart:l,onHover:s,onLeave:i,onClick:u,onRemove:c,onRemoveHover:d}){const[m,f]=b.useState(!1),[g,v]=b.useState(null),w=b.useRef(null),S=b.useRef(null),h=b.useRef(null),{refs:p,floatingStyles:y}=pn({open:m,strategy:"fixed",placement:"bottom-start",middleware:[un(2),dn(),cn({padding:4})],whileElementsMounted:an}),x=n!==null&&e.includes(n),j=g!==null?e[g]:x?n:t;b.useEffect(()=>{var z,R;m&&h.current&&((R=(z=h.current).scrollIntoView)==null||R.call(z,{block:"nearest"}))},[m]);const k=r&&!x;function C(z){if(k)return;l==null||l();const R=x?n:t,I=e.indexOf(R);w.current={startX:z.clientX,startIndex:I>=0?I:0,didScrub:!1},z.currentTarget.setPointerCapture(z.pointerId),z.preventDefault()}function T(z){const R=w.current;if(!R)return;const I=z.clientX-R.startX;if(!R.didScrub&&Math.abs(I)>Xx&&(R.didScrub=!0,f(!1)),R.didScrub){const J=Math.round(I/Zx),W=Math.max(0,Math.min(e.length-1,R.startIndex+J));v(W),s(e[W])}}function M(){const z=w.current;z&&(z.didScrub&&g!==null?u(e[g]):z.didScrub||f(R=>(R&&i(),!R)),v(null),w.current=null)}const _=g!==null,F=_?"bg-bv-teal/9 text-bv-teal ring-1 ring-bv-teal":x?"bg-bv-surface-hi text-bv-text ring-1 ring-bv-border hover:bg-bv-teal/9 hover:text-bv-teal hover:ring-bv-teal":m?"bg-bv-surface-hi text-bv-text ring-1 ring-bv-border":k?"bg-bv-surface text-bv-text-mid":o?"border border-dashed border-bv-border text-bv-muted bg-transparent hover:border-bv-teal hover:text-bv-teal":"bg-bv-surface text-bv-text-mid hover:bg-bv-surface-hi hover:text-bv-text";return a.jsxs("div",{ref:S,className:"relative inline-block",children:[a.jsxs("div",{ref:p.setReference,className:`group select-none px-2 py-0.5 rounded-md text-[11px] font-mono transition-colors ${k?"cursor-default":"cursor-ew-resize"} ${F}`,onPointerDown:C,onPointerMove:T,onPointerUp:M,children:[!k&&a.jsx("span",{className:`inline-block mr-0.5 text-[9px] transition-opacity ${_?"opacity-100":"opacity-0 group-hover:opacity-50"}`,children:"‹"}),j,!k&&a.jsx("span",{className:`inline-block ml-0.5 text-[9px] transition-opacity ${_?"opacity-100":"opacity-0 group-hover:opacity-50"}`,children:"›"})]}),m&&a.jsx(fn,{children:a.jsxs(dr,{ref:p.setFloating,style:y,className:"z-50 max-h-52 overflow-y-auto bg-bv-bg border border-bv-border rounded-md shadow-md min-w-[5rem]",onPointerDown:z=>z.stopPropagation(),onMouseLeave:i,onClose:()=>{f(!1),i()},children:[c&&a.jsxs("div",{className:`flex items-center gap-1.5 px-2.5 py-[3px] text-[11px] font-mono cursor-pointer border-b border-bv-border text-bv-muted hover:text-red-400 ${t===""||n===""?"text-bv-orange":""}`,onMouseEnter:d,onClick:z=>{z.stopPropagation(),c(),f(!1)},children:[a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",className:"shrink-0 opacity-70",children:[a.jsx("circle",{cx:"6",cy:"6",r:"5.5"}),a.jsx("line",{x1:"4",y1:"4",x2:"8",y2:"8"}),a.jsx("line",{x1:"8",y1:"4",x2:"4",y2:"8"})]}),"remove"]}),e.map(z=>{const R=z===(n??t),I=R?"bg-bv-teal/9 text-bv-teal":"text-bv-text-mid hover:bg-bv-surface hover:text-bv-text";return a.jsx("div",{ref:R?h:void 0,className:`px-2.5 py-[3px] text-[11px] font-mono cursor-pointer ${I}`,onMouseEnter:()=>s(z),onClick:J=>{J.stopPropagation(),u(z),f(!1)},children:z},z)})]})})]})}const Jx={px:.0625};function Ar(e){return isNaN(Number(e))?Jx[e]??1/0:Number(e)}function hr(e,t,n){return t==="spacing"&&(n!=null&&n.spacing)?Object.keys(n.spacing).sort((o,l)=>Ar(o)-Ar(l)).map(o=>`${e}${o}`):t==="fontSize"?[...xy]:t==="fontWeight"?[...wy]:t==="borderRadius"?Na:t==="lineHeight"?[...by]:t==="letterSpacing"?[...Sy]:t==="opacity"?ky:[]}const qx=4,e0=10;function Kr({placeholder:e,values:t,currentValue:n,displayValue:r,formatValue:o,axis:l="x",disabled:s,onHover:i,onLeave:u,onClick:c,onScrubStart:d,onScrubEnd:m,onOpen:f,onClose:g,onRemove:v,onRemoveHover:w}){const[S,h]=b.useState(!1),[p,y]=b.useState(null),x=b.useRef(null),j=b.useRef(null),k=b.useRef(null),{refs:C,floatingStyles:T}=pn({open:S,strategy:"fixed",placement:"bottom-start",middleware:[un(4),dn(),cn({padding:4})],whileElementsMounted:an}),M=n!=null,_=n?t.indexOf(n):-1,F=p!==null?t[p]:null,z=F?o?o(F):F:r??e;b.useEffect(()=>{var P,U;S&&k.current&&((U=(P=k.current).scrollIntoView)==null||U.call(P,{block:"nearest"}))},[S]);function R(P){var Z,Qe;if(s)return;P.preventDefault(),P.stopPropagation();const U=_>=0?_:0;x.current={startX:P.clientX,startY:P.clientY,startIndex:U,didScrub:!1},(Qe=(Z=P.target).setPointerCapture)==null||Qe.call(Z,P.pointerId)}function I(P){const U=x.current;if(!U)return;const Z=l==="y"?-(P.clientY-U.startY):P.clientX-U.startX;if(!U.didScrub&&Math.abs(Z)>qx&&(U.didScrub=!0,h(!1),d==null||d()),U.didScrub){const Qe=Math.round(Z/e0),$e=Math.max(0,Math.min(t.length-1,U.startIndex+Qe));y($e),i==null||i(t[$e])}}function J(){const P=x.current;P&&(P.didScrub&&p!==null?(c==null||c(t[p]),y(null),x.current=null,m==null||m()):P.didScrub||(y(null),x.current=null,h(U=>U?(g==null||g(),u==null||u(),!1):(f==null||f(),!0))))}const W=p!==null,N=["bm-slot",M||W?"bm-has-val":"",W?"bm-scrubbing":""].filter(Boolean).join(" "),L=s?"default":l==="y"?"ns-resize":"ew-resize";return a.jsxs("span",{ref:P=>{j.current=P,C.setReference(P)},className:N,style:{position:"relative",cursor:L},onPointerDown:R,onPointerMove:I,onPointerUp:J,role:"button",tabIndex:s?-1:0,children:[z,S&&a.jsx(fn,{children:a.jsxs(dr,{ref:C.setFloating,style:T,className:"bm-mini-dropdown",onClick:P=>P.stopPropagation(),onMouseLeave:()=>u==null?void 0:u(),onPointerDown:P=>P.stopPropagation(),onMouseDown:P=>{P.stopPropagation(),P.preventDefault()},onClose:()=>{h(!1),g==null||g(),u==null||u()},children:[v&&a.jsxs("div",{className:"bm-mini-dropdown-item bm-mini-dropdown-remove",tabIndex:-1,onMouseEnter:w,onMouseDown:P=>{P.preventDefault(),v(),h(!1),g==null||g()},children:[a.jsxs("svg",{viewBox:"0 0 10 10",width:"8",height:"8",xmlns:"http://www.w3.org/2000/svg",style:{display:"inline-block",flexShrink:0},children:[a.jsx("line",{x1:"1",y1:"1",x2:"9",y2:"9",stroke:"#F5532D",strokeWidth:"1.8",strokeLinecap:"round"}),a.jsx("line",{x1:"9",y1:"1",x2:"1",y2:"9",stroke:"#F5532D",strokeWidth:"1.8",strokeLinecap:"round"})]}),"remove"]}),t.map(P=>{const U=P===n;return a.jsx("div",{ref:U?k:void 0,tabIndex:-1,className:`bm-mini-dropdown-item${U?" bm-active":""}`,onMouseEnter:()=>i==null?void 0:i(P),onMouseDown:Z=>{Z.preventDefault(),c==null||c(P),h(!1),g==null||g()},onClick:Z=>{Z.detail===0&&(Z.stopPropagation(),c==null||c(P),h(!1),g==null||g())},onKeyDown:Z=>{(Z.key==="Enter"||Z.key===" ")&&(Z.preventDefault(),c==null||c(P),h(!1),g==null||g())},children:P},P)})]})})]})}function wd(e,t){const r={padding:"p",margin:"m",border:"border-",outline:"outline-"}[t];return e.startsWith(r)?e.slice(r.length):e}function t0({value:e,placeholder:t,layer:n,frozen:r,scaleValues:o,axis:l,onClick:s,onValueChange:i,onValueHover:u,onValueLeave:c,onScrubStart:d,onScrubEnd:m,onOpen:f,onClose:g,onValueRemove:v,onValueRemoveHover:w}){const S=e!=null,h=S?wd(e,n):null;if(o&&o.length>0)return a.jsx(Kr,{placeholder:t,values:o,currentValue:e,displayValue:h,formatValue:y=>wd(y,n),axis:l,disabled:r,onHover:u,onLeave:c,onClick:i,onScrubStart:d,onScrubEnd:m,onOpen:f,onClose:g,onRemove:v,onRemoveHover:w});const p=`bm-slot${S?" bm-has-val":""}`;return a.jsx("span",{className:p,onClick:r?void 0:y=>s==null?void 0:s(y.currentTarget),role:"button",tabIndex:r?-1:0,children:h??t})}const n0={top:["y","t"],right:["r"],bottom:["b"],left:["x","l"],tr:["color"],bl:["style"],br:["offset"]},r0={margin:["top","right","bottom","left"],outline:["top","right","bottom","left","tr","bl","br"],border:["top","right","bottom","left","tr","bl"],padding:["top","right","bottom","left"]},o0={top:"y",bottom:"y",left:"x",right:"x",tr:"x",bl:"x",br:"x"};function l0({layer:e,classState:t,shorthandValue:n,shorthandScaleValues:r,slots:o,isHovered:l,frozen:s,onHoverChange:i,onSlotClick:u,onSlotChange:c,onSlotHover:d,onScrubStart:m,onScrubEnd:f,onSlotOpen:g,onSlotClose:v,onSlotRemove:w,onSlotRemoveHover:S,children:h}){const p=`bm-layer bm-${e}${l?" bm-hovered":""}`,[y,x]=b.useState(null),j=new Map(o.map(z=>[z.key,z])),k=(t==="shorthand"||t==="mixed")&&n,C=r&&r.length>0?a.jsx("span",{className:"bm-name bm-name-scrubber",children:a.jsx(Kr,{placeholder:e,values:r,currentValue:k?n:null,displayValue:k?n:null,formatValue:z=>z,axis:"x",disabled:s,onHover:z=>d==null?void 0:d("shorthand",z),onLeave:()=>d==null?void 0:d("shorthand",null),onClick:z=>c==null?void 0:c("shorthand",z),onScrubStart:()=>{m==null||m()},onScrubEnd:f,onOpen:()=>{x("__shorthand__"),g==null||g()},onClose:()=>{x(null),v==null||v()},onRemove:w?()=>w("shorthand"):void 0,onRemoveHover:S?()=>S("shorthand"):void 0})}):k?a.jsx("span",{className:"bm-name",children:a.jsx("span",{className:"bm-val",onClick:z=>u==null?void 0:u("shorthand",z.currentTarget),children:n})}):a.jsx("span",{className:"bm-name",children:e}),M=(r0[e]??[]).map(z=>{const I=(n0[z]??[]).map(L=>j.get(L)).filter(L=>L!=null);if(I.length===0)return null;const J=I.some(L=>L.value!=null),le=`bm-slot-group bm-sg-${z}${J?" bm-has-values":""}${y===z?" bm-sg-active":""}`,N=o0[z];return a.jsx("div",{className:le,children:I.map(L=>a.jsx(t0,{slotKey:L.key,value:L.value,placeholder:L.placeholder,layer:e,isExpanded:l,frozen:s,scaleValues:L.scaleValues,axis:N,onClick:P=>u==null?void 0:u(L.key,P),onValueChange:c?P=>c(L.key,P):void 0,onValueHover:d?P=>d(L.key,P):void 0,onValueLeave:d?()=>d(L.key,null):void 0,onScrubStart:m,onScrubEnd:f,onOpen:()=>{x(z),g==null||g()},onClose:()=>{x(null),v==null||v()},onValueRemove:w?()=>w(L.key):void 0,onValueRemoveHover:S?()=>S(L.key):void 0},L.key))},z)}),_=z=>{z.stopPropagation(),s||i(!0)},F=z=>{const R=z.relatedTarget,I=z.currentTarget;R&&I.contains(R)||s||i(!1)};return a.jsxs("div",{className:p,onMouseOver:_,onMouseOut:F,"data-layer":e,children:[C,M,h]})}const bd=["margin","outline","border","padding"];function s0({layers:e,frozen:t=!1,onSlotClick:n,onSlotChange:r,onSlotHover:o,onSlotRemove:l,onSlotRemoveHover:s,onEditStart:i}){const[u,c]=b.useState(null),[d,m]=b.useState(null),f=t||d!==null,g=new Map(e.map(y=>[y.layer,y])),v=(y,x)=>{f||c(x?y:null)},w=(y,x,j)=>{f||n==null||n(y,x,j)};let h=a.jsx("div",{className:"bm-content"});for(let y=bd.length-1;y>=0;y--){const x=bd[y],j=g.get(x);j&&(h=a.jsx(l0,{layer:j.layer,classState:j.classState,shorthandValue:j.shorthandValue,shorthandScaleValues:j.shorthandScaleValues,slots:j.slots,isHovered:u===x||d===x,frozen:f,onHoverChange:k=>v(x,k),onSlotClick:(k,C)=>w(x,k,C),onSlotChange:r?(k,C)=>r(x,k,C):void 0,onSlotHover:o?(k,C)=>o(x,k,C):void 0,onSlotRemove:l?k=>l(x,k):void 0,onSlotRemoveHover:s?k=>s(x,k):void 0,onScrubStart:()=>{m(x),i==null||i()},onScrubEnd:()=>m(null),onSlotOpen:()=>{m(x),i==null||i()},onSlotClose:()=>m(null),children:h}))}const p=`bm-root${f?" bm-frozen":""}`;return a.jsx("div",{className:p,children:h})}const i0={margin:{shorthand:"m",x:"mx",y:"my",t:"mt",r:"mr",b:"mb",l:"ml"},outline:{shorthand:"outline",x:"outline-x",y:"outline-y",t:"outline-t",r:"outline-r",b:"outline-b",l:"outline-l"},border:{shorthand:"border",x:"border-x",y:"border-y",t:"border-t",r:"border-r",b:"border-b",l:"border-l"},padding:{shorthand:"p",x:"px",y:"py",t:"pt",r:"pr",b:"pb",l:"pl"}},a0=["y","t","r","b","x","l"];function u0(e){const t=a0.map(n=>({key:n,placeholder:n}));return(e==="border"||e==="outline")&&t.push({key:"color",placeholder:"color"},{key:"style",placeholder:"style"}),e==="outline"&&t.push({key:"offset",placeholder:"offset"}),t}function c0(e,t){const n=i0[e],r=u0(e),o=t[n.shorthand]??null,l=o!=null?o===""?n.shorthand:`${n.shorthand}-${o}`:null,s=r.map(({key:f,placeholder:g})=>{let v;if(f==="color"){const h=e==="outline"?"outline-color":"border-color";v=h in t?h:void 0}else if(f==="style"){const h=e==="outline"?"outline-style":"border-style";v=h in t?h:void 0}else f==="offset"?v="outline-offset"in t?"outline-offset":void 0:v=n[f];const w=v?t[v]??null:null;let S;return(f==="color"||f==="style")&&w!=null?S=`${e==="outline"?"outline":"border"}-${w}`:S=w!=null&&v?`${v}-${w}`:null,{key:f,value:S,placeholder:g}}),i=l!=null,u=s.some(f=>(f.key==="x"||f.key==="y")&&f.value!=null),c=s.some(f=>(f.key==="t"||f.key==="r"||f.key==="b"||f.key==="l")&&f.value!=null),d=u||c;let m;return!i&&!d?m="none":i&&!d?m="shorthand":!i&&u&&!c?m="axis":i?m="mixed":m="individual",{layer:e,classState:m,shorthandValue:l,slots:s}}function d0(e,t,n){var s,i,u;if(t==="color")return[];if(t==="style"){const c=e==="outline"?"outline":"border";return jy.map(d=>`${c}-${d}`)}let r;e==="border"||e==="outline"?t==="offset"?r=(s=n==null?void 0:n.theme)!=null&&s.spacing?Object.keys(n.theme.spacing).sort((c,d)=>Ar(c)-Ar(d)):Ra:r=(i=n==null?void 0:n.theme)!=null&&i.borderWidth?Object.keys(n.theme.borderWidth):Xp:r=(u=n==null?void 0:n.theme)!=null&&u.spacing?Object.keys(n.theme.spacing).sort((c,d)=>Ar(c)-Ar(d)):Ra;const l={margin:{shorthand:"m",t:"mt",r:"mr",b:"mb",l:"ml",x:"mx",y:"my"},padding:{shorthand:"p",t:"pt",r:"pr",b:"pb",l:"pl",x:"px",y:"py"},border:{t:"border-t",r:"border-r",b:"border-b",l:"border-l",x:"border-x",y:"border-y",offset:"outline-offset"},outline:{t:"outline-t",r:"outline-r",b:"outline-b",l:"outline-l",x:"outline-x",y:"outline-y",offset:"outline-offset"}}[e][t];return l?r.map(c=>c===""?l:`${l}-${c}`):[]}function gr(e,t){const n={};for(const s of e){let i;s.color!==void 0?i=`${s.property}-color`:s.style!==void 0?i=`${s.property}-style`:s.side!==void 0?i=s.property.length<=2?s.property+s.side:`${s.property}-${s.side}`:i=s.property;const u=s.scale??s.color??s.style??s.align??s.size??s.value??"";n[i]=u}const r={margin:"m",padding:"p",border:"border",outline:"outline"},o={margin:!1,padding:!1,border:!0,outline:!1};return["margin","outline","border","padding"].map(s=>{var m,f;const i=c0(s,n),u=i.slots.map(g=>{const v=d0(s,g.key,t);return v.length>0?{...g,scaleValues:v}:g}),d=(o[s]?(m=t==null?void 0:t.theme)!=null&&m.borderWidth?Object.keys(t.theme.borderWidth):Xp:(f=t==null?void 0:t.theme)!=null&&f.spacing?Object.keys(t.theme.spacing):Ra).map(g=>g===""?r[s]:`${r[s]}-${g}`);return{...i,slots:u,shorthandScaleValues:d}})}const f0={tl:[1,1],t:[1,2],tr:[1,3],l:[2,1],all:[2,2],r:[2,3],bl:[3,1],b:[3,2],br:[3,3]},p0={tl:"x",t:"x",tr:"x",l:"y",all:"x",r:"y",bl:"x",b:"x",br:"x"};function Ti(e){return e==="rounded"?"—":e.replace(/^rounded-/,"").replace(/^(?:tl|tr|br|bl|[trbl])-/,"")}function m0({slot:e,frozen:t,isActive:n,onSlotClick:r,onSlotChange:o,onSlotHover:l,onSlotRemove:s,onSlotRemoveHover:i,onScrubStart:u,onScrubEnd:c,onOpen:d,onClose:m}){const[f,g]=f0[e.key],v=e.value!=null,w=`cm-slot${v?" cm-has-val":""}`,S=e.key==="all"?"cm-cell cm-cell-all cm-content":`cm-cell cm-cell-${e.key}`,h={gridRow:f,gridColumn:g},p=p0[e.key];return e.scaleValues&&e.scaleValues.length>0?a.jsx("div",{className:S,style:h,children:a.jsx(Kr,{placeholder:e.placeholder,values:e.scaleValues,currentValue:e.value,displayValue:v?Ti(e.value):null,formatValue:Ti,axis:p,disabled:t,onHover:y=>l(e.key,y),onLeave:()=>l(e.key,null),onClick:y=>o(e.key,y),onScrubStart:()=>u(e.key),onScrubEnd:c,onOpen:()=>d(e.key),onClose:m,onRemove:s?()=>s(e.key):void 0,onRemoveHover:i?()=>i(e.key):void 0})}):a.jsx("div",{className:S,style:h,children:a.jsx("span",{className:w,role:"button",tabIndex:t?-1:0,onClick:t?void 0:y=>r(e.key,y.currentTarget),children:v?Ti(e.value):e.placeholder})})}function h0({state:e,frozen:t=!1,onSlotClick:n,onSlotChange:r,onSlotHover:o,onSlotRemove:l,onSlotRemoveHover:s,onEditStart:i}){const[u,c]=b.useState(null),d=t||u!==null,m=new Map(e.slots.map(w=>[w.key,w])),f=m.get("all")??{key:"all",value:e.shorthandValue,placeholder:"all",scaleValues:e.shorthandScaleValues},g=["tl","t","tr","l","all","r","bl","b","br"],v=`cm-root${d?" cm-frozen":""}${u?" cm-active":""}`;return a.jsx("div",{className:v,children:a.jsx("div",{className:"cm-grid",children:g.map(w=>{const S=w==="all"?f:m.get(w)??{key:w,value:null,placeholder:w,scaleValues:void 0};return a.jsx(m0,{slot:S,frozen:d,isActive:u===w,onSlotClick:(h,p)=>n==null?void 0:n(h,p),onSlotChange:(h,p)=>r==null?void 0:r(h,p),onSlotHover:(h,p)=>o==null?void 0:o(h,p),onSlotRemove:l,onSlotRemoveHover:s,onScrubStart:h=>{c(h),i==null||i()},onScrubEnd:()=>c(null),onOpen:h=>{c(h),i==null||i()},onClose:()=>c(null)},w)})})})}function Sd({label:e,availableProperties:t=[],onAddProperty:n,isEmpty:r=!1,classCount:o=0,children:l}){const[s,i]=b.useState(!1),[u,c]=b.useState(r),d=b.useRef(r),m=b.useRef(null);b.useEffect(()=>{d.current&&!r&&c(!1),d.current=r},[r]),b.useEffect(()=>{if(!s)return;function g(v){m.current&&!m.current.contains(v.target)&&i(!1)}return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[s]);function f(g){n==null||n(g),i(!1)}return a.jsxs("div",{className:"px-4 py-3",children:[a.jsxs("div",{className:"group/sec flex items-center gap-1.5 cursor-pointer select-none",onClick:()=>c(g=>!g),children:[a.jsx("svg",{className:`w-3 h-3 text-bv-muted transition-transform ${u?"":"rotate-90"}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 5l7 7-7 7"})}),a.jsx("span",{className:"text-[10px] font-semibold text-bv-text",children:e}),u&&o>0&&a.jsx("span",{className:"ml-1 px-1.5 py-0.5 rounded-full text-[9px] font-semibold leading-none bg-bv-teal/20 text-bv-teal tabular-nums",children:o}),t.length>0&&a.jsxs("div",{ref:m,className:"relative ml-auto",children:[a.jsx("button",{type:"button","aria-label":`Add ${e} property`,className:`w-5 h-5 flex items-center justify-center rounded transition-all cursor-pointer border-none ${s?"text-bv-text bg-bv-surface-hi":"text-bv-muted bg-transparent opacity-75 group-hover/sec:opacity-100 hover:text-bv-text hover:bg-bv-surface-hi"}`,onClick:g=>{g.stopPropagation(),i(v=>!v)},children:a.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M12 5v14m-7-7h14"})})}),s&&a.jsx(dr,{className:"absolute z-50 top-[calc(100%+2px)] right-0 bg-bv-bg border border-bv-border rounded-md shadow-[0_4px_16px_rgba(0,0,0,0.10)] min-w-[180px] max-w-[calc(100vw-16px)] py-1",onClose:()=>i(!1),children:t.map(g=>a.jsxs("button",{type:"button",className:"w-full px-2.5 py-[5px] text-[11px] font-[family-name:var(--font-ui)] text-bv-text-mid flex items-center gap-1.5 transition-colors hover:bg-bv-teal/10 hover:text-bv-teal cursor-pointer border-none bg-transparent text-left whitespace-nowrap",onClick:()=>f(g.prefix),children:[g.name,a.jsx("span",{className:"font-mono text-[10px] text-bv-muted group-hover:text-bv-teal/60",children:g.prefixHint})]},g.prefix))})]})]}),a.jsx("div",{className:`overflow-hidden transition-[max-height,opacity] duration-200 ease-in-out ${u?"max-h-0 opacity-0":"max-h-[600px] opacity-100"}`,children:r?a.jsxs("div",{className:"text-[10px] text-bv-muted italic mt-2",children:["No ",e.toLowerCase()," classes — click + to add"]}):a.jsx("div",{className:"flex flex-wrap gap-1 mt-2.5",children:l})})]})}const g0=[{dir:"tl",arrow:"↖"},{dir:"t",arrow:"↑"},{dir:"tr",arrow:"↗"},{dir:"l",arrow:"←"},"center",{dir:"r",arrow:"→"},{dir:"bl",arrow:"↙"},{dir:"b",arrow:"↓"},{dir:"br",arrow:"↘"}];function y0({direction:e,mode:t,onHover:n,onLeave:r,onDirectionClick:o,onSolidClick:l,solidColorName:s}){const i=t==="solid";return a.jsxs("div",{className:"flex flex-col items-center shrink-0",children:[a.jsx("div",{className:"grid grid-cols-3 gap-0.5",onMouseLeave:r,children:g0.map((u,c)=>{if(u==="center"){const m=i;return a.jsx("button",{type:"button",className:`w-5 h-5 rounded-[3px] flex items-center justify-center text-xs cursor-pointer transition-all duration-150
|
|
57
|
-
${m?"border-[1.5px] border-bv-teal bg-bv-teal text-white":"border-[1.5px] border-bv-border bg-bv-bg text-bv-muted hover:border-bv-teal hover:bg-bv-teal/9 hover:text-bv-teal"}`,title:"Solid color",onClick:l,children:"●"},"center")}const d=!i&&e===u.dir;return a.jsx("button",{type:"button",className:`w-5 h-5 rounded-[3px] flex items-center justify-center text-[10px] cursor-pointer transition-all duration-150
|
|
58
|
-
${i?"opacity-35 hover:opacity-100":""}
|
|
59
|
-
${d?"border-[1.5px] border-bv-teal bg-bv-teal text-white":"border-[1.5px] border-bv-border bg-bv-bg text-bv-muted hover:border-bv-teal hover:bg-bv-teal/9 hover:text-bv-teal"}`,onMouseEnter:()=>n(u.dir),onClick:()=>o(u.dir),children:u.arrow},u.dir)})}),a.jsx("div",{className:"text-[10px] font-mono text-bv-text-mid mt-0.75 max-w-[68px] truncate text-center",children:i?s?a.jsx("span",{className:"text-bv-text font-bold",children:s}):a.jsx("span",{className:"text-bv-muted italic",children:"none"}):a.jsxs("span",{children:["to-",a.jsx("span",{className:"text-bv-teal font-bold",children:e})]})})]})}function v0(e,t){const r=[...e].sort((o,l)=>(o.position??0)-(l.position??0)).map(o=>o.position!=null?`${o.hex} ${o.position}%`:o.hex);return`linear-gradient(${t}, ${r.join(", ")})`}function Ni(e){return Math.round(Math.max(0,Math.min(100,e))/5)*5}function x0({stop:e,isEndpoint:t,isSelected:n,onDragStart:r,onClick:o,onRemove:l}){const s=b.useRef(!1),i=b.useCallback(m=>{m.preventDefault(),m.stopPropagation(),s.current=!1,r(e.id,m.clientX);const f=()=>{s.current=!0},g=()=>{document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",g)};document.addEventListener("mousemove",f),document.addEventListener("mouseup",g)},[e.id,r]),u=b.useCallback(m=>{m.stopPropagation(),s.current||o(e.id,m.currentTarget)},[e.id,o]),c=b.useCallback(m=>{m.stopPropagation(),l(e.id)},[e.id,l]),d=e.position??0;return a.jsxs("div",{className:`absolute top-0 cursor-grab select-none z-10
|
|
60
|
-
hover:z-20
|
|
61
|
-
${n?"z-25":""}`,style:{left:`${d}%`,transform:"translateX(-50%)",width:22,height:26,filter:"drop-shadow(0 1px 2px rgba(0,0,0,0.2))"},onMouseDown:i,onClick:u,title:`${e.role}-${e.colorName}${e.position!=null?` ${e.position}%`:""}`,children:[a.jsx("svg",{viewBox:"0 0 22 26",width:22,height:26,xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M2 1 L20 1 L20 16 L11 25 L2 16 Z",fill:e.hex,stroke:n?"#00848B":"white",strokeWidth:n?2:1.5,strokeLinejoin:"round"})}),!t&&a.jsx("div",{className:"absolute -top-1.5 -right-1.5 w-3.5 h-3.5 rounded-full bg-bv-orange text-white text-[9px] leading-3.5 text-center cursor-pointer z-40 hidden group-hover/handle:block hover:block!",style:{display:void 0},onClick:c,onMouseDown:m=>m.stopPropagation(),children:"×"})]})}function w0({stops:e,direction:t,onStopDrag:n,onStopDragEnd:r,onStopClick:o,onBarClick:l,onStopRemove:s,selectedStopId:i}){const u=b.useRef(null),c=b.useRef(null),d=[...e].sort((v,w)=>(v.position??0)-(w.position??0)),m=b.useCallback((v,w)=>{const S=e.find(y=>y.id===v);if(!S)return;c.current={stopId:v,startX:w,startPos:S.position??0};const h=y=>{const x=c.current;if(!x||!u.current)return;const j=u.current.getBoundingClientRect(),C=(y.clientX-x.startX)/j.width*100,T=Ni(x.startPos+C);n(x.stopId,T)},p=y=>{document.removeEventListener("mousemove",h),document.removeEventListener("mouseup",p);const x=c.current;if(x&&u.current){const j=u.current.getBoundingClientRect(),C=(y.clientX-x.startX)/j.width*100,T=Ni(x.startPos+C);r(x.stopId,T)}c.current=null};document.addEventListener("mousemove",h),document.addEventListener("mouseup",p)},[e,n,r]),f=b.useCallback(v=>{if(!u.current)return;const w=u.current.getBoundingClientRect(),S=(v.clientX-w.left)/w.width*100;l(Ni(S))},[l]),g=v0(d,t);return a.jsxs("div",{className:"relative flex-1 min-w-0",style:{paddingTop:28},children:[d.map((v,w)=>a.jsx(x0,{stop:v,isEndpoint:w===0||w===d.length-1,isSelected:v.id===i,onDragStart:m,onClick:o,onRemove:s},v.id)),a.jsx("div",{ref:u,className:"h-9 rounded-md cursor-pointer relative",style:{background:g,border:"1px solid rgba(0,0,0,0.08)",boxShadow:"inset 0 1px 2px rgba(0,0,0,0.06)"},onClick:f,children:a.jsx("div",{className:"absolute inset-0 flex items-center justify-center text-lg font-bold text-white/0 hover:text-white/60 transition-colors pointer-events-none",children:"+"})})]})}const b0={t:"to top",tr:"to top right",r:"to right",br:"to bottom right",b:"to bottom",bl:"to bottom left",l:"to left",tl:"to top left"};function S0(e){var Kt,$n;const{direction:t,stops:n,mode:r,solidColorName:o,solidColorHex:l,onPreview:s,onPreviewBatch:i,onRevert:u,onStage:c}=e,[d,m]=b.useState(t),[f,g]=b.useState(n),[v,w]=b.useState(r),[S,h]=b.useState(o),[p,y]=b.useState(l),[x,j]=b.useState(null),[k,C]=b.useState(!1),[T,M]=b.useState(null),[_,F]=b.useState(null),z=b.useRef(n.length+1),R=b.useCallback(q=>{if(v==="gradient")s(`bg-gradient-to-${d}`,`bg-gradient-to-${q}`);else{const ne=S??"slate-500",oe=S?`bg-${S}`:"";i([{oldClass:oe,newClass:`bg-gradient-to-${q}`},{oldClass:"",newClass:`from-${ne}`},{oldClass:"",newClass:`to-${ne}`}])}},[d,v,S,s,i]),I=b.useCallback(()=>{u()},[u]),J=b.useCallback(q=>{if(m(q),w("gradient"),v==="gradient"&&f.length>=2){const ne=`bg-gradient-to-${d}`,oe=`bg-gradient-to-${q}`;c(ne,oe)}else{const ne=S??"slate-500",oe=p??Qn(ne,e.colors),E={id:"1",role:"from",colorName:ne,hex:oe,position:0},O={id:"2",role:"to",colorName:ne,hex:oe,position:100};z.current=3,g([E,O]);const $=S?`bg-${S}`:"";c($,`bg-gradient-to-${q}`),c("",`from-${ne}`),c("",`to-${ne}`)}},[d,v,f,S,p,e.colors,c]),W=b.useCallback(()=>{w("solid"),C(!1),j(null),M(null),f.length>0&&!S&&(h(f[0].colorName),y(f[0].hex))},[f,S]),le=b.useCallback((q,ne)=>{g(E=>E.map(O=>O.id===q?{...O,position:ne}:O));const oe=f.find(E=>E.id===q);if(oe){const E=oe.position!=null?`${oe.role}-${oe.position}%`:"",O=`${oe.role}-${ne}%`;s(E,O)}},[f,s]),N=b.useCallback((q,ne)=>{g(E=>E.map(O=>O.id===q?{...O,position:ne}:O));const oe=f.find(E=>E.id===q);if(oe){const E=oe.position!=null?`${oe.role}-${oe.position}%`:"",O=`${oe.role}-${ne}%`;c(E,O)}},[f,c]),L=b.useCallback((q,ne)=>{x===q&&k?(j(null),C(!1),M(null),F(null)):(j(q),C(!0),M("stop"),F(ne))},[x,k]),P=b.useCallback(q=>{const ne=String(z.current++),oe=[...f].sort(($,Q)=>($.position??0)-(Q.position??0));let E=oe[0];for(const $ of oe)($.position??0)<=q&&(E=$);const O={id:ne,role:"via",colorName:(E==null?void 0:E.colorName)??"gray-500",hex:(E==null?void 0:E.hex)??"#6B7280",position:q};g($=>[...$,O]),j(ne),C(!0),M("stop")},[f]),U=b.useCallback(q=>{const ne=f.find(E=>E.id===q);if(!ne)return;const oe=f.filter(E=>E.id!==q);if(j(null),C(!1),M(null),F(null),oe.length>=2)g(oe),c(`${ne.role}-${ne.colorName}`,"");else if(oe.length===1){const E=oe[0];g([]),w("solid"),h(E.colorName),y(E.hex),c(`bg-gradient-to-${d}`,""),f.forEach(O=>c(`${O.role}-${O.colorName}`,"")),c("",`bg-${E.colorName}`)}else g([]),w("none"),h(null),y(null),c(`bg-gradient-to-${d}`,""),f.forEach(E=>c(`${E.role}-${E.colorName}`,""))},[f,d,c]),Z=b.useCallback(q=>{C(!0),M("solid"),j(null),F(q)},[]),Qe=b.useCallback(()=>{s(S?`bg-${S}`:"","")},[S,s]),$e=b.useCallback(()=>{S&&c(`bg-${S}`,""),h(null),y(null),C(!1),M(null),F(null)},[S,c]),je=b.useCallback(q=>{if(T==="stop"&&x){const ne=f.find(oe=>oe.id===x);ne&&s(`${ne.role}-${ne.colorName}`,q)}else T==="solid"&&s(`bg-${S}`,q)},[T,x,f,S,s]),ae=b.useCallback(()=>{u()},[u]),Re=b.useCallback(q=>{if(T==="stop"&&x){const ne=f.find(oe=>oe.id===x);if(ne){const oe=ne.role+"-",E=q.startsWith(oe)?q.slice(oe.length):q;g(O=>O.map($=>$.id===x?{...$,colorName:E,hex:Qn(E,e.colors)}:$)),c(`${ne.role}-${ne.colorName}`,`${ne.role}-${E}`),C(!1),j(null),M(null),F(null)}}else if(T==="solid"){const ne="bg-",oe=q.startsWith(ne)?q.slice(ne.length):q,E=S?`bg-${S}`:"";h(oe),y(Qn(oe,e.colors)),c(E,`bg-${oe}`),C(!1),M(null),F(null)}},[T,x,f,S,c,e.colors]),he=b.useCallback(()=>{C(!1),j(null),M(null),F(null),u()},[u]),eo=T==="stop"&&x?(((Kt=f.find(q=>q.id===x))==null?void 0:Kt.role)??"from")+"-":"bg-",to=T==="stop"&&x?(($n=f.find(q=>q.id===x))==null?void 0:$n.colorName)??"":S??"",fr=b0[d],ro=!!(x?f.find(q=>q.id===x):null);return{direction:d,stops:f,mode:v,solidColorName:S,solidColorHex:p,selectedStopId:x,colorPickerOpen:k,editingTarget:T,anchorEl:_,colorPrefix:eo,colorPickerCurrentValue:to,directionCSS:fr,selectedStopIsRemovable:ro,handleDirectionHover:R,handleDirectionLeave:I,handleDirectionClick:J,handleSolidToggle:W,handleStopDrag:le,handleStopDragEnd:N,handleStopClick:L,handleBarClick:P,handleStopRemove:U,handleSwatchClick:Z,handleHoverRemoveSolid:Qe,handleRemoveSolid:$e,handleColorHover:je,handleColorLeave:ae,handleColorClick:Re,handleCloseColorPicker:he}}function Qn(e,t){if(typeof t[e]=="string")return t[e];const n=e.lastIndexOf("-");if(n>0){const r=e.slice(0,n),o=e.slice(n+1);if(t[r]&&typeof t[r][o]=="string")return t[r][o]}return"#888888"}function k0(e){const t=S0(e),n=t.mode==="solid",{refs:r,floatingStyles:o,context:l}=pn({open:t.colorPickerOpen,onOpenChange:u=>{u||t.handleCloseColorPicker()},strategy:"fixed",placement:"bottom-start",middleware:[un(4),dn(),cn({padding:8}),Da({apply({availableHeight:u,elements:c}){Object.assign(c.floating.style,{maxHeight:`${u}px`})},padding:8})],whileElementsMounted:an}),s=lr(l),{getFloatingProps:i}=sr([s]);return b.useEffect(()=>{t.anchorEl&&r.setReference(t.anchorEl)},[t.anchorEl]),a.jsxs("div",{className:"group",children:[a.jsxs("div",{className:"flex items-start gap-2.5 mb-2",children:[a.jsx(y0,{direction:t.direction,mode:t.mode,onHover:t.handleDirectionHover,onLeave:t.handleDirectionLeave,onDirectionClick:t.handleDirectionClick,onSolidClick:t.handleSolidToggle,solidColorName:t.solidColorName}),n?a.jsx("div",{className:"flex-1 min-w-0 self-stretch rounded-md cursor-pointer relative overflow-hidden",style:{background:t.solidColorHex??"transparent",border:"1px solid rgba(255,255,255,0.12)",boxShadow:"inset 0 1px 2px rgba(0,0,0,0.06)",minHeight:36},onClick:u=>t.handleSwatchClick(u.currentTarget),title:t.solidColorName?`bg-${t.solidColorName}`:"Click to pick color",children:!t.solidColorHex&&a.jsxs("svg",{className:"absolute inset-0 w-full h-full",viewBox:"0 0 100 100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("line",{x1:"4",y1:"4",x2:"96",y2:"96",stroke:"#F5532D",strokeWidth:"3",strokeLinecap:"round"}),a.jsx("line",{x1:"96",y1:"4",x2:"4",y2:"96",stroke:"#F5532D",strokeWidth:"3",strokeLinecap:"round"})]})}):a.jsx(w0,{stops:t.stops,direction:t.directionCSS,onStopDrag:t.handleStopDrag,onStopDragEnd:t.handleStopDragEnd,onStopClick:t.handleStopClick,onBarClick:t.handleBarClick,onStopRemove:t.handleStopRemove,selectedStopId:t.selectedStopId})]}),t.colorPickerOpen&&a.jsx(fn,{children:a.jsxs("div",{ref:r.setFloating,style:{...o,zIndex:9999,overflowY:"auto"},...i(),children:[a.jsx(Fl,{prefix:t.colorPrefix,currentValue:t.colorPickerCurrentValue,colors:e.colors,locked:!1,lockedValue:null,onHover:t.handleColorHover,onLeave:t.handleColorLeave,onClick:t.handleColorClick,onRemove:t.editingTarget==="solid"?t.handleRemoveSolid:void 0,onRemoveHover:t.editingTarget==="solid"?t.handleHoverRemoveSolid:void 0}),t.selectedStopIsRemovable&&a.jsx("button",{type:"button",className:"mt-1.5 w-full text-[10px] text-bv-orange border border-bv-orange/40 rounded px-2 py-0.5 cursor-pointer hover:bg-bv-orange hover:text-white transition-colors",onClick:()=>{t.selectedStopId&&t.handleStopRemove(t.selectedStopId)},children:"Remove stop"})]})}),a.jsx("div",{className:"min-h-[1rem] text-[10px] text-bv-muted italic opacity-0 invisible transition-opacity duration-150 group-hover:opacity-100 group-hover:visible group-focus-within:opacity-100 group-focus-within:visible",children:n?"Click the swatch to change color · Click a direction arrow for gradient":"Click handles to change color · Drag to reposition · Click bar to add stop"})]})}function C0(e,t,n){var y;const r=new Map;for(const x of e)r.set(x.fullClass,!0);if(n)for(const x of n)x.kind==="class-change"&&x.status==="staged"&&(x.originalClass&&r.delete(x.originalClass),x.newClass&&r.set(x.newClass,!0));const o=e.find(x=>x.property==="bg-gradient-to"),l=Array.from(r.keys()).find(x=>x.startsWith("bg-gradient-to-")),i=(l==null?void 0:l.replace("bg-gradient-to-",""))||(o==null?void 0:o.fullClass.slice(15))||"r",c=((y=Array.from(r.keys()).filter(x=>x.startsWith("bg-")&&!x.startsWith("bg-gradient-to-"))[0])==null?void 0:y.replace("bg-",""))??null,d=(c==null?void 0:c.split("/")[0])??null,m=d?Qn(d,t):null,f=Array.from(r.keys()),g=f.filter(x=>x.startsWith("from-")),v=f.filter(x=>x.startsWith("via-")),w=f.filter(x=>x.startsWith("to-")),S=!!(l||g.length>0&&w.length>0),h=S?"gradient":"solid",p=[];if(S){let x=1;for(const j of g){const k=j.replace("from-",""),C=k.split("/")[0];p.push({id:String(x++),role:"from",colorName:k,hex:Qn(C,t),position:null})}for(const j of v){const k=j.replace("via-",""),C=k.split("/")[0];p.push({id:String(x++),role:"via",colorName:k,hex:Qn(C,t),position:null})}for(const j of w){const k=j.replace("to-",""),C=k.split("/")[0];p.push({id:String(x++),role:"to",colorName:k,hex:Qn(C,t),position:null})}}return{direction:i,stops:p,mode:h,solidColorName:c,solidColorHex:m,colors:t}}const Oe="#00848B",ar="rgba(0,132,139,0.18)",j0="#F5532D",wt="#4a4a4a",On="#333333",Ae="#999999",Je="'Roboto Mono', 'Menlo', ui-monospace, monospace",Mt={width:60,height:60,borderRadius:5,borderWidth:"1.5px",borderStyle:"solid",borderColor:wt,background:On,display:"flex",padding:4,overflow:"hidden",transition:"border-color 150ms ease-in-out, background-color 150ms ease-in-out, box-shadow 150ms ease-in-out",boxSizing:"border-box"},Ma={background:Oe,opacity:.65,borderRadius:2,flexShrink:0,transition:"opacity 150ms ease-in-out"},kd={...Ma,opacity:.9},Nm={flexShrink:0,background:j0,opacity:.18,borderRadius:1,transition:"opacity 150ms ease-in-out"},E0={...Nm,opacity:.38};function Gt({label:e,isActive:t,containerStyle:n,onClick:r,onHover:o,children:l}){const[s,i]=b.useState(!1),u=t||s,c={...Mt,borderColor:u?Oe:wt,background:u?ar:On,boxShadow:t?"0 0 0 2px rgba(0,132,139,0.35)":"none",...n};return a.jsxs("div",{className:"cursor-pointer",style:{display:"flex",flexDirection:"column",alignItems:"center",gap:3},onMouseEnter:()=>{i(!0),o==null||o()},onMouseLeave:()=>i(!1),onClick:r,children:[a.jsx("div",{style:c,children:l(u)}),a.jsx("span",{style:{fontSize:9,fontFamily:Je,color:u?Oe:Ae,fontWeight:u?600:400,textAlign:"center",transition:"color 150ms ease-in-out"},children:e})]})}const Ri=[{value:"flex-row",label:"row",arrow:"→"},{value:"flex-col",label:"col",arrow:"↓"},{value:"flex-row-reverse",label:"row-reverse",arrow:"←"},{value:"flex-col-reverse",label:"col-reverse",arrow:"↑"}];function Rm({direction:e,color:t}){const n={stroke:t,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round",fill:"none"};switch(e){case"flex-row":return a.jsxs("svg",{width:"30",height:"30",viewBox:"0 0 30 30",children:[a.jsx("line",{x1:"5",y1:"15",x2:"25",y2:"15",...n}),a.jsx("polyline",{points:"19,9 25,15 19,21",...n})]});case"flex-col":return a.jsxs("svg",{width:"30",height:"30",viewBox:"0 0 30 30",children:[a.jsx("line",{x1:"15",y1:"5",x2:"15",y2:"25",...n}),a.jsx("polyline",{points:"9,19 15,25 21,19",...n})]});case"flex-row-reverse":return a.jsxs("svg",{width:"30",height:"30",viewBox:"0 0 30 30",children:[a.jsx("line",{x1:"25",y1:"15",x2:"5",y2:"15",...n}),a.jsx("polyline",{points:"11,9 5,15 11,21",...n})]});case"flex-col-reverse":return a.jsxs("svg",{width:"30",height:"30",viewBox:"0 0 30 30",children:[a.jsx("line",{x1:"15",y1:"25",x2:"15",y2:"5",...n}),a.jsx("polyline",{points:"9,11 15,5 21,11",...n})]})}}function T0({currentValue:e,lockedValue:t,locked:n,onHover:r,onLeave:o,onClick:l}){const[s,i]=b.useState(!1),{refs:u,floatingStyles:c,context:d}=pn({open:s,onOpenChange:k=>{k||(i(!1),o())},strategy:"fixed",placement:"bottom-start",middleware:[un(4),dn(),cn({padding:8})],whileElementsMounted:an}),m=lr(d),{getReferenceProps:f,getFloatingProps:g}=sr([m]),v=t!==null&&Ri.some(k=>k.value===t),w=n&&!v,S=v?t:e??"",h=Ri.find(k=>k.value===S),p=!h;function y(){i(!1),o()}function x(){w||i(k=>(k&&o(),!k))}const j=p?{...Mt,borderStyle:"dashed",borderColor:s?Oe:wt,background:s?ar:"transparent",alignItems:"center",justifyContent:"center",cursor:w?"default":"pointer"}:{...Mt,borderColor:s?Oe:wt,background:s?ar:On,boxShadow:s?"0 0 0 2px rgba(0,132,139,0.18)":"none",alignItems:"center",justifyContent:"center",cursor:w?"default":"pointer"};return a.jsxs("div",{style:{display:"inline-flex",flexDirection:"column",gap:2},children:[a.jsx("span",{style:{fontSize:9,fontFamily:Je,color:Ae,textTransform:"uppercase",letterSpacing:"0.05em"},children:"Direction"}),a.jsxs("div",{ref:u.setReference,role:"button",tabIndex:w?-1:0,"aria-label":"Direction",style:{display:"flex",flexDirection:"column",alignItems:"center",gap:3},onKeyDown:k=>{(k.key==="Enter"||k.key===" ")&&x()},onClick:x,...f(),children:[a.jsx("div",{style:j,children:h?a.jsx(Rm,{direction:h.value,color:s?Oe:Ae}):a.jsx("span",{style:{fontSize:10,fontFamily:Je,color:Ae},children:"—"})}),a.jsx("span",{style:{fontSize:9,fontFamily:Je,color:s?Oe:Ae,fontWeight:s?600:400,textAlign:"center",transition:"color 150ms ease-in-out"},children:(h==null?void 0:h.label)??"—"})]}),s&&a.jsx(fn,{children:a.jsx("div",{ref:u.setFloating,style:c,className:"z-[9999]",...g(),children:a.jsx(dr,{style:{background:"#1e1e1e",border:`1px solid ${wt}`,borderRadius:8,boxShadow:"0 4px 16px rgba(0,0,0,0.35)",padding:8},onMouseLeave:o,onClose:y,children:a.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 60px)",gap:4},children:Ri.map(k=>{const C=k.value===S;return a.jsx(N0,{option:k,isActive:C,onHover:()=>r(k.value),onClick:()=>{l(k.value),y()}},k.value)})})})})})]})}function N0({option:e,isActive:t,onHover:n,onClick:r}){const[o,l]=b.useState(!1),s=t||o,i={...Mt,borderColor:s?Oe:wt,background:s?ar:On,boxShadow:t?"0 0 0 2px rgba(0,132,139,0.35)":"none",alignItems:"center",justifyContent:"center"};return a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:3,cursor:"pointer"},onMouseEnter:()=>{l(!0),n()},onMouseLeave:()=>l(!1),onClick:r,children:[a.jsx("div",{style:i,children:a.jsx(Rm,{direction:e.value,color:s?Oe:Ae})}),a.jsx("span",{style:{fontSize:9,fontFamily:Je,color:s?Oe:Ae,fontWeight:s?600:400,textAlign:"center",transition:"color 150ms ease-in-out"},children:e.label})]})}const Pi=[{value:"flex-nowrap",label:"no-wrap"},{value:"flex-wrap",label:"wrap"},{value:"flex-wrap-reverse",label:"wrap-reverse"}],R0=e=>({stroke:e,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round",fill:"none"});function Pm({mode:e,color:t}){const n=R0(t),r={...n,strokeDasharray:"2 3"};return e==="flex-nowrap"?a.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 40 40",children:[a.jsx("line",{x1:"3",y1:"7",x2:"37",y2:"7",...n}),a.jsx("polyline",{points:"31,1 37,7 31,13",...n})]}):e==="flex-wrap"?a.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 40 40",children:[a.jsx("line",{x1:"3",y1:"7",x2:"37",y2:"7",...n}),a.jsx("line",{x1:"37",y1:"7",x2:"3",y2:"33",...r}),a.jsx("line",{x1:"3",y1:"33",x2:"37",y2:"33",...n}),a.jsx("polyline",{points:"31,27 37,33 31,39",...n})]}):a.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 40 40",children:[a.jsx("line",{x1:"3",y1:"33",x2:"37",y2:"33",...n}),a.jsx("line",{x1:"37",y1:"33",x2:"3",y2:"7",...r}),a.jsx("line",{x1:"3",y1:"7",x2:"37",y2:"7",...n}),a.jsx("polyline",{points:"31,1 37,7 31,13",...n})]})}function P0({option:e,isActive:t,onHover:n,onClick:r}){const[o,l]=b.useState(!1),s=t||o,i={...Mt,borderColor:s?Oe:wt,background:s?ar:On,boxShadow:t?"0 0 0 2px rgba(0,132,139,0.35)":"none",alignItems:"center",justifyContent:"center"};return a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:3,cursor:"pointer"},onMouseEnter:()=>{l(!0),n()},onMouseLeave:()=>l(!1),onClick:r,children:[a.jsx("div",{style:i,children:a.jsx(Pm,{mode:e.value,color:s?Oe:Ae})}),a.jsx("span",{style:{fontSize:9,fontFamily:Je,color:s?Oe:Ae,fontWeight:s?600:400,textAlign:"center",transition:"color 150ms ease-in-out"},children:e.label})]})}function _0({currentValue:e,lockedValue:t,locked:n,onHover:r,onLeave:o,onClick:l}){const[s,i]=b.useState(!1),{refs:u,floatingStyles:c,context:d}=pn({open:s,onOpenChange:k=>{k||(i(!1),o())},strategy:"fixed",placement:"bottom-start",middleware:[un(4),dn(),cn({padding:8})],whileElementsMounted:an}),m=lr(d),{getReferenceProps:f,getFloatingProps:g}=sr([m]),v=t!==null&&Pi.some(k=>k.value===t),w=n&&!v,S=!v&&e===null,h=v?t:e??"",p=Pi.find(k=>k.value===h),y=(p==null?void 0:p.label)??"Wrap";function x(){i(!1),o()}function j(){w||i(k=>(k&&o(),!k))}return a.jsxs("div",{style:{display:"inline-flex",flexDirection:"column",gap:2},children:[a.jsx("span",{style:{fontSize:9,fontFamily:Je,color:Ae,textTransform:"uppercase",letterSpacing:"0.05em"},children:"Wrap"}),a.jsxs("div",{ref:u.setReference,role:"button",tabIndex:w?-1:0,"aria-label":"Wrap",style:{display:"flex",flexDirection:"column",alignItems:"center",gap:3},onKeyDown:k=>{(k.key==="Enter"||k.key===" ")&&j()},onClick:j,...f(),children:[S?a.jsx("div",{style:{...Mt,borderStyle:"dashed",borderColor:s?Oe:wt,background:s?ar:"transparent",alignItems:"center",justifyContent:"center"},children:a.jsx("span",{style:{fontSize:10,fontFamily:Je,color:Ae},children:"—"})}):a.jsx("div",{style:{...Mt,borderColor:s?Oe:wt,background:s?ar:On,boxShadow:s?"0 0 0 2px rgba(0,132,139,0.18)":"none",alignItems:"center",justifyContent:"center"},children:a.jsx(Pm,{mode:h,color:s?Oe:Ae})}),a.jsx("span",{style:{fontSize:9,fontFamily:Je,color:s?Oe:Ae,fontWeight:s?600:400,textAlign:"center",transition:"color 150ms ease-in-out"},children:y})]}),s&&a.jsx(fn,{children:a.jsx("div",{ref:u.setFloating,style:c,className:"z-[9999]",...g(),children:a.jsx(dr,{style:{background:"#1e1e1e",border:`1px solid ${wt}`,borderRadius:8,boxShadow:"0 4px 16px rgba(0,0,0,0.35)",padding:8},onMouseLeave:o,onClose:x,children:a.jsx("div",{className:"grid gap-1",style:{gridTemplateColumns:"repeat(3, 60px)"},children:Pi.map(k=>{const C=k.value===h;return a.jsx(P0,{option:k,isActive:C,onHover:()=>r(k.value),onClick:()=>{l(k.value),x()}},k.value)})})})})})]})}function A0({flexDirection:e="row",activeValue:t,onSelect:n,onHover:r}){const o=e.startsWith("column"),l=e;function s(f,g){const v=g?kd:Ma;return o?{...v,width:"100%",height:f}:{...v,width:f,height:"100%"}}function i(f){const g=f?kd:Ma;return o?{...g,flex:1,width:"100%"}:{...g,flex:1,height:"100%"}}function u(f,g){return{...g?E0:Nm,flex:f}}const c=f=>t===f,d=f=>()=>n==null?void 0:n(f),m=f=>()=>r==null?void 0:r(f);return a.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 60px)",gap:4},children:[a.jsx(Gt,{label:"start",isActive:c("justify-start"),onClick:d("justify-start"),onHover:m("justify-start"),containerStyle:{flexDirection:l,justifyContent:"flex-start",gap:2},children:f=>a.jsxs(a.Fragment,{children:[a.jsx("div",{style:s(10,f)}),a.jsx("div",{style:s(14,f)}),a.jsx("div",{style:s(8,f)})]})}),a.jsx(Gt,{label:"center",isActive:c("justify-center"),onClick:d("justify-center"),onHover:m("justify-center"),containerStyle:{flexDirection:l,justifyContent:"center",gap:2},children:f=>a.jsxs(a.Fragment,{children:[a.jsx("div",{style:s(10,f)}),a.jsx("div",{style:s(14,f)}),a.jsx("div",{style:s(8,f)})]})}),a.jsx(Gt,{label:"stretch",isActive:c("justify-stretch"),onClick:d("justify-stretch"),onHover:m("justify-stretch"),containerStyle:{flexDirection:l,gap:2},children:f=>a.jsxs(a.Fragment,{children:[a.jsx("div",{style:i(f)}),a.jsx("div",{style:i(f)}),a.jsx("div",{style:i(f)})]})}),a.jsx(Gt,{label:"between",isActive:c("justify-between"),onClick:d("justify-between"),onHover:m("justify-between"),containerStyle:{flexDirection:l},children:f=>a.jsxs(a.Fragment,{children:[a.jsx("div",{style:s(12,f)}),a.jsx("div",{style:u(1,f)}),a.jsx("div",{style:s(12,f)})]})}),a.jsx(Gt,{label:"around",isActive:c("justify-around"),onClick:d("justify-around"),onHover:m("justify-around"),containerStyle:{flexDirection:l},children:f=>a.jsxs(a.Fragment,{children:[a.jsx("div",{style:u(1,f)}),a.jsx("div",{style:s(12,f)}),a.jsx("div",{style:u(2,f)}),a.jsx("div",{style:s(12,f)}),a.jsx("div",{style:u(1,f)})]})}),a.jsx(Gt,{label:"evenly",isActive:c("justify-evenly"),onClick:d("justify-evenly"),onHover:m("justify-evenly"),containerStyle:{flexDirection:l},children:f=>a.jsxs(a.Fragment,{children:[a.jsx("div",{style:u(1,f)}),a.jsx("div",{style:s(12,f)}),a.jsx("div",{style:u(1,f)}),a.jsx("div",{style:s(12,f)}),a.jsx("div",{style:u(1,f)})]})}),a.jsx(Gt,{label:"end",isActive:c("justify-end"),onClick:d("justify-end"),onHover:m("justify-end"),containerStyle:{flexDirection:l,justifyContent:"flex-end",gap:2},children:f=>a.jsxs(a.Fragment,{children:[a.jsx("div",{style:s(10,f)}),a.jsx("div",{style:s(14,f)}),a.jsx("div",{style:s(8,f)})]})})]})}const tn="bg-bv-teal/50 rounded-[2px] shrink-0 group-hover:bg-bv-teal/70 transition-colors duration-150",L0="bg-bv-orange/10 rounded-[2px]";function Qt({isCol:e,main:t}){return a.jsx("div",{className:tn,style:e?{height:t}:{width:t}})}function Fn({flex:e=1}){return a.jsx("div",{className:L0,style:{flex:e}})}function Ht({isCol:e,w:t,h:n}){return a.jsx("div",{className:tn,style:e?{width:n,height:t}:{width:t,height:n}})}function _i({isCol:e,w:t,h:n,pt:r}){return a.jsx("div",{className:`${tn} text-[5px] text-white/80 leading-none overflow-hidden text-center`,style:e?{width:n,height:t,paddingLeft:r}:{width:t,height:n,paddingTop:r},children:"t"})}function Ai(e){return a.jsxs(a.Fragment,{children:[a.jsx(Qt,{isCol:e,main:10}),a.jsx(Qt,{isCol:e,main:14}),a.jsx(Qt,{isCol:e,main:8})]})}const Cd=[{value:"justify-start",label:"start",getContainerStyle:e=>({flexDirection:e,justifyContent:"flex-start",gap:2}),renderItems:e=>Ai(e.startsWith("column"))},{value:"justify-center",label:"center",getContainerStyle:e=>({flexDirection:e,justifyContent:"center",gap:2}),renderItems:e=>Ai(e.startsWith("column"))},{value:"justify-stretch",label:"stretch",getContainerStyle:e=>({flexDirection:e,gap:2}),renderItems:()=>a.jsxs(a.Fragment,{children:[a.jsx("div",{className:`${tn} flex-1`}),a.jsx("div",{className:`${tn} flex-1`}),a.jsx("div",{className:`${tn} flex-1`})]})},{value:"justify-between",label:"between",getContainerStyle:e=>({flexDirection:e}),renderItems:e=>{const t=e.startsWith("column");return a.jsxs(a.Fragment,{children:[a.jsx(Qt,{isCol:t,main:12}),a.jsx(Fn,{}),a.jsx(Qt,{isCol:t,main:12})]})}},{value:"justify-around",label:"around",getContainerStyle:e=>({flexDirection:e}),renderItems:e=>{const t=e.startsWith("column");return a.jsxs(a.Fragment,{children:[a.jsx(Fn,{flex:1}),a.jsx(Qt,{isCol:t,main:12}),a.jsx(Fn,{flex:2}),a.jsx(Qt,{isCol:t,main:12}),a.jsx(Fn,{flex:1})]})}},{value:"justify-evenly",label:"evenly",getContainerStyle:e=>({flexDirection:e}),renderItems:e=>{const t=e.startsWith("column");return a.jsxs(a.Fragment,{children:[a.jsx(Fn,{}),a.jsx(Qt,{isCol:t,main:12}),a.jsx(Fn,{}),a.jsx(Qt,{isCol:t,main:12}),a.jsx(Fn,{})]})}},{value:"justify-end",label:"end",getContainerStyle:e=>({flexDirection:e,justifyContent:"flex-end",gap:2}),renderItems:e=>Ai(e.startsWith("column"))}],Li=[{value:"items-start",label:"start",getContainerStyle:e=>({flexDirection:e,alignItems:"flex-start",gap:3}),renderItems:e=>{const t=e.startsWith("column");return a.jsxs(a.Fragment,{children:[a.jsx(Ht,{isCol:t,w:13,h:22}),a.jsx(Ht,{isCol:t,w:15,h:42}),a.jsx(Ht,{isCol:t,w:11,h:14})]})}},{value:"items-center",label:"center",getContainerStyle:e=>({flexDirection:e,alignItems:"center",gap:3}),renderItems:e=>{const t=e.startsWith("column");return a.jsxs(a.Fragment,{children:[a.jsx(Ht,{isCol:t,w:13,h:22}),a.jsx(Ht,{isCol:t,w:15,h:42}),a.jsx(Ht,{isCol:t,w:11,h:14})]})}},{value:"items-baseline",label:"baseline",getContainerStyle:e=>({flexDirection:e,alignItems:"baseline",gap:3}),renderItems:e=>{const t=e.startsWith("column");return a.jsxs(a.Fragment,{children:[a.jsx(_i,{isCol:t,w:13,h:38,pt:17}),a.jsx(_i,{isCol:t,w:15,h:26,pt:3}),a.jsx(_i,{isCol:t,w:11,h:32,pt:10})]})}},{value:"items-stretch",label:"stretch",getContainerStyle:e=>({flexDirection:e,alignItems:"stretch",gap:3}),renderItems:e=>{const t=e.startsWith("column");return a.jsxs(a.Fragment,{children:[a.jsx("div",{className:tn,style:t?{height:13}:{width:13}}),a.jsx("div",{className:tn,style:t?{height:15}:{width:15}}),a.jsx("div",{className:tn,style:t?{height:11}:{width:11}})]})}},{value:"items-end",label:"end",getContainerStyle:e=>({flexDirection:e,alignItems:"flex-end",gap:3}),renderItems:e=>{const t=e.startsWith("column");return a.jsxs(a.Fragment,{children:[a.jsx(Ht,{isCol:t,w:13,h:22}),a.jsx(Ht,{isCol:t,w:15,h:42}),a.jsx(Ht,{isCol:t,w:11,h:14})]})}}];function I0({currentValue:e,lockedValue:t,locked:n,flexDirection:r="row",onHover:o,onLeave:l,onClick:s,onRemove:i,onRemoveHover:u}){const[c,d]=b.useState(!1),{refs:m,floatingStyles:f,context:g}=pn({open:c,onOpenChange:_=>{_||(d(!1),l())},strategy:"fixed",placement:"bottom-start",middleware:[un(4),dn(),cn({padding:8})],whileElementsMounted:an}),v=lr(g),{getReferenceProps:w,getFloatingProps:S}=sr([v]),h=t!==null&&Cd.some(_=>_.value===t),p=n&&!h,y=!h&&(e===null||e===""),x=h?t:e??"",j=Cd.find(_=>_.value===x),k=(j==null?void 0:j.label)??"—";function C(){d(!1),l()}function T(){p||d(_=>(_&&l(),!_))}const M={...Mt,borderStyle:"dashed",alignItems:"center",justifyContent:"center"};return a.jsxs("div",{className:"flex flex-col items-start gap-1",children:[a.jsx("span",{style:{fontSize:9,fontFamily:Je,color:Ae,fontWeight:500},children:"JUSTIFY →"}),a.jsx("div",{ref:m.setReference,className:"cursor-pointer",role:"button",tabIndex:p?-1:0,onKeyDown:_=>{(_.key==="Enter"||_.key===" ")&&T()},onClick:T,...w(),children:y?a.jsxs("div",{className:"flex flex-col items-center gap-0.5",children:[a.jsx("div",{style:M,children:a.jsx("span",{style:{fontSize:9,fontFamily:Je,color:Ae},children:"—"})}),a.jsx("span",{style:{fontSize:9,fontFamily:Je,color:Ae},children:"none"})]}):a.jsx(Gt,{label:k,isActive:c,containerStyle:(j==null?void 0:j.getContainerStyle(r))??{flexDirection:r},children:_=>(j==null?void 0:j.renderItems(r))??null})}),c&&a.jsx(fn,{children:a.jsx("div",{ref:m.setFloating,style:f,className:"z-[9999]",...S(),children:a.jsxs(dr,{className:"bg-bv-bg border border-bv-border rounded-lg shadow-lg p-2 flex flex-col gap-1",onMouseLeave:l,onClose:C,children:[i&&a.jsxs("div",{className:"flex items-center gap-1.5 px-1.5 py-1 text-[10px] font-mono text-bv-muted border-b border-bv-border mb-1 pb-1.5 cursor-pointer transition-colors duration-150 hover:text-bv-orange",onMouseEnter:u,onMouseLeave:l,onClick:()=>{i(),C()},children:[a.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",className:"shrink-0",children:[a.jsx("line",{x1:"1",y1:"1",x2:"9",y2:"9",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),a.jsx("line",{x1:"9",y1:"1",x2:"1",y2:"9",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})]}),"remove"]}),a.jsx(A0,{flexDirection:r,activeValue:x,onSelect:_=>{s(_),C()},onHover:o})]})})})]})}function O0({currentValue:e,lockedValue:t,locked:n,flexDirection:r="row",onHover:o,onLeave:l,onClick:s,onRemove:i,onRemoveHover:u}){const[c,d]=b.useState(!1),{refs:m,floatingStyles:f,context:g}=pn({open:c,onOpenChange:F=>{F||(d(!1),l())},strategy:"fixed",placement:"bottom-start",middleware:[un(4),dn(),cn({padding:8})],whileElementsMounted:an}),v=lr(g),{getReferenceProps:w,getFloatingProps:S}=sr([v]),h=t!==null&&Li.some(F=>F.value===t),p=n&&!h,y=!h&&(e===null||e===""),x=h?t:e??"",j=Li.find(F=>F.value===x),k=(j==null?void 0:j.label)??"—",C=r;function T(){d(!1),l()}function M(){p||d(F=>(F&&l(),!F))}const _=y?{...Mt,borderStyle:"dashed",borderColor:wt,background:On,cursor:p?"default":"pointer",alignItems:"center",justifyContent:"center"}:{...Mt,borderColor:c?Oe:wt,background:c?"rgba(0,132,139,0.09)":On,cursor:p?"default":"pointer",...j?j.getContainerStyle(r):{}};return a.jsxs("div",{style:{display:"inline-flex",flexDirection:"column",alignItems:"center",gap:2},children:[a.jsx("span",{style:{fontSize:9,fontFamily:Je,color:Ae,textTransform:"uppercase",letterSpacing:"0.05em"},children:"Align ↓"}),a.jsx("div",{ref:m.setReference,role:"button",tabIndex:p?-1:0,onKeyDown:F=>{(F.key==="Enter"||F.key===" ")&&M()},onClick:M,...w(),children:a.jsx("div",{style:_,children:y?a.jsx("span",{style:{fontSize:9,fontFamily:Je,color:Ae},children:"—"}):j==null?void 0:j.renderItems(r)})}),a.jsx("span",{style:{fontSize:9,fontFamily:Je,color:c?Oe:Ae,fontWeight:c?600:400,textAlign:"center",transition:"color 150ms ease-in-out"},children:y?"—":k}),c&&a.jsx(fn,{children:a.jsx("div",{ref:m.setFloating,style:f,className:"z-[9999]",...S(),children:a.jsxs(dr,{className:"bg-bv-bg border border-bv-border rounded-lg shadow-lg p-2 flex flex-col gap-1",onMouseLeave:l,onClose:T,children:[i&&a.jsxs("div",{className:"flex items-center gap-1.5 px-1.5 py-1 text-[10px] font-mono text-bv-muted border-b border-bv-border mb-1 pb-1.5 cursor-pointer transition-colors duration-150 hover:text-bv-orange",onMouseEnter:u,onMouseLeave:l,onClick:()=>{i(),T()},children:[a.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",className:"shrink-0",children:[a.jsx("line",{x1:"1",y1:"1",x2:"9",y2:"9",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),a.jsx("line",{x1:"9",y1:"1",x2:"1",y2:"9",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})]}),"remove"]}),a.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(5, 60px)",gap:4},children:Li.map(F=>a.jsx(Gt,{label:F.label,isActive:F.value===x,containerStyle:{flexDirection:C,...F.getContainerStyle(r)},onHover:()=>o(F.value),onClick:()=>{s(F.value),T()},children:z=>F.renderItems(r)},F.value))})]})})})]})}function jd(e){return e.replace(/^gap-x-/,"x-")}function Ed(e){return e.replace(/^gap-y-/,"y-")}function D0({slots:e,onSlotChange:t,onSlotHover:n,onSlotRemove:r,onSlotRemoveHover:o}){const[l,s]=b.useState(null),[i,u]=b.useState(null),c=e.find(S=>S.key==="gap"),d=e.find(S=>S.key==="gap-x"),m=e.find(S=>S.key==="gap-y");function f(S,h){u(h!=null?S:null),n==null||n(S,h)}function g(S){u(S)}function v(){u(null)}const w=i==="gap-x"?"gm-active-x":i==="gap-y"?"gm-active-y":i==="gap"?"gm-active-gap":"";return a.jsx("div",{className:"gm-root",children:a.jsxs("div",{className:`gm-grid${w?` ${w}`:""}`,children:[a.jsx("div",{className:"gm-col-highlight",style:{gridArea:"1 / 2 / 4 / 3"}}),a.jsx("div",{className:"gm-row-highlight",style:{gridArea:"2 / 1 / 3 / 4"}}),a.jsx("div",{className:"gm-box gm-box-tl",style:{gridArea:"1 / 1"}}),a.jsx("div",{className:"gm-cell",style:{gridArea:"1 / 2"},onMouseEnter:()=>g("gap-x"),onMouseLeave:v,children:(d==null?void 0:d.scaleValues)&&a.jsx(Kr,{placeholder:"x",values:d.scaleValues,currentValue:d.value,displayValue:d.value?jd(d.value):null,formatValue:jd,axis:"x",disabled:l!==null&&l!=="gap-x",onHover:S=>f("gap-x",S),onLeave:()=>f("gap-x",null),onClick:S=>t==null?void 0:t("gap-x",S),onOpen:()=>s("gap-x"),onClose:()=>s(null),onScrubStart:()=>s("gap-x"),onScrubEnd:()=>s(null),onRemove:d.value?()=>r==null?void 0:r("gap-x"):void 0,onRemoveHover:d.value?()=>{u(null),o==null||o("gap-x")}:void 0})}),a.jsx("div",{className:"gm-box gm-box-tr",style:{gridArea:"1 / 3"}}),a.jsx("div",{className:"gm-cell",style:{gridArea:"2 / 1"},onMouseEnter:()=>g("gap-y"),onMouseLeave:v,children:(m==null?void 0:m.scaleValues)&&a.jsx(Kr,{placeholder:"y",values:m.scaleValues,currentValue:m.value,displayValue:m.value?Ed(m.value):null,formatValue:Ed,axis:"y",disabled:l!==null&&l!=="gap-y",onHover:S=>f("gap-y",S),onLeave:()=>f("gap-y",null),onClick:S=>t==null?void 0:t("gap-y",S),onOpen:()=>s("gap-y"),onClose:()=>s(null),onScrubStart:()=>s("gap-y"),onScrubEnd:()=>s(null),onRemove:m.value?()=>r==null?void 0:r("gap-y"):void 0,onRemoveHover:m.value?()=>{u(null),o==null||o("gap-y")}:void 0})}),a.jsx("div",{className:"gm-cell",style:{gridArea:"2 / 2"},onMouseEnter:()=>g("gap"),onMouseLeave:v,children:(c==null?void 0:c.scaleValues)&&a.jsx(Kr,{placeholder:"gap",values:c.scaleValues,currentValue:c.value,displayValue:c.value??null,axis:"x",disabled:l!==null&&l!=="gap",onHover:S=>f("gap",S),onLeave:()=>f("gap",null),onClick:S=>t==null?void 0:t("gap",S),onOpen:()=>s("gap"),onClose:()=>s(null),onScrubStart:()=>s("gap"),onScrubEnd:()=>s(null),onRemove:c.value?()=>r==null?void 0:r("gap"):void 0,onRemoveHover:c.value?()=>{u(null),o==null||o("gap")}:void 0})}),a.jsx("div",{className:"gm-box gm-box-bl",style:{gridArea:"3 / 1"}})]})})}const _m={shadow:"Shadow","inset-shadow":"Inset Shadow",ring:"Ring","inset-ring":"Inset Ring","text-shadow":"Text Shadow"},Td={shadow:"shadow-md","inset-shadow":"inset-shadow-sm",ring:"ring-2","inset-ring":"inset-ring-2","text-shadow":"text-shadow-md"};function M0(e){switch(e){case"shadow":return[...Lu];case"inset-shadow":return[...Yp];case"ring":return[...Ta];case"inset-ring":return[...Ta];case"text-shadow":return[...Iu]}}function Nd(e,t){return`${e==="shadow"?"shadow-":e==="inset-shadow"?"inset-shadow-":e==="ring"?"ring-":e==="inset-ring"?"inset-ring-":"text-shadow-"}${t}`}function z0(e,t){const n=e==="shadow"?"shadow-":e==="inset-shadow"?"inset-shadow-":e==="ring"?"ring-":e==="inset-ring"?"inset-ring-":"text-shadow-";return t.startsWith(n)?t.slice(n.length):t}function $0(e){if(e.isNone||!e.sizeClass)return"none";const t=r=>{if(!e.colorHex)return r;if(e.opacity!==null&&e.opacity<100){const o=(e.opacity/100).toFixed(2),l=parseInt(e.colorHex.slice(1,3),16),s=parseInt(e.colorHex.slice(3,5),16),i=parseInt(e.colorHex.slice(5,7),16);return`rgba(${l},${s},${i},${o})`}return e.colorHex},n=e.colorHex?t(e.colorHex):void 0;switch(e.type){case"shadow":{const r=bo(e.sizeClass,"shadow-");return W0(r,n)}case"inset-shadow":{const r=bo(e.sizeClass,"inset-shadow-");return V0(r,n)}case"ring":{const r=bo(e.sizeClass,"ring-");return`0 0 0 ${r==="0"?0:Number(r)||1}px ${n??"rgba(99,102,241,0.5)"}`}case"inset-ring":{const r=bo(e.sizeClass,"inset-ring-");return`inset 0 0 0 ${r==="0"?0:Number(r)||1}px ${n??"rgba(99,102,241,0.5)"}`}case"text-shadow":return"none"}}function K0(e){if(e.isNone||!e.sizeClass)return"none";const t=o=>{if(!e.colorHex)return o;if(e.opacity!==null&&e.opacity<100){const l=(e.opacity/100).toFixed(2),s=parseInt(e.colorHex.slice(1,3),16),i=parseInt(e.colorHex.slice(3,5),16),u=parseInt(e.colorHex.slice(5,7),16);return`rgba(${s},${i},${u},${l})`}return e.colorHex},n=e.colorHex?t(e.colorHex):void 0,r=bo(e.sizeClass,"text-shadow-");return F0(r,n)}function F0(e,t){const n=t??"rgba(0,0,0,0.25)";return{"2xs":`0 1px 0 ${n}`,xs:`0 1px 1px ${n}`,sm:`0 1px 2px ${n}`,md:`0 2px 4px ${n}`,lg:`0 4px 6px ${n}`}[e]??"none"}function bo(e,t){return e.startsWith(t)?e.slice(t.length):e}function W0(e,t){const n=t??"rgba(0,0,0,0.15)";return{"2xs":`0 1px ${n}`,xs:`0 1px 2px 0 ${n}`,sm:`0 1px 3px 0 ${n}, 0 1px 2px -1px ${n}`,md:`0 4px 6px -1px ${n}, 0 2px 4px -2px ${n}`,lg:`0 10px 15px -3px ${n}, 0 4px 6px -4px ${n}`,xl:`0 20px 25px -5px ${n}, 0 8px 10px -6px ${n}`,"2xl":`0 25px 50px -12px ${n}`}[e]??"none"}function V0(e,t){const n=t??"rgba(0,0,0,0.05)";return{"2xs":`inset 0 0.5px ${n}`,xs:`inset 0 1px 1px ${n}`,sm:`inset 0 2px 4px ${n}`}[e]??"none"}const H0=Array.from({length:21},(e,t)=>`${t*5}%`);function B0({layer:e,onSizeHover:t,onSizeLeave:n,onSizeClick:r,onColorClick:o,onOpacityHover:l,onOpacityLeave:s,onOpacityClick:i,onRemove:u,onRemoveHover:c}){const[d,m]=b.useState(!1),f=b.useRef(),g={onMouseEnter:()=>{clearTimeout(f.current),m(!0)},onMouseLeave:()=>{f.current=setTimeout(()=>m(!1),60)}},v=M0(e.type),w=$0(e),S=e.type==="text-shadow"?K0(e):"none",h=e.isNone,p=e.sizeClass?z0(e.type,e.sizeClass):v[0],y=!!e.colorHex,x=e.opacity!==null?`${e.opacity}%`:"100%",j=e.colorHex??void 0;function k(T){t(Nd(e.type,T))}function C(T){r(Nd(e.type,T))}return a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"flex items-center justify-center",...g,children:a.jsx("span",{className:"w-1 h-1 rounded-full bg-bv-orange"})}),a.jsx("span",{className:"flex items-center text-[9px] font-semibold uppercase tracking-[0.8px] text-bv-text-mid font-mono whitespace-nowrap",...g,children:_m[e.type]}),a.jsx("span",{className:"flex items-center",...g,children:a.jsx(vn,{values:v,currentValue:p,lockedValue:null,locked:!1,onHover:k,onLeave:n,onClick:C})}),a.jsx("button",{type:"button",className:`w-[26px] h-[26px] rounded-[5px] border shrink-0 cursor-pointer transition-[border-color] ${e.colorHex?"border-bv-border hover:border-bv-teal":"border-dashed border-bv-border hover:border-bv-teal"} ${h?"opacity-30 pointer-events-none":""}`,onClick:T=>o(T.currentTarget),title:e.colorClass?e.colorClass:"Default color — click to override",...g,children:e.colorHex?a.jsx("div",{className:"w-full h-full rounded-[4px]",style:{background:j,opacity:e.opacity!==null?e.opacity/100:1}}):a.jsx("div",{className:"w-full h-full rounded-[4px] flex items-center justify-center",children:a.jsx("span",{className:"w-2 h-2 rounded-full bg-bv-text-mid opacity-40"})})}),a.jsx("span",{className:`flex items-center ${h||!y?"opacity-30 pointer-events-none":""}`,...g,children:y&&!h?a.jsx(vn,{values:H0,currentValue:x,lockedValue:null,locked:!1,onHover:l,onLeave:s,onClick:i}):a.jsx("span",{className:"flex items-center justify-center w-full h-[26px] bg-bv-surface border border-bv-border rounded-[5px]",children:a.jsx("span",{className:"font-mono text-[11px] text-bv-muted select-none",children:"—"})})}),a.jsx("span",{className:"ml-4 flex w-[26px] h-[26px] rounded-[5px] bg-bv-surface-hi border border-bv-border transition-[box-shadow] duration-200 items-center justify-center overflow-hidden",style:e.type==="text-shadow"?{}:{boxShadow:w},title:`Preview: ${e.sizeClass??""} ${e.colorClass??""}`.trim(),...g,children:e.type==="text-shadow"&&a.jsx("span",{className:"text-[11px] font-semibold text-bv-text select-none transition-[text-shadow] duration-200",style:{textShadow:S},children:"Aa"})}),a.jsx("button",{type:"button",className:`ml-4 w-[18px] h-[18px] rounded-[3px] border-none bg-transparent text-bv-muted text-xs cursor-pointer flex items-center justify-center transition-all hover:text-bv-orange hover:bg-bv-orange/10 ${d?"opacity-100":"opacity-0"}`,onClick:u,onMouseEnter:()=>{clearTimeout(f.current),m(!0),c()},onMouseLeave:()=>{f.current=setTimeout(()=>m(!1),60)},title:"Remove layer",children:"×"})]})}const U0=["shadow","inset-shadow","ring","inset-ring","text-shadow"];function G0({layers:e,onPreview:t,onRevert:n,onStage:r,onAdd:o,onRemove:l,onRemoveHover:s,onColorClick:i}){function u(d){const m=[];return d.sizeClass&&m.push(d.sizeClass),d.colorClass&&m.push(d.opacity!==null?`${d.colorClass}/${d.opacity}`:d.colorClass),m}const c=U0.map(d=>({type:d,layer:e.find(m=>m.type===d)}));return a.jsx("div",{className:"grid items-center gap-x-1.5 gap-y-1",style:{gridTemplateColumns:"16px auto 1fr 26px 1fr 26px 18px"},children:c.map(({type:d,layer:m},f)=>a.jsxs(b.Fragment,{children:[f>0&&a.jsx("div",{className:"h-px bg-bv-border opacity-50",style:{gridColumn:"1 / -1"}}),m?a.jsx(B0,{layer:m,onSizeHover:g=>t(m.sizeClass??"",g),onSizeLeave:n,onSizeClick:g=>r(m.sizeClass??"",g),onColorClick:g=>i==null?void 0:i(m,g),onOpacityHover:g=>{if(!m.colorClass)return;const v=m.colorClass.split("/")[0],w=parseInt(g),S=w===100?v:`${v}/${w}`,h=m.opacity!==null?`${v}/${m.opacity}`:v;t(h,S)},onOpacityLeave:n,onOpacityClick:g=>{if(!m.colorClass)return;const v=m.colorClass.split("/")[0],w=parseInt(g),S=w===100?v:`${v}/${w}`,h=m.opacity!==null?`${v}/${m.opacity}`:v;r(h,S)},onRemove:()=>l(u(m)),onRemoveHover:()=>s(u(m))}):a.jsxs(a.Fragment,{children:[a.jsx("button",{type:"button",className:"w-4 h-4 rounded-[3px] border border-dashed border-bv-border bg-transparent text-bv-muted text-[11px] cursor-pointer flex items-center justify-center transition-all hover:border-bv-teal hover:border-solid hover:text-bv-teal hover:bg-bv-teal/10",onClick:()=>o(Td[d]),title:`Add ${Td[d]}`,children:"+"}),a.jsx("div",{className:"flex items-center leading-none text-[9px] font-mono uppercase tracking-[0.6px] text-bv-muted whitespace-nowrap",children:_m[d]})]})]},d))})}const Rd=[{prop:"shadow",prefix:"shadow-",sizeSet:ps},{prop:"inset-shadow",prefix:"inset-shadow-",sizeSet:ms},{prop:"ring",prefix:"ring-",sizeSet:Yr},{prop:"inset-ring",prefix:"inset-ring-",sizeSet:Yr},{prop:"text-shadow",prefix:"text-shadow-",sizeSet:hs}];function yr(e,t,n,r,o){if(!t)return n?[...e,n]:e;if(e.includes(t))return n?e.map(c=>c===t?n:c):e.filter(c=>c!==t);if(e.length===0)return n?[n]:[];const l=t.startsWith(r)?t.slice(r.length).split("/")[0]:"",s=o.has(l);let i=!1;const u=e.flatMap(c=>{const d=c.startsWith(r)?c.slice(r.length).split("/")[0]:"";return o.has(d)===s&&!i?(i=!0,n?[n]:[]):[c]});return i?u:n?[...e,n]:e}function Y0(e,t){if(!t)return null;const n=e.lastIndexOf("-");if(n===-1){const i=t[e];return typeof i=="string"?i:null}const r=e.slice(0,n),o=e.slice(n+1),l=t[r];if(!l)return null;if(typeof l=="string")return l;const s=l[o];return typeof s=="string"?s:null}function Q0(e,t){const n=e.trim().split(/\s+/).filter(Boolean),r=t==null?void 0:t.colors,o=[{type:"shadow",prefix:"shadow-",sizeSet:ps},{type:"inset-shadow",prefix:"inset-shadow-",sizeSet:ms},{type:"ring",prefix:"ring-",sizeSet:Yr},{type:"inset-ring",prefix:"inset-ring-",sizeSet:Yr},{type:"text-shadow",prefix:"text-shadow-",sizeSet:hs}],l=[];for(const{type:s,prefix:i,sizeSet:u}of o){const c=n.filter(v=>v===i.slice(0,-1)||v.startsWith(i));if(c.length===0)continue;let d=null,m=null,f=null,g=null;for(const v of c){const S=v.slice(i.length).split("/")[0];if(u.has(S))d=v;else{m=v;const h=v.split("/");h.length===2&&(g=parseInt(h[1])),f=Y0(S,r??null)}}l.push({type:s,sizeClass:d,colorClass:m,colorHex:f,opacity:g,isNone:d!==null&&(d.endsWith("-none")||d.endsWith("-0"))})}return l}function X0(e,t){const n=new Set(["shadow","inset-shadow","ring","inset-ring","text-shadow","shadow-size","shadow-color","inset-shadow-size","inset-shadow-color","ring-size","ring-color","inset-ring-size","inset-ring-color","text-shadow-size","text-shadow-color"]),r=t.filter(s=>n.has(s.property)),o=e.trim().split(/\s+/).filter(Boolean),l=o.filter(s=>!Rd.some(({prefix:i})=>s===i.slice(0,-1)||s.startsWith(i)));for(const{prop:s,prefix:i,sizeSet:u}of Rd){const c=r.find(v=>v.property===s),d=r.find(v=>v.property===`${s}-size`),m=r.find(v=>v.property===`${s}-color`),f=o.filter(v=>v===i.slice(0,-1)||v.startsWith(i));if(c){if(c.newClass)l.push(...yr(f,c.originalClass,c.newClass,i,u));else{const v=c.originalClass.startsWith(i)?c.originalClass.slice(i.length).split("/")[0]:"";u.has(v)||!c.originalClass||l.push(...yr(f,c.originalClass,c.newClass,i,u))}continue}let g=[...f];d&&(d.newClass?g=yr(g,d.originalClass,d.newClass,i,u):d.originalClass&&(g=yr(g,d.originalClass,"",i,u))),m&&(m.newClass?g=yr(g,m.originalClass,m.newClass,i,u):m.originalClass&&(g=yr(g,m.originalClass,"",i,u))),l.push(...g)}return l.join(" ")}const Z0={spacing:"Spacing",sizing:"Sizing",typography:"Typography",color:"Backgrounds",borders:"Radius",effects:"Effects",layout:"Layout",flexbox:"Flexbox & Grid",overflow:"Overflow"},J0=["layout","borders","sizing","typography","color","flexbox","shadows","effects"];function Pd(e){const t=e.scale??e.color??e.style??e.align??e.size??e.value;return t?e.fullClass.slice(0,e.fullClass.length-t.length):e.property+"-"}function q0(e){return e.section==="spacing"||e.property==="border"||e.property==="rounded"||e.property==="bg"||e.property==="bg-gradient-to"||e.property==="from"||e.property==="via"||e.property==="to"||e.property==="shadow"||e.property==="text-shadow"}function Wn(e){const t=e.filter(s=>s.property==="rounded"),n=[{prefix:/^rounded-tl(-|$)/,key:"tl"},{prefix:/^rounded-tr(-|$)/,key:"tr"},{prefix:/^rounded-br(-|$)/,key:"br"},{prefix:/^rounded-bl(-|$)/,key:"bl"},{prefix:/^rounded-t(-|$)/,key:"t"},{prefix:/^rounded-r(-|$)/,key:"r"},{prefix:/^rounded-b(-|$)/,key:"b"},{prefix:/^rounded-l(-|$)/,key:"l"}],r=new Map;let o=null;for(const s of t){const i=s.fullClass,u=n.find(c=>c.prefix.test(i));u?r.set(u.key,i):o=i}return{shorthandValue:o,shorthandScaleValues:Na,slots:["all","t","r","b","l","tl","tr","br","bl"].map(s=>({key:s,value:s==="all"?o:r.get(s)??null,placeholder:s,scaleValues:s==="all"?Na:Cy(`rounded-${s}`)}))}}const Vn=Yx(),Am=Qx(),e1={"text-size":{scaleName:"fontSize",valueType:"scalar"},"text-color":{scaleName:null,valueType:"color"}};Am.typography.unshift({name:"Font size",prefixHint:"text-sm/base/lg/…",prefix:"text-size"},{name:"Text color",prefixHint:"text-{color}",prefix:"text-color"});function Wl(e){const t=e1[e];if(t)return{...t,stagingKey:e};const n=Object.entries(ir).find(([o,l])=>(l.propertyKey??o.replace(/-$/g,""))===e&&l.addable);if(n){const[o,l]=n;return{scaleName:l.themeKey,valueType:l.valueType,enumAlts:l.enumAlts,stagingKey:e}}const r=ir[e];return r?{scaleName:r.themeKey,valueType:r.valueType,enumAlts:r.enumAlts,stagingKey:e.replace(/-$/g,"")}:null}function t1(e,t,n,r){const o=new Set(t.map(s=>s.fullClass)),l=new Set(t.map(s=>s.property));return e.filter(s=>{if(n.has(s.prefix)||r!=null&&r.has(s.prefix))return!1;const i=Wl(s.prefix);if((i==null?void 0:i.valueType)==="enum"&&i.enumAlts)return!i.enumAlts.some(u=>o.has(u));if(i&&i.valueType!=="enum"){if(s.prefix==="text-size")return!t.some(u=>u.property==="text"&&u.scaleName==="fontSize");if(s.prefix==="text-color")return!t.some(u=>u.property==="text"&&u.color!==void 0)}return!l.has(s.prefix.replace(/-$/g,""))})}function n1(e){const t=new Map;for(const n of e){const r=n.section??"unknown",o=t.get(r)||[];o.push(n),t.set(r,o)}return t}function r1({componentName:e,instanceCount:t,rawClasses:n,parsedClasses:r,tailwindConfig:o,patchManager:l}){var ne,oe;const[s,i]=b.useState(null),[u,c]=b.useState(new Map),[d,m]=b.useState(new Map),[f,g]=b.useState(null),[v,w]=b.useState(null),[S,h]=b.useState(null),p=b.useRef(null),{refs:y,floatingStyles:x,context:j}=pn({open:f!==null,onOpenChange:E=>{E||(g(null),l.revertPreview())},strategy:"fixed",placement:"bottom-start",middleware:[un(4),dn(),cn({padding:8}),Da({apply({availableHeight:E,elements:O}){Object.assign(O.floating.style,{maxHeight:`${E}px`})},padding:8})],whileElementsMounted:an}),k=lr(j),{getFloatingProps:C}=sr([k]);b.useEffect(()=>{f!=null&&f.anchorEl&&y.setReference(f.anchorEl)},[f==null?void 0:f.anchorEl]);const{refs:T,floatingStyles:M,context:_}=pn({open:v!==null||S!==null,onOpenChange:E=>{E||(w(null),h(null),l.revertPreview())},strategy:"fixed",placement:"bottom-start",middleware:[un(4),dn(),cn({padding:8}),Da({apply({availableHeight:E,elements:O}){Object.assign(O.floating.style,{maxHeight:`${E}px`})},padding:8})],whileElementsMounted:an}),F=lr(_),{getFloatingProps:z}=sr([F]);b.useEffect(()=>{const E=(v==null?void 0:v.anchorEl)??(S==null?void 0:S.anchorEl);E&&T.setReference(E)},[v==null?void 0:v.anchorEl,S==null?void 0:S.anchorEl]);const[R,I]=b.useState(new Set),[J,W]=b.useState(!1),le=b.useRef(r.map(E=>E.fullClass).join(" ")),N=r.map(E=>E.fullClass).join(" ");b.useEffect(()=>{le.current!==N&&(le.current=N,l.revertPreview(),c(new Map),m(new Map),g(null),w(null),I(new Set))});const L=e,P=l.patches.filter(E=>E.status==="staged"&&E.elementKey===L),U=new Set(P.filter(E=>E.originalClass==="").map(E=>E.property));function Z(E,O){const $=P.find(ge=>ge.property===E),Q=(O==null?void 0:O.fullClass)??($==null?void 0:$.originalClass)??"",ee=($==null?void 0:$.newClass)??(O==null?void 0:O.fullClass)??"";return{originalClass:Q,effectiveClass:ee,hasValue:ee!==""}}function Qe(E){return u.size===0?E:E.map(O=>{const $=u.get(`${O.layer}-shorthand`),Q=O.slots.map(ge=>{const ke=u.get(`${O.layer}-${ge.key}`);return ke!==void 0?{...ge,value:ke}:ge}),ee=$??O.shorthandValue;let de=O.classState;return $!==void 0&&(de=Q.some(ke=>ke.value!=null)?"mixed":"shorthand"),{...O,shorthandValue:ee,classState:de,slots:Q}})}function $e(E){if(d.size===0)return E;const O=d.get("all");return{...E,shorthandValue:O===void 0?E.shorthandValue:O,slots:E.slots.map($=>{const Q=d.get($.key);return Q===void 0?$:{...$,value:Q}})}}const je=n1(r);function ae(E,O){l.preview(E,O)}function Re(){l.revertPreview()}function he(E,O,$){l.stage(L,E,O,$)}function eo(E,O){const $=E||O,Q=$.startsWith("bg-gradient-to-")?"bg-gradient-to-":$.startsWith("from-")?"from-":$.startsWith("via-")?"via-":$.startsWith("to-")?"to-":"bg-";he(Q,E,O)}function to(E,O){l.revertPreview(),pe("overlay",{type:"CLEAR_HIGHLIGHTS"}),E.color!==void 0&&O?(w($=>($==null?void 0:$.cls.fullClass)===E.fullClass?null:{cls:E,anchorEl:O}),i(null)):(w(null),i(E))}function fr(E,O){l.preview(E.fullClass,O)}function no(E){l.revertPreview()}function ro(E){const O=ir[E];if(!((O==null?void 0:O.controlGroup)==="flex-container"&&(O==null?void 0:O.propertyKey)==="display")){if((O==null?void 0:O.controlGroup)==="flex-container"){const $=r.some(ee=>ee.fullClass==="flex"||ee.fullClass==="inline-flex"),Q=P.some(ee=>ee.property==="display"&&ee.originalClass===""&&(ee.newClass==="flex"||ee.newClass==="inline-flex"));!$&&!Q&&l.stage(L,"display","","flex")}}I($=>new Set($).add(E))}function Kt(E,O){l.preview("",O)}function $n(E){l.revertPreview()}function q(E,O){const $=Wl(E);l.stage(L,($==null?void 0:$.stagingKey)??E,"",O),I(Q=>{const ee=new Set(Q);return ee.delete(E),ee})}return a.jsxs("div",{className:"divide-y divide-bv-border",children:[a.jsxs("div",{className:"px-4 py-3",children:[a.jsxs("div",{className:"flex items-center gap-1.5 cursor-pointer select-none",onClick:()=>W(E=>!E),children:[a.jsx("svg",{className:`w-3 h-3 text-bv-muted transition-transform ${J?"":"rotate-90"}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 5l7 7-7 7"})}),a.jsx("span",{className:"text-[10px] font-semibold text-bv-text",children:"Box model"})]}),a.jsx("div",{className:`overflow-hidden transition-[max-height,opacity] duration-200 ease-in-out ${J?"max-h-0 opacity-0":"max-h-[600px] opacity-100"}`,children:a.jsxs("div",{className:"mt-3",children:[a.jsx(s0,{layers:Qe(gr(r,o)),onEditStart:()=>{pe("overlay",{type:"CLEAR_HIGHLIGHTS"}),g(null)},onSlotClick:(E,O,$)=>{var ke;if(O!=="color"||!$){g(null);return}const Q=gr(r,o).find(tt=>tt.layer===E),ee=`${E}-color`,de=u.get(ee)??((ke=Q==null?void 0:Q.slots.find(tt=>tt.key==="color"))==null?void 0:ke.value)??"",ge=E==="outline"?"outline-":"border-";g(tt=>(tt==null?void 0:tt.layer)===E?null:{layer:E,prefix:ge,currentClass:de,staged:!1,anchorEl:$})},onSlotHover:(E,O,$)=>{var Q;if($===null)l.revertPreview();else{const ee=`${E}-${O}`,de=gr(r,o).find(ke=>ke.layer===E),ge=O==="shorthand"?u.get(ee)??(de==null?void 0:de.shorthandValue):u.get(ee)??((Q=de==null?void 0:de.slots.find(ke=>ke.key===O))==null?void 0:Q.value);l.preview(ge??"",$)}},onSlotChange:(E,O,$)=>{var ge;const Q=`${E}-${O}`,ee=gr(r,o).find(ke=>ke.layer===E),de=O==="shorthand"?u.get(Q)??(ee==null?void 0:ee.shorthandValue):u.get(Q)??((ge=ee==null?void 0:ee.slots.find(ke=>ke.key===O))==null?void 0:ge.value);he(`${E}-${O}`,de??"",$),c(ke=>new Map(ke).set(Q,$))},onSlotRemoveHover:(E,O)=>{var de;const $=`${E}-${O}`,Q=gr(r,o).find(ge=>ge.layer===E),ee=O==="shorthand"?u.get($)??(Q==null?void 0:Q.shorthandValue):u.get($)??((de=Q==null?void 0:Q.slots.find(ge=>ge.key===O))==null?void 0:de.value);ee&&l.preview(ee,"")},onSlotRemove:(E,O)=>{var de;const $=`${E}-${O}`,Q=gr(r,o).find(ge=>ge.layer===E),ee=O==="shorthand"?u.get($)??(Q==null?void 0:Q.shorthandValue):u.get($)??((de=Q==null?void 0:Q.slots.find(ge=>ge.key===O))==null?void 0:de.value);ee&&(he(`${E}-${O}`,ee,""),c(ge=>{const ke=new Map(ge);return ke.delete($),ke}))}}),f&&a.jsx(fn,{children:a.jsx("div",{ref:y.setFloating,style:{...x,zIndex:9999,overflowY:"auto"},...C(),children:a.jsx(Fl,{prefix:f.prefix,currentValue:f.currentClass.startsWith(f.prefix)?f.currentClass.slice(f.prefix.length):"",colors:(o==null?void 0:o.colors)||{},locked:!1,lockedValue:((ne=P.find(E=>E.property===f.prefix))==null?void 0:ne.newClass)??null,onHover:E=>{p.current=E,l.preview(f.currentClass,E)},onLeave:()=>{f.staged&&p.current?(l.preview(p.current,f.currentClass),p.current=null):l.revertPreview()},onClick:E=>{const O=`${f.layer}-color`;he(f.prefix,f.currentClass,E),c($=>new Map($).set(O,E)),g($=>$?{...$,currentClass:E,staged:!0}:null)}})})})]})})]}),(v||S)&&a.jsx(fn,{children:a.jsxs("div",{ref:T.setFloating,style:{...M,zIndex:9999,overflowY:"auto"},...z(),children:[v&&a.jsx(Fl,{prefix:Pd(v.cls),currentValue:v.cls.color??"",colors:(o==null?void 0:o.colors)||{},locked:!1,lockedValue:((oe=P.find(E=>E.property===v.cls.property))==null?void 0:oe.newClass)??null,onHover:E=>ae(v.cls.fullClass,E),onLeave:Re,onClick:E=>he(v.cls.property,v.cls.fullClass,E),onRemoveHover:()=>ae(v.cls.fullClass,""),onRemove:()=>{he(v.cls.property,v.cls.fullClass,""),w(null)}}),S&&(()=>{const{layer:E}=S,O=E.type==="shadow"?"shadow-":E.type==="inset-shadow"?"inset-shadow-":E.type==="ring"?"ring-":E.type==="text-shadow"?"text-shadow-":"inset-ring-",$=E.colorClass??"",Q=$?$.slice(O.length).split("/")[0]:"";return a.jsx(Fl,{prefix:O,currentValue:Q,colors:(o==null?void 0:o.colors)||{},locked:!1,lockedValue:null,onHover:ee=>ae($,ee),onLeave:Re,onClick:ee=>{const de=E.type==="shadow"?"shadow-color":E.type==="inset-shadow"?"inset-shadow-color":E.type==="ring"?"ring-color":E.type==="text-shadow"?"text-shadow-color":"inset-ring-color";l.stage(L,de,$,ee),h(null)},onRemoveHover:()=>{$&&ae($,"")},onRemove:()=>{if($){const ee=E.type==="shadow"?"shadow-color":E.type==="inset-shadow"?"inset-shadow-color":E.type==="ring"?"ring-color":E.type==="text-shadow"?"text-shadow-color":"inset-ring-color";l.stage(L,ee,$,"")}h(null)}})})()]})}),J0.map(E=>{if(E==="shadows"){const A=X0(n,P),Y=Q0(A,o);return a.jsx(Sd,{label:"Shadows & Rings",onAddProperty:()=>{},isEmpty:!1,classCount:Y.length,children:a.jsx(G0,{layers:Y,onPreview:(H,B)=>l.preview(H,B),onRevert:()=>l.revertPreview(),onStage:(H,B)=>{const ue=H||B,re=He=>{if(He.startsWith("shadow-")){const Ke=He.slice(7).split("/")[0];return ps.has(Ke)}if(He.startsWith("inset-shadow-")){const Ke=He.slice(13).split("/")[0];return ms.has(Ke)}if(He.startsWith("ring-")||He.startsWith("inset-ring-")){const Ke=He.slice(He.startsWith("ring-")?5:11).split("/")[0];return Yr.has(Ke)}if(He.startsWith("text-shadow-")){const Ke=He.slice(12).split("/")[0];return hs.has(Ke)}return!1},De=ue.startsWith("text-shadow")?"text-shadow":ue.startsWith("inset-shadow")?"inset-shadow":ue.startsWith("inset-ring")?"inset-ring":ue.startsWith("ring")?"ring":"shadow",Ft=re(H)||H===""&&re(B)?`${De}-size`:`${De}-color`;l.stage(L,Ft,H,B)},onAdd:H=>{const B=H.startsWith("text-shadow")?"text-shadow-size":H.startsWith("inset-shadow")?"inset-shadow-size":H.startsWith("inset-ring")?"inset-ring-size":H.startsWith("ring")?"ring-size":"shadow-size";l.stage(L,B,"",H)},onRemove:H=>{const B=re=>{if(re.startsWith("shadow-")){const De=re.slice(7).split("/")[0];return ps.has(De)}if(re.startsWith("inset-shadow-")){const De=re.slice(13).split("/")[0];return ms.has(De)}if(re.startsWith("ring-")||re.startsWith("inset-ring-")){const De=re.slice(re.startsWith("ring-")?5:11).split("/")[0];return Yr.has(De)}if(re.startsWith("text-shadow-")){const De=re.slice(12).split("/")[0];return hs.has(De)}return!1},ue=[...H].reverse();for(const re of ue){const De=re.startsWith("text-shadow")?"text-shadow":re.startsWith("inset-shadow")?"inset-shadow":re.startsWith("inset-ring")?"inset-ring":re.startsWith("ring")?"ring":"shadow",Ft=B(re)?`${De}-size`:`${De}-color`;l.stage(L,Ft,re,"")}},onRemoveHover:H=>{H.length===1?l.preview(H[0],""):H.length>1&&l.preview(H.join(" "),"")},onColorClick:(H,B)=>{w(null),h(ue=>(ue==null?void 0:ue.layer.type)===H.type?null:{layer:H,anchorEl:B})}})},"shadows")}const $=(je.get(E)||[]).filter(A=>!q0(A)),Q=Am[E]||[],ee=Ux.get("flex-container")??new Set,de=Gx.get("flex-container")??new Set,ge=r.some(A=>{if(A.fullClass==="flex"||A.fullClass==="inline-flex")return!0;const Y=Vn[A.fullClass];return!!(Y&&Y.propertyKey!=="display"&&ee.has(Y.propertyKey)||ee.has(A.property))}),ke=[...de].some(A=>R.has(A)||U.has(A.replace(/-$/,""))),tt=E==="flexbox"&&(ge||ke),Lm=tt?Q.filter(A=>!de.has(A.prefix)):Q,Im=t1(Lm,$,R,U),Hs=Q.filter(A=>R.has(A.prefix)).map(A=>A.prefix),Bs=Q.filter(A=>U.has(A.prefix.replace(/-$/g,""))).map(A=>A.prefix),Om=E==="color"||E==="flexbox"&&tt||E==="borders"?!1:$.length===0&&Hs.length===0&&Bs.length===0,Dm=E==="borders"?Wn(r).slots.filter(A=>A.value!=null).length+(Wn(r).shorthandValue?1:0):$.length+Hs.length+Bs.length;return a.jsxs(Sd,{label:Z0[E]??E,availableProperties:Im,onAddProperty:ro,isEmpty:Om,classCount:Dm,children:[E==="borders"&&a.jsx(h0,{state:$e(Wn(r)),onSlotHover:(A,Y)=>{var re;const H=Wn(r),ue=(A==="all"?d.get("all")??H.shorthandValue:d.get(A)??((re=H.slots.find(De=>De.key===A))==null?void 0:re.value)??null)??"";Y===null?l.revertPreview():l.preview(ue,Y)},onSlotChange:(A,Y)=>{var ue;const H=Wn(r),B=d.get(A)??(A==="all"?H.shorthandValue:(ue=H.slots.find(re=>re.key===A))==null?void 0:ue.value)??"";he(`rounded-${A}`,B,Y),m(re=>new Map(re).set(A,Y))},onSlotRemove:A=>{var H;const Y=d.get(A)??((H=Wn(r).slots.find(B=>B.key===A))==null?void 0:H.value)??"";Y&&(he(`rounded-${A}`,Y,""),m(B=>new Map(B).set(A,null)))},onSlotRemoveHover:A=>{var H;const Y=d.get(A)??((H=Wn(r).slots.find(B=>B.key===A))==null?void 0:H.value)??"";Y&&l.preview(Y,"")},onEditStart:()=>pe("overlay",{type:"CLEAR_HIGHLIGHTS"})}),E==="color"&&a.jsx(k0,{...C0(r,(o==null?void 0:o.colors)||{},P.filter(A=>A.elementKey===L)),onPreview:ae,onPreviewBatch:A=>l.previewBatch(A),onRevert:Re,onStage:eo}),E==="flexbox"&&tt&&(()=>{const A=r,Y=A.find(te=>{const fe=Vn[te.fullClass];return(fe==null?void 0:fe.propertyKey)==="flex-direction"}),H=A.find(te=>{const fe=Vn[te.fullClass];return(fe==null?void 0:fe.propertyKey)==="justify-content"}),B=A.find(te=>{const fe=Vn[te.fullClass];return(fe==null?void 0:fe.propertyKey)==="align-items"}),ue=A.find(te=>{const fe=Vn[te.fullClass];return(fe==null?void 0:fe.propertyKey)==="flex-wrap"}),re={"flex-row":"row","flex-col":"column","flex-row-reverse":"row-reverse","flex-col-reverse":"column-reverse"},De=(Y==null?void 0:Y.fullClass)??null,ol=De?re[De]??"row":"row",Ft=Z("flex-direction",Y),He=Z("flex-wrap",ue),Ke=Z("justify-content",H),Wt=Z("align-items",B),Mm=r.find(te=>te.property==="gap"),zm=r.find(te=>te.property==="gap-x"),$m=r.find(te=>te.property==="gap-y"),oo=Z("gap",Mm),lo=Z("gap-x",zm),so=Z("gap-y",$m),Km=[{key:"gap",value:oo.effectiveClass||null,scaleValues:hr("gap-","spacing",o)},{key:"gap-x",value:lo.effectiveClass||null,scaleValues:hr("gap-x-","spacing",o)},{key:"gap-y",value:so.effectiveClass||null,scaleValues:hr("gap-y-","spacing",o)}];return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"flex justify-between items-start w-full",children:[a.jsx(T0,{currentValue:(Y==null?void 0:Y.fullClass)??null,lockedValue:Ft.effectiveClass!==Ft.originalClass?Ft.effectiveClass:null,locked:!1,onHover:te=>ae(Ft.effectiveClass,te),onLeave:Re,onClick:te=>he("flex-direction",Ft.originalClass,te)}),a.jsx(_0,{currentValue:(ue==null?void 0:ue.fullClass)??null,lockedValue:He.effectiveClass!==He.originalClass?He.effectiveClass:null,locked:!1,onHover:te=>ae(He.effectiveClass,te),onLeave:Re,onClick:te=>he("flex-wrap",He.originalClass,te)}),a.jsx(I0,{currentValue:(H==null?void 0:H.fullClass)??null,lockedValue:Ke.effectiveClass!==Ke.originalClass?Ke.effectiveClass:null,locked:!1,flexDirection:ol,onHover:te=>ae(Ke.effectiveClass,te),onLeave:Re,onClick:te=>he("justify-content",Ke.originalClass,te),onRemove:Ke.hasValue?()=>he("justify-content",Ke.originalClass,""):void 0,onRemoveHover:Ke.hasValue?()=>ae(Ke.effectiveClass,""):void 0}),a.jsx(O0,{currentValue:(B==null?void 0:B.fullClass)??null,lockedValue:Wt.effectiveClass!==Wt.originalClass?Wt.effectiveClass:null,locked:!1,flexDirection:ol,onHover:te=>ae(Wt.effectiveClass,te),onLeave:Re,onClick:te=>he("align-items",Wt.originalClass,te),onRemove:Wt.hasValue?()=>he("align-items",Wt.originalClass,""):void 0,onRemoveHover:Wt.hasValue?()=>ae(Wt.effectiveClass,""):void 0})]}),a.jsx("div",{className:"h-px w-full bg-bv-border opacity-50 my-2"}),a.jsx(D0,{slots:Km,onSlotHover:(te,fe)=>{const $u=te==="gap"?oo:te==="gap-x"?lo:so;fe===null?l.revertPreview():l.preview($u.effectiveClass,fe)},onSlotRemoveHover:te=>{const fe=te==="gap"?oo:te==="gap-x"?lo:so;fe.hasValue&&l.preview(fe.effectiveClass,"")},onSlotChange:(te,fe)=>{he(te,(te==="gap"?oo:te==="gap-x"?lo:so).originalClass,fe)},onSlotRemove:te=>{const fe=te==="gap"?oo:te==="gap-x"?lo:so;fe.hasValue&&(l.preview(fe.effectiveClass,""),he(te,fe.originalClass,""))}})]})})(),$.map(A=>{var Y,H;if(tt){const B=Vn[A.fullClass];if(B&&ee.has(B.propertyKey)||ee.has(A.property))return null}if(A.scaleName!==void 0){const B=hr(Pd(A),A.scaleName,o);if(B.length>0){const ue=((Y=P.find(re=>re.property===A.property))==null?void 0:Y.newClass)??null;return a.jsx(vn,{values:B,currentValue:A.fullClass,lockedValue:ue,locked:!1,onStart:()=>pe("overlay",{type:"CLEAR_HIGHLIGHTS"}),onHover:re=>fr(A,re),onLeave:()=>no(),onClick:re=>he(A.property,A.fullClass,re),onRemoveHover:()=>l.preview(A.fullClass,""),onRemove:()=>he(A.property,A.fullClass,"")},A.fullClass)}}if(A.scaleName===void 0&&A.color===void 0){const B=Vn[A.fullClass];if(B){const ue=((H=P.find(re=>re.property===B.propertyKey))==null?void 0:H.newClass)??null;return a.jsx(vn,{values:B.alternatives,currentValue:A.fullClass,lockedValue:ue,locked:!1,onStart:()=>pe("overlay",{type:"CLEAR_HIGHLIGHTS"}),onHover:re=>fr(A,re),onLeave:()=>no(),onClick:re=>he(B.propertyKey,A.fullClass,re),onRemoveHover:()=>l.preview(A.fullClass,""),onRemove:()=>he(B.propertyKey,A.fullClass,"")},A.fullClass)}}return a.jsxs("div",{className:`group flex items-center gap-1 px-2 py-0.5 rounded cursor-pointer text-[11px] font-mono border transition-colors ${(s==null?void 0:s.fullClass)===A.fullClass||(v==null?void 0:v.cls.fullClass)===A.fullClass?"border-bv-border bg-bv-surface-hi text-bv-text":"bg-bv-surface text-bv-text-mid border-transparent hover:border-bv-teal hover:text-bv-teal"}`,onClick:B=>to(A,B.currentTarget),children:[A.fullClass,a.jsx("span",{className:"opacity-0 group-hover:opacity-60 hover:!opacity-100 ml-0.5 shrink-0",title:"Remove class",onClick:B=>{B.stopPropagation(),he(A.property,A.fullClass,"")},onMouseEnter:B=>{B.stopPropagation(),l.preview(A.fullClass,"")},onMouseLeave:B=>{B.stopPropagation(),l.revertPreview()},children:a.jsxs("svg",{viewBox:"0 0 10 10",width:"8",height:"8",xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("line",{x1:"1",y1:"1",x2:"9",y2:"9",stroke:"#F5532D",strokeWidth:"1.8",strokeLinecap:"round"}),a.jsx("line",{x1:"9",y1:"1",x2:"1",y2:"9",stroke:"#F5532D",strokeWidth:"1.8",strokeLinecap:"round"})]})})]},A.fullClass)}),Bs.filter(A=>!(tt&&de.has(A))).map(A=>{const Y=Wl(A);if(!Y)return null;if(Y.valueType==="scalar"){const H=hr(A,Y.scaleName,o);if(H.length===0)return null;const B=P.find(ue=>ue.property===Y.stagingKey);return a.jsx(vn,{values:H,currentValue:(B==null?void 0:B.newClass)??H[Math.floor(H.length/2)],lockedValue:(B==null?void 0:B.newClass)??null,locked:!1,onStart:()=>pe("overlay",{type:"CLEAR_HIGHLIGHTS"}),onHover:ue=>Kt(A,ue),onLeave:()=>$n(),onClick:ue=>q(A,ue)},`staged-${A}`)}if(Y.valueType==="enum"&&Y.enumAlts){const H=P.find(B=>B.property===Y.stagingKey);return a.jsx(vn,{values:Y.enumAlts,currentValue:(H==null?void 0:H.newClass)??Y.enumAlts[0],lockedValue:(H==null?void 0:H.newClass)??null,locked:!1,onStart:()=>pe("overlay",{type:"CLEAR_HIGHLIGHTS"}),onHover:B=>Kt(A,B),onLeave:()=>$n(),onClick:B=>q(A,B)},`staged-${A}`)}return null}),Hs.filter(A=>!(tt&&de.has(A))).map(A=>{const Y=Wl(A);if(!Y)return null;if(Y.valueType==="scalar"){const H=hr(A,Y.scaleName,o);if(H.length>0)return a.jsx(vn,{values:H,currentValue:H[Math.floor(H.length/2)],lockedValue:null,locked:!1,ghost:!0,onStart:()=>pe("overlay",{type:"CLEAR_HIGHLIGHTS"}),onHover:B=>Kt(A,B),onLeave:()=>$n(),onClick:B=>q(A,B)},`pending-${A}`)}return Y.valueType==="enum"&&Y.enumAlts?a.jsx(vn,{values:Y.enumAlts,currentValue:Y.enumAlts[0],lockedValue:null,locked:!1,ghost:!0,onStart:()=>pe("overlay",{type:"CLEAR_HIGHLIGHTS"}),onHover:H=>Kt(A,H),onLeave:()=>$n(),onClick:H=>q(A,H)},`pending-${A}`):Y.valueType==="color"?a.jsxs("div",{"data-testid":`pending-ghost-${A}`,className:"px-2 py-0.5 rounded cursor-pointer text-[11px] font-mono border border-dashed border-bv-border text-bv-muted hover:border-bv-teal hover:text-bv-teal transition-colors",onClick:H=>{w({cls:{property:"text",fullClass:"",section:"typography",color:""},anchorEl:H.currentTarget}),i(null)},children:[A==="text-color"?"text-":A,"color"]},`pending-${A}`):null})]},E)})]})}const o1=b.lazy(()=>vy(()=>import("./DesignMode-CZvwfLMn.js"),[]).then(e=>({default:e.DesignMode}))),l1=new URLSearchParams(window.location.search),s1=l1.get("mode"),_d=[{id:"design",label:"Design"},{id:"draw",label:"Draw"},{id:"message",label:"Message"}];function i1(){return s1==="design"?a.jsx(b.Suspense,{fallback:null,children:a.jsx(o1,{})}):a.jsx(a1,{})}function a1(){const[e,t]=b.useState(!1),[n,r]=b.useState(null),[o,l]=b.useState(0),[s,i]=b.useState("design"),[u,c]=b.useState(!1),d=cv();b.useEffect(()=>{const R=Gy(()=>{t(!0);try{const W=localStorage.getItem("tw-panel-container");W&&W!=="popover"&&pe("overlay",{type:"SWITCH_CONTAINER",container:W})}catch{}}),I=Yy(()=>t(!1)),J=Jp(W=>{W.type==="ELEMENT_SELECTED"?(r({componentName:W.componentName,instanceCount:W.instanceCount,classes:W.classes,parsedClasses:_y(W.classes,By),tailwindConfig:W.tailwindConfig}),l(le=>le+1),c(!1)):W.type==="SELECT_MODE_CHANGED"?c(!!W.active):W.type==="QUEUE_UPDATE"?d.handleQueueUpdate({draftCount:W.draftCount,committedCount:W.committedCount,implementingCount:W.implementingCount,implementedCount:W.implementedCount,partialCount:W.partialCount,errorCount:W.errorCount,draft:W.draft,commits:W.commits,agentWaiting:W.agentWaiting}):W.type==="PATCH_UPDATE"&&d.handlePatchUpdate({staged:W.staged,committed:W.committed,implementing:W.implementing,implemented:W.implemented,patches:W.patches})});return Zp(),t(Qy()),()=>{R(),I(),J()}},[]);const{draft:m,committed:f,implementing:g,implemented:v,partial:w,error:S}=d.counts,h=f>0&&!d.agentWaiting&&g===0,p=new Map(d.patches.filter(R=>R.status==="staged").map(R=>[R.id,{id:R.id,kind:R.kind??"class-change",elementKey:R.elementKey,status:R.status,originalClass:R.originalClass,newClass:R.newClass,property:R.property,timestamp:R.timestamp,component:R.component,message:R.message,image:R.image}])),y=new Set(d.queueState.draft.map(R=>R.id)),x=[...d.queueState.draft.map(R=>p.get(R.id)??R),...d.patches.filter(R=>R.status==="staged"&&!y.has(R.id)).map(R=>p.get(R.id))],j=d.queueState.commits.filter(R=>R.status==="committed"),k=d.queueState.commits.filter(R=>R.status==="implementing"),C=d.queueState.commits.filter(R=>R.status==="implemented"),T="Please implement the next change and continue implementing changes with VyBit.";async function M(R){if(navigator.clipboard){try{if((await navigator.permissions.query({name:"clipboard-write"})).state==="denied"){_(R);return}}catch{}navigator.clipboard.writeText(R).catch(()=>_(R))}else _(R)}function _(R){const I=document.createElement("textarea");I.value=R,I.style.position="fixed",I.style.opacity="0",document.body.appendChild(I),I.select(),document.execCommand("copy"),document.body.removeChild(I)}const F=a.jsxs("div",{className:"shrink-0",children:[!e&&a.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 py-1.5 bg-amber-950/40 border-t border-amber-800/40 text-amber-300 text-[10px] font-medium",children:[a.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-bv-orange animate-pulse shrink-0"}),a.jsxs("span",{className:"flex-1 leading-tight",children:["No agent listening —"," ",a.jsx("a",{href:"https://github.com/bitovi/vybit?tab=readme-ov-file#telling-your-agent-to-start-making-features",target:"_blank",rel:"noreferrer",className:"underline hover:text-amber-100",children:"ask your agent"})," ","to start!"]}),a.jsx("button",{onClick:()=>M(T),className:"shrink-0 px-1.5 py-0.5 rounded border border-amber-700/50 bg-amber-900/40 hover:bg-amber-800/40 text-amber-300 font-semibold text-[9px] transition-colors",title:`Copy: "${T}"`,children:"Copy prompt"})]}),h&&a.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 py-1.5 bg-amber-950/40 border-t border-amber-800/40 text-amber-300 text-[10px] font-medium",children:[a.jsx("svg",{width:"12",height:"12",viewBox:"0 0 20 20",fill:"currentColor",className:"shrink-0 text-amber-400",children:a.jsx("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.19-1.458-1.516-2.625L8.485 2.495zM10 5a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0v-3.5A.75.75 0 0110 5zm0 9a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})}),a.jsxs("span",{className:"flex-1 leading-tight",children:["No agent watching —"," ",a.jsx("a",{href:"https://github.com/bitovi/vybit?tab=readme-ov-file#telling-your-agent-to-start-making-features",target:"_blank",rel:"noreferrer",className:"underline hover:text-amber-100",children:"ask your agent"})," ","to start"]}),a.jsx("button",{onClick:()=>M(T),className:"shrink-0 px-1.5 py-0.5 rounded border border-amber-700/50 bg-amber-900/40 hover:bg-amber-800/40 text-amber-300 font-semibold text-[9px] transition-colors",title:`Copy: "${T}"`,children:"Copy prompt"})]}),a.jsxs("div",{className:"flex items-center justify-center px-3 py-1.5 border-t border-bv-border gap-3 text-[10px]",children:[a.jsx(Sl,{label:"draft",count:m,items:x,activeColor:"text-amber-400",onDiscard:R=>d.discard(R),onCommitAll:()=>d.commitAll(),onDiscardAll:()=>d.discardAll()}),a.jsx(Sl,{label:"committed",count:f,items:j.flatMap(R=>R.patches),activeColor:"text-bv-orange"}),a.jsx(Sl,{label:"implementing",count:g,items:k.flatMap(R=>R.patches),activeColor:"text-blue-400"}),a.jsx(Sl,{label:"implemented",count:v,items:C.flatMap(R=>R.patches),activeColor:"text-bv-teal"})]})]});if(!n)return a.jsxs("div",{className:"h-full flex flex-col",children:[a.jsx("div",{className:"px-3 pt-3 pb-2 border-b border-bv-border",children:a.jsxs("div",{className:"flex items-center justify-between gap-2",children:[a.jsx(Ad,{active:u,onToggle:()=>{const R=!u;c(R),pe("overlay",{type:"TOGGLE_SELECT_MODE",active:R})}}),a.jsx("div",{className:"flex-1 min-w-0",children:u?a.jsx("span",{className:"text-[11px] text-bv-teal font-medium",children:"● Selecting… click an element on the page"}):a.jsx("span",{className:"text-[12px] text-bv-muted",children:"No element selected"})}),a.jsx(Zc,{})]})}),a.jsx(ed,{tabs:_d,activeTab:s,onTabChange:i}),a.jsx("div",{className:"flex-1 overflow-auto",children:s==="draw"?a.jsx(Jc,{}):s==="message"?a.jsx(qc,{draft:x,currentElementKey:"",onAddMessage:(R,I)=>d.stageMessage(R,I),onDiscard:R=>d.discard(R)}):u?a.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 p-8",children:[a.jsx("div",{className:"w-10 h-10 rounded-full bg-bv-teal text-white flex items-center justify-center",children:a.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 16 16",fill:"currentColor",children:[a.jsx("path",{d:"M14,0H2C.895,0,0,.895,0,2V14c0,1.105,.895,2,2,2H6c.552,0,1-.448,1-1h0c0-.552-.448-1-1-1H2V2H14V6c0,.552,.448,1,1,1h0c.552,0,1-.448,1-1V2c0-1.105-.895-2-2-2Z"}),a.jsx("path",{d:"M12.043,10.629l2.578-.644c.268-.068,.43-.339,.362-.607-.043-.172-.175-.308-.345-.358l-7-2c-.175-.051-.363-.002-.492,.126-.128,.129-.177,.317-.126,.492l2,7c.061,.214,.257,.362,.48,.362h.009c.226-.004,.421-.16,.476-.379l.644-2.578,3.664,3.664c.397,.384,1.03,.373,1.414-.025,.374-.388,.374-1.002,0-1.389l-3.664-3.664Z"})]})}),a.jsx("span",{className:"text-[12px] text-bv-teal font-medium",children:"Selection mode active"}),a.jsxs("span",{className:"text-[12px] text-bv-muted text-center leading-relaxed",children:["Hover over elements on the page to preview, then click to select.",a.jsx("br",{}),"Press"," ",a.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded bg-white/6 border border-white/8 font-mono text-[10px] text-bv-text-mid leading-none",children:"Esc"})," ","to cancel."]})]}):a.jsx("div",{className:"flex flex-1 flex-col justify-center p-4",children:a.jsxs("button",{onClick:()=>{c(!0),pe("overlay",{type:"TOGGLE_SELECT_MODE",active:!0})},className:"w-full flex flex-col items-center gap-3 px-6 py-5 rounded-lg border border-bv-border bg-bv-surface hover:border-bv-teal hover:bg-bv-teal/5 transition-all cursor-pointer",children:[a.jsx("div",{className:"w-14 h-14 rounded-full bg-bv-teal/10 text-bv-teal flex items-center justify-center",children:a.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 64 64",fill:"currentColor",children:[a.jsx("path",{d:"M2,9C1.447,9,1,8.552,1,8V2c0-0.552,0.447-1,1-1h6c0.553,0,1,0.448,1,1S8.553,3,8,3H3v5C3,8.552,2.553,9,2,9z"}),a.jsx("path",{d:"M8,48H2c-0.553,0-1-0.448-1-1v-6c0-0.552,0.447-1,1-1s1,0.448,1,1v5h5c0.553,0,1,0.448,1,1S8.553,48,8,48z"}),a.jsx("path",{d:"M47,9c-0.553,0-1-0.448-1-1V3h-5c-0.553,0-1-0.448-1-1s0.447-1,1-1h6c0.553,0,1,0.448,1,1v6C48,8.552,47.553,9,47,9z"}),a.jsx("path",{d:"M21,3h-6c-0.553,0-1-0.448-1-1s0.447-1,1-1h6c0.553,0,1,0.448,1,1S21.553,3,21,3z"}),a.jsx("path",{d:"M2,22c-0.553,0-1-0.448-1-1v-6c0-0.552,0.447-1,1-1s1,0.448,1,1v6C3,21.552,2.553,22,2,22z"}),a.jsx("path",{d:"M2,35c-0.553,0-1-0.448-1-1v-6c0-0.552,0.447-1,1-1s1,0.448,1,1v6C3,34.552,2.553,35,2,35z"}),a.jsx("path",{d:"M47,22c-0.553,0-1-0.448-1-1v-6c0-0.552,0.447-1,1-1s1,0.448,1,1v6C48,21.552,47.553,22,47,22z"}),a.jsx("path",{d:"M47,31c-0.553,0-1-0.448-1-1v-2c0-0.552,0.447-1,1-1s1,0.448,1,1v2C48,30.552,47.553,31,47,31z"}),a.jsx("path",{d:"M34,3h-6c-0.553,0-1-0.448-1-1s0.447-1,1-1h6c0.553,0,1,0.448,1,1S34.553,3,34,3z"}),a.jsx("path",{d:"M21,48h-6c-0.553,0-1-0.448-1-1s0.447-1,1-1h6c0.553,0,1,0.448,1,1S21.553,48,21,48z"}),a.jsx("path",{d:"M30,48h-2c-0.553,0-1-0.448-1-1s0.447-1,1-1h2c0.553,0,1,0.448,1,1S30.553,48,30,48z"}),a.jsx("path",{d:"M62.707,57.293L51.688,46.274l10.759-5.379c0.368-0.184,0.586-0.575,0.549-0.985c-0.037-0.41-0.322-0.755-0.717-0.87l-31-9c-0.355-0.1-0.729-0.005-0.986,0.253c-0.258,0.258-0.355,0.636-0.253,0.986l9,31c0.114,0.396,0.46,0.68,0.869,0.717C39.94,62.999,39.971,63,40,63c0.376,0,0.724-0.212,0.895-0.553l5.38-10.759l11.019,11.019c0.391,0.391,1.023,0.391,1.414,0l4-4C63.098,58.316,63.098,57.684,62.707,57.293z"})]})}),a.jsx("span",{className:"text-[12px] text-bv-text font-medium",children:"Select an element to inspect"}),a.jsxs("span",{className:"inline-flex items-center gap-1",children:[a.jsx("span",{className:"w-5 h-5 rounded flex items-center justify-center bg-white/6 border border-white/8 font-mono text-[10px] font-semibold text-bv-text-mid leading-none",children:"⌘"}),a.jsx("span",{className:"w-5 h-5 rounded flex items-center justify-center bg-white/6 border border-white/8 font-mono text-[10px] font-semibold text-bv-text-mid leading-none",children:"⇧"}),a.jsx("span",{className:"w-5 h-5 rounded flex items-center justify-center bg-white/6 border border-white/8 font-mono text-[10px] font-semibold text-bv-text-mid leading-none",children:"C"})]})]})})}),F]});const z=n.parsedClasses;return a.jsxs("div",{className:"h-full flex flex-col",children:[a.jsx("div",{className:"px-3 pt-3 pb-2 border-b border-bv-border",children:a.jsxs("div",{className:"flex items-center justify-between gap-2",children:[a.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[a.jsx(Ad,{active:u,onToggle:()=>{const R=!u;c(R),pe("overlay",{type:"TOGGLE_SELECT_MODE",active:R})}}),a.jsxs("div",{className:"font-[family-name:var(--font-display)] font-bold text-[13px] text-bv-text leading-tight truncate",children:[n.componentName," ",a.jsxs("span",{className:"font-[family-name:var(--font-ui)] font-normal text-bv-text-mid",children:["— ",n.instanceCount," instance",n.instanceCount!==1?"s":""]})]})]}),a.jsx(Zc,{})]})}),a.jsx(ed,{tabs:_d,activeTab:s,onTabChange:i}),a.jsxs("div",{className:"flex-1 overflow-auto",children:[s==="design"&&a.jsx(r1,{componentName:n.componentName,instanceCount:n.instanceCount,rawClasses:n.classes,parsedClasses:z,tailwindConfig:n.tailwindConfig,patchManager:d},o),s==="draw"&&a.jsx(Jc,{}),s==="message"&&a.jsx(qc,{draft:x,currentElementKey:n.componentName,onAddMessage:(R,I)=>d.stageMessage(R,I,n.componentName),onDiscard:R=>d.discard(R)})]}),F]})}function Ad({active:e,onToggle:t}){return a.jsx("button",{onClick:t,title:`${e?"Stop selecting":"Select an element"} (⌘⇧C)`,className:`w-7 h-7 rounded flex items-center justify-center shrink-0 border transition-all
|
|
62
|
-
${e?"bg-bv-teal border-bv-teal text-white":"bg-transparent border-bv-border text-bv-text-mid hover:border-bv-teal hover:text-bv-teal hover:bg-bv-teal/10"}`,children:a.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"currentColor",children:[a.jsx("path",{d:"M14,0H2C.895,0,0,.895,0,2V14c0,1.105,.895,2,2,2H6c.552,0,1-.448,1-1h0c0-.552-.448-1-1-1H2V2H14V6c0,.552,.448,1,1,1h0c.552,0,1-.448,1-1V2c0-1.105-.895-2-2-2Z"}),a.jsx("path",{d:"M12.043,10.629l2.578-.644c.268-.068,.43-.339,.362-.607-.043-.172-.175-.308-.345-.358l-7-2c-.175-.051-.363-.002-.492,.126-.128,.129-.177,.317-.126,.492l2,7c.061,.214,.257,.362,.48,.362h.009c.226-.004,.421-.16,.476-.379l.644-2.578,3.664,3.664c.397,.384,1.03,.373,1.414-.025,.374-.388,.374-1.002,0-1.389l-3.664-3.664Z"})]})})}Ii.createRoot(document.getElementById("root")).render(a.jsx(Vd.StrictMode,{children:a.jsx(i1,{})}));export{Jp as a,Zp as c,a as j,Gy as o,b as r,_r as s};
|