@cakemail-org/ui-components-v2 2.2.90 → 2.2.91

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/index.js CHANGED
@@ -34,7 +34,7 @@ import TableHead from '@mui/material/TableHead';
34
34
  import TableSortLabel from '@mui/material/TableSortLabel';
35
35
  import Collapse from '@mui/material/Collapse';
36
36
  import Select from '@mui/material/Select';
37
- import { DatePicker as DatePicker$1, TimePicker as TimePicker$1, DateTimePicker as DateTimePicker$1, MultiSectionDigitalClock, DateCalendar as DateCalendar$1, StaticDateTimePicker } from '@mui/x-date-pickers';
37
+ import { DateCalendar as DateCalendar$1, DatePicker as DatePicker$1, StaticDateTimePicker, MultiSectionDigitalClock, DateTimePicker as DateTimePicker$1, TimePicker as TimePicker$1 } from '@mui/x-date-pickers';
38
38
  import { AdapterMoment } from '@mui/x-date-pickers/AdapterMoment';
39
39
  import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
40
40
  import { getNameList } from 'country-list';
@@ -1238,7 +1238,7 @@ const defer = () => {
1238
1238
  };
1239
1239
  const makeString = object => {
1240
1240
  if (object == null) return '';
1241
- return '' + object;
1241
+ return String(object);
1242
1242
  };
