ryugi-artifacts 1.108.6 → 1.108.7

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 (115) hide show
  1. package/dist/cli.cjs +8 -8
  2. package/dist/document-engine.cjs +1 -1
  3. package/dist/runtime/Figtree-OFL.txt +93 -0
  4. package/dist/runtime/ryugi-mockup.js +270 -2
  5. package/dist/runtime/ryugi-preview-bridge.js +2 -2
  6. package/dist/runtime/ryugi-ui.js +1 -1
  7. package/dist/server.cjs +93 -93
  8. package/dist/viewer/{AgentDock-BMyCZfOA.js → AgentDock-fdzdI0YU.js} +1 -1
  9. package/dist/viewer/{ArtboardLayout-Ca63S-ht.js → ArtboardLayout-CyP7z5iV.js} +1 -1
  10. package/dist/viewer/{ArtifactList-CyHqaLMU.js → ArtifactList-D1Cv2wcz.js} +1 -1
  11. package/dist/viewer/{ArtifactModal-CNcJ9SwG.js → ArtifactModal-BRPuHjh3.js} +1 -1
  12. package/dist/viewer/{BottomSheet-CPpAPNxv.js → BottomSheet-DksTxPPS.js} +1 -1
  13. package/dist/viewer/{Canvas-CZAIguUl.js → Canvas-DA9wKktu.js} +1 -1
  14. package/dist/viewer/{CommentPopover-SiWZ0XbH.js → CommentPopover-Bz3qXsBS.js} +1 -1
  15. package/dist/viewer/{DocumentExportMenu-D3KMkrvj.js → DocumentExportMenu-Cb03PJdE.js} +1 -1
  16. package/dist/viewer/DocumentLayout-16zcY3cg.js +2 -0
  17. package/dist/viewer/DocumentPage-B__O7sY3.js +3 -0
  18. package/dist/viewer/{DraggablePanel-GsMby8P2.js → DraggablePanel-BlNQ_JOj.js} +1 -1
  19. package/dist/viewer/{DropdownMenu-BXvqn_bX.js → DropdownMenu-DhVZ3e22.js} +1 -1
  20. package/dist/viewer/Figtree-OFL.txt +93 -0
  21. package/dist/viewer/{GroupVerdict-DWVpUZS_.js → GroupVerdict-DkOR7Neo.js} +1 -1
  22. package/dist/viewer/{HtmlLayout-DlU3MyPC.js → HtmlLayout-BQS68lEe.js} +1 -1
  23. package/dist/viewer/{Input-vV0jo5B6.js → Input-YumXWTse.js} +1 -1
  24. package/dist/viewer/{MenuSubmenuTrigger-BaYw4HuY.js → MenuSubmenuTrigger-DZ2Nb6Hm.js} +1 -1
  25. package/dist/viewer/{PhoneArtboardBar-DWHrTBZF.js → PhoneArtboardBar-CZKL18gK.js} +1 -1
  26. package/dist/viewer/{Popover-BRvZS1gZ.js → Popover-i0m3nwq7.js} +1 -1
  27. package/dist/viewer/{PreviewArtifactLayout-neL_d_3n.js → PreviewArtifactLayout-B4SZfLvw.js} +1 -1
  28. package/dist/viewer/PreviewLayout-DiIQthoy.js +2 -0
  29. package/dist/viewer/{ReportLayout-BLVLfLGU.js → ReportLayout-DPnqWYPZ.js} +1 -1
  30. package/dist/viewer/{RyugiMark-d0ZfdfP2.js → RyugiMark-Ch2tF00h.js} +1 -1
  31. package/dist/viewer/{Segmented-BIBgIkNi.js → Segmented-BV_iofkK.js} +1 -1
  32. package/dist/viewer/{SelectScrollUpArrow-DNQWHWMc.js → SelectScrollUpArrow-BNSyHMPX.js} +1 -1
  33. package/dist/viewer/{SlidesLayout-MGWpipwc.js → SlidesLayout-CSeSindR.js} +3 -3
  34. package/dist/viewer/{SnapshotDocument-DX9wLXWv.js → SnapshotDocument-TIzAsI0l.js} +1 -1
  35. package/dist/viewer/{SplitFrame-CiqjUPs6.js → SplitFrame-C3Mr0Ehv.js} +1 -1
  36. package/dist/viewer/{StoryboardLayout-BkntJIHV.js → StoryboardLayout-DZVJbnzc.js} +1 -1
  37. package/dist/viewer/{StoryboardRender-BniWnBGv.js → StoryboardRender-DORxY44d.js} +1 -1
  38. package/dist/viewer/{ThreadView-WZruOpTE.js → ThreadView-CbKzFwUf.js} +1 -1
  39. package/dist/viewer/{Tooltip-DKnMl1yQ.js → Tooltip-81DgA1Zr.js} +1 -1
  40. package/dist/viewer/{VerifyLayout-Bjh7Ddzn.js → VerifyLayout--deiRi4o.js} +1 -1
  41. package/dist/viewer/{VirtualizedEditor-uWe43zaI-DIyWJhFX.js → VirtualizedEditor-uWe43zaI-1EQ0fdB8.js} +1 -1
  42. package/dist/viewer/{VirtualizedRenderer-C_d95FXi-BkojOMeR.js → VirtualizedRenderer-C_d95FXi-CixG8E4F.js} +1 -1
  43. package/dist/viewer/{WarningsBadge-B0H-6XNv.js → WarningsBadge-fEXkyk3t.js} +1 -1
  44. package/dist/viewer/{WhiteboardEditor-cZ32fLqJ-DfASNG0e.js → WhiteboardEditor-cZ32fLqJ-BRt-wSEn.js} +2 -2
  45. package/dist/viewer/WhiteboardLayout-qGm-CExy.js +4 -0
  46. package/dist/viewer/{WritingCursor-B1KstzsM.js → WritingCursor-OdCSWg_M.js} +1 -1
  47. package/dist/viewer/{agentLook-DAbDap_r.js → agentLook-EhrjbD1n.js} +1 -1
  48. package/dist/viewer/{artifact-list-Dk7B04aS.js → artifact-list-D22lTyyh.js} +1 -1
  49. package/dist/viewer/{auto-publish-D0gnAgNH.js → auto-publish-BXmqx8BX.js} +1 -1
  50. package/dist/viewer/{channel-W8z1JRUp.js → channel-CaUFZV2H.js} +3 -3
  51. package/dist/viewer/{crop-encode-jcaJuFwz.js → crop-encode-Udgh8S7r.js} +1 -1
  52. package/dist/viewer/{dist-8GuhHKSd.js → dist-0JlH-iFk.js} +1 -1
  53. package/dist/viewer/{dist-DKWGY7vW.js → dist-B-RrlmaY.js} +1 -1
  54. package/dist/viewer/{dist-e32bsEFO.js → dist-BMJWStKC.js} +1 -1
  55. package/dist/viewer/{dist-hskNTNrk.js → dist-BNiHzkc8.js} +1 -1
  56. package/dist/viewer/{dist-D5w5f0nx.js → dist-C0Fbwkds.js} +1 -1
  57. package/dist/viewer/{dist-DdWP5O5Z.js → dist-C4fPBi1f.js} +1 -1
  58. package/dist/viewer/{dist-BLDdWa7l.js → dist-C81vCo2L.js} +1 -1
  59. package/dist/viewer/dist-CY11yEtD.js +1 -0
  60. package/dist/viewer/{dist-DzgE9d65.js → dist-CjVeWopx.js} +1 -1
  61. package/dist/viewer/{dist-BKKpgaMc.js → dist-CuWYFfBf.js} +1 -1
  62. package/dist/viewer/{dist-CilrySXL.js → dist-DBnvEq5g.js} +1 -1
  63. package/dist/viewer/{dist-IX2iT14j.js → dist-DD00JDtU.js} +1 -1
  64. package/dist/viewer/{dist-B6IVYls_.js → dist-DKWARfq1.js} +1 -1
  65. package/dist/viewer/{dist-BTzyPMeC.js → dist-DRUJxMS6.js} +1 -1
  66. package/dist/viewer/{dist-C6DCB_Rj.js → dist-DRmbQ1f0.js} +1 -1
  67. package/dist/viewer/{dist-EFdcYRKe.js → dist-DurHsNXj.js} +1 -1
  68. package/dist/viewer/{dist-DE-DH2i7.js → dist-DzmIJXNR.js} +1 -1
  69. package/dist/viewer/{dist-CqeeTfim.js → dist-G4Vj4mFX.js} +1 -1
  70. package/dist/viewer/{dist-DNO7AZoy.js → dist-R6N8uqUg.js} +1 -1
  71. package/dist/viewer/{dist-BC8nvFq2.js → dist-i-_vhfnL.js} +1 -1
  72. package/dist/viewer/{dist-Bpgppm6o.js → dist-kzNj8Wks.js} +1 -1
  73. package/dist/viewer/{dist-B2aqeAk-.js → dist-o-mpdm3Q.js} +1 -1
  74. package/dist/viewer/{dist-w08ese3i.js → dist-rs8SY6NP.js} +1 -1
  75. package/dist/viewer/{dist-BhE_JiAo.js → dist-vjczWTJX.js} +1 -1
  76. package/dist/viewer/{editor-IGV7cqIf.js → editor-BabkJ7hH.js} +6 -6
  77. package/dist/viewer/figtree-latin-ext-wght-normal-DCwSJGxG.woff2 +0 -0
  78. package/dist/viewer/figtree-latin-wght-normal-D_ZTVpCC.woff2 +0 -0
  79. package/dist/viewer/{fit-CwTJJcvD.js → fit-BJ0VxRML.js} +1 -1
  80. package/dist/viewer/{icons-Dwk8RW6i.js → icons-8mizjIXE.js} +1 -1
  81. package/dist/viewer/{imperative-9zI7cd1I.js → imperative-iclc26pT.js} +1 -1
  82. package/dist/viewer/index.css +1 -1
  83. package/dist/viewer/index.html +12 -12
  84. package/dist/viewer/index.js +2 -2
  85. package/dist/viewer/index2.css +1 -1
  86. package/dist/viewer/{local-BIV9Bn_B.js → local-DzHVL3fo.js} +1 -1
  87. package/dist/viewer/{local-split-host-DJJKo1Vj.js → local-split-host-DaeACaX5.js} +1 -1
  88. package/dist/viewer/plugin-_bGVeqI0-BkU-g6bb.js +2 -0
  89. package/dist/viewer/preview.html +3 -3
  90. package/dist/viewer/preview.js +1 -1
  91. package/dist/viewer/{printDocument-BbvYpCaV.js → printDocument-Bh1qUAf9.js} +1 -1
  92. package/dist/viewer/{ref-DcFpXWwa.js → ref-JbqCEGXp.js} +1 -1
  93. package/dist/viewer/{route-CAQRGuux.js → route-DdpUUY_w.js} +5 -5
  94. package/dist/viewer/{route-messages-AShIvXR0.js → route-messages-BMv2jmvl.js} +1 -1
  95. package/dist/viewer/{settings-CxJUVRn8.js → settings-wKTRexHi.js} +1 -1
  96. package/dist/viewer/{snap-Bp7A7-zR.js → snap-1DJNMR4r.js} +1 -1
  97. package/dist/viewer/{split-CeIplvJa.js → split-BJA_5Rtf.js} +2 -2
  98. package/dist/viewer/{stable-DVc3NRmV.js → stable-CZy_447C.js} +1 -1
  99. package/dist/viewer/{styles-BBTLo6nS.js → styles-BHI9FTnz.js} +1 -1
  100. package/dist/viewer/{transport-CazJfalj.js → transport-Djlo7-HU.js} +1 -1
  101. package/dist/viewer/{url-BS6kqcve.js → url-B_fuREEU.js} +1 -1
  102. package/dist/viewer/{useArtifactFeed-CymUjnz1.js → useArtifactFeed-B9RfhN8_.js} +1 -1
  103. package/dist/viewer/{useArtifactSocket-BOU81P_2.js → useArtifactSocket-ns9zjgVa.js} +1 -1
  104. package/dist/viewer/{useLayerZIndex-D5QVXpVc.js → useLayerZIndex-VAxAVO-V.js} +1 -1
  105. package/dist/viewer/{useStoryboardData-BbPOAS-Z.js → useStoryboardData-DCPDhUMO.js} +1 -1
  106. package/dist/viewer/{view-BatCe1Ci.js → view-DLrABahQ.js} +1 -1
  107. package/dist/viewer/{viewport-CFJHn_Y6-DuJwG-4n.js → viewport-CFJHn_Y6-B0Ka3uWP.js} +1 -1
  108. package/package.json +1 -1
  109. package/dist/viewer/DocumentLayout-Vo9s9zeJ.js +0 -2
  110. package/dist/viewer/DocumentPage-CIvaYNgp.js +0 -3
  111. package/dist/viewer/Goeist-DFcbbrZE.woff2 +0 -0
  112. package/dist/viewer/PreviewLayout-BuviWNGi.js +0 -2
  113. package/dist/viewer/WhiteboardLayout-CwmEBIBu.js +0 -4
  114. package/dist/viewer/dist-Cg7E0M7K.js +0 -1
  115. package/dist/viewer/plugin-_bGVeqI0-_v5JtKHd.js +0 -2
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{n as t,r as n,t as r}from"./bem-vbke-3KC.js";import{t as i}from"./react-DlmbjZJV.js";import{Ar as a,Gn as o,On as s,bn as c,kr as l,st as u,vn as d}from"./url-BS6kqcve.js";import{$r as f,Gr as p,Ln as m,Pn as h,Qr as g,Tn as _,Vr as v,Yr as y,Zr as b,a as x,c as S,cn as C,d as w,h as T,kr as E,l as D,lt as O,m as k,mt as A,o as j,pt as M,ri as N,s as P,st as F,ti as I,ut as ee,zr as L}from"./useLayerZIndex-D5QVXpVc.js";import{t as R}from"./jsx-runtime-LKYXHABd.js";var z=e(i(),1),B=R(),V=`data-composite-item-active`;function H(e){let{loopFocus:t=!0,orientation:n=`both`,grid:r,onLoop:i,direction:a,highlightedIndex:o,onHighlightedIndexChange:s,rootRef:c,enableHomeAndEndKeys:l=!1,stopEventPropagation:u,disabledIndices:f,modifierKeys:p=g}=e,[m,h]=z.useState(0),_=r!=null,v=z.useRef(null),w=y(v,c),E=z.useRef([]),N=z.useRef(!1),L=z.useRef(null),R=o??m,B=I((e,t=!1)=>{if(L.current=E.current[e]??null,(s??h)(e),t){let t=E.current[e];T(v.current,t,a,n)}}),V=I(e=>{if(e.size===0)return;if(N.current){let e=E.current,t=e.indexOf(L.current);if(t===-1){let t=e[R];!t||A(e,R,f)?B(te(e,f)):L.current=t}else t!==R&&B(t);return}N.current=!0;let t=Array.from(e.keys()),r=t.find(e=>e?.hasAttribute(`data-composite-item-active`))??null,i=r?e.get(r)?.index??-1:-1;if(i!==-1)B(i);else if(A(t,R,f)){let e=F(t,{disabledIndices:f});M(t,e)||B(e)}T(v.current,r,a,n)});b(()=>{if(f==null||o!=null||!N.current)return;let e=E.current;if(A(e,R,f)){let t=F(e,{disabledIndices:f});M(e,t)||B(t)}},[f,o,R,E,B]);let H=I((e,t,n)=>i?i(e,t,n,E):n),W=I(e=>{let o=e.key===`Home`||e.key===`End`;if(!D.has(e.key)||!l&&o||U(e,p)||!v.current)return;let s=a===`rtl`,c=s?j:P,m=s?P:j,h=n===`vertical`?x:c,g=n===`vertical`?S:m,y=C(e.nativeEvent);if(y!=null&&k(y)&&!d(y)){let t=y.selectionStart,n=y.selectionEnd,r=y.value;if(t==null||e.shiftKey||t!==n||e.key!==g&&t<r.length||e.key!==h&&t>0)return}let b=R,w=ee(E,f),T=O(E,f);r!=null&&(b=r({disabledIndices:f,elementsRef:E,event:e,highlightedIndex:R,loopFocus:t,maxIndex:T,minIndex:w,onLoop:H,orientation:n,rtl:s}));let A=n!==`vertical`&&e.key===c||n!==`horizontal`&&e.key===`ArrowDown`,N=n!==`vertical`&&e.key===m||n!==`horizontal`&&e.key===`ArrowUp`;l&&(e.key===`Home`?b=w:e.key===`End`&&(b=T)),b===R&&(A||N)&&(t&&b===T&&A?(b=w,i&&(b=i(e,R,b,E))):t&&b===w&&N?(b=T,i&&(b=i(e,R,b,E))):b=F(E.current,{startingIndex:b,decrement:N,disabledIndices:f})),b!==R&&!M(E.current,b)&&(u&&e.stopPropagation(),(_||o||A||N)&&e.preventDefault(),B(b,!0),queueMicrotask(()=>{E.current[b]?.focus()}))});return{props:{ref:w,onFocus(e){let t=v.current,n=C(e.nativeEvent);t&&n!=null&&k(n)&&n.setSelectionRange(0,n.value.length)},onKeyDown:W},highlightedIndex:R,onHighlightedIndexChange:B,elementsRef:E,onMapChange:V,relayKeyboardEvent:W}}function te(e,t){let n=-1;for(let r=0;r<e.length;r+=1){let i=e[r];if(i&&!A(e,r,t)){if(i.hasAttribute(`data-composite-item-active`))return r;n===-1&&(n=r)}}return Math.max(n,0)}function U(e,t){for(let n of w)if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function W(e){let{render:t,className:n,style:r,refs:i=g,props:a=g,state:s=f,stateAttributesMapping:c,highlightedIndex:u,onHighlightedIndexChange:d,orientation:h,grid:_,loopFocus:v,onLoop:y,enableHomeAndEndKeys:b,onMapChange:x,stopEventPropagation:S=!0,rootRef:C,disabledIndices:w,modifierKeys:T,highlightItemOnHover:E=!1,tag:D=`div`,...O}=e,{props:k,highlightedIndex:A,onHighlightedIndexChange:j,elementsRef:M,onMapChange:N,relayKeyboardEvent:P}=H({grid:_,loopFocus:v,onLoop:y,orientation:h,highlightedIndex:u,onHighlightedIndexChange:d,rootRef:C,stopEventPropagation:S,enableHomeAndEndKeys:b,direction:o(),disabledIndices:w,modifierKeys:T}),F=p(D,e,{state:s,ref:i,props:[k,...a,O],stateAttributesMapping:c}),I=z.useMemo(()=>({highlightedIndex:A,onHighlightedIndexChange:j,highlightItemOnHover:E,relayKeyboardEvent:P}),[A,j,E,P]);return(0,B.jsx)(m.Provider,{value:I,children:(0,B.jsx)(l,{elementsRef:M,onMapChange:e=>{x?.(e),N(e)},children:F})})}var G=z.createContext(void 0);function ne(){return z.useContext(G)}var re=z.forwardRef(function(e,t){let{className:n,defaultPressed:r=!1,disabled:i=!1,form:o,onPressedChange:s,pressed:l,render:u,type:d,value:f,nativeButton:m=!0,style:g,..._}=e,y=v(f||void 0),b=ne(),x=b?.value??[],S=(i||b?.disabled)??!1,[C,w]=a({controlled:b?y!==void 0&&x.indexOf(y)>-1:l,default:r,name:`Toggle`,state:`pressed`}),{getButtonProps:T,buttonRef:D}=h({disabled:S,native:m}),O={disabled:S,pressed:C},k=[D,t],A=[{"aria-pressed":C,onClick(e){let t=!C,n=L(E,e.nativeEvent);s?.(t,n),n.isCanceled||(y&&b?.setGroupValue?.(y,t,n),n.isCanceled||w(t))}},_,T],j=p(`button`,e,{enabled:!b,state:O,ref:k,props:A}),M=z.useMemo(()=>({disabled:S,focusableWhenDisabled:!1}),[S]);return b?(0,B.jsx)(c,{tag:`button`,render:u,className:n,style:g,metadata:M,state:O,refs:k,props:A}):j}),ie=z.createContext(void 0);function ae(){return z.useContext(ie)}var oe=z.forwardRef(function(e,t){let{defaultValue:n,disabled:r=!1,loopFocus:i=!0,onValueChange:o,orientation:c=`horizontal`,multiple:l=!1,value:u,className:d,render:f,style:m,...h}=e,_=s(!0),v=ae(),y=n??g,b=u!==void 0||n!==void 0,x=(_?.disabled??!1)||(v?.disabled??!1)||r,[S,C]=a({controlled:u,default:y,name:`ToggleGroup`,state:`value`}),w=I((e,t,n)=>{let r;l?(r=S.slice(),t?r.push(e):r.splice(S.indexOf(e),1)):r=t?[e]:[],o?.(r,n),n.isCanceled||C(r)}),T={disabled:x,multiple:l,orientation:c},E=z.useMemo(()=>({disabled:x,setGroupValue:w,value:S,isValueInitialized:b}),[x,w,S,b]),D={role:`group`},O=p(`div`,e,{enabled:!!_,state:T,ref:t,props:[D,h]});return(0,B.jsx)(G.Provider,{value:E,children:_?O:(0,B.jsx)(W,{render:f,className:d,style:m,state:T,refs:[t],props:[D,h],loopFocus:i,enableHomeAndEndKeys:!0,orientation:c})})}),se={lbs8vgi5:`lbs8vgi5`,$$css:!0},K=r({block:`segmented`,dataAttributes:[`variant`,`size`,`block`,`glass`,`shadow`],elements:[`item`,`item-icon`,`item-label`,`indicator`]}),q={indicator:{kaIpWk:`lb1sbi92r`,kWkggS:`lb1w937bt lbnhuofb`,kGVxlE:`lb1gnnqk1`,k87sOh:`lb27tqb4`,kLqNvP:`lb8m9z6e`,kfzvcC:`lb47corl`,kVAEAm:`lb10l6tqk`,kIyJzY:`lb43t7r1 lb12w9bfk`,k1ekBW:`lb33zcyt`,kAMwcw:`lb1o41tc`,kY2c9j:`lb1ja2u2z`,kZKoxP:`lbr884pr`,kzqmXN:`lb13jdv1a`,$$css:!0},item:{kVAM5u:`lb181nr7w`,kaIpWk:`lb1sbi92r`,ksu8eU:`lbng3xce`,kMzoRj:`lbc342km`,kOIVth:`lb17d4w8g`,kI3sdo:`lb1a2a7pz`,kmkexE:`lb1qjqjpi`,kGNEyG:`lb6s0dn4`,kWkggS:`lbjbqb8w`,kB7OPa:`lb9f619`,kMwMTN:`lbc77et8 lb3fdyxb lb2poks1 lb1y4fyfr`,kkrTdU:`lb1ypdohk lb5ezrf1`,k1xSpc:`lb3nfvp2`,kmuXW:`lb2lah0s`,k63SB2:`lbk50ysn`,kjj79g:`lbl56j7k`,kVAEAm:`lb1n2onr6`,k3aq6I:`lb1dtbrvd`,kIyJzY:`lb12w9bfk`,kfSwDN:`lb87ps6o`,khDVqt:`lbuxw1ft`,kY2c9j:`lb1vjfegm`,$$css:!0},itemBlock:{kCS8Yb:`lb1r8uery`,kzQI83:`lb1iyjqo2`,kmuXW:`lbs83m0k`,$$css:!0},itemIcon:{kGNEyG:`lb6s0dn4`,k1xSpc:`lb3nfvp2`,kjj79g:`lbl56j7k`,$$css:!0},itemLabel:{kGNEyG:`lb6s0dn4`,k1xSpc:`lb3nfvp2`,$$css:!0},itemLarge:{kaIpWk:`lb1sbi92r`,kg3NbH:`lb1hr3lfm`,kGuDYH:`lbif65rj`,kZKoxP:`lbc9qbxq`,$$css:!0},itemMiddle:{kaIpWk:`lb1sbi92r`,kg3NbH:`lbaope02`,kGuDYH:`lb4z9k3i`,kZKoxP:`lb10w6t97`,$$css:!0},itemSmall:{kaIpWk:`lb1sbi92r`,kg3NbH:`lb1awh872`,kGuDYH:`lbfifm61`,kZKoxP:`lbd7y6wv`,$$css:!0},list:{kmVPX3:`lb9ms5i6`,kaIpWk:`lb1ndkxwp`,kOIVth:`lb1jnr06f`,kGNEyG:`lb6s0dn4 lb1it17vb`,kSGwAc:`lbqcrz7y lb11paglw`,kB7OPa:`lb9f619`,k1xSpc:`lb3nfvp2`,kXwgrk:`lb16yzcw2`,kwnvtZ:`lbozqiw3`,kVAEAm:`lb1n2onr6`,$$css:!0},listBlock:{kSGwAc:`lbkh2ocl`,k1xSpc:`lb78zum5`,kzqmXN:`lbh8yej3`,$$css:!0},listFilled:{kVAM5u:`lb1g3whta`,ksu8eU:`lb1y0btm7`,kMzoRj:`lbmkeg23`,kWkggS:`lb41ilrr`,$$css:!0},listGlass:{k6WDB:`lb1k0obaa`,$$css:!0},listOutlined:{kVAM5u:`lb10cypdb`,ksu8eU:`lb1y0btm7`,kMzoRj:`lbmkeg23`,kWkggS:`lbjbqb8w`,$$css:!0},listShadow:{kGVxlE:`lbpjwdtl`,$$css:!0}},ce={filled:q.listFilled,outlined:q.listOutlined},le={large:q.itemLarge,middle:q.itemMiddle,small:q.itemSmall},J=({block:e=!1,className:r,glass:i=!1,shadow:a=!1,variant:o=`filled`,...s})=>(0,B.jsx)(oe,{"data-variant":o,...t({block:e,glass:i,shadow:a}),className:N([se,q.list,e&&q.listBlock,i&&q.listGlass,a&&q.listShadow,ce[o]],n(K(),r)).className,...s});J.displayName=`SegmentedRoot`;var Y=({block:e=!1,className:t,size:r=`middle`,...i})=>(0,B.jsx)(re,{className:N([q.item,_.info,e&&q.itemBlock,le[r]],n(K(`item`),t)).className,...i});Y.displayName=`SegmentedItem`;var X=({children:e,className:t,style:r})=>(0,B.jsx)(`span`,{...N(q.itemIcon,n(K(`item-icon`),t),r),children:e});X.displayName=`SegmentedItemIcon`;var Z=({children:e,className:t,style:r})=>(0,B.jsx)(`span`,{...N(q.itemLabel,n(K(`item-label`),t),r),children:e});Z.displayName=`SegmentedItemLabel`;var Q=({className:e,style:t})=>(0,B.jsx)(`span`,{"aria-hidden":!0,...N(q.indicator,n(`lobe-segmented-indicator`,K(`indicator`),e),t)});Q.displayName=`SegmentedIndicator`;var ue=e=>typeof e==`string`?{label:e,value:e}:e,$=({block:e=!1,className:r,classNames:i,defaultValue:a,disabled:o=!1,glass:s=!1,id:c,name:l,onChange:d,options:f,ref:p,shadow:m=!1,size:h=`middle`,style:g,styles:_,value:v,variant:y=`filled`,vertical:b=!1})=>{let[x,S]=u(a,{defaultValue:a,onChange:e=>{e!=null&&d?.(e)},value:v}),C=(0,z.useRef)(null),w=(0,z.useCallback)(e=>{C.current=e,typeof p==`function`?p(e):p&&(p.current=e)},[p]),T=(0,z.useMemo)(()=>(f??[]).map(e=>ue(e)),[f]),E=(0,z.useCallback)(()=>{let e=C.current;if(!e)return;let t=e.querySelector(`[data-segmented-item][data-pressed]`);t?(e.style.setProperty(`--active-item-left`,`${t.offsetLeft}px`),e.style.setProperty(`--active-item-top`,`${t.offsetTop}px`),e.style.setProperty(`--active-item-right`,`${e.clientWidth-t.offsetLeft-t.offsetWidth}px`),e.style.setProperty(`--active-item-width`,`${t.offsetWidth}px`),e.style.setProperty(`--active-item-height`,`${t.offsetHeight}px`)):(e.style.setProperty(`--active-item-left`,`0px`),e.style.setProperty(`--active-item-top`,`0px`),e.style.setProperty(`--active-item-right`,`0px`),e.style.setProperty(`--active-item-width`,`0px`),e.style.setProperty(`--active-item-height`,`0px`))},[]);(0,z.useLayoutEffect)(()=>{E()},[x,T,b,h,e,E]),(0,z.useEffect)(()=>{let e=C.current;if(!e||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(()=>E());return t.observe(e),()=>t.disconnect()},[E]);let D=(0,z.useMemo)(()=>x==null?[]:[x],[x]),O={...g,..._?.list,..._?.root};return(0,B.jsxs)(J,{...t({size:h}),block:e,className:n(i?.root,i?.list,r),disabled:o,glass:s,id:c,orientation:b?`vertical`:`horizontal`,ref:w,shadow:m,style:O,value:D,variant:y,onValueChange:e=>{let t=e[0];t!=null&&S(t)},children:[(0,B.jsx)(Q,{className:i?.indicator,style:_?.indicator}),T.map(t=>(0,B.jsxs)(Y,{"aria-label":typeof t.label==`string`?t.label:void 0,block:e,className:n(i?.item,t.className),"data-segmented-item":``,disabled:o||t.disabled,name:l,size:h,style:_?.item,title:t.title,value:t.value,children:[t.icon!=null&&(0,B.jsx)(X,{className:i?.itemIcon,style:_?.itemIcon,children:t.icon}),t.label!=null&&(0,B.jsx)(Z,{className:i?.itemLabel,style:_?.itemLabel,children:t.label})]},t.value))]})};$.displayName=`Segmented`;export{W as n,V as r,$ as t};
1
+ import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{n as t,r as n,t as r}from"./bem-vbke-3KC.js";import{t as i}from"./react-DlmbjZJV.js";import{Ar as a,Gn as o,On as s,bn as c,kr as l,st as u,vn as d}from"./url-B_fuREEU.js";import{$r as f,Gr as p,Ln as m,Pn as h,Qr as g,Tn as _,Vr as v,Yr as y,Zr as b,a as x,c as S,cn as C,d as w,h as T,kr as E,l as D,lt as O,m as k,mt as A,o as j,pt as M,ri as N,s as P,st as F,ti as I,ut as ee,zr as L}from"./useLayerZIndex-VAxAVO-V.js";import{t as R}from"./jsx-runtime-LKYXHABd.js";var z=e(i(),1),B=R(),V=`data-composite-item-active`;function H(e){let{loopFocus:t=!0,orientation:n=`both`,grid:r,onLoop:i,direction:a,highlightedIndex:o,onHighlightedIndexChange:s,rootRef:c,enableHomeAndEndKeys:l=!1,stopEventPropagation:u,disabledIndices:f,modifierKeys:p=g}=e,[m,h]=z.useState(0),_=r!=null,v=z.useRef(null),w=y(v,c),E=z.useRef([]),N=z.useRef(!1),L=z.useRef(null),R=o??m,B=I((e,t=!1)=>{if(L.current=E.current[e]??null,(s??h)(e),t){let t=E.current[e];T(v.current,t,a,n)}}),V=I(e=>{if(e.size===0)return;if(N.current){let e=E.current,t=e.indexOf(L.current);if(t===-1){let t=e[R];!t||A(e,R,f)?B(te(e,f)):L.current=t}else t!==R&&B(t);return}N.current=!0;let t=Array.from(e.keys()),r=t.find(e=>e?.hasAttribute(`data-composite-item-active`))??null,i=r?e.get(r)?.index??-1:-1;if(i!==-1)B(i);else if(A(t,R,f)){let e=F(t,{disabledIndices:f});M(t,e)||B(e)}T(v.current,r,a,n)});b(()=>{if(f==null||o!=null||!N.current)return;let e=E.current;if(A(e,R,f)){let t=F(e,{disabledIndices:f});M(e,t)||B(t)}},[f,o,R,E,B]);let H=I((e,t,n)=>i?i(e,t,n,E):n),W=I(e=>{let o=e.key===`Home`||e.key===`End`;if(!D.has(e.key)||!l&&o||U(e,p)||!v.current)return;let s=a===`rtl`,c=s?j:P,m=s?P:j,h=n===`vertical`?x:c,g=n===`vertical`?S:m,y=C(e.nativeEvent);if(y!=null&&k(y)&&!d(y)){let t=y.selectionStart,n=y.selectionEnd,r=y.value;if(t==null||e.shiftKey||t!==n||e.key!==g&&t<r.length||e.key!==h&&t>0)return}let b=R,w=ee(E,f),T=O(E,f);r!=null&&(b=r({disabledIndices:f,elementsRef:E,event:e,highlightedIndex:R,loopFocus:t,maxIndex:T,minIndex:w,onLoop:H,orientation:n,rtl:s}));let A=n!==`vertical`&&e.key===c||n!==`horizontal`&&e.key===`ArrowDown`,N=n!==`vertical`&&e.key===m||n!==`horizontal`&&e.key===`ArrowUp`;l&&(e.key===`Home`?b=w:e.key===`End`&&(b=T)),b===R&&(A||N)&&(t&&b===T&&A?(b=w,i&&(b=i(e,R,b,E))):t&&b===w&&N?(b=T,i&&(b=i(e,R,b,E))):b=F(E.current,{startingIndex:b,decrement:N,disabledIndices:f})),b!==R&&!M(E.current,b)&&(u&&e.stopPropagation(),(_||o||A||N)&&e.preventDefault(),B(b,!0),queueMicrotask(()=>{E.current[b]?.focus()}))});return{props:{ref:w,onFocus(e){let t=v.current,n=C(e.nativeEvent);t&&n!=null&&k(n)&&n.setSelectionRange(0,n.value.length)},onKeyDown:W},highlightedIndex:R,onHighlightedIndexChange:B,elementsRef:E,onMapChange:V,relayKeyboardEvent:W}}function te(e,t){let n=-1;for(let r=0;r<e.length;r+=1){let i=e[r];if(i&&!A(e,r,t)){if(i.hasAttribute(`data-composite-item-active`))return r;n===-1&&(n=r)}}return Math.max(n,0)}function U(e,t){for(let n of w)if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function W(e){let{render:t,className:n,style:r,refs:i=g,props:a=g,state:s=f,stateAttributesMapping:c,highlightedIndex:u,onHighlightedIndexChange:d,orientation:h,grid:_,loopFocus:v,onLoop:y,enableHomeAndEndKeys:b,onMapChange:x,stopEventPropagation:S=!0,rootRef:C,disabledIndices:w,modifierKeys:T,highlightItemOnHover:E=!1,tag:D=`div`,...O}=e,{props:k,highlightedIndex:A,onHighlightedIndexChange:j,elementsRef:M,onMapChange:N,relayKeyboardEvent:P}=H({grid:_,loopFocus:v,onLoop:y,orientation:h,highlightedIndex:u,onHighlightedIndexChange:d,rootRef:C,stopEventPropagation:S,enableHomeAndEndKeys:b,direction:o(),disabledIndices:w,modifierKeys:T}),F=p(D,e,{state:s,ref:i,props:[k,...a,O],stateAttributesMapping:c}),I=z.useMemo(()=>({highlightedIndex:A,onHighlightedIndexChange:j,highlightItemOnHover:E,relayKeyboardEvent:P}),[A,j,E,P]);return(0,B.jsx)(m.Provider,{value:I,children:(0,B.jsx)(l,{elementsRef:M,onMapChange:e=>{x?.(e),N(e)},children:F})})}var G=z.createContext(void 0);function ne(){return z.useContext(G)}var re=z.forwardRef(function(e,t){let{className:n,defaultPressed:r=!1,disabled:i=!1,form:o,onPressedChange:s,pressed:l,render:u,type:d,value:f,nativeButton:m=!0,style:g,..._}=e,y=v(f||void 0),b=ne(),x=b?.value??[],S=(i||b?.disabled)??!1,[C,w]=a({controlled:b?y!==void 0&&x.indexOf(y)>-1:l,default:r,name:`Toggle`,state:`pressed`}),{getButtonProps:T,buttonRef:D}=h({disabled:S,native:m}),O={disabled:S,pressed:C},k=[D,t],A=[{"aria-pressed":C,onClick(e){let t=!C,n=L(E,e.nativeEvent);s?.(t,n),n.isCanceled||(y&&b?.setGroupValue?.(y,t,n),n.isCanceled||w(t))}},_,T],j=p(`button`,e,{enabled:!b,state:O,ref:k,props:A}),M=z.useMemo(()=>({disabled:S,focusableWhenDisabled:!1}),[S]);return b?(0,B.jsx)(c,{tag:`button`,render:u,className:n,style:g,metadata:M,state:O,refs:k,props:A}):j}),ie=z.createContext(void 0);function ae(){return z.useContext(ie)}var oe=z.forwardRef(function(e,t){let{defaultValue:n,disabled:r=!1,loopFocus:i=!0,onValueChange:o,orientation:c=`horizontal`,multiple:l=!1,value:u,className:d,render:f,style:m,...h}=e,_=s(!0),v=ae(),y=n??g,b=u!==void 0||n!==void 0,x=(_?.disabled??!1)||(v?.disabled??!1)||r,[S,C]=a({controlled:u,default:y,name:`ToggleGroup`,state:`value`}),w=I((e,t,n)=>{let r;l?(r=S.slice(),t?r.push(e):r.splice(S.indexOf(e),1)):r=t?[e]:[],o?.(r,n),n.isCanceled||C(r)}),T={disabled:x,multiple:l,orientation:c},E=z.useMemo(()=>({disabled:x,setGroupValue:w,value:S,isValueInitialized:b}),[x,w,S,b]),D={role:`group`},O=p(`div`,e,{enabled:!!_,state:T,ref:t,props:[D,h]});return(0,B.jsx)(G.Provider,{value:E,children:_?O:(0,B.jsx)(W,{render:f,className:d,style:m,state:T,refs:[t],props:[D,h],loopFocus:i,enableHomeAndEndKeys:!0,orientation:c})})}),se={lbs8vgi5:`lbs8vgi5`,$$css:!0},K=r({block:`segmented`,dataAttributes:[`variant`,`size`,`block`,`glass`,`shadow`],elements:[`item`,`item-icon`,`item-label`,`indicator`]}),q={indicator:{kaIpWk:`lb1sbi92r`,kWkggS:`lb1w937bt lbnhuofb`,kGVxlE:`lb1gnnqk1`,k87sOh:`lb27tqb4`,kLqNvP:`lb8m9z6e`,kfzvcC:`lb47corl`,kVAEAm:`lb10l6tqk`,kIyJzY:`lb43t7r1 lb12w9bfk`,k1ekBW:`lb33zcyt`,kAMwcw:`lb1o41tc`,kY2c9j:`lb1ja2u2z`,kZKoxP:`lbr884pr`,kzqmXN:`lb13jdv1a`,$$css:!0},item:{kVAM5u:`lb181nr7w`,kaIpWk:`lb1sbi92r`,ksu8eU:`lbng3xce`,kMzoRj:`lbc342km`,kOIVth:`lb17d4w8g`,kI3sdo:`lb1a2a7pz`,kmkexE:`lb1qjqjpi`,kGNEyG:`lb6s0dn4`,kWkggS:`lbjbqb8w`,kB7OPa:`lb9f619`,kMwMTN:`lbc77et8 lb3fdyxb lb2poks1 lb1y4fyfr`,kkrTdU:`lb1ypdohk lb5ezrf1`,k1xSpc:`lb3nfvp2`,kmuXW:`lb2lah0s`,k63SB2:`lbk50ysn`,kjj79g:`lbl56j7k`,kVAEAm:`lb1n2onr6`,k3aq6I:`lb1dtbrvd`,kIyJzY:`lb12w9bfk`,kfSwDN:`lb87ps6o`,khDVqt:`lbuxw1ft`,kY2c9j:`lb1vjfegm`,$$css:!0},itemBlock:{kCS8Yb:`lb1r8uery`,kzQI83:`lb1iyjqo2`,kmuXW:`lbs83m0k`,$$css:!0},itemIcon:{kGNEyG:`lb6s0dn4`,k1xSpc:`lb3nfvp2`,kjj79g:`lbl56j7k`,$$css:!0},itemLabel:{kGNEyG:`lb6s0dn4`,k1xSpc:`lb3nfvp2`,$$css:!0},itemLarge:{kaIpWk:`lb1sbi92r`,kg3NbH:`lb1hr3lfm`,kGuDYH:`lbif65rj`,kZKoxP:`lbc9qbxq`,$$css:!0},itemMiddle:{kaIpWk:`lb1sbi92r`,kg3NbH:`lbaope02`,kGuDYH:`lb4z9k3i`,kZKoxP:`lb10w6t97`,$$css:!0},itemSmall:{kaIpWk:`lb1sbi92r`,kg3NbH:`lb1awh872`,kGuDYH:`lbfifm61`,kZKoxP:`lbd7y6wv`,$$css:!0},list:{kmVPX3:`lb9ms5i6`,kaIpWk:`lb1ndkxwp`,kOIVth:`lb1jnr06f`,kGNEyG:`lb6s0dn4 lb1it17vb`,kSGwAc:`lbqcrz7y lb11paglw`,kB7OPa:`lb9f619`,k1xSpc:`lb3nfvp2`,kXwgrk:`lb16yzcw2`,kwnvtZ:`lbozqiw3`,kVAEAm:`lb1n2onr6`,$$css:!0},listBlock:{kSGwAc:`lbkh2ocl`,k1xSpc:`lb78zum5`,kzqmXN:`lbh8yej3`,$$css:!0},listFilled:{kVAM5u:`lb1g3whta`,ksu8eU:`lb1y0btm7`,kMzoRj:`lbmkeg23`,kWkggS:`lb41ilrr`,$$css:!0},listGlass:{k6WDB:`lb1k0obaa`,$$css:!0},listOutlined:{kVAM5u:`lb10cypdb`,ksu8eU:`lb1y0btm7`,kMzoRj:`lbmkeg23`,kWkggS:`lbjbqb8w`,$$css:!0},listShadow:{kGVxlE:`lbpjwdtl`,$$css:!0}},ce={filled:q.listFilled,outlined:q.listOutlined},le={large:q.itemLarge,middle:q.itemMiddle,small:q.itemSmall},J=({block:e=!1,className:r,glass:i=!1,shadow:a=!1,variant:o=`filled`,...s})=>(0,B.jsx)(oe,{"data-variant":o,...t({block:e,glass:i,shadow:a}),className:N([se,q.list,e&&q.listBlock,i&&q.listGlass,a&&q.listShadow,ce[o]],n(K(),r)).className,...s});J.displayName=`SegmentedRoot`;var Y=({block:e=!1,className:t,size:r=`middle`,...i})=>(0,B.jsx)(re,{className:N([q.item,_.info,e&&q.itemBlock,le[r]],n(K(`item`),t)).className,...i});Y.displayName=`SegmentedItem`;var X=({children:e,className:t,style:r})=>(0,B.jsx)(`span`,{...N(q.itemIcon,n(K(`item-icon`),t),r),children:e});X.displayName=`SegmentedItemIcon`;var Z=({children:e,className:t,style:r})=>(0,B.jsx)(`span`,{...N(q.itemLabel,n(K(`item-label`),t),r),children:e});Z.displayName=`SegmentedItemLabel`;var Q=({className:e,style:t})=>(0,B.jsx)(`span`,{"aria-hidden":!0,...N(q.indicator,n(`lobe-segmented-indicator`,K(`indicator`),e),t)});Q.displayName=`SegmentedIndicator`;var ue=e=>typeof e==`string`?{label:e,value:e}:e,$=({block:e=!1,className:r,classNames:i,defaultValue:a,disabled:o=!1,glass:s=!1,id:c,name:l,onChange:d,options:f,ref:p,shadow:m=!1,size:h=`middle`,style:g,styles:_,value:v,variant:y=`filled`,vertical:b=!1})=>{let[x,S]=u(a,{defaultValue:a,onChange:e=>{e!=null&&d?.(e)},value:v}),C=(0,z.useRef)(null),w=(0,z.useCallback)(e=>{C.current=e,typeof p==`function`?p(e):p&&(p.current=e)},[p]),T=(0,z.useMemo)(()=>(f??[]).map(e=>ue(e)),[f]),E=(0,z.useCallback)(()=>{let e=C.current;if(!e)return;let t=e.querySelector(`[data-segmented-item][data-pressed]`);t?(e.style.setProperty(`--active-item-left`,`${t.offsetLeft}px`),e.style.setProperty(`--active-item-top`,`${t.offsetTop}px`),e.style.setProperty(`--active-item-right`,`${e.clientWidth-t.offsetLeft-t.offsetWidth}px`),e.style.setProperty(`--active-item-width`,`${t.offsetWidth}px`),e.style.setProperty(`--active-item-height`,`${t.offsetHeight}px`)):(e.style.setProperty(`--active-item-left`,`0px`),e.style.setProperty(`--active-item-top`,`0px`),e.style.setProperty(`--active-item-right`,`0px`),e.style.setProperty(`--active-item-width`,`0px`),e.style.setProperty(`--active-item-height`,`0px`))},[]);(0,z.useLayoutEffect)(()=>{E()},[x,T,b,h,e,E]),(0,z.useEffect)(()=>{let e=C.current;if(!e||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(()=>E());return t.observe(e),()=>t.disconnect()},[E]);let D=(0,z.useMemo)(()=>x==null?[]:[x],[x]),O={...g,..._?.list,..._?.root};return(0,B.jsxs)(J,{...t({size:h}),block:e,className:n(i?.root,i?.list,r),disabled:o,glass:s,id:c,orientation:b?`vertical`:`horizontal`,ref:w,shadow:m,style:O,value:D,variant:y,onValueChange:e=>{let t=e[0];t!=null&&S(t)},children:[(0,B.jsx)(Q,{className:i?.indicator,style:_?.indicator}),T.map(t=>(0,B.jsxs)(Y,{"aria-label":typeof t.label==`string`?t.label:void 0,block:e,className:n(i?.item,t.className),"data-segmented-item":``,disabled:o||t.disabled,name:l,size:h,style:_?.item,title:t.title,value:t.value,children:[t.icon!=null&&(0,B.jsx)(X,{className:i?.itemIcon,style:_?.itemIcon,children:t.icon}),t.label!=null&&(0,B.jsx)(Z,{className:i?.itemLabel,style:_?.itemLabel,children:t.label})]},t.value))]})};$.displayName=`Segmented`;export{W as n,V as r,$ as t};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{t}from"./react-DlmbjZJV.js";import{$n as n,$t as r,Ar as i,Cn as a,En as o,Gn as s,Ln as c,On as l,Or as u,Qt as d,Rn as f,Sn as p,Tn as m,Xt as h,Zn as g,Zt as _,an as v,er as y,fn as b,gn as x,hn as S,kr as C,mn as w,nn as T,or as E,pn as D,qt as O,vn as k,zn as A}from"./url-BS6kqcve.js";import{t as j}from"./jsx-runtime-LKYXHABd.js";import{$ as M,$r as N,An as P,B as F,Dn as I,Ft as L,G as R,Gr as z,Gt as B,Hr as V,In as ee,It as H,J as te,Jt as ne,Kr as re,Mn as ie,Mt as ae,Nn as oe,O as se,Pn as ce,Qr as le,R as ue,Rr as de,Rt as fe,S as pe,T as me,Tr as he,V as ge,Xr as U,Yn as W,Yr as _e,Zr as G,_r as ve,cr as K,ei as ye,gn as be,i as q,kr as xe,l as Se,ni as Ce,or as we,qn as Te,qt as Ee,rr as De,sn as Oe,ti as ke,un as Ae,ur as je,v as Me,w as Ne,x as Pe,zr as J}from"./useLayerZIndex-D5QVXpVc.js";import{Dt as Fe}from"./MotionConfigContext-HC2vqcJO.js";import{g as Ie}from"./Popover-BRvZS1gZ.js";var Le={name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};Le.node;var Re=Fe(Le),ze={name:`lock`,size:24,node:[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]};ze.node;var Be=Fe(ze);function Ve(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=V(),a=R()!=null,o=Ce(()=>new Pe({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new Ne,floatingId:i,syncOnly:!1,nested:a})).current;return G(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=W(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),o.update(e)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o}var Y=e(t(),1);function X(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}var Z=j();function He(e){return typeof e==`object`&&!!e&&Array.isArray(e.items)}function Ue(e){return He(e?.[0])}function We(e){return Ue(e)?e.flatMap(e=>e.items):e}function Ge(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(Ue(t)){for(let e of t)for(let t of e.items)if(t&&t.value==null&&t.label!=null)return!0;return!1}for(let e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function Ke(e,t){if(t&&e!=null)return t(e)??``;if(e&&typeof e==`object`){if(`label`in e&&e.label!=null)return String(e.label);if(`value`in e)return String(e.value)}return X(e)}function qe(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?X(e.value):X(e)}function Je(e,t,n){function r(){return Ke(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e==`object`&&`label`in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return(Object.hasOwn(t,e)?t[e]:void 0)??r();if(Array.isArray(t)){let n=We(t);if(typeof e!=`object`||!e){let t=n.find(t=>t.value===e);return t&&t.label!=null?t.label:r()}if(`value`in e){let t=n.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return r()}function Ye(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,Z.jsx)(Y.Fragment,{children:Je(r,t,n)},i)),e),[])}function Xe(e,t,n=Object.is){let{length:r}=e;if(r!==t.length)return!1;for(let i=0;i<r;i+=1)if(!n(e[i],t[i]))return!1;return!0}function Ze(e){return e==null?void 0:`${e}-label`}function Qe(e,t){return e??t}function $e(e){let t=Y.useRef(!0);t.current&&(t.current=!1,e())}var et=Y.createContext(void 0),tt=Y.createContext(void 0);function Q(){let e=Y.useContext(et);if(e===void 0)throw Error(U(60));return e}function nt(){let e=Y.useContext(tt);if(e===void 0)throw Error(U(61));return e}var rt=(e,t)=>Object.is(e,t);function $(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function it(e,t,n){return Array.isArray(e)&&Array.isArray(t)?!Xe(e,t,(e,t)=>$(e,t,n)):e!==t}function at(e,t,n){return e?e.some(e=>e!==void 0&&$(t,e,n)):!1}function ot(e,t,n){return e?e.findIndex(e=>e!==void 0&&$(e,t,n)):-1}function st(e,t){if(t!==rt)return n=>at(e,n,t);let n=new Set(e);return n.delete(void 0),t=>n.has(t)&&(t!==0||e.some(e=>Object.is(t,e)))}function ct(e,t,n,r){let i=r&&Array.isArray(t)?e.findIndex(st(t,n)):ot(e,t,n);return i===-1?null:i}function lt(e,t,n,r,i,a){return at(r,t,i)?a!=null&&e>a&&at(r,n[a],i)?a:e:e===a?ct(n,r,i,!0):a}function ut(e,t,n){return e.filter(e=>!$(t,e,n))}var dt={id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,multiple:e=>e.multiple,disabled:e=>e.disabled,readOnly:e=>e.readOnly,required:e=>e.required,highlightItemOnHover:e=>e.highlightItemOnHover,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:qe(t,r)!==``},hasNullItemLabel:(e,t)=>t?Ge(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{let n=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(e=>$(t,e,n)):$(t,r,n)},isSelectedByFocus:(e,t)=>e.selectedIndex===t,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,itemRoot:e=>e.itemRoot,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows};function ft(e){let{id:t,value:r,defaultValue:o=null,onValueChange:s,open:c,defaultOpen:l=!1,onOpenChange:u,name:f,form:p,autoComplete:h,disabled:g=!1,readOnly:v=!1,required:x=!1,modal:S=!0,actionsRef:C,inputRef:w,onOpenChangeComplete:A,items:j,multiple:M=!1,itemToStringLabel:I,itemToStringValue:R,isItemEqualToValue:z=rt,highlightItemOnHover:B=!0,children:V}=e,{clearErrors:ee}=_(),{setDirty:te,setTouched:ne,setFocused:ie,validityData:ae,setFilled:oe,name:ce,disabled:de,validation:fe,validationMode:he}=T(),ge=O({id:t}),U=de||g,W=ce??f,[K,be]=i({controlled:r,default:M?o??le:o,name:`Select`,state:`value`}),[q,Se]=i({controlled:c,default:l,name:`Select`,state:`open`}),we=Y.useRef([]),Te=Y.useRef([]),Ee=Y.useRef(null),De=Y.useRef(null),Oe=Y.useRef(0),Ae=Y.useRef(null),je=Y.useRef([]),Me=Y.useRef(!1),Ne=Y.useRef(null),Pe=Y.useRef(null),Fe=Y.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),Le=Y.useRef(!1),Re=Y.useRef(K),{openMethod:ze,triggerProps:Be}=a(q),X=Ce(()=>new pe({id:ge,labelId:void 0,modal:S,multiple:M,disabled:U,readOnly:v,required:x,highlightItemOnHover:B,itemToStringLabel:I,itemToStringValue:R,isItemEqualToValue:z,value:K,open:q,mounted:q,transitionStatus:void 0,items:j,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:N,triggerProps:N,itemRoot:{props:N,multiple:M,disabled:U,readOnly:v,isItemEqualToValue:z},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1},{setValue:ye,setOpen:ye,handleScrollArrowVisibility:ye,onOpenChangeComplete:ye,listRef:we,popupRef:Ee,scrollHandlerRef:De,scrollArrowsMountedCountRef:Oe,valueRef:Ae,valuesRef:je,labelsRef:Te,typingRef:Me,selectionRef:Fe,firstItemTextRef:Ne,selectedItemTextRef:Pe,alignItemWithTriggerActiveRef:Le,initialValueRef:Re},dt)).current,[He,Ue]=Y.useState(!1),{mounted:We,transitionStatus:Ge,forceUnmount:Je}=ue({open:q,ref:Ee,preventUnmountOnClose:He,setPreventUnmountOnClose:Ue,onUnmount(){X.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),A?.(!1)}}),Ye=X.useState(`activeIndex`),Xe=X.useState(`selectedIndex`),Ze=X.useState(`triggerElement`),Qe=X.useState(`positionerElement`),Q=Ie(ze),nt=ze??Q,$=Y.useMemo(()=>M?``:qe(K,R),[M,K,R]),at=Y.useMemo(()=>M&&Array.isArray(K)?K.map(e=>qe(e,R)):qe(K,R),[M,K,R]),ot=P(Ze),st=ke(()=>at);d(ot,ge,K,st,!U,f);let lt=M?Array.isArray(K)&&K.length>0:K!=null&&$!==``;G(()=>{oe(lt)},[lt,oe]),G(function(){let e=ct(je.current,K,z,M);e===null&&(Pe.current=null),q||X.set(`selectedIndex`,e)},[M,q,K,z,X]),m(K,()=>{ee(W),te(it(K,ae.initialValue,z)),fe.change(K)});let ut=ke((e,t)=>{let n=t,r=se(n);u?.(e,n),t.isCanceled||(e||Ue(r()),Se(e),e||t.reason!==`focus-out`&&t.reason!==`outside-press`||(ne(!0),ie(!1),he===`onBlur`&&fe.commit(K)))});Y.useImperativeHandle(C,()=>({unmount:Je,close:()=>{X.state.open&&ut(!1,J(ve))}}),[Je,ut,X]);let ft=ke((e,t)=>{s?.(e,t),t.isCanceled||be(e)}),pt=ke(e=>{let t=b(e.scrollHeight,e.clientHeight),n=D(e.scrollTop,t),r=n>0,i=n<t;X.set(`scrollUpArrowVisible`,r),X.set(`scrollDownArrowVisible`,i)}),mt=Ve({open:q,onOpenChange:ut,elements:{reference:Ze,floating:Qe}}),ht=E(mt,{enabled:!U,event:`mousedown`}),gt=F(mt),_t=y(mt,{enabled:!U,listRef:we,activeIndex:Ye,selectedIndex:Xe,disabledIndices:le,onNavigate(e){(e!==null||q)&&X.set(`activeIndex`,e)},focusItemOnHover:B}),vt=n(mt,{enabled:!U&&(q||!v&&!M),listRef:Te,activeIndex:Ye,selectedIndex:Xe,disabledIndices:e=>k(we.current[e]),onMatch(e){q?X.set(`activeIndex`,e):ft(je.current[e],J(xe))},onTyping(e){Me.current=e}}),yt=Y.useMemo(()=>re(vt.reference,_t.reference,gt.reference,ht.reference,Be),[ht.reference,vt.reference,_t.reference,gt.reference,Be]),bt=Y.useMemo(()=>re(me,vt.floating,_t.floating,gt.floating),[vt.floating,_t.floating,gt.floating]),xt=_t.item??N,St=Y.useMemo(()=>({props:xt,multiple:M,disabled:U,readOnly:v,isItemEqualToValue:z}),[xt,M,U,v,z]);X.useContextCallback(`setValue`,ft),X.useContextCallback(`setOpen`,ut),X.useContextCallback(`handleScrollArrowVisibility`,pt),X.useContextCallback(`onOpenChangeComplete`,A),$e(()=>{X.update({popupProps:bt,triggerProps:yt,itemRoot:St})}),X.useSyncedValues({id:ge,modal:S,multiple:M,disabled:U,readOnly:v,required:x,highlightItemOnHover:B,value:K,open:q,mounted:We,transitionStatus:Ge,popupProps:bt,triggerProps:yt,itemRoot:St,items:j,itemToStringLabel:I,itemToStringValue:R,isItemEqualToValue:z,openMethod:nt});let Ct=_e(w,fe.inputRef),wt=M?void 0:W,Tt=Y.useMemo(()=>!M||!Array.isArray(K)||!W?null:K.map(e=>{let t=qe(e,R);return(0,Z.jsx)(`input`,{type:`hidden`,form:p,name:W,value:t,disabled:U},t)}),[M,K,p,W,R,U]);return(0,Z.jsxs)(et.Provider,{value:X,children:[(0,Z.jsx)(tt.Provider,{value:mt,children:V}),(0,Z.jsx)(`input`,{...fe.getValidationProps(U,{onFocus(){X.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented||U||v)return;let t=e.currentTarget.value,n=J(xe,e.nativeEvent);function r(){if(M)return;let e=t.toLowerCase(),r=je.current.findIndex(t=>qe(t,R).toLowerCase()===e||Ke(t,I).toLowerCase()===e);r===-1&&(r=je.current.findIndex((t,n)=>{let r=Te.current[n];return r!=null&&r.toLowerCase()===e}));let i=je.current[r];i!=null&&ft(i,n)}X.set(`forceMount`,!0),queueMicrotask(r)}}),id:ge&&wt==null?`${ge}-hidden-input`:void 0,form:p,name:wt,autoComplete:h,value:$,disabled:U,required:x&&!(M&&lt),readOnly:v,ref:Ct,style:W?H:L,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Tt]})}var pt=`data-popup-side`,mt=400,ht={...Ee,...v,popupSide:e=>e?{[pt]:e}:null,value:()=>null},gt=Y.forwardRef(function(e,t){let{render:n,className:i,id:a,disabled:o=!1,nativeButton:s=!0,style:c,...l}=e,{setTouched:u,validationMode:d,validation:f,state:m,disabled:g}=T(),{labelId:_}=h(),v=Q(),y=v.useState(`readOnly`),b=v.useState(`required`),x=v.useState(`disabled`),S=g||x||o,C=v.useState(`open`),w=v.useState(`mounted`),E=v.useState(`value`),D=v.useState(`triggerProps`),k=v.useState(`positionerElement`),A=v.useState(`listElement`),j=v.useState(`popupSide`),M=v.useState(`id`),N=v.useState(`labelId`),F=v.useState(`hasSelectedValue`),I=w&&k?j:null,L=a??M,R=Qe(_,N);O({id:a});let B=P(k),V=Y.useRef(null),H=r(S,V),{getButtonProps:te,buttonRef:ne}=ce({disabled:S,native:s}),ae=v.useStateSetter(`triggerElement`),oe=ie(),se=ie(),le=ie();Y.useEffect(()=>{if(C)return le.start(mt,()=>{v.context.selectionRef.current.allowUnselectedMouseUp=!0,v.context.selectionRef.current.allowSelectedMouseUp=!0}),()=>{le.clear()};v.context.selectionRef.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},se.clear()},[C,v,se,le]);let ue=re(D,{id:L,role:`combobox`,"aria-expanded":C,"aria-haspopup":`listbox`,"aria-controls":C?A?.id??fe(k)?.id:void 0,"aria-labelledby":R,"aria-readonly":y||void 0,"aria-required":b||void 0,tabIndex:S?-1:0,onFocus(e){H(!0),C&&v.context.alignItemWithTriggerActiveRef.current&&v.context.setOpen(!1,J(xe,e.nativeEvent)),oe.start(0,()=>{v.set(`forceMount`,!0)})},onBlur(e){Oe(k,e.relatedTarget)||(u(!0),H(!1),d===`onBlur`&&f.commit(E))},onMouseDown(e){if(C)return;let t=ee(e.currentTarget);function n(e){if(!V.current)return;let t=e.target;Oe(V.current,t)||Oe(B.current,t)||p(e,V.current)||v.context.setOpen(!1,J(je,e))}se.start(0,()=>{t.addEventListener(`mouseup`,n,{once:!0})})}},l,te),de=f.getValidationProps(S,ue);de.role=`combobox`;let pe={...m,open:C,disabled:S,value:E,readOnly:y,popupSide:I,placeholder:!F};return z(`button`,e,{ref:[t,V,ne,ae],state:pe,stateAttributesMapping:ht,props:de})}),_t={value:()=>null},vt=Y.forwardRef(function(e,t){let{className:n,render:r,children:i,placeholder:a,style:o,...s}=e,c=Q(),l=c.useState(`value`),u=c.useState(`items`),d=c.useState(`itemToStringLabel`),f=c.useState(`hasSelectedValue`),p=!f&&a!=null&&i==null,m=c.useState(`hasNullItemLabel`,p),h={value:l,placeholder:!f},g=null;return g=typeof i==`function`?i(l):i??(p&&!m?a:Array.isArray(l)?Ye(l,u,d):Je(l,u,d)),z(`span`,e,{state:h,ref:[t,c.context.valueRef],props:[{children:g},s],stateAttributesMapping:_t})}),yt=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o={open:Q().useState(`open`)};return z(`span`,e,{state:o,ref:t,props:[{"aria-hidden":!0,children:`▼`},a],stateAttributesMapping:ne})}),bt=Y.forwardRef(function(e,t){let n=Q(),r=n.useState(`mounted`),i=n.useState(`forceMount`);return r||i?(0,Z.jsx)(te,{ref:t,...e}):null}),xt=Y.createContext(void 0);function St(){let e=Y.useContext(xt);if(!e)throw Error(U(59));return e}function Ct(e,t){e&&Object.assign(e.style,t)}var wt={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},Tt={position:`fixed`},Et=Y.forwardRef(function(e,t){let{anchor:n,className:r,render:i,positionMethod:a,side:s,align:l,sideOffset:u,alignOffset:d,collisionBoundary:f=`clipping-ancestors`,collisionPadding:p,arrowPadding:m,sticky:h,disableAnchorTracking:g,alignItemWithTrigger:_=!0,collisionAvoidance:v=M,style:y,...b}=e,x=Q(),S=nt(),w=x.useState(`open`),T=x.useState(`mounted`),E=x.useState(`modal`),D=x.useState(`value`),O=x.useState(`openMethod`),k=x.useState(`positionerElement`),j=x.useState(`triggerElement`),N=x.useState(`isItemEqualToValue`),P=x.useState(`transitionStatus`),F=Y.useRef(null),I=Y.useRef(null),[L,R]=Y.useState(_),z=T&&L&&O!==`touch`;!T&&L!==_&&R(_),Y.useImperativeHandle(x.context.alignItemWithTriggerActiveRef,()=>z),o((z||E)&&w,O===`touch`,k,j);let B=A({anchor:n,floatingRootContext:S,positionMethod:a,mounted:T,side:s,sideOffset:u,align:l,alignOffset:d,arrowPadding:m,collisionBoundary:f,collisionPadding:p,sticky:h,disableAnchorTracking:g??z,collisionAvoidance:v,keepMounted:!0}),V=z?`none`:B.side,ee=z?Tt:B.positionerStyles,H={open:w,side:V,align:B.align,anchorHidden:B.anchorHidden};G(()=>{x.set(`popupSide`,B.side)},[x,B.side]);let te=x.useStateSetter(`positionerElement`),ne=c(e,H,{styles:ee,transitionStatus:P,props:b,refs:[t,te],hidden:!T,inert:!w}),re=Y.useRef(0),ie=ke(e=>{if(x.context.valuesRef.current.length===0)return;let t=re.current;re.current=e.size;let n=J(xe);if(t!==0&&!x.state.multiple&&D!==null&&ot(x.context.valuesRef.current,D,N)===-1){let e=x.context.initialValueRef.current,t=e!=null&&ot(x.context.valuesRef.current,e,N)!==-1?e:null;x.context.setValue(t,n),t===null&&(x.set(`selectedIndex`,null),x.context.selectedItemTextRef.current=null)}if(t!==0&&x.state.multiple&&Array.isArray(D)){let e=D.filter(e=>ot(x.context.valuesRef.current,e,N)!==-1);e.length!==D.length&&(x.context.setValue(e,n),e.length===0&&(x.set(`selectedIndex`,null),x.context.selectedItemTextRef.current=null))}if(w&&z){x.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};Ct(k,e),Ct(x.context.popupRef.current,e)}}),ae=Y.useMemo(()=>({...B,side:V,alignItemWithTriggerActive:z,setControlledAlignItemWithTrigger:R,scrollUpArrowRef:F,scrollDownArrowRef:I}),[B,V,z,R]);return(0,Z.jsx)(C,{elementsRef:x.context.listRef,labelsRef:x.context.labelsRef,onMapChange:ie,children:(0,Z.jsxs)(xt.Provider,{value:ae,children:[T&&E&&(0,Z.jsx)(q,{inert:Me(!w),cutout:j}),ne]})})}),Dt=`--transform-origin`,Ot={...B,...De},kt=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,...o}=e,c=Q(),u=c.useState(`multiple`),d=c.useState(`readOnly`),p=c.useState(`highlightItemOnHover`),m=nt(),{side:h,align:g,alignItemWithTriggerActive:_,isPositioned:v,setControlledAlignItemWithTrigger:y}=St(),b=l(!0)!=null,C=s(),{nonce:T,disableStyleElements:E}=S(),D=c.useState(`id`),O=c.useState(`open`),k=c.useState(`openMethod`),A=c.useState(`mounted`),j=c.useState(`popupProps`),M=c.useState(`transitionStatus`),N=c.useState(`triggerElement`),P=c.useState(`positionerElement`),F=c.useState(`listElement`),L=Y.useRef(!1),R=Y.useRef(!1),B=Y.useRef({}),V=K(),H=ke(e=>{if(!P||!c.context.popupRef.current||!R.current)return;let t=P.style.top===`0px`,n=P.style.bottom===`0px`;if(L.current||!_||!t&&!n){c.context.handleScrollArrowVisibility(e);return}let r=Mt(P),i=Nt(P.getBoundingClientRect().height,`y`,r),a=ee(P),o=Te(P),s=o.getComputedStyle(P),l=parseFloat(s.marginTop),u=parseFloat(s.marginBottom),d=At(o.getComputedStyle(c.context.popupRef.current)),f=Math.min(a.documentElement.clientHeight-l-u,d),p=e.scrollTop,m=jt(e),h=null,g=e=>{P.style.height=`${e}px`},v=t?m-p:p,y=Math.min(i+v,f);if(v<=1){let n=w(v,0,f-i);n>0&&g(i+n),e.scrollTop=t?m:0,f-(i+n)<=1&&(L.current=!0),c.context.handleScrollArrowVisibility(e);return}f-y>1?h=t?1/0:0:n&&p<m&&(h=p-(v-(i+v-f)));let b=Math.ceil(y);if(b!==0&&g(b),h!=null){let t=w(h,0,jt(e));Math.abs(e.scrollTop-t)>1&&(e.scrollTop=t)}b>=f-1&&(L.current=!0),c.context.handleScrollArrowVisibility(e)});Y.useImperativeHandle(c.context.scrollHandlerRef,()=>H,[H]),I({open:O,ref:c.context.popupRef,onComplete(){O&&c.context.onOpenChangeComplete(!0)}});let te={open:O,transitionStatus:M,side:h,align:g};G(()=>{P&&c.context.popupRef.current&&!Object.keys(B.current).length&&(B.current={top:P.style.top||`0`,left:P.style.left||`0`,right:P.style.right,height:P.style.height,bottom:P.style.bottom,minHeight:P.style.minHeight,maxHeight:P.style.maxHeight,marginTop:P.style.marginTop,marginBottom:P.style.marginBottom})},[c,P]),G(()=>{O||_||(R.current=!1,L.current=!1,Ct(P,B.current))},[O,_,P]),G(()=>{let e=c.context.popupRef.current;if(!O||!N||!P||!e||_&&!v||c.state.transitionStatus===`ending`)return;if(R.current=!0,e.style.removeProperty(Dt),!_){V.request(()=>c.context.handleScrollArrowVisibility(F||e));return}let t=It(e);try{let t=c.context.selectedItemTextRef.current;t?.isConnected||(t=!c.select(`hasSelectedValue`)&&c.context.firstItemTextRef.current?.isConnected?c.context.firstItemTextRef.current:null);let n=c.context.valueRef.current,r=Te(P),i=r.getComputedStyle(P),a=r.getComputedStyle(e),o=ee(N),s=Mt(N),l=Pt(N.getBoundingClientRect(),s),u=Pt(P.getBoundingClientRect(),s),d=l.height,f=F||e,m=f.scrollHeight,h=parseFloat(a.borderBottomWidth),g=parseFloat(i.marginTop)||10,_=parseFloat(i.marginBottom)||10,v=parseFloat(i.minHeight)||100,b=At(a),x=o.documentElement.clientHeight-g-_,S=o.documentElement.clientWidth,T=x-l.bottom+d,E,D=C===`rtl`?l.right-u.width:l.left,O=0;if(t&&n){let e=Pt(n.getBoundingClientRect(),s);E=Pt(t.getBoundingClientRect(),s),D=u.left+(C===`rtl`?e.right-E.right:e.left-E.left);let r=e.top-l.top+e.height/2;O=E.top-u.top+E.height/2-r}let k=T+O+_+h,A=Math.min(x,k),j=x-g-_,M=k-A,I=S-5;P.style.left=`${w(D,5,I-u.width)}px`,P.style.height=`${A}px`,P.style.maxHeight=`none`,P.style.marginTop=`${g}px`,P.style.marginBottom=`${_}px`,e.style.height=`100%`;let R=jt(f),z=M>=R-1;z&&(A=Math.min(x,u.height)-(M-R));let V=l.top<20||l.bottom>x-20||Math.ceil(A)+1<Math.min(m,v),H=(r.visualViewport?.scale??1)!==1&&be;if(V||H){Ct(P,B.current),y(!1);return}let te=Math.max(v,A);if(z){let e=Math.max(0,x-k);P.style.top=u.height>=j?`0`:`${e}px`,P.style.height=`${A}px`,f.scrollTop=jt(f)}else P.style.bottom=`0`,f.scrollTop=M;if(E){let t=u.top,n=u.height,r=E.top+E.height/2,i=w(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(Dt,`50% ${i}%`)}(te===x||A>=b)&&(L.current=!0),c.context.handleScrollArrowVisibility(f),p&&c.state.selectedIndex===null&&c.state.activeIndex===null&&c.context.listRef.current[0]!=null&&c.set(`activeIndex`,0)}finally{t()}},[c,O,P,N,_,y,V,F,p,C,v]),Y.useEffect(()=>{if(!_||!P||!O)return;let e=Te(P);function t(e){c.context.setOpen(!1,J(de,e))}return oe(e,`resize`,t)},[c,_,P,O]);let ne={...F?{role:`presentation`}:{role:`listbox`,"aria-multiselectable":u||void 0,"aria-readonly":d||void 0,id:`${D}-list`},onKeyDown(e){b&&Se.has(e.key)&&e.stopPropagation()},onScroll(e){F||H(e.currentTarget)},..._&&{style:F?{height:`100%`}:wt},className:!F&&_?x.className:void 0},re=z(`div`,e,{ref:[t,c.context.popupRef],state:te,stateAttributesMapping:Ot,props:[j,ne,f(M),o]});return(0,Z.jsxs)(Y.Fragment,{children:[!E&&x.getElement(T),(0,Z.jsx)(ge,{context:m,modal:!1,disabled:!A,openInteractionType:k,returnFocus:a,restoreFocus:!0,children:re})]})});function At(e){let t=e.maxHeight;return t.endsWith(`px`)&&parseFloat(t)||1/0}function jt(e){return b(e.scrollHeight,e.clientHeight)}function Mt(e){return g.getScale(e)}function Nt(e,t,n){return e/n[t]}function Pt(e,t){return ae({x:Nt(e.x,`x`,t),y:Nt(e.y,`y`,t),width:Nt(e.width,`x`,t),height:Nt(e.height,`y`,t)})}var Ft=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function It(e){let{style:t}=e,n={};for(let[e,r]of Ft)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of Ft){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var Lt=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=Q(),s=o.useState(`multiple`),c=o.useState(`readOnly`),{alignItemWithTriggerActive:l}=St(),u=o.useState(`hasScrollArrows`),d=o.useState(`openMethod`),f={id:`${o.useState(`id`)}-list`,role:`listbox`,"aria-multiselectable":s||void 0,"aria-readonly":c||void 0,onScroll(e){o.context.scrollHandlerRef.current?.(e.currentTarget)},...l&&{style:wt},className:u&&d!==`touch`?x.className:void 0},p=o.useStateSetter(`listElement`);return z(`div`,e,{ref:[t,p],props:[f,a]})}),Rt=Y.createContext(void 0);function zt(){let e=Y.useContext(Rt);if(!e)throw Error(U(57));return e}var Bt=Y.memo(Y.forwardRef(function(e,t){let{render:n,className:r,style:i,value:a=null,label:o,disabled:s=!1,nativeButton:c=!1,...l}=e,d=Y.useRef(null),f=u({guess:!0,label:o,textRef:d}),p=Q(),{props:m,multiple:h,disabled:g,readOnly:_,isItemEqualToValue:v}=p.useState(`itemRoot`),y=g||s,b=p.useState(`isActive`,f.index),x=p.useState(`open`),S=p.useState(`isSelected`,a),C=p.useState(`isSelectedByFocus`,f.index),w=f.index,T=Y.useRef(null);G(()=>{let e=p.context.valuesRef.current;return e[w]=a,()=>{delete e[w]}},[w,a,p]),G(()=>{let e=p.state.value,t=p.state.selectedIndex,n=t,r;h&&Array.isArray(e)?(n=lt(w,a,p.context.valuesRef.current,e,v,t),r=n===w,w===t&&!r&&(p.context.selectedItemTextRef.current=null)):(r=e!==void 0&&$(a,e,v),r&&(n=w)),p.set(`selectedIndex`,n),r&&d.current&&(p.context.selectedItemTextRef.current=d.current)},[w,h,v,p,a]);let E=Y.useRef(`mouse`),D=Y.useRef(!1),{getButtonProps:O,buttonRef:k}=ce({disabled:y,focusableWhenDisabled:!0,native:c,composite:!0}),A={disabled:y,selected:S,highlighted:b};function j(e){if(g||_)return;let t=p.state.value;if(h){let n=Array.isArray(t)?t:[],r=S?ut(n,a,v):[...n,a];p.context.setValue(r,J(he,e))}else p.context.setValue(a,J(he,e)),p.context.setOpen(!1,J(he,e))}function M(){p.context.selectionRef.current.dragY=0}let N={role:`option`,"aria-selected":S,tabIndex:x&&b?0:-1,onKeyDown(e){p.set(`activeIndex`,w),e.key===` `&&p.context.typingRef.current&&e.preventDefault()},onClick(e){let t=E.current!==`touch`,n=e.nativeEvent.pointerType,r=t&&Ae(e.nativeEvent)&&(n!==void 0||b),i=t&&!r&&!D.current;D.current=!1,y||i||j(e.nativeEvent)},onPointerEnter(e){E.current=e.pointerType},onPointerMove(e){if(e.pointerType===`mouse`&&e.buttons===1){let t=p.context.selectionRef.current;t.dragY+=e.movementY,t.dragY**2>=64&&(t.allowUnselectedMouseUp=!0)}},onPointerDown(e){E.current=e.pointerType,D.current=!0,M()},onMouseUp(){if(M(),y||E.current===`touch`||D.current)return;let e=!p.context.selectionRef.current.allowSelectedMouseUp&&S,t=!p.context.selectionRef.current.allowUnselectedMouseUp&&!S;e||t||(D.current=!0,T.current?.click(),D.current=!1)}},P=z(`div`,e,{ref:[k,t,f.ref,T],state:A,props:[m,N,l,O]}),F=Y.useMemo(()=>({selected:S,index:w,textRef:d,selectedByFocus:C}),[S,w,d,C]);return(0,Z.jsx)(Rt.Provider,{value:F,children:P})})),Vt=Y.memo(Y.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a,selected:o,...s}=e,c=Y.useRef(null),{transitionStatus:l,setMounted:u}=we(o),d=z(`span`,e,{ref:[t,c],state:{selected:o,transitionStatus:l},props:[{"aria-hidden":!0,children:`✔️`},s],stateAttributesMapping:De});return I({batch:!0,enabled:!o,open:o,ref:c,onComplete(){o||u(!1)}}),d})),Ht=Y.forwardRef(function(e,t){let{selected:n}=zt();return e.keepMounted||n?(0,Z.jsx)(Vt,{...e,selected:n,ref:t}):null}),Ut=Y.memo(Y.forwardRef(function(e,t){let{index:n,textRef:r,selectedByFocus:i}=zt(),a=Q(),{render:o,className:s,style:c,...l}=e,u=Y.useCallback(e=>{e&&(n===0&&(a.context.firstItemTextRef.current=e),i&&(a.context.selectedItemTextRef.current=e))},[a,n,i]);return z(`div`,e,{ref:[u,t,r],props:l})})),Wt=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,direction:a,keepMounted:o,...s}=e,c=a===`up`,l=Q(),{side:u,scrollDownArrowRef:d,scrollUpArrowRef:f}=St(),p=c?`scrollUpArrowVisible`:`scrollDownArrowVisible`,m=l.useState(p),h=l.useState(`openMethod`),g=m&&h!==`touch`,_=ie(),v=c?f:d,{mounted:y,transitionStatus:x,setMounted:S}=we(g);G(()=>(l.context.scrollArrowsMountedCountRef.current+=1,l.set(`hasScrollArrows`,!0),()=>{l.context.scrollArrowsMountedCountRef.current=Math.max(0,l.context.scrollArrowsMountedCountRef.current-1),l.context.scrollArrowsMountedCountRef.current===0&&l.set(`hasScrollArrows`,!1)}),[l]),I({open:g,ref:v,onComplete(){g||S(!1)}});let C=z(`div`,e,{ref:[t,v],state:{direction:a,visible:g,side:u,transitionStatus:x},props:[{"aria-hidden":!0,children:c?`▲`:`▼`,style:{position:`absolute`},onMouseMove(e){if(e.movementX===0&&e.movementY===0||_.isStarted())return;l.set(`activeIndex`,null);function t(){let e=l.state.listElement??l.context.popupRef.current;if(!e)return;l.set(`activeIndex`,null),l.context.handleScrollArrowVisibility(e);let n=b(e.scrollHeight,e.clientHeight),r=D(e.scrollTop,n),i=r===(c?0:n),a=l.context.listRef.current;if(r!==e.scrollTop&&(e.scrollTop=r),i)_.clear();else{if(a.length>0){let t=v.current?.offsetHeight||0;e.scrollTop=Gt(a,c,r,e.clientHeight,t,n)}_.start(40,t)}}_.start(40,t)},onMouseLeave(){_.clear()}},s],stateAttributesMapping:De});return y||o?C:null});function Gt(e,t,n,r,i,a){if(t){let t=0,r=n+i-1;for(let n=0;n<e.length;n+=1){let i=e[n];if(i&&i.offsetTop>=r){t=n;break}}let o=Math.max(0,t-1),s=e[o];return o<t&&s?D(s.offsetTop-i,a):0}let o=e.length-1,s=n+r-i+1;for(let t=0;t<e.length;t+=1){let n=e[t];if(n&&n.offsetTop+n.offsetHeight>s){o=Math.max(0,t-1);break}}let c=Math.min(e.length-1,o+1),l=e[c];return c>o&&l?D(l.offsetTop+l.offsetHeight-r+i,a):a}var Kt=Y.forwardRef(function(e,t){return(0,Z.jsx)(Wt,{...e,ref:t,direction:`down`})}),qt=Y.forwardRef(function(e,t){return(0,Z.jsx)(Wt,{...e,ref:t,direction:`up`})});export{Ue as A,Q as C,Xe as D,Qe as E,Re as F,qe as M,Ve as N,We as O,Be as P,at as S,Ze as T,ot as _,Bt as a,ut as b,Et as c,yt as d,vt as f,rt as g,$ as h,Ht as i,Ke as j,Ge as k,St as l,ft as m,Kt as n,Lt as o,gt as p,Ut as r,kt as s,qt as t,bt as u,ct as v,$e as w,lt as x,it as y};
1
+ import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{t}from"./react-DlmbjZJV.js";import{$n as n,$t as r,Ar as i,Cn as a,En as o,Gn as s,Ln as c,On as l,Or as u,Qt as d,Rn as f,Sn as p,Tn as m,Xt as h,Zn as g,Zt as _,an as v,er as y,fn as b,gn as x,hn as S,kr as C,mn as w,nn as T,or as E,pn as D,qt as O,vn as k,zn as A}from"./url-B_fuREEU.js";import{t as j}from"./jsx-runtime-LKYXHABd.js";import{$ as M,$r as N,An as P,B as F,Dn as I,Ft as L,G as R,Gr as z,Gt as B,Hr as V,In as ee,It as H,J as te,Jt as ne,Kr as re,Mn as ie,Mt as ae,Nn as oe,O as se,Pn as ce,Qr as le,R as ue,Rr as de,Rt as fe,S as pe,T as me,Tr as he,V as ge,Xr as U,Yn as W,Yr as _e,Zr as G,_r as ve,cr as K,ei as ye,gn as be,i as q,kr as xe,l as Se,ni as Ce,or as we,qn as Te,qt as Ee,rr as De,sn as Oe,ti as ke,un as Ae,ur as je,v as Me,w as Ne,x as Pe,zr as J}from"./useLayerZIndex-VAxAVO-V.js";import{Dt as Fe}from"./MotionConfigContext-HC2vqcJO.js";import{g as Ie}from"./Popover-i0m3nwq7.js";var Le={name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};Le.node;var Re=Fe(Le),ze={name:`lock`,size:24,node:[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]};ze.node;var Be=Fe(ze);function Ve(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=V(),a=R()!=null,o=Ce(()=>new Pe({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new Ne,floatingId:i,syncOnly:!1,nested:a})).current;return G(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=W(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),o.update(e)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o}var Y=e(t(),1);function X(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}var Z=j();function He(e){return typeof e==`object`&&!!e&&Array.isArray(e.items)}function Ue(e){return He(e?.[0])}function We(e){return Ue(e)?e.flatMap(e=>e.items):e}function Ge(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(Ue(t)){for(let e of t)for(let t of e.items)if(t&&t.value==null&&t.label!=null)return!0;return!1}for(let e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function Ke(e,t){if(t&&e!=null)return t(e)??``;if(e&&typeof e==`object`){if(`label`in e&&e.label!=null)return String(e.label);if(`value`in e)return String(e.value)}return X(e)}function qe(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?X(e.value):X(e)}function Je(e,t,n){function r(){return Ke(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e==`object`&&`label`in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return(Object.hasOwn(t,e)?t[e]:void 0)??r();if(Array.isArray(t)){let n=We(t);if(typeof e!=`object`||!e){let t=n.find(t=>t.value===e);return t&&t.label!=null?t.label:r()}if(`value`in e){let t=n.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return r()}function Ye(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,Z.jsx)(Y.Fragment,{children:Je(r,t,n)},i)),e),[])}function Xe(e,t,n=Object.is){let{length:r}=e;if(r!==t.length)return!1;for(let i=0;i<r;i+=1)if(!n(e[i],t[i]))return!1;return!0}function Ze(e){return e==null?void 0:`${e}-label`}function Qe(e,t){return e??t}function $e(e){let t=Y.useRef(!0);t.current&&(t.current=!1,e())}var et=Y.createContext(void 0),tt=Y.createContext(void 0);function Q(){let e=Y.useContext(et);if(e===void 0)throw Error(U(60));return e}function nt(){let e=Y.useContext(tt);if(e===void 0)throw Error(U(61));return e}var rt=(e,t)=>Object.is(e,t);function $(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function it(e,t,n){return Array.isArray(e)&&Array.isArray(t)?!Xe(e,t,(e,t)=>$(e,t,n)):e!==t}function at(e,t,n){return e?e.some(e=>e!==void 0&&$(t,e,n)):!1}function ot(e,t,n){return e?e.findIndex(e=>e!==void 0&&$(e,t,n)):-1}function st(e,t){if(t!==rt)return n=>at(e,n,t);let n=new Set(e);return n.delete(void 0),t=>n.has(t)&&(t!==0||e.some(e=>Object.is(t,e)))}function ct(e,t,n,r){let i=r&&Array.isArray(t)?e.findIndex(st(t,n)):ot(e,t,n);return i===-1?null:i}function lt(e,t,n,r,i,a){return at(r,t,i)?a!=null&&e>a&&at(r,n[a],i)?a:e:e===a?ct(n,r,i,!0):a}function ut(e,t,n){return e.filter(e=>!$(t,e,n))}var dt={id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,multiple:e=>e.multiple,disabled:e=>e.disabled,readOnly:e=>e.readOnly,required:e=>e.required,highlightItemOnHover:e=>e.highlightItemOnHover,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:qe(t,r)!==``},hasNullItemLabel:(e,t)=>t?Ge(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{let n=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(e=>$(t,e,n)):$(t,r,n)},isSelectedByFocus:(e,t)=>e.selectedIndex===t,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,itemRoot:e=>e.itemRoot,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows};function ft(e){let{id:t,value:r,defaultValue:o=null,onValueChange:s,open:c,defaultOpen:l=!1,onOpenChange:u,name:f,form:p,autoComplete:h,disabled:g=!1,readOnly:v=!1,required:x=!1,modal:S=!0,actionsRef:C,inputRef:w,onOpenChangeComplete:A,items:j,multiple:M=!1,itemToStringLabel:I,itemToStringValue:R,isItemEqualToValue:z=rt,highlightItemOnHover:B=!0,children:V}=e,{clearErrors:ee}=_(),{setDirty:te,setTouched:ne,setFocused:ie,validityData:ae,setFilled:oe,name:ce,disabled:de,validation:fe,validationMode:he}=T(),ge=O({id:t}),U=de||g,W=ce??f,[K,be]=i({controlled:r,default:M?o??le:o,name:`Select`,state:`value`}),[q,Se]=i({controlled:c,default:l,name:`Select`,state:`open`}),we=Y.useRef([]),Te=Y.useRef([]),Ee=Y.useRef(null),De=Y.useRef(null),Oe=Y.useRef(0),Ae=Y.useRef(null),je=Y.useRef([]),Me=Y.useRef(!1),Ne=Y.useRef(null),Pe=Y.useRef(null),Fe=Y.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),Le=Y.useRef(!1),Re=Y.useRef(K),{openMethod:ze,triggerProps:Be}=a(q),X=Ce(()=>new pe({id:ge,labelId:void 0,modal:S,multiple:M,disabled:U,readOnly:v,required:x,highlightItemOnHover:B,itemToStringLabel:I,itemToStringValue:R,isItemEqualToValue:z,value:K,open:q,mounted:q,transitionStatus:void 0,items:j,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:N,triggerProps:N,itemRoot:{props:N,multiple:M,disabled:U,readOnly:v,isItemEqualToValue:z},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1},{setValue:ye,setOpen:ye,handleScrollArrowVisibility:ye,onOpenChangeComplete:ye,listRef:we,popupRef:Ee,scrollHandlerRef:De,scrollArrowsMountedCountRef:Oe,valueRef:Ae,valuesRef:je,labelsRef:Te,typingRef:Me,selectionRef:Fe,firstItemTextRef:Ne,selectedItemTextRef:Pe,alignItemWithTriggerActiveRef:Le,initialValueRef:Re},dt)).current,[He,Ue]=Y.useState(!1),{mounted:We,transitionStatus:Ge,forceUnmount:Je}=ue({open:q,ref:Ee,preventUnmountOnClose:He,setPreventUnmountOnClose:Ue,onUnmount(){X.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),A?.(!1)}}),Ye=X.useState(`activeIndex`),Xe=X.useState(`selectedIndex`),Ze=X.useState(`triggerElement`),Qe=X.useState(`positionerElement`),Q=Ie(ze),nt=ze??Q,$=Y.useMemo(()=>M?``:qe(K,R),[M,K,R]),at=Y.useMemo(()=>M&&Array.isArray(K)?K.map(e=>qe(e,R)):qe(K,R),[M,K,R]),ot=P(Ze),st=ke(()=>at);d(ot,ge,K,st,!U,f);let lt=M?Array.isArray(K)&&K.length>0:K!=null&&$!==``;G(()=>{oe(lt)},[lt,oe]),G(function(){let e=ct(je.current,K,z,M);e===null&&(Pe.current=null),q||X.set(`selectedIndex`,e)},[M,q,K,z,X]),m(K,()=>{ee(W),te(it(K,ae.initialValue,z)),fe.change(K)});let ut=ke((e,t)=>{let n=t,r=se(n);u?.(e,n),t.isCanceled||(e||Ue(r()),Se(e),e||t.reason!==`focus-out`&&t.reason!==`outside-press`||(ne(!0),ie(!1),he===`onBlur`&&fe.commit(K)))});Y.useImperativeHandle(C,()=>({unmount:Je,close:()=>{X.state.open&&ut(!1,J(ve))}}),[Je,ut,X]);let ft=ke((e,t)=>{s?.(e,t),t.isCanceled||be(e)}),pt=ke(e=>{let t=b(e.scrollHeight,e.clientHeight),n=D(e.scrollTop,t),r=n>0,i=n<t;X.set(`scrollUpArrowVisible`,r),X.set(`scrollDownArrowVisible`,i)}),mt=Ve({open:q,onOpenChange:ut,elements:{reference:Ze,floating:Qe}}),ht=E(mt,{enabled:!U,event:`mousedown`}),gt=F(mt),_t=y(mt,{enabled:!U,listRef:we,activeIndex:Ye,selectedIndex:Xe,disabledIndices:le,onNavigate(e){(e!==null||q)&&X.set(`activeIndex`,e)},focusItemOnHover:B}),vt=n(mt,{enabled:!U&&(q||!v&&!M),listRef:Te,activeIndex:Ye,selectedIndex:Xe,disabledIndices:e=>k(we.current[e]),onMatch(e){q?X.set(`activeIndex`,e):ft(je.current[e],J(xe))},onTyping(e){Me.current=e}}),yt=Y.useMemo(()=>re(vt.reference,_t.reference,gt.reference,ht.reference,Be),[ht.reference,vt.reference,_t.reference,gt.reference,Be]),bt=Y.useMemo(()=>re(me,vt.floating,_t.floating,gt.floating),[vt.floating,_t.floating,gt.floating]),xt=_t.item??N,St=Y.useMemo(()=>({props:xt,multiple:M,disabled:U,readOnly:v,isItemEqualToValue:z}),[xt,M,U,v,z]);X.useContextCallback(`setValue`,ft),X.useContextCallback(`setOpen`,ut),X.useContextCallback(`handleScrollArrowVisibility`,pt),X.useContextCallback(`onOpenChangeComplete`,A),$e(()=>{X.update({popupProps:bt,triggerProps:yt,itemRoot:St})}),X.useSyncedValues({id:ge,modal:S,multiple:M,disabled:U,readOnly:v,required:x,highlightItemOnHover:B,value:K,open:q,mounted:We,transitionStatus:Ge,popupProps:bt,triggerProps:yt,itemRoot:St,items:j,itemToStringLabel:I,itemToStringValue:R,isItemEqualToValue:z,openMethod:nt});let Ct=_e(w,fe.inputRef),wt=M?void 0:W,Tt=Y.useMemo(()=>!M||!Array.isArray(K)||!W?null:K.map(e=>{let t=qe(e,R);return(0,Z.jsx)(`input`,{type:`hidden`,form:p,name:W,value:t,disabled:U},t)}),[M,K,p,W,R,U]);return(0,Z.jsxs)(et.Provider,{value:X,children:[(0,Z.jsx)(tt.Provider,{value:mt,children:V}),(0,Z.jsx)(`input`,{...fe.getValidationProps(U,{onFocus(){X.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented||U||v)return;let t=e.currentTarget.value,n=J(xe,e.nativeEvent);function r(){if(M)return;let e=t.toLowerCase(),r=je.current.findIndex(t=>qe(t,R).toLowerCase()===e||Ke(t,I).toLowerCase()===e);r===-1&&(r=je.current.findIndex((t,n)=>{let r=Te.current[n];return r!=null&&r.toLowerCase()===e}));let i=je.current[r];i!=null&&ft(i,n)}X.set(`forceMount`,!0),queueMicrotask(r)}}),id:ge&&wt==null?`${ge}-hidden-input`:void 0,form:p,name:wt,autoComplete:h,value:$,disabled:U,required:x&&!(M&&lt),readOnly:v,ref:Ct,style:W?H:L,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Tt]})}var pt=`data-popup-side`,mt=400,ht={...Ee,...v,popupSide:e=>e?{[pt]:e}:null,value:()=>null},gt=Y.forwardRef(function(e,t){let{render:n,className:i,id:a,disabled:o=!1,nativeButton:s=!0,style:c,...l}=e,{setTouched:u,validationMode:d,validation:f,state:m,disabled:g}=T(),{labelId:_}=h(),v=Q(),y=v.useState(`readOnly`),b=v.useState(`required`),x=v.useState(`disabled`),S=g||x||o,C=v.useState(`open`),w=v.useState(`mounted`),E=v.useState(`value`),D=v.useState(`triggerProps`),k=v.useState(`positionerElement`),A=v.useState(`listElement`),j=v.useState(`popupSide`),M=v.useState(`id`),N=v.useState(`labelId`),F=v.useState(`hasSelectedValue`),I=w&&k?j:null,L=a??M,R=Qe(_,N);O({id:a});let B=P(k),V=Y.useRef(null),H=r(S,V),{getButtonProps:te,buttonRef:ne}=ce({disabled:S,native:s}),ae=v.useStateSetter(`triggerElement`),oe=ie(),se=ie(),le=ie();Y.useEffect(()=>{if(C)return le.start(mt,()=>{v.context.selectionRef.current.allowUnselectedMouseUp=!0,v.context.selectionRef.current.allowSelectedMouseUp=!0}),()=>{le.clear()};v.context.selectionRef.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},se.clear()},[C,v,se,le]);let ue=re(D,{id:L,role:`combobox`,"aria-expanded":C,"aria-haspopup":`listbox`,"aria-controls":C?A?.id??fe(k)?.id:void 0,"aria-labelledby":R,"aria-readonly":y||void 0,"aria-required":b||void 0,tabIndex:S?-1:0,onFocus(e){H(!0),C&&v.context.alignItemWithTriggerActiveRef.current&&v.context.setOpen(!1,J(xe,e.nativeEvent)),oe.start(0,()=>{v.set(`forceMount`,!0)})},onBlur(e){Oe(k,e.relatedTarget)||(u(!0),H(!1),d===`onBlur`&&f.commit(E))},onMouseDown(e){if(C)return;let t=ee(e.currentTarget);function n(e){if(!V.current)return;let t=e.target;Oe(V.current,t)||Oe(B.current,t)||p(e,V.current)||v.context.setOpen(!1,J(je,e))}se.start(0,()=>{t.addEventListener(`mouseup`,n,{once:!0})})}},l,te),de=f.getValidationProps(S,ue);de.role=`combobox`;let pe={...m,open:C,disabled:S,value:E,readOnly:y,popupSide:I,placeholder:!F};return z(`button`,e,{ref:[t,V,ne,ae],state:pe,stateAttributesMapping:ht,props:de})}),_t={value:()=>null},vt=Y.forwardRef(function(e,t){let{className:n,render:r,children:i,placeholder:a,style:o,...s}=e,c=Q(),l=c.useState(`value`),u=c.useState(`items`),d=c.useState(`itemToStringLabel`),f=c.useState(`hasSelectedValue`),p=!f&&a!=null&&i==null,m=c.useState(`hasNullItemLabel`,p),h={value:l,placeholder:!f},g=null;return g=typeof i==`function`?i(l):i??(p&&!m?a:Array.isArray(l)?Ye(l,u,d):Je(l,u,d)),z(`span`,e,{state:h,ref:[t,c.context.valueRef],props:[{children:g},s],stateAttributesMapping:_t})}),yt=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o={open:Q().useState(`open`)};return z(`span`,e,{state:o,ref:t,props:[{"aria-hidden":!0,children:`▼`},a],stateAttributesMapping:ne})}),bt=Y.forwardRef(function(e,t){let n=Q(),r=n.useState(`mounted`),i=n.useState(`forceMount`);return r||i?(0,Z.jsx)(te,{ref:t,...e}):null}),xt=Y.createContext(void 0);function St(){let e=Y.useContext(xt);if(!e)throw Error(U(59));return e}function Ct(e,t){e&&Object.assign(e.style,t)}var wt={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},Tt={position:`fixed`},Et=Y.forwardRef(function(e,t){let{anchor:n,className:r,render:i,positionMethod:a,side:s,align:l,sideOffset:u,alignOffset:d,collisionBoundary:f=`clipping-ancestors`,collisionPadding:p,arrowPadding:m,sticky:h,disableAnchorTracking:g,alignItemWithTrigger:_=!0,collisionAvoidance:v=M,style:y,...b}=e,x=Q(),S=nt(),w=x.useState(`open`),T=x.useState(`mounted`),E=x.useState(`modal`),D=x.useState(`value`),O=x.useState(`openMethod`),k=x.useState(`positionerElement`),j=x.useState(`triggerElement`),N=x.useState(`isItemEqualToValue`),P=x.useState(`transitionStatus`),F=Y.useRef(null),I=Y.useRef(null),[L,R]=Y.useState(_),z=T&&L&&O!==`touch`;!T&&L!==_&&R(_),Y.useImperativeHandle(x.context.alignItemWithTriggerActiveRef,()=>z),o((z||E)&&w,O===`touch`,k,j);let B=A({anchor:n,floatingRootContext:S,positionMethod:a,mounted:T,side:s,sideOffset:u,align:l,alignOffset:d,arrowPadding:m,collisionBoundary:f,collisionPadding:p,sticky:h,disableAnchorTracking:g??z,collisionAvoidance:v,keepMounted:!0}),V=z?`none`:B.side,ee=z?Tt:B.positionerStyles,H={open:w,side:V,align:B.align,anchorHidden:B.anchorHidden};G(()=>{x.set(`popupSide`,B.side)},[x,B.side]);let te=x.useStateSetter(`positionerElement`),ne=c(e,H,{styles:ee,transitionStatus:P,props:b,refs:[t,te],hidden:!T,inert:!w}),re=Y.useRef(0),ie=ke(e=>{if(x.context.valuesRef.current.length===0)return;let t=re.current;re.current=e.size;let n=J(xe);if(t!==0&&!x.state.multiple&&D!==null&&ot(x.context.valuesRef.current,D,N)===-1){let e=x.context.initialValueRef.current,t=e!=null&&ot(x.context.valuesRef.current,e,N)!==-1?e:null;x.context.setValue(t,n),t===null&&(x.set(`selectedIndex`,null),x.context.selectedItemTextRef.current=null)}if(t!==0&&x.state.multiple&&Array.isArray(D)){let e=D.filter(e=>ot(x.context.valuesRef.current,e,N)!==-1);e.length!==D.length&&(x.context.setValue(e,n),e.length===0&&(x.set(`selectedIndex`,null),x.context.selectedItemTextRef.current=null))}if(w&&z){x.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};Ct(k,e),Ct(x.context.popupRef.current,e)}}),ae=Y.useMemo(()=>({...B,side:V,alignItemWithTriggerActive:z,setControlledAlignItemWithTrigger:R,scrollUpArrowRef:F,scrollDownArrowRef:I}),[B,V,z,R]);return(0,Z.jsx)(C,{elementsRef:x.context.listRef,labelsRef:x.context.labelsRef,onMapChange:ie,children:(0,Z.jsxs)(xt.Provider,{value:ae,children:[T&&E&&(0,Z.jsx)(q,{inert:Me(!w),cutout:j}),ne]})})}),Dt=`--transform-origin`,Ot={...B,...De},kt=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,...o}=e,c=Q(),u=c.useState(`multiple`),d=c.useState(`readOnly`),p=c.useState(`highlightItemOnHover`),m=nt(),{side:h,align:g,alignItemWithTriggerActive:_,isPositioned:v,setControlledAlignItemWithTrigger:y}=St(),b=l(!0)!=null,C=s(),{nonce:T,disableStyleElements:E}=S(),D=c.useState(`id`),O=c.useState(`open`),k=c.useState(`openMethod`),A=c.useState(`mounted`),j=c.useState(`popupProps`),M=c.useState(`transitionStatus`),N=c.useState(`triggerElement`),P=c.useState(`positionerElement`),F=c.useState(`listElement`),L=Y.useRef(!1),R=Y.useRef(!1),B=Y.useRef({}),V=K(),H=ke(e=>{if(!P||!c.context.popupRef.current||!R.current)return;let t=P.style.top===`0px`,n=P.style.bottom===`0px`;if(L.current||!_||!t&&!n){c.context.handleScrollArrowVisibility(e);return}let r=Mt(P),i=Nt(P.getBoundingClientRect().height,`y`,r),a=ee(P),o=Te(P),s=o.getComputedStyle(P),l=parseFloat(s.marginTop),u=parseFloat(s.marginBottom),d=At(o.getComputedStyle(c.context.popupRef.current)),f=Math.min(a.documentElement.clientHeight-l-u,d),p=e.scrollTop,m=jt(e),h=null,g=e=>{P.style.height=`${e}px`},v=t?m-p:p,y=Math.min(i+v,f);if(v<=1){let n=w(v,0,f-i);n>0&&g(i+n),e.scrollTop=t?m:0,f-(i+n)<=1&&(L.current=!0),c.context.handleScrollArrowVisibility(e);return}f-y>1?h=t?1/0:0:n&&p<m&&(h=p-(v-(i+v-f)));let b=Math.ceil(y);if(b!==0&&g(b),h!=null){let t=w(h,0,jt(e));Math.abs(e.scrollTop-t)>1&&(e.scrollTop=t)}b>=f-1&&(L.current=!0),c.context.handleScrollArrowVisibility(e)});Y.useImperativeHandle(c.context.scrollHandlerRef,()=>H,[H]),I({open:O,ref:c.context.popupRef,onComplete(){O&&c.context.onOpenChangeComplete(!0)}});let te={open:O,transitionStatus:M,side:h,align:g};G(()=>{P&&c.context.popupRef.current&&!Object.keys(B.current).length&&(B.current={top:P.style.top||`0`,left:P.style.left||`0`,right:P.style.right,height:P.style.height,bottom:P.style.bottom,minHeight:P.style.minHeight,maxHeight:P.style.maxHeight,marginTop:P.style.marginTop,marginBottom:P.style.marginBottom})},[c,P]),G(()=>{O||_||(R.current=!1,L.current=!1,Ct(P,B.current))},[O,_,P]),G(()=>{let e=c.context.popupRef.current;if(!O||!N||!P||!e||_&&!v||c.state.transitionStatus===`ending`)return;if(R.current=!0,e.style.removeProperty(Dt),!_){V.request(()=>c.context.handleScrollArrowVisibility(F||e));return}let t=It(e);try{let t=c.context.selectedItemTextRef.current;t?.isConnected||(t=!c.select(`hasSelectedValue`)&&c.context.firstItemTextRef.current?.isConnected?c.context.firstItemTextRef.current:null);let n=c.context.valueRef.current,r=Te(P),i=r.getComputedStyle(P),a=r.getComputedStyle(e),o=ee(N),s=Mt(N),l=Pt(N.getBoundingClientRect(),s),u=Pt(P.getBoundingClientRect(),s),d=l.height,f=F||e,m=f.scrollHeight,h=parseFloat(a.borderBottomWidth),g=parseFloat(i.marginTop)||10,_=parseFloat(i.marginBottom)||10,v=parseFloat(i.minHeight)||100,b=At(a),x=o.documentElement.clientHeight-g-_,S=o.documentElement.clientWidth,T=x-l.bottom+d,E,D=C===`rtl`?l.right-u.width:l.left,O=0;if(t&&n){let e=Pt(n.getBoundingClientRect(),s);E=Pt(t.getBoundingClientRect(),s),D=u.left+(C===`rtl`?e.right-E.right:e.left-E.left);let r=e.top-l.top+e.height/2;O=E.top-u.top+E.height/2-r}let k=T+O+_+h,A=Math.min(x,k),j=x-g-_,M=k-A,I=S-5;P.style.left=`${w(D,5,I-u.width)}px`,P.style.height=`${A}px`,P.style.maxHeight=`none`,P.style.marginTop=`${g}px`,P.style.marginBottom=`${_}px`,e.style.height=`100%`;let R=jt(f),z=M>=R-1;z&&(A=Math.min(x,u.height)-(M-R));let V=l.top<20||l.bottom>x-20||Math.ceil(A)+1<Math.min(m,v),H=(r.visualViewport?.scale??1)!==1&&be;if(V||H){Ct(P,B.current),y(!1);return}let te=Math.max(v,A);if(z){let e=Math.max(0,x-k);P.style.top=u.height>=j?`0`:`${e}px`,P.style.height=`${A}px`,f.scrollTop=jt(f)}else P.style.bottom=`0`,f.scrollTop=M;if(E){let t=u.top,n=u.height,r=E.top+E.height/2,i=w(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(Dt,`50% ${i}%`)}(te===x||A>=b)&&(L.current=!0),c.context.handleScrollArrowVisibility(f),p&&c.state.selectedIndex===null&&c.state.activeIndex===null&&c.context.listRef.current[0]!=null&&c.set(`activeIndex`,0)}finally{t()}},[c,O,P,N,_,y,V,F,p,C,v]),Y.useEffect(()=>{if(!_||!P||!O)return;let e=Te(P);function t(e){c.context.setOpen(!1,J(de,e))}return oe(e,`resize`,t)},[c,_,P,O]);let ne={...F?{role:`presentation`}:{role:`listbox`,"aria-multiselectable":u||void 0,"aria-readonly":d||void 0,id:`${D}-list`},onKeyDown(e){b&&Se.has(e.key)&&e.stopPropagation()},onScroll(e){F||H(e.currentTarget)},..._&&{style:F?{height:`100%`}:wt},className:!F&&_?x.className:void 0},re=z(`div`,e,{ref:[t,c.context.popupRef],state:te,stateAttributesMapping:Ot,props:[j,ne,f(M),o]});return(0,Z.jsxs)(Y.Fragment,{children:[!E&&x.getElement(T),(0,Z.jsx)(ge,{context:m,modal:!1,disabled:!A,openInteractionType:k,returnFocus:a,restoreFocus:!0,children:re})]})});function At(e){let t=e.maxHeight;return t.endsWith(`px`)&&parseFloat(t)||1/0}function jt(e){return b(e.scrollHeight,e.clientHeight)}function Mt(e){return g.getScale(e)}function Nt(e,t,n){return e/n[t]}function Pt(e,t){return ae({x:Nt(e.x,`x`,t),y:Nt(e.y,`y`,t),width:Nt(e.width,`x`,t),height:Nt(e.height,`y`,t)})}var Ft=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function It(e){let{style:t}=e,n={};for(let[e,r]of Ft)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of Ft){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var Lt=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=Q(),s=o.useState(`multiple`),c=o.useState(`readOnly`),{alignItemWithTriggerActive:l}=St(),u=o.useState(`hasScrollArrows`),d=o.useState(`openMethod`),f={id:`${o.useState(`id`)}-list`,role:`listbox`,"aria-multiselectable":s||void 0,"aria-readonly":c||void 0,onScroll(e){o.context.scrollHandlerRef.current?.(e.currentTarget)},...l&&{style:wt},className:u&&d!==`touch`?x.className:void 0},p=o.useStateSetter(`listElement`);return z(`div`,e,{ref:[t,p],props:[f,a]})}),Rt=Y.createContext(void 0);function zt(){let e=Y.useContext(Rt);if(!e)throw Error(U(57));return e}var Bt=Y.memo(Y.forwardRef(function(e,t){let{render:n,className:r,style:i,value:a=null,label:o,disabled:s=!1,nativeButton:c=!1,...l}=e,d=Y.useRef(null),f=u({guess:!0,label:o,textRef:d}),p=Q(),{props:m,multiple:h,disabled:g,readOnly:_,isItemEqualToValue:v}=p.useState(`itemRoot`),y=g||s,b=p.useState(`isActive`,f.index),x=p.useState(`open`),S=p.useState(`isSelected`,a),C=p.useState(`isSelectedByFocus`,f.index),w=f.index,T=Y.useRef(null);G(()=>{let e=p.context.valuesRef.current;return e[w]=a,()=>{delete e[w]}},[w,a,p]),G(()=>{let e=p.state.value,t=p.state.selectedIndex,n=t,r;h&&Array.isArray(e)?(n=lt(w,a,p.context.valuesRef.current,e,v,t),r=n===w,w===t&&!r&&(p.context.selectedItemTextRef.current=null)):(r=e!==void 0&&$(a,e,v),r&&(n=w)),p.set(`selectedIndex`,n),r&&d.current&&(p.context.selectedItemTextRef.current=d.current)},[w,h,v,p,a]);let E=Y.useRef(`mouse`),D=Y.useRef(!1),{getButtonProps:O,buttonRef:k}=ce({disabled:y,focusableWhenDisabled:!0,native:c,composite:!0}),A={disabled:y,selected:S,highlighted:b};function j(e){if(g||_)return;let t=p.state.value;if(h){let n=Array.isArray(t)?t:[],r=S?ut(n,a,v):[...n,a];p.context.setValue(r,J(he,e))}else p.context.setValue(a,J(he,e)),p.context.setOpen(!1,J(he,e))}function M(){p.context.selectionRef.current.dragY=0}let N={role:`option`,"aria-selected":S,tabIndex:x&&b?0:-1,onKeyDown(e){p.set(`activeIndex`,w),e.key===` `&&p.context.typingRef.current&&e.preventDefault()},onClick(e){let t=E.current!==`touch`,n=e.nativeEvent.pointerType,r=t&&Ae(e.nativeEvent)&&(n!==void 0||b),i=t&&!r&&!D.current;D.current=!1,y||i||j(e.nativeEvent)},onPointerEnter(e){E.current=e.pointerType},onPointerMove(e){if(e.pointerType===`mouse`&&e.buttons===1){let t=p.context.selectionRef.current;t.dragY+=e.movementY,t.dragY**2>=64&&(t.allowUnselectedMouseUp=!0)}},onPointerDown(e){E.current=e.pointerType,D.current=!0,M()},onMouseUp(){if(M(),y||E.current===`touch`||D.current)return;let e=!p.context.selectionRef.current.allowSelectedMouseUp&&S,t=!p.context.selectionRef.current.allowUnselectedMouseUp&&!S;e||t||(D.current=!0,T.current?.click(),D.current=!1)}},P=z(`div`,e,{ref:[k,t,f.ref,T],state:A,props:[m,N,l,O]}),F=Y.useMemo(()=>({selected:S,index:w,textRef:d,selectedByFocus:C}),[S,w,d,C]);return(0,Z.jsx)(Rt.Provider,{value:F,children:P})})),Vt=Y.memo(Y.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a,selected:o,...s}=e,c=Y.useRef(null),{transitionStatus:l,setMounted:u}=we(o),d=z(`span`,e,{ref:[t,c],state:{selected:o,transitionStatus:l},props:[{"aria-hidden":!0,children:`✔️`},s],stateAttributesMapping:De});return I({batch:!0,enabled:!o,open:o,ref:c,onComplete(){o||u(!1)}}),d})),Ht=Y.forwardRef(function(e,t){let{selected:n}=zt();return e.keepMounted||n?(0,Z.jsx)(Vt,{...e,selected:n,ref:t}):null}),Ut=Y.memo(Y.forwardRef(function(e,t){let{index:n,textRef:r,selectedByFocus:i}=zt(),a=Q(),{render:o,className:s,style:c,...l}=e,u=Y.useCallback(e=>{e&&(n===0&&(a.context.firstItemTextRef.current=e),i&&(a.context.selectedItemTextRef.current=e))},[a,n,i]);return z(`div`,e,{ref:[u,t,r],props:l})})),Wt=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,direction:a,keepMounted:o,...s}=e,c=a===`up`,l=Q(),{side:u,scrollDownArrowRef:d,scrollUpArrowRef:f}=St(),p=c?`scrollUpArrowVisible`:`scrollDownArrowVisible`,m=l.useState(p),h=l.useState(`openMethod`),g=m&&h!==`touch`,_=ie(),v=c?f:d,{mounted:y,transitionStatus:x,setMounted:S}=we(g);G(()=>(l.context.scrollArrowsMountedCountRef.current+=1,l.set(`hasScrollArrows`,!0),()=>{l.context.scrollArrowsMountedCountRef.current=Math.max(0,l.context.scrollArrowsMountedCountRef.current-1),l.context.scrollArrowsMountedCountRef.current===0&&l.set(`hasScrollArrows`,!1)}),[l]),I({open:g,ref:v,onComplete(){g||S(!1)}});let C=z(`div`,e,{ref:[t,v],state:{direction:a,visible:g,side:u,transitionStatus:x},props:[{"aria-hidden":!0,children:c?`▲`:`▼`,style:{position:`absolute`},onMouseMove(e){if(e.movementX===0&&e.movementY===0||_.isStarted())return;l.set(`activeIndex`,null);function t(){let e=l.state.listElement??l.context.popupRef.current;if(!e)return;l.set(`activeIndex`,null),l.context.handleScrollArrowVisibility(e);let n=b(e.scrollHeight,e.clientHeight),r=D(e.scrollTop,n),i=r===(c?0:n),a=l.context.listRef.current;if(r!==e.scrollTop&&(e.scrollTop=r),i)_.clear();else{if(a.length>0){let t=v.current?.offsetHeight||0;e.scrollTop=Gt(a,c,r,e.clientHeight,t,n)}_.start(40,t)}}_.start(40,t)},onMouseLeave(){_.clear()}},s],stateAttributesMapping:De});return y||o?C:null});function Gt(e,t,n,r,i,a){if(t){let t=0,r=n+i-1;for(let n=0;n<e.length;n+=1){let i=e[n];if(i&&i.offsetTop>=r){t=n;break}}let o=Math.max(0,t-1),s=e[o];return o<t&&s?D(s.offsetTop-i,a):0}let o=e.length-1,s=n+r-i+1;for(let t=0;t<e.length;t+=1){let n=e[t];if(n&&n.offsetTop+n.offsetHeight>s){o=Math.max(0,t-1);break}}let c=Math.min(e.length-1,o+1),l=e[c];return c>o&&l?D(l.offsetTop+l.offsetHeight-r+i,a):a}var Kt=Y.forwardRef(function(e,t){return(0,Z.jsx)(Wt,{...e,ref:t,direction:`down`})}),qt=Y.forwardRef(function(e,t){return(0,Z.jsx)(Wt,{...e,ref:t,direction:`up`})});export{Ue as A,Q as C,Xe as D,Qe as E,Re as F,qe as M,Ve as N,We as O,Be as P,at as S,Ze as T,ot as _,Bt as a,ut as b,Et as c,yt as d,vt as f,rt as g,$ as h,Ht as i,Ke as j,Ge as k,St as l,ft as m,Kt as n,Lt as o,gt as p,Ut as r,kt as s,qt as t,bt as u,ct as v,$e as w,lt as x,it as y};