@hienlh/ppm 0.7.41 → 0.8.0
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/CHANGELOG.md +19 -0
- package/dist/web/assets/chat-tab-LTwYS5_e.js +7 -0
- package/dist/web/assets/{code-editor-CaKnPjkU.js → code-editor-BakDn6rL.js} +1 -1
- package/dist/web/assets/{database-viewer-DUAq3r2M.js → database-viewer-COaZMlpv.js} +1 -1
- package/dist/web/assets/{diff-viewer-C6w7tDMN.js → diff-viewer-COSbmidI.js} +1 -1
- package/dist/web/assets/git-graph-CKoW0Ky-.js +1 -0
- package/dist/web/assets/index-BGTzm7B1.js +28 -0
- package/dist/web/assets/index-CeNox-VV.css +2 -0
- package/dist/web/assets/input-CE3bFwLk.js +41 -0
- package/dist/web/assets/keybindings-store-FQhxQ72s.js +1 -0
- package/dist/web/assets/{markdown-renderer-Ckj0mfYc.js → markdown-renderer-BKgH2iGf.js} +1 -1
- package/dist/web/assets/{postgres-viewer-m6qNfnAF.js → postgres-viewer-DBOv2ha2.js} +1 -1
- package/dist/web/assets/settings-tab-BZqkWI4u.js +1 -0
- package/dist/web/assets/{sqlite-viewer-6d233-2k.js → sqlite-viewer-BY242odW.js} +1 -1
- package/dist/web/assets/switch-BEmt1alu.js +1 -0
- package/dist/web/assets/{terminal-tab-BaHGzGJ6.js → terminal-tab-BiUqECPk.js} +1 -1
- package/dist/web/index.html +4 -4
- package/dist/web/sw.js +1 -1
- package/package.json +1 -1
- package/src/providers/claude-agent-sdk.ts +108 -64
- package/src/providers/mock-provider.ts +1 -0
- package/src/providers/provider.interface.ts +1 -0
- package/src/server/routes/git.ts +16 -2
- package/src/server/ws/chat.ts +43 -26
- package/src/services/chat.service.ts +3 -1
- package/src/services/git.service.ts +45 -8
- package/src/types/api.ts +1 -1
- package/src/types/chat.ts +5 -0
- package/src/types/config.ts +21 -0
- package/src/types/git.ts +4 -0
- package/src/web/components/chat/chat-tab.tsx +26 -8
- package/src/web/components/chat/message-input.tsx +61 -1
- package/src/web/components/chat/message-list.tsx +9 -1
- package/src/web/components/chat/mode-selector.tsx +117 -0
- package/src/web/components/git/git-graph-branch-label.tsx +124 -0
- package/src/web/components/git/git-graph-constants.ts +185 -0
- package/src/web/components/git/git-graph-detail.tsx +107 -0
- package/src/web/components/git/git-graph-dialog.tsx +72 -0
- package/src/web/components/git/git-graph-row.tsx +167 -0
- package/src/web/components/git/git-graph-settings-dialog.tsx +104 -0
- package/src/web/components/git/git-graph-svg.tsx +54 -0
- package/src/web/components/git/git-graph-toolbar.tsx +195 -0
- package/src/web/components/git/git-graph.tsx +143 -681
- package/src/web/components/git/use-column-resize.ts +33 -0
- package/src/web/components/git/use-git-graph.ts +201 -0
- package/src/web/components/settings/ai-settings-section.tsx +42 -0
- package/src/web/hooks/use-chat.ts +3 -3
- package/src/web/lib/api-settings.ts +2 -0
- package/dist/web/assets/chat-tab-BoeC0a0w.js +0 -7
- package/dist/web/assets/git-graph-9GFTfA5p.js +0 -1
- package/dist/web/assets/index-CSS8Cy7l.css +0 -2
- package/dist/web/assets/index-CetGEOKq.js +0 -28
- package/dist/web/assets/input-CVIzrYsH.js +0 -41
- package/dist/web/assets/keybindings-store-DiEM7YZ4.js +0 -1
- package/dist/web/assets/settings-tab-Di-E48kC.js +0 -1
- package/dist/web/assets/switch-UODDpwuO.js +0 -1
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import{i as e,n as t,t as n}from"./react-CYzKIDNi.js";import{n as r,t as i}from"./jsx-runtime-wQxeESYQ.js";import{n as a}from"./utils-DC-bdPS3.js";var o=t((e=>{var t=n();function r(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function i(){}var a={d:{f:i,r:function(){throw Error(r(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(r(299));return s(e,t,null,n)},e.flushSync=function(e){var t=c.T,n=a.p;try{if(c.T=null,a.p=2,e)return e()}finally{c.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??a.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=l(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else a.d.m(e)},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.4`})),s=t(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=o()})),c=r(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),l=r(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),u=e(n(),1);function d(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function f(...e){return t=>{let n=!1,r=e.map(e=>{let r=d(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():d(e[t],null)}}}}function p(...e){return u.useCallback(f(...e),e)}var m=i();function h(e){let t=_(e),n=u.forwardRef((e,n)=>{let{children:r,...i}=e,a=u.Children.toArray(r),o=a.find(b);if(o){let e=o.props.children,r=a.map(t=>t===o?u.Children.count(e)>1?u.Children.only(null):u.isValidElement(e)?e.props.children:null:t);return(0,m.jsx)(t,{...i,ref:n,children:u.isValidElement(e)?u.cloneElement(e,void 0,r):null})}return(0,m.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var g=h(`Slot`);function _(e){let t=u.forwardRef((e,t)=>{let{children:n,...r}=e;if(u.isValidElement(n)){let e=S(n),i=x(r,n.props);return n.type!==u.Fragment&&(i.ref=t?f(t,e):e),u.cloneElement(n,i)}return u.Children.count(n)>1?u.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var v=Symbol(`radix.slottable`);function y(e){let t=({children:e})=>(0,m.jsx)(m.Fragment,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=v,t}function b(e){return u.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===v}function x(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function S(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var C=e(s(),1),w=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=h(`Primitive.${t}`),r=u.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,m.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function T(e,t){e&&C.flushSync(()=>e.dispatchEvent(t))}function E(e,t){let n=u.createContext(t),r=e=>{let{children:t,...r}=e,i=u.useMemo(()=>r,Object.values(r));return(0,m.jsx)(n.Provider,{value:i,children:t})};r.displayName=e+`Provider`;function i(r){let i=u.useContext(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,i]}function D(e,t=[]){let n=[];function r(t,r){let i=u.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=u.useMemo(()=>o,Object.values(o));return(0,m.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=u.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>u.createContext(e));return function(n){let r=n?.[e]||t;return u.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,O(i,...t)]}function O(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return u.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}function k(e){let t=e+`CollectionProvider`,[n,r]=D(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=u.useRef(null),a=u.useRef(new Map).current;return(0,m.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=h(s),l=u.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,m.jsx)(c,{ref:p(t,a(s,n).collectionRef),children:r})});l.displayName=s;let d=e+`CollectionItemSlot`,f=`data-radix-collection-item`,g=h(d),_=u.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=u.useRef(null),s=p(t,o),c=a(d,n);return u.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,m.jsx)(g,{[f]:``,ref:s,children:r})});_.displayName=d;function v(t){let n=a(e+`CollectionConsumer`,t);return u.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${f}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:_},v,r]}typeof window<`u`&&window.document&&window.document.createElement;function A(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var j=globalThis?.document?u.useLayoutEffect:()=>{},M=u.useInsertionEffect||j;function N({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=P({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=u.useRef(e!==void 0);u.useEffect(()=>{let e=t.current;if(e!==s){let t=e?`controlled`:`uncontrolled`,n=s?`controlled`:`uncontrolled`;console.warn(`${r} is changing from ${t} to ${n}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=s},[s,r])}return[c,u.useCallback(t=>{if(s){let n=ee(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function P({defaultProp:e,onChange:t}){let[n,r]=u.useState(e),i=u.useRef(n),a=u.useRef(t);return M(()=>{a.current=t},[t]),u.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function ee(e){return typeof e==`function`}var te=u.useId||(()=>void 0),ne=0;function re(e){let[t,n]=u.useState(te());return j(()=>{e||n(e=>e??String(ne++))},[e]),e||(t?`radix-${t}`:``)}var F=u.createContext(void 0);function ie(e){let t=u.useContext(F);return e||t||`ltr`}function I(e){let t=u.useRef(e);return u.useEffect(()=>{t.current=e}),u.useMemo(()=>(...e)=>t.current?.(...e),[])}function ae(e,t=globalThis?.document){let n=I(e);u.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var oe=`DismissableLayer`,se=`dismissableLayer.update`,ce=`dismissableLayer.pointerDownOutside`,le=`dismissableLayer.focusOutside`,ue,de=u.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),fe=u.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=u.useContext(de),[d,f]=u.useState(null),h=d?.ownerDocument??globalThis?.document,[,g]=u.useState({}),_=p(t,e=>f(e)),v=Array.from(l.layers),[y]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),b=v.indexOf(y),x=d?v.indexOf(d):-1,S=l.layersWithOutsidePointerEventsDisabled.size>0,C=x>=b,T=he(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!C||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},h),E=ge(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},h);return ae(e=>{x===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},h),u.useEffect(()=>{if(d)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(ue=h.body.style.pointerEvents,h.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(d)),l.layers.add(d),_e(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=ue)}},[d,h,n,l]),u.useEffect(()=>()=>{d&&(l.layers.delete(d),l.layersWithOutsidePointerEventsDisabled.delete(d),_e())},[d,l]),u.useEffect(()=>{let e=()=>g({});return document.addEventListener(se,e),()=>document.removeEventListener(se,e)},[]),(0,m.jsx)(w.div,{...c,ref:_,style:{pointerEvents:S?C?`auto`:`none`:void 0,...e.style},onFocusCapture:A(e.onFocusCapture,E.onFocusCapture),onBlurCapture:A(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:A(e.onPointerDownCapture,T.onPointerDownCapture)})});fe.displayName=oe;var pe=`DismissableLayerBranch`,me=u.forwardRef((e,t)=>{let n=u.useContext(de),r=u.useRef(null),i=p(t,r);return u.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,m.jsx)(w.div,{...e,ref:i})});me.displayName=pe;function he(e,t=globalThis?.document){let n=I(e),r=u.useRef(!1),i=u.useRef(()=>{});return u.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){ve(ce,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function ge(e,t=globalThis?.document){let n=I(e),r=u.useRef(!1);return u.useEffect(()=>{let e=e=>{e.target&&!r.current&&ve(le,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function _e(){let e=new CustomEvent(se);document.dispatchEvent(e)}function ve(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?T(i,a):i.dispatchEvent(a)}var ye=`focusScope.autoFocusOnMount`,be=`focusScope.autoFocusOnUnmount`,xe={bubbles:!1,cancelable:!0},Se=`FocusScope`,Ce=u.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=u.useState(null),l=I(i),d=I(a),f=u.useRef(null),h=p(t,e=>c(e)),g=u.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;u.useEffect(()=>{if(r){let e=function(e){if(g.paused||!s)return;let t=e.target;s.contains(t)?f.current=t:L(f.current,{select:!0})},t=function(e){if(g.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||L(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&L(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,g.paused]),u.useEffect(()=>{if(s){Ae.add(g);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(ye,xe);s.addEventListener(ye,l),s.dispatchEvent(t),t.defaultPrevented||(we(Ne(Ee(s)),{select:!0}),document.activeElement===e&&L(s))}return()=>{s.removeEventListener(ye,l),setTimeout(()=>{let t=new CustomEvent(be,xe);s.addEventListener(be,d),s.dispatchEvent(t),t.defaultPrevented||L(e??document.body,{select:!0}),s.removeEventListener(be,d),Ae.remove(g)},0)}}},[s,l,d,g]);let _=u.useCallback(e=>{if(!n&&!r||g.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=Te(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&L(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&L(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,g.paused]);return(0,m.jsx)(w.div,{tabIndex:-1,...o,ref:h,onKeyDown:_})});Ce.displayName=Se;function we(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(L(r,{select:t}),document.activeElement!==n)return}function Te(e){let t=Ee(e);return[De(t,e),De(t.reverse(),e)]}function Ee(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function De(e,t){for(let n of e)if(!Oe(n,{upTo:t}))return n}function Oe(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function ke(e){return e instanceof HTMLInputElement&&`select`in e}function L(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&ke(e)&&t&&e.select()}}var Ae=je();function je(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Me(e,t),e.unshift(t)},remove(t){e=Me(e,t),e[0]?.resume()}}}function Me(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Ne(e){return e.filter(e=>e.tagName!==`A`)}var Pe=`Portal`,Fe=u.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=u.useState(!1);j(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?C.createPortal((0,m.jsx)(w.div,{...r,ref:t}),o):null});Fe.displayName=Pe;var Ie=0;function Le(){u.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??Re()),document.body.insertAdjacentElement(`beforeend`,e[1]??Re()),Ie++,()=>{Ie===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),Ie--}},[])}function Re(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var R=function(){return R=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},R.apply(this,arguments)};function ze(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Be(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Ve=`right-scroll-bar-position`,He=`width-before-scroll-bar`,Ue=`with-scroll-bars-hidden`,We=`--removed-body-scroll-bar-size`;function Ge(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Ke(e,t){var n=(0,u.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var qe=typeof window<`u`?u.useLayoutEffect:u.useEffect,Je=new WeakMap;function Ye(e,t){var n=Ke(t||null,function(t){return e.forEach(function(e){return Ge(e,t)})});return qe(function(){var t=Je.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Ge(e,null)}),i.forEach(function(e){r.has(e)||Ge(e,a)})}Je.set(n,e)},[e]),n}function Xe(e){return e}function Ze(e,t){t===void 0&&(t=Xe);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Qe(e){e===void 0&&(e={});var t=Ze(null);return t.options=R({async:!0,ssr:!1},e),t}var $e=function(e){var t=e.sideCar,n=ze(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return u.createElement(r,R({},n))};$e.isSideCarExport=!0;function et(e,t){return e.useMedium(t),$e}var tt=Qe(),nt=function(){},rt=u.forwardRef(function(e,t){var n=u.useRef(null),r=u.useState({onScrollCapture:nt,onWheelCapture:nt,onTouchMoveCapture:nt}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=ze(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=p,C=Ye([n,t]),w=R(R({},x),i);return u.createElement(u.Fragment,null,d&&u.createElement(S,{sideCar:tt,removeScrollBar:l,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!_,lockRef:n,gapMode:b}),o?u.cloneElement(u.Children.only(s),R(R({},w),{ref:C})):u.createElement(y,R({},w,{className:c,ref:C}),s))});rt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},rt.classNames={fullWidth:He,zeroRight:Ve};var it,at=function(){if(it)return it;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function ot(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=at();return t&&e.setAttribute(`nonce`,t),e}function st(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ct(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var lt=function(){var e=0,t=null;return{add:function(n){e==0&&(t=ot())&&(st(t,n),ct(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ut=function(){var e=lt();return function(t,n){u.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},dt=function(){var e=ut();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},ft={left:0,top:0,right:0,gap:0},pt=function(e){return parseInt(e||``,10)||0},mt=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[pt(n),pt(r),pt(i)]},ht=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return ft;var t=mt(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},gt=dt(),_t=`data-scroll-locked`,vt=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
2
|
-
.${Ue} {
|
|
3
|
-
overflow: hidden ${r};
|
|
4
|
-
padding-right: ${s}px ${r};
|
|
5
|
-
}
|
|
6
|
-
body[${_t}] {
|
|
7
|
-
overflow: hidden ${r};
|
|
8
|
-
overscroll-behavior: contain;
|
|
9
|
-
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
10
|
-
padding-left: ${i}px;
|
|
11
|
-
padding-top: ${a}px;
|
|
12
|
-
padding-right: ${o}px;
|
|
13
|
-
margin-left:0;
|
|
14
|
-
margin-top:0;
|
|
15
|
-
margin-right: ${s}px ${r};
|
|
16
|
-
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.${Ve} {
|
|
20
|
-
right: ${s}px ${r};
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.${He} {
|
|
24
|
-
margin-right: ${s}px ${r};
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.${Ve} .${Ve} {
|
|
28
|
-
right: 0 ${r};
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.${He} .${He} {
|
|
32
|
-
margin-right: 0 ${r};
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
body[${_t}] {
|
|
36
|
-
${We}: ${s}px;
|
|
37
|
-
}
|
|
38
|
-
`},yt=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},bt=function(){u.useEffect(function(){return document.body.setAttribute(_t,(yt()+1).toString()),function(){var e=yt()-1;e<=0?document.body.removeAttribute(_t):document.body.setAttribute(_t,e.toString())}},[])},xt=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;bt();var a=u.useMemo(function(){return ht(i)},[i]);return u.createElement(gt,{styles:vt(a,!t,i,n?``:`!important`)})},St=!1;if(typeof window<`u`)try{var Ct=Object.defineProperty({},`passive`,{get:function(){return St=!0,!0}});window.addEventListener(`test`,Ct,Ct),window.removeEventListener(`test`,Ct,Ct)}catch{St=!1}var wt=St?{passive:!1}:!1,Tt=function(e){return e.tagName===`TEXTAREA`},Et=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Tt(e)&&n[t]===`visible`)},Dt=function(e){return Et(e,`overflowY`)},Ot=function(e){return Et(e,`overflowX`)},kt=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),Mt(e,r)){var i=Nt(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},At=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},jt=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Mt=function(e,t){return e===`v`?Dt(t):Ot(t)},Nt=function(e,t){return e===`v`?At(t):jt(t)},Pt=function(e,t){return e===`h`&&t===`rtl`?-1:1},Ft=function(e,t,n,r,i){var a=Pt(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=Nt(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&Mt(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},It=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Lt=function(e){return[e.deltaX,e.deltaY]},Rt=function(e){return e&&`current`in e?e.current:e},zt=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Bt=function(e){return`
|
|
39
|
-
.block-interactivity-${e} {pointer-events: none;}
|
|
40
|
-
.allow-interactivity-${e} {pointer-events: all;}
|
|
41
|
-
`},Vt=0,z=[];function Ht(e){var t=u.useRef([]),n=u.useRef([0,0]),r=u.useRef(),i=u.useState(Vt++)[0],a=u.useState(dt)[0],o=u.useRef(e);u.useEffect(function(){o.current=e},[e]),u.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Be([e.lockRef.current],(e.shards||[]).map(Rt),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=u.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=It(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=kt(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=kt(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Ft(h,t,e,h===`h`?s:c,!0)},[]),c=u.useCallback(function(e){var n=e;if(!(!z.length||z[z.length-1]!==a)){var r=`deltaY`in n?Lt(n):It(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&zt(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(Rt).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=u.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Ut(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),d=u.useCallback(function(e){n.current=It(e),r.current=void 0},[]),f=u.useCallback(function(t){l(t.type,Lt(t),t.target,s(t,e.lockRef.current))},[]),p=u.useCallback(function(t){l(t.type,It(t),t.target,s(t,e.lockRef.current))},[]);u.useEffect(function(){return z.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener(`wheel`,c,wt),document.addEventListener(`touchmove`,c,wt),document.addEventListener(`touchstart`,d,wt),function(){z=z.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,wt),document.removeEventListener(`touchmove`,c,wt),document.removeEventListener(`touchstart`,d,wt)}},[]);var m=e.removeScrollBar,h=e.inert;return u.createElement(u.Fragment,null,h?u.createElement(a,{styles:Bt(i)}):null,m?u.createElement(xt,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ut(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Wt=et(tt,Ht),Gt=u.forwardRef(function(e,t){return u.createElement(rt,R({},e,{ref:t,sideCar:Wt}))});Gt.classNames=rt.classNames;var Kt=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},qt=new WeakMap,Jt=new WeakMap,Yt={},Xt=0,Zt=function(e){return e&&(e.host||Zt(e.parentNode))},Qt=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Zt(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},$t=function(e,t,n,r){var i=Qt(t,Array.isArray(e)?e:[e]);Yt[n]||(Yt[n]=new WeakMap);var a=Yt[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(qt.get(e)||0)+1,l=(a.get(e)||0)+1;qt.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Jt.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Xt++,function(){o.forEach(function(e){var t=qt.get(e)-1,i=a.get(e)-1;qt.set(e,t),a.set(e,i),t||(Jt.has(e)||e.removeAttribute(r),Jt.delete(e)),i||e.removeAttribute(n)}),Xt--,Xt||(qt=new WeakMap,qt=new WeakMap,Jt=new WeakMap,Yt={})}},en=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Kt(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),$t(r,i,n,`aria-hidden`)):function(){return null}};function tn(e){let[t,n]=u.useState(void 0);return j(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var nn=[`top`,`right`,`bottom`,`left`],B=Math.min,V=Math.max,rn=Math.round,an=Math.floor,H=e=>({x:e,y:e}),on={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function sn(e,t,n){return V(e,B(t,n))}function U(e,t){return typeof e==`function`?e(t):e}function W(e){return e.split(`-`)[0]}function cn(e){return e.split(`-`)[1]}function ln(e){return e===`x`?`y`:`x`}function un(e){return e===`y`?`height`:`width`}function G(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function dn(e){return ln(G(e))}function fn(e,t,n){n===void 0&&(n=!1);let r=cn(e),i=dn(e),a=un(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=xn(o)),[o,xn(o)]}function pn(e){let t=xn(e);return[mn(e),t,mn(t)]}function mn(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var hn=[`left`,`right`],gn=[`right`,`left`],_n=[`top`,`bottom`],vn=[`bottom`,`top`];function yn(e,t,n){switch(e){case`top`:case`bottom`:return n?t?gn:hn:t?hn:gn;case`left`:case`right`:return t?_n:vn;default:return[]}}function bn(e,t,n,r){let i=cn(e),a=yn(W(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(mn)))),a}function xn(e){let t=W(e);return on[t]+e.slice(t.length)}function Sn(e){return{top:0,right:0,bottom:0,left:0,...e}}function Cn(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Sn(e)}function wn(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Tn(e,t,n){let{reference:r,floating:i}=e,a=G(t),o=dn(t),s=un(o),c=W(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(cn(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function En(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=U(t,e),p=Cn(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=wn(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=wn(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Dn=50,On=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:En},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Tn(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Dn&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Tn(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},kn=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=U(e,t)||{};if(l==null)return{};let d=Cn(u),f={x:n,y:r},p=dn(i),m=un(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=B(d[_],T),D=B(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=sn(O,A,k),M=!c.arrow&&cn(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),An=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=U(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=W(r),_=G(o),v=W(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[xn(o)]:pn(o)),x=p!==`none`;!d&&x&&b.push(...bn(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=fn(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==G(t))||T.every(e=>G(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=G(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function jn(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Mn(e){return nn.some(t=>e[t]>=0)}var Nn=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=U(e,t);switch(i){case`referenceHidden`:{let e=jn(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Mn(e)}}}case`escaped`:{let e=jn(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Mn(e)}}}default:return{}}}}},Pn=new Set([`left`,`top`]);async function Fn(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=W(n),s=cn(n),c=G(n)===`y`,l=Pn.has(o)?-1:1,u=a&&c?-1:1,d=U(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var In=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Fn(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Ln=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=U(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=G(W(i)),p=ln(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=sn(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=sn(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Rn=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=U(e,t),u={x:n,y:r},d=G(i),f=ln(d),p=u[f],m=u[d],h=U(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Pn.has(W(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},zn=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=U(e,t),u=await o.detectOverflow(t,l),d=W(i),f=cn(i),p=G(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=B(h-u[g],v),x=B(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=V(u.left,0),t=V(u.right,0),n=V(u.top,0),r=V(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:V(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:V(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function Bn(){return typeof window<`u`}function Vn(e){return Hn(e)?(e.nodeName||``).toLowerCase():`#document`}function K(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function q(e){return((Hn(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Hn(e){return Bn()?e instanceof Node||e instanceof K(e).Node:!1}function J(e){return Bn()?e instanceof Element||e instanceof K(e).Element:!1}function Y(e){return Bn()?e instanceof HTMLElement||e instanceof K(e).HTMLElement:!1}function Un(e){return!Bn()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof K(e).ShadowRoot}function Wn(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Z(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Gn(e){return/^(table|td|th)$/.test(Vn(e))}function Kn(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var qn=/transform|translate|scale|rotate|perspective|filter/,Jn=/paint|layout|strict|content/,X=e=>!!e&&e!==`none`,Yn;function Xn(e){let t=J(e)?Z(e):e;return X(t.transform)||X(t.translate)||X(t.scale)||X(t.rotate)||X(t.perspective)||!Qn()&&(X(t.backdropFilter)||X(t.filter))||qn.test(t.willChange||``)||Jn.test(t.contain||``)}function Zn(e){let t=Q(e);for(;Y(t)&&!$n(t);){if(Xn(t))return t;if(Kn(t))return null;t=Q(t)}return null}function Qn(){return Yn??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Yn}function $n(e){return/^(html|body|#document)$/.test(Vn(e))}function Z(e){return K(e).getComputedStyle(e)}function er(e){return J(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Q(e){if(Vn(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Un(e)&&e.host||q(e);return Un(t)?t.host:t}function tr(e){let t=Q(e);return $n(t)?e.ownerDocument?e.ownerDocument.body:e.body:Y(t)&&Wn(t)?t:tr(t)}function nr(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=tr(e),i=r===e.ownerDocument?.body,a=K(r);if(i){let e=rr(a);return t.concat(a,a.visualViewport||[],Wn(r)?r:[],e&&n?nr(e):[])}else return t.concat(r,nr(r,[],n))}function rr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ir(e){let t=Z(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Y(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=rn(n)!==a||rn(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function ar(e){return J(e)?e:e.contextElement}function or(e){let t=ar(e);if(!Y(t))return H(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=ir(t),o=(a?rn(n.width):n.width)/r,s=(a?rn(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var sr=H(0);function cr(e){let t=K(e);return!Qn()||!t.visualViewport?sr:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function lr(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==K(e)?!1:t}function $(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=ar(e),o=H(1);t&&(r?J(r)&&(o=or(r)):o=or(e));let s=lr(a,n,r)?cr(a):H(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=K(a),t=r&&J(r)?K(r):r,n=e,i=rr(n);for(;i&&r&&t!==n;){let e=or(i),t=i.getBoundingClientRect(),r=Z(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=K(i),i=rr(n)}}return wn({width:u,height:d,x:c,y:l})}function ur(e,t){let n=er(e).scrollLeft;return t?t.left+n:$(q(e)).left+n}function dr(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ur(e,n),y:n.top+t.scrollTop}}function fr(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=q(r),s=t?Kn(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=H(1),u=H(0),d=Y(r);if((d||!d&&!a)&&((Vn(r)!==`body`||Wn(o))&&(c=er(r)),d)){let e=$(r);l=or(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?dr(o,c):H(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function pr(e){return Array.from(e.getClientRects())}function mr(e){let t=q(e),n=er(e),r=e.ownerDocument.body,i=V(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=V(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+ur(e),s=-n.scrollTop;return Z(r).direction===`rtl`&&(o+=V(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var hr=25;function gr(e,t){let n=K(e),r=q(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Qn();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=ur(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=hr&&(a-=o)}else l<=hr&&(a+=l);return{width:a,height:o,x:s,y:c}}function _r(e,t){let n=$(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Y(e)?or(e):H(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function vr(e,t,n){let r;if(t===`viewport`)r=gr(e,n);else if(t===`document`)r=mr(q(e));else if(J(t))r=_r(t,n);else{let n=cr(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return wn(r)}function yr(e,t){let n=Q(e);return n===t||!J(n)||$n(n)?!1:Z(n).position===`fixed`||yr(n,t)}function br(e,t){let n=t.get(e);if(n)return n;let r=nr(e,[],!1).filter(e=>J(e)&&Vn(e)!==`body`),i=null,a=Z(e).position===`fixed`,o=a?Q(e):e;for(;J(o)&&!$n(o);){let t=Z(o),n=Xn(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||Wn(o)&&!n&&yr(e,o))?r=r.filter(e=>e!==o):i=t,o=Q(o)}return t.set(e,r),r}function xr(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Kn(t)?[]:br(t,this._c):[].concat(n),r],o=vr(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=vr(t,a[e],i);s=V(n.top,s),c=B(n.right,c),l=B(n.bottom,l),u=V(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Sr(e){let{width:t,height:n}=ir(e);return{width:t,height:n}}function Cr(e,t,n){let r=Y(t),i=q(t),a=n===`fixed`,o=$(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=H(0);function l(){c.x=ur(i)}if(r||!r&&!a)if((Vn(t)!==`body`||Wn(i))&&(s=er(t)),r){let e=$(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?dr(i,s):H(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function wr(e){return Z(e).position===`static`}function Tr(e,t){if(!Y(e)||Z(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return q(e)===n&&(n=n.ownerDocument.body),n}function Er(e,t){let n=K(e);if(Kn(e))return n;if(!Y(e)){let t=Q(e);for(;t&&!$n(t);){if(J(t)&&!wr(t))return t;t=Q(t)}return n}let r=Tr(e,t);for(;r&&Gn(r)&&wr(r);)r=Tr(r,t);return r&&$n(r)&&wr(r)&&!Xn(r)?n:r||Zn(e)||n}var Dr=async function(e){let t=this.getOffsetParent||Er,n=this.getDimensions,r=await n(e.floating);return{reference:Cr(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Or(e){return Z(e).direction===`rtl`}var kr={convertOffsetParentRelativeRectToViewportRelativeRect:fr,getDocumentElement:q,getClippingRect:xr,getOffsetParent:Er,getElementRects:Dr,getClientRects:pr,getDimensions:Sr,getScale:or,isElement:J,isRTL:Or};function Ar(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function jr(e,t){let n=null,r,i=q(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=an(d),h=an(i.clientWidth-(u+f)),g=an(i.clientHeight-(d+p)),_=an(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:V(0,B(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Ar(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Mr(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=ar(e),u=i||a?[...l?nr(l):[],...t?nr(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?jr(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?$(e):null;c&&g();function g(){let t=$(e);h&&!Ar(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Nr=In,Pr=Ln,Fr=An,Ir=zn,Lr=Nn,Rr=kn,zr=Rn,Br=(e,t,n)=>{let r=new Map,i={platform:kr,...n},a={...i.platform,_c:r};return On(e,t,{...i,platform:a})},Vr=typeof document<`u`?u.useLayoutEffect:function(){};function Hr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Hr(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Hr(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Ur(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Wr(e,t){let n=Ur(e);return Math.round(t*n)/n}function Gr(e){let t=u.useRef(e);return Vr(()=>{t.current=e}),t}function Kr(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[d,f]=u.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=u.useState(r);Hr(p,r)||m(r);let[h,g]=u.useState(null),[_,v]=u.useState(null),y=u.useCallback(e=>{e!==w.current&&(w.current=e,g(e))},[]),b=u.useCallback(e=>{e!==T.current&&(T.current=e,v(e))},[]),x=a||h,S=o||_,w=u.useRef(null),T=u.useRef(null),E=u.useRef(d),D=c!=null,O=Gr(c),k=Gr(i),A=Gr(l),j=u.useCallback(()=>{if(!w.current||!T.current)return;let e={placement:t,strategy:n,middleware:p};k.current&&(e.platform=k.current),Br(w.current,T.current,e).then(e=>{let t={...e,isPositioned:A.current!==!1};M.current&&!Hr(E.current,t)&&(E.current=t,C.flushSync(()=>{f(t)}))})},[p,t,n,k,A]);Vr(()=>{l===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[l]);let M=u.useRef(!1);Vr(()=>(M.current=!0,()=>{M.current=!1}),[]),Vr(()=>{if(x&&(w.current=x),S&&(T.current=S),x&&S){if(O.current)return O.current(x,S,j);j()}},[x,S,j,O,D]);let N=u.useMemo(()=>({reference:w,floating:T,setReference:y,setFloating:b}),[y,b]),P=u.useMemo(()=>({reference:x,floating:S}),[x,S]),ee=u.useMemo(()=>{let e={position:n,left:0,top:0};if(!P.floating)return e;let t=Wr(P.floating,d.x),r=Wr(P.floating,d.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Ur(P.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,P.floating,d.x,d.y]);return u.useMemo(()=>({...d,update:j,refs:N,elements:P,floatingStyles:ee}),[d,j,N,P,ee])}var qr=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Rr({element:r.current,padding:i}).fn(n):r?Rr({element:r,padding:i}).fn(n):{}}}},Jr=(e,t)=>{let n=Nr(e);return{name:n.name,fn:n.fn,options:[e,t]}},Yr=(e,t)=>{let n=Pr(e);return{name:n.name,fn:n.fn,options:[e,t]}},Xr=(e,t)=>({fn:zr(e).fn,options:[e,t]}),Zr=(e,t)=>{let n=Fr(e);return{name:n.name,fn:n.fn,options:[e,t]}},Qr=(e,t)=>{let n=Ir(e);return{name:n.name,fn:n.fn,options:[e,t]}},$r=(e,t)=>{let n=Lr(e);return{name:n.name,fn:n.fn,options:[e,t]}},ei=(e,t)=>{let n=qr(e);return{name:n.name,fn:n.fn,options:[e,t]}},ti=`Arrow`,ni=u.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,m.jsx)(w.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,m.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});ni.displayName=ti;var ri=ni,ii=`Popper`,[ai,oi]=D(ii),[si,ci]=ai(ii),li=e=>{let{__scopePopper:t,children:n}=e,[r,i]=u.useState(null);return(0,m.jsx)(si,{scope:t,anchor:r,onAnchorChange:i,children:n})};li.displayName=ii;var ui=`PopperAnchor`,di=u.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=ci(ui,n),o=u.useRef(null),s=p(t,o),c=u.useRef(null);return u.useEffect(()=>{let e=c.current;c.current=r?.current||o.current,e!==c.current&&a.onAnchorChange(c.current)}),r?null:(0,m.jsx)(w.div,{...i,ref:s})});di.displayName=ui;var fi=`PopperContent`,[pi,mi]=ai(fi),hi=u.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:d=0,sticky:f=`partial`,hideWhenDetached:h=!1,updatePositionStrategy:g=`optimized`,onPlaced:_,...v}=e,y=ci(fi,n),[b,x]=u.useState(null),S=p(t,e=>x(e)),[C,T]=u.useState(null),E=tn(C),D=E?.width??0,O=E?.height??0,k=r+(a===`center`?``:`-`+a),A=typeof d==`number`?d:{top:0,right:0,bottom:0,left:0,...d},M=Array.isArray(l)?l:[l],N=M.length>0,P={padding:A,boundary:M.filter(yi),altBoundary:N},{refs:ee,floatingStyles:te,placement:ne,isPositioned:re,middlewareData:F}=Kr({strategy:`fixed`,placement:k,whileElementsMounted:(...e)=>Mr(...e,{animationFrame:g===`always`}),elements:{reference:y.anchor},middleware:[Jr({mainAxis:i+O,alignmentAxis:o}),c&&Yr({mainAxis:!0,crossAxis:!1,limiter:f===`partial`?Xr():void 0,...P}),c&&Zr({...P}),Qr({...P,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),C&&ei({element:C,padding:s}),bi({arrowWidth:D,arrowHeight:O}),h&&$r({strategy:`referenceHidden`,...P})]}),[ie,ae]=xi(ne),oe=I(_);j(()=>{re&&oe?.()},[re,oe]);let se=F.arrow?.x,ce=F.arrow?.y,le=F.arrow?.centerOffset!==0,[ue,de]=u.useState();return j(()=>{b&&de(window.getComputedStyle(b).zIndex)},[b]),(0,m.jsx)(`div`,{ref:ee.setFloating,"data-radix-popper-content-wrapper":``,style:{...te,transform:re?te.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:ue,"--radix-popper-transform-origin":[F.transformOrigin?.x,F.transformOrigin?.y].join(` `),...F.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,m.jsx)(pi,{scope:n,placedSide:ie,onArrowChange:T,arrowX:se,arrowY:ce,shouldHideArrow:le,children:(0,m.jsx)(w.div,{"data-side":ie,"data-align":ae,...v,ref:S,style:{...v.style,animation:re?void 0:`none`}})})})});hi.displayName=fi;var gi=`PopperArrow`,_i={top:`bottom`,right:`left`,bottom:`top`,left:`right`},vi=u.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=mi(gi,n),a=_i[i.placedSide];return(0,m.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,m.jsx)(ri,{...r,ref:t,style:{...r.style,display:`block`}})})});vi.displayName=gi;function yi(e){return e!==null}var bi=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=xi(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function xi(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var Si=li,Ci=di,wi=hi,Ti=vi;function Ei(e,[t,n]){return Math.min(n,Math.max(t,e))}function Di({className:e,type:t,...n}){return(0,m.jsx)(`input`,{type:t,"data-slot":`input`,className:a(`h-9 w-full min-w-0 rounded-lg border border-border bg-surface px-3 py-2 text-base md:text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:border-ring disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,`selection:bg-primary selection:text-primary-foreground`,`file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground`,`aria-invalid:border-destructive`,e),...n})}export{p as A,D as C,h as D,g as E,c as M,s as N,y as O,E as S,T,re as _,wi as a,A as b,tn as c,Le as d,Fe as f,ie as g,I as h,Ti as i,l as j,f as k,en as l,fe as m,Ei as n,Si as o,Ce as p,Ci as r,oi as s,Di as t,Gt as u,N as v,w,k as x,j as y};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./react-CYzKIDNi.js";import"./api-client-TUmacMRS.js";import{x as e}from"./index-CetGEOKq.js";export{e as useKeybindingsStore};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./react-CYzKIDNi.js";import"./input-CVIzrYsH.js";import"./jsx-runtime-wQxeESYQ.js";import"./switch-UODDpwuO.js";import"./settings-store-2NQzaOVJ.js";import"./api-client-TUmacMRS.js";import{n as e}from"./index-CetGEOKq.js";export{e as SettingsTab};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,t}from"./react-CYzKIDNi.js";import{A as n,C as r,D as i,N as a,_ as o,a as s,b as c,c as l,d as u,f as d,g as f,h as p,i as m,l as h,m as g,n as _,o as v,p as y,r as b,s as x,t as S,u as C,v as w,w as T,x as E,y as D}from"./input-CVIzrYsH.js";import{n as O,t as k}from"./jsx-runtime-wQxeESYQ.js";import{n as A}from"./utils-DC-bdPS3.js";import{t as j}from"./api-client-TUmacMRS.js";var M=O(`bell-off`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742`,key:`178tsu`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05`,key:`1hqiys`}]]),N=O(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),P=O(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),F=O(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),I=O(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),ee=O(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]),L=e(t(),1),R=k(),z=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),te=`VisuallyHidden`,B=L.forwardRef((e,t)=>(0,R.jsx)(T.span,{...e,ref:t,style:{...z,...e.style}}));B.displayName=te;var V=B;function H(e){let t=L.useRef({value:e,previous:e});return L.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var ne=`Label`,re=L.forwardRef((e,t)=>(0,R.jsx)(T.label,{...e,ref:t,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));re.displayName=ne;var ie=re,ae=e(a(),1),oe=[` `,`Enter`,`ArrowUp`,`ArrowDown`],se=[` `,`Enter`],U=`Select`,[W,G,ce]=E(U),[K,le]=r(U,[ce,x]),q=x(),[ue,J]=K(U),[de,fe]=K(U),pe=e=>{let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:s,defaultValue:c,onValueChange:l,dir:u,name:d,autoComplete:p,disabled:m,required:h,form:g}=e,_=q(t),[y,b]=L.useState(null),[x,S]=L.useState(null),[C,T]=L.useState(!1),E=f(u),[D,O]=w({prop:r,defaultProp:i??!1,onChange:a,caller:U}),[k,A]=w({prop:s,defaultProp:c,onChange:l,caller:U}),j=L.useRef(null),M=y?g||!!y.closest(`form`):!0,[N,P]=L.useState(new Set),F=Array.from(N).map(e=>e.props.value).join(`;`);return(0,R.jsx)(v,{..._,children:(0,R.jsxs)(ue,{required:h,scope:t,trigger:y,onTriggerChange:b,valueNode:x,onValueNodeChange:S,valueNodeHasChildren:C,onValueNodeHasChildrenChange:T,contentId:o(),value:k,onValueChange:A,open:D,onOpenChange:O,dir:E,triggerPointerDownPosRef:j,disabled:m,children:[(0,R.jsx)(W.Provider,{scope:t,children:(0,R.jsx)(de,{scope:e.__scopeSelect,onNativeOptionAdd:L.useCallback(e=>{P(t=>new Set(t).add(e))},[]),onNativeOptionRemove:L.useCallback(e=>{P(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),M?(0,R.jsxs)(it,{"aria-hidden":!0,required:h,tabIndex:-1,name:d,autoComplete:p,value:k,onChange:e=>A(e.target.value),disabled:m,form:g,children:[k===void 0?(0,R.jsx)(`option`,{value:``}):null,Array.from(N)]},F):null]})})};pe.displayName=U;var me=`SelectTrigger`,he=L.forwardRef((e,t)=>{let{__scopeSelect:r,disabled:i=!1,...a}=e,o=q(r),s=J(me,r),l=s.disabled||i,u=n(t,s.onTriggerChange),d=G(r),f=L.useRef(`touch`),[p,m,h]=ot(e=>{let t=d().filter(e=>!e.disabled),n=st(t,e,t.find(e=>e.value===s.value));n!==void 0&&s.onValueChange(n.value)}),g=e=>{l||(s.onOpenChange(!0),h()),e&&(s.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,R.jsx)(b,{asChild:!0,...o,children:(0,R.jsx)(T.button,{type:`button`,role:`combobox`,"aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":`none`,dir:s.dir,"data-state":s.open?`open`:`closed`,disabled:l,"data-disabled":l?``:void 0,"data-placeholder":at(s.value)?``:void 0,...a,ref:u,onClick:c(a.onClick,e=>{e.currentTarget.focus(),f.current!==`mouse`&&g(e)}),onPointerDown:c(a.onPointerDown,e=>{f.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(g(e),e.preventDefault())}),onKeyDown:c(a.onKeyDown,e=>{let t=p.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&m(e.key),!(t&&e.key===` `)&&oe.includes(e.key)&&(g(),e.preventDefault())})})})});he.displayName=me;var ge=`SelectValue`,_e=L.forwardRef((e,t)=>{let{__scopeSelect:r,className:i,style:a,children:o,placeholder:s=``,...c}=e,l=J(ge,r),{onValueNodeHasChildrenChange:u}=l,d=o!==void 0,f=n(t,l.onValueNodeChange);return D(()=>{u(d)},[u,d]),(0,R.jsx)(T.span,{...c,ref:f,style:{pointerEvents:`none`},children:at(l.value)?(0,R.jsx)(R.Fragment,{children:s}):o})});_e.displayName=ge;var ve=`SelectIcon`,ye=L.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,R.jsx)(T.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});ye.displayName=ve;var be=`SelectPortal`,xe=e=>(0,R.jsx)(d,{asChild:!0,...e});xe.displayName=be;var Y=`SelectContent`,Se=L.forwardRef((e,t)=>{let n=J(Y,e.__scopeSelect),[r,i]=L.useState();if(D(()=>{i(new DocumentFragment)},[]),!n.open){let t=r;return t?ae.createPortal((0,R.jsx)(Ce,{scope:e.__scopeSelect,children:(0,R.jsx)(W.Slot,{scope:e.__scopeSelect,children:(0,R.jsx)(`div`,{children:e.children})})}),t):null}return(0,R.jsx)(Ee,{...e,ref:t})});Se.displayName=Y;var X=10,[Ce,Z]=K(Y),we=`SelectContentImpl`,Te=i(`SelectContent.RemoveScroll`),Ee=L.forwardRef((e,t)=>{let{__scopeSelect:r,position:i=`item-aligned`,onCloseAutoFocus:a,onEscapeKeyDown:o,onPointerDownOutside:s,side:l,sideOffset:d,align:f,alignOffset:p,arrowPadding:m,collisionBoundary:_,collisionPadding:v,sticky:b,hideWhenDetached:x,avoidCollisions:S,...w}=e,T=J(Y,r),[E,D]=L.useState(null),[O,k]=L.useState(null),A=n(t,e=>D(e)),[j,M]=L.useState(null),[N,P]=L.useState(null),F=G(r),[I,ee]=L.useState(!1),z=L.useRef(!1);L.useEffect(()=>{if(E)return h(E)},[E]),u();let te=L.useCallback(e=>{let[t,...n]=F().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&O&&(O.scrollTop=0),n===r&&O&&(O.scrollTop=O.scrollHeight),n?.focus(),document.activeElement!==i))return},[F,O]),B=L.useCallback(()=>te([j,E]),[te,j,E]);L.useEffect(()=>{I&&B()},[I,B]);let{onOpenChange:V,triggerPointerDownPosRef:H}=T;L.useEffect(()=>{if(E){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(H.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(H.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():E.contains(n.target)||V(!1),document.removeEventListener(`pointermove`,t),H.current=null};return H.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[E,V,H]),L.useEffect(()=>{let e=()=>V(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[V]);let[ne,re]=ot(e=>{let t=F().filter(e=>!e.disabled),n=st(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current.focus())}),ie=L.useCallback((e,t,n)=>{let r=!z.current&&!n;(T.value!==void 0&&T.value===t||r)&&(M(e),r&&(z.current=!0))},[T.value]),ae=L.useCallback(()=>E?.focus(),[E]),oe=L.useCallback((e,t,n)=>{let r=!z.current&&!n;(T.value!==void 0&&T.value===t||r)&&P(e)},[T.value]),se=i===`popper`?Ae:Oe,U=se===Ae?{side:l,sideOffset:d,align:f,alignOffset:p,arrowPadding:m,collisionBoundary:_,collisionPadding:v,sticky:b,hideWhenDetached:x,avoidCollisions:S}:{};return(0,R.jsx)(Ce,{scope:r,content:E,viewport:O,onViewportChange:k,itemRefCallback:ie,selectedItem:j,onItemLeave:ae,itemTextRefCallback:oe,focusSelectedItem:B,selectedItemText:N,position:i,isPositioned:I,searchRef:ne,children:(0,R.jsx)(C,{as:Te,allowPinchZoom:!0,children:(0,R.jsx)(y,{asChild:!0,trapped:T.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:c(a,e=>{T.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,R.jsx)(g,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>T.onOpenChange(!1),children:(0,R.jsx)(se,{role:`listbox`,id:T.contentId,"data-state":T.open?`open`:`closed`,dir:T.dir,onContextMenu:e=>e.preventDefault(),...w,...U,onPlaced:()=>ee(!0),ref:A,style:{display:`flex`,flexDirection:`column`,outline:`none`,...w.style},onKeyDown:c(w.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&re(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=F().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>te(t)),e.preventDefault()}})})})})})})});Ee.displayName=we;var De=`SelectItemAlignedPosition`,Oe=L.forwardRef((e,t)=>{let{__scopeSelect:r,onPlaced:i,...a}=e,o=J(Y,r),s=Z(Y,r),[c,l]=L.useState(null),[u,d]=L.useState(null),f=n(t,e=>d(e)),p=G(r),m=L.useRef(!1),h=L.useRef(!0),{viewport:g,selectedItem:v,selectedItemText:y,focusSelectedItem:b}=s,x=L.useCallback(()=>{if(o.trigger&&o.valueNode&&c&&u&&g&&v&&y){let e=o.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),n=o.valueNode.getBoundingClientRect(),r=y.getBoundingClientRect();if(o.dir!==`rtl`){let i=r.left-t.left,a=n.left-i,o=e.left-a,s=e.width+o,l=Math.max(s,t.width),u=window.innerWidth-X,d=_(a,[X,Math.max(X,u-l)]);c.style.minWidth=s+`px`,c.style.left=d+`px`}else{let i=t.right-r.right,a=window.innerWidth-n.right-i,o=window.innerWidth-e.right-a,s=e.width+o,l=Math.max(s,t.width),u=window.innerWidth-X,d=_(a,[X,Math.max(X,u-l)]);c.style.minWidth=s+`px`,c.style.right=d+`px`}let a=p(),s=window.innerHeight-X*2,l=g.scrollHeight,d=window.getComputedStyle(u),f=parseInt(d.borderTopWidth,10),h=parseInt(d.paddingTop,10),b=parseInt(d.borderBottomWidth,10),x=parseInt(d.paddingBottom,10),S=f+h+l+x+b,C=Math.min(v.offsetHeight*5,S),w=window.getComputedStyle(g),T=parseInt(w.paddingTop,10),E=parseInt(w.paddingBottom,10),D=e.top+e.height/2-X,O=s-D,k=v.offsetHeight/2,A=v.offsetTop+k,j=f+h+A,M=S-j;if(j<=D){let e=a.length>0&&v===a[a.length-1].ref.current;c.style.bottom=`0px`;let t=u.clientHeight-g.offsetTop-g.offsetHeight,n=j+Math.max(O,k+(e?E:0)+t+b);c.style.height=n+`px`}else{let e=a.length>0&&v===a[0].ref.current;c.style.top=`0px`;let t=Math.max(D,f+g.offsetTop+(e?T:0)+k)+M;c.style.height=t+`px`,g.scrollTop=j-D+g.offsetTop}c.style.margin=`${X}px 0`,c.style.minHeight=C+`px`,c.style.maxHeight=s+`px`,i?.(),requestAnimationFrame(()=>m.current=!0)}},[p,o.trigger,o.valueNode,c,u,g,v,y,o.dir,i]);D(()=>x(),[x]);let[S,C]=L.useState();return D(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]),(0,R.jsx)(je,{scope:r,contentWrapper:c,shouldExpandOnScrollRef:m,onScrollButtonChange:L.useCallback(e=>{e&&h.current===!0&&(x(),b?.(),h.current=!1)},[x,b]),children:(0,R.jsx)(`div`,{ref:l,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:S},children:(0,R.jsx)(T.div,{...a,ref:f,style:{boxSizing:`border-box`,maxHeight:`100%`,...a.style}})})})});Oe.displayName=De;var ke=`SelectPopperPosition`,Ae=L.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=X,...a}=e,o=q(n);return(0,R.jsx)(s,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})});Ae.displayName=ke;var[je,Me]=K(Y,{}),Ne=`SelectViewport`,Pe=L.forwardRef((e,t)=>{let{__scopeSelect:r,nonce:i,...a}=e,o=Z(Ne,r),s=Me(Ne,r),l=n(t,o.onViewportChange),u=L.useRef(0);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:i}),(0,R.jsx)(W.Slot,{scope:r,children:(0,R.jsx)(T.div,{"data-radix-select-viewport":``,role:`presentation`,...a,ref:l,style:{position:`relative`,flex:1,overflow:`hidden auto`,...a.style},onScroll:c(a.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=s;if(r?.current&&n){let e=Math.abs(u.current-t.scrollTop);if(e>0){let r=window.innerHeight-X*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}u.current=t.scrollTop})})})]})});Pe.displayName=Ne;var Fe=`SelectGroup`,[Ie,Le]=K(Fe),Re=L.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=o();return(0,R.jsx)(Ie,{scope:n,id:i,children:(0,R.jsx)(T.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});Re.displayName=Fe;var ze=`SelectLabel`,Be=L.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=Le(ze,n);return(0,R.jsx)(T.div,{id:i.id,...r,ref:t})});Be.displayName=ze;var Ve=`SelectItem`,[He,Ue]=K(Ve),We=L.forwardRef((e,t)=>{let{__scopeSelect:r,value:i,disabled:a=!1,textValue:s,...l}=e,u=J(Ve,r),d=Z(Ve,r),f=u.value===i,[p,m]=L.useState(s??``),[h,g]=L.useState(!1),_=n(t,e=>d.itemRefCallback?.(e,i,a)),v=o(),y=L.useRef(`touch`),b=()=>{a||(u.onValueChange(i),u.onOpenChange(!1))};if(i===``)throw Error(`A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.`);return(0,R.jsx)(He,{scope:r,value:i,disabled:a,textId:v,isSelected:f,onItemTextChange:L.useCallback(e=>{m(t=>t||(e?.textContent??``).trim())},[]),children:(0,R.jsx)(W.ItemSlot,{scope:r,value:i,disabled:a,textValue:p,children:(0,R.jsx)(T.div,{role:`option`,"aria-labelledby":v,"data-highlighted":h?``:void 0,"aria-selected":f&&h,"data-state":f?`checked`:`unchecked`,"aria-disabled":a||void 0,"data-disabled":a?``:void 0,tabIndex:a?void 0:-1,...l,ref:_,onFocus:c(l.onFocus,()=>g(!0)),onBlur:c(l.onBlur,()=>g(!1)),onClick:c(l.onClick,()=>{y.current!==`mouse`&&b()}),onPointerUp:c(l.onPointerUp,()=>{y.current===`mouse`&&b()}),onPointerDown:c(l.onPointerDown,e=>{y.current=e.pointerType}),onPointerMove:c(l.onPointerMove,e=>{y.current=e.pointerType,a?d.onItemLeave?.():y.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:c(l.onPointerLeave,e=>{e.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:c(l.onKeyDown,e=>{d.searchRef?.current!==``&&e.key===` `||(se.includes(e.key)&&b(),e.key===` `&&e.preventDefault())})})})})});We.displayName=Ve;var Q=`SelectItemText`,Ge=L.forwardRef((e,t)=>{let{__scopeSelect:r,className:i,style:a,...o}=e,s=J(Q,r),c=Z(Q,r),l=Ue(Q,r),u=fe(Q,r),[d,f]=L.useState(null),p=n(t,e=>f(e),l.onItemTextChange,e=>c.itemTextRefCallback?.(e,l.value,l.disabled)),m=d?.textContent,h=L.useMemo(()=>(0,R.jsx)(`option`,{value:l.value,disabled:l.disabled,children:m},l.value),[l.disabled,l.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:_}=u;return D(()=>(g(h),()=>_(h)),[g,_,h]),(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(T.span,{id:l.textId,...o,ref:p}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?ae.createPortal(o.children,s.valueNode):null]})});Ge.displayName=Q;var Ke=`SelectItemIndicator`,qe=L.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return Ue(Ke,n).isSelected?(0,R.jsx)(T.span,{"aria-hidden":!0,...r,ref:t}):null});qe.displayName=Ke;var Je=`SelectScrollUpButton`,Ye=L.forwardRef((e,t)=>{let r=Z(Je,e.__scopeSelect),i=Me(Je,e.__scopeSelect),[a,o]=L.useState(!1),s=n(t,i.onScrollButtonChange);return D(()=>{if(r.viewport&&r.isPositioned){let e=function(){o(t.scrollTop>0)},t=r.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[r.viewport,r.isPositioned]),a?(0,R.jsx)(Qe,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});Ye.displayName=Je;var Xe=`SelectScrollDownButton`,Ze=L.forwardRef((e,t)=>{let r=Z(Xe,e.__scopeSelect),i=Me(Xe,e.__scopeSelect),[a,o]=L.useState(!1),s=n(t,i.onScrollButtonChange);return D(()=>{if(r.viewport&&r.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;o(Math.ceil(t.scrollTop)<e)},t=r.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[r.viewport,r.isPositioned]),a?(0,R.jsx)(Qe,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});Ze.displayName=Xe;var Qe=L.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=Z(`SelectScrollButton`,n),o=L.useRef(null),s=G(n),l=L.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return L.useEffect(()=>()=>l(),[l]),D(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,R.jsx)(T.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:c(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:c(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:c(i.onPointerLeave,()=>{l()})})}),$e=`SelectSeparator`,et=L.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,R.jsx)(T.div,{"aria-hidden":!0,...r,ref:t})});et.displayName=$e;var tt=`SelectArrow`,nt=L.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=q(n),a=J(tt,n),o=Z(tt,n);return a.open&&o.position===`popper`?(0,R.jsx)(m,{...i,...r,ref:t}):null});nt.displayName=tt;var rt=`SelectBubbleInput`,it=L.forwardRef(({__scopeSelect:e,value:t,...r},i)=>{let a=L.useRef(null),o=n(i,a),s=H(t);return L.useEffect(()=>{let e=a.current;if(!e)return;let n=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`).set;if(s!==t&&r){let n=new Event(`change`,{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[s,t]),(0,R.jsx)(T.select,{...r,style:{...z,...r.style},ref:o,defaultValue:t})});it.displayName=rt;function at(e){return e===``||e===void 0}function ot(e){let t=p(e),n=L.useRef(``),r=L.useRef(0),i=L.useCallback(e=>{let i=n.current+e;t(i),(function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))})(i)},[t]),a=L.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return L.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function st(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=ct(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function ct(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var lt=pe,ut=he,dt=_e,ft=ye,pt=xe,mt=Se,ht=Pe,gt=We,_t=Ge,vt=qe,yt=Ye,bt=Ze,xt=`Switch`,[St,Ct]=r(xt),[wt,Tt]=St(xt),Et=L.forwardRef((e,t)=>{let{__scopeSwitch:r,name:i,checked:a,defaultChecked:o,required:s,disabled:l,value:u=`on`,onCheckedChange:d,form:f,...p}=e,[m,h]=L.useState(null),g=n(t,e=>h(e)),_=L.useRef(!1),v=m?f||!!m.closest(`form`):!0,[y,b]=w({prop:a,defaultProp:o??!1,onChange:d,caller:xt});return(0,R.jsxs)(wt,{scope:r,checked:y,disabled:l,children:[(0,R.jsx)(T.button,{type:`button`,role:`switch`,"aria-checked":y,"aria-required":s,"data-state":jt(y),"data-disabled":l?``:void 0,disabled:l,value:u,...p,ref:g,onClick:c(e.onClick,e=>{b(e=>!e),v&&(_.current=e.isPropagationStopped(),_.current||e.stopPropagation())})}),v&&(0,R.jsx)(At,{control:m,bubbles:!_.current,name:i,value:u,checked:y,required:s,disabled:l,form:f,style:{transform:`translateX(-100%)`}})]})});Et.displayName=xt;var Dt=`SwitchThumb`,Ot=L.forwardRef((e,t)=>{let{__scopeSwitch:n,...r}=e,i=Tt(Dt,n);return(0,R.jsx)(T.span,{"data-state":jt(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})});Ot.displayName=Dt;var kt=`SwitchBubbleInput`,At=L.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:i=!0,...a},o)=>{let s=L.useRef(null),c=n(s,o),u=H(r),d=l(t);return L.useEffect(()=>{let e=s.current;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set;if(u!==r&&n){let t=new Event(`click`,{bubbles:i});n.call(e,r),e.dispatchEvent(t)}},[u,r,i]),(0,R.jsx)(`input`,{type:`checkbox`,"aria-hidden":!0,defaultChecked:r,...a,tabIndex:-1,ref:c,style:{...a.style,...d,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0}})});At.displayName=kt;function jt(e){return e?`checked`:`unchecked`}var Mt=Et,Nt=Ot;function $({className:e,...t}){return(0,R.jsx)(ie,{"data-slot":`label`,className:A(`flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,e),...t})}function Pt({...e}){return(0,R.jsx)(lt,{"data-slot":`select`,...e})}function Ft({...e}){return(0,R.jsx)(dt,{"data-slot":`select-value`,...e})}function It({className:e,size:t=`default`,children:n,...r}){return(0,R.jsxs)(ut,{"data-slot":`select-trigger`,"data-size":t,className:A(`flex w-fit items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground`,e),...r,children:[n,(0,R.jsx)(ft,{asChild:!0,children:(0,R.jsx)(P,{className:`size-4 opacity-50`})})]})}function Lt({className:e,children:t,position:n=`item-aligned`,align:r=`center`,...i}){return(0,R.jsx)(pt,{children:(0,R.jsxs)(mt,{"data-slot":`select-content`,className:A(`relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,n===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,e),position:n,align:r,...i,children:[(0,R.jsx)(zt,{}),(0,R.jsx)(ht,{className:A(`p-1`,n===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1`),children:t}),(0,R.jsx)(Bt,{})]})})}function Rt({className:e,children:t,...n}){return(0,R.jsxs)(gt,{"data-slot":`select-item`,className:A(`relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,e),...n,children:[(0,R.jsx)(`span`,{"data-slot":`select-item-indicator`,className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,R.jsx)(vt,{children:(0,R.jsx)(N,{className:`size-4`})})}),(0,R.jsx)(_t,{children:t})]})}function zt({className:e,...t}){return(0,R.jsx)(yt,{"data-slot":`select-scroll-up-button`,className:A(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,R.jsx)(F,{className:`size-4`})})}function Bt({className:e,...t}){return(0,R.jsx)(bt,{"data-slot":`select-scroll-down-button`,className:A(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,R.jsx)(P,{className:`size-4`})})}function Vt(){return j.get(`/api/accounts`)}function Ht(){return j.get(`/api/accounts/active`)}function Ut(e){return j.post(`/api/accounts`,e)}function Wt(e){return j.del(`/api/accounts/${e}`)}function Gt(e,t){return j.patch(`/api/accounts/${e}`,t)}function Kt(){return j.get(`/api/accounts/settings`)}function qt(e){return j.put(`/api/accounts/settings`,e)}function Jt(e){return j.post(`/api/accounts/${e}/verify`)}function Yt(){return j.get(`/api/accounts/oauth/url`)}function Xt(e,t){return j.post(`/api/accounts/oauth/exchange`,{code:e,state:t})}function Zt(){return j.get(`/api/accounts/usage`)}function Qt(e){return j.post(`/api/accounts/import`,e)}function $t(){return j.get(`/api/settings/ai`)}function en(e){return j.put(`/api/settings/ai`,e)}var tn=[{value:`claude-sonnet-4-6`,label:`Claude Sonnet 4.6`},{value:`claude-opus-4-6`,label:`Claude Opus 4.6`},{value:`claude-haiku-4-5`,label:`Claude Haiku 4.5`}],nn=[{value:`low`,label:`Low`},{value:`medium`,label:`Medium`},{value:`high`,label:`High`}];function rn({compact:e}={}){let[t,n]=(0,L.useState)(null),[r,i]=(0,L.useState)(!1),[a,o]=(0,L.useState)(null),[s,c]=(0,L.useState)(0);(0,L.useEffect)(()=>{$t().then(n).catch(e=>o(e.message))},[]);let l=t?.default_provider??`claude`,u=t?.providers[l],d=async(e,r)=>{if(t){i(!0),o(null);try{n(await en({providers:{[l]:{[e]:r}}})),c(e=>e+1)}catch(e){o(e.message)}finally{i(!1)}}},f=e?`text-[11px]`:`text-sm`,p=e?`text-xs`:`text-sm`,m=e?`space-y-2`:`space-y-4`,h=e?`space-y-1.5`:`space-y-3`,g=e?`space-y-1`:`space-y-1.5`;return t?(0,R.jsxs)(`div`,{className:m,children:[(0,R.jsx)(`h3`,{className:`${p} font-medium text-text-secondary`,children:`AI Provider`}),(0,R.jsxs)(`div`,{className:h,children:[(0,R.jsxs)(`div`,{className:g,children:[(0,R.jsx)($,{htmlFor:`ai-model`,className:e?f:void 0,children:`Model`}),(0,R.jsxs)(Pt,{value:u?.model??`claude-sonnet-4-6`,onValueChange:e=>d(`model`,e),children:[(0,R.jsx)(It,{id:`ai-model`,className:`w-full ${e?`h-7 text-[11px]`:``}`,children:(0,R.jsx)(Ft,{})}),(0,R.jsx)(Lt,{children:tn.map(e=>(0,R.jsx)(Rt,{value:e.value,children:e.label},e.value))})]})]}),(0,R.jsxs)(`div`,{className:g,children:[(0,R.jsx)($,{htmlFor:`ai-effort`,className:e?f:void 0,children:`Effort`}),(0,R.jsxs)(Pt,{value:u?.effort??`high`,onValueChange:e=>d(`effort`,e),children:[(0,R.jsx)(It,{id:`ai-effort`,className:`w-full ${e?`h-7 text-[11px]`:``}`,children:(0,R.jsx)(Ft,{})}),(0,R.jsx)(Lt,{children:nn.map(e=>(0,R.jsx)(Rt,{value:e.value,children:e.label},e.value))})]})]}),(0,R.jsxs)(`div`,{className:g,children:[(0,R.jsx)($,{htmlFor:`ai-max-turns`,className:e?f:void 0,children:`Max Turns (1-500)`}),(0,R.jsx)(S,{id:`ai-max-turns`,type:`number`,min:1,max:500,defaultValue:u?.max_turns??100,className:e?`h-7 text-[11px]`:void 0,onBlur:e=>{let t=parseInt(e.target.value);isNaN(t)||d(`max_turns`,t)}},`turns-${s}`)]}),(0,R.jsxs)(`div`,{className:g,children:[(0,R.jsx)($,{htmlFor:`ai-budget`,className:e?f:void 0,children:`Max Budget (USD)`}),(0,R.jsx)(S,{id:`ai-budget`,type:`number`,step:.1,min:.01,max:50,defaultValue:u?.max_budget_usd??``,placeholder:`No limit`,className:e?`h-7 text-[11px]`:void 0,onBlur:e=>{let t=parseFloat(e.target.value);d(`max_budget_usd`,isNaN(t)?void 0:t)}},`budget-${s}`)]}),(0,R.jsxs)(`div`,{className:g,children:[(0,R.jsx)($,{htmlFor:`ai-thinking`,className:e?f:void 0,children:`Thinking Budget (tokens)`}),(0,R.jsx)(S,{id:`ai-thinking`,type:`number`,min:0,defaultValue:u?.thinking_budget_tokens??``,placeholder:`Disabled`,className:e?`h-7 text-[11px]`:void 0,onBlur:e=>{let t=parseInt(e.target.value);d(`thinking_budget_tokens`,isNaN(t)?void 0:t)}},`thinking-${s}`)]})]}),r&&(0,R.jsx)(`p`,{className:`text-xs text-text-subtle`,children:`Saving...`}),a&&(0,R.jsx)(`p`,{className:`text-xs text-red-500`,children:a})]}):(0,R.jsxs)(`div`,{className:h,children:[(0,R.jsx)(`h3`,{className:`${p} font-medium text-text-secondary`,children:`AI Provider`}),(0,R.jsx)(`p`,{className:`${f} text-text-subtle`,children:a?`Error: ${a}`:`Loading...`})]})}var an=L.forwardRef(({className:e,...t},n)=>(0,R.jsx)(Mt,{className:A(`peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input`,e),...t,ref:n,children:(0,R.jsx)(Nt,{className:A(`pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0`)})}));an.displayName=Mt.displayName;export{I as C,M as D,N as E,ee as S,P as T,Rt as _,Xt as a,$ as b,Ht as c,Qt as d,Gt as f,Lt as g,Pt as h,Wt as i,Zt as l,Jt as m,rn as n,Kt as o,qt as p,Ut as r,Vt as s,an as t,Yt as u,It as v,F as w,V as x,Ft as y};
|