@baseline-ui/core 0.40.1 → 0.41.1
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/Acknowledgements.md +1372 -135
- package/dist/index.css +1 -1
- package/dist/index.d.mts +12 -7
- package/dist/index.d.ts +12 -7
- package/dist/index.js +5 -5
- package/dist/index.mjs +5 -5
- package/package.json +6 -6
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {classNames,invariant,filterTruthyValues,getSvgPathFromStroke,getHTMLElement,getTextDimensions,getPlainText,getAbsolutePosition,cleanKeyFromGlobImport,getOsSpecificKeyboardShortcutLabel,getAbsoluteBounds,isUrl,findFocusableElements,getActiveElement,isInputThatOpensKeyboard}from'@baseline-ui/utils';import
|
|
1
|
+
import {classNames,invariant,filterTruthyValues,getSvgPathFromStroke,getHTMLElement,getTextDimensions,getPlainText,getAbsolutePosition,cleanKeyFromGlobImport,getOsSpecificKeyboardShortcutLabel,getAbsoluteBounds,isUrl,findFocusableElements,getActiveElement,isInputThatOpensKeyboard}from'@baseline-ui/utils';import _t,{useMemo,createElement,useContext,useEffect,createContext,useLayoutEffect,useState,useCallback,useRef,useImperativeHandle,forwardRef,useReducer,Fragment as Fragment$1,isValidElement}from'react';import {useControlledState,clamp}from'@react-stately/utils';import {useSeparator,useHover,mergeProps,useOption,useLocale,useListBox,ListKeyboardDelegate,useFocusRing,DragPreview,usePress,useTooltip,Overlay,useTooltipTrigger,useOverlayPosition,useNumberField,useNumberFormatter,useSlider,useSliderThumb,VisuallyHidden,useDialog,usePopover,DismissButton,useKeyboard,FocusScope,useSwitch,useSearchField,useMenu,useMenuTrigger,useLink,useDrop,useId,useProgressBar,useTextField,useCheckbox,useTagGroup,useFocusManager,useButton,useSelect,HiddenSelect,useTabList,useTab,useOverlayTrigger,useLabel,useField,useClipboard,useRadioGroup,useFilter,useInteractOutside,useComboBox,useObjectRef,useFocus,useGridListItem,useGridListSelectionCheckbox,useDraggableItem,useGridList,useTimeField,useDateField,useDraggableCollection,useDroppableCollection,ListDropTargetDelegate,useListBoxSection,useMessageFormatter,useMenuSection,useMenuItem,useToggleButton,useTag,useTabPanel,useRadio,useModalOverlay,useDropIndicator,useDateSegment,I18nProvider,useDateFormatter}from'react-aria';export{useCollator,useDateFormatter,useNumberFormatter}from'react-aria';import {useListState,useTooltipTriggerState,useNumberFieldState,useSliderState,useToggleState,useSearchFieldState,useTreeState,useMenuTriggerState,useSelectState,useTabListState,Item,useOverlayTriggerState,useRadioGroupState,useComboBoxState,useTimeFieldState,useDateFieldState,useDraggableCollectionState,useDroppableCollectionState,Section}from'react-stately';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {CheckmarkIcon,SearchIcon,CaretLeftIcon,CaretRightIcon,AvatarIcon,MoreIcon,QuestionmarkCircleIcon,PauseIcon,PlayIcon,TextIcon as TextIcon$1,HighlightTextIcon}from'@baseline-ui/icons/24';import {sprinkles,breakpoints,lightTheme,darkTheme,themeVars,layoutSprinkleValues}from'@baseline-ui/tokens';import {useGranularLayoutEffect,useGranularEffect}from'granular-hooks';import {CaretDownIcon,MinusIcon,PlusIcon,ChevronRightIcon,XIcon as XIcon$3}from'@baseline-ui/icons/8';import {ReadOnlyIcon,ErrorCircleFilledIcon,XIcon as XIcon$2,CheckmarkIcon as CheckmarkIcon$2,CheckmarkCircleFilledIcon,ErrorAltCircleFilledIcon as ErrorAltCircleFilledIcon$1,CaretLeftIcon as CaretLeftIcon$2,CaretRightIcon as CaretRightIcon$2,AvatarIcon as AvatarIcon$1,WarningFilledIcon as WarningFilledIcon$1,InfoCircleFilledIcon as InfoCircleFilledIcon$1,HelpIcon,UndoIcon,RedoIcon,TrashIcon,ArrowDownCircleFilledIcon}from'@baseline-ui/icons/16';import {FocusableProvider,useFocusable,createFocusManager,useFocusRing as useFocusRing$1}from'@react-aria/focus';import {motion,MotionConfig,AnimatePresence,useReducedMotion,MotionGlobalConfig}from'motion/react';export{MotionGlobalConfig}from'motion/react';import Kv from'lodash/isEmpty';import {assignInlineVars}from'@vanilla-extract/dynamic';import {XIcon,SearchIcon as SearchIcon$1,CheckmarkIcon as CheckmarkIcon$1,CheckCircleFilledIcon,ErrorAltCircleFilledIcon,CaretLeftIcon as CaretLeftIcon$1,CaretRightIcon as CaretRightIcon$1,WarningFilledIcon,InfoCircleFilledIcon,TextIcon,BoldIcon,ItalicIcon,UnderlineIcon,ArrowUpCircleFilledIcon,AtIcon,XCircleFilledIcon,PlusIcon as PlusIcon$1,MinusIcon as MinusIcon$2,LinkIcon}from'@baseline-ui/icons/20';import Zz,{createPortal}from'react-dom';import {XIcon as XIcon$1,CheckmarkIcon as CheckmarkIcon$3,MinusIcon as MinusIcon$1,CaretLeftIcon as CaretLeftIcon$3,CaretRightIcon as CaretRightIcon$3}from'@baseline-ui/icons/12';import {useInteractionModality,PressResponder,useFocus as useFocus$1,useInteractOutside as useInteractOutside$1}from'@react-aria/interactions';import {parseColor,useColorAreaState,useColorSliderState,useColorFieldState}from'@react-stately/color';import {useColorSwatch,useColorArea,useColorSlider,useColorField}from'@react-aria/color';import {getStroke}from'perfect-freehand';import {makeMoveable,Draggable,Resizable,Rotatable,Snappable}from'react-moveable';import {take,clamp as clamp$1,uniqueId,camelCase,flatMapDeep,kebabCase}from'lodash';import {useToolbar}from'@react-aria/toolbar';import {createBoldPlugin,createItalicPlugin,createUnderlinePlugin,MARK_BOLD,MARK_ITALIC,MARK_UNDERLINE}from'@udecode/plate-basic-marks';import {findNodePath,removeNodes,focusEditor,Hotkeys,getPointBefore,createPointRef,moveSelection,insertNodes,PlateElement,insertText,useElement,getHandler,createPluginFactory,createPlugins,PlateLeaf,deselect,Plate,PlateContent,getEditorString,getRange,useEditorSelector,isMarkActive,useEditorRef,toggleMark,findNode,getPluginType}from'@udecode/plate-common';import {createFontColorPlugin,createFontBackgroundColorPlugin,MARK_COLOR,MARK_BG_COLOR,useColorDropdownMenuState}from'@udecode/plate-font';import {createParagraphPlugin,ELEMENT_PARAGRAPH}from'@udecode/plate-paragraph';import {createLinkPlugin,ELEMENT_LINK,upsertLink,unwrapLink}from'@udecode/plate-link';import {withRef,withProps}from'@udecode/cn';import*as y1 from'dompurify';import {jsx as jsx$1}from'slate-hyperscript';import {useHTMLInputCursorState}from'@udecode/plate-combobox';import {useSelected}from'slate-react';import SR from'markdown-it';import {announce}from'@react-aria/live-announcer';import {useActionGroup,useActionGroupItem}from'@react-aria/actiongroup';import {ControlledTreeEnvironment,Tree}from'react-complex-tree';import {Panel,PanelGroup,PanelResizeHandle}from'react-resizable-panels';import {useToastQueue}from'@react-stately/toast';export{ToastQueue}from'@react-stately/toast';import {useToastRegion,useToast}from'@react-aria/toast';/**
|
|
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,7 +7,7 @@ import {classNames,invariant,filterTruthyValues,getSvgPathFromStroke,getHTMLElem
|
|
|
7
7
|
* This notice may not be removed from this file.
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
var Se=typeof document<"u"?ht.useLayoutEffect:()=>{};function Qn(e){let t=useRef(null);return Se(()=>{t.current=e;},[e]),useCallback((...o)=>{let r=t.current;return r?.(...o)},[])}function ei(e){let[t,o]=useState(e),r=useRef(null),a=Qn(()=>{if(!r.current)return;let i=r.current.next();if(i.done){r.current=null;return}t===i.value?a():o(i.value);});Se(()=>{r.current&&a();});let n=Qn(i=>{r.current=i(t),a();});return [t,n]}var Ar={prefix:String(Math.round(Math.random()*1e10)),current:0},Zl=ht.createContext(Ar),hg=ht.createContext(false);var xg=!!(typeof window<"u"&&window.document&&window.document.createElement),ti=new WeakMap;function Cg(e=false){let t=useContext(Zl),o=useRef(null);if(o.current===null&&!e){var r,a;let n=(a=ht.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||a===void 0||(r=a.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(n){let i=ti.get(n);i==null?ti.set(n,{id:t.current,state:n.memoizedState}):n.memoizedState!==i.state&&(t.current=i.id,ti.delete(n));}o.current=++t.current;}return o.current}function Pg(e){let t=useContext(Zl);t===Ar&&!xg&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let o=Cg(!!e),r=t===Ar&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${t.prefix}`;return e||`${r}-${o}`}function kg(e){let t=ht.useId(),[o]=useState(Jl()),r=o||process.env.NODE_ENV==="test"?"react-aria":`react-aria${Ar.prefix}`;return e||`${r}-${t}`}var ri=typeof ht.useId=="function"?kg:Pg;function wg(){return false}function Ig(){return true}function Rg(e){return ()=>{}}function Jl(){return typeof ht.useSyncExternalStore=="function"?ht.useSyncExternalStore(Rg,wg,Ig):useContext(hg)}var Mg=!!(typeof window<"u"&&window.document&&window.document.createElement),Qe=new Map;function Fr(e){let[t,o]=useState(e),r=useRef(null),a=ri(t),n=useCallback(i=>{r.current=i;},[]);return Mg&&(Qe.has(a)&&!Qe.get(a).includes(n)?Qe.set(a,[...Qe.get(a),n]):Qe.set(a,[n])),Se(()=>{let i=a;return ()=>{Qe.delete(i);}},[a]),useEffect(()=>{let i=r.current;i&&(r.current=null,o(i));}),a}function ai(e,t){if(e===t)return e;let o=Qe.get(e);if(o)return o.forEach(a=>a(t)),t;let r=Qe.get(t);return r?(r.forEach(a=>a(e)),e):t}function Ql(...e){return (...t)=>{for(let o of e)typeof o=="function"&&o(...t);}}var _e=e=>{var t;return (t=e?.ownerDocument)!==null&&t!==void 0?t:document},re=e=>e&&"window"in e&&e.window===e?e:_e(e).defaultView||window;function Ng(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function ni(e){return Ng(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}var jr=(e=document)=>{var t;let o=e.activeElement;for(;o&&"shadowRoot"in o&&(!((t=o.shadowRoot)===null||t===void 0)&&t.activeElement);)o=o.shadowRoot.activeElement;return o};function ep(e){var t,o,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(o=ep(e[t]))&&(r&&(r+=" "),r+=o);}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function Eg(){for(var e,t,o=0,r="",a=arguments.length;o<a;o++)(e=arguments[o])&&(t=ep(e))&&(r&&(r+=" "),r+=t);return r}var tp=Eg;function Me(...e){let t={...e[0]};for(let o=1;o<e.length;o++){let r=e[o];for(let a in r){let n=t[a],i=r[a];typeof n=="function"&&typeof i=="function"&&a[0]==="o"&&a[1]==="n"&&a.charCodeAt(2)>=65&&a.charCodeAt(2)<=90?t[a]=Ql(n,i):(a==="className"||a==="UNSAFE_className")&&typeof n=="string"&&typeof i=="string"?t[a]=tp(n,i):a==="id"&&n&&i?t.id=ai(n,i):t[a]=i!==void 0?i:n;}}return t}function M(...e){return e.length===1&&e[0]?e[0]:t=>{for(let o of e)typeof o=="function"?o(t):o!=null&&(o.current=t);}}var Lg=new Set(["id"]),Bg=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),Ag=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),Fg=/^(data-.*)$/;function ii(e,t={}){let{labelable:o,isLink:r,propNames:a}=t,n={};for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(Lg.has(i)||o&&Bg.has(i)||r&&Ag.has(i)||a?.has(i)||Fg.test(i))&&(n[i]=e[i]);return n}function Or(e){var t;return typeof window>"u"||window.navigator==null?false:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(o=>e.test(o.brand)))||e.test(window.navigator.userAgent)}function Fe(e){let t=null;return ()=>(t==null&&(t=e()),t)}var Fo=Fe(function(){return Or(/Firefox/i)});function ae(e){let t=useRef(null);return useMemo(()=>({get current(){return t.current},set current(o){t.current=o,typeof e=="function"?e(o):e&&(e.current=o);}}),[e])}function Kg(){return typeof window.ResizeObserver<"u"}function pi(e){let{ref:t,box:o,onResize:r}=e;useEffect(()=>{let a=t?.current;if(a)if(Kg()){let n=new window.ResizeObserver(i=>{i.length&&r();});return n.observe(a,{box:o}),()=>{a&&n.unobserve(a);}}else return window.addEventListener("resize",r,false),()=>{window.removeEventListener("resize",r,false);}},[r,t,o]);}function et(e){return !!e&&"label"in e&&!!e.label}function Hr(e){return !!e&&"children"in e&&!!e.children&&"title"in e}function Yg(e){return Hr(e)?jsx(Section,{items:e.children,title:e.title,"aria-label":e.title,children:t=>jsx(Item,{textValue:t.label,children:t.label},t.id)},e.id):jsx(Item,{textValue:e.label,children:e.label},e.id)}function pe(){return useCallback(e=>Yg(e),[])}function Vr(e,t,o){let{direction:r}=useLocale(),a=useDraggableCollectionState({...e,collection:t.collection,selectionManager:t.selectionManager,isDisabled:!e.enableReorder,getItems:e.getItems||(s=>[...s].map(l=>{let p=t.collection.getItem(l);return invariant(p,"Expected item to be defined."),{"text/plain":p.textValue}}))});useDraggableCollection(e,a,o);let n=useDroppableCollectionState({...e,collection:t.collection,selectionManager:t.selectionManager}),{collectionProps:i}=useDroppableCollection({...e,keyboardDelegate:new ListKeyboardDelegate({collection:t.collection,disabledKeys:t.disabledKeys,ref:o,orientation:e.orientation,layout:e.layout,direction:r}),dropTargetDelegate:new ListDropTargetDelegate(t.collection,o)},n,o);return {collectionProps:i,dragState:a,dropState:n}}function a6(e,t){if(typeof e!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var r=o.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return (t==="string"?String:Number)(e)}function n6(e){var t=a6(e,"string");return typeof t=="symbol"?t:String(t)}function i6(e,t,o){return t=n6(t),t in e?Object.defineProperty(e,t,{value:o,enumerable:true,configurable:true,writable:true}):e[t]=o,e}function sp(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),o.push.apply(o,r);}return o}function lp(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?sp(Object(o),true).forEach(function(r){i6(e,r,o[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):sp(Object(o)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r));});}return e}function pp(e,t){var o={};for(var r in e)o[r]=t(e[r],r);return o}var s6=(e,t,o)=>{for(var r of Object.keys(e)){var a;if(e[r]!==((a=t[r])!==null&&a!==void 0?a:o[r]))return false}return true},z=e=>{var t=o=>{var r=e.defaultClassName,a=lp(lp({},e.defaultVariants),o);for(var n in a){var i,s=(i=a[n])!==null&&i!==void 0?i:e.defaultVariants[n];if(s!=null){var l=s;typeof l=="boolean"&&(l=l===true?"true":"false");var p=e.variantClassNames[n][l];p&&(r+=" "+p);}}for(var[c,u]of e.compoundVariants)s6(c,a,e.defaultVariants)&&(r+=" "+u);return r};return t.variants=()=>Object.keys(e.variantClassNames),t.classNames={get base(){return e.defaultClassName.split(" ")[0]},get variants(){return pp(e.variantClassNames,o=>pp(o,r=>r.split(" ")[0]))}},t};var cp=z({defaultClassName:"_6n12k9b _1yep5z6ls _1yep5z6lr _1yep5z6ic _1yep5z6la",variantClassNames:{isDropTarget:{true:"_1yep5z6140"},orientation:{vertical:"_1yep5z617q",horizontal:"_1yep5z617r"}},defaultVariants:{},compoundVariants:[]}),dp="_6n12k98 _1yep5z6lq _1yep5z6is _1yep5z6it _1yep5z6iu",up=z({defaultClassName:"_6n12k99 _1yep5z6ev _1yep5z6da _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z6ey"}},defaultVariants:{},compoundVariants:[]}),mp=z({defaultClassName:"_6n12k91 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6kj _1yep5z6kk _1yep5z6kl _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6dy _1yep5z6eu _1yep5z6la _1yep5z6ld _1yep5z6lq _1yep5z6lp _1yep5z6ln _1yep5z6lk",variantClassNames:{isSelected:{},isFocused:{true:"_1yep5z6140 _1yep5z617w _1yep5z617u _1yep5z617x _1yep5z614g _1yep5z614h _1yep5z614i"},isHovered:{true:"_1yep5z6125",false:"_1yep5z6124"},isFirstChild:{true:"_6n12k95"},isLastChild:{true:"_6n12k96"},isDisabled:{true:"z9nup82 _1yep5z6111"}},defaultVariants:{},compoundVariants:[]}),fp="_6n12k9f _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6jj _1yep5z6jk _1yep5z6jl",yp="_6n12k90";var bp=z({defaultClassName:"gukncs0",variantClassNames:{isVertical:{true:"gukncs1"},isSecondary:{true:"gukncs2"}},defaultVariants:{},compoundVariants:[]});var q=ht.forwardRef(({className:e,style:t,variant:o="primary",orientation:r="horizontal",UNSAFE_omitRole:a,elementType:n="div","data-block-id":i,"data-block-class":s,...l},p)=>{let{separatorProps:c}=useSeparator({...l,orientation:r,elementType:n});return jsx(n,{...c,className:classNames(bp({isVertical:r==="vertical",isSecondary:o==="secondary"}),"BaselineUI-Separator",e),"data-orientation":r,"data-block-id":i,"data-block-class":s,style:t,role:a?void 0:c.role,ref:p})});q.displayName="Separator";function y6(e){return sprinkles.properties.has(e)}var D=ht.forwardRef(({elementType:e="div",children:t,...o},r)=>{let a=e,{sprinkleProps:n,domProps:i}=useMemo(()=>{let s={},l={};for(let p in o)y6(p)?s[p]=o[p]:l[p]=o[p];return {sprinkleProps:s,domProps:l}},[o]);return jsx(a,{...i,className:classNames(sprinkles(n),"BaselineUI-Box",i.className),ref:r,children:t})});D.displayName="Box";var Oo=ht.forwardRef(({item:e,isDisabled:t,isFocusVisible:o,isSelected:r,liProps:a,showSelectedIcon:n,description:i,descriptionProps:s,labelProps:l,isFocused:p,isPressed:c,_state:u},m)=>{invariant(e.value&&et(e.value),"Item cannot be a section");let{icon:d,label:b}=e.value,{hoverProps:y,isHovered:f}=useHover({isDisabled:t}),g=filterTruthyValues({"data-selected":r,"data-disabled":t,"data-focused":p,"data-hovered":f,"data-pressed":c,"data-focus-visible":o,"data-selection-mode":u.selectionManager.selectionMode});return jsxs("li",{...mergeProps(a,y,g),className:classNames(mp({isHovered:f,isFocused:o,isFirstChild:u.collection.getFirstKey()===e.key,isLastChild:u.collection.getLastKey()===e.key,isDisabled:t}),a.className,"BaselineUI-ListBox-Option"),style:a.style,ref:m,children:[jsxs(D,{display:"flex",alignItems:"center",gap:"lg",children:[n?jsx("span",{"aria-hidden":true,style:{height:24,width:24},children:r?jsx(CheckmarkIcon,{size:24}):null}):null,d?jsx(d,{size:24}):null,jsx("span",{...l,children:b})]}),i?jsx("span",{className:up({isDisabled:t}),...s,children:i}):null]})});Oo.displayName="DefaultRenderOption";var Ut=({dropState:e,orientation:t="vertical",dropIndicatorStyle:o,dropIndicatorClassName:r,renderDropIndicator:a=({isDropTarget:i,isHidden:s,dropIndicatorProps:l,orientation:p},c)=>s?null:jsx("li",{...l,ref:c,"data-drop-target":i,className:classNames(cp({isDropTarget:i,orientation:p}),"BaselineUI-DropIndicator",r),style:o}),...n})=>{let i=ht.useRef(null),{dropIndicatorProps:s,isHidden:l,isDropTarget:p}=useDropIndicator(n,e,i);return a({dropIndicatorProps:{...s,role:"option"},isHidden:l,isDropTarget:p,orientation:t},i)};function xt(e,t,o){return typeof e=="function"?e(t,o):e}function Ur(e,t,o){return typeof e=="function"?e(t,o):e}function qr(e,t){return typeof e=="function"?e(t):e}function ui(e,t){return typeof e=="function"?e(t):e}var zp=({item:e,children:t,state:o,dragState:r,...a})=>{let{dragProps:n}=useDraggableItem({key:e.key},r);return jsxs(Fragment,{children:[jsx(Ut,{target:{type:"item",key:e.key,dropPosition:"before"},...a}),t(n),o.collection.getKeyAfter(e.key)==null&&jsx(Ut,{target:{type:"item",key:e.key,dropPosition:"after"},...a})]})};zp.displayName="DraggableListOption";var Ho=ht.forwardRef(({item:e,renderOption:t=(m,d,b)=>jsx(Oo,{item:m,liProps:d.optionProps,...d,ref:b}),showSelectedIcon:o,state:r,dragState:a,dropState:n,orientation:i,dropIndicatorStyle:s,dropIndicatorClassName:l,optionStyle:p,optionClassName:c},u)=>{let m=ht.useRef(null),d=useOption({key:e.key},r,m),{value:b}=e;invariant(b&&et(b),"ListSection should not be passed to ListOption");let y={isFocusVisible:d.isFocusVisible,isSelected:d.isSelected,isFocused:d.isFocused,isDisabled:d.isDisabled,isPressed:d.isPressed},f={style:Ur(p,b,y),className:xt(c,b,y)};return a&&n?jsx(zp,{orientation:i,state:r,item:e,dropState:n,dragState:a,dropIndicatorStyle:s,dropIndicatorClassName:l,children:g=>t(e,{...d,showSelectedIcon:o,_state:r,optionProps:{...mergeProps(d.optionProps,g),...f}},M(m,u))}):t(e,{...d,showSelectedIcon:o,_state:r,optionProps:{...d.optionProps,...f}},M(m,u))});Ho.displayName="Option";var Pp=({section:e,state:t,sectionClassName:o,sectionStyle:r,showSectionHeader:a,renderSectionHeader:n,withSectionHeaderPadding:i=false,...s})=>{let l=ht.useRef(null),{itemProps:p,groupProps:c,headingProps:u}=useListBoxSection({heading:a?n?.(e,l)||e.rendered:void 0,"aria-label":e["aria-label"]}),m=t.collection.getChildren?.(e.key);invariant(m,"children must be defined");let{value:d}=e;invariant(d&&Hr(d),"section must be a ListSection");let b=typeof r=="function"?r(d):r,y=typeof o=="function"?o(d):o;return jsxs(Fragment,{children:[e.key===t.collection.getFirstKey()?null:jsx(q,{UNSAFE_omitRole:true}),jsxs("li",{...p,style:{...p.style,...b},className:classNames(yp,y,"BaselineUI-ListBox-Section"),children:[e.rendered&&a?n?.(e,l)||jsx(D,{...u,className:classNames("BaselineUI-ListBox-SectionHeader",fp),ref:l,paddingX:"lg",typography:"label.md.medium",color:"text.primary",paddingInlineStart:i?"5xl":"lg",paddingInlineEnd:"lg",children:e.rendered}):null,jsx("ul",{...c,children:[...m].map(f=>jsx(Ho,{item:f,state:t,...s},f.key))})]})]})};function Wr({type:e="listbox",handle:t},o,r){let a=useCallback(i=>e==="listbox"?r.current?.querySelector(`[data-key="${i}"][role="option"]`):r.current?.querySelector(`[data-key="${i}"][role="row"]`),[e,r]),n=useCallback((i,s)=>{let l=a(i);l&&l?.scrollIntoView({block:"nearest",inline:"nearest",...s});},[a]);useImperativeHandle(t,()=>({scrollIntoView:n,setFocusedKey:i=>{o.selectionManager.setFocused(true),o.selectionManager.setFocusedKey(i),n(i),a(i)?.focus();}}),[n,o.selectionManager,a]),useGranularEffect(()=>{let i=r.current?.getRootNode(),s=i&&ni(i),l=o.selectionManager.focusedKey;s&&l&&n(l);},[o.selectionManager.focusedKey],[n,r]);}var Ct=ht.createContext(null),mi=ht.forwardRef(({className:e,layout:t="stack",orientation:o="vertical",showSelectedIcon:r=true,style:a,renderOption:n,enableReorder:i=false,"data-block-id":s,"data-block-class":l,renderDragPreview:p,onReorder:c,state:u,listBoxHandle:m,...d},b)=>{let y=ht.useRef(null),{direction:f}=useLocale(),g=ht.useRef(null),{listBoxProps:v}=useListBox({...d,shouldSelectOnPressUp:i,keyboardDelegate:new ListKeyboardDelegate({collection:u.collection,ref:g,layout:t,orientation:o,direction:f,disabledKeys:u.disabledKeys})},u,g);Wr({handle:m},u,g);let{collectionProps:_,dragState:h,dropState:x}=Vr({...d,onReorder:c,layout:t,orientation:o,enableReorder:i,preview:y},u,g),{isFocusVisible:w,isFocused:C,focusProps:I}=useFocusRing(),P=filterTruthyValues({"data-block-id":s,"data-block-class":l,"data-layout":t,"data-empty":u.collection.size===0,"data-focused":C,"data-focus-visible":w,"data-orientation":o});return jsxs("ul",{...mergeProps(v,I,P,_),className:classNames(dp,"BaselineUI-ListBox",e),style:a,ref:M(b,g),children:[[...u.collection].map(S=>{let k={key:S.key,state:u,dragState:h,dropState:x,renderOption:n,renderDropIndicator:d.renderDropIndicator,renderSectionHeader:d.renderSectionHeader,showSelectedIcon:r,orientation:o,dropIndicatorStyle:d.dropIndicatorStyle,dropIndicatorClassName:d.dropIndicatorClassName,optionStyle:d.optionStyle,optionClassName:d.optionClassName,sectionClassName:d.sectionClassName,sectionStyle:d.sectionStyle,showSectionHeader:d.showSectionHeader,withSectionHeaderPadding:d.withSectionHeaderPadding};return S.type==="section"?createElement(Pp,{...k,key:S.key,section:S}):createElement(Ho,{...k,key:S.key,item:S})}),p?jsx(DragPreview,{ref:y,children:p}):null]})});mi.displayName="ListBoxCore";var Ip=ht.forwardRef((e,t)=>{let o=pe(),r=useListState({...e,children:o});return jsx(mi,{...e,ref:t,state:r})});Ip.displayName="ListBoxStandalone";var fe=ht.forwardRef((e,t)=>{let o=useContext(Ct);return useEffect(()=>{if(!e.items&&!o)throw new Error("ListBox: You must provide a `state` or `items` prop to render the listbox.")},[e.items,o]),o?jsx(mi,{...e,ref:t,state:o}):jsx(Ip,{...e,ref:t})});fe.displayName="ListBox";var Xr="uf19bsf _1yep5z6la",Rp=z({defaultClassName:"uf19bs0 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f5 _1yep5z6lp _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6kd _1yep5z6ke _1yep5z6kf _1yep5z6lk",variantClassNames:{size:{xxs:"uf19bs1",xs:"uf19bs2",sm:"uf19bs3",md:"uf19bs4",lg:"uf19bs5 _1yep5z6wo _1yep5z6wp _1yep5z6wq _1yep5z6xc _1yep5z6xd _1yep5z6xe _1yep5z6y0 _1yep5z6y1 _1yep5z6y2 _1yep5z6yo _1yep5z6yp _1yep5z6yq"},isHovered:{true:"uf19bs6"},isDisabled:{true:"uf19bs7 _1yep5z611a"},isFocusVisible:{true:"uf19bs8"},variant:{primary:"uf19bs9",secondary:"uf19bsa",tertiary:"uf19bsb",ghost:"uf19bsc",toolbar:"uf19bsd _1yep5z6x6 _1yep5z6x7 _1yep5z6x8 _1yep5z6xu _1yep5z6xv _1yep5z6xw _1yep5z6yi _1yep5z6yj _1yep5z6yk _1yep5z6z6 _1yep5z6z7 _1yep5z6z8",popover:"uf19bse _1yep5z6pr _1yep5z6ps _1yep5z6pt _1yep5z6nf _1yep5z6ng _1yep5z6nh _1yep5z6m6 _1yep5z6m7 _1yep5z6m8 _1yep5z6oi _1yep5z6oj _1yep5z6ok _1yep5z6vr _1yep5z6vs _1yep5z6vt"}},defaultVariants:{},compoundVariants:[[{variant:"toolbar",isHovered:true,isFocusVisible:false},"_1yep5z61o9"],[{variant:"primary",isHovered:true,isFocusVisible:false},"_1yep5z61o9"],[{variant:"secondary",isHovered:true,isFocusVisible:false},"_1yep5z61nc"],[{variant:"tertiary",isHovered:true,isFocusVisible:false},"_1yep5z61nb _1yep5z61o9"],[{variant:"ghost",isHovered:true,isFocusVisible:false},"_1yep5z61nh"],[{variant:"popover",isHovered:true,isFocusVisible:false},"_1yep5z61q6 _1yep5z61tx _1yep5z61u1 _1yep5z61ty"],[{variant:"ghost",isDisabled:false},"_1yep5z61ng"],[{variant:"popover",size:"lg"},"_1yep5z61io _1yep5z61ip _1yep5z61iq _1yep5z61jc _1yep5z61jd _1yep5z61je _1yep5z61k0 _1yep5z61k1 _1yep5z61k2 _1yep5z61ko _1yep5z61kp _1yep5z61kq"]]});var Vo=ht.createContext({state:null,overlayTriggerAria:{triggerProps:{},overlayProps:{}},triggerRef:void 0}),je=({children:e,...t})=>{let o=ht.useRef(null),r=useOverlayTriggerState(t),a=useOverlayTrigger(t,r),n=useMemo(()=>({state:r,overlayTriggerAria:a,triggerRef:o}),[r,a]);return jsx(Vo.Provider,{value:n,children:e})};var Tp=z({defaultClassName:"_1gzftth2",variantClassNames:{placement:{bottom:"_1gzftth3",top:"_1gzftth4",right:"_1gzftth5",left:"_1gzftth6"}},defaultVariants:{},compoundVariants:[]}),Sp=z({defaultClassName:"_1gzftth7",variantClassNames:{placement:{bottom:"_1gzftth8",top:"_1gzftth9",right:"_1gzfttha",left:"_1gzftthb"}},defaultVariants:{},compoundVariants:[]}),Dp="_1gzftth1 _1yep5z6is _1yep5z6it _1yep5z6iu",Mp="_1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6k4 _1yep5z6k5 _1yep5z6k6 _1yep5z6d7",Np="_1gzftthd",Ep="_1gzftthc",Lp="var(--_1gzftth0)";function c3(e){return e.closest(".BaselineUI-Portal")||e.closest(".BaselineUI-Popover-Content")}function Bp(e){return typeof e=="object"&&typeof e.left=="number"&&typeof e.top=="number"&&(typeof e.width=="number"||e.width===void 0)&&(typeof e.height=="number"||e.height===void 0)}var Zr=ht.createContext({isSelected:false,ref:void 0}),Oe=({children:e,anchorRect:t})=>{let{state:o,overlayTriggerAria:r,triggerRef:a}=useContext(Vo);invariant(o,"PopoverTrigger must be used within a Popover");let{triggerProps:n}=r,i=useMemo(()=>({...n,isSelected:o.isOpen,ref:a}),[n,o.isOpen,a]);return invariant(!t&&e||t&&!e,"Either one of anchorRect or children has to be provided."),invariant(!t||Bp(t),"If provided, the anchorRect prop must be an object with left and top number values, and optionally width and height."),jsx(Zr.Provider,{value:i,children:t?jsx("div",{className:classNames(Np,"BaselineUI-PopoverTrigger-Hidden"),style:t,ref:a,tabIndex:-1},JSON.stringify(t)):e})};var ze=({label:e,tooltip:t,...o})=>({tooltipProps:useMemo(()=>{let a={size:"sm",variant:"inverse",text:e,includeArrow:false,placement:"bottom start",offset:4,...o};if(typeof t=="object")return {...a,...t};if(t)return a},[e,o,t])});function Jr({tooltip:e,"aria-label":t,"aria-labelledby":o},r){let[a,n]=useState(t||"");useEffect(()=>{if(o){let l=_e(r.current).querySelector(`#${o}`);l&&n(l.textContent||"");}else t&&n(t);},[o,r,t]);let{tooltipProps:i}=ze({label:a,tooltip:e});return {tooltipProps:i}}var Qr=e=>{let t=ht.useRef(null),{ref:o,...r}=useContext(Zr)||{},{buttonProps:a,isPressed:n}=useButton({...e,...r},t),{isFocusVisible:i,isFocused:s,focusProps:l}=useFocusRing(),{hoverProps:p,isHovered:c}=useHover({isDisabled:e.isDisabled});return {buttonProps:Me(a,l,p),isPressed:n,ref:M(t,o||null),isFocusVisible:i,isFocused:s,isHovered:c,uiStateOptions:{isHovered:c,isFocused:s,isPressed:n,isDisabled:e.isDisabled,isFocusVisible:i}}},ea=(e,t)=>{let o=ht.useRef(null),{ref:r,...a}=useContext(Zr)||{},{buttonProps:n,isPressed:i}=useToggleButton({...e,...a},t,o);(n.role==="radio"||n.role==="checkbox")&&(n["aria-pressed"]=void 0);let{isFocusVisible:s,isFocused:l,focusProps:p}=useFocusRing(),{hoverProps:c,isHovered:u}=useHover({isDisabled:e.isDisabled});return {buttonProps:Me(n,p,c),isPressed:i,ref:M(o,r||null),isFocusVisible:s,isFocused:l,isHovered:u,uiStateOptions:{isHovered:u,isFocused:l,isPressed:i,isDisabled:e.isDisabled,isFocusVisible:s,isSelected:t.isSelected}}};var ta=z({defaultClassName:"oom8bs0 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6lp _1yep5z6lq _1yep5z6lk _1yep5z6dy _1yep5z6la",variantClassNames:{variant:{primary:"oom8bs1",secondary:"oom8bs2",tertiary:"oom8bs3",ghost:"oom8bs4",popover:"oom8bs5",toolbar:"oom8bs6",success:"oom8bs7",warning:"oom8bs8",error:"oom8bs9"},isDisabled:{true:"oom8bsa"},isFocusVisible:{true:"oom8bsb"},isHovered:{true:"oom8bsc"},size:{sm:"oom8bsd",md:"oom8bse",lg:"oom8bsf"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isHovered:true},"oom8bsg"],[{variant:"secondary",isHovered:true},"oom8bsh"],[{variant:"tertiary",isHovered:true},"oom8bsi"],[{variant:"popover",isHovered:true},"oom8bsj"],[{variant:"ghost",isHovered:true},"oom8bsk"],[{variant:"success",isHovered:true},"oom8bsl"],[{variant:"warning",isHovered:true},"oom8bsm"],[{variant:"error",isHovered:true},"oom8bsn"],[{variant:"primary",isFocusVisible:true},"oom8bso"],[{variant:"tertiary",isFocusVisible:true},"oom8bsp"],[{variant:"success",isFocusVisible:true},"oom8bsq"],[{variant:"warning",isFocusVisible:true},"oom8bsr"],[{variant:"error",isFocusVisible:true},"oom8bss"]]}),yi=z({defaultClassName:"oom8bst _1yep5z6la",variantClassNames:{isDisabled:{true:"oom8bsu"},isFocusVisible:{true:"oom8bsv"},isHovered:{true:"_1yep5z6115"},variant:{primary:"_1yep5z611c",secondary:"_1yep5z6118",tertiary:"_1yep5z611d",ghost:"_1yep5z611d",popover:"_1yep5z6118",toolbar:"_1yep5z6118",success:"_1yep5z611b",warning:"_1yep5z611b",error:"_1yep5z611b"}},defaultVariants:{},compoundVariants:[[{variant:"tertiary",isHovered:true},"_1yep5z61nf"],[{variant:"ghost",isHovered:true},"_1yep5z61nh"],[{variant:"tertiary",isFocusVisible:true},"_1yep5z61nf"],[{variant:"secondary",isDisabled:true},"_1yep5z61nd"],[{variant:"tertiary",isDisabled:true},"_1yep5z61nd"],[{variant:"ghost",isDisabled:true},"_1yep5z61nd"],[{variant:"popover",isDisabled:true},"_1yep5z61nd"],[{variant:"toolbar",isDisabled:true},"_1yep5z61nd"]]});var yv={sm:16,md:20,lg:24},K=ht.forwardRef(({label:e,style:t,className:o,iconStart:r,iconEnd:a,variant:n="primary",elementType:i="button",isDisabled:s,size:l="sm","data-block-id":p,"data-block-class":c,...u},m)=>{let{buttonProps:d,isPressed:b,ref:y,isFocusVisible:f,isFocused:g,isHovered:v,uiStateOptions:_}=Qr({...u,elementType:i,isDisabled:s}),h=yv[l],x=filterTruthyValues({"data-block-id":p,"data-block-class":c,"data-disabled":s,"data-focused":g,"data-focus-visible":f,"data-hovered":v,"data-pressed":b});return jsxs(i,{...mergeProps(d,x),className:classNames(ta({isDisabled:!!s,isFocusVisible:f,isHovered:v,variant:n,size:l}),"BaselineUI-ActionButton",typeof o=="function"?o(_):o),style:typeof t=="function"?t(_):t,ref:M(m,y),children:[!!r&&jsx(r,{size:h,className:yi({variant:n,isDisabled:s,isFocusVisible:f,isHovered:v})}),e,!!a&&jsx(a,{size:h,className:yi({variant:n,isDisabled:s,isFocusVisible:f,isHovered:v})}),n==="popover"&&jsx(CaretDownIcon,{size:8,className:Xr})]})});K.displayName="ActionButton";var oa=ht.forwardRef(({className:e,style:t,node:o,"data-block-id":r,"data-block-class":a,...n},i)=>{let s=ht.useRef(null);ht.useEffect(()=>{let c=s.current;return c?.append(o),()=>{c?.contains(o)&&o.remove();}},[o]);let{pressProps:l,isPressed:p}=usePress(n);return jsx("div",{...l,className:e,style:t,"data-block-id":r,"data-block-class":a,"data-pressed":p,"data-testid":"dom-node-renderer",ref:M(i,s)})});oa.displayName="DomNodeRenderer";var Vp="_1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j4 _1yep5z6j5 _1yep5z6j6 _1yep5z6ln",Up="_14uvjig3 _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z69i _1yep5z69j _1yep5z69k",qp="_1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6kj _1yep5z6kk _1yep5z6kl _1yep5z6jj _1yep5z6jk _1yep5z6jl",Kp=z({defaultClassName:"_14uvjig0 _1yep5z6dy _1yep5z6ev",variantClassNames:{isDisabled:{true:"_1yep5z6111"},hasNumberInput:{false:"_1yep5z6ol _1yep5z6om _1yep5z6on"}},defaultVariants:{},compoundVariants:[]}),Gp=z({defaultClassName:"_14uvjigb _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6g9 _1yep5z6lp _1yep5z6la",variantClassNames:{active:{true:"_14uvjigc _1yep5z612i _1yep5z6181 _1yep5z617t"},isDisabled:{true:"_14uvjigd _1yep5z612m"},isReadOnly:{true:"_1yep5z614p _1yep5z614q _1yep5z614r"},isFocusVisible:{true:"_14uvjigf _1yep5z612i _1yep5z617d"},isHovered:{true:"_14uvjigg _1yep5z612i"}},defaultVariants:{},compoundVariants:[]}),Wp="_14uvjiga _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6kd _1yep5z6ke _1yep5z6kf",Yp="_14uvjig4 _1yep5z6g3 _1yep5z6ln",Xp=z({defaultClassName:"_14uvjig5 _1yep5z6g9 _1yep5z6ig _1yep5z6ih _1yep5z6ii _1yep5z6lo",variantClassNames:{active:{true:"_1yep5z612i"},isFocusVisible:{true:"_1yep5z612i"},isDisabled:{true:"_1yep5z612m"},isHovered:{true:"_1yep5z612i"}},defaultVariants:{},compoundVariants:[]});var Kt=z({defaultClassName:"nrh1ehr _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z6ew _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z6111"},hasError:{true:"_1yep5z610h"},labelPosition:{start:"nrh1ehu",top:"nrh1ehv"}},defaultVariants:{},compoundVariants:[]}),ra=z({defaultClassName:"nrh1ehi _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6eu _1yep5z6ln _1yep5z6ly _1yep5z6lq _1yep5z6dy",variantClassNames:{isDisabled:{true:"nrh1ehj"},labelPosition:{top:"nrh1ehk",start:"nrh1ehl"}},defaultVariants:{},compoundVariants:[]}),Gt=z({defaultClassName:"nrh1ehm _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6lk",variantClassNames:{validationState:{valid:"nrh1ehn",error:"_1yep5z610h",warning:"_1yep5z610p"},isReadOnly:{true:"_1yep5z6118"}},defaultVariants:{},compoundVariants:[]}),Wt="_1yep5z6ev _1yep5z6dy",tt=z({defaultClassName:"nrh1eh3 _1yep5z6iv _1yep5z6iw _1yep5z6ix",variantClassNames:{labelPosition:{top:"_1yep5z6t9 _1yep5z6ta _1yep5z6tb",start:"_1yep5z6n6 _1yep5z6n7 _1yep5z6n8 _1yep5z6157 _1yep5z6158 _1yep5z6159"},hasMessage:{true:"nrh1eh6"}},defaultVariants:{},compoundVariants:[[{labelPosition:"start",hasMessage:false},"_1yep5z61sj _1yep5z61sk _1yep5z61sl"]]}),ot=z({defaultClassName:"nrh1eh0 _1yep5z6ln",variantClassNames:{labelPosition:{top:"_1yep5z614v _1yep5z614w _1yep5z614x _1yep5z6157 _1yep5z6158 _1yep5z6159",start:"_1yep5z614v _1yep5z614w _1yep5z614x _1yep5z6154 _1yep5z6155 _1yep5z6156 _1yep5z616m _1yep5z616n _1yep5z616o _1yep5z6vl _1yep5z6vm _1yep5z6vn"}},defaultVariants:{},compoundVariants:[]}),Yt=z({defaultClassName:"nrh1eh7 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6m1 _1yep5z6lz _1yep5z6h4 _1yep5z6jj _1yep5z6jk _1yep5z6jl",variantClassNames:{validationState:{valid:"nrh1eh8",error:"_1yep5z612q",warning:"nrh1eha"},isHovered:{true:"nrh1ehb"},isFocused:{true:"_1yep5z6wl _1yep5z6wm _1yep5z6wn _1yep5z6x9 _1yep5z6xa _1yep5z6xb _1yep5z6xx _1yep5z6xy _1yep5z6xz _1yep5z6yl _1yep5z6ym _1yep5z6yn _1yep5z6184 _1yep5z6182 _1yep5z6134 _1yep5z617v _1yep5z617u _1yep5z6140 _1yep5z617x"},isDisabled:{true:"nrh1ehd"},variant:{primary:"nrh1ehe",ghost:"nrh1ehf"},isReadOnly:{true:"_1yep5z6x6 _1yep5z6x7 _1yep5z6x8 _1yep5z6xu _1yep5z6xv _1yep5z6xw _1yep5z6yi _1yep5z6yj _1yep5z6yk _1yep5z6z6 _1yep5z6z7 _1yep5z6z8"}},defaultVariants:{},compoundVariants:[[{variant:"ghost",isHovered:true,isFocused:false,validationState:"valid"},"_1yep5z61pa _1yep5z61u5 _1yep5z61u7"],[{variant:"ghost",isFocused:false,isHovered:false,validationState:"valid"},"_1yep5z61pm"],[{isHovered:true,validationState:"valid",isDisabled:false,isReadOnly:false,isFocused:false,variant:"primary"},"_1yep5z61pb"],[{isHovered:true,validationState:"warning",isDisabled:false,isReadOnly:false,isFocused:false},"_1yep5z61pb"],[{isReadOnly:true,variant:"primary",isFocused:false},"nrh1ehh"],[{isReadOnly:true,isFocused:true},"_1yep5z61io _1yep5z61ip _1yep5z61iq _1yep5z61jc _1yep5z61jd _1yep5z61je _1yep5z61k0 _1yep5z61k1 _1yep5z61k2 _1yep5z61ko _1yep5z61kp _1yep5z61kq"],[{isHovered:true,isFocused:false,isDisabled:false,isReadOnly:false},"_1yep5z61tg"]]});function he({description:e,errorMessageProps:t,descriptionProps:o,warningMessage:r,errorMessage:a,labelPosition:n,isDisabled:i}){return e?jsx("div",{...o,className:Kt({isDisabled:i,labelPosition:n}),"aria-disabled":i,children:e}):a?jsx("div",{...t,className:Kt({hasError:true,labelPosition:n}),"aria-disabled":i,children:a}):r?jsx("div",{className:Kt({isDisabled:i,labelPosition:n}),"aria-disabled":i,children:r}):null}var Zp=z({defaultClassName:"_1lnwne1 z9nup81",variantClassNames:{isHoveredOrFocused:{true:"_1lnwne2"},isInteractive:{false:"z9nup82"}},defaultVariants:{},compoundVariants:[[{isHoveredOrFocused:true,isInteractive:true},"_1lnwne4"]]}),Jp="_1lnwne0";var Qp=z({defaultClassName:"_1jwycy80",variantClassNames:{placement:{bottom:"_1jwycy81",left:"_1jwycy82",right:"_1jwycy83",top:"_1jwycy84"},variant:{default:"_1jwycy85",inverse:"_1jwycy86"}},defaultVariants:{},compoundVariants:[]}),ec=z({defaultClassName:"_1jwycy87 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn",variantClassNames:{size:{md:"_1yep5z63u _1yep5z63v _1yep5z63w _1yep5z61i _1yep5z61j _1yep5z61k _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6e7",sm:"_1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6dv"},variant:{default:"_1yep5z6g9 _1yep5z6ez",inverse:"_1yep5z6d7 _1yep5z6g1 _1yep5z6eu"}},defaultVariants:{},compoundVariants:[]});function aa({placement:e}){let t=useMemo(()=>{switch(e){case "top":return {x:0,y:-4};case "bottom":return {x:0,y:4};case "left":return {x:-4,y:0};case "right":return {x:4,y:0};default:return {x:0,y:4}}},[e]);return {transitionProps:{initial:{opacity:0,transform:`translate3d(${t.x}px, ${t.y}px, 0) scale(0.98)`},animate:{opacity:1,transform:"translate3d(0, 0, 0) scale(1)"},transition:{ease:"easeOut"}}}}var _i=ht.forwardRef(({children:e,state:t,overlayProps:o,arrowProps:r,placement:a,variant:n,size:i,tooltipProps:s,includeArrow:l},p)=>{let{tooltipProps:c}=useTooltip({isOpen:t.isOpen},t),u=a==="center"?"bottom":a,{transitionProps:m}=aa({placement:a});return jsxs(motion.span,{...mergeProps(o,m),ref:p,"data-placement":u,children:[l?jsx("div",{className:Qp({placement:u,variant:n}),...r}):null,jsx("div",{...mergeProps(c,s),className:ec({variant:n,size:i}),children:e})]})});_i.displayName="TooltipContent";var zi=ht.createContext(void 0),na=({portalContainer:e,children:t})=>jsx(zi.Provider,{value:e,children:t});na.displayName="PortalContainerProvider";function ac({ref:e,onIntersect:t,isDisabled:o,threshold:r,rootMargin:a,root:n}){let i=ht.useRef(null);useEffect(()=>{if(o){i.current?.disconnect(),i.current=null;return}i.current=new IntersectionObserver(([s])=>{t(s);},{root:n?.current,rootMargin:a,threshold:r});},[t,o,n,a,r]),useEffect(()=>{let{current:s}=i;return e.current&&s?.observe(e.current),()=>s?.disconnect()},[e]);}function nc({ref:e,onResize:t,isDisabled:o}){let r=ht.useRef(null),[a,n]=ht.useState();return ht.useEffect(()=>{if(o){r.current?.disconnect(),r.current=null;return}r.current=new ResizeObserver(([i])=>{n(i.contentRect),t?.(i);});},[t,o,n]),ht.useEffect(()=>{let{current:i}=r;return e.current&&i?.observe(e.current),()=>i?.disconnect()},[e]),{size:a}}function Xt({src:e,alt:t}){let[o,r]=useState(false),[a,n]=useState(false),[i,s]=useState(false),l=()=>{r(true),s(false);},p=()=>{n(true),s(false);};return useEffect(()=>{if(!e)return;s(true);let c=new Image;return c.src=e,c.addEventListener("load",l),c.addEventListener("error",p),()=>{c.removeEventListener("load",l),c.removeEventListener("error",p);}},[e]),{isLoaded:o,hasError:a,isLoading:i,imgProps:{src:o?e:void 0,alt:t}}}function sa(){let e=useRef(true);return useEffect(()=>{e.current=false;},[]),e.current}var ic="SET_STATE",la="UNDO",pa="REDO",Mv=(e,t)=>{let{past:o,present:r,future:a}=e;switch(t.type){case ic:return {past:[...o,r],present:t.data,future:[]};case la:return {past:o.slice(0,o?.length-1),present:o[o?.length-1],future:[r,...a]};case pa:return {past:[...o,r],present:a[0],future:a.slice(1)};default:throw new Error("Invalid action type")}},sc=(e={},{isDisabled:t,onAction:o})=>{let r=sa(),[a,n]=useReducer(Mv,{past:[],present:e,future:[]}),{past:i,present:s,future:l}=a,p=y=>{n({type:ic,data:y});},c=useRef(),u=()=>{c.current=la,n({type:la});},m=()=>{c.current=pa,n({type:pa});},d=!!i?.length,b=!!l?.length;return useGranularEffect(()=>{(c.current===la||c.current===pa)&&(o?.(s,c.current),c.current=void 0);},[s],[o,r]),{state:s,push:t?()=>{}:p,undo:t?()=>{}:u,redo:t?()=>{}:m,pastStates:i,futureStates:l,canUndo:d,canRedo:b}};var xi=ht.createContext({messages:{},shouldLogMissingMessages:true,hasMissingErrorLoggedFor:{current:new Set},setLang:()=>{}}),cc=({children:e,messages:t={},shouldLogMissingMessages:o=true,...r})=>{let a=useRef(new Set),[n,i]=useState(r.locale||"");useEffect(()=>{a.current.clear();},[n,r.locale]);let s=ht.useMemo(()=>({messages:t,shouldLogMissingMessages:o,hasMissingErrorLoggedFor:a,setLang:i}),[t,o,i]);return jsx(I18nProvider,{...r,children:jsx(xi.Provider,{value:s,children:e})})};cc.displayName="I18nProvider";function A(e){let{messages:t,shouldLogMissingMessages:o,hasMissingErrorLoggedFor:r,setLang:a}=useContext(xi);useEffect(()=>{!e&&Fv(t)&&console.warn("BUI \u{1F30D}: No messages object provided and no messages found in the `I18nProvider`. Please provide a messages object to the `useI18n` hook.");},[e,t]);let n=useMemo(()=>e?cleanKeyFromGlobImport(e):t,[e,t]),i=useMessageFormatter(n),s=useLocale();useEffect(()=>{a(s.locale);},[s.locale,a]);let l=useCallback(c=>{o&&!r.current.has(c)&&(console.log(`BUI \u{1F30D}: Translation not found for key: \`${c}\` for locale: \`${s.locale}\`. The default message, i.e. \`${c}\`, will be used instead.`),r.current.add(c));},[r,s.locale,o]),p=useCallback((c,u)=>{if(typeof c=="object")try{return i(c.id,u)}catch{return l(c.id),c.defaultMessage||c.id}else try{return i(c,u)}catch{return l(c),c}},[i,l]);return useMemo(()=>({formatMessage:p,locale:s}),[p,s])}var W=e=>e;function cD(e,t,o){let r=ht.useRef(null);return ht.useEffect(()=>{if(e)return r.current=new MutationObserver(o),r.current.observe(e,t),()=>{r.current&&r.current.disconnect();}},[e,t,o]),r.current}function yc(e,t){let[o,r]=useState(()=>{try{let n=window.localStorage.getItem(e);return n?JSON.parse(n):t}catch(n){return console.log(n),t}});return [o,n=>{try{let i=n instanceof Function?n(o):n;r(i),window.localStorage.setItem(e,JSON.stringify(i));}catch(i){console.log(i);}}]}function gD({ref:e,onSelectionChange:t,onSelectionEnd:o,isDisabled:r}){let a=ht.useRef(null);usePress({ref:e,isDisabled:r,onPressEnd(){let i=re(e.current).getSelection();i&&e.current?.contains(i.anchorNode)&&o?.(i);},onPressStart(){let n=re(e.current);a.current=n.getSelection(),a.current&&a.current.removeAllRanges();}}),useEffect(()=>{let n=e.current;if(!n||r)return;function i(){let p=re(n).getSelection();p&&e.current?.contains(p.anchorNode)&&t(p);}let s=_e(n);return s.addEventListener("selectionchange",i),()=>{s.removeEventListener("selectionchange",i);}},[e,t,r]);}var ca=ht.createContext({breakpoints:breakpoints}),Yv=({children:e,breakpoints:t=breakpoints})=>{let o=useMemo(()=>({breakpoints:t}),[t]);return jsx(ca.Provider,{value:o,children:e})};function Ne(e){let{breakpoints:t=breakpoints}=useContext(ca),o=useMemo(()=>({tablet:`screen and (min-width: ${t.tablet}px)`,desktop:`screen and (min-width: ${t.desktop}px)`}),[t]),r=useCallback(()=>{let i=re(e??typeof window>"u"?void 0:e),s=i.matchMedia(o.tablet);return i.matchMedia(o.desktop).matches?"desktop":s.matches?"tablet":"mobile"},[e,o]),[a,n]=ht.useState(r);return Se(()=>{let i=re(e),s=()=>{n(r());};return i.addEventListener("resize",s),s(),()=>{i.removeEventListener("resize",s);}},[e,r]),a}var a_=typeof window<"u";function Pi(){return a_?document.body:null}var He=ht.createContext({container:null,portalContainer:null,shouldContainOverlays:false,isContainerPositioned:false,containerWidth:void 0,containerHeight:void 0}),n_=({children:e,container:t=Pi(),portalContainer:o,shouldContainOverlays:r="auto"})=>{let a=Ne(),[n,i]=useState(),[s,l]=useState(),p=useMemo(()=>t===Pi()||r==="never"?false:r==="always"?true:a!=="mobile",[r,a,t]),[c,u]=useState(false),m=sa();useEffect(()=>{if(!t||m)return;let y=re(t).getComputedStyle(t),f=!!y.position&&y.position!=="static";u(f);let g=t.getBoundingClientRect();(g.width===0||g.height===0)&&console.error("FrameProvider: container does not have a width or height. Please ensure that the container is visible and has a width and height.");function v({width:h,height:x}){t&&(i(h),l(x));}let _=new ResizeObserver(h=>{for(let x of h)v({width:x.contentRect.width,height:x.contentRect.height});});return p&&(v({width:g.width,height:g.height}),_.observe(t)),t.dataset.shouldContainOverlays=p.toString(),()=>{_.disconnect(),t.dataset.shouldContainOverlays="";}},[t,m,p]);let d=useMemo(()=>({container:t,portalContainer:o||t||Pi(),shouldContainOverlays:p,isContainerPositioned:c,containerWidth:n,containerHeight:s}),[t,o,p,c,n,s]);return jsx(He.Provider,{value:d,children:jsx(na,{portalContainer:d.portalContainer||void 0,children:e})})};function xe(e){let t=useContext(zi),{portalContainer:o}=useContext(He);return e||t||o||void 0}var zc=z({defaultClassName:"z9nup83",variantClassNames:{size:{xs:"z9nup84",sm:"z9nup85"}},defaultVariants:{},compoundVariants:[]}),hc="z9nup80",Zt="z9nup82",xc="z9nup86";function ki(e=typeof window>"u"?void 0:window){let[t,o]=useState("light"),[r,a]=useState(false),[n,i]=useState(false),[s,l]=useState(false);return useEffect(()=>{if(!e)return;let p=e.matchMedia("(prefers-color-scheme: dark)"),c=u=>{o(u.matches?"dark":"light");};return p.matches&&o("dark"),p.addEventListener("change",c),()=>{p.addEventListener("change",c);}},[e]),useEffect(()=>{if(!e)return;let p=e.matchMedia("(prefers-contrast: more)"),c=u=>{a(u.matches);};return a(p.matches),p.addEventListener("change",c),()=>{p.addEventListener("change",c);}},[e]),useEffect(()=>{if(!e)return;let p=e.matchMedia("(prefers-reduced-motion: reduce)"),c=u=>{i(u.matches);};return p.matches&&i(true),p.addEventListener("change",c),()=>{p.addEventListener("change",c);}},[e]),useEffect(()=>{if(!e)return;let p=e.matchMedia("(prefers-reduced-transparency: reduce)"),c=u=>{l(u.matches);};return p.matches&&l(true),p.addEventListener("change",c),()=>{p.addEventListener("change",c);}},[e]),{colorScheme:t,highContrast:r,reducedMotion:n,transparency:s}}var Jt=createContext({theme:lightTheme,setTheme:()=>{},shouldHandleVirtualKeyboard:true});var Cc="var(--hj25q10)";var ma={LIGHT:{name:"light",theme:lightTheme},DARK:{name:"dark",theme:darkTheme}},fa=ht.forwardRef(({theme:e="system",children:t,setTheme:o,onThemeChange:r,className:a,style:n,UNSAFE_domProps:i,"data-block-id":s,"data-block-class":l,reducedMotion:p="user",shouldHandleVirtualKeyboard:c=true},u)=>{let{direction:m}=useLocale(),{colorScheme:d,reducedMotion:b,highContrast:y,transparency:f}=ki(),{name:g,theme:v}=useMemo(()=>{switch(e){case "system":return d==="light"?ma.LIGHT:ma.DARK;case "light":return ma.LIGHT;case "dark":return ma.DARK;default:return {name:"custom",theme:e}}},[d,e]),_=Ne(),h={"data-theme":g,"data-block-id":s,"data-block-class":l,"data-reduced-motion":p==="user"?b:p==="always","data-high-contrast":y,"data-transparency":f,"data-device":_},x=useMemo(()=>({theme:v,setTheme:w=>{o?.(w),r?.(w);},shouldHandleVirtualKeyboard:c}),[v,o,r,c]);return useEffect(()=>{o&&console.warn("ThemeProvider: The `setTheme` prop is deprecated and will be removed in a future version of Baseline UI. Use the `onThemeChange` prop instead.");},[o]),jsx(Jt.Provider,{value:x,children:jsx(MotionConfig,{reducedMotion:p,children:jsx("div",{...mergeProps(i,h),className:classNames(hc,"BaselineUI-ThemeProvider",a),style:{...assignInlineVars(themeVars,v),...assignInlineVars({[Cc]:m==="rtl"?"-1":"1"}),...n},ref:u,children:t})})})});fa.displayName="ThemeProvider";function _M(){MotionGlobalConfig.skipAnimations=true;}function zM(){MotionGlobalConfig.skipAnimations=false;}var Ce=ht.forwardRef(({className:e,style:t,children:o,"data-block-id":r,"data-block-class":a,portalContainer:n,...i},s)=>{let{theme:l,shouldHandleVirtualKeyboard:p}=useContext(Jt),c=xe();return jsx(Overlay,{...i,portalContainer:n??c,children:jsx(fa,{ref:s,theme:l,shouldHandleVirtualKeyboard:p,style:t,className:classNames("BaselineUI-Portal",e),"data-block-id":r,"data-block-class":a,children:o})})});Ce.displayName="Portal";var J=ht.forwardRef(({children:e,placement:t="bottom",delay:o=1e3,closeDelay:r=500,variant:a="default",size:n="md",includeArrow:i=true,portalContainer:s,className:l,style:p,"data-block-id":c,"data-block-class":u,...m},d)=>{let b=ht.useRef(null),y=ht.useRef(null),f=!m.text||m.isDisabled,g=useTooltipTriggerState({...m,delay:o,closeDelay:r,isDisabled:f}),{triggerProps:v,tooltipProps:_}=useTooltipTrigger({...m,isDisabled:f,delay:o,closeDelay:r},g,b),h=xe(s),{overlayProps:x,arrowProps:w,placement:C,updatePosition:I}=useOverlayPosition({arrowSize:i?13:0,targetRef:b,arrowBoundaryOffset:i?8:0,offset:i?12:2,overlayRef:y,placement:t,isOpen:g.isOpen,...m});ac({ref:y,threshold:1,onIntersect:I,isDisabled:!g.isOpen}),nc({ref:b,onResize:I,isDisabled:!g.isOpen});let P=ht.isValidElement(e)?jsx(FocusableProvider,{...v,ref:b,children:e}):typeof e=="function"?e({triggerProps:v,triggerRef:b}):null;return jsxs(Fragment,{children:[P,g.isOpen?jsx(Ce,{disableFocusManagement:true,portalContainer:h,className:l,style:p,"data-block-id":c,"data-block-class":u,children:jsx(_i,{ref:M(d,y),state:g,arrowProps:w,overlayProps:x,placement:C,tooltipProps:_,variant:a,size:n,includeArrow:i,children:m.text})}):null]})});J.displayName="Tooltip";var ba=ht.forwardRef(({elementType:e,children:t,...o},r)=>{let a=ae(r),{focusableProps:n}=useFocusable(o,a);return jsx(e??"div",{ref:a,...n,children:t})});ba.displayName="Focusable";var E_={xxs:8,xs:12,sm:16,md:20,lg:24},L=ht.forwardRef((e,t)=>{let o=ae(t),{tooltipProps:r}=Jr(e,o);return r?jsx(J,{...r,children:jsx(Ri,{...e,ref:o})}):jsx(Ri,{...e,ref:o})});L.displayName="ActionIconButton";var Ri=ht.forwardRef(({className:e,style:t,icon:o,size:r="md",variant:a="primary",UNSAFE_NON_INTERACTIVE:n,elementType:i=n?"div":"button",...s},l)=>{let p=s["aria-label"],c=s["aria-labelledby"];useEffect(()=>{!p&&!c&&console.warn("An `ActionIconButton` requires an aria-label or aria-labelledby prop.");},[p,c]);let{buttonProps:u,isPressed:m,ref:d,isFocusVisible:b,isFocused:y,isHovered:f,uiStateOptions:g}=Qr({...s,elementType:i}),v=filterTruthyValues({"data-block-id":s["data-block-id"],"data-block-class":s["data-block-class"],"data-focused":y,"data-focus-visible":b,"data-disabled":s.isDisabled,"data-hovered":f,"data-pressed":m});return jsxs(i,{...mergeProps(u,v),className:classNames(Rp({variant:a,size:r,isDisabled:!!s.isDisabled,isFocusVisible:b,isHovered:f}),"BaselineUI-ActionIconButton",typeof e=="function"?e(g):e),ref:M(l,d),style:typeof t=="function"?t(g):t,...n&&{tabIndex:void 0,role:void 0,"aria-label":void 0,"aria-labelledby":void 0,"aria-disabled":void 0},children:[jsx(o,{role:"presentation",size:E_[r]}),a==="popover"&&jsx(CaretDownIcon,{size:8,className:Xr})]})});Ri.displayName="ActionIconButtonCore";var Ve=ht.forwardRef(({className:e,style:t,labelPosition:o="top",variant:r="primary",showStepper:a=true,...n},i)=>{let s=ht.useRef(null),{locale:l}=useLocale(),p=useNumberFieldState({...n,locale:l}),{hoverProps:c,isHovered:u}=useHover({isDisabled:n.isDisabled}),{focusProps:m,isFocusVisible:d,isFocused:b}=useFocusRing(),{labelProps:y,decrementButtonProps:f,inputProps:g,incrementButtonProps:v,groupProps:_,descriptionProps:h,errorMessageProps:x}=useNumberField(n,p,s),w=useMemo(()=>n.isReadOnly?ReadOnlyIcon:n.isInvalid?ErrorCircleFilledIcon:null,[n.isInvalid,n.isReadOnly]),C=he({description:n.description,errorMessageProps:x,descriptionProps:h,errorMessage:n.errorMessage,labelPosition:o,isDisabled:n.isDisabled}),I=filterTruthyValues({"data-disabled":n.isDisabled,"data-readonly":n.isReadOnly,"data-hovered":u,"data-focused":b,"data-focus-visible":d,"data-invalid":n.isInvalid,"data-block-id":n["data-block-id"],"data-block-class":n["data-block-class"]});return jsxs("div",{style:t,className:classNames(ot({labelPosition:o}),"BaselineUI-NumberInput",e),...I,ref:i,children:[n.label?jsxs("div",{className:tt({labelPosition:o,hasMessage:!!C}),children:[jsx("label",{...y,className:Wt,children:n.label}),o==="start"&&C]}):null,jsxs("div",{className:classNames({[Zt]:n.isDisabled}),children:[jsxs("div",{...mergeProps(_,c),className:classNames(Yt({isHovered:u,isDisabled:!!n.isDisabled,isReadOnly:!!n.isReadOnly,validationState:n.isInvalid?"error":"valid",isFocused:b,variant:r}),{[Jp]:o==="start"},"BaselineUI-NumberInput-Container"),children:[jsx("input",{...mergeProps(g,m),ref:s,className:classNames("BaselineUI-NumberInput-Input",ra({isDisabled:n.isDisabled,labelPosition:o}))}),w?jsx(w,{className:Gt({validationState:"error",isReadOnly:n.isReadOnly}),size:16}):null,a?jsxs("div",{className:Zp({isHoveredOrFocused:u||b,isInteractive:!n.isReadOnly&&!n.isDisabled}),children:[jsx(L,{variant:"secondary",size:"xxs",icon:MinusIcon,...f,className:"BaselineUI-NumberInput-DecrementButton"}),jsx(q,{style:{height:16},orientation:"vertical"}),jsx(L,{variant:"secondary",size:"xxs",icon:PlusIcon,...v,className:"BaselineUI-NumberInput-DecrementButton"})]}):null]}),o==="top"&&C]})]})});Ve.displayName="NumberInput";var to=ht.forwardRef(({className:e,style:t,onChange:o,onChangeEnd:r,numberFormatOptions:a,isDisabled:n,step:i,minValue:s,maxValue:l,value:p,"aria-label":c,"aria-labelledby":u,"aria-details":m,"aria-describedby":d,"data-block-id":b,"data-block-class":y,defaultValue:f,isReadOnly:g,label:v,id:_,includeNumberInput:h},x)=>{let w=ht.useRef(null),C={onChange:o===void 0?void 0:R=>{o(R[0]);},isDisabled:n||g,step:i,minValue:s,maxValue:l,onChangeEnd:r===void 0?void 0:R=>{r(R[0]);},value:p===void 0?void 0:[p],defaultValue:f===void 0?void 0:[f],"aria-label":c,"aria-labelledby":u,"aria-details":m,"aria-describedby":d,id:_,label:v},I=useNumberFormatter(a),P=useSliderState({...C,numberFormatter:I}),{trackProps:S,groupProps:k,labelProps:T}=useSlider(C,P,w),$=jsx(Ve,{variant:"ghost",showStepper:false,"aria-label":c,"aria-labelledby":T.id,value:P.getThumbValue(0),formatOptions:a,onChange:R=>{P.setThumbValue(0,R);},style:{width:55,textAlign:"right",flexShrink:0}});return jsxs("div",{...k,style:t,"data-block-id":b,"data-block-class":y,className:classNames(Vp,"BaselineUI-Slider",e),children:[v?jsxs("div",{className:qp,children:[jsx("label",{...T,className:classNames(Kp({isDisabled:n,hasNumberInput:!!h}),"BaselineUI-Slider-Label"),children:v}),h?$:null]}):null,jsxs("div",{className:Up,children:[jsx("div",{...S,className:classNames(Yp,"BaselineUI-Slider-Track"),ref:M(w,x),"data-testid":"track",children:jsx(oz,{state:P,trackRef:w,isDisabled:n,isReadOnly:g})}),h&&!v?$:null]})]})});to.displayName="Slider";function oz({state:e,trackRef:t,isDisabled:o,isReadOnly:r}){let a=ht.useRef(null),{thumbProps:n,inputProps:i,isDragging:s}=useSliderThumb({trackRef:t,inputRef:a},e),{focusProps:l,isFocused:p,isFocusVisible:c}=useFocusRing(),{hoverProps:u,isHovered:m}=useHover({isDisabled:o}),d=filterTruthyValues({"data-disabled":o,"data-readonly":r,"data-hovered":m,"data-focus-visible":c,"data-dragging":s,"data-focused":p});return jsxs(Fragment,{children:[jsx("div",{className:classNames(Xp({isDisabled:o,isFocusVisible:c,active:s,isHovered:m}),"BaselineUI-Slider-TrackHighlight"),style:{width:n.style?.left},"data-testid":"track-highlight"}),jsxs("div",{...mergeProps(n,u,d),className:classNames(Wp,"BaselineUI-Slider-ThumbHandle"),"data-testid":"thumb",children:[jsx("div",{className:classNames(Gp({isDisabled:o,isFocusVisible:c,active:s,isReadOnly:r,isHovered:m}),"BaselineUI-Slider-Thumb")}),jsx(VisuallyHidden,{children:jsx("input",{ref:a,...mergeProps(i,l)})})]})]})}var Dc=z({defaultClassName:"_1tkzayn0 _1yep5z6dy",variantClassNames:{size:{sm:"_1tkzayn1",md:"_1tkzayn2",lg:"_1tkzayn3"},type:{subtitle:"_1yep5z610x",title:"_1yep5z610x",label:"_1yep5z610y",value:"_1yep5z610y",helper:"_1yep5z610z",body:"_1yep5z610x"}},defaultVariants:{},compoundVariants:[[{type:"title",size:"sm"},"_1yep5z61lj"],[{type:"title",size:"md"},"_1yep5z61lm"],[{type:"title",size:"lg"},"_1yep5z61lp"],[{type:"body",size:"sm"},"_1yep5z61m9"],[{type:"body",size:"md"},"_1yep5z61mc"],[{type:"body",size:"lg"},"_1yep5z61mc"],[{type:"subtitle",size:"sm"},"_1yep5z61m5"],[{type:"subtitle",size:"md"},"_1yep5z61m8"],[{type:"subtitle",size:"lg"},"_1yep5z61m8"],[{type:"label",size:"md"},"_1yep5z61m7"],[{type:"label",size:"lg"},"_1yep5z61m7"],[{type:"value",size:"md"},"_1yep5z61m7"],[{type:"value",size:"lg"},"_1yep5z61m7"],[{type:"helper",size:"sm"},"_1yep5z61m1"]]});var te=ht.forwardRef(({elementType:e="span",type:t="title",children:o,size:r="md",...a},n)=>jsx(e,{...a,className:classNames(Dc({size:r,type:t}),"BaselineUI-Text",a.className),ref:n,children:o}));te.displayName="Text";var Mc=z({defaultClassName:"siobe20 _1yep5z6ao _1yep5z6ap _1yep5z6aq _1yep5z6bc _1yep5z6bd _1yep5z6be _1yep5z6d7 _1yep5z6m1 _1yep5z6lz _1yep5z6h4 _1yep5z6lq _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j4 _1yep5z6j5 _1yep5z6j6",variantClassNames:{background:{subtle:"_1yep5z6124",medium:"_1yep5z6125"},isFocusVisible:{true:"_1yep5z617u _1yep5z617w _1yep5z617x _1yep5z6140"}},defaultVariants:{},compoundVariants:[]}),Nc="siobe24";var va=ht.forwardRef(({className:e,style:t,children:o,background:r="medium",title:a,action:n,"data-block-id":i,"data-block-class":s,onCloseRequest:l,contentStyle:p,contentClassName:c,...u},m)=>{let{formatMessage:d}=A(),b=ht.useRef(null),{dialogProps:y,titleProps:f}=useDialog(u,b),{focusProps:g,isFocusVisible:v}=useFocusRing();return jsxs("div",{...mergeProps(y,g),className:classNames(Mc({background:r,isFocusVisible:v}),"BaselineUI-Drawer",e),"data-block-id":i,"data-block-class":s,style:t,ref:M(m,b),children:[jsxs(D,{paddingLeft:"lg",paddingRight:"sm",backgroundColor:"background.primary.subtle",display:"flex",justifyContent:"space-between",alignItems:"center",gap:"lg",className:Nc,children:[jsx(te,{type:"title",size:"sm",...f,className:xc,children:a}),jsxs(D,{children:[n?jsx(L,{...n,variant:"secondary"}):null,jsx(L,{variant:"secondary",size:"md",icon:XIcon,onPress:l,"aria-label":d(dz.close)})]})]}),jsx(q,{variant:r==="subtle"?"primary":"secondary"}),jsx(D,{display:"flex",flexDirection:"column",flex:1,style:{overflow:"auto",...p},className:classNames(c,"BaselineUI-Drawer-Content"),children:o})]})});va.displayName="Drawer";var dz=W({close:{id:"close",defaultMessage:"Close"}});var Bc="aml2vl8 _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6ij _1yep5z6ik _1yep5z6il",Ac="_1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7",Fc=z({defaultClassName:"aml2vl3 _1yep5z6lg _1yep5z6lh _1yep5z6lj _1yep5z6li _1yep5z6is _1yep5z6it _1yep5z6iu",variantClassNames:{enableDrawer:{false:"_1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6kd _1yep5z6ke _1yep5z6kf",true:"aml2vl5"},shouldContainOverlays:{true:"aml2vl6",false:"aml2vl7"}},defaultVariants:{},compoundVariants:[]}),jc=z({defaultClassName:"aml2vl0 _1yep5z6lg _1yep5z6lh _1yep5z6lj _1yep5z6li _1yep5z6gb",variantClassNames:{shouldContainOverlays:{true:"aml2vl1",false:"aml2vl2"}},defaultVariants:{},compoundVariants:[]});var Pt=ht.createContext({state:null,triggerProps:{},overlayProps:{}}),Ee=({children:e,...t})=>{let o=useOverlayTriggerState(t),{triggerProps:r,overlayProps:a}=useOverlayTrigger({type:"dialog"},o),n=useMemo(()=>({state:o,triggerProps:r,overlayProps:a}),[o,r,a]);return jsx(Pt.Provider,{value:n,children:e})};Ee.displayName="Modal";function Kc(e,t,o){let[r,a]=useState({}),n=useRef(false),[i,s]=useState(null),{container:l,shouldContainOverlays:p,isContainerPositioned:c,containerHeight:u,portalContainer:m}=useContext(He);useEffect(()=>{if(!e)return;let f=re(e),g=f.visualViewport,v=()=>{let _=o?g?.height??f.innerHeight:f.innerHeight,h=f.innerHeight-_;if(n.current=o?h>60:false,n.current){let x=getActiveElement(e);x&&isInputThatOpensKeyboard(x)&&x.scrollIntoView({behavior:"smooth",block:"center"});}if(t)a({maxHeight:(_||0)*.8,bottom:h});else {let x=`${_||0}px`,w=p?`min(${x}, ${u?u+"px":x})`:x;a({maxHeight:`calc(${w} - (2 * ${themeVars.spacing.xl} + env(safe-area-inset-top) + env(safe-area-inset-bottom)))`,top:n.current?`calc(env(safe-area-inset-top) + ${themeVars.spacing.xl})`:void 0});}};return v(),g?.addEventListener("resize",v),f.addEventListener("resize",v),()=>{g?.removeEventListener("resize",v),f.removeEventListener("resize",v);}},[e,t,p,o,u]);let d=m&&!l?.contains(m);useEffect(()=>{if(!l||!p||c&&!d)return;let f=()=>{l&&s(getAbsoluteBounds(l));};f();let g=new ResizeObserver(()=>{f();});return g.observe(l),()=>{g.disconnect();}},[l,p,c,d]);let b=useMemo(()=>({...r,overflow:"auto",position:"relative"}),[r]),y=useMemo(()=>{if(!t&&n.current)return {alignItems:"flex-start"};if(p&&(!c||d)){let f=i||(l?getAbsoluteBounds(l):{x:0,y:0,height:0,width:0});return {position:"absolute",left:f.x,top:f.y,height:f.height,width:f.width}}return {}},[t,n.current,l,c,p,i,d]);return {dialogStyle:b,containerStyle:y}}var Di=ht.createContext({isDrawer:false,closeDrawer:()=>{},dialogStyle:{},setDialogElement:()=>{},isWithinModal:false}),Mi=ht.createContext({setIsPopoverSafelyClosed:()=>{}}),Ue=({children:e,className:t,style:o,isDismissable:r=true,isKeyboardDismissDisabled:a=false,portalContainer:n,disableAnimation:i,enableDrawer:s=false,"data-block-id":l,"data-block-class":p,shouldCloseOnInteractOutside:c,shouldAnimateOnMount:u=true})=>{let{state:m}=ht.useContext(Pt),[d,b]=ht.useState(true),y=ht.useRef(null),[f,g]=ht.useState(null),{shouldHandleVirtualKeyboard:v}=useContext(Jt),{shouldContainOverlays:_,container:h,portalContainer:x}=useContext(He),w=Ne(),C=typeof s=="boolean"&&s||s==="auto"&&w==="mobile";invariant(m,"ModalContent must be a child of Modal");let I=ht.useRef(null),P=typeof r=="function"?r(C):r,S=typeof a=="function"?a(C):a,{modalProps:k,underlayProps:T}=useModalOverlay({isDismissable:d&&P,shouldCloseOnInteractOutside:H=>{let Q=n||x;return !h?.contains(H)&&_&&!Q?.contains(H)?false:c?.(H)??true},isKeyboardDismissDisabled:S},m,I),{dialogStyle:$,containerStyle:R}=Kc(f,C,v),N=useMemo(()=>({isDrawer:C,closeDrawer:m.close,dialogStyle:$,dialogRef:y,setDialogElement:g,isWithinModal:true}),[C,m.close,$,y,g]),E=useMemo(()=>({setIsPopoverSafelyClosed:b}),[b]),F={duration:.3,type:"tween",ease:"easeOut"},B={type:"spring",duration:.3},j={open:{opacity:1,transform:C?"translateY(0%)":"scale(1)"},closed:i?{opacity:1,transform:C?"translateY(0%)":"scale(1)"}:{opacity:0,transform:C?"translateY(100%)":"scale(0.95)"}};return jsx(AnimatePresence,{initial:u&&!i,children:m.isOpen?jsx(Di.Provider,{value:N,children:jsx(Mi.Provider,{value:E,children:jsxs(Ce,{className:classNames(Fc({enableDrawer:C,shouldContainOverlays:_}),t),"data-block-id":l,"data-block-class":p,style:{...o,...R},portalContainer:n,children:[jsx(motion.div,{...T,variants:{open:{opacity:1},closed:{opacity:i?1:0}},initial:"closed",animate:"open",exit:"closed","data-testid":"underlay",transition:F,className:classNames(jc({shouldContainOverlays:_}),"BaselineUI-Modal-Underlay")}),jsx(motion.div,{...k,ref:I,"data-drawer":C,className:classNames(C?Bc:Ac,"BaselineUI-Modal-Content"),variants:j,transition:C?F:B,initial:"closed",animate:"open",exit:"closed",children:typeof e=="function"?e(m):e})]})})}):null})};var Xc="var(--cjv3et0)",Zc=z({defaultClassName:"cjv3et1 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6g1 _1yep5z6lz _1yep5z6m1",variantClassNames:{size:{sm:"cjv3et2",md:"cjv3et3",lg:"cjv3et4",content:"cjv3et5"},variant:{primary:"_1yep5z6137",ghost:"cjv3et7"},overlayType:{modal:"cjv3et8",popover:"cjv3et9"},isDrawer:{true:"cjv3eta _1yep5z6yi _1yep5z6yj _1yep5z6yk _1yep5z6z6 _1yep5z6z7 _1yep5z6z8 _1yep5z617q"},isFocusVisible:{true:"_1yep5z61q3 _1yep5z61tx _1yep5z61tz _1yep5z61u1"}},defaultVariants:{},compoundVariants:[]});var Ei=ht.createContext({titleProps:{}}),Pe=ht.forwardRef(({children:e,className:t,style:o,inheritDrawer:r,size:a="md",variant:n="primary","data-block-id":i,"data-block-class":s,drawerBackground:l,...p},c)=>{let u=ht.useRef(null),m=ht.useRef(null),{containerWidth:d,shouldContainOverlays:b}=useContext(He),{isDrawer:y,closeDrawer:f,dialogStyle:g,setDialogElement:v,isWithinModal:_}=useContext(Di),[h,x]=ht.useState(""),{focusProps:w,isFocusVisible:C}=useFocusRing();useLayoutEffect(()=>{let k=m.current?.getRootNode(),T=p["aria-label"]||"";p["aria-labelledby"]&&(T=k?.querySelector(`#${p["aria-labelledby"].replaceAll(":",String.raw`\:`)}`)?.textContent||""),x(T);},[p]);let{dialogProps:I,titleProps:P}=useDialog(p,u),S=useMemo(()=>({titleProps:P}),[P]);return y&&r?jsx(va,{title:h,onCloseRequest:f,className:t,style:g,...p,"data-drawer":true,"data-block-id":i,"data-block-class":s,ref:M(m,c,k=>{v(k);}),background:l,children:e}):jsx(Ei.Provider,{value:S,children:jsx("section",{...mergeProps(I,w),"data-block-id":i,"data-block-class":s,"data-focus-visible":C,"data-overlay-type":_?"modal":"popover",ref:M(u,c,k=>{v(k);}),style:{...g,...o,...assignInlineVars({[Xc]:d&&b?`${d}px`:"100vw"})},className:classNames(Zc({size:y?"content":a,variant:n,isDrawer:y,isFocusVisible:C,overlayType:_?"modal":"popover"}),"BaselineUI-Dialog",t),children:e})})});Pe.displayName="Dialog";var Qc=ht.forwardRef(({children:e,className:t,style:o},r)=>{let{titleProps:a}=useContext(Ei);return ht.isValidElement(e)?ht.cloneElement(e,{...a,ref:r,className:classNames(e.props.className,t),style:{...e.props.style,...o}}):jsx("h3",{...a,ref:r,className:t,style:o,children:e})});Qc.displayName="DialogTitle";var td=({children:e,isOpen:t,popoverContentRef:o,portalContainer:r=document.body,style:a})=>{let[n,i]=useState(false),[s,l]=useState(null),p=useRef(null),{setIsPopoverSafelyClosed:c}=useContext(Mi);useEffect(()=>{t?(i(true),p.current&&clearTimeout(p.current)):p.current=setTimeout(()=>{i(false);},300);},[t]),useEffect(()=>()=>{p.current&&clearTimeout(p.current);},[]);let u=o.current;return useEffect(()=>{u&&l(u.getBoundingClientRect());},[u]),useEffect(()=>{c(!n);},[n,c]),jsxs(Fragment,{children:[n?Bz.createPortal(jsx("div",{style:{position:"absolute",left:a?.left,top:a?.top,width:s?.width,height:s?.height,zIndex:a?.zIndex?+a.zIndex-1:void 0},className:"BaselineUI-Popover-ClickPreventionLayer"}),r):null,e]})};var{color:oo}=themeVars,we=ht.forwardRef(({portalClassName:e,portalStyle:t,className:o,style:r,state:a,overlayProps:n,underlayClassName:i,children:s,includeArrow:l=false,offset:p=2,portalContainer:c,contentContainerClassName:u,contentContainerStyle:m,"data-block-id":d,"data-block-class":b,...y},f)=>{let g=ht.useRef(null),v=xe(c),_=l?8:0,{underlayProps:h,popoverProps:x,placement:w,arrowProps:C}=usePopover({...y,offset:p+_,popoverRef:g,containerPadding:y.containerPadding||0},a);delete x.style?.position;let I=w==="center"?"bottom":w,P=useMemo(()=>({isOpen:a.isOpen}),[a.isOpen]),{transitionProps:S}=aa({placement:w}),k=useMemo(()=>({...x.style,...assignInlineVars({[Lp]:`${y.triggerRef?.current?.offsetWidth}px`}),...ui(r,P)}),[x.style,y.triggerRef,r,P]);return jsx(td,{isOpen:a.isOpen,popoverContentRef:g,portalContainer:v,style:x.style,children:a.isOpen?jsxs(Ce,{portalContainer:v,style:t,className:e,ref:f,"data-block-id":d,"data-block-class":b,children:[!y.isNonModal&&jsx("div",{...h,className:classNames(Ep,qr(i,P),"BaselineUI-Popover-Underlay")}),jsxs(motion.div,{...mergeProps(x,S),style:k,ref:M(g,f),className:classNames(Dp,"BaselineUI-Popover-ContentContainer",qr(o,P)),"data-placement":["top","bottom","left","right"].filter(T=>w?.includes(T)),children:[l?jsxs(Fragment,{children:[jsxs("svg",{className:classNames(Tp({placement:I}),"BaselineUI-PopoverContent-Arrow"),...C,style:{...C.style,position:"absolute"},width:"15",height:"9",viewBox:"0 0 15 9",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M.019 0h1.228l6.272 7.237L13.791 0h1.228v1h-.772L7.519 8.763.791 1H.019V0Z",fill:oo.border.medium}),jsx("path",{d:"M7.504 6.492 2.248.488h10.511L10.132 3.49 7.504 6.492Z",fill:oo.background.primary.subtle,stroke:oo.background.primary.subtle})]}),jsxs("svg",{className:classNames(Sp({placement:I}),"BaselineUI-PopoverContent-Arrow-Focused"),width:"15",height:"11",viewBox:"0 0 15 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",...C,style:{...C.style,position:"absolute"},children:[jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.543371 2H0V0H1.45663L7.5 6.97312L13.5434 0H15V2H14.4566L7.5 10.0269L0.543371 2Z",fill:oo.border.interactive.enabled}),jsx("path",{d:"M7.504 6.492 2.248.488h10.511L10.132 3.49 7.504 6.492Z",fill:oo.background.primary.subtle,stroke:oo.background.primary.subtle})]})]}):null,jsx(DismissButton,{onDismiss:a.close}),jsx("div",{...n,style:ui(m,P),className:classNames(Mp,qr(u,P),"BaselineUI-Popover-Content"),children:typeof s=="function"?s(a):s}),jsx(DismissButton,{onDismiss:a.close})]})]}):null})});we.displayName="PopoverContentCore";var Le=ht.forwardRef((e,t)=>{let{state:o,overlayTriggerAria:{overlayProps:r},triggerRef:a}=useContext(Vo);return invariant(a),o?jsx(we,{ref:t,...e,triggerRef:e.triggerRef||a,overlayProps:r,state:o}):null});Le.displayName="PopoverContent";var ro=({icon:e,tooltip:t,label:o,...r})=>{let{tooltipProps:a}=ze({label:o,tooltip:t,offset:9});return jsx(J,{...a,children:({triggerProps:n,triggerRef:i})=>jsx(D,{display:"inline-flex",...n,ref:i,children:jsx(e,{...r})})})};var sd=ht.forwardRef(({className:e,style:t,onChange:o,"data-block-id":r,icon:a,formatValue:n=m=>m,tooltip:i=true,iconTooltip:s=true,popoverContentProps:l,isDisabled:p,...c},u)=>{let m=ae(u),[d,b]=useControlledState(c.value,c.defaultValue||0,o),[y,f]=ht.useState(false),{keyboardProps:g}=useKeyboard({onKeyDown:x=>{(x.key==="Enter"||x.key==="Escape")&&f(false);}}),{tooltipProps:v}=ze({label:c["aria-label"],tooltip:i}),_=n(d||0),h=v?.isDisabled||c["aria-label"]?`${c["aria-label"]}, ${_}`:_.toString();return jsxs(D,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:classNames("BaselineUI-IconSlider",e),"data-block-id":r,style:t,ref:m,children:[a?jsx(ro,{icon:a,label:c["aria-label"],tooltip:s,"aria-hidden":"true",size:24,className:sprinkles({color:"icon.primary"})}):null,jsxs(je,{type:"dialog",isOpen:y,onOpenChange:f,children:[jsx(Oe,{children:jsx(J,{...v,children:jsx(K,{label:_,variant:"popover","aria-label":h,isDisabled:p,style:{fontVariantNumeric:"tabular-nums",minWidth:68,justifyContent:"space-between"}})})}),jsx(Le,{placement:"bottom start",...l,children:jsx(Pe,{size:"content","aria-label":h,children:jsx(FocusScope,{autoFocus:true,children:jsx(D,{paddingY:"sm",paddingX:"lg",marginY:"md",style:{width:215},...g,children:jsx(to,{...c,onChange:x=>{b(x),o?.(x);},value:d})})})})})]})]})});sd.displayName="IconSlider";var ld=z({defaultClassName:"bpklwa7",variantClassNames:{isReadOnly:{true:"bpklwa8"},isDisabled:{true:"bpklwa9"},isSelected:{true:"bpklwaa"},isFocused:{true:"bpklwab"}},defaultVariants:{},compoundVariants:[[{isSelected:true,isDisabled:false,isReadOnly:false},"bpklwac"]]}),pd=z({defaultClassName:"bpklwae",variantClassNames:{isDisabled:{true:"bpklwaf"},isSelected:{true:"bpklwag"},isReadOnly:{true:"bpklwah"}},defaultVariants:{},compoundVariants:[]}),cd="bpklwad",dd=z({defaultClassName:"bpklwa0",variantClassNames:{labelPosition:{top:"bpklwa1",left:"bpklwa2"}},defaultVariants:{},compoundVariants:[]}),ud="bpklwa6",md=z({defaultClassName:"bpklwa3",variantClassNames:{labelPosition:{top:"bpklwa4",left:"bpklwa5"}},defaultVariants:{},compoundVariants:[]});var gd=ht.forwardRef(({className:e,label:t,labelPosition:o="top",statusLabel:r,style:a,"data-block-id":n,"data-block-class":i,...s},l)=>{let p=ht.useRef(null),c=useToggleState(s),{inputProps:u,isPressed:m}=useSwitch({...s,children:t},c,p),{isFocusVisible:d,focusProps:b}=useFocusRing(),{hoverProps:y,isHovered:f}=useHover({isDisabled:s.isDisabled}),g=filterTruthyValues({"data-block-id":n,"data-block-class":i,"data-focused":d,"data-disabled":s.isDisabled,"data-focus-visible":d,"data-selected":c.isSelected,"data-readonly":s.isReadOnly,"data-hovered":f,"data-pressed":m}),v=jsx("div",{className:classNames(ld({isSelected:c.isSelected,isDisabled:!!s.isDisabled,isFocused:d,isReadOnly:!!s.isReadOnly}),"BaselineUI-Switch-Track"),children:jsx("div",{className:classNames(pd({isSelected:c.isSelected,isDisabled:s.isDisabled,isReadOnly:s.isReadOnly}),"BaselineUI-Switch-Knob"),"data-testid":"switch-knob"})});return jsxs("label",{...mergeProps(g,y),className:classNames(dd({labelPosition:o}),"BaselineUI-Switch",e),style:a,ref:l,children:[t?jsx("span",{className:classNames(cd,"BaselineUI-Switch-Label"),children:t}):null,jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(u,b),ref:p})}),r?jsxs("div",{className:md({labelPosition:o}),children:[jsx("span",{className:classNames("BaselineUI-Switch-Status-Label",ud),children:c.isSelected?r.on:r.off}),v]}):v]})});gd.displayName="Switch";var vd="_19n40yy9",_d=z({defaultClassName:"_19n40yy0",variantClassNames:{size:{lg:"_19n40yy1",md:"_19n40yy2",sm:"_19n40yy3"},variant:{primary:"_19n40yy4",ghost:"_19n40yy5"},isFocused:{true:"_19n40yy6"},hasText:{true:"_19n40yy7"},isDisabled:{true:"_19n40yy8"}},defaultVariants:{},compoundVariants:[]});var gh={sm:SearchIcon$1,md:SearchIcon,lg:SearchIcon},xd=ht.forwardRef(({className:e,size:t="md",variant:o="primary","data-block-id":r,"data-block-class":a,style:n,...i},s)=>{let l=ht.useRef(null),p=useSearchFieldState(i),{inputProps:c,clearButtonProps:u}=useSearchField({...i,"aria-haspopup":false,"aria-autocomplete":"none",type:"search"},p,l),{focusProps:m,isFocusVisible:d,isFocused:b}=useFocusRing({within:true,isTextInput:true}),y=gh[t],f=t==="sm"?XIcon$1:XIcon$2,g=filterTruthyValues({"data-block-id":r,"data-block-class":a,"data-focused":b,"data-disabled":i.isDisabled,"data-focus-visible":d});return jsxs("div",{...g,className:classNames(_d({size:t,isFocused:b,variant:o,hasText:!!p.value,isDisabled:i.isDisabled}),"BaselineUI-SearchInput",e),style:n,ref:s,children:[jsx(y,{size:t==="sm"?20:24}),jsx("input",{...mergeProps(c,m),className:vd,ref:l}),p.value!==""&&jsx(L,{icon:f,...u,size:t==="sm"?"xs":"sm",variant:"secondary"})]})});xd.displayName="SearchInput";var Cd="xyd2ss1 _1yep5z613 _1yep5z614 _1yep5z615 _1yep5z63f _1yep5z63g _1yep5z63h _1yep5z64l _1yep5z64m _1yep5z64n _1yep5z629 _1yep5z62a _1yep5z62b _1yep5z65r _1yep5z65s _1yep5z65t _1yep5z683 _1yep5z684 _1yep5z685 _1yep5z699 _1yep5z69a _1yep5z69b _1yep5z66x _1yep5z66y _1yep5z66z _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6ls _1yep5z6lr _1yep5z6i0 _1yep5z6lv _1yep5z6g1",Pd="xyd2ss0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z64l _1yep5z64m _1yep5z64n _1yep5z629 _1yep5z62a _1yep5z62b";var Fi=({section:e,showSelectedIcon:t,state:o})=>{let{itemProps:r,groupProps:a,headingProps:n}=useMenuSection({heading:e.value?.title,"aria-label":e["aria-label"]});return jsxs(Fragment,{children:[e.key!==o.collection.getFirstKey()&&jsx(q,{elementType:"li"}),jsxs("li",{...r,children:[e.value?.title?jsx(VisuallyHidden,{children:jsx("span",{...n,children:e.value.title})}):null,jsx("ul",{...a,className:Pd,children:[...e.childNodes].map(i=>(invariant(i.type==="item"),jsx(za,{item:i,state:o,showSelectedIcon:t},i.key)))})]})]})};Fi.displayName="MenuSection";var za=({item:e,state:t,className:o,showSelectedIcon:r})=>{let a=ht.useRef(null),n=useMenuItem({key:e.key},t,a),{isFocusVisible:i,focusProps:s}=useFocusRing();return jsx(Oo,{item:e,liProps:mergeProps(n.menuItemProps,s,{className:o}),...n,isFocusVisible:i,ref:a,description:e.value?.keyboardShortcut,descriptionProps:n.keyboardShortcutProps,_state:t,showSelectedIcon:r})};za.displayName="MenuItem";var Oi=ht.forwardRef(({className:e,itemClassName:t,onContentKeyDown:o,...r},a)=>{let n=useTreeState(r),i=ht.useRef(null),{menuProps:s}=useMenu(r,n,i),{keyboardProps:l}=useKeyboard({onKeyDown:o});return jsx("ul",{...mergeProps(s,l),className:classNames(Cd,e),ref:M(i,a),children:[...n.collection].map(p=>p.type==="section"?jsx(Fi,{section:p,state:n,showSelectedIcon:r.selectionMode==="multiple"||r.selectionMode==="single"},p.key):jsx(za,{item:p,state:n,className:t,showSelectedIcon:r.selectionMode==="multiple"||r.selectionMode==="single"},p.key))})});Oi.displayName="MenuContent";var Id=z({defaultClassName:"_1mdhlqv8",variantClassNames:{isOpen:{true:"_1mdhlqv9"}},defaultVariants:{},compoundVariants:[]}),at="_1mdhlqvb cjv3et1 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6g1 _1yep5z6lz _1yep5z6m1 _1yep5z6137 cjv3et5",Rd=z({defaultClassName:"_1mdhlqv0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6eu _1yep5z6kj _1yep5z6kk _1yep5z6kl _1yep5z6dy",variantClassNames:{isFocused:{false:"_1mdhlqv1"},isOpen:{true:"_1mdhlqv2"},isDisabled:{true:"z9nup82 _1yep5z6ey"},isHovered:{true:"_1mdhlqv4"},variant:{primary:"_1mdhlqv5",ghost:"_1mdhlqv6"},isReadOnly:{true:"_1mdhlqv7"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isHovered:true,isReadOnly:false,isDisabled:false},"_1yep5z6h5"],[{isHovered:true,isReadOnly:false,isDisabled:false},"_1yep5z6la"]]}),$d="_1yep5z66x _1yep5z66y _1yep5z66z",Td="_1mdhlqva _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z69i _1yep5z69j _1yep5z69k";var ha=ht.forwardRef(({defaultOpen:e,onOpenChange:t,isOpen:o,isDisabled:r,contentClassName:a,placement:n="bottom start",isNonModal:i,shouldFlip:s,shouldUpdatePosition:l,boundaryElement:p,crossOffset:c,offset:u,triggerLabel:m,renderTrigger:d=({buttonProps:g,ref:v})=>jsx(K,{...g,variant:"popover",ref:v}),portalContainer:b,...y},f)=>{let g=ht.useRef(null),v=xe(b),_=useMenuTriggerState({defaultOpen:e,isOpen:o,onOpenChange:t}),{menuTriggerProps:h,menuProps:x}=useMenuTrigger({isDisabled:r,type:"menu"},_,g),w=pe(),C=useMemo(()=>mergeProps(h,{isDisabled:r,isSelected:_.isOpen,className:"BaselineUI-Menu-Trigger",label:typeof m=="function"?m(_.isOpen):m}),[h,r,_.isOpen,m]);return useEffect(()=>{!m&&!d&&console.warn("The `triggerLabel` prop is required when no `renderTrigger` or `children` is provided.");},[d,m]),jsxs(Fragment,{children:[d({buttonProps:C,ref:g}),jsx(we,{triggerRef:g,state:_,placement:n,isNonModal:i,shouldFlip:s,shouldUpdatePosition:l,boundaryElement:p,crossOffset:c,offset:u||2,className:"BaselineUI-Menu-Popover",portalContainer:v,children:jsx(Oi,{className:classNames(at,a),...x,...y,ref:f,autoFocus:_.focusStrategy||"first",children:w})})]})});ha.displayName="Menu";var xa=z({defaultClassName:"_13f0naj0",variantClassNames:{variant:{default:"_13f0naj1",inline:"_13f0naj2"},isHovered:{true:"_13f0naj3"},isFocusVisible:{true:"_13f0naj4"},isDisabled:{true:"_13f0naj5"},size:{sm:"_13f0naj6",md:"_13f0naj7",lg:"_13f0naj8"},type:{body:"_13f0naj9",label:"_13f0naja"},isActive:{true:"_13f0najb"}},defaultVariants:{},compoundVariants:[[{isActive:true,isDisabled:false},"_13f0najc"],[{type:"body",size:"sm"},"_13f0najd"],[{type:"body",size:"md"},"_13f0naje"],[{type:"body",size:"lg"},"_13f0najf"],[{type:"label",size:"sm"},"_13f0najg"],[{type:"label",size:"md"},"_13f0najh"],[{type:"label",size:"lg"},"_13f0naji"]]});var Md=ht.forwardRef(({className:e,style:t,children:o,variant:r="default",size:a="md",elementType:n="a",type:i="body","data-block-id":s,"data-block-class":l,title:p,role:c,...u},m)=>{let d=ht.useRef(null),{linkProps:b,isPressed:y}=useLink({...u,elementType:u.onPress?"span":n},d),{isFocusVisible:f,isFocused:g,focusProps:v}=useFocusRing(),{hoverProps:_,isHovered:h}=useHover({isDisabled:u.isDisabled}),x=n,w=filterTruthyValues({"data-block-id":s,"data-block-class":l,"data-disabled":u.isDisabled,"data-focused":g,"data-pressed":y,"data-focus-visible":f,"data-hovered":h,role:c,title:p});return jsx(x,{...mergeProps(b,v,_,w),className:classNames(xa({variant:r,isFocusVisible:f,isHovered:h,isDisabled:u.isDisabled,size:a,isActive:y,type:i}),"BaselineUI-Link",e),ref:M(d,m),style:t,children:o})});Md.displayName="Link";function Nd({isDisabled:e,onValueChange:t,onChange:o,name:r,"aria-describedby":a,"aria-label":n,accept:i,multiple:s}){let l=useId(),p=useId(),c=useId();return {inputProps:{type:"file",id:p,disabled:!!e,"aria-labelledby":n?void 0:l,"aria-describedby":a||c,"aria-label":n,onChange:m=>{let d=[...m.target.files||[]];t?.(d),o?.(m);},name:r,accept:i,multiple:s},labelProps:{htmlFor:p,id:l},descriptionProps:{id:c}}}async function Ui({items:e}){let t=e.filter(o=>o.kind==="file").map(async o=>(invariant(o.kind==="file"),o.getFile()));return await Promise.all(t)}var Ed=z({defaultClassName:"_180w5ed0",variantClassNames:{variant:{default:"_180w5ed1",inline:"_180w5ed2"},hoveredOrFocusedOrActive:{true:"_180w5ed3"},disabled:{true:"_180w5ed4"}},defaultVariants:{},compoundVariants:[[{variant:"inline",hoveredOrFocusedOrActive:true},"_180w5ed5"],[{variant:"default",hoveredOrFocusedOrActive:true},"_180w5ed6"],[{variant:"default",disabled:true},"_180w5ed7"],[{variant:"inline",disabled:true},"_180w5ed8"]]}),Ld=z({defaultClassName:"_180w5ede",variantClassNames:{disabled:{true:"_180w5edf"}},defaultVariants:{},compoundVariants:[]}),Bd=z({defaultClassName:"_180w5ed9",variantClassNames:{disabled:{true:"_180w5eda"}},defaultVariants:{},compoundVariants:[]}),Ad=z({defaultClassName:"_180w5edb",variantClassNames:{disabled:{true:"_180w5edc"},hovered:{true:"_180w5edd"}},defaultVariants:{},compoundVariants:[]});var Hd=ht.forwardRef(({className:e,label:t,description:o,icon:r,variant:a="default",...n},i)=>{let s=ht.useRef(null),{inputProps:l,descriptionProps:p,labelProps:c}=Nd(n),{dropProps:u}=useDrop({ref:s,onDrop:async({items:f})=>{let g=f.filter(_=>_.kind==="file").map(async _=>(invariant(_.kind==="file"),_.getFile())),v=await Promise.all(g);n.onValueChange?.(v);}}),{focusProps:m,isFocusVisible:d}=useFocusRing(),{hoverProps:b,isHovered:y}=useHover({isDisabled:n.isDisabled});return jsxs("label",{...mergeProps(u,b,c),className:classNames(Ed({variant:a,disabled:n.isDisabled,hoveredOrFocusedOrActive:y||d}),e),ref:M(i,s),children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(m,l)})}),r?jsx(r,{size:20,className:Bd({disabled:n.isDisabled})}):null,jsxs("div",{children:[jsx("div",{className:Ad({disabled:n.isDisabled,hovered:y}),children:t}),o?jsx("div",{...p,className:Ld({disabled:n.isDisabled}),children:o}):null]})]})});Hd.displayName="FileUpload";var Vd="_1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j4 _1yep5z6j5 _1yep5z6j6 _1yep5z6ln",Ud="_1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6kj _1yep5z6kk _1yep5z6kl",qd=z({defaultClassName:"_12vfhl44",variantClassNames:{variant:{success:"_1yep5z611s",error:"_1yep5z611o",active:"_1yep5z6120"}},defaultVariants:{},compoundVariants:[]}),Kd="_1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6ev _1yep5z6dy",Gd="_12vfhl43 _1yep5z6g3 _1yep5z6ln",Wd="_12vfhl42 _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z69i _1yep5z69j _1yep5z69k",Yd="_1yep5z64l _1yep5z64m _1yep5z64n _1yep5z629 _1yep5z62a _1yep5z62b _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k",Xd=z({defaultClassName:"_12vfhl40 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6dy _1yep5z6eu",variantClassNames:{hasLabel:{false:"_1yep5z6pi _1yep5z6pj _1yep5z6pk"}},defaultVariants:{},compoundVariants:[]});var Zd=ht.forwardRef(({className:e,style:t,variant:o="active",showValue:r,description:a,errorMessage:n,"data-block-id":i,"data-block-class":s,...l},p)=>{let c=useId(),{labelProps:u,progressBarProps:m}=useProgressBar({...l,"aria-describedby":a?c:l["aria-describedby"]}),{minValue:d=0,maxValue:b=100,value:y=0,label:f}=l,g=(y-d)/(b-d),v=`${Math.round(g*100)}%`,_=jsx("output",{className:Xd({hasLabel:!!f}),children:m["aria-valuetext"]}),h=o==="error"?n:a;return jsxs("div",{...m,style:t,className:classNames(Vd,"BaselineUI-ProgressBar",e),"data-block-id":i,"data-block-class":s,ref:p,children:[f?jsxs("div",{className:Ud,children:[jsx("label",{...u,className:Kd,children:f}),r?_:null]}):null,jsxs("div",{className:Yd,children:[jsxs("div",{className:Wd,children:[jsx("div",{className:Gd,children:jsx("div",{style:{width:v},className:qd({variant:o})})}),!f&&r?_:null]}),h?jsx("div",{className:Kt({hasError:o==="error"}),id:c,children:h}):null]})]})});Zd.displayName="ProgressBar";function io({isReadOnly:e,validationState:t}){return e?ReadOnlyIcon:t==="error"?ErrorCircleFilledIcon:t==="warning"?WarningFilledIcon$1:null}var wt=ht.forwardRef(({labelPosition:e="top",className:t,style:o,labelProps:r,isDisabled:a=false,isReadOnly:n=false,label:i,message:s,"data-block-id":l,validationState:p="valid",isFocused:c=false,variant:u="primary",children:m,fieldProps:d,wrapperRef:b,wrapperClassName:y,isInvalid:f},g)=>{let{hoverProps:v,isHovered:_}=useHover({isDisabled:a}),h=io({isReadOnly:n,validationState:p});return jsxs("div",{className:classNames(ot({labelPosition:e}),t),"data-block-id":l,style:o,ref:g,children:[i||e==="start"&&s?jsxs("div",{className:tt({labelPosition:e,hasMessage:!!s}),children:[jsx(D,{...r,elementType:"label",color:"text.secondary",typography:"label.md.medium",children:i}),e==="start"&&s]}):null,jsxs("div",{className:classNames({[Zt]:a}),children:[jsxs("div",{...mergeProps(d,v),className:classNames(Yt({validationState:f?"error":p,isHovered:_,isFocused:c,variant:u,isReadOnly:n,isDisabled:a}),y),ref:b,children:[m,h?jsx(h,{className:Gt({validationState:p,isReadOnly:n}),size:16}):null]}),e==="top"&&s]})]})});wt.displayName="SharedInput";var nt=ht.forwardRef(({className:e,validationState:t,variant:o="primary",labelPosition:r="top",inputStyle:a,inputClassName:n,"data-block-id":i,"data-block-class":s,...l},p)=>{let c=ht.useRef(null),{inputProps:u,labelProps:m,descriptionProps:d,errorMessageProps:b,validationErrors:y}=useTextField({...l,validationState:t?t==="error"?"invalid":"valid":void 0},c),f=l.errorMessage||y.join(" "),g=he({...l,errorMessage:f,descriptionProps:d,errorMessageProps:b,labelPosition:r});f&&(t="error");let{isFocused:v,focusProps:_,isFocusVisible:h}=useFocusRing(),x=filterTruthyValues({"data-readonly":l.isReadOnly,"data-disabled":l.isDisabled,"data-validation-state":t,"data-focused":v,"data-focus-visible":h});return jsx(wt,{variant:o,labelProps:m,isFocused:v,message:g,ref:p,labelPosition:r,className:classNames("BaselineUI-TextInput",e),validationState:t,"data-block-id":i,"data-block-class":s,...l,children:jsx("input",{...mergeProps(u,_,x),className:classNames(ra({isDisabled:l.isDisabled,labelPosition:r}),"BaselineUI-TextInput-Input",n),style:a,ref:c})})});nt.displayName="TextInput";var so=({value:e,...t})=>{let o=useNumberFormatter(t);return jsx(Fragment,{children:o.format(e)})};so.displayName="NumberFormat";var ou="_1yep5z6iv _1yep5z6iw _1yep5z6ix",ru=z({defaultClassName:"_9b1tml0",variantClassNames:{isSelected:{true:"_9b1tml1",false:"_9b1tml2"},isDisabled:{true:"z9nup82"},isHovered:{true:"_9b1tml4"},isFocusVisible:{true:"_9b1tml5"},isReadOnly:{true:"_9b1tml6"}},defaultVariants:{},compoundVariants:[[{isSelected:true,isFocusVisible:true,isReadOnly:false},"_9b1tml7"],[{isSelected:true,isHovered:true,isDisabled:false,isReadOnly:false},"_9b1tml8"],[{isSelected:false,isHovered:true,isDisabled:false,isReadOnly:false},"_9b1tml9"],[{isSelected:true,isDisabled:true},"_9b1tmla"],[{isSelected:true,isReadOnly:true},"_9b1tmlb"]]}),au=z({defaultClassName:"_9b1tmlf _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6eu _1yep5z6la _1yep5z6e9",variantClassNames:{isSelected:{true:"_9b1tmlg"},size:{sm:"_9b1tmlh",md:"_9b1tmli"},isDisabled:{true:"_9b1tmlj"},isReadOnly:{true:"_1yep5z610x"}},defaultVariants:{},compoundVariants:[[{isSelected:true,isDisabled:false,isReadOnly:false},"_1yep5z61n6"],[{isSelected:true,isDisabled:true},"_1yep5z61n6"],[{isSelected:false,isDisabled:true},"_1yep5z61n4"]]}),nu=z({defaultClassName:"_9b1tmlc",variantClassNames:{isDisabled:{true:"_9b1tmld"},isReadOnly:{true:"_9b1tmle"}},defaultVariants:{},compoundVariants:[]});var lu=ht.forwardRef(({className:e,count:t,style:o,size:r="md",icon:a,"data-block-id":n,"data-block-class":i,...s},l)=>{let p={isRequired:false},c=a||(r==="md"?CheckmarkIcon$1:CheckmarkIcon$2);!s["aria-label"]&&!s["aria-labelledby"]&&console.warn("You must provide either an `aria-label` or `aria-labelledby` prop to the `Reaction` component.");let u=ht.useRef(null),m=useToggleState({...s,...p}),{inputProps:d,isPressed:b,isDisabled:y,isReadOnly:f,isSelected:g}=useSwitch({...s,...p},m,u),{focusProps:v,isFocused:_,isFocusVisible:h}=useFocusRing(),{hoverProps:x,isHovered:w}=useHover({}),C=filterTruthyValues({"data-block-id":n,"data-block-class":i,"data-focused":_,"data-focus-visible":h,"data-disabled":y,"data-hovered":w,"data-pressed":b,"data-selected":g});return jsxs("label",{ref:l,style:o,className:classNames(ou,"BaselineUI-Reaction",e),...C,children:[jsx(VisuallyHidden,{children:jsx("input",{...d,...v,ref:u})}),jsxs("div",{...x,className:ru({isSelected:g,isFocusVisible:h,isHovered:w,isReadOnly:f,isDisabled:y}),children:[jsx("div",{className:nu({isDisabled:y,isReadOnly:f}),children:jsx(c,{size:r==="md"?20:16})}),jsx("div",{className:au({isSelected:m.isSelected,isDisabled:y,isReadOnly:f,size:r}),children:jsx(so,{value:t})})]})]})});lu.displayName="Reaction";var pu="_1azy5686",cu="_1azy5685",du="var(--_1azy5680)",uu="_1azy5688",mu="_1azy5689",fu="_1azy5681 z9nup81",yu="_1azy5682";var bu="_1azy5687";var Nx={sm:16,md:20},Ex={sm:[CheckmarkCircleFilledIcon,ErrorAltCircleFilledIcon$1],md:[CheckCircleFilledIcon,ErrorAltCircleFilledIcon]},po=ht.forwardRef(({className:e,style:t,size:o="md",variant:r="active","data-block-id":a,"data-block-class":n,...i},s)=>{let{labelProps:l,progressBarProps:p}=useProgressBar({...i,isIndeterminate:true}),c=Nx[o],u=c/2-2,m=2*u*Math.PI,d=Ex[o][r==="success"?0:1];return jsxs("div",{className:classNames(fu,"BaselineUI-ProgressSpinner",e),ref:s,style:{...assignInlineVars({[du]:`${m}px`}),...t},"data-block-id":a,"data-block-class":n,children:[jsxs("div",{...p,className:yu,children:[(r==="active"||r==="inactive")&&jsxs("svg",{height:c,width:c,viewBox:`0 0 ${c} ${c}`,children:[jsx("circle",{role:"presentation",className:pu,cx:c/2,cy:c/2,r:u}),r==="active"&&jsx("circle",{role:"presentation",className:cu,cx:c/2,cy:c/2,r:u})]}),r==="success"&&jsx(d,{className:bu,size:c}),r==="error"&&jsx(d,{className:uu,size:c})]}),i.label?jsx("span",{...l,className:mu,children:i.label}):null]})});po.displayName="ProgressSpinner";var ka=z({defaultClassName:"_5uw3kp0 oom8bs0 z9nup81",variantClassNames:{isHovered:{true:"_5uw3kp1"},isFocusVisible:{true:"_5uw3kp2"},isDisabled:{true:"_5uw3kp3"},isSelected:{true:"_5uw3kp4"},size:{sm:"_5uw3kp5",md:"_5uw3kp6",lg:"_5uw3kp7"},variant:{primary:"_5uw3kp8",toolbar:"_5uw3kp9"}},defaultVariants:{},compoundVariants:[[{isSelected:true,isFocusVisible:true},"_5uw3kpa"],[{isSelected:true,isDisabled:true},"_5uw3kpb"],[{variant:"primary",size:"lg"},"_5uw3kpc"]]}),gu=z({defaultClassName:"_5uw3kpd _1yep5z6f5",variantClassNames:{isDisabled:{true:"_1yep5z611a"},isSelected:{true:"_1yep5z611c"}},defaultVariants:{},compoundVariants:[]});var Ox={sm:16,md:20,lg:24},wa=ht.forwardRef(({className:e,style:t,iconStart:o,size:r="md",elementType:a="button",variant:n="toolbar",...i},s)=>{let l=useToggleState(i),{buttonProps:p,isPressed:c,ref:u,isFocusVisible:m,isFocused:d,isHovered:b,uiStateOptions:y}=ea(i,l),f=filterTruthyValues({"data-block-id":i["data-block-id"],"data-block-class":i["data-block-class"],"data-focused":d,"data-focus-visible":m,"data-disabled":i.isDisabled,"data-hovered":b,"data-pressed":c,"data-selected":l.isSelected});return jsxs(a,{...mergeProps(p,f),className:classNames(ka({isHovered:b,isFocusVisible:m,isSelected:l.isSelected,size:r,isDisabled:i.isDisabled,variant:n}),"BaselineUI-ToggleButton",typeof e=="function"?e(y):e),style:typeof t=="function"?t(y):t,ref:M(u,s),children:[o?jsx(o,{size:Ox[r],className:gu({isDisabled:i.isDisabled,isSelected:l.isSelected})}):null,i.label]})});wa.displayName="ToggleButton";var Ia=z({defaultClassName:"_16vugd0b _1yep5z6ev _1yep5z6dy",variantClassNames:{isDisabled:{true:"_1yep5z6111"}},defaultVariants:{},compoundVariants:[]}),Ra=z({defaultClassName:"_16vugd00 _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6jj _1yep5z6jk _1yep5z6jl",variantClassNames:{labelPosition:{end:"_1yep5z6154 _1yep5z6155 _1yep5z6156 _1yep5z6vl _1yep5z6vm _1yep5z6vn",start:"_1yep5z615a _1yep5z615b _1yep5z615c _1yep5z616m _1yep5z616n _1yep5z616o"}},defaultVariants:{},compoundVariants:[]}),$a=z({defaultClassName:"_16vugd03 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6m1 _1yep5z6lz _1yep5z6h6 _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6f8 _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6kd _1yep5z6ke _1yep5z6kf _1yep5z6lp _1yep5z6la",variantClassNames:{isIndeterminate:{true:"_1yep5z6181 _1yep5z612c"},isSelected:{true:"_16vugd05"},isFocusVisible:{true:"_16vugd06"},isHovered:{true:"_1yep5z613a"},isDisabled:{true:"_16vugd08 _1yep5z613e"},isReadOnly:{true:"_16vugd09 _1yep5z6118 _1yep5z6184 _1yep5z6182 _1yep5z613e"},hasError:{true:"_1yep5z612q _1yep5z6184 _1yep5z6182"}},defaultVariants:{},compoundVariants:[[{isSelected:true,isDisabled:false,isReadOnly:false},"_1yep5z61of"],[{isSelected:true,isDisabled:false,isReadOnly:false,hasError:false},"_1yep5z61u4"],[{isSelected:true,isDisabled:true},"_1yep5z61op _1yep5z61nf"],[{isSelected:true,isDisabled:true,hasError:false},"_1yep5z61u4"],[{isHovered:true,isSelected:true,isReadOnly:false},"_1yep5z61ol _1yep5z61nf"],[{isHovered:true,isSelected:true,isReadOnly:false,hasError:false},"_1yep5z61u4"],[{isHovered:true,isSelected:false,isIndeterminate:true,isReadOnly:false},"_1yep5z61ol _1yep5z61nf"],[{isHovered:true,isSelected:false,isIndeterminate:true,isReadOnly:false,hasError:false},"_1yep5z61u4"]]});var zu=ht.forwardRef(({className:e,style:t,label:o,labelPosition:r="end","data-block-id":a,"data-block-class":n,...i},s)=>{let l=ht.useRef(null),p=useToggleState(i),{isFocusVisible:c,isFocused:u,focusProps:m}=useFocusRing(),{inputProps:d,isPressed:b,isDisabled:y,isSelected:f,isReadOnly:g}=useCheckbox({...i,children:o},p,l),{hoverProps:v,isHovered:_}=useHover({isDisabled:y}),h=filterTruthyValues({"data-disabled":y,"data-readonly":g,"data-hovered":_,"data-selected":f,"data-pressed":b,"data-indeterminate":i.isIndeterminate,"data-invalid":i.isInvalid,"data-focus-visible":c,"data-focused":u,"data-block-id":a,"data-block-class":n});return jsxs("label",{...h,className:classNames(Ra({labelPosition:r}),"BaselineUI-Checkbox",e),style:t,ref:s,children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(d,m),ref:l})}),jsxs("div",{...v,className:$a({isSelected:f&&!i.isIndeterminate,isIndeterminate:i.isIndeterminate,isFocusVisible:c,isDisabled:y,isReadOnly:g,hasError:i.isInvalid,isHovered:_}),children:[f&&!i.isIndeterminate?jsx(CheckmarkIcon$3,{size:12}):null,i.isIndeterminate?jsx(MinusIcon$1,{size:12}):null]}),o?jsx("span",{className:Ia({isDisabled:y}),children:o}):null]})});zu.displayName="Checkbox";var hu={ar:{goToPage:"\u0627\u0646\u062A\u0642\u0627\u0644 \u0625\u0644\u0649 \u0635\u0641\u062D\u0629",nextPage:"\u0627\u0644\u0635\u0641\u062D\u0629 \u0627\u0644\u062A\u0627\u0644\u064A\u0629",pageXofY:"\u0635\u0641\u062D\u0629 {arg0} \u0645\u0646 {arg1}",prevPage:"\u0627\u0644\u0635\u0641\u062D\u0629 \u0627\u0644\u0633\u0627\u0628\u0642\u0629"},cs:{goToPage:"P\u0159ej\xEDt na stranu",nextPage:"Dal\u0161\xED str\xE1nka",pageXofY:"Strana {arg0} z {arg1}",prevPage:"P\u0159edchoz\xED strana"},cy:{goToPage:"Mynd i Dudalen",nextPage:"Tudalen Nesaf",pageXofY:"Tudalen {arg0} o {arg1}",prevPage:"Tudalen Blaenorol"},da:{goToPage:"G\xE5 til side",nextPage:"N\xE6ste side",pageXofY:"Side {arg0} af {arg1}",prevPage:"Forrige side"},de:{goToPage:"Zu Seite wechseln",nextPage:"N\xE4chste Seite",pageXofY:"Seite {arg0} von {arg1}",prevPage:"Vorherige Seite"},el:{goToPage:"\u039C\u03B5\u03C4\u03AC\u03B2\u03B1\u03C3\u03B7 \u03C3\u03C4\u03B7 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1",nextPage:"\u0395\u03C0\u03CC\u03BC\u03B5\u03BD\u03B7 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1",pageXofY:"\u03A3\u03B5\u03BB\u03AF\u03B4\u03B1 {arg0} \u03B1\u03C0\u03CC {arg1}",prevPage:"\u03A0\u03C1\u03BF\u03B7\u03B3\u03BF\u03CD\u03BC\u03B5\u03BD\u03B7 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1"},"en-GB":{goToPage:"Go to Page",nextPage:"Next Page",pageXofY:"Page {arg0} of {arg1}",prevPage:"Previous Page"},en:{goToPage:"Go to Page",nextPage:"Next Page",pageXofY:"Page {arg0} of {arg1}",prevPage:"Previous Page"},es:{goToPage:"Ir a la p\xE1gina",nextPage:"P\xE1gina siguiente",pageXofY:"P\xE1gina {arg0} de {arg1}",prevPage:"P\xE1gina anterior"},fi:{goToPage:"Mene sivulle",nextPage:"Seuraava sivu",pageXofY:"Sivu {arg0} / {arg1}",prevPage:"Edellinen sivu"},"fr-CA":{goToPage:"Aller \xE0 la page",nextPage:"Page suivante",pageXofY:"Page {arg0} sur {arg1}",prevPage:"Page pr\xE9c\xE9dente"},fr:{goToPage:"Aller \xE0 la page",nextPage:"Page suivante",pageXofY:"Page {arg0} sur {arg1}",prevPage:"Page pr\xE9c\xE9dente"},he:{goToPage:"\u05DE\u05E2\u05D1\u05E8 \u05DC\u05E2\u05DE\u05D5\u05D3",nextPage:"\u05D4\u05E2\u05DE\u05D5\u05D3 \u05D4\u05D1\u05D0",pageXofY:"\u05E2\u05DE\u05D5\u05D3 {arg0} \u05DE\u05EA\u05D5\u05DA {arg1}",prevPage:"\u05D4\u05E2\u05DE\u05D5\u05D3 \u05D4\u05E7\u05D5\u05D3\u05DD"},hr:{goToPage:"Idi na stranicu",nextPage:"Slijede\u0107a stranica",pageXofY:"Stranica {arg0} od {arg1}",prevPage:"Prethodna stranica"},id:{goToPage:"Buka halaman",nextPage:"Halaman Berikutnya",pageXofY:"Halaman {arg0} dari {arg1}",prevPage:"Halaman Sebelumnya"},it:{goToPage:"Vai a pagina",nextPage:"Pagina successiva",pageXofY:"Pagina {arg0} di {arg1}",prevPage:"Pagina precedente"},ja:{goToPage:"\u30DA\u30FC\u30B8\u306B\u79FB\u52D5",nextPage:"\u6B21\u306E\u30DA\u30FC\u30B8",pageXofY:"\u30DA\u30FC\u30B8 {arg0}/{arg1}",prevPage:"\u524D\u306E\u30DA\u30FC\u30B8"},ko:{goToPage:"\uD398\uC774\uC9C0\uB85C \uC774\uB3D9",nextPage:"\uB2E4\uC74C \uD398\uC774\uC9C0",pageXofY:"{arg0}/{arg1} \uD398\uC774\uC9C0",prevPage:"\uC774\uC804 \uD398\uC774\uC9C0"},ms:{goToPage:"Pergi ke Halaman",nextPage:"Halaman Seterusnya",pageXofY:"Halaman {arg0} daripada {arg1}",prevPage:"Halaman Sebelumnya"},"nb-NO":{goToPage:"G\xE5 til side",nextPage:"Neste side",pageXofY:"Side {arg0} av {arg1}",prevPage:"Forrige side"},nl:{goToPage:"Ga naar pagina",nextPage:"Volgende pagina",pageXofY:"Pagina {arg0} van {arg1}",prevPage:"Vorige pagina"},pl:{goToPage:"Przejd\u017A do strony",nextPage:"Nast\u0119pna strona",pageXofY:"Strona {arg0} z {arg1}",prevPage:"Poprzednia strona"},"pt-PT":{goToPage:"Ir para p\xE1gina",nextPage:"P\xE1gina seguinte",pageXofY:"P\xE1gina {arg0} de {arg1}",prevPage:"P\xE1gina anterior"},pt:{goToPage:"Ir \xE0 P\xE1gina",nextPage:"P\xE1gina Seguinte",pageXofY:"P\xE1gina {arg0} de {arg1}",prevPage:"P\xE1gina Anterior"},ru:{goToPage:"\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0435",nextPage:"\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0430\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430",pageXofY:"\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 {arg0} \u0438\u0437 {arg1}",prevPage:"\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0430\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430"},sk:{goToPage:"\xCDs\u0165 na stranu",nextPage:"Dal\u0161ia strana",pageXofY:"Strana {arg0} z {arg1}",prevPage:"Predch\xE1dzaj\xFAca strana"},sl:{goToPage:"Pojdi na stran",nextPage:"Naslednja stran",pageXofY:"Stran {arg0} od {arg1}",prevPage:"Prej\u0161nja stran"},sv:{goToPage:"G\xE5 till sida",nextPage:"N\xE4sta sida",pageXofY:"Sida {arg0} av {arg1}",prevPage:"F\xF6reg\xE5ende sida"},th:{goToPage:"\u0E44\u0E1B\u0E17\u0E35\u0E48\u0E2B\u0E19\u0E49\u0E32",nextPage:"\u0E2B\u0E19\u0E49\u0E32\u0E16\u0E31\u0E14\u0E44\u0E1B",pageXofY:"\u0E2B\u0E19\u0E49\u0E32 {arg0} \u0E08\u0E32\u0E01 {arg1}",prevPage:"\u0E2B\u0E19\u0E49\u0E32\u0E01\u0E48\u0E2D\u0E19\u0E2B\u0E19\u0E49\u0E32"},tr:{goToPage:"Sayfaya Git",nextPage:"Sonraki Sayfa",pageXofY:"Sayfa {arg0}/{arg1}",prevPage:"\xD6nceki Sayfa"},uk:{goToPage:"\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043D\u0430 \u0441\u0442\u043E\u0440\u0456\u043D\u043A\u0443",nextPage:"\u041D\u0430\u0441\u0442\u0443\u043F\u043D\u0430 \u0441\u0442\u043E\u0440\u0456\u043D\u043A\u0430",pageXofY:"\u0421\u0442\u043E\u0440\u0456\u043D\u043A\u0430 {arg0} \u0437 {arg1}",prevPage:"\u041F\u043E\u043F\u0435\u0440\u0435\u0434\u043D\u044F \u0441\u0442\u043E\u0440\u0456\u043D\u043A\u0430"},"zh-Hans":{goToPage:"\u524D\u5F80\u9875\u9762",nextPage:"\u4E0B\u4E00\u9875",pageXofY:"\u7B2C {arg0}/{arg1} \u9875",prevPage:"\u4E0A\u4E00\u9875"},"zh-Hant":{goToPage:"\u5230\u6B64\u9801",nextPage:"\u4E0B\u4E00\u9801",pageXofY:"\u7B2C{arg0}\u9801\uFF0C\u5171{arg1}\u9801",prevPage:"\u4E0A\u4E00\u9801"}};var xu=z({defaultClassName:"_1nsi9h17",variantClassNames:{isFocused:{true:"_1nsi9h18"},variant:{pinned:"_1nsi9h19",floating:"_1nsi9h1a"},size:{xs:"_1nsi9h1b",sm:"_1nsi9h1c",md:"_1nsi9h1d",lg:"_1nsi9h1e"}},defaultVariants:{},compoundVariants:[]}),Cu="_1nsi9h1f _1yep5z6ly _1yep5z6lq _1yep5z6eu",Pu=z({defaultClassName:"_1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6g1 _1yep5z6e1",variantClassNames:{size:{xs:"_1nsi9h11 _1yep5z6wl _1yep5z6wm _1yep5z6wn _1yep5z6x9 _1yep5z6xa _1yep5z6xb _1yep5z6xx _1yep5z6xy _1yep5z6xz _1yep5z6yl _1yep5z6ym _1yep5z6yn _1yep5z6zy",sm:"_1nsi9h12 _1yep5z6101",md:"_1nsi9h13",lg:"_1nsi9h14"},variant:{floating:"_1yep5z6za _1yep5z6184 _1yep5z6182 _1yep5z6136",pinned:"_1yep5z617q"}},defaultVariants:{},compoundVariants:[]}),ku=z({defaultClassName:"_1nsi9h1g _1yep5z6ev",variantClassNames:{isDisabled:{true:"_1yep5z6111"}},defaultVariants:{},compoundVariants:[]});var b0={style:"decimal"},g0={xs:[CaretLeftIcon$3,CaretRightIcon$3],sm:[CaretLeftIcon$2,CaretRightIcon$2],md:[CaretLeftIcon$1,CaretRightIcon$1],lg:[CaretLeftIcon,CaretRightIcon]},Tu=ht.forwardRef(({className:e,style:t,minValue:o=1,defaultValue:r=1,incrementAriaLabel:a,decrementAriaLabel:n,"aria-label":i,size:s="md",variant:l="floating",hideActions:p,isDisabled:c,...u},m)=>{let{locale:d}=useLocale(),b=A(hu),y={...u,formatOptions:b0,minValue:o,incrementAriaLabel:a||b.formatMessage("nextPage"),decrementAriaLabel:n||b.formatMessage("prevPage"),defaultValue:r,"aria-label":i||b.formatMessage("goToPage")},f=ht.useRef(null),g=useNumberFieldState({...y,locale:d}),{inputProps:v,decrementButtonProps:_,incrementButtonProps:h,groupProps:x}=useNumberField({...y,onKeyDown:F=>{F.key==="Enter"&&f.current?.blur(),u.onKeyDown?.(F);},isDisabled:c},g,f),{hoverProps:w,isHovered:C}=useHover({}),{focusProps:I,isFocused:P,isFocusVisible:S}=useFocusRing(),k=l==="floating",[T,$]=g0[s],R=filterTruthyValues({"data-focus-visible":S,"data-focused":P,"data-hovered":C,"data-block-id":u["data-block-id"],"data-block-class":u["data-block-class"]}),E=useInteractionModality()==="keyboard";return jsxs("div",{...mergeProps(x,w,R),className:classNames(Pu({size:s,variant:l}),"BaselineUI-Pagination",e),style:t,ref:m,children:[p?null:jsxs(Fragment,{children:[jsx(L,{icon:T,..._,elementType:"div",size:s,style:{height:"100%",...k&&{borderRadius:0}},className:"BaselineUI-Pagination-DecrementButton",UNSAFE_NON_INTERACTIVE:E,isDisabled:c||_.isDisabled}),l==="floating"&&jsx(q,{orientation:"vertical"})]}),jsxs("div",{className:xu({isFocused:P,variant:l,size:s}),"aria-label":b.formatMessage("pageXofY",{arg0:v.value,arg1:g.maxValue}),children:[jsx("input",{...mergeProps(v,I),ref:f,className:classNames("BaselineUI-Pagination-Input",Cu),style:{width:`${v.value?.toString().length||1}ch`}}),jsxs("span",{className:ku({isDisabled:c}),children:["/ ",jsx(so,{value:g.maxValue})]})]}),p?null:jsxs(Fragment,{children:[l==="floating"&&jsx(q,{orientation:"vertical"}),jsx(L,{icon:$,...h,elementType:"div",size:s,style:{height:"100%",...k&&{borderRadius:0}},className:"BaselineUI-Pagination-IncrementButton",UNSAFE_NON_INTERACTIVE:E,isDisabled:c||h.isDisabled})]})]})});Tu.displayName="Pagination";var Su=({date:e,...t})=>{let o=useDateFormatter(t);return jsx(Fragment,{children:o.format(e)})};Su.displayName="DateFormat";var ar=z({defaultClassName:"_1f789qjm",variantClassNames:{variant:{neutral:"_1yep5z6118",red:"_1yep5z610i",green:"_1yep5z610m",blue:"_1yep5z610u","high-contrast":"_1yep5z611b"},isDisabled:{true:"_1yep5z61nd"},isSelected:{true:"_1yep5z611c"}},defaultVariants:{},compoundVariants:[]}),Ta=z({defaultClassName:"_1f789qj0 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ax _1yep5z6ay _1yep5z6az _1yep5z6bl _1yep5z6bm _1yep5z6bn _1yep5z6c9 _1yep5z6ca _1yep5z6cb _1yep5z6cx _1yep5z6cy _1yep5z6cz _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6la _1yep5z6lq _1yep5z6ld",variantClassNames:{isFocusVisible:{true:"_1f789qj1"},variant:{neutral:"_1yep5z6128",red:"_1yep5z611n",green:"_1yep5z611r",blue:"_1yep5z611z","high-contrast":"_1yep5z612c"},isDisabled:{true:"_1f789qj7 _1yep5z6127"},allowsRemoving:{true:"_1f789qj8"},isSelected:{true:"_1yep5z612i"},allowsSelection:{true:"_1f789qja"},isHovered:{true:"_1f789qjb"},size:{md:"_1f789qjc",sm:"_1f789qjd"}},defaultVariants:{},compoundVariants:[[{allowsSelection:true,isHovered:true,variant:"neutral"},"_1yep5z61oa"],[{allowsSelection:true,isHovered:true,variant:"red"},"_1yep5z61np"],[{allowsSelection:true,isHovered:true,variant:"blue"},"_1yep5z61o1"],[{allowsSelection:true,isHovered:true,variant:"green"},"_1yep5z61nt"],[{allowsSelection:true,isHovered:true,variant:"high-contrast"},"_1yep5z61oe"],[{allowsSelection:true,isSelected:true,isHovered:true},"_1yep5z61om"],[{variant:"high-contrast",isDisabled:true},"_1yep5z61oa"],[{allowsRemoving:true,size:"md"},"_1yep5z619c _1yep5z619d _1yep5z619e"],[{allowsRemoving:true,size:"sm"},"_1yep5z61af _1yep5z61ag _1yep5z61ah"]]}),Du="_1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z69f _1yep5z69g _1yep5z69h",Mu="_1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z69i _1yep5z69j _1yep5z69k",Nu=z({defaultClassName:"_1f789qju",variantClassNames:{variant:{neutral:"_1f789qjv",red:"_1f789qjw",green:"_1f789qjx",blue:"_1f789qjy","high-contrast":"_1f789qjz"},isHovered:{true:"_1f789qj10"}},defaultVariants:{},compoundVariants:[[{isHovered:true,variant:"neutral"},"_1f789qj11"],[{isHovered:true,variant:"red"},"_1f789qj12"],[{isHovered:true,variant:"blue"},"_1f789qj13"],[{isHovered:true,variant:"green"},"_1f789qj14"],[{isHovered:true,variant:"high-contrast"},"_1f789qj15"]]}),Sa=z({defaultClassName:"_1f789qje",variantClassNames:{variant:{neutral:"_1yep5z610x",red:"_1yep5z610i",green:"_1yep5z610m",blue:"_1yep5z610u","high-contrast":"_1yep5z6112"},isDisabled:{true:"_1yep5z61n4"},isSelected:{true:"_1yep5z6113"}},defaultVariants:{},compoundVariants:[]});var Au=({item:e,state:t,variant:o="neutral",size:r="md"})=>{let a=ht.useRef(null),{focusProps:n,isFocusVisible:i}=useFocusRing({within:true}),{rowProps:s,gridCellProps:l,removeButtonProps:p,allowsRemoving:c,isDisabled:u,isSelected:m,allowsSelection:d}=useTag({item:e},t,a),b=ht.useRef(null),{buttonProps:y}=useButton(p,b),{hoverProps:f,isHovered:g}=useHover({isDisabled:u}),{hoverProps:v,isHovered:_}=useHover({isDisabled:u}),h=e.value?.icon,x=e.value?.data?.variant??o,w=r==="md"?XIcon$1:XIcon$3,C=r==="md"?CheckmarkIcon$2:CheckmarkIcon$3;return jsx("div",{...mergeProps(s,n,v),ref:a,className:classNames(Ta({isFocusVisible:i,variant:x,isDisabled:u,allowsRemoving:c,isSelected:m,allowsSelection:d,isHovered:_,size:r}),Sa({variant:x,isDisabled:u,isSelected:m}),"BaselineUI-Tag"),children:jsxs("div",{...l,className:Du,children:[m?jsx(C,{size:r==="md"?16:12,className:classNames(ar({variant:x,isDisabled:u,isSelected:m}),"BaselineUI-Tag-Icon")}):null,!m&&h?jsx(h,{size:r==="md"?16:12,className:classNames(ar({variant:x,isDisabled:u,isSelected:m}),"BaselineUI-Tag-Icon")}):null,jsx(D,{paddingY:r==="md"?"sm":"none",typography:r==="sm"?"label.sm.medium":"label.md.medium",children:e.rendered}),c?jsx("button",{...mergeProps(y,f),className:Nu({variant:x,isHovered:g}),children:jsx(w,{size:r==="md"?12:8})}):null]})})};var Ou=ht.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,items:a,size:n="md",...i},s)=>{let l=useMemo(()=>a.map(d=>({...d,data:{variant:d.variant}})),[a]),p=pe(),c=ht.useRef(null),u=useListState({...i,items:l,children:p}),{gridProps:m}=useTagGroup(i,u,c);return jsx("div",{...m,className:classNames(Mu,"BaselineUI-TagGroup",e),style:t,"data-block-id":o,"data-block-class":r,ref:M(s,c),children:[...u.collection].map(d=>jsx(Au,{state:u,item:d,variant:i.variant,size:n},d.key))})});Ou.displayName="TagGroup";var Hu="_1yep5z6ln",Vu=z({defaultClassName:"_1kvz17db _1yep5z6la _1yep5z6lc",variantClassNames:{showActionsOnTriggerOnly:{true:"_1kvz17dc"},isTriggered:{true:"_1kvz17dd"}},defaultVariants:{},compoundVariants:[]}),Uu=z({defaultClassName:"_1kvz17d0 _1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z68c _1yep5z68d _1yep5z68e _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6la _1yep5z6lb",variantClassNames:{isExpanded:{true:"_1kvz17d1"}},defaultVariants:{},compoundVariants:[]}),qu="_1kvz17de",Ku="_1yep5z6ev _1yep5z6dy",Gu=z({defaultClassName:"_1kvz17d2 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6kj _1yep5z6kk _1yep5z6kl _1yep5z6la _1yep5z6ld",variantClassNames:{isFocusVisible:{true:"_1kvz17d3"},isHovered:{true:"_1yep5z6g2",false:"_1yep5z6g3"},isDisabled:{true:"z9nup82"}},defaultVariants:{},compoundVariants:[]}),Wu="_1kvz17da _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6dz",Yu=z({defaultClassName:"_1kvz17d7 _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6jj _1yep5z6jk _1yep5z6jl",variantClassNames:{isDisabled:{true:"_1yep5z6ey",false:"_1yep5z6eu"}},defaultVariants:{},compoundVariants:[]});var Yi=ht.forwardRef(({children:e,className:t,style:o},r)=>{let{headers:a}=useContext(it),{disabledKeys:n}=useContext(it),{keyboardProps:i}=useKeyboard({onKeyDown:s=>{let l=_e(s.target),p=l?jr(l):jr(),c=[...a?.keys()||[]].findIndex(y=>a?.get(y)?.current===p),u=a?.get(c||0),m=a?.size||0,d=y=>{let f=a.get(y-1<0?m-1:y-1);n?.has(f?.current?.getAttribute("data-key")||"")?d(y-1):f?.current?.focus();},b=y=>{let f=a.get((y+1)%m);n?.has(f?.current?.getAttribute("data-key")||"")?b(y+1):f?.current?.focus();};if(u)switch(s.key){case "Home":{s.preventDefault(),b(-1);break}case "End":{s.preventDefault(),d(m);break}case "ArrowDown":{s.preventDefault(),b(c);break}case "ArrowUp":{s.preventDefault(),d(c);break}default:s.continuePropagation();}}});return jsx("div",{...i,style:o,className:classNames(Hu,t),ref:r,children:ht.Children.map(e,(s,l)=>ht.cloneElement(s,{index:l}))})});Yi.displayName="AccordionBase";var it=ht.createContext({expandedKeys:new Set,setExpandedKeys:()=>{},disabledKeys:new Set,headers:new Map,expansionMode:"multiple"}),Ju=ht.forwardRef(({children:e,disabledKeys:t,defaultExpandedKeys:o=new Set,expandedKeys:r,expansionMode:a="multiple",onChange:n,className:i,style:s},l)=>{let[p,c]=ht.useState(o),u=ht.useRef(new Map).current,[m,d]=ht.useState(a);useEffect(()=>{d(a);},[a]),useEffect(()=>{n?.(p);},[p,n]);let b=useMemo(()=>({expandedKeys:r||p,setExpandedKeys:r?()=>{}:c,disabledKeys:t,headers:u,expansionMode:m}),[r,p,t,u,m]);return jsx(it.Provider,{value:b,children:jsx(FocusScope,{children:jsx(Yi,{className:i,style:s,ref:l,children:e})})})});Ju.displayName="Accordion";var Zi=ht.forwardRef(({title:e,actions:t,controlId:o,value:r,id:a,index:n,subLabel:i,showActionsOnTriggerOnly:s},l)=>{let p=ht.useRef(null),{expandedKeys:c,setExpandedKeys:u,expansionMode:m,disabledKeys:d,headers:b}=useContext(it),y=d?.has(r),f=useFocusManager();invariant(f);let{focusNext:g,focusPrevious:v}=f,{keyboardProps:_}=useKeyboard({onKeyDown:R=>{R.key==="ArrowRight"?g({wrap:true}):R.key==="ArrowLeft"?v({wrap:true}):R.continuePropagation();},isDisabled:y});useEffect(()=>{invariant(typeof n=="number","AccordionItem must have an index"),b?.set(n,p);},[n,b]);let h=()=>{u(R=>{let N=new Set(R);return N.has(r)?N.delete(r):(m==="single"&&N.clear(),N.add(r)),N});},{buttonProps:x}=useButton({"aria-expanded":c.has(r),"aria-controls":o,onPress:h,isDisabled:y},p),{pressProps:w}=usePress({onPress:h,isDisabled:y}),{focusProps:C,isFocusVisible:I}=useFocusRing(),{hoverProps:P,isHovered:S}=useHover({isDisabled:y}),{focusProps:k,isFocusVisible:T}=useFocusRing({within:true}),$=c.has(r);return jsxs("h3",{...mergeProps(_,w,P,k),className:Gu({isFocusVisible:I,isHovered:S,isDisabled:y}),ref:l,children:[jsxs("div",{className:Yu({isDisabled:!!y}),children:[jsx(ChevronRightIcon,{className:Uu({isExpanded:$}),size:8}),jsx("button",{...mergeProps(x,C),id:a,"data-key":r,className:Wu,ref:p,children:e})]}),t?.length?jsx("div",{"data-testid":"action-buttons",className:Vu({showActionsOnTriggerOnly:s,isTriggered:T||S}),children:t.map((R,N)=>jsx(L,{variant:"secondary",size:"sm",excludeFromTabOrder:true,isDisabled:y,...R},N))}):null,i?jsx("div",{className:Ku,children:i}):null]})});Zi.displayName="AccordionHeader";var nm=ht.forwardRef(({title:e,actions:t,children:o,value:r,index:a,subLabel:n,style:i,className:s,showActionsOnTriggerOnly:l},p)=>{let c=useId(),u=useId(),{expandedKeys:m}=useContext(it),d=m.has(r);return jsxs(Fragment,{children:[jsx(FocusScope,{children:jsx(Zi,{value:r,actions:t,id:u,title:e,controlId:c,ref:p,index:a,subLabel:n,showActionsOnTriggerOnly:l})}),jsx(AnimatePresence,{initial:false,children:d?jsx(motion.section,{role:"region","aria-labelledby":u,id:c,className:qu,variants:{open:{height:"auto",opacity:1},closed:{height:0,opacity:0}},initial:"closed",animate:"open",exit:"closed",children:jsx("div",{style:i,className:s,children:o})}):null})]})});nm.displayName="AccordionItem";var lr=ht.forwardRef(({variant:e,isOpen:t,selectedIcon:o,validationState:r="valid",valueProps:a,label:n,className:i,style:s,"data-block-id":l,"data-block-class":p,...c},u)=>{let m=ht.useRef(null),{buttonProps:d,isPressed:b}=useButton({...c,isDisabled:c.isDisabled||c.isReadOnly},m),{hoverProps:y,isHovered:f}=useHover({isDisabled:c.isDisabled}),{focusProps:g,isFocused:v,isFocusVisible:_}=useFocusRing(),h=io({isReadOnly:c.isReadOnly,validationState:r});c.isReadOnly&&(d.disabled=false);let x=filterTruthyValues({"data-disabled":c.isDisabled,"data-readonly":c.isReadOnly,"data-focused":v,"data-focus-visible":_,"data-hovered":f,"data-pressed":b,"data-open":t,"data-block-id":l,"data-block-class":p});return jsxs("button",{...mergeProps(d,y,g,x),ref:M(u,m),className:classNames(Rd({isFocused:_,isDisabled:!!c.isDisabled,isOpen:t,isHovered:f,variant:e,isReadOnly:!!c.isReadOnly}),Yt({variant:e,isHovered:f,isFocused:_,validationState:r,isDisabled:!!c.isDisabled,isReadOnly:c.isReadOnly}),i,"BaselineUI-Select-Button"),style:s,children:[jsxs(D,{display:"flex",flexDirection:"row",alignItems:"center",gap:"md",flex:1,paddingRight:"md",children:[jsxs("span",{className:Td,children:[o?jsx(o,{size:24}):null,jsx("span",{...a,children:n})]}),h?jsx("span",{"aria-hidden":true,className:classNames(Gt({validationState:r,isReadOnly:!!c.isReadOnly}),$d),children:jsx(h,{size:16})}):null]}),jsx("span",{"aria-hidden":true,children:jsx(CaretDownIcon,{size:8,className:Id({isOpen:t})})})]})});lr.displayName="SelectButton";var Da=ht.createContext({state:null,popoverAnchorRef:null}),es=ht.forwardRef(({className:e,style:t,labelPosition:o="top",variant:r="primary","data-block-id":a,"data-block-class":n,optionStyle:i,optionClassName:s,placement:l="bottom start",triggerClassName:p,triggerStyle:c,state:u,renderTrigger:m=({buttonProps:y,selectedValue:f,valueProps:g,isOpen:v,ref:_})=>{let h=f&&"icon"in f&&f.icon;return jsx(lr,{...y,className:p,style:c,isOpen:v,isReadOnly:d.isReadOnly,ref:_,variant:r,validationState:d.validationState,selectedIcon:h||void 0,label:f?"label"in f&&f?.label:d.placeholder,valueProps:g})},...d},b)=>{let{popoverAnchorRef:y}=useContext(Da),f=ht.useRef(null),g=xe(d.portalContainer),{labelProps:v,triggerProps:_,valueProps:h,menuProps:x,descriptionProps:w,errorMessageProps:C}=useSelect({...d,validationState:d.validationState==="error"?"invalid":"valid"},u,f),I=he({...d,descriptionProps:w,errorMessageProps:C,labelPosition:o}),P=u.selectedItem?.value??null;return jsxs(Ct.Provider,{value:u,children:[jsxs("div",{style:t,className:classNames(ot({labelPosition:o}),"BaselineUI-Select",e),"data-block-id":a,"data-block-class":n,ref:b,children:[d.label||I?jsxs("div",{className:tt({labelPosition:o,hasMessage:!!I}),children:[d.label?jsx("div",{...v,className:classNames(Wt,"BaselineUI-Select-Label"),children:d.label}):null,o==="start"&&I]}):null,jsx(HiddenSelect,{state:u,triggerRef:f,isDisabled:d.isDisabled,label:d.label,name:d.name}),m({buttonProps:_,selectedValue:P,valueProps:h,isOpen:u.isOpen,ref:f}),o==="top"&&I]}),u?jsx(we,{placement:l,portalContainer:g,offset:2,state:u,triggerRef:y||f,style:t,className:"BaselineUI-Select-Popover",...d,children:jsx(fe,{...x,label:d.label,items:d.items,showSelectedIcon:d.showSelectedIcon,className:at,optionStyle:i,optionClassName:s})}):null]})});es.displayName="SelectCore";var cm=ht.forwardRef((e,t)=>{let o=pe(),r=useSelectState({...e,validationState:e.validationState==="error"?"invalid":"valid",children:o});return jsx(es,{...e,ref:t,state:r})});cm.displayName="SelectStandalone";var lt=ht.forwardRef((e,t)=>{let{state:o}=useContext(Da);return useEffect(()=>{invariant(o||e.items,"Select: A `state` that can be passed via context or `items` are required.");},[e.items,o]),o?jsx(es,{state:o,...e,ref:t}):jsx(cm,{...e,ref:t})});lt.displayName="Select";var um=ht.forwardRef(({className:e,style:t,variant:o,"data-block-id":r,icon:a,tooltip:n=true,iconTooltip:i=true,...s},l)=>{let p=ht.useRef(null),{tooltipProps:c}=ze({label:s["aria-label"],tooltip:n}),u=useCallback(({buttonProps:m,selectedValue:d,valueProps:b,isOpen:y,ref:f})=>{let g=d&&"icon"in d&&d.icon;return jsx(J,{...c,children:jsx(lr,{...m,isOpen:y,isReadOnly:s.isReadOnly,ref:f,variant:o,validationState:s.validationState,selectedIcon:g||void 0,label:d?"label"in d&&d?.label:s.placeholder,valueProps:b})})},[s,c,o]);return jsxs(D,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:classNames("BaselineUI-IconSelect",e),"data-block-id":r,style:t,ref:M(l,p),children:[a?jsx(ro,{icon:a,label:s["aria-label"],tooltip:i,"aria-hidden":"true",size:24,className:sprinkles({color:"icon.primary",display:"flex",flexShrink:0})}):null,jsx(lt,{...s,renderTrigger:u})]})});um.displayName="IconSelect";var mm="_1017q4c5",fm=z({defaultClassName:"_1017q4c0",variantClassNames:{size:{md:"_1017q4c1",sm:"_1017q4c2"},isDisabled:{true:"_1017q4c3"}},defaultVariants:{},compoundVariants:[]}),ym="_1017q4c4";var vC={sm:AvatarIcon$1,md:AvatarIcon},fo=ht.forwardRef(({className:e,style:t,size:o="md",icon:r=vC[o],name:a,imgSrc:n,showInitials:i,isDisabled:s,hasNotifications:l,imgLoading:p,"data-block-id":c,"data-block-class":u},m)=>{let{imgProps:d}=Xt({src:n,alt:a}),b=a?.split(" ").map(y=>y[0]).join("");return jsxs("span",{className:classNames(fm({size:o,isDisabled:s}),"BaselineUI-Avatar",e),"data-disabled":s,ref:m,style:t,"aria-disabled":s,"data-block-id":c,"data-block-class":u,children:[n?jsx("img",{...d,loading:p,className:ym}):null,!i&&!n&&jsx(r,{size:o==="sm"?16:24}),i&&!n?o==="sm"?b[0]:b:null,l?jsx("div",{"data-testid":"notification",className:mm}):null]})});fo.displayName="Avatar";var bm="_1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z63l _1yep5z63m _1yep5z63n _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6jj _1yep5z6jk _1yep5z6jl",gm=z({defaultClassName:"_1x62fhb6 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6lp _1yep5z6lq _1yep5z6la _1yep5z6ld _1yep5z6ev _1yep5z69i _1yep5z69j _1yep5z69k",variantClassNames:{isHovered:{true:"_1yep5z610x"},isSelected:{true:"_1x62fhb8"},isFocusVisible:{true:"_1x62fhb9"},isDisabled:{true:"_1x62fhba _1yep5z6111"},variant:{primary:"_1x62fhbb _1yep5z6zy",ghost:"_1yep5z6101"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isSelected:true,isDisabled:false},"_1yep5z61n0"],[{variant:"primary",isSelected:true},"_1yep5z61o7"],[{variant:"ghost",isSelected:true,isFocusVisible:false},"_1x62fhbd"],[{variant:"ghost",isSelected:true,isDisabled:false},"_1yep5z61n7"],[{variant:"ghost",isDisabled:true,isSelected:true},"_1x62fhbe _1yep5z6ey"],[{variant:"primary",isHovered:true},"_1yep5z61o8"]]}),vm=z({defaultClassName:"_1x62fhb3 _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6j1 _1yep5z6j2 _1yep5z6j3",variantClassNames:{variant:{primary:"_1x62fhb4",ghost:"_1yep5z6vl _1yep5z6vm _1yep5z6vn"}},defaultVariants:{},compoundVariants:[]}),_m="_1x62fhbl",os=z({defaultClassName:"_1x62fhbf _1yep5z6f6",variantClassNames:{isHovered:{true:"_1yep5z6118"},isSelected:{true:"_1x62fhbh"},isDisabled:{true:"_1yep5z611a"},variant:{primary:"_1x62fhbj",ghost:"_1x62fhbk"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isSelected:true,isDisabled:false},"_1yep5z61nb"],[{variant:"ghost",isSelected:true,isDisabled:false},"_1yep5z61ng"],[{variant:"ghost",isDisabled:true,isSelected:true},"_1yep5z61nd"]]}),zm="_1yep5z6lu _1yep5z6lr _1yep5z6hx _1yep5z6lt",hm=z({defaultClassName:"_1x62fhb0 _1yep5z6ln _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3",variantClassNames:{variant:{primary:"_1yep5z6126",ghost:"_1x62fhb2"}},defaultVariants:{},compoundVariants:[]});var xm=({state:e,...t})=>{let o=ht.useRef(null),{tabPanelProps:r}=useTabPanel(t,e,o),{selectedItem:a}=e,{focusProps:n,isFocusVisible:i}=useFocusRing();if(!a?.value)return null;let{className:s,style:l,"data-block-id":p}=a.value;return jsx("div",{...mergeProps(r,n),ref:o,className:classNames({[zm]:i},"Baseline-Tabs-TabPanel",s),"data-block-id":p,style:l,children:a?.props.children})};var ns=ht.forwardRef(({className:e,style:t,tabHeaderStyle:o,tabHeaderClassName:r,variant:a="primary",actions:n,onRemove:i,"data-block-id":s,...l},p)=>{let c=useTabListState({...l,selectedKey:l.selectedValue,defaultSelectedKey:l.defaultSelectedValue,disabledKeys:l.disabledValues}),u=ht.useRef(null),{tabListProps:m}=useTabList({...l,selectedKey:l.selectedValue,defaultSelectedKey:l.defaultSelectedValue,disabledKeys:l.disabledValues},c,u);return jsxs("div",{className:classNames("BaselineUI-Tabs",e),style:t,ref:p,"data-block-id":s,children:[jsxs("div",{className:classNames(hm({variant:a}),r),style:o,children:[jsx("div",{...m,className:vm({variant:a}),ref:u,children:[...c.collection].map(d=>(invariant(d.value,"TabItem requires a value prop"),jsx(Pm,{item:d,state:c,onRemove:i,variant:a},d.key)))}),n?.map((d,b)=>jsx("div",{className:bm,children:jsx(L,{...d,variant:"secondary",size:"sm",className:classNames(_m,d.className)})},b))]}),jsx(xm,{state:c},c.selectedItem?.key)]})});ns.displayName="TabsBase";var Pm=({item:e,onRemove:t,state:o,variant:r})=>{let{key:a,value:n}=e,i=ht.useRef(null),{tabProps:s,isSelected:l,isDisabled:p}=useTab({key:a},o,i),{hoverProps:c,isHovered:u}=useHover({});invariant(n,"TabButton requires a value prop");let{title:m,icon:d,titleStyle:b,titleClassName:y}=n,{focusProps:f,isFocusVisible:g,isFocused:v}=useFocusRing(),{keyboardProps:_}=useKeyboard({onKeyDown:x=>{x.key==="Backspace"&&t?t(a):x.continuePropagation();}}),h=filterTruthyValues({"data-selected":l,"data-disabled":p,"data-focused":v,"data-hovered":u,"data-focus-visible":g});return jsxs("div",{...mergeProps(_,s,c,f,h),className:classNames(gm({isHovered:u,isSelected:l,isFocusVisible:g,isDisabled:p,variant:r}),"BaselineUI-Tabs-TabButton",y),style:b,ref:i,children:[d?jsx(d,{size:20,className:os({isHovered:u,isSelected:l,isDisabled:p,variant:r})}):null,m,t?jsx(L,{variant:"secondary",elementType:"div",icon:XIcon$3,size:"xxs",onPress:()=>{t(a);},excludeFromTabOrder:true,UNSAFE_NON_INTERACTIVE:true,style:{display:"inline-flex",opacity:l||v||u?1:0},className:os({isHovered:u,isSelected:l,isDisabled:p,variant:r})}):null]})};Pm.displayName="TabButton";var wm=ht.forwardRef(function({children:t,...o},r){let a=useMemo(()=>ht.Children.map(t,n=>!n||!ht.isValidElement(n)||typeof n.type=="string"?null:{...n.props,id:n.props.value}).filter(Boolean),[t]);return jsx(ns,{...o,ref:r,items:a,children:n=>jsx(Item,{title:n.title,children:n.children},n.key)})});wm.displayName="Tabs";var Im=({children:e,title:t,value:o})=>(invariant(o,"TabItem requires a value prop"),invariant(t,"TabItem requires a title prop"),invariant(e,"TabItem requires children"),e);Im.displayName="TabItem";var Rm={ar:{close:"\u0625\u063A\u0644\u0627\u0642"},cs:{close:"Zav\u0159\xEDt"},cy:{close:"Cau"},da:{close:"Luk"},de:{close:"Schlie\xDFen"},el:{close:"\u039A\u03BB\u03B5\u03AF\u03C3\u03B9\u03BC\u03BF"},"en-GB":{close:"Close"},en:{close:"Close"},es:{close:"Cerrar"},fi:{close:"Sulje"},"fr-CA":{close:"Fermer"},fr:{close:"Fermer"},he:{close:"\u05E1\u05D2\u05D9\u05E8\u05D4"},hr:{close:"Zatvori"},id:{close:"Tutup"},it:{close:"Chiudi"},ja:{close:"\u9589\u3058\u308B"},ko:{close:"\uB2EB\uAE30"},ms:{close:"Tutup"},"nb-NO":{close:"Lukk"},nl:{close:"Sluit"},pl:{close:"Zamknij"},"pt-PT":{close:"Fechar"},pt:{close:"Fechar"},ru:{close:"\u0417\u0430\u043A\u0440\u044B\u0442\u044C"},sk:{close:"Zavrie\u0165"},sl:{close:"Zapri"},sv:{close:"St\xE4ng"},th:{close:"\u0E1B\u0E34\u0E14"},tr:{close:"Kapat"},uk:{close:"\u0417\u0430\u043A\u0440\u0438\u0442\u0438"},"zh-Hans":{close:"\u5173\u95ED"},"zh-Hant":{close:"\u95DC\u9589"}};var $m=z({defaultClassName:"kfun6yt _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6af _1yep5z6ag _1yep5z6ah",variantClassNames:{arrangement:{single:"_1yep5z6vi _1yep5z6vj _1yep5z6vk",multi:"_1yep5z6157 _1yep5z6158 _1yep5z6159",compact:"_1yep5z6157 _1yep5z6158 _1yep5z6159"}},defaultVariants:{},compoundVariants:[]}),Tm=z({defaultClassName:"kfun6y0 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6ln",variantClassNames:{variant:{info:"_1yep5z611y",warning:"_1yep5z611u",error:"_1yep5z611m",success:"_1yep5z611q"},arrangement:{single:"kfun6y5 _1yep5z616m _1yep5z616n _1yep5z616o _1yep5z615m _1yep5z615n _1yep5z615o",multi:"kfun6y6",compact:"kfun6y7 _1yep5z6mc _1yep5z6md _1yep5z6me _1yep5z6oo _1yep5z6op _1yep5z6oq _1yep5z6pu _1yep5z6pv _1yep5z6pw _1yep5z6ni _1yep5z6nj _1yep5z6nk _1yep5z615d _1yep5z615e _1yep5z615f _1yep5z6wi _1yep5z6wj _1yep5z6wk"},hasButton:{true:"kfun6y8"},hasCloseButton:{true:"kfun6y9"}},defaultVariants:{},compoundVariants:[[{hasButton:false,arrangement:"single"},"_1yep5z618f _1yep5z618g _1yep5z618h _1yep5z61ar _1yep5z61as _1yep5z61at _1yep5z61bx _1yep5z61by _1yep5z61bz _1yep5z619l _1yep5z619m _1yep5z619n"],[{hasButton:true,arrangement:"compact"},"_1yep5z618f _1yep5z618g _1yep5z618h _1yep5z61ar _1yep5z61as _1yep5z61at _1yep5z61bx _1yep5z61by _1yep5z61bz _1yep5z619l _1yep5z619m _1yep5z619n"],[{hasCloseButton:true,arrangement:"compact"},"_1yep5z61af _1yep5z61ag _1yep5z61ah _1yep5z6199 _1yep5z619a _1yep5z619b"]]}),Sm=z({defaultClassName:"kfun6yq _1yep5z6eu",variantClassNames:{size:{sm:"_1yep5z6106",md:"_1yep5z6109"}},defaultVariants:{},compoundVariants:[]}),Dm=z({defaultClassName:"kfun6ym _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6jj _1yep5z6jk _1yep5z6jl",variantClassNames:{arrangement:{single:"kfun6yn",multi:"_1yep5z615j _1yep5z615k _1yep5z615l",compact:"_1yep5z6n6 _1yep5z6n7 _1yep5z6n8 _1yep5z6pi _1yep5z6pj _1yep5z6pk _1yep5z6qo _1yep5z6qp _1yep5z6qq _1yep5z6oc _1yep5z6od _1yep5z6oe _1yep5z6161 _1yep5z6162 _1yep5z6163"}},defaultVariants:{},compoundVariants:[]}),Mm=z({defaultClassName:"kfun6yh _1yep5z6lk",variantClassNames:{variant:{info:"_1yep5z610t",warning:"_1yep5z610p",error:"_1yep5z610h",success:"_1yep5z610l"}},defaultVariants:{},compoundVariants:[]}),Nm=z({defaultClassName:"kfun6ye _1yep5z6eu",variantClassNames:{size:{sm:"_1yep5z6108",md:"_1yep5z610b"}},defaultVariants:{},compoundVariants:[]}),Em=z({defaultClassName:"kfun6ya _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3",variantClassNames:{arrangement:{single:"_1yep5z615m _1yep5z615n _1yep5z615o",multi:"_1yep5z6r0 _1yep5z6r1 _1yep5z6r2 _1yep5z6tc _1yep5z6td _1yep5z6te",compact:"_1yep5z6157 _1yep5z6158 _1yep5z6159"}},defaultVariants:{},compoundVariants:[]});var YC={error:{sm:ErrorAltCircleFilledIcon$1,md:ErrorAltCircleFilledIcon},info:{sm:InfoCircleFilledIcon$1,md:InfoCircleFilledIcon},success:{sm:CheckmarkCircleFilledIcon,md:CheckCircleFilledIcon},warning:{sm:WarningFilledIcon$1,md:WarningFilledIcon}},La=ht.forwardRef(({className:e,description:t,actionLabel:o,onAction:r,style:a,variant:n="info",title:i,arrangement:s="single",onClose:l,size:p="sm","data-block-id":c,"data-block-class":u,elementProps:m},d)=>{let b=A(Rm),y=o&&jsx(K,{variant:s==="compact"?"tertiary":"ghost",label:o,onPress:r}),f=YC[n][p];return jsxs("div",{className:classNames(Tm({variant:n,arrangement:s,hasButton:!!o||!!l,hasCloseButton:!!l}),"BaselineUI-InlineAlert",e),"data-block-id":c,"data-block-class":u,style:a,role:"alert",ref:d,...m?.root,children:[jsxs("div",{className:Em({arrangement:s}),children:[jsx(f,{className:Mm({variant:n}),size:16}),jsxs("div",{className:$m({arrangement:s}),...m?.content,children:[jsx("h3",{className:Nm({size:p}),...m?.title,children:i}),jsx("section",{className:Sm({size:p}),...m?.description,children:t})]}),s==="compact"&&y]}),jsxs("div",{className:Dm({arrangement:s}),children:[s!=="compact"&&y,l?jsx(L,{variant:"secondary",icon:XIcon$2,size:"sm",onPress:l,"aria-label":b.formatMessage("close"),...m?.close}):null]})]})});La.displayName="InlineAlert";var pt={ar:{add:"\u0625\u0636\u0627\u0641\u0629",addColor:"\u0625\u0636\u0627\u0641\u0629 \u0644\u0648\u0646",cancel:"\u0625\u0644\u063A\u0627\u0621",colorFormat:"\u062A\u0646\u0633\u064A\u0642 \u0627\u0644\u0644\u0648\u0646",colorPresets:"\u0627\u0644\u0623\u0644\u0648\u0627\u0646 \u0627\u0644\u0645\u0633\u0628\u0642\u0629",customColors:"\u0623\u0644\u0648\u0627\u0646 \u0645\u062E\u0635\u0635\u0629",newColor:"\u0644\u0648\u0646 \u0645\u062E\u0635\u0635 \u062C\u062F\u064A\u062F",noColor:"\u0644\u0627 \u064A\u0648\u062C\u062F",removeColor:"\u0625\u0632\u0627\u0644\u0629 \u0627\u0644\u0644\u0648\u0646",transparent:"\u0634\u0641\u0627\u0641"},cs:{add:"P\u0159idat",addColor:"P\u0159idat barvu",cancel:"Zru\u0161it",colorFormat:"Form\xE1t barvy",colorPresets:"P\u0159edvolby barev",customColors:"Vlastn\xED barvy",newColor:"Vlastn\xED barva",noColor:"Nen\xED",removeColor:"Odebrat barvu",transparent:"Pr\u016Fhledn\xE1"},cy:{add:"Ychwanegu",addColor:"Ychwanegu Lliw",cancel:"Canslo",colorFormat:"Fformat Lliw",colorPresets:"Rhagosodiadau Lliw",customColors:"Lliwiau Custom",newColor:"Lliw Personol Newydd",noColor:"Dim",removeColor:"Tynnu Lliw",transparent:"Tryloyw"},da:{add:"Tilf\xF8j",addColor:"Tilf\xF8j Farve",cancel:"Annuller",colorFormat:"Farveformat",colorPresets:"Farvevalg",customColors:"Brugerdefinerede farver",newColor:"Ny tilpasset farve",noColor:"Ingen",removeColor:"Fjern Farve",transparent:"Transparent"},de:{add:"Hinzuf\xFCgen",addColor:"Farbe hinzuf\xFCgen",cancel:"Abbrechen",colorFormat:"Farbformat",colorPresets:"Farbvorlagen",customColors:"Benutzerdefinierte Farben",newColor:"Neue benutzerdefinierte Farbe",noColor:"Kein",removeColor:"Farbe entfernen",transparent:"Transparent"},el:{add:"\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7",addColor:"\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03A7\u03C1\u03CE\u03BC\u03B1\u03C4\u03BF\u03C2",cancel:"\u0391\u03BA\u03CD\u03C1\u03C9\u03C3\u03B7",colorFormat:"\u039C\u03BF\u03C1\u03C6\u03AE \u03C7\u03C1\u03CE\u03BC\u03B1\u03C4\u03BF\u03C2",colorPresets:"\u03A0\u03C1\u03BF\u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AD\u03C2 \u03C7\u03C1\u03C9\u03BC\u03AC\u03C4\u03C9\u03BD",customColors:"\u03A0\u03C1\u03BF\u03C3\u03B1\u03C1\u03BC\u03BF\u03C3\u03BC\u03AD\u03BD\u03B1 \u03A7\u03C1\u03CE\u03BC\u03B1\u03C4\u03B1",newColor:"\u039D\u03AD\u03BF \u03C0\u03C1\u03BF\u03C3\u03B1\u03C1\u03BC\u03BF\u03C3\u03BC\u03AD\u03BD\u03BF \u03C7\u03C1\u03CE\u03BC\u03B1",noColor:"\u039A\u03B1\u03BD\u03AD\u03BD\u03B1\u03C2",removeColor:"\u0391\u03C6\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7 \u03A7\u03C1\u03CE\u03BC\u03B1\u03C4\u03BF\u03C2",transparent:"\u0397\u03BC\u03B9\u03B4\u03B9\u03B1\u03C6\u03B1\u03BD\u03AE\u03C2"},"en-GB":{add:"Add",addColor:"Add Colour",cancel:"Cancel",colorFormat:"Colour Format",colorPresets:"Colour Presets",customColors:"Custom Colours",newColor:"New Custom Colour",noColor:"None",removeColor:"Remove Colour",transparent:"Transparent"},en:{add:"Add",addColor:"Add Color",cancel:"Cancel",colorFormat:"Color Format",colorPresets:"Color Presets",customColors:"Custom Colors",newColor:"New Custom Color",noColor:"None",removeColor:"Remove Color",transparent:"Transparent"},es:{add:"A\xF1adir",addColor:"A\xF1adir color",cancel:"Cancelar",colorFormat:"Formato de color",colorPresets:"Preajustes de color",customColors:"Colores personalizados",newColor:"Nuevo color personalizado",noColor:"Ninguna",removeColor:"Eliminar color",transparent:"Transparente"},fi:{add:"Lis\xE4\xE4",addColor:"Lis\xE4\xE4 v\xE4ri",cancel:"Kumoa",colorFormat:"V\xE4rimuoto",colorPresets:"V\xE4rin esiasetukset",customColors:"Mukautetut v\xE4rit",newColor:"Uusi muokattu v\xE4ri",noColor:"Ei mit\xE4\xE4n",removeColor:"Poista v\xE4ri",transparent:"L\xE4pin\xE4kyv\xE4"},"fr-CA":{add:"Ajouter",addColor:"Ajouter une couleur",cancel:"Annuler",colorFormat:"Format de couleur",colorPresets:"Pr\xE9r\xE9glages de couleur",customColors:"Couleurs personnalis\xE9es",newColor:"Nouvelle couleur personnalis\xE9e",noColor:"Aucune",removeColor:"Supprimer la couleur",transparent:"Transparent"},fr:{add:"Ajouter",addColor:"Ajouter une couleur",cancel:"Annuler",colorFormat:"Format de couleur",colorPresets:"Pr\xE9r\xE9glages de couleur",customColors:"Couleurs personnalis\xE9es",newColor:"Nouvelle couleur personnalis\xE9e",noColor:"Aucune",removeColor:"Supprimer la couleur",transparent:"Transparent"},he:{add:"\u05D4\u05D5\u05E1\u05E4\u05D4",addColor:"\u05D4\u05D5\u05E1\u05E3 \u05E6\u05D1\u05E2",cancel:"\u05D1\u05D9\u05D8\u05D5\u05DC",colorFormat:"\u05E4\u05D5\u05E8\u05DE\u05D8 \u05E6\u05D1\u05E2",colorPresets:"\u05DE\u05E6\u05D1\u05D9 \u05E6\u05D1\u05E2 \u05DE\u05EA\u05D5\u05DB\u05E0\u05EA\u05D9\u05DD",customColors:"\u05E6\u05D1\u05E2\u05D9\u05DD \u05DE\u05D5\u05EA\u05D0\u05DE\u05D9\u05DD \u05D0\u05D9\u05E9\u05D9\u05EA",newColor:"\u05E6\u05D1\u05E2 \u05DE\u05D5\u05EA\u05D0\u05DD \u05D0\u05D9\u05E9\u05D9\u05EA \u05D7\u05D3\u05E9",noColor:"\u05DC\u05DC\u05D0",removeColor:"\u05D4\u05E1\u05E8 \u05E6\u05D1\u05E2",transparent:"\u05E9\u05E7\u05D5\u05E3"},hr:{add:"Dodati",addColor:"Dodaj boju",cancel:"Otka\u017Ei",colorFormat:"Format boje",colorPresets:"Prijedlozi boja",customColors:"Prilago\u0111ene boje",newColor:"Nova prilago\u0111ena boja",noColor:"Prazno",removeColor:"Ukloni boju",transparent:"Prozirna"},id:{add:"Tambah",addColor:"Tambah Warna",cancel:"Batalkan",colorFormat:"Format Warna",colorPresets:"Preset Warna",customColors:"Warna Kustom",newColor:"Warna Khusus Baru",noColor:"Tidak ada",removeColor:"Hapus Warna",transparent:"Transparan"},it:{add:"Aggiungi",addColor:"Aggiungi colore",cancel:"Annulla",colorFormat:"Formato del colore",colorPresets:"Colori predefiniti",customColors:"Colori personalizzati",newColor:"Nuovo colore personalizzato",noColor:"Nessuno",removeColor:"Rimuovi colore",transparent:"Trasparente"},ja:{add:"\u8FFD\u52A0",addColor:"\u8272\u3092\u8FFD\u52A0",cancel:"\u30AD\u30E3\u30F3\u30BB\u30EB",colorFormat:"\u30AB\u30E9\u30FC\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8",colorPresets:"\u30AB\u30E9\u30FC\u30D7\u30EA\u30BB\u30C3\u30C8",customColors:"\u30AB\u30B9\u30BF\u30E0\u30AB\u30E9\u30FC",newColor:"\u65B0\u898F\u30AB\u30B9\u30BF\u30E0\u30AB\u30E9\u30FC",noColor:"\u306A\u3057",removeColor:"\u8272\u3092\u524A\u9664",transparent:"\u900F\u660E"},ko:{add:"\uCD94\uAC00",addColor:"\uC0C9\uC0C1 \uCD94\uAC00",cancel:"\uCDE8\uC18C",colorFormat:"\uC0C9\uC0C1 \uD615\uC2DD",colorPresets:"\uC0C9\uC0C1 \uBBF8\uB9AC\uC124\uC815",customColors:"\uC0AC\uC6A9\uC790 \uC815\uC758 \uC0C9\uC0C1",newColor:"\uC0C8\uB85C\uC6B4 \uC0AC\uC6A9\uC790\uC9C0\uC815 \uC0C9\uC0C1",noColor:"\uC5C6\uC74C",removeColor:"\uC0C9\uC0C1 \uC81C\uAC70",transparent:"\uD22C\uBA85"},ms:{add:"Tambah",addColor:"Tambah Warna",cancel:"Batal",colorFormat:"Format Warna",colorPresets:"Praset Warna",customColors:"Warna Kustom",newColor:"Warna Tersuai Baharu",noColor:"Tiada",removeColor:"Buang Warna",transparent:"Lut Sinar"},"nb-NO":{add:"Legg til",addColor:"Legg til farge",cancel:"Avbryt",colorFormat:"Fargeformat",colorPresets:"Fargeinnstillinger",customColors:"Egendefinerte farger",newColor:"Ny tilpasset farge",noColor:"Ingen",removeColor:"Fjern farge",transparent:"Gjennomsiktig"},nl:{add:"Voeg toe",addColor:"Kleur toevoegen",cancel:"Annuleer",colorFormat:"Kleurformaat",colorPresets:"Kleurvoorinstellingen",customColors:"Aangepaste kleuren",newColor:"Nieuwe aangepaste kleur",noColor:"Geen",removeColor:"Kleur verwijderen",transparent:"Doorzichtig"},pl:{add:"Dodaj",addColor:"Dodaj kolor",cancel:"Anuluj",colorFormat:"Format koloru",colorPresets:"Wst\u0119pnie ustawione kolory",customColors:"Niestandardowe kolory",newColor:"Nowy kolor niestandardowy",noColor:"Brak",removeColor:"Usu\u0144 kolor",transparent:"Prze\u015Bwiecaj\u0105ce"},"pt-PT":{add:"Adicionar",addColor:"Adicionar cor",cancel:"Cancelar",colorFormat:"Formato de cor",colorPresets:"Predefini\xE7\xF5es de cor",customColors:"Cores personalizadas",newColor:"Nova cor personalizada",noColor:"Nenhum",removeColor:"Remover cor",transparent:"Transparente"},pt:{add:"Adicionar",addColor:"Adicionar cor",cancel:"Cancelar",colorFormat:"Formato de cor",colorPresets:"Pr\xE9-ajustes de Cores",customColors:"Cores personalizadas",newColor:"Nova Cor Personalizada",noColor:"Nenhum",removeColor:"Remover cor",transparent:"Transparente"},ru:{add:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C",addColor:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0446\u0432\u0435\u0442",cancel:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C",colorFormat:"\u0424\u043E\u0440\u043C\u0430\u0442 \u0446\u0432\u0435\u0442\u0430",colorPresets:"\u0411\u0438\u0431\u043B\u0438\u043E\u0442\u0435\u043A\u0430 \u0446\u0432\u0435\u0442\u043E\u0432",customColors:"\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0435 \u0446\u0432\u0435\u0442\u0430",newColor:"\u041D\u043E\u0432\u044B\u0439 \u0441\u043E\u0431\u0441\u0442\u0432\u0435\u043D\u043D\u044B\u0439 \u0446\u0432\u0435\u0442",noColor:"\u041D\u0435\u0442",removeColor:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0446\u0432\u0435\u0442",transparent:"\u041F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u0439"},sk:{add:"Prida\u0165",addColor:"Prida\u0165 farbu",cancel:"Zru\u0161i\u0165",colorFormat:"Form\xE1t farby",colorPresets:"Predvo\u013Eby farieb",customColors:"Vlastn\xE9 farby",newColor:"Vlastn\xE1 farba",noColor:"\u017Diadny",removeColor:"Odstr\xE1ni\u0165 farbu",transparent:"Prieh\u013Eadn\xE1"},sl:{add:"Dodaj",addColor:"Dodaj barvo",cancel:"Prekli\u010Di",colorFormat:"Barvni format",colorPresets:"Barvne predloge",customColors:"Prilagojene barve",newColor:"Nova barva po meri",noColor:"Prazna stran",removeColor:"Odstrani barvo",transparent:"Prosojna"},sv:{add:"L\xE4gg till",addColor:"L\xE4gg till f\xE4rg",cancel:"Avbryt",colorFormat:"F\xE4rgformat",colorPresets:"F\xF6rval f\xF6r f\xE4rger",customColors:"Anpassade f\xE4rger",newColor:"Ny anpassad f\xE4rg",noColor:"Ingen",removeColor:"Ta bort f\xE4rg",transparent:"Genomskinligt"},th:{add:"\u0E40\u0E1E\u0E34\u0E48\u0E21",addColor:"\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E2A\u0E35",cancel:"\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01",colorFormat:"\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E2A\u0E35",colorPresets:"\u0E04\u0E48\u0E32\u0E2A\u0E35\u0E17\u0E35\u0E48\u0E15\u0E31\u0E49\u0E07\u0E44\u0E27\u0E49\u0E25\u0E48\u0E27\u0E07\u0E2B\u0E19\u0E49\u0E32",customColors:"\u0E2A\u0E35\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E40\u0E2D\u0E07",newColor:"\u0E2A\u0E35\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E40\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48",noColor:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E40\u0E25\u0E22",removeColor:"\u0E25\u0E1A\u0E2A\u0E35",transparent:"\u0E42\u0E1B\u0E23\u0E48\u0E07\u0E43\u0E2A"},tr:{add:"Ekle",addColor:"Renk Ekle",cancel:"Vazge\xE7",colorFormat:"Renk Format\u0131",colorPresets:"Renk \xD6nayarlar\u0131",customColors:"\xD6zel Renkler",newColor:"Yeni \xF6zel renk",noColor:"Hi\xE7biri",removeColor:"Rengi Kald\u0131r",transparent:"\u015Eeffaf"},uk:{add:"\u0414\u043E\u0434\u0430\u0442\u0438",addColor:"\u0414\u043E\u0434\u0430\u0442\u0438 \u043A\u043E\u043B\u0456\u0440",cancel:"\u0421\u043A\u0430\u0441\u0443\u0432\u0430\u0442\u0438",colorFormat:"\u0424\u043E\u0440\u043C\u0430\u0442 \u043A\u043E\u043B\u044C\u043E\u0440\u0443",colorPresets:"\u0411\u0456\u0431\u043B\u0456\u043E\u0442\u0435\u043A\u0430 \u043A\u043E\u043B\u044C\u043E\u0440\u0456\u0432",customColors:"\u041A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0446\u044C\u043A\u0456 \u043A\u043E\u043B\u044C\u043E\u0440\u0438",newColor:"\u041D\u043E\u0432\u0438\u0439 \u0432\u043B\u0430\u0441\u043D\u0438\u0439 \u043A\u043E\u043B\u0456\u0440",noColor:"\u041D\u0435\u043C\u0430\u0454",removeColor:"\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438 \u043A\u043E\u043B\u0456\u0440",transparent:"\u041F\u0440\u043E\u0437\u043E\u0440\u0438\u0439"},"zh-Hans":{add:"\u6DFB\u52A0",addColor:"\u6DFB\u52A0\u989C\u8272",cancel:"\u53D6\u6D88",colorFormat:"\u989C\u8272\u683C\u5F0F",colorPresets:"\u989C\u8272\u9884\u8BBE",customColors:"\u81EA\u5B9A\u4E49\u989C\u8272",newColor:"\u65B0\u81EA\u5B9A\u4E49\u989C\u8272",noColor:"\u65E0",removeColor:"\u79FB\u9664\u989C\u8272",transparent:"\u900F\u660E"},"zh-Hant":{add:"\u52A0\u5165",addColor:"\u6DFB\u52A0\u984F\u8272",cancel:"\u53D6\u6D88",colorFormat:"\u984F\u8272\u683C\u5F0F",colorPresets:"\u984F\u8272\u9810\u8A2D\u9805",customColors:"\u81EA\u8A02\u984F\u8272",newColor:"\u65B0\u81EA\u8A02\u984F\u8272",noColor:"\u7121",removeColor:"\u79FB\u9664\u984F\u8272",transparent:"\u900F\u660E"}};var Ba=({children:e})=>{let{triggerProps:t}=ht.useContext(Pt);return jsx(PressResponder,{...t,children:e})};Ba.displayName="ModalTrigger";var oP=({children:e})=>{let{state:t}=ht.useContext(Pt);return jsx(PressResponder,{onPress:()=>{t?.close();},children:e})};var Lm="_1dbkl53 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6ln",Bm="_1dbkl5e",Am=z({defaultClassName:"_1dbkl54 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6ly _1yep5z6lq _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6eu _1yep5z6lp _1yep5z6dy",variantClassNames:{isHovered:{true:"_1dbkl55"},isFocusVisible:{true:"_1dbkl56"},isDisabled:{true:"z9nup82 _1yep5z6111"},labelPosition:{top:"_1dbkl58",start:"_1dbkl59"}},defaultVariants:{},compoundVariants:[]}),Fm="_1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6kj _1yep5z6kk _1yep5z6kl",jm=z({defaultClassName:"_1dbkl50 _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6dy _1yep5z6ev",variantClassNames:{labelPosition:{top:"_1yep5z6oi _1yep5z6oj _1yep5z6ok",start:"_1dbkl52"}},defaultVariants:{},compoundVariants:[]}),Aa="_1dbkl5l _1yep5z6iy _1yep5z6iz _1yep5z6j0 _1yep5z69f _1yep5z69g _1yep5z69h",Om="_1dbkl5f z9nup86",Fa="_1dbkl5m _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6id _1yep5z6ie _1yep5z6if",Hm="_1dbkl5k _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6lq",Vm="_1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6kj _1yep5z6kk _1yep5z6kl _1yep5z6dy _1yep5z6ev _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6jj _1yep5z6jk _1yep5z6jl",ja=z({defaultClassName:"_1dbkl5h _1dbkl5g _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6g1",variantClassNames:{includesCustomColorPicker:{true:"_1yep5z6n6 _1yep5z6n7 _1yep5z6n8"}},defaultVariants:{},compoundVariants:[]}),ls="_1dbkl5v _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3",Um=z({defaultClassName:"_1dbkl5q _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6br _1yep5z6bs _1yep5z6bt _1yep5z6d3 _1yep5z6d4 _1yep5z6d5 _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6lz _1yep5z6h4 _1yep5z6lq _1yep5z6eu _1yep5z6dy",variantClassNames:{isFocused:{true:"_1dbkl5r _1yep5z6134"},isHovered:{true:"_1dbkl5s"},allowAlpha:{false:"_1yep5z6x9 _1yep5z6xa _1yep5z6xb _1yep5z6yl _1yep5z6ym _1yep5z6yn _1yep5z617q"}},defaultVariants:{},compoundVariants:[[{isHovered:true,isFocused:false},"_1yep5z61pb"]]}),qm=z({defaultClassName:"_1dbkl5a _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62c _1yep5z62d _1yep5z62e _1yep5z63i _1yep5z63j _1yep5z63k _1yep5z616 _1yep5z617 _1yep5z618 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j4 _1yep5z6j5 _1yep5z6j6 _1yep5z69c _1yep5z69d _1yep5z69e _1yep5z6f5 _1yep5z6lp _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6la _1yep5z6ld",variantClassNames:{isHovered:{true:"_1yep5z6126"},isFocusVisible:{true:"_1yep5z617w _1yep5z617u _1yep5z617x _1yep5z6140"},isDisabled:{true:"_1yep5z611a"}},defaultVariants:{},compoundVariants:[]}),Oa="_1dbkl5g",dr="_1dbkl5u",Ha="_1dbkl5j _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j4 _1yep5z6j5 _1yep5z6j6 _1yep5z69f _1yep5z69g _1yep5z69h",ps="_1dbkl5x",Km="_1dbkl5w",cs="_1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j4 _1yep5z6j5 _1yep5z6j6 _1yep5z69l _1yep5z69m _1yep5z69n",Va=z({defaultClassName:"_1dbkl5n _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6lu _1yep5z6ig _1yep5z6ih _1yep5z6ii _1yep5z6lz _1yep5z6m2",variantClassNames:{isFocusVisible:{true:"_1dbkl5o _1yep5z617u _1yep5z6140 _1yep5z617w"}},defaultVariants:{},compoundVariants:[]}),ds="z9nup83 z9nup85 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6lg _1yep5z6lh _1yep5z6lj _1yep5z6li _1yep5z6ig _1yep5z6ih _1yep5z6ii";var Gm=z({defaultClassName:"_1344e9q0 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6id _1yep5z6ie _1yep5z6if _1yep5z6lk _1yep5z6ic _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6kd _1yep5z6ke _1yep5z6kf",variantClassNames:{isFocusVisible:{true:"_1344e9q1"},isDisabled:{true:"_1344e9q2"},removeBlendMode:{true:"_1344e9q3"},isSelected:{true:"_1yep5z617w _1yep5z617u _1yep5z6140 _1yep5z617z"},isHovered:{true:"_1344e9q5"}},defaultVariants:{},compoundVariants:[[{isSelected:false,isFocusVisible:true},"_1344e9q6"],[{isSelected:true,isFocusVisible:true},"_1344e9q7 _1yep5z61tz _1yep5z61tx _1yep5z61q3 _1yep5z61u2"],[{isSelected:true,isDisabled:true},"_1yep5z61tz _1yep5z61tx _1yep5z61q3 _1yep5z61u2 _1yep5z61qd"],[{isHovered:true,isSelected:false},"_1yep5z61u2 _1yep5z61tz _1yep5z61tx _1yep5z61q7"]]}),Wm="_1yep5z6f6",Ym="_1344e9q9 _1yep5z6fl";var ct=ht.forwardRef(({color:e,isFocusVisible:t,isSelected:o,isInteractive:r,isDisabled:a,style:n,className:i,id:s,tooltip:l,isIndeterminate:p,indeterminateIcon:c=HelpIcon,"data-block-id":u,"data-block-class":m,...d},b)=>{let y=e&&e!==Be&&(typeof e=="string"?parseColor(e):e),{formatMessage:f}=A(),g=!y,{colorSwatchProps:v}=useColorSwatch({color:g?"#000000":e}),{hoverProps:_,isHovered:h}=useHover({isDisabled:a||!r}),x=filterTruthyValues({"data-focus-visible":t,"data-selected":o,"data-hovered":h,"data-block-id":u,"data-block-class":m,"data-disabled":a,"data-interactive":r,"data-indeterminate":p}),w=g?f(Xm.none):v["aria-label"],C=d["aria-label"]??w,{tooltipProps:I}=ze({tooltip:l,label:C}),P=jsx("div",{...mergeProps(_,x,g?{}:v),style:n,"aria-label":g?f(Xm.none):v["aria-label"],role:"img",className:classNames(Gm({removeBlendMode:g,isFocusVisible:t,isDisabled:!!a,isSelected:!!o,isHovered:h}),"BaselineUI-ColorSwatch",i),ref:b,id:s,...d,children:jsxs(D,{display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"full",height:"full",width:"full",opacity:a?"medium":void 0,style:y&&!p?Zm(y,4):void 0,children:[g&&!p?jsx("div",{className:Ym}):null,p&&c?jsx(c,{role:"presentation",size:16,className:Wm,"aria-hidden":"true"}):null]})});return I&&!a?jsx(J,{...I,children:jsx(ba,{children:P})}):P});ct.displayName="ColorSwatch";var Xm=W({none:{id:"none",defaultMessage:"None"}});var Qm=[{id:"hex",label:"HEX"},{id:"rgb",label:"RGB"}],fr=parseColor("#000000").toFormat("hsla"),de="hsla",mr="hexa";function Rt(e){return typeof e=="string"?parseColor(e).toFormat(de):e?e.toFormat(de):null}function ef(e,t){return e?.getChannelValue("alpha")?t?.toString(mr)===e.toString(mr):!t?.getChannelValue("alpha")}function tf(e,t,o){return t?.label?t.label:e?.getChannelValue("alpha")===0?o:e?.toString("rgba")}var Be="NONE";function of(e,t){let o=t?.map(a=>({id:parseColor(a.color).toString(mr),label:a.label}))||[],r={id:Be,label:e};return [...o,r]}var Ua=(e,{optionProps:t,isFocusVisible:o,isSelected:r},a)=>(invariant(e.value&&"label"in e.value,"Item must have label"),jsx("li",{...t,ref:a,className:Hm,children:jsx(ct,{color:e.value.id,isFocusVisible:o,isSelected:r,"aria-label":e.value.label,isInteractive:true})})),Zm=(e,t=4)=>{let o=e.getChannelValue("alpha")===0,r=`repeating-conic-gradient(transparent 0% 25%, ${themeVars.color.background.secondary.medium} 25% 50%)`;return {backgroundImage:o?r:`linear-gradient(${e.toString("hexa")}, ${e.toString("hexa")}), ${r}`,backgroundSize:`${t}px ${t}px`}};var af=({value:e,...t})=>{let o=ht.useRef(null),r=ht.useRef(null),a=ht.useRef(null),n=useColorAreaState({...t,value:e}),{colorAreaProps:i,xInputProps:s,yInputProps:l,thumbProps:p}=useColorArea({...t,value:e,inputXRef:o,inputYRef:r,containerRef:a},n);useEffect(()=>{o.current?.focus();},[]);let{focusProps:c,isFocusVisible:u}=useFocusRing();return jsx("div",{ref:a,...i,className:classNames(Lm,"BaselineUI-ColorInput-ColorArea"),children:jsxs("div",{...p,className:classNames(Va({isFocusVisible:u}),"BaselineUI-ColorInput-ColorAreaThumb"),style:{...p.style,transform:"translate(-50%, -50%)",backgroundColor:Rt(e)?.withChannelValue("alpha",1).toString("css")},children:[jsx("input",{ref:o,...s,...c}),jsx("input",{ref:r,...l,...c})]})})};var lf=({color:e,setColor:t,allowAlpha:o,...r})=>{let a=useColorFieldState({value:e,onChange:u=>{t(Rt(u)?.toFormat(de).withChannelValue("alpha",e.getChannelValue("alpha")??1)||fr);}}),n=ht.useRef(null),{inputProps:i}=useColorField({...r,"aria-label":"Hex"},a,n),{focusProps:s,isFocused:l}=useFocusRing({isTextInput:true}),{hoverProps:p,isHovered:c}=useHover({});return jsxs("div",{className:classNames(ls,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":o?"hexa":"hex",children:[jsx("input",{...mergeProps(i,s,p),ref:n,className:Um({isFocused:l,isHovered:c,allowAlpha:o})}),o?jsx(cf,{color:e,setColor:t}):null]})},pf=({color:e,setColor:t,allowAlpha:o})=>{let r=e.toFormat("rgba"),{locale:a}=useLocale();return jsxs("div",{className:classNames(ls,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":o?"rgba":"rgb",children:[jsx(Ve,{"aria-label":e.getChannelName("red",a),value:r.getChannelValue("red"),showStepper:false,className:dr,onChange:n=>{t(r.withChannelValue("red",n).toFormat(de));},step:1,minValue:0,maxValue:255}),jsx(Ve,{"aria-label":e.getChannelName("green",a),value:r.getChannelValue("green"),showStepper:false,className:dr,onChange:n=>{t(r.withChannelValue("green",n).toFormat(de));},step:1,minValue:0,maxValue:255}),jsx(Ve,{"aria-label":e.getChannelName("blue",a),value:r.getChannelValue("blue"),showStepper:false,className:dr,onChange:n=>{t(r.withChannelValue("blue",n).toFormat(de));},step:1,minValue:0,maxValue:255}),o?jsx(cf,{color:e,setColor:t}):null]})},IP={style:"percent",maximumFractionDigits:0},cf=({color:e,setColor:t})=>{let{locale:o}=useLocale(),r=useCallback(a=>{t(e.withChannelValue("alpha",a));},[e,t]);return jsx(Ve,{"aria-label":e.getChannelName("alpha",o),value:e.getChannelValue("alpha"),formatOptions:IP,className:dr,showStepper:false,onChange:r,minValue:0,maxValue:1})};var ys=({channel:e,...t})=>{let{locale:o}=useLocale(),r=useColorSliderState({...t,channel:e,locale:o}),a=ht.useRef(null),n=ht.useRef(null),{trackProps:i,thumbProps:s,inputProps:l}=useColorSlider({...t,channel:e,trackRef:a,inputRef:n,"aria-label":r.value.getChannelName(e,o)},r),{focusProps:p,isFocusVisible:c}=useFocusRing();return jsxs("div",{className:classNames(Fa,{[zc({size:"xs"})]:e==="alpha"},"BaselineUI-ColorInput-ColorSlider"),"data-channel":e,...i,ref:a,children:[e==="alpha"&&jsx("div",{className:ds}),jsx("div",{className:Fa,style:i.style}),jsxs("div",{className:classNames(Va({isFocusVisible:c}),"BaselineUI-ColorInput-ColorSliderThumb"),...s,children:[jsx("div",{className:ds,style:{backgroundColor:"#ffffff"}}),jsx("div",{style:{backgroundColor:r.getDisplayColor().toString("css"),height:8},className:Fa}),jsx(VisuallyHidden,{children:jsx("input",{ref:n,...l,...p})})]})]})};var qa=({color:e,setColor:t,allowAlpha:o,onChangeEnd:r})=>{let[a,n]=ht.useState("hex"),{formatMessage:i}=A(pt);return jsxs(Fragment,{children:[jsx(af,{value:e,xChannel:"saturation",yChannel:"lightness",onChange:t,onChangeEnd:r}),jsxs("div",{className:cs,children:[jsx(ys,{channel:"hue",value:e,onChange:t,onChangeEnd:r}),o?jsx(ys,{channel:"alpha",value:e,onChange:t,onChangeEnd:r}):null]}),jsxs("div",{className:classNames(cs,sprinkles.variants({paddingTop:"none",gap:"sm"})),children:[jsx(lt,{label:i("colorFormat"),labelPosition:"start",variant:"ghost",items:Qm,selectedKey:a,onSelectionChange:s=>{n(s);}}),a==="hex"&&jsx(lf,{color:e,setColor:s=>{t(s),r?.(s);},allowAlpha:o}),a==="rgb"&&jsx(pf,{color:e,setColor:s=>{t(s),r?.(s);},allowAlpha:o})]})]})};var gf=({color:e,setColor:t,storePickedColorKey:o,addColorButtonLabel:r,removeColorButtonLabel:a,customColorsLabel:n,pickerMode:i,allowAlpha:s})=>{let{locale:l}=useLocale(),{formatMessage:p}=A(pt),c=ht.useRef(null),u=Ne(c.current),[m,d]=yc(o,[]),b=ht.useRef(null),[y,f]=ht.useState(e),g=ht.useMemo(()=>m.map(C=>({id:C,label:parseColor(C).getColorName(l),description:C})),[m,l]),v=useCallback(()=>{let C=i==="active"?e:y;if(m.includes(C.toString(de))){b.current?.querySelector(`[data-key='${C.toString(de)}']`)?.classList.add(ps);return}d([...m,C.toString(de)]);},[m,e,d,y,i]);useEffect(()=>{let C=b.current;function I(P){P.animationName===Km&&P.target?.classList.remove(ps);}return C?.addEventListener("animationend",I),()=>{C?.removeEventListener("animationend",I);}},[]);let _=useId(),h=jsx(L,{ref:c,variant:"secondary",size:"md","aria-label":r,icon:PlusIcon$1,onPress:i==="active"?v:void 0}),x=useCallback(C=>jsxs(Pe,{size:"content",className:ja({includesCustomColorPicker:true}),style:{paddingBlockEnd:0},"aria-label":p("newColor"),children:[jsx(qa,{color:y,setColor:f,allowAlpha:s}),jsx(q,{}),jsx(D,{padding:"lg",display:"flex",flexDirection:"row-reverse",children:jsxs(D,{display:"inline-flex",gap:"lg",children:[jsx(K,{label:p("cancel"),size:"sm",variant:"secondary",onPress:C}),jsx(K,{label:p("add"),variant:"primary",onPress:()=>{v(),C();},size:"sm"})]})})]}),[y,v,p,s]),w=useCallback(C=>{invariant(C instanceof Set,"Key must be a set");let I=[...C][0];I&&t(parseColor(I).toFormat(de));},[t]);return jsxs(Fragment,{children:[jsx(q,{}),jsxs("div",{className:classNames(Vm,"BaselineUI-ColorInput-CustomColors"),children:[jsx("span",{id:_,children:n}),jsxs(D,{display:"flex",children:[!!m.length&&m.includes(e.toString(de))&&jsx(L,{variant:"secondary",size:"md",elementType:"div",icon:MinusIcon$2,"aria-label":a,onPress:()=>{d(m.filter(C=>C!==e.toString(de)));}}),i==="active"&&h,i==="lazy"&&(u==="mobile"?jsxs(Ee,{children:[jsx(Ba,{children:h}),jsx(Ue,{style:{zIndex:1e5},children:({close:C})=>x(C)})]}):jsxs(je,{type:"dialog",children:[jsx(Oe,{children:h}),jsx(Le,{placement:"right top",className:Oa,offset:6,children:({close:C})=>x(C)})]}))]})]}),!!m.length&&jsx(fe,{items:g,layout:"grid","aria-labelledby":_,className:classNames(Aa,Ha,sprinkles.variants({paddingTop:"xs"}),"BaselineUI-ColorInput-CustomColorsListBox"),renderOption:Ua,ref:b,autoFocus:false,selectionMode:"single",selectedKeys:[e.toString(de)],onSelectionChange:w})]})};var vs=ht.forwardRef(({setColor:e,color:t,triggerRef:o,autoFocus:r,presets:a,state:n},i)=>{let{formatMessage:s}=A(pt),l=useCallback(p=>{if(p instanceof Set&&p.size){let c=[...p][0],u=a.find(m=>m.id===c);invariant(u,"Preset not found"),e(u.id===Be?null:parseColor(u.id).toFormat(de)),n.close();}},[n,a,e]);return jsx("div",{className:classNames(Ha,"BaselineUI-ColorInput-Presets"),style:{minWidth:o.current?.offsetWidth},ref:i,children:jsx(fe,{autoFocus:r,items:a,layout:"grid","aria-label":s("colorPresets"),className:Aa,renderOption:Ua,selectionMode:"single",selectedKeys:[t?.toString(mr)||Be],onSelectionChange:l})})});vs.displayName="ColorPresetList";var br=ht.forwardRef(({color:e,colorLabel:t,colorName:o,isIndeterminate:r,indeterminateIcon:a,...n},i)=>{let s=ht.useRef(null),{hoverProps:l,isHovered:p}=useHover({isDisabled:n.isDisabled}),{buttonProps:c,isPressed:u}=useButton(n,s),{isFocusVisible:m,focusProps:d}=useFocusRing(),b=filterTruthyValues({"data-block-id":n["data-block-id"],"data-focused":m,"data-focus-visible":m,"data-disabled":n.isDisabled,"data-hovered":p,"data-pressed":u}),y=Fr(),f=Fr();return jsxs("button",{...mergeProps(c,l,d,b),style:n.style,className:classNames(Am({isHovered:p,isFocusVisible:m||n.isOpen,isDisabled:n.isDisabled,labelPosition:n.labelPosition}),"BaselineUI-ColorInputButton",n.className),ref:M(i,s),id:y,"aria-labelledby":n["aria-labelledby"]||`${y} ${f}`,children:[jsx(ct,{color:e?.toString("hexa"),isIndeterminate:r,indeterminateIcon:a}),t?jsx("div",{className:Om,id:f,"aria-hidden":"true",children:o}):typeof o=="string"&&jsx(VisuallyHidden,{children:o})]})});br.displayName="ColorInputButton";var Wa=ht.forwardRef(({className:e,style:t,icon:o,...r},a)=>{let n=ht.useRef(null),{hoverProps:i,isHovered:s}=useHover({isDisabled:r.isDisabled}),{buttonProps:l,isPressed:p}=useButton(r,n),{isFocusVisible:c,focusProps:u}=useFocusRing(),m=filterTruthyValues({"data-block-id":r["data-block-id"],"data-focused":c,"data-focus-visible":c,"data-disabled":r.isDisabled,"data-hovered":s,"data-pressed":p});return jsxs("button",{...mergeProps(l,i,u,m),ref:M(a,n),style:t,className:classNames(qm({isHovered:s||p||r.isOpen,isFocusVisible:c,isDisabled:r.isDisabled}),"BaselineUI-IconColorInputButton","BaselineUI-IconColorInput-Button",e),children:[jsx(o,{size:16}),jsx("div",{className:Bm,style:{backgroundColor:r.color||void 0}})]})});Wa.displayName="IconColorInputButton";function If({colorLabel:e,color:t,presets:o,isIndeterminate:r}){let{formatMessage:a}=A(),{locale:n}=useLocale(),i=useMemo(()=>r?{id:"indeterminate",label:a(wf.indeterminate)}:o.find(p=>p.id===Be?!t:t?ef(t,parseColor(p.id)):false),[o,t,r,a]),s=useMemo(()=>{if(typeof e=="function")return e?.(t,{isIndeterminate:!!r});if(typeof e=="boolean")return e?tf(t,i,a(wf.transparent)):false;throw new TypeError("`colorLabel` must be a function or a boolean")},[t,e,a,i,r]),l=useMemo(()=>{if(i?.label)return i.label;t?.getColorName(n);},[t,n,i?.label]);return {colorName:s,humanReadableName:l}}var wf=W({transparent:{defaultMessage:"Transparent",id:"transparent"},indeterminate:{defaultMessage:"Indeterminate",id:"indeterminate"}});var go=ht.forwardRef(({className:e,style:t,allowRemoval:o,allowAlpha:r=true,presets:a,labelPosition:n="top",colorLabel:i=true,includePicker:s=true,onChange:l,onChangeEnd:p,defaultValue:c,storePickedColorKey:u="baselinePickedColor",value:m,addColorButtonLabel:d,removeColorButtonLabel:b,customColorsLabel:y,renderTriggerButton:f=({isOpen:S,color:k,ref:T,colorName:$,triggerProps:R,labelId:N,isIndeterminate:E,indeterminateIcon:F})=>jsx(br,{...mergeProps(R,{...I.label?{"aria-labelledby":N}:{"aria-label":I["aria-label"]}}),ref:T,isOpen:S,isDisabled:I.isDisabled,labelPosition:n,color:k,colorLabel:i,colorName:$,isIndeterminate:E,indeterminateIcon:F}),pickerMode:g="active",offset:v=2,placement:_=n==="start"?"bottom end":"bottom start","data-block-id":h,"data-block-class":x,isIndeterminate:w,indeterminateIcon:C,...I},P)=>{let S=ht.useRef(null),k=ht.useRef(null),T=useOverlayTriggerState(I),{triggerProps:$,overlayProps:R}=useOverlayTrigger({type:"listbox"},T,S),N=xe(I.portalContainer),[E,F]=useControlledState(m===void 0?void 0:Rt(m),Rt(c),Y=>l?.(Y?.toFormat("rgba")||null)),{formatMessage:B}=A(pt),j=useMemo(()=>of(B(Ya.noColor),a),[a,B]),O=useId(),{colorName:H}=If({colorLabel:i,color:E,presets:j,isIndeterminate:w}),Q=useMemo(()=>j.filter(Y=>o||Y.id!==Be),[j,o]),V=d||B(Ya.addColor),U=b||B(Ya.removeColor),oe=y||B(Ya.customColors),le=jsx(gf,{color:E||fr,setColor:Y=>{F(Y),p?.(Y?.toFormat("rgba")||null);},storePickedColorKey:u,addColorButtonLabel:V,removeColorButtonLabel:U,customColorsLabel:oe,pickerMode:g,allowAlpha:r});return jsxs(Fragment,{children:[jsxs("div",{className:classNames({[Fm]:n==="start"},"BaselineUI-ColorInput-Trigger",e),"data-block-id":h,"data-block-class":x,style:t,ref:P,children:[I.label?jsx("label",{id:O,className:jm({labelPosition:n}),children:I.label}):null,f({isOpen:T.isOpen,color:E,ref:S,colorName:H,triggerProps:$,labelId:O,isIndeterminate:w,indeterminateIcon:C})]}),jsx(we,{...I,portalContainer:N,placement:_,state:T,offset:v,className:classNames(Oa,"BaselineUI-ColorInput-Popover"),triggerRef:S,overlayProps:R,children:jsxs(Pe,{size:"content",className:ja({includesCustomColorPicker:s}),ref:k,"aria-labelledby":O,"aria-label":I["aria-label"],children:[s&&g==="active"?jsxs(Fragment,{children:[jsx(qa,{color:E||fr,setColor:F,allowAlpha:r,onChangeEnd:Y=>{p?.(Y?.toFormat("rgba")||null);}}),le]}):null,!!Q.length&&jsxs(Fragment,{children:[s&&g==="active"?jsx(q,{}):null,jsx(vs,{autoFocus:s&&g==="active"?false:"first",state:T,triggerRef:S,presets:Q,color:E,setColor:Y=>{F(Y),p?.(Y?.toFormat("rgba")||null);}})]}),s&&g==="lazy"?le:null]})})]})});go.displayName="ColorInput";var Ya=W({addColor:{defaultMessage:"Add color",id:"addColor"},removeColor:{defaultMessage:"Remove color",id:"removeColor"},customColors:{defaultMessage:"Custom colors",id:"customColors"},noColor:{defaultMessage:"No color",id:"noColor"},transparent:{defaultMessage:"Transparent",id:"transparent"}});var Sf=ht.forwardRef(({className:e,style:t,icon:o,variant:r="standard","data-block-id":a,tooltip:n=true,iconTooltip:i=true,...s},l)=>{let p=ht.useRef(null),{tooltipProps:c}=ze({label:s["aria-label"],tooltip:n}),u=useCallback(({isOpen:m,color:d,ref:b,colorName:y,triggerProps:f,isIndeterminate:g,indeterminateIcon:v})=>jsx(J,{...c,children:r==="standard"?jsx(br,{...f,"aria-label":s["aria-label"],ref:b,isOpen:m,isDisabled:s.isDisabled,color:d,colorLabel:false,colorName:y,isIndeterminate:g,indeterminateIcon:v}):jsx(Wa,{...f,isOpen:m,icon:TextIcon,color:d?.toString("hexa"),ref:b,isDisabled:s.isDisabled,"aria-label":s["aria-label"],isIndeterminate:g,indeterminateIcon:v})}),[s,c,r]);return jsxs(D,{display:"flex",flexDirection:"row",gap:"md",paddingX:r==="standard"?"md":"none",alignItems:"center",className:classNames("BaselineUI-IconColorInput",e),"data-block-id":a,style:t,ref:M(l,p),children:[r==="standard"&&o?jsx(ro,{icon:o,label:s["aria-label"],tooltip:i,"aria-hidden":"true",size:24,className:sprinkles({color:"icon.primary"})}):null,jsx(go,{...s,colorLabel:false,renderTriggerButton:u})]})});Sf.displayName="IconColorInput";var Df={ar:{redo:"\u0625\u0639\u0627\u062F\u0629",undo:"\u062A\u0631\u0627\u062C\u0639"},cs:{redo:"Opakovat",undo:"Zru\u0161it"},cy:{redo:"Ail-wneud",undo:"Dad-wneud"},da:{redo:"Gentag",undo:"Fortryd"},de:{redo:"Wiederholen",undo:"R\xFCckg\xE4ngig machen"},el:{redo:"\u0395\u03C0\u03B1\u03BD\u03AC\u03BB\u03B7\u03C8\u03B7",undo:"\u0391\u03BD\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7"},"en-GB":{redo:"Redo",undo:"Undo"},en:{redo:"Redo",undo:"Undo"},es:{redo:"Rehacer",undo:"Deshacer"},fi:{redo:"Tee sittenkin",undo:"Peru"},"fr-CA":{redo:"R\xE9tablir",undo:"Annuler"},fr:{redo:"R\xE9tablir",undo:"Annuler"},he:{redo:"\u05D1\u05D9\u05E6\u05D5\u05E2 \u05DE\u05D7\u05D3\u05E9",undo:"\u05D1\u05D9\u05D8\u05D5\u05DC \u05E4\u05E2\u05D5\u05DC\u05D4"},hr:{redo:"Ponovi",undo:"Vrati"},id:{redo:"Ulangi",undo:"Kembalikan"},it:{redo:"Ripristina",undo:"Annulla"},ja:{redo:"\u3084\u308A\u76F4\u3059",undo:"\u53D6\u308A\u6D88\u3059"},ko:{redo:"\uC2E4\uD589\uBCF5\uADC0",undo:"\uC2E4\uD589\uCDE8\uC18C"},ms:{redo:"Buat Semula",undo:"Buat Asal"},"nb-NO":{redo:"Gj\xF8r om igjen",undo:"Angre"},nl:{redo:"Opnieuw",undo:"Herstel"},pl:{redo:"Pon\xF3w",undo:"Cofnij"},"pt-PT":{redo:"Refazer",undo:"Desfazer"},pt:{redo:"Refazer",undo:"Desfazer"},ru:{redo:"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C",undo:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C"},sk:{redo:"Opakova\u0165",undo:"Zru\u0161i\u0165"},sl:{redo:"Uveljavi",undo:"Razveljavi"},sv:{redo:"G\xF6r om",undo:"\xC5ngra"},th:{redo:"\u0E17\u0E33\u0E0B\u0E49\u0E33",undo:"\u0E16\u0E2D\u0E19\u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07\u0E01\u0E25\u0E31\u0E1A"},tr:{redo:"Yinele",undo:"Geri Al"},uk:{redo:"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0438",undo:"\u0421\u043A\u0430\u0441\u0443\u0432\u0430\u0442\u0438"},"zh-Hans":{redo:"\u91CD\u505A",undo:"\u64A4\u9500"},"zh-Hant":{redo:"\u91CD\u4F5C",undo:"\u5FA9\u539F"}};var Xa=z({defaultClassName:"mnnh5s1 _1yep5z6id _1yep5z6ie _1yep5z6if _1yep5z6la _1yep5z6ld _1yep5z6lp _1yep5z6lo _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6kd _1yep5z6ke _1yep5z6kf _1yep5z6ln",variantClassNames:{isInline:{true:"mnnh5s2 _1yep5z6wo _1yep5z6wp _1yep5z6wq _1yep5z6xc _1yep5z6xd _1yep5z6xe _1yep5z6y0 _1yep5z6y1 _1yep5z6y2 _1yep5z6yo _1yep5z6yp _1yep5z6yq _1yep5z6138 _1yep5z6183 _1yep5z6184",false:"_1yep5z617q _1yep5z6127"},isHovered:{true:"mnnh5s4"},hasLoadedImage:{true:"_1yep5z6126"},includeCheckeredBackground:{true:"mnnh5s6"},showFocusRing:{true:"_1yep5z613j _1yep5z617w _1yep5z617u _1yep5z6140 _1yep5z617x"},isDisabled:{true:"mnnh5s8 _1yep5z6zd"}},defaultVariants:{},compoundVariants:[[{isHovered:true,hasLoadedImage:false},"_1yep5z61oh"],[{isHovered:true,hasLoadedImage:true},"mnnh5s9"],[{isInline:true,isDisabled:true},"_1yep5z61pb"],[{hasLoadedImage:true,includeCheckeredBackground:true},"_1yep5z61o9"]]}),Mf="_1yep5z6d8",Za=z({defaultClassName:"mnnh5sa",variantClassNames:{isInline:{true:"mnnh5sb",false:"mnnh5sc"},isDisabled:{true:"mnnh5sd"},hasLoadedImage:{true:"mnnh5s0"}},defaultVariants:{},compoundVariants:[]});var Nf=z({defaultClassName:"_1i0ytqa3 _1yep5z6id _1yep5z6ie _1yep5z6if _1yep5z6ln _1yep5z6lo _1yep5z6lq",variantClassNames:{isFocusVisible:{true:"_1i0ytqa4"},isInline:{true:"_1yep5z612f",false:"_1yep5z612h"},isDisabled:{true:"_1i0ytqa7 _1yep5z6zd",false:"_1i0ytqa8"}},defaultVariants:{},compoundVariants:[[{isInline:true,isFocusVisible:true},"_1i0ytqa9 _1yep5z61p7 _1yep5z61u5 _1yep5z61u7"],[{isInline:false,isFocusVisible:true},"_1i0ytqaa"],[{isInline:true,isDisabled:true},"_1yep5z61oi"],[{isInline:false,isDisabled:true},"_1yep5z61ok"]]}),Ef="_1i0ytqa0",Ja=z({defaultClassName:"_1i0ytqab _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6kd _1yep5z6ke _1yep5z6kf _1yep5z6ln",variantClassNames:{isInline:{false:"_1yep5z6126"},isDisabled:{true:"_1i0ytqad _1yep5z6zd"}},defaultVariants:{},compoundVariants:[]}),Lf=z({defaultClassName:"_1i0ytqa1 _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6kj _1yep5z6kk _1yep5z6kl _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6ln",variantClassNames:{isInline:{false:"_1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b"}},defaultVariants:{},compoundVariants:[]});function Bf({line:e,options:t}){let o=useRef([]),r=useMemo(()=>{let a=Math.ceil(e.length/vo),n;for(let i=0;i<a;i++)if(!(!(i===a-1)&&!!o.current[i])){let p=e.slice(i*vo-(i>0?1:0),i*vo+vo);n=getSvgPathFromStroke(getStroke(p.map(([c,u,m])=>({x:c,y:u,pressure:m})),t)),p.length>=(i>0?vo+1:vo)&&(o.current[i]=n);}return n},[e,t]);return [...o.current,r]}var vo=60*3;var R2={size:1,thinning:0,smoothing:0,streamline:0,easing:e=>e,start:{taper:0,easing:e=>e,cap:true},end:{taper:0,easing:e=>e,cap:true},simulatePressure:false},Ff=ht.forwardRef(({className:e,style:t,canvasClassName:o,canvasStyle:r,isBound:a=true,strokeWidth:n=2,strokeColor:i="#3A87FD",onChange:s,defaultValue:l,onChangeEnd:p,enableHistory:c=false,isInline:u=true,isDisabled:m,placeholder:d,clearLabel:b,undoLabel:y,redoLabel:f,footerClassName:g,canvasRef:v,value:_,footerStyle:h,"data-block-id":x,"data-block-class":w,"aria-label":C="Drawing canvas",description:I="This is a canvas for drawing using a mouse or touch input.",...P},S)=>{let k=A(Df),T=ht.useRef(null),[$,R]=ht.useState(_||l||[]),N=ht.useMemo(()=>({...R2,...P}),[P]),[E,F]=ht.useState(),B=useId(),{labelProps:j,fieldProps:O}=useLabel({...P,"aria-label":C,labelElementType:"span"}),{isFocusVisible:H,focusProps:Q}=useFocusRing({within:true}),{hoverProps:V,isHovered:U}=useHover({isDisabled:m}),{undo:oe,redo:le,canRedo:Y,canUndo:me,push:ge}=sc($,{onAction:Z=>{Z&&(R(Z),p?.(Z));},isDisabled:!c}),{keyboardProps:zt}=useKeyboard({onKeyDown:Z=>{Z.key==="Backspace"?Vt():Z.key==="z"&&(Z.metaKey||Z.ctrlKey)&&(Z.shiftKey?Y&&le():me&&oe());}}),[ie,ye]=useState(false),Bo=useCallback(Z=>{let G=Z.currentTarget.getBoundingClientRect();F(G),Z.target.setPointerCapture(Z.pointerId);let ce=[Z.clientX-G.x,Z.clientY-G.y,Z.pressure];R(ee=>[...ee,[ce]]),ye(true);},[]),Ot=useCallback(Z=>{if(Z.buttons!==1||!E)return;let ce=Hf(Z.nativeEvent).map(ee=>[a?clamp(ee.clientX-E.left,0,E.width):ee.clientX-E.left,a?clamp(ee.clientY-E.top,0,E.height):ee.clientY-E.top,ee.pressure]);R(ee=>{let ve=[...ee];return ve[ee.length-1]=[...ve[ee.length-1],...ce],ve});},[E,a]),Ht=()=>{E&&(p?.($),ge($),ye(false));};useEffect(()=>{s?.($);},[$,s]);let Vt=()=>{R([]),s?.([]),ge([]);};return jsxs("div",{ref:M(T,S),className:classNames(Ef,"BaselineUI-FreehandCanvas",e),style:t,"aria-disabled":m,"data-block-id":x,"data-block-class":w,children:[P.label||c?jsxs("div",{className:Lf({isInline:u}),children:[P.label?jsx(te,{type:"label",size:"sm",...j,children:P.label}):jsx("span",{}),c?jsxs("div",{children:[jsx(L,{variant:"secondary",size:"sm",isDisabled:!me||m,icon:UndoIcon,onPress:oe,"aria-label":y||k.formatMessage("undo")}),jsx(L,{variant:"secondary",size:"sm",isDisabled:!Y||m,icon:RedoIcon,onPress:le,"aria-label":f||k.formatMessage("redo")})]}):null]}):null,jsxs("div",{role:"application",...mergeProps(Q,zt,V,O),tabIndex:m?void 0:0,className:classNames(Xa({isInline:u,isHovered:U}),Nf({isFocusVisible:H,isInline:u,isDisabled:!!m}),o),"aria-describedby":P["aria-describedby"]||B,style:r,ref:v,children:[jsx(VisuallyHidden,{children:jsx("div",{id:B,children:I})}),jsx("svg",{width:r?.width||"100%",height:r?.height||"100%",onPointerDown:Bo,onPointerMove:Ot,onPointerUp:Ht,children:(_||$).map((Z,G,ce)=>G<ce.length-1||!ie?jsx(jf,{line:Z,options:N,strokeColor:i,strokeWidth:n},G):jsx(Of,{line:Z,options:N,strokeColor:i,strokeWidth:n},G))})]}),d||b?jsx("div",{style:h,className:classNames(Ja({isInline:u,isDisabled:m}),g),children:($.length||!d)&&b?jsx(K,{size:"sm",variant:"ghost",label:b,isDisabled:m,onPress:Vt}):jsx(K,{size:"sm",variant:"ghost",label:d,isDisabled:true})}):null]})});Ff.displayName="FreehandCanvas";var jf=ht.memo(({line:e,options:t,strokeColor:o,strokeWidth:r})=>{let a=useMemo(()=>getSvgPathFromStroke(getStroke(e.map(([n,i,s])=>({x:n,y:i,pressure:s})),t)),[e,t]);return jsx("path",{d:a,stroke:o,strokeWidth:r})});jf.displayName="Stroke";var Of=ht.memo(({line:e,options:t,strokeColor:o,strokeWidth:r})=>{let a=Bf({line:e,options:t});return jsx(Fragment,{children:a.map((n,i)=>jsx("path",{d:n,stroke:o,strokeWidth:r},i))})});Of.displayName="SplitStroke";function Hf(e){if(typeof e.getCoalescedEvents=="function"){let t=e.getCoalescedEvents();return t.length>0?t.flatMap(o=>Hf(o)):[e]}return [e]}var Vf="_1vac7ws0",Uf=z({defaultClassName:"_1vac7ws1",variantClassNames:{isDragging:{true:"_1vac7ws2"}},defaultVariants:{},compoundVariants:[]});function Kf(e,t){let[o,r]=useState([]),a=()=>e?.flatMap(n=>[...t.querySelectorAll(n)]).map(n=>({current:n}));return useGranularEffect(()=>{r(a());},[],[a]),useGranularEffect(()=>{let n=a();r(n);},[e],[a]),o}function Gf(e){let{scrollable:t,ownerDocument:o,onScroll:r}=e;useEffect(()=>{let a=getHTMLElement(t,o);if(a)return (a.style.position==="static"||!a.style.position)&&console.warn("Scrollable ancestor passed to `Transform` component should not be statically positioned."),a.addEventListener("scroll",r),()=>{a.removeEventListener("scroll",r);}},[t,r,o]);}var q2=makeMoveable([Draggable,Resizable,Rotatable,Snappable]),Yf=ht.forwardRef(({className:e,children:t,isRotatable:o,isResizable:r,isDraggable:a,style:n,onTransform:i,onTransformStart:s,onTransformEnd:l,onDoubleClick:p,onDragStart:c,onDragEnd:u,onDrag:m,onResizeStart:d,onResizeEnd:b,onResize:y,onRotateStart:f,onRotateEnd:g,onRotate:v,onSnap:_,isSnappable:h,elementGuidelines:x,hideAnchorOnDrag:w=true,title:C,rotationPosition:I,autoUpdate:P,bound:S,snapRotationDegrees:k,snapRotationThreshold:T,scrollableAncestor:$,renderDirections:R,stopPropagation:N,transformOrigin:E,preventDefault:F},B)=>{let j=useRef(null),O=useRef(null),[H,Q]=useState(document),V=useRef(H.createElement("div")),[U,oe]=useState({}),[le,Y]=useState(false),[me,ge]=useState(false),[zt,ie]=useState(),ye=Kf(x,H);useLayoutEffect(()=>{let G=V.current;return V.current=H.createElement("div"),()=>{G.remove();}},[H]);let{keyboardProps:Bo}=useKeyboard({onKeyDown:G=>{let ce=G.shiftKey?10:1,ee=G.metaKey||G.ctrlKey;ee&&G.shiftKey&&(ce=45);function ve(Je,Ao="x"){ee?O.current?.request("rotatable",{deltaRotate:Je*ce},true):O.current?.request("draggable",Ao==="x"?{deltaX:Je*ce}:{deltaY:Je*ce},true);}switch(G.key){case "ArrowRight":{ve(1);break}case "ArrowLeft":{ve(-1);break}case "ArrowUp":{ve(-1,"y");break}case "ArrowDown":ve(1,"y");}requestAnimationFrame(()=>{O.current?.updateRect();});}});useEffect(()=>{let G=_e(j.current);Q(G);let ce=V.current;G.body.append(V.current);function ee(Je){ge(Je.shiftKey);}function ve(){ge(false);}return G.addEventListener("keydown",ee),G.addEventListener("keyup",ve),()=>{G.removeEventListener("keydown",ee),G.removeEventListener("keyup",ve),ce.remove();}},[]),Gf({scrollable:$,onScroll:()=>{O.current?.updateRect();},ownerDocument:H});let Ot=useCallback(G=>{oe(ce=>({...ce,...G.style})),i?.(G);},[i]),Ht=useCallback(G=>{if(Y(true),j.current?.focus(),S){let ee=getHTMLElement(S,H)?.getBoundingClientRect();ie({position:"client",left:ee?.left??0,top:ee?.top??0,right:ee?.right??0,bottom:ee?.bottom??0});}c?.(G);},[S,H,c]),Vt=useCallback(G=>{Y(false),u?.(G);},[u]),Z=t({style:{...U.width&&{width:U.width},...U.height&&{height:U.height}}});return jsxs(Fragment,{children:[jsx("div",{role:"button",...Bo,ref:M(j,B),style:{display:"inline-block",...n,...U},className:classNames(Vf,e),onDoubleClick:p,tabIndex:0,title:C,children:Z}),createPortal(jsx(q2,{ref:O,target:j,draggable:a,resizable:r,rotatable:o,keepRatio:me,throttleDrag:1,snappable:h||!!S,elementGuidelines:ye,snapRenderThreshold:.9,className:Uf({isDragging:le&&w}),onRender:Ot,onDragStart:Ht,onDragEnd:Vt,useResizeObserver:P,useMutationObserver:P,onRenderEnd:l,onDrag:m,onResizeStart:d,onResizeEnd:b,onResize:y,onRotateStart:f,onRotateEnd:g,onRotate:v,onRenderStart:s,onSnap:_,rotationPosition:I,bounds:zt,snapRotationDegrees:k,snapRotationThreshold:T,renderDirections:R,stopPropagation:N,preventDefault:F,transformOrigin:E}),V.current)]})});Yf.displayName="Transform";var Xf={ar:{delete:"\u062D\u0630\u0641",selectImage:"\u062A\u062D\u062F\u064A\u062F \u0635\u0648\u0631\u0629"},cs:{delete:"Smazat",selectImage:"Vybrat obr\xE1zek"},cy:{delete:"Dileu",selectImage:"Dewiswch Ddelwedd"},da:{delete:"Slet",selectImage:"V\xE6lg billede"},de:{delete:"L\xF6schen",selectImage:"Bild ausw\xE4hlen"},el:{delete:"\u0394\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE",selectImage:"\u0395\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1\u03C2"},"en-GB":{delete:"Delete",selectImage:"Select Image"},en:{delete:"Delete",selectImage:"Select Image"},es:{delete:"Eliminar",selectImage:"Seleccionar imagen"},fi:{delete:"Poista",selectImage:"Valitse kuva"},"fr-CA":{delete:"Supprimer",selectImage:"S\xE9lectionner une image"},fr:{delete:"Supprimer",selectImage:"S\xE9lectionner une image"},he:{delete:"\u05DE\u05D7\u05D9\u05E7\u05D4",selectImage:"\u05D1\u05D7\u05D9\u05E8\u05EA \u05EA\u05DE\u05D5\u05E0\u05D4"},hr:{delete:"Obri\u0161i",selectImage:"Odaberi sliku"},id:{delete:"Hapus",selectImage:"Pilih Gambar"},it:{delete:"Elimina",selectImage:"Seleziona immagine"},ja:{delete:"\u524A\u9664",selectImage:"\u30A4\u30E1\u30FC\u30B8\u3092\u9078\u629E"},ko:{delete:"\uC0AD\uC81C",selectImage:"\uC774\uBBF8\uC9C0 \uC120\uD0DD"},ms:{delete:"Padam",selectImage:"Pilih Imej"},"nb-NO":{delete:"Slett",selectImage:"Velg bilde"},nl:{delete:"Verwijder",selectImage:"Selecteer afbeelding"},pl:{delete:"Usu\u0144",selectImage:"Wybierz obraz"},"pt-PT":{delete:"Apagar",selectImage:"Selecionar imagem"},pt:{delete:"Apagar",selectImage:"Selecionar Imagem"},ru:{delete:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C",selectImage:"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0438\u0437\u043E\u0431\u0440."},sk:{delete:"Zmaza\u0165",selectImage:"Vybra\u0165 obr\xE1zok"},sl:{delete:"Izbri\u0161i",selectImage:"Izberi sliko"},sv:{delete:"Radera",selectImage:"V\xE4lj bild"},th:{delete:"\u0E25\u0E1A",selectImage:"\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E23\u0E39\u0E1B\u0E20\u0E32\u0E1E"},tr:{delete:"Sil",selectImage:"Resim Se\xE7"},uk:{delete:"\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438",selectImage:"\u041E\u0431\u0440\u0430\u0442\u0438 \u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F"},"zh-Hans":{delete:"\u5220\u9664",selectImage:"\u9009\u62E9\u56FE\u50CF"},"zh-Hant":{delete:"\u522A\u9664",selectImage:"\u9078\u53D6\u5716\u50CF"}};var Qf=ht.forwardRef(({className:e,style:t,isInline:o=true,accept:r="image/*",defaultImageSrc:a,imageSrc:n,imageAlt:i,pickerButtonLabel:s,isDisabled:l,onDrop:p,onPaste:c,includeCheckeredBackground:u=true,"data-block-id":m,"data-block-class":d,pickerButtonStyle:b,pickerButtonClassName:y,footerClassName:f,footerStyle:g,clearLabel:v,placeholder:_,labelStyle:h,labelClassName:x,...w},C)=>{let I=ht.useRef(null),P=ht.useRef(null),{formatMessage:S}=A(Xf),[k,T]=useControlledState(n,a||null,ie=>{invariant(typeof ie!="string"),w.onValueChange?.(ie?[ie]:[]);}),$=useMemo(()=>nk(k||void 0),[k]),{fieldProps:R,labelProps:N}=useField(w),{dropProps:E,isDropTarget:F}=useDrop({ref:I,onDrop:async ie=>{if(l)return;let ye=await Ui({items:ie.items});ye.length&&T(ye[0]),p?.(ie);},...w}),{clipboardProps:B}=useClipboard({onPaste:async ie=>{if(l)return;let ye=await Ui({items:ie});ye.length&&T(ye[0]),c?.(ie);},...w}),j=()=>{T(null),P.current&&(P.current.value="");},O={type:"file",onChange:ie=>{let ye=[...ie.target.files];T(ye[0]),w.onChange?.(ie);},accept:r,disabled:l},{focusProps:H,isFocused:Q,isFocusVisible:V}=useFocusRing({within:true}),{hoverProps:U,isHovered:oe}=useHover({isDisabled:l}),{imgProps:le,isLoading:Y,isLoaded:me}=Xt({src:$,alt:i||""}),ge={label:s||S("selectImage"),onPress:()=>I.current?.click(),variant:"secondary",isDisabled:l,excludeFromTabOrder:true,className:classNames(ta({isFocusVisible:V}),{[Mf]:F&&!l},y),style:b},zt=filterTruthyValues({"data-loaded":me,"data-block-id":m,"data-block-class":d,"data-hovered":oe,"data-focused":Q,"data-drop-target":F,"data-disabled":l,"data-focus-visible":V});return jsxs(D,{...zt,className:classNames("BaselineUI-ImageDropZone",e),display:"flex",flexDirection:"column",alignItems:"center",style:t,ref:C,children:[jsxs("label",{...mergeProps(E,U,H,N),className:classNames(Xa({isInline:o,isHovered:oe,isDisabled:l,hasLoadedImage:!!$&&me,showFocusRing:F||!!$&&V}),x),style:h,ref:I,children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(R,B,O),ref:P})}),!$&&jsx(K,{...ge}),!!$&&(Y?jsx(po,{}):jsx("img",{className:Za({isInline:o,isDisabled:l,hasLoadedImage:!!$&&me&&u}),...le}))]}),_||v?jsx("div",{style:g,className:classNames(Ja({isInline:o,isDisabled:l}),f),children:($||!_)&&v?jsx(K,{size:"sm",variant:"ghost",label:v,isDisabled:l,onPress:j}):jsx(K,{size:"sm",variant:"ghost",label:_,isDisabled:true})}):null]})});Qf.displayName="ImageDropZone";function nk(e){return e instanceof File?URL.createObjectURL(e):e}var ey="_1vm2oh49 _1yep5z6ig _1yep5z6ih _1yep5z6ii _1yep5z6g4",ws="_1vm2oh48 _1yep5z6lo _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6kd _1yep5z6ke _1yep5z6kf _1yep5z6k4 _1yep5z6k5 _1yep5z6k6",ty=z({defaultClassName:"_1vm2oh40 mnnh5s1 _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6lt _1yep5z6lr _1yep5z6ic _1yep5z6lu _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6la _1yep5z6lp _1yep5z6id _1yep5z6ie _1yep5z6if",variantClassNames:{accent:{theme:"_1vm2oh41",positive:"_1vm2oh42"},isInline:{true:"mnnh5s2 _1yep5z6wl _1yep5z6wm _1yep5z6wn _1yep5z6x9 _1yep5z6xa _1yep5z6xb _1yep5z6xx _1yep5z6xy _1yep5z6xz _1yep5z6yl _1yep5z6ym _1yep5z6yn _1yep5z6137 _1yep5z6182 _1yep5z6184",false:"_1yep5z612h"},isFocusVisible:{true:"_1yep5z613j _1yep5z617w _1yep5z617u _1yep5z6140 _1yep5z617x"},isDisabled:{true:"mnnh5s8 z9nup82 _1yep5z6zd"},isHovered:{true:"_1vm2oh47"}},defaultVariants:{},compoundVariants:[[{accent:"positive",isInline:true},"_1yep5z61oi"],[{accent:"theme",isInline:true},"_1yep5z61o7"],[{accent:"positive",isInline:false},"_1yep5z61ok"],[{accent:"theme",isInline:false},"_1yep5z61o9"],[{isFocusVisible:true,isInline:true},"_1yep5z61q3 _1yep5z61tx _1yep5z61tz _1yep5z61u0"],[{isHovered:true,isInline:true},"_1yep5z61u0 _1yep5z61q3 _1yep5z61tx _1yep5z61tz"],[{isHovered:true,isInline:false,accent:"positive"},"_1yep5z61oj"],[{isHovered:true,isInline:false,accent:"theme"},"_1yep5z61ob"],[{isHovered:true,isInline:true,accent:"theme"},"_1yep5z61o8"]]});var ay=ht.forwardRef(({className:e,style:t,isDisabled:o,isInline:r=true,imageAlt:a,imageSrc:n,svgSrc:i,textValue:s,textStyle:l,onPress:p,onDelete:c,deleteAriaLabel:u,addAriaLabel:m,accent:d="positive","data-block-id":b,"data-block-class":y,...f},g)=>{let{focusProps:v,isFocused:_,isFocusVisible:h}=useFocusRing({within:true}),{isHovered:x,hoverProps:w}=useHover({isDisabled:o}),{pressProps:C}=usePress({isDisabled:o,onPress:p});invariant(n||i||s,"Preview must have content. You must provide either an `imageSrc`, `svgSrc`, or `textValue` prop.");let I=filterTruthyValues({"data-hovered":x,"data-focus-visible":h,"data-focused":_,"data-disabled":o});return jsxs("div",{...f,className:classNames(ty({isInline:r,isFocusVisible:h,isDisabled:o,isHovered:x,accent:d}),"BaselineUI-Preview",e),"data-block-id":b,"data-block-class":y,"aria-label":f["aria-label"]||a||s,style:t,ref:g,children:[typeof i=="string"?jsx("button",{disabled:o,...mergeProps(w,v,C,I),className:ws,"aria-label":m,dangerouslySetInnerHTML:{__html:i}}):jsxs("button",{...mergeProps(w,v,C,I),disabled:o,style:l,"aria-label":m,className:ws,children:[n?jsx("img",{src:n,alt:a,className:Za({isInline:r,isDisabled:o})}):null,!!i&&typeof i=="object"&&i,s]}),c?jsx(L,{isDisabled:o,className:ey,"aria-label":u,size:"xs",icon:TrashIcon,onPress:c}):null]})});ay.displayName="Preview";var ny="_1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j4 _1yep5z6j5 _1yep5z6j6 _1yep5z69c _1yep5z69d _1yep5z69e",iy=z({defaultClassName:"cw3m0n5 _1yep5z6ew _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z6111"}},defaultVariants:{},compoundVariants:[]}),sy="cw3m0n4",ly="_1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j4 _1yep5z6j5 _1yep5z6j6 _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6lk",py=z({defaultClassName:"cw3m0n0 _1yep5z61j6 _1yep5z61j7 _1yep5z61j8 _1yep5z61ju _1yep5z61jv _1yep5z61jw _1yep5z61ki _1yep5z61kj _1yep5z61kk _1yep5z61l6 _1yep5z61l7 _1yep5z61l8 _1yep5z61nb _1yep5z61tg",variantClassNames:{isHovered:{true:"cw3m0n1"},isReadOnly:{true:"cw3m0n2"}},defaultVariants:{},compoundVariants:[[{isHovered:true,isReadOnly:false},"cw3m0n3"]]});var hk=({label:e,description:t},{isSelected:o,isFocusVisible:r,isDisabled:a,optionLabelPosition:n,isHovered:i,isReadOnly:s})=>jsxs("div",{className:Ra({labelPosition:n}),children:[jsx("div",{className:classNames($a({isSelected:o,isFocusVisible:r,isDisabled:a,isReadOnly:s,isHovered:i}),py({isHovered:i})),children:o?jsx("div",{className:sy}):null}),e?jsxs("div",{className:ny,children:[jsx("span",{className:Ia({isDisabled:a}),children:e}),t?jsx("span",{className:iy({isDisabled:a}),children:t}):null]}):null]}),dy=({state:e,renderOption:t=hk,item:o,optionLabelPosition:r="end",optionStyle:a,optionClassName:n,isReadOnly:i,...s})=>{let l=!!s.isDisabled||!!s.disabledValues?.includes(o.id),p=ht.useRef(null),{inputProps:c,isPressed:u,isSelected:m}=useRadio({...s,isDisabled:l,children:o.label,value:o.id},e,p),{focusProps:d,isFocusVisible:b,isFocused:y}=useFocusRing(),{hoverProps:f,isHovered:g}=useHover({isDisabled:l}),v=filterTruthyValues({"data-selected":m,"data-focused":y,"data-focus-visible":b,"data-hovered":g,"data-disabled":l,"data-pressed":u,"data-read-only":i});return jsxs("label",{...f,...v,style:a,className:classNames("BaselineUI-Radio-Item",n),children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(c,d),ref:p})}),t(o,{isFocusVisible:b,isSelected:m,isFocused:y,isHovered:g,isDisabled:l,optionLabelPosition:r,isReadOnly:i})]})};var my=ht.forwardRef(({className:e,style:t,optionsContainerClassName:o,optionsContainerStyle:r,items:a,labelPosition:n="top",renderOption:i,"aria-label":s,"aria-labelledby":l,"aria-describedby":p,"aria-details":c,"data-block-id":u,"data-block-class":m,...d},b)=>{let y=useRadioGroupState(d),{radioGroupProps:f,labelProps:g,descriptionProps:v,errorMessageProps:_}=useRadioGroup({...d,"aria-label":s,"aria-labelledby":l,"aria-describedby":p,"aria-details":c},y),h=he({...d,descriptionProps:v,errorMessageProps:_,labelPosition:n}),x=filterTruthyValues({"data-orientation":d.orientation,"data-block-id":u,"data-block-class":m,"data-disabled":d.isDisabled,"data-readonly":d.isReadOnly});return jsxs("div",{...mergeProps(f,x),className:classNames(ot({labelPosition:n}),"BaselineUI-RadioGroup",e),style:t,ref:b,children:[d.label||h?jsxs("div",{className:tt({labelPosition:n,hasMessage:!!h}),children:[jsx("span",{...g,className:classNames(Wt,"BaselineUI-RadioGroup-Label"),children:d.label}),n==="start"&&h]}):null,jsx("div",{className:classNames(ly,{[Zt]:d.isDisabled},o),style:r,children:a.map(w=>jsx(dy,{state:y,renderOption:i,item:w,...d,value:w.id},w.id))}),n==="top"&&h]})});my.displayName="RadioGroup";var fy=({id:e,defaultMessage:t,elementType:o=Fragment$1})=>{invariant(e||t,"`id` or `defaultMessage` is required.");let r=A();return jsx(o,{children:r.formatMessage(e)||t})};fy.displayName="MessageFormat";var yy=ht.forwardRef(({className:e,style:t,children:o,"data-block-id":r,"data-block-class":a,role:n="group",isDisabled:i,...s},l)=>{let{hoverProps:p,isHovered:c}=useHover({isDisabled:i});return jsx("div",{...p,role:n,"data-hovered":c,"data-disabled":i,"data-block-id":r,"data-block-class":a,className:e,style:t,...s,ref:l,children:o})});yy.displayName="Group";var Ss="UNSUPPORTED_IN_MENU";function vy(e){return useMemo(()=>ht.Children.toArray(e).map(t=>{let o=t,r=uniqueId("item"),a=hr(o,je),n=gy(o),i,s;if(a){let g=hr(a,Oe);invariant(g),i=gy(g),s=hr(a,Le).props.children;}else n?i=n:i=o;let{onPress:l,label:p,"aria-label":c,iconStart:u,isDisabled:m,icon:d}=i.props,b=p||c||Ss;invariant(typeof b=="string","ActionGroup children must have a string label");let y=`${r}-${b}`;return createElement(Item,{...{key:y,onPress:l,textValue:b,"aria-label":c,icon:u||d,dialogContent:s,isDisabled:m},key:y},o)}),[e])}function hr(e,t){return t?flatMapDeep(ht.Children.toArray(e),r=>ht.isValidElement(r)&&r.props.children?[r,...ht.Children.toArray(r.props.children)]:[r]).find(r=>ht.isValidElement(r)&&r.type===t):void 0}function gy(e){return hr(e,K)||hr(e,L)}var _y="_1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6id _1yep5z6ie _1yep5z6if _1yep5z6ln _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6lf",zy={horizontal:"xvr3wn0",vertical:"xvr3wn1"};var Fk=new Set(["text","search","password","tel","url"]);function tn(e,t){let{toolbarProps:o}=useToolbar(e,t);return {toolbarProps:{...o,onKeyDownCapture:r=>{if(r.target instanceof HTMLInputElement&&Fk.has(r.target.type)){let a=r.target.selectionStart===0,n=r.target.selectionEnd===r.target.value.length;(a&&r.key==="ArrowLeft"||n&&r.key==="ArrowRight")&&o.onKeyDownCapture?.(r);return}o.onKeyDownCapture?.(r);}}}}var Ms=ht.forwardRef(({className:e,style:t,children:o,collapsibleMenuProps:r,"data-block-id":a,"data-block-class":n,renderSpacer:i,onKeyDown:s,...l},p)=>{let{formatMessage:c}=A(),[u,m]=useState(),d=vy(o),b=useListState({...l,children:d}),y=ae(p),f=useRef(null),[{visibleItems:g,isMeasuring:v},_]=ei({visibleItems:b.collection.size,isMeasuring:false}),h=useCallback(()=>{let T=$=>{if(f.current&&y.current){let R=[...f.current.children],N=y.current.getBoundingClientRect().width,E=$<b.collection.size,F=0,B=0;if(E){let j=R.pop();j&&(F+=Py(j,false,true));}for(let[j,O]of R.entries())if(F+=Py(O,j===0,j===R.length-1),Math.round(F)<=Math.round(N))B++;else break;return B}return $};_(function*(){yield {visibleItems:b.collection.size,isMeasuring:true};let $=T(b.collection.size),R=$<b.collection.size&&$>0;yield {visibleItems:$,isMeasuring:R},R&&(yield {visibleItems:T($),isMeasuring:false});});},[_,y,b.collection.size]),x=useMemo(()=>({get current(){return y.current?.parentElement}}),[y]);pi({ref:x,onResize:h}),Se(h,[b.collection,h]);let{toolbarProps:w}=tn(l,y),C=[...b.collection],I=C.slice(0,g),P=C.slice(g).filter(T=>T.textValue!==Ss),S=P.length>0;useEffect(()=>{m(void 0);},[P.length]),useEffect(()=>{l.orientation==="vertical"&&console.warn("Toolbar: Vertical orientation is not supported when `isCollapsible` is true.");},[l.orientation]);let{keyboardProps:k}=useKeyboard({onKeyDown:s});return jsxs(FocusScope,{children:[jsx("div",{...mergeProps(w,k),className:e,"data-block-id":a,"data-block-class":n,"data-collapse":true,style:{...t,flexBasis:v?"100%":void 0},ref:y,children:jsxs("div",{ref:f,className:_y,children:[I.map(T=>T.rendered),S?jsxs(Fragment,{children:[!v&&i?jsx(D,{flexGrow:1}):null,jsx(ha,{placement:"bottom end",renderTrigger:({buttonProps:T,ref:$})=>jsx(L,{...T,size:"md",icon:MoreIcon,"aria-label":c(Yk.more),variant:"toolbar",ref:$,tooltip:true}),...r,disabledKeys:P.filter(T=>T.props?.isDisabled).map(T=>T.key),items:P.map(T=>{let $=T.textValue||T["aria-label"];return invariant($,"ActionItem must have a label"),{id:T.key,label:$,icon:T.props.icon}}),onAction:T=>{let $=b.collection.getItem(T);invariant($,"Item not found");let{onPress:R,dialogContent:N}=$.props;R?.(),m(N);}})]}):null]})}),jsx(Ee,{isOpen:!!u,onOpenChange:T=>{T||m(void 0);},children:jsx(Ue,{enableDrawer:"auto",style:{zIndex:1e5},children:u?ht.cloneElement(u,{inheritDrawer:true}):null})})]})});Ms.displayName="CollapsibleToolbar";function Py(e,t,o){let a=re(e).getComputedStyle(e);return e.getBoundingClientRect().width+(t?0:ky(a.marginLeft))+(o?0:ky(a.marginRight))}function ky(e){let t=Number.parseInt(e,10);return Number.isNaN(t)?0:t}var Yk=W({more:{id:"more",defaultMessage:"More"}});var Ns=ht.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,"aria-controls":a,onKeyDown:n,...i},s)=>{let l=ht.useRef(null),{toolbarProps:p}=tn(i,l),{keyboardProps:c}=useKeyboard({onKeyDown:n});return jsx("div",{...mergeProps(p,c),"aria-controls":a,className:classNames(zy[i.orientation||"horizontal"],"BaselineUI-Toolbar",e),style:t,"data-block-id":o,"data-block-class":r,ref:M(s,l),children:i.children})});Ns.displayName="WrappedToolbar";var on=ht.forwardRef((e,t)=>{let o=e.isCollapsible?Ms:Ns;return jsx(o,{...e,ref:t})});on.displayName="Toolbar";var Iy=z({defaultClassName:"_1j5skr71",variantClassNames:{size:{xxs:"_1j5skr72",xs:"_1j5skr73",sm:"_1j5skr74",md:"_1j5skr75",lg:"_1j5skr76"}},defaultVariants:{},compoundVariants:[]}),Ry=z({defaultClassName:"_1j5skr70 _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6lp _1yep5z6lq _1yep5z6lk _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6kd _1yep5z6ke _1yep5z6kf _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6g1 _1yep5z6f5",variantClassNames:{isHovered:{true:"_1j5skr7g"},isFocusVisible:{true:"_1j5skr7h"},isDisabled:{true:"z9nup82 _1yep5z611a"},isSelected:{true:"_1j5skr7j"}},defaultVariants:{},compoundVariants:[[{isSelected:true,isDisabled:true},"_1yep5z61u0 _1yep5z61tz _1yep5z61tx _1yep5z61qd _1yep5z61nd"],[{isSelected:false,isHovered:true,isDisabled:false},"_1yep5z6g3"],[{isSelected:false,isFocusVisible:true,isDisabled:false},"_1yep5z61u0 _1yep5z61tz _1yep5z61q3 _1yep5z61tx"],[{isSelected:true,isFocusVisible:true,isDisabled:false},"_1j5skr7k _1yep5z61ty _1yep5z61tx _1yep5z61q4 _1yep5z61ne"],[{isSelected:true,isFocusVisible:false,isDisabled:false},"_1yep5z61tx _1yep5z61tz _1yep5z61q3 _1yep5z61u0"]]}),$y=z({defaultClassName:"_1j5skr70 _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6lp _1yep5z6lq _1yep5z6lk _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6kd _1yep5z6ke _1yep5z6kf _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f5",variantClassNames:{isHovered:{true:"_1j5skr7m"},isFocusVisible:{true:"_1yep5z617x _1yep5z617w _1yep5z6140 _1yep5z617u"},isSelected:{true:"_1yep5z6119"},isDisabled:{true:"z9nup82 _1yep5z611a"}},defaultVariants:{},compoundVariants:[[{isSelected:false,isHovered:true},"_1yep5z61nc"]]}),Ty=z({defaultClassName:"_1j5skr70 _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6lp _1yep5z6lq _1yep5z6lk _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6kd _1yep5z6ke _1yep5z6kf _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f5",variantClassNames:{isHovered:{true:"_1j5skr7r"},isFocusVisible:{true:"_1yep5z617x _1yep5z617w _1yep5z6140 _1yep5z617u"},isSelected:{true:"_1j5skr7t"},isDisabled:{true:"z9nup82 _1yep5z611a"}},defaultVariants:{},compoundVariants:[[{isSelected:false,isHovered:true},"_1yep5z61o9"],[{isSelected:true,isDisabled:false},"_1yep5z61o9 _1yep5z61ng"],[{isSelected:true,isDisabled:true},"_1yep5z61o9 _1yep5z61nd"]]}),Sy=z({defaultClassName:"_1j5skr77 _1j5skr70 _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6lp _1yep5z6lq _1yep5z6lk _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6kd _1yep5z6ke _1yep5z6kf _1yep5z6f5",variantClassNames:{isHovered:{true:"_1j5skr78"},isFocusVisible:{true:"_1j5skr79"},isSelected:{true:"_1j5skr7a"},isDisabled:{true:"_1j5skr7b z9nup82 _1yep5z611c"}},defaultVariants:{},compoundVariants:[[{isSelected:true,isDisabled:false},"_1j5skr7c _1yep5z61nf"],[{isSelected:false,isDisabled:true},"_1j5skr7d _1yep5z61nd"],[{isSelected:false,isHovered:true},"_1yep5z61o9"],[{isSelected:false,isFocusVisible:true},"_1yep5z61u0 _1yep5z61tz _1yep5z61q3 _1yep5z61tx"],[{isSelected:true,isFocusVisible:true},"_1j5skr7e _1yep5z61ty _1yep5z61tx _1yep5z61q4"]]});var lw={xxs:8,xs:12,sm:16,md:20,lg:24},Ie=ht.forwardRef((e,t)=>{let o=ae(t),{tooltipProps:r}=Jr(e,o);return r?jsx(J,{...r,children:jsx(Es,{...e,ref:t})}):jsx(Es,{...e,ref:t})});Ie.displayName="ToggleIconButton";var Es=ht.forwardRef(({className:e,style:t,icon:o,size:r="md",variant:a="primary","data-block-id":n,"data-block-class":i,...s},l)=>{let p=useToggleState(s),{buttonProps:c,isPressed:u,ref:m,isFocusVisible:d,isFocused:b,isHovered:y,uiStateOptions:f}=ea(s,p),g=useMemo(()=>typeof o=="function"?o:p.isSelected?o.selected:o.unselected,[o,p.isSelected]),v={isSelected:p.isSelected,isHovered:y,isFocusVisible:d,isDisabled:!!s.isDisabled},_=filterTruthyValues({"data-hovered":y,"data-selected":p.isSelected,"data-focus-visible":d,"data-disabled":s.isDisabled,"data-block-id":n,"data-block-class":i,"data-focused":b,"data-pressed":u});return jsx("button",{...mergeProps(c,_),className:classNames(a==="toolbar"&&Sy(v),a==="primary"&&Ry(v),a==="secondary"&&$y(v),a==="tertiary"&&Ty(v),Iy({size:r}),"BaselineUI-ToggleIconButton",typeof e=="function"?e(f):e),style:typeof t=="function"?t(f):t,ref:M(m,l),children:jsx(g,{size:lw[r]})})});Es.displayName="ToggleIconButtonCore";var My="f6jv6bl",Ny="_1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z6js _1yep5z6jt _1yep5z6ju",ho="_1yep5z689 _1yep5z68a _1yep5z68b _1yep5z65x _1yep5z65y _1yep5z65z",Ey=z({defaultClassName:"f6jv6b0 _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6g1",variantClassNames:{isInline:{true:"f6jv6b1"},isMinimal:{true:"_1yep5z6154 _1yep5z6155 _1yep5z6156 _1yep5z6vo _1yep5z6vp _1yep5z6vq _1yep5z615m _1yep5z615n _1yep5z615o",false:"_1yep5z6157 _1yep5z6158 _1yep5z6159"}},defaultVariants:{},compoundVariants:[[{isInline:true,isMinimal:false},"_1yep5z61ir _1yep5z61is _1yep5z61it _1yep5z61jf _1yep5z61jg _1yep5z61jh _1yep5z61k3 _1yep5z61k4 _1yep5z61k5 _1yep5z61kr _1yep5z61ks _1yep5z61kt _1yep5z61u7 _1yep5z61u5 _1yep5z61pa"]]}),rn=z({defaultClassName:"f6jv6b4 _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6e3 _1yep5z6eu _1yep5z6lq",variantClassNames:{isDisabled:{true:"f6jv6b5 _1yep5z6111"}},defaultVariants:{},compoundVariants:[]}),Ly="f6jv6bi _1yep5z6wr _1yep5z6ws _1yep5z6wt _1yep5z6xf _1yep5z6xg _1yep5z6xh _1yep5z6y3 _1yep5z6y4 _1yep5z6y5 _1yep5z6yr _1yep5z6ys _1yep5z6yt",By="f6jv6bj";var Ay="f6jv6bm _1yep5z63l _1yep5z63m _1yep5z63n _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6ly _1yep5z6lt _1yep5z6lr _1yep5z6hx _1yep5z6eu",Fy=z({defaultClassName:"f6jv6bf _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6lq _1yep5z6la _1yep5z6ld _1yep5z6lp",variantClassNames:{isHovered:{true:"_1yep5z6126"},isDisabled:{true:"_1yep5z6zd"}},defaultVariants:{},compoundVariants:[]}),jy="_1yep5z6jy _1yep5z6jz _1yep5z6k0",Oy="f6jv6be f6jv6ba _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z6eu _1yep5z6e3 _1yep5z6ln",Hy=z({defaultClassName:"f6jv6bb _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6k4 _1yep5z6k5 _1yep5z6k6",variantClassNames:{isInline:{true:"_1yep5z6pr _1yep5z6ps _1yep5z6pt _1yep5z6184 _1yep5z6182 _1yep5z6137",false:"_1yep5z6pu _1yep5z6pv _1yep5z6pw _1yep5z6x6 _1yep5z6x7 _1yep5z6x8 _1yep5z6xu _1yep5z6xv _1yep5z6xw _1yep5z6yi _1yep5z6yj _1yep5z6yk _1yep5z6z6 _1yep5z6z7 _1yep5z6z8"}},defaultVariants:{},compoundVariants:[]}),Vy="f6jv6bk",Uy="f6jv6ba _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z6eu",an=z({defaultClassName:"f6jv6b6",variantClassNames:{isInline:{true:"f6jv6b7",false:"f6jv6b8"}},defaultVariants:{},compoundVariants:[]}),nn="f6jv6b9 _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6jj _1yep5z6jk _1yep5z6jl",Cr="f6jv6bn";var Ky=[["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:Pr}}=layoutSprinkleValues,Gy=({isOpen:e,onClose:t})=>{let{formatMessage:o}=A(),r=useId();return jsx(Ee,{isOpen:e,onOpenChange:a=>{a||t();},children:jsx(Ue,{enableDrawer:"auto",style:{zIndex:999999},children:jsxs(Pe,{"aria-labelledby":r,className:Ly,drawerBackground:"subtle",children:[jsxs(D,{paddingLeft:Pr.padding.horizontal.lg,paddingRight:Pr.padding.horizontal.sm,display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",backgroundColor:"background.primary.subtle",className:By,children:[jsx(te,{id:r,elementType:"h3",type:"title",size:"md",children:o(kr.help)}),jsx(L,{icon:XIcon,size:"md",variant:"secondary","aria-label":o(kr.close),onPress:t})]}),jsx(q,{className:Vy}),jsxs(D,{paddingX:Pr.padding.horizontal.lg,role:"table","aria-labelledby":r,backgroundColor:"background.primary.subtle",children:[jsx("div",{role:"rowgroup",children:jsxs(D,{role:"row",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingY:Pr.padding.vertical.md,color:"text.primary",children:[jsx("h6",{className:sprinkles({typography:"heading.h6.semibold"}),role:"columnheader",children:o(kr.action)}),jsx("h6",{className:sprinkles({typography:"heading.h6.semibold"}),role:"columnheader",style:{textTransform:"capitalize"},children:o(kr.shortcut)})]})}),jsx("div",{role:"rowgroup",children:Ky.map(([a,n],i)=>jsxs(Fragment$1,{children:[jsxs(D,{role:"row",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingY:Pr.padding.vertical.xs,style:{minHeight:40},children:[jsx(te,{type:"subtitle",size:"sm",role:"cell",children:o(kr[camelCase(a)])}),jsx(te,{elementType:"kbd",type:"subtitle",size:"sm",role:"cell",children:getOsSpecificKeyboardShortcutLabel(n,true)})]}),i!==Ky.length-1&&jsx(q,{})]},a))})]})]})})})},kr=W({toolbarFocus:{id:"toolbarFocus",defaultMessage:"Toolbar Focus"},help:{id:"help",defaultMessage:"Help"},close:{id:"close",defaultMessage:"Close"},action:{id:"action",defaultMessage:"Action"},shortcut:{id:"shortcut",defaultMessage:"Shortcut"},bold:{id:"bold",defaultMessage:"Bold"},italic:{id:"italic",defaultMessage:"Italic"},underline:{id:"underline",defaultMessage:"Underline"},selectAll:{id:"selectAll",defaultMessage:"Select All"},cut:{id:"cut",defaultMessage:"Cut"},copy:{id:"copy",defaultMessage:"Copy"},paste:{id:"paste",defaultMessage:"Paste"},undo:{id:"undo",defaultMessage:"Undo"},redo:{id:"redo",defaultMessage:"Redo"},openHelpDialog:{id:"openHelpDialog",defaultMessage:"Open Help Dialog"},submit:{id:"submit",defaultMessage:"Submit"}});var sn=ht.forwardRef(({value:e,defaultValue:t,onChange:o,placeholder:r,spellCheck:a,textBoxRef:n,isInline:i,isMinimal:s,isDisabled:l,editableContentAriaLabel:p,editorHandle:c,autoFocus:u,saveOnEnter:m,onSave:d},b)=>{let y=ht.useRef(null),[f,g]=useControlledState(e,t||"",o),v=useCallback(k=>{g(k.currentTarget.value||"");},[g]),_=useCallback(k=>{(m&&k.key==="Enter"&&!k.shiftKey||(k.ctrlKey||k.metaKey)&&k.key==="Enter")&&(k.preventDefault(),d());},[m,d]);useImperativeHandle(b,()=>({clear:()=>{g("");}}));let h=useCallback(k=>{k.currentTarget.style.height="16px",k.currentTarget.style.height=k.currentTarget.scrollHeight+"px";},[]);useGranularLayoutEffect(()=>{let k=y.current;k&&(k.style.height="16px",k.style.height=k.scrollHeight+"px");},[s],[f]),useImperativeHandle(c,()=>({setCaretPosition:k=>{y.current&&(y.current.focus(),y.current.setSelectionRange(k,k));},focus:()=>{y.current&&y.current.focus();}}));let{focusProps:x,isFocused:w,isFocusVisible:C}=useFocusRing(),{hoverProps:I,isHovered:P}=useHover({}),S=filterTruthyValues({"data-focus-visible":C,"data-hovered":P,"data-focused":w});return jsx("textarea",{...mergeProps(x,I,S),ref:M(y,n),className:classNames(s?Oy:[rn(),an({isInline:i}),Uy]),autoFocus:u,onChange:v,disabled:l,onInput:h,value:f,placeholder:r,spellCheck:a,"aria-label":p,onKeyDown:_})});sn.displayName="PlainEditor";var Rr="mention",ln="mention_input",n1=ht.forwardRef(({onCancel:e,editor:t,element:o,onSelectionChange:r},a)=>{let{containerRef:n,items:i,maxMentionableUsersSuggestions:s}=useContext(cn),l=useSelected(),[p,c]=useState(""),{contains:u}=useFilter({sensitivity:"base"}),{formatMessage:m}=A(),d=useMemo(()=>{let R=i.filter(N=>p===""||u(N.displayName,p)).map(N=>({id:N.id,label:N.displayName,data:N}));return s?take(R,s):R},[i,s,p,u]),b=useCallback(R=>jsx(Item,{children:R.label},R.id),[]),y=useCallback((R=false)=>{let N=findNodePath(t,o);N&&(removeNodes(t,{at:N}),R&&focusEditor(t));},[t,o]),f=useComboBoxState({items:d,children:b,menuTrigger:"focus",onSelectionChange:R=>{y(true),r?.(R);}}),g=ht.useRef(null),v=ht.useRef(null),_=ht.useRef(null),h=ht.useRef(null),x=useHTMLInputCursorState(v);useInteractOutside({ref:h,onInteractOutside:()=>{f.close();}});let{inputProps:w,listBoxProps:C}=useComboBox({defaultItems:d,inputRef:v,buttonRef:g,listBoxRef:_,popoverRef:h,menuTrigger:"focus","aria-label":m(Uw.mention)},f);useEffect(()=>{v.current?.focus();},[]);let I=useCallback((R="manual",N=false)=>{y(N),e?.(R,f.inputValue);},[e,y,f.inputValue]),P=useRef(l);useEffect(()=>{P.current&&!l&&I("deselect"),P.current=l;},[l,I]);let S=x?.atStart??false,k=x?.atEnd??false,T=useCallback(R=>{R.key==="Backspace"&&S?I("backspace",true):R.key==="Escape"?I("escape",true):R.key==="ArrowLeft"&&S?I("arrowLeft",true):R.key==="ArrowRight"&&k&&I("arrowRight",true);let N=Hotkeys.isUndo(R)&&t.history.undos.length>0,E=Hotkeys.isRedo(R)&&t.history.redos.length>0;(N||E)&&(R.preventDefault(),t[N?"undo":"redo"](),focusEditor(t));},[S,k,I,t]),$=useMemo(()=>{if(!CSS.supports("field-sizing","content")){let R=re(v.current),N=v.current?R?.getComputedStyle(v.current).font:void 0;return {width:N?getTextDimensions({text:f.inputValue,font:N}).width+10:"4ch"}}},[f.inputValue]);return jsxs(Ct.Provider,{value:f,children:[jsx("input",{...mergeProps(w,{onKeyDown:T,onBlur:()=>{I("blur",true);},onChange:R=>{c(R.target.value);}}),style:$,className:Ay,ref:M(a,v)}),jsx(we,{triggerRef:n,isNonModal:true,ref:h,state:f,crossOffset:-2,children:jsx(fe,{...C,items:void 0,autoFocus:"first",ref:_,className:classNames(at,sprinkles({width:"full"})),renderOption:s1})})]})});n1.displayName="MentionInputContentElement";var js=withRef(({className:e,...t},o)=>{let{children:r,editor:a,element:n}=t,{items:i}=useContext(cn),s=useRef(null),[l,p]=useState(null);useEffect(()=>{let m=findNodePath(a,n);if(!m)return;let d=getPointBefore(a,m);if(!d)return;let b=createPointRef(a,d);return p(b),()=>{b.unref();}},[a,n]);let c=useCallback(()=>{let m=s.current?.getRootNode()instanceof ShadowRoot;moveSelection(a,{unit:"offset"}),moveSelection(a,{unit:"character",distance:1}),Fo()&&m&&focusEditor(a);},[a]),u=useCallback(m=>{if(!m)return;let d=s.current?.getRootNode()instanceof ShadowRoot,b=i.find(f=>f.id===m);invariant(b,"User not found");let y={type:Rr,value:b.id,displayName:b.displayName,children:[{text:""}]};insertNodes(a,[y,{text:" "}]),d?setTimeout(()=>{c();},0):c();},[a,i,c]);return jsxs(PlateElement,{as:"span","data-slate-value":n.value,contentEditable:false,className:e,ref:o,...t,children:[jsx(n1,{onCancel:(m,d)=>{m!=="backspace"&&insertText(a,"@"+d,{at:l?.current??void 0}),(m==="arrowLeft"||m==="arrowRight")&&moveSelection(a,{distance:1,reverse:m==="arrowLeft"});},onSelectionChange:u,ref:s,element:n,editor:a}),r]})});js.displayName="MentionInputElement";var Os=withRef(({className:e,onClick:t,children:o,...r},a)=>{let n=useElement();return jsxs(PlateElement,{as:"span",className:e,contentEditable:false,"data-user-id":n.value,onClick:getHandler(t,n),ref:a,...r,children:["@",n.displayName,o]})});Os.displayName="MentionElement";var i1=(e,{options:{trigger:t,triggerPreviousCharPattern:o,triggerQuery:r}})=>{let{insertText:a}=e,n=i=>i===t;return e.insertText=i=>{if(!e.selection||!n(i)||r&&!r(e)){a(i);return}let s=getEditorString(e,getRange(e,e.selection,getPointBefore(e,e.selection)));if(o?.test(s)){pn(e);return}a(i);},e},Uw=W({mention:{defaultMessage:"Mention",id:"mention"}});function p1({className:e,children:t,...o}){return jsx(PlateElement,{asChild:true,className:e,...o,children:jsx("p",{children:t})})}function iI(e){return Object.entries(e).map(([t,o])=>`${kebabCase(t)}:${o}`).filter(([,t])=>!!t).join(";")}function sI(e){return "text"in e}function lI(e){return e.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}function $r(e){if(!e)return "";function t(o){if(sI(o)){let a=lI(o.text);return o.bold&&(a=`<b>${a}</b>`),o.italic&&(a=`<i>${a}</i>`),o.underline&&(a=`<u>${a}</u>`),(o.color||o.backgroundColor)&&(a=`<span style="${iI(filterTruthyValues({color:o.color||void 0,backgroundColor:o.backgroundColor||void 0}))}">${a}</span>`),a}let r=o.children?.map($r).join("");switch(o.type){case ELEMENT_PARAGRAPH:return `<p>${r}</p>`;case ELEMENT_LINK:return `<a href="${o.url}">${r}</a>`;case Rr:return `<span data-user-id="${o.value}">${o.displayName}</span>`;default:return r}}return Array.isArray(e)?e.map(o=>t(o)).join(""):t(e)}function pI(e){return e?(e=e.trim(),e.endsWith(";")&&(e=e.slice(0,-1)),Object.fromEntries(e.split(";").map(t=>t.split(":").map(o=>o.trim())).map(([t,o])=>[camelCase(t),o]))):{}}function Ks(e){e.startsWith("<p>")||(e=`<p>${e}</p>`);let t=new DOMParser().parseFromString(c1.default.sanitize(e),"text/html"),o=t.querySelectorAll("[style]");for(let a of o)a.style.textDecoration==="underline"&&(a.style.textDecoration="",a.style.cssText||a.removeAttribute("style"),a.hasAttributes()?a.innerHTML=`<u>${a.innerHTML}</u>`:a.outerHTML=`<u>${a.innerHTML}</u>`);let r=t.querySelectorAll("br");for(let a of r)a.outerHTML=a.closest("p")?`
|
|
11
|
-
`:"<p>";return
|
|
12
|
-
`);case "SPAN":{let a=e.dataset.userId;return a?jsx$1("element",{type:Rr,value:a,displayName:e.textContent},{text:""}):r}case "P":return jsx$1("element",{type:ELEMENT_PARAGRAPH},r);case "A":return jsx$1("element",{type:ELEMENT_LINK,url:e.getAttribute("href")},r);default:return r}}function m1(e){let t=findNode(e,{match:{type:getPluginType(e,ELEMENT_LINK)}}),[o]=t||[{url:""}];return o?.url}function pn(e){let t={children:[{text:" "}],type:ln};e.insertNode(t);}var cI=createPluginFactory({isElement:true,isInline:true,isMarkableVoid:true,isVoid:true,key:Rr,options:{trigger:"@",triggerPreviousCharPattern:/^$|^[\s"']$/},plugins:[{isElement:true,isInline:true,isVoid:true,key:ln}],withOverrides:i1}),f1=createPlugins([createParagraphPlugin({component:p1}),createBoldPlugin({component:withProps(PlateLeaf,{as:"b"})}),createItalicPlugin({component:withProps(PlateLeaf,{as:"i"})}),createUnderlinePlugin({component:withProps(PlateLeaf,{as:"u"})}),createFontColorPlugin(),createFontBackgroundColorPlugin(),createLinkPlugin({component:y1}),cI({component:Os})],{components:{[ln]:js}});var Mt={Add:"add",Edit:"edit",Show:"show"},_1=({isDisabled:e})=>{let{formatMessage:t}=A(),o=useEditorRef();return jsxs(je,{type:"dialog",children:[jsx(Oe,{children:jsx(L,{icon:LinkIcon,size:"sm",isDisabled:e,"aria-label":t(Nt.addLink),className:ho,preventFocusOnPress:true})}),jsx(Le,{className:sprinkles({boxShadow:"medium"}),placement:"top end",children:({close:r})=>jsx(Pe,{size:"content",style:{minWidth:240},children:jsx(vI,{close:()=>{r(),setTimeout(()=>{focusEditor(o,o.selection);},0);}})})})]})},vI=({close:e})=>{let t=useEditorRef(),{formatMessage:o}=A(),r=useEditorSelector(p=>m1(p),[]),[a,n]=ht.useState(r?Mt.Show:Mt.Add),[i,s]=ht.useState(r||""),l=jsx(D,{padding:"lg",children:jsx(nt,{label:o(Nt.link),value:i,autoFocus:true,onChange:s,placeholder:"https://yourdomain.com"})});return jsxs(Fragment,{children:[a===Mt.Add&&jsxs(Fragment,{children:[l,jsx(D,{display:"flex",justifyContent:"flex-end",padding:"lg",className:My,children:jsx(K,{isDisabled:!isUrl(i,true),label:o(Nt.addLink),size:"sm",onPress:()=>{upsertLink(t,{url:i,skipValidation:true}),e?.();},preventFocusOnPress:true})})]}),a===Mt.Show&&jsxs(Fragment,{children:[jsx(D,{padding:"lg",children:jsx(te,{type:"subtitle",size:"sm",children:r})}),jsxs(D,{display:"flex",justifyContent:"flex-end",padding:"lg",gap:"lg",borderColor:"border.subtle",borderWidth:1,borderStyle:"solid",children:[jsx(K,{label:o(Nt.editLink),size:"sm",variant:"secondary",onPress:()=>{n(Mt.Edit);},style:{flex:1,justifyContent:"center"}}),jsx(K,{label:o(Nt.removeLink),size:"sm",onPress:()=>{unwrapLink(t),e?.();},preventFocusOnPress:true,style:{flex:1,justifyContent:"center"}})]})]}),a===Mt.Edit&&jsxs(Fragment,{children:[l,jsxs(D,{display:"flex",justifyContent:"flex-end",padding:"lg",gap:"lg",borderColor:"border.subtle",borderWidth:1,borderStyle:"solid",children:[jsx(K,{label:o(Nt.cancel),size:"sm",variant:"secondary",onPress:()=>{n(Mt.Show),e?.();}}),jsx(K,{label:o(Nt.save),size:"sm",onPress:()=>{upsertLink(t,{url:i,skipValidation:true}),e?.();}})]})]})]})};function y1({className:e,children:t,...o}){return jsx(PlateElement,{asChild:true,className:e,...o,children:jsx("a",{className:xa({size:"sm"}),children:t})})}var Nt=W({addLink:{id:"addLink",defaultMessage:"Add Link",description:"Add Link"},editLink:{id:"editLink",defaultMessage:"Edit Link",description:"Edit Link"},removeLink:{id:"removeLink",defaultMessage:"Remove Link",description:"Remove Link"},cancel:{id:"cancel",defaultMessage:"Cancel",description:"Cancel"},save:{id:"save",defaultMessage:"Save",description:"Save"},link:{id:"linkAnnotation",defaultMessage:"Link",description:"Link"}});var zI=parseColor("#ffffff00").toString("hexa"),Gs=[{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"}];[...Gs,{label:"Transparent",color:zI}];var un=({nodeType:e,icon:t,ariaLabel:o,isDisabled:r})=>{let a=useEditorSelector(i=>isMarkActive(i,e),[]),n=useEditorRef();return jsx(Ie,{variant:"tertiary",isSelected:a,size:"sm",icon:t,"aria-label":o,isDisabled:r,onPress:()=>{toggleMark(n,{key:e});},preventFocusOnPress:true})},Ys=({nodeType:e,"aria-label":t,isDisabled:o})=>{let{updateColor:r,clearColor:a,color:n}=useColorDropdownMenuState({customColors:[],colors:[],nodeType:e}),i=useCallback(({ref:l,triggerProps:p})=>jsx(L,{icon:e==="color"?TextIcon$1:HighlightTextIcon,"aria-label":t,size:"md",variant:"popover",isDisabled:o,className:ho,preventFocusOnPress:true,...p,ref:l}),[e,t,o]),s=useCallback(l=>{l?r(l.toString("rgba")):a();},[a,r]);return jsx(go,{presets:Gs,allowRemoval:true,pickerMode:"lazy",placement:"top end",colorLabel:false,renderTriggerButton:i,value:n||"#000000",onChange:s,isDisabled:o})};var XI=[{type:ELEMENT_PARAGRAPH,children:[{text:""}]}],cn=ht.createContext({items:[],containerRef:{current:null},maxMentionableUsersSuggestions:10}),Js=ht.forwardRef(({value:e,defaultValue:t,onChange:o,style:r,spellCheck:a,placeholder:n,isInline:i,isDisabled:s,editableContentAriaLabel:l,containerRef:p,onHelpDialogOpenRequest:c,mentionableUsers:u,editorHandle:m,maxMentionableUsersSuggestions:d,autoFocus:b,editorRef:y,saveOnEnter:f,onSave:g},v)=>{let _=useRef(null),h=useId(),{formatMessage:x}=A(),w=useRef(null),C=w.current,I=useRef(null),P=useMemo(()=>C?.getRootNode()instanceof ShadowRoot,[C]),[S,k]=useControlledState(e?Ks(e):void 0,Ks(t||"<p></p>"),R=>{o&&o($r(R));}),{keyboardProps:T}=useKeyboard({onKeyDown:R=>{(f&&R.key==="Enter"&&!R.shiftKey||(R.ctrlKey||R.metaKey)&&R.key==="Enter")&&(R.preventDefault(),g()),R.altKey&&R.key==="F10"?(R.preventDefault(),_.current&&_.current.querySelector("button")?.focus()):R.continuePropagation(),Fo()&&P&&I.current&&focusEditor(I.current);}});useEffect(()=>{s&&I.current&&deselect(I.current);},[s]),useImperativeHandle(v,()=>({startMention:()=>{I.current&&!w.current?.querySelector("input[role='combobox']")&&pn(I.current);}})),useImperativeHandle(m,()=>({setCaretPosition:R=>{I.current&&(focusEditor(I.current),moveSelection(I.current,{distance:R,unit:"character"}));},focus:()=>{I.current&&focusEditor(I.current);}}));let $=useMemo(()=>({items:u||[],containerRef:p,maxMentionableUsersSuggestions:d}),[u,p,d]);return jsx(cn.Provider,{value:$,children:jsxs(Plate,{initialValue:S||XI,plugins:f1,editorRef:M(I,y||null),onChange:R=>{k(R);},children:[jsxs(on,{className:nn,"aria-controls":h,ref:_,children:[jsxs(D,{display:"flex",flexDirection:"row",role:"group",gap:"xs",paddingX:"sm",children:[jsx(un,{nodeType:MARK_BOLD,icon:BoldIcon,ariaLabel:x(ko.bold),isDisabled:s}),jsx(un,{nodeType:MARK_ITALIC,icon:ItalicIcon,ariaLabel:x(ko.italic),isDisabled:s}),jsx(un,{nodeType:MARK_UNDERLINE,icon:UnderlineIcon,ariaLabel:x(ko.underline),isDisabled:s})]}),jsx(q,{orientation:"vertical",className:Cr}),jsx(Ys,{nodeType:MARK_COLOR,"aria-label":x(ko.fontColor),isDisabled:s}),jsx(q,{orientation:"vertical",className:Cr}),jsx(Ys,{nodeType:MARK_BG_COLOR,"aria-label":x(ko.backgroundColor),isDisabled:s}),jsx(q,{orientation:"vertical",className:Cr}),jsx(_1,{isDisabled:s}),jsx(q,{orientation:"vertical",className:Cr}),jsx(L,{className:ho,icon:QuestionmarkCircleIcon,size:"sm","aria-label":x(ko.help),onPress:c})]}),jsx(q,{variant:"secondary"}),jsx("div",{...T,ref:w,children:jsx(PlateContent,{id:h,disabled:s,readOnly:s,style:r,placeholder:n,autoFocus:b,spellCheck:a,"aria-label":l,className:classNames(rn({isDisabled:s}),an({isInline:i})),renderPlaceholder:({attributes:R,children:N})=>jsx("span",{...R,className:sprinkles({paddingY:"lg"}),children:N})})})]})})});Js.displayName="RichEditor";var s1=({key:e,value:t},{isDisabled:o,optionProps:r,isFocused:a,_state:n},i)=>{let{hoverProps:s}=useHover({isDisabled:o}),{label:l,data:p}=t;return jsxs(Fragment,{children:[jsxs("li",{...mergeProps(r,s),className:Fy({isDisabled:o,isHovered:a}),"data-active":a,ref:i,children:[jsx(fo,{name:l,...p?.avatar}),jsxs(D,{display:"flex",flexDirection:"column",children:[jsx(te,{type:"subtitle",size:"sm",children:l}),jsx(te,{type:"helper",size:"sm",children:p?.description})]})]}),e===n.collection.getLastKey()?null:jsx(q,{})]})},ko=W({bold:{defaultMessage:"Bold",id:"bold"},italic:{defaultMessage:"Italic",id:"italic"},underline:{defaultMessage:"Underline",id:"underline"},backgroundColor:{defaultMessage:"Background color",id:"backgroundColor"},fontColor:{defaultMessage:"Font color",id:"fontColor"},help:{defaultMessage:"Help",id:"help"}});var k1=ht.memo(ht.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,enableRichText:a=false,onCancel:n,onSave:i,isInline:s=true,submitButtonIcon:l=ArrowUpCircleFilledIcon,submitButtonAriaLabel:p,cancelButtonAriaLabel:c,"aria-label":u,"aria-describedby":m,"aria-labelledby":d,"aria-details":b,editableContentAriaLabel:y="Editing Area",footerButtons:f,clearOnCancel:g,clearOnSave:v,..._},h)=>{let x=useRef(null),{formatMessage:w}=A(),C=useRef(null),I=useRef(null),P=useRef(null),S=!a&&_.variant==="minimal",k=useRef(null),[T,$]=ht.useState(_.value||_.defaultValue),R=_.isDisabled||_.isSaveDisabled||!getPlainText(T||""),{fieldProps:N}=useLabel({"aria-label":u,"aria-labelledby":d,"aria-describedby":m,"aria-details":b,labelElementType:"div"});S&&!_.avatarName&&console.warn("Editor: When using the minimal `variant` and `enableRichText` is `false`, you should provide an `avatarName`.");let E=useCallback(()=>{$(""),a?x.current?.reset():I.current?.clear();},[a]),F=useCallback(()=>{R||(i?.(a?$r(x.current?.children):C.current.value),v&&E());},[E,v,a,i,R]),B=jsx(L,{variant:"ghost","aria-label":p||w(el.save),icon:l,isDisabled:R,size:"md",excludeFromTabOrder:S,className:S?jy:void 0,onPress:F,preventFocusOnPress:true}),[j,O]=ht.useState(false),{keyboardProps:H}=useKeyboard({onKeyDown:V=>{(V.metaKey||V.ctrlKey)&&V.shiftKey&&V.key==="h"&&(V.preventDefault(),O(true));}}),Q=useCallback(V=>{$(V),_.onChange?.(V);},[_]);return jsxs("div",{...mergeProps(N,a?H:{}),role:"application",ref:M(P,h),style:t,"data-block-id":o,"data-block-class":r,className:classNames(Ey({isInline:s,isMinimal:S}),"BaselineUI-Editor",e),"aria-disabled":_.isDisabled,children:[S?jsxs(Fragment,{children:[s?jsx(fo,{className:Ny,name:_.avatarName||""}):null,jsxs("div",{className:Hy({isInline:s}),children:[jsx(sn,{isMinimal:S,textBoxRef:C,isInline:s,editableContentAriaLabel:y,..._,onChange:Q,onSave:F}),B]})]}):jsxs(Fragment,{children:[a?jsx(Js,{containerRef:P,ref:k,editorRef:x,isInline:s,editableContentAriaLabel:y,onHelpDialogOpenRequest:()=>{O(true);},..._,onChange:Q,onSave:F}):jsxs(Fragment,{children:[!s&&jsx(q,{variant:"secondary"}),jsx(sn,{onCancel:n,textBoxRef:C,ref:I,isInline:s,editableContentAriaLabel:y,..._,onChange:V=>{$(V),_.onChange?.(V);},onSave:F})]}),jsx(q,{variant:"secondary"}),jsxs("div",{className:classNames(nn,sprinkles({justifyContent:"space-between"})),children:[jsxs(D,{paddingX:"sm",gap:"sm",display:"flex",children:[a&&_.mentionableUsers?jsx(L,{icon:AtIcon,size:"sm","aria-label":w(el.mention),onPress:()=>k.current?.startMention(),preventFocusOnPress:true}):null,f?.map(({type:V,props:U},oe)=>V==="action"?jsx(L,{...U,size:"sm",isDisabled:_.isDisabled||U.isDisabled},oe):jsx(Ie,{...U,size:"sm",variant:"tertiary",isDisabled:_.isDisabled||U.isDisabled},oe))]}),jsxs(D,{children:[!!n&&jsx(L,{variant:"secondary",icon:XCircleFilledIcon,isDisabled:_.isDisabled,size:"md",onPress:()=>{n(),g&&E();},"aria-label":c||w(el.cancel)}),B]})]})]}),jsx(Gy,{isOpen:j,onClose:()=>{O(false);}})]})}));k1.displayName="Editor";var el=W({cancel:{defaultMessage:"Cancel",id:"cancel"},save:{defaultMessage:"Save",id:"save"},mention:{defaultMessage:"Mention",id:"mention"}});var w1="_8kqf970 _1yep5z6po _1yep5z6pp _1yep5z6pq _1yep5z6m6 _1yep5z6m7 _1yep5z6m8 _1yep5z6oi _1yep5z6oj _1yep5z6ok _1yep5z614v _1yep5z614w _1yep5z614x _1yep5z6154 _1yep5z6155 _1yep5z6156 _1yep5z615m _1yep5z615n _1yep5z615o _1yep5z6z9 _1yep5z6vi _1yep5z6vj _1yep5z6vk _1yep5z617s _1yep5z6101";var R1=2,T1=ht.forwardRef(({className:e,style:t,hideForKeyboard:o,scrollRef:r,label:a,delay:n=1500,smoothScroll:i=true,"data-block-id":s,"data-block-class":l},p)=>{let c=ht.useRef(null),u=useInteractionModality(),[m,d]=ht.useState(false),b=useCallback(()=>{let P=r?.current||_e(c.current).body;return re(P).getComputedStyle(P).flexDirection==="column-reverse"?P.scrollTop+R1>=0:P.scrollTop+P.clientHeight+R1>=P.scrollHeight},[r]),[y,f]=ht.useState(b),{buttonProps:g,isPressed:v}=useButton({onPress:()=>{let P=r?.current||_e(c.current).body;P.scrollTo({top:P.scrollHeight,behavior:i?"smooth":"auto"});}},c),{focusProps:_,isFocused:h,isFocusVisible:x}=useFocusRing(),{hoverProps:w,isHovered:C}=useHover({}),I=filterTruthyValues({"data-block-id":s,"data-block-class":l,"data-pressed":v,"data-focus-visible":x,"data-hovered":C,"data-focused":h});return useEffect(()=>{f(b());},[b]),useEffect(()=>{let P=r?.current||_e(c.current).body,S="onscrollend"in re(P),k=()=>{setTimeout(()=>{d(false),f(b());},n);},T=()=>{d(true),S||k();};return P.addEventListener("scroll",T),P.addEventListener("scrollend",k),()=>{P.removeEventListener("scroll",T),P.removeEventListener("scrollend",k);}},[r,n,b]),jsx(AnimatePresence,{initial:false,children:(!o||u!=="keyboard")&&!m&&!y?jsxs(motion.button,{initial:{opacity:0,transform:"translateX(-50%) translateY(10px)"},animate:{opacity:1,transform:"translateX(-50%) translateY(0)"},exit:{opacity:0,transform:"translateX(-50%) translateY(10px)"},transition:{duration:.3},...mergeProps(g,_,w,I),className:classNames(w1,Ta({isFocusVisible:x,variant:"high-contrast",isHovered:C}),Sa({variant:"high-contrast"}),"BaselineUI-ScrollControlButton",e),style:t,ref:M(p,c),children:[jsx(ArrowDownCircleFilledIcon,{size:16,className:ar({variant:"high-contrast"})}),a]}):null})});T1.displayName="ScrollControlButton";var ol="_1yep5z6k4 _1yep5z6k5 _1yep5z6k6 _1yep5z6kd _1yep5z6ke _1yep5z6kf",S1=z({defaultClassName:"_1v0p2z10 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j4 _1yep5z6j5 _1yep5z6j6 _1yep5z69f _1yep5z69g _1yep5z69h",variantClassNames:{hasTitleAndIcon:{true:"_1yep5z6m6 _1yep5z6m7 _1yep5z6m8 _1yep5z6oo _1yep5z6op _1yep5z6oq"},hasNoCloseBtn:{true:"_1yep5z6mc _1yep5z6md _1yep5z6me _1yep5z6oo _1yep5z6op _1yep5z6oq _1yep5z6pu _1yep5z6pv _1yep5z6pw _1yep5z6ni _1yep5z6nj _1yep5z6nk"}},defaultVariants:{},compoundVariants:[[{hasTitleAndIcon:true,hasNoCloseBtn:true},"_1yep5z61hr _1yep5z61hs _1yep5z61ht"]]}),D1="_1v0p2z10";var yn=ht.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,message:a,title:n,primaryActionLabel:i,cancelLabel:s,textInputProps:l,icon:p,iconColor:c,showCloseButton:u=true,onPrimaryAction:m,onCancel:d,autoFocusButton:b,isPrimaryActionDisabled:y},f)=>{let g=useId(),{formatMessage:v}=A(),_=n&&jsx(te,{id:g,type:"title",size:"sm",elementType:"h3",children:n});return jsxs(Pe,{className:e,style:t,"data-block-id":o,"data-block-class":r,size:"sm",variant:"primary",role:"alertdialog",ref:f,"aria-labelledby":g,children:[jsxs("div",{className:S1({hasTitleAndIcon:!!(p&&n),hasNoCloseBtn:!u}),children:[jsxs(D,{display:"flex",justifyContent:"space-between",alignItems:"center",flexDirection:"row",children:[p?jsx(p,{style:{color:c},size:24}):null,!p&&_,u?jsx(L,{icon:XIcon,variant:"secondary",size:"md","aria-label":v(hR.close),onPress:d}):null]}),p?_:null]}),a?jsx(D,{elementType:"section",className:D1,paddingX:"lg",paddingBottom:"lg",typography:"body.sm.regular",color:"text.primary",children:a}):null,l?jsx(D,{paddingX:"lg",paddingBottom:"lg",children:jsx(nt,{...l})}):null,s||i?jsxs(Fragment,{children:[jsx(q,{}),jsxs(D,{padding:"lg",display:"flex",gap:"xl",children:[s?jsx(K,{variant:"secondary",className:ol,label:s,onPress:d,autoFocus:b==="cancel"}):null,i?jsx(K,{className:ol,label:i,onPress:m,autoFocus:b==="primary",isDisabled:y}):null]})]}):null]})});yn.displayName="AlertDialog";var hR=W({close:{id:"close",defaultMessage:"Close",description:"Close button label"}});var M1="_1t55bp71",N1="_1yep5z6e3 _1yep5z6eu _1yep5z6iy _1yep5z6iz _1yep5z6j0 _1yep5z69i _1yep5z69j _1yep5z69k",E1="_1t55bp70";var IR=wR(),L1=ht.forwardRef(({className:e,style:t,children:o,"data-block-id":r,"data-block-class":a,showCaret:n},i)=>{let s=useMemo(()=>{let l=o;return (!o||Array.isArray(o)&&o.length===0)&&(l=""),IR.render(l)},[o]);return jsx("div",{className:classNames(N1,E1,{[M1]:n},"BaselineUI-Markdown",e),"data-block-id":r,"data-block-class":a,style:t,ref:i,dangerouslySetInnerHTML:{__html:s}})});L1.displayName="Markdown";function j1(e){let{formatMessage:t,locale:o}=A(),[r,a]=ht.useState(false),[n,i]=ht.useState(0),[s,l]=ht.useState(0),[p,c]=ht.useState(false);useEffect(()=>{if(!e.current)return;let d=e.current,b=()=>{a(false),i(0);},y=()=>{p||i(d.currentTime*100/d.duration);},f=()=>{l(d.duration);};return d.addEventListener("ended",b),d.addEventListener("timeupdate",y),d.addEventListener("loadedmetadata",f),()=>{d.removeEventListener("ended",b),d.removeEventListener("timeupdate",y),d.removeEventListener("loadedmetadata",f);}},[p,e]);let u=useCallback(()=>{(async()=>e.current&&(e.current.paused?(await e.current.play(),a(true),announce(t(A1.playing),"polite")):(e.current.pause(),a(false),announce(t(A1.paused),"polite"))))();},[t,e]),m=useCallback(d=>{e.current&&(e.current.currentTime=d*e.current.duration/100,announce(TR(e.current.currentTime,o.locale),"assertive"));},[o.locale,e]);return {isPlaying:r,progress:n,duration:s,togglePlay:u,seek:m,setProgress:i,formattedCurrentTime:e.current?.currentTime?F1(e.current?.currentTime):"00:00",formattedDuration:s?F1(s):"00:00",setIsSliderDragging:c}}var A1=W({playing:{id:"playing",defaultMessage:"Playing"},paused:{id:"paused",defaultMessage:"Paused"}});function TR(e,t){let o=Math.floor(e/3600),r=Math.floor(e%3600/60),a=e%60,n={...o&&{hours:o},...r&&{minutes:r},seconds:Math.floor(a)};return new Intl.DurationFormat(t,{style:"long"}).format(n)}function F1(e){let t=Math.floor(e%3600/60),o=Math.floor(e%60);return [t,o].map(r=>r.toString().padStart(2,"0")).join(":")}var O1="_1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z69o _1yep5z69p _1yep5z69q",H1="rta2n91 _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z69o _1yep5z69p _1yep5z69q _1yep5z6101 _1yep5z6vl _1yep5z6vm _1yep5z6vn _1yep5z617q _1yep5z610y",V1="rta2n90";var K1=ht.forwardRef(({className:e,style:t,size:o="lg",sources:r,"data-block-id":a,"data-block-class":n,...i},s)=>{let l=ht.useRef(null),{isPlaying:p,progress:c,duration:u,togglePlay:m,seek:d,formattedDuration:b,formattedCurrentTime:y,setProgress:f,setIsSliderDragging:g}=j1(l),{formatMessage:v}=A(),_=filterTruthyValues({"data-block-id":a,"data-block-class":n,"data-state":p?"playing":"paused","data-loaded":u>0});return jsxs("div",{..._,...i,className:classNames(O1,"BaselineUI-AudioPlayer",e),role:"group",style:t,ref:s,children:[jsx(VisuallyHidden,{children:jsx("audio",{ref:l,children:r.map(({url:h,type:x})=>jsx("source",{src:h,type:x},h))})}),jsx(Ie,{icon:p?PauseIcon:PlayIcon,variant:"toolbar",isSelected:p,size:o,"aria-label":v(p?al.pause:al.play),style:{borderRadius:"50%"},onPress:m}),jsxs("div",{className:H1,children:[jsx("span",{"aria-hidden":true,children:y}),jsx(to,{"aria-label":v(al.audioTimeline),value:c,minValue:0,maxValue:100,className:V1,onChange:h=>{f(h),g(true);},onChangeEnd:h=>{d(h),g(false);}}),jsx("span",{"aria-hidden":true,children:b})]})]})});K1.displayName="AudioPlayer";var al=W({play:{id:"play",defaultMessage:"Play"},pause:{id:"pause",defaultMessage:"Pause"},audioTimeline:{id:"audioTimeline",defaultMessage:"Audio timeline"}});var G1="_1w920rnd _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6g1 _1yep5z6ig _1yep5z6ih _1yep5z6ii",W1="_1w920rn1 _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6j4 _1yep5z6j5 _1yep5z6j6 _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z69i _1yep5z69j _1yep5z69k",Y1="_1w920rn0 _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6le",gn=z({defaultClassName:"_1w920rn2 _1yep5z6d6 _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6id _1yep5z6ie _1yep5z6if",variantClassNames:{isFocusVisible:{true:"_1yep5z6lt _1yep5z6lr _1yep5z6hx"},isSelected:{true:"_1yep5z6lt _1yep5z6lr _1yep5z6hx"},isLoading:{true:"_1yep5z616g _1yep5z616h _1yep5z616i"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:true,isSelected:true},"_1w920rn6 _1yep5z6lt _1yep5z6lr _1yep5z6hx"]]}),X1="_1w920rnb _1yep5z6lo",Z1=z({defaultClassName:"_1w920rn7 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6ar _1yep5z6as _1yep5z6at _1yep5z6bf _1yep5z6bg _1yep5z6bh _1yep5z6c3 _1yep5z6c4 _1yep5z6c5 _1yep5z6cr _1yep5z6cs _1yep5z6ct _1yep5z6g5 _1yep5z6eu _1yep5z6dy",variantClassNames:{isFocusVisible:{true:"_1w920rn8 _1yep5z6lt _1yep5z6lr _1yep5z6hx"},isSelected:{true:"_1w920rn9"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:true,isSelected:true},"_1w920rna _1yep5z61ty _1yep5z61tx _1yep5z61q4"]]}),J1="_1w920rnc";var vn=({items:e,ulRef:t,containerClassName:o,previewClassName:r,itemDataAttribute:a,showCount:n=false})=>{let{length:i}=e,s=ht.useRef(null);return useLayoutEffect(()=>{if(!s.current)return;let l=s.current.closest(o)?.querySelector(`[${a}='${e?.at(-1)?.key}']`)?.cloneNode(true);invariant(l,"Node is not defined."),s.current?.prepend(l);},[e,t,o,a]),jsx("div",{className:r,ref:s,children:n&&i>1?jsx(D,{backgroundColor:"background.secondary.medium",borderRadius:"full",typography:"label.md.medium",color:"text.primary",position:"absolute",paddingX:"md",className:J1,children:i}):null})};function eb(e,t){return e.find(o=>o.id===t)}function tb(e,t,o){let r=[...e],a=r.filter(s=>o.has(s.id)),n=r.filter(s=>!o.has(s.id)),i=n.findIndex(s=>s.id===t);return n.flatMap((s,l)=>l===i?[...a,s]:s)}function ob(e,t,o){let r=[...e],a=r.filter(s=>o.has(s.id)),n=r.filter(s=>!o.has(s.id)),i=n.findIndex(s=>s.id===t);return n.flatMap((s,l)=>l===i?[s,...a]:s)}function nl(e){return e.map(t=>({id:t.id,label:t.label,data:{src:t.src,alt:t.alt}}))}function _n(e){return e.map(t=>({id:t.id,label:t.label,src:t.data?.src,alt:t.data?.alt}))}function rb(){let[e,t]=useState(false);return useEffect(()=>{let o=window.matchMedia("(pointer: coarse)");t(o.matches);let r=a=>{t(a.matches);};return o.addEventListener("change",r),()=>{o.removeEventListener("change",r);}},[]),e}var nb=ht.forwardRef(({id:e,className:t,children:o,style:r,isDisabled:a,onTruncatedChange:n,onHoverChange:i},s)=>{let l=useRef(null),{buttonProps:p}=useButton({elementType:"span",isDisabled:a},l);useLayoutEffect(()=>{l.current&&n?.(l.current.scrollWidth>l.current.clientWidth);},[o,n]);let{hoverProps:c}=useHover({isDisabled:a,onHoverChange:i});return jsx("span",{...Me(p,c),className:classNames(t,"BaselineUI-AdaptiveText"),id:e,tabIndex:-1,ref:M(l,s),style:r,role:void 0,children:o})});nb.displayName="Label";var ll=ht.memo(ht.forwardRef(({children:e,isOpen:t,isDisabled:o,...r},a)=>{let[n,i]=useState(false),[s,l]=useState(false),p=rb(),c=o||!s||p;return jsx(J,{text:e,variant:"inverse",includeArrow:false,size:"sm",placement:"bottom start",isOpen:(n||t)&&s,isDisabled:c,children:jsx(nb,{...r,isDisabled:c,onTruncatedChange:l,onHoverChange:i,ref:a,children:e})})}));ll.displayName="AdaptiveText";var JR=({fit:e,item:t,deleteElement:o})=>{let{formatMessage:r}=A(),a=useReducedMotion(),{imgProps:n,isLoading:i}=Xt({src:t.data?.src,alt:t.data?.alt??""});return i?jsx(po,{"aria-label":r(Dr.loading)}):jsx(motion.div,{role:"img",initial:{opacity:a?1:0},animate:{opacity:1},exit:{opacity:a?1:0},"aria-label":n.alt,style:{backgroundImage:`url(${n.src})`,backgroundSize:e},className:X1,children:o})},lb=({item:e,options:{optionProps:t,isFocusVisible:o,isSelected:r,isFocused:a,isDisabled:n,isPressed:i},liRef:s,fit:l="contain",onDelete:p,className:c,imageClassName:u,imageLabelClassName:m,imageDimensions:d,style:b,layoutTransition:y=true,renderImage:f=(g,{deleteElement:v})=>jsx(JR,{item:g,deleteElement:v,fit:l})})=>{let g=useId(),{formatMessage:v}=A(),{value:_}=e;invariant(_&&et(_),"Expected value to be a list option");let h=p?jsx("div",{className:G1,children:jsx(L,{"aria-label":v(Dr.delete),size:"xs",icon:XIcon$1,onPress:()=>{p(_.id);},UNSAFE_NON_INTERACTIVE:true})}):null,x=_n([_])[0],w=useCallback($=>{let R={},N=typeof $=="function"?$(x,{isSelected:r}):$;return N&&(R.width=typeof N.width=="string"?cl[N.width]:N.width,R.aspectRatio="height"in N?`${R.width} / ${N.height}`:N?.aspectRatio?.toString()),R},[x,r]),C=useMemo(()=>({isFocusVisible:o,isSelected:r,isFocused:a,isDisabled:n,isPressed:i}),[o,r,a,n,i]),I=useReducedMotion(),P=typeof y=="boolean"?y:!I,S=typeof y=="object"?y:void 0,k=P?motion.li:"li",T=w(d);return jsxs(k,{...mergeProps(t,P?{layout:true,transition:S}:void 0),ref:s,className:classNames(W1,xt(c,x,C)),"aria-labelledby":g,style:Ur(b,x,C),children:[jsx(D,{display:"flex",flexDirection:"column",flex:1,justifyContent:"center",alignItems:"center",flexGrow:0,children:jsx("div",{className:classNames(gn({isFocusVisible:o,isSelected:r,isLoading:true}),xt(u,x,C)),style:T,"data-image-key":_.id,children:f(_,{deleteElement:h??void 0,onDelete:p})})}),jsx(ll,{id:g,className:classNames(Z1({isFocusVisible:o,isSelected:r}),m),style:{maxWidth:T.width},isOpen:o,children:_.label})]})};var n$={width:0,display:"block"},db={src:"src",alt:"alt"},cl={sm:102,md:170},ub=ht.forwardRef(({className:e,style:t,fit:o="cover",onReorder:r,"data-block-id":a,"data-block-class":n,onDelete:i,imageWidth:s=cl.sm,aspectRatio:l=3/4,items:p,defaultItems:c=[],onKeyDown:u,imageContainerClassName:m,imageClassName:d,labelClassName:b,onListChange:y,renderImage:f,layoutTransition:g,imageDimensions:v={width:s,aspectRatio:l},imageContainerStyle:_,...h},x)=>{let w=ht.useRef(null),[C,I]=useState([]),{formatMessage:P}=A();useEffect(()=>{(l||s)&&console.warn("ImageGallery: aspectRatio and imageWidth are deprecated. Use imageDimensions instead.");},[s,l]);let[S,k]=useControlledState(h.selectedKeys,h.defaultSelectedKeys??[],h.onSelectionChange),[T,$]=useControlledState(p?nl(p):void 0,nl(c),y?B=>{y?.(_n(B));}:void 0),R=useCallback(B=>{let j=B.target.key,O=B.keys;if(B.target.dropPosition==="before"){let H=tb(T,j,O);$(H);}else if(B.target.dropPosition==="after"){let H=ob(T,j,O);$(H);}r?.(B);},[T,r,$]),N=useCallback(()=>{i&&C.length&&($(T.filter(B=>!C.includes(B.id))),i(new Set(C)),I([]));},[C,T,i,$]),E=useCallback((B,j,O)=>{let{value:H}=B;invariant(et(H));let Q={id:H.id,label:H.label,src:H.data?.src,alt:H.data?.alt};return jsx(lb,{item:B,options:j,liRef:O,fit:o,onDelete:i?V=>{I([V]);}:void 0,renderImage:f,className:xt(m,Q,j),imageClassName:d,imageLabelClassName:b,imageDimensions:v,style:_,layoutTransition:g})},[o,i,f,m,d,b,v,_,g]),{keyboardProps:F}=useKeyboard({onKeyDown(B){if(u?.(B),B.key==="Backspace"||B.key==="Delete"){if(!i)return;if([...S].length)I([...S]);else {let O=B.target.dataset.key;I([O]);}}}});return jsxs("div",{...F,ref:x,style:t,className:classNames("BaselineUI-ImageGallery",e),"data-block-id":a,"data-block-class":n,children:[jsx(fe,{...h,selectedKeys:S,items:T,onReorder:R,layout:"grid",orientation:"vertical",className:Y1,ref:w,dropIndicatorStyle:n$,renderOption:E,renderDragPreview:B=>jsx(vn,{items:B,ulRef:w,containerClassName:".BaselineUI-ImageGallery",previewClassName:gn(),itemDataAttribute:"data-image-key",showCount:true}),onSelectionChange:k,getItems:B=>[...B].map(j=>{let O=eb(T,j);return {[db.src]:O?.src||"",[db.alt]:O?.alt||"",key:j}})}),jsx(Ee,{isOpen:!![...C].length,onOpenChange:B=>{B||I([]);},children:jsx(Ue,{isDismissable:true,children:jsx(yn,{showCloseButton:false,title:"Are you sure you want to delete this item?",primaryActionLabel:P(Dr.delete),cancelLabel:P(Dr.cancel),onCancel:()=>{I([]);},onPrimaryAction:N,autoFocusButton:"cancel"})})})]})});ub.displayName="ImageGallery";var Dr=W({delete:{id:"delete",defaultMessage:"Delete"},cancel:{id:"cancel",defaultMessage:"Cancel"},loading:{id:"loading",defaultMessage:"Loading"}});var mb="_1sexph00",fb="_1sexph02",yb="_1sexph01 _1yep5z6189 _1yep5z618a _1yep5z618b _1yep5z61al _1yep5z61am _1yep5z61an _1yep5z61br _1yep5z61bs _1yep5z61bt _1yep5z619f _1yep5z619g _1yep5z619h _1yep5z61sg _1yep5z61sh _1yep5z61si";var bb=ht.forwardRef(({className:e,style:t,items:o,"data-block-id":r,"data-block-class":a,hideLabel:n,size:i="md",isDisabled:s,showSelectedIcon:l=true,excludeFromTabOrder:p,onPress:c,onButtonAction:u,isSelected:m,defaultSelected:d,onButtonSelectionChange:b,moreAriaLabel:y,optionStyle:f,optionClassName:g,triggerClassName:v,triggerStyle:_,tooltipProps:h,buttonBehaviour:x="toggle",...w},C)=>{let{formatMessage:I}=A(),P=pe(),S=useSelectState({items:o,...w,defaultSelectedKey:w.defaultSelectedKey||o?.[0]?.id,children:P,validationState:w.validationState==="error"?"invalid":"valid"}),k=useMemo(()=>typeof x=="function"?x(S.selectedKey):x,[x,S.selectedKey]),[T,$]=useControlledState(m,!!d,U=>{b?.({isSelected:U,selectedKey:S.selectedKey});}),{hoverProps:R,isHovered:N}=useHover({isDisabled:s}),E=useMemo(()=>{let U=S.collection.getItem(S.selectedKey),oe=U?.textValue||U?.["aria-label"],le=U?.value,Y=le?.icon,me={size:i,...k==="toggle"&&{isSelected:T},onPress:ge=>{k==="toggle"&&$(!T),c?.(ge),u?.({isSelected:k==="toggle"?!T:false,selectedKey:S.selectedKey,buttonBehaviour:k});},isDisabled:s,excludeFromTabOrder:p,className:classNames(typeof g=="function"?g(le,{isButton:true,isSelected:T}):g,"BaselineUI-ButtonSelect-Button"),style:typeof f=="function"?f(le,{isButton:true,isSelected:T}):f};return n&&Y?jsx(J,{variant:"inverse",size:"sm",includeArrow:false,text:oe,placement:"bottom start",offset:4,...typeof h=="function"?h("button"):h,children:k==="action"?jsx(L,{icon:Y,"aria-label":oe,variant:"toolbar",...me}):jsx(Ie,{icon:Y,"aria-label":oe,variant:"toolbar",...me})}):k==="toggle"?jsx(wa,{iconStart:Y,label:oe,variant:"toolbar",...me}):jsx(K,{label:oe,variant:"toolbar",...me})},[p,n,T,s,c,g,f,$,i,S.collection,S.selectedKey,h,k,u]),F=w["aria-label"],B=useCallback(({buttonProps:U,ref:oe})=>{delete U["aria-labelledby"];let le=y||`${I(f$.more)} ${F}`;return jsx(J,{variant:"inverse",size:"sm",includeArrow:false,text:le,placement:"bottom start",offset:4,...h,children:jsx(PressResponder,{...U,children:jsx(L,{"aria-label":le,ref:oe,icon:CaretDownIcon,variant:"toolbar",size:i,className:({isFocusVisible:Y})=>classNames(ka({isSelected:T&&k==="toggle",isFocusVisible:Y}),yb,v,"BaselineUI-ButtonSelect-Trigger"),style:_,isDisabled:s,excludeFromTabOrder:p})})})},[F,k,p,I,T,s,y,i,h,v,_]),j=filterTruthyValues({"data-block-id":r,"data-block-class":a,"data-hovered":N,"data-selected":T,"data-disabled":s,"data-expanded":S.isOpen,"data-button-behaviour":k}),O=ae(C),H=useMemo(()=>({state:S,popoverAnchorRef:O}),[S,O]),Q=useCallback(U=>typeof g=="function"?g(U,{isButton:false,isSelected:S.selectionManager.isSelected(U.id)}):g,[g,S.selectionManager]),V=useCallback(U=>typeof f=="function"?f(U,{isButton:false,isSelected:S.selectionManager.isSelected(U.id)}):f,[f,S.selectionManager]);return jsx(Da.Provider,{value:H,children:jsxs(D,{...R,role:"group",display:"inline-flex",flexDirection:"row",alignItems:"center",className:classNames(mb,"BaselineUI-ButtonSelect",e),"aria-label":w["aria-label"],"aria-labelledby":w["aria-labelledby"],"aria-describedby":w["aria-describedby"],"aria-details":w["aria-details"],style:t,ref:O,...j,children:[E,jsx(lt,{isDisabled:s,showSelectedIcon:l,placement:"bottom start",items:o,...w,optionClassName:Q,optionStyle:V,variant:"ghost",renderTrigger:B,className:classNames(fb,"BaselineUI-ButtonSelect-Select")})]})})});bb.displayName="ButtonSelect";var f$=W({more:{id:"more",defaultMessage:"More"}});var gb=z({defaultClassName:"_18v88n10 _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6ln",variantClassNames:{labelPosition:{top:"_1yep5z6157 _1yep5z6158 _1yep5z6159",start:"_1yep5z6154 _1yep5z6155 _1yep5z6156 _1yep5z616m _1yep5z616n _1yep5z616o _1yep5z6vl _1yep5z6vm _1yep5z6vn"}},defaultVariants:{},compoundVariants:[]}),vb=z({defaultClassName:"_18v88n1p _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6eu _1yep5z6ln _1yep5z6ly _1yep5z6lq _1yep5z6dy",variantClassNames:{isDisabled:{true:"_18v88n1q _1yep5z6111"},labelPosition:{top:"_18v88n1r",start:"_18v88n1s"}},defaultVariants:{},compoundVariants:[]}),_b=z({defaultClassName:"_18v88n1t _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6lk",variantClassNames:{validationState:{valid:"_18v88n1u",error:"_1yep5z610h",warning:"_1yep5z610p"},isReadOnly:{true:"_1yep5z6118"}},defaultVariants:{},compoundVariants:[]}),zb=z({defaultClassName:"_18v88n1d _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6m1 _1yep5z6lz _1yep5z6h4 _1yep5z6jj _1yep5z6jk _1yep5z6jl",variantClassNames:{validationState:{valid:"_18v88n1e",error:"_1yep5z612q",warning:"_18v88n1g"},isHovered:{true:"_18v88n1h"},isFocused:{true:"_1yep5z6wl _1yep5z6wm _1yep5z6wn _1yep5z6x9 _1yep5z6xa _1yep5z6xb _1yep5z6xx _1yep5z6xy _1yep5z6xz _1yep5z6yl _1yep5z6ym _1yep5z6yn _1yep5z6184 _1yep5z6182 _1yep5z6134 _1yep5z617v _1yep5z617u _1yep5z6140 _1yep5z617x"},isDisabled:{true:"_18v88n1j"},variant:{primary:"_18v88n1k",ghost:"_18v88n1l"},isReadOnly:{true:"_1yep5z6140"}},defaultVariants:{},compoundVariants:[[{variant:"ghost",isHovered:true,isFocused:false,validationState:"valid"},"_1yep5z61u7 _1yep5z61u5 _1yep5z61pa"],[{variant:"ghost",isFocused:false,isHovered:false,validationState:"valid"},"_18v88n1n"],[{isHovered:true,validationState:"valid",isDisabled:false,isReadOnly:false,isFocused:false,variant:"primary"},"_1yep5z61pb"],[{isHovered:true,validationState:"warning",isDisabled:false,isReadOnly:false,isFocused:false},"_1yep5z61pb"],[{isReadOnly:true,variant:"primary",isFocused:false},"_18v88n1o"]]}),hb=z({defaultClassName:"_18v88n13 _1yep5z6dy _1yep5z6ev",variantClassNames:{isDisabled:{true:"_1yep5z6111"}},defaultVariants:{},compoundVariants:[]}),xb=z({defaultClassName:"_18v88n19 _1yep5z6iv _1yep5z6iw _1yep5z6ix",variantClassNames:{labelPosition:{top:"_1yep5z6t9 _1yep5z6ta _1yep5z6tb",start:"_1yep5z6n6 _1yep5z6n7 _1yep5z6n8 _1yep5z6157 _1yep5z6158 _1yep5z6159"},hasMessage:{true:"_18v88n1c"}},defaultVariants:{},compoundVariants:[[{labelPosition:"start",hasMessage:false},"_1yep5z61sj _1yep5z61sk _1yep5z61sl"]]}),Cb=z({defaultClassName:"_18v88n15 _1yep5z699 _1yep5z69a _1yep5z69b _1yep5z6lq",variantClassNames:{isFocusVisible:{true:"_1yep5z6127 _1yep5z614f _1yep5z617t"},isHovered:{true:"_1yep5z6127 _1yep5z614f _1yep5z617t"},isOpen:{true:"_1yep5z614f _1yep5z617t"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:true},"_1yep5z61oa _1yep5z61qi _1yep5z61tw"],[{isHovered:true},"_1yep5z61oa _1yep5z61qi _1yep5z61tw"],[{isOpen:true},"_1yep5z61qi _1yep5z61tw"]]});function Pb({allowsCustomValue:e,onValueChange:t,inputValue:o},r,a,n,i){let[s,l]=useState(null),p=useRef(false);useEffect(()=>{if(!t)return;let u=a.current,m=d=>{l(d.target);};return u?.addEventListener("focusin",m),()=>{u?.removeEventListener("focusin",m);}},[t,a,r.selectedKey]),useGranularEffect(()=>{r.selectedKey&&(t?.({value:r.selectedItem?.textValue,key:r.selectedKey}),p.current=false);},[r.selectedKey],[t,r.selectedItem]),useInteractOutside({ref:n,isDisabled:!t,onInteractOutside:u=>{!i.current?.contains(u.target)&&s===n.current&&e&&p.current&&(t?.({value:n.current?.value,key:null}),p.current=false);}}),useEffect(()=>{if(!t)return;let u=n.current,m=()=>{p.current=true;};return u?.addEventListener("input",m),()=>{u?.removeEventListener("input",m);}},[n,t]),useEffect(()=>{p.current=false;},[o]);let{keyboardProps:c}=useKeyboard({isDisabled:!t,onKeyDown:u=>{e&&u.key==="Enter"&&p.current?(t?.({value:n.current?.value,key:null}),p.current=false):u.key==="Escape"&&r.close(),u.continuePropagation();}});return {inputProps:c}}var wb=ht.forwardRef(({className:e,style:t,inputStyle:o,inputClassName:r,"data-block-id":a,"data-block-class":n,label:i,items:s,showSelectedIcon:l=false,onSelectionChange:p,onInputChange:c,isInvalid:u=false,labelPosition:m="top",validationState:d="valid",variant:b="primary",toggleLabel:y,renderOption:f,showIcon:g=true,filter:v,minValue:_,maxValue:h,inputType:x="text",onInputSubmit:w,onValueChange:C,tooltip:I,...P},S)=>{let k=useObjectRef(S),{contains:T}=useFilter({sensitivity:"base"}),$=pe(),R=useComboBoxState({...P,defaultFilter:v||T,defaultItems:s,onSelectionChange:p,onInputChange:c,children:$,validationState:u?"invalid":"valid"}),N=ht.useRef(null),E=ht.useRef(null),F=ht.useRef(null),B=ht.useRef(null),j=ht.useRef(null),{inputProps:O}=Pb({onValueChange:C,allowsCustomValue:P.allowsCustomValue,inputValue:P.inputValue},R,k,E,B),{buttonProps:H,inputProps:Q,listBoxProps:V,labelProps:U,errorMessageProps:oe,descriptionProps:le,validationErrors:Y}=useComboBox({...P,inputRef:E,defaultItems:s,buttonRef:N,listBoxRef:F,popoverRef:B,validationState:d==="error"?"invalid":"valid"},R),me=P.errorMessage||Y.join(" "),ge=he({...P,errorMessage:me,descriptionProps:le,errorMessageProps:oe,labelPosition:m});me&&(d="error");let{hoverProps:zt,isHovered:ie}=useHover({isDisabled:P.isDisabled}),{isFocused:ye,focusProps:Bo,isFocusVisible:Ot}=useFocusRing(),Ht=io({isReadOnly:P.isReadOnly,validationState:d}),Vt=filterTruthyValues({"data-read-only":P.isReadOnly,"data-disabled":P.isDisabled,"data-validation-state":d,"data-focused":ye,"data-focus-visible":Ot}),{labelProps:Z,fieldProps:G}=useLabel({label:i,"aria-label":P["aria-label"],"aria-labelledby":P["aria-labelledby"],"aria-describedby":P["aria-describedby"],"aria-details":P["aria-details"]}),{keyboardProps:ce}=useKeyboard({onKeyDown:Ao=>{P.allowsCustomValue&&Ao.key==="Enter"&&w?.(Q.value?.toString()??"");}}),{focusProps:ee}=useFocus({onBlur:()=>{P.allowsCustomValue&&Q.value&&w?.(Q.value?.toString()??"");}}),{tooltipProps:ve}=ze({tooltip:I,label:P["aria-label"]}),Je=Ao=>{let{triggerProps:ug,triggerRef:mg}=Ao??{};return jsxs("div",{className:classNames(gb({labelPosition:m}),e,"BaselineUI-ComboBox"),"data-block-id":a,"data-block-class":n,style:t,ref:k,children:[i||m==="start"&&ge?jsxs("div",{className:xb({labelPosition:m,hasMessage:!!ge}),children:[jsx("label",{...mergeProps(U,Z),className:hb({isDisabled:P.isDisabled}),children:i}),m==="start"&&ge]}):null,jsxs("div",{...zt,className:zb({validationState:d,isHovered:ie,isFocused:ye,variant:b,isReadOnly:!!P.isReadOnly,isDisabled:!!P.isDisabled}),ref:j,children:[jsx("input",{...mergeProps(ug,Q,O,Bo,Vt,G,ee,ce,x==="number"?{type:"number",min:_,max:h,onKeyDown:Jn=>{(Jn.key==="ArrowUp"||Jn.key==="ArrowDown")&&Jn.preventDefault();}}:null),id:P.id,ref:M(mg,E),className:classNames(vb({isDisabled:P.isDisabled,labelPosition:m}),"BaselineUI-ComboBox-Input",r),style:o}),Ht&&g?jsx(Ht,{className:_b({validationState:d,isReadOnly:P.isReadOnly}),size:16}):null,jsx(K,{...H,ref:N,variant:"popover",label:y,className:Cb({isFocusVisible:!P.isDisabled&&!P.isReadOnly&&Ot,isHovered:!P.isDisabled&&!P.isReadOnly&&ie,isOpen:R.isOpen})})]}),m==="top"&&ge]})};return jsxs(Ct.Provider,{value:R,children:[ve?jsx(J,{...ve,children:Je}):Je(),jsx(we,{ref:B,triggerRef:j,state:R,crossOffset:-2,className:"BaselineUI-ComboBox-Popover",children:jsx(fe,{...V,items:s,ref:F,renderOption:f,selectionMode:"single",showSelectedIcon:l,className:classNames(at,"BaselineUI-ComboBox-ListBox")})})]})});wb.displayName="ComboBox";var Ib=z({defaultClassName:"byycd01 _1yep5z6d6 _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6id _1yep5z6ie _1yep5z6if",variantClassNames:{},defaultVariants:{},compoundVariants:[]});var gl=ht.forwardRef(({enableReorder:e,...t},o)=>e?jsx(Rb,{ref:o,...t}):jsx(vl,{ref:o,...t}));gl.displayName="GridListItem";var vl=ht.forwardRef(({item:e,state:t,dropState:o,renderGridItem:r,dragHandleProps:a},n)=>{let i=ae(n),s=useGridListItem({node:e},t,i),l=t.selectionManager.selectionMode!=="none"&&t.selectionManager.selectionBehavior==="toggle",{checkboxProps:p}=useGridListSelectionCheckbox({key:e.key},t),c={...s,checkBoxProps:l?p:void 0,dragHandleProps:a};return jsxs("div",{"data-grid-list-item-key":e.key,children:[o?jsx(Ut,{target:{type:"item",key:e.key,dropPosition:"before"},dropState:o}):null,r?r(e,c,i):null,o&&t.collection.getKeyAfter(e.key)==null?jsx(Ut,{target:{type:"item",key:e.key,dropPosition:"after"},dropState:o}):null]},e.key)});vl.displayName="BaseGridListItem";var Rb=ht.forwardRef(({dragState:e,item:t,...o},r)=>{let a=useDraggableItem({key:t.key,hasDragButton:true},e);return jsx(vl,{item:t,dragHandleProps:a,ref:r,...o})});Rb.displayName="DraggableGridListItem";var O$=e=>{e.key==="Enter"||e.key==="Escape"||e.stopPropagation();},Tb=ht.forwardRef(({className:e,style:t,isEditing:o=false,"data-block-id":r,"data-block-class":a,gridListHandle:n,onReorder:i,enableReorder:s=false,layout:l="stack",orientation:p="vertical",renderGridItem:c,...u},m)=>{let d=pe(),b=useListState({...u,children:d}),y=ht.useRef(null),f=ae(m),{gridProps:g}=useGridList(u,b,f);Wr({handle:n,type:"gridlist"},b,f);let{collectionProps:v,dragState:_,dropState:h}=Vr({...u,onReorder:i,enableReorder:s,layout:l,orientation:p,preview:y,getItems:C=>[...C].map(I=>{let P=b.collection.getItem(I);return invariant(P,"Expected item to be defined."),{key:P.key.toString()}})},b,f),x=o?O$:g.onKeyDownCapture,w={state:b,dragState:_,dropState:h,enableReorder:s,renderGridItem:c};return jsxs("ul",{...mergeProps(g,v),className:classNames("BaselineUI-GridList",e),"data-block-id":r,"data-block-class":a,style:t,ref:f,"aria-rowcount":b.collection.size,onKeyDownCapture:x,children:[[...b.collection].map(C=>jsx(gl,{item:C,...w},C.key)),s?jsx(DragPreview,{ref:y,children:C=>jsx(vn,{items:C,ulRef:f,containerClassName:".BaselineUI-GridList",previewClassName:Ib(),itemDataAttribute:"data-grid-list-item-key"})}):null]})});Tb.displayName="GridList";var Sb="_1yep5z6f5",Db="_1dc3b8m0";var Mb=ht.forwardRef(({className:e,selectionMode:t,style:o,"data-block-id":r,"data-block-class":a,tooltipProps:n,icon:i,renderActionItem:s,...l},p)=>{let c=ae(p),u=pe(),m=useListState({...l,selectionMode:t,suppressTextValueWarning:true,children:u}),{actionGroupProps:d}=useActionGroup({...l,selectionMode:t,children:u},m,c),b=[...m.collection].map(y=>(invariant(y.value),jsx(X$,{item:y,state:m,isDisabled:l.isDisabled,onAction:l.onAction,tooltipProps:n,renderActionItem:s},y.key)));return i?jsxs(D,{...d,display:"flex",flexDirection:"row",gap:"md",alignItems:"center",className:classNames("BaselineUI-ActionGroup",e),"data-block-id":r,"data-block-class":a,style:o,ref:c,children:[jsx(i,{"aria-hidden":"true",size:24,className:Sb}),jsx(D,{display:"flex",flexDirection:"row",gap:"xs",flex:1,children:b})]}):jsx(D,{...d,display:"flex",flexDirection:"row",gap:"xs",className:classNames("BaselineUI-ActionGroup",e),"data-block-id":r,"data-block-class":a,style:o,ref:c,children:b})});Mb.displayName="ActionGroup";var X$=({item:e,state:t,tooltipProps:o,renderActionItem:r,onAction:a,isDisabled:n})=>{let{buttonProps:i}=useActionGroupItem({key:e.key},t),s=n||t.selectionManager.isDisabled(e.key),l=t.selectionManager.isSelected(e.key);invariant(e.value);let{icon:p}=e.value;invariant(p);let c=useMemo(()=>(invariant(e.value),typeof o=="function"?o(e.value):o),[o,e.value]);return jsx(PressResponder,{...mergeProps(i,{onPress:()=>{a?.(e.key);}}),children:jsx(J,{text:e.textValue,size:"sm",variant:"inverse",includeArrow:false,offset:4,...c,children:r?.(e,{isSelected:l,isDisabled:s})||jsx(L,{variant:"tertiary",icon:p,"aria-label":e.textValue,size:"sm",isDisabled:s,className:classNames({[Db]:l},"BaselineUI-ActionGroup-Item")})})})};var Nb="ujkypy0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e",Eb="_1yep5z61r7 _1yep5z61r8 _1yep5z61r9 _1yep5z61hl _1yep5z61hm _1yep5z61hn";var Bb=ht.forwardRef(({className:e,style:t,items:o,optionsContainerClassName:r,label:a,icon:n,value:i,defaultValue:s,onChange:l,isDisabled:p,optionClassName:c,optionStyle:u,labelPosition:m="top","data-block-id":d,"data-block-class":b,shouldFocusWrap:y,tooltip:f=true,...g},v)=>{let _=useMemo(()=>o.map(x=>({id:x.color,label:x.label})),[o]),h=useId();return useEffect(()=>{!a&&!g["aria-label"]&&!g["aria-labelledby"]&&console.warn("ColorSwatchPicker: Please provide a label or aria-label for accessibility.");},[a,g]),jsxs(D,{...ii(g),className:classNames("BaselineUI-ColorSwatchPicker",e),"data-block-id":d,"data-block-class":b,display:"flex",flexDirection:m==="top"?"column":"row",alignItems:m==="top"?"flex-start":"center",justifyContent:"space-between",gap:"md",style:t,ref:v,children:[n||a?jsxs(D,{display:"flex",alignItems:"center",gap:"md",children:[n?jsx(n,{"aria-hidden":"true",size:24,className:sprinkles({color:"icon.primary"})}):null,a?jsx(te,{id:h,type:"label",size:"sm",children:a}):null]}):null,jsx(fe,{className:classNames(Eb,r),selectionMode:"single",items:_,orientation:"horizontal",defaultSelectedKeys:s?[s]:void 0,disabledKeys:p?_.map(x=>x.id):void 0,isDisabled:p,selectedKeys:i?[i]:void 0,onSelectionChange:x=>{l?.([...x][0]);},optionClassName:c,optionStyle:u,renderOption:({key:x,textValue:w},{isSelected:C,isFocusVisible:I,isDisabled:P,optionProps:S},k)=>jsx("li",{...S,"data-disabled":P,className:classNames(Nb,S.className),ref:k,children:jsx(ct,{isFocusVisible:I,color:x,isSelected:C,"aria-label":w,isInteractive:true,isDisabled:P,tooltip:f})}),shouldFocusWrap:y,...g,"aria-labelledby":a?h:g["aria-labelledby"]})]})});Bb.displayName="ColorSwatchPicker";var Ab=z({defaultClassName:"_1lrwegk0",variantClassNames:{isSeparator:{true:"_1yep5z610y"}},defaultVariants:{},compoundVariants:[]}),Cn="_1yep5z63o _1yep5z63p _1yep5z63q _1yep5z629 _1yep5z62a _1yep5z62b _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6kj _1yep5z6kk _1yep5z6kl";var xl="\u2013";function Pn({segment:e,state:t}){let o=ht.useRef(null),{segmentProps:r}=useDateSegment(e,t,o),{focusProps:a,isFocused:n}=useFocusRing(),i=useMemo(()=>{let{text:s,type:l}=e;switch(l){case "hour":return s.replaceAll(xl,"H");case "minute":return s.replaceAll(xl,"M");case "second":return s.replaceAll(xl,"S");default:return s}},[e]);return jsx(D,{...mergeProps(r,a),typography:"label.md.medium",color:e.isPlaceholder?"text.placeholder":"text.primary",backgroundColor:n?"support.info.subtle":void 0,ref:o,marginLeft:e.type==="timeZoneName"?"xs":void 0,className:Ab({isSeparator:e.text===":"||e.text==="/"}),children:e.isPlaceholder?i:e.text})}var jb=ht.forwardRef(({className:e,labelPosition:t,"data-block-id":o,"data-block-class":r,...a},n)=>{let{locale:i}=useLocale(),s={...a,validationState:void 0,isInvalid:a.validationState==="error"||void 0},l=useTimeFieldState({...s,locale:i}),p=ht.useRef(null),{labelProps:c,fieldProps:u,descriptionProps:m,errorMessageProps:d,validationErrors:b,isInvalid:y,inputProps:f}=useTimeField(s,l,p),g=a.errorMessage||b.join(" "),v=he({...a,errorMessage:g,descriptionProps:m,errorMessageProps:d,labelPosition:t}),{focusProps:_,isFocused:h}=useFocusRing({within:true});return jsxs(wt,{className:classNames("BaselineUI-TimeField",e),labelProps:c,fieldProps:u,ref:n,wrapperRef:p,wrapperClassName:Cn,labelPosition:t,message:v,isFocused:h,"data-block-id":o,"data-block-class":r,isInvalid:y,...a,children:[jsx(VisuallyHidden,{children:jsx("input",{...f})}),jsx(D,{display:"flex",flexDirection:"row",paddingRight:"md",..._,children:l.segments.map((x,w)=>jsx(Pn,{segment:x,state:l},w))})]})});jb.displayName="TimeField";var Ob="_10dw1p96",Hb="_10dw1p95",Vb=z({defaultClassName:"_10dw1p90 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z69f _1yep5z69g _1yep5z69h _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6lq _1yep5z6ld _1yep5z6la",variantClassNames:{isSelected:{true:"_1yep5z6126"},isHovered:{true:"_10dw1p92"},isRenaming:{true:"_10dw1p93"},isFocusVisible:{true:"_1yep5z6140 _1yep5z617w _1yep5z617u"}},defaultVariants:{},compoundVariants:[[{isHovered:true,isSelected:false,isRenaming:false},"_1yep5z61o8 _1yep5z61q9 _1yep5z61ty _1yep5z61tx"]]});function Kb(e,t){if(typeof e=="function"&&!e.prototype?.isReactComponent){let o=e(t);return isValidElement(o)?e:o}return e}var Gb=({context:e,depth:t,children:o,item:r,onPrimaryAction:a,onSecondaryAction:n,actionsPosition:i,primaryActionIcon:s,secondaryActionIcon:l,primaryActionAriaLabel:p,secondaryActionAriaLabel:c,onRename:u,onAction:m,renderItemTitle:d=b=>b.data.label})=>{let{formatMessage:b}=A(),{hoverProps:y,isHovered:f}=useHover({}),g=useRef(null),{onKeyDown:v,..._}=e.interactiveElementProps;delete _.onFocus,delete _.onClick;let h=createFocusManager(g),x=useCallback($=>{if($.key==="ArrowRight"&&(e.isExpanded||!r.children?.length))g.current?.setAttribute("tabindex","-1"),$.preventDefault(),$.stopPropagation(),h.focusNext();else switch($.key){case "ArrowLeft":{h.focusPrevious()?($.preventDefault(),$.stopPropagation()):(v?.($),e.focusItem(true));break}case "Enter":{e.toggleExpandedState();break}default:v?.($);}},[e,h,v,r,g]),w=useMemo(()=>{let $=Kb(s,r.index),R=Kb(l,r.index),N=typeof p=="function"?p(r.index):p,E=typeof c=="function"?c(r.index):c;return $||R?jsxs(D,{display:"flex",flexDirection:"row",children:[$?jsx(Ie,{icon:$,"aria-label":N,size:"sm",excludeFromTabOrder:true,variant:"secondary",onPress:()=>{a?.(r.index);},tooltip:true}):null,R?jsx(Ie,{icon:R,"aria-label":E,size:"sm",excludeFromTabOrder:true,variant:"secondary",onPress:()=>{n?.(r.index);},tooltip:true}):null]}):null},[s,r.index,l,p,c,a,n]),C=useCallback($=>{$.key==="Enter"?(u?.({key:r.index,value:$.target.value}),e.stopRenamingItem()):$.key==="Escape"?(e.stopRenamingItem(),g.current?.setAttribute("tabindex","0"),g.current?.focus()):$.key!=="ArrowRight"&&$.key!=="ArrowLeft"&&$.key!=="ArrowUp"&&$.key!=="ArrowDown"&&!$.metaKey&&$.continuePropagation();},[r.index,e,u,g]),I=r.data.icon,P=!!u,{pressProps:S}=usePress({onPress:()=>{m?.(r.index);}}),{isFocusVisible:k,focusProps:T}=useFocusRing$1();return jsxs(Fragment,{children:[jsx("div",{...mergeProps({onKeyDown:x,onFocus:()=>{e.focusItem(false);}},S,T,y,e.itemContainerWithoutChildrenProps,_),className:classNames(Hb,Vb({isHovered:f,isSelected:e.isSelected,isFocusVisible:k,isRenaming:e.isRenaming}),"BaselineUI-TreeView-Row"),role:"row","data-key":r.index,"data-expanded":r.isFolder?e.isExpanded:void 0,"aria-expanded":r.isFolder?e.isExpanded:void 0,"data-selected":e.isSelected,"aria-selected":e.isSelected,"data-depth":t,"aria-level":t+1,"aria-posinset":r.data.posInset,"aria-setsize":r.data.setSize,"aria-label":r.data.label,style:{justifyContent:i==="end"?"space-between":void 0},ref:g,children:jsxs(D,{role:"gridcell",style:{display:"contents"},"aria-colindex":1,children:[i==="start"?w:null,jsxs(D,{display:"flex",flexDirection:"row",alignItems:"center",children:[jsxs(D,{display:"flex",padding:"sm",flexDirection:"row",alignItems:"center",gap:"md",style:{marginInlineStart:`calc(${t*2} * ${themeVars.spacing.lg})`},children:[jsx(L,{icon:ChevronRightIcon,size:"xxs",variant:"secondary",onPress:()=>{e.toggleExpandedState();},"aria-label":b(e.isExpanded?Pl.collapse:Pl.expand),style:{visibility:r.children?.length?"visible":"hidden"},className:classNames(Ob,"BaselineUI-TreeView-ExpansionToggle"),UNSAFE_NON_INTERACTIVE:true}),I?jsx(I,{size:16,style:{color:themeVars.color.icon.interactive.disabled}}):null]}),jsxs(D,{paddingLeft:"sm",paddingY:e.isRenaming?"none":"md",display:"flex",flexDirection:"column",gap:"xs",onDoubleClick:$=>{P&&($.stopPropagation(),$.preventDefault(),e.startRenamingItem());},children:[e.isRenaming?jsx("div",{onClick:$=>{$.stopPropagation();},children:jsx(nt,{defaultValue:r.data.label,autoFocus:true,onBlur:$=>{u?.({key:r.index,value:$.target.value}),e.stopRenamingItem();},"aria-label":b(Pl.rename),onKeyDown:C,className:"BaselineUI-TreeView-RenameInput"})}):jsx(te,{type:"label",size:"sm",className:classNames(sprinkles.compoundVariants({color:"text.primary"}),"BaselineUI-TreeView-Title"),children:d(r)}),r.data.description?jsx(te,{type:"helper",size:"sm",className:"BaselineUI-TreeView-Description",children:r.data.description}):null]})]}),i==="end"?w:null]})}),o]})},Pl=W({expand:{id:"expand",defaultMessage:"Expand"},collapse:{id:"collapse",defaultMessage:"Collapse"},rename:{id:"rename",defaultMessage:"Rename"}});function NT(e,{posInset:t,setSize:o}){return {index:e.id,children:e.children?e.children.map(r=>r.id):[],data:{label:e.label,description:e.description,icon:e.icon,...e.data,posInset:t,setSize:o},isFolder:!!e.children?.length}}function ET(e,t){let o={};function r(a,n,i){if(o[a.id]=t(a,{posInset:n,setSize:i}),a.children)for(let s=0;s<a.children.length;s++)r(a.children[s],s+1,a.children.length);}return r(e,0,0),o}var Zb=ht.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,items:a,rootId:n=a.id,onPrimaryAction:i,onSecondaryAction:s,primaryActionIcon:l,secondaryActionIcon:p,primaryActionAriaLabel:c,secondaryActionAriaLabel:u,actionsPosition:m="start",onRename:d,onAction:b,renderItemTitle:y,...f},g)=>{let v=pe(),_=useRef(null),h=useTreeState({...f,selectionMode:"multiple",items:a.children,children:v}),x=useMemo(()=>Object.fromEntries(Object.entries(ET(a,NT)).map(([k,T])=>[k,{...T,canRename:!!d}])),[a,d]),w=useId(),[C,I]=ht.useState(a.children?.[0]?.id??""),P=useRef(C),S=useMemo(()=>({[`tree-${w}`]:{focusedItem:C,expandedItems:[...h.expandedKeys],selectedItems:[...h.selectionManager.selectedKeys]}}),[C,h.expandedKeys,h.selectionManager.selectedKeys,w]);return useEffect(()=>{if(!_.current)return;let k=_.current.getRootNode(),T=k instanceof ShadowRoot,$=_.current?.contains(k?.activeElement??null);T&&$&&k?.querySelector(`[data-rct-item-id="${C}"]`)?.focus();},[C]),jsx(ControlledTreeEnvironment,{items:x,getItemTitle:k=>k.data?.label,viewState:S,onExpandItem:k=>{h.setExpandedKeys(new Set([...h.expandedKeys,k.index])),f.onExpand?.(k.index.toString());},onFocusItem:k=>{I(k.index),k.index&&(P.current=k.index);},onCollapseItem:k=>{h.setExpandedKeys(new Set([...h.expandedKeys].filter(T=>T!==k.index))),f.onCollapse?.(k.index.toString());},onSelectItems:k=>{h.selectionManager.setSelectedKeys(new Set(k));},renderItem:k=>jsx(Gb,{...k,onPrimaryAction:i,onSecondaryAction:s,actionsPosition:m,primaryActionIcon:l,secondaryActionIcon:p,primaryActionAriaLabel:c,secondaryActionAriaLabel:u,onRename:d,onAction:b,renderItemTitle:y}),renderLiveDescriptorContainer:({children:k})=>jsx(Ce,{children:jsx(VisuallyHidden,{children:k})}),renderTreeContainer:({containerProps:k,children:T})=>jsx("div",{...Me(k,{onBlur:$=>{$.currentTarget.contains($.relatedTarget)||$.currentTarget.querySelector(`[data-key="${P.current}"]`)?.setAttribute("tabindex","0");}}),"data-block-id":o,"data-block-class":r,style:{...t,...k.style},className:classNames(e,"BaselineUI-TreeView"),ref:M(g,k.ref,_),role:"treegrid",children:T}),renderItemsContainer:({children:k})=>k,children:jsx(Tree,{treeId:`tree-${w}`,rootItem:n,treeLabel:f["aria-label"],treeLabelledBy:f["aria-labelledby"]})})});Zb.displayName="TreeView";var HT=forwardRef(({className:e,isCollapsible:t=false,...o},r)=>{let a=useRef(null),n=useId();return useImperativeHandle(r,()=>({resize:a.current?.resize})),jsx(Panel,{className:classNames("BaselineUI-Panel",e),collapsible:t,ref:a,id:n,...o})});HT.displayName="Panel";var YT=forwardRef(({className:e,...t},o)=>{let r=useRef(null);return useImperativeHandle(o,()=>({setLayout:r.current?.setLayout})),jsx(PanelGroup,{className:classNames("BaselineUI-PanelGroup",e),ref:r,...t})});YT.displayName="PanelGroup";var Jb="_6abhjk0";var QT=({className:e,isDisabled:t=false,...o})=>jsx(PanelResizeHandle,{disabled:t,className:classNames(Jb,"BaselineUI-PanelResizeHandle",e),...o});QT.displayName="PanelResizeHandle";var Qb=z({defaultClassName:"_1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7 _1yep5z6lz _1yep5z6m1",variantClassNames:{variant:{info:"_1yep5z6131",warning:"_1yep5z612x",error:"_1yep5z612p",success:"_1yep5z612t"}},defaultVariants:{},compoundVariants:[]}),e5="_1udvgpn5 _1yep5z6ij _1yep5z6ik _1yep5z6il _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j4 _1yep5z6j5 _1yep5z6j6 _1yep5z69l _1yep5z69m _1yep5z69n";var n4=()=>{};function i4({state:e,...t}){let o=ht.useRef(null),{toastProps:r,contentProps:a,titleProps:n,descriptionProps:i,closeButtonProps:s}=useToast(t,e,o),l=useMemo(()=>({root:r,title:n,content:a,description:i,close:s}),[r,n,a,i,s]),{canClose:p=true,...c}=t.toast.content;return jsx(La,{elementProps:l,...c,className:classNames(Qb({variant:c.variant||"info"}),c.className),onClose:p?n4:void 0})}var o5=ht.forwardRef(({state:e,style:t,className:o,...r},a)=>{let n=ae(a),{regionProps:i}=useToastRegion(r,e,n),s={zIndex:1,...t,...i.style};return jsx("div",{...i,ref:n,className:classNames(e5,o),style:s,children:e.visibleToasts.map(l=>jsx(i4,{toast:l,state:e},l.key))})});o5.displayName="ToastRegion";var r5=ht.forwardRef(({toastQueue:e,portalContainer:t,...o},r)=>{let a=useToastQueue(e),n=xe(t);return a.visibleToasts.length>0?jsx(Ce,{portalContainer:n,ref:r,children:jsx(o5,{state:a,...o})}):null});r5.displayName="GlobalToastRegion";function Ye(e,t){return e-t*Math.floor(e/t)}var a5=1721426;function ft(e,t,o,r){t=yt(e,t);let a=t-1,n=-2;return o<=2?n=0:Xe(t)&&(n=-1),a5-1+365*a+Math.floor(a/4)-Math.floor(a/100)+Math.floor(a/400)+Math.floor((367*o-362)/12+n+r)}function Xe(e){return e%4===0&&(e%100!==0||e%400===0)}function yt(e,t){return e==="BC"?1-t:t}function Ft(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}var s4={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]},se=class{fromJulianDay(t){let o=t,r=o-a5,a=Math.floor(r/146097),n=Ye(r,146097),i=Math.floor(n/36524),s=Ye(n,36524),l=Math.floor(s/1461),p=Ye(s,1461),c=Math.floor(p/365),u=a*400+i*100+l*4+c+(i!==4&&c!==4?1:0),[m,d]=Ft(u),b=o-ft(m,d,1,1),y=2;o<ft(m,d,3,1)?y=0:Xe(d)&&(y=1);let f=Math.floor(((b+y)*12+373)/367),g=o-ft(m,d,f,1)+1;return new X(m,d,f,g)}toJulianDay(t){return ft(t.era,t.year,t.month,t.day)}getDaysInMonth(t){return s4[Xe(t.year)?"leapyear":"standard"][t.month-1]}getMonthsInYear(t){return 12}getDaysInYear(t){return Xe(t.year)?366:365}getYearsInEra(t){return 9999}getEras(){return ["BC","AD"]}isInverseEra(t){return t.era==="BC"}balanceDate(t){t.year<=0&&(t.era=t.era==="BC"?"AD":"BC",t.year=1-t.year);}constructor(){this.identifier="gregory";}};function Il(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function i5(e,t){return n5(e)-n5(t)}function n5(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}var wl=null;function Rl(){return wl==null&&(wl=new Intl.DateTimeFormat().resolvedOptions().timeZone),wl}function $l(e){e=In(e,new se);let t=yt(e.era,e.year);return c5(t,e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function c5(e,t,o,r,a,n,i){let s=new Date;return s.setUTCHours(r,a,n,i),s.setUTCFullYear(e,t-1,o),s.getTime()}function s5(e,t){if(t==="UTC")return 0;if(e>0&&t===Rl())return new Date(e).getTimezoneOffset()*-6e4;let{year:o,month:r,day:a,hour:n,minute:i,second:s}=d5(e,t);return c5(o,r,a,n,i,s,0)-Math.floor(e/1e3)*1e3}var l5=new Map;function d5(e,t){let o=l5.get(t);o||(o=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:false,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),l5.set(t,o));let r=o.formatToParts(new Date(e)),a={};for(let n of r)n.type!=="literal"&&(a[n.type]=n.value);return {year:a.era==="BC"||a.era==="B"?-a.year+1:+a.year,month:+a.month,day:+a.day,hour:a.hour==="24"?0:+a.hour,minute:+a.minute,second:+a.second}}var p5=864e5;function l4(e,t,o,r){return (o===r?[o]:[o,r]).filter(n=>p4(e,t,n))}function p4(e,t,o){let r=d5(o,t);return e.year===r.year&&e.month===r.month&&e.day===r.day&&e.hour===r.hour&&e.minute===r.minute&&e.second===r.second}function u5(e,t,o="compatible"){let r=wn(e);if(t==="UTC")return $l(r);if(t===Rl()&&o==="compatible"){r=In(r,new se);let l=new Date,p=yt(r.era,r.year);return l.setFullYear(p,r.month-1,r.day),l.setHours(r.hour,r.minute,r.second,r.millisecond),l.getTime()}let a=$l(r),n=s5(a-p5,t),i=s5(a+p5,t),s=l4(r,t,a-n,a-i);if(s.length===1)return s[0];if(s.length>1)switch(o){case "compatible":case "earlier":return s[0];case "later":return s[s.length-1];case "reject":throw new RangeError("Multiple possible absolute times found")}switch(o){case "earlier":return Math.min(a-n,a-i);case "compatible":case "later":return Math.max(a-n,a-i);case "reject":throw new RangeError("No such absolute time found")}}function Tl(e,t,o="compatible"){return new Date(u5(e,t,o))}function wn(e,t){let o=0,r=0,a=0,n=0;if("timeZone"in e)({hour:o,minute:r,second:a,millisecond:n}=e);else if("hour"in e&&true)return e;return new Rn(e.calendar,e.era,e.year,e.month,e.day,o,r,a,n)}function In(e,t){if(e.calendar.identifier===t.identifier)return e;let o=t.fromJulianDay(e.calendar.toJulianDay(e)),r=e.copy();return r.calendar=t,r.era=o.era,r.year=o.year,r.month=o.month,r.day=o.day,bt(r),r}function Tn(e,t){let o=e.copy(),r="hour"in o?m4(o,t):0;Sl(o,t.years||0),o.calendar.balanceYearMonth&&o.calendar.balanceYearMonth(o,e),o.month+=t.months||0,Dl(o),m5(o),o.day+=(t.weeks||0)*7,o.day+=t.days||0,o.day+=r,c4(o),o.calendar.balanceDate&&o.calendar.balanceDate(o),o.year<1&&(o.year=1,o.month=1,o.day=1);let a=o.calendar.getYearsInEra(o);if(o.year>a){var n,i;let l=(n=(i=o.calendar).isInverseEra)===null||n===void 0?void 0:n.call(i,o);o.year=a,o.month=l?1:o.calendar.getMonthsInYear(o),o.day=l?1:o.calendar.getDaysInMonth(o);}o.month<1&&(o.month=1,o.day=1);let s=o.calendar.getMonthsInYear(o);return o.month>s&&(o.month=s,o.day=o.calendar.getDaysInMonth(o)),o.day=Math.max(1,Math.min(o.calendar.getDaysInMonth(o),o.day)),o}function Sl(e,t){var o,r;!((o=(r=e.calendar).isInverseEra)===null||o===void 0)&&o.call(r,e)&&(t=-t),e.year+=t;}function Dl(e){for(;e.month<1;)Sl(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,Sl(e,1);}function c4(e){for(;e.day<1;)e.month--,Dl(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,Dl(e);}function m5(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day));}function bt(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),m5(e);}function d4(e){let t={};for(let o in e)typeof e[o]=="number"&&(t[o]=-e[o]);return t}function Ml(e,t){return Tn(e,d4(t))}function Nl(e,t){let o=e.copy();return t.era!=null&&(o.era=t.era),t.year!=null&&(o.year=t.year),t.month!=null&&(o.month=t.month),t.day!=null&&(o.day=t.day),bt(o),o}function f5(e,t){let o=e.copy();return t.hour!=null&&(o.hour=t.hour),t.minute!=null&&(o.minute=t.minute),t.second!=null&&(o.second=t.second),t.millisecond!=null&&(o.millisecond=t.millisecond),y5(o),o}function u4(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=$n(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=$n(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=$n(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=$n(e.hour,24),t}function y5(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23));}function $n(e,t){let o=e%t;return o<0&&(o+=t),o}function m4(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,u4(e)}function El(e,t,o,r){let a=e.copy();switch(t){case "era":{let s=e.calendar.getEras(),l=s.indexOf(e.era);if(l<0)throw new Error("Invalid era: "+e.era);l=gt(l,o,0,s.length-1,r?.round),a.era=s[l],bt(a);break}case "year":var n,i;!((n=(i=a.calendar).isInverseEra)===null||n===void 0)&&n.call(i,a)&&(o=-o),a.year=gt(e.year,o,-1/0,9999,r?.round),a.year===-1/0&&(a.year=1),a.calendar.balanceYearMonth&&a.calendar.balanceYearMonth(a,e);break;case "month":a.month=gt(e.month,o,1,e.calendar.getMonthsInYear(e),r?.round);break;case "day":a.day=gt(e.day,o,1,e.calendar.getDaysInMonth(e),r?.round);break;default:throw new Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(a),bt(a),a}function b5(e,t,o,r){let a=e.copy();switch(t){case "hour":{let n=e.hour,i=0,s=23;if(r?.hourCycle===12){let l=n>=12;i=l?12:0,s=l?23:11;}a.hour=gt(n,o,i,s,r?.round);break}case "minute":a.minute=gt(e.minute,o,0,59,r?.round);break;case "second":a.second=gt(e.second,o,0,59,r?.round);break;case "millisecond":a.millisecond=gt(e.millisecond,o,0,999,r?.round);break;default:throw new Error("Unsupported field "+t)}return a}function gt(e,t,o,r,a=false){if(a){e+=Math.sign(t),e<o&&(e=r);let n=Math.abs(t);t>0?e=Math.ceil(e/n)*n:e=Math.floor(e/n)*n,e>r&&(e=o);}else e+=t,e<o?e=r-(o-e-1):e>r&&(e=o+(e-r-1));return e}function g5(e){return `${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function Ll(e){let t=In(e,new se),o;return t.era==="BC"?o=t.year===1?"0000":"-"+String(Math.abs(1-t.year)).padStart(6,"00"):o=String(t.year).padStart(4,"0"),`${o}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function v5(e){return `${Ll(e)}T${g5(e)}`}function _5(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Bl(e,t,o){_5(e,t),t.set(e,o);}function z5(e){let t=typeof e[0]=="object"?e.shift():new se,o;if(typeof e[0]=="string")o=e.shift();else {let i=t.getEras();o=i[i.length-1];}let r=e.shift(),a=e.shift(),n=e.shift();return [t,o,r,a,n]}var y4=new WeakMap,X=class e{copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day):new e(this.calendar,this.year,this.month,this.day)}add(t){return Tn(this,t)}subtract(t){return Ml(this,t)}set(t){return Nl(this,t)}cycle(t,o,r){return El(this,t,o,r)}toDate(t){return Tl(this,t)}toString(){return Ll(this)}compare(t){return Il(this,t)}constructor(...t){Bl(this,y4,{writable:true,value:void 0});let[o,r,a,n,i]=z5(t);this.calendar=o,this.era=r,this.year=a,this.month=n,this.day=i,bt(this);}};var b4=new WeakMap,Rn=class e{copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new e(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return Tn(this,t)}subtract(t){return Ml(this,t)}set(t){return Nl(f5(this,t),t)}cycle(t,o,r){switch(t){case "era":case "year":case "month":case "day":return El(this,t,o,r);default:return b5(this,t,o,r)}}toDate(t,o){return Tl(this,t,o)}toString(){return v5(this)}compare(t){let o=Il(this,t);return o===0?i5(this,wn(t)):o}constructor(...t){Bl(this,b4,{writable:true,value:void 0});let[o,r,a,n,i]=z5(t);this.calendar=o,this.era=r,this.year=a,this.month=n,this.day=i,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,bt(this);}};var So=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],g4=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],Sn=[1867,1911,1925,1988,2018],vt=["meiji","taisho","showa","heisei","reiwa"];function h5(e){let t=So.findIndex(([o,r,a])=>e.year<o||e.year===o&&e.month<r||e.year===o&&e.month===r&&e.day<a);return t===-1?So.length-1:t===0?0:t-1}function Al(e){let t=Sn[vt.indexOf(e.era)];if(!t)throw new Error("Unknown era: "+e.era);return new X(e.year+t,e.month,e.day)}var Dn=class extends se{fromJulianDay(t){let o=super.fromJulianDay(t),r=h5(o);return new X(this,vt[r],o.year-Sn[r],o.month,o.day)}toJulianDay(t){return super.toJulianDay(Al(t))}balanceDate(t){let o=Al(t),r=h5(o);vt[r]!==t.era&&(t.era=vt[r],t.year=o.year-Sn[r]),this.constrainDate(t);}constrainDate(t){let o=vt.indexOf(t.era),r=g4[o];if(r!=null){let[a,n,i]=r,s=a-Sn[o];t.year=Math.max(1,Math.min(s,t.year)),t.year===s&&(t.month=Math.min(n,t.month),t.month===n&&(t.day=Math.min(i,t.day)));}if(t.year===1&&o>=0){let[,a,n]=So[o];t.month=Math.max(a,t.month),t.month===a&&(t.day=Math.max(n,t.day));}}getEras(){return vt}getYearsInEra(t){let o=vt.indexOf(t.era),r=So[o],a=So[o+1];if(a==null)return 9999-r[0]+1;let n=a[0]-r[0];return (t.month<a[1]||t.month===a[1]&&t.day<a[2])&&n++,n}getDaysInMonth(t){return super.getDaysInMonth(Al(t))}getMinimumMonthInYear(t){let o=x5(t);return o?o[1]:1}getMinimumDayInMonth(t){let o=x5(t);return o&&t.month===o[1]?o[2]:1}constructor(...t){super(...t),this.identifier="japanese";}};function x5(e){if(e.year===1){let t=vt.indexOf(e.era);return So[t]}}var P5=-543,Mn=class extends se{fromJulianDay(t){let o=super.fromJulianDay(t),r=yt(o.era,o.year);return new X(this,r-P5,o.month,o.day)}toJulianDay(t){return super.toJulianDay(C5(t))}getEras(){return ["BE"]}getDaysInMonth(t){return super.getDaysInMonth(C5(t))}balanceDate(){}constructor(...t){super(...t),this.identifier="buddhist";}};function C5(e){let[t,o]=Ft(e.year+P5);return new X(t,o,e.month,e.day)}var Nn=1911;function I5(e){return e.era==="minguo"?e.year+Nn:1-e.year+Nn}function k5(e){let t=e-Nn;return t>0?["minguo",t]:["before_minguo",1-t]}var En=class extends se{fromJulianDay(t){let o=super.fromJulianDay(t),r=yt(o.era,o.year),[a,n]=k5(r);return new X(this,a,n,o.month,o.day)}toJulianDay(t){return super.toJulianDay(w5(t))}getEras(){return ["before_minguo","minguo"]}balanceDate(t){let[o,r]=k5(I5(t));t.era=o,t.year=r;}isInverseEra(t){return t.era==="before_minguo"}getDaysInMonth(t){return super.getDaysInMonth(w5(t))}getYearsInEra(t){return t.era==="before_minguo"?9999:9999-Nn}constructor(...t){super(...t),this.identifier="roc";}};function w5(e){let[t,o]=Ft(I5(e));return new X(t,o,e.month,e.day)}var R5=1948320,$5=[0,31,62,93,124,155,186,216,246,276,306,336],Ln=class{fromJulianDay(t){let o=t-R5,r=1+Math.floor((33*o+3)/12053),a=365*(r-1)+Math.floor((8*r+21)/33),n=o-a,i=n<216?Math.floor(n/31):Math.floor((n-6)/30),s=n-$5[i]+1;return new X(this,r,i+1,s)}toJulianDay(t){let o=R5-1+365*(t.year-1)+Math.floor((8*t.year+21)/33);return o+=$5[t.month-1],o+=t.day,o}getMonthsInYear(){return 12}getDaysInMonth(t){return t.month<=6?31:t.month<=11||Ye(25*t.year+11,33)<8?30:29}getEras(){return ["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian";}};var Fl=78,T5=80,Bn=class extends se{fromJulianDay(t){let o=super.fromJulianDay(t),r=o.year-Fl,a=t-ft(o.era,o.year,1,1),n;a<T5?(r--,n=Xe(o.year-1)?31:30,a+=n+155+90+10):(n=Xe(o.year)?31:30,a-=T5);let i,s;if(a<n)i=1,s=a+1;else {let l=a-n;l<155?(i=Math.floor(l/31)+2,s=l%31+1):(l-=155,i=Math.floor(l/30)+7,s=l%30+1);}return new X(this,r,i,s)}toJulianDay(t){let o=t.year+Fl,[r,a]=Ft(o),n,i;return Xe(a)?(n=31,i=ft(r,a,3,21)):(n=30,i=ft(r,a,3,22)),t.month===1?i+t.day-1:(i+=n+Math.min(t.month-2,5)*31,t.month>=8&&(i+=(t.month-7)*30),i+=t.day-1,i)}getDaysInMonth(t){return t.month===1&&Xe(t.year+Fl)||t.month>=2&&t.month<=6?31:30}getYearsInEra(){return 9919}getEras(){return ["saka"]}balanceDate(){}constructor(...t){super(...t),this.identifier="indian";}};var Fn=1948440,S5=1948439,Te=1300,Do=1600,v4=460322;function jn(e,t,o,r){return r+Math.ceil(29.5*(o-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function E5(e,t,o){let r=Math.floor((30*(o-t)+10646)/10631),a=Math.min(12,Math.ceil((o-(29+jn(t,r,1,1)))/29.5)+1),n=o-jn(t,r,a,1)+1;return new X(e,r,a,n)}function D5(e){return (14+11*e)%30<11}var No=class{fromJulianDay(t){return E5(this,Fn,t)}toJulianDay(t){return jn(Fn,t.year,t.month,t.day)}getDaysInMonth(t){let o=29+t.month%2;return t.month===12&&D5(t.year)&&o++,o}getMonthsInYear(){return 12}getDaysInYear(t){return D5(t.year)?355:354}getYearsInEra(){return 9665}getEras(){return ["AH"]}constructor(){this.identifier="islamic-civil";}},On=class extends No{fromJulianDay(t){return E5(this,S5,t)}toJulianDay(t){return jn(S5,t.year,t.month,t.day)}constructor(...t){super(...t),this.identifier="islamic-tbla";}},_4="qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI=",jl,Mo;function An(e){return v4+Mo[e-Te]}function Lr(e,t){let o=e-Te,r=1<<11-(t-1);return (jl[o]&r)===0?29:30}function M5(e,t){let o=An(e);for(let r=1;r<t;r++)o+=Lr(e,r);return o}function N5(e){return Mo[e+1-Te]-Mo[e-Te]}var Hn=class extends No{fromJulianDay(t){let o=t-Fn,r=An(Te),a=An(Do);if(o<r||o>a)return super.fromJulianDay(t);{let n=Te-1,i=1,s=1;for(;s>0;){n++,s=o-An(n)+1;let l=N5(n);if(s===l){i=12;break}else if(s<l){let p=Lr(n,i);for(i=1;s>p;)s-=p,i++,p=Lr(n,i);break}}return new X(this,n,i,o-M5(n,i)+1)}}toJulianDay(t){return t.year<Te||t.year>Do?super.toJulianDay(t):Fn+M5(t.year,t.month)+(t.day-1)}getDaysInMonth(t){return t.year<Te||t.year>Do?super.getDaysInMonth(t):Lr(t.year,t.month)}getDaysInYear(t){return t.year<Te||t.year>Do?super.getDaysInYear(t):N5(t.year)}constructor(){if(super(),this.identifier="islamic-umalqura",jl||(jl=new Uint16Array(Uint8Array.from(atob(_4),t=>t.charCodeAt(0)).buffer)),!Mo){Mo=new Uint32Array(Do-Te+1);let t=0;for(let o=Te;o<=Do;o++){Mo[o-Te]=t;for(let r=1;r<=12;r++)t+=Lr(o,r);}}}};var L5=347997,B5=1080,A5=24*B5,z4=29,h4=12*B5+793,x4=z4*A5+h4;function jt(e){return Ye(e*7+1,19)<7}function Un(e){let t=Math.floor((235*e-234)/19),o=12084+13753*t,r=t*29+Math.floor(o/25920);return Ye(3*(r+1),7)<3&&(r+=1),r}function C4(e){let t=Un(e-1),o=Un(e);return Un(e+1)-o===356?2:o-t===382?1:0}function Br(e){return Un(e)+C4(e)}function F5(e){return Br(e+1)-Br(e)}function P4(e){let t=F5(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}function Vn(e,t){if(t>=6&&!jt(e)&&t++,t===4||t===7||t===9||t===11||t===13)return 29;let o=P4(e);return t===2?o===2?30:29:t===3?o===0?29:30:t===6?jt(e)?30:0:30}var qn=class{fromJulianDay(t){let o=t-L5,r=o*A5/x4,a=Math.floor((19*r+234)/235)+1,n=Br(a),i=Math.floor(o-n);for(;i<1;)a--,n=Br(a),i=Math.floor(o-n);let s=1,l=0;for(;l<i;)l+=Vn(a,s),s++;s--,l-=Vn(a,s);let p=i-l;return new X(this,a,s,p)}toJulianDay(t){let o=Br(t.year);for(let r=1;r<t.month;r++)o+=Vn(t.year,r);return o+t.day+L5}getDaysInMonth(t){return Vn(t.year,t.month)}getMonthsInYear(t){return jt(t.year)?13:12}getDaysInYear(t){return F5(t.year)}getYearsInEra(){return 9999}getEras(){return ["AM"]}balanceYearMonth(t,o){o.year!==t.year&&(jt(o.year)&&!jt(t.year)&&o.month>6?t.month--:!jt(o.year)&&jt(t.year)&&o.month>6&&t.month++);}constructor(){this.identifier="hebrew";}};var Ol=1723856,j5=1824665,Hl=5500;function Kn(e,t,o,r){return e+365*t+Math.floor(t/4)+30*(o-1)+r-1}function Vl(e,t){let o=Math.floor(4*(t-e)/1461),r=1+Math.floor((t-Kn(e,o,1,1))/30),a=t+1-Kn(e,o,r,1);return [o,r,a]}function O5(e){return Math.floor(e%4/3)}function H5(e,t){return t%13!==0?30:O5(e)+5}var Eo=class{fromJulianDay(t){let[o,r,a]=Vl(Ol,t),n="AM";return o<=0&&(n="AA",o+=Hl),new X(this,n,o,r,a)}toJulianDay(t){let o=t.year;return t.era==="AA"&&(o-=Hl),Kn(Ol,o,t.month,t.day)}getDaysInMonth(t){return H5(t.year,t.month)}getMonthsInYear(){return 13}getDaysInYear(t){return 365+O5(t.year)}getYearsInEra(t){return t.era==="AA"?9999:9991}getEras(){return ["AA","AM"]}constructor(){this.identifier="ethiopic";}},Gn=class extends Eo{fromJulianDay(t){let[o,r,a]=Vl(Ol,t);return o+=Hl,new X(this,"AA",o,r,a)}getEras(){return ["AA"]}getYearsInEra(){return 9999}constructor(...t){super(...t),this.identifier="ethioaa";}},Wn=class extends Eo{fromJulianDay(t){let[o,r,a]=Vl(j5,t),n="CE";return o<=0&&(n="BCE",o=1-o),new X(this,n,o,r,a)}toJulianDay(t){let o=t.year;return t.era==="BCE"&&(o=1-o),Kn(j5,o,t.month,t.day)}getDaysInMonth(t){let o=t.year;return t.era==="BCE"&&(o=1-o),H5(o,t.month)}isInverseEra(t){return t.era==="BCE"}balanceDate(t){t.year<=0&&(t.era=t.era==="BCE"?"CE":"BCE",t.year=1-t.year);}getEras(){return ["BCE","CE"]}getYearsInEra(t){return t.era==="BCE"?9999:9715}constructor(...t){super(...t),this.identifier="coptic";}};function Ul(e){switch(e){case "buddhist":return new Mn;case "ethiopic":return new Eo;case "ethioaa":return new Gn;case "coptic":return new Wn;case "hebrew":return new qn;case "indian":return new Bn;case "islamic-civil":return new No;case "islamic-tbla":return new On;case "islamic-umalqura":return new Hn;case "japanese":return new Dn;case "persian":return new Ln;case "roc":return new En;case "gregory":default:return new se}}var U5=ht.forwardRef(({className:e,labelPosition:t,"data-block-id":o,"data-block-class":r,...a},n)=>{let{locale:i}=useLocale(),s={...a,validationState:void 0,isInvalid:a.validationState==="error"||void 0},l=useDateFieldState({...s,locale:i,createCalendar:Ul}),p=ht.useRef(null),{labelProps:c,fieldProps:u,validationErrors:m,descriptionProps:d,inputProps:b,errorMessageProps:y,isInvalid:f}=useDateField(s,l,p),g=a.errorMessage||m.join(" "),v=he({...a,errorMessage:g,descriptionProps:d,errorMessageProps:y,labelPosition:t}),{focusProps:_,isFocused:h}=useFocusRing({within:true});return jsxs(wt,{className:classNames("BaselineUI-DateField",e),labelProps:c,fieldProps:u,ref:n,wrapperRef:p,wrapperClassName:Cn,labelPosition:t,message:v,isFocused:h,"data-block-id":o,"data-block-class":r,isInvalid:f,...a,children:[jsx(VisuallyHidden,{children:jsx("input",{...b})}),jsx(D,{display:"flex",flexDirection:"row",paddingRight:"md",..._,children:l.segments.map((x,w)=>jsx(Pn,{segment:x,state:l},w))})]})});U5.displayName="DateField";var q5={x:0,y:0},N4={node:null,setNode:()=>{},coordinates:q5,setCoordinates:()=>{},displayId:"",boundsRef:{current:null},isDisabled:false},Ze=ht.createContext(N4),K5=({children:e,isDisabled:t=false,coordinates:o,onMove:r})=>{let[a,n]=ht.useState(null),i=ht.useRef(null),[s,l]=useControlledState(o,q5,u=>{r?.({coordinates:u,boundingRect:i.current});}),p=useId(),c=ht.useMemo(()=>({node:a,setNode:n,coordinates:s,setCoordinates:l,displayId:p,boundsRef:i,isDisabled:t}),[a,s,p,l,n,i,t]);return jsx(Ze.Provider,{value:c,children:e})};K5.displayName="Magnifier";var G5="_1yep5z6f6",W5=z({defaultClassName:"_1aj2a4v6",variantClassNames:{isDisabled:{true:"_1aj2a4v7",false:"_1aj2a4v8"},isIndicatorVisible:{true:"_1aj2a4v9",false:"_1aj2a4va"}},defaultVariants:{},compoundVariants:[[{isDisabled:false,isIndicatorVisible:true},"_1aj2a4vb"],[{isDisabled:false,isIndicatorVisible:false},"_1aj2a4vc"]]}),Y5="_1aj2a4vd",X5="_1aj2a4v1",Z5="_1aj2a4v4",ql="_1aj2a4v3 _1yep5z6hd _1yep5z6lz",J5="_1aj2a4v2 _1yep5z6iy _1yep5z6iz _1yep5z6j0 _1yep5z6h4 _1yep5z6lz _1yep5z6id _1yep5z6ie _1yep5z6if",Q5="_1aj2a4v0",eg="_1aj2a4v5";var og=e=>jsxs("svg",{width:92,height:92,viewBox:"0 0 92 92",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[jsxs("g",{filter:"url(#filter0_d_11407_457970)",children:[jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49 43V4h-6v39H4v6h39v39h6V49h39v-6H49zm38 5H48v39h-4V48H5v-4h39V5h4v39h39v4zm-5 28v6h-6v6h12V76h-6zm5 11H77v-4h6v-6h4v10zm-77-5v-6H4v12h12v-6h-6zm5 5H5V77h4v6h6v4zM76 4v6h6v6h6V4H76zm11 11h-4V9h-6V5h10v10zM4 4v12h6v-6h6V4H4zm11 5H9v6H5V5h10v4z",fill:themeVars.color.background.positive.subtle}),jsx("path",{d:"M48 44v4h39v-4H48zm-4 4v39h4V48h-4zM5 44v4h39v-4H5zM44 5v39h4V5h-4zm39 72v6h-6v4h10V77h-4zM9 83v-6H5v10h10v-4H9zM77 5v4h6v6h4V5H77zM5 5v10h4V9h6V5H5z",fill:themeVars.color.background.positive.interactive.enabled})]}),jsx("defs",{children:jsxs("filter",{id:"filter0_d_11407_457970",x:0,y:0,width:92,height:92,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[jsx("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),jsx("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),jsx("feOffset",{}),jsx("feGaussianBlur",{stdDeviation:2}),jsx("feComposite",{in2:"hardAlpha",operator:"out"}),jsx("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0"}),jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_11407_457970"}),jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_11407_457970",result:"shape"})]})})]});function rg({coordinates:e,setCoordinates:t,boundsRef:o,onKeyDown:r,onKeyUp:a}){let{isDisabled:n}=useContext(Ze);return useKeyboard({isDisabled:n,onKeyDown:i=>{r?.(i);let s=i.shiftKey?10:1,l=o.current;if(!l)return;let p;switch(i.key){case "ArrowRight":{i.preventDefault(),p={x:clamp$1(e.x+s,0,l.width),y:clamp$1(e.y,0,l.height)};break}case "ArrowLeft":{i.preventDefault(),p={x:clamp$1(e.x-s,0,l.width),y:clamp$1(e.y,0,l.height)};break}case "ArrowDown":{i.preventDefault(),p={x:clamp$1(e.x,0,l.width),y:clamp$1(e.y+s,0,l.height)};break}case "ArrowUp":{i.preventDefault(),p={x:clamp$1(e.x,0,l.width),y:clamp$1(e.y-s,0,l.height)};break}}p&&t(p);},onKeyUp:a})}var ng=ht.forwardRef(({children:e,onPress:t,className:o,style:r,"data-block-id":a,"data-block-class":n,onFocusChange:i,onBlur:s,onFocus:l,onKeyDown:p,onKeyUp:c,...u},m)=>{let{setNode:d,setCoordinates:b,coordinates:y,displayId:f,boundsRef:g,isDisabled:v}=useContext(Ze),_=useRef(null),[h,x]=useState(false),w=useInteractionModality(),C=Ne();useEffect(()=>{let E=_.current;if(!E||v)return;let F=j=>{let O=E.getBoundingClientRect();g.current=O;let H="clientX"in j?j.clientX:j.touches[0].clientX,Q="clientY"in j?j.clientY:j.touches[0].clientY,V={x:clamp$1(H-O.left,0,O.width),y:clamp$1(Q-O.top,0,O.height)};b(V),x(true);},B=()=>{x(false);};return E.addEventListener("mousemove",F),E.addEventListener("touchmove",F),E.addEventListener("mouseleave",B),()=>{E.removeEventListener("mousemove",F),E.removeEventListener("touchmove",F),E.removeEventListener("mouseleave",B);}},[b,g,v]);let{pressProps:I}=usePress({isDisabled:v,onPress:E=>{E.pointerType==="keyboard"?t?.({...E,x:y.x,y:y.y}):t?.(E);}}),{focusProps:P,isFocusVisible:S,isFocused:k}=useFocusRing(),{focusProps:T}=useFocus$1({isDisabled:v,onFocusChange:E=>{if(w==="keyboard")if(E){x(true);let F=_.current?.getBoundingClientRect();if(!F)return;g.current=F,b({x:clamp$1(F.width/2,0,F.width),y:clamp$1(F.height/2,0,F.height)});}else x(false);i?.(E);},onFocus:l,onBlur:s}),{keyboardProps:$}=rg({coordinates:y,setCoordinates:b,boundsRef:g,onKeyDown:p,onKeyUp:c}),R=useMemo(()=>_.current?getAbsolutePosition(_.current,y):{x:0,y:0},[y]);useInteractOutside$1({isDisabled:v,ref:_,onInteractOutside:()=>{x(false);}});let N=useMemo(()=>h&&!v&&(C==="mobile"||w==="keyboard"),[h,v,C,w]);return jsxs("div",{ref:M(m,_),className:classNames(Y5,"BaselineUI-Magnifier-Content",o),style:r,"data-block-id":a,"data-block-class":n,"aria-controls":f,role:"application",...u,children:[N?jsx(Ce,{children:jsx(og,{style:{left:R.x,top:R.y},className:classNames(Q5,"BaselineUI-Magnifier-Cursor")})}):null,jsx("div",{...Me(I,P,$,T),ref:d,className:classNames(W5({isDisabled:v,isIndicatorVisible:N}),"BaselineUI-Magnifier-ContentInner"),"data-focus-visible":S,"data-focused":k,tabIndex:v?void 0:0,children:e})]})});ng.displayName="MagnifierContent";function e8(e){let t=[];for(let o=0;o<e.length;o++){let r=e[o],a=e.getPropertyValue(r);a&&t.push(`${r}: ${a}`);}for(let o of e)if(o.startsWith("--")){let r=e.getPropertyValue(o);r&&t.push(`${o}: ${r}`);}return t.join("; ")}function ig(e){let[t,o]=useState(null),{isDisabled:r}=useContext(Ze);return useEffect(()=>{if(!e||r)return;let a=e,n=re(a);function i(){let p=n.getComputedStyle(a),c=a.cloneNode(true);c.style.cssText=e8(p);let u=a.getBoundingClientRect();c.style.setProperty("width",`${u.width}px`),c.style.setProperty("height",`${u.height}px`),c.style.setProperty("position","static"),c.style.setProperty("margin","0"),c.style.setProperty("left","0"),c.style.setProperty("top","0"),c.style.setProperty("transform","none"),c.style.removeProperty("-webkit-text-fill-color"),c.style.removeProperty("-webkit-text-stroke-color"),c.removeAttribute("aria-controls"),c.setAttribute("tabindex","-1"),c.setAttribute("aria-hidden","true");let m=findFocusableElements(c);if(m)for(let d of m)d.setAttribute("tabindex","-1");"scrollTop"in a&&(c.scrollTop=a.scrollTop),"scrollLeft"in a&&(c.scrollLeft=a.scrollLeft),o(c);}i();let s=new ResizeObserver(i),l=new MutationObserver(i);return s.observe(a),l.observe(a,{attributes:true,childList:true,subtree:true,characterData:true}),()=>{s.disconnect(),l.disconnect();}},[e,r]),t}var lg=8,pg=7,cg=7,dg=ht.forwardRef(({className:e,style:t,description:o,scale:r=2,"data-block-id":a,"data-block-class":n},i)=>{let{coordinates:s,node:l,boundsRef:p,displayId:c,isDisabled:u}=useContext(Ze),m=ig(l),d=useMemo(()=>typeof o=="function"?o({coordinates:{x:s.x,y:s.y},boundingRect:p.current}):o,[o,s,p]),b=useMemo(()=>p.current?{x:s.x/p.current.width,y:s.y/p.current.height}:{x:0,y:0},[p,s]);return jsxs(D,{ref:i,className:classNames(X5,"BaselineUI-Magnifier-Display",e),backgroundColor:"background.primary.subtle",boxShadow:"medium",borderRadius:"sm",outlineWidth:1,outlineColor:"border.medium",outlineOffset:-1,outlineStyle:"solid",paddingY:"md",paddingLeft:"md",paddingRight:d?.length?"xl":"md",display:"flex",flexDirection:"row",gap:"lg",alignItems:"center",style:t,id:c,"data-block-id":a,"data-block-class":n,role:"complementary",children:[jsxs("div",{className:J5,children:[m&&!u?jsx(oa,{node:m,style:{transform:`scale(${r}) translate(calc(-${b.x*100}% + ${lg*pg/(2*r)}px), calc(-${b.y*100}% + ${lg*cg/(2*r)}px))`},className:classNames(eg,"BaselineUI-Magnifier-DisplayNode")}):null,Array.from({length:pg*cg}).map((y,f)=>f===24?jsx("div",{className:classNames(ql,Z5)},f):jsx("div",{className:ql},f))]}),d?.length?jsx(D,{display:"flex",gap:"lg",flexDirection:"column",children:d?.map(({label:y,icon:f},g)=>jsxs(D,{display:"flex",gap:"md",flexDirection:"row",color:"text.secondary",alignItems:"center",children:[jsx(f,{size:12,className:G5}),jsx(te,{type:"label",size:"sm",children:y})]},y+g))}):null]})});dg.displayName="MagnifierDisplay";
|
|
13
|
-
export{
|
|
10
|
+
var Me=typeof document<"u"?_t.useLayoutEffect:()=>{};function Zn(e){let t=useRef(null);return Me(()=>{t.current=e;},[e]),useCallback((...o)=>{let r=t.current;return r?.(...o)},[])}function Jn(e){let[t,o]=useState(e),r=useRef(null),a=Zn(()=>{if(!r.current)return;let i=r.current.next();if(i.done){r.current=null;return}t===i.value?a():o(i.value);});Me(()=>{r.current&&a();});let n=Zn(i=>{r.current=i(t),a();});return [t,n]}var Er={prefix:String(Math.round(Math.random()*1e10)),current:0},Jl=_t.createContext(Er),Rg=_t.createContext(false);var $g=!!(typeof window<"u"&&window.document&&window.document.createElement),Qn=new WeakMap;function Tg(e=false){let t=useContext(Jl),o=useRef(null);if(o.current===null&&!e){var r,a;let n=(a=_t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||a===void 0||(r=a.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(n){let i=Qn.get(n);i==null?Qn.set(n,{id:t.current,state:n.memoizedState}):n.memoizedState!==i.state&&(t.current=i.id,Qn.delete(n));}o.current=++t.current;}return o.current}function Sg(e){let t=useContext(Jl);t===Er&&!$g&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let o=Tg(!!e),r=t===Er&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${t.prefix}`;return e||`${r}-${o}`}function Dg(e){let t=_t.useId(),[o]=useState(Ql()),r=o||process.env.NODE_ENV==="test"?"react-aria":`react-aria${Er.prefix}`;return e||`${r}-${t}`}var ti=typeof _t.useId=="function"?Dg:Sg;function Mg(){return false}function Ng(){return true}function Eg(e){return ()=>{}}function Ql(){return typeof _t.useSyncExternalStore=="function"?_t.useSyncExternalStore(Eg,Mg,Ng):useContext(Rg)}var jg=!!(typeof window<"u"&&window.document&&window.document.createElement),Je=new Map;function Lr(e){let[t,o]=useState(e),r=useRef(null),a=ti(t),n=useCallback(i=>{r.current=i;},[]);return jg&&(Je.has(a)&&!Je.get(a).includes(n)?Je.set(a,[...Je.get(a),n]):Je.set(a,[n])),Me(()=>{let i=a;return ()=>{Je.delete(i);}},[a]),useEffect(()=>{let i=r.current;i&&(r.current=null,o(i));}),a}function oi(e,t){if(e===t)return e;let o=Je.get(e);if(o)return o.forEach(a=>a(t)),t;let r=Je.get(t);return r?(r.forEach(a=>a(e)),e):t}function ep(...e){return (...t)=>{for(let o of e)typeof o=="function"&&o(...t);}}var he=e=>{var t;return (t=e?.ownerDocument)!==null&&t!==void 0?t:document},ne=e=>e&&"window"in e&&e.window===e?e:he(e).defaultView||window;function Og(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function ri(e){return Og(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}var Br=(e=document)=>{var t;let o=e.activeElement;for(;o&&"shadowRoot"in o&&(!((t=o.shadowRoot)===null||t===void 0)&&t.activeElement);)o=o.shadowRoot.activeElement;return o};function tp(e){var t,o,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(o=tp(e[t]))&&(r&&(r+=" "),r+=o);}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function Hg(){for(var e,t,o=0,r="",a=arguments.length;o<a;o++)(e=arguments[o])&&(t=tp(e))&&(r&&(r+=" "),r+=t);return r}var op=Hg;function $e(...e){let t={...e[0]};for(let o=1;o<e.length;o++){let r=e[o];for(let a in r){let n=t[a],i=r[a];typeof n=="function"&&typeof i=="function"&&a[0]==="o"&&a[1]==="n"&&a.charCodeAt(2)>=65&&a.charCodeAt(2)<=90?t[a]=ep(n,i):(a==="className"||a==="UNSAFE_className")&&typeof n=="string"&&typeof i=="string"?t[a]=op(n,i):a==="id"&&n&&i?t.id=oi(n,i):t[a]=i!==void 0?i:n;}}return t}function M(...e){return e.length===1&&e[0]?e[0]:t=>{for(let o of e)typeof o=="function"?o(t):o!=null&&(o.current=t);}}var Vg=new Set(["id"]),Ug=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),qg=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),Kg=/^(data-.*)$/;function ai(e,t={}){let{labelable:o,isLink:r,propNames:a}=t,n={};for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(Vg.has(i)||o&&Ug.has(i)||r&&qg.has(i)||a?.has(i)||Kg.test(i))&&(n[i]=e[i]);return n}function Ar(e){var t;return typeof window>"u"||window.navigator==null?false:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(o=>e.test(o.brand)))||e.test(window.navigator.userAgent)}function Fe(e){let t=null;return ()=>(t==null&&(t=e()),t)}var Bo=Fe(function(){return Ar(/Firefox/i)});function oe(e){let t=useRef(null);return useMemo(()=>({get current(){return t.current},set current(o){t.current=o,typeof e=="function"?e(o):e&&(e.current=o);}}),[e])}function Qg(){return typeof window.ResizeObserver<"u"}function si(e){let{ref:t,box:o,onResize:r}=e;useEffect(()=>{let a=t?.current;if(a)if(Qg()){let n=new window.ResizeObserver(i=>{i.length&&r();});return n.observe(a,{box:o}),()=>{a&&n.unobserve(a);}}else return window.addEventListener("resize",r,false),()=>{window.removeEventListener("resize",r,false);}},[r,t,o]);}function Qe(e){return !!e&&"label"in e&&!!e.label}function Fr(e){return !!e&&"children"in e&&!!e.children&&"title"in e}function o6(e){return Fr(e)?jsx(Section,{items:e.children,title:e.title,"aria-label":e.title,children:t=>jsx(Item,{textValue:t.label,children:t.label},t.id)},e.id):jsx(Item,{textValue:e.label,children:e.label},e.id)}function ce(){return useCallback(e=>o6(e),[])}function jr(e,t,o){let{direction:r}=useLocale(),a=useDraggableCollectionState({...e,collection:t.collection,selectionManager:t.selectionManager,isDisabled:!e.enableReorder,getItems:e.getItems||(s=>[...s].map(l=>{let p=t.collection.getItem(l);return invariant(p,"Expected item to be defined."),{"text/plain":p.textValue}}))});useDraggableCollection(e,a,o);let n=useDroppableCollectionState({...e,collection:t.collection,selectionManager:t.selectionManager}),{collectionProps:i}=useDroppableCollection({...e,keyboardDelegate:new ListKeyboardDelegate({collection:t.collection,disabledKeys:t.disabledKeys,ref:o,orientation:e.orientation,layout:e.layout,direction:r}),dropTargetDelegate:new ListDropTargetDelegate(t.collection,o)},n,o);return {collectionProps:i,dragState:a,dropState:n}}function d6(e,t){if(typeof e!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var r=o.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return (t==="string"?String:Number)(e)}function u6(e){var t=d6(e,"string");return typeof t=="symbol"?t:String(t)}function m6(e,t,o){return t=u6(t),t in e?Object.defineProperty(e,t,{value:o,enumerable:true,configurable:true,writable:true}):e[t]=o,e}function lp(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),o.push.apply(o,r);}return o}function pp(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?lp(Object(o),true).forEach(function(r){m6(e,r,o[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):lp(Object(o)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r));});}return e}function cp(e,t){var o={};for(var r in e)o[r]=t(e[r],r);return o}var f6=(e,t,o)=>{for(var r of Object.keys(e)){var a;if(e[r]!==((a=t[r])!==null&&a!==void 0?a:o[r]))return false}return true},z=e=>{var t=o=>{var r=e.defaultClassName,a=pp(pp({},e.defaultVariants),o);for(var n in a){var i,s=(i=a[n])!==null&&i!==void 0?i:e.defaultVariants[n];if(s!=null){var l=s;typeof l=="boolean"&&(l=l===true?"true":"false");var p=e.variantClassNames[n][l];p&&(r+=" "+p);}}for(var[c,u]of e.compoundVariants)f6(c,a,e.defaultVariants)&&(r+=" "+u);return r};return t.variants=()=>Object.keys(e.variantClassNames),t.classNames={get base(){return e.defaultClassName.split(" ")[0]},get variants(){return cp(e.variantClassNames,o=>cp(o,r=>r.split(" ")[0]))}},t};var dp=z({defaultClassName:"_6n12k9b _1yep5z6ls _1yep5z6lr _1yep5z6ic _1yep5z6la",variantClassNames:{isDropTarget:{true:"_1yep5z6140"},orientation:{vertical:"_1yep5z617q",horizontal:"_1yep5z617r"}},defaultVariants:{},compoundVariants:[]}),up="_6n12k98 _1yep5z6lq _1yep5z6is _1yep5z6it _1yep5z6iu",mp=z({defaultClassName:"_6n12k99 _1yep5z6ev _1yep5z6da _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z6ey"}},defaultVariants:{},compoundVariants:[]}),fp=z({defaultClassName:"_6n12k91 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6kj _1yep5z6kk _1yep5z6kl _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6dy _1yep5z6eu _1yep5z6la _1yep5z6ld _1yep5z6lq _1yep5z6lp _1yep5z6ln _1yep5z6lk",variantClassNames:{isSelected:{},isFocused:{true:"_1yep5z6140 _1yep5z617w _1yep5z617u _1yep5z617x _1yep5z614g _1yep5z614h _1yep5z614i"},isHovered:{true:"_1yep5z6125",false:"_1yep5z6124"},isFirstChild:{true:"_6n12k95"},isLastChild:{true:"_6n12k96"},isDisabled:{true:"z9nup82 _1yep5z6111"}},defaultVariants:{},compoundVariants:[]}),yp="_6n12k9f _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6jj _1yep5z6jk _1yep5z6jl",bp="_6n12k90";var gp=z({defaultClassName:"gukncs0",variantClassNames:{isVertical:{true:"gukncs1"},isSecondary:{true:"gukncs2"}},defaultVariants:{},compoundVariants:[]});var q=_t.forwardRef(({className:e,style:t,variant:o="primary",orientation:r="horizontal",UNSAFE_omitRole:a,elementType:n="div","data-block-id":i,"data-block-class":s,...l},p)=>{let{separatorProps:c}=useSeparator({...l,orientation:r,elementType:n});return jsx(n,{...c,className:classNames(gp({isVertical:r==="vertical",isSecondary:o==="secondary"}),"BaselineUI-Separator",e),"data-orientation":r,"data-block-id":i,"data-block-class":s,style:t,role:a?void 0:c.role,ref:p})});q.displayName="Separator";function x6(e){return sprinkles.properties.has(e)}var D=_t.forwardRef(({elementType:e="div",children:t,...o},r)=>{let a=e,{sprinkleProps:n,domProps:i}=useMemo(()=>{let s={},l={};for(let p in o)x6(p)?s[p]=o[p]:l[p]=o[p];return {sprinkleProps:s,domProps:l}},[o]);return jsx(a,{...i,className:classNames(sprinkles(n),"BaselineUI-Box",i.className),ref:r,children:t})});D.displayName="Box";var Fo=_t.forwardRef(({item:e,isDisabled:t,isFocusVisible:o,isSelected:r,liProps:a,showSelectedIcon:n,description:i,descriptionProps:s,labelProps:l,isFocused:p,isPressed:c,_state:u},m)=>{invariant(e.value&&Qe(e.value),"Item cannot be a section");let{icon:d,label:b}=e.value,{hoverProps:y,isHovered:f}=useHover({isDisabled:t}),g=filterTruthyValues({"data-selected":r,"data-disabled":t,"data-focused":p,"data-hovered":f,"data-pressed":c,"data-focus-visible":o,"data-selection-mode":u.selectionManager.selectionMode});return jsxs("li",{...mergeProps(a,y,g),className:classNames(fp({isHovered:f,isFocused:o,isFirstChild:u.collection.getFirstKey()===e.key,isLastChild:u.collection.getLastKey()===e.key,isDisabled:t}),a.className,"BaselineUI-ListBox-Option"),style:a.style,ref:m,children:[jsxs(D,{display:"flex",alignItems:"center",gap:"lg",children:[n?jsx("span",{"aria-hidden":true,style:{height:24,width:24},children:r?jsx(CheckmarkIcon,{size:24}):null}):null,d?jsx(d,{size:24}):null,jsx("span",{...l,children:b})]}),i?jsx("span",{className:mp({isDisabled:t}),...s,children:i}):null]})});Fo.displayName="DefaultRenderOption";var Ht=({dropState:e,orientation:t="vertical",dropIndicatorStyle:o,dropIndicatorClassName:r,renderDropIndicator:a=({isDropTarget:i,isHidden:s,dropIndicatorProps:l,orientation:p},c)=>s?null:jsx("li",{...l,ref:c,"data-drop-target":i,className:classNames(dp({isDropTarget:i,orientation:p}),"BaselineUI-DropIndicator",r),style:o}),...n})=>{let i=_t.useRef(null),{dropIndicatorProps:s,isHidden:l,isDropTarget:p}=useDropIndicator(n,e,i);return a({dropIndicatorProps:{...s,role:"option"},isHidden:l,isDropTarget:p,orientation:t},i)};function zt(e,t,o){return typeof e=="function"?e(t,o):e}function Or(e,t,o){return typeof e=="function"?e(t,o):e}function Hr(e,t){return typeof e=="function"?e(t):e}function ci(e,t){return typeof e=="function"?e(t):e}var hp=({item:e,children:t,state:o,dragState:r,...a})=>{let{dragProps:n}=useDraggableItem({key:e.key},r);return jsxs(Fragment,{children:[jsx(Ht,{target:{type:"item",key:e.key,dropPosition:"before"},...a}),t(n),o.collection.getKeyAfter(e.key)==null&&jsx(Ht,{target:{type:"item",key:e.key,dropPosition:"after"},...a})]})};hp.displayName="DraggableListOption";var jo=_t.forwardRef(({item:e,renderOption:t=(m,d,b)=>jsx(Fo,{item:m,liProps:d.optionProps,...d,ref:b}),showSelectedIcon:o,state:r,dragState:a,dropState:n,orientation:i,dropIndicatorStyle:s,dropIndicatorClassName:l,optionStyle:p,optionClassName:c},u)=>{let m=_t.useRef(null),d=useOption({key:e.key},r,m),{value:b}=e;invariant(b&&Qe(b),"ListSection should not be passed to ListOption");let y={isFocusVisible:d.isFocusVisible,isSelected:d.isSelected,isFocused:d.isFocused,isDisabled:d.isDisabled,isPressed:d.isPressed},f={style:Or(p,b,y),className:zt(c,b,y)};return a&&n?jsx(hp,{orientation:i,state:r,item:e,dropState:n,dragState:a,dropIndicatorStyle:s,dropIndicatorClassName:l,children:g=>t(e,{...d,showSelectedIcon:o,_state:r,optionProps:{...mergeProps(d.optionProps,g),...f}},M(m,u))}):t(e,{...d,showSelectedIcon:o,_state:r,optionProps:{...d.optionProps,...f}},M(m,u))});jo.displayName="Option";var kp=({section:e,state:t,sectionClassName:o,sectionStyle:r,showSectionHeader:a,renderSectionHeader:n,withSectionHeaderPadding:i=false,...s})=>{let l=_t.useRef(null),{itemProps:p,groupProps:c,headingProps:u}=useListBoxSection({heading:a?n?.(e,l)||e.rendered:void 0,"aria-label":e["aria-label"]}),m=t.collection.getChildren?.(e.key);invariant(m,"children must be defined");let{value:d}=e;invariant(d&&Fr(d),"section must be a ListSection");let b=typeof r=="function"?r(d):r,y=typeof o=="function"?o(d):o;return jsxs(Fragment,{children:[e.key===t.collection.getFirstKey()?null:jsx(q,{UNSAFE_omitRole:true}),jsxs("li",{...p,style:{...p.style,...b},className:classNames(bp,y,"BaselineUI-ListBox-Section"),children:[e.rendered&&a?n?.(e,l)||jsx(D,{...u,className:classNames("BaselineUI-ListBox-SectionHeader",yp),ref:l,paddingX:"lg",typography:"label.md.medium",color:"text.primary",paddingInlineStart:i?"5xl":"lg",paddingInlineEnd:"lg",children:e.rendered}):null,jsx("ul",{...c,children:[...m].map(f=>jsx(jo,{item:f,state:t,...s},f.key))})]})]})};function qr({type:e="listbox",handle:t},o,r){let a=useCallback(i=>e==="listbox"?r.current?.querySelector(`[data-key="${i}"][role="option"]`):r.current?.querySelector(`[data-key="${i}"][role="row"]`),[e,r]),n=useCallback((i,s)=>{let l=a(i);l&&l?.scrollIntoView({block:"nearest",inline:"nearest",...s});},[a]);useImperativeHandle(t,()=>({scrollIntoView:n,setFocusedKey:i=>{o.selectionManager.setFocused(true),o.selectionManager.setFocusedKey(i),n(i),a(i)?.focus();}}),[n,o.selectionManager,a]),useGranularEffect(()=>{let i=r.current?.getRootNode(),s=i&&ri(i),l=o.selectionManager.focusedKey;s&&l&&n(l);},[o.selectionManager.focusedKey],[n,r]);}var ht=_t.createContext(null),di=_t.forwardRef(({className:e,layout:t="stack",orientation:o="vertical",showSelectedIcon:r=true,style:a,renderOption:n,enableReorder:i=false,"data-block-id":s,"data-block-class":l,renderDragPreview:p,onReorder:c,state:u,listBoxHandle:m,...d},b)=>{let y=_t.useRef(null),{direction:f}=useLocale(),g=_t.useRef(null),{listBoxProps:v}=useListBox({...d,shouldSelectOnPressUp:i,keyboardDelegate:new ListKeyboardDelegate({collection:u.collection,ref:g,layout:t,orientation:o,direction:f,disabledKeys:u.disabledKeys})},u,g);qr({handle:m},u,g);let{collectionProps:_,dragState:h,dropState:x}=jr({...d,onReorder:c,layout:t,orientation:o,enableReorder:i,preview:y},u,g),{isFocusVisible:w,isFocused:C,focusProps:I}=useFocusRing(),P=filterTruthyValues({"data-block-id":s,"data-block-class":l,"data-layout":t,"data-empty":u.collection.size===0,"data-focused":C,"data-focus-visible":w,"data-orientation":o});return jsxs("ul",{...mergeProps(v,I,P,_),className:classNames(up,"BaselineUI-ListBox",e),style:a,ref:M(b,g),children:[[...u.collection].map(S=>{let k={key:S.key,state:u,dragState:h,dropState:x,renderOption:n,renderDropIndicator:d.renderDropIndicator,renderSectionHeader:d.renderSectionHeader,showSelectedIcon:r,orientation:o,dropIndicatorStyle:d.dropIndicatorStyle,dropIndicatorClassName:d.dropIndicatorClassName,optionStyle:d.optionStyle,optionClassName:d.optionClassName,sectionClassName:d.sectionClassName,sectionStyle:d.sectionStyle,showSectionHeader:d.showSectionHeader,withSectionHeaderPadding:d.withSectionHeaderPadding};return S.type==="section"?createElement(kp,{...k,key:S.key,section:S}):createElement(jo,{...k,key:S.key,item:S})}),p?jsx(DragPreview,{ref:y,children:p}):null]})});di.displayName="ListBoxCore";var Rp=_t.forwardRef((e,t)=>{let o=ce(),r=useListState({...e,children:o});return jsx(di,{...e,ref:t,state:r})});Rp.displayName="ListBoxStandalone";var fe=_t.forwardRef((e,t)=>{let o=useContext(ht);return useEffect(()=>{if(!e.items&&!o)throw new Error("ListBox: You must provide a `state` or `items` prop to render the listbox.")},[e.items,o]),o?jsx(di,{...e,ref:t,state:o}):jsx(Rp,{...e,ref:t})});fe.displayName="ListBox";var Gr="uf19bsf _1yep5z6la",$p=z({defaultClassName:"uf19bs0 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f5 _1yep5z6lp _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6kd _1yep5z6ke _1yep5z6kf _1yep5z6lk",variantClassNames:{size:{xxs:"uf19bs1",xs:"uf19bs2",sm:"uf19bs3",md:"uf19bs4",lg:"uf19bs5 _1yep5z6wo _1yep5z6wp _1yep5z6wq _1yep5z6xc _1yep5z6xd _1yep5z6xe _1yep5z6y0 _1yep5z6y1 _1yep5z6y2 _1yep5z6yo _1yep5z6yp _1yep5z6yq"},isHovered:{true:"uf19bs6"},isDisabled:{true:"uf19bs7 _1yep5z611a"},isFocusVisible:{true:"uf19bs8"},variant:{primary:"uf19bs9",secondary:"uf19bsa",tertiary:"uf19bsb",ghost:"uf19bsc",toolbar:"uf19bsd _1yep5z6x6 _1yep5z6x7 _1yep5z6x8 _1yep5z6xu _1yep5z6xv _1yep5z6xw _1yep5z6yi _1yep5z6yj _1yep5z6yk _1yep5z6z6 _1yep5z6z7 _1yep5z6z8",popover:"uf19bse _1yep5z6pr _1yep5z6ps _1yep5z6pt _1yep5z6nf _1yep5z6ng _1yep5z6nh _1yep5z6m6 _1yep5z6m7 _1yep5z6m8 _1yep5z6oi _1yep5z6oj _1yep5z6ok _1yep5z6vr _1yep5z6vs _1yep5z6vt"}},defaultVariants:{},compoundVariants:[[{variant:"toolbar",isHovered:true,isFocusVisible:false},"_1yep5z61o9"],[{variant:"primary",isHovered:true,isFocusVisible:false},"_1yep5z61o9"],[{variant:"secondary",isHovered:true,isFocusVisible:false},"_1yep5z61nc"],[{variant:"tertiary",isHovered:true,isFocusVisible:false},"_1yep5z61nb _1yep5z61o9"],[{variant:"ghost",isHovered:true,isFocusVisible:false},"_1yep5z61nh"],[{variant:"popover",isHovered:true,isFocusVisible:false},"_1yep5z61q6 _1yep5z61tx _1yep5z61u1 _1yep5z61ty"],[{variant:"ghost",isDisabled:false},"_1yep5z61ng"],[{variant:"popover",size:"lg"},"_1yep5z61io _1yep5z61ip _1yep5z61iq _1yep5z61jc _1yep5z61jd _1yep5z61je _1yep5z61k0 _1yep5z61k1 _1yep5z61k2 _1yep5z61ko _1yep5z61kp _1yep5z61kq"]]});var Oo=_t.createContext({state:null,overlayTriggerAria:{triggerProps:{},overlayProps:{}},triggerRef:void 0}),je=({children:e,...t})=>{let o=_t.useRef(null),r=useOverlayTriggerState(t),a=useOverlayTrigger(t,r),n=useMemo(()=>({state:r,overlayTriggerAria:a,triggerRef:o}),[r,a]);return jsx(Oo.Provider,{value:n,children:e})};var Sp=z({defaultClassName:"_1gzftth2",variantClassNames:{placement:{bottom:"_1gzftth3",top:"_1gzftth4",right:"_1gzftth5",left:"_1gzftth6"}},defaultVariants:{},compoundVariants:[]}),Dp=z({defaultClassName:"_1gzftth7",variantClassNames:{placement:{bottom:"_1gzftth8",top:"_1gzftth9",right:"_1gzfttha",left:"_1gzftthb"}},defaultVariants:{},compoundVariants:[]}),Mp="_1gzftth1 _1yep5z6is _1yep5z6it _1yep5z6iu",Np="_1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6k4 _1yep5z6k5 _1yep5z6k6 _1yep5z6d7",Ep="_1gzftthd",Lp="_1gzftthc",Bp="var(--_1gzftth0)";function y3(e){return e.closest(".BaselineUI-Portal")||e.closest(".BaselineUI-Popover-Content")}function Ap(e){return typeof e=="object"&&typeof e.left=="number"&&typeof e.top=="number"&&(typeof e.width=="number"||e.width===void 0)&&(typeof e.height=="number"||e.height===void 0)}var Wr=_t.createContext({isSelected:false,ref:void 0}),Oe=({children:e,anchorRect:t})=>{let{state:o,overlayTriggerAria:r,triggerRef:a}=useContext(Oo);invariant(o,"PopoverTrigger must be used within a Popover");let{triggerProps:n}=r,i=useMemo(()=>({...n,isSelected:o.isOpen,ref:a}),[n,o.isOpen,a]);return invariant(!t&&e||t&&!e,"Either one of anchorRect or children has to be provided."),invariant(!t||Ap(t),"If provided, the anchorRect prop must be an object with left and top number values, and optionally width and height."),jsx(Wr.Provider,{value:i,children:t?jsx("div",{className:classNames(Ep,"BaselineUI-PopoverTrigger-Hidden"),style:t,ref:a,tabIndex:-1},JSON.stringify(t)):e})};var xe=({label:e,tooltip:t,...o})=>({tooltipProps:useMemo(()=>{let a={size:"sm",variant:"inverse",text:e,includeArrow:false,placement:"bottom start",offset:4,...o};if(typeof t=="object")return {...a,...t};if(t)return a},[e,o,t])});function Yr({tooltip:e,"aria-label":t,"aria-labelledby":o},r){let[a,n]=useState(t||"");useEffect(()=>{if(o){let l=he(r.current).querySelector(`#${o}`);l&&n(l.textContent||"");}else t&&n(t);},[o,r,t]);let{tooltipProps:i}=xe({label:a,tooltip:e});return {tooltipProps:i}}var Xr=e=>{let t=_t.useRef(null),{ref:o,...r}=useContext(Wr)||{},{buttonProps:a,isPressed:n}=useButton({...e,...r},t),{isFocusVisible:i,isFocused:s,focusProps:l}=useFocusRing(),{hoverProps:p,isHovered:c}=useHover({isDisabled:e.isDisabled});return {buttonProps:$e(a,l,p),isPressed:n,ref:M(t,o||null),isFocusVisible:i,isFocused:s,isHovered:c,uiStateOptions:{isHovered:c,isFocused:s,isPressed:n,isDisabled:e.isDisabled,isFocusVisible:i}}},Zr=(e,t)=>{let o=_t.useRef(null),{ref:r,...a}=useContext(Wr)||{},{buttonProps:n,isPressed:i}=useToggleButton({...e,...a},t,o);(n.role==="radio"||n.role==="checkbox")&&(n["aria-pressed"]=void 0);let{isFocusVisible:s,isFocused:l,focusProps:p}=useFocusRing(),{hoverProps:c,isHovered:u}=useHover({isDisabled:e.isDisabled});return {buttonProps:$e(n,p,c),isPressed:i,ref:M(o,r||null),isFocusVisible:s,isFocused:l,isHovered:u,uiStateOptions:{isHovered:u,isFocused:l,isPressed:i,isDisabled:e.isDisabled,isFocusVisible:s,isSelected:t.isSelected}}};var Jr=z({defaultClassName:"oom8bs0 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6lp _1yep5z6lq _1yep5z6lk _1yep5z6dy _1yep5z6la",variantClassNames:{variant:{primary:"oom8bs1",secondary:"oom8bs2",tertiary:"oom8bs3",ghost:"oom8bs4",popover:"oom8bs5",toolbar:"oom8bs6",success:"oom8bs7",warning:"oom8bs8",error:"oom8bs9"},isDisabled:{true:"oom8bsa"},isFocusVisible:{true:"oom8bsb"},isHovered:{true:"oom8bsc"},size:{sm:"oom8bsd",md:"oom8bse",lg:"oom8bsf"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isHovered:true},"oom8bsg"],[{variant:"secondary",isHovered:true},"oom8bsh"],[{variant:"tertiary",isHovered:true},"oom8bsi"],[{variant:"popover",isHovered:true},"oom8bsj"],[{variant:"ghost",isHovered:true},"oom8bsk"],[{variant:"success",isHovered:true},"oom8bsl"],[{variant:"warning",isHovered:true},"oom8bsm"],[{variant:"error",isHovered:true},"oom8bsn"],[{variant:"primary",isFocusVisible:true},"oom8bso"],[{variant:"tertiary",isFocusVisible:true},"oom8bsp"],[{variant:"success",isFocusVisible:true},"oom8bsq"],[{variant:"warning",isFocusVisible:true},"oom8bsr"],[{variant:"error",isFocusVisible:true},"oom8bss"]]}),mi=z({defaultClassName:"oom8bst _1yep5z6la",variantClassNames:{isDisabled:{true:"oom8bsu"},isFocusVisible:{true:"oom8bsv"},isHovered:{true:"_1yep5z6115"},variant:{primary:"_1yep5z611c",secondary:"_1yep5z6118",tertiary:"_1yep5z611d",ghost:"_1yep5z611d",popover:"_1yep5z6118",toolbar:"_1yep5z6118",success:"_1yep5z611b",warning:"_1yep5z611b",error:"_1yep5z611b"}},defaultVariants:{},compoundVariants:[[{variant:"tertiary",isHovered:true},"_1yep5z61nf"],[{variant:"ghost",isHovered:true},"_1yep5z61nh"],[{variant:"tertiary",isFocusVisible:true},"_1yep5z61nf"],[{variant:"secondary",isDisabled:true},"_1yep5z61nd"],[{variant:"tertiary",isDisabled:true},"_1yep5z61nd"],[{variant:"ghost",isDisabled:true},"_1yep5z61nd"],[{variant:"popover",isDisabled:true},"_1yep5z61nd"],[{variant:"toolbar",isDisabled:true},"_1yep5z61nd"]]});var xv={sm:16,md:20,lg:24},K=_t.forwardRef(({label:e,style:t,className:o,iconStart:r,iconEnd:a,variant:n="primary",elementType:i="button",isDisabled:s,size:l="sm","data-block-id":p,"data-block-class":c,...u},m)=>{let{buttonProps:d,isPressed:b,ref:y,isFocusVisible:f,isFocused:g,isHovered:v,uiStateOptions:_}=Xr({...u,elementType:i,isDisabled:s}),h=xv[l],x=filterTruthyValues({"data-block-id":p,"data-block-class":c,"data-disabled":s,"data-focused":g,"data-focus-visible":f,"data-hovered":v,"data-pressed":b});return jsxs(i,{...mergeProps(d,x),className:classNames(Jr({isDisabled:!!s,isFocusVisible:f,isHovered:v,variant:n,size:l}),"BaselineUI-ActionButton",typeof o=="function"?o(_):o),style:typeof t=="function"?t(_):t,ref:M(m,y),children:[!!r&&jsx(r,{size:h,className:mi({variant:n,isDisabled:s,isFocusVisible:f,isHovered:v})}),e,!!a&&jsx(a,{size:h,className:mi({variant:n,isDisabled:s,isFocusVisible:f,isHovered:v})}),n==="popover"&&jsx(CaretDownIcon,{size:8,className:Gr})]})});K.displayName="ActionButton";var Qr=_t.forwardRef(({className:e,style:t,node:o,"data-block-id":r,"data-block-class":a,...n},i)=>{let s=_t.useRef(null);_t.useEffect(()=>{let c=s.current;return c?.append(o),()=>{c?.contains(o)&&o.remove();}},[o]);let{pressProps:l,isPressed:p}=usePress(n);return jsx("div",{...l,className:e,style:t,"data-block-id":r,"data-block-class":a,"data-pressed":p,"data-testid":"dom-node-renderer",ref:M(i,s)})});Qr.displayName="DomNodeRenderer";var Up="_1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j4 _1yep5z6j5 _1yep5z6j6 _1yep5z6ln",qp="_14uvjig3 _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z69i _1yep5z69j _1yep5z69k",Kp="_1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6kj _1yep5z6kk _1yep5z6kl _1yep5z6jj _1yep5z6jk _1yep5z6jl",Gp=z({defaultClassName:"_14uvjig0 _1yep5z6dy _1yep5z6ev",variantClassNames:{isDisabled:{true:"_1yep5z6111"},hasNumberInput:{false:"_1yep5z6ol _1yep5z6om _1yep5z6on"}},defaultVariants:{},compoundVariants:[]}),Wp=z({defaultClassName:"_14uvjigb _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6g9 _1yep5z6lp _1yep5z6la",variantClassNames:{active:{true:"_14uvjigc _1yep5z612i _1yep5z6181 _1yep5z617t"},isDisabled:{true:"_14uvjigd _1yep5z612m"},isReadOnly:{true:"_1yep5z614p _1yep5z614q _1yep5z614r"},isFocusVisible:{true:"_14uvjigf _1yep5z612i _1yep5z617d"},isHovered:{true:"_14uvjigg _1yep5z612i"}},defaultVariants:{},compoundVariants:[]}),Yp="_14uvjiga _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6kd _1yep5z6ke _1yep5z6kf",Xp="_14uvjig4 _1yep5z6g3 _1yep5z6ln",Zp=z({defaultClassName:"_14uvjig5 _1yep5z6g9 _1yep5z6ig _1yep5z6ih _1yep5z6ii _1yep5z6lo",variantClassNames:{active:{true:"_1yep5z612i"},isFocusVisible:{true:"_1yep5z612i"},isDisabled:{true:"_1yep5z612m"},isHovered:{true:"_1yep5z612i"}},defaultVariants:{},compoundVariants:[]});var Ut=z({defaultClassName:"nrh1ehr _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z6ew _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z6111"},hasError:{true:"_1yep5z610h"},labelPosition:{start:"nrh1ehu",top:"nrh1ehv"}},defaultVariants:{},compoundVariants:[]}),ea=z({defaultClassName:"nrh1ehi _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6eu _1yep5z6ln _1yep5z6ly _1yep5z6lq _1yep5z6dy",variantClassNames:{isDisabled:{true:"nrh1ehj"},labelPosition:{top:"nrh1ehk",start:"nrh1ehl"}},defaultVariants:{},compoundVariants:[]}),qt=z({defaultClassName:"nrh1ehm _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6lk",variantClassNames:{validationState:{valid:"nrh1ehn",error:"_1yep5z610h",warning:"_1yep5z610p"},isReadOnly:{true:"_1yep5z6118"}},defaultVariants:{},compoundVariants:[]}),Kt="_1yep5z6ev _1yep5z6dy",et=z({defaultClassName:"nrh1eh3 _1yep5z6iv _1yep5z6iw _1yep5z6ix",variantClassNames:{labelPosition:{top:"_1yep5z6t9 _1yep5z6ta _1yep5z6tb",start:"_1yep5z6n6 _1yep5z6n7 _1yep5z6n8 _1yep5z6157 _1yep5z6158 _1yep5z6159"},hasMessage:{true:"nrh1eh6"}},defaultVariants:{},compoundVariants:[[{labelPosition:"start",hasMessage:false},"_1yep5z61sj _1yep5z61sk _1yep5z61sl"]]}),tt=z({defaultClassName:"nrh1eh0 _1yep5z6ln",variantClassNames:{labelPosition:{top:"_1yep5z614v _1yep5z614w _1yep5z614x _1yep5z6157 _1yep5z6158 _1yep5z6159",start:"_1yep5z614v _1yep5z614w _1yep5z614x _1yep5z6154 _1yep5z6155 _1yep5z6156 _1yep5z616m _1yep5z616n _1yep5z616o _1yep5z6vl _1yep5z6vm _1yep5z6vn"}},defaultVariants:{},compoundVariants:[]}),Gt=z({defaultClassName:"nrh1eh7 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6m1 _1yep5z6lz _1yep5z6h4 _1yep5z6jj _1yep5z6jk _1yep5z6jl",variantClassNames:{validationState:{valid:"nrh1eh8",error:"_1yep5z612q",warning:"nrh1eha"},isHovered:{true:"nrh1ehb"},isFocused:{true:"_1yep5z6wl _1yep5z6wm _1yep5z6wn _1yep5z6x9 _1yep5z6xa _1yep5z6xb _1yep5z6xx _1yep5z6xy _1yep5z6xz _1yep5z6yl _1yep5z6ym _1yep5z6yn _1yep5z6184 _1yep5z6182 _1yep5z6134 _1yep5z617v _1yep5z617u _1yep5z6140 _1yep5z617x"},isDisabled:{true:"nrh1ehd"},variant:{primary:"nrh1ehe",ghost:"nrh1ehf"},isReadOnly:{true:"_1yep5z6x6 _1yep5z6x7 _1yep5z6x8 _1yep5z6xu _1yep5z6xv _1yep5z6xw _1yep5z6yi _1yep5z6yj _1yep5z6yk _1yep5z6z6 _1yep5z6z7 _1yep5z6z8"}},defaultVariants:{},compoundVariants:[[{variant:"ghost",isHovered:true,isFocused:false,validationState:"valid"},"_1yep5z61pa _1yep5z61u5 _1yep5z61u7"],[{variant:"ghost",isFocused:false,isHovered:false,validationState:"valid"},"_1yep5z61pm"],[{isHovered:true,validationState:"valid",isDisabled:false,isReadOnly:false,isFocused:false,variant:"primary"},"_1yep5z61pb"],[{isHovered:true,validationState:"warning",isDisabled:false,isReadOnly:false,isFocused:false},"_1yep5z61pb"],[{isReadOnly:true,variant:"primary",isFocused:false},"nrh1ehh"],[{isReadOnly:true,isFocused:true},"_1yep5z61io _1yep5z61ip _1yep5z61iq _1yep5z61jc _1yep5z61jd _1yep5z61je _1yep5z61k0 _1yep5z61k1 _1yep5z61k2 _1yep5z61ko _1yep5z61kp _1yep5z61kq"],[{isHovered:true,isFocused:false,isDisabled:false,isReadOnly:false},"_1yep5z61tg"]]});function Ce({description:e,errorMessageProps:t,descriptionProps:o,warningMessage:r,errorMessage:a,labelPosition:n,isDisabled:i}){return e?jsx("div",{...o,className:Ut({isDisabled:i,labelPosition:n}),"aria-disabled":i,children:e}):a?jsx("div",{...t,className:Ut({hasError:true,labelPosition:n}),"aria-disabled":i,children:a}):r?jsx("div",{className:Ut({isDisabled:i,labelPosition:n}),"aria-disabled":i,children:r}):null}var Jp=z({defaultClassName:"_1lnwne1 z9nup81",variantClassNames:{isHoveredOrFocused:{true:"_1lnwne2"},isInteractive:{false:"z9nup82"}},defaultVariants:{},compoundVariants:[[{isHoveredOrFocused:true,isInteractive:true},"_1lnwne4"]]}),Qp="_1lnwne0";var ec=z({defaultClassName:"_1jwycy80",variantClassNames:{placement:{bottom:"_1jwycy81",left:"_1jwycy82",right:"_1jwycy83",top:"_1jwycy84"},variant:{default:"_1jwycy85",inverse:"_1jwycy86"}},defaultVariants:{},compoundVariants:[]}),tc=z({defaultClassName:"_1jwycy87 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn",variantClassNames:{size:{md:"_1yep5z63u _1yep5z63v _1yep5z63w _1yep5z61i _1yep5z61j _1yep5z61k _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6e7",sm:"_1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6dv"},variant:{default:"_1yep5z6g9 _1yep5z6ez",inverse:"_1yep5z6d7 _1yep5z6g1 _1yep5z6eu"}},defaultVariants:{},compoundVariants:[]});function ta({placement:e}){let t=useMemo(()=>{switch(e){case "top":return {x:0,y:-4};case "bottom":return {x:0,y:4};case "left":return {x:-4,y:0};case "right":return {x:4,y:0};default:return {x:0,y:4}}},[e]);return {transitionProps:{initial:{opacity:0,transform:`translate3d(${t.x}px, ${t.y}px, 0) scale(0.98)`},animate:{opacity:1,transform:"translate3d(0, 0, 0) scale(1)"},transition:{ease:"easeOut"}}}}var gi=_t.forwardRef(({children:e,state:t,overlayProps:o,arrowProps:r,placement:a,variant:n,size:i,tooltipProps:s,includeArrow:l},p)=>{let{tooltipProps:c}=useTooltip({isOpen:t.isOpen},t),u=a==="center"?"bottom":a,{transitionProps:m}=ta({placement:a});return jsxs(motion.span,{...mergeProps(o,m),ref:p,"data-placement":u,children:[l?jsx("div",{className:ec({placement:u,variant:n}),...r}):null,jsx("div",{...mergeProps(c,s),className:tc({variant:n,size:i}),children:e})]})});gi.displayName="TooltipContent";var vi=_t.createContext(void 0),oa=({portalContainer:e,children:t})=>jsx(vi.Provider,{value:e,children:t});oa.displayName="PortalContainerProvider";function nc({ref:e,onIntersect:t,isDisabled:o,threshold:r,rootMargin:a,root:n}){let i=_t.useRef(null);useEffect(()=>{if(o){i.current?.disconnect(),i.current=null;return}i.current=new IntersectionObserver(([s])=>{t(s);},{root:n?.current,rootMargin:a,threshold:r});},[t,o,n,a,r]),useEffect(()=>{let{current:s}=i;return e.current&&s?.observe(e.current),()=>s?.disconnect()},[e]);}function ic({ref:e,onResize:t,isDisabled:o}){let r=_t.useRef(null),[a,n]=_t.useState();return _t.useEffect(()=>{if(o){r.current?.disconnect(),r.current=null;return}r.current=new ResizeObserver(([i])=>{n(i.contentRect),t?.(i);});},[t,o,n]),_t.useEffect(()=>{let{current:i}=r;return e.current&&i?.observe(e.current),()=>i?.disconnect()},[e]),{size:a}}function Wt({src:e,alt:t}){let[o,r]=useState(false),[a,n]=useState(false),[i,s]=useState(false),l=()=>{r(true),s(false);},p=()=>{n(true),s(false);};return useEffect(()=>{if(!e)return;s(true);let c=new Image;return c.src=e,c.addEventListener("load",l),c.addEventListener("error",p),()=>{c.removeEventListener("load",l),c.removeEventListener("error",p);}},[e]),{isLoaded:o,hasError:a,isLoading:i,imgProps:{src:o?e:void 0,alt:t}}}function aa(){let e=useRef(true);return useEffect(()=>{e.current=false;},[]),e.current}var sc="SET_STATE",na="UNDO",ia="REDO",jv=(e,t)=>{let{past:o,present:r,future:a}=e;switch(t.type){case sc:return {past:[...o,r],present:t.data,future:[]};case na:return {past:o.slice(0,o?.length-1),present:o[o?.length-1],future:[r,...a]};case ia:return {past:[...o,r],present:a[0],future:a.slice(1)};default:throw new Error("Invalid action type")}},lc=(e={},{isDisabled:t,onAction:o})=>{let r=aa(),[a,n]=useReducer(jv,{past:[],present:e,future:[]}),{past:i,present:s,future:l}=a,p=y=>{n({type:sc,data:y});},c=useRef(),u=()=>{c.current=na,n({type:na});},m=()=>{c.current=ia,n({type:ia});},d=!!i?.length,b=!!l?.length;return useGranularEffect(()=>{(c.current===na||c.current===ia)&&(o?.(s,c.current),c.current=void 0);},[s],[o,r]),{state:s,push:t?()=>{}:p,undo:t?()=>{}:u,redo:t?()=>{}:m,pastStates:i,futureStates:l,canUndo:d,canRedo:b}};var zi=_t.createContext({messages:{},shouldLogMissingMessages:true,hasMissingErrorLoggedFor:{current:new Set},setLang:()=>{}}),dc=({children:e,messages:t={},shouldLogMissingMessages:o=true,...r})=>{let a=useRef(new Set),[n,i]=useState(r.locale||"");useEffect(()=>{a.current.clear();},[n,r.locale]);let s=_t.useMemo(()=>({messages:t,shouldLogMissingMessages:o,hasMissingErrorLoggedFor:a,setLang:i}),[t,o,i]);return jsx(I18nProvider,{...r,children:jsx(zi.Provider,{value:s,children:e})})};dc.displayName="I18nProvider";function A(e){let{messages:t,shouldLogMissingMessages:o,hasMissingErrorLoggedFor:r,setLang:a}=useContext(zi);useEffect(()=>{!e&&Kv(t)&&console.warn("BUI \u{1F30D}: No messages object provided and no messages found in the `I18nProvider`. Please provide a messages object to the `useI18n` hook.");},[e,t]);let n=useMemo(()=>e?cleanKeyFromGlobImport(e):t,[e,t]),i=useMessageFormatter(n),s=useLocale();useEffect(()=>{a(s.locale);},[s.locale,a]);let l=useCallback(c=>{o&&!r.current.has(c)&&(console.log(`BUI \u{1F30D}: Translation not found for key: \`${c}\` for locale: \`${s.locale}\`. The default message, i.e. \`${c}\`, will be used instead.`),r.current.add(c));},[r,s.locale,o]),p=useCallback((c,u)=>{if(typeof c=="object")try{return i(c.id,u)}catch{return l(c.id),c.defaultMessage||c.id}else try{return i(c,u)}catch{return l(c),c}},[i,l]);return useMemo(()=>({formatMessage:p,locale:s}),[p,s])}var W=e=>e;function yD(e,t,o){let r=_t.useRef(null);return _t.useEffect(()=>{if(e)return r.current=new MutationObserver(o),r.current.observe(e,t),()=>{r.current&&r.current.disconnect();}},[e,t,o]),r.current}function bc(e,t){let[o,r]=useState(()=>{try{let n=window.localStorage.getItem(e);return n?JSON.parse(n):t}catch(n){return console.log(n),t}});return [o,n=>{try{let i=n instanceof Function?n(o):n;r(i),window.localStorage.setItem(e,JSON.stringify(i));}catch(i){console.log(i);}}]}function xD({ref:e,onSelectionChange:t,onSelectionEnd:o,isDisabled:r}){let a=_t.useRef(null);usePress({ref:e,isDisabled:r,onPressEnd(){let i=ne(e.current).getSelection();i&&e.current?.contains(i.anchorNode)&&o?.(i);},onPressStart(){let n=ne(e.current);a.current=n.getSelection(),a.current&&a.current.removeAllRanges();}}),useEffect(()=>{let n=e.current;if(!n||r)return;function i(){let p=ne(n).getSelection();p&&e.current?.contains(p.anchorNode)&&t(p);}let s=he(n);return s.addEventListener("selectionchange",i),()=>{s.removeEventListener("selectionchange",i);}},[e,t,r]);}var sa=_t.createContext({breakpoints:breakpoints}),o_=({children:e,breakpoints:t=breakpoints})=>{let o=useMemo(()=>({breakpoints:t}),[t]);return jsx(sa.Provider,{value:o,children:e})};function Ee(e){let{breakpoints:t=breakpoints}=useContext(sa),o=useMemo(()=>({tablet:`screen and (min-width: ${t.tablet}px)`,desktop:`screen and (min-width: ${t.desktop}px)`}),[t]),r=useCallback(()=>{let i=ne(e??typeof window>"u"?void 0:e),s=i.matchMedia(o.tablet);return i.matchMedia(o.desktop).matches?"desktop":s.matches?"tablet":"mobile"},[e,o]),[a,n]=_t.useState(r);return Me(()=>{let i=ne(e),s=()=>{n(r());};return i.addEventListener("resize",s),s(),()=>{i.removeEventListener("resize",s);}},[e,r]),a}var d_=typeof window<"u";function xi(){return d_?document.body:null}var He=_t.createContext({container:null,portalContainer:null,shouldContainOverlays:false,isContainerPositioned:false,containerWidth:void 0,containerHeight:void 0}),u_=({children:e,container:t=xi(),portalContainer:o,shouldContainOverlays:r="auto"})=>{let a=Ee(),[n,i]=useState(),[s,l]=useState(),p=useMemo(()=>t===xi()||r==="never"?false:r==="always"?true:a!=="mobile",[r,a,t]),[c,u]=useState(false),m=aa();useEffect(()=>{if(!t||m)return;let y=ne(t).getComputedStyle(t),f=!!y.position&&y.position!=="static";u(f);let g=t.getBoundingClientRect();(g.width===0||g.height===0)&&console.error("FrameProvider: container does not have a width or height. Please ensure that the container is visible and has a width and height.");function v({width:h,height:x}){t&&(i(h),l(x));}let _=new ResizeObserver(h=>{for(let x of h)v({width:x.contentRect.width,height:x.contentRect.height});});return p&&(v({width:g.width,height:g.height}),_.observe(t)),t.dataset.shouldContainOverlays=p.toString(),()=>{_.disconnect(),t.dataset.shouldContainOverlays="";}},[t,m,p]);let d=useMemo(()=>({container:t,portalContainer:o||t||xi(),shouldContainOverlays:p,isContainerPositioned:c,containerWidth:n,containerHeight:s}),[t,o,p,c,n,s]);return jsx(He.Provider,{value:d,children:jsx(oa,{portalContainer:d.portalContainer||void 0,children:e})})};function ye(e){let t=useContext(vi),{portalContainer:o}=useContext(He);return e||t||o||void 0}var hc=z({defaultClassName:"z9nup83",variantClassNames:{size:{xs:"z9nup84",sm:"z9nup85"}},defaultVariants:{},compoundVariants:[]}),xc="z9nup80",Yt="z9nup82",Cc="z9nup86";function Ci(e=typeof window>"u"?void 0:window){let[t,o]=useState("light"),[r,a]=useState(false),[n,i]=useState(false),[s,l]=useState(false);return useEffect(()=>{if(!e)return;let p=e.matchMedia("(prefers-color-scheme: dark)"),c=u=>{o(u.matches?"dark":"light");};return p.matches&&o("dark"),p.addEventListener("change",c),()=>{p.addEventListener("change",c);}},[e]),useEffect(()=>{if(!e)return;let p=e.matchMedia("(prefers-contrast: more)"),c=u=>{a(u.matches);};return a(p.matches),p.addEventListener("change",c),()=>{p.addEventListener("change",c);}},[e]),useEffect(()=>{if(!e)return;let p=e.matchMedia("(prefers-reduced-motion: reduce)"),c=u=>{i(u.matches);};return p.matches&&i(true),p.addEventListener("change",c),()=>{p.addEventListener("change",c);}},[e]),useEffect(()=>{if(!e)return;let p=e.matchMedia("(prefers-reduced-transparency: reduce)"),c=u=>{l(u.matches);};return p.matches&&l(true),p.addEventListener("change",c),()=>{p.addEventListener("change",c);}},[e]),{colorScheme:t,highContrast:r,reducedMotion:n,transparency:s}}var Xt=createContext({theme:lightTheme,setTheme:()=>{},shouldHandleVirtualKeyboard:true});var Pc="var(--hj25q10)";var ca={LIGHT:{name:"light",theme:lightTheme},DARK:{name:"dark",theme:darkTheme}},da=_t.forwardRef(({theme:e="system",children:t,setTheme:o,onThemeChange:r,className:a,style:n,UNSAFE_domProps:i,"data-block-id":s,"data-block-class":l,reducedMotion:p="user",shouldHandleVirtualKeyboard:c=true},u)=>{let{direction:m}=useLocale(),{colorScheme:d,reducedMotion:b,highContrast:y,transparency:f}=Ci(),{name:g,theme:v}=useMemo(()=>{switch(e){case "system":return d==="light"?ca.LIGHT:ca.DARK;case "light":return ca.LIGHT;case "dark":return ca.DARK;default:return {name:"custom",theme:e}}},[d,e]),_=Ee(),h={"data-theme":g,"data-block-id":s,"data-block-class":l,"data-reduced-motion":p==="user"?b:p==="always","data-high-contrast":y,"data-transparency":f,"data-device":_},x=useMemo(()=>({theme:v,setTheme:w=>{o?.(w),r?.(w);},shouldHandleVirtualKeyboard:c}),[v,o,r,c]);return useEffect(()=>{o&&console.warn("ThemeProvider: The `setTheme` prop is deprecated and will be removed in a future version of Baseline UI. Use the `onThemeChange` prop instead.");},[o]),jsx(Xt.Provider,{value:x,children:jsx(MotionConfig,{reducedMotion:p,children:jsx("div",{...mergeProps(i,h),className:classNames(xc,"BaselineUI-ThemeProvider",a),style:{...assignInlineVars(themeVars,v),...assignInlineVars({[Pc]:m==="rtl"?"-1":"1"}),...n},ref:u,children:t})})})});da.displayName="ThemeProvider";function PM(){MotionGlobalConfig.skipAnimations=true;}function kM(){MotionGlobalConfig.skipAnimations=false;}var Pe=_t.forwardRef(({className:e,style:t,children:o,"data-block-id":r,"data-block-class":a,portalContainer:n,...i},s)=>{let{theme:l,shouldHandleVirtualKeyboard:p}=useContext(Xt),c=ye();return jsx(Overlay,{...i,portalContainer:n??c,children:jsx(da,{ref:s,theme:l,shouldHandleVirtualKeyboard:p,style:t,className:classNames("BaselineUI-Portal",e),"data-block-id":r,"data-block-class":a,children:o})})});Pe.displayName="Portal";var J=_t.forwardRef(({children:e,placement:t="bottom",delay:o=1e3,closeDelay:r=500,variant:a="default",size:n="md",includeArrow:i=true,portalContainer:s,className:l,style:p,"data-block-id":c,"data-block-class":u,...m},d)=>{let b=_t.useRef(null),y=_t.useRef(null),f=!m.text||m.isDisabled,g=useTooltipTriggerState({...m,delay:o,closeDelay:r,isDisabled:f}),{triggerProps:v,tooltipProps:_}=useTooltipTrigger({...m,isDisabled:f,delay:o,closeDelay:r},g,b),h=ye(s),{overlayProps:x,arrowProps:w,placement:C,updatePosition:I}=useOverlayPosition({arrowSize:i?13:0,targetRef:b,arrowBoundaryOffset:i?8:0,offset:i?12:2,overlayRef:y,placement:t,isOpen:g.isOpen,...m});nc({ref:y,threshold:1,onIntersect:I,isDisabled:!g.isOpen}),ic({ref:b,onResize:I,isDisabled:!g.isOpen});let P=_t.isValidElement(e)?jsx(FocusableProvider,{...v,ref:b,children:e}):typeof e=="function"?e({triggerProps:v,triggerRef:b}):null;return jsxs(Fragment,{children:[P,g.isOpen?jsx(Pe,{disableFocusManagement:true,portalContainer:h,className:l,style:p,"data-block-id":c,"data-block-class":u,children:jsx(gi,{ref:M(d,y),state:g,arrowProps:w,overlayProps:x,placement:C,tooltipProps:_,variant:a,size:n,includeArrow:i,children:m.text})}):null]})});J.displayName="Tooltip";var ma=_t.forwardRef(({elementType:e,children:t,...o},r)=>{let a=oe(r),{focusableProps:n}=useFocusable(o,a);return jsx(e??"div",{ref:a,...n,children:t})});ma.displayName="Focusable";var H_={xxs:8,xs:12,sm:16,md:20,lg:24},L=_t.forwardRef((e,t)=>{let o=oe(t),{tooltipProps:r}=Yr(e,o);return r?jsx(J,{...r,children:jsx(wi,{...e,ref:o})}):jsx(wi,{...e,ref:o})});L.displayName="ActionIconButton";var wi=_t.forwardRef(({className:e,style:t,icon:o,size:r="md",variant:a="primary",UNSAFE_NON_INTERACTIVE:n,elementType:i=n?"div":"button",...s},l)=>{let p=s["aria-label"],c=s["aria-labelledby"];useEffect(()=>{!p&&!c&&console.warn("An `ActionIconButton` requires an aria-label or aria-labelledby prop.");},[p,c]);let{buttonProps:u,isPressed:m,ref:d,isFocusVisible:b,isFocused:y,isHovered:f,uiStateOptions:g}=Xr({...s,elementType:i}),v=filterTruthyValues({"data-block-id":s["data-block-id"],"data-block-class":s["data-block-class"],"data-focused":y,"data-focus-visible":b,"data-disabled":s.isDisabled,"data-hovered":f,"data-pressed":m});return jsxs(i,{...mergeProps(u,v),className:classNames($p({variant:a,size:r,isDisabled:!!s.isDisabled,isFocusVisible:b,isHovered:f}),"BaselineUI-ActionIconButton",typeof e=="function"?e(g):e),ref:M(l,d),style:typeof t=="function"?t(g):t,...n&&{tabIndex:void 0,role:void 0,"aria-label":void 0,"aria-labelledby":void 0,"aria-disabled":void 0},children:[jsx(o,{role:"presentation",size:H_[r]}),a==="popover"&&jsx(CaretDownIcon,{size:8,className:Gr})]})});wi.displayName="ActionIconButtonCore";var Ve=_t.forwardRef(({className:e,style:t,labelPosition:o="top",variant:r="primary",showStepper:a=true,...n},i)=>{let s=_t.useRef(null),{locale:l}=useLocale(),p=useNumberFieldState({...n,locale:l}),{hoverProps:c,isHovered:u}=useHover({isDisabled:n.isDisabled}),{focusProps:m,isFocusVisible:d,isFocused:b}=useFocusRing(),{labelProps:y,decrementButtonProps:f,inputProps:g,incrementButtonProps:v,groupProps:_,descriptionProps:h,errorMessageProps:x}=useNumberField(n,p,s),w=useMemo(()=>n.isReadOnly?ReadOnlyIcon:n.isInvalid?ErrorCircleFilledIcon:null,[n.isInvalid,n.isReadOnly]),C=Ce({description:n.description,errorMessageProps:x,descriptionProps:h,errorMessage:n.errorMessage,labelPosition:o,isDisabled:n.isDisabled}),I=filterTruthyValues({"data-disabled":n.isDisabled,"data-readonly":n.isReadOnly,"data-hovered":u,"data-focused":b,"data-focus-visible":d,"data-invalid":n.isInvalid,"data-block-id":n["data-block-id"],"data-block-class":n["data-block-class"]});return jsxs("div",{style:t,className:classNames(tt({labelPosition:o}),"BaselineUI-NumberInput",e),...I,ref:i,children:[n.label?jsxs("div",{className:et({labelPosition:o,hasMessage:!!C}),children:[jsx("label",{...y,className:Kt,children:n.label}),o==="start"&&C]}):null,jsxs("div",{className:classNames({[Yt]:n.isDisabled}),children:[jsxs("div",{...mergeProps(_,c),className:classNames(Gt({isHovered:u,isDisabled:!!n.isDisabled,isReadOnly:!!n.isReadOnly,validationState:n.isInvalid?"error":"valid",isFocused:b,variant:r}),{[Qp]:o==="start"},"BaselineUI-NumberInput-Container"),children:[jsx("input",{...mergeProps(g,m),ref:s,className:classNames("BaselineUI-NumberInput-Input",ea({isDisabled:n.isDisabled,labelPosition:o}))}),w?jsx(w,{className:qt({validationState:"error",isReadOnly:n.isReadOnly}),size:16}):null,a?jsxs("div",{className:Jp({isHoveredOrFocused:u||b,isInteractive:!n.isReadOnly&&!n.isDisabled}),children:[jsx(L,{variant:"secondary",size:"xxs",icon:MinusIcon,...f,className:"BaselineUI-NumberInput-DecrementButton"}),jsx(q,{style:{height:16},orientation:"vertical"}),jsx(L,{variant:"secondary",size:"xxs",icon:PlusIcon,...v,className:"BaselineUI-NumberInput-DecrementButton"})]}):null]}),o==="top"&&C]})]})});Ve.displayName="NumberInput";var Qt=_t.forwardRef(({className:e,style:t,onChange:o,onChangeEnd:r,numberFormatOptions:a,isDisabled:n,step:i,minValue:s,maxValue:l,value:p,"aria-label":c,"aria-labelledby":u,"aria-details":m,"aria-describedby":d,"data-block-id":b,"data-block-class":y,defaultValue:f,isReadOnly:g,label:v,id:_,includeNumberInput:h},x)=>{let w=_t.useRef(null),C={onChange:o===void 0?void 0:R=>{o(R[0]);},isDisabled:n||g,step:i,minValue:s,maxValue:l,onChangeEnd:r===void 0?void 0:R=>{r(R[0]);},value:p===void 0?void 0:[p],defaultValue:f===void 0?void 0:[f],"aria-label":c,"aria-labelledby":u,"aria-details":m,"aria-describedby":d,id:_,label:v},I=useNumberFormatter(a),P=useSliderState({...C,numberFormatter:I}),{trackProps:S,groupProps:k,labelProps:T}=useSlider(C,P,w),$=jsx(Ve,{variant:"ghost",showStepper:false,"aria-label":c,"aria-labelledby":T.id,value:P.getThumbValue(0),formatOptions:a,onChange:R=>{P.setThumbValue(0,R);},style:{width:55,textAlign:"right",flexShrink:0}});return jsxs("div",{...k,style:t,"data-block-id":b,"data-block-class":y,className:classNames(Up,"BaselineUI-Slider",e),children:[v?jsxs("div",{className:Kp,children:[jsx("label",{...T,className:classNames(Gp({isDisabled:n,hasNumberInput:!!h}),"BaselineUI-Slider-Label"),children:v}),h?$:null]}):null,jsxs("div",{className:qp,children:[jsx("div",{...S,className:classNames(Xp,"BaselineUI-Slider-Track"),ref:M(w,x),"data-testid":"track",children:jsx(pz,{state:P,trackRef:w,isDisabled:n,isReadOnly:g})}),h&&!v?$:null]})]})});Qt.displayName="Slider";function pz({state:e,trackRef:t,isDisabled:o,isReadOnly:r}){let a=_t.useRef(null),{thumbProps:n,inputProps:i,isDragging:s}=useSliderThumb({trackRef:t,inputRef:a},e),{focusProps:l,isFocused:p,isFocusVisible:c}=useFocusRing(),{hoverProps:u,isHovered:m}=useHover({isDisabled:o}),d=filterTruthyValues({"data-disabled":o,"data-readonly":r,"data-hovered":m,"data-focus-visible":c,"data-dragging":s,"data-focused":p});return jsxs(Fragment,{children:[jsx("div",{className:classNames(Zp({isDisabled:o,isFocusVisible:c,active:s,isHovered:m}),"BaselineUI-Slider-TrackHighlight"),style:{width:n.style?.left},"data-testid":"track-highlight"}),jsxs("div",{...mergeProps(n,u,d),className:classNames(Yp,"BaselineUI-Slider-ThumbHandle"),"data-testid":"thumb",children:[jsx("div",{className:classNames(Wp({isDisabled:o,isFocusVisible:c,active:s,isReadOnly:r,isHovered:m}),"BaselineUI-Slider-Thumb")}),jsx(VisuallyHidden,{children:jsx("input",{ref:a,...mergeProps(i,l)})})]})]})}var Mc=z({defaultClassName:"_1tkzayn0 _1yep5z6dy",variantClassNames:{size:{sm:"_1tkzayn1",md:"_1tkzayn2",lg:"_1tkzayn3"},type:{subtitle:"_1yep5z610x",title:"_1yep5z610x",label:"_1yep5z610y",value:"_1yep5z610y",helper:"_1yep5z610z",body:"_1yep5z610x"}},defaultVariants:{},compoundVariants:[[{type:"title",size:"sm"},"_1yep5z61lj"],[{type:"title",size:"md"},"_1yep5z61lm"],[{type:"title",size:"lg"},"_1yep5z61lp"],[{type:"body",size:"sm"},"_1yep5z61m9"],[{type:"body",size:"md"},"_1yep5z61mc"],[{type:"body",size:"lg"},"_1yep5z61mc"],[{type:"subtitle",size:"sm"},"_1yep5z61m5"],[{type:"subtitle",size:"md"},"_1yep5z61m8"],[{type:"subtitle",size:"lg"},"_1yep5z61m8"],[{type:"label",size:"md"},"_1yep5z61m7"],[{type:"label",size:"lg"},"_1yep5z61m7"],[{type:"value",size:"md"},"_1yep5z61m7"],[{type:"value",size:"lg"},"_1yep5z61m7"],[{type:"helper",size:"sm"},"_1yep5z61m1"]]});var te=_t.forwardRef(({elementType:e="span",type:t="title",children:o,size:r="md",...a},n)=>jsx(e,{...a,className:classNames(Mc({size:r,type:t}),"BaselineUI-Text",a.className),ref:n,children:o}));te.displayName="Text";var Nc=z({defaultClassName:"siobe20 _1yep5z6ao _1yep5z6ap _1yep5z6aq _1yep5z6bc _1yep5z6bd _1yep5z6be _1yep5z6d7 _1yep5z6m1 _1yep5z6lz _1yep5z6h4 _1yep5z6lq _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j4 _1yep5z6j5 _1yep5z6j6",variantClassNames:{background:{subtle:"_1yep5z6124",medium:"_1yep5z6125"},isFocusVisible:{true:"_1yep5z617u _1yep5z617w _1yep5z617x _1yep5z6140"}},defaultVariants:{},compoundVariants:[]}),Ec="siobe24";var ya=_t.forwardRef(({className:e,style:t,children:o,background:r="medium",title:a,action:n,"data-block-id":i,"data-block-class":s,onCloseRequest:l,contentStyle:p,contentClassName:c,...u},m)=>{let{formatMessage:d}=A(),b=_t.useRef(null),{dialogProps:y,titleProps:f}=useDialog(u,b),{focusProps:g,isFocusVisible:v}=useFocusRing();return jsxs("div",{...mergeProps(y,g),className:classNames(Nc({background:r,isFocusVisible:v}),"BaselineUI-Drawer",e),"data-block-id":i,"data-block-class":s,style:t,ref:M(m,b),children:[jsxs(D,{paddingLeft:"lg",paddingRight:"sm",backgroundColor:"background.primary.subtle",display:"flex",justifyContent:"space-between",alignItems:"center",gap:"lg",className:Ec,children:[jsx(te,{type:"title",size:"sm",...f,className:Cc,children:a}),jsxs(D,{children:[n?jsx(L,{...n,variant:"secondary"}):null,jsx(L,{variant:"secondary",size:"md",icon:XIcon,onPress:l,"aria-label":d(vz.close)})]})]}),jsx(q,{variant:r==="subtle"?"primary":"secondary"}),jsx(D,{display:"flex",flexDirection:"column",flex:1,style:{overflow:"auto",...p},className:classNames(c,"BaselineUI-Drawer-Content"),children:o})]})});ya.displayName="Drawer";var vz=W({close:{id:"close",defaultMessage:"Close"}});var Ac="aml2vl8 _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6ij _1yep5z6ik _1yep5z6il",Fc="_1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7",jc=z({defaultClassName:"aml2vl3 _1yep5z6lg _1yep5z6lh _1yep5z6lj _1yep5z6li _1yep5z6is _1yep5z6it _1yep5z6iu",variantClassNames:{enableDrawer:{false:"_1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6kd _1yep5z6ke _1yep5z6kf",true:"aml2vl5"},shouldContainOverlays:{true:"aml2vl6",false:"aml2vl7"}},defaultVariants:{},compoundVariants:[]}),Oc=z({defaultClassName:"aml2vl0 _1yep5z6lg _1yep5z6lh _1yep5z6lj _1yep5z6li _1yep5z6gb",variantClassNames:{shouldContainOverlays:{true:"aml2vl1",false:"aml2vl2"}},defaultVariants:{},compoundVariants:[]});var xt=_t.createContext({state:null,triggerProps:{},overlayProps:{}}),Le=({children:e,...t})=>{let o=useOverlayTriggerState(t),{triggerProps:r,overlayProps:a}=useOverlayTrigger({type:"dialog"},o),n=useMemo(()=>({state:o,triggerProps:r,overlayProps:a}),[o,r,a]);return jsx(xt.Provider,{value:n,children:e})};Le.displayName="Modal";function Gc(e,t,o){let[r,a]=useState({}),n=useRef(false),[i,s]=useState(null),{container:l,shouldContainOverlays:p,isContainerPositioned:c,containerHeight:u,portalContainer:m}=useContext(He);useEffect(()=>{if(!e)return;let f=ne(e),g=f.visualViewport,v=()=>{let _=o?g?.height??f.innerHeight:f.innerHeight,h=f.innerHeight-_;if(n.current=o?h>60:false,n.current){let x=getActiveElement(e);x&&isInputThatOpensKeyboard(x)&&x.scrollIntoView({behavior:"smooth",block:"center"});}if(t)a({maxHeight:(_||0)*.8,bottom:h});else {let x=`${_||0}px`,w=p?`min(${x}, ${u?u+"px":x})`:x;a({maxHeight:`calc(${w} - (2 * ${themeVars.spacing.xl} + env(safe-area-inset-top) + env(safe-area-inset-bottom)))`,top:n.current?`calc(env(safe-area-inset-top) + ${themeVars.spacing.xl})`:void 0});}};return v(),g?.addEventListener("resize",v),f.addEventListener("resize",v),()=>{g?.removeEventListener("resize",v),f.removeEventListener("resize",v);}},[e,t,p,o,u]);let d=m&&!l?.contains(m);useEffect(()=>{if(!l||!p||c&&!d)return;let f=()=>{l&&s(getAbsoluteBounds(l));};f();let g=new ResizeObserver(()=>{f();});return g.observe(l),()=>{g.disconnect();}},[l,p,c,d]);let b=useMemo(()=>({...r,overflow:"auto",position:"relative"}),[r]),y=useMemo(()=>{if(!t&&n.current)return {alignItems:"flex-start"};if(p&&(!c||d)){let f=i||(l?getAbsoluteBounds(l):{x:0,y:0,height:0,width:0});return {position:"absolute",left:f.x,top:f.y,height:f.height,width:f.width}}return {}},[t,n.current,l,c,p,i,d]);return {dialogStyle:b,containerStyle:y}}var Ti=_t.createContext({isDrawer:false,closeDrawer:()=>{},dialogStyle:{},setDialogElement:()=>{},isWithinModal:false}),Si=_t.createContext({setIsPopoverSafelyClosed:()=>{}}),Ue=({children:e,className:t,style:o,isDismissable:r=true,isKeyboardDismissDisabled:a=false,portalContainer:n,disableAnimation:i,enableDrawer:s=false,"data-block-id":l,"data-block-class":p,shouldCloseOnInteractOutside:c,shouldAnimateOnMount:u=true})=>{let{state:m}=_t.useContext(xt),[d,b]=_t.useState(true),y=_t.useRef(null),[f,g]=_t.useState(null),{shouldHandleVirtualKeyboard:v}=useContext(Xt),{shouldContainOverlays:_,container:h,portalContainer:x}=useContext(He),w=Ee(),C=typeof s=="boolean"&&s||s==="auto"&&w==="mobile";invariant(m,"ModalContent must be a child of Modal");let I=_t.useRef(null),P=typeof r=="function"?r(C):r,S=typeof a=="function"?a(C):a,{modalProps:k,underlayProps:T}=useModalOverlay({isDismissable:d&&P,shouldCloseOnInteractOutside:H=>{let Q=n||x;return !h?.contains(H)&&_&&!Q?.contains(H)?false:c?.(H)??true},isKeyboardDismissDisabled:S},m,I),{dialogStyle:$,containerStyle:R}=Gc(f,C,v),N=useMemo(()=>({isDrawer:C,closeDrawer:m.close,dialogStyle:$,dialogRef:y,setDialogElement:g,isWithinModal:true}),[C,m.close,$,y,g]),E=useMemo(()=>({setIsPopoverSafelyClosed:b}),[b]),F={duration:.3,type:"tween",ease:"easeOut"},B={type:"spring",duration:.3},j={open:{opacity:1,transform:C?"translateY(0%)":"scale(1)"},closed:i?{opacity:1,transform:C?"translateY(0%)":"scale(1)"}:{opacity:0,transform:C?"translateY(100%)":"scale(0.95)"}};return jsx(AnimatePresence,{initial:u&&!i,children:m.isOpen?jsx(Ti.Provider,{value:N,children:jsx(Si.Provider,{value:E,children:jsxs(Pe,{className:classNames(jc({enableDrawer:C,shouldContainOverlays:_}),t),"data-block-id":l,"data-block-class":p,style:{...o,...R},portalContainer:n,children:[jsx(motion.div,{...T,variants:{open:{opacity:1},closed:{opacity:i?1:0}},initial:"closed",animate:"open",exit:"closed","data-testid":"underlay",transition:F,className:classNames(Oc({shouldContainOverlays:_}),"BaselineUI-Modal-Underlay")}),jsx(motion.div,{...k,ref:I,"data-drawer":C,className:classNames(C?Ac:Fc,"BaselineUI-Modal-Content"),variants:j,transition:C?F:B,initial:"closed",animate:"open",exit:"closed",children:typeof e=="function"?e(m):e})]})})}):null})};var Zc="var(--cjv3et0)",Jc=z({defaultClassName:"cjv3et1 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6g1 _1yep5z6lz _1yep5z6m1",variantClassNames:{size:{sm:"cjv3et2",md:"cjv3et3",lg:"cjv3et4",content:"cjv3et5"},variant:{primary:"_1yep5z6137",ghost:"cjv3et7"},overlayType:{modal:"cjv3et8",popover:"cjv3et9"},isDrawer:{true:"cjv3eta _1yep5z6yi _1yep5z6yj _1yep5z6yk _1yep5z6z6 _1yep5z6z7 _1yep5z6z8 _1yep5z617q"},isFocusVisible:{true:"_1yep5z61q3 _1yep5z61tx _1yep5z61tz _1yep5z61u1"}},defaultVariants:{},compoundVariants:[]});var Mi=_t.createContext({titleProps:{}}),ke=_t.forwardRef(({children:e,className:t,style:o,inheritDrawer:r,size:a="md",variant:n="primary","data-block-id":i,"data-block-class":s,drawerBackground:l,...p},c)=>{let u=_t.useRef(null),m=_t.useRef(null),{containerWidth:d,shouldContainOverlays:b}=useContext(He),{isDrawer:y,closeDrawer:f,dialogStyle:g,setDialogElement:v,isWithinModal:_}=useContext(Ti),[h,x]=_t.useState(""),{focusProps:w,isFocusVisible:C}=useFocusRing();useLayoutEffect(()=>{let k=m.current?.getRootNode(),T=p["aria-label"]||"";p["aria-labelledby"]&&(T=k?.querySelector(`#${p["aria-labelledby"].replaceAll(":",String.raw`\:`)}`)?.textContent||""),x(T);},[p]);let{dialogProps:I,titleProps:P}=useDialog(p,u),S=useMemo(()=>({titleProps:P}),[P]);return y&&r?jsx(ya,{title:h,onCloseRequest:f,className:t,style:g,...p,"data-drawer":true,"data-block-id":i,"data-block-class":s,ref:M(m,c,k=>{v(k);}),background:l,children:e}):jsx(Mi.Provider,{value:S,children:jsx("section",{...mergeProps(I,w),"data-block-id":i,"data-block-class":s,"data-focus-visible":C,"data-overlay-type":_?"modal":"popover",ref:M(u,c,k=>{v(k);}),style:{...g,...o,...assignInlineVars({[Zc]:d&&b?`${d}px`:"100vw"})},className:classNames(Jc({size:y?"content":a,variant:n,isDrawer:y,isFocusVisible:C,overlayType:_?"modal":"popover"}),"BaselineUI-Dialog",t),children:e})})});ke.displayName="Dialog";var ed=_t.forwardRef(({children:e,className:t,style:o},r)=>{let{titleProps:a}=useContext(Mi);return _t.isValidElement(e)?_t.cloneElement(e,{...a,ref:r,className:classNames(e.props.className,t),style:{...e.props.style,...o}}):jsx("h3",{...a,ref:r,className:t,style:o,children:e})});ed.displayName="DialogTitle";var{color:eo}=themeVars,od=({placement:e,arrowProps:t})=>jsxs(Fragment,{children:[jsxs("svg",{className:classNames(Sp({placement:e}),"BaselineUI-PopoverContent-Arrow"),...t,style:{...t.style,position:"absolute"},width:"15",height:"9",viewBox:"0 0 15 9",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M.019 0h1.228l6.272 7.237L13.791 0h1.228v1h-.772L7.519 8.763.791 1H.019V0Z",fill:eo.border.medium}),jsx("path",{d:"M7.504 6.492 2.248.488h10.511L10.132 3.49 7.504 6.492Z",fill:eo.background.primary.subtle,stroke:eo.background.primary.subtle})]}),jsxs("svg",{className:classNames(Dp({placement:e}),"BaselineUI-PopoverContent-Arrow-Focused"),width:"15",height:"11",viewBox:"0 0 15 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,style:{...t.style,position:"absolute"},children:[jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.543371 2H0V0H1.45663L7.5 6.97312L13.5434 0H15V2H14.4566L7.5 10.0269L0.543371 2Z",fill:eo.border.interactive.enabled}),jsx("path",{d:"M7.504 6.492 2.248.488h10.511L10.132 3.49 7.504 6.492Z",fill:eo.background.primary.subtle,stroke:eo.background.primary.subtle})]})]});var Bi=_t.forwardRef(({portalClassName:e,portalStyle:t,className:o,style:r,state:a,overlayProps:n,underlayClassName:i,children:s,includeArrow:l=false,offset:p=2,portalContainer:c,contentContainerClassName:u,contentContainerStyle:m,setPopoverStyle:d,"data-block-id":b,"data-block-class":y,popoverContainerRef:f,...g},v)=>{let _=oe(f),h=ye(c),x=l?8:0,{underlayProps:w,popoverProps:C,placement:I,arrowProps:P}=usePopover({...g,offset:p+x,popoverRef:_,containerPadding:g.containerPadding||0},a);delete C.style?.position;let S=I==="center"?"bottom":I,k=useMemo(()=>({isOpen:a.isOpen}),[a.isOpen]),{transitionProps:T}=ta({placement:I}),$=useMemo(()=>({...C.style,...assignInlineVars({[Bp]:`${g.triggerRef?.current?.offsetWidth}px`}),...ci(r,k)}),[C.style,g.triggerRef,r,k]);return useEffect(()=>{d({left:C.style?.left,top:C.style?.top,zIndex:C.style?.zIndex});},[C.style?.left,C.style?.top,C.style?.zIndex,d]),jsxs(Pe,{portalContainer:h,style:t,className:e,ref:v,"data-block-id":b,"data-block-class":y,children:[!g.isNonModal&&jsx("div",{...w,className:classNames(Lp,Hr(i,k),"BaselineUI-Popover-Underlay")}),jsxs(motion.div,{...$e(C,T),style:$,ref:_,className:classNames(Mp,Hr(o,k),"BaselineUI-Popover-ContentContainer"),"data-placement":["top","bottom","left","right"].filter(R=>I?.includes(R)),children:[l?jsx(od,{placement:S,arrowProps:P}):null,jsx(DismissButton,{onDismiss:a.close}),jsx("div",{...n,style:ci(m,k),className:classNames(Np,Hr(u,k),"BaselineUI-Popover-Content"),children:typeof s=="function"?s(a):s}),jsx(DismissButton,{onDismiss:a.close})]})]})});Bi.displayName="PopoverContentCore";var sd=({children:e,isOpen:t,popoverContentRef:o,portalContainer:r=document.body,style:a})=>{let[n,i]=useState(false),[s,l]=useState(null),p=useRef(null),{setIsPopoverSafelyClosed:c}=useContext(Si);useEffect(()=>{t?(i(true),p.current&&clearTimeout(p.current)):p.current=setTimeout(()=>{i(false);},300);},[t]),useEffect(()=>()=>{p.current&&clearTimeout(p.current);},[]);let u=o.current;return useEffect(()=>{u&&l(u.getBoundingClientRect());},[u]),useEffect(()=>{c(!n);},[n,c]),jsxs(Fragment,{children:[n?Zz.createPortal(jsx("div",{style:{position:"absolute",left:a?.left,top:a?.top,width:s?.width,height:s?.height,zIndex:a?.zIndex?+a.zIndex-1:void 0},className:"BaselineUI-Popover-ClickPreventionLayer"}),r):null,e]})};var ie=_t.forwardRef(({state:e,overlayProps:t,portalContainer:o,...r},a)=>{let{state:n,overlayTriggerAria:{overlayProps:i},triggerRef:s}=useContext(Oo),[l,p]=useState({}),c=ye(o),u=e||n,m=r.triggerRef||s,d=t||i;invariant(m);let b=_t.useRef(null);return jsx(sd,{isOpen:u?.isOpen??false,popoverContentRef:b,portalContainer:c,style:l,children:u?.isOpen?jsx(Bi,{ref:a,...r,triggerRef:m,overlayProps:d,state:u,portalContainer:c,setPopoverStyle:p,popoverContainerRef:b}):null})});ie.displayName="PopoverContent";var to=({icon:e,tooltip:t,label:o,...r})=>{let{tooltipProps:a}=xe({label:o,tooltip:t,offset:9});return jsx(J,{...a,children:({triggerProps:n,triggerRef:i})=>jsx(D,{display:"inline-flex",...n,ref:i,children:jsx(e,{...r})})})};var ud=_t.forwardRef(({className:e,style:t,onChange:o,"data-block-id":r,icon:a,formatValue:n=m=>m,tooltip:i=true,iconTooltip:s=true,popoverContentProps:l,isDisabled:p,...c},u)=>{let m=oe(u),[d,b]=useControlledState(c.value,c.defaultValue||0,o),[y,f]=_t.useState(false),{keyboardProps:g}=useKeyboard({onKeyDown:x=>{(x.key==="Enter"||x.key==="Escape")&&f(false);}}),{tooltipProps:v}=xe({label:c["aria-label"],tooltip:i}),_=n(d||0),h=v?.isDisabled||c["aria-label"]?`${c["aria-label"]}, ${_}`:_.toString();return jsxs(D,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:classNames("BaselineUI-IconSlider",e),"data-block-id":r,style:t,ref:m,children:[a?jsx(to,{icon:a,label:c["aria-label"],tooltip:s,"aria-hidden":"true",size:24,className:sprinkles({color:"icon.primary"})}):null,jsxs(je,{type:"dialog",isOpen:y,onOpenChange:f,children:[jsx(Oe,{children:jsx(J,{...v,children:jsx(K,{label:_,variant:"popover","aria-label":h,isDisabled:p,style:{fontVariantNumeric:"tabular-nums",minWidth:68,justifyContent:"space-between"}})})}),jsx(ie,{placement:"bottom start",...l,children:jsx(ke,{size:"content","aria-label":h,children:jsx(FocusScope,{autoFocus:true,children:jsx(D,{paddingY:"sm",paddingX:"lg",marginY:"md",style:{width:215},...g,children:jsx(Qt,{...c,onChange:x=>{b(x),o?.(x);},value:d})})})})})]})]})});ud.displayName="IconSlider";var md=z({defaultClassName:"bpklwa7",variantClassNames:{isReadOnly:{true:"bpklwa8"},isDisabled:{true:"bpklwa9"},isSelected:{true:"bpklwaa"},isFocused:{true:"bpklwab"}},defaultVariants:{},compoundVariants:[[{isSelected:true,isDisabled:false,isReadOnly:false},"bpklwac"]]}),fd=z({defaultClassName:"bpklwae",variantClassNames:{isDisabled:{true:"bpklwaf"},isSelected:{true:"bpklwag"},isReadOnly:{true:"bpklwah"}},defaultVariants:{},compoundVariants:[]}),yd="bpklwad",bd=z({defaultClassName:"bpklwa0",variantClassNames:{labelPosition:{top:"bpklwa1",left:"bpklwa2"}},defaultVariants:{},compoundVariants:[]}),gd="bpklwa6",vd=z({defaultClassName:"bpklwa3",variantClassNames:{labelPosition:{top:"bpklwa4",left:"bpklwa5"}},defaultVariants:{},compoundVariants:[]});var xd=_t.forwardRef(({className:e,label:t,labelPosition:o="top",statusLabel:r,style:a,"data-block-id":n,"data-block-class":i,...s},l)=>{let p=_t.useRef(null),c=useToggleState(s),{inputProps:u,isPressed:m}=useSwitch({...s,children:t},c,p),{isFocusVisible:d,focusProps:b}=useFocusRing(),{hoverProps:y,isHovered:f}=useHover({isDisabled:s.isDisabled}),g=filterTruthyValues({"data-block-id":n,"data-block-class":i,"data-focused":d,"data-disabled":s.isDisabled,"data-focus-visible":d,"data-selected":c.isSelected,"data-readonly":s.isReadOnly,"data-hovered":f,"data-pressed":m}),v=jsx("div",{className:classNames(md({isSelected:c.isSelected,isDisabled:!!s.isDisabled,isFocused:d,isReadOnly:!!s.isReadOnly}),"BaselineUI-Switch-Track"),children:jsx("div",{className:classNames(fd({isSelected:c.isSelected,isDisabled:s.isDisabled,isReadOnly:s.isReadOnly}),"BaselineUI-Switch-Knob"),"data-testid":"switch-knob"})});return jsxs("label",{...mergeProps(g,y),className:classNames(bd({labelPosition:o}),"BaselineUI-Switch",e),style:a,ref:l,children:[t?jsx("span",{className:classNames(yd,"BaselineUI-Switch-Label"),children:t}):null,jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(u,b),ref:p})}),r?jsxs("div",{className:vd({labelPosition:o}),children:[jsx("span",{className:classNames("BaselineUI-Switch-Status-Label",gd),children:c.isSelected?r.on:r.off}),v]}):v]})});xd.displayName="Switch";var Cd="_19n40yy9",Pd=z({defaultClassName:"_19n40yy0",variantClassNames:{size:{lg:"_19n40yy1",md:"_19n40yy2",sm:"_19n40yy3"},variant:{primary:"_19n40yy4",ghost:"_19n40yy5"},isFocused:{true:"_19n40yy6"},hasText:{true:"_19n40yy7"},isDisabled:{true:"_19n40yy8"}},defaultVariants:{},compoundVariants:[]});var Ph={sm:SearchIcon$1,md:SearchIcon,lg:SearchIcon},Id=_t.forwardRef(({className:e,size:t="md",variant:o="primary","data-block-id":r,"data-block-class":a,style:n,...i},s)=>{let l=_t.useRef(null),p=useSearchFieldState(i),{inputProps:c,clearButtonProps:u}=useSearchField({...i,"aria-haspopup":false,"aria-autocomplete":"none",type:"search"},p,l),{focusProps:m,isFocusVisible:d,isFocused:b}=useFocusRing({within:true,isTextInput:true}),y=Ph[t],f=t==="sm"?XIcon$1:XIcon$2,g=filterTruthyValues({"data-block-id":r,"data-block-class":a,"data-focused":b,"data-disabled":i.isDisabled,"data-focus-visible":d});return jsxs("div",{...g,className:classNames(Pd({size:t,isFocused:b,variant:o,hasText:!!p.value,isDisabled:i.isDisabled}),"BaselineUI-SearchInput",e),style:n,ref:s,children:[jsx(y,{size:t==="sm"?20:24}),jsx("input",{...mergeProps(c,m),className:Cd,ref:l}),p.value!==""&&jsx(L,{icon:f,...u,size:t==="sm"?"xs":"sm",variant:"secondary"})]})});Id.displayName="SearchInput";var Rd="xyd2ss1 _1yep5z6n6 _1yep5z6n7 _1yep5z6n8 _1yep5z6pi _1yep5z6pj _1yep5z6pk _1yep5z6qo _1yep5z6qp _1yep5z6qq _1yep5z6oc _1yep5z6od _1yep5z6oe _1yep5z6ru _1yep5z6rv _1yep5z6rw _1yep5z6u6 _1yep5z6u7 _1yep5z6u8 _1yep5z6vc _1yep5z6vd _1yep5z6ve _1yep5z6t0 _1yep5z6t1 _1yep5z6t2 _1yep5z6wo _1yep5z6wp _1yep5z6wq _1yep5z6xc _1yep5z6xd _1yep5z6xe _1yep5z6y0 _1yep5z6y1 _1yep5z6y2 _1yep5z6yo _1yep5z6yp _1yep5z6yq _1yep5z617v _1yep5z617u _1yep5z6143 _1yep5z617y _1yep5z6124",$d="xyd2ss0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z64l _1yep5z64m _1yep5z64n _1yep5z629 _1yep5z62a _1yep5z62b";var ji=({section:e,showSelectedIcon:t,state:o})=>{let{itemProps:r,groupProps:a,headingProps:n}=useMenuSection({heading:e.value?.title,"aria-label":e["aria-label"]});return jsxs(Fragment,{children:[e.key!==o.collection.getFirstKey()&&jsx(q,{elementType:"li"}),jsxs("li",{...r,children:[e.value?.title?jsx(VisuallyHidden,{children:jsx("span",{...n,children:e.value.title})}):null,jsx("ul",{...a,className:$d,children:[...e.childNodes].map(i=>(invariant(i.type==="item"),jsx(va,{item:i,state:o,showSelectedIcon:t},i.key)))})]})]})};ji.displayName="MenuSection";var va=({item:e,state:t,className:o,showSelectedIcon:r})=>{let a=_t.useRef(null),n=useMenuItem({key:e.key},t,a),{isFocusVisible:i,focusProps:s}=useFocusRing();return jsx(Fo,{item:e,liProps:mergeProps(n.menuItemProps,s,{className:o}),...n,isFocusVisible:i,ref:a,description:e.value?.keyboardShortcut,descriptionProps:n.keyboardShortcutProps,_state:t,showSelectedIcon:r})};va.displayName="MenuItem";var Sd=z({defaultClassName:"_1mdhlqv8",variantClassNames:{isOpen:{true:"_1mdhlqv9"}},defaultVariants:{},compoundVariants:[]}),rt="_1mdhlqvb cjv3et1 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6g1 _1yep5z6lz _1yep5z6m1 _1yep5z6137 cjv3et5",Dd=z({defaultClassName:"_1mdhlqv0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6eu _1yep5z6kj _1yep5z6kk _1yep5z6kl _1yep5z6dy",variantClassNames:{isFocused:{false:"_1mdhlqv1"},isOpen:{true:"_1mdhlqv2"},isDisabled:{true:"z9nup82 _1yep5z6ey"},isHovered:{true:"_1mdhlqv4"},variant:{primary:"_1mdhlqv5",ghost:"_1mdhlqv6"},isReadOnly:{true:"_1mdhlqv7"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isHovered:true,isReadOnly:false,isDisabled:false},"_1yep5z6h5"],[{isHovered:true,isReadOnly:false,isDisabled:false},"_1yep5z6la"]]}),Md="_1yep5z66x _1yep5z66y _1yep5z66z",Nd="_1mdhlqva _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z69i _1yep5z69j _1yep5z69k";var Hi=_t.forwardRef(({className:e,itemClassName:t,onContentKeyDown:o,...r},a)=>{let n=useTreeState(r),i=_t.useRef(null),{menuProps:s}=useMenu(r,n,i),{keyboardProps:l}=useKeyboard({onKeyDown:o});return jsx("ul",{...mergeProps(s,l),className:classNames(rt,Rd,e),ref:M(i,a),children:[...n.collection].map(p=>p.type==="section"?jsx(ji,{section:p,state:n,showSelectedIcon:r.selectionMode==="multiple"||r.selectionMode==="single"},p.key):jsx(va,{item:p,state:n,className:t,showSelectedIcon:r.selectionMode==="multiple"||r.selectionMode==="single"},p.key))})});Hi.displayName="MenuContent";var _a=_t.forwardRef(({defaultOpen:e,onOpenChange:t,isOpen:o,isDisabled:r,contentClassName:a,placement:n="bottom start",isNonModal:i,shouldFlip:s,shouldUpdatePosition:l,boundaryElement:p,crossOffset:c,offset:u,triggerLabel:m,renderTrigger:d=({buttonProps:g,ref:v})=>jsx(K,{...g,variant:"popover",ref:v}),portalContainer:b,...y},f)=>{let g=_t.useRef(null),v=ye(b),_=useMenuTriggerState({defaultOpen:e,isOpen:o,onOpenChange:t}),{menuTriggerProps:h,menuProps:x}=useMenuTrigger({isDisabled:r,type:"menu"},_,g),w=ce(),C=useMemo(()=>mergeProps(h,{isDisabled:r,isSelected:_.isOpen,className:"BaselineUI-Menu-Trigger",label:typeof m=="function"?m(_.isOpen):m}),[h,r,_.isOpen,m]);return useEffect(()=>{!m&&!d&&console.warn("The `triggerLabel` prop is required when no `renderTrigger` or `children` is provided.");},[d,m]),jsxs(Fragment,{children:[d({buttonProps:C,ref:g}),_.isOpen?jsx(ie,{triggerRef:g,state:_,placement:n,isNonModal:i,shouldFlip:s,shouldUpdatePosition:l,boundaryElement:p,crossOffset:c,offset:u||2,className:"BaselineUI-Menu-Popover",portalContainer:v,children:jsx(Hi,{className:a,...x,...y,ref:f,autoFocus:_.focusStrategy||"first",children:w})}):null]})});_a.displayName="Menu";var za=z({defaultClassName:"_13f0naj0",variantClassNames:{variant:{default:"_13f0naj1",inline:"_13f0naj2"},isHovered:{true:"_13f0naj3"},isFocusVisible:{true:"_13f0naj4"},isDisabled:{true:"_13f0naj5"},size:{sm:"_13f0naj6",md:"_13f0naj7",lg:"_13f0naj8"},type:{body:"_13f0naj9",label:"_13f0naja"},isActive:{true:"_13f0najb"}},defaultVariants:{},compoundVariants:[[{isActive:true,isDisabled:false},"_13f0najc"],[{type:"body",size:"sm"},"_13f0najd"],[{type:"body",size:"md"},"_13f0naje"],[{type:"body",size:"lg"},"_13f0najf"],[{type:"label",size:"sm"},"_13f0najg"],[{type:"label",size:"md"},"_13f0najh"],[{type:"label",size:"lg"},"_13f0naji"]]});var Ad=_t.forwardRef(({className:e,style:t,children:o,variant:r="default",size:a="md",elementType:n="a",type:i="body","data-block-id":s,"data-block-class":l,title:p,role:c,...u},m)=>{let d=_t.useRef(null),{linkProps:b,isPressed:y}=useLink({...u,elementType:u.onPress?"span":n},d),{isFocusVisible:f,isFocused:g,focusProps:v}=useFocusRing(),{hoverProps:_,isHovered:h}=useHover({isDisabled:u.isDisabled}),x=n,w=filterTruthyValues({"data-block-id":s,"data-block-class":l,"data-disabled":u.isDisabled,"data-focused":g,"data-pressed":y,"data-focus-visible":f,"data-hovered":h,role:c,title:p});return jsx(x,{...mergeProps(b,v,_,w),className:classNames(za({variant:r,isFocusVisible:f,isHovered:h,isDisabled:u.isDisabled,size:a,isActive:y,type:i}),"BaselineUI-Link",e),ref:M(d,m),style:t,children:o})});Ad.displayName="Link";function Fd({isDisabled:e,onValueChange:t,onChange:o,name:r,"aria-describedby":a,"aria-label":n,accept:i,multiple:s}){let l=useId(),p=useId(),c=useId();return {inputProps:{type:"file",id:p,disabled:!!e,"aria-labelledby":n?void 0:l,"aria-describedby":a||c,"aria-label":n,onChange:m=>{let d=[...m.target.files||[]];t?.(d),o?.(m);},name:r,accept:i,multiple:s},labelProps:{htmlFor:p,id:l},descriptionProps:{id:c}}}async function qi({items:e}){let t=e.filter(o=>o.kind==="file").map(async o=>(invariant(o.kind==="file"),o.getFile()));return await Promise.all(t)}var jd=z({defaultClassName:"_180w5ed0",variantClassNames:{variant:{default:"_180w5ed1",inline:"_180w5ed2"},hoveredOrFocusedOrActive:{true:"_180w5ed3"},disabled:{true:"_180w5ed4"}},defaultVariants:{},compoundVariants:[[{variant:"inline",hoveredOrFocusedOrActive:true},"_180w5ed5"],[{variant:"default",hoveredOrFocusedOrActive:true},"_180w5ed6"],[{variant:"default",disabled:true},"_180w5ed7"],[{variant:"inline",disabled:true},"_180w5ed8"]]}),Od=z({defaultClassName:"_180w5ede",variantClassNames:{disabled:{true:"_180w5edf"}},defaultVariants:{},compoundVariants:[]}),Hd=z({defaultClassName:"_180w5ed9",variantClassNames:{disabled:{true:"_180w5eda"}},defaultVariants:{},compoundVariants:[]}),Vd=z({defaultClassName:"_180w5edb",variantClassNames:{disabled:{true:"_180w5edc"},hovered:{true:"_180w5edd"}},defaultVariants:{},compoundVariants:[]});var Gd=_t.forwardRef(({className:e,label:t,description:o,icon:r,variant:a="default",...n},i)=>{let s=_t.useRef(null),{inputProps:l,descriptionProps:p,labelProps:c}=Fd(n),{dropProps:u}=useDrop({ref:s,onDrop:async({items:f})=>{let g=f.filter(_=>_.kind==="file").map(async _=>(invariant(_.kind==="file"),_.getFile())),v=await Promise.all(g);n.onValueChange?.(v);}}),{focusProps:m,isFocusVisible:d}=useFocusRing(),{hoverProps:b,isHovered:y}=useHover({isDisabled:n.isDisabled});return jsxs("label",{...mergeProps(u,b,c),className:classNames(jd({variant:a,disabled:n.isDisabled,hoveredOrFocusedOrActive:y||d}),e),ref:M(i,s),children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(m,l)})}),r?jsx(r,{size:20,className:Hd({disabled:n.isDisabled})}):null,jsxs("div",{children:[jsx("div",{className:Vd({disabled:n.isDisabled,hovered:y}),children:t}),o?jsx("div",{...p,className:Od({disabled:n.isDisabled}),children:o}):null]})]})});Gd.displayName="FileUpload";var Wd="_1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j4 _1yep5z6j5 _1yep5z6j6 _1yep5z6ln",Yd="_1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6kj _1yep5z6kk _1yep5z6kl",Xd=z({defaultClassName:"_12vfhl44",variantClassNames:{variant:{success:"_1yep5z611s",error:"_1yep5z611o",active:"_1yep5z6120"}},defaultVariants:{},compoundVariants:[]}),Zd="_1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6ev _1yep5z6dy",Jd="_12vfhl43 _1yep5z6g3 _1yep5z6ln",Qd="_12vfhl42 _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z69i _1yep5z69j _1yep5z69k",eu="_1yep5z64l _1yep5z64m _1yep5z64n _1yep5z629 _1yep5z62a _1yep5z62b _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k",tu=z({defaultClassName:"_12vfhl40 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6dy _1yep5z6eu",variantClassNames:{hasLabel:{false:"_1yep5z6pi _1yep5z6pj _1yep5z6pk"}},defaultVariants:{},compoundVariants:[]});var ou=_t.forwardRef(({className:e,style:t,variant:o="active",showValue:r,description:a,errorMessage:n,"data-block-id":i,"data-block-class":s,...l},p)=>{let c=useId(),{labelProps:u,progressBarProps:m}=useProgressBar({...l,"aria-describedby":a?c:l["aria-describedby"]}),{minValue:d=0,maxValue:b=100,value:y=0,label:f}=l,g=(y-d)/(b-d),v=`${Math.round(g*100)}%`,_=jsx("output",{className:tu({hasLabel:!!f}),children:m["aria-valuetext"]}),h=o==="error"?n:a;return jsxs("div",{...m,style:t,className:classNames(Wd,"BaselineUI-ProgressBar",e),"data-block-id":i,"data-block-class":s,ref:p,children:[f?jsxs("div",{className:Yd,children:[jsx("label",{...u,className:Zd,children:f}),r?_:null]}):null,jsxs("div",{className:eu,children:[jsxs("div",{className:Qd,children:[jsx("div",{className:Jd,children:jsx("div",{style:{width:v},className:Xd({variant:o})})}),!f&&r?_:null]}),h?jsx("div",{className:Ut({hasError:o==="error"}),id:c,children:h}):null]})]})});ou.displayName="ProgressBar";function ao({isReadOnly:e,validationState:t}){return e?ReadOnlyIcon:t==="error"?ErrorCircleFilledIcon:t==="warning"?WarningFilledIcon$1:null}var Pt=_t.forwardRef(({labelPosition:e="top",className:t,style:o,labelProps:r,isDisabled:a=false,isReadOnly:n=false,label:i,message:s,"data-block-id":l,validationState:p="valid",isFocused:c=false,variant:u="primary",children:m,fieldProps:d,wrapperRef:b,wrapperClassName:y,isInvalid:f},g)=>{let{hoverProps:v,isHovered:_}=useHover({isDisabled:a}),h=ao({isReadOnly:n,validationState:p});return jsxs("div",{className:classNames(tt({labelPosition:e}),t),"data-block-id":l,style:o,ref:g,children:[i||e==="start"&&s?jsxs("div",{className:et({labelPosition:e,hasMessage:!!s}),children:[jsx(D,{...r,elementType:"label",color:"text.secondary",typography:"label.md.medium",children:i}),e==="start"&&s]}):null,jsxs("div",{className:classNames({[Yt]:a}),children:[jsxs("div",{...mergeProps(d,v),className:classNames(Gt({validationState:f?"error":p,isHovered:_,isFocused:c,variant:u,isReadOnly:n,isDisabled:a}),y),ref:b,children:[m,h?jsx(h,{className:qt({validationState:p,isReadOnly:n}),size:16}):null]}),e==="top"&&s]})]})});Pt.displayName="SharedInput";var at=_t.forwardRef(({className:e,validationState:t,variant:o="primary",labelPosition:r="top",inputStyle:a,inputClassName:n,"data-block-id":i,"data-block-class":s,...l},p)=>{let c=_t.useRef(null),{inputProps:u,labelProps:m,descriptionProps:d,errorMessageProps:b,validationErrors:y}=useTextField({...l,validationState:t?t==="error"?"invalid":"valid":void 0},c),f=l.errorMessage||y.join(" "),g=Ce({...l,errorMessage:f,descriptionProps:d,errorMessageProps:b,labelPosition:r});f&&(t="error");let{isFocused:v,focusProps:_,isFocusVisible:h}=useFocusRing(),x=filterTruthyValues({"data-readonly":l.isReadOnly,"data-disabled":l.isDisabled,"data-validation-state":t,"data-focused":v,"data-focus-visible":h});return jsx(Pt,{variant:o,labelProps:m,isFocused:v,message:g,ref:p,labelPosition:r,className:classNames("BaselineUI-TextInput",e),validationState:t,"data-block-id":i,"data-block-class":s,...l,children:jsx("input",{...mergeProps(u,_,x),className:classNames(ea({isDisabled:l.isDisabled,labelPosition:r}),"BaselineUI-TextInput-Input",n),style:a,ref:c})})});at.displayName="TextInput";var no=({value:e,...t})=>{let o=useNumberFormatter(t);return jsx(Fragment,{children:o.format(e)})};no.displayName="NumberFormat";var su="_1yep5z6iv _1yep5z6iw _1yep5z6ix",lu=z({defaultClassName:"_9b1tml0",variantClassNames:{isSelected:{true:"_9b1tml1",false:"_9b1tml2"},isDisabled:{true:"z9nup82"},isHovered:{true:"_9b1tml4"},isFocusVisible:{true:"_9b1tml5"},isReadOnly:{true:"_9b1tml6"}},defaultVariants:{},compoundVariants:[[{isSelected:true,isFocusVisible:true,isReadOnly:false},"_9b1tml7"],[{isSelected:true,isHovered:true,isDisabled:false,isReadOnly:false},"_9b1tml8"],[{isSelected:false,isHovered:true,isDisabled:false,isReadOnly:false},"_9b1tml9"],[{isSelected:true,isDisabled:true},"_9b1tmla"],[{isSelected:true,isReadOnly:true},"_9b1tmlb"]]}),pu=z({defaultClassName:"_9b1tmlf _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6eu _1yep5z6la _1yep5z6e9",variantClassNames:{isSelected:{true:"_9b1tmlg"},size:{sm:"_9b1tmlh",md:"_9b1tmli"},isDisabled:{true:"_9b1tmlj"},isReadOnly:{true:"_1yep5z610x"}},defaultVariants:{},compoundVariants:[[{isSelected:true,isDisabled:false,isReadOnly:false},"_1yep5z61n6"],[{isSelected:true,isDisabled:true},"_1yep5z61n6"],[{isSelected:false,isDisabled:true},"_1yep5z61n4"]]}),cu=z({defaultClassName:"_9b1tmlc",variantClassNames:{isDisabled:{true:"_9b1tmld"},isReadOnly:{true:"_9b1tmle"}},defaultVariants:{},compoundVariants:[]});var mu=_t.forwardRef(({className:e,count:t,style:o,size:r="md",icon:a,"data-block-id":n,"data-block-class":i,...s},l)=>{let p={isRequired:false},c=a||(r==="md"?CheckmarkIcon$1:CheckmarkIcon$2);!s["aria-label"]&&!s["aria-labelledby"]&&console.warn("You must provide either an `aria-label` or `aria-labelledby` prop to the `Reaction` component.");let u=_t.useRef(null),m=useToggleState({...s,...p}),{inputProps:d,isPressed:b,isDisabled:y,isReadOnly:f,isSelected:g}=useSwitch({...s,...p},m,u),{focusProps:v,isFocused:_,isFocusVisible:h}=useFocusRing(),{hoverProps:x,isHovered:w}=useHover({}),C=filterTruthyValues({"data-block-id":n,"data-block-class":i,"data-focused":_,"data-focus-visible":h,"data-disabled":y,"data-hovered":w,"data-pressed":b,"data-selected":g});return jsxs("label",{ref:l,style:o,className:classNames(su,"BaselineUI-Reaction",e),...C,children:[jsx(VisuallyHidden,{children:jsx("input",{...d,...v,ref:u})}),jsxs("div",{...x,className:lu({isSelected:g,isFocusVisible:h,isHovered:w,isReadOnly:f,isDisabled:y}),children:[jsx("div",{className:cu({isDisabled:y,isReadOnly:f}),children:jsx(c,{size:r==="md"?20:16})}),jsx("div",{className:pu({isSelected:m.isSelected,isDisabled:y,isReadOnly:f,size:r}),children:jsx(no,{value:t})})]})]})});mu.displayName="Reaction";var fu="_1azy5686",yu="_1azy5685",bu="var(--_1azy5680)",gu="_1azy5688",vu="_1azy5689",_u="_1azy5681 z9nup81",zu="_1azy5682";var hu="_1azy5687";var jx={sm:16,md:20},Ox={sm:[CheckmarkCircleFilledIcon,ErrorAltCircleFilledIcon$1],md:[CheckCircleFilledIcon,ErrorAltCircleFilledIcon]},so=_t.forwardRef(({className:e,style:t,size:o="md",variant:r="active","data-block-id":a,"data-block-class":n,...i},s)=>{let{labelProps:l,progressBarProps:p}=useProgressBar({...i,isIndeterminate:true}),c=jx[o],u=c/2-2,m=2*u*Math.PI,d=Ox[o][r==="success"?0:1];return jsxs("div",{className:classNames(_u,"BaselineUI-ProgressSpinner",e),ref:s,style:{...assignInlineVars({[bu]:`${m}px`}),...t},"data-block-id":a,"data-block-class":n,children:[jsxs("div",{...p,className:zu,children:[(r==="active"||r==="inactive")&&jsxs("svg",{height:c,width:c,viewBox:`0 0 ${c} ${c}`,children:[jsx("circle",{role:"presentation",className:fu,cx:c/2,cy:c/2,r:u}),r==="active"&&jsx("circle",{role:"presentation",className:yu,cx:c/2,cy:c/2,r:u})]}),r==="success"&&jsx(d,{className:hu,size:c}),r==="error"&&jsx(d,{className:gu,size:c})]}),i.label?jsx("span",{...l,className:vu,children:i.label}):null]})});so.displayName="ProgressSpinner";var Ca=z({defaultClassName:"_5uw3kp0 oom8bs0 z9nup81",variantClassNames:{isHovered:{true:"_5uw3kp1"},isFocusVisible:{true:"_5uw3kp2"},isDisabled:{true:"_5uw3kp3"},isSelected:{true:"_5uw3kp4"},size:{sm:"_5uw3kp5",md:"_5uw3kp6",lg:"_5uw3kp7"},variant:{primary:"_5uw3kp8",toolbar:"_5uw3kp9"}},defaultVariants:{},compoundVariants:[[{isSelected:true,isFocusVisible:true},"_5uw3kpa"],[{isSelected:true,isDisabled:true},"_5uw3kpb"],[{variant:"primary",size:"lg"},"_5uw3kpc"]]}),xu=z({defaultClassName:"_5uw3kpd _1yep5z6f5",variantClassNames:{isDisabled:{true:"_1yep5z611a"},isSelected:{true:"_1yep5z611c"}},defaultVariants:{},compoundVariants:[]});var Gx={sm:16,md:20,lg:24},Pa=_t.forwardRef(({className:e,style:t,iconStart:o,size:r="md",elementType:a="button",variant:n="toolbar",...i},s)=>{let l=useToggleState(i),{buttonProps:p,isPressed:c,ref:u,isFocusVisible:m,isFocused:d,isHovered:b,uiStateOptions:y}=Zr(i,l),f=filterTruthyValues({"data-block-id":i["data-block-id"],"data-block-class":i["data-block-class"],"data-focused":d,"data-focus-visible":m,"data-disabled":i.isDisabled,"data-hovered":b,"data-pressed":c,"data-selected":l.isSelected});return jsxs(a,{...mergeProps(p,f),className:classNames(Ca({isHovered:b,isFocusVisible:m,isSelected:l.isSelected,size:r,isDisabled:i.isDisabled,variant:n}),"BaselineUI-ToggleButton",typeof e=="function"?e(y):e),style:typeof t=="function"?t(y):t,ref:M(u,s),children:[o?jsx(o,{size:Gx[r],className:xu({isDisabled:i.isDisabled,isSelected:l.isSelected})}):null,i.label]})});Pa.displayName="ToggleButton";var ka=z({defaultClassName:"_16vugd0b _1yep5z6ev _1yep5z6dy",variantClassNames:{isDisabled:{true:"_1yep5z6111"}},defaultVariants:{},compoundVariants:[]}),wa=z({defaultClassName:"_16vugd00 _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6jj _1yep5z6jk _1yep5z6jl",variantClassNames:{labelPosition:{end:"_1yep5z6154 _1yep5z6155 _1yep5z6156 _1yep5z6vl _1yep5z6vm _1yep5z6vn",start:"_1yep5z615a _1yep5z615b _1yep5z615c _1yep5z616m _1yep5z616n _1yep5z616o"}},defaultVariants:{},compoundVariants:[]}),Ia=z({defaultClassName:"_16vugd03 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6m1 _1yep5z6lz _1yep5z6h6 _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6f8 _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6kd _1yep5z6ke _1yep5z6kf _1yep5z6lp _1yep5z6la",variantClassNames:{isIndeterminate:{true:"_1yep5z6181 _1yep5z612c"},isSelected:{true:"_16vugd05"},isFocusVisible:{true:"_16vugd06"},isHovered:{true:"_1yep5z613a"},isDisabled:{true:"_16vugd08 _1yep5z613e"},isReadOnly:{true:"_16vugd09 _1yep5z6118 _1yep5z6184 _1yep5z6182 _1yep5z613e"},hasError:{true:"_1yep5z612q _1yep5z6184 _1yep5z6182"}},defaultVariants:{},compoundVariants:[[{isSelected:true,isDisabled:false,isReadOnly:false},"_1yep5z61of"],[{isSelected:true,isDisabled:false,isReadOnly:false,hasError:false},"_1yep5z61u4"],[{isSelected:true,isDisabled:true},"_1yep5z61op _1yep5z61nf"],[{isSelected:true,isDisabled:true,hasError:false},"_1yep5z61u4"],[{isHovered:true,isSelected:true,isReadOnly:false},"_1yep5z61ol _1yep5z61nf"],[{isHovered:true,isSelected:true,isReadOnly:false,hasError:false},"_1yep5z61u4"],[{isHovered:true,isSelected:false,isIndeterminate:true,isReadOnly:false},"_1yep5z61ol _1yep5z61nf"],[{isHovered:true,isSelected:false,isIndeterminate:true,isReadOnly:false,hasError:false},"_1yep5z61u4"]]});var ku=_t.forwardRef(({className:e,style:t,label:o,labelPosition:r="end","data-block-id":a,"data-block-class":n,...i},s)=>{let l=_t.useRef(null),p=useToggleState(i),{isFocusVisible:c,isFocused:u,focusProps:m}=useFocusRing(),{inputProps:d,isPressed:b,isDisabled:y,isSelected:f,isReadOnly:g}=useCheckbox({...i,children:o},p,l),{hoverProps:v,isHovered:_}=useHover({isDisabled:y}),h=filterTruthyValues({"data-disabled":y,"data-readonly":g,"data-hovered":_,"data-selected":f,"data-pressed":b,"data-indeterminate":i.isIndeterminate,"data-invalid":i.isInvalid,"data-focus-visible":c,"data-focused":u,"data-block-id":a,"data-block-class":n});return jsxs("label",{...h,className:classNames(wa({labelPosition:r}),"BaselineUI-Checkbox",e),style:t,ref:s,children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(d,m),ref:l})}),jsxs("div",{...v,className:Ia({isSelected:f&&!i.isIndeterminate,isIndeterminate:i.isIndeterminate,isFocusVisible:c,isDisabled:y,isReadOnly:g,hasError:i.isInvalid,isHovered:_}),children:[f&&!i.isIndeterminate?jsx(CheckmarkIcon$3,{size:12}):null,i.isIndeterminate?jsx(MinusIcon$1,{size:12}):null]}),o?jsx("span",{className:ka({isDisabled:y}),children:o}):null]})});ku.displayName="Checkbox";var wu={ar:{goToPage:"\u0627\u0646\u062A\u0642\u0627\u0644 \u0625\u0644\u0649 \u0635\u0641\u062D\u0629",nextPage:"\u0627\u0644\u0635\u0641\u062D\u0629 \u0627\u0644\u062A\u0627\u0644\u064A\u0629",pageXofY:"\u0635\u0641\u062D\u0629 {arg0} \u0645\u0646 {arg1}",prevPage:"\u0627\u0644\u0635\u0641\u062D\u0629 \u0627\u0644\u0633\u0627\u0628\u0642\u0629"},cs:{goToPage:"P\u0159ej\xEDt na stranu",nextPage:"Dal\u0161\xED str\xE1nka",pageXofY:"Strana {arg0} z {arg1}",prevPage:"P\u0159edchoz\xED strana"},cy:{goToPage:"Mynd i Dudalen",nextPage:"Tudalen Nesaf",pageXofY:"Tudalen {arg0} o {arg1}",prevPage:"Tudalen Blaenorol"},da:{goToPage:"G\xE5 til side",nextPage:"N\xE6ste side",pageXofY:"Side {arg0} af {arg1}",prevPage:"Forrige side"},de:{goToPage:"Zu Seite wechseln",nextPage:"N\xE4chste Seite",pageXofY:"Seite {arg0} von {arg1}",prevPage:"Vorherige Seite"},el:{goToPage:"\u039C\u03B5\u03C4\u03AC\u03B2\u03B1\u03C3\u03B7 \u03C3\u03C4\u03B7 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1",nextPage:"\u0395\u03C0\u03CC\u03BC\u03B5\u03BD\u03B7 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1",pageXofY:"\u03A3\u03B5\u03BB\u03AF\u03B4\u03B1 {arg0} \u03B1\u03C0\u03CC {arg1}",prevPage:"\u03A0\u03C1\u03BF\u03B7\u03B3\u03BF\u03CD\u03BC\u03B5\u03BD\u03B7 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1"},"en-GB":{goToPage:"Go to Page",nextPage:"Next Page",pageXofY:"Page {arg0} of {arg1}",prevPage:"Previous Page"},en:{goToPage:"Go to Page",nextPage:"Next Page",pageXofY:"Page {arg0} of {arg1}",prevPage:"Previous Page"},es:{goToPage:"Ir a la p\xE1gina",nextPage:"P\xE1gina siguiente",pageXofY:"P\xE1gina {arg0} de {arg1}",prevPage:"P\xE1gina anterior"},fi:{goToPage:"Mene sivulle",nextPage:"Seuraava sivu",pageXofY:"Sivu {arg0} / {arg1}",prevPage:"Edellinen sivu"},"fr-CA":{goToPage:"Aller \xE0 la page",nextPage:"Page suivante",pageXofY:"Page {arg0} sur {arg1}",prevPage:"Page pr\xE9c\xE9dente"},fr:{goToPage:"Aller \xE0 la page",nextPage:"Page suivante",pageXofY:"Page {arg0} sur {arg1}",prevPage:"Page pr\xE9c\xE9dente"},he:{goToPage:"\u05DE\u05E2\u05D1\u05E8 \u05DC\u05E2\u05DE\u05D5\u05D3",nextPage:"\u05D4\u05E2\u05DE\u05D5\u05D3 \u05D4\u05D1\u05D0",pageXofY:"\u05E2\u05DE\u05D5\u05D3 {arg0} \u05DE\u05EA\u05D5\u05DA {arg1}",prevPage:"\u05D4\u05E2\u05DE\u05D5\u05D3 \u05D4\u05E7\u05D5\u05D3\u05DD"},hr:{goToPage:"Idi na stranicu",nextPage:"Slijede\u0107a stranica",pageXofY:"Stranica {arg0} od {arg1}",prevPage:"Prethodna stranica"},id:{goToPage:"Buka halaman",nextPage:"Halaman Berikutnya",pageXofY:"Halaman {arg0} dari {arg1}",prevPage:"Halaman Sebelumnya"},it:{goToPage:"Vai a pagina",nextPage:"Pagina successiva",pageXofY:"Pagina {arg0} di {arg1}",prevPage:"Pagina precedente"},ja:{goToPage:"\u30DA\u30FC\u30B8\u306B\u79FB\u52D5",nextPage:"\u6B21\u306E\u30DA\u30FC\u30B8",pageXofY:"\u30DA\u30FC\u30B8 {arg0}/{arg1}",prevPage:"\u524D\u306E\u30DA\u30FC\u30B8"},ko:{goToPage:"\uD398\uC774\uC9C0\uB85C \uC774\uB3D9",nextPage:"\uB2E4\uC74C \uD398\uC774\uC9C0",pageXofY:"{arg0}/{arg1} \uD398\uC774\uC9C0",prevPage:"\uC774\uC804 \uD398\uC774\uC9C0"},ms:{goToPage:"Pergi ke Halaman",nextPage:"Halaman Seterusnya",pageXofY:"Halaman {arg0} daripada {arg1}",prevPage:"Halaman Sebelumnya"},"nb-NO":{goToPage:"G\xE5 til side",nextPage:"Neste side",pageXofY:"Side {arg0} av {arg1}",prevPage:"Forrige side"},nl:{goToPage:"Ga naar pagina",nextPage:"Volgende pagina",pageXofY:"Pagina {arg0} van {arg1}",prevPage:"Vorige pagina"},pl:{goToPage:"Przejd\u017A do strony",nextPage:"Nast\u0119pna strona",pageXofY:"Strona {arg0} z {arg1}",prevPage:"Poprzednia strona"},"pt-PT":{goToPage:"Ir para p\xE1gina",nextPage:"P\xE1gina seguinte",pageXofY:"P\xE1gina {arg0} de {arg1}",prevPage:"P\xE1gina anterior"},pt:{goToPage:"Ir \xE0 P\xE1gina",nextPage:"P\xE1gina Seguinte",pageXofY:"P\xE1gina {arg0} de {arg1}",prevPage:"P\xE1gina Anterior"},ru:{goToPage:"\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0435",nextPage:"\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0430\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430",pageXofY:"\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 {arg0} \u0438\u0437 {arg1}",prevPage:"\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0430\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430"},sk:{goToPage:"\xCDs\u0165 na stranu",nextPage:"Dal\u0161ia strana",pageXofY:"Strana {arg0} z {arg1}",prevPage:"Predch\xE1dzaj\xFAca strana"},sl:{goToPage:"Pojdi na stran",nextPage:"Naslednja stran",pageXofY:"Stran {arg0} od {arg1}",prevPage:"Prej\u0161nja stran"},sv:{goToPage:"G\xE5 till sida",nextPage:"N\xE4sta sida",pageXofY:"Sida {arg0} av {arg1}",prevPage:"F\xF6reg\xE5ende sida"},th:{goToPage:"\u0E44\u0E1B\u0E17\u0E35\u0E48\u0E2B\u0E19\u0E49\u0E32",nextPage:"\u0E2B\u0E19\u0E49\u0E32\u0E16\u0E31\u0E14\u0E44\u0E1B",pageXofY:"\u0E2B\u0E19\u0E49\u0E32 {arg0} \u0E08\u0E32\u0E01 {arg1}",prevPage:"\u0E2B\u0E19\u0E49\u0E32\u0E01\u0E48\u0E2D\u0E19\u0E2B\u0E19\u0E49\u0E32"},tr:{goToPage:"Sayfaya Git",nextPage:"Sonraki Sayfa",pageXofY:"Sayfa {arg0}/{arg1}",prevPage:"\xD6nceki Sayfa"},uk:{goToPage:"\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043D\u0430 \u0441\u0442\u043E\u0440\u0456\u043D\u043A\u0443",nextPage:"\u041D\u0430\u0441\u0442\u0443\u043F\u043D\u0430 \u0441\u0442\u043E\u0440\u0456\u043D\u043A\u0430",pageXofY:"\u0421\u0442\u043E\u0440\u0456\u043D\u043A\u0430 {arg0} \u0437 {arg1}",prevPage:"\u041F\u043E\u043F\u0435\u0440\u0435\u0434\u043D\u044F \u0441\u0442\u043E\u0440\u0456\u043D\u043A\u0430"},"zh-Hans":{goToPage:"\u524D\u5F80\u9875\u9762",nextPage:"\u4E0B\u4E00\u9875",pageXofY:"\u7B2C {arg0}/{arg1} \u9875",prevPage:"\u4E0A\u4E00\u9875"},"zh-Hant":{goToPage:"\u5230\u6B64\u9801",nextPage:"\u4E0B\u4E00\u9801",pageXofY:"\u7B2C{arg0}\u9801\uFF0C\u5171{arg1}\u9801",prevPage:"\u4E0A\u4E00\u9801"}};var Iu=z({defaultClassName:"_1nsi9h17",variantClassNames:{isFocused:{true:"_1nsi9h18"},variant:{pinned:"_1nsi9h19",floating:"_1nsi9h1a"},size:{xs:"_1nsi9h1b",sm:"_1nsi9h1c",md:"_1nsi9h1d",lg:"_1nsi9h1e"}},defaultVariants:{},compoundVariants:[]}),Ru="_1nsi9h1f _1yep5z6ly _1yep5z6lq _1yep5z6eu",$u=z({defaultClassName:"_1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6g1 _1yep5z6e1",variantClassNames:{size:{xs:"_1nsi9h11 _1yep5z6wl _1yep5z6wm _1yep5z6wn _1yep5z6x9 _1yep5z6xa _1yep5z6xb _1yep5z6xx _1yep5z6xy _1yep5z6xz _1yep5z6yl _1yep5z6ym _1yep5z6yn _1yep5z6zy",sm:"_1nsi9h12 _1yep5z6101",md:"_1nsi9h13",lg:"_1nsi9h14"},variant:{floating:"_1yep5z6za _1yep5z6184 _1yep5z6182 _1yep5z6136",pinned:"_1yep5z617q"}},defaultVariants:{},compoundVariants:[]}),Tu=z({defaultClassName:"_1nsi9h1g _1yep5z6ev",variantClassNames:{isDisabled:{true:"_1yep5z6111"}},defaultVariants:{},compoundVariants:[]});var x0={style:"decimal"},C0={xs:[CaretLeftIcon$3,CaretRightIcon$3],sm:[CaretLeftIcon$2,CaretRightIcon$2],md:[CaretLeftIcon$1,CaretRightIcon$1],lg:[CaretLeftIcon,CaretRightIcon]},Eu=_t.forwardRef(({className:e,style:t,minValue:o=1,defaultValue:r=1,incrementAriaLabel:a,decrementAriaLabel:n,"aria-label":i,size:s="md",variant:l="floating",hideActions:p,isDisabled:c,...u},m)=>{let{locale:d}=useLocale(),b=A(wu),y={...u,formatOptions:x0,minValue:o,incrementAriaLabel:a||b.formatMessage("nextPage"),decrementAriaLabel:n||b.formatMessage("prevPage"),defaultValue:r,"aria-label":i||b.formatMessage("goToPage")},f=_t.useRef(null),g=useNumberFieldState({...y,locale:d}),{inputProps:v,decrementButtonProps:_,incrementButtonProps:h,groupProps:x}=useNumberField({...y,onKeyDown:F=>{F.key==="Enter"&&f.current?.blur(),u.onKeyDown?.(F);},isDisabled:c},g,f),{hoverProps:w,isHovered:C}=useHover({}),{focusProps:I,isFocused:P,isFocusVisible:S}=useFocusRing(),k=l==="floating",[T,$]=C0[s],R=filterTruthyValues({"data-focus-visible":S,"data-focused":P,"data-hovered":C,"data-block-id":u["data-block-id"],"data-block-class":u["data-block-class"]}),E=useInteractionModality()==="keyboard";return jsxs("div",{...mergeProps(x,w,R),className:classNames($u({size:s,variant:l}),"BaselineUI-Pagination",e),style:t,ref:m,children:[p?null:jsxs(Fragment,{children:[jsx(L,{icon:T,..._,elementType:"div",size:s,style:{height:"100%",...k&&{borderRadius:0}},className:"BaselineUI-Pagination-DecrementButton",UNSAFE_NON_INTERACTIVE:E,isDisabled:c||_.isDisabled}),l==="floating"&&jsx(q,{orientation:"vertical"})]}),jsxs("div",{className:Iu({isFocused:P,variant:l,size:s}),"aria-label":b.formatMessage("pageXofY",{arg0:v.value,arg1:g.maxValue}),children:[jsx("input",{...mergeProps(v,I),ref:f,className:classNames("BaselineUI-Pagination-Input",Ru),style:{width:`${v.value?.toString().length||1}ch`}}),jsxs("span",{className:Tu({isDisabled:c}),children:["/ ",jsx(no,{value:g.maxValue})]})]}),p?null:jsxs(Fragment,{children:[l==="floating"&&jsx(q,{orientation:"vertical"}),jsx(L,{icon:$,...h,elementType:"div",size:s,style:{height:"100%",...k&&{borderRadius:0}},className:"BaselineUI-Pagination-IncrementButton",UNSAFE_NON_INTERACTIVE:E,isDisabled:c||h.isDisabled})]})]})});Eu.displayName="Pagination";var Lu=({date:e,...t})=>{let o=useDateFormatter(t);return jsx(Fragment,{children:o.format(e)})};Lu.displayName="DateFormat";var tr=z({defaultClassName:"_1f789qjm",variantClassNames:{variant:{neutral:"_1yep5z6118",red:"_1yep5z610i",green:"_1yep5z610m",blue:"_1yep5z610u","high-contrast":"_1yep5z611b"},isDisabled:{true:"_1yep5z61nd"},isSelected:{true:"_1yep5z611c"}},defaultVariants:{},compoundVariants:[]}),Ra=z({defaultClassName:"_1f789qj0 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ax _1yep5z6ay _1yep5z6az _1yep5z6bl _1yep5z6bm _1yep5z6bn _1yep5z6c9 _1yep5z6ca _1yep5z6cb _1yep5z6cx _1yep5z6cy _1yep5z6cz _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6la _1yep5z6lq _1yep5z6ld",variantClassNames:{isFocusVisible:{true:"_1f789qj1"},variant:{neutral:"_1yep5z6128",red:"_1yep5z611n",green:"_1yep5z611r",blue:"_1yep5z611z","high-contrast":"_1yep5z612c"},isDisabled:{true:"_1f789qj7 _1yep5z6127"},allowsRemoving:{true:"_1f789qj8"},isSelected:{true:"_1yep5z612i"},allowsSelection:{true:"_1f789qja"},isHovered:{true:"_1f789qjb"},size:{md:"_1f789qjc",sm:"_1f789qjd"}},defaultVariants:{},compoundVariants:[[{allowsSelection:true,isHovered:true,variant:"neutral"},"_1yep5z61oa"],[{allowsSelection:true,isHovered:true,variant:"red"},"_1yep5z61np"],[{allowsSelection:true,isHovered:true,variant:"blue"},"_1yep5z61o1"],[{allowsSelection:true,isHovered:true,variant:"green"},"_1yep5z61nt"],[{allowsSelection:true,isHovered:true,variant:"high-contrast"},"_1yep5z61oe"],[{allowsSelection:true,isSelected:true,isHovered:true},"_1yep5z61om"],[{variant:"high-contrast",isDisabled:true},"_1yep5z61oa"],[{allowsRemoving:true,size:"md"},"_1yep5z619c _1yep5z619d _1yep5z619e"],[{allowsRemoving:true,size:"sm"},"_1yep5z61af _1yep5z61ag _1yep5z61ah"]]}),Bu="_1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z69f _1yep5z69g _1yep5z69h",Au="_1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z69i _1yep5z69j _1yep5z69k",Fu=z({defaultClassName:"_1f789qju",variantClassNames:{variant:{neutral:"_1f789qjv",red:"_1f789qjw",green:"_1f789qjx",blue:"_1f789qjy","high-contrast":"_1f789qjz"},isHovered:{true:"_1f789qj10"}},defaultVariants:{},compoundVariants:[[{isHovered:true,variant:"neutral"},"_1f789qj11"],[{isHovered:true,variant:"red"},"_1f789qj12"],[{isHovered:true,variant:"blue"},"_1f789qj13"],[{isHovered:true,variant:"green"},"_1f789qj14"],[{isHovered:true,variant:"high-contrast"},"_1f789qj15"]]}),$a=z({defaultClassName:"_1f789qje",variantClassNames:{variant:{neutral:"_1yep5z610x",red:"_1yep5z610i",green:"_1yep5z610m",blue:"_1yep5z610u","high-contrast":"_1yep5z6112"},isDisabled:{true:"_1yep5z61n4"},isSelected:{true:"_1yep5z6113"}},defaultVariants:{},compoundVariants:[]});var Vu=({item:e,state:t,variant:o="neutral",size:r="md"})=>{let a=_t.useRef(null),{focusProps:n,isFocusVisible:i}=useFocusRing({within:true}),{rowProps:s,gridCellProps:l,removeButtonProps:p,allowsRemoving:c,isDisabled:u,isSelected:m,allowsSelection:d}=useTag({item:e},t,a),b=_t.useRef(null),{buttonProps:y}=useButton(p,b),{hoverProps:f,isHovered:g}=useHover({isDisabled:u}),{hoverProps:v,isHovered:_}=useHover({isDisabled:u}),h=e.value?.icon,x=e.value?.data?.variant??o,w=r==="md"?XIcon$1:XIcon$3,C=r==="md"?CheckmarkIcon$2:CheckmarkIcon$3;return jsx("div",{...mergeProps(s,n,v),ref:a,className:classNames(Ra({isFocusVisible:i,variant:x,isDisabled:u,allowsRemoving:c,isSelected:m,allowsSelection:d,isHovered:_,size:r}),$a({variant:x,isDisabled:u,isSelected:m}),"BaselineUI-Tag"),children:jsxs("div",{...l,className:Bu,children:[m?jsx(C,{size:r==="md"?16:12,className:classNames(tr({variant:x,isDisabled:u,isSelected:m}),"BaselineUI-Tag-Icon")}):null,!m&&h?jsx(h,{size:r==="md"?16:12,className:classNames(tr({variant:x,isDisabled:u,isSelected:m}),"BaselineUI-Tag-Icon")}):null,jsx(D,{paddingY:r==="md"?"sm":"none",typography:r==="sm"?"label.sm.medium":"label.md.medium",children:e.rendered}),c?jsx("button",{...mergeProps(y,f),className:Fu({variant:x,isHovered:g}),children:jsx(w,{size:r==="md"?12:8})}):null]})})};var Ku=_t.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,items:a,size:n="md",...i},s)=>{let l=useMemo(()=>a.map(d=>({...d,data:{variant:d.variant}})),[a]),p=ce(),c=_t.useRef(null),u=useListState({...i,items:l,children:p}),{gridProps:m}=useTagGroup(i,u,c);return jsx("div",{...m,className:classNames(Au,"BaselineUI-TagGroup",e),style:t,"data-block-id":o,"data-block-class":r,ref:M(s,c),children:[...u.collection].map(d=>jsx(Vu,{state:u,item:d,variant:i.variant,size:n},d.key))})});Ku.displayName="TagGroup";var Gu="_1yep5z6ln",Wu=z({defaultClassName:"_1kvz17db _1yep5z6la _1yep5z6lc",variantClassNames:{showActionsOnTriggerOnly:{true:"_1kvz17dc"},isTriggered:{true:"_1kvz17dd"}},defaultVariants:{},compoundVariants:[]}),Yu=z({defaultClassName:"_1kvz17d0 _1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z68c _1yep5z68d _1yep5z68e _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6la _1yep5z6lb",variantClassNames:{isExpanded:{true:"_1kvz17d1"}},defaultVariants:{},compoundVariants:[]}),Xu="_1kvz17de",Zu="_1yep5z6ev _1yep5z6dy",Ju=z({defaultClassName:"_1kvz17d2 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6kj _1yep5z6kk _1yep5z6kl _1yep5z6la _1yep5z6ld",variantClassNames:{isFocusVisible:{true:"_1kvz17d3"},isHovered:{true:"_1yep5z6g2",false:"_1yep5z6g3"},isDisabled:{true:"z9nup82"}},defaultVariants:{},compoundVariants:[]}),Qu="_1kvz17da _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6dz",em=z({defaultClassName:"_1kvz17d7 _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6jj _1yep5z6jk _1yep5z6jl",variantClassNames:{isDisabled:{true:"_1yep5z6ey",false:"_1yep5z6eu"}},defaultVariants:{},compoundVariants:[]});var Xi=_t.forwardRef(({children:e,className:t,style:o},r)=>{let{headers:a}=useContext(nt),{disabledKeys:n}=useContext(nt),{keyboardProps:i}=useKeyboard({onKeyDown:s=>{let l=he(s.target),p=l?Br(l):Br(),c=[...a?.keys()||[]].findIndex(y=>a?.get(y)?.current===p),u=a?.get(c||0),m=a?.size||0,d=y=>{let f=a.get(y-1<0?m-1:y-1);n?.has(f?.current?.getAttribute("data-key")||"")?d(y-1):f?.current?.focus();},b=y=>{let f=a.get((y+1)%m);n?.has(f?.current?.getAttribute("data-key")||"")?b(y+1):f?.current?.focus();};if(u)switch(s.key){case "Home":{s.preventDefault(),b(-1);break}case "End":{s.preventDefault(),d(m);break}case "ArrowDown":{s.preventDefault(),b(c);break}case "ArrowUp":{s.preventDefault(),d(c);break}default:s.continuePropagation();}}});return jsx("div",{...i,style:o,className:classNames(Gu,t),ref:r,children:_t.Children.map(e,(s,l)=>_t.cloneElement(s,{index:l}))})});Xi.displayName="AccordionBase";var nt=_t.createContext({expandedKeys:new Set,setExpandedKeys:()=>{},disabledKeys:new Set,headers:new Map,expansionMode:"multiple"}),rm=_t.forwardRef(({children:e,disabledKeys:t,defaultExpandedKeys:o=new Set,expandedKeys:r,expansionMode:a="multiple",onChange:n,className:i,style:s},l)=>{let[p,c]=_t.useState(o),u=_t.useRef(new Map).current,[m,d]=_t.useState(a);useEffect(()=>{d(a);},[a]),useEffect(()=>{n?.(p);},[p,n]);let b=useMemo(()=>({expandedKeys:r||p,setExpandedKeys:r?()=>{}:c,disabledKeys:t,headers:u,expansionMode:m}),[r,p,t,u,m]);return jsx(nt.Provider,{value:b,children:jsx(FocusScope,{children:jsx(Xi,{className:i,style:s,ref:l,children:e})})})});rm.displayName="Accordion";var Ji=_t.forwardRef(({title:e,actions:t,controlId:o,value:r,id:a,index:n,subLabel:i,showActionsOnTriggerOnly:s},l)=>{let p=_t.useRef(null),{expandedKeys:c,setExpandedKeys:u,expansionMode:m,disabledKeys:d,headers:b}=useContext(nt),y=d?.has(r),f=useFocusManager();invariant(f);let{focusNext:g,focusPrevious:v}=f,{keyboardProps:_}=useKeyboard({onKeyDown:R=>{R.key==="ArrowRight"?g({wrap:true}):R.key==="ArrowLeft"?v({wrap:true}):R.continuePropagation();},isDisabled:y});useEffect(()=>{invariant(typeof n=="number","AccordionItem must have an index"),b?.set(n,p);},[n,b]);let h=()=>{u(R=>{let N=new Set(R);return N.has(r)?N.delete(r):(m==="single"&&N.clear(),N.add(r)),N});},{buttonProps:x}=useButton({"aria-expanded":c.has(r),"aria-controls":o,onPress:h,isDisabled:y},p),{pressProps:w}=usePress({onPress:h,isDisabled:y}),{focusProps:C,isFocusVisible:I}=useFocusRing(),{hoverProps:P,isHovered:S}=useHover({isDisabled:y}),{focusProps:k,isFocusVisible:T}=useFocusRing({within:true}),$=c.has(r);return jsxs("h3",{...mergeProps(_,w,P,k),className:Ju({isFocusVisible:I,isHovered:S,isDisabled:y}),ref:l,children:[jsxs("div",{className:em({isDisabled:!!y}),children:[jsx(ChevronRightIcon,{className:Yu({isExpanded:$}),size:8}),jsx("button",{...mergeProps(x,C),id:a,"data-key":r,className:Qu,ref:p,children:e})]}),t?.length?jsx("div",{"data-testid":"action-buttons",className:Wu({showActionsOnTriggerOnly:s,isTriggered:T||S}),children:t.map((R,N)=>jsx(L,{variant:"secondary",size:"sm",excludeFromTabOrder:true,isDisabled:y,...R},N))}):null,i?jsx("div",{className:Zu,children:i}):null]})});Ji.displayName="AccordionHeader";var cm=_t.forwardRef(({title:e,actions:t,children:o,value:r,index:a,subLabel:n,style:i,className:s,showActionsOnTriggerOnly:l},p)=>{let c=useId(),u=useId(),{expandedKeys:m}=useContext(nt),d=m.has(r);return jsxs(Fragment,{children:[jsx(FocusScope,{children:jsx(Ji,{value:r,actions:t,id:u,title:e,controlId:c,ref:p,index:a,subLabel:n,showActionsOnTriggerOnly:l})}),jsx(AnimatePresence,{initial:false,children:d?jsx(motion.section,{role:"region","aria-labelledby":u,id:c,className:Xu,variants:{open:{height:"auto",opacity:1},closed:{height:0,opacity:0}},initial:"closed",animate:"open",exit:"closed",children:jsx("div",{style:i,className:s,children:o})}):null})]})});cm.displayName="AccordionItem";var nr=_t.forwardRef(({variant:e,isOpen:t,selectedIcon:o,validationState:r="valid",valueProps:a,label:n,className:i,style:s,"data-block-id":l,"data-block-class":p,...c},u)=>{let m=_t.useRef(null),{buttonProps:d,isPressed:b}=useButton({...c,isDisabled:c.isDisabled||c.isReadOnly},m),{hoverProps:y,isHovered:f}=useHover({isDisabled:c.isDisabled}),{focusProps:g,isFocused:v,isFocusVisible:_}=useFocusRing(),h=ao({isReadOnly:c.isReadOnly,validationState:r});c.isReadOnly&&(d.disabled=false);let x=filterTruthyValues({"data-disabled":c.isDisabled,"data-readonly":c.isReadOnly,"data-focused":v,"data-focus-visible":_,"data-hovered":f,"data-pressed":b,"data-open":t,"data-block-id":l,"data-block-class":p});return jsxs("button",{...mergeProps(d,y,g,x),ref:M(u,m),className:classNames(Dd({isFocused:_,isDisabled:!!c.isDisabled,isOpen:t,isHovered:f,variant:e,isReadOnly:!!c.isReadOnly}),Gt({variant:e,isHovered:f,isFocused:_,validationState:r,isDisabled:!!c.isDisabled,isReadOnly:c.isReadOnly}),i,"BaselineUI-Select-Button"),style:s,children:[jsxs(D,{display:"flex",flexDirection:"row",alignItems:"center",gap:"md",flex:1,paddingRight:"md",children:[jsxs("span",{className:Nd,children:[o?jsx(o,{size:24}):null,jsx("span",{...a,children:n})]}),h?jsx("span",{"aria-hidden":true,className:classNames(qt({validationState:r,isReadOnly:!!c.isReadOnly}),Md),children:jsx(h,{size:16})}):null]}),jsx("span",{"aria-hidden":true,children:jsx(CaretDownIcon,{size:8,className:Sd({isOpen:t})})})]})});nr.displayName="SelectButton";var Ta=_t.createContext({state:null,popoverAnchorRef:null}),ts=_t.forwardRef(({className:e,style:t,labelPosition:o="top",variant:r="primary","data-block-id":a,"data-block-class":n,optionStyle:i,optionClassName:s,placement:l="bottom start",triggerClassName:p,triggerStyle:c,state:u,renderTrigger:m=({buttonProps:y,selectedValue:f,valueProps:g,isOpen:v,ref:_})=>{let h=f&&"icon"in f&&f.icon;return jsx(nr,{...y,className:p,style:c,isOpen:v,isReadOnly:d.isReadOnly,ref:_,variant:r,validationState:d.validationState,selectedIcon:h||void 0,label:f?"label"in f&&f?.label:d.placeholder,valueProps:g})},...d},b)=>{let{popoverAnchorRef:y}=useContext(Ta),f=_t.useRef(null),g=ye(d.portalContainer),{labelProps:v,triggerProps:_,valueProps:h,menuProps:x,descriptionProps:w,errorMessageProps:C}=useSelect({...d,validationState:d.validationState==="error"?"invalid":"valid"},u,f),I=Ce({...d,descriptionProps:w,errorMessageProps:C,labelPosition:o}),P=u.selectedItem?.value??null;return jsxs(ht.Provider,{value:u,children:[jsxs("div",{style:t,className:classNames(tt({labelPosition:o}),"BaselineUI-Select",e),"data-block-id":a,"data-block-class":n,ref:b,children:[d.label||I?jsxs("div",{className:et({labelPosition:o,hasMessage:!!I}),children:[d.label?jsx("div",{...v,className:classNames(Kt,"BaselineUI-Select-Label"),children:d.label}):null,o==="start"&&I]}):null,jsx(HiddenSelect,{state:u,triggerRef:f,isDisabled:d.isDisabled,label:d.label,name:d.name}),m({buttonProps:_,selectedValue:P,valueProps:h,isOpen:u.isOpen,ref:f}),o==="top"&&I]}),u?jsx(ie,{placement:l,portalContainer:g,offset:2,state:u,triggerRef:y||f,style:t,className:"BaselineUI-Select-Popover",...d,children:jsx(fe,{...x,label:d.label,items:d.items,showSelectedIcon:d.showSelectedIcon,className:rt,optionStyle:i,optionClassName:s})}):null]})});ts.displayName="SelectCore";var ym=_t.forwardRef((e,t)=>{let o=ce(),r=useSelectState({...e,validationState:e.validationState==="error"?"invalid":"valid",children:o});return jsx(ts,{...e,ref:t,state:r})});ym.displayName="SelectStandalone";var st=_t.forwardRef((e,t)=>{let{state:o}=useContext(Ta);return useEffect(()=>{invariant(o||e.items,"Select: A `state` that can be passed via context or `items` are required.");},[e.items,o]),o?jsx(ts,{state:o,...e,ref:t}):jsx(ym,{...e,ref:t})});st.displayName="Select";var gm=_t.forwardRef(({className:e,style:t,variant:o,"data-block-id":r,icon:a,tooltip:n=true,iconTooltip:i=true,...s},l)=>{let p=_t.useRef(null),{tooltipProps:c}=xe({label:s["aria-label"],tooltip:n}),u=useCallback(({buttonProps:m,selectedValue:d,valueProps:b,isOpen:y,ref:f})=>{let g=d&&"icon"in d&&d.icon;return jsx(J,{...c,children:jsx(nr,{...m,isOpen:y,isReadOnly:s.isReadOnly,ref:f,variant:o,validationState:s.validationState,selectedIcon:g||void 0,label:d?"label"in d&&d?.label:s.placeholder,valueProps:b})})},[s,c,o]);return jsxs(D,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:classNames("BaselineUI-IconSelect",e),"data-block-id":r,style:t,ref:M(l,p),children:[a?jsx(to,{icon:a,label:s["aria-label"],tooltip:i,"aria-hidden":"true",size:24,className:sprinkles({color:"icon.primary",display:"flex",flexShrink:0})}):null,jsx(st,{...s,renderTrigger:u})]})});gm.displayName="IconSelect";var vm="_1017q4c5",_m=z({defaultClassName:"_1017q4c0",variantClassNames:{size:{md:"_1017q4c1",sm:"_1017q4c2"},isDisabled:{true:"_1017q4c3"}},defaultVariants:{},compoundVariants:[]}),zm="_1017q4c4";var PC={sm:AvatarIcon$1,md:AvatarIcon},uo=_t.forwardRef(({className:e,style:t,size:o="md",icon:r=PC[o],name:a,imgSrc:n,showInitials:i,isDisabled:s,hasNotifications:l,imgLoading:p,"data-block-id":c,"data-block-class":u},m)=>{let{imgProps:d}=Wt({src:n,alt:a}),b=a?.split(" ").map(y=>y[0]).join("");return jsxs("span",{className:classNames(_m({size:o,isDisabled:s}),"BaselineUI-Avatar",e),"data-disabled":s,ref:m,style:t,"aria-disabled":s,"data-block-id":c,"data-block-class":u,children:[n?jsx("img",{...d,loading:p,className:zm}):null,!i&&!n&&jsx(r,{size:o==="sm"?16:24}),i&&!n?o==="sm"?b[0]:b:null,l?jsx("div",{"data-testid":"notification",className:vm}):null]})});uo.displayName="Avatar";var hm="_1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z63l _1yep5z63m _1yep5z63n _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6jj _1yep5z6jk _1yep5z6jl",xm=z({defaultClassName:"_1x62fhb6 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6lp _1yep5z6lq _1yep5z6la _1yep5z6ld _1yep5z6ev _1yep5z69i _1yep5z69j _1yep5z69k",variantClassNames:{isHovered:{true:"_1yep5z610x"},isSelected:{true:"_1x62fhb8"},isFocusVisible:{true:"_1x62fhb9"},isDisabled:{true:"_1x62fhba _1yep5z6111"},variant:{primary:"_1x62fhbb _1yep5z6zy",ghost:"_1yep5z6101"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isSelected:true,isDisabled:false},"_1yep5z61n0"],[{variant:"primary",isSelected:true},"_1yep5z61o7"],[{variant:"ghost",isSelected:true,isFocusVisible:false},"_1x62fhbd"],[{variant:"ghost",isSelected:true,isDisabled:false},"_1yep5z61n7"],[{variant:"ghost",isDisabled:true,isSelected:true},"_1x62fhbe _1yep5z6ey"],[{variant:"primary",isHovered:true},"_1yep5z61o8"]]}),Cm=z({defaultClassName:"_1x62fhb3 _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6j1 _1yep5z6j2 _1yep5z6j3",variantClassNames:{variant:{primary:"_1x62fhb4",ghost:"_1yep5z6vl _1yep5z6vm _1yep5z6vn"}},defaultVariants:{},compoundVariants:[]}),Pm="_1x62fhbl",rs=z({defaultClassName:"_1x62fhbf _1yep5z6f6",variantClassNames:{isHovered:{true:"_1yep5z6118"},isSelected:{true:"_1x62fhbh"},isDisabled:{true:"_1yep5z611a"},variant:{primary:"_1x62fhbj",ghost:"_1x62fhbk"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isSelected:true,isDisabled:false},"_1yep5z61nb"],[{variant:"ghost",isSelected:true,isDisabled:false},"_1yep5z61ng"],[{variant:"ghost",isDisabled:true,isSelected:true},"_1yep5z61nd"]]}),km="_1yep5z6lu _1yep5z6lr _1yep5z6hx _1yep5z6lt",wm=z({defaultClassName:"_1x62fhb0 _1yep5z6ln _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3",variantClassNames:{variant:{primary:"_1yep5z6126",ghost:"_1x62fhb2"}},defaultVariants:{},compoundVariants:[]});var Im=({state:e,...t})=>{let o=_t.useRef(null),{tabPanelProps:r}=useTabPanel(t,e,o),{selectedItem:a}=e,{focusProps:n,isFocusVisible:i}=useFocusRing();if(!a?.value)return null;let{className:s,style:l,"data-block-id":p}=a.value;return jsx("div",{...mergeProps(r,n),ref:o,className:classNames({[km]:i},"Baseline-Tabs-TabPanel",s),"data-block-id":p,style:l,children:a?.props.children})};var is=_t.forwardRef(({className:e,style:t,tabHeaderStyle:o,tabHeaderClassName:r,variant:a="primary",actions:n,onRemove:i,"data-block-id":s,...l},p)=>{let c=useTabListState({...l,selectedKey:l.selectedValue,defaultSelectedKey:l.defaultSelectedValue,disabledKeys:l.disabledValues}),u=_t.useRef(null),{tabListProps:m}=useTabList({...l,selectedKey:l.selectedValue,defaultSelectedKey:l.defaultSelectedValue,disabledKeys:l.disabledValues},c,u);return jsxs("div",{className:classNames("BaselineUI-Tabs",e),style:t,ref:p,"data-block-id":s,children:[jsxs("div",{className:classNames(wm({variant:a}),r),style:o,children:[jsx("div",{...m,className:Cm({variant:a}),ref:u,children:[...c.collection].map(d=>(invariant(d.value,"TabItem requires a value prop"),jsx($m,{item:d,state:c,onRemove:i,variant:a},d.key)))}),n?.map((d,b)=>jsx("div",{className:hm,children:jsx(L,{...d,variant:"secondary",size:"sm",className:classNames(Pm,d.className)})},b))]}),jsx(Im,{state:c},c.selectedItem?.key)]})});is.displayName="TabsBase";var $m=({item:e,onRemove:t,state:o,variant:r})=>{let{key:a,value:n}=e,i=_t.useRef(null),{tabProps:s,isSelected:l,isDisabled:p}=useTab({key:a},o,i),{hoverProps:c,isHovered:u}=useHover({});invariant(n,"TabButton requires a value prop");let{title:m,icon:d,titleStyle:b,titleClassName:y}=n,{focusProps:f,isFocusVisible:g,isFocused:v}=useFocusRing(),{keyboardProps:_}=useKeyboard({onKeyDown:x=>{x.key==="Backspace"&&t?t(a):x.continuePropagation();}}),h=filterTruthyValues({"data-selected":l,"data-disabled":p,"data-focused":v,"data-hovered":u,"data-focus-visible":g});return jsxs("div",{...mergeProps(_,s,c,f,h),className:classNames(xm({isHovered:u,isSelected:l,isFocusVisible:g,isDisabled:p,variant:r}),"BaselineUI-Tabs-TabButton",y),style:b,ref:i,children:[d?jsx(d,{size:20,className:rs({isHovered:u,isSelected:l,isDisabled:p,variant:r})}):null,m,t?jsx(L,{variant:"secondary",elementType:"div",icon:XIcon$3,size:"xxs",onPress:()=>{t(a);},excludeFromTabOrder:true,UNSAFE_NON_INTERACTIVE:true,style:{display:"inline-flex",opacity:l||v||u?1:0},className:rs({isHovered:u,isSelected:l,isDisabled:p,variant:r})}):null]})};$m.displayName="TabButton";var Sm=_t.forwardRef(function({children:t,...o},r){let a=useMemo(()=>_t.Children.map(t,n=>!n||!_t.isValidElement(n)||typeof n.type=="string"?null:{...n.props,id:n.props.value}).filter(Boolean),[t]);return jsx(is,{...o,ref:r,items:a,children:n=>jsx(Item,{title:n.title,children:n.children},n.key)})});Sm.displayName="Tabs";var Dm=({children:e,title:t,value:o})=>(invariant(o,"TabItem requires a value prop"),invariant(t,"TabItem requires a title prop"),invariant(e,"TabItem requires children"),e);Dm.displayName="TabItem";var Mm={ar:{close:"\u0625\u063A\u0644\u0627\u0642"},cs:{close:"Zav\u0159\xEDt"},cy:{close:"Cau"},da:{close:"Luk"},de:{close:"Schlie\xDFen"},el:{close:"\u039A\u03BB\u03B5\u03AF\u03C3\u03B9\u03BC\u03BF"},"en-GB":{close:"Close"},en:{close:"Close"},es:{close:"Cerrar"},fi:{close:"Sulje"},"fr-CA":{close:"Fermer"},fr:{close:"Fermer"},he:{close:"\u05E1\u05D2\u05D9\u05E8\u05D4"},hr:{close:"Zatvori"},id:{close:"Tutup"},it:{close:"Chiudi"},ja:{close:"\u9589\u3058\u308B"},ko:{close:"\uB2EB\uAE30"},ms:{close:"Tutup"},"nb-NO":{close:"Lukk"},nl:{close:"Sluit"},pl:{close:"Zamknij"},"pt-PT":{close:"Fechar"},pt:{close:"Fechar"},ru:{close:"\u0417\u0430\u043A\u0440\u044B\u0442\u044C"},sk:{close:"Zavrie\u0165"},sl:{close:"Zapri"},sv:{close:"St\xE4ng"},th:{close:"\u0E1B\u0E34\u0E14"},tr:{close:"Kapat"},uk:{close:"\u0417\u0430\u043A\u0440\u0438\u0442\u0438"},"zh-Hans":{close:"\u5173\u95ED"},"zh-Hant":{close:"\u95DC\u9589"}};var Nm=z({defaultClassName:"kfun6yt _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6af _1yep5z6ag _1yep5z6ah",variantClassNames:{arrangement:{single:"_1yep5z6vi _1yep5z6vj _1yep5z6vk",multi:"_1yep5z6157 _1yep5z6158 _1yep5z6159",compact:"_1yep5z6157 _1yep5z6158 _1yep5z6159"}},defaultVariants:{},compoundVariants:[]}),Em=z({defaultClassName:"kfun6y0 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6ln",variantClassNames:{variant:{info:"_1yep5z611y",warning:"_1yep5z611u",error:"_1yep5z611m",success:"_1yep5z611q"},arrangement:{single:"kfun6y5 _1yep5z616m _1yep5z616n _1yep5z616o _1yep5z615m _1yep5z615n _1yep5z615o",multi:"kfun6y6",compact:"kfun6y7 _1yep5z6mc _1yep5z6md _1yep5z6me _1yep5z6oo _1yep5z6op _1yep5z6oq _1yep5z6pu _1yep5z6pv _1yep5z6pw _1yep5z6ni _1yep5z6nj _1yep5z6nk _1yep5z615d _1yep5z615e _1yep5z615f _1yep5z6wi _1yep5z6wj _1yep5z6wk"},hasButton:{true:"kfun6y8"},hasCloseButton:{true:"kfun6y9"}},defaultVariants:{},compoundVariants:[[{hasButton:false,arrangement:"single"},"_1yep5z618f _1yep5z618g _1yep5z618h _1yep5z61ar _1yep5z61as _1yep5z61at _1yep5z61bx _1yep5z61by _1yep5z61bz _1yep5z619l _1yep5z619m _1yep5z619n"],[{hasButton:true,arrangement:"compact"},"_1yep5z618f _1yep5z618g _1yep5z618h _1yep5z61ar _1yep5z61as _1yep5z61at _1yep5z61bx _1yep5z61by _1yep5z61bz _1yep5z619l _1yep5z619m _1yep5z619n"],[{hasCloseButton:true,arrangement:"compact"},"_1yep5z61af _1yep5z61ag _1yep5z61ah _1yep5z6199 _1yep5z619a _1yep5z619b"]]}),Lm=z({defaultClassName:"kfun6yq _1yep5z6eu",variantClassNames:{size:{sm:"_1yep5z6106",md:"_1yep5z6109"}},defaultVariants:{},compoundVariants:[]}),Bm=z({defaultClassName:"kfun6ym _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6jj _1yep5z6jk _1yep5z6jl",variantClassNames:{arrangement:{single:"kfun6yn",multi:"_1yep5z615j _1yep5z615k _1yep5z615l",compact:"_1yep5z6n6 _1yep5z6n7 _1yep5z6n8 _1yep5z6pi _1yep5z6pj _1yep5z6pk _1yep5z6qo _1yep5z6qp _1yep5z6qq _1yep5z6oc _1yep5z6od _1yep5z6oe _1yep5z6161 _1yep5z6162 _1yep5z6163"}},defaultVariants:{},compoundVariants:[]}),Am=z({defaultClassName:"kfun6yh _1yep5z6lk",variantClassNames:{variant:{info:"_1yep5z610t",warning:"_1yep5z610p",error:"_1yep5z610h",success:"_1yep5z610l"}},defaultVariants:{},compoundVariants:[]}),Fm=z({defaultClassName:"kfun6ye _1yep5z6eu",variantClassNames:{size:{sm:"_1yep5z6108",md:"_1yep5z610b"}},defaultVariants:{},compoundVariants:[]}),jm=z({defaultClassName:"kfun6ya _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3",variantClassNames:{arrangement:{single:"_1yep5z615m _1yep5z615n _1yep5z615o",multi:"_1yep5z6r0 _1yep5z6r1 _1yep5z6r2 _1yep5z6tc _1yep5z6td _1yep5z6te",compact:"_1yep5z6157 _1yep5z6158 _1yep5z6159"}},defaultVariants:{},compoundVariants:[]});var tP={error:{sm:ErrorAltCircleFilledIcon$1,md:ErrorAltCircleFilledIcon},info:{sm:InfoCircleFilledIcon$1,md:InfoCircleFilledIcon},success:{sm:CheckmarkCircleFilledIcon,md:CheckCircleFilledIcon},warning:{sm:WarningFilledIcon$1,md:WarningFilledIcon}},Na=_t.forwardRef(({className:e,description:t,actionLabel:o,onAction:r,style:a,variant:n="info",title:i,arrangement:s="single",onClose:l,size:p="sm","data-block-id":c,"data-block-class":u,elementProps:m},d)=>{let b=A(Mm),y=o&&jsx(K,{variant:s==="compact"?"tertiary":"ghost",label:o,onPress:r}),f=tP[n][p];return jsxs("div",{className:classNames(Em({variant:n,arrangement:s,hasButton:!!o||!!l,hasCloseButton:!!l}),"BaselineUI-InlineAlert",e),"data-block-id":c,"data-block-class":u,style:a,role:"alert",ref:d,...m?.root,children:[jsxs("div",{className:jm({arrangement:s}),children:[jsx(f,{className:Am({variant:n}),size:16}),jsxs("div",{className:Nm({arrangement:s}),...m?.content,children:[jsx("h3",{className:Fm({size:p}),...m?.title,children:i}),jsx("section",{className:Lm({size:p}),...m?.description,children:t})]}),s==="compact"&&y]}),jsxs("div",{className:Bm({arrangement:s}),children:[s!=="compact"&&y,l?jsx(L,{variant:"secondary",icon:XIcon$2,size:"sm",onPress:l,"aria-label":b.formatMessage("close"),...m?.close}):null]})]})});Na.displayName="InlineAlert";var lt={ar:{add:"\u0625\u0636\u0627\u0641\u0629",addColor:"\u0625\u0636\u0627\u0641\u0629 \u0644\u0648\u0646",cancel:"\u0625\u0644\u063A\u0627\u0621",colorFormat:"\u062A\u0646\u0633\u064A\u0642 \u0627\u0644\u0644\u0648\u0646",colorPresets:"\u0627\u0644\u0623\u0644\u0648\u0627\u0646 \u0627\u0644\u0645\u0633\u0628\u0642\u0629",customColors:"\u0623\u0644\u0648\u0627\u0646 \u0645\u062E\u0635\u0635\u0629",newColor:"\u0644\u0648\u0646 \u0645\u062E\u0635\u0635 \u062C\u062F\u064A\u062F",noColor:"\u0644\u0627 \u064A\u0648\u062C\u062F",removeColor:"\u0625\u0632\u0627\u0644\u0629 \u0627\u0644\u0644\u0648\u0646",transparent:"\u0634\u0641\u0627\u0641"},cs:{add:"P\u0159idat",addColor:"P\u0159idat barvu",cancel:"Zru\u0161it",colorFormat:"Form\xE1t barvy",colorPresets:"P\u0159edvolby barev",customColors:"Vlastn\xED barvy",newColor:"Vlastn\xED barva",noColor:"Nen\xED",removeColor:"Odebrat barvu",transparent:"Pr\u016Fhledn\xE1"},cy:{add:"Ychwanegu",addColor:"Ychwanegu Lliw",cancel:"Canslo",colorFormat:"Fformat Lliw",colorPresets:"Rhagosodiadau Lliw",customColors:"Lliwiau Custom",newColor:"Lliw Personol Newydd",noColor:"Dim",removeColor:"Tynnu Lliw",transparent:"Tryloyw"},da:{add:"Tilf\xF8j",addColor:"Tilf\xF8j Farve",cancel:"Annuller",colorFormat:"Farveformat",colorPresets:"Farvevalg",customColors:"Brugerdefinerede farver",newColor:"Ny tilpasset farve",noColor:"Ingen",removeColor:"Fjern Farve",transparent:"Transparent"},de:{add:"Hinzuf\xFCgen",addColor:"Farbe hinzuf\xFCgen",cancel:"Abbrechen",colorFormat:"Farbformat",colorPresets:"Farbvorlagen",customColors:"Benutzerdefinierte Farben",newColor:"Neue benutzerdefinierte Farbe",noColor:"Kein",removeColor:"Farbe entfernen",transparent:"Transparent"},el:{add:"\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7",addColor:"\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03A7\u03C1\u03CE\u03BC\u03B1\u03C4\u03BF\u03C2",cancel:"\u0391\u03BA\u03CD\u03C1\u03C9\u03C3\u03B7",colorFormat:"\u039C\u03BF\u03C1\u03C6\u03AE \u03C7\u03C1\u03CE\u03BC\u03B1\u03C4\u03BF\u03C2",colorPresets:"\u03A0\u03C1\u03BF\u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AD\u03C2 \u03C7\u03C1\u03C9\u03BC\u03AC\u03C4\u03C9\u03BD",customColors:"\u03A0\u03C1\u03BF\u03C3\u03B1\u03C1\u03BC\u03BF\u03C3\u03BC\u03AD\u03BD\u03B1 \u03A7\u03C1\u03CE\u03BC\u03B1\u03C4\u03B1",newColor:"\u039D\u03AD\u03BF \u03C0\u03C1\u03BF\u03C3\u03B1\u03C1\u03BC\u03BF\u03C3\u03BC\u03AD\u03BD\u03BF \u03C7\u03C1\u03CE\u03BC\u03B1",noColor:"\u039A\u03B1\u03BD\u03AD\u03BD\u03B1\u03C2",removeColor:"\u0391\u03C6\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7 \u03A7\u03C1\u03CE\u03BC\u03B1\u03C4\u03BF\u03C2",transparent:"\u0397\u03BC\u03B9\u03B4\u03B9\u03B1\u03C6\u03B1\u03BD\u03AE\u03C2"},"en-GB":{add:"Add",addColor:"Add Colour",cancel:"Cancel",colorFormat:"Colour Format",colorPresets:"Colour Presets",customColors:"Custom Colours",newColor:"New Custom Colour",noColor:"None",removeColor:"Remove Colour",transparent:"Transparent"},en:{add:"Add",addColor:"Add Color",cancel:"Cancel",colorFormat:"Color Format",colorPresets:"Color Presets",customColors:"Custom Colors",newColor:"New Custom Color",noColor:"None",removeColor:"Remove Color",transparent:"Transparent"},es:{add:"A\xF1adir",addColor:"A\xF1adir color",cancel:"Cancelar",colorFormat:"Formato de color",colorPresets:"Preajustes de color",customColors:"Colores personalizados",newColor:"Nuevo color personalizado",noColor:"Ninguna",removeColor:"Eliminar color",transparent:"Transparente"},fi:{add:"Lis\xE4\xE4",addColor:"Lis\xE4\xE4 v\xE4ri",cancel:"Kumoa",colorFormat:"V\xE4rimuoto",colorPresets:"V\xE4rin esiasetukset",customColors:"Mukautetut v\xE4rit",newColor:"Uusi muokattu v\xE4ri",noColor:"Ei mit\xE4\xE4n",removeColor:"Poista v\xE4ri",transparent:"L\xE4pin\xE4kyv\xE4"},"fr-CA":{add:"Ajouter",addColor:"Ajouter une couleur",cancel:"Annuler",colorFormat:"Format de couleur",colorPresets:"Pr\xE9r\xE9glages de couleur",customColors:"Couleurs personnalis\xE9es",newColor:"Nouvelle couleur personnalis\xE9e",noColor:"Aucune",removeColor:"Supprimer la couleur",transparent:"Transparent"},fr:{add:"Ajouter",addColor:"Ajouter une couleur",cancel:"Annuler",colorFormat:"Format de couleur",colorPresets:"Pr\xE9r\xE9glages de couleur",customColors:"Couleurs personnalis\xE9es",newColor:"Nouvelle couleur personnalis\xE9e",noColor:"Aucune",removeColor:"Supprimer la couleur",transparent:"Transparent"},he:{add:"\u05D4\u05D5\u05E1\u05E4\u05D4",addColor:"\u05D4\u05D5\u05E1\u05E3 \u05E6\u05D1\u05E2",cancel:"\u05D1\u05D9\u05D8\u05D5\u05DC",colorFormat:"\u05E4\u05D5\u05E8\u05DE\u05D8 \u05E6\u05D1\u05E2",colorPresets:"\u05DE\u05E6\u05D1\u05D9 \u05E6\u05D1\u05E2 \u05DE\u05EA\u05D5\u05DB\u05E0\u05EA\u05D9\u05DD",customColors:"\u05E6\u05D1\u05E2\u05D9\u05DD \u05DE\u05D5\u05EA\u05D0\u05DE\u05D9\u05DD \u05D0\u05D9\u05E9\u05D9\u05EA",newColor:"\u05E6\u05D1\u05E2 \u05DE\u05D5\u05EA\u05D0\u05DD \u05D0\u05D9\u05E9\u05D9\u05EA \u05D7\u05D3\u05E9",noColor:"\u05DC\u05DC\u05D0",removeColor:"\u05D4\u05E1\u05E8 \u05E6\u05D1\u05E2",transparent:"\u05E9\u05E7\u05D5\u05E3"},hr:{add:"Dodati",addColor:"Dodaj boju",cancel:"Otka\u017Ei",colorFormat:"Format boje",colorPresets:"Prijedlozi boja",customColors:"Prilago\u0111ene boje",newColor:"Nova prilago\u0111ena boja",noColor:"Prazno",removeColor:"Ukloni boju",transparent:"Prozirna"},id:{add:"Tambah",addColor:"Tambah Warna",cancel:"Batalkan",colorFormat:"Format Warna",colorPresets:"Preset Warna",customColors:"Warna Kustom",newColor:"Warna Khusus Baru",noColor:"Tidak ada",removeColor:"Hapus Warna",transparent:"Transparan"},it:{add:"Aggiungi",addColor:"Aggiungi colore",cancel:"Annulla",colorFormat:"Formato del colore",colorPresets:"Colori predefiniti",customColors:"Colori personalizzati",newColor:"Nuovo colore personalizzato",noColor:"Nessuno",removeColor:"Rimuovi colore",transparent:"Trasparente"},ja:{add:"\u8FFD\u52A0",addColor:"\u8272\u3092\u8FFD\u52A0",cancel:"\u30AD\u30E3\u30F3\u30BB\u30EB",colorFormat:"\u30AB\u30E9\u30FC\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8",colorPresets:"\u30AB\u30E9\u30FC\u30D7\u30EA\u30BB\u30C3\u30C8",customColors:"\u30AB\u30B9\u30BF\u30E0\u30AB\u30E9\u30FC",newColor:"\u65B0\u898F\u30AB\u30B9\u30BF\u30E0\u30AB\u30E9\u30FC",noColor:"\u306A\u3057",removeColor:"\u8272\u3092\u524A\u9664",transparent:"\u900F\u660E"},ko:{add:"\uCD94\uAC00",addColor:"\uC0C9\uC0C1 \uCD94\uAC00",cancel:"\uCDE8\uC18C",colorFormat:"\uC0C9\uC0C1 \uD615\uC2DD",colorPresets:"\uC0C9\uC0C1 \uBBF8\uB9AC\uC124\uC815",customColors:"\uC0AC\uC6A9\uC790 \uC815\uC758 \uC0C9\uC0C1",newColor:"\uC0C8\uB85C\uC6B4 \uC0AC\uC6A9\uC790\uC9C0\uC815 \uC0C9\uC0C1",noColor:"\uC5C6\uC74C",removeColor:"\uC0C9\uC0C1 \uC81C\uAC70",transparent:"\uD22C\uBA85"},ms:{add:"Tambah",addColor:"Tambah Warna",cancel:"Batal",colorFormat:"Format Warna",colorPresets:"Praset Warna",customColors:"Warna Kustom",newColor:"Warna Tersuai Baharu",noColor:"Tiada",removeColor:"Buang Warna",transparent:"Lut Sinar"},"nb-NO":{add:"Legg til",addColor:"Legg til farge",cancel:"Avbryt",colorFormat:"Fargeformat",colorPresets:"Fargeinnstillinger",customColors:"Egendefinerte farger",newColor:"Ny tilpasset farge",noColor:"Ingen",removeColor:"Fjern farge",transparent:"Gjennomsiktig"},nl:{add:"Voeg toe",addColor:"Kleur toevoegen",cancel:"Annuleer",colorFormat:"Kleurformaat",colorPresets:"Kleurvoorinstellingen",customColors:"Aangepaste kleuren",newColor:"Nieuwe aangepaste kleur",noColor:"Geen",removeColor:"Kleur verwijderen",transparent:"Doorzichtig"},pl:{add:"Dodaj",addColor:"Dodaj kolor",cancel:"Anuluj",colorFormat:"Format koloru",colorPresets:"Wst\u0119pnie ustawione kolory",customColors:"Niestandardowe kolory",newColor:"Nowy kolor niestandardowy",noColor:"Brak",removeColor:"Usu\u0144 kolor",transparent:"Prze\u015Bwiecaj\u0105ce"},"pt-PT":{add:"Adicionar",addColor:"Adicionar cor",cancel:"Cancelar",colorFormat:"Formato de cor",colorPresets:"Predefini\xE7\xF5es de cor",customColors:"Cores personalizadas",newColor:"Nova cor personalizada",noColor:"Nenhum",removeColor:"Remover cor",transparent:"Transparente"},pt:{add:"Adicionar",addColor:"Adicionar cor",cancel:"Cancelar",colorFormat:"Formato de cor",colorPresets:"Pr\xE9-ajustes de Cores",customColors:"Cores personalizadas",newColor:"Nova Cor Personalizada",noColor:"Nenhum",removeColor:"Remover cor",transparent:"Transparente"},ru:{add:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C",addColor:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0446\u0432\u0435\u0442",cancel:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C",colorFormat:"\u0424\u043E\u0440\u043C\u0430\u0442 \u0446\u0432\u0435\u0442\u0430",colorPresets:"\u0411\u0438\u0431\u043B\u0438\u043E\u0442\u0435\u043A\u0430 \u0446\u0432\u0435\u0442\u043E\u0432",customColors:"\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0435 \u0446\u0432\u0435\u0442\u0430",newColor:"\u041D\u043E\u0432\u044B\u0439 \u0441\u043E\u0431\u0441\u0442\u0432\u0435\u043D\u043D\u044B\u0439 \u0446\u0432\u0435\u0442",noColor:"\u041D\u0435\u0442",removeColor:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0446\u0432\u0435\u0442",transparent:"\u041F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u0439"},sk:{add:"Prida\u0165",addColor:"Prida\u0165 farbu",cancel:"Zru\u0161i\u0165",colorFormat:"Form\xE1t farby",colorPresets:"Predvo\u013Eby farieb",customColors:"Vlastn\xE9 farby",newColor:"Vlastn\xE1 farba",noColor:"\u017Diadny",removeColor:"Odstr\xE1ni\u0165 farbu",transparent:"Prieh\u013Eadn\xE1"},sl:{add:"Dodaj",addColor:"Dodaj barvo",cancel:"Prekli\u010Di",colorFormat:"Barvni format",colorPresets:"Barvne predloge",customColors:"Prilagojene barve",newColor:"Nova barva po meri",noColor:"Prazna stran",removeColor:"Odstrani barvo",transparent:"Prosojna"},sv:{add:"L\xE4gg till",addColor:"L\xE4gg till f\xE4rg",cancel:"Avbryt",colorFormat:"F\xE4rgformat",colorPresets:"F\xF6rval f\xF6r f\xE4rger",customColors:"Anpassade f\xE4rger",newColor:"Ny anpassad f\xE4rg",noColor:"Ingen",removeColor:"Ta bort f\xE4rg",transparent:"Genomskinligt"},th:{add:"\u0E40\u0E1E\u0E34\u0E48\u0E21",addColor:"\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E2A\u0E35",cancel:"\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01",colorFormat:"\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E2A\u0E35",colorPresets:"\u0E04\u0E48\u0E32\u0E2A\u0E35\u0E17\u0E35\u0E48\u0E15\u0E31\u0E49\u0E07\u0E44\u0E27\u0E49\u0E25\u0E48\u0E27\u0E07\u0E2B\u0E19\u0E49\u0E32",customColors:"\u0E2A\u0E35\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E40\u0E2D\u0E07",newColor:"\u0E2A\u0E35\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E40\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48",noColor:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E40\u0E25\u0E22",removeColor:"\u0E25\u0E1A\u0E2A\u0E35",transparent:"\u0E42\u0E1B\u0E23\u0E48\u0E07\u0E43\u0E2A"},tr:{add:"Ekle",addColor:"Renk Ekle",cancel:"Vazge\xE7",colorFormat:"Renk Format\u0131",colorPresets:"Renk \xD6nayarlar\u0131",customColors:"\xD6zel Renkler",newColor:"Yeni \xF6zel renk",noColor:"Hi\xE7biri",removeColor:"Rengi Kald\u0131r",transparent:"\u015Eeffaf"},uk:{add:"\u0414\u043E\u0434\u0430\u0442\u0438",addColor:"\u0414\u043E\u0434\u0430\u0442\u0438 \u043A\u043E\u043B\u0456\u0440",cancel:"\u0421\u043A\u0430\u0441\u0443\u0432\u0430\u0442\u0438",colorFormat:"\u0424\u043E\u0440\u043C\u0430\u0442 \u043A\u043E\u043B\u044C\u043E\u0440\u0443",colorPresets:"\u0411\u0456\u0431\u043B\u0456\u043E\u0442\u0435\u043A\u0430 \u043A\u043E\u043B\u044C\u043E\u0440\u0456\u0432",customColors:"\u041A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0446\u044C\u043A\u0456 \u043A\u043E\u043B\u044C\u043E\u0440\u0438",newColor:"\u041D\u043E\u0432\u0438\u0439 \u0432\u043B\u0430\u0441\u043D\u0438\u0439 \u043A\u043E\u043B\u0456\u0440",noColor:"\u041D\u0435\u043C\u0430\u0454",removeColor:"\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438 \u043A\u043E\u043B\u0456\u0440",transparent:"\u041F\u0440\u043E\u0437\u043E\u0440\u0438\u0439"},"zh-Hans":{add:"\u6DFB\u52A0",addColor:"\u6DFB\u52A0\u989C\u8272",cancel:"\u53D6\u6D88",colorFormat:"\u989C\u8272\u683C\u5F0F",colorPresets:"\u989C\u8272\u9884\u8BBE",customColors:"\u81EA\u5B9A\u4E49\u989C\u8272",newColor:"\u65B0\u81EA\u5B9A\u4E49\u989C\u8272",noColor:"\u65E0",removeColor:"\u79FB\u9664\u989C\u8272",transparent:"\u900F\u660E"},"zh-Hant":{add:"\u52A0\u5165",addColor:"\u6DFB\u52A0\u984F\u8272",cancel:"\u53D6\u6D88",colorFormat:"\u984F\u8272\u683C\u5F0F",colorPresets:"\u984F\u8272\u9810\u8A2D\u9805",customColors:"\u81EA\u8A02\u984F\u8272",newColor:"\u65B0\u81EA\u8A02\u984F\u8272",noColor:"\u7121",removeColor:"\u79FB\u9664\u984F\u8272",transparent:"\u900F\u660E"}};var Ea=({children:e})=>{let{triggerProps:t}=_t.useContext(xt);return jsx(PressResponder,{...t,children:e})};Ea.displayName="ModalTrigger";var lP=({children:e})=>{let{state:t}=_t.useContext(xt);return jsx(PressResponder,{onPress:()=>{t?.close();},children:e})};var Om="_1dbkl53 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6ln",Hm="_1dbkl5e",Vm=z({defaultClassName:"_1dbkl54 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6ly _1yep5z6lq _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6eu _1yep5z6lp _1yep5z6dy",variantClassNames:{isHovered:{true:"_1dbkl55"},isFocusVisible:{true:"_1dbkl56"},isDisabled:{true:"z9nup82 _1yep5z6111"},labelPosition:{top:"_1dbkl58",start:"_1dbkl59"}},defaultVariants:{},compoundVariants:[]}),Um="_1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6kj _1yep5z6kk _1yep5z6kl",qm=z({defaultClassName:"_1dbkl50 _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6dy _1yep5z6ev",variantClassNames:{labelPosition:{top:"_1yep5z6oi _1yep5z6oj _1yep5z6ok",start:"_1dbkl52"}},defaultVariants:{},compoundVariants:[]}),La="_1dbkl5l _1yep5z6iy _1yep5z6iz _1yep5z6j0 _1yep5z69f _1yep5z69g _1yep5z69h",Km="_1dbkl5f z9nup86",Ba="_1dbkl5m _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6id _1yep5z6ie _1yep5z6if",Gm="_1dbkl5k _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6lq",Wm="_1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6kj _1yep5z6kk _1yep5z6kl _1yep5z6dy _1yep5z6ev _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6jj _1yep5z6jk _1yep5z6jl",Aa=z({defaultClassName:"_1dbkl5h _1dbkl5g _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6g1",variantClassNames:{includesCustomColorPicker:{true:"_1yep5z6n6 _1yep5z6n7 _1yep5z6n8"}},defaultVariants:{},compoundVariants:[]}),ps="_1dbkl5v _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3",Ym=z({defaultClassName:"_1dbkl5q _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6br _1yep5z6bs _1yep5z6bt _1yep5z6d3 _1yep5z6d4 _1yep5z6d5 _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6lz _1yep5z6h4 _1yep5z6lq _1yep5z6eu _1yep5z6dy",variantClassNames:{isFocused:{true:"_1dbkl5r _1yep5z6134"},isHovered:{true:"_1dbkl5s"},allowAlpha:{false:"_1yep5z6x9 _1yep5z6xa _1yep5z6xb _1yep5z6yl _1yep5z6ym _1yep5z6yn _1yep5z617q"}},defaultVariants:{},compoundVariants:[[{isHovered:true,isFocused:false},"_1yep5z61pb"]]}),Xm=z({defaultClassName:"_1dbkl5a _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62c _1yep5z62d _1yep5z62e _1yep5z63i _1yep5z63j _1yep5z63k _1yep5z616 _1yep5z617 _1yep5z618 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j4 _1yep5z6j5 _1yep5z6j6 _1yep5z69c _1yep5z69d _1yep5z69e _1yep5z6f5 _1yep5z6lp _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6la _1yep5z6ld",variantClassNames:{isHovered:{true:"_1yep5z6126"},isFocusVisible:{true:"_1yep5z617w _1yep5z617u _1yep5z617x _1yep5z6140"},isDisabled:{true:"_1yep5z611a"}},defaultVariants:{},compoundVariants:[]}),Fa="_1dbkl5g",lr="_1dbkl5u",ja="_1dbkl5j _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j4 _1yep5z6j5 _1yep5z6j6 _1yep5z69f _1yep5z69g _1yep5z69h",cs="_1dbkl5x",Zm="_1dbkl5w",ds="_1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j4 _1yep5z6j5 _1yep5z6j6 _1yep5z69l _1yep5z69m _1yep5z69n",Oa=z({defaultClassName:"_1dbkl5n _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6lu _1yep5z6ig _1yep5z6ih _1yep5z6ii _1yep5z6lz _1yep5z6m2",variantClassNames:{isFocusVisible:{true:"_1dbkl5o _1yep5z617u _1yep5z6140 _1yep5z617w"}},defaultVariants:{},compoundVariants:[]}),us="z9nup83 z9nup85 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6lg _1yep5z6lh _1yep5z6lj _1yep5z6li _1yep5z6ig _1yep5z6ih _1yep5z6ii";var Jm=z({defaultClassName:"_1344e9q0 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6id _1yep5z6ie _1yep5z6if _1yep5z6lk _1yep5z6ic _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6kd _1yep5z6ke _1yep5z6kf",variantClassNames:{isFocusVisible:{true:"_1344e9q1"},isDisabled:{true:"_1344e9q2"},removeBlendMode:{true:"_1344e9q3"},isSelected:{true:"_1yep5z617w _1yep5z617u _1yep5z6140 _1yep5z617z"},isHovered:{true:"_1344e9q5"}},defaultVariants:{},compoundVariants:[[{isSelected:false,isFocusVisible:true},"_1344e9q6"],[{isSelected:true,isFocusVisible:true},"_1344e9q7 _1yep5z61tz _1yep5z61tx _1yep5z61q3 _1yep5z61u2"],[{isSelected:true,isDisabled:true},"_1yep5z61tz _1yep5z61tx _1yep5z61q3 _1yep5z61u2 _1yep5z61qd"],[{isHovered:true,isSelected:false},"_1yep5z61u2 _1yep5z61tz _1yep5z61tx _1yep5z61q7"]]}),Qm="_1yep5z6f6",ef="_1344e9q9 _1yep5z6fl";var pt=_t.forwardRef(({color:e,isFocusVisible:t,isSelected:o,isInteractive:r,isDisabled:a,style:n,className:i,id:s,tooltip:l,isIndeterminate:p,indeterminateIcon:c=HelpIcon,"data-block-id":u,"data-block-class":m,...d},b)=>{let y=e&&e!==Be&&(typeof e=="string"?parseColor(e):e),{formatMessage:f}=A(),g=!y,{colorSwatchProps:v}=useColorSwatch({color:g?"#000000":e}),{hoverProps:_,isHovered:h}=useHover({isDisabled:a||!r}),x=filterTruthyValues({"data-focus-visible":t,"data-selected":o,"data-hovered":h,"data-block-id":u,"data-block-class":m,"data-disabled":a,"data-interactive":r,"data-indeterminate":p}),w=g?f(tf.none):v["aria-label"],C=d["aria-label"]??w,{tooltipProps:I}=xe({tooltip:l,label:C}),P=jsx("div",{...mergeProps(_,x,g?{}:v),style:n,"aria-label":g?f(tf.none):v["aria-label"],role:"img",className:classNames(Jm({removeBlendMode:g,isFocusVisible:t,isDisabled:!!a,isSelected:!!o,isHovered:h}),"BaselineUI-ColorSwatch",i),ref:b,id:s,...d,children:jsxs(D,{display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"full",height:"full",width:"full",opacity:a?"medium":void 0,style:y&&!p?of(y,4):void 0,children:[g&&!p?jsx("div",{className:ef}):null,p&&c?jsx(c,{role:"presentation",size:16,className:Qm,"aria-hidden":"true"}):null]})});return I&&!a?jsx(J,{...I,children:jsx(ma,{children:P})}):P});pt.displayName="ColorSwatch";var tf=W({none:{id:"none",defaultMessage:"None"}});var af=[{id:"hex",label:"HEX"},{id:"rgb",label:"RGB"}],dr=parseColor("#000000").toFormat("hsla"),ue="hsla",cr="hexa";function wt(e){return typeof e=="string"?parseColor(e).toFormat(ue):e?e.toFormat(ue):null}function nf(e,t){return e?.getChannelValue("alpha")?t?.toString(cr)===e.toString(cr):!t?.getChannelValue("alpha")}function sf(e,t,o){return t?.label?t.label:e?.getChannelValue("alpha")===0?o:e?.toString("rgba")}var Be="NONE";function lf(e,t){let o=t?.map(a=>({id:parseColor(a.color).toString(cr),label:a.label}))||[],r={id:Be,label:e};return [...o,r]}var Ha=(e,{optionProps:t,isFocusVisible:o,isSelected:r},a)=>(invariant(e.value&&"label"in e.value,"Item must have label"),jsx("li",{...t,ref:a,className:Gm,children:jsx(pt,{color:e.value.id,isFocusVisible:o,isSelected:r,"aria-label":e.value.label,isInteractive:true})})),of=(e,t=4)=>{let o=e.getChannelValue("alpha")===0,r=`repeating-conic-gradient(transparent 0% 25%, ${themeVars.color.background.secondary.medium} 25% 50%)`;return {backgroundImage:o?r:`linear-gradient(${e.toString("hexa")}, ${e.toString("hexa")}), ${r}`,backgroundSize:`${t}px ${t}px`}};var cf=({value:e,...t})=>{let o=_t.useRef(null),r=_t.useRef(null),a=_t.useRef(null),n=useColorAreaState({...t,value:e}),{colorAreaProps:i,xInputProps:s,yInputProps:l,thumbProps:p}=useColorArea({...t,value:e,inputXRef:o,inputYRef:r,containerRef:a},n);useEffect(()=>{o.current?.focus();},[]);let{focusProps:c,isFocusVisible:u}=useFocusRing();return jsx("div",{ref:a,...i,className:classNames(Om,"BaselineUI-ColorInput-ColorArea"),children:jsxs("div",{...p,className:classNames(Oa({isFocusVisible:u}),"BaselineUI-ColorInput-ColorAreaThumb"),style:{...p.style,transform:"translate(-50%, -50%)",backgroundColor:wt(e)?.withChannelValue("alpha",1).toString("css")},children:[jsx("input",{ref:o,...s,...c}),jsx("input",{ref:r,...l,...c})]})})};var mf=({color:e,setColor:t,allowAlpha:o,...r})=>{let a=useColorFieldState({value:e,onChange:u=>{t(wt(u)?.toFormat(ue).withChannelValue("alpha",e.getChannelValue("alpha")??1)||dr);}}),n=_t.useRef(null),{inputProps:i}=useColorField({...r,"aria-label":"Hex"},a,n),{focusProps:s,isFocused:l}=useFocusRing({isTextInput:true}),{hoverProps:p,isHovered:c}=useHover({});return jsxs("div",{className:classNames(ps,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":o?"hexa":"hex",children:[jsx("input",{...mergeProps(i,s,p),ref:n,className:Ym({isFocused:l,isHovered:c,allowAlpha:o})}),o?jsx(yf,{color:e,setColor:t}):null]})},ff=({color:e,setColor:t,allowAlpha:o})=>{let r=e.toFormat("rgba"),{locale:a}=useLocale();return jsxs("div",{className:classNames(ps,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":o?"rgba":"rgb",children:[jsx(Ve,{"aria-label":e.getChannelName("red",a),value:r.getChannelValue("red"),showStepper:false,className:lr,onChange:n=>{t(r.withChannelValue("red",n).toFormat(ue));},step:1,minValue:0,maxValue:255}),jsx(Ve,{"aria-label":e.getChannelName("green",a),value:r.getChannelValue("green"),showStepper:false,className:lr,onChange:n=>{t(r.withChannelValue("green",n).toFormat(ue));},step:1,minValue:0,maxValue:255}),jsx(Ve,{"aria-label":e.getChannelName("blue",a),value:r.getChannelValue("blue"),showStepper:false,className:lr,onChange:n=>{t(r.withChannelValue("blue",n).toFormat(ue));},step:1,minValue:0,maxValue:255}),o?jsx(yf,{color:e,setColor:t}):null]})},MP={style:"percent",maximumFractionDigits:0},yf=({color:e,setColor:t})=>{let{locale:o}=useLocale(),r=useCallback(a=>{t(e.withChannelValue("alpha",a));},[e,t]);return jsx(Ve,{"aria-label":e.getChannelName("alpha",o),value:e.getChannelValue("alpha"),formatOptions:MP,className:lr,showStepper:false,onChange:r,minValue:0,maxValue:1})};var bs=({channel:e,...t})=>{let{locale:o}=useLocale(),r=useColorSliderState({...t,channel:e,locale:o}),a=_t.useRef(null),n=_t.useRef(null),{trackProps:i,thumbProps:s,inputProps:l}=useColorSlider({...t,channel:e,trackRef:a,inputRef:n,"aria-label":r.value.getChannelName(e,o)},r),{focusProps:p,isFocusVisible:c}=useFocusRing();return jsxs("div",{className:classNames(Ba,{[hc({size:"xs"})]:e==="alpha"},"BaselineUI-ColorInput-ColorSlider"),"data-channel":e,...i,ref:a,children:[e==="alpha"&&jsx("div",{className:us}),jsx("div",{className:Ba,style:i.style}),jsxs("div",{className:classNames(Oa({isFocusVisible:c}),"BaselineUI-ColorInput-ColorSliderThumb"),...s,children:[jsx("div",{className:us,style:{backgroundColor:"#ffffff"}}),jsx("div",{style:{backgroundColor:r.getDisplayColor().toString("css"),height:8},className:Ba}),jsx(VisuallyHidden,{children:jsx("input",{ref:n,...l,...p})})]})]})};var Va=({color:e,setColor:t,allowAlpha:o,onChangeEnd:r})=>{let[a,n]=_t.useState("hex"),{formatMessage:i}=A(lt);return jsxs(Fragment,{children:[jsx(cf,{value:e,xChannel:"saturation",yChannel:"lightness",onChange:t,onChangeEnd:r}),jsxs("div",{className:ds,children:[jsx(bs,{channel:"hue",value:e,onChange:t,onChangeEnd:r}),o?jsx(bs,{channel:"alpha",value:e,onChange:t,onChangeEnd:r}):null]}),jsxs("div",{className:classNames(ds,sprinkles.variants({paddingTop:"none",gap:"sm"})),children:[jsx(st,{label:i("colorFormat"),labelPosition:"start",variant:"ghost",items:af,selectedKey:a,onSelectionChange:s=>{n(s);}}),a==="hex"&&jsx(mf,{color:e,setColor:s=>{t(s),r?.(s);},allowAlpha:o}),a==="rgb"&&jsx(ff,{color:e,setColor:s=>{t(s),r?.(s);},allowAlpha:o})]})]})};var xf=({color:e,setColor:t,storePickedColorKey:o,addColorButtonLabel:r,removeColorButtonLabel:a,customColorsLabel:n,pickerMode:i,allowAlpha:s})=>{let{locale:l}=useLocale(),{formatMessage:p}=A(lt),c=_t.useRef(null),u=Ee(c.current),[m,d]=bc(o,[]),b=_t.useRef(null),[y,f]=_t.useState(e),g=_t.useMemo(()=>m.map(C=>({id:C,label:parseColor(C).getColorName(l),description:C})),[m,l]),v=useCallback(()=>{let C=i==="active"?e:y;if(m.includes(C.toString(ue))){b.current?.querySelector(`[data-key='${C.toString(ue)}']`)?.classList.add(cs);return}d([...m,C.toString(ue)]);},[m,e,d,y,i]);useEffect(()=>{let C=b.current;function I(P){P.animationName===Zm&&P.target?.classList.remove(cs);}return C?.addEventListener("animationend",I),()=>{C?.removeEventListener("animationend",I);}},[]);let _=useId(),h=jsx(L,{ref:c,variant:"secondary",size:"md","aria-label":r,icon:PlusIcon$1,onPress:i==="active"?v:void 0}),x=useCallback(C=>jsxs(ke,{size:"content",className:Aa({includesCustomColorPicker:true}),style:{paddingBlockEnd:0},"aria-label":p("newColor"),children:[jsx(Va,{color:y,setColor:f,allowAlpha:s}),jsx(q,{}),jsx(D,{padding:"lg",display:"flex",flexDirection:"row-reverse",children:jsxs(D,{display:"inline-flex",gap:"lg",children:[jsx(K,{label:p("cancel"),size:"sm",variant:"secondary",onPress:C}),jsx(K,{label:p("add"),variant:"primary",onPress:()=>{v(),C();},size:"sm"})]})})]}),[y,v,p,s]),w=useCallback(C=>{invariant(C instanceof Set,"Key must be a set");let I=[...C][0];I&&t(parseColor(I).toFormat(ue));},[t]);return jsxs(Fragment,{children:[jsx(q,{}),jsxs("div",{className:classNames(Wm,"BaselineUI-ColorInput-CustomColors"),children:[jsx("span",{id:_,children:n}),jsxs(D,{display:"flex",children:[!!m.length&&m.includes(e.toString(ue))&&jsx(L,{variant:"secondary",size:"md",elementType:"div",icon:MinusIcon$2,"aria-label":a,onPress:()=>{d(m.filter(C=>C!==e.toString(ue)));}}),i==="active"&&h,i==="lazy"&&(u==="mobile"?jsxs(Le,{children:[jsx(Ea,{children:h}),jsx(Ue,{style:{zIndex:1e5},children:({close:C})=>x(C)})]}):jsxs(je,{type:"dialog",children:[jsx(Oe,{children:h}),jsx(ie,{placement:"right top",className:Fa,offset:6,children:({close:C})=>x(C)})]}))]})]}),!!m.length&&jsx(fe,{items:g,layout:"grid","aria-labelledby":_,className:classNames(La,ja,sprinkles.variants({paddingTop:"xs"}),"BaselineUI-ColorInput-CustomColorsListBox"),renderOption:Ha,ref:b,autoFocus:false,selectionMode:"single",selectedKeys:[e.toString(ue)],onSelectionChange:w})]})};var _s=_t.forwardRef(({setColor:e,color:t,triggerRef:o,autoFocus:r,presets:a,state:n},i)=>{let{formatMessage:s}=A(lt),l=useCallback(p=>{if(p instanceof Set&&p.size){let c=[...p][0],u=a.find(m=>m.id===c);invariant(u,"Preset not found"),e(u.id===Be?null:parseColor(u.id).toFormat(ue)),n.close();}},[n,a,e]);return jsx("div",{className:classNames(ja,"BaselineUI-ColorInput-Presets"),style:{minWidth:o.current?.offsetWidth},ref:i,children:jsx(fe,{autoFocus:r,items:a,layout:"grid","aria-label":s("colorPresets"),className:La,renderOption:Ha,selectionMode:"single",selectedKeys:[t?.toString(cr)||Be],onSelectionChange:l})})});_s.displayName="ColorPresetList";var mr=_t.forwardRef(({color:e,colorLabel:t,colorName:o,isIndeterminate:r,indeterminateIcon:a,...n},i)=>{let s=_t.useRef(null),{hoverProps:l,isHovered:p}=useHover({isDisabled:n.isDisabled}),{buttonProps:c,isPressed:u}=useButton(n,s),{isFocusVisible:m,focusProps:d}=useFocusRing(),b=filterTruthyValues({"data-block-id":n["data-block-id"],"data-focused":m,"data-focus-visible":m,"data-disabled":n.isDisabled,"data-hovered":p,"data-pressed":u}),y=Lr(),f=Lr();return jsxs("button",{...mergeProps(c,l,d,b),style:n.style,className:classNames(Vm({isHovered:p,isFocusVisible:m||n.isOpen,isDisabled:n.isDisabled,labelPosition:n.labelPosition}),"BaselineUI-ColorInputButton",n.className),ref:M(i,s),id:y,"aria-labelledby":n["aria-labelledby"]||`${y} ${f}`,children:[jsx(pt,{color:e?.toString("hexa"),isIndeterminate:r,indeterminateIcon:a}),t?jsx("div",{className:Km,id:f,"aria-hidden":"true",children:o}):typeof o=="string"&&jsx(VisuallyHidden,{children:o})]})});mr.displayName="ColorInputButton";var Ka=_t.forwardRef(({className:e,style:t,icon:o,...r},a)=>{let n=_t.useRef(null),{hoverProps:i,isHovered:s}=useHover({isDisabled:r.isDisabled}),{buttonProps:l,isPressed:p}=useButton(r,n),{isFocusVisible:c,focusProps:u}=useFocusRing(),m=filterTruthyValues({"data-block-id":r["data-block-id"],"data-focused":c,"data-focus-visible":c,"data-disabled":r.isDisabled,"data-hovered":s,"data-pressed":p});return jsxs("button",{...mergeProps(l,i,u,m),ref:M(a,n),style:t,className:classNames(Xm({isHovered:s||p||r.isOpen,isFocusVisible:c,isDisabled:r.isDisabled}),"BaselineUI-IconColorInputButton","BaselineUI-IconColorInput-Button",e),children:[jsx(o,{size:16}),jsx("div",{className:Hm,style:{backgroundColor:r.color||void 0}})]})});Ka.displayName="IconColorInputButton";function Df({colorLabel:e,color:t,presets:o,isIndeterminate:r}){let{formatMessage:a}=A(),{locale:n}=useLocale(),i=useMemo(()=>r?{id:"indeterminate",label:a(Sf.indeterminate)}:o.find(p=>p.id===Be?!t:t?nf(t,parseColor(p.id)):false),[o,t,r,a]),s=useMemo(()=>{if(typeof e=="function")return e?.(t,{isIndeterminate:!!r});if(typeof e=="boolean")return e?sf(t,i,a(Sf.transparent)):false;throw new TypeError("`colorLabel` must be a function or a boolean")},[t,e,a,i,r]),l=useMemo(()=>{if(i?.label)return i.label;t?.getColorName(n);},[t,n,i?.label]);return {colorName:s,humanReadableName:l}}var Sf=W({transparent:{defaultMessage:"Transparent",id:"transparent"},indeterminate:{defaultMessage:"Indeterminate",id:"indeterminate"}});var yo=_t.forwardRef(({className:e,style:t,allowRemoval:o,allowAlpha:r=true,presets:a,labelPosition:n="top",colorLabel:i=true,includePicker:s=true,onChange:l,onChangeEnd:p,defaultValue:c,storePickedColorKey:u="baselinePickedColor",value:m,addColorButtonLabel:d,removeColorButtonLabel:b,customColorsLabel:y,renderTriggerButton:f=({isOpen:S,color:k,ref:T,colorName:$,triggerProps:R,labelId:N,isIndeterminate:E,indeterminateIcon:F})=>jsx(mr,{...mergeProps(R,{...I.label?{"aria-labelledby":N}:{"aria-label":I["aria-label"]}}),ref:T,isOpen:S,isDisabled:I.isDisabled,labelPosition:n,color:k,colorLabel:i,colorName:$,isIndeterminate:E,indeterminateIcon:F}),pickerMode:g="active",offset:v=2,placement:_=n==="start"?"bottom end":"bottom start","data-block-id":h,"data-block-class":x,isIndeterminate:w,indeterminateIcon:C,...I},P)=>{let S=_t.useRef(null),k=_t.useRef(null),T=useOverlayTriggerState(I),{triggerProps:$,overlayProps:R}=useOverlayTrigger({type:"listbox"},T,S),N=ye(I.portalContainer),[E,F]=useControlledState(m===void 0?void 0:wt(m),wt(c),Y=>l?.(Y?.toFormat("rgba")||null)),{formatMessage:B}=A(lt),j=useMemo(()=>lf(B(Ga.noColor),a),[a,B]),O=useId(),{colorName:H}=Df({colorLabel:i,color:E,presets:j,isIndeterminate:w}),Q=useMemo(()=>j.filter(Y=>o||Y.id!==Be),[j,o]),V=d||B(Ga.addColor),U=b||B(Ga.removeColor),re=y||B(Ga.customColors),pe=jsx(xf,{color:E||dr,setColor:Y=>{F(Y),p?.(Y?.toFormat("rgba")||null);},storePickedColorKey:u,addColorButtonLabel:V,removeColorButtonLabel:U,customColorsLabel:re,pickerMode:g,allowAlpha:r});return jsxs(Fragment,{children:[jsxs("div",{className:classNames({[Um]:n==="start"},"BaselineUI-ColorInput-Trigger",e),"data-block-id":h,"data-block-class":x,style:t,ref:P,children:[I.label?jsx("label",{id:O,className:qm({labelPosition:n}),children:I.label}):null,f({isOpen:T.isOpen,color:E,ref:S,colorName:H,triggerProps:$,labelId:O,isIndeterminate:w,indeterminateIcon:C})]}),jsx(ie,{...I,portalContainer:N,placement:_,state:T,offset:v,className:classNames(Fa,"BaselineUI-ColorInput-Popover"),triggerRef:S,overlayProps:R,children:jsxs(ke,{size:"content",className:Aa({includesCustomColorPicker:s}),ref:k,"aria-labelledby":O,"aria-label":I["aria-label"],children:[s&&g==="active"?jsxs(Fragment,{children:[jsx(Va,{color:E||dr,setColor:F,allowAlpha:r,onChangeEnd:Y=>{p?.(Y?.toFormat("rgba")||null);}}),pe]}):null,!!Q.length&&jsxs(Fragment,{children:[s&&g==="active"?jsx(q,{}):null,jsx(_s,{autoFocus:s&&g==="active"?false:"first",state:T,triggerRef:S,presets:Q,color:E,setColor:Y=>{F(Y),p?.(Y?.toFormat("rgba")||null);}})]}),s&&g==="lazy"?pe:null]})})]})});yo.displayName="ColorInput";var Ga=W({addColor:{defaultMessage:"Add color",id:"addColor"},removeColor:{defaultMessage:"Remove color",id:"removeColor"},customColors:{defaultMessage:"Custom colors",id:"customColors"},noColor:{defaultMessage:"No color",id:"noColor"},transparent:{defaultMessage:"Transparent",id:"transparent"}});var Lf=_t.forwardRef(({className:e,style:t,icon:o,variant:r="standard","data-block-id":a,tooltip:n=true,iconTooltip:i=true,...s},l)=>{let p=_t.useRef(null),{tooltipProps:c}=xe({label:s["aria-label"],tooltip:n}),u=useCallback(({isOpen:m,color:d,ref:b,colorName:y,triggerProps:f,isIndeterminate:g,indeterminateIcon:v})=>jsx(J,{...c,children:r==="standard"?jsx(mr,{...f,"aria-label":s["aria-label"],ref:b,isOpen:m,isDisabled:s.isDisabled,color:d,colorLabel:false,colorName:y,isIndeterminate:g,indeterminateIcon:v}):jsx(Ka,{...f,isOpen:m,icon:TextIcon,color:d?.toString("hexa"),ref:b,isDisabled:s.isDisabled,"aria-label":s["aria-label"],isIndeterminate:g,indeterminateIcon:v})}),[s,c,r]);return jsxs(D,{display:"flex",flexDirection:"row",gap:"md",paddingX:r==="standard"?"md":"none",alignItems:"center",className:classNames("BaselineUI-IconColorInput",e),"data-block-id":a,style:t,ref:M(l,p),children:[r==="standard"&&o?jsx(to,{icon:o,label:s["aria-label"],tooltip:i,"aria-hidden":"true",size:24,className:sprinkles({color:"icon.primary"})}):null,jsx(yo,{...s,colorLabel:false,renderTriggerButton:u})]})});Lf.displayName="IconColorInput";var Bf={ar:{redo:"\u0625\u0639\u0627\u062F\u0629",undo:"\u062A\u0631\u0627\u062C\u0639"},cs:{redo:"Opakovat",undo:"Zru\u0161it"},cy:{redo:"Ail-wneud",undo:"Dad-wneud"},da:{redo:"Gentag",undo:"Fortryd"},de:{redo:"Wiederholen",undo:"R\xFCckg\xE4ngig machen"},el:{redo:"\u0395\u03C0\u03B1\u03BD\u03AC\u03BB\u03B7\u03C8\u03B7",undo:"\u0391\u03BD\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7"},"en-GB":{redo:"Redo",undo:"Undo"},en:{redo:"Redo",undo:"Undo"},es:{redo:"Rehacer",undo:"Deshacer"},fi:{redo:"Tee sittenkin",undo:"Peru"},"fr-CA":{redo:"R\xE9tablir",undo:"Annuler"},fr:{redo:"R\xE9tablir",undo:"Annuler"},he:{redo:"\u05D1\u05D9\u05E6\u05D5\u05E2 \u05DE\u05D7\u05D3\u05E9",undo:"\u05D1\u05D9\u05D8\u05D5\u05DC \u05E4\u05E2\u05D5\u05DC\u05D4"},hr:{redo:"Ponovi",undo:"Vrati"},id:{redo:"Ulangi",undo:"Kembalikan"},it:{redo:"Ripristina",undo:"Annulla"},ja:{redo:"\u3084\u308A\u76F4\u3059",undo:"\u53D6\u308A\u6D88\u3059"},ko:{redo:"\uC2E4\uD589\uBCF5\uADC0",undo:"\uC2E4\uD589\uCDE8\uC18C"},ms:{redo:"Buat Semula",undo:"Buat Asal"},"nb-NO":{redo:"Gj\xF8r om igjen",undo:"Angre"},nl:{redo:"Opnieuw",undo:"Herstel"},pl:{redo:"Pon\xF3w",undo:"Cofnij"},"pt-PT":{redo:"Refazer",undo:"Desfazer"},pt:{redo:"Refazer",undo:"Desfazer"},ru:{redo:"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C",undo:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C"},sk:{redo:"Opakova\u0165",undo:"Zru\u0161i\u0165"},sl:{redo:"Uveljavi",undo:"Razveljavi"},sv:{redo:"G\xF6r om",undo:"\xC5ngra"},th:{redo:"\u0E17\u0E33\u0E0B\u0E49\u0E33",undo:"\u0E16\u0E2D\u0E19\u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07\u0E01\u0E25\u0E31\u0E1A"},tr:{redo:"Yinele",undo:"Geri Al"},uk:{redo:"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0438",undo:"\u0421\u043A\u0430\u0441\u0443\u0432\u0430\u0442\u0438"},"zh-Hans":{redo:"\u91CD\u505A",undo:"\u64A4\u9500"},"zh-Hant":{redo:"\u91CD\u4F5C",undo:"\u5FA9\u539F"}};var Wa=z({defaultClassName:"mnnh5s1 _1yep5z6id _1yep5z6ie _1yep5z6if _1yep5z6la _1yep5z6ld _1yep5z6lp _1yep5z6lo _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6kd _1yep5z6ke _1yep5z6kf _1yep5z6ln",variantClassNames:{isInline:{true:"mnnh5s2 _1yep5z6wo _1yep5z6wp _1yep5z6wq _1yep5z6xc _1yep5z6xd _1yep5z6xe _1yep5z6y0 _1yep5z6y1 _1yep5z6y2 _1yep5z6yo _1yep5z6yp _1yep5z6yq _1yep5z6138 _1yep5z6183 _1yep5z6184",false:"_1yep5z617q _1yep5z6127"},isHovered:{true:"mnnh5s4"},hasLoadedImage:{true:"_1yep5z6126"},includeCheckeredBackground:{true:"mnnh5s6"},showFocusRing:{true:"_1yep5z613j _1yep5z617w _1yep5z617u _1yep5z6140 _1yep5z617x"},isDisabled:{true:"mnnh5s8 _1yep5z6zd"}},defaultVariants:{},compoundVariants:[[{isHovered:true,hasLoadedImage:false},"_1yep5z61oh"],[{isHovered:true,hasLoadedImage:true},"mnnh5s9"],[{isInline:true,isDisabled:true},"_1yep5z61pb"],[{hasLoadedImage:true,includeCheckeredBackground:true},"_1yep5z61o9"]]}),Af="_1yep5z6d8",Ya=z({defaultClassName:"mnnh5sa",variantClassNames:{isInline:{true:"mnnh5sb",false:"mnnh5sc"},isDisabled:{true:"mnnh5sd"},hasLoadedImage:{true:"mnnh5s0"}},defaultVariants:{},compoundVariants:[]});var Ff=z({defaultClassName:"_1i0ytqa3 _1yep5z6id _1yep5z6ie _1yep5z6if _1yep5z6ln _1yep5z6lo _1yep5z6lq",variantClassNames:{isFocusVisible:{true:"_1i0ytqa4"},isInline:{true:"_1yep5z612f",false:"_1yep5z612h"},isDisabled:{true:"_1i0ytqa7 _1yep5z6zd",false:"_1i0ytqa8"}},defaultVariants:{},compoundVariants:[[{isInline:true,isFocusVisible:true},"_1i0ytqa9 _1yep5z61p7 _1yep5z61u5 _1yep5z61u7"],[{isInline:false,isFocusVisible:true},"_1i0ytqaa"],[{isInline:true,isDisabled:true},"_1yep5z61oi"],[{isInline:false,isDisabled:true},"_1yep5z61ok"]]}),jf="_1i0ytqa0",Xa=z({defaultClassName:"_1i0ytqab _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6kd _1yep5z6ke _1yep5z6kf _1yep5z6ln",variantClassNames:{isInline:{false:"_1yep5z6126"},isDisabled:{true:"_1i0ytqad _1yep5z6zd"}},defaultVariants:{},compoundVariants:[]}),Of=z({defaultClassName:"_1i0ytqa1 _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6kj _1yep5z6kk _1yep5z6kl _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6ln",variantClassNames:{isInline:{false:"_1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b"}},defaultVariants:{},compoundVariants:[]});function Hf({line:e,options:t}){let o=useRef([]),r=useMemo(()=>{let a=Math.ceil(e.length/bo),n;for(let i=0;i<a;i++)if(!(!(i===a-1)&&!!o.current[i])){let p=e.slice(i*bo-(i>0?1:0),i*bo+bo);n=getSvgPathFromStroke(getStroke(p.map(([c,u,m])=>({x:c,y:u,pressure:m})),t)),p.length>=(i>0?bo+1:bo)&&(o.current[i]=n);}return n},[e,t]);return [...o.current,r]}var bo=60*3;var N2={size:1,thinning:0,smoothing:0,streamline:0,easing:e=>e,start:{taper:0,easing:e=>e,cap:true},end:{taper:0,easing:e=>e,cap:true},simulatePressure:false},Uf=_t.forwardRef(({className:e,style:t,canvasClassName:o,canvasStyle:r,isBound:a=true,strokeWidth:n=2,strokeColor:i="#3A87FD",onChange:s,defaultValue:l,onChangeEnd:p,enableHistory:c=false,isInline:u=true,isDisabled:m,placeholder:d,clearLabel:b,undoLabel:y,redoLabel:f,footerClassName:g,canvasRef:v,value:_,footerStyle:h,"data-block-id":x,"data-block-class":w,"aria-label":C="Drawing canvas",description:I="This is a canvas for drawing using a mouse or touch input.",...P},S)=>{let k=A(Bf),T=_t.useRef(null),[$,R]=_t.useState(_||l||[]),N=_t.useMemo(()=>({...N2,...P}),[P]),[E,F]=_t.useState(),B=useId(),{labelProps:j,fieldProps:O}=useLabel({...P,"aria-label":C,labelElementType:"span"}),{isFocusVisible:H,focusProps:Q}=useFocusRing({within:true}),{hoverProps:V,isHovered:U}=useHover({isDisabled:m}),{undo:re,redo:pe,canRedo:Y,canUndo:be,push:_e}=lc($,{onAction:Z=>{Z&&(R(Z),p?.(Z));},isDisabled:!c}),{keyboardProps:Re}=useKeyboard({onKeyDown:Z=>{Z.key==="Backspace"?Ot():Z.key==="z"&&(Z.metaKey||Z.ctrlKey)&&(Z.shiftKey?Y&&pe():be&&re());}}),[ae,ge]=useState(false),Eo=useCallback(Z=>{let G=Z.currentTarget.getBoundingClientRect();F(G),Z.target.setPointerCapture(Z.pointerId);let de=[Z.clientX-G.x,Z.clientY-G.y,Z.pressure];R(ee=>[...ee,[de]]),ge(true);},[]),Ft=useCallback(Z=>{if(Z.buttons!==1||!E)return;let de=Gf(Z.nativeEvent).map(ee=>[a?clamp(ee.clientX-E.left,0,E.width):ee.clientX-E.left,a?clamp(ee.clientY-E.top,0,E.height):ee.clientY-E.top,ee.pressure]);R(ee=>{let ze=[...ee];return ze[ee.length-1]=[...ze[ee.length-1],...de],ze});},[E,a]),jt=()=>{E&&(p?.($),_e($),ge(false));};useEffect(()=>{s?.($);},[$,s]);let Ot=()=>{R([]),s?.([]),_e([]);};return jsxs("div",{ref:M(T,S),className:classNames(jf,"BaselineUI-FreehandCanvas",e),style:t,"aria-disabled":m,"data-block-id":x,"data-block-class":w,children:[P.label||c?jsxs("div",{className:Of({isInline:u}),children:[P.label?jsx(te,{type:"label",size:"sm",...j,children:P.label}):jsx("span",{}),c?jsxs("div",{children:[jsx(L,{variant:"secondary",size:"sm",isDisabled:!be||m,icon:UndoIcon,onPress:re,"aria-label":y||k.formatMessage("undo")}),jsx(L,{variant:"secondary",size:"sm",isDisabled:!Y||m,icon:RedoIcon,onPress:pe,"aria-label":f||k.formatMessage("redo")})]}):null]}):null,jsxs("div",{role:"application",...mergeProps(Q,Re,V,O),tabIndex:m?void 0:0,className:classNames(Wa({isInline:u,isHovered:U}),Ff({isFocusVisible:H,isInline:u,isDisabled:!!m}),o),"aria-describedby":P["aria-describedby"]||B,style:r,ref:v,children:[jsx(VisuallyHidden,{children:jsx("div",{id:B,children:I})}),jsx("svg",{width:r?.width||"100%",height:r?.height||"100%",onPointerDown:Eo,onPointerMove:Ft,onPointerUp:jt,children:(_||$).map((Z,G,de)=>G<de.length-1||!ae?jsx(qf,{line:Z,options:N,strokeColor:i,strokeWidth:n},G):jsx(Kf,{line:Z,options:N,strokeColor:i,strokeWidth:n},G))})]}),d||b?jsx("div",{style:h,className:classNames(Xa({isInline:u,isDisabled:m}),g),children:($.length||!d)&&b?jsx(K,{size:"sm",variant:"ghost",label:b,isDisabled:m,onPress:Ot}):jsx(K,{size:"sm",variant:"ghost",label:d,isDisabled:true})}):null]})});Uf.displayName="FreehandCanvas";var qf=_t.memo(({line:e,options:t,strokeColor:o,strokeWidth:r})=>{let a=useMemo(()=>getSvgPathFromStroke(getStroke(e.map(([n,i,s])=>({x:n,y:i,pressure:s})),t)),[e,t]);return jsx("path",{d:a,stroke:o,strokeWidth:r})});qf.displayName="Stroke";var Kf=_t.memo(({line:e,options:t,strokeColor:o,strokeWidth:r})=>{let a=Hf({line:e,options:t});return jsx(Fragment,{children:a.map((n,i)=>jsx("path",{d:n,stroke:o,strokeWidth:r},i))})});Kf.displayName="SplitStroke";function Gf(e){if(typeof e.getCoalescedEvents=="function"){let t=e.getCoalescedEvents();return t.length>0?t.flatMap(o=>Gf(o)):[e]}return [e]}var Wf="_1vac7ws0",Yf=z({defaultClassName:"_1vac7ws1",variantClassNames:{isDragging:{true:"_1vac7ws2"}},defaultVariants:{},compoundVariants:[]});function Zf(e,t){let[o,r]=useState([]),a=()=>e?.flatMap(n=>[...t.querySelectorAll(n)]).map(n=>({current:n}));return useGranularEffect(()=>{r(a());},[],[a]),useGranularEffect(()=>{let n=a();r(n);},[e],[a]),o}function Jf(e){let{scrollable:t,ownerDocument:o,onScroll:r}=e;useEffect(()=>{let a=getHTMLElement(t,o);if(a)return (a.style.position==="static"||!a.style.position)&&console.warn("Scrollable ancestor passed to `Transform` component should not be statically positioned."),a.addEventListener("scroll",r),()=>{a.removeEventListener("scroll",r);}},[t,r,o]);}var Z2=makeMoveable([Draggable,Resizable,Rotatable,Snappable]),ey=_t.forwardRef(({className:e,children:t,isRotatable:o,isResizable:r,isDraggable:a,style:n,onTransform:i,onTransformStart:s,onTransformEnd:l,onDoubleClick:p,onDragStart:c,onDragEnd:u,onDrag:m,onResizeStart:d,onResizeEnd:b,onResize:y,onRotateStart:f,onRotateEnd:g,onRotate:v,onSnap:_,isSnappable:h,elementGuidelines:x,hideAnchorOnDrag:w=true,title:C,rotationPosition:I,autoUpdate:P,bound:S,snapRotationDegrees:k,snapRotationThreshold:T,scrollableAncestor:$,renderDirections:R,stopPropagation:N,transformOrigin:E,preventDefault:F},B)=>{let j=useRef(null),O=useRef(null),[H,Q]=useState(document),V=useRef(H.createElement("div")),[U,re]=useState({}),[pe,Y]=useState(false),[be,_e]=useState(false),[Re,ae]=useState(),ge=Zf(x,H);useLayoutEffect(()=>{let G=V.current;return V.current=H.createElement("div"),()=>{G.remove();}},[H]);let{keyboardProps:Eo}=useKeyboard({onKeyDown:G=>{let de=G.shiftKey?10:1,ee=G.metaKey||G.ctrlKey;ee&&G.shiftKey&&(de=45);function ze(Ze,Lo="x"){ee?O.current?.request("rotatable",{deltaRotate:Ze*de},true):O.current?.request("draggable",Lo==="x"?{deltaX:Ze*de}:{deltaY:Ze*de},true);}switch(G.key){case "ArrowRight":{ze(1);break}case "ArrowLeft":{ze(-1);break}case "ArrowUp":{ze(-1,"y");break}case "ArrowDown":ze(1,"y");}requestAnimationFrame(()=>{O.current?.updateRect();});}});useEffect(()=>{let G=he(j.current);Q(G);let de=V.current;G.body.append(V.current);function ee(Ze){_e(Ze.shiftKey);}function ze(){_e(false);}return G.addEventListener("keydown",ee),G.addEventListener("keyup",ze),()=>{G.removeEventListener("keydown",ee),G.removeEventListener("keyup",ze),de.remove();}},[]),Jf({scrollable:$,onScroll:()=>{O.current?.updateRect();},ownerDocument:H});let Ft=useCallback(G=>{re(de=>({...de,...G.style})),i?.(G);},[i]),jt=useCallback(G=>{if(Y(true),j.current?.focus(),S){let ee=getHTMLElement(S,H)?.getBoundingClientRect();ae({position:"client",left:ee?.left??0,top:ee?.top??0,right:ee?.right??0,bottom:ee?.bottom??0});}c?.(G);},[S,H,c]),Ot=useCallback(G=>{Y(false),u?.(G);},[u]),Z=t({style:{...U.width&&{width:U.width},...U.height&&{height:U.height}}});return jsxs(Fragment,{children:[jsx("div",{role:"button",...Eo,ref:M(j,B),style:{display:"inline-block",...n,...U},className:classNames(Wf,e),onDoubleClick:p,tabIndex:0,title:C,children:Z}),createPortal(jsx(Z2,{ref:O,target:j,draggable:a,resizable:r,rotatable:o,keepRatio:be,throttleDrag:1,snappable:h||!!S,elementGuidelines:ge,snapRenderThreshold:.9,className:Yf({isDragging:pe&&w}),onRender:Ft,onDragStart:jt,onDragEnd:Ot,useResizeObserver:P,useMutationObserver:P,onRenderEnd:l,onDrag:m,onResizeStart:d,onResizeEnd:b,onResize:y,onRotateStart:f,onRotateEnd:g,onRotate:v,onRenderStart:s,onSnap:_,rotationPosition:I,bounds:Re,snapRotationDegrees:k,snapRotationThreshold:T,renderDirections:R,stopPropagation:N,preventDefault:F,transformOrigin:E}),V.current)]})});ey.displayName="Transform";var ty={ar:{delete:"\u062D\u0630\u0641",selectImage:"\u062A\u062D\u062F\u064A\u062F \u0635\u0648\u0631\u0629"},cs:{delete:"Smazat",selectImage:"Vybrat obr\xE1zek"},cy:{delete:"Dileu",selectImage:"Dewiswch Ddelwedd"},da:{delete:"Slet",selectImage:"V\xE6lg billede"},de:{delete:"L\xF6schen",selectImage:"Bild ausw\xE4hlen"},el:{delete:"\u0394\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE",selectImage:"\u0395\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1\u03C2"},"en-GB":{delete:"Delete",selectImage:"Select Image"},en:{delete:"Delete",selectImage:"Select Image"},es:{delete:"Eliminar",selectImage:"Seleccionar imagen"},fi:{delete:"Poista",selectImage:"Valitse kuva"},"fr-CA":{delete:"Supprimer",selectImage:"S\xE9lectionner une image"},fr:{delete:"Supprimer",selectImage:"S\xE9lectionner une image"},he:{delete:"\u05DE\u05D7\u05D9\u05E7\u05D4",selectImage:"\u05D1\u05D7\u05D9\u05E8\u05EA \u05EA\u05DE\u05D5\u05E0\u05D4"},hr:{delete:"Obri\u0161i",selectImage:"Odaberi sliku"},id:{delete:"Hapus",selectImage:"Pilih Gambar"},it:{delete:"Elimina",selectImage:"Seleziona immagine"},ja:{delete:"\u524A\u9664",selectImage:"\u30A4\u30E1\u30FC\u30B8\u3092\u9078\u629E"},ko:{delete:"\uC0AD\uC81C",selectImage:"\uC774\uBBF8\uC9C0 \uC120\uD0DD"},ms:{delete:"Padam",selectImage:"Pilih Imej"},"nb-NO":{delete:"Slett",selectImage:"Velg bilde"},nl:{delete:"Verwijder",selectImage:"Selecteer afbeelding"},pl:{delete:"Usu\u0144",selectImage:"Wybierz obraz"},"pt-PT":{delete:"Apagar",selectImage:"Selecionar imagem"},pt:{delete:"Apagar",selectImage:"Selecionar Imagem"},ru:{delete:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C",selectImage:"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0438\u0437\u043E\u0431\u0440."},sk:{delete:"Zmaza\u0165",selectImage:"Vybra\u0165 obr\xE1zok"},sl:{delete:"Izbri\u0161i",selectImage:"Izberi sliko"},sv:{delete:"Radera",selectImage:"V\xE4lj bild"},th:{delete:"\u0E25\u0E1A",selectImage:"\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E23\u0E39\u0E1B\u0E20\u0E32\u0E1E"},tr:{delete:"Sil",selectImage:"Resim Se\xE7"},uk:{delete:"\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438",selectImage:"\u041E\u0431\u0440\u0430\u0442\u0438 \u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F"},"zh-Hans":{delete:"\u5220\u9664",selectImage:"\u9009\u62E9\u56FE\u50CF"},"zh-Hant":{delete:"\u522A\u9664",selectImage:"\u9078\u53D6\u5716\u50CF"}};var ay=_t.forwardRef(({className:e,style:t,isInline:o=true,accept:r="image/*",defaultImageSrc:a,imageSrc:n,imageAlt:i,pickerButtonLabel:s,isDisabled:l,onDrop:p,onPaste:c,includeCheckeredBackground:u=true,"data-block-id":m,"data-block-class":d,pickerButtonStyle:b,pickerButtonClassName:y,footerClassName:f,footerStyle:g,clearLabel:v,placeholder:_,labelStyle:h,labelClassName:x,...w},C)=>{let I=_t.useRef(null),P=_t.useRef(null),{formatMessage:S}=A(ty),[k,T]=useControlledState(n,a||null,ae=>{invariant(typeof ae!="string"),w.onValueChange?.(ae?[ae]:[]);}),$=useMemo(()=>dk(k||void 0),[k]),{fieldProps:R,labelProps:N}=useField(w),{dropProps:E,isDropTarget:F}=useDrop({ref:I,onDrop:async ae=>{if(l)return;let ge=await qi({items:ae.items});ge.length&&T(ge[0]),p?.(ae);},...w}),{clipboardProps:B}=useClipboard({onPaste:async ae=>{if(l)return;let ge=await qi({items:ae});ge.length&&T(ge[0]),c?.(ae);},...w}),j=()=>{T(null),P.current&&(P.current.value="");},O={type:"file",onChange:ae=>{let ge=[...ae.target.files];T(ge[0]),w.onChange?.(ae);},accept:r,disabled:l},{focusProps:H,isFocused:Q,isFocusVisible:V}=useFocusRing({within:true}),{hoverProps:U,isHovered:re}=useHover({isDisabled:l}),{imgProps:pe,isLoading:Y,isLoaded:be}=Wt({src:$,alt:i||""}),_e={label:s||S("selectImage"),onPress:()=>I.current?.click(),variant:"secondary",isDisabled:l,excludeFromTabOrder:true,className:classNames(Jr({isFocusVisible:V}),{[Af]:F&&!l},y),style:b},Re=filterTruthyValues({"data-loaded":be,"data-block-id":m,"data-block-class":d,"data-hovered":re,"data-focused":Q,"data-drop-target":F,"data-disabled":l,"data-focus-visible":V});return jsxs(D,{...Re,className:classNames("BaselineUI-ImageDropZone",e),display:"flex",flexDirection:"column",alignItems:"center",style:t,ref:C,children:[jsxs("label",{...mergeProps(E,U,H,N),className:classNames(Wa({isInline:o,isHovered:re,isDisabled:l,hasLoadedImage:!!$&&be,showFocusRing:F||!!$&&V}),x),style:h,ref:I,children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(R,B,O),ref:P})}),!$&&jsx(K,{..._e}),!!$&&(Y?jsx(so,{}):jsx("img",{className:Ya({isInline:o,isDisabled:l,hasLoadedImage:!!$&&be&&u}),...pe}))]}),_||v?jsx("div",{style:g,className:classNames(Xa({isInline:o,isDisabled:l}),f),children:($||!_)&&v?jsx(K,{size:"sm",variant:"ghost",label:v,isDisabled:l,onPress:j}):jsx(K,{size:"sm",variant:"ghost",label:_,isDisabled:true})}):null]})});ay.displayName="ImageDropZone";function dk(e){return e instanceof File?URL.createObjectURL(e):e}var ny="_1vm2oh49 _1yep5z6ig _1yep5z6ih _1yep5z6ii _1yep5z6g4",Is="_1vm2oh48 _1yep5z6lo _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6kd _1yep5z6ke _1yep5z6kf _1yep5z6k4 _1yep5z6k5 _1yep5z6k6",iy=z({defaultClassName:"_1vm2oh40 mnnh5s1 _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6lt _1yep5z6lr _1yep5z6ic _1yep5z6lu _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6la _1yep5z6lp _1yep5z6id _1yep5z6ie _1yep5z6if",variantClassNames:{accent:{theme:"_1vm2oh41",positive:"_1vm2oh42"},isInline:{true:"mnnh5s2 _1yep5z6wl _1yep5z6wm _1yep5z6wn _1yep5z6x9 _1yep5z6xa _1yep5z6xb _1yep5z6xx _1yep5z6xy _1yep5z6xz _1yep5z6yl _1yep5z6ym _1yep5z6yn _1yep5z6137 _1yep5z6182 _1yep5z6184",false:"_1yep5z612h"},isFocusVisible:{true:"_1yep5z613j _1yep5z617w _1yep5z617u _1yep5z6140 _1yep5z617x"},isDisabled:{true:"mnnh5s8 z9nup82 _1yep5z6zd"},isHovered:{true:"_1vm2oh47"}},defaultVariants:{},compoundVariants:[[{accent:"positive",isInline:true},"_1yep5z61oi"],[{accent:"theme",isInline:true},"_1yep5z61o7"],[{accent:"positive",isInline:false},"_1yep5z61ok"],[{accent:"theme",isInline:false},"_1yep5z61o9"],[{isFocusVisible:true,isInline:true},"_1yep5z61q3 _1yep5z61tx _1yep5z61tz _1yep5z61u0"],[{isHovered:true,isInline:true},"_1yep5z61u0 _1yep5z61q3 _1yep5z61tx _1yep5z61tz"],[{isHovered:true,isInline:false,accent:"positive"},"_1yep5z61oj"],[{isHovered:true,isInline:false,accent:"theme"},"_1yep5z61ob"],[{isHovered:true,isInline:true,accent:"theme"},"_1yep5z61o8"]]});var py=_t.forwardRef(({className:e,style:t,isDisabled:o,isInline:r=true,imageAlt:a,imageSrc:n,svgSrc:i,textValue:s,textStyle:l,onPress:p,onDelete:c,deleteAriaLabel:u,addAriaLabel:m,accent:d="positive","data-block-id":b,"data-block-class":y,...f},g)=>{let{focusProps:v,isFocused:_,isFocusVisible:h}=useFocusRing({within:true}),{isHovered:x,hoverProps:w}=useHover({isDisabled:o}),{pressProps:C}=usePress({isDisabled:o,onPress:p});invariant(n||i||s,"Preview must have content. You must provide either an `imageSrc`, `svgSrc`, or `textValue` prop.");let I=filterTruthyValues({"data-hovered":x,"data-focus-visible":h,"data-focused":_,"data-disabled":o});return jsxs("div",{...f,className:classNames(iy({isInline:r,isFocusVisible:h,isDisabled:o,isHovered:x,accent:d}),"BaselineUI-Preview",e),"data-block-id":b,"data-block-class":y,"aria-label":f["aria-label"]||a||s,style:t,ref:g,children:[typeof i=="string"?jsx("button",{disabled:o,...mergeProps(w,v,C,I),className:Is,"aria-label":m,dangerouslySetInnerHTML:{__html:i}}):jsxs("button",{...mergeProps(w,v,C,I),disabled:o,style:l,"aria-label":m,className:Is,children:[n?jsx("img",{src:n,alt:a,className:Ya({isInline:r,isDisabled:o})}):null,!!i&&typeof i=="object"&&i,s]}),c?jsx(L,{isDisabled:o,className:ny,"aria-label":u,size:"xs",icon:TrashIcon,onPress:c}):null]})});py.displayName="Preview";var cy="_1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j4 _1yep5z6j5 _1yep5z6j6 _1yep5z69c _1yep5z69d _1yep5z69e",dy=z({defaultClassName:"cw3m0n5 _1yep5z6ew _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z6111"}},defaultVariants:{},compoundVariants:[]}),uy="cw3m0n4",my="_1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j4 _1yep5z6j5 _1yep5z6j6 _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6lk",fy=z({defaultClassName:"cw3m0n0 _1yep5z61j6 _1yep5z61j7 _1yep5z61j8 _1yep5z61ju _1yep5z61jv _1yep5z61jw _1yep5z61ki _1yep5z61kj _1yep5z61kk _1yep5z61l6 _1yep5z61l7 _1yep5z61l8 _1yep5z61nb _1yep5z61tg",variantClassNames:{isHovered:{true:"cw3m0n1"},isReadOnly:{true:"cw3m0n2"}},defaultVariants:{},compoundVariants:[[{isHovered:true,isReadOnly:false},"cw3m0n3"]]});var Ik=({label:e,description:t},{isSelected:o,isFocusVisible:r,isDisabled:a,optionLabelPosition:n,isHovered:i,isReadOnly:s})=>jsxs("div",{className:wa({labelPosition:n}),children:[jsx("div",{className:classNames(Ia({isSelected:o,isFocusVisible:r,isDisabled:a,isReadOnly:s,isHovered:i}),fy({isHovered:i})),children:o?jsx("div",{className:uy}):null}),e?jsxs("div",{className:cy,children:[jsx("span",{className:ka({isDisabled:a}),children:e}),t?jsx("span",{className:dy({isDisabled:a}),children:t}):null]}):null]}),by=({state:e,renderOption:t=Ik,item:o,optionLabelPosition:r="end",optionStyle:a,optionClassName:n,isReadOnly:i,...s})=>{let l=!!s.isDisabled||!!s.disabledValues?.includes(o.id),p=_t.useRef(null),{inputProps:c,isPressed:u,isSelected:m}=useRadio({...s,isDisabled:l,children:o.label,value:o.id},e,p),{focusProps:d,isFocusVisible:b,isFocused:y}=useFocusRing(),{hoverProps:f,isHovered:g}=useHover({isDisabled:l}),v=filterTruthyValues({"data-selected":m,"data-focused":y,"data-focus-visible":b,"data-hovered":g,"data-disabled":l,"data-pressed":u,"data-read-only":i});return jsxs("label",{...f,...v,style:a,className:classNames("BaselineUI-Radio-Item",n),children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(c,d),ref:p})}),t(o,{isFocusVisible:b,isSelected:m,isFocused:y,isHovered:g,isDisabled:l,optionLabelPosition:r,isReadOnly:i})]})};var vy=_t.forwardRef(({className:e,style:t,optionsContainerClassName:o,optionsContainerStyle:r,items:a,labelPosition:n="top",renderOption:i,"aria-label":s,"aria-labelledby":l,"aria-describedby":p,"aria-details":c,"data-block-id":u,"data-block-class":m,...d},b)=>{let y=useRadioGroupState(d),{radioGroupProps:f,labelProps:g,descriptionProps:v,errorMessageProps:_}=useRadioGroup({...d,"aria-label":s,"aria-labelledby":l,"aria-describedby":p,"aria-details":c},y),h=Ce({...d,descriptionProps:v,errorMessageProps:_,labelPosition:n}),x=filterTruthyValues({"data-orientation":d.orientation,"data-block-id":u,"data-block-class":m,"data-disabled":d.isDisabled,"data-readonly":d.isReadOnly});return jsxs("div",{...mergeProps(f,x),className:classNames(tt({labelPosition:n}),"BaselineUI-RadioGroup",e),style:t,ref:b,children:[d.label||h?jsxs("div",{className:et({labelPosition:n,hasMessage:!!h}),children:[jsx("span",{...g,className:classNames(Kt,"BaselineUI-RadioGroup-Label"),children:d.label}),n==="start"&&h]}):null,jsx("div",{className:classNames(my,{[Yt]:d.isDisabled},o),style:r,children:a.map(w=>jsx(by,{state:y,renderOption:i,item:w,...d,value:w.id},w.id))}),n==="top"&&h]})});vy.displayName="RadioGroup";var _y=({id:e,defaultMessage:t,elementType:o=Fragment$1})=>{invariant(e||t,"`id` or `defaultMessage` is required.");let r=A();return jsx(o,{children:r.formatMessage(e)||t})};_y.displayName="MessageFormat";var zy=_t.forwardRef(({className:e,style:t,children:o,"data-block-id":r,"data-block-class":a,role:n="group",isDisabled:i,...s},l)=>{let{hoverProps:p,isHovered:c}=useHover({isDisabled:i});return jsx("div",{...p,role:n,"data-hovered":c,"data-disabled":i,"data-block-id":r,"data-block-class":a,className:e,style:t,...s,ref:l,children:o})});zy.displayName="Group";var Ds="UNSUPPORTED_IN_MENU";function Cy(e){return useMemo(()=>_t.Children.toArray(e).map(t=>{let o=t,r=uniqueId("item"),a=vr(o,je),n=xy(o),i,s;if(a){let g=vr(a,Oe);invariant(g),i=xy(g),s=vr(a,ie).props.children;}else n?i=n:i=o;let{onPress:l,label:p,"aria-label":c,iconStart:u,isDisabled:m,icon:d}=i.props,b=p||c||Ds;invariant(typeof b=="string","ActionGroup children must have a string label");let y=`${r}-${b}`;return createElement(Item,{...{key:y,onPress:l,textValue:b,"aria-label":c,icon:u||d,dialogContent:s,isDisabled:m},key:y},o)}),[e])}function vr(e,t){return t?flatMapDeep(_t.Children.toArray(e),r=>_t.isValidElement(r)&&r.props.children?[r,..._t.Children.toArray(r.props.children)]:[r]).find(r=>_t.isValidElement(r)&&r.type===t):void 0}function xy(e){return vr(e,K)||vr(e,L)}var Py="_1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6id _1yep5z6ie _1yep5z6if _1yep5z6ln _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6lf",ky={horizontal:"xvr3wn0",vertical:"xvr3wn1"};var qk=new Set(["text","search","password","tel","url"]);function Qa(e,t){let{toolbarProps:o}=useToolbar(e,t);return {toolbarProps:{...o,onKeyDownCapture:r=>{if(r.target instanceof HTMLInputElement&&qk.has(r.target.type)){let a=r.target.selectionStart===0,n=r.target.selectionEnd===r.target.value.length;(a&&r.key==="ArrowLeft"||n&&r.key==="ArrowRight")&&o.onKeyDownCapture?.(r);return}o.onKeyDownCapture?.(r);}}}}var Ns=_t.forwardRef(({className:e,style:t,children:o,collapsibleMenuProps:r,"data-block-id":a,"data-block-class":n,renderSpacer:i,onKeyDown:s,...l},p)=>{let{formatMessage:c}=A(),[u,m]=useState(),d=Cy(o),b=useListState({...l,children:d}),y=oe(p),f=useRef(null),[{visibleItems:g,isMeasuring:v},_]=Jn({visibleItems:b.collection.size,isMeasuring:false}),h=useCallback(()=>{let T=$=>{if(f.current&&y.current){let R=[...f.current.children],N=y.current.getBoundingClientRect().width,E=$<b.collection.size,F=0,B=0;if(E){let j=R.pop();j&&(F+=$y(j,false,true));}for(let[j,O]of R.entries())if(F+=$y(O,j===0,j===R.length-1),Math.round(F)<=Math.round(N))B++;else break;return B}return $};_(function*(){yield {visibleItems:b.collection.size,isMeasuring:true};let $=T(b.collection.size),R=$<b.collection.size&&$>0;yield {visibleItems:$,isMeasuring:R},R&&(yield {visibleItems:T($),isMeasuring:false});});},[_,y,b.collection.size]),x=useMemo(()=>({get current(){return y.current?.parentElement}}),[y]);si({ref:x,onResize:h}),Me(h,[b.collection,h]);let{toolbarProps:w}=Qa(l,y),C=[...b.collection],I=C.slice(0,g),P=C.slice(g).filter(T=>T.textValue!==Ds),S=P.length>0;useEffect(()=>{m(void 0);},[P.length]),useEffect(()=>{l.orientation==="vertical"&&console.warn("Toolbar: Vertical orientation is not supported when `isCollapsible` is true.");},[l.orientation]);let{keyboardProps:k}=useKeyboard({onKeyDown:s});return jsxs(FocusScope,{children:[jsx("div",{...mergeProps(w,k),className:e,"data-block-id":a,"data-block-class":n,"data-collapse":true,style:{...t,flexBasis:v?"100%":void 0},ref:y,children:jsxs("div",{ref:f,className:Py,children:[I.map(T=>T.rendered),S?jsxs(Fragment,{children:[!v&&i?jsx(D,{flexGrow:1}):null,jsx(_a,{placement:"bottom end",renderTrigger:({buttonProps:T,ref:$})=>jsx(L,{...T,size:"md",icon:MoreIcon,"aria-label":c(tw.more),variant:"toolbar",ref:$,tooltip:true}),...r,disabledKeys:P.filter(T=>T.props?.isDisabled).map(T=>T.key),items:P.map(T=>{let $=T.textValue||T["aria-label"];return invariant($,"ActionItem must have a label"),{id:T.key,label:$,icon:T.props.icon}}),onAction:T=>{let $=b.collection.getItem(T);invariant($,"Item not found");let{onPress:R,dialogContent:N}=$.props;R?.(),m(N);}})]}):null]})}),jsx(Le,{isOpen:!!u,onOpenChange:T=>{T||m(void 0);},children:jsx(Ue,{enableDrawer:"auto",style:{zIndex:1e5},children:u?_t.cloneElement(u,{inheritDrawer:true}):null})})]})});Ns.displayName="CollapsibleToolbar";function $y(e,t,o){let a=ne(e).getComputedStyle(e);return e.getBoundingClientRect().width+(t?0:Ty(a.marginLeft))+(o?0:Ty(a.marginRight))}function Ty(e){let t=Number.parseInt(e,10);return Number.isNaN(t)?0:t}var tw=W({more:{id:"more",defaultMessage:"More"}});var Es=_t.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,"aria-controls":a,onKeyDown:n,...i},s)=>{let l=_t.useRef(null),{toolbarProps:p}=Qa(i,l),{keyboardProps:c}=useKeyboard({onKeyDown:n});return jsx("div",{...mergeProps(p,c),"aria-controls":a,className:classNames(ky[i.orientation||"horizontal"],"BaselineUI-Toolbar",e),style:t,"data-block-id":o,"data-block-class":r,ref:M(s,l),children:i.children})});Es.displayName="WrappedToolbar";var en=_t.forwardRef((e,t)=>{let o=e.isCollapsible?Ns:Es;return jsx(o,{...e,ref:t})});en.displayName="Toolbar";var Dy=z({defaultClassName:"_1j5skr71",variantClassNames:{size:{xxs:"_1j5skr72",xs:"_1j5skr73",sm:"_1j5skr74",md:"_1j5skr75",lg:"_1j5skr76"}},defaultVariants:{},compoundVariants:[]}),My=z({defaultClassName:"_1j5skr70 _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6lp _1yep5z6lq _1yep5z6lk _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6kd _1yep5z6ke _1yep5z6kf _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6g1 _1yep5z6f5",variantClassNames:{isHovered:{true:"_1j5skr7g"},isFocusVisible:{true:"_1j5skr7h"},isDisabled:{true:"z9nup82 _1yep5z611a"},isSelected:{true:"_1j5skr7j"}},defaultVariants:{},compoundVariants:[[{isSelected:true,isDisabled:true},"_1yep5z61u0 _1yep5z61tz _1yep5z61tx _1yep5z61qd _1yep5z61nd"],[{isSelected:false,isHovered:true,isDisabled:false},"_1yep5z6g3"],[{isSelected:false,isFocusVisible:true,isDisabled:false},"_1yep5z61u0 _1yep5z61tz _1yep5z61q3 _1yep5z61tx"],[{isSelected:true,isFocusVisible:true,isDisabled:false},"_1j5skr7k _1yep5z61ty _1yep5z61tx _1yep5z61q4 _1yep5z61ne"],[{isSelected:true,isFocusVisible:false,isDisabled:false},"_1yep5z61tx _1yep5z61tz _1yep5z61q3 _1yep5z61u0"]]}),Ny=z({defaultClassName:"_1j5skr70 _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6lp _1yep5z6lq _1yep5z6lk _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6kd _1yep5z6ke _1yep5z6kf _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f5",variantClassNames:{isHovered:{true:"_1j5skr7m"},isFocusVisible:{true:"_1yep5z617x _1yep5z617w _1yep5z6140 _1yep5z617u"},isSelected:{true:"_1yep5z6119"},isDisabled:{true:"z9nup82 _1yep5z611a"}},defaultVariants:{},compoundVariants:[[{isSelected:false,isHovered:true},"_1yep5z61nc"]]}),Ey=z({defaultClassName:"_1j5skr70 _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6lp _1yep5z6lq _1yep5z6lk _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6kd _1yep5z6ke _1yep5z6kf _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f5",variantClassNames:{isHovered:{true:"_1j5skr7r"},isFocusVisible:{true:"_1yep5z617x _1yep5z617w _1yep5z6140 _1yep5z617u"},isSelected:{true:"_1j5skr7t"},isDisabled:{true:"z9nup82 _1yep5z611a"}},defaultVariants:{},compoundVariants:[[{isSelected:false,isHovered:true},"_1yep5z61o9"],[{isSelected:true,isDisabled:false},"_1yep5z61o9 _1yep5z61ng"],[{isSelected:true,isDisabled:true},"_1yep5z61o9 _1yep5z61nd"]]}),Ly=z({defaultClassName:"_1j5skr77 _1j5skr70 _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6lp _1yep5z6lq _1yep5z6lk _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6kd _1yep5z6ke _1yep5z6kf _1yep5z6f5",variantClassNames:{isHovered:{true:"_1j5skr78"},isFocusVisible:{true:"_1j5skr79"},isSelected:{true:"_1j5skr7a"},isDisabled:{true:"_1j5skr7b z9nup82 _1yep5z611c"}},defaultVariants:{},compoundVariants:[[{isSelected:true,isDisabled:false},"_1j5skr7c _1yep5z61nf"],[{isSelected:false,isDisabled:true},"_1j5skr7d _1yep5z61nd"],[{isSelected:false,isHovered:true},"_1yep5z61o9"],[{isSelected:false,isFocusVisible:true},"_1yep5z61u0 _1yep5z61tz _1yep5z61q3 _1yep5z61tx"],[{isSelected:true,isFocusVisible:true},"_1j5skr7e _1yep5z61ty _1yep5z61tx _1yep5z61q4"]]});var fw={xxs:8,xs:12,sm:16,md:20,lg:24},Ie=_t.forwardRef((e,t)=>{let o=oe(t),{tooltipProps:r}=Yr(e,o);return r?jsx(J,{...r,children:jsx(Ls,{...e,ref:t})}):jsx(Ls,{...e,ref:t})});Ie.displayName="ToggleIconButton";var Ls=_t.forwardRef(({className:e,style:t,icon:o,size:r="md",variant:a="primary","data-block-id":n,"data-block-class":i,...s},l)=>{let p=useToggleState(s),{buttonProps:c,isPressed:u,ref:m,isFocusVisible:d,isFocused:b,isHovered:y,uiStateOptions:f}=Zr(s,p),g=useMemo(()=>typeof o=="function"?o:p.isSelected?o.selected:o.unselected,[o,p.isSelected]),v={isSelected:p.isSelected,isHovered:y,isFocusVisible:d,isDisabled:!!s.isDisabled},_=filterTruthyValues({"data-hovered":y,"data-selected":p.isSelected,"data-focus-visible":d,"data-disabled":s.isDisabled,"data-block-id":n,"data-block-class":i,"data-focused":b,"data-pressed":u});return jsx("button",{...mergeProps(c,_),className:classNames(a==="toolbar"&&Ly(v),a==="primary"&&My(v),a==="secondary"&&Ny(v),a==="tertiary"&&Ey(v),Dy({size:r}),"BaselineUI-ToggleIconButton",typeof e=="function"?e(f):e),style:typeof t=="function"?t(f):t,ref:M(m,l),children:jsx(g,{size:fw[r]})})});Ls.displayName="ToggleIconButtonCore";var Ay="f6jv6bl",Fy="_1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z6js _1yep5z6jt _1yep5z6ju",_o="_1yep5z689 _1yep5z68a _1yep5z68b _1yep5z65x _1yep5z65y _1yep5z65z",jy=z({defaultClassName:"f6jv6b0 _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6g1",variantClassNames:{isInline:{true:"f6jv6b1"},isMinimal:{true:"_1yep5z6154 _1yep5z6155 _1yep5z6156 _1yep5z6vo _1yep5z6vp _1yep5z6vq _1yep5z615m _1yep5z615n _1yep5z615o",false:"_1yep5z6157 _1yep5z6158 _1yep5z6159"}},defaultVariants:{},compoundVariants:[[{isInline:true,isMinimal:false},"_1yep5z61ir _1yep5z61is _1yep5z61it _1yep5z61jf _1yep5z61jg _1yep5z61jh _1yep5z61k3 _1yep5z61k4 _1yep5z61k5 _1yep5z61kr _1yep5z61ks _1yep5z61kt _1yep5z61u7 _1yep5z61u5 _1yep5z61pa"]]}),tn=z({defaultClassName:"f6jv6b4 _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6e3 _1yep5z6eu _1yep5z6lq",variantClassNames:{isDisabled:{true:"f6jv6b5 _1yep5z6111"}},defaultVariants:{},compoundVariants:[]}),Oy="f6jv6bi _1yep5z6wr _1yep5z6ws _1yep5z6wt _1yep5z6xf _1yep5z6xg _1yep5z6xh _1yep5z6y3 _1yep5z6y4 _1yep5z6y5 _1yep5z6yr _1yep5z6ys _1yep5z6yt",Hy="f6jv6bj";var Vy="f6jv6bm _1yep5z63l _1yep5z63m _1yep5z63n _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6ly _1yep5z6lt _1yep5z6lr _1yep5z6hx _1yep5z6eu",Uy=z({defaultClassName:"f6jv6bf _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6lq _1yep5z6la _1yep5z6ld _1yep5z6lp",variantClassNames:{isHovered:{true:"_1yep5z6126"},isDisabled:{true:"_1yep5z6zd"}},defaultVariants:{},compoundVariants:[]}),qy="_1yep5z6jy _1yep5z6jz _1yep5z6k0",Ky="f6jv6be f6jv6ba _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z6eu _1yep5z6e3 _1yep5z6ln",Gy=z({defaultClassName:"f6jv6bb _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6k4 _1yep5z6k5 _1yep5z6k6",variantClassNames:{isInline:{true:"_1yep5z6pr _1yep5z6ps _1yep5z6pt _1yep5z6184 _1yep5z6182 _1yep5z6137",false:"_1yep5z6pu _1yep5z6pv _1yep5z6pw _1yep5z6x6 _1yep5z6x7 _1yep5z6x8 _1yep5z6xu _1yep5z6xv _1yep5z6xw _1yep5z6yi _1yep5z6yj _1yep5z6yk _1yep5z6z6 _1yep5z6z7 _1yep5z6z8"}},defaultVariants:{},compoundVariants:[]}),Wy="f6jv6bk",Yy="f6jv6ba _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z6eu",on=z({defaultClassName:"f6jv6b6",variantClassNames:{isInline:{true:"f6jv6b7",false:"f6jv6b8"}},defaultVariants:{},compoundVariants:[]}),rn="f6jv6b9 _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6jj _1yep5z6jk _1yep5z6jl",zr="f6jv6bn";var Zy=[["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:hr}}=layoutSprinkleValues,Jy=({isOpen:e,onClose:t})=>{let{formatMessage:o}=A(),r=useId();return jsx(Le,{isOpen:e,onOpenChange:a=>{a||t();},children:jsx(Ue,{enableDrawer:"auto",style:{zIndex:999999},children:jsxs(ke,{"aria-labelledby":r,className:Oy,drawerBackground:"subtle",children:[jsxs(D,{paddingLeft:hr.padding.horizontal.lg,paddingRight:hr.padding.horizontal.sm,display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",backgroundColor:"background.primary.subtle",className:Hy,children:[jsx(te,{id:r,elementType:"h3",type:"title",size:"md",children:o(xr.help)}),jsx(L,{icon:XIcon,size:"md",variant:"secondary","aria-label":o(xr.close),onPress:t})]}),jsx(q,{className:Wy}),jsxs(D,{paddingX:hr.padding.horizontal.lg,role:"table","aria-labelledby":r,backgroundColor:"background.primary.subtle",children:[jsx("div",{role:"rowgroup",children:jsxs(D,{role:"row",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingY:hr.padding.vertical.md,color:"text.primary",children:[jsx("h6",{className:sprinkles({typography:"heading.h6.semibold"}),role:"columnheader",children:o(xr.action)}),jsx("h6",{className:sprinkles({typography:"heading.h6.semibold"}),role:"columnheader",style:{textTransform:"capitalize"},children:o(xr.shortcut)})]})}),jsx("div",{role:"rowgroup",children:Zy.map(([a,n],i)=>jsxs(Fragment$1,{children:[jsxs(D,{role:"row",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingY:hr.padding.vertical.xs,style:{minHeight:40},children:[jsx(te,{type:"subtitle",size:"sm",role:"cell",children:o(xr[camelCase(a)])}),jsx(te,{elementType:"kbd",type:"subtitle",size:"sm",role:"cell",children:getOsSpecificKeyboardShortcutLabel(n,true)})]}),i!==Zy.length-1&&jsx(q,{})]},a))})]})]})})})},xr=W({toolbarFocus:{id:"toolbarFocus",defaultMessage:"Toolbar Focus"},help:{id:"help",defaultMessage:"Help"},close:{id:"close",defaultMessage:"Close"},action:{id:"action",defaultMessage:"Action"},shortcut:{id:"shortcut",defaultMessage:"Shortcut"},bold:{id:"bold",defaultMessage:"Bold"},italic:{id:"italic",defaultMessage:"Italic"},underline:{id:"underline",defaultMessage:"Underline"},selectAll:{id:"selectAll",defaultMessage:"Select All"},cut:{id:"cut",defaultMessage:"Cut"},copy:{id:"copy",defaultMessage:"Copy"},paste:{id:"paste",defaultMessage:"Paste"},undo:{id:"undo",defaultMessage:"Undo"},redo:{id:"redo",defaultMessage:"Redo"},openHelpDialog:{id:"openHelpDialog",defaultMessage:"Open Help Dialog"},submit:{id:"submit",defaultMessage:"Submit"}});var an=_t.forwardRef(({value:e,defaultValue:t,onChange:o,placeholder:r,spellCheck:a,textBoxRef:n,isInline:i,isMinimal:s,isDisabled:l,editableContentAriaLabel:p,editorHandle:c,autoFocus:u,saveOnEnter:m,onSave:d},b)=>{let y=_t.useRef(null),[f,g]=useControlledState(e,t||"",o),v=useCallback(k=>{g(k.currentTarget.value||"");},[g]),_=useCallback(k=>{(m&&k.key==="Enter"&&!k.shiftKey||(k.ctrlKey||k.metaKey)&&k.key==="Enter")&&(k.preventDefault(),d());},[m,d]);useImperativeHandle(b,()=>({clear:()=>{g("");}}));let h=useCallback(k=>{k.currentTarget.style.height="16px",k.currentTarget.style.height=k.currentTarget.scrollHeight+"px";},[]);useGranularLayoutEffect(()=>{let k=y.current;k&&(k.style.height="16px",k.style.height=k.scrollHeight+"px");},[s],[f]),useImperativeHandle(c,()=>({setCaretPosition:k=>{y.current&&(y.current.focus(),y.current.setSelectionRange(k,k));},focus:()=>{y.current&&y.current.focus();}}));let{focusProps:x,isFocused:w,isFocusVisible:C}=useFocusRing(),{hoverProps:I,isHovered:P}=useHover({}),S=filterTruthyValues({"data-focus-visible":C,"data-hovered":P,"data-focused":w});return jsx("textarea",{...mergeProps(x,I,S),ref:M(y,n),className:classNames(s?Ky:[tn(),on({isInline:i}),Yy]),autoFocus:u,onChange:v,disabled:l,onInput:h,value:f,placeholder:r,spellCheck:a,"aria-label":p,onKeyDown:_})});an.displayName="PlainEditor";var kr="mention",nn="mention_input",c1=_t.forwardRef(({onCancel:e,editor:t,element:o,onSelectionChange:r},a)=>{let{containerRef:n,items:i,maxMentionableUsersSuggestions:s}=useContext(ln),l=useSelected(),[p,c]=useState(""),{contains:u}=useFilter({sensitivity:"base"}),{formatMessage:m}=A(),d=useMemo(()=>{let R=i.filter(N=>p===""||u(N.displayName,p)).map(N=>({id:N.id,label:N.displayName,data:N}));return s?take(R,s):R},[i,s,p,u]),b=useCallback(R=>jsx(Item,{children:R.label},R.id),[]),y=useCallback((R=false)=>{let N=findNodePath(t,o);N&&(removeNodes(t,{at:N}),R&&focusEditor(t));},[t,o]),f=useComboBoxState({items:d,children:b,menuTrigger:"focus",onSelectionChange:R=>{y(true),r?.(R);}}),g=_t.useRef(null),v=_t.useRef(null),_=_t.useRef(null),h=_t.useRef(null),x=useHTMLInputCursorState(v);useInteractOutside({ref:h,onInteractOutside:()=>{f.close();}});let{inputProps:w,listBoxProps:C}=useComboBox({defaultItems:d,inputRef:v,buttonRef:g,listBoxRef:_,popoverRef:h,menuTrigger:"focus","aria-label":m(Xw.mention)},f);useEffect(()=>{v.current?.focus();},[]);let I=useCallback((R="manual",N=false)=>{y(N),e?.(R,f.inputValue);},[e,y,f.inputValue]),P=useRef(l);useEffect(()=>{P.current&&!l&&I("deselect"),P.current=l;},[l,I]);let S=x?.atStart??false,k=x?.atEnd??false,T=useCallback(R=>{R.key==="Backspace"&&S?I("backspace",true):R.key==="Escape"?I("escape",true):R.key==="ArrowLeft"&&S?I("arrowLeft",true):R.key==="ArrowRight"&&k&&I("arrowRight",true);let N=Hotkeys.isUndo(R)&&t.history.undos.length>0,E=Hotkeys.isRedo(R)&&t.history.redos.length>0;(N||E)&&(R.preventDefault(),t[N?"undo":"redo"](),focusEditor(t));},[S,k,I,t]),$=useMemo(()=>{if(!CSS.supports("field-sizing","content")){let R=ne(v.current),N=v.current?R?.getComputedStyle(v.current).font:void 0;return {width:N?getTextDimensions({text:f.inputValue,font:N}).width+10:"4ch"}}},[f.inputValue]);return jsxs(ht.Provider,{value:f,children:[jsx("input",{...mergeProps(w,{onKeyDown:T,onBlur:()=>{I("blur",true);},onChange:R=>{c(R.target.value);}}),style:$,className:Vy,ref:M(a,v)}),jsx(ie,{triggerRef:n,isNonModal:true,ref:h,state:f,crossOffset:-2,children:jsx(fe,{...C,items:void 0,autoFocus:"first",ref:_,className:classNames(rt,sprinkles({width:"full"})),renderOption:u1})})]})});c1.displayName="MentionInputContentElement";var Os=withRef(({className:e,...t},o)=>{let{children:r,editor:a,element:n}=t,{items:i}=useContext(ln),s=useRef(null),[l,p]=useState(null);useEffect(()=>{let m=findNodePath(a,n);if(!m)return;let d=getPointBefore(a,m);if(!d)return;let b=createPointRef(a,d);return p(b),()=>{b.unref();}},[a,n]);let c=useCallback(()=>{let m=s.current?.getRootNode()instanceof ShadowRoot;moveSelection(a,{unit:"offset"}),moveSelection(a,{unit:"character",distance:1}),Bo()&&m&&focusEditor(a);},[a]),u=useCallback(m=>{if(!m)return;let d=s.current?.getRootNode()instanceof ShadowRoot,b=i.find(f=>f.id===m);invariant(b,"User not found");let y={type:kr,value:b.id,displayName:b.displayName,children:[{text:""}]};insertNodes(a,[y,{text:" "}]),d?setTimeout(()=>{c();},0):c();},[a,i,c]);return jsxs(PlateElement,{as:"span","data-slate-value":n.value,contentEditable:false,className:e,ref:o,...t,children:[jsx(c1,{onCancel:(m,d)=>{m!=="backspace"&&insertText(a,"@"+d,{at:l?.current??void 0}),(m==="arrowLeft"||m==="arrowRight")&&moveSelection(a,{distance:1,reverse:m==="arrowLeft"});},onSelectionChange:u,ref:s,element:n,editor:a}),r]})});Os.displayName="MentionInputElement";var Hs=withRef(({className:e,onClick:t,children:o,...r},a)=>{let n=useElement();return jsxs(PlateElement,{as:"span",className:e,contentEditable:false,"data-user-id":n.value,onClick:getHandler(t,n),ref:a,...r,children:["@",n.displayName,o]})});Hs.displayName="MentionElement";var d1=(e,{options:{trigger:t,triggerPreviousCharPattern:o,triggerQuery:r}})=>{let{insertText:a}=e,n=i=>i===t;return e.insertText=i=>{if(!e.selection||!n(i)||r&&!r(e)){a(i);return}let s=getEditorString(e,getRange(e,e.selection,getPointBefore(e,e.selection)));if(o?.test(s)){sn(e);return}a(i);},e},Xw=W({mention:{defaultMessage:"Mention",id:"mention"}});function f1({className:e,children:t,...o}){return jsx(PlateElement,{asChild:true,className:e,...o,children:jsx("p",{children:t})})}function uI(e){return Object.entries(e).map(([t,o])=>`${kebabCase(t)}:${o}`).filter(([,t])=>!!t).join(";")}function mI(e){return "text"in e}function fI(e){return e.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}function wr(e){if(!e)return "";function t(o){if(mI(o)){let a=fI(o.text);return o.bold&&(a=`<b>${a}</b>`),o.italic&&(a=`<i>${a}</i>`),o.underline&&(a=`<u>${a}</u>`),(o.color||o.backgroundColor)&&(a=`<span style="${uI(filterTruthyValues({color:o.color||void 0,backgroundColor:o.backgroundColor||void 0}))}">${a}</span>`),a}let r=o.children?.map(wr).join("");switch(o.type){case ELEMENT_PARAGRAPH:return `<p>${r}</p>`;case ELEMENT_LINK:return `<a href="${o.url}">${r}</a>`;case kr:return `<span data-user-id="${o.value}">${o.displayName}</span>`;default:return r}}return Array.isArray(e)?e.map(o=>t(o)).join(""):t(e)}function yI(e){return e?(e=e.trim(),e.endsWith(";")&&(e=e.slice(0,-1)),Object.fromEntries(e.split(";").map(t=>t.split(":").map(o=>o.trim())).map(([t,o])=>[camelCase(t),o]))):{}}function Gs(e){e.startsWith("<p>")||(e=`<p>${e}</p>`);let t=new DOMParser().parseFromString(y1.default.sanitize(e),"text/html"),o=t.querySelectorAll("[style]");for(let a of o)a.style.textDecoration==="underline"&&(a.style.textDecoration="",a.style.cssText||a.removeAttribute("style"),a.hasAttributes()?a.innerHTML=`<u>${a.innerHTML}</u>`:a.outerHTML=`<u>${a.innerHTML}</u>`);let r=t.querySelectorAll("br");for(let a of r)a.outerHTML=a.closest("p")?`
|
|
11
|
+
`:"<p>";return g1(t.body)}function g1(e,t){if(e.nodeType===Node.TEXT_NODE)return jsx$1("text",t,e.textContent);if(e.nodeType!==Node.ELEMENT_NODE)return null;let o={...t};switch(e.nodeName.toUpperCase()){case "B":{o.bold=true;break}case "I":{o.italic=true;break}case "EM":{o.italic=true;break}case "U":{o.underline=true;break}case "SPAN":{let a=yI(e.getAttribute("style")||"");a["text-decoration"]==="underline"&&(o.underline=true),a.color&&(o.color=a.color),a.backgroundColor&&(o.backgroundColor=a.backgroundColor);break}}let r=[...e.childNodes].flatMap(a=>g1(a,o));switch(r.length===0&&r.push(jsx$1("text",o,"")),e.nodeName.toUpperCase()){case "BR":return jsx$1("text",t,`
|
|
12
|
+
`);case "SPAN":{let a=e.dataset.userId;return a?jsx$1("element",{type:kr,value:a,displayName:e.textContent},{text:""}):r}case "P":return jsx$1("element",{type:ELEMENT_PARAGRAPH},r);case "A":return jsx$1("element",{type:ELEMENT_LINK,url:e.getAttribute("href")},r);default:return r}}function v1(e){let t=findNode(e,{match:{type:getPluginType(e,ELEMENT_LINK)}}),[o]=t||[{url:""}];return o?.url}function sn(e){let t={children:[{text:" "}],type:nn};e.insertNode(t);}var bI=createPluginFactory({isElement:true,isInline:true,isMarkableVoid:true,isVoid:true,key:kr,options:{trigger:"@",triggerPreviousCharPattern:/^$|^[\s"']$/},plugins:[{isElement:true,isInline:true,isVoid:true,key:nn}],withOverrides:d1}),_1=createPlugins([createParagraphPlugin({component:f1}),createBoldPlugin({component:withProps(PlateLeaf,{as:"b"})}),createItalicPlugin({component:withProps(PlateLeaf,{as:"i"})}),createUnderlinePlugin({component:withProps(PlateLeaf,{as:"u"})}),createFontColorPlugin(),createFontBackgroundColorPlugin(),createLinkPlugin({component:z1}),bI({component:Hs})],{components:{[nn]:Os}});var St={Add:"add",Edit:"edit",Show:"show"},P1=({isDisabled:e})=>{let{formatMessage:t}=A(),o=useEditorRef();return jsxs(je,{type:"dialog",children:[jsx(Oe,{children:jsx(L,{icon:LinkIcon,size:"sm",isDisabled:e,"aria-label":t(Dt.addLink),className:_o,preventFocusOnPress:true})}),jsx(ie,{className:sprinkles({boxShadow:"medium"}),placement:"top end",children:({close:r})=>jsx(ke,{size:"content",style:{minWidth:240},children:jsx(PI,{close:()=>{r(),setTimeout(()=>{focusEditor(o,o.selection);},0);}})})})]})},PI=({close:e})=>{let t=useEditorRef(),{formatMessage:o}=A(),r=useEditorSelector(p=>v1(p),[]),[a,n]=_t.useState(r?St.Show:St.Add),[i,s]=_t.useState(r||""),l=jsx(D,{padding:"lg",children:jsx(at,{label:o(Dt.link),value:i,autoFocus:true,onChange:s,placeholder:"https://yourdomain.com"})});return jsxs(Fragment,{children:[a===St.Add&&jsxs(Fragment,{children:[l,jsx(D,{display:"flex",justifyContent:"flex-end",padding:"lg",className:Ay,children:jsx(K,{isDisabled:!isUrl(i,true),label:o(Dt.addLink),size:"sm",onPress:()=>{upsertLink(t,{url:i,skipValidation:true}),e?.();},preventFocusOnPress:true})})]}),a===St.Show&&jsxs(Fragment,{children:[jsx(D,{padding:"lg",children:jsx(te,{type:"subtitle",size:"sm",children:r})}),jsxs(D,{display:"flex",justifyContent:"flex-end",padding:"lg",gap:"lg",borderColor:"border.subtle",borderWidth:1,borderStyle:"solid",children:[jsx(K,{label:o(Dt.editLink),size:"sm",variant:"secondary",onPress:()=>{n(St.Edit);},style:{flex:1,justifyContent:"center"}}),jsx(K,{label:o(Dt.removeLink),size:"sm",onPress:()=>{unwrapLink(t),e?.();},preventFocusOnPress:true,style:{flex:1,justifyContent:"center"}})]})]}),a===St.Edit&&jsxs(Fragment,{children:[l,jsxs(D,{display:"flex",justifyContent:"flex-end",padding:"lg",gap:"lg",borderColor:"border.subtle",borderWidth:1,borderStyle:"solid",children:[jsx(K,{label:o(Dt.cancel),size:"sm",variant:"secondary",onPress:()=>{n(St.Show),e?.();}}),jsx(K,{label:o(Dt.save),size:"sm",onPress:()=>{upsertLink(t,{url:i,skipValidation:true}),e?.();}})]})]})]})};function z1({className:e,children:t,...o}){return jsx(PlateElement,{asChild:true,className:e,...o,children:jsx("a",{className:za({size:"sm"}),children:t})})}var Dt=W({addLink:{id:"addLink",defaultMessage:"Add Link",description:"Add Link"},editLink:{id:"editLink",defaultMessage:"Edit Link",description:"Edit Link"},removeLink:{id:"removeLink",defaultMessage:"Remove Link",description:"Remove Link"},cancel:{id:"cancel",defaultMessage:"Cancel",description:"Cancel"},save:{id:"save",defaultMessage:"Save",description:"Save"},link:{id:"linkAnnotation",defaultMessage:"Link",description:"Link"}});var wI=parseColor("#ffffff00").toString("hexa"),Ws=[{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"}];[...Ws,{label:"Transparent",color:wI}];var cn=({nodeType:e,icon:t,ariaLabel:o,isDisabled:r})=>{let a=useEditorSelector(i=>isMarkActive(i,e),[]),n=useEditorRef();return jsx(Ie,{variant:"tertiary",isSelected:a,size:"sm",icon:t,"aria-label":o,isDisabled:r,onPress:()=>{toggleMark(n,{key:e});},preventFocusOnPress:true})},Xs=({nodeType:e,"aria-label":t,isDisabled:o})=>{let{updateColor:r,clearColor:a,color:n}=useColorDropdownMenuState({customColors:[],colors:[],nodeType:e}),i=useCallback(({ref:l,triggerProps:p})=>jsx(L,{icon:e==="color"?TextIcon$1:HighlightTextIcon,"aria-label":t,size:"md",variant:"popover",isDisabled:o,className:_o,preventFocusOnPress:true,...p,ref:l}),[e,t,o]),s=useCallback(l=>{l?r(l.toString("rgba")):a();},[a,r]);return jsx(yo,{presets:Ws,allowRemoval:true,pickerMode:"lazy",placement:"top end",colorLabel:false,renderTriggerButton:i,value:n||"#000000",onChange:s,isDisabled:o})};var oR=[{type:ELEMENT_PARAGRAPH,children:[{text:""}]}],ln=_t.createContext({items:[],containerRef:{current:null},maxMentionableUsersSuggestions:10}),Qs=_t.forwardRef(({value:e,defaultValue:t,onChange:o,style:r,spellCheck:a,placeholder:n,isInline:i,isDisabled:s,editableContentAriaLabel:l,containerRef:p,onHelpDialogOpenRequest:c,mentionableUsers:u,editorHandle:m,maxMentionableUsersSuggestions:d,autoFocus:b,editorRef:y,saveOnEnter:f,onSave:g},v)=>{let _=useRef(null),h=useId(),{formatMessage:x}=A(),w=useRef(null),C=w.current,I=useRef(null),P=useMemo(()=>C?.getRootNode()instanceof ShadowRoot,[C]),[S,k]=useControlledState(e?Gs(e):void 0,Gs(t||"<p></p>"),R=>{o&&o(wr(R));}),{keyboardProps:T}=useKeyboard({onKeyDown:R=>{(f&&R.key==="Enter"&&!R.shiftKey||(R.ctrlKey||R.metaKey)&&R.key==="Enter")&&(R.preventDefault(),g()),R.altKey&&R.key==="F10"?(R.preventDefault(),_.current&&_.current.querySelector("button")?.focus()):R.continuePropagation(),Bo()&&P&&I.current&&focusEditor(I.current);}});useEffect(()=>{s&&I.current&&deselect(I.current);},[s]),useImperativeHandle(v,()=>({startMention:()=>{I.current&&!w.current?.querySelector("input[role='combobox']")&&sn(I.current);}})),useImperativeHandle(m,()=>({setCaretPosition:R=>{I.current&&(focusEditor(I.current),moveSelection(I.current,{distance:R,unit:"character"}));},focus:()=>{I.current&&focusEditor(I.current);}}));let $=useMemo(()=>({items:u||[],containerRef:p,maxMentionableUsersSuggestions:d}),[u,p,d]);return jsx(ln.Provider,{value:$,children:jsxs(Plate,{initialValue:S||oR,plugins:_1,editorRef:M(I,y||null),onChange:R=>{k(R);},children:[jsxs(en,{className:rn,"aria-controls":h,ref:_,children:[jsxs(D,{display:"flex",flexDirection:"row",role:"group",gap:"xs",paddingX:"sm",children:[jsx(cn,{nodeType:MARK_BOLD,icon:BoldIcon,ariaLabel:x(Co.bold),isDisabled:s}),jsx(cn,{nodeType:MARK_ITALIC,icon:ItalicIcon,ariaLabel:x(Co.italic),isDisabled:s}),jsx(cn,{nodeType:MARK_UNDERLINE,icon:UnderlineIcon,ariaLabel:x(Co.underline),isDisabled:s})]}),jsx(q,{orientation:"vertical",className:zr}),jsx(Xs,{nodeType:MARK_COLOR,"aria-label":x(Co.fontColor),isDisabled:s}),jsx(q,{orientation:"vertical",className:zr}),jsx(Xs,{nodeType:MARK_BG_COLOR,"aria-label":x(Co.backgroundColor),isDisabled:s}),jsx(q,{orientation:"vertical",className:zr}),jsx(P1,{isDisabled:s}),jsx(q,{orientation:"vertical",className:zr}),jsx(L,{className:_o,icon:QuestionmarkCircleIcon,size:"sm","aria-label":x(Co.help),onPress:c})]}),jsx(q,{variant:"secondary"}),jsx("div",{...T,ref:w,children:jsx(PlateContent,{id:h,disabled:s,readOnly:s,style:r,placeholder:n,autoFocus:b,spellCheck:a,"aria-label":l,className:classNames(tn({isDisabled:s}),on({isInline:i})),renderPlaceholder:({attributes:R,children:N})=>jsx("span",{...R,className:sprinkles({paddingY:"lg"}),children:N})})})]})})});Qs.displayName="RichEditor";var u1=({key:e,value:t},{isDisabled:o,optionProps:r,isFocused:a,_state:n},i)=>{let{hoverProps:s}=useHover({isDisabled:o}),{label:l,data:p}=t;return jsxs(Fragment,{children:[jsxs("li",{...mergeProps(r,s),className:Uy({isDisabled:o,isHovered:a}),"data-active":a,ref:i,children:[jsx(uo,{name:l,...p?.avatar}),jsxs(D,{display:"flex",flexDirection:"column",children:[jsx(te,{type:"subtitle",size:"sm",children:l}),jsx(te,{type:"helper",size:"sm",children:p?.description})]})]}),e===n.collection.getLastKey()?null:jsx(q,{})]})},Co=W({bold:{defaultMessage:"Bold",id:"bold"},italic:{defaultMessage:"Italic",id:"italic"},underline:{defaultMessage:"Underline",id:"underline"},backgroundColor:{defaultMessage:"Background color",id:"backgroundColor"},fontColor:{defaultMessage:"Font color",id:"fontColor"},help:{defaultMessage:"Help",id:"help"}});var T1=_t.memo(_t.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,enableRichText:a=false,onCancel:n,onSave:i,isInline:s=true,submitButtonIcon:l=ArrowUpCircleFilledIcon,submitButtonAriaLabel:p,cancelButtonAriaLabel:c,"aria-label":u,"aria-describedby":m,"aria-labelledby":d,"aria-details":b,editableContentAriaLabel:y="Editing Area",footerButtons:f,clearOnCancel:g,clearOnSave:v,..._},h)=>{let x=useRef(null),{formatMessage:w}=A(),C=useRef(null),I=useRef(null),P=useRef(null),S=!a&&_.variant==="minimal",k=useRef(null),[T,$]=_t.useState(_.value||_.defaultValue),R=_.isDisabled||_.isSaveDisabled||!getPlainText(T||""),{fieldProps:N}=useLabel({"aria-label":u,"aria-labelledby":d,"aria-describedby":m,"aria-details":b,labelElementType:"div"});S&&!_.avatarName&&console.warn("Editor: When using the minimal `variant` and `enableRichText` is `false`, you should provide an `avatarName`.");let E=useCallback(()=>{$(""),a?x.current?.reset():I.current?.clear();},[a]),F=useCallback(()=>{R||(i?.(a?wr(x.current?.children):C.current.value),v&&E());},[E,v,a,i,R]),B=jsx(L,{variant:"ghost","aria-label":p||w(tl.save),icon:l,isDisabled:R,size:"md",excludeFromTabOrder:S,className:S?qy:void 0,onPress:F,preventFocusOnPress:true}),[j,O]=_t.useState(false),{keyboardProps:H}=useKeyboard({onKeyDown:V=>{(V.metaKey||V.ctrlKey)&&V.shiftKey&&V.key==="h"&&(V.preventDefault(),O(true));}}),Q=useCallback(V=>{$(V),_.onChange?.(V);},[_]);return jsxs("div",{...mergeProps(N,a?H:{}),role:"application",ref:M(P,h),style:t,"data-block-id":o,"data-block-class":r,className:classNames(jy({isInline:s,isMinimal:S}),"BaselineUI-Editor",e),"aria-disabled":_.isDisabled,children:[S?jsxs(Fragment,{children:[s?jsx(uo,{className:Fy,name:_.avatarName||""}):null,jsxs("div",{className:Gy({isInline:s}),children:[jsx(an,{isMinimal:S,textBoxRef:C,isInline:s,editableContentAriaLabel:y,..._,onChange:Q,onSave:F}),B]})]}):jsxs(Fragment,{children:[a?jsx(Qs,{containerRef:P,ref:k,editorRef:x,isInline:s,editableContentAriaLabel:y,onHelpDialogOpenRequest:()=>{O(true);},..._,onChange:Q,onSave:F}):jsxs(Fragment,{children:[!s&&jsx(q,{variant:"secondary"}),jsx(an,{onCancel:n,textBoxRef:C,ref:I,isInline:s,editableContentAriaLabel:y,..._,onChange:V=>{$(V),_.onChange?.(V);},onSave:F})]}),jsx(q,{variant:"secondary"}),jsxs("div",{className:classNames(rn,sprinkles({justifyContent:"space-between"})),children:[jsxs(D,{paddingX:"sm",gap:"sm",display:"flex",children:[a&&_.mentionableUsers?jsx(L,{icon:AtIcon,size:"sm","aria-label":w(tl.mention),onPress:()=>k.current?.startMention(),preventFocusOnPress:true}):null,f?.map(({type:V,props:U},re)=>V==="action"?jsx(L,{...U,size:"sm",isDisabled:_.isDisabled||U.isDisabled},re):jsx(Ie,{...U,size:"sm",variant:"tertiary",isDisabled:_.isDisabled||U.isDisabled},re))]}),jsxs(D,{children:[!!n&&jsx(L,{variant:"secondary",icon:XCircleFilledIcon,isDisabled:_.isDisabled,size:"md",onPress:()=>{n(),g&&E();},"aria-label":c||w(tl.cancel)}),B]})]})]}),jsx(Jy,{isOpen:j,onClose:()=>{O(false);}})]})}));T1.displayName="Editor";var tl=W({cancel:{defaultMessage:"Cancel",id:"cancel"},save:{defaultMessage:"Save",id:"save"},mention:{defaultMessage:"Mention",id:"mention"}});var S1="_8kqf970 _1yep5z6po _1yep5z6pp _1yep5z6pq _1yep5z6m6 _1yep5z6m7 _1yep5z6m8 _1yep5z6oi _1yep5z6oj _1yep5z6ok _1yep5z614v _1yep5z614w _1yep5z614x _1yep5z6154 _1yep5z6155 _1yep5z6156 _1yep5z615m _1yep5z615n _1yep5z615o _1yep5z6z9 _1yep5z6vi _1yep5z6vj _1yep5z6vk _1yep5z617s _1yep5z6101";var M1=2,E1=_t.forwardRef(({className:e,style:t,hideForKeyboard:o,scrollRef:r,label:a,delay:n=1500,smoothScroll:i=true,"data-block-id":s,"data-block-class":l},p)=>{let c=_t.useRef(null),u=useInteractionModality(),[m,d]=_t.useState(false),b=useCallback(()=>{let P=r?.current||he(c.current).body;return ne(P).getComputedStyle(P).flexDirection==="column-reverse"?P.scrollTop+M1>=0:P.scrollTop+P.clientHeight+M1>=P.scrollHeight},[r]),[y,f]=_t.useState(b),{buttonProps:g,isPressed:v}=useButton({onPress:()=>{let P=r?.current||he(c.current).body;P.scrollTo({top:P.scrollHeight,behavior:i?"smooth":"auto"});}},c),{focusProps:_,isFocused:h,isFocusVisible:x}=useFocusRing(),{hoverProps:w,isHovered:C}=useHover({}),I=filterTruthyValues({"data-block-id":s,"data-block-class":l,"data-pressed":v,"data-focus-visible":x,"data-hovered":C,"data-focused":h});return useEffect(()=>{f(b());},[b]),useEffect(()=>{let P=r?.current||he(c.current).body,S="onscrollend"in ne(P),k=()=>{setTimeout(()=>{d(false),f(b());},n);},T=()=>{d(true),S||k();};return P.addEventListener("scroll",T),P.addEventListener("scrollend",k),()=>{P.removeEventListener("scroll",T),P.removeEventListener("scrollend",k);}},[r,n,b]),jsx(AnimatePresence,{initial:false,children:(!o||u!=="keyboard")&&!m&&!y?jsxs(motion.button,{initial:{opacity:0,transform:"translateX(-50%) translateY(10px)"},animate:{opacity:1,transform:"translateX(-50%) translateY(0)"},exit:{opacity:0,transform:"translateX(-50%) translateY(10px)"},transition:{duration:.3},...mergeProps(g,_,w,I),className:classNames(S1,Ra({isFocusVisible:x,variant:"high-contrast",isHovered:C}),$a({variant:"high-contrast"}),"BaselineUI-ScrollControlButton",e),style:t,ref:M(p,c),children:[jsx(ArrowDownCircleFilledIcon,{size:16,className:tr({variant:"high-contrast"})}),a]}):null})});E1.displayName="ScrollControlButton";var rl="_1yep5z6k4 _1yep5z6k5 _1yep5z6k6 _1yep5z6kd _1yep5z6ke _1yep5z6kf",L1=z({defaultClassName:"_1v0p2z10 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j4 _1yep5z6j5 _1yep5z6j6 _1yep5z69f _1yep5z69g _1yep5z69h",variantClassNames:{hasTitleAndIcon:{true:"_1yep5z6m6 _1yep5z6m7 _1yep5z6m8 _1yep5z6oo _1yep5z6op _1yep5z6oq"},hasNoCloseBtn:{true:"_1yep5z6mc _1yep5z6md _1yep5z6me _1yep5z6oo _1yep5z6op _1yep5z6oq _1yep5z6pu _1yep5z6pv _1yep5z6pw _1yep5z6ni _1yep5z6nj _1yep5z6nk"}},defaultVariants:{},compoundVariants:[[{hasTitleAndIcon:true,hasNoCloseBtn:true},"_1yep5z61hr _1yep5z61hs _1yep5z61ht"]]}),B1="_1v0p2z10";function A1({ariaProps:e,fallbackLabelId:t,fallbackDescriptionId:o}){let r={...e};return t&&!r["aria-labelledby"]&&!r["aria-label"]&&(r["aria-labelledby"]=t),o&&!r["aria-describedby"]&&!r["aria-details"]&&(r["aria-describedby"]=o),r}var mn=_t.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,message:a,title:n,primaryActionLabel:i,cancelLabel:s,textInputProps:l,icon:p,iconColor:c,showCloseButton:u=true,onPrimaryAction:m,onCancel:d,autoFocusButton:b,isPrimaryActionDisabled:y,...f},g)=>{let v=useId(),_=useId(),{formatMessage:h}=A(),x=n&&jsx(te,{type:"title",size:"sm",elementType:"h3",id:v,children:n}),w=A1({ariaProps:f,fallbackLabelId:n?v:void 0,fallbackDescriptionId:a?_:void 0});return jsxs(ke,{...w,className:e,style:t,"data-block-id":o,"data-block-class":r,size:"sm",variant:"primary",role:"alertdialog",ref:g,children:[jsxs("div",{className:L1({hasTitleAndIcon:!!(p&&n),hasNoCloseBtn:!u}),children:[jsxs(D,{display:"flex",justifyContent:"space-between",alignItems:"center",flexDirection:"row",children:[p?jsx(p,{style:{color:c},size:24}):null,!p&&x,u?jsx(L,{icon:XIcon,variant:"secondary",size:"md","aria-label":h(wR.close),onPress:d}):null]}),p?x:null]}),a?jsx(D,{elementType:"section",className:B1,paddingX:"lg",paddingBottom:"lg",typography:"body.sm.regular",color:"text.primary",id:_,children:a}):null,l?jsx(D,{paddingX:"lg",paddingBottom:"lg",children:jsx(at,{...l})}):null,s||i?jsxs(Fragment,{children:[jsx(q,{}),jsxs(D,{padding:"lg",display:"flex",gap:"xl",children:[s?jsx(K,{variant:"secondary",className:rl,label:s,onPress:d,autoFocus:b==="cancel"}):null,i?jsx(K,{className:rl,label:i,onPress:m,autoFocus:b==="primary",isDisabled:y}):null]})]}):null]})});mn.displayName="AlertDialog";var wR=W({close:{id:"close",defaultMessage:"Close",description:"Close button label"}});var j1="_1t55bp71",O1="_1yep5z6e3 _1yep5z6eu _1yep5z6iy _1yep5z6iz _1yep5z6j0 _1yep5z69i _1yep5z69j _1yep5z69k",H1="_1t55bp70";var DR=SR(),V1=_t.forwardRef(({className:e,style:t,children:o,"data-block-id":r,"data-block-class":a,showCaret:n},i)=>{let s=useMemo(()=>{let l=o;return (!o||Array.isArray(o)&&o.length===0)&&(l=""),DR.render(l)},[o]);return jsx("div",{className:classNames(O1,H1,{[j1]:n},"BaselineUI-Markdown",e),"data-block-id":r,"data-block-class":a,style:t,ref:i,dangerouslySetInnerHTML:{__html:s}})});V1.displayName="Markdown";function G1(e){let{formatMessage:t,locale:o}=A(),[r,a]=_t.useState(false),[n,i]=_t.useState(0),[s,l]=_t.useState(0),[p,c]=_t.useState(false);useEffect(()=>{if(!e.current)return;let d=e.current,b=()=>{a(false),i(0);},y=()=>{p||i(d.currentTime*100/d.duration);},f=()=>{l(d.duration);};return d.addEventListener("ended",b),d.addEventListener("timeupdate",y),d.addEventListener("loadedmetadata",f),()=>{d.removeEventListener("ended",b),d.removeEventListener("timeupdate",y),d.removeEventListener("loadedmetadata",f);}},[p,e]);let u=useCallback(()=>{(async()=>e.current&&(e.current.paused?(await e.current.play(),a(true),announce(t(q1.playing),"polite")):(e.current.pause(),a(false),announce(t(q1.paused),"polite"))))();},[t,e]),m=useCallback(d=>{e.current&&(e.current.currentTime=d*e.current.duration/100,announce(ER(e.current.currentTime,o.locale),"assertive"));},[o.locale,e]);return {isPlaying:r,progress:n,duration:s,togglePlay:u,seek:m,setProgress:i,formattedCurrentTime:e.current?.currentTime?K1(e.current?.currentTime):"00:00",formattedDuration:s?K1(s):"00:00",setIsSliderDragging:c}}var q1=W({playing:{id:"playing",defaultMessage:"Playing"},paused:{id:"paused",defaultMessage:"Paused"}});function ER(e,t){let o=Math.floor(e/3600),r=Math.floor(e%3600/60),a=e%60,n={...o&&{hours:o},...r&&{minutes:r},seconds:Math.floor(a)};return new Intl.DurationFormat(t,{style:"long"}).format(n)}function K1(e){let t=Math.floor(e%3600/60),o=Math.floor(e%60);return [t,o].map(r=>r.toString().padStart(2,"0")).join(":")}var W1="_1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z69o _1yep5z69p _1yep5z69q",Y1="rta2n91 _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z69o _1yep5z69p _1yep5z69q _1yep5z6101 _1yep5z6vl _1yep5z6vm _1yep5z6vn _1yep5z617q _1yep5z610y",X1="rta2n90";var Q1=_t.forwardRef(({className:e,style:t,size:o="lg",sources:r,"data-block-id":a,"data-block-class":n,...i},s)=>{let l=_t.useRef(null),{isPlaying:p,progress:c,duration:u,togglePlay:m,seek:d,formattedDuration:b,formattedCurrentTime:y,setProgress:f,setIsSliderDragging:g}=G1(l),{formatMessage:v}=A(),_=filterTruthyValues({"data-block-id":a,"data-block-class":n,"data-state":p?"playing":"paused","data-loaded":u>0});return jsxs("div",{..._,...i,className:classNames(W1,"BaselineUI-AudioPlayer",e),role:"group",style:t,ref:s,children:[jsx(VisuallyHidden,{children:jsx("audio",{ref:l,children:r.map(({url:h,type:x})=>jsx("source",{src:h,type:x},h))})}),jsx(Ie,{icon:p?PauseIcon:PlayIcon,variant:"toolbar",isSelected:p,size:o,"aria-label":v(p?nl.pause:nl.play),style:{borderRadius:"50%"},onPress:m}),jsxs("div",{className:Y1,children:[jsx("span",{"aria-hidden":true,children:y}),jsx(Qt,{"aria-label":v(nl.audioTimeline),value:c,minValue:0,maxValue:100,className:X1,onChange:h=>{f(h),g(true);},onChangeEnd:h=>{d(h),g(false);}}),jsx("span",{"aria-hidden":true,children:b})]})]})});Q1.displayName="AudioPlayer";var nl=W({play:{id:"play",defaultMessage:"Play"},pause:{id:"pause",defaultMessage:"Pause"},audioTimeline:{id:"audioTimeline",defaultMessage:"Audio timeline"}});var eb="_1w920rnd _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6g1 _1yep5z6ig _1yep5z6ih _1yep5z6ii",tb="_1w920rn1 _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6j4 _1yep5z6j5 _1yep5z6j6 _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z69i _1yep5z69j _1yep5z69k",ob="_1w920rn0 _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6le",yn=z({defaultClassName:"_1w920rn2 _1yep5z6d6 _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6id _1yep5z6ie _1yep5z6if",variantClassNames:{isFocusVisible:{true:"_1yep5z6lt _1yep5z6lr _1yep5z6hx"},isSelected:{true:"_1yep5z6lt _1yep5z6lr _1yep5z6hx"},isLoading:{true:"_1yep5z616g _1yep5z616h _1yep5z616i"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:true,isSelected:true},"_1w920rn6 _1yep5z6lt _1yep5z6lr _1yep5z6hx"]]}),rb="_1w920rnb _1yep5z6lo",ab=z({defaultClassName:"_1w920rn7 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6ar _1yep5z6as _1yep5z6at _1yep5z6bf _1yep5z6bg _1yep5z6bh _1yep5z6c3 _1yep5z6c4 _1yep5z6c5 _1yep5z6cr _1yep5z6cs _1yep5z6ct _1yep5z6g5 _1yep5z6eu _1yep5z6dy",variantClassNames:{isFocusVisible:{true:"_1w920rn8 _1yep5z6lt _1yep5z6lr _1yep5z6hx"},isSelected:{true:"_1w920rn9"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:true,isSelected:true},"_1w920rna _1yep5z61ty _1yep5z61tx _1yep5z61q4"]]}),nb="_1w920rnc";var bn=({items:e,ulRef:t,containerClassName:o,previewClassName:r,itemDataAttribute:a,showCount:n=false})=>{let{length:i}=e,s=_t.useRef(null);return useLayoutEffect(()=>{if(!s.current)return;let l=s.current.closest(o)?.querySelector(`[${a}='${e?.at(-1)?.key}']`)?.cloneNode(true);invariant(l,"Node is not defined."),s.current?.prepend(l);},[e,t,o,a]),jsx("div",{className:r,ref:s,children:n&&i>1?jsx(D,{backgroundColor:"background.secondary.medium",borderRadius:"full",typography:"label.md.medium",color:"text.primary",position:"absolute",paddingX:"md",className:nb,children:i}):null})};function sb(e,t){return e.find(o=>o.id===t)}function lb(e,t,o){let r=[...e],a=r.filter(s=>o.has(s.id)),n=r.filter(s=>!o.has(s.id)),i=n.findIndex(s=>s.id===t);return n.flatMap((s,l)=>l===i?[...a,s]:s)}function pb(e,t,o){let r=[...e],a=r.filter(s=>o.has(s.id)),n=r.filter(s=>!o.has(s.id)),i=n.findIndex(s=>s.id===t);return n.flatMap((s,l)=>l===i?[s,...a]:s)}function il(e){return e.map(t=>({id:t.id,label:t.label,data:{src:t.src,alt:t.alt}}))}function gn(e){return e.map(t=>({id:t.id,label:t.label,src:t.data?.src,alt:t.data?.alt}))}function cb(){let[e,t]=useState(false);return useEffect(()=>{let o=window.matchMedia("(pointer: coarse)");t(o.matches);let r=a=>{t(a.matches);};return o.addEventListener("change",r),()=>{o.removeEventListener("change",r);}},[]),e}var ub=_t.forwardRef(({id:e,className:t,children:o,style:r,isDisabled:a,onTruncatedChange:n,onHoverChange:i},s)=>{let l=useRef(null),{buttonProps:p}=useButton({elementType:"span",isDisabled:a},l);useLayoutEffect(()=>{l.current&&n?.(l.current.scrollWidth>l.current.clientWidth);},[o,n]);let{hoverProps:c}=useHover({isDisabled:a,onHoverChange:i});return jsx("span",{...$e(p,c),className:classNames(t,"BaselineUI-AdaptiveText"),id:e,tabIndex:-1,ref:M(l,s),style:r,role:void 0,children:o})});ub.displayName="Label";var pl=_t.memo(_t.forwardRef(({children:e,isOpen:t,isDisabled:o,...r},a)=>{let[n,i]=useState(false),[s,l]=useState(false),p=cb(),c=o||!s||p;return jsx(J,{text:e,variant:"inverse",includeArrow:false,size:"sm",placement:"bottom start",isOpen:(n||t)&&s,isDisabled:c,children:jsx(ub,{...r,isDisabled:c,onTruncatedChange:l,onHoverChange:i,ref:a,children:e})})}));pl.displayName="AdaptiveText";var r$=({fit:e,item:t,deleteElement:o})=>{let{formatMessage:r}=A(),a=useReducedMotion(),{imgProps:n,isLoading:i}=Wt({src:t.data?.src,alt:t.data?.alt??""});return i?jsx(so,{"aria-label":r($r.loading)}):jsx(motion.div,{role:"img",initial:{opacity:a?1:0},animate:{opacity:1},exit:{opacity:a?1:0},"aria-label":n.alt,style:{backgroundImage:`url(${n.src})`,backgroundSize:e},className:rb,children:o})},yb=({item:e,options:{optionProps:t,isFocusVisible:o,isSelected:r,isFocused:a,isDisabled:n,isPressed:i},liRef:s,fit:l="contain",onDelete:p,className:c,imageClassName:u,imageLabelClassName:m,imageDimensions:d,style:b,layoutTransition:y=true,renderImage:f=(g,{deleteElement:v})=>jsx(r$,{item:g,deleteElement:v,fit:l})})=>{let g=useId(),{formatMessage:v}=A(),{value:_}=e;invariant(_&&Qe(_),"Expected value to be a list option");let h=p?jsx("div",{className:eb,children:jsx(L,{"aria-label":v($r.delete),size:"xs",icon:XIcon$1,onPress:()=>{p(_.id);},UNSAFE_NON_INTERACTIVE:true})}):null,x=gn([_])[0],w=useCallback($=>{let R={},N=typeof $=="function"?$(x,{isSelected:r}):$;return N&&(R.width=typeof N.width=="string"?dl[N.width]:N.width,R.aspectRatio="height"in N?`${R.width} / ${N.height}`:N?.aspectRatio?.toString()),R},[x,r]),C=useMemo(()=>({isFocusVisible:o,isSelected:r,isFocused:a,isDisabled:n,isPressed:i}),[o,r,a,n,i]),I=useReducedMotion(),P=typeof y=="boolean"?y:!I,S=typeof y=="object"?y:void 0,k=P?motion.li:"li",T=w(d);return jsxs(k,{...mergeProps(t,P?{layout:true,transition:S}:void 0),ref:s,className:classNames(tb,zt(c,x,C)),"aria-labelledby":g,style:Or(b,x,C),children:[jsx(D,{display:"flex",flexDirection:"column",flex:1,justifyContent:"center",alignItems:"center",flexGrow:0,children:jsx("div",{className:classNames(yn({isFocusVisible:o,isSelected:r,isLoading:true}),zt(u,x,C)),style:T,"data-image-key":_.id,children:f(_,{deleteElement:h??void 0,onDelete:p})})}),jsx(pl,{id:g,className:classNames(ab({isFocusVisible:o,isSelected:r}),m),style:{maxWidth:T.width},isOpen:o,children:_.label})]})};var c$={width:0,display:"block"},vb={src:"src",alt:"alt"},dl={sm:102,md:170},_b=_t.forwardRef(({className:e,style:t,fit:o="cover",onReorder:r,"data-block-id":a,"data-block-class":n,onDelete:i,imageWidth:s=dl.sm,aspectRatio:l=3/4,items:p,defaultItems:c=[],onKeyDown:u,imageContainerClassName:m,imageClassName:d,labelClassName:b,onListChange:y,renderImage:f,layoutTransition:g,imageDimensions:v={width:s,aspectRatio:l},imageContainerStyle:_,...h},x)=>{let w=_t.useRef(null),[C,I]=useState([]),{formatMessage:P}=A();useEffect(()=>{(l||s)&&console.warn("ImageGallery: aspectRatio and imageWidth are deprecated. Use imageDimensions instead.");},[s,l]);let[S,k]=useControlledState(h.selectedKeys,h.defaultSelectedKeys??[],h.onSelectionChange),[T,$]=useControlledState(p?il(p):void 0,il(c),y?B=>{y?.(gn(B));}:void 0),R=useCallback(B=>{let j=B.target.key,O=B.keys;if(B.target.dropPosition==="before"){let H=lb(T,j,O);$(H);}else if(B.target.dropPosition==="after"){let H=pb(T,j,O);$(H);}r?.(B);},[T,r,$]),N=useCallback(()=>{i&&C.length&&($(T.filter(B=>!C.includes(B.id))),i(new Set(C)),I([]));},[C,T,i,$]),E=useCallback((B,j,O)=>{let{value:H}=B;invariant(Qe(H));let Q={id:H.id,label:H.label,src:H.data?.src,alt:H.data?.alt};return jsx(yb,{item:B,options:j,liRef:O,fit:o,onDelete:i?V=>{I([V]);}:void 0,renderImage:f,className:zt(m,Q,j),imageClassName:d,imageLabelClassName:b,imageDimensions:v,style:_,layoutTransition:g})},[o,i,f,m,d,b,v,_,g]),{keyboardProps:F}=useKeyboard({onKeyDown(B){if(u?.(B),B.key==="Backspace"||B.key==="Delete"){if(!i)return;if([...S].length)I([...S]);else {let O=B.target.dataset.key;I([O]);}}}});return jsxs("div",{...F,ref:x,style:t,className:classNames("BaselineUI-ImageGallery",e),"data-block-id":a,"data-block-class":n,children:[jsx(fe,{...h,selectedKeys:S,items:T,onReorder:R,layout:"grid",orientation:"vertical",className:ob,ref:w,dropIndicatorStyle:c$,renderOption:E,renderDragPreview:B=>jsx(bn,{items:B,ulRef:w,containerClassName:".BaselineUI-ImageGallery",previewClassName:yn(),itemDataAttribute:"data-image-key",showCount:true}),onSelectionChange:k,getItems:B=>[...B].map(j=>{let O=sb(T,j);return {[vb.src]:O?.src||"",[vb.alt]:O?.alt||"",key:j}})}),jsx(Le,{isOpen:!![...C].length,onOpenChange:B=>{B||I([]);},children:jsx(Ue,{isDismissable:true,children:jsx(mn,{showCloseButton:false,title:"Are you sure you want to delete this item?",primaryActionLabel:P($r.delete),cancelLabel:P($r.cancel),onCancel:()=>{I([]);},onPrimaryAction:N,autoFocusButton:"cancel"})})})]})});_b.displayName="ImageGallery";var $r=W({delete:{id:"delete",defaultMessage:"Delete"},cancel:{id:"cancel",defaultMessage:"Cancel"},loading:{id:"loading",defaultMessage:"Loading"}});var zb="_1sexph00",hb="_1sexph02",xb="_1sexph01 _1yep5z6189 _1yep5z618a _1yep5z618b _1yep5z61al _1yep5z61am _1yep5z61an _1yep5z61br _1yep5z61bs _1yep5z61bt _1yep5z619f _1yep5z619g _1yep5z619h _1yep5z61sg _1yep5z61sh _1yep5z61si";var Cb=_t.forwardRef(({className:e,style:t,items:o,"data-block-id":r,"data-block-class":a,hideLabel:n,size:i="md",isDisabled:s,showSelectedIcon:l=true,excludeFromTabOrder:p,onPress:c,onButtonAction:u,isSelected:m,defaultSelected:d,onButtonSelectionChange:b,moreAriaLabel:y,optionStyle:f,optionClassName:g,triggerClassName:v,triggerStyle:_,tooltipProps:h,buttonBehaviour:x="toggle",...w},C)=>{let{formatMessage:I}=A(),P=ce(),S=useSelectState({items:o,...w,defaultSelectedKey:w.defaultSelectedKey||o?.[0]?.id,children:P,validationState:w.validationState==="error"?"invalid":"valid"}),k=useMemo(()=>typeof x=="function"?x(S.selectedKey):x,[x,S.selectedKey]),[T,$]=useControlledState(m,!!d,U=>{b?.({isSelected:U,selectedKey:S.selectedKey});}),{hoverProps:R,isHovered:N}=useHover({isDisabled:s}),E=useMemo(()=>{let U=S.collection.getItem(S.selectedKey),re=U?.textValue||U?.["aria-label"],pe=U?.value,Y=pe?.icon,be=k==="toggle",_e=s||S.disabledKeys.has(S.selectedKey),Re={size:i,...be&&{isSelected:T},onPress:ae=>{be&&$(!T),c?.(ae),u?.({isSelected:be?!T:false,selectedKey:S.selectedKey,buttonBehaviour:k});},isDisabled:_e,excludeFromTabOrder:p,className:classNames(typeof g=="function"?g(pe,{isButton:true,isSelected:T}):g,"BaselineUI-ButtonSelect-Button"),style:typeof f=="function"?f(pe,{isButton:true,isSelected:T}):f};return n&&Y?jsx(J,{variant:"inverse",size:"sm",includeArrow:false,text:re,placement:"bottom start",offset:4,...typeof h=="function"?h("button"):h,children:k==="action"?jsx(L,{icon:Y,"aria-label":re,variant:"toolbar",...Re}):jsx(Ie,{icon:Y,"aria-label":re,variant:"toolbar",...Re})}):k==="toggle"?jsx(Pa,{iconStart:Y,label:re,variant:"toolbar",...Re}):jsx(K,{label:re,variant:"toolbar",...Re})},[p,n,T,s,c,g,f,$,i,S.collection,S.disabledKeys,S.selectedKey,h,k,u]),F=w["aria-label"],B=useCallback(({buttonProps:U,ref:re})=>{delete U["aria-labelledby"];let pe=y||`${I(_$.more)} ${F}`;return jsx(J,{variant:"inverse",size:"sm",includeArrow:false,text:pe,placement:"bottom start",offset:4,...h,children:jsx(PressResponder,{...U,children:jsx(L,{"aria-label":pe,ref:re,icon:CaretDownIcon,variant:"toolbar",size:i,className:({isFocusVisible:Y})=>classNames(Ca({isSelected:T&&k==="toggle",isFocusVisible:Y}),xb,v,"BaselineUI-ButtonSelect-Trigger"),style:_,isDisabled:s,excludeFromTabOrder:p})})})},[F,k,p,I,T,s,y,i,h,v,_]),j=filterTruthyValues({"data-block-id":r,"data-block-class":a,"data-hovered":N,"data-selected":T,"data-disabled":s,"data-expanded":S.isOpen,"data-button-behaviour":k}),O=oe(C),H=useMemo(()=>({state:S,popoverAnchorRef:O}),[S,O]),Q=useCallback(U=>typeof g=="function"?g(U,{isButton:false,isSelected:S.selectionManager.isSelected(U.id)}):g,[g,S.selectionManager]),V=useCallback(U=>typeof f=="function"?f(U,{isButton:false,isSelected:S.selectionManager.isSelected(U.id)}):f,[f,S.selectionManager]);return jsx(Ta.Provider,{value:H,children:jsxs(D,{...R,role:"group",display:"inline-flex",flexDirection:"row",alignItems:"center",className:classNames(zb,"BaselineUI-ButtonSelect",e),"aria-label":w["aria-label"],"aria-labelledby":w["aria-labelledby"],"aria-describedby":w["aria-describedby"],"aria-details":w["aria-details"],style:t,ref:O,...j,children:[E,jsx(st,{isDisabled:s,showSelectedIcon:l,placement:"bottom start",items:o,...w,optionClassName:Q,optionStyle:V,variant:"ghost",renderTrigger:B,className:classNames(hb,"BaselineUI-ButtonSelect-Select")})]})})});Cb.displayName="ButtonSelect";var _$=W({more:{id:"more",defaultMessage:"More"}});var Pb=z({defaultClassName:"_18v88n10 _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6ln",variantClassNames:{labelPosition:{top:"_1yep5z6157 _1yep5z6158 _1yep5z6159",start:"_1yep5z6154 _1yep5z6155 _1yep5z6156 _1yep5z616m _1yep5z616n _1yep5z616o _1yep5z6vl _1yep5z6vm _1yep5z6vn"}},defaultVariants:{},compoundVariants:[]}),kb=z({defaultClassName:"_18v88n1p _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6eu _1yep5z6ln _1yep5z6ly _1yep5z6lq _1yep5z6dy",variantClassNames:{isDisabled:{true:"_18v88n1q _1yep5z6111"},labelPosition:{top:"_18v88n1r",start:"_18v88n1s"}},defaultVariants:{},compoundVariants:[]}),wb=z({defaultClassName:"_18v88n1t _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6lk",variantClassNames:{validationState:{valid:"_18v88n1u",error:"_1yep5z610h",warning:"_1yep5z610p"},isReadOnly:{true:"_1yep5z6118"}},defaultVariants:{},compoundVariants:[]}),Ib=z({defaultClassName:"_18v88n1d _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6m1 _1yep5z6lz _1yep5z6h4 _1yep5z6jj _1yep5z6jk _1yep5z6jl",variantClassNames:{validationState:{valid:"_18v88n1e",error:"_1yep5z612q",warning:"_18v88n1g"},isHovered:{true:"_18v88n1h"},isFocused:{true:"_1yep5z6wl _1yep5z6wm _1yep5z6wn _1yep5z6x9 _1yep5z6xa _1yep5z6xb _1yep5z6xx _1yep5z6xy _1yep5z6xz _1yep5z6yl _1yep5z6ym _1yep5z6yn _1yep5z6184 _1yep5z6182 _1yep5z6134 _1yep5z617v _1yep5z617u _1yep5z6140 _1yep5z617x"},isDisabled:{true:"_18v88n1j"},variant:{primary:"_18v88n1k",ghost:"_18v88n1l"},isReadOnly:{true:"_1yep5z6140"}},defaultVariants:{},compoundVariants:[[{variant:"ghost",isHovered:true,isFocused:false,validationState:"valid"},"_1yep5z61u7 _1yep5z61u5 _1yep5z61pa"],[{variant:"ghost",isFocused:false,isHovered:false,validationState:"valid"},"_18v88n1n"],[{isHovered:true,validationState:"valid",isDisabled:false,isReadOnly:false,isFocused:false,variant:"primary"},"_1yep5z61pb"],[{isHovered:true,validationState:"warning",isDisabled:false,isReadOnly:false,isFocused:false},"_1yep5z61pb"],[{isReadOnly:true,variant:"primary",isFocused:false},"_18v88n1o"]]}),Rb=z({defaultClassName:"_18v88n13 _1yep5z6dy _1yep5z6ev",variantClassNames:{isDisabled:{true:"_1yep5z6111"}},defaultVariants:{},compoundVariants:[]}),$b=z({defaultClassName:"_18v88n19 _1yep5z6iv _1yep5z6iw _1yep5z6ix",variantClassNames:{labelPosition:{top:"_1yep5z6t9 _1yep5z6ta _1yep5z6tb",start:"_1yep5z6n6 _1yep5z6n7 _1yep5z6n8 _1yep5z6157 _1yep5z6158 _1yep5z6159"},hasMessage:{true:"_18v88n1c"}},defaultVariants:{},compoundVariants:[[{labelPosition:"start",hasMessage:false},"_1yep5z61sj _1yep5z61sk _1yep5z61sl"]]}),Tb=z({defaultClassName:"_18v88n15 _1yep5z699 _1yep5z69a _1yep5z69b _1yep5z6lq",variantClassNames:{isFocusVisible:{true:"_1yep5z6127 _1yep5z614f _1yep5z617t"},isHovered:{true:"_1yep5z6127 _1yep5z614f _1yep5z617t"},isOpen:{true:"_1yep5z614f _1yep5z617t"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:true},"_1yep5z61oa _1yep5z61qi _1yep5z61tw"],[{isHovered:true},"_1yep5z61oa _1yep5z61qi _1yep5z61tw"],[{isOpen:true},"_1yep5z61qi _1yep5z61tw"]]});function Sb({allowsCustomValue:e,onValueChange:t,inputValue:o},r,a,n,i){let[s,l]=useState(null),p=useRef(false);useEffect(()=>{if(!t)return;let u=a.current,m=d=>{l(d.target);};return u?.addEventListener("focusin",m),()=>{u?.removeEventListener("focusin",m);}},[t,a,r.selectedKey]),useGranularEffect(()=>{r.selectedKey&&(t?.({value:r.selectedItem?.textValue,key:r.selectedKey}),p.current=false);},[r.selectedKey],[t,r.selectedItem]),useInteractOutside({ref:n,isDisabled:!t,onInteractOutside:u=>{!i.current?.contains(u.target)&&s===n.current&&e&&p.current&&(t?.({value:n.current?.value,key:null}),p.current=false);}}),useEffect(()=>{if(!t)return;let u=n.current,m=()=>{p.current=true;};return u?.addEventListener("input",m),()=>{u?.removeEventListener("input",m);}},[n,t]),useEffect(()=>{p.current=false;},[o]);let{keyboardProps:c}=useKeyboard({isDisabled:!t,onKeyDown:u=>{e&&u.key==="Enter"&&p.current?(t?.({value:n.current?.value,key:null}),p.current=false):u.key==="Escape"&&r.close(),u.continuePropagation();}});return {inputProps:c}}var Mb=_t.forwardRef(({className:e,style:t,inputStyle:o,inputClassName:r,"data-block-id":a,"data-block-class":n,label:i,items:s,showSelectedIcon:l=false,onSelectionChange:p,onInputChange:c,isInvalid:u=false,labelPosition:m="top",validationState:d="valid",variant:b="primary",toggleLabel:y,renderOption:f,showIcon:g=true,filter:v,minValue:_,maxValue:h,inputType:x="text",onInputSubmit:w,onValueChange:C,tooltip:I,...P},S)=>{let k=useObjectRef(S),{contains:T}=useFilter({sensitivity:"base"}),$=ce(),R=useComboBoxState({...P,defaultFilter:v||T,defaultItems:s,onSelectionChange:p,onInputChange:c,children:$,validationState:u?"invalid":"valid"}),N=_t.useRef(null),E=_t.useRef(null),F=_t.useRef(null),B=_t.useRef(null),j=_t.useRef(null),{inputProps:O}=Sb({onValueChange:C,allowsCustomValue:P.allowsCustomValue,inputValue:P.inputValue},R,k,E,B),{buttonProps:H,inputProps:Q,listBoxProps:V,labelProps:U,errorMessageProps:re,descriptionProps:pe,validationErrors:Y}=useComboBox({...P,inputRef:E,defaultItems:s,buttonRef:N,listBoxRef:F,popoverRef:B,validationState:d==="error"?"invalid":"valid"},R),be=P.errorMessage||Y.join(" "),_e=Ce({...P,errorMessage:be,descriptionProps:pe,errorMessageProps:re,labelPosition:m});be&&(d="error");let{hoverProps:Re,isHovered:ae}=useHover({isDisabled:P.isDisabled}),{isFocused:ge,focusProps:Eo,isFocusVisible:Ft}=useFocusRing(),jt=ao({isReadOnly:P.isReadOnly,validationState:d}),Ot=filterTruthyValues({"data-read-only":P.isReadOnly,"data-disabled":P.isDisabled,"data-validation-state":d,"data-focused":ge,"data-focus-visible":Ft}),{labelProps:Z,fieldProps:G}=useLabel({label:i,"aria-label":P["aria-label"],"aria-labelledby":P["aria-labelledby"],"aria-describedby":P["aria-describedby"],"aria-details":P["aria-details"]}),{keyboardProps:de}=useKeyboard({onKeyDown:Lo=>{P.allowsCustomValue&&Lo.key==="Enter"&&w?.(Q.value?.toString()??"");}}),{focusProps:ee}=useFocus({onBlur:()=>{P.allowsCustomValue&&Q.value&&w?.(Q.value?.toString()??"");}}),{tooltipProps:ze}=xe({tooltip:I,label:P["aria-label"]}),Ze=Lo=>{let{triggerProps:_g,triggerRef:zg}=Lo??{};return jsxs("div",{className:classNames(Pb({labelPosition:m}),e,"BaselineUI-ComboBox"),"data-block-id":a,"data-block-class":n,style:t,ref:k,children:[i||m==="start"&&_e?jsxs("div",{className:$b({labelPosition:m,hasMessage:!!_e}),children:[jsx("label",{...mergeProps(U,Z),className:Rb({isDisabled:P.isDisabled}),children:i}),m==="start"&&_e]}):null,jsxs("div",{...Re,className:Ib({validationState:d,isHovered:ae,isFocused:ge,variant:b,isReadOnly:!!P.isReadOnly,isDisabled:!!P.isDisabled}),ref:j,children:[jsx("input",{...mergeProps(_g,Q,O,Eo,Ot,G,ee,de,x==="number"?{type:"number",min:_,max:h,onKeyDown:Xn=>{(Xn.key==="ArrowUp"||Xn.key==="ArrowDown")&&Xn.preventDefault();}}:null),id:P.id,ref:M(zg,E),className:classNames(kb({isDisabled:P.isDisabled,labelPosition:m}),"BaselineUI-ComboBox-Input",r),style:o}),jt&&g?jsx(jt,{className:wb({validationState:d,isReadOnly:P.isReadOnly}),size:16}):null,jsx(K,{...H,ref:N,variant:"popover",label:y,className:Tb({isFocusVisible:!P.isDisabled&&!P.isReadOnly&&Ft,isHovered:!P.isDisabled&&!P.isReadOnly&&ae,isOpen:R.isOpen})})]}),m==="top"&&_e]})};return jsxs(ht.Provider,{value:R,children:[ze?jsx(J,{...ze,children:Ze}):Ze(),jsx(ie,{ref:B,triggerRef:j,state:R,crossOffset:-2,className:"BaselineUI-ComboBox-Popover",children:jsx(fe,{...V,items:s,ref:F,renderOption:f,selectionMode:"single",showSelectedIcon:l,className:classNames(rt,"BaselineUI-ComboBox-ListBox")})})]})});Mb.displayName="ComboBox";var Nb=z({defaultClassName:"byycd01 _1yep5z6d6 _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6id _1yep5z6ie _1yep5z6if",variantClassNames:{},defaultVariants:{},compoundVariants:[]});var vl=_t.forwardRef(({enableReorder:e,...t},o)=>e?jsx(Eb,{ref:o,...t}):jsx(_l,{ref:o,...t}));vl.displayName="GridListItem";var _l=_t.forwardRef(({item:e,state:t,dropState:o,renderGridItem:r,dragHandleProps:a},n)=>{let i=oe(n),s=useGridListItem({node:e},t,i),l=t.selectionManager.selectionMode!=="none"&&t.selectionManager.selectionBehavior==="toggle",{checkboxProps:p}=useGridListSelectionCheckbox({key:e.key},t),c={...s,checkBoxProps:l?p:void 0,dragHandleProps:a};return jsxs("div",{"data-grid-list-item-key":e.key,children:[o?jsx(Ht,{target:{type:"item",key:e.key,dropPosition:"before"},dropState:o}):null,r?r(e,c,i):null,o&&t.collection.getKeyAfter(e.key)==null?jsx(Ht,{target:{type:"item",key:e.key,dropPosition:"after"},dropState:o}):null]},e.key)});_l.displayName="BaseGridListItem";var Eb=_t.forwardRef(({dragState:e,item:t,...o},r)=>{let a=useDraggableItem({key:t.key,hasDragButton:true},e);return jsx(_l,{item:t,dragHandleProps:a,ref:r,...o})});Eb.displayName="DraggableGridListItem";var K$=e=>{e.key==="Enter"||e.key==="Escape"||e.stopPropagation();},Bb=_t.forwardRef(({className:e,style:t,isEditing:o=false,"data-block-id":r,"data-block-class":a,gridListHandle:n,onReorder:i,enableReorder:s=false,layout:l="stack",orientation:p="vertical",renderGridItem:c,...u},m)=>{let d=ce(),b=useListState({...u,children:d}),y=_t.useRef(null),f=oe(m),{gridProps:g}=useGridList(u,b,f);qr({handle:n,type:"gridlist"},b,f);let{collectionProps:v,dragState:_,dropState:h}=jr({...u,onReorder:i,enableReorder:s,layout:l,orientation:p,preview:y,getItems:C=>[...C].map(I=>{let P=b.collection.getItem(I);return invariant(P,"Expected item to be defined."),{key:P.key.toString()}})},b,f),x=o?K$:g.onKeyDownCapture,w={state:b,dragState:_,dropState:h,enableReorder:s,renderGridItem:c};return jsxs("ul",{...mergeProps(g,v),className:classNames("BaselineUI-GridList",e),"data-block-id":r,"data-block-class":a,style:t,ref:f,"aria-rowcount":b.collection.size,onKeyDownCapture:x,children:[[...b.collection].map(C=>jsx(vl,{item:C,...w},C.key)),s?jsx(DragPreview,{ref:y,children:C=>jsx(bn,{items:C,ulRef:f,containerClassName:".BaselineUI-GridList",previewClassName:Nb(),itemDataAttribute:"data-grid-list-item-key"})}):null]})});Bb.displayName="GridList";var Ab="_1yep5z6f5",Fb="_1dc3b8m0";var jb=_t.forwardRef(({className:e,selectionMode:t,style:o,"data-block-id":r,"data-block-class":a,tooltipProps:n,icon:i,renderActionItem:s,...l},p)=>{let c=oe(p),u=ce(),m=useListState({...l,selectionMode:t,suppressTextValueWarning:true,children:u}),{actionGroupProps:d}=useActionGroup({...l,selectionMode:t,children:u},m,c),b=[...m.collection].map(y=>(invariant(y.value),jsx(tT,{item:y,state:m,isDisabled:l.isDisabled,onAction:l.onAction,tooltipProps:n,renderActionItem:s},y.key)));return i?jsxs(D,{...d,display:"flex",flexDirection:"row",gap:"md",alignItems:"center",className:classNames("BaselineUI-ActionGroup",e),"data-block-id":r,"data-block-class":a,style:o,ref:c,children:[jsx(i,{"aria-hidden":"true",size:24,className:Ab}),jsx(D,{display:"flex",flexDirection:"row",gap:"xs",flex:1,children:b})]}):jsx(D,{...d,display:"flex",flexDirection:"row",gap:"xs",className:classNames("BaselineUI-ActionGroup",e),"data-block-id":r,"data-block-class":a,style:o,ref:c,children:b})});jb.displayName="ActionGroup";var tT=({item:e,state:t,tooltipProps:o,renderActionItem:r,onAction:a,isDisabled:n})=>{let{buttonProps:i}=useActionGroupItem({key:e.key},t),s=n||t.selectionManager.isDisabled(e.key),l=t.selectionManager.isSelected(e.key);invariant(e.value);let{icon:p}=e.value;invariant(p);let c=useMemo(()=>(invariant(e.value),typeof o=="function"?o(e.value):o),[o,e.value]);return jsx(PressResponder,{...mergeProps(i,{onPress:()=>{a?.(e.key);}}),children:jsx(J,{text:e.textValue,size:"sm",variant:"inverse",includeArrow:false,offset:4,...c,children:r?.(e,{isSelected:l,isDisabled:s})||jsx(L,{variant:"tertiary",icon:p,"aria-label":e.textValue,size:"sm",isDisabled:s,className:classNames({[Fb]:l},"BaselineUI-ActionGroup-Item")})})})};var Ob="ujkypy0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e",Hb="_1yep5z61r7 _1yep5z61r8 _1yep5z61r9 _1yep5z61hl _1yep5z61hm _1yep5z61hn";var Ub=_t.forwardRef(({className:e,style:t,items:o,optionsContainerClassName:r,label:a,icon:n,value:i,defaultValue:s,onChange:l,isDisabled:p,optionClassName:c,optionStyle:u,labelPosition:m="top","data-block-id":d,"data-block-class":b,shouldFocusWrap:y,tooltip:f=true,...g},v)=>{let _=useMemo(()=>o.map(x=>({id:x.color,label:x.label})),[o]),h=useId();return useEffect(()=>{!a&&!g["aria-label"]&&!g["aria-labelledby"]&&console.warn("ColorSwatchPicker: Please provide a label or aria-label for accessibility.");},[a,g]),jsxs(D,{...ai(g),className:classNames("BaselineUI-ColorSwatchPicker",e),"data-block-id":d,"data-block-class":b,display:"flex",flexDirection:m==="top"?"column":"row",alignItems:m==="top"?"flex-start":"center",justifyContent:"space-between",gap:"md",style:t,ref:v,children:[n||a?jsxs(D,{display:"flex",alignItems:"center",gap:"md",children:[n?jsx(n,{"aria-hidden":"true",size:24,className:sprinkles({color:"icon.primary"})}):null,a?jsx(te,{id:h,type:"label",size:"sm",children:a}):null]}):null,jsx(fe,{className:classNames(Hb,r),selectionMode:"single",items:_,orientation:"horizontal",defaultSelectedKeys:s?[s]:void 0,disabledKeys:p?_.map(x=>x.id):void 0,isDisabled:p,selectedKeys:i?[i]:void 0,onSelectionChange:x=>{l?.([...x][0]);},optionClassName:c,optionStyle:u,renderOption:({key:x,textValue:w},{isSelected:C,isFocusVisible:I,isDisabled:P,optionProps:S},k)=>jsx("li",{...S,"data-disabled":P,className:classNames(Ob,S.className),ref:k,children:jsx(pt,{isFocusVisible:I,color:x,isSelected:C,"aria-label":w,isInteractive:true,isDisabled:P,tooltip:f})}),shouldFocusWrap:y,...g,"aria-labelledby":a?h:g["aria-labelledby"]})]})});Ub.displayName="ColorSwatchPicker";var qb=z({defaultClassName:"_1lrwegk0",variantClassNames:{isSeparator:{true:"_1yep5z610y"}},defaultVariants:{},compoundVariants:[]}),hn="_1yep5z63o _1yep5z63p _1yep5z63q _1yep5z629 _1yep5z62a _1yep5z62b _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6kj _1yep5z6kk _1yep5z6kl";var Cl="\u2013";function xn({segment:e,state:t}){let o=_t.useRef(null),{segmentProps:r}=useDateSegment(e,t,o),{focusProps:a,isFocused:n}=useFocusRing(),i=useMemo(()=>{let{text:s,type:l}=e;switch(l){case "hour":return s.replaceAll(Cl,"H");case "minute":return s.replaceAll(Cl,"M");case "second":return s.replaceAll(Cl,"S");default:return s}},[e]);return jsx(D,{...mergeProps(r,a),typography:"label.md.medium",color:e.isPlaceholder?"text.placeholder":"text.primary",backgroundColor:n?"support.info.subtle":void 0,ref:o,marginLeft:e.type==="timeZoneName"?"xs":void 0,className:qb({isSeparator:e.text===":"||e.text==="/"}),children:e.isPlaceholder?i:e.text})}var Gb=_t.forwardRef(({className:e,labelPosition:t,"data-block-id":o,"data-block-class":r,...a},n)=>{let{locale:i}=useLocale(),s={...a,validationState:void 0,isInvalid:a.validationState==="error"||void 0},l=useTimeFieldState({...s,locale:i}),p=_t.useRef(null),{labelProps:c,fieldProps:u,descriptionProps:m,errorMessageProps:d,validationErrors:b,isInvalid:y,inputProps:f}=useTimeField(s,l,p),g=a.errorMessage||b.join(" "),v=Ce({...a,errorMessage:g,descriptionProps:m,errorMessageProps:d,labelPosition:t}),{focusProps:_,isFocused:h}=useFocusRing({within:true});return jsxs(Pt,{className:classNames("BaselineUI-TimeField",e),labelProps:c,fieldProps:u,ref:n,wrapperRef:p,wrapperClassName:hn,labelPosition:t,message:v,isFocused:h,"data-block-id":o,"data-block-class":r,isInvalid:y,...a,children:[jsx(VisuallyHidden,{children:jsx("input",{...f})}),jsx(D,{display:"flex",flexDirection:"row",paddingRight:"md",..._,children:l.segments.map((x,w)=>jsx(xn,{segment:x,state:l},w))})]})});Gb.displayName="TimeField";var Wb="_10dw1p96",Yb="_10dw1p95",Xb=z({defaultClassName:"_10dw1p90 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z69f _1yep5z69g _1yep5z69h _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6lq _1yep5z6ld _1yep5z6la",variantClassNames:{isSelected:{true:"_1yep5z6126"},isHovered:{true:"_10dw1p92"},isRenaming:{true:"_10dw1p93"},isFocusVisible:{true:"_1yep5z6140 _1yep5z617w _1yep5z617u"}},defaultVariants:{},compoundVariants:[[{isHovered:true,isSelected:false,isRenaming:false},"_1yep5z61o8 _1yep5z61q9 _1yep5z61ty _1yep5z61tx"]]});function Qb(e,t){if(typeof e=="function"&&!e.prototype?.isReactComponent){let o=e(t);return isValidElement(o)?e:o}return e}var e5=({context:e,depth:t,children:o,item:r,onPrimaryAction:a,onSecondaryAction:n,actionsPosition:i,primaryActionIcon:s,secondaryActionIcon:l,primaryActionAriaLabel:p,secondaryActionAriaLabel:c,onRename:u,onAction:m,renderItemTitle:d=b=>b.data.label})=>{let{formatMessage:b}=A(),{hoverProps:y,isHovered:f}=useHover({}),g=useRef(null),{onKeyDown:v,..._}=e.interactiveElementProps;delete _.onFocus,delete _.onClick;let h=createFocusManager(g),x=useCallback($=>{if($.key==="ArrowRight"&&(e.isExpanded||!r.children?.length))g.current?.setAttribute("tabindex","-1"),$.preventDefault(),$.stopPropagation(),h.focusNext();else switch($.key){case "ArrowLeft":{h.focusPrevious()?($.preventDefault(),$.stopPropagation()):(v?.($),e.focusItem(true));break}case "Enter":{e.toggleExpandedState();break}default:v?.($);}},[e,h,v,r,g]),w=useMemo(()=>{let $=Qb(s,r.index),R=Qb(l,r.index),N=typeof p=="function"?p(r.index):p,E=typeof c=="function"?c(r.index):c;return $||R?jsxs(D,{display:"flex",flexDirection:"row",children:[$?jsx(Ie,{icon:$,"aria-label":N,size:"sm",excludeFromTabOrder:true,variant:"secondary",onPress:()=>{a?.(r.index);},tooltip:true}):null,R?jsx(Ie,{icon:R,"aria-label":E,size:"sm",excludeFromTabOrder:true,variant:"secondary",onPress:()=>{n?.(r.index);},tooltip:true}):null]}):null},[s,r.index,l,p,c,a,n]),C=useCallback($=>{$.key==="Enter"?(u?.({key:r.index,value:$.target.value}),e.stopRenamingItem()):$.key==="Escape"?(e.stopRenamingItem(),g.current?.setAttribute("tabindex","0"),g.current?.focus()):$.key!=="ArrowRight"&&$.key!=="ArrowLeft"&&$.key!=="ArrowUp"&&$.key!=="ArrowDown"&&!$.metaKey&&$.continuePropagation();},[r.index,e,u,g]),I=r.data.icon,P=!!u,{pressProps:S}=usePress({onPress:()=>{m?.(r.index);}}),{isFocusVisible:k,focusProps:T}=useFocusRing$1();return jsxs(Fragment,{children:[jsx("div",{...mergeProps({onKeyDown:x,onFocus:()=>{e.focusItem(false);}},S,T,y,e.itemContainerWithoutChildrenProps,_),className:classNames(Yb,Xb({isHovered:f,isSelected:e.isSelected,isFocusVisible:k,isRenaming:e.isRenaming}),"BaselineUI-TreeView-Row"),role:"row","data-key":r.index,"data-expanded":r.isFolder?e.isExpanded:void 0,"aria-expanded":r.isFolder?e.isExpanded:void 0,"data-selected":e.isSelected,"aria-selected":e.isSelected,"data-depth":t,"aria-level":t+1,"aria-posinset":r.data.posInset,"aria-setsize":r.data.setSize,"aria-label":r.data.label,style:{justifyContent:i==="end"?"space-between":void 0},ref:g,children:jsxs(D,{role:"gridcell",style:{display:"contents"},"aria-colindex":1,children:[i==="start"?w:null,jsxs(D,{display:"flex",flexDirection:"row",alignItems:"center",children:[jsxs(D,{display:"flex",padding:"sm",flexDirection:"row",alignItems:"center",gap:"md",style:{marginInlineStart:`calc(${t*2} * ${themeVars.spacing.lg})`},children:[jsx(L,{icon:ChevronRightIcon,size:"xxs",variant:"secondary",onPress:()=>{e.toggleExpandedState();},"aria-label":b(e.isExpanded?kl.collapse:kl.expand),style:{visibility:r.children?.length?"visible":"hidden"},className:classNames(Wb,"BaselineUI-TreeView-ExpansionToggle"),UNSAFE_NON_INTERACTIVE:true}),I?jsx(I,{size:16,style:{color:themeVars.color.icon.interactive.disabled}}):null]}),jsxs(D,{paddingLeft:"sm",paddingY:e.isRenaming?"none":"md",display:"flex",flexDirection:"column",gap:"xs",onDoubleClick:$=>{P&&($.stopPropagation(),$.preventDefault(),e.startRenamingItem());},children:[e.isRenaming?jsx("div",{onClick:$=>{$.stopPropagation();},children:jsx(at,{defaultValue:r.data.label,autoFocus:true,onBlur:$=>{u?.({key:r.index,value:$.target.value}),e.stopRenamingItem();},"aria-label":b(kl.rename),onKeyDown:C,className:"BaselineUI-TreeView-RenameInput"})}):jsx(te,{type:"label",size:"sm",className:classNames(sprinkles.compoundVariants({color:"text.primary"}),"BaselineUI-TreeView-Title"),children:d(r)}),r.data.description?jsx(te,{type:"helper",size:"sm",className:"BaselineUI-TreeView-Description",children:r.data.description}):null]})]}),i==="end"?w:null]})}),o]})},kl=W({expand:{id:"expand",defaultMessage:"Expand"},collapse:{id:"collapse",defaultMessage:"Collapse"},rename:{id:"rename",defaultMessage:"Rename"}});function FT(e,{posInset:t,setSize:o}){return {index:e.id,children:e.children?e.children.map(r=>r.id):[],data:{label:e.label,description:e.description,icon:e.icon,...e.data,posInset:t,setSize:o},isFolder:!!e.children?.length}}function jT(e,t){let o={};function r(a,n,i){if(o[a.id]=t(a,{posInset:n,setSize:i}),a.children)for(let s=0;s<a.children.length;s++)r(a.children[s],s+1,a.children.length);}return r(e,0,0),o}var a5=_t.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,items:a,rootId:n=a.id,onPrimaryAction:i,onSecondaryAction:s,primaryActionIcon:l,secondaryActionIcon:p,primaryActionAriaLabel:c,secondaryActionAriaLabel:u,actionsPosition:m="start",onRename:d,onAction:b,renderItemTitle:y,...f},g)=>{let v=ce(),_=useRef(null),h=useTreeState({...f,selectionMode:"multiple",items:a.children,children:v}),x=useMemo(()=>Object.fromEntries(Object.entries(jT(a,FT)).map(([k,T])=>[k,{...T,canRename:!!d}])),[a,d]),w=useId(),[C,I]=_t.useState(a.children?.[0]?.id??""),P=useRef(C),S=useMemo(()=>({[`tree-${w}`]:{focusedItem:C,expandedItems:[...h.expandedKeys],selectedItems:[...h.selectionManager.selectedKeys]}}),[C,h.expandedKeys,h.selectionManager.selectedKeys,w]);return useEffect(()=>{if(!_.current)return;let k=_.current.getRootNode(),T=k instanceof ShadowRoot,$=_.current?.contains(k?.activeElement??null);T&&$&&k?.querySelector(`[data-rct-item-id="${C}"]`)?.focus();},[C]),jsx(ControlledTreeEnvironment,{items:x,getItemTitle:k=>k.data?.label,viewState:S,onExpandItem:k=>{h.setExpandedKeys(new Set([...h.expandedKeys,k.index])),f.onExpand?.(k.index.toString());},onFocusItem:k=>{I(k.index),k.index&&(P.current=k.index);},onCollapseItem:k=>{h.setExpandedKeys(new Set([...h.expandedKeys].filter(T=>T!==k.index))),f.onCollapse?.(k.index.toString());},onSelectItems:k=>{h.selectionManager.setSelectedKeys(new Set(k));},renderItem:k=>jsx(e5,{...k,onPrimaryAction:i,onSecondaryAction:s,actionsPosition:m,primaryActionIcon:l,secondaryActionIcon:p,primaryActionAriaLabel:c,secondaryActionAriaLabel:u,onRename:d,onAction:b,renderItemTitle:y}),renderLiveDescriptorContainer:({children:k})=>jsx(Pe,{children:jsx(VisuallyHidden,{children:k})}),renderTreeContainer:({containerProps:k,children:T})=>jsx("div",{...$e(k,{onBlur:$=>{$.currentTarget.contains($.relatedTarget)||$.currentTarget.querySelector(`[data-key="${P.current}"]`)?.setAttribute("tabindex","0");}}),"data-block-id":o,"data-block-class":r,style:{...t,...k.style},className:classNames(e,"BaselineUI-TreeView"),ref:M(g,k.ref,_),role:"treegrid",children:T}),renderItemsContainer:({children:k})=>k,children:jsx(Tree,{treeId:`tree-${w}`,rootItem:n,treeLabel:f["aria-label"],treeLabelledBy:f["aria-labelledby"]})})});a5.displayName="TreeView";var GT=forwardRef(({className:e,isCollapsible:t=false,...o},r)=>{let a=useRef(null),n=useId();return useImperativeHandle(r,()=>({resize:a.current?.resize})),jsx(Panel,{className:classNames("BaselineUI-Panel",e),collapsible:t,ref:a,id:n,...o})});GT.displayName="Panel";var e4=forwardRef(({className:e,...t},o)=>{let r=useRef(null);return useImperativeHandle(o,()=>({setLayout:r.current?.setLayout})),jsx(PanelGroup,{className:classNames("BaselineUI-PanelGroup",e),ref:r,...t})});e4.displayName="PanelGroup";var n5="_6abhjk0";var a4=({className:e,isDisabled:t=false,...o})=>jsx(PanelResizeHandle,{disabled:t,className:classNames(n5,"BaselineUI-PanelResizeHandle",e),...o});a4.displayName="PanelResizeHandle";var i5=z({defaultClassName:"_1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7 _1yep5z6lz _1yep5z6m1",variantClassNames:{variant:{info:"_1yep5z6131",warning:"_1yep5z612x",error:"_1yep5z612p",success:"_1yep5z612t"}},defaultVariants:{},compoundVariants:[]}),s5="_1udvgpn5 _1yep5z6ij _1yep5z6ik _1yep5z6il _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j4 _1yep5z6j5 _1yep5z6j6 _1yep5z69l _1yep5z69m _1yep5z69n";var c4=()=>{};function d4({state:e,...t}){let o=_t.useRef(null),{toastProps:r,contentProps:a,titleProps:n,descriptionProps:i,closeButtonProps:s}=useToast(t,e,o),l=useMemo(()=>({root:r,title:n,content:a,description:i,close:s}),[r,n,a,i,s]),{canClose:p=true,...c}=t.toast.content;return jsx(Na,{elementProps:l,...c,className:classNames(i5({variant:c.variant||"info"}),c.className),onClose:p?c4:void 0})}var p5=_t.forwardRef(({state:e,style:t,className:o,...r},a)=>{let n=oe(a),{regionProps:i}=useToastRegion(r,e,n),s={zIndex:1,...t,...i.style};return jsx("div",{...i,ref:n,className:classNames(s5,o),style:s,children:e.visibleToasts.map(l=>jsx(d4,{toast:l,state:e},l.key))})});p5.displayName="ToastRegion";var c5=_t.forwardRef(({toastQueue:e,portalContainer:t,...o},r)=>{let a=useToastQueue(e),n=ye(t);return a.visibleToasts.length>0?jsx(Pe,{portalContainer:n,ref:r,children:jsx(p5,{state:a,...o})}):null});c5.displayName="GlobalToastRegion";function We(e,t){return e-t*Math.floor(e/t)}var d5=1721426;function mt(e,t,o,r){t=ft(e,t);let a=t-1,n=-2;return o<=2?n=0:Ye(t)&&(n=-1),d5-1+365*a+Math.floor(a/4)-Math.floor(a/100)+Math.floor(a/400)+Math.floor((367*o-362)/12+n+r)}function Ye(e){return e%4===0&&(e%100!==0||e%400===0)}function ft(e,t){return e==="BC"?1-t:t}function Bt(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}var u4={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]},le=class{fromJulianDay(t){let o=t,r=o-d5,a=Math.floor(r/146097),n=We(r,146097),i=Math.floor(n/36524),s=We(n,36524),l=Math.floor(s/1461),p=We(s,1461),c=Math.floor(p/365),u=a*400+i*100+l*4+c+(i!==4&&c!==4?1:0),[m,d]=Bt(u),b=o-mt(m,d,1,1),y=2;o<mt(m,d,3,1)?y=0:Ye(d)&&(y=1);let f=Math.floor(((b+y)*12+373)/367),g=o-mt(m,d,f,1)+1;return new X(m,d,f,g)}toJulianDay(t){return mt(t.era,t.year,t.month,t.day)}getDaysInMonth(t){return u4[Ye(t.year)?"leapyear":"standard"][t.month-1]}getMonthsInYear(t){return 12}getDaysInYear(t){return Ye(t.year)?366:365}getYearsInEra(t){return 9999}getEras(){return ["BC","AD"]}isInverseEra(t){return t.era==="BC"}balanceDate(t){t.year<=0&&(t.era=t.era==="BC"?"AD":"BC",t.year=1-t.year);}constructor(){this.identifier="gregory";}};function Rl(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function m5(e,t){return u5(e)-u5(t)}function u5(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}var Il=null;function $l(){return Il==null&&(Il=new Intl.DateTimeFormat().resolvedOptions().timeZone),Il}function Tl(e){e=kn(e,new le);let t=ft(e.era,e.year);return g5(t,e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function g5(e,t,o,r,a,n,i){let s=new Date;return s.setUTCHours(r,a,n,i),s.setUTCFullYear(e,t-1,o),s.getTime()}function f5(e,t){if(t==="UTC")return 0;if(e>0&&t===$l())return new Date(e).getTimezoneOffset()*-6e4;let{year:o,month:r,day:a,hour:n,minute:i,second:s}=v5(e,t);return g5(o,r,a,n,i,s,0)-Math.floor(e/1e3)*1e3}var y5=new Map;function v5(e,t){let o=y5.get(t);o||(o=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:false,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),y5.set(t,o));let r=o.formatToParts(new Date(e)),a={};for(let n of r)n.type!=="literal"&&(a[n.type]=n.value);return {year:a.era==="BC"||a.era==="B"?-a.year+1:+a.year,month:+a.month,day:+a.day,hour:a.hour==="24"?0:+a.hour,minute:+a.minute,second:+a.second}}var b5=864e5;function m4(e,t,o,r){return (o===r?[o]:[o,r]).filter(n=>f4(e,t,n))}function f4(e,t,o){let r=v5(o,t);return e.year===r.year&&e.month===r.month&&e.day===r.day&&e.hour===r.hour&&e.minute===r.minute&&e.second===r.second}function _5(e,t,o="compatible"){let r=Pn(e);if(t==="UTC")return Tl(r);if(t===$l()&&o==="compatible"){r=kn(r,new le);let l=new Date,p=ft(r.era,r.year);return l.setFullYear(p,r.month-1,r.day),l.setHours(r.hour,r.minute,r.second,r.millisecond),l.getTime()}let a=Tl(r),n=f5(a-b5,t),i=f5(a+b5,t),s=m4(r,t,a-n,a-i);if(s.length===1)return s[0];if(s.length>1)switch(o){case "compatible":case "earlier":return s[0];case "later":return s[s.length-1];case "reject":throw new RangeError("Multiple possible absolute times found")}switch(o){case "earlier":return Math.min(a-n,a-i);case "compatible":case "later":return Math.max(a-n,a-i);case "reject":throw new RangeError("No such absolute time found")}}function Sl(e,t,o="compatible"){return new Date(_5(e,t,o))}function Pn(e,t){let o=0,r=0,a=0,n=0;if("timeZone"in e)({hour:o,minute:r,second:a,millisecond:n}=e);else if("hour"in e&&true)return e;return new wn(e.calendar,e.era,e.year,e.month,e.day,o,r,a,n)}function kn(e,t){if(e.calendar.identifier===t.identifier)return e;let o=t.fromJulianDay(e.calendar.toJulianDay(e)),r=e.copy();return r.calendar=t,r.era=o.era,r.year=o.year,r.month=o.month,r.day=o.day,yt(r),r}function Rn(e,t){let o=e.copy(),r="hour"in o?v4(o,t):0;Dl(o,t.years||0),o.calendar.balanceYearMonth&&o.calendar.balanceYearMonth(o,e),o.month+=t.months||0,Ml(o),z5(o),o.day+=(t.weeks||0)*7,o.day+=t.days||0,o.day+=r,y4(o),o.calendar.balanceDate&&o.calendar.balanceDate(o),o.year<1&&(o.year=1,o.month=1,o.day=1);let a=o.calendar.getYearsInEra(o);if(o.year>a){var n,i;let l=(n=(i=o.calendar).isInverseEra)===null||n===void 0?void 0:n.call(i,o);o.year=a,o.month=l?1:o.calendar.getMonthsInYear(o),o.day=l?1:o.calendar.getDaysInMonth(o);}o.month<1&&(o.month=1,o.day=1);let s=o.calendar.getMonthsInYear(o);return o.month>s&&(o.month=s,o.day=o.calendar.getDaysInMonth(o)),o.day=Math.max(1,Math.min(o.calendar.getDaysInMonth(o),o.day)),o}function Dl(e,t){var o,r;!((o=(r=e.calendar).isInverseEra)===null||o===void 0)&&o.call(r,e)&&(t=-t),e.year+=t;}function Ml(e){for(;e.month<1;)Dl(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,Dl(e,1);}function y4(e){for(;e.day<1;)e.month--,Ml(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,Ml(e);}function z5(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day));}function yt(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),z5(e);}function b4(e){let t={};for(let o in e)typeof e[o]=="number"&&(t[o]=-e[o]);return t}function Nl(e,t){return Rn(e,b4(t))}function El(e,t){let o=e.copy();return t.era!=null&&(o.era=t.era),t.year!=null&&(o.year=t.year),t.month!=null&&(o.month=t.month),t.day!=null&&(o.day=t.day),yt(o),o}function h5(e,t){let o=e.copy();return t.hour!=null&&(o.hour=t.hour),t.minute!=null&&(o.minute=t.minute),t.second!=null&&(o.second=t.second),t.millisecond!=null&&(o.millisecond=t.millisecond),x5(o),o}function g4(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=In(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=In(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=In(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=In(e.hour,24),t}function x5(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23));}function In(e,t){let o=e%t;return o<0&&(o+=t),o}function v4(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,g4(e)}function Ll(e,t,o,r){let a=e.copy();switch(t){case "era":{let s=e.calendar.getEras(),l=s.indexOf(e.era);if(l<0)throw new Error("Invalid era: "+e.era);l=bt(l,o,0,s.length-1,r?.round),a.era=s[l],yt(a);break}case "year":var n,i;!((n=(i=a.calendar).isInverseEra)===null||n===void 0)&&n.call(i,a)&&(o=-o),a.year=bt(e.year,o,-1/0,9999,r?.round),a.year===-1/0&&(a.year=1),a.calendar.balanceYearMonth&&a.calendar.balanceYearMonth(a,e);break;case "month":a.month=bt(e.month,o,1,e.calendar.getMonthsInYear(e),r?.round);break;case "day":a.day=bt(e.day,o,1,e.calendar.getDaysInMonth(e),r?.round);break;default:throw new Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(a),yt(a),a}function C5(e,t,o,r){let a=e.copy();switch(t){case "hour":{let n=e.hour,i=0,s=23;if(r?.hourCycle===12){let l=n>=12;i=l?12:0,s=l?23:11;}a.hour=bt(n,o,i,s,r?.round);break}case "minute":a.minute=bt(e.minute,o,0,59,r?.round);break;case "second":a.second=bt(e.second,o,0,59,r?.round);break;case "millisecond":a.millisecond=bt(e.millisecond,o,0,999,r?.round);break;default:throw new Error("Unsupported field "+t)}return a}function bt(e,t,o,r,a=false){if(a){e+=Math.sign(t),e<o&&(e=r);let n=Math.abs(t);t>0?e=Math.ceil(e/n)*n:e=Math.floor(e/n)*n,e>r&&(e=o);}else e+=t,e<o?e=r-(o-e-1):e>r&&(e=o+(e-r-1));return e}function P5(e){return `${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function Bl(e){let t=kn(e,new le),o;return t.era==="BC"?o=t.year===1?"0000":"-"+String(Math.abs(1-t.year)).padStart(6,"00"):o=String(t.year).padStart(4,"0"),`${o}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function k5(e){return `${Bl(e)}T${P5(e)}`}function w5(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Al(e,t,o){w5(e,t),t.set(e,o);}function I5(e){let t=typeof e[0]=="object"?e.shift():new le,o;if(typeof e[0]=="string")o=e.shift();else {let i=t.getEras();o=i[i.length-1];}let r=e.shift(),a=e.shift(),n=e.shift();return [t,o,r,a,n]}var z4=new WeakMap,X=class e{copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day):new e(this.calendar,this.year,this.month,this.day)}add(t){return Rn(this,t)}subtract(t){return Nl(this,t)}set(t){return El(this,t)}cycle(t,o,r){return Ll(this,t,o,r)}toDate(t){return Sl(this,t)}toString(){return Bl(this)}compare(t){return Rl(this,t)}constructor(...t){Al(this,z4,{writable:true,value:void 0});let[o,r,a,n,i]=I5(t);this.calendar=o,this.era=r,this.year=a,this.month=n,this.day=i,yt(this);}};var h4=new WeakMap,wn=class e{copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new e(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return Rn(this,t)}subtract(t){return Nl(this,t)}set(t){return El(h5(this,t),t)}cycle(t,o,r){switch(t){case "era":case "year":case "month":case "day":return Ll(this,t,o,r);default:return C5(this,t,o,r)}}toDate(t,o){return Sl(this,t,o)}toString(){return k5(this)}compare(t){let o=Rl(this,t);return o===0?m5(this,Pn(t)):o}constructor(...t){Al(this,h4,{writable:true,value:void 0});let[o,r,a,n,i]=I5(t);this.calendar=o,this.era=r,this.year=a,this.month=n,this.day=i,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,yt(this);}};var $o=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],x4=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],$n=[1867,1911,1925,1988,2018],gt=["meiji","taisho","showa","heisei","reiwa"];function R5(e){let t=$o.findIndex(([o,r,a])=>e.year<o||e.year===o&&e.month<r||e.year===o&&e.month===r&&e.day<a);return t===-1?$o.length-1:t===0?0:t-1}function Fl(e){let t=$n[gt.indexOf(e.era)];if(!t)throw new Error("Unknown era: "+e.era);return new X(e.year+t,e.month,e.day)}var Tn=class extends le{fromJulianDay(t){let o=super.fromJulianDay(t),r=R5(o);return new X(this,gt[r],o.year-$n[r],o.month,o.day)}toJulianDay(t){return super.toJulianDay(Fl(t))}balanceDate(t){let o=Fl(t),r=R5(o);gt[r]!==t.era&&(t.era=gt[r],t.year=o.year-$n[r]),this.constrainDate(t);}constrainDate(t){let o=gt.indexOf(t.era),r=x4[o];if(r!=null){let[a,n,i]=r,s=a-$n[o];t.year=Math.max(1,Math.min(s,t.year)),t.year===s&&(t.month=Math.min(n,t.month),t.month===n&&(t.day=Math.min(i,t.day)));}if(t.year===1&&o>=0){let[,a,n]=$o[o];t.month=Math.max(a,t.month),t.month===a&&(t.day=Math.max(n,t.day));}}getEras(){return gt}getYearsInEra(t){let o=gt.indexOf(t.era),r=$o[o],a=$o[o+1];if(a==null)return 9999-r[0]+1;let n=a[0]-r[0];return (t.month<a[1]||t.month===a[1]&&t.day<a[2])&&n++,n}getDaysInMonth(t){return super.getDaysInMonth(Fl(t))}getMinimumMonthInYear(t){let o=$5(t);return o?o[1]:1}getMinimumDayInMonth(t){let o=$5(t);return o&&t.month===o[1]?o[2]:1}constructor(...t){super(...t),this.identifier="japanese";}};function $5(e){if(e.year===1){let t=gt.indexOf(e.era);return $o[t]}}var S5=-543,Sn=class extends le{fromJulianDay(t){let o=super.fromJulianDay(t),r=ft(o.era,o.year);return new X(this,r-S5,o.month,o.day)}toJulianDay(t){return super.toJulianDay(T5(t))}getEras(){return ["BE"]}getDaysInMonth(t){return super.getDaysInMonth(T5(t))}balanceDate(){}constructor(...t){super(...t),this.identifier="buddhist";}};function T5(e){let[t,o]=Bt(e.year+S5);return new X(t,o,e.month,e.day)}var Dn=1911;function N5(e){return e.era==="minguo"?e.year+Dn:1-e.year+Dn}function D5(e){let t=e-Dn;return t>0?["minguo",t]:["before_minguo",1-t]}var Mn=class extends le{fromJulianDay(t){let o=super.fromJulianDay(t),r=ft(o.era,o.year),[a,n]=D5(r);return new X(this,a,n,o.month,o.day)}toJulianDay(t){return super.toJulianDay(M5(t))}getEras(){return ["before_minguo","minguo"]}balanceDate(t){let[o,r]=D5(N5(t));t.era=o,t.year=r;}isInverseEra(t){return t.era==="before_minguo"}getDaysInMonth(t){return super.getDaysInMonth(M5(t))}getYearsInEra(t){return t.era==="before_minguo"?9999:9999-Dn}constructor(...t){super(...t),this.identifier="roc";}};function M5(e){let[t,o]=Bt(N5(e));return new X(t,o,e.month,e.day)}var E5=1948320,L5=[0,31,62,93,124,155,186,216,246,276,306,336],Nn=class{fromJulianDay(t){let o=t-E5,r=1+Math.floor((33*o+3)/12053),a=365*(r-1)+Math.floor((8*r+21)/33),n=o-a,i=n<216?Math.floor(n/31):Math.floor((n-6)/30),s=n-L5[i]+1;return new X(this,r,i+1,s)}toJulianDay(t){let o=E5-1+365*(t.year-1)+Math.floor((8*t.year+21)/33);return o+=L5[t.month-1],o+=t.day,o}getMonthsInYear(){return 12}getDaysInMonth(t){return t.month<=6?31:t.month<=11||We(25*t.year+11,33)<8?30:29}getEras(){return ["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian";}};var jl=78,B5=80,En=class extends le{fromJulianDay(t){let o=super.fromJulianDay(t),r=o.year-jl,a=t-mt(o.era,o.year,1,1),n;a<B5?(r--,n=Ye(o.year-1)?31:30,a+=n+155+90+10):(n=Ye(o.year)?31:30,a-=B5);let i,s;if(a<n)i=1,s=a+1;else {let l=a-n;l<155?(i=Math.floor(l/31)+2,s=l%31+1):(l-=155,i=Math.floor(l/30)+7,s=l%30+1);}return new X(this,r,i,s)}toJulianDay(t){let o=t.year+jl,[r,a]=Bt(o),n,i;return Ye(a)?(n=31,i=mt(r,a,3,21)):(n=30,i=mt(r,a,3,22)),t.month===1?i+t.day-1:(i+=n+Math.min(t.month-2,5)*31,t.month>=8&&(i+=(t.month-7)*30),i+=t.day-1,i)}getDaysInMonth(t){return t.month===1&&Ye(t.year+jl)||t.month>=2&&t.month<=6?31:30}getYearsInEra(){return 9919}getEras(){return ["saka"]}balanceDate(){}constructor(...t){super(...t),this.identifier="indian";}};var Bn=1948440,A5=1948439,De=1300,To=1600,C4=460322;function An(e,t,o,r){return r+Math.ceil(29.5*(o-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function H5(e,t,o){let r=Math.floor((30*(o-t)+10646)/10631),a=Math.min(12,Math.ceil((o-(29+An(t,r,1,1)))/29.5)+1),n=o-An(t,r,a,1)+1;return new X(e,r,a,n)}function F5(e){return (14+11*e)%30<11}var Do=class{fromJulianDay(t){return H5(this,Bn,t)}toJulianDay(t){return An(Bn,t.year,t.month,t.day)}getDaysInMonth(t){let o=29+t.month%2;return t.month===12&&F5(t.year)&&o++,o}getMonthsInYear(){return 12}getDaysInYear(t){return F5(t.year)?355:354}getYearsInEra(){return 9665}getEras(){return ["AH"]}constructor(){this.identifier="islamic-civil";}},Fn=class extends Do{fromJulianDay(t){return H5(this,A5,t)}toJulianDay(t){return An(A5,t.year,t.month,t.day)}constructor(...t){super(...t),this.identifier="islamic-tbla";}},P4="qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI=",Ol,So;function Ln(e){return C4+So[e-De]}function Mr(e,t){let o=e-De,r=1<<11-(t-1);return (Ol[o]&r)===0?29:30}function j5(e,t){let o=Ln(e);for(let r=1;r<t;r++)o+=Mr(e,r);return o}function O5(e){return So[e+1-De]-So[e-De]}var jn=class extends Do{fromJulianDay(t){let o=t-Bn,r=Ln(De),a=Ln(To);if(o<r||o>a)return super.fromJulianDay(t);{let n=De-1,i=1,s=1;for(;s>0;){n++,s=o-Ln(n)+1;let l=O5(n);if(s===l){i=12;break}else if(s<l){let p=Mr(n,i);for(i=1;s>p;)s-=p,i++,p=Mr(n,i);break}}return new X(this,n,i,o-j5(n,i)+1)}}toJulianDay(t){return t.year<De||t.year>To?super.toJulianDay(t):Bn+j5(t.year,t.month)+(t.day-1)}getDaysInMonth(t){return t.year<De||t.year>To?super.getDaysInMonth(t):Mr(t.year,t.month)}getDaysInYear(t){return t.year<De||t.year>To?super.getDaysInYear(t):O5(t.year)}constructor(){if(super(),this.identifier="islamic-umalqura",Ol||(Ol=new Uint16Array(Uint8Array.from(atob(P4),t=>t.charCodeAt(0)).buffer)),!So){So=new Uint32Array(To-De+1);let t=0;for(let o=De;o<=To;o++){So[o-De]=t;for(let r=1;r<=12;r++)t+=Mr(o,r);}}}};var V5=347997,U5=1080,q5=24*U5,k4=29,w4=12*U5+793,I4=k4*q5+w4;function At(e){return We(e*7+1,19)<7}function Hn(e){let t=Math.floor((235*e-234)/19),o=12084+13753*t,r=t*29+Math.floor(o/25920);return We(3*(r+1),7)<3&&(r+=1),r}function R4(e){let t=Hn(e-1),o=Hn(e);return Hn(e+1)-o===356?2:o-t===382?1:0}function Nr(e){return Hn(e)+R4(e)}function K5(e){return Nr(e+1)-Nr(e)}function $4(e){let t=K5(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}function On(e,t){if(t>=6&&!At(e)&&t++,t===4||t===7||t===9||t===11||t===13)return 29;let o=$4(e);return t===2?o===2?30:29:t===3?o===0?29:30:t===6?At(e)?30:0:30}var Vn=class{fromJulianDay(t){let o=t-V5,r=o*q5/I4,a=Math.floor((19*r+234)/235)+1,n=Nr(a),i=Math.floor(o-n);for(;i<1;)a--,n=Nr(a),i=Math.floor(o-n);let s=1,l=0;for(;l<i;)l+=On(a,s),s++;s--,l-=On(a,s);let p=i-l;return new X(this,a,s,p)}toJulianDay(t){let o=Nr(t.year);for(let r=1;r<t.month;r++)o+=On(t.year,r);return o+t.day+V5}getDaysInMonth(t){return On(t.year,t.month)}getMonthsInYear(t){return At(t.year)?13:12}getDaysInYear(t){return K5(t.year)}getYearsInEra(){return 9999}getEras(){return ["AM"]}balanceYearMonth(t,o){o.year!==t.year&&(At(o.year)&&!At(t.year)&&o.month>6?t.month--:!At(o.year)&&At(t.year)&&o.month>6&&t.month++);}constructor(){this.identifier="hebrew";}};var Hl=1723856,G5=1824665,Vl=5500;function Un(e,t,o,r){return e+365*t+Math.floor(t/4)+30*(o-1)+r-1}function Ul(e,t){let o=Math.floor(4*(t-e)/1461),r=1+Math.floor((t-Un(e,o,1,1))/30),a=t+1-Un(e,o,r,1);return [o,r,a]}function W5(e){return Math.floor(e%4/3)}function Y5(e,t){return t%13!==0?30:W5(e)+5}var Mo=class{fromJulianDay(t){let[o,r,a]=Ul(Hl,t),n="AM";return o<=0&&(n="AA",o+=Vl),new X(this,n,o,r,a)}toJulianDay(t){let o=t.year;return t.era==="AA"&&(o-=Vl),Un(Hl,o,t.month,t.day)}getDaysInMonth(t){return Y5(t.year,t.month)}getMonthsInYear(){return 13}getDaysInYear(t){return 365+W5(t.year)}getYearsInEra(t){return t.era==="AA"?9999:9991}getEras(){return ["AA","AM"]}constructor(){this.identifier="ethiopic";}},qn=class extends Mo{fromJulianDay(t){let[o,r,a]=Ul(Hl,t);return o+=Vl,new X(this,"AA",o,r,a)}getEras(){return ["AA"]}getYearsInEra(){return 9999}constructor(...t){super(...t),this.identifier="ethioaa";}},Kn=class extends Mo{fromJulianDay(t){let[o,r,a]=Ul(G5,t),n="CE";return o<=0&&(n="BCE",o=1-o),new X(this,n,o,r,a)}toJulianDay(t){let o=t.year;return t.era==="BCE"&&(o=1-o),Un(G5,o,t.month,t.day)}getDaysInMonth(t){let o=t.year;return t.era==="BCE"&&(o=1-o),Y5(o,t.month)}isInverseEra(t){return t.era==="BCE"}balanceDate(t){t.year<=0&&(t.era=t.era==="BCE"?"CE":"BCE",t.year=1-t.year);}getEras(){return ["BCE","CE"]}getYearsInEra(t){return t.era==="BCE"?9999:9715}constructor(...t){super(...t),this.identifier="coptic";}};function ql(e){switch(e){case "buddhist":return new Sn;case "ethiopic":return new Mo;case "ethioaa":return new qn;case "coptic":return new Kn;case "hebrew":return new Vn;case "indian":return new En;case "islamic-civil":return new Do;case "islamic-tbla":return new Fn;case "islamic-umalqura":return new jn;case "japanese":return new Tn;case "persian":return new Nn;case "roc":return new Mn;case "gregory":default:return new le}}var Z5=_t.forwardRef(({className:e,labelPosition:t,"data-block-id":o,"data-block-class":r,...a},n)=>{let{locale:i}=useLocale(),s={...a,validationState:void 0,isInvalid:a.validationState==="error"||void 0},l=useDateFieldState({...s,locale:i,createCalendar:ql}),p=_t.useRef(null),{labelProps:c,fieldProps:u,validationErrors:m,descriptionProps:d,inputProps:b,errorMessageProps:y,isInvalid:f}=useDateField(s,l,p),g=a.errorMessage||m.join(" "),v=Ce({...a,errorMessage:g,descriptionProps:d,errorMessageProps:y,labelPosition:t}),{focusProps:_,isFocused:h}=useFocusRing({within:true});return jsxs(Pt,{className:classNames("BaselineUI-DateField",e),labelProps:c,fieldProps:u,ref:n,wrapperRef:p,wrapperClassName:hn,labelPosition:t,message:v,isFocused:h,"data-block-id":o,"data-block-class":r,isInvalid:f,...a,children:[jsx(VisuallyHidden,{children:jsx("input",{...b})}),jsx(D,{display:"flex",flexDirection:"row",paddingRight:"md",..._,children:l.segments.map((x,w)=>jsx(xn,{segment:x,state:l},w))})]})});Z5.displayName="DateField";var J5={x:0,y:0},F4={node:null,setNode:()=>{},coordinates:J5,setCoordinates:()=>{},displayId:"",boundsRef:{current:null},isDisabled:false},Xe=_t.createContext(F4),Q5=({children:e,isDisabled:t=false,coordinates:o,onMove:r})=>{let[a,n]=_t.useState(null),i=_t.useRef(null),[s,l]=useControlledState(o,J5,u=>{r?.({coordinates:u,boundingRect:i.current});}),p=useId(),c=_t.useMemo(()=>({node:a,setNode:n,coordinates:s,setCoordinates:l,displayId:p,boundsRef:i,isDisabled:t}),[a,s,p,l,n,i,t]);return jsx(Xe.Provider,{value:c,children:e})};Q5.displayName="Magnifier";var eg="_1yep5z6f6",tg=z({defaultClassName:"_1aj2a4v6",variantClassNames:{isDisabled:{true:"_1aj2a4v7",false:"_1aj2a4v8"},isIndicatorVisible:{true:"_1aj2a4v9",false:"_1aj2a4va"}},defaultVariants:{},compoundVariants:[[{isDisabled:false,isIndicatorVisible:true},"_1aj2a4vb"],[{isDisabled:false,isIndicatorVisible:false},"_1aj2a4vc"]]}),og="_1aj2a4vd",rg="_1aj2a4v1",ag="_1aj2a4v4",Kl="_1aj2a4v3 _1yep5z6hd _1yep5z6lz",ng="_1aj2a4v2 _1yep5z6iy _1yep5z6iz _1yep5z6j0 _1yep5z6h4 _1yep5z6lz _1yep5z6id _1yep5z6ie _1yep5z6if",ig="_1aj2a4v0",sg="_1aj2a4v5";var pg=e=>jsxs("svg",{width:92,height:92,viewBox:"0 0 92 92",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[jsxs("g",{filter:"url(#filter0_d_11407_457970)",children:[jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49 43V4h-6v39H4v6h39v39h6V49h39v-6H49zm38 5H48v39h-4V48H5v-4h39V5h4v39h39v4zm-5 28v6h-6v6h12V76h-6zm5 11H77v-4h6v-6h4v10zm-77-5v-6H4v12h12v-6h-6zm5 5H5V77h4v6h6v4zM76 4v6h6v6h6V4H76zm11 11h-4V9h-6V5h10v10zM4 4v12h6v-6h6V4H4zm11 5H9v6H5V5h10v4z",fill:themeVars.color.background.positive.subtle}),jsx("path",{d:"M48 44v4h39v-4H48zm-4 4v39h4V48h-4zM5 44v4h39v-4H5zM44 5v39h4V5h-4zm39 72v6h-6v4h10V77h-4zM9 83v-6H5v10h10v-4H9zM77 5v4h6v6h4V5H77zM5 5v10h4V9h6V5H5z",fill:themeVars.color.background.positive.interactive.enabled})]}),jsx("defs",{children:jsxs("filter",{id:"filter0_d_11407_457970",x:0,y:0,width:92,height:92,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[jsx("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),jsx("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),jsx("feOffset",{}),jsx("feGaussianBlur",{stdDeviation:2}),jsx("feComposite",{in2:"hardAlpha",operator:"out"}),jsx("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0"}),jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_11407_457970"}),jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_11407_457970",result:"shape"})]})})]});function cg({coordinates:e,setCoordinates:t,boundsRef:o,onKeyDown:r,onKeyUp:a}){let{isDisabled:n}=useContext(Xe);return useKeyboard({isDisabled:n,onKeyDown:i=>{r?.(i);let s=i.shiftKey?10:1,l=o.current;if(!l)return;let p;switch(i.key){case "ArrowRight":{i.preventDefault(),p={x:clamp$1(e.x+s,0,l.width),y:clamp$1(e.y,0,l.height)};break}case "ArrowLeft":{i.preventDefault(),p={x:clamp$1(e.x-s,0,l.width),y:clamp$1(e.y,0,l.height)};break}case "ArrowDown":{i.preventDefault(),p={x:clamp$1(e.x,0,l.width),y:clamp$1(e.y+s,0,l.height)};break}case "ArrowUp":{i.preventDefault(),p={x:clamp$1(e.x,0,l.width),y:clamp$1(e.y-s,0,l.height)};break}}p&&t(p);},onKeyUp:a})}var ug=_t.forwardRef(({children:e,onPress:t,className:o,style:r,"data-block-id":a,"data-block-class":n,onFocusChange:i,onBlur:s,onFocus:l,onKeyDown:p,onKeyUp:c,...u},m)=>{let{setNode:d,setCoordinates:b,coordinates:y,displayId:f,boundsRef:g,isDisabled:v}=useContext(Xe),_=useRef(null),[h,x]=useState(false),w=useInteractionModality(),C=Ee();useEffect(()=>{let E=_.current;if(!E||v)return;let F=j=>{let O=E.getBoundingClientRect();g.current=O;let H="clientX"in j?j.clientX:j.touches[0].clientX,Q="clientY"in j?j.clientY:j.touches[0].clientY,V={x:clamp$1(H-O.left,0,O.width),y:clamp$1(Q-O.top,0,O.height)};b(V),x(true);},B=()=>{x(false);};return E.addEventListener("mousemove",F),E.addEventListener("touchmove",F),E.addEventListener("mouseleave",B),()=>{E.removeEventListener("mousemove",F),E.removeEventListener("touchmove",F),E.removeEventListener("mouseleave",B);}},[b,g,v]);let{pressProps:I}=usePress({isDisabled:v,onPress:E=>{E.pointerType==="keyboard"?t?.({...E,x:y.x,y:y.y}):t?.(E);}}),{focusProps:P,isFocusVisible:S,isFocused:k}=useFocusRing(),{focusProps:T}=useFocus$1({isDisabled:v,onFocusChange:E=>{if(w==="keyboard")if(E){x(true);let F=_.current?.getBoundingClientRect();if(!F)return;g.current=F,b({x:clamp$1(F.width/2,0,F.width),y:clamp$1(F.height/2,0,F.height)});}else x(false);i?.(E);},onFocus:l,onBlur:s}),{keyboardProps:$}=cg({coordinates:y,setCoordinates:b,boundsRef:g,onKeyDown:p,onKeyUp:c}),R=useMemo(()=>_.current?getAbsolutePosition(_.current,y):{x:0,y:0},[y]);useInteractOutside$1({isDisabled:v,ref:_,onInteractOutside:()=>{x(false);}});let N=useMemo(()=>h&&!v&&(C==="mobile"||w==="keyboard"),[h,v,C,w]);return jsxs("div",{ref:M(m,_),className:classNames(og,"BaselineUI-Magnifier-Content",o),style:r,"data-block-id":a,"data-block-class":n,"aria-controls":f,role:"application",...u,children:[N?jsx(Pe,{children:jsx(pg,{style:{left:R.x,top:R.y},className:classNames(ig,"BaselineUI-Magnifier-Cursor")})}):null,jsx("div",{...$e(I,P,$,T),ref:d,className:classNames(tg({isDisabled:v,isIndicatorVisible:N}),"BaselineUI-Magnifier-ContentInner"),"data-focus-visible":S,"data-focused":k,tabIndex:v?void 0:0,children:e})]})});ug.displayName="MagnifierContent";function n8(e){let t=[];for(let o=0;o<e.length;o++){let r=e[o],a=e.getPropertyValue(r);a&&t.push(`${r}: ${a}`);}for(let o of e)if(o.startsWith("--")){let r=e.getPropertyValue(o);r&&t.push(`${o}: ${r}`);}return t.join("; ")}function mg(e){let[t,o]=useState(null),{isDisabled:r}=useContext(Xe);return useEffect(()=>{if(!e||r)return;let a=e,n=ne(a);function i(){let p=n.getComputedStyle(a),c=a.cloneNode(true);c.style.cssText=n8(p);let u=a.getBoundingClientRect();c.style.setProperty("width",`${u.width}px`),c.style.setProperty("height",`${u.height}px`),c.style.setProperty("position","static"),c.style.setProperty("margin","0"),c.style.setProperty("left","0"),c.style.setProperty("top","0"),c.style.setProperty("transform","none"),c.style.removeProperty("-webkit-text-fill-color"),c.style.removeProperty("-webkit-text-stroke-color"),c.removeAttribute("aria-controls"),c.setAttribute("tabindex","-1"),c.setAttribute("aria-hidden","true");let m=findFocusableElements(c);if(m)for(let d of m)d.setAttribute("tabindex","-1");"scrollTop"in a&&(c.scrollTop=a.scrollTop),"scrollLeft"in a&&(c.scrollLeft=a.scrollLeft),o(c);}i();let s=new ResizeObserver(i),l=new MutationObserver(i);return s.observe(a),l.observe(a,{attributes:true,childList:true,subtree:true,characterData:true}),()=>{s.disconnect(),l.disconnect();}},[e,r]),t}var yg=8,bg=7,gg=7,vg=_t.forwardRef(({className:e,style:t,description:o,scale:r=2,"data-block-id":a,"data-block-class":n},i)=>{let{coordinates:s,node:l,boundsRef:p,displayId:c,isDisabled:u}=useContext(Xe),m=mg(l),d=useMemo(()=>typeof o=="function"?o({coordinates:{x:s.x,y:s.y},boundingRect:p.current}):o,[o,s,p]),b=useMemo(()=>p.current?{x:s.x/p.current.width,y:s.y/p.current.height}:{x:0,y:0},[p,s]);return jsxs(D,{ref:i,className:classNames(rg,"BaselineUI-Magnifier-Display",e),backgroundColor:"background.primary.subtle",boxShadow:"medium",borderRadius:"sm",outlineWidth:1,outlineColor:"border.medium",outlineOffset:-1,outlineStyle:"solid",paddingY:"md",paddingLeft:"md",paddingRight:d?.length?"xl":"md",display:"flex",flexDirection:"row",gap:"lg",alignItems:"center",style:t,id:c,"data-block-id":a,"data-block-class":n,role:"complementary",children:[jsxs("div",{className:ng,children:[m&&!u?jsx(Qr,{node:m,style:{transform:`scale(${r}) translate(calc(-${b.x*100}% + ${yg*bg/(2*r)}px), calc(-${b.y*100}% + ${yg*gg/(2*r)}px))`},className:classNames(sg,"BaselineUI-Magnifier-DisplayNode")}):null,Array.from({length:bg*gg}).map((y,f)=>f===24?jsx("div",{className:classNames(Kl,ag)},f):jsx("div",{className:Kl},f))]}),d?.length?jsx(D,{display:"flex",gap:"lg",flexDirection:"column",children:d?.map(({label:y,icon:f},g)=>jsxs(D,{display:"flex",gap:"md",flexDirection:"row",color:"text.secondary",alignItems:"center",children:[jsx(f,{size:12,className:eg}),jsx(te,{type:"label",size:"sm",children:y})]},y+g))}):null]})});vg.displayName="MagnifierDisplay";
|
|
13
|
+
export{rm as Accordion,cm as AccordionItem,K as ActionButton,jb as ActionGroup,tT as ActionGroupItem,L as ActionIconButton,mn as AlertDialog,Q1 as AudioPlayer,uo as Avatar,D as Box,Cb as ButtonSelect,ku as Checkbox,yo as ColorInput,pt as ColorSwatch,Ub as ColorSwatchPicker,Mb as ComboBox,Z5 as DateField,Lu as DateFormat,o_ as DeviceProvider,sa as DeviceProviderContext,ke as Dialog,ed as DialogTitle,Qr as DomNodeRenderer,ya as Drawer,T1 as Editor,Gd as FileUpload,ma as Focusable,u_ as FrameProvider,Uf as FreehandCanvas,c5 as GlobalToastRegion,Bb as GridList,zy as Group,dc as I18nProvider,Lf as IconColorInput,Ka as IconColorInputButton,gm as IconSelect,ud as IconSlider,ay as ImageDropZone,_b as ImageGallery,Na as InlineAlert,Ad as Link,fe as ListBox,Q5 as Magnifier,ug as MagnifierContent,vg as MagnifierDisplay,V1 as Markdown,_a as Menu,_y as MessageFormat,Le as Modal,lP as ModalClose,Ue as ModalContent,Ea as ModalTrigger,no as NumberFormat,Ve as NumberInput,Eu as Pagination,GT as Panel,e4 as PanelGroup,a4 as PanelResizeHandle,je as Popover,ie as PopoverContent,Oe as PopoverTrigger,Pe as Portal,oa as PortalContainerProvider,py as Preview,ou as ProgressBar,so as ProgressSpinner,vy as RadioGroup,mu as Reaction,E1 as ScrollControlButton,Id as SearchInput,st as Select,q as Separator,Qt as Slider,xd as Switch,Dm as TabItem,Sm as Tabs,Ku as TagGroup,te as Text,at as TextInput,da as ThemeProvider,Gb as TimeField,Pa as ToggleButton,Ie as ToggleIconButton,en as Toolbar,J as Tooltip,ey as Transform,a5 as TreeView,W as defineMessages,PM as disableAnimations,kM as enableAnimations,y3 as isInsideOverlayContent,Ap as isRect,Ee as useDevice,A as useI18n,Wt as useImage,nc as useIntersectionObserver,aa as useIsFirstRender,bc as useLocalStorage,yD as useMutationObserver,ye as usePortalContainer,ic as useResizeObserver,xD as useTextSelection,lc as useUndoRedo,Ci as useUserPreferences};
|