@baseline-ui/core 3.2.1 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Accordion.mjs +1 -1
- package/dist/ActionButton.mjs +1 -1
- package/dist/ActionGroup.mjs +1 -1
- package/dist/ActionIconButton.mjs +1 -1
- package/dist/AlertDialog.mjs +1 -1
- package/dist/AudioPlayer.mjs +1 -1
- package/dist/Avatar.mjs +1 -1
- package/dist/ButtonSelect.mjs +1 -1
- package/dist/Calendar.mjs +1 -1
- package/dist/Checkbox.mjs +1 -1
- package/dist/ColorInput.mjs +1 -1
- package/dist/ColorSwatch.mjs +1 -1
- package/dist/ColorSwatchPicker.mjs +1 -1
- package/dist/ComboBox.mjs +1 -1
- package/dist/DateField.mjs +1 -1
- package/dist/Dialog.mjs +1 -1
- package/dist/Disclosure.mjs +1 -1
- package/dist/DomNodeRenderer.mjs +1 -1
- package/dist/Drawer.mjs +1 -1
- package/dist/Editor.mjs +1 -1
- package/dist/FileInput.mjs +1 -1
- package/dist/FileList.mjs +1 -1
- package/dist/FileUploader.mjs +1 -1
- package/dist/FrameProvider.mjs +1 -1
- package/dist/FreehandCanvas.mjs +1 -1
- package/dist/GridList.mjs +1 -1
- package/dist/Icon.mjs +1 -1
- package/dist/ImageDropZone.mjs +1 -1
- package/dist/ImageGallery.mjs +1 -1
- package/dist/InlineAlert.mjs +1 -1
- package/dist/InlineToolbar.mjs +1 -1
- package/dist/Kbd.mjs +1 -1
- package/dist/Link.mjs +1 -1
- package/dist/ListBox.mjs +1 -1
- package/dist/Menu.mjs +1 -1
- package/dist/Modal.mjs +1 -1
- package/dist/NumberInput.mjs +1 -1
- package/dist/Pagination.mjs +1 -1
- package/dist/PointPicker.mjs +1 -1
- package/dist/Popover.mjs +1 -1
- package/dist/Portal.mjs +1 -1
- package/dist/Preview.mjs +1 -1
- package/dist/ProgressBar.mjs +1 -1
- package/dist/RadioGroup.mjs +1 -1
- package/dist/Reaction.mjs +1 -1
- package/dist/ScrollControlButton.mjs +1 -1
- package/dist/SearchInput.mjs +1 -1
- package/dist/Select.mjs +1 -1
- package/dist/Separator.mjs +1 -1
- package/dist/Slider.mjs +1 -1
- package/dist/StatusCard.mjs +1 -1
- package/dist/Stepper.mjs +1 -1
- package/dist/Switch.mjs +1 -1
- package/dist/Table.mjs +1 -1
- package/dist/Tabs.mjs +1 -1
- package/dist/Tag.mjs +1 -1
- package/dist/TagGroup.mjs +1 -1
- package/dist/TaggedPagination.mjs +1 -1
- package/dist/Text.mjs +1 -1
- package/dist/TextInput.mjs +1 -1
- package/dist/ThemeProvider.mjs +1 -1
- package/dist/TimeField.mjs +1 -1
- package/dist/Toast.mjs +1 -1
- package/dist/ToggleButton.mjs +1 -1
- package/dist/ToggleIconButton.mjs +1 -1
- package/dist/Toolbar.mjs +1 -1
- package/dist/Tooltip.mjs +1 -1
- package/dist/TreeView.mjs +1 -1
- package/dist/UNSAFE_ListBox.mjs +1 -1
- package/dist/Virtualizer.mjs +1 -1
- package/dist/{chunk-VJ3SWDRJ.mjs → chunk-2BXXD6SW.mjs} +1 -1
- package/dist/{chunk-IE3E4KQ6.mjs → chunk-2EMOQIU7.mjs} +1 -1
- package/dist/{chunk-ODDEW5IV.mjs → chunk-2TH2QRSV.mjs} +1 -1
- package/dist/{chunk-TVENHRYC.mjs → chunk-2V323KAD.mjs} +1 -1
- package/dist/{chunk-47I3USMC.mjs → chunk-2YTKLY4F.mjs} +1 -1
- package/dist/{chunk-RWHDD6Z7.mjs → chunk-4C6AJ3TZ.mjs} +1 -1
- package/dist/{chunk-VDSLDZLT.mjs → chunk-5HK56IXH.mjs} +1 -1
- package/dist/chunk-5IXSPQRW.mjs +10 -0
- package/dist/{chunk-XIXHGXIN.mjs → chunk-5K46OAX5.mjs} +1 -1
- package/dist/{chunk-F2O4AP7P.mjs → chunk-5MUEJ5WI.mjs} +1 -1
- package/dist/{chunk-W3ZGXUFP.mjs → chunk-6EFNC443.mjs} +1 -1
- package/dist/{chunk-ULCYKB34.mjs → chunk-6JWACCHG.mjs} +1 -1
- package/dist/{chunk-HDVWQ6RL.mjs → chunk-6NQPENP4.mjs} +1 -1
- package/dist/{chunk-OHZK2ZDA.mjs → chunk-6PXOVWVM.mjs} +1 -1
- package/dist/{chunk-TPNZG6FA.mjs → chunk-6V7BIFQD.mjs} +1 -1
- package/dist/{chunk-3JL2TJZL.mjs → chunk-6VXBFM6Q.mjs} +1 -1
- package/dist/{chunk-4BYKAG4W.mjs → chunk-7L5UOGZA.mjs} +1 -1
- package/dist/{chunk-MNAD5FJH.mjs → chunk-7MQBBSZ2.mjs} +1 -1
- package/dist/{chunk-O66FNQSB.mjs → chunk-7P322KP4.mjs} +1 -1
- package/dist/{chunk-UCZZLAPB.mjs → chunk-AW5WDI2U.mjs} +1 -1
- package/dist/{chunk-WN6FAICZ.mjs → chunk-AYBACQ6U.mjs} +1 -1
- package/dist/chunk-B237CJT4.mjs +10 -0
- package/dist/{chunk-WRQ4FPJE.mjs → chunk-B6U6JHD4.mjs} +1 -1
- package/dist/{chunk-WA35CT3D.mjs → chunk-BBZ2I3RF.mjs} +2 -2
- package/dist/{chunk-G3K2DXNP.mjs → chunk-BCENUHNO.mjs} +1 -1
- package/dist/{chunk-UOMNE4F4.mjs → chunk-BGHBSM3K.mjs} +1 -1
- package/dist/{chunk-K6MB234H.mjs → chunk-BIDNNBRG.mjs} +1 -1
- package/dist/{chunk-RBZ7SIZR.mjs → chunk-BROSGYL3.mjs} +1 -1
- package/dist/{chunk-TBDKTTIY.mjs → chunk-C7AUJO36.mjs} +2 -2
- package/dist/{chunk-THRAJMLX.mjs → chunk-CCA2ABXO.mjs} +2 -2
- package/dist/{chunk-N7MTFSWR.mjs → chunk-CUOTJ7AP.mjs} +2 -2
- package/dist/{chunk-4MRHG5IU.mjs → chunk-CYTHB4M4.mjs} +1 -1
- package/dist/chunk-DDLZ6CKC.mjs +10 -0
- package/dist/chunk-DMJHCNBU.mjs +10 -0
- package/dist/{chunk-4TAUFBXO.mjs → chunk-E3DMXJIC.mjs} +1 -1
- package/dist/{chunk-6DGD7BZA.mjs → chunk-E3QDPL77.mjs} +1 -1
- package/dist/{chunk-SNQDFFKP.mjs → chunk-E5GYCA3P.mjs} +1 -1
- package/dist/{chunk-55YEATL7.mjs → chunk-EGXILQNX.mjs} +1 -1
- package/dist/{chunk-5TDFLLMX.mjs → chunk-EYKIXVM3.mjs} +2 -2
- package/dist/{chunk-XB657BXX.mjs → chunk-GI2O6H4I.mjs} +1 -1
- package/dist/{chunk-EADUR7IC.mjs → chunk-GVI6EBGJ.mjs} +2 -2
- package/dist/{chunk-T2XIDX6U.mjs → chunk-HK3CZVHY.mjs} +1 -1
- package/dist/{chunk-TNU3YDGL.mjs → chunk-HVKYWSRF.mjs} +1 -1
- package/dist/{chunk-N53SGN23.mjs → chunk-ILAQFMYD.mjs} +1 -1
- package/dist/chunk-ITWJSFYK.mjs +10 -0
- package/dist/{chunk-MFH2E2GU.mjs → chunk-IVC2BJRU.mjs} +1 -1
- package/dist/{chunk-TEQE6WCH.mjs → chunk-IXK6S6IH.mjs} +1 -1
- package/dist/{chunk-HXTAOYOD.mjs → chunk-IXRSSEHQ.mjs} +1 -1
- package/dist/{chunk-J7RVOP5G.mjs → chunk-JDIGAVFU.mjs} +1 -1
- package/dist/{chunk-C5P23FUW.mjs → chunk-K6HE4Z2Y.mjs} +1 -1
- package/dist/chunk-K73R5G6G.mjs +10 -0
- package/dist/chunk-KEAM6GSA.mjs +10 -0
- package/dist/{chunk-4SBMUWOY.mjs → chunk-KHOXLBPR.mjs} +1 -1
- package/dist/{chunk-Q4BSQC65.mjs → chunk-KWHTLY23.mjs} +1 -1
- package/dist/{chunk-2HMLSXNO.mjs → chunk-L6S5GBKS.mjs} +1 -1
- package/dist/{chunk-MFNWPTNI.mjs → chunk-M7OLZJYB.mjs} +2 -2
- package/dist/{chunk-KLNQ24LT.mjs → chunk-MONDDKB4.mjs} +1 -1
- package/dist/chunk-N26C7NYZ.mjs +10 -0
- package/dist/{chunk-C3W4WN2O.mjs → chunk-N6VKP3UH.mjs} +1 -1
- package/dist/{chunk-3L7GTQXK.mjs → chunk-NADBGP35.mjs} +1 -1
- package/dist/{chunk-TDPODC62.mjs → chunk-NMSOOQB2.mjs} +1 -1
- package/dist/{chunk-ENDOKA57.mjs → chunk-NQO6OQT6.mjs} +1 -1
- package/dist/{chunk-246VHB32.mjs → chunk-NUYBQ7KP.mjs} +1 -1
- package/dist/{chunk-JF4BWG7T.mjs → chunk-NZQVKNP4.mjs} +1 -1
- package/dist/{chunk-ZFLLIBX5.mjs → chunk-P37WUXAI.mjs} +1 -1
- package/dist/{chunk-RRB5F4E4.mjs → chunk-P5LSMA24.mjs} +3 -3
- package/dist/{chunk-XCL4K4MY.mjs → chunk-PA3THES4.mjs} +1 -1
- package/dist/{chunk-WICBTAMY.mjs → chunk-PG3WDHSK.mjs} +1 -1
- package/dist/{chunk-BZTAFNPW.mjs → chunk-PNBYTIUO.mjs} +1 -1
- package/dist/{chunk-GS4C6CYA.mjs → chunk-QDQPVCXN.mjs} +1 -1
- package/dist/{chunk-MXKP7NQ4.mjs → chunk-QSSCSN5S.mjs} +1 -1
- package/dist/{chunk-DAN5WASP.mjs → chunk-QXOG2ISL.mjs} +1 -1
- package/dist/{chunk-AL3FICFA.mjs → chunk-QYTY3KJR.mjs} +1 -1
- package/dist/{chunk-PFKPY3N7.mjs → chunk-R2OV7FJO.mjs} +1 -1
- package/dist/{chunk-H2E7GKGB.mjs → chunk-RJZZIVSY.mjs} +2 -2
- package/dist/{chunk-2NO2ITVE.mjs → chunk-RO5ZRU3Y.mjs} +1 -1
- package/dist/{chunk-7OCDKTTZ.mjs → chunk-RSTHM3ZF.mjs} +1 -1
- package/dist/{chunk-FTYXFTJV.mjs → chunk-SBR5UAUY.mjs} +2 -2
- package/dist/chunk-SHJ2TJYG.mjs +10 -0
- package/dist/{chunk-KAVZW4RV.mjs → chunk-SYFSGF73.mjs} +1 -1
- package/dist/{chunk-RM2Y4D2M.mjs → chunk-SZTFMBPY.mjs} +1 -1
- package/dist/chunk-T4R3EXGI.mjs +10 -0
- package/dist/{chunk-LTIDSWDM.mjs → chunk-TBCZKWGQ.mjs} +1 -1
- package/dist/{chunk-JJPCZOOI.mjs → chunk-TCCQDGMI.mjs} +1 -1
- package/dist/{chunk-IHLJTHGQ.mjs → chunk-TDYBXLYP.mjs} +1 -1
- package/dist/{chunk-MI7DCFP2.mjs → chunk-TTYRHIRQ.mjs} +1 -1
- package/dist/{chunk-OC42IZG2.mjs → chunk-UBFMOTBM.mjs} +2 -2
- package/dist/{chunk-4DTPDMSQ.mjs → chunk-UCPPKNGF.mjs} +1 -1
- package/dist/{chunk-EK3RIYMV.mjs → chunk-UEDBY5JI.mjs} +1 -1
- package/dist/{chunk-6DU65N7Q.mjs → chunk-UN7XC7QV.mjs} +2 -2
- package/dist/{chunk-JUXBZ2ZN.mjs → chunk-UT2I4K7L.mjs} +1 -1
- package/dist/{chunk-J7K7I5U2.mjs → chunk-V37GPPZD.mjs} +1 -1
- package/dist/chunk-VAFIUM63.mjs +29 -0
- package/dist/{chunk-KKJ6XIU3.mjs → chunk-VIVNQZYK.mjs} +2 -2
- package/dist/{chunk-RZEGMPV2.mjs → chunk-VOSSQAHC.mjs} +1 -1
- package/dist/{chunk-UCQJ6FJO.mjs → chunk-VZFS4QRW.mjs} +1 -1
- package/dist/{chunk-NVS22MIQ.mjs → chunk-X5Z54UUE.mjs} +1 -1
- package/dist/{chunk-LRZ6BQFQ.mjs → chunk-X6IJEPSH.mjs} +1 -1
- package/dist/{chunk-H4ZIN7W3.mjs → chunk-XEGXSFIP.mjs} +1 -1
- package/dist/{chunk-JQ4ZGZPV.mjs → chunk-XF5UMU6D.mjs} +3 -3
- package/dist/{chunk-ZAMDRHQY.mjs → chunk-XJ2DFV56.mjs} +1 -1
- package/dist/{chunk-NSC53QWT.mjs → chunk-XUJJMAKM.mjs} +1 -1
- package/dist/{chunk-QKKV24WQ.mjs → chunk-Y3YZMICA.mjs} +1 -1
- package/dist/{chunk-TO6OQF2Y.mjs → chunk-YKMSINHH.mjs} +2 -2
- package/dist/{chunk-7VHON5HL.mjs → chunk-YWCU4PP7.mjs} +2 -2
- package/dist/{chunk-3BL5D3CA.mjs → chunk-YWQXHVMW.mjs} +1 -1
- package/dist/{chunk-FOEGHU3P.mjs → chunk-YX2ASVM3.mjs} +1 -1
- package/dist/{chunk-OFWPRDTC.mjs → chunk-Z4HTFTPM.mjs} +1 -1
- package/dist/{chunk-QQGK5M66.mjs → chunk-ZLZAFTSD.mjs} +2 -2
- package/dist/hooks/useContainerScopedRef.mjs +1 -1
- package/dist/hooks/useDevice.mjs +1 -1
- package/dist/hooks/useIntersectionObserver.mjs +1 -1
- package/dist/hooks/useLocalStorage.mjs +1 -1
- package/dist/hooks/useMutationObserver.mjs +1 -1
- package/dist/hooks/usePortalContainer.mjs +1 -1
- package/dist/hooks/usePreventFocus.mjs +1 -1
- package/dist/hooks/useResizeObserver.mjs +1 -1
- package/dist/hooks/useTextSelection.mjs +1 -1
- package/dist/hooks/useUndoRedo.mjs +1 -1
- package/dist/index.d.ts +48 -33
- package/dist/index.js +19 -19
- package/dist/index.mjs +1 -1
- package/dist/utils/dom.mjs +1 -1
- package/dist/utils/isInShadowDOM.mjs +1 -1
- package/dist/utils/keyboards.mjs +1 -1
- package/package.json +6 -6
- package/sbom.json +27 -77
- package/dist/chunk-4I4TIV2G.mjs +0 -10
- package/dist/chunk-6IRWW75G.mjs +0 -10
- package/dist/chunk-6Y6BYHT4.mjs +0 -10
- package/dist/chunk-6ZFBX7C7.mjs +0 -10
- package/dist/chunk-AZRPXTYJ.mjs +0 -10
- package/dist/chunk-DSSMBDVA.mjs +0 -10
- package/dist/chunk-GLT45FXJ.mjs +0 -10
- package/dist/chunk-PDWICYVZ.mjs +0 -29
- package/dist/chunk-PF3OQKXP.mjs +0 -10
- package/dist/chunk-TIHKHXTS.mjs +0 -10
- package/dist/chunk-YVYMYKYN.mjs +0 -10
- package/dist/chunk-ZP4YB5RP.mjs +0 -10
- /package/dist/{chunk-FXCHST4Z.mjs → chunk-JQQGRJ5J.mjs} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$b}from'./chunk-AMYRLAIC.mjs';import {j,c,i,l,p,r,s,m,w,u,v,k,f as f$2,e as e$1,x,d,q,a as a$i}from'./chunk-SMAYNDQQ.mjs';import {a as a$f}from'./chunk-AMW7LGCF.mjs';import {b as b$1,c as c$
|
|
1
|
+
import {a as a$b}from'./chunk-AMYRLAIC.mjs';import {j,c,i,l,p,r,s,m,w,u,v,k,f as f$2,e as e$1,x,d,q,a as a$i}from'./chunk-SMAYNDQQ.mjs';import {a as a$f}from'./chunk-AMW7LGCF.mjs';import {b as b$1,c as c$5}from'./chunk-VIVNQZYK.mjs';import {c as c$7}from'./chunk-BROSGYL3.mjs';import {c as c$2,f as f$1,e as e$2,d as d$2}from'./chunk-7P322KP4.mjs';import {a as a$g}from'./chunk-DDLZ6CKC.mjs';import {a as a$l}from'./chunk-V37GPPZD.mjs';import {b as b$3}from'./chunk-NUYBQ7KP.mjs';import {d as d$3}from'./chunk-UBFMOTBM.mjs';import {b,c as c$1}from'./chunk-PAQQ7MQG.mjs';import {a as a$c,f as f$3}from'./chunk-DECHIERQ.mjs';import {f as f$4}from'./chunk-AKES5B6C.mjs';import {a as a$8,b as b$6}from'./chunk-AC7OXVHA.mjs';import {a as a$d}from'./chunk-O7XK2WIX.mjs';import {b as b$9}from'./chunk-WWSGOGLA.mjs';import {a as a$3}from'./chunk-KUEDQO7P.mjs';import {a}from'./chunk-USMC34OO.mjs';import {b as b$8}from'./chunk-WL27JGVG.mjs';import {a as a$q}from'./chunk-BU5H25MV.mjs';import {b as b$2}from'./chunk-N2XGJKZG.mjs';import {c as c$8}from'./chunk-RCBUNCHV.mjs';import {a as a$p}from'./chunk-UUBOEBYZ.mjs';import {e,h,c as c$3,b as b$4,f,a as a$9,d as d$1}from'./chunk-B7PSE5KC.mjs';import {a as a$m}from'./chunk-4PYEGHW5.mjs';import {a as a$h}from'./chunk-66CUIXA6.mjs';import {h as h$1,i as i$1,e as e$5}from'./chunk-SHJ2TJYG.mjs';import {a as a$k}from'./chunk-RXSYDMT6.mjs';import {a as a$1}from'./chunk-K6X2BHPP.mjs';import {a as a$6,d as d$6}from'./chunk-BGMVPFYK.mjs';import {a as a$7}from'./chunk-YB3KW7JC.mjs';import {b as b$5,d as d$5,f as f$6}from'./chunk-Y4DRSGEJ.mjs';import {a as a$5}from'./chunk-3FYY26ED.mjs';import {d as d$4}from'./chunk-AQYBKDT2.mjs';import {a as a$4}from'./chunk-RT4LMB6X.mjs';import {n,q as q$1,a as a$n,t,r as r$1}from'./chunk-MRJFGHFW.mjs';import {c as c$4}from'./chunk-TZ4MVY4E.mjs';import {a as a$2}from'./chunk-KEVERVHK.mjs';import {c as c$6,a as a$j,e as e$4}from'./chunk-JDLUGVXG.mjs';import {e as e$3,g,i as i$2,f as f$5,b as b$7,a as a$o}from'./chunk-AUOQSTS5.mjs';import {a as a$a}from'./chunk-JQQGRJ5J.mjs';import {a as a$e}from'./chunk-4QEH5CGK.mjs';import be,{createContext,forwardRef,useContext,useMemo,useRef,useEffect,useCallback,useImperativeHandle,useState}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {ChevronRightFilledIcon}from'@baseline-ui/icons/8';import {CheckmarkIcon as CheckmarkIcon$1}from'@baseline-ui/icons/12';import {CheckmarkIcon}from'@baseline-ui/icons/24';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -7,4 +7,4 @@ import {a as a$b}from'./chunk-AMYRLAIC.mjs';import {j,c,i,l,p,r,s,m,w,u,v,k,f as
|
|
|
7
7
|
* This notice may not be removed from this file.
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
var ge=createContext({}),ze=j(c,function(e$1,t){return [e$1,t]=e(e$1,t,ge),jsx(h.header,{className:"react-aria-Header",...e$1,ref:t,children:e$1.children})});var _e=createContext({});var lt=createContext(null),le=createContext(null),st=forwardRef(function(e$1,t){[e$1,t]=e(e$1,t,lt);let o=useContext(le);return o?jsx(Lr,{state:o,props:e$1,listBoxRef:t}):jsx(i,{content:jsx(l,{...e$1}),children:n=>jsx(uo,{props:e$1,listBoxRef:t,collection:n})})});function uo({props:r,listBoxRef:e,collection:t}){r={...r,collection:t,children:null,items:null};let{layoutDelegate:o}=useContext(p),n=b({...r,layoutDelegate:o});return jsx(Lr,{state:n,props:r,listBoxRef:e})}function Lr({state:r$1,props:e$1,listBoxRef:t}){[e$1,t]=e(e$1,t,b$1);let{dragAndDropHooks:o,layout:n="stack",orientation:i="vertical",filter:l}=e$1,s$1=c$1(r$1,l),{collection:p$1,selectionManager:m$1}=s$1,u$1=!!o?.useDraggableCollectionState,c=!!o?.useDroppableCollectionState,{direction:f}=b$2(),{disabledBehavior:a$4,disabledKeys:x}=m$1,g=a({usage:"search",sensitivity:"base"}),{isVirtualized:R,layoutDelegate:M,dropTargetDelegate:D,CollectionRoot:v$1}=useContext(p),L=useMemo(()=>e$1.keyboardDelegate||new b$3({collection:p$1,collator:g,ref:t,disabledKeys:x,disabledBehavior:a$4,layout:n,orientation:i,direction:f,layoutDelegate:M}),[p$1,g,t,a$4,x,i,f,e$1.keyboardDelegate,n,M]),{listBoxProps:O}=c$2({...e$1,shouldSelectOnPressUp:u$1||e$1.shouldSelectOnPressUp,keyboardDelegate:L,isVirtualized:R},s$1,t),k=useRef(u$1),d=useRef(c);useEffect(()=>{process.env.NODE_ENV!=="production"&&(k.current!==u$1&&console.warn("Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior."),d.current!==c&&console.warn("Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior."));},[u$1,c]);let S,E,w$1,y=false,b=null,h$1=useRef(null);if(u$1&&o){S=o.useDraggableCollectionState({collection:p$1,selectionManager:m$1,preview:o.renderDragPreview?h$1:void 0}),o.useDraggableCollection({},S,t);let Y=o.DragPreview;b=o.renderDragPreview?jsx(Y,{ref:h$1,children:o.renderDragPreview}):null;}if(c&&o){E=o.useDroppableCollectionState({collection:p$1,selectionManager:m$1});let Y=o.dropTargetDelegate||D||new o.ListDropTargetDelegate(p$1,t,{orientation:i,layout:n,direction:f});w$1=o.useDroppableCollection({keyboardDelegate:L,dropTargetDelegate:Y},E,t),y=E.isDropTarget({type:"root"});}let{focusProps:z,isFocused:j,isFocusVisible:_}=a$1(),H=s$1.collection.size===0,W={isDropTarget:y,isEmpty:H,isFocused:j,isFocusVisible:_,layout:e$1.layout||"stack",orientation:i,state:s$1},se=c$3({...e$1,children:void 0,defaultClassName:"react-aria-ListBox",values:W}),te=null;H&&e$1.renderEmptyState&&(te=jsx("div",{role:"option",style:{display:"contents"},children:e$1.renderEmptyState(W)}));let J=a$2(e$1,{global:true});return jsx(a$3,{children:jsxs(h.div,{...c$4(J,se,O,z,w$1?.collectionProps),ref:t,slot:e$1.slot||void 0,onScroll:e$1.onScroll,"data-drop-target":y||void 0,"data-empty":H||void 0,"data-focused":j||void 0,"data-focus-visible":_||void 0,"data-layout":e$1.layout||"stack","data-orientation":i,children:[jsx(b$4,{values:[[lt,e$1],[le,s$1],[r,{dragAndDropHooks:o,dragState:S,dropState:E}],[_e,{elementType:"div"}],[s,{render:co}],[m,{name:"ListBoxSection",render:Er}]],children:jsx(w,{children:jsx(v$1,{collection:p$1,scrollRef:t,persistedKeys:v(m$1,o,E),renderDropIndicator:u(o,E)})})}),te,b]})})}function Er(r$1,e,t,o="react-aria-ListBoxSection"){let n=useContext(le),{dragAndDropHooks:i,dropState:l}=useContext(r),{CollectionBranch:s}=useContext(p),[p$1,m]=f(),{headingProps:u$1,groupProps:c}=f$1({heading:m,"aria-label":r$1["aria-label"]??void 0}),f$2=c$3({...r$1,id:void 0,children:void 0,defaultClassName:o,values:void 0}),a=a$2(r$1,{global:true});return delete a.id,jsx(h.section,{...c$4(a,f$2,c),ref:e,children:jsx(ge.Provider,{value:{...u$1,ref:p$1},children:jsx(s,{collection:n.collection,parent:t,renderDropIndicator:u(i,l)})})})}var at=k(f$2,Er),ut=j(e$1,function(e,t,o){let n=a$4(t),i=useContext(le),{dragAndDropHooks:l,dragState:s,dropState:p}=useContext(r),m=s&&!(s.isDisabled||s.selectionManager.isDisabled(o.key)),{optionProps:u,labelProps:c,descriptionProps:f,...a}=e$2({key:o.key,"aria-label":e?.["aria-label"]},i,n),{hoverProps:x$1,isHovered:g}=a$5({isDisabled:!a.allowsSelection&&!a.hasAction&&!m,onHoverStart:o.props.onHoverStart,onHoverChange:o.props.onHoverChange,onHoverEnd:o.props.onHoverEnd}),{keyboardProps:R}=a$6(e),{focusProps:M}=a$7(e),D=null;s&&l&&(D=l.useDraggableItem({key:o.key,hasAction:a.hasAction},s,n));let v=null;p&&l&&(v=l.useDroppableItem({target:{type:"item",key:o.key,dropPosition:"on"}},p,n));let L=s&&s.isDragging(o.key),O=c$3({...e,id:void 0,children:e.children,defaultClassName:"react-aria-ListBoxItem",values:{...a,isHovered:g,selectionMode:i.selectionManager.selectionMode,selectionBehavior:i.selectionManager.selectionBehavior,allowsDragging:!!s,isDragging:L,isDropTarget:v?.isDropTarget}});useEffect(()=>{!o.textValue&&process.env.NODE_ENV!=="production"&&console.warn("A `textValue` prop is required for <ListBoxItem> elements with non-plain text children in order to support accessibility features such as type to select.");},[o.textValue]);let k=e.href?h.a:h.div,d=a$2(e,{global:true});return delete d.id,delete d.onClick,e.href&&u.tabIndex==null&&(u.tabIndex=-1),jsx(k,{...c$4(d,O,u,x$1,R,M,D?.dragProps,v?.dropProps),ref:n,"data-allows-dragging":!!s||void 0,"data-selected":a.isSelected||void 0,"data-disabled":a.isDisabled||void 0,"data-hovered":g||void 0,"data-focused":a.isFocused||void 0,"data-focus-visible":a.isFocusVisible||void 0,"data-pressed":a.isPressed||void 0,"data-dragging":L||void 0,"data-drop-target":v?.isDropTarget||void 0,"data-selection-mode":i.selectionManager.selectionMode==="none"?void 0:i.selectionManager.selectionMode,children:jsx(b$4,{values:[[a$8,{slots:{[a$9]:c,label:c,description:f}}],[x,{isSelected:a.isSelected}]],children:O.children})})});function co(r$1,e){e=a$4(e);let{dragAndDropHooks:t,dropState:o}=useContext(r),{dropIndicatorProps:n,isHidden:i,isDropTarget:l}=t.useDropIndicator(r$1,o,e);return i?null:jsx(mo,{...r$1,dropIndicatorProps:n,isDropTarget:l,ref:e})}function po(r,e){let{dropIndicatorProps:t,isDropTarget:o,...n}=r,i=c$3({...n,defaultClassName:"react-aria-DropIndicator",values:{isDropTarget:o}});return jsx(Fragment,{children:jsx(h.div,{...t,...i,role:"option",ref:e,"data-drop-target":o||void 0})})}var mo=forwardRef(po);j(d,function(e,t,o){let n=useContext(le),{isLoading:i,onLoadMore:l,scrollOffset:s,...p}=e,m=useRef(null),u=useMemo(()=>({onLoadMore:l,collection:n?.collection,sentinelRef:m,scrollOffset:s}),[l,s,n?.collection]);b$5(u,m);let c=c$3({...p,id:void 0,children:o.rendered,defaultClassName:"react-aria-ListBoxLoadingIndicator",values:void 0}),f={tabIndex:-1};return jsxs(Fragment,{children:[jsx("div",{style:{position:"relative",width:0,height:0},inert:c$5(true),children:jsx("div",{"data-testid":"loadMoreSentinel",ref:m,style:{position:"absolute",height:1,width:1}})}),i&&c.children&&jsx(Fragment,{children:jsx(h.div,{...c$4(a$2(e,{global:true}),f),...c,role:"option",ref:t,children:c.children})})]})});var Ve=({renderOption:r,optionClassName:e,optionStyle:t,renderSectionHeader:o,sectionClassName:n,sectionStyle:i,showSectionHeader:l,withSectionHeaderPadding:s}={})=>Object.values({renderOption:r,optionClassName:e,optionStyle:t,renderSectionHeader:o,sectionClassName:n,sectionStyle:i,showSectionHeader:l,withSectionHeaderPadding:s});var gi=a$a({defaultClassName:"_1fjxa6ld _1yep5z6m8 _1yep5z6m7 _1yep5z6is _1yep5z6lq",variantClassNames:{isDropTarget:{true:"_1yep5z614w"},orientation:{vertical:"_1yep5z618m",horizontal:"_1yep5z618n"}},defaultVariants:{},compoundVariants:[]}),Ar="_1fjxa6la _1yep5z6m6 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",Ir=a$a({defaultClassName:"_1fjxa6lb _1yep5z6ez _1yep5z6da _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z6f2"}},defaultVariants:{},compoundVariants:[]}),kr=a$a({defaultClassName:"_1fjxa6l3 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6kz _1yep5z6l0 _1yep5z6l1 _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6dy _1yep5z6ey _1yep5z6lq _1yep5z6lt _1yep5z6m6 _1yep5z6m5 _1yep5z6m3 _1yep5z6m0",variantClassNames:{isSelected:{},isFocused:{true:"_1yep5z614w _1yep5z618s _1yep5z618q _1yep5z618t _1yep5z615c _1yep5z615d _1yep5z615e"},isFirstChild:{true:"_1fjxa6l5"},isLastChild:{true:"_1fjxa6l6"},isHovered:{true:"_1yep5z612t",false:"_1yep5z612s"},isDisabled:{true:"z9nup82 _1yep5z611l"}},defaultVariants:{},compoundVariants:[]}),wr="_1fjxa6lh _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1",Fr="_1fjxa6l1",Br="_1fjxa6l2",Hr="_1fjxa6l0";var Nr={"ar-AE":{longPressMessage:"\u0627\u0636\u063A\u0637 \u0645\u0637\u0648\u0644\u0627\u064B \u0623\u0648 \u0627\u0636\u063A\u0637 \u0639\u0644\u0649 Alt + \u0627\u0644\u0633\u0647\u0645 \u0644\u0623\u0633\u0641\u0644 \u0644\u0641\u062A\u062D \u0627\u0644\u0642\u0627\u0626\u0645\u0629"},"bg-BG":{longPressMessage:"\u041D\u0430\u0442\u0438\u0441\u043D\u0435\u0442\u0435 \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E \u0438\u043B\u0438 \u043D\u0430\u0442\u0438\u0441\u043D\u0435\u0442\u0435 Alt+ \u0441\u0442\u0440\u0435\u043B\u043A\u0430 \u043D\u0430\u0434\u043E\u043B\u0443, \u0437\u0430 \u0434\u0430 \u043E\u0442\u0432\u043E\u0440\u0438\u0442\u0435 \u043C\u0435\u043D\u044E\u0442\u043E"},"cs-CZ":{longPressMessage:"Dlouh\xFDm stiskem nebo stisknut\xEDm kl\xE1ves Alt + \u0161ipka dol\u016F otev\u0159ete nab\xEDdku"},"da-DK":{longPressMessage:"Langt tryk eller tryk p\xE5 Alt + pil ned for at \xE5bne menuen"},"de-DE":{longPressMessage:"Dr\xFCcken Sie lange oder dr\xFCcken Sie Alt + Nach-unten, um das Men\xFC zu \xF6ffnen"},"el-GR":{longPressMessage:"\u03A0\u03B9\u03AD\u03C3\u03C4\u03B5 \u03C0\u03B1\u03C1\u03B1\u03C4\u03B5\u03C4\u03B1\u03BC\u03AD\u03BD\u03B1 \u03AE \u03C0\u03B1\u03C4\u03AE\u03C3\u03C4\u03B5 Alt + \u03BA\u03AC\u03C4\u03C9 \u03B2\u03AD\u03BB\u03BF\u03C2 \u03B3\u03B9\u03B1 \u03BD\u03B1 \u03B1\u03BD\u03BF\u03AF\u03BE\u03B5\u03C4\u03B5 \u03C4\u03BF \u03BC\u03B5\u03BD\u03BF\u03CD"},"en-US":{longPressMessage:"Long press or press Alt + ArrowDown to open menu"},"es-ES":{longPressMessage:"Mantenga pulsado o pulse Alt + flecha abajo para abrir el men\xFA"},"et-EE":{longPressMessage:"Men\xFC\xFC avamiseks vajutage pikalt v\xF5i vajutage klahve Alt + allanool"},"fi-FI":{longPressMessage:"Avaa valikko painamalla pohjassa tai n\xE4pp\xE4inyhdistelm\xE4ll\xE4 Alt + Alanuoli"},"fr-FR":{longPressMessage:"Appuyez de mani\xE8re prolong\xE9e ou appuyez sur Alt\xA0+\xA0Fl\xE8che vers le bas pour ouvrir le menu."},"he-IL":{longPressMessage:"\u05DC\u05D7\u05E5 \u05DC\u05D7\u05D9\u05E6\u05D4 \u05D0\u05E8\u05D5\u05DB\u05D4 \u05D0\u05D5 \u05D4\u05E7\u05E9 Alt + ArrowDown \u05DB\u05D3\u05D9 \u05DC\u05E4\u05EA\u05D5\u05D7 \u05D0\u05EA \u05D4\u05EA\u05E4\u05E8\u05D9\u05D8"},"hr-HR":{longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika"},"hu-HU":{longPressMessage:"Nyomja meg hosszan, vagy nyomja meg az Alt + lefele ny\xEDl gombot a men\xFC megnyit\xE1s\xE1hoz"},"it-IT":{longPressMessage:"Premi a lungo o premi Alt + Freccia gi\xF9 per aprire il menu"},"ja-JP":{longPressMessage:"\u9577\u62BC\u3057\u307E\u305F\u306F Alt+\u4E0B\u77E2\u5370\u30AD\u30FC\u3067\u30E1\u30CB\u30E5\u30FC\u3092\u958B\u304F"},"ko-KR":{longPressMessage:"\uAE38\uAC8C \uB204\uB974\uAC70\uB098 Alt + \uC544\uB798\uCABD \uD654\uC0B4\uD45C\uB97C \uB20C\uB7EC \uBA54\uB274 \uC5F4\uAE30"},"lt-LT":{longPressMessage:"Nor\u0117dami atidaryti meniu, nuspaud\u0119 palaikykite arba paspauskite \u201EAlt + ArrowDown\u201C."},"lv-LV":{longPressMessage:"Lai atv\u0113rtu izv\u0113lni, turiet nospiestu vai nospiediet tausti\u0146u kombin\u0101ciju Alt + lejupv\u0113rst\u0101 bulti\u0146a"},"nb-NO":{longPressMessage:"Langt trykk eller trykk Alt + PilNed for \xE5 \xE5pne menyen"},"nl-NL":{longPressMessage:"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen"},"pl-PL":{longPressMessage:"Naci\u015Bnij i przytrzymaj lub naci\u015Bnij klawisze Alt + Strza\u0142ka w d\xF3\u0142, aby otworzy\u0107 menu"},"pt-BR":{longPressMessage:"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu"},"pt-PT":{longPressMessage:"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu"},"ro-RO":{longPressMessage:"Ap\u0103sa\u021Bi lung sau ap\u0103sa\u021Bi pe Alt + s\u0103geat\u0103 \xEEn jos pentru a deschide meniul"},"ru-RU":{longPressMessage:"\u041D\u0430\u0436\u043C\u0438\u0442\u0435 \u0438 \u0443\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0439\u0442\u0435 \u0438\u043B\u0438 \u043D\u0430\u0436\u043C\u0438\u0442\u0435 Alt + \u0421\u0442\u0440\u0435\u043B\u043A\u0430 \u0432\u043D\u0438\u0437, \u0447\u0442\u043E\u0431\u044B \u043E\u0442\u043A\u0440\u044B\u0442\u044C \u043C\u0435\u043D\u044E"},"sk-SK":{longPressMessage:"Ponuku otvor\xEDte dlh\xFDm stla\u010Den\xEDm alebo stla\u010Den\xEDm kl\xE1vesu Alt + kl\xE1vesu so \u0161\xEDpkou nadol"},"sl-SI":{longPressMessage:"Za odprtje menija pritisnite in dr\u017Eite gumb ali pritisnite Alt+pu\u0161\u010Dica navzdol"},"sr-SP":{longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni"},"sv-SE":{longPressMessage:"H\xE5ll nedtryckt eller tryck p\xE5 Alt + pil ned\xE5t f\xF6r att \xF6ppna menyn"},"tr-TR":{longPressMessage:"Men\xFCy\xFC a\xE7mak i\xE7in uzun bas\u0131n veya Alt + A\u015Fa\u011F\u0131 Ok tu\u015Funa bas\u0131n"},"uk-UA":{longPressMessage:"\u0414\u043E\u0432\u0433\u043E \u0430\u0431\u043E \u0437\u0432\u0438\u0447\u0430\u0439\u043D\u043E \u043D\u0430\u0442\u0438\u0441\u043D\u0456\u0442\u044C \u043A\u043E\u043C\u0431\u0456\u043D\u0430\u0446\u0456\u044E \u043A\u043B\u0430\u0432\u0456\u0448 Alt \u0456 \u0441\u0442\u0440\u0456\u043B\u043A\u0430 \u0432\u043D\u0438\u0437, \u0449\u043E\u0431 \u0432\u0456\u0434\u043A\u0440\u0438\u0442\u0438 \u043C\u0435\u043D\u044E"},"zh-CN":{longPressMessage:"\u957F\u6309\u6216\u6309 Alt + \u5411\u4E0B\u65B9\u5411\u952E\u4EE5\u6253\u5F00\u83DC\u5355"},"zh-TW":{longPressMessage:"\u9577\u6309\u6216\u6309 Alt+\u5411\u4E0B\u9375\u4EE5\u958B\u555F\u529F\u80FD\u8868"}};function dt(r,e,t){let{type:o="menu",isDisabled:n,trigger:i="press"}=r,l=c$7(),{triggerProps:s,overlayProps:p}=a$q({type:o},e,t),m=a=>{if(!n&&!(i==="longPress"&&!a.altKey)&&t&&t.current)switch(a.key){case "Enter":case " ":if(i==="longPress"||a.isDefaultPrevented())return;case "ArrowDown":"continuePropagation"in a||a.stopPropagation(),a.preventDefault(),e.toggle("first");break;case "ArrowUp":"continuePropagation"in a||a.stopPropagation(),a.preventDefault(),e.toggle("last");break;default:"continuePropagation"in a&&a.continuePropagation();}},u=b$9(Nr,"@react-aria/menu"),{longPressProps:c}=a$r({isDisabled:n||i!=="longPress",accessibilityDescription:u.format("longPressMessage"),onLongPressStart(){e.close();},onLongPress(){e.open("first");}}),f={preventFocusOnPress:true,onPressStart(a){a.pointerType!=="touch"&&a.pointerType!=="keyboard"&&!n&&(a$n(a.target),e.open(a.pointerType==="virtual"?"first":null));},onPress(a){a.pointerType==="touch"&&!n&&(a$n(a.target),e.toggle());}};return delete s.onPress,{menuTriggerProps:{...s,...i==="press"?f:c,id:l,onKeyDown:m},menuProps:{...p,"aria-labelledby":l,autoFocus:e.focusStrategy||true,onClose:e.close}}}var je=new WeakMap;function ct(r,e,t){let{shouldFocusWrap:o=true,onKeyDown:n,onKeyUp:i,...l}=r;!r["aria-label"]&&!r["aria-labelledby"]&&process.env.NODE_ENV!=="production"&&console.warn("An aria-label or aria-labelledby prop is required for accessibility.");let s=a$2(r,{labelable:true}),{listProps:p}=a$l({...l,ref:t,selectionManager:e.selectionManager,collection:e.collection,disabledKeys:e.disabledKeys,shouldFocusWrap:o,linkBehavior:"override"});return je.set(e,{onClose:r.onClose,onAction:r.onAction,shouldUseVirtualFocus:r.shouldUseVirtualFocus}),{menuProps:c$4(s,{onKeyDown:n,onKeyUp:i},{role:"menu",...p,onKeyDown:m=>{(m.key!=="Escape"||r.shouldUseVirtualFocus)&&p.onKeyDown?.(m);}})}}function pt(r,e,t){let{id:o,key:n$1,closeOnSelect:i,shouldCloseOnSelect:l,isVirtualized:s,"aria-haspopup":p,onPressStart:m,onPressUp:u,onPress:c,onPressChange:f,onPressEnd:a,onClick:x,onHoverStart:g$1,onHoverChange:R,onHoverEnd:M,onKeyDown:D,onKeyUp:v,onFocus:L,onFocusChange:O,onBlur:k,selectionManager:d=e.selectionManager}=r,S=!!p,E=S&&r["aria-expanded"]==="true",w=r.isDisabled??d.isDisabled(n$1),y=r.isSelected??d.isSelected(n$1),b=je.get(e),h=e.collection.getItem(n$1),z=r.onClose||b.onClose,j=n(),_=()=>{if(!S&&(h?.props?.onAction?h.props.onAction():r.onAction&&r.onAction(n$1),b.onAction)){let P=b.onAction;P(n$1,h?.value);}},H="menuitem";S||(d.selectionMode==="single"?H="menuitemradio":d.selectionMode==="multiple"&&(H="menuitemcheckbox"));let W=e$4(),se=e$4(),te=e$4(),J={id:o,"aria-disabled":w||void 0,role:H,"aria-label":r["aria-label"],"aria-labelledby":W,"aria-describedby":[r["aria-describedby"],se,te].filter(Boolean).join(" ")||void 0,"aria-controls":r["aria-controls"],"aria-haspopup":p,"aria-expanded":r["aria-expanded"]};if(d.selectionMode!=="none"&&!S&&(J["aria-checked"]=y),s){let P=Number(h?.index);J["aria-posinset"]=Number.isNaN(P)?void 0:P+1,J["aria-setsize"]=d$2(e.collection);}let Y=useRef(false),he=P=>{f?.(P),Y.current=P;},Z=useRef(null),T=P=>{P.pointerType!=="keyboard"&&(Z.current={pointerType:P.pointerType}),P.pointerType==="mouse"&&(Y.current||P.target.click()),u?.(P);},ue=P=>{x?.(P),_(),r$1(P,j,h.props.href,h?.props.routerOptions);let Je=Z.current?.pointerType==="keyboard"?Z.current?.key==="Enter"||d.selectionMode==="none"||d.isLink(n$1):d.selectionMode!=="multiple"||d.isLink(n$1);Je=l??i??Je,z&&!S&&Je&&z(),Z.current=null;},{itemProps:re,isFocused:At}=d$3({id:o,selectionManager:d,key:n$1,ref:t,shouldSelectOnPressUp:true,allowsDifferentPressOrigin:true,linkBehavior:"none",shouldUseVirtualFocus:b.shouldUseVirtualFocus}),{pressProps:eo,isPressed:to}=d$4({onPressStart:m,onPress:c,onPressUp:T,onPressChange:he,onPressEnd:a,isDisabled:w}),{hoverProps:ro}=a$5({isDisabled:w,onHoverStart(P){!b$6()&&!(E&&p)&&(d.setFocused(true),d.setFocusedKey(n$1)),g$1?.(P);},onHoverChange:R,onHoverEnd:M}),{keyboardProps:oo}=a$6({onKeyDown:P=>{if(P.repeat){P.continuePropagation();return}switch(P.key){case " ":Z.current={pointerType:"keyboard",key:" "},g(P).click(),d$5("keyboard");break;case "Enter":Z.current={pointerType:"keyboard",key:"Enter"},g(P).tagName!=="A"&&g(P).click(),d$5("keyboard");break;default:S||P.continuePropagation(),D?.(P);break}},onKeyUp:v}),{focusableProps:no}=d$6({onBlur:k,onFocus:L,onFocusChange:O},t),It=a$2(h?.props);delete It.id;let io=q$1(h?.props);return {menuItemProps:{...J,...c$4(It,io,S?{onFocus:re.onFocus,"data-collection":re["data-collection"],"data-key":re["data-key"]}:re,eo,ro,oo,no,b.shouldUseVirtualFocus||S?{onMouseDown:P=>P.preventDefault()}:void 0,w?void 0:{onClick:ue}),tabIndex:re.tabIndex!=null&&E&&!b.shouldUseVirtualFocus?-1:re.tabIndex},labelProps:{id:W},descriptionProps:{id:se},keyboardShortcutProps:{id:te},isFocused:At,isFocusVisible:At&&d.isFocused&&b$6()&&!E,isSelected:y,isPressed:to,isDisabled:w}}function mt(r){let{heading:e,"aria-label":t}=r,o=e$4([!!e]);return {itemProps:{role:"presentation"},headingProps:e?{id:o,role:"presentation"}:{},groupProps:{role:"group","aria-label":t,"aria-labelledby":e?o:void 0}}}var Ue=2,Po=50,bo=1e3,_r=Math.PI/12;function Kr(r){let{menuRef:e,submenuRef:t$1,isOpen:o,isDisabled:n}=r,i=useRef(void 0),l=useRef(void 0),s=useRef(0),p=useRef(void 0),m=useRef(void 0),u=useRef(void 0),c=useRef(2),[f,a]=useState(false);a$o({ref:o?t$1:void 0,onResize:()=>{t$1.current&&(l.current=t$1.current.getBoundingClientRect(),u.current=void 0);}});let g=()=>{a(false),c.current=Ue,i.current=void 0;},R=f$6(),M=t(D=>{f&&D.preventDefault();});useEffect(()=>{f&&e.current?e.current.style.pointerEvents="none":e.current.style.pointerEvents="";},[e,f]),a$j(()=>{let D=t$1.current,v=e.current;if(n||!D||!o||R!=="pointer"||!v){g();return}l.current=D.getBoundingClientRect();let L=k=>{if(k.pointerType==="touch"||k.pointerType==="pen")return;let d=Date.now();if(d-s.current<Po)return;clearTimeout(p.current),clearTimeout(m.current);let{clientX:S,clientY:E}=k;if(!i.current){i.current={x:S,y:E};return}if(!l.current)return;if(u.current||(u.current=S>l.current.right?"left":"right"),S<v.getBoundingClientRect().left||S>v.getBoundingClientRect().right||E<v.getBoundingClientRect().top||E>v.getBoundingClientRect().bottom){g();return}let w=i.current.x,y=i.current.y,b=u.current==="right"?l.current.left-w:w-l.current.right,h=Math.atan2(y-l.current.top,b)+_r,z=Math.atan2(y-l.current.bottom,b)-_r,j=Math.atan2(y-E,u.current==="left"?-(S-w):S-w),_=j<h&&j>z;c.current=_?Math.min(c.current+1,Ue):Math.max(c.current-1,0),c.current>=Ue?a(true):a(false),s.current=d,i.current={x:S,y:E},_&&(p.current=setTimeout(()=>{g(),m.current=setTimeout(()=>{let H=a$p(v).elementFromPoint(S,E);H&&e$3(v,H)&&H.dispatchEvent(new PointerEvent("pointerover",{bubbles:true,cancelable:true}));},100);},bo));},O=b$8(v);return O.addEventListener("pointermove",L),process.env.NODE_ENV!=="test"&&O.addEventListener("pointerdown",M,true),()=>{O.removeEventListener("pointermove",L),process.env.NODE_ENV!=="test"&&O.removeEventListener("pointerdown",M,true),clearTimeout(p.current),clearTimeout(m.current),c.current=Ue;}},[n,o,e,R,a,t$1]);}function gt(r,e,t){let{parentMenuRef:o,submenuRef:n,type:i="menu",isDisabled:l,delay:s=200,shouldUseVirtualFocus:p}=r,m=c$7(),u=c$7(),{direction:c}=b$2(),f=useRef(void 0),a=useCallback(()=>{f.current&&(clearTimeout(f.current),f.current=void 0);},[f]),x=useCallback(d=>{a(),e.open(d);},[e,a]),g$1=useCallback(()=>{a(),e.close();},[e,a]);a$j(()=>()=>{a();},[a]);let R=d=>{if(i$1(d.currentTarget))switch(d.key){case "ArrowLeft":c==="ltr"&&e$3(d.currentTarget,g(d))&&(d.preventDefault(),d.stopPropagation(),g$1(),!p&&t.current&&a$n(t.current));break;case "ArrowRight":c==="rtl"&&e$3(d.currentTarget,g(d))&&(d.preventDefault(),d.stopPropagation(),g$1(),!p&&t.current&&a$n(t.current));break;case "Escape":e$3(n.current,g(d))&&(d.stopPropagation(),g$1(),!p&&t.current&&a$n(t.current));break}},M={id:u,"aria-labelledby":m,submenuLevel:e.submenuLevel,...i==="menu"&&{onClose:e.closeAll,autoFocus:e.focusStrategy??void 0,onKeyDown:R}},D=d=>{switch(d.key){case "ArrowRight":l||(c==="ltr"?(d.preventDefault(),e.isOpen||x("first"),i==="menu"&&n?.current&&f$5()===t?.current&&a$n(n.current)):e.isOpen?g$1():d.continuePropagation());break;case "ArrowLeft":l||(c==="rtl"?(d.preventDefault(),e.isOpen||x("first"),i==="menu"&&n?.current&&f$5()===t?.current&&a$n(n.current)):e.isOpen?g$1():d.continuePropagation());break;default:d.continuePropagation();break}},v=d=>{!l&&(d.pointerType==="virtual"||d.pointerType==="keyboard")&&x("first");},L=d=>{!l&&(d.pointerType==="touch"||d.pointerType==="mouse")&&x();},O=d=>{l||(d&&!e.isOpen?f.current||(f.current=setTimeout(()=>{x();},s)):d||a());};a$k(o,"focusin",d=>{e.isOpen&&e$3(o.current,g(d))&&g(d)!==t.current&&g$1();});let k=d=>d!==t.current;return Kr({menuRef:o,submenuRef:n,isOpen:e.isOpen,isDisabled:l}),{submenuTriggerProps:{id:m,"aria-controls":e.isOpen?u:void 0,"aria-haspopup":l?void 0:i,"aria-expanded":e.isOpen?"true":"false",onPressStart:v,onPress:L,onHoverChange:O,onKeyDown:D,isOpen:e.isOpen},submenuProps:M,popoverProps:{isNonModal:true,shouldCloseOnInteractOutside:k}}}function We(r){let e=a$m(r),[t,o]=useState(null),[n,i]=useState([]),l=()=>{i([]),e.close();};return {focusStrategy:t,...e,open(m=null){o(m),e.open();},toggle(m=null){o(m),e.toggle();},close(){l();},expandedKeysStack:n,openSubmenu:(m,u)=>{i(c=>u>c.length?c:[...c.slice(0,u),m]);},closeSubmenu:(m,u)=>{i(c=>c[u]===m?c.slice(0,u):c);}}}function Pt(r,e){let{triggerKey:t}=r,{expandedKeysStack:o,openSubmenu:n,closeSubmenu:i,close:l}=e,[s]=useState(o?.length),p=useMemo(()=>o[s]===t,[o,t,s]),[m,u]=useState(null),c=useCallback(x=>{u(x??null),n(t,s);},[n,s,t]),f=useCallback(()=>{u(null),i(t,s);},[i,s,t]),a=useCallback(x=>{u(x??null),p?f():c(x);},[f,c,p]);return useMemo(()=>({focusStrategy:m,isOpen:p,open:c,close:f,closeAll:l,submenuLevel:s,setOpen:()=>{},toggle:a}),[p,c,f,l,m,a,s])}var bt=createContext({});forwardRef(function(e$1,t){return [e$1,t]=e(e$1,t,bt),jsx(h.kbd,{dir:"ltr",...e$1,ref:t})});var Do=createContext({}),Xl=forwardRef(function(e$1,t){[e$1,t]=e(e$1,t,Do);let{children:o,level:n=3,className:i,...l}=e$1,s=h[`h${n}`];return jsx(s,{...l,ref:t,className:i??"react-aria-Heading",children:o})});var xt=createContext(null);createContext(null);createContext(null);var vt=createContext(null);var Xe=createContext(null),De=createContext(null),Ce=createContext(null),Ge=createContext(null);function Eo(r){let e=We(r),t=useRef(null),{menuTriggerProps:o,menuProps:n}=dt({...r,type:"menu"},e,t),i=useRef(null);return c$9()?null:jsx(b$4,{values:[[Xe,{...n,ref:i}],[vt,e],[Ce,e],[xt,{trigger:"MenuTrigger",triggerRef:t,scrollRef:i,placement:"bottom start","aria-labelledby":n["aria-labelledby"]}]],children:jsx(b$a,{...o,ref:t,isPressed:e.isOpen,children:r.children})})}var Xr=createContext(null),Mt=class extends a$i{static type="submenutrigger";filter(e,t,o){let n=e.getItem(this.firstChildKey);if(n&&o(n.textValue,this)){let i=this.clone();return t.addDescendants(i,e),i}return null}},Oo=k(Mt,(r,e,t)=>{let{CollectionBranch:o}=useContext(p),n=useContext(De),i=useContext(Ce),l=Pt({triggerKey:t.key},i),s=useRef(null),p$1=a$4(e),{parentMenuRef:m,shouldUseVirtualFocus:u}=useContext(Xr),{submenuTriggerProps:c,submenuProps:f,popoverProps:a}=gt({parentMenuRef:m,submenuRef:s,delay:r.delay,shouldUseVirtualFocus:u},l,p$1);return jsxs(b$4,{values:[[ye,{...c,onAction:void 0,ref:p$1}],[Xe,{ref:s,...f}],[vt,l],[xt,{trigger:"SubmenuTrigger",triggerRef:p$1,placement:"end top","aria-labelledby":f["aria-labelledby"],...a}]],children:[jsx(o,{collection:n.collection,parent:t}),r.children[1]]})},r=>r.children[0]),Ao=forwardRef(function(e$1,t){return [e$1,t]=e(e$1,t,Xe),jsx(i,{content:jsx(l,{...e$1}),children:o=>jsx(Io,{props:e$1,collection:o,menuRef:t})})});function Io({props:r,collection:e$1,menuRef:t}){[r,t]=e(r,t,b$1);let{filter:o,...n}=r,i=useMemo(()=>o?e$1.filter(o):e$1,[e$1,o]),l=a$b({...r,collection:i,children:void 0}),s=useContext(Ce),{isVirtualized:p$1,CollectionRoot:m$1}=useContext(p),{menuProps:u}=ct({...r,isVirtualized:p$1,onClose:r.onClose||s?.close},l,t),c=c$3({...r,children:void 0,defaultClassName:"react-aria-Menu",values:{isEmpty:l.collection.size===0}}),f=null;l.collection.size===0&&r.renderEmptyState&&(f=jsx("div",{role:"menuitem",style:{display:"contents"},children:r.renderEmptyState()}));let a=a$2(r,{global:true});return jsx(a$3,{children:jsxs(h.div,{...c$4(a,c,u),ref:t,slot:r.slot||void 0,"data-empty":l.collection.size===0||void 0,onScroll:r.onScroll,children:[jsx(b$4,{values:[[De,l],[_e,{elementType:"div"}],[m,{name:"MenuSection",render:$r}],[Xr,{parentMenuRef:t,shouldUseVirtualFocus:n?.shouldUseVirtualFocus}],[ye,{shouldCloseOnSelect:r.shouldCloseOnSelect}],[b$1,null],[c$6,null],[Ge,l.selectionManager],[Ce,s??We({})]],children:jsx(w,{children:jsx(m$1,{collection:l.collection,persistedKeys:q(l.selectionManager.focusedKey),scrollRef:t})})}),f]})})}var Tt=class extends f$3{parent;constructor(e,t){super(e.collection,t),this.parent=e;}get focusedKey(){return this.parent.focusedKey}get isFocused(){return this.parent.isFocused}setFocusedKey(e,t){return this.parent.setFocusedKey(e,t)}setFocused(e){this.parent.setFocused(e);}get childFocusStrategy(){return this.parent.childFocusStrategy}};function $r(r,e,t,o="react-aria-MenuSection"){let n=useContext(De),{CollectionBranch:i}=useContext(p),[l,s]=f(),{headingProps:p$1,groupProps:m}=mt({heading:s,"aria-label":t.props["aria-label"]??void 0}),u=c$3({...r,id:void 0,children:void 0,defaultClassName:o,className:t.props?.className,style:t.props?.style,values:void 0}),c=useContext(Ge),f$1=a$c(r),a=r.selectionMode!=null?new Tt(c,f$1):c,x=d$1(ye)?.shouldCloseOnSelect,g=a$2(r,{global:true});return delete g.id,jsx(h.section,{...c$4(g,u,m),ref:e,children:jsx(b$4,{values:[[ge,{...p$1,ref:l}],[Ge,a],[ye,{shouldCloseOnSelect:r.shouldCloseOnSelect??x}]],children:jsx(i,{collection:n.collection,parent:t})})})}var Ct=k(f$2,$r),ye=createContext(null),Dt=j(e$1,function(e$1,t,o){[e$1,t]=e(e$1,t,ye);let n=d$1(ye)?.id,i=useContext(De),l=a$4(t),s=useContext(Ge),{isVirtualized:p$1}=useContext(p),{menuItemProps:m,labelProps:u,descriptionProps:c,keyboardShortcutProps:f,...a}=pt({...e$1,id:n,key:o.key,selectionManager:s,isVirtualized:p$1},i,l),{hoverProps:x$1,isHovered:g}=a$5({isDisabled:a.isDisabled}),R=c$3({...e$1,id:void 0,children:o.rendered,defaultClassName:"react-aria-MenuItem",values:{...a,isHovered:g,isFocusVisible:a.isFocusVisible,selectionMode:s.selectionMode,selectionBehavior:s.selectionBehavior,hasSubmenu:!!e$1["aria-haspopup"],isOpen:e$1["aria-expanded"]==="true"}}),M=e$1.href?h.a:h.div,D=a$2(e$1,{global:true});return delete D.id,delete D.onClick,jsx(M,{...c$4(D,R,m,x$1),ref:l,"data-disabled":a.isDisabled||void 0,"data-hovered":g||void 0,"data-focused":a.isFocused||void 0,"data-focus-visible":a.isFocusVisible||void 0,"data-pressed":a.isPressed||void 0,"data-selected":a.isSelected||void 0,"data-selection-mode":s.selectionMode==="none"?void 0:s.selectionMode,"data-has-submenu":!!e$1["aria-haspopup"]||void 0,"data-open":e$1["aria-expanded"]==="true"||void 0,children:jsx(b$4,{values:[[a$8,{slots:{[a$9]:u,label:u,description:c}}],[bt,f],[x,{isSelected:a.isSelected}]],children:R.children})})});var Rt=be.forwardRef(({section:r,isFirstCollectionItem:e,showSectionHeader:t,renderSectionHeader:o,withSectionHeaderPadding:n,sectionStyle:i,sectionClassName:l$1,componentName:s="ListBox",selectionMode:p$1,selectedKeys:m,defaultSelectedKeys:u,onSelectionChange:c,disabledKeys:f,disallowEmptySelection:a,...x},g)=>{let{isVirtualized:R}=useContext(p),M=o?.(r),D=s==="ListBox"?at:Ct,v=p$1==null?{}:{selectionMode:p$1,selectedKeys:m,defaultSelectedKeys:u,onSelectionChange:c,disabledKeys:f,disallowEmptySelection:a};return jsxs(D,{id:r.id,"aria-label":r.title,...v,className:a$e(`BaselineUI-${s}-Section`,Fr,R&&!e&&Br,typeof l$1=="function"?l$1(r):l$1),style:typeof i=="function"?i(r):i,ref:g,children:[t?M?jsx(ze,{className:`BaselineUI-${s}-SectionHeader`,children:M}):jsx(ze,{className:`BaselineUI-${s}-SectionHeader`,children:jsx(a$d,{className:a$e(wr,`BaselineUI-${s}-SectionHeaderDefault`),paddingX:"lg",typography:"label.md.semibold",color:"text.primary",paddingInlineStart:n?"5xl":"lg",paddingInlineEnd:"lg",children:r.title})}):null,jsx(l,{items:r.children,dependencies:Ve(x),children:L=>jsx($e,{componentName:s,item:L,...x},L.id)})]})});Rt.displayName="ListSection";var Bo=({componentName:r})=>{let{direction:e}=b$2();return jsx(a$d,{"aria-hidden":true,display:"flex",alignItems:"center",color:"icon.secondary",className:`BaselineUI-${r}-SubmenuChevron`,style:e==="rtl"?{transform:"scaleX(-1)"}:void 0,children:jsx(ChevronRightFilledIcon,{size:8})})},Ho=({item:r,isSelected:e,isHovered:t,isFocusVisible:o,isDisabled:n,selectionIcon:i="checkmark",selectionMode:l,componentName:s="ListBox",hasSubmenu:p=false})=>{let m=r.icon,u=l!=="none",c=r.keyboardShortcut??r.description;return jsxs(a$d,{display:"flex",alignItems:"center",gap:"lg",className:a$e(kr({isHovered:t,isFocused:o,isDisabled:n}),`BaselineUI-${s}-OptionDefault`),children:[jsxs(a$d,{display:"flex",alignItems:"center",flex:1,gap:"lg",children:[u&&i==="checkmark"?jsx("span",{"aria-hidden":true,style:{height:24,width:24},className:`BaselineUI-${s}-SelectionIndicator`,children:e?jsx(CheckmarkIcon,{size:24}):null}):null,u&&i==="checkbox"?jsx("span",{"aria-hidden":true,style:{height:16,width:16},children:jsx("div",{className:c$8({isSelected:e,isIndeterminate:false,isFocusVisible:false,isDisabled:n,isReadOnly:false,hasError:false,isHovered:false}),children:e?jsx(CheckmarkIcon$1,{size:12}):null})}):null,m?jsx(m,{size:24}):null,jsx(b$7,{slot:"label",elementType:"span",children:r.label})]}),p?jsx(Bo,{componentName:s}):c?jsx(b$7,{slot:"description",className:a$e(Ir({isDisabled:n}),`BaselineUI-${s}-OptionDescription`),children:c}):null]})},$e=be.forwardRef(({item:r,optionStyle:e,optionClassName:t,renderOption:o,componentName:n="ListBox",...i},l)=>{let{onPress:s,onKeyDown:p}=useContext(Zr);return jsx(n==="ListBox"?ut:Dt,{...c$4(a$f(i),{onPress:u=>s?.(u,r.id),onKeyDown:p?u=>{p(u,r.id),u.continuePropagation();}:void 0}),id:r.id,value:r,className:u=>a$e(Hr,`BaselineUI-${n}-Option`,typeof t=="function"?t(r,u):t),style:u=>typeof e=="function"?e(r,u):e,textValue:r.label,ref:l,children:u=>o?o(r,u):jsx(Ho,{componentName:n,...u,item:r})})});$e.displayName="ListOption";var Qr=new Set(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),Zr=be.createContext({}),zo=be.forwardRef(({withSectionHeaderPadding:r=false,showSectionHeader:e=false,renderSectionHeader:t,optionStyle:o,optionClassName:n,sectionStyle:i,sectionClassName:l,renderOption:s,className:p$1,dragAndDropHooks:m,listBoxHandle:u,"data-block-id":c,"data-block-class":f,...a},x)=>{let g=a$4(x),R=be.useRef(false),M=be.useRef(null),D=useContext(le),{isVirtualized:v,layoutDelegate:L}=useContext(p);useEffect(()=>{D&&(s||o||n)&&console.warn("ListBox: If a state is provided via the ListStateContext, the `renderOption`, `optionStyle`, `optionClassName`, `sectionStyle`, `sectionClassName`, and `renderSectionHeader` props will be ignored.");},[D,s,o,n,i,l,t]),a$g({ref:g,isDisabled:!m});let O=useCallback(y=>g.current?.querySelector(`[data-key="${y}"][role="option"]`),[g]);useEffect(()=>{if(!v)return;let y=g.current,b=y?.ownerDocument,h=b?.defaultView;if(y==null||b==null||h==null)return;let z=()=>{let T=f$4(y);return T==null||T===b.body||T===b.documentElement},j=()=>y.querySelector('[role="option"][tabindex="0"]')??y.querySelector('[role="option"][data-focused="true"]'),_=()=>{let T=f$4(y);return T!=null&&e$3(y,T)},H=T=>T.composedPath().some(ue=>ue instanceof h.Node&&e$3(y,ue)),W=()=>{R.current=false;},se=()=>{M.current!=null&&h.cancelAnimationFrame(M.current),M.current=h.requestAnimationFrame(()=>{if(M.current=null,_())return;if(!z()){W();return}let T=j();T?.focus({preventScroll:true});});},te=T=>{Qr.has(T.key)&&(R.current=true);},J=T=>{!Qr.has(T.key)||!z()||!R.current||se();},Y=T=>{H(T)||_()||W();},he=T=>{H(T)||W();},Z=new MutationObserver(T=>{T.some(({addedNodes:ue,removedNodes:re})=>ue.length>0||re.length>0)&&R.current&&se();});return y.addEventListener("keydown",te),b.addEventListener("keydown",J,true),b.addEventListener("focusin",Y,true),b.addEventListener("pointerdown",he,true),Z.observe(y,{childList:true,subtree:true}),()=>{y.removeEventListener("keydown",te),b.removeEventListener("keydown",J,true),b.removeEventListener("focusin",Y,true),b.removeEventListener("pointerdown",he,true),Z.disconnect(),M.current!=null&&h.cancelAnimationFrame(M.current),W(),M.current=null;}},[v,g]);let k=be.useRef(null),d=useCallback(()=>{let y=k.current;y&&(y.ownerWindow.cancelAnimationFrame(y.frameId),k.current=null);},[]);useEffect(()=>d,[d]);let S=useCallback((y,b)=>{if(d(),!g.current)return;let h=()=>{let j=O(y);if(j)return j.scrollIntoView({block:"nearest",inline:"nearest",...b}),true;if(v&&L){let _=L.getItemRect(y);return _?(L.virtualizer.delegate.setVisibleRect(_),true):false}return false};if(h())return;let z=g.current.ownerDocument?.defaultView;z&&(k.current={ownerWindow:z,frameId:z.requestAnimationFrame(()=>{k.current=null,h();})});},[d,O,v,L,g]);useImperativeHandle(u,()=>({scrollIntoView:S,setFocusedKey:y=>{let b=O(y);!g.current||!b||(b.focus(),S(y));}}),[S,O,g]);let E={renderOption:s,optionClassName:n,optionStyle:o,renderSectionHeader:t,sectionClassName:l,sectionStyle:i,showSectionHeader:e,withSectionHeaderPadding:r},w=a.items?.[0]?.id;return jsx(st,{...a,dependencies:[...a.dependencies??[],w,...Ve(E)],"data-block-id":c,"data-block-class":f,dragAndDropHooks:m,ref:g,className:a$e(Ar,"BaselineUI-ListBox",p$1),children:y=>jsx(Ko,{item:y,isFirstCollectionItem:w===y.id,...E},y.id)})});zo.displayName="UNSAFE_ListBox";var _o=be.createContext({}),Ko=r=>{let e=useContext(_o),{item:t,isFirstCollectionItem:o,id:n,value:i,...l}={...e,...r};return a$h(t,"Item is required"),"children"in t?jsx(Rt,{section:t,componentName:"ListBox",isFirstCollectionItem:o,...l}):jsx($e,{item:t,componentName:"ListBox",...l})};export{lt as a,le as b,dt as c,Ve as d,gi as e,Do as f,Xl as g,xt as h,vt as i,Eo as j,Oo as k,Ao as l,Rt as m,Ho as n,$e as o,Zr as p,zo as q,Ko as r};
|
|
10
|
+
var ge=createContext({}),ze=j(c,function(e$1,t){return [e$1,t]=e(e$1,t,ge),jsx(h.header,{className:"react-aria-Header",...e$1,ref:t,children:e$1.children})});var _e=createContext({});var lt=createContext(null),le=createContext(null),st=forwardRef(function(e$1,t){[e$1,t]=e(e$1,t,lt);let o=useContext(le);return o?jsx(Lr,{state:o,props:e$1,listBoxRef:t}):jsx(i,{content:jsx(l,{...e$1}),children:n=>jsx(uo,{props:e$1,listBoxRef:t,collection:n})})});function uo({props:r,listBoxRef:e,collection:t}){r={...r,collection:t,children:null,items:null};let{layoutDelegate:o}=useContext(p),n=b({...r,layoutDelegate:o});return jsx(Lr,{state:n,props:r,listBoxRef:e})}function Lr({state:r$1,props:e$1,listBoxRef:t}){[e$1,t]=e(e$1,t,b$1);let{dragAndDropHooks:o,layout:n="stack",orientation:i="vertical",filter:l}=e$1,s$1=c$1(r$1,l),{collection:p$1,selectionManager:m$1}=s$1,u$1=!!o?.useDraggableCollectionState,c=!!o?.useDroppableCollectionState,{direction:f}=b$2(),{disabledBehavior:a$4,disabledKeys:x}=m$1,g=a({usage:"search",sensitivity:"base"}),{isVirtualized:R,layoutDelegate:M,dropTargetDelegate:D,CollectionRoot:v$1}=useContext(p),L=useMemo(()=>e$1.keyboardDelegate||new b$3({collection:p$1,collator:g,ref:t,disabledKeys:x,disabledBehavior:a$4,layout:n,orientation:i,direction:f,layoutDelegate:M}),[p$1,g,t,a$4,x,i,f,e$1.keyboardDelegate,n,M]),{listBoxProps:O}=c$2({...e$1,shouldSelectOnPressUp:u$1||e$1.shouldSelectOnPressUp,keyboardDelegate:L,isVirtualized:R},s$1,t),k=useRef(u$1),d=useRef(c);useEffect(()=>{process.env.NODE_ENV!=="production"&&(k.current!==u$1&&console.warn("Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior."),d.current!==c&&console.warn("Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior."));},[u$1,c]);let S,E,w$1,y=false,b=null,h$1=useRef(null);if(u$1&&o){S=o.useDraggableCollectionState({collection:p$1,selectionManager:m$1,preview:o.renderDragPreview?h$1:void 0}),o.useDraggableCollection({},S,t);let Y=o.DragPreview;b=o.renderDragPreview?jsx(Y,{ref:h$1,children:o.renderDragPreview}):null;}if(c&&o){E=o.useDroppableCollectionState({collection:p$1,selectionManager:m$1});let Y=o.dropTargetDelegate||D||new o.ListDropTargetDelegate(p$1,t,{orientation:i,layout:n,direction:f});w$1=o.useDroppableCollection({keyboardDelegate:L,dropTargetDelegate:Y},E,t),y=E.isDropTarget({type:"root"});}let{focusProps:z,isFocused:j,isFocusVisible:_}=a$1(),H=s$1.collection.size===0,W={isDropTarget:y,isEmpty:H,isFocused:j,isFocusVisible:_,layout:e$1.layout||"stack",orientation:i,state:s$1},se=c$3({...e$1,children:void 0,defaultClassName:"react-aria-ListBox",values:W}),te=null;H&&e$1.renderEmptyState&&(te=jsx("div",{role:"option",style:{display:"contents"},children:e$1.renderEmptyState(W)}));let J=a$2(e$1,{global:true});return jsx(a$3,{children:jsxs(h.div,{...c$4(J,se,O,z,w$1?.collectionProps),ref:t,slot:e$1.slot||void 0,onScroll:e$1.onScroll,"data-drop-target":y||void 0,"data-empty":H||void 0,"data-focused":j||void 0,"data-focus-visible":_||void 0,"data-layout":e$1.layout||"stack","data-orientation":i,children:[jsx(b$4,{values:[[lt,e$1],[le,s$1],[r,{dragAndDropHooks:o,dragState:S,dropState:E}],[_e,{elementType:"div"}],[s,{render:co}],[m,{name:"ListBoxSection",render:Er}]],children:jsx(w,{children:jsx(v$1,{collection:p$1,scrollRef:t,persistedKeys:v(m$1,o,E),renderDropIndicator:u(o,E)})})}),te,b]})})}function Er(r$1,e,t,o="react-aria-ListBoxSection"){let n=useContext(le),{dragAndDropHooks:i,dropState:l}=useContext(r),{CollectionBranch:s}=useContext(p),[p$1,m]=f(),{headingProps:u$1,groupProps:c}=f$1({heading:m,"aria-label":r$1["aria-label"]??void 0}),f$2=c$3({...r$1,id:void 0,children:void 0,defaultClassName:o,values:void 0}),a=a$2(r$1,{global:true});return delete a.id,jsx(h.section,{...c$4(a,f$2,c),ref:e,children:jsx(ge.Provider,{value:{...u$1,ref:p$1},children:jsx(s,{collection:n.collection,parent:t,renderDropIndicator:u(i,l)})})})}var at=k(f$2,Er),ut=j(e$1,function(e,t,o){let n=a$4(t),i=useContext(le),{dragAndDropHooks:l,dragState:s,dropState:p}=useContext(r),m=s&&!(s.isDisabled||s.selectionManager.isDisabled(o.key)),{optionProps:u,labelProps:c,descriptionProps:f,...a}=e$2({key:o.key,"aria-label":e?.["aria-label"]},i,n),{hoverProps:x$1,isHovered:g}=a$5({isDisabled:!a.allowsSelection&&!a.hasAction&&!m,onHoverStart:o.props.onHoverStart,onHoverChange:o.props.onHoverChange,onHoverEnd:o.props.onHoverEnd}),{keyboardProps:R}=a$6(e),{focusProps:M}=a$7(e),D=null;s&&l&&(D=l.useDraggableItem({key:o.key,hasAction:a.hasAction},s,n));let v=null;p&&l&&(v=l.useDroppableItem({target:{type:"item",key:o.key,dropPosition:"on"}},p,n));let L=s&&s.isDragging(o.key),O=c$3({...e,id:void 0,children:e.children,defaultClassName:"react-aria-ListBoxItem",values:{...a,isHovered:g,selectionMode:i.selectionManager.selectionMode,selectionBehavior:i.selectionManager.selectionBehavior,allowsDragging:!!s,isDragging:L,isDropTarget:v?.isDropTarget}});useEffect(()=>{!o.textValue&&process.env.NODE_ENV!=="production"&&console.warn("A `textValue` prop is required for <ListBoxItem> elements with non-plain text children in order to support accessibility features such as type to select.");},[o.textValue]);let k=e.href?h.a:h.div,d=a$2(e,{global:true});return delete d.id,delete d.onClick,e.href&&u.tabIndex==null&&(u.tabIndex=-1),jsx(k,{...c$4(d,O,u,x$1,R,M,D?.dragProps,v?.dropProps),ref:n,"data-allows-dragging":!!s||void 0,"data-selected":a.isSelected||void 0,"data-disabled":a.isDisabled||void 0,"data-hovered":g||void 0,"data-focused":a.isFocused||void 0,"data-focus-visible":a.isFocusVisible||void 0,"data-pressed":a.isPressed||void 0,"data-dragging":L||void 0,"data-drop-target":v?.isDropTarget||void 0,"data-selection-mode":i.selectionManager.selectionMode==="none"?void 0:i.selectionManager.selectionMode,children:jsx(b$4,{values:[[a$8,{slots:{[a$9]:c,label:c,description:f}}],[x,{isSelected:a.isSelected}]],children:O.children})})});function co(r$1,e){e=a$4(e);let{dragAndDropHooks:t,dropState:o}=useContext(r),{dropIndicatorProps:n,isHidden:i,isDropTarget:l}=t.useDropIndicator(r$1,o,e);return i?null:jsx(mo,{...r$1,dropIndicatorProps:n,isDropTarget:l,ref:e})}function po(r,e){let{dropIndicatorProps:t,isDropTarget:o,...n}=r,i=c$3({...n,defaultClassName:"react-aria-DropIndicator",values:{isDropTarget:o}});return jsx(Fragment,{children:jsx(h.div,{...t,...i,role:"option",ref:e,"data-drop-target":o||void 0})})}var mo=forwardRef(po);j(d,function(e,t,o){let n=useContext(le),{isLoading:i,onLoadMore:l,scrollOffset:s,...p}=e,m=useRef(null),u=useMemo(()=>({onLoadMore:l,collection:n?.collection,sentinelRef:m,scrollOffset:s}),[l,s,n?.collection]);h$1(u,m);let c=c$3({...p,id:void 0,children:o.rendered,defaultClassName:"react-aria-ListBoxLoadingIndicator",values:void 0}),f={tabIndex:-1};return jsxs(Fragment,{children:[jsx("div",{style:{position:"relative",width:0,height:0},inert:i$1(true),children:jsx("div",{"data-testid":"loadMoreSentinel",ref:m,style:{position:"absolute",height:1,width:1}})}),i&&c.children&&jsx(Fragment,{children:jsx(h.div,{...c$4(a$2(e,{global:true}),f),...c,role:"option",ref:t,children:c.children})})]})});var Ve=({renderOption:r,optionClassName:e,optionStyle:t,renderSectionHeader:o,sectionClassName:n,sectionStyle:i,showSectionHeader:l,withSectionHeaderPadding:s}={})=>Object.values({renderOption:r,optionClassName:e,optionStyle:t,renderSectionHeader:o,sectionClassName:n,sectionStyle:i,showSectionHeader:l,withSectionHeaderPadding:s});var gi=a$a({defaultClassName:"_1fjxa6ld _1yep5z6m8 _1yep5z6m7 _1yep5z6is _1yep5z6lq",variantClassNames:{isDropTarget:{true:"_1yep5z614w"},orientation:{vertical:"_1yep5z618m",horizontal:"_1yep5z618n"}},defaultVariants:{},compoundVariants:[]}),Ar="_1fjxa6la _1yep5z6m6 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",Ir=a$a({defaultClassName:"_1fjxa6lb _1yep5z6ez _1yep5z6da _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z6f2"}},defaultVariants:{},compoundVariants:[]}),kr=a$a({defaultClassName:"_1fjxa6l3 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6kz _1yep5z6l0 _1yep5z6l1 _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6dy _1yep5z6ey _1yep5z6lq _1yep5z6lt _1yep5z6m6 _1yep5z6m5 _1yep5z6m3 _1yep5z6m0",variantClassNames:{isSelected:{},isFocused:{true:"_1yep5z614w _1yep5z618s _1yep5z618q _1yep5z618t _1yep5z615c _1yep5z615d _1yep5z615e"},isFirstChild:{true:"_1fjxa6l5"},isLastChild:{true:"_1fjxa6l6"},isHovered:{true:"_1yep5z612t",false:"_1yep5z612s"},isDisabled:{true:"z9nup82 _1yep5z611l"}},defaultVariants:{},compoundVariants:[]}),wr="_1fjxa6lh _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1",Fr="_1fjxa6l1",Br="_1fjxa6l2",Hr="_1fjxa6l0";var Nr={"ar-AE":{longPressMessage:"\u0627\u0636\u063A\u0637 \u0645\u0637\u0648\u0644\u0627\u064B \u0623\u0648 \u0627\u0636\u063A\u0637 \u0639\u0644\u0649 Alt + \u0627\u0644\u0633\u0647\u0645 \u0644\u0623\u0633\u0641\u0644 \u0644\u0641\u062A\u062D \u0627\u0644\u0642\u0627\u0626\u0645\u0629"},"bg-BG":{longPressMessage:"\u041D\u0430\u0442\u0438\u0441\u043D\u0435\u0442\u0435 \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E \u0438\u043B\u0438 \u043D\u0430\u0442\u0438\u0441\u043D\u0435\u0442\u0435 Alt+ \u0441\u0442\u0440\u0435\u043B\u043A\u0430 \u043D\u0430\u0434\u043E\u043B\u0443, \u0437\u0430 \u0434\u0430 \u043E\u0442\u0432\u043E\u0440\u0438\u0442\u0435 \u043C\u0435\u043D\u044E\u0442\u043E"},"cs-CZ":{longPressMessage:"Dlouh\xFDm stiskem nebo stisknut\xEDm kl\xE1ves Alt + \u0161ipka dol\u016F otev\u0159ete nab\xEDdku"},"da-DK":{longPressMessage:"Langt tryk eller tryk p\xE5 Alt + pil ned for at \xE5bne menuen"},"de-DE":{longPressMessage:"Dr\xFCcken Sie lange oder dr\xFCcken Sie Alt + Nach-unten, um das Men\xFC zu \xF6ffnen"},"el-GR":{longPressMessage:"\u03A0\u03B9\u03AD\u03C3\u03C4\u03B5 \u03C0\u03B1\u03C1\u03B1\u03C4\u03B5\u03C4\u03B1\u03BC\u03AD\u03BD\u03B1 \u03AE \u03C0\u03B1\u03C4\u03AE\u03C3\u03C4\u03B5 Alt + \u03BA\u03AC\u03C4\u03C9 \u03B2\u03AD\u03BB\u03BF\u03C2 \u03B3\u03B9\u03B1 \u03BD\u03B1 \u03B1\u03BD\u03BF\u03AF\u03BE\u03B5\u03C4\u03B5 \u03C4\u03BF \u03BC\u03B5\u03BD\u03BF\u03CD"},"en-US":{longPressMessage:"Long press or press Alt + ArrowDown to open menu"},"es-ES":{longPressMessage:"Mantenga pulsado o pulse Alt + flecha abajo para abrir el men\xFA"},"et-EE":{longPressMessage:"Men\xFC\xFC avamiseks vajutage pikalt v\xF5i vajutage klahve Alt + allanool"},"fi-FI":{longPressMessage:"Avaa valikko painamalla pohjassa tai n\xE4pp\xE4inyhdistelm\xE4ll\xE4 Alt + Alanuoli"},"fr-FR":{longPressMessage:"Appuyez de mani\xE8re prolong\xE9e ou appuyez sur Alt\xA0+\xA0Fl\xE8che vers le bas pour ouvrir le menu."},"he-IL":{longPressMessage:"\u05DC\u05D7\u05E5 \u05DC\u05D7\u05D9\u05E6\u05D4 \u05D0\u05E8\u05D5\u05DB\u05D4 \u05D0\u05D5 \u05D4\u05E7\u05E9 Alt + ArrowDown \u05DB\u05D3\u05D9 \u05DC\u05E4\u05EA\u05D5\u05D7 \u05D0\u05EA \u05D4\u05EA\u05E4\u05E8\u05D9\u05D8"},"hr-HR":{longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika"},"hu-HU":{longPressMessage:"Nyomja meg hosszan, vagy nyomja meg az Alt + lefele ny\xEDl gombot a men\xFC megnyit\xE1s\xE1hoz"},"it-IT":{longPressMessage:"Premi a lungo o premi Alt + Freccia gi\xF9 per aprire il menu"},"ja-JP":{longPressMessage:"\u9577\u62BC\u3057\u307E\u305F\u306F Alt+\u4E0B\u77E2\u5370\u30AD\u30FC\u3067\u30E1\u30CB\u30E5\u30FC\u3092\u958B\u304F"},"ko-KR":{longPressMessage:"\uAE38\uAC8C \uB204\uB974\uAC70\uB098 Alt + \uC544\uB798\uCABD \uD654\uC0B4\uD45C\uB97C \uB20C\uB7EC \uBA54\uB274 \uC5F4\uAE30"},"lt-LT":{longPressMessage:"Nor\u0117dami atidaryti meniu, nuspaud\u0119 palaikykite arba paspauskite \u201EAlt + ArrowDown\u201C."},"lv-LV":{longPressMessage:"Lai atv\u0113rtu izv\u0113lni, turiet nospiestu vai nospiediet tausti\u0146u kombin\u0101ciju Alt + lejupv\u0113rst\u0101 bulti\u0146a"},"nb-NO":{longPressMessage:"Langt trykk eller trykk Alt + PilNed for \xE5 \xE5pne menyen"},"nl-NL":{longPressMessage:"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen"},"pl-PL":{longPressMessage:"Naci\u015Bnij i przytrzymaj lub naci\u015Bnij klawisze Alt + Strza\u0142ka w d\xF3\u0142, aby otworzy\u0107 menu"},"pt-BR":{longPressMessage:"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu"},"pt-PT":{longPressMessage:"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu"},"ro-RO":{longPressMessage:"Ap\u0103sa\u021Bi lung sau ap\u0103sa\u021Bi pe Alt + s\u0103geat\u0103 \xEEn jos pentru a deschide meniul"},"ru-RU":{longPressMessage:"\u041D\u0430\u0436\u043C\u0438\u0442\u0435 \u0438 \u0443\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0439\u0442\u0435 \u0438\u043B\u0438 \u043D\u0430\u0436\u043C\u0438\u0442\u0435 Alt + \u0421\u0442\u0440\u0435\u043B\u043A\u0430 \u0432\u043D\u0438\u0437, \u0447\u0442\u043E\u0431\u044B \u043E\u0442\u043A\u0440\u044B\u0442\u044C \u043C\u0435\u043D\u044E"},"sk-SK":{longPressMessage:"Ponuku otvor\xEDte dlh\xFDm stla\u010Den\xEDm alebo stla\u010Den\xEDm kl\xE1vesu Alt + kl\xE1vesu so \u0161\xEDpkou nadol"},"sl-SI":{longPressMessage:"Za odprtje menija pritisnite in dr\u017Eite gumb ali pritisnite Alt+pu\u0161\u010Dica navzdol"},"sr-SP":{longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni"},"sv-SE":{longPressMessage:"H\xE5ll nedtryckt eller tryck p\xE5 Alt + pil ned\xE5t f\xF6r att \xF6ppna menyn"},"tr-TR":{longPressMessage:"Men\xFCy\xFC a\xE7mak i\xE7in uzun bas\u0131n veya Alt + A\u015Fa\u011F\u0131 Ok tu\u015Funa bas\u0131n"},"uk-UA":{longPressMessage:"\u0414\u043E\u0432\u0433\u043E \u0430\u0431\u043E \u0437\u0432\u0438\u0447\u0430\u0439\u043D\u043E \u043D\u0430\u0442\u0438\u0441\u043D\u0456\u0442\u044C \u043A\u043E\u043C\u0431\u0456\u043D\u0430\u0446\u0456\u044E \u043A\u043B\u0430\u0432\u0456\u0448 Alt \u0456 \u0441\u0442\u0440\u0456\u043B\u043A\u0430 \u0432\u043D\u0438\u0437, \u0449\u043E\u0431 \u0432\u0456\u0434\u043A\u0440\u0438\u0442\u0438 \u043C\u0435\u043D\u044E"},"zh-CN":{longPressMessage:"\u957F\u6309\u6216\u6309 Alt + \u5411\u4E0B\u65B9\u5411\u952E\u4EE5\u6253\u5F00\u83DC\u5355"},"zh-TW":{longPressMessage:"\u9577\u6309\u6216\u6309 Alt+\u5411\u4E0B\u9375\u4EE5\u958B\u555F\u529F\u80FD\u8868"}};function dt(r,e,t){let{type:o="menu",isDisabled:n,trigger:i="press"}=r,l=c$6(),{triggerProps:s,overlayProps:p}=a$p({type:o},e,t),m=a=>{if(!n&&!(i==="longPress"&&!a.altKey)&&t&&t.current)switch(a.key){case "Enter":case " ":if(i==="longPress"||a.isDefaultPrevented())return;case "ArrowDown":"continuePropagation"in a||a.stopPropagation(),a.preventDefault(),e.toggle("first");break;case "ArrowUp":"continuePropagation"in a||a.stopPropagation(),a.preventDefault(),e.toggle("last");break;default:"continuePropagation"in a&&a.continuePropagation();}},u=b$8(Nr,"@react-aria/menu"),{longPressProps:c}=a$q({isDisabled:n||i!=="longPress",accessibilityDescription:u.format("longPressMessage"),onLongPressStart(){e.close();},onLongPress(){e.open("first");}}),f={preventFocusOnPress:true,onPressStart(a){a.pointerType!=="touch"&&a.pointerType!=="keyboard"&&!n&&(a$n(a.target),e.open(a.pointerType==="virtual"?"first":null));},onPress(a){a.pointerType==="touch"&&!n&&(a$n(a.target),e.toggle());}};return delete s.onPress,{menuTriggerProps:{...s,...i==="press"?f:c,id:l,onKeyDown:m},menuProps:{...p,"aria-labelledby":l,autoFocus:e.focusStrategy||true,onClose:e.close}}}var je=new WeakMap;function ct(r,e,t){let{shouldFocusWrap:o=true,onKeyDown:n,onKeyUp:i,...l}=r;!r["aria-label"]&&!r["aria-labelledby"]&&process.env.NODE_ENV!=="production"&&console.warn("An aria-label or aria-labelledby prop is required for accessibility.");let s=a$2(r,{labelable:true}),{listProps:p}=a$l({...l,ref:t,selectionManager:e.selectionManager,collection:e.collection,disabledKeys:e.disabledKeys,shouldFocusWrap:o,linkBehavior:"override"});return je.set(e,{onClose:r.onClose,onAction:r.onAction,shouldUseVirtualFocus:r.shouldUseVirtualFocus}),{menuProps:c$4(s,{onKeyDown:n,onKeyUp:i},{role:"menu",...p,onKeyDown:m=>{(m.key!=="Escape"||r.shouldUseVirtualFocus)&&p.onKeyDown?.(m);}})}}function pt(r,e,t){let{id:o,key:n$1,closeOnSelect:i,shouldCloseOnSelect:l,isVirtualized:s,"aria-haspopup":p,onPressStart:m,onPressUp:u,onPress:c,onPressChange:f,onPressEnd:a,onClick:x,onHoverStart:g$1,onHoverChange:R,onHoverEnd:M,onKeyDown:D,onKeyUp:v,onFocus:L,onFocusChange:O,onBlur:k,selectionManager:d=e.selectionManager}=r,S=!!p,E=S&&r["aria-expanded"]==="true",w=r.isDisabled??d.isDisabled(n$1),y=r.isSelected??d.isSelected(n$1),b=je.get(e),h=e.collection.getItem(n$1),z=r.onClose||b.onClose,j=n(),_=()=>{if(!S&&(h?.props?.onAction?h.props.onAction():r.onAction&&r.onAction(n$1),b.onAction)){let P=b.onAction;P(n$1,h?.value);}},H="menuitem";S||(d.selectionMode==="single"?H="menuitemradio":d.selectionMode==="multiple"&&(H="menuitemcheckbox"));let W=e$4(),se=e$4(),te=e$4(),J={id:o,"aria-disabled":w||void 0,role:H,"aria-label":r["aria-label"],"aria-labelledby":W,"aria-describedby":[r["aria-describedby"],se,te].filter(Boolean).join(" ")||void 0,"aria-controls":r["aria-controls"],"aria-haspopup":p,"aria-expanded":r["aria-expanded"]};if(d.selectionMode!=="none"&&!S&&(J["aria-checked"]=y),s){let P=Number(h?.index);J["aria-posinset"]=Number.isNaN(P)?void 0:P+1,J["aria-setsize"]=d$2(e.collection);}let Y=useRef(false),he=P=>{f?.(P),Y.current=P;},Z=useRef(null),T=P=>{P.pointerType!=="keyboard"&&(Z.current={pointerType:P.pointerType}),P.pointerType==="mouse"&&(Y.current||P.target.click()),u?.(P);},ue=P=>{x?.(P),_(),r$1(P,j,h.props.href,h?.props.routerOptions);let Je=Z.current?.pointerType==="keyboard"?Z.current?.key==="Enter"||d.selectionMode==="none"||d.isLink(n$1):d.selectionMode!=="multiple"||d.isLink(n$1);Je=l??i??Je,z&&!S&&Je&&z(),Z.current=null;},{itemProps:re,isFocused:At}=d$3({id:o,selectionManager:d,key:n$1,ref:t,shouldSelectOnPressUp:true,allowsDifferentPressOrigin:true,linkBehavior:"none",shouldUseVirtualFocus:b.shouldUseVirtualFocus}),{pressProps:eo,isPressed:to}=d$4({onPressStart:m,onPress:c,onPressUp:T,onPressChange:he,onPressEnd:a,isDisabled:w}),{hoverProps:ro}=a$5({isDisabled:w,onHoverStart(P){!b$5()&&!(E&&p)&&(d.setFocused(true),d.setFocusedKey(n$1)),g$1?.(P);},onHoverChange:R,onHoverEnd:M}),{keyboardProps:oo}=a$6({onKeyDown:P=>{if(P.repeat){P.continuePropagation();return}switch(P.key){case " ":Z.current={pointerType:"keyboard",key:" "},g(P).click(),d$5("keyboard");break;case "Enter":Z.current={pointerType:"keyboard",key:"Enter"},g(P).tagName!=="A"&&g(P).click(),d$5("keyboard");break;default:S||P.continuePropagation(),D?.(P);break}},onKeyUp:v}),{focusableProps:no}=d$6({onBlur:k,onFocus:L,onFocusChange:O},t),It=a$2(h?.props);delete It.id;let io=q$1(h?.props);return {menuItemProps:{...J,...c$4(It,io,S?{onFocus:re.onFocus,"data-collection":re["data-collection"],"data-key":re["data-key"]}:re,eo,ro,oo,no,b.shouldUseVirtualFocus||S?{onMouseDown:P=>P.preventDefault()}:void 0,w?void 0:{onClick:ue}),tabIndex:re.tabIndex!=null&&E&&!b.shouldUseVirtualFocus?-1:re.tabIndex},labelProps:{id:W},descriptionProps:{id:se},keyboardShortcutProps:{id:te},isFocused:At,isFocusVisible:At&&d.isFocused&&b$5()&&!E,isSelected:y,isPressed:to,isDisabled:w}}function mt(r){let{heading:e,"aria-label":t}=r,o=e$4([!!e]);return {itemProps:{role:"presentation"},headingProps:e?{id:o,role:"presentation"}:{},groupProps:{role:"group","aria-label":t,"aria-labelledby":e?o:void 0}}}var Ue=2,Po=50,bo=1e3,_r=Math.PI/12;function Kr(r){let{menuRef:e,submenuRef:t$1,isOpen:o,isDisabled:n}=r,i=useRef(void 0),l=useRef(void 0),s=useRef(0),p=useRef(void 0),m=useRef(void 0),u=useRef(void 0),c=useRef(2),[f,a]=useState(false);e$5({ref:o?t$1:void 0,onResize:()=>{t$1.current&&(l.current=t$1.current.getBoundingClientRect(),u.current=void 0);}});let g=()=>{a(false),c.current=Ue,i.current=void 0;},R=f$6(),M=t(D=>{f&&D.preventDefault();});useEffect(()=>{f&&e.current?e.current.style.pointerEvents="none":e.current.style.pointerEvents="";},[e,f]),a$j(()=>{let D=t$1.current,v=e.current;if(n||!D||!o||R!=="pointer"||!v){g();return}l.current=D.getBoundingClientRect();let L=k=>{if(k.pointerType==="touch"||k.pointerType==="pen")return;let d=Date.now();if(d-s.current<Po)return;clearTimeout(p.current),clearTimeout(m.current);let{clientX:S,clientY:E}=k;if(!i.current){i.current={x:S,y:E};return}if(!l.current)return;if(u.current||(u.current=S>l.current.right?"left":"right"),S<v.getBoundingClientRect().left||S>v.getBoundingClientRect().right||E<v.getBoundingClientRect().top||E>v.getBoundingClientRect().bottom){g();return}let w=i.current.x,y=i.current.y,b=u.current==="right"?l.current.left-w:w-l.current.right,h=Math.atan2(y-l.current.top,b)+_r,z=Math.atan2(y-l.current.bottom,b)-_r,j=Math.atan2(y-E,u.current==="left"?-(S-w):S-w),_=j<h&&j>z;c.current=_?Math.min(c.current+1,Ue):Math.max(c.current-1,0),c.current>=Ue?a(true):a(false),s.current=d,i.current={x:S,y:E},_&&(p.current=setTimeout(()=>{g(),m.current=setTimeout(()=>{let H=a$o(v).elementFromPoint(S,E);H&&e$3(v,H)&&H.dispatchEvent(new PointerEvent("pointerover",{bubbles:true,cancelable:true}));},100);},bo));},O=b$7(v);return O.addEventListener("pointermove",L),process.env.NODE_ENV!=="test"&&O.addEventListener("pointerdown",M,true),()=>{O.removeEventListener("pointermove",L),process.env.NODE_ENV!=="test"&&O.removeEventListener("pointerdown",M,true),clearTimeout(p.current),clearTimeout(m.current),c.current=Ue;}},[n,o,e,R,a,t$1]);}function gt(r,e,t){let{parentMenuRef:o,submenuRef:n,type:i="menu",isDisabled:l,delay:s=200,shouldUseVirtualFocus:p}=r,m=c$6(),u=c$6(),{direction:c}=b$2(),f=useRef(void 0),a=useCallback(()=>{f.current&&(clearTimeout(f.current),f.current=void 0);},[f]),x=useCallback(d=>{a(),e.open(d);},[e,a]),g$1=useCallback(()=>{a(),e.close();},[e,a]);a$j(()=>()=>{a();},[a]);let R=d=>{if(i$2(d.currentTarget))switch(d.key){case "ArrowLeft":c==="ltr"&&e$3(d.currentTarget,g(d))&&(d.preventDefault(),d.stopPropagation(),g$1(),!p&&t.current&&a$n(t.current));break;case "ArrowRight":c==="rtl"&&e$3(d.currentTarget,g(d))&&(d.preventDefault(),d.stopPropagation(),g$1(),!p&&t.current&&a$n(t.current));break;case "Escape":e$3(n.current,g(d))&&(d.stopPropagation(),g$1(),!p&&t.current&&a$n(t.current));break}},M={id:u,"aria-labelledby":m,submenuLevel:e.submenuLevel,...i==="menu"&&{onClose:e.closeAll,autoFocus:e.focusStrategy??void 0,onKeyDown:R}},D=d=>{switch(d.key){case "ArrowRight":l||(c==="ltr"?(d.preventDefault(),e.isOpen||x("first"),i==="menu"&&n?.current&&f$5()===t?.current&&a$n(n.current)):e.isOpen?g$1():d.continuePropagation());break;case "ArrowLeft":l||(c==="rtl"?(d.preventDefault(),e.isOpen||x("first"),i==="menu"&&n?.current&&f$5()===t?.current&&a$n(n.current)):e.isOpen?g$1():d.continuePropagation());break;default:d.continuePropagation();break}},v=d=>{!l&&(d.pointerType==="virtual"||d.pointerType==="keyboard")&&x("first");},L=d=>{!l&&(d.pointerType==="touch"||d.pointerType==="mouse")&&x();},O=d=>{l||(d&&!e.isOpen?f.current||(f.current=setTimeout(()=>{x();},s)):d||a());};a$k(o,"focusin",d=>{e.isOpen&&e$3(o.current,g(d))&&g(d)!==t.current&&g$1();});let k=d=>d!==t.current;return Kr({menuRef:o,submenuRef:n,isOpen:e.isOpen,isDisabled:l}),{submenuTriggerProps:{id:m,"aria-controls":e.isOpen?u:void 0,"aria-haspopup":l?void 0:i,"aria-expanded":e.isOpen?"true":"false",onPressStart:v,onPress:L,onHoverChange:O,onKeyDown:D,isOpen:e.isOpen},submenuProps:M,popoverProps:{isNonModal:true,shouldCloseOnInteractOutside:k}}}function We(r){let e=a$m(r),[t,o]=useState(null),[n,i]=useState([]),l=()=>{i([]),e.close();};return {focusStrategy:t,...e,open(m=null){o(m),e.open();},toggle(m=null){o(m),e.toggle();},close(){l();},expandedKeysStack:n,openSubmenu:(m,u)=>{i(c=>u>c.length?c:[...c.slice(0,u),m]);},closeSubmenu:(m,u)=>{i(c=>c[u]===m?c.slice(0,u):c);}}}function Pt(r,e){let{triggerKey:t}=r,{expandedKeysStack:o,openSubmenu:n,closeSubmenu:i,close:l}=e,[s]=useState(o?.length),p=useMemo(()=>o[s]===t,[o,t,s]),[m,u]=useState(null),c=useCallback(x=>{u(x??null),n(t,s);},[n,s,t]),f=useCallback(()=>{u(null),i(t,s);},[i,s,t]),a=useCallback(x=>{u(x??null),p?f():c(x);},[f,c,p]);return useMemo(()=>({focusStrategy:m,isOpen:p,open:c,close:f,closeAll:l,submenuLevel:s,setOpen:()=>{},toggle:a}),[p,c,f,l,m,a,s])}var bt=createContext({});forwardRef(function(e$1,t){return [e$1,t]=e(e$1,t,bt),jsx(h.kbd,{dir:"ltr",...e$1,ref:t})});var Do=createContext({}),Xl=forwardRef(function(e$1,t){[e$1,t]=e(e$1,t,Do);let{children:o,level:n=3,className:i,...l}=e$1,s=h[`h${n}`];return jsx(s,{...l,ref:t,className:i??"react-aria-Heading",children:o})});var xt=createContext(null);createContext(null);createContext(null);var vt=createContext(null);var Xe=createContext(null),De=createContext(null),Ce=createContext(null),Ge=createContext(null);function Eo(r){let e=We(r),t=useRef(null),{menuTriggerProps:o,menuProps:n}=dt({...r,type:"menu"},e,t),i=useRef(null);return c$8()?null:jsx(b$4,{values:[[Xe,{...n,ref:i}],[vt,e],[Ce,e],[xt,{trigger:"MenuTrigger",triggerRef:t,scrollRef:i,placement:"bottom start","aria-labelledby":n["aria-labelledby"]}]],children:jsx(b$9,{...o,ref:t,isPressed:e.isOpen,children:r.children})})}var Xr=createContext(null),Mt=class extends a$i{static type="submenutrigger";filter(e,t,o){let n=e.getItem(this.firstChildKey);if(n&&o(n.textValue,this)){let i=this.clone();return t.addDescendants(i,e),i}return null}},Oo=k(Mt,(r,e,t)=>{let{CollectionBranch:o}=useContext(p),n=useContext(De),i=useContext(Ce),l=Pt({triggerKey:t.key},i),s=useRef(null),p$1=a$4(e),{parentMenuRef:m,shouldUseVirtualFocus:u}=useContext(Xr),{submenuTriggerProps:c,submenuProps:f,popoverProps:a}=gt({parentMenuRef:m,submenuRef:s,delay:r.delay,shouldUseVirtualFocus:u},l,p$1);return jsxs(b$4,{values:[[ye,{...c,onAction:void 0,ref:p$1}],[Xe,{ref:s,...f}],[vt,l],[xt,{trigger:"SubmenuTrigger",triggerRef:p$1,placement:"end top","aria-labelledby":f["aria-labelledby"],...a}]],children:[jsx(o,{collection:n.collection,parent:t}),r.children[1]]})},r=>r.children[0]),Ao=forwardRef(function(e$1,t){return [e$1,t]=e(e$1,t,Xe),jsx(i,{content:jsx(l,{...e$1}),children:o=>jsx(Io,{props:e$1,collection:o,menuRef:t})})});function Io({props:r,collection:e$1,menuRef:t}){[r,t]=e(r,t,b$1);let{filter:o,...n}=r,i=useMemo(()=>o?e$1.filter(o):e$1,[e$1,o]),l=a$b({...r,collection:i,children:void 0}),s=useContext(Ce),{isVirtualized:p$1,CollectionRoot:m$1}=useContext(p),{menuProps:u}=ct({...r,isVirtualized:p$1,onClose:r.onClose||s?.close},l,t),c=c$3({...r,children:void 0,defaultClassName:"react-aria-Menu",values:{isEmpty:l.collection.size===0}}),f=null;l.collection.size===0&&r.renderEmptyState&&(f=jsx("div",{role:"menuitem",style:{display:"contents"},children:r.renderEmptyState()}));let a=a$2(r,{global:true});return jsx(a$3,{children:jsxs(h.div,{...c$4(a,c,u),ref:t,slot:r.slot||void 0,"data-empty":l.collection.size===0||void 0,onScroll:r.onScroll,children:[jsx(b$4,{values:[[De,l],[_e,{elementType:"div"}],[m,{name:"MenuSection",render:$r}],[Xr,{parentMenuRef:t,shouldUseVirtualFocus:n?.shouldUseVirtualFocus}],[ye,{shouldCloseOnSelect:r.shouldCloseOnSelect}],[b$1,null],[c$5,null],[Ge,l.selectionManager],[Ce,s??We({})]],children:jsx(w,{children:jsx(m$1,{collection:l.collection,persistedKeys:q(l.selectionManager.focusedKey),scrollRef:t})})}),f]})})}var Tt=class extends f$3{parent;constructor(e,t){super(e.collection,t),this.parent=e;}get focusedKey(){return this.parent.focusedKey}get isFocused(){return this.parent.isFocused}setFocusedKey(e,t){return this.parent.setFocusedKey(e,t)}setFocused(e){this.parent.setFocused(e);}get childFocusStrategy(){return this.parent.childFocusStrategy}};function $r(r,e,t,o="react-aria-MenuSection"){let n=useContext(De),{CollectionBranch:i}=useContext(p),[l,s]=f(),{headingProps:p$1,groupProps:m}=mt({heading:s,"aria-label":t.props["aria-label"]??void 0}),u=c$3({...r,id:void 0,children:void 0,defaultClassName:o,className:t.props?.className,style:t.props?.style,values:void 0}),c=useContext(Ge),f$1=a$c(r),a=r.selectionMode!=null?new Tt(c,f$1):c,x=d$1(ye)?.shouldCloseOnSelect,g=a$2(r,{global:true});return delete g.id,jsx(h.section,{...c$4(g,u,m),ref:e,children:jsx(b$4,{values:[[ge,{...p$1,ref:l}],[Ge,a],[ye,{shouldCloseOnSelect:r.shouldCloseOnSelect??x}]],children:jsx(i,{collection:n.collection,parent:t})})})}var Ct=k(f$2,$r),ye=createContext(null),Dt=j(e$1,function(e$1,t,o){[e$1,t]=e(e$1,t,ye);let n=d$1(ye)?.id,i=useContext(De),l=a$4(t),s=useContext(Ge),{isVirtualized:p$1}=useContext(p),{menuItemProps:m,labelProps:u,descriptionProps:c,keyboardShortcutProps:f,...a}=pt({...e$1,id:n,key:o.key,selectionManager:s,isVirtualized:p$1},i,l),{hoverProps:x$1,isHovered:g}=a$5({isDisabled:a.isDisabled}),R=c$3({...e$1,id:void 0,children:o.rendered,defaultClassName:"react-aria-MenuItem",values:{...a,isHovered:g,isFocusVisible:a.isFocusVisible,selectionMode:s.selectionMode,selectionBehavior:s.selectionBehavior,hasSubmenu:!!e$1["aria-haspopup"],isOpen:e$1["aria-expanded"]==="true"}}),M=e$1.href?h.a:h.div,D=a$2(e$1,{global:true});return delete D.id,delete D.onClick,jsx(M,{...c$4(D,R,m,x$1),ref:l,"data-disabled":a.isDisabled||void 0,"data-hovered":g||void 0,"data-focused":a.isFocused||void 0,"data-focus-visible":a.isFocusVisible||void 0,"data-pressed":a.isPressed||void 0,"data-selected":a.isSelected||void 0,"data-selection-mode":s.selectionMode==="none"?void 0:s.selectionMode,"data-has-submenu":!!e$1["aria-haspopup"]||void 0,"data-open":e$1["aria-expanded"]==="true"||void 0,children:jsx(b$4,{values:[[a$8,{slots:{[a$9]:u,label:u,description:c}}],[bt,f],[x,{isSelected:a.isSelected}]],children:R.children})})});var Rt=be.forwardRef(({section:r,isFirstCollectionItem:e,showSectionHeader:t,renderSectionHeader:o,withSectionHeaderPadding:n,sectionStyle:i,sectionClassName:l$1,componentName:s="ListBox",selectionMode:p$1,selectedKeys:m,defaultSelectedKeys:u,onSelectionChange:c,disabledKeys:f,disallowEmptySelection:a,...x},g)=>{let{isVirtualized:R}=useContext(p),M=o?.(r),D=s==="ListBox"?at:Ct,v=p$1==null?{}:{selectionMode:p$1,selectedKeys:m,defaultSelectedKeys:u,onSelectionChange:c,disabledKeys:f,disallowEmptySelection:a};return jsxs(D,{id:r.id,"aria-label":r.title,...v,className:a$e(`BaselineUI-${s}-Section`,Fr,R&&!e&&Br,typeof l$1=="function"?l$1(r):l$1),style:typeof i=="function"?i(r):i,ref:g,children:[t?M?jsx(ze,{className:`BaselineUI-${s}-SectionHeader`,children:M}):jsx(ze,{className:`BaselineUI-${s}-SectionHeader`,children:jsx(a$d,{className:a$e(wr,`BaselineUI-${s}-SectionHeaderDefault`),paddingX:"lg",typography:"label.md.semibold",color:"text.primary",paddingInlineStart:n?"5xl":"lg",paddingInlineEnd:"lg",children:r.title})}):null,jsx(l,{items:r.children,dependencies:Ve(x),children:L=>jsx($e,{componentName:s,item:L,...x},L.id)})]})});Rt.displayName="ListSection";var Bo=({componentName:r})=>{let{direction:e}=b$2();return jsx(a$d,{"aria-hidden":true,display:"flex",alignItems:"center",color:"icon.secondary",className:`BaselineUI-${r}-SubmenuChevron`,style:e==="rtl"?{transform:"scaleX(-1)"}:void 0,children:jsx(ChevronRightFilledIcon,{size:8})})},Ho=({item:r,isSelected:e,isHovered:t,isFocusVisible:o,isDisabled:n,selectionIcon:i="checkmark",selectionMode:l,componentName:s="ListBox",hasSubmenu:p=false})=>{let m=r.icon,u=l!=="none",c=r.keyboardShortcut??r.description;return jsxs(a$d,{display:"flex",alignItems:"center",gap:"lg",className:a$e(kr({isHovered:t,isFocused:o,isDisabled:n}),`BaselineUI-${s}-OptionDefault`),children:[jsxs(a$d,{display:"flex",alignItems:"center",flex:1,gap:"lg",children:[u&&i==="checkmark"?jsx("span",{"aria-hidden":true,style:{height:24,width:24},className:`BaselineUI-${s}-SelectionIndicator`,children:e?jsx(CheckmarkIcon,{size:24}):null}):null,u&&i==="checkbox"?jsx("span",{"aria-hidden":true,style:{height:16,width:16},children:jsx("div",{className:c$7({isSelected:e,isIndeterminate:false,isFocusVisible:false,isDisabled:n,isReadOnly:false,hasError:false,isHovered:false}),children:e?jsx(CheckmarkIcon$1,{size:12}):null})}):null,m?jsx(m,{size:24}):null,jsx(b$6,{slot:"label",elementType:"span",children:r.label})]}),p?jsx(Bo,{componentName:s}):c?jsx(b$6,{slot:"description",className:a$e(Ir({isDisabled:n}),`BaselineUI-${s}-OptionDescription`),children:c}):null]})},$e=be.forwardRef(({item:r,optionStyle:e,optionClassName:t,renderOption:o,componentName:n="ListBox",...i},l)=>{let{onPress:s,onKeyDown:p}=useContext(Zr);return jsx(n==="ListBox"?ut:Dt,{...c$4(a$f(i),{onPress:u=>s?.(u,r.id),onKeyDown:p?u=>{p(u,r.id),u.continuePropagation();}:void 0}),id:r.id,value:r,className:u=>a$e(Hr,`BaselineUI-${n}-Option`,typeof t=="function"?t(r,u):t),style:u=>typeof e=="function"?e(r,u):e,textValue:r.label,ref:l,children:u=>o?o(r,u):jsx(Ho,{componentName:n,...u,item:r})})});$e.displayName="ListOption";var Qr=new Set(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),Zr=be.createContext({}),zo=be.forwardRef(({withSectionHeaderPadding:r=false,showSectionHeader:e=false,renderSectionHeader:t,optionStyle:o,optionClassName:n,sectionStyle:i,sectionClassName:l,renderOption:s,className:p$1,dragAndDropHooks:m,listBoxHandle:u,"data-block-id":c,"data-block-class":f,...a},x)=>{let g=a$4(x),R=be.useRef(false),M=be.useRef(null),D=useContext(le),{isVirtualized:v,layoutDelegate:L}=useContext(p);useEffect(()=>{D&&(s||o||n)&&console.warn("ListBox: If a state is provided via the ListStateContext, the `renderOption`, `optionStyle`, `optionClassName`, `sectionStyle`, `sectionClassName`, and `renderSectionHeader` props will be ignored.");},[D,s,o,n,i,l,t]),a$g({ref:g,isDisabled:!m});let O=useCallback(y=>g.current?.querySelector(`[data-key="${y}"][role="option"]`),[g]);useEffect(()=>{if(!v)return;let y=g.current,b=y?.ownerDocument,h=b?.defaultView;if(y==null||b==null||h==null)return;let z=()=>{let T=f$4(y);return T==null||T===b.body||T===b.documentElement},j=()=>y.querySelector('[role="option"][tabindex="0"]')??y.querySelector('[role="option"][data-focused="true"]'),_=()=>{let T=f$4(y);return T!=null&&e$3(y,T)},H=T=>T.composedPath().some(ue=>ue instanceof h.Node&&e$3(y,ue)),W=()=>{R.current=false;},se=()=>{M.current!=null&&h.cancelAnimationFrame(M.current),M.current=h.requestAnimationFrame(()=>{if(M.current=null,_())return;if(!z()){W();return}let T=j();T?.focus({preventScroll:true});});},te=T=>{Qr.has(T.key)&&(R.current=true);},J=T=>{!Qr.has(T.key)||!z()||!R.current||se();},Y=T=>{H(T)||_()||W();},he=T=>{H(T)||W();},Z=new MutationObserver(T=>{T.some(({addedNodes:ue,removedNodes:re})=>ue.length>0||re.length>0)&&R.current&&se();});return y.addEventListener("keydown",te),b.addEventListener("keydown",J,true),b.addEventListener("focusin",Y,true),b.addEventListener("pointerdown",he,true),Z.observe(y,{childList:true,subtree:true}),()=>{y.removeEventListener("keydown",te),b.removeEventListener("keydown",J,true),b.removeEventListener("focusin",Y,true),b.removeEventListener("pointerdown",he,true),Z.disconnect(),M.current!=null&&h.cancelAnimationFrame(M.current),W(),M.current=null;}},[v,g]);let k=be.useRef(null),d=useCallback(()=>{let y=k.current;y&&(y.ownerWindow.cancelAnimationFrame(y.frameId),k.current=null);},[]);useEffect(()=>d,[d]);let S=useCallback((y,b)=>{if(d(),!g.current)return;let h=()=>{let j=O(y);if(j)return j.scrollIntoView({block:"nearest",inline:"nearest",...b}),true;if(v&&L){let _=L.getItemRect(y);return _?(L.virtualizer.delegate.setVisibleRect(_),true):false}return false};if(h())return;let z=g.current.ownerDocument?.defaultView;z&&(k.current={ownerWindow:z,frameId:z.requestAnimationFrame(()=>{k.current=null,h();})});},[d,O,v,L,g]);useImperativeHandle(u,()=>({scrollIntoView:S,setFocusedKey:y=>{let b=O(y);!g.current||!b||(b.focus(),S(y));}}),[S,O,g]);let E={renderOption:s,optionClassName:n,optionStyle:o,renderSectionHeader:t,sectionClassName:l,sectionStyle:i,showSectionHeader:e,withSectionHeaderPadding:r},w=a.items?.[0]?.id;return jsx(st,{...a,dependencies:[...a.dependencies??[],w,...Ve(E)],"data-block-id":c,"data-block-class":f,dragAndDropHooks:m,ref:g,className:a$e(Ar,"BaselineUI-ListBox",p$1),children:y=>jsx(Ko,{item:y,isFirstCollectionItem:w===y.id,...E},y.id)})});zo.displayName="UNSAFE_ListBox";var _o=be.createContext({}),Ko=r=>{let e=useContext(_o),{item:t,isFirstCollectionItem:o,id:n,value:i,...l}={...e,...r};return a$h(t,"Item is required"),"children"in t?jsx(Rt,{section:t,componentName:"ListBox",isFirstCollectionItem:o,...l}):jsx($e,{item:t,componentName:"ListBox",...l})};export{lt as a,le as b,dt as c,Ve as d,gi as e,Do as f,Xl as g,xt as h,vt as i,Eo as j,Oo as k,Ao as l,Rt as m,Ho as n,$e as o,Zr as p,zo as q,Ko as r};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$2}from'./chunk-CHTLOFCT.mjs';import {a as a$1}from'./chunk-CFLEBB5T.mjs';import {b}from'./chunk-4ZJMZB5B.mjs';import {a as a$5}from'./chunk-RSKKEGJZ.mjs';import {a as a$3}from'./chunk-K6X2BHPP.mjs';import {a as a$4}from'./chunk-3FYY26ED.mjs';import {c}from'./chunk-TZ4MVY4E.mjs';import {a}from'./chunk-
|
|
1
|
+
import {a as a$2}from'./chunk-CHTLOFCT.mjs';import {a as a$1}from'./chunk-CFLEBB5T.mjs';import {b}from'./chunk-4ZJMZB5B.mjs';import {a as a$5}from'./chunk-RSKKEGJZ.mjs';import {a as a$3}from'./chunk-K6X2BHPP.mjs';import {a as a$4}from'./chunk-3FYY26ED.mjs';import {c}from'./chunk-TZ4MVY4E.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$6}from'./chunk-4QEH5CGK.mjs';import C from'react';import {jsx,jsxs}from'react/jsx-runtime';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {j,l,m,k,o,i,h}from'./chunk-
|
|
1
|
+
import {j,l,m,k,o,i,h}from'./chunk-EYKIXVM3.mjs';import {a as a$3}from'./chunk-UN7XC7QV.mjs';import {a as a$2}from'./chunk-KCHAWPUN.mjs';import {b}from'./chunk-AYBACQ6U.mjs';import {a}from'./chunk-F3HQNHR5.mjs';import {e}from'./chunk-B7PSE5KC.mjs';import {a as a$1}from'./chunk-4QEH5CGK.mjs';import P,{useEffect,useContext}from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -7,4 +7,4 @@ import {j,l,m,k,o,i,h}from'./chunk-5TDFLLMX.mjs';import {a as a$3}from'./chunk-6
|
|
|
7
7
|
* This notice may not be removed from this file.
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
var I="xyd2ss0 _1yep5z6nm _1yep5z6nn _1yep5z6no _1yep5z6py _1yep5z6pz _1yep5z6q0 _1yep5z6r4 _1yep5z6r5 _1yep5z6r6 _1yep5z6os _1yep5z6ot _1yep5z6ou _1yep5z6sa _1yep5z6sb _1yep5z6sc _1yep5z6um _1yep5z6un _1yep5z6uo _1yep5z6vs _1yep5z6vt _1yep5z6vu _1yep5z6tg _1yep5z6th _1yep5z6ti _1yep5z6x4 _1yep5z6x5 _1yep5z6x6 _1yep5z6xs _1yep5z6xt _1yep5z6xu _1yep5z6yg _1yep5z6yh _1yep5z6yi _1yep5z6z4 _1yep5z6z5 _1yep5z6z6 _1yep5z618r _1yep5z618q _1yep5z614z _1yep5z618u _1yep5z612s";var z=e=>e!=null&&typeof e=="object"&&!(Symbol.iterator in e);function G(e,o,r){let i=z(o)||z(r),s=o!=null&&!z(o)||r!=null&&!z(r);return e&&s?"Menu: an object `selectionMode` expects `selectedKeys`/`defaultSelectedKeys` to be records keyed by section id.":!e&&i?"Menu: a per-section `selectedKeys`/`defaultSelectedKeys` record requires the object form of `selectionMode`.":null}var Q=P.forwardRef(({defaultOpen:e,onOpenChange:o,isOpen:r,isDisabled:i,contentClassName:s,placement:l$1="bottom start",isNonModal:a$3,shouldFlip:c,shouldUpdatePosition:t,boundaryElement:M,boundaryAxis:p,horizontalBoundaryBehavior:d,crossOffset:_,offset:Z,triggerLabel:x,renderTrigger:b$1=({buttonProps:u,ref:y})=>jsx(b,{...u,variant:"popover",ref:y,"data-testid":"menu-trigger"}),portalContainer:$,selectionMode:m,selectedKeys:v,defaultSelectedKeys:S,onSelectionChange:K,disabledKeys:h,disallowEmptySelection:
|
|
10
|
+
var I="xyd2ss0 _1yep5z6nm _1yep5z6nn _1yep5z6no _1yep5z6py _1yep5z6pz _1yep5z6q0 _1yep5z6r4 _1yep5z6r5 _1yep5z6r6 _1yep5z6os _1yep5z6ot _1yep5z6ou _1yep5z6sa _1yep5z6sb _1yep5z6sc _1yep5z6um _1yep5z6un _1yep5z6uo _1yep5z6vs _1yep5z6vt _1yep5z6vu _1yep5z6tg _1yep5z6th _1yep5z6ti _1yep5z6x4 _1yep5z6x5 _1yep5z6x6 _1yep5z6xs _1yep5z6xt _1yep5z6xu _1yep5z6yg _1yep5z6yh _1yep5z6yi _1yep5z6z4 _1yep5z6z5 _1yep5z6z6 _1yep5z618r _1yep5z618q _1yep5z614z _1yep5z618u _1yep5z612s";var z=e=>e!=null&&typeof e=="object"&&!(Symbol.iterator in e);function G(e,o,r){let i=z(o)||z(r),s=o!=null&&!z(o)||r!=null&&!z(r);return e&&s?"Menu: an object `selectionMode` expects `selectedKeys`/`defaultSelectedKeys` to be records keyed by section id.":!e&&i?"Menu: a per-section `selectedKeys`/`defaultSelectedKeys` record requires the object form of `selectionMode`.":null}var Q=P.forwardRef(({defaultOpen:e,onOpenChange:o,isOpen:r,isDisabled:i,contentClassName:s,placement:l$1="bottom start",isNonModal:a$3,shouldFlip:c,shouldUpdatePosition:t,boundaryElement:M,boundaryAxis:p,horizontalBoundaryBehavior:d,crossOffset:_,offset:Z,triggerLabel:x,renderTrigger:b$1=({buttonProps:u,ref:y})=>jsx(b,{...u,variant:"popover",ref:y,"data-testid":"menu-trigger"}),portalContainer:$,selectionMode:m,selectedKeys:v,defaultSelectedKeys:S,onSelectionChange:K,disabledKeys:h,disallowEmptySelection:N,itemClassName:C,optionClassName:R,optionStyle:ee,renderOption:oe,...O},re)=>{let u=a($),y=m!=null&&typeof m=="object",A=P.useMemo(()=>h==null?void 0:new Set(h),[h]),te=P.useMemo(()=>C?(ne,ie)=>a$1(C,a$2(R,ne,ie)):R,[C,R]),B=G(y,v,S);if(B)throw new Error(B);return useEffect(()=>{!x&&!b$1&&console.warn("The `triggerLabel` prop is required when no `renderTrigger` or `children` is provided.");},[b$1,x]),jsxs(j,{defaultOpen:e,onOpenChange:o,isOpen:r,children:[jsx(W,{isDisabled:i,renderTrigger:b$1,triggerLabel:x}),jsx(X,{placement:l$1,isNonModal:a$3,shouldFlip:c,shouldUpdatePosition:t,boundaryElement:M,boundaryAxis:p,horizontalBoundaryBehavior:d,crossOffset:_,offset:Z||2,className:"BaselineUI-Menu-Popover",portalContainer:u,children:jsx(l,{...O,disabledKeys:A,...y?{}:{selectionMode:m,selectedKeys:v,defaultSelectedKeys:S,onSelectionChange:K,disallowEmptySelection:N},className:a$1(I,s),ref:re,children:V(O.items,u,{onAction:O.onAction,disabledKeys:A,contentClassName:s,optionClassName:te,optionStyle:ee,renderOption:oe,selection:y?{modes:m,selectedKeys:v,defaultSelectedKeys:S,onSelectionChange:K,disallowEmptySelection:N}:void 0})})})]})});function V(e,o$1,r){let{onAction:i,disabledKeys:s,contentClassName:l$1,selection:a,...c}=r;return e.map((t,M)=>{if("children"in t){let p=t,d=a?.modes[p.id];return jsx(m,{section:p,componentName:"Menu",isFirstCollectionItem:M===0,showSectionHeader:!!p.title,...c,...d?{selectionMode:d,selectedKeys:a?.selectedKeys?.[p.id],defaultSelectedKeys:a?.defaultSelectedKeys?.[p.id],disabledKeys:s,disallowEmptySelection:a?.disallowEmptySelection,onSelectionChange:_=>{a?.onSelectionChange?.(_,{sectionId:p.id});}}:{}},p.id)}return t.items?jsxs(k,{children:[jsx(o,{item:t,componentName:"Menu",...c}),jsx(X,{className:"BaselineUI-Menu-SubmenuPopover",portalContainer:o$1,children:jsx(l,{className:a$1(I,l$1),onAction:i,disabledKeys:s,children:V(t.items,o$1,r)})})]},t.id):jsx(o,{item:t,componentName:"Menu",...c},t.id)})}var W=P.forwardRef(({renderTrigger:e,triggerLabel:o,isDisabled:r,...i$1},s)=>{let l=useContext(i);return e?.({buttonProps:{...i$1,isDisabled:r,label:typeof o=="function"?o(l?.isOpen||false):o,isOpen:l?.isOpen||false,className:"BaselineUI-Menu-Trigger"},ref:s})});W.displayName="MyTrigger";var X=({children:e$1,...o})=>{let r=useContext(i),[i$1]=e(o,void 0,h);return r?.isOpen?jsx(a$3,{...i$1,state:r,children:e$1}):null};Q.displayName="Menu";export{Q as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$9}from'./chunk-TJEK54BW.mjs';import {c as c$1,d}from'./chunk-
|
|
1
|
+
import {a as a$9}from'./chunk-TJEK54BW.mjs';import {c as c$1,d}from'./chunk-UBFMOTBM.mjs';import {a as a$8}from'./chunk-NGZRN4SF.mjs';import {a as a$2}from'./chunk-2V323KAD.mjs';import {a as a$c}from'./chunk-34TYNTXM.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {a as a$1}from'./chunk-66CUIXA6.mjs';import {a as a$a}from'./chunk-D3IZ4HBL.mjs';import {a as a$7}from'./chunk-RSKKEGJZ.mjs';import {a as a$5}from'./chunk-K6X2BHPP.mjs';import {a as a$6,d as d$1}from'./chunk-BGMVPFYK.mjs';import {a as a$4}from'./chunk-3FYY26ED.mjs';import {q}from'./chunk-MRJFGHFW.mjs';import {c}from'./chunk-TZ4MVY4E.mjs';import {a as a$b}from'./chunk-KEVERVHK.mjs';import {c as c$2}from'./chunk-JDLUGVXG.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import R,{useMemo,useRef,useEffect}from'react';import {XIcon}from'@baseline-ui/icons/8';import {jsxs,jsx}from'react/jsx-runtime';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {b}from'./chunk-
|
|
1
|
+
import {b}from'./chunk-JDIGAVFU.mjs';import {a as a$1}from'./chunk-XUJJMAKM.mjs';import {a as a$8}from'./chunk-O7XK2WIX.mjs';import {a as a$a}from'./chunk-RXSYDMT6.mjs';import {a as a$9}from'./chunk-X3AXUU3H.mjs';import {a as a$6}from'./chunk-YS3Y5KGV.mjs';import {a as a$7}from'./chunk-RSKKEGJZ.mjs';import {a as a$3}from'./chunk-K6X2BHPP.mjs';import {a as a$4}from'./chunk-3FYY26ED.mjs';import {a as a$5}from'./chunk-RT4LMB6X.mjs';import {c}from'./chunk-TZ4MVY4E.mjs';import {c as c$1,a as a$b}from'./chunk-JDLUGVXG.mjs';import {b as b$1}from'./chunk-RMUV6NJJ.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$2}from'./chunk-4QEH5CGK.mjs';import {CaretUpIcon}from'@baseline-ui/icons/12';import {CheckmarkIcon,CircleFilledIcon,ErrorCircleIcon,WarningIcon}from'@baseline-ui/icons/16';import W,{useRef,useCallback,useEffect}from'react';import {flushSync}from'react-dom';import {jsxs,jsx}from'react/jsx-runtime';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {b,a as a$5}from'./chunk-
|
|
1
|
+
import {b,a as a$5}from'./chunk-Y3YZMICA.mjs';import {a as a$i}from'./chunk-5IC46G5J.mjs';import {a as a$1,f as f$1}from'./chunk-VZFS4QRW.mjs';import {a as a$3}from'./chunk-5BAHJXOI.mjs';import {b as b$2,a as a$g,q}from'./chunk-EYKIXVM3.mjs';import {a as a$9}from'./chunk-2MS356Q7.mjs';import {a as a$f}from'./chunk-UN7XC7QV.mjs';import {b as b$1}from'./chunk-SZTFMBPY.mjs';import {f}from'./chunk-AKES5B6C.mjs';import {a as a$b}from'./chunk-CGFLGZL4.mjs';import {b as b$4}from'./chunk-AYBACQ6U.mjs';import {a as a$e}from'./chunk-6JWACCHG.mjs';import {a as a$4}from'./chunk-TDXALNX3.mjs';import {a as a$d}from'./chunk-VDUFLHKK.mjs';import {a as a$a}from'./chunk-RSKKEGJZ.mjs';import {a as a$8}from'./chunk-K6X2BHPP.mjs';import {a as a$c}from'./chunk-BGMVPFYK.mjs';import {a as a$7}from'./chunk-3FYY26ED.mjs';import {d}from'./chunk-AQYBKDT2.mjs';import {a as a$2}from'./chunk-RT4LMB6X.mjs';import {a as a$6,c,b as b$3}from'./chunk-TZ4MVY4E.mjs';import {g,e}from'./chunk-AUOQSTS5.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$h}from'./chunk-4QEH5CGK.mjs';import z,{useMemo,useState,useRef,useEffect}from'react';import {useGranularEffect}from'granular-hooks';import {jsx,jsxs,Fragment}from'react/jsx-runtime';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {g as g$1}from'./chunk-SHJ2TJYG.mjs';import {g}from'./chunk-MRJFGHFW.mjs';import {g as g$2,f,a}from'./chunk-AUOQSTS5.mjs';import {b}from'./chunk-RMUV6NJJ.mjs';import {useState,useEffect}from'react';/**
|
|
2
|
+
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
+
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
+
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
+
* This notice may not be removed from this file.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
var e=typeof document<"u"&&window.visualViewport;function d(){let x=b(),[h,E]=useState(()=>x?{width:0,height:0}:u());return useEffect(()=>{let m=t=>{E(r=>t.width===r.width&&t.height===r.height?r:t);},n=()=>{e&&e.scale>1||m(u());},l,a$1=t=>{e&&e.scale>1||g$1(g$2(t))&&(l=requestAnimationFrame(()=>{let r=f(a(g$2(t)));(!r||!g$1(r))&&m({width:document.documentElement.clientWidth,height:document.documentElement.clientHeight});}));};return m(u()),g()&&window.addEventListener("blur",a$1,true),e?e.addEventListener("resize",n):window.addEventListener("resize",n),()=>{cancelAnimationFrame(l),g()&&window.removeEventListener("blur",a$1,true),e?e.removeEventListener("resize",n):window.removeEventListener("resize",n);}},[]),h}function u(){return {width:e?Math.min(e.width*e.scale,document.documentElement.clientWidth):document.documentElement.clientWidth,height:e?e.height*e.scale:document.documentElement.clientHeight}}export{d as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a,b}from'./chunk-
|
|
1
|
+
import {a,b}from'./chunk-XF5UMU6D.mjs';import {b as b$1,a as a$3}from'./chunk-F2X474RV.mjs';import {a as a$1}from'./chunk-CCA2ABXO.mjs';import {c}from'./chunk-TZ4MVY4E.mjs';import {a as a$2}from'./chunk-JDLUGVXG.mjs';import {a as a$4}from'./chunk-AUOQSTS5.mjs';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-NQO6OQT6.mjs';import {a as a$1}from'./chunk-UEDBY5JI.mjs';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$1}from'./chunk-4QEH5CGK.mjs';import {AvatarIcon as AvatarIcon$1}from'@baseline-ui/icons/16';import {AvatarIcon}from'@baseline-ui/icons/24';import C from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-O7XK2WIX.mjs';import {a}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-O7XK2WIX.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$2}from'./chunk-4QEH5CGK.mjs';import {XIcon,CheckmarkIcon,CircleFilledIcon,ErrorCircleIcon,WarningIcon}from'@baseline-ui/icons/16';import {themeVars}from'@baseline-ui/tokens';import h from'react';import {jsx,jsxs}from'react/jsx-runtime';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$4}from'./chunk-
|
|
1
|
+
import {a as a$4}from'./chunk-TDYBXLYP.mjs';import {a as a$2}from'./chunk-RSKKEGJZ.mjs';import {a}from'./chunk-K6X2BHPP.mjs';import {d}from'./chunk-BGMVPFYK.mjs';import {a as a$1}from'./chunk-3FYY26ED.mjs';import {d as d$1}from'./chunk-AQYBKDT2.mjs';import {n,q,r}from'./chunk-MRJFGHFW.mjs';import {b,c}from'./chunk-TZ4MVY4E.mjs';import {a as a$5}from'./chunk-KEVERVHK.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import C from'react';import {jsx}from'react/jsx-runtime';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {a as a$6}from'./chunk-TBCZKWGQ.mjs';import {a as a$e}from'./chunk-E3DMXJIC.mjs';import {k,j,g,c,i,f as f$1,h as h$1,e as e$1,d as d$1,b as b$5,a as a$h}from'./chunk-VZFS4QRW.mjs';import {b as b$3,a as a$g,q as q$1,n,c as c$4}from'./chunk-EYKIXVM3.mjs';import {p}from'./chunk-SMAYNDQQ.mjs';import {a as a$b}from'./chunk-AMW7LGCF.mjs';import {a as a$9}from'./chunk-VIVNQZYK.mjs';import {b as b$6}from'./chunk-NUYBQ7KP.mjs';import {b as b$7}from'./chunk-UBFMOTBM.mjs';import {b as b$8}from'./chunk-PAQQ7MQG.mjs';import {a as a$3}from'./chunk-2MS356Q7.mjs';import {a as a$k}from'./chunk-XJ2DFV56.mjs';import {a as a$d}from'./chunk-UN7XC7QV.mjs';import {a as a$c,b as b$2}from'./chunk-SZTFMBPY.mjs';import {d,h,e,f,g as g$1}from'./chunk-PG3WDHSK.mjs';import {a as a$f}from'./chunk-XUJJMAKM.mjs';import {a as a$m}from'./chunk-SAZLJ66W.mjs';import {b,c as c$2}from'./chunk-GX2IOGYR.mjs';import {a as a$t}from'./chunk-M5M3EPG5.mjs';import {d as d$3}from'./chunk-W6QO7FPZ.mjs';import {b as b$4}from'./chunk-AYBACQ6U.mjs';import {a as a$7}from'./chunk-O7XK2WIX.mjs';import {a as a$j}from'./chunk-6JWACCHG.mjs';import {a as a$a}from'./chunk-F3HQNHR5.mjs';import {a as a$l}from'./chunk-USMC34OO.mjs';import {a as a$r}from'./chunk-4ZJMZB5B.mjs';import {a as a$i}from'./chunk-VDUFLHKK.mjs';import {a as a$p}from'./chunk-4PYEGHW5.mjs';import {a as a$5}from'./chunk-66CUIXA6.mjs';import {a as a$q}from'./chunk-X3AXUU3H.mjs';import {a as a$s}from'./chunk-545KDVGI.mjs';import {a}from'./chunk-YS3Y5KGV.mjs';import {a as a$4}from'./chunk-RSKKEGJZ.mjs';import {a as a$2}from'./chunk-K6X2BHPP.mjs';import {d as d$2}from'./chunk-Y4DRSGEJ.mjs';import {a as a$1}from'./chunk-3FYY26ED.mjs';import {c as c$1,b as b$1,a as a$o}from'./chunk-TZ4MVY4E.mjs';import {a as a$n}from'./chunk-KEVERVHK.mjs';import {c as c$3}from'./chunk-JDLUGVXG.mjs';import {e as e$2,g as g$2}from'./chunk-AUOQSTS5.mjs';import {a as a$8}from'./chunk-4QEH5CGK.mjs';import q,{useCallback,useContext,useEffect,useMemo,useRef,useState}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {CaretDownIcon}from'@baseline-ui/icons/8';import {sprinkles}from'@baseline-ui/tokens';/**
|
|
2
|
+
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
+
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
+
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
+
* This notice may not be removed from this file.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
var $=new WeakMap;function de(t,e,a){let{keyboardDelegate:n,isDisabled:p,isRequired:S,name:c,form:s,validationBehavior:y="aria"}=t,x=a$l({usage:"search",sensitivity:"base"}),l=useMemo(()=>n||new b$6(e.collection,e.disabledKeys,a,x),[n,e.collection,e.disabledKeys,x,a]),{menuTriggerProps:u,menuProps:r}=c$4({isDisabled:p,type:"listbox"},e,a),d=m=>{if(e.selectionManager.selectionMode!=="multiple")switch(m.key){case "ArrowLeft":{m.preventDefault();let T=e.selectedKey!=null?l.getKeyAbove?.(e.selectedKey):l.getFirstKey?.();T!=null&&e.setSelectedKey(T);break}case "ArrowRight":{m.preventDefault();let T=e.selectedKey!=null?l.getKeyBelow?.(e.selectedKey):l.getFirstKey?.();T!=null&&e.setSelectedKey(T);break}}},{typeSelectProps:o}=b$7({keyboardDelegate:l,selectionManager:e.selectionManager,onTypeSelect(m){e.setSelectedKey(m);}}),{isInvalid:g,validationErrors:b,validationDetails:C}=e.displayValidation,{labelProps:O,fieldProps:i,descriptionProps:M,errorMessageProps:f}=a$m({...t,labelElementType:"span",isInvalid:g,errorMessage:t.errorMessage||b,ref:a});e.selectionManager.selectionMode==="multiple"&&(o={});let B=a$n(t,{labelable:true}),P=c$1(o,u,i),R=c$3();return $.set(e,{isDisabled:p,isRequired:S,name:c,form:s,validationBehavior:y}),{labelProps:{...O,onClick:()=>{t.isDisabled||(a.current?.focus(),d$2("keyboard"));}},triggerProps:c$1(B,{...P,isDisabled:p,onKeyDown:a$o(P.onKeyDown,d,t.onKeyDown),onKeyUp:t.onKeyUp,"aria-labelledby":[R,P["aria-labelledby"],P["aria-label"]&&!P["aria-labelledby"]?P.id:null].filter(Boolean).join(" "),onFocus(m){e.isFocused||(t.onFocus&&t.onFocus(m),t.onFocusChange&&t.onFocusChange(true),e.setFocused(true));},onBlur(m){e.isOpen||(t.onBlur&&t.onBlur(m),t.onFocusChange&&t.onFocusChange(false),e.setFocused(false));}}),valueProps:{id:R},menuProps:{...r,onAction:void 0,autoFocus:e.focusStrategy||true,shouldSelectOnPressUp:true,shouldFocusOnHover:true,disallowEmptySelection:true,linkBehavior:"selection",onBlur:m=>{e$2(m.currentTarget,m.relatedTarget)||(t.onBlur&&t.onBlur(m),t.onFocusChange&&t.onFocusChange(false),e.setFocused(false));},"aria-labelledby":[i["aria-labelledby"],P["aria-label"]&&!i["aria-labelledby"]?P.id:null].filter(Boolean).join(" ")},descriptionProps:M,errorMessageProps:f,isInvalid:g,validationErrors:b,validationDetails:C,hiddenSelectProps:{isDisabled:p,name:c,label:t.label,state:e,triggerRef:a,form:s}}}function bt(t,e,a){let n=$.get(e)||{},{autoComplete:p,name:S=n.name,form:c=n.form,isDisabled:s=n.isDisabled}=t,{validationBehavior:y,isRequired:x}=n,{visuallyHiddenProps:l}=a$r({style:{position:"fixed",top:0,left:0}});a$s(t.selectRef,e.defaultValue,e.setValue),a$t({validationBehavior:y,focus:()=>a.current?.focus()},e,t.selectRef);let u=e.setValue,r=useCallback(d=>{let o=g$2(d);o.multiple?u(Array.from(o.selectedOptions,g=>g.value)):u(d.currentTarget.value);},[u]);return {containerProps:{...l,"aria-hidden":true,"data-react-aria-prevent-focus":true,"data-a11y-ignore":"aria-hidden-focus"},inputProps:{style:{display:"none"}},selectProps:{tabIndex:-1,autoComplete:p,disabled:s,multiple:e.selectionManager.selectionMode==="multiple",required:y==="native"&&x,name:S,form:c,value:e.value??"",onChange:r,onInput:r}}}function ue(t){let{state:e,triggerRef:a,label:n,name:p,form:S,isDisabled:c}=t,s=useRef(null),y=useRef(null),{containerProps:x,selectProps:l}=bt({...t,selectRef:e.collection.size<=300?s:y},e,a),u=Array.isArray(e.value)?e.value:[e.value];if(e.collection.size<=300)return jsx("div",{...x,"data-testid":"hidden-select-container",children:jsxs("label",{children:[n,jsxs("select",{...l,ref:s,children:[jsx("option",{value:"",label:"\xA0",children:"\xA0"}),[...e.collection.getKeys()].map(r=>{let d=e.collection.getItem(r);if(d&&d.type==="item")return jsx("option",{value:d.key,children:d.textValue},d.key)}),e.collection.size===0&&p&&u.map((r,d)=>jsx("option",{value:r??""},d))]})]})});if(p){let r=$.get(e)||{},{validationBehavior:d}=r;u.length===0&&(u=[null]);let o=u.map((g,b)=>{let C={type:"hidden",autoComplete:l.autoComplete,name:p,form:S,disabled:c,value:g??""};return d==="native"?jsx("input",{...C,ref:b===0?y:null,style:{display:"none"},type:"text",required:b===0?l.required:false,onChange:()=>{}},b):jsx("input",{...C,ref:b===0?y:null},b)});return jsx(Fragment,{children:o})}return null}function pe(t){let{selectionMode:e="single",shouldCloseOnSelect:a=e==="single"}=t,n=a$p(t),[p,S]=useState(null),c=useMemo(()=>t.defaultValue!==void 0?t.defaultValue:e==="single"?t.defaultSelectedKey??null:[],[t.defaultValue,t.defaultSelectedKey,e]),s=useMemo(()=>t.value!==void 0?t.value:e==="single"?t.selectedKey:void 0,[t.value,t.selectedKey,e]),[y,x]=a$q(s,c,t.onChange),l=e==="single"&&Array.isArray(y)?y[0]:y,u=i=>{if(e==="single"){let M=Array.isArray(i)?i[0]??null:i;x(M),M!==l&&t.onSelectionChange?.(M);}else {let M=[];Array.isArray(i)?M=i:i!=null&&(M=[i]),x(M);}},r=b$8({...t,selectionMode:e,disallowEmptySelection:e==="single",allowDuplicateSelectionEvents:true,selectedKeys:useMemo(()=>Bt(l),[l]),onSelectionChange:i=>{if(i!=="all"){if(e==="single"){let M=i.values().next().value??null;u(M);}else u([...i]);a&&n.close(),g.commitValidation();}}}),d=r.selectionManager.firstSelectedKey,o=useMemo(()=>[...r.selectionManager.selectedKeys].map(i=>r.collection.getItem(i)).filter(i=>i!=null),[r.selectionManager.selectedKeys,r.collection]),g=d$3({...t,value:Array.isArray(l)&&l.length===0?null:l}),[b,C]=useState(false),[O]=useState(l);return {...g,...r,...n,value:l,defaultValue:c??O,setValue:u,selectedKey:d,setSelectedKey:u,selectedItem:o[0]??null,selectedItems:o,defaultSelectedKey:t.defaultSelectedKey??(t.selectionMode==="single"?O:null),focusStrategy:p,open(i=null){(r.collection.size!==0||t.allowsEmptyCollection)&&(S(i),n.open());},toggle(i=null){(r.collection.size!==0||t.allowsEmptyCollection)&&(S(i),n.toggle());},isFocused:b,setFocused:C}}function Bt(t){if(t!==void 0)return t===null?[]:Array.isArray(t)?t:[t]}var U=q.forwardRef(({variant:t,isOpen:e,validationState:a$9="valid",valueProps:n,className:p,style:S,value:c$2,"data-block-id":s,"data-block-class":y,fallbackValue:x,selectionMode:l="single",onRemove:u,maxCount:r=2,moreLabel:d$1,...o},g$1)=>{let{formatMessage:b$2}=b(),C=c$2?.[0]??null,O=C?.label??x,i$1=C?.icon??null,M=q.useRef(null),f=!!(l==="multiple"&&c$2&&c$2?.length>0),{buttonProps:B,isPressed:P}=a({...o,elementType:"div",isDisabled:o.isDisabled||o.isReadOnly},M),{hoverProps:R,isHovered:m}=a$1({isDisabled:o.isDisabled}),{focusProps:T,isFocused:N,isFocusVisible:A}=a$2(),F=a$3({isReadOnly:o.isReadOnly,validationState:a$9});o.isReadOnly&&(B.disabled=false);let V=a$4({"data-disabled":o.isDisabled,"data-readonly":o.isReadOnly,"data-focused":N,"data-focus-visible":A,"data-hovered":m,"data-pressed":P,"data-open":e,"data-block-id":s,"data-block-class":y}),w=o["aria-labelledby"],ae=useCallback(()=>{a$5(Array.isArray(c$2),"value must be an array");let j=c$2.slice(0,r),H=c$2.slice(r),W=[...j,...H.length>0?[{label:(typeof d$1=="function"?d$1({count:H.length}):d$1)??b$2(It.more,{count:H.length}),id:"remaining-value"}]:[]];return jsx(a$6,{items:W,onRemove:o.isReadOnly?void 0:X=>{X.has("remaining-value")?u?.(new Set(H.map(E=>E.id))):u?.(X);},"aria-labelledby":w,className:k,isDisabled:o.isDisabled})},[c$2,r,b$2,d$1,w,o.isDisabled,u,o.isReadOnly]),z=l==="multiple";return jsxs("div",{...c$1(z?Object.fromEntries(Object.entries(B).filter(([j])=>j.startsWith("on"))):c$1(B,T),R,V),ref:z?g$1:b$1(g$1,M),className:a$8(i({isFocused:A,isDisabled:!!o.isDisabled,isOpen:e,isHovered:m,variant:t,isReadOnly:!!o.isReadOnly,areTagsVisible:f}),h({variant:t,isHovered:m,isFocused:A,validationState:a$9,isDisabled:!!o.isDisabled,isReadOnly:o.isReadOnly}),p,"BaselineUI-Select-Button"),"data-testid":"select-button",style:S,children:[jsxs(a$7,{display:"flex",flexDirection:"row",alignItems:"center",gap:"md",flex:1,paddingRight:"md",children:[l==="multiple"&&c$2&&c$2.length>0?ae():jsxs("span",{className:k,children:[i$1?jsx(i$1,{size:24}):null,jsx("span",{...n,children:O})]}),F?jsx("span",{"aria-hidden":true,className:a$8(d({validationState:a$9,isReadOnly:!!o.isReadOnly}),j),children:jsx(F,{size:16})}):null]}),jsx("div",{...z?{...c$1(B,T),ref:M}:{},className:g,children:jsx(CaretDownIcon,{size:8,className:c({isOpen:e})})})]})});U.displayName="SelectButton";var It=c$2({more:{id:"bui.select.more",defaultMessage:"+{count} more"}});var xt=q.createContext({state:null,popoverAnchorRef:null}),Se=q.forwardRef(({className:t,style:e$2,labelPosition:a="top",variant:n="primary","data-block-id":p$1,"data-block-class":S,onTriggerPress:c,placement:s="bottom start",triggerClassName:y,triggerStyle:x,state:l,optionStyle:u,optionClassName:r,showSectionHeader:d,hideSelectAll:o,hideClear:g,clearLabel:b$1,searchLabel:C,selectAllLabel:O,moreLabel:i,renderTrigger:M=({buttonProps:P,selectedValue:R,valueProps:m,isOpen:T,ref:N,selectionMode:A,onRemove:F,maxCount:V})=>jsx(U,{...P,className:y,style:x,isOpen:T,isReadOnly:f$2.isReadOnly,ref:N,variant:n,validationState:f$2.validationState,valueProps:m,value:R,fallbackValue:f$2.placeholder,selectionMode:A,onRemove:F,maxCount:V,moreLabel:i}),...f$2},B)=>{let{popoverAnchorRef:P}=useContext(xt),R=q.useRef(null),{formatMessage:m}=b(),T=C??m(ye.search),N=useContext(a$9),{isVirtualized:A}=useContext(p),F=a$a(f$2.portalContainer),{labelProps:V,triggerProps:w,valueProps:ae,menuProps:z,descriptionProps:j,errorMessageProps:H}=de({...a$b(f$2),validationState:f$2.validationState==="error"?"invalid":"valid"},l,R),W=c$3(),X=a$c(f$2)==="warningMessage",E=b$2({...f$2,descriptionProps:j,errorMessageProps:H,warningMessageProps:{id:W},labelPosition:a}),Rt=l.selectedItems?.map(_=>_.value)??null;return jsxs(Fragment,{children:[jsxs("div",{style:e$2,className:a$8(g$1({labelPosition:a}),"BaselineUI-Select",t),"data-block-id":p$1,"data-block-class":S,ref:B,children:[f$2.label||E?jsxs("div",{className:f({labelPosition:a,hasMessage:!!E}),children:[f$2.label?jsx("div",{...V,className:a$8(e,"BaselineUI-Select-Label"),children:f$2.label}):null,a==="start"&&E]}):null,jsx(ue,{state:l,triggerRef:R,isDisabled:f$2.isDisabled,label:f$2.label,name:f$2.name}),M({buttonProps:c$1({onPressStart:c,"aria-labelledby":V.id},w,X?{"aria-describedby":[w["aria-describedby"],W].filter(Boolean).join(" ")}:null),selectedValue:Rt,valueProps:ae,isOpen:l.isOpen,ref:R,selectionMode:f$2.selectionMode??"single",onRemove:_=>{l.selectionManager.setSelectedKeys(new Set([...l.selectionManager.selectedKeys].filter(ne=>!_.has(ne))));},maxCount:f$2.maxCount??2}),a==="top"&&E]}),l?jsx(b$3.Provider,{value:l,children:jsx(a$d,{placement:s,state:l,portalContainer:F,offset:2,triggerRef:P||R,style:e$2,className:"BaselineUI-Select-Popover",...f$2,children:jsxs(a$7,{display:"flex",flex:1,flexDirection:"column",className:f$1,children:[N?jsxs(Fragment,{children:[jsx(a$e,{size:"sm","aria-label":T,placeholder:T,className:a$8(h$1,"BaselineUI-Select-SearchInput"),autoFocus:true}),jsx(a$f,{})]}):null,jsx(a$g.Provider,{value:z,children:jsx(q$1,{label:f$2.label,escapeKeyBehavior:"none",className:e$1({isVirtualized:A}),optionStyle:u,optionClassName:r,showSectionHeader:d})}),l.selectionManager.selectionMode==="multiple"&&(!o||!g)&&jsxs(a$7,{display:"flex",flexDirection:"row",className:d$1,children:[!o&&jsx(b$4,{variant:"ghost",size:"md",label:O??m(ye.selectAll),"data-testid":"select-all-button",onPress:()=>{if(l.selectionManager.isSelectAll)return;let ne=[...l.collection.getKeys()].filter(ge=>!l.selectionManager.disabledKeys.has(ge)&&l.selectionManager.canSelectItem(ge));l.selectionManager.setSelectedKeys(new Set(ne));},className:b$5}),!o&&!g&&jsx(a$f,{orientation:"vertical"}),!g&&jsx(b$4,{variant:"ghost",label:b$1??m(ye.clear),size:"md","data-testid":"select-clear-button",onPress:()=>{l.selectionManager.isEmpty||l.selectionManager.clearSelection();},className:b$5})]})]})})}):null]})});Se.displayName="SelectCore";var Pt=q.forwardRef(({collection:t,...e},a)=>{let n=pe({...e,collection:t,validationState:e.validationState==="error"?"invalid":"valid",children:void 0});return jsx(Se,{...e,ref:a,state:n})});Pt.displayName="SelectStandalone";var le=q.forwardRef(({optionStyle:t,optionClassName:e,showSectionHeader:a,...n$1},p)=>{let{state:S}=useContext(xt);useEffect(()=>{a$5(S||n$1.items,"Select: A `state` that can be passed via context or `items` are required.");},[n$1.items,S]);let c=useMemo(()=>({renderOption:(s,y)=>jsx(n,{...y,item:s,selectionIcon:y.selectionMode==="multiple"?"checkbox":"checkmark"}),optionStyle:t,optionClassName:e,showSectionHeader:a}),[t,e,a]);return S?jsx(Se,{...n$1,optionStyle:t,optionClassName:e,showSectionHeader:a,ref:p,state:S}):jsx(a$h,{items:n$1.items,listBoxProps:c,children:s=>jsx(Pt,{collection:s,...n$1,ref:p})})});le.displayName="Select";var ye=c$2({selectAll:{id:"bui.select.selectAll",defaultMessage:"Select All"},clear:{id:"bui.select.clear",defaultMessage:"Clear"},search:{id:"bui.select.search",defaultMessage:"Search"}});var Ct=q.forwardRef(({className:t,style:e,variant:a,"data-block-id":n,icon:p,tooltip:S=true,iconTooltip:c=true,...s},y)=>{let x=q.useRef(null),{tooltipProps:l}=a$i({label:s["aria-label"],tooltip:S}),u=useCallback(({buttonProps:r,selectedValue:d,valueProps:o,isOpen:g,ref:b})=>jsx(a$j,{...l,children:jsx(U,{...r,isOpen:g,isReadOnly:s.isReadOnly,ref:b,variant:a,validationState:s.validationState,value:d,fallbackValue:s.placeholder,valueProps:o,moreLabel:s.moreLabel})}),[s,l,a]);return jsxs(a$7,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:a$8("BaselineUI-IconSelect",t),"data-block-id":n,style:e,ref:b$1(y,x),children:[p?jsx(a$k,{icon:p,label:s["aria-label"],tooltip:c,"aria-hidden":"true",size:24,isFocusable:false,className:sprinkles({color:"icon.primary",display:"flex",flexShrink:0})}):null,jsx(le,{...s,renderTrigger:u})]})});Ct.displayName="IconSelect";export{pe as a,xt as b,le as c,Ct as d};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {l,q,e,B,o,p,u,h,d as d$1,A,g,v,x,z,f,i,m,c as c$2,r,t,s,n,j,a as a$4,b as b$4,w}from'./chunk-OMT6ZWSV.mjs';import {b as b$1}from'./chunk-WL27JGVG.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {a as a$2,b as b$3}from'./chunk-MVK5CB64.mjs';import {a as a$1}from'./chunk-XWLESSHN.mjs';import {d}from'./chunk-Y4DRSGEJ.mjs';import {i as i$1,g as g$1,l as l$1,m as m$1}from'./chunk-MRJFGHFW.mjs';import {c as c$1}from'./chunk-TZ4MVY4E.mjs';import {a,c}from'./chunk-JDLUGVXG.mjs';import {a as a$3}from'./chunk-6ZQE5SHE.mjs';import {b as b$2,g as g$2}from'./chunk-AUOQSTS5.mjs';import {flushSync}from'react-dom';import Je,{useState,useRef,useImperativeHandle,useEffect,useCallback,version}from'react';import {jsx}from'react/jsx-runtime';/**
|
|
2
|
+
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
+
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
+
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
+
* This notice may not be removed from this file.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
var Ze=Je.forwardRef(function(e,n){let t=e.children,[s,l]=useState(null),v=useRef(null),d=useRef(void 0);return useImperativeHandle(n,()=>(h,K)=>{let T=t(h),O,a,b;T&&typeof T=="object"&&"element"in T?(O=T.element,a=T.x,b=T.y):O=T,flushSync(()=>{l(O);}),K(v.current,a,b),d.current=requestAnimationFrame(()=>{l(null);});},[t]),useEffect(()=>()=>{d.current&&cancelAnimationFrame(d.current);},[]),s?jsx("div",{style:{zIndex:-100,position:"fixed",top:0,left:-1e5},ref:v,children:s}):null});function Be(i,e,n,t,s=false,l=false){switch(t){case "left":return s?te(i,e,n,l,"left"):re(i,e,n,l,"left");case "right":return s?re(i,e,n,l,"right"):te(i,e,n,l,"right");case "up":return re(i,e,n,l);case "down":return te(i,e,n,l)}}function te(i,e,n,t=false,s=null){if(!n)return {type:"root"};if(n.type==="root"){let l=i.getFirstKey?.()??null;return l!=null?{type:"item",key:l,dropPosition:"before"}:null}if(n.type==="item"){let l=null;s?l=s==="right"?i.getKeyRightOf?.(n.key,{includeDisabled:true}):i.getKeyLeftOf?.(n.key,{includeDisabled:true}):l=i.getKeyBelow?.(n.key,{includeDisabled:true});let v=oe(e,n.key,d=>e.getKeyAfter(d));if(l!=null&&l!==v)return {type:"item",key:l,dropPosition:n.dropPosition};switch(n.dropPosition){case "before":return {type:"item",key:n.key,dropPosition:"on"};case "on":{let d=e.getItem(n.key),h=l!=null?e.getItem(l):null;return d&&h&&h.level>=d.level?{type:"item",key:h.key,dropPosition:"before"}:{type:"item",key:n.key,dropPosition:"after"}}case "after":{let d=e.getItem(n.key),h=d?.nextKey!=null?e.getItem(d.nextKey):null;for(;h!=null&&h.type!=="item";)h=h.nextKey!=null?e.getItem(h.nextKey):null;if(d&&h==null&&d.parentKey!=null){let K=e.getItem(d.parentKey),T=K?.nextKey!=null?e.getItem(K.nextKey):null;if(T?.type==="item")return {type:"item",key:T.key,dropPosition:"before"};if(K?.type==="item")return {type:"item",key:K.key,dropPosition:"after"}}if(h)return {type:"item",key:h.key,dropPosition:"on"}}}}return t?{type:"root"}:null}function re(i,e,n,t=false,s=null){if(!n||t&&n.type==="root"){let l=null,v=i.getLastKey?.();for(;v!=null;){let d=e.getItem(v);if(d?.type!=="item")break;l=v,v=d?.parentKey;}return l!=null?{type:"item",key:l,dropPosition:"after"}:null}if(n.type==="item"){let l=null;s?l=s==="left"?i.getKeyLeftOf?.(n.key,{includeDisabled:true}):i.getKeyRightOf?.(n.key,{includeDisabled:true}):l=i.getKeyAbove?.(n.key,{includeDisabled:true});let v=oe(e,n.key,d=>e.getKeyBefore(d));if(l!=null&&l!==v)return {type:"item",key:l,dropPosition:n.dropPosition};switch(n.dropPosition){case "before":{let d=e.getItem(n.key);if(d&&d.prevKey!=null){let h=Fe(e,d.prevKey);if(h)return h}return l!=null?{type:"item",key:l,dropPosition:"on"}:{type:"root"}}case "on":return {type:"item",key:n.key,dropPosition:"before"};case "after":{let d=Fe(e,n.key);return d||{type:"item",key:n.key,dropPosition:"on"}}}}return n.type!=="root"?{type:"root"}:null}function Fe(i,e){let n=i.getItem(e),t=oe(i,e,l=>i.getKeyAfter(l)),s=t!=null?i.getItem(t):null;if(n&&s&&s.level>n.level){let l=null;if("lastChildKey"in n)for(l=n.lastChildKey!=null?i.getItem(n.lastChildKey):null;l&&l.type!=="item"&&l.prevKey!=null;)l=i.getItem(l.prevKey);else l=Array.from(n.childNodes).findLast(v=>v.type==="item")||null;if(l)return {type:"item",key:l.key,dropPosition:"after"}}return null}function oe(i,e,n){let t=n(e),s=t!=null?i.getItem(t):null;for(;s&&s.type!=="item";)t=n(s.key),s=t!=null?i.getItem(t):null;return t}var $=20;function He(i){let e=useRef(null),n=useRef(true),t=useRef(true);useEffect(()=>{if(i.current){e.current=a$2(i.current)?i.current:b$3(i.current);let v=window.getComputedStyle(e.current);n.current=/(auto|scroll)/.test(v.overflowX),t.current=/(auto|scroll)/.test(v.overflowY);}},[i]);let s=useRef({timer:void 0,dx:0,dy:0}).current;useEffect(()=>()=>{s.timer&&(cancelAnimationFrame(s.timer),s.timer=void 0);},[s]);let l=useCallback(()=>{n.current&&e.current&&(e.current.scrollLeft+=s.dx),t.current&&e.current&&(e.current.scrollTop+=s.dy),s.timer&&(s.timer=requestAnimationFrame(l));},[e,s]);return {move(v,d){if(!i$1()||g$1()||!e.current)return;let h=e.current.getBoundingClientRect(),K=$,T=$,O=h.height-$,a=h.width-$;v<K||v>a||d<T||d>O?(v<K?s.dx=v-K:v>a&&(s.dx=v-a),d<T?s.dy=d-T:d>O&&(s.dy=d-O),s.timer||(s.timer=requestAnimationFrame(l))):this.stop();},stop(){s.timer&&(cancelAnimationFrame(s.timer),s.timer=void 0);}}}function tt(i,e$1,n){let t=useRef({props:i,state:e$1,nextTarget:null,dropOperation:null}).current;t.props=i,t.state=e$1;let s=useCallback(async a=>{let{onInsert:b,onRootDrop:g,onItemDrop:c,onReorder:p,onMove:m,acceptedDragTypes:u="all",shouldAcceptItemDrop:r}=t.props,{draggingKeys:f}=l,y=q(n),{target:o,dropOperation:D,items:P}=a,w=P;(u!=="all"||r)&&(w=P.filter(S=>{let E;return S.kind==="directory"?E=new Set([e]):E=S.kind==="file"?new Set([S.type]):S.types,u==="all"||u.some(x=>E.has(x))?o.type==="item"&&o.dropPosition==="on"&&r?r(o,E):true:false})),w.length>0&&(o.type==="root"&&g&&await g({items:w,dropOperation:D}),o.type==="item"&&(o.dropPosition==="on"&&c&&await c({items:w,dropOperation:D,isInternal:y,target:o}),m&&y&&await m({keys:f,dropOperation:D,target:o}),o.dropPosition!=="on"&&(!y&&b&&await b({items:w,dropOperation:D,target:o}),y&&p&&await p({keys:f,dropOperation:D,target:o}))));},[t,n]),l$1=He(n),{dropProps:v}=B({ref:n,onDropEnter(){t.nextTarget!=null&&e$1.setTarget(t.nextTarget);},onDropMove(a){t.nextTarget!=null&&e$1.setTarget(t.nextTarget);},getDropOperationForPoint(a,b,g,c){let{draggingKeys:p,dropCollectionRef:m}=l,u=q(n),r=y=>e$1.getDropOperation({target:y,types:a,allowedOperations:b,isInternal:u,draggingKeys:p})!=="cancel",f=i.dropTargetDelegate.getDropTargetFromPoint(g,c,r);if(!f)return t.dropOperation="cancel",t.nextTarget=null,"cancel";if(t.dropOperation=e$1.getDropOperation({target:f,types:a,allowedOperations:b,isInternal:u,draggingKeys:p}),t.dropOperation==="cancel"){let y={type:"root"},o=e$1.getDropOperation({target:y,types:a,allowedOperations:b,isInternal:u,draggingKeys:p});o!=="cancel"&&(f=y,t.dropOperation=o);}return f&&t.dropOperation!=="cancel"&&n?.current!==m?.current&&o(n),t.nextTarget=t.dropOperation==="cancel"?null:f,t.dropOperation},onDropExit(){o(void 0),e$1.setTarget(null),l$1.stop();},onDropActivate(a){e$1.target?.type==="item"&&typeof i.onDropActivate=="function"&&i.onDropActivate({type:"dropactivate",x:a.x,y:a.y,target:e$1.target});},onDrop(a){o(n),e$1.target&&K(a,e$1.target);let{draggingCollectionRef:b}=l;b==null&&p();}}),d$2=useRef(null),h$1=useCallback(()=>{let{state:a}=t;if(d$2.current){let{target:b,collection:g,selectedKeys:c,focusedKey:p,isInternal:m,draggingKeys:u}=d$2.current;if(a.collection.size>g.size&&a.selectionManager.isSelectionEqual(c)){let r=new Set,f=a.collection.getFirstKey();for(;f!=null;){let y=a.collection.getItem(f);y?.type==="item"&&!g.getItem(y.key)&&r.add(y.key),y?.hasChildNodes&&a.collection.getItem(y.lastChildKey)?.type==="item"?f=y.firstChildKey:f=a.collection.getKeyAfter(f);}if(a.selectionManager.setSelectedKeys(r),a.selectionManager.focusedKey===p){let y=r.keys().next().value;if(y!=null){let o=a.collection.getItem(y),D=d$2.current.target,P=a.collection.expandedKeys?a.collection.expandedKeys.has(o?.parentKey):false;o&&(o?.type==="cell"||D.type==="item"&&D.dropPosition==="on"&&!P)&&(y=o.parentKey),y!=null&&a.selectionManager.setFocusedKey(y),a.selectionManager.selectionMode==="none"&&d("keyboard");}}}else p!=null&&a.selectionManager.focusedKey===p&&m&&b.type==="item"&&b.dropPosition!=="on"&&u.has(a.collection.getItem(p)?.parentKey)?(a.selectionManager.setFocusedKey(a.collection.getItem(p)?.parentKey??null),d("keyboard")):a.selectionManager.focusedKey===p&&b.type==="item"&&b.dropPosition==="on"&&a.collection.getItem(b.key)!=null?(a.selectionManager.setFocusedKey(b.key),d("keyboard")):a.selectionManager.focusedKey!=null&&!a.selectionManager.isSelected(a.selectionManager.focusedKey)&&d("keyboard");a.selectionManager.setFocused(true);}},[t]),K=useCallback((a,b)=>{let{state:g}=t;d$2.current={timeout:void 0,focusedKey:g.selectionManager.focusedKey,collection:g.collection,selectedKeys:g.selectionManager.selectedKeys,draggingKeys:l.draggingKeys,isInternal:q(n),target:b},(t.props.onDrop||s)({type:"drop",x:a.x,y:a.y,target:b,items:a.items,dropOperation:a.dropOperation}),d$2.current.timeout=setTimeout(()=>{h$1(),d$2.current=null;},50);},[t,s,n,h$1]);useEffect(()=>()=>{d$2.current&&clearTimeout(d$2.current.timeout);},[]),a(()=>{d$2.current&&e$1.collection!==d$2.current.collection&&h$1();});let{direction:T}=b();useEffect(()=>{if(!n.current)return;let a=(c,p=true,m="down")=>Be(t.props.keyboardDelegate,t.state.collection,c,m,T==="rtl",p),b=(c,p=true)=>a(c,p,"up"),g=(c,p,m,u,r=true)=>{let f=0,y,{draggingKeys:o}=l,D=q(n);do{let P=u(c,r);if(!P)return null;c=P,y=t.state.getDropOperation({target:P,types:p,allowedOperations:m,isInternal:D,draggingKeys:o}),c.type==="root"&&f++;}while(y==="cancel"&&!t.state.isDropTarget(c)&&f<2);return y==="cancel"?null:c};return u({element:n.current,preventFocusOnDrop:true,getDropOperation(c,p){if(t.state.target){let{draggingKeys:u}=l,r=q(n);return t.state.getDropOperation({target:t.state.target,types:c,allowedOperations:p,isInternal:r,draggingKeys:u})}return g(null,c,p,a)?"move":"cancel"},onDropEnter(c,p){let m=h(p.items),u=t.state.selectionManager,r=null;o(n);let f=u.focusedKey,y="after",o$1=f!=null?t.state.collection.getItem(f):null;if(o$1?.type==="cell"&&(f=o$1.parentKey),f!=null&&u.isSelected(f)&&(u.selectedKeys.size>1&&u.firstSelectedKey===f?y="before":f=u.lastSelectedKey),f!=null){r={type:"item",key:f,dropPosition:y};let{draggingKeys:D}=l,P=q(n);t.state.getDropOperation({target:r,types:m,allowedOperations:p.allowedDropOperations,isInternal:P,draggingKeys:D})==="cancel"&&(r=g(r,m,p.allowedDropOperations,a,false)??g(r,m,p.allowedDropOperations,b,false));}r||(r=g(null,m,p.allowedDropOperations,a)),t.state.setTarget(r);},onDropExit(){o(void 0),t.state.setTarget(null);},onDropTargetEnter(c){t.state.setTarget(c);},onDropActivate(c,p){p?.type==="item"&&p?.dropPosition==="on"&&typeof t.props.onDropActivate=="function"&&t.props.onDropActivate({type:"dropactivate",x:c.x,y:c.y,target:p});},onDrop(c,p){o(n),t.state.target&&K(c,p||t.state.target);},onKeyDown(c,p){let{keyboardDelegate:m}=t.props,u=h(p.items);switch(c.key){case "ArrowDown":{if(m.getKeyBelow){let r=g(t.state.target,u,p.allowedDropOperations,(f,y)=>a(f,y,"down"));t.state.setTarget(r);}break}case "ArrowUp":{if(m.getKeyAbove){let r=g(t.state.target,u,p.allowedDropOperations,(f,y)=>a(f,y,"up"));t.state.setTarget(r);}break}case "ArrowLeft":{if(m.getKeyLeftOf){let r=g(t.state.target,u,p.allowedDropOperations,(f,y)=>a(f,y,"left"));t.state.setTarget(r);}break}case "ArrowRight":{if(m.getKeyRightOf){let r=g(t.state.target,u,p.allowedDropOperations,(f,y)=>a(f,y,"right"));t.state.setTarget(r);}break}case "Home":{if(m.getFirstKey){let r=g(null,u,p.allowedDropOperations,a);t.state.setTarget(r);}break}case "End":{if(m.getLastKey){let r=g(null,u,p.allowedDropOperations,b);t.state.setTarget(r);}break}case "PageDown":{if(m.getKeyPageBelow){let r=t.state.target;if(!r)r=g(null,u,p.allowedDropOperations,a);else {let f=m.getFirstKey?.();r.type==="item"&&(f=r.key);let y=null;f!=null&&(y=m.getKeyPageBelow(f));let o=r.type==="item"?r.dropPosition:"after";if((y==null||r.type==="item"&&r.key===m.getLastKey?.())&&(y=m.getLastKey?.()??null,o="after"),y==null)break;r={type:"item",key:y,dropPosition:o};let{draggingCollectionRef:D,draggingKeys:P}=l,w=D?.current===n?.current;t.state.getDropOperation({target:r,types:u,allowedOperations:p.allowedDropOperations,isInternal:w,draggingKeys:P})==="cancel"&&(r=g(r,u,p.allowedDropOperations,a,false)??g(r,u,p.allowedDropOperations,b,false));}t.state.setTarget(r??t.state.target);}break}case "PageUp":{if(!m.getKeyPageAbove)break;let r=t.state.target;if(!r)r=g(null,u,p.allowedDropOperations,b);else if(r.type==="item"){if(r.key===m.getFirstKey?.())r={type:"root"};else {let D=m.getKeyPageAbove(r.key),P=r.dropPosition;if(D==null&&(D=m.getFirstKey?.(),P="before"),D==null)break;r={type:"item",key:D,dropPosition:P};}let{draggingKeys:f}=l,y=q(n);t.state.getDropOperation({target:r,types:u,allowedOperations:p.allowedDropOperations,isInternal:y,draggingKeys:f})==="cancel"&&(r=g(r,u,p.allowedDropOperations,b,false)??g(r,u,p.allowedDropOperations,a,false));}t.state.setTarget(r??t.state.target);break}}t.props.onKeyDown?.(c);}})},[t,n,K,T]);let O=c();return d$1.set(e$1,{id:O,ref:n}),{collectionProps:c$1(v,{id:O,"aria-describedby":null})}}function ie(i,e,n){let{dropProps:t}=A(n),s=g(e);useEffect(()=>{if(n.current)return v({element:n.current,target:i.target,getDropOperation(T,O){let{draggingKeys:a}=l,b=q(s);return e.getDropOperation({target:i.target,types:T,allowedOperations:O,isInternal:b,draggingKeys:a})},activateButtonRef:i.activateButtonRef})},[n,i.target,e,s,i.activateButtonRef]);let l$1=x(),{draggingKeys:v$1}=l,d=q(s),h$1=l$1&&e.getDropOperation({target:i.target,types:h(l$1.dragTarget.items),allowedOperations:l$1.dragTarget.allowedDropOperations,isInternal:d,draggingKeys:v$1})!=="cancel",K=e.isDropTarget(i.target);return useEffect(()=>{l$1&&K&&n.current&&n.current.focus();},[K,l$1,n]),{dropProps:{...t,"aria-hidden":!l$1||h$1?void 0:"true"},isDropTarget:K}}function rt(i,e,n){let{target:t}=i,{collection:s}=e,l=b$1(z,"@react-aria/dnd"),v=x(),{dropProps:d}=ie(i,e,n),h=c(),K=g=>g==null?"":s.getTextValue?.(g)??s.getItem(g)?.textValue??"",T="",O;if(t.type==="root")T=l.format("dropOnRoot"),O=`${h} ${f(e)}`;else if(t.dropPosition==="on")T=l.format("dropOnItem",{itemText:K(t.key)});else {let g,c;if(t.dropPosition==="before"){let p=s.getItem(t.key)?.prevKey,m=p!=null?s.getItem(p):null;g=m?.type==="item"?m.key:null;}else g=t.key;if(t.dropPosition==="after"){let p=s.getItem(t.key)?.nextKey,m=p!=null?s.getItem(p):null;c=m?.type==="item"?m.key:null;}else c=t.key;g!=null&&c!=null?T=l.format("insertBetween",{beforeItemText:K(g),afterItemText:K(c)}):g!=null?T=l.format("insertAfter",{itemText:K(g)}):c!=null&&(T=l.format("insertBefore",{itemText:K(c)}));}let a=e.isDropTarget(t),b=v?d["aria-hidden"]:"true";return {dropIndicatorProps:{...d,id:h,"aria-roledescription":l.format("dropIndicator"),"aria-label":T,"aria-labelledby":O,"aria-hidden":b,tabIndex:-1},isDropTarget:a,isHidden:!a&&!!b}}var Ve={keyboard:{start:"dragDescriptionKeyboard",end:"endDragKeyboard"},touch:{start:"dragDescriptionTouch",end:"endDragTouch"},virtual:{start:"dragDescriptionVirtual",end:"endDragVirtual"}};function Ye(i$1){let{hasDragButton:e,isDisabled:n,elementRef:t$1}=i$1,s$1=b$1(z,"@react-aria/dnd"),l=useRef({options:i$1,x:0,y:0}).current;l.options=i$1;let v=useRef(null),[d,h]=useState(false),K=o=>{v.current=o,h(!!o);},{addGlobalListener:T,removeAllGlobalListeners:O}=a$3(),a=useRef(null),b=o=>{if(o.defaultPrevented)return;if(o.stopPropagation(),a.current==="virtual"){o.preventDefault(),m(g$2(o)),a.current=null;return}typeof i$1.onDragStart=="function"&&i$1.onDragStart({type:"dragstart",x:o.clientX,y:o.clientY});let D=i$1.getItems();o.dataTransfer.clearData?.(),j(o.dataTransfer,D);let P=7;if(typeof i$1.getAllowedDropOperations=="function"){let E=i$1.getAllowedDropOperations();P=0;for(let x of E)P|=a$4[x]||0;}t(P);let w=b$4[P]||"none";o.dataTransfer.effectAllowed=w==="cancel"?"none":w,typeof i$1.preview?.current=="function"&&i$1.preview.current(D,(E,x,N)=>{if(!E)return;let M=E.getBoundingClientRect(),ge=o.currentTarget.getBoundingClientRect(),Z=o.clientX-ge.x,Q=o.clientY-ge.y;(Z>M.width||Q>M.height)&&(Z=M.width/2,Q=M.height/2);let H=Z,j=Q;typeof x=="number"&&typeof N=="number"&&(H=x,j=N),H=Math.max(0,Math.min(H,M.width)),j=Math.max(0,Math.min(j,M.height));let _e=2*Math.round(M.height/2);E.style.height=`${_e}px`,o.dataTransfer.setDragImage(E,H,j);}),T(b$2(g$2(o)),"drop",E=>{E.preventDefault(),E.stopPropagation(),console.warn("Drags initiated from the React Aria useDrag hook may only be dropped on a target created with useDrop. This ensures that a keyboard and screen reader accessible alternative is available.");},{once:true}),l.x=o.clientX,l.y=o.clientY;let S=g$2(o);requestAnimationFrame(()=>{K(S);});},g=o=>{o.stopPropagation(),!(o.clientX===l.x&&o.clientY===l.y)&&(typeof i$1.onDragMove=="function"&&i$1.onDragMove({type:"dragmove",x:o.clientX,y:o.clientY}),l.x=o.clientX,l.y=o.clientY);},c=o=>{if(o.stopPropagation(),typeof i$1.onDragEnd=="function"){let D={type:"dragend",x:o.clientX,y:o.clientY,dropOperation:c$2[o.dataTransfer.dropEffect]};r&&(D.dropOperation=c$2[r]),i$1.onDragEnd(D);}K(null),O(),t(0),s(void 0);};useEffect(()=>()=>{if(v.current&&(!v.current.isConnected||parseInt(version,10)<17)){if(typeof l.options.onDragEnd=="function"){let o={type:"dragend",x:0,y:0,dropOperation:c$2[r||"none"]};l.options.onDragEnd(o);}K(null),t(0),s(void 0);}},[l]);let p=o=>{o.pointerType!=="keyboard"&&o.pointerType!=="virtual"||m(o.target);},m=o=>{if(typeof l.options.onDragStart=="function"){let D=o.getBoundingClientRect();l.options.onDragStart({type:"dragstart",x:D.x+D.width/2,y:D.y+D.height/2});}w({element:o,items:l.options.getItems(),allowedDropOperations:typeof l.options.getAllowedDropOperations=="function"?l.options.getAllowedDropOperations():["move","copy","link"],onDragEnd(D){K(null),typeof l.options.onDragEnd=="function"&&l.options.onDragEnd(D);}},s$1),K(o);},u=i(),r$1=d?Ve[u].end:Ve[u].start,f=a$1(s$1.format(r$1),t$1),y={};return e||(y={...f,onPointerDown(o){if(a.current=m$1(o.nativeEvent)?"virtual":o.pointerType,o.width<1&&o.height<1)a.current="virtual";else {let D=o.currentTarget.getBoundingClientRect(),P=o.clientX-D.x,w=o.clientY-D.y,S=D.width/2,E=D.height/2;Math.abs(P-S)<=.5&&Math.abs(w-E)<=.5?a.current="virtual":a.current=o.pointerType;}},onKeyDownCapture(o){g$2(o)===o.currentTarget&&o.key==="Enter"&&(o.preventDefault(),o.stopPropagation());},onKeyUpCapture(o){g$2(o)===o.currentTarget&&o.key==="Enter"&&(o.preventDefault(),o.stopPropagation(),m(g$2(o)));},onClick(o){(l$1(o.nativeEvent)||a.current==="virtual")&&(o.preventDefault(),o.stopPropagation(),m(g$2(o)));}}),n?{dragProps:{draggable:"false"},dragButtonProps:{},isDragging:false}:{dragProps:{...y,draggable:"true",onDragStart:b,onDrag:g,onDragEnd:c},dragButtonProps:{...f,onPress:p},isDragging:d}}var it={keyboard:{selected:"dragSelectedKeyboard",notSelected:"dragDescriptionKeyboard"},touch:{selected:"dragSelectedLongPress",notSelected:"dragDescriptionLongPress"},virtual:{selected:"dragDescriptionVirtual",notSelected:"dragDescriptionVirtual"}};function at(i$1,e,n$1){let t=b$1(z,"@react-aria/dnd"),s=e.isDisabled||e.selectionManager.isDisabled(i$1.key),{dragProps:l,dragButtonProps:v}=Ye({elementRef:n$1,getItems(){return e.getItems(i$1.key)},preview:e.preview,getAllowedDropOperations:e.getAllowedDropOperations,hasDragButton:i$1.hasDragButton,onDragStart(g){e.startDrag(i$1.key,g),n(e.draggingKeys);},onDragMove(g){e.moveDrag(g);},onDragEnd(g){let{dropOperation:c}=g,p$1=c==="cancel"?false:q();e.endDrag({...g,keys:e.draggingKeys,isInternal:p$1}),p();}}),d=e.collection.getItem(i$1.key),h=e.getKeysForDrag(i$1.key).size,K=h>1&&e.selectionManager.isSelected(i$1.key),T,O,a=i();if(!i$1.hasDragButton&&e.selectionManager.selectionMode!=="none"){let g=it[a][K?"selected":"notSelected"];i$1.hasAction&&a==="keyboard"&&(g+="Alt"),K?O=t.format(g,{count:h}):O=t.format(g),delete l.onClick;}else if(K)T=t.format("dragSelectedItems",{count:h});else {let g=e.collection.getTextValue?.(i$1.key)??d?.textValue??"";T=t.format("dragItem",{itemText:g});}let b=a$1(O,n$1);if(O&&Object.assign(l,b),!i$1.hasDragButton&&i$1.hasAction){let{onKeyDownCapture:g,onKeyUpCapture:c}=l;a==="touch"&&delete l["aria-describedby"],l.onKeyDownCapture=p=>{p.altKey&&g?.(p);},l.onKeyUpCapture=p=>{p.altKey&&c?.(p);};}return {dragProps:s?{}:l,dragButtonProps:{...v,isDisabled:s,"aria-label":T}}}function pt(i,e,n){let{draggingCollectionRef:t}=l;e.draggingKeys.size>0&&t?.current!==n.current&&m(n);}function gt(i){let{getItems:e,isDisabled:n,collection:t,selectionManager:s,onDragStart:l,onDragMove:v,onDragEnd:d,preview:h,getAllowedDropOperations:K}=i,[,T]=useState(false),O=useRef(new Set),a=useRef(null),b=g=>{let c=new Set;if(s.isSelected(g))for(let p of s.selectedKeys){let m=t.getItem(p);if(m){let u=false,r=m.parentKey;for(;r!=null;){if(s.selectedKeys.has(r)){u=true;break}let f=t.getItem(r);r=f?f.parentKey:null;}u||c.add(p);}}else c.add(g);return c};return {collection:t,selectionManager:s,get draggedKey(){return a.current},get draggingKeys(){return O.current},isDragging(g){return O.current.has(g)},getKeysForDrag:b,getItems(g){let c=b(g),p=[];for(let m of c){let u=t.getItem(m)?.value;u!=null&&p.push(u);}return e(b(g),p)},isDisabled:n,preview:h,getAllowedDropOperations:K,startDrag(g,c){let p=b(g);O.current=p,a.current=g,s.setFocused(false),T(true),typeof l=="function"&&l({...c,keys:p});},moveDrag(g){typeof v=="function"&&v({...g,keys:O.current});},endDrag(g){let{isInternal:c}=g;typeof d=="function"&&d({...g,keys:O.current,isInternal:c}),O.current=new Set,a.current=null,T(false);}}}function ft(i){let{acceptedDragTypes:e="all",isDisabled:n,onInsert:t,onRootDrop:s,onItemDrop:l,onReorder:v,onMove:d,shouldAcceptItemDrop:h,collection:K,selectionManager:T,onDropEnter:O,getDropOperation:a,onDrop:b}=i,[,g]=useState(null),c=useRef(null),p=u=>{if(u.dropPosition==="before"){let r=K.getItem(u.key);return r&&r.prevKey!=null?{type:"item",key:r.prevKey,dropPosition:"after"}:null}else if(u.dropPosition==="after"){let r=K.getItem(u.key);return r&&r.nextKey!=null?{type:"item",key:r.nextKey,dropPosition:"before"}:null}return null},m=useCallback(u=>{let{target:r,types:f,allowedOperations:y,isInternal:o,draggingKeys:D}=u;if(n||!r)return "cancel";if(e==="all"||e.some(P=>f.has(P))){let P=t&&r.type==="item"&&!o&&(r.dropPosition==="before"||r.dropPosition==="after"),w=v&&r.type==="item"&&o&&(r.dropPosition==="before"||r.dropPosition==="after")&&yt(K,r,D),S=r.type!=="item"||r.dropPosition!=="on"||!h||h(r,f),E=d&&r.type==="item"&&o&&S,x=s&&r.type==="root"&&!o,N=l&&r.type==="item"&&r.dropPosition==="on"&&!(o&&r.key!=null&&D.has(r.key))&&S;if(b||P||w||E||x||N)return a?a(r,f,y):y[0]}return "cancel"},[n,K,e,a,t,s,l,h,v,d,b]);return {collection:K,selectionManager:T,isDisabled:n,get target(){return c.current},setTarget(u){if(this.isDropTarget(u))return;let r=c.current;r&&typeof i.onDropExit=="function"&&i.onDropExit({type:"dropexit",x:0,y:0,target:r}),u&&typeof O=="function"&&O({type:"dropenter",x:0,y:0,target:u}),c.current=u??null,g(u??null);},isDropTarget(u){let r=c.current;return !r||!u?false:pe(u,r)?true:u?.type==="item"&&r?.type==="item"&&u.key!==r.key&&u.dropPosition!==r.dropPosition&&u.dropPosition!=="on"&&r.dropPosition!=="on"?pe(p(u),r)||pe(u,p(r)):false},getDropOperation(u){let{target:r,isInternal:f,draggingKeys:y}=u;if(f&&r.type==="item"&&y.size>0){if(y.has(r.key)&&r.dropPosition==="on")return "cancel";let o=r.key;for(;o!=null;){let P=K.getItem(o)?.parentKey;if(P!=null&&y.has(P))return "cancel";o=P??null;}}return m(u)}}}function pe(i,e){if(!i)return !e;switch(i.type){case "root":return e?.type==="root";case "item":return e?.type==="item"&&e?.key===i.key&&e?.dropPosition===i.dropPosition}}function yt(i,e,n){let t=i.getItem(e.key);for(let s of n)if(i.getItem(s)?.parentKey!==t?.parentKey)return false;return true}var se=class{collection;ref;layout;orientation;direction;constructor(e,n,t){this.collection=e,this.ref=n,this.layout=t?.layout||"stack",this.orientation=t?.orientation||"vertical",this.direction=t?.direction||"ltr";}getPrimaryStart(e){return this.orientation==="horizontal"?e.left:e.top}getPrimaryEnd(e){return this.orientation==="horizontal"?e.right:e.bottom}getSecondaryStart(e){return this.orientation==="horizontal"?e.top:e.left}getSecondaryEnd(e){return this.orientation==="horizontal"?e.bottom:e.right}getFlowStart(e){return this.layout==="stack"?this.getPrimaryStart(e):this.getSecondaryStart(e)}getFlowEnd(e){return this.layout==="stack"?this.getPrimaryEnd(e):this.getSecondaryEnd(e)}getFlowSize(e){return this.getFlowEnd(e)-this.getFlowStart(e)}getDropTargetFromPoint(e,n,t){if(this.collection[Symbol.iterator]().next().done||!this.ref.current)return {type:"root"};let s=this.ref.current.getBoundingClientRect(),l=this.orientation==="horizontal"?e:n,v=this.orientation==="horizontal"?n:e;l+=this.getPrimaryStart(s),v+=this.getSecondaryStart(s);let d=this.layout==="stack"?l:v,h=this.orientation==="horizontal"&&this.direction==="rtl",K=this.layout==="grid"&&this.orientation==="vertical"&&this.direction==="rtl",T=this.layout==="stack"?h:K,O=this.ref.current?.dataset.collection,a=this.ref.current.querySelectorAll(O?`[data-collection="${CSS.escape(O)}"]`:"[data-key]"),b=new Map,g=b$2(this.ref.current);for(let f of a)f instanceof g.HTMLElement&&f.dataset.key!=null&&b.set(f.dataset.key,f);let c=[...this.collection].filter(f=>f.type==="item");if(c.length<1)return {type:"root"};let p=0,m=c.length;for(;p<m;){let f=Math.floor((p+m)/2),y=c[f],o=b.get(String(y.key));if(!o)break;let D=o.getBoundingClientRect(),P=w=>{w?p=f+1:m=f;};if(l<this.getPrimaryStart(D))P(h);else if(l>this.getPrimaryEnd(D))P(!h);else if(v<this.getSecondaryStart(D))P(K);else if(v>this.getSecondaryEnd(D))P(!K);else {let w={type:"item",key:y.key,dropPosition:"on"};if(t(w))d<=this.getFlowStart(D)+5&&t({...w,dropPosition:"before"})?w.dropPosition=T?"after":"before":d>=this.getFlowEnd(D)-5&&t({...w,dropPosition:"after"})&&(w.dropPosition=T?"before":"after");else {let S=this.getFlowStart(D)+this.getFlowSize(D)/2;d<=S&&t({...w,dropPosition:"before"})?w.dropPosition=T?"after":"before":d>=S&&t({...w,dropPosition:"after"})&&(w.dropPosition=T?"before":"after");}return w}}let u=c[Math.min(p,c.length-1)];return s=b.get(String(u.key))?.getBoundingClientRect(),s&&(l<this.getPrimaryStart(s)||Math.abs(d-this.getFlowStart(s))<Math.abs(d-this.getFlowEnd(s)))?{type:"item",key:u.key,dropPosition:T?"after":"before"}:{type:"item",key:u.key,dropPosition:T?"before":"after"}}};export{tt as a,ie as b,rt as c,at as d,pt as e,Ze as f,gt as g,ft as h,se as i};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$8}from'./chunk-
|
|
1
|
+
import {a as a$8}from'./chunk-RSTHM3ZF.mjs';import {a as a$4}from'./chunk-YX2ASVM3.mjs';import {a as a$3}from'./chunk-F3HQNHR5.mjs';import {b}from'./chunk-WL27JGVG.mjs';import {b as b$1}from'./chunk-YB3KW7JC.mjs';import {c}from'./chunk-Y4DRSGEJ.mjs';import {a as a$5}from'./chunk-3FYY26ED.mjs';import {a as a$1}from'./chunk-RT4LMB6X.mjs';import {a as a$7}from'./chunk-MRJFGHFW.mjs';import {c as c$1}from'./chunk-TZ4MVY4E.mjs';import {a as a$9}from'./chunk-KEVERVHK.mjs';import {a as a$6,c as c$2,e}from'./chunk-JDLUGVXG.mjs';import {g,e as e$1}from'./chunk-AUOQSTS5.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$2}from'./chunk-4QEH5CGK.mjs';import z,{useRef,useCallback,useEffect,useMemo,useState}from'react';import {useSyncExternalStore}from'use-sync-external-store/shim/index.js';import {jsx}from'react/jsx-runtime';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {c}from'./chunk-L3SNGDBH.mjs';import {b}from'./chunk-PAQQ7MQG.mjs';import {a as a$2}from'./chunk-O7XK2WIX.mjs';import {a as a$5}from'./chunk-
|
|
1
|
+
import {c}from'./chunk-L3SNGDBH.mjs';import {b}from'./chunk-PAQQ7MQG.mjs';import {a as a$2}from'./chunk-O7XK2WIX.mjs';import {a as a$5}from'./chunk-2V323KAD.mjs';import {a as a$4}from'./chunk-6JWACCHG.mjs';import {b as b$1}from'./chunk-WWSGOGLA.mjs';import {e}from'./chunk-KUEDQO7P.mjs';import {b as b$2}from'./chunk-N2XGJKZG.mjs';import {a as a$1}from'./chunk-66CUIXA6.mjs';import {a}from'./chunk-RT4LMB6X.mjs';import {t}from'./chunk-MRJFGHFW.mjs';import {c as c$1}from'./chunk-TZ4MVY4E.mjs';import {a as a$7}from'./chunk-KEVERVHK.mjs';import {a as a$6}from'./chunk-JDLUGVXG.mjs';import {e as e$1,g}from'./chunk-AUOQSTS5.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import j,{useMemo,useState,useEffect}from'react';import {jsx,jsxs}from'react/jsx-runtime';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$4}from'./chunk-ZLDT2KDZ.mjs';import {a as a$2}from'./chunk-UUBOEBYZ.mjs';import {a as a$1}from'./chunk-4PYEGHW5.mjs';import {a as a$3}from'./chunk-66CUIXA6.mjs';import {a}from'./chunk-
|
|
1
|
+
import {a as a$4}from'./chunk-ZLDT2KDZ.mjs';import {a as a$2}from'./chunk-UUBOEBYZ.mjs';import {a as a$1}from'./chunk-4PYEGHW5.mjs';import {a as a$3}from'./chunk-66CUIXA6.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$5}from'./chunk-4QEH5CGK.mjs';import d,{useMemo,useContext}from'react';import {jsx}from'react/jsx-runtime';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$3}from'./chunk-
|
|
1
|
+
import {a as a$3}from'./chunk-SYFSGF73.mjs';import {c}from'./chunk-7MQBBSZ2.mjs';import {a as a$2}from'./chunk-OAY74XPB.mjs';import {b}from'./chunk-QR2AF3KT.mjs';import {a as a$1}from'./chunk-K6X2BHPP.mjs';import {b as b$1,c as c$1}from'./chunk-TZ4MVY4E.mjs';import {a as a$5}from'./chunk-AUOQSTS5.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$4}from'./chunk-4QEH5CGK.mjs';import {assignInlineVars}from'@vanilla-extract/dynamic';import d,{useContext,useMemo,useState,useEffect}from'react';import {jsx}from'react/jsx-runtime';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -7,4 +7,4 @@ import {a as a$3}from'./chunk-KAVZW4RV.mjs';import {c}from'./chunk-MNAD5FJH.mjs'
|
|
|
7
7
|
* This notice may not be removed from this file.
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
var
|
|
10
|
+
var V="var(--cjv3et0)",H=a({defaultClassName:"cjv3et1 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6g9 _1yep5z6mf _1yep5z6mh",variantClassNames:{size:{sm:"cjv3et2",md:"cjv3et3",lg:"cjv3et4",content:"cjv3et5"},variant:{primary:"_1yep5z613z",ghost:"cjv3et7"},overlayType:{modal:"cjv3et8",popover:"cjv3et9"},isDrawer:{true:"cjv3eta _1yep5z6yy _1yep5z6yz _1yep5z6z0 _1yep5z6zm _1yep5z6zn _1yep5z6zo _1yep5z618m"},isFocusVisible:{true:"_1yep5z61rf _1yep5z61v9 _1yep5z61vb _1yep5z61vd"}},defaultVariants:{},compoundVariants:[]});function k(e,o){let t=e["aria-label"],r=e["aria-labelledby"],[i,s]=useState(()=>t||"");return useEffect(()=>{if(t){s(t);return}if(!r){s("");return}let a=o?.current?.getRootNode()??a$5(null),p=r.replaceAll(":",String.raw`\:`),m=a.querySelector(`#${p}`);if(m?.textContent){s(m.textContent);return}let l=a$5(null),y=a===l?l.body:a,n=new MutationObserver(()=>{let c=a.querySelector(`#${p}`);c?.textContent&&(s(c.textContent),n.disconnect());});return n.observe(y,{childList:true,subtree:true}),()=>{n.disconnect();}},[t,r,o]),i}var z=d.createContext({titleProps:{}}),O=d.forwardRef(({children:e,className:o,style:t,inheritDrawer:r,size:i="md",variant:s="primary","data-block-id":a,"data-block-class":p,drawerBackground:m,...l},y)=>{let n=d.useRef(null),c$2=d.useRef(null),{containerWidth:C,shouldContainOverlays:q}=useContext(b),{isDrawer:u,closeDrawer:U,dialogStyle:x,setDialogElement:R,isWithinModal:P}=useContext(c),$=k(l,c$2),{focusProps:A,isFocusVisible:T}=a$1(),{dialogProps:I,titleProps:w}=a$2(l,n),B=useMemo(()=>({titleProps:w}),[w]);return u&&r?jsx(a$3,{title:$,onCloseRequest:U,className:o,style:x,...l,"data-drawer":true,"data-block-id":a,"data-block-class":p,ref:b$1(y,c$2,g=>{R(g);}),background:m,children:e}):jsx(z.Provider,{value:B,children:jsx("section",{...c$1(I,A),"data-block-id":a,"data-block-class":p,"data-focus-visible":T,"data-overlay-type":P?"modal":"popover",ref:b$1(n,y,g=>{R(g);}),style:{...x,...t,...assignInlineVars({[V]:C&&q?`${C}px`:"100vw"})},className:a$4(H({size:u?"content":i,variant:s,isDrawer:u,isFocusVisible:T,overlayType:P?"modal":"popover"}),"BaselineUI-Dialog",o),children:e})})});O.displayName="Dialog";var W=d.forwardRef(({children:e,className:o,style:t},r)=>{let{titleProps:i}=useContext(z);return d.isValidElement(e)?d.cloneElement(e,{...i,ref:r,className:a$4(e.props.className,o),style:{...e.props.style,...t}}):jsx("h3",{...i,ref:r,className:o,style:t,children:e})});W.displayName="DialogTitle";export{O as a,W as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$4}from'./chunk-
|
|
1
|
+
import {a as a$4}from'./chunk-5HK56IXH.mjs';import {a as a$e}from'./chunk-XJ2DFV56.mjs';import {a as a$g}from'./chunk-UN7XC7QV.mjs';import {a as a$3,b as b$1}from'./chunk-BJVFZYUV.mjs';import {a as a$2}from'./chunk-5KD2MNNX.mjs';import {a as a$h}from'./chunk-M7OLZJYB.mjs';import {b as b$5}from'./chunk-AYBACQ6U.mjs';import {a as a$d}from'./chunk-O7XK2WIX.mjs';import {a as a$f}from'./chunk-6JWACCHG.mjs';import {a as a$1}from'./chunk-AV4ZP5SY.mjs';import {a as a$i}from'./chunk-KUEDQO7P.mjs';import {b as b$2}from'./chunk-N2XGJKZG.mjs';import {b as b$3}from'./chunk-4ZJMZB5B.mjs';import {b as b$4,j}from'./chunk-L6S5GBKS.mjs';import {a as a$c}from'./chunk-VDUFLHKK.mjs';import {a as a$a}from'./chunk-X3AXUU3H.mjs';import {a as a$8}from'./chunk-RSKKEGJZ.mjs';import {a as a$6}from'./chunk-K6X2BHPP.mjs';import {a as a$b}from'./chunk-BGMVPFYK.mjs';import {a as a$7}from'./chunk-3FYY26ED.mjs';import {a as a$9}from'./chunk-RT4LMB6X.mjs';import {b,c}from'./chunk-TZ4MVY4E.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$5}from'./chunk-4QEH5CGK.mjs';import B from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {sprinkles}from'@baseline-ui/tokens';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {a}from'./chunk-JDLUGVXG.mjs';import O,{useEffect}from'react';/**
|
|
2
|
+
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
+
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
+
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
+
* This notice may not be removed from this file.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
function R({ref:e,onIntersect:t,isDisabled:r,threshold:n,rootMargin:o,root:c}){let s=O.useRef(t);a(()=>{s.current=t;}),useEffect(()=>{let i=e.current;if(r||!i)return;let u=new IntersectionObserver(([b])=>{s.current(b);},{root:c?.current,rootMargin:o,threshold:n});return u.observe(i),()=>{u.disconnect();}},[e,r,c,o,n]);}export{R as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$2}from'./chunk-3UH5CQQF.mjs';import {a as a$3}from'./chunk-
|
|
1
|
+
import {a as a$2}from'./chunk-3UH5CQQF.mjs';import {a as a$3}from'./chunk-E5GYCA3P.mjs';import {a}from'./chunk-O7XK2WIX.mjs';import {a as a$1}from'./chunk-4QEH5CGK.mjs';import d from'react';import {jsx,jsxs}from'react/jsx-runtime';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|