node-karin 1.3.6-pr.260.995e489 → 1.3.6-pr.260.d85512c
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/dist/web/assets/{index-iMVfs-2G.js → index-4cr7DRr6.js} +6 -6
- package/dist/web/assets/index-B7_4fTZC.js +1 -0
- package/dist/web/assets/index-Dm_gigSn.js +1 -0
- package/dist/web/index.html +1 -1
- package/package.json +1 -1
- package/dist/web/assets/index-CGOi-AYz.js +0 -1
- package/dist/web/assets/index-CHATu7tP.js +0 -1
|
@@ -97,12 +97,12 @@ Please change the parent <Route path="${S}"> to <Route path="${S==="/"?"*":`${S}
|
|
|
97
97
|
*
|
|
98
98
|
* This source code is licensed under the MIT license found in the
|
|
99
99
|
* LICENSE file in the root directory of this source tree.
|
|
100
|
-
*/function YAe(r,e,t){return Math.min(Math.max(r,e),t)}var ZAe=(r,e)=>{if(!r&&!e)return{};const t=new Set([...Object.keys(r||{}),...Object.keys(e||{})]);return Array.from(t).reduce((n,a)=>({...n,[a]:Cr(r==null?void 0:r[a],e==null?void 0:e[a])}),{})};function B8(r={}){const{strict:e=!0,errorMessage:t="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:n}=r,a=D.createContext(void 0);a.displayName=n;function i(){var o;const s=D.useContext(a);if(!s&&e){const l=new Error(t);throw l.name="ContextError",(o=Error.captureStackTrace)==null||o.call(Error,l,i),l}return s}return[a.Provider,i,a]}function XAe(r){return{UNSAFE_getDOMNode(){return r.current}}}function bc(r){const e=D.useRef(null);return D.useImperativeHandle(r,()=>e.current),e}function JAe(r,e){if(r!=null){if(zAe(r)){r(e);return}try{r.current=e}catch{throw new Error(`Cannot assign value '${e}' to ref '${r}'`)}}}function V8(...r){return e=>{r.forEach(t=>JAe(t,e))}}var e3e=(r,e)=>{var t;let n=[];const a=(t=D.Children.map(r,o=>D.isValidElement(o)&&o.type===e?(n.push(o),null):o))==null?void 0:t.filter(Boolean),i=n.length>=0?n:void 0;return[a,i]},t3e=new Set(["id","type","style","title","role","tabIndex","htmlFor","width","height","abbr","accept","acceptCharset","accessKey","action","allowFullScreen","allowTransparency","alt","async","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","challenge","charset","checked","cite","class","className","cols","colSpan","command","content","contentEditable","contextMenu","controls","coords","crossOrigin","data","dateTime","default","defer","dir","disabled","download","draggable","dropzone","encType","enterKeyHint","for","form","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","headers","hidden","high","href","hrefLang","httpEquiv","icon","inputMode","isMap","itemId","itemProp","itemRef","itemScope","itemType","kind","label","lang","list","loop","manifest","max","maxLength","media","mediaGroup","method","min","minLength","multiple","muted","name","noValidate","open","optimum","pattern","ping","placeholder","poster","preload","radioGroup","referrerPolicy","readOnly","rel","required","rows","rowSpan","sandbox","scope","scoped","scrolling","seamless","selected","shape","size","sizes","slot","sortable","span","spellCheck","src","srcDoc","srcSet","start","step","target","translate","typeMustMatch","useMap","value","wmode","wrap"]),r3e=new Set(["onCopy","onCut","onPaste","onLoad","onError","onWheel","onScroll","onCompositionEnd","onCompositionStart","onCompositionUpdate","onKeyDown","onKeyPress","onKeyUp","onFocus","onBlur","onChange","onInput","onSubmit","onClick","onContextMenu","onDoubleClick","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onPointerDown","onPointerEnter","onPointerLeave","onPointerUp","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionEnd"]),gF=/^(data-.*)$/,n3e=/^(aria-.*)$/,DS=/^(on[A-Z].*)$/;function av(r,e={}){let{labelable:t=!0,enabled:n=!0,propNames:a,omitPropNames:i,omitEventNames:o,omitDataProps:s,omitEventProps:l}=e,u={};if(!n)return r;for(const c in r)i!=null&&i.has(c)||o!=null&&o.has(c)&&DS.test(c)||DS.test(c)&&!r3e.has(c)||s&&gF.test(c)||l&&DS.test(c)||(Object.prototype.hasOwnProperty.call(r,c)&&(t3e.has(c)||t&&n3e.test(c)||a!=null&&a.has(c)||gF.test(c))||DS.test(c))&&(u[c]=r[c]);return u}var d3=globalThis!=null&&globalThis.document?D.useLayoutEffect:D.useEffect;function oT(r){const e=po(r);if(mI()==="virtual"){let t=e.activeElement;rte(()=>{e.activeElement===t&&r.isConnected&&gc(r)})}else gc(r)}function a3e(r){const e=Zp(r);if(!(r instanceof e.HTMLElement)&&!(r instanceof e.SVGElement))return!1;let{display:t,visibility:n}=r.style,a=t!=="none"&&n!=="hidden"&&n!=="collapse";if(a){const{getComputedStyle:i}=r.ownerDocument.defaultView;let{display:o,visibility:s}=i(r);a=o!=="none"&&s!=="hidden"&&s!=="collapse"}return a}function i3e(r,e){return!r.hasAttribute("hidden")&&!r.hasAttribute("data-react-aria-prevent-focus")&&(r.nodeName==="DETAILS"&&e&&e.nodeName!=="SUMMARY"?r.hasAttribute("open"):!0)}function mne(r,e){return r.nodeName!=="#comment"&&a3e(r)&&i3e(r,e)&&(!r.parentElement||mne(r.parentElement,r))}const F8=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])'],o3e=F8.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";F8.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const s3e=F8.join(':not([hidden]):not([tabindex="-1"]),');function yne(r,e){return!r||!e?!1:e.some(t=>t.contains(r))}function l3e(r,e,t){let n=e!=null&&e.tabbable?s3e:o3e,a=po(r).createTreeWalker(r,NodeFilter.SHOW_ELEMENT,{acceptNode(i){var o;return!(e==null||(o=e.from)===null||o===void 0)&&o.contains(i)?NodeFilter.FILTER_REJECT:i.matches(n)&&mne(i)&&(!t||yne(i,t))&&(!(e!=null&&e.accept)||e.accept(i))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return e!=null&&e.from&&(a.currentNode=e.from),a}class H8{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,n){let a=this.fastMap.get(t??null);if(!a)return;let i=new mF({scopeRef:e});a.addChild(i),i.parent=a,this.fastMap.set(e,i),n&&(i.nodeToRestore=n)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(e===null)return;let t=this.fastMap.get(e);if(!t)return;let n=t.parent;for(let i of this.traverse())i!==t&&t.nodeToRestore&&i.nodeToRestore&&t.scopeRef&&t.scopeRef.current&&yne(i.nodeToRestore,t.scopeRef.current)&&(i.nodeToRestore=t.nodeToRestore);let a=t.children;n&&(n.removeChild(t),a.size>0&&a.forEach(i=>n&&n.addChild(i))),this.fastMap.delete(t.scopeRef)}*traverse(e=this.root){if(e.scopeRef!=null&&(yield e),e.children.size>0)for(let t of e.children)yield*this.traverse(t)}clone(){var e;let t=new H8;var n;for(let a of this.traverse())t.addTreeNode(a.scopeRef,(n=(e=a.parent)===null||e===void 0?void 0:e.scopeRef)!==null&&n!==void 0?n:null,a.nodeToRestore);return t}constructor(){this.fastMap=new Map,this.root=new mF({scopeRef:null}),this.fastMap.set(null,this.root)}}class mF{addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}}new H8;let u3e=Be.createContext(null);function c3e(r){let e=D.useContext(u3e)||{};ate(e,r);let{ref:t,...n}=e;return n}function bne(r,e){let{focusProps:t}=pte(r),{keyboardProps:n}=bte(r),a=gs(t,n),i=c3e(e),o=r.isDisabled?{}:i,s=D.useRef(r.autoFocus);return D.useEffect(()=>{s.current&&e.current&&oT(e.current),s.current=!1},[e]),{focusableProps:gs({...a,tabIndex:r.excludeFromTabOrder&&!r.isDisabled?-1:void 0},o)}}function xne(r,e,t){let{isDisabled:n=!1,isReadOnly:a=!1,value:i,name:o,children:s,"aria-label":l,"aria-labelledby":u,validationState:c="valid",isInvalid:d}=r,f=M=>{M.stopPropagation(),e.setSelected(M.target.checked)},h=s!=null,v=l!=null||u!=null;!h&&!v&&console.warn("If you do not provide children, you must specify an aria-label for accessibility");let{pressProps:m,isPressed:y}=dx({isDisabled:n}),{pressProps:b,isPressed:w}=dx({isDisabled:n||a,onPress(){e.toggle()}}),{focusableProps:S}=bne(r,t),T=gs(m,S),A=cSe(r,{labelable:!0});return ESe(t,e.isSelected,e.setSelected),{labelProps:gs(b,{onClick:M=>M.preventDefault()}),inputProps:gs(A,{"aria-invalid":d||c==="invalid"||void 0,"aria-errormessage":r["aria-errormessage"],"aria-controls":r["aria-controls"],"aria-readonly":a||void 0,onChange:f,disabled:n,...i==null?{}:{value:i},name:o,type:"checkbox",...T}),isSelected:e.isSelected,isPressed:y||w,isDisabled:n,isReadOnly:a,isInvalid:d||c==="invalid"}}function d3e(r,e,t){let{labelProps:n,inputProps:a,isSelected:i,isPressed:o,isDisabled:s,isReadOnly:l}=xne(r,e,t);return{labelProps:n,inputProps:{...a,role:"switch",checked:i},isSelected:i,isPressed:o,isDisabled:s,isReadOnly:l}}function U8(r={}){let{isReadOnly:e}=r,[t,n]=bl(r.isSelected,r.defaultSelected||!1,r.onChange);function a(o){e||n(o)}function i(){e||n(!t)}return{isSelected:t,setSelected:a,toggle:i}}function wne(r={}){var e,t;const n=Vr(),[a,i]=oa(r,aF.variantKeys),{ref:o,as:s,name:l,value:u="",isReadOnly:c=!1,autoFocus:d=!1,startContent:f,endContent:h,defaultSelected:v,isSelected:m,children:y,thumbIcon:b,className:w,classNames:S,onChange:T,onValueChange:A,...M}=a,P=s||"label",E=D.useRef(null),R=D.useRef(null),N=(t=(e=r.disableAnimation)!=null?e:n==null?void 0:n.disableAnimation)!=null?t:!1,k=D.useId(),O=D.useMemo(()=>{const ie=M["aria-label"]||typeof y=="string"?y:void 0;return{name:l,value:u,children:y,autoFocus:d,defaultSelected:v,isSelected:m,isDisabled:!!r.isDisabled,isReadOnly:c,"aria-label":ie,"aria-labelledby":M["aria-labelledby"]||k,onChange:A}},[u,l,k,y,d,c,m,v,r.isDisabled,M["aria-label"],M["aria-labelledby"],A]),L=U8(O);d3(()=>{if(!R.current)return;const ie=!!R.current.checked;L.setSelected(ie)},[R.current]);const{inputProps:$,isPressed:j,isReadOnly:B}=d3e(O,L,R),{focusProps:H,isFocused:F,isFocusVisible:K}=Rn({autoFocus:$.autoFocus}),{hoverProps:U,isHovered:V}=Ia({isDisabled:$.disabled}),Z=O.isDisabled||B?!1:j,Y=$.checked,X=$.disabled,re=D.useMemo(()=>aF({...i,disableAnimation:N}),[Xc(i),N]),oe=Cr(S==null?void 0:S.base,w),ae=ie=>({...ze(U,M,ie),ref:E,className:re.base({class:Cr(oe,ie==null?void 0:ie.className)}),"data-disabled":ht(X),"data-selected":ht(Y),"data-readonly":ht(B),"data-focus":ht(F),"data-focus-visible":ht(K),"data-hover":ht(V),"data-pressed":ht(Z)}),se=D.useCallback((ie={})=>({...ie,"aria-hidden":!0,className:Cr(re.wrapper({class:Cr(S==null?void 0:S.wrapper,ie==null?void 0:ie.className)}))}),[re,S==null?void 0:S.wrapper]),le=(ie={})=>({...ze($,H,ie),ref:V8(R,o),id:$.id,className:re.hiddenInput({class:S==null?void 0:S.hiddenInput}),onChange:Un(T,$.onChange)}),fe=D.useCallback((ie={})=>({...ie,className:re.thumb({class:Cr(S==null?void 0:S.thumb,ie==null?void 0:ie.className)})}),[re,S==null?void 0:S.thumb]),ve=D.useCallback((ie={})=>({...ie,id:k,className:re.label({class:Cr(S==null?void 0:S.label,ie==null?void 0:ie.className)})}),[re,S==null?void 0:S.label,X,Y]),pe=D.useCallback((ie={includeStateProps:!1})=>ze({width:"1em",height:"1em",className:re.thumbIcon({class:Cr(S==null?void 0:S.thumbIcon)})},ie.includeStateProps?{isSelected:Y}:{}),[re,S==null?void 0:S.thumbIcon,Y]),Re=D.useCallback((ie={})=>({width:"1em",height:"1em",...ie,className:re.startContent({class:Cr(S==null?void 0:S.startContent,ie==null?void 0:ie.className)})}),[re,S==null?void 0:S.startContent,Y]),Ae=D.useCallback((ie={})=>({width:"1em",height:"1em",...ie,className:re.endContent({class:Cr(S==null?void 0:S.endContent,ie==null?void 0:ie.className)})}),[re,S==null?void 0:S.endContent,Y]);return{Component:P,slots:re,classNames:S,domRef:E,children:y,thumbIcon:b,startContent:f,endContent:h,isHovered:V,isSelected:Y,isPressed:Z,isFocused:F,isFocusVisible:K,isDisabled:X,getBaseProps:ae,getWrapperProps:se,getInputProps:le,getLabelProps:ve,getThumbProps:fe,getThumbIconProps:pe,getStartContentProps:Re,getEndContentProps:Ae}}var Sne=Ht((r,e)=>{const{Component:t,children:n,startContent:a,endContent:i,thumbIcon:o,getBaseProps:s,getInputProps:l,getWrapperProps:u,getThumbProps:c,getThumbIconProps:d,getLabelProps:f,getStartContentProps:h,getEndContentProps:v}=wne({...r,ref:e}),m=typeof o=="function"?o(d({includeStateProps:!0})):o&&D.cloneElement(o,d()),y=a&&D.cloneElement(a,h()),b=i&&D.cloneElement(i,v());return _.jsxs(t,{...s(),children:[_.jsx("input",{...l()}),_.jsxs("span",{...u(),children:[a&&y,_.jsx("span",{...c(),children:o&&m}),i&&b]}),n&&_.jsx("span",{...f(),children:n})]})});Sne.displayName="HeroUI.Switch";var _ne=Sne,f3e=function(r){return function(e,t){var n=D.useRef(!1);r(function(){return function(){n.current=!1}},[]),r(function(){if(!n.current)n.current=!0;else return e()},t)}},sT=function(r){return typeof r=="function"},h3e=function(r){return typeof r>"u"};function up(r){var e=D.useRef(r);e.current=D.useMemo(function(){return r},[r]);var t=D.useRef();return t.current||(t.current=function(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];return e.current.apply(this,n)}),t.current}const lT=f3e(D.useEffect);var Cne=function(r,e){var t=e.manual,n=e.ready,a=n===void 0?!0:n,i=e.defaultParams,o=i===void 0?[]:i,s=e.refreshDeps,l=s===void 0?[]:s,u=e.refreshDepsAction,c=D.useRef(!1);return c.current=!1,lT(function(){!t&&a&&(c.current=!0,r.run.apply(r,ii([],Ba(o),!1)))},[a]),lT(function(){c.current||t||(c.current=!0,u?u():r.refresh())},ii([],Ba(l),!1)),{onBefore:function(){if(!a)return{stopNow:!0}}}};Cne.onInit=function(r){var e=r.ready,t=e===void 0?!0:e,n=r.manual;return{loading:!n&&t}};function jI(r,e){if(r===e)return!0;for(var t=0;t<r.length;t++)if(!Object.is(r[t],e[t]))return!1;return!0}function Tne(r,e){var t=D.useRef({deps:e,obj:void 0,initialized:!1}).current;return(t.initialized===!1||!jI(t.deps,e))&&(t.deps=e,t.obj=r(),t.initialized=!0),t.obj}function G8(r){var e=D.useRef(r);return e.current=r,e}var f3=function(r){var e=G8(r);D.useEffect(function(){return function(){e.current()}},[])},iC=new Map,p3e=function(r,e,t){var n=iC.get(r);n!=null&&n.timer&&clearTimeout(n.timer);var a=void 0;e>-1&&(a=setTimeout(function(){iC.delete(r)},e)),iC.set(r,Zs(Zs({},t),{timer:a}))},v3e=function(r){return iC.get(r)},oC=new Map,g3e=function(r){return oC.get(r)},m3e=function(r,e){oC.set(r,e),e.then(function(t){return oC.delete(r),t}).catch(function(){oC.delete(r)})},yp={},y3e=function(r,e){yp[r]&&yp[r].forEach(function(t){return t(e)})},uM=function(r,e){return yp[r]||(yp[r]=[]),yp[r].push(e),function(){var n=yp[r].indexOf(e);yp[r].splice(n,1)}},b3e=function(r,e){var t=e.cacheKey,n=e.cacheTime,a=n===void 0?5*60*1e3:n,i=e.staleTime,o=i===void 0?0:i,s=e.setCache,l=e.getCache,u=D.useRef(),c=D.useRef(),d=function(h,v){s?s(v):p3e(h,a,v),y3e(h,v.data)},f=function(h,v){return v===void 0&&(v=[]),l?l(v):v3e(h)};return Tne(function(){if(t){var h=f(t);h&&Object.hasOwnProperty.call(h,"data")&&(r.state.data=h.data,r.state.params=h.params,(o===-1||new Date().getTime()-h.time<=o)&&(r.state.loading=!1)),u.current=uM(t,function(v){r.setState({data:v})})}},[]),f3(function(){var h;(h=u.current)===null||h===void 0||h.call(u)}),t?{onBefore:function(h){var v=f(t,h);return!v||!Object.hasOwnProperty.call(v,"data")?{}:o===-1||new Date().getTime()-v.time<=o?{loading:!1,data:v==null?void 0:v.data,error:void 0,returnNow:!0}:{data:v==null?void 0:v.data,error:void 0}},onRequest:function(h,v){var m=g3e(t);return m&&m!==c.current?{servicePromise:m}:(m=h.apply(void 0,ii([],Ba(v),!1)),c.current=m,m3e(t,m),{servicePromise:m})},onSuccess:function(h,v){var m;t&&((m=u.current)===null||m===void 0||m.call(u),d(t,{data:h,params:v,time:new Date().getTime()}),u.current=uM(t,function(y){r.setState({data:y})}))},onMutate:function(h){var v;t&&((v=u.current)===null||v===void 0||v.call(u),d(t,{data:h,params:r.state.params,time:new Date().getTime()}),u.current=uM(t,function(m){r.setState({data:m})}))}}:{}},cM,yF;function q8(){if(yF)return cM;yF=1;function r(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}return cM=r,cM}var dM,bF;function x3e(){if(bF)return dM;bF=1;var r=typeof fs=="object"&&fs&&fs.Object===Object&&fs;return dM=r,dM}var fM,xF;function Ane(){if(xF)return fM;xF=1;var r=x3e(),e=typeof self=="object"&&self&&self.Object===Object&&self,t=r||e||Function("return this")();return fM=t,fM}var hM,wF;function w3e(){if(wF)return hM;wF=1;var r=Ane(),e=function(){return r.Date.now()};return hM=e,hM}var pM,SF;function S3e(){if(SF)return pM;SF=1;var r=/\s/;function e(t){for(var n=t.length;n--&&r.test(t.charAt(n)););return n}return pM=e,pM}var vM,_F;function _3e(){if(_F)return vM;_F=1;var r=S3e(),e=/^\s+/;function t(n){return n&&n.slice(0,r(n)+1).replace(e,"")}return vM=t,vM}var gM,CF;function Ene(){if(CF)return gM;CF=1;var r=Ane(),e=r.Symbol;return gM=e,gM}var mM,TF;function C3e(){if(TF)return mM;TF=1;var r=Ene(),e=Object.prototype,t=e.hasOwnProperty,n=e.toString,a=r?r.toStringTag:void 0;function i(o){var s=t.call(o,a),l=o[a];try{o[a]=void 0;var u=!0}catch{}var c=n.call(o);return u&&(s?o[a]=l:delete o[a]),c}return mM=i,mM}var yM,AF;function T3e(){if(AF)return yM;AF=1;var r=Object.prototype,e=r.toString;function t(n){return e.call(n)}return yM=t,yM}var bM,EF;function A3e(){if(EF)return bM;EF=1;var r=Ene(),e=C3e(),t=T3e(),n="[object Null]",a="[object Undefined]",i=r?r.toStringTag:void 0;function o(s){return s==null?s===void 0?a:n:i&&i in Object(s)?e(s):t(s)}return bM=o,bM}var xM,MF;function E3e(){if(MF)return xM;MF=1;function r(e){return e!=null&&typeof e=="object"}return xM=r,xM}var wM,DF;function M3e(){if(DF)return wM;DF=1;var r=A3e(),e=E3e(),t="[object Symbol]";function n(a){return typeof a=="symbol"||e(a)&&r(a)==t}return wM=n,wM}var SM,LF;function D3e(){if(LF)return SM;LF=1;var r=_3e(),e=q8(),t=M3e(),n=NaN,a=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt;function l(u){if(typeof u=="number")return u;if(t(u))return n;if(e(u)){var c=typeof u.valueOf=="function"?u.valueOf():u;u=e(c)?c+"":c}if(typeof u!="string")return u===0?u:+u;u=r(u);var d=i.test(u);return d||o.test(u)?s(u.slice(2),d?2:8):a.test(u)?n:+u}return SM=l,SM}var _M,PF;function Mne(){if(PF)return _M;PF=1;var r=q8(),e=w3e(),t=D3e(),n="Expected a function",a=Math.max,i=Math.min;function o(s,l,u){var c,d,f,h,v,m,y=0,b=!1,w=!1,S=!0;if(typeof s!="function")throw new TypeError(n);l=t(l)||0,r(u)&&(b=!!u.leading,w="maxWait"in u,f=w?a(t(u.maxWait)||0,l):f,S="trailing"in u?!!u.trailing:S);function T(L){var $=c,j=d;return c=d=void 0,y=L,h=s.apply(j,$),h}function A(L){return y=L,v=setTimeout(E,l),b?T(L):h}function M(L){var $=L-m,j=L-y,B=l-$;return w?i(B,f-j):B}function P(L){var $=L-m,j=L-y;return m===void 0||$>=l||$<0||w&&j>=f}function E(){var L=e();if(P(L))return R(L);v=setTimeout(E,M(L))}function R(L){return v=void 0,S&&c?T(L):(c=d=void 0,h)}function N(){v!==void 0&&clearTimeout(v),y=0,c=m=d=v=void 0}function k(){return v===void 0?h:R(e())}function O(){var L=e(),$=P(L);if(c=arguments,d=this,m=L,$){if(v===void 0)return A(m);if(w)return clearTimeout(v),v=setTimeout(E,l),T(m)}return v===void 0&&(v=setTimeout(E,l)),h}return O.cancel=N,O.flush=k,O}return _M=o,_M}var L3e=Mne();const P3e=wu(L3e);var I3e=function(r,e){var t=e.debounceWait,n=e.debounceLeading,a=e.debounceTrailing,i=e.debounceMaxWait,o=D.useRef(),s=D.useMemo(function(){var l={};return n!==void 0&&(l.leading=n),a!==void 0&&(l.trailing=a),i!==void 0&&(l.maxWait=i),l},[n,a,i]);return D.useEffect(function(){if(t){var l=r.runAsync.bind(r);return o.current=P3e(function(u){u()},t,s),r.runAsync=function(){for(var u=[],c=0;c<arguments.length;c++)u[c]=arguments[c];return new Promise(function(d,f){var h;(h=o.current)===null||h===void 0||h.call(o,function(){l.apply(void 0,ii([],Ba(u),!1)).then(d).catch(f)})})},function(){var u;(u=o.current)===null||u===void 0||u.cancel(),r.runAsync=l}}},[t,s]),t?{onCancel:function(){var l;(l=o.current)===null||l===void 0||l.cancel()}}:{}},k3e=function(r,e){var t=e.loadingDelay,n=e.ready,a=D.useRef();if(!t)return{};var i=function(){a.current&&clearTimeout(a.current)};return{onBefore:function(){return i(),n!==!1&&(a.current=setTimeout(function(){r.setState({loading:!0})},t)),{loading:!1}},onFinally:function(){i()},onCancel:function(){i()}}},I0=!!(typeof window<"u"&&window.document&&window.document.createElement);function Q8(){return I0?document.visibilityState!=="hidden":!0}var Lb=[];function R3e(r){return Lb.push(r),function(){var t=Lb.indexOf(r);Lb.splice(t,1)}}if(I0){var N3e=function(){if(Q8())for(var r=0;r<Lb.length;r++){var e=Lb[r];e()}};window.addEventListener("visibilitychange",N3e,!1)}var O3e=function(r,e){var t=e.pollingInterval,n=e.pollingWhenHidden,a=n===void 0?!0:n,i=e.pollingErrorRetryCount,o=i===void 0?-1:i,s=D.useRef(),l=D.useRef(),u=D.useRef(0),c=function(){var d;s.current&&clearTimeout(s.current),(d=l.current)===null||d===void 0||d.call(l)};return lT(function(){t||c()},[t]),t?{onBefore:function(){c()},onError:function(){u.current+=1},onSuccess:function(){u.current=0},onFinally:function(){o===-1||o!==-1&&u.current<=o?s.current=setTimeout(function(){!a&&!Q8()?l.current=R3e(function(){r.refresh()}):r.refresh()},t):u.current=0},onCancel:function(){c()}}:{}};function $3e(r,e){var t=!1;return function(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];t||(t=!0,r.apply(void 0,ii([],Ba(n),!1)),setTimeout(function(){t=!1},e))}}function z3e(){return I0&&typeof navigator.onLine<"u"?navigator.onLine:!0}var Pb=[];function j3e(r){return Pb.push(r),function(){var t=Pb.indexOf(r);t>-1&&Pb.splice(t,1)}}if(I0){var IF=function(){if(!(!Q8()||!z3e()))for(var r=0;r<Pb.length;r++){var e=Pb[r];e()}};window.addEventListener("visibilitychange",IF,!1),window.addEventListener("focus",IF,!1)}var B3e=function(r,e){var t=e.refreshOnWindowFocus,n=e.focusTimespan,a=n===void 0?5e3:n,i=D.useRef(),o=function(){var s;(s=i.current)===null||s===void 0||s.call(i)};return D.useEffect(function(){if(t){var s=$3e(r.refresh.bind(r),a);i.current=j3e(function(){s()})}return function(){o()}},[t,a]),f3(function(){o()}),{}},V3e=function(r,e){var t=e.retryInterval,n=e.retryCount,a=D.useRef(),i=D.useRef(0),o=D.useRef(!1);return n?{onBefore:function(){o.current||(i.current=0),o.current=!1,a.current&&clearTimeout(a.current)},onSuccess:function(){i.current=0},onError:function(){if(i.current+=1,n===-1||i.current<=n){var s=t??Math.min(1e3*Math.pow(2,i.current),3e4);a.current=setTimeout(function(){o.current=!0,r.refresh()},s)}else i.current=0},onCancel:function(){i.current=0,a.current&&clearTimeout(a.current)}}:{}},CM,kF;function F3e(){if(kF)return CM;kF=1;var r=Mne(),e=q8(),t="Expected a function";function n(a,i,o){var s=!0,l=!0;if(typeof a!="function")throw new TypeError(t);return e(o)&&(s="leading"in o?!!o.leading:s,l="trailing"in o?!!o.trailing:l),r(a,i,{leading:s,maxWait:i,trailing:l})}return CM=n,CM}var H3e=F3e();const U3e=wu(H3e);var G3e=function(r,e){var t=e.throttleWait,n=e.throttleLeading,a=e.throttleTrailing,i=D.useRef(),o={};return n!==void 0&&(o.leading=n),a!==void 0&&(o.trailing=a),D.useEffect(function(){if(t){var s=r.runAsync.bind(r);return i.current=U3e(function(l){l()},t,o),r.runAsync=function(){for(var l=[],u=0;u<arguments.length;u++)l[u]=arguments[u];return new Promise(function(c,d){var f;(f=i.current)===null||f===void 0||f.call(i,function(){s.apply(void 0,ii([],Ba(l),!1)).then(c).catch(d)})})},function(){var l;r.runAsync=s,(l=i.current)===null||l===void 0||l.cancel()}}},[t,n,a]),t?{onCancel:function(){var s;(s=i.current)===null||s===void 0||s.cancel()}}:{}},q3e=function(r){D.useEffect(function(){r==null||r()},[])},Q3e=function(){var r=Ba(D.useState({}),2),e=r[1];return D.useCallback(function(){return e({})},[])},W3e=function(){function r(e,t,n,a){a===void 0&&(a={}),this.serviceRef=e,this.options=t,this.subscribe=n,this.initState=a,this.count=0,this.state={loading:!1,params:void 0,data:void 0,error:void 0},this.state=Zs(Zs(Zs({},this.state),{loading:!t.manual}),a)}return r.prototype.setState=function(e){e===void 0&&(e={}),this.state=Zs(Zs({},this.state),e),this.subscribe()},r.prototype.runPluginHandler=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var a=this.pluginImpls.map(function(i){var o;return(o=i[e])===null||o===void 0?void 0:o.call.apply(o,ii([i],Ba(t),!1))}).filter(Boolean);return Object.assign.apply(Object,ii([{}],Ba(a),!1))},r.prototype.runAsync=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return A_e(this,void 0,void 0,function(){var n,a,i,o,s,l,u,c,d,f,h,v,m,y,b,w,S,T,A,M,P;return E_e(this,function(E){switch(E.label){case 0:if(this.count+=1,n=this.count,a=this.runPluginHandler("onBefore",e),i=a.stopNow,o=i===void 0?!1:i,s=a.returnNow,l=s===void 0?!1:s,u=Ite(a,["stopNow","returnNow"]),o)return[2,new Promise(function(){})];if(this.setState(Zs({loading:!0,params:e},u)),l)return[2,Promise.resolve(u.data)];(m=(v=this.options).onBefore)===null||m===void 0||m.call(v,e),E.label=1;case 1:return E.trys.push([1,3,,4]),c=this.runPluginHandler("onRequest",this.serviceRef.current,e).servicePromise,c||(c=(h=this.serviceRef).current.apply(h,ii([],Ba(e),!1))),[4,c];case 2:return d=E.sent(),n!==this.count?[2,new Promise(function(){})]:(this.setState({data:d,error:void 0,loading:!1}),(b=(y=this.options).onSuccess)===null||b===void 0||b.call(y,d,e),this.runPluginHandler("onSuccess",d,e),(S=(w=this.options).onFinally)===null||S===void 0||S.call(w,e,d,void 0),n===this.count&&this.runPluginHandler("onFinally",e,d,void 0),[2,d]);case 3:if(f=E.sent(),n!==this.count)return[2,new Promise(function(){})];throw this.setState({error:f,loading:!1}),(A=(T=this.options).onError)===null||A===void 0||A.call(T,f,e),this.runPluginHandler("onError",f,e),(P=(M=this.options).onFinally)===null||P===void 0||P.call(M,e,void 0,f),n===this.count&&this.runPluginHandler("onFinally",e,void 0,f),f;case 4:return[2]}})})},r.prototype.run=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.runAsync.apply(this,ii([],Ba(t),!1)).catch(function(a){e.options.onError||console.error(a)})},r.prototype.cancel=function(){this.count+=1,this.setState({loading:!1}),this.runPluginHandler("onCancel")},r.prototype.refresh=function(){this.run.apply(this,ii([],Ba(this.state.params||[]),!1))},r.prototype.refreshAsync=function(){return this.runAsync.apply(this,ii([],Ba(this.state.params||[]),!1))},r.prototype.mutate=function(e){var t=sT(e)?e(this.state.data):e;this.runPluginHandler("onMutate",t),this.setState({data:t})},r}();function K3e(r,e,t){e===void 0&&(e={}),t===void 0&&(t=[]);var n=e.manual,a=n===void 0?!1:n,i=e.ready,o=i===void 0?!0:i,s=Ite(e,["manual","ready"]),l=Zs({manual:a,ready:o},s),u=G8(r),c=Q3e(),d=Tne(function(){var f=t.map(function(h){var v;return(v=h==null?void 0:h.onInit)===null||v===void 0?void 0:v.call(h,l)}).filter(Boolean);return new W3e(u,l,c,Object.assign.apply(Object,ii([{}],Ba(f),!1)))},[]);return d.options=l,d.pluginImpls=t.map(function(f){return f(d,l)}),q3e(function(){if(!a&&o){var f=d.state.params||e.defaultParams||[];d.run.apply(d,ii([],Ba(f),!1))}}),f3(function(){d.cancel()}),{loading:d.state.loading,data:d.state.data,error:d.state.error,params:d.state.params||[],cancel:up(d.cancel.bind(d)),refresh:up(d.refresh.bind(d)),refreshAsync:up(d.refreshAsync.bind(d)),run:up(d.run.bind(d)),runAsync:up(d.runAsync.bind(d)),mutate:up(d.mutate.bind(d))}}function Xi(r,e,t){return K3e(r,e,ii(ii([],Ba([]),!1),[I3e,k3e,O3e,B3e,G3e,Cne,b3e,V3e],!1))}function Dne(r,e){if(I0){if(!r)return e;var t;return sT(r)?t=r():"current"in r?t=r.current:t=r,t}}var Y3e=function(r){var e=function(t,n,a){var i=D.useRef(!1),o=D.useRef([]),s=D.useRef([]),l=D.useRef();r(function(){var u,c=Array.isArray(a)?a:[a],d=c.map(function(f){return Dne(f)});if(!i.current){i.current=!0,o.current=d,s.current=n,l.current=t();return}(d.length!==o.current.length||!jI(o.current,d)||!jI(s.current,n))&&((u=l.current)===null||u===void 0||u.call(l),o.current=d,s.current=n,l.current=t())}),f3(function(){var u;(u=l.current)===null||u===void 0||u.call(l),i.current=!1})};return e},Z3e=Y3e(D.useEffect);function RF(r,e,t){t===void 0&&(t={});var n=t.enable,a=n===void 0?!0:n,i=G8(e);Z3e(function(){if(a){var o=Dne(t.target,window);if(o!=null&&o.addEventListener){var s=function(u){return i.current(u)},l=Array.isArray(r)?r:[r];return l.forEach(function(u){o.addEventListener(u,s,{capture:t.capture,once:t.once,passive:t.passive})}),function(){l.forEach(function(u){o.removeEventListener(u,s,{capture:t.capture})})}}}},[r,t.capture,t.once,t.passive,a],t.target)}var NF="AHOOKS_SYNC_STORAGE_EVENT_NAME";function X3e(r){function e(t,n){n===void 0&&(n={});var a,i=n.listenStorageChange,o=i===void 0?!1:i,s=n.onError,l=s===void 0?function(w){console.error(w)}:s;try{a=r()}catch(w){l(w)}var u=function(w){return n.serializer?n.serializer(w):JSON.stringify(w)},c=function(w){return n.deserializer?n.deserializer(w):JSON.parse(w)};function d(){try{var w=a==null?void 0:a.getItem(t);if(w)return c(w)}catch(S){l(S)}return sT(n.defaultValue)?n.defaultValue():n.defaultValue}var f=Ba(D.useState(d),2),h=f[0],v=f[1];lT(function(){v(d())},[t]);var m=function(w){var S=sT(w)?w(h):w;o||v(S);try{var T=void 0,A=a==null?void 0:a.getItem(t);h3e(S)?(T=null,a==null||a.removeItem(t)):(T=u(S),a==null||a.setItem(t,T)),dispatchEvent(new CustomEvent(NF,{detail:{key:t,newValue:T,oldValue:A,storageArea:a}}))}catch(M){l(M)}},y=function(w){w.key!==t||w.storageArea!==a||v(d())},b=function(w){y(w.detail)};return RF("storage",y,{enable:o}),RF(NF,b,{enable:o}),[h,up(m)]}return e}var h3=X3e(function(){return I0?localStorage:void 0});const iv={token:"token",theme:"theme",sideBarCollapsed:"side-bar-collapsed"},uo={key:"theme",light:"light",dark:"dark"},W8=r=>{try{JSON.parse(localStorage.getItem(uo.key)??"")}catch{localStorage.setItem(uo.key,uo.light)}const[e,t]=h3(iv.theme,{defaultValue:uo.light}),n=D.useMemo(()=>e===uo.dark,[e]),a=D.useMemo(()=>e===uo.light,[e]),i=u=>{localStorage.setItem(uo.key,u),document.documentElement.classList.remove(uo.light,uo.dark),document.documentElement.classList.add(u),t(u)},o=()=>i(uo.light),s=()=>i(uo.dark),l=()=>e===uo.dark?o():s();return D.useEffect(()=>{i(e??uo.light)},[]),{theme:e,isDark:n,isLight:a,setLightTheme:o,setDarkTheme:s,toggleTheme:l}},J3e=({size:r=24,width:e,height:t,...n})=>_.jsx("svg",{"aria-hidden":"true",focusable:"false",height:r||t,role:"presentation",viewBox:"0 0 24 24",width:r||e,...n,children:_.jsx("path",{d:"M21.53 15.93c-.16-.27-.61-.69-1.73-.49a8.46 8.46 0 01-1.88.13 8.409 8.409 0 01-5.91-2.82 8.068 8.068 0 01-1.44-8.66c.44-1.01.13-1.54-.09-1.76s-.77-.55-1.83-.11a10.318 10.318 0 00-6.32 10.21 10.475 10.475 0 007.04 8.99 10 10 0 002.89.55c.16.01.32.02.48.02a10.5 10.5 0 008.47-4.27c.67-.93.49-1.519.32-1.79z",fill:"currentColor"})}),e5e=({size:r=24,width:e,height:t,...n})=>_.jsx("svg",{"aria-hidden":"true",focusable:"false",height:r||t,role:"presentation",viewBox:"0 0 24 24",width:r||e,...n,children:_.jsxs("g",{fill:"currentColor",children:[_.jsx("path",{d:"M19 12a7 7 0 11-7-7 7 7 0 017 7z"}),_.jsx("path",{d:"M12 22.96a.969.969 0 01-1-.96v-.08a1 1 0 012 0 1.038 1.038 0 01-1 1.04zm7.14-2.82a1.024 1.024 0 01-.71-.29l-.13-.13a1 1 0 011.41-1.41l.13.13a1 1 0 010 1.41.984.984 0 01-.7.29zm-14.28 0a1.024 1.024 0 01-.71-.29 1 1 0 010-1.41l.13-.13a1 1 0 011.41 1.41l-.13.13a1 1 0 01-.7.29zM22 13h-.08a1 1 0 010-2 1.038 1.038 0 011.04 1 .969.969 0 01-.96 1zM2.08 13H2a1 1 0 010-2 1.038 1.038 0 011.04 1 .969.969 0 01-.96 1zm16.93-7.01a1.024 1.024 0 01-.71-.29 1 1 0 010-1.41l.13-.13a1 1 0 011.41 1.41l-.13.13a.984.984 0 01-.7.29zm-14.02 0a1.024 1.024 0 01-.71-.29l-.13-.14a1 1 0 011.41-1.41l.13.13a1 1 0 010 1.41.97.97 0 01-.7.3zM12 3.04a.969.969 0 01-1-.96V2a1 1 0 012 0 1.038 1.038 0 01-1 1.04z"})]})}),t5e=({className:r,classNames:e})=>{const[t,n]=D.useState(!1),{theme:a,toggleTheme:i}=W8(),o=i,{Component:s,slots:l,isSelected:u,getBaseProps:c,getInputProps:d,getWrapperProps:f}=wne({isSelected:a==="light",onChange:o});return D.useEffect(()=>{n(!0)},[t]),t?_.jsxs(s,{"aria-label":u?"Switch to dark mode":"Switch to light mode",...c({className:Gr("px-px transition-opacity hover:opacity-80 cursor-pointer",r,e==null?void 0:e.base)}),children:[_.jsx(wte,{children:_.jsx("input",{...d()})}),_.jsx("div",{...f(),className:l.wrapper({class:Gr(["w-auto h-auto","bg-transparent","rounded-lg","flex items-center justify-center","group-data-[selected=true]:bg-transparent","!text-default-500","pt-px","px-0","mx-0"],e==null?void 0:e.wrapper)}),children:u?_.jsx(J3e,{size:22}):_.jsx(e5e,{size:22})})]}):_.jsx("div",{className:"w-6 h-6"})};var LS={},OF;function r5e(){if(OF)return LS;OF=1,LS.match=i,LS.parse=o;var r=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,e=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,t=/^(?:(min|max)-)?(.+)/,n=/(em|rem|px|cm|mm|in|pt|pc)?$/,a=/(dpi|dpcm|dppx)?$/;function i(c,d){return o(c).some(function(f){var h=f.inverse,v=f.type==="all"||d.type===f.type;if(v&&h||!(v||h))return!1;var m=f.expressions.every(function(y){var b=y.feature,w=y.modifier,S=y.value,T=d[b];if(!T)return!1;switch(b){case"orientation":case"scan":return T.toLowerCase()===S.toLowerCase();case"width":case"height":case"device-width":case"device-height":S=u(S),T=u(T);break;case"resolution":S=l(S),T=l(T);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":S=s(S),T=s(T);break;case"grid":case"color":case"color-index":case"monochrome":S=parseInt(S,10)||1,T=parseInt(T,10)||0;break}switch(w){case"min":return T>=S;case"max":return T<=S;default:return T===S}});return m&&!h||!m&&h})}function o(c){return c.split(",").map(function(d){d=d.trim();var f=d.match(r),h=f[1],v=f[2],m=f[3]||"",y={};return y.inverse=!!h&&h.toLowerCase()==="not",y.type=v?v.toLowerCase():"all",m=m.match(/\([^\)]+\)/g)||[],y.expressions=m.map(function(b){var w=b.match(e),S=w[1].toLowerCase().match(t);return{modifier:S[1],feature:S[2],value:w[2]}}),y})}function s(c){var d=Number(c),f;return d||(f=c.match(/^(\d+)\s*\/\s*(\d+)$/),d=f[1]/f[2]),d}function l(c){var d=parseFloat(c),f=String(c).match(a)[1];switch(f){case"dpcm":return d/2.54;case"dppx":return d*96;default:return d}}function u(c){var d=parseFloat(c),f=String(c).match(n)[1];switch(f){case"em":return d*16;case"rem":return d*16;case"cm":return d*96/2.54;case"mm":return d*96/2.54/10;case"in":return d*96;case"pt":return d*72;case"pc":return d*72/12;default:return d}}return LS}var TM,$F;function n5e(){if($F)return TM;$F=1;var r=r5e().match,e=typeof window<"u"?window.matchMedia:null;function t(a,i,o){var s=this,l;e&&!o&&(l=e.call(window,a)),l?(this.matches=l.matches,this.media=l.media,l.addListener(d)):(this.matches=r(a,i),this.media=a),this.addListener=u,this.removeListener=c,this.dispose=f;function u(h){l&&l.addListener(h)}function c(h){l&&l.removeListener(h)}function d(h){s.matches=h.matches,s.media=h.media}function f(){l&&l.removeListener(d)}}function n(a,i,o){return new t(a,i,o)}return TM=n,TM}var a5e=n5e();const i5e=wu(a5e);var o5e=/[A-Z]/g,s5e=/^ms-/,AM={};function l5e(r){return"-"+r.toLowerCase()}function Lne(r){if(AM.hasOwnProperty(r))return AM[r];var e=r.replace(o5e,l5e);return AM[r]=s5e.test(e)?"-"+e:e}function u5e(r,e){if(r===e)return!0;if(!r||!e)return!1;const t=Object.keys(r),n=Object.keys(e),a=t.length;if(n.length!==a)return!1;for(let i=0;i<a;i++){const o=t[i];if(r[o]!==e[o]||!Object.prototype.hasOwnProperty.call(e,o))return!1}return!0}var EM={exports:{}},MM,zF;function c5e(){if(zF)return MM;zF=1;var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return MM=r,MM}var DM,jF;function d5e(){if(jF)return DM;jF=1;var r=c5e();function e(){}function t(){}return t.resetWarningCache=e,DM=function(){function n(o,s,l,u,c,d){if(d!==r){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}n.isRequired=n;function a(){return n}var i={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:a,element:n,elementType:n,instanceOf:a,node:n,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:t,resetWarningCache:e};return i.PropTypes=i,i},DM}var BF;function f5e(){return BF||(BF=1,EM.exports=d5e()()),EM.exports}var h5e=f5e();const kr=wu(h5e),mi=kr.oneOfType([kr.string,kr.number]),Pne={all:kr.bool,grid:kr.bool,aural:kr.bool,braille:kr.bool,handheld:kr.bool,print:kr.bool,projection:kr.bool,screen:kr.bool,tty:kr.bool,tv:kr.bool,embossed:kr.bool},p5e={orientation:kr.oneOf(["portrait","landscape"]),scan:kr.oneOf(["progressive","interlace"]),aspectRatio:kr.string,deviceAspectRatio:kr.string,height:mi,deviceHeight:mi,width:mi,deviceWidth:mi,color:kr.bool,colorIndex:kr.bool,monochrome:kr.bool,resolution:mi,type:Object.keys(Pne)},{type:fut,...v5e}=p5e,g5e={minAspectRatio:kr.string,maxAspectRatio:kr.string,minDeviceAspectRatio:kr.string,maxDeviceAspectRatio:kr.string,minHeight:mi,maxHeight:mi,minDeviceHeight:mi,maxDeviceHeight:mi,minWidth:mi,maxWidth:mi,minDeviceWidth:mi,maxDeviceWidth:mi,minColor:kr.number,maxColor:kr.number,minColorIndex:kr.number,maxColorIndex:kr.number,minMonochrome:kr.number,maxMonochrome:kr.number,minResolution:mi,maxResolution:mi,...v5e},m5e={...Pne,...g5e};var y5e={all:m5e};const b5e=r=>`not ${r}`,x5e=(r,e)=>{const t=Lne(r);return typeof e=="number"&&(e=`${e}px`),e===!0?t:e===!1?b5e(t):`(${t}: ${e})`},w5e=r=>r.join(" and "),S5e=r=>{const e=[];return Object.keys(y5e.all).forEach(t=>{const n=r[t];n!=null&&e.push(x5e(t,n))}),w5e(e)},_5e=D.createContext(void 0),C5e=r=>r.query||S5e(r),VF=r=>r?Object.keys(r).reduce((t,n)=>(t[Lne(n)]=r[n],t),{}):void 0,Ine=()=>{const r=D.useRef(!1);return D.useEffect(()=>{r.current=!0},[]),r.current},T5e=r=>{const e=D.useContext(_5e),t=()=>VF(r)||VF(e),[n,a]=D.useState(t);return D.useEffect(()=>{const i=t();u5e(n,i)||a(i)},[r,e]),n},A5e=r=>{const e=()=>C5e(r),[t,n]=D.useState(e);return D.useEffect(()=>{const a=e();t!==a&&n(a)},[r]),t},E5e=(r,e)=>{const t=()=>i5e(r,e||{},!!e),[n,a]=D.useState(t),i=Ine();return D.useEffect(()=>{if(i){const o=t();return a(o),()=>{o&&o.dispose()}}},[r,e]),n},M5e=r=>{const[e,t]=D.useState(r.matches);return D.useEffect(()=>{const n=a=>{t(a.matches)};return r.addListener(n),t(r.matches),()=>{r.removeListener(n)}},[r]),e},D5e=(r,e,t)=>{const n=T5e(e),a=A5e(r);if(!a)throw new Error("Invalid or missing MediaQuery!");const i=E5e(a,n),o=M5e(i);return Ine(),D.useEffect(()=>{},[o]),D.useEffect(()=>()=>{i&&i.dispose()},[]),o};function L5e(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M256 112v288m144-144H112"},child:[]}]})(r)}function FF(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"rect",attr:{width:"384",height:"256",x:"64",y:"176",fill:"none",strokeLinejoin:"round",strokeWidth:"32",rx:"28.87",ry:"28.87"},child:[]},{tag:"path",attr:{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"32",d:"M144 80h224m-256 48h288"},child:[]}]})(r)}function P5e(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"rect",attr:{width:"80",height:"80",x:"64",y:"64",fill:"none",strokeMiterlimit:"10",strokeWidth:"32",rx:"40",ry:"40"},child:[]},{tag:"rect",attr:{width:"80",height:"80",x:"216",y:"64",fill:"none",strokeMiterlimit:"10",strokeWidth:"32",rx:"40",ry:"40"},child:[]},{tag:"rect",attr:{width:"80",height:"80",x:"368",y:"64",fill:"none",strokeMiterlimit:"10",strokeWidth:"32",rx:"40",ry:"40"},child:[]},{tag:"rect",attr:{width:"80",height:"80",x:"64",y:"216",fill:"none",strokeMiterlimit:"10",strokeWidth:"32",rx:"40",ry:"40"},child:[]},{tag:"rect",attr:{width:"80",height:"80",x:"216",y:"216",fill:"none",strokeMiterlimit:"10",strokeWidth:"32",rx:"40",ry:"40"},child:[]},{tag:"rect",attr:{width:"80",height:"80",x:"368",y:"216",fill:"none",strokeMiterlimit:"10",strokeWidth:"32",rx:"40",ry:"40"},child:[]},{tag:"rect",attr:{width:"80",height:"80",x:"64",y:"368",fill:"none",strokeMiterlimit:"10",strokeWidth:"32",rx:"40",ry:"40"},child:[]},{tag:"rect",attr:{width:"80",height:"80",x:"216",y:"368",fill:"none",strokeMiterlimit:"10",strokeWidth:"32",rx:"40",ry:"40"},child:[]},{tag:"rect",attr:{width:"80",height:"80",x:"368",y:"368",fill:"none",strokeMiterlimit:"10",strokeWidth:"32",rx:"40",ry:"40"},child:[]}]})(r)}function I5e(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208 208-93.31 208-208S370.69 48 256 48zm108.25 138.29-134.4 160a16 16 0 0 1-12 5.71h-.27a16 16 0 0 1-11.89-5.3l-57.6-64a16 16 0 1 1 23.78-21.4l45.29 50.32 122.59-145.91a16 16 0 0 1 24.5 20.58z"},child:[]}]})(r)}function k5e(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"m112 184 144 144 144-144"},child:[]}]})(r)}function K8(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"m184 112 144 144-144 144"},child:[]}]})(r)}function kne(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"m289.94 256 95-95A24 24 0 0 0 351 127l-95 95-95-95a24 24 0 0 0-34 34l95 95-95 95a24 24 0 1 0 34 34l95-95 95 95a24 24 0 0 0 34-34z"},child:[]}]})(r)}function R5e(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M320 336h76c55 0 100-21.21 100-75.6s-53-73.47-96-75.6C391.11 99.74 329 48 256 48c-69 0-113.44 45.79-128 91.2-60 5.7-112 35.88-112 98.4S70 336 136 336h56m0 64.1 64 63.9 64-63.9M256 224v224.03"},child:[]}]})(r)}function Rne(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M320 367.79h76c55 0 100-29.21 100-83.6s-53-81.47-96-83.6c-8.89-85.06-71-136.8-144-136.8-69 0-113.44 45.79-128 91.2-60 5.7-112 43.88-112 106.4s54 106.4 120 106.4h56"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"m320 255.79-64-64-64 64m64 192.42V207.79"},child:[]}]})(r)}function N5e(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M428 224H288a48 48 0 0 1-48-48V36a4 4 0 0 0-4-4h-92a64 64 0 0 0-64 64v320a64 64 0 0 0 64 64h224a64 64 0 0 0 64-64V228a4 4 0 0 0-4-4zm-92 160H176a16 16 0 0 1 0-32h160a16 16 0 0 1 0 32zm0-80H176a16 16 0 0 1 0-32h160a16 16 0 0 1 0 32z"},child:[]},{tag:"path",attr:{d:"M419.22 188.59 275.41 44.78a2 2 0 0 0-3.41 1.41V176a16 16 0 0 0 16 16h129.81a2 2 0 0 0 1.41-3.41z"},child:[]}]})(r)}function O5e(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M336 176h40a40 40 0 0 1 40 40v208a40 40 0 0 1-40 40H136a40 40 0 0 1-40-40V216a40 40 0 0 1 40-40h40"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"m176 272 80 80 80-80M256 48v288"},child:[]}]})(r)}function $5e(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M432 448a15.92 15.92 0 0 1-11.31-4.69l-352-352a16 16 0 0 1 22.62-22.62l352 352A16 16 0 0 1 432 448zm-176.34-64c-41.49 0-81.5-12.28-118.92-36.5-34.07-22-64.74-53.51-88.7-91v-.08c19.94-28.57 41.78-52.73 65.24-72.21a2 2 0 0 0 .14-2.94L93.5 161.38a2 2 0 0 0-2.71-.12c-24.92 21-48.05 46.76-69.08 76.92a31.92 31.92 0 0 0-.64 35.54c26.41 41.33 60.4 76.14 98.28 100.65C162 402 207.9 416 255.66 416a239.13 239.13 0 0 0 75.8-12.58 2 2 0 0 0 .77-3.31l-21.58-21.58a4 4 0 0 0-3.83-1 204.8 204.8 0 0 1-51.16 6.47zm235.18-145.4c-26.46-40.92-60.79-75.68-99.27-100.53C349 110.55 302 96 255.66 96a227.34 227.34 0 0 0-74.89 12.83 2 2 0 0 0-.75 3.31l21.55 21.55a4 4 0 0 0 3.88 1 192.82 192.82 0 0 1 50.21-6.69c40.69 0 80.58 12.43 118.55 37 34.71 22.4 65.74 53.88 89.76 91a.13.13 0 0 1 0 .16 310.72 310.72 0 0 1-64.12 72.73 2 2 0 0 0-.15 2.95l19.9 19.89a2 2 0 0 0 2.7.13 343.49 343.49 0 0 0 68.64-78.48 32.2 32.2 0 0 0-.1-34.78z"},child:[]},{tag:"path",attr:{d:"M256 160a95.88 95.88 0 0 0-21.37 2.4 2 2 0 0 0-1 3.38l112.59 112.56a2 2 0 0 0 3.38-1A96 96 0 0 0 256 160zm-90.22 73.66a2 2 0 0 0-3.38 1 96 96 0 0 0 115 115 2 2 0 0 0 1-3.38z"},child:[]}]})(r)}function z5e(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z"},child:[]},{tag:"circle",attr:{cx:"256",cy:"256",r:"80",fill:"none",strokeMiterlimit:"10",strokeWidth:"32"},child:[]}]})(r)}function j5e(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M160 144h288M160 256h288M160 368h288"},child:[]},{tag:"circle",attr:{cx:"80",cy:"144",r:"16",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32"},child:[]},{tag:"circle",attr:{cx:"80",cy:"256",r:"16",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32"},child:[]},{tag:"circle",attr:{cx:"80",cy:"368",r:"16",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32"},child:[]}]})(r)}function B5e(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M442 48h-90a22 22 0 0 0 0 44h36.89l-60.39 60.39c-68.19-52.86-167-48-229.54 14.57C31.12 234.81 31.12 345.19 99 413a174.21 174.21 0 0 0 246 0c62.57-62.58 67.43-161.35 14.57-229.54L420 123.11V160a22 22 0 0 0 44 0V70a22 22 0 0 0-22-22zM313.92 381.92a130.13 130.13 0 0 1-183.84 0c-50.69-50.68-50.69-133.16 0-183.84s133.16-50.69 183.84 0 50.69 133.16 0 183.84z"},child:[]}]})(r)}function V5e(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"48",d:"M88 152h336M88 256h336M88 360h336"},child:[]}]})(r)}function HF(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M192 448h128m64-240v32c0 70.4-57.6 128-128 128h0c-70.4 0-128-57.6-128-128v-32m128 160v80"},child:[]},{tag:"path",attr:{d:"M256 320a78.83 78.83 0 0 1-56.55-24.1A80.89 80.89 0 0 1 176 239V128a79.69 79.69 0 0 1 80-80c44.86 0 80 35.14 80 80v111c0 44.66-35.89 81-80 81z"},child:[]}]})(r)}function F5e(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M421.84 37.37a25.86 25.86 0 0 0-22.6-4.46L199.92 86.49A32.3 32.3 0 0 0 176 118v226c0 6.74-4.36 12.56-11.11 14.83l-.12.05-52 18C92.88 383.53 80 402 80 423.91a55.54 55.54 0 0 0 23.23 45.63A54.78 54.78 0 0 0 135.34 480a55.82 55.82 0 0 0 17.75-2.93l.38-.13 21.84-7.94A47.84 47.84 0 0 0 208 423.91v-212c0-7.29 4.77-13.21 12.16-15.07l.21-.06L395 150.14a4 4 0 0 1 5 3.86v141.93c0 6.75-4.25 12.38-11.11 14.68l-.25.09-50.89 18.11A49.09 49.09 0 0 0 304 375.92a55.67 55.67 0 0 0 23.23 45.8 54.63 54.63 0 0 0 49.88 7.35l.36-.12 21.84-7.95A47.83 47.83 0 0 0 432 375.92V58a25.74 25.74 0 0 0-10.16-20.63z"},child:[]}]})(r)}function uT(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"32",d:"M320 146s24.36-12-64-12a160 160 0 1 0 160 160"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"m256 58 80 80-80 80"},child:[]}]})(r)}function H5e(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M221.09 64a157.09 157.09 0 1 0 157.09 157.09A157.1 157.1 0 0 0 221.09 64z"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"32",d:"M338.29 338.29 448 448"},child:[]}]})(r)}function U5e(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M456.69 421.39 362.6 327.3a173.81 173.81 0 0 0 34.84-104.58C397.44 126.38 319.06 48 222.72 48S48 126.38 48 222.72s78.38 174.72 174.72 174.72A173.81 173.81 0 0 0 327.3 362.6l94.09 94.09a25 25 0 0 0 35.3-35.3zM97.92 222.72a124.8 124.8 0 1 1 124.8 124.8 124.95 124.95 0 0 1-124.8-124.8z"},child:[]}]})(r)}function Nne(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M262.29 192.31a64 64 0 1 0 57.4 57.4 64.13 64.13 0 0 0-57.4-57.4zM416.39 256a154.34 154.34 0 0 1-1.53 20.79l45.21 35.46a10.81 10.81 0 0 1 2.45 13.75l-42.77 74a10.81 10.81 0 0 1-13.14 4.59l-44.9-18.08a16.11 16.11 0 0 0-15.17 1.75A164.48 164.48 0 0 1 325 400.8a15.94 15.94 0 0 0-8.82 12.14l-6.73 47.89a11.08 11.08 0 0 1-10.68 9.17h-85.54a11.11 11.11 0 0 1-10.69-8.87l-6.72-47.82a16.07 16.07 0 0 0-9-12.22 155.3 155.3 0 0 1-21.46-12.57 16 16 0 0 0-15.11-1.71l-44.89 18.07a10.81 10.81 0 0 1-13.14-4.58l-42.77-74a10.8 10.8 0 0 1 2.45-13.75l38.21-30a16.05 16.05 0 0 0 6-14.08c-.36-4.17-.58-8.33-.58-12.5s.21-8.27.58-12.35a16 16 0 0 0-6.07-13.94l-38.19-30A10.81 10.81 0 0 1 49.48 186l42.77-74a10.81 10.81 0 0 1 13.14-4.59l44.9 18.08a16.11 16.11 0 0 0 15.17-1.75A164.48 164.48 0 0 1 187 111.2a15.94 15.94 0 0 0 8.82-12.14l6.73-47.89A11.08 11.08 0 0 1 213.23 42h85.54a11.11 11.11 0 0 1 10.69 8.87l6.72 47.82a16.07 16.07 0 0 0 9 12.22 155.3 155.3 0 0 1 21.46 12.57 16 16 0 0 0 15.11 1.71l44.89-18.07a10.81 10.81 0 0 1 13.14 4.58l42.77 74a10.8 10.8 0 0 1-2.45 13.75l-38.21 30a16.05 16.05 0 0 0-6.05 14.08c.33 4.14.55 8.3.55 12.47z"},child:[]}]})(r)}function G5e(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 384.39a32 32 0 0 1-13-2.77 15.77 15.77 0 0 1-2.71-1.54l-82.71-58.22A32 32 0 0 1 352 295.7v-79.4a32 32 0 0 1 13.58-26.16l82.71-58.22a15.77 15.77 0 0 1 2.71-1.54 32 32 0 0 1 45 29.24v192.76a32 32 0 0 1-32 32zM268 400H84a68.07 68.07 0 0 1-68-68V180a68.07 68.07 0 0 1 68-68h184.48A67.6 67.6 0 0 1 336 179.52V332a68.07 68.07 0 0 1-68 68z"},child:[]}]})(r)}const q5e={hidden:{opacity:0,x:-20},visible:{opacity:1,x:0,transition:{duration:.2}},exit:{opacity:0,x:-20,transition:{duration:.2}}};function UF({isCollapsed:r,children:e}){return _.jsx(Zt.div,{className:Gr("flex justify-center items-center text-sm h-10 text-default-600 hover:text-primary transition-colors cursor-default md:cursor-pointer",!r&&"md:h-12"),initial:{borderRadius:r?40:0},animate:{borderRadius:r?40:0},whileHover:{scale:1.02},whileTap:{scale:.98},children:e})}function Q5e(){const[r=!1,e]=h3(iv.sideBarCollapsed,{defaultValue:!1}),[t,n]=D.useState(!0),a=D5e({minWidth:768});return _.jsx(Zt.div,{className:"h-full fixed md:relative z-50",children:_.jsxs(Zt.div,{className:Gr("bg-background/80 backdrop-blur-md md:!h-full md:!w-full border-r border-divider overflow-hidden flex flex-col gap-4 md:gap-2",!r&&"md:pt-4"),initial:{borderRadius:t?0:28,height:t||a?"100%":56,width:t||a?"100%":56},animate:{borderRadius:t?0:28,height:t||a?"100%":56,width:t||a?"100%":56},children:[_.jsxs("div",{className:"flex p-2 pb-0 flex-shrink-0 flex-grow-0 items-center justify-between md:!p-0.5 md:justify-center",children:[_.jsx(Zt.div,{className:"aspect-square bg-primary/5 text-primary text-xl rounded-full w-10 md:!w-0 md:!h-0 overflow-hidden flex justify-center items-center cursor-default md:cursor-pointer flex-grow-0 flex-shrink-0 transition-all hover:bg-primary/10",onClick:()=>n(!t),whileHover:{scale:1.05},whileTap:{scale:.95},children:_.jsx(fl,{mode:"wait",children:_.jsx(Zt.div,{initial:{opacity:0,rotate:-90},animate:{opacity:1,rotate:0},exit:{opacity:0,rotate:90},transition:{duration:.2},children:t?_.jsx(kne,{}):_.jsx(V5e,{})},t?"close":"menu")})}),_.jsx(Zt.div,{className:"flex-1 flex items-center justify-center md:w-auto relative px-3",initial:{opacity:!t&&!a||r?0:1,width:!t&&!a||r?0:"auto",height:!t&&!a||r?0:"auto"},animate:{opacity:!t&&!a||r?0:1,width:!t&&!a||r?0:"auto",height:!t&&!a||r?0:"auto"},children:_.jsxs("div",{className:"flex items-center gap-3 -ml-10",children:[_.jsxs(Zt.div,{className:"w-9 h-9 rounded-xl bg-gradient-to-br from-primary/10 to-primary/5 flex items-center justify-center relative group cursor-default md:cursor-pointer",whileHover:{scale:1.05},whileTap:{scale:.95},children:[_.jsx(Zt.div,{className:"absolute inset-0 rounded-xl ring-2 ring-primary/10",animate:{rotate:360},transition:{duration:8,repeat:1/0,ease:"linear"}}),_.jsx(Zt.div,{className:"absolute inset-1 rounded-lg ring-1 ring-primary/5",animate:{rotate:-360},transition:{duration:12,repeat:1/0,ease:"linear"}}),_.jsx(Zt.div,{className:"relative z-10 w-full h-full flex items-center justify-center",whileHover:{scale:1.1},transition:{type:"spring",stiffness:400,damping:10},children:_.jsxs("svg",{viewBox:"0 0 24 24",className:"w-5 h-5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[_.jsx(Zt.path,{d:"M12 3L20 7V17L12 21L4 17V7L12 3Z",className:"stroke-primary",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",initial:{pathLength:0},animate:{pathLength:1},transition:{duration:2,ease:"easeInOut",repeat:1/0,repeatType:"reverse"}}),_.jsx(Zt.path,{d:"M12 3V21",className:"stroke-primary/50",strokeWidth:"2",strokeLinecap:"round",initial:{pathLength:0},animate:{pathLength:1},transition:{duration:1.5,ease:"easeInOut",repeat:1/0,repeatType:"reverse",delay:.5}})]})}),_.jsx(Zt.div,{className:"absolute inset-0 rounded-xl bg-primary/5 opacity-0 group-hover:opacity-100 transition-opacity",initial:!1,transition:{duration:.2}})]}),_.jsxs(Zt.div,{className:"font-medium text-base relative",children:[_.jsxs(Zt.div,{className:"relative flex items-center",animate:{scale:[1,1.02,1]},transition:{duration:2,repeat:1/0,ease:"easeInOut"},children:[_.jsx(Zt.span,{className:"bg-gradient-to-r from-primary to-primary-500 bg-clip-text text-transparent inline-block origin-bottom",animate:{opacity:[0,1,1,0],scale:[0,1,1,0],rotateZ:[45,0,0,-45]},transition:{duration:3,times:[0,.1,.9,1],repeat:1/0,repeatDelay:1},children:"k"}),_.jsx(Zt.span,{className:"bg-gradient-to-r from-primary to-primary-500 bg-clip-text text-transparent inline-block",animate:{opacity:[0,1,1,0],y:[20,0,0,20],scale:[.5,1,1,.5]},transition:{duration:3,times:[0,.1,.9,1],repeat:1/0,repeatDelay:1,delay:.1},children:"a"}),_.jsx(Zt.span,{className:"bg-gradient-to-r from-primary to-primary-500 bg-clip-text text-transparent inline-block origin-top",animate:{opacity:[0,1,1,0],scale:[.2,1,1,.2],rotateZ:[-45,0,0,45]},transition:{duration:3,times:[0,.1,.9,1],repeat:1/0,repeatDelay:1,delay:.2},children:"r"}),_.jsx(Zt.span,{className:"bg-gradient-to-r from-primary to-primary-500 bg-clip-text text-transparent inline-block",animate:{opacity:[0,1,1,0],y:[-20,0,0,-20],scale:[.5,1,1,.5],rotateZ:[45,0,0,-45]},transition:{duration:3,times:[0,.1,.9,1],repeat:1/0,repeatDelay:1,delay:.3},children:"i"}),_.jsx(Zt.span,{className:"bg-gradient-to-r from-primary to-primary-500 bg-clip-text text-transparent inline-block",animate:{opacity:[0,1,1,0],x:[-20,0,0,-20],scale:[.2,1,1,.2],rotateZ:[-30,0,0,30]},transition:{duration:3,times:[0,.1,.9,1],repeat:1/0,repeatDelay:1,delay:.4},children:"n"})]}),_.jsxs("div",{className:"absolute -bottom-1 left-0 right-0 h-[2px]",children:[_.jsx(Zt.div,{className:"absolute inset-0 bg-gradient-to-r from-sky-400/50 via-blue-400/40 to-sky-400/50",initial:{scaleX:0},animate:{scaleX:1},transition:{duration:.8,ease:"easeOut"}}),_.jsx(Zt.div,{className:"absolute inset-0 w-[30%] bg-gradient-to-r from-transparent via-sky-200/80 to-transparent",animate:{x:["-100%","400%"]},transition:{duration:2,ease:"easeInOut",repeat:1/0,repeatDelay:.5}}),_.jsx(Zt.div,{className:"absolute inset-0 w-[20%] bg-gradient-to-r from-transparent via-blue-200/70 to-transparent",animate:{x:["-100%","600%"]},transition:{duration:2.5,ease:"linear",repeat:1/0}}),_.jsx(Zt.div,{className:"absolute inset-0 w-2 h-[2px] bg-sky-200/80 blur-[2px]",animate:{x:["-100%","500%"],opacity:[0,.9,0]},transition:{duration:2,ease:"easeInOut",repeat:1/0,repeatDelay:.5}})]}),_.jsx(Zt.div,{className:"absolute inset-0 bg-gradient-to-r from-transparent via-primary/10 to-transparent pointer-events-none",animate:{x:["-100%","100%"],opacity:[0,.5,0]},transition:{duration:2,times:[0,1],repeat:1/0,repeatDelay:2}})]})]})})]}),_.jsx("div",{className:Gr("flex-1 p-2 px-2 pt-0 flex flex-col gap-2 overflow-y-auto hide-scrollbar",!r&&"px-4"),children:_.jsx(fl,{mode:"wait",children:v1e.navItems.map((i,o)=>_.jsx(Zt.div,{variants:q5e,initial:"hidden",animate:"visible",exit:"exit",transition:{delay:o*.05},children:_.jsx(iJ,{to:i.href,className:({isActive:s})=>Gr("block text-default-600 hover:text-primary rounded-xl w-max hover:bg-default-100/50 transition-all cursor-default md:cursor-pointer group",{"!text-primary bg-primary/5 font-medium ring-1 ring-primary/10":s}),children:_.jsxs(Zt.div,{className:"flex items-center gap-3 py-2.5 overflow-hidden relative",initial:{width:r?40:200,paddingLeft:r?10:16,paddingRight:r?10:16},animate:{width:r?40:200,paddingLeft:r?10:16,paddingRight:r?10:16},whileHover:{x:4},children:[_.jsx(Zt.div,{className:"text-xl relative z-10",whileHover:{scale:1.1},transition:{type:"spring",stiffness:400,damping:10},children:_.jsx(i.Icon,{})}),_.jsx(Zt.div,{className:"whitespace-nowrap overflow-hidden text-sm relative z-10",initial:{width:r?0:"auto"},animate:{width:r?0:"auto"},children:i.label})]})})},i.href))})}),_.jsxs(Zt.div,{className:"flex-grow-0 flex-shrink-0 grid-cols-2 grid",initial:{margin:r?8:0,gridTemplateColumns:r?"1fr":"1fr 1fr"},animate:{margin:r?8:0,gridTemplateColumns:r?"1fr":"1fr 1fr"},children:[_.jsx(UF,{isCollapsed:r,children:_.jsx(t5e,{className:"w-full h-full max-w-full flex justify-center",classNames:{wrapper:"!text-default-600",base:"w-full h-full"}})}),_.jsx(UF,{isCollapsed:r,children:_.jsxs("div",{className:"flex w-full h-full justify-center items-center text-sm",onClick:()=>e(!r),children:[_.jsx(Zt.div,{className:"!rotate-180",initial:{marginRight:r?0:-8},animate:{marginRight:r?0:-8},children:_.jsx(iV,{})}),_.jsx(Zt.div,{initial:{rotate:r?0:180},animate:{rotate:r?0:180},children:_.jsx(iV,{})})]})})]})]})})}function W5e(){return _.jsxs("div",{className:"relative flex h-screen items-stretch",children:[_.jsx("div",{className:"flex-grow-0 flex-shrink-0",children:_.jsx(Q5e,{})}),_.jsx("main",{className:"container mx-auto px-3 flex-grow overflow-y-scroll",children:_.jsx(eJ,{})})]})}var GF=r=>typeof r=="boolean"?`${r}`:r===0?"0":r,Hi=r=>!r||typeof r!="object"||Object.keys(r).length===0,K5e=(r,e)=>JSON.stringify(r)===JSON.stringify(e);function One(r,e){r.forEach(function(t){Array.isArray(t)?One(t,e):e.push(t)})}function $ne(r){let e=[];return One(r,e),e}var zne=(...r)=>$ne(r).filter(Boolean),jne=(r,e)=>{let t={},n=Object.keys(r),a=Object.keys(e);for(let i of n)if(a.includes(i)){let o=r[i],s=e[i];Array.isArray(o)||Array.isArray(s)?t[i]=zne(s,o):typeof o=="object"&&typeof s=="object"?t[i]=jne(o,s):t[i]=s+" "+o}else t[i]=r[i];for(let i of a)n.includes(i)||(t[i]=e[i]);return t},qF=r=>!r||typeof r!="string"?r:r.replace(/\s+/g," ").trim();const Y8="-",Y5e=r=>{const e=X5e(r),{conflictingClassGroups:t,conflictingClassGroupModifiers:n}=r;return{getClassGroupId:o=>{const s=o.split(Y8);return s[0]===""&&s.length!==1&&s.shift(),Bne(s,e)||Z5e(o)},getConflictingClassGroupIds:(o,s)=>{const l=t[o]||[];return s&&n[o]?[...l,...n[o]]:l}}},Bne=(r,e)=>{var o;if(r.length===0)return e.classGroupId;const t=r[0],n=e.nextPart.get(t),a=n?Bne(r.slice(1),n):void 0;if(a)return a;if(e.validators.length===0)return;const i=r.join(Y8);return(o=e.validators.find(({validator:s})=>s(i)))==null?void 0:o.classGroupId},QF=/^\[(.+)\]$/,Z5e=r=>{if(QF.test(r)){const e=QF.exec(r)[1],t=e==null?void 0:e.substring(0,e.indexOf(":"));if(t)return"arbitrary.."+t}},X5e=r=>{const{theme:e,prefix:t}=r,n={nextPart:new Map,validators:[]};return e4e(Object.entries(r.classGroups),t).forEach(([i,o])=>{BI(o,n,i,e)}),n},BI=(r,e,t,n)=>{r.forEach(a=>{if(typeof a=="string"){const i=a===""?e:WF(e,a);i.classGroupId=t;return}if(typeof a=="function"){if(J5e(a)){BI(a(n),e,t,n);return}e.validators.push({validator:a,classGroupId:t});return}Object.entries(a).forEach(([i,o])=>{BI(o,WF(e,i),t,n)})})},WF=(r,e)=>{let t=r;return e.split(Y8).forEach(n=>{t.nextPart.has(n)||t.nextPart.set(n,{nextPart:new Map,validators:[]}),t=t.nextPart.get(n)}),t},J5e=r=>r.isThemeGetter,e4e=(r,e)=>e?r.map(([t,n])=>{const a=n.map(i=>typeof i=="string"?e+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,s])=>[e+o,s])):i);return[t,a]}):r,t4e=r=>{if(r<1)return{get:()=>{},set:()=>{}};let e=0,t=new Map,n=new Map;const a=(i,o)=>{t.set(i,o),e++,e>r&&(e=0,n=t,t=new Map)};return{get(i){let o=t.get(i);if(o!==void 0)return o;if((o=n.get(i))!==void 0)return a(i,o),o},set(i,o){t.has(i)?t.set(i,o):a(i,o)}}},Vne="!",r4e=r=>{const{separator:e,experimentalParseClassName:t}=r,n=e.length===1,a=e[0],i=e.length,o=s=>{const l=[];let u=0,c=0,d;for(let y=0;y<s.length;y++){let b=s[y];if(u===0){if(b===a&&(n||s.slice(y,y+i)===e)){l.push(s.slice(c,y)),c=y+i;continue}if(b==="/"){d=y;continue}}b==="["?u++:b==="]"&&u--}const f=l.length===0?s:s.substring(c),h=f.startsWith(Vne),v=h?f.substring(1):f,m=d&&d>c?d-c:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:v,maybePostfixModifierPosition:m}};return t?s=>t({className:s,parseClassName:o}):o},n4e=r=>{if(r.length<=1)return r;const e=[];let t=[];return r.forEach(n=>{n[0]==="["?(e.push(...t.sort(),n),t=[]):t.push(n)}),e.push(...t.sort()),e},a4e=r=>({cache:t4e(r.cacheSize),parseClassName:r4e(r),...Y5e(r)}),i4e=/\s+/,o4e=(r,e)=>{const{parseClassName:t,getClassGroupId:n,getConflictingClassGroupIds:a}=e,i=[],o=r.trim().split(i4e);let s="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:c,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:h}=t(u);let v=!!h,m=n(v?f.substring(0,h):f);if(!m){if(!v){s=u+(s.length>0?" "+s:s);continue}if(m=n(f),!m){s=u+(s.length>0?" "+s:s);continue}v=!1}const y=n4e(c).join(":"),b=d?y+Vne:y,w=b+m;if(i.includes(w))continue;i.push(w);const S=a(m,v);for(let T=0;T<S.length;++T){const A=S[T];i.push(b+A)}s=u+(s.length>0?" "+s:s)}return s};function s4e(){let r=0,e,t,n="";for(;r<arguments.length;)(e=arguments[r++])&&(t=Fne(e))&&(n&&(n+=" "),n+=t);return n}const Fne=r=>{if(typeof r=="string")return r;let e,t="";for(let n=0;n<r.length;n++)r[n]&&(e=Fne(r[n]))&&(t&&(t+=" "),t+=e);return t};function VI(r,...e){let t,n,a,i=o;function o(l){const u=e.reduce((c,d)=>d(c),r());return t=a4e(u),n=t.cache.get,a=t.cache.set,i=s,s(l)}function s(l){const u=n(l);if(u)return u;const c=o4e(l,t);return a(l,c),c}return function(){return i(s4e.apply(null,arguments))}}const sn=r=>{const e=t=>t[r]||[];return e.isThemeGetter=!0,e},Hne=/^\[(?:([a-z-]+):)?(.+)\]$/i,l4e=/^\d+\/\d+$/,u4e=new Set(["px","full","screen"]),c4e=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,d4e=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,f4e=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,h4e=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,p4e=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,rc=r=>$m(r)||u4e.has(r)||l4e.test(r),Hd=r=>k0(r,"length",S4e),$m=r=>!!r&&!Number.isNaN(Number(r)),LM=r=>k0(r,"number",$m),o1=r=>!!r&&Number.isInteger(Number(r)),v4e=r=>r.endsWith("%")&&$m(r.slice(0,-1)),Yt=r=>Hne.test(r),Ud=r=>c4e.test(r),g4e=new Set(["length","size","percentage"]),m4e=r=>k0(r,g4e,Une),y4e=r=>k0(r,"position",Une),b4e=new Set(["image","url"]),x4e=r=>k0(r,b4e,C4e),w4e=r=>k0(r,"",_4e),s1=()=>!0,k0=(r,e,t)=>{const n=Hne.exec(r);return n?n[1]?typeof e=="string"?n[1]===e:e.has(n[1]):t(n[2]):!1},S4e=r=>d4e.test(r)&&!f4e.test(r),Une=()=>!1,_4e=r=>h4e.test(r),C4e=r=>p4e.test(r),FI=()=>{const r=sn("colors"),e=sn("spacing"),t=sn("blur"),n=sn("brightness"),a=sn("borderColor"),i=sn("borderRadius"),o=sn("borderSpacing"),s=sn("borderWidth"),l=sn("contrast"),u=sn("grayscale"),c=sn("hueRotate"),d=sn("invert"),f=sn("gap"),h=sn("gradientColorStops"),v=sn("gradientColorStopPositions"),m=sn("inset"),y=sn("margin"),b=sn("opacity"),w=sn("padding"),S=sn("saturate"),T=sn("scale"),A=sn("sepia"),M=sn("skew"),P=sn("space"),E=sn("translate"),R=()=>["auto","contain","none"],N=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto",Yt,e],O=()=>[Yt,e],L=()=>["",rc,Hd],$=()=>["auto",$m,Yt],j=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],B=()=>["solid","dashed","dotted","double","none"],H=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],F=()=>["start","end","center","between","around","evenly","stretch"],K=()=>["","0",Yt],U=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>[$m,Yt];return{cacheSize:500,separator:":",theme:{colors:[s1],spacing:[rc,Hd],blur:["none","",Ud,Yt],brightness:V(),borderColor:[r],borderRadius:["none","","full",Ud,Yt],borderSpacing:O(),borderWidth:L(),contrast:V(),grayscale:K(),hueRotate:V(),invert:K(),gap:O(),gradientColorStops:[r],gradientColorStopPositions:[v4e,Hd],inset:k(),margin:k(),opacity:V(),padding:O(),saturate:V(),scale:V(),sepia:K(),skew:V(),space:O(),translate:O()},classGroups:{aspect:[{aspect:["auto","square","video",Yt]}],container:["container"],columns:[{columns:[Ud]}],"break-after":[{"break-after":U()}],"break-before":[{"break-before":U()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...j(),Yt]}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",o1,Yt]}],basis:[{basis:k()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Yt]}],grow:[{grow:K()}],shrink:[{shrink:K()}],order:[{order:["first","last","none",o1,Yt]}],"grid-cols":[{"grid-cols":[s1]}],"col-start-end":[{col:["auto",{span:["full",o1,Yt]},Yt]}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":[s1]}],"row-start-end":[{row:["auto",{span:[o1,Yt]},Yt]}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Yt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Yt]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...F()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...F(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...F(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[P]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[P]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Yt,e]}],"min-w":[{"min-w":[Yt,e,"min","max","fit"]}],"max-w":[{"max-w":[Yt,e,"none","full","min","max","fit","prose",{screen:[Ud]},Ud]}],h:[{h:[Yt,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Yt,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Yt,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Yt,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Ud,Hd]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",LM]}],"font-family":[{font:[s1]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Yt]}],"line-clamp":[{"line-clamp":["none",$m,LM]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",rc,Yt]}],"list-image":[{"list-image":["none",Yt]}],"list-style-type":[{list:["none","disc","decimal",Yt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[r]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[r]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",rc,Hd]}],"underline-offset":[{"underline-offset":["auto",rc,Yt]}],"text-decoration-color":[{decoration:[r]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Yt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Yt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...j(),y4e]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",m4e]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},x4e]}],"bg-color":[{bg:[r]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...B(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:B()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...B()]}],"outline-offset":[{"outline-offset":[rc,Yt]}],"outline-w":[{outline:[rc,Hd]}],"outline-color":[{outline:[r]}],"ring-w":[{ring:L()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[r]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[rc,Hd]}],"ring-offset-color":[{"ring-offset":[r]}],shadow:[{shadow:["","inner","none",Ud,w4e]}],"shadow-color":[{shadow:[s1]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...H(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":H()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Ud,Yt]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[S]}],sepia:[{sepia:[A]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[S]}],"backdrop-sepia":[{"backdrop-sepia":[A]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Yt]}],duration:[{duration:V()}],ease:[{ease:["linear","in","out","in-out",Yt]}],delay:[{delay:V()}],animate:[{animate:["none","spin","ping","pulse","bounce",Yt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[o1,Yt]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"skew-x":[{"skew-x":[M]}],"skew-y":[{"skew-y":[M]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Yt]}],accent:[{accent:["auto",r]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Yt]}],"caret-color":[{caret:[r]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Yt]}],fill:[{fill:[r,"none"]}],"stroke-w":[{stroke:[rc,Hd,LM]}],stroke:[{stroke:[r,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},T4e=(r,{cacheSize:e,prefix:t,separator:n,experimentalParseClassName:a,extend:i={},override:o={}})=>{rb(r,"cacheSize",e),rb(r,"prefix",t),rb(r,"separator",n),rb(r,"experimentalParseClassName",a);for(const s in o)A4e(r[s],o[s]);for(const s in i)E4e(r[s],i[s]);return r},rb=(r,e,t)=>{t!==void 0&&(r[e]=t)},A4e=(r,e)=>{if(e)for(const t in e)rb(r,t,e[t])},E4e=(r,e)=>{if(e)for(const t in e){const n=e[t];n!==void 0&&(r[t]=(r[t]||[]).concat(n))}},M4e=(r,...e)=>typeof r=="function"?VI(FI,r,...e):VI(()=>T4e(FI(),r),...e),D4e=VI(FI);var L4e={twMerge:!0,twMergeConfig:{},responsiveVariants:!1},Gne=r=>r||void 0,px=(...r)=>Gne($ne(r).filter(Boolean).join(" ")),PM=null,dc={},HI=!1,l1=(...r)=>e=>e.twMerge?((!PM||HI)&&(HI=!1,PM=Hi(dc)?D4e:M4e({...dc,extend:{theme:dc.theme,classGroups:dc.classGroups,conflictingClassGroupModifiers:dc.conflictingClassGroupModifiers,conflictingClassGroups:dc.conflictingClassGroups,...dc.extend}})),Gne(PM(px(r)))):px(r),KF=(r,e)=>{for(let t in e)r.hasOwnProperty(t)?r[t]=px(r[t],e[t]):r[t]=e[t];return r},qne=(r,e)=>{let{extend:t=null,slots:n={},variants:a={},compoundVariants:i=[],compoundSlots:o=[],defaultVariants:s={}}=r,l={...L4e,...e},u=t!=null&&t.base?px(t.base,r==null?void 0:r.base):r==null?void 0:r.base,c=t!=null&&t.variants&&!Hi(t.variants)?jne(a,t.variants):a,d=t!=null&&t.defaultVariants&&!Hi(t.defaultVariants)?{...t.defaultVariants,...s}:s;!Hi(l.twMergeConfig)&&!K5e(l.twMergeConfig,dc)&&(HI=!0,dc=l.twMergeConfig);let f=Hi(t==null?void 0:t.slots),h=Hi(n)?{}:{base:px(r==null?void 0:r.base,f&&(t==null?void 0:t.base)),...n},v=f?h:KF({...t==null?void 0:t.slots},Hi(h)?{base:r==null?void 0:r.base}:h),m=Hi(t==null?void 0:t.compoundVariants)?i:zne(t==null?void 0:t.compoundVariants,i),y=w=>{if(Hi(c)&&Hi(n)&&f)return l1(u,w==null?void 0:w.class,w==null?void 0:w.className)(l);if(m&&!Array.isArray(m))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof m}`);if(o&&!Array.isArray(o))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof o}`);let S=(O,L,$=[],j)=>{let B=$;if(typeof L=="string")B=B.concat(qF(L).split(" ").map(H=>`${O}:${H}`));else if(Array.isArray(L))B=B.concat(L.reduce((H,F)=>H.concat(`${O}:${F}`),[]));else if(typeof L=="object"&&typeof j=="string"){for(let H in L)if(L.hasOwnProperty(H)&&H===j){let F=L[H];if(F&&typeof F=="string"){let K=qF(F);B[j]?B[j]=B[j].concat(K.split(" ").map(U=>`${O}:${U}`)):B[j]=K.split(" ").map(U=>`${O}:${U}`)}else Array.isArray(F)&&F.length>0&&(B[j]=F.reduce((K,U)=>K.concat(`${O}:${U}`),[]))}}return B},T=(O,L=c,$=null,j=null)=>{var B;let H=L[O];if(!H||Hi(H))return null;let F=(B=j==null?void 0:j[O])!=null?B:w==null?void 0:w[O];if(F===null)return null;let K=GF(F),U=Array.isArray(l.responsiveVariants)&&l.responsiveVariants.length>0||l.responsiveVariants===!0,V=d==null?void 0:d[O],Q=[];if(typeof K=="object"&&U)for(let[X,re]of Object.entries(K)){let oe=H[re];if(X==="initial"){V=re;continue}Array.isArray(l.responsiveVariants)&&!l.responsiveVariants.includes(X)||(Q=S(X,oe,Q,$))}let Z=K!=null&&typeof K!="object"?K:GF(V),Y=H[Z||"false"];return typeof Q=="object"&&typeof $=="string"&&Q[$]?KF(Q,Y):Q.length>0?(Q.push(Y),$==="base"?Q.join(" "):Q):Y},A=()=>c?Object.keys(c).map(O=>T(O,c)):null,M=(O,L)=>{if(!c||typeof c!="object")return null;let $=new Array;for(let j in c){let B=T(j,c,O,L),H=O==="base"&&typeof B=="string"?B:B&&B[O];H&&($[$.length]=H)}return $},P={};for(let O in w)w[O]!==void 0&&(P[O]=w[O]);let E=(O,L)=>{var $;let j=typeof(w==null?void 0:w[O])=="object"?{[O]:($=w[O])==null?void 0:$.initial}:{};return{...d,...P,...j,...L}},R=(O=[],L)=>{let $=[];for(let{class:j,className:B,...H}of O){let F=!0;for(let[K,U]of Object.entries(H)){let V=E(K,L)[K];if(Array.isArray(U)){if(!U.includes(V)){F=!1;break}}else{let Q=Z=>Z==null||Z===!1;if(Q(U)&&Q(V))continue;if(V!==U){F=!1;break}}}F&&(j&&$.push(j),B&&$.push(B))}return $},N=O=>{let L=R(m,O);if(!Array.isArray(L))return L;let $={};for(let j of L)if(typeof j=="string"&&($.base=l1($.base,j)(l)),typeof j=="object")for(let[B,H]of Object.entries(j))$[B]=l1($[B],H)(l);return $},k=O=>{if(o.length<1)return null;let L={};for(let{slots:$=[],class:j,className:B,...H}of o){if(!Hi(H)){let F=!0;for(let K of Object.keys(H)){let U=E(K,O)[K];if(U===void 0||(Array.isArray(H[K])?!H[K].includes(U):H[K]!==U)){F=!1;break}}if(!F)continue}for(let F of $)L[F]=L[F]||[],L[F].push([j,B])}return L};if(!Hi(n)||!f){let O={};if(typeof v=="object"&&!Hi(v))for(let L of Object.keys(v))O[L]=$=>{var j,B;return l1(v[L],M(L,$),((j=N($))!=null?j:[])[L],((B=k($))!=null?B:[])[L],$==null?void 0:$.class,$==null?void 0:$.className)(l)};return O}return l1(u,A(),R(m),w==null?void 0:w.class,w==null?void 0:w.className)(l)},b=()=>{if(!(!c||typeof c!="object"))return Object.keys(c)};return y.variantKeys=b(),y.extend=t,y.base=u,y.slots=v,y.variants=c,y.defaultVariants=d,y.compoundSlots=o,y.compoundVariants=m,y};const Qne=qne({base:"tracking-tight inline font-semibold",variants:{color:{violet:"from-[#FF1CF7] to-[#b249f8]",yellow:"from-[#FF705B] to-[#FFB457]",blue:"from-[#5EA2EF] to-[#0072F5]",cyan:"from-[#00b7fa] to-[#01cfea]",green:"from-[#6FEE8D] to-[#17c964]",pink:"from-[#FF72E1] to-[#F54C7A]",foreground:"dark:from-[#FFFFFF] dark:to-[#4B4B4B]"},size:{xs:"text-xl lg:text-2xl",sm:"text-3xl lg:text-4xl",md:"text-[2.3rem] lg:text-5xl leading-9",lg:"text-4xl lg:text-6xl"},fullWidth:{true:"w-full block"}},defaultVariants:{size:"md"},compoundVariants:[{color:["violet","yellow","blue","cyan","green","pink","foreground"],class:"bg-clip-text text-transparent bg-gradient-to-b"}]});qne({base:"w-full md:w-1/2 my-2 text-lg lg:text-xl text-default-600 block max-w-full",variants:{fullWidth:{true:"!w-full"}},defaultVariants:{fullWidth:!0}});var[P4e,Z8]=nh({name:"CardContext",strict:!0,errorMessage:"useCardContext: `context` is undefined. Seems you forgot to wrap component within <Card />"}),Wne=Ht((r,e)=>{var t;const{as:n,className:a,children:i,...o}=r,s=n||"div",l=$r(e),{slots:u,classNames:c}=Z8(),d=lt(c==null?void 0:c.body,a);return _.jsx(s,{ref:l,className:(t=u.body)==null?void 0:t.call(u,{class:d}),...o,children:i})});Wne.displayName="HeroUI.CardBody";var ms=Wne,Kne=Ht((r,e)=>{var t;const{as:n,className:a,children:i,...o}=r,s=n||"div",l=$r(e),{slots:u,classNames:c}=Z8(),d=lt(c==null?void 0:c.footer,a);return _.jsx(s,{ref:l,className:(t=u.footer)==null?void 0:t.call(u,{class:d}),...o,children:i})});Kne.displayName="HeroUI.CardFooter";var I4e=Kne,Yne=Ht((r,e)=>{var t;const{as:n,className:a,children:i,...o}=r,s=n||"div",l=$r(e),{slots:u,classNames:c}=Z8(),d=lt(c==null?void 0:c.header,a);return _.jsx(s,{ref:l,className:(t=u.header)==null?void 0:t.call(u,{class:d}),...o,children:i})});Yne.displayName="HeroUI.CardHeader";var p3=Yne;function M2(r,e){let{elementType:t="button",isDisabled:n,onPress:a,onPressStart:i,onPressEnd:o,onPressChange:s,preventFocusOnPress:l,allowFocusWhenDisabled:u,onClick:c,href:d,target:f,rel:h,type:v="button",allowTextSelectionOnPress:m}=r,y;t==="button"?y={type:v,disabled:n}:y={role:"button",tabIndex:n?void 0:0,href:t==="a"&&!n?d:void 0,target:t==="a"?f:void 0,type:t==="input"?v:void 0,disabled:t==="input"?n:void 0,"aria-disabled":!n||t==="input"?void 0:n,rel:t==="a"?h:void 0};let b=Tv()||T2();c&&typeof c=="function"&&T8("onClick is deprecated, please use onPress instead. See: https://github.com/heroui-inc/heroui/issues/4292","useButton");const w=P=>{b&&(c==null||c(P)),a==null||a(P)};let{pressProps:S,isPressed:T}=Ss({onPressStart:i,onPressEnd:o,onPressChange:s,onPress:w,isDisabled:n,preventFocusOnPress:l,allowTextSelectionOnPress:m,ref:e}),{focusableProps:A}=L0(r,e);u&&(A.tabIndex=n?-1:A.tabIndex);let M=ze(A,S,hi(r,{labelable:!0}));return{isPressed:T,buttonProps:ze(y,M,{"aria-haspopup":r["aria-haspopup"],"aria-expanded":r["aria-expanded"],"aria-controls":r["aria-controls"],"aria-pressed":r["aria-pressed"],onClick:P=>{v==="button"&&b||c==null||c(P)}})}}const k4e="modulepreload",R4e=function(r){return"/web/"+r},YF={},Jc=function(e,t,n){let a=Promise.resolve();if(t&&t.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),s=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));a=Promise.allSettled(t.map(l=>{if(l=R4e(l),l in YF)return;YF[l]=!0;const u=l.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${c}`))return;const d=document.createElement("link");if(d.rel=u?"stylesheet":k4e,u||(d.as="script"),d.crossOrigin="",d.href=l,s&&d.setAttribute("nonce",s),document.head.appendChild(d),u)return new Promise((f,h)=>{d.addEventListener("load",f),d.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${l}`)))})}))}function i(o){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o}return a.then(o=>{for(const s of o||[])s.status==="rejected"&&i(s.reason);return e().catch(i)})};var N4e=()=>Jc(()=>import("./index-CGOi-AYz.js"),[]).then(r=>r.default),Zne=r=>{const{ripples:e=[],motionProps:t,color:n="currentColor",style:a,onClear:i}=r;return _.jsx(_.Fragment,{children:e.map(o=>{const s=p_e(.01*o.size,.2,o.size>100?.75:.5);return _.jsx(Mi,{features:N4e,children:_.jsx(fl,{mode:"popLayout",children:_.jsx(Di.span,{animate:{transform:"scale(2)",opacity:0},className:"heroui-ripple",exit:{opacity:0},initial:{transform:"scale(0)",opacity:.35},style:{position:"absolute",backgroundColor:n,borderRadius:"100%",transformOrigin:"center",pointerEvents:"none",overflow:"hidden",inset:0,zIndex:0,top:o.y,left:o.x,width:`${o.size}px`,height:`${o.size}px`,...a},transition:{duration:s},onAnimationComplete:()=>{i(o.key)},...t})})},o.key)})})};Zne.displayName="HeroUI.Ripple";var Xne=Zne;function Jne(r={}){const[e,t]=D.useState([]),n=D.useCallback(i=>{const o=i.target,s=Math.max(o.clientWidth,o.clientHeight);t(l=>[...l,{key:c_e(l.length.toString()),size:s,x:i.x-s/2,y:i.y-s/2}])},[]),a=D.useCallback(i=>{t(o=>o.filter(s=>s.key!==i))},[]);return{ripples:e,onClear:a,onPress:n,...r}}function O4e(r){var e,t,n,a;const i=Vr(),[o,s]=oa(r,dF.variantKeys),{ref:l,as:u,children:c,onClick:d,onPress:f,autoFocus:h,className:v,classNames:m,allowTextSelectionOnPress:y=!0,...b}=o,w=$r(l),S=u||(r.isPressable?"button":"div"),T=typeof S=="string",A=(t=(e=r.disableAnimation)!=null?e:i==null?void 0:i.disableAnimation)!=null?t:!1,M=(a=(n=r.disableRipple)!=null?n:i==null?void 0:i.disableRipple)!=null?a:!1,P=lt(m==null?void 0:m.base,v),{onClear:E,onPress:R,ripples:N}=Jne(),k=D.useCallback(Z=>{M||A||w.current&&R(Z)},[M,A,w,R]),{buttonProps:O,isPressed:L}=M2({onPress:Un(f,k),elementType:u,isDisabled:!r.isPressable,onClick:d,allowTextSelectionOnPress:y,...b},w),{hoverProps:$,isHovered:j}=Ia({isDisabled:!r.isHoverable,...b}),{isFocusVisible:B,isFocused:H,focusProps:F}=Rn({autoFocus:h}),K=D.useMemo(()=>dF({...s,disableAnimation:A}),[eo(s),A]),U=D.useMemo(()=>({slots:K,classNames:m,disableAnimation:A,isDisabled:r.isDisabled,isFooterBlurred:r.isFooterBlurred,fullWidth:r.fullWidth}),[K,m,r.isDisabled,r.isFooterBlurred,A,r.fullWidth]),V=D.useCallback((Z={})=>({ref:w,className:K.base({class:P}),tabIndex:r.isPressable?0:-1,"data-hover":je(j),"data-pressed":je(L),"data-focus":je(H),"data-focus-visible":je(B),"data-disabled":je(r.isDisabled),...ze(r.isPressable?{...O,...F,role:"button"}:{},r.isHoverable?$:{},Pa(b,{enabled:T}),Pa(Z))}),[w,K,P,T,r.isPressable,r.isHoverable,r.isDisabled,j,L,B,O,F,$,b]),Q=D.useCallback(()=>({ripples:N,onClear:E}),[N,E]);return{context:U,domRef:w,Component:S,classNames:m,children:c,isHovered:j,isPressed:L,disableAnimation:A,isPressable:r.isPressable,isHoverable:r.isHoverable,disableRipple:M,handlePress:k,isFocusVisible:B,getCardProps:V,getRippleProps:Q}}var eae=Ht((r,e)=>{const{children:t,context:n,Component:a,isPressable:i,disableAnimation:o,disableRipple:s,getCardProps:l,getRippleProps:u}=O4e({...r,ref:e});return _.jsxs(a,{...l(),children:[_.jsx(P4e,{value:n,children:t}),i&&!o&&!s&&_.jsx(Xne,{...u()})]})});eae.displayName="HeroUI.Card";var Fa=eae;function tae(r,e){return function(){return r.apply(e,arguments)}}const{toString:$4e}=Object.prototype,{getPrototypeOf:X8}=Object,v3=(r=>e=>{const t=$4e.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),xl=r=>(r=r.toLowerCase(),e=>v3(e)===r),g3=r=>e=>typeof e===r,{isArray:R0}=Array,vx=g3("undefined");function z4e(r){return r!==null&&!vx(r)&&r.constructor!==null&&!vx(r.constructor)&&mo(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const rae=xl("ArrayBuffer");function j4e(r){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(r):e=r&&r.buffer&&rae(r.buffer),e}const B4e=g3("string"),mo=g3("function"),nae=g3("number"),m3=r=>r!==null&&typeof r=="object",V4e=r=>r===!0||r===!1,sC=r=>{if(v3(r)!=="object")return!1;const e=X8(r);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in r)&&!(Symbol.iterator in r)},F4e=xl("Date"),H4e=xl("File"),U4e=xl("Blob"),G4e=xl("FileList"),q4e=r=>m3(r)&&mo(r.pipe),Q4e=r=>{let e;return r&&(typeof FormData=="function"&&r instanceof FormData||mo(r.append)&&((e=v3(r))==="formdata"||e==="object"&&mo(r.toString)&&r.toString()==="[object FormData]"))},W4e=xl("URLSearchParams"),[K4e,Y4e,Z4e,X4e]=["ReadableStream","Request","Response","Headers"].map(xl),J4e=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function D2(r,e,{allOwnKeys:t=!1}={}){if(r===null||typeof r>"u")return;let n,a;if(typeof r!="object"&&(r=[r]),R0(r))for(n=0,a=r.length;n<a;n++)e.call(null,r[n],n,r);else{const i=t?Object.getOwnPropertyNames(r):Object.keys(r),o=i.length;let s;for(n=0;n<o;n++)s=i[n],e.call(null,r[s],s,r)}}function aae(r,e){e=e.toLowerCase();const t=Object.keys(r);let n=t.length,a;for(;n-- >0;)if(a=t[n],e===a.toLowerCase())return a;return null}const Ap=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,iae=r=>!vx(r)&&r!==Ap;function UI(){const{caseless:r}=iae(this)&&this||{},e={},t=(n,a)=>{const i=r&&aae(e,a)||a;sC(e[i])&&sC(n)?e[i]=UI(e[i],n):sC(n)?e[i]=UI({},n):R0(n)?e[i]=n.slice():e[i]=n};for(let n=0,a=arguments.length;n<a;n++)arguments[n]&&D2(arguments[n],t);return e}const eEe=(r,e,t,{allOwnKeys:n}={})=>(D2(e,(a,i)=>{t&&mo(a)?r[i]=tae(a,t):r[i]=a},{allOwnKeys:n}),r),tEe=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),rEe=(r,e,t,n)=>{r.prototype=Object.create(e.prototype,n),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:e.prototype}),t&&Object.assign(r.prototype,t)},nEe=(r,e,t,n)=>{let a,i,o;const s={};if(e=e||{},r==null)return e;do{for(a=Object.getOwnPropertyNames(r),i=a.length;i-- >0;)o=a[i],(!n||n(o,r,e))&&!s[o]&&(e[o]=r[o],s[o]=!0);r=t!==!1&&X8(r)}while(r&&(!t||t(r,e))&&r!==Object.prototype);return e},aEe=(r,e,t)=>{r=String(r),(t===void 0||t>r.length)&&(t=r.length),t-=e.length;const n=r.indexOf(e,t);return n!==-1&&n===t},iEe=r=>{if(!r)return null;if(R0(r))return r;let e=r.length;if(!nae(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=r[e];return t},oEe=(r=>e=>r&&e instanceof r)(typeof Uint8Array<"u"&&X8(Uint8Array)),sEe=(r,e)=>{const n=(r&&r[Symbol.iterator]).call(r);let a;for(;(a=n.next())&&!a.done;){const i=a.value;e.call(r,i[0],i[1])}},lEe=(r,e)=>{let t;const n=[];for(;(t=r.exec(e))!==null;)n.push(t);return n},uEe=xl("HTMLFormElement"),cEe=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,n,a){return n.toUpperCase()+a}),ZF=(({hasOwnProperty:r})=>(e,t)=>r.call(e,t))(Object.prototype),dEe=xl("RegExp"),oae=(r,e)=>{const t=Object.getOwnPropertyDescriptors(r),n={};D2(t,(a,i)=>{let o;(o=e(a,i,r))!==!1&&(n[i]=o||a)}),Object.defineProperties(r,n)},fEe=r=>{oae(r,(e,t)=>{if(mo(r)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const n=r[t];if(mo(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},hEe=(r,e)=>{const t={},n=a=>{a.forEach(i=>{t[i]=!0})};return R0(r)?n(r):n(String(r).split(e)),t},pEe=()=>{},vEe=(r,e)=>r!=null&&Number.isFinite(r=+r)?r:e,IM="abcdefghijklmnopqrstuvwxyz",XF="0123456789",sae={DIGIT:XF,ALPHA:IM,ALPHA_DIGIT:IM+IM.toUpperCase()+XF},gEe=(r=16,e=sae.ALPHA_DIGIT)=>{let t="";const{length:n}=e;for(;r--;)t+=e[Math.random()*n|0];return t};function mEe(r){return!!(r&&mo(r.append)&&r[Symbol.toStringTag]==="FormData"&&r[Symbol.iterator])}const yEe=r=>{const e=new Array(10),t=(n,a)=>{if(m3(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[a]=n;const i=R0(n)?[]:{};return D2(n,(o,s)=>{const l=t(o,a+1);!vx(l)&&(i[s]=l)}),e[a]=void 0,i}}return n};return t(r,0)},bEe=xl("AsyncFunction"),xEe=r=>r&&(m3(r)||mo(r))&&mo(r.then)&&mo(r.catch),lae=((r,e)=>r?setImmediate:e?((t,n)=>(Ap.addEventListener("message",({source:a,data:i})=>{a===Ap&&i===t&&n.length&&n.shift()()},!1),a=>{n.push(a),Ap.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",mo(Ap.postMessage)),wEe=typeof queueMicrotask<"u"?queueMicrotask.bind(Ap):typeof process<"u"&&process.nextTick||lae,De={isArray:R0,isArrayBuffer:rae,isBuffer:z4e,isFormData:Q4e,isArrayBufferView:j4e,isString:B4e,isNumber:nae,isBoolean:V4e,isObject:m3,isPlainObject:sC,isReadableStream:K4e,isRequest:Y4e,isResponse:Z4e,isHeaders:X4e,isUndefined:vx,isDate:F4e,isFile:H4e,isBlob:U4e,isRegExp:dEe,isFunction:mo,isStream:q4e,isURLSearchParams:W4e,isTypedArray:oEe,isFileList:G4e,forEach:D2,merge:UI,extend:eEe,trim:J4e,stripBOM:tEe,inherits:rEe,toFlatObject:nEe,kindOf:v3,kindOfTest:xl,endsWith:aEe,toArray:iEe,forEachEntry:sEe,matchAll:lEe,isHTMLForm:uEe,hasOwnProperty:ZF,hasOwnProp:ZF,reduceDescriptors:oae,freezeMethods:fEe,toObjectSet:hEe,toCamelCase:cEe,noop:pEe,toFiniteNumber:vEe,findKey:aae,global:Ap,isContextDefined:iae,ALPHABET:sae,generateString:gEe,isSpecCompliantForm:mEe,toJSONObject:yEe,isAsyncFn:bEe,isThenable:xEe,setImmediate:lae,asap:wEe};function Ut(r,e,t,n,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),n&&(this.request=n),a&&(this.response=a,this.status=a.status?a.status:null)}De.inherits(Ut,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:De.toJSONObject(this.config),code:this.code,status:this.status}}});const uae=Ut.prototype,cae={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(r=>{cae[r]={value:r}});Object.defineProperties(Ut,cae);Object.defineProperty(uae,"isAxiosError",{value:!0});Ut.from=(r,e,t,n,a,i)=>{const o=Object.create(uae);return De.toFlatObject(r,o,function(l){return l!==Error.prototype},s=>s!=="isAxiosError"),Ut.call(o,r.message,e,t,n,a),o.cause=r,o.name=r.name,i&&Object.assign(o,i),o};const SEe=null;function GI(r){return De.isPlainObject(r)||De.isArray(r)}function dae(r){return De.endsWith(r,"[]")?r.slice(0,-2):r}function JF(r,e,t){return r?r.concat(e).map(function(a,i){return a=dae(a),!t&&i?"["+a+"]":a}).join(t?".":""):e}function _Ee(r){return De.isArray(r)&&!r.some(GI)}const CEe=De.toFlatObject(De,{},null,function(e){return/^is[A-Z]/.test(e)});function y3(r,e,t){if(!De.isObject(r))throw new TypeError("target must be an object");e=e||new FormData,t=De.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,y){return!De.isUndefined(y[m])});const n=t.metaTokens,a=t.visitor||c,i=t.dots,o=t.indexes,l=(t.Blob||typeof Blob<"u"&&Blob)&&De.isSpecCompliantForm(e);if(!De.isFunction(a))throw new TypeError("visitor must be a function");function u(v){if(v===null)return"";if(De.isDate(v))return v.toISOString();if(!l&&De.isBlob(v))throw new Ut("Blob is not supported. Use a Buffer instead.");return De.isArrayBuffer(v)||De.isTypedArray(v)?l&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function c(v,m,y){let b=v;if(v&&!y&&typeof v=="object"){if(De.endsWith(m,"{}"))m=n?m:m.slice(0,-2),v=JSON.stringify(v);else if(De.isArray(v)&&_Ee(v)||(De.isFileList(v)||De.endsWith(m,"[]"))&&(b=De.toArray(v)))return m=dae(m),b.forEach(function(S,T){!(De.isUndefined(S)||S===null)&&e.append(o===!0?JF([m],T,i):o===null?m:m+"[]",u(S))}),!1}return GI(v)?!0:(e.append(JF(y,m,i),u(v)),!1)}const d=[],f=Object.assign(CEe,{defaultVisitor:c,convertValue:u,isVisitable:GI});function h(v,m){if(!De.isUndefined(v)){if(d.indexOf(v)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(v),De.forEach(v,function(b,w){(!(De.isUndefined(b)||b===null)&&a.call(e,b,De.isString(w)?w.trim():w,m,f))===!0&&h(b,m?m.concat(w):[w])}),d.pop()}}if(!De.isObject(r))throw new TypeError("data must be an object");return h(r),e}function eH(r){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function J8(r,e){this._pairs=[],r&&y3(r,this,e)}const fae=J8.prototype;fae.append=function(e,t){this._pairs.push([e,t])};fae.toString=function(e){const t=e?function(n){return e.call(this,n,eH)}:eH;return this._pairs.map(function(a){return t(a[0])+"="+t(a[1])},"").join("&")};function TEe(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function hae(r,e,t){if(!e)return r;const n=t&&t.encode||TEe;De.isFunction(t)&&(t={serialize:t});const a=t&&t.serialize;let i;if(a?i=a(e,t):i=De.isURLSearchParams(e)?e.toString():new J8(e,t).toString(n),i){const o=r.indexOf("#");o!==-1&&(r=r.slice(0,o)),r+=(r.indexOf("?")===-1?"?":"&")+i}return r}class tH{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){De.forEach(this.handlers,function(n){n!==null&&e(n)})}}const pae={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},AEe=typeof URLSearchParams<"u"?URLSearchParams:J8,EEe=typeof FormData<"u"?FormData:null,MEe=typeof Blob<"u"?Blob:null,DEe={isBrowser:!0,classes:{URLSearchParams:AEe,FormData:EEe,Blob:MEe},protocols:["http","https","file","blob","url","data"]},eN=typeof window<"u"&&typeof document<"u",qI=typeof navigator=="object"&&navigator||void 0,LEe=eN&&(!qI||["ReactNative","NativeScript","NS"].indexOf(qI.product)<0),PEe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",IEe=eN&&window.location.href||"http://localhost",kEe=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:eN,hasStandardBrowserEnv:LEe,hasStandardBrowserWebWorkerEnv:PEe,navigator:qI,origin:IEe},Symbol.toStringTag,{value:"Module"})),oi={...kEe,...DEe};function REe(r,e){return y3(r,new oi.classes.URLSearchParams,Object.assign({visitor:function(t,n,a,i){return oi.isNode&&De.isBuffer(t)?(this.append(n,t.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function NEe(r){return De.matchAll(/\w+|\[(\w*)]/g,r).map(e=>e[0]==="[]"?"":e[1]||e[0])}function OEe(r){const e={},t=Object.keys(r);let n;const a=t.length;let i;for(n=0;n<a;n++)i=t[n],e[i]=r[i];return e}function vae(r){function e(t,n,a,i){let o=t[i++];if(o==="__proto__")return!0;const s=Number.isFinite(+o),l=i>=t.length;return o=!o&&De.isArray(a)?a.length:o,l?(De.hasOwnProp(a,o)?a[o]=[a[o],n]:a[o]=n,!s):((!a[o]||!De.isObject(a[o]))&&(a[o]=[]),e(t,n,a[o],i)&&De.isArray(a[o])&&(a[o]=OEe(a[o])),!s)}if(De.isFormData(r)&&De.isFunction(r.entries)){const t={};return De.forEachEntry(r,(n,a)=>{e(NEe(n),a,t,0)}),t}return null}function $Ee(r,e,t){if(De.isString(r))try{return(e||JSON.parse)(r),De.trim(r)}catch(n){if(n.name!=="SyntaxError")throw n}return(t||JSON.stringify)(r)}const L2={transitional:pae,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",a=n.indexOf("application/json")>-1,i=De.isObject(e);if(i&&De.isHTMLForm(e)&&(e=new FormData(e)),De.isFormData(e))return a?JSON.stringify(vae(e)):e;if(De.isArrayBuffer(e)||De.isBuffer(e)||De.isStream(e)||De.isFile(e)||De.isBlob(e)||De.isReadableStream(e))return e;if(De.isArrayBufferView(e))return e.buffer;if(De.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return REe(e,this.formSerializer).toString();if((s=De.isFileList(e))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return y3(s?{"files[]":e}:e,l&&new l,this.formSerializer)}}return i||a?(t.setContentType("application/json",!1),$Ee(e)):e}],transformResponse:[function(e){const t=this.transitional||L2.transitional,n=t&&t.forcedJSONParsing,a=this.responseType==="json";if(De.isResponse(e)||De.isReadableStream(e))return e;if(e&&De.isString(e)&&(n&&!this.responseType||a)){const o=!(t&&t.silentJSONParsing)&&a;try{return JSON.parse(e)}catch(s){if(o)throw s.name==="SyntaxError"?Ut.from(s,Ut.ERR_BAD_RESPONSE,this,null,this.response):s}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:oi.classes.FormData,Blob:oi.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};De.forEach(["delete","get","head","post","put","patch"],r=>{L2.headers[r]={}});const zEe=De.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),jEe=r=>{const e={};let t,n,a;return r&&r.split(`
|
|
100
|
+
*/function YAe(r,e,t){return Math.min(Math.max(r,e),t)}var ZAe=(r,e)=>{if(!r&&!e)return{};const t=new Set([...Object.keys(r||{}),...Object.keys(e||{})]);return Array.from(t).reduce((n,a)=>({...n,[a]:Cr(r==null?void 0:r[a],e==null?void 0:e[a])}),{})};function B8(r={}){const{strict:e=!0,errorMessage:t="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:n}=r,a=D.createContext(void 0);a.displayName=n;function i(){var o;const s=D.useContext(a);if(!s&&e){const l=new Error(t);throw l.name="ContextError",(o=Error.captureStackTrace)==null||o.call(Error,l,i),l}return s}return[a.Provider,i,a]}function XAe(r){return{UNSAFE_getDOMNode(){return r.current}}}function bc(r){const e=D.useRef(null);return D.useImperativeHandle(r,()=>e.current),e}function JAe(r,e){if(r!=null){if(zAe(r)){r(e);return}try{r.current=e}catch{throw new Error(`Cannot assign value '${e}' to ref '${r}'`)}}}function V8(...r){return e=>{r.forEach(t=>JAe(t,e))}}var e3e=(r,e)=>{var t;let n=[];const a=(t=D.Children.map(r,o=>D.isValidElement(o)&&o.type===e?(n.push(o),null):o))==null?void 0:t.filter(Boolean),i=n.length>=0?n:void 0;return[a,i]},t3e=new Set(["id","type","style","title","role","tabIndex","htmlFor","width","height","abbr","accept","acceptCharset","accessKey","action","allowFullScreen","allowTransparency","alt","async","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","challenge","charset","checked","cite","class","className","cols","colSpan","command","content","contentEditable","contextMenu","controls","coords","crossOrigin","data","dateTime","default","defer","dir","disabled","download","draggable","dropzone","encType","enterKeyHint","for","form","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","headers","hidden","high","href","hrefLang","httpEquiv","icon","inputMode","isMap","itemId","itemProp","itemRef","itemScope","itemType","kind","label","lang","list","loop","manifest","max","maxLength","media","mediaGroup","method","min","minLength","multiple","muted","name","noValidate","open","optimum","pattern","ping","placeholder","poster","preload","radioGroup","referrerPolicy","readOnly","rel","required","rows","rowSpan","sandbox","scope","scoped","scrolling","seamless","selected","shape","size","sizes","slot","sortable","span","spellCheck","src","srcDoc","srcSet","start","step","target","translate","typeMustMatch","useMap","value","wmode","wrap"]),r3e=new Set(["onCopy","onCut","onPaste","onLoad","onError","onWheel","onScroll","onCompositionEnd","onCompositionStart","onCompositionUpdate","onKeyDown","onKeyPress","onKeyUp","onFocus","onBlur","onChange","onInput","onSubmit","onClick","onContextMenu","onDoubleClick","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onPointerDown","onPointerEnter","onPointerLeave","onPointerUp","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionEnd"]),gF=/^(data-.*)$/,n3e=/^(aria-.*)$/,DS=/^(on[A-Z].*)$/;function av(r,e={}){let{labelable:t=!0,enabled:n=!0,propNames:a,omitPropNames:i,omitEventNames:o,omitDataProps:s,omitEventProps:l}=e,u={};if(!n)return r;for(const c in r)i!=null&&i.has(c)||o!=null&&o.has(c)&&DS.test(c)||DS.test(c)&&!r3e.has(c)||s&&gF.test(c)||l&&DS.test(c)||(Object.prototype.hasOwnProperty.call(r,c)&&(t3e.has(c)||t&&n3e.test(c)||a!=null&&a.has(c)||gF.test(c))||DS.test(c))&&(u[c]=r[c]);return u}var d3=globalThis!=null&&globalThis.document?D.useLayoutEffect:D.useEffect;function oT(r){const e=po(r);if(mI()==="virtual"){let t=e.activeElement;rte(()=>{e.activeElement===t&&r.isConnected&&gc(r)})}else gc(r)}function a3e(r){const e=Zp(r);if(!(r instanceof e.HTMLElement)&&!(r instanceof e.SVGElement))return!1;let{display:t,visibility:n}=r.style,a=t!=="none"&&n!=="hidden"&&n!=="collapse";if(a){const{getComputedStyle:i}=r.ownerDocument.defaultView;let{display:o,visibility:s}=i(r);a=o!=="none"&&s!=="hidden"&&s!=="collapse"}return a}function i3e(r,e){return!r.hasAttribute("hidden")&&!r.hasAttribute("data-react-aria-prevent-focus")&&(r.nodeName==="DETAILS"&&e&&e.nodeName!=="SUMMARY"?r.hasAttribute("open"):!0)}function mne(r,e){return r.nodeName!=="#comment"&&a3e(r)&&i3e(r,e)&&(!r.parentElement||mne(r.parentElement,r))}const F8=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])'],o3e=F8.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";F8.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const s3e=F8.join(':not([hidden]):not([tabindex="-1"]),');function yne(r,e){return!r||!e?!1:e.some(t=>t.contains(r))}function l3e(r,e,t){let n=e!=null&&e.tabbable?s3e:o3e,a=po(r).createTreeWalker(r,NodeFilter.SHOW_ELEMENT,{acceptNode(i){var o;return!(e==null||(o=e.from)===null||o===void 0)&&o.contains(i)?NodeFilter.FILTER_REJECT:i.matches(n)&&mne(i)&&(!t||yne(i,t))&&(!(e!=null&&e.accept)||e.accept(i))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return e!=null&&e.from&&(a.currentNode=e.from),a}class H8{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,n){let a=this.fastMap.get(t??null);if(!a)return;let i=new mF({scopeRef:e});a.addChild(i),i.parent=a,this.fastMap.set(e,i),n&&(i.nodeToRestore=n)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(e===null)return;let t=this.fastMap.get(e);if(!t)return;let n=t.parent;for(let i of this.traverse())i!==t&&t.nodeToRestore&&i.nodeToRestore&&t.scopeRef&&t.scopeRef.current&&yne(i.nodeToRestore,t.scopeRef.current)&&(i.nodeToRestore=t.nodeToRestore);let a=t.children;n&&(n.removeChild(t),a.size>0&&a.forEach(i=>n&&n.addChild(i))),this.fastMap.delete(t.scopeRef)}*traverse(e=this.root){if(e.scopeRef!=null&&(yield e),e.children.size>0)for(let t of e.children)yield*this.traverse(t)}clone(){var e;let t=new H8;var n;for(let a of this.traverse())t.addTreeNode(a.scopeRef,(n=(e=a.parent)===null||e===void 0?void 0:e.scopeRef)!==null&&n!==void 0?n:null,a.nodeToRestore);return t}constructor(){this.fastMap=new Map,this.root=new mF({scopeRef:null}),this.fastMap.set(null,this.root)}}class mF{addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}}new H8;let u3e=Be.createContext(null);function c3e(r){let e=D.useContext(u3e)||{};ate(e,r);let{ref:t,...n}=e;return n}function bne(r,e){let{focusProps:t}=pte(r),{keyboardProps:n}=bte(r),a=gs(t,n),i=c3e(e),o=r.isDisabled?{}:i,s=D.useRef(r.autoFocus);return D.useEffect(()=>{s.current&&e.current&&oT(e.current),s.current=!1},[e]),{focusableProps:gs({...a,tabIndex:r.excludeFromTabOrder&&!r.isDisabled?-1:void 0},o)}}function xne(r,e,t){let{isDisabled:n=!1,isReadOnly:a=!1,value:i,name:o,children:s,"aria-label":l,"aria-labelledby":u,validationState:c="valid",isInvalid:d}=r,f=M=>{M.stopPropagation(),e.setSelected(M.target.checked)},h=s!=null,v=l!=null||u!=null;!h&&!v&&console.warn("If you do not provide children, you must specify an aria-label for accessibility");let{pressProps:m,isPressed:y}=dx({isDisabled:n}),{pressProps:b,isPressed:w}=dx({isDisabled:n||a,onPress(){e.toggle()}}),{focusableProps:S}=bne(r,t),T=gs(m,S),A=cSe(r,{labelable:!0});return ESe(t,e.isSelected,e.setSelected),{labelProps:gs(b,{onClick:M=>M.preventDefault()}),inputProps:gs(A,{"aria-invalid":d||c==="invalid"||void 0,"aria-errormessage":r["aria-errormessage"],"aria-controls":r["aria-controls"],"aria-readonly":a||void 0,onChange:f,disabled:n,...i==null?{}:{value:i},name:o,type:"checkbox",...T}),isSelected:e.isSelected,isPressed:y||w,isDisabled:n,isReadOnly:a,isInvalid:d||c==="invalid"}}function d3e(r,e,t){let{labelProps:n,inputProps:a,isSelected:i,isPressed:o,isDisabled:s,isReadOnly:l}=xne(r,e,t);return{labelProps:n,inputProps:{...a,role:"switch",checked:i},isSelected:i,isPressed:o,isDisabled:s,isReadOnly:l}}function U8(r={}){let{isReadOnly:e}=r,[t,n]=bl(r.isSelected,r.defaultSelected||!1,r.onChange);function a(o){e||n(o)}function i(){e||n(!t)}return{isSelected:t,setSelected:a,toggle:i}}function wne(r={}){var e,t;const n=Vr(),[a,i]=oa(r,aF.variantKeys),{ref:o,as:s,name:l,value:u="",isReadOnly:c=!1,autoFocus:d=!1,startContent:f,endContent:h,defaultSelected:v,isSelected:m,children:y,thumbIcon:b,className:w,classNames:S,onChange:T,onValueChange:A,...M}=a,P=s||"label",E=D.useRef(null),R=D.useRef(null),N=(t=(e=r.disableAnimation)!=null?e:n==null?void 0:n.disableAnimation)!=null?t:!1,k=D.useId(),O=D.useMemo(()=>{const ie=M["aria-label"]||typeof y=="string"?y:void 0;return{name:l,value:u,children:y,autoFocus:d,defaultSelected:v,isSelected:m,isDisabled:!!r.isDisabled,isReadOnly:c,"aria-label":ie,"aria-labelledby":M["aria-labelledby"]||k,onChange:A}},[u,l,k,y,d,c,m,v,r.isDisabled,M["aria-label"],M["aria-labelledby"],A]),L=U8(O);d3(()=>{if(!R.current)return;const ie=!!R.current.checked;L.setSelected(ie)},[R.current]);const{inputProps:$,isPressed:j,isReadOnly:B}=d3e(O,L,R),{focusProps:H,isFocused:F,isFocusVisible:K}=Rn({autoFocus:$.autoFocus}),{hoverProps:U,isHovered:V}=Ia({isDisabled:$.disabled}),Z=O.isDisabled||B?!1:j,Y=$.checked,X=$.disabled,re=D.useMemo(()=>aF({...i,disableAnimation:N}),[Xc(i),N]),oe=Cr(S==null?void 0:S.base,w),ae=ie=>({...ze(U,M,ie),ref:E,className:re.base({class:Cr(oe,ie==null?void 0:ie.className)}),"data-disabled":ht(X),"data-selected":ht(Y),"data-readonly":ht(B),"data-focus":ht(F),"data-focus-visible":ht(K),"data-hover":ht(V),"data-pressed":ht(Z)}),se=D.useCallback((ie={})=>({...ie,"aria-hidden":!0,className:Cr(re.wrapper({class:Cr(S==null?void 0:S.wrapper,ie==null?void 0:ie.className)}))}),[re,S==null?void 0:S.wrapper]),le=(ie={})=>({...ze($,H,ie),ref:V8(R,o),id:$.id,className:re.hiddenInput({class:S==null?void 0:S.hiddenInput}),onChange:Un(T,$.onChange)}),fe=D.useCallback((ie={})=>({...ie,className:re.thumb({class:Cr(S==null?void 0:S.thumb,ie==null?void 0:ie.className)})}),[re,S==null?void 0:S.thumb]),ve=D.useCallback((ie={})=>({...ie,id:k,className:re.label({class:Cr(S==null?void 0:S.label,ie==null?void 0:ie.className)})}),[re,S==null?void 0:S.label,X,Y]),pe=D.useCallback((ie={includeStateProps:!1})=>ze({width:"1em",height:"1em",className:re.thumbIcon({class:Cr(S==null?void 0:S.thumbIcon)})},ie.includeStateProps?{isSelected:Y}:{}),[re,S==null?void 0:S.thumbIcon,Y]),Re=D.useCallback((ie={})=>({width:"1em",height:"1em",...ie,className:re.startContent({class:Cr(S==null?void 0:S.startContent,ie==null?void 0:ie.className)})}),[re,S==null?void 0:S.startContent,Y]),Ae=D.useCallback((ie={})=>({width:"1em",height:"1em",...ie,className:re.endContent({class:Cr(S==null?void 0:S.endContent,ie==null?void 0:ie.className)})}),[re,S==null?void 0:S.endContent,Y]);return{Component:P,slots:re,classNames:S,domRef:E,children:y,thumbIcon:b,startContent:f,endContent:h,isHovered:V,isSelected:Y,isPressed:Z,isFocused:F,isFocusVisible:K,isDisabled:X,getBaseProps:ae,getWrapperProps:se,getInputProps:le,getLabelProps:ve,getThumbProps:fe,getThumbIconProps:pe,getStartContentProps:Re,getEndContentProps:Ae}}var Sne=Ht((r,e)=>{const{Component:t,children:n,startContent:a,endContent:i,thumbIcon:o,getBaseProps:s,getInputProps:l,getWrapperProps:u,getThumbProps:c,getThumbIconProps:d,getLabelProps:f,getStartContentProps:h,getEndContentProps:v}=wne({...r,ref:e}),m=typeof o=="function"?o(d({includeStateProps:!0})):o&&D.cloneElement(o,d()),y=a&&D.cloneElement(a,h()),b=i&&D.cloneElement(i,v());return _.jsxs(t,{...s(),children:[_.jsx("input",{...l()}),_.jsxs("span",{...u(),children:[a&&y,_.jsx("span",{...c(),children:o&&m}),i&&b]}),n&&_.jsx("span",{...f(),children:n})]})});Sne.displayName="HeroUI.Switch";var _ne=Sne,f3e=function(r){return function(e,t){var n=D.useRef(!1);r(function(){return function(){n.current=!1}},[]),r(function(){if(!n.current)n.current=!0;else return e()},t)}},sT=function(r){return typeof r=="function"},h3e=function(r){return typeof r>"u"};function up(r){var e=D.useRef(r);e.current=D.useMemo(function(){return r},[r]);var t=D.useRef();return t.current||(t.current=function(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];return e.current.apply(this,n)}),t.current}const lT=f3e(D.useEffect);var Cne=function(r,e){var t=e.manual,n=e.ready,a=n===void 0?!0:n,i=e.defaultParams,o=i===void 0?[]:i,s=e.refreshDeps,l=s===void 0?[]:s,u=e.refreshDepsAction,c=D.useRef(!1);return c.current=!1,lT(function(){!t&&a&&(c.current=!0,r.run.apply(r,ii([],Ba(o),!1)))},[a]),lT(function(){c.current||t||(c.current=!0,u?u():r.refresh())},ii([],Ba(l),!1)),{onBefore:function(){if(!a)return{stopNow:!0}}}};Cne.onInit=function(r){var e=r.ready,t=e===void 0?!0:e,n=r.manual;return{loading:!n&&t}};function jI(r,e){if(r===e)return!0;for(var t=0;t<r.length;t++)if(!Object.is(r[t],e[t]))return!1;return!0}function Tne(r,e){var t=D.useRef({deps:e,obj:void 0,initialized:!1}).current;return(t.initialized===!1||!jI(t.deps,e))&&(t.deps=e,t.obj=r(),t.initialized=!0),t.obj}function G8(r){var e=D.useRef(r);return e.current=r,e}var f3=function(r){var e=G8(r);D.useEffect(function(){return function(){e.current()}},[])},iC=new Map,p3e=function(r,e,t){var n=iC.get(r);n!=null&&n.timer&&clearTimeout(n.timer);var a=void 0;e>-1&&(a=setTimeout(function(){iC.delete(r)},e)),iC.set(r,Zs(Zs({},t),{timer:a}))},v3e=function(r){return iC.get(r)},oC=new Map,g3e=function(r){return oC.get(r)},m3e=function(r,e){oC.set(r,e),e.then(function(t){return oC.delete(r),t}).catch(function(){oC.delete(r)})},yp={},y3e=function(r,e){yp[r]&&yp[r].forEach(function(t){return t(e)})},uM=function(r,e){return yp[r]||(yp[r]=[]),yp[r].push(e),function(){var n=yp[r].indexOf(e);yp[r].splice(n,1)}},b3e=function(r,e){var t=e.cacheKey,n=e.cacheTime,a=n===void 0?5*60*1e3:n,i=e.staleTime,o=i===void 0?0:i,s=e.setCache,l=e.getCache,u=D.useRef(),c=D.useRef(),d=function(h,v){s?s(v):p3e(h,a,v),y3e(h,v.data)},f=function(h,v){return v===void 0&&(v=[]),l?l(v):v3e(h)};return Tne(function(){if(t){var h=f(t);h&&Object.hasOwnProperty.call(h,"data")&&(r.state.data=h.data,r.state.params=h.params,(o===-1||new Date().getTime()-h.time<=o)&&(r.state.loading=!1)),u.current=uM(t,function(v){r.setState({data:v})})}},[]),f3(function(){var h;(h=u.current)===null||h===void 0||h.call(u)}),t?{onBefore:function(h){var v=f(t,h);return!v||!Object.hasOwnProperty.call(v,"data")?{}:o===-1||new Date().getTime()-v.time<=o?{loading:!1,data:v==null?void 0:v.data,error:void 0,returnNow:!0}:{data:v==null?void 0:v.data,error:void 0}},onRequest:function(h,v){var m=g3e(t);return m&&m!==c.current?{servicePromise:m}:(m=h.apply(void 0,ii([],Ba(v),!1)),c.current=m,m3e(t,m),{servicePromise:m})},onSuccess:function(h,v){var m;t&&((m=u.current)===null||m===void 0||m.call(u),d(t,{data:h,params:v,time:new Date().getTime()}),u.current=uM(t,function(y){r.setState({data:y})}))},onMutate:function(h){var v;t&&((v=u.current)===null||v===void 0||v.call(u),d(t,{data:h,params:r.state.params,time:new Date().getTime()}),u.current=uM(t,function(m){r.setState({data:m})}))}}:{}},cM,yF;function q8(){if(yF)return cM;yF=1;function r(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}return cM=r,cM}var dM,bF;function x3e(){if(bF)return dM;bF=1;var r=typeof fs=="object"&&fs&&fs.Object===Object&&fs;return dM=r,dM}var fM,xF;function Ane(){if(xF)return fM;xF=1;var r=x3e(),e=typeof self=="object"&&self&&self.Object===Object&&self,t=r||e||Function("return this")();return fM=t,fM}var hM,wF;function w3e(){if(wF)return hM;wF=1;var r=Ane(),e=function(){return r.Date.now()};return hM=e,hM}var pM,SF;function S3e(){if(SF)return pM;SF=1;var r=/\s/;function e(t){for(var n=t.length;n--&&r.test(t.charAt(n)););return n}return pM=e,pM}var vM,_F;function _3e(){if(_F)return vM;_F=1;var r=S3e(),e=/^\s+/;function t(n){return n&&n.slice(0,r(n)+1).replace(e,"")}return vM=t,vM}var gM,CF;function Ene(){if(CF)return gM;CF=1;var r=Ane(),e=r.Symbol;return gM=e,gM}var mM,TF;function C3e(){if(TF)return mM;TF=1;var r=Ene(),e=Object.prototype,t=e.hasOwnProperty,n=e.toString,a=r?r.toStringTag:void 0;function i(o){var s=t.call(o,a),l=o[a];try{o[a]=void 0;var u=!0}catch{}var c=n.call(o);return u&&(s?o[a]=l:delete o[a]),c}return mM=i,mM}var yM,AF;function T3e(){if(AF)return yM;AF=1;var r=Object.prototype,e=r.toString;function t(n){return e.call(n)}return yM=t,yM}var bM,EF;function A3e(){if(EF)return bM;EF=1;var r=Ene(),e=C3e(),t=T3e(),n="[object Null]",a="[object Undefined]",i=r?r.toStringTag:void 0;function o(s){return s==null?s===void 0?a:n:i&&i in Object(s)?e(s):t(s)}return bM=o,bM}var xM,MF;function E3e(){if(MF)return xM;MF=1;function r(e){return e!=null&&typeof e=="object"}return xM=r,xM}var wM,DF;function M3e(){if(DF)return wM;DF=1;var r=A3e(),e=E3e(),t="[object Symbol]";function n(a){return typeof a=="symbol"||e(a)&&r(a)==t}return wM=n,wM}var SM,LF;function D3e(){if(LF)return SM;LF=1;var r=_3e(),e=q8(),t=M3e(),n=NaN,a=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt;function l(u){if(typeof u=="number")return u;if(t(u))return n;if(e(u)){var c=typeof u.valueOf=="function"?u.valueOf():u;u=e(c)?c+"":c}if(typeof u!="string")return u===0?u:+u;u=r(u);var d=i.test(u);return d||o.test(u)?s(u.slice(2),d?2:8):a.test(u)?n:+u}return SM=l,SM}var _M,PF;function Mne(){if(PF)return _M;PF=1;var r=q8(),e=w3e(),t=D3e(),n="Expected a function",a=Math.max,i=Math.min;function o(s,l,u){var c,d,f,h,v,m,y=0,b=!1,w=!1,S=!0;if(typeof s!="function")throw new TypeError(n);l=t(l)||0,r(u)&&(b=!!u.leading,w="maxWait"in u,f=w?a(t(u.maxWait)||0,l):f,S="trailing"in u?!!u.trailing:S);function T(L){var $=c,j=d;return c=d=void 0,y=L,h=s.apply(j,$),h}function A(L){return y=L,v=setTimeout(E,l),b?T(L):h}function M(L){var $=L-m,j=L-y,B=l-$;return w?i(B,f-j):B}function P(L){var $=L-m,j=L-y;return m===void 0||$>=l||$<0||w&&j>=f}function E(){var L=e();if(P(L))return R(L);v=setTimeout(E,M(L))}function R(L){return v=void 0,S&&c?T(L):(c=d=void 0,h)}function N(){v!==void 0&&clearTimeout(v),y=0,c=m=d=v=void 0}function k(){return v===void 0?h:R(e())}function O(){var L=e(),$=P(L);if(c=arguments,d=this,m=L,$){if(v===void 0)return A(m);if(w)return clearTimeout(v),v=setTimeout(E,l),T(m)}return v===void 0&&(v=setTimeout(E,l)),h}return O.cancel=N,O.flush=k,O}return _M=o,_M}var L3e=Mne();const P3e=wu(L3e);var I3e=function(r,e){var t=e.debounceWait,n=e.debounceLeading,a=e.debounceTrailing,i=e.debounceMaxWait,o=D.useRef(),s=D.useMemo(function(){var l={};return n!==void 0&&(l.leading=n),a!==void 0&&(l.trailing=a),i!==void 0&&(l.maxWait=i),l},[n,a,i]);return D.useEffect(function(){if(t){var l=r.runAsync.bind(r);return o.current=P3e(function(u){u()},t,s),r.runAsync=function(){for(var u=[],c=0;c<arguments.length;c++)u[c]=arguments[c];return new Promise(function(d,f){var h;(h=o.current)===null||h===void 0||h.call(o,function(){l.apply(void 0,ii([],Ba(u),!1)).then(d).catch(f)})})},function(){var u;(u=o.current)===null||u===void 0||u.cancel(),r.runAsync=l}}},[t,s]),t?{onCancel:function(){var l;(l=o.current)===null||l===void 0||l.cancel()}}:{}},k3e=function(r,e){var t=e.loadingDelay,n=e.ready,a=D.useRef();if(!t)return{};var i=function(){a.current&&clearTimeout(a.current)};return{onBefore:function(){return i(),n!==!1&&(a.current=setTimeout(function(){r.setState({loading:!0})},t)),{loading:!1}},onFinally:function(){i()},onCancel:function(){i()}}},I0=!!(typeof window<"u"&&window.document&&window.document.createElement);function Q8(){return I0?document.visibilityState!=="hidden":!0}var Lb=[];function R3e(r){return Lb.push(r),function(){var t=Lb.indexOf(r);Lb.splice(t,1)}}if(I0){var N3e=function(){if(Q8())for(var r=0;r<Lb.length;r++){var e=Lb[r];e()}};window.addEventListener("visibilitychange",N3e,!1)}var O3e=function(r,e){var t=e.pollingInterval,n=e.pollingWhenHidden,a=n===void 0?!0:n,i=e.pollingErrorRetryCount,o=i===void 0?-1:i,s=D.useRef(),l=D.useRef(),u=D.useRef(0),c=function(){var d;s.current&&clearTimeout(s.current),(d=l.current)===null||d===void 0||d.call(l)};return lT(function(){t||c()},[t]),t?{onBefore:function(){c()},onError:function(){u.current+=1},onSuccess:function(){u.current=0},onFinally:function(){o===-1||o!==-1&&u.current<=o?s.current=setTimeout(function(){!a&&!Q8()?l.current=R3e(function(){r.refresh()}):r.refresh()},t):u.current=0},onCancel:function(){c()}}:{}};function $3e(r,e){var t=!1;return function(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];t||(t=!0,r.apply(void 0,ii([],Ba(n),!1)),setTimeout(function(){t=!1},e))}}function z3e(){return I0&&typeof navigator.onLine<"u"?navigator.onLine:!0}var Pb=[];function j3e(r){return Pb.push(r),function(){var t=Pb.indexOf(r);t>-1&&Pb.splice(t,1)}}if(I0){var IF=function(){if(!(!Q8()||!z3e()))for(var r=0;r<Pb.length;r++){var e=Pb[r];e()}};window.addEventListener("visibilitychange",IF,!1),window.addEventListener("focus",IF,!1)}var B3e=function(r,e){var t=e.refreshOnWindowFocus,n=e.focusTimespan,a=n===void 0?5e3:n,i=D.useRef(),o=function(){var s;(s=i.current)===null||s===void 0||s.call(i)};return D.useEffect(function(){if(t){var s=$3e(r.refresh.bind(r),a);i.current=j3e(function(){s()})}return function(){o()}},[t,a]),f3(function(){o()}),{}},V3e=function(r,e){var t=e.retryInterval,n=e.retryCount,a=D.useRef(),i=D.useRef(0),o=D.useRef(!1);return n?{onBefore:function(){o.current||(i.current=0),o.current=!1,a.current&&clearTimeout(a.current)},onSuccess:function(){i.current=0},onError:function(){if(i.current+=1,n===-1||i.current<=n){var s=t??Math.min(1e3*Math.pow(2,i.current),3e4);a.current=setTimeout(function(){o.current=!0,r.refresh()},s)}else i.current=0},onCancel:function(){i.current=0,a.current&&clearTimeout(a.current)}}:{}},CM,kF;function F3e(){if(kF)return CM;kF=1;var r=Mne(),e=q8(),t="Expected a function";function n(a,i,o){var s=!0,l=!0;if(typeof a!="function")throw new TypeError(t);return e(o)&&(s="leading"in o?!!o.leading:s,l="trailing"in o?!!o.trailing:l),r(a,i,{leading:s,maxWait:i,trailing:l})}return CM=n,CM}var H3e=F3e();const U3e=wu(H3e);var G3e=function(r,e){var t=e.throttleWait,n=e.throttleLeading,a=e.throttleTrailing,i=D.useRef(),o={};return n!==void 0&&(o.leading=n),a!==void 0&&(o.trailing=a),D.useEffect(function(){if(t){var s=r.runAsync.bind(r);return i.current=U3e(function(l){l()},t,o),r.runAsync=function(){for(var l=[],u=0;u<arguments.length;u++)l[u]=arguments[u];return new Promise(function(c,d){var f;(f=i.current)===null||f===void 0||f.call(i,function(){s.apply(void 0,ii([],Ba(l),!1)).then(c).catch(d)})})},function(){var l;r.runAsync=s,(l=i.current)===null||l===void 0||l.cancel()}}},[t,n,a]),t?{onCancel:function(){var s;(s=i.current)===null||s===void 0||s.cancel()}}:{}},q3e=function(r){D.useEffect(function(){r==null||r()},[])},Q3e=function(){var r=Ba(D.useState({}),2),e=r[1];return D.useCallback(function(){return e({})},[])},W3e=function(){function r(e,t,n,a){a===void 0&&(a={}),this.serviceRef=e,this.options=t,this.subscribe=n,this.initState=a,this.count=0,this.state={loading:!1,params:void 0,data:void 0,error:void 0},this.state=Zs(Zs(Zs({},this.state),{loading:!t.manual}),a)}return r.prototype.setState=function(e){e===void 0&&(e={}),this.state=Zs(Zs({},this.state),e),this.subscribe()},r.prototype.runPluginHandler=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var a=this.pluginImpls.map(function(i){var o;return(o=i[e])===null||o===void 0?void 0:o.call.apply(o,ii([i],Ba(t),!1))}).filter(Boolean);return Object.assign.apply(Object,ii([{}],Ba(a),!1))},r.prototype.runAsync=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return A_e(this,void 0,void 0,function(){var n,a,i,o,s,l,u,c,d,f,h,v,m,y,b,w,S,T,A,M,P;return E_e(this,function(E){switch(E.label){case 0:if(this.count+=1,n=this.count,a=this.runPluginHandler("onBefore",e),i=a.stopNow,o=i===void 0?!1:i,s=a.returnNow,l=s===void 0?!1:s,u=Ite(a,["stopNow","returnNow"]),o)return[2,new Promise(function(){})];if(this.setState(Zs({loading:!0,params:e},u)),l)return[2,Promise.resolve(u.data)];(m=(v=this.options).onBefore)===null||m===void 0||m.call(v,e),E.label=1;case 1:return E.trys.push([1,3,,4]),c=this.runPluginHandler("onRequest",this.serviceRef.current,e).servicePromise,c||(c=(h=this.serviceRef).current.apply(h,ii([],Ba(e),!1))),[4,c];case 2:return d=E.sent(),n!==this.count?[2,new Promise(function(){})]:(this.setState({data:d,error:void 0,loading:!1}),(b=(y=this.options).onSuccess)===null||b===void 0||b.call(y,d,e),this.runPluginHandler("onSuccess",d,e),(S=(w=this.options).onFinally)===null||S===void 0||S.call(w,e,d,void 0),n===this.count&&this.runPluginHandler("onFinally",e,d,void 0),[2,d]);case 3:if(f=E.sent(),n!==this.count)return[2,new Promise(function(){})];throw this.setState({error:f,loading:!1}),(A=(T=this.options).onError)===null||A===void 0||A.call(T,f,e),this.runPluginHandler("onError",f,e),(P=(M=this.options).onFinally)===null||P===void 0||P.call(M,e,void 0,f),n===this.count&&this.runPluginHandler("onFinally",e,void 0,f),f;case 4:return[2]}})})},r.prototype.run=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.runAsync.apply(this,ii([],Ba(t),!1)).catch(function(a){e.options.onError||console.error(a)})},r.prototype.cancel=function(){this.count+=1,this.setState({loading:!1}),this.runPluginHandler("onCancel")},r.prototype.refresh=function(){this.run.apply(this,ii([],Ba(this.state.params||[]),!1))},r.prototype.refreshAsync=function(){return this.runAsync.apply(this,ii([],Ba(this.state.params||[]),!1))},r.prototype.mutate=function(e){var t=sT(e)?e(this.state.data):e;this.runPluginHandler("onMutate",t),this.setState({data:t})},r}();function K3e(r,e,t){e===void 0&&(e={}),t===void 0&&(t=[]);var n=e.manual,a=n===void 0?!1:n,i=e.ready,o=i===void 0?!0:i,s=Ite(e,["manual","ready"]),l=Zs({manual:a,ready:o},s),u=G8(r),c=Q3e(),d=Tne(function(){var f=t.map(function(h){var v;return(v=h==null?void 0:h.onInit)===null||v===void 0?void 0:v.call(h,l)}).filter(Boolean);return new W3e(u,l,c,Object.assign.apply(Object,ii([{}],Ba(f),!1)))},[]);return d.options=l,d.pluginImpls=t.map(function(f){return f(d,l)}),q3e(function(){if(!a&&o){var f=d.state.params||e.defaultParams||[];d.run.apply(d,ii([],Ba(f),!1))}}),f3(function(){d.cancel()}),{loading:d.state.loading,data:d.state.data,error:d.state.error,params:d.state.params||[],cancel:up(d.cancel.bind(d)),refresh:up(d.refresh.bind(d)),refreshAsync:up(d.refreshAsync.bind(d)),run:up(d.run.bind(d)),runAsync:up(d.runAsync.bind(d)),mutate:up(d.mutate.bind(d))}}function Xi(r,e,t){return K3e(r,e,ii(ii([],Ba([]),!1),[I3e,k3e,O3e,B3e,G3e,Cne,b3e,V3e],!1))}function Dne(r,e){if(I0){if(!r)return e;var t;return sT(r)?t=r():"current"in r?t=r.current:t=r,t}}var Y3e=function(r){var e=function(t,n,a){var i=D.useRef(!1),o=D.useRef([]),s=D.useRef([]),l=D.useRef();r(function(){var u,c=Array.isArray(a)?a:[a],d=c.map(function(f){return Dne(f)});if(!i.current){i.current=!0,o.current=d,s.current=n,l.current=t();return}(d.length!==o.current.length||!jI(o.current,d)||!jI(s.current,n))&&((u=l.current)===null||u===void 0||u.call(l),o.current=d,s.current=n,l.current=t())}),f3(function(){var u;(u=l.current)===null||u===void 0||u.call(l),i.current=!1})};return e},Z3e=Y3e(D.useEffect);function RF(r,e,t){t===void 0&&(t={});var n=t.enable,a=n===void 0?!0:n,i=G8(e);Z3e(function(){if(a){var o=Dne(t.target,window);if(o!=null&&o.addEventListener){var s=function(u){return i.current(u)},l=Array.isArray(r)?r:[r];return l.forEach(function(u){o.addEventListener(u,s,{capture:t.capture,once:t.once,passive:t.passive})}),function(){l.forEach(function(u){o.removeEventListener(u,s,{capture:t.capture})})}}}},[r,t.capture,t.once,t.passive,a],t.target)}var NF="AHOOKS_SYNC_STORAGE_EVENT_NAME";function X3e(r){function e(t,n){n===void 0&&(n={});var a,i=n.listenStorageChange,o=i===void 0?!1:i,s=n.onError,l=s===void 0?function(w){console.error(w)}:s;try{a=r()}catch(w){l(w)}var u=function(w){return n.serializer?n.serializer(w):JSON.stringify(w)},c=function(w){return n.deserializer?n.deserializer(w):JSON.parse(w)};function d(){try{var w=a==null?void 0:a.getItem(t);if(w)return c(w)}catch(S){l(S)}return sT(n.defaultValue)?n.defaultValue():n.defaultValue}var f=Ba(D.useState(d),2),h=f[0],v=f[1];lT(function(){v(d())},[t]);var m=function(w){var S=sT(w)?w(h):w;o||v(S);try{var T=void 0,A=a==null?void 0:a.getItem(t);h3e(S)?(T=null,a==null||a.removeItem(t)):(T=u(S),a==null||a.setItem(t,T)),dispatchEvent(new CustomEvent(NF,{detail:{key:t,newValue:T,oldValue:A,storageArea:a}}))}catch(M){l(M)}},y=function(w){w.key!==t||w.storageArea!==a||v(d())},b=function(w){y(w.detail)};return RF("storage",y,{enable:o}),RF(NF,b,{enable:o}),[h,up(m)]}return e}var h3=X3e(function(){return I0?localStorage:void 0});const iv={token:"token",theme:"theme",sideBarCollapsed:"side-bar-collapsed"},uo={key:"theme",light:"light",dark:"dark"},W8=r=>{try{JSON.parse(localStorage.getItem(uo.key)??"")}catch{localStorage.setItem(uo.key,uo.light)}const[e,t]=h3(iv.theme,{defaultValue:uo.light}),n=D.useMemo(()=>e===uo.dark,[e]),a=D.useMemo(()=>e===uo.light,[e]),i=u=>{localStorage.setItem(uo.key,u),document.documentElement.classList.remove(uo.light,uo.dark),document.documentElement.classList.add(u),t(u)},o=()=>i(uo.light),s=()=>i(uo.dark),l=()=>e===uo.dark?o():s();return D.useEffect(()=>{i(e??uo.light)},[]),{theme:e,isDark:n,isLight:a,setLightTheme:o,setDarkTheme:s,toggleTheme:l}},J3e=({size:r=24,width:e,height:t,...n})=>_.jsx("svg",{"aria-hidden":"true",focusable:"false",height:r||t,role:"presentation",viewBox:"0 0 24 24",width:r||e,...n,children:_.jsx("path",{d:"M21.53 15.93c-.16-.27-.61-.69-1.73-.49a8.46 8.46 0 01-1.88.13 8.409 8.409 0 01-5.91-2.82 8.068 8.068 0 01-1.44-8.66c.44-1.01.13-1.54-.09-1.76s-.77-.55-1.83-.11a10.318 10.318 0 00-6.32 10.21 10.475 10.475 0 007.04 8.99 10 10 0 002.89.55c.16.01.32.02.48.02a10.5 10.5 0 008.47-4.27c.67-.93.49-1.519.32-1.79z",fill:"currentColor"})}),e5e=({size:r=24,width:e,height:t,...n})=>_.jsx("svg",{"aria-hidden":"true",focusable:"false",height:r||t,role:"presentation",viewBox:"0 0 24 24",width:r||e,...n,children:_.jsxs("g",{fill:"currentColor",children:[_.jsx("path",{d:"M19 12a7 7 0 11-7-7 7 7 0 017 7z"}),_.jsx("path",{d:"M12 22.96a.969.969 0 01-1-.96v-.08a1 1 0 012 0 1.038 1.038 0 01-1 1.04zm7.14-2.82a1.024 1.024 0 01-.71-.29l-.13-.13a1 1 0 011.41-1.41l.13.13a1 1 0 010 1.41.984.984 0 01-.7.29zm-14.28 0a1.024 1.024 0 01-.71-.29 1 1 0 010-1.41l.13-.13a1 1 0 011.41 1.41l-.13.13a1 1 0 01-.7.29zM22 13h-.08a1 1 0 010-2 1.038 1.038 0 011.04 1 .969.969 0 01-.96 1zM2.08 13H2a1 1 0 010-2 1.038 1.038 0 011.04 1 .969.969 0 01-.96 1zm16.93-7.01a1.024 1.024 0 01-.71-.29 1 1 0 010-1.41l.13-.13a1 1 0 011.41 1.41l-.13.13a.984.984 0 01-.7.29zm-14.02 0a1.024 1.024 0 01-.71-.29l-.13-.14a1 1 0 011.41-1.41l.13.13a1 1 0 010 1.41.97.97 0 01-.7.3zM12 3.04a.969.969 0 01-1-.96V2a1 1 0 012 0 1.038 1.038 0 01-1 1.04z"})]})}),t5e=({className:r,classNames:e})=>{const[t,n]=D.useState(!1),{theme:a,toggleTheme:i}=W8(),o=i,{Component:s,slots:l,isSelected:u,getBaseProps:c,getInputProps:d,getWrapperProps:f}=wne({isSelected:a==="light",onChange:o});return D.useEffect(()=>{n(!0)},[t]),t?_.jsxs(s,{"aria-label":u?"Switch to dark mode":"Switch to light mode",...c({className:Gr("px-px transition-opacity hover:opacity-80 cursor-pointer",r,e==null?void 0:e.base)}),children:[_.jsx(wte,{children:_.jsx("input",{...d()})}),_.jsx("div",{...f(),className:l.wrapper({class:Gr(["w-auto h-auto","bg-transparent","rounded-lg","flex items-center justify-center","group-data-[selected=true]:bg-transparent","!text-default-500","pt-px","px-0","mx-0"],e==null?void 0:e.wrapper)}),children:u?_.jsx(J3e,{size:22}):_.jsx(e5e,{size:22})})]}):_.jsx("div",{className:"w-6 h-6"})};var LS={},OF;function r5e(){if(OF)return LS;OF=1,LS.match=i,LS.parse=o;var r=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,e=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,t=/^(?:(min|max)-)?(.+)/,n=/(em|rem|px|cm|mm|in|pt|pc)?$/,a=/(dpi|dpcm|dppx)?$/;function i(c,d){return o(c).some(function(f){var h=f.inverse,v=f.type==="all"||d.type===f.type;if(v&&h||!(v||h))return!1;var m=f.expressions.every(function(y){var b=y.feature,w=y.modifier,S=y.value,T=d[b];if(!T)return!1;switch(b){case"orientation":case"scan":return T.toLowerCase()===S.toLowerCase();case"width":case"height":case"device-width":case"device-height":S=u(S),T=u(T);break;case"resolution":S=l(S),T=l(T);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":S=s(S),T=s(T);break;case"grid":case"color":case"color-index":case"monochrome":S=parseInt(S,10)||1,T=parseInt(T,10)||0;break}switch(w){case"min":return T>=S;case"max":return T<=S;default:return T===S}});return m&&!h||!m&&h})}function o(c){return c.split(",").map(function(d){d=d.trim();var f=d.match(r),h=f[1],v=f[2],m=f[3]||"",y={};return y.inverse=!!h&&h.toLowerCase()==="not",y.type=v?v.toLowerCase():"all",m=m.match(/\([^\)]+\)/g)||[],y.expressions=m.map(function(b){var w=b.match(e),S=w[1].toLowerCase().match(t);return{modifier:S[1],feature:S[2],value:w[2]}}),y})}function s(c){var d=Number(c),f;return d||(f=c.match(/^(\d+)\s*\/\s*(\d+)$/),d=f[1]/f[2]),d}function l(c){var d=parseFloat(c),f=String(c).match(a)[1];switch(f){case"dpcm":return d/2.54;case"dppx":return d*96;default:return d}}function u(c){var d=parseFloat(c),f=String(c).match(n)[1];switch(f){case"em":return d*16;case"rem":return d*16;case"cm":return d*96/2.54;case"mm":return d*96/2.54/10;case"in":return d*96;case"pt":return d*72;case"pc":return d*72/12;default:return d}}return LS}var TM,$F;function n5e(){if($F)return TM;$F=1;var r=r5e().match,e=typeof window<"u"?window.matchMedia:null;function t(a,i,o){var s=this,l;e&&!o&&(l=e.call(window,a)),l?(this.matches=l.matches,this.media=l.media,l.addListener(d)):(this.matches=r(a,i),this.media=a),this.addListener=u,this.removeListener=c,this.dispose=f;function u(h){l&&l.addListener(h)}function c(h){l&&l.removeListener(h)}function d(h){s.matches=h.matches,s.media=h.media}function f(){l&&l.removeListener(d)}}function n(a,i,o){return new t(a,i,o)}return TM=n,TM}var a5e=n5e();const i5e=wu(a5e);var o5e=/[A-Z]/g,s5e=/^ms-/,AM={};function l5e(r){return"-"+r.toLowerCase()}function Lne(r){if(AM.hasOwnProperty(r))return AM[r];var e=r.replace(o5e,l5e);return AM[r]=s5e.test(e)?"-"+e:e}function u5e(r,e){if(r===e)return!0;if(!r||!e)return!1;const t=Object.keys(r),n=Object.keys(e),a=t.length;if(n.length!==a)return!1;for(let i=0;i<a;i++){const o=t[i];if(r[o]!==e[o]||!Object.prototype.hasOwnProperty.call(e,o))return!1}return!0}var EM={exports:{}},MM,zF;function c5e(){if(zF)return MM;zF=1;var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return MM=r,MM}var DM,jF;function d5e(){if(jF)return DM;jF=1;var r=c5e();function e(){}function t(){}return t.resetWarningCache=e,DM=function(){function n(o,s,l,u,c,d){if(d!==r){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}n.isRequired=n;function a(){return n}var i={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:a,element:n,elementType:n,instanceOf:a,node:n,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:t,resetWarningCache:e};return i.PropTypes=i,i},DM}var BF;function f5e(){return BF||(BF=1,EM.exports=d5e()()),EM.exports}var h5e=f5e();const kr=wu(h5e),mi=kr.oneOfType([kr.string,kr.number]),Pne={all:kr.bool,grid:kr.bool,aural:kr.bool,braille:kr.bool,handheld:kr.bool,print:kr.bool,projection:kr.bool,screen:kr.bool,tty:kr.bool,tv:kr.bool,embossed:kr.bool},p5e={orientation:kr.oneOf(["portrait","landscape"]),scan:kr.oneOf(["progressive","interlace"]),aspectRatio:kr.string,deviceAspectRatio:kr.string,height:mi,deviceHeight:mi,width:mi,deviceWidth:mi,color:kr.bool,colorIndex:kr.bool,monochrome:kr.bool,resolution:mi,type:Object.keys(Pne)},{type:fut,...v5e}=p5e,g5e={minAspectRatio:kr.string,maxAspectRatio:kr.string,minDeviceAspectRatio:kr.string,maxDeviceAspectRatio:kr.string,minHeight:mi,maxHeight:mi,minDeviceHeight:mi,maxDeviceHeight:mi,minWidth:mi,maxWidth:mi,minDeviceWidth:mi,maxDeviceWidth:mi,minColor:kr.number,maxColor:kr.number,minColorIndex:kr.number,maxColorIndex:kr.number,minMonochrome:kr.number,maxMonochrome:kr.number,minResolution:mi,maxResolution:mi,...v5e},m5e={...Pne,...g5e};var y5e={all:m5e};const b5e=r=>`not ${r}`,x5e=(r,e)=>{const t=Lne(r);return typeof e=="number"&&(e=`${e}px`),e===!0?t:e===!1?b5e(t):`(${t}: ${e})`},w5e=r=>r.join(" and "),S5e=r=>{const e=[];return Object.keys(y5e.all).forEach(t=>{const n=r[t];n!=null&&e.push(x5e(t,n))}),w5e(e)},_5e=D.createContext(void 0),C5e=r=>r.query||S5e(r),VF=r=>r?Object.keys(r).reduce((t,n)=>(t[Lne(n)]=r[n],t),{}):void 0,Ine=()=>{const r=D.useRef(!1);return D.useEffect(()=>{r.current=!0},[]),r.current},T5e=r=>{const e=D.useContext(_5e),t=()=>VF(r)||VF(e),[n,a]=D.useState(t);return D.useEffect(()=>{const i=t();u5e(n,i)||a(i)},[r,e]),n},A5e=r=>{const e=()=>C5e(r),[t,n]=D.useState(e);return D.useEffect(()=>{const a=e();t!==a&&n(a)},[r]),t},E5e=(r,e)=>{const t=()=>i5e(r,e||{},!!e),[n,a]=D.useState(t),i=Ine();return D.useEffect(()=>{if(i){const o=t();return a(o),()=>{o&&o.dispose()}}},[r,e]),n},M5e=r=>{const[e,t]=D.useState(r.matches);return D.useEffect(()=>{const n=a=>{t(a.matches)};return r.addListener(n),t(r.matches),()=>{r.removeListener(n)}},[r]),e},D5e=(r,e,t)=>{const n=T5e(e),a=A5e(r);if(!a)throw new Error("Invalid or missing MediaQuery!");const i=E5e(a,n),o=M5e(i);return Ine(),D.useEffect(()=>{},[o]),D.useEffect(()=>()=>{i&&i.dispose()},[]),o};function L5e(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M256 112v288m144-144H112"},child:[]}]})(r)}function FF(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"rect",attr:{width:"384",height:"256",x:"64",y:"176",fill:"none",strokeLinejoin:"round",strokeWidth:"32",rx:"28.87",ry:"28.87"},child:[]},{tag:"path",attr:{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"32",d:"M144 80h224m-256 48h288"},child:[]}]})(r)}function P5e(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"rect",attr:{width:"80",height:"80",x:"64",y:"64",fill:"none",strokeMiterlimit:"10",strokeWidth:"32",rx:"40",ry:"40"},child:[]},{tag:"rect",attr:{width:"80",height:"80",x:"216",y:"64",fill:"none",strokeMiterlimit:"10",strokeWidth:"32",rx:"40",ry:"40"},child:[]},{tag:"rect",attr:{width:"80",height:"80",x:"368",y:"64",fill:"none",strokeMiterlimit:"10",strokeWidth:"32",rx:"40",ry:"40"},child:[]},{tag:"rect",attr:{width:"80",height:"80",x:"64",y:"216",fill:"none",strokeMiterlimit:"10",strokeWidth:"32",rx:"40",ry:"40"},child:[]},{tag:"rect",attr:{width:"80",height:"80",x:"216",y:"216",fill:"none",strokeMiterlimit:"10",strokeWidth:"32",rx:"40",ry:"40"},child:[]},{tag:"rect",attr:{width:"80",height:"80",x:"368",y:"216",fill:"none",strokeMiterlimit:"10",strokeWidth:"32",rx:"40",ry:"40"},child:[]},{tag:"rect",attr:{width:"80",height:"80",x:"64",y:"368",fill:"none",strokeMiterlimit:"10",strokeWidth:"32",rx:"40",ry:"40"},child:[]},{tag:"rect",attr:{width:"80",height:"80",x:"216",y:"368",fill:"none",strokeMiterlimit:"10",strokeWidth:"32",rx:"40",ry:"40"},child:[]},{tag:"rect",attr:{width:"80",height:"80",x:"368",y:"368",fill:"none",strokeMiterlimit:"10",strokeWidth:"32",rx:"40",ry:"40"},child:[]}]})(r)}function I5e(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208 208-93.31 208-208S370.69 48 256 48zm108.25 138.29-134.4 160a16 16 0 0 1-12 5.71h-.27a16 16 0 0 1-11.89-5.3l-57.6-64a16 16 0 1 1 23.78-21.4l45.29 50.32 122.59-145.91a16 16 0 0 1 24.5 20.58z"},child:[]}]})(r)}function k5e(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"m112 184 144 144 144-144"},child:[]}]})(r)}function K8(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"m184 112 144 144-144 144"},child:[]}]})(r)}function kne(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"m289.94 256 95-95A24 24 0 0 0 351 127l-95 95-95-95a24 24 0 0 0-34 34l95 95-95 95a24 24 0 1 0 34 34l95-95 95 95a24 24 0 0 0 34-34z"},child:[]}]})(r)}function R5e(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M320 336h76c55 0 100-21.21 100-75.6s-53-73.47-96-75.6C391.11 99.74 329 48 256 48c-69 0-113.44 45.79-128 91.2-60 5.7-112 35.88-112 98.4S70 336 136 336h56m0 64.1 64 63.9 64-63.9M256 224v224.03"},child:[]}]})(r)}function Rne(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M320 367.79h76c55 0 100-29.21 100-83.6s-53-81.47-96-83.6c-8.89-85.06-71-136.8-144-136.8-69 0-113.44 45.79-128 91.2-60 5.7-112 43.88-112 106.4s54 106.4 120 106.4h56"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"m320 255.79-64-64-64 64m64 192.42V207.79"},child:[]}]})(r)}function N5e(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M428 224H288a48 48 0 0 1-48-48V36a4 4 0 0 0-4-4h-92a64 64 0 0 0-64 64v320a64 64 0 0 0 64 64h224a64 64 0 0 0 64-64V228a4 4 0 0 0-4-4zm-92 160H176a16 16 0 0 1 0-32h160a16 16 0 0 1 0 32zm0-80H176a16 16 0 0 1 0-32h160a16 16 0 0 1 0 32z"},child:[]},{tag:"path",attr:{d:"M419.22 188.59 275.41 44.78a2 2 0 0 0-3.41 1.41V176a16 16 0 0 0 16 16h129.81a2 2 0 0 0 1.41-3.41z"},child:[]}]})(r)}function O5e(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M336 176h40a40 40 0 0 1 40 40v208a40 40 0 0 1-40 40H136a40 40 0 0 1-40-40V216a40 40 0 0 1 40-40h40"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"m176 272 80 80 80-80M256 48v288"},child:[]}]})(r)}function $5e(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M432 448a15.92 15.92 0 0 1-11.31-4.69l-352-352a16 16 0 0 1 22.62-22.62l352 352A16 16 0 0 1 432 448zm-176.34-64c-41.49 0-81.5-12.28-118.92-36.5-34.07-22-64.74-53.51-88.7-91v-.08c19.94-28.57 41.78-52.73 65.24-72.21a2 2 0 0 0 .14-2.94L93.5 161.38a2 2 0 0 0-2.71-.12c-24.92 21-48.05 46.76-69.08 76.92a31.92 31.92 0 0 0-.64 35.54c26.41 41.33 60.4 76.14 98.28 100.65C162 402 207.9 416 255.66 416a239.13 239.13 0 0 0 75.8-12.58 2 2 0 0 0 .77-3.31l-21.58-21.58a4 4 0 0 0-3.83-1 204.8 204.8 0 0 1-51.16 6.47zm235.18-145.4c-26.46-40.92-60.79-75.68-99.27-100.53C349 110.55 302 96 255.66 96a227.34 227.34 0 0 0-74.89 12.83 2 2 0 0 0-.75 3.31l21.55 21.55a4 4 0 0 0 3.88 1 192.82 192.82 0 0 1 50.21-6.69c40.69 0 80.58 12.43 118.55 37 34.71 22.4 65.74 53.88 89.76 91a.13.13 0 0 1 0 .16 310.72 310.72 0 0 1-64.12 72.73 2 2 0 0 0-.15 2.95l19.9 19.89a2 2 0 0 0 2.7.13 343.49 343.49 0 0 0 68.64-78.48 32.2 32.2 0 0 0-.1-34.78z"},child:[]},{tag:"path",attr:{d:"M256 160a95.88 95.88 0 0 0-21.37 2.4 2 2 0 0 0-1 3.38l112.59 112.56a2 2 0 0 0 3.38-1A96 96 0 0 0 256 160zm-90.22 73.66a2 2 0 0 0-3.38 1 96 96 0 0 0 115 115 2 2 0 0 0 1-3.38z"},child:[]}]})(r)}function z5e(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z"},child:[]},{tag:"circle",attr:{cx:"256",cy:"256",r:"80",fill:"none",strokeMiterlimit:"10",strokeWidth:"32"},child:[]}]})(r)}function j5e(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M160 144h288M160 256h288M160 368h288"},child:[]},{tag:"circle",attr:{cx:"80",cy:"144",r:"16",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32"},child:[]},{tag:"circle",attr:{cx:"80",cy:"256",r:"16",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32"},child:[]},{tag:"circle",attr:{cx:"80",cy:"368",r:"16",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32"},child:[]}]})(r)}function B5e(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M442 48h-90a22 22 0 0 0 0 44h36.89l-60.39 60.39c-68.19-52.86-167-48-229.54 14.57C31.12 234.81 31.12 345.19 99 413a174.21 174.21 0 0 0 246 0c62.57-62.58 67.43-161.35 14.57-229.54L420 123.11V160a22 22 0 0 0 44 0V70a22 22 0 0 0-22-22zM313.92 381.92a130.13 130.13 0 0 1-183.84 0c-50.69-50.68-50.69-133.16 0-183.84s133.16-50.69 183.84 0 50.69 133.16 0 183.84z"},child:[]}]})(r)}function V5e(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"48",d:"M88 152h336M88 256h336M88 360h336"},child:[]}]})(r)}function HF(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M192 448h128m64-240v32c0 70.4-57.6 128-128 128h0c-70.4 0-128-57.6-128-128v-32m128 160v80"},child:[]},{tag:"path",attr:{d:"M256 320a78.83 78.83 0 0 1-56.55-24.1A80.89 80.89 0 0 1 176 239V128a79.69 79.69 0 0 1 80-80c44.86 0 80 35.14 80 80v111c0 44.66-35.89 81-80 81z"},child:[]}]})(r)}function F5e(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M421.84 37.37a25.86 25.86 0 0 0-22.6-4.46L199.92 86.49A32.3 32.3 0 0 0 176 118v226c0 6.74-4.36 12.56-11.11 14.83l-.12.05-52 18C92.88 383.53 80 402 80 423.91a55.54 55.54 0 0 0 23.23 45.63A54.78 54.78 0 0 0 135.34 480a55.82 55.82 0 0 0 17.75-2.93l.38-.13 21.84-7.94A47.84 47.84 0 0 0 208 423.91v-212c0-7.29 4.77-13.21 12.16-15.07l.21-.06L395 150.14a4 4 0 0 1 5 3.86v141.93c0 6.75-4.25 12.38-11.11 14.68l-.25.09-50.89 18.11A49.09 49.09 0 0 0 304 375.92a55.67 55.67 0 0 0 23.23 45.8 54.63 54.63 0 0 0 49.88 7.35l.36-.12 21.84-7.95A47.83 47.83 0 0 0 432 375.92V58a25.74 25.74 0 0 0-10.16-20.63z"},child:[]}]})(r)}function uT(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"32",d:"M320 146s24.36-12-64-12a160 160 0 1 0 160 160"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"m256 58 80 80-80 80"},child:[]}]})(r)}function H5e(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M221.09 64a157.09 157.09 0 1 0 157.09 157.09A157.1 157.1 0 0 0 221.09 64z"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"32",d:"M338.29 338.29 448 448"},child:[]}]})(r)}function U5e(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M456.69 421.39 362.6 327.3a173.81 173.81 0 0 0 34.84-104.58C397.44 126.38 319.06 48 222.72 48S48 126.38 48 222.72s78.38 174.72 174.72 174.72A173.81 173.81 0 0 0 327.3 362.6l94.09 94.09a25 25 0 0 0 35.3-35.3zM97.92 222.72a124.8 124.8 0 1 1 124.8 124.8 124.95 124.95 0 0 1-124.8-124.8z"},child:[]}]})(r)}function Nne(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M262.29 192.31a64 64 0 1 0 57.4 57.4 64.13 64.13 0 0 0-57.4-57.4zM416.39 256a154.34 154.34 0 0 1-1.53 20.79l45.21 35.46a10.81 10.81 0 0 1 2.45 13.75l-42.77 74a10.81 10.81 0 0 1-13.14 4.59l-44.9-18.08a16.11 16.11 0 0 0-15.17 1.75A164.48 164.48 0 0 1 325 400.8a15.94 15.94 0 0 0-8.82 12.14l-6.73 47.89a11.08 11.08 0 0 1-10.68 9.17h-85.54a11.11 11.11 0 0 1-10.69-8.87l-6.72-47.82a16.07 16.07 0 0 0-9-12.22 155.3 155.3 0 0 1-21.46-12.57 16 16 0 0 0-15.11-1.71l-44.89 18.07a10.81 10.81 0 0 1-13.14-4.58l-42.77-74a10.8 10.8 0 0 1 2.45-13.75l38.21-30a16.05 16.05 0 0 0 6-14.08c-.36-4.17-.58-8.33-.58-12.5s.21-8.27.58-12.35a16 16 0 0 0-6.07-13.94l-38.19-30A10.81 10.81 0 0 1 49.48 186l42.77-74a10.81 10.81 0 0 1 13.14-4.59l44.9 18.08a16.11 16.11 0 0 0 15.17-1.75A164.48 164.48 0 0 1 187 111.2a15.94 15.94 0 0 0 8.82-12.14l6.73-47.89A11.08 11.08 0 0 1 213.23 42h85.54a11.11 11.11 0 0 1 10.69 8.87l6.72 47.82a16.07 16.07 0 0 0 9 12.22 155.3 155.3 0 0 1 21.46 12.57 16 16 0 0 0 15.11 1.71l44.89-18.07a10.81 10.81 0 0 1 13.14 4.58l42.77 74a10.8 10.8 0 0 1-2.45 13.75l-38.21 30a16.05 16.05 0 0 0-6.05 14.08c.33 4.14.55 8.3.55 12.47z"},child:[]}]})(r)}function G5e(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 384.39a32 32 0 0 1-13-2.77 15.77 15.77 0 0 1-2.71-1.54l-82.71-58.22A32 32 0 0 1 352 295.7v-79.4a32 32 0 0 1 13.58-26.16l82.71-58.22a15.77 15.77 0 0 1 2.71-1.54 32 32 0 0 1 45 29.24v192.76a32 32 0 0 1-32 32zM268 400H84a68.07 68.07 0 0 1-68-68V180a68.07 68.07 0 0 1 68-68h184.48A67.6 67.6 0 0 1 336 179.52V332a68.07 68.07 0 0 1-68 68z"},child:[]}]})(r)}const q5e={hidden:{opacity:0,x:-20},visible:{opacity:1,x:0,transition:{duration:.2}},exit:{opacity:0,x:-20,transition:{duration:.2}}};function UF({isCollapsed:r,children:e}){return _.jsx(Zt.div,{className:Gr("flex justify-center items-center text-sm h-10 text-default-600 hover:text-primary transition-colors cursor-default md:cursor-pointer",!r&&"md:h-12"),initial:{borderRadius:r?40:0},animate:{borderRadius:r?40:0},whileHover:{scale:1.02},whileTap:{scale:.98},children:e})}function Q5e(){const[r=!1,e]=h3(iv.sideBarCollapsed,{defaultValue:!1}),[t,n]=D.useState(!0),a=D5e({minWidth:768});return _.jsx(Zt.div,{className:"h-full fixed md:relative z-50",children:_.jsxs(Zt.div,{className:Gr("bg-background/80 backdrop-blur-md md:!h-full md:!w-full border-r border-divider overflow-hidden flex flex-col gap-4 md:gap-2",!r&&"md:pt-4"),initial:{borderRadius:t?0:28,height:t||a?"100%":56,width:t||a?"100%":56},animate:{borderRadius:t?0:28,height:t||a?"100%":56,width:t||a?"100%":56},children:[_.jsxs("div",{className:"flex p-2 pb-0 flex-shrink-0 flex-grow-0 items-center justify-between md:!p-0.5 md:justify-center",children:[_.jsx(Zt.div,{className:"aspect-square bg-primary/5 text-primary text-xl rounded-full w-10 md:!w-0 md:!h-0 overflow-hidden flex justify-center items-center cursor-default md:cursor-pointer flex-grow-0 flex-shrink-0 transition-all hover:bg-primary/10",onClick:()=>n(!t),whileHover:{scale:1.05},whileTap:{scale:.95},children:_.jsx(fl,{mode:"wait",children:_.jsx(Zt.div,{initial:{opacity:0,rotate:-90},animate:{opacity:1,rotate:0},exit:{opacity:0,rotate:90},transition:{duration:.2},children:t?_.jsx(kne,{}):_.jsx(V5e,{})},t?"close":"menu")})}),_.jsx(Zt.div,{className:"flex-1 flex items-center justify-center md:w-auto relative px-3",initial:{opacity:!t&&!a||r?0:1,width:!t&&!a||r?0:"auto",height:!t&&!a||r?0:"auto"},animate:{opacity:!t&&!a||r?0:1,width:!t&&!a||r?0:"auto",height:!t&&!a||r?0:"auto"},children:_.jsxs("div",{className:"flex items-center gap-3 -ml-10",children:[_.jsxs(Zt.div,{className:"w-9 h-9 rounded-xl bg-gradient-to-br from-primary/10 to-primary/5 flex items-center justify-center relative group cursor-default md:cursor-pointer",whileHover:{scale:1.05},whileTap:{scale:.95},children:[_.jsx(Zt.div,{className:"absolute inset-0 rounded-xl ring-2 ring-primary/10",animate:{rotate:360},transition:{duration:8,repeat:1/0,ease:"linear"}}),_.jsx(Zt.div,{className:"absolute inset-1 rounded-lg ring-1 ring-primary/5",animate:{rotate:-360},transition:{duration:12,repeat:1/0,ease:"linear"}}),_.jsx(Zt.div,{className:"relative z-10 w-full h-full flex items-center justify-center",whileHover:{scale:1.1},transition:{type:"spring",stiffness:400,damping:10},children:_.jsxs("svg",{viewBox:"0 0 24 24",className:"w-5 h-5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[_.jsx(Zt.path,{d:"M12 3L20 7V17L12 21L4 17V7L12 3Z",className:"stroke-primary",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",initial:{pathLength:0},animate:{pathLength:1},transition:{duration:2,ease:"easeInOut",repeat:1/0,repeatType:"reverse"}}),_.jsx(Zt.path,{d:"M12 3V21",className:"stroke-primary/50",strokeWidth:"2",strokeLinecap:"round",initial:{pathLength:0},animate:{pathLength:1},transition:{duration:1.5,ease:"easeInOut",repeat:1/0,repeatType:"reverse",delay:.5}})]})}),_.jsx(Zt.div,{className:"absolute inset-0 rounded-xl bg-primary/5 opacity-0 group-hover:opacity-100 transition-opacity",initial:!1,transition:{duration:.2}})]}),_.jsxs(Zt.div,{className:"font-medium text-base relative",children:[_.jsxs(Zt.div,{className:"relative flex items-center",animate:{scale:[1,1.02,1]},transition:{duration:2,repeat:1/0,ease:"easeInOut"},children:[_.jsx(Zt.span,{className:"bg-gradient-to-r from-primary to-primary-500 bg-clip-text text-transparent inline-block origin-bottom",animate:{opacity:[0,1,1,0],scale:[0,1,1,0],rotateZ:[45,0,0,-45]},transition:{duration:3,times:[0,.1,.9,1],repeat:1/0,repeatDelay:1},children:"k"}),_.jsx(Zt.span,{className:"bg-gradient-to-r from-primary to-primary-500 bg-clip-text text-transparent inline-block",animate:{opacity:[0,1,1,0],y:[20,0,0,20],scale:[.5,1,1,.5]},transition:{duration:3,times:[0,.1,.9,1],repeat:1/0,repeatDelay:1,delay:.1},children:"a"}),_.jsx(Zt.span,{className:"bg-gradient-to-r from-primary to-primary-500 bg-clip-text text-transparent inline-block origin-top",animate:{opacity:[0,1,1,0],scale:[.2,1,1,.2],rotateZ:[-45,0,0,45]},transition:{duration:3,times:[0,.1,.9,1],repeat:1/0,repeatDelay:1,delay:.2},children:"r"}),_.jsx(Zt.span,{className:"bg-gradient-to-r from-primary to-primary-500 bg-clip-text text-transparent inline-block",animate:{opacity:[0,1,1,0],y:[-20,0,0,-20],scale:[.5,1,1,.5],rotateZ:[45,0,0,-45]},transition:{duration:3,times:[0,.1,.9,1],repeat:1/0,repeatDelay:1,delay:.3},children:"i"}),_.jsx(Zt.span,{className:"bg-gradient-to-r from-primary to-primary-500 bg-clip-text text-transparent inline-block",animate:{opacity:[0,1,1,0],x:[-20,0,0,-20],scale:[.2,1,1,.2],rotateZ:[-30,0,0,30]},transition:{duration:3,times:[0,.1,.9,1],repeat:1/0,repeatDelay:1,delay:.4},children:"n"})]}),_.jsxs("div",{className:"absolute -bottom-1 left-0 right-0 h-[2px]",children:[_.jsx(Zt.div,{className:"absolute inset-0 bg-gradient-to-r from-sky-400/50 via-blue-400/40 to-sky-400/50",initial:{scaleX:0},animate:{scaleX:1},transition:{duration:.8,ease:"easeOut"}}),_.jsx(Zt.div,{className:"absolute inset-0 w-[30%] bg-gradient-to-r from-transparent via-sky-200/80 to-transparent",animate:{x:["-100%","400%"]},transition:{duration:2,ease:"easeInOut",repeat:1/0,repeatDelay:.5}}),_.jsx(Zt.div,{className:"absolute inset-0 w-[20%] bg-gradient-to-r from-transparent via-blue-200/70 to-transparent",animate:{x:["-100%","600%"]},transition:{duration:2.5,ease:"linear",repeat:1/0}}),_.jsx(Zt.div,{className:"absolute inset-0 w-2 h-[2px] bg-sky-200/80 blur-[2px]",animate:{x:["-100%","500%"],opacity:[0,.9,0]},transition:{duration:2,ease:"easeInOut",repeat:1/0,repeatDelay:.5}})]}),_.jsx(Zt.div,{className:"absolute inset-0 bg-gradient-to-r from-transparent via-primary/10 to-transparent pointer-events-none",animate:{x:["-100%","100%"],opacity:[0,.5,0]},transition:{duration:2,times:[0,1],repeat:1/0,repeatDelay:2}})]})]})})]}),_.jsx("div",{className:Gr("flex-1 p-2 px-2 pt-0 flex flex-col gap-2 overflow-y-auto hide-scrollbar",!r&&"px-4"),children:_.jsx(fl,{mode:"wait",children:v1e.navItems.map((i,o)=>_.jsx(Zt.div,{variants:q5e,initial:"hidden",animate:"visible",exit:"exit",transition:{delay:o*.05},children:_.jsx(iJ,{to:i.href,className:({isActive:s})=>Gr("block text-default-600 hover:text-primary rounded-xl w-max hover:bg-default-100/50 transition-all cursor-default md:cursor-pointer group",{"!text-primary bg-primary/5 font-medium ring-1 ring-primary/10":s}),children:_.jsxs(Zt.div,{className:"flex items-center gap-3 py-2.5 overflow-hidden relative",initial:{width:r?40:200,paddingLeft:r?10:16,paddingRight:r?10:16},animate:{width:r?40:200,paddingLeft:r?10:16,paddingRight:r?10:16},whileHover:{x:4},children:[_.jsx(Zt.div,{className:"text-xl relative z-10",whileHover:{scale:1.1},transition:{type:"spring",stiffness:400,damping:10},children:_.jsx(i.Icon,{})}),_.jsx(Zt.div,{className:"whitespace-nowrap overflow-hidden text-sm relative z-10",initial:{width:r?0:"auto"},animate:{width:r?0:"auto"},children:i.label})]})})},i.href))})}),_.jsxs(Zt.div,{className:"flex-grow-0 flex-shrink-0 grid-cols-2 grid",initial:{margin:r?8:0,gridTemplateColumns:r?"1fr":"1fr 1fr"},animate:{margin:r?8:0,gridTemplateColumns:r?"1fr":"1fr 1fr"},children:[_.jsx(UF,{isCollapsed:r,children:_.jsx(t5e,{className:"w-full h-full max-w-full flex justify-center",classNames:{wrapper:"!text-default-600",base:"w-full h-full"}})}),_.jsx(UF,{isCollapsed:r,children:_.jsxs("div",{className:"flex w-full h-full justify-center items-center text-sm",onClick:()=>e(!r),children:[_.jsx(Zt.div,{className:"!rotate-180",initial:{marginRight:r?0:-8},animate:{marginRight:r?0:-8},children:_.jsx(iV,{})}),_.jsx(Zt.div,{initial:{rotate:r?0:180},animate:{rotate:r?0:180},children:_.jsx(iV,{})})]})})]})]})})}function W5e(){return _.jsxs("div",{className:"relative flex h-screen items-stretch",children:[_.jsx("div",{className:"flex-grow-0 flex-shrink-0",children:_.jsx(Q5e,{})}),_.jsx("main",{className:"container mx-auto px-3 flex-grow overflow-y-scroll",children:_.jsx(eJ,{})})]})}var GF=r=>typeof r=="boolean"?`${r}`:r===0?"0":r,Hi=r=>!r||typeof r!="object"||Object.keys(r).length===0,K5e=(r,e)=>JSON.stringify(r)===JSON.stringify(e);function One(r,e){r.forEach(function(t){Array.isArray(t)?One(t,e):e.push(t)})}function $ne(r){let e=[];return One(r,e),e}var zne=(...r)=>$ne(r).filter(Boolean),jne=(r,e)=>{let t={},n=Object.keys(r),a=Object.keys(e);for(let i of n)if(a.includes(i)){let o=r[i],s=e[i];Array.isArray(o)||Array.isArray(s)?t[i]=zne(s,o):typeof o=="object"&&typeof s=="object"?t[i]=jne(o,s):t[i]=s+" "+o}else t[i]=r[i];for(let i of a)n.includes(i)||(t[i]=e[i]);return t},qF=r=>!r||typeof r!="string"?r:r.replace(/\s+/g," ").trim();const Y8="-",Y5e=r=>{const e=X5e(r),{conflictingClassGroups:t,conflictingClassGroupModifiers:n}=r;return{getClassGroupId:o=>{const s=o.split(Y8);return s[0]===""&&s.length!==1&&s.shift(),Bne(s,e)||Z5e(o)},getConflictingClassGroupIds:(o,s)=>{const l=t[o]||[];return s&&n[o]?[...l,...n[o]]:l}}},Bne=(r,e)=>{var o;if(r.length===0)return e.classGroupId;const t=r[0],n=e.nextPart.get(t),a=n?Bne(r.slice(1),n):void 0;if(a)return a;if(e.validators.length===0)return;const i=r.join(Y8);return(o=e.validators.find(({validator:s})=>s(i)))==null?void 0:o.classGroupId},QF=/^\[(.+)\]$/,Z5e=r=>{if(QF.test(r)){const e=QF.exec(r)[1],t=e==null?void 0:e.substring(0,e.indexOf(":"));if(t)return"arbitrary.."+t}},X5e=r=>{const{theme:e,prefix:t}=r,n={nextPart:new Map,validators:[]};return e4e(Object.entries(r.classGroups),t).forEach(([i,o])=>{BI(o,n,i,e)}),n},BI=(r,e,t,n)=>{r.forEach(a=>{if(typeof a=="string"){const i=a===""?e:WF(e,a);i.classGroupId=t;return}if(typeof a=="function"){if(J5e(a)){BI(a(n),e,t,n);return}e.validators.push({validator:a,classGroupId:t});return}Object.entries(a).forEach(([i,o])=>{BI(o,WF(e,i),t,n)})})},WF=(r,e)=>{let t=r;return e.split(Y8).forEach(n=>{t.nextPart.has(n)||t.nextPart.set(n,{nextPart:new Map,validators:[]}),t=t.nextPart.get(n)}),t},J5e=r=>r.isThemeGetter,e4e=(r,e)=>e?r.map(([t,n])=>{const a=n.map(i=>typeof i=="string"?e+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,s])=>[e+o,s])):i);return[t,a]}):r,t4e=r=>{if(r<1)return{get:()=>{},set:()=>{}};let e=0,t=new Map,n=new Map;const a=(i,o)=>{t.set(i,o),e++,e>r&&(e=0,n=t,t=new Map)};return{get(i){let o=t.get(i);if(o!==void 0)return o;if((o=n.get(i))!==void 0)return a(i,o),o},set(i,o){t.has(i)?t.set(i,o):a(i,o)}}},Vne="!",r4e=r=>{const{separator:e,experimentalParseClassName:t}=r,n=e.length===1,a=e[0],i=e.length,o=s=>{const l=[];let u=0,c=0,d;for(let y=0;y<s.length;y++){let b=s[y];if(u===0){if(b===a&&(n||s.slice(y,y+i)===e)){l.push(s.slice(c,y)),c=y+i;continue}if(b==="/"){d=y;continue}}b==="["?u++:b==="]"&&u--}const f=l.length===0?s:s.substring(c),h=f.startsWith(Vne),v=h?f.substring(1):f,m=d&&d>c?d-c:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:v,maybePostfixModifierPosition:m}};return t?s=>t({className:s,parseClassName:o}):o},n4e=r=>{if(r.length<=1)return r;const e=[];let t=[];return r.forEach(n=>{n[0]==="["?(e.push(...t.sort(),n),t=[]):t.push(n)}),e.push(...t.sort()),e},a4e=r=>({cache:t4e(r.cacheSize),parseClassName:r4e(r),...Y5e(r)}),i4e=/\s+/,o4e=(r,e)=>{const{parseClassName:t,getClassGroupId:n,getConflictingClassGroupIds:a}=e,i=[],o=r.trim().split(i4e);let s="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:c,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:h}=t(u);let v=!!h,m=n(v?f.substring(0,h):f);if(!m){if(!v){s=u+(s.length>0?" "+s:s);continue}if(m=n(f),!m){s=u+(s.length>0?" "+s:s);continue}v=!1}const y=n4e(c).join(":"),b=d?y+Vne:y,w=b+m;if(i.includes(w))continue;i.push(w);const S=a(m,v);for(let T=0;T<S.length;++T){const A=S[T];i.push(b+A)}s=u+(s.length>0?" "+s:s)}return s};function s4e(){let r=0,e,t,n="";for(;r<arguments.length;)(e=arguments[r++])&&(t=Fne(e))&&(n&&(n+=" "),n+=t);return n}const Fne=r=>{if(typeof r=="string")return r;let e,t="";for(let n=0;n<r.length;n++)r[n]&&(e=Fne(r[n]))&&(t&&(t+=" "),t+=e);return t};function VI(r,...e){let t,n,a,i=o;function o(l){const u=e.reduce((c,d)=>d(c),r());return t=a4e(u),n=t.cache.get,a=t.cache.set,i=s,s(l)}function s(l){const u=n(l);if(u)return u;const c=o4e(l,t);return a(l,c),c}return function(){return i(s4e.apply(null,arguments))}}const sn=r=>{const e=t=>t[r]||[];return e.isThemeGetter=!0,e},Hne=/^\[(?:([a-z-]+):)?(.+)\]$/i,l4e=/^\d+\/\d+$/,u4e=new Set(["px","full","screen"]),c4e=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,d4e=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,f4e=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,h4e=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,p4e=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,rc=r=>$m(r)||u4e.has(r)||l4e.test(r),Hd=r=>k0(r,"length",S4e),$m=r=>!!r&&!Number.isNaN(Number(r)),LM=r=>k0(r,"number",$m),o1=r=>!!r&&Number.isInteger(Number(r)),v4e=r=>r.endsWith("%")&&$m(r.slice(0,-1)),Yt=r=>Hne.test(r),Ud=r=>c4e.test(r),g4e=new Set(["length","size","percentage"]),m4e=r=>k0(r,g4e,Une),y4e=r=>k0(r,"position",Une),b4e=new Set(["image","url"]),x4e=r=>k0(r,b4e,C4e),w4e=r=>k0(r,"",_4e),s1=()=>!0,k0=(r,e,t)=>{const n=Hne.exec(r);return n?n[1]?typeof e=="string"?n[1]===e:e.has(n[1]):t(n[2]):!1},S4e=r=>d4e.test(r)&&!f4e.test(r),Une=()=>!1,_4e=r=>h4e.test(r),C4e=r=>p4e.test(r),FI=()=>{const r=sn("colors"),e=sn("spacing"),t=sn("blur"),n=sn("brightness"),a=sn("borderColor"),i=sn("borderRadius"),o=sn("borderSpacing"),s=sn("borderWidth"),l=sn("contrast"),u=sn("grayscale"),c=sn("hueRotate"),d=sn("invert"),f=sn("gap"),h=sn("gradientColorStops"),v=sn("gradientColorStopPositions"),m=sn("inset"),y=sn("margin"),b=sn("opacity"),w=sn("padding"),S=sn("saturate"),T=sn("scale"),A=sn("sepia"),M=sn("skew"),P=sn("space"),E=sn("translate"),R=()=>["auto","contain","none"],N=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto",Yt,e],O=()=>[Yt,e],L=()=>["",rc,Hd],$=()=>["auto",$m,Yt],j=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],B=()=>["solid","dashed","dotted","double","none"],H=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],F=()=>["start","end","center","between","around","evenly","stretch"],K=()=>["","0",Yt],U=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>[$m,Yt];return{cacheSize:500,separator:":",theme:{colors:[s1],spacing:[rc,Hd],blur:["none","",Ud,Yt],brightness:V(),borderColor:[r],borderRadius:["none","","full",Ud,Yt],borderSpacing:O(),borderWidth:L(),contrast:V(),grayscale:K(),hueRotate:V(),invert:K(),gap:O(),gradientColorStops:[r],gradientColorStopPositions:[v4e,Hd],inset:k(),margin:k(),opacity:V(),padding:O(),saturate:V(),scale:V(),sepia:K(),skew:V(),space:O(),translate:O()},classGroups:{aspect:[{aspect:["auto","square","video",Yt]}],container:["container"],columns:[{columns:[Ud]}],"break-after":[{"break-after":U()}],"break-before":[{"break-before":U()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...j(),Yt]}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",o1,Yt]}],basis:[{basis:k()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Yt]}],grow:[{grow:K()}],shrink:[{shrink:K()}],order:[{order:["first","last","none",o1,Yt]}],"grid-cols":[{"grid-cols":[s1]}],"col-start-end":[{col:["auto",{span:["full",o1,Yt]},Yt]}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":[s1]}],"row-start-end":[{row:["auto",{span:[o1,Yt]},Yt]}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Yt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Yt]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...F()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...F(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...F(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[P]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[P]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Yt,e]}],"min-w":[{"min-w":[Yt,e,"min","max","fit"]}],"max-w":[{"max-w":[Yt,e,"none","full","min","max","fit","prose",{screen:[Ud]},Ud]}],h:[{h:[Yt,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Yt,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Yt,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Yt,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Ud,Hd]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",LM]}],"font-family":[{font:[s1]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Yt]}],"line-clamp":[{"line-clamp":["none",$m,LM]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",rc,Yt]}],"list-image":[{"list-image":["none",Yt]}],"list-style-type":[{list:["none","disc","decimal",Yt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[r]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[r]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",rc,Hd]}],"underline-offset":[{"underline-offset":["auto",rc,Yt]}],"text-decoration-color":[{decoration:[r]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Yt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Yt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...j(),y4e]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",m4e]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},x4e]}],"bg-color":[{bg:[r]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...B(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:B()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...B()]}],"outline-offset":[{"outline-offset":[rc,Yt]}],"outline-w":[{outline:[rc,Hd]}],"outline-color":[{outline:[r]}],"ring-w":[{ring:L()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[r]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[rc,Hd]}],"ring-offset-color":[{"ring-offset":[r]}],shadow:[{shadow:["","inner","none",Ud,w4e]}],"shadow-color":[{shadow:[s1]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...H(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":H()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Ud,Yt]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[S]}],sepia:[{sepia:[A]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[S]}],"backdrop-sepia":[{"backdrop-sepia":[A]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Yt]}],duration:[{duration:V()}],ease:[{ease:["linear","in","out","in-out",Yt]}],delay:[{delay:V()}],animate:[{animate:["none","spin","ping","pulse","bounce",Yt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[o1,Yt]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"skew-x":[{"skew-x":[M]}],"skew-y":[{"skew-y":[M]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Yt]}],accent:[{accent:["auto",r]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Yt]}],"caret-color":[{caret:[r]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Yt]}],fill:[{fill:[r,"none"]}],"stroke-w":[{stroke:[rc,Hd,LM]}],stroke:[{stroke:[r,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},T4e=(r,{cacheSize:e,prefix:t,separator:n,experimentalParseClassName:a,extend:i={},override:o={}})=>{rb(r,"cacheSize",e),rb(r,"prefix",t),rb(r,"separator",n),rb(r,"experimentalParseClassName",a);for(const s in o)A4e(r[s],o[s]);for(const s in i)E4e(r[s],i[s]);return r},rb=(r,e,t)=>{t!==void 0&&(r[e]=t)},A4e=(r,e)=>{if(e)for(const t in e)rb(r,t,e[t])},E4e=(r,e)=>{if(e)for(const t in e){const n=e[t];n!==void 0&&(r[t]=(r[t]||[]).concat(n))}},M4e=(r,...e)=>typeof r=="function"?VI(FI,r,...e):VI(()=>T4e(FI(),r),...e),D4e=VI(FI);var L4e={twMerge:!0,twMergeConfig:{},responsiveVariants:!1},Gne=r=>r||void 0,px=(...r)=>Gne($ne(r).filter(Boolean).join(" ")),PM=null,dc={},HI=!1,l1=(...r)=>e=>e.twMerge?((!PM||HI)&&(HI=!1,PM=Hi(dc)?D4e:M4e({...dc,extend:{theme:dc.theme,classGroups:dc.classGroups,conflictingClassGroupModifiers:dc.conflictingClassGroupModifiers,conflictingClassGroups:dc.conflictingClassGroups,...dc.extend}})),Gne(PM(px(r)))):px(r),KF=(r,e)=>{for(let t in e)r.hasOwnProperty(t)?r[t]=px(r[t],e[t]):r[t]=e[t];return r},qne=(r,e)=>{let{extend:t=null,slots:n={},variants:a={},compoundVariants:i=[],compoundSlots:o=[],defaultVariants:s={}}=r,l={...L4e,...e},u=t!=null&&t.base?px(t.base,r==null?void 0:r.base):r==null?void 0:r.base,c=t!=null&&t.variants&&!Hi(t.variants)?jne(a,t.variants):a,d=t!=null&&t.defaultVariants&&!Hi(t.defaultVariants)?{...t.defaultVariants,...s}:s;!Hi(l.twMergeConfig)&&!K5e(l.twMergeConfig,dc)&&(HI=!0,dc=l.twMergeConfig);let f=Hi(t==null?void 0:t.slots),h=Hi(n)?{}:{base:px(r==null?void 0:r.base,f&&(t==null?void 0:t.base)),...n},v=f?h:KF({...t==null?void 0:t.slots},Hi(h)?{base:r==null?void 0:r.base}:h),m=Hi(t==null?void 0:t.compoundVariants)?i:zne(t==null?void 0:t.compoundVariants,i),y=w=>{if(Hi(c)&&Hi(n)&&f)return l1(u,w==null?void 0:w.class,w==null?void 0:w.className)(l);if(m&&!Array.isArray(m))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof m}`);if(o&&!Array.isArray(o))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof o}`);let S=(O,L,$=[],j)=>{let B=$;if(typeof L=="string")B=B.concat(qF(L).split(" ").map(H=>`${O}:${H}`));else if(Array.isArray(L))B=B.concat(L.reduce((H,F)=>H.concat(`${O}:${F}`),[]));else if(typeof L=="object"&&typeof j=="string"){for(let H in L)if(L.hasOwnProperty(H)&&H===j){let F=L[H];if(F&&typeof F=="string"){let K=qF(F);B[j]?B[j]=B[j].concat(K.split(" ").map(U=>`${O}:${U}`)):B[j]=K.split(" ").map(U=>`${O}:${U}`)}else Array.isArray(F)&&F.length>0&&(B[j]=F.reduce((K,U)=>K.concat(`${O}:${U}`),[]))}}return B},T=(O,L=c,$=null,j=null)=>{var B;let H=L[O];if(!H||Hi(H))return null;let F=(B=j==null?void 0:j[O])!=null?B:w==null?void 0:w[O];if(F===null)return null;let K=GF(F),U=Array.isArray(l.responsiveVariants)&&l.responsiveVariants.length>0||l.responsiveVariants===!0,V=d==null?void 0:d[O],Q=[];if(typeof K=="object"&&U)for(let[X,re]of Object.entries(K)){let oe=H[re];if(X==="initial"){V=re;continue}Array.isArray(l.responsiveVariants)&&!l.responsiveVariants.includes(X)||(Q=S(X,oe,Q,$))}let Z=K!=null&&typeof K!="object"?K:GF(V),Y=H[Z||"false"];return typeof Q=="object"&&typeof $=="string"&&Q[$]?KF(Q,Y):Q.length>0?(Q.push(Y),$==="base"?Q.join(" "):Q):Y},A=()=>c?Object.keys(c).map(O=>T(O,c)):null,M=(O,L)=>{if(!c||typeof c!="object")return null;let $=new Array;for(let j in c){let B=T(j,c,O,L),H=O==="base"&&typeof B=="string"?B:B&&B[O];H&&($[$.length]=H)}return $},P={};for(let O in w)w[O]!==void 0&&(P[O]=w[O]);let E=(O,L)=>{var $;let j=typeof(w==null?void 0:w[O])=="object"?{[O]:($=w[O])==null?void 0:$.initial}:{};return{...d,...P,...j,...L}},R=(O=[],L)=>{let $=[];for(let{class:j,className:B,...H}of O){let F=!0;for(let[K,U]of Object.entries(H)){let V=E(K,L)[K];if(Array.isArray(U)){if(!U.includes(V)){F=!1;break}}else{let Q=Z=>Z==null||Z===!1;if(Q(U)&&Q(V))continue;if(V!==U){F=!1;break}}}F&&(j&&$.push(j),B&&$.push(B))}return $},N=O=>{let L=R(m,O);if(!Array.isArray(L))return L;let $={};for(let j of L)if(typeof j=="string"&&($.base=l1($.base,j)(l)),typeof j=="object")for(let[B,H]of Object.entries(j))$[B]=l1($[B],H)(l);return $},k=O=>{if(o.length<1)return null;let L={};for(let{slots:$=[],class:j,className:B,...H}of o){if(!Hi(H)){let F=!0;for(let K of Object.keys(H)){let U=E(K,O)[K];if(U===void 0||(Array.isArray(H[K])?!H[K].includes(U):H[K]!==U)){F=!1;break}}if(!F)continue}for(let F of $)L[F]=L[F]||[],L[F].push([j,B])}return L};if(!Hi(n)||!f){let O={};if(typeof v=="object"&&!Hi(v))for(let L of Object.keys(v))O[L]=$=>{var j,B;return l1(v[L],M(L,$),((j=N($))!=null?j:[])[L],((B=k($))!=null?B:[])[L],$==null?void 0:$.class,$==null?void 0:$.className)(l)};return O}return l1(u,A(),R(m),w==null?void 0:w.class,w==null?void 0:w.className)(l)},b=()=>{if(!(!c||typeof c!="object"))return Object.keys(c)};return y.variantKeys=b(),y.extend=t,y.base=u,y.slots=v,y.variants=c,y.defaultVariants=d,y.compoundSlots=o,y.compoundVariants=m,y};const Qne=qne({base:"tracking-tight inline font-semibold",variants:{color:{violet:"from-[#FF1CF7] to-[#b249f8]",yellow:"from-[#FF705B] to-[#FFB457]",blue:"from-[#5EA2EF] to-[#0072F5]",cyan:"from-[#00b7fa] to-[#01cfea]",green:"from-[#6FEE8D] to-[#17c964]",pink:"from-[#FF72E1] to-[#F54C7A]",foreground:"dark:from-[#FFFFFF] dark:to-[#4B4B4B]"},size:{xs:"text-xl lg:text-2xl",sm:"text-3xl lg:text-4xl",md:"text-[2.3rem] lg:text-5xl leading-9",lg:"text-4xl lg:text-6xl"},fullWidth:{true:"w-full block"}},defaultVariants:{size:"md"},compoundVariants:[{color:["violet","yellow","blue","cyan","green","pink","foreground"],class:"bg-clip-text text-transparent bg-gradient-to-b"}]});qne({base:"w-full md:w-1/2 my-2 text-lg lg:text-xl text-default-600 block max-w-full",variants:{fullWidth:{true:"!w-full"}},defaultVariants:{fullWidth:!0}});var[P4e,Z8]=nh({name:"CardContext",strict:!0,errorMessage:"useCardContext: `context` is undefined. Seems you forgot to wrap component within <Card />"}),Wne=Ht((r,e)=>{var t;const{as:n,className:a,children:i,...o}=r,s=n||"div",l=$r(e),{slots:u,classNames:c}=Z8(),d=lt(c==null?void 0:c.body,a);return _.jsx(s,{ref:l,className:(t=u.body)==null?void 0:t.call(u,{class:d}),...o,children:i})});Wne.displayName="HeroUI.CardBody";var ms=Wne,Kne=Ht((r,e)=>{var t;const{as:n,className:a,children:i,...o}=r,s=n||"div",l=$r(e),{slots:u,classNames:c}=Z8(),d=lt(c==null?void 0:c.footer,a);return _.jsx(s,{ref:l,className:(t=u.footer)==null?void 0:t.call(u,{class:d}),...o,children:i})});Kne.displayName="HeroUI.CardFooter";var I4e=Kne,Yne=Ht((r,e)=>{var t;const{as:n,className:a,children:i,...o}=r,s=n||"div",l=$r(e),{slots:u,classNames:c}=Z8(),d=lt(c==null?void 0:c.header,a);return _.jsx(s,{ref:l,className:(t=u.header)==null?void 0:t.call(u,{class:d}),...o,children:i})});Yne.displayName="HeroUI.CardHeader";var p3=Yne;function M2(r,e){let{elementType:t="button",isDisabled:n,onPress:a,onPressStart:i,onPressEnd:o,onPressChange:s,preventFocusOnPress:l,allowFocusWhenDisabled:u,onClick:c,href:d,target:f,rel:h,type:v="button",allowTextSelectionOnPress:m}=r,y;t==="button"?y={type:v,disabled:n}:y={role:"button",tabIndex:n?void 0:0,href:t==="a"&&!n?d:void 0,target:t==="a"?f:void 0,type:t==="input"?v:void 0,disabled:t==="input"?n:void 0,"aria-disabled":!n||t==="input"?void 0:n,rel:t==="a"?h:void 0};let b=Tv()||T2();c&&typeof c=="function"&&T8("onClick is deprecated, please use onPress instead. See: https://github.com/heroui-inc/heroui/issues/4292","useButton");const w=P=>{b&&(c==null||c(P)),a==null||a(P)};let{pressProps:S,isPressed:T}=Ss({onPressStart:i,onPressEnd:o,onPressChange:s,onPress:w,isDisabled:n,preventFocusOnPress:l,allowTextSelectionOnPress:m,ref:e}),{focusableProps:A}=L0(r,e);u&&(A.tabIndex=n?-1:A.tabIndex);let M=ze(A,S,hi(r,{labelable:!0}));return{isPressed:T,buttonProps:ze(y,M,{"aria-haspopup":r["aria-haspopup"],"aria-expanded":r["aria-expanded"],"aria-controls":r["aria-controls"],"aria-pressed":r["aria-pressed"],onClick:P=>{v==="button"&&b||c==null||c(P)}})}}const k4e="modulepreload",R4e=function(r){return"/web/"+r},YF={},Jc=function(e,t,n){let a=Promise.resolve();if(t&&t.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),s=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));a=Promise.allSettled(t.map(l=>{if(l=R4e(l),l in YF)return;YF[l]=!0;const u=l.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${c}`))return;const d=document.createElement("link");if(d.rel=u?"stylesheet":k4e,u||(d.as="script"),d.crossOrigin="",d.href=l,s&&d.setAttribute("nonce",s),document.head.appendChild(d),u)return new Promise((f,h)=>{d.addEventListener("load",f),d.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${l}`)))})}))}function i(o){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o}return a.then(o=>{for(const s of o||[])s.status==="rejected"&&i(s.reason);return e().catch(i)})};var N4e=()=>Jc(()=>import("./index-Dm_gigSn.js"),[]).then(r=>r.default),Zne=r=>{const{ripples:e=[],motionProps:t,color:n="currentColor",style:a,onClear:i}=r;return _.jsx(_.Fragment,{children:e.map(o=>{const s=p_e(.01*o.size,.2,o.size>100?.75:.5);return _.jsx(Mi,{features:N4e,children:_.jsx(fl,{mode:"popLayout",children:_.jsx(Di.span,{animate:{transform:"scale(2)",opacity:0},className:"heroui-ripple",exit:{opacity:0},initial:{transform:"scale(0)",opacity:.35},style:{position:"absolute",backgroundColor:n,borderRadius:"100%",transformOrigin:"center",pointerEvents:"none",overflow:"hidden",inset:0,zIndex:0,top:o.y,left:o.x,width:`${o.size}px`,height:`${o.size}px`,...a},transition:{duration:s},onAnimationComplete:()=>{i(o.key)},...t})})},o.key)})})};Zne.displayName="HeroUI.Ripple";var Xne=Zne;function Jne(r={}){const[e,t]=D.useState([]),n=D.useCallback(i=>{const o=i.target,s=Math.max(o.clientWidth,o.clientHeight);t(l=>[...l,{key:c_e(l.length.toString()),size:s,x:i.x-s/2,y:i.y-s/2}])},[]),a=D.useCallback(i=>{t(o=>o.filter(s=>s.key!==i))},[]);return{ripples:e,onClear:a,onPress:n,...r}}function O4e(r){var e,t,n,a;const i=Vr(),[o,s]=oa(r,dF.variantKeys),{ref:l,as:u,children:c,onClick:d,onPress:f,autoFocus:h,className:v,classNames:m,allowTextSelectionOnPress:y=!0,...b}=o,w=$r(l),S=u||(r.isPressable?"button":"div"),T=typeof S=="string",A=(t=(e=r.disableAnimation)!=null?e:i==null?void 0:i.disableAnimation)!=null?t:!1,M=(a=(n=r.disableRipple)!=null?n:i==null?void 0:i.disableRipple)!=null?a:!1,P=lt(m==null?void 0:m.base,v),{onClear:E,onPress:R,ripples:N}=Jne(),k=D.useCallback(Z=>{M||A||w.current&&R(Z)},[M,A,w,R]),{buttonProps:O,isPressed:L}=M2({onPress:Un(f,k),elementType:u,isDisabled:!r.isPressable,onClick:d,allowTextSelectionOnPress:y,...b},w),{hoverProps:$,isHovered:j}=Ia({isDisabled:!r.isHoverable,...b}),{isFocusVisible:B,isFocused:H,focusProps:F}=Rn({autoFocus:h}),K=D.useMemo(()=>dF({...s,disableAnimation:A}),[eo(s),A]),U=D.useMemo(()=>({slots:K,classNames:m,disableAnimation:A,isDisabled:r.isDisabled,isFooterBlurred:r.isFooterBlurred,fullWidth:r.fullWidth}),[K,m,r.isDisabled,r.isFooterBlurred,A,r.fullWidth]),V=D.useCallback((Z={})=>({ref:w,className:K.base({class:P}),tabIndex:r.isPressable?0:-1,"data-hover":je(j),"data-pressed":je(L),"data-focus":je(H),"data-focus-visible":je(B),"data-disabled":je(r.isDisabled),...ze(r.isPressable?{...O,...F,role:"button"}:{},r.isHoverable?$:{},Pa(b,{enabled:T}),Pa(Z))}),[w,K,P,T,r.isPressable,r.isHoverable,r.isDisabled,j,L,B,O,F,$,b]),Q=D.useCallback(()=>({ripples:N,onClear:E}),[N,E]);return{context:U,domRef:w,Component:S,classNames:m,children:c,isHovered:j,isPressed:L,disableAnimation:A,isPressable:r.isPressable,isHoverable:r.isHoverable,disableRipple:M,handlePress:k,isFocusVisible:B,getCardProps:V,getRippleProps:Q}}var eae=Ht((r,e)=>{const{children:t,context:n,Component:a,isPressable:i,disableAnimation:o,disableRipple:s,getCardProps:l,getRippleProps:u}=O4e({...r,ref:e});return _.jsxs(a,{...l(),children:[_.jsx(P4e,{value:n,children:t}),i&&!o&&!s&&_.jsx(Xne,{...u()})]})});eae.displayName="HeroUI.Card";var Fa=eae;function tae(r,e){return function(){return r.apply(e,arguments)}}const{toString:$4e}=Object.prototype,{getPrototypeOf:X8}=Object,v3=(r=>e=>{const t=$4e.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),xl=r=>(r=r.toLowerCase(),e=>v3(e)===r),g3=r=>e=>typeof e===r,{isArray:R0}=Array,vx=g3("undefined");function z4e(r){return r!==null&&!vx(r)&&r.constructor!==null&&!vx(r.constructor)&&mo(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const rae=xl("ArrayBuffer");function j4e(r){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(r):e=r&&r.buffer&&rae(r.buffer),e}const B4e=g3("string"),mo=g3("function"),nae=g3("number"),m3=r=>r!==null&&typeof r=="object",V4e=r=>r===!0||r===!1,sC=r=>{if(v3(r)!=="object")return!1;const e=X8(r);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in r)&&!(Symbol.iterator in r)},F4e=xl("Date"),H4e=xl("File"),U4e=xl("Blob"),G4e=xl("FileList"),q4e=r=>m3(r)&&mo(r.pipe),Q4e=r=>{let e;return r&&(typeof FormData=="function"&&r instanceof FormData||mo(r.append)&&((e=v3(r))==="formdata"||e==="object"&&mo(r.toString)&&r.toString()==="[object FormData]"))},W4e=xl("URLSearchParams"),[K4e,Y4e,Z4e,X4e]=["ReadableStream","Request","Response","Headers"].map(xl),J4e=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function D2(r,e,{allOwnKeys:t=!1}={}){if(r===null||typeof r>"u")return;let n,a;if(typeof r!="object"&&(r=[r]),R0(r))for(n=0,a=r.length;n<a;n++)e.call(null,r[n],n,r);else{const i=t?Object.getOwnPropertyNames(r):Object.keys(r),o=i.length;let s;for(n=0;n<o;n++)s=i[n],e.call(null,r[s],s,r)}}function aae(r,e){e=e.toLowerCase();const t=Object.keys(r);let n=t.length,a;for(;n-- >0;)if(a=t[n],e===a.toLowerCase())return a;return null}const Ap=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,iae=r=>!vx(r)&&r!==Ap;function UI(){const{caseless:r}=iae(this)&&this||{},e={},t=(n,a)=>{const i=r&&aae(e,a)||a;sC(e[i])&&sC(n)?e[i]=UI(e[i],n):sC(n)?e[i]=UI({},n):R0(n)?e[i]=n.slice():e[i]=n};for(let n=0,a=arguments.length;n<a;n++)arguments[n]&&D2(arguments[n],t);return e}const eEe=(r,e,t,{allOwnKeys:n}={})=>(D2(e,(a,i)=>{t&&mo(a)?r[i]=tae(a,t):r[i]=a},{allOwnKeys:n}),r),tEe=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),rEe=(r,e,t,n)=>{r.prototype=Object.create(e.prototype,n),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:e.prototype}),t&&Object.assign(r.prototype,t)},nEe=(r,e,t,n)=>{let a,i,o;const s={};if(e=e||{},r==null)return e;do{for(a=Object.getOwnPropertyNames(r),i=a.length;i-- >0;)o=a[i],(!n||n(o,r,e))&&!s[o]&&(e[o]=r[o],s[o]=!0);r=t!==!1&&X8(r)}while(r&&(!t||t(r,e))&&r!==Object.prototype);return e},aEe=(r,e,t)=>{r=String(r),(t===void 0||t>r.length)&&(t=r.length),t-=e.length;const n=r.indexOf(e,t);return n!==-1&&n===t},iEe=r=>{if(!r)return null;if(R0(r))return r;let e=r.length;if(!nae(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=r[e];return t},oEe=(r=>e=>r&&e instanceof r)(typeof Uint8Array<"u"&&X8(Uint8Array)),sEe=(r,e)=>{const n=(r&&r[Symbol.iterator]).call(r);let a;for(;(a=n.next())&&!a.done;){const i=a.value;e.call(r,i[0],i[1])}},lEe=(r,e)=>{let t;const n=[];for(;(t=r.exec(e))!==null;)n.push(t);return n},uEe=xl("HTMLFormElement"),cEe=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,n,a){return n.toUpperCase()+a}),ZF=(({hasOwnProperty:r})=>(e,t)=>r.call(e,t))(Object.prototype),dEe=xl("RegExp"),oae=(r,e)=>{const t=Object.getOwnPropertyDescriptors(r),n={};D2(t,(a,i)=>{let o;(o=e(a,i,r))!==!1&&(n[i]=o||a)}),Object.defineProperties(r,n)},fEe=r=>{oae(r,(e,t)=>{if(mo(r)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const n=r[t];if(mo(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},hEe=(r,e)=>{const t={},n=a=>{a.forEach(i=>{t[i]=!0})};return R0(r)?n(r):n(String(r).split(e)),t},pEe=()=>{},vEe=(r,e)=>r!=null&&Number.isFinite(r=+r)?r:e,IM="abcdefghijklmnopqrstuvwxyz",XF="0123456789",sae={DIGIT:XF,ALPHA:IM,ALPHA_DIGIT:IM+IM.toUpperCase()+XF},gEe=(r=16,e=sae.ALPHA_DIGIT)=>{let t="";const{length:n}=e;for(;r--;)t+=e[Math.random()*n|0];return t};function mEe(r){return!!(r&&mo(r.append)&&r[Symbol.toStringTag]==="FormData"&&r[Symbol.iterator])}const yEe=r=>{const e=new Array(10),t=(n,a)=>{if(m3(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[a]=n;const i=R0(n)?[]:{};return D2(n,(o,s)=>{const l=t(o,a+1);!vx(l)&&(i[s]=l)}),e[a]=void 0,i}}return n};return t(r,0)},bEe=xl("AsyncFunction"),xEe=r=>r&&(m3(r)||mo(r))&&mo(r.then)&&mo(r.catch),lae=((r,e)=>r?setImmediate:e?((t,n)=>(Ap.addEventListener("message",({source:a,data:i})=>{a===Ap&&i===t&&n.length&&n.shift()()},!1),a=>{n.push(a),Ap.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",mo(Ap.postMessage)),wEe=typeof queueMicrotask<"u"?queueMicrotask.bind(Ap):typeof process<"u"&&process.nextTick||lae,De={isArray:R0,isArrayBuffer:rae,isBuffer:z4e,isFormData:Q4e,isArrayBufferView:j4e,isString:B4e,isNumber:nae,isBoolean:V4e,isObject:m3,isPlainObject:sC,isReadableStream:K4e,isRequest:Y4e,isResponse:Z4e,isHeaders:X4e,isUndefined:vx,isDate:F4e,isFile:H4e,isBlob:U4e,isRegExp:dEe,isFunction:mo,isStream:q4e,isURLSearchParams:W4e,isTypedArray:oEe,isFileList:G4e,forEach:D2,merge:UI,extend:eEe,trim:J4e,stripBOM:tEe,inherits:rEe,toFlatObject:nEe,kindOf:v3,kindOfTest:xl,endsWith:aEe,toArray:iEe,forEachEntry:sEe,matchAll:lEe,isHTMLForm:uEe,hasOwnProperty:ZF,hasOwnProp:ZF,reduceDescriptors:oae,freezeMethods:fEe,toObjectSet:hEe,toCamelCase:cEe,noop:pEe,toFiniteNumber:vEe,findKey:aae,global:Ap,isContextDefined:iae,ALPHABET:sae,generateString:gEe,isSpecCompliantForm:mEe,toJSONObject:yEe,isAsyncFn:bEe,isThenable:xEe,setImmediate:lae,asap:wEe};function Ut(r,e,t,n,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),n&&(this.request=n),a&&(this.response=a,this.status=a.status?a.status:null)}De.inherits(Ut,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:De.toJSONObject(this.config),code:this.code,status:this.status}}});const uae=Ut.prototype,cae={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(r=>{cae[r]={value:r}});Object.defineProperties(Ut,cae);Object.defineProperty(uae,"isAxiosError",{value:!0});Ut.from=(r,e,t,n,a,i)=>{const o=Object.create(uae);return De.toFlatObject(r,o,function(l){return l!==Error.prototype},s=>s!=="isAxiosError"),Ut.call(o,r.message,e,t,n,a),o.cause=r,o.name=r.name,i&&Object.assign(o,i),o};const SEe=null;function GI(r){return De.isPlainObject(r)||De.isArray(r)}function dae(r){return De.endsWith(r,"[]")?r.slice(0,-2):r}function JF(r,e,t){return r?r.concat(e).map(function(a,i){return a=dae(a),!t&&i?"["+a+"]":a}).join(t?".":""):e}function _Ee(r){return De.isArray(r)&&!r.some(GI)}const CEe=De.toFlatObject(De,{},null,function(e){return/^is[A-Z]/.test(e)});function y3(r,e,t){if(!De.isObject(r))throw new TypeError("target must be an object");e=e||new FormData,t=De.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,y){return!De.isUndefined(y[m])});const n=t.metaTokens,a=t.visitor||c,i=t.dots,o=t.indexes,l=(t.Blob||typeof Blob<"u"&&Blob)&&De.isSpecCompliantForm(e);if(!De.isFunction(a))throw new TypeError("visitor must be a function");function u(v){if(v===null)return"";if(De.isDate(v))return v.toISOString();if(!l&&De.isBlob(v))throw new Ut("Blob is not supported. Use a Buffer instead.");return De.isArrayBuffer(v)||De.isTypedArray(v)?l&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function c(v,m,y){let b=v;if(v&&!y&&typeof v=="object"){if(De.endsWith(m,"{}"))m=n?m:m.slice(0,-2),v=JSON.stringify(v);else if(De.isArray(v)&&_Ee(v)||(De.isFileList(v)||De.endsWith(m,"[]"))&&(b=De.toArray(v)))return m=dae(m),b.forEach(function(S,T){!(De.isUndefined(S)||S===null)&&e.append(o===!0?JF([m],T,i):o===null?m:m+"[]",u(S))}),!1}return GI(v)?!0:(e.append(JF(y,m,i),u(v)),!1)}const d=[],f=Object.assign(CEe,{defaultVisitor:c,convertValue:u,isVisitable:GI});function h(v,m){if(!De.isUndefined(v)){if(d.indexOf(v)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(v),De.forEach(v,function(b,w){(!(De.isUndefined(b)||b===null)&&a.call(e,b,De.isString(w)?w.trim():w,m,f))===!0&&h(b,m?m.concat(w):[w])}),d.pop()}}if(!De.isObject(r))throw new TypeError("data must be an object");return h(r),e}function eH(r){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function J8(r,e){this._pairs=[],r&&y3(r,this,e)}const fae=J8.prototype;fae.append=function(e,t){this._pairs.push([e,t])};fae.toString=function(e){const t=e?function(n){return e.call(this,n,eH)}:eH;return this._pairs.map(function(a){return t(a[0])+"="+t(a[1])},"").join("&")};function TEe(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function hae(r,e,t){if(!e)return r;const n=t&&t.encode||TEe;De.isFunction(t)&&(t={serialize:t});const a=t&&t.serialize;let i;if(a?i=a(e,t):i=De.isURLSearchParams(e)?e.toString():new J8(e,t).toString(n),i){const o=r.indexOf("#");o!==-1&&(r=r.slice(0,o)),r+=(r.indexOf("?")===-1?"?":"&")+i}return r}class tH{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){De.forEach(this.handlers,function(n){n!==null&&e(n)})}}const pae={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},AEe=typeof URLSearchParams<"u"?URLSearchParams:J8,EEe=typeof FormData<"u"?FormData:null,MEe=typeof Blob<"u"?Blob:null,DEe={isBrowser:!0,classes:{URLSearchParams:AEe,FormData:EEe,Blob:MEe},protocols:["http","https","file","blob","url","data"]},eN=typeof window<"u"&&typeof document<"u",qI=typeof navigator=="object"&&navigator||void 0,LEe=eN&&(!qI||["ReactNative","NativeScript","NS"].indexOf(qI.product)<0),PEe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",IEe=eN&&window.location.href||"http://localhost",kEe=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:eN,hasStandardBrowserEnv:LEe,hasStandardBrowserWebWorkerEnv:PEe,navigator:qI,origin:IEe},Symbol.toStringTag,{value:"Module"})),oi={...kEe,...DEe};function REe(r,e){return y3(r,new oi.classes.URLSearchParams,Object.assign({visitor:function(t,n,a,i){return oi.isNode&&De.isBuffer(t)?(this.append(n,t.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function NEe(r){return De.matchAll(/\w+|\[(\w*)]/g,r).map(e=>e[0]==="[]"?"":e[1]||e[0])}function OEe(r){const e={},t=Object.keys(r);let n;const a=t.length;let i;for(n=0;n<a;n++)i=t[n],e[i]=r[i];return e}function vae(r){function e(t,n,a,i){let o=t[i++];if(o==="__proto__")return!0;const s=Number.isFinite(+o),l=i>=t.length;return o=!o&&De.isArray(a)?a.length:o,l?(De.hasOwnProp(a,o)?a[o]=[a[o],n]:a[o]=n,!s):((!a[o]||!De.isObject(a[o]))&&(a[o]=[]),e(t,n,a[o],i)&&De.isArray(a[o])&&(a[o]=OEe(a[o])),!s)}if(De.isFormData(r)&&De.isFunction(r.entries)){const t={};return De.forEachEntry(r,(n,a)=>{e(NEe(n),a,t,0)}),t}return null}function $Ee(r,e,t){if(De.isString(r))try{return(e||JSON.parse)(r),De.trim(r)}catch(n){if(n.name!=="SyntaxError")throw n}return(t||JSON.stringify)(r)}const L2={transitional:pae,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",a=n.indexOf("application/json")>-1,i=De.isObject(e);if(i&&De.isHTMLForm(e)&&(e=new FormData(e)),De.isFormData(e))return a?JSON.stringify(vae(e)):e;if(De.isArrayBuffer(e)||De.isBuffer(e)||De.isStream(e)||De.isFile(e)||De.isBlob(e)||De.isReadableStream(e))return e;if(De.isArrayBufferView(e))return e.buffer;if(De.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return REe(e,this.formSerializer).toString();if((s=De.isFileList(e))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return y3(s?{"files[]":e}:e,l&&new l,this.formSerializer)}}return i||a?(t.setContentType("application/json",!1),$Ee(e)):e}],transformResponse:[function(e){const t=this.transitional||L2.transitional,n=t&&t.forcedJSONParsing,a=this.responseType==="json";if(De.isResponse(e)||De.isReadableStream(e))return e;if(e&&De.isString(e)&&(n&&!this.responseType||a)){const o=!(t&&t.silentJSONParsing)&&a;try{return JSON.parse(e)}catch(s){if(o)throw s.name==="SyntaxError"?Ut.from(s,Ut.ERR_BAD_RESPONSE,this,null,this.response):s}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:oi.classes.FormData,Blob:oi.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};De.forEach(["delete","get","head","post","put","patch"],r=>{L2.headers[r]={}});const zEe=De.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),jEe=r=>{const e={};let t,n,a;return r&&r.split(`
|
|
101
101
|
`).forEach(function(o){a=o.indexOf(":"),t=o.substring(0,a).trim().toLowerCase(),n=o.substring(a+1).trim(),!(!t||e[t]&&zEe[t])&&(t==="set-cookie"?e[t]?e[t].push(n):e[t]=[n]:e[t]=e[t]?e[t]+", "+n:n)}),e},rH=Symbol("internals");function u1(r){return r&&String(r).trim().toLowerCase()}function lC(r){return r===!1||r==null?r:De.isArray(r)?r.map(lC):String(r)}function BEe(r){const e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=t.exec(r);)e[n[1]]=n[2];return e}const VEe=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());function kM(r,e,t,n,a){if(De.isFunction(n))return n.call(this,e,t);if(a&&(e=t),!!De.isString(e)){if(De.isString(n))return e.indexOf(n)!==-1;if(De.isRegExp(n))return n.test(e)}}function FEe(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function HEe(r,e){const t=De.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(r,n+t,{value:function(a,i,o){return this[n].call(this,e,a,i,o)},configurable:!0})})}let Yi=class{constructor(e){e&&this.set(e)}set(e,t,n){const a=this;function i(s,l,u){const c=u1(l);if(!c)throw new Error("header name must be a non-empty string");const d=De.findKey(a,c);(!d||a[d]===void 0||u===!0||u===void 0&&a[d]!==!1)&&(a[d||l]=lC(s))}const o=(s,l)=>De.forEach(s,(u,c)=>i(u,c,l));if(De.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(De.isString(e)&&(e=e.trim())&&!VEe(e))o(jEe(e),t);else if(De.isHeaders(e))for(const[s,l]of e.entries())i(l,s,n);else e!=null&&i(t,e,n);return this}get(e,t){if(e=u1(e),e){const n=De.findKey(this,e);if(n){const a=this[n];if(!t)return a;if(t===!0)return BEe(a);if(De.isFunction(t))return t.call(this,a,n);if(De.isRegExp(t))return t.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=u1(e),e){const n=De.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||kM(this,this[n],n,t)))}return!1}delete(e,t){const n=this;let a=!1;function i(o){if(o=u1(o),o){const s=De.findKey(n,o);s&&(!t||kM(n,n[s],s,t))&&(delete n[s],a=!0)}}return De.isArray(e)?e.forEach(i):i(e),a}clear(e){const t=Object.keys(this);let n=t.length,a=!1;for(;n--;){const i=t[n];(!e||kM(this,this[i],i,e,!0))&&(delete this[i],a=!0)}return a}normalize(e){const t=this,n={};return De.forEach(this,(a,i)=>{const o=De.findKey(n,i);if(o){t[o]=lC(a),delete t[i];return}const s=e?FEe(i):String(i).trim();s!==i&&delete t[i],t[s]=lC(a),n[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return De.forEach(this,(n,a)=>{n!=null&&n!==!1&&(t[a]=e&&De.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
|
|
102
102
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(a=>n.set(a)),n}static accessor(e){const n=(this[rH]=this[rH]={accessors:{}}).accessors,a=this.prototype;function i(o){const s=u1(o);n[s]||(HEe(a,o),n[s]=!0)}return De.isArray(e)?e.forEach(i):i(e),this}};Yi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);De.reduceDescriptors(Yi.prototype,({value:r},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>r,set(n){this[t]=n}}});De.freezeMethods(Yi);function RM(r,e){const t=this||L2,n=e||t,a=Yi.from(n.headers);let i=n.data;return De.forEach(r,function(s){i=s.call(t,i,a.normalize(),e?e.status:void 0)}),a.normalize(),i}function gae(r){return!!(r&&r.__CANCEL__)}function N0(r,e,t){Ut.call(this,r??"canceled",Ut.ERR_CANCELED,e,t),this.name="CanceledError"}De.inherits(N0,Ut,{__CANCEL__:!0});function mae(r,e,t){const n=t.config.validateStatus;!t.status||!n||n(t.status)?r(t):e(new Ut("Request failed with status code "+t.status,[Ut.ERR_BAD_REQUEST,Ut.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function UEe(r){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return e&&e[1]||""}function GEe(r,e){r=r||10;const t=new Array(r),n=new Array(r);let a=0,i=0,o;return e=e!==void 0?e:1e3,function(l){const u=Date.now(),c=n[i];o||(o=u),t[a]=l,n[a]=u;let d=i,f=0;for(;d!==a;)f+=t[d++],d=d%r;if(a=(a+1)%r,a===i&&(i=(i+1)%r),u-o<e)return;const h=c&&u-c;return h?Math.round(f*1e3/h):void 0}}function qEe(r,e){let t=0,n=1e3/e,a,i;const o=(u,c=Date.now())=>{t=c,a=null,i&&(clearTimeout(i),i=null),r.apply(null,u)};return[(...u)=>{const c=Date.now(),d=c-t;d>=n?o(u,c):(a=u,i||(i=setTimeout(()=>{i=null,o(a)},n-d)))},()=>a&&o(a)]}const cT=(r,e,t=3)=>{let n=0;const a=GEe(50,250);return qEe(i=>{const o=i.loaded,s=i.lengthComputable?i.total:void 0,l=o-n,u=a(l),c=o<=s;n=o;const d={loaded:o,total:s,progress:s?o/s:void 0,bytes:l,rate:u||void 0,estimated:u&&s&&c?(s-o)/u:void 0,event:i,lengthComputable:s!=null,[e?"download":"upload"]:!0};r(d)},t)},nH=(r,e)=>{const t=r!=null;return[n=>e[0]({lengthComputable:t,total:r,loaded:n}),e[1]]},aH=r=>(...e)=>De.asap(()=>r(...e)),QEe=oi.hasStandardBrowserEnv?((r,e)=>t=>(t=new URL(t,oi.origin),r.protocol===t.protocol&&r.host===t.host&&(e||r.port===t.port)))(new URL(oi.origin),oi.navigator&&/(msie|trident)/i.test(oi.navigator.userAgent)):()=>!0,WEe=oi.hasStandardBrowserEnv?{write(r,e,t,n,a,i){const o=[r+"="+encodeURIComponent(e)];De.isNumber(t)&&o.push("expires="+new Date(t).toGMTString()),De.isString(n)&&o.push("path="+n),De.isString(a)&&o.push("domain="+a),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(r){const e=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(r){this.write(r,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function KEe(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function YEe(r,e){return e?r.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):r}function yae(r,e){return r&&!KEe(e)?YEe(r,e):e}const iH=r=>r instanceof Yi?{...r}:r;function ov(r,e){e=e||{};const t={};function n(u,c,d,f){return De.isPlainObject(u)&&De.isPlainObject(c)?De.merge.call({caseless:f},u,c):De.isPlainObject(c)?De.merge({},c):De.isArray(c)?c.slice():c}function a(u,c,d,f){if(De.isUndefined(c)){if(!De.isUndefined(u))return n(void 0,u,d,f)}else return n(u,c,d,f)}function i(u,c){if(!De.isUndefined(c))return n(void 0,c)}function o(u,c){if(De.isUndefined(c)){if(!De.isUndefined(u))return n(void 0,u)}else return n(void 0,c)}function s(u,c,d){if(d in e)return n(u,c);if(d in r)return n(void 0,u)}const l={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(u,c,d)=>a(iH(u),iH(c),d,!0)};return De.forEach(Object.keys(Object.assign({},r,e)),function(c){const d=l[c]||a,f=d(r[c],e[c],c);De.isUndefined(f)&&d!==s||(t[c]=f)}),t}const bae=r=>{const e=ov({},r);let{data:t,withXSRFToken:n,xsrfHeaderName:a,xsrfCookieName:i,headers:o,auth:s}=e;e.headers=o=Yi.from(o),e.url=hae(yae(e.baseURL,e.url),r.params,r.paramsSerializer),s&&o.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let l;if(De.isFormData(t)){if(oi.hasStandardBrowserEnv||oi.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((l=o.getContentType())!==!1){const[u,...c]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];o.setContentType([u||"multipart/form-data",...c].join("; "))}}if(oi.hasStandardBrowserEnv&&(n&&De.isFunction(n)&&(n=n(e)),n||n!==!1&&QEe(e.url))){const u=a&&i&&WEe.read(i);u&&o.set(a,u)}return e},ZEe=typeof XMLHttpRequest<"u",XEe=ZEe&&function(r){return new Promise(function(t,n){const a=bae(r);let i=a.data;const o=Yi.from(a.headers).normalize();let{responseType:s,onUploadProgress:l,onDownloadProgress:u}=a,c,d,f,h,v;function m(){h&&h(),v&&v(),a.cancelToken&&a.cancelToken.unsubscribe(c),a.signal&&a.signal.removeEventListener("abort",c)}let y=new XMLHttpRequest;y.open(a.method.toUpperCase(),a.url,!0),y.timeout=a.timeout;function b(){if(!y)return;const S=Yi.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),A={data:!s||s==="text"||s==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:S,config:r,request:y};mae(function(P){t(P),m()},function(P){n(P),m()},A),y=null}"onloadend"in y?y.onloadend=b:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(b)},y.onabort=function(){y&&(n(new Ut("Request aborted",Ut.ECONNABORTED,r,y)),y=null)},y.onerror=function(){n(new Ut("Network Error",Ut.ERR_NETWORK,r,y)),y=null},y.ontimeout=function(){let T=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const A=a.transitional||pae;a.timeoutErrorMessage&&(T=a.timeoutErrorMessage),n(new Ut(T,A.clarifyTimeoutError?Ut.ETIMEDOUT:Ut.ECONNABORTED,r,y)),y=null},i===void 0&&o.setContentType(null),"setRequestHeader"in y&&De.forEach(o.toJSON(),function(T,A){y.setRequestHeader(A,T)}),De.isUndefined(a.withCredentials)||(y.withCredentials=!!a.withCredentials),s&&s!=="json"&&(y.responseType=a.responseType),u&&([f,v]=cT(u,!0),y.addEventListener("progress",f)),l&&y.upload&&([d,h]=cT(l),y.upload.addEventListener("progress",d),y.upload.addEventListener("loadend",h)),(a.cancelToken||a.signal)&&(c=S=>{y&&(n(!S||S.type?new N0(null,r,y):S),y.abort(),y=null)},a.cancelToken&&a.cancelToken.subscribe(c),a.signal&&(a.signal.aborted?c():a.signal.addEventListener("abort",c)));const w=UEe(a.url);if(w&&oi.protocols.indexOf(w)===-1){n(new Ut("Unsupported protocol "+w+":",Ut.ERR_BAD_REQUEST,r));return}y.send(i||null)})},JEe=(r,e)=>{const{length:t}=r=r?r.filter(Boolean):[];if(e||t){let n=new AbortController,a;const i=function(u){if(!a){a=!0,s();const c=u instanceof Error?u:this.reason;n.abort(c instanceof Ut?c:new N0(c instanceof Error?c.message:c))}};let o=e&&setTimeout(()=>{o=null,i(new Ut(`timeout ${e} of ms exceeded`,Ut.ETIMEDOUT))},e);const s=()=>{r&&(o&&clearTimeout(o),o=null,r.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),r=null)};r.forEach(u=>u.addEventListener("abort",i));const{signal:l}=n;return l.unsubscribe=()=>De.asap(s),l}},eMe=function*(r,e){let t=r.byteLength;if(t<e){yield r;return}let n=0,a;for(;n<t;)a=n+e,yield r.slice(n,a),n=a},tMe=async function*(r,e){for await(const t of rMe(r))yield*eMe(t,e)},rMe=async function*(r){if(r[Symbol.asyncIterator]){yield*r;return}const e=r.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t)break;yield n}}finally{await e.cancel()}},oH=(r,e,t,n)=>{const a=tMe(r,e);let i=0,o,s=l=>{o||(o=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await a.next();if(u){s(),l.close();return}let d=c.byteLength;if(t){let f=i+=d;t(f)}l.enqueue(new Uint8Array(c))}catch(u){throw s(u),u}},cancel(l){return s(l),a.return()}},{highWaterMark:2})},b3=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",xae=b3&&typeof ReadableStream=="function",nMe=b3&&(typeof TextEncoder=="function"?(r=>e=>r.encode(e))(new TextEncoder):async r=>new Uint8Array(await new Response(r).arrayBuffer())),wae=(r,...e)=>{try{return!!r(...e)}catch{return!1}},aMe=xae&&wae(()=>{let r=!1;const e=new Request(oi.origin,{body:new ReadableStream,method:"POST",get duplex(){return r=!0,"half"}}).headers.has("Content-Type");return r&&!e}),sH=64*1024,QI=xae&&wae(()=>De.isReadableStream(new Response("").body)),dT={stream:QI&&(r=>r.body)};b3&&(r=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!dT[e]&&(dT[e]=De.isFunction(r[e])?t=>t[e]():(t,n)=>{throw new Ut(`Response type '${e}' is not supported`,Ut.ERR_NOT_SUPPORT,n)})})})(new Response);const iMe=async r=>{if(r==null)return 0;if(De.isBlob(r))return r.size;if(De.isSpecCompliantForm(r))return(await new Request(oi.origin,{method:"POST",body:r}).arrayBuffer()).byteLength;if(De.isArrayBufferView(r)||De.isArrayBuffer(r))return r.byteLength;if(De.isURLSearchParams(r)&&(r=r+""),De.isString(r))return(await nMe(r)).byteLength},oMe=async(r,e)=>{const t=De.toFiniteNumber(r.getContentLength());return t??iMe(e)},sMe=b3&&(async r=>{let{url:e,method:t,data:n,signal:a,cancelToken:i,timeout:o,onDownloadProgress:s,onUploadProgress:l,responseType:u,headers:c,withCredentials:d="same-origin",fetchOptions:f}=bae(r);u=u?(u+"").toLowerCase():"text";let h=JEe([a,i&&i.toAbortSignal()],o),v;const m=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let y;try{if(l&&aMe&&t!=="get"&&t!=="head"&&(y=await oMe(c,n))!==0){let A=new Request(e,{method:"POST",body:n,duplex:"half"}),M;if(De.isFormData(n)&&(M=A.headers.get("content-type"))&&c.setContentType(M),A.body){const[P,E]=nH(y,cT(aH(l)));n=oH(A.body,sH,P,E)}}De.isString(d)||(d=d?"include":"omit");const b="credentials"in Request.prototype;v=new Request(e,{...f,signal:h,method:t.toUpperCase(),headers:c.normalize().toJSON(),body:n,duplex:"half",credentials:b?d:void 0});let w=await fetch(v);const S=QI&&(u==="stream"||u==="response");if(QI&&(s||S&&m)){const A={};["status","statusText","headers"].forEach(R=>{A[R]=w[R]});const M=De.toFiniteNumber(w.headers.get("content-length")),[P,E]=s&&nH(M,cT(aH(s),!0))||[];w=new Response(oH(w.body,sH,P,()=>{E&&E(),m&&m()}),A)}u=u||"text";let T=await dT[De.findKey(dT,u)||"text"](w,r);return!S&&m&&m(),await new Promise((A,M)=>{mae(A,M,{data:T,headers:Yi.from(w.headers),status:w.status,statusText:w.statusText,config:r,request:v})})}catch(b){throw m&&m(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new Ut("Network Error",Ut.ERR_NETWORK,r,v),{cause:b.cause||b}):Ut.from(b,b&&b.code,r,v)}}),WI={http:SEe,xhr:XEe,fetch:sMe};De.forEach(WI,(r,e)=>{if(r){try{Object.defineProperty(r,"name",{value:e})}catch{}Object.defineProperty(r,"adapterName",{value:e})}});const lH=r=>`- ${r}`,lMe=r=>De.isFunction(r)||r===null||r===!1,Sae={getAdapter:r=>{r=De.isArray(r)?r:[r];const{length:e}=r;let t,n;const a={};for(let i=0;i<e;i++){t=r[i];let o;if(n=t,!lMe(t)&&(n=WI[(o=String(t)).toLowerCase()],n===void 0))throw new Ut(`Unknown adapter '${o}'`);if(n)break;a[o||"#"+i]=n}if(!n){const i=Object.entries(a).map(([s,l])=>`adapter ${s} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=e?i.length>1?`since :
|
|
103
103
|
`+i.map(lH).join(`
|
|
104
104
|
`):" "+lH(i[0]):"as no adapter specified";throw new Ut("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return n},adapters:WI};function NM(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new N0(null,r)}function uH(r){return NM(r),r.headers=Yi.from(r.headers),r.data=RM.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),Sae.getAdapter(r.adapter||L2.adapter)(r).then(function(n){return NM(r),n.data=RM.call(r,r.transformResponse,n),n.headers=Yi.from(n.headers),n},function(n){return gae(n)||(NM(r),n&&n.response&&(n.response.data=RM.call(r,r.transformResponse,n.response),n.response.headers=Yi.from(n.response.headers))),Promise.reject(n)})}const _ae="1.7.9",x3={};["object","boolean","number","function","string","symbol"].forEach((r,e)=>{x3[r]=function(n){return typeof n===r||"a"+(e<1?"n ":" ")+r}});const cH={};x3.transitional=function(e,t,n){function a(i,o){return"[Axios v"+_ae+"] Transitional option '"+i+"'"+o+(n?". "+n:"")}return(i,o,s)=>{if(e===!1)throw new Ut(a(o," has been removed"+(t?" in "+t:"")),Ut.ERR_DEPRECATED);return t&&!cH[o]&&(cH[o]=!0,console.warn(a(o," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(i,o,s):!0}};x3.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function uMe(r,e,t){if(typeof r!="object")throw new Ut("options must be an object",Ut.ERR_BAD_OPTION_VALUE);const n=Object.keys(r);let a=n.length;for(;a-- >0;){const i=n[a],o=e[i];if(o){const s=r[i],l=s===void 0||o(s,i,r);if(l!==!0)throw new Ut("option "+i+" must be "+l,Ut.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new Ut("Unknown option "+i,Ut.ERR_BAD_OPTION)}}const uC={assertOptions:uMe,validators:x3},Nl=uC.validators;let zp=class{constructor(e){this.defaults=e,this.interceptors={request:new tH,response:new tH}}async request(e,t){try{return await this._request(e,t)}catch(n){if(n instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const i=a.stack?a.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
|
105
|
-
`+i):n.stack=i}catch{}}throw n}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=ov(this.defaults,t);const{transitional:n,paramsSerializer:a,headers:i}=t;n!==void 0&&uC.assertOptions(n,{silentJSONParsing:Nl.transitional(Nl.boolean),forcedJSONParsing:Nl.transitional(Nl.boolean),clarifyTimeoutError:Nl.transitional(Nl.boolean)},!1),a!=null&&(De.isFunction(a)?t.paramsSerializer={serialize:a}:uC.assertOptions(a,{encode:Nl.function,serialize:Nl.function},!0)),uC.assertOptions(t,{baseUrl:Nl.spelling("baseURL"),withXsrfToken:Nl.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=i&&De.merge(i.common,i[t.method]);i&&De.forEach(["delete","get","head","post","put","patch","common"],v=>{delete i[v]}),t.headers=Yi.concat(o,i);const s=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(t)===!1||(l=l&&m.synchronous,s.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let c,d=0,f;if(!l){const v=[uH.bind(this),void 0];for(v.unshift.apply(v,s),v.push.apply(v,u),f=v.length,c=Promise.resolve(t);d<f;)c=c.then(v[d++],v[d++]);return c}f=s.length;let h=t;for(d=0;d<f;){const v=s[d++],m=s[d++];try{h=v(h)}catch(y){m.call(this,y);break}}try{c=uH.call(this,h)}catch(v){return Promise.reject(v)}for(d=0,f=u.length;d<f;)c=c.then(u[d++],u[d++]);return c}getUri(e){e=ov(this.defaults,e);const t=yae(e.baseURL,e.url);return hae(t,e.params,e.paramsSerializer)}};De.forEach(["delete","get","head","options"],function(e){zp.prototype[e]=function(t,n){return this.request(ov(n||{},{method:e,url:t,data:(n||{}).data}))}});De.forEach(["post","put","patch"],function(e){function t(n){return function(i,o,s){return this.request(ov(s||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}zp.prototype[e]=t(),zp.prototype[e+"Form"]=t(!0)});let cMe=class Cae{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(i){t=i});const n=this;this.promise.then(a=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](a);n._listeners=null}),this.promise.then=a=>{let i;const o=new Promise(s=>{n.subscribe(s),i=s}).then(a);return o.cancel=function(){n.unsubscribe(i)},o},e(function(i,o,s){n.reason||(n.reason=new N0(i,o,s),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=n=>{e.abort(n)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Cae(function(a){e=a}),cancel:e}}};function dMe(r){return function(t){return r.apply(null,t)}}function fMe(r){return De.isObject(r)&&r.isAxiosError===!0}const KI={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(KI).forEach(([r,e])=>{KI[e]=r});function Tae(r){const e=new zp(r),t=tae(zp.prototype.request,e);return De.extend(t,zp.prototype,e,{allOwnKeys:!0}),De.extend(t,e,null,{allOwnKeys:!0}),t.create=function(a){return Tae(ov(r,a))},t}const Gn=Tae(L2);Gn.Axios=zp;Gn.CanceledError=N0;Gn.CancelToken=cMe;Gn.isCancel=gae;Gn.VERSION=_ae;Gn.toFormData=y3;Gn.AxiosError=Ut;Gn.Cancel=Gn.CanceledError;Gn.all=function(e){return Promise.all(e)};Gn.spread=dMe;Gn.isAxiosError=fMe;Gn.mergeConfig=ov;Gn.AxiosHeaders=Yi;Gn.formToJSON=r=>vae(De.isHTMLForm(r)?new FormData(r):r);Gn.getAdapter=Sae.getAdapter;Gn.HttpStatusCode=KI;Gn.default=Gn;const{Axios:vut,AxiosError:gut,CanceledError:mut,isCancel:yut,CancelToken:but,VERSION:xut,all:wut,Cancel:Sut,isAxiosError:_ut,spread:Cut,toFormData:Tut,AxiosHeaders:Aut,HttpStatusCode:Eut,formToJSON:Mut,getAdapter:Dut,mergeConfig:Lut}=Gn,or=Gn.create({timeout:1e4});or.interceptors.request.use(r=>{const e=localStorage.getItem(iv.token);return e&&(r.headers.Authorization=`Bearer ${JSON.parse(e)}`),r});or.interceptors.response.use(r=>r,r=>{var e,t;if(r.response.status===401){const n=localStorage.getItem(iv.token);n&&JSON.parse(n)&&r.config.url!=="/api/login"&&localStorage.removeItem(iv.token),r.config.url!=="/api/login"&&(window.location.href="/web/login")}throw(t=(e=r==null?void 0:r.response)==null?void 0:e.data)!=null&&t.message?new Error(r.response.data.message):new Error(r.message)});or.serverGet=async(r,e)=>(await or.get(r,e)).data.data;or.serverPost=async(r,e,t)=>(await or.post(r,e,t)).data.data;function hMe(r){return rt({attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M0 0h24v24H0V0zm22.034 18.276c-.175-1.095-.888-2.015-3.003-2.873-.736-.345-1.554-.585-1.797-1.14-.091-.33-.105-.51-.046-.705.15-.646.915-.84 1.515-.66.39.12.75.42.976.9 1.034-.676 1.034-.676 1.755-1.125-.27-.42-.404-.601-.586-.78-.63-.705-1.469-1.065-2.834-1.034l-.705.089c-.676.165-1.32.525-1.71 1.005-1.14 1.291-.811 3.541.569 4.471 1.365 1.02 3.361 1.244 3.616 2.205.24 1.17-.87 1.545-1.966 1.41-.811-.18-1.26-.586-1.755-1.336l-1.83 1.051c.21.48.45.689.81 1.109 1.74 1.756 6.09 1.666 6.871-1.004.029-.09.24-.705.074-1.65l.046.067zm-8.983-7.245h-2.248c0 1.938-.009 3.864-.009 5.805 0 1.232.063 2.363-.138 2.711-.33.689-1.18.601-1.566.48-.396-.196-.597-.466-.83-.855-.063-.105-.11-.196-.127-.196l-1.825 1.125c.305.63.75 1.172 1.324 1.517.855.51 2.004.675 3.207.405.783-.226 1.458-.691 1.811-1.411.51-.93.402-2.07.397-3.346.012-2.054 0-4.109 0-6.179l.004-.056z"},child:[]}]})(r)}function pMe(r){return rt({attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M1.125 0C.502 0 0 .502 0 1.125v21.75C0 23.498.502 24 1.125 24h21.75c.623 0 1.125-.502 1.125-1.125V1.125C24 .502 23.498 0 22.875 0zm17.363 9.75c.612 0 1.154.037 1.627.111a6.38 6.38 0 0 1 1.306.34v2.458a3.95 3.95 0 0 0-.643-.361 5.093 5.093 0 0 0-.717-.26 5.453 5.453 0 0 0-1.426-.2c-.3 0-.573.028-.819.086a2.1 2.1 0 0 0-.623.242c-.17.104-.3.229-.393.374a.888.888 0 0 0-.14.49c0 .196.053.373.156.529.104.156.252.304.443.444s.423.276.696.41c.273.135.582.274.926.416.47.197.892.407 1.266.628.374.222.695.473.963.753.268.279.472.598.614.957.142.359.214.776.214 1.253 0 .657-.125 1.21-.373 1.656a3.033 3.033 0 0 1-1.012 1.085 4.38 4.38 0 0 1-1.487.596c-.566.12-1.163.18-1.79.18a9.916 9.916 0 0 1-1.84-.164 5.544 5.544 0 0 1-1.512-.493v-2.63a5.033 5.033 0 0 0 3.237 1.2c.333 0 .624-.03.872-.09.249-.06.456-.144.623-.25.166-.108.29-.234.373-.38a1.023 1.023 0 0 0-.074-1.089 2.12 2.12 0 0 0-.537-.5 5.597 5.597 0 0 0-.807-.444 27.72 27.72 0 0 0-1.007-.436c-.918-.383-1.602-.852-2.053-1.405-.45-.553-.676-1.222-.676-2.005 0-.614.123-1.141.369-1.582.246-.441.58-.804 1.004-1.089a4.494 4.494 0 0 1 1.47-.629 7.536 7.536 0 0 1 1.77-.201zm-15.113.188h9.563v2.166H9.506v9.646H6.789v-9.646H3.375z"},child:[]}]})(r)}var[Put,vMe]=B8({name:"ButtonGroupContext",strict:!1});function Aae(r,e){let{elementType:t="button",isDisabled:n,onPress:a,onPressStart:i,onPressEnd:o,onPressChange:s,preventFocusOnPress:l,allowFocusWhenDisabled:u,onClick:c,href:d,target:f,rel:h,type:v="button",allowTextSelectionOnPress:m}=r,y;t==="button"?y={type:v,disabled:n}:y={role:"button",tabIndex:n?void 0:0,href:t==="a"&&!n?d:void 0,target:t==="a"?f:void 0,type:t==="input"?v:void 0,disabled:t==="input"?n:void 0,"aria-disabled":!n||t==="input"?void 0:n,rel:t==="a"?h:void 0};let b=Tv()||T2();c&&typeof c=="function"&&c3("onClick is deprecated, please use onPress instead. See: https://github.com/frontio-ai/heroui/issues/4292","useButton");const w=P=>{b&&(c==null||c(P)),a==null||a(P)};let{pressProps:S,isPressed:T}=Ss({onPressStart:i,onPressEnd:o,onPressChange:s,onPress:w,isDisabled:n,preventFocusOnPress:l,allowTextSelectionOnPress:m,ref:e}),{focusableProps:A}=L0(r,e);u&&(A.tabIndex=n?-1:A.tabIndex);let M=ze(A,S,hi(r,{labelable:!0}));return{isPressed:T,buttonProps:ze(y,M,{"aria-haspopup":r["aria-haspopup"],"aria-expanded":r["aria-expanded"],"aria-controls":r["aria-controls"],"aria-pressed":r["aria-pressed"],onClick:P=>{v==="button"&&b||c==null||c(P)}})}}var gMe=()=>Jc(()=>import("./index-CHATu7tP.js"),[]).then(r=>r.default),Eae=r=>{const{ripples:e=[],motionProps:t,color:n="currentColor",style:a,onClear:i}=r;return _.jsx(_.Fragment,{children:e.map(o=>{const s=YAe(.01*o.size,.2,o.size>100?.75:.5);return _.jsx(Mi,{features:gMe,children:_.jsx(fl,{mode:"popLayout",children:_.jsx(Di.span,{animate:{transform:"scale(2)",opacity:0},className:"heroui-ripple",exit:{opacity:0},initial:{transform:"scale(0)",opacity:.35},style:{position:"absolute",backgroundColor:n,borderRadius:"100%",transformOrigin:"center",pointerEvents:"none",overflow:"hidden",inset:0,zIndex:0,top:o.y,left:o.x,width:`${o.size}px`,height:`${o.size}px`,...a},transition:{duration:s},onAnimationComplete:()=>{i(o.key)},...t})})},o.key)})})};Eae.displayName="HeroUI.Ripple";var mMe=Eae;function yMe(r={}){const[e,t]=D.useState([]),n=D.useCallback(i=>{const o=i.target,s=Math.max(o.clientWidth,o.clientHeight);t(l=>[...l,{key:WAe(l.length.toString()),size:s,x:i.x-s/2,y:i.y-s/2}])},[]),a=D.useCallback(i=>{t(o=>o.filter(s=>s.key!==i))},[]);return{ripples:e,onClear:a,onPress:n,...r}}function bMe(r){var e,t,n,a,i,o,s,l,u;const c=vMe(),d=Vr(),f=!!c,{ref:h,as:v,children:m,startContent:y,endContent:b,autoFocus:w,className:S,spinner:T,isLoading:A=!1,disableRipple:M=!1,fullWidth:P=(e=c==null?void 0:c.fullWidth)!=null?e:!1,radius:E=c==null?void 0:c.radius,size:R=(t=c==null?void 0:c.size)!=null?t:"md",color:N=(n=c==null?void 0:c.color)!=null?n:"default",variant:k=(a=c==null?void 0:c.variant)!=null?a:"solid",disableAnimation:O=(o=(i=c==null?void 0:c.disableAnimation)!=null?i:d==null?void 0:d.disableAnimation)!=null?o:!1,isDisabled:L=(s=c==null?void 0:c.isDisabled)!=null?s:!1,isIconOnly:$=(l=c==null?void 0:c.isIconOnly)!=null?l:!1,spinnerPlacement:j="start",onPress:B,onClick:H,...F}=r,K=v||"button",U=typeof K=="string",V=bc(h),Q=(u=M||(d==null?void 0:d.disableRipple))!=null?u:O,{isFocusVisible:Z,isFocused:Y,focusProps:X}=Rn({autoFocus:w}),re=L||A,oe=D.useMemo(()=>one({size:R,color:N,variant:k,radius:E,fullWidth:P,isDisabled:re,isInGroup:f,disableAnimation:O,isIconOnly:$,className:S}),[R,N,k,E,P,re,f,$,O,S]),{onPress:ae,onClear:se,ripples:le}=yMe(),fe=D.useCallback(xe=>{Q||re||O||V.current&&ae(xe)},[Q,re,O,V,ae]),{buttonProps:ve,isPressed:pe}=Aae({elementType:v,isDisabled:re,onPress:Un(B,fe),onClick:H,...F},V),{isHovered:Re,hoverProps:Ae}=Ia({isDisabled:re}),ie=D.useCallback((xe={})=>({"data-disabled":ht(re),"data-focus":ht(Y),"data-pressed":ht(pe),"data-focus-visible":ht(Z),"data-hover":ht(Re),"data-loading":ht(A),...ze(ve,X,Ae,av(F,{enabled:U}),av(xe))}),[A,re,Y,pe,U,Z,Re,ve,X,Ae,F]),Se=xe=>D.isValidElement(xe)?D.cloneElement(xe,{"aria-hidden":!0,focusable:!1,tabIndex:-1}):null,ee=Se(y),te=Se(b),de=D.useMemo(()=>({sm:"sm",md:"sm",lg:"md"})[R],[R]),ye=D.useCallback(()=>({ripples:le,onClear:se}),[le,se]);return{Component:K,children:m,domRef:V,spinner:T,styles:oe,startContent:ee,endContent:te,isLoading:A,spinnerPlacement:j,spinnerSize:de,disableRipple:Q,getButtonProps:ie,getRippleProps:ye,isIconOnly:$}}function Mae(r){return D.forwardRef(r)}var xMe=(r,e,t=!0)=>{if(!e)return[r,{}];const n=e.reduce((a,i)=>i in r?{...a,[i]:r[i]}:a,{});return t?[Object.keys(r).filter(i=>!e.includes(i)).reduce((i,o)=>({...i,[o]:r[o]}),{}),n]:[r,n]};function wMe(r){const[e,t]=xMe(r,nT.variantKeys),{children:n,className:a,classNames:i,label:o,...s}=e,l=D.useMemo(()=>nT({...t}),[Xc(t)]),u=Cr(i==null?void 0:i.base,a),c=o||n,d=D.useMemo(()=>c&&typeof c=="string"?c:s["aria-label"]?"":"Loading",[n,c,s["aria-label"]]),f=D.useCallback(()=>({"aria-label":d,className:l.base({class:u}),...s}),[d,l,u,s]);return{label:c,slots:l,classNames:i,getSpinnerProps:f}}var Dae=Mae((r,e)=>{const{slots:t,classNames:n,label:a,getSpinnerProps:i}=wMe({...r});return _.jsxs("div",{ref:e,...i(),children:[_.jsxs("div",{className:t.wrapper({class:n==null?void 0:n.wrapper}),children:[_.jsx("i",{className:t.circle1({class:n==null?void 0:n.circle1})}),_.jsx("i",{className:t.circle2({class:n==null?void 0:n.circle2})})]}),a&&_.jsx("span",{className:t.label({class:n==null?void 0:n.label}),children:a})]})});Dae.displayName="HeroUI.Spinner";var SMe=Dae,Lae=Ht((r,e)=>{const{Component:t,domRef:n,children:a,styles:i,spinnerSize:o,spinner:s=_.jsx(SMe,{color:"current",size:o}),spinnerPlacement:l,startContent:u,endContent:c,isLoading:d,disableRipple:f,getButtonProps:h,getRippleProps:v,isIconOnly:m}=bMe({...r,ref:e});return _.jsxs(t,{ref:n,className:i,...h(),children:[u,d&&l==="start"&&s,d&&m?null:a,d&&l==="end"&&s,c,!f&&_.jsx(mMe,{...v()})]})});Lae.displayName="HeroUI.Button";var Ze=Lae;function Pae(r){let[e,t]=bl(r.isOpen,r.defaultOpen||!1,r.onOpenChange);const n=D.useCallback(()=>{t(!0)},[t]),a=D.useCallback(()=>{t(!1)},[t]),i=D.useCallback(()=>{t(!e)},[t,e]);return{isOpen:e,setOpen:t,open:n,close:a,toggle:i}}const _Me=1500,dH=500;let Rh={},CMe=0,c1=!1,nc=null,Nh=null;function Iae(r={}){let{delay:e=_Me,closeDelay:t=dH}=r,{isOpen:n,open:a,close:i}=Pae(r),o=D.useMemo(()=>`${++CMe}`,[]),s=D.useRef(null),l=D.useRef(i),u=()=>{Rh[o]=f},c=()=>{for(let v in Rh)v!==o&&(Rh[v](!0),delete Rh[v])},d=()=>{s.current&&clearTimeout(s.current),s.current=null,c(),u(),c1=!0,a(),nc&&(clearTimeout(nc),nc=null),Nh&&(clearTimeout(Nh),Nh=null)},f=v=>{v||t<=0?(s.current&&clearTimeout(s.current),s.current=null,l.current()):s.current||(s.current=setTimeout(()=>{s.current=null,l.current()},t)),nc&&(clearTimeout(nc),nc=null),c1&&(Nh&&clearTimeout(Nh),Nh=setTimeout(()=>{delete Rh[o],Nh=null,c1=!1},Math.max(dH,t)))},h=()=>{c(),u(),!n&&!nc&&!c1?nc=setTimeout(()=>{nc=null,c1=!0,d()},e):n||d()};return D.useEffect(()=>{l.current=i},[i]),D.useEffect(()=>()=>{s.current&&clearTimeout(s.current),Rh[o]&&delete Rh[o]},[o]),{isOpen:n,open:v=>{!v&&e>0&&!s.current?h():d()},close:f}}function kae(r,e){let t=hi(r,{labelable:!0}),{hoverProps:n}=Ia({onHoverStart:()=>e==null?void 0:e.open(!0),onHoverEnd:()=>e==null?void 0:e.close()});return{tooltipProps:ze(t,n,{role:"tooltip"})}}function Rae(r,e,t){let{isDisabled:n,trigger:a}=r,i=_o(),o=D.useRef(!1),s=D.useRef(!1),l=()=>{(o.current||s.current)&&e.open(s.current)},u=b=>{!o.current&&!s.current&&e.close(b)};D.useEffect(()=>{let b=w=>{t&&t.current&&w.key==="Escape"&&(w.stopPropagation(),e.close(!0))};if(e.isOpen)return document.addEventListener("keydown",b,!0),()=>{document.removeEventListener("keydown",b,!0)}},[t,e]);let c=()=>{a!=="focus"&&(XC()==="pointer"?o.current=!0:o.current=!1,l())},d=()=>{a!=="focus"&&(s.current=!1,o.current=!1,u())},f=()=>{s.current=!1,o.current=!1,u(!0)},h=()=>{r0()&&(s.current=!0,l())},v=()=>{s.current=!1,o.current=!1,u(!0)},{hoverProps:m}=Ia({isDisabled:n,onHoverStart:c,onHoverEnd:d}),{focusableProps:y}=bne({isDisabled:n,onFocus:h,onBlur:v},t);return{triggerProps:{"aria-describedby":e.isOpen?i:void 0,...ze(y,m,{onPointerDown:f,onKeyDown:f})},tooltipProps:{id:i}}}function Nae(r){return null}Nae.getCollectionNode=function*(e,t){let{childItems:n,title:a,children:i}=e,o=e.title||e.children,s=e.textValue||(typeof o=="string"?o:"")||e["aria-label"]||"";!s&&!(t!=null&&t.suppressTextValueWarning)&&console.warn("<Item> with non-plain text contents is unsupported by type to select for accessibility. Please add a `textValue` prop."),yield{type:"item",props:e,rendered:o,textValue:s,"aria-label":e["aria-label"],hasChildNodes:TMe(e),*childNodes(){if(n)for(let l of n)yield{type:"item",value:l};else if(a){let l=[];Be.Children.forEach(i,u=>{l.push({type:"item",element:u})}),yield*l}}}};function TMe(r){return r.hasChildItems!=null?r.hasChildItems:!!(r.childItems||r.title&&Be.Children.count(r.children)>0)}let w3=Nae;var tN=r=>{const e={top:{originY:1},bottom:{originY:0},left:{originX:1},right:{originX:0},"top-start":{originX:0,originY:1},"top-end":{originX:1,originY:1},"bottom-start":{originX:0,originY:0},"bottom-end":{originX:1,originY:0},"right-start":{originX:0,originY:0},"right-end":{originX:0,originY:1},"left-start":{originX:1,originY:0},"left-end":{originX:1,originY:1}};return(e==null?void 0:e[r])||{}},Oae=r=>({top:"top",bottom:"bottom",left:"left",right:"right","top-start":"top start","top-end":"top end","bottom-start":"bottom start","bottom-end":"bottom end","left-start":"left top","left-end":"left bottom","right-start":"right top","right-end":"right bottom"})[r],AMe=(r,e)=>{if(e.includes("-")){const[t]=e.split("-");if(t.includes(r))return!1}return!0},fT=(r,e)=>{if(e.includes("-")){const[,t]=e.split("-");return`${r}-${t}`}return r},d1=new WeakMap,Vo=[];function EMe(r,e=document.body){let t=new Set(r),n=new Set,a=l=>{for(let f of l.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))t.add(f);let u=f=>{if(t.has(f)||f.parentElement&&n.has(f.parentElement)&&f.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let h of t)if(f.contains(h))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},c=document.createTreeWalker(l,NodeFilter.SHOW_ELEMENT,{acceptNode:u}),d=u(l);if(d===NodeFilter.FILTER_ACCEPT&&i(l),d!==NodeFilter.FILTER_REJECT){let f=c.nextNode();for(;f!=null;)i(f),f=c.nextNode()}},i=l=>{var u;let c=(u=d1.get(l))!=null?u:0;l.getAttribute("aria-hidden")==="true"&&c===0||(c===0&&l.setAttribute("aria-hidden","true"),n.add(l),d1.set(l,c+1))};Vo.length&&Vo[Vo.length-1].disconnect(),a(e);let o=new MutationObserver(l=>{for(let u of l)if(!(u.type!=="childList"||u.addedNodes.length===0)&&![...t,...n].some(c=>c.contains(u.target))){for(let c of u.removedNodes)c instanceof Element&&(t.delete(c),n.delete(c));for(let c of u.addedNodes)(c instanceof HTMLElement||c instanceof SVGElement)&&(c.dataset.liveAnnouncer==="true"||c.dataset.reactAriaTopLayer==="true")?t.add(c):c instanceof Element&&a(c)}});o.observe(e,{childList:!0,subtree:!0});let s={observe(){o.observe(e,{childList:!0,subtree:!0})},disconnect(){o.disconnect()}};return Vo.push(s),()=>{o.disconnect();for(let l of n){let u=d1.get(l);u!=null&&(u===1?(l.removeAttribute("aria-hidden"),d1.delete(l)):d1.set(l,u-1))}s===Vo[Vo.length-1]?(Vo.pop(),Vo.length&&Vo[Vo.length-1].observe()):Vo.splice(Vo.indexOf(s),1)}}var $ae=(r,e,t)=>{const n=e==null?void 0:e.current;if(!n||!n.contains(r)){const a=document.querySelectorAll("body > span[data-focus-scope-start]");let i=[];if(a.forEach(o=>{i.push(o.nextElementSibling)}),i.length===1)return t.close(),!1}return!n||!n.contains(r)},O0=globalThis!=null&&globalThis.document?D.useLayoutEffect:D.useEffect;function MMe(r){var e,t;const n=Vr(),[a,i]=oa(r,zf.variantKeys),{ref:o,as:s,isOpen:l,content:u,children:c,defaultOpen:d,onOpenChange:f,isDisabled:h,trigger:v,shouldFlip:m=!0,containerPadding:y=12,placement:b="top",delay:w=0,closeDelay:S=500,showArrow:T=!1,offset:A=7,crossOffset:M=0,isDismissable:P,shouldCloseOnBlur:E=!0,portalContainer:R,isKeyboardDismissDisabled:N=!1,updatePositionDeps:k=[],shouldCloseOnInteractOutside:O,className:L,onClose:$,motionProps:j,classNames:B,...H}=a,F=s||"div",K=(t=(e=r==null?void 0:r.disableAnimation)!=null?e:n==null?void 0:n.disableAnimation)!=null?t:!1,U=Iae({delay:w,closeDelay:S,isDisabled:h,defaultOpen:d,isOpen:l,onOpenChange:ie=>{f==null||f(ie),ie||$==null||$()}}),V=D.useRef(null),Q=D.useRef(null),Z=D.useId(),Y=U.isOpen&&!h;D.useImperativeHandle(o,()=>KSe(Q));const{triggerProps:X,tooltipProps:re}=Rae({isDisabled:h,trigger:v},U,V),{tooltipProps:oe}=kae({isOpen:Y,...ze(a,re)},U),{overlayProps:ae,placement:se,updatePosition:le}=o3({isOpen:Y,targetRef:V,placement:Oae(b),overlayRef:Q,offset:T?A+3:A,crossOffset:M,shouldFlip:m,containerPadding:y});O0(()=>{k.length&&le()},k);const{overlayProps:fe}=E2({isOpen:Y,onClose:U.close,isDismissable:P,shouldCloseOnBlur:E,isKeyboardDismissDisabled:N,shouldCloseOnInteractOutside:O},Q),ve=D.useMemo(()=>{var ie,Se,ee;return zf({...i,disableAnimation:K,radius:(ie=r==null?void 0:r.radius)!=null?ie:"md",size:(Se=r==null?void 0:r.size)!=null?Se:"md",shadow:(ee=r==null?void 0:r.shadow)!=null?ee:"sm"})},[eo(i),K,r==null?void 0:r.radius,r==null?void 0:r.size,r==null?void 0:r.shadow]),pe=D.useCallback((ie={},Se=null)=>({...ze(X,ie),ref:A8(Se,V),"aria-describedby":Y?Z:void 0}),[X,Y,Z,U]),Re=D.useCallback(()=>({ref:Q,"data-slot":"base","data-open":je(Y),"data-arrow":je(T),"data-disabled":je(h),"data-placement":fT(se||"top",b),...ze(oe,fe,H),style:ze(ae.style,H.style,a.style),className:ve.base({class:B==null?void 0:B.base}),id:Z}),[ve,Y,T,h,se,b,oe,fe,H,ae,a,Z]),Ae=D.useCallback(()=>({"data-slot":"content","data-open":je(Y),"data-arrow":je(T),"data-disabled":je(h),"data-placement":fT(se||"top",b),className:ve.content({class:lt(B==null?void 0:B.content,L)})}),[ve,Y,T,h,se,b,B]);return{Component:F,content:u,children:c,isOpen:Y,triggerRef:V,showArrow:T,portalContainer:R,placement:b,disableAnimation:K,isDisabled:h,motionProps:j,getTooltipContentProps:Ae,getTriggerProps:pe,getTooltipProps:Re}}var Ib={ease:[.36,.66,.4,1]},jf={scaleSpring:{enter:{transform:"scale(1)",opacity:1,transition:{type:"spring",bounce:0,duration:.2}},exit:{transform:"scale(0.85)",opacity:0,transition:{type:"easeOut",duration:.15}}},scaleSpringOpacity:{initial:{opacity:0,transform:"scale(0.8)"},enter:{opacity:1,transform:"scale(1)",transition:{type:"spring",bounce:0,duration:.3}},exit:{opacity:0,transform:"scale(0.96)",transition:{type:"easeOut",bounce:0,duration:.15}}},fade:{enter:{opacity:1,transition:{duration:.4,ease:Ib.ease}},exit:{opacity:0,transition:{duration:.3,ease:Ib.ease}}},collapse:{enter:{opacity:1,height:"auto",transition:{height:{type:"spring",bounce:0,duration:.3},opacity:{easings:"ease",duration:.4}}},exit:{opacity:0,height:0,transition:{easings:"ease",duration:.3}}}},DMe=()=>Jc(()=>import("./index-CGOi-AYz.js"),[]).then(r=>r.default),zae=Ht((r,e)=>{const{Component:t,children:n,content:a,isOpen:i,portalContainer:o,placement:s,disableAnimation:l,motionProps:u,getTriggerProps:c,getTooltipProps:d,getTooltipContentProps:f}=MMe({...r,ref:e});let h;try{if(D.Children.count(n)!==1)throw new Error;if(!D.isValidElement(n))h=_.jsx("p",{...c(),children:n});else{const T=n;h=D.cloneElement(T,c(T.props,T.ref))}}catch{h=_.jsx("span",{}),T8("Tooltip must have only one child node. Please, check your code.")}const{ref:v,id:m,style:y,...b}=d(),w=_.jsx("div",{ref:v,id:m,style:y,children:_.jsx(Mi,{features:DMe,children:_.jsx(Di.div,{animate:"enter",exit:"exit",initial:"exit",variants:jf.scaleSpring,...ze(u,b),style:{...tN(s)},children:_.jsx(t,{...f(),children:a})})})});return _.jsxs(_.Fragment,{children:[h,l&&i?_.jsx(tT,{portalContainer:o,children:_.jsx("div",{ref:v,id:m,style:y,...b,children:_.jsx(t,{...f(),children:a})})}):_.jsx(fl,{children:i?_.jsx(tT,{portalContainer:o,children:w}):null})]})});zae.displayName="HeroUI.Tooltip";var wn=zae;let LMe={data:""},PMe=r=>typeof window=="object"?((r?r.querySelector("#_goober"):window._goober)||Object.assign((r||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:r||LMe,IMe=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,kMe=/\/\*[^]*?\*\/| +/g,fH=/\n+/g,ff=(r,e)=>{let t="",n="",a="";for(let i in r){let o=r[i];i[0]=="@"?i[1]=="i"?t=i+" "+o+";":n+=i[1]=="f"?ff(o,i):i+"{"+ff(o,i[1]=="k"?"":e)+"}":typeof o=="object"?n+=ff(o,e?e.replace(/([^,])+/g,s=>i.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,s):s?s+" "+l:l)):i):o!=null&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),a+=ff.p?ff.p(i,o):i+":"+o+";")}return t+(e&&a?e+"{"+a+"}":a)+n},ac={},jae=r=>{if(typeof r=="object"){let e="";for(let t in r)e+=t+jae(r[t]);return e}return r},RMe=(r,e,t,n,a)=>{let i=jae(r),o=ac[i]||(ac[i]=(l=>{let u=0,c=11;for(;u<l.length;)c=101*c+l.charCodeAt(u++)>>>0;return"go"+c})(i));if(!ac[o]){let l=i!==r?r:(u=>{let c,d,f=[{}];for(;c=IMe.exec(u.replace(kMe,""));)c[4]?f.shift():c[3]?(d=c[3].replace(fH," ").trim(),f.unshift(f[0][d]=f[0][d]||{})):f[0][c[1]]=c[2].replace(fH," ").trim();return f[0]})(r);ac[o]=ff(a?{["@keyframes "+o]:l}:l,t?"":"."+o)}let s=t&&ac.g?ac.g:null;return t&&(ac.g=ac[o]),((l,u,c,d)=>{d?u.data=u.data.replace(d,l):u.data.indexOf(l)===-1&&(u.data=c?l+u.data:u.data+l)})(ac[o],e,n,s),o},NMe=(r,e,t)=>r.reduce((n,a,i)=>{let o=e[i];if(o&&o.call){let s=o(t),l=s&&s.props&&s.props.className||/^go/.test(s)&&s;o=l?"."+l:s&&typeof s=="object"?s.props?"":ff(s,""):s===!1?"":s}return n+a+(o??"")},"");function S3(r){let e=this||{},t=r.call?r(e.p):r;return RMe(t.unshift?t.raw?NMe(t,[].slice.call(arguments,1),e.p):t.reduce((n,a)=>Object.assign(n,a&&a.call?a(e.p):a),{}):t,PMe(e.target),e.g,e.o,e.k)}let Bae,YI,ZI;S3.bind({g:1});let Ic=S3.bind({k:1});function OMe(r,e,t,n){ff.p=e,Bae=r,YI=t,ZI=n}function ah(r,e){let t=this||{};return function(){let n=arguments;function a(i,o){let s=Object.assign({},i),l=s.className||a.className;t.p=Object.assign({theme:YI&&YI()},s),t.o=/ *go\d+/.test(l),s.className=S3.apply(t,n)+(l?" "+l:"");let u=r;return r[0]&&(u=s.as||r,delete s.as),ZI&&u[0]&&ZI(s),Bae(u,s)}return a}}var $Me=r=>typeof r=="function",hT=(r,e)=>$Me(r)?r(e):r,zMe=(()=>{let r=0;return()=>(++r).toString()})(),Vae=(()=>{let r;return()=>{if(r===void 0&&typeof window<"u"){let e=matchMedia("(prefers-reduced-motion: reduce)");r=!e||e.matches}return r}})(),jMe=20,Fae=(r,e)=>{switch(e.type){case 0:return{...r,toasts:[e.toast,...r.toasts].slice(0,jMe)};case 1:return{...r,toasts:r.toasts.map(i=>i.id===e.toast.id?{...i,...e.toast}:i)};case 2:let{toast:t}=e;return Fae(r,{type:r.toasts.find(i=>i.id===t.id)?1:0,toast:t});case 3:let{toastId:n}=e;return{...r,toasts:r.toasts.map(i=>i.id===n||n===void 0?{...i,dismissed:!0,visible:!1}:i)};case 4:return e.toastId===void 0?{...r,toasts:[]}:{...r,toasts:r.toasts.filter(i=>i.id!==e.toastId)};case 5:return{...r,pausedAt:e.time};case 6:let a=e.time-(r.pausedAt||0);return{...r,pausedAt:void 0,toasts:r.toasts.map(i=>({...i,pauseDuration:i.pauseDuration+a}))}}},cC=[],dC={toasts:[],pausedAt:void 0},Lv=r=>{dC=Fae(dC,r),cC.forEach(e=>{e(dC)})},BMe={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},VMe=(r={})=>{let[e,t]=D.useState(dC);D.useEffect(()=>(cC.push(t),()=>{let a=cC.indexOf(t);a>-1&&cC.splice(a,1)}),[e]);let n=e.toasts.map(a=>{var i,o,s;return{...r,...r[a.type],...a,removeDelay:a.removeDelay||((i=r[a.type])==null?void 0:i.removeDelay)||(r==null?void 0:r.removeDelay),duration:a.duration||((o=r[a.type])==null?void 0:o.duration)||(r==null?void 0:r.duration)||BMe[a.type],style:{...r.style,...(s=r[a.type])==null?void 0:s.style,...a.style}}});return{...e,toasts:n}},FMe=(r,e="blank",t)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:e,ariaProps:{role:"status","aria-live":"polite"},message:r,pauseDuration:0,...t,id:(t==null?void 0:t.id)||zMe()}),P2=r=>(e,t)=>{let n=FMe(e,r,t);return Lv({type:2,toast:n}),n.id},Ur=(r,e)=>P2("blank")(r,e);Ur.error=P2("error");Ur.success=P2("success");Ur.loading=P2("loading");Ur.custom=P2("custom");Ur.dismiss=r=>{Lv({type:3,toastId:r})};Ur.remove=r=>Lv({type:4,toastId:r});Ur.promise=(r,e,t)=>{let n=Ur.loading(e.loading,{...t,...t==null?void 0:t.loading});return typeof r=="function"&&(r=r()),r.then(a=>{let i=e.success?hT(e.success,a):void 0;return i?Ur.success(i,{id:n,...t,...t==null?void 0:t.success}):Ur.dismiss(n),a}).catch(a=>{let i=e.error?hT(e.error,a):void 0;i?Ur.error(i,{id:n,...t,...t==null?void 0:t.error}):Ur.dismiss(n)}),r};var HMe=(r,e)=>{Lv({type:1,toast:{id:r,height:e}})},UMe=()=>{Lv({type:5,time:Date.now()})},kb=new Map,GMe=1e3,qMe=(r,e=GMe)=>{if(kb.has(r))return;let t=setTimeout(()=>{kb.delete(r),Lv({type:4,toastId:r})},e);kb.set(r,t)},QMe=r=>{let{toasts:e,pausedAt:t}=VMe(r);D.useEffect(()=>{if(t)return;let i=Date.now(),o=e.map(s=>{if(s.duration===1/0)return;let l=(s.duration||0)+s.pauseDuration-(i-s.createdAt);if(l<0){s.visible&&Ur.dismiss(s.id);return}return setTimeout(()=>Ur.dismiss(s.id),l)});return()=>{o.forEach(s=>s&&clearTimeout(s))}},[e,t]);let n=D.useCallback(()=>{t&&Lv({type:6,time:Date.now()})},[t]),a=D.useCallback((i,o)=>{let{reverseOrder:s=!1,gutter:l=8,defaultPosition:u}=o||{},c=e.filter(h=>(h.position||u)===(i.position||u)&&h.height),d=c.findIndex(h=>h.id===i.id),f=c.filter((h,v)=>v<d&&h.visible).length;return c.filter(h=>h.visible).slice(...s?[f+1]:[0,f]).reduce((h,v)=>h+(v.height||0)+l,0)},[e]);return D.useEffect(()=>{e.forEach(i=>{if(i.dismissed)qMe(i.id,i.removeDelay);else{let o=kb.get(i.id);o&&(clearTimeout(o),kb.delete(i.id))}})},[e]),{toasts:e,handlers:{updateHeight:HMe,startPause:UMe,endPause:n,calculateOffset:a}}},WMe=Ic`
|
|
105
|
+
`+i):n.stack=i}catch{}}throw n}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=ov(this.defaults,t);const{transitional:n,paramsSerializer:a,headers:i}=t;n!==void 0&&uC.assertOptions(n,{silentJSONParsing:Nl.transitional(Nl.boolean),forcedJSONParsing:Nl.transitional(Nl.boolean),clarifyTimeoutError:Nl.transitional(Nl.boolean)},!1),a!=null&&(De.isFunction(a)?t.paramsSerializer={serialize:a}:uC.assertOptions(a,{encode:Nl.function,serialize:Nl.function},!0)),uC.assertOptions(t,{baseUrl:Nl.spelling("baseURL"),withXsrfToken:Nl.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=i&&De.merge(i.common,i[t.method]);i&&De.forEach(["delete","get","head","post","put","patch","common"],v=>{delete i[v]}),t.headers=Yi.concat(o,i);const s=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(t)===!1||(l=l&&m.synchronous,s.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let c,d=0,f;if(!l){const v=[uH.bind(this),void 0];for(v.unshift.apply(v,s),v.push.apply(v,u),f=v.length,c=Promise.resolve(t);d<f;)c=c.then(v[d++],v[d++]);return c}f=s.length;let h=t;for(d=0;d<f;){const v=s[d++],m=s[d++];try{h=v(h)}catch(y){m.call(this,y);break}}try{c=uH.call(this,h)}catch(v){return Promise.reject(v)}for(d=0,f=u.length;d<f;)c=c.then(u[d++],u[d++]);return c}getUri(e){e=ov(this.defaults,e);const t=yae(e.baseURL,e.url);return hae(t,e.params,e.paramsSerializer)}};De.forEach(["delete","get","head","options"],function(e){zp.prototype[e]=function(t,n){return this.request(ov(n||{},{method:e,url:t,data:(n||{}).data}))}});De.forEach(["post","put","patch"],function(e){function t(n){return function(i,o,s){return this.request(ov(s||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}zp.prototype[e]=t(),zp.prototype[e+"Form"]=t(!0)});let cMe=class Cae{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(i){t=i});const n=this;this.promise.then(a=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](a);n._listeners=null}),this.promise.then=a=>{let i;const o=new Promise(s=>{n.subscribe(s),i=s}).then(a);return o.cancel=function(){n.unsubscribe(i)},o},e(function(i,o,s){n.reason||(n.reason=new N0(i,o,s),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=n=>{e.abort(n)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Cae(function(a){e=a}),cancel:e}}};function dMe(r){return function(t){return r.apply(null,t)}}function fMe(r){return De.isObject(r)&&r.isAxiosError===!0}const KI={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(KI).forEach(([r,e])=>{KI[e]=r});function Tae(r){const e=new zp(r),t=tae(zp.prototype.request,e);return De.extend(t,zp.prototype,e,{allOwnKeys:!0}),De.extend(t,e,null,{allOwnKeys:!0}),t.create=function(a){return Tae(ov(r,a))},t}const Gn=Tae(L2);Gn.Axios=zp;Gn.CanceledError=N0;Gn.CancelToken=cMe;Gn.isCancel=gae;Gn.VERSION=_ae;Gn.toFormData=y3;Gn.AxiosError=Ut;Gn.Cancel=Gn.CanceledError;Gn.all=function(e){return Promise.all(e)};Gn.spread=dMe;Gn.isAxiosError=fMe;Gn.mergeConfig=ov;Gn.AxiosHeaders=Yi;Gn.formToJSON=r=>vae(De.isHTMLForm(r)?new FormData(r):r);Gn.getAdapter=Sae.getAdapter;Gn.HttpStatusCode=KI;Gn.default=Gn;const{Axios:vut,AxiosError:gut,CanceledError:mut,isCancel:yut,CancelToken:but,VERSION:xut,all:wut,Cancel:Sut,isAxiosError:_ut,spread:Cut,toFormData:Tut,AxiosHeaders:Aut,HttpStatusCode:Eut,formToJSON:Mut,getAdapter:Dut,mergeConfig:Lut}=Gn,or=Gn.create({timeout:1e4});or.interceptors.request.use(r=>{const e=localStorage.getItem(iv.token);return e&&(r.headers.Authorization=`Bearer ${JSON.parse(e)}`),r});or.interceptors.response.use(r=>r,r=>{var e,t;if(r.response.status===401){const n=localStorage.getItem(iv.token);n&&JSON.parse(n)&&r.config.url!=="/api/login"&&localStorage.removeItem(iv.token),r.config.url!=="/api/login"&&(window.location.href="/web/login")}throw(t=(e=r==null?void 0:r.response)==null?void 0:e.data)!=null&&t.message?new Error(r.response.data.message):new Error(r.message)});or.serverGet=async(r,e)=>(await or.get(r,e)).data.data;or.serverPost=async(r,e,t)=>(await or.post(r,e,t)).data.data;function hMe(r){return rt({attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M0 0h24v24H0V0zm22.034 18.276c-.175-1.095-.888-2.015-3.003-2.873-.736-.345-1.554-.585-1.797-1.14-.091-.33-.105-.51-.046-.705.15-.646.915-.84 1.515-.66.39.12.75.42.976.9 1.034-.676 1.034-.676 1.755-1.125-.27-.42-.404-.601-.586-.78-.63-.705-1.469-1.065-2.834-1.034l-.705.089c-.676.165-1.32.525-1.71 1.005-1.14 1.291-.811 3.541.569 4.471 1.365 1.02 3.361 1.244 3.616 2.205.24 1.17-.87 1.545-1.966 1.41-.811-.18-1.26-.586-1.755-1.336l-1.83 1.051c.21.48.45.689.81 1.109 1.74 1.756 6.09 1.666 6.871-1.004.029-.09.24-.705.074-1.65l.046.067zm-8.983-7.245h-2.248c0 1.938-.009 3.864-.009 5.805 0 1.232.063 2.363-.138 2.711-.33.689-1.18.601-1.566.48-.396-.196-.597-.466-.83-.855-.063-.105-.11-.196-.127-.196l-1.825 1.125c.305.63.75 1.172 1.324 1.517.855.51 2.004.675 3.207.405.783-.226 1.458-.691 1.811-1.411.51-.93.402-2.07.397-3.346.012-2.054 0-4.109 0-6.179l.004-.056z"},child:[]}]})(r)}function pMe(r){return rt({attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M1.125 0C.502 0 0 .502 0 1.125v21.75C0 23.498.502 24 1.125 24h21.75c.623 0 1.125-.502 1.125-1.125V1.125C24 .502 23.498 0 22.875 0zm17.363 9.75c.612 0 1.154.037 1.627.111a6.38 6.38 0 0 1 1.306.34v2.458a3.95 3.95 0 0 0-.643-.361 5.093 5.093 0 0 0-.717-.26 5.453 5.453 0 0 0-1.426-.2c-.3 0-.573.028-.819.086a2.1 2.1 0 0 0-.623.242c-.17.104-.3.229-.393.374a.888.888 0 0 0-.14.49c0 .196.053.373.156.529.104.156.252.304.443.444s.423.276.696.41c.273.135.582.274.926.416.47.197.892.407 1.266.628.374.222.695.473.963.753.268.279.472.598.614.957.142.359.214.776.214 1.253 0 .657-.125 1.21-.373 1.656a3.033 3.033 0 0 1-1.012 1.085 4.38 4.38 0 0 1-1.487.596c-.566.12-1.163.18-1.79.18a9.916 9.916 0 0 1-1.84-.164 5.544 5.544 0 0 1-1.512-.493v-2.63a5.033 5.033 0 0 0 3.237 1.2c.333 0 .624-.03.872-.09.249-.06.456-.144.623-.25.166-.108.29-.234.373-.38a1.023 1.023 0 0 0-.074-1.089 2.12 2.12 0 0 0-.537-.5 5.597 5.597 0 0 0-.807-.444 27.72 27.72 0 0 0-1.007-.436c-.918-.383-1.602-.852-2.053-1.405-.45-.553-.676-1.222-.676-2.005 0-.614.123-1.141.369-1.582.246-.441.58-.804 1.004-1.089a4.494 4.494 0 0 1 1.47-.629 7.536 7.536 0 0 1 1.77-.201zm-15.113.188h9.563v2.166H9.506v9.646H6.789v-9.646H3.375z"},child:[]}]})(r)}var[Put,vMe]=B8({name:"ButtonGroupContext",strict:!1});function Aae(r,e){let{elementType:t="button",isDisabled:n,onPress:a,onPressStart:i,onPressEnd:o,onPressChange:s,preventFocusOnPress:l,allowFocusWhenDisabled:u,onClick:c,href:d,target:f,rel:h,type:v="button",allowTextSelectionOnPress:m}=r,y;t==="button"?y={type:v,disabled:n}:y={role:"button",tabIndex:n?void 0:0,href:t==="a"&&!n?d:void 0,target:t==="a"?f:void 0,type:t==="input"?v:void 0,disabled:t==="input"?n:void 0,"aria-disabled":!n||t==="input"?void 0:n,rel:t==="a"?h:void 0};let b=Tv()||T2();c&&typeof c=="function"&&c3("onClick is deprecated, please use onPress instead. See: https://github.com/frontio-ai/heroui/issues/4292","useButton");const w=P=>{b&&(c==null||c(P)),a==null||a(P)};let{pressProps:S,isPressed:T}=Ss({onPressStart:i,onPressEnd:o,onPressChange:s,onPress:w,isDisabled:n,preventFocusOnPress:l,allowTextSelectionOnPress:m,ref:e}),{focusableProps:A}=L0(r,e);u&&(A.tabIndex=n?-1:A.tabIndex);let M=ze(A,S,hi(r,{labelable:!0}));return{isPressed:T,buttonProps:ze(y,M,{"aria-haspopup":r["aria-haspopup"],"aria-expanded":r["aria-expanded"],"aria-controls":r["aria-controls"],"aria-pressed":r["aria-pressed"],onClick:P=>{v==="button"&&b||c==null||c(P)}})}}var gMe=()=>Jc(()=>import("./index-B7_4fTZC.js"),[]).then(r=>r.default),Eae=r=>{const{ripples:e=[],motionProps:t,color:n="currentColor",style:a,onClear:i}=r;return _.jsx(_.Fragment,{children:e.map(o=>{const s=YAe(.01*o.size,.2,o.size>100?.75:.5);return _.jsx(Mi,{features:gMe,children:_.jsx(fl,{mode:"popLayout",children:_.jsx(Di.span,{animate:{transform:"scale(2)",opacity:0},className:"heroui-ripple",exit:{opacity:0},initial:{transform:"scale(0)",opacity:.35},style:{position:"absolute",backgroundColor:n,borderRadius:"100%",transformOrigin:"center",pointerEvents:"none",overflow:"hidden",inset:0,zIndex:0,top:o.y,left:o.x,width:`${o.size}px`,height:`${o.size}px`,...a},transition:{duration:s},onAnimationComplete:()=>{i(o.key)},...t})})},o.key)})})};Eae.displayName="HeroUI.Ripple";var mMe=Eae;function yMe(r={}){const[e,t]=D.useState([]),n=D.useCallback(i=>{const o=i.target,s=Math.max(o.clientWidth,o.clientHeight);t(l=>[...l,{key:WAe(l.length.toString()),size:s,x:i.x-s/2,y:i.y-s/2}])},[]),a=D.useCallback(i=>{t(o=>o.filter(s=>s.key!==i))},[]);return{ripples:e,onClear:a,onPress:n,...r}}function bMe(r){var e,t,n,a,i,o,s,l,u;const c=vMe(),d=Vr(),f=!!c,{ref:h,as:v,children:m,startContent:y,endContent:b,autoFocus:w,className:S,spinner:T,isLoading:A=!1,disableRipple:M=!1,fullWidth:P=(e=c==null?void 0:c.fullWidth)!=null?e:!1,radius:E=c==null?void 0:c.radius,size:R=(t=c==null?void 0:c.size)!=null?t:"md",color:N=(n=c==null?void 0:c.color)!=null?n:"default",variant:k=(a=c==null?void 0:c.variant)!=null?a:"solid",disableAnimation:O=(o=(i=c==null?void 0:c.disableAnimation)!=null?i:d==null?void 0:d.disableAnimation)!=null?o:!1,isDisabled:L=(s=c==null?void 0:c.isDisabled)!=null?s:!1,isIconOnly:$=(l=c==null?void 0:c.isIconOnly)!=null?l:!1,spinnerPlacement:j="start",onPress:B,onClick:H,...F}=r,K=v||"button",U=typeof K=="string",V=bc(h),Q=(u=M||(d==null?void 0:d.disableRipple))!=null?u:O,{isFocusVisible:Z,isFocused:Y,focusProps:X}=Rn({autoFocus:w}),re=L||A,oe=D.useMemo(()=>one({size:R,color:N,variant:k,radius:E,fullWidth:P,isDisabled:re,isInGroup:f,disableAnimation:O,isIconOnly:$,className:S}),[R,N,k,E,P,re,f,$,O,S]),{onPress:ae,onClear:se,ripples:le}=yMe(),fe=D.useCallback(xe=>{Q||re||O||V.current&&ae(xe)},[Q,re,O,V,ae]),{buttonProps:ve,isPressed:pe}=Aae({elementType:v,isDisabled:re,onPress:Un(B,fe),onClick:H,...F},V),{isHovered:Re,hoverProps:Ae}=Ia({isDisabled:re}),ie=D.useCallback((xe={})=>({"data-disabled":ht(re),"data-focus":ht(Y),"data-pressed":ht(pe),"data-focus-visible":ht(Z),"data-hover":ht(Re),"data-loading":ht(A),...ze(ve,X,Ae,av(F,{enabled:U}),av(xe))}),[A,re,Y,pe,U,Z,Re,ve,X,Ae,F]),Se=xe=>D.isValidElement(xe)?D.cloneElement(xe,{"aria-hidden":!0,focusable:!1,tabIndex:-1}):null,ee=Se(y),te=Se(b),de=D.useMemo(()=>({sm:"sm",md:"sm",lg:"md"})[R],[R]),ye=D.useCallback(()=>({ripples:le,onClear:se}),[le,se]);return{Component:K,children:m,domRef:V,spinner:T,styles:oe,startContent:ee,endContent:te,isLoading:A,spinnerPlacement:j,spinnerSize:de,disableRipple:Q,getButtonProps:ie,getRippleProps:ye,isIconOnly:$}}function Mae(r){return D.forwardRef(r)}var xMe=(r,e,t=!0)=>{if(!e)return[r,{}];const n=e.reduce((a,i)=>i in r?{...a,[i]:r[i]}:a,{});return t?[Object.keys(r).filter(i=>!e.includes(i)).reduce((i,o)=>({...i,[o]:r[o]}),{}),n]:[r,n]};function wMe(r){const[e,t]=xMe(r,nT.variantKeys),{children:n,className:a,classNames:i,label:o,...s}=e,l=D.useMemo(()=>nT({...t}),[Xc(t)]),u=Cr(i==null?void 0:i.base,a),c=o||n,d=D.useMemo(()=>c&&typeof c=="string"?c:s["aria-label"]?"":"Loading",[n,c,s["aria-label"]]),f=D.useCallback(()=>({"aria-label":d,className:l.base({class:u}),...s}),[d,l,u,s]);return{label:c,slots:l,classNames:i,getSpinnerProps:f}}var Dae=Mae((r,e)=>{const{slots:t,classNames:n,label:a,getSpinnerProps:i}=wMe({...r});return _.jsxs("div",{ref:e,...i(),children:[_.jsxs("div",{className:t.wrapper({class:n==null?void 0:n.wrapper}),children:[_.jsx("i",{className:t.circle1({class:n==null?void 0:n.circle1})}),_.jsx("i",{className:t.circle2({class:n==null?void 0:n.circle2})})]}),a&&_.jsx("span",{className:t.label({class:n==null?void 0:n.label}),children:a})]})});Dae.displayName="HeroUI.Spinner";var SMe=Dae,Lae=Ht((r,e)=>{const{Component:t,domRef:n,children:a,styles:i,spinnerSize:o,spinner:s=_.jsx(SMe,{color:"current",size:o}),spinnerPlacement:l,startContent:u,endContent:c,isLoading:d,disableRipple:f,getButtonProps:h,getRippleProps:v,isIconOnly:m}=bMe({...r,ref:e});return _.jsxs(t,{ref:n,className:i,...h(),children:[u,d&&l==="start"&&s,d&&m?null:a,d&&l==="end"&&s,c,!f&&_.jsx(mMe,{...v()})]})});Lae.displayName="HeroUI.Button";var Ze=Lae;function Pae(r){let[e,t]=bl(r.isOpen,r.defaultOpen||!1,r.onOpenChange);const n=D.useCallback(()=>{t(!0)},[t]),a=D.useCallback(()=>{t(!1)},[t]),i=D.useCallback(()=>{t(!e)},[t,e]);return{isOpen:e,setOpen:t,open:n,close:a,toggle:i}}const _Me=1500,dH=500;let Rh={},CMe=0,c1=!1,nc=null,Nh=null;function Iae(r={}){let{delay:e=_Me,closeDelay:t=dH}=r,{isOpen:n,open:a,close:i}=Pae(r),o=D.useMemo(()=>`${++CMe}`,[]),s=D.useRef(null),l=D.useRef(i),u=()=>{Rh[o]=f},c=()=>{for(let v in Rh)v!==o&&(Rh[v](!0),delete Rh[v])},d=()=>{s.current&&clearTimeout(s.current),s.current=null,c(),u(),c1=!0,a(),nc&&(clearTimeout(nc),nc=null),Nh&&(clearTimeout(Nh),Nh=null)},f=v=>{v||t<=0?(s.current&&clearTimeout(s.current),s.current=null,l.current()):s.current||(s.current=setTimeout(()=>{s.current=null,l.current()},t)),nc&&(clearTimeout(nc),nc=null),c1&&(Nh&&clearTimeout(Nh),Nh=setTimeout(()=>{delete Rh[o],Nh=null,c1=!1},Math.max(dH,t)))},h=()=>{c(),u(),!n&&!nc&&!c1?nc=setTimeout(()=>{nc=null,c1=!0,d()},e):n||d()};return D.useEffect(()=>{l.current=i},[i]),D.useEffect(()=>()=>{s.current&&clearTimeout(s.current),Rh[o]&&delete Rh[o]},[o]),{isOpen:n,open:v=>{!v&&e>0&&!s.current?h():d()},close:f}}function kae(r,e){let t=hi(r,{labelable:!0}),{hoverProps:n}=Ia({onHoverStart:()=>e==null?void 0:e.open(!0),onHoverEnd:()=>e==null?void 0:e.close()});return{tooltipProps:ze(t,n,{role:"tooltip"})}}function Rae(r,e,t){let{isDisabled:n,trigger:a}=r,i=_o(),o=D.useRef(!1),s=D.useRef(!1),l=()=>{(o.current||s.current)&&e.open(s.current)},u=b=>{!o.current&&!s.current&&e.close(b)};D.useEffect(()=>{let b=w=>{t&&t.current&&w.key==="Escape"&&(w.stopPropagation(),e.close(!0))};if(e.isOpen)return document.addEventListener("keydown",b,!0),()=>{document.removeEventListener("keydown",b,!0)}},[t,e]);let c=()=>{a!=="focus"&&(XC()==="pointer"?o.current=!0:o.current=!1,l())},d=()=>{a!=="focus"&&(s.current=!1,o.current=!1,u())},f=()=>{s.current=!1,o.current=!1,u(!0)},h=()=>{r0()&&(s.current=!0,l())},v=()=>{s.current=!1,o.current=!1,u(!0)},{hoverProps:m}=Ia({isDisabled:n,onHoverStart:c,onHoverEnd:d}),{focusableProps:y}=bne({isDisabled:n,onFocus:h,onBlur:v},t);return{triggerProps:{"aria-describedby":e.isOpen?i:void 0,...ze(y,m,{onPointerDown:f,onKeyDown:f})},tooltipProps:{id:i}}}function Nae(r){return null}Nae.getCollectionNode=function*(e,t){let{childItems:n,title:a,children:i}=e,o=e.title||e.children,s=e.textValue||(typeof o=="string"?o:"")||e["aria-label"]||"";!s&&!(t!=null&&t.suppressTextValueWarning)&&console.warn("<Item> with non-plain text contents is unsupported by type to select for accessibility. Please add a `textValue` prop."),yield{type:"item",props:e,rendered:o,textValue:s,"aria-label":e["aria-label"],hasChildNodes:TMe(e),*childNodes(){if(n)for(let l of n)yield{type:"item",value:l};else if(a){let l=[];Be.Children.forEach(i,u=>{l.push({type:"item",element:u})}),yield*l}}}};function TMe(r){return r.hasChildItems!=null?r.hasChildItems:!!(r.childItems||r.title&&Be.Children.count(r.children)>0)}let w3=Nae;var tN=r=>{const e={top:{originY:1},bottom:{originY:0},left:{originX:1},right:{originX:0},"top-start":{originX:0,originY:1},"top-end":{originX:1,originY:1},"bottom-start":{originX:0,originY:0},"bottom-end":{originX:1,originY:0},"right-start":{originX:0,originY:0},"right-end":{originX:0,originY:1},"left-start":{originX:1,originY:0},"left-end":{originX:1,originY:1}};return(e==null?void 0:e[r])||{}},Oae=r=>({top:"top",bottom:"bottom",left:"left",right:"right","top-start":"top start","top-end":"top end","bottom-start":"bottom start","bottom-end":"bottom end","left-start":"left top","left-end":"left bottom","right-start":"right top","right-end":"right bottom"})[r],AMe=(r,e)=>{if(e.includes("-")){const[t]=e.split("-");if(t.includes(r))return!1}return!0},fT=(r,e)=>{if(e.includes("-")){const[,t]=e.split("-");return`${r}-${t}`}return r},d1=new WeakMap,Vo=[];function EMe(r,e=document.body){let t=new Set(r),n=new Set,a=l=>{for(let f of l.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))t.add(f);let u=f=>{if(t.has(f)||f.parentElement&&n.has(f.parentElement)&&f.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let h of t)if(f.contains(h))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},c=document.createTreeWalker(l,NodeFilter.SHOW_ELEMENT,{acceptNode:u}),d=u(l);if(d===NodeFilter.FILTER_ACCEPT&&i(l),d!==NodeFilter.FILTER_REJECT){let f=c.nextNode();for(;f!=null;)i(f),f=c.nextNode()}},i=l=>{var u;let c=(u=d1.get(l))!=null?u:0;l.getAttribute("aria-hidden")==="true"&&c===0||(c===0&&l.setAttribute("aria-hidden","true"),n.add(l),d1.set(l,c+1))};Vo.length&&Vo[Vo.length-1].disconnect(),a(e);let o=new MutationObserver(l=>{for(let u of l)if(!(u.type!=="childList"||u.addedNodes.length===0)&&![...t,...n].some(c=>c.contains(u.target))){for(let c of u.removedNodes)c instanceof Element&&(t.delete(c),n.delete(c));for(let c of u.addedNodes)(c instanceof HTMLElement||c instanceof SVGElement)&&(c.dataset.liveAnnouncer==="true"||c.dataset.reactAriaTopLayer==="true")?t.add(c):c instanceof Element&&a(c)}});o.observe(e,{childList:!0,subtree:!0});let s={observe(){o.observe(e,{childList:!0,subtree:!0})},disconnect(){o.disconnect()}};return Vo.push(s),()=>{o.disconnect();for(let l of n){let u=d1.get(l);u!=null&&(u===1?(l.removeAttribute("aria-hidden"),d1.delete(l)):d1.set(l,u-1))}s===Vo[Vo.length-1]?(Vo.pop(),Vo.length&&Vo[Vo.length-1].observe()):Vo.splice(Vo.indexOf(s),1)}}var $ae=(r,e,t)=>{const n=e==null?void 0:e.current;if(!n||!n.contains(r)){const a=document.querySelectorAll("body > span[data-focus-scope-start]");let i=[];if(a.forEach(o=>{i.push(o.nextElementSibling)}),i.length===1)return t.close(),!1}return!n||!n.contains(r)},O0=globalThis!=null&&globalThis.document?D.useLayoutEffect:D.useEffect;function MMe(r){var e,t;const n=Vr(),[a,i]=oa(r,zf.variantKeys),{ref:o,as:s,isOpen:l,content:u,children:c,defaultOpen:d,onOpenChange:f,isDisabled:h,trigger:v,shouldFlip:m=!0,containerPadding:y=12,placement:b="top",delay:w=0,closeDelay:S=500,showArrow:T=!1,offset:A=7,crossOffset:M=0,isDismissable:P,shouldCloseOnBlur:E=!0,portalContainer:R,isKeyboardDismissDisabled:N=!1,updatePositionDeps:k=[],shouldCloseOnInteractOutside:O,className:L,onClose:$,motionProps:j,classNames:B,...H}=a,F=s||"div",K=(t=(e=r==null?void 0:r.disableAnimation)!=null?e:n==null?void 0:n.disableAnimation)!=null?t:!1,U=Iae({delay:w,closeDelay:S,isDisabled:h,defaultOpen:d,isOpen:l,onOpenChange:ie=>{f==null||f(ie),ie||$==null||$()}}),V=D.useRef(null),Q=D.useRef(null),Z=D.useId(),Y=U.isOpen&&!h;D.useImperativeHandle(o,()=>KSe(Q));const{triggerProps:X,tooltipProps:re}=Rae({isDisabled:h,trigger:v},U,V),{tooltipProps:oe}=kae({isOpen:Y,...ze(a,re)},U),{overlayProps:ae,placement:se,updatePosition:le}=o3({isOpen:Y,targetRef:V,placement:Oae(b),overlayRef:Q,offset:T?A+3:A,crossOffset:M,shouldFlip:m,containerPadding:y});O0(()=>{k.length&&le()},k);const{overlayProps:fe}=E2({isOpen:Y,onClose:U.close,isDismissable:P,shouldCloseOnBlur:E,isKeyboardDismissDisabled:N,shouldCloseOnInteractOutside:O},Q),ve=D.useMemo(()=>{var ie,Se,ee;return zf({...i,disableAnimation:K,radius:(ie=r==null?void 0:r.radius)!=null?ie:"md",size:(Se=r==null?void 0:r.size)!=null?Se:"md",shadow:(ee=r==null?void 0:r.shadow)!=null?ee:"sm"})},[eo(i),K,r==null?void 0:r.radius,r==null?void 0:r.size,r==null?void 0:r.shadow]),pe=D.useCallback((ie={},Se=null)=>({...ze(X,ie),ref:A8(Se,V),"aria-describedby":Y?Z:void 0}),[X,Y,Z,U]),Re=D.useCallback(()=>({ref:Q,"data-slot":"base","data-open":je(Y),"data-arrow":je(T),"data-disabled":je(h),"data-placement":fT(se||"top",b),...ze(oe,fe,H),style:ze(ae.style,H.style,a.style),className:ve.base({class:B==null?void 0:B.base}),id:Z}),[ve,Y,T,h,se,b,oe,fe,H,ae,a,Z]),Ae=D.useCallback(()=>({"data-slot":"content","data-open":je(Y),"data-arrow":je(T),"data-disabled":je(h),"data-placement":fT(se||"top",b),className:ve.content({class:lt(B==null?void 0:B.content,L)})}),[ve,Y,T,h,se,b,B]);return{Component:F,content:u,children:c,isOpen:Y,triggerRef:V,showArrow:T,portalContainer:R,placement:b,disableAnimation:K,isDisabled:h,motionProps:j,getTooltipContentProps:Ae,getTriggerProps:pe,getTooltipProps:Re}}var Ib={ease:[.36,.66,.4,1]},jf={scaleSpring:{enter:{transform:"scale(1)",opacity:1,transition:{type:"spring",bounce:0,duration:.2}},exit:{transform:"scale(0.85)",opacity:0,transition:{type:"easeOut",duration:.15}}},scaleSpringOpacity:{initial:{opacity:0,transform:"scale(0.8)"},enter:{opacity:1,transform:"scale(1)",transition:{type:"spring",bounce:0,duration:.3}},exit:{opacity:0,transform:"scale(0.96)",transition:{type:"easeOut",bounce:0,duration:.15}}},fade:{enter:{opacity:1,transition:{duration:.4,ease:Ib.ease}},exit:{opacity:0,transition:{duration:.3,ease:Ib.ease}}},collapse:{enter:{opacity:1,height:"auto",transition:{height:{type:"spring",bounce:0,duration:.3},opacity:{easings:"ease",duration:.4}}},exit:{opacity:0,height:0,transition:{easings:"ease",duration:.3}}}},DMe=()=>Jc(()=>import("./index-Dm_gigSn.js"),[]).then(r=>r.default),zae=Ht((r,e)=>{const{Component:t,children:n,content:a,isOpen:i,portalContainer:o,placement:s,disableAnimation:l,motionProps:u,getTriggerProps:c,getTooltipProps:d,getTooltipContentProps:f}=MMe({...r,ref:e});let h;try{if(D.Children.count(n)!==1)throw new Error;if(!D.isValidElement(n))h=_.jsx("p",{...c(),children:n});else{const T=n;h=D.cloneElement(T,c(T.props,T.ref))}}catch{h=_.jsx("span",{}),T8("Tooltip must have only one child node. Please, check your code.")}const{ref:v,id:m,style:y,...b}=d(),w=_.jsx("div",{ref:v,id:m,style:y,children:_.jsx(Mi,{features:DMe,children:_.jsx(Di.div,{animate:"enter",exit:"exit",initial:"exit",variants:jf.scaleSpring,...ze(u,b),style:{...tN(s)},children:_.jsx(t,{...f(),children:a})})})});return _.jsxs(_.Fragment,{children:[h,l&&i?_.jsx(tT,{portalContainer:o,children:_.jsx("div",{ref:v,id:m,style:y,...b,children:_.jsx(t,{...f(),children:a})})}):_.jsx(fl,{children:i?_.jsx(tT,{portalContainer:o,children:w}):null})]})});zae.displayName="HeroUI.Tooltip";var wn=zae;let LMe={data:""},PMe=r=>typeof window=="object"?((r?r.querySelector("#_goober"):window._goober)||Object.assign((r||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:r||LMe,IMe=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,kMe=/\/\*[^]*?\*\/| +/g,fH=/\n+/g,ff=(r,e)=>{let t="",n="",a="";for(let i in r){let o=r[i];i[0]=="@"?i[1]=="i"?t=i+" "+o+";":n+=i[1]=="f"?ff(o,i):i+"{"+ff(o,i[1]=="k"?"":e)+"}":typeof o=="object"?n+=ff(o,e?e.replace(/([^,])+/g,s=>i.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,s):s?s+" "+l:l)):i):o!=null&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),a+=ff.p?ff.p(i,o):i+":"+o+";")}return t+(e&&a?e+"{"+a+"}":a)+n},ac={},jae=r=>{if(typeof r=="object"){let e="";for(let t in r)e+=t+jae(r[t]);return e}return r},RMe=(r,e,t,n,a)=>{let i=jae(r),o=ac[i]||(ac[i]=(l=>{let u=0,c=11;for(;u<l.length;)c=101*c+l.charCodeAt(u++)>>>0;return"go"+c})(i));if(!ac[o]){let l=i!==r?r:(u=>{let c,d,f=[{}];for(;c=IMe.exec(u.replace(kMe,""));)c[4]?f.shift():c[3]?(d=c[3].replace(fH," ").trim(),f.unshift(f[0][d]=f[0][d]||{})):f[0][c[1]]=c[2].replace(fH," ").trim();return f[0]})(r);ac[o]=ff(a?{["@keyframes "+o]:l}:l,t?"":"."+o)}let s=t&&ac.g?ac.g:null;return t&&(ac.g=ac[o]),((l,u,c,d)=>{d?u.data=u.data.replace(d,l):u.data.indexOf(l)===-1&&(u.data=c?l+u.data:u.data+l)})(ac[o],e,n,s),o},NMe=(r,e,t)=>r.reduce((n,a,i)=>{let o=e[i];if(o&&o.call){let s=o(t),l=s&&s.props&&s.props.className||/^go/.test(s)&&s;o=l?"."+l:s&&typeof s=="object"?s.props?"":ff(s,""):s===!1?"":s}return n+a+(o??"")},"");function S3(r){let e=this||{},t=r.call?r(e.p):r;return RMe(t.unshift?t.raw?NMe(t,[].slice.call(arguments,1),e.p):t.reduce((n,a)=>Object.assign(n,a&&a.call?a(e.p):a),{}):t,PMe(e.target),e.g,e.o,e.k)}let Bae,YI,ZI;S3.bind({g:1});let Ic=S3.bind({k:1});function OMe(r,e,t,n){ff.p=e,Bae=r,YI=t,ZI=n}function ah(r,e){let t=this||{};return function(){let n=arguments;function a(i,o){let s=Object.assign({},i),l=s.className||a.className;t.p=Object.assign({theme:YI&&YI()},s),t.o=/ *go\d+/.test(l),s.className=S3.apply(t,n)+(l?" "+l:"");let u=r;return r[0]&&(u=s.as||r,delete s.as),ZI&&u[0]&&ZI(s),Bae(u,s)}return a}}var $Me=r=>typeof r=="function",hT=(r,e)=>$Me(r)?r(e):r,zMe=(()=>{let r=0;return()=>(++r).toString()})(),Vae=(()=>{let r;return()=>{if(r===void 0&&typeof window<"u"){let e=matchMedia("(prefers-reduced-motion: reduce)");r=!e||e.matches}return r}})(),jMe=20,Fae=(r,e)=>{switch(e.type){case 0:return{...r,toasts:[e.toast,...r.toasts].slice(0,jMe)};case 1:return{...r,toasts:r.toasts.map(i=>i.id===e.toast.id?{...i,...e.toast}:i)};case 2:let{toast:t}=e;return Fae(r,{type:r.toasts.find(i=>i.id===t.id)?1:0,toast:t});case 3:let{toastId:n}=e;return{...r,toasts:r.toasts.map(i=>i.id===n||n===void 0?{...i,dismissed:!0,visible:!1}:i)};case 4:return e.toastId===void 0?{...r,toasts:[]}:{...r,toasts:r.toasts.filter(i=>i.id!==e.toastId)};case 5:return{...r,pausedAt:e.time};case 6:let a=e.time-(r.pausedAt||0);return{...r,pausedAt:void 0,toasts:r.toasts.map(i=>({...i,pauseDuration:i.pauseDuration+a}))}}},cC=[],dC={toasts:[],pausedAt:void 0},Lv=r=>{dC=Fae(dC,r),cC.forEach(e=>{e(dC)})},BMe={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},VMe=(r={})=>{let[e,t]=D.useState(dC);D.useEffect(()=>(cC.push(t),()=>{let a=cC.indexOf(t);a>-1&&cC.splice(a,1)}),[e]);let n=e.toasts.map(a=>{var i,o,s;return{...r,...r[a.type],...a,removeDelay:a.removeDelay||((i=r[a.type])==null?void 0:i.removeDelay)||(r==null?void 0:r.removeDelay),duration:a.duration||((o=r[a.type])==null?void 0:o.duration)||(r==null?void 0:r.duration)||BMe[a.type],style:{...r.style,...(s=r[a.type])==null?void 0:s.style,...a.style}}});return{...e,toasts:n}},FMe=(r,e="blank",t)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:e,ariaProps:{role:"status","aria-live":"polite"},message:r,pauseDuration:0,...t,id:(t==null?void 0:t.id)||zMe()}),P2=r=>(e,t)=>{let n=FMe(e,r,t);return Lv({type:2,toast:n}),n.id},Ur=(r,e)=>P2("blank")(r,e);Ur.error=P2("error");Ur.success=P2("success");Ur.loading=P2("loading");Ur.custom=P2("custom");Ur.dismiss=r=>{Lv({type:3,toastId:r})};Ur.remove=r=>Lv({type:4,toastId:r});Ur.promise=(r,e,t)=>{let n=Ur.loading(e.loading,{...t,...t==null?void 0:t.loading});return typeof r=="function"&&(r=r()),r.then(a=>{let i=e.success?hT(e.success,a):void 0;return i?Ur.success(i,{id:n,...t,...t==null?void 0:t.success}):Ur.dismiss(n),a}).catch(a=>{let i=e.error?hT(e.error,a):void 0;i?Ur.error(i,{id:n,...t,...t==null?void 0:t.error}):Ur.dismiss(n)}),r};var HMe=(r,e)=>{Lv({type:1,toast:{id:r,height:e}})},UMe=()=>{Lv({type:5,time:Date.now()})},kb=new Map,GMe=1e3,qMe=(r,e=GMe)=>{if(kb.has(r))return;let t=setTimeout(()=>{kb.delete(r),Lv({type:4,toastId:r})},e);kb.set(r,t)},QMe=r=>{let{toasts:e,pausedAt:t}=VMe(r);D.useEffect(()=>{if(t)return;let i=Date.now(),o=e.map(s=>{if(s.duration===1/0)return;let l=(s.duration||0)+s.pauseDuration-(i-s.createdAt);if(l<0){s.visible&&Ur.dismiss(s.id);return}return setTimeout(()=>Ur.dismiss(s.id),l)});return()=>{o.forEach(s=>s&&clearTimeout(s))}},[e,t]);let n=D.useCallback(()=>{t&&Lv({type:6,time:Date.now()})},[t]),a=D.useCallback((i,o)=>{let{reverseOrder:s=!1,gutter:l=8,defaultPosition:u}=o||{},c=e.filter(h=>(h.position||u)===(i.position||u)&&h.height),d=c.findIndex(h=>h.id===i.id),f=c.filter((h,v)=>v<d&&h.visible).length;return c.filter(h=>h.visible).slice(...s?[f+1]:[0,f]).reduce((h,v)=>h+(v.height||0)+l,0)},[e]);return D.useEffect(()=>{e.forEach(i=>{if(i.dismissed)qMe(i.id,i.removeDelay);else{let o=kb.get(i.id);o&&(clearTimeout(o),kb.delete(i.id))}})},[e]),{toasts:e,handlers:{updateHeight:HMe,startPause:UMe,endPause:n,calculateOffset:a}}},WMe=Ic`
|
|
106
106
|
from {
|
|
107
107
|
transform: scale(0) rotate(45deg);
|
|
108
108
|
opacity: 0;
|
|
@@ -278,7 +278,7 @@ to {
|
|
|
278
278
|
> * {
|
|
279
279
|
pointer-events: auto;
|
|
280
280
|
}
|
|
281
|
-
`,PS=16,bDe=({reverseOrder:r,position:e="top-center",toastOptions:t,gutter:n,children:a,containerStyle:i,containerClassName:o})=>{let{toasts:s,handlers:l}=QMe(t);return D.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:PS,left:PS,right:PS,bottom:PS,pointerEvents:"none",...i},className:o,onMouseEnter:l.startPause,onMouseLeave:l.endPause},s.map(u=>{let c=u.position||e,d=l.calculateOffset(u,{reverseOrder:r,gutter:n,defaultPosition:e}),f=mDe(c,d);return D.createElement(gDe,{id:u.id,key:u.id,onHeightUpdate:l.updateHeight,className:u.visible?yDe:"",style:f},u.type==="custom"?hT(u.message,u):a?a(u):D.createElement(vDe,{toast:u,position:c}))}))},Da=Ur,[xDe,_3]=nh({name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap all popover components within `<Modal />`"}),Hae=Ht((r,e)=>{const{as:t,children:n,className:a,...i}=r,{slots:o,classNames:s,bodyId:l,setBodyMounted:u}=_3(),c=$r(e),d=t||"div";return D.useEffect(()=>(u(!0),()=>u(!1)),[u]),_.jsx(d,{ref:c,className:o.body({class:lt(s==null?void 0:s.body,a)}),id:l,...i,children:n})});Hae.displayName="HeroUI.ModalBody";var kc=Hae,wDe={enter:{scale:"var(--scale-enter)",y:"var(--slide-enter)",opacity:1,willChange:"auto",transition:{scale:{duration:.4,ease:Ib.ease},opacity:{duration:.4,ease:Ib.ease},y:{type:"spring",bounce:0,duration:.6}}},exit:{scale:"var(--scale-exit)",y:"var(--slide-exit)",opacity:0,willChange:"transform",transition:{duration:.3,ease:Ib.ease}}},hH=r=>_.jsxs("svg",{"aria-hidden":"true",fill:"none",focusable:"false",height:"1em",role:"presentation",shapeRendering:"geometricPrecision",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",viewBox:"0 0 24 24",width:"1em",...r,children:[_.jsx("path",{d:"M13 17l5-5-5-5"}),_.jsx("path",{d:"M6 17l5-5-5-5"})]}),Cm=r=>_.jsx("svg",{"aria-hidden":"true",fill:"none",focusable:"false",height:"1em",role:"presentation",viewBox:"0 0 24 24",width:"1em",...r,children:_.jsx("path",{d:"M15.5 19l-7-7 7-7",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})}),SDe=r=>_.jsx("svg",{"aria-hidden":"true",focusable:"false",height:"1em",role:"presentation",viewBox:"0 0 24 24",width:"1em",...r,children:_.jsx("path",{d:"M12 2a10 10 0 1010 10A10.016 10.016 0 0012 2zm3.36 12.3a.754.754 0 010 1.06.748.748 0 01-1.06 0l-2.3-2.3-2.3 2.3a.748.748 0 01-1.06 0 .754.754 0 010-1.06l2.3-2.3-2.3-2.3A.75.75 0 019.7 8.64l2.3 2.3 2.3-2.3a.75.75 0 011.06 1.06l-2.3 2.3z",fill:"currentColor"})}),_De=r=>{const{isSelected:e,isIndeterminate:t,disableAnimation:n,...a}=r;return _.jsx("svg",{"aria-hidden":"true",fill:"none",focusable:"false",height:"1em",role:"presentation",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",width:"1em",...a,children:_.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})},pH=r=>_.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"1em",shapeRendering:"geometricPrecision",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",viewBox:"0 0 24 24",width:"1em",...r,children:[_.jsx("circle",{cx:"12",cy:"12",fill:"currentColor",r:"1"}),_.jsx("circle",{cx:"19",cy:"12",fill:"currentColor",r:"1"}),_.jsx("circle",{cx:"5",cy:"12",fill:"currentColor",r:"1"})]}),CDe=({strokeWidth:r=1.5,...e})=>_.jsx("svg",{"aria-hidden":"true",fill:"none",focusable:"false",height:"1em",role:"presentation",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:r,viewBox:"0 0 24 24",width:"1em",...e,children:_.jsx("path",{d:"m6 9 6 6 6-6"})});function C3(r,e){let{role:t="dialog"}=r,n=Ef();n=r["aria-label"]?void 0:n;let a=D.useRef(!1);return D.useEffect(()=>{if(e.current&&!e.current.contains(document.activeElement)){nv(e.current);let i=setTimeout(()=>{document.activeElement===e.current&&(a.current=!0,e.current&&(e.current.blur(),nv(e.current)),a.current=!1)},500);return()=>{clearTimeout(i)}}},[e]),Ure(),{dialogProps:{...hi(r,{labelable:!0}),role:t,tabIndex:-1,"aria-labelledby":r["aria-labelledby"]||n,onBlur:i=>{a.current&&i.stopPropagation()}},titleProps:{id:n}}}var vH=()=>Jc(()=>import("./index-CGOi-AYz.js"),[]).then(r=>r.default),Uae=r=>{const{as:e,children:t,role:n="dialog",...a}=r,{Component:i,domRef:o,slots:s,classNames:l,motionProps:u,backdrop:c,closeButton:d,hideCloseButton:f,disableAnimation:h,getDialogProps:v,getBackdropProps:m,getCloseButtonProps:y,onClose:b}=_3(),w=e||i||"div",S=X_e(),{dialogProps:T}=C3({role:n},o),A=D.isValidElement(d)?D.cloneElement(d,y()):_.jsx("button",{...y(),children:_.jsx(_De,{})}),M=D.useCallback(O=>{O.key==="Tab"&&O.nativeEvent.isComposing&&(O.stopPropagation(),O.preventDefault())},[]),P=v(ze(T,a)),E=_.jsxs(w,{...P,onKeyDown:Un(P.onKeyDown,M),children:[_.jsx($f,{onDismiss:b}),!f&&A,typeof t=="function"?t(b):t,_.jsx($f,{onDismiss:b})]}),R=D.useMemo(()=>c==="transparent"?null:h?_.jsx("div",{...m()}):_.jsx(Mi,{features:vH,children:_.jsx(Di.div,{animate:"enter",exit:"exit",initial:"exit",variants:jf.fade,...m()})}),[c,h,m]),N={"--visual-viewport-height":S.height+"px"},k=h?_.jsx("div",{className:s.wrapper({class:l==null?void 0:l.wrapper}),"data-slot":"wrapper",style:N,children:E}):_.jsx(Mi,{features:vH,children:_.jsx(Di.div,{animate:"enter",className:s.wrapper({class:l==null?void 0:l.wrapper}),"data-slot":"wrapper",exit:"exit",initial:"exit",variants:wDe,...u,style:N,children:E})});return _.jsxs("div",{tabIndex:-1,children:[R,k]})};Uae.displayName="HeroUI.ModalContent";var Rc=Uae,Gae=Ht((r,e)=>{const{as:t,children:n,className:a,...i}=r,{slots:o,classNames:s}=_3(),l=$r(e),u=t||"footer";return _.jsx(u,{ref:l,className:o.footer({class:lt(s==null?void 0:s.footer,a)}),...i,children:n})});Gae.displayName="HeroUI.ModalFooter";var $0=Gae,qae=Ht((r,e)=>{const{as:t,children:n,className:a,...i}=r,{slots:o,classNames:s,headerId:l,setHeaderMounted:u}=_3(),c=$r(e),d=t||"header";return D.useEffect(()=>(u(!0),()=>u(!1)),[u]),_.jsx(d,{ref:c,className:o.header({class:lt(s==null?void 0:s.header,a)}),id:l,...i,children:n})});qae.displayName="HeroUI.ModalHeader";var Nc=qae;function TDe(r={shouldBlockScroll:!0},e,t){let{overlayProps:n,underlayProps:a}=E2({...r,isOpen:e.isOpen,onClose:e.close},t);return R8({isDisabled:!e.isOpen||!r.shouldBlockScroll}),Ure(),D.useEffect(()=>{if(e.isOpen&&t.current)return N8([t.current])},[e.isOpen,t]),{modalProps:ze(n),underlayProps:a}}function rN(r){let[e,t]=bl(r.isOpen,r.defaultOpen||!1,r.onOpenChange);const n=D.useCallback(()=>{t(!0)},[t]),a=D.useCallback(()=>{t(!1)},[t]),i=D.useCallback(()=>{t(!e)},[t,e]);return{isOpen:e,setOpen:t,open:n,close:a,toggle:i}}function ADe(r){var e,t,n;const a=Vr(),[i,o]=oa(r,lF.variantKeys),{ref:s,as:l,className:u,classNames:c,isOpen:d,defaultOpen:f,onOpenChange:h,motionProps:v,closeButton:m,isDismissable:y=!0,hideCloseButton:b=!1,shouldBlockScroll:w=!0,portalContainer:S,isKeyboardDismissDisabled:T=!1,onClose:A,...M}=i,P=l||"section",E=$r(s),R=D.useRef(null),[N,k]=D.useState(!1),[O,L]=D.useState(!1),$=(t=(e=r.disableAnimation)!=null?e:a==null?void 0:a.disableAnimation)!=null?t:!1,j=D.useId(),B=D.useId(),H=D.useId(),F=rN({isOpen:d,defaultOpen:f,onOpenChange:se=>{h==null||h(se),se||A==null||A()}}),{modalProps:K,underlayProps:U}=TDe({isDismissable:y,shouldBlockScroll:w,isKeyboardDismissDisabled:T},F,E),{buttonProps:V}=M2({onPress:F.close},R),{isFocusVisible:Q,focusProps:Z}=Rn(),Y=lt(c==null?void 0:c.base,u),X=D.useMemo(()=>lF({...o,disableAnimation:$}),[eo(o),$]),re=(se={},le=null)=>{var fe;return{ref:C2(le,E),...ze(K,M,se),className:X.base({class:lt(Y,se.className)}),id:j,"data-open":je(F.isOpen),"data-dismissable":je(y),"aria-modal":je(!0),"data-placement":(fe=r==null?void 0:r.placement)!=null?fe:"right","aria-labelledby":N?B:void 0,"aria-describedby":O?H:void 0}},oe=D.useCallback((se={})=>({className:X.backdrop({class:c==null?void 0:c.backdrop}),onClick:()=>F.close(),...U,...se}),[X,c,U]),ae=()=>({role:"button",tabIndex:0,"aria-label":"Close","data-focus-visible":je(Q),className:X.closeButton({class:c==null?void 0:c.closeButton}),...ze(V,Z)});return{Component:P,slots:X,domRef:E,headerId:B,bodyId:H,motionProps:v,classNames:c,isDismissable:y,closeButton:m,hideCloseButton:b,portalContainer:S,shouldBlockScroll:w,backdrop:(n=r.backdrop)!=null?n:"opaque",isOpen:F.isOpen,onClose:F.close,disableAnimation:$,setBodyMounted:L,setHeaderMounted:k,getDialogProps:re,getBackdropProps:oe,getCloseButtonProps:ae}}var Qae=Ht((r,e)=>{const{children:t,...n}=r,a=ADe({...n,ref:e}),i=_.jsx(l3,{portalContainer:a.portalContainer,children:t});return _.jsx(xDe,{value:a,children:a.disableAnimation&&a.isOpen?i:_.jsx(fl,{children:a.isOpen?i:null})})});Qae.displayName="HeroUI.Modal";var Oc=Qae;function XI(r,e=[]){const t=D.useRef(r);return O0(()=>{t.current=r}),D.useCallback((...n)=>{var a;return(a=t.current)==null?void 0:a.call(t,...n)},e)}function EDe(r={}){const{id:e,defaultOpen:t,isOpen:n,onClose:a,onOpen:i,onChange:o=()=>{}}=r,s=XI(i),l=XI(a),[u,c]=bl(n,t||!1,o),d=D.useId(),f=e||d,h=n!==void 0,v=D.useCallback(()=>{h||c(!1),l==null||l()},[h,l]),m=D.useCallback(()=>{h||c(!0),s==null||s()},[h,s]),y=D.useCallback(()=>{(u?v:m)()},[u,m,v]);return{isOpen:!!u,onOpen:m,onClose:v,onOpenChange:y,isControlled:h,getButtonProps:(b={})=>({...b,"aria-expanded":u,"aria-controls":f,onClick:Un(b.onClick,y)}),getDisclosureProps:(b={})=>({...b,hidden:!u,id:f})}}const Wae=Be.memo(r=>{const{backdrop:e="blur",title:t,content:n,size:a="md",showCancel:i=!0,dismissible:o,onClose:s,onConfirm:l,onCancel:u}=r,{onClose:c}=EDe();return _.jsx(Oc,{defaultOpen:!0,backdrop:e,isDismissable:o,onClose:()=>{s==null||s(),c()},size:a,classNames:{backdrop:"z-[99999999]",wrapper:"z-[999999999]"},children:_.jsx(Rc,{children:d=>_.jsxs(_.Fragment,{children:[t&&_.jsx(Nc,{className:"flex flex-col gap-1",children:t}),_.jsx(kc,{children:n}),_.jsxs($0,{children:[i&&_.jsx(Ze,{color:"danger",variant:"light",onPress:()=>{u==null||u(),d()},children:"取消"}),_.jsx(Ze,{color:"primary",onPress:()=>{l==null||l(),d()},children:"确定"})]})]})})})});Wae.displayName="Modal";const Kae=Be.createContext({alert:()=>{},confirm:()=>{}}),MDe=({children:r})=>{const[e,t]=Be.useState([]),n=i=>{const{title:o,content:s,dismissible:l,onConfirm:u,size:c="md"}=i;t(d=>{var h;const f=((h=d[d.length-1])==null?void 0:h.id)+1||0;return[...d,{id:f,content:s,size:c,title:o,backdrop:"blur",showCancel:!1,dismissible:l,onConfirm:()=>{u==null||u(),setTimeout(()=>{t(v=>v.filter(m=>m.id!==f))},300)}}]})},a=i=>{const{title:o,content:s,dismissible:l,onConfirm:u,onCancel:c,size:d="md"}=i;t(f=>{var v;const h=((v=f[f.length-1])==null?void 0:v.id)+1||0;return[...f,{id:h,content:s,size:d,title:o,backdrop:"blur",showCancel:!0,dismissible:l,onConfirm:()=>{u==null||u(),setTimeout(()=>{t(m=>m.filter(y=>y.id!==h))},300)},onCancel:()=>{c==null||c(),setTimeout(()=>{t(m=>m.filter(y=>y.id!==h))},300)}}]})};return _.jsxs(Kae.Provider,{value:{alert:n,confirm:a},children:[r,e==null?void 0:e.map(({id:i,...o})=>_.jsx(Wae,{...o},i))]})},Yae=()=>Be.useContext(Kae);function DDe(r){return rt({attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M6 2.97184V2.98361H5.91083C5.71113 2.98361 5.5238 3.02427 5.34802 3.10513C5.17461 3.18275 5.02193 3.28942 4.89086 3.42437C4.76421 3.55475 4.66135 3.71034 4.58238 3.89205C4.50833 4.07152 4.47134 4.26019 4.47134 4.45902C4.47134 4.68725 4.4753 4.9134 4.48321 5.13749C4.49125 5.36105 4.49127 5.58262 4.48324 5.80219C4.47914 6.01973 4.46082 6.2333 4.42826 6.44285C4.39513 6.65175 4.33913 6.85263 4.26039 7.04464C4.18091 7.23843 4.07258 7.42254 3.93616 7.59702C3.82345 7.74119 3.68538 7.87538 3.52283 8C3.68538 8.12462 3.82345 8.25881 3.93616 8.40298C4.07258 8.57746 4.18091 8.76157 4.26039 8.95536C4.33921 9.14757 4.39513 9.35024 4.42823 9.56312C4.46084 9.76883 4.47914 9.98246 4.48324 10.2039C4.49127 10.4195 4.49125 10.6411 4.48321 10.8686C4.4753 11.0885 4.47134 11.3127 4.47134 11.541C4.47134 11.744 4.50838 11.9346 4.58223 12.1137C4.66104 12.2911 4.76386 12.4469 4.89086 12.5818C5.02194 12.7126 5.17396 12.8191 5.34763 12.9008C5.52346 12.9777 5.71095 13.0164 5.91083 13.0164H6V13.2V14H5.91083C5.59743 14 5.29407 13.9384 5.00128 13.8153C4.70818 13.692 4.44942 13.5153 4.22578 13.285C4.00311 13.0558 3.83793 12.805 3.73283 12.5323L3.73232 12.531C3.63387 12.265 3.56819 11.9903 3.53535 11.7072L3.53516 11.7055C3.50677 11.4215 3.4987 11.1316 3.51084 10.8357C3.52272 10.5462 3.52866 10.2567 3.52866 9.96721C3.52866 9.76883 3.48986 9.58047 3.41201 9.40108L3.41129 9.39942C3.33659 9.21871 3.23428 9.0637 3.10412 8.93352L3.10221 8.93161C2.97577 8.79762 2.82457 8.69157 2.64742 8.61396L2.64601 8.61334C2.47001 8.53238 2.28465 8.4918 2.08917 8.4918H2V8.4V7.6V7.5082H2.08917C2.28497 7.5082 2.4706 7.46954 2.64672 7.3925C2.82466 7.31055 2.97644 7.20405 3.10317 7.07359C3.23423 6.93866 3.33687 6.78296 3.4116 6.60601L3.412 6.60507C3.48974 6.42594 3.52866 6.23556 3.52866 6.03279C3.52866 5.74329 3.52272 5.45379 3.51084 5.16428C3.4987 4.86844 3.50678 4.5805 3.53519 4.30053L3.53533 4.29917C3.56814 4.01201 3.63382 3.7352 3.73233 3.46898L3.73282 3.46766C3.83792 3.19498 4.00311 2.94422 4.22578 2.71498C4.44942 2.48474 4.70818 2.30798 5.00128 2.18473C5.29407 2.06161 5.59743 2 5.91083 2H6V2.97184ZM13.9232 8.4918H14V8.4V7.6V7.5082H13.9108C13.7153 7.5082 13.53 7.46762 13.354 7.38666L13.3526 7.38604C13.1754 7.30844 13.0242 7.20238 12.8978 7.06839L12.8959 7.06648C12.7657 6.9363 12.6634 6.78129 12.5887 6.60058L12.588 6.59892C12.5101 6.41953 12.4713 6.23117 12.4713 6.03279C12.4713 5.74329 12.4773 5.45379 12.4892 5.16428C12.5013 4.86842 12.4932 4.57848 12.4648 4.29454L12.4646 4.29285C12.4318 4.00971 12.3661 3.73502 12.2677 3.46897L12.2672 3.46766C12.1621 3.19499 11.9969 2.94422 11.7742 2.71498C11.5506 2.48474 11.2918 2.30798 10.9987 2.18473C10.7059 2.06161 10.4026 2 10.0892 2H10V2.8V2.98361H10.0892C10.2891 2.98361 10.4765 3.0223 10.6524 3.09917C10.826 3.18092 10.9781 3.28736 11.1091 3.41823C11.2361 3.55305 11.339 3.70889 11.4178 3.88628C11.4916 4.0654 11.5287 4.25596 11.5287 4.45902C11.5287 4.68727 11.5247 4.91145 11.5168 5.13142C11.5088 5.35894 11.5087 5.58049 11.5168 5.79605C11.5209 6.01754 11.5392 6.23117 11.5718 6.43688C11.6049 6.64976 11.6608 6.85243 11.7396 7.04464C11.8191 7.23843 11.9274 7.42254 12.0638 7.59702C12.1765 7.74119 12.3146 7.87538 12.4772 8L12.4456 8.02455C12.9764 8.08338 13.4758 8.24605 13.9232 8.4918Z"},child:[]},{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M10.3333 9.50559C10.8266 9.17595 11.4067 9 12 9C12.7954 9.00098 13.5578 9.31736 14.1202 9.87976C14.6826 10.4422 14.999 11.2047 15 12C15 12.5933 14.8241 13.1734 14.4944 13.6667C14.1648 14.1601 13.6962 14.5446 13.1481 14.7716C12.5999 14.9987 11.9967 15.0581 11.4147 14.9424C10.8328 14.8266 10.2982 14.5409 9.87868 14.1213C9.45912 13.7018 9.1734 13.1672 9.05765 12.5853C8.94189 12.0033 9.0013 11.4001 9.22836 10.8519C9.45543 10.3038 9.83994 9.83524 10.3333 9.50559ZM13.1464 10.1464L12 11.2929L10.8536 10.1464L10.1465 10.8535L11.2929 12L10.1464 13.1464L10.8536 13.8536L12 12.7071L13.1465 13.8535L13.8536 13.1464L12.7071 12L13.8536 10.8536L13.1464 10.1464Z"},child:[]}]})(r)}function LDe(r){return rt({attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M6 2.984V2h-.09c-.313 0-.616.062-.909.185a2.33 2.33 0 0 0-.775.53 2.23 2.23 0 0 0-.493.753v.001a3.542 3.542 0 0 0-.198.83v.002a6.08 6.08 0 0 0-.024.863c.012.29.018.58.018.869 0 .203-.04.393-.117.572v.001a1.504 1.504 0 0 1-.765.787 1.376 1.376 0 0 1-.558.115H2v.984h.09c.195 0 .38.04.556.121l.001.001c.178.078.329.184.455.318l.002.002c.13.13.233.285.307.465l.001.002c.078.18.117.368.117.566 0 .29-.006.58-.018.869-.012.296-.004.585.024.87v.001c.033.283.099.558.197.824v.001c.106.273.271.524.494.753.223.23.482.407.775.53.293.123.596.185.91.185H6v-.984h-.09c-.2 0-.387-.038-.563-.115a1.613 1.613 0 0 1-.457-.32 1.659 1.659 0 0 1-.309-.467c-.074-.18-.11-.37-.11-.573 0-.228.003-.453.011-.672.008-.228.008-.45 0-.665a4.639 4.639 0 0 0-.055-.64 2.682 2.682 0 0 0-.168-.609A2.284 2.284 0 0 0 3.522 8a2.284 2.284 0 0 0 .738-.955c.08-.192.135-.393.168-.602.033-.21.051-.423.055-.64.008-.22.008-.442 0-.666-.008-.224-.012-.45-.012-.678a1.47 1.47 0 0 1 .877-1.354 1.33 1.33 0 0 1 .563-.121H6zm4 10.032V14h.09c.313 0 .616-.062.909-.185.293-.123.552-.3.775-.53.223-.23.388-.48.493-.753v-.001c.1-.266.165-.543.198-.83v-.002c.028-.28.036-.567.024-.863-.012-.29-.018-.58-.018-.869 0-.203.04-.393.117-.572v-.001a1.502 1.502 0 0 1 .765-.787 1.38 1.38 0 0 1 .558-.115H14v-.984h-.09c-.196 0-.381-.04-.557-.121l-.001-.001a1.376 1.376 0 0 1-.455-.318l-.002-.002a1.415 1.415 0 0 1-.307-.465v-.002a1.405 1.405 0 0 1-.118-.566c0-.29.006-.58.018-.869a6.174 6.174 0 0 0-.024-.87v-.001a3.537 3.537 0 0 0-.197-.824v-.001a2.23 2.23 0 0 0-.494-.753 2.331 2.331 0 0 0-.775-.53 2.325 2.325 0 0 0-.91-.185H10v.984h.09c.2 0 .387.038.562.115.174.082.326.188.457.32.127.134.23.29.309.467.074.18.11.37.11.573 0 .228-.003.452-.011.672-.008.228-.008.45 0 .665.004.222.022.435.055.64.033.214.089.416.168.609a2.285 2.285 0 0 0 .738.955 2.285 2.285 0 0 0-.738.955 2.689 2.689 0 0 0-.168.602c-.033.21-.051.423-.055.64a9.15 9.15 0 0 0 0 .666c.008.224.012.45.012.678a1.471 1.471 0 0 1-.877 1.354 1.33 1.33 0 0 1-.563.121H10z"},child:[]}]})(r)}var nb={exports:{}};/** @license
|
|
281
|
+
`,PS=16,bDe=({reverseOrder:r,position:e="top-center",toastOptions:t,gutter:n,children:a,containerStyle:i,containerClassName:o})=>{let{toasts:s,handlers:l}=QMe(t);return D.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:PS,left:PS,right:PS,bottom:PS,pointerEvents:"none",...i},className:o,onMouseEnter:l.startPause,onMouseLeave:l.endPause},s.map(u=>{let c=u.position||e,d=l.calculateOffset(u,{reverseOrder:r,gutter:n,defaultPosition:e}),f=mDe(c,d);return D.createElement(gDe,{id:u.id,key:u.id,onHeightUpdate:l.updateHeight,className:u.visible?yDe:"",style:f},u.type==="custom"?hT(u.message,u):a?a(u):D.createElement(vDe,{toast:u,position:c}))}))},Da=Ur,[xDe,_3]=nh({name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap all popover components within `<Modal />`"}),Hae=Ht((r,e)=>{const{as:t,children:n,className:a,...i}=r,{slots:o,classNames:s,bodyId:l,setBodyMounted:u}=_3(),c=$r(e),d=t||"div";return D.useEffect(()=>(u(!0),()=>u(!1)),[u]),_.jsx(d,{ref:c,className:o.body({class:lt(s==null?void 0:s.body,a)}),id:l,...i,children:n})});Hae.displayName="HeroUI.ModalBody";var kc=Hae,wDe={enter:{scale:"var(--scale-enter)",y:"var(--slide-enter)",opacity:1,willChange:"auto",transition:{scale:{duration:.4,ease:Ib.ease},opacity:{duration:.4,ease:Ib.ease},y:{type:"spring",bounce:0,duration:.6}}},exit:{scale:"var(--scale-exit)",y:"var(--slide-exit)",opacity:0,willChange:"transform",transition:{duration:.3,ease:Ib.ease}}},hH=r=>_.jsxs("svg",{"aria-hidden":"true",fill:"none",focusable:"false",height:"1em",role:"presentation",shapeRendering:"geometricPrecision",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",viewBox:"0 0 24 24",width:"1em",...r,children:[_.jsx("path",{d:"M13 17l5-5-5-5"}),_.jsx("path",{d:"M6 17l5-5-5-5"})]}),Cm=r=>_.jsx("svg",{"aria-hidden":"true",fill:"none",focusable:"false",height:"1em",role:"presentation",viewBox:"0 0 24 24",width:"1em",...r,children:_.jsx("path",{d:"M15.5 19l-7-7 7-7",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})}),SDe=r=>_.jsx("svg",{"aria-hidden":"true",focusable:"false",height:"1em",role:"presentation",viewBox:"0 0 24 24",width:"1em",...r,children:_.jsx("path",{d:"M12 2a10 10 0 1010 10A10.016 10.016 0 0012 2zm3.36 12.3a.754.754 0 010 1.06.748.748 0 01-1.06 0l-2.3-2.3-2.3 2.3a.748.748 0 01-1.06 0 .754.754 0 010-1.06l2.3-2.3-2.3-2.3A.75.75 0 019.7 8.64l2.3 2.3 2.3-2.3a.75.75 0 011.06 1.06l-2.3 2.3z",fill:"currentColor"})}),_De=r=>{const{isSelected:e,isIndeterminate:t,disableAnimation:n,...a}=r;return _.jsx("svg",{"aria-hidden":"true",fill:"none",focusable:"false",height:"1em",role:"presentation",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",width:"1em",...a,children:_.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})},pH=r=>_.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"1em",shapeRendering:"geometricPrecision",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",viewBox:"0 0 24 24",width:"1em",...r,children:[_.jsx("circle",{cx:"12",cy:"12",fill:"currentColor",r:"1"}),_.jsx("circle",{cx:"19",cy:"12",fill:"currentColor",r:"1"}),_.jsx("circle",{cx:"5",cy:"12",fill:"currentColor",r:"1"})]}),CDe=({strokeWidth:r=1.5,...e})=>_.jsx("svg",{"aria-hidden":"true",fill:"none",focusable:"false",height:"1em",role:"presentation",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:r,viewBox:"0 0 24 24",width:"1em",...e,children:_.jsx("path",{d:"m6 9 6 6 6-6"})});function C3(r,e){let{role:t="dialog"}=r,n=Ef();n=r["aria-label"]?void 0:n;let a=D.useRef(!1);return D.useEffect(()=>{if(e.current&&!e.current.contains(document.activeElement)){nv(e.current);let i=setTimeout(()=>{document.activeElement===e.current&&(a.current=!0,e.current&&(e.current.blur(),nv(e.current)),a.current=!1)},500);return()=>{clearTimeout(i)}}},[e]),Ure(),{dialogProps:{...hi(r,{labelable:!0}),role:t,tabIndex:-1,"aria-labelledby":r["aria-labelledby"]||n,onBlur:i=>{a.current&&i.stopPropagation()}},titleProps:{id:n}}}var vH=()=>Jc(()=>import("./index-Dm_gigSn.js"),[]).then(r=>r.default),Uae=r=>{const{as:e,children:t,role:n="dialog",...a}=r,{Component:i,domRef:o,slots:s,classNames:l,motionProps:u,backdrop:c,closeButton:d,hideCloseButton:f,disableAnimation:h,getDialogProps:v,getBackdropProps:m,getCloseButtonProps:y,onClose:b}=_3(),w=e||i||"div",S=X_e(),{dialogProps:T}=C3({role:n},o),A=D.isValidElement(d)?D.cloneElement(d,y()):_.jsx("button",{...y(),children:_.jsx(_De,{})}),M=D.useCallback(O=>{O.key==="Tab"&&O.nativeEvent.isComposing&&(O.stopPropagation(),O.preventDefault())},[]),P=v(ze(T,a)),E=_.jsxs(w,{...P,onKeyDown:Un(P.onKeyDown,M),children:[_.jsx($f,{onDismiss:b}),!f&&A,typeof t=="function"?t(b):t,_.jsx($f,{onDismiss:b})]}),R=D.useMemo(()=>c==="transparent"?null:h?_.jsx("div",{...m()}):_.jsx(Mi,{features:vH,children:_.jsx(Di.div,{animate:"enter",exit:"exit",initial:"exit",variants:jf.fade,...m()})}),[c,h,m]),N={"--visual-viewport-height":S.height+"px"},k=h?_.jsx("div",{className:s.wrapper({class:l==null?void 0:l.wrapper}),"data-slot":"wrapper",style:N,children:E}):_.jsx(Mi,{features:vH,children:_.jsx(Di.div,{animate:"enter",className:s.wrapper({class:l==null?void 0:l.wrapper}),"data-slot":"wrapper",exit:"exit",initial:"exit",variants:wDe,...u,style:N,children:E})});return _.jsxs("div",{tabIndex:-1,children:[R,k]})};Uae.displayName="HeroUI.ModalContent";var Rc=Uae,Gae=Ht((r,e)=>{const{as:t,children:n,className:a,...i}=r,{slots:o,classNames:s}=_3(),l=$r(e),u=t||"footer";return _.jsx(u,{ref:l,className:o.footer({class:lt(s==null?void 0:s.footer,a)}),...i,children:n})});Gae.displayName="HeroUI.ModalFooter";var $0=Gae,qae=Ht((r,e)=>{const{as:t,children:n,className:a,...i}=r,{slots:o,classNames:s,headerId:l,setHeaderMounted:u}=_3(),c=$r(e),d=t||"header";return D.useEffect(()=>(u(!0),()=>u(!1)),[u]),_.jsx(d,{ref:c,className:o.header({class:lt(s==null?void 0:s.header,a)}),id:l,...i,children:n})});qae.displayName="HeroUI.ModalHeader";var Nc=qae;function TDe(r={shouldBlockScroll:!0},e,t){let{overlayProps:n,underlayProps:a}=E2({...r,isOpen:e.isOpen,onClose:e.close},t);return R8({isDisabled:!e.isOpen||!r.shouldBlockScroll}),Ure(),D.useEffect(()=>{if(e.isOpen&&t.current)return N8([t.current])},[e.isOpen,t]),{modalProps:ze(n),underlayProps:a}}function rN(r){let[e,t]=bl(r.isOpen,r.defaultOpen||!1,r.onOpenChange);const n=D.useCallback(()=>{t(!0)},[t]),a=D.useCallback(()=>{t(!1)},[t]),i=D.useCallback(()=>{t(!e)},[t,e]);return{isOpen:e,setOpen:t,open:n,close:a,toggle:i}}function ADe(r){var e,t,n;const a=Vr(),[i,o]=oa(r,lF.variantKeys),{ref:s,as:l,className:u,classNames:c,isOpen:d,defaultOpen:f,onOpenChange:h,motionProps:v,closeButton:m,isDismissable:y=!0,hideCloseButton:b=!1,shouldBlockScroll:w=!0,portalContainer:S,isKeyboardDismissDisabled:T=!1,onClose:A,...M}=i,P=l||"section",E=$r(s),R=D.useRef(null),[N,k]=D.useState(!1),[O,L]=D.useState(!1),$=(t=(e=r.disableAnimation)!=null?e:a==null?void 0:a.disableAnimation)!=null?t:!1,j=D.useId(),B=D.useId(),H=D.useId(),F=rN({isOpen:d,defaultOpen:f,onOpenChange:se=>{h==null||h(se),se||A==null||A()}}),{modalProps:K,underlayProps:U}=TDe({isDismissable:y,shouldBlockScroll:w,isKeyboardDismissDisabled:T},F,E),{buttonProps:V}=M2({onPress:F.close},R),{isFocusVisible:Q,focusProps:Z}=Rn(),Y=lt(c==null?void 0:c.base,u),X=D.useMemo(()=>lF({...o,disableAnimation:$}),[eo(o),$]),re=(se={},le=null)=>{var fe;return{ref:C2(le,E),...ze(K,M,se),className:X.base({class:lt(Y,se.className)}),id:j,"data-open":je(F.isOpen),"data-dismissable":je(y),"aria-modal":je(!0),"data-placement":(fe=r==null?void 0:r.placement)!=null?fe:"right","aria-labelledby":N?B:void 0,"aria-describedby":O?H:void 0}},oe=D.useCallback((se={})=>({className:X.backdrop({class:c==null?void 0:c.backdrop}),onClick:()=>F.close(),...U,...se}),[X,c,U]),ae=()=>({role:"button",tabIndex:0,"aria-label":"Close","data-focus-visible":je(Q),className:X.closeButton({class:c==null?void 0:c.closeButton}),...ze(V,Z)});return{Component:P,slots:X,domRef:E,headerId:B,bodyId:H,motionProps:v,classNames:c,isDismissable:y,closeButton:m,hideCloseButton:b,portalContainer:S,shouldBlockScroll:w,backdrop:(n=r.backdrop)!=null?n:"opaque",isOpen:F.isOpen,onClose:F.close,disableAnimation:$,setBodyMounted:L,setHeaderMounted:k,getDialogProps:re,getBackdropProps:oe,getCloseButtonProps:ae}}var Qae=Ht((r,e)=>{const{children:t,...n}=r,a=ADe({...n,ref:e}),i=_.jsx(l3,{portalContainer:a.portalContainer,children:t});return _.jsx(xDe,{value:a,children:a.disableAnimation&&a.isOpen?i:_.jsx(fl,{children:a.isOpen?i:null})})});Qae.displayName="HeroUI.Modal";var Oc=Qae;function XI(r,e=[]){const t=D.useRef(r);return O0(()=>{t.current=r}),D.useCallback((...n)=>{var a;return(a=t.current)==null?void 0:a.call(t,...n)},e)}function EDe(r={}){const{id:e,defaultOpen:t,isOpen:n,onClose:a,onOpen:i,onChange:o=()=>{}}=r,s=XI(i),l=XI(a),[u,c]=bl(n,t||!1,o),d=D.useId(),f=e||d,h=n!==void 0,v=D.useCallback(()=>{h||c(!1),l==null||l()},[h,l]),m=D.useCallback(()=>{h||c(!0),s==null||s()},[h,s]),y=D.useCallback(()=>{(u?v:m)()},[u,m,v]);return{isOpen:!!u,onOpen:m,onClose:v,onOpenChange:y,isControlled:h,getButtonProps:(b={})=>({...b,"aria-expanded":u,"aria-controls":f,onClick:Un(b.onClick,y)}),getDisclosureProps:(b={})=>({...b,hidden:!u,id:f})}}const Wae=Be.memo(r=>{const{backdrop:e="blur",title:t,content:n,size:a="md",showCancel:i=!0,dismissible:o,onClose:s,onConfirm:l,onCancel:u}=r,{onClose:c}=EDe();return _.jsx(Oc,{defaultOpen:!0,backdrop:e,isDismissable:o,onClose:()=>{s==null||s(),c()},size:a,classNames:{backdrop:"z-[99999999]",wrapper:"z-[999999999]"},children:_.jsx(Rc,{children:d=>_.jsxs(_.Fragment,{children:[t&&_.jsx(Nc,{className:"flex flex-col gap-1",children:t}),_.jsx(kc,{children:n}),_.jsxs($0,{children:[i&&_.jsx(Ze,{color:"danger",variant:"light",onPress:()=>{u==null||u(),d()},children:"取消"}),_.jsx(Ze,{color:"primary",onPress:()=>{l==null||l(),d()},children:"确定"})]})]})})})});Wae.displayName="Modal";const Kae=Be.createContext({alert:()=>{},confirm:()=>{}}),MDe=({children:r})=>{const[e,t]=Be.useState([]),n=i=>{const{title:o,content:s,dismissible:l,onConfirm:u,size:c="md"}=i;t(d=>{var h;const f=((h=d[d.length-1])==null?void 0:h.id)+1||0;return[...d,{id:f,content:s,size:c,title:o,backdrop:"blur",showCancel:!1,dismissible:l,onConfirm:()=>{u==null||u(),setTimeout(()=>{t(v=>v.filter(m=>m.id!==f))},300)}}]})},a=i=>{const{title:o,content:s,dismissible:l,onConfirm:u,onCancel:c,size:d="md"}=i;t(f=>{var v;const h=((v=f[f.length-1])==null?void 0:v.id)+1||0;return[...f,{id:h,content:s,size:d,title:o,backdrop:"blur",showCancel:!0,dismissible:l,onConfirm:()=>{u==null||u(),setTimeout(()=>{t(m=>m.filter(y=>y.id!==h))},300)},onCancel:()=>{c==null||c(),setTimeout(()=>{t(m=>m.filter(y=>y.id!==h))},300)}}]})};return _.jsxs(Kae.Provider,{value:{alert:n,confirm:a},children:[r,e==null?void 0:e.map(({id:i,...o})=>_.jsx(Wae,{...o},i))]})},Yae=()=>Be.useContext(Kae);function DDe(r){return rt({attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M6 2.97184V2.98361H5.91083C5.71113 2.98361 5.5238 3.02427 5.34802 3.10513C5.17461 3.18275 5.02193 3.28942 4.89086 3.42437C4.76421 3.55475 4.66135 3.71034 4.58238 3.89205C4.50833 4.07152 4.47134 4.26019 4.47134 4.45902C4.47134 4.68725 4.4753 4.9134 4.48321 5.13749C4.49125 5.36105 4.49127 5.58262 4.48324 5.80219C4.47914 6.01973 4.46082 6.2333 4.42826 6.44285C4.39513 6.65175 4.33913 6.85263 4.26039 7.04464C4.18091 7.23843 4.07258 7.42254 3.93616 7.59702C3.82345 7.74119 3.68538 7.87538 3.52283 8C3.68538 8.12462 3.82345 8.25881 3.93616 8.40298C4.07258 8.57746 4.18091 8.76157 4.26039 8.95536C4.33921 9.14757 4.39513 9.35024 4.42823 9.56312C4.46084 9.76883 4.47914 9.98246 4.48324 10.2039C4.49127 10.4195 4.49125 10.6411 4.48321 10.8686C4.4753 11.0885 4.47134 11.3127 4.47134 11.541C4.47134 11.744 4.50838 11.9346 4.58223 12.1137C4.66104 12.2911 4.76386 12.4469 4.89086 12.5818C5.02194 12.7126 5.17396 12.8191 5.34763 12.9008C5.52346 12.9777 5.71095 13.0164 5.91083 13.0164H6V13.2V14H5.91083C5.59743 14 5.29407 13.9384 5.00128 13.8153C4.70818 13.692 4.44942 13.5153 4.22578 13.285C4.00311 13.0558 3.83793 12.805 3.73283 12.5323L3.73232 12.531C3.63387 12.265 3.56819 11.9903 3.53535 11.7072L3.53516 11.7055C3.50677 11.4215 3.4987 11.1316 3.51084 10.8357C3.52272 10.5462 3.52866 10.2567 3.52866 9.96721C3.52866 9.76883 3.48986 9.58047 3.41201 9.40108L3.41129 9.39942C3.33659 9.21871 3.23428 9.0637 3.10412 8.93352L3.10221 8.93161C2.97577 8.79762 2.82457 8.69157 2.64742 8.61396L2.64601 8.61334C2.47001 8.53238 2.28465 8.4918 2.08917 8.4918H2V8.4V7.6V7.5082H2.08917C2.28497 7.5082 2.4706 7.46954 2.64672 7.3925C2.82466 7.31055 2.97644 7.20405 3.10317 7.07359C3.23423 6.93866 3.33687 6.78296 3.4116 6.60601L3.412 6.60507C3.48974 6.42594 3.52866 6.23556 3.52866 6.03279C3.52866 5.74329 3.52272 5.45379 3.51084 5.16428C3.4987 4.86844 3.50678 4.5805 3.53519 4.30053L3.53533 4.29917C3.56814 4.01201 3.63382 3.7352 3.73233 3.46898L3.73282 3.46766C3.83792 3.19498 4.00311 2.94422 4.22578 2.71498C4.44942 2.48474 4.70818 2.30798 5.00128 2.18473C5.29407 2.06161 5.59743 2 5.91083 2H6V2.97184ZM13.9232 8.4918H14V8.4V7.6V7.5082H13.9108C13.7153 7.5082 13.53 7.46762 13.354 7.38666L13.3526 7.38604C13.1754 7.30844 13.0242 7.20238 12.8978 7.06839L12.8959 7.06648C12.7657 6.9363 12.6634 6.78129 12.5887 6.60058L12.588 6.59892C12.5101 6.41953 12.4713 6.23117 12.4713 6.03279C12.4713 5.74329 12.4773 5.45379 12.4892 5.16428C12.5013 4.86842 12.4932 4.57848 12.4648 4.29454L12.4646 4.29285C12.4318 4.00971 12.3661 3.73502 12.2677 3.46897L12.2672 3.46766C12.1621 3.19499 11.9969 2.94422 11.7742 2.71498C11.5506 2.48474 11.2918 2.30798 10.9987 2.18473C10.7059 2.06161 10.4026 2 10.0892 2H10V2.8V2.98361H10.0892C10.2891 2.98361 10.4765 3.0223 10.6524 3.09917C10.826 3.18092 10.9781 3.28736 11.1091 3.41823C11.2361 3.55305 11.339 3.70889 11.4178 3.88628C11.4916 4.0654 11.5287 4.25596 11.5287 4.45902C11.5287 4.68727 11.5247 4.91145 11.5168 5.13142C11.5088 5.35894 11.5087 5.58049 11.5168 5.79605C11.5209 6.01754 11.5392 6.23117 11.5718 6.43688C11.6049 6.64976 11.6608 6.85243 11.7396 7.04464C11.8191 7.23843 11.9274 7.42254 12.0638 7.59702C12.1765 7.74119 12.3146 7.87538 12.4772 8L12.4456 8.02455C12.9764 8.08338 13.4758 8.24605 13.9232 8.4918Z"},child:[]},{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M10.3333 9.50559C10.8266 9.17595 11.4067 9 12 9C12.7954 9.00098 13.5578 9.31736 14.1202 9.87976C14.6826 10.4422 14.999 11.2047 15 12C15 12.5933 14.8241 13.1734 14.4944 13.6667C14.1648 14.1601 13.6962 14.5446 13.1481 14.7716C12.5999 14.9987 11.9967 15.0581 11.4147 14.9424C10.8328 14.8266 10.2982 14.5409 9.87868 14.1213C9.45912 13.7018 9.1734 13.1672 9.05765 12.5853C8.94189 12.0033 9.0013 11.4001 9.22836 10.8519C9.45543 10.3038 9.83994 9.83524 10.3333 9.50559ZM13.1464 10.1464L12 11.2929L10.8536 10.1464L10.1465 10.8535L11.2929 12L10.1464 13.1464L10.8536 13.8536L12 12.7071L13.1465 13.8535L13.8536 13.1464L12.7071 12L13.8536 10.8536L13.1464 10.1464Z"},child:[]}]})(r)}function LDe(r){return rt({attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M6 2.984V2h-.09c-.313 0-.616.062-.909.185a2.33 2.33 0 0 0-.775.53 2.23 2.23 0 0 0-.493.753v.001a3.542 3.542 0 0 0-.198.83v.002a6.08 6.08 0 0 0-.024.863c.012.29.018.58.018.869 0 .203-.04.393-.117.572v.001a1.504 1.504 0 0 1-.765.787 1.376 1.376 0 0 1-.558.115H2v.984h.09c.195 0 .38.04.556.121l.001.001c.178.078.329.184.455.318l.002.002c.13.13.233.285.307.465l.001.002c.078.18.117.368.117.566 0 .29-.006.58-.018.869-.012.296-.004.585.024.87v.001c.033.283.099.558.197.824v.001c.106.273.271.524.494.753.223.23.482.407.775.53.293.123.596.185.91.185H6v-.984h-.09c-.2 0-.387-.038-.563-.115a1.613 1.613 0 0 1-.457-.32 1.659 1.659 0 0 1-.309-.467c-.074-.18-.11-.37-.11-.573 0-.228.003-.453.011-.672.008-.228.008-.45 0-.665a4.639 4.639 0 0 0-.055-.64 2.682 2.682 0 0 0-.168-.609A2.284 2.284 0 0 0 3.522 8a2.284 2.284 0 0 0 .738-.955c.08-.192.135-.393.168-.602.033-.21.051-.423.055-.64.008-.22.008-.442 0-.666-.008-.224-.012-.45-.012-.678a1.47 1.47 0 0 1 .877-1.354 1.33 1.33 0 0 1 .563-.121H6zm4 10.032V14h.09c.313 0 .616-.062.909-.185.293-.123.552-.3.775-.53.223-.23.388-.48.493-.753v-.001c.1-.266.165-.543.198-.83v-.002c.028-.28.036-.567.024-.863-.012-.29-.018-.58-.018-.869 0-.203.04-.393.117-.572v-.001a1.502 1.502 0 0 1 .765-.787 1.38 1.38 0 0 1 .558-.115H14v-.984h-.09c-.196 0-.381-.04-.557-.121l-.001-.001a1.376 1.376 0 0 1-.455-.318l-.002-.002a1.415 1.415 0 0 1-.307-.465v-.002a1.405 1.405 0 0 1-.118-.566c0-.29.006-.58.018-.869a6.174 6.174 0 0 0-.024-.87v-.001a3.537 3.537 0 0 0-.197-.824v-.001a2.23 2.23 0 0 0-.494-.753 2.331 2.331 0 0 0-.775-.53 2.325 2.325 0 0 0-.91-.185H10v.984h.09c.2 0 .387.038.562.115.174.082.326.188.457.32.127.134.23.29.309.467.074.18.11.37.11.573 0 .228-.003.452-.011.672-.008.228-.008.45 0 .665.004.222.022.435.055.64.033.214.089.416.168.609a2.285 2.285 0 0 0 .738.955 2.285 2.285 0 0 0-.738.955 2.689 2.689 0 0 0-.168.602c-.033.21-.051.423-.055.64a9.15 9.15 0 0 0 0 .666c.008.224.012.45.012.678a1.471 1.471 0 0 1-.877 1.354 1.33 1.33 0 0 1-.563.121H10z"},child:[]}]})(r)}var nb={exports:{}};/** @license
|
|
282
282
|
* eventsource.js
|
|
283
283
|
* Available under MIT License (MIT)
|
|
284
284
|
* https://github.com/Yaffle/EventSource/
|
|
@@ -346,7 +346,7 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
346
346
|
`||a==="")){var i=r.isSelected(a);Ke(t,a)?t[a]=t[a]&&i:t[a]=i}}),t}function YGe(r){r.registerAction("legendToggleSelect","legendselectchanged",wt(z1,"toggleSelected")),r.registerAction("legendAllSelect","legendselectall",wt(z1,"allSelect")),r.registerAction("legendInverseSelect","legendinverseselect",wt(z1,"inverseSelect")),r.registerAction("legendSelect","legendselected",wt(z1,"select")),r.registerAction("legendUnSelect","legendunselected",wt(z1,"unSelect"))}function gde(r){r.registerComponentModel(Nk),r.registerComponentView(pde),r.registerProcessor(r.PRIORITY.PROCESSOR.SERIES_FILTER,KGe),r.registerSubTypeDefaulter("legend",function(){return"plain"}),YGe(r)}var ZGe=function(r){he(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.setScrollDataIndex=function(t){this.option.scrollDataIndex=t},e.prototype.init=function(t,n,a){var i=Q0(t);r.prototype.init.call(this,t,n,a),NK(this,t,i)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.call(this,t,n),NK(this,this.option,t)},e.type="legend.scroll",e.defaultOption=oh(Nk.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),e}(Nk);function NK(r,e,t){var n=r.getOrient(),a=[1,1];a[n.index]=0,Uf(e,t,{type:"box",ignoreSize:!!a})}var OK=ft,YL=["width","height"],ZL=["x","y"],XGe=function(r){he(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!0,t._currentIndex=0,t}return e.prototype.init=function(){r.prototype.init.call(this),this.group.add(this._containerGroup=new OK),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new OK)},e.prototype.resetInner=function(){r.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},e.prototype.renderInner=function(t,n,a,i,o,s,l){var u=this;r.prototype.renderInner.call(this,t,n,a,i,o,s,l);var c=this._controllerGroup,d=n.get("pageIconSize",!0),f=Me(d)?d:[d,d];v("pagePrev",0);var h=n.getModel("pageTextStyle");c.add(new Xt({name:"pageText",style:{text:"xx/xx",fill:h.getTextColor(),font:h.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),v("pageNext",1);function v(m,y){var b=m+"DataIndex",w=B2(n.get("pageIcons",!0)[n.getOrient().name][y],{onclick:Qe(u._pageGo,u,b,n,i)},{x:-f[0]/2,y:-f[1]/2,width:f[0],height:f[1]});w.name=m,c.add(w)}},e.prototype.layoutInner=function(t,n,a,i,o,s){var l=this.getSelectorGroup(),u=t.getOrient().index,c=YL[u],d=ZL[u],f=YL[1-u],h=ZL[1-u];o&&Gp("horizontal",l,t.get("selectorItemGap",!0));var v=t.get("selectorButtonGap",!0),m=l.getBoundingRect(),y=[-m.x,-m.y],b=ut(a);o&&(b[c]=a[c]-m[c]-v);var w=this._layoutContentAndController(t,i,b,u,c,f,h,d);if(o){if(s==="end")y[u]+=w[c]+v;else{var S=m[c]+v;y[u]-=S,w[d]-=S}w[c]+=m[c]+v,y[1-u]+=w[h]+w[f]/2-m[f]/2,w[f]=Math.max(w[f],m[f]),w[h]=Math.min(w[h],m[h]+y[1-u]),l.x=y[0],l.y=y[1],l.markRedraw()}return w},e.prototype._layoutContentAndController=function(t,n,a,i,o,s,l,u){var c=this.getContentGroup(),d=this._containerGroup,f=this._controllerGroup;Gp(t.get("orient"),c,t.get("itemGap"),i?a.width:null,i?null:a.height),Gp("horizontal",f,t.get("pageButtonItemGap",!0));var h=c.getBoundingRect(),v=f.getBoundingRect(),m=this._showController=h[o]>a[o],y=[-h.x,-h.y];n||(y[i]=c[u]);var b=[0,0],w=[-v.x,-v.y],S=bt(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(m){var T=t.get("pageButtonPosition",!0);T==="end"?w[i]+=a[o]-v[o]:b[i]+=v[o]+S}w[1-i]+=h[s]/2-v[s]/2,c.setPosition(y),d.setPosition(b),f.setPosition(w);var A={x:0,y:0};if(A[o]=m?a[o]:h[o],A[s]=Math.max(h[s],v[s]),A[l]=Math.min(0,v[l]+w[1-i]),d.__rectSize=a[o],m){var M={x:0,y:0};M[o]=Math.max(a[o]-v[o]-S,0),M[s]=A[s],d.setClipPath(new qt({shape:M})),d.__rectSize=M[o]}else f.eachChild(function(E){E.attr({invisible:!0,silent:!0})});var P=this._getPageInfo(t);return P.pageIndex!=null&&ar(c,{x:P.contentPosition[0],y:P.contentPosition[1]},m?t:null),this._updatePageInfoView(t,P),A},e.prototype._pageGo=function(t,n,a){var i=this._getPageInfo(n)[t];i!=null&&a.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:n.id})},e.prototype._updatePageInfoView=function(t,n){var a=this._controllerGroup;q(["pagePrev","pageNext"],function(c){var d=c+"DataIndex",f=n[d]!=null,h=a.childOfName(c);h&&(h.setStyle("fill",f?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),h.cursor=f?"pointer":"default")});var i=a.childOfName("pageText"),o=t.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;i&&o&&i.setStyle("text",qe(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(t){var n=t.get("scrollDataIndex",!0),a=this.getContentGroup(),i=this._containerGroup.__rectSize,o=t.getOrient().index,s=YL[o],l=ZL[o],u=this._findTargetItemIndex(n),c=a.children(),d=c[u],f=c.length,h=f?1:0,v={contentPosition:[a.x,a.y],pageCount:h,pageIndex:h-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!d)return v;var m=T(d);v.contentPosition[o]=-m.s;for(var y=u+1,b=m,w=m,S=null;y<=f;++y)S=T(c[y]),(!S&&w.e>b.s+i||S&&!A(S,b.s))&&(w.i>b.i?b=w:b=S,b&&(v.pageNextDataIndex==null&&(v.pageNextDataIndex=b.i),++v.pageCount)),w=S;for(var y=u-1,b=m,w=m,S=null;y>=-1;--y)S=T(c[y]),(!S||!A(w,S.s))&&b.i<w.i&&(w=b,v.pagePrevDataIndex==null&&(v.pagePrevDataIndex=b.i),++v.pageCount,++v.pageIndex),b=S;return v;function T(M){if(M){var P=M.getBoundingRect(),E=P[l]+M[l];return{s:E,e:E+P[s],i:M.__legendDataIndex}}}function A(M,P){return M.e>=P&&M.s<=P+i}},e.prototype._findTargetItemIndex=function(t){if(!this._showController)return 0;var n,a=this.getContentGroup(),i;return a.eachChild(function(o,s){var l=o.__legendDataIndex;i==null&&l!=null&&(i=s),l===t&&(n=s)}),n??i},e.type="legend.scroll",e}(pde);function JGe(r){r.registerAction("legendScroll","legendscroll",function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(a){a.setScrollDataIndex(n)})})}function eqe(r){Rt(gde),r.registerComponentModel(ZGe),r.registerComponentView(XGe),JGe(r)}function tqe(r){Rt(gde),Rt(eqe)}var rqe=function(r){he(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.inside",e.defaultOption=oh(Hx.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(Hx),lO=Qt();function nqe(r,e,t){lO(r).coordSysRecordMap.each(function(n){var a=n.dataZoomInfoMap.get(e.uid);a&&(a.getRange=t)})}function aqe(r,e){for(var t=lO(r).coordSysRecordMap,n=t.keys(),a=0;a<n.length;a++){var i=n[a],o=t.get(i),s=o.dataZoomInfoMap;if(s){var l=e.uid,u=s.get(l);u&&(s.removeKey(l),s.keys().length||mde(t,o))}}}function mde(r,e){if(e){r.removeKey(e.model.uid);var t=e.controller;t&&t.dispose()}}function iqe(r,e){var t={model:e,containsPoint:wt(sqe,e),dispatchAction:wt(oqe,r),dataZoomInfoMap:null,controller:null},n=t.controller=new Z2(r.getZr());return q(["pan","zoom","scrollMove"],function(a){n.on(a,function(i){var o=[];t.dataZoomInfoMap.each(function(s){if(i.isAvailableBehavior(s.model.option)){var l=(s.getRange||{})[a],u=l&&l(s.dzReferCoordSysInfo,t.model.mainType,t.controller,i);!s.model.get("disabled",!0)&&u&&o.push({dataZoomId:s.model.id,start:u[0],end:u[1]})}}),o.length&&t.dispatchAction(o)})}),t}function oqe(r,e){r.isDisposed()||r.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function sqe(r,e,t,n){return r.coordinateSystem.containPoint([t,n])}function lqe(r){var e,t="type_",n={type_true:2,type_move:1,type_false:0,type_undefined:-1},a=!0;return r.each(function(i){var o=i.model,s=o.get("disabled",!0)?!1:o.get("zoomLock",!0)?"move":!0;n[t+s]>n[t+e]&&(e=s),a=a&&o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!a}}}function uqe(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(e,t){var n=lO(t),a=n.coordSysRecordMap||(n.coordSysRecordMap=Je());a.each(function(i){i.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(i){var o=Jce(i);q(o.infoList,function(s){var l=s.model.uid,u=a.get(l)||a.set(l,iqe(t,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=Je());c.set(i.uid,{dzReferCoordSysInfo:s,model:i,getRange:null})})}),a.each(function(i){var o=i.controller,s,l=i.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){mde(a,i);return}var c=lqe(l);o.enable(c.controlType,c.opt),o.setPointerChecker(i.containsPoint),Y0(i,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var cqe=function(r){he(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return e.prototype.render=function(t,n,a){if(r.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),nqe(a,t,{pan:Qe(XL.pan,this),zoom:Qe(XL.zoom,this),scrollMove:Qe(XL.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){aqe(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(J7),XL={zoom:function(r,e,t,n){var a=this.range,i=a.slice(),o=r.axisModels[0];if(o){var s=JL[e](null,[n.originX,n.originY],o,t,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(i[1]-i[0])+i[0],u=Math.max(1/n.scale,0);i[0]=(i[0]-l)*u+l,i[1]=(i[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(jv(0,i,[0,100],0,c.minSpan,c.maxSpan),this.range=i,a[0]!==i[0]||a[1]!==i[1])return i}},pan:$K(function(r,e,t,n,a,i){var o=JL[n]([i.oldX,i.oldY],[i.newX,i.newY],e,a,t);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:$K(function(r,e,t,n,a,i){var o=JL[n]([0,0],[i.scrollDelta,i.scrollDelta],e,a,t);return o.signal*(r[1]-r[0])*i.scrollDelta})};function $K(r){return function(e,t,n,a){var i=this.range,o=i.slice(),s=e.axisModels[0];if(s){var l=r(o,s,e,t,n,a);if(jv(l,o,[0,100],"all"),this.range=o,i[0]!==o[0]||i[1]!==o[1])return o}}}var JL={grid:function(r,e,t,n,a){var i=t.axis,o={},s=a.model.coordinateSystem.getRect();return r=r||[0,0],i.dim==="x"?(o.pixel=e[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=i.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=i.inverse?-1:1),o},polar:function(r,e,t,n,a){var i=t.axis,o={},s=a.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],e=s.pointToCoord(e),t.mainType==="radiusAxis"?(o.pixel=e[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=i.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=i.inverse?-1:1),o},singleAxis:function(r,e,t,n,a){var i=t.axis,o=a.model.coordinateSystem.getRect(),s={};return r=r||[0,0],i.orient==="horizontal"?(s.pixel=e[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=i.inverse?1:-1):(s.pixel=e[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=i.inverse?-1:1),s}};function yde(r){eO(r),r.registerComponentModel(rqe),r.registerComponentView(cqe),uqe(r)}var dqe=function(r){he(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=oh(Hx.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(Hx),j1=qt,zK=7,fqe=1,eP=30,hqe=7,B1="horizontal",jK="vertical",pqe=5,vqe=["line","bar","candlestick","scatter"],gqe={easing:"cubicOut",duration:100,delay:0},mqe=function(r){he(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._displayables={},t}return e.prototype.init=function(t,n){this.api=n,this._onBrush=Qe(this._onBrush,this),this._onBrushEnd=Qe(this._onBrushEnd,this)},e.prototype.render=function(t,n,a,i){if(r.prototype.render.apply(this,arguments),Y0(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),t.get("show")===!1){this.group.removeAll();return}if(t.noTarget()){this._clear(),this.group.removeAll();return}(!i||i.type!=="dataZoom"||i.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){Lx(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var n=this._displayables.sliderGroup=new ft;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(n),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,n=this.api,a=t.get("brushSelect"),i=a?hqe:0,o=this._findCoordRect(),s={width:n.getWidth(),height:n.getHeight()},l=this._orient===B1?{right:s.width-o.x-o.width,top:s.height-eP-zK-i,width:o.width,height:eP}:{right:zK,top:o.y,width:eP,height:o.height},u=Q0(t.option);q(["right","top","width","height"],function(d){u[d]==="ph"&&(u[d]=l[d])});var c=ia(u,s);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===jK&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,n=this._location,a=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),o=i&&i.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(a===B1&&!o?{scaleY:l?1:-1,scaleX:1}:a===B1&&o?{scaleY:l?1:-1,scaleX:-1}:a===jK&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=t.getBoundingRect([s]);t.x=n.x-u.x,t.y=n.y-u.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,n=this._size,a=this._displayables.sliderGroup,i=t.get("brushSelect");a.add(new j1({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new j1({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:Qe(this._onClickPanel,this)}),s=this.api.getZr();i?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),a.add(o)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!t)return;var n=this._size,a=this._shadowSize||[],i=t.series,o=i.getRawData(),s=i.getShadowDim&&i.getShadowDim(),l=s&&o.getDimensionInfo(s)?i.getShadowDim():t.otherDim;if(l==null)return;var u=this._shadowPolygonPts,c=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||n[0]!==a[0]||n[1]!==a[1]){var d=o.getDataExtent(l),f=(d[1]-d[0])*.3;d=[d[0]-f,d[1]+f];var h=[0,n[1]],v=[0,n[0]],m=[[n[0],0],[0,0]],y=[],b=v[1]/(o.count()-1),w=0,S=Math.round(o.count()/n[0]),T;o.each([l],function(R,N){if(S>0&&N%S){w+=b;return}var k=R==null||isNaN(R)||R==="",O=k?0:mr(R,d,h,!0);k&&!T&&N?(m.push([m[m.length-1][0],0]),y.push([y[y.length-1][0],0])):!k&&T&&(m.push([w,0]),y.push([w,0])),m.push([w,O]),y.push([w,O]),w+=b,T=k}),u=this._shadowPolygonPts=m,c=this._shadowPolylinePts=y}this._shadowData=o,this._shadowDim=l,this._shadowSize=[n[0],n[1]];var A=this.dataZoomModel;function M(R){var N=A.getModel(R?"selectedDataBackground":"dataBackground"),k=new ft,O=new ki({shape:{points:u},segmentIgnoreThreshold:1,style:N.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),L=new Ni({shape:{points:c},segmentIgnoreThreshold:1,style:N.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return k.add(O),k.add(L),k}for(var P=0;P<3;P++){var E=M(P===1);this._displayables.sliderGroup.add(E),this._displayables.dataShadowSegs.push(E)}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,n=t.get("showDataShadow");if(n!==!1){var a,i=this.ecModel;return t.eachTargetAxis(function(o,s){var l=t.getAxisProxy(o,s).getTargetSeriesModels();q(l,function(u){if(!a&&!(n!==!0&&Mt(vqe,u.get("type"))<0)){var c=i.getComponent(Cf(o),s).axis,d=yqe(o),f,h=u.coordinateSystem;d!=null&&h.getOtherAxis&&(f=h.getOtherAxis(c).inverse),d=u.getData().mapDimension(d),a={thisAxis:c,series:u,thisDim:o,otherDim:d,otherAxisInverse:f}}},this)},this),a}},e.prototype._renderHandle=function(){var t=this.group,n=this._displayables,a=n.handles=[null,null],i=n.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,c=l.get("borderRadius")||0,d=l.get("brushSelect"),f=n.filler=new j1({silent:d,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(f),o.add(new j1({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:c},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:fqe,fill:"rgba(0,0,0,0)"}})),q([0,1],function(S){var T=l.get("handleIcon");!IT[T]&&T.indexOf("path://")<0&&T.indexOf("image://")<0&&(T="path://"+T);var A=qn(T,-1,0,2,2,null,!0);A.attr({cursor:BK(this._orient),draggable:!0,drift:Qe(this._onDragMove,this,S),ondragend:Qe(this._onDragEnd,this),onmouseover:Qe(this._showDataInfo,this,!0),onmouseout:Qe(this._showDataInfo,this,!1),z2:5});var M=A.getBoundingRect(),P=l.get("handleSize");this._handleHeight=He(P,this._size[1]),this._handleWidth=M.width/M.height*this._handleHeight,A.setStyle(l.getModel("handleStyle").getItemStyle()),A.style.strokeNoScale=!0,A.rectHover=!0,A.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),Hp(A);var E=l.get("handleColor");E!=null&&(A.style.fill=E),o.add(a[S]=A);var R=l.getModel("textStyle"),N=l.get("handleLabel")||{},k=N.show||!1;t.add(i[S]=new Xt({silent:!0,invisible:!k,style:jr(R,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:R.getTextColor(),font:R.getFont()}),z2:10}))},this);var h=f;if(d){var v=He(l.get("moveHandleSize"),s[1]),m=n.moveHandle=new qt({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:v}}),y=v*.8,b=n.moveHandleIcon=qn(l.get("moveHandleIcon"),-y/2,-y/2,y,y,"#fff",!0);b.silent=!0,b.y=s[1]+v/2-.5,m.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var w=Math.min(s[1]/2,Math.max(v,10));h=n.moveZone=new qt({invisible:!0,shape:{y:s[1]-w,height:v+w}}),h.on("mouseover",function(){u.enterEmphasis(m)}).on("mouseout",function(){u.leaveEmphasis(m)}),o.add(m),o.add(b),o.add(h)}h.attr({draggable:!0,cursor:BK(this._orient),drift:Qe(this._onDragMove,this,"all"),ondragstart:Qe(this._showDataInfo,this,!0),ondragend:Qe(this._onDragEnd,this),onmouseover:Qe(this._showDataInfo,this,!0),onmouseout:Qe(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[mr(t[0],[0,100],n,!0),mr(t[1],[0,100],n,!0)]},e.prototype._updateInterval=function(t,n){var a=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),s=a.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];jv(n,i,o,a.get("zoomLock")?"all":t,s.minSpan!=null?mr(s.minSpan,l,o,!0):null,s.maxSpan!=null?mr(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=ps([mr(i[0],o,l,!0),mr(i[1],o,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},e.prototype._updateView=function(t){var n=this._displayables,a=this._handleEnds,i=ps(a.slice()),o=this._size;q([0,1],function(h){var v=n.handles[h],m=this._handleHeight;v.attr({scaleX:m/2,scaleY:m/2,x:a[h]+(h?-1:1),y:o[1]/2-m/2})},this),n.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:o[1]});var s={x:i[0],width:i[1]-i[0]};n.moveHandle&&(n.moveHandle.setShape(s),n.moveZone.setShape(s),n.moveZone.getBoundingRect(),n.moveHandleIcon&&n.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=n.dataShadowSegs,u=[0,i[0],i[1],o[0]],c=0;c<l.length;c++){var d=l[c],f=d.getClipPath();f||(f=new qt,d.setClipPath(f)),f.setShape({x:u[c],y:0,width:u[c+1]-u[c],height:o[1]})}this._updateDataInfo(t)},e.prototype._updateDataInfo=function(t){var n=this.dataZoomModel,a=this._displayables,i=a.handleLabels,o=this._orient,s=["",""];if(n.get("showDetail")){var l=n.findRepresentativeAxisProxy();if(l){var u=l.getAxisModel().axis,c=this._range,d=t?l.calculateDataWindow({start:c[0],end:c[1]}).valueWindow:l.getDataValueWindow();s=[this._formatLabel(d[0],u),this._formatLabel(d[1],u)]}}var f=ps(this._handleEnds.slice());h.call(this,0),h.call(this,1);function h(v){var m=Up(a.handles[v].parent,this.group),y=V3(v===0?"right":"left",m),b=this._handleWidth/2+pqe,w=ol([f[v]+(v===0?-b:b),this._size[1]/2],m);i[v].setStyle({x:w[0],y:w[1],verticalAlign:o===B1?"middle":y,align:o===B1?y:"center",text:s[v]})}},e.prototype._formatLabel=function(t,n){var a=this.dataZoomModel,i=a.get("labelFormatter"),o=a.get("labelPrecision");(o==null||o==="auto")&&(o=n.getPixelPrecision());var s=t==null||isNaN(t)?"":n.type==="category"||n.type==="time"?n.scale.getLabel({value:Math.round(t)}):t.toFixed(Math.min(o,20));return nt(i)?i(t,s):qe(i)?i.replace("{value}",s):s},e.prototype._showDataInfo=function(t){var n=this.dataZoomModel.get("handleLabel")||{},a=n.show||!1,i=this.dataZoomModel.getModel(["emphasis","handleLabel"]),o=i.get("show")||!1,s=t||this._dragging?o:a,l=this._displayables,u=l.handleLabels;u[0].attr("invisible",!s),u[1].attr("invisible",!s),l.moveHandle&&this.api[s?"enterEmphasis":"leaveEmphasis"](l.moveHandle,1)},e.prototype._onDragMove=function(t,n,a,i){this._dragging=!0,$c(i.event);var o=this._displayables.sliderGroup.getLocalTransform(),s=ol([n,a],o,!0),l=this._updateInterval(t,s[0]),u=this.dataZoomModel.get("realtime");this._updateView(!u),l&&u&&this._dispatchZoomAction(!0)},e.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1);var t=this.dataZoomModel.get("realtime");!t&&this._dispatchZoomAction(!1)},e.prototype._onClickPanel=function(t){var n=this._size,a=this._displayables.sliderGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(a[0]<0||a[0]>n[0]||a[1]<0||a[1]>n[1])){var i=this._handleEnds,o=(i[0]+i[1])/2,s=this._updateInterval("all",a[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var n=t.offsetX,a=t.offsetY;this._brushStart=new Tt(n,a),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var n=this._displayables.brushRect;if(this._brushing=!1,!!n){n.attr("ignore",!0);var a=n.shape,i=+new Date;if(!(i-this._brushStartTime<200&&Math.abs(a.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=ps([mr(a.x,o,s,!0),mr(a.x+a.width,o,s,!0)]),this._handleEnds=[a.x,a.x+a.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&($c(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,n){var a=this._displayables,i=this.dataZoomModel,o=a.brushRect;o||(o=a.brushRect=new j1({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),a.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(t,n),c=l.transformCoordToLocal(s.x,s.y),d=this._size;u[0]=Math.max(Math.min(d[0],u[0]),0),o.setShape({x:c[0],y:0,width:u[0]-c[0],height:d[1]})},e.prototype._dispatchZoomAction=function(t){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?gqe:null,start:n[0],end:n[1]})},e.prototype._findCoordRect=function(){var t,n=Jce(this.dataZoomModel).infoList;if(!t&&n.length){var a=n[0].model.coordinateSystem;t=a.getRect&&a.getRect()}if(!t){var i=this.api.getWidth(),o=this.api.getHeight();t={x:i*.2,y:o*.2,width:i*.6,height:o*.6}}return t},e.type="dataZoom.slider",e}(J7);function yqe(r){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[r]}function BK(r){return r==="vertical"?"ns-resize":"ew-resize"}function bde(r){r.registerComponentModel(dqe),r.registerComponentView(mqe),eO(r)}function bqe(r){Rt(yde),Rt(bde)}var xde={get:function(r,e,t){var n=ut((xqe[r]||{})[e]);return t&&Me(n)?n[n.length-1]:n}},xqe={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},VK=ma.mapVisual,wqe=ma.eachVisual,Sqe=Me,FK=q,_qe=ps,Cqe=mr,rA=function(r){he(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.stateList=["inRange","outOfRange"],t.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],t.layoutMode={type:"box",ignoreSize:!0},t.dataBound=[-1/0,1/0],t.targetVisuals={},t.controllerVisuals={},t}return e.prototype.init=function(t,n,a){this.mergeDefaultAndTheme(t,a)},e.prototype.optionUpdated=function(t,n){var a=this.option;!n&&ude(a,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var n=this.stateList;t=Qe(t,this),this.controllerVisuals=Ik(this.option.controller,n,t),this.targetVisuals=Ik(this.option.target,n,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,n=[];return t==null||t==="all"?this.ecModel.eachSeries(function(a,i){n.push(i)}):n=Lr(t),n},e.prototype.eachTargetSeries=function(t,n){q(this.getTargetSeriesIndices(),function(a){var i=this.ecModel.getSeriesByIndex(a);i&&t.call(n,i)},this)},e.prototype.isTargetSeries=function(t){var n=!1;return this.eachTargetSeries(function(a){a===t&&(n=!0)}),n},e.prototype.formatValueText=function(t,n,a){var i=this.option,o=i.precision,s=this.dataBound,l=i.formatter,u;a=a||["<",">"],Me(t)&&(t=t.slice(),u=!0);var c=n?t:u?[d(t[0]),d(t[1])]:d(t);if(qe(l))return l.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if(nt(l))return u?l(t[0],t[1]):l(t);if(u)return t[0]===s[0]?a[0]+" "+c[1]:t[1]===s[1]?a[1]+" "+c[0]:c[0]+" - "+c[1];return c;function d(f){return f===s[0]?"min":f===s[1]?"max":(+f).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,n=_qe([t.min,t.max]);this._dataExtent=n},e.prototype.getDataDimensionIndex=function(t){var n=this.option.dimension;if(n!=null)return t.getDimensionIndex(n);for(var a=t.dimensions,i=a.length-1;i>=0;i--){var o=a[i],s=t.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,n=this.option,a={inRange:n.inRange,outOfRange:n.outOfRange},i=n.target||(n.target={}),o=n.controller||(n.controller={});Ct(i,a),Ct(o,a);var s=this.isCategory();l.call(this,i),l.call(this,o),u.call(this,i,"inRange","outOfRange"),c.call(this,o);function l(d){Sqe(n.color)&&!d.inRange&&(d.inRange={color:n.color.slice().reverse()}),d.inRange=d.inRange||{color:t.get("gradientColor")}}function u(d,f,h){var v=d[f],m=d[h];v&&!m&&(m=d[h]={},FK(v,function(y,b){if(ma.isValidType(b)){var w=xde.get(b,"inactive",s);w!=null&&(m[b]=w,b==="color"&&!m.hasOwnProperty("opacity")&&!m.hasOwnProperty("colorAlpha")&&(m.opacity=[0,0]))}}))}function c(d){var f=(d.inRange||{}).symbol||(d.outOfRange||{}).symbol,h=(d.inRange||{}).symbolSize||(d.outOfRange||{}).symbolSize,v=this.get("inactiveColor"),m=this.getItemSymbol(),y=m||"roundRect";FK(this.stateList,function(b){var w=this.itemSize,S=d[b];S||(S=d[b]={color:s?v:[v]}),S.symbol==null&&(S.symbol=f&&ut(f)||(s?y:[y])),S.symbolSize==null&&(S.symbolSize=h&&ut(h)||(s?w[0]:[w[0],w[0]])),S.symbol=VK(S.symbol,function(M){return M==="none"?y:M});var T=S.symbolSize;if(T!=null){var A=-1/0;wqe(T,function(M){M>A&&(A=M)}),S.symbolSize=VK(T,function(M){return Cqe(M,[0,A],[0,w[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(Bt),HK=[20,140],Tqe=function(r){he(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(t,n){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(a){a.mappingMethod="linear",a.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=HK[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=HK[1])},e.prototype._resetRange=function(){var t=this.getExtent(),n=this.option.range;!n||n.auto?(t.auto=1,this.option.range=t):Me(n)&&(n[0]>n[1]&&n.reverse(),n[0]=Math.max(n[0],t[0]),n[1]=Math.min(n[1],t[1]))},e.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),q(this.stateList,function(t){var n=this.option.controller[t].symbolSize;n&&n[0]!==n[1]&&(n[0]=n[1]/3)},this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),n=ps((this.get("range")||[]).slice());return n[0]>t[1]&&(n[0]=t[1]),n[1]>t[1]&&(n[1]=t[1]),n[0]<t[0]&&(n[0]=t[0]),n[1]<t[0]&&(n[1]=t[0]),n},e.prototype.getValueState=function(t){var n=this.option.range,a=this.getExtent();return(n[0]<=a[0]||n[0]<=t)&&(n[1]>=a[1]||t<=n[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var n=[];return this.eachTargetSeries(function(a){var i=[],o=a.getData();o.each(this.getDataDimensionIndex(o),function(s,l){t[0]<=s&&s<=t[1]&&i.push(l)},this),n.push({seriesId:a.id,dataIndex:i})},this),n},e.prototype.getVisualMeta=function(t){var n=UK(this,"outOfRange",this.getExtent()),a=UK(this,"inRange",this.option.range.slice()),i=[];function o(h,v){i.push({value:h,color:t(h,v)})}for(var s=0,l=0,u=a.length,c=n.length;l<c&&(!a.length||n[l]<=a[0]);l++)n[l]<a[s]&&o(n[l],"outOfRange");for(var d=1;s<u;s++,d=0)d&&i.length&&o(a[s],"outOfRange"),o(a[s],"inRange");for(var d=1;l<c;l++)(!a.length||a[a.length-1]<n[l])&&(d&&(i.length&&o(i[i.length-1].value,"outOfRange"),d=0),o(n[l],"outOfRange"));var f=i.length;return{stops:i,outerColors:[f?i[0].color:"transparent",f?i[f-1].color:"transparent"]}},e.type="visualMap.continuous",e.defaultOption=oh(rA.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:"#fff",borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}}),e}(rA);function UK(r,e,t){if(t[0]===t[1])return t.slice();for(var n=200,a=(t[1]-t[0])/n,i=t[0],o=[],s=0;s<=n&&i<t[1];s++)o.push(i),i+=a;return o.push(t[1]),o}var wde=function(r){he(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.autoPositionValues={left:1,right:1,top:1,bottom:1},t}return e.prototype.init=function(t,n){this.ecModel=t,this.api=n},e.prototype.render=function(t,n,a,i){if(this.visualMapModel=t,t.get("show")===!1){this.group.removeAll();return}this.doRender(t,n,a,i)},e.prototype.renderBackground=function(t){var n=this.visualMapModel,a=q0(n.get("padding")||0),i=t.getBoundingRect();t.add(new qt({z2:-1,silent:!0,shape:{x:i.x-a[3],y:i.y-a[0],width:i.width+a[3]+a[1],height:i.height+a[0]+a[2]},style:{fill:n.get("backgroundColor"),stroke:n.get("borderColor"),lineWidth:n.get("borderWidth")}}))},e.prototype.getControllerVisual=function(t,n,a){a=a||{};var i=a.forceState,o=this.visualMapModel,s={};if(n==="color"){var l=o.get("contentColor");s.color=l}function u(h){return s[h]}function c(h,v){s[h]=v}var d=o.controllerVisuals[i||o.getValueState(t)],f=ma.prepareVisualTypes(d);return q(f,function(h){var v=d[h];a.convertOpacityToAlpha&&h==="opacity"&&(h="colorAlpha",v=d.__alphaForOpacity),ma.dependsOn(h,n)&&v&&v.applyVisual(t,u,c)}),s[n]},e.prototype.positionGroup=function(t){var n=this.visualMapModel,a=this.api;W3(t,n.getBoxLayoutParams(),{width:a.getWidth(),height:a.getHeight()})},e.prototype.doRender=function(t,n,a,i){},e.type="visualMap",e}(nn),GK=[["left","right","width"],["top","bottom","height"]];function Sde(r,e,t){var n=r.option,a=n.align;if(a!=null&&a!=="auto")return a;for(var i={width:e.getWidth(),height:e.getHeight()},o=n.orient==="horizontal"?1:0,s=GK[o],l=[0,null,10],u={},c=0;c<3;c++)u[GK[1-o][c]]=l[c],u[s[c]]=c===2?t[0]:n[s[c]];var d=[["x","width",3],["y","height",0]][o],f=ia(u,i,n.padding);return s[(f.margin[d[2]]||0)+f[d[0]]+f[d[1]]*.5<i[d[1]]*.5?0:1]}function kC(r,e){return q(r||[],function(t){t.dataIndex!=null&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")}),r}var Fl=mr,Aqe=q,qK=Math.min,tP=Math.max,Eqe=12,Mqe=6,Dqe=function(r){he(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._shapes={},t._dataInterval=[],t._handleEnds=[],t._hoverLinkDataIndices=[],t}return e.prototype.init=function(t,n){r.prototype.init.call(this,t,n),this._hoverLinkFromSeriesMouseOver=Qe(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=Qe(this._hideIndicator,this)},e.prototype.doRender=function(t,n,a,i){(!i||i.type!=="selectDataRange"||i.from!==this.uid)&&this._buildView()},e.prototype._buildView=function(){this.group.removeAll();var t=this.visualMapModel,n=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(n);var a=t.get("text");this._renderEndsText(n,a,0),this._renderEndsText(n,a,1),this._updateView(!0),this.renderBackground(n),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(n)},e.prototype._renderEndsText=function(t,n,a){if(n){var i=n[1-a];i=i!=null?i+"":"";var o=this.visualMapModel,s=o.get("textGap"),l=o.itemSize,u=this._shapes.mainGroup,c=this._applyTransform([l[0]/2,a===0?-s:l[1]+s],u),d=this._applyTransform(a===0?"bottom":"top",u),f=this._orient,h=this.visualMapModel.textStyleModel;this.group.add(new Xt({style:jr(h,{x:c[0],y:c[1],verticalAlign:f==="horizontal"?"middle":d,align:f==="horizontal"?d:"center",text:i})}))}},e.prototype._renderBar=function(t){var n=this.visualMapModel,a=this._shapes,i=n.itemSize,o=this._orient,s=this._useHandle,l=Sde(n,this.api,i),u=a.mainGroup=this._createBarGroup(l),c=new ft;u.add(c),c.add(a.outOfRange=QK()),c.add(a.inRange=QK(null,s?KK(this._orient):null,Qe(this._dragHandle,this,"all",!1),Qe(this._dragHandle,this,"all",!0))),c.setClipPath(new qt({shape:{x:0,y:0,width:i[0],height:i[1],r:3}}));var d=n.textStyleModel.getTextRect("国"),f=tP(d.width,d.height);s&&(a.handleThumbs=[],a.handleLabels=[],a.handleLabelPoints=[],this._createHandle(n,u,0,i,f,o),this._createHandle(n,u,1,i,f,o)),this._createIndicator(n,u,i,f,o),t.add(u)},e.prototype._createHandle=function(t,n,a,i,o,s){var l=Qe(this._dragHandle,this,a,!1),u=Qe(this._dragHandle,this,a,!0),c=hl(t.get("handleSize"),i[0]),d=qn(t.get("handleIcon"),-c/2,-c/2,c,c,null,!0),f=KK(this._orient);d.attr({cursor:f,draggable:!0,drift:l,ondragend:u,onmousemove:function(b){$c(b.event)}}),d.x=i[0]/2,d.useStyle(t.getModel("handleStyle").getItemStyle()),d.setStyle({strokeNoScale:!0,strokeFirst:!0}),d.style.lineWidth*=2,d.ensureState("emphasis").style=t.getModel(["emphasis","handleStyle"]).getItemStyle(),Dp(d,!0),n.add(d);var h=this.visualMapModel.textStyleModel,v=new Xt({cursor:f,draggable:!0,drift:l,onmousemove:function(b){$c(b.event)},ondragend:u,style:jr(h,{x:0,y:0,text:""})});v.ensureState("blur").style={opacity:.1},v.stateTransition={duration:200},this.group.add(v);var m=[c,0],y=this._shapes;y.handleThumbs[a]=d,y.handleLabelPoints[a]=m,y.handleLabels[a]=v},e.prototype._createIndicator=function(t,n,a,i,o){var s=hl(t.get("indicatorSize"),a[0]),l=qn(t.get("indicatorIcon"),-s/2,-s/2,s,s,null,!0);l.attr({cursor:"move",invisible:!0,silent:!0,x:a[0]/2});var u=t.getModel("indicatorStyle").getItemStyle();if(l instanceof ka){var c=l.style;l.useStyle(Ce({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},u))}else l.useStyle(u);n.add(l);var d=this.visualMapModel.textStyleModel,f=new Xt({silent:!0,invisible:!0,style:jr(d,{x:0,y:0,text:""})});this.group.add(f);var h=[(o==="horizontal"?i/2:Mqe)+a[0]/2,0],v=this._shapes;v.indicator=l,v.indicatorLabel=f,v.indicatorLabelPoint=h,this._firstShowIndicator=!0},e.prototype._dragHandle=function(t,n,a,i){if(this._useHandle){if(this._dragging=!n,!n){var o=this._applyTransform([a,i],this._shapes.mainGroup,!0);this._updateInterval(t,o[1]),this._hideIndicator(),this._updateView()}n===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),n?!this._hovering&&this._clearHoverLinkToSeries():WK(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},e.prototype._resetInterval=function(){var t=this.visualMapModel,n=this._dataInterval=t.getSelected(),a=t.getExtent(),i=[0,t.itemSize[1]];this._handleEnds=[Fl(n[0],a,i,!0),Fl(n[1],a,i,!0)]},e.prototype._updateInterval=function(t,n){n=n||0;var a=this.visualMapModel,i=this._handleEnds,o=[0,a.itemSize[1]];jv(n,i,o,t,0);var s=a.getExtent();this._dataInterval=[Fl(i[0],o,s,!0),Fl(i[1],o,s,!0)]},e.prototype._updateView=function(t){var n=this.visualMapModel,a=n.getExtent(),i=this._shapes,o=[0,n.itemSize[1]],s=t?o:this._handleEnds,l=this._createBarVisual(this._dataInterval,a,s,"inRange"),u=this._createBarVisual(a,a,o,"outOfRange");i.inRange.setStyle({fill:l.barColor}).setShape("points",l.barPoints),i.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(s,l)},e.prototype._createBarVisual=function(t,n,a,i){var o={forceState:i,convertOpacityToAlpha:!0},s=this._makeColorGradient(t,o),l=[this.getControllerVisual(t[0],"symbolSize",o),this.getControllerVisual(t[1],"symbolSize",o)],u=this._createBarPoints(a,l);return{barColor:new z2(0,0,0,1,s),barPoints:u,handlesColor:[s[0].color,s[s.length-1].color]}},e.prototype._makeColorGradient=function(t,n){var a=100,i=[],o=(t[1]-t[0])/a;i.push({color:this.getControllerVisual(t[0],"color",n),offset:0});for(var s=1;s<a;s++){var l=t[0]+o*s;if(l>t[1])break;i.push({color:this.getControllerVisual(l,"color",n),offset:s/a})}return i.push({color:this.getControllerVisual(t[1],"color",n),offset:1}),i},e.prototype._createBarPoints=function(t,n){var a=this.visualMapModel.itemSize;return[[a[0]-n[0],t[0]],[a[0],t[0]],[a[0],t[1]],[a[0]-n[1],t[1]]]},e.prototype._createBarGroup=function(t){var n=this._orient,a=this.visualMapModel.get("inverse");return new ft(n==="horizontal"&&!a?{scaleX:t==="bottom"?1:-1,rotation:Math.PI/2}:n==="horizontal"&&a?{scaleX:t==="bottom"?-1:1,rotation:-Math.PI/2}:n==="vertical"&&!a?{scaleX:t==="left"?1:-1,scaleY:-1}:{scaleX:t==="left"?1:-1})},e.prototype._updateHandle=function(t,n){if(this._useHandle){var a=this._shapes,i=this.visualMapModel,o=a.handleThumbs,s=a.handleLabels,l=i.itemSize,u=i.getExtent(),c=this._applyTransform("left",a.mainGroup);Aqe([0,1],function(d){var f=o[d];f.setStyle("fill",n.handlesColor[d]),f.y=t[d];var h=Fl(t[d],[0,l[1]],u,!0),v=this.getControllerVisual(h,"symbolSize");f.scaleX=f.scaleY=v/l[0],f.x=l[0]-v/2;var m=ol(a.handleLabelPoints[d],Up(f,this.group));if(this._orient==="horizontal"){var y=c==="left"||c==="top"?(l[0]-v)/2:(l[0]-v)/-2;m[1]+=y}s[d].setStyle({x:m[0],y:m[1],text:i.formatValueText(this._dataInterval[d]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",a.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,n,a,i){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],c=this._shapes,d=c.indicator;if(d){d.attr("invisible",!1);var f={convertOpacityToAlpha:!0},h=this.getControllerVisual(t,"color",f),v=this.getControllerVisual(t,"symbolSize"),m=Fl(t,s,u,!0),y=l[0]-v/2,b={x:d.x,y:d.y};d.y=m,d.x=y;var w=ol(c.indicatorLabelPoint,Up(d,this.group)),S=c.indicatorLabel;S.attr("invisible",!1);var T=this._applyTransform("left",c.mainGroup),A=this._orient,M=A==="horizontal";S.setStyle({text:(a||"")+o.formatValueText(n),verticalAlign:M?T:"middle",align:M?"center":T});var P={x:y,y:m,style:{fill:h}},E={style:{x:w[0],y:w[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var R={duration:100,easing:"cubicInOut",additive:!0};d.x=b.x,d.y=b.y,d.animateTo(P,R),S.animateTo(E,R)}else d.attr(P),S.attr(E);this._firstShowIndicator=!1;var N=this._shapes.handleLabels;if(N)for(var k=0;k<N.length;k++)this.api.enterBlur(N[k])}},e.prototype._enableHoverLinkToSeries=function(){var t=this;this._shapes.mainGroup.on("mousemove",function(n){if(t._hovering=!0,!t._dragging){var a=t.visualMapModel.itemSize,i=t._applyTransform([n.offsetX,n.offsetY],t._shapes.mainGroup,!0,!0);i[1]=qK(tP(0,i[1]),a[1]),t._doHoverLinkToSeries(i[1],0<=i[0]&&i[0]<=a[0])}}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()})},e.prototype._enableHoverLinkFromSeries=function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},e.prototype._doHoverLinkToSeries=function(t,n){var a=this.visualMapModel,i=a.itemSize;if(a.option.hoverLink){var o=[0,i[1]],s=a.getExtent();t=qK(tP(o[0],t),o[1]);var l=Lqe(a,s,o),u=[t-l,t+l],c=Fl(t,o,s,!0),d=[Fl(u[0],o,s,!0),Fl(u[1],o,s,!0)];u[0]<o[0]&&(d[0]=-1/0),u[1]>o[1]&&(d[1]=1/0),n&&(d[0]===-1/0?this._showIndicator(c,d[1],"< ",l):d[1]===1/0?this._showIndicator(c,d[0],"> ",l):this._showIndicator(c,c,"≈ ",l));var f=this._hoverLinkDataIndices,h=[];(n||WK(a))&&(h=this._hoverLinkDataIndices=a.findTargetDataIndices(d));var v=OPe(f,h);this._dispatchHighDown("downplay",kC(v[0],a)),this._dispatchHighDown("highlight",kC(v[1],a))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var n;if(Pp(t.target,function(l){var u=pt(l);if(u.dataIndex!=null)return n=u,!0},!0),!!n){var a=this.ecModel.getSeriesByIndex(n.seriesIndex),i=this.visualMapModel;if(i.isTargetSeries(a)){var o=a.getData(n.dataType),s=o.getStore().get(i.getDataDimensionIndex(o),n.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var n=this._shapes.handleLabels;if(n)for(var a=0;a<n.length;a++)this.api.leaveBlur(n[a])},e.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",kC(t,this.visualMapModel)),t.length=0},e.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},e.prototype._applyTransform=function(t,n,a,i){var o=Up(n,i?null:this.group);return Me(t)?ol(t,o,a):V3(t,o,a)},e.prototype._dispatchHighDown=function(t,n){n&&n.length&&this.api.dispatchAction({type:t,batch:n})},e.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},e.type="visualMap.continuous",e}(wde);function QK(r,e,t,n){return new ki({shape:{points:r},draggable:!!t,cursor:e,drift:t,onmousemove:function(a){$c(a.event)},ondragend:n})}function Lqe(r,e,t){var n=Eqe/2,a=r.get("hoverLinkDataSize");return a&&(n=Fl(a,e,t,!0)/2),n}function WK(r){var e=r.get("hoverLinkOnHandle");return!!(e??r.get("realtime"))}function KK(r){return r==="vertical"?"ns-resize":"ew-resize"}var Pqe={type:"selectDataRange",event:"dataRangeSelected",update:"update"},Iqe=function(r,e){e.eachComponent({mainType:"visualMap",query:r},function(t){t.setSelected(r.selected)})},kqe=[{createOnAllSeries:!0,reset:function(r,e){var t=[];return e.eachComponent("visualMap",function(n){var a=r.pipelineContext;!n.isTargetSeries(r)||a&&a.large||t.push(tGe(n.stateList,n.targetVisuals,Qe(n.getValueState,n),n.getDataDimensionIndex(r.getData())))}),t}},{createOnAllSeries:!0,reset:function(r,e){var t=r.getData(),n=[];e.eachComponent("visualMap",function(a){if(a.isTargetSeries(r)){var i=a.getVisualMeta(Qe(Rqe,null,r,a))||{stops:[],outerColors:[]},o=a.getDataDimensionIndex(t);o>=0&&(i.dimension=o,n.push(i))}}),r.getData().setVisual("visualMeta",n)}}];function Rqe(r,e,t,n){for(var a=e.targetVisuals[n],i=ma.prepareVisualTypes(a),o={color:F2(r.getData(),"color")},s=0,l=i.length;s<l;s++){var u=i[s],c=a[u==="opacity"?"__alphaForOpacity":u];c&&c.applyVisual(t,d,f)}return o.color;function d(h){return o[h]}function f(h,v){o[h]=v}}var YK=q;function Nqe(r){var e=r&&r.visualMap;Me(e)||(e=e?[e]:[]),YK(e,function(t){if(t){qg(t,"splitList")&&!qg(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var n=t.pieces;n&&Me(n)&&YK(n,function(a){st(a)&&(qg(a,"start")&&!qg(a,"min")&&(a.min=a.start),qg(a,"end")&&!qg(a,"max")&&(a.max=a.end))})}})}function qg(r,e){return r&&r.hasOwnProperty&&r.hasOwnProperty(e)}var ZK=!1;function _de(r){ZK||(ZK=!0,r.registerSubTypeDefaulter("visualMap",function(e){return!e.categories&&(!(e.pieces?e.pieces.length>0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),r.registerAction(Pqe,Iqe),q(kqe,function(e){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,e)}),r.registerPreprocessor(Nqe))}function Cde(r){r.registerComponentModel(Tqe),r.registerComponentView(Dqe),_de(r)}var Oqe=function(r){he(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._pieceList=[],t}return e.prototype.optionUpdated=function(t,n){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var a=this._mode=this._determineMode();this._pieceList=[],$qe[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(o,s){a==="categories"?(o.mappingMethod="category",o.categories=ut(i)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=Le(this._pieceList,function(l){return l=ut(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var t=this.option,n={},a=ma.listVisualTypes(),i=this.isCategory();q(t.pieces,function(s){q(a,function(l){s.hasOwnProperty(l)&&(n[l]=1)})}),q(n,function(s,l){var u=!1;q(this.stateList,function(c){u=u||o(t,c,l)||o(t.target,c,l)},this),!u&&q(this.stateList,function(c){(t[c]||(t[c]={}))[l]=xde.get(l,c==="inRange"?"active":"inactive",i)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,n){var a=this.option,i=this._pieceList,o=(n?a:t).selected||{};if(a.selected=o,q(i,function(l,u){var c=this.getSelectedMapKey(l);o.hasOwnProperty(c)||(o[c]=!0)},this),a.selectedMode==="single"){var s=!1;q(i,function(l,u){var c=this.getSelectedMapKey(l);o[c]&&(s?o[c]=!1:s=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return this._mode==="categories"?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=ut(t)},e.prototype.getValueState=function(t){var n=ma.findPieceIndex(t,this._pieceList);return n!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[n])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var n=[],a=this._pieceList;return this.eachTargetSeries(function(i){var o=[],s=i.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var c=ma.findPieceIndex(l,a);c===t&&o.push(u)},this),n.push({seriesId:i.id,dataIndex:o})},this),n},e.prototype.getRepresentValue=function(t){var n;if(this.isCategory())n=t.value;else if(t.value!=null)n=t.value;else{var a=t.interval||[];n=a[0]===-1/0&&a[1]===1/0?0:(a[0]+a[1])/2}return n},e.prototype.getVisualMeta=function(t){if(this.isCategory())return;var n=[],a=["",""],i=this;function o(c,d){var f=i.getRepresentValue({interval:c});d||(d=i.getValueState(f));var h=t(f,d);c[0]===-1/0?a[0]=h:c[1]===1/0?a[1]=h:n.push({value:c[0],color:h},{value:c[1],color:h})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return q(s,function(c){var d=c.interval;d&&(d[0]>u&&o([u,d[0]],"outOfRange"),o(d.slice()),u=d[1])},this),{stops:n,outerColors:a}},e.type="visualMap.piecewise",e.defaultOption=oh(rA.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(rA),$qe={splitNumber:function(r){var e=this.option,t=Math.min(e.precision,20),n=this.getExtent(),a=e.splitNumber;a=Math.max(parseInt(a,10),1),e.splitNumber=a;for(var i=(n[1]-n[0])/a;+i.toFixed(t)!==i&&t<5;)t++;e.precision=t,i=+i.toFixed(t),e.minOpen&&r.push({interval:[-1/0,n[0]],close:[0,0]});for(var o=0,s=n[0];o<a;s+=i,o++){var l=o===a-1?n[1]:s+i;r.push({interval:[s,l],close:[1,1]})}e.maxOpen&&r.push({interval:[n[1],1/0],close:[0,0]}),GH(r),q(r,function(u,c){u.index=c,u.text=this.formatValueText(u.interval)},this)},categories:function(r){var e=this.option;q(e.categories,function(t){r.push({text:this.formatValueText(t,!0),value:t})},this),XK(e,r)},pieces:function(r){var e=this.option;q(e.pieces,function(t,n){st(t)||(t={value:t});var a={text:"",index:n};if(t.label!=null&&(a.text=t.label),t.hasOwnProperty("value")){var i=a.value=t.value;a.interval=[i,i],a.close=[1,1]}else{for(var o=a.interval=[],s=a.close=[0,0],l=[1,0,1],u=[-1/0,1/0],c=[],d=0;d<2;d++){for(var f=[["gte","gt","min"],["lte","lt","max"]][d],h=0;h<3&&o[d]==null;h++)o[d]=t[f[h]],s[d]=l[h],c[d]=h===2;o[d]==null&&(o[d]=u[d])}c[0]&&o[1]===1/0&&(s[0]=0),c[1]&&o[0]===-1/0&&(s[1]=0),o[0]===o[1]&&s[0]&&s[1]&&(a.value=o[0])}a.visual=ma.retrieveVisuals(t),r.push(a)},this),XK(e,r),GH(r),q(r,function(t){var n=t.close,a=[["<","≤"][n[1]],[">","≥"][n[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,!1,a)},this)}};function XK(r,e){var t=r.inverse;(r.orient==="vertical"?!t:t)&&e.reverse()}var zqe=function(r){he(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.doRender=function(){var t=this.group;t.removeAll();var n=this.visualMapModel,a=n.get("textGap"),i=n.textStyleModel,o=i.getFont(),s=i.getTextColor(),l=this._getItemAlign(),u=n.itemSize,c=this._getViewData(),d=c.endsText,f=La(n.get("showLabel",!0),!d),h=!n.get("selectedMode");d&&this._renderEndsText(t,d[0],u,f,l),q(c.viewPieceList,function(v){var m=v.piece,y=new ft;y.onclick=Qe(this._onItemClick,this,m),this._enableHoverLink(y,v.indexInModelPieceList);var b=n.getRepresentValue(m);if(this._createItemSymbol(y,b,[0,0,u[0],u[1]],h),f){var w=this.visualMapModel.getValueState(b);y.add(new Xt({style:{x:l==="right"?-a:u[0]+a,y:u[1]/2,text:m.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:w==="outOfRange"?.5:1},silent:h}))}t.add(y)},this),d&&this._renderEndsText(t,d[1],u,f,l),Gp(n.get("orient"),t,n.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,n){var a=this;t.on("mouseover",function(){return i("highlight")}).on("mouseout",function(){return i("downplay")});var i=function(o){var s=a.visualMapModel;s.option.hoverLink&&a.api.dispatchAction({type:o,batch:kC(s.findTargetDataIndices(n),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,n=t.option;if(n.orient==="vertical")return Sde(t,this.api,t.itemSize);var a=n.align;return(!a||a==="auto")&&(a="left"),a},e.prototype._renderEndsText=function(t,n,a,i,o){if(n){var s=new ft,l=this.visualMapModel.textStyleModel;s.add(new Xt({style:jr(l,{x:i?o==="right"?a[0]:0:a[0]/2,y:a[1]/2,verticalAlign:"middle",align:i?o:"center",text:n})})),t.add(s)}},e.prototype._getViewData=function(){var t=this.visualMapModel,n=Le(t.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),a=t.get("text"),i=t.get("orient"),o=t.get("inverse");return(i==="horizontal"?o:!o)?n.reverse():a&&(a=a.slice().reverse()),{viewPieceList:n,endsText:a}},e.prototype._createItemSymbol=function(t,n,a,i){var o=qn(this.getControllerVisual(n,"symbol"),a[0],a[1],a[2],a[3],this.getControllerVisual(n,"color"));o.silent=i,t.add(o)},e.prototype._onItemClick=function(t){var n=this.visualMapModel,a=n.option,i=a.selectedMode;if(i){var o=ut(a.selected),s=n.getSelectedMapKey(t);i==="single"||i===!0?(o[s]=!0,q(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},e.type="visualMap.piecewise",e}(wde);function Tde(r){r.registerComponentModel(Oqe),r.registerComponentView(zqe),_de(r)}function jqe(r){Rt(Cde),Rt(Tde)}var Bqe={label:{enabled:!0},decal:{show:!1}},JK=Qt(),Vqe={};function Fqe(r,e){var t=r.getModel("aria");if(!t.get("enabled"))return;var n=ut(Bqe);Ct(n.label,r.getLocaleModel().get("aria"),!1),Ct(t.option,n,!1),a(),i();function a(){var u=t.getModel("decal"),c=u.get("show");if(c){var d=Je();r.eachSeries(function(f){if(!f.isColorBySeries()){var h=d.get(f.type);h||(h={},d.set(f.type,h)),JK(f).scope=h}}),r.eachRawSeries(function(f){if(r.isSeriesFiltered(f))return;if(nt(f.enableAriaDecal)){f.enableAriaDecal();return}var h=f.getData();if(f.isColorBySeries()){var w=z6(f.ecModel,f.name,Vqe,r.getSeriesCount()),S=h.getVisual("decal");h.setVisual("decal",T(S,w))}else{var v=f.getRawData(),m={},y=JK(f).scope;h.each(function(A){var M=h.getRawIndex(A);m[M]=A});var b=v.count();v.each(function(A){var M=m[A],P=v.getName(A)||A+"",E=z6(f.ecModel,P,y,b),R=h.getItemVisual(M,"decal");h.setItemVisual(M,"decal",T(R,E))})}function T(A,M){var P=A?Ce(Ce({},M),A):M;return P.dirty=!0,P}})}}function i(){var u=e.getZr().dom;if(u){var c=r.getLocaleModel().get("aria"),d=t.getModel("label");if(d.option=ot(d.option,c),!!d.get("enabled")){if(u.setAttribute("role","img"),d.get("description")){u.setAttribute("aria-label",d.get("description"));return}var f=r.getSeriesCount(),h=d.get(["data","maxCount"])||10,v=d.get(["series","maxCount"])||10,m=Math.min(f,v),y;if(!(f<1)){var b=s();if(b){var w=d.get(["general","withTitle"]);y=o(w,{title:b})}else y=d.get(["general","withoutTitle"]);var S=[],T=f>1?d.get(["series","multiple","prefix"]):d.get(["series","single","prefix"]);y+=o(T,{seriesCount:f}),r.eachSeries(function(E,R){if(R<m){var N=void 0,k=E.get("name"),O=k?"withName":"withoutName";N=f>1?d.get(["series","multiple",O]):d.get(["series","single",O]),N=o(N,{seriesId:E.seriesIndex,seriesName:E.get("name"),seriesType:l(E.subType)});var L=E.getData();if(L.count()>h){var $=d.get(["data","partialData"]);N+=o($,{displayCnt:h})}else N+=d.get(["data","allData"]);for(var j=d.get(["data","separator","middle"]),B=d.get(["data","separator","end"]),H=d.get(["data","excludeDimensionId"]),F=[],K=0;K<L.count();K++)if(K<h){var U=L.getName(K),V=H?hr(L.getValues(K),function(Z,Y){return Mt(H,Y)===-1}):L.getValues(K),Q=d.get(["data",U?"withName":"withoutName"]);F.push(o(Q,{name:U,value:V.join(j)}))}N+=F.join(j)+B,S.push(N)}});var A=d.getModel(["series","multiple","separator"]),M=A.get("middle"),P=A.get("end");y+=S.join(M)+P,u.setAttribute("aria-label",y)}}}}function o(u,c){if(!qe(u))return u;var d=u;return q(c,function(f,h){d=d.replace(new RegExp("\\{\\s*"+h+"\\s*\\}","g"),f)}),d}function s(){var u=r.get("title");return u&&u.length&&(u=u[0]),u&&u.text}function l(u){var c=r.getLocaleModel().get(["series","typeNames"]);return c[u]||c.chart}}function Hqe(r){if(!(!r||!r.aria)){var e=r.aria;e.show!=null&&(e.enabled=e.show),e.label=e.label||{},q(["description","general","series","data"],function(t){e[t]!=null&&(e.label[t]=e[t])})}}function Uqe(r){r.registerPreprocessor(Hqe),r.registerVisual(r.PRIORITY.VISUAL.ARIA,Fqe)}var eY={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},Gqe=function(){function r(e){var t=this._condVal=qe(e)?new RegExp(e):JDe(e)?e:null;if(t==null){var n="";fr(n)}}return r.prototype.evaluate=function(e){var t=typeof e;return qe(t)?this._condVal.test(e):tr(t)?this._condVal.test(e+""):!1},r}(),qqe=function(){function r(){}return r.prototype.evaluate=function(){return this.value},r}(),Qqe=function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(!e[t].evaluate())return!1;return!0},r}(),Wqe=function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(e[t].evaluate())return!0;return!1},r}(),Kqe=function(){function r(){}return r.prototype.evaluate=function(){return!this.child.evaluate()},r}(),Yqe=function(){function r(){}return r.prototype.evaluate=function(){for(var e=!!this.valueParser,t=this.getValue,n=t(this.valueGetterParam),a=e?this.valueParser(n):null,i=0;i<this.subCondList.length;i++)if(!this.subCondList[i].evaluate(e?a:n))return!1;return!0},r}();function uO(r,e){if(r===!0||r===!1){var t=new qqe;return t.value=r,t}var n="";return Ade(r)||fr(n),r.and?tY("and",r,e):r.or?tY("or",r,e):r.not?Zqe(r,e):Xqe(r,e)}function tY(r,e,t){var n=e[r],a="";Me(n)||fr(a),n.length||fr(a);var i=r==="and"?new Qqe:new Wqe;return i.children=Le(n,function(o){return uO(o,t)}),i.children.length||fr(a),i}function Zqe(r,e){var t=r.not,n="";Ade(t)||fr(n);var a=new Kqe;return a.child=uO(t,e),a.child||fr(n),a}function Xqe(r,e){for(var t="",n=e.prepareGetValue(r),a=[],i=Vt(r),o=r.parser,s=o?sse(o):null,l=0;l<i.length;l++){var u=i[l];if(!(u==="parser"||e.valueGetterAttrMap.get(u))){var c=Ke(eY,u)?eY[u]:u,d=r[u],f=s?s(d):d,h=jke(c,f)||c==="reg"&&new Gqe(f);h||fr(t),a.push(h)}}a.length||fr(t);var v=new Yqe;return v.valueGetterParam=n,v.valueParser=s,v.getValue=e.getValue,v.subCondList=a,v}function Ade(r){return st(r)&&!ci(r)}var Jqe=function(){function r(e,t){this._cond=uO(e,t)}return r.prototype.evaluate=function(){return this._cond.evaluate()},r}();function eQe(r,e){return new Jqe(r,e)}var tQe={type:"echarts:filter",transform:function(r){for(var e=r.upstream,t,n=eQe(r.config,{valueGetterAttrMap:Je({dimension:!0}),prepareGetValue:function(s){var l="",u=s.dimension;Ke(s,"dimension")||fr(l);var c=e.getDimensionInfo(u);return c||fr(l),{dimIdx:c.index}},getValue:function(s){return e.retrieveValueFromItem(t,s.dimIdx)}}),a=[],i=0,o=e.count();i<o;i++)t=e.getRawDataItem(i),n.evaluate()&&a.push(t);return{data:a}}},rQe={type:"echarts:sort",transform:function(r){var e=r.upstream,t=r.config,n="",a=Lr(t);a.length||fr(n);var i=[];q(a,function(c){var d=c.dimension,f=c.order,h=c.parser,v=c.incomparable;if(d==null&&fr(n),f!=="asc"&&f!=="desc"&&fr(n),v&&v!=="min"&&v!=="max"){var m="";fr(m)}if(f!=="asc"&&f!=="desc"){var y="";fr(y)}var b=e.getDimensionInfo(d);b||fr(n);var w=h?sse(h):null;h&&!w&&fr(n),i.push({dimIdx:b.index,parser:w,comparator:new use(f,v)})});var o=e.sourceFormat;o!==di&&o!==Ms&&fr(n);for(var s=[],l=0,u=e.count();l<u;l++)s.push(e.getRawDataItem(l));return s.sort(function(c,d){for(var f=0;f<i.length;f++){var h=i[f],v=e.retrieveValueFromItem(c,h.dimIdx),m=e.retrieveValueFromItem(d,h.dimIdx);h.parser&&(v=h.parser(v),m=h.parser(m));var y=h.comparator.evaluate(v,m);if(y!==0)return y}return 0}),{data:s}}};function nQe(r){r.registerTransform(tQe),r.registerTransform(rQe)}var aQe=function(r){he(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.prototype.init=function(t,n,a){r.prototype.init.call(this,t,n,a),this._sourceManager=new hse(this),nG(this)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.call(this,t,n),nG(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:ou},e}(Bt),iQe=function(r){he(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.type="dataset",e}(nn);function oQe(r){r.registerComponentModel(aQe),r.registerComponentView(iQe)}var Bl=vu.CMD;function Mm(r,e){return Math.abs(r-e)<1e-5}function jk(r){var e=r.data,t=r.len(),n=[],a,i=0,o=0,s=0,l=0;function u(L,$){a&&a.length>2&&n.push(a),a=[L,$]}function c(L,$,j,B){Mm(L,j)&&Mm($,B)||a.push(L,$,j,B,j,B)}function d(L,$,j,B,H,F){var K=Math.abs($-L),U=Math.tan(K/4)*4/3,V=$<L?-1:1,Q=Math.cos(L),Z=Math.sin(L),Y=Math.cos($),X=Math.sin($),re=Q*H+j,oe=Z*F+B,ae=Y*H+j,se=X*F+B,le=H*U*V,fe=F*U*V;a.push(re-le*Z,oe+fe*Q,ae+le*X,se-fe*Y,ae,se)}for(var f,h,v,m,y=0;y<t;){var b=e[y++],w=y===1;switch(w&&(i=e[y],o=e[y+1],s=i,l=o,(b===Bl.L||b===Bl.C||b===Bl.Q)&&(a=[s,l])),b){case Bl.M:i=s=e[y++],o=l=e[y++],u(s,l);break;case Bl.L:f=e[y++],h=e[y++],c(i,o,f,h),i=f,o=h;break;case Bl.C:a.push(e[y++],e[y++],e[y++],e[y++],i=e[y++],o=e[y++]);break;case Bl.Q:f=e[y++],h=e[y++],v=e[y++],m=e[y++],a.push(i+2/3*(f-i),o+2/3*(h-o),v+2/3*(f-v),m+2/3*(h-m),v,m),i=v,o=m;break;case Bl.A:var S=e[y++],T=e[y++],A=e[y++],M=e[y++],P=e[y++],E=e[y++]+P;y+=1;var R=!e[y++];f=Math.cos(P)*A+S,h=Math.sin(P)*M+T,w?(s=f,l=h,u(s,l)):c(i,o,f,h),i=Math.cos(E)*A+S,o=Math.sin(E)*M+T;for(var N=(R?-1:1)*Math.PI/2,k=P;R?k>E:k<E;k+=N){var O=R?Math.max(k+N,E):Math.min(k+N,E);d(k,O,S,T,A,M)}break;case Bl.R:s=i=e[y++],l=o=e[y++],f=s+e[y++],h=l+e[y++],u(f,l),c(f,l,f,h),c(f,h,s,h),c(s,h,s,l),c(s,l,f,l);break;case Bl.Z:a&&c(i,o,s,l),i=s,o=l;break}}return a&&a.length>2&&n.push(a),n}function Bk(r,e,t,n,a,i,o,s,l,u){if(Mm(r,t)&&Mm(e,n)&&Mm(a,o)&&Mm(i,s)){l.push(o,s);return}var c=2/u,d=c*c,f=o-r,h=s-e,v=Math.sqrt(f*f+h*h);f/=v,h/=v;var m=t-r,y=n-e,b=a-o,w=i-s,S=m*m+y*y,T=b*b+w*w;if(S<d&&T<d){l.push(o,s);return}var A=f*m+h*y,M=-f*b-h*w,P=S-A*A,E=T-M*M;if(P<d&&A>=0&&E<d&&M>=0){l.push(o,s);return}var R=[],N=[];Ff(r,t,a,o,.5,R),Ff(e,n,i,s,.5,N),Bk(R[0],N[0],R[1],N[1],R[2],N[2],R[3],N[3],l,u),Bk(R[4],N[4],R[5],N[5],R[6],N[6],R[7],N[7],l,u)}function sQe(r,e){var t=jk(r),n=[];e=e||1;for(var a=0;a<t.length;a++){var i=t[a],o=[],s=i[0],l=i[1];o.push(s,l);for(var u=2;u<i.length;){var c=i[u++],d=i[u++],f=i[u++],h=i[u++],v=i[u++],m=i[u++];Bk(s,l,c,d,f,h,v,m,o,e),s=v,l=m}n.push(o)}return n}function Ede(r,e,t){var n=r[e],a=r[1-e],i=Math.abs(n/a),o=Math.ceil(Math.sqrt(i*t)),s=Math.floor(t/o);s===0&&(s=1,o=t);for(var l=[],u=0;u<o;u++)l.push(s);var c=o*s,d=t-c;if(d>0)for(var u=0;u<d;u++)l[u%o]+=1;return l}function rY(r,e,t){for(var n=r.r0,a=r.r,i=r.startAngle,o=r.endAngle,s=Math.abs(o-i),l=s*a,u=a-n,c=l>Math.abs(u),d=Ede([l,u],c?0:1,e),f=(c?s:u)/d.length,h=0;h<d.length;h++)for(var v=(c?u:s)/d[h],m=0;m<d[h];m++){var y={};c?(y.startAngle=i+f*h,y.endAngle=i+f*(h+1),y.r0=n+v*m,y.r=n+v*(m+1)):(y.startAngle=i+v*m,y.endAngle=i+v*(m+1),y.r0=n+f*h,y.r=n+f*(h+1)),y.clockwise=r.clockwise,y.cx=r.cx,y.cy=r.cy,t.push(y)}}function lQe(r,e,t){for(var n=r.width,a=r.height,i=n>a,o=Ede([n,a],i?0:1,e),s=i?"width":"height",l=i?"height":"width",u=i?"x":"y",c=i?"y":"x",d=r[s]/o.length,f=0;f<o.length;f++)for(var h=r[l]/o[f],v=0;v<o[f];v++){var m={};m[u]=f*d,m[c]=v*h,m[s]=d,m[l]=h,m.x+=r.x,m.y+=r.y,t.push(m)}}function nY(r,e,t,n){return r*n-t*e}function uQe(r,e,t,n,a,i,o,s){var l=t-r,u=n-e,c=o-a,d=s-i,f=nY(c,d,l,u);if(Math.abs(f)<1e-6)return null;var h=r-a,v=e-i,m=nY(h,v,c,d)/f;return m<0||m>1?null:new Tt(m*l+r,m*u+e)}function cQe(r,e,t){var n=new Tt;Tt.sub(n,t,e),n.normalize();var a=new Tt;Tt.sub(a,r,e);var i=a.dot(n);return i}function Qg(r,e){var t=r[r.length-1];t&&t[0]===e[0]&&t[1]===e[1]||r.push(e)}function dQe(r,e,t){for(var n=r.length,a=[],i=0;i<n;i++){var o=r[i],s=r[(i+1)%n],l=uQe(o[0],o[1],s[0],s[1],e.x,e.y,t.x,t.y);l&&a.push({projPt:cQe(l,e,t),pt:l,idx:i})}if(a.length<2)return[{points:r},{points:r}];a.sort(function(y,b){return y.projPt-b.projPt});var u=a[0],c=a[a.length-1];if(c.idx<u.idx){var d=u;u=c,c=d}for(var f=[u.pt.x,u.pt.y],h=[c.pt.x,c.pt.y],v=[f],m=[h],i=u.idx+1;i<=c.idx;i++)Qg(v,r[i].slice());Qg(v,h),Qg(v,f);for(var i=c.idx+1;i<=u.idx+n;i++)Qg(m,r[i%n].slice());return Qg(m,f),Qg(m,h),[{points:v},{points:m}]}function aY(r){var e=r.points,t=[],n=[];N3(e,t,n);var a=new At(t[0],t[1],n[0]-t[0],n[1]-t[1]),i=a.width,o=a.height,s=a.x,l=a.y,u=new Tt,c=new Tt;return i>o?(u.x=c.x=s+i/2,u.y=l,c.y=l+o):(u.y=c.y=l+o/2,u.x=s,c.x=s+i),dQe(e,u,c)}function nA(r,e,t,n){if(t===1)n.push(e);else{var a=Math.floor(t/2),i=r(e);nA(r,i[0],a,n),nA(r,i[1],t-a,n)}return n}function fQe(r,e){for(var t=[],n=0;n<e;n++)t.push(EN(r));return t}function hQe(r,e){e.setStyle(r.style),e.z=r.z,e.z2=r.z2,e.zlevel=r.zlevel}function pQe(r){for(var e=[],t=0;t<r.length;)e.push([r[t++],r[t++]]);return e}function vQe(r,e){var t=[],n=r.shape,a;switch(r.type){case"rect":lQe(n,e,t),a=qt;break;case"sector":rY(n,e,t),a=Ii;break;case"circle":rY({r0:0,r:n.r,startAngle:0,endAngle:Math.PI*2,cx:n.cx,cy:n.cy},e,t),a=Ii;break;default:var i=r.getComputedTransform(),o=i?Math.sqrt(Math.max(i[0]*i[0]+i[1]*i[1],i[2]*i[2]+i[3]*i[3])):1,s=Le(sQe(r.getUpdatedPathProxy(),o),function(b){return pQe(b)}),l=s.length;if(l===0)nA(aY,{points:s[0]},e,t);else if(l===e)for(var u=0;u<l;u++)t.push({points:s[u]});else{var c=0,d=Le(s,function(b){var w=[],S=[];N3(b,w,S);var T=(S[1]-w[1])*(S[0]-w[0]);return c+=T,{poly:b,area:T}});d.sort(function(b,w){return w.area-b.area});for(var f=e,u=0;u<l;u++){var h=d[u];if(f<=0)break;var v=u===l-1?f:Math.ceil(h.area/c*e);v<0||(nA(aY,{points:h.poly},v,t),f-=v)}}a=ki;break}if(!a)return fQe(r,e);for(var m=[],u=0;u<t.length;u++){var y=new a;y.setShape(t[u]),hQe(r,y),m.push(y)}return m}function gQe(r,e){var t=r.length,n=e.length;if(t===n)return[r,e];for(var a=[],i=[],o=t<n?r:e,s=Math.min(t,n),l=Math.abs(n-t)/6,u=(s-2)/6,c=Math.ceil(l/u)+1,d=[o[0],o[1]],f=l,h=2;h<s;){var v=o[h-2],m=o[h-1],y=o[h++],b=o[h++],w=o[h++],S=o[h++],T=o[h++],A=o[h++];if(f<=0){d.push(y,b,w,S,T,A);continue}for(var M=Math.min(f,c-1)+1,P=1;P<=M;P++){var E=P/M;Ff(v,y,w,T,E,a),Ff(m,b,S,A,E,i),v=a[3],m=i[3],d.push(a[1],i[1],a[2],i[2],v,m),y=a[5],b=i[5],w=a[6],S=i[6]}f-=M-1}return o===r?[d,e]:[r,d]}function iY(r,e){for(var t=r.length,n=r[t-2],a=r[t-1],i=[],o=0;o<e.length;)i[o++]=n,i[o++]=a;return i}function mQe(r,e){for(var t,n,a,i=[],o=[],s=0;s<Math.max(r.length,e.length);s++){var l=r[s],u=e[s],c=void 0,d=void 0;l?u?(t=gQe(l,u),c=t[0],d=t[1],n=c,a=d):(d=iY(a||l,l),c=l):(c=iY(n||u,u),d=u),i.push(c),o.push(d)}return[i,o]}function oY(r){for(var e=0,t=0,n=0,a=r.length,i=0,o=a-2;i<a;o=i,i+=2){var s=r[o],l=r[o+1],u=r[i],c=r[i+1],d=s*c-u*l;e+=d,t+=(s+u)*d,n+=(l+c)*d}return e===0?[r[0]||0,r[1]||0]:[t/e/3,n/e/3,e]}function yQe(r,e,t,n){for(var a=(r.length-2)/6,i=1/0,o=0,s=r.length,l=s-2,u=0;u<a;u++){for(var c=u*6,d=0,f=0;f<s;f+=2){var h=f===0?c:(c+f-2)%l+2,v=r[h]-t[0],m=r[h+1]-t[1],y=e[f]-n[0],b=e[f+1]-n[1],w=y-v,S=b-m;d+=w*w+S*S}d<i&&(i=d,o=u)}return o}function bQe(r){for(var e=[],t=r.length,n=0;n<t;n+=2)e[n]=r[t-n-2],e[n+1]=r[t-n-1];return e}function xQe(r,e,t,n){for(var a=[],i,o=0;o<r.length;o++){var s=r[o],l=e[o],u=oY(s),c=oY(l);i==null&&(i=u[2]<0!=c[2]<0);var d=[],f=[],h=0,v=1/0,m=[],y=s.length;i&&(s=bQe(s));for(var b=yQe(s,l,u,c)*6,w=y-2,S=0;S<w;S+=2){var T=(b+S)%w+2;d[S+2]=s[T]-u[0],d[S+3]=s[T+1]-u[1]}d[0]=s[b]-u[0],d[1]=s[b+1]-u[1];for(var A=n/t,M=-n/2;M<=n/2;M+=A){for(var P=Math.sin(M),E=Math.cos(M),R=0,S=0;S<s.length;S+=2){var N=d[S],k=d[S+1],O=l[S]-c[0],L=l[S+1]-c[1],$=O*E-L*P,j=O*P+L*E;m[S]=$,m[S+1]=j;var B=$-N,H=j-k;R+=B*B+H*H}if(R<v){v=R,h=M;for(var F=0;F<m.length;F++)f[F]=m[F]}}a.push({from:d,to:f,fromCp:u,toCp:c,rotation:-h})}return a}function aA(r){return r.__isCombineMorphing}var Mde="__mOriginal_";function iA(r,e,t){var n=Mde+e,a=r[n]||r[e];r[n]||(r[n]=r[e]);var i=t.replace,o=t.after,s=t.before;r[e]=function(){var l=arguments,u;return s&&s.apply(this,l),i?u=i.apply(this,l):u=a.apply(this,l),o&&o.apply(this,l),u}}function Kb(r,e){var t=Mde+e;r[t]&&(r[e]=r[t],r[t]=null)}function sY(r,e){for(var t=0;t<r.length;t++)for(var n=r[t],a=0;a<n.length;){var i=n[a],o=n[a+1];n[a++]=e[0]*i+e[2]*o+e[4],n[a++]=e[1]*i+e[3]*o+e[5]}}function Dde(r,e){var t=r.getUpdatedPathProxy(),n=e.getUpdatedPathProxy(),a=mQe(jk(t),jk(n)),i=a[0],o=a[1],s=r.getComputedTransform(),l=e.getComputedTransform();function u(){this.transform=null}s&&sY(i,s),l&&sY(o,l),iA(e,"updateTransform",{replace:u}),e.transform=null;var c=xQe(i,o,10,Math.PI),d=[];iA(e,"buildPath",{replace:function(f){for(var h=e.__morphT,v=1-h,m=[],y=0;y<c.length;y++){var b=c[y],w=b.from,S=b.to,T=b.rotation*h,A=b.fromCp,M=b.toCp,P=Math.sin(T),E=Math.cos(T);pC(m,A,M,h);for(var R=0;R<w.length;R+=2){var N=w[R],k=w[R+1],O=S[R],L=S[R+1],$=N*v+O*h,j=k*v+L*h;d[R]=$*E-j*P+m[0],d[R+1]=$*P+j*E+m[1]}var B=d[0],H=d[1];f.moveTo(B,H);for(var R=2;R<w.length;){var O=d[R++],L=d[R++],F=d[R++],K=d[R++],U=d[R++],V=d[R++];B===O&&H===L&&F===U&&K===V?f.lineTo(U,V):f.bezierCurveTo(O,L,F,K,U,V),B=U,H=V}}}})}function cO(r,e,t){if(!r||!e)return e;var n=t.done,a=t.during;Dde(r,e),e.__morphT=0;function i(){Kb(e,"buildPath"),Kb(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape()}return e.animateTo({__morphT:1},ot({during:function(o){e.dirtyShape(),a&&a(o)},done:function(){i(),n&&n()}},t)),e}function wQe(r,e,t,n,a,i){var o=16;r=a===t?0:Math.round(32767*(r-t)/(a-t)),e=i===n?0:Math.round(32767*(e-n)/(i-n));for(var s=0,l,u=(1<<o)/2;u>0;u/=2){var c=0,d=0;(r&u)>0&&(c=1),(e&u)>0&&(d=1),s+=u*u*(3*c^d),d===0&&(c===1&&(r=u-1-r,e=u-1-e),l=r,r=e,e=l)}return s}function oA(r){var e=1/0,t=1/0,n=-1/0,a=-1/0,i=Le(r,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),c=l.x+l.width/2+(u?u[4]:0),d=l.y+l.height/2+(u?u[5]:0);return e=Math.min(c,e),t=Math.min(d,t),n=Math.max(c,n),a=Math.max(d,a),[c,d]}),o=Le(i,function(s,l){return{cp:s,z:wQe(s[0],s[1],e,t,n,a),path:r[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function Lde(r){return vQe(r.path,r.count)}function Vk(){return{fromIndividuals:[],toIndividuals:[],count:0}}function SQe(r,e,t){var n=[];function a(A){for(var M=0;M<A.length;M++){var P=A[M];aA(P)?a(P.childrenRef()):P instanceof Ot&&n.push(P)}}a(r);var i=n.length;if(!i)return Vk();var o=t.dividePath||Lde,s=o({path:e,count:i});if(s.length!==i)return console.error("Invalid morphing: unmatched splitted path"),Vk();n=oA(n),s=oA(s);for(var l=t.done,u=t.during,c=t.individualDelay,d=new xc,f=0;f<i;f++){var h=n[f],v=s[f];v.parent=e,v.copyTransform(d),c||Dde(h,v)}e.__isCombineMorphing=!0,e.childrenRef=function(){return s};function m(A){for(var M=0;M<s.length;M++)s[M].addSelfToZr(A)}iA(e,"addSelfToZr",{after:function(A){m(A)}}),iA(e,"removeSelfFromZr",{after:function(A){for(var M=0;M<s.length;M++)s[M].removeSelfFromZr(A)}});function y(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,Kb(e,"addSelfToZr"),Kb(e,"removeSelfFromZr")}var b=s.length;if(c)for(var w=b,S=function(){w--,w===0&&(y(),l&&l())},f=0;f<b;f++){var T=c?ot({delay:(t.delay||0)+c(f,b,n[f],s[f]),done:S},t):t;cO(n[f],s[f],T)}else e.__morphT=0,e.animateTo({__morphT:1},ot({during:function(A){for(var M=0;M<b;M++){var P=s[M];P.__morphT=e.__morphT,P.dirtyShape()}u&&u(A)},done:function(){y();for(var A=0;A<r.length;A++)Kb(r[A],"updateTransform");l&&l()}},t));return e.__zr&&m(e.__zr),{fromIndividuals:n,toIndividuals:s,count:b}}function _Qe(r,e,t){var n=e.length,a=[],i=t.dividePath||Lde;function o(h){for(var v=0;v<h.length;v++){var m=h[v];aA(m)?o(m.childrenRef()):m instanceof Ot&&a.push(m)}}if(aA(r)){o(r.childrenRef());var s=a.length;if(s<n)for(var l=0,u=s;u<n;u++)a.push(EN(a[l++%s]));a.length=n}else{a=i({path:r,count:n});for(var c=r.getComputedTransform(),u=0;u<a.length;u++)a[u].setLocalTransform(c);if(a.length!==n)return console.error("Invalid morphing: unmatched splitted path"),Vk()}a=oA(a),e=oA(e);for(var d=t.individualDelay,u=0;u<n;u++){var f=d?ot({delay:(t.delay||0)+d(u,n,a[u],e[u])},t):t;cO(a[u],e[u],f)}return{fromIndividuals:a,toIndividuals:e,count:e.length}}function lY(r){return Me(r[0])}function uY(r,e){for(var t=[],n=r.length,a=0;a<n;a++)t.push({one:r[a],many:[]});for(var a=0;a<e.length;a++){var i=e[a].length,o=void 0;for(o=0;o<i;o++)t[o%n].many.push(e[a][o])}for(var s=0,a=n-1;a>=0;a--)if(!t[a].many.length){var l=t[s].many;if(l.length<=1)if(s)s=0;else return t;var i=l.length,u=Math.ceil(i/2);t[a].many=l.slice(u,i),t[s].many=l.slice(0,u),s++}return t}var CQe={clone:function(r){for(var e=[],t=1-Math.pow(1-r.path.style.opacity,1/r.count),n=0;n<r.count;n++){var a=EN(r.path);a.setStyle("opacity",t),e.push(a)}return e},split:null};function rP(r,e,t,n,a,i){if(!r.length||!e.length)return;var o=H0("update",n,a);if(!(o&&o.duration>0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;lY(r)&&(u=r,c=e),lY(e)&&(u=e,c=r);function d(b,w,S,T,A){var M=b.many,P=b.one;if(M.length===1&&!A){var E=w?M[0]:P,R=w?P:M[0];if(aA(E))d({many:[E],one:R},!0,S,T,!0);else{var N=s?ot({delay:s(S,T)},l):l;cO(E,R,N),i(E,R,E,R,N)}}else for(var k=ot({dividePath:CQe[t],individualDelay:s&&function(H,F,K,U){return s(H+S,T)}},l),O=w?SQe(M,P,k):_Qe(P,M,k),L=O.fromIndividuals,$=O.toIndividuals,j=L.length,B=0;B<j;B++){var N=s?ot({delay:s(B,j)},l):l;i(L[B],$[B],w?M[B]:b.one,w?b.one:M[B],N)}}for(var f=u?u===r:r.length>e.length,h=u?uY(c,u):uY(f?e:r,[f?r:e]),v=0,m=0;m<h.length;m++)v+=h[m].many.length;for(var y=0,m=0;m<h.length;m++)d(h[m],f,y,v),y+=h[m].many.length}function vp(r){if(!r)return[];if(Me(r)){for(var e=[],t=0;t<r.length;t++)e.push(vp(r[t]));return e}var n=[];return r.traverse(function(a){a instanceof Ot&&!a.disableMorphing&&!a.invisible&&!a.ignore&&n.push(a)}),n}var Pde=1e4,TQe=0,cY=1,dY=2,AQe=Qt();function EQe(r,e){for(var t=r.dimensions,n=0;n<t.length;n++){var a=r.getDimensionInfo(t[n]);if(a&&a.otherDims[e]===0)return t[n]}}function MQe(r,e,t){var n=r.getDimensionInfo(t),a=n&&n.ordinalMeta;if(n){var i=r.get(n.name,e);return a&&a.categories[i]||i+""}}function fY(r,e,t,n){var a=n?"itemChildGroupId":"itemGroupId",i=EQe(r,a);if(i){var o=MQe(r,e,i);return o}var s=r.getRawDataItem(e),l=n?"childGroupId":"groupId";if(s&&s[l])return s[l]+"";if(!n)return t||r.getId(e)}function hY(r){var e=[];return q(r,function(t){var n=t.data,a=t.dataGroupId;if(!(n.count()>Pde))for(var i=n.getIndices(),o=0;o<i.length;o++)e.push({data:n,groupId:fY(n,o,a,!1),childGroupId:fY(n,o,a,!0),divide:t.divide,dataIndex:o})}),e}function nP(r,e,t){r.traverse(function(n){n instanceof Ot&&Kr(n,{style:{opacity:0}},e,{dataIndex:t,isFrom:!0})})}function aP(r){if(r.parent){var e=r.getComputedTransform();r.setLocalTransform(e),r.parent.remove(r)}}function Wg(r){r.stopAnimation(),r.isGroup&&r.traverse(function(e){e.stopAnimation()})}function DQe(r,e,t){var n=H0("update",t,e);n&&r.traverse(function(a){if(a instanceof Cs){var i=S6e(a);i&&a.animateFrom({style:i},n)}})}function LQe(r,e){var t=r.length;if(t!==e.length)return!1;for(var n=0;n<t;n++){var a=r[n],i=e[n];if(a.data.getId(a.dataIndex)!==i.data.getId(i.dataIndex))return!1}return!0}function Ide(r,e,t){var n=hY(r),a=hY(e);function i(S,T,A,M,P){(A||S)&&T.animateFrom({style:A&&A!==S?Ce(Ce({},A.style),S.style):S.style},P)}var o=!1,s=TQe,l=Je(),u=Je();n.forEach(function(S){S.groupId&&l.set(S.groupId,!0),S.childGroupId&&u.set(S.childGroupId,!0)});for(var c=0;c<a.length;c++){var d=a[c].groupId;if(u.get(d)){s=cY;break}var f=a[c].childGroupId;if(f&&l.get(f)){s=dY;break}}function h(S,T){return function(A){var M=A.data,P=A.dataIndex;return T?M.getId(P):S?s===cY?A.childGroupId:A.groupId:s===dY?A.childGroupId:A.groupId}}var v=LQe(n,a),m={};if(!v)for(var c=0;c<a.length;c++){var y=a[c],b=y.data.getItemGraphicEl(y.dataIndex);b&&(m[b.id]=!0)}function w(S,T){var A=n[T],M=a[S],P=M.data.hostModel,E=A.data.getItemGraphicEl(A.dataIndex),R=M.data.getItemGraphicEl(M.dataIndex);if(E===R){R&&DQe(R,M.dataIndex,P);return}E&&m[E.id]||R&&(Wg(R),E?(Wg(E),aP(E),o=!0,rP(vp(E),vp(R),M.divide,P,S,i)):nP(R,P,S))}new Vc(n,a,h(!0,v),h(!1,v),null,"multiple").update(w).updateManyToOne(function(S,T){var A=a[S],M=A.data,P=M.hostModel,E=M.getItemGraphicEl(A.dataIndex),R=hr(Le(T,function(N){return n[N].data.getItemGraphicEl(n[N].dataIndex)}),function(N){return N&&N!==E&&!m[N.id]});E&&(Wg(E),R.length?(q(R,function(N){Wg(N),aP(N)}),o=!0,rP(vp(R),vp(E),A.divide,P,S,i)):nP(E,P,A.dataIndex))}).updateOneToMany(function(S,T){var A=n[T],M=A.data.getItemGraphicEl(A.dataIndex);if(!(M&&m[M.id])){var P=hr(Le(S,function(R){return a[R].data.getItemGraphicEl(a[R].dataIndex)}),function(R){return R&&R!==M}),E=a[S[0]].data.hostModel;P.length&&(q(P,function(R){return Wg(R)}),M?(Wg(M),aP(M),o=!0,rP(vp(M),vp(P),A.divide,E,S[0],i)):q(P,function(R){return nP(R,E,S[0])}))}}).updateManyToMany(function(S,T){new Vc(T,S,function(A){return n[A].data.getId(n[A].dataIndex)},function(A){return a[A].data.getId(a[A].dataIndex)}).update(function(A,M){w(S[A],T[M])}).execute()}).execute(),o&&q(e,function(S){var T=S.data,A=T.hostModel,M=A&&t.getViewOfSeriesModel(A),P=H0("update",A,0);M&&A.isAnimationEnabled()&&P&&P.duration>0&&M.group.traverse(function(E){E instanceof Ot&&!E.animators.length&&E.animateFrom({style:{opacity:0}},P)})})}function pY(r){var e=r.getModel("universalTransition").get("seriesKey");return e||r.id}function vY(r){return Me(r)?r.sort().join(","):r}function df(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function PQe(r,e){var t=Je(),n=Je(),a=Je();return q(r.oldSeries,function(i,o){var s=r.oldDataGroupIds[o],l=r.oldData[o],u=pY(i),c=vY(u);n.set(c,{dataGroupId:s,data:l}),Me(u)&&q(u,function(d){a.set(d,{key:c,dataGroupId:s,data:l})})}),q(e.updatedSeries,function(i){if(i.isUniversalTransitionEnabled()&&i.isAnimationEnabled()){var o=i.get("dataGroupId"),s=i.getData(),l=pY(i),u=vY(l),c=n.get(u);if(c)t.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:df(c.data),data:c.data}],newSeries:[{dataGroupId:o,divide:df(s),data:s}]});else if(Me(l)){var d=[];q(l,function(v){var m=n.get(v);m.data&&d.push({dataGroupId:m.dataGroupId,divide:df(m.data),data:m.data})}),d.length&&t.set(u,{oldSeries:d,newSeries:[{dataGroupId:o,data:s,divide:df(s)}]})}else{var f=a.get(l);if(f){var h=t.get(f.key);h||(h={oldSeries:[{dataGroupId:f.dataGroupId,data:f.data,divide:df(f.data)}],newSeries:[]},t.set(f.key,h)),h.newSeries.push({dataGroupId:o,data:s,divide:df(s)})}}}}),t}function gY(r,e){for(var t=0;t<r.length;t++){var n=e.seriesIndex!=null&&e.seriesIndex===r[t].seriesIndex||e.seriesId!=null&&e.seriesId===r[t].id;if(n)return t}}function IQe(r,e,t,n){var a=[],i=[];q(Lr(r.from),function(o){var s=gY(e.oldSeries,o);s>=0&&a.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:df(e.oldData[s]),groupIdDim:o.dimension})}),q(Lr(r.to),function(o){var s=gY(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();i.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:df(l),groupIdDim:o.dimension})}}),a.length>0&&i.length>0&&Ide(a,i,n)}function kQe(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,n){q(Lr(n.seriesTransition),function(a){q(Lr(a.to),function(i){for(var o=n.updatedSeries,s=0;s<o.length;s++)(i.seriesIndex!=null&&i.seriesIndex===o[s].seriesIndex||i.seriesId!=null&&i.seriesId===o[s].id)&&(o[s][AC]=!0)})})}),r.registerUpdateLifecycle("series:transition",function(e,t,n){var a=AQe(t);if(a.oldSeries&&n.updatedSeries&&n.optionChanged){var i=n.seriesTransition;if(i)q(Lr(i),function(h){IQe(h,a,n,t)});else{var o=PQe(a,n);q(o.keys(),function(h){var v=o.get(h);Ide(v.oldSeries,v.newSeries,t)})}q(n.updatedSeries,function(h){h[AC]&&(h[AC]=!1)})}for(var s=e.getSeries(),l=a.oldSeries=[],u=a.oldDataGroupIds=[],c=a.oldData=[],d=0;d<s.length;d++){var f=s[d].getData();f.count()<Pde&&(l.push(s[d]),u.push(s[d].get("dataGroupId")),c.push(f))}})}Rt([H7e]);Rt([z7e]);Rt([uOe,COe,ROe,h9e,C9e,c$e,z$e,wze,Hze,Kze,aje,Xje,_Be,RBe,YBe,eVe,cVe,mVe,MVe,RVe,UVe,EFe]);Rt(qFe);Rt(yHe);Rt(Lue);Rt(PHe);Rt(vce);Rt(NHe);Rt(UHe);Rt(PUe);Rt(YUe);Rt(J2);Rt(hGe);Rt(gGe);Rt(AGe);Rt(kGe);Rt(jGe);Rt(GGe);Rt(tqe);Rt(bqe);Rt(yde);Rt(bde);Rt(jqe);Rt(Cde);Rt(Tde);Rt(Uqe);Rt(nQe);Rt(oQe);Rt(kQe);Rt(a7e);const RQe={tooltip:{trigger:"item",formatter:"<center>{b}<br/><b>{d}%</b></center>",borderRadius:10,extraCssText:"backdrop-filter: blur(10px);"},series:[{name:"系统占用",type:"pie",radius:["70%","90%"],avoidLabelOverlap:!1,label:{show:!0,position:"center",formatter:"系统占用",fontSize:14},itemStyle:{borderWidth:1,borderRadius:10},labelLine:{show:!1},data:[{value:100,name:"系统总量"}]}]},mY=({systemUsage:r,processUsage:e,title:t})=>{const n=D.useRef(null),a=D.useRef(null),{theme:i}=W8();return D.useEffect(()=>{if(n.current){a.current=E8e(n.current);const o=RQe;a.current.setOption(o);const s=new ResizeObserver(()=>{var l;(l=a.current)==null||l.resize()});return s.observe(n.current),()=>{var l;(l=a.current)==null||l.dispose(),s.disconnect()}}},[]),D.useEffect(()=>{a.current&&a.current.setOption({series:[{label:{formatter:t}}]})},[t]),D.useEffect(()=>{a.current&&a.current.setOption({darkMode:i==="dark",tooltip:{backgroundColor:i==="dark"?"rgba(0, 0, 0, 0.8)":"rgba(255, 255, 255, 0.8)",textStyle:{color:i==="dark"?"#fff":"#333"}},color:i==="dark"?["#3f42f0","#64c5ef","#516ee2"]:["#3f42f0","#7d93ea","#07bdff"],series:[{itemStyle:{borderColor:i==="dark"?"#333":"#a7adf0"}}]})},[i]),D.useEffect(()=>{a.current&&a.current.setOption({series:[{data:[{value:e,name:"QQ占用"},{value:r-e,name:"其他进程占用"},{value:100-r,name:"剩余系统总量"}]}]})},[r,e]),_.jsx("div",{ref:n,className:"w-36 h-36 flex-shrink-0"})},ef=({title:r,value:e="-",size:t="md",unit:n})=>_.jsxs("div",{className:Gr("shadow-sm p-2 rounded-md text-sm bg-content1 bg-opacity-30",t==="lg"?"col-span-2":"col-span-1 flex justify-between"),children:[_.jsx("div",{className:"w-24",children:r}),_.jsxs("div",{className:"text-default-400",children:[e,n]})]}),NQe=({data:r})=>{const e={system:0,karin:0};if(r){const t=Number(r.memory.total)||1,n=Number(r.memory.usage.system),a=Number(r.memory.usage.karin);e.system=n/t*100,e.karin=a/t*100}return _.jsx(Fa,{className:"bg-opacity-60 shadow-sm shadow-primary-50 dark:shadow-primary-100 col-span-1 lg:col-span-2 relative overflow-hidden",children:_.jsxs(ms,{className:"overflow-visible md:flex-row gap-4 items-center justify-stretch z-10",children:[_.jsxs("div",{className:"flex-1 w-full md:max-w-96",children:[_.jsxs("h2",{className:"text-lg font-semibold flex items-center gap-1 text-primary-400",children:[_.jsx(ODe,{className:"text-xl"}),_.jsx("span",{children:"CPU"})]}),_.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[_.jsx(ef,{title:"型号",value:r==null?void 0:r.cpu.model,size:"lg"}),_.jsx(ef,{title:"内核数",value:r==null?void 0:r.cpu.core}),_.jsx(ef,{title:"主频",value:r==null?void 0:r.cpu.speed,unit:"GHz"}),_.jsx(ef,{title:"使用率",value:r==null?void 0:r.cpu.usage.system,unit:"%"}),_.jsx(ef,{title:"Karin",value:r==null?void 0:r.cpu.usage.karin,unit:"%"})]}),_.jsxs("h2",{className:"text-lg font-semibold flex items-center gap-1 text-primary-400 mt-2",children:[_.jsx(NDe,{className:"text-xl"}),_.jsx("span",{children:"内存"})]}),_.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[_.jsx(ef,{title:"总量",value:r==null?void 0:r.memory.total,size:"lg",unit:"MB"}),_.jsx(ef,{title:"使用量",value:r==null?void 0:r.memory.usage.system,unit:"MB"}),_.jsx(ef,{title:"Karin",value:r==null?void 0:r.memory.usage.karin,unit:"MB"})]})]}),_.jsxs("div",{className:"flex flex-row md:flex-col gap-2 flex-shrink-0 w-full justify-center md:w-40 min-h-40 mt-4 md:mt-0 md:mx-auto",children:[_.jsx(mY,{systemUsage:Number(r==null?void 0:r.cpu.usage.system)||0,processUsage:Number(r==null?void 0:r.cpu.usage.karin)||0,title:"CPU占用"}),_.jsx(mY,{systemUsage:e.system,processUsage:e.karin,title:"内存占用"})]})]})})};function OQe(){const{error:r}=Xi(()=>or.serverGet("/api/v1/ping"),{pollingInterval:1e3});return _.jsxs("div",{className:"ml-4 flex items-center gap-2",children:[_.jsx("div",{className:Gr("rounded-full w-4 h-4",r?"bg-red-500":"bg-green-500")}),_.jsx("div",{children:r?"离线":"在线"})]})}function tf({title:r,value:e}){return _.jsxs("div",{className:"flex shadow-small rounded-full bg-primary-50 bg-opacity-20 overflow-hidden items-center gap-2",children:[_.jsx("div",{className:"w-24 py-2 px-4 bg-gradient-to-r from-primary-100 to-primary-100/0 text-primary font-bold",children:r}),typeof e=="boolean"?e?"是":"否":e||"--"]})}function $Qe(){const{data:r,error:e}=Xi(()=>or.serverGet("/api/v1/status/karin"),{pollingInterval:1e3});return e||!r?_.jsxs("div",{className:"flex flex-col justify-center items-center gap-2",children:[_.jsx("div",{className:"text-danger text-4xl",children:_.jsx(DDe,{})}),_.jsx("div",{children:"请求错误"})]}):_.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-x-8 gap-y-6",children:[_.jsx(tf,{title:"名称",value:r.name.toUpperCase()}),_.jsx(tf,{title:"PID",value:r.pid}),_.jsx(tf,{title:"PM2 ID",value:r.pm2_id}),_.jsx(tf,{title:"运行时间",value:`${Math.floor(r.uptime)}秒`}),_.jsx(tf,{title:"版本",value:r.version}),_.jsx(tf,{title:"开发模式",value:r.karin_dev}),_.jsx(tf,{title:"语言",value:_.jsxs("div",{className:"flex items-center gap-1",children:[r.karin_lang==="js"?_.jsx(hMe,{className:"text-lg text-yellow-500"}):_.jsx(pMe,{className:"text-lg text-blue-700"}),r.karin_lang.toUpperCase()]})}),_.jsx(tf,{title:"运行环境",value:r.karin_runtime})]})}function zQe(){const[r,e]=D.useState(),t=D.useCallback(()=>{try{return RDe(e)}catch{Da.error("获取系统状态失败")}},[]);return D.useEffect(()=>{const n=t();return()=>{n==null||n.close()}},[t]),_.jsx(NQe,{data:r})}function jQe(){const[r,e]=D.useState(!1),t=Su(),n=Yae(),a=async()=>{n.confirm({title:"重启",content:"确认重启吗",onConfirm:async()=>{try{e(!0),await or.serverPost("/api/v1/restart"),await new Promise(o=>{const s=setInterval(async()=>{try{await or.serverGet("/api/v1/ping"),clearInterval(s),o(null)}catch(l){console.error(l)}},2e3)}),Da.success("重启成功")}catch{Da.error("重启失败")}finally{e(!1)}}})},i=async()=>{n.confirm({title:"关机",content:"确认关机吗",onConfirm:async()=>{try{e(!0),await or.serverPost("/api/v1/exit"),t("/login"),Da.success("关机成功")}catch{Da.error("关机失败")}finally{e(!1)}}})};return _.jsxs("div",{className:"flex gap-2 ml-auto",children:[_.jsx(wn,{content:"重启",showArrow:!0,children:_.jsx(Ze,{className:"btn btn-primary text-lg",isIconOnly:!0,radius:"full",color:"primary",variant:"flat",isDisabled:r,onPress:a,children:_.jsx(i1e,{})})}),_.jsx(wn,{content:"关机",showArrow:!0,children:_.jsx(Ze,{className:"btn btn-primary text-lg",isIconOnly:!0,radius:"full",color:"primary",variant:"shadow",isDisabled:r,onPress:i,children:_.jsx(o1e,{})})})]})}function BQe(){return _.jsxs("section",{className:"flex flex-col gap-4 pt-20 md:pt-8",children:[_.jsxs(Fa,{shadow:"sm",children:[_.jsxs(p3,{className:"pl-6 pr-8 pb-4 pt-6",children:[_.jsx("div",{className:Qne({size:"sm",color:"blue"}),children:"Karin"}),_.jsx(OQe,{}),_.jsx(jQe,{})]}),_.jsx(ms,{className:"px-6 pb-6",children:_.jsx($Qe,{})})]}),_.jsx(Fa,{shadow:"sm",children:_.jsx(ms,{children:_.jsx(zQe,{})})})]})}var ew=r=>r.type==="checkbox",Np=r=>r instanceof Date,Si=r=>r==null;const kde=r=>typeof r=="object";var Hn=r=>!Si(r)&&!Array.isArray(r)&&kde(r)&&!Np(r),Rde=r=>Hn(r)&&r.target?ew(r.target)?r.target.checked:r.target.value:r,VQe=r=>r.substring(0,r.search(/\.\d+(\.|$)/))||r,Nde=(r,e)=>r.has(VQe(e)),FQe=r=>{const e=r.constructor&&r.constructor.prototype;return Hn(e)&&e.hasOwnProperty("isPrototypeOf")},dO=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function ha(r){let e;const t=Array.isArray(r),n=typeof FileList<"u"?r instanceof FileList:!1;if(r instanceof Date)e=new Date(r);else if(r instanceof Set)e=new Set(r);else if(!(dO&&(r instanceof Blob||n))&&(t||Hn(r)))if(e=t?[]:{},!t&&!FQe(r))e=r;else for(const a in r)r.hasOwnProperty(a)&&(e[a]=ha(r[a]));else return r;return e}var tw=r=>Array.isArray(r)?r.filter(Boolean):[],un=r=>r===void 0,Ye=(r,e,t)=>{if(!e||!Hn(r))return t;const n=tw(e.split(/[,[\].]+?/)).reduce((a,i)=>Si(a)?a:a[i],r);return un(n)||n===r?un(r[e])?t:r[e]:n},ts=r=>typeof r=="boolean",fO=r=>/^\w*$/.test(r),Ode=r=>tw(r.replace(/["|']|\]/g,"").split(/\.|\[/)),Dr=(r,e,t)=>{let n=-1;const a=fO(e)?[e]:Ode(e),i=a.length,o=i-1;for(;++n<i;){const s=a[n];let l=t;if(n!==o){const u=r[s];l=Hn(u)||Array.isArray(u)?u:isNaN(+a[n+1])?{}:[]}if(s==="__proto__"||s==="constructor"||s==="prototype")return;r[s]=l,r=r[s]}return r};const sA={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},cs={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},lc={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},HQe=Be.createContext(null),f5=()=>Be.useContext(HQe);var $de=(r,e,t,n=!0)=>{const a={defaultValues:e._defaultValues};for(const i in r)Object.defineProperty(a,i,{get:()=>{const o=i;return e._proxyFormState[o]!==cs.all&&(e._proxyFormState[o]=!n||cs.all),t&&(t[o]=!0),r[o]}});return a},bi=r=>Hn(r)&&!Object.keys(r).length,zde=(r,e,t,n)=>{t(r);const{name:a,...i}=r;return bi(i)||Object.keys(i).length>=Object.keys(e).length||Object.keys(i).find(o=>e[o]===(!n||cs.all))},Ki=r=>Array.isArray(r)?r:[r],jde=(r,e,t)=>!r||!e||r===e||Ki(r).some(n=>n&&(t?n===e:n.startsWith(e)||e.startsWith(n)));function h5(r){const e=Be.useRef(r);e.current=r,Be.useEffect(()=>{const t=!r.disabled&&e.current.subject&&e.current.subject.subscribe({next:e.current.next});return()=>{t&&t.unsubscribe()}},[r.disabled])}function UQe(r){const e=f5(),{control:t=e.control,disabled:n,name:a,exact:i}=r||{},[o,s]=Be.useState(t._formState),l=Be.useRef(!0),u=Be.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),c=Be.useRef(a);return c.current=a,h5({disabled:n,next:d=>l.current&&jde(c.current,d.name,i)&&zde(d,u.current,t._updateFormState)&&s({...t._formState,...d}),subject:t._subjects.state}),Be.useEffect(()=>(l.current=!0,u.current.isValid&&t._updateValid(!0),()=>{l.current=!1}),[t]),Be.useMemo(()=>$de(o,t,u.current,!1),[o,t])}var eu=r=>typeof r=="string",Bde=(r,e,t,n,a)=>eu(r)?(n&&e.watch.add(r),Ye(t,r,a)):Array.isArray(r)?r.map(i=>(n&&e.watch.add(i),Ye(t,i))):(n&&(e.watchAll=!0),t);function GQe(r){const e=f5(),{control:t=e.control,name:n,defaultValue:a,disabled:i,exact:o}=r||{},s=Be.useRef(n);s.current=n,h5({disabled:i,subject:t._subjects.values,next:c=>{jde(s.current,c.name,o)&&u(ha(Bde(s.current,t._names,c.values||t._formValues,!1,a)))}});const[l,u]=Be.useState(t._getWatch(n,a));return Be.useEffect(()=>t._removeUnmounted()),l}function qQe(r){const e=f5(),{name:t,disabled:n,control:a=e.control,shouldUnregister:i}=r,o=Nde(a._names.array,t),s=GQe({control:a,name:t,defaultValue:Ye(a._formValues,t,Ye(a._defaultValues,t,r.defaultValue)),exact:!0}),l=UQe({control:a,name:t,exact:!0}),u=Be.useRef(a.register(t,{...r.rules,value:s,...ts(r.disabled)?{disabled:r.disabled}:{}})),c=Be.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Ye(l.errors,t)},isDirty:{enumerable:!0,get:()=>!!Ye(l.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!Ye(l.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!Ye(l.validatingFields,t)},error:{enumerable:!0,get:()=>Ye(l.errors,t)}}),[l,t]),d=Be.useMemo(()=>({name:t,value:s,...ts(n)||l.disabled?{disabled:l.disabled||n}:{},onChange:f=>u.current.onChange({target:{value:Rde(f),name:t},type:sA.CHANGE}),onBlur:()=>u.current.onBlur({target:{value:Ye(a._formValues,t),name:t},type:sA.BLUR}),ref:f=>{const h=Ye(a._fields,t);h&&f&&(h._f.ref={focus:()=>f.focus(),select:()=>f.select(),setCustomValidity:v=>f.setCustomValidity(v),reportValidity:()=>f.reportValidity()})}}),[t,a._formValues,n,l.disabled,s,a._fields]);return Be.useEffect(()=>{const f=a._options.shouldUnregister||i,h=(v,m)=>{const y=Ye(a._fields,v);y&&y._f&&(y._f.mount=m)};if(h(t,!0),f){const v=ha(Ye(a._options.defaultValues,t));Dr(a._defaultValues,t,v),un(Ye(a._formValues,t))&&Dr(a._formValues,t,v)}return!o&&a.register(t),()=>{(o?f&&!a._state.action:f)?a.unregister(t):h(t,!1)}},[t,a,o,i]),Be.useEffect(()=>{a._updateDisabledField({disabled:n,fields:a._fields,name:t})},[n,t,a]),Be.useMemo(()=>({field:d,formState:l,fieldState:c}),[d,l,c])}const om=r=>r.render(qQe(r));var Vde=(r,e,t,n,a)=>e?{...t[r],types:{...t[r]&&t[r].types?t[r].types:{},[n]:a||!0}}:{},rf=()=>{const r=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=(Math.random()*16+r)%16|0;return(e=="x"?t:t&3|8).toString(16)})},iP=(r,e,t={})=>t.shouldFocus||un(t.shouldFocus)?t.focusName||`${r}.${un(t.focusIndex)?e:t.focusIndex}.`:"",Yb=r=>({isOnSubmit:!r||r===cs.onSubmit,isOnBlur:r===cs.onBlur,isOnChange:r===cs.onChange,isOnAll:r===cs.all,isOnTouch:r===cs.onTouched}),Fk=(r,e,t)=>!t&&(e.watchAll||e.watch.has(r)||[...e.watch].some(n=>r.startsWith(n)&&/^\.\w+/.test(r.slice(n.length))));const Um=(r,e,t,n)=>{for(const a of t||Object.keys(r)){const i=Ye(r,a);if(i){const{_f:o,...s}=i;if(o){if(o.refs&&o.refs[0]&&e(o.refs[0],a)&&!n)return!0;if(o.ref&&e(o.ref,o.name)&&!n)return!0;if(Um(s,e))break}else if(Hn(s)&&Um(s,e))break}}};var Fde=(r,e,t)=>{const n=Ki(Ye(r,t));return Dr(n,"root",e[t]),Dr(r,t,n),r},hO=r=>r.type==="file",Wl=r=>typeof r=="function",lA=r=>{if(!dO)return!1;const e=r?r.ownerDocument:0;return r instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},RC=r=>eu(r),pO=r=>r.type==="radio",uA=r=>r instanceof RegExp;const yY={value:!1,isValid:!1},bY={value:!0,isValid:!0};var Hde=r=>{if(Array.isArray(r)){if(r.length>1){const e=r.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:e,isValid:!!e.length}}return r[0].checked&&!r[0].disabled?r[0].attributes&&!un(r[0].attributes.value)?un(r[0].value)||r[0].value===""?bY:{value:r[0].value,isValid:!0}:bY:yY}return yY};const xY={isValid:!1,value:null};var Ude=r=>Array.isArray(r)?r.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,xY):xY;function wY(r,e,t="validate"){if(RC(r)||Array.isArray(r)&&r.every(RC)||ts(r)&&!r)return{type:t,message:RC(r)?r:"",ref:e}}var Kg=r=>Hn(r)&&!uA(r)?r:{value:r,message:""},Hk=async(r,e,t,n,a,i)=>{const{ref:o,refs:s,required:l,maxLength:u,minLength:c,min:d,max:f,pattern:h,validate:v,name:m,valueAsNumber:y,mount:b}=r._f,w=Ye(t,m);if(!b||e.has(m))return{};const S=s?s[0]:o,T=O=>{a&&S.reportValidity&&(S.setCustomValidity(ts(O)?"":O||""),S.reportValidity())},A={},M=pO(o),P=ew(o),E=M||P,R=(y||hO(o))&&un(o.value)&&un(w)||lA(o)&&o.value===""||w===""||Array.isArray(w)&&!w.length,N=Vde.bind(null,m,n,A),k=(O,L,$,j=lc.maxLength,B=lc.minLength)=>{const H=O?L:$;A[m]={type:O?j:B,message:H,ref:o,...N(O?j:B,H)}};if(i?!Array.isArray(w)||!w.length:l&&(!E&&(R||Si(w))||ts(w)&&!w||P&&!Hde(s).isValid||M&&!Ude(s).isValid)){const{value:O,message:L}=RC(l)?{value:!!l,message:l}:Kg(l);if(O&&(A[m]={type:lc.required,message:L,ref:S,...N(lc.required,L)},!n))return T(L),A}if(!R&&(!Si(d)||!Si(f))){let O,L;const $=Kg(f),j=Kg(d);if(!Si(w)&&!isNaN(w)){const B=o.valueAsNumber||w&&+w;Si($.value)||(O=B>$.value),Si(j.value)||(L=B<j.value)}else{const B=o.valueAsDate||new Date(w),H=U=>new Date(new Date().toDateString()+" "+U),F=o.type=="time",K=o.type=="week";eu($.value)&&w&&(O=F?H(w)>H($.value):K?w>$.value:B>new Date($.value)),eu(j.value)&&w&&(L=F?H(w)<H(j.value):K?w<j.value:B<new Date(j.value))}if((O||L)&&(k(!!O,$.message,j.message,lc.max,lc.min),!n))return T(A[m].message),A}if((u||c)&&!R&&(eu(w)||i&&Array.isArray(w))){const O=Kg(u),L=Kg(c),$=!Si(O.value)&&w.length>+O.value,j=!Si(L.value)&&w.length<+L.value;if(($||j)&&(k($,O.message,L.message),!n))return T(A[m].message),A}if(h&&!R&&eu(w)){const{value:O,message:L}=Kg(h);if(uA(O)&&!w.match(O)&&(A[m]={type:lc.pattern,message:L,ref:o,...N(lc.pattern,L)},!n))return T(L),A}if(v){if(Wl(v)){const O=await v(w,t),L=wY(O,S);if(L&&(A[m]={...L,...N(lc.validate,L.message)},!n))return T(L.message),A}else if(Hn(v)){let O={};for(const L in v){if(!bi(O)&&!n)break;const $=wY(await v[L](w,t),S,L);$&&(O={...$,...N(L,$.message)},T($.message),n&&(A[m]=O))}if(!bi(O)&&(A[m]={ref:S,...O},!n))return A}}return T(!0),A},oP=(r,e)=>[...r,...Ki(e)],sP=r=>Array.isArray(r)?r.map(()=>{}):void 0;function lP(r,e,t){return[...r.slice(0,e),...Ki(t),...r.slice(e)]}var uP=(r,e,t)=>Array.isArray(r)?(un(r[t])&&(r[t]=void 0),r.splice(t,0,r.splice(e,1)[0]),r):[],cP=(r,e)=>[...Ki(e),...Ki(r)];function QQe(r,e){let t=0;const n=[...r];for(const a of e)n.splice(a-t,1),t++;return tw(n).length?n:[]}var dP=(r,e)=>un(e)?[]:QQe(r,Ki(e).sort((t,n)=>t-n)),fP=(r,e,t)=>{[r[e],r[t]]=[r[t],r[e]]};function WQe(r,e){const t=e.slice(0,-1).length;let n=0;for(;n<t;)r=un(r)?n++:r[e[n++]];return r}function KQe(r){for(const e in r)if(r.hasOwnProperty(e)&&!un(r[e]))return!1;return!0}function ra(r,e){const t=Array.isArray(e)?e:fO(e)?[e]:Ode(e),n=t.length===1?r:WQe(r,t),a=t.length-1,i=t[a];return n&&delete n[i],a!==0&&(Hn(n)&&bi(n)||Array.isArray(n)&&KQe(n))&&ra(r,t.slice(0,-1)),r}var SY=(r,e,t)=>(r[e]=t,r);function Gde(r){const e=f5(),{control:t=e.control,name:n,keyName:a="id",shouldUnregister:i,rules:o}=r,[s,l]=Be.useState(t._getFieldArray(n)),u=Be.useRef(t._getFieldArray(n).map(rf)),c=Be.useRef(s),d=Be.useRef(n),f=Be.useRef(!1);d.current=n,c.current=s,t._names.array.add(n),o&&t.register(n,o),h5({next:({values:M,name:P})=>{if(P===d.current||!P){const E=Ye(M,d.current);Array.isArray(E)&&(l(E),u.current=E.map(rf))}},subject:t._subjects.array});const h=Be.useCallback(M=>{f.current=!0,t._updateFieldArray(n,M)},[t,n]),v=(M,P)=>{const E=Ki(ha(M)),R=oP(t._getFieldArray(n),E);t._names.focus=iP(n,R.length-1,P),u.current=oP(u.current,E.map(rf)),h(R),l(R),t._updateFieldArray(n,R,oP,{argA:sP(M)})},m=(M,P)=>{const E=Ki(ha(M)),R=cP(t._getFieldArray(n),E);t._names.focus=iP(n,0,P),u.current=cP(u.current,E.map(rf)),h(R),l(R),t._updateFieldArray(n,R,cP,{argA:sP(M)})},y=M=>{const P=dP(t._getFieldArray(n),M);u.current=dP(u.current,M),h(P),l(P),!Array.isArray(Ye(t._fields,n))&&Dr(t._fields,n,void 0),t._updateFieldArray(n,P,dP,{argA:M})},b=(M,P,E)=>{const R=Ki(ha(P)),N=lP(t._getFieldArray(n),M,R);t._names.focus=iP(n,M,E),u.current=lP(u.current,M,R.map(rf)),h(N),l(N),t._updateFieldArray(n,N,lP,{argA:M,argB:sP(P)})},w=(M,P)=>{const E=t._getFieldArray(n);fP(E,M,P),fP(u.current,M,P),h(E),l(E),t._updateFieldArray(n,E,fP,{argA:M,argB:P},!1)},S=(M,P)=>{const E=t._getFieldArray(n);uP(E,M,P),uP(u.current,M,P),h(E),l(E),t._updateFieldArray(n,E,uP,{argA:M,argB:P},!1)},T=(M,P)=>{const E=ha(P),R=SY(t._getFieldArray(n),M,E);u.current=[...R].map((N,k)=>!N||k===M?rf():u.current[k]),h(R),l([...R]),t._updateFieldArray(n,R,SY,{argA:M,argB:E},!0,!1)},A=M=>{const P=Ki(ha(M));u.current=P.map(rf),h([...P]),l([...P]),t._updateFieldArray(n,[...P],E=>E,{},!0,!1)};return Be.useEffect(()=>{if(t._state.action=!1,Fk(n,t._names)&&t._subjects.state.next({...t._formState}),f.current&&(!Yb(t._options.mode).isOnSubmit||t._formState.isSubmitted))if(t._options.resolver)t._executeSchema([n]).then(M=>{const P=Ye(M.errors,n),E=Ye(t._formState.errors,n);(E?!P&&E.type||P&&(E.type!==P.type||E.message!==P.message):P&&P.type)&&(P?Dr(t._formState.errors,n,P):ra(t._formState.errors,n),t._subjects.state.next({errors:t._formState.errors}))});else{const M=Ye(t._fields,n);M&&M._f&&!(Yb(t._options.reValidateMode).isOnSubmit&&Yb(t._options.mode).isOnSubmit)&&Hk(M,t._names.disabled,t._formValues,t._options.criteriaMode===cs.all,t._options.shouldUseNativeValidation,!0).then(P=>!bi(P)&&t._subjects.state.next({errors:Fde(t._formState.errors,P,n)}))}t._subjects.values.next({name:n,values:{...t._formValues}}),t._names.focus&&Um(t._fields,(M,P)=>{if(t._names.focus&&P.startsWith(t._names.focus)&&M.focus)return M.focus(),1}),t._names.focus="",t._updateValid(),f.current=!1},[s,n,t]),Be.useEffect(()=>(!Ye(t._formValues,n)&&t._updateFieldArray(n),()=>{(t._options.shouldUnregister||i)&&t.unregister(n)}),[n,t,a,i]),{swap:Be.useCallback(w,[h,n,t]),move:Be.useCallback(S,[h,n,t]),prepend:Be.useCallback(m,[h,n,t]),append:Be.useCallback(v,[h,n,t]),remove:Be.useCallback(y,[h,n,t]),insert:Be.useCallback(b,[h,n,t]),update:Be.useCallback(T,[h,n,t]),replace:Be.useCallback(A,[h,n,t]),fields:Be.useMemo(()=>s.map((M,P)=>({...M,[a]:u.current[P]||rf()})),[s,a])}}var hP=()=>{let r=[];return{get observers(){return r},next:a=>{for(const i of r)i.next&&i.next(a)},subscribe:a=>(r.push(a),{unsubscribe:()=>{r=r.filter(i=>i!==a)}}),unsubscribe:()=>{r=[]}}},Uk=r=>Si(r)||!kde(r);function hf(r,e){if(Uk(r)||Uk(e))return r===e;if(Np(r)&&Np(e))return r.getTime()===e.getTime();const t=Object.keys(r),n=Object.keys(e);if(t.length!==n.length)return!1;for(const a of t){const i=r[a];if(!n.includes(a))return!1;if(a!=="ref"){const o=e[a];if(Np(i)&&Np(o)||Hn(i)&&Hn(o)||Array.isArray(i)&&Array.isArray(o)?!hf(i,o):i!==o)return!1}}return!0}var qde=r=>r.type==="select-multiple",YQe=r=>pO(r)||ew(r),pP=r=>lA(r)&&r.isConnected,Qde=r=>{for(const e in r)if(Wl(r[e]))return!0;return!1};function cA(r,e={}){const t=Array.isArray(r);if(Hn(r)||t)for(const n in r)Array.isArray(r[n])||Hn(r[n])&&!Qde(r[n])?(e[n]=Array.isArray(r[n])?[]:{},cA(r[n],e[n])):Si(r[n])||(e[n]=!0);return e}function Wde(r,e,t){const n=Array.isArray(r);if(Hn(r)||n)for(const a in r)Array.isArray(r[a])||Hn(r[a])&&!Qde(r[a])?un(e)||Uk(t[a])?t[a]=Array.isArray(r[a])?cA(r[a],[]):{...cA(r[a])}:Wde(r[a],Si(e)?{}:e[a],t[a]):t[a]=!hf(r[a],e[a]);return t}var V1=(r,e)=>Wde(r,e,cA(e)),Kde=(r,{valueAsNumber:e,valueAsDate:t,setValueAs:n})=>un(r)?r:e?r===""?NaN:r&&+r:t&&eu(r)?new Date(r):n?n(r):r;function vP(r){const e=r.ref;return hO(e)?e.files:pO(e)?Ude(r.refs).value:qde(e)?[...e.selectedOptions].map(({value:t})=>t):ew(e)?Hde(r.refs).value:Kde(un(e.value)?r.ref.value:e.value,r)}var ZQe=(r,e,t,n)=>{const a={};for(const i of r){const o=Ye(e,i);o&&Dr(a,i,o._f)}return{criteriaMode:t,names:[...r],fields:a,shouldUseNativeValidation:n}},F1=r=>un(r)?r:uA(r)?r.source:Hn(r)?uA(r.value)?r.value.source:r.value:r;const _Y="AsyncFunction";var XQe=r=>!!r&&!!r.validate&&!!(Wl(r.validate)&&r.validate.constructor.name===_Y||Hn(r.validate)&&Object.values(r.validate).find(e=>e.constructor.name===_Y)),JQe=r=>r.mount&&(r.required||r.min||r.max||r.maxLength||r.minLength||r.pattern||r.validate);function CY(r,e,t){const n=Ye(r,t);if(n||fO(t))return{error:n,name:t};const a=t.split(".");for(;a.length;){const i=a.join("."),o=Ye(e,i),s=Ye(r,i);if(o&&!Array.isArray(o)&&t!==i)return{name:t};if(s&&s.type)return{name:i,error:s};a.pop()}return{name:t}}var eWe=(r,e,t,n,a)=>a.isOnAll?!1:!t&&a.isOnTouch?!(e||r):(t?n.isOnBlur:a.isOnBlur)?!r:(t?n.isOnChange:a.isOnChange)?r:!0,tWe=(r,e)=>!tw(Ye(r,e)).length&&ra(r,e);const rWe={mode:cs.onSubmit,reValidateMode:cs.onChange,shouldFocusError:!0};function nWe(r={}){let e={...rWe,...r},t={submitCount:0,isDirty:!1,isLoading:Wl(e.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1},n={},a=Hn(e.defaultValues)||Hn(e.values)?ha(e.defaultValues||e.values)||{}:{},i=e.shouldUnregister?{}:ha(a),o={action:!1,mount:!1,watch:!1},s={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,u=0;const c={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={values:hP(),array:hP(),state:hP()},f=Yb(e.mode),h=Yb(e.reValidateMode),v=e.criteriaMode===cs.all,m=ee=>te=>{clearTimeout(u),u=setTimeout(ee,te)},y=async ee=>{if(!e.disabled&&(c.isValid||ee)){const te=e.resolver?bi((await E()).errors):await N(n,!0);te!==t.isValid&&d.state.next({isValid:te})}},b=(ee,te)=>{!e.disabled&&(c.isValidating||c.validatingFields)&&((ee||Array.from(s.mount)).forEach(de=>{de&&(te?Dr(t.validatingFields,de,te):ra(t.validatingFields,de))}),d.state.next({validatingFields:t.validatingFields,isValidating:!bi(t.validatingFields)}))},w=(ee,te=[],de,ye,xe=!0,Te=!0)=>{if(ye&&de&&!e.disabled){if(o.action=!0,Te&&Array.isArray(Ye(n,ee))){const ke=de(Ye(n,ee),ye.argA,ye.argB);xe&&Dr(n,ee,ke)}if(Te&&Array.isArray(Ye(t.errors,ee))){const ke=de(Ye(t.errors,ee),ye.argA,ye.argB);xe&&Dr(t.errors,ee,ke),tWe(t.errors,ee)}if(c.touchedFields&&Te&&Array.isArray(Ye(t.touchedFields,ee))){const ke=de(Ye(t.touchedFields,ee),ye.argA,ye.argB);xe&&Dr(t.touchedFields,ee,ke)}c.dirtyFields&&(t.dirtyFields=V1(a,i)),d.state.next({name:ee,isDirty:O(ee,te),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else Dr(i,ee,te)},S=(ee,te)=>{Dr(t.errors,ee,te),d.state.next({errors:t.errors})},T=ee=>{t.errors=ee,d.state.next({errors:t.errors,isValid:!1})},A=(ee,te,de,ye)=>{const xe=Ye(n,ee);if(xe){const Te=Ye(i,ee,un(de)?Ye(a,ee):de);un(Te)||ye&&ye.defaultChecked||te?Dr(i,ee,te?Te:vP(xe._f)):j(ee,Te),o.mount&&y()}},M=(ee,te,de,ye,xe)=>{let Te=!1,ke=!1;const Ue={name:ee};if(!e.disabled){const Xe=!!(Ye(n,ee)&&Ye(n,ee)._f&&Ye(n,ee)._f.disabled);if(!de||ye){c.isDirty&&(ke=t.isDirty,t.isDirty=Ue.isDirty=O(),Te=ke!==Ue.isDirty);const Ee=Xe||hf(Ye(a,ee),te);ke=!!(!Xe&&Ye(t.dirtyFields,ee)),Ee||Xe?ra(t.dirtyFields,ee):Dr(t.dirtyFields,ee,!0),Ue.dirtyFields=t.dirtyFields,Te=Te||c.dirtyFields&&ke!==!Ee}if(de){const Ee=Ye(t.touchedFields,ee);Ee||(Dr(t.touchedFields,ee,de),Ue.touchedFields=t.touchedFields,Te=Te||c.touchedFields&&Ee!==de)}Te&&xe&&d.state.next(Ue)}return Te?Ue:{}},P=(ee,te,de,ye)=>{const xe=Ye(t.errors,ee),Te=c.isValid&&ts(te)&&t.isValid!==te;if(e.delayError&&de?(l=m(()=>S(ee,de)),l(e.delayError)):(clearTimeout(u),l=null,de?Dr(t.errors,ee,de):ra(t.errors,ee)),(de?!hf(xe,de):xe)||!bi(ye)||Te){const ke={...ye,...Te&&ts(te)?{isValid:te}:{},errors:t.errors,name:ee};t={...t,...ke},d.state.next(ke)}},E=async ee=>{b(ee,!0);const te=await e.resolver(i,e.context,ZQe(ee||s.mount,n,e.criteriaMode,e.shouldUseNativeValidation));return b(ee),te},R=async ee=>{const{errors:te}=await E(ee);if(ee)for(const de of ee){const ye=Ye(te,de);ye?Dr(t.errors,de,ye):ra(t.errors,de)}else t.errors=te;return te},N=async(ee,te,de={valid:!0})=>{for(const ye in ee){const xe=ee[ye];if(xe){const{_f:Te,...ke}=xe;if(Te){const Ue=s.array.has(Te.name),Xe=xe._f&&XQe(xe._f);Xe&&c.validatingFields&&b([ye],!0);const Ee=await Hk(xe,s.disabled,i,v,e.shouldUseNativeValidation&&!te,Ue);if(Xe&&c.validatingFields&&b([ye]),Ee[Te.name]&&(de.valid=!1,te))break;!te&&(Ye(Ee,Te.name)?Ue?Fde(t.errors,Ee,Te.name):Dr(t.errors,Te.name,Ee[Te.name]):ra(t.errors,Te.name))}!bi(ke)&&await N(ke,te,de)}}return de.valid},k=()=>{for(const ee of s.unMount){const te=Ye(n,ee);te&&(te._f.refs?te._f.refs.every(de=>!pP(de)):!pP(te._f.ref))&&re(ee)}s.unMount=new Set},O=(ee,te)=>!e.disabled&&(ee&&te&&Dr(i,ee,te),!hf(V(),a)),L=(ee,te,de)=>Bde(ee,s,{...o.mount?i:un(te)?a:eu(ee)?{[ee]:te}:te},de,te),$=ee=>tw(Ye(o.mount?i:a,ee,e.shouldUnregister?Ye(a,ee,[]):[])),j=(ee,te,de={})=>{const ye=Ye(n,ee);let xe=te;if(ye){const Te=ye._f;Te&&(!Te.disabled&&Dr(i,ee,Kde(te,Te)),xe=lA(Te.ref)&&Si(te)?"":te,qde(Te.ref)?[...Te.ref.options].forEach(ke=>ke.selected=xe.includes(ke.value)):Te.refs?ew(Te.ref)?Te.refs.length>1?Te.refs.forEach(ke=>(!ke.defaultChecked||!ke.disabled)&&(ke.checked=Array.isArray(xe)?!!xe.find(Ue=>Ue===ke.value):xe===ke.value)):Te.refs[0]&&(Te.refs[0].checked=!!xe):Te.refs.forEach(ke=>ke.checked=ke.value===xe):hO(Te.ref)?Te.ref.value="":(Te.ref.value=xe,Te.ref.type||d.values.next({name:ee,values:{...i}})))}(de.shouldDirty||de.shouldTouch)&&M(ee,xe,de.shouldTouch,de.shouldDirty,!0),de.shouldValidate&&U(ee)},B=(ee,te,de)=>{for(const ye in te){const xe=te[ye],Te=`${ee}.${ye}`,ke=Ye(n,Te);(s.array.has(ee)||Hn(xe)||ke&&!ke._f)&&!Np(xe)?B(Te,xe,de):j(Te,xe,de)}},H=(ee,te,de={})=>{const ye=Ye(n,ee),xe=s.array.has(ee),Te=ha(te);Dr(i,ee,Te),xe?(d.array.next({name:ee,values:{...i}}),(c.isDirty||c.dirtyFields)&&de.shouldDirty&&d.state.next({name:ee,dirtyFields:V1(a,i),isDirty:O(ee,Te)})):ye&&!ye._f&&!Si(Te)?B(ee,Te,de):j(ee,Te,de),Fk(ee,s)&&d.state.next({...t}),d.values.next({name:o.mount?ee:void 0,values:{...i}})},F=async ee=>{o.mount=!0;const te=ee.target;let de=te.name,ye=!0;const xe=Ye(n,de),Te=()=>te.type?vP(xe._f):Rde(ee),ke=Ue=>{ye=Number.isNaN(Ue)||Np(Ue)&&isNaN(Ue.getTime())||hf(Ue,Ye(i,de,Ue))};if(xe){let Ue,Xe;const Ee=Te(),at=ee.type===sA.BLUR||ee.type===sA.FOCUS_OUT,$t=!JQe(xe._f)&&!e.resolver&&!Ye(t.errors,de)&&!xe._f.deps||eWe(at,Ye(t.touchedFields,de),t.isSubmitted,h,f),jt=Fk(de,s,at);Dr(i,de,Ee),at?(xe._f.onBlur&&xe._f.onBlur(ee),l&&l(0)):xe._f.onChange&&xe._f.onChange(ee);const wr=M(de,Ee,at,!1),Sr=!bi(wr)||jt;if(!at&&d.values.next({name:de,type:ee.type,values:{...i}}),$t)return c.isValid&&(e.mode==="onBlur"&&at?y():at||y()),Sr&&d.state.next({name:de,...jt?{}:wr});if(!at&&jt&&d.state.next({...t}),e.resolver){const{errors:Ar}=await E([de]);if(ke(Ee),ye){const Pt=CY(t.errors,n,de),_n=CY(Ar,n,Pt.name||de);Ue=_n.error,de=_n.name,Xe=bi(Ar)}}else b([de],!0),Ue=(await Hk(xe,s.disabled,i,v,e.shouldUseNativeValidation))[de],b([de]),ke(Ee),ye&&(Ue?Xe=!1:c.isValid&&(Xe=await N(n,!0)));ye&&(xe._f.deps&&U(xe._f.deps),P(de,Xe,Ue,wr))}},K=(ee,te)=>{if(Ye(t.errors,te)&&ee.focus)return ee.focus(),1},U=async(ee,te={})=>{let de,ye;const xe=Ki(ee);if(e.resolver){const Te=await R(un(ee)?ee:xe);de=bi(Te),ye=ee?!xe.some(ke=>Ye(Te,ke)):de}else ee?(ye=(await Promise.all(xe.map(async Te=>{const ke=Ye(n,Te);return await N(ke&&ke._f?{[Te]:ke}:ke)}))).every(Boolean),!(!ye&&!t.isValid)&&y()):ye=de=await N(n);return d.state.next({...!eu(ee)||c.isValid&&de!==t.isValid?{}:{name:ee},...e.resolver||!ee?{isValid:de}:{},errors:t.errors}),te.shouldFocus&&!ye&&Um(n,K,ee?xe:s.mount),ye},V=ee=>{const te={...o.mount?i:a};return un(ee)?te:eu(ee)?Ye(te,ee):ee.map(de=>Ye(te,de))},Q=(ee,te)=>({invalid:!!Ye((te||t).errors,ee),isDirty:!!Ye((te||t).dirtyFields,ee),error:Ye((te||t).errors,ee),isValidating:!!Ye(t.validatingFields,ee),isTouched:!!Ye((te||t).touchedFields,ee)}),Z=ee=>{ee&&Ki(ee).forEach(te=>ra(t.errors,te)),d.state.next({errors:ee?t.errors:{}})},Y=(ee,te,de)=>{const ye=(Ye(n,ee,{_f:{}})._f||{}).ref,xe=Ye(t.errors,ee)||{},{ref:Te,message:ke,type:Ue,...Xe}=xe;Dr(t.errors,ee,{...Xe,...te,ref:ye}),d.state.next({name:ee,errors:t.errors,isValid:!1}),de&&de.shouldFocus&&ye&&ye.focus&&ye.focus()},X=(ee,te)=>Wl(ee)?d.values.subscribe({next:de=>ee(L(void 0,te),de)}):L(ee,te,!0),re=(ee,te={})=>{for(const de of ee?Ki(ee):s.mount)s.mount.delete(de),s.array.delete(de),te.keepValue||(ra(n,de),ra(i,de)),!te.keepError&&ra(t.errors,de),!te.keepDirty&&ra(t.dirtyFields,de),!te.keepTouched&&ra(t.touchedFields,de),!te.keepIsValidating&&ra(t.validatingFields,de),!e.shouldUnregister&&!te.keepDefaultValue&&ra(a,de);d.values.next({values:{...i}}),d.state.next({...t,...te.keepDirty?{isDirty:O()}:{}}),!te.keepIsValid&&y()},oe=({disabled:ee,name:te,field:de,fields:ye})=>{(ts(ee)&&o.mount||ee||s.disabled.has(te))&&(ee?s.disabled.add(te):s.disabled.delete(te),M(te,vP(de?de._f:Ye(ye,te)._f),!1,!1,!0))},ae=(ee,te={})=>{let de=Ye(n,ee);const ye=ts(te.disabled)||ts(e.disabled);return Dr(n,ee,{...de||{},_f:{...de&&de._f?de._f:{ref:{name:ee}},name:ee,mount:!0,...te}}),s.mount.add(ee),de?oe({field:de,disabled:ts(te.disabled)?te.disabled:e.disabled,name:ee}):A(ee,!0,te.value),{...ye?{disabled:te.disabled||e.disabled}:{},...e.progressive?{required:!!te.required,min:F1(te.min),max:F1(te.max),minLength:F1(te.minLength),maxLength:F1(te.maxLength),pattern:F1(te.pattern)}:{},name:ee,onChange:F,onBlur:F,ref:xe=>{if(xe){ae(ee,te),de=Ye(n,ee);const Te=un(xe.value)&&xe.querySelectorAll&&xe.querySelectorAll("input,select,textarea")[0]||xe,ke=YQe(Te),Ue=de._f.refs||[];if(ke?Ue.find(Xe=>Xe===Te):Te===de._f.ref)return;Dr(n,ee,{_f:{...de._f,...ke?{refs:[...Ue.filter(pP),Te,...Array.isArray(Ye(a,ee))?[{}]:[]],ref:{type:Te.type,name:ee}}:{ref:Te}}}),A(ee,!1,void 0,Te)}else de=Ye(n,ee,{}),de._f&&(de._f.mount=!1),(e.shouldUnregister||te.shouldUnregister)&&!(Nde(s.array,ee)&&o.action)&&s.unMount.add(ee)}}},se=()=>e.shouldFocusError&&Um(n,K,s.mount),le=ee=>{ts(ee)&&(d.state.next({disabled:ee}),Um(n,(te,de)=>{const ye=Ye(n,de);ye&&(te.disabled=ye._f.disabled||ee,Array.isArray(ye._f.refs)&&ye._f.refs.forEach(xe=>{xe.disabled=ye._f.disabled||ee}))},0,!1))},fe=(ee,te)=>async de=>{let ye;de&&(de.preventDefault&&de.preventDefault(),de.persist&&de.persist());let xe=ha(i);if(s.disabled.size)for(const Te of s.disabled)Dr(xe,Te,void 0);if(d.state.next({isSubmitting:!0}),e.resolver){const{errors:Te,values:ke}=await E();t.errors=Te,xe=ke}else await N(n);if(ra(t.errors,"root"),bi(t.errors)){d.state.next({errors:{}});try{await ee(xe,de)}catch(Te){ye=Te}}else te&&await te({...t.errors},de),se(),setTimeout(se);if(d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:bi(t.errors)&&!ye,submitCount:t.submitCount+1,errors:t.errors}),ye)throw ye},ve=(ee,te={})=>{Ye(n,ee)&&(un(te.defaultValue)?H(ee,ha(Ye(a,ee))):(H(ee,te.defaultValue),Dr(a,ee,ha(te.defaultValue))),te.keepTouched||ra(t.touchedFields,ee),te.keepDirty||(ra(t.dirtyFields,ee),t.isDirty=te.defaultValue?O(ee,ha(Ye(a,ee))):O()),te.keepError||(ra(t.errors,ee),c.isValid&&y()),d.state.next({...t}))},pe=(ee,te={})=>{const de=ee?ha(ee):a,ye=ha(de),xe=bi(ee),Te=xe?a:ye;if(te.keepDefaultValues||(a=de),!te.keepValues){if(te.keepDirtyValues){const ke=new Set([...s.mount,...Object.keys(V1(a,i))]);for(const Ue of Array.from(ke))Ye(t.dirtyFields,Ue)?Dr(Te,Ue,Ye(i,Ue)):H(Ue,Ye(Te,Ue))}else{if(dO&&un(ee))for(const ke of s.mount){const Ue=Ye(n,ke);if(Ue&&Ue._f){const Xe=Array.isArray(Ue._f.refs)?Ue._f.refs[0]:Ue._f.ref;if(lA(Xe)){const Ee=Xe.closest("form");if(Ee){Ee.reset();break}}}}n={}}i=e.shouldUnregister?te.keepDefaultValues?ha(a):{}:ha(Te),d.array.next({values:{...Te}}),d.values.next({values:{...Te}})}s={mount:te.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!c.isValid||!!te.keepIsValid||!!te.keepDirtyValues,o.watch=!!e.shouldUnregister,d.state.next({submitCount:te.keepSubmitCount?t.submitCount:0,isDirty:xe?!1:te.keepDirty?t.isDirty:!!(te.keepDefaultValues&&!hf(ee,a)),isSubmitted:te.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:xe?{}:te.keepDirtyValues?te.keepDefaultValues&&i?V1(a,i):t.dirtyFields:te.keepDefaultValues&&ee?V1(a,ee):te.keepDirty?t.dirtyFields:{},touchedFields:te.keepTouched?t.touchedFields:{},errors:te.keepErrors?t.errors:{},isSubmitSuccessful:te.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1})},Re=(ee,te)=>pe(Wl(ee)?ee(i):ee,te);return{control:{register:ae,unregister:re,getFieldState:Q,handleSubmit:fe,setError:Y,_executeSchema:E,_getWatch:L,_getDirty:O,_updateValid:y,_removeUnmounted:k,_updateFieldArray:w,_updateDisabledField:oe,_getFieldArray:$,_reset:pe,_resetDefaultValues:()=>Wl(e.defaultValues)&&e.defaultValues().then(ee=>{Re(ee,e.resetOptions),d.state.next({isLoading:!1})}),_updateFormState:ee=>{t={...t,...ee}},_disableForm:le,_subjects:d,_proxyFormState:c,_setErrors:T,get _fields(){return n},get _formValues(){return i},get _state(){return o},set _state(ee){o=ee},get _defaultValues(){return a},get _names(){return s},set _names(ee){s=ee},get _formState(){return t},set _formState(ee){t=ee},get _options(){return e},set _options(ee){e={...e,...ee}}},trigger:U,register:ae,handleSubmit:fe,watch:X,setValue:H,getValues:V,reset:Re,resetField:ve,clearErrors:Z,unregister:re,setError:Y,setFocus:(ee,te={})=>{const de=Ye(n,ee),ye=de&&de._f;if(ye){const xe=ye.refs?ye.refs[0]:ye.ref;xe.focus&&(xe.focus(),te.shouldSelect&&Wl(xe.select)&&xe.select())}},getFieldState:Q}}function vO(r={}){const e=Be.useRef(void 0),t=Be.useRef(void 0),[n,a]=Be.useState({isDirty:!1,isValidating:!1,isLoading:Wl(r.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1,defaultValues:Wl(r.defaultValues)?void 0:r.defaultValues});e.current||(e.current={...nWe(r),formState:n});const i=e.current.control;return i._options=r,h5({subject:i._subjects.state,next:o=>{zde(o,i._proxyFormState,i._updateFormState,!0)&&a({...i._formState})}}),Be.useEffect(()=>i._disableForm(r.disabled),[i,r.disabled]),Be.useEffect(()=>{if(i._proxyFormState.isDirty){const o=i._getDirty();o!==n.isDirty&&i._subjects.state.next({isDirty:o})}},[i,n.isDirty]),Be.useEffect(()=>{r.values&&!hf(r.values,t.current)?(i._reset(r.values,i._options.resetOptions),t.current=r.values,a(o=>({...o}))):i._resetDefaultValues()},[r.values,i]),Be.useEffect(()=>{r.errors&&i._setErrors(r.errors)},[r.errors,i]),Be.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),Be.useEffect(()=>{r.shouldUnregister&&i._subjects.values.next({values:i._getWatch()})},[r.shouldUnregister,i]),e.current.formState=$de(n,i),e.current}function Yde(r){let{id:e,label:t,"aria-labelledby":n,"aria-label":a,labelElementType:i="label"}=r;e=t0(e);let o=t0(),s={};t?(n=n?`${o} ${n}`:o,s={id:o,htmlFor:i==="label"?e:void 0}):!n&&!a&&console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");let l=SSe({id:e,"aria-label":a,"aria-labelledby":n});return{labelProps:s,fieldProps:l}}function gO(r){let{description:e,errorMessage:t,isInvalid:n,validationState:a}=r,{labelProps:i,fieldProps:o}=Yde(r),s=oV([!!e,!!t,n,a]),l=oV([!!e,!!t,n,a]);return o=gs(o,{"aria-describedby":[s,l,r["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:i,fieldProps:o,descriptionProps:{id:s},errorMessageProps:{id:l}}}function mO(r,e,t){let{validationBehavior:n,focus:a}=r;cu(()=>{if(n==="native"&&(t!=null&&t.current)&&!t.current.disabled){let l=e.realtimeValidation.isInvalid?e.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";t.current.setCustomValidity(l),t.current.hasAttribute("title")||(t.current.title=""),e.realtimeValidation.isInvalid||e.updateValidation(iWe(t.current))}});let i=Ci(()=>{e.resetValidation()}),o=Ci(l=>{var u;e.displayValidation.isInvalid||e.commitValidation();let c=t==null||(u=t.current)===null||u===void 0?void 0:u.form;if(!l.defaultPrevented&&t&&c&&oWe(c)===t.current){var d;a?a():(d=t.current)===null||d===void 0||d.focus(),HSe("keyboard")}l.preventDefault()}),s=Ci(()=>{e.commitValidation()});D.useEffect(()=>{let l=t==null?void 0:t.current;if(!l)return;let u=l.form;return l.addEventListener("invalid",o),l.addEventListener("change",s),u==null||u.addEventListener("reset",i),()=>{l.removeEventListener("invalid",o),l.removeEventListener("change",s),u==null||u.removeEventListener("reset",i)}},[t,o,s,i,n])}function aWe(r){let e=r.validity;return{badInput:e.badInput,customError:e.customError,patternMismatch:e.patternMismatch,rangeOverflow:e.rangeOverflow,rangeUnderflow:e.rangeUnderflow,stepMismatch:e.stepMismatch,tooLong:e.tooLong,tooShort:e.tooShort,typeMismatch:e.typeMismatch,valueMissing:e.valueMissing,valid:e.valid}}function iWe(r){return{isInvalid:!r.validity.valid,validationDetails:aWe(r),validationErrors:r.validationMessage?[r.validationMessage]:[]}}function oWe(r){for(let e=0;e<r.elements.length;e++){let t=r.elements[e];if(!t.validity.valid)return t}return null}const yO={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},Zde={...yO,customError:!0,valid:!1},sm={isInvalid:!1,validationDetails:yO,validationErrors:[]},sWe=D.createContext({}),dA="__formValidationState"+Date.now();function rw(r){if(r[dA]){let{realtimeValidation:e,displayValidation:t,updateValidation:n,resetValidation:a,commitValidation:i}=r[dA];return{realtimeValidation:e,displayValidation:t,updateValidation:n,resetValidation:a,commitValidation:i}}return lWe(r)}function lWe(r){let{isInvalid:e,validationState:t,name:n,value:a,builtinValidation:i,validate:o,validationBehavior:s="aria"}=r;t&&(e||(e=t==="invalid"));let l=e!==void 0?{isInvalid:e,validationErrors:[],validationDetails:Zde}:null,u=D.useMemo(()=>{if(!o||a==null)return null;let N=uWe(o,a);return TY(N)},[o,a]);i!=null&&i.validationDetails.valid&&(i=void 0);let c=D.useContext(sWe),d=D.useMemo(()=>n?Array.isArray(n)?n.flatMap(N=>Gk(c[N])):Gk(c[n]):[],[c,n]),[f,h]=D.useState(c),[v,m]=D.useState(!1);c!==f&&(h(c),m(!1));let y=D.useMemo(()=>TY(v?[]:d),[v,d]),b=D.useRef(sm),[w,S]=D.useState(sm),T=D.useRef(sm),A=()=>{if(!M)return;P(!1);let N=u||i||b.current;gP(N,T.current)||(T.current=N,S(N))},[M,P]=D.useState(!1);return D.useEffect(A),{realtimeValidation:l||y||u||i||sm,displayValidation:s==="native"?l||y||w:l||y||u||i||w,updateValidation(N){s==="aria"&&!gP(w,N)?S(N):b.current=N},resetValidation(){let N=sm;gP(N,T.current)||(T.current=N,S(N)),s==="native"&&P(!1),m(!0)},commitValidation(){s==="native"&&P(!0),m(!0)}}}function Gk(r){return r?Array.isArray(r)?r:[r]:[]}function uWe(r,e){if(typeof r=="function"){let t=r(e);if(t&&typeof t!="boolean")return Gk(t)}return[]}function TY(r){return r.length?{isInvalid:!0,validationErrors:r,validationDetails:Zde}:null}function gP(r,e){return r===e?!0:!!r&&!!e&&r.isInvalid===e.isInvalid&&r.validationErrors.length===e.validationErrors.length&&r.validationErrors.every((t,n)=>t===e.validationErrors[n])&&Object.entries(r.validationDetails).every(([t,n])=>e.validationDetails[t]===n)}function cWe(...r){let e=new Set,t=!1,n={...yO};for(let o of r){var a,i;for(let s of o.validationErrors)e.add(s);t||(t=o.isInvalid);for(let s in n)(a=n)[i=s]||(a[i]=o.validationDetails[s])}return n.valid=!t,{isInvalid:t,validationErrors:[...e],validationDetails:n}}function dWe(r,e){let{inputElementType:t="input",isDisabled:n=!1,isRequired:a=!1,isReadOnly:i=!1,type:o="text",validationBehavior:s="aria"}=r,[l,u]=bl(r.value,r.defaultValue||"",r.onChange),{focusableProps:c}=L0(r,e),d=rw({...r,value:l}),{isInvalid:f,validationErrors:h,validationDetails:v}=d.displayValidation,{labelProps:m,fieldProps:y,descriptionProps:b,errorMessageProps:w}=gO({...r,isInvalid:f,errorMessage:r.errorMessage||h}),S=hi(r,{labelable:!0});const T={type:o,pattern:r.pattern};return L8(e,l,u),mO(r,d,e),D.useEffect(()=>{if(e.current instanceof hs(e.current).HTMLTextAreaElement){let A=e.current;Object.defineProperty(A,"defaultValue",{get:()=>A.value,set:()=>{},configurable:!0})}},[e]),{labelProps:m,inputProps:ze(S,t==="input"?T:void 0,{disabled:n,readOnly:i,required:a&&s==="native","aria-required":a&&s==="aria"||void 0,"aria-invalid":f||void 0,"aria-errormessage":r["aria-errormessage"],"aria-activedescendant":r["aria-activedescendant"],"aria-autocomplete":r["aria-autocomplete"],"aria-haspopup":r["aria-haspopup"],value:l,onChange:A=>u(A.target.value),autoComplete:r.autoComplete,autoCapitalize:r.autoCapitalize,maxLength:r.maxLength,minLength:r.minLength,name:r.name,placeholder:r.placeholder,inputMode:r.inputMode,onCopy:r.onCopy,onCut:r.onCut,onPaste:r.onPaste,onCompositionEnd:r.onCompositionEnd,onCompositionStart:r.onCompositionStart,onCompositionUpdate:r.onCompositionUpdate,onSelect:r.onSelect,onBeforeInput:r.onBeforeInput,onInput:r.onInput,...c,...y}),descriptionProps:b,errorMessageProps:w,isInvalid:f,validationErrors:h,validationDetails:v}}var AY=Symbol("default");function Xde(r,e){let t=D.useContext(r);if(e===null)return null;if(t&&typeof t=="object"&&"slots"in t&&t.slots){let n=new Intl.ListFormat().format(Object.keys(t.slots).map(i=>`"${i}"`));if(!e&&!t.slots[AY])throw new Error(`A slot prop is required. Valid slot names are ${n}.`);let a=e||AY;if(!t.slots[a])throw new Error(`Invalid slot "${e}". Valid slot names are ${n}.`);return t.slots[a]}return t}function fWe(r,e,t){let n=Xde(t,r.slot)||{},{ref:a,...i}=n,o=$te(D.useMemo(()=>C2(e,a),[e,a])),s=ze(i,r);return"style"in i&&i.style&&"style"in r&&r.style&&(typeof i.style=="function"||typeof r.style=="function"?s.style=l=>{let u=typeof i.style=="function"?i.style(l):i.style,c={...l.defaultStyle,...u},d=typeof r.style=="function"?r.style({...l,defaultStyle:c}):r.style;return{...c,...d}}:s.style={...i.style,...r.style}),[s,o]}const Jde={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},efe={...Jde,customError:!0,valid:!1},H1={isInvalid:!1,validationDetails:Jde,validationErrors:[]},bO=D.createContext({}),EY="__formValidationState"+Date.now();function hWe(r){if(r[EY]){let{realtimeValidation:e,displayValidation:t,updateValidation:n,resetValidation:a,commitValidation:i}=r[EY];return{realtimeValidation:e,displayValidation:t,updateValidation:n,resetValidation:a,commitValidation:i}}return pWe(r)}function pWe(r){let{isInvalid:e,validationState:t,name:n,value:a,builtinValidation:i,validate:o,validationBehavior:s="aria"}=r;t&&(e||(e=t==="invalid"));let l=e!==void 0?{isInvalid:e,validationErrors:[],validationDetails:efe}:null,u=D.useMemo(()=>{if(!o||a==null)return null;let N=vWe(o,a);return MY(N)},[o,a]);i!=null&&i.validationDetails.valid&&(i=void 0);let c=D.useContext(bO),d=D.useMemo(()=>n?Array.isArray(n)?n.flatMap(N=>qk(c[N])):qk(c[n]):[],[c,n]),[f,h]=D.useState(c),[v,m]=D.useState(!1);c!==f&&(h(c),m(!1));let y=D.useMemo(()=>MY(v?[]:d),[v,d]),b=D.useRef(H1),[w,S]=D.useState(H1),T=D.useRef(H1),A=()=>{if(!M)return;P(!1);let N=u||i||b.current;mP(N,T.current)||(T.current=N,S(N))},[M,P]=D.useState(!1);return D.useEffect(A),{realtimeValidation:l||y||u||i||H1,displayValidation:s==="native"?l||y||w:l||y||u||i||w,updateValidation(N){s==="aria"&&!mP(w,N)?S(N):b.current=N},resetValidation(){let N=H1;mP(N,T.current)||(T.current=N,S(N)),s==="native"&&P(!1),m(!0)},commitValidation(){s==="native"&&P(!0),m(!0)}}}function qk(r){return r?Array.isArray(r)?r:[r]:[]}function vWe(r,e){if(typeof r=="function"){let t=r(e);if(t&&typeof t!="boolean")return qk(t)}return[]}function MY(r){return r.length?{isInvalid:!0,validationErrors:r,validationDetails:efe}:null}function mP(r,e){return r===e?!0:!!r&&!!e&&r.isInvalid===e.isInvalid&&r.validationErrors.length===e.validationErrors.length&&r.validationErrors.every((t,n)=>t===e.validationErrors[n])&&Object.entries(r.validationDetails).every(([t,n])=>e.validationDetails[t]===n)}var Qk=D.createContext(null);D.forwardRef(function(e,t){[e,t]=fWe(e,t,Qk);let{validationErrors:n,validationBehavior:a="native",children:i,className:o,...s}=e;const l=D.useMemo(()=>ine({className:o}),[o]);return _.jsx("form",{noValidate:a!=="native",...s,ref:t,className:l,children:_.jsx(Qk.Provider,{value:{...e,validationBehavior:a},children:_.jsx(bO.Provider,{value:n??{},children:i})})})});function gWe(r){var e,t,n,a;const i=Vr(),{validationBehavior:o}=Xde(Qk)||{},[s,l]=oa(r,oF.variantKeys),{ref:u,as:c,type:d,label:f,baseRef:h,wrapperRef:v,description:m,className:y,classNames:b,autoFocus:w,startContent:S,endContent:T,onClear:A,onChange:M,validationState:P,validationBehavior:E=(e=o??(i==null?void 0:i.validationBehavior))!=null?e:"native",innerWrapperRef:R,onValueChange:N=()=>{},...k}=s,O=D.useCallback(Et=>{N(Et??"")},[N]),[L,$]=D.useState(!1),j=c||"div",B=(n=(t=r.disableAnimation)!=null?t:i==null?void 0:i.disableAnimation)!=null?n:!1,H=bc(u),F=bc(h),K=bc(v),U=bc(R),[V,Q]=bl(s.value,(a=s.defaultValue)!=null?a:"",O),Z=["date","time","month","week","range"].includes(d),Y=!$Ae(V)||Z,X=Y||L,re=d==="hidden",oe=r.isMultiline,ae=d==="file",se=Cr(b==null?void 0:b.base,y,Y?"is-filled":""),le=D.useCallback(()=>{var Et;Q(""),A==null||A(),(Et=H.current)==null||Et.focus()},[Q,A]);d3(()=>{H.current&&Q(H.current.value)},[H.current]);const{labelProps:fe,inputProps:ve,isInvalid:pe,validationErrors:Re,validationDetails:Ae,descriptionProps:ie,errorMessageProps:Se}=dWe({...r,validationBehavior:E,autoCapitalize:r.autoCapitalize,value:V,"aria-label":jAe(r["aria-label"],r.label,r.placeholder),inputElementType:oe?"textarea":"input",onChange:Q},H);ae&&(delete ve.value,delete ve.onChange);const{isFocusVisible:ee,isFocused:te,focusProps:de}=Rn({autoFocus:w,isTextInput:!0}),{isHovered:ye,hoverProps:xe}=Ia({isDisabled:!!(r!=null&&r.isDisabled)}),{isHovered:Te,hoverProps:ke}=Ia({isDisabled:!!(r!=null&&r.isDisabled)}),{focusProps:Ue,isFocusVisible:Xe}=Rn(),{focusWithinProps:Ee}=Mv({onFocusWithinChange:$}),{pressProps:at}=Ss({isDisabled:!!(r!=null&&r.isDisabled)||!!(r!=null&&r.isReadOnly),onPress:le}),$t=P==="invalid"||pe,jt=D.useMemo(()=>{var Et;return(!r.labelPlacement||r.labelPlacement==="inside")&&!f?"outside":(Et=r.labelPlacement)!=null?Et:"inside"},[r.labelPlacement,f]),wr=typeof s.errorMessage=="function"?s.errorMessage({isInvalid:$t,validationErrors:Re,validationDetails:Ae}):s.errorMessage||(Re==null?void 0:Re.join(" ")),Sr=!!A||r.isClearable,Ar=!!f||!!m||!!wr,Pt=!!s.placeholder,_n=!!f,Nr=!!m||!!wr,ur=jt==="outside"||jt==="outside-left",Pr=jt==="inside",hn=H.current?(!H.current.value||H.current.value===""||!V||V==="")&&Pt:!1,Wn=jt==="outside-left",pn=!!S,sa=ur?jt==="outside-left"||Pt||jt==="outside"&&pn:!1,Nn=jt==="outside"&&!Pt&&!pn,Jt=D.useMemo(()=>oF({...l,isInvalid:$t,labelPlacement:jt,isClearable:Sr,disableAnimation:B}),[Xc(l),$t,jt,Sr,pn,B]),Cn=D.useCallback((Et={})=>({ref:F,className:Jt.base({class:se}),"data-slot":"base","data-filled":ht(Y||Pt||pn||hn||ae),"data-filled-within":ht(X||Pt||pn||hn||ae),"data-focus-within":ht(L),"data-focus-visible":ht(ee),"data-readonly":ht(r.isReadOnly),"data-focus":ht(te),"data-hover":ht(ye||Te),"data-required":ht(r.isRequired),"data-invalid":ht($t),"data-disabled":ht(r.isDisabled),"data-has-elements":ht(Ar),"data-has-helper":ht(Nr),"data-has-label":ht(_n),"data-has-value":ht(!hn),"data-hidden":ht(re),...Ee,...Et}),[Jt,se,Y,te,ye,Te,$t,Nr,_n,Ar,hn,pn,L,ee,X,Pt,Ee,re,r.isReadOnly,r.isRequired,r.isDisabled]),St=D.useCallback((Et={})=>({"data-slot":"label",className:Jt.label({class:b==null?void 0:b.label}),...ze(fe,ke,Et)}),[Jt,Te,fe,b==null?void 0:b.label]),_r=D.useCallback((Et={})=>({"data-slot":"input","data-filled":ht(Y),"data-filled-within":ht(X),"data-has-start-content":ht(pn),"data-has-end-content":ht(!!T),className:Jt.input({class:Cr(b==null?void 0:b.input,Y?"is-filled":"",oe?"pe-0":"")}),...ze(de,ve,av(k,{enabled:!0,labelable:!0,omitEventNames:new Set(Object.keys(ve))}),Et),"aria-readonly":ht(r.isReadOnly),onChange:Un(ve.onChange,M),ref:H}),[Jt,V,de,ve,k,Y,X,pn,T,b==null?void 0:b.input,r.isReadOnly,r.isRequired,M]),Ir=D.useCallback((Et={})=>({ref:K,"data-slot":"input-wrapper","data-hover":ht(ye||Te),"data-focus-visible":ht(ee),"data-focus":ht(te),className:Jt.inputWrapper({class:Cr(b==null?void 0:b.inputWrapper,Y?"is-filled":"")}),...ze(Et,xe),onClick:Qr=>{H.current&&Qr.currentTarget===Qr.target&&H.current.focus()},style:{cursor:"text",...Et.style}}),[Jt,ye,Te,ee,te,V,b==null?void 0:b.inputWrapper]),Yr=D.useCallback((Et={})=>({...Et,ref:U,"data-slot":"inner-wrapper",onClick:Qr=>{H.current&&Qr.currentTarget===Qr.target&&H.current.focus()},className:Jt.innerWrapper({class:Cr(b==null?void 0:b.innerWrapper,Et==null?void 0:Et.className)})}),[Jt,b==null?void 0:b.innerWrapper]),pr=D.useCallback((Et={})=>({...Et,"data-slot":"main-wrapper",className:Jt.mainWrapper({class:Cr(b==null?void 0:b.mainWrapper,Et==null?void 0:Et.className)})}),[Jt,b==null?void 0:b.mainWrapper]),qr=D.useCallback((Et={})=>({...Et,"data-slot":"helper-wrapper",className:Jt.helperWrapper({class:Cr(b==null?void 0:b.helperWrapper,Et==null?void 0:Et.className)})}),[Jt,b==null?void 0:b.helperWrapper]),Kn=D.useCallback((Et={})=>({...Et,...ie,"data-slot":"description",className:Jt.description({class:Cr(b==null?void 0:b.description,Et==null?void 0:Et.className)})}),[Jt,b==null?void 0:b.description]),Yn=D.useCallback((Et={})=>({...Et,...Se,"data-slot":"error-message",className:Jt.errorMessage({class:Cr(b==null?void 0:b.errorMessage,Et==null?void 0:Et.className)})}),[Jt,Se,b==null?void 0:b.errorMessage]),xa=D.useCallback((Et={})=>({...Et,type:"button",tabIndex:-1,disabled:r.isDisabled,"aria-label":"clear input","data-slot":"clear-button","data-focus-visible":ht(Xe),className:Jt.clearButton({class:Cr(b==null?void 0:b.clearButton,Et==null?void 0:Et.className)}),...ze(at,Ue)}),[Jt,Xe,at,Ue,b==null?void 0:b.clearButton]);return{Component:j,classNames:b,domRef:H,label:f,description:m,startContent:S,endContent:T,labelPlacement:jt,isClearable:Sr,hasHelper:Nr,hasStartContent:pn,isLabelOutside:sa,isOutsideLeft:Wn,isLabelOutsideAsPlaceholder:Nn,shouldLabelBeOutside:ur,shouldLabelBeInside:Pr,hasPlaceholder:Pt,isInvalid:$t,errorMessage:wr,getBaseProps:Cn,getLabelProps:St,getInputProps:_r,getMainWrapperProps:pr,getInputWrapperProps:Ir,getInnerWrapperProps:Yr,getHelperWrapperProps:qr,getDescriptionProps:Kn,getErrorMessageProps:Yn,getClearButtonProps:xa}}var mWe=r=>_.jsxs("svg",{"aria-hidden":"true",fill:"none",focusable:"false",height:"1em",role:"presentation",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",viewBox:"0 0 24 24",width:"1em",...r,children:[_.jsx("path",{d:"M16 17.1c0 3.5-1.4 4.9-4.9 4.9H6.9C3.4 22 2 20.6 2 17.1v-4.2C2 9.4 3.4 8 6.9 8h4.2c3.5 0 4.9 1.4 4.9 4.9Z"}),_.jsx("path",{d:"M8 8V6.9C8 3.4 9.4 2 12.9 2h4.2C20.6 2 22 3.4 22 6.9v4.2c0 3.5-1.4 4.9-4.9 4.9H16"}),_.jsx("path",{d:"M16 12.9C16 9.4 14.6 8 11.1 8"})]}),yWe=r=>_.jsx("svg",{"aria-hidden":"true",fill:"none",focusable:"false",height:"1em",role:"presentation",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",width:"1em",...r,children:_.jsx("polyline",{points:"20 6 9 17 4 12"})}),bWe=r=>_.jsxs("svg",{"aria-hidden":"true",fill:"none",focusable:"false",height:"1em",shapeRendering:"geometricPrecision",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",viewBox:"0 0 24 24",width:"1em",...r,children:[_.jsx("path",{d:"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6"}),_.jsx("path",{d:"M15 3h6v6"}),_.jsx("path",{d:"M10 14L21 3"})]}),xWe=r=>_.jsx("svg",{"aria-hidden":"true",focusable:"false",height:"1em",role:"presentation",viewBox:"0 0 24 24",width:"1em",...r,children:_.jsx("path",{d:"M12 2a10 10 0 1010 10A10.016 10.016 0 0012 2zm3.36 12.3a.754.754 0 010 1.06.748.748 0 01-1.06 0l-2.3-2.3-2.3 2.3a.748.748 0 01-1.06 0 .754.754 0 010-1.06l2.3-2.3-2.3-2.3A.75.75 0 019.7 8.64l2.3 2.3 2.3-2.3a.75.75 0 011.06 1.06l-2.3 2.3z",fill:"currentColor"})}),tfe=Ht((r,e)=>{const{Component:t,label:n,description:a,isClearable:i,startContent:o,endContent:s,labelPlacement:l,hasHelper:u,isOutsideLeft:c,shouldLabelBeOutside:d,errorMessage:f,isInvalid:h,getBaseProps:v,getLabelProps:m,getInputProps:y,getInnerWrapperProps:b,getInputWrapperProps:w,getMainWrapperProps:S,getHelperWrapperProps:T,getDescriptionProps:A,getErrorMessageProps:M,getClearButtonProps:P}=gWe({...r,ref:e}),E=n?_.jsx("label",{...m(),children:n}):null,R=D.useMemo(()=>i?_.jsx("button",{...P(),children:s||_.jsx(xWe,{})}):s,[i,P]),N=D.useMemo(()=>{const L=h&&f;return!u||!(L||a)?null:_.jsx("div",{...T(),children:L?_.jsx("div",{...M(),children:f}):_.jsx("div",{...A(),children:a})})},[u,h,f,a,T,M,A]),k=D.useMemo(()=>_.jsxs("div",{...b(),children:[o,_.jsx("input",{...y()}),R]}),[o,R,y,b]),O=D.useMemo(()=>d?_.jsxs("div",{...S(),children:[_.jsxs("div",{...w(),children:[c?null:E,k]}),N]}):_.jsxs(_.Fragment,{children:[_.jsxs("div",{...w(),children:[E,k]}),N]}),[l,N,d,E,k,f,a,S,w,M,A]);return _.jsxs(t,{...v(),children:[c?E:null,O]})});tfe.displayName="HeroUI.Input";var Va=tfe;let wWe=Math.round(Math.random()*1e10),SWe=0;function _We(r){let e=D.useMemo(()=>r.name||`radio-group-${wWe}-${++SWe}`,[r.name]);var t;let[n,a]=bl(r.value,(t=r.defaultValue)!==null&&t!==void 0?t:null,r.onChange),[i,o]=D.useState(null),s=rw({...r,value:n}),l=c=>{!r.isReadOnly&&!r.isDisabled&&(a(c),s.commitValidation())},u=s.displayValidation.isInvalid;return{...s,name:e,selectedValue:n,setSelectedValue:l,lastFocusedValue:i,setLastFocusedValue:o,isDisabled:r.isDisabled||!1,isReadOnly:r.isReadOnly||!1,isRequired:r.isRequired||!1,validationState:r.validationState||(u?"invalid":null),isInvalid:u}}const rfe=new WeakMap;function CWe(r,e,t){let{value:n,children:a,"aria-label":i,"aria-labelledby":o}=r;const s=r.isDisabled||e.isDisabled;let l=a!=null,u=i!=null||o!=null;!l&&!u&&console.warn("If you do not provide children, you must specify an aria-label for accessibility");let c=e.selectedValue===n,d=E=>{E.stopPropagation(),e.setSelectedValue(n)},{pressProps:f,isPressed:h}=Ss({isDisabled:s}),{pressProps:v,isPressed:m}=Ss({isDisabled:s,onPress(){e.setSelectedValue(n)}}),{focusableProps:y}=L0(ze(r,{onFocus:()=>e.setLastFocusedValue(n)}),t),b=ze(f,y),w=hi(r,{labelable:!0}),S=-1;e.selectedValue!=null?e.selectedValue===n&&(S=0):(e.lastFocusedValue===n||e.lastFocusedValue==null)&&(S=0),s&&(S=void 0);let{name:T,descriptionId:A,errorMessageId:M,validationBehavior:P}=rfe.get(e);return L8(t,e.selectedValue,e.setSelectedValue),mO({validationBehavior:P},e,t),{labelProps:ze(v,{onClick:E=>E.preventDefault()}),inputProps:ze(w,{...b,type:"radio",name:T,tabIndex:S,disabled:s,required:e.isRequired&&P==="native",checked:c,value:n,onChange:d,"aria-describedby":[r["aria-describedby"],e.isInvalid?M:null,A].filter(Boolean).join(" ")||void 0}),isDisabled:s,isSelected:c,isPressed:h||m}}function TWe(r,e){let{name:t,isReadOnly:n,isRequired:a,isDisabled:i,orientation:o="vertical",validationBehavior:s="aria"}=r,{direction:l}=Av(),{isInvalid:u,validationErrors:c,validationDetails:d}=e.displayValidation,{labelProps:f,fieldProps:h,descriptionProps:v,errorMessageProps:m}=gO({...r,labelElementType:"span",isInvalid:e.isInvalid,errorMessage:r.errorMessage||c}),y=hi(r,{labelable:!0}),{focusWithinProps:b}=Mv({onBlurWithin(T){var A;(A=r.onBlur)===null||A===void 0||A.call(r,T),e.selectedValue||e.setLastFocusedValue(null)},onFocusWithin:r.onFocus,onFocusWithinChange:r.onFocusChange}),w=T=>{let A;switch(T.key){case"ArrowRight":l==="rtl"&&o!=="vertical"?A="prev":A="next";break;case"ArrowLeft":l==="rtl"&&o!=="vertical"?A="next":A="prev";break;case"ArrowDown":A="next";break;case"ArrowUp":A="prev";break;default:return}T.preventDefault();let M=tl(T.currentTarget,{from:T.target}),P;A==="next"?(P=M.nextNode(),P||(M.currentNode=T.currentTarget,P=M.firstChild())):(P=M.previousNode(),P||(M.currentNode=T.currentTarget,P=M.lastChild())),P&&(P.focus(),e.setSelectedValue(P.value))},S=_o(t);return rfe.set(e,{name:S,descriptionId:v.id,errorMessageId:m.id,validationBehavior:s}),{radioGroupProps:ze(y,{role:"radiogroup",onKeyDown:w,"aria-invalid":e.isInvalid||void 0,"aria-errormessage":r["aria-errormessage"],"aria-readonly":n||void 0,"aria-required":a||void 0,"aria-disabled":i||void 0,"aria-orientation":o,...h,...b}),labelProps:f,descriptionProps:v,errorMessageProps:m,isInvalid:u,validationErrors:c,validationDetails:d}}var DY=Symbol("default");function nw(r,e){let t=D.useContext(r);if(e===null)return null;if(t&&typeof t=="object"&&"slots"in t&&t.slots){let n=new Intl.ListFormat().format(Object.keys(t.slots).map(i=>`"${i}"`));if(!e&&!t.slots[DY])throw new Error(`A slot prop is required. Valid slot names are ${n}.`);let a=e||DY;if(!t.slots[a])throw new Error(`Invalid slot "${e}". Valid slot names are ${n}.`);return t.slots[a]}return t}function AWe(r,e,t){let n=nw(t,r.slot)||{},{ref:a,...i}=n,o=$te(D.useMemo(()=>C2(e,a),[e,a])),s=ze(i,r);return"style"in i&&i.style&&"style"in r&&r.style&&(typeof i.style=="function"||typeof r.style=="function"?s.style=l=>{let u=typeof i.style=="function"?i.style(l):i.style,c={...l.defaultStyle,...u},d=typeof r.style=="function"?r.style({...l,defaultStyle:c}):r.style;return{...c,...d}}:s.style={...i.style,...r.style}),[s,o]}var p0=D.createContext(null),EWe=D.forwardRef(function(e,t){[e,t]=AWe(e,t,p0);let{validationErrors:n,validationBehavior:a="native",children:i,className:o,...s}=e;const l=D.useMemo(()=>ine({className:o}),[o]);return _.jsx("form",{noValidate:a!=="native",...s,ref:t,className:l,children:_.jsx(p0.Provider,{value:{...e,validationBehavior:a},children:_.jsx(bO.Provider,{value:n??{},children:i})})})}),nfe=D.forwardRef(function(e,t){var n,a;const i=Vr(),o=(a=(n=e.validationBehavior)!=null?n:i==null?void 0:i.validationBehavior)!=null?a:"aria";return _.jsx(EWe,{...e,ref:t,validationBehavior:o})});function MWe(r){var e,t;const n=Vr(),{validationBehavior:a}=nw(p0)||{},{as:i,ref:o,classNames:s,children:l,label:u,value:c,name:d,isInvalid:f,validationState:h,validationBehavior:v=(e=a??(n==null?void 0:n.validationBehavior))!=null?e:"native",size:m="md",color:y="primary",isDisabled:b=!1,disableAnimation:w=(t=n==null?void 0:n.disableAnimation)!=null?t:!1,orientation:S="vertical",isRequired:T=!1,isReadOnly:A,errorMessage:M,description:P,className:E,onChange:R,onValueChange:N,...k}=r,O=i||"div",L=typeof O=="string",$=$r(o),j=D.useMemo(()=>({...k,value:c,name:d,"aria-label":C8(k["aria-label"],u),isRequired:T,isReadOnly:A,isInvalid:h==="invalid"||f,orientation:S,validationBehavior:v,onChange:N}),[k,c,d,u,T,A,f,h,v,S,N]),B=_We(j),{labelProps:H,radioGroupProps:F,errorMessageProps:K,descriptionProps:U,isInvalid:V,validationErrors:Q,validationDetails:Z}=TWe(j,B),Y=j.isInvalid||V||B.isInvalid,X=D.useMemo(()=>({size:m,color:y,groupState:B,isRequired:T,isInvalid:Y,isDisabled:b,disableAnimation:w,onChange:R}),[m,y,T,b,Y,R,w,B.name,B.isDisabled,B.isReadOnly,B.isRequired,B.selectedValue,B.lastFocusedValue]),re=D.useMemo(()=>QTe({isRequired:T,isInvalid:Y,disableAnimation:w}),[Y,T,w]),oe=lt(s==null?void 0:s.base,E),ae=D.useCallback(()=>({ref:$,className:re.base({class:oe}),...ze(F,Pa(k,{enabled:L}))}),[$,re,oe,F,k]),se=D.useCallback(()=>({className:re.label({class:s==null?void 0:s.label}),...H}),[re,s==null?void 0:s.label,H,s==null?void 0:s.label]),le=D.useCallback(()=>({className:re.wrapper({class:s==null?void 0:s.wrapper}),role:"presentation","data-orientation":S}),[re,s==null?void 0:s.wrapper,S,re.wrapper]),fe=D.useCallback((pe={})=>({...pe,...U,className:re.description({class:lt(s==null?void 0:s.description,pe==null?void 0:pe.className)})}),[re,s==null?void 0:s.description,U,re.description]),ve=D.useCallback((pe={})=>({...pe,...K,className:re.errorMessage({class:lt(s==null?void 0:s.errorMessage,pe==null?void 0:pe.className)})}),[re,s==null?void 0:s.errorMessage,K]);return{Component:O,children:l,label:u,context:X,description:P,isInvalid:Y,errorMessage:typeof M=="function"?M({isInvalid:Y,validationErrors:Q,validationDetails:Z}):M||(Q==null?void 0:Q.join(" ")),getGroupProps:ae,getLabelProps:se,getWrapperProps:le,getDescriptionProps:fe,getErrorMessageProps:ve}}var[DWe,LWe]=nh({name:"RadioGroupContext",strict:!1}),afe=Ht((r,e)=>{const{Component:t,children:n,label:a,context:i,description:o,isInvalid:s,errorMessage:l,getGroupProps:u,getLabelProps:c,getWrapperProps:d,getDescriptionProps:f,getErrorMessageProps:h}=MWe({...r,ref:e});return _.jsxs(t,{...u(),children:[a&&_.jsx("span",{...c(),children:a}),_.jsx("div",{...d(),children:_.jsx(DWe,{value:i,children:n})}),s&&l?_.jsx("div",{...h(),children:l}):o?_.jsx("div",{...f(),children:o}):null]})});afe.displayName="HeroUI.RadioGroup";var ife=afe;function PWe(r){var e,t,n,a,i;const o=Vr(),s=LWe(),{as:l,ref:u,classNames:c,id:d,value:f,children:h,description:v,size:m=(e=s==null?void 0:s.size)!=null?e:"md",color:y=(t=s==null?void 0:s.color)!=null?t:"primary",isDisabled:b=(n=s==null?void 0:s.isDisabled)!=null?n:!1,disableAnimation:w=(i=(a=s==null?void 0:s.disableAnimation)!=null?a:o==null?void 0:o.disableAnimation)!=null?i:!1,onChange:S=s==null?void 0:s.onChange,autoFocus:T=!1,className:A,...M}=r,P=l||"label",E=$r(u),R=D.useRef(null),N=D.useId(),k=D.useId(),O=D.useMemo(()=>{var Ae;return(Ae=s.isRequired)!=null?Ae:!1},[s.isRequired]),L=s.isInvalid,$=D.useMemo(()=>{const Ae=[M["aria-describedby"],k].filter(Boolean).join(" ")||void 0;return{id:d,isRequired:O,isDisabled:b,"aria-label":M["aria-label"],"aria-labelledby":M["aria-labelledby"]||N,"aria-describedby":Ae}},[d,b,O,v,M["aria-label"],M["aria-labelledby"],M["aria-describedby"],k]),{inputProps:j,isDisabled:B,isSelected:H,isPressed:F}=CWe({value:f,children:typeof h=="function"?!0:h,...$},s.groupState,R),{focusProps:K,isFocused:U,isFocusVisible:V}=Rn({autoFocus:T}),Q=B||j.readOnly,{hoverProps:Z,isHovered:Y}=Ia({isDisabled:Q}),X=Q?!1:F,re=D.useMemo(()=>qTe({color:y,size:m,isInvalid:L,isDisabled:B,disableAnimation:w}),[y,m,B,L,w]),oe=lt(c==null?void 0:c.base,A),ae=D.useCallback((Ae={})=>({...Ae,ref:E,className:re.base({class:oe}),"data-disabled":je(B),"data-focus":je(U),"data-focus-visible":je(V),"data-selected":je(H),"data-invalid":je(L),"data-hover":je(Y),"data-pressed":je(X),"data-hover-unselected":je(Y&&!H),"data-readonly":je(j.readOnly),"aria-required":je(O),...ze(Z,M)}),[re,oe,E,B,U,V,H,L,Y,X,j.readOnly,O,M]),se=D.useCallback((Ae={})=>({...Ae,"aria-hidden":!0,className:lt(re.wrapper({class:lt(c==null?void 0:c.wrapper,Ae.className)}))}),[re,c==null?void 0:c.wrapper]),le=D.useCallback((Ae={})=>({ref:R,...ze(Ae,j,K),className:re.hiddenInput({class:c==null?void 0:c.hiddenInput}),onChange:Un(j.onChange,S)}),[j,K,S]),fe=D.useCallback((Ae={})=>({...Ae,id:N,className:re.label({class:c==null?void 0:c.label})}),[re,c==null?void 0:c.label,B,H,L]),ve=D.useCallback((Ae={})=>({...Ae,className:re.labelWrapper({class:c==null?void 0:c.labelWrapper})}),[re,c==null?void 0:c.labelWrapper]),pe=D.useCallback((Ae={})=>({...Ae,className:re.control({class:c==null?void 0:c.control})}),[re,c==null?void 0:c.control]),Re=D.useCallback((Ae={})=>({...Ae,id:k,className:re.description({class:c==null?void 0:c.description})}),[re,c==null?void 0:c.description]);return{Component:P,children:h,isSelected:H,isDisabled:B,isInvalid:L,isFocusVisible:V,description:v,getBaseProps:ae,getWrapperProps:se,getInputProps:le,getLabelProps:fe,getLabelWrapperProps:ve,getControlProps:pe,getDescriptionProps:Re}}var ofe=Ht((r,e)=>{const{Component:t,children:n,description:a,getBaseProps:i,getWrapperProps:o,getInputProps:s,getLabelProps:l,getLabelWrapperProps:u,getControlProps:c,getDescriptionProps:d}=PWe({...r,ref:e});return _.jsxs(t,{...i(),children:[_.jsx("input",{...s()}),_.jsx("span",{...o(),children:_.jsx("span",{...c()})}),_.jsxs("div",{...u(),children:[n&&_.jsx("span",{...l(),children:n}),a&&_.jsx("span",{...d(),children:a})]})]})});ofe.displayName="HeroUI.Radio";var sfe=ofe;function lfe(r,e,t){let n=rw({...r,value:e.isSelected}),{isInvalid:a,validationErrors:i,validationDetails:o}=n.displayValidation,{labelProps:s,inputProps:l,isSelected:u,isPressed:c,isDisabled:d,isReadOnly:f}=xne({...r,isInvalid:a},e,t);mO(r,n,t);let{isIndeterminate:h,isRequired:v,validationBehavior:m="aria"}=r;D.useEffect(()=>{t.current&&(t.current.indeterminate=!!h)});let{pressProps:y}=Ss({isDisabled:d||f,onPress(){let{[dA]:b}=r,{commitValidation:w}=b||n;w()}});return{labelProps:ze(s,y),inputProps:{...l,checked:u,"aria-required":v&&m==="aria"||void 0,required:v&&m==="native"},isSelected:u,isPressed:c,isDisabled:d,isReadOnly:f,isInvalid:a,validationErrors:i,validationDetails:o}}const ufe=new WeakMap;function IWe(r,e){let{isDisabled:t,name:n,validationBehavior:a="aria"}=r,{isInvalid:i,validationErrors:o,validationDetails:s}=e.displayValidation,{labelProps:l,fieldProps:u,descriptionProps:c,errorMessageProps:d}=gO({...r,labelElementType:"span",isInvalid:i,errorMessage:r.errorMessage||o});ufe.set(e,{name:n,descriptionId:c.id,errorMessageId:d.id,validationBehavior:a});let f=hi(r,{labelable:!0}),{focusWithinProps:h}=Mv({onBlurWithin:r.onBlur,onFocusWithin:r.onFocus,onFocusWithinChange:r.onFocusChange});return{groupProps:ze(f,{role:"group","aria-disabled":t||void 0,...u,...h}),labelProps:l,descriptionProps:c,errorMessageProps:d,isInvalid:i,validationErrors:o,validationDetails:s}}function kWe(r,e,t){const n=U8({isReadOnly:r.isReadOnly||e.isReadOnly,isSelected:e.isSelected(r.value),onChange(y){y?e.addValue(r.value):e.removeValue(r.value),r.onChange&&r.onChange(y)}});let{name:a,descriptionId:i,errorMessageId:o,validationBehavior:s}=ufe.get(e);var l;s=(l=r.validationBehavior)!==null&&l!==void 0?l:s;let{realtimeValidation:u}=rw({...r,value:n.isSelected,name:void 0,validationBehavior:"aria"}),c=D.useRef(sm),d=()=>{e.setInvalid(r.value,u.isInvalid?u:c.current)};D.useEffect(d);let f=e.realtimeValidation.isInvalid?e.realtimeValidation:u,h=s==="native"?e.displayValidation:f;var v;let m=lfe({...r,isReadOnly:r.isReadOnly||e.isReadOnly,isDisabled:r.isDisabled||e.isDisabled,name:r.name||a,isRequired:(v=r.isRequired)!==null&&v!==void 0?v:e.isRequired,validationBehavior:s,[dA]:{realtimeValidation:f,displayValidation:h,resetValidation:e.resetValidation,commitValidation:e.commitValidation,updateValidation(y){c.current=y,d()}}},n,t);return{...m,inputProps:{...m.inputProps,"aria-describedby":[r["aria-describedby"],e.isInvalid?o:null,i].filter(Boolean).join(" ")||void 0}}}function RWe(r={}){let[e,t]=bl(r.value,r.defaultValue||[],r.onChange),n=!!r.isRequired&&e.length===0,a=D.useRef(new Map),i=rw({...r,value:e}),o=i.displayValidation.isInvalid;var s;return{...i,value:e,setValue(u){r.isReadOnly||r.isDisabled||t(u)},isDisabled:r.isDisabled||!1,isReadOnly:r.isReadOnly||!1,isSelected(u){return e.includes(u)},addValue(u){r.isReadOnly||r.isDisabled||e.includes(u)||t(e.concat(u))},removeValue(u){r.isReadOnly||r.isDisabled||e.includes(u)&&t(e.filter(c=>c!==u))},toggleValue(u){r.isReadOnly||r.isDisabled||(e.includes(u)?t(e.filter(c=>c!==u)):t(e.concat(u)))},setInvalid(u,c){let d=new Map(a.current);c.isInvalid?d.set(u,c):d.delete(u),a.current=d,i.updateValidation(cWe(...d.values()))},validationState:(s=r.validationState)!==null&&s!==void 0?s:o?"invalid":null,isInvalid:o,isRequired:n}}function NWe(r){var e,t;const n=Vr(),{validationBehavior:a}=nw(p0)||{},{as:i,ref:o,classNames:s,children:l,label:u,radius:c,value:d,name:f,defaultValue:h,isInvalid:v,validationState:m,size:y="md",color:b="primary",orientation:w="vertical",lineThrough:S=!1,isDisabled:T=!1,validationBehavior:A=(e=a??(n==null?void 0:n.validationBehavior))!=null?e:"native",disableAnimation:M=(t=n==null?void 0:n.disableAnimation)!=null?t:!1,isReadOnly:P,isRequired:E,onValueChange:R,description:N,errorMessage:k,className:O,...L}=r,$=i||"div",j=typeof $=="string",B=$r(o),H=D.useMemo(()=>({...L,value:d,name:f,"aria-label":C8(L["aria-label"],u),defaultValue:h,isRequired:E,isReadOnly:P,orientation:w,validationBehavior:A,isInvalid:m==="invalid"||v,onChange:Un(r.onChange,R)}),[d,f,u,h,E,P,w,R,v,m,A,L["aria-label"],L]),F=RWe(H),{labelProps:K,groupProps:U,descriptionProps:V,errorMessageProps:Q,validationErrors:Z,validationDetails:Y}=IWe(H,F),X=D.useMemo(()=>({size:y,color:b,radius:c,lineThrough:S,isInvalid:F.isInvalid,isDisabled:T,disableAnimation:M,validationBehavior:A,groupState:F}),[y,b,c,S,T,M,A,F.value,F.isDisabled,F.isReadOnly,F.isInvalid,F.isSelected]),re=D.useMemo(()=>JTe({isRequired:E,isInvalid:F.isInvalid,disableAnimation:M}),[E,F.isInvalid,,M]),oe=lt(s==null?void 0:s.base,O),ae=D.useCallback(()=>({ref:B,className:re.base({class:oe}),...ze(U,Pa(L,{enabled:j}))}),[re,B,oe,U,L]),se=D.useCallback(()=>({className:re.label({class:s==null?void 0:s.label}),...K}),[re,K,s==null?void 0:s.label]),le=D.useCallback(()=>({className:re.wrapper({class:s==null?void 0:s.wrapper}),role:"presentation","data-orientation":w}),[re,w,s==null?void 0:s.wrapper]),fe=D.useCallback((pe={})=>({...pe,...V,className:re.description({class:lt(s==null?void 0:s.description,pe==null?void 0:pe.className)})}),[re,V,s==null?void 0:s.description]),ve=D.useCallback((pe={})=>({...pe,...Q,className:re.errorMessage({class:lt(s==null?void 0:s.errorMessage,pe==null?void 0:pe.className)})}),[re,Q,s==null?void 0:s.errorMessage]);return{Component:$,children:l,label:u,context:X,description:N,isInvalid:F.isInvalid,errorMessage:typeof k=="function"?k({isInvalid:F.isInvalid,validationErrors:Z,validationDetails:Y}):k||(Z==null?void 0:Z.join(" ")),getGroupProps:ae,getLabelProps:se,getWrapperProps:le,getDescriptionProps:fe,getErrorMessageProps:ve}}var[OWe,$We]=nh({name:"CheckboxGroupContext",strict:!1}),cfe=Ht((r,e)=>{const{children:t,context:n,label:a,description:i,isInvalid:o,errorMessage:s,getGroupProps:l,getLabelProps:u,getWrapperProps:c,getDescriptionProps:d,getErrorMessageProps:f}=NWe({...r,ref:e});return _.jsxs("div",{...l(),children:[a&&_.jsx("span",{...u(),children:a}),_.jsx("div",{...c(),children:_.jsx(OWe,{value:n,children:t})}),o&&s?_.jsx("div",{...f(),children:s}):i?_.jsx("div",{...d(),children:i}):null]})});cfe.displayName="HeroUI.CheckboxGroup";var dfe=cfe;function zWe(r){const{isSelected:e,disableAnimation:t,...n}=r;return _.jsx("svg",{"aria-hidden":"true",role:"presentation",viewBox:"0 0 17 18",...n,children:_.jsx("polyline",{fill:"none",points:"1 9 7 14 15 4",stroke:"currentColor",strokeDasharray:22,strokeDashoffset:e?44:66,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,style:!t&&e?{transition:"stroke-dashoffset 250ms linear 0.2s"}:{}})})}function jWe(r){const{isSelected:e,disableAnimation:t,...n}=r;return _.jsx("svg",{stroke:"currentColor",strokeWidth:3,viewBox:"0 0 24 24",...n,children:_.jsx("line",{x1:"21",x2:"3",y1:"12",y2:"12"})})}function BWe(r){const{isIndeterminate:e,...t}=r,n=e?jWe:zWe;return _.jsx(n,{...t})}function VWe(r={}){var e,t,n,a,i,o,s,l;const u=Vr(),c=$We(),{validationBehavior:d}=nw(p0)||{},f=!!c,{as:h,ref:v,value:m="",children:y,icon:b,name:w,isRequired:S,isReadOnly:T=!1,autoFocus:A=!1,isSelected:M,size:P=(e=c==null?void 0:c.size)!=null?e:"md",color:E=(t=c==null?void 0:c.color)!=null?t:"primary",radius:R=c==null?void 0:c.radius,lineThrough:N=(n=c==null?void 0:c.lineThrough)!=null?n:!1,isDisabled:k=(a=c==null?void 0:c.isDisabled)!=null?a:!1,disableAnimation:O=(o=(i=c==null?void 0:c.disableAnimation)!=null?i:u==null?void 0:u.disableAnimation)!=null?o:!1,validationState:L,isInvalid:$=L?L==="invalid":(s=c==null?void 0:c.isInvalid)!=null?s:!1,isIndeterminate:j=!1,validationBehavior:B=f?c.validationBehavior:(l=d??(u==null?void 0:u.validationBehavior))!=null?l:"native",defaultSelected:H,classNames:F,className:K,onValueChange:U,validate:V,...Q}=r,Z=h||"label",Y=D.useRef(null),X=D.useRef(null);let re=r.onChange;f&&(re=Un(()=>{c.groupState.resetValidation()},re));const oe=D.useId(),ae=D.useMemo(()=>({name:w,value:m,children:y,autoFocus:A,defaultSelected:H,isIndeterminate:j,isRequired:S,isInvalid:$,isSelected:M,isDisabled:k,isReadOnly:T,"aria-label":C8(Q["aria-label"],y),"aria-labelledby":Q["aria-labelledby"]||oe,onChange:U}),[w,m,y,A,H,j,S,$,M,k,T,Q["aria-label"],Q["aria-labelledby"],oe,U]),se=U8(ae),le={isInvalid:$,isRequired:S,validate:V,validationState:L,validationBehavior:B},{inputProps:fe,isSelected:ve,isDisabled:pe,isReadOnly:Re,isPressed:Ae,isInvalid:ie}=f?kWe({...ae,...le},c.groupState,X):lfe({...ae,...le},se,X),Se=pe||Re,ee=L==="invalid"||$||ie,te=Se?!1:Ae,{hoverProps:de,isHovered:ye}=Ia({isDisabled:fe.disabled}),{focusProps:xe,isFocused:Te,isFocusVisible:ke}=Rn({autoFocus:fe.autoFocus}),Ue=D.useMemo(()=>XTe({color:E,size:P,radius:R,isInvalid:ee,lineThrough:N,isDisabled:pe,disableAnimation:O}),[E,P,R,ee,N,pe,O]);O0(()=>{if(!X.current)return;const Pt=!!X.current.checked;se.setSelected(Pt)},[X.current]);const Xe=XI(re),Ee=D.useCallback(Pt=>{if(Re||pe){Pt.preventDefault();return}Xe==null||Xe(Pt)},[Re,pe,Xe]),at=lt(F==null?void 0:F.base,K),$t=D.useCallback(()=>({ref:Y,className:Ue.base({class:at}),"data-disabled":je(pe),"data-selected":je(ve||j),"data-invalid":je(ee),"data-hover":je(ye),"data-focus":je(Te),"data-pressed":je(te),"data-readonly":je(fe.readOnly),"data-focus-visible":je(ke),"data-indeterminate":je(j),...ze(de,Q)}),[Ue,at,pe,ve,j,ee,ye,Te,te,fe.readOnly,ke,de,Q]),jt=D.useCallback((Pt={})=>({...Pt,"aria-hidden":!0,className:lt(Ue.wrapper({class:lt(F==null?void 0:F.wrapper,Pt==null?void 0:Pt.className)}))}),[Ue,F==null?void 0:F.wrapper]),wr=D.useCallback(()=>({ref:A8(X,v),...ze(fe,xe),className:Ue.hiddenInput({class:F==null?void 0:F.hiddenInput}),onChange:Un(fe.onChange,Ee)}),[fe,xe,Ee,F==null?void 0:F.hiddenInput]),Sr=D.useCallback(()=>({id:oe,className:Ue.label({class:F==null?void 0:F.label})}),[Ue,F==null?void 0:F.label,pe,ve,ee]),Ar=D.useCallback(()=>({isSelected:ve,isIndeterminate:j,disableAnimation:O,className:Ue.icon({class:F==null?void 0:F.icon})}),[Ue,F==null?void 0:F.icon,ve,j,O]);return{Component:Z,icon:b,children:y,isSelected:ve,isDisabled:pe,isInvalid:ee,isFocused:Te,isHovered:ye,isFocusVisible:ke,getBaseProps:$t,getWrapperProps:jt,getInputProps:wr,getLabelProps:Sr,getIconProps:Ar}}var ffe=Ht((r,e)=>{const{Component:t,children:n,icon:a=_.jsx(BWe,{}),getBaseProps:i,getWrapperProps:o,getInputProps:s,getIconProps:l,getLabelProps:u}=VWe({...r,ref:e}),c=typeof a=="function"?a(l()):D.cloneElement(a,l());return _.jsxs(t,{...i(),children:[_.jsx("input",{...s()}),_.jsx("span",{...o(),children:c}),n&&_.jsx("span",{...u(),children:n})]})});ffe.displayName="HeroUI.Checkbox";var xO=ffe;let LY=class{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let t=this.keyMap.get(e);var n;return t&&(n=t.prevKey)!==null&&n!==void 0?n:null}getKeyAfter(e){let t=this.keyMap.get(e);var n;return t&&(n=t.nextKey)!==null&&n!==void 0?n:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){var t;return(t=this.keyMap.get(e))!==null&&t!==void 0?t:null}at(e){const t=[...this.getKeys()];return this.getItem(t[e])}getChildren(e){let t=this.keyMap.get(e);return(t==null?void 0:t.childNodes)||[]}constructor(e){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e;let t=o=>{if(this.keyMap.set(o.key,o),o.childNodes&&o.type==="section")for(let s of o.childNodes)t(s)};for(let o of e)t(o);let n=null,a=0;for(let[o,s]of this.keyMap)n?(n.nextKey=o,s.prevKey=n.key):(this.firstKey=o,s.prevKey=void 0),s.type==="item"&&(s.index=a++),n=s,n.nextKey=void 0;var i;this.lastKey=(i=n==null?void 0:n.key)!==null&&i!==void 0?i:null}};class Ys extends Set{constructor(e,t,n){super(e),e instanceof Ys?(this.anchorKey=t??e.anchorKey,this.currentKey=n??e.currentKey):(this.anchorKey=t??null,this.currentKey=n??null)}}function FWe(r,e){if(r.size!==e.size)return!1;for(let t of r)if(!e.has(t))return!1;return!0}function wO(r){let{selectionMode:e="none",disallowEmptySelection:t=!1,allowDuplicateSelectionEvents:n,selectionBehavior:a="toggle",disabledBehavior:i="all"}=r,o=D.useRef(!1),[,s]=D.useState(!1),l=D.useRef(null),u=D.useRef(null),[,c]=D.useState(null),d=D.useMemo(()=>PY(r.selectedKeys),[r.selectedKeys]),f=D.useMemo(()=>PY(r.defaultSelectedKeys,new Ys),[r.defaultSelectedKeys]),[h,v]=bl(d,f,r.onSelectionChange),m=D.useMemo(()=>r.disabledKeys?new Set(r.disabledKeys):new Set,[r.disabledKeys]),[y,b]=D.useState(a);a==="replace"&&y==="toggle"&&typeof h=="object"&&h.size===0&&b("replace");let w=D.useRef(a);return D.useEffect(()=>{a!==w.current&&(b(a),w.current=a)},[a]),{selectionMode:e,disallowEmptySelection:t,selectionBehavior:y,setSelectionBehavior:b,get isFocused(){return o.current},setFocused(S){o.current=S,s(S)},get focusedKey(){return l.current},get childFocusStrategy(){return u.current},setFocusedKey(S,T="first"){l.current=S,u.current=T,c(S)},selectedKeys:h,setSelectedKeys(S){(n||!FWe(S,h))&&v(S)},disabledKeys:m,disabledBehavior:i}}function PY(r,e){return r?r==="all"?"all":new Ys(r):e}class HWe{build(e,t){return this.context=t,IY(()=>this.iterateCollection(e))}*iterateCollection(e){let{children:t,items:n}=e;if(Be.isValidElement(t)&&t.type===Be.Fragment)yield*this.iterateCollection({children:t.props.children,items:n});else if(typeof t=="function"){if(!n)throw new Error("props.children was a function but props.items is missing");let a=0;for(let i of n)yield*this.getFullNode({value:i,index:a},{renderer:t}),a++}else{let a=[];Be.Children.forEach(t,o=>{o&&a.push(o)});let i=0;for(let o of a){let s=this.getFullNode({element:o,index:i},{});for(let l of s)i++,yield l}}}getKey(e,t,n,a){if(e.key!=null)return e.key;if(t.type==="cell"&&t.key!=null)return`${a}${t.key}`;let i=t.value;if(i!=null){var o;let s=(o=i.key)!==null&&o!==void 0?o:i.id;if(s==null)throw new Error("No key found for item");return s}return a?`${a}.${t.index}`:`$.${t.index}`}getChildState(e,t){return{renderer:t.renderer||e.renderer}}*getFullNode(e,t,n,a){if(Be.isValidElement(e.element)&&e.element.type===Be.Fragment){let y=[];Be.Children.forEach(e.element.props.children,w=>{y.push(w)});var i;let b=(i=e.index)!==null&&i!==void 0?i:0;for(const w of y)yield*this.getFullNode({element:w,index:b++},t,n,a);return}let o=e.element;if(!o&&e.value&&t&&t.renderer){let y=this.cache.get(e.value);if(y&&(!y.shouldInvalidate||!y.shouldInvalidate(this.context))){y.index=e.index,y.parentKey=a?a.key:null,yield y;return}o=t.renderer(e.value)}if(Be.isValidElement(o)){let y=o.type;if(typeof y!="function"&&typeof y.getCollectionNode!="function"){let T=o.type;throw new Error(`Unknown element <${T}> in collection.`)}let b=y.getCollectionNode(o.props,this.context);var s;let w=(s=e.index)!==null&&s!==void 0?s:0,S=b.next();for(;!S.done&&S.value;){let T=S.value;e.index=w;var l;let A=(l=T.key)!==null&&l!==void 0?l:null;A==null&&(A=T.element?null:this.getKey(o,e,t,n));let P=[...this.getFullNode({...T,key:A,index:w,wrapper:UWe(e.wrapper,T.wrapper)},this.getChildState(t,T),n?`${n}${o.key}`:o.key,a)];for(let E of P){var u,c;E.value=(c=(u=T.value)!==null&&u!==void 0?u:e.value)!==null&&c!==void 0?c:null,E.value&&this.cache.set(E.value,E);var d;if(e.type&&E.type!==e.type)throw new Error(`Unsupported type <${yP(E.type)}> in <${yP((d=a==null?void 0:a.type)!==null&&d!==void 0?d:"unknown parent type")}>. Only <${yP(e.type)}> is supported.`);w++,yield E}S=b.next(P)}return}if(e.key==null||e.type==null)return;let f=this;var h,v;let m={type:e.type,props:e.props,key:e.key,parentKey:a?a.key:null,value:(h=e.value)!==null&&h!==void 0?h:null,level:a?a.level+1:0,index:e.index,rendered:e.rendered,textValue:(v=e.textValue)!==null&&v!==void 0?v:"","aria-label":e["aria-label"],wrapper:e.wrapper,shouldInvalidate:e.shouldInvalidate,hasChildNodes:e.hasChildNodes||!1,childNodes:IY(function*(){if(!e.hasChildNodes||!e.childNodes)return;let y=0;for(let b of e.childNodes()){b.key!=null&&(b.key=`${m.key}${b.key}`);let w=f.getFullNode({...b,index:y},f.getChildState(t,b),m.key,m);for(let S of w)y++,yield S}})};yield m}constructor(){this.cache=new WeakMap}}function IY(r){let e=[],t=null;return{*[Symbol.iterator](){for(let n of e)yield n;t||(t=r());for(let n of t)e.push(n),yield n}}}function UWe(r,e){if(r&&e)return t=>r(e(t));if(r)return r;if(e)return e}function yP(r){return r[0].toUpperCase()+r.slice(1)}function SO(r,e,t){let n=D.useMemo(()=>new HWe,[]),{children:a,items:i,collection:o}=r;return D.useMemo(()=>{if(o)return o;let l=n.build({children:a,items:i},t);return e(l)},[n,a,i,o,t,e])}function hfe(r,e){return typeof e.getChildren=="function"?e.getChildren(r.key):r.childNodes}function GWe(r){return qWe(r)}function qWe(r,e){for(let t of r)return t}function bP(r,e,t){if(e.parentKey===t.parentKey)return e.index-t.index;let n=[...kY(r,e),e],a=[...kY(r,t),t],i=n.slice(0,a.length).findIndex((o,s)=>o!==a[s]);return i!==-1?(e=n[i],t=a[i],e.index-t.index):n.findIndex(o=>o===t)>=0?1:(a.findIndex(o=>o===e)>=0,-1)}function kY(r,e){let t=[],n=e;for(;(n==null?void 0:n.parentKey)!=null;)n=r.getItem(n.parentKey),n&&t.unshift(n);return t}const RY=new WeakMap;function pfe(r){let e=RY.get(r);if(e!=null)return e;let t=0,n=a=>{for(let i of a)i.type==="section"?n(hfe(i,r)):t++};return n(r),RY.set(r,t),t}class _O{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}get isFocused(){return this.state.isFocused}setFocused(e){this.state.setFocused(e)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(e,t){(e==null||this.collection.getItem(e))&&this.state.setFocusedKey(e,t)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(e){if(this.state.selectionMode==="none")return!1;let t=this.getKey(e);return t==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(t):this.state.selectedKeys.has(t)}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let e=this.getSelectAllKeys(),t=this.state.selectedKeys;return this._isSelectAll=e.every(n=>t.has(n)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let n of this.state.selectedKeys){let a=this.collection.getItem(n);(!e||a&&bP(this.collection,a,e)<0)&&(e=a)}var t;return(t=e==null?void 0:e.key)!==null&&t!==void 0?t:null}get lastSelectedKey(){let e=null;for(let n of this.state.selectedKeys){let a=this.collection.getItem(n);(!e||a&&bP(this.collection,a,e)>0)&&(e=a)}var t;return(t=e==null?void 0:e.key)!==null&&t!==void 0?t:null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(e);return}let t=this.getKey(e);if(t==null)return;let n;if(this.state.selectedKeys==="all")n=new Ys([t],t,t);else{let o=this.state.selectedKeys;var a;let s=(a=o.anchorKey)!==null&&a!==void 0?a:t;n=new Ys(o,s,t);var i;for(let l of this.getKeyRange(s,(i=o.currentKey)!==null&&i!==void 0?i:t))n.delete(l);for(let l of this.getKeyRange(t,s))this.canSelectItem(l)&&n.add(l)}this.state.setSelectedKeys(n)}getKeyRange(e,t){let n=this.collection.getItem(e),a=this.collection.getItem(t);return n&&a?bP(this.collection,n,a)<=0?this.getKeyRangeInternal(e,t):this.getKeyRangeInternal(t,e):[]}getKeyRangeInternal(e,t){var n;if(!((n=this.layoutDelegate)===null||n===void 0)&&n.getKeyRange)return this.layoutDelegate.getKeyRange(e,t);let a=[],i=e;for(;i!=null;){let o=this.collection.getItem(i);if(o&&(o.type==="item"||o.type==="cell"&&this.allowsCellSelection)&&a.push(i),i===t)return a;i=this.collection.getKeyAfter(i)}return[]}getKey(e){let t=this.collection.getItem(e);if(!t||t.type==="cell"&&this.allowsCellSelection)return e;for(;t&&t.type!=="item"&&t.parentKey!=null;)t=this.collection.getItem(t.parentKey);return!t||t.type!=="item"?null:t.key}toggleSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}let t=this.getKey(e);if(t==null)return;let n=new Ys(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);n.has(t)?n.delete(t):this.canSelectItem(t)&&(n.add(t),n.anchorKey=t,n.currentKey=t),!(this.disallowEmptySelection&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(e){if(this.selectionMode==="none")return;let t=this.getKey(e);if(t==null)return;let n=this.canSelectItem(t)?new Ys([t],t,t):new Ys;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode==="none")return;let t=new Ys;for(let n of e){let a=this.getKey(n);if(a!=null&&(t.add(a),this.selectionMode==="single"))break}this.state.setSelectedKeys(t)}getSelectAllKeys(){let e=[],t=n=>{for(;n!=null;){if(this.canSelectItem(n)){var a;let o=this.collection.getItem(n);(o==null?void 0:o.type)==="item"&&e.push(n);var i;o!=null&&o.hasChildNodes&&(this.allowsCellSelection||o.type!=="item")&&t((i=(a=GWe(hfe(o,this.collection)))===null||a===void 0?void 0:a.key)!==null&&i!==void 0?i:null)}n=this.collection.getKeyAfter(n)}};return t(this.collection.getFirstKey()),e}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new Ys)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,t){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior==="toggle"||t&&(t.pointerType==="touch"||t.pointerType==="virtual")?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let t=this.selectedKeys;if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;for(let n of t)if(!e.has(n))return!1;return!0}canSelectItem(e){var t;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(e))return!1;let n=this.collection.getItem(e);return!(!n||!(n==null||(t=n.props)===null||t===void 0)&&t.isDisabled||n.type==="cell"&&!this.allowsCellSelection)}isDisabled(e){var t,n;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(e)||!!(!((n=this.collection.getItem(e))===null||n===void 0||(t=n.props)===null||t===void 0)&&t.isDisabled))}isLink(e){var t,n;return!!(!((n=this.collection.getItem(e))===null||n===void 0||(t=n.props)===null||t===void 0)&&t.href)}getItemProps(e){var t;return(t=this.collection.getItem(e))===null||t===void 0?void 0:t.props}constructor(e,t,n){this.collection=e,this.state=t;var a;this.allowsCellSelection=(a=n==null?void 0:n.allowsCellSelection)!==null&&a!==void 0?a:!1,this._isSelectAll=null,this.layoutDelegate=(n==null?void 0:n.layoutDelegate)||null}}function vfe(r){let{filter:e,layoutDelegate:t}=r,n=wO(r),a=D.useMemo(()=>r.disabledKeys?new Set(r.disabledKeys):new Set,[r.disabledKeys]),i=D.useCallback(c=>e?new LY(e(c)):new LY(c),[e]),o=D.useMemo(()=>({suppressTextValueWarning:r.suppressTextValueWarning}),[r.suppressTextValueWarning]),s=SO(r,i,o),l=D.useMemo(()=>new _O(s,n,{layoutDelegate:t}),[s,n,t]);const u=D.useRef(null);return D.useEffect(()=>{if(n.focusedKey!=null&&!s.getItem(n.focusedKey)&&u.current){const b=u.current.getItem(n.focusedKey),w=[...u.current.getKeys()].map(E=>{const R=u.current.getItem(E);return(R==null?void 0:R.type)==="item"?R:null}).filter(E=>E!==null),S=[...s.getKeys()].map(E=>{const R=s.getItem(E);return(R==null?void 0:R.type)==="item"?R:null}).filter(E=>E!==null);var c,d;const T=((c=w==null?void 0:w.length)!==null&&c!==void 0?c:0)-((d=S==null?void 0:S.length)!==null&&d!==void 0?d:0);var f,h,v;let A=Math.min(T>1?Math.max(((f=b==null?void 0:b.index)!==null&&f!==void 0?f:0)-T+1,0):(h=b==null?void 0:b.index)!==null&&h!==void 0?h:0,((v=S==null?void 0:S.length)!==null&&v!==void 0?v:0)-1),M=null,P=!1;for(;A>=0;){if(!l.isDisabled(S[A].key)){M=S[A];break}if(A<S.length-1&&!P)A++;else{P=!0;var m,y;A>((m=b==null?void 0:b.index)!==null&&m!==void 0?m:0)&&(A=(y=b==null?void 0:b.index)!==null&&y!==void 0?y:0),A--}}n.setFocusedKey(M?M.key:null)}u.current=s},[s,l,n,n.focusedKey]),{collection:s,disabledKeys:a,selectionManager:l}}function QWe(r){const{collection:e,disabledKeys:t,selectionManager:n,selectionManager:{setSelectedKeys:a,selectedKeys:i,selectionMode:o}}=vfe(r),s=D.useMemo(()=>!r.isLoading&&i.size!==0?Array.from(i).filter(Boolean).filter(u=>!e.getItem(u)):[],[i,e]),l=i.size!==0?Array.from(i).map(u=>e.getItem(u)).filter(Boolean):null;return s.length&&console.warn(`Select: Keys "${s.join(", ")}" passed to "selectedKeys" are not present in the collection.`),{collection:e,disabledKeys:t,selectionManager:n,selectionMode:o,selectedKeys:i,setSelectedKeys:a.bind(n),selectedItems:l}}function gfe(r){let e=Pae(r),[t,n]=D.useState(null),[a,i]=D.useState([]),o=()=>{i([]),e.close()};return{focusStrategy:t,...e,open(u=null){n(u),e.open()},toggle(u=null){n(u),e.toggle()},close(){o()},expandedKeysStack:a,openSubmenu:(u,c)=>{i(d=>c>d.length?d:[...d.slice(0,c),u])},closeSubmenu:(u,c)=>{i(d=>d[c]===u?d.slice(0,c):d)}}}function WWe({validate:r,validationBehavior:e,...t}){const[n,a]=D.useState(!1),[i,o]=D.useState(null),s=gfe(t),l=QWe({...t,onSelectionChange:d=>{t.onSelectionChange!=null&&(d==="all"?t.onSelectionChange(new Set(l.collection.getKeys())):t.onSelectionChange(d)),t.selectionMode==="single"&&s.close()}}),u=hWe({...t,validationBehavior:e,validate:d=>{if(!r)return;const f=Array.from(d);return r(t.selectionMode==="single"?f[0]:f)},value:l.selectedKeys}),c=l.collection.size===0&&t.hideEmptyContent;return{...u,...l,...s,focusStrategy:i,close(){s.close()},open(d=null){c||(o(d),s.open())},toggle(d=null){c||(o(d),s.toggle())},isFocused:n,setFocused:a}}function KWe(r){let{id:e,label:t,"aria-labelledby":n,"aria-label":a,labelElementType:i="label"}=r;e=_o(e);let o=_o(),s={};t?(n=n?`${o} ${n}`:o,s={id:o,htmlFor:i==="label"?e:void 0}):!n&&!a&&console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");let l=i3({id:e,"aria-label":a,"aria-labelledby":n});return{labelProps:s,fieldProps:l}}function YWe(r){let{description:e,errorMessage:t,isInvalid:n,validationState:a}=r,{labelProps:i,fieldProps:o}=KWe(r),s=Ef([!!e,!!t,n,a]),l=Ef([!!e,!!t,n,a]);return o=ze(o,{"aria-describedby":[s,l,r["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:i,fieldProps:o,descriptionProps:{id:s},errorMessageProps:{id:l}}}var mfe={};mfe={longPressMessage:"اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة"};var yfe={};yfe={longPressMessage:"Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто"};var bfe={};bfe={longPressMessage:"Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku"};var xfe={};xfe={longPressMessage:"Langt tryk eller tryk på Alt + pil ned for at åbne menuen"};var wfe={};wfe={longPressMessage:"Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen"};var Sfe={};Sfe={longPressMessage:"Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού"};var _fe={};_fe={longPressMessage:"Long press or press Alt + ArrowDown to open menu"};var Cfe={};Cfe={longPressMessage:"Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú"};var Tfe={};Tfe={longPressMessage:"Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool"};var Afe={};Afe={longPressMessage:"Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli"};var Efe={};Efe={longPressMessage:"Appuyez de manière prolongée ou appuyez sur Alt + Flèche vers le bas pour ouvrir le menu."};var Mfe={};Mfe={longPressMessage:"לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט"};var Dfe={};Dfe={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika"};var Lfe={};Lfe={longPressMessage:"Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához"};var Pfe={};Pfe={longPressMessage:"Premere a lungo o premere Alt + Freccia giù per aprire il menu"};var Ife={};Ife={longPressMessage:"長押しまたは Alt+下矢印キーでメニューを開く"};var kfe={};kfe={longPressMessage:"길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기"};var Rfe={};Rfe={longPressMessage:"Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“."};var Nfe={};Nfe={longPressMessage:"Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa"};var Ofe={};Ofe={longPressMessage:"Langt trykk eller trykk Alt + PilNed for å åpne menyen"};var $fe={};$fe={longPressMessage:"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen"};var zfe={};zfe={longPressMessage:"Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu"};var jfe={};jfe={longPressMessage:"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu"};var Bfe={};Bfe={longPressMessage:"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu"};var Vfe={};Vfe={longPressMessage:"Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul"};var Ffe={};Ffe={longPressMessage:"Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню"};var Hfe={};Hfe={longPressMessage:"Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol"};var Ufe={};Ufe={longPressMessage:"Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol"};var Gfe={};Gfe={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni"};var qfe={};qfe={longPressMessage:"Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn"};var Qfe={};Qfe={longPressMessage:"Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın"};var Wfe={};Wfe={longPressMessage:"Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню"};var Kfe={};Kfe={longPressMessage:"长按或按 Alt + 向下方向键以打开菜单"};var Yfe={};Yfe={longPressMessage:"長按或按 Alt+向下鍵以開啟功能表"};var Zfe={};Zfe={"ar-AE":mfe,"bg-BG":yfe,"cs-CZ":bfe,"da-DK":xfe,"de-DE":wfe,"el-GR":Sfe,"en-US":_fe,"es-ES":Cfe,"et-EE":Tfe,"fi-FI":Afe,"fr-FR":Efe,"he-IL":Mfe,"hr-HR":Dfe,"hu-HU":Lfe,"it-IT":Pfe,"ja-JP":Ife,"ko-KR":kfe,"lt-LT":Rfe,"lv-LV":Nfe,"nb-NO":Ofe,"nl-NL":$fe,"pl-PL":zfe,"pt-BR":jfe,"pt-PT":Bfe,"ro-RO":Vfe,"ru-RU":Ffe,"sk-SK":Hfe,"sl-SI":Ufe,"sr-SP":Gfe,"sv-SE":qfe,"tr-TR":Qfe,"uk-UA":Wfe,"zh-CN":Kfe,"zh-TW":Yfe};const ZWe=new WeakMap;function XWe(r,e,t){let{type:n}=r,{isOpen:a}=e;D.useEffect(()=>{t&&t.current&&ZWe.set(t.current,e.close)});let i;n==="menu"?i=!0:n==="listbox"&&(i="listbox");let o=t0();return{triggerProps:{"aria-haspopup":i,"aria-expanded":a,"aria-controls":a?o:void 0,onPress:e.toggle},overlayProps:{id:o}}}function JWe(r){return r&&r.__esModule?r.default:r}function Xfe(r,e,t){let{type:n="menu",isDisabled:a,trigger:i="press"}=r,o=_o(),{triggerProps:s,overlayProps:l}=XWe({type:n},e,t),u=h=>{if(!a&&!(i==="longPress"&&!h.altKey)&&t&&t.current)switch(h.key){case"Enter":case" ":if(i==="longPress")return;case"ArrowDown":"continuePropagation"in h||h.stopPropagation(),h.preventDefault(),e.toggle("first");break;case"ArrowUp":"continuePropagation"in h||h.stopPropagation(),h.preventDefault(),e.toggle("last");break;default:"continuePropagation"in h&&h.continuePropagation()}},c=Ute(JWe(Zfe),"@react-aria/menu"),{longPressProps:d}=xte({isDisabled:a||i!=="longPress",accessibilityDescription:c.format("longPressMessage"),onLongPressStart(){e.close()},onLongPress(){e.open("first")}}),f={onPressStart(h){h.pointerType!=="touch"&&h.pointerType!=="keyboard"&&!a&&e.open(h.pointerType==="virtual"?"first":null)},onPress(h){h.pointerType==="touch"&&!a&&e.toggle()}};return delete s.onPress,{menuTriggerProps:{...s,...i==="press"?f:d,id:o,onKeyDown:u},menuProps:{...l,"aria-labelledby":o,autoFocus:e.focusStrategy||!0,onClose:e.close}}}function Wk(r){return vSe()?r.altKey:r.ctrlKey}const eKe=1e3;function tKe(r){let{keyboardDelegate:e,selectionManager:t,onTypeSelect:n}=r,a=D.useRef({search:"",timeout:void 0}).current,i=o=>{let s=rKe(o.key);if(!(!s||o.ctrlKey||o.metaKey||!o.currentTarget.contains(o.target))){if(s===" "&&a.search.trim().length>0&&(o.preventDefault(),"continuePropagation"in o||o.stopPropagation()),a.search+=s,e.getKeyForSearch!=null){let l=e.getKeyForSearch(a.search,t.focusedKey);l==null&&(l=e.getKeyForSearch(a.search)),l!=null&&(t.setFocusedKey(l),n&&n(l))}clearTimeout(a.timeout),a.timeout=setTimeout(()=>{a.search=""},eKe)}};return{typeSelectProps:{onKeyDownCapture:e.getKeyForSearch?i:void 0}}}function rKe(r){return r.length===1||!/^[A-Z]/i.test(r)?r:""}function Jfe(r){let{selectionManager:e,keyboardDelegate:t,ref:n,autoFocus:a=!1,shouldFocusWrap:i=!1,disallowEmptySelection:o=!1,disallowSelectAll:s=!1,selectOnFocus:l=e.selectionBehavior==="replace",disallowTypeAhead:u=!1,shouldUseVirtualFocus:c,allowsTabNavigation:d=!1,isVirtualized:f,scrollRef:h=n,linkBehavior:v="action"}=r,{direction:m}=Av(),y=tte(),b=L=>{var $;if(L.altKey&&L.key==="Tab"&&L.preventDefault(),!(!(($=n.current)===null||$===void 0)&&$.contains(L.target)))return;const j=(ae,se)=>{if(ae!=null){if(e.isLink(ae)&&v==="selection"&&l&&!Wk(L)){var le;BA.flushSync(()=>{e.setFocusedKey(ae,se)});let fe=(le=h.current)===null||le===void 0?void 0:le.querySelector(`[data-key="${CSS.escape(ae.toString())}"]`),ve=e.getItemProps(ae);fe&&y.open(fe,L,ve.href,ve.routerOptions);return}if(e.setFocusedKey(ae,se),e.isLink(ae)&&v==="override")return;L.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(ae):l&&!Wk(L)&&e.replaceSelection(ae)}};switch(L.key){case"ArrowDown":if(t.getKeyBelow){var B,H,F;let ae=e.focusedKey!=null?(B=t.getKeyBelow)===null||B===void 0?void 0:B.call(t,e.focusedKey):(H=t.getFirstKey)===null||H===void 0?void 0:H.call(t);ae==null&&i&&(ae=(F=t.getFirstKey)===null||F===void 0?void 0:F.call(t,e.focusedKey)),ae!=null&&(L.preventDefault(),j(ae))}break;case"ArrowUp":if(t.getKeyAbove){var K,U,V;let ae=e.focusedKey!=null?(K=t.getKeyAbove)===null||K===void 0?void 0:K.call(t,e.focusedKey):(U=t.getLastKey)===null||U===void 0?void 0:U.call(t);ae==null&&i&&(ae=(V=t.getLastKey)===null||V===void 0?void 0:V.call(t,e.focusedKey)),ae!=null&&(L.preventDefault(),j(ae))}break;case"ArrowLeft":if(t.getKeyLeftOf){var Q,Z,Y;let ae=e.focusedKey!=null?(Q=t.getKeyLeftOf)===null||Q===void 0?void 0:Q.call(t,e.focusedKey):null;ae==null&&i&&(ae=m==="rtl"?(Z=t.getFirstKey)===null||Z===void 0?void 0:Z.call(t,e.focusedKey):(Y=t.getLastKey)===null||Y===void 0?void 0:Y.call(t,e.focusedKey)),ae!=null&&(L.preventDefault(),j(ae,m==="rtl"?"first":"last"))}break;case"ArrowRight":if(t.getKeyRightOf){var X,re,oe;let ae=e.focusedKey!=null?(X=t.getKeyRightOf)===null||X===void 0?void 0:X.call(t,e.focusedKey):null;ae==null&&i&&(ae=m==="rtl"?(re=t.getLastKey)===null||re===void 0?void 0:re.call(t,e.focusedKey):(oe=t.getFirstKey)===null||oe===void 0?void 0:oe.call(t,e.focusedKey)),ae!=null&&(L.preventDefault(),j(ae,m==="rtl"?"last":"first"))}break;case"Home":if(t.getFirstKey){if(e.focusedKey===null&&L.shiftKey)return;L.preventDefault();let ae=t.getFirstKey(e.focusedKey,em(L));e.setFocusedKey(ae),ae!=null&&(em(L)&&L.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(ae):l&&e.replaceSelection(ae))}break;case"End":if(t.getLastKey){if(e.focusedKey===null&&L.shiftKey)return;L.preventDefault();let ae=t.getLastKey(e.focusedKey,em(L));e.setFocusedKey(ae),ae!=null&&(em(L)&&L.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(ae):l&&e.replaceSelection(ae))}break;case"PageDown":if(t.getKeyPageBelow&&e.focusedKey!=null){let ae=t.getKeyPageBelow(e.focusedKey);ae!=null&&(L.preventDefault(),j(ae))}break;case"PageUp":if(t.getKeyPageAbove&&e.focusedKey!=null){let ae=t.getKeyPageAbove(e.focusedKey);ae!=null&&(L.preventDefault(),j(ae))}break;case"a":em(L)&&e.selectionMode==="multiple"&&s!==!0&&(L.preventDefault(),e.selectAll());break;case"Escape":!o&&e.selectedKeys.size!==0&&(L.stopPropagation(),L.preventDefault(),e.clearSelection());break;case"Tab":if(!d){if(L.shiftKey)n.current.focus();else{let ae=l3e(n.current,{tabbable:!0}),se,le;do le=ae.lastChild(),le&&(se=le);while(le);se&&!se.contains(document.activeElement)&&gc(se)}break}}},w=D.useRef({top:0,left:0});vS(h,"scroll",f?void 0:()=>{var L,$,j,B;w.current={top:(j=(L=h.current)===null||L===void 0?void 0:L.scrollTop)!==null&&j!==void 0?j:0,left:(B=($=h.current)===null||$===void 0?void 0:$.scrollLeft)!==null&&B!==void 0?B:0}});let S=L=>{if(e.isFocused){L.currentTarget.contains(L.target)||e.setFocused(!1);return}if(L.currentTarget.contains(L.target)){if(e.setFocused(!0),e.focusedKey==null){var $,j;let F=U=>{U!=null&&(e.setFocusedKey(U),l&&e.replaceSelection(U))},K=L.relatedTarget;var B,H;K&&L.currentTarget.compareDocumentPosition(K)&Node.DOCUMENT_POSITION_FOLLOWING?F((B=e.lastSelectedKey)!==null&&B!==void 0?B:($=t.getLastKey)===null||$===void 0?void 0:$.call(t)):F((H=e.firstSelectedKey)!==null&&H!==void 0?H:(j=t.getFirstKey)===null||j===void 0?void 0:j.call(t))}else!f&&h.current&&(h.current.scrollTop=w.current.top,h.current.scrollLeft=w.current.left);if(e.focusedKey!=null&&h.current){let F=h.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);F&&(F.contains(document.activeElement)||gc(F),mI()==="keyboard"&&cV(F,{containingElement:n.current}))}}},T=L=>{L.currentTarget.contains(L.relatedTarget)||e.setFocused(!1)},A=D.useRef(!1);vS(n,DSe,c?L=>{let{detail:$}=L;L.stopPropagation(),e.setFocused(!0),($==null?void 0:$.focusStrategy)==="first"&&(A.current=!0)}:void 0);let M=Ci(()=>{var L,$;let j=($=(L=t.getFirstKey)===null||L===void 0?void 0:L.call(t))!==null&&$!==void 0?$:null;if(j==null){var B;(B=n.current)===null||B===void 0||B.dispatchEvent(new CustomEvent(ote,{cancelable:!0,bubbles:!0})),e.collection.size>0&&(A.current=!1)}else e.setFocusedKey(j),A.current=!1});lV(()=>{A.current&&M()},[e.collection,M]);let P=Ci(()=>{e.collection.size>0&&(A.current=!1)});lV(()=>{P()},[e.focusedKey,P]),vS(n,MSe,c?L=>{L.stopPropagation(),e.setFocused(!1),e.setFocusedKey(null)}:void 0);const E=D.useRef(a);D.useEffect(()=>{if(E.current){var L,$;let H=null;var j;a==="first"&&(H=(j=(L=t.getFirstKey)===null||L===void 0?void 0:L.call(t))!==null&&j!==void 0?j:null);var B;a==="last"&&(H=(B=($=t.getLastKey)===null||$===void 0?void 0:$.call(t))!==null&&B!==void 0?B:null);let F=e.selectedKeys;if(F.size){for(let K of F)if(e.canSelectItem(K)){H=K;break}}e.setFocused(!0),e.setFocusedKey(H),H==null&&!c&&n.current&&oT(n.current)}},[]);let R=D.useRef(e.focusedKey);D.useEffect(()=>{if(e.isFocused&&e.focusedKey!=null&&(e.focusedKey!==R.current||E.current)&&h.current&&n.current){let L=mI(),$=n.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);if(!$)return;(L==="keyboard"||E.current)&&(ite(h.current,$),L!=="virtual"&&cV($,{containingElement:n.current}))}!c&&e.isFocused&&e.focusedKey==null&&R.current!=null&&n.current&&oT(n.current),R.current=e.focusedKey,E.current=!1}),vS(n,"react-aria-focus-scope-restore",L=>{L.preventDefault(),e.setFocused(!0)});let N={onKeyDown:b,onFocus:S,onBlur:T,onMouseDown(L){h.current===L.target&&L.preventDefault()}},{typeSelectProps:k}=tKe({keyboardDelegate:t,selectionManager:e});u||(N=gs(k,N));let O;return c?O=-1:O=e.focusedKey==null?0:-1,{collectionProps:{...N,tabIndex:O}}}function CO(r){let{id:e,selectionManager:t,key:n,ref:a,shouldSelectOnPressUp:i,shouldUseVirtualFocus:o,focus:s,isDisabled:l,onAction:u,allowsDifferentPressOrigin:c,linkBehavior:d="action"}=r,f=tte();e=t0(e);let h=F=>{if(F.pointerType==="keyboard"&&Wk(F))t.toggleSelection(n);else{if(t.selectionMode==="none")return;if(t.isLink(n)){if(d==="selection"&&a.current){let K=t.getItemProps(n);f.open(a.current,F,K.href,K.routerOptions),t.setSelectedKeys(t.selectedKeys);return}else if(d==="override"||d==="none")return}t.selectionMode==="single"?t.isSelected(n)&&!t.disallowEmptySelection?t.toggleSelection(n):t.replaceSelection(n):F&&F.shiftKey?t.extendSelection(n):t.selectionBehavior==="toggle"||F&&(em(F)||F.pointerType==="touch"||F.pointerType==="virtual")?t.toggleSelection(n):t.replaceSelection(n)}};D.useEffect(()=>{if(n===t.focusedKey&&t.isFocused)if(!o)s?s():document.activeElement!==a.current&&a.current&&oT(a.current);else{var K;let U=new CustomEvent(ote,{cancelable:!0,bubbles:!0});(K=a.current)===null||K===void 0||K.dispatchEvent(U)}},[a,n,t.focusedKey,t.childFocusStrategy,t.isFocused,o]),l=l||t.isDisabled(n);let v={};!o&&!l?v={tabIndex:n===t.focusedKey?0:-1,onFocus(F){F.target===a.current&&t.setFocusedKey(n)}}:l&&(v.onMouseDown=F=>{F.preventDefault()});let m=t.isLink(n)&&d==="override",y=t.isLink(n)&&d!=="selection"&&d!=="none",b=!l&&t.canSelectItem(n)&&!m,w=(u||y)&&!l,S=w&&(t.selectionBehavior==="replace"?!b:!b||t.isEmpty),T=w&&b&&t.selectionBehavior==="replace",A=S||T,M=D.useRef(null),P=A&&b,E=D.useRef(!1),R=D.useRef(!1),N=F=>{if(u&&u(),y&&a.current){let K=t.getItemProps(n);f.open(a.current,F,K.href,K.routerOptions)}},k={};i?(k.onPressStart=F=>{M.current=F.pointerType,E.current=P,F.pointerType==="keyboard"&&(!A||OY())&&h(F)},c?(k.onPressUp=S?void 0:F=>{F.pointerType==="mouse"&&b&&h(F)},k.onPress=S?N:F=>{F.pointerType!=="keyboard"&&F.pointerType!=="mouse"&&b&&h(F)}):k.onPress=F=>{if(S||T&&F.pointerType!=="mouse"){if(F.pointerType==="keyboard"&&!NY())return;N(F)}else F.pointerType!=="keyboard"&&b&&h(F)}):(k.onPressStart=F=>{M.current=F.pointerType,E.current=P,R.current=S,b&&(F.pointerType==="mouse"&&!S||F.pointerType==="keyboard"&&(!w||OY()))&&h(F)},k.onPress=F=>{(F.pointerType==="touch"||F.pointerType==="pen"||F.pointerType==="virtual"||F.pointerType==="keyboard"&&A&&NY()||F.pointerType==="mouse"&&R.current)&&(A?N(F):b&&h(F))}),v["data-key"]=n,k.preventFocusOnPress=o;let{pressProps:O,isPressed:L}=dx(k),$=T?F=>{M.current==="mouse"&&(F.stopPropagation(),F.preventDefault(),N(F))}:void 0,{longPressProps:j}=xte({isDisabled:!P,onLongPress(F){F.pointerType==="touch"&&(h(F),t.setSelectionBehavior("toggle"))}}),B=F=>{M.current==="touch"&&E.current&&F.preventDefault()},H=t.isLink(n)?F=>{Jp.isOpening||F.preventDefault()}:void 0;return{itemProps:gs(v,b||S?O:{},P?j:{},{onDoubleClick:$,onDragStartCapture:B,onClick:H,id:e}),isPressed:L,isSelected:t.isSelected(n),isFocused:t.isFocused&&t.focusedKey===n,isDisabled:l,allowsSelection:b,hasAction:A}}function NY(){let r=window.event;return(r==null?void 0:r.key)==="Enter"}function OY(){let r=window.event;return(r==null?void 0:r.key)===" "||(r==null?void 0:r.code)==="Space"}let $Y=class{getItemRect(e){let t=this.ref.current;if(!t)return null;let n=e!=null?t.querySelector(`[data-key="${CSS.escape(e.toString())}"]`):null;if(!n)return null;let a=t.getBoundingClientRect(),i=n.getBoundingClientRect();return{x:i.left-a.left+t.scrollLeft,y:i.top-a.top+t.scrollTop,width:i.width,height:i.height}}getContentSize(){let e=this.ref.current;var t,n;return{width:(t=e==null?void 0:e.scrollWidth)!==null&&t!==void 0?t:0,height:(n=e==null?void 0:e.scrollHeight)!==null&&n!==void 0?n:0}}getVisibleRect(){let e=this.ref.current;var t,n,a,i;return{x:(t=e==null?void 0:e.scrollLeft)!==null&&t!==void 0?t:0,y:(n=e==null?void 0:e.scrollTop)!==null&&n!==void 0?n:0,width:(a=e==null?void 0:e.offsetWidth)!==null&&a!==void 0?a:0,height:(i=e==null?void 0:e.offsetHeight)!==null&&i!==void 0?i:0}}constructor(e){this.ref=e}},nKe=class{isDisabled(e){var t;return this.disabledBehavior==="all"&&(((t=e.props)===null||t===void 0?void 0:t.isDisabled)||this.disabledKeys.has(e.key))}findNextNonDisabled(e,t){let n=e;for(;n!=null;){let a=this.collection.getItem(n);if((a==null?void 0:a.type)==="item"&&!this.isDisabled(a))return n;n=t(n)}return null}getNextKey(e){let t=e;return t=this.collection.getKeyAfter(t),this.findNextNonDisabled(t,n=>this.collection.getKeyAfter(n))}getPreviousKey(e){let t=e;return t=this.collection.getKeyBefore(t),this.findNextNonDisabled(t,n=>this.collection.getKeyBefore(n))}findKey(e,t,n){let a=e,i=this.layoutDelegate.getItemRect(a);if(!i||a==null)return null;let o=i;do{if(a=t(a),a==null)break;i=this.layoutDelegate.getItemRect(a)}while(i&&n(o,i)&&a!=null);return a}isSameRow(e,t){return e.y===t.y||e.x!==t.x}isSameColumn(e,t){return e.x===t.x||e.y!==t.y}getKeyBelow(e){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,t=>this.getNextKey(t),this.isSameRow):this.getNextKey(e)}getKeyAbove(e){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,t=>this.getPreviousKey(t),this.isSameRow):this.getPreviousKey(e)}getNextColumn(e,t){return t?this.getPreviousKey(e):this.getNextKey(e)}getKeyRightOf(e){let t=this.direction==="ltr"?"getKeyRightOf":"getKeyLeftOf";return this.layoutDelegate[t]?(e=this.layoutDelegate[t](e),this.findNextNonDisabled(e,n=>this.layoutDelegate[t](n))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="rtl"):this.findKey(e,n=>this.getNextColumn(n,this.direction==="rtl"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="rtl"):null}getKeyLeftOf(e){let t=this.direction==="ltr"?"getKeyLeftOf":"getKeyRightOf";return this.layoutDelegate[t]?(e=this.layoutDelegate[t](e),this.findNextNonDisabled(e,n=>this.layoutDelegate[t](n))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="ltr"):this.findKey(e,n=>this.getNextColumn(n,this.direction==="ltr"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="ltr"):null}getFirstKey(){let e=this.collection.getFirstKey();return this.findNextNonDisabled(e,t=>this.collection.getKeyAfter(t))}getLastKey(){let e=this.collection.getLastKey();return this.findNextNonDisabled(e,t=>this.collection.getKeyBefore(t))}getKeyPageAbove(e){let t=this.ref.current,n=this.layoutDelegate.getItemRect(e);if(!n)return null;if(t&&!fI(t))return this.getFirstKey();let a=e;if(this.orientation==="horizontal"){let i=Math.max(0,n.x+n.width-this.layoutDelegate.getVisibleRect().width);for(;n&&n.x>i&&a!=null;)a=this.getKeyAbove(a),n=a==null?null:this.layoutDelegate.getItemRect(a)}else{let i=Math.max(0,n.y+n.height-this.layoutDelegate.getVisibleRect().height);for(;n&&n.y>i&&a!=null;)a=this.getKeyAbove(a),n=a==null?null:this.layoutDelegate.getItemRect(a)}return a??this.getFirstKey()}getKeyPageBelow(e){let t=this.ref.current,n=this.layoutDelegate.getItemRect(e);if(!n)return null;if(t&&!fI(t))return this.getLastKey();let a=e;if(this.orientation==="horizontal"){let i=Math.min(this.layoutDelegate.getContentSize().width,n.y-n.width+this.layoutDelegate.getVisibleRect().width);for(;n&&n.x<i&&a!=null;)a=this.getKeyBelow(a),n=a==null?null:this.layoutDelegate.getItemRect(a)}else{let i=Math.min(this.layoutDelegate.getContentSize().height,n.y-n.height+this.layoutDelegate.getVisibleRect().height);for(;n&&n.y<i&&a!=null;)a=this.getKeyBelow(a),n=a==null?null:this.layoutDelegate.getItemRect(a)}return a??this.getLastKey()}getKeyForSearch(e,t){if(!this.collator)return null;let n=this.collection,a=t||this.getFirstKey();for(;a!=null;){let i=n.getItem(a);if(!i)return null;let o=i.textValue.slice(0,e.length);if(i.textValue&&this.collator.compare(o,e)===0)return a;a=this.getNextKey(a)}return null}constructor(...e){if(e.length===1){let t=e[0];this.collection=t.collection,this.ref=t.ref,this.collator=t.collator,this.disabledKeys=t.disabledKeys||new Set,this.disabledBehavior=t.disabledBehavior||"all",this.orientation=t.orientation||"vertical",this.direction=t.direction,this.layout=t.layout||"stack",this.layoutDelegate=t.layoutDelegate||new $Y(t.ref)}else this.collection=e[0],this.disabledKeys=e[1],this.ref=e[2],this.collator=e[3],this.layout="stack",this.orientation="vertical",this.disabledBehavior="all",this.layoutDelegate=new $Y(this.ref);this.layout==="stack"&&this.orientation==="vertical"&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}};function ehe(r){let{selectionManager:e,collection:t,disabledKeys:n,ref:a,keyboardDelegate:i,layoutDelegate:o}=r,s=Gte({usage:"search",sensitivity:"base"}),l=e.disabledBehavior,u=D.useMemo(()=>i||new nKe({collection:t,disabledKeys:n,disabledBehavior:l,ref:a,collator:s,layoutDelegate:o}),[i,o,t,n,a,s,l]),{collectionProps:c}=Jfe({...r,ref:a,selectionManager:e,keyboardDelegate:u});return{listProps:c}}const the=new WeakMap;function aKe(r,e,t){let{shouldFocusWrap:n=!0,onKeyDown:a,onKeyUp:i,...o}=r;!r["aria-label"]&&!r["aria-labelledby"]&&console.warn("An aria-label or aria-labelledby prop is required for accessibility.");let s=hi(r,{labelable:!0}),{listProps:l}=ehe({...o,ref:t,selectionManager:e.selectionManager,collection:e.collection,disabledKeys:e.disabledKeys,shouldFocusWrap:n,linkBehavior:"override"});return the.set(e,{onClose:r.onClose,onAction:r.onAction}),{menuProps:ze(s,{onKeyDown:a,onKeyUp:i},{role:"menu",...l,onKeyDown:u=>{var c;u.key!=="Escape"&&((c=l.onKeyDown)===null||c===void 0||c.call(l,u))}})}}function iKe(r,e,t){let{id:n,key:a,closeOnSelect:i,isVirtualized:o,"aria-haspopup":s,onPressStart:l,onPressUp:u,onPress:c,onPressChange:d,onPressEnd:f,onHoverStart:h,onHoverChange:v,onHoverEnd:m,onKeyDown:y,onKeyUp:b,onFocus:w,onFocusChange:S,onBlur:T,selectionManager:A=e.selectionManager}=r,M=!!s,P=M&&r["aria-expanded"]==="true";var E;let R=(E=r.isDisabled)!==null&&E!==void 0?E:A.isDisabled(a);var N;let k=(N=r.isSelected)!==null&&N!==void 0?N:A.isSelected(a),O=the.get(e),L=e.collection.getItem(a),$=r.onClose||O.onClose,j=A2(),B=pe=>{var Re;if(!M){if(!(L==null||(Re=L.props)===null||Re===void 0)&&Re.onAction?L.props.onAction():r.onAction&&r.onAction(a),O.onAction){let Ae=O.onAction;Ae(a)}pe.target instanceof HTMLAnchorElement&&L&&j.open(pe.target,pe,L.props.href,L.props.routerOptions)}},H="menuitem";M||(A.selectionMode==="single"?H="menuitemradio":A.selectionMode==="multiple"&&(H="menuitemcheckbox"));let F=Ef(),K=Ef(),U=Ef(),V={id:n,"aria-disabled":R||void 0,role:H,"aria-label":r["aria-label"],"aria-labelledby":F,"aria-describedby":[K,U].filter(Boolean).join(" ")||void 0,"aria-controls":r["aria-controls"],"aria-haspopup":s,"aria-expanded":r["aria-expanded"]};A.selectionMode!=="none"&&!M&&(V["aria-checked"]=k),o&&(V["aria-posinset"]=L==null?void 0:L.index,V["aria-setsize"]=pfe(e.collection));let Q=pe=>{pe.pointerType==="keyboard"&&B(pe),l==null||l(pe)},Z=pe=>{pe.pointerType!=="keyboard"&&(B(pe),!M&&$&&(i??(A.selectionMode!=="multiple"||A.isLink(a)))&&$()),u==null||u(pe)},{itemProps:Y,isFocused:X}=CO({selectionManager:A,key:a,ref:t,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,linkBehavior:"none"}),{pressProps:re,isPressed:oe}=dx({onPressStart:Q,onPress:c,onPressUp:Z,onPressChange:d,onPressEnd:f,isDisabled:R}),{hoverProps:ae}=qSe({isDisabled:R,onHoverStart(pe){!FSe()&&!(P&&s==="dialog")&&(A.setFocused(!0),A.setFocusedKey(a)),h==null||h(pe)},onHoverChange:v,onHoverEnd:m}),{keyboardProps:se}=bte({onKeyDown:pe=>{if(pe.repeat){pe.continuePropagation();return}switch(pe.key){case" ":!R&&A.selectionMode==="none"&&!M&&i!==!1&&$&&$();break;case"Enter":!R&&i!==!1&&!M&&$&&$();break;default:M||pe.continuePropagation(),y==null||y(pe);break}},onKeyUp:b}),{focusProps:le}=pte({onBlur:T,onFocus:w,onFocusChange:S}),fe=hi(L==null?void 0:L.props);delete fe.id;let ve=a3(L==null?void 0:L.props);return{menuItemProps:{...V,...ze(fe,ve,M?{onFocus:Y.onFocus,"data-key":Y["data-key"]}:Y,re,ae,se,le),tabIndex:Y.tabIndex!=null&&P?-1:Y.tabIndex},labelProps:{id:F},descriptionProps:{id:K},keyboardShortcutProps:{id:U},isFocused:X,isSelected:k,isPressed:oe,isDisabled:R}}function oKe(r){let{heading:e,"aria-label":t}=r,n=_o();return{itemProps:{role:"presentation"},headingProps:e?{id:n,role:"presentation"}:{},groupProps:{role:"group","aria-label":t,"aria-labelledby":e?n:void 0}}}function zY(r){return U_e()?r.altKey:r.ctrlKey}function U1(r){return Of()?r.metaKey:r.ctrlKey}const sKe=1e3;function rhe(r){let{keyboardDelegate:e,selectionManager:t,onTypeSelect:n}=r,a=D.useRef({search:"",timeout:void 0}).current,i=o=>{let s=lKe(o.key);if(!(!s||o.ctrlKey||o.metaKey||!o.currentTarget.contains(o.target))){if(s===" "&&a.search.trim().length>0&&(o.preventDefault(),"continuePropagation"in o||o.stopPropagation()),a.search+=s,e.getKeyForSearch!=null){let l=e.getKeyForSearch(a.search,t.focusedKey);l==null&&(l=e.getKeyForSearch(a.search)),l!=null&&(t.setFocusedKey(l),n&&n(l))}clearTimeout(a.timeout),a.timeout=setTimeout(()=>{a.search=""},sKe)}};return{typeSelectProps:{onKeyDownCapture:e.getKeyForSearch?i:void 0}}}function lKe(r){return r.length===1||!/^[A-Z]/i.test(r)?r:""}function uKe(r){let{selectionManager:e,keyboardDelegate:t,ref:n,autoFocus:a=!1,shouldFocusWrap:i=!1,disallowEmptySelection:o=!1,disallowSelectAll:s=!1,selectOnFocus:l=e.selectionBehavior==="replace",disallowTypeAhead:u=!1,shouldUseVirtualFocus:c,allowsTabNavigation:d=!1,isVirtualized:f,scrollRef:h=n,linkBehavior:v="action"}=r,{direction:m}=Av(),y=A2(),b=N=>{var k;if(N.altKey&&N.key==="Tab"&&N.preventDefault(),!(!((k=n.current)===null||k===void 0)&&k.contains(N.target)))return;const O=(X,re)=>{if(X!=null){if(e.isLink(X)&&v==="selection"&&l&&!zY(N)){var oe;BA.flushSync(()=>{e.setFocusedKey(X,re)});let ae=(oe=h.current)===null||oe===void 0?void 0:oe.querySelector(`[data-key="${CSS.escape(X.toString())}"]`),se=e.getItemProps(X);ae&&y.open(ae,N,se.href,se.routerOptions);return}if(e.setFocusedKey(X,re),e.isLink(X)&&v==="override")return;N.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(X):l&&!zY(N)&&e.replaceSelection(X)}};switch(N.key){case"ArrowDown":if(t.getKeyBelow){var L,$,j;let X=e.focusedKey!=null?(L=t.getKeyBelow)===null||L===void 0?void 0:L.call(t,e.focusedKey):($=t.getFirstKey)===null||$===void 0?void 0:$.call(t);X==null&&i&&(X=(j=t.getFirstKey)===null||j===void 0?void 0:j.call(t,e.focusedKey)),X!=null&&(N.preventDefault(),O(X))}break;case"ArrowUp":if(t.getKeyAbove){var B,H,F;let X=e.focusedKey!=null?(B=t.getKeyAbove)===null||B===void 0?void 0:B.call(t,e.focusedKey):(H=t.getLastKey)===null||H===void 0?void 0:H.call(t);X==null&&i&&(X=(F=t.getLastKey)===null||F===void 0?void 0:F.call(t,e.focusedKey)),X!=null&&(N.preventDefault(),O(X))}break;case"ArrowLeft":if(t.getKeyLeftOf){var K,U,V;let X=e.focusedKey!=null?(K=t.getKeyLeftOf)===null||K===void 0?void 0:K.call(t,e.focusedKey):null;X==null&&i&&(X=m==="rtl"?(U=t.getFirstKey)===null||U===void 0?void 0:U.call(t,e.focusedKey):(V=t.getLastKey)===null||V===void 0?void 0:V.call(t,e.focusedKey)),X!=null&&(N.preventDefault(),O(X,m==="rtl"?"first":"last"))}break;case"ArrowRight":if(t.getKeyRightOf){var Q,Z,Y;let X=e.focusedKey!=null?(Q=t.getKeyRightOf)===null||Q===void 0?void 0:Q.call(t,e.focusedKey):null;X==null&&i&&(X=m==="rtl"?(Z=t.getLastKey)===null||Z===void 0?void 0:Z.call(t,e.focusedKey):(Y=t.getFirstKey)===null||Y===void 0?void 0:Y.call(t,e.focusedKey)),X!=null&&(N.preventDefault(),O(X,m==="rtl"?"last":"first"))}break;case"Home":if(t.getFirstKey){N.preventDefault();let X=t.getFirstKey(e.focusedKey,U1(N));e.setFocusedKey(X),X!=null&&(U1(N)&&N.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(X):l&&e.replaceSelection(X))}break;case"End":if(t.getLastKey){N.preventDefault();let X=t.getLastKey(e.focusedKey,U1(N));e.setFocusedKey(X),X!=null&&(U1(N)&&N.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(X):l&&e.replaceSelection(X))}break;case"PageDown":if(t.getKeyPageBelow&&e.focusedKey!=null){let X=t.getKeyPageBelow(e.focusedKey);X!=null&&(N.preventDefault(),O(X))}break;case"PageUp":if(t.getKeyPageAbove&&e.focusedKey!=null){let X=t.getKeyPageAbove(e.focusedKey);X!=null&&(N.preventDefault(),O(X))}break;case"a":U1(N)&&e.selectionMode==="multiple"&&s!==!0&&(N.preventDefault(),e.selectAll());break;case"Escape":!o&&e.selectedKeys.size!==0&&(N.stopPropagation(),N.preventDefault(),e.clearSelection());break;case"Tab":if(!d){if(N.shiftKey)n.current.focus();else{let X=tl(n.current,{tabbable:!0}),re,oe;do oe=X.lastChild(),oe&&(re=oe);while(oe);re&&!re.contains(document.activeElement)&&mc(re)}break}}},w=D.useRef({top:0,left:0});MV(h,"scroll",f?void 0:()=>{var N,k,O,L;w.current={top:(O=(N=h.current)===null||N===void 0?void 0:N.scrollTop)!==null&&O!==void 0?O:0,left:(L=(k=h.current)===null||k===void 0?void 0:k.scrollLeft)!==null&&L!==void 0?L:0}});let S=N=>{if(e.isFocused){N.currentTarget.contains(N.target)||e.setFocused(!1);return}if(N.currentTarget.contains(N.target)){if(e.setFocused(!0),e.focusedKey==null){var k,O;let j=H=>{H!=null&&(e.setFocusedKey(H),l&&e.replaceSelection(H))},B=N.relatedTarget;var L,$;B&&N.currentTarget.compareDocumentPosition(B)&Node.DOCUMENT_POSITION_FOLLOWING?j((L=e.lastSelectedKey)!==null&&L!==void 0?L:(k=t.getLastKey)===null||k===void 0?void 0:k.call(t)):j(($=e.firstSelectedKey)!==null&&$!==void 0?$:(O=t.getFirstKey)===null||O===void 0?void 0:O.call(t))}else!f&&h.current&&(h.current.scrollTop=w.current.top,h.current.scrollLeft=w.current.left);if(e.focusedKey!=null&&h.current){let j=h.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);j&&(j.contains(document.activeElement)||mc(j),XC()==="keyboard"&&LV(j,{containingElement:n.current}))}}},T=N=>{N.currentTarget.contains(N.relatedTarget)||e.setFocused(!1)};const A=D.useRef(a);D.useEffect(()=>{if(A.current){var N,k;let $=null;var O;a==="first"&&($=(O=(N=t.getFirstKey)===null||N===void 0?void 0:N.call(t))!==null&&O!==void 0?O:null);var L;a==="last"&&($=(L=(k=t.getLastKey)===null||k===void 0?void 0:k.call(t))!==null&&L!==void 0?L:null);let j=e.selectedKeys;if(j.size){for(let B of j)if(e.canSelectItem(B)){$=B;break}}e.setFocused(!0),e.setFocusedKey($),$==null&&!c&&n.current&&nv(n.current)}},[]);let M=D.useRef(e.focusedKey);D.useEffect(()=>{if(e.isFocused&&e.focusedKey!=null&&(e.focusedKey!==M.current||A.current)&&h.current&&n.current){let N=XC(),k=n.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);if(!k)return;(N==="keyboard"||A.current)&&(Bte(h.current,k),N!=="virtual"&&LV(k,{containingElement:n.current}))}!c&&e.isFocused&&e.focusedKey==null&&M.current!=null&&n.current&&nv(n.current),M.current=e.focusedKey,A.current=!1}),MV(n,"react-aria-focus-scope-restore",N=>{N.preventDefault(),e.setFocused(!0)});let P={onKeyDown:b,onFocus:S,onBlur:T,onMouseDown(N){h.current===N.target&&N.preventDefault()}},{typeSelectProps:E}=rhe({keyboardDelegate:t,selectionManager:e});u||(P=ze(E,P));let R;return c||(R=e.focusedKey==null?0:-1),{collectionProps:{...P,tabIndex:R}}}class jY{getItemRect(e){let t=this.ref.current;if(!t)return null;let n=e!=null?t.querySelector(`[data-key="${CSS.escape(e.toString())}"]`):null;if(!n)return null;let a=t.getBoundingClientRect(),i=n.getBoundingClientRect();return{x:i.left-a.left+t.scrollLeft,y:i.top-a.top+t.scrollTop,width:i.width,height:i.height}}getContentSize(){let e=this.ref.current;var t,n;return{width:(t=e==null?void 0:e.scrollWidth)!==null&&t!==void 0?t:0,height:(n=e==null?void 0:e.scrollHeight)!==null&&n!==void 0?n:0}}getVisibleRect(){let e=this.ref.current;var t,n,a,i;return{x:(t=e==null?void 0:e.scrollLeft)!==null&&t!==void 0?t:0,y:(n=e==null?void 0:e.scrollTop)!==null&&n!==void 0?n:0,width:(a=e==null?void 0:e.offsetWidth)!==null&&a!==void 0?a:0,height:(i=e==null?void 0:e.offsetHeight)!==null&&i!==void 0?i:0}}constructor(e){this.ref=e}}class nhe{isDisabled(e){var t;return this.disabledBehavior==="all"&&(((t=e.props)===null||t===void 0?void 0:t.isDisabled)||this.disabledKeys.has(e.key))}findNextNonDisabled(e,t){let n=e;for(;n!=null;){let a=this.collection.getItem(n);if((a==null?void 0:a.type)==="item"&&!this.isDisabled(a))return n;n=t(n)}return null}getNextKey(e){let t=e;return t=this.collection.getKeyAfter(t),this.findNextNonDisabled(t,n=>this.collection.getKeyAfter(n))}getPreviousKey(e){let t=e;return t=this.collection.getKeyBefore(t),this.findNextNonDisabled(t,n=>this.collection.getKeyBefore(n))}findKey(e,t,n){let a=e,i=this.layoutDelegate.getItemRect(a);if(!i||a==null)return null;let o=i;do{if(a=t(a),a==null)break;i=this.layoutDelegate.getItemRect(a)}while(i&&n(o,i)&&a!=null);return a}isSameRow(e,t){return e.y===t.y||e.x!==t.x}isSameColumn(e,t){return e.x===t.x||e.y!==t.y}getKeyBelow(e){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,t=>this.getNextKey(t),this.isSameRow):this.getNextKey(e)}getKeyAbove(e){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,t=>this.getPreviousKey(t),this.isSameRow):this.getPreviousKey(e)}getNextColumn(e,t){return t?this.getPreviousKey(e):this.getNextKey(e)}getKeyRightOf(e){let t=this.direction==="ltr"?"getKeyRightOf":"getKeyLeftOf";return this.layoutDelegate[t]?(e=this.layoutDelegate[t](e),this.findNextNonDisabled(e,n=>this.layoutDelegate[t](n))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="rtl"):this.findKey(e,n=>this.getNextColumn(n,this.direction==="rtl"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="rtl"):null}getKeyLeftOf(e){let t=this.direction==="ltr"?"getKeyLeftOf":"getKeyRightOf";return this.layoutDelegate[t]?(e=this.layoutDelegate[t](e),this.findNextNonDisabled(e,n=>this.layoutDelegate[t](n))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="ltr"):this.findKey(e,n=>this.getNextColumn(n,this.direction==="ltr"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="ltr"):null}getFirstKey(){let e=this.collection.getFirstKey();return this.findNextNonDisabled(e,t=>this.collection.getKeyAfter(t))}getLastKey(){let e=this.collection.getLastKey();return this.findNextNonDisabled(e,t=>this.collection.getKeyBefore(t))}getKeyPageAbove(e){let t=this.ref.current,n=this.layoutDelegate.getItemRect(e);if(!n)return null;if(t&&!fx(t))return this.getFirstKey();let a=e;if(this.orientation==="horizontal"){let i=Math.max(0,n.x+n.width-this.layoutDelegate.getVisibleRect().width);for(;n&&n.x>i&&a!=null;)a=this.getKeyAbove(a),n=a==null?null:this.layoutDelegate.getItemRect(a)}else{let i=Math.max(0,n.y+n.height-this.layoutDelegate.getVisibleRect().height);for(;n&&n.y>i&&a!=null;)a=this.getKeyAbove(a),n=a==null?null:this.layoutDelegate.getItemRect(a)}return a??this.getFirstKey()}getKeyPageBelow(e){let t=this.ref.current,n=this.layoutDelegate.getItemRect(e);if(!n)return null;if(t&&!fx(t))return this.getLastKey();let a=e;if(this.orientation==="horizontal"){let i=Math.min(this.layoutDelegate.getContentSize().width,n.y-n.width+this.layoutDelegate.getVisibleRect().width);for(;n&&n.x<i&&a!=null;)a=this.getKeyBelow(a),n=a==null?null:this.layoutDelegate.getItemRect(a)}else{let i=Math.min(this.layoutDelegate.getContentSize().height,n.y-n.height+this.layoutDelegate.getVisibleRect().height);for(;n&&n.y<i&&a!=null;)a=this.getKeyBelow(a),n=a==null?null:this.layoutDelegate.getItemRect(a)}return a??this.getLastKey()}getKeyForSearch(e,t){if(!this.collator)return null;let n=this.collection,a=t||this.getFirstKey();for(;a!=null;){let i=n.getItem(a);if(!i)return null;let o=i.textValue.slice(0,e.length);if(i.textValue&&this.collator.compare(o,e)===0)return a;a=this.getNextKey(a)}return null}constructor(...e){if(e.length===1){let t=e[0];this.collection=t.collection,this.ref=t.ref,this.collator=t.collator,this.disabledKeys=t.disabledKeys||new Set,this.disabledBehavior=t.disabledBehavior||"all",this.orientation=t.orientation||"vertical",this.direction=t.direction,this.layout=t.layout||"stack",this.layoutDelegate=t.layoutDelegate||new jY(t.ref)}else this.collection=e[0],this.disabledKeys=e[1],this.ref=e[2],this.collator=e[3],this.layout="stack",this.orientation="vertical",this.disabledBehavior="all",this.layoutDelegate=new jY(this.ref);this.layout==="stack"&&this.orientation==="vertical"&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}}function cKe(r){let{selectionManager:e,collection:t,disabledKeys:n,ref:a,keyboardDelegate:i,layoutDelegate:o}=r,s=Gte({usage:"search",sensitivity:"base"}),l=e.disabledBehavior,u=D.useMemo(()=>i||new nhe({collection:t,disabledKeys:n,disabledBehavior:l,ref:a,collator:s,layoutDelegate:o}),[i,o,t,n,a,s,l]),{collectionProps:c}=uKe({...r,ref:a,selectionManager:e,keyboardDelegate:u});return{listProps:c}}function dKe(r,e,t){const{disallowEmptySelection:n,isDisabled:a}=r,i=eCe({usage:"search",sensitivity:"base"}),o=D.useMemo(()=>new nhe(e.collection,e.disabledKeys,null,i),[e.collection,e.disabledKeys,i]),{menuTriggerProps:s,menuProps:l}=Xfe({isDisabled:a,type:"listbox"},e,t),u=A=>{if(e.selectionMode==="single")switch(A.key){case"ArrowLeft":{A.preventDefault();const M=e.selectedKeys.size>0?o.getKeyAbove(e.selectedKeys.values().next().value):o.getFirstKey();M&&e.setSelectedKeys([M]);break}case"ArrowRight":{A.preventDefault();const M=e.selectedKeys.size>0?o.getKeyBelow(e.selectedKeys.values().next().value):o.getFirstKey();M&&e.setSelectedKeys([M]);break}}},{typeSelectProps:c}=rhe({keyboardDelegate:o,selectionManager:e.selectionManager,onTypeSelect(A){e.setSelectedKeys([A])}}),{isInvalid:d,validationErrors:f,validationDetails:h}=e.displayValidation,{labelProps:v,fieldProps:m,descriptionProps:y,errorMessageProps:b}=YWe({...r,labelElementType:"span",isInvalid:d,errorMessage:r.errorMessage||f});c.onKeyDown=c.onKeyDownCapture,delete c.onKeyDownCapture;const w=hi(r,{labelable:!0}),S=ze(c,s,m),T=_o();return{labelProps:{...v,onClick:()=>{var A;r.isDisabled||((A=t.current)==null||A.focus(),ere("keyboard"))}},triggerProps:ze(w,{...S,onKeyDown:Un(S.onKeyDown,u,r.onKeyDown),onKeyUp:r.onKeyUp,"aria-labelledby":[T,w["aria-label"]!==void 0?w["aria-labelledby"]!==void 0?w["aria-labelledby"]:S.id:S["aria-labelledby"]].join(" "),onFocus(A){e.isFocused||(r.onFocus&&r.onFocus(A),e.setFocused(!0))},onBlur(A){e.isOpen||(r.onBlur&&r.onBlur(A),e.setFocused(!1))}}),valueProps:{id:T},menuProps:{...l,disallowEmptySelection:n,autoFocus:e.focusStrategy||!0,shouldSelectOnPressUp:!0,shouldFocusOnHover:!0,onBlur:A=>{A.currentTarget.contains(A.relatedTarget)||(r.onBlur&&r.onBlur(A),e.setFocused(!1))},onFocus:l==null?void 0:l.onFocus,"aria-labelledby":[m["aria-labelledby"],S["aria-label"]&&!m["aria-labelledby"]?S.id:null].filter(Boolean).join(" ")},descriptionProps:y,errorMessageProps:b,isInvalid:d,validationErrors:f,validationDetails:h}}var ahe=new WeakMap;function fKe(r){var e,t,n,a,i,o;const s=Vr(),{validationBehavior:l}=nw(p0)||{},[u,c]=oa(r,iF.variantKeys),d=(t=(e=r.disableAnimation)!=null?e:s==null?void 0:s.disableAnimation)!=null?t:!1,{ref:f,as:h,label:v,name:m,isLoading:y,selectorIcon:b,isOpen:w,defaultOpen:S,onOpenChange:T,startContent:A,endContent:M,description:P,renderValue:E,onSelectionChange:R,placeholder:N,isVirtualized:k,itemHeight:O=36,maxListboxHeight:L=256,children:$,disallowEmptySelection:j=!1,selectionMode:B="single",spinnerRef:H,scrollRef:F,popoverProps:K={},scrollShadowProps:U={},listboxProps:V={},spinnerProps:Q={},validationState:Z,onChange:Y,onClose:X,className:re,classNames:oe,validationBehavior:ae=(n=l??(s==null?void 0:s.validationBehavior))!=null?n:"native",hideEmptyContent:se=!1,...le}=u,fe=$r(F),ve={popoverProps:ze({placement:"bottom",triggerScaleOnOpen:!1,offset:5,disableAnimation:d},K),scrollShadowProps:ze({ref:fe,isEnabled:(a=r.showScrollIndicators)!=null?a:!0,hideScrollBar:!0,offset:15},U),listboxProps:ze({disableAnimation:d},V)},pe=h||"button",Re=typeof pe=="string",Ae=$r(f),ie=D.useRef(null),Se=D.useRef(null),ee=D.useRef(null);let te=WWe({...u,isOpen:w,selectionMode:B,disallowEmptySelection:j,validationBehavior:ae,children:$,isRequired:r.isRequired,isDisabled:r.isDisabled,isInvalid:r.isInvalid,defaultOpen:S,hideEmptyContent:se,onOpenChange:tt=>{T==null||T(tt),tt||X==null||X()},onSelectionChange:tt=>{R==null||R(tt),Y&&typeof Y=="function"&&Y({target:{...Ae.current&&{...Ae.current,name:Ae.current.name},value:Array.from(tt).join(",")}}),te.commitValidation()}});te={...te,...r.isDisabled&&{disabledKeys:new Set([...te.collection.getKeys()])}},O0(()=>{var tt;(tt=Ae.current)!=null&&tt.value&&te.setSelectedKeys(new Set([...te.selectedKeys,Ae.current.value]))},[Ae.current]);const{labelProps:de,triggerProps:ye,valueProps:xe,menuProps:Te,descriptionProps:ke,errorMessageProps:Ue,isInvalid:Xe,validationErrors:Ee,validationDetails:at}=dKe({...u,disallowEmptySelection:j,isDisabled:r.isDisabled},te,ie),$t=r.isInvalid||Z==="invalid"||Xe,{isPressed:jt,buttonProps:wr}=M2(ye,ie),{focusProps:Sr,isFocused:Ar,isFocusVisible:Pt}=Rn(),{isHovered:_n,hoverProps:Nr}=Ia({isDisabled:r.isDisabled}),ur=D.useMemo(()=>{var tt;return(!r.labelPlacement||r.labelPlacement==="inside")&&!v?"outside":(tt=r.labelPlacement)!=null?tt:"inside"},[r.labelPlacement,v]),Pr=!!N,hn=ur==="outside-left"||ur==="outside"&&(!(Pr||P)||!!r.isMultiline),Wn=ur==="inside",pn=ur==="outside-left",sa=te.isOpen||Pr||!!((i=te.selectedItems)!=null&&i.length)||!!A||!!M||!!r.isMultiline,Nn=!!((o=te.selectedItems)!=null&&o.length),Jt=!!v,Cn=lt(oe==null?void 0:oe.base,re),St=D.useMemo(()=>iF({...c,isInvalid:$t,labelPlacement:ur,disableAnimation:d,className:re}),[eo(c),$t,ur,d,re]);D.useEffect(()=>{if(te.isOpen&&ee.current&&Se.current){let tt=Se.current.querySelector("[aria-selected=true] [data-label=true]"),An=fe.current;if(tt&&An&&tt.parentElement){let wa=(An==null?void 0:An.getBoundingClientRect()).height;An.scrollTop=tt.parentElement.offsetTop-wa/2+tt.parentElement.clientHeight/2}}},[te.isOpen,d]);const _r=typeof u.errorMessage=="function"?u.errorMessage({isInvalid:$t,validationErrors:Ee,validationDetails:at}):u.errorMessage||(Ee==null?void 0:Ee.join(" ")),Ir=!!P||!!_r;D.useEffect(()=>{if(te.isOpen&&ee.current&&ie.current){let tt=ie.current.getBoundingClientRect(),An=ee.current;An.style.width=tt.width+"px"}},[te.isOpen]);const Yr=D.useCallback((tt={})=>({"data-slot":"base","data-filled":je(sa),"data-has-value":je(Nn),"data-has-label":je(Jt),"data-has-helper":je(Ir),"data-invalid":je($t),className:St.base({class:lt(Cn,tt.className)}),...tt}),[St,Ir,Nn,Jt,sa,Cn]),pr=D.useCallback((tt={})=>({ref:ie,"data-slot":"trigger","data-open":je(te.isOpen),"data-disabled":je(r==null?void 0:r.isDisabled),"data-focus":je(Ar),"data-pressed":je(jt),"data-focus-visible":je(Pt),"data-hover":je(_n),className:St.trigger({class:oe==null?void 0:oe.trigger}),...ze(wr,Sr,Nr,Pa(le,{enabled:Re}),Pa(tt))}),[St,ie,te.isOpen,oe==null?void 0:oe.trigger,r==null?void 0:r.isDisabled,Ar,jt,Pt,_n,wr,Sr,Nr,le,Re]),qr=D.useCallback((tt={})=>({state:te,triggerRef:ie,selectRef:Ae,selectionMode:B,label:r==null?void 0:r.label,name:r==null?void 0:r.name,isRequired:r==null?void 0:r.isRequired,autoComplete:r==null?void 0:r.autoComplete,isDisabled:r==null?void 0:r.isDisabled,onChange:Y,...tt}),[te,B,r==null?void 0:r.label,r==null?void 0:r.autoComplete,r==null?void 0:r.name,r==null?void 0:r.isDisabled,ie]),Kn=D.useCallback((tt={})=>({"data-slot":"label",className:St.label({class:lt(oe==null?void 0:oe.label,tt.className)}),...de,...tt}),[St,oe==null?void 0:oe.label,de]),Yn=D.useCallback((tt={})=>({"data-slot":"value",className:St.value({class:lt(oe==null?void 0:oe.value,tt.className)}),...xe,...tt}),[St,oe==null?void 0:oe.value,xe]),xa=D.useCallback((tt={})=>({"data-slot":"listboxWrapper",className:St.listboxWrapper({class:lt(oe==null?void 0:oe.listboxWrapper,tt==null?void 0:tt.className)}),style:{maxHeight:L??256,...tt.style},...ze(ve.scrollShadowProps,tt)}),[St.listboxWrapper,oe==null?void 0:oe.listboxWrapper,ve.scrollShadowProps,L]),Et=(tt={})=>{const An=k??te.collection.size>50;return{state:te,ref:Se,isVirtualized:An,virtualization:An?{maxListboxHeight:L,itemHeight:O}:void 0,"data-slot":"listbox",className:St.listbox({class:lt(oe==null?void 0:oe.listbox,tt==null?void 0:tt.className)}),scrollShadowProps:ve.scrollShadowProps,...ze(ve.listboxProps,tt,Te)}},Qr=D.useCallback((tt={})=>{var An,Ds;const wa=ze(ve.popoverProps,tt);return{state:te,triggerRef:ie,ref:ee,"data-slot":"popover",scrollRef:Se,triggerType:"listbox",classNames:{content:St.popoverContent({class:lt(oe==null?void 0:oe.popoverContent,tt.className)})},...wa,offset:te.selectedItems&&te.selectedItems.length>0?te.selectedItems.length*1e-8+(((An=ve.popoverProps)==null?void 0:An.offset)||0):(Ds=ve.popoverProps)==null?void 0:Ds.offset,shouldCloseOnInteractOutside:wa!=null&&wa.shouldCloseOnInteractOutside?wa.shouldCloseOnInteractOutside:vn=>$ae(vn,Ae,te)}},[St,oe==null?void 0:oe.popoverContent,ve.popoverProps,ie,te,te.selectedItems]),Oi=D.useCallback(()=>({"data-slot":"selectorIcon","aria-hidden":je(!0),"data-open":je(te.isOpen),className:St.selectorIcon({class:oe==null?void 0:oe.selectorIcon})}),[St,oe==null?void 0:oe.selectorIcon,te.isOpen]),Tn=D.useCallback((tt={})=>({...tt,"data-slot":"innerWrapper",className:St.innerWrapper({class:lt(oe==null?void 0:oe.innerWrapper,tt==null?void 0:tt.className)})}),[St,oe==null?void 0:oe.innerWrapper]),Zn=D.useCallback((tt={})=>({...tt,"data-slot":"helperWrapper",className:St.helperWrapper({class:lt(oe==null?void 0:oe.helperWrapper,tt==null?void 0:tt.className)})}),[St,oe==null?void 0:oe.helperWrapper]),Eo=D.useCallback((tt={})=>({...tt,...ke,"data-slot":"description",className:St.description({class:lt(oe==null?void 0:oe.description,tt==null?void 0:tt.className)})}),[St,oe==null?void 0:oe.description]),Eu=D.useCallback((tt={})=>({...tt,"data-slot":"mainWrapper",className:St.mainWrapper({class:lt(oe==null?void 0:oe.mainWrapper,tt==null?void 0:tt.className)})}),[St,oe==null?void 0:oe.mainWrapper]),Xn=D.useCallback((tt={})=>({...tt,...Ue,"data-slot":"error-message",className:St.errorMessage({class:lt(oe==null?void 0:oe.errorMessage,tt==null?void 0:tt.className)})}),[St,Ue,oe==null?void 0:oe.errorMessage]),uh=D.useCallback((tt={})=>({"aria-hidden":je(!0),"data-slot":"spinner",color:"current",size:"sm",...Q,...tt,ref:H,className:St.spinner({class:lt(oe==null?void 0:oe.spinner,tt==null?void 0:tt.className)})}),[St,H,Q,oe==null?void 0:oe.spinner]);return ahe.set(te,{isDisabled:r==null?void 0:r.isDisabled,isRequired:r==null?void 0:r.isRequired,name:r==null?void 0:r.name,isInvalid:$t,validationBehavior:ae}),{Component:pe,domRef:Ae,state:te,label:v,name:m,triggerRef:ie,isLoading:y,placeholder:N,startContent:A,endContent:M,description:P,selectorIcon:b,hasHelper:Ir,labelPlacement:ur,hasPlaceholder:Pr,renderValue:E,selectionMode:B,disableAnimation:d,isOutsideLeft:pn,shouldLabelBeOutside:hn,shouldLabelBeInside:Wn,isInvalid:$t,errorMessage:_r,getBaseProps:Yr,getTriggerProps:pr,getLabelProps:Kn,getValueProps:Yn,getListboxProps:Et,getPopoverProps:Qr,getSpinnerProps:uh,getMainWrapperProps:Eu,getListboxWrapperProps:xa,getHiddenSelectProps:qr,getInnerWrapperProps:Tn,getHelperWrapperProps:Zn,getDescriptionProps:Eo,getErrorMessageProps:Xn,getSelectorIconProps:Oi}}const BY={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function ihe(r={}){let{style:e,isFocusable:t}=r,[n,a]=D.useState(!1),{focusWithinProps:i}=Mv({isDisabled:!t,onFocusWithinChange:s=>a(s)}),o=D.useMemo(()=>n?e:e?{...BY,...e}:BY,[n]);return{visuallyHiddenProps:{...i,style:o}}}function hKe(r){let{children:e,elementType:t="div",isFocusable:n,style:a,...i}=r,{visuallyHiddenProps:o}=ihe(r);return Be.createElement(t,ze(i,o),e)}function pKe(r,e,t){let{validationBehavior:n,focus:a}=r;xn(()=>{if(n==="native"&&(t!=null&&t.current)){let l=e.realtimeValidation.isInvalid?e.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";t.current.setCustomValidity(l),t.current.hasAttribute("title")||(t.current.title=""),e.realtimeValidation.isInvalid||e.updateValidation(gKe(t.current))}});let i=Ti(()=>{e.resetValidation()}),o=Ti(l=>{var u;e.displayValidation.isInvalid||e.commitValidation();let c=t==null||(u=t.current)===null||u===void 0?void 0:u.form;if(!l.defaultPrevented&&t&&c&&mKe(c)===t.current){var d;a?a():(d=t.current)===null||d===void 0||d.focus(),ere("keyboard")}l.preventDefault()}),s=Ti(()=>{e.commitValidation()});D.useEffect(()=>{let l=t==null?void 0:t.current;if(!l)return;let u=l.form;return l.addEventListener("invalid",o),l.addEventListener("change",s),u==null||u.addEventListener("reset",i),()=>{l.removeEventListener("invalid",o),l.removeEventListener("change",s),u==null||u.removeEventListener("reset",i)}},[t,o,s,i,n])}function vKe(r){let e=r.validity;return{badInput:e.badInput,customError:e.customError,patternMismatch:e.patternMismatch,rangeOverflow:e.rangeOverflow,rangeUnderflow:e.rangeUnderflow,stepMismatch:e.stepMismatch,tooLong:e.tooLong,tooShort:e.tooShort,typeMismatch:e.typeMismatch,valueMissing:e.valueMissing,valid:e.valid}}function gKe(r){return{isInvalid:!r.validity.valid,validationDetails:vKe(r),validationErrors:r.validationMessage?[r.validationMessage]:[]}}function mKe(r){for(let e=0;e<r.elements.length;e++){let t=r.elements[e];if(!t.validity.valid)return t}return null}function yKe(r,e,t){var n;let a=ahe.get(e)||{},{autoComplete:i,name:o=a.name,isDisabled:s=a.isDisabled,selectionMode:l,onChange:u}=r,{validationBehavior:c,isRequired:d,isInvalid:f}=a,{visuallyHiddenProps:h}=ihe();return L8(r.selectRef,e.selectedKeys,e.setSelectedKeys),pKe({validationBehavior:c,focus:()=>{var v;return(v=t.current)==null?void 0:v.focus()}},e,r.selectRef),{containerProps:{...h,"aria-hidden":!0,"data-a11y-ignore":"aria-hidden-focus"},inputProps:{style:{display:"none"}},selectProps:{autoComplete:i,disabled:s,"aria-invalid":f||void 0,"aria-required":d&&c==="aria"||void 0,required:d&&c==="native",name:o,tabIndex:-1,value:l==="multiple"?[...e.selectedKeys].map(v=>String(v)):(n=[...e.selectedKeys][0])!=null?n:"",multiple:l==="multiple",onChange:v=>{e.setSelectedKeys(v.target.value),u==null||u(v)}}}}function bKe(r){var e;let{state:t,triggerRef:n,selectRef:a,label:i,name:o,isDisabled:s}=r,{containerProps:l,selectProps:u}=yKe({...r,selectRef:a},t,n);return t.collection.size<=300?_.jsx("div",{...l,"data-testid":"hidden-select-container",children:_.jsxs("label",{children:[i,_.jsxs("select",{...u,ref:a,children:[_.jsx("option",{}),[...t.collection.getKeys()].map(c=>{let d=t.collection.getItem(c);if((d==null?void 0:d.type)==="item")return _.jsx("option",{value:d.key,children:d.textValue},d.key)})]})]})}):o?_.jsx("input",{autoComplete:u.autoComplete,disabled:s,name:o,type:"hidden",value:(e=[...t.selectedKeys].join(","))!=null?e:""}):null}var xKe=w3,ohe=xKe;const TO=new WeakMap;function wKe(r){return typeof r=="string"?r.replace(/\s*/g,""):""+r}function SKe(r,e){let t=TO.get(r);if(!t)throw new Error("Unknown list");return`${t.id}-option-${wKe(e)}`}function _Ke(r,e,t){let n=hi(r,{labelable:!0}),a=r.selectionBehavior||"toggle",i=r.linkBehavior||(a==="replace"?"action":"override");a==="toggle"&&i==="action"&&(i="override");let{listProps:o}=ehe({...r,ref:t,selectionManager:e.selectionManager,collection:e.collection,disabledKeys:e.disabledKeys,linkBehavior:i}),{focusWithinProps:s}=Mv({onFocusWithin:r.onFocus,onBlurWithin:r.onBlur,onFocusWithinChange:r.onFocusChange}),l=_o(r.id);TO.set(e,{id:l,shouldUseVirtualFocus:r.shouldUseVirtualFocus,shouldSelectOnPressUp:r.shouldSelectOnPressUp,shouldFocusOnHover:r.shouldFocusOnHover,isVirtualized:r.isVirtualized,onAction:r.onAction,linkBehavior:i});let{labelProps:u,fieldProps:c}=Yde({...r,id:l,labelElementType:"span"});return{labelProps:u,listBoxProps:ze(n,s,e.selectionManager.selectionMode==="multiple"?{"aria-multiselectable":"true"}:{},{role:"listbox",...ze(c,o)})}}function CKe(r,e,t){var n,a;let{key:i}=r,o=TO.get(e);var s;let l=(s=r.isDisabled)!==null&&s!==void 0?s:e.selectionManager.isDisabled(i);var u;let c=(u=r.isSelected)!==null&&u!==void 0?u:e.selectionManager.isSelected(i);var d;let f=(d=r.shouldSelectOnPressUp)!==null&&d!==void 0?d:o==null?void 0:o.shouldSelectOnPressUp;var h;let v=(h=r.shouldFocusOnHover)!==null&&h!==void 0?h:o==null?void 0:o.shouldFocusOnHover;var m;let y=(m=r.shouldUseVirtualFocus)!==null&&m!==void 0?m:o==null?void 0:o.shouldUseVirtualFocus;var b;let w=(b=r.isVirtualized)!==null&&b!==void 0?b:o==null?void 0:o.isVirtualized,S=Ef(),T=Ef(),A={role:"option","aria-disabled":l||void 0,"aria-selected":e.selectionManager.selectionMode!=="none"?c:void 0};Of()&&M8()||(A["aria-label"]=r["aria-label"],A["aria-labelledby"]=S,A["aria-describedby"]=T);let M=e.collection.getItem(i);if(w){let B=Number(M==null?void 0:M.index);A["aria-posinset"]=Number.isNaN(B)?void 0:B+1,A["aria-setsize"]=pfe(e.collection)}let P=o!=null&&o.onAction?()=>{var B;return o==null||(B=o.onAction)===null||B===void 0?void 0:B.call(o,i)}:void 0,{itemProps:E,isPressed:R,isFocused:N,hasAction:k,allowsSelection:O}=CO({selectionManager:e.selectionManager,key:i,ref:t,shouldSelectOnPressUp:f,allowsDifferentPressOrigin:f&&v,isVirtualized:w,shouldUseVirtualFocus:y,isDisabled:l,onAction:P||!(M==null||(n=M.props)===null||n===void 0)&&n.onAction?Un(M==null||(a=M.props)===null||a===void 0?void 0:a.onAction,P):void 0,linkBehavior:o==null?void 0:o.linkBehavior}),{hoverProps:L}=Ia({isDisabled:l||!v,onHoverStart(){r0()||(e.selectionManager.setFocused(!0),e.selectionManager.setFocusedKey(i))}}),$=hi(M==null?void 0:M.props);delete $.id;let j=a3(M==null?void 0:M.props);return{optionProps:{...A,...ze($,E,L,j),id:SKe(e,i)},labelProps:{id:S},descriptionProps:{id:T},isFocused:N,isFocusVisible:N&&r0(),isSelected:c,isDisabled:l,isPressed:R,allowsSelection:O,hasAction:k}}function TKe(r){let{heading:e,"aria-label":t}=r,n=_o();return{itemProps:{role:"presentation"},headingProps:e?{id:n,role:"presentation"}:{},groupProps:{role:"group","aria-label":t,"aria-labelledby":e?n:void 0}}}function AKe(r){var e;const t=Vr(),{ref:n,as:a,state:i,variant:o,color:s,onAction:l,children:u,onSelectionChange:c,disableAnimation:d=(e=t==null?void 0:t.disableAnimation)!=null?e:!1,itemClasses:f,className:h,topContent:v,bottomContent:m,emptyContent:y="No items.",hideSelectedIcon:b=!1,hideEmptyContent:w=!1,shouldHighlightOnFocus:S=!1,classNames:T,...A}=r,M=a||"ul",P=typeof M=="string",E=$r(n),R=vfe({...r,children:u,onSelectionChange:c}),N=i||R,{listBoxProps:k}=_Ke({...r,onAction:l},N,E),O=D.useMemo(()=>rne({className:h}),[h]),L=lt(T==null?void 0:T.base,h);return{Component:M,state:N,variant:o,color:s,slots:O,classNames:T,topContent:v,bottomContent:m,emptyContent:y,hideEmptyContent:w,shouldHighlightOnFocus:S,hideSelectedIcon:b,disableAnimation:d,className:h,itemClasses:f,getBaseProps:(H={})=>({ref:E,"data-slot":"base",className:O.base({class:L}),...Pa(A,{enabled:P}),...H}),getListProps:(H={})=>({"data-slot":"list",className:O.list({class:T==null?void 0:T.list}),...k,...H}),getEmptyContentProps:(H={})=>({"data-slot":"empty-content",children:y,className:O.emptyContent({class:T==null?void 0:T.emptyContent}),...H})}}function EKe(r){const{isSelected:e,disableAnimation:t,...n}=r;return _.jsx("svg",{"aria-hidden":"true","data-selected":e,role:"presentation",viewBox:"0 0 17 18",...n,children:_.jsx("polyline",{fill:"none",points:"1 9 7 14 15 4",stroke:"currentColor",strokeDasharray:22,strokeDashoffset:e?44:66,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,style:t?{}:{transition:"stroke-dashoffset 200ms ease"}})})}var MKe=700;function DKe(){return rh()||typeof window>"u"?!1:window.screen.width<=MKe}function LKe(r){var e,t;const n=Vr(),[a,i]=oa(r,iT.variantKeys),{as:o,item:s,state:l,description:u,startContent:c,endContent:d,isVirtualized:f,selectedIcon:h,className:v,classNames:m,autoFocus:y,onPress:b,onClick:w,shouldHighlightOnFocus:S,hideSelectedIcon:T=!1,isReadOnly:A=!1,...M}=a,P=(t=(e=r.disableAnimation)!=null?e:n==null?void 0:n.disableAnimation)!=null?t:!1,E=D.useRef(null),R=o||(r.href?"a":"li"),N=typeof R=="string",{rendered:k,key:O}=s,L=l.disabledKeys.has(O)||r.isDisabled,$=l.selectionManager.selectionMode!=="none",j=DKe();w&&typeof w=="function"&&T8("onClick is deprecated, please use onPress instead. See: https://github.com/heroui-inc/heroui/issues/4292","ListboxItem");const{pressProps:B,isPressed:H}=Ss({ref:E,isDisabled:L,onPress:b}),{isHovered:F,hoverProps:K}=Ia({isDisabled:L}),{isFocusVisible:U,focusProps:V}=Rn({autoFocus:y}),{isFocused:Q,isSelected:Z,optionProps:Y,labelProps:X,descriptionProps:re}=CKe({key:O,isDisabled:L,"aria-label":a["aria-label"],isVirtualized:f},l,E);let oe=Y;const ae=D.useMemo(()=>iT({...i,isDisabled:L,disableAnimation:P,hasTitleTextChild:typeof k=="string",hasDescriptionTextChild:typeof u=="string"}),[eo(i),L,P,k,u]),se=lt(m==null?void 0:m.base,v);A&&(oe=d_e(oe));const le=S&&Q||(j?F||H:F||Q&&!U),fe=(ie={})=>({ref:E,...ze({onClick:w},oe,A?{}:ze(V,B),K,Pa(M,{enabled:N}),ie),"data-selectable":je($),"data-focus":je(Q),"data-hover":je(le),"data-disabled":je(L),"data-selected":je(Z),"data-pressed":je(H),"data-focus-visible":je(U),className:ae.base({class:lt(se,ie.className)})}),ve=(ie={})=>({...ze(X,ie),"data-label":je(!0),className:ae.title({class:m==null?void 0:m.title})}),pe=(ie={})=>({...ze(re,ie),className:ae.description({class:m==null?void 0:m.description})}),Re=(ie={})=>({...ze(ie),className:ae.wrapper({class:m==null?void 0:m.wrapper})}),Ae=D.useCallback((ie={})=>({"aria-hidden":je(!0),"data-disabled":je(L),className:ae.selectedIcon({class:m==null?void 0:m.selectedIcon}),...ie}),[L,ae,m]);return{Component:R,domRef:E,slots:ae,classNames:m,isSelectable:$,isSelected:Z,isDisabled:L,rendered:k,description:u,startContent:c,endContent:d,selectedIcon:h,hideSelectedIcon:T,disableAnimation:P,getItemProps:fe,getLabelProps:ve,getWrapperProps:Re,getDescriptionProps:pe,getSelectedIconProps:Ae}}var she=r=>{const{Component:e,rendered:t,description:n,isSelectable:a,isSelected:i,isDisabled:o,selectedIcon:s,startContent:l,endContent:u,hideSelectedIcon:c,disableAnimation:d,getItemProps:f,getLabelProps:h,getWrapperProps:v,getDescriptionProps:m,getSelectedIconProps:y}=LKe(r),b=D.useMemo(()=>{const w=_.jsx(EKe,{disableAnimation:d,isSelected:i});return typeof s=="function"?s({icon:w,isSelected:i,isDisabled:o}):s||w},[s,i,o,d]);return _.jsxs(e,{...f(),children:[l,n?_.jsxs("div",{...v(),children:[_.jsx("span",{...h(),children:t}),_.jsx("span",{...m(),children:n})]}):_.jsx("span",{...h(),children:t}),a&&!c&&_.jsx("span",{...y(),children:b}),u]})};she.displayName="HeroUI.ListboxItem";var AO=she;function PKe(r){let e=Pa(r,{enabled:typeof r.elementType=="string"}),t;return r.orientation==="vertical"&&(t="vertical"),r.elementType!=="hr"?{separatorProps:{...e,role:"separator","aria-orientation":t}}:{separatorProps:e}}function IKe(r){const{as:e,className:t,orientation:n,...a}=r;let i=e||"hr";i==="hr"&&n==="vertical"&&(i="div");const{separatorProps:o}=PKe({elementType:typeof i=="string"?i:"hr",orientation:n}),s=D.useMemo(()=>ane({orientation:n,className:t}),[n,t]),l=D.useCallback((u={})=>({className:s,role:"separator","data-orientation":n,...o,...a,...u}),[s,n,o,a]);return{Component:i,getDividerProps:l}}var lhe=Ht((r,e)=>{const{Component:t,getDividerProps:n}=IKe({...r});return _.jsx(t,{ref:e,...n()})});lhe.displayName="HeroUI.Divider";var aw=lhe,uhe=Ht(({item:r,state:e,as:t,variant:n,color:a,disableAnimation:i,className:o,classNames:s,hideSelectedIcon:l,showDivider:u=!1,dividerProps:c={},itemClasses:d,title:f,items:h,...v},m)=>{const y=t||"li",b=D.useMemo(()=>nne(),[]),w=lt(s==null?void 0:s.base,o),S=lt(s==null?void 0:s.divider,c==null?void 0:c.className),{itemProps:T,headingProps:A,groupProps:M}=TKe({heading:r.rendered,"aria-label":r["aria-label"]});return _.jsxs(y,{"data-slot":"base",...ze(T,v),className:b.base({class:w}),children:[r.rendered&&_.jsx("span",{...A,className:b.heading({class:s==null?void 0:s.heading}),"data-slot":"heading",children:r.rendered}),_.jsxs("ul",{...M,className:b.group({class:s==null?void 0:s.group}),"data-has-title":!!r.rendered,"data-slot":"group",children:[[...r.childNodes].map(P=>{const{key:E,props:R}=P;let N=_.jsx(AO,{classNames:d,color:a,disableAnimation:i,hideSelectedIcon:l,item:P,state:e,variant:n,...R},E);return P.wrapper&&(N=P.wrapper(N)),N}),u&&_.jsx(aw,{as:"li",className:b.divider({class:S}),...c})]})]},r.key)});uhe.displayName="HeroUI.ListboxSection";var che=uhe;function Yg(r,e,t){let n=t.initialDeps??[],a;return()=>{var i,o,s,l;let u;t.key&&((i=t.debug)!=null&&i.call(t))&&(u=Date.now());const c=r();if(!(c.length!==n.length||c.some((h,v)=>n[v]!==h)))return a;n=c;let f;if(t.key&&((o=t.debug)!=null&&o.call(t))&&(f=Date.now()),a=e(...c),t.key&&((s=t.debug)!=null&&s.call(t))){const h=Math.round((Date.now()-u)*100)/100,v=Math.round((Date.now()-f)*100)/100,m=v/16,y=(b,w)=>{for(b=String(b);b.length<w;)b=" "+b;return b};console.info(`%c⏱ ${y(v,5)} /${y(h,5)} ms`,`
|
|
347
347
|
font-size: .6rem;
|
|
348
348
|
font-weight: bold;
|
|
349
|
-
color: hsl(${Math.max(0,Math.min(120-120*m,120))}deg 100% 31%);`,t==null?void 0:t.key)}return(l=t==null?void 0:t.onChange)==null||l.call(t,a),a}}function xP(r,e){if(r===void 0)throw new Error("Unexpected undefined");return r}const kKe=(r,e)=>Math.abs(r-e)<1,RKe=(r,e,t)=>{let n;return function(...a){r.clearTimeout(n),n=r.setTimeout(()=>e.apply(this,a),t)}},NKe=r=>r,OKe=r=>{const e=Math.max(r.startIndex-r.overscan,0),t=Math.min(r.endIndex+r.overscan,r.count-1),n=[];for(let a=e;a<=t;a++)n.push(a);return n},$Ke=(r,e)=>{const t=r.scrollElement;if(!t)return;const n=r.targetWindow;if(!n)return;const a=o=>{const{width:s,height:l}=o;e({width:Math.round(s),height:Math.round(l)})};if(a(t.getBoundingClientRect()),!n.ResizeObserver)return()=>{};const i=new n.ResizeObserver(o=>{const s=o[0];if(s!=null&&s.borderBoxSize){const l=s.borderBoxSize[0];if(l){a({width:l.inlineSize,height:l.blockSize});return}}a(t.getBoundingClientRect())});return i.observe(t,{box:"border-box"}),()=>{i.unobserve(t)}},VY={passive:!0},zKe=typeof window>"u"?!0:"onscrollend"in window,jKe=(r,e)=>{const t=r.scrollElement;if(!t)return;const n=r.targetWindow;if(!n)return;let a=0;const i=r.options.useScrollendEvent&&zKe?()=>{}:RKe(n,()=>{e(a,!1)},r.options.isScrollingResetDelay),o=u=>()=>{const{horizontal:c,isRtl:d}=r.options;a=c?t.scrollLeft*(d&&-1||1):t.scrollTop,i(),e(a,u)},s=o(!0),l=o(!1);return l(),t.addEventListener("scroll",s,VY),t.addEventListener("scrollend",l,VY),()=>{t.removeEventListener("scroll",s),t.removeEventListener("scrollend",l)}},BKe=(r,e,t)=>{if(e!=null&&e.borderBoxSize){const n=e.borderBoxSize[0];if(n)return Math.round(n[t.options.horizontal?"inlineSize":"blockSize"])}return Math.round(r.getBoundingClientRect()[t.options.horizontal?"width":"height"])},VKe=(r,{adjustments:e=0,behavior:t},n)=>{var a,i;const o=r+e;(i=(a=n.scrollElement)==null?void 0:a.scrollTo)==null||i.call(a,{[n.options.horizontal?"left":"top"]:o,behavior:t})};class FKe{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let t=null;const n=()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(a=>{a.forEach(i=>{this._measureElement(i.target,i)})}));return{disconnect:()=>{var a;(a=n())==null||a.disconnect(),t=null},observe:a=>{var i;return(i=n())==null?void 0:i.observe(a,{box:"border-box"})},unobserve:a=>{var i;return(i=n())==null?void 0:i.unobserve(a)}}})(),this.range=null,this.setOptions=t=>{Object.entries(t).forEach(([n,a])=>{typeof a>"u"&&delete t[n]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:NKe,rangeExtractor:OKe,onChange:()=>{},measureElement:BKe,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!0,...t}},this.notify=t=>{var n,a;(a=(n=this.options).onChange)==null||a.call(n,this,t)},this.maybeNotify=Yg(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),t=>{this.notify(t)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.maybeNotify();return}this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this.elementsCache.forEach(a=>{this.observer.observe(a)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,a=>{this.scrollRect=a,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(a,i)=>{this.scrollAdjustments=0,this.scrollDirection=i?this.getScrollOffset()<a?"forward":"backward":null,this.scrollOffset=a,this.isScrolling=i,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(t,n)=>{const a=new Map,i=new Map;for(let o=n-1;o>=0;o--){const s=t[o];if(a.has(s.lane))continue;const l=i.get(s.lane);if(l==null||s.end>l.end?i.set(s.lane,s):s.end<l.end&&a.set(s.lane,!0),a.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort((o,s)=>o.end===s.end?o.index-s.index:o.end-s.end)[0]:void 0},this.getMeasurementOptions=Yg(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(t,n,a,i,o)=>(this.pendingMeasuredCacheIndexes=[],{count:t,paddingStart:n,scrollMargin:a,getItemKey:i,enabled:o}),{key:!1}),this.getMeasurements=Yg(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:t,paddingStart:n,scrollMargin:a,getItemKey:i,enabled:o},s)=>{if(!o)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(c=>{this.itemSizeCache.set(c.key,c.size)}));const l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const u=this.measurementsCache.slice(0,l);for(let c=l;c<t;c++){const d=i(c),f=this.options.lanes===1?u[c-1]:this.getFurthestMeasurement(u,c),h=f?f.end+this.options.gap:n+a,v=s.get(d),m=typeof v=="number"?v:this.options.estimateSize(c),y=h+m,b=f?f.lane:c%this.options.lanes;u[c]={index:c,start:h,size:m,end:y,key:d,lane:b}}return this.measurementsCache=u,u},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Yg(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(t,n,a)=>this.range=t.length>0&&n>0?HKe({measurements:t,outerSize:n,scrollOffset:a}):null,{key:!1,debug:()=>this.options.debug}),this.getIndexes=Yg(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(t,n,a,i)=>n===null?[]:t({startIndex:n.startIndex,endIndex:n.endIndex,overscan:a,count:i}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=t=>{const n=this.options.indexAttribute,a=t.getAttribute(n);return a?parseInt(a,10):(console.warn(`Missing attribute name '${n}={index}' on measured element.`),-1)},this._measureElement=(t,n)=>{const a=this.indexFromElement(t),i=this.measurementsCache[a];if(!i)return;const o=i.key,s=this.elementsCache.get(o);s!==t&&(s&&this.observer.unobserve(s),this.observer.observe(t),this.elementsCache.set(o,t)),t.isConnected&&this.resizeItem(a,this.options.measureElement(t,n,this))},this.resizeItem=(t,n)=>{const a=this.measurementsCache[t];if(!a)return;const i=this.itemSizeCache.get(a.key)??a.size,o=n-i;o!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(a,o,this):a.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=o,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(a.index),this.itemSizeCache=new Map(this.itemSizeCache.set(a.key,n)),this.notify(!1))},this.measureElement=t=>{if(!t){this.elementsCache.forEach((n,a)=>{n.isConnected||(this.observer.unobserve(n),this.elementsCache.delete(a))});return}this._measureElement(t,void 0)},this.getVirtualItems=Yg(()=>[this.getIndexes(),this.getMeasurements()],(t,n)=>{const a=[];for(let i=0,o=t.length;i<o;i++){const s=t[i],l=n[s];a.push(l)}return a},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=t=>{const n=this.getMeasurements();if(n.length!==0)return xP(n[dhe(0,n.length-1,a=>xP(n[a]).start,t)])},this.getOffsetForAlignment=(t,n)=>{const a=this.getSize(),i=this.getScrollOffset();n==="auto"&&t>=i+a&&(n="end"),n==="end"&&(t-=a);const o=this.options.horizontal?"scrollWidth":"scrollHeight",l=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[o]:this.scrollElement[o]:0)-a;return Math.max(Math.min(l,t),0)},this.getOffsetForIndex=(t,n="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const a=this.measurementsCache[t];if(!a)return;const i=this.getSize(),o=this.getScrollOffset();if(n==="auto")if(a.end>=o+i-this.options.scrollPaddingEnd)n="end";else if(a.start<=o+this.options.scrollPaddingStart)n="start";else return[o,n];const s=a.start-this.options.scrollPaddingStart+(a.size-i)/2;switch(n){case"center":return[this.getOffsetForAlignment(s,n),n];case"end":return[this.getOffsetForAlignment(a.end+this.options.scrollPaddingEnd,n),n];default:return[this.getOffsetForAlignment(a.start-this.options.scrollPaddingStart,n),n]}},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(t,{align:n="start",behavior:a}={})=>{this.cancelScrollToIndex(),a==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(t,n),{adjustments:void 0,behavior:a})},this.scrollToIndex=(t,{align:n="auto",behavior:a}={})=>{t=Math.max(0,Math.min(t,this.options.count-1)),this.cancelScrollToIndex(),a==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const i=this.getOffsetForIndex(t,n);if(!i)return;const[o,s]=i;this._scrollToOffset(o,{adjustments:void 0,behavior:a}),a!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(t))){const[u]=xP(this.getOffsetForIndex(t,s));kKe(u,this.getScrollOffset())||this.scrollToIndex(t,{align:s,behavior:a})}else this.scrollToIndex(t,{align:s,behavior:a})}))},this.scrollBy=(t,{behavior:n}={})=>{this.cancelScrollToIndex(),n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+t,{adjustments:void 0,behavior:n})},this.getTotalSize=()=>{var t;const n=this.getMeasurements();let a;return n.length===0?a=this.options.paddingStart:a=this.options.lanes===1?((t=n[n.length-1])==null?void 0:t.end)??0:Math.max(...n.slice(-this.options.lanes).map(i=>i.end)),Math.max(a-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(t,{adjustments:n,behavior:a})=>{this.options.scrollToFn(t,{behavior:a,adjustments:n},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(e)}}const dhe=(r,e,t,n)=>{for(;r<=e;){const a=(r+e)/2|0,i=t(a);if(i<n)r=a+1;else if(i>n)e=a-1;else return a}return r>0?r-1:0};function HKe({measurements:r,outerSize:e,scrollOffset:t}){const n=r.length-1,i=dhe(0,n,s=>r[s].start,t);let o=i;for(;o<n&&r[o].end<t+e;)o++;return{startIndex:i,endIndex:o}}const FY=typeof document<"u"?D.useLayoutEffect:D.useEffect;function UKe(r){const e=D.useReducer(()=>({}),{})[1],t={...r,onChange:(a,i)=>{var o;i?BA.flushSync(e):e(),(o=r.onChange)==null||o.call(r,a,i)}},[n]=D.useState(()=>new FKe(t));return n.setOptions(t),FY(()=>n._didMount(),[]),FY(()=>n._willUpdate()),n}function GKe(r){return UKe({observeElementRect:$Ke,observeElementOffset:jKe,scrollToFn:VKe,...r})}function qKe(r={}){const{domRef:e,isEnabled:t=!0,overflowCheck:n="vertical",visibility:a="auto",offset:i=0,onVisibilityChange:o,updateDeps:s=[]}=r,l=D.useRef(a);D.useEffect(()=>{const u=e==null?void 0:e.current;if(!u||!t)return;const c=(h,v,m,y,b)=>{if(a==="auto"){const w=`${y}${Ete(b)}Scroll`;v&&m?(u.dataset[w]="true",u.removeAttribute(`data-${y}-scroll`),u.removeAttribute(`data-${b}-scroll`)):(u.dataset[`${y}Scroll`]=v.toString(),u.dataset[`${b}Scroll`]=m.toString(),u.removeAttribute(`data-${y}-${b}-scroll`))}else{const w=v&&m?"both":v?y:m?b:"none";w!==l.current&&(o==null||o(w),l.current=w)}},d=()=>{const h=[{type:"vertical",prefix:"top",suffix:"bottom"},{type:"horizontal",prefix:"left",suffix:"right"}];for(const{type:v,prefix:m,suffix:y}of h)if(n===v||n==="both"){const b=v==="vertical"?u.scrollTop>i:u.scrollLeft>i,w=v==="vertical"?u.scrollTop+u.clientHeight+i<u.scrollHeight:u.scrollLeft+u.clientWidth+i<u.scrollWidth;c(v,b,w,m,y)}},f=()=>{["top","bottom","top-bottom","left","right","left-right"].forEach(h=>{u.removeAttribute(`data-${h}-scroll`)})};return d(),u.addEventListener("scroll",d),a!=="auto"&&(f(),a==="both"?(u.dataset.topBottomScroll=String(n==="vertical"),u.dataset.leftRightScroll=String(n==="horizontal")):(u.dataset.topBottomScroll="false",u.dataset.leftRightScroll="false",["top","bottom","left","right"].forEach(h=>{u.dataset[`${h}Scroll`]=String(a===h)}))),()=>{u.removeEventListener("scroll",d),f()}},[...s,t,a,n,o,e])}function QKe(r){var e;const[t,n]=oa(r,aT.variantKeys),{ref:a,as:i,children:o,className:s,style:l,size:u=40,offset:c=0,visibility:d="auto",isEnabled:f=!0,onVisibilityChange:h,...v}=t,m=i||"div",y=$r(a);qKe({domRef:y,offset:c,visibility:d,isEnabled:f,onVisibilityChange:h,updateDeps:[o],overflowCheck:(e=r.orientation)!=null?e:"vertical"});const b=D.useMemo(()=>aT({...n,className:s}),[eo(n),s]);return{Component:m,styles:b,domRef:y,children:o,getBaseProps:(S={})=>{var T;return{ref:y,className:b,"data-orientation":(T=r.orientation)!=null?T:"vertical",style:{"--scroll-shadow-size":`${u}px`,...l,...S.style},...v,...S}}}}var WKe=(r,e)=>{const t=[];for(const n of r)n.type==="section"?t.push(([...n.childNodes].length+1)*e):t.push(e);return t},KKe=r=>{if(!r||r.scrollTop===void 0||r.clientHeight===void 0||r.scrollHeight===void 0)return{isTop:!1,isBottom:!1,isMiddle:!1};const e=r.scrollTop===0,t=Math.ceil(r.scrollTop+r.clientHeight)>=r.scrollHeight;return{isTop:e,isBottom:t,isMiddle:!e&&!t}},YKe=r=>{const{Component:e,state:t,color:n,variant:a,itemClasses:i,getBaseProps:o,topContent:s,bottomContent:l,hideEmptyContent:u,hideSelectedIcon:c,shouldHighlightOnFocus:d,disableAnimation:f,getEmptyContentProps:h,getListProps:v,scrollShadowProps:m}=r,{virtualization:y}=r;if(!y||!XSe(y)&&!y.maxListboxHeight&&!y.itemHeight)throw new Error("You are using a virtualized listbox. VirtualizedListbox requires 'virtualization' props with 'maxListboxHeight' and 'itemHeight' properties. This error might have originated from autocomplete components that use VirtualizedListbox. Please provide these props to use the virtualized listbox.");const{maxListboxHeight:b,itemHeight:w}=y,S=Math.min(b,w*t.collection.size),T=D.useRef(null),A=D.useMemo(()=>WKe([...t.collection],w),[t.collection,w]),M=GKe({count:[...t.collection].length,getScrollElement:()=>T.current,estimateSize:L=>A[L]}),P=M.getVirtualItems(),{getBaseProps:E}=QKe({...m}),R=L=>{var $;const j=[...t.collection][L.index];if(!j)return null;const B={color:n,item:j,state:t,variant:a,disableAnimation:f,hideSelectedIcon:c,...j.props},H={position:"absolute",top:0,left:0,width:"100%",height:`${L.size}px`,transform:`translateY(${L.start}px)`};if(j.type==="section")return _.jsx(che,{...B,itemClasses:i,style:{...H,...B.style}},j.key);let F=_.jsx(AO,{...B,classNames:ze(i,($=j.props)==null?void 0:$.classNames),shouldHighlightOnFocus:d,style:{...H,...B.style}},j.key);return j.wrapper&&(F=j.wrapper(F)),F},[N,k]=D.useState({isTop:!1,isBottom:!0,isMiddle:!1}),O=_.jsxs(e,{...v(),children:[!t.collection.size&&!u&&_.jsx("li",{children:_.jsx("div",{...h()})}),_.jsx("div",{...Pa(E()),ref:T,"data-bottom-scroll":N.isTop,"data-top-bottom-scroll":N.isMiddle,"data-top-scroll":N.isBottom,style:{height:b,overflow:"auto"},onScroll:L=>{k(KKe(L.target))},children:S>0&&w>0&&_.jsx("div",{style:{height:`${M.getTotalSize()}px`,width:"100%",position:"relative"},children:P.map(L=>R(L))})})]});return _.jsxs("div",{...o(),children:[s,O,l]})},ZKe=YKe,XKe=Ht(function(e,t){const{isVirtualized:n,...a}=e,i=AKe({...a,ref:t}),{Component:o,state:s,color:l,variant:u,itemClasses:c,getBaseProps:d,topContent:f,bottomContent:h,hideEmptyContent:v,hideSelectedIcon:m,shouldHighlightOnFocus:y,disableAnimation:b,getEmptyContentProps:w,getListProps:S}=i;if(n)return _.jsx(ZKe,{...e,...i});const T=_.jsxs(o,{...S(),children:[!s.collection.size&&!v&&_.jsx("li",{children:_.jsx("div",{...w()})}),[...s.collection].map(A=>{var M;const P={color:l,item:A,state:s,variant:u,disableAnimation:b,hideSelectedIcon:m,...A.props};if(A.type==="section")return _.jsx(che,{...P,itemClasses:c},A.key);let E=_.jsx(AO,{...P,classNames:ze(c,(M=A.props)==null?void 0:M.classNames),shouldHighlightOnFocus:y},A.key);return A.wrapper&&(E=A.wrapper(E)),E})]});return _.jsxs("div",{...d(),children:[f,T,h]})}),JKe=XKe;function eYe(r,e){const{triggerRef:t,popoverRef:n,showArrow:a,offset:i=7,crossOffset:o=0,scrollRef:s,shouldFlip:l,boundaryElement:u,isDismissable:c=!0,shouldCloseOnBlur:d=!0,shouldCloseOnScroll:f=!0,placement:h="top",containerPadding:v,shouldCloseOnInteractOutside:m,isNonModal:y,isKeyboardDismissDisabled:b,updatePositionDeps:w=[],...S}=r,T=y??!0,{overlayProps:A,underlayProps:M}=E2({isOpen:e.isOpen,onClose:e.close,shouldCloseOnBlur:d,isDismissable:c,isKeyboardDismissDisabled:b,shouldCloseOnInteractOutside:m||(k=>$ae(k,t,e))},n),{overlayProps:P,arrowProps:E,placement:R,updatePosition:N}=o3({...S,shouldFlip:l,crossOffset:o,targetRef:t,overlayRef:n,isOpen:e.isOpen,scrollRef:s,boundaryElement:u,containerPadding:v,placement:Oae(h),offset:a?i+3:i,onClose:T&&f?e.close:()=>{}});return O0(()=>{w.length&&N()},w),D.useEffect(()=>{if(e.isOpen&&!T&&n.current)return EMe([n.current])},[T,e.isOpen,n]),{popoverProps:ze(A,P),arrowProps:E,underlayProps:M,placement:R}}var tYe="top";function fhe(r){var e,t,n;const a=Vr(),[i,o]=oa(r,zf.variantKeys),{as:s,ref:l,children:u,state:c,triggerRef:d,scrollRef:f,defaultOpen:h,onOpenChange:v,isOpen:m,isNonModal:y=!0,shouldFlip:b=!0,containerPadding:w=12,shouldBlockScroll:S=!1,isDismissable:T=!0,shouldCloseOnBlur:A,portalContainer:M,updatePositionDeps:P,dialogProps:E,placement:R=tYe,triggerType:N="dialog",showArrow:k=!1,offset:O=7,crossOffset:L=0,boundaryElement:$,isKeyboardDismissDisabled:j,shouldCloseOnInteractOutside:B,shouldCloseOnScroll:H,motionProps:F,className:K,classNames:U,onClose:V,...Q}=i,Z=s||"div",Y=$r(l),X=D.useRef(null),re=D.useRef(!1),oe=d||X,ae=(t=(e=r.disableAnimation)!=null?e:a==null?void 0:a.disableAnimation)!=null?t:!1,se=rN({isOpen:m,defaultOpen:h,onOpenChange:Ee=>{v==null||v(Ee),Ee||V==null||V()}}),le=c||se,{popoverProps:fe,underlayProps:ve,placement:pe}=eYe({triggerRef:oe,isNonModal:y,popoverRef:Y,placement:R,offset:O,scrollRef:f,isDismissable:T,shouldCloseOnBlur:A,boundaryElement:$,crossOffset:L,shouldFlip:b,containerPadding:w,updatePositionDeps:P,isKeyboardDismissDisabled:j,shouldCloseOnScroll:H,shouldCloseOnInteractOutside:B},le),Re=D.useMemo(()=>pe?AMe(pe,R)?pe:R:null,[pe,R]),{triggerProps:Ae}=ore({type:N},le,oe),{isFocusVisible:ie,isFocused:Se,focusProps:ee}=Rn(),te=D.useMemo(()=>zf({...o}),[eo(o)]),de=lt(U==null?void 0:U.base,K);R8({isDisabled:!(S&&le.isOpen)});const ye=(Ee={})=>({ref:Y,...ze(fe,Q,Ee),style:ze(fe.style,Q.style,Ee.style)}),xe=(Ee={})=>({"data-slot":"base","data-open":je(le.isOpen),"data-focus":je(Se),"data-arrow":je(k),"data-focus-visible":je(ie),"data-placement":pe?fT(pe,R):void 0,...ze(ee,E,Ee),className:te.base({class:lt(de)}),style:{outline:"none"}}),Te=D.useCallback((Ee={})=>({"data-slot":"content","data-open":je(le.isOpen),"data-arrow":je(k),"data-placement":pe?fT(pe,R):void 0,className:te.content({class:lt(U==null?void 0:U.content,Ee.className)})}),[te,le.isOpen,k,Re,R,U,pe]),ke=D.useCallback(Ee=>{var at;let $t;return Ee.pointerType==="touch"&&((r==null?void 0:r.backdrop)==="blur"||(r==null?void 0:r.backdrop)==="opaque")?$t=setTimeout(()=>{re.current=!0},100):re.current=!0,(at=Ae.onPress)==null||at.call(Ae,Ee),()=>{clearTimeout($t)}},[Ae==null?void 0:Ae.onPress]),Ue=D.useCallback((Ee={},at=null)=>{const{isDisabled:$t,...jt}=Ee;return{"data-slot":"trigger",...ze({"aria-haspopup":"dialog"},Ae,jt),onPress:ke,isDisabled:$t,className:te.trigger({class:lt(U==null?void 0:U.trigger,Ee.className),isTriggerDisabled:$t}),ref:C2(at,oe)}},[le,Ae,ke,oe]),Xe=D.useCallback((Ee={})=>({"data-slot":"backdrop",className:te.backdrop({class:U==null?void 0:U.backdrop}),onClick:at=>{if(!re.current){at.preventDefault();return}le.close(),re.current=!1},...ve,...Ee}),[te,le.isOpen,U,ve]);return D.useEffect(()=>{if(le.isOpen&&(Y!=null&&Y.current))return N8([Y==null?void 0:Y.current])},[le.isOpen,Y]),{state:le,Component:Z,children:u,classNames:U,showArrow:k,triggerRef:oe,placement:Re,isNonModal:y,popoverRef:Y,portalContainer:M,isOpen:le.isOpen,onClose:le.close,disableAnimation:ae,shouldBlockScroll:S,backdrop:(n=r.backdrop)!=null?n:"transparent",motionProps:F,getBackdropProps:Xe,getPopoverProps:ye,getTriggerProps:Ue,getDialogProps:xe,getContentProps:Te}}var hhe=()=>Jc(()=>import("./index-CGOi-AYz.js"),[]).then(r=>r.default),phe=Ht(({children:r,motionProps:e,placement:t,disableAnimation:n,style:a={},transformOrigin:i={},...o},s)=>{let l=a;return i.originX!==void 0||i.originY!==void 0?l={...l,transformOrigin:i}:t&&(l={...l,...tN(t==="center"?"top":t)}),n?_.jsx("div",{...o,ref:s,children:r}):_.jsx(Mi,{features:hhe,children:_.jsx(Di.div,{ref:s,animate:"enter",exit:"exit",initial:"initial",style:l,variants:jf.scaleSpringOpacity,...ze(o,e),children:r})})});phe.displayName="HeroUI.FreeSoloPopoverWrapper";var vhe=Ht(({children:r,transformOrigin:e,disableDialogFocus:t=!1,...n},a)=>{const{Component:i,state:o,placement:s,backdrop:l,portalContainer:u,disableAnimation:c,motionProps:d,isNonModal:f,getPopoverProps:h,getBackdropProps:v,getDialogProps:m,getContentProps:y}=fhe({...n,ref:a}),b=D.useRef(null),{dialogProps:w,titleProps:S}=C3({},b),T=m({...!t&&{ref:b},...w}),A=D.useMemo(()=>l==="transparent"?null:c?_.jsx("div",{...v()}):_.jsx(Mi,{features:hhe,children:_.jsx(Di.div,{animate:"enter",exit:"exit",initial:"exit",variants:jf.fade,...v()})}),[l,c,v]);return _.jsxs(l3,{portalContainer:u,children:[!f&&A,_.jsx(i,{...h(),children:_.jsxs(phe,{disableAnimation:c,motionProps:d,placement:s,tabIndex:-1,transformOrigin:e,...T,children:[!f&&_.jsx($f,{onDismiss:o.close}),_.jsx("div",{...y(),children:typeof r=="function"?r(S):r}),_.jsx($f,{onDismiss:o.close})]})})]})});vhe.displayName="HeroUI.FreeSoloPopover";var rYe=vhe,[nYe,ghe]=nh({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within `<Popover />`"}),HY=()=>Jc(()=>import("./index-CGOi-AYz.js"),[]).then(r=>r.default),mhe=r=>{const{as:e,children:t,className:n,...a}=r,{Component:i,placement:o,backdrop:s,motionProps:l,disableAnimation:u,getPopoverProps:c,getDialogProps:d,getBackdropProps:f,getContentProps:h,isNonModal:v,onClose:m}=ghe(),y=D.useRef(null),{dialogProps:b,titleProps:w}=C3({},y),S=d({ref:y,...b,...a}),T=e||i||"div",A=_.jsxs(_.Fragment,{children:[!v&&_.jsx($f,{onDismiss:m}),_.jsx(T,{...S,children:_.jsx("div",{...h({className:n}),children:typeof t=="function"?t(w):t})}),_.jsx($f,{onDismiss:m})]}),M=D.useMemo(()=>s==="transparent"?null:u?_.jsx("div",{...f()}):_.jsx(Mi,{features:HY,children:_.jsx(Di.div,{animate:"enter",exit:"exit",initial:"exit",variants:jf.fade,...f()})}),[s,u,f]),P=o?tN(o==="center"?"top":o):void 0,E=_.jsx(_.Fragment,{children:u?A:_.jsx(Mi,{features:HY,children:_.jsx(Di.div,{animate:"enter",exit:"exit",initial:"initial",style:P,variants:jf.scaleSpringOpacity,...l,children:A})})});return _.jsxs("div",{...c(),children:[M,E]})};mhe.displayName="HeroUI.PopoverContent";var bs=mhe,[Nut,aYe]=nh({name:"ButtonGroupContext",strict:!1});function iYe(r){var e,t,n,a,i,o,s,l,u;const c=aYe(),d=Vr(),f=!!c,{ref:h,as:v,children:m,startContent:y,endContent:b,autoFocus:w,className:S,spinner:T,isLoading:A=!1,disableRipple:M=!1,fullWidth:P=(e=c==null?void 0:c.fullWidth)!=null?e:!1,radius:E=c==null?void 0:c.radius,size:R=(t=c==null?void 0:c.size)!=null?t:"md",color:N=(n=c==null?void 0:c.color)!=null?n:"default",variant:k=(a=c==null?void 0:c.variant)!=null?a:"solid",disableAnimation:O=(o=(i=c==null?void 0:c.disableAnimation)!=null?i:d==null?void 0:d.disableAnimation)!=null?o:!1,isDisabled:L=(s=c==null?void 0:c.isDisabled)!=null?s:!1,isIconOnly:$=(l=c==null?void 0:c.isIconOnly)!=null?l:!1,spinnerPlacement:j="start",onPress:B,onClick:H,...F}=r,K=v||"button",U=typeof K=="string",V=$r(h),Q=(u=M||(d==null?void 0:d.disableRipple))!=null?u:O,{isFocusVisible:Z,isFocused:Y,focusProps:X}=Rn({autoFocus:w}),re=L||A,oe=D.useMemo(()=>one({size:R,color:N,variant:k,radius:E,fullWidth:P,isDisabled:re,isInGroup:f,disableAnimation:O,isIconOnly:$,className:S}),[R,N,k,E,P,re,f,$,O,S]),{onPress:ae,onClear:se,ripples:le}=Jne(),fe=D.useCallback(xe=>{Q||re||O||V.current&&ae(xe)},[Q,re,O,V,ae]),{buttonProps:ve,isPressed:pe}=M2({elementType:v,isDisabled:re,onPress:Un(B,fe),onClick:H,...F},V),{isHovered:Re,hoverProps:Ae}=Ia({isDisabled:re}),ie=D.useCallback((xe={})=>({"data-disabled":je(re),"data-focus":je(Y),"data-pressed":je(pe),"data-focus-visible":je(Z),"data-hover":je(Re),"data-loading":je(A),...ze(ve,X,Ae,Pa(F,{enabled:U}),Pa(xe))}),[A,re,Y,pe,U,Z,Re,ve,X,Ae,F]),Se=xe=>D.isValidElement(xe)?D.cloneElement(xe,{"aria-hidden":!0,focusable:!1,tabIndex:-1}):null,ee=Se(y),te=Se(b),de=D.useMemo(()=>({sm:"sm",md:"sm",lg:"md"})[R],[R]),ye=D.useCallback(()=>({ripples:le,onClear:se}),[le,se]);return{Component:K,children:m,domRef:V,spinner:T,styles:oe,startContent:ee,endContent:te,isLoading:A,spinnerPlacement:j,spinnerSize:de,disableRipple:Q,getButtonProps:ie,getRippleProps:ye,isIconOnly:$}}function oYe(r){const[e,t]=oa(r,nT.variantKeys),{children:n,className:a,classNames:i,label:o,...s}=e,l=D.useMemo(()=>nT({...t}),[eo(t)]),u=lt(i==null?void 0:i.base,a),c=o||n,d=D.useMemo(()=>c&&typeof c=="string"?c:s["aria-label"]?"":"Loading",[n,c,s["aria-label"]]),f=D.useCallback(()=>({"aria-label":d,className:l.base({class:u}),...s}),[d,l,u,s]);return{label:c,slots:l,classNames:i,getSpinnerProps:f}}var yhe=Ht((r,e)=>{const{slots:t,classNames:n,label:a,getSpinnerProps:i}=oYe({...r});return _.jsxs("div",{ref:e,...i(),children:[_.jsxs("div",{className:t.wrapper({class:n==null?void 0:n.wrapper}),children:[_.jsx("i",{className:t.circle1({class:n==null?void 0:n.circle1})}),_.jsx("i",{className:t.circle2({class:n==null?void 0:n.circle2})})]}),a&&_.jsx("span",{className:t.label({class:n==null?void 0:n.label}),children:a})]})});yhe.displayName="HeroUI.Spinner";var ey=yhe,bhe=Ht((r,e)=>{const{Component:t,domRef:n,children:a,styles:i,spinnerSize:o,spinner:s=_.jsx(ey,{color:"current",size:o}),spinnerPlacement:l,startContent:u,endContent:c,isLoading:d,disableRipple:f,getButtonProps:h,getRippleProps:v,isIconOnly:m}=iYe({...r,ref:e});return _.jsxs(t,{ref:n,className:i,...h(),children:[u,d&&l==="start"&&s,d&&m?null:a,d&&l==="end"&&s,c,!f&&_.jsx(Xne,{...v()})]})});bhe.displayName="HeroUI.Button";var sYe=bhe,xhe=r=>{var e;const{triggerRef:t,getTriggerProps:n}=ghe(),{children:a,...i}=r,o=D.useMemo(()=>typeof a=="string"?_.jsx("p",{children:a}):D.Children.only(a),[a]),s=(e=o.props.ref)!=null?e:o.ref,{onPress:l,isDisabled:u,...c}=D.useMemo(()=>n(ze(i,o.props),s),[n,o.props,i,s]),[,d]=m_e(a,sYe),{buttonProps:f}=M2({onPress:l,isDisabled:u},t),h=D.useMemo(()=>(d==null?void 0:d[0])!==void 0,[d]);return D.cloneElement(o,ze(c,h?{onPress:l,isDisabled:u}:f))};xhe.displayName="HeroUI.PopoverTrigger";var xs=xhe,whe=Ht((r,e)=>{const{children:t,...n}=r,a=fhe({...n,ref:e}),[i,o]=D.Children.toArray(t),s=_.jsx(l3,{portalContainer:a.portalContainer,children:o});return _.jsxs(nYe,{value:a,children:[i,a.disableAnimation&&a.isOpen?s:_.jsx(fl,{children:a.isOpen?s:null})]})});whe.displayName="HeroUI.Popover";var ws=whe;function lYe(r={}){const{domRef:e,isEnabled:t=!0,overflowCheck:n="vertical",visibility:a="auto",offset:i=0,onVisibilityChange:o,updateDeps:s=[]}=r,l=D.useRef(a);D.useEffect(()=>{const u=e==null?void 0:e.current;if(!u||!t)return;const c=(h,v,m,y,b)=>{if(a==="auto"){const w=`${y}${Ete(b)}Scroll`;v&&m?(u.dataset[w]="true",u.removeAttribute(`data-${y}-scroll`),u.removeAttribute(`data-${b}-scroll`)):(u.dataset[`${y}Scroll`]=v.toString(),u.dataset[`${b}Scroll`]=m.toString(),u.removeAttribute(`data-${y}-${b}-scroll`))}else{const w=v&&m?"both":v?y:m?b:"none";w!==l.current&&(o==null||o(w),l.current=w)}},d=()=>{const h=[{type:"vertical",prefix:"top",suffix:"bottom"},{type:"horizontal",prefix:"left",suffix:"right"}];for(const{type:v,prefix:m,suffix:y}of h)if(n===v||n==="both"){const b=v==="vertical"?u.scrollTop>i:u.scrollLeft>i,w=v==="vertical"?u.scrollTop+u.clientHeight+i<u.scrollHeight:u.scrollLeft+u.clientWidth+i<u.scrollWidth;c(v,b,w,m,y)}},f=()=>{["top","bottom","top-bottom","left","right","left-right"].forEach(h=>{u.removeAttribute(`data-${h}-scroll`)})};return d(),u.addEventListener("scroll",d),a!=="auto"&&(f(),a==="both"?(u.dataset.topBottomScroll=String(n==="vertical"),u.dataset.leftRightScroll=String(n==="horizontal")):(u.dataset.topBottomScroll="false",u.dataset.leftRightScroll="false",["top","bottom","left","right"].forEach(h=>{u.dataset[`${h}Scroll`]=String(a===h)}))),()=>{u.removeEventListener("scroll",d),f()}},[...s,t,a,n,o,e])}function uYe(r){var e;const[t,n]=oa(r,aT.variantKeys),{ref:a,as:i,children:o,className:s,style:l,size:u=40,offset:c=0,visibility:d="auto",isEnabled:f=!0,onVisibilityChange:h,...v}=t,m=i||"div",y=$r(a);lYe({domRef:y,offset:c,visibility:d,isEnabled:f,onVisibilityChange:h,updateDeps:[o],overflowCheck:(e=r.orientation)!=null?e:"vertical"});const b=D.useMemo(()=>aT({...n,className:s}),[eo(n),s]);return{Component:m,styles:b,domRef:y,children:o,getBaseProps:(S={})=>{var T;return{ref:y,className:b,"data-orientation":(T=r.orientation)!=null?T:"vertical",style:{"--scroll-shadow-size":`${u}px`,...l,...S.style},...v,...S}}}}var She=Ht((r,e)=>{const{Component:t,children:n,getBaseProps:a}=uYe({...r,ref:e});return _.jsx(t,{...a(),children:n})});She.displayName="HeroUI.ScrollShadow";var EO=She,cYe=Ht(function(e,t){const{Component:n,state:a,label:i,hasHelper:o,isLoading:s,triggerRef:l,selectorIcon:u=_.jsx(CDe,{}),description:c,errorMessage:d,isInvalid:f,startContent:h,endContent:v,placeholder:m,renderValue:y,shouldLabelBeOutside:b,disableAnimation:w,getBaseProps:S,getLabelProps:T,getTriggerProps:A,getValueProps:M,getListboxProps:P,getPopoverProps:E,getSpinnerProps:R,getMainWrapperProps:N,getInnerWrapperProps:k,getHiddenSelectProps:O,getHelperWrapperProps:L,getListboxWrapperProps:$,getDescriptionProps:j,getErrorMessageProps:B,getSelectorIconProps:H}=fKe({...e,ref:t}),F=i?_.jsx("label",{...T(),children:i}):null,K=D.cloneElement(u,H()),U=D.useMemo(()=>{const Y=f&&d;return!o||!(Y||c)?null:_.jsx("div",{...L(),children:Y?_.jsx("div",{...B(),children:d}):_.jsx("div",{...j(),children:c})})},[o,f,d,c,L,B,j]),V=D.useMemo(()=>{var Y;if(!((Y=a.selectedItems)!=null&&Y.length))return m;if(y&&typeof y=="function"){const X=[...a.selectedItems].map(re=>({key:re.key,data:re.value,type:re.type,props:re.props,textValue:re.textValue,rendered:re.rendered,"aria-label":re["aria-label"]}));return y(X)}return a.selectedItems.map(X=>X.textValue).join(", ")},[a.selectedItems,y,m]),Q=D.useMemo(()=>s?_.jsx(ey,{...R()}):K,[s,K,R]),Z=D.useMemo(()=>a.isOpen?_.jsx(rYe,{...E(),children:_.jsx(EO,{...$(),children:_.jsx(JKe,{...P()})})}):null,[a.isOpen,E,a,l,$,P]);return _.jsxs("div",{...S(),children:[_.jsx(bKe,{...O()}),b?F:null,_.jsxs("div",{...N(),children:[_.jsxs(n,{...A(),children:[b?null:F,_.jsxs("div",{...k(),children:[h,_.jsx("span",{...M(),children:V}),v&&a.selectedItems&&_.jsx(hKe,{elementType:"span",children:","}),v]}),Q]}),U]}),w?Z:_.jsx(fl,{children:Z})]})}),_he=cYe;function dYe(r,e){let{elementType:t="button",isDisabled:n,onPress:a,onPressStart:i,onPressEnd:o,onPressUp:s,onPressChange:l,preventFocusOnPress:u,allowFocusWhenDisabled:c,onClick:d,href:f,target:h,rel:v,type:m="button"}=r,y;t==="button"?y={type:m,disabled:n}:y={role:"button",tabIndex:n?void 0:0,href:t==="a"&&!n?f:void 0,target:t==="a"?h:void 0,type:t==="input"?m:void 0,disabled:t==="input"?n:void 0,"aria-disabled":!n||t==="input"?void 0:n,rel:t==="a"?v:void 0};let{pressProps:b,isPressed:w}=Ss({onPressStart:i,onPressEnd:o,onPressChange:l,onPress:a,onPressUp:s,isDisabled:n,preventFocusOnPress:u,ref:e}),{focusableProps:S}=L0(r,e);c&&(S.tabIndex=n?-1:S.tabIndex);let T=ze(S,b,hi(r,{labelable:!0}));return{isPressed:w,buttonProps:ze(y,T,{"aria-haspopup":r["aria-haspopup"],"aria-expanded":r["aria-expanded"],"aria-controls":r["aria-controls"],"aria-pressed":r["aria-pressed"],onClick:A=>{d&&(d(A),console.warn("onClick is deprecated, please use onPress"))}})}}function fYe(r,e,t){let{item:n,isDisabled:a}=r,i=n.key,o=e.selectionManager,s=D.useId(),l=D.useId(),u=e.disabledKeys.has(n.key)||a;D.useEffect(()=>{i===e.focusedKey&&document.activeElement!==t.current&&t.current&&nv(t.current)},[t,i,e.focusedKey]);let c=D.useCallback(m=>{o.canSelectItem(i)&&(o.select(i,m),e.toggleKey(i))},[i,o]);const d=D.useCallback(m=>{o.selectionBehavior==="replace"&&o.extendSelection(m),o.setFocusedKey(m)},[o]),f=D.useCallback(m=>{const b={ArrowDown:()=>{const w=e.collection.getKeyAfter(i);if(w&&e.disabledKeys.has(w)){const S=e.collection.getKeyAfter(w);S&&d(S)}else w&&d(w)},ArrowUp:()=>{const w=e.collection.getKeyBefore(i);if(w&&e.disabledKeys.has(w)){const S=e.collection.getKeyBefore(w);S&&d(S)}else w&&d(w)},Home:()=>{const w=e.collection.getFirstKey();w&&d(w)},End:()=>{const w=e.collection.getLastKey();w&&d(w)}}[m.key];b&&(m.preventDefault(),o.canSelectItem(i)&&b(m))},[i,o]);let{buttonProps:h}=dYe({id:s,elementType:"button",isDisabled:u,onKeyDown:f,onPress:c},t),v=e.selectionManager.isSelected(n.key);return{buttonProps:{...h,"aria-expanded":v,"aria-controls":v?l:void 0},regionProps:{id:l,role:"region","aria-labelledby":s}}}function hYe(r,e,t){let{listProps:n}=cKe({...r,...e,allowsTabNavigation:!0,disallowSelectAll:!0,ref:t});return delete n.onKeyDownCapture,{accordionProps:{...n,tabIndex:void 0}}}function pYe(r){var e,t;const n=Vr(),{ref:a,as:i,item:o,onFocusChange:s}=r,{state:l,className:u,indicator:c,children:d,title:f,subtitle:h,startContent:v,motionProps:m,focusedKey:y,variant:b,isCompact:w=!1,classNames:S={},isDisabled:T=!1,hideIndicator:A=!1,disableAnimation:M=(e=n==null?void 0:n.disableAnimation)!=null?e:!1,keepContentMounted:P=!1,disableIndicatorAnimation:E=!1,HeadingComponent:R=i||"h2",onPress:N,onPressStart:k,onPressEnd:O,onPressChange:L,onPressUp:$,onClick:j,...B}=r,H=i||"div",F=typeof H=="string",K=$r(a),U=l.disabledKeys.has(o.key)||T,V=l.selectionManager.isSelected(o.key),{buttonProps:Q,regionProps:Z}=fYe({item:o,isDisabled:U},{...l,focusedKey:y},K),{onFocus:Y,onBlur:X,...re}=Q,{isFocused:oe,isFocusVisible:ae,focusProps:se}=Rn({autoFocus:(t=o.props)==null?void 0:t.autoFocus}),{isHovered:le,hoverProps:fe}=Ia({isDisabled:U}),{pressProps:ve,isPressed:pe}=Ss({ref:K,isDisabled:U,onPress:N,onPressStart:k,onPressEnd:O,onPressChange:L,onPressUp:$}),Re=D.useCallback(()=>{s==null||s(!0,o.key)},[]),Ae=D.useCallback(()=>{s==null||s(!1,o.key)},[]),ie=D.useMemo(()=>({...S}),[eo(S)]),Se=D.useMemo(()=>tAe({isCompact:w,isDisabled:U,hideIndicator:A,disableAnimation:M,disableIndicatorAnimation:E,variant:b}),[w,U,A,M,E,b]),ee=lt(ie==null?void 0:ie.base,u),te=D.useCallback((Xe={})=>({"data-open":je(V),"data-disabled":je(U),className:Se.base({class:ee}),...ze(Pa(B,{enabled:F}),Xe)}),[ee,F,B,Se,o.props,V,U]),de=(Xe={})=>{var Ee,at;return{ref:K,"data-open":je(V),"data-focus":je(oe),"data-focus-visible":je(ae),"data-disabled":je(U),"data-hover":je(le),"data-pressed":je(pe),className:Se.trigger({class:ie==null?void 0:ie.trigger}),onFocus:xV(Re,Y,se.onFocus,B.onFocus,(Ee=o.props)==null?void 0:Ee.onFocus),onBlur:xV(Ae,X,se.onBlur,B.onBlur,(at=o.props)==null?void 0:at.onBlur),...ze(re,fe,ve,Xe,{onClick:Un(ve.onClick,j)})}},ye=D.useCallback((Xe={})=>({"data-open":je(V),"data-disabled":je(U),className:Se.content({class:ie==null?void 0:ie.content}),...ze(Z,Xe)}),[Se,ie,Z,V,U,ie==null?void 0:ie.content]),xe=D.useCallback((Xe={})=>({"aria-hidden":je(!0),"data-open":je(V),"data-disabled":je(U),className:Se.indicator({class:ie==null?void 0:ie.indicator}),...Xe}),[Se,ie==null?void 0:ie.indicator,V,U,ie==null?void 0:ie.indicator]),Te=D.useCallback((Xe={})=>({"data-open":je(V),"data-disabled":je(U),className:Se.heading({class:ie==null?void 0:ie.heading}),...Xe}),[Se,ie==null?void 0:ie.heading,V,U,ie==null?void 0:ie.heading]),ke=D.useCallback((Xe={})=>({"data-open":je(V),"data-disabled":je(U),className:Se.title({class:ie==null?void 0:ie.title}),...Xe}),[Se,ie==null?void 0:ie.title,V,U,ie==null?void 0:ie.title]),Ue=D.useCallback((Xe={})=>({"data-open":je(V),"data-disabled":je(U),className:Se.subtitle({class:ie==null?void 0:ie.subtitle}),...Xe}),[Se,ie,V,U,ie==null?void 0:ie.subtitle]);return{Component:H,HeadingComponent:R,item:o,slots:Se,classNames:ie,domRef:K,indicator:c,children:d,title:f,subtitle:h,startContent:v,isOpen:V,isDisabled:U,hideIndicator:A,keepContentMounted:P,disableAnimation:M,motionProps:m,getBaseProps:te,getHeadingProps:Te,getButtonProps:de,getContentProps:ye,getIndicatorProps:xe,getTitleProps:ke,getSubtitleProps:Ue}}var UY=()=>Jc(()=>import("./index-CGOi-AYz.js"),[]).then(r=>r.default),Che=Ht((r,e)=>{const{Component:t,HeadingComponent:n,classNames:a,slots:i,indicator:o,children:s,title:l,subtitle:u,startContent:c,isOpen:d,isDisabled:f,hideIndicator:h,keepContentMounted:v,disableAnimation:m,motionProps:y,getBaseProps:b,getHeadingProps:w,getButtonProps:S,getTitleProps:T,getSubtitleProps:A,getContentProps:M,getIndicatorProps:P}=pYe({...r,ref:e}),E=Vwe(),N=D.useMemo(()=>typeof o=="function"?o({indicator:_.jsx(Cm,{}),isOpen:d,isDisabled:f}):o||null,[o,d,f])||_.jsx(Cm,{}),k=D.useMemo(()=>{if(m)return _.jsx("div",{...M(),children:s});const O={exit:{...jf.collapse.exit,overflowY:"hidden"},enter:{...jf.collapse.enter,overflowY:"unset"}};return v?_.jsx(Mi,{features:UY,children:_.jsx(Di.section,{animate:d?"enter":"exit",exit:"exit",initial:"exit",style:{willChange:E},variants:O,onKeyDown:L=>{L.stopPropagation()},...y,children:_.jsx("div",{...M(),children:s})},"accordion-content")}):_.jsx(fl,{initial:!1,children:d&&_.jsx(Mi,{features:UY,children:_.jsx(Di.section,{animate:"enter",exit:"exit",initial:"exit",style:{willChange:E},variants:O,onKeyDown:L=>{L.stopPropagation()},...y,children:_.jsx("div",{...M(),children:s})},"accordion-content")})})},[d,m,v,s,y]);return _.jsxs(t,{...b(),children:[_.jsx(n,{...w(),children:_.jsxs("button",{...S(),children:[c&&_.jsx("div",{className:i.startContent({class:a==null?void 0:a.startContent}),children:c}),_.jsxs("div",{className:i.titleWrapper({class:a==null?void 0:a.titleWrapper}),children:[l&&_.jsx("span",{...T(),children:l}),u&&_.jsx("span",{...A(),children:u})]}),!h&&N&&_.jsx("span",{...P(),children:N})]})}),k]})});Che.displayName="HeroUI.AccordionItem";var vYe=Che;class gYe{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let t=this.keyMap.get(e);var n;return t&&(n=t.prevKey)!==null&&n!==void 0?n:null}getKeyAfter(e){let t=this.keyMap.get(e);var n;return t&&(n=t.nextKey)!==null&&n!==void 0?n:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){var t;return(t=this.keyMap.get(e))!==null&&t!==void 0?t:null}at(e){const t=[...this.getKeys()];return this.getItem(t[e])}constructor(e,{expandedKeys:t}={}){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e,t=t||new Set;let n=s=>{if(this.keyMap.set(s.key,s),s.childNodes&&(s.type==="section"||t.has(s.key)))for(let l of s.childNodes)n(l)};for(let s of e)n(s);let a=null,i=0;for(let[s,l]of this.keyMap)a?(a.nextKey=s,l.prevKey=a.key):(this.firstKey=s,l.prevKey=void 0),l.type==="item"&&(l.index=i++),a=l,a.nextKey=void 0;var o;this.lastKey=(o=a==null?void 0:a.key)!==null&&o!==void 0?o:null}}function The(r){let{onExpandedChange:e}=r,[t,n]=bl(r.expandedKeys?new Set(r.expandedKeys):void 0,r.defaultExpandedKeys?new Set(r.defaultExpandedKeys):new Set,e),a=wO(r),i=D.useMemo(()=>r.disabledKeys?new Set(r.disabledKeys):new Set,[r.disabledKeys]),o=SO(r,D.useCallback(l=>new gYe(l,{expandedKeys:t}),[t]),null);return D.useEffect(()=>{a.focusedKey!=null&&!o.getItem(a.focusedKey)&&a.setFocusedKey(null)},[o,a.focusedKey]),{collection:o,expandedKeys:t,disabledKeys:i,toggleKey:l=>{n(mYe(t,l))},setExpandedKeys:n,selectionManager:new _O(o,a)}}function mYe(r,e){let t=new Set(r);return t.has(e)?t.delete(e):t.add(e),t}function yYe(r){var e;const t=Vr(),{ref:n,as:a,className:i,items:o,variant:s,motionProps:l,expandedKeys:u,disabledKeys:c,selectedKeys:d,children:f,defaultExpandedKeys:h,selectionMode:v="single",selectionBehavior:m="toggle",keepContentMounted:y=!1,disallowEmptySelection:b,defaultSelectedKeys:w,onExpandedChange:S,onSelectionChange:T,dividerProps:A={},isCompact:M=!1,isDisabled:P=!1,showDivider:E=!0,hideIndicator:R=!1,disableAnimation:N=(e=t==null?void 0:t.disableAnimation)!=null?e:!1,disableIndicatorAnimation:k=!1,itemClasses:O,...L}=r,[$,j]=D.useState(null),B=a||"div",H=typeof B=="string",F=$r(n),K=D.useMemo(()=>eAe({variant:s,className:i}),[s,i]),V={children:D.useMemo(()=>{let se=[];return Be.Children.map(f,le=>{var fe;if(Be.isValidElement(le)&&typeof((fe=le.props)==null?void 0:fe.children)!="string"){const ve=Be.cloneElement(le,{hasChildItems:!1});se.push(ve)}else se.push(le)}),se},[f]),items:o},Q={expandedKeys:u,defaultExpandedKeys:h,onExpandedChange:S},Z={disabledKeys:c,selectedKeys:d,selectionMode:v,selectionBehavior:m,disallowEmptySelection:b,defaultSelectedKeys:w??h,onSelectionChange:T,...V,...Q},Y=The(Z);Y.selectionManager.setFocusedKey=se=>{j(se)};const{accordionProps:X}=hYe({...V,...Q},Y,F),re=D.useMemo(()=>({state:Y,focusedKey:$,motionProps:l,isCompact:M,isDisabled:P,hideIndicator:R,disableAnimation:N,keepContentMounted:y,disableIndicatorAnimation:k}),[$,M,P,R,d,N,y,Y==null?void 0:Y.expandedKeys.values,k,Y.expandedKeys.size,Y.disabledKeys.size,l]),oe=D.useCallback((se={})=>({ref:F,className:K,"data-orientation":"vertical",...ze(X,Pa(L,{enabled:H}),se)}),[]),ae=D.useCallback((se,le)=>{se&&j(le)},[]);return{Component:B,values:re,state:Y,focusedKey:$,getBaseProps:oe,isSplitted:s==="splitted",classNames:K,showDivider:E,dividerProps:A,disableAnimation:N,handleFocusChanged:ae,itemClasses:O}}var Ahe=Ht((r,e)=>{const{Component:t,values:n,state:a,isSplitted:i,showDivider:o,getBaseProps:s,disableAnimation:l,handleFocusChanged:u,itemClasses:c,dividerProps:d}=yYe({...r,ref:e}),f=D.useCallback((v,m)=>u(v,m),[u]),h=D.useMemo(()=>[...a.collection].map((v,m)=>{const y={...c,...v.props.classNames||{}};return _.jsxs(D.Fragment,{children:[_.jsx(vYe,{item:v,variant:r.variant,onFocusChange:f,...n,...v.props,classNames:y}),!v.props.hidden&&!i&&o&&m<a.collection.size-1&&_.jsx(aw,{...d})]},v.key)}),[n,c,f,i,o,a.collection]);return _.jsx(t,{...s(),children:l?h:_.jsx(vJ,{children:h})})});Ahe.displayName="HeroUI.Accordion";var p5=Ahe,bYe=w3,v5=bYe;function Ehe({fields:r}){return r.length===0&&_.jsx("div",{className:"text-sm text-content4-foreground text-center col-span-2",children:"暂无数据,点击上方按钮添加"})}function xYe({control:r,field:e,fullPath:t,register:n}){const{fields:a,append:i,remove:o}=Gde({control:r,name:t});return _.jsxs(Fa,{children:[_.jsxs(p3,{className:"flex flex-row items-center justify-between",children:[_.jsx("h2",{children:e.label}),_.jsx(Ze,{type:"button",color:"primary",size:"sm",radius:"full",startContent:_.jsx(BR,{}),onPress:()=>i(e.defaultValue??""),children:"添加"})]}),_.jsxs(ms,{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[_.jsx(Ehe,{fields:a}),a.map((s,l)=>_.jsxs("div",{className:"flex items-center space-x-2",children:[_.jsx(Va,{type:e.elementType,...n(`${t}.${l}`),className:"flex-1"}),_.jsx(Ze,{type:"button",size:"sm",radius:"full",color:"danger",startContent:_.jsx(Zye,{}),onPress:()=>o(l),children:"删除"})]},s.id))]})]})}function wYe({control:r,field:e,fullPath:t,renderField:n}){const{fields:a,append:i,remove:o}=Gde({control:r,name:t}),s=e.fields||[];return _.jsxs(Fa,{className:"p-4",children:[_.jsxs(p3,{className:"flex flex-row items-center justify-between",children:[_.jsx("h2",{children:e.label}),_.jsx(Ze,{type:"button",color:"primary",size:"sm",radius:"full",startContent:_.jsx(BR,{}),onPress:()=>i({}),children:"添加"})]}),_.jsxs(ms,{children:[_.jsx(Ehe,{fields:a}),_.jsx(p5,{className:"mb-4 p-4 border rounded",selectionMode:"multiple",children:a.map((l,u)=>{const c=l;return _.jsxs(v5,{title:c.key??`${e.label} ${u+1}`,textValue:(e==null?void 0:e.label)??""+u,classNames:{content:"flex flex-col gap-4"},children:[s.map((d,f)=>_.jsx(Be.Fragment,{children:n(d,`${t}.${u}`)},d.key??f)),_.jsx(Ze,{type:"button",size:"sm",color:"danger",onPress:()=>o(u),className:"mt-2",children:"删除"})]},l.id)})},e.key)]})]})}const SYe=({register:r,control:e,errors:t,formConfig:n,expandedSections:a,setExpandedSections:i})=>{const o=(s,l="")=>{var f,h,v,m,y,b;const u=l?`${l}.${s.key}`:s.key,c=u,d=w=>w?_.jsx("div",{className:"text-sm text-content4-foreground mt-1",children:w}):null;switch(s.type){case"divider":return _.jsx(aw,{},c);case"title":return _.jsx("h3",{children:s.text},c);case"section":return _.jsx(p5,{selectionMode:"multiple",selectedKeys:a,onSelectionChange:w=>{if(typeof w=="string"){const S=new Set(a);S.has(s.key)?S.delete(s.key):S.add(s.key),i(S)}else i(new Set(w))},children:_.jsx(v5,{title:s.label,textValue:s.label,children:_.jsx("div",{className:"space-y-4",children:s.children.map((w,S)=>_.jsx(Be.Fragment,{children:o(w)},w.key??S))})},s.key)},c);case"text":return _.jsx(Va,{label:s.label,defaultValue:s.defaultValue,...r(u,{required:s.required}),className:"w-full",errorMessage:(h=(f=t[s.key])==null?void 0:f.message)==null?void 0:h.toString(),description:s.description},c);case"number":return _.jsx(Va,{label:s.label,type:"number",defaultValue:(v=s.defaultValue)==null?void 0:v.toString(),...r(u,{required:s.required}),className:"w-full",description:s.description},c);case"switch":return _.jsxs(_ne,{...r(u),defaultChecked:s.defaultValue,children:[_.jsx("div",{children:s.label}),d(s.description)]},c);case"checkbox":return _.jsx(Fa,{shadow:"sm",children:_.jsx(dfe,{label:s.label,defaultValue:(m=s.defaultValue)==null?void 0:m.map(String),description:s.description,children:s.options.map(w=>_.jsx(xO,{value:w.value.toString(),...r(u),children:w.label},w.value))})},c);case"radio":return _.jsx(Fa,{shadow:"sm",children:_.jsx(ms,{children:_.jsx(ife,{label:s.label,defaultValue:(b=(y=s.options[0])==null?void 0:y.value)==null?void 0:b.toString(),description:s.description,children:s.options.map(w=>_.jsx(sfe,{value:w.value.toString(),...r(u),children:w.label},w.value))})})},c);case"select":return _.jsx(_he,{label:s.label,defaultSelectedKeys:[],items:s.options,multiple:s.multiple,description:s.description,...r(u),children:w=>_.jsx(ohe,{value:w.value.toString(),children:w.label},w.value)},c);case"array":return _.jsx(xYe,{control:e,field:s,fullPath:u,register:r},u);case"objectArray":return _.jsx(wYe,{control:e,field:s,fullPath:u,renderField:o},u);case"object":return _.jsxs(Fa,{className:"p-4",children:[_.jsx(p3,{className:"flex flex-row items-center justify-between",children:_.jsxs("div",{children:[_.jsx("h2",{children:s.label}),s.description&&_.jsx("div",{className:"text-sm text-content4-foreground",children:s.description})]})}),_.jsx(ms,{className:"space-y-4",children:s.fields.map((w,S)=>_.jsx(Be.Fragment,{children:o(w,u)},w.key??S))})]},c);default:return null}};return _.jsx(_.Fragment,{children:n.map(s=>o(s))})},Mhe=new WeakMap;function fA(r,e,t){return r?(typeof e=="string"&&(e=e.replace(/\s+/g,"")),`${Mhe.get(r)}-${t}-${e}`):""}function _Ye(r,e,t){let{key:n,isDisabled:a,shouldSelectOnPressUp:i}=r,{selectionManager:o,selectedKey:s}=e,l=n===s,u=a||e.isDisabled||e.selectionManager.isDisabled(n),{itemProps:c,isPressed:d}=CO({selectionManager:o,key:n,ref:t,isDisabled:u,shouldSelectOnPressUp:i,linkBehavior:"selection"}),f=fA(e,n,"tab"),h=fA(e,n,"tabpanel"),{tabIndex:v}=c,m=e.collection.getItem(n),y=hi(m==null?void 0:m.props,{labelable:!0});delete y.id;let b=a3(m==null?void 0:m.props);return{tabProps:ze(y,b,c,{id:f,"aria-selected":l,"aria-disabled":u||void 0,"aria-controls":l?h:void 0,tabIndex:u?void 0:v,role:"tab"}),isSelected:l,isDisabled:u,isPressed:d}}function CYe(r,e,t){let n=WCe(t)?void 0:0;var a;const i=fA(e,(a=r.id)!==null&&a!==void 0?a:e==null?void 0:e.selectedKey,"tabpanel"),o=i3({...r,id:i,"aria-labelledby":fA(e,e==null?void 0:e.selectedKey,"tab")});return{tabPanelProps:ze(o,{tabIndex:n,role:"tabpanel","aria-describedby":r["aria-describedby"],"aria-details":r["aria-details"]})}}class TYe{getKeyLeftOf(e){return this.flipDirection?this.getNextKey(e):this.getPreviousKey(e)}getKeyRightOf(e){return this.flipDirection?this.getPreviousKey(e):this.getNextKey(e)}isDisabled(e){var t,n;return this.disabledKeys.has(e)||!!(!((n=this.collection.getItem(e))===null||n===void 0||(t=n.props)===null||t===void 0)&&t.isDisabled)}getFirstKey(){let e=this.collection.getFirstKey();return e!=null&&this.isDisabled(e)&&(e=this.getNextKey(e)),e}getLastKey(){let e=this.collection.getLastKey();return e!=null&&this.isDisabled(e)&&(e=this.getPreviousKey(e)),e}getKeyAbove(e){return this.tabDirection?null:this.getPreviousKey(e)}getKeyBelow(e){return this.tabDirection?null:this.getNextKey(e)}getNextKey(e){do e=this.collection.getKeyAfter(e),e==null&&(e=this.collection.getFirstKey());while(this.isDisabled(e));return e}getPreviousKey(e){do e=this.collection.getKeyBefore(e),e==null&&(e=this.collection.getLastKey());while(this.isDisabled(e));return e}constructor(e,t,n,a=new Set){this.collection=e,this.flipDirection=t==="rtl"&&n==="horizontal",this.disabledKeys=a,this.tabDirection=n==="horizontal"}}function AYe(r,e,t){let{orientation:n="horizontal",keyboardActivation:a="automatic"}=r,{collection:i,selectionManager:o,disabledKeys:s}=e,{direction:l}=Av(),u=D.useMemo(()=>new TYe(i,l,n,s),[i,s,n,l]),{collectionProps:c}=Jfe({ref:t,selectionManager:o,keyboardDelegate:u,selectOnFocus:a==="automatic",disallowEmptySelection:!0,scrollRef:t,linkBehavior:"selection"}),d=_o();Mhe.set(e,d);let f=i3({...r,id:d});return{tabListProps:{...ze(c,f),role:"tablist","aria-orientation":n,tabIndex:void 0}}}var Dhe=Ht((r,e)=>{var t,n;const{as:a,tabKey:i,destroyInactiveTabPanel:o,state:s,className:l,slots:u,classNames:c,...d}=r,f=a||"div",h=$r(e),{tabPanelProps:v}=CYe({...r,id:String(i)},s,h),{focusProps:m,isFocused:y,isFocusVisible:b}=Rn(),w=s.selectedItem,S=s.collection.getItem(i).props.children,T=lt(c==null?void 0:c.panel,l,(t=w==null?void 0:w.props)==null?void 0:t.className),A=i===(w==null?void 0:w.key);return!S||!A&&o?null:_.jsx(f,{ref:h,"data-focus":y,"data-focus-visible":b,"data-inert":A?void 0:"true",inert:h_e(!A),...A&&ze(v,m,d),className:(n=u.panel)==null?void 0:n.call(u,{class:T}),"data-slot":"panel",children:S})});Dhe.displayName="HeroUI.TabPanel";var EYe=Dhe;const GY=r=>typeof r=="object"&&r!=null&&r.nodeType===1,qY=(r,e)=>(!e||r!=="hidden")&&r!=="visible"&&r!=="clip",R_=(r,e)=>{if(r.clientHeight<r.scrollHeight||r.clientWidth<r.scrollWidth){const t=getComputedStyle(r,null);return qY(t.overflowY,e)||qY(t.overflowX,e)||(n=>{const a=(i=>{if(!i.ownerDocument||!i.ownerDocument.defaultView)return null;try{return i.ownerDocument.defaultView.frameElement}catch{return null}})(n);return!!a&&(a.clientHeight<n.scrollHeight||a.clientWidth<n.scrollWidth)})(r)}return!1},N_=(r,e,t,n,a,i,o,s)=>i<r&&o>e||i>r&&o<e?0:i<=r&&s<=t||o>=e&&s>=t?i-r-n:o>e&&s<t||i<r&&s>t?o-e+a:0,MYe=r=>{const e=r.parentElement;return e??(r.getRootNode().host||null)},QY=(r,e)=>{var t,n,a,i;if(typeof document>"u")return[];const{scrollMode:o,block:s,inline:l,boundary:u,skipOverflowHiddenElements:c}=e,d=typeof u=="function"?u:B=>B!==u;if(!GY(r))throw new TypeError("Invalid target");const f=document.scrollingElement||document.documentElement,h=[];let v=r;for(;GY(v)&&d(v);){if(v=MYe(v),v===f){h.push(v);break}v!=null&&v===document.body&&R_(v)&&!R_(document.documentElement)||v!=null&&R_(v,c)&&h.push(v)}const m=(n=(t=window.visualViewport)==null?void 0:t.width)!=null?n:innerWidth,y=(i=(a=window.visualViewport)==null?void 0:a.height)!=null?i:innerHeight,{scrollX:b,scrollY:w}=window,{height:S,width:T,top:A,right:M,bottom:P,left:E}=r.getBoundingClientRect(),{top:R,right:N,bottom:k,left:O}=(B=>{const H=window.getComputedStyle(B);return{top:parseFloat(H.scrollMarginTop)||0,right:parseFloat(H.scrollMarginRight)||0,bottom:parseFloat(H.scrollMarginBottom)||0,left:parseFloat(H.scrollMarginLeft)||0}})(r);let L=s==="start"||s==="nearest"?A-R:s==="end"?P+k:A+S/2-R+k,$=l==="center"?E+T/2-O+N:l==="end"?M+N:E-O;const j=[];for(let B=0;B<h.length;B++){const H=h[B],{height:F,width:K,top:U,right:V,bottom:Q,left:Z}=H.getBoundingClientRect();if(o==="if-needed"&&A>=0&&E>=0&&P<=y&&M<=m&&(H===f&&!R_(H)||A>=U&&P<=Q&&E>=Z&&M<=V))return j;const Y=getComputedStyle(H),X=parseInt(Y.borderLeftWidth,10),re=parseInt(Y.borderTopWidth,10),oe=parseInt(Y.borderRightWidth,10),ae=parseInt(Y.borderBottomWidth,10);let se=0,le=0;const fe="offsetWidth"in H?H.offsetWidth-H.clientWidth-X-oe:0,ve="offsetHeight"in H?H.offsetHeight-H.clientHeight-re-ae:0,pe="offsetWidth"in H?H.offsetWidth===0?0:K/H.offsetWidth:0,Re="offsetHeight"in H?H.offsetHeight===0?0:F/H.offsetHeight:0;if(f===H)se=s==="start"?L:s==="end"?L-y:s==="nearest"?N_(w,w+y,y,re,ae,w+L,w+L+S,S):L-y/2,le=l==="start"?$:l==="center"?$-m/2:l==="end"?$-m:N_(b,b+m,m,X,oe,b+$,b+$+T,T),se=Math.max(0,se+w),le=Math.max(0,le+b);else{se=s==="start"?L-U-re:s==="end"?L-Q+ae+ve:s==="nearest"?N_(U,Q,F,re,ae+ve,L,L+S,S):L-(U+F/2)+ve/2,le=l==="start"?$-Z-X:l==="center"?$-(Z+K/2)+fe/2:l==="end"?$-V+oe+fe:N_(Z,V,K,X,oe+fe,$,$+T,T);const{scrollLeft:Ae,scrollTop:ie}=H;se=Re===0?0:Math.max(0,Math.min(ie+se/Re,H.scrollHeight-F/Re+ve)),le=pe===0?0:Math.max(0,Math.min(Ae+le/pe,H.scrollWidth-K/pe+fe)),L+=ie-se,$+=Ae-le}j.push({el:H,top:se,left:le})}return j},DYe=r=>r===!1?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&Object.keys(e).length!==0)(r)?r:{block:"start",inline:"nearest"};function Lhe(r,e){if(!r.isConnected||!(n=>{let a=n;for(;a&&a.parentNode;){if(a.parentNode===document)return!0;a=a.parentNode instanceof ShadowRoot?a.parentNode.host:a.parentNode}return!1})(r))return;if((n=>typeof n=="object"&&typeof n.behavior=="function")(e))return e.behavior(QY(r,e));const t=typeof e=="boolean"||e==null?void 0:e.behavior;for(const{el:n,top:a,left:i}of QY(r,DYe(e)))n.scroll({top:a,left:i,behavior:t})}function LYe(r={}){const{rerender:e=!1,delay:t=0}=r,n=D.useRef(!1),[a,i]=D.useState(!1);return D.useEffect(()=>{n.current=!0;let o=null;return e&&(t>0?o=setTimeout(()=>{i(!0)},t):i(!0)),()=>{n.current=!1,e&&i(!1),o&&clearTimeout(o)}},[e]),[D.useCallback(()=>n.current,[]),a]}var Phe=Ht((r,e)=>{var t;const{className:n,as:a,item:i,state:o,classNames:s,isDisabled:l,listRef:u,slots:c,motionProps:d,disableAnimation:f,disableCursorAnimation:h,shouldSelectOnPressUp:v,onClick:m,tabRef:y,...b}=r,{key:w}=i,S=$r(e),T=a||(r.href?"a":"button"),A=typeof T=="string",{tabProps:M,isSelected:P,isDisabled:E,isPressed:R}=_Ye({key:w,isDisabled:l,shouldSelectOnPressUp:v},o,S);r.children==null&&delete M["aria-controls"];const N=l||E,{focusProps:k,isFocused:O,isFocusVisible:L}=Rn(),{hoverProps:$,isHovered:j}=Ia({isDisabled:N}),B=lt(s==null?void 0:s.tab,n),[,H]=LYe({rerender:!0}),F=()=>{Un(m,M.onClick),!(!(S!=null&&S.current)||!(u!=null&&u.current))&&Lhe(S.current,{scrollMode:"if-needed",behavior:"smooth",block:"end",inline:"end",boundary:u==null?void 0:u.current})};return _.jsxs(T,{ref:A8(S,y),"data-disabled":je(E),"data-focus":je(O),"data-focus-visible":je(L),"data-hover":je(j),"data-hover-unselected":je((j||R)&&!P),"data-pressed":je(R),"data-selected":je(P),"data-slot":"tab",...ze(M,N?{}:{...k,...$},Pa(b,{enabled:A,omitPropNames:new Set(["title"])}),{onClick:F}),className:(t=c.tab)==null?void 0:t.call(c,{class:B}),title:b==null?void 0:b.titleValue,type:T==="button"?"button":void 0,children:[P&&!f&&!h&&H?_.jsx(Mi,{features:zwe,children:_.jsx(Di.span,{className:c.cursor({class:s==null?void 0:s.cursor}),"data-slot":"cursor",layoutDependency:!1,layoutId:"cursor",transition:{type:"spring",bounce:.15,duration:.5},...d})}):null,_.jsx("div",{className:c.tabContent({class:s==null?void 0:s.tabContent}),"data-slot":"tabContent",children:i.rendered})]})});Phe.displayName="HeroUI.Tab";var PYe=Phe;class WY{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let t=this.keyMap.get(e);var n;return t&&(n=t.prevKey)!==null&&n!==void 0?n:null}getKeyAfter(e){let t=this.keyMap.get(e);var n;return t&&(n=t.nextKey)!==null&&n!==void 0?n:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){var t;return(t=this.keyMap.get(e))!==null&&t!==void 0?t:null}at(e){const t=[...this.getKeys()];return this.getItem(t[e])}getChildren(e){let t=this.keyMap.get(e);return(t==null?void 0:t.childNodes)||[]}constructor(e){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e;let t=o=>{if(this.keyMap.set(o.key,o),o.childNodes&&o.type==="section")for(let s of o.childNodes)t(s)};for(let o of e)t(o);let n=null,a=0;for(let[o,s]of this.keyMap)n?(n.nextKey=o,s.prevKey=n.key):(this.firstKey=o,s.prevKey=void 0),s.type==="item"&&(s.index=a++),n=s,n.nextKey=void 0;var i;this.lastKey=(i=n==null?void 0:n.key)!==null&&i!==void 0?i:null}}function IYe(r){let{filter:e,layoutDelegate:t}=r,n=wO(r),a=D.useMemo(()=>r.disabledKeys?new Set(r.disabledKeys):new Set,[r.disabledKeys]),i=D.useCallback(c=>e?new WY(e(c)):new WY(c),[e]),o=D.useMemo(()=>({suppressTextValueWarning:r.suppressTextValueWarning}),[r.suppressTextValueWarning]),s=SO(r,i,o),l=D.useMemo(()=>new _O(s,n,{layoutDelegate:t}),[s,n,t]);const u=D.useRef(null);return D.useEffect(()=>{if(n.focusedKey!=null&&!s.getItem(n.focusedKey)&&u.current){const b=u.current.getItem(n.focusedKey),w=[...u.current.getKeys()].map(E=>{const R=u.current.getItem(E);return(R==null?void 0:R.type)==="item"?R:null}).filter(E=>E!==null),S=[...s.getKeys()].map(E=>{const R=s.getItem(E);return(R==null?void 0:R.type)==="item"?R:null}).filter(E=>E!==null);var c,d;const T=((c=w==null?void 0:w.length)!==null&&c!==void 0?c:0)-((d=S==null?void 0:S.length)!==null&&d!==void 0?d:0);var f,h,v;let A=Math.min(T>1?Math.max(((f=b==null?void 0:b.index)!==null&&f!==void 0?f:0)-T+1,0):(h=b==null?void 0:b.index)!==null&&h!==void 0?h:0,((v=S==null?void 0:S.length)!==null&&v!==void 0?v:0)-1),M=null,P=!1;for(;A>=0;){if(!l.isDisabled(S[A].key)){M=S[A];break}if(A<S.length-1&&!P)A++;else{P=!0;var m,y;A>((m=b==null?void 0:b.index)!==null&&m!==void 0?m:0)&&(A=(y=b==null?void 0:b.index)!==null&&y!==void 0?y:0),A--}}n.setFocusedKey(M?M.key:null)}u.current=s},[s,l,n,n.focusedKey]),{collection:s,disabledKeys:a,selectionManager:l}}function kYe(r){var e;let[t,n]=bl(r.selectedKey,(e=r.defaultSelectedKey)!==null&&e!==void 0?e:null,r.onSelectionChange),a=D.useMemo(()=>t!=null?[t]:[],[t]),{collection:i,disabledKeys:o,selectionManager:s}=IYe({...r,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:a,onSelectionChange:u=>{if(u==="all")return;var c;let d=(c=u.values().next().value)!==null&&c!==void 0?c:null;d===t&&r.onSelectionChange&&r.onSelectionChange(d),n(d)}}),l=t!=null?i.getItem(t):null;return{collection:i,disabledKeys:o,selectionManager:s,selectedKey:t,setSelectedKey:n,selectedItem:l}}function RYe(r){var e,t;let n=kYe({...r,suppressTextValueWarning:!0,defaultSelectedKey:(t=(e=r.defaultSelectedKey)!==null&&e!==void 0?e:KY(r.collection,r.disabledKeys?new Set(r.disabledKeys):new Set))!==null&&t!==void 0?t:void 0}),{selectionManager:a,collection:i,selectedKey:o}=n,s=D.useRef(o);return D.useEffect(()=>{let l=o;(a.isEmpty||l==null||!i.getItem(l))&&(l=KY(i,n.disabledKeys),l!=null&&a.setSelectedKeys([l])),(l!=null&&a.focusedKey==null||!a.isFocused&&l!==s.current)&&a.setFocusedKey(l),s.current=l}),{...n,isDisabled:r.isDisabled||!1}}function KY(r,e){let t=null;if(r){var n,a,i,o;for(t=r.getFirstKey();t!=null&&(e.has(t)||!((a=r.getItem(t))===null||a===void 0||(n=a.props)===null||n===void 0)&&n.isDisabled)&&t!==r.getLastKey();)t=r.getKeyAfter(t);t!=null&&(e.has(t)||!((o=r.getItem(t))===null||o===void 0||(i=o.props)===null||i===void 0)&&i.isDisabled)&&t===r.getLastKey()&&(t=r.getFirstKey())}return t}function NYe(r){var e,t,n;const a=Vr(),[i,o]=oa(r,nF.variantKeys),{ref:s,as:l,className:u,classNames:c,children:d,disableCursorAnimation:f,motionProps:h,isVertical:v=!1,shouldSelectOnPressUp:m=!0,destroyInactiveTabPanel:y=!0,...b}=i,w=l||"div",S=typeof w=="string",T=$r(s),A=(t=(e=r==null?void 0:r.disableAnimation)!=null?e:a==null?void 0:a.disableAnimation)!=null?t:!1,M=RYe({children:d,...b}),{tabListProps:P}=AYe(b,M,T),E=D.useMemo(()=>nF({...o,className:u,disableAnimation:A,...v?{placement:"start"}:{}}),[eo(o),u,A,v]),R=lt(c==null?void 0:c.base,u),N=D.useMemo(()=>({state:M,slots:E,classNames:c,motionProps:h,disableAnimation:A,listRef:T,shouldSelectOnPressUp:m,disableCursorAnimation:f,isDisabled:r==null?void 0:r.isDisabled}),[M,E,T,h,A,f,m,r==null?void 0:r.isDisabled,c]),k=D.useCallback(j=>({"data-slot":"base",className:E.base({class:lt(R,j==null?void 0:j.className)}),...ze(Pa(b,{enabled:S}),j)}),[R,b,E]),O=(n=o.placement)!=null?n:v?"start":"top",L=D.useCallback(j=>({"data-slot":"tabWrapper",className:E.wrapper({class:lt(c==null?void 0:c.wrapper,j==null?void 0:j.className)}),"data-placement":O,"data-vertical":v||O==="start"||O==="end"?"vertical":"horizontal"}),[c,E,O,v]),$=D.useCallback(j=>({ref:T,"data-slot":"tabList",className:E.tabList({class:lt(c==null?void 0:c.tabList,j==null?void 0:j.className)}),...ze(P,j)}),[T,P,c,E]);return{Component:w,domRef:T,state:M,values:N,destroyInactiveTabPanel:y,getBaseProps:k,getTabListProps:$,getWrapperProps:L}}var OYe=Ht(function(e,t){const{Component:n,values:a,state:i,destroyInactiveTabPanel:o,getBaseProps:s,getTabListProps:l,getWrapperProps:u}=NYe({...e,ref:t}),c=D.useId(),d=!e.disableAnimation&&!e.disableCursorAnimation,f={state:i,listRef:a.listRef,slots:a.slots,classNames:a.classNames,isDisabled:a.isDisabled,motionProps:a.motionProps,disableAnimation:a.disableAnimation,shouldSelectOnPressUp:a.shouldSelectOnPressUp,disableCursorAnimation:a.disableCursorAnimation},h=[...i.collection].map(m=>_.jsx(PYe,{item:m,...f,...m.props},m.key)),v=_.jsxs(_.Fragment,{children:[_.jsx("div",{...s(),children:_.jsx(n,{...l(),children:d?_.jsx(vJ,{id:c,children:h}):h})}),[...i.collection].map(m=>_.jsx(EYe,{classNames:a.classNames,destroyInactiveTabPanel:o,slots:a.slots,state:a.state,tabKey:m.key},m.key))]});return"placement"in e||"isVertical"in e?_.jsx("div",{...u(),children:v}):v}),Ihe=OYe,$Ye=w3,Hl=$Ye;const zYe=()=>{const{register:r,control:e,handleSubmit:t,formState:{errors:n},reset:a}=vO(),[i,o]=D.useState([]),[s,l]=D.useState("config"),[u,c]=D.useState(!1),[d,f]=D.useState(new Set),[h,v]=D.useState(!1),m=async()=>{try{const w=await or.serverPost("/api/v1/config/get",{type:s.toString()});o(w.struct),v(w.struct.some(T=>T.type==="section"));const S=w.struct.filter(T=>T.type==="section").map(T=>T.key);f(new Set(S)),a(w.value)}catch(w){console.error("获取配置失败:",w),Da.error("获取配置失败")}};D.useEffect(()=>{m()},[s,a]);const y=async w=>{if(Object.keys(w).length===0){Da.error("表单数据不能为空");return}c(!0);try{await or.serverPost("/api/v1/config/set",{type:s.toString(),data:w}),Da.success("保存配置成功"),m()}catch(S){console.error("保存配置失败:",S),Da.error("保存配置失败")}finally{c(!1)}},b=()=>{if(d.size>0)f(new Set);else{const w=i.filter(S=>S.type==="section").map(S=>S.key);f(new Set(w))}};return _.jsxs("section",{className:"pt-20 md:pt-8",children:[_.jsxs("div",{className:"max-w-2xl mx-auto flex items-center sticky top-0 z-20 bg-content1 rounded-b-3xl bg-opacity-50 backdrop-blur-md py-4 px-2 overflow-hidden mb-4 gap-2",children:[_.jsxs(Ihe,{className:"w-auto flex flex-shrink flex-grow overflow-x-auto",selectedKey:s,onSelectionChange:l,radius:"full",children:[_.jsx(Hl,{title:"基础配置"},"config"),_.jsx(Hl,{title:"适配器"},"adapter"),_.jsx(Hl,{title:"群聊和频道"},"groups"),_.jsx(Hl,{title:"好友和频道私信"},"privates"),_.jsx(Hl,{title:"渲染配置"},"render"),_.jsx(Hl,{title:"pm2配置"},"pm2"),_.jsx(Hl,{title:"redis配置"},"redis"),_.jsx(Hl,{title:"环境变量"},"env")]}),_.jsxs("div",{className:"flex gap-2 ml-auto flex-grow-0 flex-shrink-0 items-center",children:[h&&_.jsx(Ze,{color:d.size>0?"primary":"default",startContent:_.jsx(n1e,{}),radius:"full",size:"sm",variant:"flat",onPress:b,children:d.size>0?"全部折叠":"全部展开"}),_.jsx(Ze,{color:"primary",startContent:_.jsx(e1e,{}),isLoading:u,radius:"full",onPress:()=>t(y)(),children:"保存"})]})]}),i.length===0?_.jsx("div",{className:"max-w-2xl mx-auto flex items-center justify-center h-96",children:_.jsx(ey,{className:"mx-auto"})}):_.jsx("form",{onSubmit:t(y),className:"max-w-2xl mx-auto flex flex-col gap-4 px-2 pb-10",children:_.jsx(SYe,{register:r,control:e,errors:n,formConfig:i,expandedSections:d,setExpandedSections:f})})]})};var gb={exports:{}};gb.exports;var YY;function MO(){return YY||(YY=1,function(r,e){var t=200,n="__lodash_hash_undefined__",a=1,i=2,o=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",c="[object Boolean]",d="[object Date]",f="[object Error]",h="[object Function]",v="[object GeneratorFunction]",m="[object Map]",y="[object Number]",b="[object Null]",w="[object Object]",S="[object Promise]",T="[object Proxy]",A="[object RegExp]",M="[object Set]",P="[object String]",E="[object Symbol]",R="[object Undefined]",N="[object WeakMap]",k="[object ArrayBuffer]",O="[object DataView]",L="[object Float32Array]",$="[object Float64Array]",j="[object Int8Array]",B="[object Int16Array]",H="[object Int32Array]",F="[object Uint8Array]",K="[object Uint8ClampedArray]",U="[object Uint16Array]",V="[object Uint32Array]",Q=/[\\^$.*+?()[\]{}|]/g,Z=/^\[object .+?Constructor\]$/,Y=/^(?:0|[1-9]\d*)$/,X={};X[L]=X[$]=X[j]=X[B]=X[H]=X[F]=X[K]=X[U]=X[V]=!0,X[s]=X[l]=X[k]=X[c]=X[O]=X[d]=X[f]=X[h]=X[m]=X[y]=X[w]=X[A]=X[M]=X[P]=X[N]=!1;var re=typeof fs=="object"&&fs&&fs.Object===Object&&fs,oe=typeof self=="object"&&self&&self.Object===Object&&self,ae=re||oe||Function("return this")(),se=e&&!e.nodeType&&e,le=se&&!0&&r&&!r.nodeType&&r,fe=le&&le.exports===se,ve=fe&&re.process,pe=function(){try{return ve&&ve.binding&&ve.binding("util")}catch{}}(),Re=pe&&pe.isTypedArray;function Ae(G,J){for(var ce=-1,Ie=G==null?0:G.length,It=0,xt=[];++ce<Ie;){var cr=G[ce];J(cr,ce,G)&&(xt[It++]=cr)}return xt}function ie(G,J){for(var ce=-1,Ie=J.length,It=G.length;++ce<Ie;)G[It+ce]=J[ce];return G}function Se(G,J){for(var ce=-1,Ie=G==null?0:G.length;++ce<Ie;)if(J(G[ce],ce,G))return!0;return!1}function ee(G,J){for(var ce=-1,Ie=Array(G);++ce<G;)Ie[ce]=J(ce);return Ie}function te(G){return function(J){return G(J)}}function de(G,J){return G.has(J)}function ye(G,J){return G==null?void 0:G[J]}function xe(G){var J=-1,ce=Array(G.size);return G.forEach(function(Ie,It){ce[++J]=[It,Ie]}),ce}function Te(G,J){return function(ce){return G(J(ce))}}function ke(G){var J=-1,ce=Array(G.size);return G.forEach(function(Ie){ce[++J]=Ie}),ce}var Ue=Array.prototype,Xe=Function.prototype,Ee=Object.prototype,at=ae["__core-js_shared__"],$t=Xe.toString,jt=Ee.hasOwnProperty,wr=function(){var G=/[^.]+$/.exec(at&&at.keys&&at.keys.IE_PROTO||"");return G?"Symbol(src)_1."+G:""}(),Sr=Ee.toString,Ar=RegExp("^"+$t.call(jt).replace(Q,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Pt=fe?ae.Buffer:void 0,_n=ae.Symbol,Nr=ae.Uint8Array,ur=Ee.propertyIsEnumerable,Pr=Ue.splice,hn=_n?_n.toStringTag:void 0,Wn=Object.getOwnPropertySymbols,pn=Pt?Pt.isBuffer:void 0,sa=Te(Object.keys,Object),Nn=Ka(ae,"DataView"),Jt=Ka(ae,"Map"),Cn=Ka(ae,"Promise"),St=Ka(ae,"Set"),_r=Ka(ae,"WeakMap"),Ir=Ka(Object,"create"),Yr=ua(Nn),pr=ua(Jt),qr=ua(Cn),Kn=ua(St),Yn=ua(_r),xa=_n?_n.prototype:void 0,Et=xa?xa.valueOf:void 0;function Qr(G){var J=-1,ce=G==null?0:G.length;for(this.clear();++J<ce;){var Ie=G[J];this.set(Ie[0],Ie[1])}}function Oi(){this.__data__=Ir?Ir(null):{},this.size=0}function Tn(G){var J=this.has(G)&&delete this.__data__[G];return this.size-=J?1:0,J}function Zn(G){var J=this.__data__;if(Ir){var ce=J[G];return ce===n?void 0:ce}return jt.call(J,G)?J[G]:void 0}function Eo(G){var J=this.__data__;return Ir?J[G]!==void 0:jt.call(J,G)}function Eu(G,J){var ce=this.__data__;return this.size+=this.has(G)?0:1,ce[G]=Ir&&J===void 0?n:J,this}Qr.prototype.clear=Oi,Qr.prototype.delete=Tn,Qr.prototype.get=Zn,Qr.prototype.has=Eo,Qr.prototype.set=Eu;function Xn(G){var J=-1,ce=G==null?0:G.length;for(this.clear();++J<ce;){var Ie=G[J];this.set(Ie[0],Ie[1])}}function uh(){this.__data__=[],this.size=0}function tt(G){var J=this.__data__,ce=la(J,G);if(ce<0)return!1;var Ie=J.length-1;return ce==Ie?J.pop():Pr.call(J,ce,1),--this.size,!0}function An(G){var J=this.__data__,ce=la(J,G);return ce<0?void 0:J[ce][1]}function Ds(G){return la(this.__data__,G)>-1}function wa(G,J){var ce=this.__data__,Ie=la(ce,G);return Ie<0?(++this.size,ce.push([G,J])):ce[Ie][1]=J,this}Xn.prototype.clear=uh,Xn.prototype.delete=tt,Xn.prototype.get=An,Xn.prototype.has=Ds,Xn.prototype.set=wa;function vn(G){var J=-1,ce=G==null?0:G.length;for(this.clear();++J<ce;){var Ie=G[J];this.set(Ie[0],Ie[1])}}function Mu(){this.size=0,this.__data__={hash:new Qr,map:new(Jt||Xn),string:new Qr}}function Al(G){var J=zi(this,G).delete(G);return this.size-=J?1:0,J}function En(G){return zi(this,G).get(G)}function qv(G){return zi(this,G).has(G)}function Qv(G,J){var ce=zi(this,G),Ie=ce.size;return ce.set(G,J),this.size+=ce.size==Ie?0:1,this}vn.prototype.clear=Mu,vn.prototype.delete=Al,vn.prototype.get=En,vn.prototype.has=qv,vn.prototype.set=Qv;function $i(G){var J=-1,ce=G==null?0:G.length;for(this.__data__=new vn;++J<ce;)this.add(G[J])}function Ls(G){return this.__data__.set(G,n),this}function Qa(G){return this.__data__.has(G)}$i.prototype.add=$i.prototype.push=Ls,$i.prototype.has=Qa;function Mo(G){var J=this.__data__=new Xn(G);this.size=J.size}function id(){this.__data__=new Xn,this.size=0}function Wv(G){var J=this.__data__,ce=J.delete(G);return this.size=J.size,ce}function ny(G){return this.__data__.get(G)}function od(G){return this.__data__.has(G)}function sd(G,J){var ce=this.__data__;if(ce instanceof Xn){var Ie=ce.__data__;if(!Jt||Ie.length<t-1)return Ie.push([G,J]),this.size=++ce.size,this;ce=this.__data__=new vn(Ie)}return ce.set(G,J),this.size=ce.size,this}Mo.prototype.clear=id,Mo.prototype.delete=Wv,Mo.prototype.get=ny,Mo.prototype.has=od,Mo.prototype.set=sd;function to(G,J){var ce=Pu(G),Ie=!ce&&ks(G),It=!ce&&!Ie&&ku(G),xt=!ce&&!Ie&&!It&&Nu(G),cr=ce||Ie||It||xt,sr=cr?ee(G.length,String):[],Zr=sr.length;for(var vr in G)jt.call(G,vr)&&!(cr&&(vr=="length"||It&&(vr=="offset"||vr=="parent")||xt&&(vr=="buffer"||vr=="byteLength"||vr=="byteOffset")||hh(vr,Zr)))&&sr.push(vr);return sr}function la(G,J){for(var ce=G.length;ce--;)if(Is(G[ce][0],J))return ce;return-1}function ld(G,J,ce){var Ie=J(G);return Pu(G)?Ie:ie(Ie,ce(G))}function Du(G){return G==null?G===void 0?R:b:hn&&hn in Object(G)?Ps(G):fd(G)}function Lu(G){return ji(G)&&Du(G)==s}function ch(G,J,ce,Ie,It){return G===J?!0:G==null||J==null||!ji(G)&&!ji(J)?G!==G&&J!==J:ud(G,J,ce,Ie,ch,It)}function ud(G,J,ce,Ie,It,xt){var cr=Pu(G),sr=Pu(J),Zr=cr?l:ro(G),vr=sr?l:ro(J);Zr=Zr==s?w:Zr,vr=vr==s?w:vr;var ca=Zr==w,Ya=vr==w,On=Zr==vr;if(On&&ku(G)){if(!ku(J))return!1;cr=!0,ca=!1}if(On&&!ca)return xt||(xt=new Mo),cr||Nu(G)?cd(G,J,ce,Ie,It,xt):fh(G,J,Zr,ce,Ie,It,xt);if(!(ce&a)){var Sa=ca&&jt.call(G,"__wrapped__"),$n=Ya&&jt.call(J,"__wrapped__");if(Sa||$n){var Dl=Sa?G.value():G,Ns=$n?J.value():J;return xt||(xt=new Mo),It(Dl,Ns,ce,Ie,xt)}}return On?(xt||(xt=new Mo),El(G,J,ce,Ie,It,xt)):!1}function ay(G){if(!no(G)||oy(G))return!1;var J=hd(G)?Ar:Z;return J.test(ua(G))}function Wa(G){return ji(G)&&Rs(G.length)&&!!X[Du(G)]}function dh(G){if(!dd(G))return sa(G);var J=[];for(var ce in Object(G))jt.call(G,ce)&&ce!="constructor"&&J.push(ce);return J}function cd(G,J,ce,Ie,It,xt){var cr=ce&a,sr=G.length,Zr=J.length;if(sr!=Zr&&!(cr&&Zr>sr))return!1;var vr=xt.get(G);if(vr&&xt.get(J))return vr==J;var ca=-1,Ya=!0,On=ce&i?new $i:void 0;for(xt.set(G,J),xt.set(J,G);++ca<sr;){var Sa=G[ca],$n=J[ca];if(Ie)var Dl=cr?Ie($n,Sa,ca,J,G,xt):Ie(Sa,$n,ca,G,J,xt);if(Dl!==void 0){if(Dl)continue;Ya=!1;break}if(On){if(!Se(J,function(Ns,Ou){if(!de(On,Ou)&&(Sa===Ns||It(Sa,Ns,ce,Ie,xt)))return On.push(Ou)})){Ya=!1;break}}else if(!(Sa===$n||It(Sa,$n,ce,Ie,xt))){Ya=!1;break}}return xt.delete(G),xt.delete(J),Ya}function fh(G,J,ce,Ie,It,xt,cr){switch(ce){case O:if(G.byteLength!=J.byteLength||G.byteOffset!=J.byteOffset)return!1;G=G.buffer,J=J.buffer;case k:return!(G.byteLength!=J.byteLength||!xt(new Nr(G),new Nr(J)));case c:case d:case y:return Is(+G,+J);case f:return G.name==J.name&&G.message==J.message;case A:case P:return G==J+"";case m:var sr=xe;case M:var Zr=Ie&a;if(sr||(sr=ke),G.size!=J.size&&!Zr)return!1;var vr=cr.get(G);if(vr)return vr==J;Ie|=i,cr.set(G,J);var ca=cd(sr(G),sr(J),Ie,It,xt,cr);return cr.delete(G),ca;case E:if(Et)return Et.call(G)==Et.call(J)}return!1}function El(G,J,ce,Ie,It,xt){var cr=ce&a,sr=Ml(G),Zr=sr.length,vr=Ml(J),ca=vr.length;if(Zr!=ca&&!cr)return!1;for(var Ya=Zr;Ya--;){var On=sr[Ya];if(!(cr?On in J:jt.call(J,On)))return!1}var Sa=xt.get(G);if(Sa&&xt.get(J))return Sa==J;var $n=!0;xt.set(G,J),xt.set(J,G);for(var Dl=cr;++Ya<Zr;){On=sr[Ya];var Ns=G[On],Ou=J[On];if(Ie)var dw=cr?Ie(Ou,Ns,On,J,G,xt):Ie(Ns,Ou,On,G,J,xt);if(!(dw===void 0?Ns===Ou||It(Ns,Ou,ce,Ie,xt):dw)){$n=!1;break}Dl||(Dl=On=="constructor")}if($n&&!Dl){var Yv=G.constructor,ph=J.constructor;Yv!=ph&&"constructor"in G&&"constructor"in J&&!(typeof Yv=="function"&&Yv instanceof Yv&&typeof ph=="function"&&ph instanceof ph)&&($n=!1)}return xt.delete(G),xt.delete(J),$n}function Ml(G){return ld(G,pd,Kv)}function zi(G,J){var ce=G.__data__;return iy(J)?ce[typeof J=="string"?"string":"hash"]:ce.map}function Ka(G,J){var ce=ye(G,J);return ay(ce)?ce:void 0}function Ps(G){var J=jt.call(G,hn),ce=G[hn];try{G[hn]=void 0;var Ie=!0}catch{}var It=Sr.call(G);return Ie&&(J?G[hn]=ce:delete G[hn]),It}var Kv=Wn?function(G){return G==null?[]:(G=Object(G),Ae(Wn(G),function(J){return ur.call(G,J)}))}:vd,ro=Du;(Nn&&ro(new Nn(new ArrayBuffer(1)))!=O||Jt&&ro(new Jt)!=m||Cn&&ro(Cn.resolve())!=S||St&&ro(new St)!=M||_r&&ro(new _r)!=N)&&(ro=function(G){var J=Du(G),ce=J==w?G.constructor:void 0,Ie=ce?ua(ce):"";if(Ie)switch(Ie){case Yr:return O;case pr:return m;case qr:return S;case Kn:return M;case Yn:return N}return J});function hh(G,J){return J=J??o,!!J&&(typeof G=="number"||Y.test(G))&&G>-1&&G%1==0&&G<J}function iy(G){var J=typeof G;return J=="string"||J=="number"||J=="symbol"||J=="boolean"?G!=="__proto__":G===null}function oy(G){return!!wr&&wr in G}function dd(G){var J=G&&G.constructor,ce=typeof J=="function"&&J.prototype||Ee;return G===ce}function fd(G){return Sr.call(G)}function ua(G){if(G!=null){try{return $t.call(G)}catch{}try{return G+""}catch{}}return""}function Is(G,J){return G===J||G!==G&&J!==J}var ks=Lu(function(){return arguments}())?Lu:function(G){return ji(G)&&jt.call(G,"callee")&&!ur.call(G,"callee")},Pu=Array.isArray;function Iu(G){return G!=null&&Rs(G.length)&&!hd(G)}var ku=pn||gd;function Ru(G,J){return ch(G,J)}function hd(G){if(!no(G))return!1;var J=Du(G);return J==h||J==v||J==u||J==T}function Rs(G){return typeof G=="number"&&G>-1&&G%1==0&&G<=o}function no(G){var J=typeof G;return G!=null&&(J=="object"||J=="function")}function ji(G){return G!=null&&typeof G=="object"}var Nu=Re?te(Re):Wa;function pd(G){return Iu(G)?to(G):dh(G)}function vd(){return[]}function gd(){return!1}r.exports=Ru}(gb,gb.exports)),gb.exports}var jYe=MO();const BYe=wu(jYe);/**
|
|
349
|
+
color: hsl(${Math.max(0,Math.min(120-120*m,120))}deg 100% 31%);`,t==null?void 0:t.key)}return(l=t==null?void 0:t.onChange)==null||l.call(t,a),a}}function xP(r,e){if(r===void 0)throw new Error("Unexpected undefined");return r}const kKe=(r,e)=>Math.abs(r-e)<1,RKe=(r,e,t)=>{let n;return function(...a){r.clearTimeout(n),n=r.setTimeout(()=>e.apply(this,a),t)}},NKe=r=>r,OKe=r=>{const e=Math.max(r.startIndex-r.overscan,0),t=Math.min(r.endIndex+r.overscan,r.count-1),n=[];for(let a=e;a<=t;a++)n.push(a);return n},$Ke=(r,e)=>{const t=r.scrollElement;if(!t)return;const n=r.targetWindow;if(!n)return;const a=o=>{const{width:s,height:l}=o;e({width:Math.round(s),height:Math.round(l)})};if(a(t.getBoundingClientRect()),!n.ResizeObserver)return()=>{};const i=new n.ResizeObserver(o=>{const s=o[0];if(s!=null&&s.borderBoxSize){const l=s.borderBoxSize[0];if(l){a({width:l.inlineSize,height:l.blockSize});return}}a(t.getBoundingClientRect())});return i.observe(t,{box:"border-box"}),()=>{i.unobserve(t)}},VY={passive:!0},zKe=typeof window>"u"?!0:"onscrollend"in window,jKe=(r,e)=>{const t=r.scrollElement;if(!t)return;const n=r.targetWindow;if(!n)return;let a=0;const i=r.options.useScrollendEvent&&zKe?()=>{}:RKe(n,()=>{e(a,!1)},r.options.isScrollingResetDelay),o=u=>()=>{const{horizontal:c,isRtl:d}=r.options;a=c?t.scrollLeft*(d&&-1||1):t.scrollTop,i(),e(a,u)},s=o(!0),l=o(!1);return l(),t.addEventListener("scroll",s,VY),t.addEventListener("scrollend",l,VY),()=>{t.removeEventListener("scroll",s),t.removeEventListener("scrollend",l)}},BKe=(r,e,t)=>{if(e!=null&&e.borderBoxSize){const n=e.borderBoxSize[0];if(n)return Math.round(n[t.options.horizontal?"inlineSize":"blockSize"])}return Math.round(r.getBoundingClientRect()[t.options.horizontal?"width":"height"])},VKe=(r,{adjustments:e=0,behavior:t},n)=>{var a,i;const o=r+e;(i=(a=n.scrollElement)==null?void 0:a.scrollTo)==null||i.call(a,{[n.options.horizontal?"left":"top"]:o,behavior:t})};class FKe{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let t=null;const n=()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(a=>{a.forEach(i=>{this._measureElement(i.target,i)})}));return{disconnect:()=>{var a;(a=n())==null||a.disconnect(),t=null},observe:a=>{var i;return(i=n())==null?void 0:i.observe(a,{box:"border-box"})},unobserve:a=>{var i;return(i=n())==null?void 0:i.unobserve(a)}}})(),this.range=null,this.setOptions=t=>{Object.entries(t).forEach(([n,a])=>{typeof a>"u"&&delete t[n]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:NKe,rangeExtractor:OKe,onChange:()=>{},measureElement:BKe,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!0,...t}},this.notify=t=>{var n,a;(a=(n=this.options).onChange)==null||a.call(n,this,t)},this.maybeNotify=Yg(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),t=>{this.notify(t)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.maybeNotify();return}this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this.elementsCache.forEach(a=>{this.observer.observe(a)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,a=>{this.scrollRect=a,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(a,i)=>{this.scrollAdjustments=0,this.scrollDirection=i?this.getScrollOffset()<a?"forward":"backward":null,this.scrollOffset=a,this.isScrolling=i,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(t,n)=>{const a=new Map,i=new Map;for(let o=n-1;o>=0;o--){const s=t[o];if(a.has(s.lane))continue;const l=i.get(s.lane);if(l==null||s.end>l.end?i.set(s.lane,s):s.end<l.end&&a.set(s.lane,!0),a.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort((o,s)=>o.end===s.end?o.index-s.index:o.end-s.end)[0]:void 0},this.getMeasurementOptions=Yg(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(t,n,a,i,o)=>(this.pendingMeasuredCacheIndexes=[],{count:t,paddingStart:n,scrollMargin:a,getItemKey:i,enabled:o}),{key:!1}),this.getMeasurements=Yg(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:t,paddingStart:n,scrollMargin:a,getItemKey:i,enabled:o},s)=>{if(!o)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(c=>{this.itemSizeCache.set(c.key,c.size)}));const l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const u=this.measurementsCache.slice(0,l);for(let c=l;c<t;c++){const d=i(c),f=this.options.lanes===1?u[c-1]:this.getFurthestMeasurement(u,c),h=f?f.end+this.options.gap:n+a,v=s.get(d),m=typeof v=="number"?v:this.options.estimateSize(c),y=h+m,b=f?f.lane:c%this.options.lanes;u[c]={index:c,start:h,size:m,end:y,key:d,lane:b}}return this.measurementsCache=u,u},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Yg(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(t,n,a)=>this.range=t.length>0&&n>0?HKe({measurements:t,outerSize:n,scrollOffset:a}):null,{key:!1,debug:()=>this.options.debug}),this.getIndexes=Yg(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(t,n,a,i)=>n===null?[]:t({startIndex:n.startIndex,endIndex:n.endIndex,overscan:a,count:i}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=t=>{const n=this.options.indexAttribute,a=t.getAttribute(n);return a?parseInt(a,10):(console.warn(`Missing attribute name '${n}={index}' on measured element.`),-1)},this._measureElement=(t,n)=>{const a=this.indexFromElement(t),i=this.measurementsCache[a];if(!i)return;const o=i.key,s=this.elementsCache.get(o);s!==t&&(s&&this.observer.unobserve(s),this.observer.observe(t),this.elementsCache.set(o,t)),t.isConnected&&this.resizeItem(a,this.options.measureElement(t,n,this))},this.resizeItem=(t,n)=>{const a=this.measurementsCache[t];if(!a)return;const i=this.itemSizeCache.get(a.key)??a.size,o=n-i;o!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(a,o,this):a.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=o,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(a.index),this.itemSizeCache=new Map(this.itemSizeCache.set(a.key,n)),this.notify(!1))},this.measureElement=t=>{if(!t){this.elementsCache.forEach((n,a)=>{n.isConnected||(this.observer.unobserve(n),this.elementsCache.delete(a))});return}this._measureElement(t,void 0)},this.getVirtualItems=Yg(()=>[this.getIndexes(),this.getMeasurements()],(t,n)=>{const a=[];for(let i=0,o=t.length;i<o;i++){const s=t[i],l=n[s];a.push(l)}return a},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=t=>{const n=this.getMeasurements();if(n.length!==0)return xP(n[dhe(0,n.length-1,a=>xP(n[a]).start,t)])},this.getOffsetForAlignment=(t,n)=>{const a=this.getSize(),i=this.getScrollOffset();n==="auto"&&t>=i+a&&(n="end"),n==="end"&&(t-=a);const o=this.options.horizontal?"scrollWidth":"scrollHeight",l=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[o]:this.scrollElement[o]:0)-a;return Math.max(Math.min(l,t),0)},this.getOffsetForIndex=(t,n="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const a=this.measurementsCache[t];if(!a)return;const i=this.getSize(),o=this.getScrollOffset();if(n==="auto")if(a.end>=o+i-this.options.scrollPaddingEnd)n="end";else if(a.start<=o+this.options.scrollPaddingStart)n="start";else return[o,n];const s=a.start-this.options.scrollPaddingStart+(a.size-i)/2;switch(n){case"center":return[this.getOffsetForAlignment(s,n),n];case"end":return[this.getOffsetForAlignment(a.end+this.options.scrollPaddingEnd,n),n];default:return[this.getOffsetForAlignment(a.start-this.options.scrollPaddingStart,n),n]}},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(t,{align:n="start",behavior:a}={})=>{this.cancelScrollToIndex(),a==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(t,n),{adjustments:void 0,behavior:a})},this.scrollToIndex=(t,{align:n="auto",behavior:a}={})=>{t=Math.max(0,Math.min(t,this.options.count-1)),this.cancelScrollToIndex(),a==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const i=this.getOffsetForIndex(t,n);if(!i)return;const[o,s]=i;this._scrollToOffset(o,{adjustments:void 0,behavior:a}),a!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(t))){const[u]=xP(this.getOffsetForIndex(t,s));kKe(u,this.getScrollOffset())||this.scrollToIndex(t,{align:s,behavior:a})}else this.scrollToIndex(t,{align:s,behavior:a})}))},this.scrollBy=(t,{behavior:n}={})=>{this.cancelScrollToIndex(),n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+t,{adjustments:void 0,behavior:n})},this.getTotalSize=()=>{var t;const n=this.getMeasurements();let a;return n.length===0?a=this.options.paddingStart:a=this.options.lanes===1?((t=n[n.length-1])==null?void 0:t.end)??0:Math.max(...n.slice(-this.options.lanes).map(i=>i.end)),Math.max(a-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(t,{adjustments:n,behavior:a})=>{this.options.scrollToFn(t,{behavior:a,adjustments:n},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(e)}}const dhe=(r,e,t,n)=>{for(;r<=e;){const a=(r+e)/2|0,i=t(a);if(i<n)r=a+1;else if(i>n)e=a-1;else return a}return r>0?r-1:0};function HKe({measurements:r,outerSize:e,scrollOffset:t}){const n=r.length-1,i=dhe(0,n,s=>r[s].start,t);let o=i;for(;o<n&&r[o].end<t+e;)o++;return{startIndex:i,endIndex:o}}const FY=typeof document<"u"?D.useLayoutEffect:D.useEffect;function UKe(r){const e=D.useReducer(()=>({}),{})[1],t={...r,onChange:(a,i)=>{var o;i?BA.flushSync(e):e(),(o=r.onChange)==null||o.call(r,a,i)}},[n]=D.useState(()=>new FKe(t));return n.setOptions(t),FY(()=>n._didMount(),[]),FY(()=>n._willUpdate()),n}function GKe(r){return UKe({observeElementRect:$Ke,observeElementOffset:jKe,scrollToFn:VKe,...r})}function qKe(r={}){const{domRef:e,isEnabled:t=!0,overflowCheck:n="vertical",visibility:a="auto",offset:i=0,onVisibilityChange:o,updateDeps:s=[]}=r,l=D.useRef(a);D.useEffect(()=>{const u=e==null?void 0:e.current;if(!u||!t)return;const c=(h,v,m,y,b)=>{if(a==="auto"){const w=`${y}${Ete(b)}Scroll`;v&&m?(u.dataset[w]="true",u.removeAttribute(`data-${y}-scroll`),u.removeAttribute(`data-${b}-scroll`)):(u.dataset[`${y}Scroll`]=v.toString(),u.dataset[`${b}Scroll`]=m.toString(),u.removeAttribute(`data-${y}-${b}-scroll`))}else{const w=v&&m?"both":v?y:m?b:"none";w!==l.current&&(o==null||o(w),l.current=w)}},d=()=>{const h=[{type:"vertical",prefix:"top",suffix:"bottom"},{type:"horizontal",prefix:"left",suffix:"right"}];for(const{type:v,prefix:m,suffix:y}of h)if(n===v||n==="both"){const b=v==="vertical"?u.scrollTop>i:u.scrollLeft>i,w=v==="vertical"?u.scrollTop+u.clientHeight+i<u.scrollHeight:u.scrollLeft+u.clientWidth+i<u.scrollWidth;c(v,b,w,m,y)}},f=()=>{["top","bottom","top-bottom","left","right","left-right"].forEach(h=>{u.removeAttribute(`data-${h}-scroll`)})};return d(),u.addEventListener("scroll",d),a!=="auto"&&(f(),a==="both"?(u.dataset.topBottomScroll=String(n==="vertical"),u.dataset.leftRightScroll=String(n==="horizontal")):(u.dataset.topBottomScroll="false",u.dataset.leftRightScroll="false",["top","bottom","left","right"].forEach(h=>{u.dataset[`${h}Scroll`]=String(a===h)}))),()=>{u.removeEventListener("scroll",d),f()}},[...s,t,a,n,o,e])}function QKe(r){var e;const[t,n]=oa(r,aT.variantKeys),{ref:a,as:i,children:o,className:s,style:l,size:u=40,offset:c=0,visibility:d="auto",isEnabled:f=!0,onVisibilityChange:h,...v}=t,m=i||"div",y=$r(a);qKe({domRef:y,offset:c,visibility:d,isEnabled:f,onVisibilityChange:h,updateDeps:[o],overflowCheck:(e=r.orientation)!=null?e:"vertical"});const b=D.useMemo(()=>aT({...n,className:s}),[eo(n),s]);return{Component:m,styles:b,domRef:y,children:o,getBaseProps:(S={})=>{var T;return{ref:y,className:b,"data-orientation":(T=r.orientation)!=null?T:"vertical",style:{"--scroll-shadow-size":`${u}px`,...l,...S.style},...v,...S}}}}var WKe=(r,e)=>{const t=[];for(const n of r)n.type==="section"?t.push(([...n.childNodes].length+1)*e):t.push(e);return t},KKe=r=>{if(!r||r.scrollTop===void 0||r.clientHeight===void 0||r.scrollHeight===void 0)return{isTop:!1,isBottom:!1,isMiddle:!1};const e=r.scrollTop===0,t=Math.ceil(r.scrollTop+r.clientHeight)>=r.scrollHeight;return{isTop:e,isBottom:t,isMiddle:!e&&!t}},YKe=r=>{const{Component:e,state:t,color:n,variant:a,itemClasses:i,getBaseProps:o,topContent:s,bottomContent:l,hideEmptyContent:u,hideSelectedIcon:c,shouldHighlightOnFocus:d,disableAnimation:f,getEmptyContentProps:h,getListProps:v,scrollShadowProps:m}=r,{virtualization:y}=r;if(!y||!XSe(y)&&!y.maxListboxHeight&&!y.itemHeight)throw new Error("You are using a virtualized listbox. VirtualizedListbox requires 'virtualization' props with 'maxListboxHeight' and 'itemHeight' properties. This error might have originated from autocomplete components that use VirtualizedListbox. Please provide these props to use the virtualized listbox.");const{maxListboxHeight:b,itemHeight:w}=y,S=Math.min(b,w*t.collection.size),T=D.useRef(null),A=D.useMemo(()=>WKe([...t.collection],w),[t.collection,w]),M=GKe({count:[...t.collection].length,getScrollElement:()=>T.current,estimateSize:L=>A[L]}),P=M.getVirtualItems(),{getBaseProps:E}=QKe({...m}),R=L=>{var $;const j=[...t.collection][L.index];if(!j)return null;const B={color:n,item:j,state:t,variant:a,disableAnimation:f,hideSelectedIcon:c,...j.props},H={position:"absolute",top:0,left:0,width:"100%",height:`${L.size}px`,transform:`translateY(${L.start}px)`};if(j.type==="section")return _.jsx(che,{...B,itemClasses:i,style:{...H,...B.style}},j.key);let F=_.jsx(AO,{...B,classNames:ze(i,($=j.props)==null?void 0:$.classNames),shouldHighlightOnFocus:d,style:{...H,...B.style}},j.key);return j.wrapper&&(F=j.wrapper(F)),F},[N,k]=D.useState({isTop:!1,isBottom:!0,isMiddle:!1}),O=_.jsxs(e,{...v(),children:[!t.collection.size&&!u&&_.jsx("li",{children:_.jsx("div",{...h()})}),_.jsx("div",{...Pa(E()),ref:T,"data-bottom-scroll":N.isTop,"data-top-bottom-scroll":N.isMiddle,"data-top-scroll":N.isBottom,style:{height:b,overflow:"auto"},onScroll:L=>{k(KKe(L.target))},children:S>0&&w>0&&_.jsx("div",{style:{height:`${M.getTotalSize()}px`,width:"100%",position:"relative"},children:P.map(L=>R(L))})})]});return _.jsxs("div",{...o(),children:[s,O,l]})},ZKe=YKe,XKe=Ht(function(e,t){const{isVirtualized:n,...a}=e,i=AKe({...a,ref:t}),{Component:o,state:s,color:l,variant:u,itemClasses:c,getBaseProps:d,topContent:f,bottomContent:h,hideEmptyContent:v,hideSelectedIcon:m,shouldHighlightOnFocus:y,disableAnimation:b,getEmptyContentProps:w,getListProps:S}=i;if(n)return _.jsx(ZKe,{...e,...i});const T=_.jsxs(o,{...S(),children:[!s.collection.size&&!v&&_.jsx("li",{children:_.jsx("div",{...w()})}),[...s.collection].map(A=>{var M;const P={color:l,item:A,state:s,variant:u,disableAnimation:b,hideSelectedIcon:m,...A.props};if(A.type==="section")return _.jsx(che,{...P,itemClasses:c},A.key);let E=_.jsx(AO,{...P,classNames:ze(c,(M=A.props)==null?void 0:M.classNames),shouldHighlightOnFocus:y},A.key);return A.wrapper&&(E=A.wrapper(E)),E})]});return _.jsxs("div",{...d(),children:[f,T,h]})}),JKe=XKe;function eYe(r,e){const{triggerRef:t,popoverRef:n,showArrow:a,offset:i=7,crossOffset:o=0,scrollRef:s,shouldFlip:l,boundaryElement:u,isDismissable:c=!0,shouldCloseOnBlur:d=!0,shouldCloseOnScroll:f=!0,placement:h="top",containerPadding:v,shouldCloseOnInteractOutside:m,isNonModal:y,isKeyboardDismissDisabled:b,updatePositionDeps:w=[],...S}=r,T=y??!0,{overlayProps:A,underlayProps:M}=E2({isOpen:e.isOpen,onClose:e.close,shouldCloseOnBlur:d,isDismissable:c,isKeyboardDismissDisabled:b,shouldCloseOnInteractOutside:m||(k=>$ae(k,t,e))},n),{overlayProps:P,arrowProps:E,placement:R,updatePosition:N}=o3({...S,shouldFlip:l,crossOffset:o,targetRef:t,overlayRef:n,isOpen:e.isOpen,scrollRef:s,boundaryElement:u,containerPadding:v,placement:Oae(h),offset:a?i+3:i,onClose:T&&f?e.close:()=>{}});return O0(()=>{w.length&&N()},w),D.useEffect(()=>{if(e.isOpen&&!T&&n.current)return EMe([n.current])},[T,e.isOpen,n]),{popoverProps:ze(A,P),arrowProps:E,underlayProps:M,placement:R}}var tYe="top";function fhe(r){var e,t,n;const a=Vr(),[i,o]=oa(r,zf.variantKeys),{as:s,ref:l,children:u,state:c,triggerRef:d,scrollRef:f,defaultOpen:h,onOpenChange:v,isOpen:m,isNonModal:y=!0,shouldFlip:b=!0,containerPadding:w=12,shouldBlockScroll:S=!1,isDismissable:T=!0,shouldCloseOnBlur:A,portalContainer:M,updatePositionDeps:P,dialogProps:E,placement:R=tYe,triggerType:N="dialog",showArrow:k=!1,offset:O=7,crossOffset:L=0,boundaryElement:$,isKeyboardDismissDisabled:j,shouldCloseOnInteractOutside:B,shouldCloseOnScroll:H,motionProps:F,className:K,classNames:U,onClose:V,...Q}=i,Z=s||"div",Y=$r(l),X=D.useRef(null),re=D.useRef(!1),oe=d||X,ae=(t=(e=r.disableAnimation)!=null?e:a==null?void 0:a.disableAnimation)!=null?t:!1,se=rN({isOpen:m,defaultOpen:h,onOpenChange:Ee=>{v==null||v(Ee),Ee||V==null||V()}}),le=c||se,{popoverProps:fe,underlayProps:ve,placement:pe}=eYe({triggerRef:oe,isNonModal:y,popoverRef:Y,placement:R,offset:O,scrollRef:f,isDismissable:T,shouldCloseOnBlur:A,boundaryElement:$,crossOffset:L,shouldFlip:b,containerPadding:w,updatePositionDeps:P,isKeyboardDismissDisabled:j,shouldCloseOnScroll:H,shouldCloseOnInteractOutside:B},le),Re=D.useMemo(()=>pe?AMe(pe,R)?pe:R:null,[pe,R]),{triggerProps:Ae}=ore({type:N},le,oe),{isFocusVisible:ie,isFocused:Se,focusProps:ee}=Rn(),te=D.useMemo(()=>zf({...o}),[eo(o)]),de=lt(U==null?void 0:U.base,K);R8({isDisabled:!(S&&le.isOpen)});const ye=(Ee={})=>({ref:Y,...ze(fe,Q,Ee),style:ze(fe.style,Q.style,Ee.style)}),xe=(Ee={})=>({"data-slot":"base","data-open":je(le.isOpen),"data-focus":je(Se),"data-arrow":je(k),"data-focus-visible":je(ie),"data-placement":pe?fT(pe,R):void 0,...ze(ee,E,Ee),className:te.base({class:lt(de)}),style:{outline:"none"}}),Te=D.useCallback((Ee={})=>({"data-slot":"content","data-open":je(le.isOpen),"data-arrow":je(k),"data-placement":pe?fT(pe,R):void 0,className:te.content({class:lt(U==null?void 0:U.content,Ee.className)})}),[te,le.isOpen,k,Re,R,U,pe]),ke=D.useCallback(Ee=>{var at;let $t;return Ee.pointerType==="touch"&&((r==null?void 0:r.backdrop)==="blur"||(r==null?void 0:r.backdrop)==="opaque")?$t=setTimeout(()=>{re.current=!0},100):re.current=!0,(at=Ae.onPress)==null||at.call(Ae,Ee),()=>{clearTimeout($t)}},[Ae==null?void 0:Ae.onPress]),Ue=D.useCallback((Ee={},at=null)=>{const{isDisabled:$t,...jt}=Ee;return{"data-slot":"trigger",...ze({"aria-haspopup":"dialog"},Ae,jt),onPress:ke,isDisabled:$t,className:te.trigger({class:lt(U==null?void 0:U.trigger,Ee.className),isTriggerDisabled:$t}),ref:C2(at,oe)}},[le,Ae,ke,oe]),Xe=D.useCallback((Ee={})=>({"data-slot":"backdrop",className:te.backdrop({class:U==null?void 0:U.backdrop}),onClick:at=>{if(!re.current){at.preventDefault();return}le.close(),re.current=!1},...ve,...Ee}),[te,le.isOpen,U,ve]);return D.useEffect(()=>{if(le.isOpen&&(Y!=null&&Y.current))return N8([Y==null?void 0:Y.current])},[le.isOpen,Y]),{state:le,Component:Z,children:u,classNames:U,showArrow:k,triggerRef:oe,placement:Re,isNonModal:y,popoverRef:Y,portalContainer:M,isOpen:le.isOpen,onClose:le.close,disableAnimation:ae,shouldBlockScroll:S,backdrop:(n=r.backdrop)!=null?n:"transparent",motionProps:F,getBackdropProps:Xe,getPopoverProps:ye,getTriggerProps:Ue,getDialogProps:xe,getContentProps:Te}}var hhe=()=>Jc(()=>import("./index-Dm_gigSn.js"),[]).then(r=>r.default),phe=Ht(({children:r,motionProps:e,placement:t,disableAnimation:n,style:a={},transformOrigin:i={},...o},s)=>{let l=a;return i.originX!==void 0||i.originY!==void 0?l={...l,transformOrigin:i}:t&&(l={...l,...tN(t==="center"?"top":t)}),n?_.jsx("div",{...o,ref:s,children:r}):_.jsx(Mi,{features:hhe,children:_.jsx(Di.div,{ref:s,animate:"enter",exit:"exit",initial:"initial",style:l,variants:jf.scaleSpringOpacity,...ze(o,e),children:r})})});phe.displayName="HeroUI.FreeSoloPopoverWrapper";var vhe=Ht(({children:r,transformOrigin:e,disableDialogFocus:t=!1,...n},a)=>{const{Component:i,state:o,placement:s,backdrop:l,portalContainer:u,disableAnimation:c,motionProps:d,isNonModal:f,getPopoverProps:h,getBackdropProps:v,getDialogProps:m,getContentProps:y}=fhe({...n,ref:a}),b=D.useRef(null),{dialogProps:w,titleProps:S}=C3({},b),T=m({...!t&&{ref:b},...w}),A=D.useMemo(()=>l==="transparent"?null:c?_.jsx("div",{...v()}):_.jsx(Mi,{features:hhe,children:_.jsx(Di.div,{animate:"enter",exit:"exit",initial:"exit",variants:jf.fade,...v()})}),[l,c,v]);return _.jsxs(l3,{portalContainer:u,children:[!f&&A,_.jsx(i,{...h(),children:_.jsxs(phe,{disableAnimation:c,motionProps:d,placement:s,tabIndex:-1,transformOrigin:e,...T,children:[!f&&_.jsx($f,{onDismiss:o.close}),_.jsx("div",{...y(),children:typeof r=="function"?r(S):r}),_.jsx($f,{onDismiss:o.close})]})})]})});vhe.displayName="HeroUI.FreeSoloPopover";var rYe=vhe,[nYe,ghe]=nh({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within `<Popover />`"}),HY=()=>Jc(()=>import("./index-Dm_gigSn.js"),[]).then(r=>r.default),mhe=r=>{const{as:e,children:t,className:n,...a}=r,{Component:i,placement:o,backdrop:s,motionProps:l,disableAnimation:u,getPopoverProps:c,getDialogProps:d,getBackdropProps:f,getContentProps:h,isNonModal:v,onClose:m}=ghe(),y=D.useRef(null),{dialogProps:b,titleProps:w}=C3({},y),S=d({ref:y,...b,...a}),T=e||i||"div",A=_.jsxs(_.Fragment,{children:[!v&&_.jsx($f,{onDismiss:m}),_.jsx(T,{...S,children:_.jsx("div",{...h({className:n}),children:typeof t=="function"?t(w):t})}),_.jsx($f,{onDismiss:m})]}),M=D.useMemo(()=>s==="transparent"?null:u?_.jsx("div",{...f()}):_.jsx(Mi,{features:HY,children:_.jsx(Di.div,{animate:"enter",exit:"exit",initial:"exit",variants:jf.fade,...f()})}),[s,u,f]),P=o?tN(o==="center"?"top":o):void 0,E=_.jsx(_.Fragment,{children:u?A:_.jsx(Mi,{features:HY,children:_.jsx(Di.div,{animate:"enter",exit:"exit",initial:"initial",style:P,variants:jf.scaleSpringOpacity,...l,children:A})})});return _.jsxs("div",{...c(),children:[M,E]})};mhe.displayName="HeroUI.PopoverContent";var bs=mhe,[Nut,aYe]=nh({name:"ButtonGroupContext",strict:!1});function iYe(r){var e,t,n,a,i,o,s,l,u;const c=aYe(),d=Vr(),f=!!c,{ref:h,as:v,children:m,startContent:y,endContent:b,autoFocus:w,className:S,spinner:T,isLoading:A=!1,disableRipple:M=!1,fullWidth:P=(e=c==null?void 0:c.fullWidth)!=null?e:!1,radius:E=c==null?void 0:c.radius,size:R=(t=c==null?void 0:c.size)!=null?t:"md",color:N=(n=c==null?void 0:c.color)!=null?n:"default",variant:k=(a=c==null?void 0:c.variant)!=null?a:"solid",disableAnimation:O=(o=(i=c==null?void 0:c.disableAnimation)!=null?i:d==null?void 0:d.disableAnimation)!=null?o:!1,isDisabled:L=(s=c==null?void 0:c.isDisabled)!=null?s:!1,isIconOnly:$=(l=c==null?void 0:c.isIconOnly)!=null?l:!1,spinnerPlacement:j="start",onPress:B,onClick:H,...F}=r,K=v||"button",U=typeof K=="string",V=$r(h),Q=(u=M||(d==null?void 0:d.disableRipple))!=null?u:O,{isFocusVisible:Z,isFocused:Y,focusProps:X}=Rn({autoFocus:w}),re=L||A,oe=D.useMemo(()=>one({size:R,color:N,variant:k,radius:E,fullWidth:P,isDisabled:re,isInGroup:f,disableAnimation:O,isIconOnly:$,className:S}),[R,N,k,E,P,re,f,$,O,S]),{onPress:ae,onClear:se,ripples:le}=Jne(),fe=D.useCallback(xe=>{Q||re||O||V.current&&ae(xe)},[Q,re,O,V,ae]),{buttonProps:ve,isPressed:pe}=M2({elementType:v,isDisabled:re,onPress:Un(B,fe),onClick:H,...F},V),{isHovered:Re,hoverProps:Ae}=Ia({isDisabled:re}),ie=D.useCallback((xe={})=>({"data-disabled":je(re),"data-focus":je(Y),"data-pressed":je(pe),"data-focus-visible":je(Z),"data-hover":je(Re),"data-loading":je(A),...ze(ve,X,Ae,Pa(F,{enabled:U}),Pa(xe))}),[A,re,Y,pe,U,Z,Re,ve,X,Ae,F]),Se=xe=>D.isValidElement(xe)?D.cloneElement(xe,{"aria-hidden":!0,focusable:!1,tabIndex:-1}):null,ee=Se(y),te=Se(b),de=D.useMemo(()=>({sm:"sm",md:"sm",lg:"md"})[R],[R]),ye=D.useCallback(()=>({ripples:le,onClear:se}),[le,se]);return{Component:K,children:m,domRef:V,spinner:T,styles:oe,startContent:ee,endContent:te,isLoading:A,spinnerPlacement:j,spinnerSize:de,disableRipple:Q,getButtonProps:ie,getRippleProps:ye,isIconOnly:$}}function oYe(r){const[e,t]=oa(r,nT.variantKeys),{children:n,className:a,classNames:i,label:o,...s}=e,l=D.useMemo(()=>nT({...t}),[eo(t)]),u=lt(i==null?void 0:i.base,a),c=o||n,d=D.useMemo(()=>c&&typeof c=="string"?c:s["aria-label"]?"":"Loading",[n,c,s["aria-label"]]),f=D.useCallback(()=>({"aria-label":d,className:l.base({class:u}),...s}),[d,l,u,s]);return{label:c,slots:l,classNames:i,getSpinnerProps:f}}var yhe=Ht((r,e)=>{const{slots:t,classNames:n,label:a,getSpinnerProps:i}=oYe({...r});return _.jsxs("div",{ref:e,...i(),children:[_.jsxs("div",{className:t.wrapper({class:n==null?void 0:n.wrapper}),children:[_.jsx("i",{className:t.circle1({class:n==null?void 0:n.circle1})}),_.jsx("i",{className:t.circle2({class:n==null?void 0:n.circle2})})]}),a&&_.jsx("span",{className:t.label({class:n==null?void 0:n.label}),children:a})]})});yhe.displayName="HeroUI.Spinner";var ey=yhe,bhe=Ht((r,e)=>{const{Component:t,domRef:n,children:a,styles:i,spinnerSize:o,spinner:s=_.jsx(ey,{color:"current",size:o}),spinnerPlacement:l,startContent:u,endContent:c,isLoading:d,disableRipple:f,getButtonProps:h,getRippleProps:v,isIconOnly:m}=iYe({...r,ref:e});return _.jsxs(t,{ref:n,className:i,...h(),children:[u,d&&l==="start"&&s,d&&m?null:a,d&&l==="end"&&s,c,!f&&_.jsx(Xne,{...v()})]})});bhe.displayName="HeroUI.Button";var sYe=bhe,xhe=r=>{var e;const{triggerRef:t,getTriggerProps:n}=ghe(),{children:a,...i}=r,o=D.useMemo(()=>typeof a=="string"?_.jsx("p",{children:a}):D.Children.only(a),[a]),s=(e=o.props.ref)!=null?e:o.ref,{onPress:l,isDisabled:u,...c}=D.useMemo(()=>n(ze(i,o.props),s),[n,o.props,i,s]),[,d]=m_e(a,sYe),{buttonProps:f}=M2({onPress:l,isDisabled:u},t),h=D.useMemo(()=>(d==null?void 0:d[0])!==void 0,[d]);return D.cloneElement(o,ze(c,h?{onPress:l,isDisabled:u}:f))};xhe.displayName="HeroUI.PopoverTrigger";var xs=xhe,whe=Ht((r,e)=>{const{children:t,...n}=r,a=fhe({...n,ref:e}),[i,o]=D.Children.toArray(t),s=_.jsx(l3,{portalContainer:a.portalContainer,children:o});return _.jsxs(nYe,{value:a,children:[i,a.disableAnimation&&a.isOpen?s:_.jsx(fl,{children:a.isOpen?s:null})]})});whe.displayName="HeroUI.Popover";var ws=whe;function lYe(r={}){const{domRef:e,isEnabled:t=!0,overflowCheck:n="vertical",visibility:a="auto",offset:i=0,onVisibilityChange:o,updateDeps:s=[]}=r,l=D.useRef(a);D.useEffect(()=>{const u=e==null?void 0:e.current;if(!u||!t)return;const c=(h,v,m,y,b)=>{if(a==="auto"){const w=`${y}${Ete(b)}Scroll`;v&&m?(u.dataset[w]="true",u.removeAttribute(`data-${y}-scroll`),u.removeAttribute(`data-${b}-scroll`)):(u.dataset[`${y}Scroll`]=v.toString(),u.dataset[`${b}Scroll`]=m.toString(),u.removeAttribute(`data-${y}-${b}-scroll`))}else{const w=v&&m?"both":v?y:m?b:"none";w!==l.current&&(o==null||o(w),l.current=w)}},d=()=>{const h=[{type:"vertical",prefix:"top",suffix:"bottom"},{type:"horizontal",prefix:"left",suffix:"right"}];for(const{type:v,prefix:m,suffix:y}of h)if(n===v||n==="both"){const b=v==="vertical"?u.scrollTop>i:u.scrollLeft>i,w=v==="vertical"?u.scrollTop+u.clientHeight+i<u.scrollHeight:u.scrollLeft+u.clientWidth+i<u.scrollWidth;c(v,b,w,m,y)}},f=()=>{["top","bottom","top-bottom","left","right","left-right"].forEach(h=>{u.removeAttribute(`data-${h}-scroll`)})};return d(),u.addEventListener("scroll",d),a!=="auto"&&(f(),a==="both"?(u.dataset.topBottomScroll=String(n==="vertical"),u.dataset.leftRightScroll=String(n==="horizontal")):(u.dataset.topBottomScroll="false",u.dataset.leftRightScroll="false",["top","bottom","left","right"].forEach(h=>{u.dataset[`${h}Scroll`]=String(a===h)}))),()=>{u.removeEventListener("scroll",d),f()}},[...s,t,a,n,o,e])}function uYe(r){var e;const[t,n]=oa(r,aT.variantKeys),{ref:a,as:i,children:o,className:s,style:l,size:u=40,offset:c=0,visibility:d="auto",isEnabled:f=!0,onVisibilityChange:h,...v}=t,m=i||"div",y=$r(a);lYe({domRef:y,offset:c,visibility:d,isEnabled:f,onVisibilityChange:h,updateDeps:[o],overflowCheck:(e=r.orientation)!=null?e:"vertical"});const b=D.useMemo(()=>aT({...n,className:s}),[eo(n),s]);return{Component:m,styles:b,domRef:y,children:o,getBaseProps:(S={})=>{var T;return{ref:y,className:b,"data-orientation":(T=r.orientation)!=null?T:"vertical",style:{"--scroll-shadow-size":`${u}px`,...l,...S.style},...v,...S}}}}var She=Ht((r,e)=>{const{Component:t,children:n,getBaseProps:a}=uYe({...r,ref:e});return _.jsx(t,{...a(),children:n})});She.displayName="HeroUI.ScrollShadow";var EO=She,cYe=Ht(function(e,t){const{Component:n,state:a,label:i,hasHelper:o,isLoading:s,triggerRef:l,selectorIcon:u=_.jsx(CDe,{}),description:c,errorMessage:d,isInvalid:f,startContent:h,endContent:v,placeholder:m,renderValue:y,shouldLabelBeOutside:b,disableAnimation:w,getBaseProps:S,getLabelProps:T,getTriggerProps:A,getValueProps:M,getListboxProps:P,getPopoverProps:E,getSpinnerProps:R,getMainWrapperProps:N,getInnerWrapperProps:k,getHiddenSelectProps:O,getHelperWrapperProps:L,getListboxWrapperProps:$,getDescriptionProps:j,getErrorMessageProps:B,getSelectorIconProps:H}=fKe({...e,ref:t}),F=i?_.jsx("label",{...T(),children:i}):null,K=D.cloneElement(u,H()),U=D.useMemo(()=>{const Y=f&&d;return!o||!(Y||c)?null:_.jsx("div",{...L(),children:Y?_.jsx("div",{...B(),children:d}):_.jsx("div",{...j(),children:c})})},[o,f,d,c,L,B,j]),V=D.useMemo(()=>{var Y;if(!((Y=a.selectedItems)!=null&&Y.length))return m;if(y&&typeof y=="function"){const X=[...a.selectedItems].map(re=>({key:re.key,data:re.value,type:re.type,props:re.props,textValue:re.textValue,rendered:re.rendered,"aria-label":re["aria-label"]}));return y(X)}return a.selectedItems.map(X=>X.textValue).join(", ")},[a.selectedItems,y,m]),Q=D.useMemo(()=>s?_.jsx(ey,{...R()}):K,[s,K,R]),Z=D.useMemo(()=>a.isOpen?_.jsx(rYe,{...E(),children:_.jsx(EO,{...$(),children:_.jsx(JKe,{...P()})})}):null,[a.isOpen,E,a,l,$,P]);return _.jsxs("div",{...S(),children:[_.jsx(bKe,{...O()}),b?F:null,_.jsxs("div",{...N(),children:[_.jsxs(n,{...A(),children:[b?null:F,_.jsxs("div",{...k(),children:[h,_.jsx("span",{...M(),children:V}),v&&a.selectedItems&&_.jsx(hKe,{elementType:"span",children:","}),v]}),Q]}),U]}),w?Z:_.jsx(fl,{children:Z})]})}),_he=cYe;function dYe(r,e){let{elementType:t="button",isDisabled:n,onPress:a,onPressStart:i,onPressEnd:o,onPressUp:s,onPressChange:l,preventFocusOnPress:u,allowFocusWhenDisabled:c,onClick:d,href:f,target:h,rel:v,type:m="button"}=r,y;t==="button"?y={type:m,disabled:n}:y={role:"button",tabIndex:n?void 0:0,href:t==="a"&&!n?f:void 0,target:t==="a"?h:void 0,type:t==="input"?m:void 0,disabled:t==="input"?n:void 0,"aria-disabled":!n||t==="input"?void 0:n,rel:t==="a"?v:void 0};let{pressProps:b,isPressed:w}=Ss({onPressStart:i,onPressEnd:o,onPressChange:l,onPress:a,onPressUp:s,isDisabled:n,preventFocusOnPress:u,ref:e}),{focusableProps:S}=L0(r,e);c&&(S.tabIndex=n?-1:S.tabIndex);let T=ze(S,b,hi(r,{labelable:!0}));return{isPressed:w,buttonProps:ze(y,T,{"aria-haspopup":r["aria-haspopup"],"aria-expanded":r["aria-expanded"],"aria-controls":r["aria-controls"],"aria-pressed":r["aria-pressed"],onClick:A=>{d&&(d(A),console.warn("onClick is deprecated, please use onPress"))}})}}function fYe(r,e,t){let{item:n,isDisabled:a}=r,i=n.key,o=e.selectionManager,s=D.useId(),l=D.useId(),u=e.disabledKeys.has(n.key)||a;D.useEffect(()=>{i===e.focusedKey&&document.activeElement!==t.current&&t.current&&nv(t.current)},[t,i,e.focusedKey]);let c=D.useCallback(m=>{o.canSelectItem(i)&&(o.select(i,m),e.toggleKey(i))},[i,o]);const d=D.useCallback(m=>{o.selectionBehavior==="replace"&&o.extendSelection(m),o.setFocusedKey(m)},[o]),f=D.useCallback(m=>{const b={ArrowDown:()=>{const w=e.collection.getKeyAfter(i);if(w&&e.disabledKeys.has(w)){const S=e.collection.getKeyAfter(w);S&&d(S)}else w&&d(w)},ArrowUp:()=>{const w=e.collection.getKeyBefore(i);if(w&&e.disabledKeys.has(w)){const S=e.collection.getKeyBefore(w);S&&d(S)}else w&&d(w)},Home:()=>{const w=e.collection.getFirstKey();w&&d(w)},End:()=>{const w=e.collection.getLastKey();w&&d(w)}}[m.key];b&&(m.preventDefault(),o.canSelectItem(i)&&b(m))},[i,o]);let{buttonProps:h}=dYe({id:s,elementType:"button",isDisabled:u,onKeyDown:f,onPress:c},t),v=e.selectionManager.isSelected(n.key);return{buttonProps:{...h,"aria-expanded":v,"aria-controls":v?l:void 0},regionProps:{id:l,role:"region","aria-labelledby":s}}}function hYe(r,e,t){let{listProps:n}=cKe({...r,...e,allowsTabNavigation:!0,disallowSelectAll:!0,ref:t});return delete n.onKeyDownCapture,{accordionProps:{...n,tabIndex:void 0}}}function pYe(r){var e,t;const n=Vr(),{ref:a,as:i,item:o,onFocusChange:s}=r,{state:l,className:u,indicator:c,children:d,title:f,subtitle:h,startContent:v,motionProps:m,focusedKey:y,variant:b,isCompact:w=!1,classNames:S={},isDisabled:T=!1,hideIndicator:A=!1,disableAnimation:M=(e=n==null?void 0:n.disableAnimation)!=null?e:!1,keepContentMounted:P=!1,disableIndicatorAnimation:E=!1,HeadingComponent:R=i||"h2",onPress:N,onPressStart:k,onPressEnd:O,onPressChange:L,onPressUp:$,onClick:j,...B}=r,H=i||"div",F=typeof H=="string",K=$r(a),U=l.disabledKeys.has(o.key)||T,V=l.selectionManager.isSelected(o.key),{buttonProps:Q,regionProps:Z}=fYe({item:o,isDisabled:U},{...l,focusedKey:y},K),{onFocus:Y,onBlur:X,...re}=Q,{isFocused:oe,isFocusVisible:ae,focusProps:se}=Rn({autoFocus:(t=o.props)==null?void 0:t.autoFocus}),{isHovered:le,hoverProps:fe}=Ia({isDisabled:U}),{pressProps:ve,isPressed:pe}=Ss({ref:K,isDisabled:U,onPress:N,onPressStart:k,onPressEnd:O,onPressChange:L,onPressUp:$}),Re=D.useCallback(()=>{s==null||s(!0,o.key)},[]),Ae=D.useCallback(()=>{s==null||s(!1,o.key)},[]),ie=D.useMemo(()=>({...S}),[eo(S)]),Se=D.useMemo(()=>tAe({isCompact:w,isDisabled:U,hideIndicator:A,disableAnimation:M,disableIndicatorAnimation:E,variant:b}),[w,U,A,M,E,b]),ee=lt(ie==null?void 0:ie.base,u),te=D.useCallback((Xe={})=>({"data-open":je(V),"data-disabled":je(U),className:Se.base({class:ee}),...ze(Pa(B,{enabled:F}),Xe)}),[ee,F,B,Se,o.props,V,U]),de=(Xe={})=>{var Ee,at;return{ref:K,"data-open":je(V),"data-focus":je(oe),"data-focus-visible":je(ae),"data-disabled":je(U),"data-hover":je(le),"data-pressed":je(pe),className:Se.trigger({class:ie==null?void 0:ie.trigger}),onFocus:xV(Re,Y,se.onFocus,B.onFocus,(Ee=o.props)==null?void 0:Ee.onFocus),onBlur:xV(Ae,X,se.onBlur,B.onBlur,(at=o.props)==null?void 0:at.onBlur),...ze(re,fe,ve,Xe,{onClick:Un(ve.onClick,j)})}},ye=D.useCallback((Xe={})=>({"data-open":je(V),"data-disabled":je(U),className:Se.content({class:ie==null?void 0:ie.content}),...ze(Z,Xe)}),[Se,ie,Z,V,U,ie==null?void 0:ie.content]),xe=D.useCallback((Xe={})=>({"aria-hidden":je(!0),"data-open":je(V),"data-disabled":je(U),className:Se.indicator({class:ie==null?void 0:ie.indicator}),...Xe}),[Se,ie==null?void 0:ie.indicator,V,U,ie==null?void 0:ie.indicator]),Te=D.useCallback((Xe={})=>({"data-open":je(V),"data-disabled":je(U),className:Se.heading({class:ie==null?void 0:ie.heading}),...Xe}),[Se,ie==null?void 0:ie.heading,V,U,ie==null?void 0:ie.heading]),ke=D.useCallback((Xe={})=>({"data-open":je(V),"data-disabled":je(U),className:Se.title({class:ie==null?void 0:ie.title}),...Xe}),[Se,ie==null?void 0:ie.title,V,U,ie==null?void 0:ie.title]),Ue=D.useCallback((Xe={})=>({"data-open":je(V),"data-disabled":je(U),className:Se.subtitle({class:ie==null?void 0:ie.subtitle}),...Xe}),[Se,ie,V,U,ie==null?void 0:ie.subtitle]);return{Component:H,HeadingComponent:R,item:o,slots:Se,classNames:ie,domRef:K,indicator:c,children:d,title:f,subtitle:h,startContent:v,isOpen:V,isDisabled:U,hideIndicator:A,keepContentMounted:P,disableAnimation:M,motionProps:m,getBaseProps:te,getHeadingProps:Te,getButtonProps:de,getContentProps:ye,getIndicatorProps:xe,getTitleProps:ke,getSubtitleProps:Ue}}var UY=()=>Jc(()=>import("./index-Dm_gigSn.js"),[]).then(r=>r.default),Che=Ht((r,e)=>{const{Component:t,HeadingComponent:n,classNames:a,slots:i,indicator:o,children:s,title:l,subtitle:u,startContent:c,isOpen:d,isDisabled:f,hideIndicator:h,keepContentMounted:v,disableAnimation:m,motionProps:y,getBaseProps:b,getHeadingProps:w,getButtonProps:S,getTitleProps:T,getSubtitleProps:A,getContentProps:M,getIndicatorProps:P}=pYe({...r,ref:e}),E=Vwe(),N=D.useMemo(()=>typeof o=="function"?o({indicator:_.jsx(Cm,{}),isOpen:d,isDisabled:f}):o||null,[o,d,f])||_.jsx(Cm,{}),k=D.useMemo(()=>{if(m)return _.jsx("div",{...M(),children:s});const O={exit:{...jf.collapse.exit,overflowY:"hidden"},enter:{...jf.collapse.enter,overflowY:"unset"}};return v?_.jsx(Mi,{features:UY,children:_.jsx(Di.section,{animate:d?"enter":"exit",exit:"exit",initial:"exit",style:{willChange:E},variants:O,onKeyDown:L=>{L.stopPropagation()},...y,children:_.jsx("div",{...M(),children:s})},"accordion-content")}):_.jsx(fl,{initial:!1,children:d&&_.jsx(Mi,{features:UY,children:_.jsx(Di.section,{animate:"enter",exit:"exit",initial:"exit",style:{willChange:E},variants:O,onKeyDown:L=>{L.stopPropagation()},...y,children:_.jsx("div",{...M(),children:s})},"accordion-content")})})},[d,m,v,s,y]);return _.jsxs(t,{...b(),children:[_.jsx(n,{...w(),children:_.jsxs("button",{...S(),children:[c&&_.jsx("div",{className:i.startContent({class:a==null?void 0:a.startContent}),children:c}),_.jsxs("div",{className:i.titleWrapper({class:a==null?void 0:a.titleWrapper}),children:[l&&_.jsx("span",{...T(),children:l}),u&&_.jsx("span",{...A(),children:u})]}),!h&&N&&_.jsx("span",{...P(),children:N})]})}),k]})});Che.displayName="HeroUI.AccordionItem";var vYe=Che;class gYe{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let t=this.keyMap.get(e);var n;return t&&(n=t.prevKey)!==null&&n!==void 0?n:null}getKeyAfter(e){let t=this.keyMap.get(e);var n;return t&&(n=t.nextKey)!==null&&n!==void 0?n:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){var t;return(t=this.keyMap.get(e))!==null&&t!==void 0?t:null}at(e){const t=[...this.getKeys()];return this.getItem(t[e])}constructor(e,{expandedKeys:t}={}){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e,t=t||new Set;let n=s=>{if(this.keyMap.set(s.key,s),s.childNodes&&(s.type==="section"||t.has(s.key)))for(let l of s.childNodes)n(l)};for(let s of e)n(s);let a=null,i=0;for(let[s,l]of this.keyMap)a?(a.nextKey=s,l.prevKey=a.key):(this.firstKey=s,l.prevKey=void 0),l.type==="item"&&(l.index=i++),a=l,a.nextKey=void 0;var o;this.lastKey=(o=a==null?void 0:a.key)!==null&&o!==void 0?o:null}}function The(r){let{onExpandedChange:e}=r,[t,n]=bl(r.expandedKeys?new Set(r.expandedKeys):void 0,r.defaultExpandedKeys?new Set(r.defaultExpandedKeys):new Set,e),a=wO(r),i=D.useMemo(()=>r.disabledKeys?new Set(r.disabledKeys):new Set,[r.disabledKeys]),o=SO(r,D.useCallback(l=>new gYe(l,{expandedKeys:t}),[t]),null);return D.useEffect(()=>{a.focusedKey!=null&&!o.getItem(a.focusedKey)&&a.setFocusedKey(null)},[o,a.focusedKey]),{collection:o,expandedKeys:t,disabledKeys:i,toggleKey:l=>{n(mYe(t,l))},setExpandedKeys:n,selectionManager:new _O(o,a)}}function mYe(r,e){let t=new Set(r);return t.has(e)?t.delete(e):t.add(e),t}function yYe(r){var e;const t=Vr(),{ref:n,as:a,className:i,items:o,variant:s,motionProps:l,expandedKeys:u,disabledKeys:c,selectedKeys:d,children:f,defaultExpandedKeys:h,selectionMode:v="single",selectionBehavior:m="toggle",keepContentMounted:y=!1,disallowEmptySelection:b,defaultSelectedKeys:w,onExpandedChange:S,onSelectionChange:T,dividerProps:A={},isCompact:M=!1,isDisabled:P=!1,showDivider:E=!0,hideIndicator:R=!1,disableAnimation:N=(e=t==null?void 0:t.disableAnimation)!=null?e:!1,disableIndicatorAnimation:k=!1,itemClasses:O,...L}=r,[$,j]=D.useState(null),B=a||"div",H=typeof B=="string",F=$r(n),K=D.useMemo(()=>eAe({variant:s,className:i}),[s,i]),V={children:D.useMemo(()=>{let se=[];return Be.Children.map(f,le=>{var fe;if(Be.isValidElement(le)&&typeof((fe=le.props)==null?void 0:fe.children)!="string"){const ve=Be.cloneElement(le,{hasChildItems:!1});se.push(ve)}else se.push(le)}),se},[f]),items:o},Q={expandedKeys:u,defaultExpandedKeys:h,onExpandedChange:S},Z={disabledKeys:c,selectedKeys:d,selectionMode:v,selectionBehavior:m,disallowEmptySelection:b,defaultSelectedKeys:w??h,onSelectionChange:T,...V,...Q},Y=The(Z);Y.selectionManager.setFocusedKey=se=>{j(se)};const{accordionProps:X}=hYe({...V,...Q},Y,F),re=D.useMemo(()=>({state:Y,focusedKey:$,motionProps:l,isCompact:M,isDisabled:P,hideIndicator:R,disableAnimation:N,keepContentMounted:y,disableIndicatorAnimation:k}),[$,M,P,R,d,N,y,Y==null?void 0:Y.expandedKeys.values,k,Y.expandedKeys.size,Y.disabledKeys.size,l]),oe=D.useCallback((se={})=>({ref:F,className:K,"data-orientation":"vertical",...ze(X,Pa(L,{enabled:H}),se)}),[]),ae=D.useCallback((se,le)=>{se&&j(le)},[]);return{Component:B,values:re,state:Y,focusedKey:$,getBaseProps:oe,isSplitted:s==="splitted",classNames:K,showDivider:E,dividerProps:A,disableAnimation:N,handleFocusChanged:ae,itemClasses:O}}var Ahe=Ht((r,e)=>{const{Component:t,values:n,state:a,isSplitted:i,showDivider:o,getBaseProps:s,disableAnimation:l,handleFocusChanged:u,itemClasses:c,dividerProps:d}=yYe({...r,ref:e}),f=D.useCallback((v,m)=>u(v,m),[u]),h=D.useMemo(()=>[...a.collection].map((v,m)=>{const y={...c,...v.props.classNames||{}};return _.jsxs(D.Fragment,{children:[_.jsx(vYe,{item:v,variant:r.variant,onFocusChange:f,...n,...v.props,classNames:y}),!v.props.hidden&&!i&&o&&m<a.collection.size-1&&_.jsx(aw,{...d})]},v.key)}),[n,c,f,i,o,a.collection]);return _.jsx(t,{...s(),children:l?h:_.jsx(vJ,{children:h})})});Ahe.displayName="HeroUI.Accordion";var p5=Ahe,bYe=w3,v5=bYe;function Ehe({fields:r}){return r.length===0&&_.jsx("div",{className:"text-sm text-content4-foreground text-center col-span-2",children:"暂无数据,点击上方按钮添加"})}function xYe({control:r,field:e,fullPath:t,register:n}){const{fields:a,append:i,remove:o}=Gde({control:r,name:t});return _.jsxs(Fa,{children:[_.jsxs(p3,{className:"flex flex-row items-center justify-between",children:[_.jsx("h2",{children:e.label}),_.jsx(Ze,{type:"button",color:"primary",size:"sm",radius:"full",startContent:_.jsx(BR,{}),onPress:()=>i(e.defaultValue??""),children:"添加"})]}),_.jsxs(ms,{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[_.jsx(Ehe,{fields:a}),a.map((s,l)=>_.jsxs("div",{className:"flex items-center space-x-2",children:[_.jsx(Va,{type:e.elementType,...n(`${t}.${l}`),className:"flex-1"}),_.jsx(Ze,{type:"button",size:"sm",radius:"full",color:"danger",startContent:_.jsx(Zye,{}),onPress:()=>o(l),children:"删除"})]},s.id))]})]})}function wYe({control:r,field:e,fullPath:t,renderField:n}){const{fields:a,append:i,remove:o}=Gde({control:r,name:t}),s=e.fields||[];return _.jsxs(Fa,{className:"p-4",children:[_.jsxs(p3,{className:"flex flex-row items-center justify-between",children:[_.jsx("h2",{children:e.label}),_.jsx(Ze,{type:"button",color:"primary",size:"sm",radius:"full",startContent:_.jsx(BR,{}),onPress:()=>i({}),children:"添加"})]}),_.jsxs(ms,{children:[_.jsx(Ehe,{fields:a}),_.jsx(p5,{className:"mb-4 p-4 border rounded",selectionMode:"multiple",children:a.map((l,u)=>{const c=l;return _.jsxs(v5,{title:c.key??`${e.label} ${u+1}`,textValue:(e==null?void 0:e.label)??""+u,classNames:{content:"flex flex-col gap-4"},children:[s.map((d,f)=>_.jsx(Be.Fragment,{children:n(d,`${t}.${u}`)},d.key??f)),_.jsx(Ze,{type:"button",size:"sm",color:"danger",onPress:()=>o(u),className:"mt-2",children:"删除"})]},l.id)})},e.key)]})]})}const SYe=({register:r,control:e,errors:t,formConfig:n,expandedSections:a,setExpandedSections:i})=>{const o=(s,l="")=>{var f,h,v,m,y,b;const u=l?`${l}.${s.key}`:s.key,c=u,d=w=>w?_.jsx("div",{className:"text-sm text-content4-foreground mt-1",children:w}):null;switch(s.type){case"divider":return _.jsx(aw,{},c);case"title":return _.jsx("h3",{children:s.text},c);case"section":return _.jsx(p5,{selectionMode:"multiple",selectedKeys:a,onSelectionChange:w=>{if(typeof w=="string"){const S=new Set(a);S.has(s.key)?S.delete(s.key):S.add(s.key),i(S)}else i(new Set(w))},children:_.jsx(v5,{title:s.label,textValue:s.label,children:_.jsx("div",{className:"space-y-4",children:s.children.map((w,S)=>_.jsx(Be.Fragment,{children:o(w)},w.key??S))})},s.key)},c);case"text":return _.jsx(Va,{label:s.label,defaultValue:s.defaultValue,...r(u,{required:s.required}),className:"w-full",errorMessage:(h=(f=t[s.key])==null?void 0:f.message)==null?void 0:h.toString(),description:s.description},c);case"number":return _.jsx(Va,{label:s.label,type:"number",defaultValue:(v=s.defaultValue)==null?void 0:v.toString(),...r(u,{required:s.required}),className:"w-full",description:s.description},c);case"switch":return _.jsxs(_ne,{...r(u),defaultChecked:s.defaultValue,children:[_.jsx("div",{children:s.label}),d(s.description)]},c);case"checkbox":return _.jsx(Fa,{shadow:"sm",children:_.jsx(dfe,{label:s.label,defaultValue:(m=s.defaultValue)==null?void 0:m.map(String),description:s.description,children:s.options.map(w=>_.jsx(xO,{value:w.value.toString(),...r(u),children:w.label},w.value))})},c);case"radio":return _.jsx(Fa,{shadow:"sm",children:_.jsx(ms,{children:_.jsx(ife,{label:s.label,defaultValue:(b=(y=s.options[0])==null?void 0:y.value)==null?void 0:b.toString(),description:s.description,children:s.options.map(w=>_.jsx(sfe,{value:w.value.toString(),...r(u),children:w.label},w.value))})})},c);case"select":return _.jsx(_he,{label:s.label,defaultSelectedKeys:[],items:s.options,multiple:s.multiple,description:s.description,...r(u),children:w=>_.jsx(ohe,{value:w.value.toString(),children:w.label},w.value)},c);case"array":return _.jsx(xYe,{control:e,field:s,fullPath:u,register:r},u);case"objectArray":return _.jsx(wYe,{control:e,field:s,fullPath:u,renderField:o},u);case"object":return _.jsxs(Fa,{className:"p-4",children:[_.jsx(p3,{className:"flex flex-row items-center justify-between",children:_.jsxs("div",{children:[_.jsx("h2",{children:s.label}),s.description&&_.jsx("div",{className:"text-sm text-content4-foreground",children:s.description})]})}),_.jsx(ms,{className:"space-y-4",children:s.fields.map((w,S)=>_.jsx(Be.Fragment,{children:o(w,u)},w.key??S))})]},c);default:return null}};return _.jsx(_.Fragment,{children:n.map(s=>o(s))})},Mhe=new WeakMap;function fA(r,e,t){return r?(typeof e=="string"&&(e=e.replace(/\s+/g,"")),`${Mhe.get(r)}-${t}-${e}`):""}function _Ye(r,e,t){let{key:n,isDisabled:a,shouldSelectOnPressUp:i}=r,{selectionManager:o,selectedKey:s}=e,l=n===s,u=a||e.isDisabled||e.selectionManager.isDisabled(n),{itemProps:c,isPressed:d}=CO({selectionManager:o,key:n,ref:t,isDisabled:u,shouldSelectOnPressUp:i,linkBehavior:"selection"}),f=fA(e,n,"tab"),h=fA(e,n,"tabpanel"),{tabIndex:v}=c,m=e.collection.getItem(n),y=hi(m==null?void 0:m.props,{labelable:!0});delete y.id;let b=a3(m==null?void 0:m.props);return{tabProps:ze(y,b,c,{id:f,"aria-selected":l,"aria-disabled":u||void 0,"aria-controls":l?h:void 0,tabIndex:u?void 0:v,role:"tab"}),isSelected:l,isDisabled:u,isPressed:d}}function CYe(r,e,t){let n=WCe(t)?void 0:0;var a;const i=fA(e,(a=r.id)!==null&&a!==void 0?a:e==null?void 0:e.selectedKey,"tabpanel"),o=i3({...r,id:i,"aria-labelledby":fA(e,e==null?void 0:e.selectedKey,"tab")});return{tabPanelProps:ze(o,{tabIndex:n,role:"tabpanel","aria-describedby":r["aria-describedby"],"aria-details":r["aria-details"]})}}class TYe{getKeyLeftOf(e){return this.flipDirection?this.getNextKey(e):this.getPreviousKey(e)}getKeyRightOf(e){return this.flipDirection?this.getPreviousKey(e):this.getNextKey(e)}isDisabled(e){var t,n;return this.disabledKeys.has(e)||!!(!((n=this.collection.getItem(e))===null||n===void 0||(t=n.props)===null||t===void 0)&&t.isDisabled)}getFirstKey(){let e=this.collection.getFirstKey();return e!=null&&this.isDisabled(e)&&(e=this.getNextKey(e)),e}getLastKey(){let e=this.collection.getLastKey();return e!=null&&this.isDisabled(e)&&(e=this.getPreviousKey(e)),e}getKeyAbove(e){return this.tabDirection?null:this.getPreviousKey(e)}getKeyBelow(e){return this.tabDirection?null:this.getNextKey(e)}getNextKey(e){do e=this.collection.getKeyAfter(e),e==null&&(e=this.collection.getFirstKey());while(this.isDisabled(e));return e}getPreviousKey(e){do e=this.collection.getKeyBefore(e),e==null&&(e=this.collection.getLastKey());while(this.isDisabled(e));return e}constructor(e,t,n,a=new Set){this.collection=e,this.flipDirection=t==="rtl"&&n==="horizontal",this.disabledKeys=a,this.tabDirection=n==="horizontal"}}function AYe(r,e,t){let{orientation:n="horizontal",keyboardActivation:a="automatic"}=r,{collection:i,selectionManager:o,disabledKeys:s}=e,{direction:l}=Av(),u=D.useMemo(()=>new TYe(i,l,n,s),[i,s,n,l]),{collectionProps:c}=Jfe({ref:t,selectionManager:o,keyboardDelegate:u,selectOnFocus:a==="automatic",disallowEmptySelection:!0,scrollRef:t,linkBehavior:"selection"}),d=_o();Mhe.set(e,d);let f=i3({...r,id:d});return{tabListProps:{...ze(c,f),role:"tablist","aria-orientation":n,tabIndex:void 0}}}var Dhe=Ht((r,e)=>{var t,n;const{as:a,tabKey:i,destroyInactiveTabPanel:o,state:s,className:l,slots:u,classNames:c,...d}=r,f=a||"div",h=$r(e),{tabPanelProps:v}=CYe({...r,id:String(i)},s,h),{focusProps:m,isFocused:y,isFocusVisible:b}=Rn(),w=s.selectedItem,S=s.collection.getItem(i).props.children,T=lt(c==null?void 0:c.panel,l,(t=w==null?void 0:w.props)==null?void 0:t.className),A=i===(w==null?void 0:w.key);return!S||!A&&o?null:_.jsx(f,{ref:h,"data-focus":y,"data-focus-visible":b,"data-inert":A?void 0:"true",inert:h_e(!A),...A&&ze(v,m,d),className:(n=u.panel)==null?void 0:n.call(u,{class:T}),"data-slot":"panel",children:S})});Dhe.displayName="HeroUI.TabPanel";var EYe=Dhe;const GY=r=>typeof r=="object"&&r!=null&&r.nodeType===1,qY=(r,e)=>(!e||r!=="hidden")&&r!=="visible"&&r!=="clip",R_=(r,e)=>{if(r.clientHeight<r.scrollHeight||r.clientWidth<r.scrollWidth){const t=getComputedStyle(r,null);return qY(t.overflowY,e)||qY(t.overflowX,e)||(n=>{const a=(i=>{if(!i.ownerDocument||!i.ownerDocument.defaultView)return null;try{return i.ownerDocument.defaultView.frameElement}catch{return null}})(n);return!!a&&(a.clientHeight<n.scrollHeight||a.clientWidth<n.scrollWidth)})(r)}return!1},N_=(r,e,t,n,a,i,o,s)=>i<r&&o>e||i>r&&o<e?0:i<=r&&s<=t||o>=e&&s>=t?i-r-n:o>e&&s<t||i<r&&s>t?o-e+a:0,MYe=r=>{const e=r.parentElement;return e??(r.getRootNode().host||null)},QY=(r,e)=>{var t,n,a,i;if(typeof document>"u")return[];const{scrollMode:o,block:s,inline:l,boundary:u,skipOverflowHiddenElements:c}=e,d=typeof u=="function"?u:B=>B!==u;if(!GY(r))throw new TypeError("Invalid target");const f=document.scrollingElement||document.documentElement,h=[];let v=r;for(;GY(v)&&d(v);){if(v=MYe(v),v===f){h.push(v);break}v!=null&&v===document.body&&R_(v)&&!R_(document.documentElement)||v!=null&&R_(v,c)&&h.push(v)}const m=(n=(t=window.visualViewport)==null?void 0:t.width)!=null?n:innerWidth,y=(i=(a=window.visualViewport)==null?void 0:a.height)!=null?i:innerHeight,{scrollX:b,scrollY:w}=window,{height:S,width:T,top:A,right:M,bottom:P,left:E}=r.getBoundingClientRect(),{top:R,right:N,bottom:k,left:O}=(B=>{const H=window.getComputedStyle(B);return{top:parseFloat(H.scrollMarginTop)||0,right:parseFloat(H.scrollMarginRight)||0,bottom:parseFloat(H.scrollMarginBottom)||0,left:parseFloat(H.scrollMarginLeft)||0}})(r);let L=s==="start"||s==="nearest"?A-R:s==="end"?P+k:A+S/2-R+k,$=l==="center"?E+T/2-O+N:l==="end"?M+N:E-O;const j=[];for(let B=0;B<h.length;B++){const H=h[B],{height:F,width:K,top:U,right:V,bottom:Q,left:Z}=H.getBoundingClientRect();if(o==="if-needed"&&A>=0&&E>=0&&P<=y&&M<=m&&(H===f&&!R_(H)||A>=U&&P<=Q&&E>=Z&&M<=V))return j;const Y=getComputedStyle(H),X=parseInt(Y.borderLeftWidth,10),re=parseInt(Y.borderTopWidth,10),oe=parseInt(Y.borderRightWidth,10),ae=parseInt(Y.borderBottomWidth,10);let se=0,le=0;const fe="offsetWidth"in H?H.offsetWidth-H.clientWidth-X-oe:0,ve="offsetHeight"in H?H.offsetHeight-H.clientHeight-re-ae:0,pe="offsetWidth"in H?H.offsetWidth===0?0:K/H.offsetWidth:0,Re="offsetHeight"in H?H.offsetHeight===0?0:F/H.offsetHeight:0;if(f===H)se=s==="start"?L:s==="end"?L-y:s==="nearest"?N_(w,w+y,y,re,ae,w+L,w+L+S,S):L-y/2,le=l==="start"?$:l==="center"?$-m/2:l==="end"?$-m:N_(b,b+m,m,X,oe,b+$,b+$+T,T),se=Math.max(0,se+w),le=Math.max(0,le+b);else{se=s==="start"?L-U-re:s==="end"?L-Q+ae+ve:s==="nearest"?N_(U,Q,F,re,ae+ve,L,L+S,S):L-(U+F/2)+ve/2,le=l==="start"?$-Z-X:l==="center"?$-(Z+K/2)+fe/2:l==="end"?$-V+oe+fe:N_(Z,V,K,X,oe+fe,$,$+T,T);const{scrollLeft:Ae,scrollTop:ie}=H;se=Re===0?0:Math.max(0,Math.min(ie+se/Re,H.scrollHeight-F/Re+ve)),le=pe===0?0:Math.max(0,Math.min(Ae+le/pe,H.scrollWidth-K/pe+fe)),L+=ie-se,$+=Ae-le}j.push({el:H,top:se,left:le})}return j},DYe=r=>r===!1?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&Object.keys(e).length!==0)(r)?r:{block:"start",inline:"nearest"};function Lhe(r,e){if(!r.isConnected||!(n=>{let a=n;for(;a&&a.parentNode;){if(a.parentNode===document)return!0;a=a.parentNode instanceof ShadowRoot?a.parentNode.host:a.parentNode}return!1})(r))return;if((n=>typeof n=="object"&&typeof n.behavior=="function")(e))return e.behavior(QY(r,e));const t=typeof e=="boolean"||e==null?void 0:e.behavior;for(const{el:n,top:a,left:i}of QY(r,DYe(e)))n.scroll({top:a,left:i,behavior:t})}function LYe(r={}){const{rerender:e=!1,delay:t=0}=r,n=D.useRef(!1),[a,i]=D.useState(!1);return D.useEffect(()=>{n.current=!0;let o=null;return e&&(t>0?o=setTimeout(()=>{i(!0)},t):i(!0)),()=>{n.current=!1,e&&i(!1),o&&clearTimeout(o)}},[e]),[D.useCallback(()=>n.current,[]),a]}var Phe=Ht((r,e)=>{var t;const{className:n,as:a,item:i,state:o,classNames:s,isDisabled:l,listRef:u,slots:c,motionProps:d,disableAnimation:f,disableCursorAnimation:h,shouldSelectOnPressUp:v,onClick:m,tabRef:y,...b}=r,{key:w}=i,S=$r(e),T=a||(r.href?"a":"button"),A=typeof T=="string",{tabProps:M,isSelected:P,isDisabled:E,isPressed:R}=_Ye({key:w,isDisabled:l,shouldSelectOnPressUp:v},o,S);r.children==null&&delete M["aria-controls"];const N=l||E,{focusProps:k,isFocused:O,isFocusVisible:L}=Rn(),{hoverProps:$,isHovered:j}=Ia({isDisabled:N}),B=lt(s==null?void 0:s.tab,n),[,H]=LYe({rerender:!0}),F=()=>{Un(m,M.onClick),!(!(S!=null&&S.current)||!(u!=null&&u.current))&&Lhe(S.current,{scrollMode:"if-needed",behavior:"smooth",block:"end",inline:"end",boundary:u==null?void 0:u.current})};return _.jsxs(T,{ref:A8(S,y),"data-disabled":je(E),"data-focus":je(O),"data-focus-visible":je(L),"data-hover":je(j),"data-hover-unselected":je((j||R)&&!P),"data-pressed":je(R),"data-selected":je(P),"data-slot":"tab",...ze(M,N?{}:{...k,...$},Pa(b,{enabled:A,omitPropNames:new Set(["title"])}),{onClick:F}),className:(t=c.tab)==null?void 0:t.call(c,{class:B}),title:b==null?void 0:b.titleValue,type:T==="button"?"button":void 0,children:[P&&!f&&!h&&H?_.jsx(Mi,{features:zwe,children:_.jsx(Di.span,{className:c.cursor({class:s==null?void 0:s.cursor}),"data-slot":"cursor",layoutDependency:!1,layoutId:"cursor",transition:{type:"spring",bounce:.15,duration:.5},...d})}):null,_.jsx("div",{className:c.tabContent({class:s==null?void 0:s.tabContent}),"data-slot":"tabContent",children:i.rendered})]})});Phe.displayName="HeroUI.Tab";var PYe=Phe;class WY{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let t=this.keyMap.get(e);var n;return t&&(n=t.prevKey)!==null&&n!==void 0?n:null}getKeyAfter(e){let t=this.keyMap.get(e);var n;return t&&(n=t.nextKey)!==null&&n!==void 0?n:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){var t;return(t=this.keyMap.get(e))!==null&&t!==void 0?t:null}at(e){const t=[...this.getKeys()];return this.getItem(t[e])}getChildren(e){let t=this.keyMap.get(e);return(t==null?void 0:t.childNodes)||[]}constructor(e){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e;let t=o=>{if(this.keyMap.set(o.key,o),o.childNodes&&o.type==="section")for(let s of o.childNodes)t(s)};for(let o of e)t(o);let n=null,a=0;for(let[o,s]of this.keyMap)n?(n.nextKey=o,s.prevKey=n.key):(this.firstKey=o,s.prevKey=void 0),s.type==="item"&&(s.index=a++),n=s,n.nextKey=void 0;var i;this.lastKey=(i=n==null?void 0:n.key)!==null&&i!==void 0?i:null}}function IYe(r){let{filter:e,layoutDelegate:t}=r,n=wO(r),a=D.useMemo(()=>r.disabledKeys?new Set(r.disabledKeys):new Set,[r.disabledKeys]),i=D.useCallback(c=>e?new WY(e(c)):new WY(c),[e]),o=D.useMemo(()=>({suppressTextValueWarning:r.suppressTextValueWarning}),[r.suppressTextValueWarning]),s=SO(r,i,o),l=D.useMemo(()=>new _O(s,n,{layoutDelegate:t}),[s,n,t]);const u=D.useRef(null);return D.useEffect(()=>{if(n.focusedKey!=null&&!s.getItem(n.focusedKey)&&u.current){const b=u.current.getItem(n.focusedKey),w=[...u.current.getKeys()].map(E=>{const R=u.current.getItem(E);return(R==null?void 0:R.type)==="item"?R:null}).filter(E=>E!==null),S=[...s.getKeys()].map(E=>{const R=s.getItem(E);return(R==null?void 0:R.type)==="item"?R:null}).filter(E=>E!==null);var c,d;const T=((c=w==null?void 0:w.length)!==null&&c!==void 0?c:0)-((d=S==null?void 0:S.length)!==null&&d!==void 0?d:0);var f,h,v;let A=Math.min(T>1?Math.max(((f=b==null?void 0:b.index)!==null&&f!==void 0?f:0)-T+1,0):(h=b==null?void 0:b.index)!==null&&h!==void 0?h:0,((v=S==null?void 0:S.length)!==null&&v!==void 0?v:0)-1),M=null,P=!1;for(;A>=0;){if(!l.isDisabled(S[A].key)){M=S[A];break}if(A<S.length-1&&!P)A++;else{P=!0;var m,y;A>((m=b==null?void 0:b.index)!==null&&m!==void 0?m:0)&&(A=(y=b==null?void 0:b.index)!==null&&y!==void 0?y:0),A--}}n.setFocusedKey(M?M.key:null)}u.current=s},[s,l,n,n.focusedKey]),{collection:s,disabledKeys:a,selectionManager:l}}function kYe(r){var e;let[t,n]=bl(r.selectedKey,(e=r.defaultSelectedKey)!==null&&e!==void 0?e:null,r.onSelectionChange),a=D.useMemo(()=>t!=null?[t]:[],[t]),{collection:i,disabledKeys:o,selectionManager:s}=IYe({...r,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:a,onSelectionChange:u=>{if(u==="all")return;var c;let d=(c=u.values().next().value)!==null&&c!==void 0?c:null;d===t&&r.onSelectionChange&&r.onSelectionChange(d),n(d)}}),l=t!=null?i.getItem(t):null;return{collection:i,disabledKeys:o,selectionManager:s,selectedKey:t,setSelectedKey:n,selectedItem:l}}function RYe(r){var e,t;let n=kYe({...r,suppressTextValueWarning:!0,defaultSelectedKey:(t=(e=r.defaultSelectedKey)!==null&&e!==void 0?e:KY(r.collection,r.disabledKeys?new Set(r.disabledKeys):new Set))!==null&&t!==void 0?t:void 0}),{selectionManager:a,collection:i,selectedKey:o}=n,s=D.useRef(o);return D.useEffect(()=>{let l=o;(a.isEmpty||l==null||!i.getItem(l))&&(l=KY(i,n.disabledKeys),l!=null&&a.setSelectedKeys([l])),(l!=null&&a.focusedKey==null||!a.isFocused&&l!==s.current)&&a.setFocusedKey(l),s.current=l}),{...n,isDisabled:r.isDisabled||!1}}function KY(r,e){let t=null;if(r){var n,a,i,o;for(t=r.getFirstKey();t!=null&&(e.has(t)||!((a=r.getItem(t))===null||a===void 0||(n=a.props)===null||n===void 0)&&n.isDisabled)&&t!==r.getLastKey();)t=r.getKeyAfter(t);t!=null&&(e.has(t)||!((o=r.getItem(t))===null||o===void 0||(i=o.props)===null||i===void 0)&&i.isDisabled)&&t===r.getLastKey()&&(t=r.getFirstKey())}return t}function NYe(r){var e,t,n;const a=Vr(),[i,o]=oa(r,nF.variantKeys),{ref:s,as:l,className:u,classNames:c,children:d,disableCursorAnimation:f,motionProps:h,isVertical:v=!1,shouldSelectOnPressUp:m=!0,destroyInactiveTabPanel:y=!0,...b}=i,w=l||"div",S=typeof w=="string",T=$r(s),A=(t=(e=r==null?void 0:r.disableAnimation)!=null?e:a==null?void 0:a.disableAnimation)!=null?t:!1,M=RYe({children:d,...b}),{tabListProps:P}=AYe(b,M,T),E=D.useMemo(()=>nF({...o,className:u,disableAnimation:A,...v?{placement:"start"}:{}}),[eo(o),u,A,v]),R=lt(c==null?void 0:c.base,u),N=D.useMemo(()=>({state:M,slots:E,classNames:c,motionProps:h,disableAnimation:A,listRef:T,shouldSelectOnPressUp:m,disableCursorAnimation:f,isDisabled:r==null?void 0:r.isDisabled}),[M,E,T,h,A,f,m,r==null?void 0:r.isDisabled,c]),k=D.useCallback(j=>({"data-slot":"base",className:E.base({class:lt(R,j==null?void 0:j.className)}),...ze(Pa(b,{enabled:S}),j)}),[R,b,E]),O=(n=o.placement)!=null?n:v?"start":"top",L=D.useCallback(j=>({"data-slot":"tabWrapper",className:E.wrapper({class:lt(c==null?void 0:c.wrapper,j==null?void 0:j.className)}),"data-placement":O,"data-vertical":v||O==="start"||O==="end"?"vertical":"horizontal"}),[c,E,O,v]),$=D.useCallback(j=>({ref:T,"data-slot":"tabList",className:E.tabList({class:lt(c==null?void 0:c.tabList,j==null?void 0:j.className)}),...ze(P,j)}),[T,P,c,E]);return{Component:w,domRef:T,state:M,values:N,destroyInactiveTabPanel:y,getBaseProps:k,getTabListProps:$,getWrapperProps:L}}var OYe=Ht(function(e,t){const{Component:n,values:a,state:i,destroyInactiveTabPanel:o,getBaseProps:s,getTabListProps:l,getWrapperProps:u}=NYe({...e,ref:t}),c=D.useId(),d=!e.disableAnimation&&!e.disableCursorAnimation,f={state:i,listRef:a.listRef,slots:a.slots,classNames:a.classNames,isDisabled:a.isDisabled,motionProps:a.motionProps,disableAnimation:a.disableAnimation,shouldSelectOnPressUp:a.shouldSelectOnPressUp,disableCursorAnimation:a.disableCursorAnimation},h=[...i.collection].map(m=>_.jsx(PYe,{item:m,...f,...m.props},m.key)),v=_.jsxs(_.Fragment,{children:[_.jsx("div",{...s(),children:_.jsx(n,{...l(),children:d?_.jsx(vJ,{id:c,children:h}):h})}),[...i.collection].map(m=>_.jsx(EYe,{classNames:a.classNames,destroyInactiveTabPanel:o,slots:a.slots,state:a.state,tabKey:m.key},m.key))]});return"placement"in e||"isVertical"in e?_.jsx("div",{...u(),children:v}):v}),Ihe=OYe,$Ye=w3,Hl=$Ye;const zYe=()=>{const{register:r,control:e,handleSubmit:t,formState:{errors:n},reset:a}=vO(),[i,o]=D.useState([]),[s,l]=D.useState("config"),[u,c]=D.useState(!1),[d,f]=D.useState(new Set),[h,v]=D.useState(!1),m=async()=>{try{const w=await or.serverPost("/api/v1/config/get",{type:s.toString()});o(w.struct),v(w.struct.some(T=>T.type==="section"));const S=w.struct.filter(T=>T.type==="section").map(T=>T.key);f(new Set(S)),a(w.value)}catch(w){console.error("获取配置失败:",w),Da.error("获取配置失败")}};D.useEffect(()=>{m()},[s,a]);const y=async w=>{if(Object.keys(w).length===0){Da.error("表单数据不能为空");return}c(!0);try{await or.serverPost("/api/v1/config/set",{type:s.toString(),data:w}),Da.success("保存配置成功"),m()}catch(S){console.error("保存配置失败:",S),Da.error("保存配置失败")}finally{c(!1)}},b=()=>{if(d.size>0)f(new Set);else{const w=i.filter(S=>S.type==="section").map(S=>S.key);f(new Set(w))}};return _.jsxs("section",{className:"pt-20 md:pt-8",children:[_.jsxs("div",{className:"max-w-2xl mx-auto flex items-center sticky top-0 z-20 bg-content1 rounded-b-3xl bg-opacity-50 backdrop-blur-md py-4 px-2 overflow-hidden mb-4 gap-2",children:[_.jsxs(Ihe,{className:"w-auto flex flex-shrink flex-grow overflow-x-auto",selectedKey:s,onSelectionChange:l,radius:"full",children:[_.jsx(Hl,{title:"基础配置"},"config"),_.jsx(Hl,{title:"适配器"},"adapter"),_.jsx(Hl,{title:"群聊和频道"},"groups"),_.jsx(Hl,{title:"好友和频道私信"},"privates"),_.jsx(Hl,{title:"渲染配置"},"render"),_.jsx(Hl,{title:"pm2配置"},"pm2"),_.jsx(Hl,{title:"redis配置"},"redis"),_.jsx(Hl,{title:"环境变量"},"env")]}),_.jsxs("div",{className:"flex gap-2 ml-auto flex-grow-0 flex-shrink-0 items-center",children:[h&&_.jsx(Ze,{color:d.size>0?"primary":"default",startContent:_.jsx(n1e,{}),radius:"full",size:"sm",variant:"flat",onPress:b,children:d.size>0?"全部折叠":"全部展开"}),_.jsx(Ze,{color:"primary",startContent:_.jsx(e1e,{}),isLoading:u,radius:"full",onPress:()=>t(y)(),children:"保存"})]})]}),i.length===0?_.jsx("div",{className:"max-w-2xl mx-auto flex items-center justify-center h-96",children:_.jsx(ey,{className:"mx-auto"})}):_.jsx("form",{onSubmit:t(y),className:"max-w-2xl mx-auto flex flex-col gap-4 px-2 pb-10",children:_.jsx(SYe,{register:r,control:e,errors:n,formConfig:i,expandedSections:d,setExpandedSections:f})})]})};var gb={exports:{}};gb.exports;var YY;function MO(){return YY||(YY=1,function(r,e){var t=200,n="__lodash_hash_undefined__",a=1,i=2,o=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",c="[object Boolean]",d="[object Date]",f="[object Error]",h="[object Function]",v="[object GeneratorFunction]",m="[object Map]",y="[object Number]",b="[object Null]",w="[object Object]",S="[object Promise]",T="[object Proxy]",A="[object RegExp]",M="[object Set]",P="[object String]",E="[object Symbol]",R="[object Undefined]",N="[object WeakMap]",k="[object ArrayBuffer]",O="[object DataView]",L="[object Float32Array]",$="[object Float64Array]",j="[object Int8Array]",B="[object Int16Array]",H="[object Int32Array]",F="[object Uint8Array]",K="[object Uint8ClampedArray]",U="[object Uint16Array]",V="[object Uint32Array]",Q=/[\\^$.*+?()[\]{}|]/g,Z=/^\[object .+?Constructor\]$/,Y=/^(?:0|[1-9]\d*)$/,X={};X[L]=X[$]=X[j]=X[B]=X[H]=X[F]=X[K]=X[U]=X[V]=!0,X[s]=X[l]=X[k]=X[c]=X[O]=X[d]=X[f]=X[h]=X[m]=X[y]=X[w]=X[A]=X[M]=X[P]=X[N]=!1;var re=typeof fs=="object"&&fs&&fs.Object===Object&&fs,oe=typeof self=="object"&&self&&self.Object===Object&&self,ae=re||oe||Function("return this")(),se=e&&!e.nodeType&&e,le=se&&!0&&r&&!r.nodeType&&r,fe=le&&le.exports===se,ve=fe&&re.process,pe=function(){try{return ve&&ve.binding&&ve.binding("util")}catch{}}(),Re=pe&&pe.isTypedArray;function Ae(G,J){for(var ce=-1,Ie=G==null?0:G.length,It=0,xt=[];++ce<Ie;){var cr=G[ce];J(cr,ce,G)&&(xt[It++]=cr)}return xt}function ie(G,J){for(var ce=-1,Ie=J.length,It=G.length;++ce<Ie;)G[It+ce]=J[ce];return G}function Se(G,J){for(var ce=-1,Ie=G==null?0:G.length;++ce<Ie;)if(J(G[ce],ce,G))return!0;return!1}function ee(G,J){for(var ce=-1,Ie=Array(G);++ce<G;)Ie[ce]=J(ce);return Ie}function te(G){return function(J){return G(J)}}function de(G,J){return G.has(J)}function ye(G,J){return G==null?void 0:G[J]}function xe(G){var J=-1,ce=Array(G.size);return G.forEach(function(Ie,It){ce[++J]=[It,Ie]}),ce}function Te(G,J){return function(ce){return G(J(ce))}}function ke(G){var J=-1,ce=Array(G.size);return G.forEach(function(Ie){ce[++J]=Ie}),ce}var Ue=Array.prototype,Xe=Function.prototype,Ee=Object.prototype,at=ae["__core-js_shared__"],$t=Xe.toString,jt=Ee.hasOwnProperty,wr=function(){var G=/[^.]+$/.exec(at&&at.keys&&at.keys.IE_PROTO||"");return G?"Symbol(src)_1."+G:""}(),Sr=Ee.toString,Ar=RegExp("^"+$t.call(jt).replace(Q,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Pt=fe?ae.Buffer:void 0,_n=ae.Symbol,Nr=ae.Uint8Array,ur=Ee.propertyIsEnumerable,Pr=Ue.splice,hn=_n?_n.toStringTag:void 0,Wn=Object.getOwnPropertySymbols,pn=Pt?Pt.isBuffer:void 0,sa=Te(Object.keys,Object),Nn=Ka(ae,"DataView"),Jt=Ka(ae,"Map"),Cn=Ka(ae,"Promise"),St=Ka(ae,"Set"),_r=Ka(ae,"WeakMap"),Ir=Ka(Object,"create"),Yr=ua(Nn),pr=ua(Jt),qr=ua(Cn),Kn=ua(St),Yn=ua(_r),xa=_n?_n.prototype:void 0,Et=xa?xa.valueOf:void 0;function Qr(G){var J=-1,ce=G==null?0:G.length;for(this.clear();++J<ce;){var Ie=G[J];this.set(Ie[0],Ie[1])}}function Oi(){this.__data__=Ir?Ir(null):{},this.size=0}function Tn(G){var J=this.has(G)&&delete this.__data__[G];return this.size-=J?1:0,J}function Zn(G){var J=this.__data__;if(Ir){var ce=J[G];return ce===n?void 0:ce}return jt.call(J,G)?J[G]:void 0}function Eo(G){var J=this.__data__;return Ir?J[G]!==void 0:jt.call(J,G)}function Eu(G,J){var ce=this.__data__;return this.size+=this.has(G)?0:1,ce[G]=Ir&&J===void 0?n:J,this}Qr.prototype.clear=Oi,Qr.prototype.delete=Tn,Qr.prototype.get=Zn,Qr.prototype.has=Eo,Qr.prototype.set=Eu;function Xn(G){var J=-1,ce=G==null?0:G.length;for(this.clear();++J<ce;){var Ie=G[J];this.set(Ie[0],Ie[1])}}function uh(){this.__data__=[],this.size=0}function tt(G){var J=this.__data__,ce=la(J,G);if(ce<0)return!1;var Ie=J.length-1;return ce==Ie?J.pop():Pr.call(J,ce,1),--this.size,!0}function An(G){var J=this.__data__,ce=la(J,G);return ce<0?void 0:J[ce][1]}function Ds(G){return la(this.__data__,G)>-1}function wa(G,J){var ce=this.__data__,Ie=la(ce,G);return Ie<0?(++this.size,ce.push([G,J])):ce[Ie][1]=J,this}Xn.prototype.clear=uh,Xn.prototype.delete=tt,Xn.prototype.get=An,Xn.prototype.has=Ds,Xn.prototype.set=wa;function vn(G){var J=-1,ce=G==null?0:G.length;for(this.clear();++J<ce;){var Ie=G[J];this.set(Ie[0],Ie[1])}}function Mu(){this.size=0,this.__data__={hash:new Qr,map:new(Jt||Xn),string:new Qr}}function Al(G){var J=zi(this,G).delete(G);return this.size-=J?1:0,J}function En(G){return zi(this,G).get(G)}function qv(G){return zi(this,G).has(G)}function Qv(G,J){var ce=zi(this,G),Ie=ce.size;return ce.set(G,J),this.size+=ce.size==Ie?0:1,this}vn.prototype.clear=Mu,vn.prototype.delete=Al,vn.prototype.get=En,vn.prototype.has=qv,vn.prototype.set=Qv;function $i(G){var J=-1,ce=G==null?0:G.length;for(this.__data__=new vn;++J<ce;)this.add(G[J])}function Ls(G){return this.__data__.set(G,n),this}function Qa(G){return this.__data__.has(G)}$i.prototype.add=$i.prototype.push=Ls,$i.prototype.has=Qa;function Mo(G){var J=this.__data__=new Xn(G);this.size=J.size}function id(){this.__data__=new Xn,this.size=0}function Wv(G){var J=this.__data__,ce=J.delete(G);return this.size=J.size,ce}function ny(G){return this.__data__.get(G)}function od(G){return this.__data__.has(G)}function sd(G,J){var ce=this.__data__;if(ce instanceof Xn){var Ie=ce.__data__;if(!Jt||Ie.length<t-1)return Ie.push([G,J]),this.size=++ce.size,this;ce=this.__data__=new vn(Ie)}return ce.set(G,J),this.size=ce.size,this}Mo.prototype.clear=id,Mo.prototype.delete=Wv,Mo.prototype.get=ny,Mo.prototype.has=od,Mo.prototype.set=sd;function to(G,J){var ce=Pu(G),Ie=!ce&&ks(G),It=!ce&&!Ie&&ku(G),xt=!ce&&!Ie&&!It&&Nu(G),cr=ce||Ie||It||xt,sr=cr?ee(G.length,String):[],Zr=sr.length;for(var vr in G)jt.call(G,vr)&&!(cr&&(vr=="length"||It&&(vr=="offset"||vr=="parent")||xt&&(vr=="buffer"||vr=="byteLength"||vr=="byteOffset")||hh(vr,Zr)))&&sr.push(vr);return sr}function la(G,J){for(var ce=G.length;ce--;)if(Is(G[ce][0],J))return ce;return-1}function ld(G,J,ce){var Ie=J(G);return Pu(G)?Ie:ie(Ie,ce(G))}function Du(G){return G==null?G===void 0?R:b:hn&&hn in Object(G)?Ps(G):fd(G)}function Lu(G){return ji(G)&&Du(G)==s}function ch(G,J,ce,Ie,It){return G===J?!0:G==null||J==null||!ji(G)&&!ji(J)?G!==G&&J!==J:ud(G,J,ce,Ie,ch,It)}function ud(G,J,ce,Ie,It,xt){var cr=Pu(G),sr=Pu(J),Zr=cr?l:ro(G),vr=sr?l:ro(J);Zr=Zr==s?w:Zr,vr=vr==s?w:vr;var ca=Zr==w,Ya=vr==w,On=Zr==vr;if(On&&ku(G)){if(!ku(J))return!1;cr=!0,ca=!1}if(On&&!ca)return xt||(xt=new Mo),cr||Nu(G)?cd(G,J,ce,Ie,It,xt):fh(G,J,Zr,ce,Ie,It,xt);if(!(ce&a)){var Sa=ca&&jt.call(G,"__wrapped__"),$n=Ya&&jt.call(J,"__wrapped__");if(Sa||$n){var Dl=Sa?G.value():G,Ns=$n?J.value():J;return xt||(xt=new Mo),It(Dl,Ns,ce,Ie,xt)}}return On?(xt||(xt=new Mo),El(G,J,ce,Ie,It,xt)):!1}function ay(G){if(!no(G)||oy(G))return!1;var J=hd(G)?Ar:Z;return J.test(ua(G))}function Wa(G){return ji(G)&&Rs(G.length)&&!!X[Du(G)]}function dh(G){if(!dd(G))return sa(G);var J=[];for(var ce in Object(G))jt.call(G,ce)&&ce!="constructor"&&J.push(ce);return J}function cd(G,J,ce,Ie,It,xt){var cr=ce&a,sr=G.length,Zr=J.length;if(sr!=Zr&&!(cr&&Zr>sr))return!1;var vr=xt.get(G);if(vr&&xt.get(J))return vr==J;var ca=-1,Ya=!0,On=ce&i?new $i:void 0;for(xt.set(G,J),xt.set(J,G);++ca<sr;){var Sa=G[ca],$n=J[ca];if(Ie)var Dl=cr?Ie($n,Sa,ca,J,G,xt):Ie(Sa,$n,ca,G,J,xt);if(Dl!==void 0){if(Dl)continue;Ya=!1;break}if(On){if(!Se(J,function(Ns,Ou){if(!de(On,Ou)&&(Sa===Ns||It(Sa,Ns,ce,Ie,xt)))return On.push(Ou)})){Ya=!1;break}}else if(!(Sa===$n||It(Sa,$n,ce,Ie,xt))){Ya=!1;break}}return xt.delete(G),xt.delete(J),Ya}function fh(G,J,ce,Ie,It,xt,cr){switch(ce){case O:if(G.byteLength!=J.byteLength||G.byteOffset!=J.byteOffset)return!1;G=G.buffer,J=J.buffer;case k:return!(G.byteLength!=J.byteLength||!xt(new Nr(G),new Nr(J)));case c:case d:case y:return Is(+G,+J);case f:return G.name==J.name&&G.message==J.message;case A:case P:return G==J+"";case m:var sr=xe;case M:var Zr=Ie&a;if(sr||(sr=ke),G.size!=J.size&&!Zr)return!1;var vr=cr.get(G);if(vr)return vr==J;Ie|=i,cr.set(G,J);var ca=cd(sr(G),sr(J),Ie,It,xt,cr);return cr.delete(G),ca;case E:if(Et)return Et.call(G)==Et.call(J)}return!1}function El(G,J,ce,Ie,It,xt){var cr=ce&a,sr=Ml(G),Zr=sr.length,vr=Ml(J),ca=vr.length;if(Zr!=ca&&!cr)return!1;for(var Ya=Zr;Ya--;){var On=sr[Ya];if(!(cr?On in J:jt.call(J,On)))return!1}var Sa=xt.get(G);if(Sa&&xt.get(J))return Sa==J;var $n=!0;xt.set(G,J),xt.set(J,G);for(var Dl=cr;++Ya<Zr;){On=sr[Ya];var Ns=G[On],Ou=J[On];if(Ie)var dw=cr?Ie(Ou,Ns,On,J,G,xt):Ie(Ns,Ou,On,G,J,xt);if(!(dw===void 0?Ns===Ou||It(Ns,Ou,ce,Ie,xt):dw)){$n=!1;break}Dl||(Dl=On=="constructor")}if($n&&!Dl){var Yv=G.constructor,ph=J.constructor;Yv!=ph&&"constructor"in G&&"constructor"in J&&!(typeof Yv=="function"&&Yv instanceof Yv&&typeof ph=="function"&&ph instanceof ph)&&($n=!1)}return xt.delete(G),xt.delete(J),$n}function Ml(G){return ld(G,pd,Kv)}function zi(G,J){var ce=G.__data__;return iy(J)?ce[typeof J=="string"?"string":"hash"]:ce.map}function Ka(G,J){var ce=ye(G,J);return ay(ce)?ce:void 0}function Ps(G){var J=jt.call(G,hn),ce=G[hn];try{G[hn]=void 0;var Ie=!0}catch{}var It=Sr.call(G);return Ie&&(J?G[hn]=ce:delete G[hn]),It}var Kv=Wn?function(G){return G==null?[]:(G=Object(G),Ae(Wn(G),function(J){return ur.call(G,J)}))}:vd,ro=Du;(Nn&&ro(new Nn(new ArrayBuffer(1)))!=O||Jt&&ro(new Jt)!=m||Cn&&ro(Cn.resolve())!=S||St&&ro(new St)!=M||_r&&ro(new _r)!=N)&&(ro=function(G){var J=Du(G),ce=J==w?G.constructor:void 0,Ie=ce?ua(ce):"";if(Ie)switch(Ie){case Yr:return O;case pr:return m;case qr:return S;case Kn:return M;case Yn:return N}return J});function hh(G,J){return J=J??o,!!J&&(typeof G=="number"||Y.test(G))&&G>-1&&G%1==0&&G<J}function iy(G){var J=typeof G;return J=="string"||J=="number"||J=="symbol"||J=="boolean"?G!=="__proto__":G===null}function oy(G){return!!wr&&wr in G}function dd(G){var J=G&&G.constructor,ce=typeof J=="function"&&J.prototype||Ee;return G===ce}function fd(G){return Sr.call(G)}function ua(G){if(G!=null){try{return $t.call(G)}catch{}try{return G+""}catch{}}return""}function Is(G,J){return G===J||G!==G&&J!==J}var ks=Lu(function(){return arguments}())?Lu:function(G){return ji(G)&&jt.call(G,"callee")&&!ur.call(G,"callee")},Pu=Array.isArray;function Iu(G){return G!=null&&Rs(G.length)&&!hd(G)}var ku=pn||gd;function Ru(G,J){return ch(G,J)}function hd(G){if(!no(G))return!1;var J=Du(G);return J==h||J==v||J==u||J==T}function Rs(G){return typeof G=="number"&&G>-1&&G%1==0&&G<=o}function no(G){var J=typeof G;return G!=null&&(J=="object"||J=="function")}function ji(G){return G!=null&&typeof G=="object"}var Nu=Re?te(Re):Wa;function pd(G){return Iu(G)?to(G):dh(G)}function vd(){return[]}function gd(){return!1}r.exports=Ru}(gb,gb.exports)),gb.exports}var jYe=MO();const BYe=wu(jYe);/**
|
|
350
350
|
* @license lucide-react v0.473.0 - ISC
|
|
351
351
|
*
|
|
352
352
|
* This source code is licensed under the ISC license.
|
|
@@ -376,7 +376,7 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
376
376
|
*
|
|
377
377
|
* This source code is licensed under the ISC license.
|
|
378
378
|
* See the LICENSE file in the root directory of this source tree.
|
|
379
|
-
*/const qYe=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],QYe=Rhe("GripVertical",qYe);var Nhe=Ht((r,e)=>{const{as:t,activePage:n,...a}=r,i=t||"span",o=$r(e);return _.jsx(i,{ref:o,"aria-hidden":!0,...a,children:n})});Nhe.displayName="HeroUI.PaginationCursor";var WYe=Nhe;function KYe(r){const{as:e,ref:t,value:n,children:a,isActive:i,isDisabled:o,onPress:s,onClick:l,getAriaLabel:u,className:c,...d}=r,f=!!(r!=null&&r.href),h=e||f?"a":"li",v=typeof h=="string",m=$r(t),y=A2(),b=D.useMemo(()=>i?`${u==null?void 0:u(n)} active`:u==null?void 0:u(n),[n,i]),{isPressed:w,pressProps:S}=Ss({isDisabled:o,onPress:s}),{focusProps:T,isFocused:A,isFocusVisible:M}=Rn({}),{isHovered:P,hoverProps:E}=Ia({isDisabled:o});return{Component:h,children:a,ariaLabel:b,isFocused:A,isFocusVisible:M,getItemProps:(N={})=>({ref:m,role:"button",tabIndex:o?-1:0,"aria-label":b,"aria-current":je(i),"aria-disabled":je(o),"data-disabled":je(o),"data-active":je(i),"data-focus":je(A),"data-hover":je(P),"data-pressed":je(w),"data-focus-visible":je(M),...ze(N,S,T,E,Pa(d,{enabled:v})),className:lt(c,N.className),onClick:k=>{Un(S==null?void 0:S.onClick,l)(k),!y.isNative&&k.currentTarget instanceof HTMLAnchorElement&&k.currentTarget.href&&!k.isDefaultPrevented()&&D8(k.currentTarget,k)&&N.href&&(k.preventDefault(),y.open(k.currentTarget,k,N.href,N.routerOptions))}})}}var Ohe=Ht((r,e)=>{const{Component:t,children:n,getItemProps:a}=KYe({...r,ref:e});return _.jsx(t,{...a(),children:n})});Ohe.displayName="HeroUI.PaginationItem";var O_=Ohe,ri=(r=>(r.DOTS="dots",r.PREV="prev",r.NEXT="next",r))(ri||{});function YYe(r){const{page:e,total:t,siblings:n=1,boundaries:a=1,initialPage:i=1,showControls:o=!1,onChange:s}=r,[l,u]=D.useState(e||i),{direction:c}=t3(),d=c==="rtl",f=T=>{u(T),s&&s(T)};D.useEffect(()=>{e&&e!==l&&u(e)},[e]);const h=D.useCallback(T=>{T<=0?f(1):T>t?f(t):f(T)},[t,l,f]),v=()=>h(d?l-1:l+1),m=()=>h(d?l+1:l-1),y=()=>h(d?t:1),b=()=>h(d?1:t),w=D.useCallback(T=>o?d?["next",...T,"prev"]:["prev",...T,"next"]:T,[d,o]);return{range:D.useMemo(()=>{if(n*2+3+a*2>=t)return w(zd(1,t));const A=Math.max(l-n,a),M=Math.min(l+n,t-a),P=A>a+2,E=M<t-(a+1);if(!P&&E){const R=n*2+a+2;return w([...zd(1,R),"dots",...zd(t-(a-1),t)])}if(P&&!E){const R=a+1+2*n;return w([...zd(1,a),"dots",...zd(t-R,t)])}return w([...zd(1,a),"dots",...zd(A,M),"dots",...zd(t-a+1,t)])},[t,l,n,a,w]),activePage:l,setPage:h,next:v,previous:m,first:y,last:b}}function ZYe({threshold:r=0,root:e=null,rootMargin:t="0%",isEnabled:n=!0,freezeOnceVisible:a=!1,initialIsIntersecting:i=!1,onChange:o}={}){var s;const[l,u]=D.useState(null),[c,d]=D.useState(()=>({isIntersecting:i,entry:void 0})),f=D.useRef();f.current=o;const h=((s=c.entry)==null?void 0:s.isIntersecting)&&a;D.useEffect(()=>{if(!n||!l||!("IntersectionObserver"in window)||h)return;const y=new IntersectionObserver(b=>{const w=Array.isArray(y.thresholds)?y.thresholds:[y.thresholds];b.forEach(S=>{const T=S.isIntersecting&&w.some(A=>S.intersectionRatio>=A);d({isIntersecting:T,entry:S}),f.current&&f.current(T,S)})},{threshold:r,root:e,rootMargin:t});return y.observe(l),()=>{y.disconnect()}},[l,n,JSON.stringify(r),e,t,h,a]);const v=D.useRef(null);D.useEffect(()=>{var y;!l&&((y=c.entry)!=null&&y.target)&&!a&&!h&&v.current!==c.entry.target&&(v.current=c.entry.target,d({isIntersecting:i,entry:void 0}))},[l,c.entry,a,h,i]);const m=[u,!!c.isIntersecting,c.entry];return m.ref=m[0],m.isIntersecting=m[1],m.entry=m[2],m}var ZY=300;function XYe(r){var e,t,n,a;const i=Vr(),[o,s]=oa(r,uF.variantKeys),{as:l,ref:u,classNames:c,dotsJump:d=5,loop:f=!1,showControls:h=!1,total:v=1,initialPage:m=1,page:y,siblings:b,boundaries:w,onChange:S,className:T,renderItem:A,getItemAriaLabel:M,...P}=o,E=l||"nav",R=$r(u),N=D.useRef(null),k=D.useRef(),O=D.useRef(),{direction:L}=t3(),$=L==="rtl",j=(t=(e=r==null?void 0:r.disableAnimation)!=null?e:i==null?void 0:i.disableAnimation)!=null?t:!1,B=(a=(n=r==null?void 0:r.disableCursorAnimation)!=null?n:j)!=null?a:!1;function H(){return k.current||(k.current=new Map),k.current}function F(te,de){const ye=H();te?ye.set(de,te):ye.delete(de)}function K(te,de){const xe=H().get(te);if(!xe||!N.current)return;O.current&&clearTimeout(O.current),Lhe(xe,{scrollMode:"always",behavior:"smooth",block:"start",inline:"start",boundary:R.current});const{offsetLeft:Te}=xe;if(de){N.current.setAttribute("data-moving","false"),N.current.style.transform=`translateX(${Te}px) scale(1)`;return}N.current.setAttribute("data-moving","true"),N.current.style.transform=`translateX(${Te}px) scale(1.1)`,O.current=setTimeout(()=>{N.current&&(N.current.style.transform=`translateX(${Te}px) scale(1)`),O.current=setTimeout(()=>{var ke;(ke=N.current)==null||ke.setAttribute("data-moving","false"),O.current&&clearTimeout(O.current)},ZY)},ZY)}const{range:U,activePage:V,setPage:Q,previous:Z,next:Y,first:X,last:re}=YYe({page:y,total:v,initialPage:m,siblings:b,boundaries:w,showControls:h,onChange:S}),[oe,ae]=ZYe();D.useEffect(()=>{R.current&&oe(R.current)},[R.current]);const se=D.useRef(V);D.useEffect(()=>{V&&!j&&ae&&K(V,V===se.current),se.current=V},[V,j,B,ae,r.dotsJump,r.isCompact,r.showControls]);const le=D.useMemo(()=>uF({...s,disableAnimation:j,disableCursorAnimation:B}),[eo(s),B,j]),fe=lt(c==null?void 0:c.base,T);return{Component:E,showControls:h,dotsJump:d,slots:le,classNames:c,loop:f,total:v,range:U,activePage:V,getItemRef:F,disableAnimation:j,disableCursorAnimation:B,setPage:Q,onPrevious:()=>f&&V===($?v:1)?re():Z(),onNext:()=>f&&V===($?1:v)?X():Y(),renderItem:A,getBaseProps:(te={})=>({...te,ref:R,role:"navigation","aria-label":te["aria-label"]||"pagination navigation","data-slot":"base","data-controls":je(h),"data-loop":je(f),"data-dots-jump":d,"data-total":v,"data-active-page":V,className:le.base({class:lt(fe,te==null?void 0:te.className)}),...P}),getWrapperProps:(te={})=>({...te,"data-slot":"wrapper",className:le.wrapper({class:lt(c==null?void 0:c.wrapper,te==null?void 0:te.className)})}),getItemProps:(te={})=>({...te,ref:de=>F(de,te.value),"data-slot":"item",isActive:te.value===V,className:le.item({class:lt(c==null?void 0:c.item,te==null?void 0:te.className)}),onPress:()=>{te.value!==V&&Q(te.value)}}),getCursorProps:(te={})=>({...te,ref:N,activePage:V,"data-slot":"cursor",className:le.cursor({class:lt(c==null?void 0:c.cursor,te==null?void 0:te.className)})}),getItemAriaLabel:te=>{if(te){if(M)return M(te);switch(te){case ri.DOTS:return"dots element";case ri.PREV:return"previous page button";case ri.NEXT:return"next page button";case"first":return"first page button";case"last":return"last page button";default:return`pagination item ${te}`}}}}}var $he=Ht((r,e)=>{const{Component:t,dotsJump:n,slots:a,classNames:i,total:o,range:s,loop:l,activePage:u,disableCursorAnimation:c,disableAnimation:d,renderItem:f,onNext:h,onPrevious:v,setPage:m,getItemAriaLabel:y,getItemRef:b,getBaseProps:w,getWrapperProps:S,getItemProps:T,getCursorProps:A}=XYe({...r,ref:e}),{direction:M}=t3(),P=M==="rtl",E=D.useCallback((R,N)=>{const k=N<s.indexOf(u);if(f&&typeof f=="function"){let O=typeof R=="number"?R:N;R===ri.NEXT&&(O=u+1),R===ri.PREV&&(O=u-1),R===ri.DOTS&&(O=k?u-n>=1?u-n:1:u+n<=o?u+n:o);const L={[ri.PREV]:_.jsx(Cm,{}),[ri.NEXT]:_.jsx(Cm,{className:a.chevronNext({class:i==null?void 0:i.chevronNext})}),[ri.DOTS]:_.jsxs(_.Fragment,{children:[_.jsx(pH,{className:a==null?void 0:a.ellipsis({class:i==null?void 0:i.ellipsis})}),_.jsx(hH,{className:a==null?void 0:a.forwardIcon({class:i==null?void 0:i.forwardIcon}),"data-before":je(k)})]})};return f({value:R,index:N,key:`${R}-${N}`,page:O,total:o,children:typeof R=="number"?R:L[R],activePage:u,dotsJump:n,isBefore:k,isActive:R===u,isPrevious:R===u-1,isNext:R===u+1,isFirst:R===1,isLast:R===o,onNext:h,onPrevious:v,setPage:m,onPress:()=>m(O),ref:typeof R=="number"?$=>b($,R):void 0,className:a.item({class:i==null?void 0:i.item}),getAriaLabel:y})}return R===ri.PREV?_.jsx(O_,{className:a.prev({class:i==null?void 0:i.prev}),"data-slot":"prev",getAriaLabel:y,isDisabled:!l&&u===(P?o:1),value:R,onPress:v,children:_.jsx(Cm,{})},ri.PREV):R===ri.NEXT?_.jsx(O_,{className:a.next({class:lt(i==null?void 0:i.next)}),"data-slot":"next",getAriaLabel:y,isDisabled:!l&&u===(P?1:o),value:R,onPress:h,children:_.jsx(Cm,{className:a.chevronNext({class:i==null?void 0:i.chevronNext})})},ri.NEXT):R===ri.DOTS?_.jsxs(O_,{className:a.item({class:lt(i==null?void 0:i.item,"group")}),"data-slot":"item",getAriaLabel:y,value:R,onPress:()=>m(k?u-n>=1?u-n:1:u+n<=o?u+n:o),children:[_.jsx(pH,{className:a==null?void 0:a.ellipsis({class:i==null?void 0:i.ellipsis})}),_.jsx(hH,{className:a==null?void 0:a.forwardIcon({class:i==null?void 0:i.forwardIcon}),"data-before":je(P?!k:k)})]},ri.DOTS+k):D.createElement(O_,{...T({value:R}),key:R,getAriaLabel:y},R)},[P,u,n,T,l,s,f,a,i,o]);return _.jsx(t,{...w(),children:_.jsxs("ul",{...S(),children:[!c&&!d&&_.jsx(WYe,{...A()}),s.map(E)]})})});$he.displayName="HeroUI.Pagination";var JYe=$he;function eZe(r){return rt({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M5.821 4.91c3.899 -2.765 9.468 -2.539 13.073 .535c3.667 3.129 4.168 8.238 1.152 11.898c-2.841 3.447 -7.965 4.583 -12.231 2.805l-.233 -.101l-4.374 .931l-.04 .006l-.035 .007h-.018l-.022 .005h-.038l-.033 .004l-.021 -.001l-.023 .001l-.033 -.003h-.035l-.022 -.004l-.022 -.002l-.035 -.007l-.034 -.005l-.016 -.004l-.024 -.005l-.049 -.016l-.024 -.005l-.011 -.005l-.022 -.007l-.045 -.02l-.03 -.012l-.011 -.006l-.014 -.006l-.031 -.018l-.045 -.024l-.016 -.011l-.037 -.026l-.04 -.027l-.002 -.004l-.013 -.009l-.043 -.04l-.025 -.02l-.006 -.007l-.056 -.062l-.013 -.014l-.011 -.014l-.039 -.056l-.014 -.019l-.005 -.01l-.042 -.073l-.007 -.012l-.004 -.008l-.007 -.012l-.014 -.038l-.02 -.042l-.004 -.016l-.004 -.01l-.017 -.061l-.007 -.018l-.002 -.015l-.005 -.019l-.005 -.033l-.008 -.042l-.002 -.031l-.003 -.01v-.016l-.004 -.054l.001 -.036l.001 -.023l.002 -.053l.004 -.025v-.019l.008 -.035l.005 -.034l.005 -.02l.004 -.02l.018 -.06l.003 -.013l1.15 -3.45l-.022 -.037c-2.21 -3.747 -1.209 -8.391 2.413 -11.119z"},child:[]}]})(r)}function tZe(r){return rt({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M12 2a5 5 0 1 1 -5 5l.005 -.217a5 5 0 0 1 4.995 -4.783z"},child:[]},{tag:"path",attr:{d:"M14 14a5 5 0 0 1 5 5v1a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-1a5 5 0 0 1 5 -5h4z"},child:[]}]})(r)}function DO(r){return rt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M4 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z"},child:[]},{tag:"path",attr:{d:"M4 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z"},child:[]},{tag:"path",attr:{d:"M14 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z"},child:[]},{tag:"path",attr:{d:"M14 7l6 0"},child:[]},{tag:"path",attr:{d:"M17 4l0 6"},child:[]}]})(r)}function rZe(r){return rt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M3 20l1.3 -3.9c-2.324 -3.437 -1.426 -7.872 2.1 -10.374c3.526 -2.501 8.59 -2.296 11.845 .48c3.255 2.777 3.695 7.266 1.029 10.501c-2.666 3.235 -7.615 4.215 -11.574 2.293l-4.7 1"},child:[]}]})(r)}function XY(r){return rt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M3 17a3 3 0 1 0 6 0a3 3 0 0 0 -6 0"},child:[]},{tag:"path",attr:{d:"M9 17v-13h10v8"},child:[]},{tag:"path",attr:{d:"M9 8h10"},child:[]},{tag:"path",attr:{d:"M16 19h6"},child:[]},{tag:"path",attr:{d:"M19 16v6"},child:[]}]})(r)}function nZe(r){return rt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0"},child:[]},{tag:"path",attr:{d:"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"},child:[]}]})(r)}function aZe(r){return rt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M15 10l4.553 -2.276a1 1 0 0 1 1.447 .894v6.764a1 1 0 0 1 -1.447 .894l-4.553 -2.276v-4z"},child:[]},{tag:"path",attr:{d:"M3 6m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z"},child:[]},{tag:"path",attr:{d:"M7 12l4 0"},child:[]},{tag:"path",attr:{d:"M9 10l0 4"},child:[]}]})(r)}function iZe(r,e){let{elementType:t="a",onPress:n,onPressStart:a,onPressEnd:i,onClick:o,role:s,isDisabled:l,...u}=r,c={};t!=="a"&&(c={role:"link",tabIndex:l?void 0:0});let d=Tv()||T2();o&&typeof o=="function"&&s!=="button"&&c3("onClick is deprecated, please use onPress instead. See: https://github.com/frontio-ai/heroui/issues/4292","useLink");const f=T=>{d&&(o==null||o(T)),n==null||n(T)};let{focusableProps:h}=L0(r,e),{pressProps:v,isPressed:m}=Ss({onPress:f,onPressStart:a,onPressEnd:i,isDisabled:l,ref:e}),y=hi(u,{labelable:!0,isLink:t==="a"}),b=ze(h,v),w=A2(),S=a3(r);return{isPressed:m,linkProps:ze(y,S,{...b,...c,"aria-disabled":l||void 0,"aria-current":r["aria-current"],onClick:T=>{var A;(A=v.onClick)==null||A.call(v,T),!d&&o&&o(T),!w.isNative&&T.currentTarget instanceof HTMLAnchorElement&&T.currentTarget.href&&!T.isDefaultPrevented()&&D8(T.currentTarget,T)&&r.href&&(T.preventDefault(),w.open(T.currentTarget,T,r.href,r.routerOptions))}})}}function oZe(r){var e,t,n,a;const i=Vr(),[o,s]=oa(r,sF.variantKeys),{ref:l,as:u,children:c,anchorIcon:d,isExternal:f=!1,showAnchorIcon:h=!1,autoFocus:v=!1,className:m,onPress:y,onPressStart:b,onPressEnd:w,onClick:S,...T}=o,A=u||"a",M=bc(l),P=(t=(e=r==null?void 0:r.disableAnimation)!=null?e:i==null?void 0:i.disableAnimation)!=null?t:!1,{linkProps:E}=iZe({...T,onPress:y,onPressStart:b,onPressEnd:w,onClick:S,isDisabled:r.isDisabled,elementType:`${u}`},M),{isFocused:R,isFocusVisible:N,focusProps:k}=Rn({autoFocus:v});f&&(T.rel=(n=T.rel)!=null?n:"noopener noreferrer",T.target=(a=T.target)!=null?a:"_blank");const O=D.useMemo(()=>sF({...s,disableAnimation:P,className:m}),[Xc(s),P,m]),L=D.useCallback(()=>({ref:M,className:O,"data-focus":ht(R),"data-disabled":ht(r.isDisabled),"data-focus-visible":ht(N),...ze(k,E,T)}),[O,R,N,k,E,T]);return{Component:A,children:c,anchorIcon:d,showAnchorIcon:h,getLinkProps:L}}var zhe=Ht((r,e)=>{const{Component:t,children:n,showAnchorIcon:a,anchorIcon:i=_.jsx(bWe,{className:YTe}),getLinkProps:o}=oZe({ref:e,...r});return _.jsx(t,{...o(),children:_.jsxs(_.Fragment,{children:[n,a&&i]})})});zhe.displayName="HeroUI.Link";var tu=zhe;function sZe(r){const[e,t]=oa(r,fF.variantKeys),{ref:n,as:a,children:i,avatar:o,startContent:s,endContent:l,onClose:u,classNames:c,className:d,...f}=e,h=a||"div",v=$r(n),m=lt(c==null?void 0:c.base,d),y=!!u,b=r.variant==="dot",{focusProps:w,isFocusVisible:S}=Rn(),T=D.useMemo(()=>typeof i=="string"&&(i==null?void 0:i.length)===1,[i]),A=D.useMemo(()=>!!o||!!s,[o,s]),M=D.useMemo(()=>!!l||y,[l,y]),P=D.useMemo(()=>fF({...t,hasStartContent:A,hasEndContent:M,isOneChar:T,isCloseable:y,isCloseButtonFocusVisible:S}),[eo(t),S,A,M,T,y]),{pressProps:E}=Ss({isDisabled:!!(r!=null&&r.isDisabled),onPress:u}),R=()=>({ref:v,className:P.base({class:m}),...f}),N=()=>({role:"button",tabIndex:0,className:P.closeButton({class:c==null?void 0:c.closeButton}),"aria-label":"close chip",...ze(E,w)}),k=L=>D.isValidElement(L)?D.cloneElement(L,{className:P.avatar({class:c==null?void 0:c.avatar})}):null,O=L=>D.isValidElement(L)?D.cloneElement(L,{className:lt("max-h-[80%]",L.props.className)}):null;return{Component:h,children:i,slots:P,classNames:c,isDot:b,isCloseable:y,startContent:k(o)||O(s),endContent:O(l),getCloseButtonProps:N,getChipProps:R}}var jhe=Ht((r,e)=>{const{Component:t,children:n,slots:a,classNames:i,isDot:o,isCloseable:s,startContent:l,endContent:u,getCloseButtonProps:c,getChipProps:d}=sZe({...r,ref:e}),f=D.useMemo(()=>o&&!l?_.jsx("span",{className:a.dot({class:i==null?void 0:i.dot})}):l,[a,l,o]),h=D.useMemo(()=>s?_.jsx("span",{...c(),children:u||_.jsx(SDe,{})}):u,[u,s,c]);return _.jsxs(t,{...d(),children:[f,_.jsx("span",{className:a.content({class:i==null?void 0:i.content}),children:n}),h]})});jhe.displayName="HeroUI.Chip";var Gm=jhe,[lZe,Bhe]=B8({name:"DropdownContext",errorMessage:"useDropdownContext: `context` is undefined. Seems you forgot to wrap all popover components within `<Dropdown />`"}),Vhe=r=>{const e={top:{originY:1},bottom:{originY:0},left:{originX:1},right:{originX:0},"top-start":{originX:0,originY:1},"top-end":{originX:1,originY:1},"bottom-start":{originX:0,originY:0},"bottom-end":{originX:1,originY:0},"right-start":{originX:0,originY:0},"right-end":{originX:0,originY:1},"left-start":{originX:1,originY:0},"left-end":{originX:1,originY:1}};return(e==null?void 0:e[r])||{}},Fhe=r=>({top:"top",bottom:"bottom",left:"left",right:"right","top-start":"top start","top-end":"top end","bottom-start":"bottom start","bottom-end":"bottom end","left-start":"left top","left-end":"left bottom","right-start":"right top","right-end":"right bottom"})[r],uZe=(r,e)=>{if(e.includes("-")){const[t]=e.split("-");if(t.includes(r))return!1}return!0},hA=(r,e)=>{if(e.includes("-")){const[,t]=e.split("-");return`${r}-${t}`}return r},G1=new WeakMap,qo=[];function cZe(r,e=document.body){let t=new Set(r),n=new Set,a=l=>{for(let f of l.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))t.add(f);let u=f=>{if(t.has(f)||f.parentElement&&n.has(f.parentElement)&&f.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let h of t)if(f.contains(h))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},c=document.createTreeWalker(l,NodeFilter.SHOW_ELEMENT,{acceptNode:u}),d=u(l);if(d===NodeFilter.FILTER_ACCEPT&&i(l),d!==NodeFilter.FILTER_REJECT){let f=c.nextNode();for(;f!=null;)i(f),f=c.nextNode()}},i=l=>{var u;let c=(u=G1.get(l))!=null?u:0;l.getAttribute("aria-hidden")==="true"&&c===0||(c===0&&l.setAttribute("aria-hidden","true"),n.add(l),G1.set(l,c+1))};qo.length&&qo[qo.length-1].disconnect(),a(e);let o=new MutationObserver(l=>{for(let u of l)if(!(u.type!=="childList"||u.addedNodes.length===0)&&![...t,...n].some(c=>c.contains(u.target))){for(let c of u.removedNodes)c instanceof Element&&(t.delete(c),n.delete(c));for(let c of u.addedNodes)(c instanceof HTMLElement||c instanceof SVGElement)&&(c.dataset.liveAnnouncer==="true"||c.dataset.reactAriaTopLayer==="true")?t.add(c):c instanceof Element&&a(c)}});o.observe(e,{childList:!0,subtree:!0});let s={observe(){o.observe(e,{childList:!0,subtree:!0})},disconnect(){o.disconnect()}};return qo.push(s),()=>{o.disconnect();for(let l of n){let u=G1.get(l);u!=null&&(u===1?(l.removeAttribute("aria-hidden"),G1.delete(l)):G1.set(l,u-1))}s===qo[qo.length-1]?(qo.pop(),qo.length&&qo[qo.length-1].observe()):qo.splice(qo.indexOf(s),1)}}var Hhe=(r,e,t)=>{const n=e==null?void 0:e.current;if(!n||!n.contains(r)){const a=document.querySelectorAll("body > span[data-focus-scope-start]");let i=[];if(a.forEach(o=>{i.push(o.nextElementSibling)}),i.length===1)return t.close(),!1}return!n||!n.contains(r)};function dZe(r,e){const{triggerRef:t,popoverRef:n,showArrow:a,offset:i=7,crossOffset:o=0,scrollRef:s,shouldFlip:l,boundaryElement:u,isDismissable:c=!0,shouldCloseOnBlur:d=!0,shouldCloseOnScroll:f=!0,placement:h="top",containerPadding:v,shouldCloseOnInteractOutside:m,isNonModal:y,isKeyboardDismissDisabled:b,updatePositionDeps:w=[],...S}=r,T=y??!0,{overlayProps:A,underlayProps:M}=E2({isOpen:e.isOpen,onClose:e.close,shouldCloseOnBlur:d,isDismissable:c,isKeyboardDismissDisabled:b,shouldCloseOnInteractOutside:m||(k=>Hhe(k,t,e))},n),{overlayProps:P,arrowProps:E,placement:R,updatePosition:N}=o3({...S,shouldFlip:l,crossOffset:o,targetRef:t,overlayRef:n,isOpen:e.isOpen,scrollRef:s,boundaryElement:u,containerPadding:v,placement:Fhe(h),offset:a?i+3:i,onClose:T&&f?e.close:()=>{}});return d3(()=>{w.length&&N()},w),D.useEffect(()=>{if(e.isOpen&&!T&&n.current)return cZe([n.current])},[T,e.isOpen,n]),{popoverProps:ze(A,P),arrowProps:E,underlayProps:M,placement:R}}var fZe="top";function hZe(r){var e,t,n;const a=Vr(),[i,o]=oa(r,zf.variantKeys),{as:s,ref:l,children:u,state:c,triggerRef:d,scrollRef:f,defaultOpen:h,onOpenChange:v,isOpen:m,isNonModal:y=!0,shouldFlip:b=!0,containerPadding:w=12,shouldBlockScroll:S=!1,isDismissable:T=!0,shouldCloseOnBlur:A,portalContainer:M,updatePositionDeps:P,dialogProps:E,placement:R=fZe,triggerType:N="dialog",showArrow:k=!1,offset:O=7,crossOffset:L=0,boundaryElement:$,isKeyboardDismissDisabled:j,shouldCloseOnInteractOutside:B,shouldCloseOnScroll:H,motionProps:F,className:K,classNames:U,onClose:V,...Q}=i,Z=s||"div",Y=bc(l),X=D.useRef(null),re=D.useRef(!1),oe=d||X,ae=(t=(e=r.disableAnimation)!=null?e:a==null?void 0:a.disableAnimation)!=null?t:!1,se=rN({isOpen:m,defaultOpen:h,onOpenChange:Ee=>{v==null||v(Ee),Ee||V==null||V()}}),le=c||se,{popoverProps:fe,underlayProps:ve,placement:pe}=dZe({triggerRef:oe,isNonModal:y,popoverRef:Y,placement:R,offset:O,scrollRef:f,isDismissable:T,shouldCloseOnBlur:A,boundaryElement:$,crossOffset:L,shouldFlip:b,containerPadding:w,updatePositionDeps:P,isKeyboardDismissDisabled:j,shouldCloseOnScroll:H,shouldCloseOnInteractOutside:B},le),Re=D.useMemo(()=>pe?uZe(pe,R)?pe:R:null,[pe,R]),{triggerProps:Ae}=ore({type:N},le,oe),{isFocusVisible:ie,isFocused:Se,focusProps:ee}=Rn(),te=D.useMemo(()=>zf({...o}),[Xc(o)]),de=Cr(U==null?void 0:U.base,K);R8({isDisabled:!(S&&le.isOpen)});const ye=(Ee={})=>({ref:Y,...ze(fe,Q,Ee),style:ze(fe.style,Q.style,Ee.style)}),xe=(Ee={})=>({"data-slot":"base","data-open":ht(le.isOpen),"data-focus":ht(Se),"data-arrow":ht(k),"data-focus-visible":ht(ie),"data-placement":pe?hA(pe,R):void 0,...ze(ee,E,Ee),className:te.base({class:Cr(de)}),style:{outline:"none"}}),Te=D.useCallback((Ee={})=>({"data-slot":"content","data-open":ht(le.isOpen),"data-arrow":ht(k),"data-placement":pe?hA(pe,R):void 0,className:te.content({class:Cr(U==null?void 0:U.content,Ee.className)})}),[te,le.isOpen,k,Re,R,U,pe]),ke=D.useCallback(Ee=>{var at;let $t;return Ee.pointerType==="touch"&&((r==null?void 0:r.backdrop)==="blur"||(r==null?void 0:r.backdrop)==="opaque")?$t=setTimeout(()=>{re.current=!0},100):re.current=!0,(at=Ae.onPress)==null||at.call(Ae,Ee),()=>{clearTimeout($t)}},[Ae==null?void 0:Ae.onPress]),Ue=D.useCallback((Ee={},at=null)=>{const{isDisabled:$t,...jt}=Ee;return{"data-slot":"trigger",...ze({"aria-haspopup":"dialog"},Ae,jt),onPress:ke,isDisabled:$t,className:te.trigger({class:Cr(U==null?void 0:U.trigger,Ee.className),isTriggerDisabled:$t}),ref:C2(at,oe)}},[le,Ae,ke,oe]),Xe=D.useCallback((Ee={})=>({"data-slot":"backdrop",className:te.backdrop({class:U==null?void 0:U.backdrop}),onClick:at=>{if(!re.current){at.preventDefault();return}le.close(),re.current=!1},...ve,...Ee}),[te,le.isOpen,U,ve]);return D.useEffect(()=>{if(le.isOpen&&(Y!=null&&Y.current))return N8([Y==null?void 0:Y.current])},[le.isOpen,Y]),{state:le,Component:Z,children:u,classNames:U,showArrow:k,triggerRef:oe,placement:Re,isNonModal:y,popoverRef:Y,portalContainer:M,isOpen:le.isOpen,onClose:le.close,disableAnimation:ae,shouldBlockScroll:S,backdrop:(n=r.backdrop)!=null?n:"transparent",motionProps:F,getBackdropProps:Xe,getPopoverProps:ye,getTriggerProps:Ue,getDialogProps:xe,getContentProps:Te}}var JY={ease:[.36,.66,.4,1]},Kk={scaleSpring:{enter:{transform:"scale(1)",opacity:1,transition:{type:"spring",bounce:0,duration:.2}},exit:{transform:"scale(0.85)",opacity:0,transition:{type:"easeOut",duration:.15}}},scaleSpringOpacity:{initial:{opacity:0,transform:"scale(0.8)"},enter:{opacity:1,transform:"scale(1)",transition:{type:"spring",bounce:0,duration:.3}},exit:{opacity:0,transform:"scale(0.96)",transition:{type:"easeOut",bounce:0,duration:.15}}},fade:{enter:{opacity:1,transition:{duration:.4,ease:JY.ease}},exit:{opacity:0,transition:{duration:.3,ease:JY.ease}}}},[pZe,Uhe]=B8({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within `<Popover />`"}),eZ=()=>Jc(()=>import("./index-CHATu7tP.js"),[]).then(r=>r.default),Ghe=r=>{const{as:e,children:t,className:n,...a}=r,{Component:i,placement:o,backdrop:s,motionProps:l,disableAnimation:u,getPopoverProps:c,getDialogProps:d,getBackdropProps:f,getContentProps:h,isNonModal:v,onClose:m}=Uhe(),y=D.useRef(null),{dialogProps:b,titleProps:w}=C3({},y),S=d({ref:y,...b,...a}),T=e||i||"div",A=_.jsxs(_.Fragment,{children:[!v&&_.jsx($f,{onDismiss:m}),_.jsx(T,{...S,children:_.jsx("div",{...h({className:n}),children:typeof t=="function"?t(w):t})}),_.jsx($f,{onDismiss:m})]}),M=D.useMemo(()=>s==="transparent"?null:u?_.jsx("div",{...f()}):_.jsx(Mi,{features:eZ,children:_.jsx(Di.div,{animate:"enter",exit:"exit",initial:"exit",variants:Kk.fade,...f()})}),[s,u,f]),P=o?Vhe(o==="center"?"top":o):void 0,E=_.jsx(_.Fragment,{children:u?A:_.jsx(Mi,{features:eZ,children:_.jsx(Di.div,{animate:"enter",exit:"exit",initial:"initial",style:P,variants:Kk.scaleSpringOpacity,...l,children:A})})});return _.jsxs("div",{...c(),children:[M,E]})};Ghe.displayName="HeroUI.PopoverContent";var vZe=Ghe,qhe=r=>{var e;const{triggerRef:t,getTriggerProps:n}=Uhe(),{children:a,...i}=r,o=D.useMemo(()=>typeof a=="string"?_.jsx("p",{children:a}):D.Children.only(a),[a]),s=(e=o.props.ref)!=null?e:o.ref,{onPress:l,isDisabled:u,...c}=D.useMemo(()=>n(ze(i,o.props),s),[n,o.props,i,s]),[,d]=e3e(a,Ze),{buttonProps:f}=Aae({onPress:l,isDisabled:u},t),h=D.useMemo(()=>(d==null?void 0:d[0])!==void 0,[d]);return D.cloneElement(o,ze(c,h?{onPress:l,isDisabled:u}:f))};qhe.displayName="HeroUI.PopoverTrigger";var gZe=qhe,Qhe=Ht((r,e)=>{const{children:t,...n}=r,a=hZe({...n,ref:e}),[i,o]=D.Children.toArray(t),s=_.jsx(l3,{portalContainer:a.portalContainer,children:o});return _.jsxs(pZe,{value:a,children:[i,a.disableAnimation&&a.isOpen?s:_.jsx(fl,{children:a.isOpen?s:null})]})});Qhe.displayName="HeroUI.Popover";var mZe=Qhe;function yZe(r){const{isSelected:e,disableAnimation:t,...n}=r;return _.jsx("svg",{"aria-hidden":"true","data-selected":e,role:"presentation",viewBox:"0 0 17 18",...n,children:_.jsx("polyline",{fill:"none",points:"1 9 7 14 15 4",stroke:"currentColor",strokeDasharray:22,strokeDashoffset:e?44:66,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,style:t?{}:{transition:"stroke-dashoffset 200ms ease"}})})}var bZe=700;function xZe(){return rh()||typeof window>"u"?!1:window.screen.width<=bZe}function wZe(r){var e,t;const n=Vr(),[a,i]=oa(r,iT.variantKeys),{as:o,item:s,state:l,shortcut:u,description:c,startContent:d,endContent:f,isVirtualized:h,selectedIcon:v,className:m,classNames:y,onAction:b,autoFocus:w,onPress:S,onPressStart:T,onPressUp:A,onPressEnd:M,onPressChange:P,onHoverStart:E,onHoverChange:R,onHoverEnd:N,hideSelectedIcon:k=!1,isReadOnly:O=!1,closeOnSelect:L,onClose:$,onClick:j,...B}=a,H=(t=(e=r.disableAnimation)!=null?e:n==null?void 0:n.disableAnimation)!=null?t:!1,F=D.useRef(null),K=o||(B!=null&&B.href?"a":"li"),U=typeof K=="string",{rendered:V,key:Q}=s,Z=l.disabledKeys.has(Q)||r.isDisabled,Y=l.selectionManager.selectionMode!=="none",X=xZe(),{isFocusVisible:re,focusProps:oe}=Rn({autoFocus:w});j&&typeof j=="function"&&c3("onClick is deprecated, please use onPress instead. See: https://github.com/frontio-ai/heroui/issues/4292","MenuItem");const ae=D.useCallback(Ee=>{j==null||j(Ee),S==null||S(Ee)},[j,S]),{isPressed:se,isFocused:le,isSelected:fe,isDisabled:ve,menuItemProps:pe,labelProps:Re,descriptionProps:Ae,keyboardShortcutProps:ie}=iKe({key:Q,onClose:$,isDisabled:Z,onPress:ae,onPressStart:T,onPressUp:A,onPressEnd:M,onPressChange:P,"aria-label":a["aria-label"],closeOnSelect:L,isVirtualized:h,onAction:b},l,F);let{hoverProps:Se,isHovered:ee}=Ia({isDisabled:ve,onHoverStart(Ee){r0()||(l.selectionManager.setFocused(!0),l.selectionManager.setFocusedKey(Q)),E==null||E(Ee)},onHoverChange:R,onHoverEnd:N}),te=pe;const de=D.useMemo(()=>iT({...i,isDisabled:ve,disableAnimation:H,hasTitleTextChild:typeof V=="string",hasDescriptionTextChild:typeof c=="string"}),[Xc(i),ve,H,V,c]),ye=Cr(y==null?void 0:y.base,m);O&&(te=KAe(te));const xe=(Ee={})=>({ref:F,...ze(O?{}:oe,av(B,{enabled:U}),te,Se,Ee),"data-focus":ht(le),"data-selectable":ht(Y),"data-hover":ht(X?ee||se:ee),"data-disabled":ht(ve),"data-selected":ht(fe),"data-pressed":ht(se),"data-focus-visible":ht(re),className:de.base({class:Cr(ye,Ee.className)})}),Te=(Ee={})=>({...ze(Re,Ee),className:de.title({class:y==null?void 0:y.title})}),ke=(Ee={})=>({...ze(Ae,Ee),className:de.description({class:y==null?void 0:y.description})}),Ue=(Ee={})=>({...ze(ie,Ee),className:de.shortcut({class:y==null?void 0:y.shortcut})}),Xe=D.useCallback((Ee={})=>({"aria-hidden":ht(!0),"data-disabled":ht(ve),className:de.selectedIcon({class:y==null?void 0:y.selectedIcon}),...Ee}),[ve,de,y]);return{Component:K,domRef:F,slots:de,classNames:y,isSelectable:Y,isSelected:fe,isDisabled:ve,rendered:V,shortcut:u,description:c,startContent:d,endContent:f,selectedIcon:v,disableAnimation:H,getItemProps:xe,getLabelProps:Te,hideSelectedIcon:k,getDescriptionProps:ke,getKeyboardShortcutProps:Ue,getSelectedIconProps:Xe}}var Whe=r=>{const{Component:e,slots:t,classNames:n,rendered:a,shortcut:i,description:o,isSelectable:s,isSelected:l,isDisabled:u,selectedIcon:c,startContent:d,endContent:f,disableAnimation:h,hideSelectedIcon:v,getItemProps:m,getLabelProps:y,getDescriptionProps:b,getKeyboardShortcutProps:w,getSelectedIconProps:S}=wZe(r),T=D.useMemo(()=>{const A=_.jsx(yZe,{disableAnimation:h,isSelected:l});return typeof c=="function"?c({icon:A,isSelected:l,isDisabled:u}):c||A},[c,l,u,h]);return _.jsxs(e,{...m(),children:[d,o?_.jsxs("div",{className:t.wrapper({class:n==null?void 0:n.wrapper}),children:[_.jsx("span",{...y(),children:a}),_.jsx("span",{...b(),children:o})]}):_.jsx("span",{...y(),children:a}),i&&_.jsx("kbd",{...w(),children:i}),s&&!v&&_.jsx("span",{...S(),children:T}),f]})};Whe.displayName="HeroUI.MenuItem";var Khe=Whe;function SZe(r){let e=av(r,{enabled:typeof r.elementType=="string"}),t;return r.orientation==="vertical"&&(t="vertical"),r.elementType!=="hr"?{separatorProps:{...e,role:"separator","aria-orientation":t}}:{separatorProps:e}}function _Ze(r){const{as:e,className:t,orientation:n,...a}=r;let i=e||"hr";i==="hr"&&n==="vertical"&&(i="div");const{separatorProps:o}=SZe({elementType:typeof i=="string"?i:"hr",orientation:n}),s=D.useMemo(()=>ane({orientation:n,className:t}),[n,t]),l=D.useCallback((u={})=>({className:s,role:"separator","data-orientation":n,...o,...a,...u}),[s,n,o,a]);return{Component:i,getDividerProps:l}}var Yhe=Mae((r,e)=>{const{Component:t,getDividerProps:n}=_Ze({...r});return _.jsx(t,{ref:e,...n()})});Yhe.displayName="HeroUI.Divider";var CZe=Yhe,Zhe=Ht(({item:r,state:e,as:t,variant:n,color:a,disableAnimation:i,onAction:o,closeOnSelect:s,className:l,classNames:u,showDivider:c=!1,hideSelectedIcon:d,dividerProps:f={},itemClasses:h,title:v,...m},y)=>{const b=t||"li",w=D.useMemo(()=>nne(),[]),S=Cr(u==null?void 0:u.base,l),T=Cr(u==null?void 0:u.divider,f==null?void 0:f.className),{itemProps:A,headingProps:M,groupProps:P}=oKe({heading:r.rendered,"aria-label":r["aria-label"]});return _.jsxs(b,{"data-slot":"base",...ze(A,m),className:w.base({class:S}),children:[r.rendered&&_.jsx("span",{...M,className:w.heading({class:u==null?void 0:u.heading}),"data-slot":"heading",children:r.rendered}),_.jsxs("ul",{...P,className:w.group({class:u==null?void 0:u.group}),"data-has-title":!!r.rendered,"data-slot":"group",children:[[...r.childNodes].map(E=>{const{key:R,props:N}=E;let k=_.jsx(Khe,{classNames:h,closeOnSelect:s,color:a,disableAnimation:i,hideSelectedIcon:d,item:E,state:e,variant:n,onAction:o,...N},R);return E.wrapper&&(k=E.wrapper(k)),k}),c&&_.jsx(CZe,{as:"li",className:w.divider({class:T}),...f})]})]})});Zhe.displayName="HeroUI.MenuSection";var TZe=Zhe;function AZe(r){var e;const t=Vr(),{as:n,ref:a,variant:i,color:o,children:s,disableAnimation:l=(e=t==null?void 0:t.disableAnimation)!=null?e:!1,onAction:u,closeOnSelect:c,itemClasses:d,className:f,state:h,topContent:v,bottomContent:m,hideEmptyContent:y=!1,hideSelectedIcon:b=!1,emptyContent:w="No items.",menuProps:S,onClose:T,classNames:A,...M}=r,P=n||"ul",E=bc(a),R=typeof P=="string",N=The({...M,...S,children:s}),k=h||N,{menuProps:O}=aKe({...M,...S,onAction:u},k,E),L=D.useMemo(()=>rne({className:f}),[f]),$=Cr(A==null?void 0:A.base,f);return{Component:P,state:k,variant:i,color:o,disableAnimation:l,onClose:T,topContent:v,bottomContent:m,closeOnSelect:c,className:f,itemClasses:d,getBaseProps:(F={})=>({ref:E,"data-slot":"base",className:L.base({class:$}),...av(M,{enabled:R}),...F}),getListProps:(F={})=>({"data-slot":"list",className:L.list({class:A==null?void 0:A.list}),...O,...F}),hideEmptyContent:y,hideSelectedIcon:b,getEmptyContentProps:(F={})=>({children:w,className:L.emptyContent({class:A==null?void 0:A.emptyContent}),...F})}}var EZe=Ht(function(e,t){const{Component:n,state:a,closeOnSelect:i,color:o,disableAnimation:s,hideSelectedIcon:l,hideEmptyContent:u,variant:c,onClose:d,topContent:f,bottomContent:h,itemClasses:v,getBaseProps:m,getListProps:y,getEmptyContentProps:b}=AZe({...e,ref:t}),w=_.jsxs(n,{...y(),children:[!a.collection.size&&!u&&_.jsx("li",{children:_.jsx("div",{...b()})}),[...a.collection].map(S=>{const T={closeOnSelect:i,color:o,disableAnimation:s,item:S,state:a,variant:c,onClose:d,hideSelectedIcon:l,...S.props},A=ZAe(v,T==null?void 0:T.classNames);if(S.type==="section")return _.jsx(TZe,{...T,itemClasses:A},S.key);let M=_.jsx(Khe,{...T,classNames:A},S.key);return S.wrapper&&(M=S.wrapper(M)),M})]});return _.jsxs("div",{...m(),children:[f,w,h]})}),MZe=EZe,DZe=w3,$_=DZe,LZe=Ht(function(e,t){const{getMenuProps:n}=Bhe();return _.jsx(vZe,{children:_.jsx(rre,{contain:!0,restoreFocus:!0,children:_.jsx(MZe,{...n(e,t)})})})}),PZe=LZe,Xhe=r=>{const{getMenuTriggerProps:e}=Bhe(),{children:t,...n}=r;return _.jsx(gZe,{...e(n),children:t})};Xhe.displayName="HeroUI.DropdownTrigger";var IZe=Xhe,kZe=(r,e)=>{if(r){const t=Array.isArray(r.children)?r.children:[...(r==null?void 0:r.items)||[]];if(t&&t.length)return t.find(a=>{if(a&&a.key===e)return a})||{}}return null},RZe=(r,e,t)=>{const n=t||kZe(r,e);return n&&n.props&&"closeOnSelect"in n.props?n.props.closeOnSelect:r==null?void 0:r.closeOnSelect};function NZe(r){var e;const t=Vr(),{as:n,triggerRef:a,isOpen:i,defaultOpen:o,onOpenChange:s,isDisabled:l,type:u="menu",trigger:c="press",placement:d="bottom",closeOnSelect:f=!0,shouldBlockScroll:h=!0,classNames:v,disableAnimation:m=(e=t==null?void 0:t.disableAnimation)!=null?e:!1,onClose:y,className:b,...w}=r,S=n||"div",T=D.useRef(null),A=a||T,M=D.useRef(null),P=D.useRef(null),E=gfe({trigger:c,isOpen:i,defaultOpen:o,onOpenChange:B=>{s==null||s(B),B||y==null||y()}}),{menuTriggerProps:R,menuProps:N}=Xfe({type:u,trigger:c,isDisabled:l},E,A),k=D.useMemo(()=>ZTe({className:b}),[b]),O=B=>{B!==void 0&&!B||f&&E.close()},L=(B={})=>{const H=ze(w,B);return{state:E,placement:d,ref:P,disableAnimation:m,shouldBlockScroll:h,scrollRef:M,triggerRef:A,...H,classNames:{...v,...B.classNames,content:Cr(k,v==null?void 0:v.content,B.className)},shouldCloseOnInteractOutside:H!=null&&H.shouldCloseOnInteractOutside?H.shouldCloseOnInteractOutside:F=>Hhe(F,T,E)}},$=(B={})=>{const{onPress:H,onPressStart:F,...K}=R;return ze(K,{isDisabled:l},B)},j=(B,H=null)=>({ref:V8(H,M),menuProps:N,closeOnSelect:f,...ze(B,{onAction:(F,K)=>{const U=RZe(B,F,K);O(U)},onClose:E.close})});return{Component:S,menuRef:M,menuProps:N,classNames:k,closeOnSelect:f,onClose:E.close,autoFocus:E.focusStrategy||!0,disableAnimation:m,getPopoverProps:L,getMenuProps:j,getMenuTriggerProps:$}}var Jhe=r=>{const{children:e,...t}=r,n=NZe(t),[a,i]=Be.Children.toArray(e);return _.jsx(lZe,{value:n,children:_.jsxs(mZe,{...n.getPopoverProps(),children:[a,i]})})};Jhe.displayName="HeroUI.Dropdown";var OZe=Jhe,$Ze=()=>_.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"80%",role:"presentation",viewBox:"0 0 24 24",width:"80%",children:[_.jsx("path",{d:"M12 2C9.38 2 7.25 4.13 7.25 6.75C7.25 9.32 9.26 11.4 11.88 11.49C11.96 11.48 12.04 11.48 12.1 11.49C12.12 11.49 12.13 11.49 12.15 11.49C12.16 11.49 12.16 11.49 12.17 11.49C14.73 11.4 16.74 9.32 16.75 6.75C16.75 4.13 14.62 2 12 2Z",fill:"currentColor"}),_.jsx("path",{d:"M17.0809 14.1489C14.2909 12.2889 9.74094 12.2889 6.93094 14.1489C5.66094 14.9989 4.96094 16.1489 4.96094 17.3789C4.96094 18.6089 5.66094 19.7489 6.92094 20.5889C8.32094 21.5289 10.1609 21.9989 12.0009 21.9989C13.8409 21.9989 15.6809 21.5289 17.0809 20.5889C18.3409 19.7389 19.0409 18.5989 19.0409 17.3589C19.0309 16.1289 18.3409 14.9889 17.0809 14.1489Z",fill:"currentColor"})]}),[Out,zZe]=nh({name:"AvatarGroupContext",strict:!1});function epe(r={}){const{onLoad:e,onError:t,ignoreFallback:n}=r,a=g_e(),i=D.useRef(a?new Image:null),[o,s]=D.useState("pending");D.useEffect(()=>{i.current&&(i.current.onload=u=>{l(),s("loaded"),e==null||e(u)},i.current.onerror=u=>{l(),s("failed"),t==null||t(u)})},[i.current]);const l=()=>{i.current&&(i.current.onload=null,i.current.onerror=null,i.current=null)};return O0(()=>{a&&s(jZe(r,i))},[a]),n?"loaded":o}function jZe(r,e){const{loading:t,src:n,srcSet:a,crossOrigin:i,sizes:o,ignoreFallback:s}=r;if(!n)return"pending";if(s)return"loaded";const l=new Image;return l.src=n,i&&(l.crossOrigin=i),a&&(l.srcset=a),o&&(l.sizes=o),t&&(l.loading=t),e.current=l,l.complete&&l.naturalWidth?"loaded":"loading"}function BZe(r={}){var e,t,n,a,i,o;const s=Vr(),l=zZe(),u=!!l,{as:c,ref:d,src:f,name:h,icon:v,classNames:m,fallback:y,alt:b=h||"avatar",imgRef:w,color:S=(e=l==null?void 0:l.color)!=null?e:"default",radius:T=(t=l==null?void 0:l.radius)!=null?t:"full",size:A=(n=l==null?void 0:l.size)!=null?n:"md",isBordered:M=(a=l==null?void 0:l.isBordered)!=null?a:!1,isDisabled:P=(i=l==null?void 0:l.isDisabled)!=null?i:!1,isFocusable:E=!1,getInitials:R=e_e,ignoreFallback:N=!1,showFallback:k=!1,ImgComponent:O="img",imgProps:L,className:$,onError:j,disableAnimation:B,...H}=r,F=c||"span",K=$r(d),U=$r(w),{isFocusVisible:V,isFocused:Q,focusProps:Z}=Rn(),{isHovered:Y,hoverProps:X}=Ia({isDisabled:P}),re=(o=B??(s==null?void 0:s.disableAnimation))!=null?o:!1,ae=epe({src:f,onError:j,ignoreFallback:N})==="loaded",se=typeof O=="string",le=(!f||!ae)&&k,fe=D.useMemo(()=>{var ie;return rAe({color:S,radius:T,size:A,isBordered:M,isDisabled:P,isInGroup:u,disableAnimation:re,isInGridGroup:(ie=l==null?void 0:l.isGrid)!=null?ie:!1})},[S,T,A,M,P,re,u,l==null?void 0:l.isGrid]),ve=lt(m==null?void 0:m.base,$),pe=D.useMemo(()=>E||c==="button",[E,c]),Re=D.useCallback((ie={})=>({ref:K,tabIndex:pe?0:-1,"data-hover":je(Y),"data-focus":je(Q),"data-focus-visible":je(V),className:fe.base({class:lt(ve,ie==null?void 0:ie.className)}),...ze(H,X,pe?Z:{})}),[pe,fe,ve,Z,H]),Ae=D.useCallback((ie={})=>({ref:U,src:f,"data-loaded":je(ae),className:fe.img({class:m==null?void 0:m.img}),...ze(L,ie,Pa({disableAnimation:re},{enabled:se}))}),[fe,ae,L,re,f,U,se]);return{Component:F,ImgComponent:O,src:f,alt:b,icon:v,name:h,imgRef:U,slots:fe,classNames:m,fallback:y,isImgLoaded:ae,showFallback:le,ignoreFallback:N,getInitials:R,getAvatarProps:Re,getImageProps:Ae}}var tpe=Ht((r,e)=>{const{Component:t,ImgComponent:n,src:a,icon:i=_.jsx($Ze,{}),alt:o,classNames:s,slots:l,name:u,showFallback:c,fallback:d,getInitials:f,getAvatarProps:h,getImageProps:v}=BZe({...r,ref:e}),m=D.useMemo(()=>!c&&a?null:d?_.jsx("div",{"aria-label":o,className:l.fallback({class:s==null?void 0:s.fallback}),role:"img",children:d}):u?_.jsx("span",{"aria-label":o,className:l.name({class:s==null?void 0:s.name}),role:"img",children:f(u)}):_.jsx("span",{"aria-label":o,className:l.icon({class:s==null?void 0:s.icon}),role:"img",children:i}),[c,a,d,u,s]);return _.jsxs(t,{...h(),children:[a&&_.jsx(n,{...v(),alt:o}),m]})});tpe.displayName="HeroUI.Avatar";var Zb=tpe;function VZe(r){return rt({attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"},child:[]}]})(r)}function rpe(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-16 160H64v-84c0-6.6 5.4-12 12-12h360c6.6 0 12 5.4 12 12v84z"},child:[]}]})(r)}function FZe(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 352H48c-26.5 0-48 21.5-48 48v32c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48v-32c0-26.5-21.5-48-48-48z"},child:[]}]})(r)}function LO({isOpen:r,onClose:e,taskId:t,plugin:n,task:a}){var u;const i=D.useRef(null),{data:o=a}=Xi(async()=>await or.serverPost("/api/v1/plugin/task",{taskId:t}),{pollingInterval:1e3,pollingWhenHidden:!1,ready:!!t&&r});D.useEffect(()=>{var c,d;(c=o==null?void 0:o.logs)!=null&&c.length&&((d=i.current)==null||d.scrollIntoView({behavior:"smooth"}))},[o==null?void 0:o.logs]);const s=async()=>{await or.serverPost("/api/v1/plugin/task/status",{taskId:t,minimized:!0}),e()},l=()=>(o==null?void 0:o.type)==="uninstall"?"卸载插件:":"安装插件:";return _.jsx(Oc,{isOpen:r,onClose:e,size:"2xl",isDismissable:!0,children:_.jsxs(Rc,{children:[_.jsxs(Nc,{className:"flex gap-1",children:[_.jsx("span",{children:l()}),_.jsx("span",{className:"font-mono text-primary-500",children:n.name})]}),_.jsx(kc,{children:_.jsx("div",{className:"h-[400px] w-full overflow-auto",children:_.jsxs("div",{className:"font-mono text-sm whitespace-pre-wrap",children:[(u=o==null?void 0:o.logs)==null?void 0:u.map((c,d)=>_.jsx("div",{className:"py-0.5",children:c},d)),_.jsx("div",{ref:i})]})})}),_.jsxs($0,{children:[_.jsx(Ze,{variant:"light",onPress:s,startContent:_.jsx(FZe,{}),children:"最小化"}),_.jsx(Ze,{color:"primary",onPress:e,children:"关闭"})]})]})})}const HZe=r=>{switch(r.toLowerCase()){case"github":return _.jsx(ZA,{className:"text-lg"});case"gitee":return _.jsx(Fwe,{className:"text-lg text-red-500"});case"npm":return _.jsx(XA,{className:"text-lg text-[#CB3837]"});default:return null}},UZe=r=>{const e=["为您的工作流程带来更多可能性","提升您的开发效率的得力助手","简单易用,功能强大的插件","让开发更轻松,体验更流畅","为您的项目锦上添花"],t=r.split("").reduce((n,a)=>n+a.charCodeAt(0),0);return e[t%e.length]},GZe=r=>({name:r.split("-")[0]||"未知作者",email:"-",url:"-"});function qZe({isOpen:r,onClose:e,plugin:t,onUpdate:n,onUninstall:a,onViewApps:i,onViewConfig:o}){const s=t.type.toLowerCase()==="app"&&i,[l,u]=D.useState(!1),[c,d]=D.useState(""),[f,h]=D.useState(!1),[v,m]=D.useState(!1),{loading:y,run:b}=Xi(async()=>{if(t.type.toLowerCase()==="app")throw new Error("不支持卸载 App 类型的插件");const{taskId:S}=await or.serverPost("/api/v1/plugin/uninstall",{name:t.name,type:t.type});return d(S),u(!0),{taskId:S}},{manual:!0,onError:S=>{Ur.error(S.message)}}),{run:w}=Xi(async()=>{const S=await or.serverPost("/api/v1/plugin/config/is-exist",{name:t.name,type:t.type});return h(S),S},{manual:!0,onError:S=>{Ur.error("检查配置文件失败: "+S.message),h(!1)}});return D.useEffect(()=>{t&&t.type.toLowerCase()!=="app"&&(m(!0),Promise.resolve(w()).finally(()=>{m(!1)}))},[t]),_.jsxs(_.Fragment,{children:[_.jsx(Oc,{isOpen:r&&!l,onOpenChange:e,title:"插件配置",children:_.jsxs(Rc,{children:[_.jsxs(Nc,{className:"flex flex-col gap-1",children:[_.jsx("h3",{className:"text-lg font-semibold",children:t.name}),_.jsx("p",{className:"text-sm text-default-600",children:t.description==="-"?UZe(t.name):t.description})]}),_.jsx(kc,{children:_.jsxs("div",{className:"space-y-4",children:[_.jsxs("div",{className:"flex items-center justify-between",children:[_.jsx("span",{className:"text-sm text-default-600",children:"当前版本"}),_.jsx(Gm,{size:"sm",variant:"flat",color:"primary",children:t.version==="-"?"0.0.1":t.version})]}),t.latestVersion&&t.latestVersion!==t.version&&_.jsxs("div",{className:"flex items-center justify-between",children:[_.jsx("span",{className:"text-sm text-default-600",children:"最新版本"}),_.jsx(Gm,{size:"sm",variant:"flat",color:"success",children:t.latestVersion})]}),_.jsxs("div",{className:"flex items-center justify-between",children:[_.jsx("span",{className:"text-sm text-default-600",children:"作者"}),_.jsx("div",{className:"flex items-center gap-2",children:t.author&&t.author.length>0?t.author.map((S,T)=>S.home&&S.home!=="-"?_.jsx(tu,{href:S.home,isExternal:!0,className:"text-xs text-primary-500 hover:text-primary-600",children:S.name},S.name+T):_.jsx("span",{className:"text-xs text-default-600",children:S.name},S.name+T)):_.jsx("span",{className:"text-xs text-default-400",children:GZe(t.name).name})})]}),_.jsxs("div",{className:"flex items-center justify-between",children:[_.jsx("span",{className:"text-sm text-default-600",children:"仓库源"}),_.jsx("div",{className:"flex items-center gap-2",children:Array.isArray(t.repo)&&t.repo.length>0?t.repo.map((S,T)=>_.jsx(tu,{className:"text-default-600 hover:text-default-900 transition-colors inline-flex",href:S.url,isExternal:!0,children:HZe(S.type)},S.url+T)):_.jsx("span",{className:"text-sm text-default-400",children:"暂无仓库信息"})})]}),_.jsxs("div",{className:"flex items-center justify-between",children:[_.jsx("span",{className:"text-sm text-default-600",children:"开源许可"}),t.license.url?_.jsx(tu,{className:"text-xs text-primary-500 hover:text-primary-600 inline-flex items-center",href:t.license.url,isExternal:!0,showAnchorIcon:!0,children:t.license.name}):_.jsx("span",{className:"text-sm text-default-400",children:t.license.name||"MIT"})]}),t.home&&t.home!=="-"&&_.jsxs("div",{className:"flex items-center justify-between",children:[_.jsx("span",{className:"text-sm text-default-600",children:"插件主页"}),_.jsx(tu,{className:"text-xs text-primary-500 hover:text-primary-600 inline-flex items-center",href:t.home,isExternal:!0,showAnchorIcon:!0,children:"访问主页"})]}),_.jsxs("div",{className:"flex items-center justify-between",children:[_.jsx("span",{className:"text-sm text-default-600",children:"插件类型"}),_.jsx(Gm,{size:"sm",variant:"flat",color:t.type.toLowerCase()==="app"?"secondary":"default",children:t.type.toLowerCase()==="-"?"NPM":t.type.toUpperCase()})]}),_.jsxs("div",{className:"flex items-center justify-between",children:[_.jsx("span",{className:"text-sm text-default-600",children:"安装时间"}),_.jsx("span",{className:"text-sm text-default-400",children:new Date(t.time).toLocaleString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})})]})]})}),_.jsx($0,{children:_.jsxs("div",{className:"flex gap-2",children:[_.jsx(Ze,{color:"primary",variant:"light",onPress:n,isDisabled:!t.latestVersion||t.latestVersion===t.version,children:"更新"}),_.jsx(Ze,{color:"danger",variant:"light",onPress:b,isLoading:y,isDisabled:t.type.toLowerCase()==="app",children:"卸载"}),s&&_.jsx(Ze,{color:"secondary",variant:"light",onPress:i,startContent:_.jsx(DO,{}),children:"查看应用"}),t.type.toLowerCase()!=="app"&&_.jsx(Ze,{color:"secondary",variant:"light",onPress:o,startContent:_.jsx(Gwe,{}),isLoading:v,isDisabled:!f,children:"配置"})]})})]})}),_.jsx(LO,{isOpen:l,onClose:()=>{u(!1),a()},taskId:c,plugin:t,task:{id:c,name:t.name,type:"uninstall",status:"running",minimized:!1,logs:[]}})]})}function QZe({isOpen:r,onClose:e,pluginName:t}){const[n,a]=D.useState(void 0),{loading:i,run:o}=Xi(async(d,f)=>or.serverPost("/api/v1/plugin/file",{pluginName:t,fileName:d,operation:f}),{manual:!0,onSuccess:(d,[f,h])=>{h==="read"?a(d||""):h==="delete"&&(Ur.success("文件删除成功"),u())},onError:d=>{Ur.error(d.message||"操作失败")}}),{data:s,loading:l,run:u}=Xi(async()=>or.serverPost("/api/v1/plugin/apps",{name:t}),{manual:!0});D.useEffect(()=>{r&&t&&u()},[r,t]);const c=s||[];return _.jsx(Oc,{isOpen:r,onClose:e,size:"3xl",scrollBehavior:"inside",children:_.jsxs(Rc,{children:[_.jsx(Nc,{children:_.jsx("h3",{className:"text-lg font-semibold",children:"应用列表"})}),_.jsx(kc,{className:"py-6",children:l?_.jsx("div",{className:"text-center py-4",children:"加载中..."}):_.jsxs("div",{className:"space-y-4",children:[c.map(d=>_.jsxs("div",{className:"flex items-center justify-between p-3 bg-default-50 rounded-lg",children:[_.jsx("div",{className:"flex-1 mr-4",children:_.jsx("h4",{className:"text-sm font-medium",children:d})}),_.jsxs("div",{className:"flex gap-2",children:[_.jsx(Ze,{isIconOnly:!0,size:"sm",variant:"light",color:"primary",isLoading:i,onPress:()=>o(d,"read"),children:_.jsx(Hwe,{className:"text-base"})}),_.jsx(Ze,{isIconOnly:!0,size:"sm",variant:"light",color:"danger",isLoading:i,onPress:()=>o(d,"delete"),children:_.jsx(Qwe,{className:"text-base"})})]})]},d)),n!==void 0&&_.jsx(Oc,{isOpen:n!==void 0,onClose:()=>a(void 0),size:"4xl",scrollBehavior:"inside",children:_.jsxs(Rc,{children:[_.jsx(Nc,{children:_.jsx("h3",{className:"text-lg font-semibold",children:"文件内容"})}),_.jsx(kc,{children:_.jsx("pre",{className:"bg-default-50 p-4 rounded-lg overflow-x-auto",children:_.jsx("code",{children:n||""})})})]})})]})})]})})}const WZe=(r={})=>({...r}),KZe=(r,e)=>{if(e.min!==void 0||e.max!==void 0){const t=Number(r);if(Number.isNaN(t))return e.error||"请输入有效数字";if(e.min!==void 0&&t<e.min)return e.error||`最小值不能小于 ${e.min}`;if(e.max!==void 0&&t>e.max)return e.error||`最大值不能超过 ${e.max}`}if(e.regex)try{if(!(typeof e.regex=="string"?new RegExp(e.regex.replace(/^\/|\/$/g,"")):e.regex).test(r))return e.error||"格式不符合要求"}catch{return console.error("Invalid regex:",e.regex),"无效的验证规则"}return e.minLength&&r.length<e.minLength?e.error||`内容长度不能少于 ${e.minLength} 个字符`:e.maxLength&&r.length>e.maxLength?e.error||`内容长度不能超过 ${e.maxLength} 个字符`:null},YZe=r=>e=>{for(const t of r){const n=KZe(e,t);if(n)return n}return!0},PO=(r,e,t)=>{const{componentType:n,key:a,className:i,...o}=r,s=r.rules?YZe(r.rules):void 0;return _.jsx("div",{className:i||`w-${r.width||200}px h-${r.height||40}px`,children:_.jsx(Va,{...o,className:"w-full",validate:s,onValueChange:t||(l=>{e[a]=l})},a)})},IO=(r,e,t)=>{const{componentType:n,key:a,startText:i,endText:o,className:s,...l}=r;return t||(e[a]=r.defaultSelected??!1),_.jsxs("div",{className:s||"flex items-center gap-2",children:[i&&_.jsx("span",{children:i}),_.jsx(_ne,{...l,defaultSelected:r.defaultSelected,onValueChange:t||(u=>{e[a]=u})},a),o&&_.jsx("span",{children:o})]})},kO=(r,e,t)=>{const{componentType:n,key:a,className:i,checkbox:o,...s}=r;return e[a]={},o.forEach(l=>{e[a][l.key]=l.defaultSelected??!1}),_.jsx("div",{className:i||"flex items-center gap-2",children:_.jsx(dfe,{...s,children:o.map(({componentType:l,key:u,...c})=>D.createElement(xO,{...c,key:u,defaultSelected:e[a][u],onValueChange:d=>{t?t(u,d):e[a][u]=d}},c.label))},a)})},RO=(r,e,t)=>{const{componentType:n,key:a,className:i,radio:o,...s}=r;return t||(e[a]=s.defaultValue??""),_.jsx("div",{className:i||"flex items-center gap-2",children:_.jsx(ife,{...s,onValueChange:t||(l=>{e[a]=l}),children:o.map(({componentType:l,key:u,...c})=>_.jsx(sfe,{...c,children:c.label},u))},a)})},NO=r=>{const{componentType:e,key:t,className:n,transparent:a,...i}=r,o=a?`${n||""} opacity-0`:n;return _.jsx(aw,{className:o,...i},t)},ZZe=(r,e)=>{let{componentType:t,key:n,className:a,children:i,label:o,...s}=r;return Array.isArray(i)||(i=[]),e[n]=[],i.forEach(l=>{if(l.componentType!=="accordion-item"||!Array.isArray(l.children))return;const u={};l.children.forEach(c=>{if(c.componentType==="input"){u[c.key]=c.defaultValue??"";return}if(c.componentType==="switch"){u[c.key]=c.defaultSelected??!1;return}if(c.componentType==="radio-group"){u[c.key]=c.defaultValue??"";return}if(c.componentType==="checkbox-group"){u[c.key]={},c.checkbox.forEach(d=>{u[c.key][d.key]=d.defaultSelected??!1});return}}),e[n].push(u)}),_.jsxs("div",{className:a||"flex flex-col gap-4 w-full",children:[_.jsx("div",{className:"flex justify-between items-center",children:_.jsx("span",{className:"text-default-500 text-md",children:o})}),_.jsx(p5,{className:"border border-default-200 rounded-lg p-1",...s,keepContentMounted:!0,children:i.map(({componentType:l,key:u,children:c,...d},f)=>l!=="accordion-item"||!Array.isArray(c)?null:_.jsx(v5,{...d,children:_.jsx("div",{className:"flex flex-col gap-4",children:c.map(h=>{if(h.componentType==="input")return PO(h,{},v=>{e[n][f][h.key]=v});if(h.componentType==="switch")return IO(h,{},v=>{e[n][f][h.key]=v});if(h.componentType==="radio-group")return RO(h,{},v=>{e[n][f][h.key]=v});if(h.componentType==="checkbox-group")return e[n][f][h.key]={},kO(h,{},(v,m)=>{e[n][f][h.key][v]=m});if(h.componentType==="divider")return NO(h)})})},u))},n)]})},XZe=(r,e)=>{let{componentType:t,key:n,data:a,label:i,className:o,children:s,...l}=r;const[u,c]=D.useState(0),d=m=>{a.splice(m,1),e[n].splice(m,1),c(y=>y+1)};e[n]=a.map(m=>{const{title:y,...b}=m;return b});const f=[];if(!Array.isArray(a)||!Array.isArray(s==null?void 0:s.children))return _.jsx("div",{children:"数据错误"});const{children:h,...v}=s;for(let m=0;m<a.length;m++){const y=h.map((b,w)=>{if(!b.key)return null;const S=`${n}-${b.key}-${m}-${w}`;if(b.componentType==="input"){const T={...b,key:S,defaultValue:a[m][b.key]||b.defaultValue};return PO(T,{},A=>{a[m][b.key]=A,e[n][m]||(e[n][m]={}),e[n][m][b.key]=A})}if(b.componentType==="switch"){const T={...b,key:S,defaultSelected:a[m][b.key]??b.defaultSelected};return IO(T,{},A=>{a[m][b.key]=A,e[n][m]||(e[n][m]={}),e[n][m][b.key]=A})}if(b.componentType==="radio-group"){const T={...b,key:S,defaultValue:a[m][b.key]??b.defaultValue};return RO(T,{},A=>{a[m][b.key]=A,e[n][m]||(e[n][m]={}),e[n][m][b.key]=A})}if(b.componentType==="checkbox-group"){const T={...b,key:S,checkbox:a[m][b.key]??b.checkbox};return e[n][m]||(e[n][m]={}),kO(T,{},(A,M)=>{a[m][b.key][A]=M,e[n][m][b.key]||(e[n][m][b.key]={}),e[n][m][b.key][A]=M})}return b.componentType==="divider"?NO({...b,key:S}):null}).filter(Boolean);f.push(D.createElement(v5,{...v,key:`${n}-accordion-item-${m}-${u}`,textValue:a[m].title||v.title||"默认标题",title:_.jsxs("div",{className:"flex justify-between items-center w-full pr-4",children:[_.jsx("span",{children:a[m].title||v.title||"默认标题"}),_.jsx("div",{role:"button",tabIndex:0,onClick:b=>{b.stopPropagation(),d(m)},onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),b.stopPropagation(),d(m))},className:"px-2 py-1 text-sm bg-red-500 text-white rounded hover:bg-red-600 transition-colors cursor-pointer",children:"删除"})]})},_.jsx("div",{className:"flex flex-col gap-4",children:y})))}return _.jsxs("div",{className:o||"flex flex-col gap-4 w-full",children:[_.jsxs("div",{className:"flex justify-between items-center",children:[_.jsx("span",{className:"text-default-500 text-md",children:i}),_.jsx("button",{type:"button",onClick:()=>{a.push({...JSON.parse(JSON.stringify(a[0])),title:"新卡片"+(a.length+1)}),c(m=>m+1)},className:"px-3 py-1 text-sm bg-blue-500 text-white rounded hover:bg-blue-600 transition-colors",children:"添加新卡片"})]}),_.jsx(p5,{className:"border border-default-200 rounded-lg p-1",...l,keepContentMounted:!0,children:f},`${n}-accordion-${u}`)]})};function JZe(r,e={}){const t=[],n=WZe(e);return r.forEach(a=>{if(a.componentType==="input")return t.push(PO(a,n));if(a.componentType==="switch")return t.push(IO(a,n));if(a.componentType==="checkbox-group")return t.push(kO(a,n));if(a.componentType==="radio-group")return t.push(RO(a,n));if(a.componentType==="accordion")return t.push(ZZe(a,n));if(a.componentType==="accordion-pro")return t.push(XZe(a,n));if(a.componentType==="divider")return t.push(NO(a));console.log(`[未知组件] ${a}`)}),{list:t,result:n}}const eXe=({configs:r,onChange:e,values:t={}})=>{const{list:n,result:a}=JZe(r,t);return D.useEffect(()=>{e(a)},[a,e]),_.jsx("div",{className:"w-full",children:_.jsx("div",{className:"flex flex-wrap gap-4 w-full",children:n.map((i,o)=>_.jsx("div",{className:"w-full",children:i},`dynamic-component-${o}-${i.key||""}`))})})},tXe=D.memo(({open:r,name:e,type:t,onClose:n})=>{const[a,i]=D.useState(!1),[o,s]=D.useState([]),[l,u]=D.useState({}),[c,d]=D.useState({}),f=D.useRef(!1),h=D.useRef({name:e,type:t,configValues:{}});D.useEffect(()=>(f.current=!0,()=>{f.current=!1}),[]);const v=D.useCallback(async()=>{if(r)try{i(!0);const w=await or.serverPost("/api/v1/plugin/config/get",{name:e,type:t});if(!f.current)return;if(!w){Ur.error("获取配置失败"),n();return}s(w),u(h.current.configValues),d(h.current.configValues)}catch(w){if(!f.current)return;Ur.error(w.message),n()}finally{if(!f.current)return;i(!1)}},[e,t,n,r]);D.useEffect(()=>{r?v():(s([]),u(h.current.configValues),d(h.current.configValues),i(!1))},[r,v]);const m=D.useCallback(w=>{!f.current||!r||d(w)},[r]);D.useEffect(()=>{r&&JSON.stringify(c)!==JSON.stringify(l)&&u(c)},[c,l,r]);const y=D.useCallback(async()=>{if(r)try{const w=await or.serverPost("/api/v1/plugin/config/save",{name:e,type:t,config:c});if(!f.current)return;w!=null&&w.result&&(u(w.result),d(w.result),h.current.configValues=w.result),Ur.success("保存成功")}catch(w){if(!f.current)return;Ur.error(w.message)}},[e,t,c,r]),b=D.useMemo(()=>r?a?_.jsx("div",{className:"h-full flex items-center justify-center",children:_.jsxs("div",{className:"flex flex-col items-center gap-3",children:[_.jsx(ey,{size:"md",color:"primary"}),_.jsx("p",{className:"text-gray-500 dark:text-gray-400 text-sm",children:"正在加载配置..."})]})}):o.length===0?_.jsxs("div",{className:"h-full flex flex-col items-center justify-center",children:[_.jsx("div",{className:"w-16 h-16 flex items-center justify-center rounded-full bg-gray-50 dark:bg-gray-800",children:_.jsx(s1e,{className:"text-2xl text-gray-400 dark:text-gray-500"})}),_.jsx("h3",{className:"mt-4 text-gray-900 dark:text-gray-100 font-medium",children:"暂无配置项"}),_.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-1.5",children:"该插件当前没有需要配置的选项"})]}):_.jsx("div",{className:"h-full space-y-4 overflow-y-auto custom-scrollbar",children:_.jsx("div",{className:"p-6 bg-gray-50/50 dark:bg-gray-800/50 rounded-2xl border border-gray-100 dark:border-gray-800 transition-colors",children:_.jsx(eXe,{configs:o,onChange:m,values:l})})}):null,[a,o,m,r,l]);return r?_.jsx(Oc,{isOpen:r,onOpenChange:n,size:"4xl",scrollBehavior:"inside",classNames:{base:"bg-white dark:bg-gray-900",header:"border-b border-gray-100 dark:border-gray-800",footer:"border-t border-gray-100 dark:border-gray-800"},children:_.jsxs(Rc,{className:"max-h-[85vh]",children:[_.jsx(Nc,{className:"shrink-0",children:_.jsx("div",{className:"flex items-center py-1 px-1",children:_.jsxs("div",{className:"flex items-center gap-2.5",children:[_.jsx("div",{className:"w-7 h-7 flex items-center justify-center rounded-lg bg-blue-50/80 dark:bg-blue-900/20 transition-colors",children:_.jsx(Nne,{className:"text-base text-blue-600/90 dark:text-blue-400"})}),_.jsxs("div",{children:[_.jsx("h2",{className:"text-[15px] font-medium text-gray-900 dark:text-gray-100 leading-[18px]",children:e}),_.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5 leading-[14px]",children:"插件配置与管理"})]})]})})}),_.jsx(kc,{className:"flex-1 overflow-auto",children:_.jsx("div",{className:"h-[480px] py-5",children:b})}),_.jsx($0,{className:"shrink-0 py-3",children:_.jsxs("div",{className:"flex justify-end gap-2",children:[_.jsx(Ze,{color:"default",variant:"bordered",size:"md",onPress:()=>console.log("当前配置值:",c),className:"px-5 h-10 min-w-[88px] font-medium border-gray-200 hover:bg-gray-50 dark:border-gray-700 dark:hover:bg-gray-800",startContent:_.jsx(LDe,{className:"text-lg"}),children:"打印配置"}),_.jsx(Ze,{color:"default",variant:"bordered",size:"md",onPress:n,className:"px-5 h-10 min-w-[88px] font-medium border-gray-200 hover:bg-gray-50 dark:border-gray-700 dark:hover:bg-gray-800",children:"取消"}),_.jsx(Ze,{color:"primary",variant:"flat",size:"md",onPress:y,isDisabled:o.length===0,className:"px-5 h-10 min-w-[88px] font-medium bg-blue-50 hover:bg-blue-100 text-blue-600 dark:bg-blue-900/20 dark:hover:bg-blue-900/30 dark:text-blue-400",children:"保存"})]})})]})}):null},(r,e)=>r.open===e.open&&r.name===e.name&&r.type===e.type);function rXe({plugin:r}){const[e,t]=D.useState(!1),[n,a]=D.useState(!1),[i,o]=D.useState(!1),{runAsync:s}=Xi(()=>or.serverPost("/api/v1/plugin/update",{name:r.name}),{manual:!0}),{runAsync:l}=Xi(()=>or.serverPost("/api/v1/plugin/uninstall",{name:r.name}),{manual:!0});return _.jsxs(_.Fragment,{children:[_.jsx(Ze,{isIconOnly:!0,variant:"light",color:"primary",size:"sm",onPress:()=>t(!0),children:_.jsx(Nne,{className:"text-lg"})}),_.jsx(qZe,{isOpen:e,onClose:()=>t(!1),plugin:r,onUpdate:async()=>{await s(),t(!1)},onUninstall:async()=>{await l(),t(!1)},onViewApps:r.type.toLowerCase()==="app"?()=>{a(!0)}:void 0,onViewConfig:()=>o(!0)}),_.jsx(QZe,{isOpen:n,onClose:()=>a(!1),pluginName:r.name}),_.jsx(tXe,{open:i,name:r.name,type:r.type,onClose:()=>o(!1),onViewConfig:()=>o(!0)})]})}function nXe({plugin:r}){var c;const[e,t]=D.useState(!1),[n,a]=D.useState(!1),[i,o]=D.useState(""),{data:s}=Xi(()=>or.serverPost("/api/v1/plugin/task",{taskId:i}),{pollingInterval:1e3,pollingWhenHidden:!1,ready:!!i&&n}),{loading:l,run:u}=Xi(async()=>{var f,h;const{taskId:d}=await or.serverPost("/api/v1/plugin/install",{name:r.name,type:r.type,url:r.type==="app"?(f=r.repo[0])==null?void 0:f.url:(h=r.repo[0])==null?void 0:h.url});return o(d),a(!0),{taskId:d}},{manual:!0,onError:d=>{Ur.error(d.message)}});return _.jsxs(_.Fragment,{children:[_.jsx(Ze,{size:"sm",variant:"flat",color:"primary",className:"h-7 bg-primary-500/10 hover:bg-primary-500/20 dark:bg-primary-500/20 dark:hover:bg-primary-500/30",startContent:_.jsx(R5e,{className:"text-base"}),onPress:()=>t(!0),children:"安装"}),_.jsx(Oc,{isOpen:e&&!n,onClose:()=>t(!1),size:"2xl",classNames:{base:"border border-default-200",header:"border-b border-default-200",body:"py-6",footer:"border-t border-default-200"},children:_.jsxs(Rc,{children:[_.jsx(Nc,{className:"flex flex-col gap-1",children:_.jsx("h3",{className:"text-lg font-semibold",children:"安装确认"})}),_.jsx(kc,{children:_.jsxs("div",{className:"space-y-4",children:[_.jsxs("div",{className:"flex items-start gap-3",children:[_.jsx("div",{className:"shrink-0 w-24 text-default-500 text-sm",children:"插件名称"}),_.jsx("div",{className:"text-sm font-mono bg-default-100 px-2 py-0.5 rounded",children:r.name})]}),_.jsxs("div",{className:"flex items-start gap-3",children:[_.jsx("div",{className:"shrink-0 w-24 text-default-500 text-sm",children:"版本"}),_.jsx("div",{className:"text-sm font-mono bg-default-100 px-2 py-0.5 rounded",children:r.version})]}),_.jsxs("div",{className:"flex items-start gap-3",children:[_.jsx("div",{className:"shrink-0 w-24 text-default-500 text-sm",children:"描述"}),_.jsx("div",{className:"text-sm text-default-600",children:r.description})]}),r.author.length>0&&_.jsxs("div",{className:"flex items-start gap-3",children:[_.jsx("div",{className:"shrink-0 w-24 text-default-500 text-sm",children:"作者"}),_.jsx("div",{className:"text-sm text-default-600",children:r.author.map((d,f)=>_.jsxs("span",{children:[d.name,f!==r.author.length-1&&", "]},d.name+f))})]}),((c=r.license)==null?void 0:c.name)&&_.jsxs("div",{className:"flex items-start gap-3",children:[_.jsx("div",{className:"shrink-0 w-24 text-default-500 text-sm",children:"开源许可"}),_.jsx("div",{className:"text-sm text-default-600",children:r.license.name})]}),r.home&&r.home!=="-"&&_.jsxs("div",{className:"flex items-start gap-3",children:[_.jsx("div",{className:"shrink-0 w-24 text-default-500 text-sm",children:"插件主页"}),_.jsx("div",{className:"text-sm text-default-600",children:_.jsx(tu,{href:r.home,isExternal:!0,showAnchorIcon:!0,className:"text-primary-500 hover:text-primary-600",children:r.home})})]}),_.jsxs("div",{className:"mt-4 p-3 bg-warning-50 text-warning-600 rounded-lg text-sm",children:[_.jsx("p",{className:"font-medium mb-2",children:"免责声明"}),_.jsxs("div",{className:"space-y-2",children:[_.jsx("p",{children:"在安装并使用此插件之前,请您仔细阅读并理解以下声明:"}),_.jsxs("ul",{className:"list-disc list-inside space-y-1 ml-2",children:[_.jsx("li",{children:"安装前请自行评估其安全性和适用性"}),_.jsx("li",{children:"使用本插件所产生的任何直接或间接后果,均由用户自行承担"}),_.jsx("li",{children:"我们不对插件的可用性、可靠性和准确性做任何明示或暗示的保证"}),_.jsx("li",{children:"如遇任何技术问题,建议及时与插件开发者联系或停止使用"})]}),_.jsx("p",{className:"mt-2 text-xs",children:'点击"确认安装"即表示您已完全理解并接受上述免责声明的全部内容。'})]})]})]})}),_.jsxs($0,{children:[_.jsx(Ze,{color:"default",variant:"light",onPress:()=>t(!1),children:"取消"}),_.jsx(Ze,{color:"primary",onPress:u,isLoading:l,children:"确认安装"})]})]})}),_.jsx(LO,{isOpen:n,onClose:()=>{a(!1),t(!1),window.dispatchEvent(new Event("plugin-list-update"))},taskId:i,plugin:r,task:s||{id:i,name:r.name,type:"install",status:"running",minimized:!1,logs:[]}})]})}function aXe({onMaximize:r,tasks:e}){const t=e.filter(n=>n.minimized);return t.length===0?null:_.jsx(Fa,{className:"fixed bottom-4 right-4 w-80",children:_.jsx(ms,{className:"p-3",children:_.jsx("div",{className:"max-h-[300px] overflow-auto",children:t.map(n=>_.jsxs("div",{className:"flex items-center justify-between p-2 hover:bg-default-100 rounded",children:[_.jsxs("div",{className:"flex flex-col gap-1",children:[_.jsx("span",{className:"text-sm font-medium",children:n.name}),_.jsx(Gm,{size:"sm",variant:"flat",color:n.status==="completed"?"success":n.status==="failed"?"danger":"primary",children:n.status})]}),_.jsx(Ze,{isIconOnly:!0,variant:"light",size:"sm",onPress:()=>r(n.id),children:_.jsx(rpe,{})})]},n.id))})})})}function iXe({isOpen:r,onClose:e,tasks:t,onMaximize:n}){return _.jsx(Oc,{isOpen:r,onClose:e,size:"2xl",children:_.jsxs(Rc,{children:[_.jsx(Nc,{className:"flex flex-col gap-1",children:_.jsx("h3",{className:"text-lg font-semibold",children:"任务列表"})}),_.jsx(kc,{children:t.length===0?_.jsx("div",{className:"text-center py-6 text-default-400",children:"暂无任务"}):_.jsx("div",{className:"space-y-2",children:t.map(a=>_.jsxs("div",{className:"flex items-center justify-between p-3 bg-default-50 rounded-lg",children:[_.jsxs("div",{className:"flex flex-col gap-1",children:[_.jsx("span",{className:"text-sm font-medium",children:a.name}),_.jsx(Gm,{size:"sm",variant:"flat",color:a.status==="completed"?"success":a.status==="failed"?"danger":"primary",children:a.status})]}),_.jsx(Ze,{isIconOnly:!0,variant:"light",size:"sm",onPress:()=>{n(a.id),e()},children:_.jsx(rpe,{})})]},a.id))})})]})})}function npe(...r){return RAe(Gr(r))}const v0=r=>/^(http|https|file):\/\/.*/.test(r),oXe=r=>{var e,t,n;if(typeof r.insert!="string"){if((e=r.insert)!=null&&e.image)return{type:"image",file:r.insert.image.src.replace("data:image/","base64://")};if((t=r.insert)!=null&&t.emoji)return{type:"face",id:Number(r.insert.emoji.id)};if((n=r.insert)!=null&&n.reply)return{type:"reply",messageId:r.insert.reply.messageId}}return{type:"text",text:r.insert}};function sXe(r){if(!r)return"未知时间";const e=new Date(r),n=Math.abs(new Date().getTime()-e.getTime()),a=Math.floor(n/(1e3*60*60*24));return a===0?"今天":a===1?"昨天":a<7?`${a}天前`:a<30?`${Math.floor(a/7)}周前`:a<365?`${Math.floor(a/30)}月前`:"1年前"}function lXe(r){if(!r||r<0)return"0";if(r<1e3)return r.toString();if(r<1e6){const a=r/100,i=Math.floor(a)/10,o=Math.round(i*10)/10;return o.toFixed(1).endsWith(".0")?`${Math.floor(o)}k`:`${o.toFixed(1)}k`}const e=r/1e5,t=Math.floor(e)/10,n=Math.round(t*10)/10;return n.toFixed(1).endsWith(".0")?`${Math.floor(n)}M`:`${n.toFixed(1)}M`}function uXe({isOpen:r,onClose:e}){const[t,n]=D.useState(new Set),[a,i]=D.useState(!1),{data:o=[],loading:s,refresh:l}=Xi(()=>or.serverPost("/api/v1/plugin/updates"),{ready:r,refreshDeps:[r],onSuccess:m=>{const y=m.filter(b=>b.hasUpdate).map(b=>b.name);n(new Set(y))}}),u=m=>{const y=new Set(t);y.has(m.name)?y.delete(m.name):y.add(m.name),n(y)},c=()=>{const m=o.map(y=>y.name);t.size===m.length?n(new Set):n(new Set(m))},d=async()=>{const y=Array.from(t).filter(b=>o.find(w=>w.name===b&&w.hasUpdate));if(y.length===0){Ur.error("选中的插件中没有需要更新的插件");return}i(!0);try{const b=await or.serverPost("/api/v1/plugin/update/batch",{plugins:y}),w=b.filter(T=>T.status==="ok").length,S=b.length-w;S===0?Ur.success(`成功更新 ${w} 个插件`):Ur.error(`${w} 个插件更新成功,${S} 个插件更新失败`),window.dispatchEvent(new Event("plugin-list-update")),e()}catch(b){Ur.error("更新失败:"+b.message)}finally{i(!1)}},f=o.filter(m=>m.hasUpdate).length,h=o.map(m=>m.name),v=t.size===h.length;return D.useEffect(()=>{const m=o.filter(y=>y.hasUpdate).map(y=>y.name);t.size!==m.length&&n(new Set(m))},[o]),_.jsx(Oc,{isOpen:r,onClose:e,placement:"center",classNames:{base:"max-w-2xl"},children:_.jsxs(Rc,{children:[_.jsxs(Nc,{className:"flex flex-col gap-1",children:[_.jsx("h3",{className:"text-lg font-semibold",children:"更新管理"}),_.jsx("p",{className:"text-xs text-default-500",children:f>0?`有 ${f} 个插件可以更新`:"所有插件都是最新版本"})]}),_.jsxs(kc,{children:[_.jsxs("div",{className:"flex items-center justify-between mb-3",children:[_.jsx(Ze,{variant:"flat",size:"sm",onPress:c,className:"h-7 px-2 min-w-[76px] font-medium",children:v?"取消全选":"全选"}),_.jsx(Ze,{variant:"flat",size:"sm",onPress:l,isDisabled:s,className:"h-7 px-2 min-w-[76px] font-medium",startContent:_.jsx(uT,{className:"text-base"}),children:"刷新"})]}),_.jsx(EO,{className:"max-h-[400px]",children:s?_.jsx("div",{className:"h-[200px] flex items-center justify-center",children:_.jsx(ey,{size:"lg",color:"primary"})}):o.length>0?_.jsxs("div",{className:"w-full",children:[_.jsxs("div",{className:"grid grid-cols-6 gap-2 px-3 py-2 bg-default-100 dark:bg-default-50/5 rounded-t-lg text-sm font-medium text-default-600",children:[_.jsx("div",{className:"col-span-2",children:"插件名称"}),_.jsx("div",{className:"col-span-2",children:"当前版本"}),_.jsx("div",{className:"col-span-2",children:"更新状态"})]}),_.jsx("div",{className:"space-y-1 mt-1",children:o.map(m=>{var y;return _.jsxs("div",{onClick:()=>u(m),className:`grid grid-cols-6 gap-2 px-3 py-2 rounded-lg transition-colors ${m.name==="node-karin"?"bg-primary-50/20 dark:bg-primary-500/5":""} ${t.has(m.name)?"bg-primary-50/50 dark:bg-primary-500/10 cursor-pointer":"hover:bg-default-100/80 dark:hover:bg-default-100/10 cursor-pointer"}`,children:[_.jsxs("div",{className:"col-span-2 flex items-center gap-2",children:[_.jsx(xO,{radius:"full",size:"sm",isSelected:t.has(m.name),onClick:b=>{b.stopPropagation(),u(m)}}),m.type==="npm"?_.jsx(XA,{className:`text-lg ${m.name==="node-karin"?"text-primary-500":"text-[#CB3837]"}`}):_.jsx(ZA,{className:"text-lg text-[#24292e]"}),_.jsx("span",{className:`text-sm truncate ${m.name==="node-karin"?"font-semibold text-primary-600 dark:text-primary-500":"font-medium"}`,children:m.name})]}),_.jsx("div",{className:"col-span-2 flex items-center",children:m.type==="npm"?_.jsx("span",{className:"text-sm text-default-500",children:m.currentVersion}):_.jsx("span",{className:"font-mono text-sm text-default-500",children:(y=m.currentHash)==null?void 0:y.substring(0,7)})}),_.jsxs("div",{className:"col-span-2 flex items-center justify-between",children:[_.jsx("div",{className:"flex items-center gap-2",children:m.hasUpdate?m.type==="npm"?_.jsx("span",{className:"text-sm text-primary-500",children:m.latestVersion}):_.jsxs("span",{className:"text-sm text-warning-500",children:["有 ",m.updateCount," 个更新"]}):_.jsxs("div",{className:"flex items-center gap-1 text-success-500",children:[_.jsx(I5e,{className:"text-lg"}),_.jsx("span",{className:"text-sm",children:"最新版本"})]})}),_.jsx(Ze,{size:"sm",color:"primary",variant:t.has(m.name)?"solid":"flat",onPress:()=>u(m),className:"min-w-[76px]",children:t.has(m.name)?"已选择":"选择"})]})]},m.name)})})]}):_.jsx("div",{className:"h-[200px] flex items-center justify-center",children:_.jsxs("div",{className:"text-center",children:[_.jsx("p",{className:"text-lg font-medium text-default-900 mb-1",children:"暂无插件"}),_.jsx("p",{className:"text-xs text-default-600",children:"您还没有安装任何插件"})]})})})]}),_.jsxs($0,{children:[_.jsx(Ze,{variant:"light",onPress:e,children:"取消"}),_.jsx(Ze,{color:"primary",onPress:d,isLoading:a,isDisabled:t.size===0,startContent:_.jsx(Rne,{}),children:"更新选中的插件"})]})]})})}const cXe=r=>{const e=["为您的工作流程带来更多可能性和效率提升","简单易用且功能强大的插件,助力开发体验","为项目开发锦上添花的得力助手","提升开发效率的智能工具,让工作更轻松","优化您的开发流程,提供更好的使用体验","为您的项目增添新的维度和可能性","智能且高效的开发工具,助力效率提升","让开发更简单,让创作更有趣","为您的工作流程带来智能化的解决方案","提供专业的开发支持,让工作更高效"],t=r.split("").reduce((a,i)=>a+i.charCodeAt(0),0),n=t%e.length;return e[n].replace(/您的|开发/,()=>{const a=["您的",r,"开发"];return a[t%a.length]})},tZ=r=>{switch(r.toLowerCase()){case"npm":return{icon:_.jsx(XA,{className:"text-xl text-[#CB3837]"}),tooltip:"NPM 插件",color:"bg-red-50/50"};case"git":return{icon:_.jsx(ZA,{className:"text-xl text-[#24292e]"}),tooltip:"Git 插件",color:"bg-purple-50/50"};case"app":return{icon:_.jsx(DO,{className:"text-xl text-primary-500"}),tooltip:"应用插件",color:"bg-primary-50/50"};default:return{icon:_.jsx(P5e,{className:"text-xl text-default-500"}),tooltip:"未知类型",color:"bg-default-50/50"}}},dXe=({plugin:r})=>_.jsxs(Fa,{className:"group w-full h-[140px] flex flex-col overflow-hidden cursor-pointer relative bg-default-50/30 dark:bg-default-100/5 hover:-translate-y-[1px] hover:shadow-sm hover:bg-default-100/50 dark:hover:bg-default-100/10 transition-all duration-300 rounded-xl",isPressable:!0,radius:"sm",children:[_.jsx("div",{className:"absolute inset-0 border border-default-200/20 dark:border-default-100/5 group-hover:border-primary-500/30 dark:group-hover:border-primary-500/20 transition-all duration-300 rounded-xl"}),_.jsxs(ms,{className:"p-4 flex flex-col h-full relative",children:[_.jsxs("div",{className:"flex items-start justify-between gap-3 mb-2",children:[_.jsxs("div",{className:"flex-1 min-w-0",children:[_.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[r.installed&&_.jsx(wn,{content:"已安装",children:_.jsx("div",{className:"relative flex items-center justify-center",children:_.jsx("div",{className:"w-4 h-4 flex items-center justify-center",children:_.jsx(GYe,{className:"w-full h-full text-success-500/90 dark:text-success-400/90 stroke-[2]"})})})}),r.home&&r.home!=="-"?_.jsx(wn,{content:"点击访问插件主页",children:_.jsx(tu,{href:r.home,isExternal:!0,className:"text-sm font-medium text-default-900 hover:text-primary-500 transition-colors truncate",children:r.name})}):_.jsx("span",{className:"text-sm font-medium text-default-900 truncate",children:r.name})]}),_.jsx("p",{className:"text-xs text-default-500 line-clamp-2 leading-relaxed",title:r.description,children:r.description==="-"?cXe(r.name):r.description})]}),_.jsx("div",{className:"flex shrink-0",children:r.author.length>0?_.jsx(wn,{content:_.jsxs("div",{className:"text-center",children:[_.jsx("p",{className:"text-sm text-default-600",children:r.author[0].name}),r.author[0].home&&r.author[0].home!=="-"&&_.jsx("p",{className:"text-xs text-default-400",children:"点击访问主页"})]}),children:r.author[0].home&&r.author[0].home!=="-"?_.jsx(tu,{href:r.author[0].home,isExternal:!0,children:_.jsx(Zb,{isBordered:!0,size:"sm",src:r.author[0].avatar||"https://avatar.vercel.sh/ikenxuan",className:"bg-default-100 border-white dark:border-default-800"})}):_.jsx(Zb,{isBordered:!0,size:"sm",src:r.author[0].avatar||"https://avatar.vercel.sh/ikenxuan",className:"bg-default-100 border-white dark:border-default-800"})}):_.jsx(Zb,{isBordered:!0,size:"sm",icon:_.jsx(Wwe,{}),className:"bg-default-100 border-white dark:border-default-800"})})]}),_.jsxs("div",{className:"flex items-center justify-between mt-auto",children:[_.jsxs("div",{className:"flex items-center gap-2",children:[_.jsx(Gm,{variant:"flat",size:"sm",className:"h-5 px-2 bg-default-100/80 border-small border-default-200/50",children:_.jsx("span",{className:"text-xs font-mono",children:r.version==="-"?"未知版本":`v${r.version}`})}),_.jsxs("div",{className:"flex items-center gap-2 text-xs text-default-400",children:[_.jsxs("div",{className:"flex items-center gap-1",children:[_.jsx(O5e,{className:"text-base"}),_.jsx("span",{children:lXe(r.downloads||0)})]}),_.jsx("span",{children:"·"}),_.jsxs("div",{className:"flex items-center gap-1",children:[_.jsx(uT,{className:"text-base"}),_.jsx("span",{children:sXe(r.updated)})]})]})]}),_.jsx("div",{className:"flex items-center gap-2",children:r.installed?_.jsx(rXe,{plugin:r}):_.jsx(nXe,{plugin:r})})]})]})]});function fXe(){const[r,e]=D.useState(1),[t,n]=D.useState(null),[a,i]=D.useState(!1),[o,s]=D.useState(!1),[,l]=D.useState(!1),[u,c]=D.useState("all"),[d,f]=D.useState(""),[h,v]=D.useState(!1),m=D.useRef(null);let{data:y,error:b,loading:w,refresh:S}=Xi(async()=>(v(!0),or.serverPost("/api/v1/plugin/index",{page:r,pageSize:16,refresh:h}).then(j=>j).catch(j=>{throw console.error("❌ 插件列表刷新失败:",j),j}).finally(()=>{v(!1)})),{refreshDeps:[r],onSuccess:(j,B)=>{if(!(!B||!BYe(j,B)))return B}});y||(y={list:[],total:0,page:1,pageSize:16});const T=y.list,{data:A=[]}=Xi(()=>or.serverPost("/api/v1/plugin/task/list"),{pollingInterval:2e3,pollingWhenHidden:!1,onSuccess:(j,B)=>{if(!B||JSON.stringify(j)!==JSON.stringify(B)){const H=j.map(F=>({...F,minimized:t!==F.id}));if(JSON.stringify(H)!==JSON.stringify(B))return H}return B}}),M=16,P=D.useMemo(()=>{let j=T||[];if(u!=="all"&&(j=j.filter(B=>B.type&&B.type.toLowerCase()===u.toLowerCase())),d.trim()){const B=d.toLowerCase().trim();j=j.filter(H=>H.name.toLowerCase().includes(B)||H.description&&H.description!=="-"&&H.description.toLowerCase().includes(B)||H.author.some(F=>F.name.toLowerCase().includes(B))||H.type&&H.type.toLowerCase().includes(B))}return j},[T,u,d]);D.useEffect(()=>{e(1)},[u,d]);const E=D.useMemo(()=>P||[],[P]),R=D.useCallback(j=>{n(j)},[]),N=D.useCallback(()=>{n(null),S()},[S]),k=D.useCallback(()=>{n(null),l(!1),S()},[S]);D.useEffect(()=>{},[t]);const O=D.useMemo(()=>t?A.find(j=>j.id===t):void 0,[t,A]),L=D.useMemo(()=>O?T.find(j=>j.name===O.name):void 0,[O,T]);D.useEffect(()=>{const j=()=>{S()};return window.addEventListener("plugin-list-update",j),()=>{window.removeEventListener("plugin-list-update",j)}},[S]);const $=D.useCallback(()=>{h||(m.current&&clearTimeout(m.current),v(!0),m.current=setTimeout(()=>{S()},300))},[h,S]);return b?_.jsx("div",{className:"h-full flex items-center justify-center",children:_.jsx(Fa,{className:"max-w-md mx-auto",children:_.jsxs(ms,{className:"flex flex-col items-center gap-4 py-8",children:[_.jsx("div",{className:"text-xl font-medium text-danger",children:"加载失败"}),_.jsx("p",{className:"text-center text-default-600",children:b.message}),_.jsx(Ze,{color:"primary",variant:"flat",onPress:()=>S(),startContent:_.jsx(uT,{}),children:"重试"})]})})}):_.jsxs("div",{className:"h-full flex flex-col",children:[_.jsx(Fa,{className:"flex-none mx-0",children:_.jsxs(ms,{className:"p-3",children:[_.jsxs("div",{className:"flex justify-between items-start mb-3",children:[_.jsxs("div",{className:"flex flex-col gap-0.5",children:[_.jsx("h1",{className:"text-xl font-semibold text-default-900",children:"插件市场"}),_.jsx("p",{className:"text-xs text-default-600",children:"发现、安装和管理您的插件"})]}),_.jsxs("div",{className:"flex gap-2",children:[_.jsxs(Ze,{variant:"flat",size:"sm",onPress:()=>i(!0),className:"h-7 px-2 min-w-[76px] font-medium",startContent:_.jsx(j5e,{className:"text-base"}),children:["任务列表 ",A.length>0&&_.jsx("span",{className:"ml-1 px-1.5 py-0.5 text-xs rounded-full bg-primary-500/10 text-primary-500",children:A.length})]}),_.jsx(Ze,{variant:"flat",size:"sm",onPress:()=>s(!0),className:"h-7 px-2 min-w-[76px] font-medium",startContent:_.jsx(Rne,{className:"text-base"}),children:"更新管理"})]})]}),_.jsxs("div",{className:"flex items-center justify-between gap-2",children:[_.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[_.jsx(Va,{classNames:{base:"max-w-[240px]",input:"text-xs",inputWrapper:"h-7 border-gray-200 dark:border-gray-700"},placeholder:"搜索插件...",value:d,onValueChange:f,startContent:_.jsx(H5e,{className:"text-default-400 text-base"}),size:"sm",isClearable:!0,onClear:()=>f("")}),_.jsxs(OZe,{children:[_.jsx(IZe,{children:_.jsx(Ze,{variant:"flat",size:"sm",className:"h-7 px-2 min-w-[100px] bg-default-100/50 dark:bg-default-100/20",startContent:_.jsx("div",{className:"w-5 h-5 flex items-center justify-center",children:u==="all"?_.jsx(FF,{className:"text-base text-default-500"}):tZ(u).icon}),endContent:_.jsx(k5e,{className:"text-base text-default-400"}),children:u==="all"?"全部类型":tZ(u).tooltip})}),_.jsxs(PZe,{"aria-label":"插件类型筛选",selectedKeys:[u],selectionMode:"single",onSelectionChange:j=>c(Array.from(j)[0]),children:[_.jsx($_,{startContent:_.jsx(FF,{className:"text-base text-default-500"}),children:"全部类型"},"all"),_.jsx($_,{startContent:_.jsx(XA,{className:"text-lg text-[#CB3837]"}),children:"NPM 插件"},"npm"),_.jsx($_,{startContent:_.jsx(ZA,{className:"text-lg text-[#24292e]"}),children:"Git 插件"},"git"),_.jsx($_,{startContent:_.jsx(DO,{className:"text-lg text-primary-500"}),children:"应用插件"},"app")]})]})]}),_.jsx(Ze,{variant:"flat",size:"sm",onPress:$,className:"h-7 px-2 min-w-[76px] font-medium",startContent:_.jsx(uT,{className:"text-base"}),disabled:h,children:"刷新"})]})]})}),_.jsx("div",{className:"flex-1 min-h-0 mt-1",children:_.jsxs(Fa,{className:"h-full",children:[_.jsx(ms,{className:"p-0 overflow-hidden",children:_.jsx(EO,{className:"h-full",hideScrollBar:!0,children:w?_.jsx("div",{className:"h-full flex items-center justify-center",children:_.jsx(ey,{size:"lg",color:"primary"})}):E.length>0?_.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4 gap-3 p-3",children:E.map(j=>_.jsx(dXe,{plugin:j},j.name+j.time))}):_.jsx("div",{className:"h-full flex items-center justify-center",children:_.jsxs("div",{className:"text-center",children:[_.jsx("p",{className:"text-lg font-medium text-default-900 mb-1",children:"暂无插件"}),_.jsx("p",{className:"text-xs text-default-600",children:u==="all"?"当前没有任何插件":"没有找到符合条件的插件"})]})})})}),P.length>0&&_.jsx(I4e,{className:"flex justify-center py-2 px-3",children:_.jsx(JYe,{showControls:!0,showShadow:!0,color:"primary",size:"sm",page:r,total:Math.ceil(y.total/M),onChange:j=>e(j)})})]})}),_.jsx(aXe,{onMaximize:R,tasks:A.filter(j=>j.minimized)}),_.jsx(iXe,{isOpen:a,onClose:()=>i(!1),tasks:A,onMaximize:R}),_.jsx(uXe,{isOpen:o,onClose:()=>s(!1)}),O&&L&&t&&_.jsx(LO,{isOpen:!0,onClose:()=>{O.type==="uninstall"?N():k()},taskId:t,plugin:L,task:{...O,logs:O.logs||[]}})]})}const{createElement:g0,createContext:hXe,forwardRef:ape,useCallback:Ui,useContext:ipe,useEffect:Wp,useImperativeHandle:ope,useLayoutEffect:pXe,useMemo:vXe,useRef:Gi,useState:qm}=BX,rZ=BX[`useId${Math.random()}`.slice(0,5)],gXe=pXe,g5=hXe(null);g5.displayName="PanelGroupContext";const Kp=gXe,mXe=typeof rZ=="function"?rZ:()=>null;let yXe=0;function OO(r=null){const e=mXe(),t=Gi(r||e||null);return t.current===null&&(t.current=""+yXe++),r??t.current}function spe({children:r,className:e="",collapsedSize:t,collapsible:n,defaultSize:a,forwardedRef:i,id:o,maxSize:s,minSize:l,onCollapse:u,onExpand:c,onResize:d,order:f,style:h,tagName:v="div",...m}){const y=ipe(g5);if(y===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:b,expandPanel:w,getPanelSize:S,getPanelStyle:T,groupId:A,isPanelCollapsed:M,reevaluatePanelConstraints:P,registerPanel:E,resizePanel:R,unregisterPanel:N}=y,k=OO(o),O=Gi({callbacks:{onCollapse:u,onExpand:c,onResize:d},constraints:{collapsedSize:t,collapsible:n,defaultSize:a,maxSize:s,minSize:l},id:k,idIsFromProps:o!==void 0,order:f});Gi({didLogMissingDefaultSizeWarning:!1}),Kp(()=>{const{callbacks:$,constraints:j}=O.current,B={...j};O.current.id=k,O.current.idIsFromProps=o!==void 0,O.current.order=f,$.onCollapse=u,$.onExpand=c,$.onResize=d,j.collapsedSize=t,j.collapsible=n,j.defaultSize=a,j.maxSize=s,j.minSize=l,(B.collapsedSize!==j.collapsedSize||B.collapsible!==j.collapsible||B.maxSize!==j.maxSize||B.minSize!==j.minSize)&&P(O.current,B)}),Kp(()=>{const $=O.current;return E($),()=>{N($)}},[f,k,E,N]),ope(i,()=>({collapse:()=>{b(O.current)},expand:$=>{w(O.current,$)},getId(){return k},getSize(){return S(O.current)},isCollapsed(){return M(O.current)},isExpanded(){return!M(O.current)},resize:$=>{R(O.current,$)}}),[b,w,S,M,k,R]);const L=T(O.current,a);return g0(v,{...m,children:r,className:e,id:o,style:{...L,...h},"data-panel":"","data-panel-collapsible":n||void 0,"data-panel-group-id":A,"data-panel-id":k,"data-panel-size":parseFloat(""+L.flexGrow).toFixed(1)})}const Dm=ape((r,e)=>g0(spe,{...r,forwardedRef:e}));spe.displayName="Panel";Dm.displayName="forwardRef(Panel)";let Yk=null,Op=null;function bXe(r,e){if(e){const t=(e&fpe)!==0,n=(e&hpe)!==0,a=(e&ppe)!==0,i=(e&vpe)!==0;if(t)return a?"se-resize":i?"ne-resize":"e-resize";if(n)return a?"sw-resize":i?"nw-resize":"w-resize";if(a)return"s-resize";if(i)return"n-resize"}switch(r){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function xXe(){Op!==null&&(document.head.removeChild(Op),Yk=null,Op=null)}function wP(r,e){const t=bXe(r,e);Yk!==t&&(Yk=t,Op===null&&(Op=document.createElement("style"),document.head.appendChild(Op)),Op.innerHTML=`*{cursor: ${t}!important;}`)}function lpe(r){return r.type==="keydown"}function upe(r){return r.type.startsWith("pointer")}function cpe(r){return r.type.startsWith("mouse")}function m5(r){if(upe(r)){if(r.isPrimary)return{x:r.clientX,y:r.clientY}}else if(cpe(r))return{x:r.clientX,y:r.clientY};return{x:1/0,y:1/0}}function wXe(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function SXe(r,e,t){return r.x<e.x+e.width&&r.x+r.width>e.x&&r.y<e.y+e.height&&r.y+r.height>e.y}function _Xe(r,e){if(r===e)throw new Error("Cannot compare node with itself");const t={a:iZ(r),b:iZ(e)};let n;for(;t.a.at(-1)===t.b.at(-1);)r=t.a.pop(),e=t.b.pop(),n=r;er(n,"Stacking order can only be calculated for elements with a common ancestor");const a={a:aZ(nZ(t.a)),b:aZ(nZ(t.b))};if(a.a===a.b){const i=n.childNodes,o={a:t.a.at(-1),b:t.b.at(-1)};let s=i.length;for(;s--;){const l=i[s];if(l===o.a)return 1;if(l===o.b)return-1}}return Math.sign(a.a-a.b)}const CXe=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function TXe(r){var e;const t=getComputedStyle((e=dpe(r))!==null&&e!==void 0?e:r).display;return t==="flex"||t==="inline-flex"}function AXe(r){const e=getComputedStyle(r);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||TXe(r))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||CXe.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function nZ(r){let e=r.length;for(;e--;){const t=r[e];if(er(t,"Missing node"),AXe(t))return t}return null}function aZ(r){return r&&Number(getComputedStyle(r).zIndex)||0}function iZ(r){const e=[];for(;r;)e.push(r),r=dpe(r);return e}function dpe(r){const{parentNode:e}=r;return e&&e instanceof ShadowRoot?e.host:e}const fpe=1,hpe=2,ppe=4,vpe=8,EXe=wXe()==="coarse";let sl=[],Qm=!1,pf=new Map,y5=new Map;const qx=new Set;function MXe(r,e,t,n,a){var i;const{ownerDocument:o}=e,s={direction:t,element:e,hitAreaMargins:n,setResizeHandlerState:a},l=(i=pf.get(o))!==null&&i!==void 0?i:0;return pf.set(o,l+1),qx.add(s),pA(),function(){var c;y5.delete(r),qx.delete(s);const d=(c=pf.get(o))!==null&&c!==void 0?c:1;if(pf.set(o,d-1),pA(),d===1&&pf.delete(o),sl.includes(s)){const f=sl.indexOf(s);f>=0&&sl.splice(f,1),zO(),a("up",!0,null)}}}function oZ(r){const{target:e}=r,{x:t,y:n}=m5(r);Qm=!0,$O({target:e,x:t,y:n}),pA(),sl.length>0&&(vA("down",r),r.preventDefault(),r.stopPropagation())}function q1(r){const{x:e,y:t}=m5(r);if(Qm&&r.buttons===0&&(Qm=!1,vA("up",r)),!Qm){const{target:n}=r;$O({target:n,x:e,y:t})}vA("move",r),zO(),sl.length>0&&r.preventDefault()}function Zg(r){const{target:e}=r,{x:t,y:n}=m5(r);y5.clear(),Qm=!1,sl.length>0&&r.preventDefault(),vA("up",r),$O({target:e,x:t,y:n}),zO(),pA()}function $O({target:r,x:e,y:t}){sl.splice(0);let n=null;(r instanceof HTMLElement||r instanceof SVGElement)&&(n=r),qx.forEach(a=>{const{element:i,hitAreaMargins:o}=a,s=i.getBoundingClientRect(),{bottom:l,left:u,right:c,top:d}=s,f=EXe?o.coarse:o.fine;if(e>=u-f&&e<=c+f&&t>=d-f&&t<=l+f){if(n!==null&&document.contains(n)&&i!==n&&!i.contains(n)&&!n.contains(i)&&_Xe(n,i)>0){let v=n,m=!1;for(;v&&!v.contains(i);){if(SXe(v.getBoundingClientRect(),s)){m=!0;break}v=v.parentElement}if(m)return}sl.push(a)}})}function SP(r,e){y5.set(r,e)}function zO(){let r=!1,e=!1;sl.forEach(n=>{const{direction:a}=n;a==="horizontal"?r=!0:e=!0});let t=0;y5.forEach(n=>{t|=n}),r&&e?wP("intersection",t):r?wP("horizontal",t):e?wP("vertical",t):xXe()}function pA(){pf.forEach((r,e)=>{const{body:t}=e;t.removeEventListener("contextmenu",Zg),t.removeEventListener("pointerdown",oZ),t.removeEventListener("pointerleave",q1),t.removeEventListener("pointermove",q1)}),window.removeEventListener("pointerup",Zg),window.removeEventListener("pointercancel",Zg),qx.size>0&&(Qm?(sl.length>0&&pf.forEach((r,e)=>{const{body:t}=e;r>0&&(t.addEventListener("contextmenu",Zg),t.addEventListener("pointerleave",q1),t.addEventListener("pointermove",q1))}),window.addEventListener("pointerup",Zg),window.addEventListener("pointercancel",Zg)):pf.forEach((r,e)=>{const{body:t}=e;r>0&&(t.addEventListener("pointerdown",oZ,{capture:!0}),t.addEventListener("pointermove",q1))}))}function vA(r,e){qx.forEach(t=>{const{setResizeHandlerState:n}=t,a=sl.includes(t);n(r,a,e)})}function DXe(){const[r,e]=qm(0);return Ui(()=>e(t=>t+1),[])}function er(r,e){if(!r)throw console.error(e),Error(e)}const jO=10;function pv(r,e,t=jO){return r.toFixed(t)===e.toFixed(t)?0:r>e?1:-1}function vc(r,e,t=jO){return pv(r,e,t)===0}function ho(r,e,t){return pv(r,e,t)===0}function LXe(r,e,t){if(r.length!==e.length)return!1;for(let n=0;n<r.length;n++){const a=r[n],i=e[n];if(!ho(a,i,t))return!1}return!0}function Lm({panelConstraints:r,panelIndex:e,size:t}){const n=r[e];er(n!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:a=0,collapsible:i,maxSize:o=100,minSize:s=0}=n;if(pv(t,s)<0)if(i){const l=(a+s)/2;pv(t,l)<0?t=a:t=s}else t=s;return t=Math.min(o,t),t=parseFloat(t.toFixed(jO)),t}function mb({delta:r,initialLayout:e,panelConstraints:t,pivotIndices:n,prevLayout:a,trigger:i}){if(ho(r,0))return e;const o=[...e],[s,l]=n;er(s!=null,"Invalid first pivot index"),er(l!=null,"Invalid second pivot index");let u=0;if(i==="keyboard"){{const d=r<0?l:s,f=t[d];er(f,`Panel constraints not found for index ${d}`);const{collapsedSize:h=0,collapsible:v,minSize:m=0}=f;if(v){const y=e[d];if(er(y!=null,`Previous layout not found for panel index ${d}`),ho(y,h)){const b=m-y;pv(b,Math.abs(r))>0&&(r=r<0?0-b:b)}}}{const d=r<0?s:l,f=t[d];er(f,`No panel constraints found for index ${d}`);const{collapsedSize:h=0,collapsible:v,minSize:m=0}=f;if(v){const y=e[d];if(er(y!=null,`Previous layout not found for panel index ${d}`),ho(y,m)){const b=y-h;pv(b,Math.abs(r))>0&&(r=r<0?0-b:b)}}}}{const d=r<0?1:-1;let f=r<0?l:s,h=0;for(;;){const m=e[f];er(m!=null,`Previous layout not found for panel index ${f}`);const b=Lm({panelConstraints:t,panelIndex:f,size:100})-m;if(h+=b,f+=d,f<0||f>=t.length)break}const v=Math.min(Math.abs(r),Math.abs(h));r=r<0?0-v:v}{let f=r<0?s:l;for(;f>=0&&f<t.length;){const h=Math.abs(r)-Math.abs(u),v=e[f];er(v!=null,`Previous layout not found for panel index ${f}`);const m=v-h,y=Lm({panelConstraints:t,panelIndex:f,size:m});if(!ho(v,y)&&(u+=v-y,o[f]=y,u.toPrecision(3).localeCompare(Math.abs(r).toPrecision(3),void 0,{numeric:!0})>=0))break;r<0?f--:f++}}if(LXe(a,o))return a;{const d=r<0?l:s,f=e[d];er(f!=null,`Previous layout not found for panel index ${d}`);const h=f+u,v=Lm({panelConstraints:t,panelIndex:d,size:h});if(o[d]=v,!ho(v,h)){let m=h-v,b=r<0?l:s;for(;b>=0&&b<t.length;){const w=o[b];er(w!=null,`Previous layout not found for panel index ${b}`);const S=w+m,T=Lm({panelConstraints:t,panelIndex:b,size:S});if(ho(w,T)||(m-=T-w,o[b]=T),ho(m,0))break;r>0?b--:b++}}}const c=o.reduce((d,f)=>f+d,0);return ho(c,100)?o:a}function PXe({layout:r,panelsArray:e,pivotIndices:t}){let n=0,a=100,i=0,o=0;const s=t[0];er(s!=null,"No pivot index found"),e.forEach((d,f)=>{const{constraints:h}=d,{maxSize:v=100,minSize:m=0}=h;f===s?(n=m,a=v):(i+=m,o+=v)});const l=Math.min(a,100-i),u=Math.max(n,100-o),c=r[s];return{valueMax:l,valueMin:u,valueNow:c}}function Qx(r,e=document){return Array.from(e.querySelectorAll(`[data-panel-resize-handle-id][data-panel-group-id="${r}"]`))}function gpe(r,e,t=document){const a=Qx(r,t).findIndex(i=>i.getAttribute("data-panel-resize-handle-id")===e);return a??null}function mpe(r,e,t){const n=gpe(r,e,t);return n!=null?[n,n+1]:[-1,-1]}function ype(r,e=document){var t;if(e instanceof HTMLElement&&(e==null||(t=e.dataset)===null||t===void 0?void 0:t.panelGroupId)==r)return e;const n=e.querySelector(`[data-panel-group][data-panel-group-id="${r}"]`);return n||null}function b5(r,e=document){const t=e.querySelector(`[data-panel-resize-handle-id="${r}"]`);return t||null}function IXe(r,e,t,n=document){var a,i,o,s;const l=b5(e,n),u=Qx(r,n),c=l?u.indexOf(l):-1,d=(a=(i=t[c])===null||i===void 0?void 0:i.id)!==null&&a!==void 0?a:null,f=(o=(s=t[c+1])===null||s===void 0?void 0:s.id)!==null&&o!==void 0?o:null;return[d,f]}function kXe({committedValuesRef:r,eagerValuesRef:e,groupId:t,layout:n,panelDataArray:a,panelGroupElement:i,setLayout:o}){Gi({didWarnAboutMissingResizeHandle:!1}),Kp(()=>{if(!i)return;const s=Qx(t,i);for(let l=0;l<a.length-1;l++){const{valueMax:u,valueMin:c,valueNow:d}=PXe({layout:n,panelsArray:a,pivotIndices:[l,l+1]}),f=s[l];if(f!=null){const h=a[l];er(h,`No panel data found for index "${l}"`),f.setAttribute("aria-controls",h.id),f.setAttribute("aria-valuemax",""+Math.round(u)),f.setAttribute("aria-valuemin",""+Math.round(c)),f.setAttribute("aria-valuenow",d!=null?""+Math.round(d):"")}}return()=>{s.forEach((l,u)=>{l.removeAttribute("aria-controls"),l.removeAttribute("aria-valuemax"),l.removeAttribute("aria-valuemin"),l.removeAttribute("aria-valuenow")})}},[t,n,a,i]),Wp(()=>{if(!i)return;const s=e.current;er(s,"Eager values not found");const{panelDataArray:l}=s,u=ype(t,i);er(u!=null,`No group found for id "${t}"`);const c=Qx(t,i);er(c,`No resize handles found for group id "${t}"`);const d=c.map(f=>{const h=f.getAttribute("data-panel-resize-handle-id");er(h,"Resize handle element has no handle id attribute");const[v,m]=IXe(t,h,l,i);if(v==null||m==null)return()=>{};const y=b=>{if(!b.defaultPrevented)switch(b.key){case"Enter":{b.preventDefault();const w=l.findIndex(S=>S.id===v);if(w>=0){const S=l[w];er(S,`No panel data found for index ${w}`);const T=n[w],{collapsedSize:A=0,collapsible:M,minSize:P=0}=S.constraints;if(T!=null&&M){const E=mb({delta:ho(T,A)?P-A:A-T,initialLayout:n,panelConstraints:l.map(R=>R.constraints),pivotIndices:mpe(t,h,i),prevLayout:n,trigger:"keyboard"});n!==E&&o(E)}}break}}};return f.addEventListener("keydown",y),()=>{f.removeEventListener("keydown",y)}});return()=>{d.forEach(f=>f())}},[i,r,e,t,n,a,o])}function sZ(r,e){if(r.length!==e.length)return!1;for(let t=0;t<r.length;t++)if(r[t]!==e[t])return!1;return!0}function bpe(r,e){const t=r==="horizontal",{x:n,y:a}=m5(e);return t?n:a}function RXe(r,e,t,n,a){const i=t==="horizontal",o=b5(e,a);er(o,`No resize handle element found for id "${e}"`);const s=o.getAttribute("data-panel-group-id");er(s,"Resize handle element has no group id attribute");let{initialCursorPosition:l}=n;const u=bpe(t,r),c=ype(s,a);er(c,`No group element found for id "${s}"`);const d=c.getBoundingClientRect(),f=i?d.width:d.height;return(u-l)/f*100}function NXe(r,e,t,n,a,i){if(lpe(r)){const o=t==="horizontal";let s=0;r.shiftKey?s=100:a!=null?s=a:s=10;let l=0;switch(r.key){case"ArrowDown":l=o?0:s;break;case"ArrowLeft":l=o?-s:0;break;case"ArrowRight":l=o?s:0;break;case"ArrowUp":l=o?0:-s;break;case"End":l=100;break;case"Home":l=-100;break}return l}else return n==null?0:RXe(r,e,t,n,i)}function OXe({panelDataArray:r}){const e=Array(r.length),t=r.map(i=>i.constraints);let n=0,a=100;for(let i=0;i<r.length;i++){const o=t[i];er(o,`Panel constraints not found for index ${i}`);const{defaultSize:s}=o;s!=null&&(n++,e[i]=s,a-=s)}for(let i=0;i<r.length;i++){const o=t[i];er(o,`Panel constraints not found for index ${i}`);const{defaultSize:s}=o;if(s!=null)continue;const l=r.length-n,u=a/l;n++,e[i]=u,a-=u}return e}function Xg(r,e,t){e.forEach((n,a)=>{const i=r[a];er(i,`Panel data not found for index ${a}`);const{callbacks:o,constraints:s,id:l}=i,{collapsedSize:u=0,collapsible:c}=s,d=t[l];if(d==null||n!==d){t[l]=n;const{onCollapse:f,onExpand:h,onResize:v}=o;v&&v(n,d),c&&(f||h)&&(h&&(d==null||vc(d,u))&&!vc(n,u)&&h(),f&&(d==null||!vc(d,u))&&vc(n,u)&&f())}})}function z_(r,e){if(r.length!==e.length)return!1;for(let t=0;t<r.length;t++)if(r[t]!=e[t])return!1;return!0}function $Xe({defaultSize:r,dragState:e,layout:t,panelData:n,panelIndex:a,precision:i=3}){const o=t[a];let s;return o==null?s=r!=null?r.toPrecision(i):"1":n.length===1?s="1":s=o.toPrecision(i),{flexBasis:0,flexGrow:s,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function zXe(r,e=10){let t=null;return(...a)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{r(...a)},e)}}function lZ(r){try{if(typeof localStorage<"u")r.getItem=e=>localStorage.getItem(e),r.setItem=(e,t)=>{localStorage.setItem(e,t)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),r.getItem=()=>null,r.setItem=()=>{}}}function xpe(r){return`react-resizable-panels:${r}`}function wpe(r){return r.map(e=>{const{constraints:t,id:n,idIsFromProps:a,order:i}=e;return a?n:i?`${i}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(",")}function Spe(r,e){try{const t=xpe(r),n=e.getItem(t);if(n){const a=JSON.parse(n);if(typeof a=="object"&&a!=null)return a}}catch{}return null}function jXe(r,e,t){var n,a;const i=(n=Spe(r,t))!==null&&n!==void 0?n:{},o=wpe(e);return(a=i[o])!==null&&a!==void 0?a:null}function BXe(r,e,t,n,a){var i;const o=xpe(r),s=wpe(e),l=(i=Spe(r,a))!==null&&i!==void 0?i:{};l[s]={expandToSizes:Object.fromEntries(t.entries()),layout:n};try{a.setItem(o,JSON.stringify(l))}catch(u){console.error(u)}}function uZ({layout:r,panelConstraints:e}){const t=[...r],n=t.reduce((i,o)=>i+o,0);if(t.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${t.map(i=>`${i}%`).join(", ")}`);if(!ho(n,100)&&t.length>0)for(let i=0;i<e.length;i++){const o=t[i];er(o!=null,`No layout data found for index ${i}`);const s=100/n*o;t[i]=s}let a=0;for(let i=0;i<e.length;i++){const o=t[i];er(o!=null,`No layout data found for index ${i}`);const s=Lm({panelConstraints:e,panelIndex:i,size:o});o!=s&&(a+=o-s,t[i]=s)}if(!ho(a,0))for(let i=0;i<e.length;i++){const o=t[i];er(o!=null,`No layout data found for index ${i}`);const s=o+a,l=Lm({panelConstraints:e,panelIndex:i,size:s});if(o!==l&&(a-=l-o,t[i]=l,ho(a,0)))break}return t}const VXe=100,yb={getItem:r=>(lZ(yb),yb.getItem(r)),setItem:(r,e)=>{lZ(yb),yb.setItem(r,e)}},cZ={};function _pe({autoSaveId:r=null,children:e,className:t="",direction:n,forwardedRef:a,id:i=null,onLayout:o=null,keyboardResizeBy:s=null,storage:l=yb,style:u,tagName:c="div",...d}){const f=OO(i),h=Gi(null),[v,m]=qm(null),[y,b]=qm([]),w=DXe(),S=Gi({}),T=Gi(new Map),A=Gi(0),M=Gi({autoSaveId:r,direction:n,dragState:v,id:f,keyboardResizeBy:s,onLayout:o,storage:l}),P=Gi({layout:y,panelDataArray:[],panelDataArrayChanged:!1});Gi({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),ope(a,()=>({getId:()=>M.current.id,getLayout:()=>{const{layout:Z}=P.current;return Z},setLayout:Z=>{const{onLayout:Y}=M.current,{layout:X,panelDataArray:re}=P.current,oe=uZ({layout:Z,panelConstraints:re.map(ae=>ae.constraints)});sZ(X,oe)||(b(oe),P.current.layout=oe,Y&&Y(oe),Xg(re,oe,S.current))}}),[]),Kp(()=>{M.current.autoSaveId=r,M.current.direction=n,M.current.dragState=v,M.current.id=f,M.current.onLayout=o,M.current.storage=l}),kXe({committedValuesRef:M,eagerValuesRef:P,groupId:f,layout:y,panelDataArray:P.current.panelDataArray,setLayout:b,panelGroupElement:h.current}),Wp(()=>{const{panelDataArray:Z}=P.current;if(r){if(y.length===0||y.length!==Z.length)return;let Y=cZ[r];Y==null&&(Y=zXe(BXe,VXe),cZ[r]=Y);const X=[...Z],re=new Map(T.current);Y(r,X,re,y,l)}},[r,y,l]),Wp(()=>{});const E=Ui(Z=>{const{onLayout:Y}=M.current,{layout:X,panelDataArray:re}=P.current;if(Z.constraints.collapsible){const oe=re.map(fe=>fe.constraints),{collapsedSize:ae=0,panelSize:se,pivotIndices:le}=op(re,Z,X);if(er(se!=null,`Panel size not found for panel "${Z.id}"`),!vc(se,ae)){T.current.set(Z.id,se);const ve=lm(re,Z)===re.length-1?se-ae:ae-se,pe=mb({delta:ve,initialLayout:X,panelConstraints:oe,pivotIndices:le,prevLayout:X,trigger:"imperative-api"});z_(X,pe)||(b(pe),P.current.layout=pe,Y&&Y(pe),Xg(re,pe,S.current))}}},[]),R=Ui((Z,Y)=>{const{onLayout:X}=M.current,{layout:re,panelDataArray:oe}=P.current;if(Z.constraints.collapsible){const ae=oe.map(Re=>Re.constraints),{collapsedSize:se=0,panelSize:le=0,minSize:fe=0,pivotIndices:ve}=op(oe,Z,re),pe=Y??fe;if(vc(le,se)){const Re=T.current.get(Z.id),Ae=Re!=null&&Re>=pe?Re:pe,Se=lm(oe,Z)===oe.length-1?le-Ae:Ae-le,ee=mb({delta:Se,initialLayout:re,panelConstraints:ae,pivotIndices:ve,prevLayout:re,trigger:"imperative-api"});z_(re,ee)||(b(ee),P.current.layout=ee,X&&X(ee),Xg(oe,ee,S.current))}}},[]),N=Ui(Z=>{const{layout:Y,panelDataArray:X}=P.current,{panelSize:re}=op(X,Z,Y);return er(re!=null,`Panel size not found for panel "${Z.id}"`),re},[]),k=Ui((Z,Y)=>{const{panelDataArray:X}=P.current,re=lm(X,Z);return $Xe({defaultSize:Y,dragState:v,layout:y,panelData:X,panelIndex:re})},[v,y]),O=Ui(Z=>{const{layout:Y,panelDataArray:X}=P.current,{collapsedSize:re=0,collapsible:oe,panelSize:ae}=op(X,Z,Y);return er(ae!=null,`Panel size not found for panel "${Z.id}"`),oe===!0&&vc(ae,re)},[]),L=Ui(Z=>{const{layout:Y,panelDataArray:X}=P.current,{collapsedSize:re=0,collapsible:oe,panelSize:ae}=op(X,Z,Y);return er(ae!=null,`Panel size not found for panel "${Z.id}"`),!oe||pv(ae,re)>0},[]),$=Ui(Z=>{const{panelDataArray:Y}=P.current;Y.push(Z),Y.sort((X,re)=>{const oe=X.order,ae=re.order;return oe==null&&ae==null?0:oe==null?-1:ae==null?1:oe-ae}),P.current.panelDataArrayChanged=!0,w()},[w]);Kp(()=>{if(P.current.panelDataArrayChanged){P.current.panelDataArrayChanged=!1;const{autoSaveId:Z,onLayout:Y,storage:X}=M.current,{layout:re,panelDataArray:oe}=P.current;let ae=null;if(Z){const le=jXe(Z,oe,X);le&&(T.current=new Map(Object.entries(le.expandToSizes)),ae=le.layout)}ae==null&&(ae=OXe({panelDataArray:oe}));const se=uZ({layout:ae,panelConstraints:oe.map(le=>le.constraints)});sZ(re,se)||(b(se),P.current.layout=se,Y&&Y(se),Xg(oe,se,S.current))}}),Kp(()=>{const Z=P.current;return()=>{Z.layout=[]}},[]);const j=Ui(Z=>{let Y=!1;const X=h.current;return X&&window.getComputedStyle(X,null).getPropertyValue("direction")==="rtl"&&(Y=!0),function(oe){oe.preventDefault();const ae=h.current;if(!ae)return()=>null;const{direction:se,dragState:le,id:fe,keyboardResizeBy:ve,onLayout:pe}=M.current,{layout:Re,panelDataArray:Ae}=P.current,{initialLayout:ie}=le??{},Se=mpe(fe,Z,ae);let ee=NXe(oe,Z,se,le,ve,ae);const te=se==="horizontal";te&&Y&&(ee=-ee);const de=Ae.map(Te=>Te.constraints),ye=mb({delta:ee,initialLayout:ie??Re,panelConstraints:de,pivotIndices:Se,prevLayout:Re,trigger:lpe(oe)?"keyboard":"mouse-or-touch"}),xe=!z_(Re,ye);(upe(oe)||cpe(oe))&&A.current!=ee&&(A.current=ee,!xe&&ee!==0?te?SP(Z,ee<0?fpe:hpe):SP(Z,ee<0?ppe:vpe):SP(Z,0)),xe&&(b(ye),P.current.layout=ye,pe&&pe(ye),Xg(Ae,ye,S.current))}},[]),B=Ui((Z,Y)=>{const{onLayout:X}=M.current,{layout:re,panelDataArray:oe}=P.current,ae=oe.map(Re=>Re.constraints),{panelSize:se,pivotIndices:le}=op(oe,Z,re);er(se!=null,`Panel size not found for panel "${Z.id}"`);const ve=lm(oe,Z)===oe.length-1?se-Y:Y-se,pe=mb({delta:ve,initialLayout:re,panelConstraints:ae,pivotIndices:le,prevLayout:re,trigger:"imperative-api"});z_(re,pe)||(b(pe),P.current.layout=pe,X&&X(pe),Xg(oe,pe,S.current))},[]),H=Ui((Z,Y)=>{const{layout:X,panelDataArray:re}=P.current,{collapsedSize:oe=0,collapsible:ae}=Y,{collapsedSize:se=0,collapsible:le,maxSize:fe=100,minSize:ve=0}=Z.constraints,{panelSize:pe}=op(re,Z,X);pe!=null&&(ae&&le&&vc(pe,oe)?vc(oe,se)||B(Z,se):pe<ve?B(Z,ve):pe>fe&&B(Z,fe))},[B]),F=Ui((Z,Y)=>{const{direction:X}=M.current,{layout:re}=P.current;if(!h.current)return;const oe=b5(Z,h.current);er(oe,`Drag handle element not found for id "${Z}"`);const ae=bpe(X,Y);m({dragHandleId:Z,dragHandleRect:oe.getBoundingClientRect(),initialCursorPosition:ae,initialLayout:re})},[]),K=Ui(()=>{m(null)},[]),U=Ui(Z=>{const{panelDataArray:Y}=P.current,X=lm(Y,Z);X>=0&&(Y.splice(X,1),delete S.current[Z.id],P.current.panelDataArrayChanged=!0,w())},[w]),V=vXe(()=>({collapsePanel:E,direction:n,dragState:v,expandPanel:R,getPanelSize:N,getPanelStyle:k,groupId:f,isPanelCollapsed:O,isPanelExpanded:L,reevaluatePanelConstraints:H,registerPanel:$,registerResizeHandle:j,resizePanel:B,startDragging:F,stopDragging:K,unregisterPanel:U,panelGroupElement:h.current}),[E,v,n,R,N,k,f,O,L,H,$,j,B,F,K,U]),Q={display:"flex",flexDirection:n==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return g0(g5.Provider,{value:V},g0(c,{...d,children:e,className:t,id:i,ref:h,style:{...Q,...u},"data-panel-group":"","data-panel-group-direction":n,"data-panel-group-id":f}))}const gA=ape((r,e)=>g0(_pe,{...r,forwardedRef:e}));_pe.displayName="PanelGroup";gA.displayName="forwardRef(PanelGroup)";function lm(r,e){return r.findIndex(t=>t===e||t.id===e.id)}function op(r,e,t){const n=lm(r,e),i=n===r.length-1?[n-1,n]:[n,n+1],o=t[n];return{...e.constraints,panelSize:o,pivotIndices:i}}function FXe({disabled:r,handleId:e,resizeHandler:t,panelGroupElement:n}){Wp(()=>{if(r||t==null||n==null)return;const a=b5(e,n);if(a==null)return;const i=o=>{if(!o.defaultPrevented)switch(o.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{o.preventDefault(),t(o);break}case"F6":{o.preventDefault();const s=a.getAttribute("data-panel-group-id");er(s,`No group element found for id "${s}"`);const l=Qx(s,n),u=gpe(s,e,n);er(u!==null,`No resize element found for id "${e}"`);const c=o.shiftKey?u>0?u-1:l.length-1:u+1<l.length?u+1:0;l[c].focus();break}}};return a.addEventListener("keydown",i),()=>{a.removeEventListener("keydown",i)}},[n,r,e,t])}function mA({children:r=null,className:e="",disabled:t=!1,hitAreaMargins:n,id:a,onBlur:i,onDragging:o,onFocus:s,style:l={},tabIndex:u=0,tagName:c="div",...d}){var f,h;const v=Gi(null),m=Gi({onDragging:o});Wp(()=>{m.current.onDragging=o});const y=ipe(g5);if(y===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:b,groupId:w,registerResizeHandle:S,startDragging:T,stopDragging:A,panelGroupElement:M}=y,P=OO(a),[E,R]=qm("inactive"),[N,k]=qm(!1),[O,L]=qm(null),$=Gi({state:E});Kp(()=>{$.current.state=E}),Wp(()=>{if(t)L(null);else{const F=S(P);L(()=>F)}},[t,P,S]);const j=(f=n==null?void 0:n.coarse)!==null&&f!==void 0?f:15,B=(h=n==null?void 0:n.fine)!==null&&h!==void 0?h:5;return Wp(()=>{if(t||O==null)return;const F=v.current;return er(F,"Element ref not attached"),MXe(P,F,b,{coarse:j,fine:B},(U,V,Q)=>{if(V)switch(U){case"down":{R("drag"),er(Q,'Expected event to be defined for "down" action'),T(P,Q);const{onDragging:Z}=m.current;Z&&Z(!0);break}case"move":{const{state:Z}=$.current;Z!=="drag"&&R("hover"),er(Q,'Expected event to be defined for "move" action'),O(Q);break}case"up":{R("hover"),A();const{onDragging:Z}=m.current;Z&&Z(!1);break}}else R("inactive")})},[j,b,t,B,S,P,O,T,A]),FXe({disabled:t,handleId:P,resizeHandler:O,panelGroupElement:M}),g0(c,{...d,children:r,className:e,id:a,onBlur:()=>{k(!1),i==null||i()},onFocus:()=>{k(!0),s==null||s()},ref:v,role:"separator",style:{...{touchAction:"none",userSelect:"none"},...l},tabIndex:u,"data-panel-group-direction":b,"data-panel-group-id":w,"data-resize-handle":"","data-resize-handle-active":E==="drag"?"pointer":N?"keyboard":void 0,"data-resize-handle-state":E,"data-panel-resize-handle-enabled":!t,"data-panel-resize-handle-id":P})}mA.displayName="PanelResizeHandle";const Cpe=({className:r,...e})=>_.jsx(gA,{className:npe("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",r),...e}),yA=Dm,Tpe=({withHandle:r,className:e,...t})=>_.jsx(mA,{className:npe("relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",e),...t,children:r&&_.jsx("div",{className:"z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border",children:_.jsx(QYe,{className:"h-2.5 w-2.5"})})});function HXe(r){var e,t;const n=Vr(),[a,i]=oa(r,cF.variantKeys),{ref:o,as:s,src:l,className:u,classNames:c,loading:d,isBlurred:f,fallbackSrc:h,isLoading:v,disableSkeleton:m=!!h,removeWrapper:y=!1,onError:b,onLoad:w,srcSet:S,sizes:T,crossOrigin:A,...M}=a,P=epe({src:l,loading:d,onError:b,onLoad:w,ignoreFallback:!1,srcSet:S,sizes:T,crossOrigin:A}),E=(t=(e=r.disableAnimation)!=null?e:n==null?void 0:n.disableAnimation)!=null?t:!1,R=P==="loaded"&&!v,N=P==="loading"||v,k=r.isZoomed,O=s||"img",L=$r(o),{w:$,h:j}=D.useMemo(()=>({w:a.width?typeof a.width=="number"?`${a.width}px`:a.width:"fit-content",h:a.height?typeof a.height=="number"?`${a.height}px`:a.height:"auto"}),[a==null?void 0:a.width,a==null?void 0:a.height]),B=(!l||!R)&&!!h,H=N&&!m,F=D.useMemo(()=>cF({...i,disableAnimation:E,showSkeleton:H}),[eo(i),E,H]),K=lt(u,c==null?void 0:c.img),U=(Z={})=>{const Y=lt(K,Z==null?void 0:Z.className);return{src:l,ref:L,"data-loaded":je(R),className:F.img({class:Y}),loading:d,srcSet:S,sizes:T,crossOrigin:A,...M,style:{...(M==null?void 0:M.height)&&{height:j},...Z.style,...M.style}}},V=D.useCallback(()=>{const Z=B?{backgroundImage:`url(${h})`}:{};return{className:F.wrapper({class:c==null?void 0:c.wrapper}),style:{...Z,maxWidth:$}}},[F,B,h,c==null?void 0:c.wrapper,$]),Q=D.useCallback(()=>({src:l,"aria-hidden":je(!0),className:F.blurredImg({class:c==null?void 0:c.blurredImg})}),[F,l,c==null?void 0:c.blurredImg]);return{Component:O,domRef:L,slots:F,classNames:c,isBlurred:f,disableSkeleton:m,fallbackSrc:h,removeWrapper:y,isZoomed:k,isLoading:N,getImgProps:U,getWrapperProps:V,getBlurredImgProps:Q}}var Ape=Ht((r,e)=>{const{Component:t,domRef:n,slots:a,classNames:i,isBlurred:o,isZoomed:s,fallbackSrc:l,removeWrapper:u,disableSkeleton:c,getImgProps:d,getWrapperProps:f,getBlurredImgProps:h}=HXe({...r,ref:e}),v=_.jsx(t,{ref:n,...d()});if(u)return v;const m=_.jsx("div",{className:a.zoomedWrapper({class:i==null?void 0:i.zoomedWrapper}),children:v});return o?_.jsxs("div",{...f(),children:[s?m:v,D.cloneElement(v,h())]}):s||!c||l?_.jsxs("div",{...f(),children:[" ",s?m:v]}):v});Ape.displayName="HeroUI.Image";var ll=Ape;function UXe(){const r=D.useRef(null),[e,t]=D.useState(!1),[n,a]=D.useState(!1),[i,o]=D.useState(null),[s,l]=D.useState(!1),[u,c]=D.useState({id:"karin",name:"Karin",avatar:"/web/karin.png"});return D.useEffect(()=>((async()=>{if(r.current)return;t(!0);const{authKey:f}=await or.serverPost("/api/v1/sandbox/url"),h=new URL(window.location.href);h.protocol=h.protocol.replace("http","ws"),h.pathname="/sandbox",h.searchParams.set("authorization",f);const v=h.toString(),m=new WebSocket(v);r.current=m,m.onopen=()=>{t(!1),a(!0)},m.onmessage=y=>{const b=JSON.parse(y.data);b.action==="init"&&(l(!0),c(b.param))},m.onclose=()=>{t(!1),a(!1)},m.onerror=y=>{o(y),console.error("WebSocket error:",y)}})(),()=>{var f;t(!1),a(!1),o(null),l(!1),(f=r.current)==null||f.close(),r.current=null}),[]),{connecting:e,connected:n,error:i,ready:s,ws:r.current,botInfo:u}}const Epe=D.createContext({ws:{connecting:!1,connected:!1,error:null,ready:!1,ws:null,botInfo:{id:"karin",name:"Karin",avatar:"/web/karin.png"}}});function GXe({children:r}){const e=UXe();return _.jsx(Epe.Provider,{value:{ws:e},children:r})}function qXe(){const r=D.useContext(Epe);if(!r)throw new Error("useSandbox must be used within a SandboxProvider");return r}const dZ=r=>{const{icon:e,activeIcon:t,className:n,isActive:a,onClick:i,href:o}=r,s=Su(),l=m2(`${o}/*`),u=o?!!l:a;return _.jsxs("div",{className:Gr("aspect-square rounded-lg flex items-center justify-center text-2xl !bg-opacity-50 relative transition-colors",u?"bg-zinc-300 dark:bg-zinc-700 !bg-opacity-100":"hover:bg-zinc-300 dark:hover:bg-zinc-700 dark:active:text-zinc-600 active:text-zinc-400",n),onClick:()=>{o&&!u&&s(o,{replace:!0}),i&&!u&&i()},children:[_.jsx("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2",children:e}),_.jsx("div",{className:Gr("absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 text-blue-500 transition-opacity",u?"clip-path-circle-active":"clip-path-circle"),children:t})]})},QXe=()=>{const r=qXe(),{ws:e}=r,{botInfo:t}=e;return _.jsxs("div",{className:"select-none flex flex-col items-stretch px-2 flex-1",children:[_.jsx("div",{className:"aspect-square rounded-full my-4",children:_.jsx(ll,{src:t.avatar,className:"w-full h-full rounded-full",alt:"avatar"})}),_.jsxs("div",{className:"flex flex-1 flex-col items-stretch gap-2 pb-3",children:[_.jsx(dZ,{icon:_.jsx(rZe,{}),activeIcon:_.jsx(eZe,{}),href:"/sandbox/chat"}),_.jsx(dZ,{icon:_.jsx(nZe,{}),activeIcon:_.jsx(tZe,{}),href:"/sandbox/contact"}),_.jsx("div",{className:"mt-auto"})]})]})},WXe=D.memo(r=>{const{type:e,id:t,align:n="center",startContent:a,endContent:i,className:o,classNames:s,onChange:l,value:u,...c}=r,[d,f]=D.useState(""),[h,v]=D.useState(e);D.useEffect(()=>{f(u??"")},[u]);const m=()=>{f("")},y=()=>{v(b=>b===e?"text":e)};return _.jsxs("div",{className:Gr(s==null?void 0:s.container,o,"group flex w-full text-zinc-950 bg-opacity-50 dark:bg-opacity-60 bg-zinc-300 rounded-md dark:bg-gray-800 dark:text-gray-300 focus-within:ring-blue-300 focus-within:ring-opacity-40 dark:focus-within:border-blue-300 focus-within:outline-none focus-within:ring hover:bg-opacity-80 focus-within:!bg-opacity-100 transition-colors duration-300 relative cursor-text"),children:[_.jsxs("label",{htmlFor:t,className:"flex items-center flex-grow-0 flex-shrink-0 pl-3 pr-2",children:[e==="password"?_.jsx("label",{htmlFor:t,className:"cursor-auto",onClick:y,children:h==="password"?_.jsx(z5e,{className:"text-gray-400 dark:text-gray-500"}):_.jsx($5e,{className:"text-gray-400 dark:text-gray-500"})}):null,a]}),_.jsx("input",{id:t,type:h,value:d,className:Gr(s==null?void 0:s.input,"block outline-none w-full py-3 bg-transparent placeholder:text-zinc-700 focus:placeholder:text-zinc-400 dark:placeholder-gray-500 dark:focus:placeholder-gray-700",n==="left"&&"text-left",n==="center"&&"text-center",n==="right"&&"text-right"),onChange:b=>{f(b.target.value),l&&l(b)},...c}),_.jsxs("label",{htmlFor:t,className:Gr("flex items-center flex-grow-0 flex-shrink-0 pr-3 pl-2 cursor-text","opacity-0 group-focus-within:opacity-100 group-hover:opacity-100 active:opacity-100"),children:[_.jsx("label",{htmlFor:t,className:"cursor-auto",onClick:m,children:_.jsx(kne,{className:"text-gray-400 dark:text-gray-500"})}),i]})]})});var _P={exports:{}},CP={};/**
|
|
379
|
+
*/const qYe=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],QYe=Rhe("GripVertical",qYe);var Nhe=Ht((r,e)=>{const{as:t,activePage:n,...a}=r,i=t||"span",o=$r(e);return _.jsx(i,{ref:o,"aria-hidden":!0,...a,children:n})});Nhe.displayName="HeroUI.PaginationCursor";var WYe=Nhe;function KYe(r){const{as:e,ref:t,value:n,children:a,isActive:i,isDisabled:o,onPress:s,onClick:l,getAriaLabel:u,className:c,...d}=r,f=!!(r!=null&&r.href),h=e||f?"a":"li",v=typeof h=="string",m=$r(t),y=A2(),b=D.useMemo(()=>i?`${u==null?void 0:u(n)} active`:u==null?void 0:u(n),[n,i]),{isPressed:w,pressProps:S}=Ss({isDisabled:o,onPress:s}),{focusProps:T,isFocused:A,isFocusVisible:M}=Rn({}),{isHovered:P,hoverProps:E}=Ia({isDisabled:o});return{Component:h,children:a,ariaLabel:b,isFocused:A,isFocusVisible:M,getItemProps:(N={})=>({ref:m,role:"button",tabIndex:o?-1:0,"aria-label":b,"aria-current":je(i),"aria-disabled":je(o),"data-disabled":je(o),"data-active":je(i),"data-focus":je(A),"data-hover":je(P),"data-pressed":je(w),"data-focus-visible":je(M),...ze(N,S,T,E,Pa(d,{enabled:v})),className:lt(c,N.className),onClick:k=>{Un(S==null?void 0:S.onClick,l)(k),!y.isNative&&k.currentTarget instanceof HTMLAnchorElement&&k.currentTarget.href&&!k.isDefaultPrevented()&&D8(k.currentTarget,k)&&N.href&&(k.preventDefault(),y.open(k.currentTarget,k,N.href,N.routerOptions))}})}}var Ohe=Ht((r,e)=>{const{Component:t,children:n,getItemProps:a}=KYe({...r,ref:e});return _.jsx(t,{...a(),children:n})});Ohe.displayName="HeroUI.PaginationItem";var O_=Ohe,ri=(r=>(r.DOTS="dots",r.PREV="prev",r.NEXT="next",r))(ri||{});function YYe(r){const{page:e,total:t,siblings:n=1,boundaries:a=1,initialPage:i=1,showControls:o=!1,onChange:s}=r,[l,u]=D.useState(e||i),{direction:c}=t3(),d=c==="rtl",f=T=>{u(T),s&&s(T)};D.useEffect(()=>{e&&e!==l&&u(e)},[e]);const h=D.useCallback(T=>{T<=0?f(1):T>t?f(t):f(T)},[t,l,f]),v=()=>h(d?l-1:l+1),m=()=>h(d?l+1:l-1),y=()=>h(d?t:1),b=()=>h(d?1:t),w=D.useCallback(T=>o?d?["next",...T,"prev"]:["prev",...T,"next"]:T,[d,o]);return{range:D.useMemo(()=>{if(n*2+3+a*2>=t)return w(zd(1,t));const A=Math.max(l-n,a),M=Math.min(l+n,t-a),P=A>a+2,E=M<t-(a+1);if(!P&&E){const R=n*2+a+2;return w([...zd(1,R),"dots",...zd(t-(a-1),t)])}if(P&&!E){const R=a+1+2*n;return w([...zd(1,a),"dots",...zd(t-R,t)])}return w([...zd(1,a),"dots",...zd(A,M),"dots",...zd(t-a+1,t)])},[t,l,n,a,w]),activePage:l,setPage:h,next:v,previous:m,first:y,last:b}}function ZYe({threshold:r=0,root:e=null,rootMargin:t="0%",isEnabled:n=!0,freezeOnceVisible:a=!1,initialIsIntersecting:i=!1,onChange:o}={}){var s;const[l,u]=D.useState(null),[c,d]=D.useState(()=>({isIntersecting:i,entry:void 0})),f=D.useRef();f.current=o;const h=((s=c.entry)==null?void 0:s.isIntersecting)&&a;D.useEffect(()=>{if(!n||!l||!("IntersectionObserver"in window)||h)return;const y=new IntersectionObserver(b=>{const w=Array.isArray(y.thresholds)?y.thresholds:[y.thresholds];b.forEach(S=>{const T=S.isIntersecting&&w.some(A=>S.intersectionRatio>=A);d({isIntersecting:T,entry:S}),f.current&&f.current(T,S)})},{threshold:r,root:e,rootMargin:t});return y.observe(l),()=>{y.disconnect()}},[l,n,JSON.stringify(r),e,t,h,a]);const v=D.useRef(null);D.useEffect(()=>{var y;!l&&((y=c.entry)!=null&&y.target)&&!a&&!h&&v.current!==c.entry.target&&(v.current=c.entry.target,d({isIntersecting:i,entry:void 0}))},[l,c.entry,a,h,i]);const m=[u,!!c.isIntersecting,c.entry];return m.ref=m[0],m.isIntersecting=m[1],m.entry=m[2],m}var ZY=300;function XYe(r){var e,t,n,a;const i=Vr(),[o,s]=oa(r,uF.variantKeys),{as:l,ref:u,classNames:c,dotsJump:d=5,loop:f=!1,showControls:h=!1,total:v=1,initialPage:m=1,page:y,siblings:b,boundaries:w,onChange:S,className:T,renderItem:A,getItemAriaLabel:M,...P}=o,E=l||"nav",R=$r(u),N=D.useRef(null),k=D.useRef(),O=D.useRef(),{direction:L}=t3(),$=L==="rtl",j=(t=(e=r==null?void 0:r.disableAnimation)!=null?e:i==null?void 0:i.disableAnimation)!=null?t:!1,B=(a=(n=r==null?void 0:r.disableCursorAnimation)!=null?n:j)!=null?a:!1;function H(){return k.current||(k.current=new Map),k.current}function F(te,de){const ye=H();te?ye.set(de,te):ye.delete(de)}function K(te,de){const xe=H().get(te);if(!xe||!N.current)return;O.current&&clearTimeout(O.current),Lhe(xe,{scrollMode:"always",behavior:"smooth",block:"start",inline:"start",boundary:R.current});const{offsetLeft:Te}=xe;if(de){N.current.setAttribute("data-moving","false"),N.current.style.transform=`translateX(${Te}px) scale(1)`;return}N.current.setAttribute("data-moving","true"),N.current.style.transform=`translateX(${Te}px) scale(1.1)`,O.current=setTimeout(()=>{N.current&&(N.current.style.transform=`translateX(${Te}px) scale(1)`),O.current=setTimeout(()=>{var ke;(ke=N.current)==null||ke.setAttribute("data-moving","false"),O.current&&clearTimeout(O.current)},ZY)},ZY)}const{range:U,activePage:V,setPage:Q,previous:Z,next:Y,first:X,last:re}=YYe({page:y,total:v,initialPage:m,siblings:b,boundaries:w,showControls:h,onChange:S}),[oe,ae]=ZYe();D.useEffect(()=>{R.current&&oe(R.current)},[R.current]);const se=D.useRef(V);D.useEffect(()=>{V&&!j&&ae&&K(V,V===se.current),se.current=V},[V,j,B,ae,r.dotsJump,r.isCompact,r.showControls]);const le=D.useMemo(()=>uF({...s,disableAnimation:j,disableCursorAnimation:B}),[eo(s),B,j]),fe=lt(c==null?void 0:c.base,T);return{Component:E,showControls:h,dotsJump:d,slots:le,classNames:c,loop:f,total:v,range:U,activePage:V,getItemRef:F,disableAnimation:j,disableCursorAnimation:B,setPage:Q,onPrevious:()=>f&&V===($?v:1)?re():Z(),onNext:()=>f&&V===($?1:v)?X():Y(),renderItem:A,getBaseProps:(te={})=>({...te,ref:R,role:"navigation","aria-label":te["aria-label"]||"pagination navigation","data-slot":"base","data-controls":je(h),"data-loop":je(f),"data-dots-jump":d,"data-total":v,"data-active-page":V,className:le.base({class:lt(fe,te==null?void 0:te.className)}),...P}),getWrapperProps:(te={})=>({...te,"data-slot":"wrapper",className:le.wrapper({class:lt(c==null?void 0:c.wrapper,te==null?void 0:te.className)})}),getItemProps:(te={})=>({...te,ref:de=>F(de,te.value),"data-slot":"item",isActive:te.value===V,className:le.item({class:lt(c==null?void 0:c.item,te==null?void 0:te.className)}),onPress:()=>{te.value!==V&&Q(te.value)}}),getCursorProps:(te={})=>({...te,ref:N,activePage:V,"data-slot":"cursor",className:le.cursor({class:lt(c==null?void 0:c.cursor,te==null?void 0:te.className)})}),getItemAriaLabel:te=>{if(te){if(M)return M(te);switch(te){case ri.DOTS:return"dots element";case ri.PREV:return"previous page button";case ri.NEXT:return"next page button";case"first":return"first page button";case"last":return"last page button";default:return`pagination item ${te}`}}}}}var $he=Ht((r,e)=>{const{Component:t,dotsJump:n,slots:a,classNames:i,total:o,range:s,loop:l,activePage:u,disableCursorAnimation:c,disableAnimation:d,renderItem:f,onNext:h,onPrevious:v,setPage:m,getItemAriaLabel:y,getItemRef:b,getBaseProps:w,getWrapperProps:S,getItemProps:T,getCursorProps:A}=XYe({...r,ref:e}),{direction:M}=t3(),P=M==="rtl",E=D.useCallback((R,N)=>{const k=N<s.indexOf(u);if(f&&typeof f=="function"){let O=typeof R=="number"?R:N;R===ri.NEXT&&(O=u+1),R===ri.PREV&&(O=u-1),R===ri.DOTS&&(O=k?u-n>=1?u-n:1:u+n<=o?u+n:o);const L={[ri.PREV]:_.jsx(Cm,{}),[ri.NEXT]:_.jsx(Cm,{className:a.chevronNext({class:i==null?void 0:i.chevronNext})}),[ri.DOTS]:_.jsxs(_.Fragment,{children:[_.jsx(pH,{className:a==null?void 0:a.ellipsis({class:i==null?void 0:i.ellipsis})}),_.jsx(hH,{className:a==null?void 0:a.forwardIcon({class:i==null?void 0:i.forwardIcon}),"data-before":je(k)})]})};return f({value:R,index:N,key:`${R}-${N}`,page:O,total:o,children:typeof R=="number"?R:L[R],activePage:u,dotsJump:n,isBefore:k,isActive:R===u,isPrevious:R===u-1,isNext:R===u+1,isFirst:R===1,isLast:R===o,onNext:h,onPrevious:v,setPage:m,onPress:()=>m(O),ref:typeof R=="number"?$=>b($,R):void 0,className:a.item({class:i==null?void 0:i.item}),getAriaLabel:y})}return R===ri.PREV?_.jsx(O_,{className:a.prev({class:i==null?void 0:i.prev}),"data-slot":"prev",getAriaLabel:y,isDisabled:!l&&u===(P?o:1),value:R,onPress:v,children:_.jsx(Cm,{})},ri.PREV):R===ri.NEXT?_.jsx(O_,{className:a.next({class:lt(i==null?void 0:i.next)}),"data-slot":"next",getAriaLabel:y,isDisabled:!l&&u===(P?1:o),value:R,onPress:h,children:_.jsx(Cm,{className:a.chevronNext({class:i==null?void 0:i.chevronNext})})},ri.NEXT):R===ri.DOTS?_.jsxs(O_,{className:a.item({class:lt(i==null?void 0:i.item,"group")}),"data-slot":"item",getAriaLabel:y,value:R,onPress:()=>m(k?u-n>=1?u-n:1:u+n<=o?u+n:o),children:[_.jsx(pH,{className:a==null?void 0:a.ellipsis({class:i==null?void 0:i.ellipsis})}),_.jsx(hH,{className:a==null?void 0:a.forwardIcon({class:i==null?void 0:i.forwardIcon}),"data-before":je(P?!k:k)})]},ri.DOTS+k):D.createElement(O_,{...T({value:R}),key:R,getAriaLabel:y},R)},[P,u,n,T,l,s,f,a,i,o]);return _.jsx(t,{...w(),children:_.jsxs("ul",{...S(),children:[!c&&!d&&_.jsx(WYe,{...A()}),s.map(E)]})})});$he.displayName="HeroUI.Pagination";var JYe=$he;function eZe(r){return rt({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M5.821 4.91c3.899 -2.765 9.468 -2.539 13.073 .535c3.667 3.129 4.168 8.238 1.152 11.898c-2.841 3.447 -7.965 4.583 -12.231 2.805l-.233 -.101l-4.374 .931l-.04 .006l-.035 .007h-.018l-.022 .005h-.038l-.033 .004l-.021 -.001l-.023 .001l-.033 -.003h-.035l-.022 -.004l-.022 -.002l-.035 -.007l-.034 -.005l-.016 -.004l-.024 -.005l-.049 -.016l-.024 -.005l-.011 -.005l-.022 -.007l-.045 -.02l-.03 -.012l-.011 -.006l-.014 -.006l-.031 -.018l-.045 -.024l-.016 -.011l-.037 -.026l-.04 -.027l-.002 -.004l-.013 -.009l-.043 -.04l-.025 -.02l-.006 -.007l-.056 -.062l-.013 -.014l-.011 -.014l-.039 -.056l-.014 -.019l-.005 -.01l-.042 -.073l-.007 -.012l-.004 -.008l-.007 -.012l-.014 -.038l-.02 -.042l-.004 -.016l-.004 -.01l-.017 -.061l-.007 -.018l-.002 -.015l-.005 -.019l-.005 -.033l-.008 -.042l-.002 -.031l-.003 -.01v-.016l-.004 -.054l.001 -.036l.001 -.023l.002 -.053l.004 -.025v-.019l.008 -.035l.005 -.034l.005 -.02l.004 -.02l.018 -.06l.003 -.013l1.15 -3.45l-.022 -.037c-2.21 -3.747 -1.209 -8.391 2.413 -11.119z"},child:[]}]})(r)}function tZe(r){return rt({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M12 2a5 5 0 1 1 -5 5l.005 -.217a5 5 0 0 1 4.995 -4.783z"},child:[]},{tag:"path",attr:{d:"M14 14a5 5 0 0 1 5 5v1a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-1a5 5 0 0 1 5 -5h4z"},child:[]}]})(r)}function DO(r){return rt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M4 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z"},child:[]},{tag:"path",attr:{d:"M4 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z"},child:[]},{tag:"path",attr:{d:"M14 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z"},child:[]},{tag:"path",attr:{d:"M14 7l6 0"},child:[]},{tag:"path",attr:{d:"M17 4l0 6"},child:[]}]})(r)}function rZe(r){return rt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M3 20l1.3 -3.9c-2.324 -3.437 -1.426 -7.872 2.1 -10.374c3.526 -2.501 8.59 -2.296 11.845 .48c3.255 2.777 3.695 7.266 1.029 10.501c-2.666 3.235 -7.615 4.215 -11.574 2.293l-4.7 1"},child:[]}]})(r)}function XY(r){return rt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M3 17a3 3 0 1 0 6 0a3 3 0 0 0 -6 0"},child:[]},{tag:"path",attr:{d:"M9 17v-13h10v8"},child:[]},{tag:"path",attr:{d:"M9 8h10"},child:[]},{tag:"path",attr:{d:"M16 19h6"},child:[]},{tag:"path",attr:{d:"M19 16v6"},child:[]}]})(r)}function nZe(r){return rt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0"},child:[]},{tag:"path",attr:{d:"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"},child:[]}]})(r)}function aZe(r){return rt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M15 10l4.553 -2.276a1 1 0 0 1 1.447 .894v6.764a1 1 0 0 1 -1.447 .894l-4.553 -2.276v-4z"},child:[]},{tag:"path",attr:{d:"M3 6m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z"},child:[]},{tag:"path",attr:{d:"M7 12l4 0"},child:[]},{tag:"path",attr:{d:"M9 10l0 4"},child:[]}]})(r)}function iZe(r,e){let{elementType:t="a",onPress:n,onPressStart:a,onPressEnd:i,onClick:o,role:s,isDisabled:l,...u}=r,c={};t!=="a"&&(c={role:"link",tabIndex:l?void 0:0});let d=Tv()||T2();o&&typeof o=="function"&&s!=="button"&&c3("onClick is deprecated, please use onPress instead. See: https://github.com/frontio-ai/heroui/issues/4292","useLink");const f=T=>{d&&(o==null||o(T)),n==null||n(T)};let{focusableProps:h}=L0(r,e),{pressProps:v,isPressed:m}=Ss({onPress:f,onPressStart:a,onPressEnd:i,isDisabled:l,ref:e}),y=hi(u,{labelable:!0,isLink:t==="a"}),b=ze(h,v),w=A2(),S=a3(r);return{isPressed:m,linkProps:ze(y,S,{...b,...c,"aria-disabled":l||void 0,"aria-current":r["aria-current"],onClick:T=>{var A;(A=v.onClick)==null||A.call(v,T),!d&&o&&o(T),!w.isNative&&T.currentTarget instanceof HTMLAnchorElement&&T.currentTarget.href&&!T.isDefaultPrevented()&&D8(T.currentTarget,T)&&r.href&&(T.preventDefault(),w.open(T.currentTarget,T,r.href,r.routerOptions))}})}}function oZe(r){var e,t,n,a;const i=Vr(),[o,s]=oa(r,sF.variantKeys),{ref:l,as:u,children:c,anchorIcon:d,isExternal:f=!1,showAnchorIcon:h=!1,autoFocus:v=!1,className:m,onPress:y,onPressStart:b,onPressEnd:w,onClick:S,...T}=o,A=u||"a",M=bc(l),P=(t=(e=r==null?void 0:r.disableAnimation)!=null?e:i==null?void 0:i.disableAnimation)!=null?t:!1,{linkProps:E}=iZe({...T,onPress:y,onPressStart:b,onPressEnd:w,onClick:S,isDisabled:r.isDisabled,elementType:`${u}`},M),{isFocused:R,isFocusVisible:N,focusProps:k}=Rn({autoFocus:v});f&&(T.rel=(n=T.rel)!=null?n:"noopener noreferrer",T.target=(a=T.target)!=null?a:"_blank");const O=D.useMemo(()=>sF({...s,disableAnimation:P,className:m}),[Xc(s),P,m]),L=D.useCallback(()=>({ref:M,className:O,"data-focus":ht(R),"data-disabled":ht(r.isDisabled),"data-focus-visible":ht(N),...ze(k,E,T)}),[O,R,N,k,E,T]);return{Component:A,children:c,anchorIcon:d,showAnchorIcon:h,getLinkProps:L}}var zhe=Ht((r,e)=>{const{Component:t,children:n,showAnchorIcon:a,anchorIcon:i=_.jsx(bWe,{className:YTe}),getLinkProps:o}=oZe({ref:e,...r});return _.jsx(t,{...o(),children:_.jsxs(_.Fragment,{children:[n,a&&i]})})});zhe.displayName="HeroUI.Link";var tu=zhe;function sZe(r){const[e,t]=oa(r,fF.variantKeys),{ref:n,as:a,children:i,avatar:o,startContent:s,endContent:l,onClose:u,classNames:c,className:d,...f}=e,h=a||"div",v=$r(n),m=lt(c==null?void 0:c.base,d),y=!!u,b=r.variant==="dot",{focusProps:w,isFocusVisible:S}=Rn(),T=D.useMemo(()=>typeof i=="string"&&(i==null?void 0:i.length)===1,[i]),A=D.useMemo(()=>!!o||!!s,[o,s]),M=D.useMemo(()=>!!l||y,[l,y]),P=D.useMemo(()=>fF({...t,hasStartContent:A,hasEndContent:M,isOneChar:T,isCloseable:y,isCloseButtonFocusVisible:S}),[eo(t),S,A,M,T,y]),{pressProps:E}=Ss({isDisabled:!!(r!=null&&r.isDisabled),onPress:u}),R=()=>({ref:v,className:P.base({class:m}),...f}),N=()=>({role:"button",tabIndex:0,className:P.closeButton({class:c==null?void 0:c.closeButton}),"aria-label":"close chip",...ze(E,w)}),k=L=>D.isValidElement(L)?D.cloneElement(L,{className:P.avatar({class:c==null?void 0:c.avatar})}):null,O=L=>D.isValidElement(L)?D.cloneElement(L,{className:lt("max-h-[80%]",L.props.className)}):null;return{Component:h,children:i,slots:P,classNames:c,isDot:b,isCloseable:y,startContent:k(o)||O(s),endContent:O(l),getCloseButtonProps:N,getChipProps:R}}var jhe=Ht((r,e)=>{const{Component:t,children:n,slots:a,classNames:i,isDot:o,isCloseable:s,startContent:l,endContent:u,getCloseButtonProps:c,getChipProps:d}=sZe({...r,ref:e}),f=D.useMemo(()=>o&&!l?_.jsx("span",{className:a.dot({class:i==null?void 0:i.dot})}):l,[a,l,o]),h=D.useMemo(()=>s?_.jsx("span",{...c(),children:u||_.jsx(SDe,{})}):u,[u,s,c]);return _.jsxs(t,{...d(),children:[f,_.jsx("span",{className:a.content({class:i==null?void 0:i.content}),children:n}),h]})});jhe.displayName="HeroUI.Chip";var Gm=jhe,[lZe,Bhe]=B8({name:"DropdownContext",errorMessage:"useDropdownContext: `context` is undefined. Seems you forgot to wrap all popover components within `<Dropdown />`"}),Vhe=r=>{const e={top:{originY:1},bottom:{originY:0},left:{originX:1},right:{originX:0},"top-start":{originX:0,originY:1},"top-end":{originX:1,originY:1},"bottom-start":{originX:0,originY:0},"bottom-end":{originX:1,originY:0},"right-start":{originX:0,originY:0},"right-end":{originX:0,originY:1},"left-start":{originX:1,originY:0},"left-end":{originX:1,originY:1}};return(e==null?void 0:e[r])||{}},Fhe=r=>({top:"top",bottom:"bottom",left:"left",right:"right","top-start":"top start","top-end":"top end","bottom-start":"bottom start","bottom-end":"bottom end","left-start":"left top","left-end":"left bottom","right-start":"right top","right-end":"right bottom"})[r],uZe=(r,e)=>{if(e.includes("-")){const[t]=e.split("-");if(t.includes(r))return!1}return!0},hA=(r,e)=>{if(e.includes("-")){const[,t]=e.split("-");return`${r}-${t}`}return r},G1=new WeakMap,qo=[];function cZe(r,e=document.body){let t=new Set(r),n=new Set,a=l=>{for(let f of l.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))t.add(f);let u=f=>{if(t.has(f)||f.parentElement&&n.has(f.parentElement)&&f.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let h of t)if(f.contains(h))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},c=document.createTreeWalker(l,NodeFilter.SHOW_ELEMENT,{acceptNode:u}),d=u(l);if(d===NodeFilter.FILTER_ACCEPT&&i(l),d!==NodeFilter.FILTER_REJECT){let f=c.nextNode();for(;f!=null;)i(f),f=c.nextNode()}},i=l=>{var u;let c=(u=G1.get(l))!=null?u:0;l.getAttribute("aria-hidden")==="true"&&c===0||(c===0&&l.setAttribute("aria-hidden","true"),n.add(l),G1.set(l,c+1))};qo.length&&qo[qo.length-1].disconnect(),a(e);let o=new MutationObserver(l=>{for(let u of l)if(!(u.type!=="childList"||u.addedNodes.length===0)&&![...t,...n].some(c=>c.contains(u.target))){for(let c of u.removedNodes)c instanceof Element&&(t.delete(c),n.delete(c));for(let c of u.addedNodes)(c instanceof HTMLElement||c instanceof SVGElement)&&(c.dataset.liveAnnouncer==="true"||c.dataset.reactAriaTopLayer==="true")?t.add(c):c instanceof Element&&a(c)}});o.observe(e,{childList:!0,subtree:!0});let s={observe(){o.observe(e,{childList:!0,subtree:!0})},disconnect(){o.disconnect()}};return qo.push(s),()=>{o.disconnect();for(let l of n){let u=G1.get(l);u!=null&&(u===1?(l.removeAttribute("aria-hidden"),G1.delete(l)):G1.set(l,u-1))}s===qo[qo.length-1]?(qo.pop(),qo.length&&qo[qo.length-1].observe()):qo.splice(qo.indexOf(s),1)}}var Hhe=(r,e,t)=>{const n=e==null?void 0:e.current;if(!n||!n.contains(r)){const a=document.querySelectorAll("body > span[data-focus-scope-start]");let i=[];if(a.forEach(o=>{i.push(o.nextElementSibling)}),i.length===1)return t.close(),!1}return!n||!n.contains(r)};function dZe(r,e){const{triggerRef:t,popoverRef:n,showArrow:a,offset:i=7,crossOffset:o=0,scrollRef:s,shouldFlip:l,boundaryElement:u,isDismissable:c=!0,shouldCloseOnBlur:d=!0,shouldCloseOnScroll:f=!0,placement:h="top",containerPadding:v,shouldCloseOnInteractOutside:m,isNonModal:y,isKeyboardDismissDisabled:b,updatePositionDeps:w=[],...S}=r,T=y??!0,{overlayProps:A,underlayProps:M}=E2({isOpen:e.isOpen,onClose:e.close,shouldCloseOnBlur:d,isDismissable:c,isKeyboardDismissDisabled:b,shouldCloseOnInteractOutside:m||(k=>Hhe(k,t,e))},n),{overlayProps:P,arrowProps:E,placement:R,updatePosition:N}=o3({...S,shouldFlip:l,crossOffset:o,targetRef:t,overlayRef:n,isOpen:e.isOpen,scrollRef:s,boundaryElement:u,containerPadding:v,placement:Fhe(h),offset:a?i+3:i,onClose:T&&f?e.close:()=>{}});return d3(()=>{w.length&&N()},w),D.useEffect(()=>{if(e.isOpen&&!T&&n.current)return cZe([n.current])},[T,e.isOpen,n]),{popoverProps:ze(A,P),arrowProps:E,underlayProps:M,placement:R}}var fZe="top";function hZe(r){var e,t,n;const a=Vr(),[i,o]=oa(r,zf.variantKeys),{as:s,ref:l,children:u,state:c,triggerRef:d,scrollRef:f,defaultOpen:h,onOpenChange:v,isOpen:m,isNonModal:y=!0,shouldFlip:b=!0,containerPadding:w=12,shouldBlockScroll:S=!1,isDismissable:T=!0,shouldCloseOnBlur:A,portalContainer:M,updatePositionDeps:P,dialogProps:E,placement:R=fZe,triggerType:N="dialog",showArrow:k=!1,offset:O=7,crossOffset:L=0,boundaryElement:$,isKeyboardDismissDisabled:j,shouldCloseOnInteractOutside:B,shouldCloseOnScroll:H,motionProps:F,className:K,classNames:U,onClose:V,...Q}=i,Z=s||"div",Y=bc(l),X=D.useRef(null),re=D.useRef(!1),oe=d||X,ae=(t=(e=r.disableAnimation)!=null?e:a==null?void 0:a.disableAnimation)!=null?t:!1,se=rN({isOpen:m,defaultOpen:h,onOpenChange:Ee=>{v==null||v(Ee),Ee||V==null||V()}}),le=c||se,{popoverProps:fe,underlayProps:ve,placement:pe}=dZe({triggerRef:oe,isNonModal:y,popoverRef:Y,placement:R,offset:O,scrollRef:f,isDismissable:T,shouldCloseOnBlur:A,boundaryElement:$,crossOffset:L,shouldFlip:b,containerPadding:w,updatePositionDeps:P,isKeyboardDismissDisabled:j,shouldCloseOnScroll:H,shouldCloseOnInteractOutside:B},le),Re=D.useMemo(()=>pe?uZe(pe,R)?pe:R:null,[pe,R]),{triggerProps:Ae}=ore({type:N},le,oe),{isFocusVisible:ie,isFocused:Se,focusProps:ee}=Rn(),te=D.useMemo(()=>zf({...o}),[Xc(o)]),de=Cr(U==null?void 0:U.base,K);R8({isDisabled:!(S&&le.isOpen)});const ye=(Ee={})=>({ref:Y,...ze(fe,Q,Ee),style:ze(fe.style,Q.style,Ee.style)}),xe=(Ee={})=>({"data-slot":"base","data-open":ht(le.isOpen),"data-focus":ht(Se),"data-arrow":ht(k),"data-focus-visible":ht(ie),"data-placement":pe?hA(pe,R):void 0,...ze(ee,E,Ee),className:te.base({class:Cr(de)}),style:{outline:"none"}}),Te=D.useCallback((Ee={})=>({"data-slot":"content","data-open":ht(le.isOpen),"data-arrow":ht(k),"data-placement":pe?hA(pe,R):void 0,className:te.content({class:Cr(U==null?void 0:U.content,Ee.className)})}),[te,le.isOpen,k,Re,R,U,pe]),ke=D.useCallback(Ee=>{var at;let $t;return Ee.pointerType==="touch"&&((r==null?void 0:r.backdrop)==="blur"||(r==null?void 0:r.backdrop)==="opaque")?$t=setTimeout(()=>{re.current=!0},100):re.current=!0,(at=Ae.onPress)==null||at.call(Ae,Ee),()=>{clearTimeout($t)}},[Ae==null?void 0:Ae.onPress]),Ue=D.useCallback((Ee={},at=null)=>{const{isDisabled:$t,...jt}=Ee;return{"data-slot":"trigger",...ze({"aria-haspopup":"dialog"},Ae,jt),onPress:ke,isDisabled:$t,className:te.trigger({class:Cr(U==null?void 0:U.trigger,Ee.className),isTriggerDisabled:$t}),ref:C2(at,oe)}},[le,Ae,ke,oe]),Xe=D.useCallback((Ee={})=>({"data-slot":"backdrop",className:te.backdrop({class:U==null?void 0:U.backdrop}),onClick:at=>{if(!re.current){at.preventDefault();return}le.close(),re.current=!1},...ve,...Ee}),[te,le.isOpen,U,ve]);return D.useEffect(()=>{if(le.isOpen&&(Y!=null&&Y.current))return N8([Y==null?void 0:Y.current])},[le.isOpen,Y]),{state:le,Component:Z,children:u,classNames:U,showArrow:k,triggerRef:oe,placement:Re,isNonModal:y,popoverRef:Y,portalContainer:M,isOpen:le.isOpen,onClose:le.close,disableAnimation:ae,shouldBlockScroll:S,backdrop:(n=r.backdrop)!=null?n:"transparent",motionProps:F,getBackdropProps:Xe,getPopoverProps:ye,getTriggerProps:Ue,getDialogProps:xe,getContentProps:Te}}var JY={ease:[.36,.66,.4,1]},Kk={scaleSpring:{enter:{transform:"scale(1)",opacity:1,transition:{type:"spring",bounce:0,duration:.2}},exit:{transform:"scale(0.85)",opacity:0,transition:{type:"easeOut",duration:.15}}},scaleSpringOpacity:{initial:{opacity:0,transform:"scale(0.8)"},enter:{opacity:1,transform:"scale(1)",transition:{type:"spring",bounce:0,duration:.3}},exit:{opacity:0,transform:"scale(0.96)",transition:{type:"easeOut",bounce:0,duration:.15}}},fade:{enter:{opacity:1,transition:{duration:.4,ease:JY.ease}},exit:{opacity:0,transition:{duration:.3,ease:JY.ease}}}},[pZe,Uhe]=B8({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within `<Popover />`"}),eZ=()=>Jc(()=>import("./index-B7_4fTZC.js"),[]).then(r=>r.default),Ghe=r=>{const{as:e,children:t,className:n,...a}=r,{Component:i,placement:o,backdrop:s,motionProps:l,disableAnimation:u,getPopoverProps:c,getDialogProps:d,getBackdropProps:f,getContentProps:h,isNonModal:v,onClose:m}=Uhe(),y=D.useRef(null),{dialogProps:b,titleProps:w}=C3({},y),S=d({ref:y,...b,...a}),T=e||i||"div",A=_.jsxs(_.Fragment,{children:[!v&&_.jsx($f,{onDismiss:m}),_.jsx(T,{...S,children:_.jsx("div",{...h({className:n}),children:typeof t=="function"?t(w):t})}),_.jsx($f,{onDismiss:m})]}),M=D.useMemo(()=>s==="transparent"?null:u?_.jsx("div",{...f()}):_.jsx(Mi,{features:eZ,children:_.jsx(Di.div,{animate:"enter",exit:"exit",initial:"exit",variants:Kk.fade,...f()})}),[s,u,f]),P=o?Vhe(o==="center"?"top":o):void 0,E=_.jsx(_.Fragment,{children:u?A:_.jsx(Mi,{features:eZ,children:_.jsx(Di.div,{animate:"enter",exit:"exit",initial:"initial",style:P,variants:Kk.scaleSpringOpacity,...l,children:A})})});return _.jsxs("div",{...c(),children:[M,E]})};Ghe.displayName="HeroUI.PopoverContent";var vZe=Ghe,qhe=r=>{var e;const{triggerRef:t,getTriggerProps:n}=Uhe(),{children:a,...i}=r,o=D.useMemo(()=>typeof a=="string"?_.jsx("p",{children:a}):D.Children.only(a),[a]),s=(e=o.props.ref)!=null?e:o.ref,{onPress:l,isDisabled:u,...c}=D.useMemo(()=>n(ze(i,o.props),s),[n,o.props,i,s]),[,d]=e3e(a,Ze),{buttonProps:f}=Aae({onPress:l,isDisabled:u},t),h=D.useMemo(()=>(d==null?void 0:d[0])!==void 0,[d]);return D.cloneElement(o,ze(c,h?{onPress:l,isDisabled:u}:f))};qhe.displayName="HeroUI.PopoverTrigger";var gZe=qhe,Qhe=Ht((r,e)=>{const{children:t,...n}=r,a=hZe({...n,ref:e}),[i,o]=D.Children.toArray(t),s=_.jsx(l3,{portalContainer:a.portalContainer,children:o});return _.jsxs(pZe,{value:a,children:[i,a.disableAnimation&&a.isOpen?s:_.jsx(fl,{children:a.isOpen?s:null})]})});Qhe.displayName="HeroUI.Popover";var mZe=Qhe;function yZe(r){const{isSelected:e,disableAnimation:t,...n}=r;return _.jsx("svg",{"aria-hidden":"true","data-selected":e,role:"presentation",viewBox:"0 0 17 18",...n,children:_.jsx("polyline",{fill:"none",points:"1 9 7 14 15 4",stroke:"currentColor",strokeDasharray:22,strokeDashoffset:e?44:66,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,style:t?{}:{transition:"stroke-dashoffset 200ms ease"}})})}var bZe=700;function xZe(){return rh()||typeof window>"u"?!1:window.screen.width<=bZe}function wZe(r){var e,t;const n=Vr(),[a,i]=oa(r,iT.variantKeys),{as:o,item:s,state:l,shortcut:u,description:c,startContent:d,endContent:f,isVirtualized:h,selectedIcon:v,className:m,classNames:y,onAction:b,autoFocus:w,onPress:S,onPressStart:T,onPressUp:A,onPressEnd:M,onPressChange:P,onHoverStart:E,onHoverChange:R,onHoverEnd:N,hideSelectedIcon:k=!1,isReadOnly:O=!1,closeOnSelect:L,onClose:$,onClick:j,...B}=a,H=(t=(e=r.disableAnimation)!=null?e:n==null?void 0:n.disableAnimation)!=null?t:!1,F=D.useRef(null),K=o||(B!=null&&B.href?"a":"li"),U=typeof K=="string",{rendered:V,key:Q}=s,Z=l.disabledKeys.has(Q)||r.isDisabled,Y=l.selectionManager.selectionMode!=="none",X=xZe(),{isFocusVisible:re,focusProps:oe}=Rn({autoFocus:w});j&&typeof j=="function"&&c3("onClick is deprecated, please use onPress instead. See: https://github.com/frontio-ai/heroui/issues/4292","MenuItem");const ae=D.useCallback(Ee=>{j==null||j(Ee),S==null||S(Ee)},[j,S]),{isPressed:se,isFocused:le,isSelected:fe,isDisabled:ve,menuItemProps:pe,labelProps:Re,descriptionProps:Ae,keyboardShortcutProps:ie}=iKe({key:Q,onClose:$,isDisabled:Z,onPress:ae,onPressStart:T,onPressUp:A,onPressEnd:M,onPressChange:P,"aria-label":a["aria-label"],closeOnSelect:L,isVirtualized:h,onAction:b},l,F);let{hoverProps:Se,isHovered:ee}=Ia({isDisabled:ve,onHoverStart(Ee){r0()||(l.selectionManager.setFocused(!0),l.selectionManager.setFocusedKey(Q)),E==null||E(Ee)},onHoverChange:R,onHoverEnd:N}),te=pe;const de=D.useMemo(()=>iT({...i,isDisabled:ve,disableAnimation:H,hasTitleTextChild:typeof V=="string",hasDescriptionTextChild:typeof c=="string"}),[Xc(i),ve,H,V,c]),ye=Cr(y==null?void 0:y.base,m);O&&(te=KAe(te));const xe=(Ee={})=>({ref:F,...ze(O?{}:oe,av(B,{enabled:U}),te,Se,Ee),"data-focus":ht(le),"data-selectable":ht(Y),"data-hover":ht(X?ee||se:ee),"data-disabled":ht(ve),"data-selected":ht(fe),"data-pressed":ht(se),"data-focus-visible":ht(re),className:de.base({class:Cr(ye,Ee.className)})}),Te=(Ee={})=>({...ze(Re,Ee),className:de.title({class:y==null?void 0:y.title})}),ke=(Ee={})=>({...ze(Ae,Ee),className:de.description({class:y==null?void 0:y.description})}),Ue=(Ee={})=>({...ze(ie,Ee),className:de.shortcut({class:y==null?void 0:y.shortcut})}),Xe=D.useCallback((Ee={})=>({"aria-hidden":ht(!0),"data-disabled":ht(ve),className:de.selectedIcon({class:y==null?void 0:y.selectedIcon}),...Ee}),[ve,de,y]);return{Component:K,domRef:F,slots:de,classNames:y,isSelectable:Y,isSelected:fe,isDisabled:ve,rendered:V,shortcut:u,description:c,startContent:d,endContent:f,selectedIcon:v,disableAnimation:H,getItemProps:xe,getLabelProps:Te,hideSelectedIcon:k,getDescriptionProps:ke,getKeyboardShortcutProps:Ue,getSelectedIconProps:Xe}}var Whe=r=>{const{Component:e,slots:t,classNames:n,rendered:a,shortcut:i,description:o,isSelectable:s,isSelected:l,isDisabled:u,selectedIcon:c,startContent:d,endContent:f,disableAnimation:h,hideSelectedIcon:v,getItemProps:m,getLabelProps:y,getDescriptionProps:b,getKeyboardShortcutProps:w,getSelectedIconProps:S}=wZe(r),T=D.useMemo(()=>{const A=_.jsx(yZe,{disableAnimation:h,isSelected:l});return typeof c=="function"?c({icon:A,isSelected:l,isDisabled:u}):c||A},[c,l,u,h]);return _.jsxs(e,{...m(),children:[d,o?_.jsxs("div",{className:t.wrapper({class:n==null?void 0:n.wrapper}),children:[_.jsx("span",{...y(),children:a}),_.jsx("span",{...b(),children:o})]}):_.jsx("span",{...y(),children:a}),i&&_.jsx("kbd",{...w(),children:i}),s&&!v&&_.jsx("span",{...S(),children:T}),f]})};Whe.displayName="HeroUI.MenuItem";var Khe=Whe;function SZe(r){let e=av(r,{enabled:typeof r.elementType=="string"}),t;return r.orientation==="vertical"&&(t="vertical"),r.elementType!=="hr"?{separatorProps:{...e,role:"separator","aria-orientation":t}}:{separatorProps:e}}function _Ze(r){const{as:e,className:t,orientation:n,...a}=r;let i=e||"hr";i==="hr"&&n==="vertical"&&(i="div");const{separatorProps:o}=SZe({elementType:typeof i=="string"?i:"hr",orientation:n}),s=D.useMemo(()=>ane({orientation:n,className:t}),[n,t]),l=D.useCallback((u={})=>({className:s,role:"separator","data-orientation":n,...o,...a,...u}),[s,n,o,a]);return{Component:i,getDividerProps:l}}var Yhe=Mae((r,e)=>{const{Component:t,getDividerProps:n}=_Ze({...r});return _.jsx(t,{ref:e,...n()})});Yhe.displayName="HeroUI.Divider";var CZe=Yhe,Zhe=Ht(({item:r,state:e,as:t,variant:n,color:a,disableAnimation:i,onAction:o,closeOnSelect:s,className:l,classNames:u,showDivider:c=!1,hideSelectedIcon:d,dividerProps:f={},itemClasses:h,title:v,...m},y)=>{const b=t||"li",w=D.useMemo(()=>nne(),[]),S=Cr(u==null?void 0:u.base,l),T=Cr(u==null?void 0:u.divider,f==null?void 0:f.className),{itemProps:A,headingProps:M,groupProps:P}=oKe({heading:r.rendered,"aria-label":r["aria-label"]});return _.jsxs(b,{"data-slot":"base",...ze(A,m),className:w.base({class:S}),children:[r.rendered&&_.jsx("span",{...M,className:w.heading({class:u==null?void 0:u.heading}),"data-slot":"heading",children:r.rendered}),_.jsxs("ul",{...P,className:w.group({class:u==null?void 0:u.group}),"data-has-title":!!r.rendered,"data-slot":"group",children:[[...r.childNodes].map(E=>{const{key:R,props:N}=E;let k=_.jsx(Khe,{classNames:h,closeOnSelect:s,color:a,disableAnimation:i,hideSelectedIcon:d,item:E,state:e,variant:n,onAction:o,...N},R);return E.wrapper&&(k=E.wrapper(k)),k}),c&&_.jsx(CZe,{as:"li",className:w.divider({class:T}),...f})]})]})});Zhe.displayName="HeroUI.MenuSection";var TZe=Zhe;function AZe(r){var e;const t=Vr(),{as:n,ref:a,variant:i,color:o,children:s,disableAnimation:l=(e=t==null?void 0:t.disableAnimation)!=null?e:!1,onAction:u,closeOnSelect:c,itemClasses:d,className:f,state:h,topContent:v,bottomContent:m,hideEmptyContent:y=!1,hideSelectedIcon:b=!1,emptyContent:w="No items.",menuProps:S,onClose:T,classNames:A,...M}=r,P=n||"ul",E=bc(a),R=typeof P=="string",N=The({...M,...S,children:s}),k=h||N,{menuProps:O}=aKe({...M,...S,onAction:u},k,E),L=D.useMemo(()=>rne({className:f}),[f]),$=Cr(A==null?void 0:A.base,f);return{Component:P,state:k,variant:i,color:o,disableAnimation:l,onClose:T,topContent:v,bottomContent:m,closeOnSelect:c,className:f,itemClasses:d,getBaseProps:(F={})=>({ref:E,"data-slot":"base",className:L.base({class:$}),...av(M,{enabled:R}),...F}),getListProps:(F={})=>({"data-slot":"list",className:L.list({class:A==null?void 0:A.list}),...O,...F}),hideEmptyContent:y,hideSelectedIcon:b,getEmptyContentProps:(F={})=>({children:w,className:L.emptyContent({class:A==null?void 0:A.emptyContent}),...F})}}var EZe=Ht(function(e,t){const{Component:n,state:a,closeOnSelect:i,color:o,disableAnimation:s,hideSelectedIcon:l,hideEmptyContent:u,variant:c,onClose:d,topContent:f,bottomContent:h,itemClasses:v,getBaseProps:m,getListProps:y,getEmptyContentProps:b}=AZe({...e,ref:t}),w=_.jsxs(n,{...y(),children:[!a.collection.size&&!u&&_.jsx("li",{children:_.jsx("div",{...b()})}),[...a.collection].map(S=>{const T={closeOnSelect:i,color:o,disableAnimation:s,item:S,state:a,variant:c,onClose:d,hideSelectedIcon:l,...S.props},A=ZAe(v,T==null?void 0:T.classNames);if(S.type==="section")return _.jsx(TZe,{...T,itemClasses:A},S.key);let M=_.jsx(Khe,{...T,classNames:A},S.key);return S.wrapper&&(M=S.wrapper(M)),M})]});return _.jsxs("div",{...m(),children:[f,w,h]})}),MZe=EZe,DZe=w3,$_=DZe,LZe=Ht(function(e,t){const{getMenuProps:n}=Bhe();return _.jsx(vZe,{children:_.jsx(rre,{contain:!0,restoreFocus:!0,children:_.jsx(MZe,{...n(e,t)})})})}),PZe=LZe,Xhe=r=>{const{getMenuTriggerProps:e}=Bhe(),{children:t,...n}=r;return _.jsx(gZe,{...e(n),children:t})};Xhe.displayName="HeroUI.DropdownTrigger";var IZe=Xhe,kZe=(r,e)=>{if(r){const t=Array.isArray(r.children)?r.children:[...(r==null?void 0:r.items)||[]];if(t&&t.length)return t.find(a=>{if(a&&a.key===e)return a})||{}}return null},RZe=(r,e,t)=>{const n=t||kZe(r,e);return n&&n.props&&"closeOnSelect"in n.props?n.props.closeOnSelect:r==null?void 0:r.closeOnSelect};function NZe(r){var e;const t=Vr(),{as:n,triggerRef:a,isOpen:i,defaultOpen:o,onOpenChange:s,isDisabled:l,type:u="menu",trigger:c="press",placement:d="bottom",closeOnSelect:f=!0,shouldBlockScroll:h=!0,classNames:v,disableAnimation:m=(e=t==null?void 0:t.disableAnimation)!=null?e:!1,onClose:y,className:b,...w}=r,S=n||"div",T=D.useRef(null),A=a||T,M=D.useRef(null),P=D.useRef(null),E=gfe({trigger:c,isOpen:i,defaultOpen:o,onOpenChange:B=>{s==null||s(B),B||y==null||y()}}),{menuTriggerProps:R,menuProps:N}=Xfe({type:u,trigger:c,isDisabled:l},E,A),k=D.useMemo(()=>ZTe({className:b}),[b]),O=B=>{B!==void 0&&!B||f&&E.close()},L=(B={})=>{const H=ze(w,B);return{state:E,placement:d,ref:P,disableAnimation:m,shouldBlockScroll:h,scrollRef:M,triggerRef:A,...H,classNames:{...v,...B.classNames,content:Cr(k,v==null?void 0:v.content,B.className)},shouldCloseOnInteractOutside:H!=null&&H.shouldCloseOnInteractOutside?H.shouldCloseOnInteractOutside:F=>Hhe(F,T,E)}},$=(B={})=>{const{onPress:H,onPressStart:F,...K}=R;return ze(K,{isDisabled:l},B)},j=(B,H=null)=>({ref:V8(H,M),menuProps:N,closeOnSelect:f,...ze(B,{onAction:(F,K)=>{const U=RZe(B,F,K);O(U)},onClose:E.close})});return{Component:S,menuRef:M,menuProps:N,classNames:k,closeOnSelect:f,onClose:E.close,autoFocus:E.focusStrategy||!0,disableAnimation:m,getPopoverProps:L,getMenuProps:j,getMenuTriggerProps:$}}var Jhe=r=>{const{children:e,...t}=r,n=NZe(t),[a,i]=Be.Children.toArray(e);return _.jsx(lZe,{value:n,children:_.jsxs(mZe,{...n.getPopoverProps(),children:[a,i]})})};Jhe.displayName="HeroUI.Dropdown";var OZe=Jhe,$Ze=()=>_.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"80%",role:"presentation",viewBox:"0 0 24 24",width:"80%",children:[_.jsx("path",{d:"M12 2C9.38 2 7.25 4.13 7.25 6.75C7.25 9.32 9.26 11.4 11.88 11.49C11.96 11.48 12.04 11.48 12.1 11.49C12.12 11.49 12.13 11.49 12.15 11.49C12.16 11.49 12.16 11.49 12.17 11.49C14.73 11.4 16.74 9.32 16.75 6.75C16.75 4.13 14.62 2 12 2Z",fill:"currentColor"}),_.jsx("path",{d:"M17.0809 14.1489C14.2909 12.2889 9.74094 12.2889 6.93094 14.1489C5.66094 14.9989 4.96094 16.1489 4.96094 17.3789C4.96094 18.6089 5.66094 19.7489 6.92094 20.5889C8.32094 21.5289 10.1609 21.9989 12.0009 21.9989C13.8409 21.9989 15.6809 21.5289 17.0809 20.5889C18.3409 19.7389 19.0409 18.5989 19.0409 17.3589C19.0309 16.1289 18.3409 14.9889 17.0809 14.1489Z",fill:"currentColor"})]}),[Out,zZe]=nh({name:"AvatarGroupContext",strict:!1});function epe(r={}){const{onLoad:e,onError:t,ignoreFallback:n}=r,a=g_e(),i=D.useRef(a?new Image:null),[o,s]=D.useState("pending");D.useEffect(()=>{i.current&&(i.current.onload=u=>{l(),s("loaded"),e==null||e(u)},i.current.onerror=u=>{l(),s("failed"),t==null||t(u)})},[i.current]);const l=()=>{i.current&&(i.current.onload=null,i.current.onerror=null,i.current=null)};return O0(()=>{a&&s(jZe(r,i))},[a]),n?"loaded":o}function jZe(r,e){const{loading:t,src:n,srcSet:a,crossOrigin:i,sizes:o,ignoreFallback:s}=r;if(!n)return"pending";if(s)return"loaded";const l=new Image;return l.src=n,i&&(l.crossOrigin=i),a&&(l.srcset=a),o&&(l.sizes=o),t&&(l.loading=t),e.current=l,l.complete&&l.naturalWidth?"loaded":"loading"}function BZe(r={}){var e,t,n,a,i,o;const s=Vr(),l=zZe(),u=!!l,{as:c,ref:d,src:f,name:h,icon:v,classNames:m,fallback:y,alt:b=h||"avatar",imgRef:w,color:S=(e=l==null?void 0:l.color)!=null?e:"default",radius:T=(t=l==null?void 0:l.radius)!=null?t:"full",size:A=(n=l==null?void 0:l.size)!=null?n:"md",isBordered:M=(a=l==null?void 0:l.isBordered)!=null?a:!1,isDisabled:P=(i=l==null?void 0:l.isDisabled)!=null?i:!1,isFocusable:E=!1,getInitials:R=e_e,ignoreFallback:N=!1,showFallback:k=!1,ImgComponent:O="img",imgProps:L,className:$,onError:j,disableAnimation:B,...H}=r,F=c||"span",K=$r(d),U=$r(w),{isFocusVisible:V,isFocused:Q,focusProps:Z}=Rn(),{isHovered:Y,hoverProps:X}=Ia({isDisabled:P}),re=(o=B??(s==null?void 0:s.disableAnimation))!=null?o:!1,ae=epe({src:f,onError:j,ignoreFallback:N})==="loaded",se=typeof O=="string",le=(!f||!ae)&&k,fe=D.useMemo(()=>{var ie;return rAe({color:S,radius:T,size:A,isBordered:M,isDisabled:P,isInGroup:u,disableAnimation:re,isInGridGroup:(ie=l==null?void 0:l.isGrid)!=null?ie:!1})},[S,T,A,M,P,re,u,l==null?void 0:l.isGrid]),ve=lt(m==null?void 0:m.base,$),pe=D.useMemo(()=>E||c==="button",[E,c]),Re=D.useCallback((ie={})=>({ref:K,tabIndex:pe?0:-1,"data-hover":je(Y),"data-focus":je(Q),"data-focus-visible":je(V),className:fe.base({class:lt(ve,ie==null?void 0:ie.className)}),...ze(H,X,pe?Z:{})}),[pe,fe,ve,Z,H]),Ae=D.useCallback((ie={})=>({ref:U,src:f,"data-loaded":je(ae),className:fe.img({class:m==null?void 0:m.img}),...ze(L,ie,Pa({disableAnimation:re},{enabled:se}))}),[fe,ae,L,re,f,U,se]);return{Component:F,ImgComponent:O,src:f,alt:b,icon:v,name:h,imgRef:U,slots:fe,classNames:m,fallback:y,isImgLoaded:ae,showFallback:le,ignoreFallback:N,getInitials:R,getAvatarProps:Re,getImageProps:Ae}}var tpe=Ht((r,e)=>{const{Component:t,ImgComponent:n,src:a,icon:i=_.jsx($Ze,{}),alt:o,classNames:s,slots:l,name:u,showFallback:c,fallback:d,getInitials:f,getAvatarProps:h,getImageProps:v}=BZe({...r,ref:e}),m=D.useMemo(()=>!c&&a?null:d?_.jsx("div",{"aria-label":o,className:l.fallback({class:s==null?void 0:s.fallback}),role:"img",children:d}):u?_.jsx("span",{"aria-label":o,className:l.name({class:s==null?void 0:s.name}),role:"img",children:f(u)}):_.jsx("span",{"aria-label":o,className:l.icon({class:s==null?void 0:s.icon}),role:"img",children:i}),[c,a,d,u,s]);return _.jsxs(t,{...h(),children:[a&&_.jsx(n,{...v(),alt:o}),m]})});tpe.displayName="HeroUI.Avatar";var Zb=tpe;function VZe(r){return rt({attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"},child:[]}]})(r)}function rpe(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-16 160H64v-84c0-6.6 5.4-12 12-12h360c6.6 0 12 5.4 12 12v84z"},child:[]}]})(r)}function FZe(r){return rt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 352H48c-26.5 0-48 21.5-48 48v32c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48v-32c0-26.5-21.5-48-48-48z"},child:[]}]})(r)}function LO({isOpen:r,onClose:e,taskId:t,plugin:n,task:a}){var u;const i=D.useRef(null),{data:o=a}=Xi(async()=>await or.serverPost("/api/v1/plugin/task",{taskId:t}),{pollingInterval:1e3,pollingWhenHidden:!1,ready:!!t&&r});D.useEffect(()=>{var c,d;(c=o==null?void 0:o.logs)!=null&&c.length&&((d=i.current)==null||d.scrollIntoView({behavior:"smooth"}))},[o==null?void 0:o.logs]);const s=async()=>{await or.serverPost("/api/v1/plugin/task/status",{taskId:t,minimized:!0}),e()},l=()=>(o==null?void 0:o.type)==="uninstall"?"卸载插件:":"安装插件:";return _.jsx(Oc,{isOpen:r,onClose:e,size:"2xl",isDismissable:!0,children:_.jsxs(Rc,{children:[_.jsxs(Nc,{className:"flex gap-1",children:[_.jsx("span",{children:l()}),_.jsx("span",{className:"font-mono text-primary-500",children:n.name})]}),_.jsx(kc,{children:_.jsx("div",{className:"h-[400px] w-full overflow-auto",children:_.jsxs("div",{className:"font-mono text-sm whitespace-pre-wrap",children:[(u=o==null?void 0:o.logs)==null?void 0:u.map((c,d)=>_.jsx("div",{className:"py-0.5",children:c},d)),_.jsx("div",{ref:i})]})})}),_.jsxs($0,{children:[_.jsx(Ze,{variant:"light",onPress:s,startContent:_.jsx(FZe,{}),children:"最小化"}),_.jsx(Ze,{color:"primary",onPress:e,children:"关闭"})]})]})})}const HZe=r=>{switch(r.toLowerCase()){case"github":return _.jsx(ZA,{className:"text-lg"});case"gitee":return _.jsx(Fwe,{className:"text-lg text-red-500"});case"npm":return _.jsx(XA,{className:"text-lg text-[#CB3837]"});default:return null}},UZe=r=>{const e=["为您的工作流程带来更多可能性","提升您的开发效率的得力助手","简单易用,功能强大的插件","让开发更轻松,体验更流畅","为您的项目锦上添花"],t=r.split("").reduce((n,a)=>n+a.charCodeAt(0),0);return e[t%e.length]},GZe=r=>({name:r.split("-")[0]||"未知作者",email:"-",url:"-"});function qZe({isOpen:r,onClose:e,plugin:t,onUpdate:n,onUninstall:a,onViewApps:i,onViewConfig:o}){const s=t.type.toLowerCase()==="app"&&i,[l,u]=D.useState(!1),[c,d]=D.useState(""),[f,h]=D.useState(!1),[v,m]=D.useState(!1),{loading:y,run:b}=Xi(async()=>{if(t.type.toLowerCase()==="app")throw new Error("不支持卸载 App 类型的插件");const{taskId:S}=await or.serverPost("/api/v1/plugin/uninstall",{name:t.name,type:t.type});return d(S),u(!0),{taskId:S}},{manual:!0,onError:S=>{Ur.error(S.message)}}),{run:w}=Xi(async()=>{const S=await or.serverPost("/api/v1/plugin/config/is-exist",{name:t.name,type:t.type});return h(S),S},{manual:!0,onError:S=>{Ur.error("检查配置文件失败: "+S.message),h(!1)}});return D.useEffect(()=>{t&&t.type.toLowerCase()!=="app"&&(m(!0),Promise.resolve(w()).finally(()=>{m(!1)}))},[t]),_.jsxs(_.Fragment,{children:[_.jsx(Oc,{isOpen:r&&!l,onOpenChange:e,title:"插件配置",children:_.jsxs(Rc,{children:[_.jsxs(Nc,{className:"flex flex-col gap-1",children:[_.jsx("h3",{className:"text-lg font-semibold",children:t.name}),_.jsx("p",{className:"text-sm text-default-600",children:t.description==="-"?UZe(t.name):t.description})]}),_.jsx(kc,{children:_.jsxs("div",{className:"space-y-4",children:[_.jsxs("div",{className:"flex items-center justify-between",children:[_.jsx("span",{className:"text-sm text-default-600",children:"当前版本"}),_.jsx(Gm,{size:"sm",variant:"flat",color:"primary",children:t.version==="-"?"0.0.1":t.version})]}),t.latestVersion&&t.latestVersion!==t.version&&_.jsxs("div",{className:"flex items-center justify-between",children:[_.jsx("span",{className:"text-sm text-default-600",children:"最新版本"}),_.jsx(Gm,{size:"sm",variant:"flat",color:"success",children:t.latestVersion})]}),_.jsxs("div",{className:"flex items-center justify-between",children:[_.jsx("span",{className:"text-sm text-default-600",children:"作者"}),_.jsx("div",{className:"flex items-center gap-2",children:t.author&&t.author.length>0?t.author.map((S,T)=>S.home&&S.home!=="-"?_.jsx(tu,{href:S.home,isExternal:!0,className:"text-xs text-primary-500 hover:text-primary-600",children:S.name},S.name+T):_.jsx("span",{className:"text-xs text-default-600",children:S.name},S.name+T)):_.jsx("span",{className:"text-xs text-default-400",children:GZe(t.name).name})})]}),_.jsxs("div",{className:"flex items-center justify-between",children:[_.jsx("span",{className:"text-sm text-default-600",children:"仓库源"}),_.jsx("div",{className:"flex items-center gap-2",children:Array.isArray(t.repo)&&t.repo.length>0?t.repo.map((S,T)=>_.jsx(tu,{className:"text-default-600 hover:text-default-900 transition-colors inline-flex",href:S.url,isExternal:!0,children:HZe(S.type)},S.url+T)):_.jsx("span",{className:"text-sm text-default-400",children:"暂无仓库信息"})})]}),_.jsxs("div",{className:"flex items-center justify-between",children:[_.jsx("span",{className:"text-sm text-default-600",children:"开源许可"}),t.license.url?_.jsx(tu,{className:"text-xs text-primary-500 hover:text-primary-600 inline-flex items-center",href:t.license.url,isExternal:!0,showAnchorIcon:!0,children:t.license.name}):_.jsx("span",{className:"text-sm text-default-400",children:t.license.name||"MIT"})]}),t.home&&t.home!=="-"&&_.jsxs("div",{className:"flex items-center justify-between",children:[_.jsx("span",{className:"text-sm text-default-600",children:"插件主页"}),_.jsx(tu,{className:"text-xs text-primary-500 hover:text-primary-600 inline-flex items-center",href:t.home,isExternal:!0,showAnchorIcon:!0,children:"访问主页"})]}),_.jsxs("div",{className:"flex items-center justify-between",children:[_.jsx("span",{className:"text-sm text-default-600",children:"插件类型"}),_.jsx(Gm,{size:"sm",variant:"flat",color:t.type.toLowerCase()==="app"?"secondary":"default",children:t.type.toLowerCase()==="-"?"NPM":t.type.toUpperCase()})]}),_.jsxs("div",{className:"flex items-center justify-between",children:[_.jsx("span",{className:"text-sm text-default-600",children:"安装时间"}),_.jsx("span",{className:"text-sm text-default-400",children:new Date(t.time).toLocaleString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})})]})]})}),_.jsx($0,{children:_.jsxs("div",{className:"flex gap-2",children:[_.jsx(Ze,{color:"primary",variant:"light",onPress:n,isDisabled:!t.latestVersion||t.latestVersion===t.version,children:"更新"}),_.jsx(Ze,{color:"danger",variant:"light",onPress:b,isLoading:y,isDisabled:t.type.toLowerCase()==="app",children:"卸载"}),s&&_.jsx(Ze,{color:"secondary",variant:"light",onPress:i,startContent:_.jsx(DO,{}),children:"查看应用"}),t.type.toLowerCase()!=="app"&&_.jsx(Ze,{color:"secondary",variant:"light",onPress:o,startContent:_.jsx(Gwe,{}),isLoading:v,isDisabled:!f,children:"配置"})]})})]})}),_.jsx(LO,{isOpen:l,onClose:()=>{u(!1),a()},taskId:c,plugin:t,task:{id:c,name:t.name,type:"uninstall",status:"running",minimized:!1,logs:[]}})]})}function QZe({isOpen:r,onClose:e,pluginName:t}){const[n,a]=D.useState(void 0),{loading:i,run:o}=Xi(async(d,f)=>or.serverPost("/api/v1/plugin/file",{pluginName:t,fileName:d,operation:f}),{manual:!0,onSuccess:(d,[f,h])=>{h==="read"?a(d||""):h==="delete"&&(Ur.success("文件删除成功"),u())},onError:d=>{Ur.error(d.message||"操作失败")}}),{data:s,loading:l,run:u}=Xi(async()=>or.serverPost("/api/v1/plugin/apps",{name:t}),{manual:!0});D.useEffect(()=>{r&&t&&u()},[r,t]);const c=s||[];return _.jsx(Oc,{isOpen:r,onClose:e,size:"3xl",scrollBehavior:"inside",children:_.jsxs(Rc,{children:[_.jsx(Nc,{children:_.jsx("h3",{className:"text-lg font-semibold",children:"应用列表"})}),_.jsx(kc,{className:"py-6",children:l?_.jsx("div",{className:"text-center py-4",children:"加载中..."}):_.jsxs("div",{className:"space-y-4",children:[c.map(d=>_.jsxs("div",{className:"flex items-center justify-between p-3 bg-default-50 rounded-lg",children:[_.jsx("div",{className:"flex-1 mr-4",children:_.jsx("h4",{className:"text-sm font-medium",children:d})}),_.jsxs("div",{className:"flex gap-2",children:[_.jsx(Ze,{isIconOnly:!0,size:"sm",variant:"light",color:"primary",isLoading:i,onPress:()=>o(d,"read"),children:_.jsx(Hwe,{className:"text-base"})}),_.jsx(Ze,{isIconOnly:!0,size:"sm",variant:"light",color:"danger",isLoading:i,onPress:()=>o(d,"delete"),children:_.jsx(Qwe,{className:"text-base"})})]})]},d)),n!==void 0&&_.jsx(Oc,{isOpen:n!==void 0,onClose:()=>a(void 0),size:"4xl",scrollBehavior:"inside",children:_.jsxs(Rc,{children:[_.jsx(Nc,{children:_.jsx("h3",{className:"text-lg font-semibold",children:"文件内容"})}),_.jsx(kc,{children:_.jsx("pre",{className:"bg-default-50 p-4 rounded-lg overflow-x-auto",children:_.jsx("code",{children:n||""})})})]})})]})})]})})}const WZe=(r={})=>({...r}),KZe=(r,e)=>{if(e.min!==void 0||e.max!==void 0){const t=Number(r);if(Number.isNaN(t))return e.error||"请输入有效数字";if(e.min!==void 0&&t<e.min)return e.error||`最小值不能小于 ${e.min}`;if(e.max!==void 0&&t>e.max)return e.error||`最大值不能超过 ${e.max}`}if(e.regex)try{if(!(typeof e.regex=="string"?new RegExp(e.regex.replace(/^\/|\/$/g,"")):e.regex).test(r))return e.error||"格式不符合要求"}catch{return console.error("Invalid regex:",e.regex),"无效的验证规则"}return e.minLength&&r.length<e.minLength?e.error||`内容长度不能少于 ${e.minLength} 个字符`:e.maxLength&&r.length>e.maxLength?e.error||`内容长度不能超过 ${e.maxLength} 个字符`:null},YZe=r=>e=>{for(const t of r){const n=KZe(e,t);if(n)return n}return!0},PO=(r,e,t)=>{const{componentType:n,key:a,className:i,...o}=r,s=r.rules?YZe(r.rules):void 0;return _.jsx("div",{className:i||`w-${r.width||200}px h-${r.height||40}px`,children:_.jsx(Va,{...o,className:"w-full",validate:s,onValueChange:t||(l=>{e[a]=l})},a)})},IO=(r,e,t)=>{const{componentType:n,key:a,startText:i,endText:o,className:s,...l}=r;return t||(e[a]=r.defaultSelected??!1),_.jsxs("div",{className:s||"flex items-center gap-2",children:[i&&_.jsx("span",{children:i}),_.jsx(_ne,{...l,defaultSelected:r.defaultSelected,onValueChange:t||(u=>{e[a]=u})},a),o&&_.jsx("span",{children:o})]})},kO=(r,e,t)=>{const{componentType:n,key:a,className:i,checkbox:o,...s}=r;return e[a]={},o.forEach(l=>{e[a][l.key]=l.defaultSelected??!1}),_.jsx("div",{className:i||"flex items-center gap-2",children:_.jsx(dfe,{...s,children:o.map(({componentType:l,key:u,...c})=>D.createElement(xO,{...c,key:u,defaultSelected:e[a][u],onValueChange:d=>{t?t(u,d):e[a][u]=d}},c.label))},a)})},RO=(r,e,t)=>{const{componentType:n,key:a,className:i,radio:o,...s}=r;return _.jsx("div",{className:i||"flex items-center gap-2",children:_.jsx(ife,{...s,onValueChange:t||(l=>{e[a]=l}),children:o.map(({componentType:l,key:u,...c})=>_.jsx(sfe,{...c,children:c.label},u))},a)})},NO=r=>{const{componentType:e,key:t,className:n,transparent:a,...i}=r,o=a?`${n||""} opacity-0`:n;return _.jsx(aw,{className:o,...i},t)},ZZe=(r,e)=>{let{componentType:t,key:n,className:a,children:i,...o}=r;return Array.isArray(i)||(i=[]),e[n]=[],i.forEach(s=>{if(s.componentType!=="accordion-item"||!Array.isArray(s.children))return;const l={};s.children.forEach(u=>{if(u.componentType==="input"){l[u.key]=u.defaultValue;return}if(u.componentType==="switch"){l[u.key]=u.defaultSelected;return}if(u.componentType==="radio-group"){l[u.key]=u.defaultValue;return}if(u.componentType==="checkbox-group"){l[u.key]={},u.checkbox.forEach(c=>{l[u.key][c.key]=c.defaultSelected??!1});return}}),e[n].push(l)}),_.jsx("div",{className:a||"flex items-center gap-2",children:_.jsx(p5,{...o,children:i.map(({componentType:s,key:l,children:u,...c},d)=>s!=="accordion-item"||!Array.isArray(u)?null:_.jsx(v5,{...c,keepContentMounted:!0,children:u.map(f=>{if(f.componentType==="input")return PO(f,{},h=>{e[n][d][f.key]=h});if(f.componentType==="switch")return IO(f,{},h=>{e[n][d][f.key]=h});if(f.componentType==="radio-group")return RO(f,{},h=>{e[n][d][f.key]=h});if(f.componentType==="checkbox-group")return e[n][d][f.key]={},kO(f,{},(h,v)=>{e[n][d][f.key][h]=v});if(f.componentType==="divider")return NO(f)})},l))},n)})},XZe=(r,e)=>{let{componentType:t,key:n,data:a,label:i,className:o,children:s,...l}=r;const[u,c]=D.useState(0),d=m=>{a.splice(m,1),e[n].splice(m,1),c(y=>y+1)};e[n]=a.map(m=>{const{title:y,...b}=m;return b});const f=[];if(!Array.isArray(a)||!Array.isArray(s==null?void 0:s.children))return _.jsx("div",{children:"数据错误"});const{children:h,...v}=s;for(let m=0;m<a.length;m++){const y=h.map((b,w)=>{if(!b.key)return null;const S=`${n}-${b.key}-${m}-${w}`;if(b.componentType==="input"){const T={...b,key:S,defaultValue:a[m][b.key]||b.defaultValue};return PO(T,{},A=>{a[m][b.key]=A,e[n][m]||(e[n][m]={}),e[n][m][b.key]=A})}if(b.componentType==="switch"){const T={...b,key:S,defaultSelected:a[m][b.key]??b.defaultSelected};return IO(T,{},A=>{a[m][b.key]=A,e[n][m]||(e[n][m]={}),e[n][m][b.key]=A})}if(b.componentType==="radio-group"){const T={...b,key:S,defaultValue:a[m][b.key]??b.defaultValue};return RO(T,{},A=>{a[m][b.key]=A,e[n][m]||(e[n][m]={}),e[n][m][b.key]=A})}if(b.componentType==="checkbox-group"){const T={...b,key:S,checkbox:a[m][b.key]??b.checkbox};return e[n][m]||(e[n][m]={}),kO(T,{},(A,M)=>{a[m][b.key][A]=M,e[n][m][b.key]||(e[n][m][b.key]={}),e[n][m][b.key][A]=M})}return b.componentType==="divider"?NO({...b,key:S}):null}).filter(Boolean);f.push(D.createElement(v5,{...v,key:`${n}-accordion-item-${m}-${u}`,textValue:a[m].title||v.title||"默认标题",title:_.jsxs("div",{className:"flex justify-between items-center w-full pr-4",children:[_.jsx("span",{children:a[m].title||v.title||"默认标题"}),_.jsx("div",{role:"button",tabIndex:0,onClick:b=>{b.stopPropagation(),d(m)},onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),b.stopPropagation(),d(m))},className:"px-2 py-1 text-sm bg-red-500 text-white rounded hover:bg-red-600 transition-colors cursor-pointer",children:"删除"})]})},_.jsx("div",{className:"flex flex-col gap-4",children:y})))}return _.jsxs("div",{className:o||"flex flex-col gap-4 w-full",children:[_.jsxs("div",{className:"flex justify-between items-center",children:[_.jsx("span",{className:"text-default-500 text-md",children:i}),_.jsx("button",{type:"button",onClick:()=>{a.push({...JSON.parse(JSON.stringify(a[0])),title:"新卡片"+(a.length+1)}),c(m=>m+1)},className:"px-3 py-1 text-sm bg-blue-500 text-white rounded hover:bg-blue-600 transition-colors",children:"添加新卡片"})]}),_.jsx(p5,{className:"border border-default-200 rounded-lg p-1",...l,keepContentMounted:!0,children:f},`${n}-accordion-${u}`)]})};function JZe(r,e={}){const t=[],n=WZe(e);return r.forEach(a=>{if(a.componentType==="input")return t.push(PO(a,n));if(a.componentType==="switch")return t.push(IO(a,n));if(a.componentType==="checkbox-group")return t.push(kO(a,n));if(a.componentType==="radio-group")return t.push(RO(a,n));if(a.componentType==="accordion")return t.push(ZZe(a,n));if(a.componentType==="accordion-pro")return t.push(XZe(a,n));if(a.componentType==="divider")return t.push(NO(a));console.log(`[未知组件] ${a}`)}),{list:t,result:n}}const eXe=({configs:r,onChange:e,values:t={}})=>{const{list:n,result:a}=JZe(r,t);return D.useEffect(()=>{e(a)},[a,e]),_.jsx("div",{className:"w-full",children:_.jsx("div",{className:"flex flex-wrap gap-4 w-full",children:n.map((i,o)=>_.jsx("div",{className:"w-full",children:i},`dynamic-component-${o}-${i.key||""}`))})})},tXe=D.memo(({open:r,name:e,type:t,onClose:n})=>{const[a,i]=D.useState(!1),[o,s]=D.useState([]),[l,u]=D.useState({}),[c,d]=D.useState({}),f=D.useRef(!1),h=D.useRef({name:e,type:t,configValues:{}});D.useEffect(()=>(f.current=!0,()=>{f.current=!1}),[]);const v=D.useCallback(async()=>{if(r)try{i(!0);const w=await or.serverPost("/api/v1/plugin/config/get",{name:e,type:t});if(!f.current)return;if(!w){Ur.error("获取配置失败"),n();return}s(w),u(h.current.configValues),d(h.current.configValues)}catch(w){if(!f.current)return;Ur.error(w.message),n()}finally{if(!f.current)return;i(!1)}},[e,t,n,r]);D.useEffect(()=>{r?v():(s([]),u(h.current.configValues),d(h.current.configValues),i(!1))},[r,v]);const m=D.useCallback(w=>{!f.current||!r||d(w)},[r]);D.useEffect(()=>{r&&JSON.stringify(c)!==JSON.stringify(l)&&u(c)},[c,l,r]);const y=D.useCallback(async()=>{if(r)try{const w=await or.serverPost("/api/v1/plugin/config/save",{name:e,type:t,config:c});if(!f.current)return;w!=null&&w.result&&(u(w.result),d(w.result),h.current.configValues=w.result),Ur.success("保存成功")}catch(w){if(!f.current)return;Ur.error(w.message)}},[e,t,c,r]),b=D.useMemo(()=>r?a?_.jsx("div",{className:"h-full flex items-center justify-center",children:_.jsxs("div",{className:"flex flex-col items-center gap-3",children:[_.jsx(ey,{size:"md",color:"primary"}),_.jsx("p",{className:"text-gray-500 dark:text-gray-400 text-sm",children:"正在加载配置..."})]})}):o.length===0?_.jsxs("div",{className:"h-full flex flex-col items-center justify-center",children:[_.jsx("div",{className:"w-16 h-16 flex items-center justify-center rounded-full bg-gray-50 dark:bg-gray-800",children:_.jsx(s1e,{className:"text-2xl text-gray-400 dark:text-gray-500"})}),_.jsx("h3",{className:"mt-4 text-gray-900 dark:text-gray-100 font-medium",children:"暂无配置项"}),_.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-1.5",children:"该插件当前没有需要配置的选项"})]}):_.jsx("div",{className:"h-full space-y-4 overflow-y-auto custom-scrollbar",children:_.jsx("div",{className:"p-6 bg-gray-50/50 dark:bg-gray-800/50 rounded-2xl border border-gray-100 dark:border-gray-800 transition-colors",children:_.jsx(eXe,{configs:o,onChange:m,values:l})})}):null,[a,o,m,r,l]);return r?_.jsx(Oc,{isOpen:r,onOpenChange:n,size:"4xl",scrollBehavior:"inside",classNames:{base:"bg-white dark:bg-gray-900",header:"border-b border-gray-100 dark:border-gray-800",footer:"border-t border-gray-100 dark:border-gray-800"},children:_.jsxs(Rc,{className:"max-h-[85vh]",children:[_.jsx(Nc,{className:"shrink-0",children:_.jsx("div",{className:"flex items-center py-1 px-1",children:_.jsxs("div",{className:"flex items-center gap-2.5",children:[_.jsx("div",{className:"w-7 h-7 flex items-center justify-center rounded-lg bg-blue-50/80 dark:bg-blue-900/20 transition-colors",children:_.jsx(Nne,{className:"text-base text-blue-600/90 dark:text-blue-400"})}),_.jsxs("div",{children:[_.jsx("h2",{className:"text-[15px] font-medium text-gray-900 dark:text-gray-100 leading-[18px]",children:e}),_.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5 leading-[14px]",children:"插件配置与管理"})]})]})})}),_.jsx(kc,{className:"flex-1 overflow-auto",children:_.jsx("div",{className:"h-[480px] py-5",children:b})}),_.jsx($0,{className:"shrink-0 py-3",children:_.jsxs("div",{className:"flex justify-end gap-2",children:[_.jsx(Ze,{color:"default",variant:"bordered",size:"md",onPress:()=>console.log("当前配置值:",c),className:"px-5 h-10 min-w-[88px] font-medium border-gray-200 hover:bg-gray-50 dark:border-gray-700 dark:hover:bg-gray-800",startContent:_.jsx(LDe,{className:"text-lg"}),children:"打印配置"}),_.jsx(Ze,{color:"default",variant:"bordered",size:"md",onPress:n,className:"px-5 h-10 min-w-[88px] font-medium border-gray-200 hover:bg-gray-50 dark:border-gray-700 dark:hover:bg-gray-800",children:"取消"}),_.jsx(Ze,{color:"primary",variant:"flat",size:"md",onPress:y,isDisabled:o.length===0,className:"px-5 h-10 min-w-[88px] font-medium bg-blue-50 hover:bg-blue-100 text-blue-600 dark:bg-blue-900/20 dark:hover:bg-blue-900/30 dark:text-blue-400",children:"保存"})]})})]})}):null},(r,e)=>r.open===e.open&&r.name===e.name&&r.type===e.type);function rXe({plugin:r}){const[e,t]=D.useState(!1),[n,a]=D.useState(!1),[i,o]=D.useState(!1),{runAsync:s}=Xi(()=>or.serverPost("/api/v1/plugin/update",{name:r.name}),{manual:!0}),{runAsync:l}=Xi(()=>or.serverPost("/api/v1/plugin/uninstall",{name:r.name}),{manual:!0});return _.jsxs(_.Fragment,{children:[_.jsx(Ze,{isIconOnly:!0,variant:"light",color:"primary",size:"sm",onPress:()=>t(!0),children:_.jsx(Nne,{className:"text-lg"})}),_.jsx(qZe,{isOpen:e,onClose:()=>t(!1),plugin:r,onUpdate:async()=>{await s(),t(!1)},onUninstall:async()=>{await l(),t(!1)},onViewApps:r.type.toLowerCase()==="app"?()=>{a(!0)}:void 0,onViewConfig:()=>o(!0)}),_.jsx(QZe,{isOpen:n,onClose:()=>a(!1),pluginName:r.name}),_.jsx(tXe,{open:i,name:r.name,type:r.type,onClose:()=>o(!1),onViewConfig:()=>o(!0)})]})}function nXe({plugin:r}){var c;const[e,t]=D.useState(!1),[n,a]=D.useState(!1),[i,o]=D.useState(""),{data:s}=Xi(()=>or.serverPost("/api/v1/plugin/task",{taskId:i}),{pollingInterval:1e3,pollingWhenHidden:!1,ready:!!i&&n}),{loading:l,run:u}=Xi(async()=>{var f,h;const{taskId:d}=await or.serverPost("/api/v1/plugin/install",{name:r.name,type:r.type,url:r.type==="app"?(f=r.repo[0])==null?void 0:f.url:(h=r.repo[0])==null?void 0:h.url});return o(d),a(!0),{taskId:d}},{manual:!0,onError:d=>{Ur.error(d.message)}});return _.jsxs(_.Fragment,{children:[_.jsx(Ze,{size:"sm",variant:"flat",color:"primary",className:"h-7 bg-primary-500/10 hover:bg-primary-500/20 dark:bg-primary-500/20 dark:hover:bg-primary-500/30",startContent:_.jsx(R5e,{className:"text-base"}),onPress:()=>t(!0),children:"安装"}),_.jsx(Oc,{isOpen:e&&!n,onClose:()=>t(!1),size:"2xl",classNames:{base:"border border-default-200",header:"border-b border-default-200",body:"py-6",footer:"border-t border-default-200"},children:_.jsxs(Rc,{children:[_.jsx(Nc,{className:"flex flex-col gap-1",children:_.jsx("h3",{className:"text-lg font-semibold",children:"安装确认"})}),_.jsx(kc,{children:_.jsxs("div",{className:"space-y-4",children:[_.jsxs("div",{className:"flex items-start gap-3",children:[_.jsx("div",{className:"shrink-0 w-24 text-default-500 text-sm",children:"插件名称"}),_.jsx("div",{className:"text-sm font-mono bg-default-100 px-2 py-0.5 rounded",children:r.name})]}),_.jsxs("div",{className:"flex items-start gap-3",children:[_.jsx("div",{className:"shrink-0 w-24 text-default-500 text-sm",children:"版本"}),_.jsx("div",{className:"text-sm font-mono bg-default-100 px-2 py-0.5 rounded",children:r.version})]}),_.jsxs("div",{className:"flex items-start gap-3",children:[_.jsx("div",{className:"shrink-0 w-24 text-default-500 text-sm",children:"描述"}),_.jsx("div",{className:"text-sm text-default-600",children:r.description})]}),r.author.length>0&&_.jsxs("div",{className:"flex items-start gap-3",children:[_.jsx("div",{className:"shrink-0 w-24 text-default-500 text-sm",children:"作者"}),_.jsx("div",{className:"text-sm text-default-600",children:r.author.map((d,f)=>_.jsxs("span",{children:[d.name,f!==r.author.length-1&&", "]},d.name+f))})]}),((c=r.license)==null?void 0:c.name)&&_.jsxs("div",{className:"flex items-start gap-3",children:[_.jsx("div",{className:"shrink-0 w-24 text-default-500 text-sm",children:"开源许可"}),_.jsx("div",{className:"text-sm text-default-600",children:r.license.name})]}),r.home&&r.home!=="-"&&_.jsxs("div",{className:"flex items-start gap-3",children:[_.jsx("div",{className:"shrink-0 w-24 text-default-500 text-sm",children:"插件主页"}),_.jsx("div",{className:"text-sm text-default-600",children:_.jsx(tu,{href:r.home,isExternal:!0,showAnchorIcon:!0,className:"text-primary-500 hover:text-primary-600",children:r.home})})]}),_.jsxs("div",{className:"mt-4 p-3 bg-warning-50 text-warning-600 rounded-lg text-sm",children:[_.jsx("p",{className:"font-medium mb-2",children:"免责声明"}),_.jsxs("div",{className:"space-y-2",children:[_.jsx("p",{children:"在安装并使用此插件之前,请您仔细阅读并理解以下声明:"}),_.jsxs("ul",{className:"list-disc list-inside space-y-1 ml-2",children:[_.jsx("li",{children:"安装前请自行评估其安全性和适用性"}),_.jsx("li",{children:"使用本插件所产生的任何直接或间接后果,均由用户自行承担"}),_.jsx("li",{children:"我们不对插件的可用性、可靠性和准确性做任何明示或暗示的保证"}),_.jsx("li",{children:"如遇任何技术问题,建议及时与插件开发者联系或停止使用"})]}),_.jsx("p",{className:"mt-2 text-xs",children:'点击"确认安装"即表示您已完全理解并接受上述免责声明的全部内容。'})]})]})]})}),_.jsxs($0,{children:[_.jsx(Ze,{color:"default",variant:"light",onPress:()=>t(!1),children:"取消"}),_.jsx(Ze,{color:"primary",onPress:u,isLoading:l,children:"确认安装"})]})]})}),_.jsx(LO,{isOpen:n,onClose:()=>{a(!1),t(!1),window.dispatchEvent(new Event("plugin-list-update"))},taskId:i,plugin:r,task:s||{id:i,name:r.name,type:"install",status:"running",minimized:!1,logs:[]}})]})}function aXe({onMaximize:r,tasks:e}){const t=e.filter(n=>n.minimized);return t.length===0?null:_.jsx(Fa,{className:"fixed bottom-4 right-4 w-80",children:_.jsx(ms,{className:"p-3",children:_.jsx("div",{className:"max-h-[300px] overflow-auto",children:t.map(n=>_.jsxs("div",{className:"flex items-center justify-between p-2 hover:bg-default-100 rounded",children:[_.jsxs("div",{className:"flex flex-col gap-1",children:[_.jsx("span",{className:"text-sm font-medium",children:n.name}),_.jsx(Gm,{size:"sm",variant:"flat",color:n.status==="completed"?"success":n.status==="failed"?"danger":"primary",children:n.status})]}),_.jsx(Ze,{isIconOnly:!0,variant:"light",size:"sm",onPress:()=>r(n.id),children:_.jsx(rpe,{})})]},n.id))})})})}function iXe({isOpen:r,onClose:e,tasks:t,onMaximize:n}){return _.jsx(Oc,{isOpen:r,onClose:e,size:"2xl",children:_.jsxs(Rc,{children:[_.jsx(Nc,{className:"flex flex-col gap-1",children:_.jsx("h3",{className:"text-lg font-semibold",children:"任务列表"})}),_.jsx(kc,{children:t.length===0?_.jsx("div",{className:"text-center py-6 text-default-400",children:"暂无任务"}):_.jsx("div",{className:"space-y-2",children:t.map(a=>_.jsxs("div",{className:"flex items-center justify-between p-3 bg-default-50 rounded-lg",children:[_.jsxs("div",{className:"flex flex-col gap-1",children:[_.jsx("span",{className:"text-sm font-medium",children:a.name}),_.jsx(Gm,{size:"sm",variant:"flat",color:a.status==="completed"?"success":a.status==="failed"?"danger":"primary",children:a.status})]}),_.jsx(Ze,{isIconOnly:!0,variant:"light",size:"sm",onPress:()=>{n(a.id),e()},children:_.jsx(rpe,{})})]},a.id))})})]})})}function npe(...r){return RAe(Gr(r))}const v0=r=>/^(http|https|file):\/\/.*/.test(r),oXe=r=>{var e,t,n;if(typeof r.insert!="string"){if((e=r.insert)!=null&&e.image)return{type:"image",file:r.insert.image.src.replace("data:image/","base64://")};if((t=r.insert)!=null&&t.emoji)return{type:"face",id:Number(r.insert.emoji.id)};if((n=r.insert)!=null&&n.reply)return{type:"reply",messageId:r.insert.reply.messageId}}return{type:"text",text:r.insert}};function sXe(r){if(!r)return"未知时间";const e=new Date(r),n=Math.abs(new Date().getTime()-e.getTime()),a=Math.floor(n/(1e3*60*60*24));return a===0?"今天":a===1?"昨天":a<7?`${a}天前`:a<30?`${Math.floor(a/7)}周前`:a<365?`${Math.floor(a/30)}月前`:"1年前"}function lXe(r){if(!r||r<0)return"0";if(r<1e3)return r.toString();if(r<1e6){const a=r/100,i=Math.floor(a)/10,o=Math.round(i*10)/10;return o.toFixed(1).endsWith(".0")?`${Math.floor(o)}k`:`${o.toFixed(1)}k`}const e=r/1e5,t=Math.floor(e)/10,n=Math.round(t*10)/10;return n.toFixed(1).endsWith(".0")?`${Math.floor(n)}M`:`${n.toFixed(1)}M`}function uXe({isOpen:r,onClose:e}){const[t,n]=D.useState(new Set),[a,i]=D.useState(!1),{data:o=[],loading:s,refresh:l}=Xi(()=>or.serverPost("/api/v1/plugin/updates"),{ready:r,refreshDeps:[r],onSuccess:m=>{const y=m.filter(b=>b.hasUpdate).map(b=>b.name);n(new Set(y))}}),u=m=>{const y=new Set(t);y.has(m.name)?y.delete(m.name):y.add(m.name),n(y)},c=()=>{const m=o.map(y=>y.name);t.size===m.length?n(new Set):n(new Set(m))},d=async()=>{const y=Array.from(t).filter(b=>o.find(w=>w.name===b&&w.hasUpdate));if(y.length===0){Ur.error("选中的插件中没有需要更新的插件");return}i(!0);try{const b=await or.serverPost("/api/v1/plugin/update/batch",{plugins:y}),w=b.filter(T=>T.status==="ok").length,S=b.length-w;S===0?Ur.success(`成功更新 ${w} 个插件`):Ur.error(`${w} 个插件更新成功,${S} 个插件更新失败`),window.dispatchEvent(new Event("plugin-list-update")),e()}catch(b){Ur.error("更新失败:"+b.message)}finally{i(!1)}},f=o.filter(m=>m.hasUpdate).length,h=o.map(m=>m.name),v=t.size===h.length;return D.useEffect(()=>{const m=o.filter(y=>y.hasUpdate).map(y=>y.name);t.size!==m.length&&n(new Set(m))},[o]),_.jsx(Oc,{isOpen:r,onClose:e,placement:"center",classNames:{base:"max-w-2xl"},children:_.jsxs(Rc,{children:[_.jsxs(Nc,{className:"flex flex-col gap-1",children:[_.jsx("h3",{className:"text-lg font-semibold",children:"更新管理"}),_.jsx("p",{className:"text-xs text-default-500",children:f>0?`有 ${f} 个插件可以更新`:"所有插件都是最新版本"})]}),_.jsxs(kc,{children:[_.jsxs("div",{className:"flex items-center justify-between mb-3",children:[_.jsx(Ze,{variant:"flat",size:"sm",onPress:c,className:"h-7 px-2 min-w-[76px] font-medium",children:v?"取消全选":"全选"}),_.jsx(Ze,{variant:"flat",size:"sm",onPress:l,isDisabled:s,className:"h-7 px-2 min-w-[76px] font-medium",startContent:_.jsx(uT,{className:"text-base"}),children:"刷新"})]}),_.jsx(EO,{className:"max-h-[400px]",children:s?_.jsx("div",{className:"h-[200px] flex items-center justify-center",children:_.jsx(ey,{size:"lg",color:"primary"})}):o.length>0?_.jsxs("div",{className:"w-full",children:[_.jsxs("div",{className:"grid grid-cols-6 gap-2 px-3 py-2 bg-default-100 dark:bg-default-50/5 rounded-t-lg text-sm font-medium text-default-600",children:[_.jsx("div",{className:"col-span-2",children:"插件名称"}),_.jsx("div",{className:"col-span-2",children:"当前版本"}),_.jsx("div",{className:"col-span-2",children:"更新状态"})]}),_.jsx("div",{className:"space-y-1 mt-1",children:o.map(m=>{var y;return _.jsxs("div",{onClick:()=>u(m),className:`grid grid-cols-6 gap-2 px-3 py-2 rounded-lg transition-colors ${m.name==="node-karin"?"bg-primary-50/20 dark:bg-primary-500/5":""} ${t.has(m.name)?"bg-primary-50/50 dark:bg-primary-500/10 cursor-pointer":"hover:bg-default-100/80 dark:hover:bg-default-100/10 cursor-pointer"}`,children:[_.jsxs("div",{className:"col-span-2 flex items-center gap-2",children:[_.jsx(xO,{radius:"full",size:"sm",isSelected:t.has(m.name),onClick:b=>{b.stopPropagation(),u(m)}}),m.type==="npm"?_.jsx(XA,{className:`text-lg ${m.name==="node-karin"?"text-primary-500":"text-[#CB3837]"}`}):_.jsx(ZA,{className:"text-lg text-[#24292e]"}),_.jsx("span",{className:`text-sm truncate ${m.name==="node-karin"?"font-semibold text-primary-600 dark:text-primary-500":"font-medium"}`,children:m.name})]}),_.jsx("div",{className:"col-span-2 flex items-center",children:m.type==="npm"?_.jsx("span",{className:"text-sm text-default-500",children:m.currentVersion}):_.jsx("span",{className:"font-mono text-sm text-default-500",children:(y=m.currentHash)==null?void 0:y.substring(0,7)})}),_.jsxs("div",{className:"col-span-2 flex items-center justify-between",children:[_.jsx("div",{className:"flex items-center gap-2",children:m.hasUpdate?m.type==="npm"?_.jsx("span",{className:"text-sm text-primary-500",children:m.latestVersion}):_.jsxs("span",{className:"text-sm text-warning-500",children:["有 ",m.updateCount," 个更新"]}):_.jsxs("div",{className:"flex items-center gap-1 text-success-500",children:[_.jsx(I5e,{className:"text-lg"}),_.jsx("span",{className:"text-sm",children:"最新版本"})]})}),_.jsx(Ze,{size:"sm",color:"primary",variant:t.has(m.name)?"solid":"flat",onPress:()=>u(m),className:"min-w-[76px]",children:t.has(m.name)?"已选择":"选择"})]})]},m.name)})})]}):_.jsx("div",{className:"h-[200px] flex items-center justify-center",children:_.jsxs("div",{className:"text-center",children:[_.jsx("p",{className:"text-lg font-medium text-default-900 mb-1",children:"暂无插件"}),_.jsx("p",{className:"text-xs text-default-600",children:"您还没有安装任何插件"})]})})})]}),_.jsxs($0,{children:[_.jsx(Ze,{variant:"light",onPress:e,children:"取消"}),_.jsx(Ze,{color:"primary",onPress:d,isLoading:a,isDisabled:t.size===0,startContent:_.jsx(Rne,{}),children:"更新选中的插件"})]})]})})}const cXe=r=>{const e=["为您的工作流程带来更多可能性和效率提升","简单易用且功能强大的插件,助力开发体验","为项目开发锦上添花的得力助手","提升开发效率的智能工具,让工作更轻松","优化您的开发流程,提供更好的使用体验","为您的项目增添新的维度和可能性","智能且高效的开发工具,助力效率提升","让开发更简单,让创作更有趣","为您的工作流程带来智能化的解决方案","提供专业的开发支持,让工作更高效"],t=r.split("").reduce((a,i)=>a+i.charCodeAt(0),0),n=t%e.length;return e[n].replace(/您的|开发/,()=>{const a=["您的",r,"开发"];return a[t%a.length]})},tZ=r=>{switch(r.toLowerCase()){case"npm":return{icon:_.jsx(XA,{className:"text-xl text-[#CB3837]"}),tooltip:"NPM 插件",color:"bg-red-50/50"};case"git":return{icon:_.jsx(ZA,{className:"text-xl text-[#24292e]"}),tooltip:"Git 插件",color:"bg-purple-50/50"};case"app":return{icon:_.jsx(DO,{className:"text-xl text-primary-500"}),tooltip:"应用插件",color:"bg-primary-50/50"};default:return{icon:_.jsx(P5e,{className:"text-xl text-default-500"}),tooltip:"未知类型",color:"bg-default-50/50"}}},dXe=({plugin:r})=>_.jsxs(Fa,{className:"group w-full h-[140px] flex flex-col overflow-hidden cursor-pointer relative bg-default-50/30 dark:bg-default-100/5 hover:-translate-y-[1px] hover:shadow-sm hover:bg-default-100/50 dark:hover:bg-default-100/10 transition-all duration-300 rounded-xl",isPressable:!0,radius:"sm",children:[_.jsx("div",{className:"absolute inset-0 border border-default-200/20 dark:border-default-100/5 group-hover:border-primary-500/30 dark:group-hover:border-primary-500/20 transition-all duration-300 rounded-xl"}),_.jsxs(ms,{className:"p-4 flex flex-col h-full relative",children:[_.jsxs("div",{className:"flex items-start justify-between gap-3 mb-2",children:[_.jsxs("div",{className:"flex-1 min-w-0",children:[_.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[r.installed&&_.jsx(wn,{content:"已安装",children:_.jsx("div",{className:"relative flex items-center justify-center",children:_.jsx("div",{className:"w-4 h-4 flex items-center justify-center",children:_.jsx(GYe,{className:"w-full h-full text-success-500/90 dark:text-success-400/90 stroke-[2]"})})})}),r.home&&r.home!=="-"?_.jsx(wn,{content:"点击访问插件主页",children:_.jsx(tu,{href:r.home,isExternal:!0,className:"text-sm font-medium text-default-900 hover:text-primary-500 transition-colors truncate",children:r.name})}):_.jsx("span",{className:"text-sm font-medium text-default-900 truncate",children:r.name})]}),_.jsx("p",{className:"text-xs text-default-500 line-clamp-2 leading-relaxed",title:r.description,children:r.description==="-"?cXe(r.name):r.description})]}),_.jsx("div",{className:"flex shrink-0",children:r.author.length>0?_.jsx(wn,{content:_.jsxs("div",{className:"text-center",children:[_.jsx("p",{className:"text-sm text-default-600",children:r.author[0].name}),r.author[0].home&&r.author[0].home!=="-"&&_.jsx("p",{className:"text-xs text-default-400",children:"点击访问主页"})]}),children:r.author[0].home&&r.author[0].home!=="-"?_.jsx(tu,{href:r.author[0].home,isExternal:!0,children:_.jsx(Zb,{isBordered:!0,size:"sm",src:r.author[0].avatar||"https://avatar.vercel.sh/ikenxuan",className:"bg-default-100 border-white dark:border-default-800"})}):_.jsx(Zb,{isBordered:!0,size:"sm",src:r.author[0].avatar||"https://avatar.vercel.sh/ikenxuan",className:"bg-default-100 border-white dark:border-default-800"})}):_.jsx(Zb,{isBordered:!0,size:"sm",icon:_.jsx(Wwe,{}),className:"bg-default-100 border-white dark:border-default-800"})})]}),_.jsxs("div",{className:"flex items-center justify-between mt-auto",children:[_.jsxs("div",{className:"flex items-center gap-2",children:[_.jsx(Gm,{variant:"flat",size:"sm",className:"h-5 px-2 bg-default-100/80 border-small border-default-200/50",children:_.jsx("span",{className:"text-xs font-mono",children:r.version==="-"?"未知版本":`v${r.version}`})}),_.jsxs("div",{className:"flex items-center gap-2 text-xs text-default-400",children:[_.jsxs("div",{className:"flex items-center gap-1",children:[_.jsx(O5e,{className:"text-base"}),_.jsx("span",{children:lXe(r.downloads||0)})]}),_.jsx("span",{children:"·"}),_.jsxs("div",{className:"flex items-center gap-1",children:[_.jsx(uT,{className:"text-base"}),_.jsx("span",{children:sXe(r.updated)})]})]})]}),_.jsx("div",{className:"flex items-center gap-2",children:r.installed?_.jsx(rXe,{plugin:r}):_.jsx(nXe,{plugin:r})})]})]})]});function fXe(){const[r,e]=D.useState(1),[t,n]=D.useState(null),[a,i]=D.useState(!1),[o,s]=D.useState(!1),[,l]=D.useState(!1),[u,c]=D.useState("all"),[d,f]=D.useState(""),[h,v]=D.useState(!1),m=D.useRef(null);let{data:y,error:b,loading:w,refresh:S}=Xi(async()=>(v(!0),or.serverPost("/api/v1/plugin/index",{page:r,pageSize:16,refresh:h}).then(j=>j).catch(j=>{throw console.error("❌ 插件列表刷新失败:",j),j}).finally(()=>{v(!1)})),{refreshDeps:[r],onSuccess:(j,B)=>{if(!(!B||!BYe(j,B)))return B}});y||(y={list:[],total:0,page:1,pageSize:16});const T=y.list,{data:A=[]}=Xi(()=>or.serverPost("/api/v1/plugin/task/list"),{pollingInterval:2e3,pollingWhenHidden:!1,onSuccess:(j,B)=>{if(!B||JSON.stringify(j)!==JSON.stringify(B)){const H=j.map(F=>({...F,minimized:t!==F.id}));if(JSON.stringify(H)!==JSON.stringify(B))return H}return B}}),M=16,P=D.useMemo(()=>{let j=T||[];if(u!=="all"&&(j=j.filter(B=>B.type&&B.type.toLowerCase()===u.toLowerCase())),d.trim()){const B=d.toLowerCase().trim();j=j.filter(H=>H.name.toLowerCase().includes(B)||H.description&&H.description!=="-"&&H.description.toLowerCase().includes(B)||H.author.some(F=>F.name.toLowerCase().includes(B))||H.type&&H.type.toLowerCase().includes(B))}return j},[T,u,d]);D.useEffect(()=>{e(1)},[u,d]);const E=D.useMemo(()=>P||[],[P]),R=D.useCallback(j=>{n(j)},[]),N=D.useCallback(()=>{n(null),S()},[S]),k=D.useCallback(()=>{n(null),l(!1),S()},[S]);D.useEffect(()=>{},[t]);const O=D.useMemo(()=>t?A.find(j=>j.id===t):void 0,[t,A]),L=D.useMemo(()=>O?T.find(j=>j.name===O.name):void 0,[O,T]);D.useEffect(()=>{const j=()=>{S()};return window.addEventListener("plugin-list-update",j),()=>{window.removeEventListener("plugin-list-update",j)}},[S]);const $=D.useCallback(()=>{h||(m.current&&clearTimeout(m.current),v(!0),m.current=setTimeout(()=>{S()},300))},[h,S]);return b?_.jsx("div",{className:"h-full flex items-center justify-center",children:_.jsx(Fa,{className:"max-w-md mx-auto",children:_.jsxs(ms,{className:"flex flex-col items-center gap-4 py-8",children:[_.jsx("div",{className:"text-xl font-medium text-danger",children:"加载失败"}),_.jsx("p",{className:"text-center text-default-600",children:b.message}),_.jsx(Ze,{color:"primary",variant:"flat",onPress:()=>S(),startContent:_.jsx(uT,{}),children:"重试"})]})})}):_.jsxs("div",{className:"h-full flex flex-col",children:[_.jsx(Fa,{className:"flex-none mx-0",children:_.jsxs(ms,{className:"p-3",children:[_.jsxs("div",{className:"flex justify-between items-start mb-3",children:[_.jsxs("div",{className:"flex flex-col gap-0.5",children:[_.jsx("h1",{className:"text-xl font-semibold text-default-900",children:"插件市场"}),_.jsx("p",{className:"text-xs text-default-600",children:"发现、安装和管理您的插件"})]}),_.jsxs("div",{className:"flex gap-2",children:[_.jsxs(Ze,{variant:"flat",size:"sm",onPress:()=>i(!0),className:"h-7 px-2 min-w-[76px] font-medium",startContent:_.jsx(j5e,{className:"text-base"}),children:["任务列表 ",A.length>0&&_.jsx("span",{className:"ml-1 px-1.5 py-0.5 text-xs rounded-full bg-primary-500/10 text-primary-500",children:A.length})]}),_.jsx(Ze,{variant:"flat",size:"sm",onPress:()=>s(!0),className:"h-7 px-2 min-w-[76px] font-medium",startContent:_.jsx(Rne,{className:"text-base"}),children:"更新管理"})]})]}),_.jsxs("div",{className:"flex items-center justify-between gap-2",children:[_.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[_.jsx(Va,{classNames:{base:"max-w-[240px]",input:"text-xs",inputWrapper:"h-7 border-gray-200 dark:border-gray-700"},placeholder:"搜索插件...",value:d,onValueChange:f,startContent:_.jsx(H5e,{className:"text-default-400 text-base"}),size:"sm",isClearable:!0,onClear:()=>f("")}),_.jsxs(OZe,{children:[_.jsx(IZe,{children:_.jsx(Ze,{variant:"flat",size:"sm",className:"h-7 px-2 min-w-[100px] bg-default-100/50 dark:bg-default-100/20",startContent:_.jsx("div",{className:"w-5 h-5 flex items-center justify-center",children:u==="all"?_.jsx(FF,{className:"text-base text-default-500"}):tZ(u).icon}),endContent:_.jsx(k5e,{className:"text-base text-default-400"}),children:u==="all"?"全部类型":tZ(u).tooltip})}),_.jsxs(PZe,{"aria-label":"插件类型筛选",selectedKeys:[u],selectionMode:"single",onSelectionChange:j=>c(Array.from(j)[0]),children:[_.jsx($_,{startContent:_.jsx(FF,{className:"text-base text-default-500"}),children:"全部类型"},"all"),_.jsx($_,{startContent:_.jsx(XA,{className:"text-lg text-[#CB3837]"}),children:"NPM 插件"},"npm"),_.jsx($_,{startContent:_.jsx(ZA,{className:"text-lg text-[#24292e]"}),children:"Git 插件"},"git"),_.jsx($_,{startContent:_.jsx(DO,{className:"text-lg text-primary-500"}),children:"应用插件"},"app")]})]})]}),_.jsx(Ze,{variant:"flat",size:"sm",onPress:$,className:"h-7 px-2 min-w-[76px] font-medium",startContent:_.jsx(uT,{className:"text-base"}),disabled:h,children:"刷新"})]})]})}),_.jsx("div",{className:"flex-1 min-h-0 mt-1",children:_.jsxs(Fa,{className:"h-full",children:[_.jsx(ms,{className:"p-0 overflow-hidden",children:_.jsx(EO,{className:"h-full",hideScrollBar:!0,children:w?_.jsx("div",{className:"h-full flex items-center justify-center",children:_.jsx(ey,{size:"lg",color:"primary"})}):E.length>0?_.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4 gap-3 p-3",children:E.map(j=>_.jsx(dXe,{plugin:j},j.name+j.time))}):_.jsx("div",{className:"h-full flex items-center justify-center",children:_.jsxs("div",{className:"text-center",children:[_.jsx("p",{className:"text-lg font-medium text-default-900 mb-1",children:"暂无插件"}),_.jsx("p",{className:"text-xs text-default-600",children:u==="all"?"当前没有任何插件":"没有找到符合条件的插件"})]})})})}),P.length>0&&_.jsx(I4e,{className:"flex justify-center py-2 px-3",children:_.jsx(JYe,{showControls:!0,showShadow:!0,color:"primary",size:"sm",page:r,total:Math.ceil(y.total/M),onChange:j=>e(j)})})]})}),_.jsx(aXe,{onMaximize:R,tasks:A.filter(j=>j.minimized)}),_.jsx(iXe,{isOpen:a,onClose:()=>i(!1),tasks:A,onMaximize:R}),_.jsx(uXe,{isOpen:o,onClose:()=>s(!1)}),O&&L&&t&&_.jsx(LO,{isOpen:!0,onClose:()=>{O.type==="uninstall"?N():k()},taskId:t,plugin:L,task:{...O,logs:O.logs||[]}})]})}const{createElement:g0,createContext:hXe,forwardRef:ape,useCallback:Ui,useContext:ipe,useEffect:Wp,useImperativeHandle:ope,useLayoutEffect:pXe,useMemo:vXe,useRef:Gi,useState:qm}=BX,rZ=BX[`useId${Math.random()}`.slice(0,5)],gXe=pXe,g5=hXe(null);g5.displayName="PanelGroupContext";const Kp=gXe,mXe=typeof rZ=="function"?rZ:()=>null;let yXe=0;function OO(r=null){const e=mXe(),t=Gi(r||e||null);return t.current===null&&(t.current=""+yXe++),r??t.current}function spe({children:r,className:e="",collapsedSize:t,collapsible:n,defaultSize:a,forwardedRef:i,id:o,maxSize:s,minSize:l,onCollapse:u,onExpand:c,onResize:d,order:f,style:h,tagName:v="div",...m}){const y=ipe(g5);if(y===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:b,expandPanel:w,getPanelSize:S,getPanelStyle:T,groupId:A,isPanelCollapsed:M,reevaluatePanelConstraints:P,registerPanel:E,resizePanel:R,unregisterPanel:N}=y,k=OO(o),O=Gi({callbacks:{onCollapse:u,onExpand:c,onResize:d},constraints:{collapsedSize:t,collapsible:n,defaultSize:a,maxSize:s,minSize:l},id:k,idIsFromProps:o!==void 0,order:f});Gi({didLogMissingDefaultSizeWarning:!1}),Kp(()=>{const{callbacks:$,constraints:j}=O.current,B={...j};O.current.id=k,O.current.idIsFromProps=o!==void 0,O.current.order=f,$.onCollapse=u,$.onExpand=c,$.onResize=d,j.collapsedSize=t,j.collapsible=n,j.defaultSize=a,j.maxSize=s,j.minSize=l,(B.collapsedSize!==j.collapsedSize||B.collapsible!==j.collapsible||B.maxSize!==j.maxSize||B.minSize!==j.minSize)&&P(O.current,B)}),Kp(()=>{const $=O.current;return E($),()=>{N($)}},[f,k,E,N]),ope(i,()=>({collapse:()=>{b(O.current)},expand:$=>{w(O.current,$)},getId(){return k},getSize(){return S(O.current)},isCollapsed(){return M(O.current)},isExpanded(){return!M(O.current)},resize:$=>{R(O.current,$)}}),[b,w,S,M,k,R]);const L=T(O.current,a);return g0(v,{...m,children:r,className:e,id:o,style:{...L,...h},"data-panel":"","data-panel-collapsible":n||void 0,"data-panel-group-id":A,"data-panel-id":k,"data-panel-size":parseFloat(""+L.flexGrow).toFixed(1)})}const Dm=ape((r,e)=>g0(spe,{...r,forwardedRef:e}));spe.displayName="Panel";Dm.displayName="forwardRef(Panel)";let Yk=null,Op=null;function bXe(r,e){if(e){const t=(e&fpe)!==0,n=(e&hpe)!==0,a=(e&ppe)!==0,i=(e&vpe)!==0;if(t)return a?"se-resize":i?"ne-resize":"e-resize";if(n)return a?"sw-resize":i?"nw-resize":"w-resize";if(a)return"s-resize";if(i)return"n-resize"}switch(r){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function xXe(){Op!==null&&(document.head.removeChild(Op),Yk=null,Op=null)}function wP(r,e){const t=bXe(r,e);Yk!==t&&(Yk=t,Op===null&&(Op=document.createElement("style"),document.head.appendChild(Op)),Op.innerHTML=`*{cursor: ${t}!important;}`)}function lpe(r){return r.type==="keydown"}function upe(r){return r.type.startsWith("pointer")}function cpe(r){return r.type.startsWith("mouse")}function m5(r){if(upe(r)){if(r.isPrimary)return{x:r.clientX,y:r.clientY}}else if(cpe(r))return{x:r.clientX,y:r.clientY};return{x:1/0,y:1/0}}function wXe(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function SXe(r,e,t){return r.x<e.x+e.width&&r.x+r.width>e.x&&r.y<e.y+e.height&&r.y+r.height>e.y}function _Xe(r,e){if(r===e)throw new Error("Cannot compare node with itself");const t={a:iZ(r),b:iZ(e)};let n;for(;t.a.at(-1)===t.b.at(-1);)r=t.a.pop(),e=t.b.pop(),n=r;er(n,"Stacking order can only be calculated for elements with a common ancestor");const a={a:aZ(nZ(t.a)),b:aZ(nZ(t.b))};if(a.a===a.b){const i=n.childNodes,o={a:t.a.at(-1),b:t.b.at(-1)};let s=i.length;for(;s--;){const l=i[s];if(l===o.a)return 1;if(l===o.b)return-1}}return Math.sign(a.a-a.b)}const CXe=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function TXe(r){var e;const t=getComputedStyle((e=dpe(r))!==null&&e!==void 0?e:r).display;return t==="flex"||t==="inline-flex"}function AXe(r){const e=getComputedStyle(r);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||TXe(r))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||CXe.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function nZ(r){let e=r.length;for(;e--;){const t=r[e];if(er(t,"Missing node"),AXe(t))return t}return null}function aZ(r){return r&&Number(getComputedStyle(r).zIndex)||0}function iZ(r){const e=[];for(;r;)e.push(r),r=dpe(r);return e}function dpe(r){const{parentNode:e}=r;return e&&e instanceof ShadowRoot?e.host:e}const fpe=1,hpe=2,ppe=4,vpe=8,EXe=wXe()==="coarse";let sl=[],Qm=!1,pf=new Map,y5=new Map;const qx=new Set;function MXe(r,e,t,n,a){var i;const{ownerDocument:o}=e,s={direction:t,element:e,hitAreaMargins:n,setResizeHandlerState:a},l=(i=pf.get(o))!==null&&i!==void 0?i:0;return pf.set(o,l+1),qx.add(s),pA(),function(){var c;y5.delete(r),qx.delete(s);const d=(c=pf.get(o))!==null&&c!==void 0?c:1;if(pf.set(o,d-1),pA(),d===1&&pf.delete(o),sl.includes(s)){const f=sl.indexOf(s);f>=0&&sl.splice(f,1),zO(),a("up",!0,null)}}}function oZ(r){const{target:e}=r,{x:t,y:n}=m5(r);Qm=!0,$O({target:e,x:t,y:n}),pA(),sl.length>0&&(vA("down",r),r.preventDefault(),r.stopPropagation())}function q1(r){const{x:e,y:t}=m5(r);if(Qm&&r.buttons===0&&(Qm=!1,vA("up",r)),!Qm){const{target:n}=r;$O({target:n,x:e,y:t})}vA("move",r),zO(),sl.length>0&&r.preventDefault()}function Zg(r){const{target:e}=r,{x:t,y:n}=m5(r);y5.clear(),Qm=!1,sl.length>0&&r.preventDefault(),vA("up",r),$O({target:e,x:t,y:n}),zO(),pA()}function $O({target:r,x:e,y:t}){sl.splice(0);let n=null;(r instanceof HTMLElement||r instanceof SVGElement)&&(n=r),qx.forEach(a=>{const{element:i,hitAreaMargins:o}=a,s=i.getBoundingClientRect(),{bottom:l,left:u,right:c,top:d}=s,f=EXe?o.coarse:o.fine;if(e>=u-f&&e<=c+f&&t>=d-f&&t<=l+f){if(n!==null&&document.contains(n)&&i!==n&&!i.contains(n)&&!n.contains(i)&&_Xe(n,i)>0){let v=n,m=!1;for(;v&&!v.contains(i);){if(SXe(v.getBoundingClientRect(),s)){m=!0;break}v=v.parentElement}if(m)return}sl.push(a)}})}function SP(r,e){y5.set(r,e)}function zO(){let r=!1,e=!1;sl.forEach(n=>{const{direction:a}=n;a==="horizontal"?r=!0:e=!0});let t=0;y5.forEach(n=>{t|=n}),r&&e?wP("intersection",t):r?wP("horizontal",t):e?wP("vertical",t):xXe()}function pA(){pf.forEach((r,e)=>{const{body:t}=e;t.removeEventListener("contextmenu",Zg),t.removeEventListener("pointerdown",oZ),t.removeEventListener("pointerleave",q1),t.removeEventListener("pointermove",q1)}),window.removeEventListener("pointerup",Zg),window.removeEventListener("pointercancel",Zg),qx.size>0&&(Qm?(sl.length>0&&pf.forEach((r,e)=>{const{body:t}=e;r>0&&(t.addEventListener("contextmenu",Zg),t.addEventListener("pointerleave",q1),t.addEventListener("pointermove",q1))}),window.addEventListener("pointerup",Zg),window.addEventListener("pointercancel",Zg)):pf.forEach((r,e)=>{const{body:t}=e;r>0&&(t.addEventListener("pointerdown",oZ,{capture:!0}),t.addEventListener("pointermove",q1))}))}function vA(r,e){qx.forEach(t=>{const{setResizeHandlerState:n}=t,a=sl.includes(t);n(r,a,e)})}function DXe(){const[r,e]=qm(0);return Ui(()=>e(t=>t+1),[])}function er(r,e){if(!r)throw console.error(e),Error(e)}const jO=10;function pv(r,e,t=jO){return r.toFixed(t)===e.toFixed(t)?0:r>e?1:-1}function vc(r,e,t=jO){return pv(r,e,t)===0}function ho(r,e,t){return pv(r,e,t)===0}function LXe(r,e,t){if(r.length!==e.length)return!1;for(let n=0;n<r.length;n++){const a=r[n],i=e[n];if(!ho(a,i,t))return!1}return!0}function Lm({panelConstraints:r,panelIndex:e,size:t}){const n=r[e];er(n!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:a=0,collapsible:i,maxSize:o=100,minSize:s=0}=n;if(pv(t,s)<0)if(i){const l=(a+s)/2;pv(t,l)<0?t=a:t=s}else t=s;return t=Math.min(o,t),t=parseFloat(t.toFixed(jO)),t}function mb({delta:r,initialLayout:e,panelConstraints:t,pivotIndices:n,prevLayout:a,trigger:i}){if(ho(r,0))return e;const o=[...e],[s,l]=n;er(s!=null,"Invalid first pivot index"),er(l!=null,"Invalid second pivot index");let u=0;if(i==="keyboard"){{const d=r<0?l:s,f=t[d];er(f,`Panel constraints not found for index ${d}`);const{collapsedSize:h=0,collapsible:v,minSize:m=0}=f;if(v){const y=e[d];if(er(y!=null,`Previous layout not found for panel index ${d}`),ho(y,h)){const b=m-y;pv(b,Math.abs(r))>0&&(r=r<0?0-b:b)}}}{const d=r<0?s:l,f=t[d];er(f,`No panel constraints found for index ${d}`);const{collapsedSize:h=0,collapsible:v,minSize:m=0}=f;if(v){const y=e[d];if(er(y!=null,`Previous layout not found for panel index ${d}`),ho(y,m)){const b=y-h;pv(b,Math.abs(r))>0&&(r=r<0?0-b:b)}}}}{const d=r<0?1:-1;let f=r<0?l:s,h=0;for(;;){const m=e[f];er(m!=null,`Previous layout not found for panel index ${f}`);const b=Lm({panelConstraints:t,panelIndex:f,size:100})-m;if(h+=b,f+=d,f<0||f>=t.length)break}const v=Math.min(Math.abs(r),Math.abs(h));r=r<0?0-v:v}{let f=r<0?s:l;for(;f>=0&&f<t.length;){const h=Math.abs(r)-Math.abs(u),v=e[f];er(v!=null,`Previous layout not found for panel index ${f}`);const m=v-h,y=Lm({panelConstraints:t,panelIndex:f,size:m});if(!ho(v,y)&&(u+=v-y,o[f]=y,u.toPrecision(3).localeCompare(Math.abs(r).toPrecision(3),void 0,{numeric:!0})>=0))break;r<0?f--:f++}}if(LXe(a,o))return a;{const d=r<0?l:s,f=e[d];er(f!=null,`Previous layout not found for panel index ${d}`);const h=f+u,v=Lm({panelConstraints:t,panelIndex:d,size:h});if(o[d]=v,!ho(v,h)){let m=h-v,b=r<0?l:s;for(;b>=0&&b<t.length;){const w=o[b];er(w!=null,`Previous layout not found for panel index ${b}`);const S=w+m,T=Lm({panelConstraints:t,panelIndex:b,size:S});if(ho(w,T)||(m-=T-w,o[b]=T),ho(m,0))break;r>0?b--:b++}}}const c=o.reduce((d,f)=>f+d,0);return ho(c,100)?o:a}function PXe({layout:r,panelsArray:e,pivotIndices:t}){let n=0,a=100,i=0,o=0;const s=t[0];er(s!=null,"No pivot index found"),e.forEach((d,f)=>{const{constraints:h}=d,{maxSize:v=100,minSize:m=0}=h;f===s?(n=m,a=v):(i+=m,o+=v)});const l=Math.min(a,100-i),u=Math.max(n,100-o),c=r[s];return{valueMax:l,valueMin:u,valueNow:c}}function Qx(r,e=document){return Array.from(e.querySelectorAll(`[data-panel-resize-handle-id][data-panel-group-id="${r}"]`))}function gpe(r,e,t=document){const a=Qx(r,t).findIndex(i=>i.getAttribute("data-panel-resize-handle-id")===e);return a??null}function mpe(r,e,t){const n=gpe(r,e,t);return n!=null?[n,n+1]:[-1,-1]}function ype(r,e=document){var t;if(e instanceof HTMLElement&&(e==null||(t=e.dataset)===null||t===void 0?void 0:t.panelGroupId)==r)return e;const n=e.querySelector(`[data-panel-group][data-panel-group-id="${r}"]`);return n||null}function b5(r,e=document){const t=e.querySelector(`[data-panel-resize-handle-id="${r}"]`);return t||null}function IXe(r,e,t,n=document){var a,i,o,s;const l=b5(e,n),u=Qx(r,n),c=l?u.indexOf(l):-1,d=(a=(i=t[c])===null||i===void 0?void 0:i.id)!==null&&a!==void 0?a:null,f=(o=(s=t[c+1])===null||s===void 0?void 0:s.id)!==null&&o!==void 0?o:null;return[d,f]}function kXe({committedValuesRef:r,eagerValuesRef:e,groupId:t,layout:n,panelDataArray:a,panelGroupElement:i,setLayout:o}){Gi({didWarnAboutMissingResizeHandle:!1}),Kp(()=>{if(!i)return;const s=Qx(t,i);for(let l=0;l<a.length-1;l++){const{valueMax:u,valueMin:c,valueNow:d}=PXe({layout:n,panelsArray:a,pivotIndices:[l,l+1]}),f=s[l];if(f!=null){const h=a[l];er(h,`No panel data found for index "${l}"`),f.setAttribute("aria-controls",h.id),f.setAttribute("aria-valuemax",""+Math.round(u)),f.setAttribute("aria-valuemin",""+Math.round(c)),f.setAttribute("aria-valuenow",d!=null?""+Math.round(d):"")}}return()=>{s.forEach((l,u)=>{l.removeAttribute("aria-controls"),l.removeAttribute("aria-valuemax"),l.removeAttribute("aria-valuemin"),l.removeAttribute("aria-valuenow")})}},[t,n,a,i]),Wp(()=>{if(!i)return;const s=e.current;er(s,"Eager values not found");const{panelDataArray:l}=s,u=ype(t,i);er(u!=null,`No group found for id "${t}"`);const c=Qx(t,i);er(c,`No resize handles found for group id "${t}"`);const d=c.map(f=>{const h=f.getAttribute("data-panel-resize-handle-id");er(h,"Resize handle element has no handle id attribute");const[v,m]=IXe(t,h,l,i);if(v==null||m==null)return()=>{};const y=b=>{if(!b.defaultPrevented)switch(b.key){case"Enter":{b.preventDefault();const w=l.findIndex(S=>S.id===v);if(w>=0){const S=l[w];er(S,`No panel data found for index ${w}`);const T=n[w],{collapsedSize:A=0,collapsible:M,minSize:P=0}=S.constraints;if(T!=null&&M){const E=mb({delta:ho(T,A)?P-A:A-T,initialLayout:n,panelConstraints:l.map(R=>R.constraints),pivotIndices:mpe(t,h,i),prevLayout:n,trigger:"keyboard"});n!==E&&o(E)}}break}}};return f.addEventListener("keydown",y),()=>{f.removeEventListener("keydown",y)}});return()=>{d.forEach(f=>f())}},[i,r,e,t,n,a,o])}function sZ(r,e){if(r.length!==e.length)return!1;for(let t=0;t<r.length;t++)if(r[t]!==e[t])return!1;return!0}function bpe(r,e){const t=r==="horizontal",{x:n,y:a}=m5(e);return t?n:a}function RXe(r,e,t,n,a){const i=t==="horizontal",o=b5(e,a);er(o,`No resize handle element found for id "${e}"`);const s=o.getAttribute("data-panel-group-id");er(s,"Resize handle element has no group id attribute");let{initialCursorPosition:l}=n;const u=bpe(t,r),c=ype(s,a);er(c,`No group element found for id "${s}"`);const d=c.getBoundingClientRect(),f=i?d.width:d.height;return(u-l)/f*100}function NXe(r,e,t,n,a,i){if(lpe(r)){const o=t==="horizontal";let s=0;r.shiftKey?s=100:a!=null?s=a:s=10;let l=0;switch(r.key){case"ArrowDown":l=o?0:s;break;case"ArrowLeft":l=o?-s:0;break;case"ArrowRight":l=o?s:0;break;case"ArrowUp":l=o?0:-s;break;case"End":l=100;break;case"Home":l=-100;break}return l}else return n==null?0:RXe(r,e,t,n,i)}function OXe({panelDataArray:r}){const e=Array(r.length),t=r.map(i=>i.constraints);let n=0,a=100;for(let i=0;i<r.length;i++){const o=t[i];er(o,`Panel constraints not found for index ${i}`);const{defaultSize:s}=o;s!=null&&(n++,e[i]=s,a-=s)}for(let i=0;i<r.length;i++){const o=t[i];er(o,`Panel constraints not found for index ${i}`);const{defaultSize:s}=o;if(s!=null)continue;const l=r.length-n,u=a/l;n++,e[i]=u,a-=u}return e}function Xg(r,e,t){e.forEach((n,a)=>{const i=r[a];er(i,`Panel data not found for index ${a}`);const{callbacks:o,constraints:s,id:l}=i,{collapsedSize:u=0,collapsible:c}=s,d=t[l];if(d==null||n!==d){t[l]=n;const{onCollapse:f,onExpand:h,onResize:v}=o;v&&v(n,d),c&&(f||h)&&(h&&(d==null||vc(d,u))&&!vc(n,u)&&h(),f&&(d==null||!vc(d,u))&&vc(n,u)&&f())}})}function z_(r,e){if(r.length!==e.length)return!1;for(let t=0;t<r.length;t++)if(r[t]!=e[t])return!1;return!0}function $Xe({defaultSize:r,dragState:e,layout:t,panelData:n,panelIndex:a,precision:i=3}){const o=t[a];let s;return o==null?s=r!=null?r.toPrecision(i):"1":n.length===1?s="1":s=o.toPrecision(i),{flexBasis:0,flexGrow:s,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function zXe(r,e=10){let t=null;return(...a)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{r(...a)},e)}}function lZ(r){try{if(typeof localStorage<"u")r.getItem=e=>localStorage.getItem(e),r.setItem=(e,t)=>{localStorage.setItem(e,t)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),r.getItem=()=>null,r.setItem=()=>{}}}function xpe(r){return`react-resizable-panels:${r}`}function wpe(r){return r.map(e=>{const{constraints:t,id:n,idIsFromProps:a,order:i}=e;return a?n:i?`${i}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(",")}function Spe(r,e){try{const t=xpe(r),n=e.getItem(t);if(n){const a=JSON.parse(n);if(typeof a=="object"&&a!=null)return a}}catch{}return null}function jXe(r,e,t){var n,a;const i=(n=Spe(r,t))!==null&&n!==void 0?n:{},o=wpe(e);return(a=i[o])!==null&&a!==void 0?a:null}function BXe(r,e,t,n,a){var i;const o=xpe(r),s=wpe(e),l=(i=Spe(r,a))!==null&&i!==void 0?i:{};l[s]={expandToSizes:Object.fromEntries(t.entries()),layout:n};try{a.setItem(o,JSON.stringify(l))}catch(u){console.error(u)}}function uZ({layout:r,panelConstraints:e}){const t=[...r],n=t.reduce((i,o)=>i+o,0);if(t.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${t.map(i=>`${i}%`).join(", ")}`);if(!ho(n,100)&&t.length>0)for(let i=0;i<e.length;i++){const o=t[i];er(o!=null,`No layout data found for index ${i}`);const s=100/n*o;t[i]=s}let a=0;for(let i=0;i<e.length;i++){const o=t[i];er(o!=null,`No layout data found for index ${i}`);const s=Lm({panelConstraints:e,panelIndex:i,size:o});o!=s&&(a+=o-s,t[i]=s)}if(!ho(a,0))for(let i=0;i<e.length;i++){const o=t[i];er(o!=null,`No layout data found for index ${i}`);const s=o+a,l=Lm({panelConstraints:e,panelIndex:i,size:s});if(o!==l&&(a-=l-o,t[i]=l,ho(a,0)))break}return t}const VXe=100,yb={getItem:r=>(lZ(yb),yb.getItem(r)),setItem:(r,e)=>{lZ(yb),yb.setItem(r,e)}},cZ={};function _pe({autoSaveId:r=null,children:e,className:t="",direction:n,forwardedRef:a,id:i=null,onLayout:o=null,keyboardResizeBy:s=null,storage:l=yb,style:u,tagName:c="div",...d}){const f=OO(i),h=Gi(null),[v,m]=qm(null),[y,b]=qm([]),w=DXe(),S=Gi({}),T=Gi(new Map),A=Gi(0),M=Gi({autoSaveId:r,direction:n,dragState:v,id:f,keyboardResizeBy:s,onLayout:o,storage:l}),P=Gi({layout:y,panelDataArray:[],panelDataArrayChanged:!1});Gi({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),ope(a,()=>({getId:()=>M.current.id,getLayout:()=>{const{layout:Z}=P.current;return Z},setLayout:Z=>{const{onLayout:Y}=M.current,{layout:X,panelDataArray:re}=P.current,oe=uZ({layout:Z,panelConstraints:re.map(ae=>ae.constraints)});sZ(X,oe)||(b(oe),P.current.layout=oe,Y&&Y(oe),Xg(re,oe,S.current))}}),[]),Kp(()=>{M.current.autoSaveId=r,M.current.direction=n,M.current.dragState=v,M.current.id=f,M.current.onLayout=o,M.current.storage=l}),kXe({committedValuesRef:M,eagerValuesRef:P,groupId:f,layout:y,panelDataArray:P.current.panelDataArray,setLayout:b,panelGroupElement:h.current}),Wp(()=>{const{panelDataArray:Z}=P.current;if(r){if(y.length===0||y.length!==Z.length)return;let Y=cZ[r];Y==null&&(Y=zXe(BXe,VXe),cZ[r]=Y);const X=[...Z],re=new Map(T.current);Y(r,X,re,y,l)}},[r,y,l]),Wp(()=>{});const E=Ui(Z=>{const{onLayout:Y}=M.current,{layout:X,panelDataArray:re}=P.current;if(Z.constraints.collapsible){const oe=re.map(fe=>fe.constraints),{collapsedSize:ae=0,panelSize:se,pivotIndices:le}=op(re,Z,X);if(er(se!=null,`Panel size not found for panel "${Z.id}"`),!vc(se,ae)){T.current.set(Z.id,se);const ve=lm(re,Z)===re.length-1?se-ae:ae-se,pe=mb({delta:ve,initialLayout:X,panelConstraints:oe,pivotIndices:le,prevLayout:X,trigger:"imperative-api"});z_(X,pe)||(b(pe),P.current.layout=pe,Y&&Y(pe),Xg(re,pe,S.current))}}},[]),R=Ui((Z,Y)=>{const{onLayout:X}=M.current,{layout:re,panelDataArray:oe}=P.current;if(Z.constraints.collapsible){const ae=oe.map(Re=>Re.constraints),{collapsedSize:se=0,panelSize:le=0,minSize:fe=0,pivotIndices:ve}=op(oe,Z,re),pe=Y??fe;if(vc(le,se)){const Re=T.current.get(Z.id),Ae=Re!=null&&Re>=pe?Re:pe,Se=lm(oe,Z)===oe.length-1?le-Ae:Ae-le,ee=mb({delta:Se,initialLayout:re,panelConstraints:ae,pivotIndices:ve,prevLayout:re,trigger:"imperative-api"});z_(re,ee)||(b(ee),P.current.layout=ee,X&&X(ee),Xg(oe,ee,S.current))}}},[]),N=Ui(Z=>{const{layout:Y,panelDataArray:X}=P.current,{panelSize:re}=op(X,Z,Y);return er(re!=null,`Panel size not found for panel "${Z.id}"`),re},[]),k=Ui((Z,Y)=>{const{panelDataArray:X}=P.current,re=lm(X,Z);return $Xe({defaultSize:Y,dragState:v,layout:y,panelData:X,panelIndex:re})},[v,y]),O=Ui(Z=>{const{layout:Y,panelDataArray:X}=P.current,{collapsedSize:re=0,collapsible:oe,panelSize:ae}=op(X,Z,Y);return er(ae!=null,`Panel size not found for panel "${Z.id}"`),oe===!0&&vc(ae,re)},[]),L=Ui(Z=>{const{layout:Y,panelDataArray:X}=P.current,{collapsedSize:re=0,collapsible:oe,panelSize:ae}=op(X,Z,Y);return er(ae!=null,`Panel size not found for panel "${Z.id}"`),!oe||pv(ae,re)>0},[]),$=Ui(Z=>{const{panelDataArray:Y}=P.current;Y.push(Z),Y.sort((X,re)=>{const oe=X.order,ae=re.order;return oe==null&&ae==null?0:oe==null?-1:ae==null?1:oe-ae}),P.current.panelDataArrayChanged=!0,w()},[w]);Kp(()=>{if(P.current.panelDataArrayChanged){P.current.panelDataArrayChanged=!1;const{autoSaveId:Z,onLayout:Y,storage:X}=M.current,{layout:re,panelDataArray:oe}=P.current;let ae=null;if(Z){const le=jXe(Z,oe,X);le&&(T.current=new Map(Object.entries(le.expandToSizes)),ae=le.layout)}ae==null&&(ae=OXe({panelDataArray:oe}));const se=uZ({layout:ae,panelConstraints:oe.map(le=>le.constraints)});sZ(re,se)||(b(se),P.current.layout=se,Y&&Y(se),Xg(oe,se,S.current))}}),Kp(()=>{const Z=P.current;return()=>{Z.layout=[]}},[]);const j=Ui(Z=>{let Y=!1;const X=h.current;return X&&window.getComputedStyle(X,null).getPropertyValue("direction")==="rtl"&&(Y=!0),function(oe){oe.preventDefault();const ae=h.current;if(!ae)return()=>null;const{direction:se,dragState:le,id:fe,keyboardResizeBy:ve,onLayout:pe}=M.current,{layout:Re,panelDataArray:Ae}=P.current,{initialLayout:ie}=le??{},Se=mpe(fe,Z,ae);let ee=NXe(oe,Z,se,le,ve,ae);const te=se==="horizontal";te&&Y&&(ee=-ee);const de=Ae.map(Te=>Te.constraints),ye=mb({delta:ee,initialLayout:ie??Re,panelConstraints:de,pivotIndices:Se,prevLayout:Re,trigger:lpe(oe)?"keyboard":"mouse-or-touch"}),xe=!z_(Re,ye);(upe(oe)||cpe(oe))&&A.current!=ee&&(A.current=ee,!xe&&ee!==0?te?SP(Z,ee<0?fpe:hpe):SP(Z,ee<0?ppe:vpe):SP(Z,0)),xe&&(b(ye),P.current.layout=ye,pe&&pe(ye),Xg(Ae,ye,S.current))}},[]),B=Ui((Z,Y)=>{const{onLayout:X}=M.current,{layout:re,panelDataArray:oe}=P.current,ae=oe.map(Re=>Re.constraints),{panelSize:se,pivotIndices:le}=op(oe,Z,re);er(se!=null,`Panel size not found for panel "${Z.id}"`);const ve=lm(oe,Z)===oe.length-1?se-Y:Y-se,pe=mb({delta:ve,initialLayout:re,panelConstraints:ae,pivotIndices:le,prevLayout:re,trigger:"imperative-api"});z_(re,pe)||(b(pe),P.current.layout=pe,X&&X(pe),Xg(oe,pe,S.current))},[]),H=Ui((Z,Y)=>{const{layout:X,panelDataArray:re}=P.current,{collapsedSize:oe=0,collapsible:ae}=Y,{collapsedSize:se=0,collapsible:le,maxSize:fe=100,minSize:ve=0}=Z.constraints,{panelSize:pe}=op(re,Z,X);pe!=null&&(ae&&le&&vc(pe,oe)?vc(oe,se)||B(Z,se):pe<ve?B(Z,ve):pe>fe&&B(Z,fe))},[B]),F=Ui((Z,Y)=>{const{direction:X}=M.current,{layout:re}=P.current;if(!h.current)return;const oe=b5(Z,h.current);er(oe,`Drag handle element not found for id "${Z}"`);const ae=bpe(X,Y);m({dragHandleId:Z,dragHandleRect:oe.getBoundingClientRect(),initialCursorPosition:ae,initialLayout:re})},[]),K=Ui(()=>{m(null)},[]),U=Ui(Z=>{const{panelDataArray:Y}=P.current,X=lm(Y,Z);X>=0&&(Y.splice(X,1),delete S.current[Z.id],P.current.panelDataArrayChanged=!0,w())},[w]),V=vXe(()=>({collapsePanel:E,direction:n,dragState:v,expandPanel:R,getPanelSize:N,getPanelStyle:k,groupId:f,isPanelCollapsed:O,isPanelExpanded:L,reevaluatePanelConstraints:H,registerPanel:$,registerResizeHandle:j,resizePanel:B,startDragging:F,stopDragging:K,unregisterPanel:U,panelGroupElement:h.current}),[E,v,n,R,N,k,f,O,L,H,$,j,B,F,K,U]),Q={display:"flex",flexDirection:n==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return g0(g5.Provider,{value:V},g0(c,{...d,children:e,className:t,id:i,ref:h,style:{...Q,...u},"data-panel-group":"","data-panel-group-direction":n,"data-panel-group-id":f}))}const gA=ape((r,e)=>g0(_pe,{...r,forwardedRef:e}));_pe.displayName="PanelGroup";gA.displayName="forwardRef(PanelGroup)";function lm(r,e){return r.findIndex(t=>t===e||t.id===e.id)}function op(r,e,t){const n=lm(r,e),i=n===r.length-1?[n-1,n]:[n,n+1],o=t[n];return{...e.constraints,panelSize:o,pivotIndices:i}}function FXe({disabled:r,handleId:e,resizeHandler:t,panelGroupElement:n}){Wp(()=>{if(r||t==null||n==null)return;const a=b5(e,n);if(a==null)return;const i=o=>{if(!o.defaultPrevented)switch(o.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{o.preventDefault(),t(o);break}case"F6":{o.preventDefault();const s=a.getAttribute("data-panel-group-id");er(s,`No group element found for id "${s}"`);const l=Qx(s,n),u=gpe(s,e,n);er(u!==null,`No resize element found for id "${e}"`);const c=o.shiftKey?u>0?u-1:l.length-1:u+1<l.length?u+1:0;l[c].focus();break}}};return a.addEventListener("keydown",i),()=>{a.removeEventListener("keydown",i)}},[n,r,e,t])}function mA({children:r=null,className:e="",disabled:t=!1,hitAreaMargins:n,id:a,onBlur:i,onDragging:o,onFocus:s,style:l={},tabIndex:u=0,tagName:c="div",...d}){var f,h;const v=Gi(null),m=Gi({onDragging:o});Wp(()=>{m.current.onDragging=o});const y=ipe(g5);if(y===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:b,groupId:w,registerResizeHandle:S,startDragging:T,stopDragging:A,panelGroupElement:M}=y,P=OO(a),[E,R]=qm("inactive"),[N,k]=qm(!1),[O,L]=qm(null),$=Gi({state:E});Kp(()=>{$.current.state=E}),Wp(()=>{if(t)L(null);else{const F=S(P);L(()=>F)}},[t,P,S]);const j=(f=n==null?void 0:n.coarse)!==null&&f!==void 0?f:15,B=(h=n==null?void 0:n.fine)!==null&&h!==void 0?h:5;return Wp(()=>{if(t||O==null)return;const F=v.current;return er(F,"Element ref not attached"),MXe(P,F,b,{coarse:j,fine:B},(U,V,Q)=>{if(V)switch(U){case"down":{R("drag"),er(Q,'Expected event to be defined for "down" action'),T(P,Q);const{onDragging:Z}=m.current;Z&&Z(!0);break}case"move":{const{state:Z}=$.current;Z!=="drag"&&R("hover"),er(Q,'Expected event to be defined for "move" action'),O(Q);break}case"up":{R("hover"),A();const{onDragging:Z}=m.current;Z&&Z(!1);break}}else R("inactive")})},[j,b,t,B,S,P,O,T,A]),FXe({disabled:t,handleId:P,resizeHandler:O,panelGroupElement:M}),g0(c,{...d,children:r,className:e,id:a,onBlur:()=>{k(!1),i==null||i()},onFocus:()=>{k(!0),s==null||s()},ref:v,role:"separator",style:{...{touchAction:"none",userSelect:"none"},...l},tabIndex:u,"data-panel-group-direction":b,"data-panel-group-id":w,"data-resize-handle":"","data-resize-handle-active":E==="drag"?"pointer":N?"keyboard":void 0,"data-resize-handle-state":E,"data-panel-resize-handle-enabled":!t,"data-panel-resize-handle-id":P})}mA.displayName="PanelResizeHandle";const Cpe=({className:r,...e})=>_.jsx(gA,{className:npe("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",r),...e}),yA=Dm,Tpe=({withHandle:r,className:e,...t})=>_.jsx(mA,{className:npe("relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",e),...t,children:r&&_.jsx("div",{className:"z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border",children:_.jsx(QYe,{className:"h-2.5 w-2.5"})})});function HXe(r){var e,t;const n=Vr(),[a,i]=oa(r,cF.variantKeys),{ref:o,as:s,src:l,className:u,classNames:c,loading:d,isBlurred:f,fallbackSrc:h,isLoading:v,disableSkeleton:m=!!h,removeWrapper:y=!1,onError:b,onLoad:w,srcSet:S,sizes:T,crossOrigin:A,...M}=a,P=epe({src:l,loading:d,onError:b,onLoad:w,ignoreFallback:!1,srcSet:S,sizes:T,crossOrigin:A}),E=(t=(e=r.disableAnimation)!=null?e:n==null?void 0:n.disableAnimation)!=null?t:!1,R=P==="loaded"&&!v,N=P==="loading"||v,k=r.isZoomed,O=s||"img",L=$r(o),{w:$,h:j}=D.useMemo(()=>({w:a.width?typeof a.width=="number"?`${a.width}px`:a.width:"fit-content",h:a.height?typeof a.height=="number"?`${a.height}px`:a.height:"auto"}),[a==null?void 0:a.width,a==null?void 0:a.height]),B=(!l||!R)&&!!h,H=N&&!m,F=D.useMemo(()=>cF({...i,disableAnimation:E,showSkeleton:H}),[eo(i),E,H]),K=lt(u,c==null?void 0:c.img),U=(Z={})=>{const Y=lt(K,Z==null?void 0:Z.className);return{src:l,ref:L,"data-loaded":je(R),className:F.img({class:Y}),loading:d,srcSet:S,sizes:T,crossOrigin:A,...M,style:{...(M==null?void 0:M.height)&&{height:j},...Z.style,...M.style}}},V=D.useCallback(()=>{const Z=B?{backgroundImage:`url(${h})`}:{};return{className:F.wrapper({class:c==null?void 0:c.wrapper}),style:{...Z,maxWidth:$}}},[F,B,h,c==null?void 0:c.wrapper,$]),Q=D.useCallback(()=>({src:l,"aria-hidden":je(!0),className:F.blurredImg({class:c==null?void 0:c.blurredImg})}),[F,l,c==null?void 0:c.blurredImg]);return{Component:O,domRef:L,slots:F,classNames:c,isBlurred:f,disableSkeleton:m,fallbackSrc:h,removeWrapper:y,isZoomed:k,isLoading:N,getImgProps:U,getWrapperProps:V,getBlurredImgProps:Q}}var Ape=Ht((r,e)=>{const{Component:t,domRef:n,slots:a,classNames:i,isBlurred:o,isZoomed:s,fallbackSrc:l,removeWrapper:u,disableSkeleton:c,getImgProps:d,getWrapperProps:f,getBlurredImgProps:h}=HXe({...r,ref:e}),v=_.jsx(t,{ref:n,...d()});if(u)return v;const m=_.jsx("div",{className:a.zoomedWrapper({class:i==null?void 0:i.zoomedWrapper}),children:v});return o?_.jsxs("div",{...f(),children:[s?m:v,D.cloneElement(v,h())]}):s||!c||l?_.jsxs("div",{...f(),children:[" ",s?m:v]}):v});Ape.displayName="HeroUI.Image";var ll=Ape;function UXe(){const r=D.useRef(null),[e,t]=D.useState(!1),[n,a]=D.useState(!1),[i,o]=D.useState(null),[s,l]=D.useState(!1),[u,c]=D.useState({id:"karin",name:"Karin",avatar:"/web/karin.png"});return D.useEffect(()=>((async()=>{if(r.current)return;t(!0);const{authKey:f}=await or.serverPost("/api/v1/sandbox/url"),h=new URL(window.location.href);h.protocol=h.protocol.replace("http","ws"),h.pathname="/sandbox",h.searchParams.set("authorization",f);const v=h.toString(),m=new WebSocket(v);r.current=m,m.onopen=()=>{t(!1),a(!0)},m.onmessage=y=>{const b=JSON.parse(y.data);b.action==="init"&&(l(!0),c(b.param))},m.onclose=()=>{t(!1),a(!1)},m.onerror=y=>{o(y),console.error("WebSocket error:",y)}})(),()=>{var f;t(!1),a(!1),o(null),l(!1),(f=r.current)==null||f.close(),r.current=null}),[]),{connecting:e,connected:n,error:i,ready:s,ws:r.current,botInfo:u}}const Epe=D.createContext({ws:{connecting:!1,connected:!1,error:null,ready:!1,ws:null,botInfo:{id:"karin",name:"Karin",avatar:"/web/karin.png"}}});function GXe({children:r}){const e=UXe();return _.jsx(Epe.Provider,{value:{ws:e},children:r})}function qXe(){const r=D.useContext(Epe);if(!r)throw new Error("useSandbox must be used within a SandboxProvider");return r}const dZ=r=>{const{icon:e,activeIcon:t,className:n,isActive:a,onClick:i,href:o}=r,s=Su(),l=m2(`${o}/*`),u=o?!!l:a;return _.jsxs("div",{className:Gr("aspect-square rounded-lg flex items-center justify-center text-2xl !bg-opacity-50 relative transition-colors",u?"bg-zinc-300 dark:bg-zinc-700 !bg-opacity-100":"hover:bg-zinc-300 dark:hover:bg-zinc-700 dark:active:text-zinc-600 active:text-zinc-400",n),onClick:()=>{o&&!u&&s(o,{replace:!0}),i&&!u&&i()},children:[_.jsx("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2",children:e}),_.jsx("div",{className:Gr("absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 text-blue-500 transition-opacity",u?"clip-path-circle-active":"clip-path-circle"),children:t})]})},QXe=()=>{const r=qXe(),{ws:e}=r,{botInfo:t}=e;return _.jsxs("div",{className:"select-none flex flex-col items-stretch px-2 flex-1",children:[_.jsx("div",{className:"aspect-square rounded-full my-4",children:_.jsx(ll,{src:t.avatar,className:"w-full h-full rounded-full",alt:"avatar"})}),_.jsxs("div",{className:"flex flex-1 flex-col items-stretch gap-2 pb-3",children:[_.jsx(dZ,{icon:_.jsx(rZe,{}),activeIcon:_.jsx(eZe,{}),href:"/sandbox/chat"}),_.jsx(dZ,{icon:_.jsx(nZe,{}),activeIcon:_.jsx(tZe,{}),href:"/sandbox/contact"}),_.jsx("div",{className:"mt-auto"})]})]})},WXe=D.memo(r=>{const{type:e,id:t,align:n="center",startContent:a,endContent:i,className:o,classNames:s,onChange:l,value:u,...c}=r,[d,f]=D.useState(""),[h,v]=D.useState(e);D.useEffect(()=>{f(u??"")},[u]);const m=()=>{f("")},y=()=>{v(b=>b===e?"text":e)};return _.jsxs("div",{className:Gr(s==null?void 0:s.container,o,"group flex w-full text-zinc-950 bg-opacity-50 dark:bg-opacity-60 bg-zinc-300 rounded-md dark:bg-gray-800 dark:text-gray-300 focus-within:ring-blue-300 focus-within:ring-opacity-40 dark:focus-within:border-blue-300 focus-within:outline-none focus-within:ring hover:bg-opacity-80 focus-within:!bg-opacity-100 transition-colors duration-300 relative cursor-text"),children:[_.jsxs("label",{htmlFor:t,className:"flex items-center flex-grow-0 flex-shrink-0 pl-3 pr-2",children:[e==="password"?_.jsx("label",{htmlFor:t,className:"cursor-auto",onClick:y,children:h==="password"?_.jsx(z5e,{className:"text-gray-400 dark:text-gray-500"}):_.jsx($5e,{className:"text-gray-400 dark:text-gray-500"})}):null,a]}),_.jsx("input",{id:t,type:h,value:d,className:Gr(s==null?void 0:s.input,"block outline-none w-full py-3 bg-transparent placeholder:text-zinc-700 focus:placeholder:text-zinc-400 dark:placeholder-gray-500 dark:focus:placeholder-gray-700",n==="left"&&"text-left",n==="center"&&"text-center",n==="right"&&"text-right"),onChange:b=>{f(b.target.value),l&&l(b)},...c}),_.jsxs("label",{htmlFor:t,className:Gr("flex items-center flex-grow-0 flex-shrink-0 pr-3 pl-2 cursor-text","opacity-0 group-focus-within:opacity-100 group-hover:opacity-100 active:opacity-100"),children:[_.jsx("label",{htmlFor:t,className:"cursor-auto",onClick:m,children:_.jsx(kne,{className:"text-gray-400 dark:text-gray-500"})}),i]})]})});var _P={exports:{}},CP={};/**
|
|
380
380
|
* @license React
|
|
381
381
|
* use-sync-external-store-with-selector.production.js
|
|
382
382
|
*
|
|
@@ -450,7 +450,7 @@ ${L5(this.code(e,t))}
|
|
|
450
450
|
`).reduce((o,s,l)=>(l!==0&&o.insert(`
|
|
451
451
|
`,{[ui.blotName]:t}),o.insert(s)),i)],new WeakMap)}}ege.DEFAULTS={hljs:window.hljs,interval:1e3,languages:[{key:"plain",label:"Plain"},{key:"bash",label:"Bash"},{key:"cpp",label:"C++"},{key:"cs",label:"C#"},{key:"css",label:"CSS"},{key:"diff",label:"Diff"},{key:"xml",label:"HTML/XML"},{key:"java",label:"Java"},{key:"javascript",label:"JavaScript"},{key:"markdown",label:"Markdown"},{key:"php",label:"PHP"},{key:"python",label:"Python"},{key:"ruby",label:"Ruby"},{key:"sql",label:"SQL"}]};const tx=class tx extends Ua{static create(e){const t=super.create();return e?t.setAttribute("data-row",e):t.setAttribute("data-row",d9()),t}static formats(e){if(e.hasAttribute("data-row"))return e.getAttribute("data-row")}cellOffset(){return this.parent?this.parent.children.indexOf(this):-1}format(e,t){e===tx.blotName&&t?this.domNode.setAttribute("data-row",t):super.format(e,t)}row(){return this.parent}rowOffset(){return this.row()?this.row().rowOffset():-1}table(){return this.row()&&this.row().table()}};We(tx,"blotName","table"),We(tx,"tagName","TD");let el=tx;class Kc extends Hv{checkMerge(){if(super.checkMerge()&&this.next.children.head!=null){const e=this.children.head.formats(),t=this.children.tail.formats(),n=this.next.children.head.formats(),a=this.next.children.tail.formats();return e.table===t.table&&e.table===n.table&&e.table===a.table}return!1}optimize(e){super.optimize(e),this.children.forEach(t=>{if(t.next==null)return;const n=t.formats(),a=t.next.formats();if(n.table!==a.table){const i=this.splitAfter(t);i&&i.optimize(),this.prev&&this.prev.optimize()}})}rowOffset(){return this.parent?this.parent.children.indexOf(this):-1}table(){return this.parent&&this.parent.parent}}We(Kc,"blotName","table-row"),We(Kc,"tagName","TR");class uu extends Hv{}We(uu,"blotName","table-body"),We(uu,"tagName","TBODY");class T0 extends Hv{balanceCells(){const e=this.descendants(Kc),t=e.reduce((n,a)=>Math.max(a.children.length,n),0);e.forEach(n=>{new Array(t-n.children.length).fill(0).forEach(()=>{let a;n.children.head!=null&&(a=el.formats(n.children.head.domNode));const i=this.scroll.create(el.blotName,a);n.appendChild(i),i.optimize()})})}cells(e){return this.rows().map(t=>t.children.at(e))}deleteColumn(e){const[t]=this.descendant(uu);t==null||t.children.head==null||t.children.forEach(n=>{const a=n.children.at(e);a!=null&&a.remove()})}insertColumn(e){const[t]=this.descendant(uu);t==null||t.children.head==null||t.children.forEach(n=>{const a=n.children.at(e),i=el.formats(n.children.head.domNode),o=this.scroll.create(el.blotName,i);n.insertBefore(o,a)})}insertRow(e){const[t]=this.descendant(uu);if(t==null||t.children.head==null)return;const n=d9(),a=this.scroll.create(Kc.blotName);t.children.head.children.forEach(()=>{const o=this.scroll.create(el.blotName,n);a.appendChild(o)});const i=t.children.at(e);t.insertBefore(a,i)}rows(){const e=this.children.head;return e==null?[]:e.children.map(t=>t)}}We(T0,"blotName","table-container"),We(T0,"tagName","TABLE");T0.allowedChildren=[uu];uu.requiredContainer=T0;uu.allowedChildren=[Kc];Kc.requiredContainer=uu;Kc.allowedChildren=[el];el.requiredContainer=Kc;function d9(){return`row-${Math.random().toString(36).slice(2,6)}`}class jst extends Tl{static register(){$e.register(el),$e.register(Kc),$e.register(uu),$e.register(T0)}constructor(){super(...arguments),this.listenBalanceCells()}balanceTables(){this.quill.scroll.descendants(T0).forEach(e=>{e.balanceCells()})}deleteColumn(){const[e,,t]=this.getTable();t!=null&&(e.deleteColumn(t.cellOffset()),this.quill.update($e.sources.USER))}deleteRow(){const[,e]=this.getTable();e!=null&&(e.remove(),this.quill.update($e.sources.USER))}deleteTable(){const[e]=this.getTable();if(e==null)return;const t=e.offset();e.remove(),this.quill.update($e.sources.USER),this.quill.setSelection(t,$e.sources.SILENT)}getTable(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.quill.getSelection();if(e==null)return[null,null,null,-1];const[t,n]=this.quill.getLine(e.index);if(t==null||t.statics.blotName!==el.blotName)return[null,null,null,-1];const a=t.parent;return[a.parent.parent,a,t,n]}insertColumn(e){const t=this.quill.getSelection();if(!t)return;const[n,a,i]=this.getTable(t);if(i==null)return;const o=i.cellOffset();n.insertColumn(o+e),this.quill.update($e.sources.USER);let s=a.rowOffset();e===0&&(s+=1),this.quill.setSelection(t.index+s,t.length,$e.sources.SILENT)}insertColumnLeft(){this.insertColumn(0)}insertColumnRight(){this.insertColumn(1)}insertRow(e){const t=this.quill.getSelection();if(!t)return;const[n,a,i]=this.getTable(t);if(i==null)return;const o=a.rowOffset();n.insertRow(o+e),this.quill.update($e.sources.USER),e>0?this.quill.setSelection(t,$e.sources.SILENT):this.quill.setSelection(t.index+a.children.length,t.length,$e.sources.SILENT)}insertRowAbove(){this.insertRow(0)}insertRowBelow(){this.insertRow(1)}insertTable(e,t){const n=this.quill.getSelection();if(n==null)return;const a=new Array(e).fill(0).reduce(i=>{const o=new Array(t).fill(`
|
|
452
452
|
`).join("");return i.insert(o,{table:d9()})},new vt().retain(n.index));this.quill.updateContents(a,$e.sources.USER),this.quill.setSelection(n.index,$e.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on($e.events.SCROLL_OPTIMIZE,e=>{e.some(t=>["TD","TR","TBODY","TABLE"].includes(t.target.tagName)?(this.quill.once($e.events.TEXT_CHANGE,(n,a,i)=>{i===$e.sources.USER&&this.balanceTables()}),!0):!1)})}}const DX=ad("quill:toolbar");class f9 extends Tl{constructor(e,t){var n,a;if(super(e,t),Array.isArray(this.options.container)){const i=document.createElement("div");i.setAttribute("role","toolbar"),Bst(i,this.options.container),(a=(n=e.container)==null?void 0:n.parentNode)==null||a.insertBefore(i,e.container),this.container=i}else typeof this.options.container=="string"?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement)){DX.error("Container required for toolbar",this.options);return}this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach(i=>{var s;const o=(s=this.options.handlers)==null?void 0:s[i];o&&this.addHandler(i,o)}),Array.from(this.container.querySelectorAll("button, select")).forEach(i=>{this.attach(i)}),this.quill.on($e.events.EDITOR_CHANGE,()=>{const[i]=this.quill.selection.getRange();this.update(i)})}addHandler(e,t){this.handlers[e]=t}attach(e){let t=Array.from(e.classList).find(a=>a.indexOf("ql-")===0);if(!t)return;if(t=t.slice(3),e.tagName==="BUTTON"&&e.setAttribute("type","button"),this.handlers[t]==null&&this.quill.scroll.query(t)==null){DX.warn("ignoring attaching to nonexistent format",t,e);return}const n=e.tagName==="SELECT"?"change":"click";e.addEventListener(n,a=>{let i;if(e.tagName==="SELECT"){if(e.selectedIndex<0)return;const s=e.options[e.selectedIndex];s.hasAttribute("selected")?i=!1:i=s.value||!1}else e.classList.contains("ql-active")?i=!1:i=e.value||!e.hasAttribute("value"),a.preventDefault();this.quill.focus();const[o]=this.quill.selection.getRange();if(this.handlers[t]!=null)this.handlers[t].call(this,i);else if(this.quill.scroll.query(t).prototype instanceof Ao){if(i=prompt(`Enter ${t}`),!i)return;this.quill.updateContents(new vt().retain(o.index).delete(o.length).insert({[t]:i}),$e.sources.USER)}else this.quill.format(t,i,$e.sources.USER);this.update(o)}),this.controls.push([t,e])}update(e){const t=e==null?{}:this.quill.getFormat(e);this.controls.forEach(n=>{const[a,i]=n;if(i.tagName==="SELECT"){let o=null;if(e==null)o=null;else if(t[a]==null)o=i.querySelector("option[selected]");else if(!Array.isArray(t[a])){let s=t[a];typeof s=="string"&&(s=s.replace(/"/g,'\\"')),o=i.querySelector(`option[value="${s}"]`)}o==null?(i.value="",i.selectedIndex=-1):o.selected=!0}else if(e==null)i.classList.remove("ql-active"),i.setAttribute("aria-pressed","false");else if(i.hasAttribute("value")){const o=t[a],s=o===i.getAttribute("value")||o!=null&&o.toString()===i.getAttribute("value")||o==null&&!i.getAttribute("value");i.classList.toggle("ql-active",s),i.setAttribute("aria-pressed",s.toString())}else{const o=t[a]!=null;i.classList.toggle("ql-active",o),i.setAttribute("aria-pressed",o.toString())}})}}f9.DEFAULTS={};function LX(r,e,t){const n=document.createElement("button");n.setAttribute("type","button"),n.classList.add(`ql-${e}`),n.setAttribute("aria-pressed","false"),t!=null?(n.value=t,n.setAttribute("aria-label",`${e}: ${t}`)):n.setAttribute("aria-label",e),r.appendChild(n)}function Bst(r,e){Array.isArray(e[0])||(e=[e]),e.forEach(t=>{const n=document.createElement("span");n.classList.add("ql-formats"),t.forEach(a=>{if(typeof a=="string")LX(n,a);else{const i=Object.keys(a)[0],o=a[i];Array.isArray(o)?Vst(n,i,o):LX(n,i,o)}}),r.appendChild(n)})}function Vst(r,e,t){const n=document.createElement("select");n.classList.add(`ql-${e}`),t.forEach(a=>{const i=document.createElement("option");a!==!1?i.setAttribute("value",String(a)):i.setAttribute("selected","selected"),n.appendChild(i)}),r.appendChild(n)}f9.DEFAULTS={container:null,handlers:{clean(){const r=this.quill.getSelection();if(r!=null)if(r.length===0){const e=this.quill.getFormat();Object.keys(e).forEach(t=>{this.quill.scroll.query(t,mt.INLINE)!=null&&this.quill.format(t,!1,$e.sources.USER)})}else this.quill.removeFormat(r.index,r.length,$e.sources.USER)},direction(r){const{align:e}=this.quill.getFormat();r==="rtl"&&e==null?this.quill.format("align","right",$e.sources.USER):!r&&e==="right"&&this.quill.format("align",!1,$e.sources.USER),this.quill.format("direction",r,$e.sources.USER)},indent(r){const e=this.quill.getSelection(),t=this.quill.getFormat(e),n=parseInt(t.indent||0,10);if(r==="+1"||r==="-1"){let a=r==="+1"?1:-1;t.direction==="rtl"&&(a*=-1),this.quill.format("indent",n+a,$e.sources.USER)}},link(r){r===!0&&(r=prompt("Enter link URL:")),this.quill.format("link",r,$e.sources.USER)},list(r){const e=this.quill.getSelection(),t=this.quill.getFormat(e);r==="check"?t.list==="checked"||t.list==="unchecked"?this.quill.format("list",!1,$e.sources.USER):this.quill.format("list","unchecked",$e.sources.USER):this.quill.format("list",r,$e.sources.USER)}}};const Fst='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"/></svg>',Hst='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"/><line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"/></svg>',Ust='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"/></svg>',Gst='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"/></svg>',qst='<svg viewbox="0 0 18 18"><g class="ql-fill ql-color-label"><polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"/><rect height="1" width="1" x="4" y="4"/><polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"/><rect height="1" width="1" x="2" y="6"/><rect height="1" width="1" x="3" y="5"/><rect height="1" width="1" x="4" y="7"/><polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"/><rect height="1" width="1" x="2" y="12"/><rect height="1" width="1" x="2" y="9"/><rect height="1" width="1" x="2" y="15"/><polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"/><rect height="1" width="1" x="3" y="8"/><path d="M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z"/><path d="M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z"/><path d="M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z"/><rect height="1" width="1" x="12" y="2"/><rect height="1" width="1" x="11" y="3"/><path d="M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z"/><rect height="1" width="1" x="2" y="3"/><rect height="1" width="1" x="6" y="2"/><rect height="1" width="1" x="3" y="2"/><rect height="1" width="1" x="5" y="3"/><rect height="1" width="1" x="9" y="2"/><rect height="1" width="1" x="15" y="14"/><polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"/><rect height="1" width="1" x="13" y="7"/><rect height="1" width="1" x="15" y="5"/><rect height="1" width="1" x="14" y="6"/><rect height="1" width="1" x="15" y="8"/><rect height="1" width="1" x="14" y="9"/><path d="M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z"/><rect height="1" width="1" x="14" y="3"/><polygon points="12 6.868 12 6 11.62 6 12 6.868"/><rect height="1" width="1" x="15" y="2"/><rect height="1" width="1" x="12" y="5"/><rect height="1" width="1" x="13" y="4"/><polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"/><rect height="1" width="1" x="9" y="14"/><rect height="1" width="1" x="8" y="15"/><path d="M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z"/><rect height="1" width="1" x="5" y="15"/><path d="M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z"/><rect height="1" width="1" x="11" y="15"/><path d="M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z"/><rect height="1" width="1" x="14" y="15"/><rect height="1" width="1" x="15" y="11"/></g><polyline class="ql-stroke" points="5.5 13 9 5 12.5 13"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="11" y2="11"/></svg>',Qst='<svg viewbox="0 0 18 18"><rect class="ql-fill ql-stroke" height="3" width="3" x="4" y="5"/><rect class="ql-fill ql-stroke" height="3" width="3" x="11" y="5"/><path class="ql-even ql-fill ql-stroke" d="M7,8c0,4.031-3,5-3,5"/><path class="ql-even ql-fill ql-stroke" d="M14,8c0,4.031-3,5-3,5"/></svg>',Wst='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"/><path class="ql-stroke" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"/></svg>',Kst='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="5" x2="13" y1="3" y2="3"/><line class="ql-stroke" x1="6" x2="9.35" y1="12" y2="3"/><line class="ql-stroke" x1="11" x2="15" y1="11" y2="15"/><line class="ql-stroke" x1="15" x2="11" y1="11" y2="15"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="7" x="2" y="14"/></svg>',PX='<svg viewbox="0 0 18 18"><polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"/><polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"/><line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"/></svg>',Yst='<svg viewbox="0 0 18 18"><line class="ql-color-label ql-stroke ql-transparent" x1="3" x2="15" y1="15" y2="15"/><polyline class="ql-stroke" points="5.5 11 9 3 12.5 11"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="9" y2="9"/></svg>',Zst='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"/><line class="ql-stroke ql-fill" x1="15" x2="11" y1="4" y2="4"/><path class="ql-fill" d="M11,3a3,3,0,0,0,0,6h1V3H11Z"/><rect class="ql-fill" height="11" width="1" x="11" y="4"/><rect class="ql-fill" height="11" width="1" x="13" y="4"/></svg>',Xst='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"/><line class="ql-stroke ql-fill" x1="9" x2="5" y1="4" y2="4"/><path class="ql-fill" d="M5,3A3,3,0,0,0,5,9H6V3H5Z"/><rect class="ql-fill" height="11" width="1" x="5" y="4"/><rect class="ql-fill" height="11" width="1" x="7" y="4"/></svg>',Jst='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z"/><rect class="ql-fill" height="1.6" rx="0.8" ry="0.8" width="5" x="5.15" y="6.2"/><path class="ql-fill" d="M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z"/></svg>',elt='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z"/></svg>',tlt='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',rlt='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',nlt='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm7.05371,7.96582v.38477c0,.39648-.165.60547-.46191.60547h-.47314v1.29785a.54085.54085,0,0,1-.605.60547h-.69336a.54085.54085,0,0,1-.605-.60547V12.95605H11.333a.5412.5412,0,0,1-.60547-.60547v-.15332a1.199,1.199,0,0,1,.22021-.748l2.56348-4.05957a.7819.7819,0,0,1,.72607-.39648h1.27637a.54085.54085,0,0,1,.605.60547v3.7627h.33008A.54055.54055,0,0,1,17.05371,11.96582ZM14.28125,8.7207h-.022a4.18969,4.18969,0,0,1-.38525.81348l-1.188,1.80469v.02246h1.5293V9.60059A7.04058,7.04058,0,0,1,14.28125,8.7207Z"/></svg>',alt='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.74023,12.18555a2.75131,2.75131,0,0,1-2.91553,2.80566,3.908,3.908,0,0,1-2.25537-.68164.54809.54809,0,0,1-.13184-.8252L11.73438,13c.209-.34082.48389-.36328.8252-.1543a2.23757,2.23757,0,0,0,1.1001.33008,1.01827,1.01827,0,0,0,1.1001-.96777c0-.61621-.53906-.97949-1.25439-.97949a2.15554,2.15554,0,0,0-.64893.09961,1.15209,1.15209,0,0,1-.814.01074l-.12109-.04395a.64116.64116,0,0,1-.45117-.71484l.231-3.00391a.56666.56666,0,0,1,.62744-.583H15.541a.54085.54085,0,0,1,.605.60547v.43945a.54085.54085,0,0,1-.605.60547H13.41748l-.04395.72559a1.29306,1.29306,0,0,1-.04395.30859h.022a2.39776,2.39776,0,0,1,.57227-.07715A2.53266,2.53266,0,0,1,16.74023,12.18555ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',ilt='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M14.51758,9.64453a1.85627,1.85627,0,0,0-1.24316.38477H13.252a1.73532,1.73532,0,0,1,1.72754-1.4082,2.66491,2.66491,0,0,1,.5498.06641c.35254.05469.57227.01074.70508-.40723l.16406-.5166a.53393.53393,0,0,0-.373-.75977,4.83723,4.83723,0,0,0-1.17773-.14258c-2.43164,0-3.7627,2.17773-3.7627,4.43359,0,2.47559,1.60645,3.69629,3.19043,3.69629A2.70585,2.70585,0,0,0,16.96,12.19727,2.43861,2.43861,0,0,0,14.51758,9.64453Zm-.23047,3.58691c-.67187,0-1.22168-.81445-1.22168-1.45215,0-.47363.30762-.583.72559-.583.96875,0,1.27734.59375,1.27734,1.12207A.82182.82182,0,0,1,14.28711,13.23145ZM10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Z"/></svg>',olt='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="13" y1="4" y2="4"/><line class="ql-stroke" x1="5" x2="11" y1="14" y2="14"/><line class="ql-stroke" x1="8" x2="10" y1="14" y2="4"/></svg>',slt='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="10" width="12" x="3" y="4"/><circle class="ql-fill" cx="6" cy="7" r="1"/><polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"/></svg>',llt='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"/></svg>',ult='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="5 7 5 11 3 9 5 7"/></svg>',clt='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="11" y1="7" y2="11"/><path class="ql-even ql-stroke" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"/><path class="ql-even ql-stroke" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"/></svg>',dlt='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="6" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="6" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="6" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="3" y1="4" y2="4"/><line class="ql-stroke" x1="3" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="3" y1="14" y2="14"/></svg>',flt='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="9" x2="15" y1="4" y2="4"/><polyline class="ql-stroke" points="3 4 4 5 6 3"/><line class="ql-stroke" x1="9" x2="15" y1="14" y2="14"/><polyline class="ql-stroke" points="3 14 4 15 6 13"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="3 9 4 10 6 8"/></svg>',hlt='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="7" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="7" x2="15" y1="14" y2="14"/><line class="ql-stroke ql-thin" x1="2.5" x2="4.5" y1="5.5" y2="5.5"/><path class="ql-fill" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"/><path class="ql-stroke ql-thin" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"/><path class="ql-stroke ql-thin" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"/></svg>',plt='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z"/><path class="ql-fill" d="M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z"/></svg>',vlt='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z"/><path class="ql-fill" d="M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z"/></svg>',glt='<svg viewbox="0 0 18 18"><line class="ql-stroke ql-thin" x1="15.5" x2="2.5" y1="8.5" y2="9.5"/><path class="ql-fill" d="M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z"/><path class="ql-fill" d="M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z"/></svg>',mlt='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="2" width="3" x="5" y="5"/><rect class="ql-fill" height="2" width="4" x="9" y="5"/><g class="ql-fill ql-transparent"><rect height="2" width="3" x="5" y="8"/><rect height="2" width="4" x="9" y="8"/><rect height="2" width="3" x="5" y="11"/><rect height="2" width="4" x="9" y="11"/></g></svg>',ylt='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="12" x="3" y="15"/></svg>',blt='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="12" width="1" x="5" y="3"/><rect class="ql-fill" height="12" width="1" x="12" y="3"/><rect class="ql-fill" height="2" width="8" x="5" y="8"/><rect class="ql-fill" height="1" width="3" x="3" y="5"/><rect class="ql-fill" height="1" width="3" x="3" y="7"/><rect class="ql-fill" height="1" width="3" x="3" y="10"/><rect class="ql-fill" height="1" width="3" x="3" y="12"/><rect class="ql-fill" height="1" width="3" x="12" y="5"/><rect class="ql-fill" height="1" width="3" x="12" y="7"/><rect class="ql-fill" height="1" width="3" x="12" y="10"/><rect class="ql-fill" height="1" width="3" x="12" y="12"/></svg>',v2={align:{"":Fst,center:Hst,right:Ust,justify:Gst},background:qst,blockquote:Qst,bold:Wst,clean:Kst,code:PX,"code-block":PX,color:Yst,direction:{"":Zst,rtl:Xst},formula:Jst,header:{1:elt,2:tlt,3:rlt,4:nlt,5:alt,6:ilt},italic:olt,image:slt,indent:{"+1":llt,"-1":ult},link:clt,list:{bullet:dlt,check:flt,ordered:hlt},script:{sub:plt,super:vlt},strike:glt,table:mlt,underline:ylt,video:blt},xlt='<svg viewbox="0 0 18 18"><polygon class="ql-stroke" points="7 11 9 13 11 11 7 11"/><polygon class="ql-stroke" points="7 7 9 5 11 7 7 7"/></svg>';let IX=0;function kX(r,e){r.setAttribute(e,`${r.getAttribute(e)!=="true"}`)}class I5{constructor(e){this.select=e,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",()=>{this.togglePicker()}),this.label.addEventListener("keydown",t=>{switch(t.key){case"Enter":this.togglePicker();break;case"Escape":this.escape(),t.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),kX(this.label,"aria-expanded"),kX(this.options,"aria-hidden")}buildItem(e){const t=document.createElement("span");t.tabIndex="0",t.setAttribute("role","button"),t.classList.add("ql-picker-item");const n=e.getAttribute("value");return n&&t.setAttribute("data-value",n),e.textContent&&t.setAttribute("data-label",e.textContent),t.addEventListener("click",()=>{this.selectItem(t,!0)}),t.addEventListener("keydown",a=>{switch(a.key){case"Enter":this.selectItem(t,!0),a.preventDefault();break;case"Escape":this.escape(),a.preventDefault();break}}),t}buildLabel(){const e=document.createElement("span");return e.classList.add("ql-picker-label"),e.innerHTML=xlt,e.tabIndex="0",e.setAttribute("role","button"),e.setAttribute("aria-expanded","false"),this.container.appendChild(e),e}buildOptions(){const e=document.createElement("span");e.classList.add("ql-picker-options"),e.setAttribute("aria-hidden","true"),e.tabIndex="-1",e.id=`ql-picker-options-${IX}`,IX+=1,this.label.setAttribute("aria-controls",e.id),this.options=e,Array.from(this.select.options).forEach(t=>{const n=this.buildItem(t);e.appendChild(n),t.selected===!0&&this.selectItem(n)}),this.container.appendChild(e)}buildPicker(){Array.from(this.select.attributes).forEach(e=>{this.container.setAttribute(e.name,e.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}escape(){this.close(),setTimeout(()=>this.label.focus(),1)}close(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}selectItem(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n=this.container.querySelector(".ql-selected");e!==n&&(n!=null&&n.classList.remove("ql-selected"),e!=null&&(e.classList.add("ql-selected"),this.select.selectedIndex=Array.from(e.parentNode.children).indexOf(e),e.hasAttribute("data-value")?this.label.setAttribute("data-value",e.getAttribute("data-value")):this.label.removeAttribute("data-value"),e.hasAttribute("data-label")?this.label.setAttribute("data-label",e.getAttribute("data-label")):this.label.removeAttribute("data-label"),t&&(this.select.dispatchEvent(new Event("change")),this.close())))}update(){let e;if(this.select.selectedIndex>-1){const n=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];e=this.select.options[this.select.selectedIndex],this.selectItem(n)}else this.selectItem(null);const t=e!=null&&e!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",t)}}class tge extends I5{constructor(e,t){super(e),this.label.innerHTML=t,this.container.classList.add("ql-color-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).slice(0,7).forEach(n=>{n.classList.add("ql-primary")})}buildItem(e){const t=super.buildItem(e);return t.style.backgroundColor=e.getAttribute("value")||"",t}selectItem(e,t){super.selectItem(e,t);const n=this.label.querySelector(".ql-color-label"),a=e&&e.getAttribute("data-value")||"";n&&(n.tagName==="line"?n.style.stroke=a:n.style.fill=a)}}class rge extends I5{constructor(e,t){super(e),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach(n=>{n.innerHTML=t[n.getAttribute("data-value")||""]}),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(e,t){super.selectItem(e,t);const n=e||this.defaultItem;if(n!=null){if(this.label.innerHTML===n.innerHTML)return;this.label.innerHTML=n.innerHTML}}}const wlt=r=>{const{overflowY:e}=getComputedStyle(r,null);return e!=="visible"&&e!=="clip"};let nge=class{constructor(e,t){this.quill=e,this.boundsContainer=t||document.body,this.root=e.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,wlt(this.quill.root)&&this.quill.root.addEventListener("scroll",()=>{this.root.style.marginTop=`${-1*this.quill.root.scrollTop}px`}),this.hide()}hide(){this.root.classList.add("ql-hidden")}position(e){const t=e.left+e.width/2-this.root.offsetWidth/2,n=e.bottom+this.quill.root.scrollTop;this.root.style.left=`${t}px`,this.root.style.top=`${n}px`,this.root.classList.remove("ql-flip");const a=this.boundsContainer.getBoundingClientRect(),i=this.root.getBoundingClientRect();let o=0;if(i.right>a.right&&(o=a.right-i.right,this.root.style.left=`${t+o}px`),i.left<a.left&&(o=a.left-i.left,this.root.style.left=`${t+o}px`),i.bottom>a.bottom){const s=i.bottom-i.top,l=e.bottom-e.top+s;this.root.style.top=`${n-l}px`,this.root.classList.add("ql-flip")}return o}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}};const Slt=[!1,"center","right","justify"],_lt=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],Clt=[!1,"serif","monospace"],Tlt=["1","2","3",!1],Alt=["small",!1,"large","huge"];class cw extends C0{constructor(e,t){super(e,t);const n=a=>{if(!document.body.contains(e.root)){document.body.removeEventListener("click",n);return}this.tooltip!=null&&!this.tooltip.root.contains(a.target)&&document.activeElement!==this.tooltip.textbox&&!this.quill.hasFocus()&&this.tooltip.hide(),this.pickers!=null&&this.pickers.forEach(i=>{i.container.contains(a.target)||i.close()})};e.emitter.listenDOM("click",document.body,n)}addModule(e){const t=super.addModule(e);return e==="toolbar"&&this.extendToolbar(t),t}buildButtons(e,t){Array.from(e).forEach(n=>{(n.getAttribute("class")||"").split(/\s+/).forEach(i=>{if(i.startsWith("ql-")&&(i=i.slice(3),t[i]!=null))if(i==="direction")n.innerHTML=t[i][""]+t[i].rtl;else if(typeof t[i]=="string")n.innerHTML=t[i];else{const o=n.value||"";o!=null&&t[i][o]&&(n.innerHTML=t[i][o])}})})}buildPickers(e,t){this.pickers=Array.from(e).map(a=>{if(a.classList.contains("ql-align")&&(a.querySelector("option")==null&&W1(a,Slt),typeof t.align=="object"))return new rge(a,t.align);if(a.classList.contains("ql-background")||a.classList.contains("ql-color")){const i=a.classList.contains("ql-background")?"background":"color";return a.querySelector("option")==null&&W1(a,_lt,i==="background"?"#ffffff":"#000000"),new tge(a,t[i])}return a.querySelector("option")==null&&(a.classList.contains("ql-font")?W1(a,Clt):a.classList.contains("ql-header")?W1(a,Tlt):a.classList.contains("ql-size")&&W1(a,Alt)),new I5(a)});const n=()=>{this.pickers.forEach(a=>{a.update()})};this.quill.on(ct.events.EDITOR_CHANGE,n)}}cw.DEFAULTS=If({},C0.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let r=this.container.querySelector("input.ql-image[type=file]");r==null&&(r=document.createElement("input"),r.setAttribute("type","file"),r.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),r.classList.add("ql-image"),r.addEventListener("change",()=>{const e=this.quill.getSelection(!0);this.quill.uploader.upload(e,r.files),r.value=""}),this.container.appendChild(r)),r.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});class age extends nge{constructor(e,t){super(e,t),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",e=>{e.key==="Enter"?(this.save(),e.preventDefault()):e.key==="Escape"&&(this.cancel(),e.preventDefault())})}cancel(){this.hide(),this.restoreFocus()}edit(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),this.textbox==null)return;t!=null?this.textbox.value=t:e!==this.root.getAttribute("data-mode")&&(this.textbox.value="");const n=this.quill.getBounds(this.quill.selection.savedRange);n!=null&&this.position(n),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute(`data-${e}`)||""),this.root.setAttribute("data-mode",e)}restoreFocus(){this.quill.focus({preventScroll:!0})}save(){let{value:e}=this.textbox;switch(this.root.getAttribute("data-mode")){case"link":{const{scrollTop:t}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",e,ct.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",e,ct.sources.USER)),this.quill.root.scrollTop=t;break}case"video":e=Elt(e);case"formula":{if(!e)break;const t=this.quill.getSelection(!0);if(t!=null){const n=t.index+t.length;this.quill.insertEmbed(n,this.root.getAttribute("data-mode"),e,ct.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(n+1," ",ct.sources.USER),this.quill.setSelection(n+2,ct.sources.USER)}break}}this.textbox.value="",this.hide()}}function Elt(r){let e=r.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||r.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return e?`${e[1]||"https"}://www.youtube.com/embed/${e[2]}?showinfo=0`:(e=r.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?`${e[1]||"https"}://player.vimeo.com/video/${e[2]}/`:r}function W1(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;e.forEach(n=>{const a=document.createElement("option");n===t?a.setAttribute("selected","selected"):a.setAttribute("value",String(n)),r.appendChild(a)})}const Mlt=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]];class ige extends age{constructor(e,t){super(e,t),this.quill.on(ct.events.EDITOR_CHANGE,(n,a,i,o)=>{if(n===ct.events.SELECTION_CHANGE)if(a!=null&&a.length>0&&o===ct.sources.USER){this.show(),this.root.style.left="0px",this.root.style.width="",this.root.style.width=`${this.root.offsetWidth}px`;const s=this.quill.getLines(a.index,a.length);if(s.length===1){const l=this.quill.getBounds(a);l!=null&&this.position(l)}else{const l=s[s.length-1],u=this.quill.getIndex(l),c=Math.min(l.length()-1,a.index+a.length-u),d=this.quill.getBounds(new Sv(u,c));d!=null&&this.position(d)}}else document.activeElement!==this.textbox&&this.quill.hasFocus()&&this.hide()})}listen(){super.listen(),this.root.querySelector(".ql-close").addEventListener("click",()=>{this.root.classList.remove("ql-editing")}),this.quill.on(ct.events.SCROLL_OPTIMIZE,()=>{setTimeout(()=>{if(this.root.classList.contains("ql-hidden"))return;const e=this.quill.getSelection();if(e!=null){const t=this.quill.getBounds(e);t!=null&&this.position(t)}},1)})}cancel(){this.show()}position(e){const t=super.position(e),n=this.root.querySelector(".ql-tooltip-arrow");return n.style.marginLeft="",t!==0&&(n.style.marginLeft=`${-1*t-n.offsetWidth/2}px`),t}}We(ige,"TEMPLATE",['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""));class oge extends cw{constructor(e,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=Mlt),super(e,t),this.quill.container.classList.add("ql-bubble")}extendToolbar(e){this.tooltip=new ige(this.quill,this.options.bounds),e.container!=null&&(this.tooltip.root.appendChild(e.container),this.buildButtons(e.container.querySelectorAll("button"),v2),this.buildPickers(e.container.querySelectorAll("select"),v2))}}oge.DEFAULTS=If({},cw.DEFAULTS,{modules:{toolbar:{handlers:{link(r){r?this.quill.theme.tooltip.edit():this.quill.format("link",!1,$e.sources.USER)}}}}});const Dlt=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];class sge extends age{constructor(){super(...arguments);We(this,"preview",this.root.querySelector("a.ql-preview"))}listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",t=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),t.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",t=>{if(this.linkRange!=null){const n=this.linkRange;this.restoreFocus(),this.quill.formatText(n,"link",!1,ct.sources.USER),delete this.linkRange}t.preventDefault(),this.hide()}),this.quill.on(ct.events.SELECTION_CHANGE,(t,n,a)=>{if(t!=null){if(t.length===0&&a===ct.sources.USER){const[i,o]=this.quill.scroll.descendant(Af,t.index);if(i!=null){this.linkRange=new Sv(t.index-o,i.length());const s=Af.formats(i.domNode);this.preview.textContent=s,this.preview.setAttribute("href",s),this.show();const l=this.quill.getBounds(this.linkRange);l!=null&&this.position(l);return}}else delete this.linkRange;this.hide()}})}show(){super.show(),this.root.removeAttribute("data-mode")}}We(sge,"TEMPLATE",['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""));class lge extends cw{constructor(e,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=Dlt),super(e,t),this.quill.container.classList.add("ql-snow")}extendToolbar(e){e.container!=null&&(e.container.classList.add("ql-snow"),this.buildButtons(e.container.querySelectorAll("button"),v2),this.buildPickers(e.container.querySelectorAll("select"),v2),this.tooltip=new sge(this.quill,this.options.bounds),e.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},(t,n)=>{e.handlers.link.call(e,!n.format.link)}))}}lge.DEFAULTS=If({},cw.DEFAULTS,{modules:{toolbar:{handlers:{link(r){if(r){const e=this.quill.getSelection();if(e==null||e.length===0)return;let t=this.quill.getText(e);/^\S+@\S+\.\S+$/.test(t)&&t.indexOf("mailto:")!==0&&(t=`mailto:${t}`);const{tooltip:n}=this.quill.theme;n.edit("link",t)}else this.quill.format("link",!1,$e.sources.USER)}}}}});$e.register({"attributors/attribute/direction":Vve,"attributors/class/align":zve,"attributors/class/background":qot,"attributors/class/color":Got,"attributors/class/direction":Fve,"attributors/class/font":Gve,"attributors/class/size":Qve,"attributors/style/align":jve,"attributors/style/background":o9,"attributors/style/color":i9,"attributors/style/direction":Hve,"attributors/style/font":qve,"attributors/style/size":Wve},!0);$e.register({"formats/align":zve,"formats/direction":Fve,"formats/indent":Ost,"formats/background":o9,"formats/color":i9,"formats/font":Gve,"formats/size":Qve,"formats/blockquote":TR,"formats/code-block":ui,"formats/header":AR,"formats/list":uw,"formats/bold":p2,"formats/code":s9,"formats/italic":ER,"formats/link":Af,"formats/script":MR,"formats/strike":DR,"formats/underline":LR,"formats/formula":OC,"formats/image":$st,"formats/video":$C,"modules/syntax":ege,"modules/table":jst,"modules/toolbar":f9,"themes/bubble":oge,"themes/snow":lge,"ui/icons":v2,"ui/picker":I5,"ui/icon-picker":rge,"ui/color-picker":tge,"ui/tooltip":nge},!0);const Llt=({modules:r,formats:e,placeholder:t})=>{const n=D.useRef(null),[a,i]=D.useState(null);return D.useEffect(()=>{if(n.current){const o=new $e(n.current,{modules:r,formats:e,placeholder:t});i(o)}},[]),{quillRef:n,quill:a,Quill:$e}};var Plt=r=>r.replace(/[\u00A0]/g," ");function Ilt({timeout:r=2e3}={}){const[e,t]=D.useState(null),[n,a]=D.useState(!1),[i,o]=D.useState(null),s=D.useCallback(()=>{i&&clearTimeout(i)},[i]),l=D.useCallback(d=>{s(),o(setTimeout(()=>a(!1),r)),a(d)},[s,r]),u=D.useCallback(d=>{if("clipboard"in navigator){const f=typeof d=="string"?Plt(d):d;navigator.clipboard.writeText(f).then(()=>l(!0)).catch(h=>t(h))}else t(new Error("useClipboard: navigator.clipboard is not supported"))},[l]),c=D.useCallback(()=>{a(!1),t(null),s()},[s]);return{copy:u,reset:c,error:e,copied:n}}function klt(r){var e,t,n,a;const i=Vr(),[o,s]=oa(r,sM.variantKeys),{ref:l,as:u,children:c,symbol:d="$",classNames:f,timeout:h,copyIcon:v,checkIcon:m,codeString:y,disableCopy:b=!1,disableTooltip:w=!1,hideCopyButton:S=!1,autoFocus:T=!1,hideSymbol:A=!1,onCopy:M,tooltipProps:P={},copyButtonProps:E={},className:R,...N}=o,k=u||"div",O=typeof k=="string",L=(t=(e=r==null?void 0:r.disableAnimation)!=null?e:i==null?void 0:i.disableAnimation)!=null?t:!1,$={offset:15,delay:1e3,content:"Copy to clipboard",color:(a=r==null?void 0:r.color)!=null?a:(n=sM.defaultVariants)==null?void 0:n.color,isDisabled:o.disableCopy,...P},j=bc(l),B=D.useRef(null),{copy:H,copied:F}=Ilt({timeout:h}),K=c&&Array.isArray(c),{isFocusVisible:U,isFocused:V,focusProps:Q}=Rn({autoFocus:T}),Z=D.useMemo(()=>sM({...s,disableAnimation:L}),[Xc(s),L]),Y=D.useMemo(()=>{if(!d||typeof d!="string")return d;const le=d.trim();return le?`${le} `:""},[d]),X=Cr(f==null?void 0:f.base,R),re=D.useCallback(()=>({className:Z.base({class:X}),...av(N,{enabled:O})}),[Z,X,K,N]),oe=D.useCallback(()=>{var le;if(b)return;let fe="";typeof c=="string"?fe=c:Array.isArray(c)&&c.forEach(pe=>{var Re,Ae;const ie=typeof pe=="string"?pe:(Ae=(Re=pe==null?void 0:pe.props)==null?void 0:Re.children)==null?void 0:Ae.toString();ie&&(fe+=ie+`
|
|
453
|
-
`)});const ve=y||fe||((le=B.current)==null?void 0:le.textContent)||"";H(ve),M==null||M(ve)},[H,y,b,M,c]),ae={"aria-label":typeof $.content=="string"?$.content:"Copy to clipboard",size:"sm",variant:"light",isDisabled:b,onPress:oe,isIconOnly:!0,...E},se=D.useCallback(()=>({...ae,"data-copied":ht(F),className:Z.copyButton({class:Cr(f==null?void 0:f.copyButton)})}),[Z,U,V,b,f==null?void 0:f.copyButton,ae,Q]);return{Component:k,as:u,domRef:j,preRef:B,children:c,slots:Z,classNames:f,copied:F,onCopy:oe,copyIcon:v,checkIcon:m,symbolBefore:Y,isMultiLine:K,isFocusVisible:U,hideCopyButton:S,disableCopy:b,disableTooltip:w,hideSymbol:A,tooltipProps:$,getSnippetProps:re,getCopyButtonProps:se}}function Rlt(r){var e,t;const n=Vr(),[a,i]=oa(r,zf.variantKeys),{ref:o,as:s,isOpen:l,content:u,children:c,defaultOpen:d,onOpenChange:f,isDisabled:h,trigger:v,shouldFlip:m=!0,containerPadding:y=12,placement:b="top",delay:w=0,closeDelay:S=500,showArrow:T=!1,offset:A=7,crossOffset:M=0,isDismissable:P,shouldCloseOnBlur:E=!0,portalContainer:R,isKeyboardDismissDisabled:N=!1,updatePositionDeps:k=[],shouldCloseOnInteractOutside:O,className:L,onClose:$,motionProps:j,classNames:B,...H}=a,F=s||"div",K=(t=(e=r==null?void 0:r.disableAnimation)!=null?e:n==null?void 0:n.disableAnimation)!=null?t:!1,U=Iae({delay:w,closeDelay:S,isDisabled:h,defaultOpen:d,isOpen:l,onOpenChange:ie=>{f==null||f(ie),ie||$==null||$()}}),V=D.useRef(null),Q=D.useRef(null),Z=D.useId(),Y=U.isOpen&&!h;D.useImperativeHandle(o,()=>XAe(Q));const{triggerProps:X,tooltipProps:re}=Rae({isDisabled:h,trigger:v},U,V),{tooltipProps:oe}=kae({isOpen:Y,...ze(a,re)},U),{overlayProps:ae,placement:se,updatePosition:le}=o3({isOpen:Y,targetRef:V,placement:Fhe(b),overlayRef:Q,offset:T?A+3:A,crossOffset:M,shouldFlip:m,containerPadding:y});d3(()=>{k.length&&le()},k);const{overlayProps:fe}=E2({isOpen:Y,onClose:U.close,isDismissable:P,shouldCloseOnBlur:E,isKeyboardDismissDisabled:N,shouldCloseOnInteractOutside:O},Q),ve=D.useMemo(()=>{var ie,Se,ee;return zf({...i,disableAnimation:K,radius:(ie=r==null?void 0:r.radius)!=null?ie:"md",size:(Se=r==null?void 0:r.size)!=null?Se:"md",shadow:(ee=r==null?void 0:r.shadow)!=null?ee:"sm"})},[Xc(i),K,r==null?void 0:r.radius,r==null?void 0:r.size,r==null?void 0:r.shadow]),pe=D.useCallback((ie={},Se=null)=>({...ze(X,ie),ref:V8(Se,V),"aria-describedby":Y?Z:void 0}),[X,Y,Z,U]),Re=D.useCallback(()=>({ref:Q,"data-slot":"base","data-open":ht(Y),"data-arrow":ht(T),"data-disabled":ht(h),"data-placement":hA(se||"top",b),...ze(oe,fe,H),style:ze(ae.style,H.style,a.style),className:ve.base({class:B==null?void 0:B.base}),id:Z}),[ve,Y,T,h,se,b,oe,fe,H,ae,a,Z]),Ae=D.useCallback(()=>({"data-slot":"content","data-open":ht(Y),"data-arrow":ht(T),"data-disabled":ht(h),"data-placement":hA(se||"top",b),className:ve.content({class:Cr(B==null?void 0:B.content,L)})}),[ve,Y,T,h,se,b,B]);return{Component:F,content:u,children:c,isOpen:Y,triggerRef:V,showArrow:T,portalContainer:R,placement:b,disableAnimation:K,isDisabled:h,motionProps:j,getTooltipContentProps:Ae,getTriggerProps:pe,getTooltipProps:Re}}var Nlt=()=>Jc(()=>import("./index-
|
|
453
|
+
`)});const ve=y||fe||((le=B.current)==null?void 0:le.textContent)||"";H(ve),M==null||M(ve)},[H,y,b,M,c]),ae={"aria-label":typeof $.content=="string"?$.content:"Copy to clipboard",size:"sm",variant:"light",isDisabled:b,onPress:oe,isIconOnly:!0,...E},se=D.useCallback(()=>({...ae,"data-copied":ht(F),className:Z.copyButton({class:Cr(f==null?void 0:f.copyButton)})}),[Z,U,V,b,f==null?void 0:f.copyButton,ae,Q]);return{Component:k,as:u,domRef:j,preRef:B,children:c,slots:Z,classNames:f,copied:F,onCopy:oe,copyIcon:v,checkIcon:m,symbolBefore:Y,isMultiLine:K,isFocusVisible:U,hideCopyButton:S,disableCopy:b,disableTooltip:w,hideSymbol:A,tooltipProps:$,getSnippetProps:re,getCopyButtonProps:se}}function Rlt(r){var e,t;const n=Vr(),[a,i]=oa(r,zf.variantKeys),{ref:o,as:s,isOpen:l,content:u,children:c,defaultOpen:d,onOpenChange:f,isDisabled:h,trigger:v,shouldFlip:m=!0,containerPadding:y=12,placement:b="top",delay:w=0,closeDelay:S=500,showArrow:T=!1,offset:A=7,crossOffset:M=0,isDismissable:P,shouldCloseOnBlur:E=!0,portalContainer:R,isKeyboardDismissDisabled:N=!1,updatePositionDeps:k=[],shouldCloseOnInteractOutside:O,className:L,onClose:$,motionProps:j,classNames:B,...H}=a,F=s||"div",K=(t=(e=r==null?void 0:r.disableAnimation)!=null?e:n==null?void 0:n.disableAnimation)!=null?t:!1,U=Iae({delay:w,closeDelay:S,isDisabled:h,defaultOpen:d,isOpen:l,onOpenChange:ie=>{f==null||f(ie),ie||$==null||$()}}),V=D.useRef(null),Q=D.useRef(null),Z=D.useId(),Y=U.isOpen&&!h;D.useImperativeHandle(o,()=>XAe(Q));const{triggerProps:X,tooltipProps:re}=Rae({isDisabled:h,trigger:v},U,V),{tooltipProps:oe}=kae({isOpen:Y,...ze(a,re)},U),{overlayProps:ae,placement:se,updatePosition:le}=o3({isOpen:Y,targetRef:V,placement:Fhe(b),overlayRef:Q,offset:T?A+3:A,crossOffset:M,shouldFlip:m,containerPadding:y});d3(()=>{k.length&&le()},k);const{overlayProps:fe}=E2({isOpen:Y,onClose:U.close,isDismissable:P,shouldCloseOnBlur:E,isKeyboardDismissDisabled:N,shouldCloseOnInteractOutside:O},Q),ve=D.useMemo(()=>{var ie,Se,ee;return zf({...i,disableAnimation:K,radius:(ie=r==null?void 0:r.radius)!=null?ie:"md",size:(Se=r==null?void 0:r.size)!=null?Se:"md",shadow:(ee=r==null?void 0:r.shadow)!=null?ee:"sm"})},[Xc(i),K,r==null?void 0:r.radius,r==null?void 0:r.size,r==null?void 0:r.shadow]),pe=D.useCallback((ie={},Se=null)=>({...ze(X,ie),ref:V8(Se,V),"aria-describedby":Y?Z:void 0}),[X,Y,Z,U]),Re=D.useCallback(()=>({ref:Q,"data-slot":"base","data-open":ht(Y),"data-arrow":ht(T),"data-disabled":ht(h),"data-placement":hA(se||"top",b),...ze(oe,fe,H),style:ze(ae.style,H.style,a.style),className:ve.base({class:B==null?void 0:B.base}),id:Z}),[ve,Y,T,h,se,b,oe,fe,H,ae,a,Z]),Ae=D.useCallback(()=>({"data-slot":"content","data-open":ht(Y),"data-arrow":ht(T),"data-disabled":ht(h),"data-placement":hA(se||"top",b),className:ve.content({class:Cr(B==null?void 0:B.content,L)})}),[ve,Y,T,h,se,b,B]);return{Component:F,content:u,children:c,isOpen:Y,triggerRef:V,showArrow:T,portalContainer:R,placement:b,disableAnimation:K,isDisabled:h,motionProps:j,getTooltipContentProps:Ae,getTriggerProps:pe,getTooltipProps:Re}}var Nlt=()=>Jc(()=>import("./index-B7_4fTZC.js"),[]).then(r=>r.default),uge=Ht((r,e)=>{const{Component:t,children:n,content:a,isOpen:i,portalContainer:o,placement:s,disableAnimation:l,motionProps:u,getTriggerProps:c,getTooltipProps:d,getTooltipContentProps:f}=Rlt({...r,ref:e});let h;try{if(D.Children.count(n)!==1)throw new Error;if(!D.isValidElement(n))h=_.jsx("p",{...c(),children:n});else{const T=n;h=D.cloneElement(T,c(T.props,T.ref))}}catch{h=_.jsx("span",{}),c3("Tooltip must have only one child node. Please, check your code.")}const{ref:v,id:m,style:y,...b}=d(),w=_.jsx("div",{ref:v,id:m,style:y,children:_.jsx(Mi,{features:Nlt,children:_.jsx(Di.div,{animate:"enter",exit:"exit",initial:"exit",variants:Kk.scaleSpring,...ze(u,b),style:{...Vhe(s)},children:_.jsx(t,{...f(),children:a})})})});return _.jsxs(_.Fragment,{children:[h,l&&i?_.jsx(tT,{portalContainer:o,children:_.jsx("div",{ref:v,id:m,style:y,...b,children:_.jsx(t,{...f(),children:a})})}):_.jsx(fl,{children:i?_.jsx(tT,{portalContainer:o,children:w}):null})]})});uge.displayName="HeroUI.Tooltip";var Olt=uge,cge=Ht((r,e)=>{const{Component:t,domRef:n,preRef:a,children:i,slots:o,classNames:s,copied:l,copyIcon:u=_.jsx(mWe,{}),checkIcon:c=_.jsx(yWe,{}),symbolBefore:d,disableCopy:f,disableTooltip:h,hideSymbol:v,hideCopyButton:m,tooltipProps:y,isMultiLine:b,onCopy:w,getSnippetProps:S,getCopyButtonProps:T}=klt({...r,ref:e}),A=D.useCallback(({children:E})=>_.jsx(Olt,{...y,isDisabled:l||y.isDisabled,children:E}),[Xc(y)]),M=D.useMemo(()=>{if(m)return null;const E=c&&D.cloneElement(c,{className:o.checkIcon()}),R=u&&D.cloneElement(u,{className:o.copyIcon()}),N=_.jsxs(Ze,{...T(),children:[E,R]});return h?N:_.jsx(A,{children:N})},[o,s==null?void 0:s.copyButton,l,c,u,w,A,f,h,m]),P=D.useMemo(()=>b&&i&&Array.isArray(i)?_.jsx("div",{className:o.content({class:s==null?void 0:s.content}),children:i.map((E,R)=>_.jsxs("pre",{className:o.pre({class:s==null?void 0:s.pre}),children:[!v&&_.jsx("span",{className:o.symbol({class:s==null?void 0:s.symbol}),children:d}),E]},`${R}-${E}`))}):_.jsxs("pre",{ref:a,className:o.pre({class:s==null?void 0:s.pre}),children:[!v&&_.jsx("span",{className:o.symbol({class:s==null?void 0:s.symbol}),children:d}),i]}),[i,v,b,d,s==null?void 0:s.pre,o]);return _.jsxs(t,{ref:n,...S(),children:[P,M]})});cge.displayName="HeroUI.Snippet";var $lt=cge;const zlt=({messages:r})=>_.jsx($lt,{hideSymbol:!0,tooltipProps:{content:"点击复制"},classNames:{copyButton:"self-start sticky top-0 right-0"},className:"bg-content1 h-96 overflow-y-scroll items-start",children:JSON.stringify(r,null,2).split(`
|
|
454
454
|
`).map((e,t)=>_.jsx("span",{className:"whitespace-pre-wrap break-all",children:e},t))}),ry=()=>{const r=Yae();return t=>{r.alert({title:"消息内容",size:"3xl",content:D.createElement(zlt,{messages:t})})}},dge=()=>{const[r,e]=D.useState(""),t=D.useRef(null),n=ry(),a=A=>{n([{type:"record",file:A,magic:!1}])},[i,o]=D.useState(!1),s=D.useRef(null),l=D.useRef([]),[u,c]=D.useState(null),[d,f]=D.useState(!1),h=D.useRef(null),[v,m]=D.useState(0),y=D.useRef(null);D.useEffect(()=>{var A;i?(navigator.mediaDevices.getUserMedia({audio:!0}).then(M=>{h.current=M;const P=new MediaRecorder(M);s.current=P,P.start(),P.ondataavailable=E=>{E.data.size>0&&l.current.push(E.data)},P.onstop=()=>{if(l.current.length>0){const E=new Blob(l.current,{type:"audio/wav"}),R=new FileReader;R.readAsDataURL(E),R.onloadend=()=>{const N=R.result;c(N),f(!0)},l.current=[]}M.getTracks().forEach(E=>E.stop())}}),y.current=setInterval(()=>{m(M=>M+1)},1e3)):((A=s.current)==null||A.stop(),y.current&&(clearInterval(y.current),y.current=null))},[i]);const b=()=>{c(null),f(!1),m(0),o(!0)},w=()=>{o(!1)},S=()=>{u&&a(u)},T=A=>{const M=Math.floor(A/60),P=A%60;return`${M}:${P.toString().padStart(2,"0")}`};return _.jsxs(_.Fragment,{children:[_.jsxs(ws,{children:[_.jsx(wn,{content:"发送音频",children:_.jsx("div",{className:"max-w-fit",children:_.jsx(xs,{children:_.jsx(Ze,{size:"sm",variant:"light",isIconOnly:!0,radius:"full",children:_.jsx(HF,{className:"text-xl"})})})})}),_.jsxs(bs,{className:"flex-row gap-2 p-4",children:[_.jsx(wn,{content:"上传音频",children:_.jsx(Ze,{className:"text-lg",color:"primary",isIconOnly:!0,variant:"flat",radius:"full",onPress:()=>{var A;(A=t==null?void 0:t.current)==null||A.click()},children:_.jsx(VA,{})})}),_.jsxs(ws,{children:[_.jsx(wn,{content:"输入音频地址",children:_.jsx("div",{className:"max-w-fit",children:_.jsx(xs,{tooltip:"输入音频地址",children:_.jsx(Ze,{className:"text-lg",color:"primary",isIconOnly:!0,variant:"flat",radius:"full",children:_.jsx(FA,{})})})})}),_.jsxs(bs,{className:"flex-row gap-1 p-2",children:[_.jsx(Va,{value:r,onChange:A=>e(A.target.value),placeholder:"请输入音频地址"}),_.jsx(Ze,{color:"primary",variant:"flat",isIconOnly:!0,radius:"full",onPress:()=>{if(!v0(r)){Da.error("请输入正确的音频地址");return}a(r),e("")},children:_.jsx(qwe,{})})]})]}),_.jsxs(ws,{children:[_.jsx(wn,{content:"录制音频",children:_.jsx("div",{className:"max-w-fit",children:_.jsx(xs,{children:_.jsx(Ze,{className:"text-lg",color:"primary",isIconOnly:!0,variant:"flat",radius:"full",children:_.jsx(HF,{})})})})}),_.jsxs(bs,{className:"flex-col gap-2 p-4",children:[_.jsxs("div",{className:"flex gap-2",children:[_.jsx(Ze,{color:"primary",variant:"flat",onPress:i?w:b,children:i?"停止录制":"开始录制"}),d&&u&&_.jsx(Ze,{color:"primary",variant:"flat",onPress:S,children:"查看消息"})]}),(i||u)&&_.jsxs("div",{className:"flex gap-1 items-center",children:[_.jsx("span",{className:Gr("w-4 h-4 rounded-full",i?"animate-pulse bg-primary-400":"bg-success-400")}),_.jsxs("span",{children:["录制时长: ",T(v)]})]}),d&&u&&_.jsx("audio",{controls:!0,src:u})]})]})]})]}),_.jsx("input",{type:"file",ref:t,hidden:!0,accept:"audio/*",className:"hidden",onChange:A=>{var E;const M=(E=A.target.files)==null?void 0:E[0];if(!M)return;const P=new FileReader;P.readAsDataURL(M),P.onload=R=>{var k;const N=(k=R.target)==null?void 0:k.result;a(N),A.target.value=""}}})]})},fge=()=>{const r=ry();return _.jsx(wn,{content:"发送骰子",children:_.jsx(Ze,{size:"sm",variant:"light",isIconOnly:!0,radius:"full",onPress:()=>{r([{type:"dice",id:1}])},children:_.jsx(f1e,{className:"text-lg"})})})},jlt=JSON.parse('[{"QSid":"0","QDes":"/惊讶","IQLid":"33","AQLid":"33","EMCode":"114","Input":["jingya","jy"]},{"QSid":"1","QDes":"/撇嘴","IQLid":"40","AQLid":"40","EMCode":"101","Input":["piezui","pz"]},{"QSid":"2","QDes":"/色","IQLid":"19","AQLid":"19","EMCode":"102","Input":["se"]},{"QSid":"3","QDes":"/发呆","IQLid":"43","AQLid":"43","EMCode":"103","Input":["fadai","fd"]},{"QSid":"4","QDes":"/得意","IQLid":"21","AQLid":"21","EMCode":"104","Input":["deyi","dy"]},{"QSid":"5","QDes":"/流泪","IQLid":"9","AQLid":"9","EMCode":"105","Input":["liulei","ll"]},{"QSid":"6","QDes":"/害羞","IQLid":"20","AQLid":"20","EMCode":"106","Input":["haixiu","hx"]},{"QSid":"7","QDes":"/闭嘴","IQLid":"104","AQLid":"106","EMCode":"107","Input":["bizui","bz"]},{"QSid":"8","QDes":"/睡","IQLid":"35","AQLid":"35","EMCode":"108","Input":["shui"]},{"QSid":"9","QDes":"/大哭","IQLid":"10","AQLid":"10","EMCode":"109","Input":["daku","dk"]},{"QSid":"10","QDes":"/尴尬","IQLid":"25","AQLid":"25","EMCode":"110","Input":["ganga","gg"]},{"QSid":"11","QDes":"/发怒","IQLid":"24","AQLid":"24","EMCode":"111","Input":["fanu","fn"]},{"QSid":"12","QDes":"/调皮","IQLid":"1","AQLid":"1","EMCode":"112","Input":["tiaopi","tp"]},{"QSid":"13","QDes":"/呲牙","IQLid":"0","AQLid":"0","EMCode":"113","Input":["ziya","zy"]},{"QSid":"14","QDes":"/微笑","IQLid":"23","AQLid":"23","EMCode":"100","Input":["weixiao","wx"]},{"QSid":"15","QDes":"/难过","IQLid":"32","AQLid":"32","EMCode":"115","isStatic":"1","Input":["nanguo","ng"]},{"QSid":"16","QDes":"/酷","IQLid":"12","AQLid":"12","EMCode":"116","Input":["ku"]},{"QSid":"18","QDes":"/抓狂","IQLid":"13","AQLid":"13","EMCode":"118","Input":["zhuakuang","zk"]},{"QSid":"19","QDes":"/吐","IQLid":"22","AQLid":"22","EMCode":"119","Input":["tu"]},{"QSid":"20","QDes":"/偷笑","IQLid":"3","AQLid":"3","EMCode":"120","Input":["touxiao","tx"]},{"QSid":"21","QDes":"/可爱","IQLid":"18","AQLid":"18","EMCode":"121","Input":["keai","ka"]},{"QSid":"22","QDes":"/白眼","IQLid":"30","AQLid":"30","EMCode":"122","Input":["baiyan","by"]},{"QSid":"23","QDes":"/傲慢","IQLid":"31","AQLid":"31","EMCode":"123","Input":["aoman","am"]},{"QSid":"24","QDes":"/饥饿","IQLid":"79","AQLid":"81","EMCode":"124","Input":["jie","je"]},{"QSid":"25","QDes":"/困","IQLid":"80","AQLid":"82","EMCode":"125","Input":["kun"]},{"QSid":"26","QDes":"/惊恐","IQLid":"26","AQLid":"26","EMCode":"126","Input":["jingkong","jk"]},{"QSid":"27","QDes":"/流汗","IQLid":"2","AQLid":"2","EMCode":"127","Input":["liuhan","lh"]},{"QSid":"28","QDes":"/憨笑","IQLid":"37","AQLid":"37","EMCode":"128","Input":["hanxiao","hx"]},{"QSid":"29","QDes":"/悠闲","IQLid":"50","AQLid":"50","EMCode":"129","Input":["youxian","yx"]},{"QSid":"30","QDes":"/奋斗","IQLid":"42","AQLid":"42","EMCode":"130","Input":["fendou","fd"]},{"QSid":"31","QDes":"/咒骂","IQLid":"81","AQLid":"83","EMCode":"131","Input":["zhouma","zm"]},{"QSid":"32","QDes":"/疑问","IQLid":"34","AQLid":"34","EMCode":"132","Input":["yiwen","yw"]},{"QSid":"33","QDes":"/嘘","IQLid":"11","AQLid":"11","EMCode":"133","Input":["xu"]},{"QSid":"34","QDes":"/晕","IQLid":"49","AQLid":"49","EMCode":"134","Input":["yun"]},{"QSid":"35","QDes":"/折磨","IQLid":"82","AQLid":"84","EMCode":"135","Input":["zhemo","zm"]},{"QSid":"36","QDes":"/衰","isStatic":"1","IQLid":"39","AQLid":"39","EMCode":"136","Input":["shuai"]},{"QSid":"37","QDes":"/骷髅","isStatic":"1","IQLid":"76","AQLid":"78","EMCode":"137","Input":["kulou","kl"]},{"QSid":"38","QDes":"/敲打","IQLid":"5","AQLid":"5","EMCode":"138","Input":["qiaoda","qd"]},{"QSid":"39","QDes":"/再见","IQLid":"4","AQLid":"4","EMCode":"139","Input":["zaijian","zj"]},{"QSid":"41","QDes":"/发抖","isStatic":"1","IQLid":"69","AQLid":"71","EMCode":"193","Input":["fadou","fd"]},{"QSid":"42","QDes":"/爱情","IQLid":"38","AQLid":"38","EMCode":"190","Input":["aiqing","aq"]},{"QSid":"43","QDes":"/跳跳","IQLid":"93","AQLid":"95","EMCode":"192","Input":["tiaotiao","tt"]},{"QSid":"46","QDes":"/猪头","isStatic":"1","IQLid":"7","AQLid":"7","EMCode":"162","Input":["zhutou","zt"]},{"QSid":"49","QDes":"/拥抱","IQLid":"45","AQLid":"45","EMCode":"178","Input":["yongbao","yb"]},{"QSid":"53","QDes":"/蛋糕","IQLid":"59","AQLid":"59","EMCode":"168","Input":["dangao","dg"]},{"QSid":"54","QDes":"/闪电","isStatic":"1","IQLid":"78","AQLid":"80","EMCode":"169","Input":["shandian","sd"]},{"QSid":"55","QDes":"/炸弹","isStatic":"1","IQLid":"16","AQLid":"16","EMCode":"170","Input":["zhadan","zd"]},{"QSid":"56","QDes":"/刀","IQLid":"68","AQLid":"70","EMCode":"171","Input":["dao"]},{"QSid":"57","QDes":"/足球","IQLid":"75","AQLid":"77","EMCode":"172","Input":["zuqiu","zq"]},{"QSid":"59","QDes":"/便便","IQLid":"15","AQLid":"15","EMCode":"174","Input":["bianbian","bb"]},{"QSid":"60","QDes":"/咖啡","IQLid":"66","AQLid":"66","EMCode":"160","Input":["kafei","kf"]},{"QSid":"61","QDes":"/饭","isStatic":"1","IQLid":"58","AQLid":"58","EMCode":"161","Input":["fan"]},{"QSid":"63","QDes":"/玫瑰","isStatic":"1","IQLid":"8","AQLid":"8","EMCode":"163","Input":["meigui","mg"]},{"QSid":"64","QDes":"/凋谢","isStatic":"1","IQLid":"57","AQLid":"57","EMCode":"164","Input":["diaoxie","dx"]},{"QSid":"66","QDes":"/爱心","isStatic":"1","IQLid":"28","AQLid":"28","EMCode":"166","Input":["aixin","ax"]},{"QSid":"67","QDes":"/心碎","IQLid":"72","AQLid":"74","EMCode":"167","Input":["xinsui","xs"]},{"QSid":"69","QDes":"/礼物","isStatic":"1","IQLid":"74","AQLid":"76","EMCode":"177","Input":["liwu","lw"]},{"QSid":"74","QDes":"/太阳","isStatic":"1","IQLid":"73","AQLid":"75","EMCode":"176","Input":["taiyang","ty"]},{"QSid":"75","QDes":"/月亮","isStatic":"1","IQLid":"67","AQLid":"68","EMCode":"175","Input":["yueliang","yl"]},{"QSid":"76","QDes":"/赞","IQLid":"52","AQLid":"52","EMCode":"179","Input":["zan"]},{"QSid":"77","QDes":"/踩","IQLid":"53","AQLid":"53","EMCode":"180","Input":["cai"]},{"QSid":"78","QDes":"/握手","IQLid":"54","AQLid":"54","EMCode":"181","Input":["woshou","ws"]},{"QSid":"79","QDes":"/胜利","IQLid":"55","AQLid":"55","EMCode":"182","Input":["shengli","sl"]},{"QSid":"85","QDes":"/飞吻","isStatic":"1","IQLid":"47","AQLid":"47","EMCode":"191","Input":["feiwen","fw"]},{"QSid":"86","QDes":"/怄火","IQLid":"94","AQLid":"96","EMCode":"194","Input":["ouhuo","oh"]},{"QSid":"89","QDes":"/西瓜","isStatic":"1","IQLid":"60","AQLid":"60","EMCode":"156","Input":["xigua","xg"]},{"QSid":"96","QDes":"/冷汗","IQLid":"27","AQLid":"27","EMCode":"117","Input":["lenghan","lh"]},{"QSid":"97","QDes":"/擦汗","IQLid":"6","AQLid":"6","EMCode":"140","Input":["cahan","ch"]},{"QSid":"98","QDes":"/抠鼻","IQLid":"83","AQLid":"85","EMCode":"141","Input":["koubi","kb"]},{"QSid":"99","QDes":"/鼓掌","IQLid":"84","AQLid":"86","EMCode":"142","Input":["guzhang","gz"]},{"QSid":"100","QDes":"/糗大了","IQLid":"85","AQLid":"87","EMCode":"143","Input":["qiudale","qdl"]},{"QSid":"101","QDes":"/坏笑","IQLid":"46","AQLid":"46","EMCode":"144","Input":["huaixiao","hx"]},{"QSid":"102","QDes":"/左哼哼","IQLid":"86","AQLid":"88","EMCode":"145","Input":["zuohengheng","zhh"]},{"QSid":"103","QDes":"/右哼哼","IQLid":"44","AQLid":"44","EMCode":"146","Input":["youhengheng","yhh"]},{"QSid":"104","QDes":"/哈欠","IQLid":"87","AQLid":"89","EMCode":"147","Input":["haqian","hq"]},{"QSid":"105","QDes":"/鄙视","IQLid":"48","AQLid":"48","EMCode":"148","Input":["bishi","bs"]},{"QSid":"106","QDes":"/委屈","IQLid":"14","AQLid":"14","EMCode":"149","Input":["weiqu","wq"]},{"QSid":"107","QDes":"/快哭了","IQLid":"88","AQLid":"90","EMCode":"150","Input":["kuaikule","kkl"]},{"QSid":"108","QDes":"/阴险","IQLid":"41","AQLid":"41","EMCode":"151","Input":["yinxian","yx"]},{"QSid":"109","QDes":"/左亲亲","IQLid":"36","AQLid":"36","EMCode":"152","Input":["zuoqinqin","zqq"]},{"QSid":"110","QDes":"/吓","IQLid":"89","AQLid":"91","EMCode":"153","Input":["xia"]},{"QSid":"111","QDes":"/可怜","IQLid":"51","AQLid":"51","EMCode":"154","Input":["kelian","kl"]},{"QSid":"112","QDes":"/菜刀","IQLid":"17","AQLid":"17","EMCode":"155","Input":["caidao","cd"]},{"QSid":"113","QDes":"/啤酒","IQLid":"61","AQLid":"61","EMCode":"157","Input":["pijiu","pj"]},{"QSid":"114","QDes":"/篮球","IQLid":"90","AQLid":"92","EMCode":"158","Input":["lanqiu","lq"]},{"QSid":"115","QDes":"/乒乓","IQLid":"91","AQLid":"93","EMCode":"159","Input":["pingpang","pp"]},{"QSid":"116","QDes":"/示爱","IQLid":"29","AQLid":"29","EMCode":"165","Input":["shiai","sa"]},{"QSid":"117","QDes":"/瓢虫","IQLid":"62","AQLid":"62","EMCode":"173","Input":["piaochong","pc"]},{"QSid":"118","QDes":"/抱拳","IQLid":"56","AQLid":"56","EMCode":"183","Input":["baoquan","bq"]},{"QSid":"119","QDes":"/勾引","IQLid":"63","AQLid":"63","EMCode":"184","Input":["gouyin","gy"]},{"QSid":"120","QDes":"/拳头","IQLid":"71","AQLid":"73","EMCode":"185","Input":["quantou","qt"]},{"QSid":"121","QDes":"/差劲","IQLid":"70","AQLid":"72","EMCode":"186","Input":["chajin","cj"]},{"QSid":"122","QDes":"/爱你","IQLid":"65","AQLid":"65","EMCode":"187","Input":["aini","an"]},{"QSid":"123","QDes":"/NO","IQLid":"92","AQLid":"94","EMCode":"188","Input":["NO","N"]},{"QSid":"124","QDes":"/OK","isStatic":"1","IQLid":"64","AQLid":"64","EMCode":"189","Input":["OK","O"]},{"QSid":"125","QDes":"/转圈","IQLid":"95","AQLid":"97","EMCode":"195","Input":["zhuanquan","zq"]},{"QSid":"126","QDes":"/磕头","IQLid":"96","AQLid":"98","EMCode":"196","Input":["ketou","kt"]},{"QSid":"127","QDes":"/回头","IQLid":"97","AQLid":"99","EMCode":"197","Input":["huitou","ht"]},{"QSid":"128","QDes":"/跳绳","IQLid":"98","AQLid":"100","EMCode":"198","Input":["tiaosheng","ts"]},{"QSid":"129","QDes":"/挥手","IQLid":"77","AQLid":"79","EMCode":"199","Input":["huishou","hs"]},{"QSid":"130","QDes":"/激动","IQLid":"99","AQLid":"101","EMCode":"200","Input":["jidong","jd"]},{"QSid":"131","QDes":"/街舞","IQLid":"100","AQLid":"102","EMCode":"201","Input":["jiewu","jw"]},{"QSid":"132","QDes":"/献吻","IQLid":"101","AQLid":"103","EMCode":"202","Input":["xianwen","xw"]},{"QSid":"133","QDes":"/左太极","IQLid":"102","AQLid":"104","EMCode":"203","Input":["zuotaiji","ztj"]},{"QSid":"134","QDes":"/右太极","IQLid":"103","AQLid":"105","EMCode":"204","Input":["youtaiji","ytj"]},{"QSid":"136","QDes":"/双喜","isStatic":"1","IQLid":"106","AQLid":"108","EMCode":"121001","Input":["shuangxi","sx"]},{"QSid":"137","QDes":"/鞭炮","isStatic":"1","IQLid":"107","AQLid":"109","EMCode":"121002","Input":["bianpao","bp"]},{"QSid":"138","QDes":"/灯笼","isStatic":"1","IQLid":"108","AQLid":"110","EMCode":"121003","Input":["denglong","dl"]},{"QSid":"140","QDes":"/K歌","isStatic":"1","IQLid":"110","AQLid":"112","EMCode":"121005","Input":["Kge","Kg"]},{"QSid":"144","QDes":"/喝彩","isStatic":"1","IQLid":"114","AQLid":"116","EMCode":"121009","Input":["hecai","hc"]},{"QSid":"145","QDes":"/祈祷","isStatic":"1","IQLid":"115","AQLid":"117","EMCode":"121010","Input":["qidao","qd"]},{"QSid":"146","QDes":"/爆筋","isStatic":"1","IQLid":"116","AQLid":"118","EMCode":"121011","Input":["baojin","bj"]},{"QSid":"147","QDes":"/棒棒糖","isStatic":"1","IQLid":"117","AQLid":"119","EMCode":"121012","Input":["bangbangtang","bbt"]},{"QSid":"148","QDes":"/喝奶","isStatic":"1","IQLid":"118","AQLid":"120","EMCode":"121013","Input":["henai","hn"]},{"QSid":"151","QDes":"/飞机","isStatic":"1","IQLid":"121","AQLid":"123","EMCode":"121016","Input":["feiji","fj"]},{"QSid":"158","QDes":"/钞票","isStatic":"1","IQLid":"128","AQLid":"130","EMCode":"121023","Input":["chaopiao","cp"]},{"QSid":"168","QDes":"/药","isStatic":"1","IQLid":"138","AQLid":"140","EMCode":"121033","Input":["yao"]},{"QSid":"169","QDes":"/手枪","isStatic":"1","IQLid":"139","AQLid":"141","EMCode":"121034","Input":["shouqiang","sq"]},{"QSid":"171","QDes":"/茶","IQLid":"141","AQLid":"163","EMCode":"241","Input":["cha"]},{"QSid":"172","QDes":"/眨眼睛","IQLid":"142","AQLid":"164","EMCode":"242","Input":["zhayanjing","zyj"]},{"QSid":"173","QDes":"/泪奔","IQLid":"143","AQLid":"165","EMCode":"243","Input":["leiben","lb"]},{"QSid":"174","QDes":"/无奈","IQLid":"144","AQLid":"166","EMCode":"244","Input":["wunai","wn"]},{"QSid":"175","QDes":"/卖萌","IQLid":"145","AQLid":"167","EMCode":"245","Input":["maimeng","mm"]},{"QSid":"176","QDes":"/小纠结","IQLid":"146","AQLid":"168","EMCode":"246","Input":["xiaojiujie","xjj"]},{"QSid":"177","QDes":"/喷血","IQLid":"147","AQLid":"169","EMCode":"247","Input":["penxie","px"]},{"QSid":"178","QDes":"/斜眼笑","IQLid":"148","AQLid":"170","EMCode":"248","Input":["xieyanxiao","xyx"]},{"QSid":"179","QDes":"/doge","IQLid":"149","AQLid":"171","EMCode":"249","Input":["doge","d"]},{"QSid":"180","QDes":"/惊喜","IQLid":"150","AQLid":"172","EMCode":"250","Input":["jingxi","jx"]},{"QSid":"181","QDes":"/骚扰","IQLid":"151","AQLid":"173","EMCode":"251","Input":["saorao","sr"]},{"QSid":"182","QDes":"/笑哭","IQLid":"152","AQLid":"174","EMCode":"252","Input":["xiaoku","xk"]},{"QSid":"183","QDes":"/我最美","IQLid":"153","AQLid":"175","EMCode":"253","Input":["wozuimei","wzm"]},{"QSid":"184","QDes":"/河蟹","IQLid":"154","AQLid":"176","EMCode":"254","Input":["hexie","hx"]},{"QSid":"185","QDes":"/羊驼","IQLid":"155","AQLid":"177","EMCode":"255","Input":["yangtuo","yt"]},{"QSid":"187","QDes":"/幽灵","IQLid":"157","AQLid":"179","EMCode":"257","Input":["youling","yl"]},{"QSid":"188","QDes":"/蛋","IQLid":"158","AQLid":"180","EMCode":"258","Input":["dan"]},{"QSid":"190","QDes":"/菊花","IQLid":"160","AQLid":"182","EMCode":"260","Input":["juhua","jh"]},{"QSid":"192","QDes":"/红包","IQLid":"162","AQLid":"184","EMCode":"262","Input":["hongbao","hb"]},{"QSid":"193","QDes":"/大笑","IQLid":"163","AQLid":"185","EMCode":"263","isStatic":"1","Input":["daxiao","dx"]},{"QSid":"194","QDes":"/不开心","IQLid":"164","AQLid":"143","EMCode":"264","Input":["bukaixin","bkx"]},{"QSid":"197","QDes":"/冷漠","IQLid":"167","AQLid":"146","EMCode":"267","Input":["lengmo","lm"]},{"QSid":"198","QDes":"/呃","IQLid":"168","AQLid":"147","EMCode":"268","Input":["e"]},{"QSid":"199","QDes":"/好棒","IQLid":"169","AQLid":"148","EMCode":"269","Input":["haobang","hb"]},{"QSid":"200","QDes":"/拜托","IQLid":"170","AQLid":"149","EMCode":"270","Input":["baituo","bt"]},{"QSid":"201","QDes":"/点赞","IQLid":"171","AQLid":"150","EMCode":"271","Input":["dianzan","dz"]},{"QSid":"202","QDes":"/无聊","IQLid":"172","AQLid":"151","EMCode":"272","Input":["wuliao","wl"]},{"QSid":"203","QDes":"/托脸","IQLid":"173","AQLid":"152","EMCode":"273","Input":["tuolian","tl"]},{"QSid":"204","QDes":"/吃","IQLid":"174","AQLid":"153","EMCode":"274","Input":["chi"]},{"QSid":"205","QDes":"/送花","IQLid":"175","AQLid":"154","EMCode":"275","Input":["songhua","sh"]},{"QSid":"206","QDes":"/害怕","IQLid":"176","AQLid":"155","EMCode":"276","Input":["haipa","hp"]},{"QSid":"207","QDes":"/花痴","IQLid":"177","AQLid":"156","EMCode":"277","Input":["huachi","hc"]},{"QSid":"208","QDes":"/小样儿","IQLid":"178","AQLid":"157","EMCode":"278","Input":["xiaoyanger","xye"]},{"QSid":"210","QDes":"/飙泪","IQLid":"180","AQLid":"159","EMCode":"280","Input":["biaolei","bl"]},{"QSid":"211","QDes":"/我不看","IQLid":"181","AQLid":"160","EMCode":"281","Input":["wobukan","wbk"]},{"QSid":"212","QDes":"/托腮","IQLid":"182","AQLid":"161","EMCode":"282","Input":["tuosai","ts"]},{"QSid":"214","QDes":"/啵啵","IQLid":"184","isCMEmoji":"1","AQLid":"186","EMCode":"284","Input":["bobo","bb"]},{"QSid":"215","QDes":"/糊脸","IQLid":"185","isCMEmoji":"1","AQLid":"187","EMCode":"285","Input":["hulian","hl"]},{"QSid":"216","QDes":"/拍头","IQLid":"186","isCMEmoji":"1","AQLid":"188","EMCode":"286","Input":["paitou","pt"]},{"QSid":"217","QDes":"/扯一扯","IQLid":"187","isCMEmoji":"1","AQLid":"189","EMCode":"287","Input":["cheyiche","cyc"]},{"QSid":"218","QDes":"/舔一舔","IQLid":"188","isCMEmoji":"1","AQLid":"190","EMCode":"288","Input":["tianyitian","tyt"]},{"QSid":"219","QDes":"/蹭一蹭","IQLid":"189","isCMEmoji":"1","AQLid":"191","EMCode":"289","Input":["cengyiceng","cyc"]},{"QSid":"220","QDes":"/拽炸天","IQLid":"190","isCMEmoji":"1","AQLid":"192","EMCode":"290","Input":["zhuaizhatian","zzt"]},{"QSid":"221","QDes":"/顶呱呱","IQLid":"191","isCMEmoji":"1","AQLid":"193","EMCode":"291","Input":["dingguagua","dgg"]},{"QSid":"222","QDes":"/抱抱","IQLid":"192","isCMEmoji":"1","AQLid":"194","EMCode":"292","Input":["baobao","bb"]},{"QSid":"223","QDes":"/暴击","IQLid":"193","isCMEmoji":"1","AQLid":"195","EMCode":"293","Input":["baoji","bj"]},{"QSid":"224","QDes":"/开枪","IQLid":"194","isCMEmoji":"1","AQLid":"196","EMCode":"295","Input":["kaiqiang","kq"]},{"QSid":"225","QDes":"/撩一撩","IQLid":"195","isCMEmoji":"1","AQLid":"197","EMCode":"296","Input":["liaoyiliao","lyl"]},{"QSid":"226","QDes":"/拍桌","IQLid":"196","isCMEmoji":"1","AQLid":"198","EMCode":"297","Input":["paizhuo","pz"]},{"QSid":"227","QDes":"/拍手","IQLid":"197","isCMEmoji":"1","AQLid":"199","EMCode":"294","Input":["paishou","ps"]},{"QSid":"228","QDes":"/恭喜","IQLid":"198","isCMEmoji":"1","AQLid":"200","EMCode":"298","Input":["gongxi","gx"]},{"QSid":"229","QDes":"/干杯","IQLid":"199","isCMEmoji":"1","AQLid":"201","EMCode":"299","Input":["ganbei","gb"]},{"QSid":"230","QDes":"/嘲讽","IQLid":"200","isCMEmoji":"1","AQLid":"202","EMCode":"300","Input":["chaofeng","cf"]},{"QSid":"231","QDes":"/哼","IQLid":"201","isCMEmoji":"1","AQLid":"203","EMCode":"301","Input":["heng"]},{"QSid":"232","QDes":"/佛系","IQLid":"202","isCMEmoji":"1","AQLid":"204","EMCode":"302","Input":["foxi","fx"]},{"QSid":"233","QDes":"/掐一掐","IQLid":"203","isCMEmoji":"1","AQLid":"205","EMCode":"303","Input":["qiayiqia","qyq"]},{"QSid":"234","QDes":"/惊呆","IQLid":"204","isCMEmoji":"1","AQLid":"206","EMCode":"304","Input":["jingdai","jd"]},{"QSid":"235","QDes":"/颤抖","IQLid":"205","isCMEmoji":"1","AQLid":"207","EMCode":"305","Input":["chandou","cd"]},{"QSid":"236","QDes":"/啃头","IQLid":"206","isCMEmoji":"1","AQLid":"208","EMCode":"306","Input":["kentou","kt"]},{"QSid":"237","QDes":"/偷看","IQLid":"207","isCMEmoji":"1","AQLid":"209","EMCode":"307","Input":["toukan","tk"]},{"QSid":"238","QDes":"/扇脸","IQLid":"208","isCMEmoji":"1","AQLid":"210","EMCode":"308","Input":["shanlian","sl"]},{"QSid":"239","QDes":"/原谅","IQLid":"209","isCMEmoji":"1","AQLid":"211","EMCode":"309","Input":["yuanliang","yl"]},{"QSid":"240","QDes":"/喷脸","IQLid":"210","isCMEmoji":"1","AQLid":"212","EMCode":"310","Input":["penlian","pl"]},{"QSid":"241","QDes":"/生日快乐","IQLid":"211","isCMEmoji":"1","AQLid":"213","EMCode":"311","Input":["shengrikuaile","srkl"]},{"QSid":"242","QDes":"/头撞击","IQLid":"212","isCMEmoji":"1","AQLid":"214","EMCode":"314","Input":["touzhuangji","tzj"]},{"QSid":"243","QDes":"/甩头","IQLid":"213","isCMEmoji":"1","AQLid":"215","EMCode":"313","Input":["shuaitou","st"]},{"QSid":"244","QDes":"/扔狗","IQLid":"214","isCMEmoji":"1","AQLid":"216","EMCode":"312","Input":["renggou","rg"]},{"QSid":"245","QDes":"/加油必胜","IQLid":"245","AQLid":"217","EMCode":"202001","Input":["jiayoubisheng","jybs"]},{"QSid":"246","QDes":"/加油抱抱","IQLid":"246","AQLid":"218","EMCode":"202002","Input":["jiayoubaobao","jybb"]},{"QSid":"247","QDes":"/口罩护体","isStatic":"1","IQLid":"247","AQLid":"219","EMCode":"202003","Input":["kouzhaohuti","kzht"]},{"QSid":"260","QDes":"/搬砖中","isStatic":"1","IQLid":"260","AQLid":"260","EMCode":"10260","Input":["banzhuanzhong","bzz"]},{"QSid":"261","QDes":"/忙到飞起","IQLid":"261","AQLid":"261","EMCode":"10261","Input":["mangdaofeiqi","mdfq"]},{"QSid":"262","QDes":"/脑阔疼","IQLid":"262","AQLid":"262","EMCode":"10262","Input":["naokuoteng","nkt"]},{"QSid":"263","QDes":"/沧桑","IQLid":"263","AQLid":"263","EMCode":"10263","Input":["cangsang","cs"]},{"QSid":"264","QDes":"/捂脸","IQLid":"264","AQLid":"264","EMCode":"10264","Input":["wulian","wl"]},{"QSid":"265","QDes":"/辣眼睛","IQLid":"265","AQLid":"265","EMCode":"10265","Input":["layanjing","lyj"]},{"QSid":"266","QDes":"/哦哟","IQLid":"266","AQLid":"266","EMCode":"10266","Input":["oyo","oy"]},{"QSid":"267","QDes":"/头秃","IQLid":"267","AQLid":"267","EMCode":"10267","Input":["toutu","tt"]},{"QSid":"268","QDes":"/问号脸","IQLid":"268","AQLid":"268","EMCode":"10268","Input":["wenhaolian","whl"]},{"QSid":"269","QDes":"/暗中观察","IQLid":"269","AQLid":"269","EMCode":"10269","Input":["anzhongguancha","azgc"]},{"QSid":"270","QDes":"/emm","IQLid":"270","AQLid":"270","EMCode":"10270","Input":["emm","e"]},{"QSid":"271","QDes":"/吃瓜","IQLid":"271","AQLid":"271","EMCode":"10271","Input":["chigua","cg"]},{"QSid":"272","QDes":"/呵呵哒","IQLid":"272","AQLid":"272","EMCode":"10272","Input":["heheda","hhd"]},{"QSid":"273","QDes":"/我酸了","isStatic":"1","IQLid":"273","AQLid":"273","EMCode":"10273","Input":["wosuanle","wsl"]},{"QSid":"274","QDes":"/太南了","isStatic":"1","IQLid":"274","AQLid":"274","EMCode":"10274","Input":["tainanle","tnl"]},{"QSid":"276","QDes":"/辣椒酱","isStatic":"1","IQLid":"276","AQLid":"276","QHide":"1","EMCode":"10276","Input":["lajiaojiang","ljj"]},{"QSid":"277","QDes":"/汪汪","isStatic":"1","IQLid":"277","AQLid":"277","EMCode":"10277","Input":["wangwang","ww"]},{"QSid":"278","QDes":"/汗","IQLid":"278","isCMEmoji":"1","AQLid":"278","EMCode":"20237","Input":["han"]},{"QSid":"279","QDes":"/打脸","IQLid":"279","isCMEmoji":"1","AQLid":"279","EMCode":"20238","Input":["dalian","dl"]},{"QSid":"280","QDes":"/击掌","IQLid":"280","isCMEmoji":"1","AQLid":"280","EMCode":"20239","Input":["jizhang","jz"]},{"QSid":"281","QDes":"/无眼笑","IQLid":"281","AQLid":"281","EMCode":"10281","Input":["wuyanxiao","wyx"]},{"QSid":"282","QDes":"/敬礼","IQLid":"282","AQLid":"282","EMCode":"10282","Input":["jingli","jl"]},{"QSid":"283","QDes":"/狂笑","IQLid":"283","AQLid":"283","EMCode":"10283","Input":["kuangxiao","kx"]},{"QSid":"284","QDes":"/面无表情","IQLid":"284","AQLid":"284","EMCode":"10284","Input":["mianwubiaoqing","mwbq"]},{"QSid":"285","QDes":"/摸鱼","IQLid":"285","AQLid":"285","EMCode":"10285","Input":["moyu","my"]},{"QSid":"286","QDes":"/魔鬼笑","IQLid":"286","AQLid":"286","EMCode":"10286","Input":["moguixiao","mgx"]},{"QSid":"287","QDes":"/哦","IQLid":"287","AQLid":"287","EMCode":"10287","Input":["o"]},{"QSid":"288","QDes":"/请","IQLid":"288","AQLid":"288","EMCode":"10288","Input":["qing"]},{"QSid":"289","QDes":"/睁眼","IQLid":"289","AQLid":"289","EMCode":"10289","Input":["zhengyan","zy"]},{"QSid":"290","QDes":"/敲开心","IQLid":"290","isCMEmoji":"1","AQLid":"290","EMCode":"20240","Input":["qiaokaixin","qkx"]},{"QSid":"291","QDes":"/震惊","IQLid":"291","isCMEmoji":"1","AQLid":"291","EMCode":"20241","Input":["zhenjing","zj"]},{"QSid":"292","QDes":"/让我康康","IQLid":"292","isCMEmoji":"1","AQLid":"292","EMCode":"20242","Input":["rangwokangkang","rwkk"]},{"QSid":"293","QDes":"/摸锦鲤","IQLid":"293","AQLid":"293","EMCode":"10293","Input":["mojinli","mjl"]},{"QSid":"294","QDes":"/期待","IQLid":"294","AQLid":"294","EMCode":"10294","Input":["qidai","qd"]},{"QSid":"295","QDes":"/拿到红包","IQLid":"295","AQLid":"295","QHide":"1","EMCode":"10295","Input":["nadaohongbao","ndhb"]},{"QSid":"296","QDes":"/真好","IQLid":"296","AQLid":"296","QHide":"1","EMCode":"10296","Input":["zhenhao","zh"]},{"QSid":"297","QDes":"/拜谢","IQLid":"297","AQLid":"297","EMCode":"10297","Input":["baixie","bx"]},{"QSid":"298","QDes":"/元宝","IQLid":"298","AQLid":"298","EMCode":"10298","Input":["yuanbao","yb"]},{"QSid":"299","QDes":"/牛啊","IQLid":"299","AQLid":"299","EMCode":"10299","Input":["niua","na"]},{"QSid":"300","QDes":"/胖三斤","IQLid":"300","AQLid":"300","EMCode":"10300","Input":["pangsanjin","psj"]},{"QSid":"301","QDes":"/好闪","IQLid":"301","AQLid":"301","EMCode":"10301","Input":["haoshan","hs"]},{"QSid":"302","QDes":"/左拜年","IQLid":"302","AQLid":"302","QHide":"1","EMCode":"10302","Input":["zuobainian","zbn"]},{"QSid":"303","QDes":"/右拜年","IQLid":"303","AQLid":"303","QHide":"1","EMCode":"10303","Input":["youbainian","ybn"]},{"QSid":"304","QDes":"/红包包","IQLid":"304","AQLid":"304","QHide":"1","EMCode":"10304","Input":["hongbaobao","hbb"]},{"QSid":"305","QDes":"/右亲亲","IQLid":"305","AQLid":"305","EMCode":"10305","Input":["youqinqin","yqq"]},{"QSid":"306","QDes":"/牛气冲天","isStatic":"1","IQLid":"306","AQLid":"306","EMCode":"10306","Input":["niuqichongtian","nqct"]},{"QSid":"307","QDes":"/喵喵","isStatic":"1","IQLid":"307","AQLid":"307","EMCode":"10307","Input":["miaomiao","mm"]},{"QSid":"308","QDes":"/求红包","IQLid":"308","isCMEmoji":"1","AQLid":"308","EMCode":"20243","Input":["qiuhongbao","qhb"]},{"QSid":"309","QDes":"/谢红包","IQLid":"309","isCMEmoji":"1","AQLid":"309","EMCode":"20244","Input":["xiehongbao","xhb"]},{"QSid":"310","QDes":"/新年烟花","IQLid":"310","isCMEmoji":"1","AQLid":"310","EMCode":"20245","Input":["xinnianyanhua","xnyh"]},{"QSid":"311","QDes":"/打call","IQLid":"311","AQLid":"311","EMCode":"10311","AniStickerType":1,"AniStickerPackId":"1","AniStickerId":"1","Input":["dacall","dc"]},{"QSid":"312","QDes":"/变形","IQLid":"312","AQLid":"312","EMCode":"10312","AniStickerType":1,"AniStickerPackId":"1","AniStickerId":"2","Input":["bianxing","bx"]},{"QSid":"313","QDes":"/嗑到了","IQLid":"313","AQLid":"313","QHide":"1","EMCode":"10313","AniStickerType":1,"AniStickerPackId":"1","AniStickerId":"3","Input":["kedaole","kdl"]},{"QSid":"314","QDes":"/仔细分析","IQLid":"314","AQLid":"314","EMCode":"10314","AniStickerType":1,"AniStickerPackId":"1","AniStickerId":"4","Input":["zixifenxi","zxfx"]},{"QSid":"315","QDes":"/加油","IQLid":"315","AQLid":"315","EMCode":"10315","AniStickerType":1,"AniStickerPackId":"1","AniStickerId":"5","Input":["jiayou","jy"]},{"QSid":"316","QDes":"/我没事","IQLid":"316","AQLid":"316","QHide":"1","EMCode":"10316","AniStickerType":1,"AniStickerPackId":"1","AniStickerId":"6","Input":["womeishi","wms"]},{"QSid":"317","QDes":"/菜狗","IQLid":"317","AQLid":"317","EMCode":"10317","AniStickerType":1,"AniStickerPackId":"1","AniStickerId":"7","Input":["caigou","cg"]},{"QSid":"318","QDes":"/崇拜","IQLid":"318","AQLid":"318","EMCode":"10318","AniStickerType":1,"AniStickerPackId":"1","AniStickerId":"8","Input":["chongbai","cb"]},{"QSid":"319","QDes":"/比心","IQLid":"319","AQLid":"319","EMCode":"10319","AniStickerType":1,"AniStickerPackId":"1","AniStickerId":"9","Input":["bixin","bx"]},{"QSid":"320","QDes":"/庆祝","IQLid":"320","AQLid":"320","EMCode":"10320","AniStickerType":1,"AniStickerPackId":"1","AniStickerId":"10","Input":["qingzhu","qz"]},{"QSid":"321","QDes":"/老色痞","IQLid":"321","AQLid":"321","QHide":"1","EMCode":"10321","AniStickerType":1,"AniStickerPackId":"1","AniStickerId":"11","Input":["laosepi","lsp"]},{"QSid":"322","QDes":"/拒绝","IQLid":"322","AQLid":"322","EMCode":"10322","Input":["jujue","jj"]},{"QSid":"323","QDes":"/嫌弃","IQLid":"323","AQLid":"323","EMCode":"10323","Input":["xianqi","xq"]},{"QSid":"324","QDes":"/吃糖","IQLid":"324","AQLid":"324","EMCode":"10324","AniStickerType":1,"AniStickerPackId":"1","AniStickerId":"12"},{"QSid":"325","QDes":"/惊吓","IQLid":"325","AQLid":"325","EMCode":"10325","AniStickerType":1,"AniStickerPackId":"1","AniStickerId":"14"},{"QSid":"326","QDes":"/生气","IQLid":"326","AQLid":"326","EMCode":"10326","AniStickerType":1,"AniStickerPackId":"1","AniStickerId":"15"},{"QSid":"327","QDes":"/加一","QHide":"1","IQLid":"327","AQLid":"327","EMCode":"10327"},{"QSid":"328","QDes":"/错号","QHide":"1","IQLid":"328","AQLid":"328","EMCode":"10328"},{"QSid":"329","QDes":"/对号","QHide":"1","IQLid":"329","AQLid":"329","EMCode":"10329"},{"QSid":"330","QDes":"/完成","QHide":"1","IQLid":"330","AQLid":"330","EMCode":"10330"},{"QSid":"331","QDes":"/明白","QHide":"1","IQLid":"331","AQLid":"331","EMCode":"10331"},{"QSid":"332","QDes":"/举牌牌","IQLid":"332","AQLid":"332","EMCode":"10332"},{"QSid":"333","QDes":"/烟花","isStatic":"1","IQLid":"333","AQLid":"333","EMCode":"10333","AniStickerType":1,"AniStickerPackId":"1","AniStickerId":"19"},{"QSid":"334","QDes":"/虎虎生威","IQLid":"334","AQLid":"334","EMCode":"10334","isStatic":"1"},{"QSid":"336","QDes":"/豹富","IQLid":"336","AQLid":"336","EMCode":"10336","isStatic":"1"},{"QSid":"337","QDes":"/花朵脸","IQLid":"337","AQLid":"337","EMCode":"10337","AniStickerType":1,"AniStickerPackId":"1","AniStickerId":"22"},{"QSid":"338","QDes":"/我想开了","IQLid":"338","AQLid":"338","EMCode":"10338","AniStickerType":1,"AniStickerPackId":"1","AniStickerId":"20"},{"QSid":"339","QDes":"/舔屏","IQLid":"339","AQLid":"339","EMCode":"10339","AniStickerType":1,"AniStickerPackId":"1","AniStickerId":"21"},{"QSid":"340","QDes":"/热化了","IQLid":"340","AQLid":"340","QHide":"1","EMCode":"10340","AniStickerType":1,"AniStickerPackId":"1","AniStickerId":"23"},{"QSid":"341","QDes":"/打招呼","IQLid":"341","AQLid":"341","EMCode":"10341","AniStickerType":1,"AniStickerPackId":"1","AniStickerId":"24"},{"QSid":"342","QDes":"/酸Q","IQLid":"342","AQLid":"342","EMCode":"10342","AniStickerType":1,"AniStickerPackId":"1","AniStickerId":"26"},{"QSid":"343","QDes":"/我方了","IQLid":"343","AQLid":"343","EMCode":"10343","AniStickerType":1,"AniStickerPackId":"1","AniStickerId":"27"},{"QSid":"344","QDes":"/大怨种","IQLid":"344","AQLid":"344","EMCode":"10344","AniStickerType":1,"AniStickerPackId":"1","AniStickerId":"28"},{"QSid":"345","QDes":"/红包多多","IQLid":"345","AQLid":"345","EMCode":"10345","AniStickerType":1,"AniStickerPackId":"1","AniStickerId":"29"},{"QSid":"346","QDes":"/你真棒棒","IQLid":"346","AQLid":"346","EMCode":"10346","AniStickerType":1,"AniStickerPackId":"1","AniStickerId":"25"},{"QSid":"347","QDes":"/大展宏兔","IQLid":"347","AQLid":"347","EMCode":"10347","isStatic":"1"},{"QSid":"348","QDes":"/福萝卜","IQLid":"348","AQLid":"348","EMCode":"10348","isStatic":"1"}]');var GP,RX;function Blt(){if(RX)return GP;RX=1;const r=jlt;function e(a){return a=String(a),r.find(i=>i.QSid===a)}function t(a){a[0]==="/"&&(a=a.substring(1));const i=r.find(o=>o.QDes.substring(1)===a)||r.find(o=>o.Input.includes(a))||r.find(o=>o.Input.some(s=>s.startsWith(a)));return i?i.QSid:null}function n(a,i="https://koishi.js.org/QFace"){const o=e(a);return o?i+(o.isStatic?`/static/s${a}.png`:`/gif/s${a}.gif`):""}return GP={data:r,get:e,getUrl:n,getByText:t},GP}var NX=Blt();const OX=NX.data.map(r=>({alt:r.QDes,src:NX.getUrl(r.QSid),id:r.QSid})),Vlt=({onInsertEmoji:r,onOpenChange:e})=>{const[t,n]=D.useState([]),[a,i]=D.useState(!1),o=D.useRef(null);D.useEffect(()=>{a&&(n([]),requestAnimationFrame(()=>s()))},[a]);const s=(l=0,u=10)=>{l<OX.length&&(n(c=>[...c,...OX.slice(l,l+u)]),requestAnimationFrame(()=>s(l+u,u)))};return _.jsx("div",{ref:o,children:_.jsxs(ws,{portalContainer:o.current,shouldCloseOnScroll:!1,placement:"top",onOpenChange:l=>{e(l),i(l)},children:[_.jsx(wn,{content:"插入表情",children:_.jsx("div",{className:"max-w-fit",children:_.jsx(xs,{children:_.jsx(Ze,{size:"sm",variant:"light",isIconOnly:!0,radius:"full",children:_.jsx(a1e,{className:"text-xl"})})})})}),_.jsx(bs,{className:"grid grid-cols-8 gap-1 flex-wrap justify-start items-start overflow-y-auto max-w-full max-h-96 p-2",children:t.map(l=>_.jsx(Ze,{color:"primary",variant:"flat",isIconOnly:!0,radius:"full",onPress:()=>r(l),children:_.jsx(ll,{src:l.src,alt:l.alt,className:"w-6 h-6"})},l.id))})]})})};function Flt(r){return rt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4"},child:[]},{tag:"path",attr:{d:"M14 2v4a2 2 0 0 0 2 2h4"},child:[]},{tag:"path",attr:{d:"M3 15h6"},child:[]},{tag:"path",attr:{d:"M6 12v6"},child:[]}]})(r)}const hge=()=>{const[r,e]=D.useState(""),t=D.useRef(null),n=ry(),a=i=>{n([{type:"file",file:i}])};return _.jsxs(_.Fragment,{children:[_.jsxs(ws,{children:[_.jsx(wn,{content:"发送文件",children:_.jsx("div",{className:"max-w-fit",children:_.jsx(xs,{children:_.jsx(Ze,{size:"sm",variant:"light",isIconOnly:!0,radius:"full",children:_.jsx(Uwe,{className:"text-lg"})})})})}),_.jsxs(bs,{className:"flex-row gap-2 p-4",children:[_.jsx(wn,{content:"上传文件",children:_.jsx(Ze,{className:"text-lg",color:"primary",isIconOnly:!0,variant:"flat",radius:"full",onPress:()=>{var i;(i=t==null?void 0:t.current)==null||i.click()},children:_.jsx(VA,{})})}),_.jsxs(ws,{children:[_.jsx(wn,{content:"输入文件地址",children:_.jsx("div",{className:"max-w-fit",children:_.jsx(xs,{tooltip:"输入文件地址",children:_.jsx(Ze,{className:"text-lg",color:"primary",isIconOnly:!0,variant:"flat",radius:"full",children:_.jsx(FA,{})})})})}),_.jsxs(bs,{className:"flex-row gap-1 p-2",children:[_.jsx(Va,{value:r,onChange:i=>e(i.target.value),placeholder:"请输入文件地址"}),_.jsx(Ze,{color:"primary",variant:"flat",isIconOnly:!0,radius:"full",onPress:()=>{if(!v0(r)){Da.error("请输入正确的文件地址");return}a(r),e("")},children:_.jsx(Flt,{})})]})]})]})]}),_.jsx("input",{type:"file",ref:t,hidden:!0,className:"hidden",onChange:i=>{var l;const o=(l=i.target.files)==null?void 0:l[0];if(!o)return;const s=new FileReader;s.readAsDataURL(o),s.onload=u=>{var d;const c=(d=u.target)==null?void 0:d.result;a(c),i.target.value=""}}})]})},Hlt=({insertImage:r,onOpenChange:e})=>{const[t,n]=D.useState(""),a=D.useRef(null);return _.jsxs(_.Fragment,{children:[_.jsxs(ws,{onOpenChange:e,children:[_.jsx(wn,{content:"插入图片",children:_.jsx("div",{className:"max-w-fit",children:_.jsx(xs,{children:_.jsx(Ze,{size:"sm",variant:"light",isIconOnly:!0,radius:"full",children:_.jsx(r1e,{className:"text-xl"})})})})}),_.jsxs(bs,{className:"flex-row gap-2 p-4",children:[_.jsx(wn,{content:"上传图片",children:_.jsx(Ze,{className:"text-lg",color:"primary",isIconOnly:!0,variant:"flat",radius:"full",onPress:()=>{var i;(i=a==null?void 0:a.current)==null||i.click()},children:_.jsx(VA,{})})}),_.jsxs(ws,{children:[_.jsx(wn,{content:"输入图片地址",children:_.jsx("div",{className:"max-w-fit",children:_.jsx(xs,{tooltip:"输入图片地址",children:_.jsx(Ze,{className:"text-lg",color:"primary",isIconOnly:!0,variant:"flat",radius:"full",children:_.jsx(FA,{})})})})}),_.jsxs(bs,{className:"flex-row gap-1 p-2",children:[_.jsx(Va,{value:t,onChange:i=>n(i.target.value),placeholder:"请输入图片地址"}),_.jsx(Ze,{color:"primary",variant:"flat",isIconOnly:!0,radius:"full",onPress:()=>{if(!v0(t)){Da.error("请输入正确的图片地址");return}r(t),n("")},children:_.jsx(t1e,{})})]})]})]})]}),_.jsx("input",{type:"file",ref:a,hidden:!0,accept:"image/*",className:"hidden",onChange:i=>{var l;const o=(l=i.target.files)==null?void 0:l[0];if(!o)return;const s=new FileReader;s.readAsDataURL(o),s.onload=u=>{var d;const c=(d=u.target)==null?void 0:d.result;r(c),i.target.value=""}}})]})},pge=()=>{const[r,e]=D.useState(""),[t,n]=D.useState(new Set(["163"])),[a,i]=D.useState("default"),o=D.useRef(null),{control:s,handleSubmit:l,reset:u}=vO({defaultValues:{url:"",audio:"",title:""}}),c=ry(),d=h=>{const v=[];h.platform==="custom"?v.push({...h,type:"music"}):v.push({...h,type:"music"}),c(v)},f=h=>{d({...h,type:"music"}),u()};return _.jsx("div",{ref:o,className:"overflow-visible",children:_.jsxs(ws,{placement:"top",shouldCloseOnScroll:!1,portalContainer:o.current,children:[_.jsx(wn,{content:"发送音乐",children:_.jsx("div",{className:"max-w-fit",children:_.jsx(xs,{children:_.jsx(Ze,{size:"sm",variant:"light",isIconOnly:!0,radius:"full",children:_.jsx(F5e,{className:"text-xl"})})})})}),_.jsx(bs,{className:"gap-2 p-4",children:_.jsxs(Ihe,{placement:"top",className:"w-96",fullWidth:!0,selectedKey:a,onSelectionChange:i,children:[_.jsxs(Hl,{title:"主流平台",className:"flex flex-col gap-2",children:[_.jsx(_he,{onClick:h=>h.stopPropagation(),"aria-label":"音乐平台",selectedKeys:t,label:"音乐平台",placeholder:"请选择音乐平台",items:[{name:"QQ音乐",id:"qq"},{name:"网易云音乐",id:"163"},{name:"虾米音乐",id:"xm"}],onSelectionChange:n,children:h=>_.jsx(ohe,{value:h.id,children:h.name},h.id)}),_.jsx(Va,{value:r,onChange:h=>e(h.target.value),placeholder:"请输入音乐ID",label:"音乐ID"}),_.jsxs(Ze,{fullWidth:!0,size:"lg",color:"primary",variant:"flat",radius:"full",onPress:()=>{if(!r){Da.error("请输入音乐ID");return}d({type:"music",id:r,platform:Array.from(t)[0]}),e("")},startContent:_.jsx(XY,{}),children:["创建",Array.from(t)[0]==="163"?"网易云":"QQ","音乐"]})]},"default"),_.jsx(Hl,{title:"自定义音乐",className:"flex flex-col gap-2",children:_.jsxs(nfe,{onSubmit:l(f),className:"flex flex-col gap-2",validationBehavior:"native",children:[_.jsx(om,{name:"url",control:s,render:({field:h})=>_.jsx(Va,{...h,isRequired:!0,validate:v=>v0(v)?null:"请输入正确的音乐URL",size:"sm",placeholder:"请输入音乐URL",label:"音乐URL"})}),_.jsx(om,{name:"audio",control:s,render:({field:h})=>_.jsx(Va,{...h,isRequired:!0,validate:v=>v0(v)?null:"请输入正确的音频URL",size:"sm",placeholder:"请输入音频URL",label:"音频URL"})}),_.jsx(om,{name:"title",control:s,render:({field:h})=>_.jsx(Va,{...h,isRequired:!0,size:"sm",errorMessage:"请输入音乐标题",placeholder:"请输入音乐标题",label:"音乐标题"})}),_.jsx(om,{name:"pic",control:s,render:({field:h})=>_.jsx(Va,{...h,size:"sm",placeholder:"请输入封面图片URL",label:"封面图片URL"})}),_.jsx(om,{name:"author",control:s,render:({field:h})=>_.jsx(Va,{...h,size:"sm",placeholder:"请输入音乐作者",label:"音乐作者"})}),_.jsx(Ze,{fullWidth:!0,size:"lg",color:"primary",variant:"flat",radius:"full",type:"submit",startContent:_.jsx(XY,{}),children:"创建自定义音乐"})]})},"custom")]})})]})})},vge=({insertReply:r})=>{const[e,t]=D.useState("");return _.jsx(_.Fragment,{children:_.jsxs(ws,{children:[_.jsx(wn,{content:"回复消息",children:_.jsx("div",{className:"max-w-fit",children:_.jsx(xs,{children:_.jsx(Ze,{size:"sm",variant:"light",isIconOnly:!0,radius:"full",children:_.jsx(d1e,{className:"text-lg"})})})})}),_.jsxs(bs,{className:"flex-row gap-2 p-4",children:[_.jsx(Va,{placeholder:"输入消息 ID",value:e,onChange:n=>{const a=n.target.value;/^(?:0|(?:-?[1-9]\d*))$/.test(a)&&t(a)}}),_.jsx(Ze,{color:"primary",variant:"flat",radius:"full",isIconOnly:!0,onPress:()=>{r(e),t("")},children:_.jsx(BR,{})})]})]})})};function Ult(r){return rt({attr:{viewBox:"0 0 32 32"},child:[{tag:"path",attr:{d:"M 11.40625 6.96875 C 10.578125 6.953125 9.890625 7.125 9.46875 7.25 C 9.457031 7.25 9.449219 7.25 9.4375 7.25 L 6.9375 8.03125 C 4.003906 8.933594 2 11.652344 2 14.71875 L 2 20 C 2 23.855469 5.144531 27 9 27 L 18.90625 27 C 20.125 27.027344 21.304688 26.3125 21.78125 25.125 C 22.082031 24.371094 22.039063 23.578125 21.75 22.875 C 22.363281 22.550781 22.882813 22.027344 23.15625 21.34375 C 23.46875 20.558594 23.417969 19.722656 23.09375 19 L 27 19 C 28.644531 19 30 17.644531 30 16 C 30 14.355469 28.644531 13 27 13 L 25.46875 13 L 25.875 12.875 C 27.449219 12.398438 28.351563 10.699219 27.875 9.125 C 27.398438 7.550781 25.699219 6.648438 24.125 7.125 L 15.6875 9.71875 C 15.613281 9.53125 15.527344 9.328125 15.40625 9.125 C 14.90625 8.289063 13.894531 7.34375 12.28125 7.0625 C 11.980469 7.011719 11.683594 6.972656 11.40625 6.96875 Z M 25.125 9 C 25.515625 9.042969 25.847656 9.3125 25.96875 9.71875 C 26.132813 10.257813 25.820313 10.804688 25.28125 10.96875 L 18.4375 13.03125 L 18.78125 14.15625 L 18.78125 15 L 27 15 C 27.566406 15 28 15.433594 28 16 C 28 16.566406 27.566406 17 27 17 L 20.40625 17 L 17.78125 15.96875 C 17.402344 15.816406 17.011719 15.742188 16.625 15.75 L 16.09375 11.65625 L 24.71875 9.03125 C 24.855469 8.988281 24.996094 8.984375 25.125 9 Z M 11.375 9.03125 C 11.566406 9.03125 11.765625 9.03125 11.9375 9.0625 C 13.011719 9.25 13.425781 9.71875 13.6875 10.15625 C 13.949219 10.59375 13.96875 10.90625 13.96875 10.90625 C 13.96875 10.925781 13.96875 10.949219 13.96875 10.96875 L 14.8125 17.40625 C 14.820313 17.4375 14.832031 17.46875 14.84375 17.5 C 14.96875 18.027344 14.652344 18.53125 14.125 18.65625 C 13.800781 18.734375 13.636719 18.691406 13.46875 18.59375 C 13.300781 18.496094 13.09375 18.289063 12.9375 17.84375 L 11.6875 13 C 11.609375 12.703125 11.398438 12.460938 11.121094 12.339844 C 10.839844 12.21875 10.519531 12.230469 10.25 12.375 L 8.59375 13.28125 C 8.109375 13.546875 7.933594 14.15625 8.203125 14.640625 C 8.46875 15.125 9.078125 15.300781 9.5625 15.03125 L 10.0625 14.75 L 11.03125 18.4375 C 11.039063 18.46875 11.050781 18.5 11.0625 18.53125 C 11.332031 19.304688 11.792969 19.925781 12.4375 20.3125 C 12.964844 20.628906 13.578125 20.75 14.1875 20.6875 C 13.871094 20.980469 13.609375 21.355469 13.4375 21.78125 C 12.980469 22.925781 13.269531 24.183594 14.09375 25 L 9 25 C 6.226563 25 4 22.773438 4 20 L 4 14.71875 C 4 12.519531 5.429688 10.585938 7.53125 9.9375 L 10.03125 9.1875 C 10.234375 9.125 10.804688 9.03125 11.375 9.03125 Z M 16.8125 17.78125 C 16.886719 17.792969 16.957031 17.78125 17.03125 17.8125 L 20.75 19.3125 C 21.273438 19.523438 21.523438 20.070313 21.3125 20.59375 C 21.101563 21.117188 20.523438 21.367188 20 21.15625 L 16.28125 19.6875 C 16.226563 19.667969 16.203125 19.621094 16.15625 19.59375 C 16.550781 19.085938 16.804688 18.445313 16.8125 17.78125 Z M 16.1875 21.90625 C 16.320313 21.90625 16.460938 21.917969 16.59375 21.96875 L 17.9375 22.5 L 19.25 23.03125 L 19.375 23.0625 C 19.898438 23.273438 20.148438 23.851563 19.9375 24.375 C 19.785156 24.757813 19.445313 24.980469 19.0625 25 C 19.050781 25 19.042969 25 19.03125 25 C 18.898438 25.003906 18.757813 24.988281 18.625 24.9375 L 15.84375 23.8125 C 15.320313 23.601563 15.070313 23.023438 15.28125 22.5 C 15.386719 22.238281 15.578125 22.070313 15.8125 21.96875 C 15.929688 21.917969 16.054688 21.90625 16.1875 21.90625 Z"},child:[]}]})(r)}const gge=()=>{const r=ry();return _.jsx(wn,{content:"发送猜拳",children:_.jsx(Ze,{size:"sm",variant:"light",isIconOnly:!0,radius:"full",onPress:()=>{r([{type:"rps",id:1}])},children:_.jsx(Ult,{className:"text-2xl"})})})},mge=()=>{const[r,e]=D.useState(""),t=D.useRef(null),n=ry(),a=i=>{n([{type:"video",file:i}])};return _.jsxs(_.Fragment,{children:[_.jsxs(ws,{children:[_.jsx(wn,{content:"发送视频",children:_.jsx("div",{className:"max-w-fit",children:_.jsx(xs,{children:_.jsx(Ze,{size:"sm",variant:"light",isIconOnly:!0,radius:"full",children:_.jsx(G5e,{className:"text-xl"})})})})}),_.jsxs(bs,{className:"flex-row gap-2 p-4",children:[_.jsx(wn,{content:"上传视频",children:_.jsx(Ze,{className:"text-lg",color:"primary",isIconOnly:!0,variant:"flat",radius:"full",onPress:()=>{var i;(i=t==null?void 0:t.current)==null||i.click()},children:_.jsx(VA,{})})}),_.jsxs(ws,{children:[_.jsx(wn,{content:"输入视频地址",children:_.jsx("div",{className:"max-w-fit",children:_.jsx(xs,{tooltip:"输入视频地址",children:_.jsx(Ze,{className:"text-lg",color:"primary",isIconOnly:!0,variant:"flat",radius:"full",children:_.jsx(FA,{})})})})}),_.jsxs(bs,{className:"flex-row gap-1 p-2",children:[_.jsx(Va,{value:r,onChange:i=>e(i.target.value),placeholder:"请输入视频地址"}),_.jsx(Ze,{color:"primary",variant:"flat",isIconOnly:!0,radius:"full",onPress:()=>{if(!v0(r)){Da.error("请输入正确的视频地址");return}a(r),e("")},children:_.jsx(aZe,{})})]})]})]})]}),_.jsx("input",{type:"file",ref:t,hidden:!0,accept:"video/*",className:"hidden",onChange:i=>{var l;const o=(l=i.target.files)==null?void 0:l[0];if(!o)return;const s=new FileReader;s.readAsDataURL(o),s.onload=u=>{var d;const c=(d=u.target)==null?void 0:d.result;a(c),i.target.value=""}}})]})},Glt=$e.import("blots/embed"),Im=class Im extends Glt{static create(e){const t=super.create(e);return t.setAttribute("alt",e.alt),t.setAttribute("src",e.src),t.setAttribute("data-id",e.id),t.classList.add(...Im.classNames),t}static formats(e){return{alt:e.getAttribute("alt")??"",src:e.getAttribute("src")??"",id:e.getAttribute("data-id")??""}}static value(e){return{alt:e.getAttribute("alt")??"",src:e.getAttribute("src")??"",id:e.getAttribute("data-id")??""}}};We(Im,"blotName","emoji"),We(Im,"tagName","img"),We(Im,"classNames",["w-6","h-6","-mt-1","inline-block"]);let NA=Im;const qlt=$e.import("blots/block/embed"),km=class km extends qlt{static create(e){const t=super.create();t.setAttribute("data-message-id",e.messageId),t.setAttribute("contenteditable","false"),t.classList.add(...km.classNames);const n=document.createElement("div");n.classList.add("text-sm","text-default-500","relative");const a=document.createElement("div");a.classList.add("w-3","h-3","absolute","top-0","right-0");const i='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <path d="M15.9082 12.3714H20.5982C20.5182 17.0414 19.5982 17.8114 16.7282 19.5114C16.3982 19.7114 16.2882 20.1314 16.4882 20.4714C16.6882 20.8014 17.1082 20.9114 17.4482 20.7114C20.8282 18.7114 22.0082 17.4914 22.0082 11.6714V6.28141C22.0082 4.57141 20.6182 3.19141 18.9182 3.19141H15.9182C14.1582 3.19141 12.8282 4.52141 12.8282 6.28141V9.28141C12.8182 11.0414 14.1482 12.3714 15.9082 12.3714Z" fill="#292D32"></path> <path d="M5.09 12.3714H9.78C9.7 17.0414 8.78 17.8114 5.91 19.5114C5.58 19.7114 5.47 20.1314 5.67 20.4714C5.87 20.8014 6.29 20.9114 6.63 20.7114C10.01 18.7114 11.19 17.4914 11.19 11.6714V6.28141C11.19 4.57141 9.8 3.19141 8.1 3.19141H5.1C3.33 3.19141 2 4.52141 2 6.28141V9.28141C2 11.0414 3.33 12.3714 5.09 12.3714Z" fill="#292D32"></path> </g></svg>';return a.innerHTML=i,n.innerHTML=`消息ID:${e.messageId}`,n.appendChild(a),t.appendChild(n),t}static value(e){return{messageId:e.getAttribute("data-message-id")||""}}};We(km,"blotName","reply"),We(km,"tagName","div"),We(km,"classNames",["p-2","select-none","bg-default-100","rounded-md","pointer-events-none"]);let OA=km;const Qlt=$e.import("blots/embed"),Rm=class Rm extends Qlt{static create(e){let t=super.create();return t.setAttribute("alt",e.alt),t.setAttribute("src",e.src),t.classList.add(...Rm.classNames),t}static value(e){return{alt:e.getAttribute("alt")??"",src:e.getAttribute("src")??""}}};We(Rm,"blotName","image"),We(Rm,"tagName","img"),We(Rm,"classNames",["max-w-48","max-h-48","align-bottom"]);let PR=Rm;const Wlt=async(r,e)=>(await or.post("/api/v1/sandbox/msg/create",{type:r,targetId:e})).data.data,Klt=()=>({sendMessage:D.useCallback(async e=>{const{type:t,targetId:n,elements:a}=e,{seq:i,time:o,messageId:s}=await Wlt(t,n),l={type:t,seq:i,messageId:s,time:o,sender:{id:n,name:"Bot",role:"member"},...t==="group"?{groupId:n,groupName:"群聊"}:{},elements:a};return(await or.post("/api/v1/sandbox/webhook",l)).data},[])}),Ylt=()=>{const r=D.useRef(null),e=["image","emoji","reply"],t={toolbar:"#toolbar"},n=D.useRef(!1),{quillRef:a,quill:i,Quill:o}=Llt({modules:t,formats:e,placeholder:""}),{sendMessage:s}=Klt(),{type:l="friend",id:u}=NR();D.useEffect(()=>{n.current||(o.register({"formats/emoji":NA,"formats/reply":OA}),n.current=!0),a.current},[]),o&&!i&&!n.current&&(o.register("formats/emoji",NA),o.register("formats/image",PR,!0),o.register("formats/reply",OA),n.current=!0),i&&(i.on("selection-change",y=>{var b;if(y){const S=i.getContents().ops[0];typeof(S==null?void 0:S.insert)!="string"&&((b=S==null?void 0:S.insert)!=null&&b.reply)&&y.index===0&&y.length!==i.getLength()&&i.setSelection(1,o.sources.SILENT)}}),i.on("text-change",()=>{var w;const b=i.getContents().ops[0];b&&typeof b.insert!="string"&&((w=b.insert)!=null&&w.reply)&&i.getLength()===1&&i.insertText(1,`
|
|
455
455
|
`,o.sources.SILENT)}),i.on("editor-change",y=>{var b;if(y==="text-change"){const S=i.getContents().ops[0];S&&typeof S.insert!="string"&&((b=S.insert)!=null&&b.reply)&&i.getLength()===1&&i.insertText(1,`
|
|
456
456
|
`,o.sources.SILENT)}}),i.root.addEventListener("compositionstart",()=>{var w;const b=i.getContents().ops[0];b&&typeof b.insert!="string"&&((w=b.insert)!=null&&w.reply)&&i.getLength()===1&&i.insertText(1,`
|