@kaitranntt/ccs 5.14.0 → 5.15.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.
Files changed (106) hide show
  1. package/README.md +10 -1
  2. package/VERSION +1 -1
  3. package/dist/auth/auth-commands.d.ts +8 -0
  4. package/dist/auth/auth-commands.d.ts.map +1 -1
  5. package/dist/auth/auth-commands.js +54 -14
  6. package/dist/auth/auth-commands.js.map +1 -1
  7. package/dist/auth/profile-detector.d.ts +25 -6
  8. package/dist/auth/profile-detector.d.ts.map +1 -1
  9. package/dist/auth/profile-detector.js +150 -7
  10. package/dist/auth/profile-detector.js.map +1 -1
  11. package/dist/auth/profile-registry.d.ts +35 -0
  12. package/dist/auth/profile-registry.d.ts.map +1 -1
  13. package/dist/auth/profile-registry.js +91 -0
  14. package/dist/auth/profile-registry.js.map +1 -1
  15. package/dist/ccs.js +17 -0
  16. package/dist/ccs.js.map +1 -1
  17. package/dist/cliproxy/account-manager.d.ts +4 -0
  18. package/dist/cliproxy/account-manager.d.ts.map +1 -1
  19. package/dist/cliproxy/account-manager.js +25 -1
  20. package/dist/cliproxy/account-manager.js.map +1 -1
  21. package/dist/cliproxy/auth-handler.d.ts +1 -0
  22. package/dist/cliproxy/auth-handler.d.ts.map +1 -1
  23. package/dist/cliproxy/auth-handler.js +8 -5
  24. package/dist/cliproxy/auth-handler.js.map +1 -1
  25. package/dist/cliproxy/cliproxy-executor.d.ts.map +1 -1
  26. package/dist/cliproxy/cliproxy-executor.js +43 -3
  27. package/dist/cliproxy/cliproxy-executor.js.map +1 -1
  28. package/dist/commands/api-command.d.ts +4 -0
  29. package/dist/commands/api-command.d.ts.map +1 -1
  30. package/dist/commands/api-command.js +299 -42
  31. package/dist/commands/api-command.js.map +1 -1
  32. package/dist/commands/cliproxy-command.d.ts +4 -0
  33. package/dist/commands/cliproxy-command.d.ts.map +1 -1
  34. package/dist/commands/cliproxy-command.js +181 -55
  35. package/dist/commands/cliproxy-command.js.map +1 -1
  36. package/dist/commands/migrate-command.d.ts +17 -0
  37. package/dist/commands/migrate-command.d.ts.map +1 -0
  38. package/dist/commands/migrate-command.js +139 -0
  39. package/dist/commands/migrate-command.js.map +1 -0
  40. package/dist/config/feature-flags.d.ts +19 -0
  41. package/dist/config/feature-flags.d.ts.map +1 -0
  42. package/dist/config/feature-flags.js +31 -0
  43. package/dist/config/feature-flags.js.map +1 -0
  44. package/dist/config/index.d.ts +12 -0
  45. package/dist/config/index.d.ts.map +1 -0
  46. package/dist/config/index.js +33 -0
  47. package/dist/config/index.js.map +1 -0
  48. package/dist/config/migration-manager.d.ts +46 -0
  49. package/dist/config/migration-manager.d.ts.map +1 -0
  50. package/dist/config/migration-manager.js +338 -0
  51. package/dist/config/migration-manager.js.map +1 -0
  52. package/dist/config/reserved-names.d.ts +19 -0
  53. package/dist/config/reserved-names.d.ts.map +1 -0
  54. package/dist/config/reserved-names.js +40 -0
  55. package/dist/config/reserved-names.js.map +1 -0
  56. package/dist/config/secrets-manager.d.ts +51 -0
  57. package/dist/config/secrets-manager.d.ts.map +1 -0
  58. package/dist/config/secrets-manager.js +194 -0
  59. package/dist/config/secrets-manager.js.map +1 -0
  60. package/dist/config/unified-config-loader.d.ts +55 -0
  61. package/dist/config/unified-config-loader.d.ts.map +1 -0
  62. package/dist/config/unified-config-loader.js +262 -0
  63. package/dist/config/unified-config-loader.js.map +1 -0
  64. package/dist/config/unified-config-types.d.ts +126 -0
  65. package/dist/config/unified-config-types.d.ts.map +1 -0
  66. package/dist/config/unified-config-types.js +75 -0
  67. package/dist/config/unified-config-types.js.map +1 -0
  68. package/dist/ui/assets/{accounts-CTGj9Xoy.js → accounts-CTh48XsV.js} +1 -1
  69. package/dist/ui/assets/{analytics-BAilRuX-.js → analytics-CeU8ZE3O.js} +2 -2
  70. package/dist/ui/assets/api-LYILKXgM.js +1 -0
  71. package/dist/ui/assets/cliproxy-Cy2Bjv-c.js +1 -0
  72. package/dist/ui/assets/code-editor-HkboCFlD.js +36 -0
  73. package/dist/ui/assets/health-DyAiAnv0.js +1 -0
  74. package/dist/ui/assets/icons-CRbZgamU.js +1 -0
  75. package/dist/ui/assets/index-BIVAVDH5.js +10 -0
  76. package/dist/ui/assets/index-vojI8oaQ.css +1 -0
  77. package/dist/ui/assets/radix-ui-CgfZoNEt.js +51 -0
  78. package/dist/ui/assets/settings-DUCWbKbP.js +1 -0
  79. package/dist/ui/assets/{shared-xuI4eAiJ.js → shared-Da5f_jsc.js} +1 -1
  80. package/dist/ui/assets/{table-CxORHSk_.js → table-BCRYixSo.js} +1 -1
  81. package/dist/ui/assets/{tanstack-DcowkQHo.js → tanstack-BgSYOn90.js} +1 -1
  82. package/dist/ui/index.html +5 -5
  83. package/dist/utils/sensitive-keys.d.ts +35 -0
  84. package/dist/utils/sensitive-keys.d.ts.map +1 -0
  85. package/dist/utils/sensitive-keys.js +67 -0
  86. package/dist/utils/sensitive-keys.js.map +1 -0
  87. package/dist/utils/update-checker.d.ts.map +1 -1
  88. package/dist/utils/update-checker.js +4 -4
  89. package/dist/utils/update-checker.js.map +1 -1
  90. package/dist/web-server/routes.d.ts.map +1 -1
  91. package/dist/web-server/routes.js +306 -20
  92. package/dist/web-server/routes.js.map +1 -1
  93. package/dist/web-server/usage-disk-cache.d.ts +1 -1
  94. package/dist/web-server/usage-disk-cache.d.ts.map +1 -1
  95. package/dist/web-server/usage-disk-cache.js +8 -7
  96. package/dist/web-server/usage-disk-cache.js.map +1 -1
  97. package/package.json +3 -1
  98. package/dist/ui/assets/api-D4gcZ85I.js +0 -1
  99. package/dist/ui/assets/cliproxy-WthWDZC_.js +0 -1
  100. package/dist/ui/assets/dropdown-menu-B3eFx_YP.js +0 -1
  101. package/dist/ui/assets/health-BzK4Dd4z.js +0 -1
  102. package/dist/ui/assets/icons-CLZywnx1.js +0 -1
  103. package/dist/ui/assets/index-2ZBa_Kkt.css +0 -1
  104. package/dist/ui/assets/index-CWyYvwwn.js +0 -10
  105. package/dist/ui/assets/radix-ui-4P1Sa1Vh.js +0 -51
  106. package/dist/ui/assets/settings-DKL5mcjT.js +0 -1
