local-operator-ui 0.4.3 → 0.4.4

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.
@@ -1,4 +1,4 @@
1
- import { c as createStyled, r as resolveProps, u as useTheme, a as reactExports, b as clsx, d as useForkRef, j as jsxRuntimeExports, e as capitalize, f as composeClasses, g as createTheme, h as generateUtilityClass, i as getDefaultExportFromCjs, k as requireReactDom, R as React, l as generateUtilityClasses, m as useDefaultProps, s as styled$1, n as memoTheme, _ as _inheritsLoose, o as _objectWithoutPropertiesLoose$1, p as React$1, T as TransitionGroupContext, q as duration, t as useTheme$1, v as useTimeout, w as useId, B as ButtonBase, x as alpha, y as createSimplePaletteValueFilter, C as CircularProgress, P as Paper, z as darken, A as lighten, D as useEventCallback, E as setRef, F as useEnhancedEffect, G as useRtl, H as globalCss, I as formatMuiErrorMessage, J as rootShouldForwardProp, K as Typography, L as deepmerge, M as extendSxProp, N as resolveBreakpointValues, O as handleBreakpoints, Q as getPath, S as isFocusVisible, U as typographyClasses, V as slotShouldForwardProp, W as clamp, X as emphasize, Y as Timeout, Z as requireReact, $ as LinearProgress, a0 as Button, a1 as Box, a2 as FontAwesomeIcon, a3 as faRobot, a4 as faSliders, a5 as faExclamationTriangle, a6 as faCheck, a7 as faTimes, a8 as faEraser, a9 as faPen, aa as faInfoCircle, ab as faGear, ac as faServer, ad as faStar, ae as faTrash, af as faHome, ag as faDownload, ah as faFileAlt, ai as faDesktop, aj as faImage, ak as faMusic, al as faVideo, am as faLaptop, an as faUsers, ao as faDatabase, ap as faBoxOpen, aq as faBook, ar as faHdd, as as faBox, at as faArchive, au as faNetworkWired, av as faFolder, aw as faFolderOpen, ax as faClock, ay as faChevronDown, az as faTools, aA as faArrowDown, aB as faPaperclip, aC as faStop, aD as faPaperPlane, aE as keyframes, aF as faChevronUp, aG as faQuestion, aH as faFile, aI as faLightbulb, aJ as faCode, aK as faCommentDots, aL as faEdit, aM as faPencilAlt, aN as faChevronRight, aO as faUser, aP as faCopy, aQ as isDevelopmentMode, aR as faEllipsisVertical, aS as faComment, aT as faFileExport, aU as faChevronLeft, aV as faFileImport, aW as faUpload, aX as faPlus, aY as faSearch, aZ as faCommentSlash, a_ as faArrowRight, a$ as faComments, b0 as faTag, b1 as faIdCard, b2 as faCalendarAlt, b3 as faCodeBranch, b4 as faShieldAlt, b5 as faArrowLeft, b6 as faShield, b7 as faSignOut, b8 as darkTheme, b9 as lightTheme, ba as draculaTheme, bb as sageTheme, bc as monokaiTheme, bd as tokyoNightTheme, be as duneTheme, bf as icebergTheme, bg as faMagicWandSparkles, bh as faBrain, bi as faWandMagicSparkles, bj as faExternalLinkAlt, bk as faKey, bl as faGlobe, bm as faLock, bn as faAdjust, bo as faSave, bp as faMoon, bq as faSun, br as faSkull, bs as faLeaf, bt as faMountain, bu as faFire, bv as faIcicles, bw as faEnvelope, bx as faCloudUploadAlt, by as faHistory, bz as faListAlt, bA as library$1, bB as icons$1, bC as CssBaseline, bD as ThemeProvider$1, bE as ReactDOM$1, bF as ErrorBoundary } from "./error-boundary-HK_94N6W.js";
1
+ import { c as createStyled, r as resolveProps, u as useTheme, a as reactExports, b as clsx, d as useForkRef, j as jsxRuntimeExports, e as capitalize, f as composeClasses, g as createTheme, h as generateUtilityClass, i as getDefaultExportFromCjs, k as requireReactDom, R as React, l as generateUtilityClasses, m as useDefaultProps, s as styled$1, n as memoTheme, _ as _inheritsLoose, o as _objectWithoutPropertiesLoose, p as React$1, T as TransitionGroupContext, q as duration, t as useTheme$1, v as useTimeout, w as useId, B as ButtonBase, x as alpha, y as createSimplePaletteValueFilter, C as CircularProgress, P as Paper, z as darken, A as lighten, D as useEventCallback, E as useEnhancedEffect, F as useRtl, G as globalCss, H as formatMuiErrorMessage, I as rootShouldForwardProp, J as Typography, K as deepmerge, L as extendSxProp, M as resolveBreakpointValues, N as handleBreakpoints, O as getPath, Q as isFocusVisible, S as typographyClasses, U as slotShouldForwardProp, V as clamp, W as emphasize, X as Timeout, Y as requireReact, Z as LinearProgress, $ as Button, a0 as Box, a1 as FontAwesomeIcon, a2 as faRobot, a3 as faSliders, a4 as faExclamationTriangle, a5 as faCheck, a6 as faTimes, a7 as faEraser, a8 as faPen, a9 as faInfoCircle, aa as faGear, ab as faServer, ac as faStar, ad as faTrash, ae as faHome, af as faDownload, ag as faFileAlt, ah as faDesktop, ai as faImage, aj as faMusic, ak as faVideo, al as faLaptop, am as faUsers, an as faDatabase, ao as faBoxOpen, ap as faBook, aq as faHdd, ar as faBox, as as faArchive, at as faNetworkWired, au as faFolder, av as faFolderOpen, aw as faClock, ax as faChevronDown, ay as faTools, az as faArrowDown, aA as faPaperclip, aB as faStop, aC as faPaperPlane, aD as _extends$2, aE as keyframes, aF as faChevronUp, aG as faQuestion, aH as faFile, aI as faLightbulb, aJ as faCode, aK as faCommentDots, aL as faEdit, aM as faPencilAlt, aN as faChevronRight, aO as faUser, aP as faCopy, aQ as isDevelopmentMode, aR as faEllipsisVertical, aS as faComment, aT as faFileExport, aU as faChevronLeft, aV as faFileImport, aW as faUpload, aX as faPlus, aY as faSearch, aZ as faCommentSlash, a_ as faArrowRight, a$ as faComments, b0 as faTag, b1 as faIdCard, b2 as faCalendarAlt, b3 as faCodeBranch, b4 as faShieldAlt, b5 as faArrowLeft, b6 as faShield, b7 as faSignOut, b8 as darkTheme, b9 as lightTheme, ba as draculaTheme, bb as sageTheme, bc as monokaiTheme, bd as tokyoNightTheme, be as duneTheme, bf as icebergTheme, bg as faMagicWandSparkles, bh as faBrain, bi as faWandMagicSparkles, bj as faExternalLinkAlt, bk as faKey, bl as faGlobe, bm as faLock, bn as faAdjust, bo as faSave, bp as faMoon, bq as faSun, br as faSkull, bs as faLeaf, bt as faMountain, bu as faFire, bv as faIcicles, bw as faEnvelope, bx as faCloudUploadAlt, by as faHistory, bz as faListAlt, bA as library$1, bB as icons$1, bC as CssBaseline, bD as ThemeProvider$1, bE as ReactDOM$1, bF as ErrorBoundary } from "./error-boundary-BSN19Qr4.js";
2
2
  const styled = createStyled();