1243
1243
  const copy$1 = (a, s, t) => {
1244
1244
  a.forEach(m => {
@@ -1246,7 +1246,7 @@ const copy$1 = (a, s, t) => {
1246
1246
  });
1247
1247
  };
1248
1248
  const lastOfPathSeparatorRegExp = /###/g;
1249
- const cleanKey = key => key && key.indexOf('###') > -1 ? key.replace(lastOfPathSeparatorRegExp, '.') : key;
1249
+ const cleanKey = key => key && key.includes('###') ? key.replace(lastOfPathSeparatorRegExp, '.') : key;
1250
1250
  const canNotTraverseDeeper = object => !object || isString(object);
1251
1251
  const getLastOfPath = (object, path, Empty) => {
1252
1252
  const stack = !isString(path) ? path : path.split('.');
@@ -1331,7 +1331,7 @@ const deepExtend = (target, source, overwrite) => {
1331
1331
  return target;
1332
1332
  };
1333
1333
  const regexEscape = str => str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');
1334
- var _entityMap = {
1334
+ const _entityMap = {
1335
1335
  '&': '&',
1336
1336
  '<': '&lt;',
1337
1337
  '>': '&gt;',
@@ -1370,7 +1370,7 @@ const looksLikeObjectPathRegExpCache = new RegExpCache(20);
1370
1370
  const looksLikeObjectPath = (key, nsSeparator, keySeparator) => {
1371
1371
  nsSeparator = nsSeparator || '';
1372
1372
  keySeparator = keySeparator || '';
1373
- const possibleChars = chars.filter(c => nsSeparator.indexOf(c) < 0 && keySeparator.indexOf(c) < 0);
1373
+ const possibleChars = chars.filter(c => !nsSeparator.includes(c) && !keySeparator.includes(c));
1374
1374
  if (possibleChars.length === 0) return true;
1375
1375
  const r = looksLikeObjectPathRegExpCache.getRegExp(`(${possibleChars.map(c => c === '?' ? '\\?' : c).join('|')})`);
1376
1376
  let matched = !r.test(key);
@@ -1403,7 +1403,7 @@ const deepFind = (obj, path, keySeparator = '.') => {
1403
1403
  nextPath += tokens[j];
1404
1404
  next = current[nextPath];
1405
1405
  if (next !== undefined) {
1406
- if (['string', 'number', 'boolean'].indexOf(typeof next) > -1 && j < tokens.length - 1) {
1406
+ if (['string', 'number', 'boolean'].includes(typeof next) && j < tokens.length - 1) {
1407
1407
  continue;
1408
1408
  }
1409
1409
  i += j - i + 1;
@@ -1414,7 +1414,7 @@ const deepFind = (obj, path, keySeparator = '.') => {
1414
1414
  }
1415
1415
  return current;
1416
1416
  };
1417
- const getCleanedCode = code => code?.replace('_', '-');
1417
+ const getCleanedCode = code => code?.replace(/_/g, '-');
1418
1418
 
1419
1419
  const consoleLogger = {
1420
1420
  type: 'logger',
@@ -1494,6 +1494,14 @@ class EventEmitter {
1494
1494
  }
1495
1495
  this.observers[event].delete(listener);
1496
1496
  }
1497
+ once(event, listener) {
1498
+ const wrapper = (...args) => {
1499
+ listener(...args);
1500
+ this.off(event, wrapper);
1501
+ };
1502
+ this.on(event, wrapper);
1503
+ return this;
1504
+ }
1497
1505
  emit(event, ...args) {
1498
1506
  if (this.observers[event]) {
1499
1507
  const cloned = Array.from(this.observers[event].entries());
@@ -1507,7 +1515,7 @@ class EventEmitter {
1507
1515
  const cloned = Array.from(this.observers['*'].entries());
1508
1516
  cloned.forEach(([observer, numTimesAdded]) => {
1509
1517
  for (let i = 0; i < numTimesAdded; i++) {
1510
- observer.apply(observer, [event, ...args]);
1518
+ observer(event, ...args);
1511
1519
  }
1512
1520
  });
1513
1521
  }
@@ -1530,7 +1538,7 @@ class ResourceStore extends EventEmitter {
1530
1538
  }
1531
1539
  }
1532
1540
  addNamespaces(ns) {
1533
- if (this.options.ns.indexOf(ns) < 0) {
1541
+ if (!this.options.ns.includes(ns)) {
1534
1542
  this.options.ns.push(ns);
1535
1543
  }
1536
1544
  }
@@ -1544,7 +1552,7 @@ class ResourceStore extends EventEmitter {
1544
1552
  const keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;
1545
1553
  const ignoreJSONStructure = options.ignoreJSONStructure !== undefined ? options.ignoreJSONStructure : this.options.ignoreJSONStructure;
1546
1554
  let path;
1547
- if (lng.indexOf('.') > -1) {
1555
+ if (lng.includes('.')) {
1548
1556
  path = lng.split('.');
1549
1557
  } else {
1550
1558
  path = [lng, ns];
@@ -1559,7 +1567,7 @@ class ResourceStore extends EventEmitter {
1559
1567
  }
1560
1568
  }
1561
1569
  const result = getPath$1(this.data, path);
1562
- if (!result && !ns && !key && lng.indexOf('.') > -1) {
1570
+ if (!result && !ns && !key && lng.includes('.')) {
1563
1571
  lng = path[0];
1564
1572
  ns = path[1];
1565
1573
  key = path.slice(2).join('.');
@@ -1573,7 +1581,7 @@ class ResourceStore extends EventEmitter {
1573
1581
  const keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;
1574
1582
  let path = [lng, ns];
1575
1583
  if (key) path = path.concat(keySeparator ? key.split(keySeparator) : key);
1576
- if (lng.indexOf('.') > -1) {
1584
+ if (lng.includes('.')) {
1577
1585
  path = lng.split('.');
1578
1586
  value = ns;
1579
1587
  ns = path[1];
@@ -1597,7 +1605,7 @@ class ResourceStore extends EventEmitter {
1597
1605
  skipCopy: false
1598
1606
  }) {
1599
1607
  let path = [lng, ns];
1600
- if (lng.indexOf('.') > -1) {
1608
+ if (lng.includes('.')) {
1601
1609
  path = lng.split('.');
1602
1610
  deep = resources;
1603
1611
  resources = ns;
@@ -1657,7 +1665,36 @@ var postProcessor = {
1657
1665
  }
1658
1666
  };
1659
1667
 
1660
- const checkedLoadedFor = {};
1668
+ const PATH_KEY = Symbol('i18next/PATH_KEY');
1669
+ function createProxy() {
1670
+ const state = [];
1671
+ const handler = Object.create(null);
1672
+ let proxy;
1673
+ handler.get = (target, key) => {
1674
+ proxy?.revoke?.();
1675
+ if (key === PATH_KEY) return state;
1676
+ state.push(key);
1677
+ proxy = Proxy.revocable(target, handler);
1678
+ return proxy.proxy;
1679
+ };
1680
+ return Proxy.revocable(Object.create(null), handler).proxy;
1681
+ }
1682
+ function keysFromSelector(selector, opts) {
1683
+ const {
1684
+ [PATH_KEY]: path
1685
+ } = selector(createProxy());
1686
+ const keySeparator = opts?.keySeparator ?? '.';
1687
+ const nsSeparator = opts?.nsSeparator ?? ':';
1688
+ if (path.length > 1 && nsSeparator) {
1689
+ const ns = opts?.ns;
1690
+ const nsArray = Array.isArray(ns) ? ns : null;
1691
+ if (nsArray && nsArray.length > 1 && nsArray.slice(1).includes(path[0])) {
1692
+ return `${path[0]}${nsSeparator}${path.slice(1).join(keySeparator)}`;
1693
+ }
1694
+ }
1695
+ return path.join(keySeparator);
1696
+ }
1697
+
1661
1698
  const shouldHandleAsObject = res => !isString(res) && typeof res !== 'boolean' && typeof res !== 'number';
1662
1699
  class Translator extends EventEmitter {
1663
1700
  constructor(services, options = {}) {
@@ -1668,6 +1705,7 @@ class Translator extends EventEmitter {
1668
1705
  this.options.keySeparator = '.';
1669
1706
  }
1670
1707
  this.logger = baseLogger.create('translator');
1708
+ this.checkedLoadedFor = {};
1671
1709
  }
1672
1710
  changeLanguage(lng) {
1673
1711
  if (lng) this.language = lng;
@@ -1680,14 +1718,19 @@ class Translator extends EventEmitter {
1680
1718
  };
1681
1719
  if (key == null) return false;
1682
1720
  const resolved = this.resolve(key, opt);
1683
- return resolved?.res !== undefined;
1721
+ if (resolved?.res === undefined) return false;
1722
+ const isObject = shouldHandleAsObject(resolved.res);
1723
+ if (opt.returnObjects === false && isObject) {
1724
+ return false;
1725
+ }
1726
+ return true;
1684
1727
  }
1685
1728
  extractFromKey(key, opt) {
1686
1729
  let nsSeparator = opt.nsSeparator !== undefined ? opt.nsSeparator : this.options.nsSeparator;
1687
1730
  if (nsSeparator === undefined) nsSeparator = ':';
1688
1731
  const keySeparator = opt.keySeparator !== undefined ? opt.keySeparator : this.options.keySeparator;
1689
1732
  let namespaces = opt.ns || this.options.defaultNS || [];
1690
- const wouldCheckForNsInKey = nsSeparator && key.indexOf(nsSeparator) > -1;
1733
+ const wouldCheckForNsInKey = nsSeparator && key.includes(nsSeparator);
1691
1734
  const seemsNaturalLanguage = !this.options.userDefinedKeySeparator && !opt.keySeparator && !this.options.userDefinedNsSeparator && !opt.nsSeparator && !looksLikeObjectPath(key, nsSeparator, keySeparator);
1692
1735
  if (wouldCheckForNsInKey && !seemsNaturalLanguage) {
1693
1736
  const m = key.match(this.interpolator.nestingRegexp);
@@ -1698,7 +1741,7 @@ class Translator extends EventEmitter {
1698
1741
  };
1699
1742
  }
1700
1743
  const parts = key.split(nsSeparator);
1701
- if (nsSeparator !== keySeparator || nsSeparator === keySeparator && this.options.ns.indexOf(parts[0]) > -1) namespaces = parts.shift();
1744
+ if (nsSeparator !== keySeparator || nsSeparator === keySeparator && this.options.ns.includes(parts[0])) namespaces = parts.shift();
1702
1745
  key = parts.join(keySeparator);
1703
1746
  }
1704
1747
  return {
@@ -1713,12 +1756,20 @@ class Translator extends EventEmitter {
1713
1756
  if (typeof opt !== 'object' && this.options.overloadTranslationOptionHandler) {
1714
1757
  opt = this.options.overloadTranslationOptionHandler(arguments);
1715
1758
  }
1716
- if (typeof options === 'object') opt = {
1759
+ if (typeof opt === 'object') opt = {
1717
1760
  ...opt
1718
1761
  };
1719
1762
  if (!opt) opt = {};
1720
1763
  if (keys == null) return '';
1764
+ if (typeof keys === 'function') keys = keysFromSelector(keys, {
1765
+ ...this.options,
1766
+ ...opt
1767
+ });
1721
1768
  if (!Array.isArray(keys)) keys = [String(keys)];
1769
+ keys = keys.map(k => typeof k === 'function' ? keysFromSelector(k, {
1770
+ ...this.options,
1771
+ ...opt
1772
+ }) : String(k));
1722
1773
  const returnDetails = opt.returnDetails !== undefined ? opt.returnDetails : this.options.returnDetails;
1723
1774
  const keySeparator = opt.keySeparator !== undefined ? opt.keySeparator : this.options.keySeparator;
1724
1775
  const {
@@ -1777,7 +1828,7 @@ class Translator extends EventEmitter {
1777
1828
  }
1778
1829
  const handleAsObject = shouldHandleAsObject(resForObjHndl);
1779
1830
  const resType = Object.prototype.toString.apply(resForObjHndl);
1780
- if (handleAsObjectInI18nFormat && resForObjHndl && handleAsObject && noObject.indexOf(resType) < 0 && !(isString(joinArrays) && Array.isArray(resForObjHndl))) {
1831
+ if (handleAsObjectInI18nFormat && resForObjHndl && handleAsObject && !noObject.includes(resType) && !(isString(joinArrays) && Array.isArray(resForObjHndl))) {
1781
1832
  if (!opt.returnObjects && !this.options.returnObjects) {
1782
1833
  if (!this.options.returnedObjectHandler) {
1783
1834
  this.logger.warn('accessing an object - but returnObjects options is not enabled!');
@@ -1873,7 +1924,7 @@ class Translator extends EventEmitter {
1873
1924
  if (this.options.saveMissingPlurals && needsPluralHandling) {
1874
1925
  lngs.forEach(language => {
1875
1926
  const suffixes = this.pluralResolver.getSuffixes(language, opt);
1876
- if (needsZeroSuffixLookup && opt[`defaultValue${this.options.pluralSeparator}zero`] && suffixes.indexOf(`${this.options.pluralSeparator}zero`) < 0) {
1927
+ if (needsZeroSuffixLookup && opt[`defaultValue${this.options.pluralSeparator}zero`] && !suffixes.includes(`${this.options.pluralSeparator}zero`)) {
1877
1928
  suffixes.push(`${this.options.pluralSeparator}zero`);
1878
1929
  }
1879
1930
  suffixes.forEach(suffix => {
@@ -1965,6 +2016,10 @@ class Translator extends EventEmitter {
1965
2016
  let usedLng;
1966
2017
  let usedNS;
1967
2018
  if (isString(keys)) keys = [keys];
2019
+ if (Array.isArray(keys)) keys = keys.map(k => typeof k === 'function' ? keysFromSelector(k, {
2020
+ ...this.options,
2021
+ ...opt
2022
+ }) : k);
1968
2023
  keys.forEach(k => {
1969
2024
  if (this.isValidLookup(found)) return;
1970
2025
  const extracted = this.extractFromKey(k, opt);
@@ -1979,8 +2034,8 @@ class Translator extends EventEmitter {
1979
2034
  namespaces.forEach(ns => {
1980
2035
  if (this.isValidLookup(found)) return;
1981
2036
  usedNS = ns;
1982
- if (!checkedLoadedFor[`${codes[0]}-${ns}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(usedNS)) {
1983
- checkedLoadedFor[`${codes[0]}-${ns}`] = true;
2037
+ if (!this.checkedLoadedFor[`${codes[0]}-${ns}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(usedNS)) {
2038
+ this.checkedLoadedFor[`${codes[0]}-${ns}`] = true;
1984
2039
  this.logger.warn(`key "${usedKey}" for languages "${codes.join(', ')}" won't get resolved as namespace "${usedNS}" was not yet loaded`, 'This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!');
1985
2040
  }
1986
2041
  codes.forEach(code => {
@@ -1995,22 +2050,22 @@ class Translator extends EventEmitter {
1995
2050
  const zeroSuffix = `${this.options.pluralSeparator}zero`;
1996
2051
  const ordinalPrefix = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
1997
2052
  if (needsPluralHandling) {
1998
- finalKeys.push(key + pluralSuffix);
1999
- if (opt.ordinal && pluralSuffix.indexOf(ordinalPrefix) === 0) {
2053
+ if (opt.ordinal && pluralSuffix.startsWith(ordinalPrefix)) {
2000
2054
  finalKeys.push(key + pluralSuffix.replace(ordinalPrefix, this.options.pluralSeparator));
2001
2055
  }
2056
+ finalKeys.push(key + pluralSuffix);
2002
2057
  if (needsZeroSuffixLookup) {
2003
2058
  finalKeys.push(key + zeroSuffix);
2004
2059
  }
2005
2060
  }
2006
2061
  if (needsContextHandling) {
2007
- const contextKey = `${key}${this.options.contextSeparator}${opt.context}`;
2062
+ const contextKey = `${key}${this.options.contextSeparator || '_'}${opt.context}`;
2008
2063
  finalKeys.push(contextKey);
2009
2064
  if (needsPluralHandling) {
2010
- finalKeys.push(contextKey + pluralSuffix);
2011
- if (opt.ordinal && pluralSuffix.indexOf(ordinalPrefix) === 0) {
2065
+ if (opt.ordinal && pluralSuffix.startsWith(ordinalPrefix)) {
2012
2066
  finalKeys.push(contextKey + pluralSuffix.replace(ordinalPrefix, this.options.pluralSeparator));
2013
2067
  }
2068
+ finalKeys.push(contextKey + pluralSuffix);
2014
2069
  if (needsZeroSuffixLookup) {
2015
2070
  finalKeys.push(contextKey + zeroSuffix);
2016
2071
  }
@@ -2068,7 +2123,7 @@ class Translator extends EventEmitter {
2068
2123
  static hasDefaultValue(options) {
2069
2124
  const prefix = 'defaultValue';
2070
2125
  for (const option in options) {
2071
- if (Object.prototype.hasOwnProperty.call(options, option) && prefix === option.substring(0, prefix.length) && undefined !== options[option]) {
2126
+ if (Object.prototype.hasOwnProperty.call(options, option) && option.startsWith(prefix) && undefined !== options[option]) {
2072
2127
  return true;
2073
2128
  }
2074
2129
  }
@@ -2084,7 +2139,7 @@ class LanguageUtil {
2084
2139
  }
2085
2140
  getScriptPartFromCode(code) {
2086
2141
  code = getCleanedCode(code);
2087
- if (!code || code.indexOf('-') < 0) return null;
2142
+ if (!code || !code.includes('-')) return null;
2088
2143
  const p = code.split('-');
2089
2144
  if (p.length === 2) return null;
2090
2145
  p.pop();
@@ -2093,12 +2148,12 @@ class LanguageUtil {
2093
2148
  }
2094
2149
  getLanguagePartFromCode(code) {
2095
2150
  code = getCleanedCode(code);
2096
- if (!code || code.indexOf('-') < 0) return code;
2151
+ if (!code || !code.includes('-')) return code;
2097
2152
  const p = code.split('-');
2098
2153
  return this.formatLanguageCode(p[0]);
2099
2154
  }
2100
2155
  formatLanguageCode(code) {
2101
- if (isString(code) && code.indexOf('-') > -1) {
2156
+ if (isString(code) && code.includes('-')) {
2102
2157
  let formattedCode;
2103
2158
  try {
2104
2159
  formattedCode = Intl.getCanonicalLocales(code)[0];
@@ -2118,7 +2173,7 @@ class LanguageUtil {
2118
2173
  if (this.options.load === 'languageOnly' || this.options.nonExplicitSupportedLngs) {
2119
2174
  code = this.getLanguagePartFromCode(code);
2120
2175
  }
2121
- return !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.indexOf(code) > -1;
2176
+ return !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.includes(code);
2122
2177
  }
2123
2178
  getBestMatchFromCodes(codes) {
2124
2179
  if (!codes) return null;
@@ -2136,10 +2191,11 @@ class LanguageUtil {
2136
2191
  const lngOnly = this.getLanguagePartFromCode(code);
2137
2192
  if (this.isSupportedCode(lngOnly)) return found = lngOnly;
2138
2193
  found = this.options.supportedLngs.find(supportedLng => {
2139
- if (supportedLng === lngOnly) return supportedLng;
2140
- if (supportedLng.indexOf('-') < 0 && lngOnly.indexOf('-') < 0) return;
2141
- if (supportedLng.indexOf('-') > 0 && lngOnly.indexOf('-') < 0 && supportedLng.substring(0, supportedLng.indexOf('-')) === lngOnly) return supportedLng;
2142
- if (supportedLng.indexOf(lngOnly) === 0 && lngOnly.length > 1) return supportedLng;
2194
+ if (supportedLng === lngOnly) return true;
2195
+ if (!supportedLng.includes('-') && !lngOnly.includes('-')) return false;
2196
+ if (supportedLng.includes('-') && !lngOnly.includes('-') && supportedLng.slice(0, supportedLng.indexOf('-')) === lngOnly) return true;
2197
+ if (supportedLng.startsWith(lngOnly) && lngOnly.length > 1) return true;
2198
+ return false;
2143
2199
  });
2144
2200
  });
2145
2201
  }
@@ -2170,7 +2226,7 @@ class LanguageUtil {
2170
2226
  this.logger.warn(`rejecting language code not found in supportedLngs: ${c}`);
2171
2227
  }
2172
2228
  };
2173
- if (isString(code) && (code.indexOf('-') > -1 || code.indexOf('_') > -1)) {
2229
+ if (isString(code) && (code.includes('-') || code.includes('_'))) {
2174
2230
  if (this.options.load !== 'languageOnly') addCode(this.formatLanguageCode(code));
2175
2231
  if (this.options.load !== 'languageOnly' && this.options.load !== 'currentOnly') addCode(this.getScriptPartFromCode(code));
2176
2232
  if (this.options.load !== 'currentOnly') addCode(this.getLanguagePartFromCode(code));
@@ -2178,7 +2234,7 @@ class LanguageUtil {
2178
2234
  addCode(this.formatLanguageCode(code));
2179
2235
  }
2180
2236
  fallbackCodes.forEach(fc => {
2181
- if (codes.indexOf(fc) < 0) addCode(this.formatLanguageCode(fc));
2237
+ if (!codes.includes(fc)) addCode(this.formatLanguageCode(fc));
2182
2238
  });
2183
2239
  return codes;
2184
2240
  }
@@ -2205,9 +2261,6 @@ class PluralResolver {
2205
2261
  this.logger = baseLogger.create('pluralResolver');
2206
2262
  this.pluralRulesCache = {};
2207
2263
  }
2208
- addRule(lng, obj) {
2209
- this.rules[lng] = obj;
2210
- }
2211
2264
  clearCache() {
2212
2265
  this.pluralRulesCache = {};
2213
2266
  }
@@ -2227,7 +2280,7 @@ class PluralResolver {
2227
2280
  type
2228
2281
  });
2229
2282
  } catch (err) {
2230
- if (!Intl) {
2283
+ if (typeof Intl === 'undefined') {
2231
2284
  this.logger.error('No Intl support, please use an Intl polyfill!');
2232
2285
  return dummyRule;
2233
2286
  }
@@ -2329,7 +2382,7 @@ class Interpolator {
2329
2382
  };
2330
2383
  this.regexp = getOrResetRegExp(this.regexp, `${this.prefix}(.+?)${this.suffix}`);
2331
2384
  this.regexpUnescape = getOrResetRegExp(this.regexpUnescape, `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`);
2332
- this.nestingRegexp = getOrResetRegExp(this.nestingRegexp, `${this.nestingPrefix}(.+?)${this.nestingSuffix}`);
2385
+ this.nestingRegexp = getOrResetRegExp(this.nestingRegexp, `${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`);
2333
2386
  }
2334
2387
  interpolate(str, data, lng, options) {
2335
2388
  let match;
@@ -2337,7 +2390,7 @@ class Interpolator {
2337
2390
  let replaces;
2338
2391
  const defaultData = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {};
2339
2392
  const handleFormat = key => {
2340
- if (key.indexOf(this.formatSeparator) < 0) {
2393
+ if (!key.includes(this.formatSeparator)) {
2341
2394
  const path = deepFindWithDefaults(data, defaultData, key, this.options.keySeparator, this.options.ignoreJSONStructure);
2342
2395
  return this.alwaysFormat ? this.format(path, undefined, lng, {
2343
2396
  ...options,
@@ -2407,14 +2460,14 @@ class Interpolator {
2407
2460
  let clonedOptions;
2408
2461
  const handleHasOptions = (key, inheritedOptions) => {
2409
2462
  const sep = this.nestingOptionsSeparator;
2410
- if (key.indexOf(sep) < 0) return key;
2411
- const c = key.split(new RegExp(`${sep}[ ]*{`));
2463
+ if (!key.includes(sep)) return key;
2464
+ const c = key.split(new RegExp(`${regexEscape(sep)}[ ]*{`));
2412
2465
  let optionsString = `{${c[1]}`;
2413
2466
  key = c[0];
2414
2467
  optionsString = this.interpolate(optionsString, clonedOptions);
2415
2468
  const matchedSingleQuotes = optionsString.match(/'/g);
2416
2469
  const matchedDoubleQuotes = optionsString.match(/"/g);
2417
- if ((matchedSingleQuotes?.length ?? 0) % 2 === 0 && !matchedDoubleQuotes || matchedDoubleQuotes.length % 2 !== 0) {
2470
+ if ((matchedSingleQuotes?.length ?? 0) % 2 === 0 && !matchedDoubleQuotes || (matchedDoubleQuotes?.length ?? 0) % 2 !== 0) {
2418
2471
  optionsString = optionsString.replace(/'/g, '"');
2419
2472
  }
2420
2473
  try {
@@ -2427,7 +2480,7 @@ class Interpolator {
2427
2480
  this.logger.warn(`failed parsing options string in nesting for key ${key}`, e);
2428
2481
  return `${key}${sep}${optionsString}`;
2429
2482
  }
2430
- if (clonedOptions.defaultValue && clonedOptions.defaultValue.indexOf(this.prefix) > -1) delete clonedOptions.defaultValue;
2483
+ if (clonedOptions.defaultValue && clonedOptions.defaultValue.includes(this.prefix)) delete clonedOptions.defaultValue;
2431
2484
  return key;
2432
2485
  };
2433
2486
  while (match = this.nestingRegexp.exec(str)) {
@@ -2466,13 +2519,13 @@ class Interpolator {
2466
2519
  const parseFormatStr = formatStr => {
2467
2520
  let formatName = formatStr.toLowerCase().trim();
2468
2521
  const formatOptions = {};
2469
- if (formatStr.indexOf('(') > -1) {
2522
+ if (formatStr.includes('(')) {
2470
2523
  const p = formatStr.split('(');
2471
2524
  formatName = p[0].toLowerCase().trim();
2472
- const optStr = p[1].substring(0, p[1].length - 1);
2473
- if (formatName === 'currency' && optStr.indexOf(':') < 0) {
2525
+ const optStr = p[1].slice(0, -1);
2526
+ if (formatName === 'currency' && !optStr.includes(':')) {
2474
2527
  if (!formatOptions.currency) formatOptions.currency = optStr.trim();
2475
- } else if (formatName === 'relativetime' && optStr.indexOf(':') < 0) {
2528
+ } else if (formatName === 'relativetime' && !optStr.includes(':')) {
2476
2529
  if (!formatOptions.range) formatOptions.range = optStr.trim();
2477
2530
  } else {
2478
2531
  const opts = optStr.split(';');
@@ -2566,9 +2619,11 @@ class Formatter {
2566
2619
  this.formats[name.toLowerCase().trim()] = createCachedFormatter(fc);
2567
2620
  }
2568
2621
  format(value, format, lng, options = {}) {
2622
+ if (!format) return value;
2623
+ if (value == null) return value;
2569
2624
  const formats = format.split(this.formatSeparator);
2570
- if (formats.length > 1 && formats[0].indexOf('(') > 1 && formats[0].indexOf(')') < 0 && formats.find(f => f.indexOf(')') > -1)) {
2571
- const lastIndex = formats.findIndex(f => f.indexOf(')') > -1);
2625
+ if (formats.length > 1 && formats[0].indexOf('(') > 1 && !formats[0].includes(')') && formats.find(f => f.includes(')'))) {
2626
+ const lastIndex = formats.findIndex(f => f.includes(')'));
2572
2627
  formats[0] = [formats[0], ...formats.splice(1, lastIndex)].join(this.formatSeparator);
2573
2628
  }
2574
2629
  const result = formats.reduce((mem, f) => {
@@ -2722,7 +2777,7 @@ class Connector extends EventEmitter {
2722
2777
  }
2723
2778
  if (err && data && tried < this.maxRetries) {
2724
2779
  setTimeout(() => {
2725
- this.read.call(this, lng, ns, fcName, tried + 1, wait * 2, callback);
2780
+ this.read(lng, ns, fcName, tried + 1, wait * 2, callback);
2726
2781
  }, wait);
2727
2782
  return;
2728
2783
  }
@@ -2826,7 +2881,6 @@ const get = () => ({
2826
2881
  nonExplicitSupportedLngs: false,
2827
2882
  load: 'all',
2828
2883
  preload: false,
2829
- simplifyPluralSuffix: true,
2830
2884
  keySeparator: '.',
2831
2885
  nsSeparator: ':',
2832
2886
  pluralSeparator: '_',
@@ -2863,7 +2917,6 @@ const get = () => ({
2863
2917
  },
2864
2918
  interpolation: {
2865
2919
  escapeValue: true,
2866
- format: value => value,
2867
2920
  prefix: '{{',
2868
2921
  suffix: '}}',
2869
2922
  formatSeparator: ',',
@@ -2880,10 +2933,9 @@ const transformOptions = options => {
2880
2933
  if (isString(options.ns)) options.ns = [options.ns];
2881
2934
  if (isString(options.fallbackLng)) options.fallbackLng = [options.fallbackLng];
2882
2935
  if (isString(options.fallbackNS)) options.fallbackNS = [options.fallbackNS];
2883
- if (options.supportedLngs?.indexOf?.('cimode') < 0) {
2936
+ if (options.supportedLngs && !options.supportedLngs.includes('cimode')) {
2884
2937
  options.supportedLngs = options.supportedLngs.concat(['cimode']);
2885
2938
  }
2886
- if (typeof options.initImmediate === 'boolean') options.initAsync = options.initImmediate;
2887
2939
  return options;
2888
2940
  };
2889
2941
 
@@ -2925,7 +2977,7 @@ class I18n extends EventEmitter {
2925
2977
  if (options.defaultNS == null && options.ns) {
2926
2978
  if (isString(options.ns)) {
2927
2979
  options.defaultNS = options.ns;
2928
- } else if (options.ns.indexOf('translation') < 0) {
2980
+ } else if (!options.ns.includes('translation')) {
2929
2981
  options.defaultNS = options.ns[0];
2930
2982
  }
2931
2983
  }
@@ -2945,6 +2997,9 @@ class I18n extends EventEmitter {
2945
2997
  if (options.nsSeparator !== undefined) {
2946
2998
  this.options.userDefinedNsSeparator = options.nsSeparator;
2947
2999
  }
3000
+ if (typeof this.options.overloadTranslationOptionHandler !== 'function') {
3001
+ this.options.overloadTranslationOptionHandler = defOpts.overloadTranslationOptionHandler;
3002
+ }
2948
3003
  const createClassOnDemand = ClassOrObject => {
2949
3004
  if (!ClassOrObject) return null;
2950
3005
  if (typeof ClassOrObject === 'function') return new ClassOrObject();
@@ -2969,14 +3024,9 @@ class I18n extends EventEmitter {
2969
3024
  s.resourceStore = this.store;
2970
3025
  s.languageUtils = lu;
2971
3026
  s.pluralResolver = new PluralResolver(lu, {
2972
- prepend: this.options.pluralSeparator,
2973
- simplifyPluralSuffix: this.options.simplifyPluralSuffix
3027
+ prepend: this.options.pluralSeparator
2974
3028
  });
2975
- const usingLegacyFormatFunction = this.options.interpolation.format && this.options.interpolation.format !== defOpts.interpolation.format;
2976
- if (usingLegacyFormatFunction) {
2977
- this.logger.warn(`init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting`);
2978
- }
2979
- if (formatter && (!this.options.interpolation.format || this.options.interpolation.format === defOpts.interpolation.format)) {
3029
+ if (formatter) {
2980
3030
  s.formatter = createClassOnDemand(formatter);
2981
3031
  if (s.formatter.init) s.formatter.init(s, this.options);
2982
3032
  this.options.interpolation.format = s.formatter.format.bind(s.formatter);
@@ -3059,7 +3109,7 @@ class I18n extends EventEmitter {
3059
3109
  const lngs = this.services.languageUtils.toResolveHierarchy(lng);
3060
3110
  lngs.forEach(l => {
3061
3111
  if (l === 'cimode') return;
3062
- if (toLoad.indexOf(l) < 0) toLoad.push(l);
3112
+ if (!toLoad.includes(l)) toLoad.push(l);
3063
3113
  });
3064
3114
  };
3065
3115
  if (!usedLng) {
@@ -3124,16 +3174,16 @@ class I18n extends EventEmitter {
3124
3174
  }
3125
3175
  setResolvedLanguage(l) {
3126
3176
  if (!l || !this.languages) return;
3127
- if (['cimode', 'dev'].indexOf(l) > -1) return;
3177
+ if (['cimode', 'dev'].includes(l)) return;
3128
3178
  for (let li = 0; li < this.languages.length; li++) {
3129
3179
  const lngInLngs = this.languages[li];
3130
- if (['cimode', 'dev'].indexOf(lngInLngs) > -1) continue;
3180
+ if (['cimode', 'dev'].includes(lngInLngs)) continue;
3131
3181
  if (this.store.hasLanguageSomeTranslations(lngInLngs)) {
3132
3182
  this.resolvedLanguage = lngInLngs;
3133
3183
  break;
3134
3184
  }
3135
3185
  }
3136
- if (!this.resolvedLanguage && this.languages.indexOf(l) < 0 && this.store.hasLanguageSomeTranslations(l)) {
3186
+ if (!this.resolvedLanguage && !this.languages.includes(l) && this.store.hasLanguageSomeTranslations(l)) {
3137
3187
  this.resolvedLanguage = l;
3138
3188
  this.languages.unshift(l);
3139
3189
  }
@@ -3205,11 +3255,20 @@ class I18n extends EventEmitter {
3205
3255
  o.lngs = o.lngs || fixedT.lngs;
3206
3256
  o.ns = o.ns || fixedT.ns;
3207
3257
  if (o.keyPrefix !== '') o.keyPrefix = o.keyPrefix || keyPrefix || fixedT.keyPrefix;
3258
+ const selectorOpts = {
3259
+ ...this.options,
3260
+ ...o
3261
+ };
3262
+ if (typeof o.keyPrefix === 'function') o.keyPrefix = keysFromSelector(o.keyPrefix, selectorOpts);
3208
3263
  const keySeparator = this.options.keySeparator || '.';
3209
3264
  let resultKey;
3210
3265
  if (o.keyPrefix && Array.isArray(key)) {
3211
- resultKey = key.map(k => `${o.keyPrefix}${keySeparator}${k}`);
3266
+ resultKey = key.map(k => {
3267
+ if (typeof k === 'function') k = keysFromSelector(k, selectorOpts);
3268
+ return `${o.keyPrefix}${keySeparator}${k}`;
3269
+ });
3212
3270
  } else {
3271
+ if (typeof key === 'function') key = keysFromSelector(key, selectorOpts);
3213
3272
  resultKey = o.keyPrefix ? `${o.keyPrefix}${keySeparator}${key}` : key;
3214
3273
  }
3215
3274
  return this.t(resultKey, o);
@@ -3266,7 +3325,7 @@ class I18n extends EventEmitter {
3266
3325
  }
3267
3326
  if (isString(ns)) ns = [ns];
3268
3327
  ns.forEach(n => {
3269
- if (this.options.ns.indexOf(n) < 0) this.options.ns.push(n);
3328
+ if (!this.options.ns.includes(n)) this.options.ns.push(n);
3270
3329
  });
3271
3330
  this.loadResources(err => {
3272
3331
  deferred.resolve();
@@ -3278,7 +3337,7 @@ class I18n extends EventEmitter {
3278
3337
  const deferred = defer();
3279
3338
  if (isString(lngs)) lngs = [lngs];
3280
3339
  const preloaded = this.options.preload || [];
3281
- const newLngs = lngs.filter(lng => preloaded.indexOf(lng) < 0 && this.services.languageUtils.isSupportedCode(lng));
3340
+ const newLngs = lngs.filter(lng => !preloaded.includes(lng) && this.services.languageUtils.isSupportedCode(lng));
3282
3341
  if (!newLngs.length) {
3283
3342
  if (callback) callback();
3284
3343
  return Promise.resolve();
@@ -3293,20 +3352,22 @@ class I18n extends EventEmitter {
3293
3352
  dir(lng) {
3294
3353
  if (!lng) lng = this.resolvedLanguage || (this.languages?.length > 0 ? this.languages[0] : this.language);
3295
3354
  if (!lng) return 'rtl';
3296
- if (Intl.Locale) {
3355
+ try {
3297
3356
  const l = new Intl.Locale(lng);
3298
3357
  if (l && l.getTextInfo) {
3299
3358
  const ti = l.getTextInfo();
3300
3359
  if (ti && ti.direction) return ti.direction;
3301
3360
  }
3302
- }
3361
+ } catch (e) {}
3303
3362
  const rtlLngs = ['ar', 'shu', 'sqr', 'ssh', 'xaa', 'yhd', 'yud', 'aao', 'abh', 'abv', 'acm', 'acq', 'acw', 'acx', 'acy', 'adf', 'ads', 'aeb', 'aec', 'afb', 'ajp', 'apc', 'apd', 'arb', 'arq', 'ars', 'ary', 'arz', 'auz', 'avl', 'ayh', 'ayl', 'ayn', 'ayp', 'bbz', 'pga', 'he', 'iw', 'ps', 'pbt', 'pbu', 'pst', 'prp', 'prd', 'ug', 'ur', 'ydd', 'yds', 'yih', 'ji', 'yi', 'hbo', 'men', 'xmn', 'fa', 'jpr', 'peo', 'pes', 'prs', 'dv', 'sam', 'ckb'];
3304
3363
  const languageUtils = this.services?.languageUtils || new LanguageUtil(get());
3305
3364
  if (lng.toLowerCase().indexOf('-latn') > 1) return 'ltr';
3306
- return rtlLngs.indexOf(languageUtils.getLanguagePartFromCode(lng)) > -1 || lng.toLowerCase().indexOf('-arab') > 1 ? 'rtl' : 'ltr';
3365
+ return rtlLngs.includes(languageUtils.getLanguagePartFromCode(lng)) || lng.toLowerCase().indexOf('-arab') > 1 ? 'rtl' : 'ltr';
3307
3366
  }
3308
3367
  static createInstance(options = {}, callback) {
3309
- return new I18n(options, callback);
3368
+ const instance = new I18n(options, callback);
3369
+ instance.createInstance = I18n.createInstance;
3370
+ return instance;
3310
3371
  }
3311
3372
  cloneInstance(options = {}, callback = noop) {
3312
3373
  const forkResourceStore = options.forkResourceStore;
@@ -3348,6 +3409,19 @@ class I18n extends EventEmitter {
3348
3409
  clone.store = new ResourceStore(clonedData, mergedOptions);
3349
3410
  clone.services.resourceStore = clone.store;
3350
3411
  }
3412
+ if (options.interpolation) {
3413
+ const defOpts = get();
3414
+ const mergedInterpolation = {
3415
+ ...defOpts.interpolation,
3416
+ ...this.options.interpolation,
3417
+ ...options.interpolation
3418
+ };
3419
+ const mergedForInterpolator = {
3420
+ ...mergedOptions,
3421
+ interpolation: mergedInterpolation
3422
+ };
3423
+ clone.services.interpolator = new Interpolator(mergedForInterpolator);
3424
+ }
3351
3425
  clone.translator = new Translator(clone.services, mergedOptions);
3352
3426
  clone.translator.on('*', (event, ...args) => {
3353
3427
  clone.emit(event, ...args);
@@ -3370,7 +3444,6 @@ class I18n extends EventEmitter {
3370
3444
  }
3371
3445
  }
3372
3446
  const instance = I18n.createInstance();
3373
- instance.createInstance = I18n.createInstance;
3374
3447
 
3375
3448
  instance.createInstance;
3376
3449
  instance.dir;
@@ -9252,7 +9325,7 @@ function EmptyContent(_a) {
9252
9325
  button && button));
9253
9326
  }
9254
9327
 
9255
- var css_248z$c = ".fileUpload-component-v2 {\n position: relative;\n width: 100%;\n}\n.fileUpload-component-v2 > .fileUploadContainer {\n box-sizing: border-box;\n text-align: center;\n cursor: pointer;\n width: 100%;\n padding: 3rem 2rem;\n display: flex;\n position: relative;\n}\n.fileUpload-component-v2 > .fileUploadContainer fieldset {\n position: absolute;\n margin: 0;\n padding: 0 0 0 1rem !important;\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n border-radius: 8px;\n border: 1px dashed var(--pebble, #EAEAEA);\n text-align: left;\n position: absolute;\n padding-inline: 0.75em;\n margin-inline: unset;\n}\n.fileUpload-component-v2 > .fileUploadContainer img {\n max-width: 100%;\n}\n.fileUpload-component-v2 > .fileUploadContainer.hasDropdown fieldset {\n border-bottom-right-radius: 0 !important;\n border-bottom-left-radius: 0 !important;\n}\n.fileUpload-component-v2 .dropdown-component-v2 {\n flex: 1;\n margin-top: 0;\n position: relative;\n left: 1px;\n width: calc(100% - 2px);\n}\n.fileUpload-component-v2 .dropdown-component-v2 > .MuiInputBase-root {\n max-width: unset;\n border-top-right-radius: 0 !important;\n border-top-left-radius: 0 !important;\n}\n.fileUpload-component-v2 .dropdown-component-v2 > .MuiInputBase-root:not(:focus):not(:hover):not(:active) {\n outline-color: var(--secondary-brand-color, var(--teal, #0ABDAE));\n}";
9328
+ var css_248z$c = ".fileUpload-component-v2 {\n position: relative;\n width: 100%;\n}\n.fileUpload-component-v2 > .fileUploadContainer {\n box-sizing: border-box;\n text-align: center;\n cursor: pointer;\n width: 100%;\n padding: 3rem 2rem;\n display: flex;\n position: relative;\n}\n.fileUpload-component-v2 > .fileUploadContainer fieldset {\n position: absolute;\n margin: 0;\n padding: 0 0 0 1rem !important;\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n border-radius: 8px;\n border: 1px dashed var(--pebble, #EAEAEA);\n text-align: left;\n position: absolute;\n padding-inline: 0.75em;\n margin-inline: unset;\n}\n.fileUpload-component-v2 > .fileUploadContainer img {\n max-width: 100%;\n}\n.fileUpload-component-v2 > .fileUploadContainer.hasDropdown fieldset {\n border-bottom-right-radius: 0 !important;\n border-bottom-left-radius: 0 !important;\n}\n.fileUpload-component-v2 .dropdown-component-v2 {\n flex: 1;\n margin-top: 0;\n position: relative;\n left: 1px;\n width: calc(100% - 2px);\n}\n.fileUpload-component-v2 .dropdown-component-v2 > .MuiInputBase-root:not(:focus):not(:hover):not(:active) {\n outline-color: var(--secondary-brand-color, var(--teal, #0ABDAE));\n}\n.fileUpload-component-v2 .dropdown-component-v2 > .MuiInputBase-root {\n max-width: unset;\n border-top-right-radius: 0 !important;\n border-top-left-radius: 0 !important;\n}";
9256
9329
  styleInject(css_248z$c);
9257
9330
 
9258
9331
  function FileUpload(_a) {
@@ -12430,6 +12503,7 @@ var ListPageModel = /** @class */ (function () {
12430
12503
  return __generator(this, function (_a) {
12431
12504
  dataToUpdate = page || this.toJson();
12432
12505
  return [2 /*return*/, updatePage({ id: this.id, page: dataToUpdate }).then(function (data) {
12506
+ debugger;
12433
12507
  trackEvent(EEvents.PAGE_UPDATED, {
12434
12508
  id: _this.id,
12435
12509
  name: dataToUpdate === null || dataToUpdate === void 0 ? void 0 : dataToUpdate.name,
@@ -15972,7 +16046,7 @@ var propTypesExports = propTypes.exports;
15972
16046
  var PropTypes = /*@__PURE__*/getDefaultExportFromCjs(propTypesExports);
15973
16047
 
15974
16048
  /**
15975
- * @mui/styled-engine v7.2.0
16049
+ * @mui/styled-engine v7.3.10
15976
16050
  *
15977
16051
  * @license MIT
15978
16052
  * This source code is licensed under the MIT license found in the
@@ -16034,8 +16108,8 @@ function requireReactIs_production () {
16034
16108
  REACT_PORTAL_TYPE = Symbol.for("react.portal"),
16035
16109
  REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
16036
16110
  REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
16037
- REACT_PROFILER_TYPE = Symbol.for("react.profiler");
16038
- var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
16111
+ REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
16112
+ REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
16039
16113
  REACT_CONTEXT_TYPE = Symbol.for("react.context"),
16040
16114
  REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
16041
16115
  REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
@@ -16205,8 +16279,8 @@ function requireReactIs_development () {
16205
16279
  REACT_PORTAL_TYPE = Symbol.for("react.portal"),
16206
16280
  REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
16207
16281
  REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
16208
- REACT_PROFILER_TYPE = Symbol.for("react.profiler");
16209
- var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
16282
+ REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
16283
+ REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
16210
16284
  REACT_CONTEXT_TYPE = Symbol.for("react.context"),
16211
16285
  REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
16212
16286
  REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
@@ -16447,7 +16521,7 @@ function createBreakpoints(breakpoints) {
16447
16521
  * For using in `sx` prop to sort the breakpoint from low to high.
16448
16522
  * Note: this function does not work and will not support multiple units.
16449
16523
  * e.g. input: { '@container (min-width:300px)': '1rem', '@container (min-width:40rem)': '2rem' }
16450
- * output: { '@container (min-width:40rem)': '2rem', '@container (min-width:300px)': '1rem' } // since 40 < 300 eventhough 40rem > 300px
16524
+ * output: { '@container (min-width:40rem)': '2rem', '@container (min-width:300px)': '1rem' } // since 40 < 300 even though 40rem > 300px
16451
16525
  */
16452
16526
  function sortContainerQueries(theme, css) {
16453
16527
  if (!theme.containerQueries) {
@@ -16476,7 +16550,7 @@ function getContainerQuery(theme, shorthand) {
16476
16550
  const matches = shorthand.match(/^@([^/]+)?\/?(.+)?$/);
16477
16551
  if (!matches) {
16478
16552
  if (process.env.NODE_ENV !== 'production') {
16479
- throw new Error(process.env.NODE_ENV !== "production" ? `MUI: The provided shorthand ${`(${shorthand})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.\n` + 'For example, `@sm` or `@600` or `@40rem/sidebar`.' : formatMuiErrorMessage(18, `(${shorthand})`));
16553
+ throw /* minify-error */new Error(`MUI: The provided shorthand ${`(${shorthand})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.\n` + 'For example, `@sm` or `@600` or `@40rem/sidebar`.');
16480
16554
  }
16481
16555
  return null;
16482
16556
  }