@@ -1,51 +0,0 @@
1
- import{r as s,R as Kt,a as Gn,b as ui,c as ve}from"./react-vendor-CjrBBxxX.js";var At={exports:{}},Ie={};var hn;function fi(){if(hn)return Ie;hn=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,i){var a=null;if(i!==void 0&&(a=""+i),o.key!==void 0&&(a=""+o.key),"key"in o){i={};for(var c in o)c!=="key"&&(i[c]=o[c])}else i=o;return o=i.ref,{$$typeof:e,type:r,key:a,ref:o!==void 0?o:null,props:i}}return Ie.Fragment=t,Ie.jsx=n,Ie.jsxs=n,Ie}var gn;function di(){return gn||(gn=1,At.exports=fi()),At.exports}var p=di();function yn(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function fe(...e){return t=>{let n=!1;const r=e.map(o=>{const i=yn(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():yn(e[o],null)}}}}function $(...e){return s.useCallback(fe(...e),e)}var pi=Symbol.for("react.lazy"),rt=Kt[" use ".trim().toString()];function mi(e){return typeof e=="object"&&e!==null&&"then"in e}function Un(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===pi&&"_payload"in e&&mi(e._payload)}function Kn(e){const t=vi(e),n=s.forwardRef((r,o)=>{let{children:i,...a}=r;Un(i)&&typeof rt=="function"&&(i=rt(i._payload));const c=s.Children.toArray(i),l=c.find(gi);if(l){const u=l.props.children,f=c.map(d=>d===l?s.Children.count(u)>1?s.Children.only(null):s.isValidElement(u)?u.props.children:null:d);return p.jsx(t,{...a,ref:o,children:s.isValidElement(u)?s.cloneElement(u,void 0,f):null})}return p.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}var Gu=Kn("Slot");function vi(e){const t=s.forwardRef((n,r)=>{let{children:o,...i}=n;if(Un(o)&&typeof rt=="function"&&(o=rt(o._payload)),s.isValidElement(o)){const a=wi(o),c=yi(i,o.props);return o.type!==s.Fragment&&(c.ref=r?fe(r,a):a),s.cloneElement(o,c)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var hi=Symbol("radix.slottable");function gi(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===hi}function yi(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...c)=>{const l=i(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function wi(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)}function P(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function xi(e,t){const n=s.createContext(t),r=i=>{const{children:a,...c}=i,l=s.useMemo(()=>c,Object.values(c));return p.jsx(n.Provider,{value:l,children:a})};r.displayName=e+"Provider";function o(i){const a=s.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function de(e,t=[]){let n=[];function r(i,a){const c=s.createContext(a),l=n.length;n=[...n,a];const u=d=>{const{scope:m,children:v,...y}=d,h=m?.[e]?.[l]||c,g=s.useMemo(()=>y,Object.values(y));return p.jsx(h.Provider,{value:g,children:v})};u.displayName=i+"Provider";function f(d,m){const v=m?.[e]?.[l]||c,y=s.useContext(v);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[u,f]}const o=()=>{const i=n.map(a=>s.createContext(a));return function(c){const l=c?.[e]||i;return s.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return o.scopeName=e,[r,Ci(o,...t)]}function Ci(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((c,{useScope:l,scopeName:u})=>{const d=l(i)[`__scope${u}`];return{...c,...d}},{});return s.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var ce=globalThis?.document?s.useLayoutEffect:()=>{},bi=Kt[" useId ".trim().toString()]||(()=>{}),Ei=0;function he(e){const[t,n]=s.useState(bi());return ce(()=>{n(r=>r??String(Ei++))},[e]),t?`radix-${t}`:""}var Ri=Kt[" useInsertionEffect ".trim().toString()]||ce;function ft({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,a]=Si({defaultProp:t,onChange:n}),c=e!==void 0,l=c?e:o;{const f=s.useRef(e!==void 0);s.useEffect(()=>{const d=f.current;d!==c&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=c},[c,r])}const u=s.useCallback(f=>{if(c){const d=Ai(f)?f(e):f;d!==e&&a.current?.(d)}else i(f)},[c,e,i,a]);return[l,u]}function Si({defaultProp:e,onChange:t}){const[n,r]=s.useState(e),o=s.useRef(n),i=s.useRef(t);return Ri(()=>{i.current=t},[t]),s.useEffect(()=>{o.current!==n&&(i.current?.(n),o.current=n)},[n,o]),[n,r,i]}function Ai(e){return typeof e=="function"}function Pi(e){const t=Mi(e),n=s.forwardRef((r,o)=>{const{children:i,...a}=r,c=s.Children.toArray(i),l=c.find(Ti);if(l){const u=l.props.children,f=c.map(d=>d===l?s.Children.count(u)>1?s.Children.only(null):s.isValidElement(u)?u.props.children:null:d);return p.jsx(t,{...a,ref:o,children:s.isValidElement(u)?s.cloneElement(u,void 0,f):null})}return p.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function Mi(e){const t=s.forwardRef((n,r)=>{const{children:o,...i}=n;if(s.isValidElement(o)){const a=Oi(o),c=_i(i,o.props);return o.type!==s.Fragment&&(c.ref=r?fe(r,a):a),s.cloneElement(o,c)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Di=Symbol("radix.slottable");function Ti(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Di}function _i(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...c)=>{const l=i(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Oi(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 Ni=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],F=Ni.reduce((e,t)=>{const n=Pi(`Primitive.${t}`),r=s.forwardRef((o,i)=>{const{asChild:a,...c}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...c,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Yn(e,t){e&&Gn.flushSync(()=>e.dispatchEvent(t))}function re(e){const t=s.useRef(e);return s.useEffect(()=>{t.current=e}),s.useMemo(()=>(...n)=>t.current?.(...n),[])}function Ii(e,t=globalThis?.document){const n=re(e);s.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Li="DismissableLayer",Ft="dismissableLayer.update",ji="dismissableLayer.pointerDownOutside",Fi="dismissableLayer.focusOutside",wn,zn=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),dt=s.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:c,...l}=e,u=s.useContext(zn),[f,d]=s.useState(null),m=f?.ownerDocument??globalThis?.document,[,v]=s.useState({}),y=$(t,R=>d(R)),h=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=h.indexOf(g),C=f?h.indexOf(f):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,b=C>=w,E=Wi(R=>{const M=R.target,O=[...u.branches].some(T=>T.contains(M));!b||O||(o?.(R),a?.(R),R.defaultPrevented||c?.())},m),A=Bi(R=>{const M=R.target;[...u.branches].some(T=>T.contains(M))||(i?.(R),a?.(R),R.defaultPrevented||c?.())},m);return Ii(R=>{C===u.layers.size-1&&(r?.(R),!R.defaultPrevented&&c&&(R.preventDefault(),c()))},m),s.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(wn=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),xn(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=wn)}},[f,m,n,u]),s.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),xn())},[f,u]),s.useEffect(()=>{const R=()=>v({});return document.addEventListener(Ft,R),()=>document.removeEventListener(Ft,R)},[]),p.jsx(F.div,{...l,ref:y,style:{pointerEvents:x?b?"auto":"none":void 0,...e.style},onFocusCapture:P(e.onFocusCapture,A.onFocusCapture),onBlurCapture:P(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:P(e.onPointerDownCapture,E.onPointerDownCapture)})});dt.displayName=Li;var ki="DismissableLayerBranch",$i=s.forwardRef((e,t)=>{const n=s.useContext(zn),r=s.useRef(null),o=$(t,r);return s.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),p.jsx(F.div,{...e,ref:o})});$i.displayName=ki;function Wi(e,t=globalThis?.document){const n=re(e),r=s.useRef(!1),o=s.useRef(()=>{});return s.useEffect(()=>{const i=c=>{if(c.target&&!r.current){let l=function(){Xn(ji,n,u,{discrete:!0})};const u={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Bi(e,t=globalThis?.document){const n=re(e),r=s.useRef(!1);return s.useEffect(()=>{const o=i=>{i.target&&!r.current&&Xn(Fi,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function xn(){const e=new CustomEvent(Ft);document.dispatchEvent(e)}function Xn(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Yn(o,i):o.dispatchEvent(i)}var Pt="focusScope.autoFocusOnMount",Mt="focusScope.autoFocusOnUnmount",Cn={bubbles:!1,cancelable:!0},Vi="FocusScope",Yt=s.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[c,l]=s.useState(null),u=re(o),f=re(i),d=s.useRef(null),m=$(t,h=>l(h)),v=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect(()=>{if(r){let h=function(x){if(v.paused||!c)return;const b=x.target;c.contains(b)?d.current=b:ae(d.current,{select:!0})},g=function(x){if(v.paused||!c)return;const b=x.relatedTarget;b!==null&&(c.contains(b)||ae(d.current,{select:!0}))},w=function(x){if(document.activeElement===document.body)for(const E of x)E.removedNodes.length>0&&ae(c)};document.addEventListener("focusin",h),document.addEventListener("focusout",g);const C=new MutationObserver(w);return c&&C.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",g),C.disconnect()}}},[r,c,v.paused]),s.useEffect(()=>{if(c){En.add(v);const h=document.activeElement;if(!c.contains(h)){const w=new CustomEvent(Pt,Cn);c.addEventListener(Pt,u),c.dispatchEvent(w),w.defaultPrevented||(Hi(zi(qn(c)),{select:!0}),document.activeElement===h&&ae(c))}return()=>{c.removeEventListener(Pt,u),setTimeout(()=>{const w=new CustomEvent(Mt,Cn);c.addEventListener(Mt,f),c.dispatchEvent(w),w.defaultPrevented||ae(h??document.body,{select:!0}),c.removeEventListener(Mt,f),En.remove(v)},0)}}},[c,u,f,v]);const y=s.useCallback(h=>{if(!n&&!r||v.paused)return;const g=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,w=document.activeElement;if(g&&w){const C=h.currentTarget,[x,b]=Gi(C);x&&b?!h.shiftKey&&w===b?(h.preventDefault(),n&&ae(x,{select:!0})):h.shiftKey&&w===x&&(h.preventDefault(),n&&ae(b,{select:!0})):w===C&&h.preventDefault()}},[n,r,v.paused]);return p.jsx(F.div,{tabIndex:-1,...a,ref:m,onKeyDown:y})});Yt.displayName=Vi;function Hi(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ae(r,{select:t}),document.activeElement!==n)return}function Gi(e){const t=qn(e),n=bn(t,e),r=bn(t.reverse(),e);return[n,r]}function qn(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function bn(e,t){for(const n of e)if(!Ui(n,{upTo:t}))return n}function Ui(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 Ki(e){return e instanceof HTMLInputElement&&"select"in e}function ae(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Ki(e)&&t&&e.select()}}var En=Yi();function Yi(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Rn(e,t),e.unshift(t)},remove(t){e=Rn(e,t),e[0]?.resume()}}}function Rn(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function zi(e){return e.filter(t=>t.tagName!=="A")}var Xi="Portal",pt=s.forwardRef((e,t)=>{const{container:n,...r}=e,[o,i]=s.useState(!1);ce(()=>i(!0),[]);const a=n||o&&globalThis?.document?.body;return a?ui.createPortal(p.jsx(F.div,{...r,ref:t}),a):null});pt.displayName=Xi;function qi(e,t){return s.useReducer((n,r)=>t[n][r]??n,e)}var te=e=>{const{present:t,children:n}=e,r=Zi(t),o=typeof n=="function"?n({present:r.isPresent}):s.Children.only(n),i=$(r.ref,Ji(o));return typeof n=="function"||r.isPresent?s.cloneElement(o,{ref:i}):null};te.displayName="Presence";function Zi(e){const[t,n]=s.useState(),r=s.useRef(null),o=s.useRef(e),i=s.useRef("none"),a=e?"mounted":"unmounted",[c,l]=qi(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect(()=>{const u=ze(r.current);i.current=c==="mounted"?u:"none"},[c]),ce(()=>{const u=r.current,f=o.current;if(f!==e){const m=i.current,v=ze(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(f&&m!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),ce(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,d=v=>{const h=ze(r.current).includes(CSS.escape(v.animationName));if(v.target===t&&h&&(l("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},m=v=>{v.target===t&&(i.current=ze(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:s.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function ze(e){return e?.animationName||"none"}function Ji(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 Dt=0;function Zn(){s.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Sn()),document.body.insertAdjacentElement("beforeend",e[1]??Sn()),Dt++,()=>{Dt===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Dt--}},[])}function Sn(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Z=function(){return Z=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Z.apply(this,arguments)};function Jn(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 o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Qi(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var et="right-scroll-bar-position",tt="width-before-scroll-bar",es="with-scroll-bars-hidden",ts="--removed-body-scroll-bar-size";function Tt(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function ns(e,t){var n=s.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var rs=typeof window<"u"?s.useLayoutEffect:s.useEffect,An=new WeakMap;function os(e,t){var n=ns(null,function(r){return e.forEach(function(o){return Tt(o,r)})});return rs(function(){var r=An.get(n);if(r){var o=new Set(r),i=new Set(e),a=n.current;o.forEach(function(c){i.has(c)||Tt(c,null)}),i.forEach(function(c){o.has(c)||Tt(c,a)})}An.set(n,e)},[e]),n}function is(e){return e}function ss(e,t){t===void 0&&(t=is);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,r);return n.push(a),function(){n=n.filter(function(c){return c!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(c){return i(c)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var c=n;n=[],c.forEach(i),a=n}var l=function(){var f=a;a=[],f.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(f){a.push(f),u()},filter:function(f){return a=a.filter(f),n}}}};return o}function as(e){e===void 0&&(e={});var t=ss(null);return t.options=Z({async:!0,ssr:!1},e),t}var Qn=function(e){var t=e.sideCar,n=Jn(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return s.createElement(r,Z({},n))};Qn.isSideCarExport=!0;function cs(e,t){return e.useMedium(t),Qn}var er=as(),_t=function(){},mt=s.forwardRef(function(e,t){var n=s.useRef(null),r=s.useState({onScrollCapture:_t,onWheelCapture:_t,onTouchMoveCapture:_t}),o=r[0],i=r[1],a=e.forwardProps,c=e.children,l=e.className,u=e.removeScrollBar,f=e.enabled,d=e.shards,m=e.sideCar,v=e.noRelative,y=e.noIsolation,h=e.inert,g=e.allowPinchZoom,w=e.as,C=w===void 0?"div":w,x=e.gapMode,b=Jn(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=m,A=os([n,t]),R=Z(Z({},b),o);return s.createElement(s.Fragment,null,f&&s.createElement(E,{sideCar:er,removeScrollBar:u,shards:d,noRelative:v,noIsolation:y,inert:h,setCallbacks:i,allowPinchZoom:!!g,lockRef:n,gapMode:x}),a?s.cloneElement(s.Children.only(c),Z(Z({},R),{ref:A})):s.createElement(C,Z({},R,{className:l,ref:A}),c))});mt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};mt.classNames={fullWidth:tt,zeroRight:et};var ls=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function us(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ls();return t&&e.setAttribute("nonce",t),e}function fs(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ds(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ps=function(){var e=0,t=null;return{add:function(n){e==0&&(t=us())&&(fs(t,n),ds(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ms=function(){var e=ps();return function(t,n){s.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},tr=function(){var e=ms(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},vs={left:0,top:0,right:0,gap:0},Ot=function(e){return parseInt(e||"",10)||0},hs=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Ot(n),Ot(r),Ot(o)]},gs=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return vs;var t=hs(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])}},ys=tr(),Re="data-scroll-locked",ws=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,c=e.gap;return n===void 0&&(n="margin"),`
2
- .`.concat(es,` {
3
- overflow: hidden `).concat(r,`;
4
- padding-right: `).concat(c,"px ").concat(r,`;
5
- }
6
- body[`).concat(Re,`] {
7
- overflow: hidden `).concat(r,`;
8
- overscroll-behavior: contain;
9
- `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
10
- padding-left: `.concat(o,`px;
11
- padding-top: `).concat(i,`px;
12
- padding-right: `).concat(a,`px;
13
- margin-left:0;
14
- margin-top:0;
15
- margin-right: `).concat(c,"px ").concat(r,`;
16
- `),n==="padding"&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),`
17
- }
18
-
19
- .`).concat(et,` {
20
- right: `).concat(c,"px ").concat(r,`;
21
- }
22
-
23
- .`).concat(tt,` {
24
- margin-right: `).concat(c,"px ").concat(r,`;
25
- }
26
-
27
- .`).concat(et," .").concat(et,` {
28
- right: 0 `).concat(r,`;
29
- }
30
-
31
- .`).concat(tt," .").concat(tt,` {
32
- margin-right: 0 `).concat(r,`;
33
- }
34
-
35
- body[`).concat(Re,`] {
36
- `).concat(ts,": ").concat(c,`px;
37
- }
38
- `)},Pn=function(){var e=parseInt(document.body.getAttribute(Re)||"0",10);return isFinite(e)?e:0},xs=function(){s.useEffect(function(){return document.body.setAttribute(Re,(Pn()+1).toString()),function(){var e=Pn()-1;e<=0?document.body.removeAttribute(Re):document.body.setAttribute(Re,e.toString())}},[])},Cs=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;xs();var i=s.useMemo(function(){return gs(o)},[o]);return s.createElement(ys,{styles:ws(i,!t,o,n?"":"!important")})},kt=!1;if(typeof window<"u")try{var Xe=Object.defineProperty({},"passive",{get:function(){return kt=!0,!0}});window.addEventListener("test",Xe,Xe),window.removeEventListener("test",Xe,Xe)}catch{kt=!1}var Ce=kt?{passive:!1}:!1,bs=function(e){return e.tagName==="TEXTAREA"},nr=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!bs(e)&&n[t]==="visible")},Es=function(e){return nr(e,"overflowY")},Rs=function(e){return nr(e,"overflowX")},Mn=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=rr(e,r);if(o){var i=or(e,r),a=i[1],c=i[2];if(a>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Ss=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},As=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},rr=function(e,t){return e==="v"?Es(t):Rs(t)},or=function(e,t){return e==="v"?Ss(t):As(t)},Ps=function(e,t){return e==="h"&&t==="rtl"?-1:1},Ms=function(e,t,n,r,o){var i=Ps(e,window.getComputedStyle(t).direction),a=i*r,c=n.target,l=t.contains(c),u=!1,f=a>0,d=0,m=0;do{if(!c)break;var v=or(e,c),y=v[0],h=v[1],g=v[2],w=h-g-i*y;(y||w)&&rr(e,c)&&(d+=w,m+=y);var C=c.parentNode;c=C&&C.nodeType===Node.DOCUMENT_FRAGMENT_NODE?C.host:C}while(!l&&c!==document.body||l&&(t.contains(c)||t===c));return(f&&Math.abs(d)<1||!f&&Math.abs(m)<1)&&(u=!0),u},qe=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Dn=function(e){return[e.deltaX,e.deltaY]},Tn=function(e){return e&&"current"in e?e.current:e},Ds=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Ts=function(e){return`
39
- .block-interactivity-`.concat(e,` {pointer-events: none;}
40
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
41
- `)},_s=0,be=[];function Os(e){var t=s.useRef([]),n=s.useRef([0,0]),r=s.useRef(),o=s.useState(_s++)[0],i=s.useState(tr)[0],a=s.useRef(e);s.useEffect(function(){a.current=e},[e]),s.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=Qi([e.lockRef.current],(e.shards||[]).map(Tn),!0).filter(Boolean);return h.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var c=s.useCallback(function(h,g){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!a.current.allowPinchZoom;var w=qe(h),C=n.current,x="deltaX"in h?h.deltaX:C[0]-w[0],b="deltaY"in h?h.deltaY:C[1]-w[1],E,A=h.target,R=Math.abs(x)>Math.abs(b)?"h":"v";if("touches"in h&&R==="h"&&A.type==="range")return!1;var M=window.getSelection(),O=M&&M.anchorNode,T=O?O===A||O.contains(A):!1;if(T)return!1;var N=Mn(R,A);if(!N)return!0;if(N?E=R:(E=R==="v"?"h":"v",N=Mn(R,A)),!N)return!1;if(!r.current&&"changedTouches"in h&&(x||b)&&(r.current=E),!E)return!0;var L=r.current||E;return Ms(L,g,h,L==="h"?x:b)},[]),l=s.useCallback(function(h){var g=h;if(!(!be.length||be[be.length-1]!==i)){var w="deltaY"in g?Dn(g):qe(g),C=t.current.filter(function(E){return E.name===g.type&&(E.target===g.target||g.target===E.shadowParent)&&Ds(E.delta,w)})[0];if(C&&C.should){g.cancelable&&g.preventDefault();return}if(!C){var x=(a.current.shards||[]).map(Tn).filter(Boolean).filter(function(E){return E.contains(g.target)}),b=x.length>0?c(g,x[0]):!a.current.noIsolation;b&&g.cancelable&&g.preventDefault()}}},[]),u=s.useCallback(function(h,g,w,C){var x={name:h,delta:g,target:w,should:C,shadowParent:Ns(w)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(b){return b!==x})},1)},[]),f=s.useCallback(function(h){n.current=qe(h),r.current=void 0},[]),d=s.useCallback(function(h){u(h.type,Dn(h),h.target,c(h,e.lockRef.current))},[]),m=s.useCallback(function(h){u(h.type,qe(h),h.target,c(h,e.lockRef.current))},[]);s.useEffect(function(){return be.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:m}),document.addEventListener("wheel",l,Ce),document.addEventListener("touchmove",l,Ce),document.addEventListener("touchstart",f,Ce),function(){be=be.filter(function(h){return h!==i}),document.removeEventListener("wheel",l,Ce),document.removeEventListener("touchmove",l,Ce),document.removeEventListener("touchstart",f,Ce)}},[]);var v=e.removeScrollBar,y=e.inert;return s.createElement(s.Fragment,null,y?s.createElement(i,{styles:Ts(o)}):null,v?s.createElement(Cs,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ns(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Is=cs(er,Os);var zt=s.forwardRef(function(e,t){return s.createElement(mt,Z({},e,{ref:t,sideCar:Is}))});zt.classNames=mt.classNames;var Ls=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ee=new WeakMap,Ze=new WeakMap,Je={},Nt=0,ir=function(e){return e&&(e.host||ir(e.parentNode))},js=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=ir(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Fs=function(e,t,n,r){var o=js(t,Array.isArray(e)?e:[e]);Je[n]||(Je[n]=new WeakMap);var i=Je[n],a=[],c=new Set,l=new Set(o),u=function(d){!d||c.has(d)||(c.add(d),u(d.parentNode))};o.forEach(u);var f=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(m){if(c.has(m))f(m);else try{var v=m.getAttribute(r),y=v!==null&&v!=="false",h=(Ee.get(m)||0)+1,g=(i.get(m)||0)+1;Ee.set(m,h),i.set(m,g),a.push(m),h===1&&y&&Ze.set(m,!0),g===1&&m.setAttribute(n,"true"),y||m.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",m,w)}})};return f(t),c.clear(),Nt++,function(){a.forEach(function(d){var m=Ee.get(d)-1,v=i.get(d)-1;Ee.set(d,m),i.set(d,v),m||(Ze.has(d)||d.removeAttribute(r),Ze.delete(d)),v||d.removeAttribute(n)}),Nt--,Nt||(Ee=new WeakMap,Ee=new WeakMap,Ze=new WeakMap,Je={})}},sr=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Ls(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Fs(r,o,n,"aria-hidden")):function(){return null}};function ks(e){const t=$s(e),n=s.forwardRef((r,o)=>{const{children:i,...a}=r,c=s.Children.toArray(i),l=c.find(Bs);if(l){const u=l.props.children,f=c.map(d=>d===l?s.Children.count(u)>1?s.Children.only(null):s.isValidElement(u)?u.props.children:null:d);return p.jsx(t,{...a,ref:o,children:s.isValidElement(u)?s.cloneElement(u,void 0,f):null})}return p.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function $s(e){const t=s.forwardRef((n,r)=>{const{children:o,...i}=n;if(s.isValidElement(o)){const a=Hs(o),c=Vs(i,o.props);return o.type!==s.Fragment&&(c.ref=r?fe(r,a):a),s.cloneElement(o,c)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ws=Symbol("radix.slottable");function Bs(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ws}function Vs(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...c)=>{const l=i(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Hs(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 vt="Dialog",[ar,cr]=de(vt),[Gs,X]=ar(vt),lr=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,c=s.useRef(null),l=s.useRef(null),[u,f]=ft({prop:r,defaultProp:o??!1,onChange:i,caller:vt});return p.jsx(Gs,{scope:t,triggerRef:c,contentRef:l,contentId:he(),titleId:he(),descriptionId:he(),open:u,onOpenChange:f,onOpenToggle:s.useCallback(()=>f(d=>!d),[f]),modal:a,children:n})};lr.displayName=vt;var ur="DialogTrigger",fr=s.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=X(ur,n),i=$(t,o.triggerRef);return p.jsx(F.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Zt(o.open),...r,ref:i,onClick:P(e.onClick,o.onOpenToggle)})});fr.displayName=ur;var Xt="DialogPortal",[Us,dr]=ar(Xt,{forceMount:void 0}),pr=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=X(Xt,t);return p.jsx(Us,{scope:t,forceMount:n,children:s.Children.map(r,a=>p.jsx(te,{present:n||i.open,children:p.jsx(pt,{asChild:!0,container:o,children:a})}))})};pr.displayName=Xt;var ot="DialogOverlay",mr=s.forwardRef((e,t)=>{const n=dr(ot,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=X(ot,e.__scopeDialog);return i.modal?p.jsx(te,{present:r||i.open,children:p.jsx(Ys,{...o,ref:t})}):null});mr.displayName=ot;var Ks=ks("DialogOverlay.RemoveScroll"),Ys=s.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=X(ot,n);return p.jsx(zt,{as:Ks,allowPinchZoom:!0,shards:[o.contentRef],children:p.jsx(F.div,{"data-state":Zt(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),ge="DialogContent",vr=s.forwardRef((e,t)=>{const n=dr(ge,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=X(ge,e.__scopeDialog);return p.jsx(te,{present:r||i.open,children:i.modal?p.jsx(zs,{...o,ref:t}):p.jsx(Xs,{...o,ref:t})})});vr.displayName=ge;var zs=s.forwardRef((e,t)=>{const n=X(ge,e.__scopeDialog),r=s.useRef(null),o=$(t,n.contentRef,r);return s.useEffect(()=>{const i=r.current;if(i)return sr(i)},[]),p.jsx(hr,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:P(e.onCloseAutoFocus,i=>{i.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:P(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0;(a.button===2||c)&&i.preventDefault()}),onFocusOutside:P(e.onFocusOutside,i=>i.preventDefault())})}),Xs=s.forwardRef((e,t)=>{const n=X(ge,e.__scopeDialog),r=s.useRef(!1),o=s.useRef(!1);return p.jsx(hr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),i.defaultPrevented||(r.current||n.triggerRef.current?.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=i.target;n.triggerRef.current?.contains(a)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),hr=s.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,c=X(ge,n),l=s.useRef(null),u=$(t,l);return Zn(),p.jsxs(p.Fragment,{children:[p.jsx(Yt,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:p.jsx(dt,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":Zt(c.open),...a,ref:u,onDismiss:()=>c.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(Zs,{titleId:c.titleId}),p.jsx(Qs,{contentRef:l,descriptionId:c.descriptionId})]})]})}),qt="DialogTitle",gr=s.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=X(qt,n);return p.jsx(F.h2,{id:o.titleId,...r,ref:t})});gr.displayName=qt;var yr="DialogDescription",wr=s.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=X(yr,n);return p.jsx(F.p,{id:o.descriptionId,...r,ref:t})});wr.displayName=yr;var xr="DialogClose",Cr=s.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=X(xr,n);return p.jsx(F.button,{type:"button",...r,ref:t,onClick:P(e.onClick,()=>o.onOpenChange(!1))})});Cr.displayName=xr;function Zt(e){return e?"open":"closed"}var br="DialogTitleWarning",[qs,Er]=xi(br,{contentName:ge,titleName:qt,docsSlug:"dialog"}),Zs=({titleId:e})=>{const t=Er(br),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
42
-
43
- If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
44
-
45
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return s.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Js="DialogDescriptionWarning",Qs=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Er(Js).contentName}}.`;return s.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},ea=lr,ta=fr,na=pr,ra=mr,oa=vr,ia=gr,sa=wr,Rr=Cr;const aa=["top","right","bottom","left"],le=Math.min,G=Math.max,it=Math.round,Qe=Math.floor,Q=e=>({x:e,y:e}),ca={left:"right",right:"left",bottom:"top",top:"bottom"},la={start:"end",end:"start"};function $t(e,t,n){return G(e,le(t,n))}function oe(e,t){return typeof e=="function"?e(t):e}function ie(e){return e.split("-")[0]}function De(e){return e.split("-")[1]}function Jt(e){return e==="x"?"y":"x"}function Qt(e){return e==="y"?"height":"width"}const ua=new Set(["top","bottom"]);function J(e){return ua.has(ie(e))?"y":"x"}function en(e){return Jt(J(e))}function fa(e,t,n){n===void 0&&(n=!1);const r=De(e),o=en(e),i=Qt(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=st(a)),[a,st(a)]}function da(e){const t=st(e);return[Wt(e),t,Wt(t)]}function Wt(e){return e.replace(/start|end/g,t=>la[t])}const _n=["left","right"],On=["right","left"],pa=["top","bottom"],ma=["bottom","top"];function va(e,t,n){switch(e){case"top":case"bottom":return n?t?On:_n:t?_n:On;case"left":case"right":return t?pa:ma;default:return[]}}function ha(e,t,n,r){const o=De(e);let i=va(ie(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Wt)))),i}function st(e){return e.replace(/left|right|bottom|top/g,t=>ca[t])}function ga(e){return{top:0,right:0,bottom:0,left:0,...e}}function Sr(e){return typeof e!="number"?ga(e):{top:e,right:e,bottom:e,left:e}}function at(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Nn(e,t,n){let{reference:r,floating:o}=e;const i=J(t),a=en(t),c=Qt(a),l=ie(t),u=i==="y",f=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,m=r[c]/2-o[c]/2;let v;switch(l){case"top":v={x:f,y:r.y-o.height};break;case"bottom":v={x:f,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:d};break;case"left":v={x:r.x-o.width,y:d};break;default:v={x:r.x,y:r.y}}switch(De(t)){case"start":v[a]-=m*(n&&u?-1:1);break;case"end":v[a]+=m*(n&&u?-1:1);break}return v}const ya=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,c=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:d}=Nn(u,r,l),m=r,v={},y=0;for(let h=0;h<c.length;h++){const{name:g,fn:w}=c[h],{x:C,y:x,data:b,reset:E}=await w({x:f,y:d,initialPlacement:r,placement:m,strategy:o,middlewareData:v,rects:u,platform:a,elements:{reference:e,floating:t}});f=C??f,d=x??d,v={...v,[g]:{...v[g],...b}},E&&y<=50&&(y++,typeof E=="object"&&(E.placement&&(m=E.placement),E.rects&&(u=E.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:f,y:d}=Nn(u,m,l)),h=-1)}return{x:f,y:d,placement:m,strategy:o,middlewareData:v}};async function je(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:c,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:m=!1,padding:v=0}=oe(t,e),y=Sr(v),g=c[m?d==="floating"?"reference":"floating":d],w=at(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(g)))==null||n?g:g.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:u,rootBoundary:f,strategy:l})),C=d==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),b=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},E=at(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:C,offsetParent:x,strategy:l}):C);return{top:(w.top-E.top+y.top)/b.y,bottom:(E.bottom-w.bottom+y.bottom)/b.y,left:(w.left-E.left+y.left)/b.x,right:(E.right-w.right+y.right)/b.x}}const wa=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:c,middlewareData:l}=t,{element:u,padding:f=0}=oe(e,t)||{};if(u==null)return{};const d=Sr(f),m={x:n,y:r},v=en(o),y=Qt(v),h=await a.getDimensions(u),g=v==="y",w=g?"top":"left",C=g?"bottom":"right",x=g?"clientHeight":"clientWidth",b=i.reference[y]+i.reference[v]-m[v]-i.floating[y],E=m[v]-i.reference[v],A=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let R=A?A[x]:0;(!R||!await(a.isElement==null?void 0:a.isElement(A)))&&(R=c.floating[x]||i.floating[y]);const M=b/2-E/2,O=R/2-h[y]/2-1,T=le(d[w],O),N=le(d[C],O),L=T,j=R-h[y]-N,I=R/2-h[y]/2+M,B=$t(L,I,j),_=!l.arrow&&De(o)!=null&&I!==B&&i.reference[y]/2-(I<L?T:N)-h[y]/2<0,k=_?I<L?I-L:I-j:0;return{[v]:m[v]+k,data:{[v]:B,centerOffset:I-B-k,..._&&{alignmentOffset:k}},reset:_}}}),xa=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:c,platform:l,elements:u}=t,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:h=!0,...g}=oe(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const w=ie(o),C=J(c),x=ie(c)===c,b=await(l.isRTL==null?void 0:l.isRTL(u.floating)),E=m||(x||!h?[st(c)]:da(c)),A=y!=="none";!m&&A&&E.push(...ha(c,h,y,b));const R=[c,...E],M=await je(t,g),O=[];let T=((r=i.flip)==null?void 0:r.overflows)||[];if(f&&O.push(M[w]),d){const I=fa(o,a,b);O.push(M[I[0]],M[I[1]])}if(T=[...T,{placement:o,overflows:O}],!O.every(I=>I<=0)){var N,L;const I=(((N=i.flip)==null?void 0:N.index)||0)+1,B=R[I];if(B&&(!(d==="alignment"?C!==J(B):!1)||T.every(D=>J(D.placement)===C?D.overflows[0]>0:!0)))return{data:{index:I,overflows:T},reset:{placement:B}};let _=(L=T.filter(k=>k.overflows[0]<=0).sort((k,D)=>k.overflows[1]-D.overflows[1])[0])==null?void 0:L.placement;if(!_)switch(v){case"bestFit":{var j;const k=(j=T.filter(D=>{if(A){const S=J(D.placement);return S===C||S==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(S=>S>0).reduce((S,V)=>S+V,0)]).sort((D,S)=>D[1]-S[1])[0])==null?void 0:j[0];k&&(_=k);break}case"initialPlacement":_=c;break}if(o!==_)return{reset:{placement:_}}}return{}}}};function In(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ln(e){return aa.some(t=>e[t]>=0)}const Ca=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=oe(e,t);switch(r){case"referenceHidden":{const i=await je(t,{...o,elementContext:"reference"}),a=In(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Ln(a)}}}case"escaped":{const i=await je(t,{...o,altBoundary:!0}),a=In(i,n.floating);return{data:{escapedOffsets:a,escaped:Ln(a)}}}default:return{}}}}},Ar=new Set(["left","top"]);async function ba(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=ie(n),c=De(n),l=J(n)==="y",u=Ar.has(a)?-1:1,f=i&&l?-1:1,d=oe(t,e);let{mainAxis:m,crossAxis:v,alignmentAxis:y}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return c&&typeof y=="number"&&(v=c==="end"?y*-1:y),l?{x:v*f,y:m*u}:{x:m*u,y:v*f}}const Ea=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:c}=t,l=await ba(t,e);return a===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},Ra=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:c={fn:g=>{let{x:w,y:C}=g;return{x:w,y:C}}},...l}=oe(e,t),u={x:n,y:r},f=await je(t,l),d=J(ie(o)),m=Jt(d);let v=u[m],y=u[d];if(i){const g=m==="y"?"top":"left",w=m==="y"?"bottom":"right",C=v+f[g],x=v-f[w];v=$t(C,v,x)}if(a){const g=d==="y"?"top":"left",w=d==="y"?"bottom":"right",C=y+f[g],x=y-f[w];y=$t(C,y,x)}const h=c.fn({...t,[m]:v,[d]:y});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[m]:i,[d]:a}}}}}},Sa=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:c=0,mainAxis:l=!0,crossAxis:u=!0}=oe(e,t),f={x:n,y:r},d=J(o),m=Jt(d);let v=f[m],y=f[d];const h=oe(c,t),g=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){const x=m==="y"?"height":"width",b=i.reference[m]-i.floating[x]+g.mainAxis,E=i.reference[m]+i.reference[x]-g.mainAxis;v<b?v=b:v>E&&(v=E)}if(u){var w,C;const x=m==="y"?"width":"height",b=Ar.has(ie(o)),E=i.reference[d]-i.floating[x]+(b&&((w=a.offset)==null?void 0:w[d])||0)+(b?0:g.crossAxis),A=i.reference[d]+i.reference[x]+(b?0:((C=a.offset)==null?void 0:C[d])||0)-(b?g.crossAxis:0);y<E?y=E:y>A&&(y=A)}return{[m]:v,[d]:y}}}},Aa=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:c}=t,{apply:l=()=>{},...u}=oe(e,t),f=await je(t,u),d=ie(o),m=De(o),v=J(o)==="y",{width:y,height:h}=i.floating;let g,w;d==="top"||d==="bottom"?(g=d,w=m===(await(a.isRTL==null?void 0:a.isRTL(c.floating))?"start":"end")?"left":"right"):(w=d,g=m==="end"?"top":"bottom");const C=h-f.top-f.bottom,x=y-f.left-f.right,b=le(h-f[g],C),E=le(y-f[w],x),A=!t.middlewareData.shift;let R=b,M=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(R=C),A&&!m){const T=G(f.left,0),N=G(f.right,0),L=G(f.top,0),j=G(f.bottom,0);v?M=y-2*(T!==0||N!==0?T+N:G(f.left,f.right)):R=h-2*(L!==0||j!==0?L+j:G(f.top,f.bottom))}await l({...t,availableWidth:M,availableHeight:R});const O=await a.getDimensions(c.floating);return y!==O.width||h!==O.height?{reset:{rects:!0}}:{}}}};function ht(){return typeof window<"u"}function Te(e){return Pr(e)?(e.nodeName||"").toLowerCase():"#document"}function U(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ne(e){var t;return(t=(Pr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Pr(e){return ht()?e instanceof Node||e instanceof U(e).Node:!1}function Y(e){return ht()?e instanceof Element||e instanceof U(e).Element:!1}function ee(e){return ht()?e instanceof HTMLElement||e instanceof U(e).HTMLElement:!1}function jn(e){return!ht()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof U(e).ShadowRoot}const Pa=new Set(["inline","contents"]);function Be(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=z(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Pa.has(o)}const Ma=new Set(["table","td","th"]);function Da(e){return Ma.has(Te(e))}const Ta=[":popover-open",":modal"];function gt(e){return Ta.some(t=>{try{return e.matches(t)}catch{return!1}})}const _a=["transform","translate","scale","rotate","perspective"],Oa=["transform","translate","scale","rotate","perspective","filter"],Na=["paint","layout","strict","content"];function tn(e){const t=nn(),n=Y(e)?z(e):e;return _a.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Oa.some(r=>(n.willChange||"").includes(r))||Na.some(r=>(n.contain||"").includes(r))}function Ia(e){let t=ue(e);for(;ee(t)&&!Pe(t);){if(tn(t))return t;if(gt(t))return null;t=ue(t)}return null}function nn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const La=new Set(["html","body","#document"]);function Pe(e){return La.has(Te(e))}function z(e){return U(e).getComputedStyle(e)}function yt(e){return Y(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ue(e){if(Te(e)==="html")return e;const t=e.assignedSlot||e.parentNode||jn(e)&&e.host||ne(e);return jn(t)?t.host:t}function Mr(e){const t=ue(e);return Pe(t)?e.ownerDocument?e.ownerDocument.body:e.body:ee(t)&&Be(t)?t:Mr(t)}function Fe(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Mr(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=U(o);if(i){const c=Bt(a);return t.concat(a,a.visualViewport||[],Be(o)?o:[],c&&n?Fe(c):[])}return t.concat(o,Fe(o,[],n))}function Bt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Dr(e){const t=z(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ee(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,c=it(n)!==i||it(r)!==a;return c&&(n=i,r=a),{width:n,height:r,$:c}}function rn(e){return Y(e)?e:e.contextElement}function Se(e){const t=rn(e);if(!ee(t))return Q(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Dr(t);let a=(i?it(n.width):n.width)/r,c=(i?it(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!c||!Number.isFinite(c))&&(c=1),{x:a,y:c}}const ja=Q(0);function Tr(e){const t=U(e);return!nn()||!t.visualViewport?ja:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Fa(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==U(e)?!1:t}function ye(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=rn(e);let a=Q(1);t&&(r?Y(r)&&(a=Se(r)):a=Se(e));const c=Fa(i,n,r)?Tr(i):Q(0);let l=(o.left+c.x)/a.x,u=(o.top+c.y)/a.y,f=o.width/a.x,d=o.height/a.y;if(i){const m=U(i),v=r&&Y(r)?U(r):r;let y=m,h=Bt(y);for(;h&&r&&v!==y;){const g=Se(h),w=h.getBoundingClientRect(),C=z(h),x=w.left+(h.clientLeft+parseFloat(C.paddingLeft))*g.x,b=w.top+(h.clientTop+parseFloat(C.paddingTop))*g.y;l*=g.x,u*=g.y,f*=g.x,d*=g.y,l+=x,u+=b,y=U(h),h=Bt(y)}}return at({width:f,height:d,x:l,y:u})}function wt(e,t){const n=yt(e).scrollLeft;return t?t.left+n:ye(ne(e)).left+n}function _r(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-wt(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function ka(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=ne(r),c=t?gt(t.floating):!1;if(r===a||c&&i)return n;let l={scrollLeft:0,scrollTop:0},u=Q(1);const f=Q(0),d=ee(r);if((d||!d&&!i)&&((Te(r)!=="body"||Be(a))&&(l=yt(r)),ee(r))){const v=ye(r);u=Se(r),f.x=v.x+r.clientLeft,f.y=v.y+r.clientTop}const m=a&&!d&&!i?_r(a,l):Q(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+f.x+m.x,y:n.y*u.y-l.scrollTop*u.y+f.y+m.y}}function $a(e){return Array.from(e.getClientRects())}function Wa(e){const t=ne(e),n=yt(e),r=e.ownerDocument.body,o=G(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=G(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+wt(e);const c=-n.scrollTop;return z(r).direction==="rtl"&&(a+=G(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:c}}const Fn=25;function Ba(e,t){const n=U(e),r=ne(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,c=0,l=0;if(o){i=o.width,a=o.height;const f=nn();(!f||f&&t==="fixed")&&(c=o.offsetLeft,l=o.offsetTop)}const u=wt(r);if(u<=0){const f=r.ownerDocument,d=f.body,m=getComputedStyle(d),v=f.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,y=Math.abs(r.clientWidth-d.clientWidth-v);y<=Fn&&(i-=y)}else u<=Fn&&(i+=u);return{width:i,height:a,x:c,y:l}}const Va=new Set(["absolute","fixed"]);function Ha(e,t){const n=ye(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ee(e)?Se(e):Q(1),a=e.clientWidth*i.x,c=e.clientHeight*i.y,l=o*i.x,u=r*i.y;return{width:a,height:c,x:l,y:u}}function kn(e,t,n){let r;if(t==="viewport")r=Ba(e,n);else if(t==="document")r=Wa(ne(e));else if(Y(t))r=Ha(t,n);else{const o=Tr(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return at(r)}function Or(e,t){const n=ue(e);return n===t||!Y(n)||Pe(n)?!1:z(n).position==="fixed"||Or(n,t)}function Ga(e,t){const n=t.get(e);if(n)return n;let r=Fe(e,[],!1).filter(c=>Y(c)&&Te(c)!=="body"),o=null;const i=z(e).position==="fixed";let a=i?ue(e):e;for(;Y(a)&&!Pe(a);){const c=z(a),l=tn(a);!l&&c.position==="fixed"&&(o=null),(i?!l&&!o:!l&&c.position==="static"&&!!o&&Va.has(o.position)||Be(a)&&!l&&Or(e,a))?r=r.filter(f=>f!==a):o=c,a=ue(a)}return t.set(e,r),r}function Ua(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?gt(t)?[]:Ga(t,this._c):[].concat(n),r],c=a[0],l=a.reduce((u,f)=>{const d=kn(t,f,o);return u.top=G(d.top,u.top),u.right=le(d.right,u.right),u.bottom=le(d.bottom,u.bottom),u.left=G(d.left,u.left),u},kn(t,c,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Ka(e){const{width:t,height:n}=Dr(e);return{width:t,height:n}}function Ya(e,t,n){const r=ee(t),o=ne(t),i=n==="fixed",a=ye(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const l=Q(0);function u(){l.x=wt(o)}if(r||!r&&!i)if((Te(t)!=="body"||Be(o))&&(c=yt(t)),r){const v=ye(t,!0,i,t);l.x=v.x+t.clientLeft,l.y=v.y+t.clientTop}else o&&u();i&&!r&&o&&u();const f=o&&!r&&!i?_r(o,c):Q(0),d=a.left+c.scrollLeft-l.x-f.x,m=a.top+c.scrollTop-l.y-f.y;return{x:d,y:m,width:a.width,height:a.height}}function It(e){return z(e).position==="static"}function $n(e,t){if(!ee(e)||z(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ne(e)===n&&(n=n.ownerDocument.body),n}function Nr(e,t){const n=U(e);if(gt(e))return n;if(!ee(e)){let o=ue(e);for(;o&&!Pe(o);){if(Y(o)&&!It(o))return o;o=ue(o)}return n}let r=$n(e,t);for(;r&&Da(r)&&It(r);)r=$n(r,t);return r&&Pe(r)&&It(r)&&!tn(r)?n:r||Ia(e)||n}const za=async function(e){const t=this.getOffsetParent||Nr,n=this.getDimensions,r=await n(e.floating);return{reference:Ya(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Xa(e){return z(e).direction==="rtl"}const qa={convertOffsetParentRelativeRectToViewportRelativeRect:ka,getDocumentElement:ne,getClippingRect:Ua,getOffsetParent:Nr,getElementRects:za,getClientRects:$a,getDimensions:Ka,getScale:Se,isElement:Y,isRTL:Xa};function Ir(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Za(e,t){let n=null,r;const o=ne(e);function i(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function a(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),i();const u=e.getBoundingClientRect(),{left:f,top:d,width:m,height:v}=u;if(c||t(),!m||!v)return;const y=Qe(d),h=Qe(o.clientWidth-(f+m)),g=Qe(o.clientHeight-(d+v)),w=Qe(f),x={rootMargin:-y+"px "+-h+"px "+-g+"px "+-w+"px",threshold:G(0,le(1,l))||1};let b=!0;function E(A){const R=A[0].intersectionRatio;if(R!==l){if(!b)return a();R?a(!1,R):r=setTimeout(()=>{a(!1,1e-7)},1e3)}R===1&&!Ir(u,e.getBoundingClientRect())&&a(),b=!1}try{n=new IntersectionObserver(E,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,x)}n.observe(e)}return a(!0),i}function Ja(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=rn(e),f=o||i?[...u?Fe(u):[],...Fe(t)]:[];f.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),i&&w.addEventListener("resize",n)});const d=u&&c?Za(u,n):null;let m=-1,v=null;a&&(v=new ResizeObserver(w=>{let[C]=w;C&&C.target===u&&v&&(v.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var x;(x=v)==null||x.observe(t)})),n()}),u&&!l&&v.observe(u),v.observe(t));let y,h=l?ye(e):null;l&&g();function g(){const w=ye(e);h&&!Ir(h,w)&&n(),h=w,y=requestAnimationFrame(g)}return n(),()=>{var w;f.forEach(C=>{o&&C.removeEventListener("scroll",n),i&&C.removeEventListener("resize",n)}),d?.(),(w=v)==null||w.disconnect(),v=null,l&&cancelAnimationFrame(y)}}const Qa=Ea,ec=Ra,tc=xa,nc=Aa,rc=Ca,Wn=wa,oc=Sa,ic=(e,t,n)=>{const r=new Map,o={platform:qa,...n},i={...o.platform,_c:r};return ya(e,t,{...o,platform:i})};var sc=typeof document<"u",ac=function(){},nt=sc?s.useLayoutEffect:ac;function ct(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ct(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!ct(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Lr(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Bn(e,t){const n=Lr(e);return Math.round(t*n)/n}function Lt(e){const t=s.useRef(e);return nt(()=>{t.current=e}),t}function cc(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:c=!0,whileElementsMounted:l,open:u}=e,[f,d]=s.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,v]=s.useState(r);ct(m,r)||v(r);const[y,h]=s.useState(null),[g,w]=s.useState(null),C=s.useCallback(D=>{D!==A.current&&(A.current=D,h(D))},[]),x=s.useCallback(D=>{D!==R.current&&(R.current=D,w(D))},[]),b=i||y,E=a||g,A=s.useRef(null),R=s.useRef(null),M=s.useRef(f),O=l!=null,T=Lt(l),N=Lt(o),L=Lt(u),j=s.useCallback(()=>{if(!A.current||!R.current)return;const D={placement:t,strategy:n,middleware:m};N.current&&(D.platform=N.current),ic(A.current,R.current,D).then(S=>{const V={...S,isPositioned:L.current!==!1};I.current&&!ct(M.current,V)&&(M.current=V,Gn.flushSync(()=>{d(V)}))})},[m,t,n,N,L]);nt(()=>{u===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,d(D=>({...D,isPositioned:!1})))},[u]);const I=s.useRef(!1);nt(()=>(I.current=!0,()=>{I.current=!1}),[]),nt(()=>{if(b&&(A.current=b),E&&(R.current=E),b&&E){if(T.current)return T.current(b,E,j);j()}},[b,E,j,T,O]);const B=s.useMemo(()=>({reference:A,floating:R,setReference:C,setFloating:x}),[C,x]),_=s.useMemo(()=>({reference:b,floating:E}),[b,E]),k=s.useMemo(()=>{const D={position:n,left:0,top:0};if(!_.floating)return D;const S=Bn(_.floating,f.x),V=Bn(_.floating,f.y);return c?{...D,transform:"translate("+S+"px, "+V+"px)",...Lr(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:S,top:V}},[n,c,_.floating,f.x,f.y]);return s.useMemo(()=>({...f,update:j,refs:B,elements:_,floatingStyles:k}),[f,j,B,_,k])}const lc=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Wn({element:r.current,padding:o}).fn(n):{}:r?Wn({element:r,padding:o}).fn(n):{}}}},uc=(e,t)=>({...Qa(e),options:[e,t]}),fc=(e,t)=>({...ec(e),options:[e,t]}),dc=(e,t)=>({...oc(e),options:[e,t]}),pc=(e,t)=>({...tc(e),options:[e,t]}),mc=(e,t)=>({...nc(e),options:[e,t]}),vc=(e,t)=>({...rc(e),options:[e,t]}),hc=(e,t)=>({...lc(e),options:[e,t]});var gc="Arrow",jr=s.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return p.jsx(F.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});jr.displayName=gc;var yc=jr;function wc(e){const[t,n]=s.useState(void 0);return ce(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,c;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,c=u.blockSize}else a=e.offsetWidth,c=e.offsetHeight;n({width:a,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var on="Popper",[Fr,xt]=de(on),[xc,kr]=Fr(on),$r=e=>{const{__scopePopper:t,children:n}=e,[r,o]=s.useState(null);return p.jsx(xc,{scope:t,anchor:r,onAnchorChange:o,children:n})};$r.displayName=on;var Wr="PopperAnchor",Br=s.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=kr(Wr,n),a=s.useRef(null),c=$(t,a),l=s.useRef(null);return s.useEffect(()=>{const u=l.current;l.current=r?.current||a.current,u!==l.current&&i.onAnchorChange(l.current)}),r?null:p.jsx(F.div,{...o,ref:c})});Br.displayName=Wr;var sn="PopperContent",[Cc,bc]=Fr(sn),Vr=s.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:a=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:m=!1,updatePositionStrategy:v="optimized",onPlaced:y,...h}=e,g=kr(sn,n),[w,C]=s.useState(null),x=$(t,W=>C(W)),[b,E]=s.useState(null),A=wc(b),R=A?.width??0,M=A?.height??0,O=r+(i!=="center"?"-"+i:""),T=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},N=Array.isArray(u)?u:[u],L=N.length>0,j={padding:T,boundary:N.filter(Rc),altBoundary:L},{refs:I,floatingStyles:B,placement:_,isPositioned:k,middlewareData:D}=cc({strategy:"fixed",placement:O,whileElementsMounted:(...W)=>Ja(...W,{animationFrame:v==="always"}),elements:{reference:g.anchor},middleware:[uc({mainAxis:o+M,alignmentAxis:a}),l&&fc({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?dc():void 0,...j}),l&&pc({...j}),mc({...j,apply:({elements:W,rects:Ne,availableWidth:si,availableHeight:ai})=>{const{width:ci,height:li}=Ne.reference,Ye=W.floating.style;Ye.setProperty("--radix-popper-available-width",`${si}px`),Ye.setProperty("--radix-popper-available-height",`${ai}px`),Ye.setProperty("--radix-popper-anchor-width",`${ci}px`),Ye.setProperty("--radix-popper-anchor-height",`${li}px`)}}),b&&hc({element:b,padding:c}),Sc({arrowWidth:R,arrowHeight:M}),m&&vc({strategy:"referenceHidden",...j})]}),[S,V]=Ur(_),q=re(y);ce(()=>{k&&q?.()},[k,q]);const pe=D.arrow?.x,_e=D.arrow?.y,Oe=D.arrow?.centerOffset!==0,[Ke,me]=s.useState();return ce(()=>{w&&me(window.getComputedStyle(w).zIndex)},[w]),p.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:k?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ke,"--radix-popper-transform-origin":[D.transformOrigin?.x,D.transformOrigin?.y].join(" "),...D.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(Cc,{scope:n,placedSide:S,onArrowChange:E,arrowX:pe,arrowY:_e,shouldHideArrow:Oe,children:p.jsx(F.div,{"data-side":S,"data-align":V,...h,ref:x,style:{...h.style,animation:k?void 0:"none"}})})})});Vr.displayName=sn;var Hr="PopperArrow",Ec={top:"bottom",right:"left",bottom:"top",left:"right"},Gr=s.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=bc(Hr,r),a=Ec[i.placedSide];return p.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:p.jsx(yc,{...o,ref:n,style:{...o.style,display:"block"}})})});Gr.displayName=Hr;function Rc(e){return e!==null}var Sc=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,a=o.arrow?.centerOffset!==0,c=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[u,f]=Ur(n),d={start:"0%",center:"50%",end:"100%"}[f],m=(o.arrow?.x??0)+c/2,v=(o.arrow?.y??0)+l/2;let y="",h="";return u==="bottom"?(y=a?d:`${m}px`,h=`${-l}px`):u==="top"?(y=a?d:`${m}px`,h=`${r.floating.height+l}px`):u==="right"?(y=`${-l}px`,h=a?d:`${v}px`):u==="left"&&(y=`${r.floating.width+l}px`,h=a?d:`${v}px`),{data:{x:y,y:h}}}});function Ur(e){const[t,n="center"]=e.split("-");return[t,n]}var Kr=$r,Yr=Br,zr=Vr,Xr=Gr,Ac=Symbol("radix.slottable");function Pc(e){const t=({children:n})=>p.jsx(p.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Ac,t}var Mc=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"}),Dc="VisuallyHidden",qr=s.forwardRef((e,t)=>p.jsx(F.span,{...e,ref:t,style:{...Mc,...e.style}}));qr.displayName=Dc;var Tc=qr,[Ct]=de("Tooltip",[xt]),bt=xt(),Zr="TooltipProvider",_c=700,Vt="tooltip.open",[Oc,an]=Ct(Zr),Jr=e=>{const{__scopeTooltip:t,delayDuration:n=_c,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,a=s.useRef(!0),c=s.useRef(!1),l=s.useRef(0);return s.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),p.jsx(Oc,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:s.useCallback(()=>{window.clearTimeout(l.current),a.current=!1},[]),onClose:s.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.current=!0,r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:s.useCallback(u=>{c.current=u},[]),disableHoverableContent:o,children:i})};Jr.displayName=Zr;var ke="Tooltip",[Nc,Ve]=Ct(ke),Qr=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:i,disableHoverableContent:a,delayDuration:c}=e,l=an(ke,e.__scopeTooltip),u=bt(t),[f,d]=s.useState(null),m=he(),v=s.useRef(0),y=a??l.disableHoverableContent,h=c??l.delayDuration,g=s.useRef(!1),[w,C]=ft({prop:r,defaultProp:o??!1,onChange:R=>{R?(l.onOpen(),document.dispatchEvent(new CustomEvent(Vt))):l.onClose(),i?.(R)},caller:ke}),x=s.useMemo(()=>w?g.current?"delayed-open":"instant-open":"closed",[w]),b=s.useCallback(()=>{window.clearTimeout(v.current),v.current=0,g.current=!1,C(!0)},[C]),E=s.useCallback(()=>{window.clearTimeout(v.current),v.current=0,C(!1)},[C]),A=s.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{g.current=!0,C(!0),v.current=0},h)},[h,C]);return s.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),p.jsx(Kr,{...u,children:p.jsx(Nc,{scope:t,contentId:m,open:w,stateAttribute:x,trigger:f,onTriggerChange:d,onTriggerEnter:s.useCallback(()=>{l.isOpenDelayedRef.current?A():b()},[l.isOpenDelayedRef,A,b]),onTriggerLeave:s.useCallback(()=>{y?E():(window.clearTimeout(v.current),v.current=0)},[E,y]),onOpen:b,onClose:E,disableHoverableContent:y,children:n})})};Qr.displayName=ke;var Ht="TooltipTrigger",eo=s.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ve(Ht,n),i=an(Ht,n),a=bt(n),c=s.useRef(null),l=$(t,c,o.onTriggerChange),u=s.useRef(!1),f=s.useRef(!1),d=s.useCallback(()=>u.current=!1,[]);return s.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),p.jsx(Yr,{asChild:!0,...a,children:p.jsx(F.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:P(e.onPointerMove,m=>{m.pointerType!=="touch"&&!f.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:P(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:P(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:P(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:P(e.onBlur,o.onClose),onClick:P(e.onClick,o.onClose)})})});eo.displayName=Ht;var cn="TooltipPortal",[Ic,Lc]=Ct(cn,{forceMount:void 0}),to=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,i=Ve(cn,t);return p.jsx(Ic,{scope:t,forceMount:n,children:p.jsx(te,{present:n||i.open,children:p.jsx(pt,{asChild:!0,container:o,children:r})})})};to.displayName=cn;var Me="TooltipContent",no=s.forwardRef((e,t)=>{const n=Lc(Me,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,a=Ve(Me,e.__scopeTooltip);return p.jsx(te,{present:r||a.open,children:a.disableHoverableContent?p.jsx(ro,{side:o,...i,ref:t}):p.jsx(jc,{side:o,...i,ref:t})})}),jc=s.forwardRef((e,t)=>{const n=Ve(Me,e.__scopeTooltip),r=an(Me,e.__scopeTooltip),o=s.useRef(null),i=$(t,o),[a,c]=s.useState(null),{trigger:l,onClose:u}=n,f=o.current,{onPointerInTransitChange:d}=r,m=s.useCallback(()=>{c(null),d(!1)},[d]),v=s.useCallback((y,h)=>{const g=y.currentTarget,w={x:y.clientX,y:y.clientY},C=Wc(w,g.getBoundingClientRect()),x=Bc(w,C),b=Vc(h.getBoundingClientRect()),E=Gc([...x,...b]);c(E),d(!0)},[d]);return s.useEffect(()=>()=>m(),[m]),s.useEffect(()=>{if(l&&f){const y=g=>v(g,f),h=g=>v(g,l);return l.addEventListener("pointerleave",y),f.addEventListener("pointerleave",h),()=>{l.removeEventListener("pointerleave",y),f.removeEventListener("pointerleave",h)}}},[l,f,v,m]),s.useEffect(()=>{if(a){const y=h=>{const g=h.target,w={x:h.clientX,y:h.clientY},C=l?.contains(g)||f?.contains(g),x=!Hc(w,a);C?m():x&&(m(),u())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[l,f,a,u,m]),p.jsx(ro,{...e,ref:i})}),[Fc,kc]=Ct(ke,{isInside:!1}),$c=Pc("TooltipContent"),ro=s.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...c}=e,l=Ve(Me,n),u=bt(n),{onClose:f}=l;return s.useEffect(()=>(document.addEventListener(Vt,f),()=>document.removeEventListener(Vt,f)),[f]),s.useEffect(()=>{if(l.trigger){const d=m=>{m.target?.contains(l.trigger)&&f()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,f]),p.jsx(dt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:f,children:p.jsxs(zr,{"data-state":l.stateAttribute,...u,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx($c,{children:r}),p.jsx(Fc,{scope:n,isInside:!0,children:p.jsx(Tc,{id:l.contentId,role:"tooltip",children:o||r})})]})})});no.displayName=Me;var oo="TooltipArrow",io=s.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=bt(n);return kc(oo,n).isInside?null:p.jsx(Xr,{...o,...r,ref:t})});io.displayName=oo;function Wc(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Bc(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Vc(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function Hc(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const c=t[i],l=t[a],u=c.x,f=c.y,d=l.x,m=l.y;f>r!=m>r&&n<(d-u)*(r-f)/(m-f)+u&&(o=!o)}return o}function Gc(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Uc(t)}function Uc(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],a=n[n.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Uu=Jr,Ku=Qr,Yu=eo,zu=to,Xu=no,qu=io;function Vn(e){const t=Kc(e),n=s.forwardRef((r,o)=>{const{children:i,...a}=r,c=s.Children.toArray(i),l=c.find(zc);if(l){const u=l.props.children,f=c.map(d=>d===l?s.Children.count(u)>1?s.Children.only(null):s.isValidElement(u)?u.props.children:null:d);return p.jsx(t,{...a,ref:o,children:s.isValidElement(u)?s.cloneElement(u,void 0,f):null})}return p.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function Kc(e){const t=s.forwardRef((n,r)=>{const{children:o,...i}=n;if(s.isValidElement(o)){const a=qc(o),c=Xc(i,o.props);return o.type!==s.Fragment&&(c.ref=r?fe(r,a):a),s.cloneElement(o,c)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Yc=Symbol("radix.slottable");function zc(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Yc}function Xc(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...c)=>{const l=i(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function qc(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)}function so(e){const t=e+"CollectionProvider",[n,r]=de(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=h=>{const{scope:g,children:w}=h,C=ve.useRef(null),x=ve.useRef(new Map).current;return p.jsx(o,{scope:g,itemMap:x,collectionRef:C,children:w})};a.displayName=t;const c=e+"CollectionSlot",l=Vn(c),u=ve.forwardRef((h,g)=>{const{scope:w,children:C}=h,x=i(c,w),b=$(g,x.collectionRef);return p.jsx(l,{ref:b,children:C})});u.displayName=c;const f=e+"CollectionItemSlot",d="data-radix-collection-item",m=Vn(f),v=ve.forwardRef((h,g)=>{const{scope:w,children:C,...x}=h,b=ve.useRef(null),E=$(g,b),A=i(f,w);return ve.useEffect(()=>(A.itemMap.set(b,{ref:b,...x}),()=>void A.itemMap.delete(b))),p.jsx(m,{[d]:"",ref:E,children:C})});v.displayName=f;function y(h){const g=i(e+"CollectionConsumer",h);return ve.useCallback(()=>{const C=g.collectionRef.current;if(!C)return[];const x=Array.from(C.querySelectorAll(`[${d}]`));return Array.from(g.itemMap.values()).sort((A,R)=>x.indexOf(A.ref.current)-x.indexOf(R.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:a,Slot:u,ItemSlot:v},y,r]}var Zc=s.createContext(void 0);function ao(e){const t=s.useContext(Zc);return e||t||"ltr"}var jt="rovingFocusGroup.onEntryFocus",Jc={bubbles:!1,cancelable:!0},He="RovingFocusGroup",[Gt,co,Qc]=so(He),[el,lo]=de(He,[Qc]),[tl,nl]=el(He),uo=s.forwardRef((e,t)=>p.jsx(Gt.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Gt.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(rl,{...e,ref:t})})}));uo.displayName=He;var rl=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...d}=e,m=s.useRef(null),v=$(t,m),y=ao(i),[h,g]=ft({prop:a,defaultProp:c??null,onChange:l,caller:He}),[w,C]=s.useState(!1),x=re(u),b=co(n),E=s.useRef(!1),[A,R]=s.useState(0);return s.useEffect(()=>{const M=m.current;if(M)return M.addEventListener(jt,x),()=>M.removeEventListener(jt,x)},[x]),p.jsx(tl,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:h,onItemFocus:s.useCallback(M=>g(M),[g]),onItemShiftTab:s.useCallback(()=>C(!0),[]),onFocusableItemAdd:s.useCallback(()=>R(M=>M+1),[]),onFocusableItemRemove:s.useCallback(()=>R(M=>M-1),[]),children:p.jsx(F.div,{tabIndex:w||A===0?-1:0,"data-orientation":r,...d,ref:v,style:{outline:"none",...e.style},onMouseDown:P(e.onMouseDown,()=>{E.current=!0}),onFocus:P(e.onFocus,M=>{const O=!E.current;if(M.target===M.currentTarget&&O&&!w){const T=new CustomEvent(jt,Jc);if(M.currentTarget.dispatchEvent(T),!T.defaultPrevented){const N=b().filter(_=>_.focusable),L=N.find(_=>_.active),j=N.find(_=>_.id===h),B=[L,j,...N].filter(Boolean).map(_=>_.ref.current);mo(B,f)}}E.current=!1}),onBlur:P(e.onBlur,()=>C(!1))})})}),fo="RovingFocusGroupItem",po=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,children:a,...c}=e,l=he(),u=i||l,f=nl(fo,n),d=f.currentTabStopId===u,m=co(n),{onFocusableItemAdd:v,onFocusableItemRemove:y,currentTabStopId:h}=f;return s.useEffect(()=>{if(r)return v(),()=>y()},[r,v,y]),p.jsx(Gt.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:p.jsx(F.span,{tabIndex:d?0:-1,"data-orientation":f.orientation,...c,ref:t,onMouseDown:P(e.onMouseDown,g=>{r?f.onItemFocus(u):g.preventDefault()}),onFocus:P(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:P(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){f.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const w=sl(g,f.orientation,f.dir);if(w!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let x=m().filter(b=>b.focusable).map(b=>b.ref.current);if(w==="last")x.reverse();else if(w==="prev"||w==="next"){w==="prev"&&x.reverse();const b=x.indexOf(g.currentTarget);x=f.loop?al(x,b+1):x.slice(b+1)}setTimeout(()=>mo(x))}}),children:typeof a=="function"?a({isCurrentTabStop:d,hasTabStop:h!=null}):a})})});po.displayName=fo;var ol={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function il(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function sl(e,t,n){const r=il(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return ol[r]}function mo(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function al(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var cl=uo,ll=po;function ul(e){const t=fl(e),n=s.forwardRef((r,o)=>{const{children:i,...a}=r,c=s.Children.toArray(i),l=c.find(pl);if(l){const u=l.props.children,f=c.map(d=>d===l?s.Children.count(u)>1?s.Children.only(null):s.isValidElement(u)?u.props.children:null:d);return p.jsx(t,{...a,ref:o,children:s.isValidElement(u)?s.cloneElement(u,void 0,f):null})}return p.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function fl(e){const t=s.forwardRef((n,r)=>{const{children:o,...i}=n;if(s.isValidElement(o)){const a=vl(o),c=ml(i,o.props);return o.type!==s.Fragment&&(c.ref=r?fe(r,a):a),s.cloneElement(o,c)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var dl=Symbol("radix.slottable");function pl(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===dl}function ml(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...c)=>{const l=i(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function vl(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 Ut=["Enter"," "],hl=["ArrowDown","PageUp","Home"],vo=["ArrowUp","PageDown","End"],gl=[...hl,...vo],yl={ltr:[...Ut,"ArrowRight"],rtl:[...Ut,"ArrowLeft"]},wl={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ge="Menu",[$e,xl,Cl]=so(Ge),[we,ho]=de(Ge,[Cl,xt,lo]),Et=xt(),go=lo(),[bl,xe]=we(Ge),[El,Ue]=we(Ge),yo=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:i,modal:a=!0}=e,c=Et(t),[l,u]=s.useState(null),f=s.useRef(!1),d=re(i),m=ao(o);return s.useEffect(()=>{const v=()=>{f.current=!0,document.addEventListener("pointerdown",y,{capture:!0,once:!0}),document.addEventListener("pointermove",y,{capture:!0,once:!0})},y=()=>f.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",y,{capture:!0}),document.removeEventListener("pointermove",y,{capture:!0})}},[]),p.jsx(Kr,{...c,children:p.jsx(bl,{scope:t,open:n,onOpenChange:d,content:l,onContentChange:u,children:p.jsx(El,{scope:t,onClose:s.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:f,dir:m,modal:a,children:r})})})};yo.displayName=Ge;var Rl="MenuAnchor",ln=s.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Et(n);return p.jsx(Yr,{...o,...r,ref:t})});ln.displayName=Rl;var un="MenuPortal",[Sl,wo]=we(un,{forceMount:void 0}),xo=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,i=xe(un,t);return p.jsx(Sl,{scope:t,forceMount:n,children:p.jsx(te,{present:n||i.open,children:p.jsx(pt,{asChild:!0,container:o,children:r})})})};xo.displayName=un;var K="MenuContent",[Al,fn]=we(K),Co=s.forwardRef((e,t)=>{const n=wo(K,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=xe(K,e.__scopeMenu),a=Ue(K,e.__scopeMenu);return p.jsx($e.Provider,{scope:e.__scopeMenu,children:p.jsx(te,{present:r||i.open,children:p.jsx($e.Slot,{scope:e.__scopeMenu,children:a.modal?p.jsx(Pl,{...o,ref:t}):p.jsx(Ml,{...o,ref:t})})})})}),Pl=s.forwardRef((e,t)=>{const n=xe(K,e.__scopeMenu),r=s.useRef(null),o=$(t,r);return s.useEffect(()=>{const i=r.current;if(i)return sr(i)},[]),p.jsx(dn,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:P(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Ml=s.forwardRef((e,t)=>{const n=xe(K,e.__scopeMenu);return p.jsx(dn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Dl=ul("MenuContent.ScrollLock"),dn=s.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:c,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:m,onDismiss:v,disableOutsideScroll:y,...h}=e,g=xe(K,n),w=Ue(K,n),C=Et(n),x=go(n),b=xl(n),[E,A]=s.useState(null),R=s.useRef(null),M=$(t,R,g.onContentChange),O=s.useRef(0),T=s.useRef(""),N=s.useRef(0),L=s.useRef(null),j=s.useRef("right"),I=s.useRef(0),B=y?zt:s.Fragment,_=y?{as:Dl,allowPinchZoom:!0}:void 0,k=S=>{const V=T.current+S,q=b().filter(W=>!W.disabled),pe=document.activeElement,_e=q.find(W=>W.ref.current===pe)?.textValue,Oe=q.map(W=>W.textValue),Ke=Bl(Oe,V,_e),me=q.find(W=>W.textValue===Ke)?.ref.current;(function W(Ne){T.current=Ne,window.clearTimeout(O.current),Ne!==""&&(O.current=window.setTimeout(()=>W(""),1e3))})(V),me&&setTimeout(()=>me.focus())};s.useEffect(()=>()=>window.clearTimeout(O.current),[]),Zn();const D=s.useCallback(S=>j.current===L.current?.side&&Hl(S,L.current?.area),[]);return p.jsx(Al,{scope:n,searchRef:T,onItemEnter:s.useCallback(S=>{D(S)&&S.preventDefault()},[D]),onItemLeave:s.useCallback(S=>{D(S)||(R.current?.focus(),A(null))},[D]),onTriggerLeave:s.useCallback(S=>{D(S)&&S.preventDefault()},[D]),pointerGraceTimerRef:N,onPointerGraceIntentChange:s.useCallback(S=>{L.current=S},[]),children:p.jsx(B,{..._,children:p.jsx(Yt,{asChild:!0,trapped:o,onMountAutoFocus:P(i,S=>{S.preventDefault(),R.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:p.jsx(dt,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:m,onDismiss:v,children:p.jsx(cl,{asChild:!0,...x,dir:w.dir,orientation:"vertical",loop:r,currentTabStopId:E,onCurrentTabStopIdChange:A,onEntryFocus:P(l,S=>{w.isUsingKeyboardRef.current||S.preventDefault()}),preventScrollOnEntryFocus:!0,children:p.jsx(zr,{role:"menu","aria-orientation":"vertical","data-state":Fo(g.open),"data-radix-menu-content":"",dir:w.dir,...C,...h,ref:M,style:{outline:"none",...h.style},onKeyDown:P(h.onKeyDown,S=>{const q=S.target.closest("[data-radix-menu-content]")===S.currentTarget,pe=S.ctrlKey||S.altKey||S.metaKey,_e=S.key.length===1;q&&(S.key==="Tab"&&S.preventDefault(),!pe&&_e&&k(S.key));const Oe=R.current;if(S.target!==Oe||!gl.includes(S.key))return;S.preventDefault();const me=b().filter(W=>!W.disabled).map(W=>W.ref.current);vo.includes(S.key)&&me.reverse(),$l(me)}),onBlur:P(e.onBlur,S=>{S.currentTarget.contains(S.target)||(window.clearTimeout(O.current),T.current="")}),onPointerMove:P(e.onPointerMove,We(S=>{const V=S.target,q=I.current!==S.clientX;if(S.currentTarget.contains(V)&&q){const pe=S.clientX>I.current?"right":"left";j.current=pe,I.current=S.clientX}}))})})})})})})});Co.displayName=K;var Tl="MenuGroup",pn=s.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(F.div,{role:"group",...r,ref:t})});pn.displayName=Tl;var _l="MenuLabel",bo=s.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(F.div,{...r,ref:t})});bo.displayName=_l;var lt="MenuItem",Hn="menu.itemSelect",Rt=s.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,i=s.useRef(null),a=Ue(lt,e.__scopeMenu),c=fn(lt,e.__scopeMenu),l=$(t,i),u=s.useRef(!1),f=()=>{const d=i.current;if(!n&&d){const m=new CustomEvent(Hn,{bubbles:!0,cancelable:!0});d.addEventListener(Hn,v=>r?.(v),{once:!0}),Yn(d,m),m.defaultPrevented?u.current=!1:a.onClose()}};return p.jsx(Eo,{...o,ref:l,disabled:n,onClick:P(e.onClick,f),onPointerDown:d=>{e.onPointerDown?.(d),u.current=!0},onPointerUp:P(e.onPointerUp,d=>{u.current||d.currentTarget?.click()}),onKeyDown:P(e.onKeyDown,d=>{const m=c.searchRef.current!=="";n||m&&d.key===" "||Ut.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});Rt.displayName=lt;var Eo=s.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...i}=e,a=fn(lt,n),c=go(n),l=s.useRef(null),u=$(t,l),[f,d]=s.useState(!1),[m,v]=s.useState("");return s.useEffect(()=>{const y=l.current;y&&v((y.textContent??"").trim())},[i.children]),p.jsx($e.ItemSlot,{scope:n,disabled:r,textValue:o??m,children:p.jsx(ll,{asChild:!0,...c,focusable:!r,children:p.jsx(F.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:u,onPointerMove:P(e.onPointerMove,We(y=>{r?a.onItemLeave(y):(a.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:P(e.onPointerLeave,We(y=>a.onItemLeave(y))),onFocus:P(e.onFocus,()=>d(!0)),onBlur:P(e.onBlur,()=>d(!1))})})})}),Ol="MenuCheckboxItem",Ro=s.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return p.jsx(Do,{scope:e.__scopeMenu,checked:n,children:p.jsx(Rt,{role:"menuitemcheckbox","aria-checked":ut(n)?"mixed":n,...o,ref:t,"data-state":vn(n),onSelect:P(o.onSelect,()=>r?.(ut(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Ro.displayName=Ol;var So="MenuRadioGroup",[Nl,Il]=we(So,{value:void 0,onValueChange:()=>{}}),Ao=s.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,i=re(r);return p.jsx(Nl,{scope:e.__scopeMenu,value:n,onValueChange:i,children:p.jsx(pn,{...o,ref:t})})});Ao.displayName=So;var Po="MenuRadioItem",Mo=s.forwardRef((e,t)=>{const{value:n,...r}=e,o=Il(Po,e.__scopeMenu),i=n===o.value;return p.jsx(Do,{scope:e.__scopeMenu,checked:i,children:p.jsx(Rt,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":vn(i),onSelect:P(r.onSelect,()=>o.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Mo.displayName=Po;var mn="MenuItemIndicator",[Do,Ll]=we(mn,{checked:!1}),To=s.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,i=Ll(mn,n);return p.jsx(te,{present:r||ut(i.checked)||i.checked===!0,children:p.jsx(F.span,{...o,ref:t,"data-state":vn(i.checked)})})});To.displayName=mn;var jl="MenuSeparator",_o=s.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(F.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});_o.displayName=jl;var Fl="MenuArrow",Oo=s.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Et(n);return p.jsx(Xr,{...o,...r,ref:t})});Oo.displayName=Fl;var kl="MenuSub",[Zu,No]=we(kl),Le="MenuSubTrigger",Io=s.forwardRef((e,t)=>{const n=xe(Le,e.__scopeMenu),r=Ue(Le,e.__scopeMenu),o=No(Le,e.__scopeMenu),i=fn(Le,e.__scopeMenu),a=s.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:l}=i,u={__scopeMenu:e.__scopeMenu},f=s.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return s.useEffect(()=>f,[f]),s.useEffect(()=>{const d=c.current;return()=>{window.clearTimeout(d),l(null)}},[c,l]),p.jsx(ln,{asChild:!0,...u,children:p.jsx(Eo,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Fo(n.open),...e,ref:fe(t,o.onTriggerChange),onClick:d=>{e.onClick?.(d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:P(e.onPointerMove,We(d=>{i.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(i.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:P(e.onPointerLeave,We(d=>{f();const m=n.content?.getBoundingClientRect();if(m){const v=n.content?.dataset.side,y=v==="right",h=y?-5:5,g=m[y?"left":"right"],w=m[y?"right":"left"];i.onPointerGraceIntentChange({area:[{x:d.clientX+h,y:d.clientY},{x:g,y:m.top},{x:w,y:m.top},{x:w,y:m.bottom},{x:g,y:m.bottom}],side:v}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(d),d.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:P(e.onKeyDown,d=>{const m=i.searchRef.current!=="";e.disabled||m&&d.key===" "||yl[r.dir].includes(d.key)&&(n.onOpenChange(!0),n.content?.focus(),d.preventDefault())})})})});Io.displayName=Le;var Lo="MenuSubContent",jo=s.forwardRef((e,t)=>{const n=wo(K,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=xe(K,e.__scopeMenu),a=Ue(K,e.__scopeMenu),c=No(Lo,e.__scopeMenu),l=s.useRef(null),u=$(t,l);return p.jsx($e.Provider,{scope:e.__scopeMenu,children:p.jsx(te,{present:r||i.open,children:p.jsx($e.Slot,{scope:e.__scopeMenu,children:p.jsx(dn,{id:c.contentId,"aria-labelledby":c.triggerId,...o,ref:u,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{a.isUsingKeyboardRef.current&&l.current?.focus(),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:P(e.onFocusOutside,f=>{f.target!==c.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:P(e.onEscapeKeyDown,f=>{a.onClose(),f.preventDefault()}),onKeyDown:P(e.onKeyDown,f=>{const d=f.currentTarget.contains(f.target),m=wl[a.dir].includes(f.key);d&&m&&(i.onOpenChange(!1),c.trigger?.focus(),f.preventDefault())})})})})})});jo.displayName=Lo;function Fo(e){return e?"open":"closed"}function ut(e){return e==="indeterminate"}function vn(e){return ut(e)?"indeterminate":e?"checked":"unchecked"}function $l(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Wl(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Bl(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let a=Wl(e,Math.max(i,0));o.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function Vl(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const c=t[i],l=t[a],u=c.x,f=c.y,d=l.x,m=l.y;f>r!=m>r&&n<(d-u)*(r-f)/(m-f)+u&&(o=!o)}return o}function Hl(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Vl(n,t)}function We(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Gl=yo,Ul=ln,Kl=xo,Yl=Co,zl=pn,Xl=bo,ql=Rt,Zl=Ro,Jl=Ao,Ql=Mo,eu=To,tu=_o,nu=Oo,ru=Io,ou=jo,St="DropdownMenu",[iu]=de(St,[ho]),H=ho(),[su,ko]=iu(St),$o=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:i,onOpenChange:a,modal:c=!0}=e,l=H(t),u=s.useRef(null),[f,d]=ft({prop:o,defaultProp:i??!1,onChange:a,caller:St});return p.jsx(su,{scope:t,triggerId:he(),triggerRef:u,contentId:he(),open:f,onOpenChange:d,onOpenToggle:s.useCallback(()=>d(m=>!m),[d]),modal:c,children:p.jsx(Gl,{...l,open:f,onOpenChange:d,dir:r,modal:c,children:n})})};$o.displayName=St;var Wo="DropdownMenuTrigger",Bo=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,i=ko(Wo,n),a=H(n);return p.jsx(Ul,{asChild:!0,...a,children:p.jsx(F.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:fe(t,i.triggerRef),onPointerDown:P(e.onPointerDown,c=>{!r&&c.button===0&&c.ctrlKey===!1&&(i.onOpenToggle(),i.open||c.preventDefault())}),onKeyDown:P(e.onKeyDown,c=>{r||(["Enter"," "].includes(c.key)&&i.onOpenToggle(),c.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});Bo.displayName=Wo;var au="DropdownMenuPortal",Vo=e=>{const{__scopeDropdownMenu:t,...n}=e,r=H(t);return p.jsx(Kl,{...r,...n})};Vo.displayName=au;var Ho="DropdownMenuContent",Go=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ko(Ho,n),i=H(n),a=s.useRef(!1);return p.jsx(Yl,{id:o.contentId,"aria-labelledby":o.triggerId,...i,...r,ref:t,onCloseAutoFocus:P(e.onCloseAutoFocus,c=>{a.current||o.triggerRef.current?.focus(),a.current=!1,c.preventDefault()}),onInteractOutside:P(e.onInteractOutside,c=>{const l=c.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,f=l.button===2||u;(!o.modal||f)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Go.displayName=Ho;var cu="DropdownMenuGroup",lu=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=H(n);return p.jsx(zl,{...o,...r,ref:t})});lu.displayName=cu;var uu="DropdownMenuLabel",fu=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=H(n);return p.jsx(Xl,{...o,...r,ref:t})});fu.displayName=uu;var du="DropdownMenuItem",Uo=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=H(n);return p.jsx(ql,{...o,...r,ref:t})});Uo.displayName=du;var pu="DropdownMenuCheckboxItem",mu=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=H(n);return p.jsx(Zl,{...o,...r,ref:t})});mu.displayName=pu;var vu="DropdownMenuRadioGroup",hu=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=H(n);return p.jsx(Jl,{...o,...r,ref:t})});hu.displayName=vu;var gu="DropdownMenuRadioItem",yu=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=H(n);return p.jsx(Ql,{...o,...r,ref:t})});yu.displayName=gu;var wu="DropdownMenuItemIndicator",xu=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=H(n);return p.jsx(eu,{...o,...r,ref:t})});xu.displayName=wu;var Cu="DropdownMenuSeparator",Ko=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=H(n);return p.jsx(tu,{...o,...r,ref:t})});Ko.displayName=Cu;var bu="DropdownMenuArrow",Eu=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=H(n);return p.jsx(nu,{...o,...r,ref:t})});Eu.displayName=bu;var Ru="DropdownMenuSubTrigger",Su=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=H(n);return p.jsx(ru,{...o,...r,ref:t})});Su.displayName=Ru;var Au="DropdownMenuSubContent",Pu=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=H(n);return p.jsx(ou,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Pu.displayName=Au;var Ju=$o,Qu=Bo,ef=Vo,tf=Go,nf=Uo,rf=Ko,Mu=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Du=Mu.reduce((e,t)=>{const n=Kn(`Primitive.${t}`),r=s.forwardRef((o,i)=>{const{asChild:a,...c}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...c,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Tu="Label",Yo=s.forwardRef((e,t)=>p.jsx(Du.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Yo.displayName=Tu;var of=Yo,_u=Symbol("radix.slottable");function Ou(e){const t=({children:n})=>p.jsx(p.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=_u,t}var zo="AlertDialog",[Nu]=de(zo,[cr]),se=cr(),Xo=e=>{const{__scopeAlertDialog:t,...n}=e,r=se(t);return p.jsx(ea,{...r,...n,modal:!0})};Xo.displayName=zo;var Iu="AlertDialogTrigger",Lu=s.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=se(n);return p.jsx(ta,{...o,...r,ref:t})});Lu.displayName=Iu;var ju="AlertDialogPortal",qo=e=>{const{__scopeAlertDialog:t,...n}=e,r=se(t);return p.jsx(na,{...r,...n})};qo.displayName=ju;var Fu="AlertDialogOverlay",Zo=s.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=se(n);return p.jsx(ra,{...o,...r,ref:t})});Zo.displayName=Fu;var Ae="AlertDialogContent",[ku,$u]=Nu(Ae),Wu=Ou("AlertDialogContent"),Jo=s.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...o}=e,i=se(n),a=s.useRef(null),c=$(t,a),l=s.useRef(null);return p.jsx(qs,{contentName:Ae,titleName:Qo,docsSlug:"alert-dialog",children:p.jsx(ku,{scope:n,cancelRef:l,children:p.jsxs(oa,{role:"alertdialog",...i,...o,ref:c,onOpenAutoFocus:P(o.onOpenAutoFocus,u=>{u.preventDefault(),l.current?.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[p.jsx(Wu,{children:r}),p.jsx(Vu,{contentRef:a})]})})})});Jo.displayName=Ae;var Qo="AlertDialogTitle",ei=s.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=se(n);return p.jsx(ia,{...o,...r,ref:t})});ei.displayName=Qo;var ti="AlertDialogDescription",ni=s.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=se(n);return p.jsx(sa,{...o,...r,ref:t})});ni.displayName=ti;var Bu="AlertDialogAction",ri=s.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=se(n);return p.jsx(Rr,{...o,...r,ref:t})});ri.displayName=Bu;var oi="AlertDialogCancel",ii=s.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:o}=$u(oi,n),i=se(n),a=$(t,o);return p.jsx(Rr,{...i,...r,ref:a})});ii.displayName=oi;var Vu=({contentRef:e})=>{const t=`\`${Ae}\` requires a description for the component to be accessible for screen reader users.
46
-
47
- You can add a description to the \`${Ae}\` by passing a \`${ti}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
48
-
49
- Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Ae}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
50
-
51
- For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return s.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},sf=Xo,af=qo,cf=Zo,lf=Jo,uf=ri,ff=ii,df=ei,pf=ni;export{nf as $,qu as A,dt as B,oa as C,sa as D,zr as E,Yt as F,Kr as G,Yr as H,ll as I,Xr as J,sf as K,lf as L,df as M,pf as N,ra as O,na as P,ff as Q,ea as R,Gu as S,ia as T,uf as U,af as V,cf as W,Ju as X,Qu as Y,ef as Z,tf as _,Rr as a,rf as a0,Uu as b,Ku as c,Yu as d,zu as e,Xu as f,de as g,he as h,F as i,p as j,P as k,te as l,$ as m,ce as n,of as o,lo as p,cl as q,ao as r,re as s,fe as t,ft as u,pt as v,xt as w,sr as x,zt as y,Zn as z};
@@ -1 +0,0 @@
1
- import{j as e}from"./radix-ui-4P1Sa1Vh.js";import{C as s,e as t,f as r,a as i,B as a}from"./index-CWyYvwwn.js";import{Y as l,m as o}from"./icons-CLZywnx1.js";import{L as n}from"./react-vendor-CjrBBxxX.js";import"./tanstack-DcowkQHo.js";import"./form-utils-DKkU3nz7.js";function j(){return e.jsxs("div",{className:"p-6 max-w-6xl mx-auto space-y-8",children:[e.jsx("h1",{className:"text-2xl font-bold",children:"Settings"}),e.jsxs(s,{className:"border-yellow-500/50 bg-yellow-500/5",children:[e.jsx(t,{children:e.jsxs(r,{className:"flex items-center gap-2 text-yellow-600",children:[e.jsx(l,{className:"w-5 h-5"}),"Page Relocated"]})}),e.jsxs(i,{className:"space-y-4",children:[e.jsxs("p",{className:"text-muted-foreground",children:["The settings editor has been integrated into the ",e.jsx("strong",{children:"API Profiles"})," page for a better user experience."]}),e.jsx("p",{className:"text-muted-foreground",children:"To edit environment variables for a profile:"}),e.jsxs("ol",{className:"list-decimal list-inside text-muted-foreground space-y-1 ml-2",children:[e.jsx("li",{children:"Go to API Profiles page"}),e.jsx("li",{children:"Click the actions menu (...) on any profile"}),e.jsx("li",{children:'Select "Edit Settings"'})]}),e.jsx("div",{className:"pt-2",children:e.jsx(a,{asChild:!0,children:e.jsxs(n,{to:"/api",children:["Go to API Profiles",e.jsx(o,{className:"w-4 h-4 ml-2"})]})})})]})]})]})}export{j as SettingsPage};