3
3
  function getThemeProps(params) {
4
4
  const {
@@ -68,6 +68,13 @@ function ownerWindow(node2) {
68
68
  const doc = ownerDocument(node2);
69
69
  return doc.defaultView || window;
70
70
  }
71
+ function setRef(ref, value) {
72
+ if (typeof ref === "function") {
73
+ ref(value);
74
+ } else if (ref) {
75
+ ref.current = value;
76
+ }
77
+ }
71
78
  function useControlled({
72
79
  controlled,
73
80
  default: defaultProp,
@@ -480,7 +487,7 @@ function partialMatchKey(a, b2) {
480
487
  return false;
481
488
  }
482
489
  if (a && b2 && typeof a === "object" && typeof b2 === "object") {
483
- return !Object.keys(b2).some((key) => !partialMatchKey(a[key], b2[key]));
490
+ return Object.keys(b2).every((key) => partialMatchKey(a[key], b2[key]));
484
491
  }
485
492
  return false;
486
493
  }
@@ -844,6 +851,7 @@ function createRetryer(config2) {
844
851
  }
845
852
  };
846
853
  }
854
+ var defaultScheduler = (cb) => setTimeout(cb, 0);
847
855
  function createNotifyManager() {
848
856
  let queue = [];
849
857
  let transactions = 0;
@@ -853,7 +861,7 @@ function createNotifyManager() {
853
861
  let batchNotifyFn = (callback) => {
854
862
  callback();
855
863
  };
856
- let scheduleFn = (cb) => setTimeout(cb, 0);
864
+ let scheduleFn = defaultScheduler;
857
865
  const schedule = (callback) => {
858
866
  if (transactions) {
859
867
  queue.push(callback);
@@ -1839,13 +1847,11 @@ function getPreviousPageParam(options, { pages, pageParams }) {
1839
1847
  return pages.length > 0 ? options.getPreviousPageParam?.(pages[0], pages, pageParams[0], pageParams) : void 0;
1840
1848
  }
1841
1849
  function hasNextPage(options, data) {
1842
- if (!data)
1843
- return false;
1850
+ if (!data) return false;
1844
1851
  return getNextPageParam(options, data) != null;
1845
1852
  }
1846
1853
  function hasPreviousPage(options, data) {
1847
- if (!data || !options.getPreviousPageParam)
1848
- return false;
1854
+ if (!data || !options.getPreviousPageParam) return false;
1849
1855
  return getPreviousPageParam(options, data) != null;
1850
1856
  }
1851
1857
  var QueryClient = class {
@@ -1867,8 +1873,7 @@ var QueryClient = class {
1867
1873
  }
1868
1874
  mount() {
1869
1875
  this.#mountCount++;
1870
- if (this.#mountCount !== 1)
1871
- return;
1876
+ if (this.#mountCount !== 1) return;
1872
1877
  this.#unsubscribeFocus = focusManager.subscribe(async (focused) => {
1873
1878
  if (focused) {
1874
1879
  await this.resumePausedMutations();
@@ -1884,8 +1889,7 @@ var QueryClient = class {
1884
1889
  }
1885
1890
  unmount() {
1886
1891
  this.#mountCount--;
1887
- if (this.#mountCount !== 0)
1888
- return;
1892
+ if (this.#mountCount !== 0) return;
1889
1893
  this.#unsubscribeFocus?.();
1890
1894
  this.#unsubscribeFocus = void 0;
1891
1895
  this.#unsubscribeOnline?.();
@@ -1897,6 +1901,13 @@ var QueryClient = class {
1897
1901
  isMutating(filters) {
1898
1902
  return this.#mutationCache.findAll({ ...filters, status: "pending" }).length;
1899
1903
  }
1904
+ /**
1905
+ * Imperative (non-reactive) way to retrieve data for a QueryKey.
1906
+ * Should only be used in callbacks or functions where reading the latest data is necessary, e.g. for optimistic updates.
1907
+ *
1908
+ * Hint: Do not use this function inside a component, because it won't receive updates.
1909
+ * Use `useQuery` to create a `QueryObserver` that subscribes to changes.
1910
+ */
1900
1911
  getQueryData(queryKey) {
1901
1912
  const options = this.defaultQueryOptions({ queryKey });
1902
1913
  return this.#queryCache.get(options.queryHash)?.state.data;
@@ -2199,7 +2210,7 @@ var QueryObserver = class extends Subscribable {
2199
2210
  this.#clearRefetchInterval();
2200
2211
  this.#currentQuery.removeObserver(this);
2201
2212
  }
2202
- setOptions(options, notifyOptions) {
2213
+ setOptions(options) {
2203
2214
  const prevOptions = this.options;
2204
2215
  const prevQuery = this.#currentQuery;
2205
2216
  this.options = this.#client.defaultQueryOptions(options);
@@ -2226,7 +2237,7 @@ var QueryObserver = class extends Subscribable {
2226
2237
  )) {
2227
2238
  this.#executeFetch();
2228
2239
  }
2229
- this.updateResult(notifyOptions);
2240
+ this.updateResult();
2230
2241
  if (mounted && (this.#currentQuery !== prevQuery || resolveEnabled(this.options.enabled, this.#currentQuery) !== resolveEnabled(prevOptions.enabled, this.#currentQuery) || resolveStaleTime(this.options.staleTime, this.#currentQuery) !== resolveStaleTime(prevOptions.staleTime, this.#currentQuery))) {
2231
2242
  this.#updateStaleTimeout();
2232
2243
  }
@@ -2491,7 +2502,7 @@ var QueryObserver = class extends Subscribable {
2491
2502
  }
2492
2503
  return nextResult;
2493
2504
  }
2494
- updateResult(notifyOptions) {
2505
+ updateResult() {
2495
2506
  const prevResult = this.#currentResult;
2496
2507
  const nextResult = this.createResult(this.#currentQuery, this.options);
2497
2508
  this.#currentResultState = this.#currentQuery.state;
@@ -2503,7 +2514,6 @@ var QueryObserver = class extends Subscribable {
2503
2514
  return;
2504
2515
  }
2505
2516
  this.#currentResult = nextResult;
2506
- const defaultNotifyOptions = {};
2507
2517
  const shouldNotifyListeners = () => {
2508
2518
  if (!prevResult) {
2509
2519
  return true;
@@ -2525,10 +2535,7 @@ var QueryObserver = class extends Subscribable {
2525
2535
  return changed && includedProps.has(typedKey);
2526
2536
  });
2527
2537
  };
2528
- if (notifyOptions?.listeners !== false && shouldNotifyListeners()) {
2529
- defaultNotifyOptions.listeners = true;
2530
- }
2531
- this.#notify({ ...defaultNotifyOptions, ...notifyOptions });
2538
+ this.#notify({ listeners: shouldNotifyListeners() });
2532
2539
  }
2533
2540
  #updateQuery() {
2534
2541
  const query = this.#client.getQueryCache().build(this.#client, this.options);
@@ -2597,14 +2604,11 @@ var InfiniteQueryObserver = class extends QueryObserver {
2597
2604
  this.fetchNextPage = this.fetchNextPage.bind(this);
2598
2605
  this.fetchPreviousPage = this.fetchPreviousPage.bind(this);
2599
2606
  }
2600
- setOptions(options, notifyOptions) {
2601
- super.setOptions(
2602
- {
2603
- ...options,
2604
- behavior: infiniteQueryBehavior()
2605
- },
2606
- notifyOptions
2607
- );
2607
+ setOptions(options) {
2608
+ super.setOptions({
2609
+ ...options,
2610
+ behavior: infiniteQueryBehavior()
2611
+ });
2608
2612
  }
2609
2613
  getOptimisticResult(options) {
2610
2614
  options.behavior = infiniteQueryBehavior();
@@ -2862,7 +2866,7 @@ function useBaseQuery(options, Observer, queryClient2) {
2862
2866
  () => observer.getCurrentResult()
2863
2867
  );
2864
2868
  reactExports.useEffect(() => {
2865
- observer.setOptions(defaultedOptions, { listeners: false });
2869
+ observer.setOptions(defaultedOptions);
2866
2870
  }, [defaultedOptions, observer]);
2867
2871
  if (shouldSuspend(defaultedOptions, result)) {
2868
2872
  throw fetchOptimistic(defaultedOptions, observer, errorResetBoundary);
@@ -2945,8 +2949,8 @@ const ReactDOM = /* @__PURE__ */ getDefaultExportFromCjs(reactDomExports);
2945
2949
  *
2946
2950
  * @license MIT
2947
2951
  */
2948
- function _extends$2() {
2949
- _extends$2 = Object.assign ? Object.assign.bind() : function(target) {
2952
+ function _extends$1() {
2953
+ _extends$1 = Object.assign ? Object.assign.bind() : function(target) {
2950
2954
  for (var i = 1; i < arguments.length; i++) {
2951
2955
  var source = arguments[i];
2952
2956
  for (var key in source) {
@@ -2957,7 +2961,7 @@ function _extends$2() {
2957
2961
  }
2958
2962
  return target;
2959
2963
  };
2960
- return _extends$2.apply(this, arguments);
2964
+ return _extends$1.apply(this, arguments);
2961
2965
  }
2962
2966
  var Action;
2963
2967
  (function(Action2) {
@@ -3034,7 +3038,7 @@ function createLocation(current, to, state, key) {
3034
3038
  if (state === void 0) {
3035
3039
  state = null;
3036
3040
  }
3037
- let location = _extends$2({
3041
+ let location = _extends$1({
3038
3042
  pathname: typeof current === "string" ? current : current.pathname,
3039
3043
  search: "",
3040
3044
  hash: ""
@@ -3091,7 +3095,7 @@ function getUrlBasedHistory(getLocation, createHref, validateLocation, options)
3091
3095
  let index2 = getIndex();
3092
3096
  if (index2 == null) {
3093
3097
  index2 = 0;
3094
- globalHistory.replaceState(_extends$2({}, globalHistory.state, {
3098
+ globalHistory.replaceState(_extends$1({}, globalHistory.state, {
3095
3099
  idx: index2
3096
3100
  }), "");
3097
3101
  }
@@ -3501,7 +3505,7 @@ function resolveTo(toArg, routePathnames, locationPathname, isPathRelative) {
3501
3505
  if (typeof toArg === "string") {
3502
3506
  to = parsePath(toArg);
3503
3507
  } else {
3504
- to = _extends$2({}, toArg);
3508
+ to = _extends$1({}, toArg);
3505
3509
  invariant(!to.pathname || !to.pathname.includes("?"), getInvalidPathError("?", "pathname", "search", to));
3506
3510
  invariant(!to.pathname || !to.pathname.includes("#"), getInvalidPathError("#", "pathname", "hash", to));
3507
3511
  invariant(!to.search || !to.search.includes("#"), getInvalidPathError("#", "search", "hash", to));
@@ -3552,8 +3556,8 @@ new Set(validRequestMethodsArr);
3552
3556
  *
3553
3557
  * @license MIT
3554
3558
  */
3555
- function _extends$1() {
3556
- _extends$1 = Object.assign ? Object.assign.bind() : function(target) {
3559
+ function _extends() {
3560
+ _extends = Object.assign ? Object.assign.bind() : function(target) {
3557
3561
  for (var i = 1; i < arguments.length; i++) {
3558
3562
  var source = arguments[i];
3559
3563
  for (var key in source) {
@@ -3564,7 +3568,7 @@ function _extends$1() {
3564
3568
  }
3565
3569
  return target;
3566
3570
  };
3567
- return _extends$1.apply(this, arguments);
3571
+ return _extends.apply(this, arguments);
3568
3572
  }
3569
3573
  const DataRouterContext = /* @__PURE__ */ reactExports.createContext(null);
3570
3574
  const DataRouterStateContext = /* @__PURE__ */ reactExports.createContext(null);
@@ -3691,7 +3695,7 @@ function useRoutesImpl(routes, locationArg, dataRouterState, future) {
3691
3695
  if (locationArg && renderedMatches) {
3692
3696
  return /* @__PURE__ */ reactExports.createElement(LocationContext.Provider, {
3693
3697
  value: {
3694
- location: _extends$1({
3698
+ location: _extends({
3695
3699
  pathname: "/",
3696
3700
  search: "",
3697
3701
  hash: "",
@@ -3958,7 +3962,7 @@ function useNavigateStable() {
3958
3962
  if (typeof to === "number") {
3959
3963
  router.navigate(to);
3960
3964
  } else {
3961
- router.navigate(to, _extends$1({
3965
+ router.navigate(to, _extends({
3962
3966
  fromRouteId: id
3963
3967
  }, options));
3964
3968
  }
@@ -4022,7 +4026,7 @@ function Router(_ref5) {
4022
4026
  basename: basename2,
4023
4027
  navigator: navigator2,
4024
4028
  static: staticProp,
4025
- future: _extends$1({
4029
+ future: _extends({
4026
4030
  v7_relativeSplatPath: false
4027
4031
  }, future)
4028
4032
  }), [basename2, future, navigator2, staticProp]);
@@ -4666,7 +4670,7 @@ var Transition = /* @__PURE__ */ function(_React$Component) {
4666
4670
  _this$props.onExiting;
4667
4671
  _this$props.onExited;
4668
4672
  _this$props.nodeRef;
4669
- var childProps = _objectWithoutPropertiesLoose$1(_this$props, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
4673
+ var childProps = _objectWithoutPropertiesLoose(_this$props, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
4670
4674
  return (
4671
4675
  // allows for nested Transitions
4672
4676
  /* @__PURE__ */ React$1.createElement(TransitionGroupContext.Provider, {
@@ -5630,7 +5634,7 @@ function useAutocomplete(props) {
5630
5634
  const [focusedTag, setFocusedTag] = reactExports.useState(-1);
5631
5635
  const defaultHighlighted = autoHighlight ? 0 : -1;
5632
5636
  const highlightedIndexRef = reactExports.useRef(defaultHighlighted);
5633
- const initialInputValue = reactExports.useRef(getInputValue(defaultValue, multiple, getOptionLabel)).current;
5637
+ const initialInputValue = reactExports.useRef(getInputValue(defaultValue ?? valueProp, multiple, getOptionLabel)).current;
5634
5638
  const [value, setValueState] = useControlled({
5635
5639
  controlled: valueProp,
5636
5640
  default: defaultValue,
@@ -5733,7 +5737,7 @@ function useAutocomplete(props) {
5733
5737
  const setHighlightedIndex = useEventCallback(({
5734
5738
  event,
5735
5739
  index: index2,
5736
- reason = "auto"
5740
+ reason
5737
5741
  }) => {
5738
5742
  highlightedIndexRef.current = index2;
5739
5743
  if (index2 === -1) {
@@ -5741,7 +5745,7 @@ function useAutocomplete(props) {
5741
5745
  } else {
5742
5746
  inputRef.current.setAttribute("aria-activedescendant", `${id}-option-${index2}`);
5743
5747
  }
5744
- if (onHighlightChange) {
5748
+ if (onHighlightChange && ["mouse", "keyboard", "touch"].includes(reason)) {
5745
5749
  onHighlightChange(event, index2 === -1 ? null : filteredOptions[index2], reason);
5746
5750
  }
5747
5751
  if (!listboxRef.current) {
@@ -5786,7 +5790,7 @@ function useAutocomplete(props) {
5786
5790
  event,
5787
5791
  diff,
5788
5792
  direction = "next",
5789
- reason = "auto"
5793
+ reason
5790
5794
  }) => {
5791
5795
  if (!popupOpen) {
5792
5796
  return;
@@ -8678,6 +8682,15 @@ const TextareaAutosize = /* @__PURE__ */ reactExports.forwardRef(function Textar
8678
8682
  overflowing
8679
8683
  };
8680
8684
  }, [maxRows, minRows, props.placeholder]);
8685
+ const didHeightChange = useEventCallback(() => {
8686
+ const textarea = textareaRef.current;
8687
+ const textareaStyles = calculateTextareaStyles();
8688
+ if (!textarea || !textareaStyles || isEmpty$1(textareaStyles)) {
8689
+ return false;
8690
+ }
8691
+ const outerHeightStyle = textareaStyles.outerHeightStyle;
8692
+ return heightRef.current != null && heightRef.current !== outerHeightStyle;
8693
+ });
8681
8694
  const syncHeight = reactExports.useCallback(() => {
8682
8695
  const textarea = textareaRef.current;
8683
8696
  const textareaStyles = calculateTextareaStyles();
@@ -8693,34 +8706,36 @@ const TextareaAutosize = /* @__PURE__ */ reactExports.forwardRef(function Textar
8693
8706
  }, [calculateTextareaStyles]);
8694
8707
  const frameRef = reactExports.useRef(-1);
8695
8708
  useEnhancedEffect(() => {
8696
- const debounceHandleResize = debounce$1(() => syncHeight());
8709
+ const debouncedHandleResize = debounce$1(syncHeight);
8697
8710
  const textarea = textareaRef?.current;
8698
8711
  if (!textarea) {
8699
8712
  return void 0;
8700
8713
  }
8701
8714
  const containerWindow = ownerWindow(textarea);
8702
- containerWindow.addEventListener("resize", debounceHandleResize);
8715
+ containerWindow.addEventListener("resize", debouncedHandleResize);
8703
8716
  let resizeObserver;
8704
8717
  if (typeof ResizeObserver !== "undefined") {
8705
8718
  resizeObserver = new ResizeObserver(() => {
8706
- resizeObserver.unobserve(textarea);
8707
- cancelAnimationFrame(frameRef.current);
8708
- syncHeight();
8709
- frameRef.current = requestAnimationFrame(() => {
8710
- resizeObserver.observe(textarea);
8711
- });
8719
+ if (didHeightChange()) {
8720
+ resizeObserver.unobserve(textarea);
8721
+ cancelAnimationFrame(frameRef.current);
8722
+ syncHeight();
8723
+ frameRef.current = requestAnimationFrame(() => {
8724
+ resizeObserver.observe(textarea);
8725
+ });
8726
+ }
8712
8727
  });
8713
8728
  resizeObserver.observe(textarea);
8714
8729
  }
8715
8730
  return () => {
8716
- debounceHandleResize.clear();
8731
+ debouncedHandleResize.clear();
8717
8732
  cancelAnimationFrame(frameRef.current);
8718
- containerWindow.removeEventListener("resize", debounceHandleResize);
8733
+ containerWindow.removeEventListener("resize", debouncedHandleResize);
8719
8734
  if (resizeObserver) {
8720
8735
  resizeObserver.disconnect();
8721
8736
  }
8722
8737
  };
8723
- }, [calculateTextareaStyles, syncHeight]);
8738
+ }, [calculateTextareaStyles, syncHeight, didHeightChange]);
8724
8739
  useEnhancedEffect(() => {
8725
8740
  syncHeight();
8726
8741
  });
@@ -15642,6 +15657,16 @@ const ListItemText = /* @__PURE__ */ reactExports.forwardRef(function ListItemTe
15642
15657
  ...slotProps
15643
15658
  }
15644
15659
  };
15660
+ const [RootSlot, rootSlotProps] = useSlot("root", {
15661
+ className: clsx(classes.root, className),
15662
+ elementType: ListItemTextRoot,
15663
+ externalForwardedProps: {
15664
+ ...externalForwardedProps,
15665
+ ...other
15666
+ },
15667
+ ownerState,
15668
+ ref
15669
+ });
15645
15670
  const [PrimarySlot, primarySlotProps] = useSlot("primary", {
15646
15671
  className: classes.primary,
15647
15672
  elementType: Typography,
@@ -15670,11 +15695,8 @@ const ListItemText = /* @__PURE__ */ reactExports.forwardRef(function ListItemTe
15670
15695
  children: secondary
15671
15696
  });
15672
15697
  }
15673
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(ListItemTextRoot, {
15674
- className: clsx(classes.root, className),
15675
- ownerState,
15676
- ref,
15677
- ...other,
15698
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(RootSlot, {
15699
+ ...rootSlotProps,
15678
15700
  children: [primary, secondary]
15679
15701
  });
15680
15702
  });
@@ -16092,7 +16114,7 @@ const Popover = /* @__PURE__ */ reactExports.forwardRef(function Popover2(inProp
16092
16114
  const handleResize = debounce$1(() => {
16093
16115
  setPositioningStyles();
16094
16116
  });
16095
- const containerWindow = ownerWindow(anchorEl);
16117
+ const containerWindow = ownerWindow(resolveAnchorEl(anchorEl));
16096
16118
  containerWindow.addEventListener("resize", handleResize);
16097
16119
  return () => {
16098
16120
  handleResize.clear();
@@ -19532,7 +19554,10 @@ const Snackbar = /* @__PURE__ */ reactExports.forwardRef(function Snackbar2(inPr
19532
19554
  },
19533
19555
  ownerState
19534
19556
  });
19535
- const [ClickAwaySlot, clickAwayListenerProps] = useSlot("clickAwayListener", {
19557
+ const [ClickAwaySlot, {
19558
+ ownerState: clickAwayOwnerStateProp,
19559
+ ...clickAwayListenerProps
19560
+ }] = useSlot("clickAwayListener", {
19536
19561
  elementType: ClickAwayListener,
19537
19562
  externalForwardedProps,
19538
19563
  getSlotProps: (handlers2) => ({
@@ -19579,6 +19604,9 @@ const Snackbar = /* @__PURE__ */ reactExports.forwardRef(function Snackbar2(inPr
19579
19604
  }
19580
19605
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ClickAwaySlot, {
19581
19606
  ...clickAwayListenerProps,
19607
+ ...slots.clickAwayListener && {
19608
+ ownerState: clickAwayOwnerStateProp
19609
+ },
19582
19610
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(Root, {
19583
19611
  ...rootProps,
19584
19612
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(TransitionSlot, {
@@ -20422,6 +20450,8 @@ const Switch = /* @__PURE__ */ reactExports.forwardRef(function Switch2(inProps,
20422
20450
  edge = false,
20423
20451
  size = "medium",
20424
20452
  sx,
20453
+ slots = {},
20454
+ slotProps = {},
20425
20455
  ...other
20426
20456
  } = props;
20427
20457
  const ownerState = {
@@ -20431,14 +20461,36 @@ const Switch = /* @__PURE__ */ reactExports.forwardRef(function Switch2(inProps,
20431
20461
  size
20432
20462
  };
20433
20463
  const classes = useUtilityClasses$4(ownerState);
20434
- const icon = /* @__PURE__ */ jsxRuntimeExports.jsx(SwitchThumb, {
20464
+ const externalForwardedProps = {
20465
+ slots,
20466
+ slotProps
20467
+ };
20468
+ const [RootSlot, rootSlotProps] = useSlot("root", {
20469
+ className: clsx(classes.root, className),
20470
+ elementType: SwitchRoot,
20471
+ externalForwardedProps,
20472
+ ownerState,
20473
+ additionalProps: {
20474
+ sx
20475
+ }
20476
+ });
20477
+ const [ThumbSlot, thumbSlotProps] = useSlot("thumb", {
20435
20478
  className: classes.thumb,
20479
+ elementType: SwitchThumb,
20480
+ externalForwardedProps,
20436
20481
  ownerState
20437
20482
  });
20438
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(SwitchRoot, {
20439
- className: clsx(classes.root, className),
20440
- sx,
20441
- ownerState,
20483
+ const icon = /* @__PURE__ */ jsxRuntimeExports.jsx(ThumbSlot, {
20484
+ ...thumbSlotProps
20485
+ });
20486
+ const [TrackSlot, trackSlotProps] = useSlot("track", {
20487
+ className: classes.track,
20488
+ elementType: SwitchTrack,
20489
+ externalForwardedProps,
20490
+ ownerState
20491
+ });
20492
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(RootSlot, {
20493
+ ...rootSlotProps,
20442
20494
  children: [/* @__PURE__ */ jsxRuntimeExports.jsx(SwitchSwitchBase, {
20443
20495
  type: "checkbox",
20444
20496
  icon,
@@ -20449,10 +20501,25 @@ const Switch = /* @__PURE__ */ reactExports.forwardRef(function Switch2(inProps,
20449
20501
  classes: {
20450
20502
  ...classes,
20451
20503
  root: classes.switchBase
20504
+ },
20505
+ slots: {
20506
+ ...slots.switchBase && {
20507
+ root: slots.switchBase
20508
+ },
20509
+ ...slots.input && {
20510
+ input: slots.input
20511
+ }
20512
+ },
20513
+ slotProps: {
20514
+ ...slotProps.switchBase && {
20515
+ root: typeof slotProps.switchBase === "function" ? slotProps.switchBase(ownerState) : slotProps.switchBase
20516
+ },
20517
+ ...slotProps.input && {
20518
+ input: typeof slotProps.input === "function" ? slotProps.input(ownerState) : slotProps.input
20519
+ }
20452
20520
  }
20453
- }), /* @__PURE__ */ jsxRuntimeExports.jsx(SwitchTrack, {
20454
- className: classes.track,
20455
- ownerState
20521
+ }), /* @__PURE__ */ jsxRuntimeExports.jsx(TrackSlot, {
20522
+ ...trackSlotProps
20456
20523
  })]
20457
20524
  });
20458
20525
  });
@@ -21524,6 +21591,9 @@ const Tabs = /* @__PURE__ */ reactExports.forwardRef(function Tabs2(inProps, ref
21524
21591
  });
21525
21592
  });
21526
21593
  const handleKeyDown = (event) => {
21594
+ if (event.altKey || event.shiftKey || event.ctrlKey || event.metaKey) {
21595
+ return;
21596
+ }
21527
21597
  const list2 = tabListRef.current;
21528
21598
  const currentFocus = ownerDocument(list2).activeElement;
21529
21599
  const role = currentFocus.getAttribute("role");
@@ -21716,6 +21786,25 @@ const TextField = /* @__PURE__ */ reactExports.forwardRef(function TextField2(in
21716
21786
  }
21717
21787
  inputAdditionalProps["aria-describedby"] = void 0;
21718
21788
  }
21789
+ const [RootSlot, rootProps] = useSlot("root", {
21790
+ elementType: TextFieldRoot,
21791
+ shouldForwardComponentProp: true,
21792
+ externalForwardedProps: {
21793
+ ...externalForwardedProps,
21794
+ ...other
21795
+ },
21796
+ ownerState,
21797
+ className: clsx(classes.root, className),
21798
+ ref,
21799
+ additionalProps: {
21800
+ disabled,
21801
+ error,
21802
+ fullWidth,
21803
+ required,
21804
+ color: color2,
21805
+ variant
21806
+ }
21807
+ });
21719
21808
  const [InputSlot, inputProps] = useSlot("input", {
21720
21809
  elementType: InputComponent,
21721
21810
  externalForwardedProps,
@@ -21767,17 +21856,8 @@ const TextField = /* @__PURE__ */ reactExports.forwardRef(function TextField2(in
21767
21856
  },
21768
21857
  ...inputProps
21769
21858
  });
21770
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(TextFieldRoot, {
21771
- className: clsx(classes.root, className),
21772
- disabled,
21773
- error,
21774
- fullWidth,
21775
- ref,
21776
- required,
21777
- color: color2,
21778
- variant,
21779
- ownerState,
21780
- ...other,
21859
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(RootSlot, {
21860
+ ...rootProps,
21781
21861
  children: [label != null && label !== "" && /* @__PURE__ */ jsxRuntimeExports.jsx(InputLabelSlot, {
21782
21862
  htmlFor: id,
21783
21863
  id: inputLabelId,
@@ -47885,7 +47965,7 @@ const AttachmentsPreview = ({
47885
47965
  };
47886
47966
  const ButtonContainer$1 = styled$1(Box)(() => ({
47887
47967
  position: "absolute",
47888
- top: -60,
47968
+ bottom: 80,
47889
47969
  // Position above the message input
47890
47970
  right: 20,
47891
47971
  zIndex: 1e3,
@@ -48079,7 +48159,7 @@ const InputOuterContainer = styled$1(Box)(({ theme }) => ({
48079
48159
  backgroundColor: theme.palette.messagesView.background
48080
48160
  }));
48081
48161
  const InputInnerContainer = styled$1(Box)(({ theme }) => ({
48082
- width: "900px",
48162
+ width: "100%",
48083
48163
  maxWidth: "900px",
48084
48164
  margin: "0 auto",
48085
48165
  display: "flex",
@@ -48093,16 +48173,13 @@ const InputInnerContainer = styled$1(Box)(({ theme }) => ({
48093
48173
  transition: "box-shadow 0.2s ease-in-out, outline 0.2s ease-in-out",
48094
48174
  boxSizing: "border-box",
48095
48175
  [theme.breakpoints.down("sm")]: {
48096
- maxWidth: "100%",
48097
- width: "100%"
48176
+ maxWidth: "100%"
48098
48177
  },
48099
48178
  [theme.breakpoints.between("sm", "md")]: {
48100
- maxWidth: "90%",
48101
- width: "90%"
48179
+ maxWidth: "90%"
48102
48180
  },
48103
48181
  [theme.breakpoints.up("md")]: {
48104
- maxWidth: "900px",
48105
- width: "900px"
48182
+ maxWidth: "900px"
48106
48183
  },
48107
48184
  // When the input inside is focused, add an outline instead of increasing border thickness
48108
48185
  "&:has(.MuiOutlinedInput-root.Mui-focused)": {
@@ -48117,16 +48194,13 @@ const SuggestionsContainer = styled$1(Box)(({ theme }) => ({
48117
48194
  margin: "0 auto",
48118
48195
  marginTop: theme.spacing(4),
48119
48196
  [theme.breakpoints.down("sm")]: {
48120
- maxWidth: "100%",
48121
- width: "100%"
48197
+ maxWidth: "100%"
48122
48198
  },
48123
48199
  [theme.breakpoints.between("sm", "md")]: {
48124
- maxWidth: "90%",
48125
- width: "90%"
48200
+ maxWidth: "90%"
48126
48201
  },
48127
48202
  [theme.breakpoints.up("md")]: {
48128
- maxWidth: "900px",
48129
- width: "900px"
48203
+ maxWidth: "900px"
48130
48204
  }
48131
48205
  }));
48132
48206
  const SuggestionChip = styled$1(Button)(({ theme }) => ({
@@ -48137,9 +48211,14 @@ const SuggestionChip = styled$1(Button)(({ theme }) => ({
48137
48211
  paddingRight: theme.spacing(1.5),
48138
48212
  paddingTop: theme.spacing(0.5),
48139
48213
  paddingBottom: theme.spacing(0.5),
48140
- whiteSpace: "nowrap",
48214
+ whiteSpace: "normal",
48215
+ // allow wrapping instead of nowrap
48216
+ wordBreak: "break-word",
48217
+ // break long words if needed
48141
48218
  variant: "outlined",
48142
48219
  size: "small",
48220
+ maxWidth: "100%",
48221
+ // ensure chip doesn't overflow container
48143
48222
  ...theme.palette.mode === "light" && {
48144
48223
  backgroundColor: alpha(theme.palette.primary.main, 0.15),
48145
48224
  color: darken(theme.palette.primary.main, 0.4),
@@ -48510,15 +48589,6 @@ const useStreamingMessagesStore = create$1(
48510
48589
  }
48511
48590
  })
48512
48591
  );
48513
- function _objectWithoutPropertiesLoose(r, e) {
48514
- if (null == r) return {};
48515
- var t = {};
48516
- for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
48517
- if (-1 !== e.indexOf(n)) continue;
48518
- t[n] = r[n];
48519
- }
48520
- return t;
48521
- }
48522
48592
  function _objectWithoutProperties(e, t) {
48523
48593
  if (null == e) return {};
48524
48594
  var o, r, i = _objectWithoutPropertiesLoose(e, t);
@@ -48582,15 +48652,6 @@ function _defineProperty(e, r, t) {
48582
48652
  writable: true
48583
48653
  }) : e[r] = t, e;
48584
48654
  }
48585
- function _extends() {
48586
- return _extends = Object.assign ? Object.assign.bind() : function(n) {
48587
- for (var e = 1; e < arguments.length; e++) {
48588
- var t = arguments[e];
48589
- for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
48590
- }
48591
- return n;
48592
- }, _extends.apply(null, arguments);
48593
- }
48594
48655
  function ownKeys$1(e, r) {
48595
48656
  var t = Object.keys(e);
48596
48657
  if (Object.getOwnPropertySymbols) {
@@ -48691,7 +48752,7 @@ function createElement(_ref) {
48691
48752
  });
48692
48753
  }
48693
48754
  var children = childrenCreator(node2.children);
48694
- return /* @__PURE__ */ React$1.createElement(TagName, _extends({
48755
+ return /* @__PURE__ */ React$1.createElement(TagName, _extends$2({
48695
48756
  key
48696
48757
  }, props), children);
48697
48758
  }
@@ -85339,7 +85400,7 @@ var unitlessKeys = {
85339
85400
  strokeWidth: 1
85340
85401
  };
85341
85402
  var define_process_env_default = {};
85342
- var f = "undefined" != typeof process && void 0 !== define_process_env_default && (define_process_env_default.REACT_APP_SC_ATTR || define_process_env_default.SC_ATTR) || "data-styled", m = "active", y = "data-styled-version", v = "6.1.15", g = "/*!sc*/\n", S$1 = "undefined" != typeof window && "HTMLElement" in window, w = Boolean("boolean" == typeof SC_DISABLE_SPEEDY ? SC_DISABLE_SPEEDY : "undefined" != typeof process && void 0 !== define_process_env_default && void 0 !== define_process_env_default.REACT_APP_SC_DISABLE_SPEEDY && "" !== define_process_env_default.REACT_APP_SC_DISABLE_SPEEDY ? "false" !== define_process_env_default.REACT_APP_SC_DISABLE_SPEEDY && define_process_env_default.REACT_APP_SC_DISABLE_SPEEDY : "undefined" != typeof process && void 0 !== define_process_env_default && void 0 !== define_process_env_default.SC_DISABLE_SPEEDY && "" !== define_process_env_default.SC_DISABLE_SPEEDY ? "false" !== define_process_env_default.SC_DISABLE_SPEEDY && define_process_env_default.SC_DISABLE_SPEEDY : false), b = {}, _ = Object.freeze([]), C = Object.freeze({});
85403
+ var f = "undefined" != typeof process && void 0 !== define_process_env_default && (define_process_env_default.REACT_APP_SC_ATTR || define_process_env_default.SC_ATTR) || "data-styled", m = "active", y = "data-styled-version", v = "6.1.17", g = "/*!sc*/\n", S$1 = "undefined" != typeof window && "HTMLElement" in window, w = Boolean("boolean" == typeof SC_DISABLE_SPEEDY ? SC_DISABLE_SPEEDY : "undefined" != typeof process && void 0 !== define_process_env_default && void 0 !== define_process_env_default.REACT_APP_SC_DISABLE_SPEEDY && "" !== define_process_env_default.REACT_APP_SC_DISABLE_SPEEDY ? "false" !== define_process_env_default.REACT_APP_SC_DISABLE_SPEEDY && define_process_env_default.REACT_APP_SC_DISABLE_SPEEDY : "undefined" != typeof process && void 0 !== define_process_env_default && void 0 !== define_process_env_default.SC_DISABLE_SPEEDY && "" !== define_process_env_default.SC_DISABLE_SPEEDY ? "false" !== define_process_env_default.SC_DISABLE_SPEEDY && define_process_env_default.SC_DISABLE_SPEEDY : false), b = {}, _ = Object.freeze([]), C = Object.freeze({});
85343
85404
  function I(e2, t2, n2) {
85344
85405
  return void 0 === n2 && (n2 = C), e2.theme !== n2.theme && e2.theme || t2 || n2.theme;
85345
85406
  }