@baseline-ui/core 3.5.0 → 3.6.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/Actionable.mjs +1 -1
- package/dist/AlertDialog.mjs +1 -1
- package/dist/AudioPlayer.mjs +1 -1
- package/dist/Breadcrumbs.css +10 -0
- package/dist/Breadcrumbs.mjs +1 -0
- 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/I18nProvider.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/MessageFormat.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/Slider.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-UOWKAUCQ.mjs → chunk-23WMOYTQ.mjs} +2 -2
- package/dist/chunk-266F6F4Y.mjs +10 -0
- package/dist/{chunk-5G6JNQQR.mjs → chunk-2CXZQGP5.mjs} +1 -1
- package/dist/{chunk-JRCDMRIW.mjs → chunk-2KX2HY2H.mjs} +1 -1
- package/dist/{chunk-NMK4W6K3.mjs → chunk-3PU6C5US.mjs} +1 -1
- package/dist/{chunk-ZA2FH3MS.mjs → chunk-3RWM6E56.mjs} +1 -1
- package/dist/{chunk-KW3BKIG4.mjs → chunk-3YVVIFY7.mjs} +1 -1
- package/dist/{chunk-TTVYMCU3.mjs → chunk-42SQX2EB.mjs} +1 -1
- package/dist/{chunk-3M3WJHOI.mjs → chunk-4T7P66ZA.mjs} +1 -1
- package/dist/{chunk-UO75BAPM.mjs → chunk-4Y4WKIL5.mjs} +1 -1
- package/dist/chunk-6DETJFO2.mjs +10 -0
- package/dist/chunk-6DYTFYPO.mjs +10 -0
- package/dist/{chunk-3DWFAHR2.mjs → chunk-6GV3YWV7.mjs} +1 -1
- package/dist/{chunk-2M2LI4MI.mjs → chunk-6LP7UKPC.mjs} +1 -1
- package/dist/chunk-6M77HEKA.mjs +10 -0
- package/dist/chunk-6Z3GYFG5.mjs +10 -0
- package/dist/{chunk-7XGNJE7J.mjs → chunk-7DCQF3EP.mjs} +1 -1
- package/dist/{chunk-QWZBZ23U.mjs → chunk-7HVUCDKZ.mjs} +1 -1
- package/dist/{chunk-3KWSJRYK.mjs → chunk-7KZEJYIU.mjs} +1 -1
- package/dist/{chunk-6GMU63H2.mjs → chunk-7OUGARUO.mjs} +1 -1
- package/dist/{chunk-GLAMJIYO.mjs → chunk-AMLFQDKI.mjs} +1 -1
- package/dist/{chunk-676DOXEK.mjs → chunk-ARCCPNHM.mjs} +2 -2
- package/dist/{chunk-OWQRYRWF.mjs → chunk-C2B7L5CL.mjs} +1 -1
- package/dist/chunk-EIB7MPRA.mjs +10 -0
- package/dist/{chunk-LKSUUT3M.mjs → chunk-F67SYAEW.mjs} +1 -1
- package/dist/{chunk-2AKHB7Y5.mjs → chunk-FF7H33Z5.mjs} +1 -1
- package/dist/{chunk-GL5GUKT7.mjs → chunk-FX3THTOK.mjs} +1 -1
- package/dist/{chunk-D5VU5TED.mjs → chunk-G2T6UJ66.mjs} +1 -1
- package/dist/{chunk-FGSVPRDN.mjs → chunk-GAT5QH2M.mjs} +1 -1
- package/dist/{chunk-X5ZTXDQ4.mjs → chunk-GDIKHTP3.mjs} +1 -1
- package/dist/{chunk-PLZ6ZFEO.mjs → chunk-GJTOYWLJ.mjs} +1 -1
- package/dist/chunk-GTHN5ZCZ.mjs +10 -0
- package/dist/{chunk-XQC3DSTW.mjs → chunk-GYKBMDSJ.mjs} +1 -1
- package/dist/{chunk-43LOJ3SH.mjs → chunk-HCQI7MNN.mjs} +1 -1
- package/dist/{chunk-LBHZV4BO.mjs → chunk-HJGMXLKN.mjs} +1 -1
- package/dist/{chunk-ONBEVR2G.mjs → chunk-IC5SBDP3.mjs} +1 -1
- package/dist/{chunk-7MLFM55C.mjs → chunk-IDIZSV2Y.mjs} +1 -1
- package/dist/chunk-IGM72PUL.mjs +0 -0
- package/dist/{chunk-AFOW62QN.mjs → chunk-INFMXVHD.mjs} +1 -1
- package/dist/{chunk-O6FPWOHR.mjs → chunk-J2KZM2I2.mjs} +1 -1
- package/dist/{chunk-WFYFHANE.mjs → chunk-JHA7DIPG.mjs} +1 -1
- package/dist/{chunk-AMVX34SS.mjs → chunk-JKOCFSBH.mjs} +1 -1
- package/dist/{chunk-DAI7V4TE.mjs → chunk-JTKDC2CM.mjs} +1 -1
- package/dist/{chunk-5G7ABQYJ.mjs → chunk-K4N2ADJO.mjs} +1 -1
- package/dist/{chunk-TFSBTGTQ.mjs → chunk-KQOXSF4J.mjs} +1 -1
- package/dist/{chunk-SBGZCLF4.mjs → chunk-KX2GDQKJ.mjs} +1 -1
- package/dist/{chunk-7BE6MOPW.mjs → chunk-LRF3YZWU.mjs} +2 -2
- package/dist/{chunk-BET5GVGQ.mjs → chunk-LV5AUNI2.mjs} +1 -1
- package/dist/{chunk-7P7VZMTO.mjs → chunk-NWWH62TU.mjs} +1 -1
- package/dist/{chunk-YFBMCK5O.mjs → chunk-O4YMXTNR.mjs} +1 -1
- package/dist/chunk-PCR5FD43.mjs +10 -0
- package/dist/{chunk-Z3ZMWJSV.mjs → chunk-PR3CD3UC.mjs} +2 -2
- package/dist/chunk-Q6R75IOP.mjs +10 -0
- package/dist/chunk-QC76UPJB.mjs +29 -0
- package/dist/{chunk-X5ORCNAU.mjs → chunk-QUWRO3HT.mjs} +1 -1
- package/dist/{chunk-3UC5V5E3.mjs → chunk-RE7ZGPOY.mjs} +1 -1
- package/dist/{chunk-6M7PJXEE.mjs → chunk-RFVLSR2P.mjs} +1 -1
- package/dist/{chunk-YYU46XNM.mjs → chunk-RFVPGD6N.mjs} +1 -1
- package/dist/chunk-RINS2TBF.mjs +10 -0
- package/dist/{chunk-MCN5JU6E.mjs → chunk-RITIRWKN.mjs} +1 -1
- package/dist/chunk-RUHZRYDJ.mjs +10 -0
- package/dist/{chunk-UH6QIGD3.mjs → chunk-RXVMJVRX.mjs} +1 -1
- package/dist/{chunk-DO5YROCG.mjs → chunk-SH7ZI4CA.mjs} +1 -1
- package/dist/{chunk-2WA3KB7H.mjs → chunk-TDRN6VLD.mjs} +1 -1
- package/dist/chunk-TTJTZLW5.mjs +10 -0
- package/dist/{chunk-VXZT2JR2.mjs → chunk-UY76QEJC.mjs} +1 -1
- package/dist/{chunk-ABXTAFKP.mjs → chunk-VJUSOXPW.mjs} +1 -1
- package/dist/{chunk-5W67PVZQ.mjs → chunk-VZ5CLAIL.mjs} +2 -2
- package/dist/{chunk-USUPPN73.mjs → chunk-WB7EFOP7.mjs} +1 -1
- package/dist/chunk-WDWBYTJG.mjs +10 -0
- package/dist/{chunk-UYUYQFOW.mjs → chunk-XDTZXNGJ.mjs} +1 -1
- package/dist/{chunk-7XLBV46W.mjs → chunk-XG6JJCCJ.mjs} +1 -1
- package/dist/{chunk-BAIVRB2I.mjs → chunk-XKUZVQ2A.mjs} +1 -1
- package/dist/{chunk-SI5WP6I7.mjs → chunk-XO7MAUFC.mjs} +1 -1
- package/dist/{chunk-CTBCJZEG.mjs → chunk-XSORBGUU.mjs} +1 -1
- package/dist/{chunk-AN26QORL.mjs → chunk-XYK5KKOH.mjs} +1 -1
- package/dist/{chunk-CENNHSIS.mjs → chunk-ZC5WXVNV.mjs} +1 -1
- package/dist/{chunk-QXXKOFWM.mjs → chunk-ZI7HJRJA.mjs} +1 -1
- package/dist/{chunk-LQ7PGSP4.mjs → chunk-ZNLIC44U.mjs} +1 -1
- package/dist/chunk-ZP6QG5FX.mjs +10 -0
- package/dist/{chunk-EL5OYHOX.mjs → chunk-ZXEWW3E7.mjs} +1 -1
- package/dist/{chunk-UPJHL37C.mjs → chunk-ZZ7YJ2FN.mjs} +1 -1
- package/dist/hooks/useDevice.mjs +1 -1
- package/dist/hooks/useI18n.mjs +1 -1
- package/dist/hooks/useIntersectionObserver.mjs +1 -1
- package/dist/hooks/useLiveInteractionModality.mjs +1 -1
- package/dist/hooks/useMedia.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/index.css +1 -1
- package/dist/index.d.ts +86 -12
- package/dist/index.js +21 -21
- package/dist/index.mjs +1 -1
- package/dist/messageIds.mjs +1 -1
- package/dist/utils/colors.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/intl/ar.json +2 -0
- package/intl/cs.json +2 -0
- package/intl/cy.json +2 -0
- package/intl/da.json +2 -0
- package/intl/de.json +2 -0
- package/intl/el.json +2 -0
- package/intl/en-GB.json +2 -0
- package/intl/en.json +2 -0
- package/intl/es.json +2 -0
- package/intl/fi.json +2 -0
- package/intl/fr-CA.json +2 -0
- package/intl/fr.json +2 -0
- package/intl/he.json +2 -0
- package/intl/hr.json +2 -0
- package/intl/id.json +2 -0
- package/intl/it.json +2 -0
- package/intl/ja.json +2 -0
- package/intl/ko.json +2 -0
- package/intl/ms.json +2 -0
- package/intl/nb-NO.json +2 -0
- package/intl/nl.json +2 -0
- package/intl/pl.json +2 -0
- package/intl/pt-PT.json +2 -0
- package/intl/pt.json +2 -0
- package/intl/ru.json +2 -0
- package/intl/sk.json +2 -0
- package/intl/sl.json +2 -0
- package/intl/sv.json +2 -0
- package/intl/th.json +2 -0
- package/intl/tr.json +2 -0
- package/intl/uk.json +2 -0
- package/intl/zh-Hans.json +2 -0
- package/intl/zh-Hant.json +2 -0
- package/messages.json +8 -0
- package/package.json +4 -4
- package/sbom.json +6 -6
- package/dist/chunk-46RUOB4U.mjs +0 -29
- package/dist/chunk-AYQN3OH2.mjs +0 -10
- package/dist/chunk-FNCHBVLF.mjs +0 -10
- package/dist/chunk-OMWMNUTI.mjs +0 -10
- package/dist/chunk-R6Q7UMQS.mjs +0 -10
- package/dist/chunk-T6J7G3YL.mjs +0 -10
- package/dist/chunk-UYAFH4CW.mjs +0 -10
- package/dist/chunk-X7CKWYUD.mjs +0 -10
- package/dist/chunk-Y3HXPORF.mjs +0 -10
- package/dist/chunk-YMYMFVW4.mjs +0 -10
- package/dist/chunk-YQHHE5AT.mjs +0 -10
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {a}from'./chunk-Q6R75IOP.mjs';import {p,i,l,j as j$1,a as a$7}from'./chunk-6Z3GYFG5.mjs';import {b as b$1}from'./chunk-KG2EHFYA.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {e,h as h$1,c,d}from'./chunk-RINS2TBF.mjs';import {a as a$6}from'./chunk-66CUIXA6.mjs';import {a as a$2}from'./chunk-STMDFIUL.mjs';import {a as a$1}from'./chunk-B3EZOXNU.mjs';import {c as c$1}from'./chunk-3WKDIXCM.mjs';import {a as a$3}from'./chunk-SVIYLH7R.mjs';import {c as c$2}from'./chunk-ETM4MNG4.mjs';import {a as a$4}from'./chunk-JQQGRJ5J.mjs';import {a as a$5}from'./chunk-4QEH5CGK.mjs';import {CaretLeftIcon,CaretRightIcon}from'@baseline-ui/icons/8';import _,{createContext,forwardRef,useContext}from'react';import {jsx,jsxs,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 W={"ar-AE":{breadcrumbs:"\u0639\u0646\u0627\u0635\u0631 \u0627\u0644\u0648\u0627\u062C\u0647\u0629"},"bg-BG":{breadcrumbs:"\u0422\u0440\u043E\u0445\u0438 \u0445\u043B\u044F\u0431"},"cs-CZ":{breadcrumbs:"Popis cesty"},"da-DK":{breadcrumbs:"Br\xF8dkrummer"},"de-DE":{breadcrumbs:"Breadcrumbs"},"el-GR":{breadcrumbs:"\u03A0\u03BB\u03BF\u03B7\u03B3\u03AE\u03C3\u03B5\u03B9\u03C2 breadcrumb"},"en-US":{breadcrumbs:"Breadcrumbs"},"es-ES":{breadcrumbs:"Migas de pan"},"et-EE":{breadcrumbs:"Lingiread"},"fi-FI":{breadcrumbs:"Navigointilinkit"},"fr-FR":{breadcrumbs:"Chemin de navigation"},"he-IL":{breadcrumbs:"\u05E9\u05D1\u05D9\u05DC\u05D9 \u05E0\u05D9\u05D5\u05D5\u05D8"},"hr-HR":{breadcrumbs:"Navigacijski putovi"},"hu-HU":{breadcrumbs:"Morzsamen\xFC"},"it-IT":{breadcrumbs:"Breadcrumb"},"ja-JP":{breadcrumbs:"\u30D1\u30F3\u304F\u305A\u30EA\u30B9\u30C8"},"ko-KR":{breadcrumbs:"\uD0D0\uC0C9 \uD45C\uC2DC"},"lt-LT":{breadcrumbs:"Nar\u0161ymo kelias"},"lv-LV":{breadcrumbs:"Atpaka\u013Cce\u013Ci"},"nb-NO":{breadcrumbs:"Navigasjonsstier"},"nl-NL":{breadcrumbs:"Broodkruimels"},"pl-PL":{breadcrumbs:"Struktura nawigacyjna"},"pt-BR":{breadcrumbs:"Caminho detalhado"},"pt-PT":{breadcrumbs:"Categorias"},"ro-RO":{breadcrumbs:"Miez de p\xE2ine"},"ru-RU":{breadcrumbs:"\u041D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044F"},"sk-SK":{breadcrumbs:"Naviga\u010Dn\xE9 prvky Breadcrumbs"},"sl-SI":{breadcrumbs:"Drobtine"},"sr-SP":{breadcrumbs:"Putanje navigacije"},"sv-SE":{breadcrumbs:"S\xF6kv\xE4gar"},"tr-TR":{breadcrumbs:"\u0130\xE7erik haritalar\u0131"},"uk-UA":{breadcrumbs:"\u041D\u0430\u0432\u0456\u0433\u0430\u0446\u0456\u0439\u043D\u0430 \u0441\u0442\u0435\u0436\u043A\u0430"},"zh-CN":{breadcrumbs:"\u5BFC\u822A\u680F"},"zh-TW":{breadcrumbs:"\u5C0E\u89BD\u5217"}};function L(i){let{"aria-label":e,...r}=i,a=b$1(W,"@react-aria/breadcrumbs");return {navProps:{...a$3(r,{labelable:true}),"aria-label":e||a.format("breadcrumbs")}}}var D=createContext(null),N=forwardRef(function(e$1,r){[e$1,r]=e(e$1,r,D);let a$4=e$1.href&&!e$1.isDisabled?"a":"span",{linkProps:o,isPressed:t}=a({...e$1,elementType:a$4},r),d=h$1[a$4],{hoverProps:l,isHovered:n}=a$1(e$1),{focusProps:p,isFocused:z,isFocusVisible:m}=a$2(),u=c({...e$1,defaultClassName:"react-aria-Link",values:{isCurrent:!!e$1["aria-current"],isDisabled:e$1.isDisabled||false,isPressed:t,isHovered:n,isFocused:z,isFocusVisible:m}}),c$2=a$3(e$1,{global:true});return delete c$2.onClick,jsx(d,{ref:r,slot:e$1.slot||void 0,...c$1(c$2,u,o,l,p),"data-focused":z||void 0,"data-hovered":n||void 0,"data-pressed":t||void 0,"data-focus-visible":m||void 0,"data-current":!!e$1["aria-current"]||void 0,"data-disabled":e$1.isDisabled||void 0,children:u.children})});var h=createContext(null),O=forwardRef(function(e$1,r){[e$1,r]=e(e$1,r,h);let{CollectionRoot:a}=useContext(p),{navProps:o}=L(e$1),t=a$3(e$1,{global:true,labelable:true});return jsx(i,{content:jsx(l,{...e$1}),children:d=>jsx(h$1.ol,{render:e$1.render,ref:r,...c$1(t,o),slot:e$1.slot||void 0,style:e$1.style,className:e$1.className??"react-aria-Breadcrumbs",children:jsx(h.Provider,{value:e$1,children:jsx(a,{collection:d})})})})}),M=class extends a$7{static type="item"},j=j$1(M,function(e,r,a){let o=a.nextKey==null,{isDisabled:t,onAction:d$1}=d(h),l={"aria-current":o?"page":void 0,isDisabled:t||o,onPress:()=>d$1?.(a.key)},n=c({...a.props,children:a.rendered,values:{isDisabled:t||o,isCurrent:o},defaultClassName:"react-aria-Breadcrumb"}),p=a$3(e,{global:true,labelable:true});return delete p.id,jsx(h$1.li,{...p,...n,ref:r,"data-disabled":t||o||void 0,"data-current":o||void 0,children:jsx(D.Provider,{value:l,children:n.children})})});var Z="_1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z63l _1yep5z63m _1yep5z63n _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6jb _1yep5z6jc _1yep5z6jd _1yep5z6g3",Q=a$4({defaultClassName:"oi1ctg9 _1yep5z6jb _1yep5z6jc _1yep5z6jd _1yep5z6f9",variantClassNames:{isHovered:{true:"_1yep5z611t"},isDisabled:{true:"_1yep5z61od"},isDimmed:{true:"oi1ctgc"}},defaultVariants:{},compoundVariants:[]}),X="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z69o _1yep5z69p _1yep5z69q",Y=a$4({defaultClassName:"oi1ctg6",variantClassNames:{isCurrent:{true:"oi1ctg7",false:"oi1ctg8"}},defaultVariants:{},compoundVariants:[]}),$=a$4({defaultClassName:"oi1ctg1 _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z63l _1yep5z63m _1yep5z63n _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6jb _1yep5z6jc _1yep5z6jd _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6dy _1yep5z6ey _1yep5z6m5",variantClassNames:{isHovered:{true:"_1yep5z611i"},isFocusVisible:{true:"oi1ctg3"},isCurrent:{true:"oi1ctg4"},isDisabled:{true:"oi1ctg5 _1yep5z61o4"}},defaultVariants:{},compoundVariants:[]}),ee="oi1ctg0 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z69o _1yep5z69p _1yep5z69q",re="_1yep5z6jb _1yep5z6jc _1yep5z6jd _1yep5z6fa";var te=_.createContext({disabledKeys:new Set,separator:null}),se=_.forwardRef(({children:i,onAction:e,isDisabled:r,disabledKeys:a,separator:o,className:t,id:d,"aria-label":l,"aria-labelledby":n,...p},z)=>{let{direction:m}=b(),u=m==="rtl"?CaretLeftIcon:CaretRightIcon,c=c$2(),C=d??c,{navProps:b$1}=L({id:C,"aria-label":l,"aria-labelledby":n}),P=_.useMemo(()=>({disabledKeys:new Set(a),isDisabled:r,separator:o===void 0?jsx(u,{size:8}):o}),[a,r,o,u]);return jsx("nav",{...p,...b$1,ref:z,className:a$5("BaselineUI-Breadcrumbs",t),children:jsx(te.Provider,{value:P,children:jsx(O,{className:ee,"aria-labelledby":n??C,onAction:e,isDisabled:r,children:i})})})});se.displayName="Breadcrumbs";var ie=_.forwardRef(({id:i,label:e,icon:r,"aria-label":a,href:o,children:t,className:d,...l},n)=>{let{disabledKeys:p,isDisabled:z,separator:m}=_.useContext(te),u=m!==null&&m!==false&&m!=="",c=z||p.has(i),C=_.Children.toArray(t).some(b=>b!=="");return a$6(C||e||a,"Breadcrumb requires a `label`, an `aria-label`, or `children`."),jsx(j,{...l,ref:n,id:i,className:a$5(X,d),children:({isCurrent:b})=>jsxs(Fragment,{children:[C?t:jsx(N,{"aria-label":a,href:o,className:({isHovered:P,isFocusVisible:B})=>$({isHovered:P,isFocusVisible:B,isCurrent:b,isDisabled:c}),isDisabled:c||void 0,children:({isHovered:P})=>{let B=r?jsx("span",{className:Q({isHovered:P,isDisabled:c,isDimmed:!b&&(P||c)}),children:jsx(r,{size:16})}):null;return jsxs(Fragment,{children:[e&&B?jsx("span",{className:Z,children:B}):B,e?jsx("span",{className:Y({isCurrent:b}),children:e}):null]})}}),!b&&u?jsx("span",{"aria-hidden":"true",className:re,"data-testid":"breadcrumbs-separator",children:m}):null]})})});ie.displayName="Breadcrumb";export{se as a,ie as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$2}from'./chunk-KVIV5RTE.mjs';import {c,d,e,f,i,g,h as h$1}from'./chunk-
|
|
1
|
+
import {a as a$2}from'./chunk-KVIV5RTE.mjs';import {c,d,e,f,i,g,h as h$1}from'./chunk-23WMOYTQ.mjs';import {a as a$4}from'./chunk-OVJT5F2R.mjs';import {c as c$2}from'./chunk-6DYTFYPO.mjs';import {a as a$3}from'./chunk-TAT552A5.mjs';import {l}from'./chunk-6Z3GYFG5.mjs';import {b,c as c$1}from'./chunk-IDIZSV2Y.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$1}from'./chunk-4QEH5CGK.mjs';import {CaretDownIcon}from'@baseline-ui/icons/12';import p from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -7,4 +7,4 @@ import {a as a$2}from'./chunk-KVIV5RTE.mjs';import {c,d,e,f,i,g,h as h$1}from'./
|
|
|
7
7
|
* This notice may not be removed from this file.
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
var R=a({defaultClassName:"_1enn18vd _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6m6",variantClassNames:{isFocusVisible:{true:"_1yep5z614w _1yep5z618s _1yep5z618q _1yep5z618t"}},defaultVariants:{},compoundVariants:[]}),z=a({defaultClassName:"_1enn18v2 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6dw _1yep5z6f1 _1yep5z6g9 _1yep5z6m6",variantClassNames:{allowsSorting:{true:"_1enn18v3"},isFocusVisible:{true:"_1yep5z614w _1yep5z618s _1yep5z618q _1yep5z618t"}},defaultVariants:{},compoundVariants:[]}),I=a({defaultClassName:"_1enn18vi _1yep5z6m8 _1yep5z6m7 _1yep5z6is _1yep5z6lq",variantClassNames:{isDropTarget:{true:"_1yep5z614w"}},defaultVariants:{},compoundVariants:[]}),w=a({defaultClassName:"_1enn18v8 _1yep5z6m6 _1yep5z6lt _1yep5z6lq",variantClassNames:{isHovered:{true:"_1yep5z612t"},isSelected:{true:"_1yep5z612u"},isFocusVisible:{true:"_1yep5z614w _1yep5z618s _1yep5z618q _1yep5z618t"},isDisabled:{true:"_1enn18vc"}},defaultVariants:{},compoundVariants:[]}),P=a({defaultClassName:"_1enn18vf",variantClassNames:{sortDirection:{ascending:"_1enn18vg",descending:"_1enn18vh"}},defaultVariants:{},compoundVariants:[]}),B="_1enn18v5",E="_1enn18v0",H="_1enn18v1",S="_1enn18v6",h="_1enn18v7";var L=p.forwardRef(({className:e,style:r,...a},t)=>jsx(c,{ref:t,className:o=>a$1(typeof e=="function"?e(o):e,E,"BaselineUI-Table"),style:r,...a}));L.displayName="Table";var M=p.forwardRef(({className:e,style:r,...a},t)=>jsx(d,{ref:t,className:o=>a$1(typeof e=="function"?e(o):e,H,"BaselineUI-TableHeader"),style:r,...a}));M.displayName="TableHeader";var A=p.forwardRef(({className:e$1,style:r,children:a,...t},o)=>jsx(e,{ref:o,className:n=>a$1(typeof e$1=="function"?e$1(n):e$1,z({allowsSorting:n.allowsSorting,isFocusVisible:n.isFocusVisible}),"BaselineUI-Column"),style:r,...t,children:n=>jsxs(Fragment,{children:[typeof a=="function"?a(n):a,n.allowsSorting&&n.sortDirection?jsx(CaretDownIcon,{className:P({sortDirection:n.sortDirection}),"aria-hidden":"true"}):null]})}));A.displayName="Column";var V=p.forwardRef(({children:e,className:r,dependencies:a,isLoading:t,items:o,onLoadMore:n,scrollOffset:U,loadingLabel:k,style:q,...j},K)=>{let{formatMessage:G}=b();return process.env.NODE_ENV!=="production"&&t&&!n&&console.warn("[Baseline UI] TableBody: `isLoading` is set but `onLoadMore` is not provided. The loading spinner will not be displayed. Either provide `onLoadMore` or remove `isLoading`."),jsxs(f,{ref:K,className:J=>a$1(typeof r=="function"?r(J):r,B,"BaselineUI-TableBody"),style:q,...j,children:[o&&typeof e=="function"?jsx(l,{items:o,dependencies:a,children:e}):typeof e=="function"?null:e,n?jsx(i,{className:a$1(S,"BaselineUI-TableLoadMoreItem"),isLoading:t,onLoadMore:n,scrollOffset:U,children:t?jsx("div",{className:a$1(h,"BaselineUI-TableLoadMoreItemContent"),children:jsx(a$2,{"aria-label":k??G(W.loading),size:"sm"})}):null}):null]})});V.displayName="TableBody";var N=p.forwardRef(({className:e,style:r,...a},t)=>jsx(g,{ref:t,className:o=>a$1(typeof e=="function"?e(o):e,w({isHovered:o.isHovered,isSelected:o.isSelected,isFocusVisible:o.isFocusVisible,isDisabled:o.isDisabled}),"BaselineUI-Row"),style:r,...a}));N.displayName="Row";var F=p.forwardRef(({className:e,style:r,...a},t)=>jsx(h$1,{ref:t,className:o=>a$1(typeof e=="function"?e(o):e,R({isFocusVisible:o.isFocusVisible}),"BaselineUI-Cell"),style:r,...a}));F.displayName="Cell";var W=c$1({loading:{defaultMessage:"Loading",id:"bui.table.loading"}});function Y(e){let{scrollRef:r,...a}=e;return a$3({ref:r??{current:null},isDisabled:!r}),a$4({getItems:t=>[...t].map(o=>({"text/plain":String(o)})),renderDropIndicator(t
|
|
10
|
+
var R=a({defaultClassName:"_1enn18vd _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6m6",variantClassNames:{isFocusVisible:{true:"_1yep5z614w _1yep5z618s _1yep5z618q _1yep5z618t"}},defaultVariants:{},compoundVariants:[]}),z=a({defaultClassName:"_1enn18v2 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6dw _1yep5z6f1 _1yep5z6g9 _1yep5z6m6",variantClassNames:{allowsSorting:{true:"_1enn18v3"},isFocusVisible:{true:"_1yep5z614w _1yep5z618s _1yep5z618q _1yep5z618t"}},defaultVariants:{},compoundVariants:[]}),I=a({defaultClassName:"_1enn18vi _1yep5z6m8 _1yep5z6m7 _1yep5z6is _1yep5z6lq",variantClassNames:{isDropTarget:{true:"_1yep5z614w"}},defaultVariants:{},compoundVariants:[]}),w=a({defaultClassName:"_1enn18v8 _1yep5z6m6 _1yep5z6lt _1yep5z6lq",variantClassNames:{isHovered:{true:"_1yep5z612t"},isSelected:{true:"_1yep5z612u"},isFocusVisible:{true:"_1yep5z614w _1yep5z618s _1yep5z618q _1yep5z618t"},isDisabled:{true:"_1enn18vc"}},defaultVariants:{},compoundVariants:[]}),P=a({defaultClassName:"_1enn18vf",variantClassNames:{sortDirection:{ascending:"_1enn18vg",descending:"_1enn18vh"}},defaultVariants:{},compoundVariants:[]}),B="_1enn18v5",E="_1enn18v0",H="_1enn18v1",S="_1enn18v6",h="_1enn18v7";var L=p.forwardRef(({className:e,style:r,...a},t)=>jsx(c,{ref:t,className:o=>a$1(typeof e=="function"?e(o):e,E,"BaselineUI-Table"),style:r,...a}));L.displayName="Table";var M=p.forwardRef(({className:e,style:r,...a},t)=>jsx(d,{ref:t,className:o=>a$1(typeof e=="function"?e(o):e,H,"BaselineUI-TableHeader"),style:r,...a}));M.displayName="TableHeader";var A=p.forwardRef(({className:e$1,style:r,children:a,...t},o)=>jsx(e,{ref:o,className:n=>a$1(typeof e$1=="function"?e$1(n):e$1,z({allowsSorting:n.allowsSorting,isFocusVisible:n.isFocusVisible}),"BaselineUI-Column"),style:r,...t,children:n=>jsxs(Fragment,{children:[typeof a=="function"?a(n):a,n.allowsSorting&&n.sortDirection?jsx(CaretDownIcon,{className:P({sortDirection:n.sortDirection}),"aria-hidden":"true"}):null]})}));A.displayName="Column";var V=p.forwardRef(({children:e,className:r,dependencies:a,isLoading:t,items:o,onLoadMore:n,scrollOffset:U,loadingLabel:k,style:q,...j},K)=>{let{formatMessage:G}=b();return process.env.NODE_ENV!=="production"&&t&&!n&&console.warn("[Baseline UI] TableBody: `isLoading` is set but `onLoadMore` is not provided. The loading spinner will not be displayed. Either provide `onLoadMore` or remove `isLoading`."),jsxs(f,{ref:K,className:J=>a$1(typeof r=="function"?r(J):r,B,"BaselineUI-TableBody"),style:q,...j,children:[o&&typeof e=="function"?jsx(l,{items:o,dependencies:a,children:e}):typeof e=="function"?null:e,n?jsx(i,{className:a$1(S,"BaselineUI-TableLoadMoreItem"),isLoading:t,onLoadMore:n,scrollOffset:U,children:t?jsx("div",{className:a$1(h,"BaselineUI-TableLoadMoreItemContent"),children:jsx(a$2,{"aria-label":k??G(W.loading),size:"sm"})}):null}):null]})});V.displayName="TableBody";var N=p.forwardRef(({className:e,style:r,...a},t)=>jsx(g,{ref:t,className:o=>a$1(typeof e=="function"?e(o):e,w({isHovered:o.isHovered,isSelected:o.isSelected,isFocusVisible:o.isFocusVisible,isDisabled:o.isDisabled}),"BaselineUI-Row"),style:r,...a}));N.displayName="Row";var F=p.forwardRef(({className:e,style:r,...a},t)=>jsx(h$1,{ref:t,className:o=>a$1(typeof e=="function"?e(o):e,R({isFocusVisible:o.isFocusVisible}),"BaselineUI-Cell"),style:r,...a}));F.displayName="Cell";var W=c$1({loading:{defaultMessage:"Loading",id:"bui.table.loading"}});function Y(e){let{scrollRef:r,...a}=e;return a$3({ref:r??{current:null},isDisabled:!r}),a$4({getItems:t=>[...t].map(o=>({"text/plain":String(o)})),renderDropIndicator(t){return jsx(c$2,{target:t,className:({isDropTarget:o})=>a$1(I({isDropTarget:o}),"BaselineUI-DropIndicator")})},...a})}export{L as a,M as b,A as c,V as d,N as e,F as f,Y as g};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {c}from'./chunk-HH4VLTF3.mjs';import {d}from'./chunk-F7WPMQ3P.mjs';import {o,r,s}from'./chunk-PPHSLODC.mjs';import {c as c$1}from'./chunk-3WKDIXCM.mjs';import {a}from'./chunk-SVIYLH7R.mjs';/**
|
|
2
|
+
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
+
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
+
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
+
* This notice may not be removed from this file.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
function h(e,t){let{elementType:c$2="a",onPress:m,onPressStart:L,onPressEnd:b,onPressChange:f,onClick:d$1,isDisabled:r$1,...A}=e,n={};c$2!=="a"&&(n={role:"link",tabIndex:r$1?void 0:0});let{focusableProps:O}=c(e,t),{pressProps:o$1,isPressed:x}=d({onPress:m,onPressStart:L,onPressEnd:b,onPressChange:f,onClick:d$1,isDisabled:r$1,ref:t}),D=a(A,{labelable:true}),M=c$1(O,o$1),E=o(),g=r(e);return {isPressed:x,linkProps:c$1(D,g,{...M,...n,"aria-disabled":r$1||void 0,"aria-current":e["aria-current"],onClick:s$1=>{o$1.onClick?.(s$1),s(s$1,E,e.href,e.routerOptions);}})}}export{h as a};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {a as a$q}from'./chunk-JI4SJ53O.mjs';import {a as a$9}from'./chunk-WB7EFOP7.mjs';import {a as a$2}from'./chunk-WDWBYTJG.mjs';import {b as b$4}from'./chunk-BPW4QRPV.mjs';import {a as a$r}from'./chunk-TDYBXLYP.mjs';import {a as a$o}from'./chunk-O7IU5NHN.mjs';import {b as b$b}from'./chunk-HZM2XZP4.mjs';import {b as b$7,a as a$m}from'./chunk-XYK5KKOH.mjs';import {b as b$5}from'./chunk-42SQX2EB.mjs';import {b as b$9,c as c$2}from'./chunk-GYKBMDSJ.mjs';import {f}from'./chunk-7OUGARUO.mjs';import {a as a$j}from'./chunk-5BAHJXOI.mjs';import {a as a$7}from'./chunk-FCKJCFMD.mjs';import {a as a$k}from'./chunk-NGZRN4SF.mjs';import {a as a$p}from'./chunk-7EQIV4GX.mjs';import {a as a$g}from'./chunk-ZI7HJRJA.mjs';import {a as a$h}from'./chunk-J2KZM2I2.mjs';import {a as a$i}from'./chunk-SH7ZI4CA.mjs';import {a as a$n}from'./chunk-6GV3YWV7.mjs';import {b as b$a,e as e$1}from'./chunk-RFVPGD6N.mjs';import {b as b$8,f as f$1}from'./chunk-UZ672WDX.mjs';import {a as a$b}from'./chunk-JZXLV6JU.mjs';import {a as a$e}from'./chunk-R6TFTLMV.mjs';import {c as c$1,b as b$2}from'./chunk-IDIZSV2Y.mjs';import {b as b$c}from'./chunk-INFMXVHD.mjs';import {a as a$a}from'./chunk-O7XK2WIX.mjs';import {a as a$c}from'./chunk-JTKDC2CM.mjs';import {a as a$l}from'./chunk-CIPPPD6E.mjs';import {a as a$d}from'./chunk-5IC46G5J.mjs';import {b as b$6,j as j$1}from'./chunk-MBRNO6IW.mjs';import {a as a$1}from'./chunk-FPM5UJRF.mjs';import {a as a$5}from'./chunk-RSKKEGJZ.mjs';import {a as a$3}from'./chunk-STMDFIUL.mjs';import {a as a$4}from'./chunk-B3EZOXNU.mjs';import {j}from'./chunk-KUDCYGII.mjs';import {e}from'./chunk-PPHSLODC.mjs';import {b as b$1,c}from'./chunk-3WKDIXCM.mjs';import {c as c$3}from'./chunk-ETM4MNG4.mjs';import {a as a$8,b as b$3,j as j$2,h}from'./chunk-SD43KVTU.mjs';import {a as a$f}from'./chunk-UBLCUHRL.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$6}from'./chunk-4QEH5CGK.mjs';import {BoldIcon,ItalicIcon,UnderlineIcon,ArrowUpCircleFilledIcon,AtIcon,XCircleFilledIcon,LinkIcon,XIcon}from'@baseline-ui/icons/20';import {layoutSprinkleValues,sprinkles}from'@baseline-ui/tokens';import mt,{useCallback,useImperativeHandle,useEffect,useRef,useState,useMemo,useLayoutEffect,useId,useContext,Fragment as Fragment$1}from'react';import {useGranularLayoutEffect}from'granular-hooks';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import Fr from'just-camel-case';import {QuestionmarkCircleIcon,TextIcon,HighlightTextIcon}from'@baseline-ui/icons/24';import*as Uo from'dompurify';import ni from'just-kebab-case';import {createPortal}from'react-dom';/**
|
|
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 Eo="f6jv6bm",vo="_1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z6k8 _1yep5z6k9 _1yep5z6ka",He="_1yep5z689 _1yep5z68a _1yep5z68b _1yep5z65x _1yep5z65y _1yep5z65z",Ro=a({defaultClassName:"f6jv6b0 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6g9",variantClassNames:{isInline:{true:"f6jv6b1"},isMinimal:{true:"_1yep5z6160 _1yep5z6161 _1yep5z6162 _1yep5z6w4 _1yep5z6w5 _1yep5z6w6 _1yep5z616i _1yep5z616j _1yep5z616k",false:"_1yep5z6163 _1yep5z6164 _1yep5z6165"}},defaultVariants:{},compoundVariants:[[{isInline:true,isMinimal:false},"_1yep5z61jn _1yep5z61jo _1yep5z61jp _1yep5z61kb _1yep5z61kc _1yep5z61kd _1yep5z61kz _1yep5z61l0 _1yep5z61l1 _1yep5z61ln _1yep5z61lo _1yep5z61lp _1yep5z61vj _1yep5z61vh _1yep5z61qi"]]}),ot=a({defaultClassName:"f6jv6b4 _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6e3 _1yep5z6ey _1yep5z6m6",variantClassNames:{isDisabled:{true:"f6jv6b5 _1yep5z611l"}},defaultVariants:{},compoundVariants:[]}),To="f6jv6b6",ko="f6jv6bj _1yep5z6x7 _1yep5z6x8 _1yep5z6x9 _1yep5z6xv _1yep5z6xw _1yep5z6xx _1yep5z6yj _1yep5z6yk _1yep5z6yl _1yep5z6z7 _1yep5z6z8 _1yep5z6z9",Co="f6jv6bk";var Mo="f6jv6bn _1yep5z63l _1yep5z63m _1yep5z63n _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6jb _1yep5z6jc _1yep5z6jd _1yep5z6me _1yep5z6m9 _1yep5z6m7 _1yep5z6id _1yep5z6ey",Lo=a({defaultClassName:"f6jv6bg _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6m6 _1yep5z6lq _1yep5z6lt _1yep5z6m5",variantClassNames:{isHovered:{true:"_1yep5z612u"},isDisabled:{true:"_1yep5z6zt"}},defaultVariants:{},compoundVariants:[]}),So="_1yep5z6ke _1yep5z6kf _1yep5z6kg",zo="f6jv6bf f6jv6bb _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6j5 _1yep5z6j6 _1yep5z6j7 _1yep5z6ey _1yep5z6e3 _1yep5z6m3",Po=a({defaultClassName:"f6jv6bc _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6kk _1yep5z6kl _1yep5z6km",variantClassNames:{isInline:{true:"_1yep5z6q7 _1yep5z6q8 _1yep5z6q9 _1yep5z6190 _1yep5z618y _1yep5z613z",false:"_1yep5z6qa _1yep5z6qb _1yep5z6qc _1yep5z6xm _1yep5z6xn _1yep5z6xo _1yep5z6ya _1yep5z6yb _1yep5z6yc _1yep5z6yy _1yep5z6yz _1yep5z6z0 _1yep5z6zm _1yep5z6zn _1yep5z6zo"}},defaultVariants:{},compoundVariants:[]}),Do="f6jv6bl",_o="f6jv6bb _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6j5 _1yep5z6j6 _1yep5z6j7 _1yep5z6ey",It=a({defaultClassName:"f6jv6b7",variantClassNames:{isInline:{true:"f6jv6b8",false:"f6jv6b9"}},defaultVariants:{},compoundVariants:[]}),Nt="f6jv6ba _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6jz _1yep5z6k0 _1yep5z6k1",rt="f6jv6bo";var wt=mt.forwardRef(({value:t,defaultValue:e,onChange:n,placeholder:o,spellCheck:r,textBoxRef:i,isInline:l,isMinimal:s,isDisabled:a,editableContentAriaLabel:c$1,editorHandle:u,autoFocus:d,saveOnEnter:f,onSave:p},m)=>{let h=mt.useRef(null),[C,D]=a$1(t,e||"",n),V=useCallback(x=>{D(x.currentTarget.value||"");},[D]),M=useCallback(x=>{a$2(x)||(f&&x.key==="Enter"&&!x.shiftKey||(x.ctrlKey||x.metaKey)&&x.key==="Enter")&&(x.preventDefault(),p());},[f,p]);useImperativeHandle(m,()=>({clear:()=>{D("");}}));let B=useCallback(x=>{x.currentTarget.style.height="16px",x.currentTarget.style.height=x.currentTarget.scrollHeight+"px";},[]);useGranularLayoutEffect(()=>{let x=h.current;x&&(x.style.height="16px",x.style.height=x.scrollHeight+"px");},[s],[C]),useImperativeHandle(u,()=>({setCaretPosition:x=>{h.current&&(h.current.focus(),h.current.setSelectionRange(x,x));},focus:()=>{h.current&&h.current.focus();}}));let S=d===true||d==="start"||d==="end",L=typeof d=="string"?d:void 0;useEffect(()=>{if(L&&h.current){let x=L==="start"?0:L==="end"?h.current.value.length:void 0;x!==void 0&&h.current.setSelectionRange(x,x);}},[L]);let{focusProps:q,isFocused:$,isFocusVisible:te}=a$3(),{hoverProps:g,isHovered:y}=a$4({}),R=a$5({"data-focus-visible":te,"data-hovered":y,"data-focused":$});return jsx("textarea",{...c(q,g,R),ref:b$1(h,i),className:a$6({[ot()]:!s,[It({isInline:l})]:!s,[_o]:!s,[zo]:s},"BaselineUI-Editor-PlainEditorEditingArea"),autoFocus:S,onChange:V,disabled:a,onInput:B,value:C,placeholder:o,spellCheck:r,"aria-label":c$1,onKeyDown:M})});wt.displayName="PlainEditor";var Ao=[["Toolbar Focus","Alt+F10"],["Bold","Ctrl+B"],["Italic","Ctrl+I"],["Underline","Ctrl+U"],["Select All","Ctrl+A"],["Cut","Ctrl+X"],["Copy","Ctrl+C"],["Paste","Ctrl+V"],["Undo","Ctrl+Z"],["Redo","Ctrl+Shift+Z"],["Submit","Ctrl+Enter"],["Open Help Dialog","Ctrl+Shift+H"]],{dialog:{row:it}}=layoutSprinkleValues,Oo=({isOpen:t,onClose:e,toolbarFocusLabel:n,helpLabel:o,closeLabel:r,actionLabel:i,shortcutLabel:l,boldLabel:s,italicLabel:a,underlineLabel:c,selectAllLabel:u,cutLabel:d,copyLabel:f,pasteLabel:p,undoLabel:m,redoLabel:h,openHelpDialogLabel:C,submitLabel:D})=>{let{formatMessage:V}=b$2(),M=c$3(),B={toolbarFocus:n,help:o,close:r,action:i,shortcut:l,bold:s,italic:a,underline:c,selectAll:u,cut:d,copy:f,paste:p,undo:m,redo:h,openHelpDialog:C,submit:D},S=L=>B[L]??V(Vr[L]);return jsx(b$a,{isOpen:t,onOpenChange:L=>{L||e();},children:jsx(e$1,{enableDrawer:"auto",style:{zIndex:999999},children:jsxs(a$i,{"aria-labelledby":M,className:ko,drawerBackground:"subtle",children:[jsxs(a$a,{paddingLeft:it.padding.horizontal.lg,paddingRight:it.padding.horizontal.sm,display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",backgroundColor:"background.primary.subtle",className:Co,children:[jsx(a$n,{id:M,elementType:"h3",type:"title",size:"md",children:S("help")}),jsx(a$c,{icon:XIcon,size:"md",variant:"secondary","aria-label":S("close"),"data-testid":"editor-help-dialog-close-button",onPress:e})]}),jsx(a$b,{className:Do}),jsxs(a$a,{paddingX:it.padding.horizontal.lg,role:"table","aria-labelledby":M,backgroundColor:"background.primary.subtle",children:[jsx("div",{role:"rowgroup",children:jsxs(a$a,{role:"row",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingY:it.padding.vertical.md,color:"text.primary",children:[jsx("h6",{className:sprinkles({typography:"heading.h6.semibold"}),role:"columnheader",children:S("action")}),jsx("h6",{className:sprinkles({typography:"heading.h6.semibold"}),role:"columnheader",style:{textTransform:"capitalize"},children:S("shortcut")})]})}),jsx("div",{role:"rowgroup",children:Ao.map(([L,q],$)=>jsxs(Fragment$1,{children:[jsxs(a$a,{role:"row",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingY:it.padding.vertical.xs,style:{minHeight:40},children:[jsx(a$n,{type:"subtitle",size:"sm",role:"cell",children:S(Fr(L))}),jsx(a$n,{elementType:"kbd",type:"subtitle",size:"sm",role:"cell",children:a$o(q,true)})]}),$!==Ao.length-1&&jsx(a$b,{})]},L))})]})]})})})},Vr=c$1({toolbarFocus:{id:"bui.editor.toolbarFocus",defaultMessage:"Toolbar Focus"},help:{id:"bui.editor.help",defaultMessage:"Help"},close:{id:"bui.editor.close",defaultMessage:"Close"},action:{id:"bui.editor.action",defaultMessage:"Action"},shortcut:{id:"bui.editor.shortcut",defaultMessage:"Shortcut"},bold:{id:"bui.editor.bold",defaultMessage:"Bold"},italic:{id:"bui.editor.italic",defaultMessage:"Italic"},underline:{id:"bui.editor.underline",defaultMessage:"Underline"},selectAll:{id:"bui.editor.selectAll",defaultMessage:"Select All"},cut:{id:"bui.editor.cut",defaultMessage:"Cut"},copy:{id:"bui.editor.copy",defaultMessage:"Copy"},paste:{id:"bui.editor.paste",defaultMessage:"Paste"},undo:{id:"bui.editor.undo",defaultMessage:"Undo"},redo:{id:"bui.editor.redo",defaultMessage:"Redo"},openHelpDialog:{id:"bui.editor.openHelpDialog",defaultMessage:"Open Help Dialog"},submit:{id:"bui.editor.submit",defaultMessage:"Submit"}});var Wr=a$7("#ffffff00").toString("hexa"),dn=[{label:"Red",color:"#ff0000"},{label:"Green",color:"#00ff00"},{label:"Blue",color:"#0000ff"},{label:"Yellow",color:"#ffff00"},{label:"Cyan",color:"#00ffff"},{label:"Magenta",color:"#ff00ff"},{label:"Black",color:"#000000"},{label:"White",color:"#ffffff"},{label:"Gray",color:"#808080"},{label:"Orange",color:"#ffa500"},{label:"Brown",color:"#a52a2a"},{label:"Purple",color:"#800080"}];[...dn,{label:"Transparent",color:Wr}];var Ke="p",Z="a",ae="mention",Ee="mention_input";function un(t,e){return typeof t=="object"&&t!==null&&"type"in t&&t.type===e}function b(t){return typeof t=="object"&&t!==null&&"text"in t&&!("type"in t)}function k(t){return un(t,Z)}function ce(t){return un(t,ae)}function me(t){return un(t,Ee)}function J(t){return ce(t)||me(t)}function Fe(){return [{type:Ke,children:[{text:""}]}]}function At(t,e){return t.bold===e.bold&&t.italic===e.italic&&t.underline===e.underline&&b$b(t.color,e.color)&&b$b(t.backgroundColor,e.backgroundColor)}function Ot(t,e){let n=false;for(let i=0;i<t.length;i++){let l=t[i];if(l.text===""&&!(e&&t.length===1)){n=true;break}if(i>0&&At(t[i-1],l)){n=true;break}}if(!n)return t;let o=t.filter(i=>i.text!==""),r=[];for(let i of o){let l=r.at(-1);l!==void 0&&At(l,i)?r[r.length-1]={...l,text:l.text+i.text}:r.push(i);}return r}function qr(t){let e=(i,l)=>i===0&&l===t.length||i>0&&J(t[i-1]),n=false,o=-1;for(let i=0;i<=t.length;i++){let l=t[i],s=i<t.length&&b(l);if(s&&o===-1)o=i;else if(!s&&o!==-1){let a=t.slice(o,i);if(Ot(a,e(o,i))!==a){n=true;break}o=-1;}}if(!n)return t;let r=[];o=-1;for(let i=0;i<=t.length;i++){let l=t[i],s=i<t.length&&b(l);if(s&&o===-1)o=i;else if(!s&&o!==-1){let a=t.slice(o,i),c=Ot(a,e(o,i));for(let u of c)r.push(u);o=-1;}!s&&i<t.length&&r.push(l);}return r}function $r(t){let e=false;for(let o=1;o<t.length;o++){let r=t[o-1],i=t[o];if(k(r)&&k(i)&&r.url===i.url){e=true;break}}if(!e)return t;let n=[];for(let o of t){let r=n.at(-1);if(k(o)&&r!==void 0&&k(r)&&r.url===o.url){let i=Ot([...r.children,...o.children],false);n[n.length-1]={...r,children:i};}else n.push(o);}return n}function Gr(t){let e=Ot(t.children,t.children.length===1);return e.reduce((o,r)=>o+r.text,"")===""?null:e===t.children?t:{...t,children:e}}function Xr(t){let e=false,n=[];for(let a of t)if(k(a)){let c=Gr(a);c===null?e=true:(n.push(c),c!==a&&(e=true));}else n.push(a);let o=e?n:t,r=qr(o),i=$r(r),l=(a,c)=>J(a[c])&&(c===a.length-1||!b(a[c+1])),s=i;if(i.some((a,c)=>l(i,c))){s=[];for(let[a,c]of i.entries())s.push(c),l(i,a)&&s.push({text:""});}return s.length===0?[{text:""}]:s===o&&!e?t:s}function _(t){if(t.length===0)return Fe();let e=false,n=t.map(o=>{let r=Xr(o.children);return r===o.children?o:(e=true,{...o,children:r})});return e?n:t}function U(t){if(b(t))return t.text.length;switch(t.type){case Z:{let e=0;for(let n=0;n<t.children.length;n++)e+=t.children[n].text.length;return e}case ae:return t.displayName.length;case Ee:return t.children[0].text.length;default:return t}}function Ue(t){if(t.length===0)return 0;let e=t.length-1;for(let n of t)for(let o of n.children)e+=U(o);return e}var Yr=1,pn=3;function st(t){return t.nodeType===Yr}function Ve(t,e){return t.tagName.toLowerCase()===e}function Zr(t){if(!st(t))return false;let e=t.tagName.toLowerCase();return e==="p"||e==="div"}function Jr(t){return st(t)&&t.querySelector("p, div")!==null}var Qr=new RegExp("["+String.fromCodePoint(8203)+String.fromCodePoint(65279)+"]","g"),ei=String.fromCodePoint(160);function Le(t){return t.replaceAll(Qr,"").replaceAll(ei," ")}function Ho(t,e){let n={...e},o=t.tagName.toLowerCase();(o==="b"||o==="strong")&&(n.bold=true),(o==="i"||o==="em")&&(n.italic=true),o==="u"&&(n.underline=true);let r=t.style;if(r){let i=r.fontWeight;(i==="bold"||Number.parseInt(i,10)>=600&&i!=="")&&(n.bold=true),r.fontStyle==="italic"&&(n.italic=true),r.textDecoration?.includes("underline")&&(n.underline=true);let l=r.color;l&&(n.color=l);let s=r.backgroundColor;s&&(n.backgroundColor=s);}return n}function Bt(t,e,n,o){for(let r=0;r<t.childNodes.length;r++){let i=t.childNodes[r];if(i.nodeType===pn){let s=i.nodeValue??"",a=Le(s);a.length>0&&o.push(Ko(a,e));continue}if(!st(i))continue;if(Ve(i,"span")&&i.dataset.userId!==void 0){let s=i.dataset.userId??"",a=i.textContent??"",c=a.startsWith("@")?a.slice(1):a;o.push({type:ae,value:s,displayName:c,children:[{text:""}]});continue}if(Ve(i,"span")&&i.dataset.mentionAnchor!==void 0){let s=i.textContent??"";o.push({type:Ee,children:[{text:s}]});continue}if(Ve(i,"a")){{let s=i.getAttribute("href")??"",a=[];jo(i,e,a);let c=hn(a);c.some(d=>d.text.length>0)&&o.push({type:Z,url:s,children:c});}continue}if(Ve(i,"br")){o.push({text:"\0BR\0"});continue}let l=Ho(i,e);Bt(i,l,n,o);}}function jo(t,e,n){for(let o=0;o<t.childNodes.length;o++){let r=t.childNodes[o];if(r.nodeType===pn){let l=r.nodeValue??"",s=Le(l);s.length>0&&n.push(Ko(s,e));continue}if(!st(r))continue;if(Ve(r,"br")){n.push({text:"\0BR\0"});continue}let i=Ho(r,e);jo(r,i,n);}}function Ko(t,e){let n={text:t};return e.bold&&(n.bold=true),e.italic&&(n.italic=true),e.underline&&(n.underline=true),e.color&&(n.color=e.color),e.backgroundColor&&(n.backgroundColor=e.backgroundColor),n}var Fo="\0BR\0";function hn(t){let e=[...t];if(e.length===1&&fn(e[0]))return [{text:""}];let n=e.length,o=0;for(;o<n&&fn(e[n-1-o]);)o+=1;let r=o>=2?o-1:0;n-=o;let i=[];for(let l=0;l<n;l++){let s=e[l];fn(s)?Bo(i):i.push(s);}for(let l=0;l<r;l++)Bo(i);return i}function fn(t){return "text"in t&&t.text===Fo}function Bo(t){let e=t.at(-1);e!==void 0&&"text"in e&&!("type"in e)?e.text+=`
|
|
11
|
+
`:t.push({text:`
|
|
12
|
+
`});}function ti(t){let e=[];Bt(t,{},false,e);let n=hn(e);return {type:Ke,children:n.length>0?n:[{text:""}]}}function Ht(t){let e=t.childNodes;if(e.length===0)return Fe();let n=[],o=[];function r(){if(o.length===0)return;let l=hn(o);n.push({type:Ke,children:l.length>0?l:[{text:""}]}),o=[];}function i(l){for(let s of l)if(Zr(s))r(),n.push(ti(s));else if(s.nodeType===pn){let a=s.nodeValue??"",c=Le(a);c.trim().length>0&&o.push({text:c});}else st(s)&&(Ve(s,"br")?o.push({text:Fo}):Jr(s)?(r(),i(s.childNodes)):Bt(s,{},false,o));}return i(e),r(),n.length===0?Fe():_(n)}function oi(t){return Object.entries(t).map(([e,n])=>`${ni(e)}:${n}`).filter(([,e])=>!!e).join(";")}function Vo(t){return "text"in t}function lt(t){return t.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}function de(t){let e=t.trim(),n=e.replaceAll(/[\u0000- ]/g,""),o=/^([a-z][a-z0-9+.-]*):/i.exec(n);if(!o)return e;let r=o[1].toLowerCase();return new Set(["javascript","data","vbscript"]).has(r)?"":e}function mn(t){let e=t.trim();if(/^[/#?.]/.test(e))return e;let n=/^([^/:?#]+):\d+(?:[/?#]|$)/.exec(e)?.[1];if(n==="localhost"||n?.includes("."))return `https://${e}`;try{return new URL(e),e}catch{return `https://${e}`}}function Wo(t,e){if(!(e.mac?e.metaKey:e.ctrlKey))return {isLinkClick:false,url:null};let o=t?.closest?.("a")??null;if(!o)return {isLinkClick:false,url:null};let r=de(o.getAttribute("href")??"");return {isLinkClick:true,url:r===""?null:r}}function ri(t){return t.text.includes(`
|
|
13
|
+
`)?t.text.split(`
|
|
14
|
+
`).map(n=>{let o={text:n};return n.length>0&&(t.bold!==void 0&&(o.bold=t.bold),t.italic!==void 0&&(o.italic=t.italic),t.underline!==void 0&&(o.underline=t.underline),t.color!==void 0&&(o.color=t.color),t.backgroundColor!==void 0&&(o.backgroundColor=t.backgroundColor)),o}):[t]}function ii(t){let e=[[]],n=0;for(let o of t)if(Vo(o)){let r=ri(o);for(let i=0;i<r.length;i++)e[n].push(r[i]),i<r.length-1&&(n++,e[n]=[]);}else e[n].push(o);return e}function ge(t){if(!t)return "";function e(n){if(Vo(n)){if(n.text==="")return "";let r=lt(n.text);if(n.bold&&(r=`<b>${r}</b>`),n.italic&&(r=`<i>${r}</i>`),n.underline&&(r=`<u>${r}</u>`),n.color||n.backgroundColor){let i=oi(a$5({color:n.color||void 0,backgroundColor:n.backgroundColor||void 0}));r=`<span style="${lt(i)}">${r}</span>`;}return r}let o=n.children?.map(r=>ge(r)).join("");switch(n.type){case Ke:return ii(n.children).map(i=>`<p>${i.map(s=>ge(s)).join("")}</p>`).join("");case Z:return `<a href="${lt(de(n.url))}">${o}</a>`;case ae:return `<span data-user-id="${lt(n.value)}">${lt(n.displayName)}</span>`;default:return o}}return Array.isArray(t)?t.map(n=>e(n)).join(""):e(t)}function gn(t){let e=new DOMParser().parseFromString(Uo.default.sanitize(t),"text/html");if(!e.body.querySelector("p, div")){let n=e.createElement("p");n.append(...e.body.childNodes),e.body.append(n);}return Ht(e.body)}var si=new Set(["(","[","{","<",'"',"'","`","\xAB"]),li=new Set([".",",","!","?",":",";",'"',"'","`","\xBB"]),ai=new Map([[")","("],["]","["],["}","{"]]);function qo(t,e){let n=0;for(let o of t)o===e&&n++;return n}function jt(t){let e=0,n=t.length;for(;e<n&&si.has(t[e]);)e++;for(;n>e;){let l=t[n-1];if(li.has(l)){n--;continue}let s=ai.get(l);if(s!==void 0){let a=t.slice(e,n);if(qo(a,l)>qo(a,s)){n--;continue}}break}if(n<=e)return null;let o=t.slice(e,n),r;if(/^https?:\/\//i.test(o))r=o;else if(/^www\./i.test(o)){if(o.length<=4)return null;r=`https://${o}`;}else return null;let i;try{i=new URL(r);}catch{return null}return i.hostname===""?null:{start:e,end:n,url:r}}function ci(t){let e=[],n=/\S+/g,o;for(;(o=n.exec(t))!==null;){let r=jt(o[0]);if(r){let i=o.index+r.start,l=o.index+r.end;e.push({start:i,end:l,text:t.slice(i,l),url:r.url});}}return e}function $o(t){let e=t.trim();if(e===""||/\s/.test(e))return null;let n=jt(e);return n&&n.start===0&&n.end===e.length?n.url:null}function di(t){let e=ci(t.text);if(e.length===0)return null;let n=[],o=0;for(let r of e)r.start>o&&n.push({...t,text:t.text.slice(o,r.start)}),n.push({type:Z,url:r.url,children:[{...t,text:r.text}]}),o=r.end;return o<t.text.length&&n.push({...t,text:t.text.slice(o)}),n}function xn(t){let e=false,n=t.map(o=>{let r=false,i=[];for(let l of o.children){let s=b(l)?di(l):null;s?(i.push(...s),r=true):i.push(l);}return r?(e=true,{...o,children:i}):o});return e?n:t}function Go(t){return ce(t)?0:U(t)}function Xo(t){return t.children.reduce((e,n)=>e+U(n),0)}function bn(t,e,n){return Math.min(Math.max(t,e),n)}function ve(t,e){return t.path[0]!==e.path[0]?t.path[0]<e.path[0]?-1:1:t.path[1]!==e.path[1]?t.path[1]<e.path[1]?-1:1:t.offset!==e.offset?t.offset<e.offset?-1:1:0}function w(t){return ve(t.anchor,t.focus)===0}function yn(t){return ve(t.anchor,t.focus)<=0?t:{anchor:t.focus,focus:t.anchor}}function oe(t,e){let n=bn(e.path[0],0,t.length-1),o=t[n].children,r=bn(e.path[1],0,o.length-1),i=bn(e.offset,0,Go(o[r]));return {path:[n,r],offset:i}}function We(t){let e=t.length-1,n=t[e].children,o=n.length-1;return {path:[e,o],offset:Go(n[o])}}function N(t,e){let n=Math.max(e,0);for(let o=0;o<t.length;o++){let r=t[o],i=Xo(r);if(n>i){n-=i+1;continue}let l=r.children;for(let s=0;s<l.length;s++){let a=l[s],c=U(a);if(ce(a)){if(n===0)return {path:[o,s],offset:0};if(n<c)return {path:[o,s+1],offset:0}}else if(n<=c)return {path:[o,s],offset:n};n-=c;}}return We(t)}function P(t,e){let[n,o]=e.path,r=0;for(let l=0;l<n;l++)r+=Xo(t[l])+1;let i=t[n].children;for(let l=0;l<o;l++)r+=U(i[l]);return r+e.offset}function Re(t,e,n,o,r){let i=n==="atomic";if(t<o.path[0]||t>r.path[0])return null;let l=0;if(t===o.path[0]){if(e<o.path[1])return null;e===o.path[1]&&(l=i?0:o.offset);}let s=i?1:n;if(t===r.path[0]){if(e>r.path[1])return null;e===r.path[1]&&(s=i?r.offset>0?1:0:r.offset);}return l>=s?null:{from:l,to:s}}function En(t,e,n){let o=0;for(let r of t.children)n(r,Math.max(e.from-o,0),Math.min(e.to-o,r.text.length)),o+=r.text.length;}function Zo(t,e,n,o){for(let r=e.path[0];r<=n.path[0]&&r<t.length;r++){let i=t[r].children;for(let[l,s]of i.entries())if(!J(s)){if(b(s)){let a=Re(r,l,s.text.length,e,n);a&&o(s,a.from,a.to);}else if(k(s)){let a=Re(r,l,U(s),e,n);a&&En(s,a,(c,u,d)=>{u<d&&o(c,u,d);});}}}}function Jo(t){return b(t)?t:k(t)?t.children.at(-1)??null:null}function Qo(t,e){let n=oe(t,e),o=t[n.path[0]].children,r=o[n.path[1]],i=n.path[1]>0?Jo(o[n.path[1]-1]):null;if(b(r))return n.offset>0?r:i??r;if(k(r)){if(n.offset===0)return i??r.children[0]??null;let l=0;for(let s of r.children)if(l+=s.text.length,n.offset<=l)return s;return r.children.at(-1)??null}return me(r)?n.offset>0?r.children[0]:i??r.children[0]:i}function Yo(t){let e={};return t.bold&&(e.bold=true),t.italic&&(e.italic=true),t.underline&&(e.underline=true),t.color!==void 0&&(e.color=t.color),t.backgroundColor!==void 0&&(e.backgroundColor=t.backgroundColor),e}function ui(t,e){let n={};return t.bold&&e.bold&&(n.bold=true),t.italic&&e.italic&&(n.italic=true),t.underline&&e.underline&&(n.underline=true),t.color!==void 0&&b$b(t.color,e.color)&&(n.color=t.color),t.backgroundColor!==void 0&&b$b(t.backgroundColor,e.backgroundColor)&&(n.backgroundColor=t.backgroundColor),n}function ze(t,e){if(w(e)){let l=Qo(t,e.focus);return l?Yo(l):{}}let n=yn(e),o=oe(t,n.anchor),r=oe(t,n.focus),i=null;return Zo(t,o,r,l=>{let s=Yo(l);i=i===null?s:ui(i,s);}),i??{}}function Kt(t,e,n){if(n===t)return {doc:t,range:e};let o=_(n);return {doc:o,range:{anchor:N(o,P(t,oe(t,e.anchor))),focus:N(o,P(t,oe(t,e.focus)))}}}function er(t,e,n,o){let r={...t,text:t.text.slice(e,n)},i=o(r);if(At(i,r))return null;let l=[];return e>0&&l.push({...t,text:t.text.slice(0,e)}),l.push(i),n<t.text.length&&l.push({...t,text:t.text.slice(n)}),l}function fi(t,e,n){let o=false,r=[];return En(t,e,(i,l,s)=>{let a=l<s?er(i,l,s,n):null;a?(r.push(...a),o=true):r.push(i);}),o?{...t,children:r}:null}function tr(t,e,n,o){let r=false,i=t.map((l,s)=>{if(s<e.path[0]||s>n.path[0])return l;let a=false,c=[];for(let[u,d]of l.children.entries())if(b(d)){let f=Re(s,u,d.text.length,e,n),p=f?er(d,f.from,f.to,o):null;p?(c.push(...p),a=true):c.push(d);}else if(k(d)){let f=Re(s,u,U(d),e,n),p=f?fi(d,f,o):null;p?(c.push(p),a=true):c.push(d);}else c.push(d);return a?(r=true,{...l,children:c}):l});return r?i:t}function qe(t,e){let n=yn(e);return [oe(t,n.anchor),oe(t,n.focus)]}function vn(t,e,n){if(w(e))return {doc:t,range:e};let[o,r]=qe(t,e),i=false,l=true;return Zo(t,o,r,a=>{i=true,a[n]||(l=false);}),i?Kt(t,e,tr(t,o,r,l?a=>{let c={...a};return delete c[n],c}:a=>a[n]?a:{...a,[n]:true})):{doc:t,range:e}}function Rn(t,e,n,o){if(w(e))return {doc:t,range:e};let[r,i]=qe(t,e);return Kt(t,e,tr(t,r,i,s=>{if(s[n]===o)return s;let a={...s};return o===void 0?delete a[n]:a[n]=o,a}))}function nr(t,e){let n=[],o=[],r=0;for(let i of t){let l=r+i.text.length;l<=e?n.push(i):r>=e?o.push(i):(n.push({...i,text:i.text.slice(0,e-r)}),o.push({...i,text:i.text.slice(e-r)})),r=l;}return [n,o]}function Se(t,e,n){if(e>=t.length)return [[...t],[]];let o=t.slice(0,e),r=t.slice(e+1),i=t[e];if(b(i))o.push({...i,text:i.text.slice(0,n)}),r.unshift({...i,text:i.text.slice(n)});else if(k(i)){let[l,s]=nr(i.children,n);o.push({...i,children:l}),r.unshift({...i,children:s});}else n===0?r.unshift(i):o.push(i);return [o,r]}function Tn(t,e){let[n,o]=qe(t,e);for(let r=n.path[0];r<=o.path[0]&&r<t.length;r++)for(let[i,l]of t[r].children.entries()){if(!k(l))continue;let s={path:[r,i],offset:0},a={path:[r,i],offset:U(l)};if(ve(n,a)<=0&&ve(o,s)>=0)return {paragraphIndex:r,inlineIndex:i,link:l}}return null}function or(t,e){let n=Tn(t,e);if(!n)return null;let{paragraphIndex:o,inlineIndex:r,link:i}=n;return {url:i.url,range:{anchor:{path:[o,r],offset:0},focus:{path:[o,r],offset:U(i)}}}}function rr(t,e){let[n,o]=qe(t,e);for(let r=n.path[0];r<=o.path[0]&&r<t.length;r++)for(let[i,l]of t[r].children.entries()){if(b(l))continue;let s=J(l)?"atomic":U(l);if(Re(r,i,s,n,o))return true}return false}function pi(t,e,n,o){let r=[],i=(l,s,a)=>{s<a&&r.push({...l,text:l.text.slice(s,a)});};for(let[l,s]of t[e].children.entries())if(!J(s)){if(b(s)){let a=Re(e,l,s.text.length,n,o);a&&i(s,a.from,a.to);}else if(k(s)){let a=Re(e,l,U(s),n,o);a&&En(s,a,i);}}return r}function kn(t,e,n){if(w(e))return {doc:t,range:e};let[o,r]=qe(t,e);for(let s=o.path[0];s<=r.path[0]&&s<t.length;s++)for(let[a,c]of t[s].children.entries())if(J(c)&&Re(s,a,"atomic",o,r))return {doc:t,range:e};let i=false,l=t.map((s,a)=>{if(a<o.path[0]||a>r.path[0])return s;let c=pi(t,a,o,r);if(c.length===0)return s;let u=s.children,[d]=a===o.path[0]?Se(u,o.path[1],o.offset):[[]],f=a===r.path[0]?Se(u,r.path[1],r.offset)[1]:[];return i=true,{...s,children:[...d,{type:Z,url:n,children:c},...f]}});return i?Kt(t,e,l):{doc:t,range:e}}function ir(t,e,n){let o=Tn(t,e);if(!o||o.link.url===n)return {doc:t,range:e};let{paragraphIndex:r,inlineIndex:i,link:l}=o,s=t.map((a,c)=>c!==r?a:{...a,children:a.children.map((u,d)=>d===i?{...l,url:n}:u)});return {doc:_(s),range:e}}function sr(t,e){let n=Tn(t,e);if(!n)return {doc:t,range:e};let{paragraphIndex:o,inlineIndex:r,link:i}=n,l=t.map((s,a)=>a!==o?s:{...s,children:s.children.flatMap((c,u)=>u===r?i.children:[c])});return Kt(t,e,l)}function $e(t,e){if(w(e))return {doc:t,range:e};let[n,o]=qe(t,e);if(ve(n,o)===0)return {doc:t,range:e};let r=P(t,n),i=Se(t[n.path[0]].children,n.path[1],n.offset)[0],l=Se(t[o.path[0]].children,o.path[1],o.offset)[1],s={...t[n.path[0]],children:[...i,...l]},a=_([...t.slice(0,n.path[0]),s,...t.slice(o.path[0]+1)]),c=N(a,r);return {doc:a,range:{anchor:c,focus:c}}}function at(t,e,n){let o=oe(t,e);if(n==="")return {doc:t,range:{anchor:o,focus:o}};let r=Qo(t,o),i=r?{...r,text:n}:{text:n},l=o.path[0],s=t[l].children,a=s[o.path[1]],c;if(k(a)&&o.offset>0&&o.offset<U(a)){let[f,p]=nr(a.children,o.offset),m={...a,children:[...f,i,...p]};c=s.map((h,C)=>C===o.path[1]?m:h);}else {let[f,p]=Se(s,o.path[1],o.offset);c=[...f,i,...p];}let u=_(t.map((f,p)=>p===l?{...f,children:c}:f)),d=N(u,P(t,o)+n.length);return {doc:u,range:{anchor:d,focus:d}}}function lr(t,e,n){let o=_(n),r=Ue(o),i=t,l;if(w(e))l=oe(t,e.focus);else {let p=$e(t,e);i=p.doc,l=p.range.focus;}if(o.length===1&&r===0)return {doc:i,range:{anchor:l,focus:l}};let s=l.path[0],[a,c]=Se(i[s].children,l.path[1],l.offset),u=o.length===1?[{...i[s],children:[...a,...o[0].children,...c]}]:[{...i[s],children:[...a,...o[0].children]},...o.slice(1,-1),{...o.at(-1),children:[...o.at(-1).children,...c]}],d=_([...i.slice(0,s),...u,...i.slice(s+1)]),f=N(d,P(i,l)+r);return {doc:d,range:{anchor:f,focus:f}}}function ar(t,e){if(w(e))return at(t,e.focus,`
|
|
15
|
+
`);let n=$e(t,e);return at(n.doc,n.range.focus,`
|
|
16
|
+
`)}function cr(t,e){for(let[n,o]of t.entries()){let r=o.children.indexOf(e);if(r!==-1)return [n,r]}return null}function dr(t){for(let[e,n]of t.entries())for(let[o,r]of n.children.entries())if(me(r))return [e,o];return null}function ur(t){let e=We(t);return {anchor:e,focus:e}}function fr(t,e){let n=t,o;if(w(e))o=oe(t,e.focus);else {let d=$e(t,e);n=d.doc,o=d.range.focus;}let r={type:Ee,children:[{text:""}]},i=o.path[0],[l,s]=Se(n[i].children,o.path[1],o.offset),a=_(n.map((d,f)=>f===i?{...d,children:[...l,r,...s]}:d)),u={path:cr(a,r)??[0,0],offset:0};return {doc:a,range:{anchor:u,focus:u}}}function pr(t,e){let n=dr(t);if(!n)return {doc:t,range:ur(t)};let[o,r]=n,i={type:ae,value:e.id,displayName:e.displayName,children:[{text:""}]},l=_(t.map((u,d)=>d===o?{...u,children:u.children.map((f,p)=>p===r?i:f)}:u)),[s,a]=cr(l,i)??[o,r],c={path:[s,a+1],offset:0};return {doc:l,range:{anchor:c,focus:c}}}function hr(t,e,n="end"){let o=dr(t);if(!o)return {doc:t,range:ur(t)};let[r,i]=o,l=t[r].children,s=i>0?Jo(l[i-1]):null,a=s?{...s,text:e}:{text:e},c=P(t,{path:[r,i],offset:0})+(n==="end"?e.length:0),u=_(t.map((f,p)=>p===r?{...f,children:l.map((m,h)=>h===i?a:m)}:f)),d=N(u,c);return {doc:u,range:{anchor:d,focus:d}}}function hi(t){let e=[];return t.color&&e.push(`color:${t.color}`),t.backgroundColor&&e.push(`background-color:${t.backgroundColor}`),e.join(";")}function mi(t){for(let e of t.children)if(J(e)||k(e)&&e.children.map(o=>o.text).join("").length>0||b(e)&&e.text.length>0)return false;return true}function mr(t,e,n,o){if(n.text==="")return;let r=n.text.split(`
|
|
17
|
+
`);for(let i=0;i<r.length;i++){let l=r[i],s=i===r.length-1;if(l.length>0){let c=t.createTextNode(l);if(n.underline){let d=t.createElement("u");d.append(c),c=d;}if(n.italic){let d=t.createElement("i");d.append(c),c=d;}if(n.bold){let d=t.createElement("b");d.append(c),c=d;}let u=hi(n);if(u){let d=t.createElement("span");d.setAttribute("style",u),d.append(c),c=d;}e.append(c);}(!s||l===""&&r.length>1&&o)&&e.append(t.createElement("br"));}}function gi(t,e,n,o){if(b(n)){mr(t,e,n,o);return}switch(n.type){case Z:{let r=t.createElement("a");r.setAttribute("href",de(n.url)),r.className=a$r({size:"sm",variant:"inline"});for(let i of n.children)mr(t,r,i,false);e.append(r);break}case ae:{let r=t.createElement("span");r.setAttribute("contenteditable","false"),r.dataset.userId=n.value,r.textContent=`@${n.displayName}`,e.append(r);break}case Ee:{let r=t.createElement("span");r.setAttribute("contenteditable","false"),r.dataset.mentionAnchor="true",r.textContent=n.children[0].text,e.append(r);break}}}function Cn(t){return b(t)?t.text!=="":k(t)?t.children.some(e=>e.text!==""):true}function xi(t,e){let n=t.createElement("p");if(mi(e))return n.append(t.createElement("br")),n;let o=-1;for(let r=e.children.length-1;r>=0;r--)if(Cn(e.children[r])){o=r;break}for(let[r,i]of e.children.entries())gi(t,n,i,r===o);return n}function ct(t,e){let n=e.ownerDocument,o=n.createDocumentFragment();for(let r of t)o.append(xi(n,r));e.replaceChildren(o);}var bi=1,yi=3,Ei=11;function re(t){return t.nodeType===bi}function xr(t){return t.nodeType===Ei&&"host"in t}function Ut(t){return t.nodeType===yi}function dt(t,e){return t.tagName.toLowerCase()===e}function vi(t){return dt(t,"span")?t.getAttribute("contenteditable")==="false":false}function Ri(t,e,n,o,r){if(o===t){let s=t.childNodes,a=Math.min(r,s.length);return a===0?{found:true,point:{path:[n,0],offset:0}}:Ti(e,n,a)}let i=t.childNodes,l=0;for(let s=0;s<e.children.length;s++){let a=e.children[s];if(b(a)){let c=Vt(e.children,s),u=yr(a.text,i,l,n,s,o,r,c);if(u.found)return u;l+=Pe(a.text,c);}else if(k(a)){if(l>=i.length)continue;let c=i[l];if(!re(c)||!dt(c,"a")){l++;continue}let u=ki(a,c,n,s,o,r);if(u.found)return u;l++;}else if(ce(a)||me(a)){if(l>=i.length)continue;let c=i[l];if(!re(c)||!vi(c)){l++;continue}if(o===c||(re(o)||Ut(o))&&h(c,o))return {found:true,point:{path:[n,s+1],offset:0}};l++;}}return {found:false}}function Ti(t,e,n){let o=0;for(let l=0;l<t.children.length;l++){let s=t.children[l],a=b(s)?Pe(s.text,Vt(t.children,l)):1;if(o+a>=n){if(b(s))return {found:true,point:{path:[e,l],offset:br(s.text,n-o)}};if(J(s))return {found:true,point:{path:[e,l+1],offset:0}};{let c=s.children.reduce((u,d)=>u+d.text.length,0);return {found:true,point:{path:[e,l],offset:c}}}}o+=a;}let r=t.children.length-1,i=t.children[r];if(b(i))return {found:true,point:{path:[e,r],offset:i.text.length}};if(J(i))return {found:true,point:{path:[e,r+1],offset:0}};if(k(i)){let l=i.children.reduce((s,a)=>s+a.text.length,0);return {found:true,point:{path:[e,r],offset:l}}}return {found:false}}function Vt(t,e){for(let n=e+1;n<t.length;n++)if(Cn(t[n]))return false;return true}function Pe(t,e){if(t==="")return 0;let n=t.split(`
|
|
18
|
+
`),o=0;for(let r=0;r<n.length;r++)n[r].length>0&&o++,r<n.length-1&&o++;return e&&t.endsWith(`
|
|
19
|
+
`)&&o++,o}function br(t,e){if(t==="")return 0;let n=t.split(`
|
|
20
|
+
`),o=0,r=0;for(let i=0;i<n.length&&!(o>=e);i++){if(n[i].length>0){if(o+1>=e){r+=n[i].length,o++;break}r+=n[i].length,o++;}if(i<n.length-1){if(o+1>=e){r++,o++;break}r++,o++;}}return t.endsWith(`
|
|
21
|
+
`)&&o<e&&(r=t.length),Math.min(r,t.length)}function yr(t,e,n,o,r,i,l,s=false){if(t==="")return {found:false};let a=t.split(`
|
|
22
|
+
`),c=n,u=0;for(let d=0;d<a.length;d++){let f=a[d],p=d===a.length-1;if(f.length>0&&c<e.length){let m=e[c],h$1=Wt(m);if(h$1!==null){if(i===h$1){let C=Math.min(l,f.length);return {found:true,point:{path:[o,r],offset:u+C}}}if(re(i)&&h(i,h$1))return {found:true,point:{path:[o,r],offset:u+(l===0?0:f.length)}}}u+=f.length,c++;}if(p){if(p&&s&&t.endsWith(`
|
|
23
|
+
`)&&f===""&&c<e.length){let m=e[c];if(re(m)&&dt(m,"br")&&i===m)return {found:true,point:{path:[o,r],offset:u}};c++;}}else if(c<e.length){let m=e[c];if(re(m)&&dt(m,"br")&&i===m)return {found:true,point:{path:[o,r],offset:u+(l===0?0:1)}};u++,c++;}}return {found:false}}function ki(t,e,n,o,r,i){if(!re(e))return {found:false};if(r===e){let c=e.childNodes,u=Math.min(i,c.length),d=0,f=0,p=0;for(let m of t.children){let h=Pe(m.text,false);if(p+h>=u){f=d+br(m.text,u-p);break}d+=m.text.length,p+=h;}return p>=t.children.reduce((m,h)=>m+Pe(h.text,false),0)&&(f=t.children.reduce((m,h)=>m+h.text.length,0)),{found:true,point:{path:[n,o],offset:f}}}if(!h(e,r))return {found:false};let l=e.childNodes,s=0,a=0;for(let c of t.children){let u=yr(c.text,l,a,n,o,r,i);if(u.found)return {found:true,point:{path:[n,o],offset:s+u.point.offset}};s+=c.text.length,a+=Pe(c.text,false);}return {found:false}}function Wt(t){if(Ut(t))return t;if(re(t)){let e=t;for(;re(e)&&e.childNodes.length===1;){let n=e.childNodes[0];if(Ut(n))return n;if(re(n))e=n;else break}}return null}function Ft(t,e,n,o){try{if(n!==t&&!h(t,n)||e.length===0)return null;if(n===t){let i=Math.min(o,t.childNodes.length);if(i===0)return {path:[0,0],offset:0};let l=Math.min(i,e.length)-1,s=e[l];if(!s)return null;let a=s.children.length-1,c=s.children[a];if(!c)return null;let u=b(c)?c.text.length:k(c)?c.children.reduce((d,f)=>d+f.text.length,0):0;return {path:[l,a],offset:u}}let r=t.children;for(let i=0;i<e.length;i++){let l=r[i];if(!l)return null;let s=e[i];if(n!==l&&!h(l,n))continue;let a=Ri(l,s,i,n,o);return a.found?a.point:null}return null}catch{return null}}function gr(t,e,n){try{let[o,r]=n.path,i=n.offset;if(o<0||o>=e.length)return null;let l=e[o];if(r<0||r>=l.children.length)return null;let s=l.children[r],a=t.children[o];if(!a)return null;let c=a.childNodes,u=0;for(let d=0;d<r;d++){let f=l.children[d];b(f)?u+=Pe(f.text,Vt(l.children,d)):u++;}if(b(s))return Er(s.text,i,c,u,a,Vt(l.children,r));if(k(s)){if(u>=c.length)return null;let d=c[u];return !re(d)||!dt(d,"a")?null:Ci(s,i,d)}else if(ce(s)||me(s)){let d=u+1;if(d<c.length){let f=c[d];if(Ut(f))return {node:f,offset:0}}return {node:a,offset:Math.min(d,a.childNodes.length)}}return null}catch{return null}}function Er(t,e,n,o,r,i=false){if(t==="")return {node:r,offset:o};let l=t.split(`
|
|
24
|
+
`),s=o,a=0;for(let c=0;c<l.length;c++){let u=l[c],d=c===l.length-1;if(u.length>0&&s<n.length){let f=n[s];if(e>=a&&e<=a+u.length){let p=Wt(f);return p!==null?{node:p,offset:e-a}:{node:r,offset:s}}a+=u.length,s++;}if(d){if(d&&t.endsWith(`
|
|
25
|
+
`)&&u===""&&s<=n.length){if(e===a)return {node:r,offset:Math.min(s,r.childNodes.length)};i&&s++;}}else if(s<n.length){if(e===a)return {node:r,offset:s};a++,s++;}}if(s>o&&s-1<n.length){let c=n[s-1],u=Wt(c);return u!==null?{node:u,offset:u.length}:{node:r,offset:s}}return {node:r,offset:Math.min(s,r.childNodes.length)}}function Ci(t,e,n){let o=n.childNodes,r=0,i=0;for(let l of t.children){let s=l.text.length;if(e<=r+s)return Er(l.text,e-r,o,i,n);r+=s,i+=Pe(l.text,false);}if(o.length>0){let l=n.lastChild,s=l===null?null:Wt(l);return s!==null?{node:s,offset:s.length}:{node:n,offset:o.length}}return {node:n,offset:0}}function qt(t){let e=t.getRootNode();if(typeof e.getSelection=="function")return e.getSelection();let n=t.ownerDocument;if(!n)return null;let o=n.defaultView;return o?o.getSelection():null}function Mi(t,e){let n=t.getComposedRanges;if(typeof n!="function")return null;let o;try{o=n.call(t,{shadowRoots:[e]});}catch{try{o=n.call(t,e);}catch{return null}}let r=o?.[0];return r?{startContainer:r.startContainer,startOffset:r.startOffset,endContainer:r.endContainer,endOffset:r.endOffset}:null}function Mn(t,e){let n=e.rangeCount>0?e.getRangeAt(0):null,o=n?{startContainer:n.startContainer,startOffset:n.startOffset,endContainer:n.endContainer,endOffset:n.endOffset}:null;if(o&&h(t,o.startContainer))return o;let r=t.getRootNode();if(xr(r)){let i=Mi(e,r);if(i&&h(t,i.startContainer))return i}return o}function $t(t,e){try{let n=qt(t);if(!n)return null;let{anchorNode:o,focusNode:r}=n;if(o&&r&&h(t,o)&&h(t,r)){let a=Ft(t,e,o,n.anchorOffset),c=Ft(t,e,r,n.focusOffset);if(a!==null&&c!==null)return {anchor:a,focus:c}}let i=Mn(t,n);if(!i)return null;let l=Ft(t,e,i.startContainer,i.startOffset);if(l===null)return null;let s=Ft(t,e,i.endContainer,i.endOffset);return s===null?null:{anchor:l,focus:s}}catch{return null}}function De(t,e,n){try{let o=gr(t,e,n.anchor);if(o===null)return;let r=gr(t,e,n.focus);if(r===null)return;let i=t.ownerDocument;if(!i)return;let l=qt(t);if(!l)return;if(ve(n.anchor,n.focus)>0||xr(t.getRootNode())){l.setBaseAndExtent(o.node,o.offset,r.node,r.offset);return}let a=i.createRange();a.setStart(o.node,o.offset),a.setEnd(r.node,r.offset),l.removeAllRanges(),l.addRange(a);}catch{}}var vr="typing";var Gt=class{undoStack=[];redoStack=[];now;maxDepth;lastKind=null;lastTime=null;constructor(e={}){this.now=e.now??Date.now,this.maxDepth=e.maxDepth??100;}record(e,n){let o=this.now();this.redoStack.length>0&&(this.redoStack=[]);let r=n===vr&&this.lastKind===vr&&this.lastTime!==null&&o-this.lastTime<=1e3;this.lastKind=n,this.lastTime=o,!r&&(this.undoStack.push(e),this.undoStack.length>this.maxDepth&&this.undoStack.shift());}undo(e){let n=this.undoStack.pop();return n?(this.redoStack.push(e),this.lastKind=null,this.lastTime=null,n):null}redo(e){let n=this.redoStack.pop();return n?(this.undoStack.push(e),this.lastKind=null,this.lastTime=null,n):null}clear(){this.undoStack=[],this.redoStack=[],this.lastKind=null,this.lastTime=null;}get canUndo(){return this.undoStack.length>0}get canRedo(){return this.redoStack.length>0}};var Li=1,ut=class t{doc=Fe();lastKnownHtml="";lastAppliedValue=null;cachedRange=null;needsSelectionRestore=false;composing=false;pending=null;preservePendingSelectionChanges=0;history=new Gt;opts;el=null;pendingExternalRender=null;keyboardShortcutsOverride=void 0;constructor(e={}){this.opts=e,this.lastKnownHtml=ge(this.doc);}setKeyboardShortcutsEnabled(e){this.keyboardShortcutsOverride=e;}attach(e){this.el=e,ct(this.doc,e),this.cachedRange&&De(e,this.doc,this.cachedRange);let n=this.handleBeforeInputBound,o=this.handleInputBound,r=this.handlePasteBound,i=this.handleCompositionStartBound,l=this.handleCompositionEndBound,s=this.handleSelectionChangeBound,a=this.handlePointerDownBound,c=this.handleFocusBound,u=e.ownerDocument;return e.addEventListener("beforeinput",n),e.addEventListener("input",o),e.addEventListener("paste",r),e.addEventListener("compositionstart",i),e.addEventListener("compositionend",l),e.addEventListener("pointerdown",a),e.addEventListener("focus",c),u.addEventListener("selectionchange",s),()=>{e.removeEventListener("beforeinput",n),e.removeEventListener("input",o),e.removeEventListener("paste",r),e.removeEventListener("compositionstart",i),e.removeEventListener("compositionend",l),e.removeEventListener("pointerdown",a),e.removeEventListener("focus",c),u.removeEventListener("selectionchange",s),this.el===e&&(this.el=null);}}handleBeforeInputBound=e=>{let n=e;if(j$2(n)===this.el){if(this.opts.isReadOnly?.()){n.preventDefault();return}this.refreshSelectionFromDom(),this.handleBeforeInput(n);}};handleInputBound=e=>{j$2(e)===this.el&&(this.composing||this.syncFromDom());};handlePasteBound=e=>{let n=e,o=j$2(n);!o||!h(this.el,o)||(o.nodeType===Li?o:o.parentElement)?.closest('input, [contenteditable="false"]')||(n.preventDefault(),!this.opts.isReadOnly?.()&&(this.composing||(this.refreshSelectionFromDom(),this.insertPastedData(n.clipboardData))));};handlePointerDownBound=()=>{this.preservePendingSelectionChanges=0,this.needsSelectionRestore=false;};handleFocusBound=()=>{this.needsSelectionRestore&&(this.needsSelectionRestore=false,!(!this.el||!this.cachedRange)&&De(this.el,this.doc,this.cachedRange));};handleCompositionStartBound=()=>{this.composing=true;};handleCompositionEndBound=()=>{if(this.composing=false,this.pendingExternalRender){let e=this.pendingExternalRender;this.pendingExternalRender=null,e();return}this.syncFromDom();};handleSelectionChangeBound=()=>{this.el&&this.handleSelectionChange();};refreshSelectionFromDom(){if(!this.el)return;let e=$t(this.el,this.doc);e&&(this.cachedRange=e);}getDoc(){return this.doc}getValue(){return ge(this.doc)}setValue(e,n={}){if(e===this.lastKnownHtml||e===this.lastAppliedValue)return;let o,r;try{o=_(gn(e)),r=ge(o);}catch(a){process.env.NODE_ENV!=="production"&&console.error("[Editor] setValue failed to parse value:",a);return}let i=this.cachedRange?P(this.doc,this.cachedRange.anchor):null,l=t.docHasMentionInput(this.doc);this.doc=o,this.lastKnownHtml=r,this.lastAppliedValue=e,this.pending=null,this.history.clear();let s=()=>{if(this.el&&(ct(o,this.el),i!==null)){let a=Math.min(i,Ue(o)),c=N(o,a),u={anchor:c,focus:c};this.cachedRange=u,this.hasFocus()?De(this.el,o,u):(this.needsSelectionRestore=true,n.emit||this.emitSelectionChange());}};this.el&&(this.composing?this.pendingExternalRender=s:s()),l&&!t.docHasMentionInput(o)&&this.opts.onMentionInputRemoved?.(),n.emit&&(this.opts.onChange?.(r),this.emitSelectionChange());}static docHasMentionInput(e){return e.some(n=>n.children.some(o=>me(o)))}exec(e,...n){this.refreshSelectionFromDom();let o=this.cachedRange,r=this.doc,i=o??this.collapsedAtDocEnd(),l={doc:r,range:o},s;try{s=this.dispatchCommand(e,n);}catch(a){process.env.NODE_ENV!=="production"&&console.error(`[Editor] command "${e}" threw:`,a);return}if(s.doc===r){if(e==="toggleMark"&&w(i)){let[a]=n;this.setPendingMark(a,i),this.emitSelectionChange();return}if(e==="setMarkValue"&&w(i)){let[a,c]=n;this.setPendingColorMark(a,c,i),this.emitSelectionChange();return}this.pending=null;return}if(this.pending=null,e==="insertSoftBreak"){let a=this.mergePendingMarks(ze(r,i));if(Object.keys(a).length>0){let c=P(s.doc,s.range.anchor);this.pending={marks:a,caretOffset:c},this.preservePendingSelectionChanges=10;}}this.history.record(l,e),this.applyDocChange(s.doc,s.range,true);}undo(){if(!this.history.canUndo)return;let e={doc:this.doc,range:this.cachedRange},n=this.history.undo(e);n&&(this.pending=null,this.applyDocChange(n.doc,n.range,true));}redo(){if(!this.history.canRedo)return;let e={doc:this.doc,range:this.cachedRange},n=this.history.redo(e);n&&(this.pending=null,this.applyDocChange(n.doc,n.range,true));}canUndo(){return this.history.canUndo}canRedo(){return this.history.canRedo}focus(){this.el?.focus();}hasFocus(){return this.el?h(this.el,f$1(this.el)):false}setCaretPosition(e){if(!this.el)return;let n=N(this.doc,e);this.select({anchor:n,focus:n});}select(e){this.el&&(this.el.focus(),this.cachedRange=e,De(this.el,this.doc,e));}selectStart(){this.setCaretPosition(0);}selectEnd(){let e=We(this.doc);this.select({anchor:e,focus:e});}getSelectionState(){return this.buildSelectionState(this.cachedRange)}buildSelectionState(e){let n=e?ze(this.doc,e):{},o=this.mergePendingMarks(n),r=e?or(this.doc,e):null;return {marks:o,link:r,range:e}}mergePendingMarks(e){return this.pending?this.pending.marks:e}setPendingMark(e,n){let o=P(this.doc,n.anchor),r=ze(this.doc,n),i=this.pending?{...this.pending.marks}:{...r};i[e]?delete i[e]:i[e]=true,this.pending={marks:i,caretOffset:o};}setPendingColorMark(e,n,o){let r=P(this.doc,o.anchor),i=ze(this.doc,o),l=this.pending?{...this.pending.marks}:{...i};n===void 0?delete l[e]:l[e]=n,this.pending={marks:l,caretOffset:r};}emitSelectionChange(){this.opts.onSelectionChange&&this.opts.onSelectionChange(this.buildSelectionState(this.cachedRange));}applyDocChange(e,n,o){if(this.doc=e,this.cachedRange=n,this.lastAppliedValue=null,this.el&&!this.composing&&(ct(e,this.el),n&&De(this.el,e,n)),o){let r=ge(e);this.lastKnownHtml=r,this.opts.onChange?.(r),this.emitSelectionChange();}}handleBeforeInput(e){let{inputType:n}=e;if(n==="insertParagraph"||n==="insertLineBreak"){e.preventDefault();let r=this.detectAutoLinkBeforeCaret();this.exec("insertSoftBreak"),r&&this.applyAutoLink(r);return}if(n==="insertText"&&e.data===" "){let r=this.detectAutoLinkBeforeCaret();if(r){e.preventDefault(),this.exec("insertText"," "),this.applyAutoLink(r);return}}if(n==="insertFromPaste"||n==="insertFromDrop"){e.preventDefault(),this.handlePasteInput(e);return}let o=this.keyboardShortcutsOverride??this.opts.areKeyboardShortcutsEnabled?.()??true;if(n==="formatBold"){e.preventDefault(),o&&this.exec("toggleMark","bold");return}if(n==="formatItalic"){e.preventDefault(),o&&this.exec("toggleMark","italic");return}if(n==="formatUnderline"){e.preventDefault(),o&&this.exec("toggleMark","underline");return}if(n==="historyUndo"){e.preventDefault(),o&&this.undo();return}if(n==="historyRedo"){e.preventDefault(),o&&this.redo();return}if(n==="insertText"&&e.data==="@"&&this.shouldTriggerMention()&&this.opts.canStartMention?.()!==false){e.preventDefault();let r=this.doc;this.exec("insertMentionInput"),this.doc===r?this.exec("insertText","@"):this.opts.onMentionTrigger?.();}}shouldTriggerMention(){if(!this.cachedRange)return true;if(!w(this.cachedRange))return false;let e=this.cachedRange,[n,o]=e.anchor.path,r=e.anchor.offset,i=this.doc;if(n>=i.length)return true;let l=i[n];if(o>=l.children.length)return true;let s=l.children[o];if(r===0&&o===0)return true;let a=null;if(b(s)){let c=s.text;if(r>0)a=c[r-1];else if(o>0)a=this.lastCharOf(l.children[o-1]);else return true}else if(k(s)){let c=s.children.map(u=>u.text).join("");if(r>0)a=c[r-1]??null;else if(o>0)a=this.lastCharOf(l.children[o-1]);else return true}else if(r===0&&o>0)a=this.lastCharOf(l.children[o-1]);else return true;return a===null?true:/^[\s"']$/.test(a)}lastCharOf(e){if(b(e)){let n=e.text;return n.length>0?n.at(-1)??null:null}if(k(e)){let o=(e.children??[]).at(-1);return o&&o.text.length>0?o.text.at(-1)??null:null}if(ce(e)){let n=e.displayName??"";return n.length>0?n.at(-1)??null:null}return null}autoLinkEnabled(){return this.opts.autoLink?.()??true}detectAutoLinkBeforeCaret(){return !this.autoLinkEnabled()||this.composing?null:this.findAutoLinkBeforeCaret()}findAutoLinkBeforeCaret(){let e=this.cachedRange;if(!e||!w(e))return null;let n=e.anchor,o=this.doc,r=n.path[0];if(r>=o.length)return null;let i=o[r].children,l=n.path[1],s=n.offset;if(l>=i.length){l=i.length-1;let f=i[l];if(!f||!b(f))return null;s=f.text.length;}else {let f=i[l];b(f)&&s>f.text.length&&(s=f.text.length);}let a=i[l];if(b(a)&&s<a.text.length&&!/\s/.test(a.text[s]))return null;let c="";for(;;){let f=i[l];if(!f||!b(f))break;if(s>0){let p=f.text[s-1];if(/\s/.test(p))break;c=p+c,s-=1;}else {if(l===0)break;let p=i[l-1];if(!b(p))break;l-=1,s=p.text.length;}}if(c==="")return null;let u=jt(c);if(!u)return null;let d=P(o,{path:[r,l],offset:s});return {startAbs:d+u.start,endAbs:d+u.end,url:u.url}}applyAutoLink(e){let n=de(e.url);if(n==="")return;let o=this.doc,r={anchor:N(o,e.startAbs),focus:N(o,e.endAbs)},i={doc:o,range:this.cachedRange},l=kn(o,r,n);if(l.doc===o)return;let s=this.cachedRange?P(o,this.cachedRange.anchor):e.endAbs;this.history.record(i,"wrapLink");let a=N(l.doc,s);this.applyDocChange(l.doc,{anchor:a,focus:a},true);}handlePasteInput(e){this.insertPastedData(e.dataTransfer);}resolvePastedMentions(e){let n=this.opts.resolveMention;return n?e.map(o=>({...o,children:o.children.map(r=>{if(!ce(r))return r;let i=n(r.value);return i===void 0?{text:`@${r.displayName}`}:{...r,displayName:i}})})):e}insertPastedData(e){if(!e)return;let n=this.autoLinkEnabled(),o=e.getData("text/plain");if(n&&o){let i=this.cachedRange;if(i&&!w(i)&&i.anchor.path[0]===i.focus.path[0]){let l=$o(o),s=l?de(l):"";if(s&&!rr(this.doc,i)){this.exec("wrapLink",s);return}}}let r=e.getData("text/html");if(r)try{let i=_(this.resolvePastedMentions(gn(r)));n&&(i=_(xn(i))),this.exec("insertFragment",i);return}catch(i){process.env.NODE_ENV!=="production"&&console.error("[Editor] failed to parse pasted HTML:",i);}if(o){let i=Le(o.replaceAll(`\r
|
|
26
|
+
`,`
|
|
27
|
+
`).replaceAll("\r",`
|
|
28
|
+
`)),l=_([{type:"p",children:[{text:i}]}]);n&&(l=_(xn(l))),this.exec("insertFragment",l);}}syncFromDom(){if(!this.el||this.composing)return;let e=this.doc,n={doc:e,range:this.cachedRange},o=Ht(this.el),r=$t(this.el,o);if(!(ge(o)!==this.lastKnownHtml)){if(r){let d=this.cachedRange;this.cachedRange=r,(!d||!this.rangesEqual(d,r))&&this.emitSelectionChange();}return}this.history.record(n,"typing");let s=o,a=r,c=false;if(!a&&n.range){let d=Math.max(Ue(o)-Ue(e),0),f=this.pending?this.pending.caretOffset:P(e,n.range.anchor),p=N(o,f+d);a={anchor:p,focus:p};}if(this.pending){let d=this.pending.marks,f=a;if(f){let p=this.applyPendingMarks(o,n.range,f);p.doc!==o&&(s=p.doc,a=p.range,c=true),this.pending=a?{marks:d,caretOffset:P(s,a.anchor)}:null,a&&(this.preservePendingSelectionChanges=10);}else this.pending=null;}this.doc=s,this.cachedRange=a;let u=ge(s);this.lastKnownHtml=u,this.lastAppliedValue=null,c&&(ct(s,this.el),a&&De(this.el,s,a)),this.opts.onChange?.(u),this.emitSelectionChange();}applyPendingMarks(e,n,o){if(!this.pending||!n||!o)return {doc:e,range:o??{anchor:{path:[0,0],offset:0},focus:{path:[0,0],offset:0}}};let r=this.pending.caretOffset,i=o?P(e,o.anchor):r;if(i<=r)return {doc:e,range:o??{anchor:{path:[0,0],offset:0},focus:{path:[0,0],offset:0}}};let l=this.applyPendingMarkSnapshot(e,this.pending.marks,r,i),s=N(l,i);return {doc:l,range:{anchor:s,focus:s}}}applyPendingMarkSnapshot(e,n,o,r){let i=e,l=()=>({anchor:N(i,o),focus:N(i,r)});for(let s of ["bold","italic","underline"]){let a=l(),c=!!n[s],u=!!ze(i,a)[s];if(c!==u){let d=vn(i,a,s);d.doc!==i&&(i=d.doc);}}for(let s of ["color","backgroundColor"]){let a=l(),c=n[s],u=ze(i,a)[s];if(!b$b(c,u)){let d=Rn(i,a,s,c);d.doc!==i&&(i=d.doc);}}return i}handleSelectionChange(){if(!this.el)return;let e=qt(this.el);if(!e)return;let n=Mn(this.el,e);if(!n||!h(this.el,n.startContainer))return;let o=$t(this.el,this.doc),r=this.cachedRange;this.preservePendingSelectionChanges>0?(this.preservePendingSelectionChanges-=1,this.pending&&o&&(this.pending={...this.pending,caretOffset:P(this.doc,o.anchor)})):this.pending&&o&&P(this.doc,o.anchor)!==this.pending.caretOffset&&(this.pending=null),o!==null&&(this.cachedRange=o),(!r||!o||!this.rangesEqual(r,o))&&this.emitSelectionChange();}dispatchCommand(e,n){let o=this.doc,r=this.cachedRange??this.collapsedAtDocEnd();switch(e){case "toggleMark":{let[i]=n;return vn(o,r,i)}case "setMarkValue":{let[i,l]=n;return Rn(o,r,i,l)}case "wrapLink":{let[i]=n;return kn(o,r,i)}case "updateLinkUrl":{let[i]=n;return ir(o,r,i)}case "unwrapLink":return sr(o,r);case "deleteRange":return $e(o,r);case "insertText":{let[i]=n;if(!w(r)){let l=$e(o,r);return at(l.doc,l.range.focus,i)}return at(o,r.anchor,i)}case "insertFragment":{let[i]=n;return lr(o,r,i)}case "insertSoftBreak":return ar(o,r);case "insertMentionInput":return fr(o,r);case "confirmMention":{let[i]=n;return pr(o,i)}case "removeMentionInput":{let[i,l]=n;return hr(o,i,l)}default:return {doc:o,range:r}}}collapsedAtDocEnd(){let e=We(this.doc);return {anchor:e,focus:e}}rangesEqual(e,n){return e.anchor.path[0]===n.anchor.path[0]&&e.anchor.path[1]===n.anchor.path[1]&&e.anchor.offset===n.anchor.offset&&e.focus.path[0]===n.focus.path[0]&&e.focus.path[1]===n.focus.path[1]&&e.focus.offset===n.focus.offset}};var ft=mt.createContext(null);function xe(){let t=mt.useContext(ft);if(!t)throw new Error("useEditorContext must be used within an EditorProvider");return t}var Xt=Object.freeze({marks:{},link:null,range:null});function Pi(t){let e=Le(t.replaceAll(/<br\s*\/?>/gi,""));return e==="<p></p>"||e===""||e==="<p> </p>"}function Ln(t={}){let{value:e,defaultValue:n,onChange:o,isDisabled:r,keyboardShortcuts:i,onSelectionChange:l,onMentionTrigger:s,onMentionInputRemoved:a,canStartMention:c,resolveMention:u,isReadOnly:d,autoLink:f}=t;e!==void 0&&o===void 0&&a$d("use-editor-value-without-onchange","useEditor: `value` without `onChange` is controlled but cannot reflect edits \u2014 they are discarded on the next render. Use `defaultValue` for initial content, or add `onChange`.");let[p,m]=useState(Xt),[h,C]=useState(()=>e??n??""),D=useRef(o);D.current=o;let V=useRef(l);V.current=l;let M=useRef(s);M.current=s;let B=useRef(a);B.current=a;let S=useRef(c);S.current=c;let L=useRef(u);L.current=u;let q=useRef(d);q.current=d;let $=useRef(r);$.current=r;let te=useRef(i);te.current=i;let g=useRef(f);g.current=f;let y=useRef(null);y.current===null&&(y.current=new ut({onChange:v=>{C(v),D.current?.(v);},onSelectionChange:v=>{m(v),V.current?.(v);},onMentionTrigger:()=>{M.current?.();},onMentionInputRemoved:()=>{B.current?.();},canStartMention:()=>S.current?.()??false,get resolveMention(){return L.current},autoLink:()=>g.current!==false,isReadOnly:()=>q.current?.()??!!$.current,areKeyboardShortcutsEnabled:()=>te.current!==false}));let R=y.current;useLayoutEffect(()=>{e!==void 0&&R.setValue(e);});let x=useRef(false);useEffect(()=>{if(!x.current){x.current=true;let v=e??n;v&&R.setValue(v);}},[R]),useEffect(()=>{r&&m(Xt);},[r]);let ie=e??h,se=Pi(ie),fe=R.canUndo(),pe=R.canRedo();return useMemo(()=>({core:R,selectionState:p,value:ie,isEmpty:se,isDisabled:!!r,keyboardShortcuts:i!==false,canUndo:fe,canRedo:pe,focus:()=>{R.focus();},selectStart:()=>{R.selectStart();},selectEnd:()=>{R.selectEnd();},setCaretPosition:v=>{R.setCaretPosition(v);},undo:()=>{R.undo();},redo:()=>{R.redo();},getValue:()=>R.getValue(),setValue:(v,I)=>{R.setValue(v,I);},exec:(v,...I)=>{R.exec(v,...I);},isMarkActive:v=>!!p.marks[v],toggleMark:v=>{R.exec("toggleMark",v);},setMark:(v,I)=>{R.exec("setMarkValue",v,I);}}),[R,p,ie,se,r,i,fe,pe])}function Mr(t,e){let n=t.ctrlKey||t.metaKey,o=t.key.toLowerCase();if(n&&!t.altKey&&o==="z")return t.preventDefault(),t.shiftKey?e.redo():e.undo(),true;if(t.ctrlKey&&!t.altKey&&!t.shiftKey&&o==="y")return t.preventDefault(),e.redo(),true;if(n&&!t.shiftKey&&!t.altKey){if(o==="b")return t.preventDefault(),e.toggleMark("bold"),true;if(o==="i")return t.preventDefault(),e.toggleMark("italic"),true;if(o==="u")return t.preventDefault(),e.toggleMark("underline"),true}return false}function zn(t,e={}){let n=wi(t),{ref:o,autoFocus:r,onKeyDown:i,keyboardShortcuts:l}=e,s=l??n.keyboardShortcuts,a=useId(),c=useRef(null),u=useRef(null),d=useCallback(h=>{u.current&&(u.current(),u.current=null),h&&(u.current=n.core.attach(h));},[n.core]),f=useMemo(()=>b$1(c,d,o??null),[d,o]);useEffect(()=>(n.core.setKeyboardShortcutsEnabled(l),()=>{n.core.setKeyboardShortcutsEnabled(void 0);}),[n.core,l]);let p=useRef(false);useEffect(()=>{if(!p.current)switch(p.current=true,r){case true:{n.focus();break}case "start":{n.selectStart();break}case "end":{n.selectEnd();break}}},[n.core]);let{keyboardProps:m}=j({onKeyDown:h=>{i?.(h)||s&&Mr(h,n)||h.continuePropagation();}});return {editableProps:{...m,id:a,ref:f,contentEditable:!n.isDisabled,suppressContentEditableWarning:true,role:"textbox","aria-multiline":true}}}function wi(t){let e=useContext(ft);if(t)return t;if(!e)throw new Error("useEditable must be passed an editor or used within an EditorProvider");return e}var Pn=({editor:t,children:e})=>jsx(ft.Provider,{value:t,children:e});var Yt=({markName:t,icon:e,ariaLabel:n,isDisabled:o})=>{let{core:r,selectionState:i}=xe(),l=!!i.marks[t];return jsx(a$g,{variant:"tertiary",isSelected:l,size:"sm",icon:e,"aria-label":n,"data-testid":`editor-${t}-button`,isDisabled:o,onPress:()=>{r.exec("toggleMark",t),r.focus();},preventFocusOnPress:true})},_n=({colorKey:t,"aria-label":e,isDisabled:n})=>{let{core:o,selectionState:r}=xe(),i=t==="color"?r.marks.color:r.marks.backgroundColor,l=mt.useRef(null),s=useCallback(()=>{l.current=r.range;},[r.range]),a=useCallback(p=>{setTimeout(()=>{let m=o.getSelectionState().range??l.current;m&&o.select(m),o.exec("setMarkValue",t,p);},0);},[o,t]),c=useCallback(p=>{a(p);},[a]),u=useCallback(()=>{a();},[a]),d=useCallback(({ref:p,triggerProps:m})=>jsx(a$c,{icon:t==="color"?TextIcon:HighlightTextIcon,"aria-label":e,"data-testid":t==="color"?"editor-font-color-button":"editor-background-color-button",size:"md",variant:"popover",isDisabled:n,className:He,preventFocusOnPress:true,...m,ref:p}),[t,e,n]),f=useCallback(p=>{p?c(p.toString("rgba")):u();},[u,c]);return jsx(b$5,{presets:dn,allowRemoval:true,pickerMode:"lazy",placement:"top end",colorLabel:false,renderTriggerButton:d,onTriggerPress:s,value:i||"#000000",onChange:f,isDisabled:n})};var _e={Add:"add",Edit:"edit",Show:"show"},Sr=({isDisabled:t,addLinkLabel:e,editLinkLabel:n,removeLinkLabel:o,linkAnnotationLabel:r,linkCancelLabel:i,linkSaveLabel:l})=>{let{formatMessage:s}=b$2(),{core:a}=xe();return jsxs(b$6,{type:"dialog",children:[jsx(j$1,{children:jsx(a$c,{icon:LinkIcon,size:"sm",isDisabled:t,"aria-label":e??s(Ie.addLink),"data-testid":"editor-add-link-button",className:He,preventFocusOnPress:true})}),jsx(a$h,{className:sprinkles({boxShadow:"medium"}),placement:"top end",children:({close:c})=>jsx(a$i,{size:"content",style:{minWidth:240},children:jsx(Fi,{addLinkLabel:e,editLinkLabel:n,removeLinkLabel:o,linkAnnotationLabel:r,linkCancelLabel:i,linkSaveLabel:l,close:()=>{c(),setTimeout(()=>{a.focus();},0);}})})})]})},Fi=({close:t,addLinkLabel:e,editLinkLabel:n,removeLinkLabel:o,linkAnnotationLabel:r,linkCancelLabel:i,linkSaveLabel:l})=>{let{core:s,selectionState:a}=xe(),{formatMessage:c}=b$2(),u=a.link?.url,[d,f]=mt.useState(u?_e.Show:_e.Add),[p,m]=mt.useState(u||""),h=jsx(a$a,{padding:"lg",children:jsx(a$p,{label:r??c(Ie.link),value:p,autoFocus:true,onChange:m,placeholder:"https://yourdomain.com","data-testid":"editor-link-input"})});return jsxs(Fragment,{children:[d===_e.Add&&jsxs(Fragment,{children:[h,jsx(a$a,{display:"flex",justifyContent:"flex-end",padding:"lg",className:Eo,children:jsx(b$c,{isDisabled:!a$q(p,true)||de(p)==="",label:e??c(Ie.addLink),"data-testid":"editor-link-add-button",size:"sm",onPress:()=>{s.exec("wrapLink",mn(p)),t?.();},preventFocusOnPress:true})})]}),d===_e.Show&&jsxs(Fragment,{children:[jsx(a$a,{padding:"lg",children:jsx(a$n,{type:"subtitle",size:"sm",children:u})}),jsxs(a$a,{display:"flex",justifyContent:"flex-end",padding:"lg",gap:"lg",borderColor:"border.subtle",borderWidth:1,borderStyle:"solid",children:[jsx(b$c,{label:n??c(Ie.editLink),"data-testid":"editor-link-edit-button",size:"sm",variant:"secondary",onPress:()=>{f(_e.Edit);},style:{flex:1,justifyContent:"center"}}),jsx(b$c,{label:o??c(Ie.removeLink),"data-testid":"editor-link-remove-button",size:"sm",onPress:()=>{s.exec("unwrapLink"),t?.();},preventFocusOnPress:true,style:{flex:1,justifyContent:"center"}})]})]}),d===_e.Edit&&jsxs(Fragment,{children:[h,jsxs(a$a,{display:"flex",justifyContent:"flex-end",padding:"lg",gap:"lg",borderColor:"border.subtle",borderWidth:1,borderStyle:"solid",children:[jsx(b$c,{label:i??c(Ie.cancel),"data-testid":"editor-link-cancel-button",size:"sm",variant:"secondary",onPress:()=>{f(_e.Show),t?.();}}),jsx(b$c,{label:l??c(Ie.save),"data-testid":"editor-link-save-button",size:"sm",isDisabled:!a$q(p,true)||de(p)==="",onPress:()=>{s.exec("updateLinkUrl",mn(p)),t?.();}})]})]})]})},Ie=c$1({addLink:{id:"bui.editor.addLink",defaultMessage:"Add Link"},editLink:{id:"bui.editor.editLink",defaultMessage:"Edit Link"},removeLink:{id:"bui.editor.removeLink",defaultMessage:"Remove Link"},cancel:{id:"bui.editor.cancel",defaultMessage:"Cancel"},save:{id:"bui.editor.save",defaultMessage:"Save"},link:{id:"bui.editor.linkAnnotation",defaultMessage:"Link"}});var Nn=mt.createContext({items:[],containerRef:{current:null},maxMentionableUsersSuggestions:10}),Xi=({key:t,value:e},{isDisabled:n,optionProps:o,isFocused:r,_state:i},l)=>{let{hoverProps:s}=a$4({isDisabled:n}),{label:a,data:c$1}=e;return jsxs(Fragment,{children:[jsxs("li",{...c(o,s),className:Lo({isDisabled:n,isHovered:r}),"data-active":r||void 0,ref:l,children:[jsx(a$a,{elementType:"span",display:"flex","aria-hidden":true,children:jsx(a$f,{name:a,...c$1?.avatar})}),jsxs(a$a,{display:"flex",flexDirection:"column",children:[jsx(a$n,{type:"subtitle",size:"sm",children:a}),jsx(a$n,{type:"helper",size:"sm",children:c$1?.description})]})]}),t===i.collection.getLastKey()?null:jsx(a$b,{})]})};function In(t){return t.displayName?.trim()||t.name?.trim()||t.id}function wn(t){return t.displayName??In(t)}function An({anchor:t,onClose:e,mentionLabel:n}){let{core:o}=xe(),{containerRef:r,items:i,maxMentionableUsersSuggestions:l}=useContext(Nn),[s,a]=useState(""),{contains:c$1}=a$j({sensitivity:"base"}),{formatMessage:u}=b$2(),d=useRef(false),f$1=useCallback(()=>{d.current=true,e();},[e]),p=useMemo(()=>{let g=i.filter(y=>s===""||c$1(In(y),s)).map(y=>({id:y.id,label:In(y),data:y}));return l?g.slice(0,l):g},[i,l,s,c$1]),m=useCallback(g=>jsx(a$k,{textValue:g.label,children:g.label},g.id),[]),h=useCallback(g=>{if(d.current||g==null)return;let y=i.find(R=>R.id===g);y&&(f$1(),o.exec("confirmMention",{id:y.id,displayName:wn(y)}),o.exec("insertText"," "),o.focus());},[f$1,o,i]),C=b$7({items:p,children:m,menuTrigger:"focus",onSelectionChange:h}),D=useCallback(g=>{if(d.current)return;f$1();let y=g==="backspace"?"":`@${C.inputValue}`;o.exec("removeMentionInput",y,g==="arrowStart"?"start":"end"),o.focus();},[f$1,o,C.inputValue]),V=useRef(null),M=useRef(null),B=useRef(null),S=useRef(null);a$l({ref:S,onInteractOutside:()=>{C.close();}});let{inputProps:L,listBoxProps:q}=a$m({defaultItems:p,inputRef:M,buttonRef:V,listBoxRef:B,popoverRef:S,menuTrigger:"focus","aria-label":n??u(Yi.mention)},C);useLayoutEffect(()=>{M.current?.focus(),setTimeout(()=>{M.current?.focus();});},[]);let $=useCallback(g=>{let y=g.currentTarget,R=y.selectionStart===0&&y.selectionEnd===0,x=y.selectionStart===y.value.length&&y.selectionEnd===y.value.length;if(g.key==="Backspace"&&R)g.preventDefault(),D("backspace");else if(g.key==="Escape")D("escape");else if(g.key==="ArrowLeft"||g.key==="ArrowRight"){let v=I=>g.key==="ArrowLeft"!=(b$3(I).getComputedStyle(I).direction==="rtl");(v(y)?R:x)&&(g.preventDefault(),D(v(t)?"arrowStart":"arrowEnd"));}let ie=g.metaKey||g.ctrlKey,se=g.key.toLowerCase(),fe=ie&&!g.shiftKey&&se==="z"&&o.canUndo(),pe=(ie&&g.shiftKey&&se==="z"||g.ctrlKey&&se==="y")&&o.canRedo();(fe||pe)&&(g.preventDefault(),fe?o.undo():o.redo(),f$1(),o.focus());},[t,D,f$1,o]),te=useMemo(()=>{if(!CSS.supports("field-sizing","content")){let g=b$3(M.current),y=M.current?g?.getComputedStyle(M.current).font:void 0;return {width:y?b$8({text:C.inputValue,font:y,element:M.current}).width+10:"4ch"}}},[C.inputValue]);return jsxs(Fragment,{children:[createPortal(jsx("input",{...c(L,{onKeyDown:$,onBlur:()=>{D("blur");},onChange:g=>{a(g.target.value);}}),style:te,dir:/\p{L}/u.test(C.inputValue)?"auto":void 0,className:Mo,ref:M}),t),jsx(b$9.Provider,{value:C,children:jsx(a$h,{triggerRef:r,isNonModal:true,ref:S,state:C,crossOffset:-2,children:jsx(c$2,{...q,items:void 0,ref:B,"data-testid":"editor-mention-listbox",className:a$6(f,sprinkles({width:"full"})),renderOption:Xi})})})]})}An.displayName="MentionInputOverlay";var Yi=c$1({mention:{defaultMessage:"Mention",id:"bui.editor.mention"}});var Hn=mt.forwardRef(({value:t,defaultValue:e$1,onChange:n,style:o,spellCheck:r,placeholder:i,isInline:l,isDisabled:s,editableContentAriaLabel:a,containerRef:c,onHelpDialogOpenRequest:u,mentionableUsers:d,editorHandle:f,maxMentionableUsersSuggestions:p,autoFocus:m,editorRef:h,saveOnEnter:C,onSave:D,autoLink:V,mentionLabel:M,boldLabel:B,italicLabel:S,underlineLabel:L,fontColorLabel:q,backgroundColorLabel:$,helpLabel:te,addLinkLabel:g,editLinkLabel:y,removeLinkLabel:R,linkAnnotationLabel:x,linkCancelLabel:ie,linkSaveLabel:se},fe)=>{let pe=useRef(null),v=useRef(null),{formatMessage:I}=b$2(),[Ye,Ze]=useState(null),xt=useRef(0),[en,bt]=useState(false),yt=()=>{let E=v.current?.querySelector("[data-mention-anchor]");E&&(xt.current+=1,Ze({anchor:E,id:xt.current}));},be=Ln({value:t,defaultValue:e$1,onChange:n,isDisabled:s,onMentionTrigger:yt,onMentionInputRemoved:()=>{Ze(null);},canStartMention:()=>(d?.length??0)>0,resolveMention:E=>{let G=d?.find(H=>H.id===E);return G&&wn(G)},autoLink:V}),Je=be.core;mt.useEffect(()=>{h&&(h.current=Je);},[Je,h]);let T=E=>a$2(E)?false:C&&E.key==="Enter"&&!E.shiftKey||(E.ctrlKey||E.metaKey)&&E.key==="Enter"?(E.preventDefault(),D(),true):E.altKey&&E.key==="F10"?(E.preventDefault(),pe.current?.querySelector("button")?.focus(),true):false,{editableProps:Et}=zn(be,{ref:v,autoFocus:m,onKeyDown:T}),Qe=E=>{if(s)return;let{isLinkClick:G,url:H}=Wo(E.target,{metaKey:E.metaKey,ctrlKey:E.ctrlKey,mac:e()});G&&(E.preventDefault(),H&&b$3(E.currentTarget).open(H,"_blank","noopener,noreferrer"));};mt.useEffect(()=>{let E=v.current;if(!E||s)return;let G=a$8(E),H=b$3(E),ke=Ce=>{bt(e()?Ce.metaKey:Ce.ctrlKey);},nt=()=>{bt(false);};return G.addEventListener("keydown",ke),G.addEventListener("keyup",ke),H.addEventListener("blur",nt),()=>{G.removeEventListener("keydown",ke),G.removeEventListener("keyup",ke),H.removeEventListener("blur",nt),nt();}},[s]),useImperativeHandle(fe,()=>({startMention:()=>{d?.length&&(v.current?.querySelector("input[role='combobox']")||(Je.exec("insertMentionInput"),yt()));}})),useImperativeHandle(f,()=>({setCaretPosition:E=>{be.setCaretPosition(E);},focus:()=>{be.focus();}}));let et=useMemo(()=>({items:d||[],containerRef:c,maxMentionableUsersSuggestions:p}),[d,c,p]),tt=be.isEmpty;return jsx(Nn.Provider,{value:et,children:jsxs(Pn,{editor:be,children:[jsxs(a$9,{className:a$6(Nt,"BaselineUI-Editor-RichEditorToolbar"),"aria-controls":Et.id,ref:pe,children:[jsxs(a$a,{display:"flex",flexDirection:"row",role:"group",gap:"xs",paddingX:"sm",children:[jsx(Yt,{markName:"bold",icon:BoldIcon,ariaLabel:B??I(Xe.bold),isDisabled:s}),jsx(Yt,{markName:"italic",icon:ItalicIcon,ariaLabel:S??I(Xe.italic),isDisabled:s}),jsx(Yt,{markName:"underline",icon:UnderlineIcon,ariaLabel:L??I(Xe.underline),isDisabled:s})]}),jsx(a$b,{orientation:"vertical",className:rt}),jsx(_n,{colorKey:"color","aria-label":q??I(Xe.fontColor),isDisabled:s}),jsx(a$b,{orientation:"vertical",className:rt}),jsx(_n,{colorKey:"backgroundColor","aria-label":$??I(Xe.backgroundColor),isDisabled:s}),jsx(a$b,{orientation:"vertical",className:rt}),jsx(Sr,{isDisabled:s,addLinkLabel:g,editLinkLabel:y,removeLinkLabel:R,linkAnnotationLabel:x,linkCancelLabel:ie,linkSaveLabel:se}),jsx(a$b,{orientation:"vertical",className:rt}),jsx(a$c,{className:He,icon:QuestionmarkCircleIcon,size:"sm","aria-label":te??I(Xe.help),"data-testid":"editor-help-button",onPress:u})]}),jsx(a$b,{variant:"secondary"}),jsxs("div",{style:{position:"relative"},children:[!!(i&&tt)&&jsx("span",{"aria-hidden":true,"aria-disabled":true,"data-testid":"editor-placeholder",style:{position:"absolute",pointerEvents:"none",userSelect:"none",top:0,left:0,right:0},className:a$6(ot({isDisabled:s}),To,"BaselineUI-Editor-RichEditorPlaceholder"),children:i}),jsx("div",{...Et,onClick:Qe,"data-mod-held":en?"":void 0,"aria-label":a,"aria-placeholder":i,spellCheck:r,style:o,className:a$6(ot({isDisabled:s}),It({isInline:l}),"BaselineUI-Editor-RichEditorEditingArea")})]}),Ye!==null&&jsx(An,{anchor:Ye.anchor,mentionLabel:M,onClose:()=>{Ze(null);}},Ye.id)]})})});Hn.displayName="RichEditor";var Xe=c$1({bold:{defaultMessage:"Bold",id:"bui.editor.bold"},italic:{defaultMessage:"Italic",id:"bui.editor.italic"},underline:{defaultMessage:"Underline",id:"bui.editor.underline"},backgroundColor:{defaultMessage:"Background Color",id:"bui.editor.backgroundColor"},fontColor:{defaultMessage:"Font Color",id:"bui.editor.fontColor"},help:{defaultMessage:"Help",id:"bui.editor.help"}});var Ir=mt.memo(mt.forwardRef(({className:t,style:e,"data-block-id":n,"data-block-class":o,enableRichText:r=false,onCancel:i,onSave:l,isInline:s=true,submitButtonIcon:a=ArrowUpCircleFilledIcon,submitButtonAriaLabel:c$1,cancelButtonAriaLabel:u,"aria-label":d,"aria-describedby":f,"aria-labelledby":p,"aria-details":m,editableContentAriaLabel:h="Editing Area",footerButtons:C,clearOnCancel:D,clearOnSave:V,mentionLabel:M,boldLabel:B,italicLabel:S,underlineLabel:L,fontColorLabel:q,backgroundColorLabel:$,helpLabel:te,closeLabel:g,actionLabel:y,shortcutLabel:R,toolbarFocusLabel:x,selectAllLabel:ie,cutLabel:se,copyLabel:fe,pasteLabel:pe,undoLabel:v,redoLabel:I,openHelpDialogLabel:Ye,submitLabel:Ze,addLinkLabel:xt,editLinkLabel:en,removeLinkLabel:bt,linkAnnotationLabel:yt,linkCancelLabel:be,linkSaveLabel:Je,...T},Et)=>{let Qe=useRef(null),{formatMessage:et}=b$2(),tt=useRef(null),E=useRef(null),G=useRef(null),H=!r&&T.variant==="minimal",ke=useRef(null),[nt,Ce]=mt.useState(T.value||T.defaultValue),tn=T.value!==void 0&&T.onChange!==void 0;r&&T.value!==void 0&&!T.onChange&&a$d("editor-rich-value-uncontrolled","Editor: `value` without `onChange` in rich text mode sets the initial content only. Use `defaultValue` for uncontrolled content, or add `onChange` to control the value.");let Un=T.value!==void 0&&(!r||tn),nn=T.value;mt.useEffect(()=>{Un&&nn!==void 0&&Ce(nn);},[Un,nn]);let on=T.isDisabled||T.isSaveDisabled||!b$4(nt||""),{fieldProps:Nr}=a$e({"aria-label":d,"aria-labelledby":p,"aria-describedby":f,"aria-details":m,labelElementType:"div"});H&&!T.avatarName&&console.warn("Editor: When using the minimal `variant` and `enableRichText` is `false`, you should provide an `avatarName`.");let rn=useCallback(()=>{Ce(""),r?Qe.current?.setValue("<p></p>",{emit:true}):E.current?.clear();},[r]),vt=useCallback(()=>{on||(l?.(r?Qe.current?.getValue()??"":tt.current.value),V&&rn());},[rn,V,r,l,on]),Vn=jsx(a$c,{variant:"ghost","aria-label":c$1||et(Kn.save),icon:a,isDisabled:on,"data-testid":"editor-save-button",size:"md",excludeFromTabOrder:H,className:a$6({[So]:H},"BaselineUI-Editor-Save"),onPress:vt,preventFocusOnPress:true}),[wr,sn]=mt.useState(false),{keyboardProps:Ar}=j({onKeyDown:j=>{(j.metaKey||j.ctrlKey)&&j.shiftKey&&j.key.toLowerCase()==="h"?(j.preventDefault(),sn(true)):j.continuePropagation();}}),Wn=useCallback(j=>{Ce(j),T.onChange?.(j);},[T]);return jsxs("div",{...c(Nr,r?Ar:{}),role:"application",ref:b$1(G,Et),style:e,"data-block-id":n,"data-block-class":o,className:a$6(Ro({isInline:s,isMinimal:H}),"BaselineUI-Editor",t),"aria-disabled":T.isDisabled,children:[H?jsxs(Fragment,{children:[s?jsx(a$f,{className:vo,name:T.avatarName||""}):null,jsxs("div",{className:Po({isInline:s}),children:[jsx(wt,{isMinimal:H,textBoxRef:tt,ref:E,isInline:s,editableContentAriaLabel:h,...T,onChange:Wn,onSave:vt}),Vn]})]}):jsxs(Fragment,{children:[r?jsx(Hn,{containerRef:G,ref:ke,editorRef:Qe,isInline:s,editableContentAriaLabel:h,onHelpDialogOpenRequest:()=>{sn(true);},mentionLabel:M,boldLabel:B,italicLabel:S,underlineLabel:L,fontColorLabel:q,backgroundColorLabel:$,helpLabel:te,addLinkLabel:xt,editLinkLabel:en,removeLinkLabel:bt,linkAnnotationLabel:yt,linkCancelLabel:be,linkSaveLabel:Je,...T,value:tn?T.value:void 0,defaultValue:T.defaultValue??(tn?void 0:T.value),onChange:Wn,onSave:vt}):jsxs(Fragment,{children:[!s&&jsx(a$b,{variant:"secondary"}),jsx(wt,{onCancel:i,textBoxRef:tt,ref:E,isInline:s,editableContentAriaLabel:h,...T,onChange:j=>{Ce(j),T.onChange?.(j);},onSave:vt})]}),jsx(a$b,{variant:"secondary"}),jsxs("div",{className:a$6(Nt,sprinkles({justifyContent:"space-between"}),"BaselineUI-Editor-Footer"),children:[jsxs(a$a,{paddingX:"sm",gap:"sm",display:"flex",children:[r&&T.mentionableUsers?jsx(a$c,{icon:AtIcon,size:"sm","aria-label":M??et(Kn.mention),"data-testid":"editor-mention-button",onPress:()=>ke.current?.startMention(),preventFocusOnPress:true,className:"BaselineUI-Editor-Mention"}):null,C?.map(({type:j,props:Rt},qn)=>j==="action"?jsx(a$c,{...Rt,size:"sm",isDisabled:T.isDisabled||Rt.isDisabled},qn):jsx(a$g,{...Rt,size:"sm",variant:"tertiary",isDisabled:T.isDisabled||Rt.isDisabled},qn))]}),jsxs(a$a,{children:[!!i&&jsx(a$c,{variant:"secondary",icon:XCircleFilledIcon,isDisabled:T.isDisabled,"data-testid":"editor-cancel-button",size:"md",onPress:()=>{i(),D&&rn();},"aria-label":u||et(Kn.cancel),className:"BaselineUI-Editor-Cancel"}),Vn]})]})]}),jsx(Oo,{isOpen:wr,onClose:()=>{sn(false);},toolbarFocusLabel:x,helpLabel:te,closeLabel:g,actionLabel:y,shortcutLabel:R,boldLabel:B,italicLabel:S,underlineLabel:L,selectAllLabel:ie,cutLabel:se,copyLabel:fe,pasteLabel:pe,undoLabel:v,redoLabel:I,openHelpDialogLabel:Ye,submitLabel:Ze})]})}));Ir.displayName="Editor";var Kn=c$1({cancel:{defaultMessage:"Cancel",id:"bui.editor.cancel"},save:{defaultMessage:"Save",id:"bui.editor.save"},mention:{defaultMessage:"Mention",id:"bui.editor.mention"}});
|
|
29
|
+
export{ut as a,xe as b,Xt as c,Ln as d,Mr as e,zn as f,Pn as g,Ir as h};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$4,d as d$1,c as c$3,b as b$4}from'./chunk-C4WHTPLY.mjs';import {b as b$3}from'./chunk-KG2EHFYA.mjs';import {d,g,b}from'./chunk-
|
|
1
|
+
import {a as a$4,d as d$1,c as c$3,b as b$4}from'./chunk-C4WHTPLY.mjs';import {b as b$3}from'./chunk-KG2EHFYA.mjs';import {d,g,b}from'./chunk-RINS2TBF.mjs';import {b as b$2,a as a$7,i as i$1}from'./chunk-TZGK36KC.mjs';import {a as a$6}from'./chunk-Y2MIU76N.mjs';import {a as a$5}from'./chunk-AI6WQPRX.mjs';import {a}from'./chunk-FPM5UJRF.mjs';import {c as c$2,e}from'./chunk-KUDCYGII.mjs';import {a as a$3}from'./chunk-RT4LMB6X.mjs';import {h,l,u}from'./chunk-PPHSLODC.mjs';import {c,b as b$1}from'./chunk-3WKDIXCM.mjs';import {c as c$1,a as a$2}from'./chunk-ETM4MNG4.mjs';import {i,a as a$1,j,k}from'./chunk-SD43KVTU.mjs';import {createContext,useRef,useState,useEffect,useCallback,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 {b}from'./chunk-
|
|
1
|
+
import {b}from'./chunk-IDIZSV2Y.mjs';import {a}from'./chunk-66CUIXA6.mjs';import {Fragment}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
|
+
import {a as a$4}from'./chunk-6GV3YWV7.mjs';import {a as a$1}from'./chunk-6Q5PNIYZ.mjs';import {a as a$7}from'./chunk-JZXLV6JU.mjs';import {b,c as c$1}from'./chunk-IDIZSV2Y.mjs';import {a as a$3}from'./chunk-O7XK2WIX.mjs';import {a as a$6}from'./chunk-JTKDC2CM.mjs';import {d}from'./chunk-4EAXDHSV.mjs';import {a as a$2}from'./chunk-STMDFIUL.mjs';import {b as b$1,c}from'./chunk-3WKDIXCM.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$5}from'./chunk-4QEH5CGK.mjs';import {XIcon}from'@baseline-ui/icons/20';import h 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$4}from'./chunk-O23QVPUT.mjs';import {a as a$7,b as b$2}from'./chunk-
|
|
1
|
+
import {a as a$4}from'./chunk-O23QVPUT.mjs';import {a as a$7,b as b$2}from'./chunk-ZC5WXVNV.mjs';import {h as h$1,g}from'./chunk-UZ672WDX.mjs';import {a as a$5}from'./chunk-LQHFBXCW.mjs';import {a as a$3}from'./chunk-BA5OA5DY.mjs';import {c}from'./chunk-BGQRLALS.mjs';import {b}from'./chunk-IHES52NR.mjs';import {b as b$1}from'./chunk-YDUKC7QS.mjs';import {a as a$1}from'./chunk-KX7WG3L4.mjs';import {b as b$3,a as a$8}from'./chunk-I7LPPUZS.mjs';import {a as a$a}from'./chunk-22MA6EYO.mjs';import {a as a$9}from'./chunk-22VRCVTH.mjs';import {a as a$2}from'./chunk-66CUIXA6.mjs';import {c as c$1}from'./chunk-3WKDIXCM.mjs';import {b as b$4,h,i}from'./chunk-SD43KVTU.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$6}from'./chunk-4QEH5CGK.mjs';import x,{useContext,useMemo,useEffect,useState,useRef}from'react';import {jsx,jsxs}from'react/jsx-runtime';import {motion,AnimatePresence}from'motion/react';import {themeVars}from'@baseline-ui/tokens';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {a as a$1}from'./chunk-RT4LMB6X.mjs';import {b,c}from'./chunk-3WKDIXCM.mjs';import {a}from'./chunk-ETM4MNG4.mjs';import {forwardRef,createContext,useRef,useMemo,useContext,useState,useCallback}from'react';import {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 M=Symbol("default");function z({values:e,children:t}){for(let[r,o]of e)t=jsx(r.Provider,{value:o,children:t});return t}function Q(e){let{className:t,style:r,children:o,defaultClassName:l=void 0,defaultChildren:n=void 0,defaultStyle:a,values:i,render:d}=e;return useMemo(()=>{let c,u,s;return typeof t=="function"?c=t({...i,defaultClassName:l}):c=t,typeof r=="function"?u=r({...i,defaultStyle:a||{}}):u=r,typeof o=="function"?s=o({...i,defaultChildren:n}):o==null?s=n:s=o,{className:c??l,style:u||a?{...a,...u}:void 0,children:s??n,"data-rac":"",render:d?C=>d(C,i):void 0}},[t,r,o,l,n,a,i,d])}function D(e,t){let r=useContext(e);if(t===null)return null;if(r&&typeof r=="object"&&"slots"in r&&r.slots){let o=t||M;if(!r.slots[o]){let l=new Intl.ListFormat().format(Object.keys(r.slots).map(a=>`"${a}"`)),n=t?`Invalid slot "${t}".`:"A slot prop is required.";throw new Error(`${n} Valid slot names are ${l}.`)}return r.slots[o]}return r}function Y(e,t,r){let o=D(r,e.slot)||{},{ref:l,...n}=o,a=a$1(useMemo(()=>b(t,l),[t,l])),i=c(n,e);return "style"in n&&n.style&&"style"in e&&e.style&&(typeof n.style=="function"||typeof e.style=="function"?i.style=d=>{let c=typeof n.style=="function"?n.style(d):n.style,u={...d.defaultStyle,...c},s=typeof e.style=="function"?e.style({...d,defaultStyle:u}):e.style;return {...u,...s}}:i.style={...n.style,...e.style}),[i,a]}function Z(e=true){let[t,r]=useState(e),o=useRef(false),l=useCallback(n=>{o.current=true,r(!!n);},[]);return a(()=>{o.current||r(false);},[]),[l,t]}function ee(e){let t=/^(data-.*)$/,r={};for(let o in e)t.test(o)||(r[o]=e[o]);return r}function A(e,t,r){let{render:o,...l}=t,n=useRef(null),a$1=useMemo(()=>b(r,n),[r,n]);a(()=>{process.env.NODE_ENV!=="production"&&o&&(n.current?n.current.localName!==e&&console.warn(`Unexpected DOM element returned by custom \`render\` function. Expected <${e}>, got <${n.current.localName}>. This may break the component behavior and accessibility.`):console.warn("Ref was not connected to DOM element returned by custom `render` function. Did you forget to pass through or merge the `ref`?"));},[e,o]);let i={...l,ref:a$1};return o?o(i,void 0):jsx(e,{...i})}var T={},re=new Proxy({},{get(e,t){if(typeof t!="string")return;let r=T[t];return r||(r=forwardRef(A.bind(null,t)),T[t]=r),r}});typeof HTMLTemplateElement<"u"&&(Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:true,enumerable:true,get:function(){return this.content.firstChild}}),Object.defineProperty(HTMLTemplateElement.prototype,"appendChild",{configurable:true,enumerable:true,value:function(e){return this.content.appendChild(e)}}),Object.defineProperty(HTMLTemplateElement.prototype,"removeChild",{configurable:true,enumerable:true,value:function(e){return this.content.removeChild(e)}}),Object.defineProperty(HTMLTemplateElement.prototype,"insertBefore",{configurable:true,enumerable:true,value:function(e,t){return this.content.insertBefore(e,t)}}));var f=createContext(false);function se(e){if(useContext(f))return jsx(Fragment,{children:e.children});let r=jsx(f.Provider,{value:true,children:e.children});return jsx("template",{children:r})}function ce(e){let t=(r,o)=>useContext(f)?null:e(r,o);return t.displayName=e.displayName||e.name,forwardRef(t)}function fe(){return useContext(f)}export{M as a,z as b,Q as c,D as d,Y as e,Z as f,ee as g,re as h,se as i,ce as j,fe as k};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {b}from'./chunk-Q5UMLFN3.mjs';import {a as a$9}from'./chunk-
|
|
1
|
+
import {b}from'./chunk-Q5UMLFN3.mjs';import {a as a$9}from'./chunk-JTKDC2CM.mjs';import {a as a$4,b as b$1}from'./chunk-GMALMQWI.mjs';import {b as b$2}from'./chunk-N2XGJKZG.mjs';import {a as a$5}from'./chunk-66CUIXA6.mjs';import {a as a$3}from'./chunk-FPM5UJRF.mjs';import {a as a$6}from'./chunk-SGZWUG3H.mjs';import {a as a$7}from'./chunk-STMDFIUL.mjs';import {a as a$8}from'./chunk-B3EZOXNU.mjs';import {j}from'./chunk-KUDCYGII.mjs';import {d}from'./chunk-F7WPMQ3P.mjs';import {c}from'./chunk-3WKDIXCM.mjs';import {c as c$1}from'./chunk-ETM4MNG4.mjs';import {i,a as a$1}from'./chunk-SD43KVTU.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$2}from'./chunk-4QEH5CGK.mjs';import H,{useContext,useEffect,useMemo,useState}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {AnimatePresence,motion}from'motion/react';import {ChevronRightIcon}from'@baseline-ui/icons/8';/**
|
|
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$4}from'./chunk-HCQI7MNN.mjs';import {a as a$d}from'./chunk-GJTOYWLJ.mjs';import {a as a$f}from'./chunk-J2KZM2I2.mjs';import {a as a$3,b as b$2}from'./chunk-TIGGKOJQ.mjs';import {a as a$2}from'./chunk-XDTKLQJB.mjs';import {a as a$g}from'./chunk-SH7ZI4CA.mjs';import {b as b$1}from'./chunk-SZTFMBPY.mjs';import {b as b$6}from'./chunk-INFMXVHD.mjs';import {a as a$c}from'./chunk-O7XK2WIX.mjs';import {a as a$e}from'./chunk-UY76QEJC.mjs';import {a as a$1}from'./chunk-RPIUPWPO.mjs';import {a as a$h}from'./chunk-GMALMQWI.mjs';import {b as b$3}from'./chunk-N2XGJKZG.mjs';import {b as b$4}from'./chunk-K5RYVERS.mjs';import {b as b$5,j as j$1}from'./chunk-MBRNO6IW.mjs';import {a as a$b}from'./chunk-VDUFLHKK.mjs';import {a as a$a}from'./chunk-FPM5UJRF.mjs';import {a as a$8}from'./chunk-RSKKEGJZ.mjs';import {a as a$6}from'./chunk-STMDFIUL.mjs';import {a as a$7}from'./chunk-B3EZOXNU.mjs';import {j}from'./chunk-KUDCYGII.mjs';import {a as a$9}from'./chunk-RT4LMB6X.mjs';import {b,c as c$1}from'./chunk-3WKDIXCM.mjs';import {c}from'./chunk-ETM4MNG4.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$5}from'./chunk-4QEH5CGK.mjs';import A from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {sprinkles}from'@baseline-ui/tokens';/**
|
|
2
|
+
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
+
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
+
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
+
* This notice may not be removed from this file.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
var ne="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z6m3",me="_14uvjig3 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z69i _1yep5z69j _1yep5z69k",ue="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6kz _1yep5z6l0 _1yep5z6l1 _1yep5z6jz _1yep5z6k0 _1yep5z6k1",ye=a({defaultClassName:"_14uvjig0 _1yep5z6dy _1yep5z6ez",variantClassNames:{isDisabled:{true:"_1yep5z611l"},hasNumberInput:{false:"_1yep5z6p1 _1yep5z6p2 _1yep5z6p3"}},defaultVariants:{},compoundVariants:[]}),ce=a({defaultClassName:"_14uvjigb _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6gh _1yep5z6m5 _1yep5z6lq",variantClassNames:{active:{true:"_14uvjigc _1yep5z6136 _1yep5z618x _1yep5z618p"},isDisabled:{true:"_14uvjigd _1yep5z613a"},isReadOnly:{true:"_1yep5z615l _1yep5z615m _1yep5z615n"},isFocusVisible:{true:"_14uvjigf _1yep5z6136 _1yep5z6189"},isHovered:{true:"_14uvjigg _1yep5z6136"}},defaultVariants:{},compoundVariants:[]}),fe="z9nup8a _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6kt _1yep5z6ku _1yep5z6kv",be="_14uvjig4 z9nup87 _1yep5z6gd _1yep5z6m3",_e=a({defaultClassName:"_14uvjig5 _1yep5z6gh _1yep5z6iw _1yep5z6ix _1yep5z6iy _1yep5z6m4",variantClassNames:{active:{true:"_1yep5z6136"},isFocusVisible:{true:"_1yep5z6136"},isDisabled:{true:"_1yep5z613a"},isHovered:{true:"_1yep5z6136"}},defaultVariants:{},compoundVariants:[]});var N=A.forwardRef(({className:g,style:v,onChange:i,onChangeEnd:p,numberFormatOptions:o,isDisabled:e,step:h,minValue:d,maxValue:S,value:u,"aria-label":s,"aria-labelledby":r,"aria-details":n,"aria-describedby":m,"data-block-id":y,"data-block-class":I,defaultValue:T,isReadOnly:c$1,label:f,description:x,id:j,includeNumberInput:b$2,numberInputClassName:k,numberInputStyle:he},Se)=>{let H=A.useRef(null),F=c(),O={onChange:i===void 0?void 0:z=>{i(z[0]);},isDisabled:e||c$1,step:h,minValue:d,maxValue:S,onChangeEnd:p===void 0?void 0:z=>{p(z[0]);},value:u===void 0?void 0:[u],defaultValue:T===void 0?void 0:[T],"aria-label":s,"aria-labelledby":r,"aria-details":n,"aria-describedby":[x?F:void 0,m].filter(Boolean).join(" ")||void 0,id:j,label:f},xe=a$1(o),_=a$2({...O,numberFormatter:xe}),{trackProps:je,groupProps:ke,labelProps:L}=a$3(O,_,H),U=jsx(a$4,{variant:"ghost",showStepper:false,className:k,"aria-label":s,"aria-labelledby":L.id,isDisabled:e,isReadOnly:c$1,value:_.getThumbValue(0),formatOptions:o,onChange:z=>{Number.isNaN(z)||(_.setThumbDragging(0,true),_.setThumbValue(0,z),_.setThumbDragging(0,false));},style:{width:60,textAlign:"right",flexShrink:0,...he}});return jsxs("div",{...ke,style:v,"data-block-id":y,"data-block-class":I,className:a$5(ne,"BaselineUI-Slider",g),children:[f?jsxs("div",{className:ue,children:[jsx("label",{...L,className:a$5(ye({isDisabled:e,hasNumberInput:!!b$2}),"BaselineUI-Slider-Label"),children:f}),b$2?U:null]}):null,jsxs("div",{className:me,children:[jsx("div",{...je,className:a$5(be,"BaselineUI-Slider-Track"),ref:b(H,Se),"data-testid":"track",children:jsx(Pe,{state:_,trackRef:H,isDisabled:e,isReadOnly:c$1})}),b$2&&!f?U:null]}),b$1({description:x,descriptionProps:{id:F},errorMessageProps:{},isDisabled:e})]})});N.displayName="Slider";function Pe({state:g,trackRef:v,isDisabled:i,isReadOnly:p}){let o=A.useRef(null),{thumbProps:e,inputProps:h,isDragging:d}=b$2({trackRef:v,inputRef:o},g),{focusProps:S,isFocused:u,isFocusVisible:s}=a$6(),{hoverProps:r,isHovered:n}=a$7({isDisabled:i}),{direction:m}=b$3(),y=a$8({"data-disabled":i,"data-readonly":p,"data-hovered":n,"data-focus-visible":s,"data-dragging":d,"data-focused":u});return jsxs(Fragment,{children:[jsx("div",{className:a$5(_e({isDisabled:i,isFocusVisible:s,active:d,isHovered:n}),"BaselineUI-Slider-TrackHighlight"),style:{width:m==="rtl"?`calc(100% - ${e.style?.left})`:e.style?.left},"data-testid":"track-highlight"}),jsxs("div",{...c$1(e,r,y),className:a$5(fe,"BaselineUI-Slider-ThumbHandle"),"data-testid":"thumb",children:[jsx("div",{className:a$5(ce({isDisabled:i,isFocusVisible:s,active:d,isReadOnly:p,isHovered:n}),"BaselineUI-Slider-Thumb")}),jsx(b$4,{children:jsx("input",{ref:o,...c$1(h,S)})})]})]})}var ve=A.forwardRef(({className:g,style:v,onChange:i,"data-block-id":p,icon:o,formatValue:e=m=>m,tooltip:h=true,iconTooltip:d=true,popoverContentProps:S,isDisabled:u,onTriggerPress:s,...r},n)=>{let m=a$9(n),[y,I]=a$a(r.value,r.defaultValue||0,i),[T,c]=A.useState(false),{keyboardProps:f}=j({onKeyDown:k=>{k.key==="Enter"||k.key==="Escape"?c(false):k.continuePropagation();}}),{tooltipProps:x}=a$b({label:r["aria-label"],tooltip:h}),j$2=e(y||0),b=x?.isDisabled||r["aria-label"]?`${r["aria-label"]}, ${j$2}`:j$2.toString();return jsxs(a$c,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:a$5("BaselineUI-IconSlider",g),"data-block-id":p,style:v,ref:m,children:[o?jsx(a$d,{icon:o,label:r["aria-label"],tooltip:d,"aria-hidden":"true",size:24,isFocusable:false,className:sprinkles({color:"icon.primary"})}):null,jsxs(b$5,{type:"dialog",isOpen:T,onOpenChange:c,children:[jsx(j$1,{children:jsx(a$e,{...x,children:jsx(b$6,{label:j$2,variant:"popover","aria-label":b,isDisabled:u,style:{fontVariantNumeric:"tabular-nums",minWidth:68,justifyContent:"space-between"},onPressStart:s})})}),jsx(a$f,{placement:"bottom start",...S,children:jsx(a$g,{size:"content","aria-label":b,children:jsx(a$h,{autoFocus:true,children:jsx(a$c,{paddingY:"sm",paddingX:"lg",marginY:"md",style:{width:215},...f,children:jsx(N,{...r,onChange:I,value:y})})})})})]})]})});ve.displayName="IconSlider";export{N as a,ve as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$2}from'./chunk-I7SMG6PT.mjs';import {i}from'./chunk-5VNC6UYE.mjs';import {c,b as b$
|
|
1
|
+
import {a as a$2}from'./chunk-I7SMG6PT.mjs';import {i}from'./chunk-5VNC6UYE.mjs';import {c as c$1,b as b$3,a as a$3}from'./chunk-GFBRKKX4.mjs';import {c,b as b$2}from'./chunk-MHAPHPNN.mjs';import {d,f}from'./chunk-XOS3JIQX.mjs';import {c as c$2}from'./chunk-L3SNGDBH.mjs';import {b as b$1}from'./chunk-DF2D7NE6.mjs';import {a as a$4}from'./chunk-66CUIXA6.mjs';import {a as a$1}from'./chunk-RT4LMB6X.mjs';import {c as c$3}from'./chunk-3WKDIXCM.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$5}from'./chunk-4QEH5CGK.mjs';import b 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$3}from'./chunk-
|
|
1
|
+
import {a as a$3}from'./chunk-RFVLSR2P.mjs';import {c}from'./chunk-RFVPGD6N.mjs';import {a as a$2}from'./chunk-6Q5PNIYZ.mjs';import {b as b$1}from'./chunk-YDUKC7QS.mjs';import {a as a$5,b as b$3}from'./chunk-IROFSPEN.mjs';import {a as a$1}from'./chunk-STMDFIUL.mjs';import {b as b$2,c as c$1}from'./chunk-3WKDIXCM.mjs';import {a as a$6}from'./chunk-SD43KVTU.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$4}from'./chunk-4QEH5CGK.mjs';import {assignInlineVars}from'@vanilla-extract/dynamic';import b,{useContext,useState,useEffect,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 @@
|
|
|
7
7
|
* This notice may not be removed from this file.
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
var e=["bui.alertDialog.close","bui.audioPlayer.audioTimeline","bui.audioPlayer.pause","bui.audioPlayer.play","bui.buttonSelect.more","bui.buttonSelect.moreWithLabel","bui.calendar.nextMonth","bui.calendar.nextYear","bui.calendar.previousMonth","bui.calendar.previousYear","bui.calendar.selectMonth","bui.calendar.selectYear","bui.colorInput.add","bui.colorInput.addColor","bui.colorInput.cancel","bui.colorInput.colorFormat","bui.colorInput.colorPresets","bui.colorInput.customColors","bui.colorInput.indeterminate","bui.colorInput.newColor","bui.colorInput.noColor","bui.colorInput.removeColor","bui.colorInput.transparent","bui.colorSwatch.none","bui.dateField.openCalendar","bui.drawer.close","bui.editor.action","bui.editor.addLink","bui.editor.backgroundColor","bui.editor.bold","bui.editor.cancel","bui.editor.close","bui.editor.copy","bui.editor.cut","bui.editor.editLink","bui.editor.fontColor","bui.editor.help","bui.editor.italic","bui.editor.linkAnnotation","bui.editor.mention","bui.editor.openHelpDialog","bui.editor.paste","bui.editor.redo","bui.editor.removeLink","bui.editor.save","bui.editor.selectAll","bui.editor.shortcut","bui.editor.submit","bui.editor.toolbarFocus","bui.editor.underline","bui.editor.undo","bui.fileList.loading","bui.fileList.removeHint","bui.freehandCanvas.redo","bui.freehandCanvas.undo","bui.imageDropZone.selectImage","bui.imageGallery.cancel","bui.imageGallery.delete","bui.imageGallery.loading","bui.inlineAlert.close","bui.pagination.goToPage","bui.pagination.nextPage","bui.pagination.pageXofY","bui.pagination.prevPage","bui.select.clear","bui.select.more","bui.select.search","bui.select.selectAll","bui.stepper.completed","bui.stepper.label","bui.stepper.step","bui.table.loading","bui.tag.remove","bui.toolbar.more","bui.treeView.collapse","bui.treeView.expand","bui.treeView.rename","bui.useMedia.paused","bui.useMedia.playing"],i={close:["bui.alertDialog.close","bui.drawer.close","bui.editor.close","bui.inlineAlert.close"],audioTimeline:["bui.audioPlayer.audioTimeline"],pause:["bui.audioPlayer.pause"],play:["bui.audioPlayer.play"],more:["bui.buttonSelect.more","bui.select.more","bui.toolbar.more"],moreWithLabel:["bui.buttonSelect.moreWithLabel"],nextMonth:["bui.calendar.nextMonth"],nextYear:["bui.calendar.nextYear"],previousMonth:["bui.calendar.previousMonth"],previousYear:["bui.calendar.previousYear"],selectMonth:["bui.calendar.selectMonth"],selectYear:["bui.calendar.selectYear"],add:["bui.colorInput.add"],addColor:["bui.colorInput.addColor"],cancel:["bui.colorInput.cancel","bui.editor.cancel","bui.imageGallery.cancel"],colorFormat:["bui.colorInput.colorFormat"],colorPresets:["bui.colorInput.colorPresets"],customColors:["bui.colorInput.customColors"],indeterminate:["bui.colorInput.indeterminate"],newColor:["bui.colorInput.newColor"],noColor:["bui.colorInput.noColor"],removeColor:["bui.colorInput.removeColor"],transparent:["bui.colorInput.transparent"],none:["bui.colorSwatch.none"],openCalendar:["bui.dateField.openCalendar"],action:["bui.editor.action"],addLink:["bui.editor.addLink"],backgroundColor:["bui.editor.backgroundColor"],bold:["bui.editor.bold"],copy:["bui.editor.copy"],cut:["bui.editor.cut"],editLink:["bui.editor.editLink"],fontColor:["bui.editor.fontColor"],help:["bui.editor.help"],italic:["bui.editor.italic"],linkAnnotation:["bui.editor.linkAnnotation"],mention:["bui.editor.mention"],openHelpDialog:["bui.editor.openHelpDialog"],paste:["bui.editor.paste"],redo:["bui.editor.redo","bui.freehandCanvas.redo"],removeLink:["bui.editor.removeLink"],save:["bui.editor.save"],selectAll:["bui.editor.selectAll","bui.select.selectAll"],shortcut:["bui.editor.shortcut"],submit:["bui.editor.submit"],toolbarFocus:["bui.editor.toolbarFocus"],underline:["bui.editor.underline"],undo:["bui.editor.undo","bui.freehandCanvas.undo"],loading:["bui.fileList.loading","bui.imageGallery.loading","bui.table.loading"],removeHint:["bui.fileList.removeHint"],selectImage:["bui.imageDropZone.selectImage"],delete:["bui.imageGallery.delete"],goToPage:["bui.pagination.goToPage"],nextPage:["bui.pagination.nextPage"],pageXofY:["bui.pagination.pageXofY"],prevPage:["bui.pagination.prevPage"],clear:["bui.select.clear"],search:["bui.select.search"],completed:["bui.stepper.completed"],label:["bui.stepper.label"],step:["bui.stepper.step"],remove:["bui.tag.remove"],collapse:["bui.treeView.collapse"],expand:["bui.treeView.expand"],rename:["bui.treeView.rename"],paused:["bui.useMedia.paused"],playing:["bui.useMedia.playing"]};export{e as a,i as b};
|
|
10
|
+
var e=["bui.alertDialog.close","bui.audioPlayer.audioTimeline","bui.audioPlayer.pause","bui.audioPlayer.play","bui.buttonSelect.more","bui.buttonSelect.moreWithLabel","bui.calendar.nextMonth","bui.calendar.nextYear","bui.calendar.previousMonth","bui.calendar.previousYear","bui.calendar.selectMonth","bui.calendar.selectYear","bui.colorInput.add","bui.colorInput.addColor","bui.colorInput.cancel","bui.colorInput.colorFormat","bui.colorInput.colorPresets","bui.colorInput.customColors","bui.colorInput.indeterminate","bui.colorInput.newColor","bui.colorInput.noColor","bui.colorInput.removeColor","bui.colorInput.transparent","bui.colorSwatch.none","bui.dateField.openCalendar","bui.drawer.close","bui.editor.action","bui.editor.addLink","bui.editor.backgroundColor","bui.editor.bold","bui.editor.cancel","bui.editor.close","bui.editor.copy","bui.editor.cut","bui.editor.editLink","bui.editor.fontColor","bui.editor.help","bui.editor.italic","bui.editor.linkAnnotation","bui.editor.mention","bui.editor.openHelpDialog","bui.editor.paste","bui.editor.redo","bui.editor.removeLink","bui.editor.save","bui.editor.selectAll","bui.editor.shortcut","bui.editor.submit","bui.editor.toolbarFocus","bui.editor.underline","bui.editor.undo","bui.fileList.loading","bui.fileList.removeHint","bui.freehandCanvas.redo","bui.freehandCanvas.undo","bui.imageDropZone.selectImage","bui.imageGallery.cancel","bui.imageGallery.delete","bui.imageGallery.loading","bui.inlineAlert.close","bui.pagination.goToPage","bui.pagination.nextPage","bui.pagination.pageXofY","bui.pagination.prevPage","bui.select.clear","bui.select.more","bui.select.search","bui.select.selectAll","bui.stepper.completed","bui.stepper.label","bui.stepper.step","bui.table.loading","bui.tag.remove","bui.taggedPagination.nextPage","bui.taggedPagination.prevPage","bui.toolbar.more","bui.treeView.collapse","bui.treeView.expand","bui.treeView.rename","bui.useMedia.paused","bui.useMedia.playing"],i={close:["bui.alertDialog.close","bui.drawer.close","bui.editor.close","bui.inlineAlert.close"],audioTimeline:["bui.audioPlayer.audioTimeline"],pause:["bui.audioPlayer.pause"],play:["bui.audioPlayer.play"],more:["bui.buttonSelect.more","bui.select.more","bui.toolbar.more"],moreWithLabel:["bui.buttonSelect.moreWithLabel"],nextMonth:["bui.calendar.nextMonth"],nextYear:["bui.calendar.nextYear"],previousMonth:["bui.calendar.previousMonth"],previousYear:["bui.calendar.previousYear"],selectMonth:["bui.calendar.selectMonth"],selectYear:["bui.calendar.selectYear"],add:["bui.colorInput.add"],addColor:["bui.colorInput.addColor"],cancel:["bui.colorInput.cancel","bui.editor.cancel","bui.imageGallery.cancel"],colorFormat:["bui.colorInput.colorFormat"],colorPresets:["bui.colorInput.colorPresets"],customColors:["bui.colorInput.customColors"],indeterminate:["bui.colorInput.indeterminate"],newColor:["bui.colorInput.newColor"],noColor:["bui.colorInput.noColor"],removeColor:["bui.colorInput.removeColor"],transparent:["bui.colorInput.transparent"],none:["bui.colorSwatch.none"],openCalendar:["bui.dateField.openCalendar"],action:["bui.editor.action"],addLink:["bui.editor.addLink"],backgroundColor:["bui.editor.backgroundColor"],bold:["bui.editor.bold"],copy:["bui.editor.copy"],cut:["bui.editor.cut"],editLink:["bui.editor.editLink"],fontColor:["bui.editor.fontColor"],help:["bui.editor.help"],italic:["bui.editor.italic"],linkAnnotation:["bui.editor.linkAnnotation"],mention:["bui.editor.mention"],openHelpDialog:["bui.editor.openHelpDialog"],paste:["bui.editor.paste"],redo:["bui.editor.redo","bui.freehandCanvas.redo"],removeLink:["bui.editor.removeLink"],save:["bui.editor.save"],selectAll:["bui.editor.selectAll","bui.select.selectAll"],shortcut:["bui.editor.shortcut"],submit:["bui.editor.submit"],toolbarFocus:["bui.editor.toolbarFocus"],underline:["bui.editor.underline"],undo:["bui.editor.undo","bui.freehandCanvas.undo"],loading:["bui.fileList.loading","bui.imageGallery.loading","bui.table.loading"],removeHint:["bui.fileList.removeHint"],selectImage:["bui.imageDropZone.selectImage"],delete:["bui.imageGallery.delete"],goToPage:["bui.pagination.goToPage"],nextPage:["bui.pagination.nextPage","bui.taggedPagination.nextPage"],pageXofY:["bui.pagination.pageXofY"],prevPage:["bui.pagination.prevPage","bui.taggedPagination.prevPage"],clear:["bui.select.clear"],search:["bui.select.search"],completed:["bui.stepper.completed"],label:["bui.stepper.label"],step:["bui.stepper.step"],remove:["bui.tag.remove"],collapse:["bui.treeView.collapse"],expand:["bui.treeView.expand"],rename:["bui.treeView.rename"],paused:["bui.useMedia.paused"],playing:["bui.useMedia.playing"]};export{e as a,i as b};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {a as a$5}from'./chunk-JZXLV6JU.mjs';import {a as a$2}from'./chunk-7SQRBY7N.mjs';import {b,c as c$1}from'./chunk-IDIZSV2Y.mjs';import {a as a$3}from'./chunk-O7XK2WIX.mjs';import {a as a$4}from'./chunk-JTKDC2CM.mjs';import {a as a$1}from'./chunk-FPM5UJRF.mjs';import {c}from'./chunk-ETM4MNG4.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$6}from'./chunk-4QEH5CGK.mjs';import {CaretLeftIcon,CaretRightIcon}from'@baseline-ui/icons/24';import {useGranularEffect}from'granular-hooks';import Y,{useCallback,useState}from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
|
|
2
|
+
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
+
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
+
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
+
* This notice may not be removed from this file.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
var $=a({defaultClassName:"_1bwul1t8 _1yep5z6m6 _1yep5z6me _1yep5z6ey _1yep5z6g9",variantClassNames:{size:{xs:"_1bwul1t9 _1yep5z6q7 _1yep5z6q8 _1yep5z6q9 _1yep5z6nv _1yep5z6nw _1yep5z6nx _1yep5z610e",sm:"_1bwul1ta _1yep5z6qa _1yep5z6qb _1yep5z6qc _1yep5z6ny _1yep5z6nz _1yep5z6o0 _1yep5z610h",md:"_1bwul1tb _1yep5z6qa _1yep5z6qb _1yep5z6qc _1yep5z6ny _1yep5z6nz _1yep5z6o0 _1yep5z610k"}},defaultVariants:{},compoundVariants:[]}),R=a({defaultClassName:"_1bwul1t3 _1yep5z6ez",variantClassNames:{size:{xs:"_1yep5z610e",sm:"_1yep5z610h",md:"_1yep5z610k"},isDisabled:{true:"_1yep5z611l"}},defaultVariants:{},compoundVariants:[]}),G={xs:"_1bwul1t0",sm:"_1bwul1t1",md:"_1bwul1t2"};var J=Y.forwardRef(({className:Q,style:X,size:d="md",isDisabled:a,decrementAriaLabel:Z,incrementAriaLabel:j,"data-block-id":V,"data-block-class":ee,label:te,onChange:E,onBlur:k,onKeyDown:B,minValue:r=Number.NEGATIVE_INFINITY,maxValue:n=Number.POSITIVE_INFINITY,defaultValue:ne,value:ae,description:w=y=>`${y} / ${n}`,onInputChange:re,onChangeSuccess:ie,step:b$1=1,valueToLabelMap:u,isDecrementButtonDisabled:oe,isIncrementButtonDisabled:se,...l},le)=>{let y=b(),pe=Y.useRef(null),F=c(),q=c(),i=useCallback(e=>u?u.get(e)??e.toString():e.toString(),[u]),O=useCallback(e=>{if(u){let D=[...u.entries()].find(([,me])=>me===e);if(D)return D[0]}let o=e.trim();return /^-?\d+$/.test(o)?Number(o):Number.NaN},[u]),[t,c$1]=a$1(ae,ne??1,ie),[g,m]=useState(i(t)??""),z=t<=r||a||oe,x=t>=n||a||se,f=useCallback(e=>{if(!e){m(i(t));return}E?.(e);let o=O(e);if(Number.isNaN(o)){m(i(t)??"");return}o>=r&&o<=n&&!a&&!l.isReadOnly?(c$1(o),m(i(o))):m(i(t));},[E,O,r,n,a,l.isReadOnly,i,t,c$1]),_=useCallback(e=>e>=r&&e<=n,[r,n]),de=useCallback(e=>{f(g),k?.(e);},[g,f,k]),P=useCallback(()=>{if(x)return;let e=Math.min(t+b$1,n);_(e)&&c$1(e);},[t,x,_,n,c$1,b$1]),h=useCallback(()=>{if(z)return;let e=Math.max(t-b$1,r);_(e)&&c$1(e);},[t,z,_,r,c$1,b$1]),ue=useCallback(e=>{if(l.isReadOnly)e.continuePropagation();else switch(e.key){case "Enter":{f(g);break}case "ArrowUp":{P();break}case "ArrowDown":{h();break}default:e.continuePropagation();}B?.(e);},[l.isReadOnly,B,f,g,P,h]);useGranularEffect(()=>{m(i(t));},[t],[i]);let{inputProps:ce}=a$2({...l,value:g?.toString(),isDisabled:a,onBlur:de,onChange:e=>{m(e),re?.(e);},onKeyDown:ue,"aria-labelledby":F,"aria-describedby":q},pe),S=typeof w=="function"?w(t):w;return jsxs(a$3,{className:a$6(G[d],Q),display:"flex",flexDirection:"row",alignItems:"center","data-block-id":V,"data-block-class":ee,style:X,ref:le,"aria-disabled":a,children:[jsx("span",{id:F,className:R({size:d,isDisabled:a}),children:te}),jsxs(a$3,{display:"flex",flexDirection:"row",borderRadius:"sm",borderColor:"border.subtle",borderStyle:"solid",borderWidth:1,style:{height:"inherit"},children:[jsx(a$4,{icon:CaretLeftIcon,elementType:"div",size:d,variant:"secondary",style:{height:"100%"},className:"BaselineUI-TaggedPagination-DecrementButton",isExcludedFromRovingFocus:true,isDisabled:z||l.isReadOnly,excludeFromTabOrder:true,onPress:h,"aria-label":Z||y.formatMessage(L.prevPage),tooltip:true}),jsx(a$5,{orientation:"vertical"}),jsx("input",{...ce,className:$({size:d}),min:r,max:n}),jsx(a$5,{orientation:"vertical"}),jsx(a$4,{icon:CaretRightIcon,elementType:"div",size:d,variant:"secondary",style:{height:"100%"},className:"BaselineUI-TaggedPagination-IncrementButton",isExcludedFromRovingFocus:true,isDisabled:x||l.isReadOnly,excludeFromTabOrder:true,onPress:P,"aria-label":j||y.formatMessage(L.nextPage),tooltip:true})]}),S?jsx("span",{id:q,className:R({size:d,isDisabled:a}),children:S}):null]})});J.displayName="TaggedPagination";var L=c$1({nextPage:{defaultMessage:"Next Page",id:"bui.taggedPagination.nextPage"},prevPage:{defaultMessage:"Previous Page",id:"bui.taggedPagination.prevPage"}});export{J as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$3}from'./chunk-GCBMNOA6.mjs';import {a as a$5}from'./chunk-FP5EWPOF.mjs';import {a as a$4}from'./chunk-2VOWBYNS.mjs';import {a as a$2}from'./chunk-HABKIEKC.mjs';import {a as a$8}from'./chunk-LQHFBXCW.mjs';import {a as a$6}from'./chunk-BA5OA5DY.mjs';import {b}from'./chunk-I7LPPUZS.mjs';import {a as a$7}from'./chunk-5IC46G5J.mjs';import {a as a$b}from'./chunk-22VRCVTH.mjs';import {b as b$2,c as c$2}from'./chunk-HH4VLTF3.mjs';import {
|
|
1
|
+
import {a as a$3}from'./chunk-GCBMNOA6.mjs';import {a as a$5}from'./chunk-FP5EWPOF.mjs';import {a as a$4}from'./chunk-2VOWBYNS.mjs';import {a as a$2}from'./chunk-HABKIEKC.mjs';import {a as a$8}from'./chunk-LQHFBXCW.mjs';import {a as a$6}from'./chunk-BA5OA5DY.mjs';import {b}from'./chunk-I7LPPUZS.mjs';import {a as a$7}from'./chunk-5IC46G5J.mjs';import {a as a$b}from'./chunk-22VRCVTH.mjs';import {b as b$2,c as c$2}from'./chunk-HH4VLTF3.mjs';import {a as a$a}from'./chunk-B3EZOXNU.mjs';import {c as c$3,b as b$3}from'./chunk-KUDCYGII.mjs';import {c,b as b$1}from'./chunk-3WKDIXCM.mjs';import {a as a$9}from'./chunk-SVIYLH7R.mjs';import {a as a$1,c as c$1}from'./chunk-ETM4MNG4.mjs';import {a as a$c}from'./chunk-SD43KVTU.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import A,{useRef,useEffect,useState,useMemo}from'react';import {motion}from'motion/react';import {jsxs,jsx,Fragment}from'react/jsx-runtime';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-O4YMXTNR.mjs';import {a as a$3}from'./chunk-RUHZRYDJ.mjs';import {a as a$2}from'./chunk-ZI7HJRJA.mjs';import {b,c}from'./chunk-IDIZSV2Y.mjs';import {b as b$1}from'./chunk-K5RYVERS.mjs';import {a as a$1}from'./chunk-RSKKEGJZ.mjs';import {a as a$4}from'./chunk-4QEH5CGK.mjs';import {PauseIcon,PlayIcon}from'@baseline-ui/icons/24';import i 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$8}from'./chunk-E3FP4B25.mjs';import {a as a$1,b as b$2}from'./chunk-5ZC64ZG7.mjs';import {a as a$6}from'./chunk-JZXLV6JU.mjs';import {b as b$1,c as c$1}from'./chunk-
|
|
1
|
+
import {a as a$8}from'./chunk-E3FP4B25.mjs';import {a as a$1,b as b$2}from'./chunk-5ZC64ZG7.mjs';import {a as a$6}from'./chunk-JZXLV6JU.mjs';import {b as b$1,c as c$1}from'./chunk-IDIZSV2Y.mjs';import {a as a$5}from'./chunk-JTKDC2CM.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {a as a$4}from'./chunk-RSKKEGJZ.mjs';import {a as a$3}from'./chunk-STMDFIUL.mjs';import {a as a$2}from'./chunk-B3EZOXNU.mjs';import {c}from'./chunk-3WKDIXCM.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$7}from'./chunk-4QEH5CGK.mjs';import {CaretLeftIcon as CaretLeftIcon$3,CaretRightIcon as CaretRightIcon$3}from'@baseline-ui/icons/12';import {CaretLeftIcon as CaretLeftIcon$2,CaretRightIcon as CaretRightIcon$2}from'@baseline-ui/icons/16';import {CaretLeftIcon as CaretLeftIcon$1,CaretRightIcon as CaretRightIcon$1}from'@baseline-ui/icons/20';import {CaretLeftIcon,CaretRightIcon}from'@baseline-ui/icons/24';import w from'react';import {jsxs,Fragment,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$8}from'./chunk-E3FP4B25.mjs';import {a as a$1,b as b$2}from'./chu
|
|
|
7
7
|
* This notice may not be removed from this file.
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
var T=a({defaultClassName:"_1nsi9h17",variantClassNames:{isFocused:{true:"_1nsi9h18"},variant:{pinned:"_1nsi9h19",floating:"_1nsi9h1a"},size:{xs:"_1nsi9h1b",sm:"_1nsi9h1c",md:"_1nsi9h1d",lg:"_1nsi9h1e"}},defaultVariants:{},compoundVariants:[]}),j="_1nsi9h1f _1yep5z6me _1yep5z6m6 _1yep5z6ey",k=a({defaultClassName:"_1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6jb _1yep5z6jc _1yep5z6jd _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6g9 _1yep5z6e1",variantClassNames:{size:{xs:"_1nsi9h11 _1yep5z6x1 _1yep5z6x2 _1yep5z6x3 _1yep5z6xp _1yep5z6xq _1yep5z6xr _1yep5z6yd _1yep5z6ye _1yep5z6yf _1yep5z6z1 _1yep5z6z2 _1yep5z6z3 _1yep5z610e",sm:"_1nsi9h12 _1yep5z610h",md:"_1nsi9h13",lg:"_1nsi9h14"},variant:{floating:"_1yep5z6zq _1yep5z6190 _1yep5z618y _1yep5z613y",pinned:"_1yep5z618m"}},defaultVariants:{},compoundVariants:[]}),U=a({defaultClassName:"_1nsi9h1g _1yep5z6ez",variantClassNames:{isDisabled:{true:"_1yep5z611l"}},defaultVariants:{},compoundVariants:[]});var ue={style:"decimal"},ce={xs:[CaretLeftIcon$3,CaretRightIcon$3],sm:[CaretLeftIcon$2,CaretRightIcon$2],md:[CaretLeftIcon$1,CaretRightIcon$1],lg:[CaretLeftIcon,CaretRightIcon]},E=w.forwardRef(({className:
|
|
10
|
+
var T=a({defaultClassName:"_1nsi9h17",variantClassNames:{isFocused:{true:"_1nsi9h18"},variant:{pinned:"_1nsi9h19",floating:"_1nsi9h1a"},size:{xs:"_1nsi9h1b",sm:"_1nsi9h1c",md:"_1nsi9h1d",lg:"_1nsi9h1e"}},defaultVariants:{},compoundVariants:[]}),j="_1nsi9h1f _1yep5z6me _1yep5z6m6 _1yep5z6ey",k=a({defaultClassName:"_1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6jb _1yep5z6jc _1yep5z6jd _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6g9 _1yep5z6e1",variantClassNames:{size:{xs:"_1nsi9h11 _1yep5z6x1 _1yep5z6x2 _1yep5z6x3 _1yep5z6xp _1yep5z6xq _1yep5z6xr _1yep5z6yd _1yep5z6ye _1yep5z6yf _1yep5z6z1 _1yep5z6z2 _1yep5z6z3 _1yep5z610e",sm:"_1nsi9h12 _1yep5z610h",md:"_1nsi9h13",lg:"_1nsi9h14"},variant:{floating:"_1yep5z6zq _1yep5z6190 _1yep5z618y _1yep5z613y",pinned:"_1yep5z618m"}},defaultVariants:{},compoundVariants:[]}),U=a({defaultClassName:"_1nsi9h1g _1yep5z6ez",variantClassNames:{isDisabled:{true:"_1yep5z611l"}},defaultVariants:{},compoundVariants:[]});var ue={style:"decimal"},ce={xs:[CaretLeftIcon$3,CaretRightIcon$3],sm:[CaretLeftIcon$2,CaretRightIcon$2],md:[CaretLeftIcon$1,CaretRightIcon$1],lg:[CaretLeftIcon,CaretRightIcon]},E=w.forwardRef(({className:H,style:D,minValue:S=1,defaultValue:q=1,incrementAriaLabel:K,decrementAriaLabel:O,"aria-label":G,size:a="md",variant:t="floating",hideActions:_,isDisabled:i,pageXofYLabel:m,...s},X)=>{let{locale:Y}=b(),r=b$1(),h={...s,formatOptions:ue,minValue:S,incrementAriaLabel:K||r.formatMessage(l.nextPage),decrementAriaLabel:O||r.formatMessage(l.prevPage),defaultValue:q,"aria-label":G||r.formatMessage(l.goToPage)},u=w.useRef(null),n=a$1({...h,locale:Y}),{inputProps:c$1,decrementButtonProps:z,incrementButtonProps:b$3,groupProps:$}=b$2({...h,onKeyUp:C=>{C.key==="Enter"&&u.current?.blur(),s.onKeyUp?.(C);},isDisabled:i},n,u),{hoverProps:J,isHovered:Q}=a$2({isDisabled:i}),{focusProps:W,isFocused:P,isFocusVisible:Z}=a$3(),v=t==="floating",[ee,ae]=ce[a],te=a$4({"data-focus-visible":Z,"data-focused":P,"data-hovered":Q,"data-block-id":s["data-block-id"],"data-block-class":s["data-block-class"]});return jsxs("div",{...c($,J,te),className:a$7(k({size:a,variant:t}),"BaselineUI-Pagination",H),style:D,ref:X,children:[_?null:jsxs(Fragment,{children:[jsx(a$5,{icon:ee,...z,elementType:"div",size:a,style:{height:"100%",...v&&{borderRadius:0}},className:"BaselineUI-Pagination-DecrementButton",isExcludedFromRovingFocus:true,isDisabled:i||z.isDisabled}),t==="floating"&&jsx(a$6,{orientation:"vertical"})]}),jsxs("div",{role:"group",className:T({isFocused:P,variant:t,size:a}),"aria-label":(typeof m=="function"?m({page:n.numberValue,totalPages:n.maxValue}):m)??r.formatMessage(l.pageXofY,{arg0:c$1.value,arg1:n.maxValue}),children:[jsx("input",{...c(c$1,W),ref:u,className:a$7("BaselineUI-Pagination-Input",j),style:{width:`${c$1.value?.toString().length||1}ch`}}),jsxs("span",{className:U({isDisabled:i}),children:["/ ",jsx(a$8,{value:n.maxValue})]})]}),_?null:jsxs(Fragment,{children:[t==="floating"&&jsx(a$6,{orientation:"vertical"}),jsx(a$5,{icon:ae,...b$3,elementType:"div",size:a,style:{height:"100%",...v&&{borderRadius:0}},className:"BaselineUI-Pagination-IncrementButton",isExcludedFromRovingFocus:true,isDisabled:i||b$3.isDisabled})]})]})});E.displayName="Pagination";var l=c$1({nextPage:{defaultMessage:"Next Page",id:"bui.pagination.nextPage"},prevPage:{defaultMessage:"Previous Page",id:"bui.pagination.prevPage"},goToPage:{defaultMessage:"Go to Page",id:"bui.pagination.goToPage"},pageXofY:{defaultMessage:"Page {arg0} of {arg1}",id:"bui.pagination.pageXofY"}});export{E as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$4}from'./chunk-
|
|
1
|
+
import {a as a$4}from'./chunk-2CXZQGP5.mjs';import {a as a$9}from'./chunk-TUY23KMK.mjs';import {a as a$8}from'./chunk-NGZRN4SF.mjs';import {b as b$1}from'./chunk-DF2D7NE6.mjs';import {a as a$b}from'./chunk-J2KZM2I2.mjs';import {b as b$3,e as e$1}from'./chunk-RFVPGD6N.mjs';import {b,c as c$1}from'./chunk-IDIZSV2Y.mjs';import {b as b$6}from'./chunk-INFMXVHD.mjs';import {a as a$3}from'./chunk-O7XK2WIX.mjs';import {a as a$6}from'./chunk-JTKDC2CM.mjs';import {a as a$2}from'./chunk-GMALMQWI.mjs';import {b as b$5}from'./chunk-N2XGJKZG.mjs';import {b as b$7,j as j$2}from'./chunk-MBRNO6IW.mjs';import {e}from'./chunk-TZGK36KC.mjs';import {a as a$5}from'./chunk-66CUIXA6.mjs';import {j}from'./chunk-KUDCYGII.mjs';import {a}from'./chunk-RT4LMB6X.mjs';import {c,b as b$4}from'./chunk-3WKDIXCM.mjs';import {b as b$2,a as a$1}from'./chunk-ETM4MNG4.mjs';import {j as j$1,b as b$8,i,a as a$a,h}from'./chunk-SD43KVTU.mjs';import {a as a$7}from'./chunk-4QEH5CGK.mjs';import k,{useState,useRef,useCallback,useMemo,useEffect,createElement}from'react';import {MoreIcon}from'@baseline-ui/icons/24';import {jsxs,jsx,Fragment}from'react/jsx-runtime';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
+
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
+
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
+
* This notice may not be removed from this file.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
function n(e){return e.nativeEvent.isComposing||e.keyCode===229}export{n as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$4}from'./chunk-
|
|
1
|
+
import {a as a$4}from'./chunk-FX3THTOK.mjs';import {a as a$2}from'./chunk-2MS356Q7.mjs';import {b}from'./chunk-SZTFMBPY.mjs';import {e,f,d,h,g}from'./chunk-PG3WDHSK.mjs';import {b as b$1}from'./chunk-INFMXVHD.mjs';import {a as a$5}from'./chunk-O7XK2WIX.mjs';import {a as a$3}from'./chunk-RSKKEGJZ.mjs';import {a as a$1}from'./chunk-STMDFIUL.mjs';import {c}from'./chunk-ETM4MNG4.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$6}from'./chunk-4QEH5CGK.mjs';import j 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$7}from'./chunk-NV7KQVPE.mjs';import {a as a$c}from'./chunk-KVIV5RTE.mjs';import {a as a$4}from'./chunk-4WVW4KEK.mjs';import {a as a$3}from'./chunk-TAYP2OGC.mjs';import {c as c$2}from'./chunk-5MUEJ5WI.mjs';import {b as b$1,c as c$1,a as a$d}from'./chunk-RO5ZRU3Y.mjs';import {B}from'./chunk-TYKMNZJ4.mjs';import {a as a$2}from'./chunk-CY6W27WG.mjs';import {b,c as c$3}from'./chunk-
|
|
1
|
+
import {a as a$7}from'./chunk-NV7KQVPE.mjs';import {a as a$c}from'./chunk-KVIV5RTE.mjs';import {a as a$4}from'./chunk-4WVW4KEK.mjs';import {a as a$3}from'./chunk-TAYP2OGC.mjs';import {c as c$2}from'./chunk-5MUEJ5WI.mjs';import {b as b$1,c as c$1,a as a$d}from'./chunk-RO5ZRU3Y.mjs';import {B}from'./chunk-TYKMNZJ4.mjs';import {a as a$2}from'./chunk-CY6W27WG.mjs';import {b,c as c$3}from'./chunk-IDIZSV2Y.mjs';import {a as a$9,b as b$3}from'./chunk-INFMXVHD.mjs';import {a as a$b}from'./chunk-O7XK2WIX.mjs';import {b as b$2}from'./chunk-K5RYVERS.mjs';import {a as a$1}from'./chunk-66CUIXA6.mjs';import {a}from'./chunk-FPM5UJRF.mjs';import {a as a$a}from'./chunk-RSKKEGJZ.mjs';import {a as a$5}from'./chunk-STMDFIUL.mjs';import {a as a$6}from'./chunk-B3EZOXNU.mjs';import {c}from'./chunk-3WKDIXCM.mjs';import {a as a$e}from'./chunk-ETM4MNG4.mjs';import {a as a$8}from'./chunk-4QEH5CGK.mjs';import Z,{useState}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
|