@nebula.js/stardust 5.0.0-alpha.1 → 5.0.0-alpha.2

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/core/esm/dev.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*
2
- * @nebula.js/stardust v5.0.0-alpha.1
3
- * Copyright (c) 2023 QlikTech International AB
2
+ * @nebula.js/stardust v5.0.0-alpha.2
3
+ * Copyright (c) 2024 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
6
6
 
@@ -8,8 +8,8 @@ import * as React from 'react';
8
8
  import React__default, { useState as useState$1, useEffect as useEffect$1, forwardRef, useMemo as useMemo$1, useImperativeHandle as useImperativeHandle$1, useContext, useReducer, useCallback, useLayoutEffect as useLayoutEffect$1, PureComponent, useRef, createElement, Component } from 'react';
9
9
  import ReactDOM from 'react-dom';
10
10
  import { CacheProvider, ThemeContext as ThemeContext$2 } from '@emotion/react';
11
- import { Checkbox, Radio, Typography, FormControlLabel, Box, Grid, Tooltip, Paper, IconButton, styled as styled$4, Popover, MenuList, MenuItem, ListItemIcon, Divider, OutlinedInput, InputAdornment, Badge, List, ListItem, Button, Icon, CircularProgress } from '@mui/material';
12
- import styled$3 from '@emotion/styled';
11
+ import { Checkbox, Radio, Typography, FormControlLabel, Box, Grid, Tooltip, Paper, IconButton, styled as styled$3, Popover, MenuList, MenuItem, ListItemIcon, Divider, OutlinedInput, InputAdornment, Badge, List, ListItem, Button, Icon, CircularProgress } from '@mui/material';
12
+ import styled$2 from '@emotion/styled';
13
13
 
14
14
  function getDefaultExportFromCjs (x) {
15
15
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
@@ -3824,65 +3824,14 @@ var m$1 = ReactDOM;
3824
3824
  client.hydrateRoot = m$1.hydrateRoot;
3825
3825
  }
3826
3826
 
3827
- function _extends$4() {
3828
- _extends$4 = Object.assign ? Object.assign.bind() : function (target) {
3829
- for (var i = 1; i < arguments.length; i++) {
3830
- var source = arguments[i];
3831
- for (var key in source) {
3832
- if (Object.prototype.hasOwnProperty.call(source, key)) {
3833
- target[key] = source[key];
3834
- }
3835
- }
3836
- }
3837
- return target;
3838
- };
3839
- return _extends$4.apply(this, arguments);
3840
- }
3841
-
3842
- function isPlainObject(item) {
3843
- return item !== null && typeof item === 'object' && item.constructor === Object;
3844
- }
3845
- function deepClone(source) {
3846
- if (!isPlainObject(source)) {
3847
- return source;
3848
- }
3849
- const output = {};
3850
- Object.keys(source).forEach(key => {
3851
- output[key] = deepClone(source[key]);
3852
- });
3853
- return output;
3854
- }
3855
- function deepmerge(target, source, options = {
3856
- clone: true
3857
- }) {
3858
- const output = options.clone ? _extends$4({}, target) : target;
3859
- if (isPlainObject(target) && isPlainObject(source)) {
3860
- Object.keys(source).forEach(key => {
3861
- // Avoid prototype pollution
3862
- if (key === '__proto__') {
3863
- return;
3864
- }
3865
- if (isPlainObject(source[key]) && key in target && isPlainObject(target[key])) {
3866
- // Since `output` is a clone of `target` and we have narrowed `target` in this block we can cast to the same type.
3867
- output[key] = deepmerge(target[key], source[key], options);
3868
- } else if (options.clone) {
3869
- output[key] = isPlainObject(source[key]) ? deepClone(source[key]) : source[key];
3870
- } else {
3871
- output[key] = source[key];
3872
- }
3873
- });
3874
- }
3875
- return output;
3876
- }
3877
-
3878
3827
  /**
3879
3828
  * WARNING: Don't import this directly.
3880
- * Use `MuiError` from `@mui/utils/macros/MuiError.macro` instead.
3829
+ * Use `MuiError` from `@mui-internal/babel-macros/MuiError.macro` instead.
3881
3830
  * @param {number} code
3882
3831
  */
