@baseline-ui/core 0.26.0 → 0.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { classNames, invariant, filterTruthyValues, getSvgPathFromStroke, getHTMLElement, getTextDimensions, getPlainText, cleanKeyFromGlobImport, getOsSpecificKeyboardShortcutLabel, isUrl } from '@baseline-ui/utils';
2
- import ao, { useMemo, useImperativeHandle, useCallback, useContext, useEffect, createContext, useLayoutEffect, useState, useRef, useReducer, Fragment as Fragment$1, createElement } from 'react';
2
+ import ro, { useMemo, useImperativeHandle, useCallback, useContext, useEffect, createContext, useLayoutEffect, useState, useRef, useReducer, Fragment as Fragment$1, createElement } from 'react';
3
3
  import { useControlledState, clamp } from '@react-stately/utils';
4
4
  import { useReducedMotion, animated, useSpring, useTransition, easings, config } from '@react-spring/web';
5
5
  import { useSeparator, useHover, mergeProps, useOption, useLocale, useListBox, ListKeyboardDelegate, useFocusRing, DragPreview, useNumberField, useNumberFormatter, useSlider, useSliderThumb, VisuallyHidden, useDialog, Overlay, usePopover, DismissButton, useTooltip, useTooltipTrigger, useOverlayPosition, useKeyboard, FocusScope, useSwitch, useSearchField, useMenu, useMenuTrigger, useLink, useDrop, useId, useProgressBar, useTextField, useCheckbox, useTagGroup, useFocusManager, useButton, usePress, useSelect, HiddenSelect, useTabList, useTab, useOverlayTrigger, useLabel, useField, useClipboard, useRadioGroup, useFilter, useInteractOutside, useComboBox, useGridListItem, useGridListSelectionCheckbox, useGridList, useDraggableCollection, useDroppableCollection, ListDropTargetDelegate, useDraggableItem, useListBoxSection, useToggleButton, I18nProvider, useMessageFormatter, useModalOverlay, useMenuSection, useMenuItem, useDateFormatter, useTag, useTabPanel, useRadio, useDropIndicator } from 'react-aria';
@@ -11,13 +11,13 @@ import { sprinkles, lightTheme, themeVars, queries, darkTheme, layoutSprinkleVal
11
11
  import { ChevronDownIcon, MinusIcon, PlusIcon, ChevronRightIcon, XIcon as XIcon$1 } from '@baseline-ui/icons/8';
12
12
  import { ReadOnlyIcon, ErrorFilledIcon, CloseIcon, NoneIcon, UndoIcon, RedoIcon, TrashIcon, ArrowDownCircleFilledIcon, XIcon as XIcon$3, WarningFilledIcon, CheckmarkIcon as CheckmarkIcon$3, CheckFilledIcon, ErrorAltFilledIcon, AvatarIcon, InfoFilledIcon, CaretLeftIcon as CaretLeftIcon$1, CaretRightIcon as CaretRightIcon$1 } from '@baseline-ui/icons/16';
13
13
  import { XIcon, TextIcon, BoldIcon, ItalicIcon, UnderlineIcon, AtIcon, CrossCircleFilledIcon, ArrowUpCircleFilledIcon, CheckmarkIcon as CheckmarkIcon$2, CheckFilledIcon as CheckFilledIcon$1, ErrorAltFilledIcon as ErrorAltFilledIcon$1, InfoFilledIcon as InfoFilledIcon$1, WarningFilledIcon as WarningFilledIcon$1, PlusIcon as PlusIcon$1, MinusIcon as MinusIcon$2, LinkIcon, SearchIcon, CaretLeftIcon as CaretLeftIcon$2, CaretRightIcon as CaretRightIcon$2 } from '@baseline-ui/icons/20';
14
- import { useGranularEffect, useGranularLayoutEffect } from 'granular-hooks';
15
- import X1 from 'lodash/isEmpty';
14
+ import { useGranularLayoutEffect, useGranularEffect } from 'granular-hooks';
15
+ import W1 from 'lodash/isEmpty';
16
16
  import { assignInlineVars } from '@vanilla-extract/dynamic';
17
17
  import { FocusableProvider } from '@react-aria/focus';
18
18
  import { CheckmarkIcon as CheckmarkIcon$1, MinusIcon as MinusIcon$1, XIcon as XIcon$2, CaretLeftIcon, CaretRightIcon } from '@baseline-ui/icons/12';
19
- import { parseColor, useColorAreaState, useColorFieldState, useColorSliderState } from '@react-stately/color';
20
19
  import { useInteractionModality, PressResponder } from '@react-aria/interactions';
20
+ import { parseColor, useColorAreaState, useColorFieldState, useColorSliderState } from '@react-stately/color';
21
21
  import { useColorSwatch, useColorArea, useColorField, useColorSlider } from '@react-aria/color';
22
22
  import { getStroke } from 'perfect-freehand';
23
23
  import { createPortal } from 'react-dom';
@@ -30,11 +30,11 @@ import { createFontColorPlugin, createFontBackgroundColorPlugin, MARK_COLOR, MAR
30
30
  import { createParagraphPlugin, ELEMENT_PARAGRAPH } from '@udecode/plate-paragraph';
31
31
  import { createLinkPlugin, ELEMENT_LINK, upsertLink, unwrapLink } from '@udecode/plate-link';
32
32
  import { withRef, withProps } from '@udecode/cn';
33
- import * as eu from 'dompurify';
33
+ import * as Jm from 'dompurify';
34
34
  import { jsx as jsx$1 } from 'slate-hyperscript';
35
35
  import { useHTMLInputCursorState } from '@udecode/plate-combobox';
36
36
  import { useSelected } from 'slate-react';
37
- import JP from 'markdown-it';
37
+ import lk from 'markdown-it';
38
38
  import { announce } from '@react-aria/live-announcer';
39
39
  import { useActionGroup, useActionGroupItem } from '@react-aria/actiongroup';
40
40
 
@@ -47,8 +47,8 @@ import { useActionGroup, useActionGroupItem } from '@react-aria/actiongroup';
47
47
  * This notice may not be removed from this file.
48
48
  *
49
49
  */
50
- var Te=typeof document<"u"?ao.useLayoutEffect:()=>{};function pa(e){let o=useRef(null);return Te(()=>{o.current=e;},[e]),useCallback((...t)=>{let r=o.current;return r?.(...t)},[])}function ca(e){let[o,t]=useState(e),r=useRef(null),a=pa(()=>{if(!r.current)return;let n=r.current.next();if(n.done){r.current=null;return}o===n.value?a():t(n.value);});Te(()=>{r.current&&a();});let i=pa(n=>{r.current=n(o),a();});return [o,i]}var ve=e=>{var o;return (o=e?.ownerDocument)!==null&&o!==void 0?o:document},J=e=>{if(e&&"window"in e&&e.window===e)return e;let o=jt(e);return o instanceof ShadowRoot?o.ownerDocument.defaultView||window:o?.defaultView||window},jt=e=>{if(!e)return document;let o=e.getRootNode?e.getRootNode():document;return e.isConnected?(o):null};function L(...e){return e.length===1?e[0]:o=>{for(let t of e)typeof t=="function"?t(o):t!=null&&(t.current=o);}}var Nf=new Set(["id"]),Sf=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),Lf=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),Mf=/^(data-.*)$/;function da(e,o={}){let{labelable:t,isLink:r,propNames:a}=o,i={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(Nf.has(n)||t&&Sf.has(n)||r&&Lf.has(n)||a?.has(n)||Mf.test(n))&&(i[n]=e[n]);return i}function bn(e){var o;return typeof window>"u"||window.navigator==null?!1:((o=window.navigator.userAgentData)===null||o===void 0?void 0:o.brands.some(t=>e.test(t.brand)))||e.test(window.navigator.userAgent)}function ma(e){var o;return typeof window<"u"&&window.navigator!=null?e.test(((o=window.navigator.userAgentData)===null||o===void 0?void 0:o.platform)||window.navigator.platform):!1}function gn(){return ma(/^Mac/i)}function vn(){return ma(/^iPhone/i)}function _n(){return ma(/^iPad/i)||gn()&&navigator.maxTouchPoints>1}function ua(){return vn()||_n()}function fa(){return bn(/Android/i)}function Yo(){return bn(/Firefox/i)}function de(e){let o=useRef(null);return useMemo(()=>({get current(){return o.current},set current(t){o.current=t,typeof e=="function"?e(t):e&&(e.current=t);}}),[e])}function Ff(){return typeof window.ResizeObserver<"u"}function ya(e){let{ref:o,onResize:t}=e;useEffect(()=>{let r=o?.current;if(r)if(Ff()){let a=new window.ResizeObserver(i=>{i.length&&t();});return a.observe(r),()=>{r&&a.unobserve(r);}}else return window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1);}},[t,o]);}function $t(e){return !!e&&"label"in e&&!!e.label&&!("children"in e)}function zn(e){return !!e&&"children"in e&&!!e.children&&"title"in e}function Vf(e){return zn(e)?jsx(Section,{items:e.children,title:e.title,children:o=>jsx(Item,{textValue:o.label,children:o.label},o.id)},e.id):jsx(Item,{textValue:e.label,children:e.label},e.id)}function re(){return useCallback(e=>Vf(e),[])}function xn(e,o,t){let{direction:r}=useLocale(),a=useDraggableCollectionState({...e,collection:o.collection,selectionManager:o.selectionManager,isDisabled:!e.enableReorder,getItems:e.getItems||(s=>[...s].map(p=>{let l=o.collection.getItem(p);return invariant(l,"Expected item to be defined."),{"text/plain":l.textValue}}))});useDraggableCollection(e,a,t);let i=useDroppableCollectionState({...e,collection:o.collection,selectionManager:o.selectionManager}),{collectionProps:n}=useDroppableCollection({...e,keyboardDelegate:new ListKeyboardDelegate({collection:o.collection,disabledKeys:o.disabledKeys,ref:t,orientation:e.orientation,layout:e.layout,direction:r}),dropTargetDelegate:new ListDropTargetDelegate(o.collection,t)},i,t);return {collectionProps:n,dragState:a,dropState:i}}function Xf(e,o){if(typeof e!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var r=t.call(e,o||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return (o==="string"?String:Number)(e)}function Yf(e){var o=Xf(e,"string");return typeof o=="symbol"?o:String(o)}function Zf(e,o,t){return o=Yf(o),o in e?Object.defineProperty(e,o,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[o]=t,e}function Cn(e,o){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);o&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,r);}return t}function Pn(e){for(var o=1;o<arguments.length;o++){var t=arguments[o]!=null?arguments[o]:{};o%2?Cn(Object(t),!0).forEach(function(r){Zf(e,r,t[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Cn(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));});}return e}function kn(e,o){var t={};for(var r in e)t[r]=o(e[r],r);return t}var Qf=(e,o,t)=>{for(var r of Object.keys(e)){var a;if(e[r]!==((a=o[r])!==null&&a!==void 0?a:t[r]))return !1}return !0},v=e=>{var o=t=>{var r=e.defaultClassName,a=Pn(Pn({},e.defaultVariants),t);for(var i in a){var n,s=(n=a[i])!==null&&n!==void 0?n:e.defaultVariants[i];if(s!=null){var p=s;typeof p=="boolean"&&(p=p===!0?"true":"false");var l=e.variantClassNames[i][p];l&&(r+=" "+l);}}for(var[c,u]of e.compoundVariants)Qf(c,a,e.defaultVariants)&&(r+=" "+u);return r};return o.variants=()=>Object.keys(e.variantClassNames),o.classNames={get base(){return e.defaultClassName.split(" ")[0]},get variants(){return kn(e.variantClassNames,t=>kn(t,r=>r.split(" ")[0]))}},o};var wn=v({defaultClassName:"_6n12k9b _1yep5z6l0 _1yep5z6kz _1yep5z6hk _1yep5z6ki",variantClassNames:{isDropTarget:{true:"_1yep5z612n"},orientation:{vertical:"_1yep5z6166",horizontal:"_1yep5z6167"}},defaultVariants:{},compoundVariants:[]}),Rn="_6n12k98 _1yep5z6ky _1yep5z6i0 _1yep5z6i1 _1yep5z6i2",In=v({defaultClassName:"_6n12k99 _1yep5z6ev _1yep5z6da _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z6ey"}},defaultVariants:{},compoundVariants:[]}),Tn=v({defaultClassName:"_6n12k91 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jr _1yep5z6js _1yep5z6jt _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6dy _1yep5z6eu _1yep5z6ki _1yep5z6kl _1yep5z6ky _1yep5z6kx _1yep5z6kv _1yep5z6ks",variantClassNames:{isSelected:{},isFocused:{true:"_1yep5z612n _1yep5z616c _1yep5z616a _1yep5z616d _1yep5z612w _1yep5z612x _1yep5z612y"},isHovered:{true:"_1yep5z6114",false:"_1yep5z6113"},isFirstChild:{true:"_6n12k95"},isLastChild:{true:"_6n12k96"},isDisabled:{true:"z9nup83 _1yep5z6109"}},defaultVariants:{},compoundVariants:[]}),Nn="_6n12k9f _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it",Sn="_6n12k90";var Ln=v({defaultClassName:"gukncs0",variantClassNames:{isVertical:{true:"gukncs1"},isSecondary:{true:"gukncs2"}},defaultVariants:{},compoundVariants:[]});var V=ao.forwardRef(({className:e,style:o,variant:t="primary",orientation:r="horizontal",UNSAFE_omitRole:a,elementType:i="div","data-block-id":n,"data-block-class":s,...p},l)=>{let{separatorProps:c}=useSeparator({...p,orientation:r,elementType:i});return jsx(i,{...c,className:classNames(Ln({isVertical:r==="vertical",isSecondary:t==="secondary"}),"BaselineUI-Separator",e),"data-orientation":r,"data-block-id":n,"data-block-class":s,style:o,role:a?void 0:c.role,ref:l})});V.displayName="Separator";function ny(e){return sprinkles.properties.has(e)}var B=ao.forwardRef(({elementType:e="div",children:o,...t},r)=>{let a=e,{sprinkleProps:i,domProps:n}=useMemo(()=>{let s={},p={};for(let l in t)ny(l)?s[l]=t[l]:p[l]=t[l];return {sprinkleProps:s,domProps:p}},[t]);return jsx(a,{...n,className:classNames(sprinkles(i),"BaselineUI-Box",n.className),ref:r,children:o})});B.displayName="Box";var Qo=ao.forwardRef(({item:e,isDisabled:o,isFocusVisible:t,isSelected:r,liProps:a,showSelectedIcon:i,description:n,descriptionProps:s,labelProps:p,isFocused:l,isPressed:c,_state:u},m)=>{invariant(e.value&&$t(e.value),"Item cannot be a section");let{icon:d,label:f}=e.value,{hoverProps:y,isHovered:b}=useHover({isDisabled:o}),g=filterTruthyValues({"data-selected":r,"data-disabled":o,"data-focused":l,"data-hovered":b,"data-pressed":c,"data-focus-visible":t,"data-selection-mode":u.selectionManager.selectionMode});return jsxs("li",{...mergeProps(a,y,g),className:classNames(Tn({isHovered:b,isFocused:t,isFirstChild:u.collection.getFirstKey()===e.key,isLastChild:u.collection.getLastKey()===e.key,isDisabled:o}),"BaselineUI-ListBox-Option"),ref:m,children:[jsxs(B,{display:"flex",alignItems:"center",gap:"lg",children:[i?jsx("span",{"aria-hidden":!0,style:{height:24,width:24},children:r?jsx(CheckmarkIcon,{size:24}):null}):null,d?jsx(d,{size:24}):null,jsx("span",{...p,children:f})]}),n?jsx("span",{className:In({isDisabled:o}),...s,children:n}):null]})});Qo.displayName="DefaultRenderOption";var va=({dropState:e,orientation:o="vertical",dropIndicatorStyle:t,dropIndicatorClassName:r,renderDropIndicator:a=({isDropTarget:n,isHidden:s,dropIndicatorProps:p,orientation:l},c)=>s?null:jsx("li",{...p,ref:c,"data-drop-target":n,className:classNames(wn({isDropTarget:n,orientation:l}),"BaselineUI-DropIndicator",r),style:t}),...i})=>{let n=ao.useRef(null),{dropIndicatorProps:s,isHidden:p,isDropTarget:l}=useDropIndicator(i,e,n);return a({dropIndicatorProps:{...s,role:"option"},isHidden:p,isDropTarget:l,orientation:o},n)};var Hn=({item:e,children:o,state:t,dragState:r,...a})=>{let{dragProps:i}=useDraggableItem({key:e.key},r);return jsxs(Fragment,{children:[jsx(va,{target:{type:"item",key:e.key,dropPosition:"before"},...a}),o(i),t.collection.getKeyAfter(e.key)==null&&jsx(va,{target:{type:"item",key:e.key,dropPosition:"after"},...a})]})};Hn.displayName="DraggableListOption";var Jo=ao.forwardRef(({item:e,renderOption:o=(m,d,f)=>jsx(Qo,{item:m,liProps:d.optionProps,...d,ref:f}),showSelectedIcon:t,state:r,dragState:a,dropState:i,orientation:n,dropIndicatorStyle:s,dropIndicatorClassName:p,optionStyle:l,optionClassName:c},u)=>{let m=ao.useRef(null),d=useOption({key:e.key},r,m),{value:f}=e;invariant(!!f),invariant(!("children"in e),"ListSection should not be passed to ListOption");let y={style:typeof l=="function"?l(f):l,className:typeof c=="function"?c(f):c};return a&&i?jsx(Hn,{orientation:n,state:r,item:e,dropState:i,dragState:a,dropIndicatorStyle:s,dropIndicatorClassName:p,children:b=>o(e,{...d,showSelectedIcon:t,_state:r,optionProps:mergeProps(d.optionProps,b,y)},L(m,u))}):o(e,{...d,showSelectedIcon:t,_state:r,optionProps:mergeProps(d.optionProps,y)},L(m,u))});Jo.displayName="Option";var An=({section:e,state:o,sectionClassName:t,sectionStyle:r,showSectionHeader:a,renderSectionHeader:i,withSectionHeaderPadding:n=!1,...s})=>{let p=ao.useRef(null),{itemProps:l,groupProps:c,headingProps:u}=useListBoxSection({heading:a?i?.(e,p)||e.rendered:void 0,"aria-label":e["aria-label"]}),m=o.collection.getChildren?.(e.key);invariant(m,"items with type `section` must have children");let{value:d}=e,f=typeof r=="function"?r(d):r,y=typeof t=="function"?t(d):t;return jsxs(Fragment,{children:[e.key!==o.collection.getFirstKey()&&jsx(V,{UNSAFE_omitRole:!0}),jsxs("li",{...l,style:{...l.style,...f},className:classNames(Sn,y,"BaselineUI-ListBox-Section"),children:[e.rendered&&a?i?.(e,p)||jsx(B,{...u,className:classNames("BaselineUI-ListBox-SectionHeader",Nn),ref:p,paddingX:"lg",typography:"label.md.medium",color:"text.primary",paddingInlineStart:n?"5xl":"lg",paddingInlineEnd:"lg",children:e.rendered}):null,jsx("ul",{...c,children:[...m].map(b=>jsx(Jo,{item:b,state:o,...s},b.key))})]})]})};var Je=ao.createContext(null),_a=ao.forwardRef(({className:e,layout:o="stack",orientation:t="vertical",showSelectedIcon:r=!0,style:a,renderOption:i,enableReorder:n=!1,"data-block-id":s,"data-block-class":p,renderDragPreview:l,onReorder:c,state:u,listBoxHandle:m,...d},f)=>{let y=ao.useRef(null),{direction:b}=useLocale(),g=ao.useRef(null),{listBoxProps:z}=useListBox({...d,shouldSelectOnPressUp:n,keyboardDelegate:new ListKeyboardDelegate({collection:u.collection,ref:g,layout:o,orientation:t,direction:b,disabledKeys:u.disabledKeys})},u,g);useImperativeHandle(m,()=>({scrollIntoView:(M,S)=>{g.current?.querySelector(`[data-key="${M}"][role="option"]`)?.scrollIntoView(S);}}));let _=useReducedMotion(),h=useCallback(M=>{let S=ve(g.current);c&&(!_&&"startViewTransition"in S?S.startViewTransition(()=>{c(M);}):c(M));},[c,_]),{collectionProps:C,dragState:x,dropState:k}=xn({...d,onReorder:h,layout:o,orientation:t,enableReorder:n,preview:y},u,g),{isFocusVisible:w,isFocused:N,focusProps:P}=useFocusRing(),I=filterTruthyValues({"data-block-id":s,"data-block-class":p,"data-layout":o,"data-empty":u.collection.size===0,"data-focused":N,"data-focus-visible":w,"data-orientation":t});return jsxs("ul",{...mergeProps(z,P,I,C),className:classNames(Rn,"BaselineUI-ListBox",e),style:a,ref:L(f,g),children:[[...u.collection].map(M=>{let S={key:M.key,state:u,dragState:x,dropState:k,renderOption:i,renderDropIndicator:d.renderDropIndicator,renderSectionHeader:d.renderSectionHeader,showSelectedIcon:r,orientation:t,dropIndicatorStyle:d.dropIndicatorStyle,dropIndicatorClassName:d.dropIndicatorClassName,optionStyle:d.optionStyle,optionClassName:d.optionClassName,showSectionHeader:d.showSectionHeader,withSectionHeaderPadding:d.withSectionHeaderPadding};return M.type==="section"?jsx(An,{...S,section:M}):jsx(Jo,{...S,item:M})}),l?jsx(DragPreview,{ref:y,children:l}):null]})});_a.displayName="ListBoxCore";var jn=ao.forwardRef((e,o)=>{let t=re(),r=useListState({...e,children:t});return jsx(_a,{...e,ref:o,state:r})});jn.displayName="ListBoxStandalone";var ae=ao.forwardRef((e,o)=>{let t=useContext(Je);return useEffect(()=>{if(!e.items&&!t)throw new Error("ListBox: You must provide a `state` or `items` prop to render the listbox.")},[e.items,t]),t?jsx(_a,{...e,ref:o,state:t}):jsx(jn,{...e,ref:o})});ae.displayName="ListBox";var Kt="uf19bsg _1yep5z6ki",$n=v({defaultClassName:"uf19bs0 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f0 _1yep5z6kx _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6ks",variantClassNames:{size:{xxs:"uf19bs1",xs:"uf19bs2",sm:"uf19bs3",md:"uf19bs4",lg:"uf19bs5 _1yep5z6vw _1yep5z6vx _1yep5z6vy _1yep5z6wk _1yep5z6wl _1yep5z6wm _1yep5z6x8 _1yep5z6x9 _1yep5z6xa _1yep5z6xw _1yep5z6xx _1yep5z6xy"},isHovered:{true:"uf19bs6"},isDisabled:{true:"uf19bs7 _1yep5z610d"},isFocusVisible:{true:"uf19bs8"},variant:{primary:"uf19bs9",secondary:"uf19bsa",tertiary:"uf19bsb",ghost:"uf19bsc",toolbar:"_1yep5z6we _1yep5z6wf _1yep5z6wg _1yep5z6x2 _1yep5z6x3 _1yep5z6x4 _1yep5z6xq _1yep5z6xr _1yep5z6xs _1yep5z6ye _1yep5z6yf _1yep5z6yg",popover:"uf19bse _1yep5z6oz _1yep5z6p0 _1yep5z6p1 _1yep5z6mn _1yep5z6mo _1yep5z6mp _1yep5z6le _1yep5z6lf _1yep5z6lg _1yep5z6nq _1yep5z6nr _1yep5z6ns _1yep5z6uz _1yep5z6v0 _1yep5z6v1"},isPressed:{true:"uf19bsf"}},defaultVariants:{},compoundVariants:[[{variant:"toolbar",isHovered:!0,isFocusVisible:!1},"_1yep5z61mg"],[{variant:"primary",isHovered:!0,isFocusVisible:!1},"_1yep5z61mg"],[{variant:"secondary",isHovered:!0,isFocusVisible:!1},"_1yep5z61ln"],[{variant:"tertiary",isHovered:!0,isFocusVisible:!1},"_1yep5z61lm _1yep5z61mg"],[{variant:"ghost",isHovered:!0,isFocusVisible:!1},"_1yep5z61ls"],[{variant:"popover",isHovered:!0,isFocusVisible:!1},"_1yep5z61o1 _1yep5z61rl _1yep5z61rp _1yep5z61rm"],[{variant:"toolbar",isPressed:!0},"_1yep5z61mg"],[{variant:"primary",isPressed:!0},"_1yep5z61mf"],[{variant:"secondary",isPressed:!0},"_1yep5z61ln"],[{variant:"tertiary",isPressed:!0},"_1yep5z61lq _1yep5z61mg"],[{variant:"ghost",isPressed:!0},"_1yep5z61lt"],[{variant:"popover",isPressed:!0},"_1yep5z61o1 _1yep5z61rl _1yep5z61rp _1yep5z61rm"],[{variant:"ghost",isDisabled:!1},"_1yep5z61lr"],[{variant:"popover",size:"lg"},"_1yep5z61h4 _1yep5z61h5 _1yep5z61h6 _1yep5z61hs _1yep5z61ht _1yep5z61hu _1yep5z61ig _1yep5z61ih _1yep5z61ii _1yep5z61j4 _1yep5z61j5 _1yep5z61j6"]]});var et=ao.createContext({state:null,overlayTriggerAria:{triggerProps:{},overlayProps:{}},triggerRef:void 0}),Ne=({children:e,...o})=>{let t=ao.useRef(null),r=useOverlayTriggerState(o),a=useOverlayTrigger(o,r),i=useMemo(()=>({state:r,overlayTriggerAria:a,triggerRef:t}),[r,a]);return jsx(et.Provider,{value:i,children:e})};var qn={bottom:"_1gzftth2",top:"_1gzftth3",right:"_1gzftth4",left:"_1gzftth5"},Kn="_1gzftth1 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2",Gn="_1gzftth6",Wn="_1gzftth8",Xn="_1gzftth7",Yn="var(--_1gzftth0)";function ER(e){return e.closest(".BaselineUI-Portal")||e.closest(".BaselineUI-Popover-Content")}function Zn(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 Gt=ao.createContext({isSelected:!1,ref:void 0}),Se=({children:e,anchorRect:o})=>{let{state:t,overlayTriggerAria:r,triggerRef:a}=useContext(et);invariant(t,"PopoverTrigger must be used within a Popover");let{triggerProps:i}=r,n=useMemo(()=>({...i,isSelected:t.isOpen,ref:a}),[i,t.isOpen,a]);return invariant(!o&&e||o&&!e,"Either one of anchorRect or children has to be provided."),invariant(!o||Zn(o),"If provided, the anchorRect prop must be an object with left and top number values, and optionally width and height."),jsx(Gt.Provider,{value:n,children:o?jsx("button",{className:classNames(Wn,"BaselineUI-PopoverTrigger-Hidden"),style:o,ref:a,tabIndex:-1},JSON.stringify(o)):e})};var Wt=e=>{let o=ao.useRef(null),{ref:t,...r}=useContext(Gt)||{},{buttonProps:a,isPressed:i}=useButton({...e,...r},o);return {buttonProps:a,isPressed:i,ref:L(o,t||null)}},Xt=(e,o)=>{let t=ao.useRef(null),{ref:r,...a}=useContext(Gt)||{},{buttonProps:i,isPressed:n}=useToggleButton({...e,...a},o,t);return (i.role==="radio"||i.role==="checkbox")&&(i["aria-pressed"]=void 0),{buttonProps:i,isPressed:n,ref:L(t,r||null)}};var Yt=v({defaultClassName:"oom8bs0 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6kx _1yep5z6ky _1yep5z6ks _1yep5z6dy _1yep5z6ki",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:!0},"oom8bsg"],[{variant:"secondary",isHovered:!0},"oom8bsh"],[{variant:"tertiary",isHovered:!0},"oom8bsi"],[{variant:"popover",isHovered:!0},"oom8bsj"],[{variant:"ghost",isHovered:!0},"oom8bsk"],[{variant:"success",isHovered:!0},"oom8bsl"],[{variant:"warning",isHovered:!0},"oom8bsm"],[{variant:"error",isHovered:!0},"oom8bsn"],[{variant:"primary",isFocusVisible:!0},"oom8bso"],[{variant:"tertiary",isFocusVisible:!0},"oom8bsp"],[{variant:"success",isFocusVisible:!0},"oom8bsq"],[{variant:"warning",isFocusVisible:!0},"oom8bsr"],[{variant:"error",isFocusVisible:!0},"oom8bss"]]});var i1={sm:16,md:20,lg:24},j=ao.forwardRef(({label:e,style:o,className:t,iconStart:r,iconEnd:a,variant:i="primary",elementType:n="button",isDisabled:s,size:p="sm","data-block-id":l,"data-block-class":c,...u},m)=>{let{buttonProps:d,isPressed:f,ref:y}=Wt({...u,elementType:n,isDisabled:s}),b=i1[p],{hoverProps:g,isHovered:z}=useHover({isDisabled:s}),{isFocusVisible:_,isFocused:h,focusProps:C}=useFocusRing(),x=filterTruthyValues({"data-block-id":l,"data-block-class":c,"data-disabled":s,"data-focused":h,"data-focus-visible":_,"data-hovered":z,"data-pressed":f});return jsxs(n,{...mergeProps(d,g,C,x),className:classNames(Yt({isDisabled:!!s,isFocusVisible:_,isHovered:z,variant:i,size:p}),"BaselineUI-ActionButton",t),style:o,ref:L(m,y),children:[!!r&&jsx(r,{size:b}),e,!!a&&jsx(a,{size:b}),i==="popover"&&jsx(ChevronDownIcon,{size:8,className:Kt})]})});j.displayName="ActionButton";var os=v({defaultClassName:"z9nup84",variantClassNames:{size:{xs:"z9nup85",sm:"z9nup86"}},defaultVariants:{},compoundVariants:[]});var Zt="z9nup80",uo="z9nup83";var ts="z9nup87";var rs=ao.forwardRef(({className:e,node:o,...t},r)=>{let a=ao.useRef(null);return ao.useEffect(()=>{let i=a.current;return i?.append(o),()=>{i?.contains(o)&&o.remove();}},[o]),jsx("div",{className:classNames(Zt,e),ref:L(r,a),...t})});rs.displayName="DomNodeRenderer";var as="_14uvjig0 z9nup81",is="_14uvjig7",ns="_14uvjig3",ss=v({defaultClassName:"_14uvjig4",variantClassNames:{isDisabled:{true:"_14uvjig5"},hasNumberInput:{false:"_14uvjig6"}},defaultVariants:{},compoundVariants:[]}),ls=v({defaultClassName:"_14uvjige _14uvjig1",variantClassNames:{active:{true:"_14uvjigf _14uvjig2"},isDisabled:{true:"_14uvjigg"},isReadOnly:{true:"_14uvjigh"},isFocusVisible:{true:"_14uvjigi _14uvjig2"},isHovered:{true:"_14uvjigj _14uvjig2"}},defaultVariants:{},compoundVariants:[]}),ps="_14uvjig8",cs=v({defaultClassName:"_14uvjig9 _14uvjig1",variantClassNames:{active:{true:"_14uvjig2"},isFocusVisible:{true:"_14uvjigb _14uvjig2"},isDisabled:{true:"_14uvjigc"},isHovered:{true:"_14uvjig2"}},defaultVariants:{},compoundVariants:[]});var fo=v({defaultClassName:"nrh1ehx",variantClassNames:{isDisabled:{true:"nrh1ehy"},hasError:{true:"nrh1ehz"},labelPosition:{start:"nrh1eh10",top:"nrh1eh11"}},defaultVariants:{},compoundVariants:[]}),Qt=v({defaultClassName:"nrh1eho",variantClassNames:{isDisabled:{true:"nrh1ehp"},labelPosition:{top:"nrh1ehq",start:"nrh1ehr"}},defaultVariants:{},compoundVariants:[]}),yo=v({defaultClassName:"nrh1ehs",variantClassNames:{validationState:{valid:"nrh1eht",error:"nrh1ehu",warning:"nrh1ehv"},isReadOnly:{true:"nrh1ehw"}},defaultVariants:{},compoundVariants:[]}),Fe="nrh1eh3",He=v({defaultClassName:"nrh1eh4",variantClassNames:{labelPosition:{top:"nrh1eh5",start:"nrh1eh6"},hasMessage:{true:"nrh1eh7"}},defaultVariants:{},compoundVariants:[[{labelPosition:"start",hasMessage:!1},"nrh1eh8"]]}),Oe=v({defaultClassName:"nrh1eh0",variantClassNames:{labelPosition:{top:"z9nup81",start:"nrh1eh2 z9nup82"}},defaultVariants:{},compoundVariants:[]}),bo=v({defaultClassName:"nrh1eh9 z9nup82",variantClassNames:{validationState:{valid:"nrh1eha",error:"nrh1ehb",warning:"nrh1ehc"},isHovered:{true:"nrh1ehd"},isFocused:{true:"nrh1ehe"},isDisabled:{true:"nrh1ehf"},variant:{primary:"nrh1ehg",ghost:"nrh1ehh"},isReadOnly:{true:"nrh1ehi"}},defaultVariants:{},compoundVariants:[[{variant:"ghost",isHovered:!0,isFocused:!1,validationState:"valid"},"nrh1ehj"],[{variant:"ghost",isFocused:!1,isHovered:!1,validationState:"valid"},"nrh1ehk"],[{isHovered:!0,validationState:"valid",isDisabled:!1,isReadOnly:!1,isFocused:!1,variant:"primary"},"nrh1ehl"],[{isHovered:!0,validationState:"warning",isDisabled:!1,isReadOnly:!1,isFocused:!1},"nrh1ehm"],[{isReadOnly:!0,variant:"primary",isFocused:!1},"nrh1ehn"]]});function xe({description:e,errorMessageProps:o,descriptionProps:t,warningMessage:r,errorMessage:a,labelPosition:i,isDisabled:n}){return e?jsx("div",{...t,className:fo({isDisabled:n,labelPosition:i}),children:e}):a?jsx("div",{...o,className:fo({hasError:!0,labelPosition:i}),children:a}):r?jsx("div",{className:fo({isDisabled:n,labelPosition:i}),children:r}):null}var ds=v({defaultClassName:"_1lnwne1 z9nup82",variantClassNames:{isHoveredOrFocused:{true:"_1lnwne2"},isInteractive:{false:"z9nup83"}},defaultVariants:{},compoundVariants:[[{isHoveredOrFocused:!0,isInteractive:!0},"_1lnwne4"]]}),ms="_1lnwne0";var b1={xxs:8,xs:12,sm:16,md:20,lg:24},D=ao.forwardRef(({className:e,style:o,icon:t,size:r="md",variant:a="primary",UNSAFE_NON_INTERACTIVE:i,elementType:n=i?"div":"button",...s},p)=>{!s["aria-label"]&&!s["aria-labelledby"]&&console.warn("An `ActionIconButton` requires an aria-label or aria-labelledby prop.");let{buttonProps:l,isPressed:c,ref:u}=Wt({...s,elementType:n}),{isFocusVisible:m,isFocused:d,focusProps:f}=useFocusRing(),{hoverProps:y,isHovered:b}=useHover({isDisabled:s.isDisabled}),g=filterTruthyValues({"data-block-id":s["data-block-id"],"data-block-class":s["data-block-class"],"data-focused":d,"data-focus-visible":m,"data-disabled":s.isDisabled,"data-hovered":b,"data-pressed":c});return jsxs(n,{...mergeProps(l,y,f,g),className:classNames($n({variant:a,size:r,isDisabled:!!s.isDisabled,isFocusVisible:m,isHovered:b,isPressed:c}),"BaselineUI-ActionIconButton",e),ref:L(p,u),style:o,...i&&{tabIndex:void 0,role:void 0,"aria-label":void 0,"aria-labelledby":void 0,"aria-disabled":void 0},children:[jsx(t,{role:"presentation",size:b1[r]}),a==="popover"&&jsx(ChevronDownIcon,{size:8,className:Kt})]})});D.displayName="ActionIconButton";var Le=ao.forwardRef(({className:e,style:o,labelPosition:t="top",variant:r="primary",showStepper:a=!0,...i},n)=>{let s=ao.useRef(null),{locale:p}=useLocale(),l=useNumberFieldState({...i,locale:p}),{hoverProps:c,isHovered:u}=useHover({isDisabled:i.isDisabled}),{focusProps:m,isFocusVisible:d,isFocused:f}=useFocusRing(),{labelProps:y,decrementButtonProps:b,inputProps:g,incrementButtonProps:z,groupProps:_,descriptionProps:h,errorMessageProps:C}=useNumberField(i,l,s),x=useMemo(()=>i.isReadOnly?ReadOnlyIcon:i.isInvalid?ErrorFilledIcon:null,[i.isInvalid,i.isReadOnly]),k=xe({description:i.description,errorMessageProps:C,descriptionProps:h,errorMessage:i.errorMessage,labelPosition:t,isDisabled:i.isDisabled}),w=filterTruthyValues({"data-disabled":i.isDisabled,"data-readonly":i.isReadOnly,"data-hovered":u,"data-focused":f,"data-focus-visible":d,"data-invalid":i.isInvalid,"data-block-id":i["data-block-id"],"data-block-class":i["data-block-class"]});return jsxs("div",{style:o,className:classNames(Oe({labelPosition:t}),"BaselineUI-NumberInput",e),...w,ref:n,children:[i.label?jsxs("div",{className:He({labelPosition:t,hasMessage:!!k}),children:[jsx("label",{...y,className:Fe,children:i.label}),t==="start"&&k]}):null,jsxs("div",{className:classNames({[uo]:i.isDisabled}),children:[jsxs("div",{...mergeProps(_,c),className:classNames(bo({isHovered:u,isDisabled:!!i.isDisabled,isReadOnly:!!i.isReadOnly,validationState:i.isInvalid?"error":"valid",isFocused:f,variant:r}),{[ms]:t==="start"},"BaselineUI-NumberInput-Container"),children:[jsx("input",{...mergeProps(g,m),ref:s,className:classNames("BaselineUI-NumberInput-Input",Qt({isDisabled:i.isDisabled,labelPosition:t}))}),x?jsx(x,{className:yo({validationState:"error",isReadOnly:i.isReadOnly}),size:16}):null,a?jsxs("div",{className:ds({isHoveredOrFocused:u||f,isInteractive:!i.isReadOnly&&!i.isDisabled}),children:[jsx(D,{variant:"secondary",size:"xxs",icon:MinusIcon,...b,className:"BaselineUI-NumberInput-DecrementButton"}),jsx(V,{style:{height:16},orientation:"vertical"}),jsx(D,{variant:"secondary",size:"xxs",icon:PlusIcon,...z,className:"BaselineUI-NumberInput-DecrementButton"})]}):null]}),t==="top"&&k]})]})});Le.displayName="NumberInput";var vo=ao.forwardRef(({className:e,style:o,onChange:t,onChangeEnd:r,numberFormatOptions:a,isDisabled:i,step:n,minValue:s,maxValue:p,value:l,"aria-label":c,"aria-labelledby":u,"aria-details":m,"aria-describedby":d,"data-block-id":f,"data-block-class":y,defaultValue:b,isReadOnly:g,label:z,id:_,includeNumberInput:h},C)=>{let x=ao.useRef(null),k={onChange:t===void 0?void 0:R=>{t(R[0]);},isDisabled:i||g,step:n,minValue:s,maxValue:p,onChangeEnd:r===void 0?void 0:R=>{r(R[0]);},value:l===void 0?void 0:[l],defaultValue:b===void 0?void 0:[b],"aria-label":c,"aria-labelledby":u,"aria-details":m,"aria-describedby":d,id:_,label:z},w=useNumberFormatter(a),N=useSliderState({...k,numberFormatter:w}),{trackProps:P,groupProps:I,labelProps:M}=useSlider(k,N,x),S=jsx(Le,{variant:"ghost",showStepper:!1,"aria-label":c,"aria-labelledby":M.id,value:N.getThumbValue(0),formatOptions:a,onChange:R=>{N.setThumbValue(0,R);},style:{width:55,textAlign:"right",flexShrink:0}});return jsxs("div",{...I,style:o,"data-block-id":f,"data-block-class":y,className:classNames(as,"BaselineUI-Slider",e),children:[z?jsxs("div",{className:ns,children:[jsx("label",{...M,className:classNames(ss({isDisabled:i,hasNumberInput:!!h}),"BaselineUI-Slider-Label"),children:z}),h?S:null]}):null,jsxs("div",{className:is,children:[jsx("div",{...P,className:classNames(ps,"BaselineUI-Slider-Track"),ref:L(x,C),"data-testid":"track",children:jsx(F1,{state:N,trackRef:x,isDisabled:i,isReadOnly:g})}),h&&!z?S:null]})]})});vo.displayName="Slider";function F1({state:e,trackRef:o,isDisabled:t,isReadOnly:r}){let a=ao.useRef(null),{thumbProps:i,inputProps:n,isDragging:s}=useSliderThumb({trackRef:o,inputRef:a},e),{focusProps:p,isFocused:l,isFocusVisible:c}=useFocusRing(),{hoverProps:u,isHovered:m}=useHover({isDisabled:t}),d=filterTruthyValues({"data-disabled":t,"data-readonly":r,"data-hovered":m,"data-focus-visible":c,"data-dragging":s,"data-focused":l});return jsxs(Fragment,{children:[jsx("div",{className:classNames(cs({isDisabled:t,isFocusVisible:c,active:s,isHovered:m}),"BaselineUI-Slider-TrackHighlight"),style:{width:i.style?.left},"data-testid":"track-highlight"}),jsx("div",{...mergeProps(i,u,d),className:classNames(ls({isDisabled:t,isFocusVisible:c,active:s,isReadOnly:r,isHovered:m}),"BaselineUI-Slider-Thumb"),"data-testid":"thumb",children:jsx(VisuallyHidden,{children:jsx("input",{ref:a,...mergeProps(n,p)})})})]})}function vs({ref:e,onIntersect:o,isDisabled:t,threshold:r,rootMargin:a,root:i}){let n=ao.useRef(null);useEffect(()=>{if(t){n.current?.disconnect(),n.current=null;return}n.current=new IntersectionObserver(([s])=>{o(s);},{root:i?.current,rootMargin:a,threshold:r});},[o,t,i,a,r]),useEffect(()=>{let{current:s}=n;return e.current&&s?.observe(e.current),()=>s?.disconnect()},[e]);}function _s({ref:e,onResize:o,isDisabled:t}){let r=ao.useRef(null),[a,i]=ao.useState();return ao.useEffect(()=>{if(t){r.current?.disconnect(),r.current=null;return}r.current=new ResizeObserver(([n])=>{i(n.contentRect),o?.(n);});},[o,t,i]),ao.useEffect(()=>{let{current:n}=r;return e.current&&n?.observe(e.current),()=>n?.disconnect()},[e]),{size:a}}function _o({src:e,alt:o}){let[t,r]=useState(!1),[a,i]=useState(!1),[n,s]=useState(!1),p=()=>{r(!0),s(!1);},l=()=>{i(!0),s(!1);};return useEffect(()=>{if(!e)return;s(!0);let c=new Image;return c.src=e,c.addEventListener("load",p),c.addEventListener("error",l),()=>{c.removeEventListener("load",p),c.removeEventListener("error",l);}},[e]),{isLoaded:t,hasError:a,isLoading:n,imgProps:{src:t?e:void 0,alt:o}}}function Ae(){let e=useRef(!0);return useEffect(()=>{e.current=!1;},[]),e.current}var zs="SET_STATE",tr="UNDO",rr="REDO",K1=(e,o)=>{let{past:t,present:r,future:a}=e;switch(o.type){case zs:return {past:[...t,r],present:o.data,future:[]};case tr:return {past:t.slice(0,t?.length-1),present:t[t?.length-1],future:[r,...a]};case rr:return {past:[...t,r],present:a[0],future:a.slice(1)};default:throw new Error("Invalid action type")}},hs=(e={},{isDisabled:o,onAction:t})=>{let r=Ae(),[a,i]=useReducer(K1,{past:[],present:e,future:[]}),{past:n,present:s,future:p}=a,l=y=>{i({type:zs,data:y});},c=useRef(),u=()=>{c.current=tr,i({type:tr});},m=()=>{c.current=rr,i({type:rr});},d=!!n?.length,f=!!p?.length;return useGranularEffect(()=>{(c.current===tr||c.current===rr)&&(t?.(s,c.current),c.current=void 0);},[s],[t,r]),{state:s,push:o?()=>{}:l,undo:o?()=>{}:u,redo:o?()=>{}:m,pastStates:n,futureStates:p,canUndo:d,canRedo:f}};var wa=ao.createContext({messages:{}}),Ps=({children:e,messages:o={},...t})=>{let r=ao.useMemo(()=>({messages:o}),[o]);return jsx(I18nProvider,{...t,children:jsx(wa.Provider,{value:r,children:e})})};Ps.displayName="I18nProvider";function F(e){let{messages:o}=useContext(wa);!e&&X1(o)&&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.");let t=useMessageFormatter(e?cleanKeyFromGlobImport(e):o),r=useLocale();return {formatMessage:(a,i)=>{if(typeof a=="object")try{return t(a.id,i)}catch{return console.log(`BUI \u{1F30D}: Translation not found for key: \`${a.id.toString()}\`. The default message, i.e. \`${a.defaultMessage}\`, will be used instead.`),a.defaultMessage||a.id}else try{return t(a,i)}catch{return console.log(`BUI \u{1F30D}: Translation not found for key: \`${a.toString()}\`. The default message, i.e. \`${a.toString()}\`, will be used instead.`),a}},locale:r}}var $=e=>e;function tN(e,o,t){let r=ao.useRef(null);return ao.useEffect(()=>{if(e)return r.current=new MutationObserver(t),r.current.observe(e,o),()=>{r.current&&r.current.disconnect();}},[e,o,t]),r.current}function ws(e,o){let[t,r]=useState(()=>{try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):o}catch(i){return console.log(i),o}});return [t,i=>{try{let n=i instanceof Function?i(t):i;r(n),window.localStorage.setItem(e,JSON.stringify(n));}catch(n){console.log(n);}}]}function pN({ref:e,onSelectionChange:o,onSelectionEnd:t,isDisabled:r}){let a=ao.useRef(null);usePress({ref:e,isDisabled:r,onPressEnd(){let n=J(e.current).getSelection();n&&e.current?.contains(n.anchorNode)&&t?.(n);},onPressStart(){let i=J(e.current);a.current=i.getSelection(),a.current&&a.current.removeAllRanges();}}),useEffect(()=>{let i=e.current;if(!i||r)return;function n(){let l=J(i).getSelection();l&&e.current?.contains(l.anchorNode)&&o(l);}let s=ve(i);return s.addEventListener("selectionchange",n),()=>{s.removeEventListener("selectionchange",n);}},[e,o,r]);}function zo(e){let o=useCallback(()=>{let a=J(e??document.body),i=a.matchMedia(queries.tablet);return a.matchMedia(queries.desktop).matches?"desktop":i.matches?"tablet":"mobile"},[e]),[t,r]=ao.useState(o);return Te(()=>{let a=J(e),i=()=>{r(o());};return a.addEventListener("resize",i),i(),()=>{a.removeEventListener("resize",i);}},[e,o]),t}var Ra=ao.createContext(void 0),Is=({portalContainer:e,children:o})=>jsx(Ra.Provider,{value:e,children:o});Is.displayName="PortalContainerProvider";function fe(e){let o=useContext(Ra);return e||o}var Ts=v({defaultClassName:"_1tkzayn0 _1yep5z6dy",variantClassNames:{size:{sm:"_1tkzayn1",md:"_1tkzayn2",lg:"_1tkzayn3"},type:{subtitle:"_1yep5z6105",title:"_1yep5z6105",label:"_1yep5z6106",value:"_1yep5z6106",helper:"_1yep5z6107",body:"_1yep5z6105"}},defaultVariants:{},compoundVariants:[[{type:"title",size:"sm"},"_1yep5z61jz"],[{type:"title",size:"md"},"_1yep5z61k2"],[{type:"title",size:"lg"},"_1yep5z61k5"],[{type:"body",size:"sm"},"_1yep5z61kp"],[{type:"body",size:"md"},"_1yep5z61ks"],[{type:"body",size:"lg"},"_1yep5z61ks"],[{type:"subtitle",size:"sm"},"_1yep5z61kl"],[{type:"subtitle",size:"md"},"_1yep5z61ko"],[{type:"subtitle",size:"lg"},"_1yep5z61ko"],[{type:"label",size:"md"},"_1yep5z61kn"],[{type:"label",size:"lg"},"_1yep5z61kn"],[{type:"value",size:"md"},"_1yep5z61kn"],[{type:"value",size:"lg"},"_1yep5z61kn"],[{type:"helper",size:"sm"},"_1yep5z61kh"]]});var X=ao.forwardRef(({elementType:e="span",type:o="title",children:t,size:r="md",...a},i)=>jsx(e,{...a,className:classNames(Ts({size:r,type:o}),"BaselineUI-Text",a.className),ref:i,children:t}));X.displayName="Text";var Ns=v({defaultClassName:"siobe21 _1yep5z6ao _1yep5z6ap _1yep5z6aq _1yep5z6bc _1yep5z6bd _1yep5z6be _1yep5z6d7 _1yep5z6l9 _1yep5z6l7 _1yep5z6gq _1yep5z6ky _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ic _1yep5z6id _1yep5z6ie",variantClassNames:{background:{subtle:"_1yep5z6113",medium:"_1yep5z6114"}},defaultVariants:{},compoundVariants:[]}),Ss="siobe24",Ls="var(--siobe20)";var ir=ao.forwardRef(({className:e,style:o,children:t,background:r="medium",title:a,action:i,"data-block-id":n,"data-block-class":s,onCloseRequest:p,...l},c)=>{let{formatMessage:u}=F(),m=ao.useRef(null),{dialogProps:d,titleProps:f}=useDialog(l,m);return jsxs("div",{...d,className:classNames(Ns({background:r}),"BaselineUI-Drawer",e),"data-block-id":n,"data-block-class":s,style:o,ref:L(c,m),children:[jsxs(B,{paddingLeft:"lg",paddingRight:"sm",backgroundColor:"background.primary.subtle",display:"flex",justifyContent:"space-between",alignItems:"center",gap:"lg",className:Ss,children:[jsx(X,{type:"title",size:"sm",...f,className:ts,children:a}),jsxs(B,{children:[i?jsx(D,{...i,variant:"secondary"}):null,jsx(D,{variant:"secondary",size:"md",icon:XIcon,onPress:p,"aria-label":u(fb.close)})]})]}),jsx(V,{variant:r==="subtle"?"primary":"secondary"}),t]})});ir.displayName="Drawer";var fb=$({close:{id:"close",defaultMessage:"Close"}});function Ds(e,o,t){let{isDisabled:r}=e,a=useReducedMotion(),[i,n]=ao.useState("100vh");useEffect(()=>{if(!ua()&&!fa())return;let d=J(t.current);function f(){n(`${d?.visualViewport.height}px`);}return f(),d?.visualViewport.addEventListener("resize",f),()=>{d?.visualViewport.removeEventListener("resize",f);}},[t]);let[{y:s},p]=useSpring(()=>({y:0,immediate:a,config:{easing:easings.easeOutCubic}})),l=useRef(0),c=useCallback(()=>{p.start({y:l.current,onRest:()=>{o.close();}});},[p,o]),u=useCallback(d=>{d.target.closest("[data-drawer]")||c();},[c]);useGranularLayoutEffect(()=>{l.current=t.current?.offsetHeight||0,p.set({y:l.current}),p.start({y:0,immediate:!!a});},[],[p,a]);let m=s.to({range:[0,l.current/2,l.current],output:[.5,.2,0],extrapolate:"clamp"}).to(d=>`rgba(0,0,0,${d})`);return {overlayProps:{style:r?void 0:{transform:s.to(d=>`translateY(${d}px)`)}},underlayProps:{style:r?void 0:{backgroundColor:m},onPointerDown:r?void 0:u},close:c,containerHeight:r?void 0:i}}var Es=v({defaultClassName:"aml2vl0 _1yep5z6ko _1yep5z6kp _1yep5z6kr _1yep5z6kq _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6hr _1yep5z6hs _1yep5z6ht",variantClassNames:{enableDrawer:{false:"_1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jl _1yep5z6jm _1yep5z6jn",true:"aml2vl2"}},defaultVariants:{},compoundVariants:[]}),Fs="_1yep5z6ko _1yep5z6kp _1yep5z6kr _1yep5z6kq _1yep5z6g2 _1yep5z6hr _1yep5z6hs _1yep5z6ht";function Ta(e=window){let[o,t]=useState("light"),[r,a]=useState(!1),[i,n]=useState(!1),[s,p]=useState(!1);return useEffect(()=>{let l=e.matchMedia("(prefers-color-scheme: dark)"),c=u=>{t(u.matches?"dark":"light");};return l.matches&&t("dark"),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),useEffect(()=>{let l=e.matchMedia("(prefers-contrast: more)"),c=u=>{a(u.matches);};return a(l.matches),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),useEffect(()=>{let l=e.matchMedia("(prefers-reduced-motion: reduce)"),c=u=>{n(u.matches);};return l.matches&&n(!0),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),useEffect(()=>{let l=e.matchMedia("(prefers-reduced-transparency: reduce)"),c=u=>{p(u.matches);};return l.matches&&p(!0),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),{colorScheme:o,highContrast:r,reducedMotion:i,transparency:s}}var ho=createContext({theme:lightTheme,setTheme:()=>{}});var Hs="var(--hj25q10)";var lr={LIGHT:{name:"light",theme:lightTheme},DARK:{name:"dark",theme:darkTheme}},xo=ao.forwardRef(({theme:e="system",children:o,setTheme:t,className:r,style:a,UNSAFE_domProps:i,"data-block-id":n,"data-block-class":s},p)=>{let{direction:l}=useLocale(),{colorScheme:c,reducedMotion:u,highContrast:m,transparency:d}=Ta(),{name:f,theme:y}=useMemo(()=>{switch(e){case"system":return c==="light"?lr.LIGHT:lr.DARK;case"light":return lr.LIGHT;case"dark":return lr.DARK;default:return {name:"custom",theme:e}}},[c,e]),b=zo(),g={"data-theme":f,"data-block-id":n,"data-block-class":s,"data-reduced-motion":u,"data-high-contrast":m,"data-transparency":d,"data-device":b},z=useMemo(()=>({theme:y,setTheme:t}),[y,t]);return jsx(ho.Provider,{value:z,children:jsx("div",{...mergeProps(i,g),className:classNames(Zt,"BaselineUI-ThemeProvider",r),style:{...assignInlineVars(themeVars,y),...assignInlineVars({[Hs]:l==="rtl"?"-1":"1"}),...a},ref:p,children:o})})});xo.displayName="ThemeProvider";var je=ao.createContext({state:null,triggerProps:{},overlayProps:{}}),Ce=({children:e,...o})=>{let t=useOverlayTriggerState(o),{triggerProps:r,overlayProps:a}=useOverlayTrigger({type:"dialog"},t),i=useMemo(()=>({state:t,triggerProps:r,overlayProps:a}),[t,r,a]);return jsx(je.Provider,{value:i,children:e})};Ce.displayName="Modal";var Sa=ao.createContext({isDrawer:!1,closeDrawer:()=>{}}),$b=animated(xo),Ub=({children:e,className:o,style:t,isDismissable:r=!0,isKeyboardDismissDisabled:a=!1,portalContainer:i,disableAnimation:n,enableDrawer:s=!1,"data-block-id":p,"data-block-class":l})=>{let{state:c}=ao.useContext(je),u=zo(i),m=fe(i),d=typeof s=="boolean"&&s||s==="auto"&&u==="mobile";invariant(c,"ModalContent must be a child of Modal");let f=ao.useRef(null),y=typeof r=="function"?r(d):r,b=typeof a=="function"?a(d):a,{underlayProps:g,overlayProps:z,close:_,containerHeight:h}=Ds({isDisabled:!d,isDismissable:y},c,f),{modalProps:C,underlayProps:x}=useModalOverlay({isDismissable:!1,isKeyboardDismissDisabled:b},c,f),{theme:k}=useContext(ho),w=useReducedMotion(),N=useSpring({from:{opacity:0,transform:"scale(0.95)"},to:{opacity:1,transform:"scale(1)"},immediate:!!w||n,config:{easing:easings.easeInBounce}}),P=useMemo(()=>({...C.style,...d?{...z.style,width:"100%"}:N}),[z.style,C.style,d,N]),I=useMemo(()=>({isDrawer:d,closeDrawer:_}),[d,_]),M=useMemo(()=>mergeProps(x,g,{onPointerDown:d?g.onPointerDown:x.onPointerDown,onClick:()=>{r&&!d&&c.close();}}),[g,r,d,c,x]);return jsx(Overlay,{portalContainer:m,children:jsx(Sa.Provider,{value:I,children:jsxs($b,{className:classNames(Es({enableDrawer:d}),o),theme:k,"data-block-id":p,"data-block-class":l,style:{...t,height:d?h:"auto",...assignInlineVars({[Ls]:h})},children:[jsx(animated.div,{...M,"data-testid":"underlay",style:g.style,className:classNames(Fs,"BaselineUI-Modal-Underlay")}),jsx(animated.div,{...mergeProps(C,z),style:P,ref:f,"data-drawer":d,className:"BaselineUI-Modal-Content",children:typeof e=="function"?e(c):e})]})})})},qb=animated(Ub),Me=({children:e,style:o,...t})=>{let{state:r}=ao.useContext(je);invariant(r,"ModalContent must be a child of Modal");let a=useReducedMotion();return useTransition(r.isOpen,{from:{opacity:0},enter:{opacity:1},immediate:!!a||t.disableAnimation})((n,s)=>s&&jsx(qb,{...t,style:{...o,...n},children:typeof e=="function"?e(r):e}))};var Ks=v({defaultClassName:"cjv3et0 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6fs _1yep5z6d7",variantClassNames:{size:{sm:"cjv3et1",md:"cjv3et2",lg:"cjv3et3",content:"cjv3et4"},variant:{primary:"_1yep5z6121 _1yep5z616i _1yep5z616k",ghost:"cjv3et6"},isDrawer:{true:"cjv3et7 _1yep5z6xq _1yep5z6xr _1yep5z6xs _1yep5z6ye _1yep5z6yf _1yep5z6yg _1yep5z6166"}},defaultVariants:{},compoundVariants:[]});var Ma=ao.createContext({titleProps:{}}),le=ao.forwardRef(({children:e,className:o,style:t,inheritDrawer:r,size:a="md",variant:i="primary","data-block-id":n,"data-block-class":s,drawerBackground:p,...l},c)=>{let u=ao.useRef(null),m=ao.useRef(null),{isDrawer:d,closeDrawer:f}=useContext(Sa),[y,b]=ao.useState("");useLayoutEffect(()=>{let h=m.current?.getRootNode(),C=l["aria-label"]||"";l["aria-labelledby"]&&(C=h?.querySelector(`#${l["aria-labelledby"].replaceAll(":","\\:")}`)?.textContent||""),b(C);},[l]);let{dialogProps:g,titleProps:z}=useDialog(l,u),_=useMemo(()=>({titleProps:z}),[z]);return d&&r?jsx(ir,{title:y,onCloseRequest:f,className:o,...l,"data-drawer":!0,"data-block-id":n,"data-block-class":s,ref:L(m,c),background:p,children:e}):jsx(Ma.Provider,{value:_,children:jsx("section",{...g,"data-block-id":n,"data-block-class":s,ref:L(u,c),style:t,className:classNames(Ks({size:d?"content":a,variant:i,isDrawer:d}),"BaselineUI-Dialog",o),children:e})})});le.displayName="Dialog";var Gs=ao.forwardRef(({children:e,className:o,style:t},r)=>{let{titleProps:a}=useContext(Ma);return ao.isValidElement(e)?ao.cloneElement(e,{...a,ref:r,className:classNames(e.props.className,o),style:{...e.props.style,...t}}):jsx("h3",{...a,ref:r,className:o,style:t,children:e})});Gs.displayName="DialogTitle";var Co=ao.forwardRef(({className:e,style:o,children:t,"data-block-id":r,"data-block-class":a,...i},n)=>{let{theme:s}=useContext(ho);return jsx(Overlay,{...i,children:jsx(xo,{ref:n,theme:s,style:o,className:classNames("BaselineUI-Portal",e),"data-block-id":r,"data-block-class":a,children:t})})});Co.displayName="Portal";function Xs({placement:e}){let o=useReducedMotion();return useTransition(!0,{from:{opacity:0,transform:`translate3d(${e==="bottom"?"0, 4px, 0":"0, -4px, 0"})`},enter:{opacity:1,transform:"translate3d(0, 0, 0)"},immediate:!!o,config:config.stiff})}var{color:Da}=themeVars,me=ao.forwardRef(({className:e,style:o,state:t,overlayProps:r,underlayClassName:a,children:i,includeArrow:n=!1,offset:s=2,portalContainer:p,contentContainerClassName:l,contentContainerStyle:c,"data-block-id":u,"data-block-class":m,...d},f)=>{let y=ao.useRef(null),b=fe(p),g=n?8:0,{underlayProps:z,popoverProps:_,placement:h,arrowProps:C}=usePopover({...d,offset:s+g,popoverRef:y,containerPadding:d.containerPadding||0},t);delete _.style?.position;let x=Xs({placement:h}),k=h==="center"?"bottom":h;return x((w,N)=>N&&jsxs(Co,{portalContainer:b,style:o,ref:f,"data-block-id":u,"data-block-class":m,children:[!d.isNonModal&&jsx("div",{...z,className:classNames(Xn,a,"BaselineUI-Popover-Underlay")}),jsxs(animated.div,{..._,style:{..._.style,...w,...assignInlineVars({[Yn]:`${d.triggerRef?.current?.offsetWidth}px`})},ref:L(y,f),className:classNames(Kn,"BaselineUI-Popover-Content",e),"data-placement":["top","bottom","left","right"].filter(P=>h?.includes(P)),children:[n?jsxs("svg",{className:classNames(qn[k],"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:Da.border.medium}),jsx("path",{d:"M7.504 6.492 2.248.488h10.511L10.132 3.49 7.504 6.492Z",fill:Da.background.primary.subtle,stroke:Da.background.primary.subtle})]}):null,jsx(DismissButton,{onDismiss:t.close}),jsx("div",{...r,style:c,className:classNames(Gn,l),children:typeof i=="function"?i(t):i}),jsx(DismissButton,{onDismiss:t.close})]})]}))});me.displayName="PopoverContentCore";var Pe=ao.forwardRef((e,o)=>{let{state:t,overlayTriggerAria:{overlayProps:r},triggerRef:a}=useContext(et);return invariant(a),t?.isOpen?jsx(me,{ref:o,...e,triggerRef:e.triggerRef||a,overlayProps:r,state:t}):null});Pe.displayName="PopoverContent";var Qs=v({defaultClassName:"_1mdhlqv3",variantClassNames:{isOpen:{true:"_1mdhlqv4"}},defaultVariants:{},compoundVariants:[]}),$e="_1mdhlqv6 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7",Js=v({defaultClassName:"_1mdhlqv0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z69o _1yep5z69p _1yep5z69q _1yep5z6eu _1yep5z6jr _1yep5z6js _1yep5z6jt _1yep5z6dy",variantClassNames:{isFocused:{false:"_1mdhlqv1"},isDisabled:{true:"z9nup83 _1yep5z6ey"}},defaultVariants:{},compoundVariants:[]}),mr="_1mdhlqv7 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6fs",el="_1yep5z66x _1yep5z66y _1yep5z66z",ol="_1mdhlqv5 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z69i _1yep5z69j _1yep5z69k";var tl=v({defaultClassName:"_1jwycy80",variantClassNames:{placement:{bottom:"_1jwycy81",left:"_1jwycy82",right:"_1jwycy83",top:"_1jwycy84"},variant:{default:"_1jwycy85",inverse:"_1jwycy86"}},defaultVariants:{},compoundVariants:[]}),rl=v({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:"_1yep5z6g0 _1yep5z6ez",inverse:"_1yep5z6d7 _1yep5z6fs _1yep5z6eu"}},defaultVariants:{},compoundVariants:[]});var Fa=ao.forwardRef(({children:e,state:o,overlayProps:t,arrowProps:r,placement:a,variant:i,size:n,tooltipProps:s,includeArrow:p},l)=>{let{tooltipProps:c}=useTooltip({isOpen:o.isOpen},o),u=useMemo(()=>{switch(a){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:0}}},[a]),m=useReducedMotion(),[d]=useSpring(()=>({from:{opacity:0,transform:`translate(${u.x}px, ${u.y}px)`},to:{opacity:1,transform:"translate(0, 0)"},immediate:!!m})),f=a==="center"?"bottom":a;return jsxs(animated.span,{...t,style:{...d,...t.style},ref:l,"data-placement":f,children:[p?jsx("div",{className:tl({placement:f,variant:i}),...r}):null,jsx("div",{...mergeProps(c,s),className:rl({variant:i,size:n}),children:e})]})});Fa.displayName="TooltipContent";var ke=ao.forwardRef(({children:e,placement:o="bottom",delay:t=1e3,closeDelay:r=500,variant:a="default",size:i="md",includeArrow:n=!0,portalContainer:s,className:p,style:l,"data-block-id":c,"data-block-class":u,...m},d)=>{let f=ao.useRef(null),y=ao.useRef(null),b=!m.text||m.isDisabled,g=useTooltipTriggerState({...m,delay:t,closeDelay:r,isDisabled:b}),{triggerProps:z,tooltipProps:_}=useTooltipTrigger({...m,isDisabled:b,delay:t,closeDelay:r},g,f),h=fe(s),{overlayProps:C,arrowProps:x,placement:k,updatePosition:w}=useOverlayPosition({arrowSize:n?13:0,targetRef:f,arrowBoundaryOffset:n?8:0,offset:n?12:2,overlayRef:y,placement:o,isOpen:g.isOpen,...m});return vs({ref:y,threshold:1,onIntersect:w,isDisabled:!g.isOpen}),_s({ref:f,onResize:w,isDisabled:!g.isOpen}),jsxs(FocusableProvider,{...z,ref:f,children:[e,g.isOpen?jsx(Co,{disableFocusManagement:!0,portalContainer:h,className:p,style:l,"data-block-id":c,"data-block-class":u,children:jsx(Fa,{ref:L(d,y),state:g,arrowProps:x,overlayProps:C,placement:k,tooltipProps:_,variant:a,size:i,includeArrow:n,children:m.text})}):null]})});ke.displayName="Tooltip";var ll=ao.forwardRef(({className:e,style:o,onChange:t,"data-block-id":r,icon:a,formatValue:i=l=>l,tooltipProps:n,...s},p)=>{let l=de(p),[c,u]=useControlledState(s.value,s.defaultValue||0,t),[m,d]=ao.useState(!1),{keyboardProps:f}=useKeyboard({onKeyDown:g=>{(g.key==="Enter"||g.key==="Escape")&&d(!1);}}),y=i(c||0),b=n?.isDisabled?`${s["aria-label"]}, ${y}`:y.toString();return jsxs(B,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:classNames("BaselineUI-IconSlider",e),"data-block-id":r,style:o,ref:l,children:[a?jsx(a,{size:24,className:sprinkles({color:"icon.primary"})}):null,jsxs(Ne,{type:"dialog",isOpen:m,onOpenChange:d,children:[jsx(Se,{children:jsx(ke,{text:s["aria-label"],size:"sm",variant:"inverse",includeArrow:!1,...n,children:jsx(j,{label:y,variant:"popover","aria-label":b,style:{fontVariantNumeric:"tabular-nums"}})})}),jsx(Pe,{className:$e,placement:"bottom start",children:jsx(le,{size:"content",children:jsx(FocusScope,{autoFocus:!0,children:jsx(B,{paddingY:"sm",paddingX:"lg",style:{width:215},...f,children:jsx(vo,{...s,onChange:g=>{u(g),t?.(g);},value:c})})})})})]})]})});ll.displayName="IconSlider";var pl=v({defaultClassName:"bpklwa7",variantClassNames:{isReadOnly:{true:"bpklwa8"},isDisabled:{true:"bpklwa9"},isSelected:{true:"bpklwaa"},isFocused:{true:"bpklwab"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!1,isReadOnly:!1},"bpklwac"]]}),cl=v({defaultClassName:"bpklwae",variantClassNames:{isDisabled:{true:"bpklwaf"},isSelected:{true:"bpklwag"},isReadOnly:{true:"bpklwah"}},defaultVariants:{},compoundVariants:[]}),dl="bpklwad",ml=v({defaultClassName:"bpklwa0",variantClassNames:{labelPosition:{top:"bpklwa1",left:"bpklwa2"}},defaultVariants:{},compoundVariants:[]}),ul="bpklwa6",fl=v({defaultClassName:"bpklwa3",variantClassNames:{labelPosition:{top:"bpklwa4",left:"bpklwa5"}},defaultVariants:{},compoundVariants:[]});var vl=ao.forwardRef(({className:e,label:o,labelPosition:t="top",statusLabel:r,style:a,"data-block-id":i,"data-block-class":n,...s},p)=>{let l=ao.useRef(null),c=useToggleState(s),{inputProps:u,isPressed:m}=useSwitch(s,c,l),{isFocusVisible:d,focusProps:f}=useFocusRing(),{hoverProps:y,isHovered:b}=useHover({isDisabled:s.isDisabled}),g=filterTruthyValues({"data-block-id":i,"data-block-class":n,"data-focused":d,"data-disabled":s.isDisabled,"data-focus-visible":d,"data-selected":c.isSelected,"data-readonly":s.isReadOnly,"data-hovered":b,"data-pressed":m}),z=jsx("div",{className:classNames(pl({isSelected:c.isSelected,isDisabled:!!s.isDisabled,isFocused:d,isReadOnly:!!s.isReadOnly}),"BaselineUI-Switch-Track"),children:jsx("div",{className:classNames(cl({isSelected:c.isSelected,isDisabled:s.isDisabled,isReadOnly:s.isReadOnly}),"BaselineUI-Switch-Knob"),"data-testid":"switch-knob"})});return jsxs("label",{...mergeProps(g,y),className:classNames(ml({labelPosition:t}),"BaselineUI-Switch",e),style:a,ref:p,children:[o?jsx("span",{className:classNames(dl,"BaselineUI-Switch-Label"),children:o}):null,jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(u,f),ref:l})}),r?jsxs("div",{className:fl({labelPosition:t}),children:[jsx("span",{className:classNames("BaselineUI-Switch-Status-Label",ul),children:c.isSelected?r.on:r.off}),z]}):z]})});vl.displayName="Switch";var _l="_19n40yy9",zl=v({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 Xg={sm:SearchIcon,md:SearchIcon$1,lg:SearchIcon$1},Cl=ao.forwardRef(({className:e,size:o="md",variant:t="primary","data-block-id":r,"data-block-class":a,...i},n)=>{let s=ao.useRef(null),p=useSearchFieldState(i),{inputProps:l,clearButtonProps:c}=useSearchField({...i,"aria-haspopup":!1,"aria-autocomplete":"none",type:"search"},p,s),{focusProps:u,isFocusVisible:m,isFocused:d}=useFocusRing({within:!0,isTextInput:!0}),f=Xg[o],y=o==="sm"?XIcon$2:XIcon$3,b=filterTruthyValues({"data-block-id":r,"data-block-class":a,"data-focused":d,"data-disabled":i.isDisabled,"data-focus-visible":m});return jsxs("div",{...b,className:classNames(zl({size:o,isFocused:d,variant:t,hasText:!!p.value,isDisabled:i.isDisabled}),"BaselineUI-SearchInput",e),ref:n,children:[jsx(f,{size:o==="sm"?20:24}),jsx("input",{...mergeProps(l,u),className:_l,ref:s}),p.value!==""&&jsx(D,{icon:y,...c,size:o==="sm"?"xs":"sm",variant:"secondary"})]})});Cl.displayName="SearchInput";var Pl="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 _1yep5z6l0 _1yep5z6kz _1yep5z6he _1yep5z6l3 _1yep5z6fs",kl="xyd2ss0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z64l _1yep5z64m _1yep5z64n _1yep5z629 _1yep5z62a _1yep5z62b";var Va=({section:e,showSelectedIcon:o,state:t})=>{let{itemProps:r,groupProps:a,headingProps:i}=useMenuSection({heading:e.value?.title,"aria-label":e["aria-label"]});return jsxs(Fragment,{children:[e.key!==t.collection.getFirstKey()&&jsx(V,{elementType:"li"}),jsxs("li",{...r,children:[e.value?.title?jsx(VisuallyHidden,{children:jsx("span",{...i,children:e.value.title})}):null,jsx("ul",{...a,className:kl,children:[...e.childNodes].map(n=>(invariant(n.type==="item"),jsx(ur,{item:n,state:t,showSelectedIcon:o},n.key)))})]})]})};Va.displayName="MenuSection";var ur=({item:e,state:o,className:t,showSelectedIcon:r})=>{let a=ao.useRef(null),i=useMenuItem({key:e.key},o,a),{isFocusVisible:n,focusProps:s}=useFocusRing();return jsx(Qo,{item:e,liProps:mergeProps(i.menuItemProps,s,{className:t}),...i,isFocusVisible:n,ref:a,description:e.value?.keyboardShortcut,descriptionProps:i.keyboardShortcutProps,_state:o,showSelectedIcon:r})};ur.displayName="MenuItem";var ja=ao.forwardRef(({className:e,itemClassName:o,onContentKeyDown:t,...r},a)=>{let i=useTreeState(r),n=ao.useRef(null),{menuProps:s}=useMenu(r,i,n),{keyboardProps:p}=useKeyboard({onKeyDown:t});return jsx("ul",{...mergeProps(s,p),className:classNames(Pl,e),ref:L(n,a),children:[...i.collection].map(l=>l.type==="section"?jsx(Va,{section:l,state:i,showSelectedIcon:r.selectionMode==="multiple"||r.selectionMode==="single"},l.key):jsx(ur,{item:l,state:i,className:o,showSelectedIcon:r.selectionMode==="multiple"||r.selectionMode==="single"},l.key))})});ja.displayName="MenuContent";var fr=ao.forwardRef(({defaultOpen:e,onOpenChange:o,isOpen:t,isDisabled:r,contentClassName:a,placement:i="bottom start",isNonModal:n,shouldFlip:s,shouldUpdatePosition:p,boundaryElement:l,crossOffset:c,offset:u,triggerLabel:m,renderTrigger:d=({buttonProps:g,ref:z})=>jsx(j,{...g,variant:"popover",ref:z}),portalContainer:f,...y},b)=>{let g=ao.useRef(null),z=fe(f),_=useMenuTriggerState({defaultOpen:e,isOpen:t,onOpenChange:o}),{menuTriggerProps:h,menuProps:C}=useMenuTrigger({isDisabled:r,type:"menu"},_,g),x=re(),k=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:k,ref:g}),_.isOpen?jsx(me,{triggerRef:g,state:_,placement:i,isNonModal:n,shouldFlip:s,shouldUpdatePosition:p,boundaryElement:l,crossOffset:c,offset:u||2,className:classNames($e,"BaselineUI-Menu-Popover"),portalContainer:z,children:jsx(ja,{className:a,...C,...y,ref:b,autoFocus:_.focusStrategy||"first",children:x})}):null]})});fr.displayName="Menu";var yr=v({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:!0,isDisabled:!1},"_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 Nl=ao.forwardRef(({className:e,style:o,children:t,variant:r="default",size:a="md",elementType:i="a",type:n="body","data-block-id":s,"data-block-class":p,title:l,...c},u)=>{let m=ao.useRef(null),{linkProps:d,isPressed:f}=useLink({...c,elementType:c.onPress?"span":i},m),{isFocusVisible:y,isFocused:b,focusProps:g}=useFocusRing(),{hoverProps:z,isHovered:_}=useHover({isDisabled:c.isDisabled}),h=i,C=filterTruthyValues({"data-block-id":s,"data-block-class":p,"data-disabled":c.isDisabled,"data-focused":b,"data-pressed":f,"data-focus-visible":y,"data-hovered":_,title:l});return jsx(h,{...mergeProps(d,g,z,C),className:classNames(yr({variant:r,isFocusVisible:y,isHovered:_,isDisabled:c.isDisabled,size:a,isActive:f,type:n}),"BaselineUI-Link",e),ref:L(m,u),style:o,children:t})});Nl.displayName="Link";function Sl({isDisabled:e,onValueChange:o,onChange:t,name:r,"aria-describedby":a,"aria-label":i,accept:n,multiple:s}){let p=useId(),l=useId(),c=useId();return {inputProps:{type:"file",id:l,disabled:!!e,"aria-labelledby":i?void 0:p,"aria-describedby":a||c,"aria-label":i,onChange:m=>{let d=[...m.target.files||[]];o?.(d),t?.(m);},name:r,accept:n,multiple:s},labelProps:{htmlFor:l,id:p},descriptionProps:{id:c}}}async function qa({items:e}){let o=e.filter(t=>t.kind==="file").map(async t=>(invariant(t.kind==="file"),t.getFile()));return await Promise.all(o)}var Ll=v({defaultClassName:"_180w5ed0",variantClassNames:{variant:{default:"_180w5ed1",inline:"_180w5ed2"},hoveredOrFocusedOrActive:{true:"_180w5ed3"},disabled:{true:"_180w5ed4"}},defaultVariants:{},compoundVariants:[[{variant:"inline",hoveredOrFocusedOrActive:!0},"_180w5ed5"],[{variant:"default",hoveredOrFocusedOrActive:!0},"_180w5ed6"],[{variant:"default",disabled:!0},"_180w5ed7"],[{variant:"inline",disabled:!0},"_180w5ed8"]]}),Ml=v({defaultClassName:"_180w5ede",variantClassNames:{disabled:{true:"_180w5edf"}},defaultVariants:{},compoundVariants:[]}),Bl=v({defaultClassName:"_180w5ed9",variantClassNames:{disabled:{true:"_180w5eda"}},defaultVariants:{},compoundVariants:[]}),Dl=v({defaultClassName:"_180w5edb",variantClassNames:{disabled:{true:"_180w5edc"},hovered:{true:"_180w5edd"}},defaultVariants:{},compoundVariants:[]});var Ol=ao.forwardRef(({className:e,label:o,description:t,icon:r,variant:a="default",...i},n)=>{let s=ao.useRef(null),{inputProps:p,descriptionProps:l,labelProps:c}=Sl(i),{dropProps:u}=useDrop({ref:s,onDrop:async({items:b})=>{let g=b.filter(_=>_.kind==="file").map(async _=>(invariant(_.kind==="file"),_.getFile())),z=await Promise.all(g);i.onValueChange?.(z);}}),{focusProps:m,isFocusVisible:d}=useFocusRing(),{hoverProps:f,isHovered:y}=useHover({isDisabled:i.isDisabled});return jsxs("label",{...mergeProps(u,f,c),className:classNames(Ll({variant:a,disabled:i.isDisabled,hoveredOrFocusedOrActive:y||d}),e),ref:L(n,s),children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(m,p)})}),r?jsx(r,{size:20,className:Bl({disabled:i.isDisabled})}):null,jsxs("div",{children:[jsx("div",{className:Dl({disabled:i.isDisabled,hovered:y}),children:o}),t?jsx("div",{...l,className:Ml({disabled:i.isDisabled}),children:t}):null]})]})});Ol.displayName="FileUpload";var Vl="_12vfhl40 z9nup81",Al="_12vfhl41 z9nup82",jl=v({defaultClassName:"_12vfhl48",variantClassNames:{variant:{success:"_12vfhl49",error:"_12vfhl4a",active:"_12vfhl4b"}},defaultVariants:{},compoundVariants:[]}),$l="_12vfhl42",Ul="_12vfhl47",ql="_12vfhl46 z9nup82",Kl="_12vfhl45",Gl=v({defaultClassName:"_12vfhl43 _12vfhl42",variantClassNames:{hasLabel:{false:"_12vfhl44"}},defaultVariants:{},compoundVariants:[]});var Wl=ao.forwardRef(({className:e,style:o,variant:t="active",showValue:r,description:a,errorMessage:i,"data-block-id":n,"data-block-class":s,...p},l)=>{let c=useId(),{labelProps:u,progressBarProps:m}=useProgressBar({...p,"aria-describedby":a?c:p["aria-describedby"]}),{minValue:d=0,maxValue:f=100,value:y=0,label:b}=p,g=(y-d)/(f-d),z=`${Math.round(g*100)}%`,_=jsx("output",{className:Gl({hasLabel:!!b}),children:m["aria-valuetext"]}),h=t==="error"?i:a;return jsxs("div",{...m,style:o,className:classNames(Vl,"BaselineUI-ProgressBar",e),"data-block-id":n,"data-block-class":s,ref:l,children:[b?jsxs("div",{className:Al,children:[jsx("label",{...u,className:$l,children:b}),r?_:null]}):null,jsxs("div",{className:Kl,children:[jsxs("div",{className:ql,children:[jsx("div",{className:Ul,children:jsx("div",{style:{width:z},className:jl({variant:t})})}),!b&&r?_:null]}),h?jsx("div",{className:fo({hasError:t==="error"}),id:c,children:h}):null]})]})});Wl.displayName="ProgressBar";function Ro({isReadOnly:e,validationState:o}){return e?ReadOnlyIcon:o==="error"?ErrorFilledIcon:o==="warning"?WarningFilledIcon:null}var Io=ao.forwardRef(({className:e,validationState:o,variant:t="primary",style:r,labelPosition:a="top",inputStyle:i,inputClassName:n,"data-block-id":s,"data-block-class":p,...l},c)=>{let u=ao.useRef(null),{inputProps:m,labelProps:d,descriptionProps:f,errorMessageProps:y,validationErrors:b}=useTextField({...l,validationState:o?o==="error"?"invalid":"valid":void 0},u),g=l.errorMessage||b.join(" "),z=xe({...l,errorMessage:g,descriptionProps:f,errorMessageProps:y,labelPosition:a});g&&(o="error");let{hoverProps:_,isHovered:h}=useHover({isDisabled:l.isDisabled}),{isFocused:C,focusProps:x,isFocusVisible:k}=useFocusRing(),w=Ro({isReadOnly:l.isReadOnly,validationState:o}),N=filterTruthyValues({"data-readonly":l.isReadOnly,"data-disabled":l.isDisabled,"data-validation-state":o,"data-focused":C,"data-focus-visible":k});return jsxs("div",{className:classNames(Oe({labelPosition:a}),"BaselineUI-TextInput",e),"data-block-id":s,"data-block-class":p,style:r,ref:c,children:[l.label||a==="start"&&z?jsxs("div",{className:He({labelPosition:a,hasMessage:!!z}),children:[jsx("label",{...d,className:Fe,children:l.label}),a==="start"&&z]}):null,jsxs("div",{className:classNames({[uo]:l.isDisabled}),children:[jsxs("div",{..._,className:bo({validationState:o,isHovered:h,isFocused:C,variant:t,isReadOnly:!!l.isReadOnly,isDisabled:!!l.isDisabled}),children:[jsx("input",{...mergeProps(m,x,N),className:classNames(Qt({isDisabled:l.isDisabled,labelPosition:a}),"BaselineUI-TextInput-Input",n),style:i,ref:u}),w?jsx(w,{className:yo({validationState:o,isReadOnly:l.isReadOnly}),size:16}):null]}),a==="top"&&z]})]})});Io.displayName="TextInput";var To=({value:e,...o})=>{let t=useNumberFormatter(o);return jsx(Fragment,{children:t.format(e)})};To.displayName="NumberFormat";var Yl="_1yep5z6i3 _1yep5z6i4 _1yep5z6i5",Zl=v({defaultClassName:"_9b1tml0",variantClassNames:{isSelected:{true:"_9b1tml1",false:"_9b1tml2"},isDisabled:{true:"z9nup83"},isHovered:{true:"_9b1tml4"},isFocusVisible:{true:"_9b1tml5"},isReadOnly:{true:"_9b1tml6"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isFocusVisible:!0,isReadOnly:!1},"_9b1tml7"],[{isSelected:!0,isHovered:!0,isDisabled:!1,isReadOnly:!1},"_9b1tml8"],[{isSelected:!1,isHovered:!0,isDisabled:!1,isReadOnly:!1},"_9b1tml9"],[{isSelected:!0,isDisabled:!0},"_9b1tmla"],[{isSelected:!0,isReadOnly:!0},"_9b1tmlb"]]}),Ql=v({defaultClassName:"_9b1tmlf",variantClassNames:{isSelected:{true:"_9b1tmlg"},size:{sm:"_9b1tmlh",md:"_9b1tmli"},isDisabled:{true:"_9b1tmlj"},isReadOnly:{true:"_9b1tmlk"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!1,isReadOnly:!1},"_9b1tmll"],[{isSelected:!0,isDisabled:!0},"_9b1tmlm"],[{isSelected:!1,isDisabled:!0},"_9b1tmln"]]}),Jl=v({defaultClassName:"_9b1tmlc",variantClassNames:{isDisabled:{true:"_9b1tmld"},isReadOnly:{true:"_9b1tmle"}},defaultVariants:{},compoundVariants:[]});var tp=ao.forwardRef(({className:e,count:o,style:t,size:r="md",icon:a,"data-block-id":i,"data-block-class":n,...s},p)=>{let l={isRequired:!1},c=a||(r==="md"?CheckmarkIcon$2:CheckmarkIcon$3);!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=ao.useRef(null),m=useToggleState({...s,...l}),{inputProps:d,isPressed:f,isDisabled:y,isReadOnly:b,isSelected:g}=useSwitch({...s,...l},m,u),{focusProps:z,isFocused:_,isFocusVisible:h}=useFocusRing(),{hoverProps:C,isHovered:x}=useHover({}),k=filterTruthyValues({"data-block-id":i,"data-block-class":n,"data-focused":_,"data-focus-visible":h,"data-disabled":y,"data-hovered":x,"data-pressed":f,"data-selected":g});return jsxs("label",{ref:p,style:t,className:classNames(Yl,"BaselineUI-Reaction",e),...k,children:[jsx(VisuallyHidden,{children:jsx("input",{...d,...z,ref:u})}),jsxs("div",{...C,className:Zl({isSelected:g,isFocusVisible:h,isHovered:x,isReadOnly:b,isDisabled:y}),children:[jsx("div",{className:Jl({isDisabled:y,isReadOnly:b}),children:jsx(c,{size:r==="md"?20:16})}),jsx("div",{className:Ql({isSelected:m.isSelected,isDisabled:y,isReadOnly:b,size:r}),children:jsx(To,{value:o})})]})]})});tp.displayName="Reaction";var rp="_1azy5686",ap="_1azy5685",ip="var(--_1azy5680)",np="_1azy5688",sp="_1azy5689",lp="_1azy5681 z9nup82",pp="_1azy5682";var cp="_1azy5687";var c_={sm:16,md:20},d_={sm:[CheckFilledIcon,ErrorAltFilledIcon],md:[CheckFilledIcon$1,ErrorAltFilledIcon$1]},So=ao.forwardRef(({className:e,style:o,size:t="md",variant:r="active","data-block-id":a,"data-block-class":i,...n},s)=>{let{labelProps:p,progressBarProps:l}=useProgressBar({...n,isIndeterminate:!0}),c=c_[t],u=c/2-2,m=2*u*Math.PI,d=d_[t][r==="success"?0:1];return jsxs("div",{className:classNames(lp,"BaselineUI-ProgressSpinner",e),ref:s,style:{...assignInlineVars({[ip]:`${m}px`}),...o},"data-block-id":a,"data-block-class":i,children:[jsxs("div",{...l,className:pp,children:[(r==="active"||r==="inactive")&&jsxs("svg",{height:c,width:c,viewBox:`0 0 ${c} ${c}`,children:[jsx("circle",{role:"presentation",className:rp,cx:c/2,cy:c/2,r:u}),r==="active"&&jsx("circle",{role:"presentation",className:ap,cx:c/2,cy:c/2,r:u})]}),r==="success"&&jsx(d,{className:cp,size:c}),r==="error"&&jsx(d,{className:np,size:c})]}),n.label?jsx("span",{...p,className:sp,children:n.label}):null]})});So.displayName="ProgressSpinner";var dp=v({defaultClassName:"_5uw3kp0 oom8bs0 z9nup82",variantClassNames:{isHovered:{true:"_5uw3kp1"},isFocusVisible:{true:"_5uw3kp2"},isDisabled:{true:"_5uw3kp3"},isSelected:{true:"_5uw3kp4"},size:{sm:"_5uw3kp5",md:"_5uw3kp6",lg:"_5uw3kp7"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isFocusVisible:!0},"_5uw3kp8"],[{isSelected:!0,isDisabled:!0},"_5uw3kp9"]]});var __={sm:16,md:20,lg:24},vr=ao.forwardRef(({className:e,style:o,iconStart:t,size:r="md",elementType:a="button",...i},n)=>{let s=useToggleState(i),{buttonProps:p,isPressed:l,ref:c}=Xt(i,s),{hoverProps:u,isHovered:m}=useHover({isDisabled:i.isDisabled}),{isFocusVisible:d,isFocused:f,focusProps:y}=useFocusRing(),b=filterTruthyValues({"data-block-id":i["data-block-id"],"data-block-class":i["data-block-class"],"data-focused":f,"data-focus-visible":d,"data-disabled":i.isDisabled,"data-hovered":m,"data-pressed":l,"data-selected":s.isSelected});return jsxs(a,{...mergeProps(p,u,y,b),className:classNames(dp({isHovered:m,isFocusVisible:d,isSelected:s.isSelected,size:r,isDisabled:i.isDisabled}),"BaselineUI-ToggleButton",e),style:o,ref:L(c,n),children:[t?jsx(t,{size:__[r]}):null,i.label]})});vr.displayName="ToggleButton";var _r=v({defaultClassName:"_16vugd0e",variantClassNames:{isDisabled:{true:"_16vugd0f"}},defaultVariants:{},compoundVariants:[]}),mp=v({defaultClassName:"_16vugd01 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it",variantClassNames:{labelPosition:{end:"_1yep5z613k _1yep5z613l _1yep5z613m _1yep5z6ut _1yep5z6uu _1yep5z6uv",start:"_1yep5z613q _1yep5z613r _1yep5z613s _1yep5z6152 _1yep5z6153 _1yep5z6154"}},defaultVariants:{},compoundVariants:[]}),up=v({defaultClassName:"_16vugd05",variantClassNames:{isIndeterminate:{true:"_16vugd04"},isSelected:{true:"_16vugd04"},isFocusVisible:{true:"_16vugd08"},isHovered:{true:"_16vugd09"},isDisabled:{true:"_16vugd0a"},isReadOnly:{true:"_16vugd0b"},hasError:{true:"_16vugd0c"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!0},"_16vugd0d"]]});var bp=ao.forwardRef(({className:e,style:o,label:t,labelPosition:r="end","data-block-id":a,"data-block-class":i,...n},s)=>{let p=ao.useRef(null),l=useToggleState(n),{isFocusVisible:c,isFocused:u,focusProps:m}=useFocusRing(),{inputProps:d,isPressed:f,isDisabled:y,isSelected:b,isReadOnly:g}=useCheckbox({...n,children:t},l,p),{hoverProps:z,isHovered:_}=useHover({isDisabled:y}),h=filterTruthyValues({"data-disabled":y,"data-readonly":g,"data-hovered":_,"data-selected":b,"data-pressed":f,"data-indeterminate":n.isIndeterminate,"data-invalid":n.isInvalid,"data-focus-visible":c,"data-focused":u,"data-block-id":a,"data-block-class":i});return jsxs("label",{...h,className:classNames(mp({labelPosition:r}),"BaselineUI-Checkbox",e),style:o,ref:s,children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(d,m),ref:p})}),jsxs("div",{...z,className:up({isSelected:b&&!n.isIndeterminate,isIndeterminate:n.isIndeterminate,isFocusVisible:c,isDisabled:y,isReadOnly:g,hasError:n.isInvalid,isHovered:_}),children:[b&&!n.isIndeterminate?jsx(CheckmarkIcon$1,{size:12}):null,n.isIndeterminate?jsx(MinusIcon$1,{size:12}):null]}),t?jsx("span",{className:_r({isDisabled:y}),children:t}):null]})});bp.displayName="Checkbox";var gp={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 vp=v({defaultClassName:"_1nsi9h17",variantClassNames:{isFocusVisible:{true:"_1nsi9h18"},variant:{pinned:"_1nsi9h19",floating:"_1nsi9h1a"}},defaultVariants:{},compoundVariants:[]}),_p="_1nsi9h1b",zp=v({defaultClassName:"_1nsi9h10",variantClassNames:{size:{xs:"_1nsi9h11",sm:"_1nsi9h12",md:"_1nsi9h13",lg:"_1nsi9h14"},variant:{floating:"_1nsi9h15",pinned:"_1nsi9h16"}},defaultVariants:{},compoundVariants:[]}),hp="_1nsi9h1c";var G_={style:"decimal"},W_={xs:[CaretLeftIcon,CaretRightIcon],sm:[CaretLeftIcon$1,CaretRightIcon$1],md:[CaretLeftIcon$2,CaretRightIcon$2],lg:[CaretLeftIcon$3,CaretRightIcon$3]},kp=ao.forwardRef(({className:e,style:o,minValue:t=1,defaultValue:r=1,incrementAriaLabel:a,decrementAriaLabel:i,"aria-label":n,size:s="md",variant:p="floating",...l},c)=>{let{locale:u}=useLocale(),m=F(gp),d={...l,formatOptions:G_,minValue:t,incrementAriaLabel:a||m.formatMessage("nextPage"),decrementAriaLabel:i||m.formatMessage("prevPage"),defaultValue:r,"aria-label":n||m.formatMessage("goToPage")},f=ao.useRef(null),y=useNumberFieldState({...d,locale:u}),{inputProps:b,decrementButtonProps:g,incrementButtonProps:z,groupProps:_}=useNumberField({...d,onKeyDown:S=>{S.key==="Enter"&&f.current?.blur(),l.onKeyDown?.(S);}},y,f),{hoverProps:h,isHovered:C}=useHover({}),{focusProps:x,isFocused:k,isFocusVisible:w}=useFocusRing(),N=p==="floating",[P,I]=W_[s],M=filterTruthyValues({"data-focus-visible":w,"data-focused":k,"data-hovered":C,"data-block-id":l["data-block-id"],"data-block-class":l["data-block-class"]});return jsxs("div",{...mergeProps(_,h,M),className:classNames(zp({size:s,variant:p}),"BaselineUI-Pagination",e),style:o,ref:c,children:[jsx(D,{icon:P,...g,elementType:"div",size:s,style:{height:"100%",...N&&{borderRadius:0}},className:"BaselineUI-Pagination-DecrementButton"}),p==="floating"&&jsx(V,{orientation:"vertical"}),jsxs("div",{className:vp({isFocusVisible:w,variant:p}),"aria-label":m.formatMessage("pageXofY",{arg0:b.value,arg1:y.maxValue}),children:[jsx("input",{...mergeProps(b,x),ref:f,className:classNames("BaselineUI-Pagination-Input",_p),style:{width:`${b.value?.toString().length||1}ch`}}),jsxs("span",{className:hp,children:["/ ",jsx(To,{value:y.maxValue})]})]}),p==="floating"&&jsx(V,{orientation:"vertical"}),jsx(D,{icon:I,...z,elementType:"div",size:s,style:{height:"100%",...N&&{borderRadius:0}},className:"BaselineUI-Pagination-IncrementButton"})]})});kp.displayName="Pagination";var wp=({date:e,...o})=>{let t=useDateFormatter(o);return jsx(Fragment,{children:t.format(e)})};wp.displayName="DateFormat";var zr=v({defaultClassName:"_1f789qj1",variantClassNames:{isFocusVisible:{true:"_1f789qj2"},variant:{neutral:"_1f789qj3",red:"_1f789qj4",green:"_1f789qj5",blue:"_1f789qj6","high-contrast":"_1f789qj7"},isDisabled:{true:"_1f789qj8"},allowsRemoving:{true:"_1f789qj9"},isSelected:{true:"_1f789qja"},allowsSelection:{true:"_1f789qjb"},isHovered:{true:"_1f789qjc"}},defaultVariants:{},compoundVariants:[[{allowsSelection:!0,isHovered:!0,variant:"neutral"},"_1f789qjd"],[{allowsSelection:!0,isHovered:!0,variant:"red"},"_1f789qje"],[{allowsSelection:!0,isHovered:!0,variant:"blue"},"_1f789qjf"],[{allowsSelection:!0,isHovered:!0,variant:"green"},"_1f789qjg"],[{allowsSelection:!0,isHovered:!0,variant:"high-contrast"},"_1f789qjh"],[{allowsSelection:!0,isSelected:!0,isHovered:!0},"_1f789qji"]]}),Rp="_1f789qjj",Ip="_1f789qj0",Tp=v({defaultClassName:"_1f789qjk",variantClassNames:{variant:{neutral:"_1f789qjl",red:"_1f789qjm",green:"_1f789qjn",blue:"_1f789qjo","high-contrast":"_1f789qjp"},isHovered:{true:"_1f789qjq"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,variant:"neutral"},"_1f789qjr"],[{isHovered:!0,variant:"red"},"_1f789qjs"],[{isHovered:!0,variant:"blue"},"_1f789qjt"],[{isHovered:!0,variant:"green"},"_1f789qju"],[{isHovered:!0,variant:"high-contrast"},"_1f789qjv"]]});var Mp=({item:e,state:o,variant:t="neutral"})=>{let r=ao.useRef(null),{focusProps:a,isFocusVisible:i}=useFocusRing({within:!0}),{rowProps:n,gridCellProps:s,removeButtonProps:p,allowsRemoving:l,isDisabled:c,isSelected:u,allowsSelection:m}=useTag({item:e},o,r),d=ao.useRef(null),{buttonProps:f}=useButton(p,d),{hoverProps:y,isHovered:b}=useHover({isDisabled:c}),{hoverProps:g,isHovered:z}=useHover({isDisabled:c}),_=e.value?.icon,h=e.value?.data?.variant??t;return jsx("div",{...mergeProps(n,a,g),ref:r,className:classNames(zr({isFocusVisible:i,variant:h,isDisabled:c,allowsRemoving:l,isSelected:u,allowsSelection:m,isHovered:z}),"BaselineUI-Tag"),children:jsxs("div",{...s,className:Rp,children:[u?jsx(CheckmarkIcon$3,{size:16}):null,!u&&_?jsx(_,{size:16}):null,e.rendered,l?jsx("button",{...mergeProps(f,y),className:Tp({variant:h,isHovered:b}),children:jsx(XIcon$2,{})}):null]})})};var Ep=ao.forwardRef(({className:e,style:o,"data-block-id":t,"data-block-class":r,items:a,...i},n)=>{let s=useMemo(()=>a.map(m=>({...m,data:{variant:m.variant}})),[a]),p=re(),l=ao.useRef(null),c=useListState({...i,items:s,children:p}),{gridProps:u}=useTagGroup(i,c,l);return jsx("div",{...u,className:classNames(Ip,"BaselineUI-TagGroup",e),style:o,"data-block-id":t,"data-block-class":r,ref:L(n,l),children:[...c.collection].map(m=>jsx(Mp,{state:c,item:m,variant:i.variant},m.key))})});Ep.displayName="TagGroup";var Fp="_1yep5z6kv",Hp=v({defaultClassName:"_1kvz17db _1yep5z6ki _1yep5z6kk",variantClassNames:{showActionsOnTriggerOnly:{true:"_1kvz17dc"},isTriggered:{true:"_1kvz17dd"}},defaultVariants:{},compoundVariants:[]}),Op=v({defaultClassName:"_1kvz17d0 _1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z68c _1yep5z68d _1yep5z68e _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6ki _1yep5z6kj",variantClassNames:{isExpanded:{true:"_1kvz17d1"}},defaultVariants:{},compoundVariants:[]}),Vp="_1yep5z6ev _1yep5z6dy",Ap=v({defaultClassName:"_1kvz17d2 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jr _1yep5z6js _1yep5z6jt _1yep5z6ki _1yep5z6kl",variantClassNames:{isFocusVisible:{true:"_1kvz17d3"},isHovered:{true:"_1yep5z6ft",false:"_1yep5z6fu"},isDisabled:{true:"z9nup83"}},defaultVariants:{},compoundVariants:[]}),jp="_1kvz17da _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6dz",$p=v({defaultClassName:"_1kvz17d7 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it",variantClassNames:{isDisabled:{true:"_1yep5z6ey",false:"_1yep5z6eu"}},defaultVariants:{},compoundVariants:[]});var Za=ao.forwardRef(({children:e,className:o,style:t},r)=>{let{headers:a}=useContext(Ue),{disabledKeys:i}=useContext(Ue),{keyboardProps:n}=useKeyboard({onKeyDown:s=>{let p=jt(s.target),l=[...a?.keys()||[]].findIndex(f=>a?.get(f)?.current===p?.activeElement),c=a?.get(l||0),u=a?.size||0,m=f=>{let y=a.get(f-1<0?u-1:f-1);i?.has(y?.current?.getAttribute("data-key")||"")?m(f-1):y?.current?.focus();},d=f=>{let y=a.get((f+1)%u);i?.has(y?.current?.getAttribute("data-key")||"")?d(f+1):y?.current?.focus();};if(c)switch(s.key){case"Home":{s.preventDefault(),d(-1);break}case"End":{s.preventDefault(),m(u);break}case"ArrowDown":{s.preventDefault(),d(l);break}case"ArrowUp":{s.preventDefault(),m(l);break}default:s.continuePropagation();}}});return jsx("div",{...n,style:t,className:classNames(Fp,o),ref:r,children:ao.Children.map(e,(s,p)=>ao.cloneElement(s,{index:p}))})});Za.displayName="AccordionBase";var Ue=ao.createContext({expandedKeys:new Set,setExpandedKeys:()=>{},disabledKeys:new Set,headers:new Map,expansionMode:"multiple"}),Kp=ao.forwardRef(({children:e,disabledKeys:o,defaultExpandedKeys:t=new Set,expandedKeys:r,expansionMode:a="multiple",onChange:i,className:n,style:s},p)=>{let[l,c]=ao.useState(t),u=ao.useRef(new Map).current,[m,d]=ao.useState(a);useEffect(()=>{d(m);},[m]),useEffect(()=>{i?.(l);},[l,i]);let f=useMemo(()=>({expandedKeys:r||l,setExpandedKeys:r?()=>{}:c,disabledKeys:o,headers:u,expansionMode:m}),[r,l,o,u,m]);return jsx(Ue.Provider,{value:f,children:jsx(FocusScope,{children:jsx(Za,{className:n,style:s,ref:p,children:e})})})});Kp.displayName="Accordion";var Ja=ao.forwardRef(({title:e,actions:o,controlId:t,value:r,id:a,index:i,subLabel:n,showActionsOnTriggerOnly:s},p)=>{let l=ao.useRef(null),{expandedKeys:c,setExpandedKeys:u,expansionMode:m,disabledKeys:d,headers:f}=useContext(Ue),y=d?.has(r),b=useFocusManager();invariant(b);let{focusNext:g,focusPrevious:z}=b,{keyboardProps:_}=useKeyboard({onKeyDown:R=>{R.key==="ArrowRight"?g({wrap:!0}):R.key==="ArrowLeft"?z({wrap:!0}):R.continuePropagation();},isDisabled:y});useEffect(()=>{invariant(typeof i=="number","AccordionItem must have an index"),f?.set(i,l);},[i,f]);let h=()=>{u(R=>{let T=new Set(R);return T.has(r)?T.delete(r):(m==="single"&&T.clear(),T.add(r)),T});},{buttonProps:C}=useButton({"aria-expanded":c.has(r),"aria-controls":t,onPress:h,isDisabled:y},l),{pressProps:x}=usePress({onPress:h,isDisabled:y}),{focusProps:k,isFocusVisible:w}=useFocusRing(),{hoverProps:N,isHovered:P}=useHover({isDisabled:y}),{focusProps:I,isFocusVisible:M}=useFocusRing({within:!0}),S=c.has(r);return jsxs("h3",{...mergeProps(_,x,N,I),className:Ap({isFocusVisible:w,isHovered:P,isDisabled:y}),ref:p,children:[jsxs("div",{className:$p({isDisabled:!!y}),children:[jsx(ChevronRightIcon,{className:Op({isExpanded:S}),size:8}),jsx("button",{...mergeProps(C,k),id:a,"data-key":r,className:jp,ref:l,children:e})]}),o?.length?jsx("div",{"data-testid":"action-buttons",className:Hp({showActionsOnTriggerOnly:s,isTriggered:M||P}),children:o.map((R,T)=>jsx(D,{variant:"secondary",size:"sm",excludeFromTabOrder:!0,isDisabled:y,...R},T))}):null,n?jsx("div",{className:Vp,children:n}):null]})});Ja.displayName="AccordionHeader";var ec=ao.forwardRef(({title:e,actions:o,children:t,value:r,index:a,subLabel:i,style:n,className:s,showActionsOnTriggerOnly:p},l)=>{let c=useId(),u=useId(),{expandedKeys:m}=useContext(Ue),d=ao.useRef(null),f=m.has(r),y=Ae(),b=useReducedMotion(),g=useTransition(f?[r]:[],{from:!y&&!b&&{height:0,opacity:0},enter:()=>async z=>{await z({height:d.current?.scrollHeight,opacity:1});},leave:{height:0,opacity:0},keys:z=>z.toString()});return jsxs(Fragment,{children:[jsx(FocusScope,{children:jsx(Ja,{value:r,actions:o,id:u,title:e,controlId:c,ref:l,index:a,subLabel:i,showActionsOnTriggerOnly:p})}),g(z=>jsx(animated.div,{role:"region","aria-labelledby":u,id:c,style:{...z,overflow:"hidden"},children:jsx("div",{ref:d,className:s,style:n,children:t})}))]})});ec.displayName="AccordionItem";var ut=ao.forwardRef(({variant:e,isOpen:o,selectedIcon:t,validationState:r="valid",valueProps:a,label:i,...n},s)=>{let p=ao.useRef(null),{buttonProps:l,isPressed:c}=useButton({...n,isDisabled:n.isDisabled||n.isReadOnly},p),{hoverProps:u,isHovered:m}=useHover({isDisabled:n.isDisabled}),{focusProps:d,isFocused:f,isFocusVisible:y}=useFocusRing(),b=Ro({isReadOnly:n.isReadOnly,validationState:r});n.isReadOnly&&(l.disabled=!1);let g=filterTruthyValues({"data-disabled":n.isDisabled,"data-readonly":n.isReadOnly,"data-focused":f,"data-focus-visible":y,"data-hovered":m,"data-pressed":c,"data-open":o});return jsxs("button",{...mergeProps(l,u,d,g),ref:L(s,p),className:classNames(Js({isFocused:y,isDisabled:n.isDisabled}),bo({variant:e,isHovered:m,isFocused:y,validationState:r,isDisabled:!!n.isDisabled,isReadOnly:n.isReadOnly}),"BaselineUI-Select-Button"),children:[jsxs("span",{className:ol,children:[t?jsx(t,{size:24}):null,jsx("span",{...a,children:i})]}),b?jsx("span",{"aria-hidden":!0,className:classNames(yo({validationState:r,isReadOnly:!!n.isReadOnly}),el),children:jsx(b,{size:16})}):null,jsx("span",{"aria-hidden":!0,children:jsx(ChevronDownIcon,{size:8,className:Qs({isOpen:o})})})]})});ut.displayName="SelectButton";var xr=ao.createContext({state:null,popoverAnchorRef:null}),ti=ao.forwardRef(({className:e,style:o,labelPosition:t="top",variant:r="primary","data-block-id":a,"data-block-class":i,optionStyle:n,optionClassName:s,placement:p="bottom start",state:l,renderTrigger:c=({buttonProps:d,selectedValue:f,valueProps:y,isOpen:b,ref:g})=>{let z=f&&"icon"in f&&f.icon;return jsx(ut,{...d,isOpen:b,isReadOnly:u.isReadOnly,ref:g,variant:r,validationState:u.validationState,selectedIcon:z||void 0,label:f?"label"in f&&f?.label:u.placeholder,valueProps:y})},...u},m)=>{let{popoverAnchorRef:d}=useContext(xr),f=ao.useRef(null),y=fe(u.portalContainer),{labelProps:b,triggerProps:g,valueProps:z,menuProps:_,descriptionProps:h,errorMessageProps:C}=useSelect({...u,validationState:u.validationState==="error"?"invalid":"valid"},l,f),x=xe({...u,descriptionProps:h,errorMessageProps:C,labelPosition:t}),k=l.selectedItem?.value??null;return jsxs(Je.Provider,{value:l,children:[jsxs("div",{style:o,className:classNames(Oe({labelPosition:t}),"BaselineUI-Select",e),"data-block-id":a,"data-block-class":i,ref:m,children:[u.label||x?jsxs("div",{className:He({labelPosition:t,hasMessage:!!x}),children:[u.label?jsx("div",{...b,className:classNames(Fe,"BaselineUI-Select-Label"),children:u.label}):null,t==="start"&&x]}):null,jsx(HiddenSelect,{state:l,triggerRef:f,isDisabled:u.isDisabled,label:u.label,name:u.name}),c({buttonProps:g,selectedValue:k,valueProps:z,isOpen:l.isOpen,ref:f}),t==="top"&&x]}),l.isOpen?jsx(me,{placement:p,portalContainer:y,offset:2,state:l,triggerRef:d||f,style:o,className:classNames($e,"BaselineUI-Select-Popover"),...u,children:jsx(ae,{..._,label:u.label,items:u.items,showSelectedIcon:u.showSelectedIcon,className:mr,optionStyle:n,optionClassName:s})}):null]})});ti.displayName="SelectCore";var ic=ao.forwardRef((e,o)=>{let t=re(),r=useSelectState({...e,validationState:e.validationState==="error"?"invalid":"valid",children:t});return jsx(ti,{...e,ref:o,state:r})});ic.displayName="SelectStandalone";var Ke=ao.forwardRef((e,o)=>{let{state:t}=useContext(xr);return useEffect(()=>{invariant(t||e.items,"Select: A `state` that can be passed via context or `items` are required.");},[e.items,t]),t?jsx(ti,{state:t,...e,ref:o}):jsx(ic,{...e,ref:o})});Ke.displayName="Select";var sc=ao.forwardRef(({className:e,style:o,variant:t,"data-block-id":r,icon:a,tooltipProps:i,...n},s)=>{let p=ao.useRef(null),l=useCallback(({buttonProps:c,selectedValue:u,valueProps:m,isOpen:d,ref:f})=>{let y=u&&"icon"in u&&u.icon;return jsx(ke,{variant:"inverse",size:"sm",includeArrow:!1,text:n["aria-label"],offset:4,...i,children:jsx(ut,{...c,isOpen:d,isReadOnly:n.isReadOnly,ref:f,variant:t,validationState:n.validationState,selectedIcon:y||void 0,label:u?"label"in u&&u?.label:n.placeholder,valueProps:m})})},[n,i,t]);return jsxs(B,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:classNames("BaselineUI-IconSelect",e),"data-block-id":r,style:o,ref:L(s,p),children:[a?jsx(a,{size:24,className:sprinkles({color:"icon.primary"})}):null,jsx(Ke,{...n,renderTrigger:l})]})});sc.displayName="IconSelect";var lc="_1017q4c5",pc=v({defaultClassName:"_1017q4c0",variantClassNames:{size:{md:"_1017q4c1",sm:"_1017q4c2"},isDisabled:{true:"_1017q4c3"}},defaultVariants:{},compoundVariants:[]}),cc="_1017q4c4";var W6={sm:AvatarIcon,md:AvatarIcon$1},Bo=ao.forwardRef(({className:e,style:o,size:t="md",icon:r=W6[t],name:a,imgSrc:i,showInitials:n,isDisabled:s,hasNotifications:p,imgLoading:l,"data-block-id":c,"data-block-class":u},m)=>{let{imgProps:d}=_o({src:i,alt:a}),f=a?.split(" ").map(y=>y[0]).join("");return jsxs("span",{className:classNames(pc({size:t,isDisabled:s}),"BaselineUI-Avatar",e),"data-disabled":s,ref:m,style:o,"aria-disabled":s,"data-block-id":c,"data-block-class":u,children:[i?jsx("img",{...d,loading:l,className:cc}):null,!n&&!i&&jsx(r,{size:t==="sm"?16:24}),n&&!i?t==="sm"?f[0]:f:null,p?jsx("div",{"data-testid":"notification",className:lc}):null]})});Bo.displayName="Avatar";var dc="_1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z63l _1yep5z63m _1yep5z63n _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it",mc=v({defaultClassName:"_1x62fhb6 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6kx _1yep5z6ky _1yep5z6ki _1yep5z6kl _1yep5z6ev _1yep5z69i _1yep5z69j _1yep5z69k",variantClassNames:{isHovered:{true:"_1yep5z6105"},isSelected:{true:"_1x62fhb8"},isFocusVisible:{true:"_1x62fhb9"},isDisabled:{true:"_1x62fhba _1yep5z6109"},variant:{primary:"_1x62fhbb _1yep5z6z6",ghost:"_1yep5z6z9"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isSelected:!0,isDisabled:!1},"_1yep5z61lg"],[{variant:"primary",isSelected:!0},"_1yep5z61me"],[{variant:"ghost",isSelected:!0,isFocusVisible:!1},"_1x62fhbd"],[{variant:"ghost",isSelected:!0,isDisabled:!1},"_1yep5z61lr"],[{variant:"ghost",isDisabled:!0,isSelected:!0},"_1x62fhbe _1yep5z6ey"],[{variant:"primary",isHovered:!0},"_1yep5z61mf"]]}),uc=v({defaultClassName:"_1x62fhb3 _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6i9 _1yep5z6ia _1yep5z6ib",variantClassNames:{variant:{primary:"_1x62fhb4",ghost:"_1yep5z6ut _1yep5z6uu _1yep5z6uv"}},defaultVariants:{},compoundVariants:[]}),fc="_1x62fhbf",yc="_1yep5z6l2 _1yep5z6kz _1yep5z6hc _1yep5z6l1",bc=v({defaultClassName:"_1x62fhb0 _1yep5z6kv _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib",variantClassNames:{variant:{primary:"_1yep5z6115",ghost:"_1x62fhb2"}},defaultVariants:{},compoundVariants:[]});var gc=({state:e,...o})=>{let t=ao.useRef(null),{tabPanelProps:r}=useTabPanel(o,e,t),{selectedItem:a}=e,{focusProps:i,isFocusVisible:n}=useFocusRing();if(!a?.value)return null;let{className:s,style:p,"data-block-id":l}=a.value;return jsx("div",{...mergeProps(r,i),ref:t,className:classNames({[yc]:n},"Baseline-Tabs-TabPanel",s),"data-block-id":l,style:p,children:a?.props.children})};var ni=ao.forwardRef(({className:e,style:o,tabHeaderStyle:t,tabHeaderClassName:r,variant:a="primary",actions:i,onRemove:n,"data-block-id":s,...p},l)=>{let c=useTabListState({...p,selectedKey:p.selectedValue,defaultSelectedKey:p.defaultSelectedValue,disabledKeys:p.disabledValues}),u=ao.useRef(null),{tabListProps:m}=useTabList({...p,selectedKey:p.selectedValue,defaultSelectedKey:p.defaultSelectedValue,disabledKeys:p.disabledValues},c,u);return jsxs("div",{className:classNames("BaselineUI-Tabs",e),style:o,ref:l,"data-block-id":s,children:[jsxs("div",{className:classNames(bc({variant:a}),r),style:t,children:[jsx("div",{...m,className:uc({variant:a}),ref:u,children:[...c.collection].map(d=>(invariant(d.value,"TabItem requires a value prop"),jsx(_c,{item:d,state:c,onRemove:n,variant:a},d.key)))}),i?.map((d,f)=>jsx("div",{className:dc,children:jsx(D,{...d,variant:"secondary",size:"sm",className:classNames(fc,d.className)})},f))]}),jsx(gc,{state:c},c.selectedItem?.key)]})});ni.displayName="TabsBase";var _c=({item:e,onRemove:o,state:t,variant:r})=>{let{key:a,value:i}=e,n=ao.useRef(null),{tabProps:s,isSelected:p,isDisabled:l}=useTab({key:a},t,n),{hoverProps:c,isHovered:u}=useHover({});invariant(i,"TabButton requires a value prop");let{title:m,icon:d,titleStyle:f,titleClassName:y}=i,{focusProps:b,isFocusVisible:g,isFocused:z}=useFocusRing(),{keyboardProps:_}=useKeyboard({onKeyDown:C=>{C.key==="Backspace"&&o?o(a):C.continuePropagation();}}),h=filterTruthyValues({"data-selected":p,"data-disabled":l,"data-focused":z,"data-hovered":u,"data-focus-visible":g});return jsxs("div",{...mergeProps(_,s,c,b,h),className:classNames(mc({isHovered:u,isSelected:p,isFocusVisible:g,isDisabled:l,variant:r}),"BaselineUI-Tabs-TabButton",y),style:f,ref:n,children:[d?jsx(d,{size:20}):null,m,o?jsx(D,{variant:"secondary",elementType:"div",icon:XIcon$1,size:"xxs",onPress:()=>{o(a);},excludeFromTabOrder:!0,UNSAFE_NON_INTERACTIVE:!0,style:{display:"inline-flex",color:"inherit",opacity:p||z||u?1:0}}):null]})};_c.displayName="TabButton";var hc=ao.forwardRef(({children:e,...o},t)=>{let r=useMemo(()=>ao.Children.map(e,a=>!a||!ao.isValidElement(a)||typeof a.type=="string"?null:{...a.props,id:a.props.value}).filter(Boolean),[e]);return jsx(ni,{...o,ref:t,items:r,children:a=>jsx(Item,{title:a.title,children:a.children},a.key)})});hc.displayName="Tabs";var xc=({children:e,title:o,value:t})=>(invariant(t,"TabItem requires a value prop"),invariant(o,"TabItem requires a title prop"),invariant(e,"TabItem requires children"),e);xc.displayName="TabItem";var Cc={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 Pc=v({defaultClassName:"kfun6yw",variantClassNames:{arrangement:{single:"kfun6yx",multi:"kfun6yy",compact:"kfun6yz"}},defaultVariants:{},compoundVariants:[]}),kc=v({defaultClassName:"kfun6y0 z9nup82",variantClassNames:{variant:{info:"kfun6y1",warning:"kfun6y2",error:"kfun6y3",success:"kfun6y4"},arrangement:{single:"kfun6y5",multi:"kfun6y6",compact:"kfun6y7"},hasButton:{true:"kfun6y8"},hasCloseButton:{true:"kfun6y9"}},defaultVariants:{},compoundVariants:[[{hasButton:!1,arrangement:"single"},"kfun6ya"],[{hasButton:!0,arrangement:"compact"},"kfun6yb"],[{hasCloseButton:!0,arrangement:"compact"},"kfun6yc"]]}),wc=v({defaultClassName:"kfun6yt",variantClassNames:{size:{sm:"kfun6yu",md:"kfun6yv"}},defaultVariants:{},compoundVariants:[]}),Rc=v({defaultClassName:"kfun6yp",variantClassNames:{arrangement:{single:"kfun6yq",multi:"kfun6yr",compact:"kfun6ys"}},defaultVariants:{},compoundVariants:[]}),Ic=v({defaultClassName:"kfun6yk",variantClassNames:{variant:{info:"kfun6yl",warning:"kfun6ym",error:"kfun6yn",success:"kfun6yo"}},defaultVariants:{},compoundVariants:[]}),Tc=v({defaultClassName:"kfun6yh",variantClassNames:{size:{sm:"kfun6yi",md:"kfun6yj"}},defaultVariants:{},compoundVariants:[]}),Nc=v({defaultClassName:"kfun6yd z9nup82",variantClassNames:{arrangement:{single:"kfun6ye",multi:"kfun6yf",compact:"kfun6yg"}},defaultVariants:{},compoundVariants:[]});var k5={error:{sm:ErrorAltFilledIcon,md:ErrorAltFilledIcon$1},info:{sm:InfoFilledIcon,md:InfoFilledIcon$1},success:{sm:CheckFilledIcon,md:CheckFilledIcon$1},warning:{sm:WarningFilledIcon,md:WarningFilledIcon$1}},Sc=ao.forwardRef(({className:e,description:o,actionLabel:t,onAction:r,style:a,variant:i="info",title:n,arrangement:s="single",onClose:p,size:l="sm","data-block-id":c,"data-block-class":u},m)=>{let d=F(Cc),f=t&&jsx(j,{variant:s==="compact"?"tertiary":"ghost",label:t,onPress:r}),y=k5[i][l];return jsxs("div",{className:classNames(kc({variant:i,arrangement:s,hasButton:!!t||!!p,hasCloseButton:!!p}),"BaselineUI-InlineAlert",e),"data-block-id":c,"data-block-class":u,style:a,role:"alert",ref:m,children:[jsxs("div",{className:Nc({arrangement:s}),children:[jsx(y,{className:Ic({variant:i}),size:16}),jsxs("div",{className:Pc({arrangement:s}),children:[jsx("h3",{className:Tc({size:l}),children:n}),jsx("section",{className:wc({size:l}),children:o})]}),s==="compact"&&f]}),jsxs("div",{className:Rc({arrangement:s}),children:[s!=="compact"&&f,p?jsx(D,{variant:"secondary",icon:CloseIcon,size:"sm",onPress:p,"aria-label":d.formatMessage("close")}):null]})]})});Sc.displayName="InlineAlert";var Ge={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 wr=({children:e})=>{let{triggerProps:o}=ao.useContext(je);return jsx(PressResponder,{...o,children:e})};wr.displayName="ModalTrigger";var L5=({children:e})=>{let{state:o}=ao.useContext(je);return jsx(PressResponder,{onPress:()=>{o?.close();},children:e})};var Lc="_1dbkl53 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6kv",Mc="_1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jr _1yep5z6js _1yep5z6jt",Bc="_1dbkl5e",Dc=v({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 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6l6 _1yep5z6ky _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6eu _1yep5z6kx _1yep5z6dy",variantClassNames:{isHovered:{true:"_1dbkl55"},isFocusVisible:{true:"_1dbkl56"},isDisabled:{true:"z9nup83 _1yep5z6109"},labelPosition:{top:"_1dbkl58",start:"_1dbkl59"}},defaultVariants:{},compoundVariants:[]}),Ec=v({defaultClassName:"_1dbkl50 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6dy _1yep5z6ev",variantClassNames:{labelPosition:{top:"_1yep5z6nq _1yep5z6nr _1yep5z6ns",start:"_1dbkl52"}},defaultVariants:{},compoundVariants:[]}),Rr="_1dbkl5l _1yep5z6i6 _1yep5z6i7 _1yep5z6i8 _1yep5z69f _1yep5z69g _1yep5z69h",Fc="_1dbkl5f z9nup87",Ir="_1dbkl5m _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6hl _1yep5z6hm _1yep5z6hn",Hc="_1dbkl5k _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ky",Oc="_1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6jr _1yep5z6js _1yep5z6jt _1yep5z6dy _1yep5z6ev _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6ir _1yep5z6is _1yep5z6it",Tr=v({defaultClassName:"_1dbkl5h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6fs",variantClassNames:{includesCustomColorPicker:{true:"_1yep5z6me _1yep5z6mf _1yep5z6mg"}},defaultVariants:{},compoundVariants:[]}),pi="_1dbkl5v _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib",Vc=v({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 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6l7 _1yep5z6gq _1yep5z6ky _1yep5z6eu _1yep5z6dy",variantClassNames:{isFocused:{true:"_1dbkl5r _1yep5z611y"},isHovered:{true:"_1dbkl5s"},allowAlpha:{false:"_1yep5z6wh _1yep5z6wi _1yep5z6wj _1yep5z6xt _1yep5z6xu _1yep5z6xv _1yep5z6166"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,isFocused:!1},"_1yep5z61nd"]]}),Ac=v({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 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ic _1yep5z6id _1yep5z6ie _1yep5z69c _1yep5z69d _1yep5z69e _1yep5z6f0 _1yep5z6kx _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6ki _1yep5z6kl",variantClassNames:{isHovered:{true:"_1yep5z6115"},isFocusVisible:{true:"_1yep5z616c _1yep5z616a _1yep5z616d _1yep5z612n"},isDisabled:{true:"_1yep5z610d"}},defaultVariants:{},compoundVariants:[]}),bt="_1dbkl5u",Nr="_1dbkl5g _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7",Sr="_1dbkl5j _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ic _1yep5z6id _1yep5z6ie _1yep5z69f _1yep5z69g _1yep5z69h",ci="_1dbkl5x",jc="_1dbkl5w",di="_1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ic _1yep5z6id _1yep5z6ie _1yep5z69l _1yep5z69m _1yep5z69n",Lr=v({defaultClassName:"_1dbkl5n _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6l2 _1yep5z6ho _1yep5z6hp _1yep5z6hq _1yep5z6l7 _1yep5z6la",variantClassNames:{isFocusVisible:{true:"_1dbkl5o _1yep5z616a _1yep5z612n _1yep5z616c"}},defaultVariants:{},compoundVariants:[]}),mi="z9nup84 z9nup86 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6ko _1yep5z6kp _1yep5z6kr _1yep5z6kq _1yep5z6ho _1yep5z6hp _1yep5z6hq";var $c=v({defaultClassName:"_1344e9q0 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6hl _1yep5z6hm _1yep5z6hn _1yep5z6ks _1yep5z6hk _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jl _1yep5z6jm _1yep5z6jn",variantClassNames:{isFocusVisible:{true:"_1344e9q1"},isDisabled:{true:"_1344e9q2"},removeBlendMode:{true:"_1344e9q3"},isSelected:{true:"_1yep5z616c _1yep5z616a _1yep5z612n _1yep5z616f"},isHovered:{true:"_1344e9q5"}},defaultVariants:{},compoundVariants:[[{isSelected:!1,isFocusVisible:!0},"_1344e9q6"],[{isSelected:!0,isFocusVisible:!0},"_1344e9q7 _1yep5z61rn _1yep5z61rl _1yep5z61ny _1yep5z61rq"],[{isSelected:!0,isDisabled:!0},"_1yep5z61rn _1yep5z61rl _1yep5z61ny _1yep5z61rq _1yep5z61o5"],[{isHovered:!0,isSelected:!1},"_1yep5z61rq _1yep5z61rn _1yep5z61rl _1yep5z61o2"]]});var We=ao.forwardRef(({color:e,isFocusVisible:o,isSelected:t,isInteractive:r,isDisabled:a,style:i,className:n,id:s,"data-block-id":p,"data-block-class":l,...c},u)=>{let m=e&&e!==we&&(typeof e=="string"?parseColor(e):e),{formatMessage:d}=F(),f=!m,{colorSwatchProps:y}=useColorSwatch({color:f?"#000000":e}),{hoverProps:b,isHovered:g}=useHover({isDisabled:a||!r}),z=filterTruthyValues({"data-focus-visible":o,"data-selected":t,"data-hovered":g,"data-block-id":p,"data-block-class":l,"data-disabled":a,"data-interactive":r});return jsx("div",{...mergeProps(b,z,f?{}:y),style:i,"aria-label":f?d(j5.none):y["aria-label"],role:"img",className:classNames($c({removeBlendMode:f,isFocusVisible:o,isDisabled:!!a,isSelected:!!t,isHovered:g}),"BaselineUI-ColorSwatch",n),ref:u,id:s,...c,children:jsx(B,{display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"full",height:"full",width:"full",opacity:a?"medium":void 0,style:m?Uc(m,4):void 0,children:f?jsx(NoneIcon,{size:14}):null})})});We.displayName="ColorSwatch";var j5=$({none:{id:"none",defaultMessage:"None"}});var Kc=[{id:"hex",label:"HEX"},{id:"rgb",label:"RGB"}],Do=parseColor("#000000").toFormat("hsla"),ee="hsla",gt="hexa";function oo(e){return typeof e=="string"?parseColor(e).toFormat(ee):e?e.toFormat(ee):null}function Gc(e,o){return e?.getChannelValue("alpha")?o?.toString(gt)===e.toString(gt):!o?.getChannelValue("alpha")}function Wc(e,o,t){return o?.label?o.label:e?.getChannelValue("alpha")===0?t:e?.toString("rgba")}var we="NONE";function Xc(e,o){let t=o?.map(a=>({id:parseColor(a.color).toString(gt),label:a.label}))||[],r={id:we,label:e};return [...t,r]}var Mr=(e,{optionProps:o,isFocusVisible:t,isSelected:r},a)=>(invariant(e.value&&"label"in e.value,"Item must have label"),jsx("li",{...o,ref:a,className:Hc,children:jsx(We,{color:e.value.id,isFocusVisible:t,isSelected:r,"aria-label":e.value.label,isInteractive:!0})})),Uc=(e,o=4)=>{let t=e.getChannelValue("alpha")===0,r=`repeating-conic-gradient(transparent 0% 25%, ${themeVars.color.background.secondary.medium} 25% 50%)`;return {backgroundImage:t?r:`linear-gradient(${e.toString("hexa")}, ${e.toString("hexa")}), ${r}`,backgroundSize:`${o}px ${o}px`}};var Zc=({value:e,...o})=>{let t=ao.useRef(null),r=ao.useRef(null),a=ao.useRef(null),i=useColorAreaState({...o,value:e}),{colorAreaProps:n,xInputProps:s,yInputProps:p,thumbProps:l}=useColorArea({...o,value:e,inputXRef:t,inputYRef:r,containerRef:a},i);useEffect(()=>{t.current?.focus();},[]);let{focusProps:c,isFocusVisible:u}=useFocusRing();return jsx("div",{ref:a,...n,className:classNames(Lc,"BaselineUI-ColorInput-ColorArea"),children:jsxs("div",{...l,className:classNames(Lr({isFocusVisible:u}),"BaselineUI-ColorInput-ColorAreaThumb"),style:{...l.style,transform:"translate(-50%, -50%)",backgroundColor:oo(e)?.withChannelValue("alpha",1).toString("css")},children:[jsx("input",{ref:t,...s,...c}),jsx("input",{ref:r,...p,...c})]})})};var ed=({color:e,setColor:o,allowAlpha:t,...r})=>{let a=useColorFieldState({value:e,onChange:u=>{o(oo(u)?.toFormat(ee).withChannelValue("alpha",e.getChannelValue("alpha")??1)||Do);}}),i=ao.useRef(null),{inputProps:n}=useColorField({...r,"aria-label":"Hex"},a,i),{focusProps:s,isFocused:p}=useFocusRing({isTextInput:!0}),{hoverProps:l,isHovered:c}=useHover({});return jsxs("div",{className:classNames(pi,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":t?"hexa":"hex",children:[jsx("input",{...mergeProps(n,s,l),ref:i,className:Vc({isFocused:p,isHovered:c,allowAlpha:t})}),t?jsx(td,{color:e,setColor:o}):null]})},od=({color:e,setColor:o,allowAlpha:t})=>{let r=e.toFormat("rgba"),{locale:a}=useLocale();return jsxs("div",{className:classNames(pi,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":t?"rgba":"rgb",children:[jsx(Le,{"aria-label":e.getChannelName("red",a),value:r.getChannelValue("red"),showStepper:!1,className:bt,onChange:i=>{o(r.withChannelValue("red",i).toFormat(ee));},step:1,minValue:0,maxValue:255}),jsx(Le,{"aria-label":e.getChannelName("green",a),value:r.getChannelValue("green"),showStepper:!1,className:bt,onChange:i=>{o(r.withChannelValue("green",i).toFormat(ee));},step:1,minValue:0,maxValue:255}),jsx(Le,{"aria-label":e.getChannelName("blue",a),value:r.getChannelValue("blue"),showStepper:!1,className:bt,onChange:i=>{o(r.withChannelValue("blue",i).toFormat(ee));},step:1,minValue:0,maxValue:255}),t?jsx(td,{color:e,setColor:o}):null]})},rz={style:"percent",maximumFractionDigits:0},td=({color:e,setColor:o})=>{let{locale:t}=useLocale(),r=useCallback(a=>{o(e.withChannelValue("alpha",a));},[e,o]);return jsx(Le,{"aria-label":e.getChannelName("alpha",t),value:e.getChannelValue("alpha"),formatOptions:rz,className:bt,showStepper:!1,onChange:r,minValue:0,maxValue:1})};var gi=({channel:e,...o})=>{let{locale:t}=useLocale(),r=useColorSliderState({...o,channel:e,locale:t}),a=ao.useRef(null),i=ao.useRef(null),{trackProps:n,thumbProps:s,inputProps:p}=useColorSlider({...o,channel:e,trackRef:a,inputRef:i,"aria-label":r.value.getChannelName(e,t)},r),{focusProps:l,isFocusVisible:c}=useFocusRing();return jsxs("div",{className:classNames(Ir,{[os({size:"xs"})]:e==="alpha"},"BaselineUI-ColorInput-ColorSlider"),"data-channel":e,...n,ref:a,children:[e==="alpha"&&jsx("div",{className:mi}),jsx("div",{className:Ir,style:n.style}),jsxs("div",{className:classNames(Lr({isFocusVisible:c}),"BaselineUI-ColorInput-ColorSliderThumb"),...s,children:[jsx("div",{className:mi,style:{backgroundColor:"#ffffff"}}),jsx("div",{style:{backgroundColor:r.getDisplayColor().toString("css"),height:8},className:Ir}),jsx(VisuallyHidden,{children:jsx("input",{ref:i,...p,...l})})]})]})};var Br=({color:e,setColor:o,allowAlpha:t})=>{let[r,a]=ao.useState("hex"),{formatMessage:i}=F(Ge);return jsxs(Fragment,{children:[jsx(Zc,{value:e,xChannel:"saturation",yChannel:"lightness",onChange:o}),jsxs("div",{className:di,children:[jsx(gi,{channel:"hue",value:e,onChange:o}),t?jsx(gi,{channel:"alpha",value:e,onChange:o}):null]}),jsxs("div",{className:classNames(di,sprinkles.variants({paddingTop:"none",gap:"sm"})),children:[jsx(Ke,{label:i("colorFormat"),labelPosition:"start",variant:"ghost",items:Kc,selectedKey:r,onSelectionChange:n=>{a(n);}}),r==="hex"&&jsx(ed,{color:e,setColor:o,allowAlpha:t}),r==="rgb"&&jsx(od,{color:e,setColor:o,allowAlpha:t})]})]})};var zi=({color:e,setColor:o,storePickedColorKey:t,addColorButtonLabel:r,removeColorButtonLabel:a,customColorsLabel:i,pickerMode:n,allowAlpha:s})=>{let{locale:p}=useLocale(),{formatMessage:l}=F(Ge),c=ao.useRef(null),u=zo(c.current),[m,d]=ws(t,[]),f=ao.useRef(null),[y,b]=ao.useState(e),g=ao.useMemo(()=>m.map(k=>({id:k,label:parseColor(k).getColorName(p),description:k})),[m,p]),z=useCallback(()=>{let k=n==="active"?e:y;if(m.includes(k.toString(ee))){f.current?.querySelector(`[data-key='${k.toString(ee)}']`)?.classList.add(ci);return}d([...m,k.toString(ee)]);},[m,e,d,y,n]);useEffect(()=>{let k=f.current;function w(N){N.animationName===jc&&N.target?.classList.remove(ci);}return k?.addEventListener("animationend",w),()=>{k?.removeEventListener("animationend",w);}},[]);let _=useId(),h=jsx(D,{ref:c,variant:"secondary",size:"md","aria-label":r,icon:PlusIcon$1,onPress:n==="active"?z:void 0}),C=useCallback(k=>jsxs(le,{size:"content",className:Tr({includesCustomColorPicker:!0}),style:{paddingBlockEnd:0},"aria-label":l("newColor"),children:[jsx(Br,{color:y,setColor:b,allowAlpha:s}),jsx(V,{}),jsx(B,{padding:"lg",display:"flex",flexDirection:"row-reverse",children:jsxs(B,{display:"inline-flex",gap:"lg",children:[jsx(j,{label:l("cancel"),size:"sm",variant:"secondary",onPress:k}),jsx(j,{label:l("add"),variant:"primary",onPress:()=>{z(),k();},size:"sm"})]})})]}),[y,z,l,s]),x=useCallback(k=>{invariant(k instanceof Set,"Key must be a set");let w=[...k][0];w&&o(parseColor(w).toFormat(ee));},[o]);return jsxs(Fragment,{children:[jsx(V,{}),jsxs("div",{className:classNames(Oc,"BaselineUI-ColorInput-CustomColors"),children:[jsx("span",{id:_,children:i}),jsxs(B,{display:"flex",children:[!!m.length&&m.includes(e.toString(ee))&&jsx(D,{variant:"secondary",size:"md",elementType:"div",icon:MinusIcon$2,"aria-label":a,onPress:()=>{d(m.filter(k=>k!==e.toString(ee)));}}),n==="active"&&h,n==="lazy"&&(u==="mobile"?jsxs(Ce,{children:[jsx(wr,{children:h}),jsx(Me,{style:{zIndex:1e5},children:({close:k})=>C(k)})]}):jsxs(Ne,{type:"dialog",children:[jsx(Se,{children:h}),jsx(Pe,{placement:"right top",className:Nr,offset:6,children:({close:k})=>C(k)})]}))]})]}),!!m.length&&jsx(ae,{items:g,layout:"grid","aria-labelledby":_,className:classNames(Rr,Sr,sprinkles.variants({paddingTop:"xs"}),"BaselineUI-ColorInput-CustomColorsListBox"),renderOption:Mr,ref:f,autoFocus:!1,selectionMode:"single",selectedKeys:[e.toString(ee)],onSelectionChange:x})]})};var hi=ao.forwardRef(({setColor:e,color:o,triggerRef:t,autoFocus:r,presets:a,state:i},n)=>{let{formatMessage:s}=F(Ge),p=useCallback(l=>{if(l instanceof Set&&l.size){let c=[...l][0],u=a.find(m=>m.id===c);invariant(u,"Preset not found"),e(u.id===we?null:parseColor(u.id).toFormat(ee)),i.close();}},[i,a,e]);return jsx("div",{className:classNames(Sr,"BaselineUI-ColorInput-Presets"),style:{minWidth:t.current?.offsetWidth},ref:n,children:jsx(ae,{autoFocus:r,items:a,layout:"grid","aria-label":s("colorPresets"),className:Rr,renderOption:Mr,selectionMode:"single",selectedKeys:[o?.toString(gt)||we],onSelectionChange:p})})});hi.displayName="ColorPresetList";var _t=ao.forwardRef(({color:e,colorLabel:o,colorName:t,...r},a)=>{let i=ao.useRef(null),{hoverProps:n,isHovered:s}=useHover({isDisabled:r.isDisabled}),{buttonProps:p,isPressed:l}=useButton(r,i),{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":l});return jsxs("button",{...mergeProps(p,n,u,m),style:r.style,className:classNames(Dc({isHovered:s,isFocusVisible:c||r.isOpen,isDisabled:r.isDisabled,labelPosition:r.labelPosition}),"BaselineUI-ColorInputButton",r.className),ref:L(a,i),children:[jsx(We,{color:e?.toString("hexa")}),o?jsx("div",{className:Fc,children:t}):jsx(VisuallyHidden,{children:t})]})});_t.displayName="ColorInputButton";var Fr=ao.forwardRef(({className:e,style:o,icon:t,...r},a)=>{let i=ao.useRef(null),{hoverProps:n,isHovered:s}=useHover({isDisabled:r.isDisabled}),{buttonProps:p,isPressed:l}=useButton(r,i),{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":l});return jsxs("button",{...mergeProps(p,n,u,m),ref:L(a,i),style:o,className:classNames(Ac({isHovered:s||l||r.isOpen,isFocusVisible:c,isDisabled:r.isDisabled}),"BaselineUI-IconColorInputButton",e),children:[jsx(t,{size:16}),jsx("div",{className:Bc,style:{backgroundColor:r.color||void 0}})]})});Fr.displayName="IconColorInputButton";function gd({colorLabel:e,color:o,presets:t}){let{formatMessage:r}=F(),{locale:a}=useLocale(),i=useMemo(()=>t.find(p=>p.id===we?!o:o?Gc(o,parseColor(p.id)):!1),[t,o]),n=useMemo(()=>typeof e=="function"?e?.(o):e?Wc(o,i,r(Tz.transparent)):!1,[o,e,r,i]),s=useMemo(()=>{if(i?.label)return i.label;o?.getColorName(a);},[o,a,i?.label]);return {colorName:n,humanReadableName:s}}var Tz=$({transparent:{defaultMessage:"Transparent",id:"transparent"}});var Ho=ao.forwardRef(({className:e,style:o,allowRemoval:t,allowAlpha:r=!0,presets:a,labelPosition:i="top",colorLabel:n=!0,includePicker:s=!0,onChange:p,defaultValue:l,storePickedColorKey:c="baselinePickedColor",value:u,addColorButtonLabel:m,removeColorButtonLabel:d,customColorsLabel:f,renderTriggerButton:y=({isOpen:k,color:w,ref:N,colorName:P,triggerProps:I,labelId:M})=>jsx(_t,{...mergeProps(I,{...C.label?{"aria-labelledby":M}:{"aria-label":C["aria-label"]}}),ref:N,isOpen:k,isDisabled:C.isDisabled,labelPosition:i,color:w,colorLabel:n,colorName:P}),pickerMode:b="active",offset:g=2,placement:z=i==="start"?"bottom end":"bottom start","data-block-id":_,"data-block-class":h,...C},x)=>{let k=ao.useRef(null),w=ao.useRef(null),N=useOverlayTriggerState(C),{triggerProps:P,overlayProps:I}=useOverlayTrigger({type:"listbox"},N,k),M=fe(C.portalContainer),[S,R]=useControlledState(u===void 0?void 0:oo(u),oo(l),A=>p?.(A?.toFormat("rgba")||null)),{formatMessage:T}=F(Ge),H=useMemo(()=>Xc(T(Hr.noColor),a),[a,T]),O=useId(),{colorName:U}=gd({colorLabel:n,color:S,presets:H}),ie=useMemo(()=>H.filter(A=>t||A.id!==we),[H,t]),Y=m||T(Hr.addColor),Z=d||T(Hr.removeColor),ce=f||T(Hr.customColors);return jsxs(Fragment,{children:[jsxs("div",{className:classNames({[Mc]:i==="start"},"BaselineUI-ColorInput-Trigger",e),"data-block-id":_,"data-block-class":h,style:o,ref:x,children:[C.label?jsx("label",{id:O,className:Ec({labelPosition:i}),children:C.label}):null,y({isOpen:N.isOpen,color:S,ref:k,colorName:U,triggerProps:P,labelId:O})]}),N.isOpen?jsx(me,{...C,portalContainer:M,placement:z,state:N,offset:g,className:classNames(Nr,"BaselineUI-ColorInput-Popover"),triggerRef:k,overlayProps:I,children:jsxs(le,{size:"content",className:Tr({includesCustomColorPicker:s}),ref:w,"aria-labelledby":O,"aria-label":C["aria-label"],children:[s&&b==="active"?jsxs(Fragment,{children:[jsx(Br,{color:S||Do,setColor:R,allowAlpha:r}),jsx(zi,{color:S||Do,setColor:R,storePickedColorKey:c,addColorButtonLabel:Y,removeColorButtonLabel:Z,customColorsLabel:ce,pickerMode:b,allowAlpha:r})]}):null,!!ie.length&&jsxs(Fragment,{children:[s&&b==="active"?jsx(V,{}):null,jsx(hi,{autoFocus:s&&b==="active"?!1:"first",state:N,triggerRef:k,presets:ie,color:S,setColor:R})]}),s&&b==="lazy"?jsx(zi,{color:S||Do,setColor:R,storePickedColorKey:c,addColorButtonLabel:Y,removeColorButtonLabel:Z,customColorsLabel:ce,pickerMode:b,allowAlpha:r}):null]})}):null]})});Ho.displayName="ColorInput";var Hr=$({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 hd=ao.forwardRef(({className:e,style:o,icon:t,variant:r="standard","data-block-id":a,tooltipProps:i,...n},s)=>{let p=ao.useRef(null),l=useCallback(({isOpen:c,color:u,ref:m,colorName:d,triggerProps:f})=>jsx(ke,{variant:"inverse",size:"sm",includeArrow:!1,text:n["aria-label"],placement:"bottom start",offset:4,...i,children:r==="standard"?jsx(_t,{...f,"aria-label":n["aria-label"],ref:m,isOpen:c,isDisabled:n.isDisabled,color:u,colorLabel:!1,colorName:d}):jsx(Fr,{...f,isOpen:c,icon:TextIcon,color:u?.toString("hexa"),ref:m,isDisabled:n.isDisabled,"aria-label":n["aria-label"]})}),[n,i,r]);return jsxs(B,{display:"flex",flexDirection:"row",gap:"md",paddingX:r==="standard"?"md":"none",alignItems:"center",className:classNames("BaselineUI-IconColorInput",e),"data-block-id":a,style:o,ref:L(s,p),children:[r==="standard"&&t?jsx(t,{size:24,className:sprinkles({color:"icon.primary"})}):null,jsx(Ho,{...n,colorLabel:!1,renderTriggerButton:l})]})});hd.displayName="IconColorInput";var xd={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 Or=v({defaultClassName:"mnnh5s1 _1yep5z6hl _1yep5z6hm _1yep5z6hn _1yep5z6ki _1yep5z6kl _1yep5z6kx _1yep5z6kw _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6kv",variantClassNames:{isInline:{true:"mnnh5s2 _1yep5z6vw _1yep5z6vx _1yep5z6vy _1yep5z6wk _1yep5z6wl _1yep5z6wm _1yep5z6x8 _1yep5z6x9 _1yep5z6xa _1yep5z6xw _1yep5z6xx _1yep5z6xy _1yep5z6122 _1yep5z616j _1yep5z616k",false:"_1yep5z6166 _1yep5z6116"},isHovered:{true:"mnnh5s4"},hasLoadedImage:{true:"_1yep5z6115"},includeCheckeredBackground:{true:"mnnh5s6"},showFocusRing:{true:"_1yep5z6126 _1yep5z616c _1yep5z616a _1yep5z612n _1yep5z616d"},isDisabled:{true:"mnnh5s8 _1yep5z6yl"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,hasLoadedImage:!1},"_1yep5z61mo"],[{isHovered:!0,hasLoadedImage:!0},"mnnh5s9"],[{isInline:!0,isDisabled:!0},"_1yep5z61nd"],[{hasLoadedImage:!0,includeCheckeredBackground:!0},"_1yep5z61mg"]]}),Cd="_1yep5z6d8",Vr=v({defaultClassName:"mnnh5sa",variantClassNames:{isInline:{true:"mnnh5sb",false:"mnnh5sc"},isDisabled:{true:"mnnh5sd"},hasLoadedImage:{true:"mnnh5s0"}},defaultVariants:{},compoundVariants:[]});var Pd=v({defaultClassName:"_1i0ytqa3 _1yep5z6hl _1yep5z6hm _1yep5z6hn _1yep5z6kv _1yep5z6kw _1yep5z6ky",variantClassNames:{isFocusVisible:{true:"_1i0ytqa4"},isInline:{true:"_1yep5z611e",false:"_1yep5z611g"},isDisabled:{true:"_1i0ytqa7 _1yep5z6yl",false:"_1i0ytqa8"}},defaultVariants:{},compoundVariants:[[{isInline:!0,isFocusVisible:!0},"_1i0ytqa9 _1yep5z61n9 _1yep5z61rt _1yep5z61rv"],[{isInline:!1,isFocusVisible:!0},"_1i0ytqaa"],[{isInline:!0,isDisabled:!0},"_1yep5z61mp"],[{isInline:!1,isDisabled:!0},"_1yep5z61mr"]]}),kd="_1i0ytqa0",Ar=v({defaultClassName:"_1i0ytqab _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6kv",variantClassNames:{isInline:{false:"_1yep5z6115"},isDisabled:{true:"_1i0ytqad _1yep5z6yl"}},defaultVariants:{},compoundVariants:[]}),wd=v({defaultClassName:"_1i0ytqa1 _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6jr _1yep5z6js _1yep5z6jt _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6kv",variantClassNames:{isInline:{false:"_1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b"}},defaultVariants:{},compoundVariants:[]});var Jz={size:1,thinning:0,smoothing:0,streamline:0,easing:e=>e,start:{taper:0,easing:e=>e,cap:!0},end:{taper:0,easing:e=>e,cap:!0},simulatePressure:!1},Td=ao.forwardRef(({className:e,style:o,canvasClassName:t,canvasStyle:r,isBound:a=!0,strokeWidth:i=2,strokeColor:n="#3A87FD",onChange:s,defaultValue:p,onChangeEnd:l,enableHistory:c=!1,isInline:u=!0,isDisabled:m,placeholder:d,clearLabel:f,undoLabel:y,redoLabel:b,footerClassName:g,canvasRef:z,value:_,footerStyle:h,"data-block-id":C,"data-block-class":x,"aria-label":k="Drawing canvas",description:w="This is a canvas for drawing using a mouse or touch input.",...N},P)=>{let I=F(xd),M=ao.useRef(null),[S,R]=ao.useState(_?Ri(_):p?Ri(p):[]),T=ao.useMemo(()=>({...Jz,...N}),[N]),[H,O]=ao.useState(),U=useId(),{labelProps:ie,fieldProps:Y}=useLabel({...N,"aria-label":k,labelElementType:"span"}),{isFocusVisible:Z,focusProps:ce}=useFocusRing({within:!0}),{hoverProps:A,isHovered:G}=useHover({isDisabled:m}),{undo:ue,redo:Re,canRedo:ze,canUndo:he,push:ge}=hs(S,{onAction:E=>{E&&(R(E),l?.(E.map(q=>getStroke(q,T))));},isDisabled:!c}),{keyboardProps:Ee}=useKeyboard({onKeyDown:E=>{E.key==="Backspace"?At():E.key==="z"&&(E.metaKey||E.ctrlKey)&&(E.shiftKey?ze&&Re():he&&ue());}}),[Q,se]=useState(!1),Xo=useCallback(E=>{let q=E.currentTarget.getBoundingClientRect();O(q),E.target.setPointerCapture(E.pointerId);let te={x:E.clientX-q.x,y:E.clientY-q.y,pressure:E.pressure};R(W=>[...W,[te]]),se(!0);},[]),Qe=useCallback(E=>{if(E.buttons!==1||!H)return;let te=Ld(E.nativeEvent).map(W=>({x:a?clamp(W.clientX-H.left,0,H.width):W.clientX-H.left,y:a?clamp(W.clientY-H.top,0,H.height):W.clientY-H.top,pressure:W.pressure}));R(W=>{let Ie=[...W];return Ie[W.length-1]=[...Ie[W.length-1],...te],Ie});},[H,a]),la=useCallback(()=>{H&&(l?.(S.map(E=>getStroke(E,T))),ge(S),se(!1));},[H,l,S,ge,T]),Vt=Ae();useGranularEffect(()=>{Vt||s?.(S.map(E=>getStroke(E,T)));},[S],[s,T,Vt]);let At=()=>{R([]),s?.([]),ge([]);};return jsxs("div",{ref:L(M,P),className:classNames(kd,"BaselineUI-FreehandCanvas",e),style:o,"aria-disabled":m,"data-block-id":C,"data-block-class":x,children:[N.label||c?jsxs("div",{className:wd({isInline:u}),children:[N.label?jsx(X,{type:"label",size:"sm",...ie,children:N.label}):jsx("span",{}),c?jsxs("div",{children:[jsx(D,{variant:"secondary",size:"sm",isDisabled:!he||m,icon:UndoIcon,onPress:ue,"aria-label":y||I.formatMessage("undo")}),jsx(D,{variant:"secondary",size:"sm",isDisabled:!ze||m,icon:RedoIcon,onPress:Re,"aria-label":b||I.formatMessage("redo")})]}):null]}):null,jsxs("div",{role:"application",...mergeProps(ce,Ee,A,Y),tabIndex:m?void 0:0,className:classNames(Or({isInline:u,isHovered:G}),Pd({isFocusVisible:Z,isInline:u,isDisabled:!!m}),t),"aria-describedby":N["aria-describedby"]||U,style:r,ref:z,children:[jsx(VisuallyHidden,{children:jsx("div",{id:U,children:w})}),jsx("svg",{width:r?.width||"100%",height:r?.height||"100%",onPointerDown:Xo,onPointerMove:Qe,onPointerUp:la,children:(_?Ri(_):S).map((E,q,te)=>q<te.length-1||!Q?jsx(Nd,{points:E,options:T,strokeColor:n,strokeWidth:i},q):jsx(Sd,{points:E,options:T,strokeColor:n,strokeWidth:i},q))})]}),d||f?jsx("div",{style:h,className:classNames(Ar({isInline:u,isDisabled:m}),g),children:(S.length||!d)&&f?jsx(j,{size:"sm",variant:"ghost",label:f,isDisabled:m,onPress:At}):jsx(j,{size:"sm",variant:"ghost",label:d,isDisabled:!0})}):null]})});Td.displayName="FreehandCanvas";var Nd=ao.memo(({points:e,options:o,strokeColor:t,strokeWidth:r})=>{let a=useMemo(()=>getSvgPathFromStroke(getStroke(e,o)),[e,o]);return jsx("path",{d:a,stroke:t,strokeWidth:r})});Nd.displayName="Stroke";var Sd=ao.memo(({points:e,options:o,strokeColor:t,strokeWidth:r})=>{let a=useRef([]),i=useMemo(()=>{let n=[],s=Math.ceil(e.length/jr);for(let p=0;p<s;p++)if(p===s-1){let l=e.slice(p*jr-(p>0?1:0),p*jr+jr),c=getSvgPathFromStroke(getStroke(l,o));n.push(c),a.current[p]=c;}else n.push(a.current[p]);return n},[e,o]);return jsx(Fragment,{children:i.map((n,s)=>jsx("path",{d:n,stroke:t,strokeWidth:r},s))})});Sd.displayName="SplitStroke";var Ri=e=>e.map(o=>o.map(([t,r])=>({x:t,y:r,pressure:0}))),jr=60*3;function Ld(e){if(typeof e.getCoalescedEvents=="function"){let o=e.getCoalescedEvents();return [e,...o.flatMap(t=>Ld(t))]}return [e]}var Md="_1vac7ws0",Bd=v({defaultClassName:"_1vac7ws1",variantClassNames:{isDragging:{true:"_1vac7ws2"}},defaultVariants:{},compoundVariants:[]});function Ed(e,o){let[t,r]=useState([]),a=()=>e?.flatMap(i=>[...o.querySelectorAll(i)]).map(i=>({current:i}));return useGranularEffect(()=>{r(a());},[],[a]),useGranularEffect(()=>{let i=a();r(i);},[e],[a]),t}function Fd(e){let{scrollable:o,ownerDocument:t,onScroll:r}=e;useEffect(()=>{let a=getHTMLElement(o,t);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);}},[o,r,t]);}var bh=makeMoveable([Draggable,Resizable,Rotatable,Snappable]),Od=ao.forwardRef(({className:e,children:o,isRotatable:t,isResizable:r,isDraggable:a,style:i,onTransform:n,onTransformStart:s,onTransformEnd:p,onDoubleClick:l,onDragStart:c,onDragEnd:u,onDrag:m,onResizeStart:d,onResizeEnd:f,onResize:y,onRotateStart:b,onRotateEnd:g,onRotate:z,onSnap:_,isSnappable:h,elementGuidelines:C,hideAnchorOnDrag:x=!0,title:k,rotationPosition:w,autoUpdate:N,bound:P,snapRotationDegrees:I,snapRotationThreshold:M,scrollableAncestor:S,renderDirections:R,stopPropagation:T,transformOrigin:H,preventDefault:O},U)=>{let ie=useRef(null),Y=useRef(null),[Z,ce]=useState(document),A=useRef(Z.createElement("div")),[G,ue]=useState({}),[Re,ze]=useState(!1),[he,ge]=useState(!1),[Ee,Q]=useState(),se=Ed(C,Z);useLayoutEffect(()=>{let E=A.current;return A.current=Z.createElement("div"),()=>{E.remove();}},[Z]);let{keyboardProps:Xo}=useKeyboard({onKeyDown:E=>{let q=E.shiftKey?10:1,te=E.metaKey||E.ctrlKey;te&&E.shiftKey&&(q=45);function W(Ie,Pf="x"){te?Y.current?.request("rotatable",{deltaRotate:Ie*q},!0):Y.current?.request("draggable",Pf==="x"?{deltaX:Ie*q}:{deltaY:Ie*q},!0);}switch(E.key){case"ArrowRight":{W(1);break}case"ArrowLeft":{W(-1);break}case"ArrowUp":{W(-1,"y");break}case"ArrowDown":W(1,"y");}requestAnimationFrame(()=>{Y.current?.updateRect();});}});useEffect(()=>{let E=ve(ie.current);ce(E);let q=A.current;E.body.append(A.current);function te(Ie){ge(Ie.shiftKey);}function W(){ge(!1);}return E.addEventListener("keydown",te),E.addEventListener("keyup",W),()=>{E.removeEventListener("keydown",te),E.removeEventListener("keyup",W),q.remove();}},[]),Fd({scrollable:S,onScroll:()=>{Y.current?.updateRect();},ownerDocument:Z});let Qe=useCallback(E=>{ue(q=>({...q,...E.style})),n?.(E);},[n]),la=useCallback(E=>{if(ze(!0),ie.current?.focus(),P){let te=getHTMLElement(P,Z)?.getBoundingClientRect();Q({position:"client",left:te?.left??0,top:te?.top??0,right:te?.right??0,bottom:te?.bottom??0});}c?.(E);},[P,Z,c]),Vt=useCallback(E=>{ze(!1),u?.(E);},[u]),At=o({style:{...G.width&&{width:G.width},...G.height&&{height:G.height}}});return jsxs(Fragment,{children:[jsx("div",{role:"button",...Xo,ref:L(ie,U),style:{display:"inline-block",...i,...G},className:classNames(Md,e),onDoubleClick:l,tabIndex:0,title:k,children:At}),createPortal(jsx(bh,{ref:Y,target:ie,draggable:a,resizable:r,rotatable:t,keepRatio:he,throttleDrag:1,snappable:h||!!P,elementGuidelines:se,snapRenderThreshold:.9,className:Bd({isDragging:Re&&x}),onRender:Qe,onDragStart:la,onDragEnd:Vt,useResizeObserver:N,useMutationObserver:N,onRenderEnd:p,onDrag:m,onResizeStart:d,onResizeEnd:f,onResize:y,onRotateStart:b,onRotateEnd:g,onRotate:z,onRenderStart:s,onSnap:_,rotationPosition:w,bounds:Ee,snapRotationDegrees:I,snapRotationThreshold:M,renderDirections:R,stopPropagation:T,preventDefault:O,transformOrigin:H}),A.current)]})});Od.displayName="Transform";var Vd={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 $d=ao.forwardRef(({className:e,style:o,isInline:t=!0,accept:r="image/*",defaultImageSrc:a,imageSrc:i,imageAlt:n,pickerButtonLabel:s,isDisabled:p,onDrop:l,onPaste:c,includeCheckeredBackground:u=!0,"data-block-id":m,"data-block-class":d,pickerButtonStyle:f,pickerButtonClassName:y,footerClassName:b,footerStyle:g,clearLabel:z,placeholder:_,labelStyle:h,labelClassName:C,...x},k)=>{let w=ao.useRef(null),N=ao.useRef(null),{formatMessage:P}=F(Vd),[I,M]=useControlledState(i,a||null,Q=>{invariant(typeof Q!="string"),x.onValueChange?.(Q?[Q]:[]);}),S=useMemo(()=>Nh(I||void 0),[I]),{fieldProps:R,labelProps:T}=useField(x),{dropProps:H,isDropTarget:O}=useDrop({ref:w,onDrop:async Q=>{if(p)return;let se=await qa({items:Q.items});se.length&&M(se[0]),l?.(Q);},...x}),{clipboardProps:U}=useClipboard({onPaste:async Q=>{if(p)return;let se=await qa({items:Q});se.length&&M(se[0]),c?.(Q);},...x}),ie=()=>{M(null),N.current&&(N.current.value="");},Y={type:"file",onChange:Q=>{let se=[...Q.target.files];M(se[0]),x.onChange?.(Q);},accept:r,disabled:p},{focusProps:Z,isFocused:ce,isFocusVisible:A}=useFocusRing({within:!0}),{hoverProps:G,isHovered:ue}=useHover({isDisabled:p}),{imgProps:Re,isLoading:ze,isLoaded:he}=_o({src:S,alt:n||""}),ge={label:s||P("selectImage"),onPress:()=>w.current?.click(),variant:"secondary",isDisabled:p,excludeFromTabOrder:!0,className:classNames(Yt({isFocusVisible:A}),{[Cd]:O&&!p},y),style:f},Ee=filterTruthyValues({"data-loaded":he,"data-block-id":m,"data-block-class":d,"data-hovered":ue,"data-focused":ce,"data-drop-target":O,"data-disabled":p,"data-focus-visible":A});return jsxs(B,{...Ee,className:classNames("BaselineUI-ImageDropZone",e),display:"flex",flexDirection:"column",alignItems:"center",style:o,ref:k,children:[jsxs("label",{...mergeProps(H,G,Z,T),className:classNames(Or({isInline:t,isHovered:ue,isDisabled:p,hasLoadedImage:!!S&&he,showFocusRing:O||!!S&&A}),C),style:h,ref:w,children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(R,U,Y),ref:N})}),!S&&jsx(j,{...ge}),!!S&&(ze?jsx(So,{}):jsx("img",{className:Vr({isInline:t,isDisabled:p,hasLoadedImage:!!S&&he&&u}),...Re}))]}),_||z?jsx("div",{style:g,className:classNames(Ar({isInline:t,isDisabled:p}),b),children:(S||!_)&&z?jsx(j,{size:"sm",variant:"ghost",label:z,isDisabled:p,onPress:ie}):jsx(j,{size:"sm",variant:"ghost",label:_,isDisabled:!0})}):null]})});$d.displayName="ImageDropZone";function Nh(e){return e instanceof File?URL.createObjectURL(e):e}var Ud="_1vm2oh49 _1yep5z6ho _1yep5z6hp _1yep5z6hq _1yep5z6fv",Si="_1vm2oh48 _1yep5z6kw _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6jc _1yep5z6jd _1yep5z6je",qd=v({defaultClassName:"_1vm2oh40 mnnh5s1 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6l1 _1yep5z6kz _1yep5z6hk _1yep5z6l2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6ki _1yep5z6kx _1yep5z6hl _1yep5z6hm _1yep5z6hn",variantClassNames:{accent:{theme:"_1vm2oh41",positive:"_1vm2oh42"},isInline:{true:"mnnh5s2 _1yep5z6vt _1yep5z6vu _1yep5z6vv _1yep5z6wh _1yep5z6wi _1yep5z6wj _1yep5z6x5 _1yep5z6x6 _1yep5z6x7 _1yep5z6xt _1yep5z6xu _1yep5z6xv _1yep5z6121 _1yep5z616i _1yep5z616k",false:"_1yep5z611g"},isFocusVisible:{true:"_1yep5z6126 _1yep5z616c _1yep5z616a _1yep5z612n _1yep5z616d"},isDisabled:{true:"mnnh5s8 z9nup83 _1yep5z6yl"},isHovered:{true:"_1vm2oh47"}},defaultVariants:{},compoundVariants:[[{accent:"positive",isInline:!0},"_1yep5z61mp"],[{accent:"theme",isInline:!0},"_1yep5z61me"],[{accent:"positive",isInline:!1},"_1yep5z61mr"],[{accent:"theme",isInline:!1},"_1yep5z61mg"],[{isFocusVisible:!0,isInline:!0},"_1yep5z61ny _1yep5z61rl _1yep5z61rn _1yep5z61ro"],[{isHovered:!0,isInline:!0},"_1yep5z61ro _1yep5z61ny _1yep5z61rl _1yep5z61rn"],[{isHovered:!0,isInline:!1,accent:"positive"},"_1yep5z61mq"],[{isHovered:!0,isInline:!1,accent:"theme"},"_1yep5z61mi"],[{isHovered:!0,isInline:!0,accent:"theme"},"_1yep5z61mf"]]});var Wd=ao.forwardRef(({className:e,style:o,isDisabled:t,isInline:r=!0,imageAlt:a,imageSrc:i,svgSrc:n,textValue:s,textStyle:p,onPress:l,onDelete:c,deleteAriaLabel:u,addAriaLabel:m,accent:d="positive","data-block-id":f,"data-block-class":y,...b},g)=>{let{focusProps:z,isFocused:_,isFocusVisible:h}=useFocusRing({within:!0}),{isHovered:C,hoverProps:x}=useHover({isDisabled:t}),{pressProps:k}=usePress({isDisabled:t,onPress:l});invariant(i||n||s,"Preview must have content. You must provide either an `imageSrc`, `svgSrc`, or `textValue` prop.");let w=filterTruthyValues({"data-hovered":C,"data-focus-visible":h,"data-focused":_,"data-disabled":t});return jsxs("div",{...b,className:classNames(qd({isInline:r,isFocusVisible:h,isDisabled:t,isHovered:C,accent:d}),"BaselineUI-Preview",e),"data-block-id":f,"data-block-class":y,"aria-label":b["aria-label"]||a||s,style:o,ref:g,children:[typeof n=="string"?jsx("button",{disabled:t,...mergeProps(x,z,k,w),className:Si,"aria-label":m,dangerouslySetInnerHTML:{__html:n}}):jsxs("button",{...mergeProps(x,z,k,w),disabled:t,style:p,"aria-label":m,className:Si,children:[i?jsx("img",{src:i,alt:a,className:Vr({isInline:r,isDisabled:t})}):null,!!n&&typeof n=="object"&&n,s]}),c?jsx(D,{isDisabled:t,className:Ud,"aria-label":u,size:"xs",icon:TrashIcon,onPress:c}):null]})});Wd.displayName="Preview";var Xd="_1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ic _1yep5z6id _1yep5z6ie _1yep5z69c _1yep5z69d _1yep5z69e",Yd=v({defaultClassName:"cw3m0n8 _1yep5z6ew _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z6109"}},defaultVariants:{},compoundVariants:[]}),Zd="cw3m0n7",Qd=v({defaultClassName:"cw3m0n0 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6i9 _1yep5z6ia _1yep5z6ib",variantClassNames:{labelPosition:{end:"_1yep5z613k _1yep5z613l _1yep5z613m _1yep5z6ut _1yep5z6uu _1yep5z6uv",start:"_1yep5z613q _1yep5z613r _1yep5z613s _1yep5z6152 _1yep5z6153 _1yep5z6154"}},defaultVariants:{},compoundVariants:[]}),Jd="_1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ic _1yep5z6id _1yep5z6ie _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6ks",em=v({defaultClassName:"cw3m0n3 _16vugd05",variantClassNames:{isFocusVisible:{true:"_16vugd08"},isSelected:{true:"_16vugd07"},isDisabled:{true:"_16vugd0a"}},defaultVariants:{},compoundVariants:[]});var Gh=({label:e,description:o},{isSelected:t,isFocusVisible:r,isDisabled:a,optionLabelPosition:i})=>jsxs("div",{className:Qd({labelPosition:i}),children:[jsx("div",{className:em({isSelected:t,isFocusVisible:r,isDisabled:a}),children:t?jsx("div",{className:Zd}):null}),e?jsxs("div",{className:Xd,children:[jsx("span",{className:_r({isDisabled:a}),children:e}),o?jsx("span",{className:Yd({isDisabled:a}),children:o}):null]}):null]}),om=({state:e,renderOption:o=Gh,item:t,optionLabelPosition:r="end",optionStyle:a,optionClassName:i,isReadOnly:n,...s})=>{let p=!!s.isDisabled||!!s.disabledValues?.includes(t.id),l=ao.useRef(null),{inputProps:c,isPressed:u,isSelected:m}=useRadio({...s,isDisabled:p,children:t.label,value:t.id},e,l),{focusProps:d,isFocusVisible:f,isFocused:y}=useFocusRing(),{isHovered:b}=useHover({isDisabled:p}),g=filterTruthyValues({"data-selected":m,"data-focused":y,"data-focus-visible":f,"data-hovered":b,"data-disabled":p,"data-pressed":u,"data-read-only":n});return jsxs("label",{...g,style:a,className:classNames("BaselineUI-Radio-Item",i),children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(c,d),ref:l})}),o(t,{isFocusVisible:f,isSelected:m,isFocused:y,isHovered:b,isDisabled:p,optionLabelPosition:r,isReadOnly:n})]})};var tm=ao.forwardRef(({className:e,style:o,optionsContainerClassName:t,optionsContainerStyle:r,items:a,labelPosition:i="top",renderOption:n,"aria-label":s,"aria-labelledby":p,"aria-describedby":l,"aria-details":c,"data-block-id":u,"data-block-class":m,...d},f)=>{let y=useRadioGroupState(d),{radioGroupProps:b,labelProps:g,descriptionProps:z,errorMessageProps:_}=useRadioGroup({...d,"aria-label":s,"aria-labelledby":p,"aria-describedby":l,"aria-details":c},y),h=xe({...d,descriptionProps:z,errorMessageProps:_,labelPosition:i}),C=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(b,C),className:classNames(Oe({labelPosition:i}),"BaselineUI-RadioGroup",e),style:o,ref:f,children:[d.label||h?jsxs("div",{className:He({labelPosition:i,hasMessage:!!h}),children:[jsx("span",{...g,className:classNames(Fe,"BaselineUI-RadioGroup-Label"),children:d.label}),i==="start"&&h]}):null,jsxs("div",{className:classNames({[uo]:d.isDisabled}),children:[jsx("div",{className:classNames(Jd,t),style:r,children:a.map(x=>jsx(om,{state:y,renderOption:n,item:x,...d,value:x.id},x.id))}),i==="top"&&h]})]})});tm.displayName="RadioGroup";var rm=({id:e,defaultMessage:o,elementType:t=Fragment$1})=>{invariant(e||o,"`id` or `defaultMessage` is required.");let r=F();return jsx(t,{children:r.formatMessage(e)||o})};rm.displayName="MessageFormat";var am=ao.forwardRef(({className:e,style:o,children:t,role:r="group",isDisabled:a,...i},n)=>{let{hoverProps:s,isHovered:p}=useHover({isDisabled:a});return jsx("div",{...s,role:r,"data-hovered":p,"data-disabled":a,className:e,style:o,...i,ref:n,children:t})});am.displayName="Group";var Ei="UNSUPPORTED_IN_MENU";function sm(e){return useMemo(()=>ao.Children.toArray(e).map(o=>{let t=o,r=uniqueId("item"),a=kt(t,Ne),i=nm(t),n,s;if(a){let g=kt(a,Se);invariant(g),n=nm(g),s=kt(a,Pe).props.children;}else i?n=i:n=t;let{onPress:p,label:l,"aria-label":c,iconStart:u,isDisabled:m,icon:d}=n.props,f=l||c||Ei;invariant(typeof f=="string","ActionGroup children must have a string label");let y=`${r}-${f}`;return createElement(Item,{...{key:y,onPress:p,textValue:f,"aria-label":c,icon:u||d,dialogContent:s,isDisabled:m},key:y},t)}),[e])}function kt(e,o){return o?flatMapDeep(ao.Children.toArray(e),r=>ao.isValidElement(r)&&r.props.children?[r,...ao.Children.toArray(r.props.children)]:[r]).find(r=>ao.isValidElement(r)&&r.type===o):void 0}function nm(e){return kt(e,j)||kt(e,D)}var lm="_1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6hl _1yep5z6hm _1yep5z6hn _1yep5z6kv _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6kn",pm={horizontal:"xvr3wn0",vertical:"xvr3wn1"};var Hi=ao.forwardRef(({className:e,style:o,children:t,collapsibleMenuProps:r,"data-block-id":a,"data-block-class":i,renderSpacer:n,...s},p)=>{let{formatMessage:l}=F(),[c,u]=useState(),m=sm(t),d=useListState({...s,children:m}),f=de(p),y=useRef(null),[{visibleItems:b,isMeasuring:g},z]=ca({visibleItems:d.collection.size,isMeasuring:!1}),_=useCallback(()=>{let P=I=>{if(y.current&&f.current){let M=[...y.current.children],S=f.current.getBoundingClientRect().width,R=I<d.collection.size,T=0,H=0;if(R){let O=M.pop();O&&(T+=um(O,!1,!0));}for(let[O,U]of M.entries())if(T+=um(U,O===0,O===M.length-1),Math.round(T)<=Math.round(S))H++;else break;return H}return I};z(function*(){yield {visibleItems:d.collection.size,isMeasuring:!0};let I=P(d.collection.size),M=I<d.collection.size&&I>0;yield {visibleItems:I,isMeasuring:M},M&&(yield {visibleItems:P(I),isMeasuring:!1});});},[z,f,d.collection.size]),h=useMemo(()=>({get current(){return f.current?.parentElement}}),[f]);ya({ref:h,onResize:_}),Te(_,[d.collection,_]);let{toolbarProps:C}=useToolbar(s,f),x=[...d.collection],k=x.slice(0,b),w=x.slice(b).filter(P=>P.textValue!==Ei),N=w.length>0;return useEffect(()=>{u(void 0);},[w.length]),useEffect(()=>{s.orientation==="vertical"&&console.warn("Toolbar: Vertical orientation is not supported when `isCollapsible` is true.");},[s.orientation]),jsxs(FocusScope,{children:[jsx("div",{...C,className:e,"data-block-id":a,"data-block-class":i,"data-collapse":!0,style:{...o,flexBasis:g?"100%":void 0},ref:f,children:jsxs("div",{ref:y,className:lm,children:[k.map(P=>P.rendered),N?jsxs(Fragment,{children:[!g&&n?jsx(B,{flexGrow:1}):null,jsx(fr,{placement:"bottom end",renderTrigger:({buttonProps:P,ref:I})=>jsx(D,{...P,size:"md",icon:MoreIcon,"aria-label":l(vx.more),variant:"toolbar",ref:I}),...r,disabledKeys:w.filter(P=>P.props?.isDisabled).map(P=>P.key),items:w.map(P=>{let I=P.textValue||P["aria-label"];return invariant(I,"ActionItem must have a label"),{id:P.key,label:I,icon:P.props.icon}}),onAction:P=>{let I=d.collection.getItem(P);invariant(I,"Item not found");let{onPress:M,dialogContent:S}=I.props;M?.(),u(S);}})]}):null]})}),jsx(Ce,{isOpen:!!c,onOpenChange:P=>{P||u(void 0);},children:jsx(Me,{enableDrawer:"auto",style:{zIndex:1e5},children:c?ao.cloneElement(c,{inheritDrawer:!0}):null})})]})});Hi.displayName="CollapsibleToolbar";function um(e,o,t){let a=J(e).getComputedStyle(e);return e.getBoundingClientRect().width+(o?0:fm(a.marginLeft))+(t?0:fm(a.marginRight))}function fm(e){let o=Number.parseInt(e,10);return Number.isNaN(o)?0:o}var vx=$({more:{id:"more",defaultMessage:"More"}});var Oi=ao.forwardRef(({className:e,style:o,"data-block-id":t,"data-block-class":r,"aria-controls":a,...i},n)=>{let s=ao.useRef(null),{toolbarProps:p}=useToolbar(i,s);return jsx("div",{...p,"aria-controls":a,className:classNames(pm[i.orientation||"horizontal"],"BaselineUI-Toolbar",e),style:o,"data-block-id":t,"data-block-class":r,ref:L(n,s),children:i.children})});Oi.displayName="WrappedToolbar";var Kr=ao.forwardRef((e,o)=>{let t=e.isCollapsible?Hi:Oi;return jsx(t,{...e,ref:o})});Kr.displayName="Toolbar";var bm=v({defaultClassName:"_1j5skr71",variantClassNames:{size:{xxs:"_1j5skr72",xs:"_1j5skr73",sm:"_1j5skr74",md:"_1j5skr75",lg:"_1j5skr76"}},defaultVariants:{},compoundVariants:[]}),gm=v({defaultClassName:"_1j5skr70 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6kx _1yep5z6ky _1yep5z6ks _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6fs _1yep5z6f0",variantClassNames:{isHovered:{true:"_1j5skr7g"},isFocusVisible:{true:"_1j5skr7h"},isDisabled:{true:"z9nup83 _1yep5z610d"},isSelected:{true:"_1j5skr7j"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!0},"_1yep5z61ro _1yep5z61rn _1yep5z61rl _1yep5z61o5 _1yep5z61lo"],[{isSelected:!1,isHovered:!0,isDisabled:!1},"_1yep5z6fu"],[{isSelected:!1,isFocusVisible:!0,isDisabled:!1},"_1yep5z61ro _1yep5z61rn _1yep5z61ny _1yep5z61rl"],[{isSelected:!0,isFocusVisible:!0,isDisabled:!1},"_1j5skr7k _1yep5z61rm _1yep5z61rl _1yep5z61nz _1yep5z61lp"],[{isSelected:!0,isFocusVisible:!1,isDisabled:!1},"_1yep5z61rl _1yep5z61rn _1yep5z61ny _1yep5z61ro"]]}),vm=v({defaultClassName:"_1j5skr70 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6kx _1yep5z6ky _1yep5z6ks _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f0",variantClassNames:{isHovered:{true:"_1j5skr7m"},isFocusVisible:{true:"_1yep5z616d _1yep5z616c _1yep5z612n _1yep5z616a"},isSelected:{true:"_1yep5z610c"},isDisabled:{true:"z9nup83 _1yep5z610d"}},defaultVariants:{},compoundVariants:[[{isSelected:!1,isHovered:!0},"_1yep5z61ln"]]}),_m=v({defaultClassName:"_1j5skr70 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6kx _1yep5z6ky _1yep5z6ks _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f0",variantClassNames:{isHovered:{true:"_1j5skr7r"},isFocusVisible:{true:"_1yep5z616d _1yep5z616c _1yep5z612n _1yep5z616a"},isSelected:{true:"_1j5skr7t"},isDisabled:{true:"z9nup83 _1yep5z610d"}},defaultVariants:{},compoundVariants:[[{isSelected:!1,isHovered:!0},"_1yep5z61mg"],[{isSelected:!0,isDisabled:!1},"_1yep5z61mg _1yep5z61lq"],[{isSelected:!0,isDisabled:!0},"_1yep5z61mg _1yep5z61lo"]]}),zm=v({defaultClassName:"_1j5skr77 _1j5skr70 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6kx _1yep5z6ky _1yep5z6ks _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6f0",variantClassNames:{isHovered:{true:"_1j5skr78"},isFocusVisible:{true:"_1j5skr79"},isSelected:{true:"_1j5skr7a"},isDisabled:{true:"_1j5skr7b z9nup83 _1yep5z610e"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!1},"_1j5skr7c _1yep5z61lp"],[{isSelected:!1,isDisabled:!0},"_1j5skr7d _1yep5z61lo"],[{isSelected:!1,isHovered:!0},"_1yep5z61mg"],[{isSelected:!1,isFocusVisible:!0},"_1yep5z61ro _1yep5z61rn _1yep5z61ny _1yep5z61rl"],[{isSelected:!0,isFocusVisible:!0},"_1j5skr7e _1yep5z61rm _1yep5z61rl _1yep5z61nz"]]});var Mx={xxs:8,xs:12,sm:16,md:20,lg:24},_e=ao.forwardRef(({className:e,style:o,icon:t,size:r="md",variant:a="primary","data-block-id":i,"data-block-class":n,...s},p)=>{let l=useToggleState(s),{buttonProps:c,isPressed:u,ref:m}=Xt(s,l),{hoverProps:d,isHovered:f}=useHover({isDisabled:s.isDisabled}),{isFocusVisible:y,isFocused:b,focusProps:g}=useFocusRing(),z=useMemo(()=>typeof t=="function"?t:l.isSelected?t.selected:t.unselected,[t,l.isSelected]),_={isSelected:l.isSelected,isHovered:f,isFocusVisible:y,isDisabled:!!s.isDisabled},h=filterTruthyValues({"data-hovered":f,"data-selected":l.isSelected,"data-focus-visible":y,"data-disabled":s.isDisabled,"data-block-id":i,"data-block-class":n,"data-focused":b,"data-pressed":u});return jsx("button",{...mergeProps(c,d,g,h),className:classNames(a==="toolbar"&&zm(_),a==="primary"&&gm(_),a==="secondary"&&vm(_),a==="tertiary"&&_m(_),bm({size:r}),"BaselineUI-ToggleIconButton",e),style:o,ref:L(m,p),children:jsx(z,{size:Mx[r]})})});_e.displayName="ToggleIconButton";var xm="f6jv6bm",Cm="_1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z6j0 _1yep5z6j1 _1yep5z6j2",Ao="_1yep5z689 _1yep5z68a _1yep5z68b _1yep5z65x _1yep5z65y _1yep5z65z",Pm=v({defaultClassName:"f6jv6b0 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6fs",variantClassNames:{isInline:{true:"f6jv6b1"},isMinimal:{true:"_1yep5z613k _1yep5z613l _1yep5z613m _1yep5z6uw _1yep5z6ux _1yep5z6uy _1yep5z6142 _1yep5z6143 _1yep5z6144",false:"_1yep5z613n _1yep5z613o _1yep5z613p"}},defaultVariants:{},compoundVariants:[[{isInline:!0,isMinimal:!1},"_1yep5z61h7 _1yep5z61h8 _1yep5z61h9 _1yep5z61hv _1yep5z61hw _1yep5z61hx _1yep5z61ij _1yep5z61ik _1yep5z61il _1yep5z61j7 _1yep5z61j8 _1yep5z61j9 _1yep5z61rv _1yep5z61rt _1yep5z61nc"]]}),Gr=v({defaultClassName:"f6jv6b4 _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6e3 _1yep5z6eu _1yep5z6ky",variantClassNames:{isDisabled:{true:"f6jv6b5 _1yep5z6109"}},defaultVariants:{},compoundVariants:[]}),km="f6jv6bj _1yep5z6vz _1yep5z6w0 _1yep5z6w1 _1yep5z6wn _1yep5z6wo _1yep5z6wp _1yep5z6xb _1yep5z6xc _1yep5z6xd _1yep5z6xz _1yep5z6y0 _1yep5z6y1",wm="f6jv6bk";var Rm="f6jv6bn _1yep5z63l _1yep5z63m _1yep5z63n _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6l6 _1yep5z6l1 _1yep5z6kz _1yep5z6hc _1yep5z6eu",Im=v({defaultClassName:"f6jv6bf _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6ky _1yep5z6ki _1yep5z6kl _1yep5z6kx",variantClassNames:{isHovered:{true:"_1yep5z6115"},isDisabled:{true:"_1yep5z6yl"}},defaultVariants:{},compoundVariants:[]}),Tm="f6jv6bi _1mdhlqv6 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7 _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6fs _1yep5z6l0 _1yep5z6kz _1yep5z6hf _1yep5z6l3",Nm="_1yep5z6j6 _1yep5z6j7 _1yep5z6j8",Sm="f6jv6be f6jv6ba _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6hx _1yep5z6hy _1yep5z6hz _1yep5z6eu _1yep5z6e3 _1yep5z6kv",Lm=v({defaultClassName:"f6jv6bb _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6jc _1yep5z6jd _1yep5z6je",variantClassNames:{isInline:{true:"_1yep5z6oz _1yep5z6p0 _1yep5z6p1 _1yep5z616k _1yep5z616i _1yep5z6121",false:"_1yep5z6p2 _1yep5z6p3 _1yep5z6p4 _1yep5z6we _1yep5z6wf _1yep5z6wg _1yep5z6x2 _1yep5z6x3 _1yep5z6x4 _1yep5z6xq _1yep5z6xr _1yep5z6xs _1yep5z6ye _1yep5z6yf _1yep5z6yg"}},defaultVariants:{},compoundVariants:[]}),Mm="f6jv6bl",Bm="f6jv6ba _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6hx _1yep5z6hy _1yep5z6hz _1yep5z6eu",Wr=v({defaultClassName:"f6jv6b6",variantClassNames:{isInline:{true:"f6jv6b7",false:"f6jv6b8"}},defaultVariants:{},compoundVariants:[]}),Xr="f6jv6b9 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it",wt="f6jv6bo";var Em=[["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:Rt}}=layoutSprinkleValues,Fm=({isOpen:e,onClose:o})=>{let{formatMessage:t}=F(),r=useId();return jsx(Ce,{isOpen:e,onOpenChange:a=>{a||o();},children:jsx(Me,{enableDrawer:"auto",style:{zIndex:999999},children:jsxs(le,{"aria-labelledby":r,className:km,drawerBackground:"subtle",children:[jsxs(B,{paddingLeft:Rt.padding.horizontal.lg,paddingRight:Rt.padding.horizontal.sm,display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",backgroundColor:"background.primary.subtle",className:wm,children:[jsx(X,{id:r,elementType:"h3",type:"title",size:"md",children:t(It.help)}),jsx(D,{icon:XIcon,size:"md",variant:"secondary","aria-label":t(It.close),onPress:o})]}),jsx(V,{className:Mm}),jsxs(B,{paddingX:Rt.padding.horizontal.lg,role:"table","aria-labelledby":r,backgroundColor:"background.primary.subtle",children:[jsx("div",{role:"rowgroup",children:jsxs(B,{role:"row",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingY:Rt.padding.vertical.md,color:"text.primary",children:[jsx("h6",{className:sprinkles({typography:"heading.h6.semibold"}),role:"columnheader",children:t(It.action)}),jsx("h6",{className:sprinkles({typography:"heading.h6.semibold"}),role:"columnheader",style:{textTransform:"capitalize"},children:t(It.shortcut)})]})}),jsx("div",{role:"rowgroup",children:Em.map(([a,i],n)=>jsxs(Fragment$1,{children:[jsxs(B,{role:"row",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingY:Rt.padding.vertical.xs,style:{minHeight:40},children:[jsx(X,{type:"subtitle",size:"sm",role:"cell",children:t(It[camelCase(a)])}),jsx(X,{elementType:"kbd",type:"subtitle",size:"sm",role:"cell",children:getOsSpecificKeyboardShortcutLabel(i,!0)})]}),n!==Em.length-1&&jsx(V,{})]},a))})]})]})})})},It=$({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 Yr=ao.forwardRef(({value:e,defaultValue:o,onChange:t,placeholder:r,spellCheck:a,textBoxRef:i,isInline:n,isMinimal:s,isDisabled:p,editableContentAriaLabel:l,editorHandle:c,autoFocus:u,saveOnEnter:m,onSave:d},f)=>{let y=ao.useRef(null),[b,g]=useControlledState(e,o||"",t),z=useCallback(I=>{g(I.currentTarget.value||"");},[g]),_=useCallback(I=>{(m&&I.key==="Enter"&&!I.shiftKey||(I.ctrlKey||I.metaKey)&&I.key==="Enter")&&(I.preventDefault(),d());},[m,d]);useImperativeHandle(f,()=>({clear:()=>{g("");}}));let h=useCallback(I=>{I.currentTarget.style.height="16px",I.currentTarget.style.height=I.currentTarget.scrollHeight+"px";},[]);useGranularLayoutEffect(()=>{let I=y.current;I&&(I.style.height="16px",I.style.height=I.scrollHeight+"px");},[s],[b]),useImperativeHandle(c,()=>({setCaretPosition:I=>{y.current&&(y.current.focus(),y.current.setSelectionRange(I,I));},focus:()=>{y.current&&y.current.focus();}}));let{focusProps:C,isFocused:x,isFocusVisible:k}=useFocusRing(),{hoverProps:w,isHovered:N}=useHover({}),P=filterTruthyValues({"data-focus-visible":k,"data-hovered":N,"data-focused":x});return jsx("textarea",{...mergeProps(C,w,P),ref:L(y,i),className:classNames(s?Sm:[Gr(),Wr({isInline:n}),Bm]),autoFocus:u,onChange:z,disabled:p,onInput:h,value:b,placeholder:r,spellCheck:a,"aria-label":l,onKeyDown:_})});Yr.displayName="PlainEditor";var St="mention",Zr="mention_input",Xm=ao.forwardRef(({onCancel:e,editor:o,element:t,onSelectionChange:r},a)=>{let{containerRef:i,items:n,maxMentionableUsersSuggestions:s}=useContext(Jr),p=useSelected(),[l,c]=useState(""),{contains:u}=useFilter({sensitivity:"base"}),{formatMessage:m}=F(),d=useMemo(()=>{let R=n.filter(T=>l===""||u(T.displayName,l)).map(T=>({id:T.id,label:T.displayName,data:T}));return s?take(R,s):R},[n,s,l,u]),f=useCallback(R=>jsx(Item,{children:R.label},R.id),[]),y=useCallback((R=!1)=>{let T=findNodePath(o,t);T&&(removeNodes(o,{at:T}),R&&focusEditor(o));},[o,t]),b=useComboBoxState({items:d,children:f,menuTrigger:"focus",onSelectionChange:R=>{y(!0),r?.(R);}}),g=ao.useRef(null),z=ao.useRef(null),_=ao.useRef(null),h=ao.useRef(null),C=useHTMLInputCursorState(z);useInteractOutside({ref:h,onInteractOutside:()=>{b.close();}});let{inputProps:x,listBoxProps:k}=useComboBox({defaultItems:d,inputRef:z,buttonRef:g,listBoxRef:_,popoverRef:h,menuTrigger:"focus","aria-label":m(fC.mention)},b);useEffect(()=>{z.current?.focus();},[]);let w=useCallback((R="manual",T=!1)=>{y(T),e?.(R,b.inputValue);},[e,y,b.inputValue]),N=useRef(p);useEffect(()=>{N.current&&!p&&w("deselect"),N.current=p;},[p,w]);let P=C?.atStart??!1,I=C?.atEnd??!1,M=useCallback(R=>{R.key==="Backspace"&&P?w("backspace",!0):R.key==="Escape"?w("escape",!0):R.key==="ArrowLeft"&&P?w("arrowLeft",!0):R.key==="ArrowRight"&&I&&w("arrowRight",!0);let T=Hotkeys.isUndo(R)&&o.history.undos.length>0,H=Hotkeys.isRedo(R)&&o.history.redos.length>0;(T||H)&&(R.preventDefault(),o[T?"undo":"redo"](),focusEditor(o));},[P,I,w,o]),S=useMemo(()=>{if(!CSS.supports("field-sizing","content")){let R=J(z.current),T=z.current?R?.getComputedStyle(z.current).font:void 0;return {width:T?getTextDimensions({text:b.inputValue,font:T}).width+10:"4ch"}}},[b.inputValue]);return jsxs(Je.Provider,{value:b,children:[jsx("input",{...mergeProps(x,{onKeyDown:M,onBlur:()=>{w("blur",!0);},onChange:R=>{c(R.target.value);}}),style:S,className:Rm,ref:L(a,z)}),b.isOpen?jsx(me,{triggerRef:i,className:Tm,isNonModal:!0,ref:h,state:b,children:jsx(ae,{...k,items:void 0,autoFocus:"first",ref:_,className:sprinkles({width:"full"}),renderOption:Zm})}):null]})});Xm.displayName="MentionInputContentElement";var Ui=withRef(({className:e,...o},t)=>{let{children:r,editor:a,element:i}=o,{items:n}=useContext(Jr),s=useRef(null),[p,l]=useState(null);useEffect(()=>{let m=findNodePath(a,i);if(!m)return;let d=getPointBefore(a,m);if(!d)return;let f=createPointRef(a,d);return l(f),()=>{f.unref();}},[a,i]);let c=useCallback(()=>{let m=s.current?.getRootNode()instanceof ShadowRoot;moveSelection(a,{unit:"offset"}),moveSelection(a,{unit:"character",distance:1}),Yo()&&m&&focusEditor(a);},[a]),u=useCallback(m=>{if(!m)return;let d=s.current?.getRootNode()instanceof ShadowRoot,f=n.find(b=>b.id===m);invariant(f,"User not found");let y={type:St,value:f.id,displayName:f.displayName,children:[{text:""}]};insertNodes(a,[y,{text:" "}]),d?setTimeout(()=>{c();},0):c();},[a,n,c]);return jsxs(PlateElement,{as:"span","data-slate-value":i.value,contentEditable:!1,className:e,ref:t,...o,children:[jsx(Xm,{onCancel:(m,d)=>{m!=="backspace"&&insertText(a,"@"+d,{at:p?.current??void 0}),(m==="arrowLeft"||m==="arrowRight")&&moveSelection(a,{distance:1,reverse:m==="arrowLeft"});},onSelectionChange:u,ref:s,element:i,editor:a}),r]})});Ui.displayName="MentionInputElement";var qi=withRef(({className:e,onClick:o,children:t,...r},a)=>{let i=useElement();return jsxs(PlateElement,{as:"span",className:e,contentEditable:!1,"data-user-id":i.value,onClick:getHandler(o,i),ref:a,...r,children:["@",i.displayName,t]})});qi.displayName="MentionElement";var Ym=(e,{options:{trigger:o,triggerPreviousCharPattern:t,triggerQuery:r}})=>{let{insertText:a}=e,i=n=>n===o;return e.insertText=n=>{if(!e.selection||!i(n)||r&&!r(e)){a(n);return}let s=getEditorString(e,getRange(e,e.selection,getPointBefore(e,e.selection)));if(t?.test(s)){Qr(e);return}a(n);},e},fC=$({mention:{defaultMessage:"Mention",id:"mention"}});function Jm({className:e,children:o,...t}){return jsx(PlateElement,{asChild:!0,className:e,...t,children:jsx("p",{children:o})})}function NC(e){return Object.entries(e).map(([o,t])=>`${kebabCase(o)}:${t}`).filter(([,o])=>!!o).join(";")}function SC(e){return "text"in e}function LC(e){return e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#039;")}function Lt(e){if(!e)return "";function o(t){if(SC(t)){let a=LC(t.text);return t.bold&&(a=`<b>${a}</b>`),t.italic&&(a=`<i>${a}</i>`),t.underline&&(a=`<u>${a}</u>`),(t.color||t.backgroundColor)&&(a=`<span style="${NC(filterTruthyValues({color:t.color||void 0,backgroundColor:t.backgroundColor||void 0}))}">${a}</span>`),a}let r=t.children?.map(Lt).join("");switch(t.type){case ELEMENT_PARAGRAPH:return `<p>${r}</p>`;case ELEMENT_LINK:return `<a href="${t.url}">${r}</a>`;case St:return `<span data-user-id="${t.value}">${t.displayName}</span>`;default:return r}}return Array.isArray(e)?e.map(t=>o(t)).join(""):o(e)}function MC(e){return e?(e=e.trim(),e.endsWith(";")&&(e=e.slice(0,-1)),Object.fromEntries(e.split(";").map(o=>o.split(":").map(t=>t.trim())).map(([o,t])=>[camelCase(o),t]))):{}}function Yi(e){e.startsWith("<p>")||(e=`<p>${e}</p>`);let o=new DOMParser().parseFromString(eu.default.sanitize(e),"text/html"),t=o.querySelectorAll("[style]");for(let a of t)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=o.querySelectorAll("br");for(let a of r)a.outerHTML=a.closest("p")?`
51
- `:"<p>";return tu(o.body)}function tu(e,o){if(e.nodeType===Node.TEXT_NODE)return jsx$1("text",o,e.textContent);if(e.nodeType!==Node.ELEMENT_NODE)return null;let t={...o};switch(e.nodeName.toUpperCase()){case"B":{t.bold=!0;break}case"I":{t.italic=!0;break}case"EM":{t.italic=!0;break}case"U":{t.underline=!0;break}case"SPAN":{let a=MC(e.getAttribute("style")||"");a["text-decoration"]==="underline"&&(t.underline=!0),a.color&&(t.color=a.color),a.backgroundColor&&(t.backgroundColor=a.backgroundColor);break}}let r=[...e.childNodes].flatMap(a=>tu(a,t));switch(r.length===0&&r.push(jsx$1("text",t,"")),e.nodeName.toUpperCase()){case"BR":return jsx$1("text",o,`
52
- `);case"SPAN":{let a=e.dataset.userId;return a?jsx$1("element",{type:St,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 ru(e){let o=findNode(e,{match:{type:getPluginType(e,ELEMENT_LINK)}}),[t]=o||[{url:""}];return t?.url}function Qr(e){let o={children:[{text:" "}],type:Zr};e.insertNode(o);}var BC=createPluginFactory({isElement:!0,isInline:!0,isMarkableVoid:!0,isVoid:!0,key:St,options:{trigger:"@",triggerPreviousCharPattern:/^$|^[\s"']$/},plugins:[{isElement:!0,isInline:!0,isVoid:!0,key:Zr}],withOverrides:Ym}),au=createPlugins([createParagraphPlugin({component:Jm}),createBoldPlugin({component:withProps(PlateLeaf,{as:"b"})}),createItalicPlugin({component:withProps(PlateLeaf,{as:"i"})}),createUnderlinePlugin({component:withProps(PlateLeaf,{as:"u"})}),createFontColorPlugin(),createFontBackgroundColorPlugin(),createLinkPlugin({component:iu}),BC({component:qi})],{components:{[Zr]:Ui}});var pu=({isDisabled:e})=>{let{formatMessage:o}=F(),t=useEditorRef();return jsxs(Ne,{type:"dialog",children:[jsx(Se,{children:jsx(D,{icon:LinkIcon,size:"sm",isDisabled:e,"aria-label":o(io.addLink),className:Ao,preventFocusOnPress:!0})}),jsx(Pe,{className:sprinkles({boxShadow:"medium"}),placement:"top end",children:({close:r})=>jsx(le,{size:"content",style:{minWidth:240},children:jsx(jC,{close:()=>{r(),setTimeout(()=>{focusEditor(t,t.selection);},0);}})})})]})},jC=({close:e})=>{let o=useEditorRef(),{formatMessage:t}=F(),r=useEditorSelector(l=>ru(l),[]),[a,i]=ao.useState(r?"show":"add"),[n,s]=ao.useState(r||""),p=jsx(B,{padding:"lg",children:jsx(Io,{label:t(io.link),value:n,autoFocus:!0,onChange:s,placeholder:"https://yourdomain.com"})});return jsxs(Fragment,{children:[a==="add"&&jsxs(Fragment,{children:[p,jsx(B,{display:"flex",justifyContent:"flex-end",padding:"lg",className:xm,children:jsx(j,{isDisabled:!isUrl(n,!0),label:t(io.addLink),size:"sm",onPress:()=>{upsertLink(o,{url:n,skipValidation:!0}),e?.();},preventFocusOnPress:!0})})]}),a==="show"&&jsxs(Fragment,{children:[jsx(B,{padding:"lg",children:jsx(X,{type:"subtitle",size:"sm",children:r})}),jsxs(B,{display:"flex",justifyContent:"flex-end",padding:"lg",gap:"lg",borderColor:"border.subtle",borderWidth:1,borderStyle:"solid",children:[jsx(j,{label:t(io.editLink),size:"sm",variant:"secondary",onPress:()=>{i("edit");},style:{flex:1,justifyContent:"center"}}),jsx(j,{label:t(io.removeLink),size:"sm",onPress:()=>{unwrapLink(o),e?.();},preventFocusOnPress:!0,style:{flex:1,justifyContent:"center"}})]})]}),a==="edit"&&jsxs(Fragment,{children:[p,jsxs(B,{display:"flex",justifyContent:"flex-end",padding:"lg",gap:"lg",borderColor:"border.subtle",borderWidth:1,borderStyle:"solid",children:[jsx(j,{label:t(io.cancel),size:"sm",variant:"secondary",onPress:()=>{i("show"),e?.();}}),jsx(j,{label:t(io.save),size:"sm",onPress:()=>{upsertLink(o,{url:n,skipValidation:!0}),e?.();}})]})]})]})};function iu({className:e,children:o,...t}){return jsx(PlateElement,{asChild:!0,className:e,...t,children:jsx("a",{className:yr({size:"sm"}),children:o})})}var io=$({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 UC=parseColor("#ffffff00").toString("hexa"),Zi=[{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"}];[...Zi,{label:"Transparent",color:UC}];var oa=({nodeType:e,icon:o,ariaLabel:t,isDisabled:r})=>{let a=useEditorSelector(n=>isMarkActive(n,e),[]),i=useEditorRef();return jsx(_e,{variant:"tertiary",isSelected:a,size:"sm",icon:o,"aria-label":t,isDisabled:r,onPress:()=>{toggleMark(i,{key:e});},preventFocusOnPress:!0})},Ji=({nodeType:e,"aria-label":o,isDisabled:t})=>{let{updateColor:r,clearColor:a,color:i}=useColorDropdownMenuState({customColors:[],colors:[],nodeType:e}),n=useCallback(({ref:p,triggerProps:l})=>jsx(D,{icon:e==="color"?TextIcon$1:HighlightTextIcon,"aria-label":o,size:"md",variant:"popover",isDisabled:t,className:Ao,preventFocusOnPress:!0,...l,ref:p}),[e,o,t]),s=useCallback(p=>{p?r(p.toString("rgba")):a();},[a,r]);return jsx(Ho,{presets:Zi,allowRemoval:!0,pickerMode:"lazy",placement:"top end",colorLabel:!1,renderTriggerButton:n,value:i||"#000000",onChange:s,isDisabled:t})};var zP=[{type:ELEMENT_PARAGRAPH,children:[{text:""}]}],Jr=ao.createContext({items:[],containerRef:{current:null},maxMentionableUsersSuggestions:10}),tn=ao.forwardRef(({value:e,defaultValue:o,onChange:t,style:r,spellCheck:a,placeholder:i,isInline:n,isDisabled:s,editableContentAriaLabel:p,containerRef:l,onHelpDialogOpenRequest:c,mentionableUsers:u,editorHandle:m,maxMentionableUsersSuggestions:d,autoFocus:f,editorRef:y,saveOnEnter:b,onSave:g},z)=>{let _=useRef(null),h=useId(),{formatMessage:C}=F(),x=useRef(null),k=x.current,w=useRef(null),N=useMemo(()=>k?.getRootNode()instanceof ShadowRoot,[k]),[P,I]=useControlledState(e?Yi(e):void 0,Yi(o||"<p></p>"),R=>{t&&t(Lt(R));}),{keyboardProps:M}=useKeyboard({onKeyDown:R=>{(b&&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(),Yo()&&N&&w.current&&focusEditor(w.current);}});useEffect(()=>{s&&w.current&&deselect(w.current);},[s]),useImperativeHandle(z,()=>({startMention:()=>{w.current&&!x.current?.querySelector("input[role='combobox']")&&Qr(w.current);}})),useImperativeHandle(m,()=>({setCaretPosition:R=>{w.current&&(focusEditor(w.current),moveSelection(w.current,{distance:R,unit:"character"}));},focus:()=>{w.current&&focusEditor(w.current);}}));let S=useMemo(()=>({items:u||[],containerRef:l,maxMentionableUsersSuggestions:d}),[u,l,d]);return jsx(Jr.Provider,{value:S,children:jsxs(Plate,{initialValue:P||zP,plugins:au,editorRef:L(w,y||null),onChange:R=>{I(R);},children:[jsxs(Kr,{className:Xr,"aria-controls":h,ref:_,children:[jsxs(B,{display:"flex",flexDirection:"row",role:"group",gap:"xs",paddingX:"sm",children:[jsx(oa,{nodeType:MARK_BOLD,icon:BoldIcon,ariaLabel:C(qo.bold),isDisabled:s}),jsx(oa,{nodeType:MARK_ITALIC,icon:ItalicIcon,ariaLabel:C(qo.italic),isDisabled:s}),jsx(oa,{nodeType:MARK_UNDERLINE,icon:UnderlineIcon,ariaLabel:C(qo.underline),isDisabled:s})]}),jsx(V,{orientation:"vertical",className:wt}),jsx(Ji,{nodeType:MARK_COLOR,"aria-label":C(qo.fontColor),isDisabled:s}),jsx(V,{orientation:"vertical",className:wt}),jsx(Ji,{nodeType:MARK_BG_COLOR,"aria-label":C(qo.backgroundColor),isDisabled:s}),jsx(V,{orientation:"vertical",className:wt}),jsx(pu,{isDisabled:s}),jsx(V,{orientation:"vertical",className:wt}),jsx(D,{className:Ao,icon:QuestionmarkCircleIcon,size:"sm","aria-label":C(qo.help),onPress:c})]}),jsx(V,{variant:"secondary"}),jsx("div",{...M,ref:x,children:jsx(PlateContent,{id:h,disabled:s,readOnly:s,style:r,placeholder:i,autoFocus:f,spellCheck:a,"aria-label":p,className:classNames(Gr({isDisabled:s}),Wr({isInline:n})),renderPlaceholder:({attributes:R,children:T})=>jsx("span",{...R,className:sprinkles({paddingY:"lg"}),children:T})})})]})})});tn.displayName="RichEditor";var Zm=({key:e,value:o},{isDisabled:t,optionProps:r,isFocused:a,_state:i},n)=>{let{hoverProps:s}=useHover({isDisabled:t}),{label:p,data:l}=o;return jsxs(Fragment,{children:[jsxs("li",{...mergeProps(r,s),className:Im({isDisabled:t,isHovered:a}),"data-active":a,ref:n,children:[jsx(Bo,{name:p,...l?.avatar}),jsxs(B,{display:"flex",flexDirection:"column",children:[jsx(X,{type:"subtitle",size:"sm",children:p}),jsx(X,{type:"helper",size:"sm",children:l?.description})]})]}),e===i.collection.getLastKey()?null:jsx(V,{})]})},qo=$({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 yu=ao.memo(ao.forwardRef(({className:e,style:o,"data-block-id":t,"data-block-class":r,enableRichText:a=!1,onCancel:i,onSave:n,isInline:s=!0,submitButtonIcon:p=ArrowUpCircleFilledIcon,submitButtonAriaLabel:l,cancelButtonAriaLabel:c,"aria-label":u,"aria-describedby":m,"aria-labelledby":d,"aria-details":f,editableContentAriaLabel:y="Editing Area",footerButtons:b,clearOnCancel:g,clearOnSave:z,..._},h)=>{let C=useRef(null),{formatMessage:x}=F(),k=useRef(null),w=useRef(null),N=useRef(null),P=!a&&_.variant==="minimal",I=useRef(null),[M,S]=ao.useState(_.value||_.defaultValue),R=_.isDisabled||_.isSaveDisabled||!getPlainText(M||""),{fieldProps:T}=useLabel({"aria-label":u,"aria-labelledby":d,"aria-describedby":m,"aria-details":f,labelElementType:"div"});P&&!_.avatarName&&console.warn("Editor: When using the minimal `variant` and `enableRichText` is `false`, you should provide an `avatarName`.");let H=useCallback(()=>{S(""),a?C.current?.reset():w.current?.clear();},[a]),O=useCallback(()=>{R||(n?.(a?Lt(C.current?.children):k.current.value),z&&H());},[H,z,a,n,R]),U=jsx(D,{variant:"ghost","aria-label":l||x(an.save),icon:p,isDisabled:R,size:"md",excludeFromTabOrder:P,className:P?Nm:void 0,onPress:O,preventFocusOnPress:!0}),[ie,Y]=ao.useState(!1),{keyboardProps:Z}=useKeyboard({onKeyDown:A=>{(A.metaKey||A.ctrlKey)&&A.shiftKey&&A.key==="h"&&(A.preventDefault(),Y(!0));}}),ce=useCallback(A=>{S(A),_.onChange?.(A);},[_]);return jsxs("div",{...mergeProps(T,a?Z:{}),role:"application",ref:L(N,h),style:o,"data-block-id":t,"data-block-class":r,className:classNames(Pm({isInline:s,isMinimal:P}),"BaselineUI-Editor",e),"aria-disabled":_.isDisabled,children:[P?jsxs(Fragment,{children:[s?jsx(Bo,{className:Cm,name:_.avatarName||""}):null,jsxs("div",{className:Lm({isInline:s}),children:[jsx(Yr,{isMinimal:P,textBoxRef:k,isInline:s,editableContentAriaLabel:y,..._,onChange:ce,onSave:O}),U]})]}):jsxs(Fragment,{children:[a?jsx(tn,{containerRef:N,ref:I,editorRef:C,isInline:s,editableContentAriaLabel:y,onHelpDialogOpenRequest:()=>{Y(!0);},..._,onChange:ce,onSave:O}):jsxs(Fragment,{children:[!s&&jsx(V,{variant:"secondary"}),jsx(Yr,{onCancel:i,textBoxRef:k,ref:w,isInline:s,editableContentAriaLabel:y,..._,onChange:A=>{S(A),_.onChange?.(A);},onSave:O})]}),jsx(V,{variant:"secondary"}),jsxs("div",{className:classNames(Xr,sprinkles({justifyContent:"space-between"})),children:[jsxs(B,{paddingX:"sm",gap:"sm",display:"flex",children:[a&&_.mentionableUsers?jsx(D,{icon:AtIcon,size:"sm","aria-label":x(an.mention),onPress:()=>I.current?.startMention(),preventFocusOnPress:!0}):null,b?.map(({type:A,props:G},ue)=>A==="action"?jsx(D,{...G,size:"sm",isDisabled:_.isDisabled||G.isDisabled},ue):jsx(_e,{...G,size:"sm",variant:"tertiary",isDisabled:_.isDisabled||G.isDisabled},ue))]}),jsxs(B,{children:[!!i&&jsx(D,{variant:"secondary",icon:CrossCircleFilledIcon,isDisabled:_.isDisabled,size:"md",onPress:()=>{i(),g&&H();},"aria-label":c||x(an.cancel)}),U]})]})]}),jsx(Fm,{isOpen:ie,onClose:()=>{Y(!1);}})]})}));yu.displayName="Editor";var an=$({cancel:{defaultMessage:"Cancel",id:"cancel"},save:{defaultMessage:"Save",id:"save"},mention:{defaultMessage:"Mention",id:"mention"}});var ra=ao.forwardRef(({className:e,style:o,"data-block-id":t,"data-block-class":r,isMounted:a,children:i,transitions:n,elementType:s="div",...p},l)=>{let c=useTransition(a,n),u=animated[s];return c((m,d)=>d&&jsx(u,{className:e,"data-block-id":t,"data-block-class":r,style:{...o,...m},...p,ref:l,children:i}))});ra.displayName="Transition";var bu="_8kqf970 _1yep5z6ow _1yep5z6ox _1yep5z6oy _1yep5z613b _1yep5z613c _1yep5z613d _1yep5z613k _1yep5z613l _1yep5z613m _1yep5z6142 _1yep5z6143 _1yep5z6144 _1yep5z6yh _1yep5z6uq _1yep5z6ur _1yep5z6us _1yep5z6168";var vu=2,_u=ao.forwardRef(({className:e,style:o,hideForKeyboard:t,scrollRef:r,label:a,delay:i=1500,smoothScroll:n=!0,"data-block-id":s,"data-block-class":p},l)=>{let c=ao.useRef(null),u=useInteractionModality(),[m,d]=ao.useState(!1),f=useCallback(()=>{let P=r?.current||ve(c.current).body;return J(P).getComputedStyle(P).flexDirection==="column-reverse"?P.scrollTop+vu>=0:P.scrollTop+P.clientHeight+vu>=P.scrollHeight},[r]),[y,b]=ao.useState(f),g=Ae(),{buttonProps:z,isPressed:_}=useButton({onPress:()=>{let P=r?.current||ve(c.current).body;P.scrollTo({top:P.scrollHeight,behavior:n?"smooth":"auto"});}},c),{focusProps:h,isFocused:C,isFocusVisible:x}=useFocusRing(),{hoverProps:k,isHovered:w}=useHover({}),N=filterTruthyValues({"data-block-id":s,"data-block-class":p,"data-pressed":_,"data-focus-visible":x,"data-hovered":w,"data-focused":C});return useEffect(()=>{b(f());},[f]),useEffect(()=>{let P=r?.current||ve(c.current).body,I="onscrollend"in J(P),M=()=>{setTimeout(()=>{d(!1),b(f());},i);},S=()=>{d(!0),I||M();};return P.addEventListener("scroll",S),P.addEventListener("scrollend",M),()=>{P.removeEventListener("scroll",S),P.removeEventListener("scrollend",M);}},[r,i,f]),jsxs(ra,{isMounted:(t?u!=="keyboard":!0)&&!m&&!y,elementType:"button",transitions:{from:{opacity:0,transform:"translateX(-50%) translateY(10px)"},enter:{opacity:1,transform:"translateX(-50%) translateY(0)"},leave:{opacity:0,transform:"translateX(-50%) translateY(10px)"},immediate:g},...mergeProps(z,h,k,N),className:classNames(bu,zr({isFocusVisible:x,variant:"high-contrast",isHovered:w}),"BaselineUI-ScrollControlButton",e),style:o,ref:L(l,c),children:[jsx(ArrowDownCircleFilledIcon,{size:16}),a]})});_u.displayName="ScrollControlButton";var sn="_1yep5z6jc _1yep5z6jd _1yep5z6je _1yep5z6jl _1yep5z6jm _1yep5z6jn",zu=v({defaultClassName:"_1v0p2z10 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ic _1yep5z6id _1yep5z6ie _1yep5z69f _1yep5z69g _1yep5z69h",variantClassNames:{hasTitleAndIcon:{true:"_1yep5z6le _1yep5z6lf _1yep5z6lg _1yep5z6nw _1yep5z6nx _1yep5z6ny"},hasNoCloseBtn:{true:"_1yep5z6lk _1yep5z6ll _1yep5z6lm _1yep5z6nw _1yep5z6nx _1yep5z6ny _1yep5z6p2 _1yep5z6p3 _1yep5z6p4 _1yep5z6mq _1yep5z6mr _1yep5z6ms"}},defaultVariants:{},compoundVariants:[[{hasTitleAndIcon:!0,hasNoCloseBtn:!0},"_1yep5z61g7 _1yep5z61g8 _1yep5z61g9"]]}),hu="_1v0p2z10";var ia=ao.forwardRef(({className:e,style:o,"data-block-id":t,"data-block-class":r,message:a,title:i,primaryActionLabel:n,cancelLabel:s,textInputProps:p,icon:l,iconColor:c,showCloseButton:u=!0,onPrimaryAction:m,onCancel:d,autoFocusButton:f,isPrimaryActionDisabled:y},b)=>{let g=useId(),{formatMessage:z}=F(),_=i&&jsx(X,{id:g,type:"title",size:"sm",elementType:"h3",children:i});return jsxs(le,{className:e,style:o,"data-block-id":t,"data-block-class":r,size:"sm",variant:"primary",role:"alertdialog",ref:b,"aria-labelledby":g,children:[jsxs("div",{className:zu({hasTitleAndIcon:!!(l&&i),hasNoCloseBtn:!u}),children:[jsxs(B,{display:"flex",justifyContent:"space-between",alignItems:"center",flexDirection:"row",children:[l?jsx(l,{style:{color:c},size:24}):null,!l&&_,u?jsx(D,{icon:XIcon,variant:"secondary",size:"md","aria-label":z(WP.close),onPress:d}):null]}),l?_:null]}),a?jsx(B,{elementType:"section",className:hu,paddingX:"lg",paddingBottom:"lg",typography:"body.sm.regular",color:"text.primary",children:a}):null,p?jsx(B,{paddingX:"lg",paddingBottom:"lg",children:jsx(Io,{...p})}):null,s||n?jsxs(Fragment,{children:[jsx(V,{}),jsxs(B,{padding:"lg",display:"flex",gap:"xl",children:[s?jsx(j,{variant:"secondary",className:sn,label:s,onPress:d,autoFocus:f==="cancel"}):null,n?jsx(j,{className:sn,label:n,onPress:m,autoFocus:f==="primary",isDisabled:y}):null]})]}):null]})});ia.displayName="AlertDialog";var WP=$({close:{id:"close",defaultMessage:"Close",description:"Close button label"}});var xu="_1t55bp71",Cu="_1yep5z6e3 _1yep5z6eu _1yep5z6i6 _1yep5z6i7 _1yep5z6i8 _1yep5z69i _1yep5z69j _1yep5z69k",Pu="_1t55bp70";var ek=JP(),ku=ao.forwardRef(({className:e,style:o,children:t,"data-block-id":r,"data-block-class":a,showCaret:i},n)=>{let s=useMemo(()=>{let p=t;return (!t||Array.isArray(t)&&t.length===0)&&(p=""),ek.render(p)},[t]);return jsx("div",{className:classNames(Cu,Pu,{[xu]:i},"BaselineUI-Markdown",e),"data-block-id":r,"data-block-class":a,style:o,ref:n,dangerouslySetInnerHTML:{__html:s}})});ku.displayName="Markdown";function Tu(e){let{formatMessage:o,locale:t}=F(),[r,a]=ao.useState(!1),[i,n]=ao.useState(0),[s,p]=ao.useState(0),[l,c]=ao.useState(!1);useEffect(()=>{if(!e.current)return;let d=e.current,f=()=>{a(!1),n(0);},y=()=>{l||n(d.currentTime*100/d.duration);},b=()=>{p(d.duration);};return d.addEventListener("ended",f),d.addEventListener("timeupdate",y),d.addEventListener("loadedmetadata",b),()=>{d.removeEventListener("ended",f),d.removeEventListener("timeupdate",y),d.removeEventListener("loadedmetadata",b);}},[l,e]);let u=useCallback(()=>{(async()=>e.current&&(e.current.paused?(await e.current.play(),a(!0),announce(o(Ru.playing),"polite")):(e.current.pause(),a(!1),announce(o(Ru.paused),"polite"))))();},[o,e]),m=useCallback(d=>{e.current&&(e.current.currentTime=d*e.current.duration/100,announce(rk(e.current.currentTime,t.locale),"assertive"));},[t.locale,e]);return {isPlaying:r,progress:i,duration:s,togglePlay:u,seek:m,setProgress:n,formattedCurrentTime:e.current?.currentTime?Iu(e.current?.currentTime):"00:00",formattedDuration:s?Iu(s):"00:00",setIsSliderDragging:c}}var Ru=$({playing:{id:"playing",defaultMessage:"Playing"},paused:{id:"paused",defaultMessage:"Paused"}});function rk(e,o){let t=Math.floor(e/3600),r=Math.floor(e%3600/60),a=e%60,i={...t&&{hours:t},...r&&{minutes:r},seconds:Math.floor(a)};return new Intl.DurationFormat(o,{style:"long"}).format(i)}function Iu(e){let o=Math.floor(e%3600/60),t=Math.floor(e%60);return [o,t].map(r=>r.toString().padStart(2,"0")).join(":")}var Nu="_1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z69o _1yep5z69p _1yep5z69q",Su="rta2n91 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z69o _1yep5z69p _1yep5z69q _1yep5z6z9 _1yep5z6ut _1yep5z6uu _1yep5z6uv _1yep5z6166 _1yep5z6106",Lu="rta2n90";var Du=ao.forwardRef(({className:e,style:o,size:t="lg",sources:r,"data-block-id":a,"data-block-class":i,...n},s)=>{let p=ao.useRef(null),{isPlaying:l,progress:c,duration:u,togglePlay:m,seek:d,formattedDuration:f,formattedCurrentTime:y,setProgress:b,setIsSliderDragging:g}=Tu(p),{formatMessage:z}=F(),_=filterTruthyValues({"data-block-id":a,"data-block-class":i,"data-state":l?"playing":"paused","data-loaded":u>0});return jsxs("div",{..._,...n,className:classNames(Nu,"BaselineUI-AudioPlayer",e),role:"group",style:o,ref:s,children:[jsx(VisuallyHidden,{children:jsx("audio",{ref:p,children:r.map(({url:h,type:C})=>jsx("source",{src:h,type:C},h))})}),jsx(_e,{icon:l?PauseIcon:PlayIcon,variant:"toolbar",isSelected:l,size:t,"aria-label":z(l?pn.pause:pn.play),style:{borderRadius:"50%"},onPress:m}),jsxs("div",{className:Su,children:[jsx("span",{"aria-hidden":!0,children:y}),jsx(vo,{"aria-label":z(pn.audioTimeline),value:c,minValue:0,maxValue:100,className:Lu,onChange:h=>{b(h),g(!0);},onChangeEnd:h=>{d(h),g(!1);}}),jsx("span",{"aria-hidden":!0,children:f})]})]})});Du.displayName="AudioPlayer";var pn=$({play:{id:"play",defaultMessage:"Play"},pause:{id:"pause",defaultMessage:"Pause"},audioTimeline:{id:"audioTimeline",defaultMessage:"Audio timeline"}});var Eu="_1w920rnf _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6fs _1yep5z6ho _1yep5z6hp _1yep5z6hq",Fu="_1w920rn1 _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6ic _1yep5z6id _1yep5z6ie _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z69i _1yep5z69j _1yep5z69k",Hu="_1w920rn0 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6km",Dt=v({defaultClassName:"_1w920rn2 _1yep5z6d6 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6hl _1yep5z6hm _1yep5z6hn",variantClassNames:{isFocusVisible:{true:"_1yep5z6l1 _1yep5z6kz _1yep5z6hc"},isSelected:{true:"_1yep5z6l1 _1yep5z6kz _1yep5z6hc"},isLoading:{true:"_1yep5z614w _1yep5z614x _1yep5z614y"},imageWidth:{sm:"_1w920rn6",md:"_1w920rn7"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:!0,isSelected:!0},"_1w920rn8 _1yep5z6l1 _1yep5z6kz _1yep5z6hc"]]}),Ou="_1w920rnd _1yep5z6kw",Vu=v({defaultClassName:"_1w920rn9 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6fw _1yep5z6eu _1yep5z6dy",variantClassNames:{isFocusVisible:{true:"_1w920rna _1yep5z6l1 _1yep5z6kz _1yep5z6hc"},isSelected:{true:"_1w920rnb"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:!0,isSelected:!0},"_1w920rnc _1yep5z61rm _1yep5z61rl _1yep5z61nz"]]}),Au="_1w920rne";var $u=({items:e,ulRef:o})=>{let{length:t}=e,r=ao.useRef(null);return useLayoutEffect(()=>{if(!r.current)return;let a=r.current.closest(".BaselineUI-ImageGallery")?.querySelector(`[data-image-key='${e?.at(-1)?.key}']`)?.cloneNode(!0);invariant(a,"Node is not defined."),r.current?.prepend(a);},[e,o]),jsx("div",{className:Dt(),ref:r,children:jsx(B,{backgroundColor:"background.secondary.medium",borderRadius:"full",typography:"label.md.medium",color:"text.primary",position:"absolute",paddingX:"md",className:Au,children:t})})};var gk=({fit:e,item:o,deleteElement:t})=>{let{formatMessage:r}=F(),{imgProps:a,isLoading:i,isLoaded:n}=_o({src:o.data?.src,alt:o.data?.alt??""}),s=useTransition(n,{from:{opacity:0},enter:{opacity:1},leave:{opacity:0}});return i?jsx(So,{"aria-label":r(Et.loading)}):s((p,l)=>l&&jsx(animated.div,{role:"img","aria-label":a.alt,style:{...p,backgroundImage:`url(${a.src})`,backgroundSize:e},className:Ou,children:t}))},qu=({item:{value:e},options:{optionProps:o,isFocusVisible:t,isSelected:r},liRef:a,fit:i="contain",imageWidth:n=102,onDelete:s,aspectRatio:p,className:l,imageClassName:c,imageLabelClassName:u,renderImage:m=(d,{deleteElement:f})=>jsx(gk,{item:d,deleteElement:f,fit:i})})=>{let d=useId(),{formatMessage:f}=F();invariant(e&&$t(e),"Expected value to be a list option");let y=isNumber(n)?void 0:Dt({imageWidth:n}),b=isNumber(n)?{width:n}:void 0,g=s?jsx("div",{className:Eu,children:jsx(D,{"aria-label":f(Et.delete),size:"xs",icon:XIcon$2,onPress:()=>{s(e.id);},UNSAFE_NON_INTERACTIVE:!0})}):null;return jsxs("li",{...o,ref:a,className:classNames(Fu,l),"aria-labelledby":d,children:[jsx("div",{className:classNames(Dt({isFocusVisible:t,isSelected:r,isLoading:!0}),y,c),style:{aspectRatio:p?.toString(),...b},"data-image-key":e.id,children:m(e,{deleteElement:g??void 0,onDelete:s})}),jsx("span",{id:d,className:classNames(Vu({isFocusVisible:t,isSelected:r}),u),children:e.label})]})};function Ku(e,o){return e.find(t=>t.id===o)}function Gu(e,o,t){let r=e.findIndex(n=>n.id===o),a=[...t].map(n=>e.findIndex(s=>s.id===n)),i=[...e];for(let n of a){let[s]=i.splice(n,1);i.splice(r,0,s);}return i}function Wu(e,o,t){let r=e.findIndex(s=>s.id===o),a=[...t].map(s=>e.findIndex(p=>p.id===s)),i=[...e],n=0;for(let s of a){let[p]=i.splice(s-n,1);i.splice(r+1,0,p),n++;}return i}function dn(e){return e.map(o=>({id:o.id,label:o.label,data:{src:o.src,alt:o.alt}}))}function Xu(e){return e.map(o=>({id:o.id,label:o.label,src:o.data?.src,alt:o.data?.alt}))}var xk={width:0,display:"block"};var Qu=ao.forwardRef(({className:e,style:o,fit:t="cover",onReorder:r,"data-block-id":a,"data-block-class":i,onDelete:n,imageWidth:s="sm",aspectRatio:p=3/4,items:l,defaultItems:c=[],onKeyDown:u,imageContainerClassName:m,imageClassName:d,labelClassName:f,onListChange:y,renderImage:b,...g},z)=>{let _=ao.useRef(null),[h,C]=useState([]),{formatMessage:x}=F(),[k,w]=useControlledState(g.selectedKeys,g.defaultSelectedKeys??[],g.onSelectionChange),[N,P]=useControlledState(l?dn(l):void 0,dn(c),y?T=>{y?.(Xu(T));}:void 0),I=useCallback(T=>{let H=T.target.key,O=T.keys;if(T.target.dropPosition==="before"){let U=Gu(N,H,O);P(U);}else if(T.target.dropPosition==="after"){let U=Wu(N,H,O);P(U);}r?.(T);},[N,r,P]),M=useCallback(()=>{n&&h.length&&(P(N.filter(T=>!h.includes(T.id))),n(new Set(h)),C([]));},[h,N,n,P]),S=useCallback((T,H,O)=>jsx(qu,{item:T,options:H,liRef:O,fit:t,imageWidth:s,aspectRatio:p,onDelete:n?U=>{C([U]);}:void 0,renderImage:b,className:m,imageClassName:d,imageLabelClassName:f}),[t,s,p,n,b,m,d,f]),{keyboardProps:R}=useKeyboard({onKeyDown(T){if(u?.(T),T.key==="Backspace"||T.key==="Delete"){if(!n)return;if([...k].length)C([...k]);else {let O=T.target.dataset.key;C([O]);}}}});return jsxs("div",{...R,ref:z,style:o,className:classNames("BaselineUI-ImageGallery",e),"data-block-id":a,"data-block-class":i,children:[jsx(ae,{...g,selectedKeys:k,items:N,onReorder:I,layout:"grid",orientation:"vertical",className:Hu,ref:_,dropIndicatorStyle:xk,renderOption:S,renderDragPreview:T=>jsx($u,{items:T,ulRef:_}),onSelectionChange:w,getItems:T=>[...T].map(H=>{let O=Ku(N,H);return {src:O?.src||"",alt:O?.alt||"",key:H}})}),jsx(Ce,{isOpen:!![...h].length,onOpenChange:T=>{T||C([]);},children:jsx(Me,{isDismissable:!0,children:jsx(ia,{showCloseButton:!1,title:"Are you sure you want to delete this item?",primaryActionLabel:x(Et.delete),cancelLabel:x(Et.cancel),onCancel:()=>{C([]);},onPrimaryAction:M,autoFocusButton:"cancel"})})})]})});Qu.displayName="ImageGallery";var Et=$({delete:{id:"delete",defaultMessage:"Delete"},cancel:{id:"cancel",defaultMessage:"Cancel"},loading:{id:"loading",defaultMessage:"Loading"}});var Ju="_1sexph00",ef="_1sexph01 _1yep5z616p _1yep5z616q _1yep5z616r _1yep5z6191 _1yep5z6192 _1yep5z6193 _1yep5z61a7 _1yep5z61a8 _1yep5z61a9 _1yep5z617v _1yep5z617w _1yep5z617x _1yep5z61q4 _1yep5z61q5 _1yep5z61q6";var tf=ao.forwardRef(({className:e,style:o,items:t,"data-block-id":r,"data-block-class":a,hideLabel:i,size:n="md",isDisabled:s,showSelectedIcon:p=!0,excludeFromTabOrder:l,onPress:c,isSelected:u,defaultSelected:m,onButtonSelectionChange:d,...f},y)=>{let b=re(),g=useSelectState({items:t,...f,defaultSelectedKey:f.defaultSelectedKey||t?.[0]?.id,children:b,validationState:f.validationState==="error"?"invalid":"valid"}),[z,_]=useControlledState(u,!!m,I=>{d?.({isSelected:I,selectedKey:g.selectedKey});}),{hoverProps:h,isHovered:C}=useHover({isDisabled:s}),x=useMemo(()=>{let I=g.selectedItem;invariant(I);let M=I.textValue||I["aria-label"],S=I.value.icon,R={size:n,isSelected:z,onPress:T=>{_(!z),c?.(T);},isDisabled:s,excludeFromTabOrder:l};return i&&S?jsx(_e,{icon:S,"aria-label":M,variant:"toolbar",...R}):jsx(vr,{iconStart:S,label:M,...R})},[l,i,z,s,c,_,n,g.selectedItem]),k=useCallback(({buttonProps:I,isOpen:M,ref:S})=>jsx(_e,{...I,ref:S,icon:ChevronDownIcon,"aria-expanded":M,variant:"toolbar",size:n,isSelected:z,className:ef,isDisabled:s,excludeFromTabOrder:l}),[l,z,s,n]),w=filterTruthyValues({"data-block-id":r,"data-block-class":a,"data-hovered":C,"data-selected":z,"data-disabled":s}),N=de(y),P=useMemo(()=>({state:g,popoverAnchorRef:N}),[g,N]);return jsx(xr.Provider,{value:P,children:jsxs(B,{...h,role:"group",display:"inline-flex",flexDirection:"row",alignItems:"center",className:classNames(Ju,"BaselineUI-ButtonSelect",e),"aria-label":f["aria-label"],"aria-labelledby":f["aria-labelledby"],"aria-describedby":f["aria-describedby"],"aria-details":f["aria-details"],style:o,ref:N,...w,children:[x,jsx(Ke,{isDisabled:s,showSelectedIcon:p,placement:"bottom start",items:t,...f,variant:"ghost",renderTrigger:k})]})})});tf.displayName="ButtonSelect";var rf=v({defaultClassName:"_18v88n10 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6kv",variantClassNames:{labelPosition:{top:"_1yep5z613n _1yep5z613o _1yep5z613p",start:"_1yep5z613k _1yep5z613l _1yep5z613m _1yep5z6152 _1yep5z6153 _1yep5z6154 _1yep5z6ut _1yep5z6uu _1yep5z6uv"}},defaultVariants:{},compoundVariants:[]}),af=v({defaultClassName:"_18v88n1p _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6eu _1yep5z6kv _1yep5z6l6 _1yep5z6ky _1yep5z6dy",variantClassNames:{isDisabled:{true:"_18v88n1q _1yep5z6109"},labelPosition:{top:"_18v88n1r",start:"_18v88n1s"}},defaultVariants:{},compoundVariants:[]}),nf=v({defaultClassName:"_18v88n1t _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6ks",variantClassNames:{validationState:{valid:"_18v88n1u",error:"_1yep5z6zp",warning:"_1yep5z6zx"},isReadOnly:{true:"_1yep5z610b"}},defaultVariants:{},compoundVariants:[]}),sf=v({defaultClassName:"_18v88n1d _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6l9 _1yep5z6l7 _1yep5z6gq _1yep5z6ir _1yep5z6is _1yep5z6it",variantClassNames:{validationState:{valid:"_18v88n1e",error:"_1yep5z611k",warning:"_18v88n1g"},isHovered:{true:"_18v88n1h"},isFocused:{true:"_1yep5z6vt _1yep5z6vu _1yep5z6vv _1yep5z6wh _1yep5z6wi _1yep5z6wj _1yep5z6x5 _1yep5z6x6 _1yep5z6x7 _1yep5z6xt _1yep5z6xu _1yep5z6xv _1yep5z616k _1yep5z616i _1yep5z611y _1yep5z616b _1yep5z616a _1yep5z612n _1yep5z616d"},isDisabled:{true:"_18v88n1j"},variant:{primary:"_18v88n1k",ghost:"_18v88n1l"},isReadOnly:{true:"_1yep5z612n"}},defaultVariants:{},compoundVariants:[[{variant:"ghost",isHovered:!0,isFocused:!1,validationState:"valid"},"_1yep5z61rv _1yep5z61rt _1yep5z61nc"],[{variant:"ghost",isFocused:!1,isHovered:!1,validationState:"valid"},"_18v88n1n"],[{isHovered:!0,validationState:"valid",isDisabled:!1,isReadOnly:!1,isFocused:!1,variant:"primary"},"_1yep5z61nd"],[{isHovered:!0,validationState:"warning",isDisabled:!1,isReadOnly:!1,isFocused:!1},"_1yep5z61nd"],[{isReadOnly:!0,variant:"primary",isFocused:!1},"_18v88n1o"]]}),lf=v({defaultClassName:"_18v88n13 _1yep5z6dy _1yep5z6ev",variantClassNames:{isDisabled:{true:"_1yep5z6109"}},defaultVariants:{},compoundVariants:[]}),pf=v({defaultClassName:"_18v88n19 _1yep5z6i3 _1yep5z6i4 _1yep5z6i5",variantClassNames:{labelPosition:{top:"_1yep5z6sh _1yep5z6si _1yep5z6sj",start:"_1yep5z6me _1yep5z6mf _1yep5z6mg _1yep5z613n _1yep5z613o _1yep5z613p"},hasMessage:{true:"_18v88n1c"}},defaultVariants:{},compoundVariants:[[{labelPosition:"start",hasMessage:!1},"_1yep5z61q7 _1yep5z61q8 _1yep5z61q9"]]}),cf=v({defaultClassName:"_18v88n15 _1yep5z699 _1yep5z69a _1yep5z69b _1yep5z6ky",variantClassNames:{isFocusVisible:{true:"_1yep5z6116 _1yep5z612v _1yep5z6169"},isHovered:{true:"_1yep5z6116 _1yep5z612v _1yep5z6169"},isOpen:{true:"_1yep5z612v _1yep5z6169"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:!0},"_1yep5z61mh _1yep5z61o6 _1yep5z61rk"],[{isHovered:!0},"_1yep5z61mh _1yep5z61o6 _1yep5z61rk"],[{isOpen:!0},"_1yep5z61o6 _1yep5z61rk"]]});var uf=ao.forwardRef(({className:e,style:o,inputStyle:t,inputClassName:r,"data-block-id":a,"data-block-class":i,label:n,items:s,showSelectedIcon:p=!1,onSelectionChange:l,onInputChange:c,isInvalid:u=!1,labelPosition:m="top",validationState:d="valid",variant:f="primary",toggleLabel:y,renderOption:b,showIcon:g=!0,filter:z,minValue:_,maxValue:h,inputType:C="text",...x},k)=>{let{contains:w}=useFilter({sensitivity:"base"}),N=re(),P=useComboBoxState({...x,defaultFilter:z||w,defaultItems:s,onSelectionChange:l,onInputChange:c,children:N,validationState:u?"invalid":"valid"}),I=ao.useRef(null),M=ao.useRef(null),S=ao.useRef(null),R=ao.useRef(null),T=ao.useRef(null),{buttonProps:H,inputProps:O,listBoxProps:U,labelProps:ie,errorMessageProps:Y,descriptionProps:Z,validationErrors:ce}=useComboBox({...x,inputRef:M,defaultItems:s,buttonRef:I,listBoxRef:S,popoverRef:R,validationState:d==="error"?"invalid":"valid"},P),A=x.errorMessage||ce.join(" "),G=xe({...x,errorMessage:A,descriptionProps:Z,errorMessageProps:Y,labelPosition:m});A&&(d="error");let{hoverProps:ue,isHovered:Re}=useHover({isDisabled:x.isDisabled}),{isFocused:ze,focusProps:he,isFocusVisible:ge}=useFocusRing(),Ee=Ro({isReadOnly:x.isReadOnly,validationState:d}),Q=filterTruthyValues({"data-read-only":x.isReadOnly,"data-disabled":x.isDisabled,"data-validation-state":d,"data-focused":ze,"data-focus-visible":ge}),{labelProps:se,fieldProps:Xo}=useLabel({label:n});return jsx(Je.Provider,{value:P,children:jsxs("div",{className:classNames(rf({labelPosition:m}),e,"BaselineUI-ComboBox"),"data-block-id":a,"data-block-class":i,style:o,ref:k,children:[n||m==="start"&&G?jsxs("div",{className:pf({labelPosition:m,hasMessage:!!G}),children:[jsx("label",{...mergeProps(ie,se),className:lf({isDisabled:x.isDisabled}),children:n}),m==="start"&&G]}):null,jsxs("div",{...ue,className:sf({validationState:d,isHovered:Re,isFocused:ze,variant:f,isReadOnly:!!x.isReadOnly,isDisabled:!!x.isDisabled}),ref:T,children:[jsx("input",{...mergeProps(O,he,Q,Xo,C==="number"?{type:"number",min:_,max:h,onKeyDown:Qe=>{(Qe.key==="ArrowUp"||Qe.key==="ArrowDown")&&Qe.preventDefault();}}:null),ref:M,className:classNames(af({isDisabled:x.isDisabled,labelPosition:m}),"BaselineUI-ComboBox-Input",r),style:t}),Ee&&g?jsx(Ee,{className:nf({validationState:d,isReadOnly:x.isReadOnly}),size:16}):null,jsx(j,{...H,ref:I,variant:"popover",label:y,className:cf({isFocusVisible:!x.isDisabled&&!x.isReadOnly&&ge,isHovered:!x.isDisabled&&!x.isReadOnly&&Re,isOpen:P.isOpen})})]}),P.isOpen?jsx(me,{className:$e,ref:R,triggerRef:T,state:P,children:jsx(ae,{...U,items:s,ref:S,renderOption:b,selectionMode:"single",showSelectedIcon:p,className:mr})}):null,m==="top"&&G]})})});uf.displayName="ComboBox";var ff="byycd00";var fn=ao.forwardRef(({item:e,renderGridItem:o,state:t},r)=>{let a=de(r),i=useGridListItem({node:e},t,a),n=t.selectionManager.selectionMode!=="none"&&t.selectionManager.selectionBehavior==="toggle",{checkboxProps:s}=useGridListSelectionCheckbox({key:e.key},t);return o(e,{...i,checkBoxProps:n?s:void 0},a)});fn.displayName="GridListItem";var bf=ao.forwardRef(({className:e,style:o,"data-block-id":t,...r},a)=>{let i=re(),n=useListState({...r,children:i}),s=de(a),{gridProps:p}=useGridList(r,n,s);return jsx("ul",{...p,className:classNames(ff,e),"data-block-id":t,style:o,ref:s,children:[...n.collection].map(l=>jsx(fn,{item:l,state:n,renderGridItem:r.renderGridItem},l.key))})});bf.displayName="GridList";var gf="_1dc3b8m0";var _f=ao.forwardRef(({className:e,selectionMode:o,style:t,"data-block-id":r,"data-block-class":a,tooltipProps:i,renderActionItem:n,...s},p)=>{let l=de(p),c=re(),u=useListState({...s,selectionMode:o,suppressTextValueWarning:!0,children:c}),{actionGroupProps:m}=useActionGroup({...s,selectionMode:o,children:c},u,l);return jsx(B,{...m,display:"flex",flexDirection:"row",gap:"xs",className:classNames("BaselineUI-ActionGroup",e),"data-block-id":r,"data-block-class":a,style:t,ref:l,children:[...u.collection].map(d=>(invariant(d.value),jsx(o0,{item:d,state:u,isDisabled:s.isDisabled,onAction:s.onAction,tooltipProps:i,renderActionItem:n},d.key)))})});_f.displayName="ActionGroup";var o0=({item:e,state:o,tooltipProps:t,renderActionItem:r,onAction:a,isDisabled:i})=>{let{buttonProps:n}=useActionGroupItem({key:e.key},o),s=i||o.selectionManager.isDisabled(e.key),p=o.selectionManager.isSelected(e.key);invariant(e.value);let{icon:l}=e.value;invariant(l);let c=useMemo(()=>(invariant(e.value),typeof t=="function"?t(e.value):t),[t,e.value]);return jsx(PressResponder,{...mergeProps(n,{onPress:()=>{a?.(e.key);}}),children:jsx(ke,{text:e.textValue,size:"sm",variant:"inverse",includeArrow:!1,offset:4,...c,children:r?.(e,{isSelected:p,isDisabled:s})||jsx(D,{variant:"tertiary",icon:l,"aria-label":e.textValue,size:"sm",isDisabled:s,className:classNames({[gf]:p},"BaselineUI-ActionGroup-Item")})})})};var zf="ujkypy0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e",hf="_1yep5z61ov _1yep5z61ow _1yep5z61ox _1yep5z61g1 _1yep5z61g2 _1yep5z61g3";var Cf=ao.forwardRef(({className:e,style:o,items:t,optionsContainerClassName:r,label:a,icon:i,value:n,defaultValue:s,onChange:p,isDisabled:l,optionClassName:c,optionStyle:u,labelPosition:m="top","data-block-id":d,"data-block-class":f,...y},b)=>{let g=useMemo(()=>t.map(_=>({id:_.color,label:_.label})),[t]),z=useId();return useEffect(()=>{!a&&!y["aria-label"]&&!y["aria-labelledby"]&&console.warn("ColorSwatchPicker: Please provide a label or aria-label for accessibility.");},[a,y]),jsxs(B,{...da(y),className:classNames("BaselineUI-ColorSwatchPicker",e),"data-block-id":d,"data-block-class":f,display:"flex",flexDirection:m==="top"?"column":"row",alignItems:m==="top"?"flex-start":"center",justifyContent:"space-between",gap:"md",style:o,ref:b,children:[i||a?jsxs(B,{display:"flex",alignItems:"center",gap:"md",children:[i?jsx(i,{size:24,className:sprinkles({color:"icon.primary"})}):null,a?jsx(X,{id:z,type:"label",size:"sm",children:a}):null]}):null,jsx(ae,{className:classNames(hf,r),selectionMode:"single",items:g,orientation:"horizontal",defaultSelectedKeys:s?[s]:void 0,disabledKeys:l?g.map(_=>_.id):void 0,isDisabled:l,selectedKeys:n?[n]:void 0,onSelectionChange:_=>{p?.([..._][0]);},optionClassName:c,optionStyle:u,renderOption:({key:_,textValue:h},{isSelected:C,isFocusVisible:x,isDisabled:k,optionProps:w},N)=>jsx("li",{...w,"data-disabled":k,className:classNames(zf,w.className),ref:N,children:jsx(We,{isFocusVisible:x,color:_,isSelected:C,"aria-label":h,isInteractive:!0,isDisabled:k})}),...y,"aria-labelledby":a?z:y["aria-labelledby"]})]})});Cf.displayName="ColorSwatchPicker";
50
+ var Te=typeof document<"u"?ro.useLayoutEffect:()=>{};function ca(e){let o=useRef(null);return Te(()=>{o.current=e;},[e]),useCallback((...t)=>{let r=o.current;return r?.(...t)},[])}function da(e){let[o,t]=useState(e),r=useRef(null),a=ca(()=>{if(!r.current)return;let i=r.current.next();if(i.done){r.current=null;return}o===i.value?a():t(i.value);});Te(()=>{r.current&&a();});let n=ca(i=>{r.current=i(o),a();});return [o,n]}var ve=e=>{var o;return (o=e?.ownerDocument)!==null&&o!==void 0?o:document},ee=e=>{if(e&&"window"in e&&e.window===e)return e;let o=$t(e);return o instanceof ShadowRoot?o.ownerDocument.defaultView||window:o?.defaultView||window},$t=e=>{if(!e)return document;let o=e.getRootNode?e.getRootNode():document;return e.isConnected?(o):null};function M(...e){return e.length===1?e[0]:o=>{for(let t of e)typeof t=="function"?t(o):t!=null&&(t.current=o);}}var Tf=new Set(["id"]),Nf=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),Sf=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),Lf=/^(data-.*)$/;function ma(e,o={}){let{labelable:t,isLink:r,propNames:a}=o,n={};for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(Tf.has(i)||t&&Nf.has(i)||r&&Sf.has(i)||a?.has(i)||Lf.test(i))&&(n[i]=e[i]);return n}function fi(e){var o;return typeof window>"u"||window.navigator==null?!1:((o=window.navigator.userAgentData)===null||o===void 0?void 0:o.brands.some(t=>e.test(t.brand)))||e.test(window.navigator.userAgent)}function ua(e){var o;return typeof window<"u"&&window.navigator!=null?e.test(((o=window.navigator.userAgentData)===null||o===void 0?void 0:o.platform)||window.navigator.platform):!1}function yi(){return ua(/^Mac/i)}function bi(){return ua(/^iPhone/i)}function gi(){return ua(/^iPad/i)||yi()&&navigator.maxTouchPoints>1}function fa(){return bi()||gi()}function ya(){return fi(/Android/i)}function Jo(){return fi(/Firefox/i)}function de(e){let o=useRef(null);return useMemo(()=>({get current(){return o.current},set current(t){o.current=t,typeof e=="function"?e(t):e&&(e.current=t);}}),[e])}function Ef(){return typeof window.ResizeObserver<"u"}function ba(e){let{ref:o,onResize:t}=e;useEffect(()=>{let r=o?.current;if(r)if(Ef()){let a=new window.ResizeObserver(n=>{n.length&&t();});return a.observe(r),()=>{r&&a.unobserve(r);}}else return window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1);}},[t,o]);}function Ut(e){return !!e&&"label"in e&&!!e.label&&!("children"in e)}function vi(e){return !!e&&"children"in e&&!!e.children&&"title"in e}function Of(e){return vi(e)?jsx(Section,{items:e.children,title:e.title,children:o=>jsx(Item,{textValue:o.label,children:o.label},o.id)},e.id):jsx(Item,{textValue:e.label,children:e.label},e.id)}function re(){return useCallback(e=>Of(e),[])}function zi(e,o,t){let{direction:r}=useLocale(),a=useDraggableCollectionState({...e,collection:o.collection,selectionManager:o.selectionManager,isDisabled:!e.enableReorder,getItems:e.getItems||(s=>[...s].map(p=>{let l=o.collection.getItem(p);return invariant(l,"Expected item to be defined."),{"text/plain":l.textValue}}))});useDraggableCollection(e,a,t);let n=useDroppableCollectionState({...e,collection:o.collection,selectionManager:o.selectionManager}),{collectionProps:i}=useDroppableCollection({...e,keyboardDelegate:new ListKeyboardDelegate({collection:o.collection,disabledKeys:o.disabledKeys,ref:t,orientation:e.orientation,layout:e.layout,direction:r}),dropTargetDelegate:new ListDropTargetDelegate(o.collection,t)},n,t);return {collectionProps:i,dragState:a,dropState:n}}function Wf(e,o){if(typeof e!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var r=t.call(e,o||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return (o==="string"?String:Number)(e)}function Xf(e){var o=Wf(e,"string");return typeof o=="symbol"?o:String(o)}function Yf(e,o,t){return o=Xf(o),o in e?Object.defineProperty(e,o,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[o]=t,e}function hi(e,o){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);o&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,r);}return t}function xi(e){for(var o=1;o<arguments.length;o++){var t=arguments[o]!=null?arguments[o]:{};o%2?hi(Object(t),!0).forEach(function(r){Yf(e,r,t[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):hi(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));});}return e}function Ci(e,o){var t={};for(var r in e)t[r]=o(e[r],r);return t}var Zf=(e,o,t)=>{for(var r of Object.keys(e)){var a;if(e[r]!==((a=o[r])!==null&&a!==void 0?a:t[r]))return !1}return !0},v=e=>{var o=t=>{var r=e.defaultClassName,a=xi(xi({},e.defaultVariants),t);for(var n in a){var i,s=(i=a[n])!==null&&i!==void 0?i:e.defaultVariants[n];if(s!=null){var p=s;typeof p=="boolean"&&(p=p===!0?"true":"false");var l=e.variantClassNames[n][p];l&&(r+=" "+l);}}for(var[c,m]of e.compoundVariants)Zf(c,a,e.defaultVariants)&&(r+=" "+m);return r};return o.variants=()=>Object.keys(e.variantClassNames),o.classNames={get base(){return e.defaultClassName.split(" ")[0]},get variants(){return Ci(e.variantClassNames,t=>Ci(t,r=>r.split(" ")[0]))}},o};var Pi=v({defaultClassName:"_6n12k9b _1yep5z6l0 _1yep5z6kz _1yep5z6hk _1yep5z6ki",variantClassNames:{isDropTarget:{true:"_1yep5z612n"},orientation:{vertical:"_1yep5z6166",horizontal:"_1yep5z6167"}},defaultVariants:{},compoundVariants:[]}),ki="_6n12k98 _1yep5z6ky _1yep5z6i0 _1yep5z6i1 _1yep5z6i2",wi=v({defaultClassName:"_6n12k99 _1yep5z6ev _1yep5z6da _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z6ey"}},defaultVariants:{},compoundVariants:[]}),Ri=v({defaultClassName:"_6n12k91 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jr _1yep5z6js _1yep5z6jt _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6dy _1yep5z6eu _1yep5z6ki _1yep5z6kl _1yep5z6ky _1yep5z6kx _1yep5z6kv _1yep5z6ks",variantClassNames:{isSelected:{},isFocused:{true:"_1yep5z612n _1yep5z616c _1yep5z616a _1yep5z616d _1yep5z612w _1yep5z612x _1yep5z612y"},isHovered:{true:"_1yep5z6114",false:"_1yep5z6113"},isFirstChild:{true:"_6n12k95"},isLastChild:{true:"_6n12k96"},isDisabled:{true:"z9nup83 _1yep5z6109"}},defaultVariants:{},compoundVariants:[]}),Ii="_6n12k9f _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it",Ti="_6n12k90";var Ni=v({defaultClassName:"gukncs0",variantClassNames:{isVertical:{true:"gukncs1"},isSecondary:{true:"gukncs2"}},defaultVariants:{},compoundVariants:[]});var O=ro.forwardRef(({className:e,style:o,variant:t="primary",orientation:r="horizontal",UNSAFE_omitRole:a,elementType:n="div","data-block-id":i,"data-block-class":s,...p},l)=>{let{separatorProps:c}=useSeparator({...p,orientation:r,elementType:n});return jsx(n,{...c,className:classNames(Ni({isVertical:r==="vertical",isSecondary:t==="secondary"}),"BaselineUI-Separator",e),"data-orientation":r,"data-block-id":i,"data-block-class":s,style:o,role:a?void 0:c.role,ref:l})});O.displayName="Separator";function ny(e){return sprinkles.properties.has(e)}var B=ro.forwardRef(({elementType:e="div",children:o,...t},r)=>{let a=e,{sprinkleProps:n,domProps:i}=useMemo(()=>{let s={},p={};for(let l in t)ny(l)?s[l]=t[l]:p[l]=t[l];return {sprinkleProps:s,domProps:p}},[t]);return jsx(a,{...i,className:classNames(sprinkles(n),"BaselineUI-Box",i.className),ref:r,children:o})});B.displayName="Box";var ot=ro.forwardRef(({item:e,isDisabled:o,isFocusVisible:t,isSelected:r,liProps:a,showSelectedIcon:n,description:i,descriptionProps:s,labelProps:p,isFocused:l,isPressed:c,_state:m},u)=>{invariant(e.value&&Ut(e.value),"Item cannot be a section");let{icon:d,label:f}=e.value,{hoverProps:y,isHovered:b}=useHover({isDisabled:o}),g=filterTruthyValues({"data-selected":r,"data-disabled":o,"data-focused":l,"data-hovered":b,"data-pressed":c,"data-focus-visible":t,"data-selection-mode":m.selectionManager.selectionMode});return jsxs("li",{...mergeProps(a,y,g),className:classNames(Ri({isHovered:b,isFocused:t,isFirstChild:m.collection.getFirstKey()===e.key,isLastChild:m.collection.getLastKey()===e.key,isDisabled:o}),"BaselineUI-ListBox-Option"),ref:u,children:[jsxs(B,{display:"flex",alignItems:"center",gap:"lg",children:[n?jsx("span",{"aria-hidden":!0,style:{height:24,width:24},children:r?jsx(CheckmarkIcon,{size:24}):null}):null,d?jsx(d,{size:24}):null,jsx("span",{...p,children:f})]}),i?jsx("span",{className:wi({isDisabled:o}),...s,children:i}):null]})});ot.displayName="DefaultRenderOption";var _a=({dropState:e,orientation:o="vertical",dropIndicatorStyle:t,dropIndicatorClassName:r,renderDropIndicator:a=({isDropTarget:i,isHidden:s,dropIndicatorProps:p,orientation:l},c)=>s?null:jsx("li",{...p,ref:c,"data-drop-target":i,className:classNames(Pi({isDropTarget:i,orientation:l}),"BaselineUI-DropIndicator",r),style:t}),...n})=>{let i=ro.useRef(null),{dropIndicatorProps:s,isHidden:p,isDropTarget:l}=useDropIndicator(n,e,i);return a({dropIndicatorProps:{...s,role:"option"},isHidden:p,isDropTarget:l,orientation:o},i)};var Ei=({item:e,children:o,state:t,dragState:r,...a})=>{let{dragProps:n}=useDraggableItem({key:e.key},r);return jsxs(Fragment,{children:[jsx(_a,{target:{type:"item",key:e.key,dropPosition:"before"},...a}),o(n),t.collection.getKeyAfter(e.key)==null&&jsx(_a,{target:{type:"item",key:e.key,dropPosition:"after"},...a})]})};Ei.displayName="DraggableListOption";var tt=ro.forwardRef(({item:e,renderOption:o=(u,d,f)=>jsx(ot,{item:u,liProps:d.optionProps,...d,ref:f}),showSelectedIcon:t,state:r,dragState:a,dropState:n,orientation:i,dropIndicatorStyle:s,dropIndicatorClassName:p,optionStyle:l,optionClassName:c},m)=>{let u=ro.useRef(null),d=useOption({key:e.key},r,u),{value:f}=e;invariant(!!f),invariant(!("children"in e),"ListSection should not be passed to ListOption");let y={style:typeof l=="function"?l(f):l,className:typeof c=="function"?c(f):c};return a&&n?jsx(Ei,{orientation:i,state:r,item:e,dropState:n,dragState:a,dropIndicatorStyle:s,dropIndicatorClassName:p,children:b=>o(e,{...d,showSelectedIcon:t,_state:r,optionProps:mergeProps(d.optionProps,b,y)},M(u,m))}):o(e,{...d,showSelectedIcon:t,_state:r,optionProps:mergeProps(d.optionProps,y)},M(u,m))});tt.displayName="Option";var Oi=({section:e,state:o,sectionClassName:t,sectionStyle:r,showSectionHeader:a,renderSectionHeader:n,withSectionHeaderPadding:i=!1,...s})=>{let p=ro.useRef(null),{itemProps:l,groupProps:c,headingProps:m}=useListBoxSection({heading:a?n?.(e,p)||e.rendered:void 0,"aria-label":e["aria-label"]}),u=o.collection.getChildren?.(e.key);invariant(u,"items with type `section` must have children");let{value:d}=e,f=typeof r=="function"?r(d):r,y=typeof t=="function"?t(d):t;return jsxs(Fragment,{children:[e.key!==o.collection.getFirstKey()&&jsx(O,{UNSAFE_omitRole:!0}),jsxs("li",{...l,style:{...l.style,...f},className:classNames(Ti,y,"BaselineUI-ListBox-Section"),children:[e.rendered&&a?n?.(e,p)||jsx(B,{...m,className:classNames("BaselineUI-ListBox-SectionHeader",Ii),ref:p,paddingX:"lg",typography:"label.md.medium",color:"text.primary",paddingInlineStart:i?"5xl":"lg",paddingInlineEnd:"lg",children:e.rendered}):null,jsx("ul",{...c,children:[...u].map(b=>jsx(tt,{item:b,state:o,...s},b.key))})]})]})};var Qe=ro.createContext(null),za=ro.forwardRef(({className:e,layout:o="stack",orientation:t="vertical",showSelectedIcon:r=!0,style:a,renderOption:n,enableReorder:i=!1,"data-block-id":s,"data-block-class":p,renderDragPreview:l,onReorder:c,state:m,listBoxHandle:u,...d},f)=>{let y=ro.useRef(null),{direction:b}=useLocale(),g=ro.useRef(null),{listBoxProps:z}=useListBox({...d,shouldSelectOnPressUp:i,keyboardDelegate:new ListKeyboardDelegate({collection:m.collection,ref:g,layout:o,orientation:t,direction:b,disabledKeys:m.disabledKeys})},m,g);useImperativeHandle(u,()=>({scrollIntoView:(S,T)=>{g.current?.querySelector(`[data-key="${S}"][role="option"]`)?.scrollIntoView(T);}}));let _=useReducedMotion(),h=useCallback(S=>{let T=ve(g.current);c&&(!_&&"startViewTransition"in T?T.startViewTransition(()=>{c(S);}):c(S));},[c,_]),{collectionProps:P,dragState:x,dropState:k}=zi({...d,onReorder:h,layout:o,orientation:t,enableReorder:i,preview:y},m,g),{isFocusVisible:w,isFocused:I,focusProps:N}=useFocusRing(),L=filterTruthyValues({"data-block-id":s,"data-block-class":p,"data-layout":o,"data-empty":m.collection.size===0,"data-focused":I,"data-focus-visible":w,"data-orientation":t});return jsxs("ul",{...mergeProps(z,N,L,P),className:classNames(ki,"BaselineUI-ListBox",e),style:a,ref:M(f,g),children:[[...m.collection].map(S=>{let T={key:S.key,state:m,dragState:x,dropState:k,renderOption:n,renderDropIndicator:d.renderDropIndicator,renderSectionHeader:d.renderSectionHeader,showSelectedIcon:r,orientation:t,dropIndicatorStyle:d.dropIndicatorStyle,dropIndicatorClassName:d.dropIndicatorClassName,optionStyle:d.optionStyle,optionClassName:d.optionClassName,showSectionHeader:d.showSectionHeader,withSectionHeaderPadding:d.withSectionHeaderPadding};return S.type==="section"?jsx(Oi,{...T,section:S}):jsx(tt,{...T,item:S})}),l?jsx(DragPreview,{ref:y,children:l}):null]})});za.displayName="ListBoxCore";var Vi=ro.forwardRef((e,o)=>{let t=re(),r=useListState({...e,children:t});return jsx(za,{...e,ref:o,state:r})});Vi.displayName="ListBoxStandalone";var ae=ro.forwardRef((e,o)=>{let t=useContext(Qe);return useEffect(()=>{if(!e.items&&!t)throw new Error("ListBox: You must provide a `state` or `items` prop to render the listbox.")},[e.items,t]),t?jsx(za,{...e,ref:o,state:t}):jsx(Vi,{...e,ref:o})});ae.displayName="ListBox";var Gt="uf19bsf _1yep5z6ki",Ai=v({defaultClassName:"uf19bs0 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f0 _1yep5z6kx _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6ks",variantClassNames:{size:{xxs:"uf19bs1",xs:"uf19bs2",sm:"uf19bs3",md:"uf19bs4",lg:"uf19bs5 _1yep5z6vw _1yep5z6vx _1yep5z6vy _1yep5z6wk _1yep5z6wl _1yep5z6wm _1yep5z6x8 _1yep5z6x9 _1yep5z6xa _1yep5z6xw _1yep5z6xx _1yep5z6xy"},isHovered:{true:"uf19bs6"},isDisabled:{true:"uf19bs7 _1yep5z610d"},isFocusVisible:{true:"uf19bs8"},variant:{primary:"uf19bs9",secondary:"uf19bsa",tertiary:"uf19bsb",ghost:"uf19bsc",toolbar:"uf19bsd _1yep5z6we _1yep5z6wf _1yep5z6wg _1yep5z6x2 _1yep5z6x3 _1yep5z6x4 _1yep5z6xq _1yep5z6xr _1yep5z6xs _1yep5z6ye _1yep5z6yf _1yep5z6yg",popover:"uf19bse _1yep5z6oz _1yep5z6p0 _1yep5z6p1 _1yep5z6mn _1yep5z6mo _1yep5z6mp _1yep5z6le _1yep5z6lf _1yep5z6lg _1yep5z6nq _1yep5z6nr _1yep5z6ns _1yep5z6uz _1yep5z6v0 _1yep5z6v1"}},defaultVariants:{},compoundVariants:[[{variant:"toolbar",isHovered:!0,isFocusVisible:!1},"_1yep5z61mg"],[{variant:"primary",isHovered:!0,isFocusVisible:!1},"_1yep5z61mg"],[{variant:"secondary",isHovered:!0,isFocusVisible:!1},"_1yep5z61ln"],[{variant:"tertiary",isHovered:!0,isFocusVisible:!1},"_1yep5z61lm _1yep5z61mg"],[{variant:"ghost",isHovered:!0,isFocusVisible:!1},"_1yep5z61ls"],[{variant:"popover",isHovered:!0,isFocusVisible:!1},"_1yep5z61o1 _1yep5z61rl _1yep5z61rp _1yep5z61rm"],[{variant:"ghost",isDisabled:!1},"_1yep5z61lr"],[{variant:"popover",size:"lg"},"_1yep5z61h4 _1yep5z61h5 _1yep5z61h6 _1yep5z61hs _1yep5z61ht _1yep5z61hu _1yep5z61ig _1yep5z61ih _1yep5z61ii _1yep5z61j4 _1yep5z61j5 _1yep5z61j6"]]});var rt=ro.createContext({state:null,overlayTriggerAria:{triggerProps:{},overlayProps:{}},triggerRef:void 0}),Ne=({children:e,...o})=>{let t=ro.useRef(null),r=useOverlayTriggerState(o),a=useOverlayTrigger(o,r),n=useMemo(()=>({state:r,overlayTriggerAria:a,triggerRef:t}),[r,a]);return jsx(rt.Provider,{value:n,children:e})};var $i={bottom:"_1gzftth2",top:"_1gzftth3",right:"_1gzftth4",left:"_1gzftth5"},Ui="_1gzftth1 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2",qi="_1gzftth6",Ki="_1gzftth8",Gi="_1gzftth7",Wi="var(--_1gzftth0)";function KR(e){return e.closest(".BaselineUI-Portal")||e.closest(".BaselineUI-Popover-Content")}function Xi(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 Wt=ro.createContext({isSelected:!1,ref:void 0}),Se=({children:e,anchorRect:o})=>{let{state:t,overlayTriggerAria:r,triggerRef:a}=useContext(rt);invariant(t,"PopoverTrigger must be used within a Popover");let{triggerProps:n}=r,i=useMemo(()=>({...n,isSelected:t.isOpen,ref:a}),[n,t.isOpen,a]);return invariant(!o&&e||o&&!e,"Either one of anchorRect or children has to be provided."),invariant(!o||Xi(o),"If provided, the anchorRect prop must be an object with left and top number values, and optionally width and height."),jsx(Wt.Provider,{value:i,children:o?jsx("button",{className:classNames(Ki,"BaselineUI-PopoverTrigger-Hidden"),style:o,ref:a,tabIndex:-1},JSON.stringify(o)):e})};var Xt=e=>{let o=ro.useRef(null),{ref:t,...r}=useContext(Wt)||{},{buttonProps:a,isPressed:n}=useButton({...e,...r},o);return {buttonProps:a,isPressed:n,ref:M(o,t||null)}},Yt=(e,o)=>{let t=ro.useRef(null),{ref:r,...a}=useContext(Wt)||{},{buttonProps:n,isPressed:i}=useToggleButton({...e,...a},o,t);return (n.role==="radio"||n.role==="checkbox")&&(n["aria-pressed"]=void 0),{buttonProps:n,isPressed:i,ref:M(t,r||null)}};var Zt=v({defaultClassName:"oom8bs0 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6kx _1yep5z6ky _1yep5z6ks _1yep5z6dy _1yep5z6ki",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:!0},"oom8bsg"],[{variant:"secondary",isHovered:!0},"oom8bsh"],[{variant:"tertiary",isHovered:!0},"oom8bsi"],[{variant:"popover",isHovered:!0},"oom8bsj"],[{variant:"ghost",isHovered:!0},"oom8bsk"],[{variant:"success",isHovered:!0},"oom8bsl"],[{variant:"warning",isHovered:!0},"oom8bsm"],[{variant:"error",isHovered:!0},"oom8bsn"],[{variant:"primary",isFocusVisible:!0},"oom8bso"],[{variant:"tertiary",isFocusVisible:!0},"oom8bsp"],[{variant:"success",isFocusVisible:!0},"oom8bsq"],[{variant:"warning",isFocusVisible:!0},"oom8bsr"],[{variant:"error",isFocusVisible:!0},"oom8bss"]]});var a1={sm:16,md:20,lg:24},A=ro.forwardRef(({label:e,style:o,className:t,iconStart:r,iconEnd:a,variant:n="primary",elementType:i="button",isDisabled:s,size:p="sm","data-block-id":l,"data-block-class":c,...m},u)=>{let{buttonProps:d,isPressed:f,ref:y}=Xt({...m,elementType:i,isDisabled:s}),b=a1[p],{hoverProps:g,isHovered:z}=useHover({isDisabled:s}),{isFocusVisible:_,isFocused:h,focusProps:P}=useFocusRing(),x=filterTruthyValues({"data-block-id":l,"data-block-class":c,"data-disabled":s,"data-focused":h,"data-focus-visible":_,"data-hovered":z,"data-pressed":f});return jsxs(i,{...mergeProps(d,g,P,x),className:classNames(Zt({isDisabled:!!s,isFocusVisible:_,isHovered:z,variant:n,size:p}),"BaselineUI-ActionButton",t),style:o,ref:M(u,y),children:[!!r&&jsx(r,{size:b}),e,!!a&&jsx(a,{size:b}),n==="popover"&&jsx(ChevronDownIcon,{size:8,className:Gt})]})});A.displayName="ActionButton";var Ji=v({defaultClassName:"z9nup84",variantClassNames:{size:{xs:"z9nup85",sm:"z9nup86"}},defaultVariants:{},compoundVariants:[]});var Qt="z9nup80",mo="z9nup83",es="z9nup87";var os=ro.forwardRef(({className:e,node:o,...t},r)=>{let a=ro.useRef(null);return ro.useEffect(()=>{let n=a.current;return n?.append(o),()=>{n?.contains(o)&&o.remove();}},[o]),jsx("div",{className:classNames(Qt,e),ref:M(r,a),...t})});os.displayName="DomNodeRenderer";var ts="_14uvjig0 z9nup81",rs="_14uvjig7",as="_14uvjig3",ns=v({defaultClassName:"_14uvjig4",variantClassNames:{isDisabled:{true:"_14uvjig5"},hasNumberInput:{false:"_14uvjig6"}},defaultVariants:{},compoundVariants:[]}),is=v({defaultClassName:"_14uvjige _14uvjig1",variantClassNames:{active:{true:"_14uvjigf _14uvjig2"},isDisabled:{true:"_14uvjigg"},isReadOnly:{true:"_14uvjigh"},isFocusVisible:{true:"_14uvjigi _14uvjig2"},isHovered:{true:"_14uvjigj _14uvjig2"}},defaultVariants:{},compoundVariants:[]}),ss="_14uvjig8",ls=v({defaultClassName:"_14uvjig9 _14uvjig1",variantClassNames:{active:{true:"_14uvjig2"},isFocusVisible:{true:"_14uvjigb _14uvjig2"},isDisabled:{true:"_14uvjigc"},isHovered:{true:"_14uvjig2"}},defaultVariants:{},compoundVariants:[]});var uo=v({defaultClassName:"nrh1ehx",variantClassNames:{isDisabled:{true:"nrh1ehy"},hasError:{true:"nrh1ehz"},labelPosition:{start:"nrh1eh10",top:"nrh1eh11"}},defaultVariants:{},compoundVariants:[]}),Jt=v({defaultClassName:"nrh1eho",variantClassNames:{isDisabled:{true:"nrh1ehp"},labelPosition:{top:"nrh1ehq",start:"nrh1ehr"}},defaultVariants:{},compoundVariants:[]}),fo=v({defaultClassName:"nrh1ehs",variantClassNames:{validationState:{valid:"nrh1eht",error:"nrh1ehu",warning:"nrh1ehv"},isReadOnly:{true:"nrh1ehw"}},defaultVariants:{},compoundVariants:[]}),Fe="nrh1eh3",He=v({defaultClassName:"nrh1eh4",variantClassNames:{labelPosition:{top:"nrh1eh5",start:"nrh1eh6"},hasMessage:{true:"nrh1eh7"}},defaultVariants:{},compoundVariants:[[{labelPosition:"start",hasMessage:!1},"nrh1eh8"]]}),Oe=v({defaultClassName:"nrh1eh0",variantClassNames:{labelPosition:{top:"z9nup81",start:"nrh1eh2 z9nup82"}},defaultVariants:{},compoundVariants:[]}),yo=v({defaultClassName:"nrh1eh9 z9nup82",variantClassNames:{validationState:{valid:"nrh1eha",error:"nrh1ehb",warning:"nrh1ehc"},isHovered:{true:"nrh1ehd"},isFocused:{true:"nrh1ehe"},isDisabled:{true:"nrh1ehf"},variant:{primary:"nrh1ehg",ghost:"nrh1ehh"},isReadOnly:{true:"nrh1ehi"}},defaultVariants:{},compoundVariants:[[{variant:"ghost",isHovered:!0,isFocused:!1,validationState:"valid"},"nrh1ehj"],[{variant:"ghost",isFocused:!1,isHovered:!1,validationState:"valid"},"nrh1ehk"],[{isHovered:!0,validationState:"valid",isDisabled:!1,isReadOnly:!1,isFocused:!1,variant:"primary"},"nrh1ehl"],[{isHovered:!0,validationState:"warning",isDisabled:!1,isReadOnly:!1,isFocused:!1},"nrh1ehm"],[{isReadOnly:!0,variant:"primary",isFocused:!1},"nrh1ehn"]]});function xe({description:e,errorMessageProps:o,descriptionProps:t,warningMessage:r,errorMessage:a,labelPosition:n,isDisabled:i}){return e?jsx("div",{...t,className:uo({isDisabled:i,labelPosition:n}),children:e}):a?jsx("div",{...o,className:uo({hasError:!0,labelPosition:n}),children:a}):r?jsx("div",{className:uo({isDisabled:i,labelPosition:n}),children:r}):null}var ps=v({defaultClassName:"_1lnwne1 z9nup82",variantClassNames:{isHoveredOrFocused:{true:"_1lnwne2"},isInteractive:{false:"z9nup83"}},defaultVariants:{},compoundVariants:[[{isHoveredOrFocused:!0,isInteractive:!0},"_1lnwne4"]]}),cs="_1lnwne0";var y1={xxs:8,xs:12,sm:16,md:20,lg:24},D=ro.forwardRef(({className:e,style:o,icon:t,size:r="md",variant:a="primary",UNSAFE_NON_INTERACTIVE:n,elementType:i=n?"div":"button",...s},p)=>{!s["aria-label"]&&!s["aria-labelledby"]&&console.warn("An `ActionIconButton` requires an aria-label or aria-labelledby prop.");let{buttonProps:l,isPressed:c,ref:m}=Xt({...s,elementType:i}),{isFocusVisible:u,isFocused:d,focusProps:f}=useFocusRing(),{hoverProps:y,isHovered:b}=useHover({isDisabled:s.isDisabled}),g=filterTruthyValues({"data-block-id":s["data-block-id"],"data-block-class":s["data-block-class"],"data-focused":d,"data-focus-visible":u,"data-disabled":s.isDisabled,"data-hovered":b,"data-pressed":c});return jsxs(i,{...mergeProps(l,y,f,g),className:classNames(Ai({variant:a,size:r,isDisabled:!!s.isDisabled,isFocusVisible:u,isHovered:b}),"BaselineUI-ActionIconButton",e),ref:M(p,m),style:o,...n&&{tabIndex:void 0,role:void 0,"aria-label":void 0,"aria-labelledby":void 0,"aria-disabled":void 0},children:[jsx(t,{role:"presentation",size:y1[r]}),a==="popover"&&jsx(ChevronDownIcon,{size:8,className:Gt})]})});D.displayName="ActionIconButton";var Le=ro.forwardRef(({className:e,style:o,labelPosition:t="top",variant:r="primary",showStepper:a=!0,...n},i)=>{let s=ro.useRef(null),{locale:p}=useLocale(),l=useNumberFieldState({...n,locale:p}),{hoverProps:c,isHovered:m}=useHover({isDisabled:n.isDisabled}),{focusProps:u,isFocusVisible:d,isFocused:f}=useFocusRing(),{labelProps:y,decrementButtonProps:b,inputProps:g,incrementButtonProps:z,groupProps:_,descriptionProps:h,errorMessageProps:P}=useNumberField(n,l,s),x=useMemo(()=>n.isReadOnly?ReadOnlyIcon:n.isInvalid?ErrorFilledIcon:null,[n.isInvalid,n.isReadOnly]),k=xe({description:n.description,errorMessageProps:P,descriptionProps:h,errorMessage:n.errorMessage,labelPosition:t,isDisabled:n.isDisabled}),w=filterTruthyValues({"data-disabled":n.isDisabled,"data-readonly":n.isReadOnly,"data-hovered":m,"data-focused":f,"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:o,className:classNames(Oe({labelPosition:t}),"BaselineUI-NumberInput",e),...w,ref:i,children:[n.label?jsxs("div",{className:He({labelPosition:t,hasMessage:!!k}),children:[jsx("label",{...y,className:Fe,children:n.label}),t==="start"&&k]}):null,jsxs("div",{className:classNames({[mo]:n.isDisabled}),children:[jsxs("div",{...mergeProps(_,c),className:classNames(yo({isHovered:m,isDisabled:!!n.isDisabled,isReadOnly:!!n.isReadOnly,validationState:n.isInvalid?"error":"valid",isFocused:f,variant:r}),{[cs]:t==="start"},"BaselineUI-NumberInput-Container"),children:[jsx("input",{...mergeProps(g,u),ref:s,className:classNames("BaselineUI-NumberInput-Input",Jt({isDisabled:n.isDisabled,labelPosition:t}))}),x?jsx(x,{className:fo({validationState:"error",isReadOnly:n.isReadOnly}),size:16}):null,a?jsxs("div",{className:ps({isHoveredOrFocused:m||f,isInteractive:!n.isReadOnly&&!n.isDisabled}),children:[jsx(D,{variant:"secondary",size:"xxs",icon:MinusIcon,...b,className:"BaselineUI-NumberInput-DecrementButton"}),jsx(O,{style:{height:16},orientation:"vertical"}),jsx(D,{variant:"secondary",size:"xxs",icon:PlusIcon,...z,className:"BaselineUI-NumberInput-DecrementButton"})]}):null]}),t==="top"&&k]})]})});Le.displayName="NumberInput";var go=ro.forwardRef(({className:e,style:o,onChange:t,onChangeEnd:r,numberFormatOptions:a,isDisabled:n,step:i,minValue:s,maxValue:p,value:l,"aria-label":c,"aria-labelledby":m,"aria-details":u,"aria-describedby":d,"data-block-id":f,"data-block-class":y,defaultValue:b,isReadOnly:g,label:z,id:_,includeNumberInput:h},P)=>{let x=ro.useRef(null),k={onChange:t===void 0?void 0:C=>{t(C[0]);},isDisabled:n||g,step:i,minValue:s,maxValue:p,onChangeEnd:r===void 0?void 0:C=>{r(C[0]);},value:l===void 0?void 0:[l],defaultValue:b===void 0?void 0:[b],"aria-label":c,"aria-labelledby":m,"aria-details":u,"aria-describedby":d,id:_,label:z},w=useNumberFormatter(a),I=useSliderState({...k,numberFormatter:w}),{trackProps:N,groupProps:L,labelProps:S}=useSlider(k,I,x),T=jsx(Le,{variant:"ghost",showStepper:!1,"aria-label":c,"aria-labelledby":S.id,value:I.getThumbValue(0),formatOptions:a,onChange:C=>{I.setThumbValue(0,C);},style:{width:55,textAlign:"right",flexShrink:0}});return jsxs("div",{...L,style:o,"data-block-id":f,"data-block-class":y,className:classNames(ts,"BaselineUI-Slider",e),children:[z?jsxs("div",{className:as,children:[jsx("label",{...S,className:classNames(ns({isDisabled:n,hasNumberInput:!!h}),"BaselineUI-Slider-Label"),children:z}),h?T:null]}):null,jsxs("div",{className:rs,children:[jsx("div",{...N,className:classNames(ss,"BaselineUI-Slider-Track"),ref:M(x,P),"data-testid":"track",children:jsx(E1,{state:I,trackRef:x,isDisabled:n,isReadOnly:g})}),h&&!z?T:null]})]})});go.displayName="Slider";function E1({state:e,trackRef:o,isDisabled:t,isReadOnly:r}){let a=ro.useRef(null),{thumbProps:n,inputProps:i,isDragging:s}=useSliderThumb({trackRef:o,inputRef:a},e),{focusProps:p,isFocused:l,isFocusVisible:c}=useFocusRing(),{hoverProps:m,isHovered:u}=useHover({isDisabled:t}),d=filterTruthyValues({"data-disabled":t,"data-readonly":r,"data-hovered":u,"data-focus-visible":c,"data-dragging":s,"data-focused":l});return jsxs(Fragment,{children:[jsx("div",{className:classNames(ls({isDisabled:t,isFocusVisible:c,active:s,isHovered:u}),"BaselineUI-Slider-TrackHighlight"),style:{width:n.style?.left},"data-testid":"track-highlight"}),jsx("div",{...mergeProps(n,m,d),className:classNames(is({isDisabled:t,isFocusVisible:c,active:s,isReadOnly:r,isHovered:u}),"BaselineUI-Slider-Thumb"),"data-testid":"thumb",children:jsx(VisuallyHidden,{children:jsx("input",{ref:a,...mergeProps(i,p)})})})]})}function bs({ref:e,onIntersect:o,isDisabled:t,threshold:r,rootMargin:a,root:n}){let i=ro.useRef(null);useEffect(()=>{if(t){i.current?.disconnect(),i.current=null;return}i.current=new IntersectionObserver(([s])=>{o(s);},{root:n?.current,rootMargin:a,threshold:r});},[o,t,n,a,r]),useEffect(()=>{let{current:s}=i;return e.current&&s?.observe(e.current),()=>s?.disconnect()},[e]);}function gs({ref:e,onResize:o,isDisabled:t}){let r=ro.useRef(null),[a,n]=ro.useState();return ro.useEffect(()=>{if(t){r.current?.disconnect(),r.current=null;return}r.current=new ResizeObserver(([i])=>{n(i.contentRect),o?.(i);});},[o,t,n]),ro.useEffect(()=>{let{current:i}=r;return e.current&&i?.observe(e.current),()=>i?.disconnect()},[e]),{size:a}}function vo({src:e,alt:o}){let[t,r]=useState(!1),[a,n]=useState(!1),[i,s]=useState(!1),p=()=>{r(!0),s(!1);},l=()=>{n(!0),s(!1);};return useEffect(()=>{if(!e)return;s(!0);let c=new Image;return c.src=e,c.addEventListener("load",p),c.addEventListener("error",l),()=>{c.removeEventListener("load",p),c.removeEventListener("error",l);}},[e]),{isLoaded:t,hasError:a,isLoading:i,imgProps:{src:t?e:void 0,alt:o}}}function _o(){let e=useRef(!0);return useEffect(()=>{e.current=!1;},[]),e.current}var vs="SET_STATE",rr="UNDO",ar="REDO",q1=(e,o)=>{let{past:t,present:r,future:a}=e;switch(o.type){case vs:return {past:[...t,r],present:o.data,future:[]};case rr:return {past:t.slice(0,t?.length-1),present:t[t?.length-1],future:[r,...a]};case ar:return {past:[...t,r],present:a[0],future:a.slice(1)};default:throw new Error("Invalid action type")}},_s=(e={},{isDisabled:o,onAction:t})=>{let r=_o(),[a,n]=useReducer(q1,{past:[],present:e,future:[]}),{past:i,present:s,future:p}=a,l=y=>{n({type:vs,data:y});},c=useRef(),m=()=>{c.current=rr,n({type:rr});},u=()=>{c.current=ar,n({type:ar});},d=!!i?.length,f=!!p?.length;return useGranularEffect(()=>{(c.current===rr||c.current===ar)&&(t?.(s,c.current),c.current=void 0);},[s],[t,r]),{state:s,push:o?()=>{}:l,undo:o?()=>{}:m,redo:o?()=>{}:u,pastStates:i,futureStates:p,canUndo:d,canRedo:f}};var Ra=ro.createContext({messages:{}}),xs=({children:e,messages:o={},...t})=>{let r=ro.useMemo(()=>({messages:o}),[o]);return jsx(I18nProvider,{...t,children:jsx(Ra.Provider,{value:r,children:e})})};xs.displayName="I18nProvider";function E(e){let{messages:o}=useContext(Ra);!e&&W1(o)&&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.");let t=useMessageFormatter(e?cleanKeyFromGlobImport(e):o),r=useLocale();return {formatMessage:(a,n)=>{if(typeof a=="object")try{return t(a.id,n)}catch{return console.log(`BUI \u{1F30D}: Translation not found for key: \`${a.id.toString()}\`. The default message, i.e. \`${a.defaultMessage}\`, will be used instead.`),a.defaultMessage||a.id}else try{return t(a,n)}catch{return console.log(`BUI \u{1F30D}: Translation not found for key: \`${a.toString()}\`. The default message, i.e. \`${a.toString()}\`, will be used instead.`),a}},locale:r}}var $=e=>e;function mN(e,o,t){let r=ro.useRef(null);return ro.useEffect(()=>{if(e)return r.current=new MutationObserver(t),r.current.observe(e,o),()=>{r.current&&r.current.disconnect();}},[e,o,t]),r.current}function Ps(e,o){let[t,r]=useState(()=>{try{let n=window.localStorage.getItem(e);return n?JSON.parse(n):o}catch(n){return console.log(n),o}});return [t,n=>{try{let i=n instanceof Function?n(t):n;r(i),window.localStorage.setItem(e,JSON.stringify(i));}catch(i){console.log(i);}}]}function _N({ref:e,onSelectionChange:o,onSelectionEnd:t,isDisabled:r}){let a=ro.useRef(null);usePress({ref:e,isDisabled:r,onPressEnd(){let i=ee(e.current).getSelection();i&&e.current?.contains(i.anchorNode)&&t?.(i);},onPressStart(){let n=ee(e.current);a.current=n.getSelection(),a.current&&a.current.removeAllRanges();}}),useEffect(()=>{let n=e.current;if(!n||r)return;function i(){let l=ee(n).getSelection();l&&e.current?.contains(l.anchorNode)&&o(l);}let s=ve(n);return s.addEventListener("selectionchange",i),()=>{s.removeEventListener("selectionchange",i);}},[e,o,r]);}function zo(e){let o=useCallback(()=>{let a=ee(e??document.body),n=a.matchMedia(queries.tablet);return a.matchMedia(queries.desktop).matches?"desktop":n.matches?"tablet":"mobile"},[e]),[t,r]=ro.useState(o);return Te(()=>{let a=ee(e),n=()=>{r(o());};return a.addEventListener("resize",n),n(),()=>{a.removeEventListener("resize",n);}},[e,o]),t}var Ia=ro.createContext(void 0),ws=({portalContainer:e,children:o})=>jsx(Ia.Provider,{value:e,children:o});ws.displayName="PortalContainerProvider";function fe(e){let o=useContext(Ia);return e||o}var Rs=v({defaultClassName:"_1tkzayn0 _1yep5z6dy",variantClassNames:{size:{sm:"_1tkzayn1",md:"_1tkzayn2",lg:"_1tkzayn3"},type:{subtitle:"_1yep5z6105",title:"_1yep5z6105",label:"_1yep5z6106",value:"_1yep5z6106",helper:"_1yep5z6107",body:"_1yep5z6105"}},defaultVariants:{},compoundVariants:[[{type:"title",size:"sm"},"_1yep5z61jz"],[{type:"title",size:"md"},"_1yep5z61k2"],[{type:"title",size:"lg"},"_1yep5z61k5"],[{type:"body",size:"sm"},"_1yep5z61kp"],[{type:"body",size:"md"},"_1yep5z61ks"],[{type:"body",size:"lg"},"_1yep5z61ks"],[{type:"subtitle",size:"sm"},"_1yep5z61kl"],[{type:"subtitle",size:"md"},"_1yep5z61ko"],[{type:"subtitle",size:"lg"},"_1yep5z61ko"],[{type:"label",size:"md"},"_1yep5z61kn"],[{type:"label",size:"lg"},"_1yep5z61kn"],[{type:"value",size:"md"},"_1yep5z61kn"],[{type:"value",size:"lg"},"_1yep5z61kn"],[{type:"helper",size:"sm"},"_1yep5z61kh"]]});var Z=ro.forwardRef(({elementType:e="span",type:o="title",children:t,size:r="md",...a},n)=>jsx(e,{...a,className:classNames(Rs({size:r,type:o}),"BaselineUI-Text",a.className),ref:n,children:t}));Z.displayName="Text";var Is=v({defaultClassName:"siobe21 _1yep5z6ao _1yep5z6ap _1yep5z6aq _1yep5z6bc _1yep5z6bd _1yep5z6be _1yep5z6d7 _1yep5z6l9 _1yep5z6l7 _1yep5z6gq _1yep5z6ky _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ic _1yep5z6id _1yep5z6ie",variantClassNames:{background:{subtle:"_1yep5z6113",medium:"_1yep5z6114"}},defaultVariants:{},compoundVariants:[]}),Ts="siobe24",Ns="var(--siobe20)";var ir=ro.forwardRef(({className:e,style:o,children:t,background:r="medium",title:a,action:n,"data-block-id":i,"data-block-class":s,onCloseRequest:p,...l},c)=>{let{formatMessage:m}=E(),u=ro.useRef(null),{dialogProps:d,titleProps:f}=useDialog(l,u);return jsxs("div",{...d,className:classNames(Is({background:r}),"BaselineUI-Drawer",e),"data-block-id":i,"data-block-class":s,style:o,ref:M(c,u),children:[jsxs(B,{paddingLeft:"lg",paddingRight:"sm",backgroundColor:"background.primary.subtle",display:"flex",justifyContent:"space-between",alignItems:"center",gap:"lg",className:Ts,children:[jsx(Z,{type:"title",size:"sm",...f,className:es,children:a}),jsxs(B,{children:[n?jsx(D,{...n,variant:"secondary"}):null,jsx(D,{variant:"secondary",size:"md",icon:XIcon,onPress:p,"aria-label":m(ub.close)})]})]}),jsx(O,{variant:r==="subtle"?"primary":"secondary"}),t]})});ir.displayName="Drawer";var ub=$({close:{id:"close",defaultMessage:"Close"}});function Ms(e,o,t){let{isDisabled:r}=e,a=useReducedMotion(),[n,i]=ro.useState("100vh");useEffect(()=>{if(!fa()&&!ya())return;let d=ee(t.current);function f(){i(`${d?.visualViewport.height}px`);}return f(),d?.visualViewport.addEventListener("resize",f),()=>{d?.visualViewport.removeEventListener("resize",f);}},[t]);let[{y:s},p]=useSpring(()=>({y:0,immediate:a,config:{easing:easings.easeOutCubic}})),l=useRef(0),c=useCallback(()=>{p.start({y:l.current,onRest:()=>{o.close();}});},[p,o]),m=useCallback(d=>{d.target.closest("[data-drawer]")||c();},[c]);useGranularLayoutEffect(()=>{l.current=t.current?.offsetHeight||0,p.set({y:l.current}),p.start({y:0,immediate:!!a});},[],[p,a]);let u=s.to({range:[0,l.current/2,l.current],output:[.5,.2,0],extrapolate:"clamp"}).to(d=>`rgba(0,0,0,${d})`);return {overlayProps:{style:r?void 0:{transform:s.to(d=>`translateY(${d}px)`)}},underlayProps:{style:r?void 0:{backgroundColor:u},onPointerDown:r?void 0:m},close:c,containerHeight:r?void 0:n}}var Bs=v({defaultClassName:"aml2vl0 _1yep5z6ko _1yep5z6kp _1yep5z6kr _1yep5z6kq _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6hr _1yep5z6hs _1yep5z6ht",variantClassNames:{enableDrawer:{false:"_1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jl _1yep5z6jm _1yep5z6jn",true:"aml2vl2"}},defaultVariants:{},compoundVariants:[]}),Ds="_1yep5z6ko _1yep5z6kp _1yep5z6kr _1yep5z6kq _1yep5z6g2 _1yep5z6hr _1yep5z6hs _1yep5z6ht";function Na(e=window){let[o,t]=useState("light"),[r,a]=useState(!1),[n,i]=useState(!1),[s,p]=useState(!1);return useEffect(()=>{let l=e.matchMedia("(prefers-color-scheme: dark)"),c=m=>{t(m.matches?"dark":"light");};return l.matches&&t("dark"),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),useEffect(()=>{let l=e.matchMedia("(prefers-contrast: more)"),c=m=>{a(m.matches);};return a(l.matches),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),useEffect(()=>{let l=e.matchMedia("(prefers-reduced-motion: reduce)"),c=m=>{i(m.matches);};return l.matches&&i(!0),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),useEffect(()=>{let l=e.matchMedia("(prefers-reduced-transparency: reduce)"),c=m=>{p(m.matches);};return l.matches&&p(!0),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),{colorScheme:o,highContrast:r,reducedMotion:n,transparency:s}}var ho=createContext({theme:lightTheme,setTheme:()=>{}});var Es="var(--hj25q10)";var pr={LIGHT:{name:"light",theme:lightTheme},DARK:{name:"dark",theme:darkTheme}},xo=ro.forwardRef(({theme:e="system",children:o,setTheme:t,className:r,style:a,UNSAFE_domProps:n,"data-block-id":i,"data-block-class":s},p)=>{let{direction:l}=useLocale(),{colorScheme:c,reducedMotion:m,highContrast:u,transparency:d}=Na(),{name:f,theme:y}=useMemo(()=>{switch(e){case"system":return c==="light"?pr.LIGHT:pr.DARK;case"light":return pr.LIGHT;case"dark":return pr.DARK;default:return {name:"custom",theme:e}}},[c,e]),b=zo(),g={"data-theme":f,"data-block-id":i,"data-block-class":s,"data-reduced-motion":m,"data-high-contrast":u,"data-transparency":d,"data-device":b},z=useMemo(()=>({theme:y,setTheme:t}),[y,t]);return jsx(ho.Provider,{value:z,children:jsx("div",{...mergeProps(n,g),className:classNames(Qt,"BaselineUI-ThemeProvider",r),style:{...assignInlineVars(themeVars,y),...assignInlineVars({[Es]:l==="rtl"?"-1":"1"}),...a},ref:p,children:o})})});xo.displayName="ThemeProvider";var Ae=ro.createContext({state:null,triggerProps:{},overlayProps:{}}),Ce=({children:e,...o})=>{let t=useOverlayTriggerState(o),{triggerProps:r,overlayProps:a}=useOverlayTrigger({type:"dialog"},t),n=useMemo(()=>({state:t,triggerProps:r,overlayProps:a}),[t,r,a]);return jsx(Ae.Provider,{value:n,children:e})};Ce.displayName="Modal";var La=ro.createContext({isDrawer:!1,closeDrawer:()=>{}}),jb=animated(xo),$b=({children:e,className:o,style:t,isDismissable:r=!0,isKeyboardDismissDisabled:a=!1,portalContainer:n,disableAnimation:i,enableDrawer:s=!1,"data-block-id":p,"data-block-class":l})=>{let{state:c}=ro.useContext(Ae),m=zo(n),u=fe(n),d=typeof s=="boolean"&&s||s==="auto"&&m==="mobile";invariant(c,"ModalContent must be a child of Modal");let f=ro.useRef(null),y=typeof r=="function"?r(d):r,b=typeof a=="function"?a(d):a,{underlayProps:g,overlayProps:z,close:_,containerHeight:h}=Ms({isDisabled:!d,isDismissable:y},c,f),{modalProps:P,underlayProps:x}=useModalOverlay({isDismissable:!1,isKeyboardDismissDisabled:b},c,f),{theme:k}=useContext(ho),w=useReducedMotion(),I=useSpring({from:{opacity:0,transform:"scale(0.95)"},to:{opacity:1,transform:"scale(1)"},immediate:!!w||i,config:{easing:easings.easeInBounce}}),N=useMemo(()=>({...P.style,...d?{...z.style,width:"100%"}:I}),[z.style,P.style,d,I]),L=useMemo(()=>({isDrawer:d,closeDrawer:_}),[d,_]),S=useMemo(()=>mergeProps(x,g,{onPointerDown:d?g.onPointerDown:x.onPointerDown,onClick:()=>{r&&!d&&c.close();}}),[g,r,d,c,x]);return jsx(Overlay,{portalContainer:u,children:jsx(La.Provider,{value:L,children:jsxs(jb,{className:classNames(Bs({enableDrawer:d}),o),theme:k,"data-block-id":p,"data-block-class":l,style:{...t,height:d?h:"auto",...assignInlineVars({[Ns]:h})},children:[jsx(animated.div,{...S,"data-testid":"underlay",style:g.style,className:classNames(Ds,"BaselineUI-Modal-Underlay")}),jsx(animated.div,{...mergeProps(P,z),style:N,ref:f,"data-drawer":d,className:"BaselineUI-Modal-Content",children:typeof e=="function"?e(c):e})]})})})},Ub=animated($b),Me=({children:e,style:o,...t})=>{let{state:r}=ro.useContext(Ae);invariant(r,"ModalContent must be a child of Modal");let a=useReducedMotion();return useTransition(r.isOpen,{from:{opacity:0},enter:{opacity:1},immediate:!!a||t.disableAnimation})((i,s)=>s&&jsx(Ub,{...t,style:{...o,...i},children:typeof e=="function"?e(r):e}))};var Us=v({defaultClassName:"cjv3et0 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6fs _1yep5z6d7",variantClassNames:{size:{sm:"cjv3et1",md:"cjv3et2",lg:"cjv3et3",content:"cjv3et4"},variant:{primary:"_1yep5z6121 _1yep5z616i _1yep5z616k",ghost:"cjv3et6"},isDrawer:{true:"cjv3et7 _1yep5z6xq _1yep5z6xr _1yep5z6xs _1yep5z6ye _1yep5z6yf _1yep5z6yg _1yep5z6166"}},defaultVariants:{},compoundVariants:[]});var Ba=ro.createContext({titleProps:{}}),le=ro.forwardRef(({children:e,className:o,style:t,inheritDrawer:r,size:a="md",variant:n="primary","data-block-id":i,"data-block-class":s,drawerBackground:p,...l},c)=>{let m=ro.useRef(null),u=ro.useRef(null),{isDrawer:d,closeDrawer:f}=useContext(La),[y,b]=ro.useState("");useLayoutEffect(()=>{let h=u.current?.getRootNode(),P=l["aria-label"]||"";l["aria-labelledby"]&&(P=h?.querySelector(`#${l["aria-labelledby"].replaceAll(":","\\:")}`)?.textContent||""),b(P);},[l]);let{dialogProps:g,titleProps:z}=useDialog(l,m),_=useMemo(()=>({titleProps:z}),[z]);return d&&r?jsx(ir,{title:y,onCloseRequest:f,className:o,...l,"data-drawer":!0,"data-block-id":i,"data-block-class":s,ref:M(u,c),background:p,children:e}):jsx(Ba.Provider,{value:_,children:jsx("section",{...g,"data-block-id":i,"data-block-class":s,ref:M(m,c),style:t,className:classNames(Us({size:d?"content":a,variant:n,isDrawer:d}),"BaselineUI-Dialog",o),children:e})})});le.displayName="Dialog";var qs=ro.forwardRef(({children:e,className:o,style:t},r)=>{let{titleProps:a}=useContext(Ba);return ro.isValidElement(e)?ro.cloneElement(e,{...a,ref:r,className:classNames(e.props.className,o),style:{...e.props.style,...t}}):jsx("h3",{...a,ref:r,className:o,style:t,children:e})});qs.displayName="DialogTitle";var Co=ro.forwardRef(({className:e,style:o,children:t,"data-block-id":r,"data-block-class":a,...n},i)=>{let{theme:s}=useContext(ho);return jsx(Overlay,{...n,children:jsx(xo,{ref:i,theme:s,style:o,className:classNames("BaselineUI-Portal",e),"data-block-id":r,"data-block-class":a,children:t})})});Co.displayName="Portal";function Gs({placement:e}){let o=useReducedMotion();return useTransition(!0,{from:{opacity:0,transform:`translate3d(${e==="bottom"?"0, 4px, 0":"0, -4px, 0"})`},enter:{opacity:1,transform:"translate3d(0, 0, 0)"},immediate:!!o,config:config.stiff})}var{color:Ea}=themeVars,me=ro.forwardRef(({className:e,style:o,state:t,overlayProps:r,underlayClassName:a,children:n,includeArrow:i=!1,offset:s=2,portalContainer:p,contentContainerClassName:l,contentContainerStyle:c,"data-block-id":m,"data-block-class":u,...d},f)=>{let y=ro.useRef(null),b=fe(p),g=i?8:0,{underlayProps:z,popoverProps:_,placement:h,arrowProps:P}=usePopover({...d,offset:s+g,popoverRef:y,containerPadding:d.containerPadding||0},t);delete _.style?.position;let x=Gs({placement:h}),k=h==="center"?"bottom":h;return x((w,I)=>I&&jsxs(Co,{portalContainer:b,style:o,ref:f,"data-block-id":m,"data-block-class":u,children:[!d.isNonModal&&jsx("div",{...z,className:classNames(Gi,a,"BaselineUI-Popover-Underlay")}),jsxs(animated.div,{..._,style:{..._.style,...w,...assignInlineVars({[Wi]:`${d.triggerRef?.current?.offsetWidth}px`})},ref:M(y,f),className:classNames(Ui,"BaselineUI-Popover-Content",e),"data-placement":["top","bottom","left","right"].filter(N=>h?.includes(N)),children:[i?jsxs("svg",{className:classNames($i[k],"BaselineUI-PopoverContent-Arrow"),...P,style:{...P.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:Ea.border.medium}),jsx("path",{d:"M7.504 6.492 2.248.488h10.511L10.132 3.49 7.504 6.492Z",fill:Ea.background.primary.subtle,stroke:Ea.background.primary.subtle})]}):null,jsx(DismissButton,{onDismiss:t.close}),jsx("div",{...r,style:c,className:classNames(qi,l),children:typeof n=="function"?n(t):n}),jsx(DismissButton,{onDismiss:t.close})]})]}))});me.displayName="PopoverContentCore";var Pe=ro.forwardRef((e,o)=>{let{state:t,overlayTriggerAria:{overlayProps:r},triggerRef:a}=useContext(rt);return invariant(a),t?.isOpen?jsx(me,{ref:o,...e,triggerRef:e.triggerRef||a,overlayProps:r,state:t}):null});Pe.displayName="PopoverContent";var Ys=v({defaultClassName:"_1mdhlqv3",variantClassNames:{isOpen:{true:"_1mdhlqv4"}},defaultVariants:{},compoundVariants:[]}),je="_1mdhlqv6 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7",Zs=v({defaultClassName:"_1mdhlqv0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z69o _1yep5z69p _1yep5z69q _1yep5z6eu _1yep5z6jr _1yep5z6js _1yep5z6jt _1yep5z6dy",variantClassNames:{isFocused:{false:"_1mdhlqv1"},isDisabled:{true:"z9nup83 _1yep5z6ey"}},defaultVariants:{},compoundVariants:[]}),ur="_1mdhlqv7 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6fs",Qs="_1yep5z66x _1yep5z66y _1yep5z66z",Js="_1mdhlqv5 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z69i _1yep5z69j _1yep5z69k";var el=v({defaultClassName:"_1jwycy80",variantClassNames:{placement:{bottom:"_1jwycy81",left:"_1jwycy82",right:"_1jwycy83",top:"_1jwycy84"},variant:{default:"_1jwycy85",inverse:"_1jwycy86"}},defaultVariants:{},compoundVariants:[]}),ol=v({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:"_1yep5z6g0 _1yep5z6ez",inverse:"_1yep5z6d7 _1yep5z6fs _1yep5z6eu"}},defaultVariants:{},compoundVariants:[]});var Ha=ro.forwardRef(({children:e,state:o,overlayProps:t,arrowProps:r,placement:a,variant:n,size:i,tooltipProps:s,includeArrow:p},l)=>{let{tooltipProps:c}=useTooltip({isOpen:o.isOpen},o),m=useMemo(()=>{switch(a){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:0}}},[a]),u=useReducedMotion(),[d]=useSpring(()=>({from:{opacity:0,transform:`translate(${m.x}px, ${m.y}px)`},to:{opacity:1,transform:"translate(0, 0)"},immediate:!!u})),f=a==="center"?"bottom":a;return jsxs(animated.span,{...t,style:{...d,...t.style},ref:l,"data-placement":f,children:[p?jsx("div",{className:el({placement:f,variant:n}),...r}):null,jsx("div",{...mergeProps(c,s),className:ol({variant:n,size:i}),children:e})]})});Ha.displayName="TooltipContent";var ke=ro.forwardRef(({children:e,placement:o="bottom",delay:t=1e3,closeDelay:r=500,variant:a="default",size:n="md",includeArrow:i=!0,portalContainer:s,className:p,style:l,"data-block-id":c,"data-block-class":m,...u},d)=>{let f=ro.useRef(null),y=ro.useRef(null),b=!u.text||u.isDisabled,g=useTooltipTriggerState({...u,delay:t,closeDelay:r,isDisabled:b}),{triggerProps:z,tooltipProps:_}=useTooltipTrigger({...u,isDisabled:b,delay:t,closeDelay:r},g,f),h=fe(s),{overlayProps:P,arrowProps:x,placement:k,updatePosition:w}=useOverlayPosition({arrowSize:i?13:0,targetRef:f,arrowBoundaryOffset:i?8:0,offset:i?12:2,overlayRef:y,placement:o,isOpen:g.isOpen,...u});return bs({ref:y,threshold:1,onIntersect:w,isDisabled:!g.isOpen}),gs({ref:f,onResize:w,isDisabled:!g.isOpen}),jsxs(FocusableProvider,{...z,ref:f,children:[e,g.isOpen?jsx(Co,{disableFocusManagement:!0,portalContainer:h,className:p,style:l,"data-block-id":c,"data-block-class":m,children:jsx(Ha,{ref:M(d,y),state:g,arrowProps:x,overlayProps:P,placement:k,tooltipProps:_,variant:a,size:n,includeArrow:i,children:u.text})}):null]})});ke.displayName="Tooltip";var sl=ro.forwardRef(({className:e,style:o,onChange:t,"data-block-id":r,icon:a,formatValue:n=c=>c,tooltipProps:i,popoverContentProps:s,...p},l)=>{let c=de(l),[m,u]=useControlledState(p.value,p.defaultValue||0,t),[d,f]=ro.useState(!1),{keyboardProps:y}=useKeyboard({onKeyDown:z=>{(z.key==="Enter"||z.key==="Escape")&&f(!1);}}),b=n(m||0),g=i?.isDisabled||p["aria-label"]?`${p["aria-label"]}, ${b}`:b.toString();return jsxs(B,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:classNames("BaselineUI-IconSlider",e),"data-block-id":r,style:o,ref:c,children:[a?jsx(a,{size:24,className:sprinkles({color:"icon.primary"})}):null,jsxs(Ne,{type:"dialog",isOpen:d,onOpenChange:f,children:[jsx(Se,{children:jsx(ke,{text:p["aria-label"],size:"sm",variant:"inverse",includeArrow:!1,...i,children:jsx(A,{label:b,variant:"popover","aria-label":g,style:{fontVariantNumeric:"tabular-nums"}})})}),jsx(Pe,{placement:"bottom start",...s,className:classNames(je,s?.className),children:jsx(le,{size:"content","aria-label":g,children:jsx(FocusScope,{autoFocus:!0,children:jsx(B,{paddingY:"sm",paddingX:"lg",marginY:"md",style:{width:215},...y,children:jsx(go,{...p,onChange:z=>{u(z),t?.(z);},value:m})})})})})]})]})});sl.displayName="IconSlider";var ll=v({defaultClassName:"bpklwa7",variantClassNames:{isReadOnly:{true:"bpklwa8"},isDisabled:{true:"bpklwa9"},isSelected:{true:"bpklwaa"},isFocused:{true:"bpklwab"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!1,isReadOnly:!1},"bpklwac"]]}),pl=v({defaultClassName:"bpklwae",variantClassNames:{isDisabled:{true:"bpklwaf"},isSelected:{true:"bpklwag"},isReadOnly:{true:"bpklwah"}},defaultVariants:{},compoundVariants:[]}),cl="bpklwad",dl=v({defaultClassName:"bpklwa0",variantClassNames:{labelPosition:{top:"bpklwa1",left:"bpklwa2"}},defaultVariants:{},compoundVariants:[]}),ml="bpklwa6",ul=v({defaultClassName:"bpklwa3",variantClassNames:{labelPosition:{top:"bpklwa4",left:"bpklwa5"}},defaultVariants:{},compoundVariants:[]});var gl=ro.forwardRef(({className:e,label:o,labelPosition:t="top",statusLabel:r,style:a,"data-block-id":n,"data-block-class":i,...s},p)=>{let l=ro.useRef(null),c=useToggleState(s),{inputProps:m,isPressed:u}=useSwitch(s,c,l),{isFocusVisible:d,focusProps:f}=useFocusRing(),{hoverProps:y,isHovered:b}=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":b,"data-pressed":u}),z=jsx("div",{className:classNames(ll({isSelected:c.isSelected,isDisabled:!!s.isDisabled,isFocused:d,isReadOnly:!!s.isReadOnly}),"BaselineUI-Switch-Track"),children:jsx("div",{className:classNames(pl({isSelected:c.isSelected,isDisabled:s.isDisabled,isReadOnly:s.isReadOnly}),"BaselineUI-Switch-Knob"),"data-testid":"switch-knob"})});return jsxs("label",{...mergeProps(g,y),className:classNames(dl({labelPosition:t}),"BaselineUI-Switch",e),style:a,ref:p,children:[o?jsx("span",{className:classNames(cl,"BaselineUI-Switch-Label"),children:o}):null,jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(m,f),ref:l})}),r?jsxs("div",{className:ul({labelPosition:t}),children:[jsx("span",{className:classNames("BaselineUI-Switch-Status-Label",ml),children:c.isSelected?r.on:r.off}),z]}):z]})});gl.displayName="Switch";var vl="_19n40yy9",_l=v({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 Gg={sm:SearchIcon,md:SearchIcon$1,lg:SearchIcon$1},xl=ro.forwardRef(({className:e,size:o="md",variant:t="primary","data-block-id":r,"data-block-class":a,style:n,...i},s)=>{let p=ro.useRef(null),l=useSearchFieldState(i),{inputProps:c,clearButtonProps:m}=useSearchField({...i,"aria-haspopup":!1,"aria-autocomplete":"none",type:"search"},l,p),{focusProps:u,isFocusVisible:d,isFocused:f}=useFocusRing({within:!0,isTextInput:!0}),y=Gg[o],b=o==="sm"?XIcon$2:XIcon$3,g=filterTruthyValues({"data-block-id":r,"data-block-class":a,"data-focused":f,"data-disabled":i.isDisabled,"data-focus-visible":d});return jsxs("div",{...g,className:classNames(_l({size:o,isFocused:f,variant:t,hasText:!!l.value,isDisabled:i.isDisabled}),"BaselineUI-SearchInput",e),style:n,ref:s,children:[jsx(y,{size:o==="sm"?20:24}),jsx("input",{...mergeProps(c,u),className:vl,ref:p}),l.value!==""&&jsx(D,{icon:b,...m,size:o==="sm"?"xs":"sm",variant:"secondary"})]})});xl.displayName="SearchInput";var Cl="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 _1yep5z6l0 _1yep5z6kz _1yep5z6he _1yep5z6l3 _1yep5z6fs",Pl="xyd2ss0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z64l _1yep5z64m _1yep5z64n _1yep5z629 _1yep5z62a _1yep5z62b";var Aa=({section:e,showSelectedIcon:o,state:t})=>{let{itemProps:r,groupProps:a,headingProps:n}=useMenuSection({heading:e.value?.title,"aria-label":e["aria-label"]});return jsxs(Fragment,{children:[e.key!==t.collection.getFirstKey()&&jsx(O,{elementType:"li"}),jsxs("li",{...r,children:[e.value?.title?jsx(VisuallyHidden,{children:jsx("span",{...n,children:e.value.title})}):null,jsx("ul",{...a,className:Pl,children:[...e.childNodes].map(i=>(invariant(i.type==="item"),jsx(fr,{item:i,state:t,showSelectedIcon:o},i.key)))})]})]})};Aa.displayName="MenuSection";var fr=({item:e,state:o,className:t,showSelectedIcon:r})=>{let a=ro.useRef(null),n=useMenuItem({key:e.key},o,a),{isFocusVisible:i,focusProps:s}=useFocusRing();return jsx(ot,{item:e,liProps:mergeProps(n.menuItemProps,s,{className:t}),...n,isFocusVisible:i,ref:a,description:e.value?.keyboardShortcut,descriptionProps:n.keyboardShortcutProps,_state:o,showSelectedIcon:r})};fr.displayName="MenuItem";var $a=ro.forwardRef(({className:e,itemClassName:o,onContentKeyDown:t,...r},a)=>{let n=useTreeState(r),i=ro.useRef(null),{menuProps:s}=useMenu(r,n,i),{keyboardProps:p}=useKeyboard({onKeyDown:t});return jsx("ul",{...mergeProps(s,p),className:classNames(Cl,e),ref:M(i,a),children:[...n.collection].map(l=>l.type==="section"?jsx(Aa,{section:l,state:n,showSelectedIcon:r.selectionMode==="multiple"||r.selectionMode==="single"},l.key):jsx(fr,{item:l,state:n,className:o,showSelectedIcon:r.selectionMode==="multiple"||r.selectionMode==="single"},l.key))})});$a.displayName="MenuContent";var yr=ro.forwardRef(({defaultOpen:e,onOpenChange:o,isOpen:t,isDisabled:r,contentClassName:a,placement:n="bottom start",isNonModal:i,shouldFlip:s,shouldUpdatePosition:p,boundaryElement:l,crossOffset:c,offset:m,triggerLabel:u,renderTrigger:d=({buttonProps:g,ref:z})=>jsx(A,{...g,variant:"popover",ref:z}),portalContainer:f,...y},b)=>{let g=ro.useRef(null),z=fe(f),_=useMenuTriggerState({defaultOpen:e,isOpen:t,onOpenChange:o}),{menuTriggerProps:h,menuProps:P}=useMenuTrigger({isDisabled:r,type:"menu"},_,g),x=re(),k=useMemo(()=>mergeProps(h,{isDisabled:r,isSelected:_.isOpen,className:"BaselineUI-Menu-Trigger",label:typeof u=="function"?u(_.isOpen):u}),[h,r,_.isOpen,u]);return useEffect(()=>{!u&&!d&&console.warn("The `triggerLabel` prop is required when no `renderTrigger` or `children` is provided.");},[d,u]),jsxs(Fragment,{children:[d({buttonProps:k,ref:g}),_.isOpen?jsx(me,{triggerRef:g,state:_,placement:n,isNonModal:i,shouldFlip:s,shouldUpdatePosition:p,boundaryElement:l,crossOffset:c,offset:m||2,className:classNames(je,"BaselineUI-Menu-Popover"),portalContainer:z,children:jsx($a,{className:a,...P,...y,ref:b,autoFocus:_.focusStrategy||"first",children:x})}):null]})});yr.displayName="Menu";var br=v({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:!0,isDisabled:!1},"_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 Tl=ro.forwardRef(({className:e,style:o,children:t,variant:r="default",size:a="md",elementType:n="a",type:i="body","data-block-id":s,"data-block-class":p,title:l,...c},m)=>{let u=ro.useRef(null),{linkProps:d,isPressed:f}=useLink({...c,elementType:c.onPress?"span":n},u),{isFocusVisible:y,isFocused:b,focusProps:g}=useFocusRing(),{hoverProps:z,isHovered:_}=useHover({isDisabled:c.isDisabled}),h=n,P=filterTruthyValues({"data-block-id":s,"data-block-class":p,"data-disabled":c.isDisabled,"data-focused":b,"data-pressed":f,"data-focus-visible":y,"data-hovered":_,title:l});return jsx(h,{...mergeProps(d,g,z,P),className:classNames(br({variant:r,isFocusVisible:y,isHovered:_,isDisabled:c.isDisabled,size:a,isActive:f,type:i}),"BaselineUI-Link",e),ref:M(u,m),style:o,children:t})});Tl.displayName="Link";function Nl({isDisabled:e,onValueChange:o,onChange:t,name:r,"aria-describedby":a,"aria-label":n,accept:i,multiple:s}){let p=useId(),l=useId(),c=useId();return {inputProps:{type:"file",id:l,disabled:!!e,"aria-labelledby":n?void 0:p,"aria-describedby":a||c,"aria-label":n,onChange:u=>{let d=[...u.target.files||[]];o?.(d),t?.(u);},name:r,accept:i,multiple:s},labelProps:{htmlFor:l,id:p},descriptionProps:{id:c}}}async function Ka({items:e}){let o=e.filter(t=>t.kind==="file").map(async t=>(invariant(t.kind==="file"),t.getFile()));return await Promise.all(o)}var Sl=v({defaultClassName:"_180w5ed0",variantClassNames:{variant:{default:"_180w5ed1",inline:"_180w5ed2"},hoveredOrFocusedOrActive:{true:"_180w5ed3"},disabled:{true:"_180w5ed4"}},defaultVariants:{},compoundVariants:[[{variant:"inline",hoveredOrFocusedOrActive:!0},"_180w5ed5"],[{variant:"default",hoveredOrFocusedOrActive:!0},"_180w5ed6"],[{variant:"default",disabled:!0},"_180w5ed7"],[{variant:"inline",disabled:!0},"_180w5ed8"]]}),Ll=v({defaultClassName:"_180w5ede",variantClassNames:{disabled:{true:"_180w5edf"}},defaultVariants:{},compoundVariants:[]}),Ml=v({defaultClassName:"_180w5ed9",variantClassNames:{disabled:{true:"_180w5eda"}},defaultVariants:{},compoundVariants:[]}),Bl=v({defaultClassName:"_180w5edb",variantClassNames:{disabled:{true:"_180w5edc"},hovered:{true:"_180w5edd"}},defaultVariants:{},compoundVariants:[]});var Hl=ro.forwardRef(({className:e,label:o,description:t,icon:r,variant:a="default",...n},i)=>{let s=ro.useRef(null),{inputProps:p,descriptionProps:l,labelProps:c}=Nl(n),{dropProps:m}=useDrop({ref:s,onDrop:async({items:b})=>{let g=b.filter(_=>_.kind==="file").map(async _=>(invariant(_.kind==="file"),_.getFile())),z=await Promise.all(g);n.onValueChange?.(z);}}),{focusProps:u,isFocusVisible:d}=useFocusRing(),{hoverProps:f,isHovered:y}=useHover({isDisabled:n.isDisabled});return jsxs("label",{...mergeProps(m,f,c),className:classNames(Sl({variant:a,disabled:n.isDisabled,hoveredOrFocusedOrActive:y||d}),e),ref:M(i,s),children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(u,p)})}),r?jsx(r,{size:20,className:Ml({disabled:n.isDisabled})}):null,jsxs("div",{children:[jsx("div",{className:Bl({disabled:n.isDisabled,hovered:y}),children:o}),t?jsx("div",{...l,className:Ll({disabled:n.isDisabled}),children:t}):null]})]})});Hl.displayName="FileUpload";var Ol="_12vfhl40 z9nup81",Vl="_12vfhl41 z9nup82",Al=v({defaultClassName:"_12vfhl48",variantClassNames:{variant:{success:"_12vfhl49",error:"_12vfhl4a",active:"_12vfhl4b"}},defaultVariants:{},compoundVariants:[]}),jl="_12vfhl42",$l="_12vfhl47",Ul="_12vfhl46 z9nup82",ql="_12vfhl45",Kl=v({defaultClassName:"_12vfhl43 _12vfhl42",variantClassNames:{hasLabel:{false:"_12vfhl44"}},defaultVariants:{},compoundVariants:[]});var Gl=ro.forwardRef(({className:e,style:o,variant:t="active",showValue:r,description:a,errorMessage:n,"data-block-id":i,"data-block-class":s,...p},l)=>{let c=useId(),{labelProps:m,progressBarProps:u}=useProgressBar({...p,"aria-describedby":a?c:p["aria-describedby"]}),{minValue:d=0,maxValue:f=100,value:y=0,label:b}=p,g=(y-d)/(f-d),z=`${Math.round(g*100)}%`,_=jsx("output",{className:Kl({hasLabel:!!b}),children:u["aria-valuetext"]}),h=t==="error"?n:a;return jsxs("div",{...u,style:o,className:classNames(Ol,"BaselineUI-ProgressBar",e),"data-block-id":i,"data-block-class":s,ref:l,children:[b?jsxs("div",{className:Vl,children:[jsx("label",{...m,className:jl,children:b}),r?_:null]}):null,jsxs("div",{className:ql,children:[jsxs("div",{className:Ul,children:[jsx("div",{className:$l,children:jsx("div",{style:{width:z},className:Al({variant:t})})}),!b&&r?_:null]}),h?jsx("div",{className:uo({hasError:t==="error"}),id:c,children:h}):null]})]})});Gl.displayName="ProgressBar";function Ro({isReadOnly:e,validationState:o}){return e?ReadOnlyIcon:o==="error"?ErrorFilledIcon:o==="warning"?WarningFilledIcon:null}var Io=ro.forwardRef(({className:e,validationState:o,variant:t="primary",style:r,labelPosition:a="top",inputStyle:n,inputClassName:i,"data-block-id":s,"data-block-class":p,...l},c)=>{let m=ro.useRef(null),{inputProps:u,labelProps:d,descriptionProps:f,errorMessageProps:y,validationErrors:b}=useTextField({...l,validationState:o?o==="error"?"invalid":"valid":void 0},m),g=l.errorMessage||b.join(" "),z=xe({...l,errorMessage:g,descriptionProps:f,errorMessageProps:y,labelPosition:a});g&&(o="error");let{hoverProps:_,isHovered:h}=useHover({isDisabled:l.isDisabled}),{isFocused:P,focusProps:x,isFocusVisible:k}=useFocusRing(),w=Ro({isReadOnly:l.isReadOnly,validationState:o}),I=filterTruthyValues({"data-readonly":l.isReadOnly,"data-disabled":l.isDisabled,"data-validation-state":o,"data-focused":P,"data-focus-visible":k});return jsxs("div",{className:classNames(Oe({labelPosition:a}),"BaselineUI-TextInput",e),"data-block-id":s,"data-block-class":p,style:r,ref:c,children:[l.label||a==="start"&&z?jsxs("div",{className:He({labelPosition:a,hasMessage:!!z}),children:[jsx("label",{...d,className:Fe,children:l.label}),a==="start"&&z]}):null,jsxs("div",{className:classNames({[mo]:l.isDisabled}),children:[jsxs("div",{..._,className:yo({validationState:o,isHovered:h,isFocused:P,variant:t,isReadOnly:!!l.isReadOnly,isDisabled:!!l.isDisabled}),children:[jsx("input",{...mergeProps(u,x,I),className:classNames(Jt({isDisabled:l.isDisabled,labelPosition:a}),"BaselineUI-TextInput-Input",i),style:n,ref:m}),w?jsx(w,{className:fo({validationState:o,isReadOnly:l.isReadOnly}),size:16}):null]}),a==="top"&&z]})]})});Io.displayName="TextInput";var To=({value:e,...o})=>{let t=useNumberFormatter(o);return jsx(Fragment,{children:t.format(e)})};To.displayName="NumberFormat";var Xl="_1yep5z6i3 _1yep5z6i4 _1yep5z6i5",Yl=v({defaultClassName:"_9b1tml0",variantClassNames:{isSelected:{true:"_9b1tml1",false:"_9b1tml2"},isDisabled:{true:"z9nup83"},isHovered:{true:"_9b1tml4"},isFocusVisible:{true:"_9b1tml5"},isReadOnly:{true:"_9b1tml6"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isFocusVisible:!0,isReadOnly:!1},"_9b1tml7"],[{isSelected:!0,isHovered:!0,isDisabled:!1,isReadOnly:!1},"_9b1tml8"],[{isSelected:!1,isHovered:!0,isDisabled:!1,isReadOnly:!1},"_9b1tml9"],[{isSelected:!0,isDisabled:!0},"_9b1tmla"],[{isSelected:!0,isReadOnly:!0},"_9b1tmlb"]]}),Zl=v({defaultClassName:"_9b1tmlf",variantClassNames:{isSelected:{true:"_9b1tmlg"},size:{sm:"_9b1tmlh",md:"_9b1tmli"},isDisabled:{true:"_9b1tmlj"},isReadOnly:{true:"_9b1tmlk"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!1,isReadOnly:!1},"_9b1tmll"],[{isSelected:!0,isDisabled:!0},"_9b1tmlm"],[{isSelected:!1,isDisabled:!0},"_9b1tmln"]]}),Ql=v({defaultClassName:"_9b1tmlc",variantClassNames:{isDisabled:{true:"_9b1tmld"},isReadOnly:{true:"_9b1tmle"}},defaultVariants:{},compoundVariants:[]});var op=ro.forwardRef(({className:e,count:o,style:t,size:r="md",icon:a,"data-block-id":n,"data-block-class":i,...s},p)=>{let l={isRequired:!1},c=a||(r==="md"?CheckmarkIcon$2:CheckmarkIcon$3);!s["aria-label"]&&!s["aria-labelledby"]&&console.warn("You must provide either an `aria-label` or `aria-labelledby` prop to the `Reaction` component.");let m=ro.useRef(null),u=useToggleState({...s,...l}),{inputProps:d,isPressed:f,isDisabled:y,isReadOnly:b,isSelected:g}=useSwitch({...s,...l},u,m),{focusProps:z,isFocused:_,isFocusVisible:h}=useFocusRing(),{hoverProps:P,isHovered:x}=useHover({}),k=filterTruthyValues({"data-block-id":n,"data-block-class":i,"data-focused":_,"data-focus-visible":h,"data-disabled":y,"data-hovered":x,"data-pressed":f,"data-selected":g});return jsxs("label",{ref:p,style:t,className:classNames(Xl,"BaselineUI-Reaction",e),...k,children:[jsx(VisuallyHidden,{children:jsx("input",{...d,...z,ref:m})}),jsxs("div",{...P,className:Yl({isSelected:g,isFocusVisible:h,isHovered:x,isReadOnly:b,isDisabled:y}),children:[jsx("div",{className:Ql({isDisabled:y,isReadOnly:b}),children:jsx(c,{size:r==="md"?20:16})}),jsx("div",{className:Zl({isSelected:u.isSelected,isDisabled:y,isReadOnly:b,size:r}),children:jsx(To,{value:o})})]})]})});op.displayName="Reaction";var tp="_1azy5686",rp="_1azy5685",ap="var(--_1azy5680)",np="_1azy5688",ip="_1azy5689",sp="_1azy5681 z9nup82",lp="_1azy5682";var pp="_1azy5687";var l_={sm:16,md:20},p_={sm:[CheckFilledIcon,ErrorAltFilledIcon],md:[CheckFilledIcon$1,ErrorAltFilledIcon$1]},So=ro.forwardRef(({className:e,style:o,size:t="md",variant:r="active","data-block-id":a,"data-block-class":n,...i},s)=>{let{labelProps:p,progressBarProps:l}=useProgressBar({...i,isIndeterminate:!0}),c=l_[t],m=c/2-2,u=2*m*Math.PI,d=p_[t][r==="success"?0:1];return jsxs("div",{className:classNames(sp,"BaselineUI-ProgressSpinner",e),ref:s,style:{...assignInlineVars({[ap]:`${u}px`}),...o},"data-block-id":a,"data-block-class":n,children:[jsxs("div",{...l,className:lp,children:[(r==="active"||r==="inactive")&&jsxs("svg",{height:c,width:c,viewBox:`0 0 ${c} ${c}`,children:[jsx("circle",{role:"presentation",className:tp,cx:c/2,cy:c/2,r:m}),r==="active"&&jsx("circle",{role:"presentation",className:rp,cx:c/2,cy:c/2,r:m})]}),r==="success"&&jsx(d,{className:pp,size:c}),r==="error"&&jsx(d,{className:np,size:c})]}),i.label?jsx("span",{...p,className:ip,children:i.label}):null]})});So.displayName="ProgressSpinner";var _r=v({defaultClassName:"_5uw3kp0 oom8bs0 z9nup82",variantClassNames:{isHovered:{true:"_5uw3kp1"},isFocusVisible:{true:"_5uw3kp2"},isDisabled:{true:"_5uw3kp3"},isSelected:{true:"_5uw3kp4"},size:{sm:"_5uw3kp5",md:"_5uw3kp6",lg:"_5uw3kp7"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isFocusVisible:!0},"_5uw3kp8"],[{isSelected:!0,isDisabled:!0},"_5uw3kp9"]]});var g_={sm:16,md:20,lg:24},zr=ro.forwardRef(({className:e,style:o,iconStart:t,size:r="md",elementType:a="button",...n},i)=>{let s=useToggleState(n),{buttonProps:p,isPressed:l,ref:c}=Yt(n,s),{hoverProps:m,isHovered:u}=useHover({isDisabled:n.isDisabled}),{isFocusVisible:d,isFocused:f,focusProps:y}=useFocusRing(),b=filterTruthyValues({"data-block-id":n["data-block-id"],"data-block-class":n["data-block-class"],"data-focused":f,"data-focus-visible":d,"data-disabled":n.isDisabled,"data-hovered":u,"data-pressed":l,"data-selected":s.isSelected});return jsxs(a,{...mergeProps(p,m,y,b),className:classNames(_r({isHovered:u,isFocusVisible:d,isSelected:s.isSelected,size:r,isDisabled:n.isDisabled}),"BaselineUI-ToggleButton",e),style:o,ref:M(c,i),children:[t?jsx(t,{size:g_[r]}):null,n.label]})});zr.displayName="ToggleButton";var hr=v({defaultClassName:"_16vugd0e",variantClassNames:{isDisabled:{true:"_16vugd0f"}},defaultVariants:{},compoundVariants:[]}),cp=v({defaultClassName:"_16vugd01 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it",variantClassNames:{labelPosition:{end:"_1yep5z613k _1yep5z613l _1yep5z613m _1yep5z6ut _1yep5z6uu _1yep5z6uv",start:"_1yep5z613q _1yep5z613r _1yep5z613s _1yep5z6152 _1yep5z6153 _1yep5z6154"}},defaultVariants:{},compoundVariants:[]}),dp=v({defaultClassName:"_16vugd05",variantClassNames:{isIndeterminate:{true:"_16vugd04"},isSelected:{true:"_16vugd04"},isFocusVisible:{true:"_16vugd08"},isHovered:{true:"_16vugd09"},isDisabled:{true:"_16vugd0a"},isReadOnly:{true:"_16vugd0b"},hasError:{true:"_16vugd0c"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!0},"_16vugd0d"]]});var fp=ro.forwardRef(({className:e,style:o,label:t,labelPosition:r="end","data-block-id":a,"data-block-class":n,...i},s)=>{let p=ro.useRef(null),l=useToggleState(i),{isFocusVisible:c,isFocused:m,focusProps:u}=useFocusRing(),{inputProps:d,isPressed:f,isDisabled:y,isSelected:b,isReadOnly:g}=useCheckbox({...i,children:t},l,p),{hoverProps:z,isHovered:_}=useHover({isDisabled:y}),h=filterTruthyValues({"data-disabled":y,"data-readonly":g,"data-hovered":_,"data-selected":b,"data-pressed":f,"data-indeterminate":i.isIndeterminate,"data-invalid":i.isInvalid,"data-focus-visible":c,"data-focused":m,"data-block-id":a,"data-block-class":n});return jsxs("label",{...h,className:classNames(cp({labelPosition:r}),"BaselineUI-Checkbox",e),style:o,ref:s,children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(d,u),ref:p})}),jsxs("div",{...z,className:dp({isSelected:b&&!i.isIndeterminate,isIndeterminate:i.isIndeterminate,isFocusVisible:c,isDisabled:y,isReadOnly:g,hasError:i.isInvalid,isHovered:_}),children:[b&&!i.isIndeterminate?jsx(CheckmarkIcon$1,{size:12}):null,i.isIndeterminate?jsx(MinusIcon$1,{size:12}):null]}),t?jsx("span",{className:hr({isDisabled:y}),children:t}):null]})});fp.displayName="Checkbox";var yp={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 bp=v({defaultClassName:"_1nsi9h17",variantClassNames:{isFocused:{true:"_1nsi9h18"},variant:{pinned:"_1nsi9h19",floating:"_1nsi9h1a"},size:{xs:"_1nsi9h1b",sm:"_1nsi9h1c",md:"_1nsi9h1d",lg:"_1nsi9h1e"}},defaultVariants:{},compoundVariants:[]}),gp="_1nsi9h1f _1yep5z6l6 _1yep5z6ky _1yep5z6eu",vp=v({defaultClassName:"_1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6fs _1yep5z6e1",variantClassNames:{size:{xs:"_1nsi9h11 _1yep5z6vt _1yep5z6vu _1yep5z6vv _1yep5z6wh _1yep5z6wi _1yep5z6wj _1yep5z6x5 _1yep5z6x6 _1yep5z6x7 _1yep5z6xt _1yep5z6xu _1yep5z6xv _1yep5z6z6",sm:"_1nsi9h12 _1yep5z6z9",md:"_1nsi9h13",lg:"_1nsi9h14"},variant:{floating:"_1yep5z6yi _1yep5z616k _1yep5z616i _1yep5z6120",pinned:"_1yep5z6166"}},defaultVariants:{},compoundVariants:[]}),_p=v({defaultClassName:"_1nsi9h1g _1yep5z6ev",variantClassNames:{isDisabled:{true:"_1yep5z6109"}},defaultVariants:{},compoundVariants:[]});var K_={style:"decimal"},G_={xs:[CaretLeftIcon,CaretRightIcon],sm:[CaretLeftIcon$1,CaretRightIcon$1],md:[CaretLeftIcon$2,CaretRightIcon$2],lg:[CaretLeftIcon$3,CaretRightIcon$3]},Pp=ro.forwardRef(({className:e,style:o,minValue:t=1,defaultValue:r=1,incrementAriaLabel:a,decrementAriaLabel:n,"aria-label":i,size:s="md",variant:p="floating",hideActions:l,isDisabled:c,...m},u)=>{let{locale:d}=useLocale(),f=E(yp),y={...m,formatOptions:K_,minValue:t,incrementAriaLabel:a||f.formatMessage("nextPage"),decrementAriaLabel:n||f.formatMessage("prevPage"),defaultValue:r,"aria-label":i||f.formatMessage("goToPage")},b=ro.useRef(null),g=useNumberFieldState({...y,locale:d}),{inputProps:z,decrementButtonProps:_,incrementButtonProps:h,groupProps:P}=useNumberField({...y,onKeyDown:H=>{H.key==="Enter"&&b.current?.blur(),m.onKeyDown?.(H);},isDisabled:c},g,b),{hoverProps:x,isHovered:k}=useHover({}),{focusProps:w,isFocused:I,isFocusVisible:N}=useFocusRing(),L=p==="floating",[S,T]=G_[s],C=filterTruthyValues({"data-focus-visible":N,"data-focused":I,"data-hovered":k,"data-block-id":m["data-block-id"],"data-block-class":m["data-block-class"]}),F=useInteractionModality()==="keyboard";return jsxs("div",{...mergeProps(P,x,C),className:classNames(vp({size:s,variant:p}),"BaselineUI-Pagination",e),style:o,ref:u,children:[l?null:jsxs(Fragment,{children:[jsx(D,{icon:S,..._,elementType:"div",size:s,style:{height:"100%",...L&&{borderRadius:0}},className:"BaselineUI-Pagination-DecrementButton",UNSAFE_NON_INTERACTIVE:F,isDisabled:c||_.isDisabled}),p==="floating"&&jsx(O,{orientation:"vertical"})]}),jsxs("div",{className:bp({isFocused:I,variant:p,size:s}),"aria-label":f.formatMessage("pageXofY",{arg0:z.value,arg1:g.maxValue}),children:[jsx("input",{...mergeProps(z,w),ref:b,className:classNames("BaselineUI-Pagination-Input",gp),style:{width:`${z.value?.toString().length||1}ch`}}),jsxs("span",{className:_p({isDisabled:c}),children:["/ ",jsx(To,{value:g.maxValue})]})]}),l?null:jsxs(Fragment,{children:[p==="floating"&&jsx(O,{orientation:"vertical"}),jsx(D,{icon:T,...h,elementType:"div",size:s,style:{height:"100%",...L&&{borderRadius:0}},className:"BaselineUI-Pagination-IncrementButton",UNSAFE_NON_INTERACTIVE:F,isDisabled:c||h.isDisabled})]})]})});Pp.displayName="Pagination";var kp=({date:e,...o})=>{let t=useDateFormatter(o);return jsx(Fragment,{children:t.format(e)})};kp.displayName="DateFormat";var xr=v({defaultClassName:"_1f789qj1",variantClassNames:{isFocusVisible:{true:"_1f789qj2"},variant:{neutral:"_1f789qj3",red:"_1f789qj4",green:"_1f789qj5",blue:"_1f789qj6","high-contrast":"_1f789qj7"},isDisabled:{true:"_1f789qj8"},allowsRemoving:{true:"_1f789qj9"},isSelected:{true:"_1f789qja"},allowsSelection:{true:"_1f789qjb"},isHovered:{true:"_1f789qjc"}},defaultVariants:{},compoundVariants:[[{allowsSelection:!0,isHovered:!0,variant:"neutral"},"_1f789qjd"],[{allowsSelection:!0,isHovered:!0,variant:"red"},"_1f789qje"],[{allowsSelection:!0,isHovered:!0,variant:"blue"},"_1f789qjf"],[{allowsSelection:!0,isHovered:!0,variant:"green"},"_1f789qjg"],[{allowsSelection:!0,isHovered:!0,variant:"high-contrast"},"_1f789qjh"],[{allowsSelection:!0,isSelected:!0,isHovered:!0},"_1f789qji"]]}),wp="_1f789qjj",Rp="_1f789qj0",Ip=v({defaultClassName:"_1f789qjk",variantClassNames:{variant:{neutral:"_1f789qjl",red:"_1f789qjm",green:"_1f789qjn",blue:"_1f789qjo","high-contrast":"_1f789qjp"},isHovered:{true:"_1f789qjq"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,variant:"neutral"},"_1f789qjr"],[{isHovered:!0,variant:"red"},"_1f789qjs"],[{isHovered:!0,variant:"blue"},"_1f789qjt"],[{isHovered:!0,variant:"green"},"_1f789qju"],[{isHovered:!0,variant:"high-contrast"},"_1f789qjv"]]});var Lp=({item:e,state:o,variant:t="neutral"})=>{let r=ro.useRef(null),{focusProps:a,isFocusVisible:n}=useFocusRing({within:!0}),{rowProps:i,gridCellProps:s,removeButtonProps:p,allowsRemoving:l,isDisabled:c,isSelected:m,allowsSelection:u}=useTag({item:e},o,r),d=ro.useRef(null),{buttonProps:f}=useButton(p,d),{hoverProps:y,isHovered:b}=useHover({isDisabled:c}),{hoverProps:g,isHovered:z}=useHover({isDisabled:c}),_=e.value?.icon,h=e.value?.data?.variant??t;return jsx("div",{...mergeProps(i,a,g),ref:r,className:classNames(xr({isFocusVisible:n,variant:h,isDisabled:c,allowsRemoving:l,isSelected:m,allowsSelection:u,isHovered:z}),"BaselineUI-Tag"),children:jsxs("div",{...s,className:wp,children:[m?jsx(CheckmarkIcon$3,{size:16}):null,!m&&_?jsx(_,{size:16}):null,e.rendered,l?jsx("button",{...mergeProps(f,y),className:Ip({variant:h,isHovered:b}),children:jsx(XIcon$2,{})}):null]})})};var Dp=ro.forwardRef(({className:e,style:o,"data-block-id":t,"data-block-class":r,items:a,...n},i)=>{let s=useMemo(()=>a.map(u=>({...u,data:{variant:u.variant}})),[a]),p=re(),l=ro.useRef(null),c=useListState({...n,items:s,children:p}),{gridProps:m}=useTagGroup(n,c,l);return jsx("div",{...m,className:classNames(Rp,"BaselineUI-TagGroup",e),style:o,"data-block-id":t,"data-block-class":r,ref:M(i,l),children:[...c.collection].map(u=>jsx(Lp,{state:c,item:u,variant:n.variant},u.key))})});Dp.displayName="TagGroup";var Ep="_1yep5z6kv",Fp=v({defaultClassName:"_1kvz17db _1yep5z6ki _1yep5z6kk",variantClassNames:{showActionsOnTriggerOnly:{true:"_1kvz17dc"},isTriggered:{true:"_1kvz17dd"}},defaultVariants:{},compoundVariants:[]}),Hp=v({defaultClassName:"_1kvz17d0 _1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z68c _1yep5z68d _1yep5z68e _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6ki _1yep5z6kj",variantClassNames:{isExpanded:{true:"_1kvz17d1"}},defaultVariants:{},compoundVariants:[]}),Op="_1yep5z6ev _1yep5z6dy",Vp=v({defaultClassName:"_1kvz17d2 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jr _1yep5z6js _1yep5z6jt _1yep5z6ki _1yep5z6kl",variantClassNames:{isFocusVisible:{true:"_1kvz17d3"},isHovered:{true:"_1yep5z6ft",false:"_1yep5z6fu"},isDisabled:{true:"z9nup83"}},defaultVariants:{},compoundVariants:[]}),Ap="_1kvz17da _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6dz",jp=v({defaultClassName:"_1kvz17d7 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it",variantClassNames:{isDisabled:{true:"_1yep5z6ey",false:"_1yep5z6eu"}},defaultVariants:{},compoundVariants:[]});var Za=ro.forwardRef(({children:e,className:o,style:t},r)=>{let{headers:a}=useContext($e),{disabledKeys:n}=useContext($e),{keyboardProps:i}=useKeyboard({onKeyDown:s=>{let p=$t(s.target),l=[...a?.keys()||[]].findIndex(f=>a?.get(f)?.current===p?.activeElement),c=a?.get(l||0),m=a?.size||0,u=f=>{let y=a.get(f-1<0?m-1:f-1);n?.has(y?.current?.getAttribute("data-key")||"")?u(f-1):y?.current?.focus();},d=f=>{let y=a.get((f+1)%m);n?.has(y?.current?.getAttribute("data-key")||"")?d(f+1):y?.current?.focus();};if(c)switch(s.key){case"Home":{s.preventDefault(),d(-1);break}case"End":{s.preventDefault(),u(m);break}case"ArrowDown":{s.preventDefault(),d(l);break}case"ArrowUp":{s.preventDefault(),u(l);break}default:s.continuePropagation();}}});return jsx("div",{...i,style:t,className:classNames(Ep,o),ref:r,children:ro.Children.map(e,(s,p)=>ro.cloneElement(s,{index:p}))})});Za.displayName="AccordionBase";var $e=ro.createContext({expandedKeys:new Set,setExpandedKeys:()=>{},disabledKeys:new Set,headers:new Map,expansionMode:"multiple"}),qp=ro.forwardRef(({children:e,disabledKeys:o,defaultExpandedKeys:t=new Set,expandedKeys:r,expansionMode:a="multiple",onChange:n,className:i,style:s},p)=>{let[l,c]=ro.useState(t),m=ro.useRef(new Map).current,[u,d]=ro.useState(a);useEffect(()=>{d(u);},[u]),useEffect(()=>{n?.(l);},[l,n]);let f=useMemo(()=>({expandedKeys:r||l,setExpandedKeys:r?()=>{}:c,disabledKeys:o,headers:m,expansionMode:u}),[r,l,o,m,u]);return jsx($e.Provider,{value:f,children:jsx(FocusScope,{children:jsx(Za,{className:i,style:s,ref:p,children:e})})})});qp.displayName="Accordion";var Ja=ro.forwardRef(({title:e,actions:o,controlId:t,value:r,id:a,index:n,subLabel:i,showActionsOnTriggerOnly:s},p)=>{let l=ro.useRef(null),{expandedKeys:c,setExpandedKeys:m,expansionMode:u,disabledKeys:d,headers:f}=useContext($e),y=d?.has(r),b=useFocusManager();invariant(b);let{focusNext:g,focusPrevious:z}=b,{keyboardProps:_}=useKeyboard({onKeyDown:C=>{C.key==="ArrowRight"?g({wrap:!0}):C.key==="ArrowLeft"?z({wrap:!0}):C.continuePropagation();},isDisabled:y});useEffect(()=>{invariant(typeof n=="number","AccordionItem must have an index"),f?.set(n,l);},[n,f]);let h=()=>{m(C=>{let R=new Set(C);return R.has(r)?R.delete(r):(u==="single"&&R.clear(),R.add(r)),R});},{buttonProps:P}=useButton({"aria-expanded":c.has(r),"aria-controls":t,onPress:h,isDisabled:y},l),{pressProps:x}=usePress({onPress:h,isDisabled:y}),{focusProps:k,isFocusVisible:w}=useFocusRing(),{hoverProps:I,isHovered:N}=useHover({isDisabled:y}),{focusProps:L,isFocusVisible:S}=useFocusRing({within:!0}),T=c.has(r);return jsxs("h3",{...mergeProps(_,x,I,L),className:Vp({isFocusVisible:w,isHovered:N,isDisabled:y}),ref:p,children:[jsxs("div",{className:jp({isDisabled:!!y}),children:[jsx(ChevronRightIcon,{className:Hp({isExpanded:T}),size:8}),jsx("button",{...mergeProps(P,k),id:a,"data-key":r,className:Ap,ref:l,children:e})]}),o?.length?jsx("div",{"data-testid":"action-buttons",className:Fp({showActionsOnTriggerOnly:s,isTriggered:S||N}),children:o.map((C,R)=>jsx(D,{variant:"secondary",size:"sm",excludeFromTabOrder:!0,isDisabled:y,...C},R))}):null,i?jsx("div",{className:Op,children:i}):null]})});Ja.displayName="AccordionHeader";var Jp=ro.forwardRef(({title:e,actions:o,children:t,value:r,index:a,subLabel:n,style:i,className:s,showActionsOnTriggerOnly:p},l)=>{let c=useId(),m=useId(),{expandedKeys:u}=useContext($e),d=ro.useRef(null),f=u.has(r),y=_o(),b=useReducedMotion(),g=useTransition(f?[r]:[],{from:!y&&!b&&{height:0,opacity:0},enter:()=>async z=>{await z({height:d.current?.scrollHeight,opacity:1});},leave:{height:0,opacity:0},keys:z=>z.toString()});return jsxs(Fragment,{children:[jsx(FocusScope,{children:jsx(Ja,{value:r,actions:o,id:m,title:e,controlId:c,ref:l,index:a,subLabel:n,showActionsOnTriggerOnly:p})}),g(z=>jsx(animated.div,{role:"region","aria-labelledby":m,id:c,style:{...z,overflow:"hidden"},children:jsx("div",{ref:d,className:s,style:i,children:t})}))]})});Jp.displayName="AccordionItem";var gt=ro.forwardRef(({variant:e,isOpen:o,selectedIcon:t,validationState:r="valid",valueProps:a,label:n,...i},s)=>{let p=ro.useRef(null),{buttonProps:l,isPressed:c}=useButton({...i,isDisabled:i.isDisabled||i.isReadOnly},p),{hoverProps:m,isHovered:u}=useHover({isDisabled:i.isDisabled}),{focusProps:d,isFocused:f,isFocusVisible:y}=useFocusRing(),b=Ro({isReadOnly:i.isReadOnly,validationState:r});i.isReadOnly&&(l.disabled=!1);let g=filterTruthyValues({"data-disabled":i.isDisabled,"data-readonly":i.isReadOnly,"data-focused":f,"data-focus-visible":y,"data-hovered":u,"data-pressed":c,"data-open":o});return jsxs("button",{...mergeProps(l,m,d,g),ref:M(s,p),className:classNames(Zs({isFocused:y,isDisabled:i.isDisabled}),yo({variant:e,isHovered:u,isFocused:y,validationState:r,isDisabled:!!i.isDisabled,isReadOnly:i.isReadOnly}),"BaselineUI-Select-Button"),children:[jsxs("span",{className:Js,children:[t?jsx(t,{size:24}):null,jsx("span",{...a,children:n})]}),b?jsx("span",{"aria-hidden":!0,className:classNames(fo({validationState:r,isReadOnly:!!i.isReadOnly}),Qs),children:jsx(b,{size:16})}):null,jsx("span",{"aria-hidden":!0,children:jsx(ChevronDownIcon,{size:8,className:Ys({isOpen:o})})})]})});gt.displayName="SelectButton";var Pr=ro.createContext({state:null,popoverAnchorRef:null}),tn=ro.forwardRef(({className:e,style:o,labelPosition:t="top",variant:r="primary","data-block-id":a,"data-block-class":n,optionStyle:i,optionClassName:s,placement:p="bottom start",state:l,renderTrigger:c=({buttonProps:d,selectedValue:f,valueProps:y,isOpen:b,ref:g})=>{let z=f&&"icon"in f&&f.icon;return jsx(gt,{...d,isOpen:b,isReadOnly:m.isReadOnly,ref:g,variant:r,validationState:m.validationState,selectedIcon:z||void 0,label:f?"label"in f&&f?.label:m.placeholder,valueProps:y})},...m},u)=>{let{popoverAnchorRef:d}=useContext(Pr),f=ro.useRef(null),y=fe(m.portalContainer),{labelProps:b,triggerProps:g,valueProps:z,menuProps:_,descriptionProps:h,errorMessageProps:P}=useSelect({...m,validationState:m.validationState==="error"?"invalid":"valid"},l,f),x=xe({...m,descriptionProps:h,errorMessageProps:P,labelPosition:t}),k=l.selectedItem?.value??null;return jsxs(Qe.Provider,{value:l,children:[jsxs("div",{style:o,className:classNames(Oe({labelPosition:t}),"BaselineUI-Select",e),"data-block-id":a,"data-block-class":n,ref:u,children:[m.label||x?jsxs("div",{className:He({labelPosition:t,hasMessage:!!x}),children:[m.label?jsx("div",{...b,className:classNames(Fe,"BaselineUI-Select-Label"),children:m.label}):null,t==="start"&&x]}):null,jsx(HiddenSelect,{state:l,triggerRef:f,isDisabled:m.isDisabled,label:m.label,name:m.name}),c({buttonProps:g,selectedValue:k,valueProps:z,isOpen:l.isOpen,ref:f}),t==="top"&&x]}),l.isOpen?jsx(me,{placement:p,portalContainer:y,offset:m.offset||2,state:l,triggerRef:d||f,style:o,className:classNames(je,"BaselineUI-Select-Popover"),...m,children:jsx(ae,{..._,label:m.label,items:m.items,showSelectedIcon:m.showSelectedIcon,className:ur,optionStyle:i,optionClassName:s})}):null]})});tn.displayName="SelectCore";var ac=ro.forwardRef((e,o)=>{let t=re(),r=useSelectState({...e,validationState:e.validationState==="error"?"invalid":"valid",children:t});return jsx(tn,{...e,ref:o,state:r})});ac.displayName="SelectStandalone";var qe=ro.forwardRef((e,o)=>{let{state:t}=useContext(Pr);return useEffect(()=>{invariant(t||e.items,"Select: A `state` that can be passed via context or `items` are required.");},[e.items,t]),t?jsx(tn,{state:t,...e,ref:o}):jsx(ac,{...e,ref:o})});qe.displayName="Select";var ic=ro.forwardRef(({className:e,style:o,variant:t,"data-block-id":r,icon:a,tooltipProps:n,...i},s)=>{let p=ro.useRef(null),l=useCallback(({buttonProps:c,selectedValue:m,valueProps:u,isOpen:d,ref:f})=>{let y=m&&"icon"in m&&m.icon;return jsx(ke,{variant:"inverse",size:"sm",includeArrow:!1,text:i["aria-label"],offset:4,...n,children:jsx(gt,{...c,isOpen:d,isReadOnly:i.isReadOnly,ref:f,variant:t,validationState:i.validationState,selectedIcon:y||void 0,label:m?"label"in m&&m?.label:i.placeholder,valueProps:u})})},[i,n,t]);return jsxs(B,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:classNames("BaselineUI-IconSelect",e),"data-block-id":r,style:o,ref:M(s,p),children:[a?jsx(a,{size:24,className:sprinkles({color:"icon.primary",display:"flex",flexShrink:0})}):null,jsx(qe,{...i,renderTrigger:l})]})});ic.displayName="IconSelect";var sc="_1017q4c5",lc=v({defaultClassName:"_1017q4c0",variantClassNames:{size:{md:"_1017q4c1",sm:"_1017q4c2"},isDisabled:{true:"_1017q4c3"}},defaultVariants:{},compoundVariants:[]}),pc="_1017q4c4";var G6={sm:AvatarIcon,md:AvatarIcon$1},Bo=ro.forwardRef(({className:e,style:o,size:t="md",icon:r=G6[t],name:a,imgSrc:n,showInitials:i,isDisabled:s,hasNotifications:p,imgLoading:l,"data-block-id":c,"data-block-class":m},u)=>{let{imgProps:d}=vo({src:n,alt:a}),f=a?.split(" ").map(y=>y[0]).join("");return jsxs("span",{className:classNames(lc({size:t,isDisabled:s}),"BaselineUI-Avatar",e),"data-disabled":s,ref:u,style:o,"aria-disabled":s,"data-block-id":c,"data-block-class":m,children:[n?jsx("img",{...d,loading:l,className:pc}):null,!i&&!n&&jsx(r,{size:t==="sm"?16:24}),i&&!n?t==="sm"?f[0]:f:null,p?jsx("div",{"data-testid":"notification",className:sc}):null]})});Bo.displayName="Avatar";var cc="_1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z63l _1yep5z63m _1yep5z63n _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it",dc=v({defaultClassName:"_1x62fhb6 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6kx _1yep5z6ky _1yep5z6ki _1yep5z6kl _1yep5z6ev _1yep5z69i _1yep5z69j _1yep5z69k",variantClassNames:{isHovered:{true:"_1yep5z6105"},isSelected:{true:"_1x62fhb8"},isFocusVisible:{true:"_1x62fhb9"},isDisabled:{true:"_1x62fhba _1yep5z6109"},variant:{primary:"_1x62fhbb _1yep5z6z6",ghost:"_1yep5z6z9"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isSelected:!0,isDisabled:!1},"_1yep5z61lg"],[{variant:"primary",isSelected:!0},"_1yep5z61me"],[{variant:"ghost",isSelected:!0,isFocusVisible:!1},"_1x62fhbd"],[{variant:"ghost",isSelected:!0,isDisabled:!1},"_1yep5z61lr"],[{variant:"ghost",isDisabled:!0,isSelected:!0},"_1x62fhbe _1yep5z6ey"],[{variant:"primary",isHovered:!0},"_1yep5z61mf"]]}),mc=v({defaultClassName:"_1x62fhb3 _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6i9 _1yep5z6ia _1yep5z6ib",variantClassNames:{variant:{primary:"_1x62fhb4",ghost:"_1yep5z6ut _1yep5z6uu _1yep5z6uv"}},defaultVariants:{},compoundVariants:[]}),uc="_1x62fhbf",fc="_1yep5z6l2 _1yep5z6kz _1yep5z6hc _1yep5z6l1",yc=v({defaultClassName:"_1x62fhb0 _1yep5z6kv _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib",variantClassNames:{variant:{primary:"_1yep5z6115",ghost:"_1x62fhb2"}},defaultVariants:{},compoundVariants:[]});var bc=({state:e,...o})=>{let t=ro.useRef(null),{tabPanelProps:r}=useTabPanel(o,e,t),{selectedItem:a}=e,{focusProps:n,isFocusVisible:i}=useFocusRing();if(!a?.value)return null;let{className:s,style:p,"data-block-id":l}=a.value;return jsx("div",{...mergeProps(r,n),ref:t,className:classNames({[fc]:i},"Baseline-Tabs-TabPanel",s),"data-block-id":l,style:p,children:a?.props.children})};var sn=ro.forwardRef(({className:e,style:o,tabHeaderStyle:t,tabHeaderClassName:r,variant:a="primary",actions:n,onRemove:i,"data-block-id":s,...p},l)=>{let c=useTabListState({...p,selectedKey:p.selectedValue,defaultSelectedKey:p.defaultSelectedValue,disabledKeys:p.disabledValues}),m=ro.useRef(null),{tabListProps:u}=useTabList({...p,selectedKey:p.selectedValue,defaultSelectedKey:p.defaultSelectedValue,disabledKeys:p.disabledValues},c,m);return jsxs("div",{className:classNames("BaselineUI-Tabs",e),style:o,ref:l,"data-block-id":s,children:[jsxs("div",{className:classNames(yc({variant:a}),r),style:t,children:[jsx("div",{...u,className:mc({variant:a}),ref:m,children:[...c.collection].map(d=>(invariant(d.value,"TabItem requires a value prop"),jsx(vc,{item:d,state:c,onRemove:i,variant:a},d.key)))}),n?.map((d,f)=>jsx("div",{className:cc,children:jsx(D,{...d,variant:"secondary",size:"sm",className:classNames(uc,d.className)})},f))]}),jsx(bc,{state:c},c.selectedItem?.key)]})});sn.displayName="TabsBase";var vc=({item:e,onRemove:o,state:t,variant:r})=>{let{key:a,value:n}=e,i=ro.useRef(null),{tabProps:s,isSelected:p,isDisabled:l}=useTab({key:a},t,i),{hoverProps:c,isHovered:m}=useHover({});invariant(n,"TabButton requires a value prop");let{title:u,icon:d,titleStyle:f,titleClassName:y}=n,{focusProps:b,isFocusVisible:g,isFocused:z}=useFocusRing(),{keyboardProps:_}=useKeyboard({onKeyDown:P=>{P.key==="Backspace"&&o?o(a):P.continuePropagation();}}),h=filterTruthyValues({"data-selected":p,"data-disabled":l,"data-focused":z,"data-hovered":m,"data-focus-visible":g});return jsxs("div",{...mergeProps(_,s,c,b,h),className:classNames(dc({isHovered:m,isSelected:p,isFocusVisible:g,isDisabled:l,variant:r}),"BaselineUI-Tabs-TabButton",y),style:f,ref:i,children:[d?jsx(d,{size:20}):null,u,o?jsx(D,{variant:"secondary",elementType:"div",icon:XIcon$1,size:"xxs",onPress:()=>{o(a);},excludeFromTabOrder:!0,UNSAFE_NON_INTERACTIVE:!0,style:{display:"inline-flex",color:"inherit",opacity:p||z||m?1:0}}):null]})};vc.displayName="TabButton";var zc=ro.forwardRef(({children:e,...o},t)=>{let r=useMemo(()=>ro.Children.map(e,a=>!a||!ro.isValidElement(a)||typeof a.type=="string"?null:{...a.props,id:a.props.value}).filter(Boolean),[e]);return jsx(sn,{...o,ref:t,items:r,children:a=>jsx(Item,{title:a.title,children:a.children},a.key)})});zc.displayName="Tabs";var hc=({children:e,title:o,value:t})=>(invariant(t,"TabItem requires a value prop"),invariant(o,"TabItem requires a title prop"),invariant(e,"TabItem requires children"),e);hc.displayName="TabItem";var xc={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 Cc=v({defaultClassName:"kfun6yw",variantClassNames:{arrangement:{single:"kfun6yx",multi:"kfun6yy",compact:"kfun6yz"}},defaultVariants:{},compoundVariants:[]}),Pc=v({defaultClassName:"kfun6y0 z9nup82",variantClassNames:{variant:{info:"kfun6y1",warning:"kfun6y2",error:"kfun6y3",success:"kfun6y4"},arrangement:{single:"kfun6y5",multi:"kfun6y6",compact:"kfun6y7"},hasButton:{true:"kfun6y8"},hasCloseButton:{true:"kfun6y9"}},defaultVariants:{},compoundVariants:[[{hasButton:!1,arrangement:"single"},"kfun6ya"],[{hasButton:!0,arrangement:"compact"},"kfun6yb"],[{hasCloseButton:!0,arrangement:"compact"},"kfun6yc"]]}),kc=v({defaultClassName:"kfun6yt",variantClassNames:{size:{sm:"kfun6yu",md:"kfun6yv"}},defaultVariants:{},compoundVariants:[]}),wc=v({defaultClassName:"kfun6yp",variantClassNames:{arrangement:{single:"kfun6yq",multi:"kfun6yr",compact:"kfun6ys"}},defaultVariants:{},compoundVariants:[]}),Rc=v({defaultClassName:"kfun6yk",variantClassNames:{variant:{info:"kfun6yl",warning:"kfun6ym",error:"kfun6yn",success:"kfun6yo"}},defaultVariants:{},compoundVariants:[]}),Ic=v({defaultClassName:"kfun6yh",variantClassNames:{size:{sm:"kfun6yi",md:"kfun6yj"}},defaultVariants:{},compoundVariants:[]}),Tc=v({defaultClassName:"kfun6yd z9nup82",variantClassNames:{arrangement:{single:"kfun6ye",multi:"kfun6yf",compact:"kfun6yg"}},defaultVariants:{},compoundVariants:[]});var P5={error:{sm:ErrorAltFilledIcon,md:ErrorAltFilledIcon$1},info:{sm:InfoFilledIcon,md:InfoFilledIcon$1},success:{sm:CheckFilledIcon,md:CheckFilledIcon$1},warning:{sm:WarningFilledIcon,md:WarningFilledIcon$1}},Nc=ro.forwardRef(({className:e,description:o,actionLabel:t,onAction:r,style:a,variant:n="info",title:i,arrangement:s="single",onClose:p,size:l="sm","data-block-id":c,"data-block-class":m},u)=>{let d=E(xc),f=t&&jsx(A,{variant:s==="compact"?"tertiary":"ghost",label:t,onPress:r}),y=P5[n][l];return jsxs("div",{className:classNames(Pc({variant:n,arrangement:s,hasButton:!!t||!!p,hasCloseButton:!!p}),"BaselineUI-InlineAlert",e),"data-block-id":c,"data-block-class":m,style:a,role:"alert",ref:u,children:[jsxs("div",{className:Tc({arrangement:s}),children:[jsx(y,{className:Rc({variant:n}),size:16}),jsxs("div",{className:Cc({arrangement:s}),children:[jsx("h3",{className:Ic({size:l}),children:i}),jsx("section",{className:kc({size:l}),children:o})]}),s==="compact"&&f]}),jsxs("div",{className:wc({arrangement:s}),children:[s!=="compact"&&f,p?jsx(D,{variant:"secondary",icon:CloseIcon,size:"sm",onPress:p,"aria-label":d.formatMessage("close")}):null]})]})});Nc.displayName="InlineAlert";var Ke={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 Ir=({children:e})=>{let{triggerProps:o}=ro.useContext(Ae);return jsx(PressResponder,{...o,children:e})};Ir.displayName="ModalTrigger";var S5=({children:e})=>{let{state:o}=ro.useContext(Ae);return jsx(PressResponder,{onPress:()=>{o?.close();},children:e})};var Sc="_1dbkl53 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6kv",Lc="_1dbkl5e",Mc=v({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 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6l6 _1yep5z6ky _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6eu _1yep5z6kx _1yep5z6dy",variantClassNames:{isHovered:{true:"_1dbkl55"},isFocusVisible:{true:"_1dbkl56"},isDisabled:{true:"z9nup83 _1yep5z6109"},labelPosition:{top:"_1dbkl58",start:"_1dbkl59"}},defaultVariants:{},compoundVariants:[]}),Bc="_1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jr _1yep5z6js _1yep5z6jt",Dc=v({defaultClassName:"_1dbkl50 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6dy _1yep5z6ev",variantClassNames:{labelPosition:{top:"_1yep5z6nq _1yep5z6nr _1yep5z6ns",start:"_1dbkl52"}},defaultVariants:{},compoundVariants:[]}),Tr="_1dbkl5l _1yep5z6i6 _1yep5z6i7 _1yep5z6i8 _1yep5z69f _1yep5z69g _1yep5z69h",Ec="_1dbkl5f z9nup87",Nr="_1dbkl5m _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6hl _1yep5z6hm _1yep5z6hn",Fc="_1dbkl5k _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ky",Hc="_1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6jr _1yep5z6js _1yep5z6jt _1yep5z6dy _1yep5z6ev _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6ir _1yep5z6is _1yep5z6it",Sr=v({defaultClassName:"_1dbkl5h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6fs",variantClassNames:{includesCustomColorPicker:{true:"_1yep5z6me _1yep5z6mf _1yep5z6mg"}},defaultVariants:{},compoundVariants:[]}),cn="_1dbkl5v _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib",Oc=v({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 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6l7 _1yep5z6gq _1yep5z6ky _1yep5z6eu _1yep5z6dy",variantClassNames:{isFocused:{true:"_1dbkl5r _1yep5z611y"},isHovered:{true:"_1dbkl5s"},allowAlpha:{false:"_1yep5z6wh _1yep5z6wi _1yep5z6wj _1yep5z6xt _1yep5z6xu _1yep5z6xv _1yep5z6166"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,isFocused:!1},"_1yep5z61nd"]]}),Vc=v({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 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ic _1yep5z6id _1yep5z6ie _1yep5z69c _1yep5z69d _1yep5z69e _1yep5z6f0 _1yep5z6kx _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6ki _1yep5z6kl",variantClassNames:{isHovered:{true:"_1yep5z6115"},isFocusVisible:{true:"_1yep5z616c _1yep5z616a _1yep5z616d _1yep5z612n"},isDisabled:{true:"_1yep5z610d"}},defaultVariants:{},compoundVariants:[]}),zt="_1dbkl5u",Lr="_1dbkl5g _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7",Mr="_1dbkl5j _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ic _1yep5z6id _1yep5z6ie _1yep5z69f _1yep5z69g _1yep5z69h",dn="_1dbkl5x",Ac="_1dbkl5w",mn="_1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ic _1yep5z6id _1yep5z6ie _1yep5z69l _1yep5z69m _1yep5z69n",Br=v({defaultClassName:"_1dbkl5n _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6l2 _1yep5z6ho _1yep5z6hp _1yep5z6hq _1yep5z6l7 _1yep5z6la",variantClassNames:{isFocusVisible:{true:"_1dbkl5o _1yep5z616a _1yep5z612n _1yep5z616c"}},defaultVariants:{},compoundVariants:[]}),un="z9nup84 z9nup86 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6ko _1yep5z6kp _1yep5z6kr _1yep5z6kq _1yep5z6ho _1yep5z6hp _1yep5z6hq";var jc=v({defaultClassName:"_1344e9q0 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6hl _1yep5z6hm _1yep5z6hn _1yep5z6ks _1yep5z6hk _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jl _1yep5z6jm _1yep5z6jn",variantClassNames:{isFocusVisible:{true:"_1344e9q1"},isDisabled:{true:"_1344e9q2"},removeBlendMode:{true:"_1344e9q3"},isSelected:{true:"_1yep5z616c _1yep5z616a _1yep5z612n _1yep5z616f"},isHovered:{true:"_1344e9q5"}},defaultVariants:{},compoundVariants:[[{isSelected:!1,isFocusVisible:!0},"_1344e9q6"],[{isSelected:!0,isFocusVisible:!0},"_1344e9q7 _1yep5z61rn _1yep5z61rl _1yep5z61ny _1yep5z61rq"],[{isSelected:!0,isDisabled:!0},"_1yep5z61rn _1yep5z61rl _1yep5z61ny _1yep5z61rq _1yep5z61o5"],[{isHovered:!0,isSelected:!1},"_1yep5z61rq _1yep5z61rn _1yep5z61rl _1yep5z61o2"]]});var Ge=ro.forwardRef(({color:e,isFocusVisible:o,isSelected:t,isInteractive:r,isDisabled:a,style:n,className:i,id:s,"data-block-id":p,"data-block-class":l,...c},m)=>{let u=e&&e!==we&&(typeof e=="string"?parseColor(e):e),{formatMessage:d}=E(),f=!u,{colorSwatchProps:y}=useColorSwatch({color:f?"#000000":e}),{hoverProps:b,isHovered:g}=useHover({isDisabled:a||!r}),z=filterTruthyValues({"data-focus-visible":o,"data-selected":t,"data-hovered":g,"data-block-id":p,"data-block-class":l,"data-disabled":a,"data-interactive":r});return jsx("div",{...mergeProps(b,z,f?{}:y),style:n,"aria-label":f?d(A5.none):y["aria-label"],role:"img",className:classNames(jc({removeBlendMode:f,isFocusVisible:o,isDisabled:!!a,isSelected:!!t,isHovered:g}),"BaselineUI-ColorSwatch",i),ref:m,id:s,...c,children:jsx(B,{display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"full",height:"full",width:"full",opacity:a?"medium":void 0,style:u?$c(u,4):void 0,children:f?jsx(NoneIcon,{size:14}):null})})});Ge.displayName="ColorSwatch";var A5=$({none:{id:"none",defaultMessage:"None"}});var qc=[{id:"hex",label:"HEX"},{id:"rgb",label:"RGB"}],Do=parseColor("#000000").toFormat("hsla"),oe="hsla",ht="hexa";function eo(e){return typeof e=="string"?parseColor(e).toFormat(oe):e?e.toFormat(oe):null}function Kc(e,o){return e?.getChannelValue("alpha")?o?.toString(ht)===e.toString(ht):!o?.getChannelValue("alpha")}function Gc(e,o,t){return o?.label?o.label:e?.getChannelValue("alpha")===0?t:e?.toString("rgba")}var we="NONE";function Wc(e,o){let t=o?.map(a=>({id:parseColor(a.color).toString(ht),label:a.label}))||[],r={id:we,label:e};return [...t,r]}var Dr=(e,{optionProps:o,isFocusVisible:t,isSelected:r},a)=>(invariant(e.value&&"label"in e.value,"Item must have label"),jsx("li",{...o,ref:a,className:Fc,children:jsx(Ge,{color:e.value.id,isFocusVisible:t,isSelected:r,"aria-label":e.value.label,isInteractive:!0})})),$c=(e,o=4)=>{let t=e.getChannelValue("alpha")===0,r=`repeating-conic-gradient(transparent 0% 25%, ${themeVars.color.background.secondary.medium} 25% 50%)`;return {backgroundImage:t?r:`linear-gradient(${e.toString("hexa")}, ${e.toString("hexa")}), ${r}`,backgroundSize:`${o}px ${o}px`}};var Yc=({value:e,...o})=>{let t=ro.useRef(null),r=ro.useRef(null),a=ro.useRef(null),n=useColorAreaState({...o,value:e}),{colorAreaProps:i,xInputProps:s,yInputProps:p,thumbProps:l}=useColorArea({...o,value:e,inputXRef:t,inputYRef:r,containerRef:a},n);useEffect(()=>{t.current?.focus();},[]);let{focusProps:c,isFocusVisible:m}=useFocusRing();return jsx("div",{ref:a,...i,className:classNames(Sc,"BaselineUI-ColorInput-ColorArea"),children:jsxs("div",{...l,className:classNames(Br({isFocusVisible:m}),"BaselineUI-ColorInput-ColorAreaThumb"),style:{...l.style,transform:"translate(-50%, -50%)",backgroundColor:eo(e)?.withChannelValue("alpha",1).toString("css")},children:[jsx("input",{ref:t,...s,...c}),jsx("input",{ref:r,...p,...c})]})})};var Jc=({color:e,setColor:o,allowAlpha:t,...r})=>{let a=useColorFieldState({value:e,onChange:m=>{o(eo(m)?.toFormat(oe).withChannelValue("alpha",e.getChannelValue("alpha")??1)||Do);}}),n=ro.useRef(null),{inputProps:i}=useColorField({...r,"aria-label":"Hex"},a,n),{focusProps:s,isFocused:p}=useFocusRing({isTextInput:!0}),{hoverProps:l,isHovered:c}=useHover({});return jsxs("div",{className:classNames(cn,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":t?"hexa":"hex",children:[jsx("input",{...mergeProps(i,s,l),ref:n,className:Oc({isFocused:p,isHovered:c,allowAlpha:t})}),t?jsx(od,{color:e,setColor:o}):null]})},ed=({color:e,setColor:o,allowAlpha:t})=>{let r=e.toFormat("rgba"),{locale:a}=useLocale();return jsxs("div",{className:classNames(cn,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":t?"rgba":"rgb",children:[jsx(Le,{"aria-label":e.getChannelName("red",a),value:r.getChannelValue("red"),showStepper:!1,className:zt,onChange:n=>{o(r.withChannelValue("red",n).toFormat(oe));},step:1,minValue:0,maxValue:255}),jsx(Le,{"aria-label":e.getChannelName("green",a),value:r.getChannelValue("green"),showStepper:!1,className:zt,onChange:n=>{o(r.withChannelValue("green",n).toFormat(oe));},step:1,minValue:0,maxValue:255}),jsx(Le,{"aria-label":e.getChannelName("blue",a),value:r.getChannelValue("blue"),showStepper:!1,className:zt,onChange:n=>{o(r.withChannelValue("blue",n).toFormat(oe));},step:1,minValue:0,maxValue:255}),t?jsx(od,{color:e,setColor:o}):null]})},tz={style:"percent",maximumFractionDigits:0},od=({color:e,setColor:o})=>{let{locale:t}=useLocale(),r=useCallback(a=>{o(e.withChannelValue("alpha",a));},[e,o]);return jsx(Le,{"aria-label":e.getChannelName("alpha",t),value:e.getChannelValue("alpha"),formatOptions:tz,className:zt,showStepper:!1,onChange:r,minValue:0,maxValue:1})};var vn=({channel:e,...o})=>{let{locale:t}=useLocale(),r=useColorSliderState({...o,channel:e,locale:t}),a=ro.useRef(null),n=ro.useRef(null),{trackProps:i,thumbProps:s,inputProps:p}=useColorSlider({...o,channel:e,trackRef:a,inputRef:n,"aria-label":r.value.getChannelName(e,t)},r),{focusProps:l,isFocusVisible:c}=useFocusRing();return jsxs("div",{className:classNames(Nr,{[Ji({size:"xs"})]:e==="alpha"},"BaselineUI-ColorInput-ColorSlider"),"data-channel":e,...i,ref:a,children:[e==="alpha"&&jsx("div",{className:un}),jsx("div",{className:Nr,style:i.style}),jsxs("div",{className:classNames(Br({isFocusVisible:c}),"BaselineUI-ColorInput-ColorSliderThumb"),...s,children:[jsx("div",{className:un,style:{backgroundColor:"#ffffff"}}),jsx("div",{style:{backgroundColor:r.getDisplayColor().toString("css"),height:8},className:Nr}),jsx(VisuallyHidden,{children:jsx("input",{ref:n,...p,...l})})]})]})};var Er=({color:e,setColor:o,allowAlpha:t})=>{let[r,a]=ro.useState("hex"),{formatMessage:n}=E(Ke);return jsxs(Fragment,{children:[jsx(Yc,{value:e,xChannel:"saturation",yChannel:"lightness",onChange:o}),jsxs("div",{className:mn,children:[jsx(vn,{channel:"hue",value:e,onChange:o}),t?jsx(vn,{channel:"alpha",value:e,onChange:o}):null]}),jsxs("div",{className:classNames(mn,sprinkles.variants({paddingTop:"none",gap:"sm"})),children:[jsx(qe,{label:n("colorFormat"),labelPosition:"start",variant:"ghost",items:qc,selectedKey:r,onSelectionChange:i=>{a(i);}}),r==="hex"&&jsx(Jc,{color:e,setColor:o,allowAlpha:t}),r==="rgb"&&jsx(ed,{color:e,setColor:o,allowAlpha:t})]})]})};var hn=({color:e,setColor:o,storePickedColorKey:t,addColorButtonLabel:r,removeColorButtonLabel:a,customColorsLabel:n,pickerMode:i,allowAlpha:s})=>{let{locale:p}=useLocale(),{formatMessage:l}=E(Ke),c=ro.useRef(null),m=zo(c.current),[u,d]=Ps(t,[]),f=ro.useRef(null),[y,b]=ro.useState(e),g=ro.useMemo(()=>u.map(k=>({id:k,label:parseColor(k).getColorName(p),description:k})),[u,p]),z=useCallback(()=>{let k=i==="active"?e:y;if(u.includes(k.toString(oe))){f.current?.querySelector(`[data-key='${k.toString(oe)}']`)?.classList.add(dn);return}d([...u,k.toString(oe)]);},[u,e,d,y,i]);useEffect(()=>{let k=f.current;function w(I){I.animationName===Ac&&I.target?.classList.remove(dn);}return k?.addEventListener("animationend",w),()=>{k?.removeEventListener("animationend",w);}},[]);let _=useId(),h=jsx(D,{ref:c,variant:"secondary",size:"md","aria-label":r,icon:PlusIcon$1,onPress:i==="active"?z:void 0}),P=useCallback(k=>jsxs(le,{size:"content",className:Sr({includesCustomColorPicker:!0}),style:{paddingBlockEnd:0},"aria-label":l("newColor"),children:[jsx(Er,{color:y,setColor:b,allowAlpha:s}),jsx(O,{}),jsx(B,{padding:"lg",display:"flex",flexDirection:"row-reverse",children:jsxs(B,{display:"inline-flex",gap:"lg",children:[jsx(A,{label:l("cancel"),size:"sm",variant:"secondary",onPress:k}),jsx(A,{label:l("add"),variant:"primary",onPress:()=>{z(),k();},size:"sm"})]})})]}),[y,z,l,s]),x=useCallback(k=>{invariant(k instanceof Set,"Key must be a set");let w=[...k][0];w&&o(parseColor(w).toFormat(oe));},[o]);return jsxs(Fragment,{children:[jsx(O,{}),jsxs("div",{className:classNames(Hc,"BaselineUI-ColorInput-CustomColors"),children:[jsx("span",{id:_,children:n}),jsxs(B,{display:"flex",children:[!!u.length&&u.includes(e.toString(oe))&&jsx(D,{variant:"secondary",size:"md",elementType:"div",icon:MinusIcon$2,"aria-label":a,onPress:()=>{d(u.filter(k=>k!==e.toString(oe)));}}),i==="active"&&h,i==="lazy"&&(m==="mobile"?jsxs(Ce,{children:[jsx(Ir,{children:h}),jsx(Me,{style:{zIndex:1e5},children:({close:k})=>P(k)})]}):jsxs(Ne,{type:"dialog",children:[jsx(Se,{children:h}),jsx(Pe,{placement:"right top",className:Lr,offset:6,children:({close:k})=>P(k)})]}))]})]}),!!u.length&&jsx(ae,{items:g,layout:"grid","aria-labelledby":_,className:classNames(Tr,Mr,sprinkles.variants({paddingTop:"xs"}),"BaselineUI-ColorInput-CustomColorsListBox"),renderOption:Dr,ref:f,autoFocus:!1,selectionMode:"single",selectedKeys:[e.toString(oe)],onSelectionChange:x})]})};var xn=ro.forwardRef(({setColor:e,color:o,triggerRef:t,autoFocus:r,presets:a,state:n},i)=>{let{formatMessage:s}=E(Ke),p=useCallback(l=>{if(l instanceof Set&&l.size){let c=[...l][0],m=a.find(u=>u.id===c);invariant(m,"Preset not found"),e(m.id===we?null:parseColor(m.id).toFormat(oe)),n.close();}},[n,a,e]);return jsx("div",{className:classNames(Mr,"BaselineUI-ColorInput-Presets"),style:{minWidth:t.current?.offsetWidth},ref:i,children:jsx(ae,{autoFocus:r,items:a,layout:"grid","aria-label":s("colorPresets"),className:Tr,renderOption:Dr,selectionMode:"single",selectedKeys:[o?.toString(ht)||we],onSelectionChange:p})})});xn.displayName="ColorPresetList";var Ct=ro.forwardRef(({color:e,colorLabel:o,colorName:t,...r},a)=>{let n=ro.useRef(null),{hoverProps:i,isHovered:s}=useHover({isDisabled:r.isDisabled}),{buttonProps:p,isPressed:l}=useButton(r,n),{isFocusVisible:c,focusProps:m}=useFocusRing(),u=filterTruthyValues({"data-block-id":r["data-block-id"],"data-focused":c,"data-focus-visible":c,"data-disabled":r.isDisabled,"data-hovered":s,"data-pressed":l});return jsxs("button",{...mergeProps(p,i,m,u),style:r.style,className:classNames(Mc({isHovered:s,isFocusVisible:c||r.isOpen,isDisabled:r.isDisabled,labelPosition:r.labelPosition}),"BaselineUI-ColorInputButton",r.className),ref:M(a,n),children:[jsx(Ge,{color:e?.toString("hexa")}),o?jsx("div",{className:Ec,children:t}):jsx(VisuallyHidden,{children:t})]})});Ct.displayName="ColorInputButton";var Or=ro.forwardRef(({className:e,style:o,icon:t,...r},a)=>{let n=ro.useRef(null),{hoverProps:i,isHovered:s}=useHover({isDisabled:r.isDisabled}),{buttonProps:p,isPressed:l}=useButton(r,n),{isFocusVisible:c,focusProps:m}=useFocusRing(),u=filterTruthyValues({"data-block-id":r["data-block-id"],"data-focused":c,"data-focus-visible":c,"data-disabled":r.isDisabled,"data-hovered":s,"data-pressed":l});return jsxs("button",{...mergeProps(p,i,m,u),ref:M(a,n),style:o,className:classNames(Vc({isHovered:s||l||r.isOpen,isFocusVisible:c,isDisabled:r.isDisabled}),"BaselineUI-IconColorInputButton",e),children:[jsx(t,{size:16}),jsx("div",{className:Lc,style:{backgroundColor:r.color||void 0}})]})});Or.displayName="IconColorInputButton";function bd({colorLabel:e,color:o,presets:t}){let{formatMessage:r}=E(),{locale:a}=useLocale(),n=useMemo(()=>t.find(p=>p.id===we?!o:o?Kc(o,parseColor(p.id)):!1),[t,o]),i=useMemo(()=>typeof e=="function"?e?.(o):e?Gc(o,n,r(Iz.transparent)):!1,[o,e,r,n]),s=useMemo(()=>{if(n?.label)return n.label;o?.getColorName(a);},[o,a,n?.label]);return {colorName:i,humanReadableName:s}}var Iz=$({transparent:{defaultMessage:"Transparent",id:"transparent"}});var Ho=ro.forwardRef(({className:e,style:o,allowRemoval:t,allowAlpha:r=!0,presets:a,labelPosition:n="top",colorLabel:i=!0,includePicker:s=!0,onChange:p,defaultValue:l,storePickedColorKey:c="baselinePickedColor",value:m,addColorButtonLabel:u,removeColorButtonLabel:d,customColorsLabel:f,renderTriggerButton:y=({isOpen:k,color:w,ref:I,colorName:N,triggerProps:L,labelId:S})=>jsx(Ct,{...mergeProps(L,{...P.label?{"aria-labelledby":S}:{"aria-label":P["aria-label"]}}),ref:I,isOpen:k,isDisabled:P.isDisabled,labelPosition:n,color:w,colorLabel:i,colorName:N}),pickerMode:b="active",offset:g=2,placement:z=n==="start"?"bottom end":"bottom start","data-block-id":_,"data-block-class":h,...P},x)=>{let k=ro.useRef(null),w=ro.useRef(null),I=useOverlayTriggerState(P),{triggerProps:N,overlayProps:L}=useOverlayTrigger({type:"listbox"},I,k),S=fe(P.portalContainer),[T,C]=useControlledState(m===void 0?void 0:eo(m),eo(l),V=>p?.(V?.toFormat("rgba")||null)),{formatMessage:R}=E(Ke),F=useMemo(()=>Wc(R(Vr.noColor),a),[a,R]),H=useId(),{colorName:U}=bd({colorLabel:i,color:T,presets:F}),G=useMemo(()=>F.filter(V=>t||V.id!==we),[F,t]),W=u||R(Vr.addColor),Q=d||R(Vr.removeColor),ce=f||R(Vr.customColors);return jsxs(Fragment,{children:[jsxs("div",{className:classNames({[Bc]:n==="start"},"BaselineUI-ColorInput-Trigger",e),"data-block-id":_,"data-block-class":h,style:o,ref:x,children:[P.label?jsx("label",{id:H,className:Dc({labelPosition:n}),children:P.label}):null,y({isOpen:I.isOpen,color:T,ref:k,colorName:U,triggerProps:N,labelId:H})]}),I.isOpen?jsx(me,{...P,portalContainer:S,placement:z,state:I,offset:g,className:classNames(Lr,"BaselineUI-ColorInput-Popover"),triggerRef:k,overlayProps:L,children:jsxs(le,{size:"content",className:Sr({includesCustomColorPicker:s}),ref:w,"aria-labelledby":H,"aria-label":P["aria-label"],children:[s&&b==="active"?jsxs(Fragment,{children:[jsx(Er,{color:T||Do,setColor:C,allowAlpha:r}),jsx(hn,{color:T||Do,setColor:C,storePickedColorKey:c,addColorButtonLabel:W,removeColorButtonLabel:Q,customColorsLabel:ce,pickerMode:b,allowAlpha:r})]}):null,!!G.length&&jsxs(Fragment,{children:[s&&b==="active"?jsx(O,{}):null,jsx(xn,{autoFocus:s&&b==="active"?!1:"first",state:I,triggerRef:k,presets:G,color:T,setColor:C})]}),s&&b==="lazy"?jsx(hn,{color:T||Do,setColor:C,storePickedColorKey:c,addColorButtonLabel:W,removeColorButtonLabel:Q,customColorsLabel:ce,pickerMode:b,allowAlpha:r}):null]})}):null]})});Ho.displayName="ColorInput";var Vr=$({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 zd=ro.forwardRef(({className:e,style:o,icon:t,variant:r="standard","data-block-id":a,tooltipProps:n,...i},s)=>{let p=ro.useRef(null),l=useCallback(({isOpen:c,color:m,ref:u,colorName:d,triggerProps:f})=>jsx(ke,{variant:"inverse",size:"sm",includeArrow:!1,text:i["aria-label"],placement:"bottom start",offset:4,...n,children:r==="standard"?jsx(Ct,{...f,"aria-label":i["aria-label"],ref:u,isOpen:c,isDisabled:i.isDisabled,color:m,colorLabel:!1,colorName:d}):jsx(Or,{...f,isOpen:c,icon:TextIcon,color:m?.toString("hexa"),ref:u,isDisabled:i.isDisabled,"aria-label":i["aria-label"]})}),[i,n,r]);return jsxs(B,{display:"flex",flexDirection:"row",gap:"md",paddingX:r==="standard"?"md":"none",alignItems:"center",className:classNames("BaselineUI-IconColorInput",e),"data-block-id":a,style:o,ref:M(s,p),children:[r==="standard"&&t?jsx(t,{size:24,className:sprinkles({color:"icon.primary"})}):null,jsx(Ho,{...i,colorLabel:!1,renderTriggerButton:l})]})});zd.displayName="IconColorInput";var hd={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 Ar=v({defaultClassName:"mnnh5s1 _1yep5z6hl _1yep5z6hm _1yep5z6hn _1yep5z6ki _1yep5z6kl _1yep5z6kx _1yep5z6kw _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6kv",variantClassNames:{isInline:{true:"mnnh5s2 _1yep5z6vw _1yep5z6vx _1yep5z6vy _1yep5z6wk _1yep5z6wl _1yep5z6wm _1yep5z6x8 _1yep5z6x9 _1yep5z6xa _1yep5z6xw _1yep5z6xx _1yep5z6xy _1yep5z6122 _1yep5z616j _1yep5z616k",false:"_1yep5z6166 _1yep5z6116"},isHovered:{true:"mnnh5s4"},hasLoadedImage:{true:"_1yep5z6115"},includeCheckeredBackground:{true:"mnnh5s6"},showFocusRing:{true:"_1yep5z6126 _1yep5z616c _1yep5z616a _1yep5z612n _1yep5z616d"},isDisabled:{true:"mnnh5s8 _1yep5z6yl"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,hasLoadedImage:!1},"_1yep5z61mo"],[{isHovered:!0,hasLoadedImage:!0},"mnnh5s9"],[{isInline:!0,isDisabled:!0},"_1yep5z61nd"],[{hasLoadedImage:!0,includeCheckeredBackground:!0},"_1yep5z61mg"]]}),xd="_1yep5z6d8",jr=v({defaultClassName:"mnnh5sa",variantClassNames:{isInline:{true:"mnnh5sb",false:"mnnh5sc"},isDisabled:{true:"mnnh5sd"},hasLoadedImage:{true:"mnnh5s0"}},defaultVariants:{},compoundVariants:[]});var Cd=v({defaultClassName:"_1i0ytqa3 _1yep5z6hl _1yep5z6hm _1yep5z6hn _1yep5z6kv _1yep5z6kw _1yep5z6ky",variantClassNames:{isFocusVisible:{true:"_1i0ytqa4"},isInline:{true:"_1yep5z611e",false:"_1yep5z611g"},isDisabled:{true:"_1i0ytqa7 _1yep5z6yl",false:"_1i0ytqa8"}},defaultVariants:{},compoundVariants:[[{isInline:!0,isFocusVisible:!0},"_1i0ytqa9 _1yep5z61n9 _1yep5z61rt _1yep5z61rv"],[{isInline:!1,isFocusVisible:!0},"_1i0ytqaa"],[{isInline:!0,isDisabled:!0},"_1yep5z61mp"],[{isInline:!1,isDisabled:!0},"_1yep5z61mr"]]}),Pd="_1i0ytqa0",$r=v({defaultClassName:"_1i0ytqab _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6kv",variantClassNames:{isInline:{false:"_1yep5z6115"},isDisabled:{true:"_1i0ytqad _1yep5z6yl"}},defaultVariants:{},compoundVariants:[]}),kd=v({defaultClassName:"_1i0ytqa1 _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6jr _1yep5z6js _1yep5z6jt _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6kv",variantClassNames:{isInline:{false:"_1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b"}},defaultVariants:{},compoundVariants:[]});function wd({line:e,options:o}){let t=useRef([]),r=useMemo(()=>{let a=Math.ceil(e.length/Oo),n;for(let i=0;i<a;i++)if(!(!(i===a-1)&&!!t.current[i])){let l=e.slice(i*Oo-(i>0?1:0),i*Oo+Oo);n=getSvgPathFromStroke(getStroke(l.map(([c,m,u])=>({x:c,y:m,pressure:u})),o)),l.length>=(i>0?Oo+1:Oo)&&(t.current[i]=n);}return n},[e,o]);return [...t.current,r]}var Oo=60*3;var ah={size:1,thinning:0,smoothing:0,streamline:0,easing:e=>e,start:{taper:0,easing:e=>e,cap:!0},end:{taper:0,easing:e=>e,cap:!0},simulatePressure:!1},Id=ro.forwardRef(({className:e,style:o,canvasClassName:t,canvasStyle:r,isBound:a=!0,strokeWidth:n=2,strokeColor:i="#3A87FD",onChange:s,defaultValue:p,onChangeEnd:l,enableHistory:c=!1,isInline:m=!0,isDisabled:u,placeholder:d,clearLabel:f,undoLabel:y,redoLabel:b,footerClassName:g,canvasRef:z,value:_,footerStyle:h,"data-block-id":P,"data-block-class":x,"aria-label":k="Drawing canvas",description:w="This is a canvas for drawing using a mouse or touch input.",...I},N)=>{let L=E(hd),S=ro.useRef(null),[T,C]=ro.useState(_||p||[]),R=ro.useMemo(()=>({...ah,...I}),[I]),[F,H]=ro.useState(),U=useId(),{labelProps:G,fieldProps:W}=useLabel({...I,"aria-label":k,labelElementType:"span"}),{isFocusVisible:Q,focusProps:ce}=useFocusRing({within:!0}),{hoverProps:V,isHovered:Y}=useHover({isDisabled:u}),{undo:ue,redo:Ie,canRedo:_e,canUndo:ze,push:he}=_s(T,{onAction:q=>{q&&(C(q),l?.(q));},isDisabled:!c}),{keyboardProps:Ee}=useKeyboard({onKeyDown:q=>{q.key==="Backspace"?jt():q.key==="z"&&(q.metaKey||q.ctrlKey)&&(q.shiftKey?_e&&Ie():ze&&ue());}}),[J,se]=useState(!1),Zo=useCallback(q=>{let j=q.currentTarget.getBoundingClientRect();H(j),q.target.setPointerCapture(q.pointerId);let ne=[q.clientX-j.x,q.clientY-j.y,q.pressure];C(K=>[...K,[ne]]),se(!0);},[]),Ze=useCallback(q=>{if(q.buttons!==1||!F)return;let ne=Sd(q.nativeEvent).map(K=>[a?clamp(K.clientX-F.left,0,F.width):K.clientX-F.left,a?clamp(K.clientY-F.top,0,F.height):K.clientY-F.top,K.pressure]);C(K=>{let ge=[...K];return ge[K.length-1]=[...ge[K.length-1],...ne],ge});},[F,a]),pa=()=>{F&&(l?.(T),he(T),se(!1));};useEffect(()=>{s?.(T);},[T,s]);let jt=()=>{C([]),s?.([]),he([]);};return jsxs("div",{ref:M(S,N),className:classNames(Pd,"BaselineUI-FreehandCanvas",e),style:o,"aria-disabled":u,"data-block-id":P,"data-block-class":x,children:[I.label||c?jsxs("div",{className:kd({isInline:m}),children:[I.label?jsx(Z,{type:"label",size:"sm",...G,children:I.label}):jsx("span",{}),c?jsxs("div",{children:[jsx(D,{variant:"secondary",size:"sm",isDisabled:!ze||u,icon:UndoIcon,onPress:ue,"aria-label":y||L.formatMessage("undo")}),jsx(D,{variant:"secondary",size:"sm",isDisabled:!_e||u,icon:RedoIcon,onPress:Ie,"aria-label":b||L.formatMessage("redo")})]}):null]}):null,jsxs("div",{role:"application",...mergeProps(ce,Ee,V,W),tabIndex:u?void 0:0,className:classNames(Ar({isInline:m,isHovered:Y}),Cd({isFocusVisible:Q,isInline:m,isDisabled:!!u}),t),"aria-describedby":I["aria-describedby"]||U,style:r,ref:z,children:[jsx(VisuallyHidden,{children:jsx("div",{id:U,children:w})}),jsx("svg",{width:r?.width||"100%",height:r?.height||"100%",onPointerDown:Zo,onPointerMove:Ze,onPointerUp:pa,children:(_||T).map((q,j,ne)=>j<ne.length-1||!J?jsx(Td,{line:q,options:R,strokeColor:i,strokeWidth:n},j):jsx(Nd,{line:q,options:R,strokeColor:i,strokeWidth:n},j))})]}),d||f?jsx("div",{style:h,className:classNames($r({isInline:m,isDisabled:u}),g),children:(T.length||!d)&&f?jsx(A,{size:"sm",variant:"ghost",label:f,isDisabled:u,onPress:jt}):jsx(A,{size:"sm",variant:"ghost",label:d,isDisabled:!0})}):null]})});Id.displayName="FreehandCanvas";var Td=ro.memo(({line:e,options:o,strokeColor:t,strokeWidth:r})=>{let a=useMemo(()=>getSvgPathFromStroke(getStroke(e.map(([n,i,s])=>({x:n,y:i,pressure:s})),o)),[e,o]);return jsx("path",{d:a,stroke:t,strokeWidth:r})});Td.displayName="Stroke";var Nd=ro.memo(({line:e,options:o,strokeColor:t,strokeWidth:r})=>{let a=wd({line:e,options:o});return jsx(Fragment,{children:a.map((n,i)=>jsx("path",{d:n,stroke:t,strokeWidth:r},i))})});Nd.displayName="SplitStroke";function Sd(e){if(typeof e.getCoalescedEvents=="function"){let o=e.getCoalescedEvents();return o.length>0?o.flatMap(t=>Sd(t)):[e]}return [e]}var Ld="_1vac7ws0",Md=v({defaultClassName:"_1vac7ws1",variantClassNames:{isDragging:{true:"_1vac7ws2"}},defaultVariants:{},compoundVariants:[]});function Dd(e,o){let[t,r]=useState([]),a=()=>e?.flatMap(n=>[...o.querySelectorAll(n)]).map(n=>({current:n}));return useGranularEffect(()=>{r(a());},[],[a]),useGranularEffect(()=>{let n=a();r(n);},[e],[a]),t}function Ed(e){let{scrollable:o,ownerDocument:t,onScroll:r}=e;useEffect(()=>{let a=getHTMLElement(o,t);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);}},[o,r,t]);}var hh=makeMoveable([Draggable,Resizable,Rotatable,Snappable]),Hd=ro.forwardRef(({className:e,children:o,isRotatable:t,isResizable:r,isDraggable:a,style:n,onTransform:i,onTransformStart:s,onTransformEnd:p,onDoubleClick:l,onDragStart:c,onDragEnd:m,onDrag:u,onResizeStart:d,onResizeEnd:f,onResize:y,onRotateStart:b,onRotateEnd:g,onRotate:z,onSnap:_,isSnappable:h,elementGuidelines:P,hideAnchorOnDrag:x=!0,title:k,rotationPosition:w,autoUpdate:I,bound:N,snapRotationDegrees:L,snapRotationThreshold:S,scrollableAncestor:T,renderDirections:C,stopPropagation:R,transformOrigin:F,preventDefault:H},U)=>{let G=useRef(null),W=useRef(null),[Q,ce]=useState(document),V=useRef(Q.createElement("div")),[Y,ue]=useState({}),[Ie,_e]=useState(!1),[ze,he]=useState(!1),[Ee,J]=useState(),se=Dd(P,Q);useLayoutEffect(()=>{let j=V.current;return V.current=Q.createElement("div"),()=>{j.remove();}},[Q]);let{keyboardProps:Zo}=useKeyboard({onKeyDown:j=>{let ne=j.shiftKey?10:1,K=j.metaKey||j.ctrlKey;K&&j.shiftKey&&(ne=45);function ge(Qo,Cf="x"){K?W.current?.request("rotatable",{deltaRotate:Qo*ne},!0):W.current?.request("draggable",Cf==="x"?{deltaX:Qo*ne}:{deltaY:Qo*ne},!0);}switch(j.key){case"ArrowRight":{ge(1);break}case"ArrowLeft":{ge(-1);break}case"ArrowUp":{ge(-1,"y");break}case"ArrowDown":ge(1,"y");}requestAnimationFrame(()=>{W.current?.updateRect();});}});useEffect(()=>{let j=ve(G.current);ce(j);let ne=V.current;j.body.append(V.current);function K(Qo){he(Qo.shiftKey);}function ge(){he(!1);}return j.addEventListener("keydown",K),j.addEventListener("keyup",ge),()=>{j.removeEventListener("keydown",K),j.removeEventListener("keyup",ge),ne.remove();}},[]),Ed({scrollable:T,onScroll:()=>{W.current?.updateRect();},ownerDocument:Q});let Ze=useCallback(j=>{ue(ne=>({...ne,...j.style})),i?.(j);},[i]),pa=useCallback(j=>{if(_e(!0),G.current?.focus(),N){let K=getHTMLElement(N,Q)?.getBoundingClientRect();J({position:"client",left:K?.left??0,top:K?.top??0,right:K?.right??0,bottom:K?.bottom??0});}c?.(j);},[N,Q,c]),jt=useCallback(j=>{_e(!1),m?.(j);},[m]),q=o({style:{...Y.width&&{width:Y.width},...Y.height&&{height:Y.height}}});return jsxs(Fragment,{children:[jsx("div",{role:"button",...Zo,ref:M(G,U),style:{display:"inline-block",...n,...Y},className:classNames(Ld,e),onDoubleClick:l,tabIndex:0,title:k,children:q}),createPortal(jsx(hh,{ref:W,target:G,draggable:a,resizable:r,rotatable:t,keepRatio:ze,throttleDrag:1,snappable:h||!!N,elementGuidelines:se,snapRenderThreshold:.9,className:Md({isDragging:Ie&&x}),onRender:Ze,onDragStart:pa,onDragEnd:jt,useResizeObserver:I,useMutationObserver:I,onRenderEnd:p,onDrag:u,onResizeStart:d,onResizeEnd:f,onResize:y,onRotateStart:b,onRotateEnd:g,onRotate:z,onRenderStart:s,onSnap:_,rotationPosition:w,bounds:Ee,snapRotationDegrees:L,snapRotationThreshold:S,renderDirections:C,stopPropagation:R,preventDefault:H,transformOrigin:F}),V.current)]})});Hd.displayName="Transform";var Od={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 jd=ro.forwardRef(({className:e,style:o,isInline:t=!0,accept:r="image/*",defaultImageSrc:a,imageSrc:n,imageAlt:i,pickerButtonLabel:s,isDisabled:p,onDrop:l,onPaste:c,includeCheckeredBackground:m=!0,"data-block-id":u,"data-block-class":d,pickerButtonStyle:f,pickerButtonClassName:y,footerClassName:b,footerStyle:g,clearLabel:z,placeholder:_,labelStyle:h,labelClassName:P,...x},k)=>{let w=ro.useRef(null),I=ro.useRef(null),{formatMessage:N}=E(Od),[L,S]=useControlledState(n,a||null,J=>{invariant(typeof J!="string"),x.onValueChange?.(J?[J]:[]);}),T=useMemo(()=>Dh(L||void 0),[L]),{fieldProps:C,labelProps:R}=useField(x),{dropProps:F,isDropTarget:H}=useDrop({ref:w,onDrop:async J=>{if(p)return;let se=await Ka({items:J.items});se.length&&S(se[0]),l?.(J);},...x}),{clipboardProps:U}=useClipboard({onPaste:async J=>{if(p)return;let se=await Ka({items:J});se.length&&S(se[0]),c?.(J);},...x}),G=()=>{S(null),I.current&&(I.current.value="");},W={type:"file",onChange:J=>{let se=[...J.target.files];S(se[0]),x.onChange?.(J);},accept:r,disabled:p},{focusProps:Q,isFocused:ce,isFocusVisible:V}=useFocusRing({within:!0}),{hoverProps:Y,isHovered:ue}=useHover({isDisabled:p}),{imgProps:Ie,isLoading:_e,isLoaded:ze}=vo({src:T,alt:i||""}),he={label:s||N("selectImage"),onPress:()=>w.current?.click(),variant:"secondary",isDisabled:p,excludeFromTabOrder:!0,className:classNames(Zt({isFocusVisible:V}),{[xd]:H&&!p},y),style:f},Ee=filterTruthyValues({"data-loaded":ze,"data-block-id":u,"data-block-class":d,"data-hovered":ue,"data-focused":ce,"data-drop-target":H,"data-disabled":p,"data-focus-visible":V});return jsxs(B,{...Ee,className:classNames("BaselineUI-ImageDropZone",e),display:"flex",flexDirection:"column",alignItems:"center",style:o,ref:k,children:[jsxs("label",{...mergeProps(F,Y,Q,R),className:classNames(Ar({isInline:t,isHovered:ue,isDisabled:p,hasLoadedImage:!!T&&ze,showFocusRing:H||!!T&&V}),P),style:h,ref:w,children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(C,U,W),ref:I})}),!T&&jsx(A,{...he}),!!T&&(_e?jsx(So,{}):jsx("img",{className:jr({isInline:t,isDisabled:p,hasLoadedImage:!!T&&ze&&m}),...Ie}))]}),_||z?jsx("div",{style:g,className:classNames($r({isInline:t,isDisabled:p}),b),children:(T||!_)&&z?jsx(A,{size:"sm",variant:"ghost",label:z,isDisabled:p,onPress:G}):jsx(A,{size:"sm",variant:"ghost",label:_,isDisabled:!0})}):null]})});jd.displayName="ImageDropZone";function Dh(e){return e instanceof File?URL.createObjectURL(e):e}var $d="_1vm2oh49 _1yep5z6ho _1yep5z6hp _1yep5z6hq _1yep5z6fv",Nn="_1vm2oh48 _1yep5z6kw _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6jc _1yep5z6jd _1yep5z6je",Ud=v({defaultClassName:"_1vm2oh40 mnnh5s1 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6l1 _1yep5z6kz _1yep5z6hk _1yep5z6l2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6ki _1yep5z6kx _1yep5z6hl _1yep5z6hm _1yep5z6hn",variantClassNames:{accent:{theme:"_1vm2oh41",positive:"_1vm2oh42"},isInline:{true:"mnnh5s2 _1yep5z6vt _1yep5z6vu _1yep5z6vv _1yep5z6wh _1yep5z6wi _1yep5z6wj _1yep5z6x5 _1yep5z6x6 _1yep5z6x7 _1yep5z6xt _1yep5z6xu _1yep5z6xv _1yep5z6121 _1yep5z616i _1yep5z616k",false:"_1yep5z611g"},isFocusVisible:{true:"_1yep5z6126 _1yep5z616c _1yep5z616a _1yep5z612n _1yep5z616d"},isDisabled:{true:"mnnh5s8 z9nup83 _1yep5z6yl"},isHovered:{true:"_1vm2oh47"}},defaultVariants:{},compoundVariants:[[{accent:"positive",isInline:!0},"_1yep5z61mp"],[{accent:"theme",isInline:!0},"_1yep5z61me"],[{accent:"positive",isInline:!1},"_1yep5z61mr"],[{accent:"theme",isInline:!1},"_1yep5z61mg"],[{isFocusVisible:!0,isInline:!0},"_1yep5z61ny _1yep5z61rl _1yep5z61rn _1yep5z61ro"],[{isHovered:!0,isInline:!0},"_1yep5z61ro _1yep5z61ny _1yep5z61rl _1yep5z61rn"],[{isHovered:!0,isInline:!1,accent:"positive"},"_1yep5z61mq"],[{isHovered:!0,isInline:!1,accent:"theme"},"_1yep5z61mi"],[{isHovered:!0,isInline:!0,accent:"theme"},"_1yep5z61mf"]]});var Gd=ro.forwardRef(({className:e,style:o,isDisabled:t,isInline:r=!0,imageAlt:a,imageSrc:n,svgSrc:i,textValue:s,textStyle:p,onPress:l,onDelete:c,deleteAriaLabel:m,addAriaLabel:u,accent:d="positive","data-block-id":f,"data-block-class":y,...b},g)=>{let{focusProps:z,isFocused:_,isFocusVisible:h}=useFocusRing({within:!0}),{isHovered:P,hoverProps:x}=useHover({isDisabled:t}),{pressProps:k}=usePress({isDisabled:t,onPress:l});invariant(n||i||s,"Preview must have content. You must provide either an `imageSrc`, `svgSrc`, or `textValue` prop.");let w=filterTruthyValues({"data-hovered":P,"data-focus-visible":h,"data-focused":_,"data-disabled":t});return jsxs("div",{...b,className:classNames(Ud({isInline:r,isFocusVisible:h,isDisabled:t,isHovered:P,accent:d}),"BaselineUI-Preview",e),"data-block-id":f,"data-block-class":y,"aria-label":b["aria-label"]||a||s,style:o,ref:g,children:[typeof i=="string"?jsx("button",{disabled:t,...mergeProps(x,z,k,w),className:Nn,"aria-label":u,dangerouslySetInnerHTML:{__html:i}}):jsxs("button",{...mergeProps(x,z,k,w),disabled:t,style:p,"aria-label":u,className:Nn,children:[n?jsx("img",{src:n,alt:a,className:jr({isInline:r,isDisabled:t})}):null,!!i&&typeof i=="object"&&i,s]}),c?jsx(D,{isDisabled:t,className:$d,"aria-label":m,size:"xs",icon:TrashIcon,onPress:c}):null]})});Gd.displayName="Preview";var Wd="_1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ic _1yep5z6id _1yep5z6ie _1yep5z69c _1yep5z69d _1yep5z69e",Xd=v({defaultClassName:"cw3m0n8 _1yep5z6ew _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z6109"}},defaultVariants:{},compoundVariants:[]}),Yd="cw3m0n7",Zd=v({defaultClassName:"cw3m0n0 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6i9 _1yep5z6ia _1yep5z6ib",variantClassNames:{labelPosition:{end:"_1yep5z613k _1yep5z613l _1yep5z613m _1yep5z6ut _1yep5z6uu _1yep5z6uv",start:"_1yep5z613q _1yep5z613r _1yep5z613s _1yep5z6152 _1yep5z6153 _1yep5z6154"}},defaultVariants:{},compoundVariants:[]}),Qd="_1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ic _1yep5z6id _1yep5z6ie _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6ks",Jd=v({defaultClassName:"cw3m0n3 _16vugd05",variantClassNames:{isFocusVisible:{true:"_16vugd08"},isSelected:{true:"_16vugd07"},isDisabled:{true:"_16vugd0a"}},defaultVariants:{},compoundVariants:[]});var Qh=({label:e,description:o},{isSelected:t,isFocusVisible:r,isDisabled:a,optionLabelPosition:n})=>jsxs("div",{className:Zd({labelPosition:n}),children:[jsx("div",{className:Jd({isSelected:t,isFocusVisible:r,isDisabled:a}),children:t?jsx("div",{className:Yd}):null}),e?jsxs("div",{className:Wd,children:[jsx("span",{className:hr({isDisabled:a}),children:e}),o?jsx("span",{className:Xd({isDisabled:a}),children:o}):null]}):null]}),em=({state:e,renderOption:o=Qh,item:t,optionLabelPosition:r="end",optionStyle:a,optionClassName:n,isReadOnly:i,...s})=>{let p=!!s.isDisabled||!!s.disabledValues?.includes(t.id),l=ro.useRef(null),{inputProps:c,isPressed:m,isSelected:u}=useRadio({...s,isDisabled:p,children:t.label,value:t.id},e,l),{focusProps:d,isFocusVisible:f,isFocused:y}=useFocusRing(),{isHovered:b}=useHover({isDisabled:p}),g=filterTruthyValues({"data-selected":u,"data-focused":y,"data-focus-visible":f,"data-hovered":b,"data-disabled":p,"data-pressed":m,"data-read-only":i});return jsxs("label",{...g,style:a,className:classNames("BaselineUI-Radio-Item",n),children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(c,d),ref:l})}),o(t,{isFocusVisible:f,isSelected:u,isFocused:y,isHovered:b,isDisabled:p,optionLabelPosition:r,isReadOnly:i})]})};var om=ro.forwardRef(({className:e,style:o,optionsContainerClassName:t,optionsContainerStyle:r,items:a,labelPosition:n="top",renderOption:i,"aria-label":s,"aria-labelledby":p,"aria-describedby":l,"aria-details":c,"data-block-id":m,"data-block-class":u,...d},f)=>{let y=useRadioGroupState(d),{radioGroupProps:b,labelProps:g,descriptionProps:z,errorMessageProps:_}=useRadioGroup({...d,"aria-label":s,"aria-labelledby":p,"aria-describedby":l,"aria-details":c},y),h=xe({...d,descriptionProps:z,errorMessageProps:_,labelPosition:n}),P=filterTruthyValues({"data-orientation":d.orientation,"data-block-id":m,"data-block-class":u,"data-disabled":d.isDisabled,"data-readonly":d.isReadOnly});return jsxs("div",{...mergeProps(b,P),className:classNames(Oe({labelPosition:n}),"BaselineUI-RadioGroup",e),style:o,ref:f,children:[d.label||h?jsxs("div",{className:He({labelPosition:n,hasMessage:!!h}),children:[jsx("span",{...g,className:classNames(Fe,"BaselineUI-RadioGroup-Label"),children:d.label}),n==="start"&&h]}):null,jsxs("div",{className:classNames({[mo]:d.isDisabled}),children:[jsx("div",{className:classNames(Qd,t),style:r,children:a.map(x=>jsx(em,{state:y,renderOption:i,item:x,...d,value:x.id},x.id))}),n==="top"&&h]})]})});om.displayName="RadioGroup";var tm=({id:e,defaultMessage:o,elementType:t=Fragment$1})=>{invariant(e||o,"`id` or `defaultMessage` is required.");let r=E();return jsx(t,{children:r.formatMessage(e)||o})};tm.displayName="MessageFormat";var rm=ro.forwardRef(({className:e,style:o,children:t,"data-block-id":r,"data-block-class":a,role:n="group",isDisabled:i,...s},p)=>{let{hoverProps:l,isHovered:c}=useHover({isDisabled:i});return jsx("div",{...l,role:n,"data-hovered":c,"data-disabled":i,"data-block-id":r,"data-block-class":a,className:e,style:o,...s,ref:p,children:t})});rm.displayName="Group";var Dn="UNSUPPORTED_IN_MENU";function im(e){return useMemo(()=>ro.Children.toArray(e).map(o=>{let t=o,r=uniqueId("item"),a=It(t,Ne),n=nm(t),i,s;if(a){let g=It(a,Se);invariant(g),i=nm(g),s=It(a,Pe).props.children;}else n?i=n:i=t;let{onPress:p,label:l,"aria-label":c,iconStart:m,isDisabled:u,icon:d}=i.props,f=l||c||Dn;invariant(typeof f=="string","ActionGroup children must have a string label");let y=`${r}-${f}`;return createElement(Item,{...{key:y,onPress:p,textValue:f,"aria-label":c,icon:m||d,dialogContent:s,isDisabled:u},key:y},t)}),[e])}function It(e,o){return o?flatMapDeep(ro.Children.toArray(e),r=>ro.isValidElement(r)&&r.props.children?[r,...ro.Children.toArray(r.props.children)]:[r]).find(r=>ro.isValidElement(r)&&r.type===o):void 0}function nm(e){return It(e,A)||It(e,D)}var sm="_1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6hl _1yep5z6hm _1yep5z6hn _1yep5z6kv _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6kn",lm={horizontal:"xvr3wn0",vertical:"xvr3wn1"};var Fn=ro.forwardRef(({className:e,style:o,children:t,collapsibleMenuProps:r,"data-block-id":a,"data-block-class":n,renderSpacer:i,onKeyDown:s,...p},l)=>{let{formatMessage:c}=E(),[m,u]=useState(),d=im(t),f=useListState({...p,children:d}),y=de(l),b=useRef(null),[{visibleItems:g,isMeasuring:z},_]=da({visibleItems:f.collection.size,isMeasuring:!1}),h=useCallback(()=>{let S=T=>{if(b.current&&y.current){let C=[...b.current.children],R=y.current.getBoundingClientRect().width,F=T<f.collection.size,H=0,U=0;if(F){let G=C.pop();G&&(H+=mm(G,!1,!0));}for(let[G,W]of C.entries())if(H+=mm(W,G===0,G===C.length-1),Math.round(H)<=Math.round(R))U++;else break;return U}return T};_(function*(){yield {visibleItems:f.collection.size,isMeasuring:!0};let T=S(f.collection.size),C=T<f.collection.size&&T>0;yield {visibleItems:T,isMeasuring:C},C&&(yield {visibleItems:S(T),isMeasuring:!1});});},[_,y,f.collection.size]),P=useMemo(()=>({get current(){return y.current?.parentElement}}),[y]);ba({ref:P,onResize:h}),Te(h,[f.collection,h]);let{toolbarProps:x}=useToolbar(p,y),k=[...f.collection],w=k.slice(0,g),I=k.slice(g).filter(S=>S.textValue!==Dn),N=I.length>0;useEffect(()=>{u(void 0);},[I.length]),useEffect(()=>{p.orientation==="vertical"&&console.warn("Toolbar: Vertical orientation is not supported when `isCollapsible` is true.");},[p.orientation]);let{keyboardProps:L}=useKeyboard({onKeyDown:s});return jsxs(FocusScope,{children:[jsx("div",{...mergeProps(x,L),className:e,"data-block-id":a,"data-block-class":n,"data-collapse":!0,style:{...o,flexBasis:z?"100%":void 0},ref:y,children:jsxs("div",{ref:b,className:sm,children:[w.map(S=>S.rendered),N?jsxs(Fragment,{children:[!z&&i?jsx(B,{flexGrow:1}):null,jsx(yr,{placement:"bottom end",renderTrigger:({buttonProps:S,ref:T})=>jsx(D,{...S,size:"md",icon:MoreIcon,"aria-label":c(kx.more),variant:"toolbar",ref:T}),...r,disabledKeys:I.filter(S=>S.props?.isDisabled).map(S=>S.key),items:I.map(S=>{let T=S.textValue||S["aria-label"];return invariant(T,"ActionItem must have a label"),{id:S.key,label:T,icon:S.props.icon}}),onAction:S=>{let T=f.collection.getItem(S);invariant(T,"Item not found");let{onPress:C,dialogContent:R}=T.props;C?.(),u(R);}})]}):null]})}),jsx(Ce,{isOpen:!!m,onOpenChange:S=>{S||u(void 0);},children:jsx(Me,{enableDrawer:"auto",style:{zIndex:1e5},children:m?ro.cloneElement(m,{inheritDrawer:!0}):null})})]})});Fn.displayName="CollapsibleToolbar";function mm(e,o,t){let a=ee(e).getComputedStyle(e);return e.getBoundingClientRect().width+(o?0:um(a.marginLeft))+(t?0:um(a.marginRight))}function um(e){let o=Number.parseInt(e,10);return Number.isNaN(o)?0:o}var kx=$({more:{id:"more",defaultMessage:"More"}});var Hn=ro.forwardRef(({className:e,style:o,"data-block-id":t,"data-block-class":r,"aria-controls":a,onKeyDown:n,...i},s)=>{let p=ro.useRef(null),{toolbarProps:l}=useToolbar(i,p),{keyboardProps:c}=useKeyboard({onKeyDown:n});return jsx("div",{...mergeProps(l,c),"aria-controls":a,className:classNames(lm[i.orientation||"horizontal"],"BaselineUI-Toolbar",e),style:o,"data-block-id":t,"data-block-class":r,ref:M(s,p),children:i.children})});Hn.displayName="WrappedToolbar";var Gr=ro.forwardRef((e,o)=>{let t=e.isCollapsible?Fn:Hn;return jsx(t,{...e,ref:o})});Gr.displayName="Toolbar";var ym=v({defaultClassName:"_1j5skr71",variantClassNames:{size:{xxs:"_1j5skr72",xs:"_1j5skr73",sm:"_1j5skr74",md:"_1j5skr75",lg:"_1j5skr76"}},defaultVariants:{},compoundVariants:[]}),bm=v({defaultClassName:"_1j5skr70 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6kx _1yep5z6ky _1yep5z6ks _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6fs _1yep5z6f0",variantClassNames:{isHovered:{true:"_1j5skr7g"},isFocusVisible:{true:"_1j5skr7h"},isDisabled:{true:"z9nup83 _1yep5z610d"},isSelected:{true:"_1j5skr7j"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!0},"_1yep5z61ro _1yep5z61rn _1yep5z61rl _1yep5z61o5 _1yep5z61lo"],[{isSelected:!1,isHovered:!0,isDisabled:!1},"_1yep5z6fu"],[{isSelected:!1,isFocusVisible:!0,isDisabled:!1},"_1yep5z61ro _1yep5z61rn _1yep5z61ny _1yep5z61rl"],[{isSelected:!0,isFocusVisible:!0,isDisabled:!1},"_1j5skr7k _1yep5z61rm _1yep5z61rl _1yep5z61nz _1yep5z61lp"],[{isSelected:!0,isFocusVisible:!1,isDisabled:!1},"_1yep5z61rl _1yep5z61rn _1yep5z61ny _1yep5z61ro"]]}),gm=v({defaultClassName:"_1j5skr70 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6kx _1yep5z6ky _1yep5z6ks _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f0",variantClassNames:{isHovered:{true:"_1j5skr7m"},isFocusVisible:{true:"_1yep5z616d _1yep5z616c _1yep5z612n _1yep5z616a"},isSelected:{true:"_1yep5z610c"},isDisabled:{true:"z9nup83 _1yep5z610d"}},defaultVariants:{},compoundVariants:[[{isSelected:!1,isHovered:!0},"_1yep5z61ln"]]}),vm=v({defaultClassName:"_1j5skr70 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6kx _1yep5z6ky _1yep5z6ks _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f0",variantClassNames:{isHovered:{true:"_1j5skr7r"},isFocusVisible:{true:"_1yep5z616d _1yep5z616c _1yep5z612n _1yep5z616a"},isSelected:{true:"_1j5skr7t"},isDisabled:{true:"z9nup83 _1yep5z610d"}},defaultVariants:{},compoundVariants:[[{isSelected:!1,isHovered:!0},"_1yep5z61mg"],[{isSelected:!0,isDisabled:!1},"_1yep5z61mg _1yep5z61lq"],[{isSelected:!0,isDisabled:!0},"_1yep5z61mg _1yep5z61lo"]]}),_m=v({defaultClassName:"_1j5skr77 _1j5skr70 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6kx _1yep5z6ky _1yep5z6ks _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6f0",variantClassNames:{isHovered:{true:"_1j5skr78"},isFocusVisible:{true:"_1j5skr79"},isSelected:{true:"_1j5skr7a"},isDisabled:{true:"_1j5skr7b z9nup83 _1yep5z610e"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!1},"_1j5skr7c _1yep5z61lp"],[{isSelected:!1,isDisabled:!0},"_1j5skr7d _1yep5z61lo"],[{isSelected:!1,isHovered:!0},"_1yep5z61mg"],[{isSelected:!1,isFocusVisible:!0},"_1yep5z61ro _1yep5z61rn _1yep5z61ny _1yep5z61rl"],[{isSelected:!0,isFocusVisible:!0},"_1j5skr7e _1yep5z61rm _1yep5z61rl _1yep5z61nz"]]});var jx={xxs:8,xs:12,sm:16,md:20,lg:24},Re=ro.forwardRef(({className:e,style:o,icon:t,size:r="md",variant:a="primary","data-block-id":n,"data-block-class":i,...s},p)=>{let l=useToggleState(s),{buttonProps:c,isPressed:m,ref:u}=Yt(s,l),{hoverProps:d,isHovered:f}=useHover({isDisabled:s.isDisabled}),{isFocusVisible:y,isFocused:b,focusProps:g}=useFocusRing(),z=useMemo(()=>typeof t=="function"?t:l.isSelected?t.selected:t.unselected,[t,l.isSelected]),_={isSelected:l.isSelected,isHovered:f,isFocusVisible:y,isDisabled:!!s.isDisabled},h=filterTruthyValues({"data-hovered":f,"data-selected":l.isSelected,"data-focus-visible":y,"data-disabled":s.isDisabled,"data-block-id":n,"data-block-class":i,"data-focused":b,"data-pressed":m});return jsx("button",{...mergeProps(c,d,g,h),className:classNames(a==="toolbar"&&_m(_),a==="primary"&&bm(_),a==="secondary"&&gm(_),a==="tertiary"&&vm(_),ym({size:r}),"BaselineUI-ToggleIconButton",e),style:o,ref:M(u,p),children:jsx(z,{size:jx[r]})})});Re.displayName="ToggleIconButton";var hm="f6jv6bm",xm="_1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z6j0 _1yep5z6j1 _1yep5z6j2",jo="_1yep5z689 _1yep5z68a _1yep5z68b _1yep5z65x _1yep5z65y _1yep5z65z",Cm=v({defaultClassName:"f6jv6b0 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6fs",variantClassNames:{isInline:{true:"f6jv6b1"},isMinimal:{true:"_1yep5z613k _1yep5z613l _1yep5z613m _1yep5z6uw _1yep5z6ux _1yep5z6uy _1yep5z6142 _1yep5z6143 _1yep5z6144",false:"_1yep5z613n _1yep5z613o _1yep5z613p"}},defaultVariants:{},compoundVariants:[[{isInline:!0,isMinimal:!1},"_1yep5z61h7 _1yep5z61h8 _1yep5z61h9 _1yep5z61hv _1yep5z61hw _1yep5z61hx _1yep5z61ij _1yep5z61ik _1yep5z61il _1yep5z61j7 _1yep5z61j8 _1yep5z61j9 _1yep5z61rv _1yep5z61rt _1yep5z61nc"]]}),Wr=v({defaultClassName:"f6jv6b4 _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6e3 _1yep5z6eu _1yep5z6ky",variantClassNames:{isDisabled:{true:"f6jv6b5 _1yep5z6109"}},defaultVariants:{},compoundVariants:[]}),Pm="f6jv6bj _1yep5z6vz _1yep5z6w0 _1yep5z6w1 _1yep5z6wn _1yep5z6wo _1yep5z6wp _1yep5z6xb _1yep5z6xc _1yep5z6xd _1yep5z6xz _1yep5z6y0 _1yep5z6y1",km="f6jv6bk";var wm="f6jv6bn _1yep5z63l _1yep5z63m _1yep5z63n _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6l6 _1yep5z6l1 _1yep5z6kz _1yep5z6hc _1yep5z6eu",Rm=v({defaultClassName:"f6jv6bf _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6ky _1yep5z6ki _1yep5z6kl _1yep5z6kx",variantClassNames:{isHovered:{true:"_1yep5z6115"},isDisabled:{true:"_1yep5z6yl"}},defaultVariants:{},compoundVariants:[]}),Im="f6jv6bi _1mdhlqv6 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7 _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6fs _1yep5z6l0 _1yep5z6kz _1yep5z6hf _1yep5z6l3",Tm="_1yep5z6j6 _1yep5z6j7 _1yep5z6j8",Nm="f6jv6be f6jv6ba _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6hx _1yep5z6hy _1yep5z6hz _1yep5z6eu _1yep5z6e3 _1yep5z6kv",Sm=v({defaultClassName:"f6jv6bb _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6jc _1yep5z6jd _1yep5z6je",variantClassNames:{isInline:{true:"_1yep5z6oz _1yep5z6p0 _1yep5z6p1 _1yep5z616k _1yep5z616i _1yep5z6121",false:"_1yep5z6p2 _1yep5z6p3 _1yep5z6p4 _1yep5z6we _1yep5z6wf _1yep5z6wg _1yep5z6x2 _1yep5z6x3 _1yep5z6x4 _1yep5z6xq _1yep5z6xr _1yep5z6xs _1yep5z6ye _1yep5z6yf _1yep5z6yg"}},defaultVariants:{},compoundVariants:[]}),Lm="f6jv6bl",Mm="f6jv6ba _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6hx _1yep5z6hy _1yep5z6hz _1yep5z6eu",Xr=v({defaultClassName:"f6jv6b6",variantClassNames:{isInline:{true:"f6jv6b7",false:"f6jv6b8"}},defaultVariants:{},compoundVariants:[]}),Yr="f6jv6b9 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it",Tt="f6jv6bo";var Dm=[["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:Nt}}=layoutSprinkleValues,Em=({isOpen:e,onClose:o})=>{let{formatMessage:t}=E(),r=useId();return jsx(Ce,{isOpen:e,onOpenChange:a=>{a||o();},children:jsx(Me,{enableDrawer:"auto",style:{zIndex:999999},children:jsxs(le,{"aria-labelledby":r,className:Pm,drawerBackground:"subtle",children:[jsxs(B,{paddingLeft:Nt.padding.horizontal.lg,paddingRight:Nt.padding.horizontal.sm,display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",backgroundColor:"background.primary.subtle",className:km,children:[jsx(Z,{id:r,elementType:"h3",type:"title",size:"md",children:t(St.help)}),jsx(D,{icon:XIcon,size:"md",variant:"secondary","aria-label":t(St.close),onPress:o})]}),jsx(O,{className:Lm}),jsxs(B,{paddingX:Nt.padding.horizontal.lg,role:"table","aria-labelledby":r,backgroundColor:"background.primary.subtle",children:[jsx("div",{role:"rowgroup",children:jsxs(B,{role:"row",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingY:Nt.padding.vertical.md,color:"text.primary",children:[jsx("h6",{className:sprinkles({typography:"heading.h6.semibold"}),role:"columnheader",children:t(St.action)}),jsx("h6",{className:sprinkles({typography:"heading.h6.semibold"}),role:"columnheader",style:{textTransform:"capitalize"},children:t(St.shortcut)})]})}),jsx("div",{role:"rowgroup",children:Dm.map(([a,n],i)=>jsxs(Fragment$1,{children:[jsxs(B,{role:"row",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingY:Nt.padding.vertical.xs,style:{minHeight:40},children:[jsx(Z,{type:"subtitle",size:"sm",role:"cell",children:t(St[camelCase(a)])}),jsx(Z,{elementType:"kbd",type:"subtitle",size:"sm",role:"cell",children:getOsSpecificKeyboardShortcutLabel(n,!0)})]}),i!==Dm.length-1&&jsx(O,{})]},a))})]})]})})})},St=$({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 Zr=ro.forwardRef(({value:e,defaultValue:o,onChange:t,placeholder:r,spellCheck:a,textBoxRef:n,isInline:i,isMinimal:s,isDisabled:p,editableContentAriaLabel:l,editorHandle:c,autoFocus:m,saveOnEnter:u,onSave:d},f)=>{let y=ro.useRef(null),[b,g]=useControlledState(e,o||"",t),z=useCallback(L=>{g(L.currentTarget.value||"");},[g]),_=useCallback(L=>{(u&&L.key==="Enter"&&!L.shiftKey||(L.ctrlKey||L.metaKey)&&L.key==="Enter")&&(L.preventDefault(),d());},[u,d]);useImperativeHandle(f,()=>({clear:()=>{g("");}}));let h=useCallback(L=>{L.currentTarget.style.height="16px",L.currentTarget.style.height=L.currentTarget.scrollHeight+"px";},[]);useGranularLayoutEffect(()=>{let L=y.current;L&&(L.style.height="16px",L.style.height=L.scrollHeight+"px");},[s],[b]),useImperativeHandle(c,()=>({setCaretPosition:L=>{y.current&&(y.current.focus(),y.current.setSelectionRange(L,L));},focus:()=>{y.current&&y.current.focus();}}));let{focusProps:P,isFocused:x,isFocusVisible:k}=useFocusRing(),{hoverProps:w,isHovered:I}=useHover({}),N=filterTruthyValues({"data-focus-visible":k,"data-hovered":I,"data-focused":x});return jsx("textarea",{...mergeProps(P,w,N),ref:M(y,n),className:classNames(s?Nm:[Wr(),Xr({isInline:i}),Mm]),autoFocus:m,onChange:z,disabled:p,onInput:h,value:b,placeholder:r,spellCheck:a,"aria-label":l,onKeyDown:_})});Zr.displayName="PlainEditor";var Bt="mention",Qr="mention_input",Wm=ro.forwardRef(({onCancel:e,editor:o,element:t,onSelectionChange:r},a)=>{let{containerRef:n,items:i,maxMentionableUsersSuggestions:s}=useContext(ea),p=useSelected(),[l,c]=useState(""),{contains:m}=useFilter({sensitivity:"base"}),{formatMessage:u}=E(),d=useMemo(()=>{let C=i.filter(R=>l===""||m(R.displayName,l)).map(R=>({id:R.id,label:R.displayName,data:R}));return s?take(C,s):C},[i,s,l,m]),f=useCallback(C=>jsx(Item,{children:C.label},C.id),[]),y=useCallback((C=!1)=>{let R=findNodePath(o,t);R&&(removeNodes(o,{at:R}),C&&focusEditor(o));},[o,t]),b=useComboBoxState({items:d,children:f,menuTrigger:"focus",onSelectionChange:C=>{y(!0),r?.(C);}}),g=ro.useRef(null),z=ro.useRef(null),_=ro.useRef(null),h=ro.useRef(null),P=useHTMLInputCursorState(z);useInteractOutside({ref:h,onInteractOutside:()=>{b.close();}});let{inputProps:x,listBoxProps:k}=useComboBox({defaultItems:d,inputRef:z,buttonRef:g,listBoxRef:_,popoverRef:h,menuTrigger:"focus","aria-label":u(CC.mention)},b);useEffect(()=>{z.current?.focus();},[]);let w=useCallback((C="manual",R=!1)=>{y(R),e?.(C,b.inputValue);},[e,y,b.inputValue]),I=useRef(p);useEffect(()=>{I.current&&!p&&w("deselect"),I.current=p;},[p,w]);let N=P?.atStart??!1,L=P?.atEnd??!1,S=useCallback(C=>{C.key==="Backspace"&&N?w("backspace",!0):C.key==="Escape"?w("escape",!0):C.key==="ArrowLeft"&&N?w("arrowLeft",!0):C.key==="ArrowRight"&&L&&w("arrowRight",!0);let R=Hotkeys.isUndo(C)&&o.history.undos.length>0,F=Hotkeys.isRedo(C)&&o.history.redos.length>0;(R||F)&&(C.preventDefault(),o[R?"undo":"redo"](),focusEditor(o));},[N,L,w,o]),T=useMemo(()=>{if(!CSS.supports("field-sizing","content")){let C=ee(z.current),R=z.current?C?.getComputedStyle(z.current).font:void 0;return {width:R?getTextDimensions({text:b.inputValue,font:R}).width+10:"4ch"}}},[b.inputValue]);return jsxs(Qe.Provider,{value:b,children:[jsx("input",{...mergeProps(x,{onKeyDown:S,onBlur:()=>{w("blur",!0);},onChange:C=>{c(C.target.value);}}),style:T,className:wm,ref:M(a,z)}),b.isOpen?jsx(me,{triggerRef:n,className:Im,isNonModal:!0,ref:h,state:b,children:jsx(ae,{...k,items:void 0,autoFocus:"first",ref:_,className:sprinkles({width:"full"}),renderOption:Ym})}):null]})});Wm.displayName="MentionInputContentElement";var $n=withRef(({className:e,...o},t)=>{let{children:r,editor:a,element:n}=o,{items:i}=useContext(ea),s=useRef(null),[p,l]=useState(null);useEffect(()=>{let u=findNodePath(a,n);if(!u)return;let d=getPointBefore(a,u);if(!d)return;let f=createPointRef(a,d);return l(f),()=>{f.unref();}},[a,n]);let c=useCallback(()=>{let u=s.current?.getRootNode()instanceof ShadowRoot;moveSelection(a,{unit:"offset"}),moveSelection(a,{unit:"character",distance:1}),Jo()&&u&&focusEditor(a);},[a]),m=useCallback(u=>{if(!u)return;let d=s.current?.getRootNode()instanceof ShadowRoot,f=i.find(b=>b.id===u);invariant(f,"User not found");let y={type:Bt,value:f.id,displayName:f.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:!1,className:e,ref:t,...o,children:[jsx(Wm,{onCancel:(u,d)=>{u!=="backspace"&&insertText(a,"@"+d,{at:p?.current??void 0}),(u==="arrowLeft"||u==="arrowRight")&&moveSelection(a,{distance:1,reverse:u==="arrowLeft"});},onSelectionChange:m,ref:s,element:n,editor:a}),r]})});$n.displayName="MentionInputElement";var Un=withRef(({className:e,onClick:o,children:t,...r},a)=>{let n=useElement();return jsxs(PlateElement,{as:"span",className:e,contentEditable:!1,"data-user-id":n.value,onClick:getHandler(o,n),ref:a,...r,children:["@",n.displayName,t]})});Un.displayName="MentionElement";var Xm=(e,{options:{trigger:o,triggerPreviousCharPattern:t,triggerQuery:r}})=>{let{insertText:a}=e,n=i=>i===o;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(t?.test(s)){Jr(e);return}a(i);},e},CC=$({mention:{defaultMessage:"Mention",id:"mention"}});function Qm({className:e,children:o,...t}){return jsx(PlateElement,{asChild:!0,className:e,...t,children:jsx("p",{children:o})})}function OC(e){return Object.entries(e).map(([o,t])=>`${kebabCase(o)}:${t}`).filter(([,o])=>!!o).join(";")}function VC(e){return "text"in e}function AC(e){return e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#039;")}function Dt(e){if(!e)return "";function o(t){if(VC(t)){let a=AC(t.text);return t.bold&&(a=`<b>${a}</b>`),t.italic&&(a=`<i>${a}</i>`),t.underline&&(a=`<u>${a}</u>`),(t.color||t.backgroundColor)&&(a=`<span style="${OC(filterTruthyValues({color:t.color||void 0,backgroundColor:t.backgroundColor||void 0}))}">${a}</span>`),a}let r=t.children?.map(Dt).join("");switch(t.type){case ELEMENT_PARAGRAPH:return `<p>${r}</p>`;case ELEMENT_LINK:return `<a href="${t.url}">${r}</a>`;case Bt:return `<span data-user-id="${t.value}">${t.displayName}</span>`;default:return r}}return Array.isArray(e)?e.map(t=>o(t)).join(""):o(e)}function jC(e){return e?(e=e.trim(),e.endsWith(";")&&(e=e.slice(0,-1)),Object.fromEntries(e.split(";").map(o=>o.split(":").map(t=>t.trim())).map(([o,t])=>[camelCase(o),t]))):{}}function Xn(e){e.startsWith("<p>")||(e=`<p>${e}</p>`);let o=new DOMParser().parseFromString(Jm.default.sanitize(e),"text/html"),t=o.querySelectorAll("[style]");for(let a of t)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=o.querySelectorAll("br");for(let a of r)a.outerHTML=a.closest("p")?`
51
+ `:"<p>";return ou(o.body)}function ou(e,o){if(e.nodeType===Node.TEXT_NODE)return jsx$1("text",o,e.textContent);if(e.nodeType!==Node.ELEMENT_NODE)return null;let t={...o};switch(e.nodeName.toUpperCase()){case"B":{t.bold=!0;break}case"I":{t.italic=!0;break}case"EM":{t.italic=!0;break}case"U":{t.underline=!0;break}case"SPAN":{let a=jC(e.getAttribute("style")||"");a["text-decoration"]==="underline"&&(t.underline=!0),a.color&&(t.color=a.color),a.backgroundColor&&(t.backgroundColor=a.backgroundColor);break}}let r=[...e.childNodes].flatMap(a=>ou(a,t));switch(r.length===0&&r.push(jsx$1("text",t,"")),e.nodeName.toUpperCase()){case"BR":return jsx$1("text",o,`
52
+ `);case"SPAN":{let a=e.dataset.userId;return a?jsx$1("element",{type:Bt,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 tu(e){let o=findNode(e,{match:{type:getPluginType(e,ELEMENT_LINK)}}),[t]=o||[{url:""}];return t?.url}function Jr(e){let o={children:[{text:" "}],type:Qr};e.insertNode(o);}var $C=createPluginFactory({isElement:!0,isInline:!0,isMarkableVoid:!0,isVoid:!0,key:Bt,options:{trigger:"@",triggerPreviousCharPattern:/^$|^[\s"']$/},plugins:[{isElement:!0,isInline:!0,isVoid:!0,key:Qr}],withOverrides:Xm}),ru=createPlugins([createParagraphPlugin({component:Qm}),createBoldPlugin({component:withProps(PlateLeaf,{as:"b"})}),createItalicPlugin({component:withProps(PlateLeaf,{as:"i"})}),createUnderlinePlugin({component:withProps(PlateLeaf,{as:"u"})}),createFontColorPlugin(),createFontBackgroundColorPlugin(),createLinkPlugin({component:au}),$C({component:Un})],{components:{[Qr]:$n}});var lu=({isDisabled:e})=>{let{formatMessage:o}=E(),t=useEditorRef();return jsxs(Ne,{type:"dialog",children:[jsx(Se,{children:jsx(D,{icon:LinkIcon,size:"sm",isDisabled:e,"aria-label":o(ao.addLink),className:jo,preventFocusOnPress:!0})}),jsx(Pe,{className:sprinkles({boxShadow:"medium"}),placement:"top end",children:({close:r})=>jsx(le,{size:"content",style:{minWidth:240},children:jsx(ZC,{close:()=>{r(),setTimeout(()=>{focusEditor(t,t.selection);},0);}})})})]})},ZC=({close:e})=>{let o=useEditorRef(),{formatMessage:t}=E(),r=useEditorSelector(l=>tu(l),[]),[a,n]=ro.useState(r?"show":"add"),[i,s]=ro.useState(r||""),p=jsx(B,{padding:"lg",children:jsx(Io,{label:t(ao.link),value:i,autoFocus:!0,onChange:s,placeholder:"https://yourdomain.com"})});return jsxs(Fragment,{children:[a==="add"&&jsxs(Fragment,{children:[p,jsx(B,{display:"flex",justifyContent:"flex-end",padding:"lg",className:hm,children:jsx(A,{isDisabled:!isUrl(i,!0),label:t(ao.addLink),size:"sm",onPress:()=>{upsertLink(o,{url:i,skipValidation:!0}),e?.();},preventFocusOnPress:!0})})]}),a==="show"&&jsxs(Fragment,{children:[jsx(B,{padding:"lg",children:jsx(Z,{type:"subtitle",size:"sm",children:r})}),jsxs(B,{display:"flex",justifyContent:"flex-end",padding:"lg",gap:"lg",borderColor:"border.subtle",borderWidth:1,borderStyle:"solid",children:[jsx(A,{label:t(ao.editLink),size:"sm",variant:"secondary",onPress:()=>{n("edit");},style:{flex:1,justifyContent:"center"}}),jsx(A,{label:t(ao.removeLink),size:"sm",onPress:()=>{unwrapLink(o),e?.();},preventFocusOnPress:!0,style:{flex:1,justifyContent:"center"}})]})]}),a==="edit"&&jsxs(Fragment,{children:[p,jsxs(B,{display:"flex",justifyContent:"flex-end",padding:"lg",gap:"lg",borderColor:"border.subtle",borderWidth:1,borderStyle:"solid",children:[jsx(A,{label:t(ao.cancel),size:"sm",variant:"secondary",onPress:()=>{n("show"),e?.();}}),jsx(A,{label:t(ao.save),size:"sm",onPress:()=>{upsertLink(o,{url:i,skipValidation:!0}),e?.();}})]})]})]})};function au({className:e,children:o,...t}){return jsx(PlateElement,{asChild:!0,className:e,...t,children:jsx("a",{className:br({size:"sm"}),children:o})})}var ao=$({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 JC=parseColor("#ffffff00").toString("hexa"),Yn=[{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"}];[...Yn,{label:"Transparent",color:JC}];var ta=({nodeType:e,icon:o,ariaLabel:t,isDisabled:r})=>{let a=useEditorSelector(i=>isMarkActive(i,e),[]),n=useEditorRef();return jsx(Re,{variant:"tertiary",isSelected:a,size:"sm",icon:o,"aria-label":t,isDisabled:r,onPress:()=>{toggleMark(n,{key:e});},preventFocusOnPress:!0})},Qn=({nodeType:e,"aria-label":o,isDisabled:t})=>{let{updateColor:r,clearColor:a,color:n}=useColorDropdownMenuState({customColors:[],colors:[],nodeType:e}),i=useCallback(({ref:p,triggerProps:l})=>jsx(D,{icon:e==="color"?TextIcon$1:HighlightTextIcon,"aria-label":o,size:"md",variant:"popover",isDisabled:t,className:jo,preventFocusOnPress:!0,...l,ref:p}),[e,o,t]),s=useCallback(p=>{p?r(p.toString("rgba")):a();},[a,r]);return jsx(Ho,{presets:Yn,allowRemoval:!0,pickerMode:"lazy",placement:"top end",colorLabel:!1,renderTriggerButton:i,value:n||"#000000",onChange:s,isDisabled:t})};var TP=[{type:ELEMENT_PARAGRAPH,children:[{text:""}]}],ea=ro.createContext({items:[],containerRef:{current:null},maxMentionableUsersSuggestions:10}),oi=ro.forwardRef(({value:e,defaultValue:o,onChange:t,style:r,spellCheck:a,placeholder:n,isInline:i,isDisabled:s,editableContentAriaLabel:p,containerRef:l,onHelpDialogOpenRequest:c,mentionableUsers:m,editorHandle:u,maxMentionableUsersSuggestions:d,autoFocus:f,editorRef:y,saveOnEnter:b,onSave:g},z)=>{let _=useRef(null),h=useId(),{formatMessage:P}=E(),x=useRef(null),k=x.current,w=useRef(null),I=useMemo(()=>k?.getRootNode()instanceof ShadowRoot,[k]),[N,L]=useControlledState(e?Xn(e):void 0,Xn(o||"<p></p>"),C=>{t&&t(Dt(C));}),{keyboardProps:S}=useKeyboard({onKeyDown:C=>{(b&&C.key==="Enter"&&!C.shiftKey||(C.ctrlKey||C.metaKey)&&C.key==="Enter")&&(C.preventDefault(),g()),C.altKey&&C.key==="F10"?(C.preventDefault(),_.current&&_.current.querySelector("button")?.focus()):C.continuePropagation(),Jo()&&I&&w.current&&focusEditor(w.current);}});useEffect(()=>{s&&w.current&&deselect(w.current);},[s]),useImperativeHandle(z,()=>({startMention:()=>{w.current&&!x.current?.querySelector("input[role='combobox']")&&Jr(w.current);}})),useImperativeHandle(u,()=>({setCaretPosition:C=>{w.current&&(focusEditor(w.current),moveSelection(w.current,{distance:C,unit:"character"}));},focus:()=>{w.current&&focusEditor(w.current);}}));let T=useMemo(()=>({items:m||[],containerRef:l,maxMentionableUsersSuggestions:d}),[m,l,d]);return jsx(ea.Provider,{value:T,children:jsxs(Plate,{initialValue:N||TP,plugins:ru,editorRef:M(w,y||null),onChange:C=>{L(C);},children:[jsxs(Gr,{className:Yr,"aria-controls":h,ref:_,children:[jsxs(B,{display:"flex",flexDirection:"row",role:"group",gap:"xs",paddingX:"sm",children:[jsx(ta,{nodeType:MARK_BOLD,icon:BoldIcon,ariaLabel:P(Ko.bold),isDisabled:s}),jsx(ta,{nodeType:MARK_ITALIC,icon:ItalicIcon,ariaLabel:P(Ko.italic),isDisabled:s}),jsx(ta,{nodeType:MARK_UNDERLINE,icon:UnderlineIcon,ariaLabel:P(Ko.underline),isDisabled:s})]}),jsx(O,{orientation:"vertical",className:Tt}),jsx(Qn,{nodeType:MARK_COLOR,"aria-label":P(Ko.fontColor),isDisabled:s}),jsx(O,{orientation:"vertical",className:Tt}),jsx(Qn,{nodeType:MARK_BG_COLOR,"aria-label":P(Ko.backgroundColor),isDisabled:s}),jsx(O,{orientation:"vertical",className:Tt}),jsx(lu,{isDisabled:s}),jsx(O,{orientation:"vertical",className:Tt}),jsx(D,{className:jo,icon:QuestionmarkCircleIcon,size:"sm","aria-label":P(Ko.help),onPress:c})]}),jsx(O,{variant:"secondary"}),jsx("div",{...S,ref:x,children:jsx(PlateContent,{id:h,disabled:s,readOnly:s,style:r,placeholder:n,autoFocus:f,spellCheck:a,"aria-label":p,className:classNames(Wr({isDisabled:s}),Xr({isInline:i})),renderPlaceholder:({attributes:C,children:R})=>jsx("span",{...C,className:sprinkles({paddingY:"lg"}),children:R})})})]})})});oi.displayName="RichEditor";var Ym=({key:e,value:o},{isDisabled:t,optionProps:r,isFocused:a,_state:n},i)=>{let{hoverProps:s}=useHover({isDisabled:t}),{label:p,data:l}=o;return jsxs(Fragment,{children:[jsxs("li",{...mergeProps(r,s),className:Rm({isDisabled:t,isHovered:a}),"data-active":a,ref:i,children:[jsx(Bo,{name:p,...l?.avatar}),jsxs(B,{display:"flex",flexDirection:"column",children:[jsx(Z,{type:"subtitle",size:"sm",children:p}),jsx(Z,{type:"helper",size:"sm",children:l?.description})]})]}),e===n.collection.getLastKey()?null:jsx(O,{})]})},Ko=$({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 fu=ro.memo(ro.forwardRef(({className:e,style:o,"data-block-id":t,"data-block-class":r,enableRichText:a=!1,onCancel:n,onSave:i,isInline:s=!0,submitButtonIcon:p=ArrowUpCircleFilledIcon,submitButtonAriaLabel:l,cancelButtonAriaLabel:c,"aria-label":m,"aria-describedby":u,"aria-labelledby":d,"aria-details":f,editableContentAriaLabel:y="Editing Area",footerButtons:b,clearOnCancel:g,clearOnSave:z,..._},h)=>{let P=useRef(null),{formatMessage:x}=E(),k=useRef(null),w=useRef(null),I=useRef(null),N=!a&&_.variant==="minimal",L=useRef(null),[S,T]=ro.useState(_.value||_.defaultValue),C=_.isDisabled||_.isSaveDisabled||!getPlainText(S||""),{fieldProps:R}=useLabel({"aria-label":m,"aria-labelledby":d,"aria-describedby":u,"aria-details":f,labelElementType:"div"});N&&!_.avatarName&&console.warn("Editor: When using the minimal `variant` and `enableRichText` is `false`, you should provide an `avatarName`.");let F=useCallback(()=>{T(""),a?P.current?.reset():w.current?.clear();},[a]),H=useCallback(()=>{C||(i?.(a?Dt(P.current?.children):k.current.value),z&&F());},[F,z,a,i,C]),U=jsx(D,{variant:"ghost","aria-label":l||x(ri.save),icon:p,isDisabled:C,size:"md",excludeFromTabOrder:N,className:N?Tm:void 0,onPress:H,preventFocusOnPress:!0}),[G,W]=ro.useState(!1),{keyboardProps:Q}=useKeyboard({onKeyDown:V=>{(V.metaKey||V.ctrlKey)&&V.shiftKey&&V.key==="h"&&(V.preventDefault(),W(!0));}}),ce=useCallback(V=>{T(V),_.onChange?.(V);},[_]);return jsxs("div",{...mergeProps(R,a?Q:{}),role:"application",ref:M(I,h),style:o,"data-block-id":t,"data-block-class":r,className:classNames(Cm({isInline:s,isMinimal:N}),"BaselineUI-Editor",e),"aria-disabled":_.isDisabled,children:[N?jsxs(Fragment,{children:[s?jsx(Bo,{className:xm,name:_.avatarName||""}):null,jsxs("div",{className:Sm({isInline:s}),children:[jsx(Zr,{isMinimal:N,textBoxRef:k,isInline:s,editableContentAriaLabel:y,..._,onChange:ce,onSave:H}),U]})]}):jsxs(Fragment,{children:[a?jsx(oi,{containerRef:I,ref:L,editorRef:P,isInline:s,editableContentAriaLabel:y,onHelpDialogOpenRequest:()=>{W(!0);},..._,onChange:ce,onSave:H}):jsxs(Fragment,{children:[!s&&jsx(O,{variant:"secondary"}),jsx(Zr,{onCancel:n,textBoxRef:k,ref:w,isInline:s,editableContentAriaLabel:y,..._,onChange:V=>{T(V),_.onChange?.(V);},onSave:H})]}),jsx(O,{variant:"secondary"}),jsxs("div",{className:classNames(Yr,sprinkles({justifyContent:"space-between"})),children:[jsxs(B,{paddingX:"sm",gap:"sm",display:"flex",children:[a&&_.mentionableUsers?jsx(D,{icon:AtIcon,size:"sm","aria-label":x(ri.mention),onPress:()=>L.current?.startMention(),preventFocusOnPress:!0}):null,b?.map(({type:V,props:Y},ue)=>V==="action"?jsx(D,{...Y,size:"sm",isDisabled:_.isDisabled||Y.isDisabled},ue):jsx(Re,{...Y,size:"sm",variant:"tertiary",isDisabled:_.isDisabled||Y.isDisabled},ue))]}),jsxs(B,{children:[!!n&&jsx(D,{variant:"secondary",icon:CrossCircleFilledIcon,isDisabled:_.isDisabled,size:"md",onPress:()=>{n(),g&&F();},"aria-label":c||x(ri.cancel)}),U]})]})]}),jsx(Em,{isOpen:G,onClose:()=>{W(!1);}})]})}));fu.displayName="Editor";var ri=$({cancel:{defaultMessage:"Cancel",id:"cancel"},save:{defaultMessage:"Save",id:"save"},mention:{defaultMessage:"Mention",id:"mention"}});var aa=ro.forwardRef(({className:e,style:o,"data-block-id":t,"data-block-class":r,isMounted:a,children:n,transitions:i,elementType:s="div",...p},l)=>{let c=useTransition(a,i),m=animated[s];return c((u,d)=>d&&jsx(m,{className:e,"data-block-id":t,"data-block-class":r,style:{...o,...u},...p,ref:l,children:n}))});aa.displayName="Transition";var yu="_8kqf970 _1yep5z6ow _1yep5z6ox _1yep5z6oy _1yep5z613b _1yep5z613c _1yep5z613d _1yep5z613k _1yep5z613l _1yep5z613m _1yep5z6142 _1yep5z6143 _1yep5z6144 _1yep5z6yh _1yep5z6uq _1yep5z6ur _1yep5z6us _1yep5z6168";var gu=2,vu=ro.forwardRef(({className:e,style:o,hideForKeyboard:t,scrollRef:r,label:a,delay:n=1500,smoothScroll:i=!0,"data-block-id":s,"data-block-class":p},l)=>{let c=ro.useRef(null),m=useInteractionModality(),[u,d]=ro.useState(!1),f=useCallback(()=>{let N=r?.current||ve(c.current).body;return ee(N).getComputedStyle(N).flexDirection==="column-reverse"?N.scrollTop+gu>=0:N.scrollTop+N.clientHeight+gu>=N.scrollHeight},[r]),[y,b]=ro.useState(f),g=_o(),{buttonProps:z,isPressed:_}=useButton({onPress:()=>{let N=r?.current||ve(c.current).body;N.scrollTo({top:N.scrollHeight,behavior:i?"smooth":"auto"});}},c),{focusProps:h,isFocused:P,isFocusVisible:x}=useFocusRing(),{hoverProps:k,isHovered:w}=useHover({}),I=filterTruthyValues({"data-block-id":s,"data-block-class":p,"data-pressed":_,"data-focus-visible":x,"data-hovered":w,"data-focused":P});return useEffect(()=>{b(f());},[f]),useEffect(()=>{let N=r?.current||ve(c.current).body,L="onscrollend"in ee(N),S=()=>{setTimeout(()=>{d(!1),b(f());},n);},T=()=>{d(!0),L||S();};return N.addEventListener("scroll",T),N.addEventListener("scrollend",S),()=>{N.removeEventListener("scroll",T),N.removeEventListener("scrollend",S);}},[r,n,f]),jsxs(aa,{isMounted:(t?m!=="keyboard":!0)&&!u&&!y,elementType:"button",transitions:{from:{opacity:0,transform:"translateX(-50%) translateY(10px)"},enter:{opacity:1,transform:"translateX(-50%) translateY(0)"},leave:{opacity:0,transform:"translateX(-50%) translateY(10px)"},immediate:g},...mergeProps(z,h,k,I),className:classNames(yu,xr({isFocusVisible:x,variant:"high-contrast",isHovered:w}),"BaselineUI-ScrollControlButton",e),style:o,ref:M(l,c),children:[jsx(ArrowDownCircleFilledIcon,{size:16}),a]})});vu.displayName="ScrollControlButton";var ni="_1yep5z6jc _1yep5z6jd _1yep5z6je _1yep5z6jl _1yep5z6jm _1yep5z6jn",_u=v({defaultClassName:"_1v0p2z10 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ic _1yep5z6id _1yep5z6ie _1yep5z69f _1yep5z69g _1yep5z69h",variantClassNames:{hasTitleAndIcon:{true:"_1yep5z6le _1yep5z6lf _1yep5z6lg _1yep5z6nw _1yep5z6nx _1yep5z6ny"},hasNoCloseBtn:{true:"_1yep5z6lk _1yep5z6ll _1yep5z6lm _1yep5z6nw _1yep5z6nx _1yep5z6ny _1yep5z6p2 _1yep5z6p3 _1yep5z6p4 _1yep5z6mq _1yep5z6mr _1yep5z6ms"}},defaultVariants:{},compoundVariants:[[{hasTitleAndIcon:!0,hasNoCloseBtn:!0},"_1yep5z61g7 _1yep5z61g8 _1yep5z61g9"]]}),zu="_1v0p2z10";var ia=ro.forwardRef(({className:e,style:o,"data-block-id":t,"data-block-class":r,message:a,title:n,primaryActionLabel:i,cancelLabel:s,textInputProps:p,icon:l,iconColor:c,showCloseButton:m=!0,onPrimaryAction:u,onCancel:d,autoFocusButton:f,isPrimaryActionDisabled:y},b)=>{let g=useId(),{formatMessage:z}=E(),_=n&&jsx(Z,{id:g,type:"title",size:"sm",elementType:"h3",children:n});return jsxs(le,{className:e,style:o,"data-block-id":t,"data-block-class":r,size:"sm",variant:"primary",role:"alertdialog",ref:b,"aria-labelledby":g,children:[jsxs("div",{className:_u({hasTitleAndIcon:!!(l&&n),hasNoCloseBtn:!m}),children:[jsxs(B,{display:"flex",justifyContent:"space-between",alignItems:"center",flexDirection:"row",children:[l?jsx(l,{style:{color:c},size:24}):null,!l&&_,m?jsx(D,{icon:XIcon,variant:"secondary",size:"md","aria-label":z(rk.close),onPress:d}):null]}),l?_:null]}),a?jsx(B,{elementType:"section",className:zu,paddingX:"lg",paddingBottom:"lg",typography:"body.sm.regular",color:"text.primary",children:a}):null,p?jsx(B,{paddingX:"lg",paddingBottom:"lg",children:jsx(Io,{...p})}):null,s||i?jsxs(Fragment,{children:[jsx(O,{}),jsxs(B,{padding:"lg",display:"flex",gap:"xl",children:[s?jsx(A,{variant:"secondary",className:ni,label:s,onPress:d,autoFocus:f==="cancel"}):null,i?jsx(A,{className:ni,label:i,onPress:u,autoFocus:f==="primary",isDisabled:y}):null]})]}):null]})});ia.displayName="AlertDialog";var rk=$({close:{id:"close",defaultMessage:"Close",description:"Close button label"}});var hu="_1t55bp71",xu="_1yep5z6e3 _1yep5z6eu _1yep5z6i6 _1yep5z6i7 _1yep5z6i8 _1yep5z69i _1yep5z69j _1yep5z69k",Cu="_1t55bp70";var pk=lk(),Pu=ro.forwardRef(({className:e,style:o,children:t,"data-block-id":r,"data-block-class":a,showCaret:n},i)=>{let s=useMemo(()=>{let p=t;return (!t||Array.isArray(t)&&t.length===0)&&(p=""),pk.render(p)},[t]);return jsx("div",{className:classNames(xu,Cu,{[hu]:n},"BaselineUI-Markdown",e),"data-block-id":r,"data-block-class":a,style:o,ref:i,dangerouslySetInnerHTML:{__html:s}})});Pu.displayName="Markdown";function Iu(e){let{formatMessage:o,locale:t}=E(),[r,a]=ro.useState(!1),[n,i]=ro.useState(0),[s,p]=ro.useState(0),[l,c]=ro.useState(!1);useEffect(()=>{if(!e.current)return;let d=e.current,f=()=>{a(!1),i(0);},y=()=>{l||i(d.currentTime*100/d.duration);},b=()=>{p(d.duration);};return d.addEventListener("ended",f),d.addEventListener("timeupdate",y),d.addEventListener("loadedmetadata",b),()=>{d.removeEventListener("ended",f),d.removeEventListener("timeupdate",y),d.removeEventListener("loadedmetadata",b);}},[l,e]);let m=useCallback(()=>{(async()=>e.current&&(e.current.paused?(await e.current.play(),a(!0),announce(o(wu.playing),"polite")):(e.current.pause(),a(!1),announce(o(wu.paused),"polite"))))();},[o,e]),u=useCallback(d=>{e.current&&(e.current.currentTime=d*e.current.duration/100,announce(mk(e.current.currentTime,t.locale),"assertive"));},[t.locale,e]);return {isPlaying:r,progress:n,duration:s,togglePlay:m,seek:u,setProgress:i,formattedCurrentTime:e.current?.currentTime?Ru(e.current?.currentTime):"00:00",formattedDuration:s?Ru(s):"00:00",setIsSliderDragging:c}}var wu=$({playing:{id:"playing",defaultMessage:"Playing"},paused:{id:"paused",defaultMessage:"Paused"}});function mk(e,o){let t=Math.floor(e/3600),r=Math.floor(e%3600/60),a=e%60,n={...t&&{hours:t},...r&&{minutes:r},seconds:Math.floor(a)};return new Intl.DurationFormat(o,{style:"long"}).format(n)}function Ru(e){let o=Math.floor(e%3600/60),t=Math.floor(e%60);return [o,t].map(r=>r.toString().padStart(2,"0")).join(":")}var Tu="_1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z69o _1yep5z69p _1yep5z69q",Nu="rta2n91 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z69o _1yep5z69p _1yep5z69q _1yep5z6z9 _1yep5z6ut _1yep5z6uu _1yep5z6uv _1yep5z6166 _1yep5z6106",Su="rta2n90";var Bu=ro.forwardRef(({className:e,style:o,size:t="lg",sources:r,"data-block-id":a,"data-block-class":n,...i},s)=>{let p=ro.useRef(null),{isPlaying:l,progress:c,duration:m,togglePlay:u,seek:d,formattedDuration:f,formattedCurrentTime:y,setProgress:b,setIsSliderDragging:g}=Iu(p),{formatMessage:z}=E(),_=filterTruthyValues({"data-block-id":a,"data-block-class":n,"data-state":l?"playing":"paused","data-loaded":m>0});return jsxs("div",{..._,...i,className:classNames(Tu,"BaselineUI-AudioPlayer",e),role:"group",style:o,ref:s,children:[jsx(VisuallyHidden,{children:jsx("audio",{ref:p,children:r.map(({url:h,type:P})=>jsx("source",{src:h,type:P},h))})}),jsx(Re,{icon:l?PauseIcon:PlayIcon,variant:"toolbar",isSelected:l,size:t,"aria-label":z(l?si.pause:si.play),style:{borderRadius:"50%"},onPress:u}),jsxs("div",{className:Nu,children:[jsx("span",{"aria-hidden":!0,children:y}),jsx(go,{"aria-label":z(si.audioTimeline),value:c,minValue:0,maxValue:100,className:Su,onChange:h=>{b(h),g(!0);},onChangeEnd:h=>{d(h),g(!1);}}),jsx("span",{"aria-hidden":!0,children:f})]})]})});Bu.displayName="AudioPlayer";var si=$({play:{id:"play",defaultMessage:"Play"},pause:{id:"pause",defaultMessage:"Pause"},audioTimeline:{id:"audioTimeline",defaultMessage:"Audio timeline"}});var Du="_1w920rnf _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6fs _1yep5z6ho _1yep5z6hp _1yep5z6hq",Eu="_1w920rn1 _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6ic _1yep5z6id _1yep5z6ie _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z69i _1yep5z69j _1yep5z69k",Fu="_1w920rn0 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6km",Ht=v({defaultClassName:"_1w920rn2 _1yep5z6d6 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6hl _1yep5z6hm _1yep5z6hn",variantClassNames:{isFocusVisible:{true:"_1yep5z6l1 _1yep5z6kz _1yep5z6hc"},isSelected:{true:"_1yep5z6l1 _1yep5z6kz _1yep5z6hc"},isLoading:{true:"_1yep5z614w _1yep5z614x _1yep5z614y"},imageWidth:{sm:"_1w920rn6",md:"_1w920rn7"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:!0,isSelected:!0},"_1w920rn8 _1yep5z6l1 _1yep5z6kz _1yep5z6hc"]]}),Hu="_1w920rnd _1yep5z6kw",Ou=v({defaultClassName:"_1w920rn9 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6fw _1yep5z6eu _1yep5z6dy",variantClassNames:{isFocusVisible:{true:"_1w920rna _1yep5z6l1 _1yep5z6kz _1yep5z6hc"},isSelected:{true:"_1w920rnb"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:!0,isSelected:!0},"_1w920rnc _1yep5z61rm _1yep5z61rl _1yep5z61nz"]]}),Vu="_1w920rne";var ju=({items:e,ulRef:o})=>{let{length:t}=e,r=ro.useRef(null);return useLayoutEffect(()=>{if(!r.current)return;let a=r.current.closest(".BaselineUI-ImageGallery")?.querySelector(`[data-image-key='${e?.at(-1)?.key}']`)?.cloneNode(!0);invariant(a,"Node is not defined."),r.current?.prepend(a);},[e,o]),jsx("div",{className:Ht(),ref:r,children:jsx(B,{backgroundColor:"background.secondary.medium",borderRadius:"full",typography:"label.md.medium",color:"text.primary",position:"absolute",paddingX:"md",className:Vu,children:t})})};var wk=({fit:e,item:o,deleteElement:t})=>{let{formatMessage:r}=E(),{imgProps:a,isLoading:n,isLoaded:i}=vo({src:o.data?.src,alt:o.data?.alt??""}),s=useTransition(i,{from:{opacity:0},enter:{opacity:1},leave:{opacity:0}});return n?jsx(So,{"aria-label":r(Ot.loading)}):s((p,l)=>l&&jsx(animated.div,{role:"img","aria-label":a.alt,style:{...p,backgroundImage:`url(${a.src})`,backgroundSize:e},className:Hu,children:t}))},Uu=({item:{value:e},options:{optionProps:o,isFocusVisible:t,isSelected:r},liRef:a,fit:n="contain",imageWidth:i=102,onDelete:s,aspectRatio:p,className:l,imageClassName:c,imageLabelClassName:m,renderImage:u=(d,{deleteElement:f})=>jsx(wk,{item:d,deleteElement:f,fit:n})})=>{let d=useId(),{formatMessage:f}=E();invariant(e&&Ut(e),"Expected value to be a list option");let y=isNumber(i)?void 0:Ht({imageWidth:i}),b=isNumber(i)?{width:i}:void 0,g=s?jsx("div",{className:Du,children:jsx(D,{"aria-label":f(Ot.delete),size:"xs",icon:XIcon$2,onPress:()=>{s(e.id);},UNSAFE_NON_INTERACTIVE:!0})}):null;return jsxs("li",{...o,ref:a,className:classNames(Eu,l),"aria-labelledby":d,children:[jsx("div",{className:classNames(Ht({isFocusVisible:t,isSelected:r,isLoading:!0}),y,c),style:{aspectRatio:p?.toString(),...b},"data-image-key":e.id,children:u(e,{deleteElement:g??void 0,onDelete:s})}),jsx("span",{id:d,className:classNames(Ou({isFocusVisible:t,isSelected:r}),m),children:e.label})]})};function qu(e,o){return e.find(t=>t.id===o)}function Ku(e,o,t){let r=e.findIndex(i=>i.id===o),a=[...t].map(i=>e.findIndex(s=>s.id===i)),n=[...e];for(let i of a){let[s]=n.splice(i,1);n.splice(r,0,s);}return n}function Gu(e,o,t){let r=e.findIndex(s=>s.id===o),a=[...t].map(s=>e.findIndex(p=>p.id===s)),n=[...e],i=0;for(let s of a){let[p]=n.splice(s-i,1);n.splice(r,0,p),i++;}return n}function pi(e){return e.map(o=>({id:o.id,label:o.label,data:{src:o.src,alt:o.alt}}))}function Wu(e){return e.map(o=>({id:o.id,label:o.label,src:o.data?.src,alt:o.data?.alt}))}var Sk={width:0,display:"block"};var Zu=ro.forwardRef(({className:e,style:o,fit:t="cover",onReorder:r,"data-block-id":a,"data-block-class":n,onDelete:i,imageWidth:s="sm",aspectRatio:p=3/4,items:l,defaultItems:c=[],onKeyDown:m,imageContainerClassName:u,imageClassName:d,labelClassName:f,onListChange:y,renderImage:b,...g},z)=>{let _=ro.useRef(null),[h,P]=useState([]),{formatMessage:x}=E(),[k,w]=useControlledState(g.selectedKeys,g.defaultSelectedKeys??[],g.onSelectionChange),[I,N]=useControlledState(l?pi(l):void 0,pi(c),y?R=>{y?.(Wu(R));}:void 0),L=useCallback(R=>{let F=R.target.key,H=R.keys;if(R.target.dropPosition==="before"){let U=Ku(I,F,H);N(U);}else if(R.target.dropPosition==="after"){let U=Gu(I,F,H);N(U);}r?.(R);},[I,r,N]),S=useCallback(()=>{i&&h.length&&(N(I.filter(R=>!h.includes(R.id))),i(new Set(h)),P([]));},[h,I,i,N]),T=useCallback((R,F,H)=>jsx(Uu,{item:R,options:F,liRef:H,fit:t,imageWidth:s,aspectRatio:p,onDelete:i?U=>{P([U]);}:void 0,renderImage:b,className:u,imageClassName:d,imageLabelClassName:f}),[t,s,p,i,b,u,d,f]),{keyboardProps:C}=useKeyboard({onKeyDown(R){if(m?.(R),R.key==="Backspace"||R.key==="Delete"){if(!i)return;if([...k].length)P([...k]);else {let H=R.target.dataset.key;P([H]);}}}});return jsxs("div",{...C,ref:z,style:o,className:classNames("BaselineUI-ImageGallery",e),"data-block-id":a,"data-block-class":n,children:[jsx(ae,{...g,selectedKeys:k,items:I,onReorder:L,layout:"grid",orientation:"vertical",className:Fu,ref:_,dropIndicatorStyle:Sk,renderOption:T,renderDragPreview:R=>jsx(ju,{items:R,ulRef:_}),onSelectionChange:w,getItems:R=>[...R].map(F=>{let H=qu(I,F);return {src:H?.src||"",alt:H?.alt||"",key:F}})}),jsx(Ce,{isOpen:!![...h].length,onOpenChange:R=>{R||P([]);},children:jsx(Me,{isDismissable:!0,children:jsx(ia,{showCloseButton:!1,title:"Are you sure you want to delete this item?",primaryActionLabel:x(Ot.delete),cancelLabel:x(Ot.cancel),onCancel:()=>{P([]);},onPrimaryAction:S,autoFocusButton:"cancel"})})})]})});Zu.displayName="ImageGallery";var Ot=$({delete:{id:"delete",defaultMessage:"Delete"},cancel:{id:"cancel",defaultMessage:"Cancel"},loading:{id:"loading",defaultMessage:"Loading"}});var Qu="_1sexph00",Ju="_1sexph01 _1yep5z616p _1yep5z616q _1yep5z616r _1yep5z6191 _1yep5z6192 _1yep5z6193 _1yep5z61a7 _1yep5z61a8 _1yep5z61a9 _1yep5z617v _1yep5z617w _1yep5z617x _1yep5z61q4 _1yep5z61q5 _1yep5z61q6";var tf=ro.forwardRef(({className:e,style:o,items:t,"data-block-id":r,"data-block-class":a,hideLabel:n,size:i="md",isDisabled:s,showSelectedIcon:p=!0,excludeFromTabOrder:l,onPress:c,isSelected:m,defaultSelected:u,onButtonSelectionChange:d,moreAriaLabel:f,...y},b)=>{let{formatMessage:g}=E(),z=re(),_=useSelectState({items:t,...y,defaultSelectedKey:y.defaultSelectedKey||t?.[0]?.id,children:z,validationState:y.validationState==="error"?"invalid":"valid"}),[h,P]=useControlledState(m,!!u,C=>{d?.({isSelected:C,selectedKey:_.selectedKey});}),{hoverProps:x,isHovered:k}=useHover({isDisabled:s}),w=useMemo(()=>{let C=_.collection.getItem(_.selectedKey),R=C?.textValue||C?.["aria-label"],F=C?.value?.icon,H={size:i,isSelected:h,onPress:U=>{P(!h),c?.(U);},isDisabled:s,excludeFromTabOrder:l};return n&&F?jsx(Re,{icon:F,"aria-label":R,variant:"toolbar",...H}):jsx(zr,{iconStart:F,label:R,...H})},[l,n,h,s,c,P,i,_.collection,_.selectedKey]),I=y["aria-label"],N=useCallback(({buttonProps:C,ref:R})=>(delete C["aria-labelledby"],jsx(PressResponder,{...C,children:jsx(D,{"aria-label":f||`${g(Ak.more)} ${I}`,ref:R,icon:ChevronDownIcon,variant:"toolbar",size:i,className:classNames(_r({isSelected:h}),Ju),isDisabled:s,excludeFromTabOrder:l})})),[I,l,g,h,s,f,i]),L=filterTruthyValues({"data-block-id":r,"data-block-class":a,"data-hovered":k,"data-selected":h,"data-disabled":s}),S=de(b),T=useMemo(()=>({state:_,popoverAnchorRef:S}),[_,S]);return jsx(Pr.Provider,{value:T,children:jsxs(B,{...x,role:"group",display:"inline-flex",flexDirection:"row",alignItems:"center",className:classNames(Qu,"BaselineUI-ButtonSelect",e),"aria-label":y["aria-label"],"aria-labelledby":y["aria-labelledby"],"aria-describedby":y["aria-describedby"],"aria-details":y["aria-details"],style:o,ref:S,...L,children:[w,jsx(qe,{isDisabled:s,showSelectedIcon:p,placement:"bottom start",items:t,...y,style:{width:20},variant:"ghost",renderTrigger:N})]})})});tf.displayName="ButtonSelect";var Ak=$({more:{id:"more",defaultMessage:"More"}});var rf=v({defaultClassName:"_18v88n10 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6kv",variantClassNames:{labelPosition:{top:"_1yep5z613n _1yep5z613o _1yep5z613p",start:"_1yep5z613k _1yep5z613l _1yep5z613m _1yep5z6152 _1yep5z6153 _1yep5z6154 _1yep5z6ut _1yep5z6uu _1yep5z6uv"}},defaultVariants:{},compoundVariants:[]}),af=v({defaultClassName:"_18v88n1p _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6eu _1yep5z6kv _1yep5z6l6 _1yep5z6ky _1yep5z6dy",variantClassNames:{isDisabled:{true:"_18v88n1q _1yep5z6109"},labelPosition:{top:"_18v88n1r",start:"_18v88n1s"}},defaultVariants:{},compoundVariants:[]}),nf=v({defaultClassName:"_18v88n1t _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6ks",variantClassNames:{validationState:{valid:"_18v88n1u",error:"_1yep5z6zp",warning:"_1yep5z6zx"},isReadOnly:{true:"_1yep5z610b"}},defaultVariants:{},compoundVariants:[]}),sf=v({defaultClassName:"_18v88n1d _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6l9 _1yep5z6l7 _1yep5z6gq _1yep5z6ir _1yep5z6is _1yep5z6it",variantClassNames:{validationState:{valid:"_18v88n1e",error:"_1yep5z611k",warning:"_18v88n1g"},isHovered:{true:"_18v88n1h"},isFocused:{true:"_1yep5z6vt _1yep5z6vu _1yep5z6vv _1yep5z6wh _1yep5z6wi _1yep5z6wj _1yep5z6x5 _1yep5z6x6 _1yep5z6x7 _1yep5z6xt _1yep5z6xu _1yep5z6xv _1yep5z616k _1yep5z616i _1yep5z611y _1yep5z616b _1yep5z616a _1yep5z612n _1yep5z616d"},isDisabled:{true:"_18v88n1j"},variant:{primary:"_18v88n1k",ghost:"_18v88n1l"},isReadOnly:{true:"_1yep5z612n"}},defaultVariants:{},compoundVariants:[[{variant:"ghost",isHovered:!0,isFocused:!1,validationState:"valid"},"_1yep5z61rv _1yep5z61rt _1yep5z61nc"],[{variant:"ghost",isFocused:!1,isHovered:!1,validationState:"valid"},"_18v88n1n"],[{isHovered:!0,validationState:"valid",isDisabled:!1,isReadOnly:!1,isFocused:!1,variant:"primary"},"_1yep5z61nd"],[{isHovered:!0,validationState:"warning",isDisabled:!1,isReadOnly:!1,isFocused:!1},"_1yep5z61nd"],[{isReadOnly:!0,variant:"primary",isFocused:!1},"_18v88n1o"]]}),lf=v({defaultClassName:"_18v88n13 _1yep5z6dy _1yep5z6ev",variantClassNames:{isDisabled:{true:"_1yep5z6109"}},defaultVariants:{},compoundVariants:[]}),pf=v({defaultClassName:"_18v88n19 _1yep5z6i3 _1yep5z6i4 _1yep5z6i5",variantClassNames:{labelPosition:{top:"_1yep5z6sh _1yep5z6si _1yep5z6sj",start:"_1yep5z6me _1yep5z6mf _1yep5z6mg _1yep5z613n _1yep5z613o _1yep5z613p"},hasMessage:{true:"_18v88n1c"}},defaultVariants:{},compoundVariants:[[{labelPosition:"start",hasMessage:!1},"_1yep5z61q7 _1yep5z61q8 _1yep5z61q9"]]}),cf=v({defaultClassName:"_18v88n15 _1yep5z699 _1yep5z69a _1yep5z69b _1yep5z6ky",variantClassNames:{isFocusVisible:{true:"_1yep5z6116 _1yep5z612v _1yep5z6169"},isHovered:{true:"_1yep5z6116 _1yep5z612v _1yep5z6169"},isOpen:{true:"_1yep5z612v _1yep5z6169"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:!0},"_1yep5z61mh _1yep5z61o6 _1yep5z61rk"],[{isHovered:!0},"_1yep5z61mh _1yep5z61o6 _1yep5z61rk"],[{isOpen:!0},"_1yep5z61o6 _1yep5z61rk"]]});var uf=ro.forwardRef(({className:e,style:o,inputStyle:t,inputClassName:r,"data-block-id":a,"data-block-class":n,label:i,items:s,showSelectedIcon:p=!1,onSelectionChange:l,onInputChange:c,isInvalid:m=!1,labelPosition:u="top",validationState:d="valid",variant:f="primary",toggleLabel:y,renderOption:b,showIcon:g=!0,filter:z,minValue:_,maxValue:h,inputType:P="text",...x},k)=>{let{contains:w}=useFilter({sensitivity:"base"}),I=re(),N=useComboBoxState({...x,defaultFilter:z||w,defaultItems:s,onSelectionChange:l,onInputChange:c,children:I,validationState:m?"invalid":"valid"}),L=ro.useRef(null),S=ro.useRef(null),T=ro.useRef(null),C=ro.useRef(null),R=ro.useRef(null),{buttonProps:F,inputProps:H,listBoxProps:U,labelProps:G,errorMessageProps:W,descriptionProps:Q,validationErrors:ce}=useComboBox({...x,inputRef:S,defaultItems:s,buttonRef:L,listBoxRef:T,popoverRef:C,validationState:d==="error"?"invalid":"valid"},N),V=x.errorMessage||ce.join(" "),Y=xe({...x,errorMessage:V,descriptionProps:Q,errorMessageProps:W,labelPosition:u});V&&(d="error");let{hoverProps:ue,isHovered:Ie}=useHover({isDisabled:x.isDisabled}),{isFocused:_e,focusProps:ze,isFocusVisible:he}=useFocusRing(),Ee=Ro({isReadOnly:x.isReadOnly,validationState:d}),J=filterTruthyValues({"data-read-only":x.isReadOnly,"data-disabled":x.isDisabled,"data-validation-state":d,"data-focused":_e,"data-focus-visible":he}),{labelProps:se,fieldProps:Zo}=useLabel({label:i,"aria-label":x["aria-label"],"aria-labelledby":x["aria-labelledby"],"aria-describedby":x["aria-describedby"],"aria-details":x["aria-details"]});return jsx(Qe.Provider,{value:N,children:jsxs("div",{className:classNames(rf({labelPosition:u}),e,"BaselineUI-ComboBox"),"data-block-id":a,"data-block-class":n,style:o,ref:k,children:[i||u==="start"&&Y?jsxs("div",{className:pf({labelPosition:u,hasMessage:!!Y}),children:[jsx("label",{...mergeProps(G,se),className:lf({isDisabled:x.isDisabled}),children:i}),u==="start"&&Y]}):null,jsxs("div",{...ue,className:sf({validationState:d,isHovered:Ie,isFocused:_e,variant:f,isReadOnly:!!x.isReadOnly,isDisabled:!!x.isDisabled}),ref:R,children:[jsx("input",{...mergeProps(H,ze,J,Zo,P==="number"?{type:"number",min:_,max:h,onKeyDown:Ze=>{(Ze.key==="ArrowUp"||Ze.key==="ArrowDown")&&Ze.preventDefault();}}:null),ref:S,className:classNames(af({isDisabled:x.isDisabled,labelPosition:u}),"BaselineUI-ComboBox-Input",r),style:t}),Ee&&g?jsx(Ee,{className:nf({validationState:d,isReadOnly:x.isReadOnly}),size:16}):null,jsx(A,{...F,ref:L,variant:"popover",label:y,className:cf({isFocusVisible:!x.isDisabled&&!x.isReadOnly&&he,isHovered:!x.isDisabled&&!x.isReadOnly&&Ie,isOpen:N.isOpen})})]}),N.isOpen?jsx(me,{className:je,ref:C,triggerRef:R,state:N,children:jsx(ae,{...U,items:s,ref:T,renderOption:b,selectionMode:"single",showSelectedIcon:p,className:ur})}):null,u==="top"&&Y]})})});uf.displayName="ComboBox";var mi=ro.forwardRef(({item:e,renderGridItem:o,state:t},r)=>{let a=de(r),n=useGridListItem({node:e},t,a),i=t.selectionManager.selectionMode!=="none"&&t.selectionManager.selectionBehavior==="toggle",{checkboxProps:s}=useGridListSelectionCheckbox({key:e.key},t);return o(e,{...n,checkBoxProps:i?s:void 0},a)});mi.displayName="GridListItem";var r0=e=>{e.key==="Enter"||e.key==="Escape"||e.stopPropagation();},yf=ro.forwardRef(({className:e,style:o,isEditing:t=!1,"data-block-id":r,"data-block-class":a,...n},i)=>{let s=re(),p=useListState({...n,children:s}),l=de(i),{gridProps:c}=useGridList(n,p,l),m=t?r0:c.onKeyDownCapture;return jsx("ul",{...c,className:classNames("BaselineUI-GridList",e),"data-block-id":r,"data-block-class":a,style:o,ref:l,onKeyDownCapture:m,children:[...p.collection].map(u=>jsx(mi,{item:u,state:p,renderGridItem:n.renderGridItem},u.key))})});yf.displayName="GridList";var bf="_1dc3b8m0";var vf=ro.forwardRef(({className:e,selectionMode:o,style:t,"data-block-id":r,"data-block-class":a,tooltipProps:n,renderActionItem:i,...s},p)=>{let l=de(p),c=re(),m=useListState({...s,selectionMode:o,suppressTextValueWarning:!0,children:c}),{actionGroupProps:u}=useActionGroup({...s,selectionMode:o,children:c},m,l);return jsx(B,{...u,display:"flex",flexDirection:"row",gap:"xs",className:classNames("BaselineUI-ActionGroup",e),"data-block-id":r,"data-block-class":a,style:t,ref:l,children:[...m.collection].map(d=>(invariant(d.value),jsx(d0,{item:d,state:m,isDisabled:s.isDisabled,onAction:s.onAction,tooltipProps:n,renderActionItem:i},d.key)))})});vf.displayName="ActionGroup";var d0=({item:e,state:o,tooltipProps:t,renderActionItem:r,onAction:a,isDisabled:n})=>{let{buttonProps:i}=useActionGroupItem({key:e.key},o),s=n||o.selectionManager.isDisabled(e.key),p=o.selectionManager.isSelected(e.key);invariant(e.value);let{icon:l}=e.value;invariant(l);let c=useMemo(()=>(invariant(e.value),typeof t=="function"?t(e.value):t),[t,e.value]);return jsx(PressResponder,{...mergeProps(i,{onPress:()=>{a?.(e.key);}}),children:jsx(ke,{text:e.textValue,size:"sm",variant:"inverse",includeArrow:!1,offset:4,...c,children:r?.(e,{isSelected:p,isDisabled:s})||jsx(D,{variant:"tertiary",icon:l,"aria-label":e.textValue,size:"sm",isDisabled:s,className:classNames({[bf]:p},"BaselineUI-ActionGroup-Item")})})})};var _f="ujkypy0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e",zf="_1yep5z61ov _1yep5z61ow _1yep5z61ox _1yep5z61g1 _1yep5z61g2 _1yep5z61g3";var xf=ro.forwardRef(({className:e,style:o,items:t,optionsContainerClassName:r,label:a,icon:n,value:i,defaultValue:s,onChange:p,isDisabled:l,optionClassName:c,optionStyle:m,labelPosition:u="top","data-block-id":d,"data-block-class":f,...y},b)=>{let g=useMemo(()=>t.map(_=>({id:_.color,label:_.label})),[t]),z=useId();return useEffect(()=>{!a&&!y["aria-label"]&&!y["aria-labelledby"]&&console.warn("ColorSwatchPicker: Please provide a label or aria-label for accessibility.");},[a,y]),jsxs(B,{...ma(y),className:classNames("BaselineUI-ColorSwatchPicker",e),"data-block-id":d,"data-block-class":f,display:"flex",flexDirection:u==="top"?"column":"row",alignItems:u==="top"?"flex-start":"center",justifyContent:"space-between",gap:"md",style:o,ref:b,children:[n||a?jsxs(B,{display:"flex",alignItems:"center",gap:"md",children:[n?jsx(n,{size:24,className:sprinkles({color:"icon.primary"})}):null,a?jsx(Z,{id:z,type:"label",size:"sm",children:a}):null]}):null,jsx(ae,{className:classNames(zf,r),selectionMode:"single",items:g,orientation:"horizontal",defaultSelectedKeys:s?[s]:void 0,disabledKeys:l?g.map(_=>_.id):void 0,isDisabled:l,selectedKeys:i?[i]:void 0,onSelectionChange:_=>{p?.([..._][0]);},optionClassName:c,optionStyle:m,renderOption:({key:_,textValue:h},{isSelected:P,isFocusVisible:x,isDisabled:k,optionProps:w},I)=>jsx("li",{...w,"data-disabled":k,className:classNames(_f,w.className),ref:I,children:jsx(Ge,{isFocusVisible:x,color:_,isSelected:P,"aria-label":h,isInteractive:!0,isDisabled:k})}),...y,"aria-labelledby":a?z:y["aria-labelledby"]})]})});xf.displayName="ColorSwatchPicker";
53
53
 
54
- export { Kp as Accordion, ec as AccordionItem, j as ActionButton, _f as ActionGroup, o0 as ActionGroupItem, D as ActionIconButton, ia as AlertDialog, Du as AudioPlayer, Bo as Avatar, B as Box, tf as ButtonSelect, bp as Checkbox, Ho as ColorInput, We as ColorSwatch, Cf as ColorSwatchPicker, uf as ComboBox, wp as DateFormat, le as Dialog, Gs as DialogTitle, rs as DomNodeRenderer, ir as Drawer, yu as Editor, Ol as FileUpload, Td as FreehandCanvas, bf as GridList, am as Group, Ps as I18nProvider, hd as IconColorInput, Fr as IconColorInputButton, sc as IconSelect, ll as IconSlider, $d as ImageDropZone, Qu as ImageGallery, Sc as InlineAlert, Nl as Link, ae as ListBox, ku as Markdown, fr as Menu, rm as MessageFormat, Ce as Modal, L5 as ModalClose, Me as ModalContent, wr as ModalTrigger, To as NumberFormat, Le as NumberInput, kp as Pagination, Ne as Popover, Pe as PopoverContent, Se as PopoverTrigger, Co as Portal, Is as PortalContainerProvider, Wd as Preview, Wl as ProgressBar, So as ProgressSpinner, tm as RadioGroup, tp as Reaction, _u as ScrollControlButton, Cl as SearchInput, Ke as Select, V as Separator, vo as Slider, vl as Switch, xc as TabItem, hc as Tabs, Ep as TagGroup, X as Text, Io as TextInput, xo as ThemeProvider, vr as ToggleButton, _e as ToggleIconButton, Kr as Toolbar, ke as Tooltip, Od as Transform, ra as Transition, $ as defineMessages, ER as isInsideOverlayContent, Zn as isRect, zo as useDevice, F as useI18n, _o as useImage, vs as useIntersectionObserver, Ae as useIsFirstRender, ws as useLocalStorage, tN as useMutationObserver, fe as usePortalContainer, _s as useResizeObserver, pN as useTextSelection, hs as useUndoRedo, Ta as useUserPreferences };
54
+ export { qp as Accordion, Jp as AccordionItem, A as ActionButton, vf as ActionGroup, d0 as ActionGroupItem, D as ActionIconButton, ia as AlertDialog, Bu as AudioPlayer, Bo as Avatar, B as Box, tf as ButtonSelect, fp as Checkbox, Ho as ColorInput, Ge as ColorSwatch, xf as ColorSwatchPicker, uf as ComboBox, kp as DateFormat, le as Dialog, qs as DialogTitle, os as DomNodeRenderer, ir as Drawer, fu as Editor, Hl as FileUpload, Id as FreehandCanvas, yf as GridList, rm as Group, xs as I18nProvider, zd as IconColorInput, Or as IconColorInputButton, ic as IconSelect, sl as IconSlider, jd as ImageDropZone, Zu as ImageGallery, Nc as InlineAlert, Tl as Link, ae as ListBox, Pu as Markdown, yr as Menu, tm as MessageFormat, Ce as Modal, S5 as ModalClose, Me as ModalContent, Ir as ModalTrigger, To as NumberFormat, Le as NumberInput, Pp as Pagination, Ne as Popover, Pe as PopoverContent, Se as PopoverTrigger, Co as Portal, ws as PortalContainerProvider, Gd as Preview, Gl as ProgressBar, So as ProgressSpinner, om as RadioGroup, op as Reaction, vu as ScrollControlButton, xl as SearchInput, qe as Select, O as Separator, go as Slider, gl as Switch, hc as TabItem, zc as Tabs, Dp as TagGroup, Z as Text, Io as TextInput, xo as ThemeProvider, zr as ToggleButton, Re as ToggleIconButton, Gr as Toolbar, ke as Tooltip, Hd as Transform, aa as Transition, $ as defineMessages, KR as isInsideOverlayContent, Xi as isRect, zo as useDevice, E as useI18n, vo as useImage, bs as useIntersectionObserver, _o as useIsFirstRender, Ps as useLocalStorage, mN as useMutationObserver, fe as usePortalContainer, gs as useResizeObserver, _N as useTextSelection, _s as useUndoRedo, Na as useUserPreferences };