@bitovi/vybit 0.13.1 → 0.13.3
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/README.md +1 -1
- package/overlay/dist/overlay.js +114 -32
- package/package.json +1 -1
- package/panel/dist/assets/{DesignMode-DotlKICs.js → DesignMode-DiJSKaJo.js} +1 -1
- package/panel/dist/assets/index--Jf_7IdL.js +61 -0
- package/panel/dist/index.html +1 -1
- package/panel/dist/assets/index-BWb2WAKo.js +0 -61
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
var tm=Object.defineProperty;var nm=(e,t,n)=>t in e?tm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var rt=(e,t,n)=>nm(e,typeof t!="symbol"?t+"":t,n);function rm(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 om(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vd={exports:{}},Ps={},Ud={exports:{}},ce={};/**
|
|
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 qo=Symbol.for("react.element"),lm=Symbol.for("react.portal"),sm=Symbol.for("react.fragment"),im=Symbol.for("react.strict_mode"),am=Symbol.for("react.profiler"),um=Symbol.for("react.provider"),cm=Symbol.for("react.context"),dm=Symbol.for("react.forward_ref"),fm=Symbol.for("react.suspense"),pm=Symbol.for("react.memo"),hm=Symbol.for("react.lazy"),Xu=Symbol.iterator;function mm(e){return e===null||typeof e!="object"?null:(e=Xu&&e[Xu]||e["@@iterator"],typeof e=="function"?e:null)}var Gd={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Yd=Object.assign,Qd={};function qr(e,t,n){this.props=e,this.context=t,this.refs=Qd,this.updater=n||Gd}qr.prototype.isReactComponent={};qr.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")};qr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Xd(){}Xd.prototype=qr.prototype;function Ya(e,t,n){this.props=e,this.context=t,this.refs=Qd,this.updater=n||Gd}var Qa=Ya.prototype=new Xd;Qa.constructor=Ya;Yd(Qa,qr.prototype);Qa.isPureReactComponent=!0;var Zu=Array.isArray,Zd=Object.prototype.hasOwnProperty,Xa={current:null},Jd={key:!0,ref:!0,__self:!0,__source:!0};function qd(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)Zd.call(t,r)&&!Jd.hasOwnProperty(r)&&(o[r]=t[r]);var a=arguments.length-2;if(a===1)o.children=n;else if(1<a){for(var u=Array(a),c=0;c<a;c++)u[c]=arguments[c+2];o.children=u}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)o[r]===void 0&&(o[r]=a[r]);return{$$typeof:qo,type:e,key:l,ref:s,props:o,_owner:Xa.current}}function gm(e,t){return{$$typeof:qo,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Za(e){return typeof e=="object"&&e!==null&&e.$$typeof===qo}function ym(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Ju=/\/+/g;function qs(e,t){return typeof e=="object"&&e!==null&&e.key!=null?ym(""+e.key):t.toString(36)}function Pl(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 qo:case lm:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+qs(s,0):r,Zu(o)?(n="",e!=null&&(n=e.replace(Ju,"$&/")+"/"),Pl(o,t,n,"",function(c){return c})):o!=null&&(Za(o)&&(o=gm(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(Ju,"$&/")+"/")+e)),t.push(o)),1;if(s=0,r=r===""?".":r+":",Zu(e))for(var a=0;a<e.length;a++){l=e[a];var u=r+qs(l,a);s+=Pl(l,t,n,u,o)}else if(u=mm(e),typeof u=="function")for(e=u.call(e),a=0;!(l=e.next()).done;)l=l.value,u=r+qs(l,a++),s+=Pl(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 al(e,t,n){if(e==null)return e;var r=[],o=0;return Pl(e,r,"","",function(l){return t.call(n,l,o++)}),r}function xm(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 et={current:null},Il={transition:null},vm={ReactCurrentDispatcher:et,ReactCurrentBatchConfig:Il,ReactCurrentOwner:Xa};function ef(){throw Error("act(...) is not supported in production builds of React.")}ce.Children={map:al,forEach:function(e,t,n){al(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return al(e,function(){t++}),t},toArray:function(e){return al(e,function(t){return t})||[]},only:function(e){if(!Za(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ce.Component=qr;ce.Fragment=sm;ce.Profiler=am;ce.PureComponent=Ya;ce.StrictMode=im;ce.Suspense=fm;ce.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=vm;ce.act=ef;ce.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=Yd({},e.props),o=e.key,l=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(l=t.ref,s=Xa.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(u in t)Zd.call(t,u)&&!Jd.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&a!==void 0?a[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){a=Array(u);for(var c=0;c<u;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:qo,type:e.type,key:o,ref:l,props:r,_owner:s}};ce.createContext=function(e){return e={$$typeof:cm,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:um,_context:e},e.Consumer=e};ce.createElement=qd;ce.createFactory=function(e){var t=qd.bind(null,e);return t.type=e,t};ce.createRef=function(){return{current:null}};ce.forwardRef=function(e){return{$$typeof:dm,render:e}};ce.isValidElement=Za;ce.lazy=function(e){return{$$typeof:hm,_payload:{_status:-1,_result:e},_init:xm}};ce.memo=function(e,t){return{$$typeof:pm,type:e,compare:t===void 0?null:t}};ce.startTransition=function(e){var t=Il.transition;Il.transition={};try{e()}finally{Il.transition=t}};ce.unstable_act=ef;ce.useCallback=function(e,t){return et.current.useCallback(e,t)};ce.useContext=function(e){return et.current.useContext(e)};ce.useDebugValue=function(){};ce.useDeferredValue=function(e){return et.current.useDeferredValue(e)};ce.useEffect=function(e,t){return et.current.useEffect(e,t)};ce.useId=function(){return et.current.useId()};ce.useImperativeHandle=function(e,t,n){return et.current.useImperativeHandle(e,t,n)};ce.useInsertionEffect=function(e,t){return et.current.useInsertionEffect(e,t)};ce.useLayoutEffect=function(e,t){return et.current.useLayoutEffect(e,t)};ce.useMemo=function(e,t){return et.current.useMemo(e,t)};ce.useReducer=function(e,t,n){return et.current.useReducer(e,t,n)};ce.useRef=function(e){return et.current.useRef(e)};ce.useState=function(e){return et.current.useState(e)};ce.useSyncExternalStore=function(e,t,n){return et.current.useSyncExternalStore(e,t,n)};ce.useTransition=function(){return et.current.useTransition()};ce.version="18.3.1";Ud.exports=ce;var w=Ud.exports;const tf=om(w),nf=rm({__proto__:null,default:tf},[w]);/**
|
|
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 bm=w,wm=Symbol.for("react.element"),Sm=Symbol.for("react.fragment"),Cm=Object.prototype.hasOwnProperty,km=bm.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,jm={key:!0,ref:!0,__self:!0,__source:!0};function rf(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)Cm.call(t,r)&&!jm.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:wm,type:e,key:l,ref:s,props:o,_owner:km.current}}Ps.Fragment=Sm;Ps.jsx=rf;Ps.jsxs=rf;Vd.exports=Ps;var i=Vd.exports,Wi={},of={exports:{}},mt={},lf={exports:{}},sf={};/**
|
|
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(E,R){var P=E.length;E.push(R);e:for(;0<P;){var G=P-1>>>1,J=E[G];if(0<o(J,R))E[G]=R,E[P]=J,P=G;else break e}}function n(E){return E.length===0?null:E[0]}function r(E){if(E.length===0)return null;var R=E[0],P=E.pop();if(P!==R){E[0]=P;e:for(var G=0,J=E.length,Ke=J>>>1;G<Ke;){var Re=2*(G+1)-1,ye=E[Re],de=Re+1,O=E[de];if(0>o(ye,P))de<J&&0>o(O,ye)?(E[G]=O,E[de]=P,G=de):(E[G]=ye,E[Re]=P,G=Re);else if(de<J&&0>o(O,P))E[G]=O,E[de]=P,G=de;else break e}}return R}function o(E,R){var P=E.sortIndex-R.sortIndex;return P!==0?P:E.id-R.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var u=[],c=[],f=1,p=null,d=3,m=!1,v=!1,b=!1,S=typeof setTimeout=="function"?setTimeout:null,h=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(E){for(var R=n(c);R!==null;){if(R.callback===null)r(c);else if(R.startTime<=E)r(c),R.sortIndex=R.expirationTime,t(u,R);else break;R=n(c)}}function x(E){if(b=!1,y(E),!v)if(n(u)!==null)v=!0,Y(k);else{var R=n(c);R!==null&&X(x,R.startTime-E)}}function k(E,R){v=!1,b&&(b=!1,h(j),j=-1),m=!0;var P=d;try{for(y(R),p=n(u);p!==null&&(!(p.expirationTime>R)||E&&!D());){var G=p.callback;if(typeof G=="function"){p.callback=null,d=p.priorityLevel;var J=G(p.expirationTime<=R);R=e.unstable_now(),typeof J=="function"?p.callback=J:p===n(u)&&r(u),y(R)}else r(u);p=n(u)}if(p!==null)var Ke=!0;else{var Re=n(c);Re!==null&&X(x,Re.startTime-R),Ke=!1}return Ke}finally{p=null,d=P,m=!1}}var C=!1,T=null,j=-1,L=5,I=-1;function D(){return!(e.unstable_now()-I<L)}function V(){if(T!==null){var E=e.unstable_now();I=E;var R=!0;try{R=T(!0,E)}finally{R?H():(C=!1,T=null)}}else C=!1}var H;if(typeof g=="function")H=function(){g(V)};else if(typeof MessageChannel<"u"){var _=new MessageChannel,F=_.port2;_.port1.onmessage=V,H=function(){F.postMessage(null)}}else H=function(){S(V,0)};function Y(E){T=E,C||(C=!0,H())}function X(E,R){j=S(function(){E(e.unstable_now())},R)}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(E){E.callback=null},e.unstable_continueExecution=function(){v||m||(v=!0,Y(k))},e.unstable_forceFrameRate=function(E){0>E||125<E?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<E?Math.floor(1e3/E):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(E){switch(d){case 1:case 2:case 3:var R=3;break;default:R=d}var P=d;d=R;try{return E()}finally{d=P}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(E,R){switch(E){case 1:case 2:case 3:case 4:case 5:break;default:E=3}var P=d;d=E;try{return R()}finally{d=P}},e.unstable_scheduleCallback=function(E,R,P){var G=e.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?G+P:G):P=G,E){case 1:var J=-1;break;case 2:J=250;break;case 5:J=1073741823;break;case 4:J=1e4;break;default:J=5e3}return J=P+J,E={id:f++,callback:R,priorityLevel:E,startTime:P,expirationTime:J,sortIndex:-1},P>G?(E.sortIndex=P,t(c,E),n(u)===null&&E===n(c)&&(b?(h(j),j=-1):b=!0,X(x,P-G))):(E.sortIndex=J,t(u,E),v||m||(v=!0,Y(k))),E},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(E){var R=d;return function(){var P=d;d=R;try{return E.apply(this,arguments)}finally{d=P}}}})(sf);lf.exports=sf;var Em=lf.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 Tm=w,ht=Em;function $(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 af=new Set,Ao={};function hr(e,t){Br(e,t),Br(e+"Capture",t)}function Br(e,t){for(Ao[e]=t,e=0;e<t.length;e++)af.add(t[e])}var sn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Bi=Object.prototype.hasOwnProperty,Nm=/^[: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]*$/,qu={},ec={};function Rm(e){return Bi.call(ec,e)?!0:Bi.call(qu,e)?!1:Nm.test(e)?ec[e]=!0:(qu[e]=!0,!1)}function Pm(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 Im(e,t,n,r){if(t===null||typeof t>"u"||Pm(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 tt(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 Ue={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ue[e]=new tt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ue[t]=new tt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ue[e]=new tt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ue[e]=new tt(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){Ue[e]=new tt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ue[e]=new tt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ue[e]=new tt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ue[e]=new tt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ue[e]=new tt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ja=/[\-:]([a-z])/g;function qa(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(Ja,qa);Ue[t]=new tt(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(Ja,qa);Ue[t]=new tt(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(Ja,qa);Ue[t]=new tt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ue[e]=new tt(e,1,!1,e.toLowerCase(),null,!1,!1)});Ue.xlinkHref=new tt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ue[e]=new tt(e,1,!1,e.toLowerCase(),null,!0,!0)});function eu(e,t,n,r){var o=Ue.hasOwnProperty(t)?Ue[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Im(t,n,o,r)&&(n=null),r||o===null?Rm(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 xn=Tm.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ul=Symbol.for("react.element"),Cr=Symbol.for("react.portal"),kr=Symbol.for("react.fragment"),tu=Symbol.for("react.strict_mode"),Vi=Symbol.for("react.profiler"),uf=Symbol.for("react.provider"),cf=Symbol.for("react.context"),nu=Symbol.for("react.forward_ref"),Ui=Symbol.for("react.suspense"),Gi=Symbol.for("react.suspense_list"),ru=Symbol.for("react.memo"),bn=Symbol.for("react.lazy"),df=Symbol.for("react.offscreen"),tc=Symbol.iterator;function ao(e){return e===null||typeof e!="object"?null:(e=tc&&e[tc]||e["@@iterator"],typeof e=="function"?e:null)}var Te=Object.assign,ei;function vo(e){if(ei===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);ei=t&&t[1]||""}return`
|
|
34
|
+
`+ei+e}var ti=!1;function ni(e,t){if(!e||ti)return"";ti=!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,a=l.length-1;1<=s&&0<=a&&o[s]!==l[a];)a--;for(;1<=s&&0<=a;s--,a--)if(o[s]!==l[a]){if(s!==1||a!==1)do if(s--,a--,0>a||o[s]!==l[a]){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<=a);break}}}finally{ti=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?vo(e):""}function _m(e){switch(e.tag){case 5:return vo(e.type);case 16:return vo("Lazy");case 13:return vo("Suspense");case 19:return vo("SuspenseList");case 0:case 2:case 15:return e=ni(e.type,!1),e;case 11:return e=ni(e.type.render,!1),e;case 1:return e=ni(e.type,!0),e;default:return""}}function Yi(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 kr:return"Fragment";case Cr:return"Portal";case Vi:return"Profiler";case tu:return"StrictMode";case Ui:return"Suspense";case Gi:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case cf:return(e.displayName||"Context")+".Consumer";case uf:return(e._context.displayName||"Context")+".Provider";case nu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ru:return t=e.displayName||null,t!==null?t:Yi(e.type)||"Memo";case bn:t=e._payload,e=e._init;try{return Yi(e(t))}catch{}}return null}function Am(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 Yi(t);case 8:return t===tu?"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 Mn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ff(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Lm(e){var t=ff(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 cl(e){e._valueTracker||(e._valueTracker=Lm(e))}function pf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ff(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ql(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 Qi(e,t){var n=t.checked;return Te({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function nc(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Mn(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 hf(e,t){t=t.checked,t!=null&&eu(e,"checked",t,!1)}function Xi(e,t){hf(e,t);var n=Mn(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")?Zi(e,t.type,n):t.hasOwnProperty("defaultValue")&&Zi(e,t.type,Mn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function rc(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 Zi(e,t,n){(t!=="number"||Ql(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var bo=Array.isArray;function Or(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=""+Mn(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 Ji(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error($(91));return Te({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function oc(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error($(92));if(bo(n)){if(1<n.length)throw Error($(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Mn(n)}}function mf(e,t){var n=Mn(t.value),r=Mn(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 lc(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function gf(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 qi(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?gf(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var dl,yf=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(dl=dl||document.createElement("div"),dl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=dl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Lo(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ko={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},Dm=["Webkit","ms","Moz","O"];Object.keys(ko).forEach(function(e){Dm.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ko[t]=ko[e]})});function xf(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ko.hasOwnProperty(e)&&ko[e]?(""+t).trim():t+"px"}function vf(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=xf(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var Om=Te({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 ea(e,t){if(t){if(Om[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error($(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error($(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error($(61))}if(t.style!=null&&typeof t.style!="object")throw Error($(62))}}function ta(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 na=null;function ou(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ra=null,Mr=null,$r=null;function sc(e){if(e=nl(e)){if(typeof ra!="function")throw Error($(280));var t=e.stateNode;t&&(t=Ds(t),ra(e.stateNode,e.type,t))}}function bf(e){Mr?$r?$r.push(e):$r=[e]:Mr=e}function wf(){if(Mr){var e=Mr,t=$r;if($r=Mr=null,sc(e),t)for(e=0;e<t.length;e++)sc(t[e])}}function Sf(e,t){return e(t)}function Cf(){}var ri=!1;function kf(e,t,n){if(ri)return e(t,n);ri=!0;try{return Sf(e,t,n)}finally{ri=!1,(Mr!==null||$r!==null)&&(Cf(),wf())}}function Do(e,t){var n=e.stateNode;if(n===null)return null;var r=Ds(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($(231,t,typeof n));return n}var oa=!1;if(sn)try{var uo={};Object.defineProperty(uo,"passive",{get:function(){oa=!0}}),window.addEventListener("test",uo,uo),window.removeEventListener("test",uo,uo)}catch{oa=!1}function Mm(e,t,n,r,o,l,s,a,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(f){this.onError(f)}}var jo=!1,Xl=null,Zl=!1,la=null,$m={onError:function(e){jo=!0,Xl=e}};function zm(e,t,n,r,o,l,s,a,u){jo=!1,Xl=null,Mm.apply($m,arguments)}function Km(e,t,n,r,o,l,s,a,u){if(zm.apply(this,arguments),jo){if(jo){var c=Xl;jo=!1,Xl=null}else throw Error($(198));Zl||(Zl=!0,la=c)}}function mr(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 jf(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 ic(e){if(mr(e)!==e)throw Error($(188))}function Fm(e){var t=e.alternate;if(!t){if(t=mr(e),t===null)throw Error($(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 ic(o),e;if(l===r)return ic(o),t;l=l.sibling}throw Error($(188))}if(n.return!==r.return)n=o,r=l;else{for(var s=!1,a=o.child;a;){if(a===n){s=!0,n=o,r=l;break}if(a===r){s=!0,r=o,n=l;break}a=a.sibling}if(!s){for(a=l.child;a;){if(a===n){s=!0,n=l,r=o;break}if(a===r){s=!0,r=l,n=o;break}a=a.sibling}if(!s)throw Error($(189))}}if(n.alternate!==r)throw Error($(190))}if(n.tag!==3)throw Error($(188));return n.stateNode.current===n?e:t}function Ef(e){return e=Fm(e),e!==null?Tf(e):null}function Tf(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Tf(e);if(t!==null)return t;e=e.sibling}return null}var Nf=ht.unstable_scheduleCallback,ac=ht.unstable_cancelCallback,Hm=ht.unstable_shouldYield,Wm=ht.unstable_requestPaint,Ie=ht.unstable_now,Bm=ht.unstable_getCurrentPriorityLevel,lu=ht.unstable_ImmediatePriority,Rf=ht.unstable_UserBlockingPriority,Jl=ht.unstable_NormalPriority,Vm=ht.unstable_LowPriority,Pf=ht.unstable_IdlePriority,Is=null,$t=null;function Um(e){if($t&&typeof $t.onCommitFiberRoot=="function")try{$t.onCommitFiberRoot(Is,e,void 0,(e.current.flags&128)===128)}catch{}}var It=Math.clz32?Math.clz32:Qm,Gm=Math.log,Ym=Math.LN2;function Qm(e){return e>>>=0,e===0?32:31-(Gm(e)/Ym|0)|0}var fl=64,pl=4194304;function wo(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 ql(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 a=s&~o;a!==0?r=wo(a):(l&=s,l!==0&&(r=wo(l)))}else s=n&~o,s!==0?r=wo(s):l!==0&&(r=wo(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-It(t),o=1<<n,r|=e[n],t&=~o;return r}function Xm(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 Zm(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,l=e.pendingLanes;0<l;){var s=31-It(l),a=1<<s,u=o[s];u===-1?(!(a&n)||a&r)&&(o[s]=Xm(a,t)):u<=t&&(e.expiredLanes|=a),l&=~a}}function sa(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function If(){var e=fl;return fl<<=1,!(fl&4194240)&&(fl=64),e}function oi(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function el(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-It(t),e[t]=n}function Jm(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-It(n),l=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~l}}function su(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-It(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var he=0;function _f(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Af,iu,Lf,Df,Of,ia=!1,hl=[],Nn=null,Rn=null,Pn=null,Oo=new Map,Mo=new Map,Cn=[],qm="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 uc(e,t){switch(e){case"focusin":case"focusout":Nn=null;break;case"dragenter":case"dragleave":Rn=null;break;case"mouseover":case"mouseout":Pn=null;break;case"pointerover":case"pointerout":Oo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Mo.delete(t.pointerId)}}function co(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=nl(t),t!==null&&iu(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function eg(e,t,n,r,o){switch(t){case"focusin":return Nn=co(Nn,e,t,n,r,o),!0;case"dragenter":return Rn=co(Rn,e,t,n,r,o),!0;case"mouseover":return Pn=co(Pn,e,t,n,r,o),!0;case"pointerover":var l=o.pointerId;return Oo.set(l,co(Oo.get(l)||null,e,t,n,r,o)),!0;case"gotpointercapture":return l=o.pointerId,Mo.set(l,co(Mo.get(l)||null,e,t,n,r,o)),!0}return!1}function Mf(e){var t=Zn(e.target);if(t!==null){var n=mr(t);if(n!==null){if(t=n.tag,t===13){if(t=jf(n),t!==null){e.blockedOn=t,Of(e.priority,function(){Lf(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 _l(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=aa(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);na=r,n.target.dispatchEvent(r),na=null}else return t=nl(n),t!==null&&iu(t),e.blockedOn=n,!1;t.shift()}return!0}function cc(e,t,n){_l(e)&&n.delete(t)}function tg(){ia=!1,Nn!==null&&_l(Nn)&&(Nn=null),Rn!==null&&_l(Rn)&&(Rn=null),Pn!==null&&_l(Pn)&&(Pn=null),Oo.forEach(cc),Mo.forEach(cc)}function fo(e,t){e.blockedOn===t&&(e.blockedOn=null,ia||(ia=!0,ht.unstable_scheduleCallback(ht.unstable_NormalPriority,tg)))}function $o(e){function t(o){return fo(o,e)}if(0<hl.length){fo(hl[0],e);for(var n=1;n<hl.length;n++){var r=hl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Nn!==null&&fo(Nn,e),Rn!==null&&fo(Rn,e),Pn!==null&&fo(Pn,e),Oo.forEach(t),Mo.forEach(t),n=0;n<Cn.length;n++)r=Cn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Cn.length&&(n=Cn[0],n.blockedOn===null);)Mf(n),n.blockedOn===null&&Cn.shift()}var zr=xn.ReactCurrentBatchConfig,es=!0;function ng(e,t,n,r){var o=he,l=zr.transition;zr.transition=null;try{he=1,au(e,t,n,r)}finally{he=o,zr.transition=l}}function rg(e,t,n,r){var o=he,l=zr.transition;zr.transition=null;try{he=4,au(e,t,n,r)}finally{he=o,zr.transition=l}}function au(e,t,n,r){if(es){var o=aa(e,t,n,r);if(o===null)hi(e,t,r,ts,n),uc(e,r);else if(eg(o,e,t,n,r))r.stopPropagation();else if(uc(e,r),t&4&&-1<qm.indexOf(e)){for(;o!==null;){var l=nl(o);if(l!==null&&Af(l),l=aa(e,t,n,r),l===null&&hi(e,t,r,ts,n),l===o)break;o=l}o!==null&&r.stopPropagation()}else hi(e,t,r,null,n)}}var ts=null;function aa(e,t,n,r){if(ts=null,e=ou(r),e=Zn(e),e!==null)if(t=mr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=jf(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 ts=e,null}function $f(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(Bm()){case lu:return 1;case Rf:return 4;case Jl:case Vm:return 16;case Pf:return 536870912;default:return 16}default:return 16}}var En=null,uu=null,Al=null;function zf(){if(Al)return Al;var e,t=uu,n=t.length,r,o="value"in En?En.value:En.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 Al=o.slice(e,1<r?1-r:void 0)}function Ll(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 ml(){return!0}function dc(){return!1}function gt(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 a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(l):l[a]);return this.isDefaultPrevented=(l.defaultPrevented!=null?l.defaultPrevented:l.returnValue===!1)?ml:dc,this.isPropagationStopped=dc,this}return Te(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=ml)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ml)},persist:function(){},isPersistent:ml}),t}var eo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cu=gt(eo),tl=Te({},eo,{view:0,detail:0}),og=gt(tl),li,si,po,_s=Te({},tl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:du,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!==po&&(po&&e.type==="mousemove"?(li=e.screenX-po.screenX,si=e.screenY-po.screenY):si=li=0,po=e),li)},movementY:function(e){return"movementY"in e?e.movementY:si}}),fc=gt(_s),lg=Te({},_s,{dataTransfer:0}),sg=gt(lg),ig=Te({},tl,{relatedTarget:0}),ii=gt(ig),ag=Te({},eo,{animationName:0,elapsedTime:0,pseudoElement:0}),ug=gt(ag),cg=Te({},eo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),dg=gt(cg),fg=Te({},eo,{data:0}),pc=gt(fg),pg={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},hg={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"},mg={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function gg(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=mg[e])?!!t[e]:!1}function du(){return gg}var yg=Te({},tl,{key:function(e){if(e.key){var t=pg[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ll(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?hg[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:du,charCode:function(e){return e.type==="keypress"?Ll(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ll(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),xg=gt(yg),vg=Te({},_s,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),hc=gt(vg),bg=Te({},tl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:du}),wg=gt(bg),Sg=Te({},eo,{propertyName:0,elapsedTime:0,pseudoElement:0}),Cg=gt(Sg),kg=Te({},_s,{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}),jg=gt(kg),Eg=[9,13,27,32],fu=sn&&"CompositionEvent"in window,Eo=null;sn&&"documentMode"in document&&(Eo=document.documentMode);var Tg=sn&&"TextEvent"in window&&!Eo,Kf=sn&&(!fu||Eo&&8<Eo&&11>=Eo),mc=" ",gc=!1;function Ff(e,t){switch(e){case"keyup":return Eg.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var jr=!1;function Ng(e,t){switch(e){case"compositionend":return Hf(t);case"keypress":return t.which!==32?null:(gc=!0,mc);case"textInput":return e=t.data,e===mc&&gc?null:e;default:return null}}function Rg(e,t){if(jr)return e==="compositionend"||!fu&&Ff(e,t)?(e=zf(),Al=uu=En=null,jr=!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 Kf&&t.locale!=="ko"?null:t.data;default:return null}}var Pg={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 yc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Pg[e.type]:t==="textarea"}function Wf(e,t,n,r){bf(r),t=ns(t,"onChange"),0<t.length&&(n=new cu("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var To=null,zo=null;function Ig(e){ep(e,0)}function As(e){var t=Nr(e);if(pf(t))return e}function _g(e,t){if(e==="change")return t}var Bf=!1;if(sn){var ai;if(sn){var ui="oninput"in document;if(!ui){var xc=document.createElement("div");xc.setAttribute("oninput","return;"),ui=typeof xc.oninput=="function"}ai=ui}else ai=!1;Bf=ai&&(!document.documentMode||9<document.documentMode)}function vc(){To&&(To.detachEvent("onpropertychange",Vf),zo=To=null)}function Vf(e){if(e.propertyName==="value"&&As(zo)){var t=[];Wf(t,zo,e,ou(e)),kf(Ig,t)}}function Ag(e,t,n){e==="focusin"?(vc(),To=t,zo=n,To.attachEvent("onpropertychange",Vf)):e==="focusout"&&vc()}function Lg(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return As(zo)}function Dg(e,t){if(e==="click")return As(t)}function Og(e,t){if(e==="input"||e==="change")return As(t)}function Mg(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var At=typeof Object.is=="function"?Object.is:Mg;function Ko(e,t){if(At(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(!Bi.call(t,o)||!At(e[o],t[o]))return!1}return!0}function bc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function wc(e,t){var n=bc(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=bc(n)}}function Uf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Uf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Gf(){for(var e=window,t=Ql();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ql(e.document)}return t}function pu(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 $g(e){var t=Gf(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Uf(n.ownerDocument.documentElement,n)){if(r!==null&&pu(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=wc(n,l);var s=wc(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 zg=sn&&"documentMode"in document&&11>=document.documentMode,Er=null,ua=null,No=null,ca=!1;function Sc(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ca||Er==null||Er!==Ql(r)||(r=Er,"selectionStart"in r&&pu(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}),No&&Ko(No,r)||(No=r,r=ns(ua,"onSelect"),0<r.length&&(t=new cu("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Er)))}function gl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Tr={animationend:gl("Animation","AnimationEnd"),animationiteration:gl("Animation","AnimationIteration"),animationstart:gl("Animation","AnimationStart"),transitionend:gl("Transition","TransitionEnd")},ci={},Yf={};sn&&(Yf=document.createElement("div").style,"AnimationEvent"in window||(delete Tr.animationend.animation,delete Tr.animationiteration.animation,delete Tr.animationstart.animation),"TransitionEvent"in window||delete Tr.transitionend.transition);function Ls(e){if(ci[e])return ci[e];if(!Tr[e])return e;var t=Tr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Yf)return ci[e]=t[n];return e}var Qf=Ls("animationend"),Xf=Ls("animationiteration"),Zf=Ls("animationstart"),Jf=Ls("transitionend"),qf=new Map,Cc="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 Fn(e,t){qf.set(e,t),hr(t,[e])}for(var di=0;di<Cc.length;di++){var fi=Cc[di],Kg=fi.toLowerCase(),Fg=fi[0].toUpperCase()+fi.slice(1);Fn(Kg,"on"+Fg)}Fn(Qf,"onAnimationEnd");Fn(Xf,"onAnimationIteration");Fn(Zf,"onAnimationStart");Fn("dblclick","onDoubleClick");Fn("focusin","onFocus");Fn("focusout","onBlur");Fn(Jf,"onTransitionEnd");Br("onMouseEnter",["mouseout","mouseover"]);Br("onMouseLeave",["mouseout","mouseover"]);Br("onPointerEnter",["pointerout","pointerover"]);Br("onPointerLeave",["pointerout","pointerover"]);hr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));hr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));hr("onBeforeInput",["compositionend","keypress","textInput","paste"]);hr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));hr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));hr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var So="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(" "),Hg=new Set("cancel close invalid load scroll toggle".split(" ").concat(So));function kc(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Km(r,t,void 0,e),e.currentTarget=null}function ep(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 a=r[s],u=a.instance,c=a.currentTarget;if(a=a.listener,u!==l&&o.isPropagationStopped())break e;kc(o,a,c),l=u}else for(s=0;s<r.length;s++){if(a=r[s],u=a.instance,c=a.currentTarget,a=a.listener,u!==l&&o.isPropagationStopped())break e;kc(o,a,c),l=u}}}if(Zl)throw e=la,Zl=!1,la=null,e}function be(e,t){var n=t[ma];n===void 0&&(n=t[ma]=new Set);var r=e+"__bubble";n.has(r)||(tp(t,e,2,!1),n.add(r))}function pi(e,t,n){var r=0;t&&(r|=4),tp(n,e,r,t)}var yl="_reactListening"+Math.random().toString(36).slice(2);function Fo(e){if(!e[yl]){e[yl]=!0,af.forEach(function(n){n!=="selectionchange"&&(Hg.has(n)||pi(n,!1,e),pi(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[yl]||(t[yl]=!0,pi("selectionchange",!1,t))}}function tp(e,t,n,r){switch($f(t)){case 1:var o=ng;break;case 4:o=rg;break;default:o=au}n=o.bind(null,t,n,e),o=void 0,!oa||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 hi(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 a=r.stateNode.containerInfo;if(a===o||a.nodeType===8&&a.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(;a!==null;){if(s=Zn(a),s===null)return;if(u=s.tag,u===5||u===6){r=l=s;continue e}a=a.parentNode}}r=r.return}kf(function(){var c=l,f=ou(n),p=[];e:{var d=qf.get(e);if(d!==void 0){var m=cu,v=e;switch(e){case"keypress":if(Ll(n)===0)break e;case"keydown":case"keyup":m=xg;break;case"focusin":v="focus",m=ii;break;case"focusout":v="blur",m=ii;break;case"beforeblur":case"afterblur":m=ii;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":m=fc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=sg;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=wg;break;case Qf:case Xf:case Zf:m=ug;break;case Jf:m=Cg;break;case"scroll":m=og;break;case"wheel":m=jg;break;case"copy":case"cut":case"paste":m=dg;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=hc}var b=(t&4)!==0,S=!b&&e==="scroll",h=b?d!==null?d+"Capture":null:d;b=[];for(var g=c,y;g!==null;){y=g;var x=y.stateNode;if(y.tag===5&&x!==null&&(y=x,h!==null&&(x=Do(g,h),x!=null&&b.push(Ho(g,x,y)))),S)break;g=g.return}0<b.length&&(d=new m(d,v,null,n,f),p.push({event:d,listeners:b}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",d&&n!==na&&(v=n.relatedTarget||n.fromElement)&&(Zn(v)||v[an]))break e;if((m||d)&&(d=f.window===f?f:(d=f.ownerDocument)?d.defaultView||d.parentWindow:window,m?(v=n.relatedTarget||n.toElement,m=c,v=v?Zn(v):null,v!==null&&(S=mr(v),v!==S||v.tag!==5&&v.tag!==6)&&(v=null)):(m=null,v=c),m!==v)){if(b=fc,x="onMouseLeave",h="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(b=hc,x="onPointerLeave",h="onPointerEnter",g="pointer"),S=m==null?d:Nr(m),y=v==null?d:Nr(v),d=new b(x,g+"leave",m,n,f),d.target=S,d.relatedTarget=y,x=null,Zn(f)===c&&(b=new b(h,g+"enter",v,n,f),b.target=y,b.relatedTarget=S,x=b),S=x,m&&v)t:{for(b=m,h=v,g=0,y=b;y;y=xr(y))g++;for(y=0,x=h;x;x=xr(x))y++;for(;0<g-y;)b=xr(b),g--;for(;0<y-g;)h=xr(h),y--;for(;g--;){if(b===h||h!==null&&b===h.alternate)break t;b=xr(b),h=xr(h)}b=null}else b=null;m!==null&&jc(p,d,m,b,!1),v!==null&&S!==null&&jc(p,S,v,b,!0)}}e:{if(d=c?Nr(c):window,m=d.nodeName&&d.nodeName.toLowerCase(),m==="select"||m==="input"&&d.type==="file")var k=_g;else if(yc(d))if(Bf)k=Og;else{k=Lg;var C=Ag}else(m=d.nodeName)&&m.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(k=Dg);if(k&&(k=k(e,c))){Wf(p,k,n,f);break e}C&&C(e,d,c),e==="focusout"&&(C=d._wrapperState)&&C.controlled&&d.type==="number"&&Zi(d,"number",d.value)}switch(C=c?Nr(c):window,e){case"focusin":(yc(C)||C.contentEditable==="true")&&(Er=C,ua=c,No=null);break;case"focusout":No=ua=Er=null;break;case"mousedown":ca=!0;break;case"contextmenu":case"mouseup":case"dragend":ca=!1,Sc(p,n,f);break;case"selectionchange":if(zg)break;case"keydown":case"keyup":Sc(p,n,f)}var T;if(fu)e:{switch(e){case"compositionstart":var j="onCompositionStart";break e;case"compositionend":j="onCompositionEnd";break e;case"compositionupdate":j="onCompositionUpdate";break e}j=void 0}else jr?Ff(e,n)&&(j="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(j="onCompositionStart");j&&(Kf&&n.locale!=="ko"&&(jr||j!=="onCompositionStart"?j==="onCompositionEnd"&&jr&&(T=zf()):(En=f,uu="value"in En?En.value:En.textContent,jr=!0)),C=ns(c,j),0<C.length&&(j=new pc(j,e,null,n,f),p.push({event:j,listeners:C}),T?j.data=T:(T=Hf(n),T!==null&&(j.data=T)))),(T=Tg?Ng(e,n):Rg(e,n))&&(c=ns(c,"onBeforeInput"),0<c.length&&(f=new pc("onBeforeInput","beforeinput",null,n,f),p.push({event:f,listeners:c}),f.data=T))}ep(p,t)})}function Ho(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ns(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,l=o.stateNode;o.tag===5&&l!==null&&(o=l,l=Do(e,n),l!=null&&r.unshift(Ho(e,l,o)),l=Do(e,t),l!=null&&r.push(Ho(e,l,o))),e=e.return}return r}function xr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function jc(e,t,n,r,o){for(var l=t._reactName,s=[];n!==null&&n!==r;){var a=n,u=a.alternate,c=a.stateNode;if(u!==null&&u===r)break;a.tag===5&&c!==null&&(a=c,o?(u=Do(n,l),u!=null&&s.unshift(Ho(n,u,a))):o||(u=Do(n,l),u!=null&&s.push(Ho(n,u,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var Wg=/\r\n?/g,Bg=/\u0000|\uFFFD/g;function Ec(e){return(typeof e=="string"?e:""+e).replace(Wg,`
|
|
38
|
+
`).replace(Bg,"")}function xl(e,t,n){if(t=Ec(t),Ec(e)!==t&&n)throw Error($(425))}function rs(){}var da=null,fa=null;function pa(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 ha=typeof setTimeout=="function"?setTimeout:void 0,Vg=typeof clearTimeout=="function"?clearTimeout:void 0,Tc=typeof Promise=="function"?Promise:void 0,Ug=typeof queueMicrotask=="function"?queueMicrotask:typeof Tc<"u"?function(e){return Tc.resolve(null).then(e).catch(Gg)}:ha;function Gg(e){setTimeout(function(){throw e})}function mi(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),$o(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);$o(t)}function In(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 Nc(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 to=Math.random().toString(36).slice(2),Mt="__reactFiber$"+to,Wo="__reactProps$"+to,an="__reactContainer$"+to,ma="__reactEvents$"+to,Yg="__reactListeners$"+to,Qg="__reactHandles$"+to;function Zn(e){var t=e[Mt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[an]||n[Mt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Nc(e);e!==null;){if(n=e[Mt])return n;e=Nc(e)}return t}e=n,n=e.parentNode}return null}function nl(e){return e=e[Mt]||e[an],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Nr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error($(33))}function Ds(e){return e[Wo]||null}var ga=[],Rr=-1;function Hn(e){return{current:e}}function we(e){0>Rr||(e.current=ga[Rr],ga[Rr]=null,Rr--)}function xe(e,t){Rr++,ga[Rr]=e.current,e.current=t}var $n={},Xe=Hn($n),st=Hn(!1),or=$n;function Vr(e,t){var n=e.type.contextTypes;if(!n)return $n;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 it(e){return e=e.childContextTypes,e!=null}function os(){we(st),we(Xe)}function Rc(e,t,n){if(Xe.current!==$n)throw Error($(168));xe(Xe,t),xe(st,n)}function np(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($(108,Am(e)||"Unknown",o));return Te({},n,r)}function ls(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||$n,or=Xe.current,xe(Xe,e),xe(st,st.current),!0}function Pc(e,t,n){var r=e.stateNode;if(!r)throw Error($(169));n?(e=np(e,t,or),r.__reactInternalMemoizedMergedChildContext=e,we(st),we(Xe),xe(Xe,e)):we(st),xe(st,n)}var Jt=null,Os=!1,gi=!1;function rp(e){Jt===null?Jt=[e]:Jt.push(e)}function Xg(e){Os=!0,rp(e)}function Wn(){if(!gi&&Jt!==null){gi=!0;var e=0,t=he;try{var n=Jt;for(he=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Jt=null,Os=!1}catch(o){throw Jt!==null&&(Jt=Jt.slice(e+1)),Nf(lu,Wn),o}finally{he=t,gi=!1}}return null}var Pr=[],Ir=0,ss=null,is=0,vt=[],bt=0,lr=null,en=1,tn="";function Qn(e,t){Pr[Ir++]=is,Pr[Ir++]=ss,ss=e,is=t}function op(e,t,n){vt[bt++]=en,vt[bt++]=tn,vt[bt++]=lr,lr=e;var r=en;e=tn;var o=32-It(r)-1;r&=~(1<<o),n+=1;var l=32-It(t)+o;if(30<l){var s=o-o%5;l=(r&(1<<s)-1).toString(32),r>>=s,o-=s,en=1<<32-It(t)+o|n<<o|r,tn=l+e}else en=1<<l|n<<o|r,tn=e}function hu(e){e.return!==null&&(Qn(e,1),op(e,1,0))}function mu(e){for(;e===ss;)ss=Pr[--Ir],Pr[Ir]=null,is=Pr[--Ir],Pr[Ir]=null;for(;e===lr;)lr=vt[--bt],vt[bt]=null,tn=vt[--bt],vt[bt]=null,en=vt[--bt],vt[bt]=null}var ft=null,dt=null,Se=!1,Pt=null;function lp(e,t){var n=wt(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 Ic(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,ft=e,dt=In(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,ft=e,dt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=lr!==null?{id:en,overflow:tn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=wt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,ft=e,dt=null,!0):!1;default:return!1}}function ya(e){return(e.mode&1)!==0&&(e.flags&128)===0}function xa(e){if(Se){var t=dt;if(t){var n=t;if(!Ic(e,t)){if(ya(e))throw Error($(418));t=In(n.nextSibling);var r=ft;t&&Ic(e,t)?lp(r,n):(e.flags=e.flags&-4097|2,Se=!1,ft=e)}}else{if(ya(e))throw Error($(418));e.flags=e.flags&-4097|2,Se=!1,ft=e}}}function _c(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;ft=e}function vl(e){if(e!==ft)return!1;if(!Se)return _c(e),Se=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!pa(e.type,e.memoizedProps)),t&&(t=dt)){if(ya(e))throw sp(),Error($(418));for(;t;)lp(e,t),t=In(t.nextSibling)}if(_c(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error($(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){dt=In(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}dt=null}}else dt=ft?In(e.stateNode.nextSibling):null;return!0}function sp(){for(var e=dt;e;)e=In(e.nextSibling)}function Ur(){dt=ft=null,Se=!1}function gu(e){Pt===null?Pt=[e]:Pt.push(e)}var Zg=xn.ReactCurrentBatchConfig;function ho(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($(309));var r=n.stateNode}if(!r)throw Error($(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 a=o.refs;s===null?delete a[l]:a[l]=s},t._stringRef=l,t)}if(typeof e!="string")throw Error($(284));if(!n._owner)throw Error($(290,e))}return e}function bl(e,t){throw e=Object.prototype.toString.call(t),Error($(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ac(e){var t=e._init;return t(e._payload)}function ip(e){function t(h,g){if(e){var y=h.deletions;y===null?(h.deletions=[g],h.flags|=16):y.push(g)}}function n(h,g){if(!e)return null;for(;g!==null;)t(h,g),g=g.sibling;return null}function r(h,g){for(h=new Map;g!==null;)g.key!==null?h.set(g.key,g):h.set(g.index,g),g=g.sibling;return h}function o(h,g){return h=Dn(h,g),h.index=0,h.sibling=null,h}function l(h,g,y){return h.index=y,e?(y=h.alternate,y!==null?(y=y.index,y<g?(h.flags|=2,g):y):(h.flags|=2,g)):(h.flags|=1048576,g)}function s(h){return e&&h.alternate===null&&(h.flags|=2),h}function a(h,g,y,x){return g===null||g.tag!==6?(g=Ci(y,h.mode,x),g.return=h,g):(g=o(g,y),g.return=h,g)}function u(h,g,y,x){var k=y.type;return k===kr?f(h,g,y.props.children,x,y.key):g!==null&&(g.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===bn&&Ac(k)===g.type)?(x=o(g,y.props),x.ref=ho(h,g,y),x.return=h,x):(x=Fl(y.type,y.key,y.props,null,h.mode,x),x.ref=ho(h,g,y),x.return=h,x)}function c(h,g,y,x){return g===null||g.tag!==4||g.stateNode.containerInfo!==y.containerInfo||g.stateNode.implementation!==y.implementation?(g=ki(y,h.mode,x),g.return=h,g):(g=o(g,y.children||[]),g.return=h,g)}function f(h,g,y,x,k){return g===null||g.tag!==7?(g=nr(y,h.mode,x,k),g.return=h,g):(g=o(g,y),g.return=h,g)}function p(h,g,y){if(typeof g=="string"&&g!==""||typeof g=="number")return g=Ci(""+g,h.mode,y),g.return=h,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case ul:return y=Fl(g.type,g.key,g.props,null,h.mode,y),y.ref=ho(h,null,g),y.return=h,y;case Cr:return g=ki(g,h.mode,y),g.return=h,g;case bn:var x=g._init;return p(h,x(g._payload),y)}if(bo(g)||ao(g))return g=nr(g,h.mode,y,null),g.return=h,g;bl(h,g)}return null}function d(h,g,y,x){var k=g!==null?g.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return k!==null?null:a(h,g,""+y,x);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case ul:return y.key===k?u(h,g,y,x):null;case Cr:return y.key===k?c(h,g,y,x):null;case bn:return k=y._init,d(h,g,k(y._payload),x)}if(bo(y)||ao(y))return k!==null?null:f(h,g,y,x,null);bl(h,y)}return null}function m(h,g,y,x,k){if(typeof x=="string"&&x!==""||typeof x=="number")return h=h.get(y)||null,a(g,h,""+x,k);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case ul:return h=h.get(x.key===null?y:x.key)||null,u(g,h,x,k);case Cr:return h=h.get(x.key===null?y:x.key)||null,c(g,h,x,k);case bn:var C=x._init;return m(h,g,y,C(x._payload),k)}if(bo(x)||ao(x))return h=h.get(y)||null,f(g,h,x,k,null);bl(g,x)}return null}function v(h,g,y,x){for(var k=null,C=null,T=g,j=g=0,L=null;T!==null&&j<y.length;j++){T.index>j?(L=T,T=null):L=T.sibling;var I=d(h,T,y[j],x);if(I===null){T===null&&(T=L);break}e&&T&&I.alternate===null&&t(h,T),g=l(I,g,j),C===null?k=I:C.sibling=I,C=I,T=L}if(j===y.length)return n(h,T),Se&&Qn(h,j),k;if(T===null){for(;j<y.length;j++)T=p(h,y[j],x),T!==null&&(g=l(T,g,j),C===null?k=T:C.sibling=T,C=T);return Se&&Qn(h,j),k}for(T=r(h,T);j<y.length;j++)L=m(T,h,j,y[j],x),L!==null&&(e&&L.alternate!==null&&T.delete(L.key===null?j:L.key),g=l(L,g,j),C===null?k=L:C.sibling=L,C=L);return e&&T.forEach(function(D){return t(h,D)}),Se&&Qn(h,j),k}function b(h,g,y,x){var k=ao(y);if(typeof k!="function")throw Error($(150));if(y=k.call(y),y==null)throw Error($(151));for(var C=k=null,T=g,j=g=0,L=null,I=y.next();T!==null&&!I.done;j++,I=y.next()){T.index>j?(L=T,T=null):L=T.sibling;var D=d(h,T,I.value,x);if(D===null){T===null&&(T=L);break}e&&T&&D.alternate===null&&t(h,T),g=l(D,g,j),C===null?k=D:C.sibling=D,C=D,T=L}if(I.done)return n(h,T),Se&&Qn(h,j),k;if(T===null){for(;!I.done;j++,I=y.next())I=p(h,I.value,x),I!==null&&(g=l(I,g,j),C===null?k=I:C.sibling=I,C=I);return Se&&Qn(h,j),k}for(T=r(h,T);!I.done;j++,I=y.next())I=m(T,h,j,I.value,x),I!==null&&(e&&I.alternate!==null&&T.delete(I.key===null?j:I.key),g=l(I,g,j),C===null?k=I:C.sibling=I,C=I);return e&&T.forEach(function(V){return t(h,V)}),Se&&Qn(h,j),k}function S(h,g,y,x){if(typeof y=="object"&&y!==null&&y.type===kr&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case ul:e:{for(var k=y.key,C=g;C!==null;){if(C.key===k){if(k=y.type,k===kr){if(C.tag===7){n(h,C.sibling),g=o(C,y.props.children),g.return=h,h=g;break e}}else if(C.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===bn&&Ac(k)===C.type){n(h,C.sibling),g=o(C,y.props),g.ref=ho(h,C,y),g.return=h,h=g;break e}n(h,C);break}else t(h,C);C=C.sibling}y.type===kr?(g=nr(y.props.children,h.mode,x,y.key),g.return=h,h=g):(x=Fl(y.type,y.key,y.props,null,h.mode,x),x.ref=ho(h,g,y),x.return=h,h=x)}return s(h);case Cr:e:{for(C=y.key;g!==null;){if(g.key===C)if(g.tag===4&&g.stateNode.containerInfo===y.containerInfo&&g.stateNode.implementation===y.implementation){n(h,g.sibling),g=o(g,y.children||[]),g.return=h,h=g;break e}else{n(h,g);break}else t(h,g);g=g.sibling}g=ki(y,h.mode,x),g.return=h,h=g}return s(h);case bn:return C=y._init,S(h,g,C(y._payload),x)}if(bo(y))return v(h,g,y,x);if(ao(y))return b(h,g,y,x);bl(h,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,g!==null&&g.tag===6?(n(h,g.sibling),g=o(g,y),g.return=h,h=g):(n(h,g),g=Ci(y,h.mode,x),g.return=h,h=g),s(h)):n(h,g)}return S}var Gr=ip(!0),ap=ip(!1),as=Hn(null),us=null,_r=null,yu=null;function xu(){yu=_r=us=null}function vu(e){var t=as.current;we(as),e._currentValue=t}function va(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 Kr(e,t){us=e,yu=_r=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(lt=!0),e.firstContext=null)}function kt(e){var t=e._currentValue;if(yu!==e)if(e={context:e,memoizedValue:t,next:null},_r===null){if(us===null)throw Error($(308));_r=e,us.dependencies={lanes:0,firstContext:e}}else _r=_r.next=e;return t}var Jn=null;function bu(e){Jn===null?Jn=[e]:Jn.push(e)}function up(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,bu(t)):(n.next=o.next,o.next=n),t.interleaved=n,un(e,r)}function un(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 wn=!1;function wu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function cp(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 rn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function _n(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,fe&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,un(e,n)}return o=r.interleaved,o===null?(t.next=t,bu(r)):(t.next=o.next,o.next=t),r.interleaved=t,un(e,n)}function Dl(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,su(e,n)}}function Lc(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 cs(e,t,n,r){var o=e.updateQueue;wn=!1;var l=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var u=a,c=u.next;u.next=null,s===null?l=c:s.next=c,s=u;var f=e.alternate;f!==null&&(f=f.updateQueue,a=f.lastBaseUpdate,a!==s&&(a===null?f.firstBaseUpdate=c:a.next=c,f.lastBaseUpdate=u))}if(l!==null){var p=o.baseState;s=0,f=c=u=null,a=l;do{var d=a.lane,m=a.eventTime;if((r&d)===d){f!==null&&(f=f.next={eventTime:m,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var v=e,b=a;switch(d=t,m=n,b.tag){case 1:if(v=b.payload,typeof v=="function"){p=v.call(m,p,d);break e}p=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=b.payload,d=typeof v=="function"?v.call(m,p,d):v,d==null)break e;p=Te({},p,d);break e;case 2:wn=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,d=o.effects,d===null?o.effects=[a]:d.push(a))}else m={eventTime:m,lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},f===null?(c=f=m,u=p):f=f.next=m,s|=d;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;d=a,a=d.next,d.next=null,o.lastBaseUpdate=d,o.shared.pending=null}}while(!0);if(f===null&&(u=p),o.baseState=u,o.firstBaseUpdate=c,o.lastBaseUpdate=f,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);ir|=s,e.lanes=s,e.memoizedState=p}}function Dc(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($(191,o));o.call(r)}}}var rl={},zt=Hn(rl),Bo=Hn(rl),Vo=Hn(rl);function qn(e){if(e===rl)throw Error($(174));return e}function Su(e,t){switch(xe(Vo,t),xe(Bo,e),xe(zt,rl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:qi(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=qi(t,e)}we(zt),xe(zt,t)}function Yr(){we(zt),we(Bo),we(Vo)}function dp(e){qn(Vo.current);var t=qn(zt.current),n=qi(t,e.type);t!==n&&(xe(Bo,e),xe(zt,n))}function Cu(e){Bo.current===e&&(we(zt),we(Bo))}var je=Hn(0);function ds(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 yi=[];function ku(){for(var e=0;e<yi.length;e++)yi[e]._workInProgressVersionPrimary=null;yi.length=0}var Ol=xn.ReactCurrentDispatcher,xi=xn.ReactCurrentBatchConfig,sr=0,Ee=null,Me=null,Fe=null,fs=!1,Ro=!1,Uo=0,Jg=0;function Ge(){throw Error($(321))}function ju(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!At(e[n],t[n]))return!1;return!0}function Eu(e,t,n,r,o,l){if(sr=l,Ee=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ol.current=e===null||e.memoizedState===null?ny:ry,e=n(r,o),Ro){l=0;do{if(Ro=!1,Uo=0,25<=l)throw Error($(301));l+=1,Fe=Me=null,t.updateQueue=null,Ol.current=oy,e=n(r,o)}while(Ro)}if(Ol.current=ps,t=Me!==null&&Me.next!==null,sr=0,Fe=Me=Ee=null,fs=!1,t)throw Error($(300));return e}function Tu(){var e=Uo!==0;return Uo=0,e}function Dt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Fe===null?Ee.memoizedState=Fe=e:Fe=Fe.next=e,Fe}function jt(){if(Me===null){var e=Ee.alternate;e=e!==null?e.memoizedState:null}else e=Me.next;var t=Fe===null?Ee.memoizedState:Fe.next;if(t!==null)Fe=t,Me=e;else{if(e===null)throw Error($(310));Me=e,e={memoizedState:Me.memoizedState,baseState:Me.baseState,baseQueue:Me.baseQueue,queue:Me.queue,next:null},Fe===null?Ee.memoizedState=Fe=e:Fe=Fe.next=e}return Fe}function Go(e,t){return typeof t=="function"?t(e):t}function vi(e){var t=jt(),n=t.queue;if(n===null)throw Error($(311));n.lastRenderedReducer=e;var r=Me,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 a=s=null,u=null,c=l;do{var f=c.lane;if((sr&f)===f)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 p={lane:f,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};u===null?(a=u=p,s=r):u=u.next=p,Ee.lanes|=f,ir|=f}c=c.next}while(c!==null&&c!==l);u===null?s=r:u.next=a,At(r,t.memoizedState)||(lt=!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,Ee.lanes|=l,ir|=l,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function bi(e){var t=jt(),n=t.queue;if(n===null)throw Error($(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);At(l,t.memoizedState)||(lt=!0),t.memoizedState=l,t.baseQueue===null&&(t.baseState=l),n.lastRenderedState=l}return[l,r]}function fp(){}function pp(e,t){var n=Ee,r=jt(),o=t(),l=!At(r.memoizedState,o);if(l&&(r.memoizedState=o,lt=!0),r=r.queue,Nu(gp.bind(null,n,r,e),[e]),r.getSnapshot!==t||l||Fe!==null&&Fe.memoizedState.tag&1){if(n.flags|=2048,Yo(9,mp.bind(null,n,r,o,t),void 0,null),He===null)throw Error($(349));sr&30||hp(n,t,o)}return o}function hp(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ee.updateQueue,t===null?(t={lastEffect:null,stores:null},Ee.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function mp(e,t,n,r){t.value=n,t.getSnapshot=r,yp(t)&&xp(e)}function gp(e,t,n){return n(function(){yp(t)&&xp(e)})}function yp(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!At(e,n)}catch{return!0}}function xp(e){var t=un(e,1);t!==null&&_t(t,e,1,-1)}function Oc(e){var t=Dt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Go,lastRenderedState:e},t.queue=e,e=e.dispatch=ty.bind(null,Ee,e),[t.memoizedState,e]}function Yo(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ee.updateQueue,t===null?(t={lastEffect:null,stores:null},Ee.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 vp(){return jt().memoizedState}function Ml(e,t,n,r){var o=Dt();Ee.flags|=e,o.memoizedState=Yo(1|t,n,void 0,r===void 0?null:r)}function Ms(e,t,n,r){var o=jt();r=r===void 0?null:r;var l=void 0;if(Me!==null){var s=Me.memoizedState;if(l=s.destroy,r!==null&&ju(r,s.deps)){o.memoizedState=Yo(t,n,l,r);return}}Ee.flags|=e,o.memoizedState=Yo(1|t,n,l,r)}function Mc(e,t){return Ml(8390656,8,e,t)}function Nu(e,t){return Ms(2048,8,e,t)}function bp(e,t){return Ms(4,2,e,t)}function wp(e,t){return Ms(4,4,e,t)}function Sp(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 Cp(e,t,n){return n=n!=null?n.concat([e]):null,Ms(4,4,Sp.bind(null,t,e),n)}function Ru(){}function kp(e,t){var n=jt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ju(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function jp(e,t){var n=jt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ju(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ep(e,t,n){return sr&21?(At(n,t)||(n=If(),Ee.lanes|=n,ir|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,lt=!0),e.memoizedState=n)}function qg(e,t){var n=he;he=n!==0&&4>n?n:4,e(!0);var r=xi.transition;xi.transition={};try{e(!1),t()}finally{he=n,xi.transition=r}}function Tp(){return jt().memoizedState}function ey(e,t,n){var r=Ln(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Np(e))Rp(t,n);else if(n=up(e,t,n,r),n!==null){var o=Je();_t(n,e,r,o),Pp(n,t,r)}}function ty(e,t,n){var r=Ln(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Np(e))Rp(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,a=l(s,n);if(o.hasEagerState=!0,o.eagerState=a,At(a,s)){var u=t.interleaved;u===null?(o.next=o,bu(t)):(o.next=u.next,u.next=o),t.interleaved=o;return}}catch{}finally{}n=up(e,t,o,r),n!==null&&(o=Je(),_t(n,e,r,o),Pp(n,t,r))}}function Np(e){var t=e.alternate;return e===Ee||t!==null&&t===Ee}function Rp(e,t){Ro=fs=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Pp(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,su(e,n)}}var ps={readContext:kt,useCallback:Ge,useContext:Ge,useEffect:Ge,useImperativeHandle:Ge,useInsertionEffect:Ge,useLayoutEffect:Ge,useMemo:Ge,useReducer:Ge,useRef:Ge,useState:Ge,useDebugValue:Ge,useDeferredValue:Ge,useTransition:Ge,useMutableSource:Ge,useSyncExternalStore:Ge,useId:Ge,unstable_isNewReconciler:!1},ny={readContext:kt,useCallback:function(e,t){return Dt().memoizedState=[e,t===void 0?null:t],e},useContext:kt,useEffect:Mc,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ml(4194308,4,Sp.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ml(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ml(4,2,e,t)},useMemo:function(e,t){var n=Dt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Dt();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=ey.bind(null,Ee,e),[r.memoizedState,e]},useRef:function(e){var t=Dt();return e={current:e},t.memoizedState=e},useState:Oc,useDebugValue:Ru,useDeferredValue:function(e){return Dt().memoizedState=e},useTransition:function(){var e=Oc(!1),t=e[0];return e=qg.bind(null,e[1]),Dt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ee,o=Dt();if(Se){if(n===void 0)throw Error($(407));n=n()}else{if(n=t(),He===null)throw Error($(349));sr&30||hp(r,t,n)}o.memoizedState=n;var l={value:n,getSnapshot:t};return o.queue=l,Mc(gp.bind(null,r,l,e),[e]),r.flags|=2048,Yo(9,mp.bind(null,r,l,n,t),void 0,null),n},useId:function(){var e=Dt(),t=He.identifierPrefix;if(Se){var n=tn,r=en;n=(r&~(1<<32-It(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Uo++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Jg++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ry={readContext:kt,useCallback:kp,useContext:kt,useEffect:Nu,useImperativeHandle:Cp,useInsertionEffect:bp,useLayoutEffect:wp,useMemo:jp,useReducer:vi,useRef:vp,useState:function(){return vi(Go)},useDebugValue:Ru,useDeferredValue:function(e){var t=jt();return Ep(t,Me.memoizedState,e)},useTransition:function(){var e=vi(Go)[0],t=jt().memoizedState;return[e,t]},useMutableSource:fp,useSyncExternalStore:pp,useId:Tp,unstable_isNewReconciler:!1},oy={readContext:kt,useCallback:kp,useContext:kt,useEffect:Nu,useImperativeHandle:Cp,useInsertionEffect:bp,useLayoutEffect:wp,useMemo:jp,useReducer:bi,useRef:vp,useState:function(){return bi(Go)},useDebugValue:Ru,useDeferredValue:function(e){var t=jt();return Me===null?t.memoizedState=e:Ep(t,Me.memoizedState,e)},useTransition:function(){var e=bi(Go)[0],t=jt().memoizedState;return[e,t]},useMutableSource:fp,useSyncExternalStore:pp,useId:Tp,unstable_isNewReconciler:!1};function Nt(e,t){if(e&&e.defaultProps){t=Te({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function ba(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Te({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var $s={isMounted:function(e){return(e=e._reactInternals)?mr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Je(),o=Ln(e),l=rn(r,o);l.payload=t,n!=null&&(l.callback=n),t=_n(e,l,o),t!==null&&(_t(t,e,o,r),Dl(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Je(),o=Ln(e),l=rn(r,o);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=_n(e,l,o),t!==null&&(_t(t,e,o,r),Dl(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Je(),r=Ln(e),o=rn(n,r);o.tag=2,t!=null&&(o.callback=t),t=_n(e,o,r),t!==null&&(_t(t,e,r,n),Dl(t,e,r))}};function $c(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?!Ko(n,r)||!Ko(o,l):!0}function Ip(e,t,n){var r=!1,o=$n,l=t.contextType;return typeof l=="object"&&l!==null?l=kt(l):(o=it(t)?or:Xe.current,r=t.contextTypes,l=(r=r!=null)?Vr(e,o):$n),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 zc(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 wa(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},wu(e);var l=t.contextType;typeof l=="object"&&l!==null?o.context=kt(l):(l=it(t)?or:Xe.current,o.context=Vr(e,l)),o.state=e.memoizedState,l=t.getDerivedStateFromProps,typeof l=="function"&&(ba(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),cs(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Qr(e,t){try{var n="",r=t;do n+=_m(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 wi(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Sa(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var ly=typeof WeakMap=="function"?WeakMap:Map;function _p(e,t,n){n=rn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ms||(ms=!0,_a=r),Sa(e,t)},n}function Ap(e,t,n){n=rn(-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(){Sa(e,t)}}var l=e.stateNode;return l!==null&&typeof l.componentDidCatch=="function"&&(n.callback=function(){Sa(e,t),typeof r!="function"&&(An===null?An=new Set([this]):An.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function Kc(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new ly;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=vy.bind(null,e,t,n),t.then(e,e))}function Fc(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 Hc(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=rn(-1,1),t.tag=2,_n(n,t,1))),n.lanes|=1),e)}var sy=xn.ReactCurrentOwner,lt=!1;function Ze(e,t,n,r){t.child=e===null?ap(t,null,n,r):Gr(t,e.child,n,r)}function Wc(e,t,n,r,o){n=n.render;var l=t.ref;return Kr(t,o),r=Eu(e,t,n,r,l,o),n=Tu(),e!==null&&!lt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,cn(e,t,o)):(Se&&n&&hu(t),t.flags|=1,Ze(e,t,r,o),t.child)}function Bc(e,t,n,r,o){if(e===null){var l=n.type;return typeof l=="function"&&!Mu(l)&&l.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=l,Lp(e,t,l,r,o)):(e=Fl(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:Ko,n(s,r)&&e.ref===t.ref)return cn(e,t,o)}return t.flags|=1,e=Dn(l,r),e.ref=t.ref,e.return=t,t.child=e}function Lp(e,t,n,r,o){if(e!==null){var l=e.memoizedProps;if(Ko(l,r)&&e.ref===t.ref)if(lt=!1,t.pendingProps=r=l,(e.lanes&o)!==0)e.flags&131072&&(lt=!0);else return t.lanes=e.lanes,cn(e,t,o)}return Ca(e,t,n,r,o)}function Dp(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},xe(Lr,ut),ut|=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,xe(Lr,ut),ut|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=l!==null?l.baseLanes:n,xe(Lr,ut),ut|=r}else l!==null?(r=l.baseLanes|n,t.memoizedState=null):r=n,xe(Lr,ut),ut|=r;return Ze(e,t,o,n),t.child}function Op(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ca(e,t,n,r,o){var l=it(n)?or:Xe.current;return l=Vr(t,l),Kr(t,o),n=Eu(e,t,n,r,l,o),r=Tu(),e!==null&&!lt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,cn(e,t,o)):(Se&&r&&hu(t),t.flags|=1,Ze(e,t,n,o),t.child)}function Vc(e,t,n,r,o){if(it(n)){var l=!0;ls(t)}else l=!1;if(Kr(t,o),t.stateNode===null)$l(e,t),Ip(t,n,r),wa(t,n,r,o),r=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var u=s.context,c=n.contextType;typeof c=="object"&&c!==null?c=kt(c):(c=it(n)?or:Xe.current,c=Vr(t,c));var f=n.getDerivedStateFromProps,p=typeof f=="function"||typeof s.getSnapshotBeforeUpdate=="function";p||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||u!==c)&&zc(t,s,r,c),wn=!1;var d=t.memoizedState;s.state=d,cs(t,r,s,o),u=t.memoizedState,a!==r||d!==u||st.current||wn?(typeof f=="function"&&(ba(t,n,f,r),u=t.memoizedState),(a=wn||$c(t,n,a,r,d,u,c))?(p||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=a):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,cp(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:Nt(t.type,a),s.props=c,p=t.pendingProps,d=s.context,u=n.contextType,typeof u=="object"&&u!==null?u=kt(u):(u=it(n)?or:Xe.current,u=Vr(t,u));var m=n.getDerivedStateFromProps;(f=typeof m=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==p||d!==u)&&zc(t,s,r,u),wn=!1,d=t.memoizedState,s.state=d,cs(t,r,s,o);var v=t.memoizedState;a!==p||d!==v||st.current||wn?(typeof m=="function"&&(ba(t,n,m,r),v=t.memoizedState),(c=wn||$c(t,n,c,r,d,v,u)||!1)?(f||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"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===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"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return ka(e,t,n,r,l,o)}function ka(e,t,n,r,o,l){Op(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return o&&Pc(t,n,!1),cn(e,t,l);r=t.stateNode,sy.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Gr(t,e.child,null,l),t.child=Gr(t,null,a,l)):Ze(e,t,a,l),t.memoizedState=r.state,o&&Pc(t,n,!0),t.child}function Mp(e){var t=e.stateNode;t.pendingContext?Rc(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Rc(e,t.context,!1),Su(e,t.containerInfo)}function Uc(e,t,n,r,o){return Ur(),gu(o),t.flags|=256,Ze(e,t,n,r),t.child}var ja={dehydrated:null,treeContext:null,retryLane:0};function Ea(e){return{baseLanes:e,cachePool:null,transitions:null}}function $p(e,t,n){var r=t.pendingProps,o=je.current,l=!1,s=(t.flags&128)!==0,a;if((a=s)||(a=e!==null&&e.memoizedState===null?!1:(o&2)!==0),a?(l=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),xe(je,o&1),e===null)return xa(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=Fs(s,r,0,null),e=nr(e,r,n,null),l.return=t,e.return=t,l.sibling=e,t.child=l,t.child.memoizedState=Ea(n),t.memoizedState=ja,e):Pu(t,s));if(o=e.memoizedState,o!==null&&(a=o.dehydrated,a!==null))return iy(e,t,s,r,a,o,n);if(l){l=r.fallback,s=t.mode,o=e.child,a=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=Dn(o,u),r.subtreeFlags=o.subtreeFlags&14680064),a!==null?l=Dn(a,l):(l=nr(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?Ea(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},l.memoizedState=s,l.childLanes=e.childLanes&~n,t.memoizedState=ja,r}return l=e.child,e=l.sibling,r=Dn(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 Pu(e,t){return t=Fs({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function wl(e,t,n,r){return r!==null&&gu(r),Gr(t,e.child,null,n),e=Pu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function iy(e,t,n,r,o,l,s){if(n)return t.flags&256?(t.flags&=-257,r=wi(Error($(422))),wl(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(l=r.fallback,o=t.mode,r=Fs({mode:"visible",children:r.children},o,0,null),l=nr(l,o,s,null),l.flags|=2,r.return=t,l.return=t,r.sibling=l,t.child=r,t.mode&1&&Gr(t,e.child,null,s),t.child.memoizedState=Ea(s),t.memoizedState=ja,l);if(!(t.mode&1))return wl(e,t,s,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var a=r.dgst;return r=a,l=Error($(419)),r=wi(l,r,void 0),wl(e,t,s,r)}if(a=(s&e.childLanes)!==0,lt||a){if(r=He,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,un(e,o),_t(r,e,o,-1))}return Ou(),r=wi(Error($(421))),wl(e,t,s,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=by.bind(null,e),o._reactRetry=t,null):(e=l.treeContext,dt=In(o.nextSibling),ft=t,Se=!0,Pt=null,e!==null&&(vt[bt++]=en,vt[bt++]=tn,vt[bt++]=lr,en=e.id,tn=e.overflow,lr=t),t=Pu(t,r.children),t.flags|=4096,t)}function Gc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),va(e.return,t,n)}function Si(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 zp(e,t,n){var r=t.pendingProps,o=r.revealOrder,l=r.tail;if(Ze(e,t,r.children,n),r=je.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&&Gc(e,n,t);else if(e.tag===19)Gc(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(xe(je,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&&ds(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Si(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&&ds(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Si(t,!0,n,null,l);break;case"together":Si(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function $l(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function cn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ir|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error($(153));if(t.child!==null){for(e=t.child,n=Dn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Dn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ay(e,t,n){switch(t.tag){case 3:Mp(t),Ur();break;case 5:dp(t);break;case 1:it(t.type)&&ls(t);break;case 4:Su(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;xe(as,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(xe(je,je.current&1),t.flags|=128,null):n&t.child.childLanes?$p(e,t,n):(xe(je,je.current&1),e=cn(e,t,n),e!==null?e.sibling:null);xe(je,je.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return zp(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),xe(je,je.current),r)break;return null;case 22:case 23:return t.lanes=0,Dp(e,t,n)}return cn(e,t,n)}var Kp,Ta,Fp,Hp;Kp=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}};Ta=function(){};Fp=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,qn(zt.current);var l=null;switch(n){case"input":o=Qi(e,o),r=Qi(e,r),l=[];break;case"select":o=Te({},o,{value:void 0}),r=Te({},r,{value:void 0}),l=[];break;case"textarea":o=Ji(e,o),r=Ji(e,r),l=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=rs)}ea(n,r);var s;n=null;for(c in o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&o[c]!=null)if(c==="style"){var a=o[c];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Ao.hasOwnProperty(c)?l||(l=[]):(l=l||[]).push(c,null));for(c in r){var u=r[c];if(a=o!=null?o[c]:void 0,r.hasOwnProperty(c)&&u!==a&&(u!=null||a!=null))if(c==="style")if(a){for(s in a)!a.hasOwnProperty(s)||u&&u.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in u)u.hasOwnProperty(s)&&a[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,a=a?a.__html:void 0,u!=null&&a!==u&&(l=l||[]).push(c,u)):c==="children"?typeof u!="string"&&typeof u!="number"||(l=l||[]).push(c,""+u):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Ao.hasOwnProperty(c)?(u!=null&&c==="onScroll"&&be("scroll",e),l||a===u||(l=[])):(l=l||[]).push(c,u))}n&&(l=l||[]).push("style",n);var c=l;(t.updateQueue=c)&&(t.flags|=4)}};Hp=function(e,t,n,r){n!==r&&(t.flags|=4)};function mo(e,t){if(!Se)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 Ye(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 uy(e,t,n){var r=t.pendingProps;switch(mu(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ye(t),null;case 1:return it(t.type)&&os(),Ye(t),null;case 3:return r=t.stateNode,Yr(),we(st),we(Xe),ku(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(vl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Pt!==null&&(Da(Pt),Pt=null))),Ta(e,t),Ye(t),null;case 5:Cu(t);var o=qn(Vo.current);if(n=t.type,e!==null&&t.stateNode!=null)Fp(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error($(166));return Ye(t),null}if(e=qn(zt.current),vl(t)){r=t.stateNode,n=t.type;var l=t.memoizedProps;switch(r[Mt]=t,r[Wo]=l,e=(t.mode&1)!==0,n){case"dialog":be("cancel",r),be("close",r);break;case"iframe":case"object":case"embed":be("load",r);break;case"video":case"audio":for(o=0;o<So.length;o++)be(So[o],r);break;case"source":be("error",r);break;case"img":case"image":case"link":be("error",r),be("load",r);break;case"details":be("toggle",r);break;case"input":nc(r,l),be("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!l.multiple},be("invalid",r);break;case"textarea":oc(r,l),be("invalid",r)}ea(n,l),o=null;for(var s in l)if(l.hasOwnProperty(s)){var a=l[s];s==="children"?typeof a=="string"?r.textContent!==a&&(l.suppressHydrationWarning!==!0&&xl(r.textContent,a,e),o=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(l.suppressHydrationWarning!==!0&&xl(r.textContent,a,e),o=["children",""+a]):Ao.hasOwnProperty(s)&&a!=null&&s==="onScroll"&&be("scroll",r)}switch(n){case"input":cl(r),rc(r,l,!0);break;case"textarea":cl(r),lc(r);break;case"select":case"option":break;default:typeof l.onClick=="function"&&(r.onclick=rs)}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=gf(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[Mt]=t,e[Wo]=r,Kp(e,t,!1,!1),t.stateNode=e;e:{switch(s=ta(n,r),n){case"dialog":be("cancel",e),be("close",e),o=r;break;case"iframe":case"object":case"embed":be("load",e),o=r;break;case"video":case"audio":for(o=0;o<So.length;o++)be(So[o],e);o=r;break;case"source":be("error",e),o=r;break;case"img":case"image":case"link":be("error",e),be("load",e),o=r;break;case"details":be("toggle",e),o=r;break;case"input":nc(e,r),o=Qi(e,r),be("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=Te({},r,{value:void 0}),be("invalid",e);break;case"textarea":oc(e,r),o=Ji(e,r),be("invalid",e);break;default:o=r}ea(n,o),a=o;for(l in a)if(a.hasOwnProperty(l)){var u=a[l];l==="style"?vf(e,u):l==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&yf(e,u)):l==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&Lo(e,u):typeof u=="number"&&Lo(e,""+u):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(Ao.hasOwnProperty(l)?u!=null&&l==="onScroll"&&be("scroll",e):u!=null&&eu(e,l,u,s))}switch(n){case"input":cl(e),rc(e,r,!1);break;case"textarea":cl(e),lc(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Mn(r.value));break;case"select":e.multiple=!!r.multiple,l=r.value,l!=null?Or(e,!!r.multiple,l,!1):r.defaultValue!=null&&Or(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=rs)}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 Ye(t),null;case 6:if(e&&t.stateNode!=null)Hp(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error($(166));if(n=qn(Vo.current),qn(zt.current),vl(t)){if(r=t.stateNode,n=t.memoizedProps,r[Mt]=t,(l=r.nodeValue!==n)&&(e=ft,e!==null))switch(e.tag){case 3:xl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&xl(r.nodeValue,n,(e.mode&1)!==0)}l&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Mt]=t,t.stateNode=r}return Ye(t),null;case 13:if(we(je),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Se&&dt!==null&&t.mode&1&&!(t.flags&128))sp(),Ur(),t.flags|=98560,l=!1;else if(l=vl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!l)throw Error($(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error($(317));l[Mt]=t}else Ur(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ye(t),l=!1}else Pt!==null&&(Da(Pt),Pt=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||je.current&1?$e===0&&($e=3):Ou())),t.updateQueue!==null&&(t.flags|=4),Ye(t),null);case 4:return Yr(),Ta(e,t),e===null&&Fo(t.stateNode.containerInfo),Ye(t),null;case 10:return vu(t.type._context),Ye(t),null;case 17:return it(t.type)&&os(),Ye(t),null;case 19:if(we(je),l=t.memoizedState,l===null)return Ye(t),null;if(r=(t.flags&128)!==0,s=l.rendering,s===null)if(r)mo(l,!1);else{if($e!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=ds(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 xe(je,je.current&1|2),t.child}e=e.sibling}l.tail!==null&&Ie()>Xr&&(t.flags|=128,r=!0,mo(l,!1),t.lanes=4194304)}else{if(!r)if(e=ds(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&&!Se)return Ye(t),null}else 2*Ie()-l.renderingStartTime>Xr&&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=Ie(),t.sibling=null,n=je.current,xe(je,r?n&1|2:n&1),t):(Ye(t),null);case 22:case 23:return Du(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ut&1073741824&&(Ye(t),t.subtreeFlags&6&&(t.flags|=8192)):Ye(t),null;case 24:return null;case 25:return null}throw Error($(156,t.tag))}function cy(e,t){switch(mu(t),t.tag){case 1:return it(t.type)&&os(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Yr(),we(st),we(Xe),ku(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Cu(t),null;case 13:if(we(je),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error($(340));Ur()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return we(je),null;case 4:return Yr(),null;case 10:return vu(t.type._context),null;case 22:case 23:return Du(),null;case 24:return null;default:return null}}var Sl=!1,Qe=!1,dy=typeof WeakSet=="function"?WeakSet:Set,W=null;function Ar(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ne(e,t,r)}else n.current=null}function Na(e,t,n){try{n()}catch(r){Ne(e,t,r)}}var Yc=!1;function fy(e,t){if(da=es,e=Gf(),pu(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,a=-1,u=-1,c=0,f=0,p=e,d=null;t:for(;;){for(var m;p!==n||o!==0&&p.nodeType!==3||(a=s+o),p!==l||r!==0&&p.nodeType!==3||(u=s+r),p.nodeType===3&&(s+=p.nodeValue.length),(m=p.firstChild)!==null;)d=p,p=m;for(;;){if(p===e)break t;if(d===n&&++c===o&&(a=s),d===l&&++f===r&&(u=s),(m=p.nextSibling)!==null)break;p=d,d=p.parentNode}p=m}n=a===-1||u===-1?null:{start:a,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(fa={focusedElem:e,selectionRange:n},es=!1,W=t;W!==null;)if(t=W,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,W=e;else for(;W!==null;){t=W;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 b=v.memoizedProps,S=v.memoizedState,h=t.stateNode,g=h.getSnapshotBeforeUpdate(t.elementType===t.type?b:Nt(t.type,b),S);h.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error($(163))}}catch(x){Ne(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,W=e;break}W=t.return}return v=Yc,Yc=!1,v}function Po(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&&Na(t,n,l)}o=o.next}while(o!==r)}}function zs(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 Ra(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 Wp(e){var t=e.alternate;t!==null&&(e.alternate=null,Wp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Mt],delete t[Wo],delete t[ma],delete t[Yg],delete t[Qg])),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 Bp(e){return e.tag===5||e.tag===3||e.tag===4}function Qc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Bp(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 Pa(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=rs));else if(r!==4&&(e=e.child,e!==null))for(Pa(e,t,n),e=e.sibling;e!==null;)Pa(e,t,n),e=e.sibling}function Ia(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(Ia(e,t,n),e=e.sibling;e!==null;)Ia(e,t,n),e=e.sibling}var Be=null,Rt=!1;function vn(e,t,n){for(n=n.child;n!==null;)Vp(e,t,n),n=n.sibling}function Vp(e,t,n){if($t&&typeof $t.onCommitFiberUnmount=="function")try{$t.onCommitFiberUnmount(Is,n)}catch{}switch(n.tag){case 5:Qe||Ar(n,t);case 6:var r=Be,o=Rt;Be=null,vn(e,t,n),Be=r,Rt=o,Be!==null&&(Rt?(e=Be,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Be.removeChild(n.stateNode));break;case 18:Be!==null&&(Rt?(e=Be,n=n.stateNode,e.nodeType===8?mi(e.parentNode,n):e.nodeType===1&&mi(e,n),$o(e)):mi(Be,n.stateNode));break;case 4:r=Be,o=Rt,Be=n.stateNode.containerInfo,Rt=!0,vn(e,t,n),Be=r,Rt=o;break;case 0:case 11:case 14:case 15:if(!Qe&&(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)&&Na(n,t,s),o=o.next}while(o!==r)}vn(e,t,n);break;case 1:if(!Qe&&(Ar(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Ne(n,t,a)}vn(e,t,n);break;case 21:vn(e,t,n);break;case 22:n.mode&1?(Qe=(r=Qe)||n.memoizedState!==null,vn(e,t,n),Qe=r):vn(e,t,n);break;default:vn(e,t,n)}}function Xc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new dy),t.forEach(function(r){var o=wy.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Tt(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,a=s;e:for(;a!==null;){switch(a.tag){case 5:Be=a.stateNode,Rt=!1;break e;case 3:Be=a.stateNode.containerInfo,Rt=!0;break e;case 4:Be=a.stateNode.containerInfo,Rt=!0;break e}a=a.return}if(Be===null)throw Error($(160));Vp(l,s,o),Be=null,Rt=!1;var u=o.alternate;u!==null&&(u.return=null),o.return=null}catch(c){Ne(o,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Up(t,e),t=t.sibling}function Up(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Tt(t,e),Lt(e),r&4){try{Po(3,e,e.return),zs(3,e)}catch(b){Ne(e,e.return,b)}try{Po(5,e,e.return)}catch(b){Ne(e,e.return,b)}}break;case 1:Tt(t,e),Lt(e),r&512&&n!==null&&Ar(n,n.return);break;case 5:if(Tt(t,e),Lt(e),r&512&&n!==null&&Ar(n,n.return),e.flags&32){var o=e.stateNode;try{Lo(o,"")}catch(b){Ne(e,e.return,b)}}if(r&4&&(o=e.stateNode,o!=null)){var l=e.memoizedProps,s=n!==null?n.memoizedProps:l,a=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{a==="input"&&l.type==="radio"&&l.name!=null&&hf(o,l),ta(a,s);var c=ta(a,l);for(s=0;s<u.length;s+=2){var f=u[s],p=u[s+1];f==="style"?vf(o,p):f==="dangerouslySetInnerHTML"?yf(o,p):f==="children"?Lo(o,p):eu(o,f,p,c)}switch(a){case"input":Xi(o,l);break;case"textarea":mf(o,l);break;case"select":var d=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!l.multiple;var m=l.value;m!=null?Or(o,!!l.multiple,m,!1):d!==!!l.multiple&&(l.defaultValue!=null?Or(o,!!l.multiple,l.defaultValue,!0):Or(o,!!l.multiple,l.multiple?[]:"",!1))}o[Wo]=l}catch(b){Ne(e,e.return,b)}}break;case 6:if(Tt(t,e),Lt(e),r&4){if(e.stateNode===null)throw Error($(162));o=e.stateNode,l=e.memoizedProps;try{o.nodeValue=l}catch(b){Ne(e,e.return,b)}}break;case 3:if(Tt(t,e),Lt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{$o(t.containerInfo)}catch(b){Ne(e,e.return,b)}break;case 4:Tt(t,e),Lt(e);break;case 13:Tt(t,e),Lt(e),o=e.child,o.flags&8192&&(l=o.memoizedState!==null,o.stateNode.isHidden=l,!l||o.alternate!==null&&o.alternate.memoizedState!==null||(Au=Ie())),r&4&&Xc(e);break;case 22:if(f=n!==null&&n.memoizedState!==null,e.mode&1?(Qe=(c=Qe)||f,Tt(t,e),Qe=c):Tt(t,e),Lt(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!f&&e.mode&1)for(W=e,f=e.child;f!==null;){for(p=W=f;W!==null;){switch(d=W,m=d.child,d.tag){case 0:case 11:case 14:case 15:Po(4,d,d.return);break;case 1:Ar(d,d.return);var v=d.stateNode;if(typeof v.componentWillUnmount=="function"){r=d,n=d.return;try{t=r,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(b){Ne(r,n,b)}}break;case 5:Ar(d,d.return);break;case 22:if(d.memoizedState!==null){Jc(p);continue}}m!==null?(m.return=d,W=m):Jc(p)}f=f.sibling}e:for(f=null,p=e;;){if(p.tag===5){if(f===null){f=p;try{o=p.stateNode,c?(l=o.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none"):(a=p.stateNode,u=p.memoizedProps.style,s=u!=null&&u.hasOwnProperty("display")?u.display:null,a.style.display=xf("display",s))}catch(b){Ne(e,e.return,b)}}}else if(p.tag===6){if(f===null)try{p.stateNode.nodeValue=c?"":p.memoizedProps}catch(b){Ne(e,e.return,b)}}else if((p.tag!==22&&p.tag!==23||p.memoizedState===null||p===e)&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===e)break e;for(;p.sibling===null;){if(p.return===null||p.return===e)break e;f===p&&(f=null),p=p.return}f===p&&(f=null),p.sibling.return=p.return,p=p.sibling}}break;case 19:Tt(t,e),Lt(e),r&4&&Xc(e);break;case 21:break;default:Tt(t,e),Lt(e)}}function Lt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Bp(n)){var r=n;break e}n=n.return}throw Error($(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(Lo(o,""),r.flags&=-33);var l=Qc(e);Ia(e,l,o);break;case 3:case 4:var s=r.stateNode.containerInfo,a=Qc(e);Pa(e,a,s);break;default:throw Error($(161))}}catch(u){Ne(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function py(e,t,n){W=e,Gp(e)}function Gp(e,t,n){for(var r=(e.mode&1)!==0;W!==null;){var o=W,l=o.child;if(o.tag===22&&r){var s=o.memoizedState!==null||Sl;if(!s){var a=o.alternate,u=a!==null&&a.memoizedState!==null||Qe;a=Sl;var c=Qe;if(Sl=s,(Qe=u)&&!c)for(W=o;W!==null;)s=W,u=s.child,s.tag===22&&s.memoizedState!==null?qc(o):u!==null?(u.return=s,W=u):qc(o);for(;l!==null;)W=l,Gp(l),l=l.sibling;W=o,Sl=a,Qe=c}Zc(e)}else o.subtreeFlags&8772&&l!==null?(l.return=o,W=l):Zc(e)}}function Zc(e){for(;W!==null;){var t=W;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Qe||zs(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Qe)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:Nt(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var l=t.updateQueue;l!==null&&Dc(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}Dc(t,s,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;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 f=c.memoizedState;if(f!==null){var p=f.dehydrated;p!==null&&$o(p)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error($(163))}Qe||t.flags&512&&Ra(t)}catch(d){Ne(t,t.return,d)}}if(t===e){W=null;break}if(n=t.sibling,n!==null){n.return=t.return,W=n;break}W=t.return}}function Jc(e){for(;W!==null;){var t=W;if(t===e){W=null;break}var n=t.sibling;if(n!==null){n.return=t.return,W=n;break}W=t.return}}function qc(e){for(;W!==null;){var t=W;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{zs(4,t)}catch(u){Ne(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(u){Ne(t,o,u)}}var l=t.return;try{Ra(t)}catch(u){Ne(t,l,u)}break;case 5:var s=t.return;try{Ra(t)}catch(u){Ne(t,s,u)}}}catch(u){Ne(t,t.return,u)}if(t===e){W=null;break}var a=t.sibling;if(a!==null){a.return=t.return,W=a;break}W=t.return}}var hy=Math.ceil,hs=xn.ReactCurrentDispatcher,Iu=xn.ReactCurrentOwner,St=xn.ReactCurrentBatchConfig,fe=0,He=null,De=null,Ve=0,ut=0,Lr=Hn(0),$e=0,Qo=null,ir=0,Ks=0,_u=0,Io=null,ot=null,Au=0,Xr=1/0,Qt=null,ms=!1,_a=null,An=null,Cl=!1,Tn=null,gs=0,_o=0,Aa=null,zl=-1,Kl=0;function Je(){return fe&6?Ie():zl!==-1?zl:zl=Ie()}function Ln(e){return e.mode&1?fe&2&&Ve!==0?Ve&-Ve:Zg.transition!==null?(Kl===0&&(Kl=If()),Kl):(e=he,e!==0||(e=window.event,e=e===void 0?16:$f(e.type)),e):1}function _t(e,t,n,r){if(50<_o)throw _o=0,Aa=null,Error($(185));el(e,n,r),(!(fe&2)||e!==He)&&(e===He&&(!(fe&2)&&(Ks|=n),$e===4&&kn(e,Ve)),at(e,r),n===1&&fe===0&&!(t.mode&1)&&(Xr=Ie()+500,Os&&Wn()))}function at(e,t){var n=e.callbackNode;Zm(e,t);var r=ql(e,e===He?Ve:0);if(r===0)n!==null&&ac(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&ac(n),t===1)e.tag===0?Xg(ed.bind(null,e)):rp(ed.bind(null,e)),Ug(function(){!(fe&6)&&Wn()}),n=null;else{switch(_f(r)){case 1:n=lu;break;case 4:n=Rf;break;case 16:n=Jl;break;case 536870912:n=Pf;break;default:n=Jl}n=th(n,Yp.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Yp(e,t){if(zl=-1,Kl=0,fe&6)throw Error($(327));var n=e.callbackNode;if(Fr()&&e.callbackNode!==n)return null;var r=ql(e,e===He?Ve:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=ys(e,r);else{t=r;var o=fe;fe|=2;var l=Xp();(He!==e||Ve!==t)&&(Qt=null,Xr=Ie()+500,tr(e,t));do try{yy();break}catch(a){Qp(e,a)}while(!0);xu(),hs.current=l,fe=o,De!==null?t=0:(He=null,Ve=0,t=$e)}if(t!==0){if(t===2&&(o=sa(e),o!==0&&(r=o,t=La(e,o))),t===1)throw n=Qo,tr(e,0),kn(e,r),at(e,Ie()),n;if(t===6)kn(e,r);else{if(o=e.current.alternate,!(r&30)&&!my(o)&&(t=ys(e,r),t===2&&(l=sa(e),l!==0&&(r=l,t=La(e,l))),t===1))throw n=Qo,tr(e,0),kn(e,r),at(e,Ie()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error($(345));case 2:Xn(e,ot,Qt);break;case 3:if(kn(e,r),(r&130023424)===r&&(t=Au+500-Ie(),10<t)){if(ql(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){Je(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=ha(Xn.bind(null,e,ot,Qt),t);break}Xn(e,ot,Qt);break;case 4:if(kn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var s=31-It(r);l=1<<s,s=t[s],s>o&&(o=s),r&=~l}if(r=o,r=Ie()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*hy(r/1960))-r,10<r){e.timeoutHandle=ha(Xn.bind(null,e,ot,Qt),r);break}Xn(e,ot,Qt);break;case 5:Xn(e,ot,Qt);break;default:throw Error($(329))}}}return at(e,Ie()),e.callbackNode===n?Yp.bind(null,e):null}function La(e,t){var n=Io;return e.current.memoizedState.isDehydrated&&(tr(e,t).flags|=256),e=ys(e,t),e!==2&&(t=ot,ot=n,t!==null&&Da(t)),e}function Da(e){ot===null?ot=e:ot.push.apply(ot,e)}function my(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(!At(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 kn(e,t){for(t&=~_u,t&=~Ks,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-It(t),r=1<<n;e[n]=-1,t&=~r}}function ed(e){if(fe&6)throw Error($(327));Fr();var t=ql(e,0);if(!(t&1))return at(e,Ie()),null;var n=ys(e,t);if(e.tag!==0&&n===2){var r=sa(e);r!==0&&(t=r,n=La(e,r))}if(n===1)throw n=Qo,tr(e,0),kn(e,t),at(e,Ie()),n;if(n===6)throw Error($(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Xn(e,ot,Qt),at(e,Ie()),null}function Lu(e,t){var n=fe;fe|=1;try{return e(t)}finally{fe=n,fe===0&&(Xr=Ie()+500,Os&&Wn())}}function ar(e){Tn!==null&&Tn.tag===0&&!(fe&6)&&Fr();var t=fe;fe|=1;var n=St.transition,r=he;try{if(St.transition=null,he=1,e)return e()}finally{he=r,St.transition=n,fe=t,!(fe&6)&&Wn()}}function Du(){ut=Lr.current,we(Lr)}function tr(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Vg(n)),De!==null)for(n=De.return;n!==null;){var r=n;switch(mu(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&os();break;case 3:Yr(),we(st),we(Xe),ku();break;case 5:Cu(r);break;case 4:Yr();break;case 13:we(je);break;case 19:we(je);break;case 10:vu(r.type._context);break;case 22:case 23:Du()}n=n.return}if(He=e,De=e=Dn(e.current,null),Ve=ut=t,$e=0,Qo=null,_u=Ks=ir=0,ot=Io=null,Jn!==null){for(t=0;t<Jn.length;t++)if(n=Jn[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}Jn=null}return e}function Qp(e,t){do{var n=De;try{if(xu(),Ol.current=ps,fs){for(var r=Ee.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}fs=!1}if(sr=0,Fe=Me=Ee=null,Ro=!1,Uo=0,Iu.current=null,n===null||n.return===null){$e=1,Qo=t,De=null;break}e:{var l=e,s=n.return,a=n,u=t;if(t=Ve,a.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var c=u,f=a,p=f.tag;if(!(f.mode&1)&&(p===0||p===11||p===15)){var d=f.alternate;d?(f.updateQueue=d.updateQueue,f.memoizedState=d.memoizedState,f.lanes=d.lanes):(f.updateQueue=null,f.memoizedState=null)}var m=Fc(s);if(m!==null){m.flags&=-257,Hc(m,s,a,l,t),m.mode&1&&Kc(l,c,t),t=m,u=c;var v=t.updateQueue;if(v===null){var b=new Set;b.add(u),t.updateQueue=b}else v.add(u);break e}else{if(!(t&1)){Kc(l,c,t),Ou();break e}u=Error($(426))}}else if(Se&&a.mode&1){var S=Fc(s);if(S!==null){!(S.flags&65536)&&(S.flags|=256),Hc(S,s,a,l,t),gu(Qr(u,a));break e}}l=u=Qr(u,a),$e!==4&&($e=2),Io===null?Io=[l]:Io.push(l),l=s;do{switch(l.tag){case 3:l.flags|=65536,t&=-t,l.lanes|=t;var h=_p(l,u,t);Lc(l,h);break e;case 1:a=u;var g=l.type,y=l.stateNode;if(!(l.flags&128)&&(typeof g.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(An===null||!An.has(y)))){l.flags|=65536,t&=-t,l.lanes|=t;var x=Ap(l,a,t);Lc(l,x);break e}}l=l.return}while(l!==null)}Jp(n)}catch(k){t=k,De===n&&n!==null&&(De=n=n.return);continue}break}while(!0)}function Xp(){var e=hs.current;return hs.current=ps,e===null?ps:e}function Ou(){($e===0||$e===3||$e===2)&&($e=4),He===null||!(ir&268435455)&&!(Ks&268435455)||kn(He,Ve)}function ys(e,t){var n=fe;fe|=2;var r=Xp();(He!==e||Ve!==t)&&(Qt=null,tr(e,t));do try{gy();break}catch(o){Qp(e,o)}while(!0);if(xu(),fe=n,hs.current=r,De!==null)throw Error($(261));return He=null,Ve=0,$e}function gy(){for(;De!==null;)Zp(De)}function yy(){for(;De!==null&&!Hm();)Zp(De)}function Zp(e){var t=eh(e.alternate,e,ut);e.memoizedProps=e.pendingProps,t===null?Jp(e):De=t,Iu.current=null}function Jp(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=cy(n,t),n!==null){n.flags&=32767,De=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{$e=6,De=null;return}}else if(n=uy(n,t,ut),n!==null){De=n;return}if(t=t.sibling,t!==null){De=t;return}De=t=e}while(t!==null);$e===0&&($e=5)}function Xn(e,t,n){var r=he,o=St.transition;try{St.transition=null,he=1,xy(e,t,n,r)}finally{St.transition=o,he=r}return null}function xy(e,t,n,r){do Fr();while(Tn!==null);if(fe&6)throw Error($(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($(177));e.callbackNode=null,e.callbackPriority=0;var l=n.lanes|n.childLanes;if(Jm(e,l),e===He&&(De=He=null,Ve=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Cl||(Cl=!0,th(Jl,function(){return Fr(),null})),l=(n.flags&15990)!==0,n.subtreeFlags&15990||l){l=St.transition,St.transition=null;var s=he;he=1;var a=fe;fe|=4,Iu.current=null,fy(e,n),Up(n,e),$g(fa),es=!!da,fa=da=null,e.current=n,py(n),Wm(),fe=a,he=s,St.transition=l}else e.current=n;if(Cl&&(Cl=!1,Tn=e,gs=o),l=e.pendingLanes,l===0&&(An=null),Um(n.stateNode),at(e,Ie()),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(ms)throw ms=!1,e=_a,_a=null,e;return gs&1&&e.tag!==0&&Fr(),l=e.pendingLanes,l&1?e===Aa?_o++:(_o=0,Aa=e):_o=0,Wn(),null}function Fr(){if(Tn!==null){var e=_f(gs),t=St.transition,n=he;try{if(St.transition=null,he=16>e?16:e,Tn===null)var r=!1;else{if(e=Tn,Tn=null,gs=0,fe&6)throw Error($(331));var o=fe;for(fe|=4,W=e.current;W!==null;){var l=W,s=l.child;if(W.flags&16){var a=l.deletions;if(a!==null){for(var u=0;u<a.length;u++){var c=a[u];for(W=c;W!==null;){var f=W;switch(f.tag){case 0:case 11:case 15:Po(8,f,l)}var p=f.child;if(p!==null)p.return=f,W=p;else for(;W!==null;){f=W;var d=f.sibling,m=f.return;if(Wp(f),f===c){W=null;break}if(d!==null){d.return=m,W=d;break}W=m}}}var v=l.alternate;if(v!==null){var b=v.child;if(b!==null){v.child=null;do{var S=b.sibling;b.sibling=null,b=S}while(b!==null)}}W=l}}if(l.subtreeFlags&2064&&s!==null)s.return=l,W=s;else e:for(;W!==null;){if(l=W,l.flags&2048)switch(l.tag){case 0:case 11:case 15:Po(9,l,l.return)}var h=l.sibling;if(h!==null){h.return=l.return,W=h;break e}W=l.return}}var g=e.current;for(W=g;W!==null;){s=W;var y=s.child;if(s.subtreeFlags&2064&&y!==null)y.return=s,W=y;else e:for(s=g;W!==null;){if(a=W,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:zs(9,a)}}catch(k){Ne(a,a.return,k)}if(a===s){W=null;break e}var x=a.sibling;if(x!==null){x.return=a.return,W=x;break e}W=a.return}}if(fe=o,Wn(),$t&&typeof $t.onPostCommitFiberRoot=="function")try{$t.onPostCommitFiberRoot(Is,e)}catch{}r=!0}return r}finally{he=n,St.transition=t}}return!1}function td(e,t,n){t=Qr(n,t),t=_p(e,t,1),e=_n(e,t,1),t=Je(),e!==null&&(el(e,1,t),at(e,t))}function Ne(e,t,n){if(e.tag===3)td(e,e,n);else for(;t!==null;){if(t.tag===3){td(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(An===null||!An.has(r))){e=Qr(n,e),e=Ap(t,e,1),t=_n(t,e,1),e=Je(),t!==null&&(el(t,1,e),at(t,e));break}}t=t.return}}function vy(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Je(),e.pingedLanes|=e.suspendedLanes&n,He===e&&(Ve&n)===n&&($e===4||$e===3&&(Ve&130023424)===Ve&&500>Ie()-Au?tr(e,0):_u|=n),at(e,t)}function qp(e,t){t===0&&(e.mode&1?(t=pl,pl<<=1,!(pl&130023424)&&(pl=4194304)):t=1);var n=Je();e=un(e,t),e!==null&&(el(e,t,n),at(e,n))}function by(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qp(e,n)}function wy(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($(314))}r!==null&&r.delete(t),qp(e,n)}var eh;eh=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||st.current)lt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return lt=!1,ay(e,t,n);lt=!!(e.flags&131072)}else lt=!1,Se&&t.flags&1048576&&op(t,is,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;$l(e,t),e=t.pendingProps;var o=Vr(t,Xe.current);Kr(t,n),o=Eu(null,t,r,e,o,n);var l=Tu();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,it(r)?(l=!0,ls(t)):l=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,wu(t),o.updater=$s,t.stateNode=o,o._reactInternals=t,wa(t,r,e,n),t=ka(null,t,r,!0,l,n)):(t.tag=0,Se&&l&&hu(t),Ze(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch($l(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=Cy(r),e=Nt(r,e),o){case 0:t=Ca(null,t,r,e,n);break e;case 1:t=Vc(null,t,r,e,n);break e;case 11:t=Wc(null,t,r,e,n);break e;case 14:t=Bc(null,t,r,Nt(r.type,e),n);break e}throw Error($(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Nt(r,o),Ca(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Nt(r,o),Vc(e,t,r,o,n);case 3:e:{if(Mp(t),e===null)throw Error($(387));r=t.pendingProps,l=t.memoizedState,o=l.element,cp(e,t),cs(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=Qr(Error($(423)),t),t=Uc(e,t,r,n,o);break e}else if(r!==o){o=Qr(Error($(424)),t),t=Uc(e,t,r,n,o);break e}else for(dt=In(t.stateNode.containerInfo.firstChild),ft=t,Se=!0,Pt=null,n=ap(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ur(),r===o){t=cn(e,t,n);break e}Ze(e,t,r,n)}t=t.child}return t;case 5:return dp(t),e===null&&xa(t),r=t.type,o=t.pendingProps,l=e!==null?e.memoizedProps:null,s=o.children,pa(r,o)?s=null:l!==null&&pa(r,l)&&(t.flags|=32),Op(e,t),Ze(e,t,s,n),t.child;case 6:return e===null&&xa(t),null;case 13:return $p(e,t,n);case 4:return Su(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Gr(t,null,r,n):Ze(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Nt(r,o),Wc(e,t,r,o,n);case 7:return Ze(e,t,t.pendingProps,n),t.child;case 8:return Ze(e,t,t.pendingProps.children,n),t.child;case 12:return Ze(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,xe(as,r._currentValue),r._currentValue=s,l!==null)if(At(l.value,s)){if(l.children===o.children&&!st.current){t=cn(e,t,n);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var a=l.dependencies;if(a!==null){s=l.child;for(var u=a.firstContext;u!==null;){if(u.context===r){if(l.tag===1){u=rn(-1,n&-n),u.tag=2;var c=l.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?u.next=u:(u.next=f.next,f.next=u),c.pending=u}}l.lanes|=n,u=l.alternate,u!==null&&(u.lanes|=n),va(l.return,n,t),a.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($(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),va(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}Ze(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Kr(t,n),o=kt(o),r=r(o),t.flags|=1,Ze(e,t,r,n),t.child;case 14:return r=t.type,o=Nt(r,t.pendingProps),o=Nt(r.type,o),Bc(e,t,r,o,n);case 15:return Lp(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Nt(r,o),$l(e,t),t.tag=1,it(r)?(e=!0,ls(t)):e=!1,Kr(t,n),Ip(t,r,o),wa(t,r,o,n),ka(null,t,r,!0,e,n);case 19:return zp(e,t,n);case 22:return Dp(e,t,n)}throw Error($(156,t.tag))};function th(e,t){return Nf(e,t)}function Sy(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 wt(e,t,n,r){return new Sy(e,t,n,r)}function Mu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Cy(e){if(typeof e=="function")return Mu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===nu)return 11;if(e===ru)return 14}return 2}function Dn(e,t){var n=e.alternate;return n===null?(n=wt(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 Fl(e,t,n,r,o,l){var s=2;if(r=e,typeof e=="function")Mu(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case kr:return nr(n.children,o,l,t);case tu:s=8,o|=8;break;case Vi:return e=wt(12,n,t,o|2),e.elementType=Vi,e.lanes=l,e;case Ui:return e=wt(13,n,t,o),e.elementType=Ui,e.lanes=l,e;case Gi:return e=wt(19,n,t,o),e.elementType=Gi,e.lanes=l,e;case df:return Fs(n,o,l,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case uf:s=10;break e;case cf:s=9;break e;case nu:s=11;break e;case ru:s=14;break e;case bn:s=16,r=null;break e}throw Error($(130,e==null?e:typeof e,""))}return t=wt(s,n,t,o),t.elementType=e,t.type=r,t.lanes=l,t}function nr(e,t,n,r){return e=wt(7,e,r,t),e.lanes=n,e}function Fs(e,t,n,r){return e=wt(22,e,r,t),e.elementType=df,e.lanes=n,e.stateNode={isHidden:!1},e}function Ci(e,t,n){return e=wt(6,e,null,t),e.lanes=n,e}function ki(e,t,n){return t=wt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ky(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=oi(0),this.expirationTimes=oi(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=oi(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function $u(e,t,n,r,o,l,s,a,u){return e=new ky(e,t,n,a,u),t===1?(t=1,l===!0&&(t|=8)):t=0,l=wt(3,null,null,t),e.current=l,l.stateNode=e,l.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},wu(l),e}function jy(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Cr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function nh(e){if(!e)return $n;e=e._reactInternals;e:{if(mr(e)!==e||e.tag!==1)throw Error($(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(it(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error($(171))}if(e.tag===1){var n=e.type;if(it(n))return np(e,n,t)}return t}function rh(e,t,n,r,o,l,s,a,u){return e=$u(n,r,!0,e,o,l,s,a,u),e.context=nh(null),n=e.current,r=Je(),o=Ln(n),l=rn(r,o),l.callback=t??null,_n(n,l,o),e.current.lanes=o,el(e,o,r),at(e,r),e}function Hs(e,t,n,r){var o=t.current,l=Je(),s=Ln(o);return n=nh(n),t.context===null?t.context=n:t.pendingContext=n,t=rn(l,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=_n(o,t,s),e!==null&&(_t(e,o,s,l),Dl(e,o,s)),s}function xs(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 nd(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function zu(e,t){nd(e,t),(e=e.alternate)&&nd(e,t)}function Ey(){return null}var oh=typeof reportError=="function"?reportError:function(e){console.error(e)};function Ku(e){this._internalRoot=e}Ws.prototype.render=Ku.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error($(409));Hs(e,t,null,null)};Ws.prototype.unmount=Ku.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ar(function(){Hs(null,e,null,null)}),t[an]=null}};function Ws(e){this._internalRoot=e}Ws.prototype.unstable_scheduleHydration=function(e){if(e){var t=Df();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Cn.length&&t!==0&&t<Cn[n].priority;n++);Cn.splice(n,0,e),n===0&&Mf(e)}};function Fu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Bs(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function rd(){}function Ty(e,t,n,r,o){if(o){if(typeof r=="function"){var l=r;r=function(){var c=xs(s);l.call(c)}}var s=rh(t,r,e,0,null,!1,!1,"",rd);return e._reactRootContainer=s,e[an]=s.current,Fo(e.nodeType===8?e.parentNode:e),ar(),s}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var a=r;r=function(){var c=xs(u);a.call(c)}}var u=$u(e,0,!1,null,null,!1,!1,"",rd);return e._reactRootContainer=u,e[an]=u.current,Fo(e.nodeType===8?e.parentNode:e),ar(function(){Hs(t,u,n,r)}),u}function Vs(e,t,n,r,o){var l=n._reactRootContainer;if(l){var s=l;if(typeof o=="function"){var a=o;o=function(){var u=xs(s);a.call(u)}}Hs(t,s,e,o)}else s=Ty(n,t,e,o,r);return xs(s)}Af=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=wo(t.pendingLanes);n!==0&&(su(t,n|1),at(t,Ie()),!(fe&6)&&(Xr=Ie()+500,Wn()))}break;case 13:ar(function(){var r=un(e,1);if(r!==null){var o=Je();_t(r,e,1,o)}}),zu(e,1)}};iu=function(e){if(e.tag===13){var t=un(e,134217728);if(t!==null){var n=Je();_t(t,e,134217728,n)}zu(e,134217728)}};Lf=function(e){if(e.tag===13){var t=Ln(e),n=un(e,t);if(n!==null){var r=Je();_t(n,e,t,r)}zu(e,t)}};Df=function(){return he};Of=function(e,t){var n=he;try{return he=e,t()}finally{he=n}};ra=function(e,t,n){switch(t){case"input":if(Xi(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=Ds(r);if(!o)throw Error($(90));pf(r),Xi(r,o)}}}break;case"textarea":mf(e,n);break;case"select":t=n.value,t!=null&&Or(e,!!n.multiple,t,!1)}};Sf=Lu;Cf=ar;var Ny={usingClientEntryPoint:!1,Events:[nl,Nr,Ds,bf,wf,Lu]},go={findFiberByHostInstance:Zn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Ry={bundleType:go.bundleType,version:go.version,rendererPackageName:go.rendererPackageName,rendererConfig:go.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:xn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Ef(e),e===null?null:e.stateNode},findFiberByHostInstance:go.findFiberByHostInstance||Ey,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 kl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!kl.isDisabled&&kl.supportsFiber)try{Is=kl.inject(Ry),$t=kl}catch{}}mt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ny;mt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Fu(t))throw Error($(200));return jy(e,t,null,n)};mt.createRoot=function(e,t){if(!Fu(e))throw Error($(299));var n=!1,r="",o=oh;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=$u(e,1,!1,null,null,n,!1,r,o),e[an]=t.current,Fo(e.nodeType===8?e.parentNode:e),new Ku(t)};mt.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($(188)):(e=Object.keys(e).join(","),Error($(268,e)));return e=Ef(t),e=e===null?null:e.stateNode,e};mt.flushSync=function(e){return ar(e)};mt.hydrate=function(e,t,n){if(!Bs(t))throw Error($(200));return Vs(null,e,t,!0,n)};mt.hydrateRoot=function(e,t,n){if(!Fu(e))throw Error($(405));var r=n!=null&&n.hydratedSources||null,o=!1,l="",s=oh;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=rh(t,null,e,1,n??null,o,!1,l,s),e[an]=t.current,Fo(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 Ws(t)};mt.render=function(e,t,n){if(!Bs(t))throw Error($(200));return Vs(null,e,t,!1,n)};mt.unmountComponentAtNode=function(e){if(!Bs(e))throw Error($(40));return e._reactRootContainer?(ar(function(){Vs(null,null,e,!1,function(){e._reactRootContainer=null,e[an]=null})}),!0):!1};mt.unstable_batchedUpdates=Lu;mt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Bs(n))throw Error($(200));if(e==null||e._reactInternals===void 0)throw Error($(38));return Vs(e,t,n,!1,r)};mt.version="18.3.1-next-f1338f8080-20240426";function lh(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(lh)}catch(e){console.error(e)}}lh(),of.exports=mt;var Hu=of.exports,od=Hu;Wi.createRoot=od.createRoot,Wi.hydrateRoot=od.hydrateRoot;const Py="modulepreload",Iy=function(e){return"/panel/"+e},ld={},_y=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),a=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));o=Promise.allSettled(n.map(u=>{if(u=Iy(u),u in ld)return;ld[u]=!0;const c=u.endsWith(".css"),f=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${f}`))return;const p=document.createElement("link");if(p.rel=c?"stylesheet":Py,c||(p.as="script"),p.crossOrigin="",p.href=u,a&&p.setAttribute("nonce",a),document.head.appendChild(p),c)return new Promise((d,m)=>{p.addEventListener("load",d),p.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${u}`)))})}))}function l(s){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s}return o.then(s=>{for(const a of s||[])a.status==="rejected"&&l(a.reason);return t().catch(l)})},Wu=["none","2xs","xs","sm","md","lg","xl","2xl"],sh=["none","2xs","xs","sm"],Oa=["0","1","2","4","8"],Bu=["none","2xs","xs","sm","md","lg"],vs=new Set(Wu),bs=new Set(sh),Zr=new Set(Oa),ws=new Set(Bu),Ay=["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"],Ly=["font-thin","font-extralight","font-light","font-normal","font-medium","font-semibold","font-bold","font-extrabold","font-black"],Dy=["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"],Oy=["tracking-tighter","tracking-tight","tracking-normal","tracking-wide","tracking-wider","tracking-widest"],My=Array.from({length:21},(e,t)=>`opacity-${t*5}`),ih=["none","sm","","md","lg","xl","2xl","3xl","full"],Ma=ih.map(e=>e?`rounded-${e}`:"rounded");function $y(e){return ih.map(t=>t?`${e}-${t}`:e)}const ah=["0","","2","3","4","5","6","8","10","12","16","20","24","32","40","48","56","64"],zy=["solid","dashed","dotted","double","hidden","none"],$a=["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"],Ky=["slate","gray","zinc","neutral","stone","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"],Fy=["50","100","200","300","400","500","600","700","800","900","950"];function te(){return e=>e===""?{props:{}}:null}function Le(e,t){const n=new Set(t);return r=>n.has(r)?{props:{[e]:r}}:null}function xt(e="color"){return t=>t!==""?{props:{[e]:t}}:null}function Z(e,t="scale"){return n=>n!==""?{props:{[t]:n,scaleName:e}}:null}const Hy=["t","r","b","l","x","y"],ji=["t","r","b","l","x","y","s","e","bs","be"];function Pe(...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 Gt(e,t){return t.map(n=>({...n,section:e}))}function Ei(e,t,n=Hy){return[...n.map(o=>({prefix:e+o,segment:t,canonical:e,extraProps:{side:o}})),{prefix:e,segment:t}]}function Wy(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:Pe(te(),t)}]}function sd(e,t){const n=new Set(t);return{prefix:e,segment:te(),matches:r=>n.has(r)?{props:{value:r}}:null}}function By(e,t){for(const n of t){const{prefix:r,matches:o,segment:l,canonical:s,section:a,extraProps:u}=n;if(o){const p=o(e);if(!p)continue;const d={property:s??r,fullClass:e};if(a&&(d.section=a),u)for(const[m,v]of Object.entries(u))d[m]=v;for(const[m,v]of Object.entries(p.props))d[m]=v;return d}let c;if(e===r)c="";else if(e.startsWith(r+"-"))c=e.slice(r.length+1);else continue;const f=l(c);if(f){const p={property:s??r,fullClass:e};if(a&&(p.section=a),u)for(const[d,m]of Object.entries(u))p[d]=m;for(const[d,m]of Object.entries(f.props))p[d]=m;return p}return{property:s??r,fullClass:e,unknown:!0}}return null}function Vy(e,t){const n=e.trim().split(/\s+/).filter(Boolean),r=[];for(const o of n){const l=By(o,t);l&&r.push(l)}return r}const Uy=["solid","dashed","dotted","double","none","hidden"],Gy=["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],Yy=["xs","sm","base","lg","xl","2xl","3xl","4xl","5xl","6xl","7xl","8xl","9xl"],Qy=["tighter","tight","normal","wide","wider","widest"],Xy=["left","center","right","justify","start","end"],Zy=["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"],Jy=["static","relative","absolute","fixed","sticky"],qy=["t","tr","r","br","b","bl","l","tl"],ex=["start","end","end-safe","center","center-safe","between","around","evenly","stretch","baseline","normal"],tx=["start","end","end-safe","center","center-safe","baseline","baseline-last","stretch"],nx=["normal","start","end","center","between","around","evenly","baseline","stretch"],rx=["start","end","center","stretch"],ox=["auto","start","end","center","stretch","baseline"],lx=[...Gt("spacing",[...Ei("m",Z("spacing"),ji),...Ei("-m",Z("spacing"),ji),...Ei("p",Z("spacing"),ji),K("gap-x",Z("spacing")),K("gap-y",Z("spacing")),K("gap",Z("spacing")),K("space-x-reverse",te()),K("space-y-reverse",te()),K("space-x",Z("spacing")),K("space-y",Z("spacing"))]),...Gt("sizing",[K("min-w",Z("spacing")),K("max-w",Z("spacing")),K("min-h",Z("spacing")),K("max-h",Z("spacing")),K("size",Z("spacing")),K("w",Z("spacing")),K("h",Z("spacing"))]),...Gt("typography",[K("font-sans",te()),K("font-serif",te()),K("font-mono",te()),K("font",Le("scale",Gy)),K("text-shadow",Pe(Le("size",Bu),xt())),K("text",Pe(Le("align",Xy),e=>Yy.includes(e)?{props:{size:e,scaleName:"fontSize"}}:null,xt())),K("leading",Pe(Le("scale",["none"]),Z("spacing"))),K("tracking",Le("scale",Qy)),K("italic",te()),K("not-italic",te()),K("underline",te()),K("line-through",te()),K("overline",te()),K("no-underline",te()),K("uppercase",te()),K("lowercase",te()),K("capitalize",te()),K("normal-case",te()),K("truncate",te()),K("align-text-top",te()),K("align-text-bottom",te()),K("align-baseline",te()),K("align-top",te()),K("align-middle",te()),K("align-bottom",te()),K("align-sub",te()),K("align-super",te())]),...Gt("color",[K("bg-gradient-to",Le("direction",qy)),K("bg",xt()),K("from",xt()),K("via",xt()),K("to",xt()),K("ring",xt()),K("outline",Pe(Le("style",["solid","dashed","dotted","double","none"]),xt())),K("fill",xt()),K("stroke",xt()),K("decoration",xt())]),...Gt("borders",[{prefix:"border-bs",segment:Pe(te(),Z("borderWidth")),canonical:"border",extraProps:{side:"bs"}},{prefix:"border-be",segment:Pe(te(),Z("borderWidth")),canonical:"border",extraProps:{side:"be"}},{prefix:"border-x",segment:Pe(te(),Z("borderWidth")),canonical:"border",extraProps:{side:"x"}},{prefix:"border-y",segment:Pe(te(),Z("borderWidth")),canonical:"border",extraProps:{side:"y"}},{prefix:"border-s",segment:Pe(te(),Z("borderWidth")),canonical:"border",extraProps:{side:"s"}},{prefix:"border-e",segment:Pe(te(),Z("borderWidth")),canonical:"border",extraProps:{side:"e"}},{prefix:"border-t",segment:Pe(te(),Z("borderWidth")),canonical:"border",extraProps:{side:"t"}},{prefix:"border-r",segment:Pe(te(),Z("borderWidth")),canonical:"border",extraProps:{side:"r"}},{prefix:"border-b",segment:Pe(te(),Z("borderWidth")),canonical:"border",extraProps:{side:"b"}},{prefix:"border-l",segment:Pe(te(),Z("borderWidth")),canonical:"border",extraProps:{side:"l"}},K("border",Pe(te(),Le("style",Uy),e=>/^\d+$/.test(e)||e==="px"?{props:{scale:e,scaleName:"borderWidth"}}:null,xt())),...Wy("rounded",Z("borderRadius"))]),...Gt("effects",[K("opacity",Z("opacity")),K("shadow",Le("size",Wu))]),...Gt("layout",[sd("display",Zy),sd("position",Jy),{prefix:"inset-bs",segment:Z("spacing"),canonical:"inset",extraProps:{side:"bs"}},{prefix:"inset-be",segment:Z("spacing"),canonical:"inset",extraProps:{side:"be"}},{prefix:"inset-x",segment:Z("spacing"),canonical:"inset",extraProps:{side:"x"}},{prefix:"inset-y",segment:Z("spacing"),canonical:"inset",extraProps:{side:"y"}},{prefix:"inset-s",segment:Z("spacing"),canonical:"inset",extraProps:{side:"s"}},{prefix:"inset-e",segment:Z("spacing"),canonical:"inset",extraProps:{side:"e"}},{prefix:"top",segment:Z("spacing"),canonical:"inset",extraProps:{side:"top"}},{prefix:"right",segment:Z("spacing"),canonical:"inset",extraProps:{side:"right"}},{prefix:"bottom",segment:Z("spacing"),canonical:"inset",extraProps:{side:"bottom"}},{prefix:"left",segment:Z("spacing"),canonical:"inset",extraProps:{side:"left"}},{prefix:"start",segment:Z("spacing"),canonical:"inset",extraProps:{side:"start"}},{prefix:"end",segment:Z("spacing"),canonical:"inset",extraProps:{side:"end"}},K("inset",Z("spacing")),K("z",Z("zIndex"))]),...Gt("flexbox",[K("flex-row-reverse",te()),K("flex-col-reverse",te()),K("flex-wrap-reverse",te()),K("flex-row",te()),K("flex-col",te()),K("flex-wrap",te()),K("flex-nowrap",te()),K("flex",Pe(te(),Le("value",["auto","initial","none"]),Z("number"))),K("grow",Pe(te(),Z("number"))),K("shrink",Pe(te(),Z("number"))),K("justify-items",Le("value",rx)),K("justify",Le("value",ex)),K("items",Le("value",tx)),K("content",Le("value",nx)),K("self",Le("value",ox)),K("basis",Z("spacing")),K("grid-cols",Pe(Le("value",["none","subgrid"]),Z("gridCols"))),K("grid-rows",Pe(Le("value",["none","subgrid"]),Z("gridRows"))),K("col-span",Z("colSpan")),K("row-span",Z("rowSpan")),K("order",Z("order"))]),...Gt("overflow",[K("overflow-x",Le("value",["auto","hidden","clip","visible","scroll"])),K("overflow-y",Le("value",["auto","hidden","clip","visible","scroll"])),K("overflow",Le("value",["auto","hidden","clip","visible","scroll"]))])];let Ot=null,Xo=!1;const Hl=[],Wl=[],Bl=[];function sx(){return window.location.origin.replace(/^http/,"ws")}function uh(){if(Ot)return;const e=sx();Ot=new WebSocket(e),Ot.addEventListener("open",()=>{Xo=!0,jn({type:"REGISTER",role:"panel"});for(const t of Wl)t()}),Ot.addEventListener("close",()=>{Xo=!1,Ot=null;for(const t of Bl)t();setTimeout(()=>uh(),3e3)}),Ot.addEventListener("message",t=>{try{const n=JSON.parse(t.data);for(const r of Hl)r(n)}catch(n){console.error("[tw-panel] Failed to parse message:",n)}}),Ot.addEventListener("error",t=>{console.error("[tw-panel] WebSocket error:",t)})}function jn(e){console.log("[panel-debug] WS send",{connected:Xo,hasSocket:!!Ot,data:e}),Xo&&Ot&&Ot.send(JSON.stringify(e))}function ue(e,t){jn({...t,to:e})}function Ss(e){return Hl.push(e),()=>{const t=Hl.indexOf(e);t!==-1&&Hl.splice(t,1)}}function ix(e){return Wl.push(e),()=>{const t=Wl.indexOf(e);t!==-1&&Wl.splice(t,1)}}function ax(e){return Bl.push(e),()=>{const t=Bl.indexOf(e);t!==-1&&Bl.splice(t,1)}}function ux(){return Xo}const ch=[{name:"popover",label:"Popover",icon:i.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[i.jsx("rect",{x:"1",y:"1",width:"14",height:"14",rx:"1.5",stroke:"currentColor",strokeWidth:"1.1",opacity:"0.3"}),i.jsx("rect",{x:"4",y:"4",width:"8",height:"6",rx:"1",fill:"currentColor"})]})},{name:"sidebar",label:"Sidebar",icon:i.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[i.jsx("rect",{x:"1",y:"1",width:"14",height:"14",rx:"1.5",stroke:"currentColor",strokeWidth:"1.1",opacity:"0.3"}),i.jsx("rect",{x:"9",y:"1",width:"6",height:"14",rx:"1.5",fill:"currentColor",opacity:"0.85"})]})},{name:"modal",label:"Modal",icon:i.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[i.jsx("rect",{x:"1",y:"1",width:"14",height:"14",rx:"1.5",fill:"currentColor",opacity:"0.12"}),i.jsx("rect",{x:"3",y:"4",width:"10",height:"8",rx:"1",fill:"currentColor",opacity:"0.9"})]})},{name:"popup",label:"Popup",icon:i.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[i.jsx("rect",{x:"1",y:"1",width:"14",height:"14",rx:"1.5",stroke:"currentColor",strokeWidth:"1.1",opacity:"0.3"}),i.jsx("rect",{x:"8",y:"8",width:"7",height:"7",rx:"1",fill:"currentColor",opacity:"0.85"})]})}],dh="tw-panel-container";function cx(){try{const e=localStorage.getItem(dh);if(e&&ch.some(t=>t.name===e))return e}catch{}return"popover"}function jl(){const[e,t]=w.useState(cx),[n,r]=w.useState(!1),o=w.useRef(null);w.useEffect(()=>{function s(a){o.current&&!o.current.contains(a.target)&&r(!1)}return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[]);function l(s){if(s!==e){try{localStorage.setItem(dh,s)}catch{}t(s),ue("overlay",{type:"SWITCH_CONTAINER",container:s})}r(!1)}return i.jsxs("div",{ref:o,className:"relative",children:[i.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:i.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("rect",{x:".5",y:"1.5",width:"15",height:"13",rx:"1.5",ry:"1.5"}),i.jsx("line",{x1:"8.5",y1:"1.5",x2:"8.5",y2:"14.5"}),i.jsx("line",{x1:"11",y1:"5",x2:"13",y2:"5"}),i.jsx("line",{x1:"11",y1:"8",x2:"13",y2:"8"}),i.jsx("line",{x1:"11",y1:"11",x2:"13",y2:"11"})]})}),n&&i.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:[i.jsx("div",{className:"text-[9px] font-semibold uppercase tracking-[0.8px] text-bv-muted px-2 pt-1 pb-1.5",children:"Container"}),ch.map(s=>i.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)),i.jsx("div",{className:"h-px bg-[#4f4f4f] mx-1 my-1"}),i.jsxs("button",{onClick:()=>{r(!1),ue("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:[i.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[i.jsx("line",{x1:"4",y1:"4",x2:"12",y2:"12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),i.jsx("line",{x1:"12",y1:"4",x2:"4",y2:"12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),"Close panel"]})]})]})}function dx(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 fx(e,t=!0){const[n,r]=w.useState(null),[o,l]=w.useState(!0),[s,a]=w.useState({}),[u,c]=w.useState({}),f=w.useRef(0),p=w.useRef(null),d=w.useRef(!1);return w.useEffect(()=>{if(!t)return;if(e.length===0){l(!1);return}d.current=!1,f.current=0;const m=document.createElement("iframe");Object.assign(m.style,{position:"fixed",left:"-99999px",top:"0",width:"800px",height:"600px",visibility:"hidden",pointerEvents:"none"}),p.current=m,document.body.appendChild(m);function v(g){if(g>=e.length){d.current||(d.current=!0,r(e[0]),a({}),c({}),l(!1));return}f.current=g,m.src=`/storybook/iframe.html?id=${e[g].id}&viewMode=story&vybit-ghost=1`}let b=null;function S(g){var k,C,T,j;if(d.current)return;let y=g.data;if(typeof y=="string")try{y=JSON.parse(y)}catch{return}const x=e[f.current];if((y==null?void 0:y.key)==="storybook-channel"&&((k=y==null?void 0:y.event)==null?void 0:k.type)==="storyPrepared"&&((j=(T=(C=y==null?void 0:y.event)==null?void 0:C.args)==null?void 0:T[0])==null?void 0:j.id)===(x==null?void 0:x.id)){const L=y.event.args[0].argTypes??{},I=y.event.args[0].initialArgs??y.event.args[0].args??{};if(Object.keys(L).length>0)d.current=!0,r(x),a(dx(L)),c(I),l(!1);else{b&&clearTimeout(b);const D=f.current+1;b=setTimeout(()=>v(D),50)}}}window.addEventListener("message",S);function h(){b&&clearTimeout(b),b=setTimeout(()=>{!d.current&&f.current<e.length&&(v(f.current+1),h())},5e3)}return m.addEventListener("load",()=>{h()}),v(0),()=>{d.current=!0,window.removeEventListener("message",S),b&&clearTimeout(b),m.remove(),p.current=null}},[e,t]),{bestStory:n,probing:o,argTypes:s,defaultArgs:u}}const px=1;let Cs=0;const fh=[];function ph(){return new Promise(e=>{const t=()=>{Cs<px?(Cs++,e(hx)):fh.push(t)};t()})}function hx(){Cs=Math.max(0,Cs-1);const e=fh.shift();e==null||e()}function mx(e){const[t,n]=w.useState(!1),r=w.useRef(null),o=w.useRef(!1);w.useEffect(()=>{if(!e||o.current)return;o.current=!0;let s=!1;return ph().then(a=>{if(s){a();return}r.current=a,n(!0)}),()=>{s=!0,r.current&&(r.current(),r.current=null),n(!1),o.current=!1}},[e]);const l=w.useCallback(()=>{r.current&&(r.current(),r.current=null)},[]);return{canProbe:t,releaseProbeSlot:l}}function gx(e){const[t,n]=w.useState(!1),r=w.useRef(null),o=w.useRef(!1);w.useEffect(()=>{if(!e||o.current)return;o.current=!0;let s=!1;return ph().then(a=>{if(s){a();return}r.current=a,n(!0)}),()=>{s=!0,r.current&&(r.current(),r.current=null)}},[e]);const l=w.useCallback(()=>{r.current&&(r.current(),r.current=null)},[]);return{canLoad:t,releaseSlot:l}}function id(e,t={},n="/storybook"){const r=`${n}/iframe.html?id=${encodeURIComponent(e)}&viewMode=story&vybit-ghost=1`,o=Object.entries(t).filter(([,s])=>s!=null);if(o.length===0)return r;const l=o.map(([s,a])=>`${encodeURIComponent(s)}:${encodeURIComponent(String(a))}`).join(";");return`${r}&args=${l}`}function yx({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 i.jsx("div",{className:"flex flex-col gap-1.5 px-1",children:r.map(([l,s])=>i.jsx(xx,{name:l,argType:s,value:t[l],onChange:a=>o(l,a)},l))})}function xx({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 i.jsxs("label",{className:"flex items-center gap-2 text-[10px]",children:[i.jsx("span",{className:"text-bv-text-mid font-mono min-w-[60px] shrink-0",children:e}),o==="select"&&t.options?i.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=>i.jsx("option",{value:l,children:l},l))}):o==="boolean"?i.jsx("input",{type:"checkbox",checked:!!n,onChange:l=>r(l.target.checked),className:"accent-bv-teal"}):o==="number"?i.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))}):i.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 vx=["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","flex-direction","flex-wrap","align-items","justify-content","align-content","gap","row-gap","column-gap","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"],bx=new Set(["color","font-family","font-size","font-weight","font-style","line-height","letter-spacing","text-align","text-transform","text-decoration"]);function wx(e){const t=e.ownerDocument.defaultView??window,n=e.ownerDocument,r=t.getComputedStyle(e),o=n.createElement(e.tagName.toLowerCase());o.style.position="absolute",o.style.visibility="hidden",o.style.pointerEvents="none",(n.body??n.documentElement).appendChild(o);const l=t.getComputedStyle(o),s={};for(let a=0;a<r.length;a++){const u=r[a],c=r.getPropertyValue(u);(bx.has(u)||c!==l.getPropertyValue(u))&&(s[u]=c)}return o.remove(),s}function Sx(e,t,n){for(const[r,o]of Object.entries(t))if(!(r==="height"||r==="block-size")){if((r==="width"||r==="inline-size")&&n!=null){const l=parseFloat(o);if(!isNaN(l)&&Math.abs(l-n)<1)continue}r==="perspective-origin"||r==="transform-origin"||e.style.setProperty(r,o)}}const Cx=new Set(["width","height","inline-size","block-size","perspective-origin","transform-origin"]);function kx(e,t){if(!e||!t)return;const n=e.ownerDocument.defaultView??window,r=e.ownerDocument,o=r.body??r.documentElement,l=new Map;function s(u){let c=l.get(u);if(c)return c;const f=r.createElement(u);f.style.position="absolute",f.style.visibility="hidden",f.style.pointerEvents="none",o.appendChild(f);const p=n.getComputedStyle(f);c=new Map;for(let d=0;d<p.length;d++){const m=p[d];c.set(m,p.getPropertyValue(m))}return f.remove(),l.set(u,c),c}function a(u,c){const f=n.getComputedStyle(u),p=c;if(p.style){const b=s(u.tagName.toLowerCase());for(let S=0;S<f.length;S++){const h=f[S];if(Cx.has(h))continue;const g=f.getPropertyValue(h);g!==(b.get(h)??"")&&p.style.setProperty(h,g)}}const d=u.children,m=c.children,v=Math.min(d.length,m.length);for(let b=0;b<v;b++)a(d[b],m[b])}a(e,t)}const hh=vx;function mh(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],a=r[l],u=(s.ownerDocument.defaultView??window).getComputedStyle(s);if(a.style)for(const c of hh)a.style.setProperty(c,u.getPropertyValue(c));mh(s,a)}}const Zt=class Zt extends HTMLElement{constructor(){super();rt(this,"shadow");rt(this,"ghostEl");rt(this,"hiddenIframe");rt(this,"loadTimeoutId",null);rt(this,"pollId",null);rt(this,"hasLoaded",!1);rt(this,"_loadedDispatched",!1);rt(this,"observer",null);rt(this,"_error",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:"0",top:"0",width:"800px",height:"600px",opacity:"0",pointerEvents:"none",border:"none",zIndex:"-999999"}),this.hiddenIframe.addEventListener("load",()=>this.onIframeLoad()),this.hiddenIframe.addEventListener("error",()=>this.reportError("Failed to load iframe"))}connectedCallback(){document.body.appendChild(this.hiddenIframe),this.syncIframeWidth(),this.triggerLoad()}disconnectedCallback(){var n;(n=this.observer)==null||n.disconnect(),this.observer=null,this.pollId&&(clearInterval(this.pollId),this.pollId=null),this.hiddenIframe.remove()}attributeChangedCallback(){this.isConnected&&(this.syncIframeWidth(),this.triggerLoad())}syncIframeWidth(){const n=this.clientWidth;n>0&&(this.hiddenIframe.style.width=n+"px")}triggerLoad(){var o;(o=this.observer)==null||o.disconnect(),this.observer=null,this.loadTimeoutId&&clearTimeout(this.loadTimeoutId),this.pollId&&(clearInterval(this.pollId),this.pollId=null),this.hasLoaded=!1,this._loadedDispatched=!1;const n=this.getAttribute("src"),r=this.getAttribute("srcdoc");r!=null?this.hiddenIframe.srcdoc=r:n&&(this.hiddenIframe.src=n),this.loadTimeoutId=setTimeout(()=>{if(!this.hasLoaded){const l=this.getAttribute("src");this.reportError(`Story failed to load (${l||"unknown"}) — check that Storybook is running on port 6006+`)}},2e4)}onIframeLoad(){const n=this.getAttribute("src"),r=this.getAttribute("srcdoc");if(!n&&r==null)return;this.loadTimeoutId&&(clearTimeout(this.loadTimeoutId),this.loadTimeoutId=null),this.hasLoaded=!0;const o=this.hiddenIframe.contentDocument;if(!o){console.warn("[AdaptiveIframe] iframe loaded but contentDocument is null");return}const l=o.createElement("style");if(l.textContent="body,html{margin:0!important;padding:0!important}",o.head.appendChild(l),r!=null){this.extractAndApply(o);return}this.waitForStoryContent(o)}updateArgs(n,r){const o=this.hiddenIframe.contentWindow;o&&(o.postMessage(JSON.stringify({key:"storybook-channel",event:{type:"updateStoryArgs",args:[{storyId:n,updatedArgs:r}]}}),"*"),setTimeout(()=>{const l=this.hiddenIframe.contentDocument;l&&this.extractAndApply(l)},300))}waitForStoryContent(n){var p;(p=this.observer)==null||p.disconnect(),this.observer=null,this.pollId&&(clearInterval(this.pollId),this.pollId=null);let r=!1,o=0;const l=20,s=()=>this.findStoryRoot(n)?(r=!0,this.extractAndApply(n),this.observer&&(this.observer.disconnect(),this.observer=null),!0):!1;if(s())return;const a=n.querySelector("#storybook-root"),u=a??n.body;if(!u)return;const c=new MutationObserver(d=>{if(!r){if(o++,s()){this.pollId&&(clearInterval(this.pollId),this.pollId=null);return}o>=l&&(c.disconnect(),this.observer=null,this.pollId&&(clearInterval(this.pollId),this.pollId=null),console.error(`[AdaptiveIframe] gave up after ${o} mutations — story never appeared. src=${this.getAttribute("src")}`),this.reportError("Story did not render — component may not exist or Storybook story file has an error"))}});this.observer=c,c.observe(u,{childList:!0,subtree:!0,characterData:!0}),a&&n.body&&a!==n.body&&c.observe(n.body,{childList:!0});let f=0;this.pollId=setInterval(()=>{if(r){clearInterval(this.pollId),this.pollId=null;return}f++;const d=this.hiddenIframe.contentDocument;if(d&&this.findStoryRoot(d)){r=!0,this.extractAndApply(d),this.observer&&(this.observer.disconnect(),this.observer=null),clearInterval(this.pollId),this.pollId=null;return}f>=40&&(clearInterval(this.pollId),this.pollId=null)},1e3),setTimeout(()=>{!r&&this.observer===c&&(this.observer.disconnect(),this.observer=null,this.pollId&&(clearInterval(this.pollId),this.pollId=null),console.error(`[AdaptiveIframe] 40s timeout — story never rendered. src=${this.getAttribute("src")}`),this.reportError("Story did not render — component may not exist or Storybook story file has an error"))},4e4)}findStoryRoot(n){var o;const r=n.querySelector("#storybook-root");if(r){for(const s of r.children)if(!s.classList.contains("sb-loader")&&!(s.id&&(s.id.startsWith("storybook-")||s.id.startsWith("sb-"))))return s.children.length===0&&!((o=s.textContent)!=null&&o.trim())?null:s;const l=this.findPortalContent(n);return l||null}return n.body.firstElementChild}findPortalContent(n){var o;const r=n.defaultView??window;for(const l of n.body.children)if(!Zt.INFRA_TAGS.has(l.tagName)&&!(l.id&&Zt.INFRA_IDS.has(l.id))&&!(l.id&&(l.id.startsWith("storybook-")||l.id.startsWith("sb-")))&&!(l.className&&typeof l.className=="string"&&l.className.split(/\s+/).some(a=>Zt.INFRA_CLASS_PREFIXES.some(u=>a.startsWith(u))))){if(l instanceof HTMLElement){const s=r.getComputedStyle(l);if(s.display==="none"||s.visibility==="hidden")continue}if(!(!l.children.length&&!((o=l.textContent)!=null&&o.trim())))return l}return null}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 hh)o.style.setProperty(s,l.getPropertyValue(s));return mh(r,o),o.outerHTML}extractAndApply(n){const r=this.findStoryRoot(n);if(r&&r.ownerDocument.defaultView,!r)return;const o=wx(r);if(o.position==="fixed"||o.position==="absolute"){const f=["position","left","right","top","bottom","inset","inset-block","inset-block-start","inset-block-end","inset-inline","inset-inline-start","inset-inline-end","transform","translate","z-index","opacity","animation","animation-name","animation-duration","animation-delay","animation-fill-mode","animation-timing-function","transition","transition-property","transition-duration","transition-delay","transition-timing-function"];for(const p of f)delete o[p]}Sx(this,o,parseInt(this.hiddenIframe.style.width)||800),this.ghostEl.innerHTML=r.innerHTML;const l=r.children,s=this.ghostEl.children,a=Math.min(l.length,s.length);for(let f=0;f<a;f++)kx(l[f],s[f]);this._loadedDispatched||(this._loadedDispatched=!0,this.dispatchEvent(new CustomEvent("iframe-loaded")));const u=this.getComponentHtml(),c=getComputedStyle(n.body).backgroundColor;this.dispatchEvent(new CustomEvent("ghost-extracted",{detail:{ghostHtml:u,hostStyles:o,storyBackground:c}}))}reportError(n){this._error=n,console.error(`[AdaptiveIframe] ${n}`),this.dispatchEvent(new CustomEvent("iframe-error",{detail:{message:n}}))}getError(){return this._error}clearError(){this._error=null}};rt(Zt,"observedAttributes",["src","srcdoc"]),rt(Zt,"INFRA_TAGS",new Set(["SCRIPT","STYLE","LINK","META","NOSCRIPT"])),rt(Zt,"INFRA_IDS",new Set(["storybook-root","storybook-docs","sb-addons-root"])),rt(Zt,"INFRA_CLASS_PREFIXES",["sb-"]);let za=Zt;customElements.get("adaptive-iframe")||customElements.define("adaptive-iframe",za);function jx({phase:e,isArmed:t,error:n,cachedGhostHtml:r,liveReady:o,probing:l,bestStory:s,storyBackground:a,ghostRef:u}){const c=e!=="idle",f=c&&!n&&r&&!o,p=c&&!n&&!r&&!o&&(l||!!s),d=c&&!n&&!l&&s,m=c&&!n&&!l&&!s&&!r;return i.jsxs("div",{className:`flex items-center justify-center min-h-14 overflow-hidden ${t?"bg-[rgba(0,132,139,0.06)]":""}`,style:!t&&a?{backgroundColor:a}:void 0,children:[!c&&i.jsx("span",{className:"text-[10px] text-bv-muted",children:" "}),c&&n&&i.jsx("span",{className:"text-[10px] text-bv-orange px-2 py-1 text-center leading-tight",children:n}),p&&i.jsx("span",{className:"text-[10px] text-bv-muted",children:"Loading preview…"}),f&&i.jsx("div",{className:"pointer-events-none",dangerouslySetInnerHTML:{__html:r}}),d&&i.jsx("adaptive-iframe",{ref:u,style:{pointerEvents:"none"}}),m&&i.jsx("span",{className:"text-[10px] text-bv-muted",children:"No stories found."})]})}function Ex({isArmed:e,group:t,hasArgs:n,showProps:r,onToggleProps:o}){return i.jsxs("div",{className:"flex items-center justify-between px-2.5 py-1.5 border-t border-bv-border bg-bv-bg",children:[e?i.jsx("span",{className:"text-[11px] font-medium text-bv-teal",children:"Click the page to place"}):t.stories[0]?i.jsx("a",{href:`/storybook/?path=/story/${t.stories[0].id}`,target:"_blank",rel:"noopener noreferrer",className:"text-[11px] text-bv-text hover:text-bv-orange hover:underline transition-colors",onClick:l=>{l.stopPropagation()},children:i.jsx(ad,{fullTitle:t.fullTitle})}):i.jsx("span",{className:"text-[11px] text-bv-text",children:i.jsx(ad,{fullTitle:t.fullTitle})}),n&&i.jsx("button",{className:`w-5.5 h-5.5 rounded flex items-center justify-center transition-colors opacity-0 group-hover:opacity-100 ${r?"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:l=>{l.stopPropagation(),o()},children:i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[i.jsx("circle",{cx:"12",cy:"12",r:"3"}),i.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"})]})})]})}function ad({fullTitle:e}){const t=e.split("/");if(t.length===1)return i.jsx("span",{className:"font-semibold",children:t[0]});const n=t.slice(0,-1),r=t.at(-1);return i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"text-bv-muted font-normal",children:n.join(" / ")}),i.jsx("span",{className:"text-bv-muted font-normal",children:" / "}),i.jsx("span",{className:"font-semibold",children:r})]})}const Tx={phase:"idle",bestStory:null,argTypes:{},defaultArgs:{},args:{},liveReady:!1,storyBackground:void 0,error:null,pendingArgs:null,loadLiveRequested:!1};function Nx(e,t){switch(t.type){case"BECOME_VISIBLE":return e.phase!=="idle"?e:{...e,phase:t.hasCachedGhost?"cached":"probing"};case"PROBE_COMPLETE":return e.phase!=="probing"&&e.phase!=="cached"?e:{...e,phase:"probe-done",bestStory:t.bestStory,argTypes:t.argTypes,defaultArgs:t.defaultArgs,args:t.defaultArgs};case"PROBE_FALLBACK":return e.phase!=="probing"&&e.phase!=="cached"?e:{...e,phase:"probe-done",bestStory:t.bestStory};case"SLOT_ACQUIRED":return e.phase!=="probe-done"?e:{...e,phase:"loading"};case"IFRAME_LOADED":return e.phase!=="loading"?e:{...e,phase:"ready",liveReady:!0};case"IFRAME_ERROR":return e.phase!=="loading"?e:{...e,phase:"error",error:t.message};case"GHOST_EXTRACTED":return e.phase!=="ready"&&e.phase!=="loading"?e:{...e,storyBackground:t.storyBackground??e.storyBackground};case"ARGS_CHANGED":return e.liveReady?{...e,args:t.args}:{...e,args:t.args,pendingArgs:t.args};case"CLEAR_PENDING_ARGS":return{...e,pendingArgs:null};case"REQUEST_LIVE_REFRESH":return e.phase==="cached"?{...e,phase:"probing",loadLiveRequested:!0}:e.phase==="error"?{...e,phase:"probing",error:null,loadLiveRequested:!0}:{...e,loadLiveRequested:!0}}return e}function Rx({group:e,isArmed:t,onArm:n,onDisarm:r,cachedGhostHtml:o,cachedHostStyles:l,cachedStoryBackground:s,onGhostExtracted:a}){const[u,c]=w.useReducer(Nx,{...Tx,storyBackground:s}),f=w.useRef(null),p=w.useRef(null),d=w.useRef(!1),[m,v]=w.useState(!1);w.useEffect(()=>{const _=f.current;if(!_)return;const F=new IntersectionObserver(([Y])=>{Y.isIntersecting&&(c({type:"BECOME_VISIBLE",hasCachedGhost:!!o}),F.disconnect())},{rootMargin:"200px"});return F.observe(_),()=>F.disconnect()},[o]);const b=u.phase!=="idle"&&(u.phase==="probing"||!o||m||u.loadLiveRequested)&&!(u.phase==="probe-done"||u.phase==="loading"||u.phase==="ready"||u.phase==="loaded"||u.phase==="error"),{canProbe:S,releaseProbeSlot:h}=mx(b),g=b&&S,{bestStory:y,probing:x,argTypes:k,defaultArgs:C}=fx(e.stories,g);w.useEffect(()=>{!x&&y&&(u.phase==="probing"||u.phase==="cached")&&(h(),Object.keys(k).length>0?c({type:"PROBE_COMPLETE",bestStory:y,argTypes:k,defaultArgs:C}):c({type:"PROBE_FALLBACK",bestStory:y}))},[x,y,k,C,u.phase]);const T=(u.phase==="probe-done"||u.phase==="loading")&&!!u.bestStory&&(!o||u.loadLiveRequested),{canLoad:j,releaseSlot:L}=gx(T);w.useEffect(()=>{j&&u.phase==="probe-done"&&c({type:"SLOT_ACQUIRED"})},[j,u.phase]),w.useEffect(()=>{u.phase!=="loading"||!u.bestStory||!p.current||d.current||(d.current=!0,id(u.bestStory.id,{}),p.current.setAttribute("src",id(u.bestStory.id,{})))},[u.phase,u.bestStory]),w.useEffect(()=>{const _=p.current;if(!(_!=null&&_.addEventListener))return;const F=()=>{c({type:"IFRAME_LOADED"}),L(),u.pendingArgs&&u.bestStory&&(typeof _.updateArgs=="function"&&_.updateArgs(u.bestStory.id,u.pendingArgs),c({type:"CLEAR_PENDING_ARGS"}))},Y=E=>{const R=E.detail.message;c({type:"IFRAME_ERROR",message:R}),L()},X=E=>{const{ghostHtml:R,hostStyles:P,storyBackground:G}=E.detail;G&&c({type:"GHOST_EXTRACTED",storyBackground:G}),u.bestStory&&(a==null||a({storyId:u.bestStory.id,args:{},ghostHtml:R,hostStyles:P,storyBackground:G,componentName:e.name,componentPath:e.componentPath}))};return _.addEventListener("iframe-loaded",F),_.addEventListener("iframe-error",Y),_.addEventListener("ghost-extracted",X),()=>{_.removeEventListener("iframe-loaded",F),_.removeEventListener("iframe-error",Y),_.removeEventListener("ghost-extracted",X)}},[u.bestStory,u.pendingArgs,L,e.name,e.componentPath,a]);const I=w.useCallback(_=>{if(c({type:"ARGS_CHANGED",args:_}),!u.liveReady||!p.current||!u.bestStory){c({type:"REQUEST_LIVE_REFRESH"});return}const F=p.current;typeof F.updateArgs=="function"&&F.updateArgs(u.bestStory.id,_)},[u.bestStory,u.liveReady]),D=w.useCallback(_=>{var X;if(_.stopPropagation(),t){r();return}const F=p.current,Y=((X=F==null?void 0:F.getComponentHtml)==null?void 0:X.call(F))??o??"";n(Y,u.args),c({type:"REQUEST_LIVE_REFRESH"}),a&&Y&&u.bestStory&&a({storyId:u.bestStory.id,args:u.args,ghostHtml:Y,hostStyles:l??{},storyBackground:u.storyBackground,componentName:e.name,componentPath:e.componentPath})},[t,n,r,u.args,u.bestStory,u.storyBackground,o,l,e.name,e.componentPath,a]),V=Object.keys(u.argTypes).length>0?u.argTypes:e.argTypes??{},H=Object.keys(V).length>0||!!o;return i.jsxs("li",{ref:f,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:D,children:[i.jsx(jx,{phase:u.phase,isArmed:t,error:u.error,cachedGhostHtml:o,liveReady:u.liveReady,probing:x&&g,bestStory:u.bestStory??y,storyBackground:u.storyBackground,ghostRef:p}),i.jsx(Ex,{isArmed:t,group:e,hasArgs:H,showProps:m,onToggleProps:()=>v(_=>!_)}),m&&H&&i.jsxs("div",{className:"px-2.5 py-2 border-t border-bv-border bg-bv-surface",onClick:_=>_.stopPropagation(),children:[i.jsx("div",{className:"text-[9px] font-semibold uppercase tracking-wider text-bv-muted mb-1.5",children:"Props"}),i.jsx(yx,{argTypes:V,args:u.args,onArgsChange:I})]})]})}function gh(e){return!e||Object.keys(e).length===0?"":JSON.stringify(e,Object.keys(e).sort())}function ud(e,t){const n=gh(t);return n?`${e}::${n}`:e}function Px(){const[e,t]=w.useState(!1),n=w.useRef(new Map);w.useEffect(()=>{let l=!1;return fetch("/api/ghost-cache").then(s=>s.json()).then(s=>{if(l)return;const a=new Map;for(const u of s){const c=u.argsHash?`${u.storyId}::${u.argsHash}`:u.storyId;a.set(c,u)}n.current=a,t(!0)}).catch(()=>{l||t(!0)}),()=>{l=!0}},[]);const r=w.useCallback((l,s)=>{const a=ud(l,s),u=n.current.get(a);return u?{ghostHtml:u.ghostHtml,hostStyles:u.hostStyles,storyBackground:u.storyBackground}:null},[]),o=w.useCallback(l=>{const s=ud(l.storyId,l.args),a=n.current.has(s);n.current.set(s,{storyId:l.storyId,argsHash:gh(l.args),ghostHtml:l.ghostHtml,hostStyles:l.hostStyles,storyBackground:l.storyBackground,componentName:l.componentName,componentPath:l.componentPath,extractedAt:Date.now()}),!a&&fetch("/api/ghost-cache",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({storyId:l.storyId,args:l.args,ghostHtml:l.ghostHtml,hostStyles:l.hostStyles,storyBackground:l.storyBackground,componentName:l.componentName,componentPath:l.componentPath})}).catch(()=>{})},[]);return{getCachedGhost:r,submitToCache:o,loaded:e}}function El({insertMode:e}={}){const{groups:t,loading:n,error:r,refetch:o}=_x(),[l,s]=w.useState(null),[a,u]=w.useState(!1),{getCachedGhost:c,submitToCache:f}=Px(),p=w.useCallback((m,v,b)=>{var S;s(m.name),ue("overlay",{type:"COMPONENT_ARM",componentName:m.name,storyId:((S=m.stories[0])==null?void 0:S.id)??"",ghostHtml:v,componentPath:m.componentPath,args:b,insertMode:e==="replace"?"replace":void 0})},[e]),d=w.useCallback(()=>{s(null),ue("overlay",{type:"COMPONENT_DISARM"})},[]);return w.useEffect(()=>Ss(m=>{m.type==="COMPONENT_DISARMED"&&(s(null),u(!1))}),[]),w.useEffect(()=>{if(!l&&!a)return;const m=()=>{s(null),u(!1),ue("overlay",{type:"COMPONENT_DISARM"})};return document.addEventListener("click",m),()=>document.removeEventListener("click",m)},[l,a]),i.jsxs("div",{className:"p-3 flex flex-col gap-3",children:[i.jsxs("button",{type:"button",onClick:m=>{if(m.stopPropagation(),a){u(!1),ue("overlay",{type:"COMPONENT_DISARM"});return}u(!0),ue("overlay",{type:"INSERT_DESIGN_CANVAS",insertMode:e==="replace"?"replace":"after"})},className:`flex items-center gap-2.5 px-3 py-2 rounded-md border transition-all cursor-pointer text-left ${a?"border-bv-teal bg-bv-teal/10 ring-1 ring-bv-teal":"border-bv-border bg-bv-surface hover:border-bv-teal hover:bg-bv-teal/5"}`,children:[i.jsx("div",{className:"w-8 h-8 rounded bg-bv-teal/10 text-bv-teal flex items-center justify-center shrink-0",children:i.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:[i.jsx("path",{d:"M15 1H1v14h14V1ZM0 0h16v16H0V0Z"}),i.jsx("path",{d:"M4 8h8M8 4v8",stroke:"currentColor",strokeWidth:"1.5",fill:"none"})]})}),i.jsxs("div",{className:"flex flex-col min-w-0",children:[i.jsx("span",{className:"text-[11px] font-medium text-bv-text",children:"Draw / Screenshot Canvas"}),i.jsx("span",{className:"text-[10px] text-bv-muted",children:"Freehand drawing or annotate a screenshot"})]})]}),i.jsxs("div",{className:"flex flex-col gap-1.5",children:[n&&i.jsx("div",{className:"text-[11px] text-bv-muted",children:"Loading components…"}),!n&&r&&i.jsx(Ix,{onConnected:o}),!n&&!r&&t.length===0&&i.jsx("div",{className:"text-[11px] text-bv-muted",children:"No stories found."}),!n&&!r&&t.length>0&&i.jsx("ul",{className:"flex flex-col gap-2",children:t.map(m=>{var S;const v=(S=m.stories[0])==null?void 0:S.id,b=v?c(v):null;return i.jsx(Rx,{group:m,isArmed:l===m.name,onArm:(h,g)=>p(m,h,g),onDisarm:d,cachedGhostHtml:b==null?void 0:b.ghostHtml,cachedHostStyles:b==null?void 0:b.hostStyles,cachedStoryBackground:b==null?void 0:b.storyBackground,onGhostExtracted:f},m.name)})})]})]})}function Ix({onConnected:e}){const[t,n]=w.useState(""),[r,o]=w.useState(!1),[l,s]=w.useState(!1),a=async u=>{o(!0),s(!1);try{const c=u!=null?{port:u}:{};(await(await fetch("/api/storybook-reconnect",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)})).json()).ok?e():s(!0)}catch{s(!0)}finally{o(!1)}};return i.jsxs("div",{className:"text-[11px] text-bv-text-mid leading-relaxed flex flex-col gap-2",children:[i.jsx("span",{children:"Storybook not detected."}),i.jsx("button",{onClick:()=>a(),disabled:r,className:"self-start px-2.5 py-1 rounded bg-bv-surface-hi text-bv-text text-[11px] border border-bv-border hover:border-bv-teal disabled:opacity-50 transition-colors",children:r?"Scanning…":"Scan for Storybook"}),i.jsxs("div",{className:"flex items-center gap-1.5",children:[i.jsx("span",{className:"text-bv-muted",children:"or port:"}),i.jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",placeholder:"6006",value:t,onChange:u=>{n(u.target.value),s(!1)},onKeyDown:u=>{u.key==="Enter"&&t&&a(Number(t))},className:"w-16 px-1.5 py-0.5 rounded bg-bv-surface text-bv-text text-[11px] border border-bv-border focus:border-bv-teal outline-none"}),i.jsx("button",{onClick:()=>t&&a(Number(t)),disabled:!t||r,className:"px-2 py-0.5 rounded bg-bv-surface-hi text-bv-text text-[11px] border border-bv-border hover:border-bv-teal disabled:opacity-50 transition-colors",children:"Connect"})]}),l&&i.jsxs("span",{className:"text-bv-orange text-[10px]",children:["No Storybook found",t?` on port ${t}`:"",". Is it running?"]})]})}function _x(){const[e,t]=w.useState([]),[n,r]=w.useState(!0),[o,l]=w.useState(!1),[s,a]=w.useState(0),u=w.useCallback(()=>{r(!0),l(!1),t([]),a(c=>c+1)},[]);return w.useEffect(()=>{let c=!1;return(async()=>{var f,p;try{const d=await fetch("/api/storybook-data").then(v=>v.json());if(!d.available){c||(l(!0),r(!1));return}const m=Object.values(((f=d.index)==null?void 0:f.entries)??((p=d.index)==null?void 0:p.stories)??{});c||t(Ax(m,d.argTypes??{}))}catch{c||l(!0)}finally{c||r(!1)}})(),()=>{c=!0}},[s]),{groups:e,loading:n,error:o,refetch:u}}function Ax(e,t={}){const n=new Map;for(const o of e){if(o.type==="docs"||o.id.endsWith("--docs"))continue;const l=o.title.split("/").at(-1)??o.title;n.has(l)||n.set(l,[]),n.get(l).push(o)}const r=Array.from(n.entries()).map(([o,l])=>{var a,u;const s=new Set;for(const c of l)for(const f of c.tags??[])s.add(f);return{name:o,fullTitle:((a=l[0])==null?void 0:a.title)??o,tags:Array.from(s),stories:l,argTypes:t[o]??Lx(l),componentPath:(u=l[0])==null?void 0:u.componentPath}});return r.sort((o,l)=>{const s=o.tags.includes("design-system")?0:1,a=l.tags.includes("design-system")?0:1;return s!==a?s-a:o.name.localeCompare(l.name)}),r}function Lx(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 Ti="w-[30px] h-7 rounded-[4px] border-none flex items-center justify-center cursor-pointer transition-all duration-[120ms] ease-out",Dx="bg-[#00464A] text-[#5fd4da] shadow-[0_1px_3px_rgba(0,0,0,0.3)]",Ox="bg-[#F5532D]/15 text-[#F5532D] shadow-[0_1px_3px_rgba(0,0,0,0.3)]",Mx="bg-transparent text-[#999] hover:text-[#b3b3b3]";function Ni(e,t){return e?t?Ox:Dx:Mx}function Tl({mode:e,onModeChange:t,isPicking:n=!1}){return i.jsxs("div",{className:"inline-flex items-center rounded-[6px] bg-[#1a1a1a] p-[2px] gap-[1px]",children:[i.jsx("button",{type:"button",onClick:()=>t("select"),className:`${Ti} ${Ni(e==="select",e==="select"&&n)}`,"aria-pressed":e==="select",title:"Select an element",children:i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"currentColor",children:[i.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"}),i.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"})]})}),i.jsx("button",{type:"button",onClick:()=>t("insert"),className:`${Ti} ${Ni(e==="insert",e==="insert"&&n)}`,"aria-pressed":e==="insert",title:"Insert to add content",children:i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"square",strokeLinejoin:"miter",children:[i.jsx("rect",{x:"4",y:"2",width:"16",height:"8",rx:"2"}),i.jsx("path",{d:"m17,14h1c1.105,0,2,.895,2,2"}),i.jsx("path",{d:"m4,16c0-1.105.895-2,2-2h1"}),i.jsx("path",{d:"m7,22h-1c-1.105,0-2-.895-2-2"}),i.jsx("path",{d:"m20,20c0,1.105-.895,2-2,2h-1"}),i.jsx("line",{x1:"13",y1:"14",x2:"11",y2:"14"}),i.jsx("line",{x1:"13",y1:"22",x2:"11",y2:"22"})]})}),i.jsx("button",{type:"button",onClick:()=>t("bug-report"),className:`${Ti} ${Ni(e==="bug-report",!1)}`,"aria-pressed":e==="bug-report",title:"Report a bug",children:i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"currentColor",children:[i.jsx("path",{d:"M11.5,6C11.5,4.067,9.933,2.5,8,2.5S4.5,4.067,4.5,6v1h7V6Z"}),i.jsx("rect",{x:"3",y:"8",width:"10",height:"6",rx:"2"}),i.jsx("path",{d:"M1,5.5h2.2C3.07,5.01,3,4.51,3,4h0V3.5H1c-.552,0-1,.448-1,1S.448,5.5,1,5.5Z"}),i.jsx("path",{d:"M15,3.5h-2c0,.51-.07,1.01-.2,1.5H15c.552,0,1-.448,1-1s-.448-1-1-1Z"}),i.jsx("path",{d:"M1,11.5h2.05c.232,.89,.62,1.71,1.13,2.5H1c-.552,0-1-.448-1-1s.448-1,1-1h0Z"}),i.jsx("path",{d:"M15,10.5h-2.05c-.232,.89-.62,1.71-1.13,2.5h3.18c.552,0,1-.448,1-1s-.448-1-1-1Z"}),i.jsx("path",{d:"M1,7.5h2v2H1c-.552,0-1-.448-1-1s.448-1,1-1Z"}),i.jsx("path",{d:"M13,7.5h2c.552,0,1,.448,1,1s-.448,1-1,1h-2v-2Z"}),i.jsx("rect",{x:"7",y:"9",width:"2",height:"4",rx:".5"})]})})]})}function $x(e){var c,f;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&&((f=e.parentComponent)==null?void 0:f.name)||null,l=o||e.elementKey||null,s=o?`<${l}>`:l,a="targetPatchId"in e&&!!e.targetPatchId,u=s&&a?`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 cd(e,t){const n=e.replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();return n.length>t?n.slice(0,t)+"…":n}function Nl({label:e,count:t,items:n,activeColor:r,dotColor:o,onCommit:l,onDiscard:s,onCommitAll:a,onDiscardAll:u}){const[c,f]=w.useState(!1),p=w.useRef(null),d=w.useRef(null),[m,v]=w.useState(void 0);w.useEffect(()=>{if(!c||!d.current)return;const g=d.current.getBoundingClientRect(),y=220,x=window.innerWidth,k=4;let C=g.left+g.width/2-y/2;C=Math.max(k,Math.min(C,x-y-k)),v(C-g.left)},[c]),w.useEffect(()=>{if(!c)return;function h(g){p.current&&!p.current.contains(g.target)&&f(!1)}return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[c]),w.useEffect(()=>{if(!c)return;function h(g){g.key==="Escape"&&f(!1)}return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[c]);const b=t>0,S=l||s||a||u;return i.jsxs("div",{ref:p,className:"relative",children:[i.jsxs("button",{ref:d,className:`flex items-center gap-1 text-[11px] tabular-nums border-none bg-transparent cursor-pointer px-0 py-0 ${b?`${r} font-medium`:"text-bv-muted"} ${b?"hover:underline":""}`,onClick:()=>b&&f(!c),disabled:!b,type:"button",children:[o&&i.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${o}`}),t," ",e]}),c&&i.jsxs("div",{className:"absolute bottom-full mb-1 min-w-[220px] max-w-[calc(100vw-24px)] w-max bg-bv-surface border border-bv-border rounded-lg shadow-lg overflow-hidden flex flex-col z-[9999]",style:m!==void 0?{left:`${m}px`}:void 0,children:[i.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,")"]}),i.jsx("div",{className:"flex-1 overflow-auto",children:n.length===0?i.jsx("div",{className:"px-3 py-2 text-[11px] text-bv-muted italic",children:"No patches"}):n.map(h=>{var T,j,L;const g="kind"in h&&h.kind==="message",y="kind"in h&&h.kind==="design",x="kind"in h&&h.kind==="component-drop",k="kind"in h&&h.kind==="text-change",C="kind"in h&&h.kind==="bug-report";return i.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:[i.jsxs("div",{className:"flex-1 min-w-0",children:[!g&&!y&&!x&&!k&&!C&&((T=h.component)==null?void 0:T.name)&&i.jsx("div",{className:"text-[10px] text-bv-muted truncate",children:h.component.name}),C?i.jsxs("div",{className:"text-[11px] text-bv-text",children:[i.jsxs("div",{className:"flex items-center gap-1.5",children:[i.jsx("span",{children:"🐛"}),i.jsx("span",{className:"font-semibold",children:"Bug Report"})]}),"bugDescription"in h&&h.bugDescription&&i.jsx("div",{className:"text-[10px] text-bv-muted mt-0.5 whitespace-pre-wrap break-words line-clamp-3",children:h.bugDescription.slice(0,200)})]}):x?i.jsx("div",{className:"text-[11px] text-bv-text truncate",children:$x(h)}):y?i.jsxs("div",{className:"text-[11px] text-bv-text",children:[i.jsxs("div",{className:"flex items-center gap-1.5 mb-1",children:[i.jsx("span",{children:"✏️"}),i.jsxs("span",{className:"truncate",children:["Drawing",(j=h.component)!=null&&j.name?` in ${h.component.name}`:""]})]}),"image"in h&&h.image&&i.jsx("img",{src:h.image,alt:"Design drawing",className:"max-w-full max-h-16 object-contain rounded border border-bv-border bg-white"})]}):g?i.jsxs("div",{className:"text-[11px] text-bv-text truncate",children:[i.jsx("span",{className:"mr-1",children:"💬"}),'"',"message"in h&&h.message||"",'"']}):k?i.jsxs("div",{className:"text-[11px] text-bv-text",children:[i.jsxs("div",{className:"flex items-center gap-1.5",children:[i.jsx("span",{children:"✏️"}),i.jsxs("span",{className:"truncate",children:["Text edit",(L=h.component)!=null&&L.name?` in ${h.component.name}`:""]})]}),"originalHtml"in h&&h.originalHtml&&"newHtml"in h&&h.newHtml&&i.jsxs("div",{className:"mt-0.5 text-[10px] font-mono text-bv-muted break-words",children:[i.jsx("span",{className:"line-through",children:cd(h.originalHtml,30)})," → ",i.jsx("span",{className:"text-bv-teal",children:cd(h.newHtml,30)})]})]}):i.jsx("div",{className:"text-[11px] font-mono text-bv-text truncate",children:h.originalClass?i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"line-through text-bv-muted",children:h.originalClass})," → ",i.jsx("span",{className:"text-bv-teal",children:h.newClass})]}):i.jsxs("span",{className:"text-bv-teal",children:["+",h.newClass]})})]}),(l||s)&&i.jsxs("div",{className:"flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:[l&&i.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:I=>{I.stopPropagation(),l(h.id)},title:"Commit to Agent",type:"button",children:"✓"}),s&&i.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:I=>{I.stopPropagation(),s(h.id)},title:"Discard",type:"button",children:"✕"})]})]},h.id)})}),S&&n.length>0&&(a||u)&&i.jsxs("div",{className:"flex gap-2 px-3 py-1.5 border-t border-bv-border",children:[a&&i.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:()=>{a(),f(!1)},type:"button",children:"Commit All"}),u&&i.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(),f(!1)},type:"button",children:"Discard All"})]})]})]})}function zx(e){return e==="click"||e==="navigation"||e==="page-load"||e==="error"}function dd(e){const t=[];let n=null;for(const r of e)zx(r.trigger)?(n={primary:r,secondaries:fd(r),checked:!1},t.push(n)):n?Kx(n,r):(n={primary:{...r,trigger:r.trigger},secondaries:fd(r),checked:!1},t.push(n));return t}function fd(e){const t=[];return e.trigger==="mutation"&&t.push({type:"mutations",label:"1 mutation",checked:!0,count:1}),e.isKeyframe&&t.push({type:"screenshot",label:"screenshot",checked:!0}),e.networkErrorCount>0&&t.push({type:"network",label:`${e.networkErrorCount} network error${e.networkErrorCount>1?"s":""}`,checked:!0,count:e.networkErrorCount}),e.consoleErrorCount>0&&t.push({type:"logs",label:`${e.consoleErrorCount} log${e.consoleErrorCount>1?"s":""} (${e.consoleErrorCount} error${e.consoleErrorCount>1?"s":""})`,checked:!0,count:e.consoleErrorCount,errorCount:e.consoleErrorCount}),t}function Kx(e,t){const n=e.secondaries.find(r=>r.type==="mutations");if(t.trigger==="mutation"&&(n?(n.count=(n.count??0)+1,n.label=`${n.count} mutation${n.count>1?"s":""}`):e.secondaries.push({type:"mutations",label:"1 mutation",checked:!0,count:1})),t.isKeyframe&&!e.secondaries.some(r=>r.type==="screenshot")&&e.secondaries.push({type:"screenshot",label:"screenshot",checked:!0}),t.networkErrorCount>0){const r=e.secondaries.find(o=>o.type==="network");r?(r.count=(r.count??0)+t.networkErrorCount,r.label=`${r.count} network error${r.count>1?"s":""}`):e.secondaries.push({type:"network",label:`${t.networkErrorCount} network error${t.networkErrorCount>1?"s":""}`,checked:!0,count:t.networkErrorCount})}if(t.consoleErrorCount>0){const r=e.secondaries.find(o=>o.type==="logs");r?(r.count=(r.count??0)+t.consoleErrorCount,r.errorCount=(r.errorCount??0)+t.consoleErrorCount,r.label=`${r.count} log${r.count>1?"s":""} (${r.errorCount} error${r.errorCount>1?"s":""})`):e.secondaries.push({type:"logs",label:`${t.consoleErrorCount} log${t.consoleErrorCount>1?"s":""} (${t.consoleErrorCount} error${t.consoleErrorCount>1?"s":""})`,checked:!0,count:t.consoleErrorCount,errorCount:t.consoleErrorCount})}}function Fx(e,t){const n=(new Date(t).getTime()-new Date(e).getTime())/1e3;if(Math.abs(n)<1)return"0s";const r=Math.round(Math.abs(n));return r>=120?`−${Math.round(r/60)}m`:`−${r}s`}function Ri(e){return new Date(e).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"})}const pd={click:"bg-[rgba(0,132,139,0.15)] text-[#5fd4da]",navigation:"bg-[rgba(168,85,247,0.12)] text-[#c084fc]","page-load":"bg-[rgba(59,130,246,0.12)] text-[#60a5fa]",error:"bg-[rgba(239,68,68,0.12)] text-[#f87171]",mutation:"bg-[rgba(255,255,255,0.06)] text-[#999]"};function Hx({trigger:e}){const t=pd[e]??pd.mutation;return i.jsx("span",{className:`text-[9px] px-1.5 rounded-[3px] font-semibold tracking-[0.2px] mr-1.5 shrink-0 leading-[1.4] ${t}`,children:e})}function Wx({checked:e,onChange:t}){return i.jsx("button",{type:"button",onClick:n=>{n.stopPropagation(),t()},className:`w-4 h-4 rounded-[3px] border-[1.5px] flex items-center justify-center shrink-0 cursor-pointer transition-all duration-[120ms] mr-2 ${e?"border-[#00848B] bg-[rgba(0,132,139,0.12)] text-[#00848B]":"border-[#666] bg-transparent text-transparent"}`,children:e&&i.jsx("span",{className:"text-[9px]",children:"✓"})})}function Bx({checked:e,visible:t,onChange:n}){return t?i.jsx("button",{type:"button",onClick:r=>{r.stopPropagation(),n()},className:`w-3.5 h-3.5 rounded-[3px] border-[1.5px] flex items-center justify-center shrink-0 cursor-pointer transition-all duration-[120ms] mr-1.5 ${e?"border-[#00848B] bg-[rgba(0,132,139,0.12)] text-[#00848B]":"border-[#666] bg-transparent text-transparent"}`,children:e&&i.jsx("span",{className:"text-[8px]",children:"✓"})}):i.jsx("div",{className:"w-3.5 h-3.5 mr-1.5 shrink-0"})}function Vx({onSubmit:e}){const[t,n]=w.useState([]),[r,o]=w.useState(""),[l,s]=w.useState(null),[a,u]=w.useState(!1),[c,f]=w.useState(!1),p=w.useRef(null),d=w.useRef(null);w.useEffect(()=>(ue("overlay",{type:"RECORDING_GET_HISTORY"}),Ss(k=>{if(k.type==="RECORDING_HISTORY"){const C=dd(k.snapshots),T=Math.max(0,C.length-3);for(let j=T;j<C.length;j++)C[j].checked=!0;n(C)}else k.type==="RECORDING_SNAPSHOT_META"?n(C=>{const T=Ux(C);return T.push(k.meta),dd(T)}):k.type==="BUG_REPORT_ELEMENT_PICKED"?(s(k.element),u(!1)):k.type==="BUG_REPORT_PICK_CANCELLED"&&u(!1)})),[]),w.useEffect(()=>{p.current&&(p.current.scrollTop=p.current.scrollHeight)},[t.length]);const m=w.useCallback((x,k)=>{n(C=>{const T=C.map(j=>({...j,secondaries:j.secondaries.map(L=>({...L}))}));if(k&&d.current!==null){const j=Math.min(d.current,x),L=Math.max(d.current,x);for(let I=j;I<=L;I++)T[I].checked=!0,T[I].secondaries.forEach(D=>{D.checked=!0})}else T[x].checked=!T[x].checked,T[x].checked&&T[x].secondaries.forEach(j=>{j.checked=!0});return d.current=x,T})},[]),v=w.useCallback((x,k)=>{n(C=>{const T=C.map(j=>({...j,secondaries:j.secondaries.map(L=>({...L}))}));return T[x].secondaries[k].checked=!T[x].secondaries[k].checked,T})},[]),b=()=>{a?(ue("overlay",{type:"BUG_REPORT_PICK_CANCELLED"}),u(!1)):(ue("overlay",{type:"BUG_REPORT_PICK_ELEMENT"}),u(!0))},S=t.filter(x=>x.checked).length,h=S>0&&r.trim().length>0&&!c,g=async()=>{var F,Y,X;if(!h)return;f(!0);const x=t.filter(E=>E.checked).map(E=>E.primary.id);ue("overlay",{type:"RECORDING_GET_RANGE",ids:x});const C=await new Promise(E=>{const R=Ss(P=>{P.type==="RECORDING_RANGE"&&(R(),E(P.snapshots))});setTimeout(()=>{R(),E([])},1e4)}),T=t.filter(E=>E.checked),j=T.some(E=>E.secondaries.some(R=>R.type==="screenshot"&&R.checked)),L=T.some(E=>E.secondaries.some(R=>R.type==="logs"&&R.checked)),I=T.some(E=>E.secondaries.some(R=>R.type==="network"&&R.checked)),D=[],V=[];for(const E of C){const R={timestamp:E.timestamp,trigger:E.trigger,url:E.url};L&&((F=E.consoleLogs)!=null&&F.length)&&(R.consoleLogs=E.consoleLogs),I&&((Y=E.networkErrors)!=null&&Y.length)&&(R.networkErrors=E.networkErrors),E.domSnapshot&&(R.domSnapshot=E.domSnapshot.slice(0,5e4)),E.domDiff&&(R.domDiff=E.domDiff.slice(0,1e4)),(X=E.domChanges)!=null&&X.length&&(R.domChanges=E.domChanges),j&&E.screenshot&&(V.push(E.screenshot),R.hasScreenshot=!0),E.elementInfo&&(R.elementInfo=E.elementInfo),E.navigationInfo&&(R.navigationInfo=E.navigationInfo),D.push(R)}const H=T.map(E=>E.primary.timestamp),_={start:H[0]??new Date().toISOString(),end:H[H.length-1]??new Date().toISOString()};e({bugDescription:r.trim(),bugScreenshots:j?V.slice(0,5):[],bugTimeline:D,bugTimeRange:_,bugElement:l}),o(""),s(null),n(E=>E.map(R=>({...R,checked:!1,secondaries:R.secondaries.map(P=>({...P,checked:!0}))}))),f(!1)},y=t.length>0?t[t.length-1].primary.timestamp:new Date().toISOString();return i.jsxs("div",{className:"flex-1 flex flex-col min-h-0",children:[i.jsx("div",{ref:p,className:"flex-1 overflow-y-auto border-b border-bv-border",children:t.length===0?i.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 p-8 text-center",children:[i.jsx("div",{className:"text-[11px] text-bv-muted",children:"No recording events yet"}),i.jsx("div",{className:"text-[10px] text-bv-muted/60",children:"Interact with the page to start recording events."})]}):t.map((x,k)=>i.jsxs("div",{className:`border-b border-white/[0.03] ${x.checked?"bg-[rgba(0,132,139,0.12)] border-l-2 border-l-[#00848B]":""}`,children:[i.jsxs("div",{className:"flex items-center px-2.5 py-1.5 cursor-pointer hover:bg-white/[0.025] transition-colors duration-[120ms]",onClick:C=>m(k,C.shiftKey),children:[i.jsx("span",{className:"w-9 shrink-0 text-right pr-1.5 font-mono text-[10px] text-bv-muted font-medium",title:Ri(x.primary.timestamp),children:k===t.length-1?"0s":Fx(x.primary.timestamp,y)}),i.jsx(Wx,{checked:x.checked,onChange:()=>m(k,!1)}),i.jsx(Hx,{trigger:x.primary.trigger}),i.jsxs("span",{className:"text-[11px] text-bv-text flex-1 min-w-0 truncate",children:[x.primary.trigger==="click"&&x.primary.elementInfo&&i.jsxs(i.Fragment,{children:["on ",i.jsxs("span",{className:"font-mono text-[10px] text-bv-text-mid",children:["<",x.primary.elementInfo.tag,">"]}),x.primary.elementInfo.componentName&&i.jsxs(i.Fragment,{children:[" ","in ",i.jsxs("span",{className:"font-mono text-[10px] text-bv-text-mid",children:["<",x.primary.elementInfo.componentName,">"]})]})]}),x.primary.trigger==="page-load"&&i.jsx("span",{className:"font-mono text-[10px] text-bv-text-mid",children:x.primary.url}),x.primary.trigger==="navigation"&&i.jsx("span",{className:"font-mono text-[10px] text-bv-text-mid",children:x.primary.url}),x.primary.trigger==="error"&&i.jsxs("span",{className:"text-[#f87171]",children:[x.primary.consoleErrorCount," error",x.primary.consoleErrorCount>1?"s":""]})]}),x.primary.isKeyframe&&i.jsx("span",{className:"text-[8px] text-[#00848B] font-bold ml-1 shrink-0",children:"◆"})]}),x.secondaries.map((C,T)=>i.jsxs("div",{className:`flex items-center px-2.5 py-0.5 transition-opacity duration-[120ms] ${x.checked&&!C.checked?"opacity-30":""} ${T===x.secondaries.length-1?"pb-[5px]":""}`,children:[i.jsx("span",{className:"w-9 shrink-0"}),i.jsx("span",{className:"w-3 shrink-0"}),i.jsx(Bx,{checked:C.checked,visible:x.checked,onChange:()=>v(k,T)}),i.jsxs("span",{className:`text-[10px] text-bv-text-mid flex-1 min-w-0 truncate ${x.checked&&!C.checked?"line-through decoration-white/25":""}`,children:[C.type==="network"&&C.networkStatus&&i.jsxs("span",{className:`font-bold ${C.networkStatus>=400?"text-[#ef4444]":"text-[#2E7229]"}`,children:[C.networkStatus," "]}),C.type==="logs"&&C.errorCount&&C.errorCount>0&&i.jsxs("span",{className:"text-[#f87171] font-semibold",children:[C.errorCount," error",C.errorCount>1?"s":""," "]}),C.label]})]},`${x.primary.id}-${C.type}-${T}`))]},x.primary.id))}),i.jsxs("div",{className:"px-3 py-2.5 flex flex-col gap-2",children:[i.jsxs("div",{className:"text-[10px] text-bv-text-mid",children:[i.jsx("span",{className:"font-bold text-[#00848B]",children:S})," event",S!==1?"s":""," selected",S>0&&(()=>{const x=t.filter(T=>T.checked),k=Ri(x[0].primary.timestamp),C=Ri(x[x.length-1].primary.timestamp);return i.jsxs("span",{className:"text-bv-muted font-mono text-[9px] ml-1.5",children:[k," – ",C]})})()]}),i.jsx("textarea",{value:r,onChange:x=>o(x.target.value),placeholder:"Describe the bug…",className:"w-full min-h-[48px] max-h-[140px] px-2.5 py-2 rounded-md border border-bv-border bg-bv-surface text-bv-text text-[11px] leading-[1.5] resize-none outline-none transition-colors duration-[120ms] focus:border-[#00848B] placeholder:text-[#666] overflow-y-auto",style:{fieldSizing:"content"}}),i.jsx("div",{className:"flex items-center gap-1.5",children:l?i.jsxs("div",{className:"flex items-center gap-1 flex-1 min-w-0 px-2 py-1 rounded bg-bv-surface border border-bv-border font-mono text-[10px] text-bv-text",children:[i.jsxs("span",{className:"text-[#00848B] font-semibold",children:["<",l.tag,">"]}),l.id&&i.jsxs("span",{className:"text-bv-muted",children:["#",l.id]}),l.componentName&&i.jsx("span",{className:"text-[9px] text-bv-text-mid bg-[rgba(0,132,139,0.1)] px-1 rounded-[2px] font-medium font-sans",children:l.componentName}),i.jsx("button",{type:"button",onClick:()=>s(null),className:"w-3.5 h-3.5 rounded-[3px] border-none bg-white/[0.08] text-bv-muted text-[9px] flex items-center justify-center cursor-pointer ml-auto hover:bg-white/15 hover:text-bv-text",children:"✕"})]}):i.jsxs("button",{type:"button",onClick:b,className:`flex items-center gap-[5px] px-2.5 py-[5px] rounded-md border border-dashed text-[10px] font-medium cursor-pointer transition-all duration-[120ms] whitespace-nowrap ${a?"border-[#00848B] text-[#00848B] bg-[rgba(0,132,139,0.12)]":"border-bv-border text-bv-text-mid bg-transparent hover:border-[#00848B] hover:text-[#00848B] hover:bg-[rgba(0,132,139,0.12)]"}`,children:[i.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"currentColor",className:"shrink-0",children:[i.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"}),i.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?"Click an element…":"Pick Element"]})}),i.jsxs("button",{type:"button",onClick:g,disabled:!h,className:`flex items-center justify-center gap-1.5 w-full py-2 rounded-md border-none text-[11px] font-semibold cursor-pointer transition-all duration-[120ms] ${h?"bg-[#F5532D] text-white hover:bg-[#e04420]":"bg-bv-surface text-[#555] cursor-not-allowed"}`,children:[i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"currentColor",children:[i.jsx("path",{d:"M11.5,6C11.5,4.067,9.933,2.5,8,2.5S4.5,4.067,4.5,6v1h7V6Z"}),i.jsx("rect",{x:"3",y:"8",width:"10",height:"6",rx:"2"}),i.jsx("path",{d:"M1,7.5h2v2H1c-.552,0-1-.448-1-1s.448-1,1-1Z"}),i.jsx("path",{d:"M13,7.5h2c.552,0,1,.448,1,1s-.448,1-1,1h-2v-2Z"}),i.jsx("rect",{x:"7",y:"9",width:"2",height:"4",rx:".5"})]}),"Commit Bug Report"]})]})]})}function Ux(e){return e.map(t=>t.primary)}function hd({tabs:e,activeTab:t,onTabChange:n}){const[r,o]=w.useState(null);return i.jsx("div",{className:"relative flex border-b border-bv-border px-3",children:e.map(l=>{const s=l.id===t,a=l.disabled===!0;return i.jsxs("div",{className:"relative",onMouseEnter:()=>a&&l.tooltip&&o(l.id),onMouseLeave:()=>o(null),children:[i.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 ${a?"text-bv-muted cursor-not-allowed":s?"text-bv-text":"text-bv-text-mid hover:text-bv-text"}`,disabled:a,onClick:()=>!a&&n(l.id),"aria-selected":s,role:"tab",children:[l.label,s&&i.jsx("span",{className:"absolute bottom-0 left-0 right-0 h-[2px] bg-bv-teal"})]}),r===l.id&&l.tooltip&&i.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 Gx(){const[e,t]=w.useState([]),[n,r]=w.useState({draft:0,committed:0,implementing:0,implemented:0,partial:0,error:0}),[o,l]=w.useState({draft:[],commits:[]}),[s,a]=w.useState(!1),u=w.useRef(e);u.current=e;const c=w.useRef(o);c.current=o;const f=w.useCallback((j,L)=>{ue("overlay",{type:"PATCH_PREVIEW",oldClass:j,newClass:L})},[]),p=w.useCallback(j=>{ue("overlay",{type:"PATCH_PREVIEW_BATCH",pairs:j})},[]),d=w.useCallback(()=>{ue("overlay",{type:"PATCH_REVERT"})},[]),m=w.useCallback((j,L,I,D)=>{if(D===I){t(H=>{const _=H.find(F=>F.kind==="class-change"&&F.elementKey===j&&F.property===L);return _&&_.kind==="class-change"&&_.newClass!==I?ue("overlay",{type:"PATCH_REVERT_STAGED",oldClass:_.newClass,newClass:I}):ue("overlay",{type:"PATCH_REVERT"}),H.filter(F=>!(F.kind==="class-change"&&F.elementKey===j&&F.property===L))});return}const V=crypto.randomUUID();t(H=>{const _=H.filter(Y=>!(Y.kind==="class-change"&&Y.elementKey===j&&Y.property===L)),F={id:V,kind:"class-change",elementKey:j,status:"staged",originalClass:I,newClass:D,property:L,timestamp:new Date().toISOString()};return[..._,F]}),ue("overlay",{type:"PATCH_STAGE",id:V,oldClass:I,newClass:D,property:L})},[]),v=w.useCallback((j,L,I)=>{const D=crypto.randomUUID(),V=I?{name:I}:void 0;t(H=>{const _={id:D,kind:"message",elementKey:L,status:"staged",originalClass:"",newClass:"",property:"",timestamp:new Date().toISOString(),message:j,component:V};return[...H,_]}),jn(V?{type:"MESSAGE_STAGE",id:D,message:j,elementKey:L,component:V}:{type:"MESSAGE_STAGE",id:D,message:j,elementKey:L})},[]),b=w.useCallback(()=>{const j=c.current.draft.map(D=>D.id),L=u.current.filter(D=>D.status==="staged").map(D=>D.id),I=Array.from(new Set([...j,...L]));I.length!==0&&(jn({type:"PATCH_COMMIT",ids:I}),t([]))},[]),S=w.useCallback(j=>{t(L=>L.filter(I=>I.id!==j)),jn({type:"DISCARD_DRAFTS",ids:[j]}),ue("overlay",{type:"PATCH_REVERT"})},[]),h=w.useCallback(()=>{const j=c.current.draft.map(D=>D.id),L=u.current.filter(D=>D.status==="staged").map(D=>D.id),I=Array.from(new Set([...j,...L]));t([]),I.length>0&&jn({type:"DISCARD_DRAFTS",ids:I}),ue("overlay",{type:"PATCH_REVERT"})},[]),g=w.useCallback(j=>{const L=c.current.commits.find(I=>I.status==="committed"&&I.patches.some(D=>D.id===j));L&&jn({type:"DISCARD_COMMIT",commitId:L.id})},[]),y=w.useCallback(()=>{},[]),x=w.useCallback(j=>{r({draft:j.draftCount,committed:j.committedCount,implementing:j.implementingCount,implemented:j.implementedCount,partial:j.partialCount,error:j.errorCount}),l({draft:j.draft,commits:j.commits}),a(!!j.agentWaiting)},[]),k=w.useCallback(j=>{r({draft:j.staged,committed:j.committed,implementing:j.implementing,implemented:j.implemented,partial:0,error:0})},[]),C=e.filter(j=>j.status==="staged").length,T={draft:Math.max(C,n.draft),committed:n.committed,implementing:n.implementing,implemented:n.implemented,partial:n.partial,error:n.error};return{patches:e,counts:T,queueState:o,agentWaiting:s,preview:f,previewBatch:p,revertPreview:d,stage:m,stageMessage:v,commitAll:b,discard:S,discardAll:h,discardCommit:g,reset:y,handleQueueUpdate:x,handlePatchUpdate:k}}function Us(){return typeof window<"u"}function no(e){return Vu(e)?(e.nodeName||"").toLowerCase():"#document"}function pt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ht(e){var t;return(t=(Vu(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Vu(e){return Us()?e instanceof Node||e instanceof pt(e).Node:!1}function _e(e){return Us()?e instanceof Element||e instanceof pt(e).Element:!1}function Wt(e){return Us()?e instanceof HTMLElement||e instanceof pt(e).HTMLElement:!1}function Ka(e){return!Us()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof pt(e).ShadowRoot}function ol(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Et(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function Yx(e){return/^(table|td|th)$/.test(no(e))}function Gs(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Qx=/transform|translate|scale|rotate|perspective|filter/,Xx=/paint|layout|strict|content/,Vn=e=>!!e&&e!=="none";let Pi;function Uu(e){const t=_e(e)?Et(e):e;return Vn(t.transform)||Vn(t.translate)||Vn(t.scale)||Vn(t.rotate)||Vn(t.perspective)||!Ys()&&(Vn(t.backdropFilter)||Vn(t.filter))||Qx.test(t.willChange||"")||Xx.test(t.contain||"")}function Zx(e){let t=dn(e);for(;Wt(t)&&!on(t);){if(Uu(t))return t;if(Gs(t))return null;t=dn(t)}return null}function Ys(){return Pi==null&&(Pi=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Pi}function on(e){return/^(html|body|#document)$/.test(no(e))}function Et(e){return pt(e).getComputedStyle(e)}function Qs(e){return _e(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function dn(e){if(no(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ka(e)&&e.host||Ht(e);return Ka(t)?t.host:t}function yh(e){const t=dn(e);return on(t)?e.ownerDocument?e.ownerDocument.body:e.body:Wt(t)&&ol(t)?t:yh(t)}function On(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=yh(e),l=o===((r=e.ownerDocument)==null?void 0:r.body),s=pt(o);if(l){const a=Fa(s);return t.concat(s,s.visualViewport||[],ol(o)?o:[],a&&n?On(a):[])}else return t.concat(o,On(o,[],n))}function Fa(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Jr=Math.min,ct=Math.max,ks=Math.round,Rl=Math.floor,Kt=e=>({x:e,y:e}),Jx={left:"right",right:"left",bottom:"top",top:"bottom"};function md(e,t,n){return ct(e,Jr(t,n))}function ll(e,t){return typeof e=="function"?e(t):e}function zn(e){return e.split("-")[0]}function sl(e){return e.split("-")[1]}function xh(e){return e==="x"?"y":"x"}function vh(e){return e==="y"?"height":"width"}function nn(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function bh(e){return xh(nn(e))}function qx(e,t,n){n===void 0&&(n=!1);const r=sl(e),o=bh(e),l=vh(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(s=js(s)),[s,js(s)]}function ev(e){const t=js(e);return[Ha(e),t,Ha(t)]}function Ha(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const gd=["left","right"],yd=["right","left"],tv=["top","bottom"],nv=["bottom","top"];function rv(e,t,n){switch(e){case"top":case"bottom":return n?t?yd:gd:t?gd:yd;case"left":case"right":return t?tv:nv;default:return[]}}function ov(e,t,n,r){const o=sl(e);let l=rv(zn(e),n==="start",r);return o&&(l=l.map(s=>s+"-"+o),t&&(l=l.concat(l.map(Ha)))),l}function js(e){const t=zn(e);return Jx[t]+e.slice(t.length)}function lv(e){return{top:0,right:0,bottom:0,left:0,...e}}function sv(e){return typeof e!="number"?lv(e):{top:e,right:e,bottom:e,left:e}}function Es(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 iv=["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] *)"],Wa=iv.join(","),wh=typeof Element>"u",Zo=wh?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ts=!wh&&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},Ns=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]"):Ns(t.parentNode));return s},av=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},uv=function(t,n,r){if(Ns(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Wa));return n&&Zo.call(t,Wa)&&o.unshift(t),o=o.filter(r),o},Ba=function(t,n,r){for(var o=[],l=Array.from(t);l.length;){var s=l.shift();if(!Ns(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),u=a.length?a:s.children,c=Ba(u,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:s,candidates:c})}else{var f=Zo.call(s,Wa);f&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var p=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),d=!Ns(p,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(p&&d){var m=Ba(p===!0?s.children:p.children,!0,r);r.flatten?o.push.apply(o,m):o.push({scopeParent:s,candidates:m})}else l.unshift.apply(l,s.children)}}return o},Sh=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Ch=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||av(t))&&!Sh(t)?0:t.tabIndex},cv=function(t,n){var r=Ch(t);return r<0&&n&&!Sh(t)?0:r},dv=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},kh=function(t){return t.tagName==="INPUT"},fv=function(t){return kh(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},hv=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},mv=function(t){if(!t.name)return!0;var n=t.form||Ts(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},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=hv(o,t.form);return!l||l===t},gv=function(t){return kh(t)&&t.type==="radio"},yv=function(t){return gv(t)&&!mv(t)},xv=function(t){var n,r=t&&Ts(t),o=(n=r)===null||n===void 0?void 0:n.host,l=!1;if(r&&r!==t){var s,a,u;for(l=!!((s=o)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(u=t.ownerDocument)!==null&&u!==void 0&&u.contains(t));!l&&o;){var c,f,p;r=Ts(o),o=(c=r)===null||c===void 0?void 0:c.host,l=!!((f=o)!==null&&f!==void 0&&(p=f.ownerDocument)!==null&&p!==void 0&&p.contains(o))}}return l},xd=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},vv=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=Zo.call(t,"details>summary:first-of-type"),a=s?t.parentElement:t;if(Zo.call(a,"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,f=Ts(t);if(c&&!c.shadowRoot&&o(c)===!0)return xd(t);t.assignedSlot?t=t.assignedSlot:!c&&f!==t.ownerDocument?t=f.host:t=c}t=u}if(xv(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return xd(t);return!1},bv=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 Zo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},wv=function(t,n){return!(n.disabled||fv(n)||vv(n,t)||pv(n)||bv(n))},vd=function(t,n){return!(yv(n)||Ch(n)<0||!wv(t,n))},Sv=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},jh=function(t){var n=[],r=[];return t.forEach(function(o,l){var s=!!o.scopeParent,a=s?o.scopeParent:o,u=cv(a,s),c=s?jh(o.candidates):a;u===0?s?n.push.apply(n,c):n.push(a):r.push({documentOrder:l,tabIndex:u,item:o,isScope:s,content:c})}),r.sort(dv).reduce(function(o,l){return l.isScope?o.push.apply(o,l.content):o.push(l.content),o},[]).concat(n)},Eh=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Ba([t],n.includeContainer,{filter:vd.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Sv}):r=uv(t,n.includeContainer,vd.bind(null,n)),jh(r)};function Cv(){return/apple/i.test(navigator.vendor)}function kv(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 Va(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Ka(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function yo(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Ii(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 jv(e){return e.matches("html,body")}function Jo(e){return(e==null?void 0:e.ownerDocument)||document}function Vl(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,...Vl(e,o.id,n)])}function Ev(e){return"nativeEvent"in e}var Tv=typeof document<"u",Nv=function(){},rr=Tv?w.useLayoutEffect:Nv;const Rv={...nf},Pv=Rv.useInsertionEffect,Iv=Pv||(e=>e());function Sr(e){const t=w.useRef(()=>{});return Iv(()=>{t.current=e}),w.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 Th=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Nh(e,t){const n=Eh(e,Th()),r=n.length;if(r===0)return;const o=kv(Jo(e)),l=n.indexOf(o),s=l===-1?t===1?0:r-1:l+t;return n[s]}function _v(e){return Nh(Jo(e).body,1)||e}function Av(e){return Nh(Jo(e).body,-1)||e}function _i(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Va(n,r)}function Lv(e){Eh(e,Th()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function bd(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 wd(e,t,n){let{reference:r,floating:o}=e;const l=nn(t),s=bh(t),a=vh(s),u=zn(t),c=l==="y",f=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,d=r[a]/2-o[a]/2;let m;switch(u){case"top":m={x:f,y:r.y-o.height};break;case"bottom":m={x:f,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:p};break;case"left":m={x:r.x-o.width,y:p};break;default:m={x:r.x,y:r.y}}switch(sl(t)){case"start":m[s]-=d*(n&&c?-1:1);break;case"end":m[s]+=d*(n&&c?-1:1);break}return m}async function Dv(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:l,rects:s,elements:a,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:d=!1,padding:m=0}=ll(t,e),v=sv(m),S=a[d?p==="floating"?"reference":"floating":p],h=Es(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(a.floating)),boundary:c,rootBoundary:f,strategy:u})),g=p==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,y=await(l.getOffsetParent==null?void 0:l.getOffsetParent(a.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},k=Es(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:y,strategy:u}):g);return{top:(h.top-k.top+v.top)/x.y,bottom:(k.bottom-h.bottom+v.bottom)/x.y,left:(h.left-k.left+v.left)/x.x,right:(k.right-h.right+v.right)/x.x}}const Ov=50,Mv=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:l=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:Dv},u=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=wd(c,r,u),d=r,m=0;const v={};for(let b=0;b<l.length;b++){const S=l[b];if(!S)continue;const{name:h,fn:g}=S,{x:y,y:x,data:k,reset:C}=await g({x:f,y:p,initialPlacement:r,placement:d,strategy:o,middlewareData:v,rects:c,platform:a,elements:{reference:e,floating:t}});f=y??f,p=x??p,v[h]={...v[h],...k},C&&m<Ov&&(m++,typeof C=="object"&&(C.placement&&(d=C.placement),C.rects&&(c=C.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:f,y:p}=wd(c,d,u)),b=-1)}return{x:f,y:p,placement:d,strategy:o,middlewareData:v}},$v=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:a,platform:u,elements:c}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:d,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:b=!0,...S}=ll(e,t);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const h=zn(o),g=nn(a),y=zn(a)===a,x=await(u.isRTL==null?void 0:u.isRTL(c.floating)),k=d||(y||!b?[js(a)]:ev(a)),C=v!=="none";!d&&C&&k.push(...ov(a,b,v,x));const T=[a,...k],j=await u.detectOverflow(t,S),L=[];let I=((r=l.flip)==null?void 0:r.overflows)||[];if(f&&L.push(j[h]),p){const _=qx(o,s,x);L.push(j[_[0]],j[_[1]])}if(I=[...I,{placement:o,overflows:L}],!L.every(_=>_<=0)){var D,V;const _=(((D=l.flip)==null?void 0:D.index)||0)+1,F=T[_];if(F&&(!(p==="alignment"?g!==nn(F):!1)||I.every(E=>nn(E.placement)===g?E.overflows[0]>0:!0)))return{data:{index:_,overflows:I},reset:{placement:F}};let Y=(V=I.filter(X=>X.overflows[0]<=0).sort((X,E)=>X.overflows[1]-E.overflows[1])[0])==null?void 0:V.placement;if(!Y)switch(m){case"bestFit":{var H;const X=(H=I.filter(E=>{if(C){const R=nn(E.placement);return R===g||R==="y"}return!0}).map(E=>[E.placement,E.overflows.filter(R=>R>0).reduce((R,P)=>R+P,0)]).sort((E,R)=>E[1]-R[1])[0])==null?void 0:H[0];X&&(Y=X);break}case"initialPlacement":Y=a;break}if(o!==Y)return{reset:{placement:Y}}}return{}}}},zv=new Set(["left","top"]);async function Kv(e,t){const{placement:n,platform:r,elements:o}=e,l=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=zn(n),a=sl(n),u=nn(n)==="y",c=zv.has(s)?-1:1,f=l&&u?-1:1,p=ll(t,e);let{mainAxis:d,crossAxis:m,alignmentAxis:v}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return a&&typeof v=="number"&&(m=a==="end"?v*-1:v),u?{x:m*f,y:d*c}:{x:d*c,y:m*f}}const Fv=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:a}=t,u=await Kv(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:l+u.y,data:{...u,placement:s}}}}},Hv=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:a=!1,limiter:u={fn:h=>{let{x:g,y}=h;return{x:g,y}}},...c}=ll(e,t),f={x:n,y:r},p=await l.detectOverflow(t,c),d=nn(zn(o)),m=xh(d);let v=f[m],b=f[d];if(s){const h=m==="y"?"top":"left",g=m==="y"?"bottom":"right",y=v+p[h],x=v-p[g];v=md(y,v,x)}if(a){const h=d==="y"?"top":"left",g=d==="y"?"bottom":"right",y=b+p[h],x=b-p[g];b=md(y,b,x)}const S=u.fn({...t,[m]:v,[d]:b});return{...S,data:{x:S.x-n,y:S.y-r,enabled:{[m]:s,[d]:a}}}}}},Wv=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:a}=t,{apply:u=()=>{},...c}=ll(e,t),f=await s.detectOverflow(t,c),p=zn(o),d=sl(o),m=nn(o)==="y",{width:v,height:b}=l.floating;let S,h;p==="top"||p==="bottom"?(S=p,h=d===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(h=p,S=d==="end"?"top":"bottom");const g=b-f.top-f.bottom,y=v-f.left-f.right,x=Jr(b-f[S],g),k=Jr(v-f[h],y),C=!t.middlewareData.shift;let T=x,j=k;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(j=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(T=g),C&&!d){const I=ct(f.left,0),D=ct(f.right,0),V=ct(f.top,0),H=ct(f.bottom,0);m?j=v-2*(I!==0||D!==0?I+D:ct(f.left,f.right)):T=b-2*(V!==0||H!==0?V+H:ct(f.top,f.bottom))}await u({...t,availableWidth:j,availableHeight:T});const L=await s.getDimensions(a.floating);return v!==L.width||b!==L.height?{reset:{rects:!0}}:{}}}};function Rh(e){const t=Et(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Wt(e),l=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=ks(n)!==l||ks(r)!==s;return a&&(n=l,r=s),{width:n,height:r,$:a}}function Gu(e){return _e(e)?e:e.contextElement}function Hr(e){const t=Gu(e);if(!Wt(t))return Kt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:l}=Rh(t);let s=(l?ks(n.width):n.width)/r,a=(l?ks(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const Bv=Kt(0);function Ph(e){const t=pt(e);return!Ys()||!t.visualViewport?Bv:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Vv(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==pt(e)?!1:t}function ur(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),l=Gu(e);let s=Kt(1);t&&(r?_e(r)&&(s=Hr(r)):s=Hr(e));const a=Vv(l,n,r)?Ph(l):Kt(0);let u=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,f=o.width/s.x,p=o.height/s.y;if(l){const d=pt(l),m=r&&_e(r)?pt(r):r;let v=d,b=Fa(v);for(;b&&r&&m!==v;){const S=Hr(b),h=b.getBoundingClientRect(),g=Et(b),y=h.left+(b.clientLeft+parseFloat(g.paddingLeft))*S.x,x=h.top+(b.clientTop+parseFloat(g.paddingTop))*S.y;u*=S.x,c*=S.y,f*=S.x,p*=S.y,u+=y,c+=x,v=pt(b),b=Fa(v)}}return Es({width:f,height:p,x:u,y:c})}function Xs(e,t){const n=Qs(e).scrollLeft;return t?t.left+n:ur(Ht(e)).left+n}function Ih(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Xs(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Uv(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const l=o==="fixed",s=Ht(r),a=t?Gs(t.floating):!1;if(r===s||a&&l)return n;let u={scrollLeft:0,scrollTop:0},c=Kt(1);const f=Kt(0),p=Wt(r);if((p||!p&&!l)&&((no(r)!=="body"||ol(s))&&(u=Qs(r)),p)){const m=ur(r);c=Hr(r),f.x=m.x+r.clientLeft,f.y=m.y+r.clientTop}const d=s&&!p&&!l?Ih(s,u):Kt(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+f.x+d.x,y:n.y*c.y-u.scrollTop*c.y+f.y+d.y}}function Gv(e){return Array.from(e.getClientRects())}function Yv(e){const t=Ht(e),n=Qs(e),r=e.ownerDocument.body,o=ct(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),l=ct(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Xs(e);const a=-n.scrollTop;return Et(r).direction==="rtl"&&(s+=ct(t.clientWidth,r.clientWidth)-o),{width:o,height:l,x:s,y:a}}const Sd=25;function Qv(e,t){const n=pt(e),r=Ht(e),o=n.visualViewport;let l=r.clientWidth,s=r.clientHeight,a=0,u=0;if(o){l=o.width,s=o.height;const f=Ys();(!f||f&&t==="fixed")&&(a=o.offsetLeft,u=o.offsetTop)}const c=Xs(r);if(c<=0){const f=r.ownerDocument,p=f.body,d=getComputedStyle(p),m=f.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,v=Math.abs(r.clientWidth-p.clientWidth-m);v<=Sd&&(l-=v)}else c<=Sd&&(l+=c);return{width:l,height:s,x:a,y:u}}function Xv(e,t){const n=ur(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,l=Wt(e)?Hr(e):Kt(1),s=e.clientWidth*l.x,a=e.clientHeight*l.y,u=o*l.x,c=r*l.y;return{width:s,height:a,x:u,y:c}}function Cd(e,t,n){let r;if(t==="viewport")r=Qv(e,n);else if(t==="document")r=Yv(Ht(e));else if(_e(t))r=Xv(t,n);else{const o=Ph(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Es(r)}function _h(e,t){const n=dn(e);return n===t||!_e(n)||on(n)?!1:Et(n).position==="fixed"||_h(n,t)}function Zv(e,t){const n=t.get(e);if(n)return n;let r=On(e,[],!1).filter(a=>_e(a)&&no(a)!=="body"),o=null;const l=Et(e).position==="fixed";let s=l?dn(e):e;for(;_e(s)&&!on(s);){const a=Et(s),u=Uu(s);!u&&a.position==="fixed"&&(o=null),(l?!u&&!o:!u&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||ol(s)&&!u&&_h(e,s))?r=r.filter(f=>f!==s):o=a,s=dn(s)}return t.set(e,r),r}function Jv(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Gs(t)?[]:Zv(t,this._c):[].concat(n),r],a=Cd(t,s[0],o);let u=a.top,c=a.right,f=a.bottom,p=a.left;for(let d=1;d<s.length;d++){const m=Cd(t,s[d],o);u=ct(m.top,u),c=Jr(m.right,c),f=Jr(m.bottom,f),p=ct(m.left,p)}return{width:c-p,height:f-u,x:p,y:u}}function qv(e){const{width:t,height:n}=Rh(e);return{width:t,height:n}}function e0(e,t,n){const r=Wt(t),o=Ht(t),l=n==="fixed",s=ur(e,!0,l,t);let a={scrollLeft:0,scrollTop:0};const u=Kt(0);function c(){u.x=Xs(o)}if(r||!r&&!l)if((no(t)!=="body"||ol(o))&&(a=Qs(t)),r){const m=ur(t,!0,l,t);u.x=m.x+t.clientLeft,u.y=m.y+t.clientTop}else o&&c();l&&!r&&o&&c();const f=o&&!r&&!l?Ih(o,a):Kt(0),p=s.left+a.scrollLeft-u.x-f.x,d=s.top+a.scrollTop-u.y-f.y;return{x:p,y:d,width:s.width,height:s.height}}function Ai(e){return Et(e).position==="static"}function kd(e,t){if(!Wt(e)||Et(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ht(e)===n&&(n=n.ownerDocument.body),n}function Ah(e,t){const n=pt(e);if(Gs(e))return n;if(!Wt(e)){let o=dn(e);for(;o&&!on(o);){if(_e(o)&&!Ai(o))return o;o=dn(o)}return n}let r=kd(e,t);for(;r&&Yx(r)&&Ai(r);)r=kd(r,t);return r&&on(r)&&Ai(r)&&!Uu(r)?n:r||Zx(e)||n}const t0=async function(e){const t=this.getOffsetParent||Ah,n=this.getDimensions,r=await n(e.floating);return{reference:e0(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function n0(e){return Et(e).direction==="rtl"}const r0={convertOffsetParentRelativeRectToViewportRelativeRect:Uv,getDocumentElement:Ht,getClippingRect:Jv,getOffsetParent:Ah,getElementRects:t0,getClientRects:Gv,getDimensions:qv,getScale:Hr,isElement:_e,isRTL:n0};function Lh(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function o0(e,t){let n=null,r;const o=Ht(e);function l(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,u){a===void 0&&(a=!1),u===void 0&&(u=1),l();const c=e.getBoundingClientRect(),{left:f,top:p,width:d,height:m}=c;if(a||t(),!d||!m)return;const v=Rl(p),b=Rl(o.clientWidth-(f+d)),S=Rl(o.clientHeight-(p+m)),h=Rl(f),y={rootMargin:-v+"px "+-b+"px "+-S+"px "+-h+"px",threshold:ct(0,Jr(1,u))||1};let x=!0;function k(C){const T=C[0].intersectionRatio;if(T!==u){if(!x)return s();T?s(!1,T):r=setTimeout(()=>{s(!1,1e-7)},1e3)}T===1&&!Lh(c,e.getBoundingClientRect())&&s(),x=!1}try{n=new IntersectionObserver(k,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(k,y)}n.observe(e)}return s(!0),l}function fn(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:l=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,c=Gu(e),f=o||l?[...c?On(c):[],...t?On(t):[]]:[];f.forEach(h=>{o&&h.addEventListener("scroll",n,{passive:!0}),l&&h.addEventListener("resize",n)});const p=c&&a?o0(c,n):null;let d=-1,m=null;s&&(m=new ResizeObserver(h=>{let[g]=h;g&&g.target===c&&m&&t&&(m.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var y;(y=m)==null||y.observe(t)})),n()}),c&&!u&&m.observe(c),t&&m.observe(t));let v,b=u?ur(e):null;u&&S();function S(){const h=ur(e);b&&!Lh(b,h)&&n(),b=h,v=requestAnimationFrame(S)}return n(),()=>{var h;f.forEach(g=>{o&&g.removeEventListener("scroll",n),l&&g.removeEventListener("resize",n)}),p==null||p(),(h=m)==null||h.disconnect(),m=null,u&&cancelAnimationFrame(v)}}const l0=Fv,s0=Hv,i0=$v,a0=Wv,u0=(e,t,n)=>{const r=new Map,o={platform:r0,...n},l={...o.platform,_c:r};return Mv(e,t,{...o,platform:l})};var c0=typeof document<"u",d0=function(){},Ul=c0?w.useLayoutEffect:d0;function Rs(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(!Rs(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)&&!Rs(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function Dh(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function jd(e,t){const n=Dh(e);return Math.round(t*n)/n}function Li(e){const t=w.useRef(e);return Ul(()=>{t.current=e}),t}function f0(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:l,floating:s}={},transform:a=!0,whileElementsMounted:u,open:c}=e,[f,p]=w.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,m]=w.useState(r);Rs(d,r)||m(r);const[v,b]=w.useState(null),[S,h]=w.useState(null),g=w.useCallback(E=>{E!==C.current&&(C.current=E,b(E))},[]),y=w.useCallback(E=>{E!==T.current&&(T.current=E,h(E))},[]),x=l||v,k=s||S,C=w.useRef(null),T=w.useRef(null),j=w.useRef(f),L=u!=null,I=Li(u),D=Li(o),V=Li(c),H=w.useCallback(()=>{if(!C.current||!T.current)return;const E={placement:t,strategy:n,middleware:d};D.current&&(E.platform=D.current),u0(C.current,T.current,E).then(R=>{const P={...R,isPositioned:V.current!==!1};_.current&&!Rs(j.current,P)&&(j.current=P,Hu.flushSync(()=>{p(P)}))})},[d,t,n,D,V]);Ul(()=>{c===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,p(E=>({...E,isPositioned:!1})))},[c]);const _=w.useRef(!1);Ul(()=>(_.current=!0,()=>{_.current=!1}),[]),Ul(()=>{if(x&&(C.current=x),k&&(T.current=k),x&&k){if(I.current)return I.current(x,k,H);H()}},[x,k,H,I,L]);const F=w.useMemo(()=>({reference:C,floating:T,setReference:g,setFloating:y}),[g,y]),Y=w.useMemo(()=>({reference:x,floating:k}),[x,k]),X=w.useMemo(()=>{const E={position:n,left:0,top:0};if(!Y.floating)return E;const R=jd(Y.floating,f.x),P=jd(Y.floating,f.y);return a?{...E,transform:"translate("+R+"px, "+P+"px)",...Dh(Y.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:R,top:P}},[n,a,Y.floating,f.x,f.y]);return w.useMemo(()=>({...f,update:H,refs:F,elements:Y,floatingStyles:X}),[f,H,F,Y,X])}const pn=(e,t)=>{const n=l0(e);return{name:n.name,fn:n.fn,options:[e,t]}},hn=(e,t)=>{const n=s0(e);return{name:n.name,fn:n.fn,options:[e,t]}},mn=(e,t)=>{const n=i0(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ua=(e,t)=>{const n=a0(e);return{name:n.name,fn:n.fn,options:[e,t]}},p0="data-floating-ui-focusable",Ed="active",Td="selected",h0={...nf};let Nd=!1,m0=0;const Rd=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+m0++;function g0(){const[e,t]=w.useState(()=>Nd?Rd():void 0);return rr(()=>{e==null&&t(Rd())},[]),w.useEffect(()=>{Nd=!0},[]),e}const y0=h0.useId,Oh=y0||g0;function x0(){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 v0=w.createContext(null),b0=w.createContext(null),w0=()=>{var e;return((e=w.useContext(v0))==null?void 0:e.id)||null},Mh=()=>w.useContext(b0);function Yu(e){return"data-floating-ui-"+e}const S0={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},Pd=w.forwardRef(function(t,n){const[r,o]=w.useState();rr(()=>{Cv()&&o("button")},[]);const l={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Yu("focus-guard")]:"",style:S0};return i.jsx("span",{...t,...l})}),C0={clipPath:"inset(50%)",position:"fixed",top:0,left:0},$h=w.createContext(null),Id=Yu("portal");function k0(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Oh(),o=j0(),[l,s]=w.useState(null),a=w.useRef(null);return rr(()=>()=>{l==null||l.remove(),queueMicrotask(()=>{a.current=null})},[l]),rr(()=>{if(!r||a.current)return;const u=t?document.getElementById(t):null;if(!u)return;const c=document.createElement("div");c.id=r,c.setAttribute(Id,""),u.appendChild(c),a.current=c,s(c)},[t,r]),rr(()=>{if(n===null||!r||a.current)return;let u=n||(o==null?void 0:o.portalNode);u&&!Vu(u)&&(u=u.current),u=u||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,u.appendChild(c));const f=document.createElement("div");f.id=r,f.setAttribute(Id,""),u=c||u,u.appendChild(f),a.current=f,s(f)},[t,n,r,o]),l}function gn(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,l=k0({id:n,root:r}),[s,a]=w.useState(null),u=w.useRef(null),c=w.useRef(null),f=w.useRef(null),p=w.useRef(null),d=s==null?void 0:s.modal,m=s==null?void 0:s.open,v=!!s&&!s.modal&&s.open&&o&&!!(r||l);return w.useEffect(()=>{if(!l||!o||d)return;function b(S){l&&_i(S)&&(S.type==="focusin"?bd:Lv)(l)}return l.addEventListener("focusin",b,!0),l.addEventListener("focusout",b,!0),()=>{l.removeEventListener("focusin",b,!0),l.removeEventListener("focusout",b,!0)}},[l,o,d]),w.useEffect(()=>{l&&(m||bd(l))},[m,l]),i.jsxs($h.Provider,{value:w.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:u,afterOutsideRef:c,beforeInsideRef:f,afterInsideRef:p,portalNode:l,setFocusManagerState:a}),[o,l]),children:[v&&l&&i.jsx(Pd,{"data-type":"outside",ref:u,onFocus:b=>{if(_i(b,l)){var S;(S=f.current)==null||S.focus()}else{const h=s?s.domReference:null,g=Av(h);g==null||g.focus()}}}),v&&l&&i.jsx("span",{"aria-owns":l.id,style:C0}),l&&Hu.createPortal(t,l),v&&l&&i.jsx(Pd,{"data-type":"outside",ref:c,onFocus:b=>{if(_i(b,l)){var S;(S=p.current)==null||S.focus()}else{const h=s?s.domReference:null,g=_v(h);g==null||g.focus(),s!=null&&s.closeOnFocusOut&&(s==null||s.onOpenChange(!1,b.nativeEvent,"focus-out"))}}})]})}const j0=()=>w.useContext($h),E0={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},T0={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},_d=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 cr(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:l}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:u=!0,outsidePressEvent:c="pointerdown",referencePress:f=!1,referencePressEvent:p="pointerdown",ancestorScroll:d=!1,bubbles:m,capture:v}=t,b=Mh(),S=Sr(typeof u=="function"?u:()=>!1),h=typeof u=="function"?S:u,g=w.useRef(!1),{escapeKey:y,outsidePress:x}=_d(m),{escapeKey:k,outsidePress:C}=_d(v),T=w.useRef(!1),j=Sr(_=>{var F;if(!n||!s||!a||_.key!=="Escape"||T.current)return;const Y=(F=l.current.floatingContext)==null?void 0:F.nodeId,X=b?Vl(b.nodesRef.current,Y):[];if(!y&&(_.stopPropagation(),X.length>0)){let E=!0;if(X.forEach(R=>{var P;if((P=R.context)!=null&&P.open&&!R.context.dataRef.current.__escapeKeyBubbles){E=!1;return}}),!E)return}r(!1,Ev(_)?_.nativeEvent:_,"escape-key")}),L=Sr(_=>{var F;const Y=()=>{var X;j(_),(X=yo(_))==null||X.removeEventListener("keydown",Y)};(F=yo(_))==null||F.addEventListener("keydown",Y)}),I=Sr(_=>{var F;const Y=l.current.insideReactTree;l.current.insideReactTree=!1;const X=g.current;if(g.current=!1,c==="click"&&X||Y||typeof h=="function"&&!h(_))return;const E=yo(_),R="["+Yu("inert")+"]",P=Jo(o.floating).querySelectorAll(R);let G=_e(E)?E:null;for(;G&&!on(G);){const ye=dn(G);if(on(ye)||!_e(ye))break;G=ye}if(P.length&&_e(E)&&!jv(E)&&!Va(E,o.floating)&&Array.from(P).every(ye=>!Va(G,ye)))return;if(Wt(E)&&H){const ye=on(E),de=Et(E),O=/auto|scroll/,Q=ye||O.test(de.overflowX),nt=ye||O.test(de.overflowY),q=Q&&E.clientWidth>0&&E.scrollWidth>E.clientWidth,yt=nt&&E.clientHeight>0&&E.scrollHeight>E.clientHeight,ro=de.direction==="rtl",oo=yt&&(ro?_.offsetX<=E.offsetWidth-E.clientWidth:_.offsetX>E.clientWidth),Bt=q&&_.offsetY>E.clientHeight;if(oo||Bt)return}const J=(F=l.current.floatingContext)==null?void 0:F.nodeId,Ke=b&&Vl(b.nodesRef.current,J).some(ye=>{var de;return Ii(_,(de=ye.context)==null?void 0:de.elements.floating)});if(Ii(_,o.floating)||Ii(_,o.domReference)||Ke)return;const Re=b?Vl(b.nodesRef.current,J):[];if(Re.length>0){let ye=!0;if(Re.forEach(de=>{var O;if((O=de.context)!=null&&O.open&&!de.context.dataRef.current.__outsidePressBubbles){ye=!1;return}}),!ye)return}r(!1,_,"outside-press")}),D=Sr(_=>{var F;const Y=()=>{var X;I(_),(X=yo(_))==null||X.removeEventListener(c,Y)};(F=yo(_))==null||F.addEventListener(c,Y)});w.useEffect(()=>{if(!n||!s)return;l.current.__escapeKeyBubbles=y,l.current.__outsidePressBubbles=x;let _=-1;function F(P){r(!1,P,"ancestor-scroll")}function Y(){window.clearTimeout(_),T.current=!0}function X(){_=window.setTimeout(()=>{T.current=!1},Ys()?5:0)}const E=Jo(o.floating);a&&(E.addEventListener("keydown",k?L:j,k),E.addEventListener("compositionstart",Y),E.addEventListener("compositionend",X)),h&&E.addEventListener(c,C?D:I,C);let R=[];return d&&(_e(o.domReference)&&(R=On(o.domReference)),_e(o.floating)&&(R=R.concat(On(o.floating))),!_e(o.reference)&&o.reference&&o.reference.contextElement&&(R=R.concat(On(o.reference.contextElement)))),R=R.filter(P=>{var G;return P!==((G=E.defaultView)==null?void 0:G.visualViewport)}),R.forEach(P=>{P.addEventListener("scroll",F,{passive:!0})}),()=>{a&&(E.removeEventListener("keydown",k?L:j,k),E.removeEventListener("compositionstart",Y),E.removeEventListener("compositionend",X)),h&&E.removeEventListener(c,C?D:I,C),R.forEach(P=>{P.removeEventListener("scroll",F)}),window.clearTimeout(_)}},[l,o,a,h,c,n,r,d,s,y,x,j,k,L,I,C,D]),w.useEffect(()=>{l.current.insideReactTree=!1},[l,h,c]);const V=w.useMemo(()=>({onKeyDown:j,...f&&{[E0[p]]:_=>{r(!1,_.nativeEvent,"reference-press")},...p!=="click"&&{onClick(_){r(!1,_.nativeEvent,"reference-press")}}}}),[j,r,f,p]),H=w.useMemo(()=>{function _(F){F.button===0&&(g.current=!0)}return{onKeyDown:j,onMouseDown:_,onMouseUp:_,[T0[c]]:()=>{l.current.insideReactTree=!0}}},[j,c,l]);return w.useMemo(()=>s?{reference:V,floating:H}:{},[s,V,H])}function N0(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Oh(),l=w.useRef({}),[s]=w.useState(()=>x0()),a=w0()!=null,[u,c]=w.useState(r.reference),f=Sr((m,v,b)=>{l.current.openEvent=m?v:void 0,s.emit("openchange",{open:m,event:v,reason:b,nested:a}),n==null||n(m,v,b)}),p=w.useMemo(()=>({setPositionReference:c}),[]),d=w.useMemo(()=>({reference:u||r.reference||null,floating:r.floating||null,domReference:r.reference}),[u,r.reference,r.floating]);return w.useMemo(()=>({dataRef:l,open:t,onOpenChange:f,elements:d,events:s,floatingId:o,refs:p}),[t,f,d,s,o,p])}function yn(e){e===void 0&&(e={});const{nodeId:t}=e,n=N0({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[l,s]=w.useState(null),[a,u]=w.useState(null),f=(o==null?void 0:o.domReference)||l,p=w.useRef(null),d=Mh();rr(()=>{f&&(p.current=f)},[f]);const m=f0({...e,elements:{...o,...a&&{reference:a}}}),v=w.useCallback(y=>{const x=_e(y)?{getBoundingClientRect:()=>y.getBoundingClientRect(),getClientRects:()=>y.getClientRects(),contextElement:y}:y;u(x),m.refs.setReference(x)},[m.refs]),b=w.useCallback(y=>{(_e(y)||y===null)&&(p.current=y,s(y)),(_e(m.refs.reference.current)||m.refs.reference.current===null||y!==null&&!_e(y))&&m.refs.setReference(y)},[m.refs]),S=w.useMemo(()=>({...m.refs,setReference:b,setPositionReference:v,domReference:p}),[m.refs,b,v]),h=w.useMemo(()=>({...m.elements,domReference:f}),[m.elements,f]),g=w.useMemo(()=>({...m,...r,refs:S,elements:h,nodeId:t}),[m,S,h,t,r]);return rr(()=>{r.dataRef.current.floatingContext=g;const y=d==null?void 0:d.nodesRef.current.find(x=>x.id===t);y&&(y.context=g)}),w.useMemo(()=>({...m,context:g,refs:S,elements:h}),[m,S,h,g])}function Di(e,t,n){const r=new Map,o=n==="item";let l=e;if(o&&e){const{[Ed]:s,[Td]:a,...u}=e;l=u}return{...n==="floating"&&{tabIndex:-1,[p0]:""},...l,...t.map(s=>{const a=s?s[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((s,a)=>(a&&Object.entries(a).forEach(u=>{let[c,f]=u;if(!(o&&[Ed,Td].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof f=="function"){var p;(p=r.get(c))==null||p.push(f),s[c]=function(){for(var d,m=arguments.length,v=new Array(m),b=0;b<m;b++)v[b]=arguments[b];return(d=r.get(c))==null?void 0:d.map(S=>S(...v)).find(S=>S!==void 0)}}}else s[c]=f}),s),{})}}function dr(e){e===void 0&&(e=[]);const t=e.map(a=>a==null?void 0:a.reference),n=e.map(a=>a==null?void 0:a.floating),r=e.map(a=>a==null?void 0:a.item),o=w.useCallback(a=>Di(a,e,"reference"),t),l=w.useCallback(a=>Di(a,e,"floating"),n),s=w.useCallback(a=>Di(a,e,"item"),r);return w.useMemo(()=>({getReferenceProps:o,getFloatingProps:l,getItemProps:s}),[o,l,s])}const fr={"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"}},R0=(()=>{const e=new Map;for(const[t,n]of Object.entries(fr)){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})(),P0=(()=>{const e=new Map;for(const[t,n]of Object.entries(fr))n.controlGroup&&(e.has(n.controlGroup)||e.set(n.controlGroup,new Set),e.get(n.controlGroup).add(t));return e})();function I0(){const e={};for(const[t,n]of Object.entries(fr))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 _0(){const e={spacing:[],sizing:[],typography:[],color:[],borders:[],effects:[],layout:[],flexbox:[],gradient:[]},t=new Set;for(const[n,r]of Object.entries(fr)){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,a=>a.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 Gl({prefix:e,currentValue:t,colors:n,locked:r,lockedValue:o,onHover:l,onLeave:s,onClick:a,onRemove:u,onRemoveHover:c}){return i.jsxs("div",{className:"p-2 bg-bv-surface border border-bv-border rounded-md my-2",onMouseLeave:()=>{r||s()},children:[i.jsxs("div",{className:"flex items-center gap-0.5 mb-0.5",children:[i.jsx("span",{className:"w-[52px] text-[10px] text-bv-muted text-right pr-1.5 shrink-0"}),u&&i.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:i.jsxs("svg",{viewBox:"0 0 10 10",width:"14",height:"14",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("line",{x1:"1",y1:"1",x2:"9",y2:"9",stroke:"#F5532D",strokeWidth:"1.8",strokeLinecap:"round"}),i.jsx("line",{x1:"9",y1:"1",x2:"1",y2:"9",stroke:"#F5532D",strokeWidth:"1.8",strokeLinecap:"round"})]})}),["black","white","transparent"].map(f=>n[f]!==void 0?i.jsx(Ad,{prefix:e,colorName:f,colorValue:n[f],isCurrent:f===t,isLocked:o===`${e}${f}`,locked:r,onHover:l,onClick:a},f):null)]}),Ky.map(f=>{const p=n[f];return!p||typeof p!="object"?null:i.jsxs("div",{className:"flex items-center gap-0.5 mb-0.5",children:[i.jsx("span",{className:"w-[52px] text-[10px] text-bv-muted text-right pr-1.5 shrink-0",children:f}),Fy.map(d=>p[d]!==void 0?i.jsx(Ad,{prefix:e,colorName:`${f}-${d}`,colorValue:p[d],isCurrent:`${f}-${d}`===t,isLocked:o===`${e}${f}-${d}`,locked:r,onHover:l,onClick:a},`${f}-${d}`):null)]},f)})]})}function Ad({prefix:e,colorName:t,colorValue:n,isCurrent:r,isLocked:o,locked:l,onHover:s,onClick:a}){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",f=t==="transparent"?{background:"repeating-conic-gradient(#808080 0% 25%, transparent 0% 50%) 50% / 8px 8px"}:{backgroundColor:n};return i.jsx("div",{title:u,className:`w-5 h-5 rounded cursor-pointer border-2 shrink-0 transition-[border-color,transform] ${c}`,style:f,onMouseEnter:()=>{l||s(u)},onClick:p=>{p.stopPropagation(),a(u)}})}const gr=w.forwardRef(function({onClose:t,children:n,...r},o){const l=w.useRef(null);return w.useEffect(()=>{var s;(s=l.current)==null||s.focus({preventScroll:!0})},[]),i.jsx("div",{ref:s=>{l.current=s,typeof o=="function"?o(s):o&&(o.current=s)},tabIndex:-1,onBlur:s=>{var a;(a=l.current)!=null&&a.contains(s.relatedTarget)||t()},onKeyDown:s=>{s.code==="Escape"&&t()},...r,children:n})}),A0=4,L0=10;function Sn({values:e,currentValue:t,lockedValue:n,locked:r,ghost:o,onStart:l,onHover:s,onLeave:a,onClick:u,onRemove:c,onRemoveHover:f}){const[p,d]=w.useState(!1),[m,v]=w.useState(null),b=w.useRef(null),S=w.useRef(null),h=w.useRef(null),g=w.useRef(null),{refs:y,floatingStyles:x}=yn({open:p,strategy:"fixed",placement:"bottom-start",middleware:[pn(2),mn(),hn({padding:4})],whileElementsMounted:fn}),k=n!==null&&e.includes(n),C=m!==null?e[m]:k?n:t;w.useEffect(()=>{var H,_;p&&g.current&&((_=(H=g.current).scrollIntoView)==null||_.call(H,{block:"nearest"}))},[p]);const T=r&&!k;function j(H){if(T)return;l==null||l();const _=k?n:t,F=e.indexOf(_);S.current={startX:H.clientX,startIndex:F>=0?F:0,didScrub:!1},H.currentTarget.setPointerCapture(H.pointerId),H.preventDefault()}function L(H){const _=S.current;if(!_)return;const F=H.clientX-_.startX;if(!_.didScrub&&Math.abs(F)>A0&&(_.didScrub=!0,d(!1)),_.didScrub){const Y=Math.round(F/L0),X=Math.max(0,Math.min(e.length-1,_.startIndex+Y));b.current=X,v(X),s(e[X])}}function I(){const H=S.current;if(!H)return;const _=b.current;H.didScrub&&_!==null?u(e[_]):H.didScrub||d(F=>(F&&a(),!F)),b.current=null,v(null),S.current=null}const D=m!==null,V=D?"bg-bv-teal/9 text-bv-teal ring-1 ring-bv-teal":k?"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":p?"bg-bv-surface-hi text-bv-text ring-1 ring-bv-border":T?"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 i.jsxs("div",{ref:h,className:"relative inline-block",children:[i.jsxs("div",{ref:y.setReference,className:`group select-none px-2 py-0.5 rounded-md text-[11px] font-mono transition-colors ${T?"cursor-default":"cursor-ew-resize"} ${V}`,onPointerDown:j,onPointerMove:L,onPointerUp:I,children:[!T&&i.jsx("span",{className:`inline-block mr-0.5 text-[9px] transition-opacity ${D?"opacity-100":"opacity-0 group-hover:opacity-50"}`,children:"‹"}),C,!T&&i.jsx("span",{className:`inline-block ml-0.5 text-[9px] transition-opacity ${D?"opacity-100":"opacity-0 group-hover:opacity-50"}`,children:"›"})]}),p&&i.jsx(gn,{children:i.jsxs(gr,{ref:y.setFloating,style:x,className:"z-50 max-h-52 overflow-y-auto bg-bv-bg border border-bv-border rounded-md shadow-md min-w-[5rem]",onPointerDown:H=>H.stopPropagation(),onMouseLeave:a,onClose:()=>{d(!1),a()},children:[c&&i.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:f,onClick:H=>{H.stopPropagation(),c(),d(!1)},children:[i.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:[i.jsx("circle",{cx:"6",cy:"6",r:"5.5"}),i.jsx("line",{x1:"4",y1:"4",x2:"8",y2:"8"}),i.jsx("line",{x1:"8",y1:"4",x2:"4",y2:"8"})]}),"remove"]}),e.map(H=>{const _=H===(n??t),F=_?"bg-bv-teal/9 text-bv-teal":"text-bv-text-mid hover:bg-bv-surface hover:text-bv-text";return i.jsx("div",{ref:_?g:void 0,className:`px-2.5 py-[3px] text-[11px] font-mono cursor-pointer ${F}`,onMouseEnter:()=>s(H),onClick:Y=>{Y.stopPropagation(),u(H),d(!1)},children:H},H)})]})})]})}const D0={px:.0625};function Dr(e){return isNaN(Number(e))?D0[e]??1/0:Number(e)}function vr(e,t,n){return t==="spacing"&&(n!=null&&n.spacing)?Object.keys(n.spacing).sort((o,l)=>Dr(o)-Dr(l)).map(o=>`${e}${o}`):t==="fontSize"?[...Ay]:t==="fontWeight"?[...Ly]:t==="borderRadius"?Ma:t==="lineHeight"?[...Dy]:t==="letterSpacing"?[...Oy]:t==="opacity"?My:[]}const O0=4,M0=10;function Wr({placeholder:e,values:t,currentValue:n,displayValue:r,formatValue:o,axis:l="x",disabled:s,onHover:a,onLeave:u,onClick:c,onScrubStart:f,onScrubEnd:p,onOpen:d,onClose:m,onRemove:v,onRemoveHover:b}){const[S,h]=w.useState(!1),[g,y]=w.useState(null),x=w.useRef(null),k=w.useRef(null),C=w.useRef(null),{refs:T,floatingStyles:j}=yn({open:S,strategy:"fixed",placement:"bottom-start",middleware:[pn(4),mn(),hn({padding:4})],whileElementsMounted:fn}),L=n!=null,I=n?t.indexOf(n):-1,D=g!==null?t[g]:null,V=D?o?o(D):D:r??e;w.useEffect(()=>{var P,G;S&&C.current&&((G=(P=C.current).scrollIntoView)==null||G.call(P,{block:"nearest"}))},[S]);function H(P){var J,Ke;if(s)return;P.preventDefault(),P.stopPropagation();const G=I>=0?I:0;x.current={startX:P.clientX,startY:P.clientY,startIndex:G,didScrub:!1},(Ke=(J=P.target).setPointerCapture)==null||Ke.call(J,P.pointerId)}function _(P){const G=x.current;if(!G)return;const J=l==="y"?-(P.clientY-G.startY):P.clientX-G.startX;if(!G.didScrub&&Math.abs(J)>O0&&(G.didScrub=!0,h(!1),f==null||f()),G.didScrub){const Ke=Math.round(J/M0),Re=Math.max(0,Math.min(t.length-1,G.startIndex+Ke));y(Re),a==null||a(t[Re])}}function F(){const P=x.current;P&&(P.didScrub&&g!==null?(c==null||c(t[g]),y(null),x.current=null,p==null||p()):P.didScrub||(y(null),x.current=null,h(G=>G?(m==null||m(),u==null||u(),!1):(d==null||d(),!0))))}const Y=g!==null,E=["bm-slot",L||Y?"bm-has-val":"",Y?"bm-scrubbing":""].filter(Boolean).join(" "),R=s?"default":l==="y"?"ns-resize":"ew-resize";return i.jsxs("span",{ref:P=>{k.current=P,T.setReference(P)},className:E,style:{position:"relative",cursor:R},onPointerDown:H,onPointerMove:_,onPointerUp:F,role:"button",tabIndex:s?-1:0,children:[V,S&&i.jsx(gn,{children:i.jsxs(gr,{ref:T.setFloating,style:j,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),m==null||m(),u==null||u()},children:[v&&i.jsxs("div",{className:"bm-mini-dropdown-item bm-mini-dropdown-remove",tabIndex:-1,onMouseEnter:b,onMouseDown:P=>{P.preventDefault(),v(),h(!1),m==null||m()},children:[i.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:[i.jsx("line",{x1:"1",y1:"1",x2:"9",y2:"9",stroke:"#F5532D",strokeWidth:"1.8",strokeLinecap:"round"}),i.jsx("line",{x1:"9",y1:"1",x2:"1",y2:"9",stroke:"#F5532D",strokeWidth:"1.8",strokeLinecap:"round"})]}),"remove"]}),t.map(P=>{const G=P===n;return i.jsx("div",{ref:G?C:void 0,tabIndex:-1,className:`bm-mini-dropdown-item${G?" bm-active":""}`,onMouseEnter:()=>a==null?void 0:a(P),onMouseDown:J=>{J.preventDefault(),c==null||c(P),h(!1),m==null||m()},onClick:J=>{J.detail===0&&(J.stopPropagation(),c==null||c(P),h(!1),m==null||m())},onKeyDown:J=>{(J.key==="Enter"||J.key===" ")&&(J.preventDefault(),c==null||c(P),h(!1),m==null||m())},children:P},P)})]})})]})}function Ld(e,t){const r={padding:"p",margin:"m",border:"border-",outline:"outline-"}[t];return e.startsWith(r)?e.slice(r.length):e}function $0({value:e,placeholder:t,layer:n,frozen:r,scaleValues:o,axis:l,onClick:s,onValueChange:a,onValueHover:u,onValueLeave:c,onScrubStart:f,onScrubEnd:p,onOpen:d,onClose:m,onValueRemove:v,onValueRemoveHover:b}){const S=e!=null,h=S?Ld(e,n):null;if(o&&o.length>0)return i.jsx(Wr,{placeholder:t,values:o,currentValue:e,displayValue:h,formatValue:y=>Ld(y,n),axis:l,disabled:r,onHover:u,onLeave:c,onClick:a,onScrubStart:f,onScrubEnd:p,onOpen:d,onClose:m,onRemove:v,onRemoveHover:b});const g=`bm-slot${S?" bm-has-val":""}`;return i.jsx("span",{className:g,onClick:r?void 0:y=>s==null?void 0:s(y.currentTarget),role:"button",tabIndex:r?-1:0,children:h??t})}const z0={top:["y","t"],right:["r"],bottom:["b"],left:["x","l"],tr:["color"],bl:["style"],br:["offset"]},K0={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"]},F0={top:"y",bottom:"y",left:"x",right:"x",tr:"x",bl:"x",br:"x"};function H0({layer:e,classState:t,shorthandValue:n,shorthandScaleValues:r,slots:o,isHovered:l,frozen:s,onHoverChange:a,onSlotClick:u,onSlotChange:c,onSlotHover:f,onScrubStart:p,onScrubEnd:d,onSlotOpen:m,onSlotClose:v,onSlotRemove:b,onSlotRemoveHover:S,children:h}){const g=`bm-layer bm-${e}${l?" bm-hovered":""}`,[y,x]=w.useState(null),k=new Map(o.map(V=>[V.key,V])),C=(t==="shorthand"||t==="mixed")&&n,T=r&&r.length>0?i.jsx("span",{className:"bm-name bm-name-scrubber",children:i.jsx(Wr,{placeholder:e,values:r,currentValue:C?n:null,displayValue:C?n:null,formatValue:V=>V,axis:"x",disabled:s,onHover:V=>f==null?void 0:f("shorthand",V),onLeave:()=>f==null?void 0:f("shorthand",null),onClick:V=>c==null?void 0:c("shorthand",V),onScrubStart:()=>{p==null||p()},onScrubEnd:d,onOpen:()=>{x("__shorthand__"),m==null||m()},onClose:()=>{x(null),v==null||v()},onRemove:b?()=>b("shorthand"):void 0,onRemoveHover:S?()=>S("shorthand"):void 0})}):C?i.jsx("span",{className:"bm-name",children:i.jsx("span",{className:"bm-val",onClick:V=>u==null?void 0:u("shorthand",V.currentTarget),children:n})}):i.jsx("span",{className:"bm-name",children:e}),L=(K0[e]??[]).map(V=>{const _=(z0[V]??[]).map(R=>k.get(R)).filter(R=>R!=null);if(_.length===0)return null;const F=_.some(R=>R.value!=null),X=`bm-slot-group bm-sg-${V}${F?" bm-has-values":""}${y===V?" bm-sg-active":""}`,E=F0[V];return i.jsx("div",{className:X,children:_.map(R=>i.jsx($0,{slotKey:R.key,value:R.value,placeholder:R.placeholder,layer:e,isExpanded:l,frozen:s,scaleValues:R.scaleValues,axis:E,onClick:P=>u==null?void 0:u(R.key,P),onValueChange:c?P=>c(R.key,P):void 0,onValueHover:f?P=>f(R.key,P):void 0,onValueLeave:f?()=>f(R.key,null):void 0,onScrubStart:p,onScrubEnd:d,onOpen:()=>{x(V),m==null||m()},onClose:()=>{x(null),v==null||v()},onValueRemove:b?()=>b(R.key):void 0,onValueRemoveHover:S?()=>S(R.key):void 0},R.key))},V)}),I=V=>{V.stopPropagation(),s||a(!0)},D=V=>{const H=V.relatedTarget,_=V.currentTarget;H&&_.contains(H)||s||a(!1)};return i.jsxs("div",{className:g,onMouseOver:I,onMouseOut:D,"data-layer":e,children:[T,L,h]})}const Dd=["margin","outline","border","padding"];function W0({layers:e,frozen:t=!1,onSlotClick:n,onSlotChange:r,onSlotHover:o,onSlotRemove:l,onSlotRemoveHover:s,onEditStart:a}){const[u,c]=w.useState(null),[f,p]=w.useState(null),d=t||f!==null,m=new Map(e.map(y=>[y.layer,y])),v=(y,x)=>{d||c(x?y:null)},b=(y,x,k)=>{d||n==null||n(y,x,k)};let h=i.jsx("div",{className:"bm-content"});for(let y=Dd.length-1;y>=0;y--){const x=Dd[y],k=m.get(x);k&&(h=i.jsx(H0,{layer:k.layer,classState:k.classState,shorthandValue:k.shorthandValue,shorthandScaleValues:k.shorthandScaleValues,slots:k.slots,isHovered:u===x||f===x,frozen:d,onHoverChange:C=>v(x,C),onSlotClick:(C,T)=>b(x,C,T),onSlotChange:r?(C,T)=>r(x,C,T):void 0,onSlotHover:o?(C,T)=>o(x,C,T):void 0,onSlotRemove:l?C=>l(x,C):void 0,onSlotRemoveHover:s?C=>s(x,C):void 0,onScrubStart:()=>{p(x),a==null||a()},onScrubEnd:()=>p(null),onSlotOpen:()=>{p(x),a==null||a()},onSlotClose:()=>p(null),children:h}))}const g=`bm-root${d?" bm-frozen":""}`;return i.jsx("div",{className:g,children:h})}const B0={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"}},V0=["y","t","r","b","x","l"];function U0(e){const t=V0.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 G0(e,t){const n=B0[e],r=U0(e),o=t[n.shorthand]??null,l=o!=null?o===""?n.shorthand:`${n.shorthand}-${o}`:null,s=r.map(({key:d,placeholder:m})=>{let v;if(d==="color"){const h=e==="outline"?"outline-color":"border-color";v=h in t?h:void 0}else if(d==="style"){const h=e==="outline"?"outline-style":"border-style";v=h in t?h:void 0}else d==="offset"?v="outline-offset"in t?"outline-offset":void 0:v=n[d];const b=v?t[v]??null:null;let S;return(d==="color"||d==="style")&&b!=null?S=`${e==="outline"?"outline":"border"}-${b}`:S=b!=null&&v?`${v}-${b}`:null,{key:d,value:S,placeholder:m}}),a=l!=null,u=s.some(d=>(d.key==="x"||d.key==="y")&&d.value!=null),c=s.some(d=>(d.key==="t"||d.key==="r"||d.key==="b"||d.key==="l")&&d.value!=null),f=u||c;let p;return!a&&!f?p="none":a&&!f?p="shorthand":!a&&u&&!c?p="axis":a?p="mixed":p="individual",{layer:e,classState:p,shorthandValue:l,slots:s}}function Y0(e,t,n){var s,a,u;if(t==="color")return[];if(t==="style"){const c=e==="outline"?"outline":"border";return zy.map(f=>`${c}-${f}`)}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,f)=>Dr(c)-Dr(f)):$a:r=(a=n==null?void 0:n.theme)!=null&&a.borderWidth?Object.keys(n.theme.borderWidth):ah:r=(u=n==null?void 0:n.theme)!=null&&u.spacing?Object.keys(n.theme.spacing).sort((c,f)=>Dr(c)-Dr(f)):$a;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 br(e,t){const n={};for(const s of e){let a;s.color!==void 0?a=`${s.property}-color`:s.style!==void 0?a=`${s.property}-style`:s.side!==void 0?a=s.property.length<=2?s.property+s.side:`${s.property}-${s.side}`:a=s.property;const u=s.scale??s.color??s.style??s.align??s.size??s.value??"";n[a]=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 p,d;const a=G0(s,n),u=a.slots.map(m=>{const v=Y0(s,m.key,t);return v.length>0?{...m,scaleValues:v}:m}),f=(o[s]?(p=t==null?void 0:t.theme)!=null&&p.borderWidth?Object.keys(t.theme.borderWidth):ah:(d=t==null?void 0:t.theme)!=null&&d.spacing?Object.keys(t.theme.spacing):$a).map(m=>m===""?r[s]:`${r[s]}-${m}`);return{...a,slots:u,shorthandScaleValues:f}})}const Q0={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]},X0={tl:"x",t:"x",tr:"x",l:"y",all:"x",r:"y",bl:"x",b:"x",br:"x"};function Oi(e){return e==="rounded"?"—":e.replace(/^rounded-/,"").replace(/^(?:tl|tr|br|bl|[trbl])-/,"")}function Z0({slot:e,frozen:t,isActive:n,onSlotClick:r,onSlotChange:o,onSlotHover:l,onSlotRemove:s,onSlotRemoveHover:a,onScrubStart:u,onScrubEnd:c,onOpen:f,onClose:p}){const[d,m]=Q0[e.key],v=e.value!=null,b=`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:d,gridColumn:m},g=X0[e.key];return e.scaleValues&&e.scaleValues.length>0?i.jsx("div",{className:S,style:h,children:i.jsx(Wr,{placeholder:e.placeholder,values:e.scaleValues,currentValue:e.value,displayValue:v?Oi(e.value):null,formatValue:Oi,axis:g,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:()=>f(e.key),onClose:p,onRemove:s?()=>s(e.key):void 0,onRemoveHover:a?()=>a(e.key):void 0})}):i.jsx("div",{className:S,style:h,children:i.jsx("span",{className:b,role:"button",tabIndex:t?-1:0,onClick:t?void 0:y=>r(e.key,y.currentTarget),children:v?Oi(e.value):e.placeholder})})}function J0({state:e,frozen:t=!1,onSlotClick:n,onSlotChange:r,onSlotHover:o,onSlotRemove:l,onSlotRemoveHover:s,onEditStart:a}){const[u,c]=w.useState(null),f=t||u!==null,p=new Map(e.slots.map(b=>[b.key,b])),d=p.get("all")??{key:"all",value:e.shorthandValue,placeholder:"all",scaleValues:e.shorthandScaleValues},m=["tl","t","tr","l","all","r","bl","b","br"],v=`cm-root${f?" cm-frozen":""}${u?" cm-active":""}`;return i.jsx("div",{className:v,children:i.jsx("div",{className:"cm-grid",children:m.map(b=>{const S=b==="all"?d:p.get(b)??{key:b,value:null,placeholder:b,scaleValues:void 0};return i.jsx(Z0,{slot:S,frozen:f,isActive:u===b,onSlotClick:(h,g)=>n==null?void 0:n(h,g),onSlotChange:(h,g)=>r==null?void 0:r(h,g),onSlotHover:(h,g)=>o==null?void 0:o(h,g),onSlotRemove:l,onSlotRemoveHover:s,onScrubStart:h=>{c(h),a==null||a()},onScrubEnd:()=>c(null),onOpen:h=>{c(h),a==null||a()},onClose:()=>c(null)},b)})})})}function Od({label:e,availableProperties:t=[],onAddProperty:n,isEmpty:r=!1,classCount:o=0,children:l}){const[s,a]=w.useState(!1),[u,c]=w.useState(r),f=w.useRef(r),p=w.useRef(null);w.useEffect(()=>{f.current&&!r&&c(!1),f.current=r},[r]),w.useEffect(()=>{if(!s)return;function m(v){p.current&&!p.current.contains(v.target)&&a(!1)}return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[s]);function d(m){n==null||n(m),a(!1)}return i.jsxs("div",{className:"px-4 py-3",children:[i.jsxs("div",{className:"group/sec flex items-center gap-1.5 cursor-pointer select-none",onClick:()=>c(m=>!m),children:[i.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:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 5l7 7-7 7"})}),i.jsx("span",{className:"text-[10px] font-semibold text-bv-text",children:e}),u&&o>0&&i.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&&i.jsxs("div",{ref:p,className:"relative ml-auto",children:[i.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:m=>{m.stopPropagation(),a(v=>!v)},children:i.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M12 5v14m-7-7h14"})})}),s&&i.jsx(gr,{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:()=>a(!1),children:t.map(m=>i.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:()=>d(m.prefix),children:[m.name,i.jsx("span",{className:"font-mono text-[10px] text-bv-muted group-hover:text-bv-teal/60",children:m.prefixHint})]},m.prefix))})]})]}),i.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?i.jsxs("div",{className:"text-[10px] text-bv-muted italic mt-2",children:["No ",e.toLowerCase()," classes — click + to add"]}):i.jsx("div",{className:"flex flex-wrap gap-1 mt-2.5",children:l})})]})}const q0=[{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 e1({direction:e,mode:t,onHover:n,onLeave:r,onDirectionClick:o,onSolidClick:l,solidColorName:s}){const a=t==="solid";return i.jsxs("div",{className:"flex flex-col items-center shrink-0",children:[i.jsx("div",{className:"grid grid-cols-3 gap-0.5",onMouseLeave:r,children:q0.map((u,c)=>{if(u==="center"){const p=a;return i.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
|
+
${p?"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 f=!a&&e===u.dir;return i.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
|
+
${a?"opacity-35 hover:opacity-100":""}
|
|
59
|
+
${f?"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)})}),i.jsx("div",{className:"text-[10px] font-mono text-bv-text-mid mt-0.75 max-w-[68px] truncate text-center",children:a?s?i.jsx("span",{className:"text-bv-text font-bold",children:s}):i.jsx("span",{className:"text-bv-muted italic",children:"none"}):i.jsxs("span",{children:["to-",i.jsx("span",{className:"text-bv-teal font-bold",children:e})]})})]})}function t1(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 Mi(e){return Math.round(Math.max(0,Math.min(100,e))/5)*5}function n1({stop:e,isEndpoint:t,isSelected:n,onDragStart:r,onClick:o,onRemove:l}){const s=w.useRef(!1),a=w.useCallback(p=>{p.preventDefault(),p.stopPropagation(),s.current=!1,r(e.id,p.clientX);const d=()=>{s.current=!0},m=()=>{document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",m)};document.addEventListener("mousemove",d),document.addEventListener("mouseup",m)},[e.id,r]),u=w.useCallback(p=>{p.stopPropagation(),s.current||o(e.id,p.currentTarget)},[e.id,o]),c=w.useCallback(p=>{p.stopPropagation(),l(e.id)},[e.id,l]),f=e.position??0;return i.jsxs("div",{className:`absolute top-0 cursor-grab select-none z-10
|
|
60
|
+
hover:z-20
|
|
61
|
+
${n?"z-25":""}`,style:{left:`${f}%`,transform:"translateX(-50%)",width:22,height:26,filter:"drop-shadow(0 1px 2px rgba(0,0,0,0.2))"},onMouseDown:a,onClick:u,title:`${e.role}-${e.colorName}${e.position!=null?` ${e.position}%`:""}`,children:[i.jsx("svg",{viewBox:"0 0 22 26",width:22,height:26,xmlns:"http://www.w3.org/2000/svg",children:i.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&&i.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:p=>p.stopPropagation(),children:"×"})]})}function r1({stops:e,direction:t,onStopDrag:n,onStopDragEnd:r,onStopClick:o,onBarClick:l,onStopRemove:s,selectedStopId:a}){const u=w.useRef(null),c=w.useRef(null),f=[...e].sort((v,b)=>(v.position??0)-(b.position??0)),p=w.useCallback((v,b)=>{const S=e.find(y=>y.id===v);if(!S)return;c.current={stopId:v,startX:b,startPos:S.position??0};const h=y=>{const x=c.current;if(!x||!u.current)return;const k=u.current.getBoundingClientRect(),T=(y.clientX-x.startX)/k.width*100,j=Mi(x.startPos+T);n(x.stopId,j)},g=y=>{document.removeEventListener("mousemove",h),document.removeEventListener("mouseup",g);const x=c.current;if(x&&u.current){const k=u.current.getBoundingClientRect(),T=(y.clientX-x.startX)/k.width*100,j=Mi(x.startPos+T);r(x.stopId,j)}c.current=null};document.addEventListener("mousemove",h),document.addEventListener("mouseup",g)},[e,n,r]),d=w.useCallback(v=>{if(!u.current)return;const b=u.current.getBoundingClientRect(),S=(v.clientX-b.left)/b.width*100;l(Mi(S))},[l]),m=t1(f,t);return i.jsxs("div",{className:"relative flex-1 min-w-0",style:{paddingTop:28},children:[f.map((v,b)=>i.jsx(n1,{stop:v,isEndpoint:b===0||b===f.length-1,isSelected:v.id===a,onDragStart:p,onClick:o,onRemove:s},v.id)),i.jsx("div",{ref:u,className:"h-9 rounded-md cursor-pointer relative",style:{background:m,border:"1px solid rgba(0,0,0,0.08)",boxShadow:"inset 0 1px 2px rgba(0,0,0,0.06)"},onClick:d,children:i.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 o1={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 l1(e){var Bt,Bn;const{direction:t,stops:n,mode:r,solidColorName:o,solidColorHex:l,onPreview:s,onPreviewBatch:a,onRevert:u,onStage:c}=e,[f,p]=w.useState(t),[d,m]=w.useState(n),[v,b]=w.useState(r),[S,h]=w.useState(o),[g,y]=w.useState(l),[x,k]=w.useState(null),[C,T]=w.useState(!1),[j,L]=w.useState(null),[I,D]=w.useState(null),V=w.useRef(n.length+1),H=w.useCallback(re=>{if(v==="gradient")s(`bg-gradient-to-${f}`,`bg-gradient-to-${re}`);else{const se=S??"slate-500",ae=S?`bg-${S}`:"";a([{oldClass:ae,newClass:`bg-gradient-to-${re}`},{oldClass:"",newClass:`from-${se}`},{oldClass:"",newClass:`to-${se}`}])}},[f,v,S,s,a]),_=w.useCallback(()=>{u()},[u]),F=w.useCallback(re=>{if(p(re),b("gradient"),v==="gradient"&&d.length>=2){const se=`bg-gradient-to-${f}`,ae=`bg-gradient-to-${re}`;c(se,ae)}else{const se=S??"slate-500",ae=g??er(se,e.colors),N={id:"1",role:"from",colorName:se,hex:ae,position:0},M={id:"2",role:"to",colorName:se,hex:ae,position:100};V.current=3,m([N,M]);const z=S?`bg-${S}`:"";c(z,`bg-gradient-to-${re}`),c("",`from-${se}`),c("",`to-${se}`)}},[f,v,d,S,g,e.colors,c]),Y=w.useCallback(()=>{b("solid"),T(!1),k(null),L(null),d.length>0&&!S&&(h(d[0].colorName),y(d[0].hex))},[d,S]),X=w.useCallback((re,se)=>{m(N=>N.map(M=>M.id===re?{...M,position:se}:M));const ae=d.find(N=>N.id===re);if(ae){const N=ae.position!=null?`${ae.role}-${ae.position}%`:"",M=`${ae.role}-${se}%`;s(N,M)}},[d,s]),E=w.useCallback((re,se)=>{m(N=>N.map(M=>M.id===re?{...M,position:se}:M));const ae=d.find(N=>N.id===re);if(ae){const N=ae.position!=null?`${ae.role}-${ae.position}%`:"",M=`${ae.role}-${se}%`;c(N,M)}},[d,c]),R=w.useCallback((re,se)=>{x===re&&C?(k(null),T(!1),L(null),D(null)):(k(re),T(!0),L("stop"),D(se))},[x,C]),P=w.useCallback(re=>{const se=String(V.current++),ae=[...d].sort((z,ee)=>(z.position??0)-(ee.position??0));let N=ae[0];for(const z of ae)(z.position??0)<=re&&(N=z);const M={id:se,role:"via",colorName:(N==null?void 0:N.colorName)??"gray-500",hex:(N==null?void 0:N.hex)??"#6B7280",position:re};m(z=>[...z,M]),k(se),T(!0),L("stop")},[d]),G=w.useCallback(re=>{const se=d.find(N=>N.id===re);if(!se)return;const ae=d.filter(N=>N.id!==re);if(k(null),T(!1),L(null),D(null),ae.length>=2)m(ae),c(`${se.role}-${se.colorName}`,"");else if(ae.length===1){const N=ae[0];m([]),b("solid"),h(N.colorName),y(N.hex),c(`bg-gradient-to-${f}`,""),d.forEach(M=>c(`${M.role}-${M.colorName}`,"")),c("",`bg-${N.colorName}`)}else m([]),b("none"),h(null),y(null),c(`bg-gradient-to-${f}`,""),d.forEach(N=>c(`${N.role}-${N.colorName}`,""))},[d,f,c]),J=w.useCallback(re=>{T(!0),L("solid"),k(null),D(re)},[]),Ke=w.useCallback(()=>{s(S?`bg-${S}`:"","")},[S,s]),Re=w.useCallback(()=>{S&&c(`bg-${S}`,""),h(null),y(null),T(!1),L(null),D(null)},[S,c]),ye=w.useCallback(re=>{if(j==="stop"&&x){const se=d.find(ae=>ae.id===x);se&&s(`${se.role}-${se.colorName}`,re)}else j==="solid"&&s(`bg-${S}`,re)},[j,x,d,S,s]),de=w.useCallback(()=>{u()},[u]),O=w.useCallback(re=>{if(j==="stop"&&x){const se=d.find(ae=>ae.id===x);if(se){const ae=se.role+"-",N=re.startsWith(ae)?re.slice(ae.length):re;m(M=>M.map(z=>z.id===x?{...z,colorName:N,hex:er(N,e.colors)}:z)),c(`${se.role}-${se.colorName}`,`${se.role}-${N}`),T(!1),k(null),L(null),D(null)}}else if(j==="solid"){const se="bg-",ae=re.startsWith(se)?re.slice(se.length):re,N=S?`bg-${S}`:"";h(ae),y(er(ae,e.colors)),c(N,`bg-${ae}`),T(!1),L(null),D(null)}},[j,x,d,S,c,e.colors]),Q=w.useCallback(()=>{T(!1),k(null),L(null),D(null),u()},[u]),nt=j==="stop"&&x?(((Bt=d.find(re=>re.id===x))==null?void 0:Bt.role)??"from")+"-":"bg-",q=j==="stop"&&x?((Bn=d.find(re=>re.id===x))==null?void 0:Bn.colorName)??"":S??"",yt=o1[f],oo=!!(x?d.find(re=>re.id===x):null);return{direction:f,stops:d,mode:v,solidColorName:S,solidColorHex:g,selectedStopId:x,colorPickerOpen:C,editingTarget:j,anchorEl:I,colorPrefix:nt,colorPickerCurrentValue:q,directionCSS:yt,selectedStopIsRemovable:oo,handleDirectionHover:H,handleDirectionLeave:_,handleDirectionClick:F,handleSolidToggle:Y,handleStopDrag:X,handleStopDragEnd:E,handleStopClick:R,handleBarClick:P,handleStopRemove:G,handleSwatchClick:J,handleHoverRemoveSolid:Ke,handleRemoveSolid:Re,handleColorHover:ye,handleColorLeave:de,handleColorClick:O,handleCloseColorPicker:Q}}function er(e,t){if(console.log(`[resolveColorHex] Looking up colorName="${e}", available top-level keys:`,Object.keys(t).join(", ")),typeof t[e]=="string")return console.log(`[resolveColorHex] Found direct match: colors["${e}"] = "${t[e]}"`),t[e];if(t[e]&&typeof t[e]=="object"&&typeof t[e].DEFAULT=="string")return console.log(`[resolveColorHex] Found DEFAULT match: colors["${e}"].DEFAULT = "${t[e].DEFAULT}"`),t[e].DEFAULT;const n=e.lastIndexOf("-");if(n>0){const r=e.slice(0,n),o=e.slice(n+1);if(console.log(`[resolveColorHex] Trying hue="${r}" shade="${o}", colors["${r}"] =`,typeof t[r],t[r]?Object.keys(t[r]).slice(0,5).join(", "):"undefined"),t[r]&&typeof t[r][o]=="string")return console.log(`[resolveColorHex] Found hue-shade match: colors["${r}"]["${o}"] = "${t[r][o]}"`),t[r][o]}return console.warn(`[resolveColorHex] FALLBACK #888888 for colorName="${e}" — color not found in config`),"#888888"}function s1(e){const t=l1(e),n=t.mode==="solid",{refs:r,floatingStyles:o,context:l}=yn({open:t.colorPickerOpen,onOpenChange:u=>{u||t.handleCloseColorPicker()},strategy:"fixed",placement:"bottom-start",middleware:[pn(4),mn(),hn({padding:8}),Ua({apply({availableHeight:u,elements:c}){Object.assign(c.floating.style,{maxHeight:`${u}px`})},padding:8})],whileElementsMounted:fn}),s=cr(l),{getFloatingProps:a}=dr([s]);return w.useEffect(()=>{t.anchorEl&&r.setReference(t.anchorEl)},[t.anchorEl]),i.jsxs("div",{className:"group",children:[i.jsxs("div",{className:"flex items-start gap-2.5 mb-2",children:[i.jsx(e1,{direction:t.direction,mode:t.mode,onHover:t.handleDirectionHover,onLeave:t.handleDirectionLeave,onDirectionClick:t.handleDirectionClick,onSolidClick:t.handleSolidToggle,solidColorName:t.solidColorName}),n?i.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&&i.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:[i.jsx("line",{x1:"4",y1:"4",x2:"96",y2:"96",stroke:"#F5532D",strokeWidth:"3",strokeLinecap:"round"}),i.jsx("line",{x1:"96",y1:"4",x2:"4",y2:"96",stroke:"#F5532D",strokeWidth:"3",strokeLinecap:"round"})]})}):i.jsx(r1,{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&&i.jsx(gn,{children:i.jsxs("div",{ref:r.setFloating,style:{...o,zIndex:9999,overflowY:"auto"},...a(),children:[i.jsx(Gl,{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&&i.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"})]})}),i.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 i1(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-")),a=(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,f=(c==null?void 0:c.split("/")[0])??null,p=f?er(f,t):null,d=Array.from(r.keys()),m=d.filter(x=>x.startsWith("from-")),v=d.filter(x=>x.startsWith("via-")),b=d.filter(x=>x.startsWith("to-")),S=!!(l||m.length>0&&b.length>0),h=S?"gradient":"solid",g=[];if(S){let x=1;for(const k of m){const C=k.replace("from-",""),T=C.split("/")[0];g.push({id:String(x++),role:"from",colorName:C,hex:er(T,t),position:null})}for(const k of v){const C=k.replace("via-",""),T=C.split("/")[0];g.push({id:String(x++),role:"via",colorName:C,hex:er(T,t),position:null})}for(const k of b){const C=k.replace("to-",""),T=C.split("/")[0];g.push({id:String(x++),role:"to",colorName:C,hex:er(T,t),position:null})}}return{direction:a,stops:g,mode:h,solidColorName:c,solidColorHex:p,colors:t}}const ze="#00848B",pr="rgba(0,132,139,0.18)",a1="#F5532D",Ct="#4a4a4a",Kn="#333333",Oe="#999999",qe="'Roboto Mono', 'Menlo', ui-monospace, monospace",Ft={width:60,height:60,borderRadius:5,borderWidth:"1.5px",borderStyle:"solid",borderColor:Ct,background:Kn,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"},Ga={background:ze,opacity:.65,borderRadius:2,flexShrink:0,transition:"opacity 150ms ease-in-out"},Md={...Ga,opacity:.9},zh={flexShrink:0,background:a1,opacity:.18,borderRadius:1,transition:"opacity 150ms ease-in-out"},u1={...zh,opacity:.38};function Xt({label:e,isActive:t,containerStyle:n,onClick:r,onHover:o,children:l}){const[s,a]=w.useState(!1),u=t||s,c={...Ft,borderColor:u?ze:Ct,background:u?pr:Kn,boxShadow:t?"0 0 0 2px rgba(0,132,139,0.35)":"none",...n};return i.jsxs("div",{className:"cursor-pointer",style:{display:"flex",flexDirection:"column",alignItems:"center",gap:3},onMouseEnter:()=>{a(!0),o==null||o()},onMouseLeave:()=>a(!1),onClick:r,children:[i.jsx("div",{style:c,children:l(u)}),i.jsx("span",{style:{fontSize:9,fontFamily:qe,color:u?ze:Oe,fontWeight:u?600:400,textAlign:"center",transition:"color 150ms ease-in-out"},children:e})]})}const $i=[{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 Kh({direction:e,color:t}){const n={stroke:t,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round",fill:"none"};switch(e){case"flex-row":return i.jsxs("svg",{width:"30",height:"30",viewBox:"0 0 30 30",children:[i.jsx("line",{x1:"5",y1:"15",x2:"25",y2:"15",...n}),i.jsx("polyline",{points:"19,9 25,15 19,21",...n})]});case"flex-col":return i.jsxs("svg",{width:"30",height:"30",viewBox:"0 0 30 30",children:[i.jsx("line",{x1:"15",y1:"5",x2:"15",y2:"25",...n}),i.jsx("polyline",{points:"9,19 15,25 21,19",...n})]});case"flex-row-reverse":return i.jsxs("svg",{width:"30",height:"30",viewBox:"0 0 30 30",children:[i.jsx("line",{x1:"25",y1:"15",x2:"5",y2:"15",...n}),i.jsx("polyline",{points:"11,9 5,15 11,21",...n})]});case"flex-col-reverse":return i.jsxs("svg",{width:"30",height:"30",viewBox:"0 0 30 30",children:[i.jsx("line",{x1:"15",y1:"25",x2:"15",y2:"5",...n}),i.jsx("polyline",{points:"9,11 15,5 21,11",...n})]})}}function c1({currentValue:e,lockedValue:t,locked:n,onHover:r,onLeave:o,onClick:l}){const[s,a]=w.useState(!1),{refs:u,floatingStyles:c,context:f}=yn({open:s,onOpenChange:C=>{C||(a(!1),o())},strategy:"fixed",placement:"bottom-start",middleware:[pn(4),mn(),hn({padding:8})],whileElementsMounted:fn}),p=cr(f),{getReferenceProps:d,getFloatingProps:m}=dr([p]),v=t!==null&&$i.some(C=>C.value===t),b=n&&!v,S=v?t:e??"",h=$i.find(C=>C.value===S),g=!h;function y(){a(!1),o()}function x(){b||a(C=>(C&&o(),!C))}const k=g?{...Ft,borderStyle:"dashed",borderColor:s?ze:Ct,background:s?pr:"transparent",alignItems:"center",justifyContent:"center",cursor:b?"default":"pointer"}:{...Ft,borderColor:s?ze:Ct,background:s?pr:Kn,boxShadow:s?"0 0 0 2px rgba(0,132,139,0.18)":"none",alignItems:"center",justifyContent:"center",cursor:b?"default":"pointer"};return i.jsxs("div",{style:{display:"inline-flex",flexDirection:"column",gap:2},children:[i.jsx("span",{style:{fontSize:9,fontFamily:qe,color:Oe,textTransform:"uppercase",letterSpacing:"0.05em"},children:"Direction"}),i.jsxs("div",{ref:u.setReference,role:"button",tabIndex:b?-1:0,"aria-label":"Direction",style:{display:"flex",flexDirection:"column",alignItems:"center",gap:3},onKeyDown:C=>{(C.key==="Enter"||C.key===" ")&&x()},onClick:x,...d(),children:[i.jsx("div",{style:k,children:h?i.jsx(Kh,{direction:h.value,color:s?ze:Oe}):i.jsx("span",{style:{fontSize:10,fontFamily:qe,color:Oe},children:"—"})}),i.jsx("span",{style:{fontSize:9,fontFamily:qe,color:s?ze:Oe,fontWeight:s?600:400,textAlign:"center",transition:"color 150ms ease-in-out"},children:(h==null?void 0:h.label)??"—"})]}),s&&i.jsx(gn,{children:i.jsx("div",{ref:u.setFloating,style:c,className:"z-[9999]",...m(),children:i.jsx(gr,{style:{background:"#1e1e1e",border:`1px solid ${Ct}`,borderRadius:8,boxShadow:"0 4px 16px rgba(0,0,0,0.35)",padding:8},onMouseLeave:o,onClose:y,children:i.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 60px)",gap:4},children:$i.map(C=>{const T=C.value===S;return i.jsx(d1,{option:C,isActive:T,onHover:()=>r(C.value),onClick:()=>{l(C.value),y()}},C.value)})})})})})]})}function d1({option:e,isActive:t,onHover:n,onClick:r}){const[o,l]=w.useState(!1),s=t||o,a={...Ft,borderColor:s?ze:Ct,background:s?pr:Kn,boxShadow:t?"0 0 0 2px rgba(0,132,139,0.35)":"none",alignItems:"center",justifyContent:"center"};return i.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:3,cursor:"pointer"},onMouseEnter:()=>{l(!0),n()},onMouseLeave:()=>l(!1),onClick:r,children:[i.jsx("div",{style:a,children:i.jsx(Kh,{direction:e.value,color:s?ze:Oe})}),i.jsx("span",{style:{fontSize:9,fontFamily:qe,color:s?ze:Oe,fontWeight:s?600:400,textAlign:"center",transition:"color 150ms ease-in-out"},children:e.label})]})}const zi=[{value:"flex-nowrap",label:"no-wrap"},{value:"flex-wrap",label:"wrap"},{value:"flex-wrap-reverse",label:"wrap-reverse"}],f1=e=>({stroke:e,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round",fill:"none"});function Fh({mode:e,color:t}){const n=f1(t),r={...n,strokeDasharray:"2 3"};return e==="flex-nowrap"?i.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 40 40",children:[i.jsx("line",{x1:"3",y1:"7",x2:"37",y2:"7",...n}),i.jsx("polyline",{points:"31,1 37,7 31,13",...n})]}):e==="flex-wrap"?i.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 40 40",children:[i.jsx("line",{x1:"3",y1:"7",x2:"37",y2:"7",...n}),i.jsx("line",{x1:"37",y1:"7",x2:"3",y2:"33",...r}),i.jsx("line",{x1:"3",y1:"33",x2:"37",y2:"33",...n}),i.jsx("polyline",{points:"31,27 37,33 31,39",...n})]}):i.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 40 40",children:[i.jsx("line",{x1:"3",y1:"33",x2:"37",y2:"33",...n}),i.jsx("line",{x1:"37",y1:"33",x2:"3",y2:"7",...r}),i.jsx("line",{x1:"3",y1:"7",x2:"37",y2:"7",...n}),i.jsx("polyline",{points:"31,1 37,7 31,13",...n})]})}function p1({option:e,isActive:t,onHover:n,onClick:r}){const[o,l]=w.useState(!1),s=t||o,a={...Ft,borderColor:s?ze:Ct,background:s?pr:Kn,boxShadow:t?"0 0 0 2px rgba(0,132,139,0.35)":"none",alignItems:"center",justifyContent:"center"};return i.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:3,cursor:"pointer"},onMouseEnter:()=>{l(!0),n()},onMouseLeave:()=>l(!1),onClick:r,children:[i.jsx("div",{style:a,children:i.jsx(Fh,{mode:e.value,color:s?ze:Oe})}),i.jsx("span",{style:{fontSize:9,fontFamily:qe,color:s?ze:Oe,fontWeight:s?600:400,textAlign:"center",transition:"color 150ms ease-in-out"},children:e.label})]})}function h1({currentValue:e,lockedValue:t,locked:n,onHover:r,onLeave:o,onClick:l}){const[s,a]=w.useState(!1),{refs:u,floatingStyles:c,context:f}=yn({open:s,onOpenChange:C=>{C||(a(!1),o())},strategy:"fixed",placement:"bottom-start",middleware:[pn(4),mn(),hn({padding:8})],whileElementsMounted:fn}),p=cr(f),{getReferenceProps:d,getFloatingProps:m}=dr([p]),v=t!==null&&zi.some(C=>C.value===t),b=n&&!v,S=!v&&e===null,h=v?t:e??"",g=zi.find(C=>C.value===h),y=(g==null?void 0:g.label)??"Wrap";function x(){a(!1),o()}function k(){b||a(C=>(C&&o(),!C))}return i.jsxs("div",{style:{display:"inline-flex",flexDirection:"column",gap:2},children:[i.jsx("span",{style:{fontSize:9,fontFamily:qe,color:Oe,textTransform:"uppercase",letterSpacing:"0.05em"},children:"Wrap"}),i.jsxs("div",{ref:u.setReference,role:"button",tabIndex:b?-1:0,"aria-label":"Wrap",style:{display:"flex",flexDirection:"column",alignItems:"center",gap:3},onKeyDown:C=>{(C.key==="Enter"||C.key===" ")&&k()},onClick:k,...d(),children:[S?i.jsx("div",{style:{...Ft,borderStyle:"dashed",borderColor:s?ze:Ct,background:s?pr:"transparent",alignItems:"center",justifyContent:"center"},children:i.jsx("span",{style:{fontSize:10,fontFamily:qe,color:Oe},children:"—"})}):i.jsx("div",{style:{...Ft,borderColor:s?ze:Ct,background:s?pr:Kn,boxShadow:s?"0 0 0 2px rgba(0,132,139,0.18)":"none",alignItems:"center",justifyContent:"center"},children:i.jsx(Fh,{mode:h,color:s?ze:Oe})}),i.jsx("span",{style:{fontSize:9,fontFamily:qe,color:s?ze:Oe,fontWeight:s?600:400,textAlign:"center",transition:"color 150ms ease-in-out"},children:y})]}),s&&i.jsx(gn,{children:i.jsx("div",{ref:u.setFloating,style:c,className:"z-[9999]",...m(),children:i.jsx(gr,{style:{background:"#1e1e1e",border:`1px solid ${Ct}`,borderRadius:8,boxShadow:"0 4px 16px rgba(0,0,0,0.35)",padding:8},onMouseLeave:o,onClose:x,children:i.jsx("div",{className:"grid gap-1",style:{gridTemplateColumns:"repeat(3, 60px)"},children:zi.map(C=>{const T=C.value===h;return i.jsx(p1,{option:C,isActive:T,onHover:()=>r(C.value),onClick:()=>{l(C.value),x()}},C.value)})})})})})]})}function m1({flexDirection:e="row",activeValue:t,onSelect:n,onHover:r}){const o=e.startsWith("column"),l=e;function s(d,m){const v=m?Md:Ga;return o?{...v,width:"100%",height:d}:{...v,width:d,height:"100%"}}function a(d){const m=d?Md:Ga;return o?{...m,flex:1,width:"100%"}:{...m,flex:1,height:"100%"}}function u(d,m){return{...m?u1:zh,flex:d}}const c=d=>t===d,f=d=>()=>n==null?void 0:n(d),p=d=>()=>r==null?void 0:r(d);return i.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 60px)",gap:4},children:[i.jsx(Xt,{label:"start",isActive:c("justify-start"),onClick:f("justify-start"),onHover:p("justify-start"),containerStyle:{flexDirection:l,justifyContent:"flex-start",gap:2},children:d=>i.jsxs(i.Fragment,{children:[i.jsx("div",{style:s(10,d)}),i.jsx("div",{style:s(14,d)}),i.jsx("div",{style:s(8,d)})]})}),i.jsx(Xt,{label:"center",isActive:c("justify-center"),onClick:f("justify-center"),onHover:p("justify-center"),containerStyle:{flexDirection:l,justifyContent:"center",gap:2},children:d=>i.jsxs(i.Fragment,{children:[i.jsx("div",{style:s(10,d)}),i.jsx("div",{style:s(14,d)}),i.jsx("div",{style:s(8,d)})]})}),i.jsx(Xt,{label:"stretch",isActive:c("justify-stretch"),onClick:f("justify-stretch"),onHover:p("justify-stretch"),containerStyle:{flexDirection:l,gap:2},children:d=>i.jsxs(i.Fragment,{children:[i.jsx("div",{style:a(d)}),i.jsx("div",{style:a(d)}),i.jsx("div",{style:a(d)})]})}),i.jsx(Xt,{label:"between",isActive:c("justify-between"),onClick:f("justify-between"),onHover:p("justify-between"),containerStyle:{flexDirection:l},children:d=>i.jsxs(i.Fragment,{children:[i.jsx("div",{style:s(12,d)}),i.jsx("div",{style:u(1,d)}),i.jsx("div",{style:s(12,d)})]})}),i.jsx(Xt,{label:"around",isActive:c("justify-around"),onClick:f("justify-around"),onHover:p("justify-around"),containerStyle:{flexDirection:l},children:d=>i.jsxs(i.Fragment,{children:[i.jsx("div",{style:u(1,d)}),i.jsx("div",{style:s(12,d)}),i.jsx("div",{style:u(2,d)}),i.jsx("div",{style:s(12,d)}),i.jsx("div",{style:u(1,d)})]})}),i.jsx(Xt,{label:"evenly",isActive:c("justify-evenly"),onClick:f("justify-evenly"),onHover:p("justify-evenly"),containerStyle:{flexDirection:l},children:d=>i.jsxs(i.Fragment,{children:[i.jsx("div",{style:u(1,d)}),i.jsx("div",{style:s(12,d)}),i.jsx("div",{style:u(1,d)}),i.jsx("div",{style:s(12,d)}),i.jsx("div",{style:u(1,d)})]})}),i.jsx(Xt,{label:"end",isActive:c("justify-end"),onClick:f("justify-end"),onHover:p("justify-end"),containerStyle:{flexDirection:l,justifyContent:"flex-end",gap:2},children:d=>i.jsxs(i.Fragment,{children:[i.jsx("div",{style:s(10,d)}),i.jsx("div",{style:s(14,d)}),i.jsx("div",{style:s(8,d)})]})})]})}const ln="bg-bv-teal/50 rounded-[2px] shrink-0 group-hover:bg-bv-teal/70 transition-colors duration-150",g1="bg-bv-orange/10 rounded-[2px]";function qt({isCol:e,main:t}){return i.jsx("div",{className:ln,style:e?{height:t}:{width:t}})}function Un({flex:e=1}){return i.jsx("div",{className:g1,style:{flex:e}})}function Yt({isCol:e,w:t,h:n}){return i.jsx("div",{className:ln,style:e?{width:n,height:t}:{width:t,height:n}})}function Ki({isCol:e,w:t,h:n,pt:r}){return i.jsx("div",{className:`${ln} 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 Fi(e){return i.jsxs(i.Fragment,{children:[i.jsx(qt,{isCol:e,main:10}),i.jsx(qt,{isCol:e,main:14}),i.jsx(qt,{isCol:e,main:8})]})}const $d=[{value:"justify-start",label:"start",getContainerStyle:e=>({flexDirection:e,justifyContent:"flex-start",gap:2}),renderItems:e=>Fi(e.startsWith("column"))},{value:"justify-center",label:"center",getContainerStyle:e=>({flexDirection:e,justifyContent:"center",gap:2}),renderItems:e=>Fi(e.startsWith("column"))},{value:"justify-stretch",label:"stretch",getContainerStyle:e=>({flexDirection:e,gap:2}),renderItems:()=>i.jsxs(i.Fragment,{children:[i.jsx("div",{className:`${ln} flex-1`}),i.jsx("div",{className:`${ln} flex-1`}),i.jsx("div",{className:`${ln} flex-1`})]})},{value:"justify-between",label:"between",getContainerStyle:e=>({flexDirection:e}),renderItems:e=>{const t=e.startsWith("column");return i.jsxs(i.Fragment,{children:[i.jsx(qt,{isCol:t,main:12}),i.jsx(Un,{}),i.jsx(qt,{isCol:t,main:12})]})}},{value:"justify-around",label:"around",getContainerStyle:e=>({flexDirection:e}),renderItems:e=>{const t=e.startsWith("column");return i.jsxs(i.Fragment,{children:[i.jsx(Un,{flex:1}),i.jsx(qt,{isCol:t,main:12}),i.jsx(Un,{flex:2}),i.jsx(qt,{isCol:t,main:12}),i.jsx(Un,{flex:1})]})}},{value:"justify-evenly",label:"evenly",getContainerStyle:e=>({flexDirection:e}),renderItems:e=>{const t=e.startsWith("column");return i.jsxs(i.Fragment,{children:[i.jsx(Un,{}),i.jsx(qt,{isCol:t,main:12}),i.jsx(Un,{}),i.jsx(qt,{isCol:t,main:12}),i.jsx(Un,{})]})}},{value:"justify-end",label:"end",getContainerStyle:e=>({flexDirection:e,justifyContent:"flex-end",gap:2}),renderItems:e=>Fi(e.startsWith("column"))}],Hi=[{value:"items-start",label:"start",getContainerStyle:e=>({flexDirection:e,alignItems:"flex-start",gap:3}),renderItems:e=>{const t=e.startsWith("column");return i.jsxs(i.Fragment,{children:[i.jsx(Yt,{isCol:t,w:13,h:22}),i.jsx(Yt,{isCol:t,w:15,h:42}),i.jsx(Yt,{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 i.jsxs(i.Fragment,{children:[i.jsx(Yt,{isCol:t,w:13,h:22}),i.jsx(Yt,{isCol:t,w:15,h:42}),i.jsx(Yt,{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 i.jsxs(i.Fragment,{children:[i.jsx(Ki,{isCol:t,w:13,h:38,pt:17}),i.jsx(Ki,{isCol:t,w:15,h:26,pt:3}),i.jsx(Ki,{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 i.jsxs(i.Fragment,{children:[i.jsx("div",{className:ln,style:t?{height:13}:{width:13}}),i.jsx("div",{className:ln,style:t?{height:15}:{width:15}}),i.jsx("div",{className:ln,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 i.jsxs(i.Fragment,{children:[i.jsx(Yt,{isCol:t,w:13,h:22}),i.jsx(Yt,{isCol:t,w:15,h:42}),i.jsx(Yt,{isCol:t,w:11,h:14})]})}}];function y1({currentValue:e,lockedValue:t,locked:n,flexDirection:r="row",onHover:o,onLeave:l,onClick:s,onRemove:a,onRemoveHover:u}){const[c,f]=w.useState(!1),{refs:p,floatingStyles:d,context:m}=yn({open:c,onOpenChange:I=>{I||(f(!1),l())},strategy:"fixed",placement:"bottom-start",middleware:[pn(4),mn(),hn({padding:8})],whileElementsMounted:fn}),v=cr(m),{getReferenceProps:b,getFloatingProps:S}=dr([v]),h=t!==null&&$d.some(I=>I.value===t),g=n&&!h,y=!h&&(e===null||e===""),x=h?t:e??"",k=$d.find(I=>I.value===x),C=(k==null?void 0:k.label)??"—";function T(){f(!1),l()}function j(){g||f(I=>(I&&l(),!I))}const L={...Ft,borderStyle:"dashed",alignItems:"center",justifyContent:"center"};return i.jsxs("div",{className:"flex flex-col items-start gap-1",children:[i.jsx("span",{style:{fontSize:9,fontFamily:qe,color:Oe,fontWeight:500},children:"JUSTIFY →"}),i.jsx("div",{ref:p.setReference,className:"cursor-pointer",role:"button",tabIndex:g?-1:0,onKeyDown:I=>{(I.key==="Enter"||I.key===" ")&&j()},onClick:j,...b(),children:y?i.jsxs("div",{className:"flex flex-col items-center gap-0.5",children:[i.jsx("div",{style:L,children:i.jsx("span",{style:{fontSize:9,fontFamily:qe,color:Oe},children:"—"})}),i.jsx("span",{style:{fontSize:9,fontFamily:qe,color:Oe},children:"none"})]}):i.jsx(Xt,{label:C,isActive:c,containerStyle:(k==null?void 0:k.getContainerStyle(r))??{flexDirection:r},children:I=>(k==null?void 0:k.renderItems(r))??null})}),c&&i.jsx(gn,{children:i.jsx("div",{ref:p.setFloating,style:d,className:"z-[9999]",...S(),children:i.jsxs(gr,{className:"bg-bv-bg border border-bv-border rounded-lg shadow-lg p-2 flex flex-col gap-1",onMouseLeave:l,onClose:T,children:[a&&i.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:()=>{a(),T()},children:[i.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",className:"shrink-0",children:[i.jsx("line",{x1:"1",y1:"1",x2:"9",y2:"9",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),i.jsx("line",{x1:"9",y1:"1",x2:"1",y2:"9",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})]}),"remove"]}),i.jsx(m1,{flexDirection:r,activeValue:x,onSelect:I=>{s(I),T()},onHover:o})]})})})]})}function x1({currentValue:e,lockedValue:t,locked:n,flexDirection:r="row",onHover:o,onLeave:l,onClick:s,onRemove:a,onRemoveHover:u}){const[c,f]=w.useState(!1),{refs:p,floatingStyles:d,context:m}=yn({open:c,onOpenChange:D=>{D||(f(!1),l())},strategy:"fixed",placement:"bottom-start",middleware:[pn(4),mn(),hn({padding:8})],whileElementsMounted:fn}),v=cr(m),{getReferenceProps:b,getFloatingProps:S}=dr([v]),h=t!==null&&Hi.some(D=>D.value===t),g=n&&!h,y=!h&&(e===null||e===""),x=h?t:e??"",k=Hi.find(D=>D.value===x),C=(k==null?void 0:k.label)??"—",T=r;function j(){f(!1),l()}function L(){g||f(D=>(D&&l(),!D))}const I=y?{...Ft,borderStyle:"dashed",borderColor:Ct,background:Kn,cursor:g?"default":"pointer",alignItems:"center",justifyContent:"center"}:{...Ft,borderColor:c?ze:Ct,background:c?"rgba(0,132,139,0.09)":Kn,cursor:g?"default":"pointer",...k?k.getContainerStyle(r):{}};return i.jsxs("div",{style:{display:"inline-flex",flexDirection:"column",alignItems:"center",gap:2},children:[i.jsx("span",{style:{fontSize:9,fontFamily:qe,color:Oe,textTransform:"uppercase",letterSpacing:"0.05em"},children:"Align ↓"}),i.jsx("div",{ref:p.setReference,role:"button",tabIndex:g?-1:0,onKeyDown:D=>{(D.key==="Enter"||D.key===" ")&&L()},onClick:L,...b(),children:i.jsx("div",{style:I,children:y?i.jsx("span",{style:{fontSize:9,fontFamily:qe,color:Oe},children:"—"}):k==null?void 0:k.renderItems(r)})}),i.jsx("span",{style:{fontSize:9,fontFamily:qe,color:c?ze:Oe,fontWeight:c?600:400,textAlign:"center",transition:"color 150ms ease-in-out"},children:y?"—":C}),c&&i.jsx(gn,{children:i.jsx("div",{ref:p.setFloating,style:d,className:"z-[9999]",...S(),children:i.jsxs(gr,{className:"bg-bv-bg border border-bv-border rounded-lg shadow-lg p-2 flex flex-col gap-1",onMouseLeave:l,onClose:j,children:[a&&i.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:()=>{a(),j()},children:[i.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",className:"shrink-0",children:[i.jsx("line",{x1:"1",y1:"1",x2:"9",y2:"9",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),i.jsx("line",{x1:"9",y1:"1",x2:"1",y2:"9",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})]}),"remove"]}),i.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(5, 60px)",gap:4},children:Hi.map(D=>i.jsx(Xt,{label:D.label,isActive:D.value===x,containerStyle:{flexDirection:T,...D.getContainerStyle(r)},onHover:()=>o(D.value),onClick:()=>{s(D.value),j()},children:V=>D.renderItems(r)},D.value))})]})})})]})}function zd(e){return e.replace(/^gap-x-/,"x-")}function Kd(e){return e.replace(/^gap-y-/,"y-")}function v1({slots:e,onSlotChange:t,onSlotHover:n,onSlotRemove:r,onSlotRemoveHover:o}){const[l,s]=w.useState(null),[a,u]=w.useState(null),c=e.find(S=>S.key==="gap"),f=e.find(S=>S.key==="gap-x"),p=e.find(S=>S.key==="gap-y");function d(S,h){u(h!=null?S:null),n==null||n(S,h)}function m(S){u(S)}function v(){u(null)}const b=a==="gap-x"?"gm-active-x":a==="gap-y"?"gm-active-y":a==="gap"?"gm-active-gap":"";return i.jsx("div",{className:"gm-root",children:i.jsxs("div",{className:`gm-grid${b?` ${b}`:""}`,children:[i.jsx("div",{className:"gm-col-highlight",style:{gridArea:"1 / 2 / 4 / 3"}}),i.jsx("div",{className:"gm-row-highlight",style:{gridArea:"2 / 1 / 3 / 4"}}),i.jsx("div",{className:"gm-box gm-box-tl",style:{gridArea:"1 / 1"}}),i.jsx("div",{className:"gm-cell",style:{gridArea:"1 / 2"},onMouseEnter:()=>m("gap-x"),onMouseLeave:v,children:(f==null?void 0:f.scaleValues)&&i.jsx(Wr,{placeholder:"x",values:f.scaleValues,currentValue:f.value,displayValue:f.value?zd(f.value):null,formatValue:zd,axis:"x",disabled:l!==null&&l!=="gap-x",onHover:S=>d("gap-x",S),onLeave:()=>d("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:f.value?()=>r==null?void 0:r("gap-x"):void 0,onRemoveHover:f.value?()=>{u(null),o==null||o("gap-x")}:void 0})}),i.jsx("div",{className:"gm-box gm-box-tr",style:{gridArea:"1 / 3"}}),i.jsx("div",{className:"gm-cell",style:{gridArea:"2 / 1"},onMouseEnter:()=>m("gap-y"),onMouseLeave:v,children:(p==null?void 0:p.scaleValues)&&i.jsx(Wr,{placeholder:"y",values:p.scaleValues,currentValue:p.value,displayValue:p.value?Kd(p.value):null,formatValue:Kd,axis:"y",disabled:l!==null&&l!=="gap-y",onHover:S=>d("gap-y",S),onLeave:()=>d("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:p.value?()=>r==null?void 0:r("gap-y"):void 0,onRemoveHover:p.value?()=>{u(null),o==null||o("gap-y")}:void 0})}),i.jsx("div",{className:"gm-cell",style:{gridArea:"2 / 2"},onMouseEnter:()=>m("gap"),onMouseLeave:v,children:(c==null?void 0:c.scaleValues)&&i.jsx(Wr,{placeholder:"gap",values:c.scaleValues,currentValue:c.value,displayValue:c.value??null,axis:"x",disabled:l!==null&&l!=="gap",onHover:S=>d("gap",S),onLeave:()=>d("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})}),i.jsx("div",{className:"gm-box gm-box-bl",style:{gridArea:"3 / 1"}})]})})}const Hh={shadow:"Shadow","inset-shadow":"Inset Shadow",ring:"Ring","inset-ring":"Inset Ring","text-shadow":"Text Shadow"},Fd={shadow:"shadow-md","inset-shadow":"inset-shadow-sm",ring:"ring-2","inset-ring":"inset-ring-2","text-shadow":"text-shadow-md"};function b1(e){switch(e){case"shadow":return[...Wu];case"inset-shadow":return[...sh];case"ring":return[...Oa];case"inset-ring":return[...Oa];case"text-shadow":return[...Bu]}}function Hd(e,t){return`${e==="shadow"?"shadow-":e==="inset-shadow"?"inset-shadow-":e==="ring"?"ring-":e==="inset-ring"?"inset-ring-":"text-shadow-"}${t}`}function w1(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 S1(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),a=parseInt(e.colorHex.slice(5,7),16);return`rgba(${l},${s},${a},${o})`}return e.colorHex},n=e.colorHex?t(e.colorHex):void 0;switch(e.type){case"shadow":{const r=Co(e.sizeClass,"shadow-");return j1(r,n)}case"inset-shadow":{const r=Co(e.sizeClass,"inset-shadow-");return E1(r,n)}case"ring":{const r=Co(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=Co(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 C1(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),a=parseInt(e.colorHex.slice(3,5),16),u=parseInt(e.colorHex.slice(5,7),16);return`rgba(${s},${a},${u},${l})`}return e.colorHex},n=e.colorHex?t(e.colorHex):void 0,r=Co(e.sizeClass,"text-shadow-");return k1(r,n)}function k1(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 Co(e,t){return e.startsWith(t)?e.slice(t.length):e}function j1(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 E1(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 T1=Array.from({length:21},(e,t)=>`${t*5}%`);function N1({layer:e,onSizeHover:t,onSizeLeave:n,onSizeClick:r,onColorClick:o,onOpacityHover:l,onOpacityLeave:s,onOpacityClick:a,onRemove:u,onRemoveHover:c}){const[f,p]=w.useState(!1),d=w.useRef(),m={onMouseEnter:()=>{clearTimeout(d.current),p(!0)},onMouseLeave:()=>{d.current=setTimeout(()=>p(!1),60)}},v=b1(e.type),b=S1(e),S=e.type==="text-shadow"?C1(e):"none",h=e.isNone,g=e.sizeClass?w1(e.type,e.sizeClass):v[0],y=!!e.colorHex,x=e.opacity!==null?`${e.opacity}%`:"100%",k=e.colorHex??void 0;function C(j){t(Hd(e.type,j))}function T(j){r(Hd(e.type,j))}return i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"flex items-center justify-center",...m,children:i.jsx("span",{className:"w-1 h-1 rounded-full bg-bv-orange"})}),i.jsx("span",{className:"flex items-center text-[9px] font-semibold uppercase tracking-[0.8px] text-bv-text-mid font-mono whitespace-nowrap",...m,children:Hh[e.type]}),i.jsx("span",{className:"flex items-center",...m,children:i.jsx(Sn,{values:v,currentValue:g,lockedValue:null,locked:!1,onHover:C,onLeave:n,onClick:T})}),i.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:j=>o(j.currentTarget),title:e.colorClass?e.colorClass:"Default color — click to override",...m,children:e.colorHex?i.jsx("div",{className:"w-full h-full rounded-[4px]",style:{background:k,opacity:e.opacity!==null?e.opacity/100:1}}):i.jsx("div",{className:"w-full h-full rounded-[4px] flex items-center justify-center",children:i.jsx("span",{className:"w-2 h-2 rounded-full bg-bv-text-mid opacity-40"})})}),i.jsx("span",{className:`flex items-center ${h||!y?"opacity-30 pointer-events-none":""}`,...m,children:y&&!h?i.jsx(Sn,{values:T1,currentValue:x,lockedValue:null,locked:!1,onHover:l,onLeave:s,onClick:a}):i.jsx("span",{className:"flex items-center justify-center w-full h-[26px] bg-bv-surface border border-bv-border rounded-[5px]",children:i.jsx("span",{className:"font-mono text-[11px] text-bv-muted select-none",children:"—"})})}),i.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:b},title:`Preview: ${e.sizeClass??""} ${e.colorClass??""}`.trim(),...m,children:e.type==="text-shadow"&&i.jsx("span",{className:"text-[11px] font-semibold text-bv-text select-none transition-[text-shadow] duration-200",style:{textShadow:S},children:"Aa"})}),i.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 ${f?"opacity-100":"opacity-0"}`,onClick:u,onMouseEnter:()=>{clearTimeout(d.current),p(!0),c()},onMouseLeave:()=>{d.current=setTimeout(()=>p(!1),60)},title:"Remove layer",children:"×"})]})}const R1=["shadow","inset-shadow","ring","inset-ring","text-shadow"];function P1({layers:e,onPreview:t,onRevert:n,onStage:r,onAdd:o,onRemove:l,onRemoveHover:s,onColorClick:a}){function u(f){const p=[];return f.sizeClass&&p.push(f.sizeClass),f.colorClass&&p.push(f.opacity!==null?`${f.colorClass}/${f.opacity}`:f.colorClass),p}const c=R1.map(f=>({type:f,layer:e.find(p=>p.type===f)}));return i.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:f,layer:p},d)=>i.jsxs(w.Fragment,{children:[d>0&&i.jsx("div",{className:"h-px bg-bv-border opacity-50",style:{gridColumn:"1 / -1"}}),p?i.jsx(N1,{layer:p,onSizeHover:m=>t(p.sizeClass??"",m),onSizeLeave:n,onSizeClick:m=>r(p.sizeClass??"",m),onColorClick:m=>a==null?void 0:a(p,m),onOpacityHover:m=>{if(!p.colorClass)return;const v=p.colorClass.split("/")[0],b=parseInt(m),S=b===100?v:`${v}/${b}`,h=p.opacity!==null?`${v}/${p.opacity}`:v;t(h,S)},onOpacityLeave:n,onOpacityClick:m=>{if(!p.colorClass)return;const v=p.colorClass.split("/")[0],b=parseInt(m),S=b===100?v:`${v}/${b}`,h=p.opacity!==null?`${v}/${p.opacity}`:v;r(h,S)},onRemove:()=>l(u(p)),onRemoveHover:()=>s(u(p))}):i.jsxs(i.Fragment,{children:[i.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(Fd[f]),title:`Add ${Fd[f]}`,children:"+"}),i.jsx("div",{className:"flex items-center leading-none text-[9px] font-mono uppercase tracking-[0.6px] text-bv-muted whitespace-nowrap",children:Hh[f]})]})]},f))})}const Wd=[{prop:"shadow",prefix:"shadow-",sizeSet:vs},{prop:"inset-shadow",prefix:"inset-shadow-",sizeSet:bs},{prop:"ring",prefix:"ring-",sizeSet:Zr},{prop:"inset-ring",prefix:"inset-ring-",sizeSet:Zr},{prop:"text-shadow",prefix:"text-shadow-",sizeSet:ws}];function wr(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 a=!1;const u=e.flatMap(c=>{const f=c.startsWith(r)?c.slice(r.length).split("/")[0]:"";return o.has(f)===s&&!a?(a=!0,n?[n]:[]):[c]});return a?u:n?[...e,n]:e}function I1(e,t){if(!t)return null;const n=e.lastIndexOf("-");if(n===-1){const a=t[e];return typeof a=="string"?a: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 _1(e,t){const n=e.trim().split(/\s+/).filter(Boolean),r=t==null?void 0:t.colors,o=[{type:"shadow",prefix:"shadow-",sizeSet:vs},{type:"inset-shadow",prefix:"inset-shadow-",sizeSet:bs},{type:"ring",prefix:"ring-",sizeSet:Zr},{type:"inset-ring",prefix:"inset-ring-",sizeSet:Zr},{type:"text-shadow",prefix:"text-shadow-",sizeSet:ws}],l=[];for(const{type:s,prefix:a,sizeSet:u}of o){const c=n.filter(v=>v===a.slice(0,-1)||v.startsWith(a));if(c.length===0)continue;let f=null,p=null,d=null,m=null;for(const v of c){const S=v.slice(a.length).split("/")[0];if(u.has(S))f=v;else{p=v;const h=v.split("/");h.length===2&&(m=parseInt(h[1])),d=I1(S,r??null)}}l.push({type:s,sizeClass:f,colorClass:p,colorHex:d,opacity:m,isNone:f!==null&&(f.endsWith("-none")||f.endsWith("-0"))})}return l}function A1(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=>!Wd.some(({prefix:a})=>s===a.slice(0,-1)||s.startsWith(a)));for(const{prop:s,prefix:a,sizeSet:u}of Wd){const c=r.find(v=>v.property===s),f=r.find(v=>v.property===`${s}-size`),p=r.find(v=>v.property===`${s}-color`),d=o.filter(v=>v===a.slice(0,-1)||v.startsWith(a));if(c){if(c.newClass)l.push(...wr(d,c.originalClass,c.newClass,a,u));else{const v=c.originalClass.startsWith(a)?c.originalClass.slice(a.length).split("/")[0]:"";u.has(v)||!c.originalClass||l.push(...wr(d,c.originalClass,c.newClass,a,u))}continue}let m=[...d];f&&(f.newClass?m=wr(m,f.originalClass,f.newClass,a,u):f.originalClass&&(m=wr(m,f.originalClass,"",a,u))),p&&(p.newClass?m=wr(m,p.originalClass,p.newClass,a,u):p.originalClass&&(m=wr(m,p.originalClass,"",a,u))),l.push(...m)}return l.join(" ")}const L1={spacing:"Spacing",sizing:"Sizing",typography:"Typography",color:"Backgrounds",borders:"Radius",effects:"Effects",layout:"Layout",flexbox:"Flexbox & Grid",overflow:"Overflow"},D1=["layout","borders","sizing","typography","color","flexbox","shadows","effects"];function Bd(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 O1(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 Gn(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 a=s.fullClass,u=n.find(c=>c.prefix.test(a));u?r.set(u.key,a):o=a}return{shorthandValue:o,shorthandScaleValues:Ma,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"?Ma:$y(`rounded-${s}`)}))}}const Yn=I0(),Wh=_0(),M1={"text-size":{scaleName:"fontSize",valueType:"scalar"},"text-color":{scaleName:null,valueType:"color"}};Wh.typography.unshift({name:"Font size",prefixHint:"text-sm/base/lg/…",prefix:"text-size"},{name:"Text color",prefixHint:"text-{color}",prefix:"text-color"});function Yl(e){const t=M1[e];if(t)return{...t,stagingKey:e};const n=Object.entries(fr).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=fr[e];return r?{scaleName:r.themeKey,valueType:r.valueType,enumAlts:r.enumAlts,stagingKey:e.replace(/-$/g,"")}:null}function $1(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 a=Yl(s.prefix);if((a==null?void 0:a.valueType)==="enum"&&a.enumAlts)return!a.enumAlts.some(u=>o.has(u));if(a&&a.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 z1(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 K1({componentName:e,instanceCount:t,rawClasses:n,parsedClasses:r,tailwindConfig:o,patchManager:l}){var se,ae;const[s,a]=w.useState(null),[u,c]=w.useState(new Map),[f,p]=w.useState(new Map),[d,m]=w.useState(null),[v,b]=w.useState(null),[S,h]=w.useState(null),g=w.useRef(null),{refs:y,floatingStyles:x,context:k}=yn({open:d!==null,onOpenChange:N=>{N||(m(null),l.revertPreview())},strategy:"fixed",placement:"bottom-start",middleware:[pn(4),mn(),hn({padding:8}),Ua({apply({availableHeight:N,elements:M}){Object.assign(M.floating.style,{maxHeight:`${N}px`})},padding:8})],whileElementsMounted:fn}),C=cr(k),{getFloatingProps:T}=dr([C]);w.useEffect(()=>{d!=null&&d.anchorEl&&y.setReference(d.anchorEl)},[d==null?void 0:d.anchorEl]);const{refs:j,floatingStyles:L,context:I}=yn({open:v!==null||S!==null,onOpenChange:N=>{N||(b(null),h(null),l.revertPreview())},strategy:"fixed",placement:"bottom-start",middleware:[pn(4),mn(),hn({padding:8}),Ua({apply({availableHeight:N,elements:M}){Object.assign(M.floating.style,{maxHeight:`${N}px`})},padding:8})],whileElementsMounted:fn}),D=cr(I),{getFloatingProps:V}=dr([D]);w.useEffect(()=>{const N=(v==null?void 0:v.anchorEl)??(S==null?void 0:S.anchorEl);N&&j.setReference(N)},[v==null?void 0:v.anchorEl,S==null?void 0:S.anchorEl]);const[H,_]=w.useState(new Set),[F,Y]=w.useState(!1),X=w.useRef(r.map(N=>N.fullClass).join(" ")),E=r.map(N=>N.fullClass).join(" ");w.useEffect(()=>{X.current!==E&&(X.current=E,l.revertPreview(),c(new Map),p(new Map),m(null),b(null),_(new Set))});const R=e,P=l.patches.filter(N=>N.status==="staged"&&N.elementKey===R),G=new Set(P.filter(N=>N.originalClass==="").map(N=>N.property));function J(N,M){const z=P.find(ve=>ve.property===N),ee=(M==null?void 0:M.fullClass)??(z==null?void 0:z.originalClass)??"",oe=(z==null?void 0:z.newClass)??(M==null?void 0:M.fullClass)??"";return{originalClass:ee,effectiveClass:oe,hasValue:oe!==""}}function Ke(N){return u.size===0?N:N.map(M=>{const z=u.get(`${M.layer}-shorthand`),ee=M.slots.map(ve=>{const Ce=u.get(`${M.layer}-${ve.key}`);return Ce!==void 0?{...ve,value:Ce}:ve}),oe=z??M.shorthandValue;let me=M.classState;return z!==void 0&&(me=ee.some(Ce=>Ce.value!=null)?"mixed":"shorthand"),{...M,shorthandValue:oe,classState:me,slots:ee}})}function Re(N){if(f.size===0)return N;const M=f.get("all");return{...N,shorthandValue:M===void 0?N.shorthandValue:M,slots:N.slots.map(z=>{const ee=f.get(z.key);return ee===void 0?z:{...z,value:ee}})}}const ye=z1(r);function de(N,M){l.preview(N,M)}function O(){l.revertPreview()}function Q(N,M,z){l.stage(R,N,M,z)}function nt(N,M){const z=N||M,ee=z.startsWith("bg-gradient-to-")?"bg-gradient-to-":z.startsWith("from-")?"from-":z.startsWith("via-")?"via-":z.startsWith("to-")?"to-":"bg-";Q(ee,N,M)}function q(N,M){l.revertPreview(),ue("overlay",{type:"CLEAR_HIGHLIGHTS"}),N.color!==void 0&&M?(b(z=>(z==null?void 0:z.cls.fullClass)===N.fullClass?null:{cls:N,anchorEl:M}),a(null)):(b(null),a(N))}function yt(N,M){l.preview(N.fullClass,M)}function ro(N){l.revertPreview()}function oo(N){const M=fr[N];if(!((M==null?void 0:M.controlGroup)==="flex-container"&&(M==null?void 0:M.propertyKey)==="display")){if((M==null?void 0:M.controlGroup)==="flex-container"){const z=r.some(oe=>oe.fullClass==="flex"||oe.fullClass==="inline-flex"),ee=P.some(oe=>oe.property==="display"&&oe.originalClass===""&&(oe.newClass==="flex"||oe.newClass==="inline-flex"));!z&&!ee&&l.stage(R,"display","","flex")}}_(z=>new Set(z).add(N))}function Bt(N,M){l.preview("",M)}function Bn(N){l.revertPreview()}function re(N,M){const z=Yl(N);l.stage(R,(z==null?void 0:z.stagingKey)??N,"",M),_(ee=>{const oe=new Set(ee);return oe.delete(N),oe})}return i.jsxs("div",{className:"divide-y divide-bv-border",children:[i.jsxs("div",{className:"px-4 py-3",children:[i.jsxs("div",{className:"flex items-center gap-1.5 cursor-pointer select-none",onClick:()=>Y(N=>!N),children:[i.jsx("svg",{className:`w-3 h-3 text-bv-muted transition-transform ${F?"":"rotate-90"}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 5l7 7-7 7"})}),i.jsx("span",{className:"text-[10px] font-semibold text-bv-text",children:"Box model"})]}),i.jsx("div",{className:`overflow-hidden transition-[max-height,opacity] duration-200 ease-in-out ${F?"max-h-0 opacity-0":"max-h-[600px] opacity-100"}`,children:i.jsxs("div",{className:"mt-3",children:[i.jsx(W0,{layers:Ke(br(r,o)),onEditStart:()=>{ue("overlay",{type:"CLEAR_HIGHLIGHTS"}),m(null)},onSlotClick:(N,M,z)=>{var Ce;if(M!=="color"||!z){m(null);return}const ee=br(r,o).find(Vt=>Vt.layer===N),oe=`${N}-color`,me=u.get(oe)??((Ce=ee==null?void 0:ee.slots.find(Vt=>Vt.key==="color"))==null?void 0:Ce.value)??"",ve=N==="outline"?"outline-":"border-";m(Vt=>(Vt==null?void 0:Vt.layer)===N?null:{layer:N,prefix:ve,currentClass:me,staged:!1,anchorEl:z})},onSlotHover:(N,M,z)=>{var ee;if(z===null)l.revertPreview();else{const oe=`${N}-${M}`,me=br(r,o).find(Ce=>Ce.layer===N),ve=M==="shorthand"?u.get(oe)??(me==null?void 0:me.shorthandValue):u.get(oe)??((ee=me==null?void 0:me.slots.find(Ce=>Ce.key===M))==null?void 0:ee.value);l.preview(ve??"",z)}},onSlotChange:(N,M,z)=>{var ve;const ee=`${N}-${M}`,oe=br(r,o).find(Ce=>Ce.layer===N),me=M==="shorthand"?u.get(ee)??(oe==null?void 0:oe.shorthandValue):u.get(ee)??((ve=oe==null?void 0:oe.slots.find(Ce=>Ce.key===M))==null?void 0:ve.value);Q(`${N}-${M}`,me??"",z),c(Ce=>new Map(Ce).set(ee,z))},onSlotRemoveHover:(N,M)=>{var me;const z=`${N}-${M}`,ee=br(r,o).find(ve=>ve.layer===N),oe=M==="shorthand"?u.get(z)??(ee==null?void 0:ee.shorthandValue):u.get(z)??((me=ee==null?void 0:ee.slots.find(ve=>ve.key===M))==null?void 0:me.value);oe&&l.preview(oe,"")},onSlotRemove:(N,M)=>{var me;const z=`${N}-${M}`,ee=br(r,o).find(ve=>ve.layer===N),oe=M==="shorthand"?u.get(z)??(ee==null?void 0:ee.shorthandValue):u.get(z)??((me=ee==null?void 0:ee.slots.find(ve=>ve.key===M))==null?void 0:me.value);oe&&(Q(`${N}-${M}`,oe,""),c(ve=>{const Ce=new Map(ve);return Ce.delete(z),Ce}))}}),d&&i.jsx(gn,{children:i.jsx("div",{ref:y.setFloating,style:{...x,zIndex:9999,overflowY:"auto"},...T(),children:i.jsx(Gl,{prefix:d.prefix,currentValue:d.currentClass.startsWith(d.prefix)?d.currentClass.slice(d.prefix.length):"",colors:(o==null?void 0:o.colors)||{},locked:!1,lockedValue:((se=P.find(N=>N.property===d.prefix))==null?void 0:se.newClass)??null,onHover:N=>{g.current=N,l.preview(d.currentClass,N)},onLeave:()=>{d.staged&&g.current?(l.preview(g.current,d.currentClass),g.current=null):l.revertPreview()},onClick:N=>{const M=`${d.layer}-color`;Q(d.prefix,d.currentClass,N),c(z=>new Map(z).set(M,N)),m(z=>z?{...z,currentClass:N,staged:!0}:null)}})})})]})})]}),(v||S)&&i.jsx(gn,{children:i.jsxs("div",{ref:j.setFloating,style:{...L,zIndex:9999,overflowY:"auto"},...V(),children:[v&&i.jsx(Gl,{prefix:Bd(v.cls),currentValue:v.cls.color??"",colors:(o==null?void 0:o.colors)||{},locked:!1,lockedValue:((ae=P.find(N=>N.property===v.cls.property))==null?void 0:ae.newClass)??null,onHover:N=>de(v.cls.fullClass,N),onLeave:O,onClick:N=>Q(v.cls.property,v.cls.fullClass,N),onRemoveHover:()=>de(v.cls.fullClass,""),onRemove:()=>{Q(v.cls.property,v.cls.fullClass,""),b(null)}}),S&&(()=>{const{layer:N}=S,M=N.type==="shadow"?"shadow-":N.type==="inset-shadow"?"inset-shadow-":N.type==="ring"?"ring-":N.type==="text-shadow"?"text-shadow-":"inset-ring-",z=N.colorClass??"",ee=z?z.slice(M.length).split("/")[0]:"";return i.jsx(Gl,{prefix:M,currentValue:ee,colors:(o==null?void 0:o.colors)||{},locked:!1,lockedValue:null,onHover:oe=>de(z,oe),onLeave:O,onClick:oe=>{const me=N.type==="shadow"?"shadow-color":N.type==="inset-shadow"?"inset-shadow-color":N.type==="ring"?"ring-color":N.type==="text-shadow"?"text-shadow-color":"inset-ring-color";l.stage(R,me,z,oe),h(null)},onRemoveHover:()=>{z&&de(z,"")},onRemove:()=>{if(z){const oe=N.type==="shadow"?"shadow-color":N.type==="inset-shadow"?"inset-shadow-color":N.type==="ring"?"ring-color":N.type==="text-shadow"?"text-shadow-color":"inset-ring-color";l.stage(R,oe,z,"")}h(null)}})})()]})}),D1.map(N=>{if(N==="shadows"){const A=A1(n,P),ne=_1(A,o);return i.jsx(Od,{label:"Shadows & Rings",onAddProperty:()=>{},isEmpty:!1,classCount:ne.length,children:i.jsx(P1,{layers:ne,onPreview:(B,U)=>l.preview(B,U),onRevert:()=>l.revertPreview(),onStage:(B,U)=>{const pe=B||U,ie=Ae=>{if(Ae.startsWith("shadow-")){const We=Ae.slice(7).split("/")[0];return vs.has(We)}if(Ae.startsWith("inset-shadow-")){const We=Ae.slice(13).split("/")[0];return bs.has(We)}if(Ae.startsWith("ring-")||Ae.startsWith("inset-ring-")){const We=Ae.slice(Ae.startsWith("ring-")?5:11).split("/")[0];return Zr.has(We)}if(Ae.startsWith("text-shadow-")){const We=Ae.slice(12).split("/")[0];return ws.has(We)}return!1},ke=pe.startsWith("text-shadow")?"text-shadow":pe.startsWith("inset-shadow")?"inset-shadow":pe.startsWith("inset-ring")?"inset-ring":pe.startsWith("ring")?"ring":"shadow",Ut=ie(B)||B===""&&ie(U)?`${ke}-size`:`${ke}-color`;l.stage(R,Ut,B,U)},onAdd:B=>{const U=B.startsWith("text-shadow")?"text-shadow-size":B.startsWith("inset-shadow")?"inset-shadow-size":B.startsWith("inset-ring")?"inset-ring-size":B.startsWith("ring")?"ring-size":"shadow-size";l.stage(R,U,"",B)},onRemove:B=>{const U=ie=>{if(ie.startsWith("shadow-")){const ke=ie.slice(7).split("/")[0];return vs.has(ke)}if(ie.startsWith("inset-shadow-")){const ke=ie.slice(13).split("/")[0];return bs.has(ke)}if(ie.startsWith("ring-")||ie.startsWith("inset-ring-")){const ke=ie.slice(ie.startsWith("ring-")?5:11).split("/")[0];return Zr.has(ke)}if(ie.startsWith("text-shadow-")){const ke=ie.slice(12).split("/")[0];return ws.has(ke)}return!1},pe=[...B].reverse();for(const ie of pe){const ke=ie.startsWith("text-shadow")?"text-shadow":ie.startsWith("inset-shadow")?"inset-shadow":ie.startsWith("inset-ring")?"inset-ring":ie.startsWith("ring")?"ring":"shadow",Ut=U(ie)?`${ke}-size`:`${ke}-color`;l.stage(R,Ut,ie,"")}},onRemoveHover:B=>{B.length===1?l.preview(B[0],""):B.length>1&&l.preview(B.join(" "),"")},onColorClick:(B,U)=>{b(null),h(pe=>(pe==null?void 0:pe.layer.type)===B.type?null:{layer:B,anchorEl:U})}})},"shadows")}const z=(ye.get(N)||[]).filter(A=>!O1(A)),ee=Wh[N]||[],oe=R0.get("flex-container")??new Set,me=P0.get("flex-container")??new Set,ve=r.find(A=>A.fullClass==="flex"||A.fullClass==="inline-flex"),Ce=J("display",ve),Vt=Ce.effectiveClass==="flex"||Ce.effectiveClass==="inline-flex",Vh=r.some(A=>{if(A.fullClass==="flex"||A.fullClass==="inline-flex")return!1;const ne=Yn[A.fullClass];return!!(ne&&ne.propertyKey!=="display"&&oe.has(ne.propertyKey)||oe.has(A.property))}),Uh=[...me].some(A=>H.has(A)||G.has(A.replace(/-$/,""))),yr=N==="flexbox"&&(Vt||Vh||Uh),Gh=yr?ee.filter(A=>!me.has(A.prefix)):ee,Yh=$1(Gh,z,H,G),Zs=ee.filter(A=>H.has(A.prefix)).map(A=>A.prefix),Js=ee.filter(A=>G.has(A.prefix.replace(/-$/g,""))).map(A=>A.prefix),Qh=N==="color"||N==="flexbox"&&yr||N==="borders"?!1:z.length===0&&Zs.length===0&&Js.length===0,Xh=N==="borders"?Gn(r).slots.filter(A=>A.value!=null).length+(Gn(r).shorthandValue?1:0):z.length+Zs.length+Js.length;return i.jsxs(Od,{label:L1[N]??N,availableProperties:Yh,onAddProperty:oo,isEmpty:Qh,classCount:Xh,children:[N==="borders"&&i.jsx(J0,{state:Re(Gn(r)),onSlotHover:(A,ne)=>{var ie;const B=Gn(r),pe=(A==="all"?f.get("all")??B.shorthandValue:f.get(A)??((ie=B.slots.find(ke=>ke.key===A))==null?void 0:ie.value)??null)??"";ne===null?l.revertPreview():l.preview(pe,ne)},onSlotChange:(A,ne)=>{var pe;const B=Gn(r),U=f.get(A)??(A==="all"?B.shorthandValue:(pe=B.slots.find(ie=>ie.key===A))==null?void 0:pe.value)??"";Q(`rounded-${A}`,U,ne),p(ie=>new Map(ie).set(A,ne))},onSlotRemove:A=>{var B;const ne=f.get(A)??((B=Gn(r).slots.find(U=>U.key===A))==null?void 0:B.value)??"";ne&&(Q(`rounded-${A}`,ne,""),p(U=>new Map(U).set(A,null)))},onSlotRemoveHover:A=>{var B;const ne=f.get(A)??((B=Gn(r).slots.find(U=>U.key===A))==null?void 0:B.value)??"";ne&&l.preview(ne,"")},onEditStart:()=>ue("overlay",{type:"CLEAR_HIGHLIGHTS"})}),N==="color"&&i.jsx(s1,{...i1(r,(o==null?void 0:o.colors)||{},P.filter(A=>A.elementKey===R)),onPreview:de,onPreviewBatch:A=>l.previewBatch(A),onRevert:O,onStage:nt}),N==="flexbox"&&yr&&(()=>{const A=r,ne=A.find(le=>{const ge=Yn[le.fullClass];return(ge==null?void 0:ge.propertyKey)==="flex-direction"}),B=A.find(le=>{const ge=Yn[le.fullClass];return(ge==null?void 0:ge.propertyKey)==="justify-content"}),U=A.find(le=>{const ge=Yn[le.fullClass];return(ge==null?void 0:ge.propertyKey)==="align-items"}),pe=A.find(le=>{const ge=Yn[le.fullClass];return(ge==null?void 0:ge.propertyKey)==="flex-wrap"}),ie={"flex-row":"row","flex-col":"column","flex-row-reverse":"row-reverse","flex-col-reverse":"column-reverse"},ke=J("flex-direction",ne),il=ke.effectiveClass?ie[ke.effectiveClass]??"row":"row",Ut=J("flex-wrap",pe),Ae=J("justify-content",B),We=J("align-items",U),Zh=r.find(le=>le.property==="gap"),Jh=r.find(le=>le.property==="gap-x"),qh=r.find(le=>le.property==="gap-y"),lo=J("gap",Zh),so=J("gap-x",Jh),io=J("gap-y",qh),em=[{key:"gap",value:lo.effectiveClass||null,scaleValues:vr("gap-","spacing",o)},{key:"gap-x",value:so.effectiveClass||null,scaleValues:vr("gap-x-","spacing",o)},{key:"gap-y",value:io.effectiveClass||null,scaleValues:vr("gap-y-","spacing",o)}];return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"flex justify-between items-start w-full",children:[i.jsx(c1,{currentValue:(ne==null?void 0:ne.fullClass)??null,lockedValue:ke.effectiveClass!==ke.originalClass?ke.effectiveClass:null,locked:!1,onHover:le=>de(ke.effectiveClass,le),onLeave:O,onClick:le=>Q("flex-direction",ke.originalClass,le)}),i.jsx(h1,{currentValue:(pe==null?void 0:pe.fullClass)??null,lockedValue:Ut.effectiveClass!==Ut.originalClass?Ut.effectiveClass:null,locked:!1,onHover:le=>de(Ut.effectiveClass,le),onLeave:O,onClick:le=>Q("flex-wrap",Ut.originalClass,le)}),i.jsx(y1,{currentValue:(B==null?void 0:B.fullClass)??null,lockedValue:Ae.effectiveClass!==Ae.originalClass?Ae.effectiveClass:null,locked:!1,flexDirection:il,onHover:le=>de(Ae.effectiveClass,le),onLeave:O,onClick:le=>Q("justify-content",Ae.originalClass,le),onRemove:Ae.hasValue?()=>Q("justify-content",Ae.originalClass,""):void 0,onRemoveHover:Ae.hasValue?()=>de(Ae.effectiveClass,""):void 0}),i.jsx(x1,{currentValue:(U==null?void 0:U.fullClass)??null,lockedValue:We.effectiveClass!==We.originalClass?We.effectiveClass:null,locked:!1,flexDirection:il,onHover:le=>de(We.effectiveClass,le),onLeave:O,onClick:le=>Q("align-items",We.originalClass,le),onRemove:We.hasValue?()=>Q("align-items",We.originalClass,""):void 0,onRemoveHover:We.hasValue?()=>de(We.effectiveClass,""):void 0})]}),i.jsx("div",{className:"h-px w-full bg-bv-border opacity-50 my-2"}),i.jsx(v1,{slots:em,onSlotHover:(le,ge)=>{const Qu=le==="gap"?lo:le==="gap-x"?so:io;ge===null?l.revertPreview():l.preview(Qu.effectiveClass,ge)},onSlotRemoveHover:le=>{const ge=le==="gap"?lo:le==="gap-x"?so:io;ge.hasValue&&l.preview(ge.effectiveClass,"")},onSlotChange:(le,ge)=>{Q(le,(le==="gap"?lo:le==="gap-x"?so:io).originalClass,ge)},onSlotRemove:le=>{const ge=le==="gap"?lo:le==="gap-x"?so:io;ge.hasValue&&(l.preview(ge.effectiveClass,""),Q(le,ge.originalClass,""))}})]})})(),z.map(A=>{var ne,B;if(yr){const U=Yn[A.fullClass];if(U&&oe.has(U.propertyKey)||oe.has(A.property))return null}if(A.scaleName!==void 0){const U=vr(Bd(A),A.scaleName,o);if(U.length>0){const pe=((ne=P.find(ie=>ie.property===A.property))==null?void 0:ne.newClass)??null;return i.jsx(Sn,{values:U,currentValue:A.fullClass,lockedValue:pe,locked:!1,onStart:()=>ue("overlay",{type:"CLEAR_HIGHLIGHTS"}),onHover:ie=>yt(A,ie),onLeave:()=>ro(),onClick:ie=>Q(A.property,A.fullClass,ie),onRemoveHover:()=>l.preview(A.fullClass,""),onRemove:()=>Q(A.property,A.fullClass,"")},A.fullClass)}}if(A.scaleName===void 0&&A.color===void 0){const U=Yn[A.fullClass];if(U){const pe=((B=P.find(ie=>ie.property===U.propertyKey))==null?void 0:B.newClass)??null;return i.jsx(Sn,{values:U.alternatives,currentValue:A.fullClass,lockedValue:pe,locked:!1,onStart:()=>ue("overlay",{type:"CLEAR_HIGHLIGHTS"}),onHover:ie=>yt(A,ie),onLeave:()=>ro(),onClick:ie=>Q(U.propertyKey,A.fullClass,ie),onRemoveHover:()=>l.preview(A.fullClass,""),onRemove:()=>Q(U.propertyKey,A.fullClass,"")},A.fullClass)}}return i.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:U=>q(A,U.currentTarget),children:[A.fullClass,i.jsx("span",{className:"opacity-0 group-hover:opacity-60 hover:!opacity-100 ml-0.5 shrink-0",title:"Remove class",onClick:U=>{U.stopPropagation(),Q(A.property,A.fullClass,"")},onMouseEnter:U=>{U.stopPropagation(),l.preview(A.fullClass,"")},onMouseLeave:U=>{U.stopPropagation(),l.revertPreview()},children:i.jsxs("svg",{viewBox:"0 0 10 10",width:"8",height:"8",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("line",{x1:"1",y1:"1",x2:"9",y2:"9",stroke:"#F5532D",strokeWidth:"1.8",strokeLinecap:"round"}),i.jsx("line",{x1:"9",y1:"1",x2:"1",y2:"9",stroke:"#F5532D",strokeWidth:"1.8",strokeLinecap:"round"})]})})]},A.fullClass)}),Js.filter(A=>!(yr&&me.has(A))).map(A=>{const ne=Yl(A);if(!ne)return null;if(ne.valueType==="scalar"){const B=vr(A,ne.scaleName,o);if(B.length===0)return null;const U=P.find(pe=>pe.property===ne.stagingKey);return i.jsx(Sn,{values:B,currentValue:(U==null?void 0:U.newClass)??B[Math.floor(B.length/2)],lockedValue:(U==null?void 0:U.newClass)??null,locked:!1,onStart:()=>ue("overlay",{type:"CLEAR_HIGHLIGHTS"}),onHover:pe=>Bt(A,pe),onLeave:()=>Bn(),onClick:pe=>re(A,pe)},`staged-${A}`)}if(ne.valueType==="enum"&&ne.enumAlts){const B=P.find(U=>U.property===ne.stagingKey);return i.jsx(Sn,{values:ne.enumAlts,currentValue:(B==null?void 0:B.newClass)??ne.enumAlts[0],lockedValue:(B==null?void 0:B.newClass)??null,locked:!1,onStart:()=>ue("overlay",{type:"CLEAR_HIGHLIGHTS"}),onHover:U=>Bt(A,U),onLeave:()=>Bn(),onClick:U=>re(A,U)},`staged-${A}`)}return null}),Zs.filter(A=>!(yr&&me.has(A))).map(A=>{const ne=Yl(A);if(!ne)return null;if(ne.valueType==="scalar"){const B=vr(A,ne.scaleName,o);if(B.length>0)return i.jsx(Sn,{values:B,currentValue:B[Math.floor(B.length/2)],lockedValue:null,locked:!1,ghost:!0,onStart:()=>ue("overlay",{type:"CLEAR_HIGHLIGHTS"}),onHover:U=>Bt(A,U),onLeave:()=>Bn(),onClick:U=>re(A,U)},`pending-${A}`)}return ne.valueType==="enum"&&ne.enumAlts?i.jsx(Sn,{values:ne.enumAlts,currentValue:ne.enumAlts[0],lockedValue:null,locked:!1,ghost:!0,onStart:()=>ue("overlay",{type:"CLEAR_HIGHLIGHTS"}),onHover:B=>Bt(A,B),onLeave:()=>Bn(),onClick:B=>re(A,B)},`pending-${A}`):ne.valueType==="color"?i.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:B=>{b({cls:{property:"text",fullClass:"",section:"typography",color:""},anchorEl:B.currentTarget}),a(null)},children:[A==="text-color"?"text-":A,"color"]},`pending-${A}`):null})]},N)})]})}const F1=w.lazy(()=>_y(()=>import("./DesignMode-DiJSKaJo.js"),[]).then(e=>({default:e.DesignMode}))),Bh=new URLSearchParams(window.location.search),H1=Bh.get("mode"),xo=Bh.get("embedded")==="storybook",W1=[{id:"design",label:"Design"},{id:"replace",label:"Replace"}],B1=[{id:"place",label:"Place"}];function V1(e,t){const n=`<${t}>`;switch(e){case"before":return`Before ${n}`;case"after":return`After ${n}`;case"first-child":return`First in ${n}`;case"last-child":return`Last in ${n}`;default:return`${e} ${n}`}}function U1(){return H1==="design"?i.jsx(w.Suspense,{fallback:null,children:i.jsx(F1,{})}):i.jsx(G1,{})}function G1(){const[e,t]=w.useState(!1),[n,r]=w.useState(null),[o,l]=w.useState(0),[s,a]=w.useState(null),[u,c]=w.useState("design"),[f,p]=w.useState(!1),[d,m]=w.useState(!1),[v,b]=w.useState(null),S=Gx(),[h,g]=w.useState(!1),y=w.useMemo(()=>s==="insert"?B1:W1,[s]),x=w.useMemo(()=>s==="insert"?"place":u==="component"?"replace":"design",[s,u]);function k(O=!1){r(null),l(Q=>Q+1),m(!1),b(null),O||(ue("overlay",{type:"CLEAR_HIGHLIGHTS",deselect:!0}),s==="select"?(p(!0),ue("overlay",{type:"TOGGLE_SELECT_MODE",active:!0})):s==="insert"&&ue("overlay",{type:"MODE_CHANGED",mode:"insert"}))}function C(O,Q=!1){if(console.log("[panel-debug] handleModeChange",{newMode:O,currentMode:s,fromOverlay:Q,hasElement:!!n,hasInsertPoint:!!v}),O===s){if(n||v){k(Q);return}O=null}if(r(null),l(nt=>nt+1),m(!1),b(null),a(O),O===null){p(!1),Q||ue("overlay",{type:"CANCEL_MODE"});return}O==="insert"&&c(nt=>nt==="design"?"component":nt),Q||ue("overlay",{type:"MODE_CHANGED",mode:O}),p(O==="select")}function T(O,Q=!1){O==="replace"||O==="place"?c("component"):O==="design"&&c("design"),Q||ue("overlay",{type:"TAB_CHANGED",tab:O})}w.useEffect(()=>{const O=ix(()=>{if(t(!0),!xo)try{const q=localStorage.getItem("tw-panel-container");q&&q!=="popover"&&ue("overlay",{type:"SWITCH_CONTAINER",container:q})}catch{}}),Q=ax(()=>t(!1)),nt=Ss(q=>{q.type==="RESET_SELECTION"?(r(null),l(yt=>yt+1),m(!1),b(null),p(!1),a(null)):q.type==="DESELECT_ELEMENT"?k(!0):q.type==="ELEMENT_SELECTED"?(r({componentName:q.componentName,instanceCount:q.instanceCount,classes:q.classes,parsedClasses:Vy(q.classes,lx),tailwindConfig:q.tailwindConfig}),l(yt=>yt+1),p(!1),a(yt=>yt??"select")):q.type==="SELECT_MODE_CHANGED"?p(!!q.active):q.type==="MODE_CHANGED"?C(q.mode,!0):q.type==="TAB_CHANGED"?T(q.tab,!0):q.type==="TEXT_EDIT_ACTIVE"?m(!0):q.type==="TEXT_EDIT_DONE"?m(!1):q.type==="INSERT_POINT_LOCKED"?b({position:q.position,targetName:q.targetName}):q.type==="QUEUE_UPDATE"?S.handleQueueUpdate({draftCount:q.draftCount,committedCount:q.committedCount,implementingCount:q.implementingCount,implementedCount:q.implementedCount,partialCount:q.partialCount,errorCount:q.errorCount,draft:q.draft,commits:q.commits,agentWaiting:q.agentWaiting}):q.type==="PATCH_UPDATE"&&S.handlePatchUpdate({staged:q.staged,committed:q.committed,implementing:q.implementing,implemented:q.implemented,patches:q.patches})});return uh(),t(ux()),()=>{O(),Q(),nt()}},[]),w.useEffect(()=>{const O=Q=>{Q.key==="Escape"&&(n||v?k(!1):s!==null&&(a(null),p(!1),b(null),ue("overlay",{type:"CANCEL_MODE"})))};return document.addEventListener("keydown",O),()=>document.removeEventListener("keydown",O)},[n,v,s]);const{draft:j,committed:L,implementing:I,implemented:D,partial:V,error:H}=S.counts,_=(j>0||L>0)&&!S.agentWaiting&&I===0,F=new Map(S.patches.filter(O=>O.status==="staged").map(O=>[O.id,{id:O.id,kind:O.kind??"class-change",elementKey:O.elementKey,status:O.status,originalClass:O.originalClass,newClass:O.newClass,property:O.property,timestamp:O.timestamp,component:O.component,message:O.message,image:O.image}])),Y=new Set(S.queueState.draft.map(O=>O.id)),X=[...S.queueState.draft.map(O=>F.get(O.id)??O),...S.patches.filter(O=>O.status==="staged"&&!Y.has(O.id)).map(O=>F.get(O.id))],E=S.queueState.commits.filter(O=>O.status==="committed"),R=S.queueState.commits.filter(O=>O.status==="implementing"),P=S.queueState.commits.filter(O=>O.status==="implemented"),G="Please implement the next change and continue implementing changes with VyBit.";async function J(O){if(navigator.clipboard){try{if((await navigator.permissions.query({name:"clipboard-write"})).state==="denied"){Re(O);return}}catch{}navigator.clipboard.writeText(O).catch(()=>Re(O))}else Re(O)}function Ke(){J(G),g(!0),setTimeout(()=>g(!1),2e3)}function Re(O){const Q=document.createElement("textarea");Q.value=O,Q.style.position="fixed",Q.style.opacity="0",document.body.appendChild(Q),Q.select(),document.execCommand("copy"),document.body.removeChild(Q)}const ye=i.jsxs("div",{className:"shrink-0",children:[!e&&i.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:[i.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-bv-orange animate-pulse shrink-0"}),i.jsxs("span",{className:"flex-1 leading-tight",children:["No agent listening —"," ",i.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!"]}),i.jsx("button",{onClick:Ke,className:`shrink-0 px-1.5 py-0.5 rounded border font-semibold text-[9px] transition-colors ${h?"border-emerald-700/50 bg-emerald-900/40 text-emerald-300":"border-amber-700/50 bg-amber-900/40 hover:bg-amber-800/40 text-amber-300"}`,title:`Copy: "${G}"`,children:h?"Copied!":"Copy prompt"})]}),_&&i.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:[i.jsx("svg",{width:"12",height:"12",viewBox:"0 0 20 20",fill:"currentColor",className:"shrink-0 text-amber-400",children:i.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"})}),i.jsxs("span",{className:"flex-1 leading-tight",children:["No agent watching —"," ",i.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"]}),i.jsx("button",{onClick:Ke,className:`shrink-0 px-1.5 py-0.5 rounded border font-semibold text-[9px] transition-colors ${h?"border-emerald-700/50 bg-emerald-900/40 text-emerald-300":"border-amber-700/50 bg-amber-900/40 hover:bg-amber-800/40 text-amber-300"}`,title:`Copy: "${G}"`,children:h?"Copied!":"Copy prompt"})]}),i.jsxs("div",{className:"flex items-center justify-center px-3 py-1.5 border-t border-bv-border gap-3 text-[10px]",children:[i.jsx(Nl,{label:"draft",count:j,items:X,activeColor:"text-amber-400",onDiscard:O=>S.discard(O),onCommitAll:()=>S.commitAll(),onDiscardAll:()=>S.discardAll()}),i.jsx(Nl,{label:"committed",count:L,items:E.flatMap(O=>O.patches),activeColor:"text-bv-orange",onDiscard:O=>S.discardCommit(O)}),i.jsx(Nl,{label:"implementing",count:I,items:R.flatMap(O=>O.patches),activeColor:"text-blue-400"}),i.jsx(Nl,{label:"implemented",count:D,items:P.flatMap(O=>O.patches),activeColor:"text-bv-teal"})]})]});if(!n){const O=f||s==="insert"&&!v;return s===null?i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsx("div",{className:"px-3 pt-3 pb-2 border-b border-bv-border",children:i.jsxs("div",{className:"flex items-center justify-between gap-2",children:[i.jsx(Tl,{mode:s,onModeChange:C,isPicking:O}),!xo&&i.jsx(jl,{})]})}),i.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-4 p-6",children:[i.jsxs("button",{onClick:()=>C("select"),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:[i.jsx("div",{className:"w-14 h-14 rounded-full bg-bv-teal/10 text-bv-teal flex items-center justify-center",children:i.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 64 64",fill:"currentColor",children:[i.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"}),i.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"}),i.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"}),i.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"}),i.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"}),i.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"}),i.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"}),i.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"}),i.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"}),i.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"}),i.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"}),i.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"})]})}),i.jsx("span",{className:"text-[13px] text-bv-text font-medium",children:"Select an element"}),i.jsx("span",{className:"text-[11px] text-bv-text-mid text-center leading-relaxed",children:"to change its design, its text, or to replace it with something else"})]}),i.jsxs("button",{onClick:()=>C("insert"),className:"w-full flex flex-col items-center gap-3 px-6 py-4 rounded-lg border border-bv-border bg-bv-surface hover:border-bv-teal hover:bg-bv-teal/5 transition-all cursor-pointer",children:[i.jsx("div",{className:"w-14 h-14 rounded-full bg-bv-teal/10 text-bv-teal flex items-center justify-center",children:i.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"square",strokeLinejoin:"miter",children:[i.jsx("rect",{x:"4",y:"2",width:"16",height:"8",rx:"2"}),i.jsx("path",{d:"m17,14h1c1.105,0,2,.895,2,2"}),i.jsx("path",{d:"m4,16c0-1.105.895-2,2-2h1"}),i.jsx("path",{d:"m7,22h-1c-1.105,0-2-.895-2-2"}),i.jsx("path",{d:"m20,20c0,1.105-.895,2-2,2h-1"}),i.jsx("line",{x1:"13",y1:"14",x2:"11",y2:"14"}),i.jsx("line",{x1:"13",y1:"22",x2:"11",y2:"22"})]})}),i.jsx("span",{className:"text-[13px] text-bv-text font-medium",children:"Insert to add new content"})]}),i.jsxs("button",{onClick:()=>C("bug-report"),className:"w-full flex flex-col items-center gap-3 px-6 py-4 rounded-lg border border-bv-border bg-bv-surface hover:border-bv-teal hover:bg-bv-teal/5 transition-all cursor-pointer",children:[i.jsx("div",{className:"w-14 h-14 rounded-full bg-bv-teal/10 text-bv-teal flex items-center justify-center",children:i.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 16 16",fill:"currentColor",children:[i.jsx("path",{d:"M11.5,6C11.5,4.067,9.933,2.5,8,2.5S4.5,4.067,4.5,6v1h7V6Z"}),i.jsx("rect",{x:"3",y:"8",width:"10",height:"6",rx:"2"}),i.jsx("path",{d:"M1,5.5h2.2C3.07,5.01,3,4.51,3,4h0V3.5H1c-.552,0-1,.448-1,1S.448,5.5,1,5.5Z"}),i.jsx("path",{d:"M15,3.5h-2c0,.51-.07,1.01-.2,1.5H15c.552,0,1-.448,1-1s-.448-1-1-1Z"}),i.jsx("path",{d:"M1,11.5h2.05c.232,.89,.62,1.71,1.13,2.5H1c-.552,0-1-.448-1-1s.448-1,1-1h0Z"}),i.jsx("path",{d:"M15,10.5h-2.05c-.232,.89-.62,1.71-1.13,2.5h3.18c.552,0,1-.448,1-1s-.448-1-1-1Z"}),i.jsx("path",{d:"M1,7.5h2v2H1c-.552,0-1-.448-1-1s.448-1,1-1Z"}),i.jsx("path",{d:"M13,7.5h2c.552,0,1,.448,1,1s-.448,1-1,1h-2v-2Z"}),i.jsx("rect",{x:"7",y:"9",width:"2",height:"4",rx:".5"})]})}),i.jsx("span",{className:"text-[13px] text-bv-text font-medium",children:"Report a bug"}),i.jsx("span",{className:"text-[11px] text-bv-text-mid text-center leading-relaxed",children:"Select events from recording history and describe the issue"})]})]}),ye]}):s==="bug-report"?i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsx("div",{className:"px-3 pt-3 pb-2 border-b border-bv-border",children:i.jsxs("div",{className:"flex items-center justify-between gap-2",children:[i.jsx(Tl,{mode:s,onModeChange:C,isPicking:O}),i.jsx("div",{className:"flex-1 min-w-0",children:i.jsx("span",{className:"font-[family-name:var(--font-display)] font-bold text-[13px] text-bv-text leading-tight",children:"Bug Report"})}),!xo&&i.jsx(jl,{})]})}),i.jsx(Vx,{onSubmit:Q=>{var q;const nt={id:crypto.randomUUID(),kind:"bug-report",elementKey:((q=Q.bugElement)==null?void 0:q.selectorPath)??"bug-report",status:"staged",originalClass:"",newClass:"",property:"bug-report",timestamp:new Date().toISOString(),bugDescription:Q.bugDescription,bugScreenshots:Q.bugScreenshots,bugTimeline:Q.bugTimeline,bugTimeRange:Q.bugTimeRange,bugElement:Q.bugElement};jn({type:"BUG_REPORT_STAGE",patch:nt})}}),ye]}):i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsx("div",{className:"px-3 pt-3 pb-2 border-b border-bv-border",children:i.jsxs("div",{className:"flex items-center justify-between gap-2",children:[i.jsx(Tl,{mode:s,onModeChange:C,isPicking:O}),i.jsx("div",{className:"flex-1 min-w-0",children:s==="insert"?i.jsx("span",{className:"text-[11px] text-bv-teal font-medium",children:v?V1(v.position,v.targetName):"Pick a placement on the page"}):f?i.jsx("span",{className:"text-[11px] text-bv-teal font-medium",children:"Click an element on the page"}):i.jsx("span",{className:"text-[12px] text-bv-muted",children:"No element selected"})}),!xo&&i.jsx(jl,{})]})}),i.jsx(hd,{tabs:y,activeTab:x,onTabChange:T}),i.jsx("div",{className:"flex-1 overflow-auto",children:x==="replace"?i.jsx(El,{insertMode:"replace"}):x==="place"?i.jsx(El,{insertMode:"place"}):f?i.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 p-8",children:[i.jsx("div",{className:"w-10 h-10 rounded-full bg-bv-teal text-white flex items-center justify-center",children:i.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 16 16",fill:"currentColor",children:[i.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"}),i.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"})]})}),i.jsx("span",{className:"text-[12px] text-bv-teal font-medium",children:"Selection mode active"}),i.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.",i.jsx("br",{}),"Press"," ",i.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."]})]}):i.jsx("div",{className:"flex flex-1 flex-col justify-center p-4",children:i.jsxs("button",{onClick:()=>{p(!0),ue("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:[i.jsx("div",{className:"w-14 h-14 rounded-full bg-bv-teal/10 text-bv-teal flex items-center justify-center",children:i.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 64 64",fill:"currentColor",children:[i.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"}),i.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"}),i.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"}),i.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"}),i.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"}),i.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"}),i.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"}),i.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"}),i.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"}),i.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"}),i.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"}),i.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"})]})}),i.jsx("span",{className:"text-[12px] text-bv-text font-medium",children:"Select an element to inspect"}),i.jsxs("span",{className:"inline-flex items-center gap-1",children:[i.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:"⌘"}),i.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:"⇧"}),i.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"})]})]})})}),ye]})}const de=n.parsedClasses;return i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsx("div",{className:"px-3 pt-3 pb-2 border-b border-bv-border",children:i.jsxs("div",{className:"flex items-center justify-between gap-2",children:[i.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[i.jsx(Tl,{mode:s,onModeChange:C,isPicking:f}),i.jsxs("div",{className:"font-[family-name:var(--font-display)] font-bold text-[13px] text-bv-text leading-tight truncate",children:[n.componentName," ",i.jsxs("span",{className:"font-[family-name:var(--font-ui)] font-normal text-bv-text-mid",children:["— ",n.instanceCount," instance",n.instanceCount!==1?"s":""]})]})]}),!xo&&i.jsx(jl,{})]})}),i.jsx(hd,{tabs:y,activeTab:x,onTabChange:T}),d&&i.jsx("div",{className:"px-3 py-2 bg-bv-teal/10 border-b border-bv-teal/30 text-xs text-bv-teal font-medium",children:"Editing text in the page…"}),i.jsxs("div",{className:`flex-1 overflow-auto ${d?"opacity-40 pointer-events-none":""}`,children:[x==="design"&&i.jsx(K1,{componentName:n.componentName,instanceCount:n.instanceCount,rawClasses:n.classes,parsedClasses:de,tailwindConfig:n.tailwindConfig,patchManager:S},o),x==="replace"&&i.jsx(El,{insertMode:"replace"}),x==="place"&&i.jsx(El,{insertMode:"place"})]}),ye]})}Wi.createRoot(document.getElementById("root")).render(i.jsx(tf.StrictMode,{children:i.jsx(U1,{})}));export{Ss as a,uh as c,i as j,ix as o,w as r,jn as s};
|