@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$4}from'./chunk-CFLEBB5T.mjs';import {a as a$3}from'./chunk-
|
|
1
|
+
import {a as a$4}from'./chunk-CFLEBB5T.mjs';import {a as a$3}from'./chunk-6JWACCHG.mjs';import {a as a$2,c}from'./chunk-B6U6JHD4.mjs';import {a as a$5}from'./chunk-RSKKEGJZ.mjs';import {a as a$1}from'./chunk-RT4LMB6X.mjs';import {b,c as c$1}from'./chunk-TZ4MVY4E.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$6}from'./chunk-4QEH5CGK.mjs';import T,{useMemo}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}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-QSSCSN5S.mjs';import {b as b$1}from'./chunk-WL27JGVG.mjs';import {c}from'./chunk-JDLUGVXG.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-UBFMOTBM.mjs';import {a as a$1}from'./chunk-MVK5CB64.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 as a$1}from'./chunk-CFLEBB5T.mjs';import {c}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-CFLEBB5T.mjs';import {c}from'./chunk-B6U6JHD4.mjs';import {a as a$2}from'./chunk-RSKKEGJZ.mjs';import {b,c as c$1}from'./chunk-TZ4MVY4E.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';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 {c as c$1}from'./chunk-
|
|
1
|
+
import {c as c$1}from'./chunk-YWCU4PP7.mjs';import {I}from'./chunk-QDQPVCXN.mjs';import {a as a$1}from'./chunk-E5GYCA3P.mjs';import {a}from'./chunk-O7XK2WIX.mjs';import {a as a$5}from'./chunk-6JWACCHG.mjs';import {a as a$4}from'./chunk-VDUFLHKK.mjs';import {e}from'./chunk-BGMVPFYK.mjs';import {a as a$3}from'./chunk-KEVERVHK.mjs';import {c}from'./chunk-JDLUGVXG.mjs';import {a as a$2}from'./chunk-4QEH5CGK.mjs';import {sprinkles}from'@baseline-ui/tokens';import M,{useMemo,useEffect}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$e}from'./chunk-JBXZ6ZHP.mjs';import {a as a$6}from'./chunk-63KRQW56.mjs';import {a as a$2}from'./chunk-UCNHDT36.mjs';import {a as a$b}from'./chunk-HI44JQA7.mjs';import {a as a$d}from'./chunk-
|
|
1
|
+
import {a as a$e}from'./chunk-JBXZ6ZHP.mjs';import {a as a$6}from'./chunk-63KRQW56.mjs';import {a as a$2}from'./chunk-UCNHDT36.mjs';import {a as a$b}from'./chunk-HI44JQA7.mjs';import {a as a$d}from'./chunk-E5GYCA3P.mjs';import {a as a$c}from'./chunk-O7XK2WIX.mjs';import {a as a$a}from'./chunk-CCA2ABXO.mjs';import {a as a$4}from'./chunk-YX2ASVM3.mjs';import {a as a$8}from'./chunk-TDXALNX3.mjs';import {a as a$9,b as b$2}from'./chunk-RSKKEGJZ.mjs';import {a as a$5}from'./chunk-K6X2BHPP.mjs';import {a as a$f}from'./chunk-BGMVPFYK.mjs';import {a as a$7}from'./chunk-YB3KW7JC.mjs';import {d}from'./chunk-AQYBKDT2.mjs';import {b,c}from'./chunk-TZ4MVY4E.mjs';import {c as c$1}from'./chunk-JDLUGVXG.mjs';import {a as a$3,b as b$1}from'./chunk-AUOQSTS5.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$1}from'./chunk-4QEH5CGK.mjs';import z,{useContext,useMemo,useRef,useCallback,useEffect,useImperativeHandle,useState}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {PlusIcon}from'@baseline-ui/icons/12';import {themeVars}from'@baseline-ui/tokens';import {useGranularEffect}from'granular-hooks';import Je from'just-camel-case';import*as st from'comlink';/**
|
|
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,5 +7,5 @@ import {a as a$e}from'./chunk-JBXZ6ZHP.mjs';import {a as a$6}from'./chunk-63KRQW
|
|
|
7
7
|
* This notice may not be removed from this file.
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
var bt={node:null,setNode:()=>{},coordinates:null,setCoordinates:()=>{},displayId:void 0,setDisplayId:()=>{},boundsRef:{current:null},isDisabled:false,cursorNode:null,setCursorNode:()=>{},children:null,setChildren:()=>{}},p=z.createContext(bt),ke=z.memo(({children:e,isDisabled:t=false})=>{let[n,r]=z.useState(null),[a,o]=z.useState(null),[i,d]=z.useState(null),s=z.useRef(null),[l,x]=z.useState(null),[f,k]=z.useState(),c=z.useMemo(()=>({node:n,setNode:r,coordinates:l,setCoordinates:x,displayId:f,setDisplayId:k,boundsRef:s,isDisabled:t,cursorNode:a,setCursorNode:o,children:i,setChildren:d}),[n,l,f,x,r,s,t,a,o,i,d]);return jsx(p.Provider,{value:c,children:e})});ke.displayName="PointPicker";var Ee="m0xg2me";var _e="m0xg2md _1yep5z6iw _1yep5z6ix _1yep5z6iy _1yep5z6mh _1yep5z6mg _1yep5z6ho",ze="m0xg2mj",Re="_1yep5z6fa",Ie="m0xg2mk m0xg2mj",De=a({defaultClassName:"m0xg2m0",variantClassNames:{isDisabled:{true:"m0xg2m1",false:"m0xg2m2"},isIndicatorVisible:{true:"m0xg2m3",false:"m0xg2m4"}},defaultVariants:{},compoundVariants:[[{isDisabled:false,isIndicatorVisible:true},"m0xg2m5"],[{isDisabled:false,isIndicatorVisible:false},"m0xg2m6"]]}),Me="m0xg2m8",Ne="m0xg2mb",X="m0xg2ma _1yep5z6hp _1yep5z6mf",Ae="m0xg2m9 _1yep5z6je _1yep5z6jf _1yep5z6jg _1yep5z6hg _1yep5z6mf _1yep5z6it _1yep5z6iu _1yep5z6iv",Te="m0xg2m7",Le="m0xg2mc",Se="m0xg2mf";var W=a$1(_e,"BaselineUI-PointPicker-GridLine"),Et=({coordinates:e})=>jsxs(Fragment,{children:[jsx("div",{className:W,"data-grid-line-type":"vertical",style:{height:e.y-5,transform:`translate(${e.x}px, 0) translate(-1px, 0) scaleX(0.5)`}}),jsx("div",{className:W,"data-grid-line-type":"vertical",style:{height:`calc(100% - ${e.y+4}px)`,transform:`translate(${e.x}px, ${e.y+5}px) translate(-1px, 0) scaleX(0.5)`}})]}),_t=({coordinates:e})=>jsxs(Fragment,{children:[jsx("div",{className:W,"data-grid-line-type":"horizontal",style:{width:e.x-5,transform:`translate(0, ${e.y}px) translate(0, -1px) scaleY(0.5)`}}),jsx("div",{className:W,"data-grid-line-type":"horizontal",style:{width:`calc(100% - ${e.x+4}px)`,transform:`translate(${e.x+5}px, ${e.y}px) translate(0, -1px) scaleY(0.5)`}})]}),Oe=({gridLines:e})=>{let{isDisabled:t,boundsRef:n,coordinates:r}=useContext(p),a=useMemo(()=>{let o=typeof e=="function"?e({coordinates:r,boundingRect:n.current}):e;return typeof o=="boolean"?o?r:void 0:o?.coordinates},[e,r,n]);return a&&!t?jsxs(Fragment,{children:[jsx(Et,{coordinates:a}),jsx(_t,{coordinates:a})]}):null};function He({coordinates:e,setCoordinates:t,boundsRef:n,onKeyDown:r,onKeyUp:a}){let{isDisabled:o}=useContext(p);return a$f({isDisabled:o,onKeyDown:i=>{r?.(i);let d=i.shiftKey?10:1,s=n.current;if(!s||!e)return;let l;switch(i.key){case "ArrowRight":{i.preventDefault(),l={x:a$e(e.x+d,0,s.width),y:a$e(e.y,0,s.height)};break}case "ArrowLeft":{i.preventDefault(),l={x:a$e(e.x-d,0,s.width),y:a$e(e.y,0,s.height)};break}case "ArrowDown":{i.preventDefault(),l={x:a$e(e.x,0,s.width),y:a$e(e.y+d,0,s.height)};break}case "ArrowUp":{i.preventDefault(),l={x:a$e(e.x,0,s.width),y:a$e(e.y-d,0,s.height)};break}case "Home":{i.preventDefault(),l={x:0,y:a$e(e.y,0,s.height)};break}case "End":{i.preventDefault(),l={x:s.width,y:a$e(e.y,0,s.height)};break}case "PageUp":{i.preventDefault(),l={x:a$e(e.x,0,s.width),y:0};break}case "PageDown":{i.preventDefault(),l={x:a$e(e.x,0,s.width),y:s.height};break}default:{i.continuePropagation();return}}l&&t(l);},onKeyUp:a})}function Ue(){let{node:e,coordinates:t}=useContext(p);return useMemo(()=>{if(!e||!t)return {x:0,y:0};let{left:n,top:r}=e.getBoundingClientRect();return {x:t.x+n,y:t.y+r}},[t,e])}var{color:Be}=themeVars,$e=z.forwardRef(({modality:e},t)=>e==="keyboard"?jsxs("svg",{width:92,height:92,viewBox:"0 0 92 92",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,className:ze,children:[jsxs("g",{filter:"url(#filter0_d_11407_457970)",children:[jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49 43V4h-6v39H4v6h39v39h6V49h39v-6H49zm38 5H48v39h-4V48H5v-4h39V5h4v39h39v4zm-5 28v6h-6v6h12V76h-6zm5 11H77v-4h6v-6h4v10zm-77-5v-6H4v12h12v-6h-6zm5 5H5V77h4v6h6v4zM76 4v6h6v6h6V4H76zm11 11h-4V9h-6V5h10v10zM4 4v12h6v-6h6V4H4zm11 5H9v6H5V5h10v4z",fill:Be.background.positive.subtle}),jsx("path",{d:"M48 44v4h39v-4H48zm-4 4v39h4V48h-4zM5 44v4h39v-4H5zM44 5v39h4V5h-4zm39 72v6h-6v4h10V77h-4zM9 83v-6H5v10h10v-4H9zM77 5v4h6v6h4V5H77zM5 5v10h4V9h6V5H5z",fill:Be.background.positive.interactive.enabled})]}),jsx("defs",{children:jsxs("filter",{id:"filter0_d_11407_457970",x:0,y:0,width:92,height:92,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[jsx("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),jsx("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),jsx("feOffset",{}),jsx("feGaussianBlur",{stdDeviation:2}),jsx("feComposite",{in2:"hardAlpha",operator:"out"}),jsx("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0"}),jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_11407_457970"}),jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_11407_457970",result:"shape"})]})})]}):jsx(PlusIcon,{className:Ie,ref:t}));$e.displayName="PointPickerIndicatorIcon";var Tt=({trailingElement:e})=>{let{cursorNode:t}=useContext(p),[n,r]=useState({width:0,height:0});return useEffect(()=>{if(!t)return;let a=t.getBoundingClientRect();r(a);let o=new ResizeObserver(i=>{r({width:i[0].contentRect.width,height:i[0].contentRect.height});});return o.observe(t),()=>{o.disconnect();}},[t]),e?jsx(a$c,{position:"absolute",style:{left:0,top:0,zIndex:0,transform:`translate(${n.width/2}px, ${n.height/2}px)`},className:"BaselineUI-PointPickerContent-TrailingElement",children:e}):null},J=z.forwardRef(({renderTrailingElement:e,renderCursor:t},n)=>{let{coordinates:r,isDisabled:a,node:o}=useContext(p),i=a$2({ownerDocument:a$3(o)}),d=!!(r&&!a),s=useMemo(()=>e?.(),[e]),l=Ue(),x=useMemo(()=>{if(!r)return null;let f=t?.({coordinates:r,modality:i});return f===void 0?jsx($e,{modality:i}):f},[t,r,i]);return d?jsxs(a$4,{style:{left:l.x,top:l.y},className:a$1(Te,"BaselineUI-PointPickerContent-Cursor"),ref:n,children:[x,s?jsx(Tt,{trailingElement:s}):null]}):null});J.displayName="PointPickerIndicator";var Ke=z.forwardRef(({children:e,className:t,style:n,"data-block-id":r,"data-block-class":a,onFocusChange:o,onBlur:i,onFocus:d$1,onKeyDown:s,onKeyUp:l,gridLines:x=true,elementHandle:f,onMove:k,onPress:c$1,onPressStart:P,onPressEnd:b$1,renderTrailingElement:w,renderCursor:E},M)=>{let{setNode:C,node:_,coordinates:g,setCoordinates:R,displayId:G,boundsRef:I,isDisabled:h,setCursorNode:at,setChildren:j}=useContext(p),S=useRef(null),ae=useRef(null),le=a$2({ownerDocument:a$3(_)}),N=useCallback(u=>{R(u??null),k?.({coordinates:u,boundingRect:I.current});},[R,k,I]);useEffect(()=>{if(!h)return j(e),()=>{j(null);}},[e,h,j]),useEffect(()=>{let u=S.current;if(!u||h)return;let ce=()=>{let D=u.getBoundingClientRect();I.current=D;},H=D=>{let O=I.current;if(!O)return;let gt="clientX"in D?D.clientX:D.touches[0].clientX,vt="clientY"in D?D.clientY:D.touches[0].clientY,Pt={x:a$e(gt-O.left,0,O.width),y:a$e(vt-O.top,0,O.height)};N(Pt);},ue=()=>{N(null);};return u.addEventListener("mousemove",H),u.addEventListener("touchmove",H),u.addEventListener("mouseenter",ce),u.addEventListener("mouseleave",ue),()=>{u.removeEventListener("mousemove",H),u.removeEventListener("touchmove",H),u.removeEventListener("mouseenter",ce),u.removeEventListener("mouseleave",ue);}},[I,h,N]);let{pressProps:lt}=d({isDisabled:h,onPress:u=>{u.pointerType==="keyboard"?g&&c$1?.({...u,x:g.x,y:g.y}):c$1?.(u);},onPressStart:P,onPressEnd:b$1}),{focusProps:ct,isFocusVisible:ut,isFocused:dt}=a$5();a$6({ref:ae,isDisabled:h}),useImperativeHandle(f,()=>({focus:()=>{h||S.current?.focus();}}));let{focusProps:mt}=a$7({isDisabled:h,onFocusChange:o,onFocus:d$1,onBlur:i});function pt(){le==="keyboard"&&setTimeout(()=>{let u=S.current?.getBoundingClientRect();u&&(I.current=u,N({x:a$e(u.width/2,0,u.width),y:a$e(u.height/2,0,u.height)}));},0);}function ft(){N(null);}let{keyboardProps:ht}=He({coordinates:g,setCoordinates:N,boundsRef:I,onKeyDown:s,onKeyUp:l});a$8({isDisabled:h,ref:S,onInteractOutside:()=>{N(null);}});let yt=!!(g&&!h),xt=a$9({"data-focus-visible":ut,"data-focused":dt,"data-disabled":h,"data-block-id":r,"data-block-class":a,"data-active":g&&!h,"data-modality":le});return jsxs(Fragment,{children:[jsx(J,{renderTrailingElement:w,renderCursor:E,ref:at}),jsxs("div",{...c(ct,mt,{onFocus:pt,onBlur:ft},h?{}:c(ht,lt)),ref:b(M,S,C),className:a$1(De({isDisabled:!!h,isIndicatorVisible:!!yt}),"BaselineUI-PointPicker-Content",t),tabIndex:h?void 0:0,style:n,"aria-controls":G,"data-testid":"point-picker-content",...xt,children:[jsx(Oe,{gridLines:x}),jsx("div",{className:Ee,ref:ae,children:e})]})]})});Ke.displayName="PointPickerContent";function Xe(e,t,n){let[r,a]=useState(0),o=i=>{a(i),n();};return useGranularEffect(()=>{if(!e||t==="trailing")return;let i=new ResizeObserver(d=>{o(d[0].contentRect.width);});return o(e.getBoundingClientRect().width),i.observe(e),()=>{i.disconnect();}},[e,t],[n]),r}function jt(e,t){return t==="indicator"?e:e?.querySelector(".BaselineUI-PointPickerContent-TrailingElement")??null}var ee=z.forwardRef(({children:e,className:t,crossOffset:n,offset:r,placement:a="bottom start",anchorElement:o="indicator"},i)=>{let d=useRef(null),{cursorNode:s,coordinates:l}=useContext(p),x=Xe(s,o,()=>{c();}),f=jt(s,o),{overlayProps:k,updatePosition:c}=a$a({overlayRef:d,placement:a,targetRef:{get current(){return f}},crossOffset:n??x,offset:r});return useGranularEffect(()=>{c();},[l,n,r],[c]),l?jsx(a$4,{className:a$1(Se,t),ref:i,children:jsx("div",{ref:d,...k,children:e})}):null});ee.displayName="Floater";var tt=8,Xt=7,qt=7,te=z.memo(({children:e,scale:t,renderMagnifierContent:n})=>{let r=useRef(null),{coordinates:a,boundsRef:o,node:i}=useContext(p),d=useRef([]);a$6({ref:r}),useEffect(()=>{if(!r.current||n)return;let x=r.current.querySelectorAll("canvas"),f=[],k=r.current.ownerDocument;for(let c of x){let P=c.getContext("2d");if(!P)continue;let b=c.clientWidth,w=c.clientHeight,E=c.width,M=c.height,C=P.getImageData(0,0,E,M);f.push({el:c,width:E,height:M,image:C});let _=k.createElement("canvas");_.width=E,_.height=M;let g=_.getContext("2d");g&&g.drawImage(c,0,0),c.width=b*t,c.height=w*t,c.style.width=`${b}px`,c.style.height=`${w}px`,P.scale(t,t),P.drawImage(_,0,0,b,w);}return d.current=f,()=>{for(let{el:c,width:P,height:b,image:w}of d.current)c.width=P,c.height=b,c.getContext("2d")?.putImageData(w,0,0);}},[i,t,n]);let s=useMemo(()=>n?n({coordinates:a,boundingRect:o.current,children:e}):e?z.cloneElement(e,{key:"magnifier-content"}):null,[n,a,o,e]),l=useMemo(()=>!o.current||!a?null:{x:a.x/o.current.width,y:a.y/o.current.height},[o,a]);return l?jsx("div",{style:{left:0,transform:`scale(${t}) translate(calc(-${l.x*100}% + ${tt*Xt/(2*t)}px), calc(-${l.y*100}% + ${tt*qt/(2*t)}px))`},className:a$1(Le,"BaselineUI-PointPickerDisplay-Magnifier"),children:jsx("div",{style:Jt(i),ref:r,inert:"true",children:s})}):null});te.displayName="Magnifier";function Zt(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n],a=e.getPropertyValue(r);a&&t.push([r,a]);}for(let n of e)if(n.startsWith("--")){let r=e.getPropertyValue(n);r&&t.push([n,r]);}return Object.fromEntries(t)}function Jt(e){if(!e)return {};let n=b$1(e).getComputedStyle(e),r=e.getBoundingClientRect(),a={...Zt(n),position:"static",margin:"0px",left:"0px",top:"0px",transform:"none","-webkit-text-fill-color":"inherit","-webkit-text-stroke-color":"inherit",width:`${r.width}px`,height:`${r.height}px`,interactivity:"inert"};return Object.fromEntries(Object.entries(a).map(([o,i])=>o.startsWith("--")?[o,i]:o.startsWith("-")?[a$b(Ze(o)),i]:[Ze(o),i]))}var nn=7,rn=7,on={scale:2},sn={crossOffset:void 0,offset:void 0,placement:"bottom start",anchorElement:"indicator"},rt=z.forwardRef(({className:e,style:t,description:n,magnifier:r=true,"data-block-id":a,"data-block-class":o,floating:i=false,renderMagnifierContent:d},s)=>{let{coordinates:l,boundsRef:x,setDisplayId:f,isDisabled:k,children:c,cursorNode:P}=useContext(p),b=c$1(),w=useMemo(()=>b$2(r,on),[r]),E=useMemo(()=>typeof n=="function"?n({coordinates:l?{x:l.x,y:l.y}:null,boundingRect:x.current}):n,[n,l,x]),M=!k&&!!w&&l,C=useMemo(()=>b$2(i,sn),[i]);useEffect(()=>((!C||C&&P)&&f(b),()=>{f(void 0);}),[P,b,f,C]);let _=jsxs(a$c,{ref:C?void 0:s,className:a$1(Me,"BaselineUI-PointPicker-Display",e),backgroundColor:"background.primary.subtle",boxShadow:"medium",borderRadius:"sm",outlineWidth:1,outlineColor:"border.medium",outlineOffset:-1,outlineStyle:"solid",paddingY:"md",paddingLeft:"md",paddingRight:E?.length?"xl":"md",display:"flex",flexDirection:"row",gap:"lg",alignItems:"center",style:t,id:b,"data-block-id":a,"data-block-class":o,"data-variant":C?"floating":"auto","data-testid":"point-picker-display",children:[w?jsxs("div",{className:Ae,children:[M?jsx(te,{scale:w.scale,renderMagnifierContent:d,children:c}):null,Array.from({length:nn*rn}).map((g,R)=>R===24?jsx("div",{className:a$1(X,Ne)},R):jsx("div",{className:X},R))]}):null,E?.length?jsx(a$c,{display:"flex",gap:"lg",flexDirection:"column",children:E?.map(({label:g,icon:R},G)=>jsxs(a$c,{display:"flex",gap:"md",flexDirection:"row",color:"text.secondary",alignItems:"center",children:[jsx(R,{size:12,className:Re}),jsx(a$d,{type:"label",size:"sm",children:g})]},g+G))}):null]});return C?jsx(ee,{ref:s,...C,className:"BaselineUI-PointPicker-Floater",children:_}):_});rt.displayName="PointPickerDisplay";function oe(e){let t=new Blob([e],{type:"text/javascript"}),n=URL.createObjectURL(t),r=new Worker(n);return URL.revokeObjectURL(n),r}function ie(){return oe('var Y=Object.defineProperty;var Z=(n,t,e)=>t in n?Y(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var M=(n,t,e)=>Z(n,typeof t!="symbol"?t+"":t,e);var F=Symbol("Comlink.proxy"),J=Symbol("Comlink.endpoint"),Q=Symbol("Comlink.releaseProxy"),z=Symbol("Comlink.finalizer"),T=Symbol("Comlink.thrown"),B=n=>typeof n=="object"&&n!==null||typeof n=="function",q={canHandle:n=>B(n)&&n[F],serialize(n){let{port1:t,port2:e}=new MessageChannel;return U(n,t),[e,[e]]},deserialize(n){return n.start(),et(n)}},X={canHandle:n=>B(n)&&T in n,serialize({value:n}){let t;return n instanceof Error?t={isError:!0,value:{message:n.message,name:n.name,stack:n.stack}}:t={isError:!1,value:n},[t,[]]},deserialize(n){throw n.isError?Object.assign(new Error(n.value.message),n.value):n.value}},H=new Map([["proxy",q],["throw",X]]);function tt(n,t){for(let e of n)if(t===e||e==="*"||e instanceof RegExp&&e.test(t))return!0;return!1}function U(n,t=globalThis,e=["*"]){t.addEventListener("message",function r(s){if(!s||!s.data)return;if(!tt(e,s.origin)){console.warn(`Invalid origin \'${s.origin}\' for comlink proxy`);return}let{id:o,type:c,path:u}=Object.assign({path:[]},s.data),i=(s.data.argumentList||[]).map(m),a;try{let l=u.slice(0,-1).reduce((f,y)=>f[y],n),h=u.reduce((f,y)=>f[y],n);switch(c){case"GET":a=h;break;case"SET":l[u.slice(-1)[0]]=m(s.data.value),a=!0;break;case"APPLY":a=h.apply(l,i);break;case"CONSTRUCT":{let f=new h(...i);a=at(f)}break;case"ENDPOINT":{let{port1:f,port2:y}=new MessageChannel;U(n,y),a=ot(f,[f])}break;case"RELEASE":a=void 0;break;default:return}}catch(l){a={value:l,[T]:0}}Promise.resolve(a).catch(l=>({value:l,[T]:0})).then(l=>{let[h,f]=_(l);t.postMessage(Object.assign(Object.assign({},h),{id:o}),f),c==="RELEASE"&&(t.removeEventListener("message",r),V(t),z in n&&typeof n[z]=="function"&&n[z]())}).catch(l=>{let[h,f]=_({value:new TypeError("Unserializable return value"),[T]:0});t.postMessage(Object.assign(Object.assign({},h),{id:o}),f)})}),t.start&&t.start()}function nt(n){return n.constructor.name==="MessagePort"}function V(n){nt(n)&&n.close()}function et(n,t){let e=new Map;return n.addEventListener("message",function(s){let{data:o}=s;if(!o||!o.id)return;let c=e.get(o.id);if(c)try{c(o)}finally{e.delete(o.id)}}),I(n,e,[],t)}function S(n){if(n)throw new Error("Proxy has been released and is not useable")}function $(n){return A(n,new Map,{type:"RELEASE"}).then(()=>{V(n)})}var P=new WeakMap,R="FinalizationRegistry"in globalThis&&new FinalizationRegistry(n=>{let t=(P.get(n)||0)-1;P.set(n,t),t===0&&$(n)});function rt(n,t){let e=(P.get(t)||0)+1;P.set(t,e),R&&R.register(n,t,n)}function st(n){R&&R.unregister(n)}function I(n,t,e=[],r=function(){}){let s=!1,o=new Proxy(r,{get(c,u){if(S(s),u===Q)return()=>{st(o),$(n),t.clear(),s=!0};if(u==="then"){if(e.length===0)return{then:()=>o};let i=A(n,t,{type:"GET",path:e.map(a=>a.toString())}).then(m);return i.then.bind(i)}return I(n,t,[...e,u])},set(c,u,i){S(s);let[a,l]=_(i);return A(n,t,{type:"SET",path:[...e,u].map(h=>h.toString()),value:a},l).then(m)},apply(c,u,i){S(s);let a=e[e.length-1];if(a===J)return A(n,t,{type:"ENDPOINT"}).then(m);if(a==="bind")return I(n,t,e.slice(0,-1));let[l,h]=D(i);return A(n,t,{type:"APPLY",path:e.map(f=>f.toString()),argumentList:l},h).then(m)},construct(c,u){S(s);let[i,a]=D(u);return A(n,t,{type:"CONSTRUCT",path:e.map(l=>l.toString()),argumentList:i},a).then(m)}});return rt(o,n),o}function it(n){return Array.prototype.concat.apply([],n)}function D(n){let t=n.map(_);return[t.map(e=>e[0]),it(t.map(e=>e[1]))]}var W=new WeakMap;function ot(n,t){return W.set(n,t),n}function at(n){return Object.assign(n,{[F]:!0})}function _(n){for(let[t,e]of H)if(e.canHandle(n)){let[r,s]=e.serialize(n);return[{type:"HANDLER",name:t,value:r},s]}return[{type:"RAW",value:n},W.get(n)||[]]}function m(n){switch(n.type){case"HANDLER":return H.get(n.name).deserialize(n.value);case"RAW":return n.value}}function A(n,t,e,r){return new Promise(s=>{let o=ct();t.set(o,s),n.start&&n.start(),n.postMessage(Object.assign({id:o},e),r)})}function ct(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}var G=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],L=1,x=8,d=new Uint32Array(96),C=class n{static from(t){if(!t||t.byteLength===void 0||t.buffer)throw new Error("Data must be an instance of ArrayBuffer or SharedArrayBuffer.");let[e,r]=new Uint8Array(t,0,2);if(e!==219)throw new Error("Data does not appear to be in a KDBush format.");let s=r>>4;if(s!==L)throw new Error(`Got v${s} data when expected v${L}.`);let o=G[r&15];if(!o)throw new Error("Unrecognized array type.");let[c]=new Uint16Array(t,2,1),[u]=new Uint32Array(t,4,1);return new n(u,c,o,void 0,t)}constructor(t,e=64,r=Float64Array,s=ArrayBuffer,o){if(isNaN(t)||t<0)throw new Error(`Unexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+e,2),65535),this.ArrayType=r,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;let c=G.indexOf(this.ArrayType),u=t*2*this.ArrayType.BYTES_PER_ELEMENT,i=t*this.IndexArrayType.BYTES_PER_ELEMENT,a=(8-i%8)%8;if(c<0)throw new Error(`Unexpected typed array class: ${r}.`);if(o)this.data=o,this.ids=new this.IndexArrayType(o,x,t),this.coords=new r(o,x+i+a,t*2),this._pos=t*2,this._finished=!0;else{let l=this.data=new s(x+u+i+a);this.ids=new this.IndexArrayType(l,x,t),this.coords=new r(l,x+i+a,t*2),this._pos=0,this._finished=!1,new Uint8Array(l,0,2).set([219,(L<<4)+c]),new Uint16Array(l,2,1)[0]=e,new Uint32Array(l,4,1)[0]=t}}add(t,e){let r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=t,this.coords[this._pos++]=e,r}finish(){let t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return N(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,e,r,s){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:o,coords:c,nodeSize:u}=this;d[0]=0,d[1]=o.length-1,d[2]=0;let i=3,a=[];for(;i>0;){let l=d[--i],h=d[--i],f=d[--i];if(h-f<=u){for(let g=f;g<=h;g++){let E=c[2*g],k=c[2*g+1];E>=t&&E<=r&&k>=e&&k<=s&&a.push(o[g])}continue}let y=f+h>>1,w=c[2*y],p=c[2*y+1];w>=t&&w<=r&&p>=e&&p<=s&&a.push(o[y]),(l===0?t<=w:e<=p)&&(d[i++]=f,d[i++]=y-1,d[i++]=1-l),(l===0?r>=w:s>=p)&&(d[i++]=y+1,d[i++]=h,d[i++]=1-l)}return a}within(t,e,r){let s=[];return this.withinInto(t,e,r,s),s}withinInto(t,e,r,s){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:o,coords:c,nodeSize:u}=this;d[0]=0,d[1]=o.length-1,d[2]=0;let i=3,a=0,l=r*r;for(;i>0;){let h=d[--i],f=d[--i],y=d[--i];if(f-y<=u){for(let E=y;E<=f;E++)j(c[2*E],c[2*E+1],t,e)<=l&&(s[a++]=o[E]);continue}let w=y+f>>1,p=c[2*w],g=c[2*w+1];j(p,g,t,e)<=l&&(s[a++]=o[w]),(h===0?t-r<=p:e-r<=g)&&(d[i++]=y,d[i++]=w-1,d[i++]=1-h),(h===0?t+r>=p:e+r>=g)&&(d[i++]=w+1,d[i++]=f,d[i++]=1-h)}return a}};function N(n,t,e,r,s,o){if(s-r<=e)return;let c=r+s>>1;K(n,t,c,r,s,o),N(n,t,e,r,c-1,1-o),N(n,t,e,c+1,s,1-o)}function K(n,t,e,r,s,o){for(;s>r;){if(s-r>600){let a=s-r+1,l=e-r+1,h=Math.log(a),f=.5*Math.exp(2*h/3),y=.5*Math.sqrt(h*f*(a-f)/a)*(l-a/2<0?-1:1),w=Math.max(r,Math.floor(e-l*f/a+y)),p=Math.min(s,Math.floor(e+(a-l)*f/a+y));K(n,t,e,w,p,o)}let c=t[2*e+o],u=r,i=s;for(b(n,t,r,e),t[2*s+o]>c&&b(n,t,r,s);u<i;){for(b(n,t,u,i),u++,i--;t[2*u+o]<c;)u++;for(;t[2*i+o]>c;)i--}t[2*r+o]===c?b(n,t,r,i):(i++,b(n,t,i,s)),i<=e&&(r=i+1),e<=i&&(s=i-1)}}function b(n,t,e,r){O(n,e,r),O(t,2*e,2*r),O(t,2*e+1,2*r+1)}function O(n,t,e){let r=n[t];n[t]=n[e],n[e]=r}function j(n,t,e,r){let s=n-e,o=t-r;return s*s+o*o}var v=class{constructor(){M(this,"index",null);M(this,"xCoords",null);M(this,"yCoords",null)}buildIndex(t){this.clear(),this.xCoords=new Float64Array(t.length),this.yCoords=new Float64Array(t.length);for(let[r,s]of t.entries())this.xCoords[r]=s.x,this.yCoords[r]=s.y;let e=new C(t.length);for(let r=0;r<t.length;r++)e.add(this.xCoords[r],this.yCoords[r]);return e.finish(),this.index=e,e.data}clear(){this.index=null,this.xCoords=null,this.yCoords=null}findNearestPoint(t,e,r){if(!this.index||!this.xCoords||!this.yCoords)return null;let s=this.index.within(t,e,r);if(s.length===0)return null;let o=s[0],c=1/0;for(let u of s){let i=t-this.xCoords[u],a=e-this.yCoords[u],l=i*i+a*a;l<c&&(c=l,o=u)}return{x:this.xCoords[o],y:this.yCoords[o]}}findPointsInRadius(t,e,r){if(!this.index||!this.xCoords||!this.yCoords)return[];let s=this.index.within(t,e,r),o=Array.from({length:s.length});for(let[c,u]of s.entries())o[c]={x:this.xCoords[u],y:this.yCoords[u]};return o}};U(new v);\n/*! Bundled license information:\n\ncomlink/dist/esm/comlink.mjs:\n (**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n *)\n*/\n')}function ln({snapPoints:e,snapRadius:t=50}){let n=useRef(null),r=useRef(null),a=useMemo(()=>{let s=new ie;return r.current=s,st.wrap(s)},[]);useEffect(()=>()=>{r.current&&(r.current.terminate(),r.current=null);},[]);let o=useCallback(async()=>{e&&(n.current=await a.buildIndex(e));},[e,a]);useEffect(()=>{e&&e.length>0&&o();},[e,o]);let i=useCallback(async s=>e?(n.current||await o(),a.findNearestPoint(s.x,s.y,t)):null,[e,t,o,a]),d=useCallback(async s=>e?(n.current||await o(),a.findPointsInRadius(s.x,s.y,t)):[],[e,t,o,a]);return {findNearestPoint:i,findPointsInRadius:d}}
|
|
11
|
-
export{
|
|
10
|
+
var bt={node:null,setNode:()=>{},coordinates:null,setCoordinates:()=>{},displayId:void 0,setDisplayId:()=>{},boundsRef:{current:null},isDisabled:false,cursorNode:null,setCursorNode:()=>{},children:null,setChildren:()=>{}},p=z.createContext(bt),Ee=z.memo(({children:e,isDisabled:t=false})=>{let[n,r]=z.useState(null),[a,o]=z.useState(null),[i,d]=z.useState(null),l=z.useRef(null),[s,x]=z.useState(null),[f,k]=z.useState(),c=z.useMemo(()=>({node:n,setNode:r,coordinates:s,setCoordinates:x,displayId:f,setDisplayId:k,boundsRef:l,isDisabled:t,cursorNode:a,setCursorNode:o,children:i,setChildren:d}),[n,s,f,x,r,l,t,a,o,i,d]);return jsx(p.Provider,{value:c,children:e})});Ee.displayName="PointPicker";var _e="m0xg2me";var ze="m0xg2md _1yep5z6iw _1yep5z6ix _1yep5z6iy _1yep5z6mh _1yep5z6mg _1yep5z6ho",Re="m0xg2mj",Ie="_1yep5z6fa",De="m0xg2mk m0xg2mj",Me=a({defaultClassName:"m0xg2m0",variantClassNames:{isDisabled:{true:"m0xg2m1",false:"m0xg2m2"},isIndicatorVisible:{true:"m0xg2m3",false:"m0xg2m4"}},defaultVariants:{},compoundVariants:[[{isDisabled:false,isIndicatorVisible:true},"m0xg2m5"],[{isDisabled:false,isIndicatorVisible:false},"m0xg2m6"]]}),Ne="m0xg2m8",Ae="m0xg2mb",q="m0xg2ma _1yep5z6hp _1yep5z6mf",Te="m0xg2m9 _1yep5z6je _1yep5z6jf _1yep5z6jg _1yep5z6hg _1yep5z6mf _1yep5z6it _1yep5z6iu _1yep5z6iv",Le="m0xg2m7",Se="m0xg2mc",Oe="m0xg2mf";var W=a$1(ze,"BaselineUI-PointPicker-GridLine"),Et=({coordinates:e})=>jsxs(Fragment,{children:[jsx("div",{className:W,"data-grid-line-type":"vertical",style:{height:e.y-5,transform:`translate(${e.x}px, 0) translate(-1px, 0) scaleX(0.5)`}}),jsx("div",{className:W,"data-grid-line-type":"vertical",style:{height:`calc(100% - ${e.y+4}px)`,transform:`translate(${e.x}px, ${e.y+5}px) translate(-1px, 0) scaleX(0.5)`}})]}),_t=({coordinates:e})=>jsxs(Fragment,{children:[jsx("div",{className:W,"data-grid-line-type":"horizontal",style:{width:e.x-5,transform:`translate(0, ${e.y}px) translate(0, -1px) scaleY(0.5)`}}),jsx("div",{className:W,"data-grid-line-type":"horizontal",style:{width:`calc(100% - ${e.x+4}px)`,transform:`translate(${e.x+5}px, ${e.y}px) translate(0, -1px) scaleY(0.5)`}})]}),He=({gridLines:e})=>{let{isDisabled:t,boundsRef:n,coordinates:r}=useContext(p),a=useMemo(()=>{let o=typeof e=="function"?e({coordinates:r,boundingRect:n.current}):e;return typeof o=="boolean"?o?r:void 0:o?.coordinates},[e,r,n]);return a&&!t?jsxs(Fragment,{children:[jsx(Et,{coordinates:a}),jsx(_t,{coordinates:a})]}):null};function Ue({coordinates:e,setCoordinates:t,boundsRef:n,onKeyDown:r,onKeyUp:a}){let{isDisabled:o}=useContext(p);return a$f({isDisabled:o,onKeyDown:i=>{r?.(i);let d=i.shiftKey?10:1,l=n.current;if(!l||!e)return;let s;switch(i.key){case "ArrowRight":{i.preventDefault(),s={x:a$e(e.x+d,0,l.width),y:a$e(e.y,0,l.height)};break}case "ArrowLeft":{i.preventDefault(),s={x:a$e(e.x-d,0,l.width),y:a$e(e.y,0,l.height)};break}case "ArrowDown":{i.preventDefault(),s={x:a$e(e.x,0,l.width),y:a$e(e.y+d,0,l.height)};break}case "ArrowUp":{i.preventDefault(),s={x:a$e(e.x,0,l.width),y:a$e(e.y-d,0,l.height)};break}case "Home":{i.preventDefault(),s={x:0,y:a$e(e.y,0,l.height)};break}case "End":{i.preventDefault(),s={x:l.width,y:a$e(e.y,0,l.height)};break}case "PageUp":{i.preventDefault(),s={x:a$e(e.x,0,l.width),y:0};break}case "PageDown":{i.preventDefault(),s={x:a$e(e.x,0,l.width),y:l.height};break}default:{i.continuePropagation();return}}s&&t(s);},onKeyUp:a})}function Ve(){let{node:e,coordinates:t}=useContext(p);return useMemo(()=>{if(!e||!t)return {x:0,y:0};let{left:n,top:r}=e.getBoundingClientRect();return {x:t.x+n,y:t.y+r}},[t,e])}var{color:Fe}=themeVars,Ge=z.forwardRef(({modality:e},t)=>e==="keyboard"?jsxs("svg",{width:92,height:92,viewBox:"0 0 92 92",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,className:Re,children:[jsxs("g",{filter:"url(#filter0_d_11407_457970)",children:[jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49 43V4h-6v39H4v6h39v39h6V49h39v-6H49zm38 5H48v39h-4V48H5v-4h39V5h4v39h39v4zm-5 28v6h-6v6h12V76h-6zm5 11H77v-4h6v-6h4v10zm-77-5v-6H4v12h12v-6h-6zm5 5H5V77h4v6h6v4zM76 4v6h6v6h6V4H76zm11 11h-4V9h-6V5h10v10zM4 4v12h6v-6h6V4H4zm11 5H9v6H5V5h10v4z",fill:Fe.background.positive.subtle}),jsx("path",{d:"M48 44v4h39v-4H48zm-4 4v39h4V48h-4zM5 44v4h39v-4H5zM44 5v39h4V5h-4zm39 72v6h-6v4h10V77h-4zM9 83v-6H5v10h10v-4H9zM77 5v4h6v6h4V5H77zM5 5v10h4V9h6V5H5z",fill:Fe.background.positive.interactive.enabled})]}),jsx("defs",{children:jsxs("filter",{id:"filter0_d_11407_457970",x:0,y:0,width:92,height:92,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[jsx("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),jsx("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),jsx("feOffset",{}),jsx("feGaussianBlur",{stdDeviation:2}),jsx("feComposite",{in2:"hardAlpha",operator:"out"}),jsx("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0"}),jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_11407_457970"}),jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_11407_457970",result:"shape"})]})})]}):jsx(PlusIcon,{className:De,ref:t}));Ge.displayName="PointPickerIndicatorIcon";var Tt=({trailingElement:e})=>{let{cursorNode:t}=useContext(p),[n,r]=useState({width:0,height:0});return useEffect(()=>{if(!t)return;let a=t.getBoundingClientRect();r(a);let o=new ResizeObserver(i=>{r({width:i[0].contentRect.width,height:i[0].contentRect.height});});return o.observe(t),()=>{o.disconnect();}},[t]),e?jsx(a$c,{position:"absolute",style:{left:0,top:0,zIndex:0,transform:`translate(${n.width/2}px, ${n.height/2}px)`},className:"BaselineUI-PointPickerContent-TrailingElement",children:e}):null},Q=z.forwardRef(({renderTrailingElement:e,renderCursor:t},n)=>{let{coordinates:r,isDisabled:a,node:o}=useContext(p),i=a$2({ownerDocument:a$3(o)}),d=!!(r&&!a),l=useMemo(()=>e?.(),[e]),s=Ve(),x=useMemo(()=>{if(!r)return null;let f=t?.({coordinates:r,modality:i});return f===void 0?jsx(Ge,{modality:i}):f},[t,r,i]);return d?jsxs(a$4,{style:{left:s.x,top:s.y},className:a$1(Le,"BaselineUI-PointPickerContent-Cursor"),ref:n,children:[x,l?jsx(Tt,{trailingElement:l}):null]}):null});Q.displayName="PointPickerIndicator";var Xe=z.forwardRef(({children:e,className:t,style:n,"data-block-id":r,"data-block-class":a,onFocusChange:o,onBlur:i,onFocus:d$1,onKeyDown:l,onKeyUp:s,gridLines:x=true,elementHandle:f,onMove:k,onPress:c$1,onPressStart:P,onPressEnd:b$1,renderTrailingElement:w,renderCursor:E},M)=>{let{setNode:C,node:_,coordinates:g,setCoordinates:R,displayId:j,boundsRef:I,isDisabled:h,setCursorNode:at,setChildren:Y}=useContext(p),S=useRef(null),le=useRef(null),ce=a$2({ownerDocument:a$3(_)}),N=useCallback(u=>{R(u??null),k?.({coordinates:u,boundingRect:I.current});},[R,k,I]);useEffect(()=>{if(!h)return Y(e),()=>{Y(null);}},[e,h,Y]),useEffect(()=>{let u=S.current;if(!u||h)return;let ue=()=>{let D=u.getBoundingClientRect();I.current=D;},H=D=>{let O=I.current;if(!O)return;let gt="clientX"in D?D.clientX:D.touches[0].clientX,vt="clientY"in D?D.clientY:D.touches[0].clientY,Pt={x:a$e(gt-O.left,0,O.width),y:a$e(vt-O.top,0,O.height)};N(Pt);},de=()=>{N(null);};return u.addEventListener("mousemove",H),u.addEventListener("touchmove",H),u.addEventListener("mouseenter",ue),u.addEventListener("mouseleave",de),()=>{u.removeEventListener("mousemove",H),u.removeEventListener("touchmove",H),u.removeEventListener("mouseenter",ue),u.removeEventListener("mouseleave",de);}},[I,h,N]);let{pressProps:lt}=d({isDisabled:h,onPress:u=>{u.pointerType==="keyboard"?g&&c$1?.({...u,x:g.x,y:g.y}):c$1?.(u);},onPressStart:P,onPressEnd:b$1}),{focusProps:ct,isFocusVisible:ut,isFocused:dt}=a$5();a$6({ref:le,isDisabled:h}),useImperativeHandle(f,()=>({focus:()=>{h||S.current?.focus();}}));let{focusProps:mt}=a$7({isDisabled:h,onFocusChange:o,onFocus:d$1,onBlur:i});function pt(){ce==="keyboard"&&setTimeout(()=>{let u=S.current?.getBoundingClientRect();u&&(I.current=u,N({x:a$e(u.width/2,0,u.width),y:a$e(u.height/2,0,u.height)}));},0);}function ft(){N(null);}let{keyboardProps:ht}=Ue({coordinates:g,setCoordinates:N,boundsRef:I,onKeyDown:l,onKeyUp:s});a$8({isDisabled:h,ref:S,onInteractOutside:()=>{N(null);}});let yt=!!(g&&!h),xt=a$9({"data-focus-visible":ut,"data-focused":dt,"data-disabled":h,"data-block-id":r,"data-block-class":a,"data-active":g&&!h,"data-modality":ce});return jsxs(Fragment,{children:[jsx(Q,{renderTrailingElement:w,renderCursor:E,ref:at}),jsxs("div",{...c(ct,mt,{onFocus:pt,onBlur:ft},h?{}:c(ht,lt)),ref:b(M,S,C),className:a$1(Me({isDisabled:!!h,isIndicatorVisible:!!yt}),"BaselineUI-PointPicker-Content",t),tabIndex:h?void 0:0,style:n,"aria-controls":j,"data-testid":"point-picker-content",...xt,children:[jsx(He,{gridLines:x}),jsx("div",{className:_e,ref:le,children:e})]})]})});Xe.displayName="PointPickerContent";function qe(e,t,n){let[r,a]=useState(0),o=i=>{a(i),n();};return useGranularEffect(()=>{if(!e||t==="trailing")return;let i=new ResizeObserver(d=>{o(d[0].contentRect.width);});return o(e.getBoundingClientRect().width),i.observe(e),()=>{i.disconnect();}},[e,t],[n]),r}function jt(e,t){return t==="indicator"?e:e?.querySelector(".BaselineUI-PointPickerContent-TrailingElement")??null}var te=z.forwardRef(({children:e,className:t,crossOffset:n,offset:r,placement:a="bottom start",anchorElement:o="indicator"},i)=>{let d=useRef(null),{cursorNode:l,coordinates:s}=useContext(p),x=qe(l,o,()=>{c();}),f=jt(l,o),{overlayProps:k,updatePosition:c}=a$a({overlayRef:d,placement:a,targetRef:{get current(){return f}},crossOffset:n??x,offset:r});return useGranularEffect(()=>{c();},[s,n,r],[c]),s?jsx(a$4,{className:a$1(Oe,t),ref:i,children:jsx("div",{ref:d,...k,children:e})}):null});te.displayName="Floater";var nt=8,Xt=7,qt=7,ne=z.memo(({children:e,scale:t,renderMagnifierContent:n})=>{let r=useRef(null),{coordinates:a,boundsRef:o,node:i}=useContext(p),d=useRef([]);a$6({ref:r}),useEffect(()=>{if(!r.current||n)return;let x=r.current.querySelectorAll("canvas"),f=[],k=r.current.ownerDocument;for(let c of x){let P=c.getContext("2d");if(!P)continue;let b=c.clientWidth,w=c.clientHeight,E=c.width,M=c.height,C=P.getImageData(0,0,E,M);f.push({el:c,width:E,height:M,image:C});let _=k.createElement("canvas");_.width=E,_.height=M;let g=_.getContext("2d");g&&g.drawImage(c,0,0),c.width=b*t,c.height=w*t,c.style.width=`${b}px`,c.style.height=`${w}px`,P.scale(t,t),P.drawImage(_,0,0,b,w);}return d.current=f,()=>{for(let{el:c,width:P,height:b,image:w}of d.current)c.width=P,c.height=b,c.getContext("2d")?.putImageData(w,0,0);}},[i,t,n]);let l=useMemo(()=>n?n({coordinates:a,boundingRect:o.current,children:e}):e?z.cloneElement(e,{key:"magnifier-content"}):null,[n,a,o,e]),s=useMemo(()=>!o.current||!a?null:{x:a.x/o.current.width,y:a.y/o.current.height},[o,a]);return s?jsx("div",{style:{left:0,transform:`scale(${t}) translate(calc(-${s.x*100}% + ${nt*Xt/(2*t)}px), calc(-${s.y*100}% + ${nt*qt/(2*t)}px))`},className:a$1(Se,"BaselineUI-PointPickerDisplay-Magnifier"),children:jsx("div",{style:Jt(i),ref:r,inert:"true",children:l})}):null});ne.displayName="Magnifier";function Zt(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n],a=e.getPropertyValue(r);a&&t.push([r,a]);}for(let n of e)if(n.startsWith("--")){let r=e.getPropertyValue(n);r&&t.push([n,r]);}return Object.fromEntries(t)}function Jt(e){if(!e)return {};let n=b$1(e).getComputedStyle(e),r=e.getBoundingClientRect(),a={...Zt(n),position:"static",margin:"0px",left:"0px",top:"0px",transform:"none","-webkit-text-fill-color":"inherit","-webkit-text-stroke-color":"inherit",width:`${r.width}px`,height:`${r.height}px`,interactivity:"inert"};return Object.fromEntries(Object.entries(a).map(([o,i])=>o.startsWith("--")?[o,i]:o.startsWith("-")?[a$b(Je(o)),i]:[Je(o),i]))}var nn=7,rn=7,on={scale:2},sn={crossOffset:void 0,offset:void 0,placement:"bottom start",anchorElement:"indicator"},it=z.forwardRef(({className:e,style:t,description:n,magnifier:r=true,"data-block-id":a,"data-block-class":o,floating:i=false,renderMagnifierContent:d},l)=>{let{coordinates:s,boundsRef:x,setDisplayId:f,isDisabled:k,children:c,cursorNode:P}=useContext(p),b=c$1(),w=useMemo(()=>b$2(r,on),[r]),E=useMemo(()=>typeof n=="function"?n({coordinates:s?{x:s.x,y:s.y}:null,boundingRect:x.current}):n,[n,s,x]),M=!k&&!!w&&s,C=useMemo(()=>b$2(i,sn),[i]);useEffect(()=>((!C||C&&P)&&f(b),()=>{f(void 0);}),[P,b,f,C]);let _=jsxs(a$c,{ref:C?void 0:l,className:a$1(Ne,"BaselineUI-PointPicker-Display",e),backgroundColor:"background.primary.subtle",boxShadow:"medium",borderRadius:"sm",outlineWidth:1,outlineColor:"border.medium",outlineOffset:-1,outlineStyle:"solid",paddingY:"md",paddingLeft:"md",paddingRight:E?.length?"xl":"md",display:"flex",flexDirection:"row",gap:"lg",alignItems:"center",style:t,id:b,"data-block-id":a,"data-block-class":o,"data-variant":C?"floating":"auto","data-testid":"point-picker-display",children:[w?jsxs("div",{className:Te,children:[M?jsx(ne,{scale:w.scale,renderMagnifierContent:d,children:c}):null,Array.from({length:nn*rn}).map((g,R)=>R===24?jsx("div",{className:a$1(q,Ae)},R):jsx("div",{className:q},R))]}):null,E?.length?jsx(a$c,{display:"flex",gap:"lg",flexDirection:"column",children:E?.map(({label:g,icon:R},j)=>jsxs(a$c,{display:"flex",gap:"md",flexDirection:"row",color:"text.secondary",alignItems:"center",children:[jsx(R,{size:12,className:Ie}),jsx(a$d,{type:"label",size:"sm",children:g})]},g+j))}):null]});return C?jsx(te,{ref:l,...C,className:"BaselineUI-PointPicker-Floater",children:_}):_});it.displayName="PointPickerDisplay";function oe(e){let t=new Blob([e],{type:"text/javascript"}),n=URL.createObjectURL(t),r=new Worker(n);return URL.revokeObjectURL(n),r}function se(){return oe('var Y=Object.defineProperty;var Z=(n,t,e)=>t in n?Y(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var M=(n,t,e)=>Z(n,typeof t!="symbol"?t+"":t,e);var F=Symbol("Comlink.proxy"),J=Symbol("Comlink.endpoint"),Q=Symbol("Comlink.releaseProxy"),z=Symbol("Comlink.finalizer"),T=Symbol("Comlink.thrown"),B=n=>typeof n=="object"&&n!==null||typeof n=="function",q={canHandle:n=>B(n)&&n[F],serialize(n){let{port1:t,port2:e}=new MessageChannel;return U(n,t),[e,[e]]},deserialize(n){return n.start(),et(n)}},X={canHandle:n=>B(n)&&T in n,serialize({value:n}){let t;return n instanceof Error?t={isError:!0,value:{message:n.message,name:n.name,stack:n.stack}}:t={isError:!1,value:n},[t,[]]},deserialize(n){throw n.isError?Object.assign(new Error(n.value.message),n.value):n.value}},H=new Map([["proxy",q],["throw",X]]);function tt(n,t){for(let e of n)if(t===e||e==="*"||e instanceof RegExp&&e.test(t))return!0;return!1}function U(n,t=globalThis,e=["*"]){t.addEventListener("message",function r(s){if(!s||!s.data)return;if(!tt(e,s.origin)){console.warn(`Invalid origin \'${s.origin}\' for comlink proxy`);return}let{id:o,type:c,path:u}=Object.assign({path:[]},s.data),i=(s.data.argumentList||[]).map(m),a;try{let l=u.slice(0,-1).reduce((f,y)=>f[y],n),h=u.reduce((f,y)=>f[y],n);switch(c){case"GET":a=h;break;case"SET":l[u.slice(-1)[0]]=m(s.data.value),a=!0;break;case"APPLY":a=h.apply(l,i);break;case"CONSTRUCT":{let f=new h(...i);a=at(f)}break;case"ENDPOINT":{let{port1:f,port2:y}=new MessageChannel;U(n,y),a=ot(f,[f])}break;case"RELEASE":a=void 0;break;default:return}}catch(l){a={value:l,[T]:0}}Promise.resolve(a).catch(l=>({value:l,[T]:0})).then(l=>{let[h,f]=_(l);t.postMessage(Object.assign(Object.assign({},h),{id:o}),f),c==="RELEASE"&&(t.removeEventListener("message",r),V(t),z in n&&typeof n[z]=="function"&&n[z]())}).catch(l=>{let[h,f]=_({value:new TypeError("Unserializable return value"),[T]:0});t.postMessage(Object.assign(Object.assign({},h),{id:o}),f)})}),t.start&&t.start()}function nt(n){return n.constructor.name==="MessagePort"}function V(n){nt(n)&&n.close()}function et(n,t){let e=new Map;return n.addEventListener("message",function(s){let{data:o}=s;if(!o||!o.id)return;let c=e.get(o.id);if(c)try{c(o)}finally{e.delete(o.id)}}),I(n,e,[],t)}function S(n){if(n)throw new Error("Proxy has been released and is not useable")}function $(n){return A(n,new Map,{type:"RELEASE"}).then(()=>{V(n)})}var P=new WeakMap,R="FinalizationRegistry"in globalThis&&new FinalizationRegistry(n=>{let t=(P.get(n)||0)-1;P.set(n,t),t===0&&$(n)});function rt(n,t){let e=(P.get(t)||0)+1;P.set(t,e),R&&R.register(n,t,n)}function st(n){R&&R.unregister(n)}function I(n,t,e=[],r=function(){}){let s=!1,o=new Proxy(r,{get(c,u){if(S(s),u===Q)return()=>{st(o),$(n),t.clear(),s=!0};if(u==="then"){if(e.length===0)return{then:()=>o};let i=A(n,t,{type:"GET",path:e.map(a=>a.toString())}).then(m);return i.then.bind(i)}return I(n,t,[...e,u])},set(c,u,i){S(s);let[a,l]=_(i);return A(n,t,{type:"SET",path:[...e,u].map(h=>h.toString()),value:a},l).then(m)},apply(c,u,i){S(s);let a=e[e.length-1];if(a===J)return A(n,t,{type:"ENDPOINT"}).then(m);if(a==="bind")return I(n,t,e.slice(0,-1));let[l,h]=D(i);return A(n,t,{type:"APPLY",path:e.map(f=>f.toString()),argumentList:l},h).then(m)},construct(c,u){S(s);let[i,a]=D(u);return A(n,t,{type:"CONSTRUCT",path:e.map(l=>l.toString()),argumentList:i},a).then(m)}});return rt(o,n),o}function it(n){return Array.prototype.concat.apply([],n)}function D(n){let t=n.map(_);return[t.map(e=>e[0]),it(t.map(e=>e[1]))]}var W=new WeakMap;function ot(n,t){return W.set(n,t),n}function at(n){return Object.assign(n,{[F]:!0})}function _(n){for(let[t,e]of H)if(e.canHandle(n)){let[r,s]=e.serialize(n);return[{type:"HANDLER",name:t,value:r},s]}return[{type:"RAW",value:n},W.get(n)||[]]}function m(n){switch(n.type){case"HANDLER":return H.get(n.name).deserialize(n.value);case"RAW":return n.value}}function A(n,t,e,r){return new Promise(s=>{let o=ct();t.set(o,s),n.start&&n.start(),n.postMessage(Object.assign({id:o},e),r)})}function ct(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}var G=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],L=1,x=8,d=new Uint32Array(96),C=class n{static from(t){if(!t||t.byteLength===void 0||t.buffer)throw new Error("Data must be an instance of ArrayBuffer or SharedArrayBuffer.");let[e,r]=new Uint8Array(t,0,2);if(e!==219)throw new Error("Data does not appear to be in a KDBush format.");let s=r>>4;if(s!==L)throw new Error(`Got v${s} data when expected v${L}.`);let o=G[r&15];if(!o)throw new Error("Unrecognized array type.");let[c]=new Uint16Array(t,2,1),[u]=new Uint32Array(t,4,1);return new n(u,c,o,void 0,t)}constructor(t,e=64,r=Float64Array,s=ArrayBuffer,o){if(isNaN(t)||t<0)throw new Error(`Unexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+e,2),65535),this.ArrayType=r,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;let c=G.indexOf(this.ArrayType),u=t*2*this.ArrayType.BYTES_PER_ELEMENT,i=t*this.IndexArrayType.BYTES_PER_ELEMENT,a=(8-i%8)%8;if(c<0)throw new Error(`Unexpected typed array class: ${r}.`);if(o)this.data=o,this.ids=new this.IndexArrayType(o,x,t),this.coords=new r(o,x+i+a,t*2),this._pos=t*2,this._finished=!0;else{let l=this.data=new s(x+u+i+a);this.ids=new this.IndexArrayType(l,x,t),this.coords=new r(l,x+i+a,t*2),this._pos=0,this._finished=!1,new Uint8Array(l,0,2).set([219,(L<<4)+c]),new Uint16Array(l,2,1)[0]=e,new Uint32Array(l,4,1)[0]=t}}add(t,e){let r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=t,this.coords[this._pos++]=e,r}finish(){let t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return N(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,e,r,s){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:o,coords:c,nodeSize:u}=this;d[0]=0,d[1]=o.length-1,d[2]=0;let i=3,a=[];for(;i>0;){let l=d[--i],h=d[--i],f=d[--i];if(h-f<=u){for(let g=f;g<=h;g++){let E=c[2*g],k=c[2*g+1];E>=t&&E<=r&&k>=e&&k<=s&&a.push(o[g])}continue}let y=f+h>>1,w=c[2*y],p=c[2*y+1];w>=t&&w<=r&&p>=e&&p<=s&&a.push(o[y]),(l===0?t<=w:e<=p)&&(d[i++]=f,d[i++]=y-1,d[i++]=1-l),(l===0?r>=w:s>=p)&&(d[i++]=y+1,d[i++]=h,d[i++]=1-l)}return a}within(t,e,r){let s=[];return this.withinInto(t,e,r,s),s}withinInto(t,e,r,s){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:o,coords:c,nodeSize:u}=this;d[0]=0,d[1]=o.length-1,d[2]=0;let i=3,a=0,l=r*r;for(;i>0;){let h=d[--i],f=d[--i],y=d[--i];if(f-y<=u){for(let E=y;E<=f;E++)j(c[2*E],c[2*E+1],t,e)<=l&&(s[a++]=o[E]);continue}let w=y+f>>1,p=c[2*w],g=c[2*w+1];j(p,g,t,e)<=l&&(s[a++]=o[w]),(h===0?t-r<=p:e-r<=g)&&(d[i++]=y,d[i++]=w-1,d[i++]=1-h),(h===0?t+r>=p:e+r>=g)&&(d[i++]=w+1,d[i++]=f,d[i++]=1-h)}return a}};function N(n,t,e,r,s,o){if(s-r<=e)return;let c=r+s>>1;K(n,t,c,r,s,o),N(n,t,e,r,c-1,1-o),N(n,t,e,c+1,s,1-o)}function K(n,t,e,r,s,o){for(;s>r;){if(s-r>600){let a=s-r+1,l=e-r+1,h=Math.log(a),f=.5*Math.exp(2*h/3),y=.5*Math.sqrt(h*f*(a-f)/a)*(l-a/2<0?-1:1),w=Math.max(r,Math.floor(e-l*f/a+y)),p=Math.min(s,Math.floor(e+(a-l)*f/a+y));K(n,t,e,w,p,o)}let c=t[2*e+o],u=r,i=s;for(b(n,t,r,e),t[2*s+o]>c&&b(n,t,r,s);u<i;){for(b(n,t,u,i),u++,i--;t[2*u+o]<c;)u++;for(;t[2*i+o]>c;)i--}t[2*r+o]===c?b(n,t,r,i):(i++,b(n,t,i,s)),i<=e&&(r=i+1),e<=i&&(s=i-1)}}function b(n,t,e,r){O(n,e,r),O(t,2*e,2*r),O(t,2*e+1,2*r+1)}function O(n,t,e){let r=n[t];n[t]=n[e],n[e]=r}function j(n,t,e,r){let s=n-e,o=t-r;return s*s+o*o}var v=class{constructor(){M(this,"index",null);M(this,"xCoords",null);M(this,"yCoords",null)}buildIndex(t){this.clear(),this.xCoords=new Float64Array(t.length),this.yCoords=new Float64Array(t.length);for(let[r,s]of t.entries())this.xCoords[r]=s.x,this.yCoords[r]=s.y;let e=new C(t.length);for(let r=0;r<t.length;r++)e.add(this.xCoords[r],this.yCoords[r]);return e.finish(),this.index=e,e.data}clear(){this.index=null,this.xCoords=null,this.yCoords=null}findNearestPoint(t,e,r){if(!this.index||!this.xCoords||!this.yCoords)return null;let s=this.index.within(t,e,r);if(s.length===0)return null;let o=s[0],c=1/0;for(let u of s){let i=t-this.xCoords[u],a=e-this.yCoords[u],l=i*i+a*a;l<c&&(c=l,o=u)}return{x:this.xCoords[o],y:this.yCoords[o]}}findPointsInRadius(t,e,r){if(!this.index||!this.xCoords||!this.yCoords)return[];let s=this.index.within(t,e,r),o=Array.from({length:s.length});for(let[c,u]of s.entries())o[c]={x:this.xCoords[u],y:this.yCoords[u]};return o}};U(new v);\n/*! Bundled license information:\n\ncomlink/dist/esm/comlink.mjs:\n (**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n *)\n*/\n')}function an({snapPoints:e,snapRadius:t=50}){let n=useRef(null),r=useRef(null),a=useRef(false),o=useCallback(()=>{if(a.current)return null;if(!r.current){let s=new se;r.current={worker:s,api:st.wrap(s)};}return r.current.api},[]);useEffect(()=>(a.current=false,o(),()=>{a.current=true,r.current?.worker.terminate(),r.current=null,n.current=null;}),[o]);let i=useCallback(async()=>{let s=o();!e||!s||(n.current=await s.buildIndex(e));},[e,o]);useEffect(()=>{e&&e.length>0&&i();},[e,i]);let d=useCallback(async s=>e?(n.current||await i(),await o()?.findNearestPoint(s.x,s.y,t)??null):null,[e,t,i,o]),l=useCallback(async s=>e?(n.current||await i(),await o()?.findPointsInRadius(s.x,s.y,t)??[]):[],[e,t,i,o]);return {findNearestPoint:d,findPointsInRadius:l}}
|
|
11
|
+
export{Ee as a,Xe as b,it as c,an as d};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {b as b$1,d as d$1,e,c}from'./chunk-
|
|
1
|
+
import {b as b$1,d as d$1,e,c}from'./chunk-E3QDPL77.mjs';import {a as a$1}from'./chunk-VOSSQAHC.mjs';import {b as b$2}from'./chunk-SZTFMBPY.mjs';import {a as a$2}from'./chunk-O7XK2WIX.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {b as b$3}from'./chunk-4ZJMZB5B.mjs';import {a as a$4}from'./chunk-X3AXUU3H.mjs';import {a}from'./chunk-K6X2BHPP.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import N,{useMemo,useCallback}from'react';import {Time,toZoned,toTime,GregorianCalendar,toCalendarDateTime,today,getLocalTimeZone}from'@internationalized/date';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}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-7MQBBSZ2.mjs';import {b}from'./chunk-WWSGOGLA.mjs';import p 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$1}from'./chunk-EU75HMPG.mjs';import {a as a$h,b as b$4}from'./chunk-BJVFZYUV.mjs';import {a as a$k}from'./chunk-UQJGSVXP.mjs';import {a as a$i}from'./chunk-RFTDIXEG.mjs';import {b,c as c$1}from'./chunk-GX2IOGYR.mjs';import {c as c$3}from'./chunk-W6QO7FPZ.mjs';import {a as a$5}from'./chunk-O7XK2WIX.mjs';import {a as a$7}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-EU75HMPG.mjs';import {a as a$h,b as b$4}from'./chunk-BJVFZYUV.mjs';import {a as a$k}from'./chunk-UQJGSVXP.mjs';import {a as a$i}from'./chunk-RFTDIXEG.mjs';import {b,c as c$1}from'./chunk-GX2IOGYR.mjs';import {c as c$3}from'./chunk-W6QO7FPZ.mjs';import {a as a$5}from'./chunk-O7XK2WIX.mjs';import {a as a$7}from'./chunk-6JWACCHG.mjs';import {a as a$j}from'./chunk-6Z6HOW6T.mjs';import {a as a$d}from'./chunk-7PRJIPFA.mjs';import {b as b$2}from'./chunk-WL27JGVG.mjs';import {b as b$1}from'./chunk-N2XGJKZG.mjs';import {a as a$g}from'./chunk-4ZJMZB5B.mjs';import {a as a$4}from'./chunk-VDUFLHKK.mjs';import {a as a$l}from'./chunk-66CUIXA6.mjs';import {a as a$f}from'./chunk-D3IZ4HBL.mjs';import {a as a$b}from'./chunk-545KDVGI.mjs';import {a as a$3}from'./chunk-RSKKEGJZ.mjs';import {e,a as a$c}from'./chunk-BGMVPFYK.mjs';import {b as b$3,a as a$e}from'./chunk-YB3KW7JC.mjs';import {a as a$2}from'./chunk-3FYY26ED.mjs';import {a as a$a,g,k}from'./chunk-MRJFGHFW.mjs';import {c}from'./chunk-TZ4MVY4E.mjs';import {a as a$8}from'./chunk-KEVERVHK.mjs';import {c as c$2}from'./chunk-JDLUGVXG.mjs';import {a as a$9}from'./chunk-6ZQE5SHE.mjs';import {b as b$5}from'./chunk-AUOQSTS5.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$6}from'./chunk-4QEH5CGK.mjs';import {HelpIcon}from'@baseline-ui/icons/16';import Ir,{useMemo,useState,useCallback,useRef}from'react';import {themeVars}from'@baseline-ui/tokens';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 {b}from'./chunk-WL27JGVG.mjs';import {a}from'./chunk-JJG67M2S.mjs';import {c}from'./chunk-
|
|
1
|
+
import {b}from'./chunk-WL27JGVG.mjs';import {a}from'./chunk-JJG67M2S.mjs';import {c}from'./chunk-SHJ2TJYG.mjs';import {a as a$1}from'./chunk-XWLESSHN.mjs';import {f}from'./chunk-Y4DRSGEJ.mjs';import {useRef,useCallback,useMemo}from'react';/**
|
|
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-TJEK54BW.mjs';import {a as a$6}from'./chunk-
|
|
1
|
+
import {a as a$4}from'./chunk-TJEK54BW.mjs';import {a as a$6}from'./chunk-V37GPPZD.mjs';import {d}from'./chunk-UBFMOTBM.mjs';import {a as a$1}from'./chunk-NGZRN4SF.mjs';import {c,b}from'./chunk-GX2IOGYR.mjs';import {b as b$1}from'./chunk-WL27JGVG.mjs';import {b as b$2}from'./chunk-4ZJMZB5B.mjs';import {a as a$5}from'./chunk-X3AXUU3H.mjs';import {a as a$9}from'./chunk-K6X2BHPP.mjs';import {a as a$8}from'./chunk-3FYY26ED.mjs';import {a as a$2}from'./chunk-RT4LMB6X.mjs';import {c as c$1}from'./chunk-TZ4MVY4E.mjs';import {a as a$7}from'./chunk-KEVERVHK.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import fe,{useMemo,useCallback,useEffect,useRef}from'react';import {CheckmarkIcon}from'@baseline-ui/icons/12';import {CheckmarkIcon as CheckmarkIcon$1}from'@baseline-ui/icons/16';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$3}from'./chunk-YCI6BEXQ.mjs';import {q}from'./chunk-
|
|
1
|
+
import {a as a$3}from'./chunk-YCI6BEXQ.mjs';import {q}from'./chunk-EYKIXVM3.mjs';import {b as b$2}from'./chunk-AC7OXVHA.mjs';import {c,b}from'./chunk-GX2IOGYR.mjs';import {a as a$1}from'./chunk-O7XK2WIX.mjs';import {a as a$4}from'./chunk-2V323KAD.mjs';import {b as b$1}from'./chunk-4ZJMZB5B.mjs';import {g}from'./chunk-AUOQSTS5.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$2}from'./chunk-4QEH5CGK.mjs';import {MinusIcon}from'@baseline-ui/icons/12';import {AttachmentsIcon,ErrorCircleFilledIcon}from'@baseline-ui/icons/16';import {sprinkles}from'@baseline-ui/tokens';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
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$2}from'./chunk-CHTLOFCT.mjs';import {a as a$6}from'./chunk-DRYSJSKA.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 {a}from'./chunk-
|
|
1
|
+
import {a as a$2}from'./chunk-CHTLOFCT.mjs';import {a as a$6}from'./chunk-DRYSJSKA.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 {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$7}from'./chunk-4QEH5CGK.mjs';import {CheckmarkIcon as CheckmarkIcon$1}from'@baseline-ui/icons/16';import {CheckmarkIcon}from'@baseline-ui/icons/20';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$2}from'./chunk-GEZGEZAP.mjs';import {a as a$4}from'./chunk-
|
|
1
|
+
import {a as a$2}from'./chunk-GEZGEZAP.mjs';import {a as a$4}from'./chunk-NMSOOQB2.mjs';import {g,e,h,a as a$1,i,c}from'./chunk-KEAM6GSA.mjs';import {b as b$1}from'./chunk-NUYBQ7KP.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {a}from'./chunk-66CUIXA6.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import {useGranularEffect}from'granular-hooks';import P,{useCallback,useImperativeHandle}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$2}from'./chunk-GEZGEZAP.mjs';import {a as a$4}from'./chunk-TDPODC
|
|
|
7
7
|
* This notice may not be removed from this file.
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
function F(t,o,r){let{direction:i$1}=b(),n=g({...t,collection:o.collection,selectionManager:o.selectionManager,isDisabled:!t.enableReorder,getItems:t.getItems||(
|
|
10
|
+
function F(t,o,r){let{direction:i$1}=b(),n=g({...t,collection:o.collection,selectionManager:o.selectionManager,isDisabled:!t.enableReorder,getItems:t.getItems||(c=>[...c].map(l=>{let p=o.collection.getItem(l);return a(p,"Expected item to be defined."),{"text/plain":p.textValue}}))});e(t,n,r);let a$2=h({...t,collection:o.collection,selectionManager:o.selectionManager}),{collectionProps:e$1}=a$1({...t,keyboardDelegate:new b$1({collection:o.collection,disabledKeys:o.disabledKeys,ref:r,orientation:t.orientation,layout:t.layout,direction:i$1}),dropTargetDelegate:new i(o.collection,r)},a$2,r);return {collectionProps:e$1,dragState:n,dropState:a$2}}function G({type:t="listbox",handle:o},r,i){let n=useCallback(e=>t==="listbox"?i.current?.querySelector(`[data-key="${e}"][role="option"]`):i.current?.querySelector(`[data-key="${e}"][role="row"]`),[t,i]),a=useCallback((e,c)=>{let l=n(e);l&&l?.scrollIntoView({block:"nearest",inline:"nearest",...c});},[n]);useImperativeHandle(o,()=>({scrollIntoView:a,setFocusedKey:e=>{r.selectionManager.setFocused(true),r.selectionManager.setFocusedKey(e),a(e),n(e)?.focus();}}),[a,r.selectionManager,n]),useGranularEffect(()=>{let e=r.selectionManager.focusedKey;a$2(i.current)&&e&&a(e);},[r.selectionManager.focusedKey],[a,i]);}var Q=({dropState:t,orientation:o="vertical",dropIndicatorStyle:r,dropIndicatorClassName:i,renderDropIndicator:n=({isDropTarget:e,isHidden:c,dropIndicatorProps:l,orientation:p},C)=>c?null:jsx("li",{...l,ref:C,"data-drop-target":e,className:a$3(a$4({isDropTarget:e,orientation:p}),"BaselineUI-DropIndicator",i),style:r}),...a})=>{let e=P.useRef(null),{dropIndicatorProps:c$1,isHidden:l,isDropTarget:p}=c(a,t,e);return n({dropIndicatorProps:{...c$1,role:"option"},isHidden:l,isDropTarget:p,orientation:o},e)};export{F as a,G as b,Q as c};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {b,c}from'./chunk-GX2IOGYR.mjs';import {b as b$1}from'./chunk-
|
|
1
|
+
import {b,c}from'./chunk-GX2IOGYR.mjs';import {b as b$1}from'./chunk-AYBACQ6U.mjs';import {a as a$1}from'./chunk-2V323KAD.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$2}from'./chunk-4QEH5CGK.mjs';import {WarningFilledIcon as WarningFilledIcon$1,CheckmarkCircleFilledIcon,InfoCircleFilledIcon as InfoCircleFilledIcon$1,ErrorAltCircleFilledIcon as ErrorAltCircleFilledIcon$1,XIcon}from'@baseline-ui/icons/16';import {WarningFilledIcon,CheckCircleFilledIcon,InfoCircleFilledIcon,ErrorAltCircleFilledIcon}from'@baseline-ui/icons/20';import U 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 {useState}from'react';/**
|
|
1
|
+
import {useState,useRef}from'react';/**
|
|
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 {useState}from'react';/**
|
|
|
7
7
|
* This notice may not be removed from this file.
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
function
|
|
10
|
+
function i(o,r){let[c,s]=useState(()=>{try{let t=window.localStorage.getItem(o);return t?JSON.parse(t):r}catch(t){return console.log(t),r}}),a=useRef(c);return [c,t=>{try{let e=typeof t=="function"?t(a.current):t;a.current=e,s(e),window.localStorage.setItem(o,JSON.stringify(e));}catch(e){console.log(e);}}]}export{i as a};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {b as b$1}from'./chunk-MVK5CB64.mjs';import {t,d}from'./chunk-MRJFGHFW.mjs';import {a}from'./chunk-JDLUGVXG.mjs';import {b}from'./chunk-AUOQSTS5.mjs';import {useRef,useEffect,version}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 S="react-aria-clear-focus",I="react-aria-focus";function k(t$1,e){let r=useRef(true),s=useRef(null),o=t(t$1);useEffect(()=>(r.current=true,()=>{r.current=false;}),[]),useEffect(()=>{let n=s.current;r.current?r.current=false:(!n||e.some((i,f)=>!Object.is(i,n[f])))&&o(),s.current=e;},e);}function U(t,e){let r=useRef(true),s=useRef(null);a(()=>(r.current=true,()=>{r.current=false;}),[]),a(()=>{r.current?r.current=false:(!s.current||e.some((o,n)=>!Object.is(o,s[n])))&&t(),s.current=e;},e);}function O(t$1){let{ref:e,box:r,onResize:s}=t$1,o=t(s);useEffect(()=>{let n=e?.current;if(!n)return;let i=b(n);if(typeof i.ResizeObserver>"u")return i.addEventListener("resize",o,false),()=>{i.removeEventListener("resize",o,false);};{let f=new i.ResizeObserver(a=>{a.length&&o();});return f.observe(n,{box:r}),()=>{n&&f.unobserve(n);}}},[e,r]);}function Y(t){return d()?t.metaKey:t.ctrlKey}var y=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Z(t){let e=b(t);return t instanceof e.HTMLInputElement&&!y.has(t.type)||t instanceof e.HTMLTextAreaElement||t instanceof e.HTMLElement&&t.isContentEditable}function L(t$1,e){let{collection:r,onLoadMore:s,scrollOffset:o=1}=t$1,n=useRef(null),i=t(f=>{for(let a of f)a.isIntersecting&&s&&s();});a(()=>(e.current&&(n.current=new IntersectionObserver(i,{root:b$1(e?.current),rootMargin:`0px ${100*o}% ${100*o}% ${100*o}%`}),n.current.observe(e.current)),()=>{n.current&&n.current.disconnect();}),[r,e,o]);}function M(t){let e=version.split(".");return parseInt(e[0],10)>=19?t:t?"true":void 0}export{S as a,I as b,k as c,U as d,O as e,Y as f,Z as g,L as h,M as i};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-OAY74XPB.mjs';import {a as a$4}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-OAY74XPB.mjs';import {a as a$4}from'./chunk-E5GYCA3P.mjs';import {a as a$6}from'./chunk-XUJJMAKM.mjs';import {b,c as c$1}from'./chunk-GX2IOGYR.mjs';import {a as a$3}from'./chunk-O7XK2WIX.mjs';import {a as a$5}from'./chunk-2V323KAD.mjs';import {d}from'./chunk-TCCQDGMI.mjs';import {a as a$2}from'./chunk-K6X2BHPP.mjs';import {b as b$1,c}from'./chunk-TZ4MVY4E.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$7}from'./chunk-4QEH5CGK.mjs';import {XIcon}from'@baseline-ui/icons/20';import g 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}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-PG3WDHSK.mjs';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$5}from'./chunk-GVI6EBGJ.mjs';import {a as a$a}from'./chunk-A24DWFQ2.mjs';import {a as a$9}from'./chunk-NGZRN4SF.mjs';import {b as b$1}from'./chunk-PAQQ7MQG.mjs';import {a as a$c}from'./chunk-UN7XC7QV.mjs';import {b as b$3,e as e$1}from'./chunk-7MQBBSZ2.mjs';import {b,c as c$1}from'./chunk-GX2IOGYR.mjs';import {b as b$6}from'./chunk-AYBACQ6U.mjs';import {a as a$4}from'./chunk-O7XK2WIX.mjs';import {a as a$7}from'./chunk-2V323KAD.mjs';import {a as a$3}from'./chunk-KUEDQO7P.mjs';import {b as b$5}from'./chunk-N2XGJKZG.mjs';import {b as b$7,j}from'./chunk-L6S5GBKS.mjs';import {a as a$6}from'./chunk-66CUIXA6.mjs';import {e}from'./chunk-SHJ2TJYG.mjs';import {a as a$2}from'./chunk-BGMVPFYK.mjs';import {a}from'./chunk-RT4LMB6X.mjs';import {c,b as b$4}from'./chunk-TZ4MVY4E.mjs';import {b as b$2,a as a$1}from'./chunk-JDLUGVXG.mjs';import {b as b$8,f,a as a$b,e as e$2}from'./chunk-AUOQSTS5.mjs';import {a as a$8}from'./chunk-4QEH5CGK.mjs';import _,{useState,useRef,useCallback,useMemo,useEffect,createElement}from'react';import {MoreIcon}from'@baseline-ui/icons/24';import {jsxs,jsx,Fragment}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 De=0,S="UNSUPPORTED_IN_MENU";function ge(e){return useMemo(()=>_.Children.toArray(e).map(t=>{let o=t,i=`item${++De}`,r=w(o,b$7),a=be(o),c,m;if(r){let b=w(r,j);a$6(b),c=be(b),m=w(r,a$c).props.children;}else a?c=a:c=o;let{onPress:y,label:p,"aria-label":s,iconStart:f,isDisabled:T,icon:g}=c.props,u=p||s||S;a$6(typeof u=="string","ActionGroup children must have a string label");let v=`${i}-${u}`;return createElement(a$9,{...{key:v,onPress:y,textValue:u,"aria-label":s,icon:f||g,dialogContent:m,isDisabled:T},key:v},o)}),[e])}function w(e,t){if(t)for(let o of _.Children.toArray(e)){if(!_.isValidElement(o))continue;let i=o;if(i.type===t)return i;if(i.props.children){let r=w(i.props.children,t);if(r)return r}}}function be(e){return w(e,b$6)||w(e,a$7)}var Se=new Set(["text","search","password","tel","url"]);function L({props:e,ref:t}){let{toolbarProps:o}=a$a(e,t),{direction:i}=b$5(),r=i==="rtl";return {toolbarProps:{...o,onKeyDownCapture:a=>{let c=a.target,m=a.key,y=()=>{let p=t.current;if(!p)return;let s=f(a$b(p));if(!s||!e$2(p,s)||s.dataset.buiAvoidFocus!=="true")return;let f$1=Be(p),T=f$1.indexOf(s);if(T===-1)return;let g=ke({key:m,orientation:e.orientation??"horizontal",isRTL:r});if(!g)return;let u=T+g;for(;u>=0&&u<f$1.length;){let v=f$1[u];if(v.dataset.buiAvoidFocus!=="true"&&!v.matches('[disabled], [aria-disabled="true"]')){v.focus();return}u+=g;}};if(He(c)&&Se.has(c.type)){let p=c.selectionStart===0,s=c.selectionEnd===c.value.length;(p&&(r&&a.key==="ArrowRight"||!r&&a.key==="ArrowLeft")||s&&(r&&a.key==="ArrowLeft"||!r&&a.key==="ArrowRight"))&&(o.onKeyDownCapture?.(a),y());return}o.onKeyDownCapture?.(a),y();}}}}function ke({key:e,orientation:t,isRTL:o}){return t==="vertical"?e==="ArrowUp"?-1:e==="ArrowDown"?1:null:e==="ArrowLeft"?o?1:-1:e==="ArrowRight"?o?-1:1:null}var Oe='button, [role="button"], input, [tabindex]';function Be(e){let t=[],o=i=>{t.push(...i.querySelectorAll(Oe));for(let r of i.querySelectorAll("*"))r.shadowRoot&&o(r.shadowRoot);};return o(e),t}function He(e){return e.tagName.toLowerCase()==="input"}var ye="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z6m3 _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6lv",ve={horizontal:"xvr3wn0",vertical:"xvr3wn1"};var O=_.forwardRef(({className:e$2,style:t,children:o,collapsibleMenuProps:i,"data-block-id":r,"data-block-class":a$8,renderSpacer:c$1,onKeyDown:m,isSingleTabStop:y=true,moreLabel:p,...s},f)=>{let{formatMessage:T}=b(),[g,u]=useState(),v=ge(o),d=b$1({...s,children:v}),b$4=a(f),M=useRef(null),[{visibleItems:H,isMeasuring:V},U]=b$2({visibleItems:d.collection.size,isMeasuring:false}),x=useCallback(()=>{let n=l=>{if(M.current&&b$4.current){let R=[...M.current.children],z=b$4.current.getBoundingClientRect().width,Le=l<d.collection.size,D=0,j=0;if(Le){let C=R.pop();C&&(D+=he(C,false,true));}for(let[C,xe]of R.entries())if(D+=he(xe,C===0,C===R.length-1),Math.round(D)<=Math.round(z))j++;else break;return j}return l};U(function*(){yield {visibleItems:d.collection.size,isMeasuring:true};let l=n(d.collection.size),R=l<d.collection.size&&l>0;yield {visibleItems:l,isMeasuring:R},R&&(yield {visibleItems:n(l),isMeasuring:false});});},[U,b$4,d.collection.size]),Me=useMemo(()=>({get current(){return b$4.current?.parentElement}}),[b$4]);e({ref:Me,onResize:x}),a$1(x,[d.collection,x]);let{toolbarProps:Ae}=L({props:{...s,isSingleTabStop:y},ref:b$4}),W=[...d.collection],Ie=W.slice(0,H),A=W.slice(H).filter(n=>n.textValue!==S),Ne=A.length>0;useEffect(()=>{u(void 0);},[A.length]),useEffect(()=>{s.orientation==="vertical"&&console.warn("Toolbar: Vertical orientation is not supported when `isCollapsible` is true.");},[s.orientation]);let{keyboardProps:Pe}=a$2({onKeyDown:m});return jsxs(a$3,{children:[jsx("div",{...c(Ae,Pe),className:e$2,"data-block-id":r,"data-block-class":a$8,"data-collapse":true,style:{...t,flexBasis:V?"100%":void 0},ref:b$4,children:jsxs("div",{ref:M,className:ye,children:[Ie.map(n=>n.rendered),Ne?jsxs(Fragment,{children:[!V&&c$1?jsx(a$4,{flexGrow:1}):null,jsx(a$5,{placement:"bottom end",renderTrigger:({buttonProps:n,ref:l})=>jsx(a$7,{...n,size:"md",icon:MoreIcon,"aria-label":p??T(Ke.more),variant:"toolbar",ref:l,tooltip:true}),...i,disabledKeys:A.filter(n=>n.props?.isDisabled).map(n=>n.key),items:A.map(n=>{let l=n.textValue||n["aria-label"];return a$6(l,"ActionItem must have a label"),{id:n.key,label:l,icon:n.props.icon}}),onAction:n=>{let l=d.collection.getItem(n);a$6(l,"Item not found");let{onPress:R,dialogContent:z}=l.props;R?.(),u(z);}})]}):null]})}),jsx(b$3,{isOpen:!!g,onOpenChange:n=>{n||u(void 0);},children:jsx(e$1,{enableDrawer:"auto",style:{zIndex:1e5},children:g?_.cloneElement(g,{inheritDrawer:true}):null})})]})});O.displayName="CollapsibleToolbar";function he(e,t,o){let r=b$8(e).getComputedStyle(e);return e.getBoundingClientRect().width+(t?0:we(r.marginLeft))+(o?0:we(r.marginRight))}function we(e){let t=Number.parseInt(e,10);return Number.isNaN(t)?0:t}var Ke=c$1({more:{id:"bui.toolbar.more",defaultMessage:"More"}});var B=_.forwardRef(({className:e,style:t,isSingleTabStop:o=true,"data-block-id":i,"data-block-class":r,"aria-controls":a,onKeyDown:c$1,...m},y)=>{let p=_.useRef(null),{toolbarProps:s}=L({props:{...m,isSingleTabStop:o},ref:p}),{keyboardProps:f}=a$2({onKeyDown:c$1});return jsx("div",{...c(s,f),...a?{"aria-controls":a}:{},className:a$8(ve[m.orientation||"horizontal"],"BaselineUI-Toolbar",e),style:t,"data-block-id":i,"data-block-class":r,ref:b$4(y,p),children:m.children})});B.displayName="WrappedToolbar";var Ce=_.forwardRef((e,t)=>{let o=e.isCollapsible?O:B;return jsx(o,{...e,ref:t})});Ce.displayName="Toolbar";export{Ce as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a,b as b$1,c as c$1,d}from'./chunk-
|
|
1
|
+
import {a,b as b$1,c as c$1,d}from'./chunk-BBZ2I3RF.mjs';import {c}from'./chunk-L3SNGDBH.mjs';import {b}from'./chunk-PAQQ7MQG.mjs';import {b as b$2}from'./chunk-TZ4MVY4E.mjs';import {a as a$1}from'./chunk-4QEH5CGK.mjs';import v,{useMemo}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$1}from'./chunk-DD5FWULD.mjs';import {useGranularEffect}from'granu
|
|
|
7
7
|
* This notice may not be removed from this file.
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
var f="SET_STATE",o="UNDO",a="REDO",U=(
|
|
10
|
+
var f="SET_STATE",o="UNDO",a="REDO",U=(u,e)=>{let{past:t,present:n,future:s}=u;switch(e.type){case f:return {past:[...t,n],present:e.data,future:[]};case o:return {past:t.slice(0,t?.length-1),present:t[t?.length-1],future:[n,...s]};case a:return {past:[...t,n],present:s[0],future:s.slice(1)};default:throw new Error("Invalid action type")}},H=(u={},{isDisabled:e,onAction:t})=>{let n=a$1(),[s,c]=useReducer(U,{past:[],present:u,future:[]}),{past:i,present:p,future:T}=s,h=E=>{c({type:f,data:E});},r=useRef(void 0),y=()=>{i.length&&(r.current=o,c({type:o}));},S=()=>{T.length&&(r.current=a,c({type:a}));},l=!!i?.length,R=!!T?.length;return useGranularEffect(()=>{(r.current===o||r.current===a)&&(t?.(p,r.current),r.current=void 0);},[p],[t,n]),{state:p,push:e?()=>{}:h,undo:e?()=>{}:y,redo:e?()=>{}:S,pastStates:i,futureStates:T,canUndo:l,canRedo:R}};export{H as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$1,c}from'./chunk-I3YGB2BE.mjs';import {d as d$3}from'./chunk-KUEDQO7P.mjs';import {a as a$5}from'./chunk-BU5H25MV.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {b as b$1,d,a as a$2,
|
|
1
|
+
import {a as a$1,c}from'./chunk-I3YGB2BE.mjs';import {d as d$3}from'./chunk-KUEDQO7P.mjs';import {a as a$5}from'./chunk-BU5H25MV.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {b as b$1,d,a as a$2,f as f$1}from'./chunk-SHJ2TJYG.mjs';import {d as d$1,e}from'./chunk-MVK5CB64.mjs';import {a}from'./chunk-RXSYDMT6.mjs';import {i,c as c$1}from'./chunk-Y4DRSGEJ.mjs';import {d as d$2}from'./chunk-AQYBKDT2.mjs';import {n,o,c as c$4,a as a$6,h}from'./chunk-MRJFGHFW.mjs';import {c as c$2,a as a$4}from'./chunk-TZ4MVY4E.mjs';import {c as c$3}from'./chunk-JDLUGVXG.mjs';import {f,b as b$2,a as a$3,g,e as e$1}from'./chunk-AUOQSTS5.mjs';import {useRef,useEffect}from'react';import {flushSync}from'react-dom';/**
|
|
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$1,c}from'./chunk-I3YGB2BE.mjs';import {d as d$3}from'./chunk-KUED
|
|
|
7
7
|
* This notice may not be removed from this file.
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
function H(s){return h()?s.altKey:s.ctrlKey}function Y(s,e){let t=`[data-key="${CSS.escape(String(e))}"]`,l=s.current?.dataset.collection;return l&&(t=`[data-collection="${CSS.escape(l)}"]${t}`),s.current?.querySelector(t)}var be=new WeakMap;function Se(s){let e=c$3();return be.set(s,e),e}function Fe(s){return be.get(s)}var Pe=1e3;function he(s){let{keyboardDelegate:e,selectionManager:t,onTypeSelect:l}=s,i=useRef({search:"",timeout:void 0}),v=c=>{if(i.current.search.length>0&&c.key===" "){if(c.preventDefault(),(!("continuePropagation"in c)||"continuePropagation"in c&&!c.isPropagationStopped())&&c.stopPropagation(),i.current.search+=" ",e.getKeyForSearch!=null){let f=e.getKeyForSearch(i.current.search,t.focusedKey);f==null&&(f=e.getKeyForSearch(i.current.search)),f!=null&&(t.setFocusedKey(f),l&&l(f));}clearTimeout(i.current.timeout),i.current.timeout=setTimeout(()=>{i.current.search="";},Pe);}},K=c=>{let f=Oe(c.key);if(!(!f||c.ctrlKey||c.metaKey||c.altKey||!e$1(c.currentTarget,g(c))||i.current.search.length===0&&f===" ")){if(i.current.search+=f,e.getKeyForSearch!=null){let p=e.getKeyForSearch(i.current.search,t.focusedKey);if(p==null&&(p=e.getKeyForSearch(i.current.search)),p!=null)t.setFocusedKey(p),l&&l(p),c.preventDefault(),"continuePropagation"in c||c.stopPropagation();else {i.current.search="",clearTimeout(i.current.timeout),i.current.timeout=void 0;return}}clearTimeout(i.current.timeout),i.current.timeout=setTimeout(()=>{i.current.search="";},Pe);}};return useEffect(()=>{let c=i.current.timeout;return ()=>{clearTimeout(c);}},[i]),{typeSelectProps:{onKeyDownCapture:e.getKeyForSearch?v:void 0,onKeyDown:e.getKeyForSearch?K:void 0}}}function Oe(s){return s.length===1||!/^[A-Z]/i.test(s)?s:""}function it(s){let{selectionManager:e$3,keyboardDelegate:t,ref:l,autoFocus:i$1=false,shouldFocusWrap:v=false,disallowEmptySelection:K=false,disallowSelectAll:c$3=false,escapeKeyBehavior:f$1="clearSelection",selectOnFocus:p=e$3.selectionBehavior==="replace",disallowTypeAhead:Z=false,shouldUseVirtualFocus:y,allowsTabNavigation:W=false,scrollRef:d$2=l,linkBehavior:T="action",UNSTABLE_focusOnEntry:R}=s,{direction:L}=b(),_=n(),g$1=r=>{if(r.altKey&&r.key==="Tab"&&r.preventDefault(),!l.current||!e$1(l.current,g(r)))return;let u=(n,a)=>{if(n!=null){if(e$3.isLink(n)&&T==="selection"&&p&&!H(r)){flushSync(()=>{e$3.setFocusedKey(n,a);});let o=Y(l,n),w=e$3.getItemProps(n);o&&_.open(o,r,w.href,w.routerOptions);return}if(e$3.setFocusedKey(n,a),e$3.isLink(n)&&T==="override")return;r.shiftKey&&e$3.selectionMode==="multiple"?e$3.extendSelection(n):p&&!H(r)&&e$3.replaceSelection(n);}};switch(r.key){case "ArrowDown":{if(t.getKeyBelow){let n=e$3.focusedKey!=null?t.getKeyBelow?.(e$3.focusedKey):t.getFirstKey?.();n==null&&v&&(n=t.getFirstKey?.(e$3.focusedKey)),n!=null&&(r.preventDefault(),u(n));}break}case "ArrowUp":{if(t.getKeyAbove){let n=e$3.focusedKey!=null?t.getKeyAbove?.(e$3.focusedKey):t.getLastKey?.();n==null&&v&&(n=t.getLastKey?.(e$3.focusedKey)),n!=null&&(r.preventDefault(),u(n));}break}case "ArrowLeft":{if(t.getKeyLeftOf){let n=e$3.focusedKey!=null?t.getKeyLeftOf?.(e$3.focusedKey):t.getFirstKey?.();n==null&&v&&(n=L==="rtl"?t.getFirstKey?.(e$3.focusedKey):t.getLastKey?.(e$3.focusedKey)),n!=null&&(r.preventDefault(),u(n,L==="rtl"?"first":"last"));}break}case "ArrowRight":{if(t.getKeyRightOf){let n=e$3.focusedKey!=null?t.getKeyRightOf?.(e$3.focusedKey):t.getFirstKey?.();n==null&&v&&(n=L==="rtl"?t.getLastKey?.(e$3.focusedKey):t.getFirstKey?.(e$3.focusedKey)),n!=null&&(r.preventDefault(),u(n,L==="rtl"?"last":"first"));}break}case "Home":if(t.getFirstKey){if(e$3.focusedKey===null&&r.shiftKey)return;r.preventDefault();let n=t.getFirstKey(e$3.focusedKey,e$2(r));e$3.setFocusedKey(n),n!=null&&(e$2(r)&&r.shiftKey&&e$3.selectionMode==="multiple"?e$3.extendSelection(n):p&&e$3.replaceSelection(n));}break;case "End":if(t.getLastKey){if(e$3.focusedKey===null&&r.shiftKey)return;r.preventDefault();let n=t.getLastKey(e$3.focusedKey,e$2(r));e$3.setFocusedKey(n),n!=null&&(e$2(r)&&r.shiftKey&&e$3.selectionMode==="multiple"?e$3.extendSelection(n):p&&e$3.replaceSelection(n));}break;case "PageDown":if(t.getKeyPageBelow&&e$3.focusedKey!=null){let n=t.getKeyPageBelow(e$3.focusedKey);n!=null&&(r.preventDefault(),u(n));}break;case "PageUp":if(t.getKeyPageAbove&&e$3.focusedKey!=null){let n=t.getKeyPageAbove(e$3.focusedKey);n!=null&&(r.preventDefault(),u(n));}break;case "a":e$2(r)&&e$3.selectionMode==="multiple"&&c$3!==true&&(r.preventDefault(),e$3.selectAll());break;case "Escape":f$1==="clearSelection"&&!K&&e$3.selectedKeys.size!==0&&(r.stopPropagation(),r.preventDefault(),e$3.clearSelection());break;case "Tab":if(!W){if(r.shiftKey)l.current.focus();else {let n=d$3(l.current,{tabbable:true}),a,o;do o=n.lastChild(),o&&(a=o);while(o);let w=a$3(l.current),Q=f(w);a&&(!e$1(a,Q)||Q&&!c$4(Q))&&a$6(a);}break}}},k=useRef({top:0,left:0});a(d$2,"scroll",()=>{k.current={top:d$2.current?.scrollTop??0,left:d$2.current?.scrollLeft??0};});let F=r=>{if(e$3.isFocused){e$1(r.currentTarget,g(r))||e$3.setFocused(false);return}if(!e$1(r.currentTarget,g(r)))return;let u=c$1();e$3.setFocused(true);let n=a=>{a!=null&&(e$3.setFocusedKey(a),p&&!e$3.isSelected(a)&&e$3.replaceSelection(a));};if(R&&(u==="keyboard"||u==="virtual"))n(R==="first"?t.getFirstKey?.():t.getLastKey?.());else if(e$3.focusedKey==null){let a=r.relatedTarget;a&&r.currentTarget.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_FOLLOWING?n(e$3.lastSelectedKey??t.getLastKey?.()):n(e$3.firstSelectedKey??t.getFirstKey?.());}else d$2.current&&(d$2.current.scrollTop=k.current.top,d$2.current.scrollLeft=k.current.left);if(e$3.focusedKey!=null&&d$2.current){let a=Y(l,e$3.focusedKey),o=b$2(a);a instanceof o.HTMLElement&&(!e$1(a,f(o.document))&&!y&&a$6(a),(u==="keyboard"||R&&u==="virtual")&&e(a,{containingElement:l.current}));}},U=r=>{e$1(r.currentTarget,r.relatedTarget)||e$3.setFocused(false);},b$3=useRef(false);a(l,b$1,y?r=>{let{detail:u}=r;r.stopPropagation(),e$3.setFocused(true),u?.focusStrategy==="first"&&(b$3.current=true);}:void 0);let E=t.getFirstKey?.()??null;d(()=>{if(b$3.current)if(E==null){let r=f();a$1(l.current),c(r,null),e$3.collection.size>0&&(b$3.current=false);}else e$3.setFocusedKey(E),b$3.current=false;},[E,e$3.collection.size]),d(()=>{e$3.collection.size>0&&(b$3.current=false);},[e$3.focusedKey]),a(l,a$2,y?r=>{r.stopPropagation(),e$3.setFocused(false),r.detail?.clearFocusKey&&e$3.setFocusedKey(null);}:void 0);let M=useRef(i$1),D=useRef(false);useEffect(()=>{if(M.current){let r=null;i$1==="first"&&(r=t.getFirstKey?.()??null),i$1==="last"&&(r=t.getLastKey?.()??null);let u=e$3.selectedKeys;if(u.size){for(let n of u)if(e$3.canSelectItem(n)){r=n;break}}e$3.setFocused(true),e$3.setFocusedKey(r),r==null&&!y&&l.current&&i(l.current),e$3.collection.size>0&&(M.current=false,D.current=true);}});let C=useRef(e$3.focusedKey),S=useRef(null);useEffect(()=>{if(e$3.isFocused&&e$3.focusedKey!=null&&(e$3.focusedKey!==C.current||D.current)&&d$2.current&&l.current){let r=c$1(),u=Y(l,e$3.focusedKey),n=b$2(u);if(!(u instanceof n.HTMLElement))return;(r==="keyboard"||D.current)&&(S.current&&cancelAnimationFrame(S.current),S.current=requestAnimationFrame(()=>{d$2.current&&(d$1(d$2.current,u),r!=="virtual"&&e(u,{containingElement:l.current}));}));}!y&&e$3.isFocused&&e$3.focusedKey==null&&C.current!=null&&l.current&&i(l.current),C.current=e$3.focusedKey,D.current=false;}),useEffect(()=>()=>{S.current&&cancelAnimationFrame(S.current);},[]),a(l,"react-aria-focus-scope-restore",r=>{r.preventDefault(),e$3.setFocused(true);});let A={onKeyDown:g$1,onFocus:F,onBlur:U,onMouseDown(r){d$2.current===g(r)&&r.preventDefault();}},{typeSelectProps:m}=he({keyboardDelegate:t,selectionManager:e$3});Z||(A=c$2(m,A));let z;y||(z=e$3.focusedKey==null?0:-1);let J=Se(e$3.collection);return {collectionProps:c$2(A,{tabIndex:z,"data-collection":J})}}function ht(s){let{id:e,selectionManager:t,key:l,ref:i$1,shouldSelectOnPressUp:v,shouldUseVirtualFocus:K,focus:c,isDisabled:f$1,onAction:p,allowsDifferentPressOrigin:Z,linkBehavior:y="action"}=s,W=n();e=c$3(e);let d=o=>{if(o.pointerType==="keyboard"&&H(o))t.toggleSelection(l);else {if(t.selectionMode==="none")return;if(t.isLink(l)){if(y==="selection"&&i$1.current){let w=t.getItemProps(l);W.open(i$1.current,o,w.href,w.routerOptions),t.setSelectedKeys(t.selectedKeys);return}else if(y==="override"||y==="none")return}t.selectionMode==="single"?t.isSelected(l)&&!t.disallowEmptySelection?t.toggleSelection(l):t.replaceSelection(l):o&&o.shiftKey?t.extendSelection(l):t.selectionBehavior==="toggle"||o&&(e$2(o)||o.pointerType==="touch"||o.pointerType==="virtual")?t.toggleSelection(l):t.replaceSelection(l);}};useEffect(()=>{l===t.focusedKey&&t.isFocused&&(K?a$1(i$1.current):c?c():f(a$3(i$1.current))!==i$1.current&&i$1.current&&i(i$1.current));},[i$1,l,t.focusedKey,t.childFocusStrategy,t.isFocused,K]),f$1=f$1||t.isDisabled(l);let T={};!K&&!f$1?T={tabIndex:l===t.focusedKey?0:-1,onFocus(o){g(o)===i$1.current&&t.setFocusedKey(l);}}:f$1&&(T.onMouseDown=o=>{o.preventDefault();}),useEffect(()=>{f$1&&t.focusedKey===l&&t.setFocusedKey(null);},[t,f$1,l]);let R=t.isLink(l)&&y==="override",L=p&&s.UNSTABLE_itemBehavior==="action",_=t.isLink(l)&&y!=="selection"&&y!=="none",g$1=!f$1&&t.canSelectItem(l)&&!R&&!L,k=(p||_)&&!f$1,F=k&&(t.selectionBehavior==="replace"?!g$1:!g$1||t.isEmpty),U=k&&g$1&&t.selectionBehavior==="replace",b=F||U,E=useRef(null),M=b&&g$1,D=useRef(false),C=useRef(false),S=t.getItemProps(l),A=o=>{p&&(p(),i$1.current?.dispatchEvent(new CustomEvent("react-aria-item-action",{bubbles:true}))),_&&i$1.current&&W.open(i$1.current,o,S.href,S.routerOptions);},m={ref:i$1};if(v?(m.onPressStart=o=>{E.current=o.pointerType,D.current=M,o.pointerType==="keyboard"&&(!b||Ee(o.key))&&d(o);},Z?(m.onPressUp=F?void 0:o=>{o.pointerType==="mouse"&&g$1&&d(o);},m.onPress=F?A:o=>{o.pointerType!=="keyboard"&&o.pointerType!=="mouse"&&g$1&&d(o);}):m.onPress=o=>{if(F||U&&o.pointerType!=="mouse"){if(o.pointerType==="keyboard"&&!Te(o.key))return;A(o);}else o.pointerType!=="keyboard"&&g$1&&d(o);}):(m.onPressStart=o=>{E.current=o.pointerType,D.current=M,C.current=F,g$1&&(o.pointerType==="mouse"&&!F||o.pointerType==="keyboard"&&(!k||Ee(o.key)))&&d(o);},m.onPress=o=>{(o.pointerType==="touch"||o.pointerType==="pen"||o.pointerType==="virtual"||o.pointerType==="keyboard"&&b&&Te(o.key)||o.pointerType==="mouse"&&C.current)&&(b?A(o):g$1&&d(o));}),T["data-collection"]=Fe(t.collection),T["data-key"]=l,m.preventFocusOnPress=K,K&&(m=c$2(m,{onPressStart(o){o.pointerType!=="touch"&&(t.setFocused(true),t.setFocusedKey(l));},onPress(o){o.pointerType==="touch"&&(t.setFocused(true),t.setFocusedKey(l));}})),S)for(let o of ["onPressStart","onPressEnd","onPressChange","onPress","onPressUp","onClick"])S[o]&&(m[o]=a$4(m[o],S[o]));let{pressProps:z,isPressed:J}=d$2(m),r=U?o=>{E.current==="mouse"&&(o.stopPropagation(),o.preventDefault(),A(o));}:void 0,{longPressProps:u}=a$5({isDisabled:!M,onLongPress(o){o.pointerType==="touch"&&(d(o),t.setSelectionBehavior("toggle"));}}),n$1=o=>{E.current==="touch"&&D.current&&o.preventDefault();},a=y!=="none"&&t.isLink(l)?o$1=>{o.isOpening||o$1.preventDefault();}:void 0;return {itemProps:c$2(T,g$1||F||K&&!f$1?z:{},M?u:{},{onDoubleClick:r,onDragStartCapture:n$1,onClick:a,id:e},K?{onMouseDown:o=>o.preventDefault()}:void 0),isPressed:J,isSelected:t.isSelected(l),isFocused:t.isFocused&&t.focusedKey===l,isDisabled:f$1,allowsSelection:g$1,hasAction:b}}function Te(s){return s==="Enter"}function Ee(s){return s===" "}export{Y as a,he as b,it as c,ht as d};
|
|
10
|
+
function H(s){return h()?s.altKey:s.ctrlKey}function Y(s,e){let t=`[data-key="${CSS.escape(String(e))}"]`,l=s.current?.dataset.collection;return l&&(t=`[data-collection="${CSS.escape(l)}"]${t}`),s.current?.querySelector(t)}var be=new WeakMap;function Se(s){let e=c$3();return be.set(s,e),e}function Fe(s){return be.get(s)}var Pe=1e3;function he(s){let{keyboardDelegate:e,selectionManager:t,onTypeSelect:l}=s,i=useRef({search:"",timeout:void 0}),v=c=>{if(i.current.search.length>0&&c.key===" "){if(c.preventDefault(),(!("continuePropagation"in c)||"continuePropagation"in c&&!c.isPropagationStopped())&&c.stopPropagation(),i.current.search+=" ",e.getKeyForSearch!=null){let f=e.getKeyForSearch(i.current.search,t.focusedKey);f==null&&(f=e.getKeyForSearch(i.current.search)),f!=null&&(t.setFocusedKey(f),l&&l(f));}clearTimeout(i.current.timeout),i.current.timeout=setTimeout(()=>{i.current.search="";},Pe);}},K=c=>{let f=Oe(c.key);if(!(!f||c.ctrlKey||c.metaKey||c.altKey||!e$1(c.currentTarget,g(c))||i.current.search.length===0&&f===" ")){if(i.current.search+=f,e.getKeyForSearch!=null){let p=e.getKeyForSearch(i.current.search,t.focusedKey);if(p==null&&(p=e.getKeyForSearch(i.current.search)),p!=null)t.setFocusedKey(p),l&&l(p),c.preventDefault(),"continuePropagation"in c||c.stopPropagation();else {i.current.search="",clearTimeout(i.current.timeout),i.current.timeout=void 0;return}}clearTimeout(i.current.timeout),i.current.timeout=setTimeout(()=>{i.current.search="";},Pe);}};return useEffect(()=>{let c=i.current.timeout;return ()=>{clearTimeout(c);}},[i]),{typeSelectProps:{onKeyDownCapture:e.getKeyForSearch?v:void 0,onKeyDown:e.getKeyForSearch?K:void 0}}}function Oe(s){return s.length===1||!/^[A-Z]/i.test(s)?s:""}function it(s){let{selectionManager:e$2,keyboardDelegate:t,ref:l,autoFocus:i$1=false,shouldFocusWrap:v=false,disallowEmptySelection:K=false,disallowSelectAll:c$3=false,escapeKeyBehavior:f$2="clearSelection",selectOnFocus:p=e$2.selectionBehavior==="replace",disallowTypeAhead:Z=false,shouldUseVirtualFocus:y,allowsTabNavigation:W=false,scrollRef:d$2=l,linkBehavior:T="action",UNSTABLE_focusOnEntry:R}=s,{direction:L}=b(),_=n(),g$1=r=>{if(r.altKey&&r.key==="Tab"&&r.preventDefault(),!l.current||!e$1(l.current,g(r)))return;let u=(n,a)=>{if(n!=null){if(e$2.isLink(n)&&T==="selection"&&p&&!H(r)){flushSync(()=>{e$2.setFocusedKey(n,a);});let o=Y(l,n),w=e$2.getItemProps(n);o&&_.open(o,r,w.href,w.routerOptions);return}if(e$2.setFocusedKey(n,a),e$2.isLink(n)&&T==="override")return;r.shiftKey&&e$2.selectionMode==="multiple"?e$2.extendSelection(n):p&&!H(r)&&e$2.replaceSelection(n);}};switch(r.key){case "ArrowDown":{if(t.getKeyBelow){let n=e$2.focusedKey!=null?t.getKeyBelow?.(e$2.focusedKey):t.getFirstKey?.();n==null&&v&&(n=t.getFirstKey?.(e$2.focusedKey)),n!=null&&(r.preventDefault(),u(n));}break}case "ArrowUp":{if(t.getKeyAbove){let n=e$2.focusedKey!=null?t.getKeyAbove?.(e$2.focusedKey):t.getLastKey?.();n==null&&v&&(n=t.getLastKey?.(e$2.focusedKey)),n!=null&&(r.preventDefault(),u(n));}break}case "ArrowLeft":{if(t.getKeyLeftOf){let n=e$2.focusedKey!=null?t.getKeyLeftOf?.(e$2.focusedKey):t.getFirstKey?.();n==null&&v&&(n=L==="rtl"?t.getFirstKey?.(e$2.focusedKey):t.getLastKey?.(e$2.focusedKey)),n!=null&&(r.preventDefault(),u(n,L==="rtl"?"first":"last"));}break}case "ArrowRight":{if(t.getKeyRightOf){let n=e$2.focusedKey!=null?t.getKeyRightOf?.(e$2.focusedKey):t.getFirstKey?.();n==null&&v&&(n=L==="rtl"?t.getLastKey?.(e$2.focusedKey):t.getFirstKey?.(e$2.focusedKey)),n!=null&&(r.preventDefault(),u(n,L==="rtl"?"last":"first"));}break}case "Home":if(t.getFirstKey){if(e$2.focusedKey===null&&r.shiftKey)return;r.preventDefault();let n=t.getFirstKey(e$2.focusedKey,f$1(r));e$2.setFocusedKey(n),n!=null&&(f$1(r)&&r.shiftKey&&e$2.selectionMode==="multiple"?e$2.extendSelection(n):p&&e$2.replaceSelection(n));}break;case "End":if(t.getLastKey){if(e$2.focusedKey===null&&r.shiftKey)return;r.preventDefault();let n=t.getLastKey(e$2.focusedKey,f$1(r));e$2.setFocusedKey(n),n!=null&&(f$1(r)&&r.shiftKey&&e$2.selectionMode==="multiple"?e$2.extendSelection(n):p&&e$2.replaceSelection(n));}break;case "PageDown":if(t.getKeyPageBelow&&e$2.focusedKey!=null){let n=t.getKeyPageBelow(e$2.focusedKey);n!=null&&(r.preventDefault(),u(n));}break;case "PageUp":if(t.getKeyPageAbove&&e$2.focusedKey!=null){let n=t.getKeyPageAbove(e$2.focusedKey);n!=null&&(r.preventDefault(),u(n));}break;case "a":f$1(r)&&e$2.selectionMode==="multiple"&&c$3!==true&&(r.preventDefault(),e$2.selectAll());break;case "Escape":f$2==="clearSelection"&&!K&&e$2.selectedKeys.size!==0&&(r.stopPropagation(),r.preventDefault(),e$2.clearSelection());break;case "Tab":if(!W){if(r.shiftKey)l.current.focus();else {let n=d$3(l.current,{tabbable:true}),a,o;do o=n.lastChild(),o&&(a=o);while(o);let w=a$3(l.current),Q=f(w);a&&(!e$1(a,Q)||Q&&!c$4(Q))&&a$6(a);}break}}},k=useRef({top:0,left:0});a(d$2,"scroll",()=>{k.current={top:d$2.current?.scrollTop??0,left:d$2.current?.scrollLeft??0};});let F=r=>{if(e$2.isFocused){e$1(r.currentTarget,g(r))||e$2.setFocused(false);return}if(!e$1(r.currentTarget,g(r)))return;let u=c$1();e$2.setFocused(true);let n=a=>{a!=null&&(e$2.setFocusedKey(a),p&&!e$2.isSelected(a)&&e$2.replaceSelection(a));};if(R&&(u==="keyboard"||u==="virtual"))n(R==="first"?t.getFirstKey?.():t.getLastKey?.());else if(e$2.focusedKey==null){let a=r.relatedTarget;a&&r.currentTarget.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_FOLLOWING?n(e$2.lastSelectedKey??t.getLastKey?.()):n(e$2.firstSelectedKey??t.getFirstKey?.());}else d$2.current&&(d$2.current.scrollTop=k.current.top,d$2.current.scrollLeft=k.current.left);if(e$2.focusedKey!=null&&d$2.current){let a=Y(l,e$2.focusedKey),o=b$2(a);a instanceof o.HTMLElement&&(!e$1(a,f(o.document))&&!y&&a$6(a),(u==="keyboard"||R&&u==="virtual")&&e(a,{containingElement:l.current}));}},U=r=>{e$1(r.currentTarget,r.relatedTarget)||e$2.setFocused(false);},b$3=useRef(false);a(l,b$1,y?r=>{let{detail:u}=r;r.stopPropagation(),e$2.setFocused(true),u?.focusStrategy==="first"&&(b$3.current=true);}:void 0);let E=t.getFirstKey?.()??null;d(()=>{if(b$3.current)if(E==null){let r=f();a$1(l.current),c(r,null),e$2.collection.size>0&&(b$3.current=false);}else e$2.setFocusedKey(E),b$3.current=false;},[E,e$2.collection.size]),d(()=>{e$2.collection.size>0&&(b$3.current=false);},[e$2.focusedKey]),a(l,a$2,y?r=>{r.stopPropagation(),e$2.setFocused(false),r.detail?.clearFocusKey&&e$2.setFocusedKey(null);}:void 0);let M=useRef(i$1),D=useRef(false);useEffect(()=>{if(M.current){let r=null;i$1==="first"&&(r=t.getFirstKey?.()??null),i$1==="last"&&(r=t.getLastKey?.()??null);let u=e$2.selectedKeys;if(u.size){for(let n of u)if(e$2.canSelectItem(n)){r=n;break}}e$2.setFocused(true),e$2.setFocusedKey(r),r==null&&!y&&l.current&&i(l.current),e$2.collection.size>0&&(M.current=false,D.current=true);}});let C=useRef(e$2.focusedKey),S=useRef(null);useEffect(()=>{if(e$2.isFocused&&e$2.focusedKey!=null&&(e$2.focusedKey!==C.current||D.current)&&d$2.current&&l.current){let r=c$1(),u=Y(l,e$2.focusedKey),n=b$2(u);if(!(u instanceof n.HTMLElement))return;(r==="keyboard"||D.current)&&(S.current&&cancelAnimationFrame(S.current),S.current=requestAnimationFrame(()=>{d$2.current&&(d$1(d$2.current,u),r!=="virtual"&&e(u,{containingElement:l.current}));}));}!y&&e$2.isFocused&&e$2.focusedKey==null&&C.current!=null&&l.current&&i(l.current),C.current=e$2.focusedKey,D.current=false;}),useEffect(()=>()=>{S.current&&cancelAnimationFrame(S.current);},[]),a(l,"react-aria-focus-scope-restore",r=>{r.preventDefault(),e$2.setFocused(true);});let A={onKeyDown:g$1,onFocus:F,onBlur:U,onMouseDown(r){d$2.current===g(r)&&r.preventDefault();}},{typeSelectProps:m}=he({keyboardDelegate:t,selectionManager:e$2});Z||(A=c$2(m,A));let z;y||(z=e$2.focusedKey==null?0:-1);let J=Se(e$2.collection);return {collectionProps:c$2(A,{tabIndex:z,"data-collection":J})}}function ht(s){let{id:e,selectionManager:t,key:l,ref:i$1,shouldSelectOnPressUp:v,shouldUseVirtualFocus:K,focus:c,isDisabled:f$2,onAction:p,allowsDifferentPressOrigin:Z,linkBehavior:y="action"}=s,W=n();e=c$3(e);let d=o=>{if(o.pointerType==="keyboard"&&H(o))t.toggleSelection(l);else {if(t.selectionMode==="none")return;if(t.isLink(l)){if(y==="selection"&&i$1.current){let w=t.getItemProps(l);W.open(i$1.current,o,w.href,w.routerOptions),t.setSelectedKeys(t.selectedKeys);return}else if(y==="override"||y==="none")return}t.selectionMode==="single"?t.isSelected(l)&&!t.disallowEmptySelection?t.toggleSelection(l):t.replaceSelection(l):o&&o.shiftKey?t.extendSelection(l):t.selectionBehavior==="toggle"||o&&(f$1(o)||o.pointerType==="touch"||o.pointerType==="virtual")?t.toggleSelection(l):t.replaceSelection(l);}};useEffect(()=>{l===t.focusedKey&&t.isFocused&&(K?a$1(i$1.current):c?c():f(a$3(i$1.current))!==i$1.current&&i$1.current&&i(i$1.current));},[i$1,l,t.focusedKey,t.childFocusStrategy,t.isFocused,K]),f$2=f$2||t.isDisabled(l);let T={};!K&&!f$2?T={tabIndex:l===t.focusedKey?0:-1,onFocus(o){g(o)===i$1.current&&t.setFocusedKey(l);}}:f$2&&(T.onMouseDown=o=>{o.preventDefault();}),useEffect(()=>{f$2&&t.focusedKey===l&&t.setFocusedKey(null);},[t,f$2,l]);let R=t.isLink(l)&&y==="override",L=p&&s.UNSTABLE_itemBehavior==="action",_=t.isLink(l)&&y!=="selection"&&y!=="none",g$1=!f$2&&t.canSelectItem(l)&&!R&&!L,k=(p||_)&&!f$2,F=k&&(t.selectionBehavior==="replace"?!g$1:!g$1||t.isEmpty),U=k&&g$1&&t.selectionBehavior==="replace",b=F||U,E=useRef(null),M=b&&g$1,D=useRef(false),C=useRef(false),S=t.getItemProps(l),A=o=>{p&&(p(),i$1.current?.dispatchEvent(new CustomEvent("react-aria-item-action",{bubbles:true}))),_&&i$1.current&&W.open(i$1.current,o,S.href,S.routerOptions);},m={ref:i$1};if(v?(m.onPressStart=o=>{E.current=o.pointerType,D.current=M,o.pointerType==="keyboard"&&(!b||Ee(o.key))&&d(o);},Z?(m.onPressUp=F?void 0:o=>{o.pointerType==="mouse"&&g$1&&d(o);},m.onPress=F?A:o=>{o.pointerType!=="keyboard"&&o.pointerType!=="mouse"&&g$1&&d(o);}):m.onPress=o=>{if(F||U&&o.pointerType!=="mouse"){if(o.pointerType==="keyboard"&&!Te(o.key))return;A(o);}else o.pointerType!=="keyboard"&&g$1&&d(o);}):(m.onPressStart=o=>{E.current=o.pointerType,D.current=M,C.current=F,g$1&&(o.pointerType==="mouse"&&!F||o.pointerType==="keyboard"&&(!k||Ee(o.key)))&&d(o);},m.onPress=o=>{(o.pointerType==="touch"||o.pointerType==="pen"||o.pointerType==="virtual"||o.pointerType==="keyboard"&&b&&Te(o.key)||o.pointerType==="mouse"&&C.current)&&(b?A(o):g$1&&d(o));}),T["data-collection"]=Fe(t.collection),T["data-key"]=l,m.preventFocusOnPress=K,K&&(m=c$2(m,{onPressStart(o){o.pointerType!=="touch"&&(t.setFocused(true),t.setFocusedKey(l));},onPress(o){o.pointerType==="touch"&&(t.setFocused(true),t.setFocusedKey(l));}})),S)for(let o of ["onPressStart","onPressEnd","onPressChange","onPress","onPressUp","onClick"])S[o]&&(m[o]=a$4(m[o],S[o]));let{pressProps:z,isPressed:J}=d$2(m),r=U?o=>{E.current==="mouse"&&(o.stopPropagation(),o.preventDefault(),A(o));}:void 0,{longPressProps:u}=a$5({isDisabled:!M,onLongPress(o){o.pointerType==="touch"&&(d(o),t.setSelectionBehavior("toggle"));}}),n$1=o=>{E.current==="touch"&&D.current&&o.preventDefault();},a=y!=="none"&&t.isLink(l)?o$1=>{o.isOpening||o$1.preventDefault();}:void 0;return {itemProps:c$2(T,g$1||F||K&&!f$2?z:{},M?u:{},{onDoubleClick:r,onDragStartCapture:n$1,onClick:a,id:e},K?{onMouseDown:o=>o.preventDefault()}:void 0),isPressed:J,isSelected:t.isSelected(l),isFocused:t.isFocused&&t.focusedKey===l,isDisabled:f$2,allowsSelection:g$1,hasAction:b}}function Te(s){return s==="Enter"}function Ee(s){return s===" "}export{Y as a,he as b,it as c,ht as d};
|
|
@@ -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 l,{useLayoutEffect}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 {c as c$1,b}from'./chunk-
|
|
1
|
+
import {c as c$1,b}from'./chunk-QSSCSN5S.mjs';import {a}from'./chunk-V37GPPZD.mjs';import {d}from'./chunk-UBFMOTBM.mjs';import {a as a$1}from'./chunk-34TYNTXM.mjs';import {d as d$1}from'./chunk-KUEDQO7P.mjs';import {b as b$1}from'./chunk-N2XGJKZG.mjs';import {e as e$2,b as b$2}from'./chunk-MVK5CB64.mjs';import {i as i$1,b as b$3}from'./chunk-Y4DRSGEJ.mjs';import {p,c as c$3}from'./chunk-MRJFGHFW.mjs';import {c as c$2,a as a$3}from'./chunk-TZ4MVY4E.mjs';import {a as a$2}from'./chunk-KEVERVHK.mjs';import {c,e}from'./chunk-JDLUGVXG.mjs';import {g,i,f,a as a$4,e as e$1}from'./chunk-AUOQSTS5.mjs';import {useRef}from'react';/**
|
|
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$2}from'./chunk-
|
|
1
|
+
import {a as a$2}from'./chunk-IVC2BJRU.mjs';import {d,c}from'./chunk-KCHAWPUN.mjs';import {d as d$2}from'./chunk-7MQBBSZ2.mjs';import {a as a$5}from'./chunk-FP5EWPOF.mjs';import {a as a$4}from'./chunk-TK4QXU3W.mjs';import {a as a$7}from'./chunk-YX2ASVM3.mjs';import {a as a$1}from'./chunk-F3HQNHR5.mjs';import {a as a$8}from'./chunk-V3L4SVVF.mjs';import {b}from'./chunk-QR2AF3KT.mjs';import {h,g,f,e,a as a$9,c as c$3,d as d$1}from'./chunk-L6S5GBKS.mjs';import {a as a$a}from'./chunk-66CUIXA6.mjs';import {c as c$2}from'./chunk-MVK5CB64.mjs';import {a}from'./chunk-RT4LMB6X.mjs';import {c as c$1}from'./chunk-TZ4MVY4E.mjs';import {a as a$3}from'./chunk-JDLUGVXG.mjs';import {a as a$b,b as b$1}from'./chunk-AUOQSTS5.mjs';import {a as a$6}from'./chunk-4QEH5CGK.mjs';import be,{useContext,useMemo,useImperativeHandle,useState,useCallback,useEffect,useRef}from'react';import Be from'react-dom';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {assignInlineVars}from'@vanilla-extract/dynamic';import {motion}from'motion/react';import {themeVars}from'@baseline-ui/tokens';import {useGranularEffect}from'granular-hooks';/**
|
|
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,5 +7,5 @@ import {a as a$2}from'./chunk-MFH2E2GU.mjs';import {d,c}from'./chunk-KCHAWPUN.mj
|
|
|
7
7
|
* This notice may not be removed from this file.
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
var Pe=({children:r,isOpen:t,popoverContent:n,portalContainer:a,style:e})=>{let[o,p]=useState(false),[s,m]=useState(null),
|
|
10
|
+
var Pe=({children:r,isOpen:t,popoverContent:n,portalContainer:a,style:e})=>{let[o,p]=useState(false),[s,m]=useState(null),l=useRef(null),{setIsPopoverSafelyClosed:i}=useContext(d$2);useEffect(()=>{t?(p(true),l.current&&clearTimeout(l.current)):l.current=setTimeout(()=>{p(false);},300);},[t]),useEffect(()=>()=>{l.current&&clearTimeout(l.current);},[]);let c=a??(n?a$b(n).body:null),f=useRef(null);return c&&(f.current=c),useEffect(()=>{n&&m(n.getBoundingClientRect());},[n]),useEffect(()=>{i(!o);},[o,i]),jsxs(Fragment,{children:[o?Be.createPortal(jsx("div",{"aria-hidden":true,style:{position:"absolute",left:e?.left,top:e?.top,width:s?.width,height:s?.height,zIndex:e?.zIndex?+e.zIndex-1:void 0},className:"BaselineUI-Popover-ClickPreventionLayer","data-testid":"event-leak-prevention-layer"}),f.current??a$b(n).body):null,r]})};var{color:R}=themeVars,ye=({placement:r,arrowProps:t})=>jsxs(Fragment,{children:[jsxs("svg",{...t,className:a$6(t.className,c$3({placement:r}),"BaselineUI-PopoverContent-Arrow"),style:{...t.style,position:"absolute"},width:"15",height:"9",viewBox:"0 0 15 9",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-testid":"arrow",children:[jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M.019 0h1.228l6.272 7.237L13.791 0h1.228v1h-.772L7.519 8.763.791 1H.019V0Z",fill:R.border.medium}),jsx("path",{d:"M7.504 6.492 2.248.488h10.511L10.132 3.49 7.504 6.492Z",fill:R.background.primary.subtle,stroke:R.background.primary.subtle})]}),jsxs("svg",{...t,className:a$6(t.className,d$1({placement:r}),"BaselineUI-PopoverContent-Arrow-Focused"),width:"15",height:"11",viewBox:"0 0 15 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...t.style,position:"absolute"},"data-testid":"arrow-focused",children:[jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.543371 2H0V0H1.45663L7.5 6.97312L13.5434 0H15V2H14.4566L7.5 10.0269L0.543371 2Z",fill:R.border.interactive.enabled}),jsx("path",{d:"M7.504 6.492 2.248.488h10.511L10.132 3.49 7.504 6.492Z",fill:R.background.primary.subtle,stroke:R.background.primary.subtle})]})]});function ge({triggerRef:r,updatePosition:t,isOpen:n,boundaryElement:a,isDisabled:e=false}){let o=useRef(null),p=useRef(t);p.current=t;let s=useCallback(()=>{o.current&&cancelAnimationFrame(o.current),o.current=requestAnimationFrame(()=>{p.current(),o.current=null;});},[]);useGranularEffect(()=>{if(!n||e||!r.current)return;let m=a$b(r.current),l=b$1(m.body),i=[];l.addEventListener("scroll",s,true),i.push([l,"scroll"]);let c=new Set;a&&c.add(a);let f=c$2(r.current),C=new Set([...c,...f]);for(let u of C)u!==m.body&&(u.addEventListener("scroll",s,true),i.push([u,"scroll"]));return ()=>{o.current&&(cancelAnimationFrame(o.current),o.current=null);for(let[u,b]of i)u.removeEventListener(b,s,true);}},[n,e,a],[s,r]);}var et=["top","bottom","left","right"],z=be.forwardRef(({portalClassName:r,portalStyle:t,className:n,style:a$9,state:e$1,overlayProps:o,underlayClassName:p,children:s,includeArrow:m=false,offset:l=2,portalContainer:i,contentContainerClassName:c$2,contentContainerStyle:f$1,setPopoverStyle:C,"data-block-id":u,"data-block-class":b$1,disableAnimation:x,popoverContainerRef:A,shouldContainFocus:Le,arrowClassName:W,arrowStyle:V,disableFocusManagement:we,boundaryElement:H,boundaryAxis:Oe,horizontalBoundaryBehavior:Me,shouldRepositionOnScroll:_=false,elementHandle:Se,...y},De)=>{let Z=a(A),Te=a$1(i),{container:N,shouldUseContainerAsBoundary:q}=useContext(b),G=useMemo(()=>H===void 0?q&&N?N:void 0:H,[H,q,N]),ke=m?8:0,{underlayProps:xe,popoverProps:v,placement:w,arrowProps:O,updatePosition:I}=a$2({...y,offset:l+ke,popoverRef:Z,containerPadding:y.containerPadding||0,boundaryElement:G,boundaryAxis:Oe,horizontalBoundaryBehavior:Me,shouldCloseOnScroll:!_},e$1);ge({triggerRef:y.triggerRef,updatePosition:I,isOpen:e$1.isOpen,boundaryElement:G,isDisabled:!_}),useImperativeHandle(Se,()=>({updatePosition:I}),[I]),delete v.style?.position;let[J,X]=useState();a$3(()=>{let g=y.triggerRef.current;g&&X(g.offsetWidth);},[y.triggerRef]);let Ae=useCallback(g=>{X(g.target.offsetWidth);},[]);a$4({ref:y.triggerRef,isDisabled:!e$1.isOpen,onResize:Ae});let He=(w==="center"?"bottom":w)||"bottom",d$1=useMemo(()=>({isOpen:e$1.isOpen}),[e$1.isOpen]),{transitionProps:Ne}=a$5({placement:w||"bottom",isDisabled:x}),F=useMemo(()=>({...v.style,...assignInlineVars({[h]:`${J??0}px`}),...d(a$9,d$1)}),[v.style,J,a$9,d$1]);useEffect(()=>{C({left:v.style?.left,top:v.style?.top,zIndex:F.zIndex});},[v.style?.left,v.style?.top,C,F.zIndex]);let Ie=useMemo(()=>({...O,className:a$6(O.className,c(W,d$1)),style:{...O.style,...d(V,d$1)}}),[O,W,V,d$1]);return jsxs(a$7,{portalContainer:Te,style:t,className:r,ref:De,"data-block-id":u,"data-block-class":b$1,shouldContainFocus:Le,disableFocusManagement:we,children:[!y.isNonModal&&jsx("div",{...xe,className:a$6(g,c(p,d$1),"BaselineUI-Popover-Underlay")}),jsxs(motion.div,{...c$1(v,Ne),style:F,ref:Z,className:a$6(e,c(n,d$1),"BaselineUI-Popover-ContentContainer"),"data-placement":et.find(g=>w?.includes(g))??"",children:[m?jsx(ye,{placement:He,arrowProps:Ie}):null,jsx(a$8,{onDismiss:e$1.close}),jsx("div",{...o,style:d(f$1,d$1),className:a$6(f,c(c$2,d$1),"BaselineUI-Popover-Content"),children:typeof s=="function"?s(e$1):s}),jsx(a$8,{onDismiss:e$1.close})]})]})});z.displayName="PopoverContentCore";var ot=be.forwardRef(({state:r,overlayProps:t,portalContainer:n,...a},e)=>{let{state:o,overlayTriggerAria:{overlayProps:p},triggerRef:s}=useContext(a$9),[m,l]=useState({}),i=a$1(n),c=r||o,f=a.triggerRef||s,C=t||p;a$a(f);let[u,b]=useState(null),x=be.useCallback(A=>{b(A);},[i]);return jsx(Pe,{isOpen:c?.isOpen??false,popoverContent:u,portalContainer:i,style:m,children:c?.isOpen?jsx(z,{ref:e,...a,triggerRef:f,overlayProps:C,state:c,portalContainer:i,setPopoverStyle:l,popoverContainerRef:x}):null})});ot.displayName="PopoverContent";
|
|
11
11
|
export{ot as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {b as b$1}from'./chunk-
|
|
1
|
+
import {b as b$1}from'./chunk-TCCQDGMI.mjs';import {a as a$1}from'./chunk-2UUKKXBD.mjs';import {a}from'./chunk-ZGRRD3TU.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {c}from'./chunk-TZ4MVY4E.mjs';import {a as a$2}from'./chunk-4QEH5CGK.mjs';import {MotionConfig,MotionGlobalConfig}from'motion/react';export{MotionGlobalConfig as f}from'motion/react';import {lightTheme,themes,themeVars}from'@baseline-ui/tokens';import {assignInlineVars}from'@vanilla-extract/dynamic';import J,{createContext,useMemo,useEffect,useState}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
|