3883
3832
  function formatMuiErrorMessage(code) {
3884
3833
  // Apply babel-plugin-transform-template-literals in loose mode
3885
- // loose mode is safe iff we're concatenating primitives
3834
+ // loose mode is safe if we're concatenating primitives
3886
3835
  // see https://babeljs.io/docs/en/babel-plugin-transform-template-literals#loose
3887
3836
  /* eslint-disable prefer-template */
3888
3837
  let url = 'https://mui.com/production-error/?code=' + code;
@@ -3895,920 +3844,462 @@ function formatMuiErrorMessage(code) {
3895
3844
  /* eslint-enable prefer-template */
3896
3845
  }
3897
3846
 
3898
- // It should to be noted that this function isn't equivalent to `text-transform: capitalize`.
3899
- //
3900
- // A strict capitalization should uppercase the first letter of each word in the sentence.
3901
- // We only handle the first word.
3902
- function capitalize(string) {
3903
- if (typeof string !== 'string') {
3904
- throw new Error(formatMuiErrorMessage(7));
3905
- }
3906
- return string.charAt(0).toUpperCase() + string.slice(1);
3907
- }
3847
+ var THEME_ID = '$$material';
3908
3848
 
3909
- /**
3910
- * Safe chained function.
3911
- *
3912
- * Will only create a new function if needed,
3913
- * otherwise will pass back existing functions or null.
3914
- */
3915
- function createChainedFunction(...funcs) {
3916
- return funcs.reduce((acc, func) => {
3917
- if (func == null) {
3918
- return acc;
3849
+ function _extends$4() {
3850
+ _extends$4 = Object.assign ? Object.assign.bind() : function (target) {
3851
+ for (var i = 1; i < arguments.length; i++) {
3852
+ var source = arguments[i];
3853
+ for (var key in source) {
3854
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
3855
+ target[key] = source[key];
3856
+ }
3857
+ }
3919
3858
  }
3920
- return function chainedFunction(...args) {
3921
- acc.apply(this, args);
3922
- func.apply(this, args);
3923
- };
3924
- }, () => {});
3925
- }
3926
-
3927
- // Corresponds to 10 frames at 60 Hz.
3928
- // A few bytes payload overhead when lodash/debounce is ~3 kB and debounce ~300 B.
3929
- function debounce(func, wait = 166) {
3930
- let timeout;
3931
- function debounced(...args) {
3932
- const later = () => {
3933
- // @ts-ignore
3934
- func.apply(this, args);
3935
- };
3936
- clearTimeout(timeout);
3937
- timeout = setTimeout(later, wait);
3938
- }
3939
- debounced.clear = () => {
3940
- clearTimeout(timeout);
3859
+ return target;
3941
3860
  };
3942
- return debounced;
3861
+ return _extends$4.apply(this, arguments);
3943
3862
  }
3944
3863
 
3945
- function deprecatedPropType(validator, reason) {
3946
- {
3947
- return () => null;
3864
+ function _objectWithoutPropertiesLoose$1(source, excluded) {
3865
+ if (source == null) return {};
3866
+ var target = {};
3867
+ var sourceKeys = Object.keys(source);
3868
+ var key, i;
3869
+ for (i = 0; i < sourceKeys.length; i++) {
3870
+ key = sourceKeys[i];
3871
+ if (excluded.indexOf(key) >= 0) continue;
3872
+ target[key] = source[key];
3948
3873
  }
3874
+ return target;
3949
3875
  }
3950
3876
 
3951
- function isMuiElement(element, muiNames) {
3952
- var _muiName, _element$type;
3953
- return /*#__PURE__*/React.isValidElement(element) && muiNames.indexOf( // For server components `muiName` is avaialble in element.type._payload.value.muiName
3954
- // relevant info - https://github.com/facebook/react/blob/2807d781a08db8e9873687fccc25c0f12b4fb3d4/packages/react/src/ReactLazy.js#L45
3955
- // eslint-disable-next-line no-underscore-dangle
3956
- (_muiName = element.type.muiName) != null ? _muiName : (_element$type = element.type) == null || (_element$type = _element$type._payload) == null || (_element$type = _element$type.value) == null ? void 0 : _element$type.muiName) !== -1;
3957
- }
3877
+ /*
3958
3878
 
3959
- function ownerDocument(node) {
3960
- return node && node.ownerDocument || document;
3961
- }
3879
+ Based off glamor's StyleSheet, thanks Sunil ❤️
3962
3880
 
3963
- function ownerWindow(node) {
3964
- const doc = ownerDocument(node);
3965
- return doc.defaultView || window;
3966
- }
3881
+ high performance StyleSheet for css-in-js systems
3967
3882
 
3968
- function requirePropFactory(componentNameInError, Component) {
3969
- {
3970
- return () => null;
3971
- }
3972
- }
3883
+ - uses multiple style tags behind the scenes for millions of rules
3884
+ - uses `insertRule` for appending in production for *much* faster performance
3973
3885
 
3974
- /**
3975
- * TODO v5: consider making it private
3976
- *
3977
- * passes {value} to {ref}
3978
- *
3979
- * WARNING: Be sure to only call this inside a callback that is passed as a ref.
3980
- * Otherwise, make sure to cleanup the previous {ref} if it changes. See
3981
- * https://github.com/mui/material-ui/issues/13539
3982
- *
3983
- * Useful if you want to expose the ref of an inner component to the public API
3984
- * while still using it inside the component.
3985
- * @param ref A ref callback or ref object. If anything falsy, this is a no-op.
3986
- */
3987
- function setRef(ref, value) {
3988
- if (typeof ref === 'function') {
3989
- ref(value);
3990
- } else if (ref) {
3991
- ref.current = value;
3992
- }
3993
- }
3886
+ // usage
3994
3887
 
3995
- /**
3996
- * A version of `React.useLayoutEffect` that does not show a warning when server-side rendering.
3997
- * This is useful for effects that are only needed for client-side rendering but not for SSR.
3998
- *
3999
- * Before you use this hook, make sure to read https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85
4000
- * and confirm it doesn't apply to your use-case.
4001
- */
4002
- const useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
4003
- var useEnhancedEffect$1 = useEnhancedEffect;
3888
+ import { StyleSheet } from '@emotion/sheet'
4004
3889
 
4005
- let globalId = 0;
4006
- function useGlobalId(idOverride) {
4007
- const [defaultId, setDefaultId] = React.useState(idOverride);
4008
- const id = idOverride || defaultId;
4009
- React.useEffect(() => {
4010
- if (defaultId == null) {
4011
- // Fallback to this default id when possible.
4012
- // Use the incrementing value for client-side rendering only.
4013
- // We can't use it server-side.
4014
- // If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem
4015
- globalId += 1;
4016
- setDefaultId(`mui-${globalId}`);
4017
- }
4018
- }, [defaultId]);
4019
- return id;
4020
- }
3890
+ let styleSheet = new StyleSheet({ key: '', container: document.head })
4021
3891
 
4022
- // downstream bundlers may remove unnecessary concatenation, but won't remove toString call -- Workaround for https://github.com/webpack/webpack/issues/14814
4023
- const maybeReactUseId = React['useId'.toString()];
4024
- /**
4025
- *
4026
- * @example <div id={useId()} />
4027
- * @param idOverride
4028
- * @returns {string}
4029
- */
4030
- function useId(idOverride) {
4031
- if (maybeReactUseId !== undefined) {
4032
- const reactId = maybeReactUseId();
4033
- return idOverride != null ? idOverride : reactId;
3892
+ styleSheet.insert('#box { border: 1px solid red; }')
3893
+ - appends a css rule into the stylesheet
3894
+
3895
+ styleSheet.flush()
3896
+ - empties the stylesheet of all its contents
3897
+
3898
+ */
3899
+ // $FlowFixMe
3900
+ function sheetForTag(tag) {
3901
+ if (tag.sheet) {
3902
+ // $FlowFixMe
3903
+ return tag.sheet;
3904
+ } // this weirdness brought to you by firefox
3905
+
3906
+ /* istanbul ignore next */
3907
+
3908
+
3909
+ for (var i = 0; i < document.styleSheets.length; i++) {
3910
+ if (document.styleSheets[i].ownerNode === tag) {
3911
+ // $FlowFixMe
3912
+ return document.styleSheets[i];
3913
+ }
4034
3914
  }
4035
- // eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime.
4036
- return useGlobalId(idOverride);
4037
3915
  }
4038
3916
 
4039
- function unsupportedProp(props, propName, componentName, location, propFullName) {
4040
- {
4041
- return null;
3917
+ function createStyleElement(options) {
3918
+ var tag = document.createElement('style');
3919
+ tag.setAttribute('data-emotion', options.key);
3920
+
3921
+ if (options.nonce !== undefined) {
3922
+ tag.setAttribute('nonce', options.nonce);
4042
3923
  }
4043
- }
4044
3924
 
4045
- function useControlled({
4046
- controlled,
4047
- default: defaultProp,
4048
- name,
4049
- state = 'value'
4050
- }) {
4051
- // isControlled is ignored in the hook dependency lists as it should never change.
4052
- const {
4053
- current: isControlled
4054
- } = React.useRef(controlled !== undefined);
4055
- const [valueState, setValue] = React.useState(defaultProp);
4056
- const value = isControlled ? controlled : valueState;
4057
- const setValueIfUncontrolled = React.useCallback(newValue => {
4058
- if (!isControlled) {
4059
- setValue(newValue);
4060
- }
4061
- }, []);
4062
- return [value, setValueIfUncontrolled];
3925
+ tag.appendChild(document.createTextNode(''));
3926
+ tag.setAttribute('data-s', '');
3927
+ return tag;
4063
3928
  }
4064
3929
 
3930
+ var StyleSheet = /*#__PURE__*/function () {
3931
+ // Using Node instead of HTMLElement since container may be a ShadowRoot
3932
+ function StyleSheet(options) {
3933
+ var _this = this;
3934
+
3935
+ this._insertTag = function (tag) {
3936
+ var before;
3937
+
3938
+ if (_this.tags.length === 0) {
3939
+ if (_this.insertionPoint) {
3940
+ before = _this.insertionPoint.nextSibling;
3941
+ } else if (_this.prepend) {
3942
+ before = _this.container.firstChild;
3943
+ } else {
3944
+ before = _this.before;
3945
+ }
3946
+ } else {
3947
+ before = _this.tags[_this.tags.length - 1].nextSibling;
3948
+ }
3949
+
3950
+ _this.container.insertBefore(tag, before);
3951
+
3952
+ _this.tags.push(tag);
3953
+ };
3954
+
3955
+ this.isSpeedy = options.speedy === undefined ? "production" === 'production' : options.speedy;
3956
+ this.tags = [];
3957
+ this.ctr = 0;
3958
+ this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets
3959
+
3960
+ this.key = options.key;
3961
+ this.container = options.container;
3962
+ this.prepend = options.prepend;
3963
+ this.insertionPoint = options.insertionPoint;
3964
+ this.before = null;
3965
+ }
3966
+
3967
+ var _proto = StyleSheet.prototype;
3968
+
3969
+ _proto.hydrate = function hydrate(nodes) {
3970
+ nodes.forEach(this._insertTag);
3971
+ };
3972
+
3973
+ _proto.insert = function insert(rule) {
3974
+ // the max length is how many rules we have per style tag, it's 65000 in speedy mode
3975
+ // it's 1 in dev because we insert source maps that map a single rule to a location
3976
+ // and you can only have one source map per style tag
3977
+ if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) {
3978
+ this._insertTag(createStyleElement(this));
3979
+ }
3980
+
3981
+ var tag = this.tags[this.tags.length - 1];
3982
+
3983
+ if (this.isSpeedy) {
3984
+ var sheet = sheetForTag(tag);
3985
+
3986
+ try {
3987
+ // this is the ultrafast version, works across browsers
3988
+ // the big drawback is that the css won't be editable in devtools
3989
+ sheet.insertRule(rule, sheet.cssRules.length);
3990
+ } catch (e) {
3991
+ }
3992
+ } else {
3993
+ tag.appendChild(document.createTextNode(rule));
3994
+ }
3995
+
3996
+ this.ctr++;
3997
+ };
3998
+
3999
+ _proto.flush = function flush() {
4000
+ // $FlowFixMe
4001
+ this.tags.forEach(function (tag) {
4002
+ return tag.parentNode && tag.parentNode.removeChild(tag);
4003
+ });
4004
+ this.tags = [];
4005
+ this.ctr = 0;
4006
+ };
4007
+
4008
+ return StyleSheet;
4009
+ }();
4010
+
4011
+ var MS = '-ms-';
4012
+ var MOZ = '-moz-';
4013
+ var WEBKIT = '-webkit-';
4014
+
4015
+ var COMMENT = 'comm';
4016
+ var RULESET = 'rule';
4017
+ var DECLARATION = 'decl';
4018
+ var IMPORT = '@import';
4019
+ var KEYFRAMES = '@keyframes';
4020
+ var LAYER = '@layer';
4021
+
4065
4022
  /**
4066
- * Inspired by https://github.com/facebook/react/issues/14099#issuecomment-440013892
4067
- * See RFC in https://github.com/reactjs/rfcs/pull/220
4023
+ * @param {number}
4024
+ * @return {number}
4068
4025
  */
4026
+ var abs = Math.abs;
4069
4027
 
4070
- function useEventCallback(fn) {
4071
- const ref = React.useRef(fn);
4072
- useEnhancedEffect$1(() => {
4073
- ref.current = fn;
4074
- });
4075
- return React.useRef((...args) =>
4076
- // @ts-expect-error hide `this`
4077
- (0, ref.current)(...args)).current;
4078
- }
4028
+ /**
4029
+ * @param {number}
4030
+ * @return {string}
4031
+ */
4032
+ var from = String.fromCharCode;
4079
4033
 
4080
- function useForkRef(...refs) {
4081
- /**
4082
- * This will create a new function if the refs passed to this hook change and are all defined.
4083
- * This means react will call the old forkRef with `null` and the new forkRef
4084
- * with the ref. Cleanup naturally emerges from this behavior.
4085
- */
4086
- return React.useMemo(() => {
4087
- if (refs.every(ref => ref == null)) {
4088
- return null;
4089
- }
4090
- return instance => {
4091
- refs.forEach(ref => {
4092
- setRef(ref, instance);
4093
- });
4094
- };
4095
- // eslint-disable-next-line react-hooks/exhaustive-deps
4096
- }, refs);
4097
- }
4034
+ /**
4035
+ * @param {object}
4036
+ * @return {object}
4037
+ */
4038
+ var assign = Object.assign;
4098
4039
 
4099
- let hadKeyboardEvent = true;
4100
- let hadFocusVisibleRecently = false;
4101
- let hadFocusVisibleRecentlyTimeout;
4102
- const inputTypesWhitelist = {
4103
- text: true,
4104
- search: true,
4105
- url: true,
4106
- tel: true,
4107
- email: true,
4108
- password: true,
4109
- number: true,
4110
- date: true,
4111
- month: true,
4112
- week: true,
4113
- time: true,
4114
- datetime: true,
4115
- 'datetime-local': true
4116
- };
4040
+ /**
4041
+ * @param {string} value
4042
+ * @param {number} length
4043
+ * @return {number}
4044
+ */
4045
+ function hash (value, length) {
4046
+ return charat(value, 0) ^ 45 ? (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3) : 0
4047
+ }
4117
4048
 
4118
4049
  /**
4119
- * Computes whether the given element should automatically trigger the
4120
- * `focus-visible` class being added, i.e. whether it should always match
4121
- * `:focus-visible` when focused.
4122
- * @param {Element} node
4123
- * @returns {boolean}
4050
+ * @param {string} value
4051
+ * @return {string}
4124
4052
  */
4125
- function focusTriggersKeyboardModality(node) {
4126
- const {
4127
- type,
4128
- tagName
4129
- } = node;
4130
- if (tagName === 'INPUT' && inputTypesWhitelist[type] && !node.readOnly) {
4131
- return true;
4132
- }
4133
- if (tagName === 'TEXTAREA' && !node.readOnly) {
4134
- return true;
4135
- }
4136
- if (node.isContentEditable) {
4137
- return true;
4138
- }
4139
- return false;
4053
+ function trim$1 (value) {
4054
+ return value.trim()
4140
4055
  }
4141
4056
 
4142
4057
  /**
4143
- * Keep track of our keyboard modality state with `hadKeyboardEvent`.
4144
- * If the most recent user interaction was via the keyboard;
4145
- * and the key press did not include a meta, alt/option, or control key;
4146
- * then the modality is keyboard. Otherwise, the modality is not keyboard.
4147
- * @param {KeyboardEvent} event
4058
+ * @param {string} value
4059
+ * @param {RegExp} pattern
4060
+ * @return {string?}
4148
4061
  */
4149
- function handleKeyDown(event) {
4150
- if (event.metaKey || event.altKey || event.ctrlKey) {
4151
- return;
4152
- }
4153
- hadKeyboardEvent = true;
4062
+ function match (value, pattern) {
4063
+ return (value = pattern.exec(value)) ? value[0] : value
4154
4064
  }
4155
4065
 
4156
4066
  /**
4157
- * If at any point a user clicks with a pointing device, ensure that we change
4158
- * the modality away from keyboard.
4159
- * This avoids the situation where a user presses a key on an already focused
4160
- * element, and then clicks on a different element, focusing it with a
4161
- * pointing device, while we still think we're in keyboard modality.
4067
+ * @param {string} value
4068
+ * @param {(string|RegExp)} pattern
4069
+ * @param {string} replacement
4070
+ * @return {string}
4162
4071
  */
4163
- function handlePointerDown() {
4164
- hadKeyboardEvent = false;
4072
+ function replace (value, pattern, replacement) {
4073
+ return value.replace(pattern, replacement)
4165
4074
  }
4166
- function handleVisibilityChange() {
4167
- if (this.visibilityState === 'hidden') {
4168
- // If the tab becomes active again, the browser will handle calling focus
4169
- // on the element (Safari actually calls it twice).
4170
- // If this tab change caused a blur on an element with focus-visible,
4171
- // re-apply the class when the user switches back to the tab.
4172
- if (hadFocusVisibleRecently) {
4173
- hadKeyboardEvent = true;
4174
- }
4175
- }
4075
+
4076
+ /**
4077
+ * @param {string} value
4078
+ * @param {string} search
4079
+ * @return {number}
4080
+ */
4081
+ function indexof (value, search) {
4082
+ return value.indexOf(search)
4176
4083
  }
4177
- function prepare(doc) {
4178
- doc.addEventListener('keydown', handleKeyDown, true);
4179
- doc.addEventListener('mousedown', handlePointerDown, true);
4180
- doc.addEventListener('pointerdown', handlePointerDown, true);
4181
- doc.addEventListener('touchstart', handlePointerDown, true);
4182
- doc.addEventListener('visibilitychange', handleVisibilityChange, true);
4084
+
4085
+ /**
4086
+ * @param {string} value
4087
+ * @param {number} index
4088
+ * @return {number}
4089
+ */
4090
+ function charat (value, index) {
4091
+ return value.charCodeAt(index) | 0
4183
4092
  }
4184
- function isFocusVisible(event) {
4185
- const {
4186
- target
4187
- } = event;
4188
- try {
4189
- return target.matches(':focus-visible');
4190
- } catch (error) {
4191
- // Browsers not implementing :focus-visible will throw a SyntaxError.
4192
- // We use our own heuristic for those browsers.
4193
- // Rethrow might be better if it's not the expected error but do we really
4194
- // want to crash if focus-visible malfunctioned?
4195
- }
4196
4093
 
4197
- // No need for validFocusTarget check. The user does that by attaching it to
4198
- // focusable events only.
4199
- return hadKeyboardEvent || focusTriggersKeyboardModality(target);
4094
+ /**
4095
+ * @param {string} value
4096
+ * @param {number} begin
4097
+ * @param {number} end
4098
+ * @return {string}
4099
+ */
4100
+ function substr (value, begin, end) {
4101
+ return value.slice(begin, end)
4200
4102
  }
4201
- function useIsFocusVisible() {
4202
- const ref = React.useCallback(node => {
4203
- if (node != null) {
4204
- prepare(node.ownerDocument);
4205
- }
4206
- }, []);
4207
- const isFocusVisibleRef = React.useRef(false);
4208
4103
 
4209
- /**
4210
- * Should be called if a blur event is fired
4211
- */
4212
- function handleBlurVisible() {
4213
- // checking against potential state variable does not suffice if we focus and blur synchronously.
4214
- // React wouldn't have time to trigger a re-render so `focusVisible` would be stale.
4215
- // Ideally we would adjust `isFocusVisible(event)` to look at `relatedTarget` for blur events.
4216
- // This doesn't work in IE11 due to https://github.com/facebook/react/issues/3751
4217
- // TODO: check again if React releases their internal changes to focus event handling (https://github.com/facebook/react/pull/19186).
4218
- if (isFocusVisibleRef.current) {
4219
- // To detect a tab/window switch, we look for a blur event followed
4220
- // rapidly by a visibility change.
4221
- // If we don't see a visibility change within 100ms, it's probably a
4222
- // regular focus change.
4223
- hadFocusVisibleRecently = true;
4224
- window.clearTimeout(hadFocusVisibleRecentlyTimeout);
4225
- hadFocusVisibleRecentlyTimeout = window.setTimeout(() => {
4226
- hadFocusVisibleRecently = false;
4227
- }, 100);
4228
- isFocusVisibleRef.current = false;
4229
- return true;
4230
- }
4231
- return false;
4232
- }
4104
+ /**
4105
+ * @param {string} value
4106
+ * @return {number}
4107
+ */
4108
+ function strlen (value) {
4109
+ return value.length
4110
+ }
4233
4111
 
4234
- /**
4235
- * Should be called if a blur event is fired
4236
- */
4237
- function handleFocusVisible(event) {
4238
- if (isFocusVisible(event)) {
4239
- isFocusVisibleRef.current = true;
4240
- return true;
4241
- }
4242
- return false;
4243
- }
4244
- return {
4245
- isFocusVisibleRef,
4246
- onFocus: handleFocusVisible,
4247
- onBlur: handleBlurVisible,
4248
- ref
4249
- };
4112
+ /**
4113
+ * @param {any[]} value
4114
+ * @return {number}
4115
+ */
4116
+ function sizeof (value) {
4117
+ return value.length
4250
4118
  }
4251
4119
 
4252
4120
  /**
4253
- * Add keys, values of `defaultProps` that does not exist in `props`
4254
- * @param {object} defaultProps
4255
- * @param {object} props
4256
- * @returns {object} resolved props
4121
+ * @param {any} value
4122
+ * @param {any[]} array
4123
+ * @return {any}
4257
4124
  */
4258
- function resolveProps(defaultProps, props) {
4259
- const output = _extends$4({}, props);
4260
- Object.keys(defaultProps).forEach(propName => {
4261
- if (propName.toString().match(/^(components|slots)$/)) {
4262
- output[propName] = _extends$4({}, defaultProps[propName], output[propName]);
4263
- } else if (propName.toString().match(/^(componentsProps|slotProps)$/)) {
4264
- const defaultSlotProps = defaultProps[propName] || {};
4265
- const slotProps = props[propName];
4266
- output[propName] = {};
4267
- if (!slotProps || !Object.keys(slotProps)) {
4268
- // Reduce the iteration if the slot props is empty
4269
- output[propName] = defaultSlotProps;
4270
- } else if (!defaultSlotProps || !Object.keys(defaultSlotProps)) {
4271
- // Reduce the iteration if the default slot props is empty
4272
- output[propName] = slotProps;
4273
- } else {
4274
- output[propName] = _extends$4({}, slotProps);
4275
- Object.keys(defaultSlotProps).forEach(slotPropName => {
4276
- output[propName][slotPropName] = resolveProps(defaultSlotProps[slotPropName], slotProps[slotPropName]);
4277
- });
4278
- }
4279
- } else if (output[propName] === undefined) {
4280
- output[propName] = defaultProps[propName];
4281
- }
4282
- });
4283
- return output;
4125
+ function append (value, array) {
4126
+ return array.push(value), value
4284
4127
  }
4285
4128
 
4286
- function composeClasses(slots, getUtilityClass, classes = undefined) {
4287
- const output = {};
4288
- Object.keys(slots).forEach(
4289
- // `Object.keys(slots)` can't be wider than `T` because we infer `T` from `slots`.
4290
- // @ts-expect-error https://github.com/microsoft/TypeScript/pull/12253#issuecomment-263132208
4291
- slot => {
4292
- output[slot] = slots[slot].reduce((acc, key) => {
4293
- if (key) {
4294
- const utilityClass = getUtilityClass(key);
4295
- if (utilityClass !== '') {
4296
- acc.push(utilityClass);
4297
- }
4298
- if (classes && classes[key]) {
4299
- acc.push(classes[key]);
4300
- }
4301
- }
4302
- return acc;
4303
- }, []).join(' ');
4304
- });
4305
- return output;
4129
+ /**
4130
+ * @param {string[]} array
4131
+ * @param {function} callback
4132
+ * @return {string}
4133
+ */
4134
+ function combine (array, callback) {
4135
+ return array.map(callback).join('')
4306
4136
  }
4307
4137
 
4308
- const defaultGenerator = componentName => componentName;
4309
- const createClassNameGenerator = () => {
4310
- let generate = defaultGenerator;
4311
- return {
4312
- configure(generator) {
4313
- generate = generator;
4314
- },
4315
- generate(componentName) {
4316
- return generate(componentName);
4317
- },
4318
- reset() {
4319
- generate = defaultGenerator;
4320
- }
4321
- };
4322
- };
4323
- const ClassNameGenerator = createClassNameGenerator();
4324
- var ClassNameGenerator$1 = ClassNameGenerator;
4138
+ var line = 1;
4139
+ var column = 1;
4140
+ var length = 0;
4141
+ var position = 0;
4142
+ var character = 0;
4143
+ var characters = '';
4325
4144
 
4326
- // If GlobalStateSlot is changed, GLOBAL_STATE_CLASSES in
4327
- // \packages\api-docs-builder\utils\parseSlotsAndClasses.ts must be updated accordingly.
4145
+ /**
4146
+ * @param {string} value
4147
+ * @param {object | null} root
4148
+ * @param {object | null} parent
4149
+ * @param {string} type
4150
+ * @param {string[] | string} props
4151
+ * @param {object[] | string} children
4152
+ * @param {number} length
4153
+ */
4154
+ function node (value, root, parent, type, props, children, length) {
4155
+ return {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: ''}
4156
+ }
4328
4157
 
4329
- const globalStateClassesMapping = {
4330
- active: 'active',
4331
- checked: 'checked',
4332
- completed: 'completed',
4333
- disabled: 'disabled',
4334
- error: 'error',
4335
- expanded: 'expanded',
4336
- focused: 'focused',
4337
- focusVisible: 'focusVisible',
4338
- open: 'open',
4339
- readOnly: 'readOnly',
4340
- required: 'required',
4341
- selected: 'selected'
4342
- };
4343
- function generateUtilityClass(componentName, slot, globalStatePrefix = 'Mui') {
4344
- const globalStateClass = globalStateClassesMapping[slot];
4345
- return globalStateClass ? `${globalStatePrefix}-${globalStateClass}` : `${ClassNameGenerator$1.generate(componentName)}-${slot}`;
4158
+ /**
4159
+ * @param {object} root
4160
+ * @param {object} props
4161
+ * @return {object}
4162
+ */
4163
+ function copy (root, props) {
4164
+ return assign(node('', null, null, '', null, null, 0), root, {length: -root.length}, props)
4346
4165
  }
4347
4166
 
4348
- function generateUtilityClasses(componentName, slots, globalStatePrefix = 'Mui') {
4349
- const result = {};
4350
- slots.forEach(slot => {
4351
- result[slot] = generateUtilityClass(componentName, slot, globalStatePrefix);
4352
- });
4353
- return result;
4167
+ /**
4168
+ * @return {number}
4169
+ */
4170
+ function char () {
4171
+ return character
4354
4172
  }
4355
4173
 
4356
- var THEME_ID = '$$material';
4174
+ /**
4175
+ * @return {number}
4176
+ */
4177
+ function prev () {
4178
+ character = position > 0 ? charat(characters, --position) : 0;
4357
4179
 
4358
- function _extends$3() {
4359
- _extends$3 = Object.assign ? Object.assign.bind() : function (target) {
4360
- for (var i = 1; i < arguments.length; i++) {
4361
- var source = arguments[i];
4362
- for (var key in source) {
4363
- if (Object.prototype.hasOwnProperty.call(source, key)) {
4364
- target[key] = source[key];
4365
- }
4366
- }
4367
- }
4368
- return target;
4369
- };
4370
- return _extends$3.apply(this, arguments);
4371
- }
4180
+ if (column--, character === 10)
4181
+ column = 1, line--;
4372
4182
 
4373
- function _objectWithoutPropertiesLoose$1(source, excluded) {
4374
- if (source == null) return {};
4375
- var target = {};
4376
- var sourceKeys = Object.keys(source);
4377
- var key, i;
4378
- for (i = 0; i < sourceKeys.length; i++) {
4379
- key = sourceKeys[i];
4380
- if (excluded.indexOf(key) >= 0) continue;
4381
- target[key] = source[key];
4382
- }
4383
- return target;
4183
+ return character
4384
4184
  }
4385
4185
 
4386
- /*
4387
-
4388
- Based off glamor's StyleSheet, thanks Sunil ❤️
4186
+ /**
4187
+ * @return {number}
4188
+ */
4189
+ function next () {
4190
+ character = position < length ? charat(characters, position++) : 0;
4389
4191
 
4390
- high performance StyleSheet for css-in-js systems
4192
+ if (column++, character === 10)
4193
+ column = 1, line++;
4391
4194
 
4392
- - uses multiple style tags behind the scenes for millions of rules
4393
- - uses `insertRule` for appending in production for *much* faster performance
4195
+ return character
4196
+ }
4394
4197
 
4395
- // usage
4396
-
4397
- import { StyleSheet } from '@emotion/sheet'
4398
-
4399
- let styleSheet = new StyleSheet({ key: '', container: document.head })
4400
-
4401
- styleSheet.insert('#box { border: 1px solid red; }')
4402
- - appends a css rule into the stylesheet
4403
-
4404
- styleSheet.flush()
4405
- - empties the stylesheet of all its contents
4406
-
4407
- */
4408
- // $FlowFixMe
4409
- function sheetForTag(tag) {
4410
- if (tag.sheet) {
4411
- // $FlowFixMe
4412
- return tag.sheet;
4413
- } // this weirdness brought to you by firefox
4414
-
4415
- /* istanbul ignore next */
4416
-
4417
-
4418
- for (var i = 0; i < document.styleSheets.length; i++) {
4419
- if (document.styleSheets[i].ownerNode === tag) {
4420
- // $FlowFixMe
4421
- return document.styleSheets[i];
4422
- }
4423
- }
4424
- }
4425
-
4426
- function createStyleElement(options) {
4427
- var tag = document.createElement('style');
4428
- tag.setAttribute('data-emotion', options.key);
4429
-
4430
- if (options.nonce !== undefined) {
4431
- tag.setAttribute('nonce', options.nonce);
4432
- }
4433
-
4434
- tag.appendChild(document.createTextNode(''));
4435
- tag.setAttribute('data-s', '');
4436
- return tag;
4437
- }
4438
-
4439
- var StyleSheet = /*#__PURE__*/function () {
4440
- // Using Node instead of HTMLElement since container may be a ShadowRoot
4441
- function StyleSheet(options) {
4442
- var _this = this;
4443
-
4444
- this._insertTag = function (tag) {
4445
- var before;
4446
-
4447
- if (_this.tags.length === 0) {
4448
- if (_this.insertionPoint) {
4449
- before = _this.insertionPoint.nextSibling;
4450
- } else if (_this.prepend) {
4451
- before = _this.container.firstChild;
4452
- } else {
4453
- before = _this.before;
4454
- }
4455
- } else {
4456
- before = _this.tags[_this.tags.length - 1].nextSibling;
4457
- }
4458
-
4459
- _this.container.insertBefore(tag, before);
4460
-
4461
- _this.tags.push(tag);
4462
- };
4463
-
4464
- this.isSpeedy = options.speedy === undefined ? "production" === 'production' : options.speedy;
4465
- this.tags = [];
4466
- this.ctr = 0;
4467
- this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets
4468
-
4469
- this.key = options.key;
4470
- this.container = options.container;
4471
- this.prepend = options.prepend;
4472
- this.insertionPoint = options.insertionPoint;
4473
- this.before = null;
4474
- }
4475
-
4476
- var _proto = StyleSheet.prototype;
4477
-
4478
- _proto.hydrate = function hydrate(nodes) {
4479
- nodes.forEach(this._insertTag);
4480
- };
4481
-
4482
- _proto.insert = function insert(rule) {
4483
- // the max length is how many rules we have per style tag, it's 65000 in speedy mode
4484
- // it's 1 in dev because we insert source maps that map a single rule to a location
4485
- // and you can only have one source map per style tag
4486
- if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) {
4487
- this._insertTag(createStyleElement(this));
4488
- }
4489
-
4490
- var tag = this.tags[this.tags.length - 1];
4491
-
4492
- if (this.isSpeedy) {
4493
- var sheet = sheetForTag(tag);
4494
-
4495
- try {
4496
- // this is the ultrafast version, works across browsers
4497
- // the big drawback is that the css won't be editable in devtools
4498
- sheet.insertRule(rule, sheet.cssRules.length);
4499
- } catch (e) {
4500
- }
4501
- } else {
4502
- tag.appendChild(document.createTextNode(rule));
4503
- }
4504
-
4505
- this.ctr++;
4506
- };
4507
-
4508
- _proto.flush = function flush() {
4509
- // $FlowFixMe
4510
- this.tags.forEach(function (tag) {
4511
- return tag.parentNode && tag.parentNode.removeChild(tag);
4512
- });
4513
- this.tags = [];
4514
- this.ctr = 0;
4515
- };
4516
-
4517
- return StyleSheet;
4518
- }();
4519
-
4520
- var MS = '-ms-';
4521
- var MOZ = '-moz-';
4522
- var WEBKIT = '-webkit-';
4523
-
4524
- var COMMENT = 'comm';
4525
- var RULESET = 'rule';
4526
- var DECLARATION = 'decl';
4527
- var IMPORT = '@import';
4528
- var KEYFRAMES = '@keyframes';
4529
- var LAYER = '@layer';
4198
+ /**
4199
+ * @return {number}
4200
+ */
4201
+ function peek () {
4202
+ return charat(characters, position)
4203
+ }
4530
4204
 
4531
4205
  /**
4532
- * @param {number}
4533
4206
  * @return {number}
4534
4207
  */
4535
- var abs = Math.abs;
4208
+ function caret () {
4209
+ return position
4210
+ }
4536
4211
 
4537
4212
  /**
4538
- * @param {number}
4213
+ * @param {number} begin
4214
+ * @param {number} end
4539
4215
  * @return {string}
4540
4216
  */
4541
- var from = String.fromCharCode;
4542
-
4543
- /**
4544
- * @param {object}
4545
- * @return {object}
4546
- */
4547
- var assign = Object.assign;
4217
+ function slice (begin, end) {
4218
+ return substr(characters, begin, end)
4219
+ }
4548
4220
 
4549
4221
  /**
4550
- * @param {string} value
4551
- * @param {number} length
4222
+ * @param {number} type
4552
4223
  * @return {number}
4553
4224
  */
4554
- function hash (value, length) {
4555
- return charat(value, 0) ^ 45 ? (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3) : 0
4225
+ function token (type) {
4226
+ switch (type) {
4227
+ // \0 \t \n \r \s whitespace token
4228
+ case 0: case 9: case 10: case 13: case 32:
4229
+ return 5
4230
+ // ! + , / > @ ~ isolate token
4231
+ case 33: case 43: case 44: case 47: case 62: case 64: case 126:
4232
+ // ; { } breakpoint token
4233
+ case 59: case 123: case 125:
4234
+ return 4
4235
+ // : accompanied token
4236
+ case 58:
4237
+ return 3
4238
+ // " ' ( [ opening delimit token
4239
+ case 34: case 39: case 40: case 91:
4240
+ return 2
4241
+ // ) ] closing delimit token
4242
+ case 41: case 93:
4243
+ return 1
4244
+ }
4245
+
4246
+ return 0
4556
4247
  }
4557
4248
 
4558
4249
  /**
4559
4250
  * @param {string} value
4560
- * @return {string}
4251
+ * @return {any[]}
4561
4252
  */
4562
- function trim$1 (value) {
4563
- return value.trim()
4253
+ function alloc (value) {
4254
+ return line = column = 1, length = strlen(characters = value), position = 0, []
4564
4255
  }
4565
4256
 
4566
4257
  /**
4567
- * @param {string} value
4568
- * @param {RegExp} pattern
4569
- * @return {string?}
4258
+ * @param {any} value
4259
+ * @return {any}
4570
4260
  */
4571
- function match (value, pattern) {
4572
- return (value = pattern.exec(value)) ? value[0] : value
4261
+ function dealloc (value) {
4262
+ return characters = '', value
4573
4263
  }
4574
4264
 
4575
4265
  /**
4576
- * @param {string} value
4577
- * @param {(string|RegExp)} pattern
4578
- * @param {string} replacement
4266
+ * @param {number} type
4579
4267
  * @return {string}
4580
4268
  */
4581
- function replace (value, pattern, replacement) {
4582
- return value.replace(pattern, replacement)
4269
+ function delimit (type) {
4270
+ return trim$1(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))
4583
4271
  }
4584
4272
 
4585
4273
  /**
4586
- * @param {string} value
4587
- * @param {string} search
4588
- * @return {number}
4274
+ * @param {number} type
4275
+ * @return {string}
4589
4276
  */
4590
- function indexof (value, search) {
4591
- return value.indexOf(search)
4592
- }
4277
+ function whitespace (type) {
4278
+ while (character = peek())
4279
+ if (character < 33)
4280
+ next();
4281
+ else
4282
+ break
4593
4283
 
4594
- /**
4595
- * @param {string} value
4596
- * @param {number} index
4597
- * @return {number}
4598
- */
4599
- function charat (value, index) {
4600
- return value.charCodeAt(index) | 0
4284
+ return token(type) > 2 || token(character) > 3 ? '' : ' '
4601
4285
  }
4602
4286
 
4603
4287
  /**
4604
- * @param {string} value
4605
- * @param {number} begin
4606
- * @param {number} end
4288
+ * @param {number} index
4289
+ * @param {number} count
4607
4290
  * @return {string}
4608
4291
  */
4609
- function substr (value, begin, end) {
4610
- return value.slice(begin, end)
4611
- }
4292
+ function escaping (index, count) {
4293
+ while (--count && next())
4294
+ // not 0-9 A-F a-f
4295
+ if (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97))
4296
+ break
4612
4297
 
4613
- /**
4614
- * @param {string} value
4615
- * @return {number}
4616
- */
4617
- function strlen (value) {
4618
- return value.length
4298
+ return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32))
4619
4299
  }
4620
4300
 
4621
4301
  /**
4622
- * @param {any[]} value
4623
- * @return {number}
4624
- */
4625
- function sizeof (value) {
4626
- return value.length
4627
- }
4628
-
4629
- /**
4630
- * @param {any} value
4631
- * @param {any[]} array
4632
- * @return {any}
4633
- */
4634
- function append (value, array) {
4635
- return array.push(value), value
4636
- }
4637
-
4638
- /**
4639
- * @param {string[]} array
4640
- * @param {function} callback
4641
- * @return {string}
4642
- */
4643
- function combine (array, callback) {
4644
- return array.map(callback).join('')
4645
- }
4646
-
4647
- var line = 1;
4648
- var column = 1;
4649
- var length = 0;
4650
- var position = 0;
4651
- var character = 0;
4652
- var characters = '';
4653
-
4654
- /**
4655
- * @param {string} value
4656
- * @param {object | null} root
4657
- * @param {object | null} parent
4658
- * @param {string} type
4659
- * @param {string[] | string} props
4660
- * @param {object[] | string} children
4661
- * @param {number} length
4662
- */
4663
- function node (value, root, parent, type, props, children, length) {
4664
- return {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: ''}
4665
- }
4666
-
4667
- /**
4668
- * @param {object} root
4669
- * @param {object} props
4670
- * @return {object}
4671
- */
4672
- function copy (root, props) {
4673
- return assign(node('', null, null, '', null, null, 0), root, {length: -root.length}, props)
4674
- }
4675
-
4676
- /**
4677
- * @return {number}
4678
- */
4679
- function char () {
4680
- return character
4681
- }
4682
-
4683
- /**
4684
- * @return {number}
4685
- */
4686
- function prev () {
4687
- character = position > 0 ? charat(characters, --position) : 0;
4688
-
4689
- if (column--, character === 10)
4690
- column = 1, line--;
4691
-
4692
- return character
4693
- }
4694
-
4695
- /**
4696
- * @return {number}
4697
- */
4698
- function next () {
4699
- character = position < length ? charat(characters, position++) : 0;
4700
-
4701
- if (column++, character === 10)
4702
- column = 1, line++;
4703
-
4704
- return character
4705
- }
4706
-
4707
- /**
4708
- * @return {number}
4709
- */
4710
- function peek () {
4711
- return charat(characters, position)
4712
- }
4713
-
4714
- /**
4715
- * @return {number}
4716
- */
4717
- function caret () {
4718
- return position
4719
- }
4720
-
4721
- /**
4722
- * @param {number} begin
4723
- * @param {number} end
4724
- * @return {string}
4725
- */
4726
- function slice (begin, end) {
4727
- return substr(characters, begin, end)
4728
- }
4729
-
4730
- /**
4731
- * @param {number} type
4732
- * @return {number}
4733
- */
4734
- function token (type) {
4735
- switch (type) {
4736
- // \0 \t \n \r \s whitespace token
4737
- case 0: case 9: case 10: case 13: case 32:
4738
- return 5
4739
- // ! + , / > @ ~ isolate token
4740
- case 33: case 43: case 44: case 47: case 62: case 64: case 126:
4741
- // ; { } breakpoint token
4742
- case 59: case 123: case 125:
4743
- return 4
4744
- // : accompanied token
4745
- case 58:
4746
- return 3
4747
- // " ' ( [ opening delimit token
4748
- case 34: case 39: case 40: case 91:
4749
- return 2
4750
- // ) ] closing delimit token
4751
- case 41: case 93:
4752
- return 1
4753
- }
4754
-
4755
- return 0
4756
- }
4757
-
4758
- /**
4759
- * @param {string} value
4760
- * @return {any[]}
4761
- */
4762
- function alloc (value) {
4763
- return line = column = 1, length = strlen(characters = value), position = 0, []
4764
- }
4765
-
4766
- /**
4767
- * @param {any} value
4768
- * @return {any}
4769
- */
4770
- function dealloc (value) {
4771
- return characters = '', value
4772
- }
4773
-
4774
- /**
4775
- * @param {number} type
4776
- * @return {string}
4777
- */
4778
- function delimit (type) {
4779
- return trim$1(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))
4780
- }
4781
-
4782
- /**
4783
- * @param {number} type
4784
- * @return {string}
4785
- */
4786
- function whitespace (type) {
4787
- while (character = peek())
4788
- if (character < 33)
4789
- next();
4790
- else
4791
- break
4792
-
4793
- return token(type) > 2 || token(character) > 3 ? '' : ' '
4794
- }
4795
-
4796
- /**
4797
- * @param {number} index
4798
- * @param {number} count
4799
- * @return {string}
4800
- */
4801
- function escaping (index, count) {
4802
- while (--count && next())
4803
- // not 0-9 A-F a-f
4804
- if (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97))
4805
- break
4806
-
4807
- return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32))
4808
- }
4809
-
4810
- /**
4811
- * @param {number} type
4302
+ * @param {number} type
4812
4303
  * @return {number}
4813
4304
  */
4814
4305
  function delimiter (type) {
@@ -5641,80 +5132,588 @@ var reactJsxRuntime_production_min = {};
5641
5132
  * This source code is licensed under the MIT license found in the
5642
5133
  * LICENSE file in the root directory of this source tree.
5643
5134
  */
5644
- var f=React__default,k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};
5645
- function q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=""+g);void 0!==a.key&&(e=""+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return {$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}reactJsxRuntime_production_min.Fragment=l;reactJsxRuntime_production_min.jsx=q;reactJsxRuntime_production_min.jsxs=q;
5135
+ var f=React__default,k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};
5136
+ function q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=""+g);void 0!==a.key&&(e=""+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return {$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}reactJsxRuntime_production_min.Fragment=l;reactJsxRuntime_production_min.jsx=q;reactJsxRuntime_production_min.jsxs=q;
5137
+
5138
+ {
5139
+ jsxRuntime.exports = reactJsxRuntime_production_min;
5140
+ }
5141
+
5142
+ var jsxRuntimeExports = jsxRuntime.exports;
5143
+
5144
+ let cache$1;
5145
+ if (typeof document === 'object') {
5146
+ cache$1 = createCache({
5147
+ key: 'css',
5148
+ prepend: true
5149
+ });
5150
+ }
5151
+ function StyledEngineProvider(props) {
5152
+ const {
5153
+ injectFirst,
5154
+ children
5155
+ } = props;
5156
+ return injectFirst && cache$1 ? /*#__PURE__*/jsxRuntimeExports.jsx(CacheProvider, {
5157
+ value: cache$1,
5158
+ children: children
5159
+ }) : children;
5160
+ }
5161
+
5162
+ /**
5163
+ * @mui/styled-engine v5.15.2
5164
+ *
5165
+ * @license MIT
5166
+ * This source code is licensed under the MIT license found in the
5167
+ * LICENSE file in the root directory of this source tree.
5168
+ */
5169
+ function styled$1(tag, options) {
5170
+ const stylesFactory = styled$2(tag, options);
5171
+ return stylesFactory;
5172
+ }
5173
+
5174
+ // eslint-disable-next-line @typescript-eslint/naming-convention
5175
+ const internal_processStyles = (tag, processor) => {
5176
+ // Emotion attaches all the styles as `__emotion_styles`.
5177
+ // Ref: https://github.com/emotion-js/emotion/blob/16d971d0da229596d6bcc39d282ba9753c9ee7cf/packages/styled/src/base.js#L186
5178
+ if (Array.isArray(tag.__emotion_styles)) {
5179
+ tag.__emotion_styles = processor(tag.__emotion_styles);
5180
+ }
5181
+ };
5182
+
5183
+ function _extends$3() {
5184
+ _extends$3 = Object.assign ? Object.assign.bind() : function (target) {
5185
+ for (var i = 1; i < arguments.length; i++) {
5186
+ var source = arguments[i];
5187
+ for (var key in source) {
5188
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
5189
+ target[key] = source[key];
5190
+ }
5191
+ }
5192
+ }
5193
+ return target;
5194
+ };
5195
+ return _extends$3.apply(this, arguments);
5196
+ }
5197
+
5198
+ function _objectWithoutPropertiesLoose(source, excluded) {
5199
+ if (source == null) return {};
5200
+ var target = {};
5201
+ var sourceKeys = Object.keys(source);
5202
+ var key, i;
5203
+ for (i = 0; i < sourceKeys.length; i++) {
5204
+ key = sourceKeys[i];
5205
+ if (excluded.indexOf(key) >= 0) continue;
5206
+ target[key] = source[key];
5207
+ }
5208
+ return target;
5209
+ }
5210
+
5211
+ function _extends$2() {
5212
+ _extends$2 = Object.assign ? Object.assign.bind() : function (target) {
5213
+ for (var i = 1; i < arguments.length; i++) {
5214
+ var source = arguments[i];
5215
+ for (var key in source) {
5216
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
5217
+ target[key] = source[key];
5218
+ }
5219
+ }
5220
+ }
5221
+ return target;
5222
+ };
5223
+ return _extends$2.apply(this, arguments);
5224
+ }
5225
+
5226
+ function isPlainObject(item) {
5227
+ return item !== null && typeof item === 'object' && item.constructor === Object;
5228
+ }
5229
+ function deepClone(source) {
5230
+ if (!isPlainObject(source)) {
5231
+ return source;
5232
+ }
5233
+ const output = {};
5234
+ Object.keys(source).forEach(key => {
5235
+ output[key] = deepClone(source[key]);
5236
+ });
5237
+ return output;
5238
+ }
5239
+ function deepmerge(target, source, options = {
5240
+ clone: true
5241
+ }) {
5242
+ const output = options.clone ? _extends$2({}, target) : target;
5243
+ if (isPlainObject(target) && isPlainObject(source)) {
5244
+ Object.keys(source).forEach(key => {
5245
+ // Avoid prototype pollution
5246
+ if (key === '__proto__') {
5247
+ return;
5248
+ }
5249
+ if (isPlainObject(source[key]) && key in target && isPlainObject(target[key])) {
5250
+ // Since `output` is a clone of `target` and we have narrowed `target` in this block we can cast to the same type.
5251
+ output[key] = deepmerge(target[key], source[key], options);
5252
+ } else if (options.clone) {
5253
+ output[key] = isPlainObject(source[key]) ? deepClone(source[key]) : source[key];
5254
+ } else {
5255
+ output[key] = source[key];
5256
+ }
5257
+ });
5258
+ }
5259
+ return output;
5260
+ }
5261
+
5262
+ // It should to be noted that this function isn't equivalent to `text-transform: capitalize`.
5263
+ //
5264
+ // A strict capitalization should uppercase the first letter of each word in the sentence.
5265
+ // We only handle the first word.
5266
+ function capitalize(string) {
5267
+ if (typeof string !== 'string') {
5268
+ throw new Error(formatMuiErrorMessage(7));
5269
+ }
5270
+ return string.charAt(0).toUpperCase() + string.slice(1);
5271
+ }
5272
+
5273
+ /**
5274
+ * Safe chained function.
5275
+ *
5276
+ * Will only create a new function if needed,
5277
+ * otherwise will pass back existing functions or null.
5278
+ */
5279
+ function createChainedFunction(...funcs) {
5280
+ return funcs.reduce((acc, func) => {
5281
+ if (func == null) {
5282
+ return acc;
5283
+ }
5284
+ return function chainedFunction(...args) {
5285
+ acc.apply(this, args);
5286
+ func.apply(this, args);
5287
+ };
5288
+ }, () => {});
5289
+ }
5290
+
5291
+ // Corresponds to 10 frames at 60 Hz.
5292
+ // A few bytes payload overhead when lodash/debounce is ~3 kB and debounce ~300 B.
5293
+ function debounce(func, wait = 166) {
5294
+ let timeout;
5295
+ function debounced(...args) {
5296
+ const later = () => {
5297
+ // @ts-ignore
5298
+ func.apply(this, args);
5299
+ };
5300
+ clearTimeout(timeout);
5301
+ timeout = setTimeout(later, wait);
5302
+ }
5303
+ debounced.clear = () => {
5304
+ clearTimeout(timeout);
5305
+ };
5306
+ return debounced;
5307
+ }
5308
+
5309
+ function deprecatedPropType(validator, reason) {
5310
+ {
5311
+ return () => null;
5312
+ }
5313
+ }
5314
+
5315
+ function isMuiElement(element, muiNames) {
5316
+ var _muiName, _element$type;
5317
+ return /*#__PURE__*/React.isValidElement(element) && muiNames.indexOf( // For server components `muiName` is avaialble in element.type._payload.value.muiName
5318
+ // relevant info - https://github.com/facebook/react/blob/2807d781a08db8e9873687fccc25c0f12b4fb3d4/packages/react/src/ReactLazy.js#L45
5319
+ // eslint-disable-next-line no-underscore-dangle
5320
+ (_muiName = element.type.muiName) != null ? _muiName : (_element$type = element.type) == null || (_element$type = _element$type._payload) == null || (_element$type = _element$type.value) == null ? void 0 : _element$type.muiName) !== -1;
5321
+ }
5322
+
5323
+ function ownerDocument(node) {
5324
+ return node && node.ownerDocument || document;
5325
+ }
5326
+
5327
+ function ownerWindow(node) {
5328
+ const doc = ownerDocument(node);
5329
+ return doc.defaultView || window;
5330
+ }
5331
+
5332
+ function requirePropFactory(componentNameInError, Component) {
5333
+ {
5334
+ return () => null;
5335
+ }
5336
+ }
5337
+
5338
+ /**
5339
+ * TODO v5: consider making it private
5340
+ *
5341
+ * passes {value} to {ref}
5342
+ *
5343
+ * WARNING: Be sure to only call this inside a callback that is passed as a ref.
5344
+ * Otherwise, make sure to cleanup the previous {ref} if it changes. See
5345
+ * https://github.com/mui/material-ui/issues/13539
5346
+ *
5347
+ * Useful if you want to expose the ref of an inner component to the public API
5348
+ * while still using it inside the component.
5349
+ * @param ref A ref callback or ref object. If anything falsy, this is a no-op.
5350
+ */
5351
+ function setRef(ref, value) {
5352
+ if (typeof ref === 'function') {
5353
+ ref(value);
5354
+ } else if (ref) {
5355
+ ref.current = value;
5356
+ }
5357
+ }
5358
+
5359
+ /**
5360
+ * A version of `React.useLayoutEffect` that does not show a warning when server-side rendering.
5361
+ * This is useful for effects that are only needed for client-side rendering but not for SSR.
5362
+ *
5363
+ * Before you use this hook, make sure to read https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85
5364
+ * and confirm it doesn't apply to your use-case.
5365
+ */
5366
+ const useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
5367
+ var useEnhancedEffect$1 = useEnhancedEffect;
5368
+
5369
+ let globalId = 0;
5370
+ function useGlobalId(idOverride) {
5371
+ const [defaultId, setDefaultId] = React.useState(idOverride);
5372
+ const id = idOverride || defaultId;
5373
+ React.useEffect(() => {
5374
+ if (defaultId == null) {
5375
+ // Fallback to this default id when possible.
5376
+ // Use the incrementing value for client-side rendering only.
5377
+ // We can't use it server-side.
5378
+ // If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem
5379
+ globalId += 1;
5380
+ setDefaultId(`mui-${globalId}`);
5381
+ }
5382
+ }, [defaultId]);
5383
+ return id;
5384
+ }
5385
+
5386
+ // downstream bundlers may remove unnecessary concatenation, but won't remove toString call -- Workaround for https://github.com/webpack/webpack/issues/14814
5387
+ const maybeReactUseId = React['useId'.toString()];
5388
+ /**
5389
+ *
5390
+ * @example <div id={useId()} />
5391
+ * @param idOverride
5392
+ * @returns {string}
5393
+ */
5394
+ function useId(idOverride) {
5395
+ if (maybeReactUseId !== undefined) {
5396
+ const reactId = maybeReactUseId();
5397
+ return idOverride != null ? idOverride : reactId;
5398
+ }
5399
+ // eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime.
5400
+ return useGlobalId(idOverride);
5401
+ }
5402
+
5403
+ function unsupportedProp(props, propName, componentName, location, propFullName) {
5404
+ {
5405
+ return null;
5406
+ }
5407
+ }
5408
+
5409
+ function useControlled({
5410
+ controlled,
5411
+ default: defaultProp,
5412
+ name,
5413
+ state = 'value'
5414
+ }) {
5415
+ // isControlled is ignored in the hook dependency lists as it should never change.
5416
+ const {
5417
+ current: isControlled
5418
+ } = React.useRef(controlled !== undefined);
5419
+ const [valueState, setValue] = React.useState(defaultProp);
5420
+ const value = isControlled ? controlled : valueState;
5421
+ const setValueIfUncontrolled = React.useCallback(newValue => {
5422
+ if (!isControlled) {
5423
+ setValue(newValue);
5424
+ }
5425
+ }, []);
5426
+ return [value, setValueIfUncontrolled];
5427
+ }
5428
+
5429
+ /**
5430
+ * Inspired by https://github.com/facebook/react/issues/14099#issuecomment-440013892
5431
+ * See RFC in https://github.com/reactjs/rfcs/pull/220
5432
+ */
5433
+
5434
+ function useEventCallback(fn) {
5435
+ const ref = React.useRef(fn);
5436
+ useEnhancedEffect$1(() => {
5437
+ ref.current = fn;
5438
+ });
5439
+ return React.useRef((...args) =>
5440
+ // @ts-expect-error hide `this`
5441
+ (0, ref.current)(...args)).current;
5442
+ }
5443
+
5444
+ function useForkRef(...refs) {
5445
+ /**
5446
+ * This will create a new function if the refs passed to this hook change and are all defined.
5447
+ * This means react will call the old forkRef with `null` and the new forkRef
5448
+ * with the ref. Cleanup naturally emerges from this behavior.
5449
+ */
5450
+ return React.useMemo(() => {
5451
+ if (refs.every(ref => ref == null)) {
5452
+ return null;
5453
+ }
5454
+ return instance => {
5455
+ refs.forEach(ref => {
5456
+ setRef(ref, instance);
5457
+ });
5458
+ };
5459
+ // eslint-disable-next-line react-hooks/exhaustive-deps
5460
+ }, refs);
5461
+ }
5462
+
5463
+ let hadKeyboardEvent = true;
5464
+ let hadFocusVisibleRecently = false;
5465
+ let hadFocusVisibleRecentlyTimeout;
5466
+ const inputTypesWhitelist = {
5467
+ text: true,
5468
+ search: true,
5469
+ url: true,
5470
+ tel: true,
5471
+ email: true,
5472
+ password: true,
5473
+ number: true,
5474
+ date: true,
5475
+ month: true,
5476
+ week: true,
5477
+ time: true,
5478
+ datetime: true,
5479
+ 'datetime-local': true
5480
+ };
5481
+
5482
+ /**
5483
+ * Computes whether the given element should automatically trigger the
5484
+ * `focus-visible` class being added, i.e. whether it should always match
5485
+ * `:focus-visible` when focused.
5486
+ * @param {Element} node
5487
+ * @returns {boolean}
5488
+ */
5489
+ function focusTriggersKeyboardModality(node) {
5490
+ const {
5491
+ type,
5492
+ tagName
5493
+ } = node;
5494
+ if (tagName === 'INPUT' && inputTypesWhitelist[type] && !node.readOnly) {
5495
+ return true;
5496
+ }
5497
+ if (tagName === 'TEXTAREA' && !node.readOnly) {
5498
+ return true;
5499
+ }
5500
+ if (node.isContentEditable) {
5501
+ return true;
5502
+ }
5503
+ return false;
5504
+ }
5505
+
5506
+ /**
5507
+ * Keep track of our keyboard modality state with `hadKeyboardEvent`.
5508
+ * If the most recent user interaction was via the keyboard;
5509
+ * and the key press did not include a meta, alt/option, or control key;
5510
+ * then the modality is keyboard. Otherwise, the modality is not keyboard.
5511
+ * @param {KeyboardEvent} event
5512
+ */
5513
+ function handleKeyDown(event) {
5514
+ if (event.metaKey || event.altKey || event.ctrlKey) {
5515
+ return;
5516
+ }
5517
+ hadKeyboardEvent = true;
5518
+ }
5519
+
5520
+ /**
5521
+ * If at any point a user clicks with a pointing device, ensure that we change
5522
+ * the modality away from keyboard.
5523
+ * This avoids the situation where a user presses a key on an already focused
5524
+ * element, and then clicks on a different element, focusing it with a
5525
+ * pointing device, while we still think we're in keyboard modality.
5526
+ */
5527
+ function handlePointerDown() {
5528
+ hadKeyboardEvent = false;
5529
+ }
5530
+ function handleVisibilityChange() {
5531
+ if (this.visibilityState === 'hidden') {
5532
+ // If the tab becomes active again, the browser will handle calling focus
5533
+ // on the element (Safari actually calls it twice).
5534
+ // If this tab change caused a blur on an element with focus-visible,
5535
+ // re-apply the class when the user switches back to the tab.
5536
+ if (hadFocusVisibleRecently) {
5537
+ hadKeyboardEvent = true;
5538
+ }
5539
+ }
5540
+ }
5541
+ function prepare(doc) {
5542
+ doc.addEventListener('keydown', handleKeyDown, true);
5543
+ doc.addEventListener('mousedown', handlePointerDown, true);
5544
+ doc.addEventListener('pointerdown', handlePointerDown, true);
5545
+ doc.addEventListener('touchstart', handlePointerDown, true);
5546
+ doc.addEventListener('visibilitychange', handleVisibilityChange, true);
5547
+ }
5548
+ function isFocusVisible(event) {
5549
+ const {
5550
+ target
5551
+ } = event;
5552
+ try {
5553
+ return target.matches(':focus-visible');
5554
+ } catch (error) {
5555
+ // Browsers not implementing :focus-visible will throw a SyntaxError.
5556
+ // We use our own heuristic for those browsers.
5557
+ // Rethrow might be better if it's not the expected error but do we really
5558
+ // want to crash if focus-visible malfunctioned?
5559
+ }
5646
5560
 
5647
- {
5648
- jsxRuntime.exports = reactJsxRuntime_production_min;
5561
+ // No need for validFocusTarget check. The user does that by attaching it to
5562
+ // focusable events only.
5563
+ return hadKeyboardEvent || focusTriggersKeyboardModality(target);
5649
5564
  }
5565
+ function useIsFocusVisible() {
5566
+ const ref = React.useCallback(node => {
5567
+ if (node != null) {
5568
+ prepare(node.ownerDocument);
5569
+ }
5570
+ }, []);
5571
+ const isFocusVisibleRef = React.useRef(false);
5650
5572
 
5651
- var jsxRuntimeExports = jsxRuntime.exports;
5573
+ /**
5574
+ * Should be called if a blur event is fired
5575
+ */
5576
+ function handleBlurVisible() {
5577
+ // checking against potential state variable does not suffice if we focus and blur synchronously.
5578
+ // React wouldn't have time to trigger a re-render so `focusVisible` would be stale.
5579
+ // Ideally we would adjust `isFocusVisible(event)` to look at `relatedTarget` for blur events.
5580
+ // This doesn't work in IE11 due to https://github.com/facebook/react/issues/3751
5581
+ // TODO: check again if React releases their internal changes to focus event handling (https://github.com/facebook/react/pull/19186).
5582
+ if (isFocusVisibleRef.current) {
5583
+ // To detect a tab/window switch, we look for a blur event followed
5584
+ // rapidly by a visibility change.
5585
+ // If we don't see a visibility change within 100ms, it's probably a
5586
+ // regular focus change.
5587
+ hadFocusVisibleRecently = true;
5588
+ window.clearTimeout(hadFocusVisibleRecentlyTimeout);
5589
+ hadFocusVisibleRecentlyTimeout = window.setTimeout(() => {
5590
+ hadFocusVisibleRecently = false;
5591
+ }, 100);
5592
+ isFocusVisibleRef.current = false;
5593
+ return true;
5594
+ }
5595
+ return false;
5596
+ }
5652
5597
 
5653
- let cache$1;
5654
- if (typeof document === 'object') {
5655
- cache$1 = createCache({
5656
- key: 'css',
5657
- prepend: true
5658
- });
5659
- }
5660
- function StyledEngineProvider(props) {
5661
- const {
5662
- injectFirst,
5663
- children
5664
- } = props;
5665
- return injectFirst && cache$1 ? /*#__PURE__*/jsxRuntimeExports.jsx(CacheProvider, {
5666
- value: cache$1,
5667
- children: children
5668
- }) : children;
5598
+ /**
5599
+ * Should be called if a blur event is fired
5600
+ */
5601
+ function handleFocusVisible(event) {
5602
+ if (isFocusVisible(event)) {
5603
+ isFocusVisibleRef.current = true;
5604
+ return true;
5605
+ }
5606
+ return false;
5607
+ }
5608
+ return {
5609
+ isFocusVisibleRef,
5610
+ onFocus: handleFocusVisible,
5611
+ onBlur: handleBlurVisible,
5612
+ ref
5613
+ };
5669
5614
  }
5670
5615
 
5671
5616
  /**
5672
- * @mui/styled-engine v5.15.0
5673
- *
5674
- * @license MIT
5675
- * This source code is licensed under the MIT license found in the
5676
- * LICENSE file in the root directory of this source tree.
5617
+ * Add keys, values of `defaultProps` that does not exist in `props`
5618
+ * @param {object} defaultProps
5619
+ * @param {object} props
5620
+ * @returns {object} resolved props
5677
5621
  */
5678
- function styled$2(tag, options) {
5679
- const stylesFactory = styled$3(tag, options);
5680
- return stylesFactory;
5622
+ function resolveProps(defaultProps, props) {
5623
+ const output = _extends$2({}, props);
5624
+ Object.keys(defaultProps).forEach(propName => {
5625
+ if (propName.toString().match(/^(components|slots)$/)) {
5626
+ output[propName] = _extends$2({}, defaultProps[propName], output[propName]);
5627
+ } else if (propName.toString().match(/^(componentsProps|slotProps)$/)) {
5628
+ const defaultSlotProps = defaultProps[propName] || {};
5629
+ const slotProps = props[propName];
5630
+ output[propName] = {};
5631
+ if (!slotProps || !Object.keys(slotProps)) {
5632
+ // Reduce the iteration if the slot props is empty
5633
+ output[propName] = defaultSlotProps;
5634
+ } else if (!defaultSlotProps || !Object.keys(defaultSlotProps)) {
5635
+ // Reduce the iteration if the default slot props is empty
5636
+ output[propName] = slotProps;
5637
+ } else {
5638
+ output[propName] = _extends$2({}, slotProps);
5639
+ Object.keys(defaultSlotProps).forEach(slotPropName => {
5640
+ output[propName][slotPropName] = resolveProps(defaultSlotProps[slotPropName], slotProps[slotPropName]);
5641
+ });
5642
+ }
5643
+ } else if (output[propName] === undefined) {
5644
+ output[propName] = defaultProps[propName];
5645
+ }
5646
+ });
5647
+ return output;
5681
5648
  }
5682
5649
 
5683
- // eslint-disable-next-line @typescript-eslint/naming-convention
5684
- const internal_processStyles = (tag, processor) => {
5685
- // Emotion attaches all the styles as `__emotion_styles`.
5686
- // Ref: https://github.com/emotion-js/emotion/blob/16d971d0da229596d6bcc39d282ba9753c9ee7cf/packages/styled/src/base.js#L186
5687
- if (Array.isArray(tag.__emotion_styles)) {
5688
- tag.__emotion_styles = processor(tag.__emotion_styles);
5689
- }
5690
- };
5691
-
5692
- function _extends$2() {
5693
- _extends$2 = Object.assign ? Object.assign.bind() : function (target) {
5694
- for (var i = 1; i < arguments.length; i++) {
5695
- var source = arguments[i];
5696
- for (var key in source) {
5697
- if (Object.prototype.hasOwnProperty.call(source, key)) {
5698
- target[key] = source[key];
5650
+ function composeClasses(slots, getUtilityClass, classes = undefined) {
5651
+ const output = {};
5652
+ Object.keys(slots).forEach(
5653
+ // `Object.keys(slots)` can't be wider than `T` because we infer `T` from `slots`.
5654
+ // @ts-expect-error https://github.com/microsoft/TypeScript/pull/12253#issuecomment-263132208
5655
+ slot => {
5656
+ output[slot] = slots[slot].reduce((acc, key) => {
5657
+ if (key) {
5658
+ const utilityClass = getUtilityClass(key);
5659
+ if (utilityClass !== '') {
5660
+ acc.push(utilityClass);
5661
+ }
5662
+ if (classes && classes[key]) {
5663
+ acc.push(classes[key]);
5699
5664
  }
5700
5665
  }
5666
+ return acc;
5667
+ }, []).join(' ');
5668
+ });
5669
+ return output;
5670
+ }
5671
+
5672
+ const defaultGenerator = componentName => componentName;
5673
+ const createClassNameGenerator = () => {
5674
+ let generate = defaultGenerator;
5675
+ return {
5676
+ configure(generator) {
5677
+ generate = generator;
5678
+ },
5679
+ generate(componentName) {
5680
+ return generate(componentName);
5681
+ },
5682
+ reset() {
5683
+ generate = defaultGenerator;
5701
5684
  }
5702
- return target;
5703
5685
  };
5704
- return _extends$2.apply(this, arguments);
5686
+ };
5687
+ const ClassNameGenerator = createClassNameGenerator();
5688
+
5689
+ // If GlobalStateSlot is changed, GLOBAL_STATE_CLASSES in
5690
+ // \packages\api-docs-builder\utils\parseSlotsAndClasses.ts must be updated accordingly.
5691
+
5692
+ const globalStateClassesMapping = {
5693
+ active: 'active',
5694
+ checked: 'checked',
5695
+ completed: 'completed',
5696
+ disabled: 'disabled',
5697
+ error: 'error',
5698
+ expanded: 'expanded',
5699
+ focused: 'focused',
5700
+ focusVisible: 'focusVisible',
5701
+ open: 'open',
5702
+ readOnly: 'readOnly',
5703
+ required: 'required',
5704
+ selected: 'selected'
5705
+ };
5706
+ function generateUtilityClass(componentName, slot, globalStatePrefix = 'Mui') {
5707
+ const globalStateClass = globalStateClassesMapping[slot];
5708
+ return globalStateClass ? `${globalStatePrefix}-${globalStateClass}` : `${ClassNameGenerator.generate(componentName)}-${slot}`;
5705
5709
  }
5706
5710
 
5707
- function _objectWithoutPropertiesLoose(source, excluded) {
5708
- if (source == null) return {};
5709
- var target = {};
5710
- var sourceKeys = Object.keys(source);
5711
- var key, i;
5712
- for (i = 0; i < sourceKeys.length; i++) {
5713
- key = sourceKeys[i];
5714
- if (excluded.indexOf(key) >= 0) continue;
5715
- target[key] = source[key];
5716
- }
5717
- return target;
5711
+ function generateUtilityClasses(componentName, slots, globalStatePrefix = 'Mui') {
5712
+ const result = {};
5713
+ slots.forEach(slot => {
5714
+ result[slot] = generateUtilityClass(componentName, slot, globalStatePrefix);
5715
+ });
5716
+ return result;
5718
5717
  }
5719
5718
 
5720
5719
  const _excluded$g = ["values", "unit", "step"];
@@ -5726,7 +5725,7 @@ const sortBreakpointsValues = values => {
5726
5725
  // Sort in ascending order
5727
5726
  breakpointsAsArray.sort((breakpoint1, breakpoint2) => breakpoint1.val - breakpoint2.val);
5728
5727
  return breakpointsAsArray.reduce((acc, obj) => {
5729
- return _extends$2({}, acc, {
5728
+ return _extends$3({}, acc, {
5730
5729
  [obj.key]: obj.val
5731
5730
  });
5732
5731
  }, {});
@@ -5783,7 +5782,7 @@ function createBreakpoints(breakpoints) {
5783
5782
  }
5784
5783
  return between(key, keys[keys.indexOf(key) + 1]).replace('@media', '@media not all and');
5785
5784
  }
5786
- return _extends$2({
5785
+ return _extends$3({
5787
5786
  keys,
5788
5787
  values: sortedValues,
5789
5788
  up,
@@ -6724,7 +6723,6 @@ function unstable_createStyleFunctionSx() {
6724
6723
  }
6725
6724
  const styleFunctionSx = unstable_createStyleFunctionSx();
6726
6725
  styleFunctionSx.filterProps = ['sx'];
6727
- var styleFunctionSx$1 = styleFunctionSx;
6728
6726
 
6729
6727
  const _excluded$f = ["breakpoints", "palette", "spacing", "shape"];
6730
6728
  function createTheme$1(options = {}, ...args) {
@@ -6742,16 +6740,16 @@ function createTheme$1(options = {}, ...args) {
6742
6740
  direction: 'ltr',
6743
6741
  components: {},
6744
6742
  // Inject component definitions.
6745
- palette: _extends$2({
6743
+ palette: _extends$3({
6746
6744
  mode: 'light'
6747
6745
  }, paletteInput),
6748
6746
  spacing,
6749
- shape: _extends$2({}, shape$1, shapeInput)
6747
+ shape: _extends$3({}, shape$1, shapeInput)
6750
6748
  }, other);
6751
6749
  muiTheme = args.reduce((acc, argument) => deepmerge(acc, argument), muiTheme);
6752
- muiTheme.unstable_sxConfig = _extends$2({}, defaultSxConfig$1, other == null ? void 0 : other.unstable_sxConfig);
6750
+ muiTheme.unstable_sxConfig = _extends$3({}, defaultSxConfig$1, other == null ? void 0 : other.unstable_sxConfig);
6753
6751
  muiTheme.unstable_sx = function sx(props) {
6754
- return styleFunctionSx$1({
6752
+ return styleFunctionSx({
6755
6753
  sx: props,
6756
6754
  theme: this
6757
6755
  });
@@ -6820,10 +6818,17 @@ const getStyleOverrides = (name, theme) => {
6820
6818
  return null;
6821
6819
  };
6822
6820
  const transformVariants = variants => {
6821
+ let numOfCallbacks = 0;
6823
6822
  const variantsStyles = {};
6824
6823
  if (variants) {
6825
6824
  variants.forEach(definition => {
6826
- const key = propsToClassKey(definition.props);
6825
+ let key = '';
6826
+ if (typeof definition.props === 'function') {
6827
+ key = `callback${numOfCallbacks}`;
6828
+ numOfCallbacks += 1;
6829
+ } else {
6830
+ key = propsToClassKey(definition.props);
6831
+ }
6827
6832
  variantsStyles[key] = definition.style;
6828
6833
  });
6829
6834
  }
@@ -6841,16 +6846,29 @@ const variantsResolver = (props, styles, variants) => {
6841
6846
  ownerState = {}
6842
6847
  } = props;
6843
6848
  const variantsStyles = [];
6849
+ let numOfCallbacks = 0;
6844
6850
  if (variants) {
6845
6851
  variants.forEach(variant => {
6846
6852
  let isMatch = true;
6847
- Object.keys(variant.props).forEach(key => {
6848
- if (ownerState[key] !== variant.props[key] && props[key] !== variant.props[key]) {
6849
- isMatch = false;
6850
- }
6851
- });
6853
+ if (typeof variant.props === 'function') {
6854
+ const propsToCheck = _extends$3({}, props, ownerState);
6855
+ isMatch = variant.props(propsToCheck);
6856
+ } else {
6857
+ Object.keys(variant.props).forEach(key => {
6858
+ if (ownerState[key] !== variant.props[key] && props[key] !== variant.props[key]) {
6859
+ isMatch = false;
6860
+ }
6861
+ });
6862
+ }
6852
6863
  if (isMatch) {
6853
- variantsStyles.push(styles[propsToClassKey(variant.props)]);
6864
+ if (typeof variant.props === 'function') {
6865
+ variantsStyles.push(styles[`callback${numOfCallbacks}`]);
6866
+ } else {
6867
+ variantsStyles.push(styles[propsToClassKey(variant.props)]);
6868
+ }
6869
+ }
6870
+ if (typeof variant.props === 'function') {
6871
+ numOfCallbacks += 1;
6854
6872
  }
6855
6873
  });
6856
6874
  }
@@ -6892,8 +6910,8 @@ const muiStyledFunctionResolver = ({
6892
6910
  defaultTheme,
6893
6911
  themeId
6894
6912
  }) => {
6895
- const resolvedStyles = styledArg(_extends$2({}, props, {
6896
- theme: resolveTheme(_extends$2({}, props, {
6913
+ const resolvedStyles = styledArg(_extends$3({}, props, {
6914
+ theme: resolveTheme(_extends$3({}, props, {
6897
6915
  defaultTheme,
6898
6916
  themeId
6899
6917
  }))
@@ -6917,8 +6935,8 @@ function createStyled(input = {}) {
6917
6935
  slotShouldForwardProp = shouldForwardProp
6918
6936
  } = input;
6919
6937
  const systemSx = props => {
6920
- return styleFunctionSx$1(_extends$2({}, props, {
6921
- theme: resolveTheme(_extends$2({}, props, {
6938
+ return styleFunctionSx(_extends$3({}, props, {
6939
+ theme: resolveTheme(_extends$3({}, props, {
6922
6940
  defaultTheme,
6923
6941
  themeId
6924
6942
  }))
@@ -6959,7 +6977,7 @@ function createStyled(input = {}) {
6959
6977
  // for string (html) tag, preserve the behavior in emotion & styled-components.
6960
6978
  shouldForwardPropOption = undefined;
6961
6979
  }
6962
- const defaultStyledResolver = styled$2(tag, _extends$2({
6980
+ const defaultStyledResolver = styled$1(tag, _extends$3({
6963
6981
  shouldForwardProp: shouldForwardPropOption,
6964
6982
  label
6965
6983
  }, options));
@@ -7025,7 +7043,7 @@ function createStyled(input = {}) {
7025
7043
  }
7026
7044
  if (componentName && overridesResolver) {
7027
7045
  expressionsWithDefaultTheme.push(props => {
7028
- const theme = resolveTheme(_extends$2({}, props, {
7046
+ const theme = resolveTheme(_extends$3({}, props, {
7029
7047
  defaultTheme,
7030
7048
  themeId
7031
7049
  }));
@@ -7033,7 +7051,7 @@ function createStyled(input = {}) {
7033
7051
  if (styleOverrides) {
7034
7052
  const resolvedStyleOverrides = {};
7035
7053
  Object.entries(styleOverrides).forEach(([slotKey, slotStyle]) => {
7036
- resolvedStyleOverrides[slotKey] = typeof slotStyle === 'function' ? slotStyle(_extends$2({}, props, {
7054
+ resolvedStyleOverrides[slotKey] = typeof slotStyle === 'function' ? slotStyle(_extends$3({}, props, {
7037
7055
  theme
7038
7056
  })) : slotStyle;
7039
7057
  });
@@ -7044,7 +7062,7 @@ function createStyled(input = {}) {
7044
7062
  }
7045
7063
  if (componentName && !skipVariantsResolver) {
7046
7064
  expressionsWithDefaultTheme.push(props => {
7047
- const theme = resolveTheme(_extends$2({}, props, {
7065
+ const theme = resolveTheme(_extends$3({}, props, {
7048
7066
  defaultTheme,
7049
7067
  themeId
7050
7068
  }));
@@ -7373,7 +7391,7 @@ function useThemeScoping(themeId, upperTheme, localTheme, isPrivate = false) {
7373
7391
  const resolvedTheme = themeId ? upperTheme[themeId] || upperTheme : upperTheme;
7374
7392
  if (typeof localTheme === 'function') {
7375
7393
  const mergedTheme = localTheme(resolvedTheme);
7376
- const result = themeId ? _extends$2({}, upperTheme, {
7394
+ const result = themeId ? _extends$3({}, upperTheme, {
7377
7395
  [themeId]: mergedTheme
7378
7396
  }) : mergedTheme;
7379
7397
  // must return a function for the private theme to NOT merge with the upper theme.
@@ -7383,9 +7401,9 @@ function useThemeScoping(themeId, upperTheme, localTheme, isPrivate = false) {
7383
7401
  }
7384
7402
  return result;
7385
7403
  }
7386
- return themeId ? _extends$2({}, upperTheme, {
7404
+ return themeId ? _extends$3({}, upperTheme, {
7387
7405
  [themeId]: localTheme
7388
- }) : _extends$2({}, upperTheme, localTheme);
7406
+ }) : _extends$3({}, upperTheme, localTheme);
7389
7407
  }, [themeId, upperTheme, localTheme, isPrivate]);
7390
7408
  }
7391
7409
 
@@ -7427,7 +7445,7 @@ function adaptV4Theme(inputTheme) {
7427
7445
  styleOverrides = {}
7428
7446
  } = inputTheme,
7429
7447
  other = _objectWithoutPropertiesLoose$1(inputTheme, _excluded$c);
7430
- const theme = _extends$3({}, other, {
7448
+ const theme = _extends$4({}, other, {
7431
7449
  components: {}
7432
7450
  });
7433
7451
 
@@ -7461,13 +7479,13 @@ function adaptV4Theme(inputTheme) {
7461
7479
  // theme.mixins.gutters
7462
7480
  const breakpoints = createBreakpoints(inputTheme.breakpoints || {});
7463
7481
  const spacing = theme.spacing;
7464
- theme.mixins = _extends$3({
7482
+ theme.mixins = _extends$4({
7465
7483
  gutters: (styles = {}) => {
7466
- return _extends$3({
7484
+ return _extends$4({
7467
7485
  paddingLeft: spacing(2),
7468
7486
  paddingRight: spacing(2)
7469
7487
  }, styles, {
7470
- [breakpoints.up('sm')]: _extends$3({
7488
+ [breakpoints.up('sm')]: _extends$4({
7471
7489
  paddingLeft: spacing(3),
7472
7490
  paddingRight: spacing(3)
7473
7491
  }, styles[breakpoints.up('sm')])
@@ -7480,7 +7498,7 @@ function adaptV4Theme(inputTheme) {
7480
7498
  } = palette,
7481
7499
  paletteRest = _objectWithoutPropertiesLoose$1(palette, _excluded2$1);
7482
7500
  const finalMode = modeInput || typeInput || 'light';
7483
- theme.palette = _extends$3({
7501
+ theme.palette = _extends$4({
7484
7502
  // theme.palette.text.hint
7485
7503
  text: {
7486
7504
  hint: finalMode === 'dark' ? 'rgba(255, 255, 255, 0.5)' : 'rgba(0, 0, 0, 0.38)'
@@ -7492,7 +7510,7 @@ function adaptV4Theme(inputTheme) {
7492
7510
  }
7493
7511
 
7494
7512
  function createMixins(breakpoints, mixins) {
7495
- return _extends$3({
7513
+ return _extends$4({
7496
7514
  toolbar: {
7497
7515
  minHeight: 56,
7498
7516
  [breakpoints.up('xs')]: {
@@ -7830,7 +7848,7 @@ function createPalette(palette) {
7830
7848
  lightShade = 300,
7831
7849
  darkShade = 700
7832
7850
  }) => {
7833
- color = _extends$3({}, color);
7851
+ color = _extends$4({}, color);
7834
7852
  if (!color.main && color[mainShade]) {
7835
7853
  color.main = color[mainShade];
7836
7854
  }
@@ -7851,9 +7869,9 @@ function createPalette(palette) {
7851
7869
  dark: dark$1,
7852
7870
  light: light$1
7853
7871
  };
7854
- const paletteOutput = deepmerge(_extends$3({
7872
+ const paletteOutput = deepmerge(_extends$4({
7855
7873
  // A collection of common colors.
7856
- common: _extends$3({}, common$1),
7874
+ common: _extends$4({}, common$1),
7857
7875
  // prevent mutable object.
7858
7876
  // The palette mode, can be light or dark.
7859
7877
  mode,
@@ -7941,7 +7959,7 @@ function createTypography(palette, typography) {
7941
7959
  other = _objectWithoutPropertiesLoose$1(_ref, _excluded$a);
7942
7960
  const coef = fontSize / 14;
7943
7961
  const pxToRem = pxToRem2 || (size => `${size / htmlFontSize * coef}rem`);
7944
- const buildVariant = (fontWeight, size, lineHeight, letterSpacing, casing) => _extends$3({
7962
+ const buildVariant = (fontWeight, size, lineHeight, letterSpacing, casing) => _extends$4({
7945
7963
  fontFamily,
7946
7964
  fontWeight,
7947
7965
  fontSize: pxToRem(size),
@@ -7973,7 +7991,7 @@ function createTypography(palette, typography) {
7973
7991
  letterSpacing: 'inherit'
7974
7992
  }
7975
7993
  };
7976
- return deepmerge(_extends$3({
7994
+ return deepmerge(_extends$4({
7977
7995
  htmlFontSize,
7978
7996
  pxToRem,
7979
7997
  fontFamily,
@@ -7996,7 +8014,6 @@ function createShadow(...px) {
7996
8014
 
7997
8015
  // Values from https://github.com/material-components/material-components-web/blob/be8747f94574669cb5e7add1a7c54fa41a89cec7/packages/mdc-elevation/_variables.scss
7998
8016
  const shadows = ['none', createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)];
7999
- var shadows$1 = shadows;
8000
8017
 
8001
8018
  const _excluded$9 = ["duration", "easing", "delay"];
8002
8019
  // Follow https://material.google.com/motion/duration-easing.html#duration-easing-natural-easing-curves
@@ -8041,8 +8058,8 @@ function getAutoHeightDuration(height) {
8041
8058
  return Math.round((4 + 15 * constant ** 0.25 + constant / 5) * 10);
8042
8059
  }
8043
8060
  function createTransitions(inputTransitions) {
8044
- const mergedEasing = _extends$3({}, easing, inputTransitions.easing);
8045
- const mergedDuration = _extends$3({}, duration, inputTransitions.duration);
8061
+ const mergedEasing = _extends$4({}, easing, inputTransitions.easing);
8062
+ const mergedDuration = _extends$4({}, duration, inputTransitions.duration);
8046
8063
  const create = (props = ['all'], options = {}) => {
8047
8064
  const {
8048
8065
  duration: durationOption = mergedDuration.standard,
@@ -8052,7 +8069,7 @@ function createTransitions(inputTransitions) {
8052
8069
  _objectWithoutPropertiesLoose$1(options, _excluded$9);
8053
8070
  return (Array.isArray(props) ? props : [props]).map(animatedProp => `${animatedProp} ${typeof durationOption === 'string' ? durationOption : formatMs(durationOption)} ${easingOption} ${typeof delay === 'string' ? delay : formatMs(delay)}`).join(',');
8054
8071
  };
8055
- return _extends$3({
8072
+ return _extends$4({
8056
8073
  getAutoHeightDuration,
8057
8074
  create
8058
8075
  }, inputTransitions, {
@@ -8093,16 +8110,16 @@ function createTheme(options = {}, ...args) {
8093
8110
  mixins: createMixins(systemTheme.breakpoints, mixinsInput),
8094
8111
  palette,
8095
8112
  // Don't use [...shadows] until you've verified its transpiled code is not invoking the iterator protocol.
8096
- shadows: shadows$1.slice(),
8113
+ shadows: shadows.slice(),
8097
8114
  typography: createTypography(palette, typographyInput),
8098
8115
  transitions: createTransitions(transitionsInput),
8099
- zIndex: _extends$3({}, zIndex$1)
8116
+ zIndex: _extends$4({}, zIndex$1)
8100
8117
  });
8101
8118
  muiTheme = deepmerge(muiTheme, other);
8102
8119
  muiTheme = args.reduce((acc, argument) => deepmerge(acc, argument), muiTheme);
8103
- muiTheme.unstable_sxConfig = _extends$3({}, defaultSxConfig$1, other == null ? void 0 : other.unstable_sxConfig);
8120
+ muiTheme.unstable_sxConfig = _extends$4({}, defaultSxConfig$1, other == null ? void 0 : other.unstable_sxConfig);
8104
8121
  muiTheme.unstable_sx = function sx(props) {
8105
- return styleFunctionSx$1({
8122
+ return styleFunctionSx({
8106
8123
  sx: props,
8107
8124
  theme: this
8108
8125
  });
@@ -8136,7 +8153,6 @@ const styled = createStyled({
8136
8153
  defaultTheme: defaultTheme$1,
8137
8154
  rootShouldForwardProp
8138
8155
  });
8139
- var styled$1 = styled;
8140
8156
 
8141
8157
  const _excluded$7 = ["theme"];
8142
8158
  function ThemeProvider(_ref) {
@@ -8145,7 +8161,7 @@ function ThemeProvider(_ref) {
8145
8161
  } = _ref,
8146
8162
  props = _objectWithoutPropertiesLoose$1(_ref, _excluded$7);
8147
8163
  const scopedTheme = themeInput[THEME_ID];
8148
- return /*#__PURE__*/jsxRuntimeExports.jsx(ThemeProvider$1, _extends$3({}, props, {
8164
+ return /*#__PURE__*/jsxRuntimeExports.jsx(ThemeProvider$1, _extends$4({}, props, {
8149
8165
  themeId: scopedTheme ? THEME_ID : undefined,
8150
8166
  theme: scopedTheme || themeInput
8151
8167
  }));
@@ -8525,8 +8541,8 @@ function create$3(definition) {
8525
8541
  return cache[key];
8526
8542
  }
8527
8543
 
8528
- const NEBULA_VERSION_HASH = "5ec7" ;
8529
- ClassNameGenerator$1.configure(componentName => {
8544
+ const NEBULA_VERSION_HASH = "b12a" ;
8545
+ ClassNameGenerator.configure(componentName => {
8530
8546
  return "njs-".concat(NEBULA_VERSION_HASH, "-").concat(componentName.replace('Mui', ''));
8531
8547
  });
8532
8548
 
@@ -8757,7 +8773,7 @@ function boot(_ref2) {
8757
8773
  const appRef = React__default.createRef();
8758
8774
  const element = document.createElement('div');
8759
8775
  element.style.display = 'none';
8760
- element.setAttribute('data-nebulajs-version', "5.0.0-alpha.1" );
8776
+ element.setAttribute('data-nebulajs-version', "5.0.0-alpha.2" );
8761
8777
  element.setAttribute('data-app-id', app.id);
8762
8778
  document.body.appendChild(element);
8763
8779
  if (context) {
@@ -9106,7 +9122,7 @@ function getFontSize(size) {
9106
9122
  }
9107
9123
  return '16px';
9108
9124
  }
9109
- function SvgIcon$2(_ref) {
9125
+ function SvgIcon$1(_ref) {
9110
9126
  let {
9111
9127
  size,
9112
9128
  style = {},
@@ -9156,7 +9172,7 @@ const remove = props => _objectSpread2(_objectSpread2({}, props), {}, {
9156
9172
  }
9157
9173
  }]
9158
9174
  });
9159
- var Remove = (props => SvgIcon$2(remove(props)));
9175
+ var Remove = (props => SvgIcon$1(remove(props)));
9160
9176
 
9161
9177
  const lock = props => _objectSpread2(_objectSpread2({}, props), {}, {
9162
9178
  shapes: [{
@@ -9166,7 +9182,7 @@ const lock = props => _objectSpread2(_objectSpread2({}, props), {}, {
9166
9182
  }
9167
9183
  }]
9168
9184
  });
9169
- var Lock = (props => SvgIcon$2(lock(props)));
9185
+ var Lock = (props => SvgIcon$1(lock(props)));
9170
9186
 
9171
9187
  const unlock = props => _objectSpread2(_objectSpread2({}, props), {}, {
9172
9188
  shapes: [{
@@ -9176,7 +9192,7 @@ const unlock = props => _objectSpread2(_objectSpread2({}, props), {}, {
9176
9192
  }
9177
9193
  }]
9178
9194
  });
9179
- var Unlock = (props => SvgIcon$2(unlock(props)));
9195
+ var Unlock = (props => SvgIcon$1(unlock(props)));
9180
9196
 
9181
9197
  function isRangeVisible(_ref) {
9182
9198
  var lastRenderedStartIndex = _ref.lastRenderedStartIndex,
@@ -9817,7 +9833,7 @@ const tick = props => _objectSpread2(_objectSpread2({}, props), {}, {
9817
9833
  }
9818
9834
  }]
9819
9835
  });
9820
- var Tick = (props => SvgIcon$2(tick(props)));
9836
+ var Tick = (props => SvgIcon$1(tick(props)));
9821
9837
 
9822
9838
  /**
9823
9839
  * @ignore
@@ -10020,7 +10036,7 @@ const ellipsis = {
10020
10036
  };
10021
10037
  const iconWidth = 24; // tick and lock icon width in px
10022
10038
 
10023
- const RowColRoot = styled$1('div', {
10039
+ const RowColRoot = styled('div', {
10024
10040
  shouldForwardProp: prop => !['checkboxes', 'isGridMode', 'isGridCol', 'dense', 'direction', 'sizes', 'frequencyMode', 'freqHitsValue', 'layout', 'styles'].includes(prop)
10025
10041
  })(_ref4 => {
10026
10042
  let {
@@ -10228,7 +10244,7 @@ const classes$b = {
10228
10244
  checkbox: "".concat(PREFIX$b, "-checkbox"),
10229
10245
  dense: "".concat(PREFIX$b, "-dense")
10230
10246
  };
10231
- const StyledCheckbox = styled$1(Checkbox, {
10247
+ const StyledCheckbox = styled(Checkbox, {
10232
10248
  shouldForwardProp: p => p !== 'styles'
10233
10249
  })(_ref => {
10234
10250
  let {
@@ -10325,7 +10341,7 @@ const classes$a = {
10325
10341
  denseRadioButton: "".concat(PREFIX$a, "-denseRadioButton"),
10326
10342
  radioButton: "".concat(PREFIX$a, "-radioButton")
10327
10343
  };
10328
- const StyledRadio = styled$1(Radio)(_ref => {
10344
+ const StyledRadio = styled(Radio)(_ref => {
10329
10345
  let {
10330
10346
  theme,
10331
10347
  checked
@@ -10642,7 +10658,7 @@ function getGridItemSizes(_ref) {
10642
10658
  }
10643
10659
  }
10644
10660
 
10645
- const ItemGrid = styled$1(Grid, {
10661
+ const ItemGrid = styled(Grid, {
10646
10662
  shouldForwardProp: prop => !['dataLayout', 'layoutOrder', 'itemPadding', 'cellPaddingRight', 'direction', 'fillHeight'].includes(prop)
10647
10663
  })(_ref => {
10648
10664
  let {
@@ -12783,7 +12799,7 @@ function getStyledComponents() {
12783
12799
  backgroundColor: scrollBarThumbHover
12784
12800
  }
12785
12801
  });
12786
- const StyledFixedSizeList = styled$3(FixedSizeList, {
12802
+ const StyledFixedSizeList = styled$2(FixedSizeList, {
12787
12803
  shouldForwardProp: prop => prop !== 'scrollDisabled'
12788
12804
  })(_ref => {
12789
12805
  let {
@@ -12793,7 +12809,7 @@ function getStyledComponents() {
12793
12809
  ["&.".concat(classes$9.styledScrollbars)]: getScrollbarStyling(scrollDisabled)
12794
12810
  };
12795
12811
  });
12796
- const StyledFixedSizeGrid = styled$3(FixedSizeGrid, {
12812
+ const StyledFixedSizeGrid = styled$2(FixedSizeGrid, {
12797
12813
  shouldForwardProp: prop => prop !== 'scrollDisabled'
12798
12814
  })(_ref2 => {
12799
12815
  let {
@@ -13410,7 +13426,7 @@ function useDataStore(model) {
13410
13426
  };
13411
13427
  }
13412
13428
 
13413
- const StyledText = styled$1(Typography, {
13429
+ const StyledText = styled(Typography, {
13414
13430
  shouldForwardProp: p => !['width', 'dense'].includes(p)
13415
13431
  })(_ref => {
13416
13432
  let {
@@ -13483,7 +13499,7 @@ const useUtilityClasses = ownerState => {
13483
13499
  };
13484
13500
  return composeClasses(slots, getSvgIconUtilityClass, classes);
13485
13501
  };
13486
- const SvgIconRoot = styled$1('svg', {
13502
+ const SvgIconRoot = styled('svg', {
13487
13503
  name: 'MuiSvgIcon',
13488
13504
  slot: 'Root',
13489
13505
  overridesResolver: (props, styles) => {
@@ -13541,7 +13557,7 @@ const SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {
13541
13557
  } = props,
13542
13558
  other = _objectWithoutPropertiesLoose$1(props, _excluded$5);
13543
13559
  const hasSvgAsChild = /*#__PURE__*/React.isValidElement(children) && children.type === 'svg';
13544
- const ownerState = _extends$3({}, props, {
13560
+ const ownerState = _extends$4({}, props, {
13545
13561
  color,
13546
13562
  component,
13547
13563
  fontSize,
@@ -13555,7 +13571,7 @@ const SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {
13555
13571
  more.viewBox = viewBox;
13556
13572
  }
13557
13573
  const classes = useUtilityClasses(ownerState);
13558
- return /*#__PURE__*/jsxRuntimeExports.jsxs(SvgIconRoot, _extends$3({
13574
+ return /*#__PURE__*/jsxRuntimeExports.jsxs(SvgIconRoot, _extends$4({
13559
13575
  as: component,
13560
13576
  className: clsx(classes.root, className),
13561
13577
  focusable: "false",
@@ -13571,18 +13587,17 @@ const SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {
13571
13587
  }));
13572
13588
  });
13573
13589
  SvgIcon.muiName = 'SvgIcon';
13574
- var SvgIcon$1 = SvgIcon;
13575
13590
 
13576
13591
  function createSvgIcon(path, displayName) {
13577
13592
  function Component(props, ref) {
13578
- return /*#__PURE__*/jsxRuntimeExports.jsx(SvgIcon$1, _extends$3({
13593
+ return /*#__PURE__*/jsxRuntimeExports.jsx(SvgIcon, _extends$4({
13579
13594
  "data-testid": `${displayName}Icon`,
13580
13595
  ref: ref
13581
13596
  }, props, {
13582
13597
  children: path
13583
13598
  }));
13584
13599
  }
13585
- Component.muiName = SvgIcon$1.muiName;
13600
+ Component.muiName = SvgIcon.muiName;
13586
13601
  return /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(Component));
13587
13602
  }
13588
13603
 
@@ -13590,7 +13605,7 @@ function createSvgIcon(path, displayName) {
13590
13605
  // eslint-disable-next-line @typescript-eslint/naming-convention
13591
13606
  const unstable_ClassNameGenerator = {
13592
13607
  configure: generator => {
13593
- ClassNameGenerator$1.configure(generator);
13608
+ ClassNameGenerator.configure(generator);
13594
13609
  }
13595
13610
  };
13596
13611
 
@@ -13652,7 +13667,7 @@ var _default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("p
13652
13667
  }), 'Close');
13653
13668
  default_1 = Close.default = _default;
13654
13669
 
13655
- const RootContainer = styled$1(Paper)(_ref => {
13670
+ const RootContainer = styled(Paper)(_ref => {
13656
13671
  let {
13657
13672
  theme,
13658
13673
  left
@@ -13666,11 +13681,11 @@ const RootContainer = styled$1(Paper)(_ref => {
13666
13681
  left
13667
13682
  };
13668
13683
  });
13669
- const LeftItem = styled$1('div')(() => ({
13684
+ const LeftItem = styled('div')(() => ({
13670
13685
  paddingLeft: '6px',
13671
13686
  flexGrow: 1
13672
13687
  }));
13673
- const RightItem = styled$1('div')(_ref2 => {
13688
+ const RightItem = styled('div')(_ref2 => {
13674
13689
  let {
13675
13690
  dense
13676
13691
  } = _ref2;
@@ -13679,7 +13694,7 @@ const RightItem = styled$1('div')(_ref2 => {
13679
13694
  alignItems: "".concat(dense ? 'center' : 'flex-start')
13680
13695
  };
13681
13696
  });
13682
- const SmallCloseIcon = styled$1(default_1)(() => ({
13697
+ const SmallCloseIcon = styled(default_1)(() => ({
13683
13698
  fontSize: '14px'
13684
13699
  }));
13685
13700
  function ListBoxFooter(_ref3) {
@@ -13828,7 +13843,7 @@ function deduceFrequencyMode(pages) {
13828
13843
 
13829
13844
  const _excluded$4 = ["isLoadingData"];
13830
13845
  const DEFAULT_MIN_BATCH_SIZE = 100;
13831
- const StyledWrapper = styled$4('div')(() => ({
13846
+ const StyledWrapper = styled$3('div')(() => ({
13832
13847
  ["& .screenReaderOnly"]: {
13833
13848
  position: 'absolute',
13834
13849
  height: 0,
@@ -14344,7 +14359,7 @@ const Item = React__default.forwardRef((_ref, ref) => {
14344
14359
  "aria-expanded": ariaExpanded,
14345
14360
  "aria-controls": "moreMenuList",
14346
14361
  "data-testid": btnId
14347
- }, hasSvgIconShape && SvgIcon$2(item.getSvgIconShape()), addAnchor && /*#__PURE__*/React__default.createElement("div", {
14362
+ }, hasSvgIconShape && SvgIcon$1(item.getSvgIconShape()), addAnchor && /*#__PURE__*/React__default.createElement("div", {
14348
14363
  ref: ref,
14349
14364
  style: {
14350
14365
  bottom: -spacing,
@@ -14373,7 +14388,7 @@ const clearSelections = props => _objectSpread2(_objectSpread2({}, props), {}, {
14373
14388
  }
14374
14389
  }]
14375
14390
  });
14376
- var ClearSelections = (props => SvgIcon$2(clearSelections(props)));
14391
+ var ClearSelections = (props => SvgIcon$1(clearSelections(props)));
14377
14392
 
14378
14393
  function useDefaultSelectionActions(_ref) {
14379
14394
  let {
@@ -14432,7 +14447,7 @@ const ActionsToolbarMoreElement = {
14432
14447
  const classes$8 = {
14433
14448
  icon: "".concat(PREFIX$8, "-icon")
14434
14449
  };
14435
- const StyledPopover$1 = styled$1(Popover)(_ref => {
14450
+ const StyledPopover$1 = styled(Popover)(_ref => {
14436
14451
  let {
14437
14452
  theme
14438
14453
  } = _ref;
@@ -14467,7 +14482,7 @@ function MoreItem(_ref2) {
14467
14482
  tabindex: "0"
14468
14483
  }, hasSvgIconShape && /*#__PURE__*/React__default.createElement(ListItemIcon, {
14469
14484
  className: classes$8.icon
14470
- }, SvgIcon$2(item.getSvgIconShape())), /*#__PURE__*/React__default.createElement(Typography, {
14485
+ }, SvgIcon$1(item.getSvgIconShape())), /*#__PURE__*/React__default.createElement(Typography, {
14471
14486
  noWrap: true
14472
14487
  }, item.label)) : null;
14473
14488
  }
@@ -14604,7 +14619,7 @@ const classes$7 = {
14604
14619
  item: "".concat(PREFIX$7, "-item"),
14605
14620
  itemSpacing: "".concat(PREFIX$7, "-itemSpacing")
14606
14621
  };
14607
- const StyledPopover = styled$1(Popover)(_ref => {
14622
+ const StyledPopover = styled(Popover)(_ref => {
14608
14623
  let {
14609
14624
  theme
14610
14625
  } = _ref;
@@ -14831,11 +14846,11 @@ const search = props => _objectSpread2(_objectSpread2({}, props), {}, {
14831
14846
  }
14832
14847
  }]
14833
14848
  });
14834
- var SearchIcon = (props => SvgIcon$2(search(props)));
14849
+ var SearchIcon = (props => SvgIcon$1(search(props)));
14835
14850
 
14836
14851
  const TREE_PATH = '/qListObjectDef';
14837
14852
  const WILDCARD = '**';
14838
- const StyledOutlinedInput = styled$1(OutlinedInput, {
14853
+ const StyledOutlinedInput = styled(OutlinedInput, {
14839
14854
  shouldForwardProp: p => !['styles', 'dense', 'isRtl'].includes(p)
14840
14855
  })(_ref => {
14841
14856
  let {
@@ -17931,13 +17946,13 @@ const downArrow = props => _objectSpread2(_objectSpread2({}, props), {}, {
17931
17946
  }
17932
17947
  }]
17933
17948
  });
17934
- var DownArrow = (props => SvgIcon$2(downArrow(props)));
17949
+ var DownArrow = (props => SvgIcon$1(downArrow(props)));
17935
17950
 
17936
17951
  const PREFIX$6 = 'MultiState';
17937
17952
  const classes$6 = {
17938
17953
  item: "".concat(PREFIX$6, "-item")
17939
17954
  };
17940
- const StyledGrid$5 = styled$1(Grid)(_ref => {
17955
+ const StyledGrid$5 = styled(Grid)(_ref => {
17941
17956
  let {
17942
17957
  theme
17943
17958
  } = _ref;
@@ -18102,7 +18117,7 @@ const classes$5 = {
18102
18117
  item: "".concat(PREFIX$5, "-item"),
18103
18118
  badge: "".concat(PREFIX$5, "-badge")
18104
18119
  };
18105
- const StyledGrid$4 = styled$1(Grid)(_ref => {
18120
+ const StyledGrid$4 = styled(Grid)(_ref => {
18106
18121
  let {
18107
18122
  theme
18108
18123
  } = _ref;
@@ -18373,7 +18388,7 @@ const selectionsBack = props => _objectSpread2(_objectSpread2({}, props), {}, {
18373
18388
  }
18374
18389
  }]
18375
18390
  });
18376
- var SelectionsBack = (props => SvgIcon$2(selectionsBack(props)));
18391
+ var SelectionsBack = (props => SvgIcon$1(selectionsBack(props)));
18377
18392
 
18378
18393
  const selectionsForward = props => _objectSpread2(_objectSpread2({}, props), {}, {
18379
18394
  shapes: [{
@@ -18383,7 +18398,7 @@ const selectionsForward = props => _objectSpread2(_objectSpread2({}, props), {},
18383
18398
  }
18384
18399
  }]
18385
18400
  });
18386
- var SelectionsForward = (props => SvgIcon$2(selectionsForward(props)));
18401
+ var SelectionsForward = (props => SvgIcon$1(selectionsForward(props)));
18387
18402
 
18388
18403
  const patchAlternateState = (currentSelectionsModel, currentSelectionsLayout, appLayout) => {
18389
18404
  const states = [...(appLayout.qStateNames || [])].map(s => ({
@@ -18915,7 +18930,7 @@ const drillDown = props => _objectSpread2(_objectSpread2({}, props), {}, {
18915
18930
  }
18916
18931
  }]
18917
18932
  });
18918
- var DrillDownIcon = (props => SvgIcon$2(drillDown(props)));
18933
+ var DrillDownIcon = (props => SvgIcon$1(drillDown(props)));
18919
18934
 
18920
18935
  function removeInnnerTabStops(container) {
18921
18936
  container === null || container === void 0 || container.querySelectorAll('[tabIndex="0"]').forEach(elm => {
@@ -19193,7 +19208,7 @@ function getListboxActionProps(_ref) {
19193
19208
  };
19194
19209
  }
19195
19210
 
19196
- const StyledDiv = styled$1('div')(() => ({
19211
+ const StyledDiv = styled('div')(() => ({
19197
19212
  display: 'flex',
19198
19213
  width: '100%',
19199
19214
  height: '100%',
@@ -19250,7 +19265,7 @@ const classes$4 = {
19250
19265
  screenReaderOnly: "".concat(PREFIX$4, "-screenReaderOnly"),
19251
19266
  listboxWrapper: "".concat(PREFIX$4, "-listboxWrapper")
19252
19267
  };
19253
- const StyledGrid$3 = styled$1(Grid, {
19268
+ const StyledGrid$3 = styled(Grid, {
19254
19269
  shouldForwardProp: p => !['containerPadding', 'isGridMode', 'styles'].includes(p)
19255
19270
  })(_ref => {
19256
19271
  let {
@@ -19285,7 +19300,7 @@ const StyledGrid$3 = styled$1(Grid, {
19285
19300
  }
19286
19301
  });
19287
19302
  });
19288
- const StyledGridHeader = styled$1(Grid, {
19303
+ const StyledGridHeader = styled(Grid, {
19289
19304
  shouldForwardProp: p => !['styles', 'isRtl'].includes(p)
19290
19305
  })(_ref2 => {
19291
19306
  let {
@@ -19304,7 +19319,7 @@ const StyledGridHeader = styled$1(Grid, {
19304
19319
  }
19305
19320
  });
19306
19321
  });
19307
- const Title = styled$1(Typography)(_ref3 => {
19322
+ const Title = styled(Typography)(_ref3 => {
19308
19323
  let {
19309
19324
  styles
19310
19325
  } = _ref3;
@@ -21492,7 +21507,7 @@ const warning = props => _objectSpread2(_objectSpread2({}, props), {}, {
21492
21507
  }
21493
21508
  }]
21494
21509
  });
21495
- var WarningTriangle = (props => SvgIcon$2(warning(props)));
21510
+ var WarningTriangle = (props => SvgIcon$1(warning(props)));
21496
21511
 
21497
21512
  /* eslint-disable react/no-array-index-key */
21498
21513
  function DescriptionRow(_ref) {
@@ -21631,7 +21646,7 @@ const classes$3 = {
21631
21646
  front: "".concat(PREFIX$3, "-front"),
21632
21647
  back: "".concat(PREFIX$3, "-back")
21633
21648
  };
21634
- const Root = styled$1('div')(_ref => {
21649
+ const Root = styled('div')(_ref => {
21635
21650
  let {
21636
21651
  theme
21637
21652
  } = _ref;
@@ -21686,7 +21701,7 @@ const PREFIX$2 = 'LongRunningQuery';
21686
21701
  const classes$2 = {
21687
21702
  stripes: "".concat(PREFIX$2, "-stripes")
21688
21703
  };
21689
- const StyledGrid$2 = styled$1(Grid)(() => ({
21704
+ const StyledGrid$2 = styled(Grid)(() => ({
21690
21705
  ["& .".concat(classes$2.stripes)]: {
21691
21706
  '&::before': {
21692
21707
  position: 'absolute',
@@ -21812,7 +21827,7 @@ const classes$1 = {
21812
21827
  containerStyle: "".concat(PREFIX$1, "-containerStyle"),
21813
21828
  containerTitleStyle: "".concat(PREFIX$1, "-containerTitleStyle")
21814
21829
  };
21815
- const StyledGrid$1 = styled$1(Grid)(_ref => {
21830
+ const StyledGrid$1 = styled(Grid)(_ref => {
21816
21831
  let {
21817
21832
  theme
21818
21833
  } = _ref;
@@ -21931,7 +21946,7 @@ const PREFIX = 'Footer';
21931
21946
  const classes = {
21932
21947
  itemStyle: "".concat(PREFIX, "-itemStyle")
21933
21948
  };
21934
- const StyledGrid = styled$1(Grid)(_ref => {
21949
+ const StyledGrid = styled(Grid)(_ref => {
21935
21950
  let {
21936
21951
  theme
21937
21952
  } = _ref;
@@ -28840,6 +28855,8 @@ function SessionMock() {
28840
28855
  };
28841
28856
  }
28842
28857
 
28858
+ /* eslint-disable no-underscore-dangle */
28859
+
28843
28860
  // To cover test
28844
28861
  // eslint-disable-next-line no-undef
28845
28862
  const crt = globalThis.crypto || {
@@ -28851,7 +28868,7 @@ const crt = globalThis.crypto || {
28851
28868
  function uuidv4() {
28852
28869
  return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, c => (c ^ crt.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16));
28853
28870
  }
28854
- function CreateSessionObjectMock() {
28871
+ function CreateSessionObjectMock(session) {
28855
28872
  return props => {
28856
28873
  const properties = extend$2({}, props);
28857
28874
  properties.qInfo = properties.qInfo || {};
@@ -28862,15 +28879,17 @@ function CreateSessionObjectMock() {
28862
28879
  delete properties._mock;
28863
28880
  layout = extend$2({}, properties, mockedInclusions);
28864
28881
  }
28865
- return Promise.resolve(_objectSpread2({
28882
+ return Promise.resolve({
28866
28883
  on: () => {},
28867
28884
  once: () => {},
28868
28885
  getLayout: () => Promise.resolve(layout),
28869
28886
  getProperties: () => Promise.resolve(properties),
28870
28887
  getEffectiveProperties: () => Promise.resolve(properties),
28871
28888
  removeListener: () => {},
28872
- id: properties.qInfo.qId
28873
- }, properties));
28889
+ id: properties.qInfo.qId,
28890
+ properties,
28891
+ session
28892
+ });
28874
28893
  };
28875
28894
  }
28876
28895
 
@@ -29091,7 +29110,7 @@ function GetAppLayoutMock() {
29091
29110
  function fromGenericObjects(genericObjects) {
29092
29111
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
29093
29112
  const session = new SessionMock();
29094
- const createSessionObject = new CreateSessionObjectMock();
29113
+ const createSessionObject = new CreateSessionObjectMock(session);
29095
29114
  const getObject = new GetObjectMock(genericObjects, options);
29096
29115
  const getAppLayout = new GetAppLayoutMock();
29097
29116
  const app = {