@itcase/storybook-config 1.2.51 → 1.2.53

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.
@@ -1425,21 +1425,17 @@ function unsafeStringify(arr, offset = 0) {
1425
1425
  byteToHex[arr[offset + 15]]).toLowerCase();
1426
1426
  }
1427
1427
 
1428
- let getRandomValues;
1429
1428
  const rnds8 = new Uint8Array(16);
1430
1429
  function rng() {
1431
- if (!getRandomValues) {
1432
- if (typeof crypto === 'undefined' || !crypto.getRandomValues) {
1433
- throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
1434
- }
1435
- getRandomValues = crypto.getRandomValues.bind(crypto);
1436
- }
1437
- return getRandomValues(rnds8);
1430
+ return crypto.getRandomValues(rnds8);
1438
1431
  }
1439
1432
 
1440
- const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
1441
- var native = { randomUUID };
1442
-
1433
+ function v4(options, buf, offset) {
1434
+ if (crypto.randomUUID) {
1435
+ return crypto.randomUUID();
1436
+ }
1437
+ return _v4(options);
1438
+ }
1443
1439
  function _v4(options, buf, offset) {
1444
1440
  options = options || {};
1445
1441
  const rnds = options.random ?? options.rng?.() ?? rng();
@@ -1450,12 +1446,6 @@ function _v4(options, buf, offset) {
1450
1446
  rnds[8] = (rnds[8] & 0x3f) | 0x80;
1451
1447
  return unsafeStringify(rnds);
1452
1448
  }
1453
- function v4(options, buf, offset) {
1454
- if (native.randomUUID && true && !options) {
1455
- return native.randomUUID();
1456
- }
1457
- return _v4(options);
1458
- }
1459
1449
 
1460
1450
  const l$1={error:"error",info:"info",success:"success",warning:"warning"},u$3=React.createContext([]),d$1=React.createContext({hideNotifications:e=>{},showNotification:(e,o)=>{},notificationStatuses:l$1});function m$2(o){const{initialNotificationsList:s=[],isLogRequestsErrors:c,children:m}=o,[f,g]=React.useState(()=>(s||[]).map(e=>y$1(e,e.onClose))),p=React.useCallback(e=>{e&&g(o=>o.filter(o=>{const i=String(o.id)===String(e);return i&&(clearTimeout(o._closeTimeout),o.onClose&&o.onClose()),!i}));},[]),T=React.useCallback((e,o)=>{const i=y$1(e,o);return g(e=>{const o=e.slice(),t=o.findIndex(e=>String(e.id)===String(i.id));if(-1===t)return [...o,i];const r=o[t];return clearTimeout(r._closeTimeout),r._closeTimeout=void 0,o[t]=i,o}),i.closeByTime&&(i._closeTimeout=setTimeout(()=>p(i.id),i.closeByTime)),i},[]),S=React.useMemo(()=>({hideNotifications:p,notificationStatuses:l$1,showNotification:T}),[]);return React.useEffect(()=>{f.forEach(e=>{e.closeByTime&&setTimeout(()=>p(e.id),e.closeByTime);}),c&&(common.axiosInstanceITCase.responseErrorHandler.loggerManager={log:e=>{if(e.message){const o=["network"].includes(e.key)?e.key:void 0;T({id:o,title:e.message,status:"error",closeByTime:4e3});}}});},[]),jsxRuntimeExports.jsx(d$1.Provider,{value:S,children:jsxRuntimeExports.jsx(u$3.Provider,{value:f,children:m})})}function f$2(){return React.useContext(u$3)}function g$1(){return React.useContext(d$1)}const p$2={error:"errorPrimary sizeS solid rounded",info:"infoPrimary sizeS solid rounded",success:"successPrimary sizeS solid rounded",warning:"warningPrimary sizeS solid rounded"};function y$1(e,o){let i=v4().split("-")[0],t="",r="",n="",s="",a="float",u="",d=l$1.warning,m=4500,f=p$2[d],g=null,y=false,T="",S=()=>{};return "string"==typeof e?r=e:"object"==typeof e&&(i=String(e.id??i),t=e.title??t,r=e.text??r,T=e.closeIconAppearance??T,a=e.type??a,n=e.closeIcon??n,s=e.closeIconSrc??s,u=e.buttonLabel??u,S=e.onClickButton??S,d=e.status??d,m=e.closeByTime??m,y=e.isLoading??y,g=e.after??g,f=e.appearance??p$2[e.status]??f),{id:i,appearance:f,type:a,title:t,status:d,text:r,buttonLabel:u,after:g,closeByTime:m,closeIcon:n,closeIconAppearance:T,closeIconSrc:s,isLoading:y,onClickButton:S,onClose:o}}
1461
1451
 
@@ -7382,10 +7372,8 @@ function isSupportedEnvironment() {
7382
7372
  function omit(input, ...filter) {
7383
7373
  const output = {};
7384
7374
  for (const key in input) {
7385
- if ({}.hasOwnProperty.call(input, key)) {
7386
- if (!filter.includes(key)) {
7387
- output[key] = input[key];
7388
- }
7375
+ if ({}.hasOwnProperty.call(input, key) && !filter.includes(key)) {
7376
+ output[key] = input[key];
7389
7377
  }
7390
7378
  }
7391
7379
  return output;
@@ -7412,11 +7400,6 @@ async function request(url, options) {
7412
7400
  }
7413
7401
  return response.text();
7414
7402
  }
7415
- function sleep(seconds = 1) {
7416
- return new Promise((resolve) => {
7417
- setTimeout(resolve, seconds * 1e3);
7418
- });
7419
- }
7420
7403
  function supportsInlineSVG() {
7421
7404
  if (!document) {
7422
7405
  return false;
@@ -7429,20 +7412,16 @@ function supportsInlineSVG() {
7429
7412
 
7430
7413
  // src/modules/cache.ts
7431
7414
  var CacheStore = class {
7432
- constructor() {
7415
+ constructor(options = {}) {
7433
7416
  __publicField(this, "cacheApi");
7434
7417
  __publicField(this, "cacheStore");
7435
7418
  __publicField(this, "subscribers", []);
7436
7419
  __publicField(this, "isReady", false);
7420
+ const { name = CACHE_NAME, persistent = false } = options;
7437
7421
  this.cacheStore = /* @__PURE__ */ new Map();
7438
- let cacheName = CACHE_NAME;
7439
- let usePersistentCache = false;
7440
- if (canUseDOM()) {
7441
- cacheName = window.REACT_INLINESVG_CACHE_NAME ?? CACHE_NAME;
7442
- usePersistentCache = !!window.REACT_INLINESVG_PERSISTENT_CACHE && "caches" in window;
7443
- }
7422
+ const usePersistentCache = persistent && canUseDOM() && "caches" in window;
7444
7423
  if (usePersistentCache) {
7445
- caches.open(cacheName).then((cache) => {
7424
+ caches.open(name).then((cache) => {
7446
7425
  this.cacheApi = cache;
7447
7426
  }).catch((error) => {
7448
7427
  console.error(`Failed to open cache: ${error.message}`);
@@ -7466,12 +7445,30 @@ var CacheStore = class {
7466
7445
  onReady(callback) {
7467
7446
  if (this.isReady) {
7468
7447
  callback();
7469
- } else {
7470
- this.subscribers.push(callback);
7448
+ return () => {
7449
+ };
7450
+ }
7451
+ this.subscribers.push(callback);
7452
+ return () => {
7453
+ const index = this.subscribers.indexOf(callback);
7454
+ if (index >= 0) {
7455
+ this.subscribers.splice(index, 1);
7456
+ }
7457
+ };
7458
+ }
7459
+ waitForReady() {
7460
+ if (this.isReady) {
7461
+ return Promise.resolve();
7471
7462
  }
7463
+ return new Promise((resolve) => {
7464
+ this.onReady(resolve);
7465
+ });
7472
7466
  }
7473
7467
  async get(url, fetchOptions) {
7474
- await (this.cacheApi ? this.fetchAndAddToPersistentCache(url, fetchOptions) : this.fetchAndAddToInternalCache(url, fetchOptions));
7468
+ await this.fetchAndCache(url, fetchOptions);
7469
+ return this.cacheStore.get(url)?.content ?? "";
7470
+ }
7471
+ getContent(url) {
7475
7472
  return this.cacheStore.get(url)?.content ?? "";
7476
7473
  }
7477
7474
  set(url, data) {
@@ -7480,57 +7477,57 @@ var CacheStore = class {
7480
7477
  isCached(url) {
7481
7478
  return this.cacheStore.get(url)?.status === STATUS.LOADED;
7482
7479
  }
7483
- async fetchAndAddToInternalCache(url, fetchOptions) {
7484
- const cache = this.cacheStore.get(url);
7485
- if (cache?.status === STATUS.LOADING) {
7486
- await this.handleLoading(url, async () => {
7487
- this.cacheStore.set(url, { content: "", status: STATUS.IDLE });
7488
- await this.fetchAndAddToInternalCache(url, fetchOptions);
7489
- });
7490
- return;
7480
+ async fetchAndCache(url, fetchOptions) {
7481
+ if (!this.isReady) {
7482
+ await this.waitForReady();
7491
7483
  }
7492
- if (!cache?.content) {
7493
- this.cacheStore.set(url, { content: "", status: STATUS.LOADING });
7494
- try {
7495
- const content = await request(url, fetchOptions);
7496
- this.cacheStore.set(url, { content, status: STATUS.LOADED });
7497
- } catch (error) {
7498
- this.cacheStore.set(url, { content: "", status: STATUS.FAILED });
7499
- throw error;
7500
- }
7501
- }
7502
- }
7503
- async fetchAndAddToPersistentCache(url, fetchOptions) {
7504
7484
  const cache = this.cacheStore.get(url);
7505
7485
  if (cache?.status === STATUS.LOADED) {
7506
7486
  return;
7507
7487
  }
7508
7488
  if (cache?.status === STATUS.LOADING) {
7509
- await this.handleLoading(url, async () => {
7489
+ await this.handleLoading(url, fetchOptions?.signal || void 0, async () => {
7510
7490
  this.cacheStore.set(url, { content: "", status: STATUS.IDLE });
7511
- await this.fetchAndAddToPersistentCache(url, fetchOptions);
7491
+ await this.fetchAndCache(url, fetchOptions);
7512
7492
  });
7493
+ const failed = this.cacheStore.get(url);
7494
+ if (failed?.status === STATUS.FAILED) {
7495
+ if (failed.error) {
7496
+ throw failed.error;
7497
+ }
7498
+ this.cacheStore.delete(url);
7499
+ await this.fetchAndCache(url, fetchOptions);
7500
+ }
7513
7501
  return;
7514
7502
  }
7515
7503
  this.cacheStore.set(url, { content: "", status: STATUS.LOADING });
7516
- const data = await this.cacheApi?.match(url);
7517
- if (data) {
7518
- const content = await data.text();
7519
- this.cacheStore.set(url, { content, status: STATUS.LOADED });
7520
- return;
7521
- }
7522
7504
  try {
7523
- await this.cacheApi?.add(new Request(url, fetchOptions));
7524
- const response = await this.cacheApi?.match(url);
7525
- const content = await response?.text() ?? "";
7505
+ const content = this.cacheApi ? await this.fetchFromPersistentCache(url, fetchOptions) : await request(url, fetchOptions);
7526
7506
  this.cacheStore.set(url, { content, status: STATUS.LOADED });
7527
7507
  } catch (error) {
7528
- this.cacheStore.set(url, { content: "", status: STATUS.FAILED });
7508
+ const isAbort = error?.name === "AbortError";
7509
+ this.cacheStore.set(url, {
7510
+ content: "",
7511
+ error: isAbort ? void 0 : error,
7512
+ status: STATUS.FAILED
7513
+ });
7529
7514
  throw error;
7530
7515
  }
7531
7516
  }
7532
- async handleLoading(url, callback) {
7517
+ async fetchFromPersistentCache(url, fetchOptions) {
7518
+ const data = await this.cacheApi?.match(url);
7519
+ if (data) {
7520
+ return data.text();
7521
+ }
7522
+ await this.cacheApi?.add(new Request(url, fetchOptions));
7523
+ const response = await this.cacheApi?.match(url);
7524
+ return await response?.text() ?? "";
7525
+ }
7526
+ async handleLoading(url, signal, callback) {
7533
7527
  for (let retryCount = 0; retryCount < CACHE_MAX_RETRIES; retryCount++) {
7528
+ if (signal?.aborted) {
7529
+ throw signal.reason instanceof Error ? signal.reason : new DOMException("The operation was aborted.", "AbortError");
7530
+ }
7534
7531
  if (this.cacheStore.get(url)?.status !== STATUS.LOADING) {
7535
7532
  return;
7536
7533
  }
@@ -7558,6 +7555,14 @@ var CacheStore = class {
7558
7555
  this.cacheStore.clear();
7559
7556
  }
7560
7557
  };
7558
+ function sleep(seconds = 1) {
7559
+ return new Promise((resolve) => {
7560
+ setTimeout(resolve, seconds * 1e3);
7561
+ });
7562
+ }
7563
+ function useMount(effect) {
7564
+ React.useEffect(effect, []);
7565
+ }
7561
7566
  function usePrevious(state) {
7562
7567
  const ref = React.useRef(void 0);
7563
7568
  React.useEffect(() => {
@@ -7565,6 +7570,29 @@ function usePrevious(state) {
7565
7570
  });
7566
7571
  return ref.current;
7567
7572
  }
7573
+ function uniquifyStyleIds(svgText, hash, baseURL) {
7574
+ const idMatches = svgText.matchAll(/\bid=(["'])([^"']+)\1/g);
7575
+ const ids = [...new Set([...idMatches].map((m) => m[2]))];
7576
+ if (!ids.length) {
7577
+ return svgText;
7578
+ }
7579
+ ids.sort((a, b) => b.length - a.length);
7580
+ return svgText.replace(/<style[^>]*>([\S\s]*?)<\/style>/gi, (fullMatch, cssContent) => {
7581
+ let modified = cssContent;
7582
+ for (const id of ids) {
7583
+ const escaped = id.replace(/[$()*+.?[\\\]^{|}]/g, "\\$&");
7584
+ modified = modified.replace(
7585
+ new RegExp(`url\\((['"]?)#${escaped}\\1\\)`, "g"),
7586
+ `url($1${baseURL}#${id}__${hash}$1)`
7587
+ );
7588
+ modified = modified.replace(
7589
+ new RegExp(`#${escaped}(?![a-zA-Z0-9_-])`, "g"),
7590
+ `#${id}__${hash}`
7591
+ );
7592
+ }
7593
+ return fullMatch.replace(cssContent, modified);
7594
+ });
7595
+ }
7568
7596
  function getNode(options) {
7569
7597
  const {
7570
7598
  baseURL,
@@ -7577,7 +7605,10 @@ function getNode(options) {
7577
7605
  uniquifyIDs = false
7578
7606
  } = options;
7579
7607
  try {
7580
- const svgText = processSVG(content, preProcessor);
7608
+ let svgText = preProcessor ? preProcessor(content) : content;
7609
+ if (uniquifyIDs) {
7610
+ svgText = uniquifyStyleIds(svgText, hash, baseURL ?? "");
7611
+ }
7581
7612
  const node = convert(svgText, { nodeOnly: true });
7582
7613
  if (!node || !(node instanceof SVGSVGElement)) {
7583
7614
  throw new Error("Could not convert the src to a DOM Node");
@@ -7608,12 +7639,6 @@ function getNode(options) {
7608
7639
  return handleError(error);
7609
7640
  }
7610
7641
  }
7611
- function processSVG(content, preProcessor) {
7612
- if (preProcessor) {
7613
- return preProcessor(content);
7614
- }
7615
- return content;
7616
- }
7617
7642
  function updateSVGAttributes(node, options) {
7618
7643
  const { baseURL = "", hash, uniquifyIDs } = options;
7619
7644
  const replaceableAttributes = ["id", "href", "xlink:href", "xlink:role", "xlink:arcrole"];
@@ -7647,22 +7672,30 @@ function updateSVGAttributes(node, options) {
7647
7672
  return node;
7648
7673
  }
7649
7674
 
7650
- // src/index.tsx
7651
- var cacheStore;
7652
- function ReactInlineSVG(props) {
7675
+ // src/modules/useInlineSVG.ts
7676
+ function useInlineSVG(props, cacheStore2) {
7653
7677
  const {
7678
+ baseURL,
7654
7679
  cacheRequests = true,
7655
- children = null,
7656
7680
  description,
7657
7681
  fetchOptions,
7658
- innerRef,
7659
- loader = null,
7660
7682
  onError,
7661
7683
  onLoad,
7684
+ preProcessor,
7662
7685
  src,
7663
7686
  title,
7664
- uniqueHash
7687
+ uniqueHash,
7688
+ uniquifyIDs
7665
7689
  } = props;
7690
+ const hash = React.useRef(uniqueHash ?? randomString(8));
7691
+ const fetchOptionsRef = React.useRef(fetchOptions);
7692
+ const onErrorRef = React.useRef(onError);
7693
+ const onLoadRef = React.useRef(onLoad);
7694
+ const preProcessorRef = React.useRef(preProcessor);
7695
+ fetchOptionsRef.current = fetchOptions;
7696
+ onErrorRef.current = onError;
7697
+ onLoadRef.current = onLoad;
7698
+ preProcessorRef.current = preProcessor;
7666
7699
  const [state, setState] = React.useReducer(
7667
7700
  (previousState2, nextState) => ({
7668
7701
  ...previousState2,
@@ -7671,43 +7704,71 @@ function ReactInlineSVG(props) {
7671
7704
  {
7672
7705
  content: "",
7673
7706
  element: null,
7674
- isCached: cacheRequests && cacheStore.isCached(props.src),
7707
+ isCached: false,
7675
7708
  status: STATUS.IDLE
7709
+ },
7710
+ (initial) => {
7711
+ const cached = cacheRequests && cacheStore2.isCached(src);
7712
+ if (!cached) {
7713
+ return initial;
7714
+ }
7715
+ const cachedContent = cacheStore2.getContent(src);
7716
+ try {
7717
+ const node = getNode({
7718
+ ...props,
7719
+ handleError: () => {
7720
+ },
7721
+ hash: hash.current,
7722
+ content: cachedContent
7723
+ });
7724
+ if (!node) {
7725
+ return { ...initial, content: cachedContent, isCached: true, status: STATUS.LOADED };
7726
+ }
7727
+ const convertedElement = convert(node);
7728
+ if (convertedElement && React.isValidElement(convertedElement)) {
7729
+ return {
7730
+ content: cachedContent,
7731
+ element: convertedElement,
7732
+ isCached: true,
7733
+ status: STATUS.READY
7734
+ };
7735
+ }
7736
+ } catch {
7737
+ }
7738
+ return {
7739
+ ...initial,
7740
+ content: cachedContent,
7741
+ isCached: true,
7742
+ status: STATUS.LOADED
7743
+ };
7676
7744
  }
7677
7745
  );
7678
7746
  const { content, element, isCached, status } = state;
7679
7747
  const previousProps = usePrevious(props);
7680
7748
  const previousState = usePrevious(state);
7681
- const hash = React.useRef(uniqueHash ?? randomString(8));
7682
7749
  const isActive = React.useRef(false);
7683
7750
  const isInitialized = React.useRef(false);
7684
- const handleError = React.useCallback(
7685
- (error) => {
7686
- if (isActive.current) {
7687
- setState({
7688
- status: error.message === "Browser does not support SVG" ? STATUS.UNSUPPORTED : STATUS.FAILED
7689
- });
7690
- onError?.(error);
7691
- }
7692
- },
7693
- [onError]
7694
- );
7695
- const handleLoad = React.useCallback((loadedContent, hasCache = false) => {
7751
+ const handleError = React.useCallback((error) => {
7696
7752
  if (isActive.current) {
7697
7753
  setState({
7698
- content: loadedContent,
7699
- isCached: hasCache,
7700
- status: STATUS.LOADED
7754
+ status: error.message === "Browser does not support SVG" ? STATUS.UNSUPPORTED : STATUS.FAILED
7701
7755
  });
7756
+ onErrorRef.current?.(error);
7702
7757
  }
7703
7758
  }, []);
7704
- const fetchContent = React.useCallback(async () => {
7705
- const responseContent = await request(src, fetchOptions);
7706
- handleLoad(responseContent);
7707
- }, [fetchOptions, handleLoad, src]);
7708
7759
  const getElement = React.useCallback(() => {
7709
7760
  try {
7710
- const node = getNode({ ...props, handleError, hash: hash.current, content });
7761
+ const node = getNode({
7762
+ baseURL,
7763
+ content,
7764
+ description,
7765
+ handleError,
7766
+ hash: hash.current,
7767
+ preProcessor: preProcessorRef.current,
7768
+ src,
7769
+ title,
7770
+ uniquifyIDs
7771
+ });
7711
7772
  const convertedElement = convert(node);
7712
7773
  if (!convertedElement || !React.isValidElement(convertedElement)) {
7713
7774
  throw new Error("Could not convert the src to a React element");
@@ -7719,67 +7780,32 @@ function ReactInlineSVG(props) {
7719
7780
  } catch (error) {
7720
7781
  handleError(error);
7721
7782
  }
7722
- }, [content, handleError, props]);
7723
- const getContent = React.useCallback(async () => {
7724
- const dataURI = /^data:image\/svg[^,]*?(;base64)?,(.*)/u.exec(src);
7725
- let inlineSrc;
7726
- if (dataURI) {
7727
- inlineSrc = dataURI[1] ? window.atob(dataURI[2]) : decodeURIComponent(dataURI[2]);
7728
- } else if (src.includes("<svg")) {
7729
- inlineSrc = src;
7730
- }
7731
- if (inlineSrc) {
7732
- handleLoad(inlineSrc);
7733
- return;
7783
+ }, [baseURL, content, description, handleError, src, title, uniquifyIDs]);
7784
+ useMount(() => {
7785
+ isActive.current = true;
7786
+ if (!canUseDOM() || isInitialized.current) {
7787
+ return void 0;
7734
7788
  }
7735
7789
  try {
7736
- if (cacheRequests) {
7737
- const cachedContent = await cacheStore.get(src, fetchOptions);
7738
- handleLoad(cachedContent, true);
7739
- } else {
7740
- await fetchContent();
7790
+ if (status === STATUS.READY) {
7791
+ onLoadRef.current?.(src, isCached);
7792
+ } else if (status === STATUS.IDLE) {
7793
+ if (!isSupportedEnvironment()) {
7794
+ throw new Error("Browser does not support SVG");
7795
+ }
7796
+ if (!src) {
7797
+ throw new Error("Missing src");
7798
+ }
7799
+ setState({ content: "", element: null, isCached: false, status: STATUS.LOADING });
7741
7800
  }
7742
7801
  } catch (error) {
7743
7802
  handleError(error);
7744
7803
  }
7745
- }, [cacheRequests, fetchContent, fetchOptions, handleError, handleLoad, src]);
7746
- const load = React.useCallback(async () => {
7747
- if (isActive.current) {
7748
- setState({
7749
- content: "",
7750
- element: null,
7751
- isCached: false,
7752
- status: STATUS.LOADING
7753
- });
7754
- }
7755
- }, []);
7756
- React.useEffect(
7757
- () => {
7758
- isActive.current = true;
7759
- if (!canUseDOM() || isInitialized.current) {
7760
- return void 0;
7761
- }
7762
- try {
7763
- if (status === STATUS.IDLE) {
7764
- if (!isSupportedEnvironment()) {
7765
- throw new Error("Browser does not support SVG");
7766
- }
7767
- if (!src) {
7768
- throw new Error("Missing src");
7769
- }
7770
- load();
7771
- }
7772
- } catch (error) {
7773
- handleError(error);
7774
- }
7775
- isInitialized.current = true;
7776
- return () => {
7777
- isActive.current = false;
7778
- };
7779
- },
7780
- // eslint-disable-next-line react-hooks/exhaustive-deps
7781
- []
7782
- );
7804
+ isInitialized.current = true;
7805
+ return () => {
7806
+ isActive.current = false;
7807
+ };
7808
+ });
7783
7809
  React.useEffect(() => {
7784
7810
  if (!canUseDOM() || !previousProps) {
7785
7811
  return;
@@ -7789,14 +7815,58 @@ function ReactInlineSVG(props) {
7789
7815
  handleError(new Error("Missing src"));
7790
7816
  return;
7791
7817
  }
7792
- load();
7818
+ setState({ content: "", element: null, isCached: false, status: STATUS.LOADING });
7793
7819
  }
7794
- }, [handleError, load, previousProps, src]);
7820
+ }, [handleError, previousProps, src]);
7795
7821
  React.useEffect(() => {
7796
- if (status === STATUS.LOADED) {
7822
+ if (status !== STATUS.LOADING) {
7823
+ return void 0;
7824
+ }
7825
+ const controller = new AbortController();
7826
+ let active = true;
7827
+ (async () => {
7828
+ try {
7829
+ const dataURI = /^data:image\/svg[^,]*?(;base64)?,(.*)/.exec(src);
7830
+ let inlineSrc;
7831
+ if (dataURI) {
7832
+ inlineSrc = dataURI[1] ? window.atob(dataURI[2]) : decodeURIComponent(dataURI[2]);
7833
+ } else if (src.includes("<svg")) {
7834
+ inlineSrc = src;
7835
+ }
7836
+ if (inlineSrc) {
7837
+ if (active) {
7838
+ setState({ content: inlineSrc, isCached: false, status: STATUS.LOADED });
7839
+ }
7840
+ return;
7841
+ }
7842
+ const fetchParameters = { ...fetchOptionsRef.current, signal: controller.signal };
7843
+ let loadedContent;
7844
+ let hasCache = false;
7845
+ if (cacheRequests) {
7846
+ hasCache = cacheStore2.isCached(src);
7847
+ loadedContent = await cacheStore2.get(src, fetchParameters);
7848
+ } else {
7849
+ loadedContent = await request(src, fetchParameters);
7850
+ }
7851
+ if (active) {
7852
+ setState({ content: loadedContent, isCached: hasCache, status: STATUS.LOADED });
7853
+ }
7854
+ } catch (error) {
7855
+ if (active && error.name !== "AbortError") {
7856
+ handleError(error);
7857
+ }
7858
+ }
7859
+ })();
7860
+ return () => {
7861
+ active = false;
7862
+ controller.abort();
7863
+ };
7864
+ }, [cacheRequests, cacheStore2, handleError, src, status]);
7865
+ React.useEffect(() => {
7866
+ if (status === STATUS.LOADED && content) {
7797
7867
  getElement();
7798
7868
  }
7799
- }, [status, getElement]);
7869
+ }, [content, getElement, status]);
7800
7870
  React.useEffect(() => {
7801
7871
  if (!canUseDOM() || !previousProps || previousProps.src !== src) {
7802
7872
  return;
@@ -7809,51 +7879,47 @@ function ReactInlineSVG(props) {
7809
7879
  if (!previousState) {
7810
7880
  return;
7811
7881
  }
7812
- switch (status) {
7813
- case STATUS.LOADING: {
7814
- if (previousState.status !== STATUS.LOADING) {
7815
- getContent();
7816
- }
7817
- break;
7818
- }
7819
- case STATUS.LOADED: {
7820
- if (previousState.status !== STATUS.LOADED) {
7821
- getElement();
7822
- }
7823
- break;
7824
- }
7825
- case STATUS.READY: {
7826
- if (previousState.status !== STATUS.READY) {
7827
- onLoad?.(src, isCached);
7828
- }
7829
- break;
7830
- }
7882
+ if (status === STATUS.READY && previousState.status !== STATUS.READY) {
7883
+ onLoadRef.current?.(src, isCached);
7831
7884
  }
7832
- }, [getContent, getElement, isCached, onLoad, previousState, src, status]);
7833
- const elementProps = omit(
7834
- props,
7835
- "baseURL",
7836
- "cacheRequests",
7837
- "children",
7838
- "description",
7839
- "fetchOptions",
7840
- "innerRef",
7841
- "loader",
7842
- "onError",
7843
- "onLoad",
7844
- "preProcessor",
7845
- "src",
7846
- "title",
7847
- "uniqueHash",
7848
- "uniquifyIDs"
7849
- );
7885
+ }, [isCached, previousState, src, status]);
7886
+ return { element, status };
7887
+ }
7888
+ var CacheContext = React.createContext(null);
7889
+ function useCacheStore() {
7890
+ return React.useContext(CacheContext);
7891
+ }
7892
+
7893
+ // src/index.tsx
7894
+ var cacheStore = new CacheStore();
7895
+ function InlineSVG(props) {
7896
+ const { children = null, innerRef, loader = null } = props;
7897
+ const contextStore = useCacheStore();
7898
+ const store = contextStore ?? cacheStore;
7899
+ const { element, status } = useInlineSVG(props, store);
7850
7900
  if (!canUseDOM()) {
7851
7901
  return loader;
7852
7902
  }
7853
7903
  if (element) {
7854
7904
  return React.cloneElement(element, {
7855
7905
  ref: innerRef,
7856
- ...elementProps
7906
+ ...omit(
7907
+ props,
7908
+ "baseURL",
7909
+ "cacheRequests",
7910
+ "children",
7911
+ "description",
7912
+ "fetchOptions",
7913
+ "innerRef",
7914
+ "loader",
7915
+ "onError",
7916
+ "onLoad",
7917
+ "preProcessor",
7918
+ "src",
7919
+ "title",
7920
+ "uniqueHash",
7921
+ "uniquifyIDs"
7922
+ )
7857
7923
  });
7858
7924
  }
7859
7925
  if ([STATUS.UNSUPPORTED, STATUS.FAILED].includes(status)) {
@@ -7861,37 +7927,18 @@ function ReactInlineSVG(props) {
7861
7927
  }
7862
7928
  return loader;
7863
7929
  }
7864
- function InlineSVG(props) {
7865
- if (!cacheStore) {
7866
- cacheStore = new CacheStore();
7867
- }
7868
- const { loader } = props;
7869
- const [isReady, setReady] = React.useState(cacheStore.isReady);
7870
- React.useEffect(() => {
7871
- if (isReady) {
7872
- return;
7873
- }
7874
- cacheStore.onReady(() => {
7875
- setReady(true);
7876
- });
7877
- }, [isReady]);
7878
- if (!isReady) {
7879
- return loader;
7880
- }
7881
- return /* @__PURE__ */ React.createElement(ReactInlineSVG, { ...props });
7882
- }
7883
7930
 
7884
7931
  const o=["src","imageSrc","svgSrc","placeholderUrl"],f$1=(f,...a)=>React.forwardRef(function(r,a){const{assetPrefix:c,ignorePathsList:m}=React.useContext(i),p=o.reduce((t,e)=>{let i=r[e];if(i&&"string"==typeof i){if(c){if(n(i,c,m)){i=`${common.formatURL(c).slice(0,-1)}${i}`;}}t[e]=i;}return t},{});return jsxRuntimeExports.jsx(f,{...r,...p,ref:a})}),n=(t,r,e=[])=>{if(t.startsWith("http:")||t.startsWith("https:")||t.startsWith("data:")||t.startsWith(r))return false;for(const r of e)if(r instanceof RegExp){if(r.test(t))return false}else if(common.formatURL(t).startsWith(common.formatURL(r)))return false;return true};
7885
7932
 
7886
- const z={sizeXXL:{size:"xxl"},sizeXL:{size:"xl"},sizeL:{size:"l"},sizeM:{size:"m"},sizeS:{size:"s"},sizeXS:{size:"xs"},sizeXXS:{size:"xxs"}},u={appearance:z};function _$1(r){const{appearance:i,className:a,dataTestId:o,dataTour:l,cursor:t,style:s,tag:n="span",before:c,after:S,isActive:p,isDisabled:x,isSkeleton:z,onClick:_,onDoubleClick:b,children:g}=r,C=e$1(i,u,x),v=u$1(r,C),{textAlignClass:P,textColorActiveClass:T,textColorActiveHoverClass:h,textColorClass:H,textColorDisabledClass:A,textColorHoverClass:B,textFontClass:$,textStyleClass:w,textTruncateClass:F,textWeightClass:X,textWrapClass:I,cursorClass:k,sizeClass:N,widthClass:Q}=v,{styles:L}=c$1(r);return jsxRuntimeExports.jsxs(n,{className:clsx(a,"text",N&&`text_size_${N}`,X&&`text-weight_${X}`,P&&`text-align_${P}`,x&&A&&`text-color_${A}`,!p&&!x&&H&&`text-color_${H}`,!p&&!x&&B&&`text-color_hover_${B}`,p&&!x&&h&&`text-color_active_hover_${h}`,p&&!x&&T&&`text-color_active_${T}`,$&&`text-font_${$}`,w&&`text-style_${w}`,I&&`word-wrap_${I}`,F&&`text-truncate_${F}`,z&&"skeleton",Q&&`width_${Q}`,k&&`cursor_${k}`,_&&(t||"cursor_type_pointer")),"data-testid":o,"data-tour":l,style:Object.assign({},L,s),onClick:_,onDoubleClick:b,children:[c,g,S]})}const b$1={sizeXXL:{size:"xxl",textSize:"xl",iconSize:"24"},sizeXL:{size:"xl",textSize:"l",iconSize:"24"},sizeL:{size:"l",textSize:"l",iconSize:"24"},sizeM:{size:"m",textSize:"m",iconSize:"24"},sizeS:{size:"s",textSize:"s",iconSize:"24"},sizeXS:{size:"xs",textSize:"xs",iconSize:"24"},sizeXXS:{size:"xxs",textSize:"xs",iconSize:"24"},circular:{shape:"circular"},rounded:{shape:"rounded"},roundedXL:{shape:"rounded"},roundedL:{shape:"rounded"},roundedM:{shape:"rounded"},roundedS:{shape:"rounded"},solid:{borderColor:"none"},outlined:{fill:"none"},full:{},ghost:{fill:"none",borderColor:"none"},accentPrimary:{fill:"accentPrimary",borderColor:"accentBorderQuaternary",textColor:"accentTextPrimary",dotFill:"accentItemPrimary",iconFill:"accentItemPrimary"},accentQuaternary:{fill:"accentQuaternary",borderColor:"accentBorderQuaternary",textColor:"accentTextPrimary",dotFill:"accentItemPrimary",iconFill:"accentItemPrimary"},accentSecondary:{fill:"accentSecondary",borderColor:"accentBorderQuaternary",textColor:"accentTextQuaternary",dotFill:"accentItemQuaternary",iconFill:"accentItemQuaternary"},accentTertiary:{fill:"accentTertiary",borderColor:"accentBorderSecondary",textColor:"accentTextSecondary",dotFill:"accentItemSecondary",iconFill:"accentItemSecondary"},dangerPrimary:{fill:"dangerPrimary",borderColor:"dangerBorderPrimary",textColor:"dangerTextPrimary",dotFill:"dangerItemPrimary",iconFill:"dangerItemPrimary"},errorPrimary:{fill:"errorPrimary",fillHover:"errorHoverPrimary",textColor:"errorTextPrimary",iconFill:"errorItemPrimary"},infoPrimary:{fill:"infoPrimary",borderColor:"infoBorderSecondary",textColor:"infoTextPrimary",dotFill:"infoItemPrimary",iconFill:"infoItemPrimary"},infoSecondary:{fill:"infoSecondary",borderColor:"infoBorderSecondary",textColor:"infoTextSecondary",dotFill:"infoItemSecondary"},specialPrimary:{fill:"specialPrimary",borderColor:"specialBorderSecondary",textColor:"specialTextPrimary",dotFill:"specialItemPrimary",iconFill:"specialItemPrimary"},extraPrimary:{fill:"extraPrimary",borderColor:"extraBorderSecondary",textColor:"extraTextPrimary",dotFill:"extraItemPrimary",iconFill:"extraItemPrimary"},successPrimary:{fill:"successPrimary",borderColor:"successBorderPrimary",textColor:"successTextPrimary",dotFill:"successItemPrimary",iconFill:"successItemPrimary"},disabledPrimary:{fill:"surfacePrimary",borderColor:"surfaceBorderPrimary",textColor:"surfaceTextPrimary",iconFill:"surfaceItemPrimary"},surfacePrimary:{fill:"surfacePrimary",borderColor:"surfaceBorderTertiary",textColor:"surfaceTextPrimary",dotFill:"surfaceItemPrimary",iconFill:"surfaceItemPrimary"},surfaceQuaternary:{fill:"accentPrimary",borderColor:"surfaceBorderPrimary",textColor:"surfaceTextPrimary"},surfaceSecondary:{fill:"surfaceSecondary",borderColor:"surfaceBorderSecondary",textColor:"surfaceTextPrimary"},surfaceTertiary:{fill:"surfaceTertiary",borderColor:"surfaceBorderTertiary",textColor:"surfaceTextPrimary"},warningPrimary:{fill:"warningPrimary",borderColor:"warningBorderPrimary",textColor:"warningTextPrimary",dotFill:"warningItemPrimary",iconFill:"warningItemPrimary"}},g={appearance:b$1};function C(i){const{appearance:a,className:o,dataTestId:l,dataTour:t,dot:s,icon:n,iconSrc:c,value:S,isSkeleton:p,children:x}=i,z=e$1(a,g),u=u$1(i,z),{fillClass:b,fillHoverClass:C,borderColorClass:v,borderColorHoverClass:P,borderTypeClass:T,borderWidthClass:h,textColor:H,textSize:A,dotFillClass:B,iconFill:$,iconShape:w,iconSize:F,shapeClass:X,sizeClass:I}=u,{styles:k}=c$1(i);return jsxRuntimeExports.jsxs("div",{className:clsx(o,"badge",v&&`border-color_${v}`,P&&`border-color_hover_${P}`,h&&`border-width_${h}`,T&&`border_type_${T}`,b&&`fill_${b}`,C&&`fill_hover_${C}`,I&&`badge_size_${I}`,X&&`shape_${X}`,S?n?s?"badge_type_dot-icon-counter":"badge_type_icon-counter":"badge_type_counter":n?"badge_type_icon":s?"badge_type_dot":"badge_type_fill",p&&"skeleton"),"data-testid":l,"data-tour":t,style:k,children:[s&&jsxRuntimeExports.jsx("div",{className:clsx("badge__dot",B&&`svg_fill_${B}`),children:jsxRuntimeExports.jsx("svg",{width:"6",height:"6",viewBox:"0 0 6 6",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("rect",{width:"6",height:"6",rx:"50"})})}),n&&jsxRuntimeExports.jsx(N,{className:"badge__icon",size:F,iconFill:$,imageSrc:c,shape:w,SvgImage:n}),x||S&&jsxRuntimeExports.jsx(_$1,{className:"badge__value",size:A,textColor:H,children:S})]})}const P$2={LinkComponent:"a"};function h(e){const{href:i,LinkComponent:o,rel:l,target:t,children:s,...n}=e;if(i){const e=o||P$2.LinkComponent;return jsxRuntimeExports.jsx(e,{href:i,rel:l,target:t,...n,children:s})}else if(o)return jsxRuntimeExports.jsx(o,{...n,children:s});return React.Children.toArray(s).filter(Boolean).map(e=>React.isValidElement(e)?React.cloneElement(e,n):e)}const H={h1:{size:"h1",iconAfterFillSize:"24",iconAfterSize:"24",iconBeforeFillSize:"24",iconBeforeSize:"24"},h2:{size:"h2",iconAfterFillSize:"24",iconAfterSize:"24",iconBeforeFillSize:"24",iconBeforeSize:"24"},h3:{size:"h3",iconAfterFillSize:"24",iconAfterSize:"24",iconBeforeFillSize:"24",iconBeforeSize:"24"},h4:{size:"h4",iconAfterFillSize:"24",iconAfterSize:"24",iconBeforeFillSize:"24",iconBeforeSize:"24"},h5:{size:"h5",iconAfterFillSize:"20",iconAfterSize:"20",iconBeforeFillSize:"20",iconBeforeSize:"20"},h6:{size:"h6",iconAfterFillSize:"16",iconAfterSize:"16",iconBeforeFillSize:"16",iconBeforeSize:"16"},disabledPrimary:{fill:"surfacePrimary",borderColor:"errorBorderQuaternary",borderHover:"errorBorderHoverQuaternary",textColor:"surfaceTextQuaternary",iconBeforeFill:"errorQuaternary"},disabledSecondary:{fill:"surfaceSecondary",borderColor:"surfaceBorderTertiary",borderHover:"surfaceBorderHoverQuaternary",iconBeforeFill:"surfaceQuaternary"},solid:{},outlined:{fill:"none"},full:{},ghost:{fill:"none"},accentPrimary:{fill:"accentPrimary",fillHover:"accentHoverPrimary"},accentSecondary:{fill:"accentPrimary",fillHover:"accentHoverPrimary"},dangerPrimary:{fill:"dangerPrimary",fillHover:"dangerHoverPrimary"},errorPrimary:{fill:"errorPrimary",fillHover:"errorHoverPrimary",textColor:"errorTextPrimary",textColorHover:"errorTextPrimary"},infoPrimary:{fill:"accentPrimary",fillHover:"accentHoverPrimary"},infoSecondary:{fill:"accentPrimary",fillHover:"accentHoverPrimary"},specialPrimary:{fill:"specialPrimary",fillHover:"specialHoverPrimary"},extraPrimary:{fill:"extraPrimary",fillHover:"extraHoverPrimary",textColor:"extraTextPrimary"},successPrimary:{fill:"successPrimary",fillHover:"successHoverPrimary"},surfacePrimary:{fill:"surfacePrimary",fillHover:"surfaceHoverPrimary"},surfaceQuaternary:{fill:"surfaceQuaternary",fillHover:"surfaceHoverQuaternary"},surfaceSecondary:{fill:"surfaceSecondary",fillHover:"surfaceHoverSecondary"},surfaceTertiary:{fill:"surfaceTertiary",fillHover:"surfaceHoverTertiary"},warningPrimary:{fill:"warningPrimary",fillHover:"warningHoverPrimary",textColor:"warningTextSecondary",textColorHover:"warningTextSecondary"},requirePrimary:{fill:"warningTertiary",borderColor:"warningBorderQuaternary",borderHover:"warningBorderQuaternary",textColor:"surfaceTextPrimary",iconBeforeFill:"warningQuaternary"},requireSecondary:{fill:"surfaceSecondary",borderColor:"surfaceBorderTertiary",borderHover:"surfaceBorderQuaternary",iconBeforeFill:"surfaceQuaternary"}},A={appearance:H};function B(i){const{appearance:a,className:l,dataTestId:t,dataTour:s,text:n,afterWrapper:c,beforeWrapper:S,style:p,tag:x="span",before:z,after:u,isActive:_,isDisabled:b,isSkeleton:g,onClick:C,children:v}=i,P=e$1(a,A,b),T=u$1(i,P),{directionClass:h,size:H,fillClass:B,fillHoverClass:$,textAlignClass:w,textColorActiveClass:F,textColorActiveHoverClass:X,textColorClass:I,textColorDisabledClass:k,textColorHoverClass:Q,textFontClass:L,textStyleClass:D,textTruncateClass:M,textWeightClass:W,textWrap:V,heightClass:E,iconAfter:O,iconAfterFill:j,iconAfterFillIcon:q,iconAfterFillSize:G,iconAfterShape:R,iconAfterSize:U,iconAfterSrc:J,iconBadgeAppearance:K,iconBadgeShape:Y,iconBadgeSize:Z,iconBadgeTextColor:ee,iconBadgeTextSize:re,iconBadgeValue:ie,iconBefore:ae,iconBeforeFill:oe,iconBeforeFillIcon:le,iconBeforeFillSize:te,iconBeforeShape:se,iconBeforeSize:ne,iconBeforeSrc:ce,svgFillClass:de,svgFillHoverClass:fe,widthClass:ye,wrapperDirectionClass:me,onClickIconAfter:Se,onClickIconBefore:pe}=T,{styles:xe,wrapper:ze}=c$1(i),ue=React.useMemo(()=>x||(H||"span"),[x,H]);return jsxRuntimeExports.jsxs(ue,{className:clsx(l,"title",B&&`fill_${B}`,$&&`fill_hover_${$}`,de&&`svg_fill_${de}`,fe&&`svg_fill_hover_${fe}`,ye&&`width_${ye}`,E&&`height_${E}`,H&&`title_size_${H}`,h&&`title_direction_${h}`,b&&k&&`text-color_${k}`,!_&&!b&&I&&`text text-color_${I}`,_&&!b&&F&&`text-color_active_${F}`,!_&&!b&&Q&&`text-color_hover_${Q}`,_&&!b&&X&&`text-color_active_hover${X}`,L&&`text-font_${L}`,D&&`text-style_${D}`,W&&`text-weight_${W}`,V&&`word-wrap_${V}`,ie&&"title_badge",g&&"skeleton"),"data-testid":t,"data-tour":s,style:Object.assign({},xe,p),onClick:C,children:[z,jsxRuntimeExports.jsxs("span",{className:clsx(w&&`text-align_${w}`,me&&`title_direction_${me}`,"title__wrapper",M&&`text-truncate_${M}`),style:ze,children:[(ae||ce)&&jsxRuntimeExports.jsx(N,{className:clsx("title__icon_before",ie&&"title__icon_before-badge"),fill:oe,fillSize:te,badgeAppearance:K,badgeClass:"title__icon_before_badge",badgeShape:Y,badgeSize:Z,badgeTextColor:ee,badgeTextSize:re,badgeValue:ie,iconFill:le,iconSize:ne,imageSrc:ce,shape:se,SvgImage:ae,onClick:pe}),S,v||n,c,(O||J)&&jsxRuntimeExports.jsx(N,{className:clsx("title__icon_after",ie&&"title__icon_after-badge"),fill:j,fillSize:G,badgeAppearance:K,badgeClass:"title__icon_after_badge",badgeShape:Y,badgeSize:Z,badgeTextColor:ee,badgeTextSize:re,badgeValue:ie,iconFill:q,iconSize:U,imageSrc:J,shape:R,SvgImage:O,onClick:Se})]}),u]})}const $={defaultPrimary:{fill:"surfacePrimary",fillHover:"surfaceHoverPrimary",titleColor:"surfaceTextPrimary",borderColor:"surfaceBorderPrimary",textColor:"surfaceTextPrimary"},sizeL:{size:"l",titleSize:"h5",textSize:"s"},sizeM:{size:"m",titleSize:"h5",textSize:"s"},sizeS:{size:"s",titleSize:"h5",textSize:"s"},disabledPrimary:{fill:"disabledPrimary",fillHover:"disabledHoverPrimary",titleColor:"surfaceTextPrimary",textColor:"surfaceTextPrimary"},requirePrimary:{fill:"warningPrimary",fillHover:"warningHoverPrimary",titleColor:"warningTextPrimary",borderColor:"warningBorderPrimary",textColor:"warningTextPrimary"},circular:{shape:"circular"},rounded:{shape:"rounded"},roundedXL:{shape:"rounded"},roundedL:{shape:"rounded"},roundedM:{shape:"rounded"},roundedS:{shape:"rounded"},solid:{borderColor:"none"},outlined:{fill:"none"},full:{},ghost:{fill:"none",borderColor:"none"},errorPrimary:{fill:"errorPrimary",fillHover:"errorHoverPrimary",titleColor:"errorTextPrimary",borderColor:"errorBorderPrimary",textColor:"errorTextPrimary"},successPrimary:{fill:"successPrimary",fillHover:"successHoverPrimary",titleColor:"successTextPrimary",borderColor:"successBorderPrimary",textColor:"successTextPrimary"}},w={appearance:$},F=React.forwardRef(function(i,a){const{appearance:o,className:c,dataTestId:S,dataTour:p,initialIsVisible:x,title:z,text:u,before:b,after:g,openTimeoutDelay:C=500,closeTimeoutDelay:v=250,isSkeleton:P,children:T}=i,h=React.useRef(null),H=React.useRef(null),A=React.useRef(null),$=React.useRef(false),[F,X]=React.useState(x),I=React.useCallback(()=>{$.current||(H.current&&clearTimeout(H.current),A.current=setTimeout(()=>{X(true);},C));},[C]),k=React.useCallback(()=>{A.current&&clearTimeout(A.current),H.current=setTimeout(()=>{X(e=>(true===e&&($.current=true),false));},v);},[v]),N=React.useCallback(()=>{$.current=false;},[]);React.useImperativeHandle(a,()=>({get tooltipElement(){return h.current},openTooltip:I,closeTooltip:k,isTooltipVisible:F}),[F,I,k]);const Q=e$1(o,w),L=u$1(i,Q),{alignClass:D,alignDirectionClass:M,alignmentClass:W,alignPosition:V,fillClass:E,titleColor:O,titleSize:j,titleWeight:q,borderColorClass:G,borderTypeClass:R,borderWidthClass:U,textColor:J,textSize:K,textWeight:Y,arrowPosition:Z,elevationClass:ee,shapeClass:re,sizeClass:ie,widthClass:ae}=L,{styles:oe}=c$1(i);return jsxRuntimeExports.jsxs("div",{className:clsx(c,"tooltip",V&&`tooltip_align-position_${V}`,M&&`align_${M}`,D&&`align_${D}`,ee&&`elevation_${ee}`,W&&`alignment_${W}`,ie&&`tooltip_size_${ie}`,P&&"skeleton",ae&&`width_${ae}`),ref:h,"data-testid":S,"data-tour":p,style:oe,onAnimationEnd:N,children:[Z&&jsxRuntimeExports.jsx("div",{className:clsx("tooltip__arrow",Z&&`tooltip__arrow_position_${Z}`,E&&`fill_${E}`),children:" "}),b,jsxRuntimeExports.jsxs("div",{className:clsx("tooltip__inner",U&&`border-width_${U}`,G&&`border-color_${G}`,R&&`border_type_${R}`,E&&`fill_${E}`,re&&`shape_${re}`),children:[z&&jsxRuntimeExports.jsx(B,{className:"tooltip__title text",size:j,textColor:O,textWeight:q,children:z}),u&&jsxRuntimeExports.jsx(_$1,{className:"tooltip__text",size:K,textColor:J,textWeight:Y,children:u}),T]}),g]})}),I$1={disabledPrimary:{fill:"surfacePrimary",borderColor:"surfaceBorderPrimary",badgeAppearance:"surfacePrimary",iconFill:"surfaceItemQuaternary"},size12_12:{fillSize:"12",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"12"},size14_12:{fillSize:"14",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"12"},size14_14:{fillSize:"14",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"14"},size16_12:{fillSize:"16",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"12"},size16_14:{fillSize:"16",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"14"},size16_16:{fillSize:"16",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"16"},size20_12:{fillSize:"20",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"12"},size20_14:{fillSize:"20",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"14"},size20_16:{fillSize:"20",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"16"},size20_20:{fillSize:"20",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"20"},size24_12:{fillSize:"24",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"12"},size24_14:{fillSize:"24",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"14"},size24_16:{fillSize:"24",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"16"},size24_20:{fillSize:"24",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"20"},size24_24:{fillSize:"24",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"24"},size32_12:{fillSize:"32",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"12"},size32_14:{fillSize:"32",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"14"},size32_16:{fillSize:"32",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"16"},size32_20:{fillSize:"32",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"20"},size32_24:{fillSize:"32",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"24"},size32_32:{fillSize:"32",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"32"},size40_12:{fillSize:"40",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"12"},size40_14:{fillSize:"40",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"14"},size40_16:{fillSize:"40",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"16"},size40_20:{fillSize:"40",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"20"},size40_24:{fillSize:"40",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"24"},size40_32:{fillSize:"40",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"32"},size40_40:{fillSize:"40",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"40"},solid:{borderColor:"none"},outlined:{fill:"none"},full:{},ghost:{fill:"none",borderColor:"none"},accentPrimary:{fill:"accentPrimary",fillHover:"accentHoverPrimary",borderColor:"accentBorderPrimary",badgeAppearance:"surfacePrimary",iconFill:"accentItemPrimary"},accentSecondary:{fill:"accentPrimary",fillHover:"accentHoverPrimary",borderColor:"accentBorderPrimary",iconFill:"accentItemPrimary"},circular:{shape:"circular"},rounded:{shape:"rounded"},roundedXL:{shape:"rounded"},roundedL:{shape:"rounded"},roundedM:{shape:"rounded"},roundedS:{shape:"rounded"},dangerPrimary:{fill:"dangerPrimary",fillHover:"dangerHoverPrimary",borderColor:"dangerBorderSecondary",badgeAppearance:"surfacePrimary",iconFill:"dangerItemPrimary"},errorPrimary:{fill:"errorPrimary",fillHover:"errorHoverPrimary",borderColor:"errorBorderPrimary",badgeAppearance:"surfacePrimary",iconFill:"errorItemPrimary"},infoPrimary:{fill:"infoPrimary",borderColor:"infoBorderPrimary",badgeAppearance:"surfacePrimary",iconFill:"infoItemPrimary"},infoSecondary:{fill:"accentPrimary",fillHover:"accentHoverPrimary",borderColor:"accentBorderPrimary",iconFill:"infoItemSecondary"},specialPrimary:{fill:"specialPrimary",fillHover:"specialHoverPrimary",borderColor:"specialBorderQuaternary",badgeAppearance:"surfacePrimary",iconFill:"specialItemPrimary"},extraPrimary:{fill:"extraPrimary",fillHover:"extraHoverPrimary",borderColor:"extraBorderQuaternary",badgeAppearance:"surfacePrimary",iconFill:"extraItemPrimary"},successPrimary:{fill:"successPrimary",fillHover:"successHoverPrimary",borderColor:"successBorderPrimary",badgeAppearance:"surfacePrimary",iconFill:"successItemPrimary"},surfacePrimary:{fill:"surfacePrimary",fillHover:"surfaceHoverSecondary",borderColor:"surfaceBorderTertiary",badgeAppearance:"surfacePrimary",iconFill:"surfaceItemPrimary"},surfaceQuaternary:{fill:"surfaceQuaternary",fillHover:"surfaceHoverQuaternary",badgeAppearance:"accentPrimary",iconFill:"surfaceItemPrimary"},surfaceSecondary:{fill:"surfaceSecondary",fillHover:"surfaceHoverSecondary",badgeAppearance:"accentPrimary solid rounded",iconFill:"surfaceItemPrimary"},surfaceTertiary:{fill:"surfaceTertiary",fillHover:"surfaceHoverTertiary",badgeAppearance:"accentPrimary",iconFill:"surfaceItemPrimary"},warningPrimary:{fill:"warningPrimary",fillHover:"warningHoverPrimary",borderColor:"warningBorderSecondary",badgeAppearance:"surfacePrimary",iconFill:"warningItemPrimary"}},k={appearance:I$1},N=f$1(React.forwardRef(function(i,a){const{id:l,appearance:t,className:s,dataTestId:n,dataTour:c,width:p,height:z,badgeClass:u,href:_,imageSrc:b,link:g,linkRel:v,linkTarget:P,notification:T,saveFillStroke:H,showTooltip:A,SvgImage:B,svgImageStyles:$,before:w,after:X,isActive:I,isDisabled:N,isSkeleton:L,onClick:D,onMouseEnter:M,onMouseLeave:W}=i,V=React.useMemo(()=>{if(B){const e=B,i={};return p&&(i.width=p),z&&(i.height=z),jsxRuntimeExports.jsx(e,{...i,...$})}return b?b.endsWith(".svg")?jsxRuntimeExports.jsx(InlineSVG,H?{src:b}:{src:b,preProcessor:Q}):jsxRuntimeExports.jsx("img",{src:b}):null},[B,b,p,z,$,H]),E=e$1(t,k,N),O=u$1(i,E),{alignmentClass:j,fillActiveClass:q,fillActiveHoverClass:G,fillClass:R,fillDisabledClass:U,fillHoverClass:J,fillSizeClass:K,borderColorClass:Y,borderColorHoverClass:Z,borderTypeClass:ee,borderWidthClass:re,badgeAppearance:ie,badgeAppearanceSize:ae,badgeShape:oe,badgeSize:le,badgeTextColor:te,badgeTextSize:se,badgeValue:ne,centeringClass:ce,iconFillActiveClass:de,iconFillActiveHoverClass:fe,iconFillClass:ye,iconFillDisabledClass:me,iconFillHoverClass:Se,iconSizeClass:pe,shapeClass:xe,tooltipAppearance:ze,tooltipText:ue,tooltipTextSize:_e,tooltipTitle:be,tooltipTitleSize:ge}=O,{styles:Ce}=c$1(i);return jsxRuntimeExports.jsxs("div",{id:l,className:clsx(s,"icon",I?q&&`fill_active_${q}`:R&&`fill_${R}`,I?G&&`fill_active_hover_${G}`:J&&`fill_hover_${J}`,K&&`icon_fill_size_${K}`,U&&`fill_disabled_${U}`,I?de&&`icon_fill_active_${de}`:ye&&`icon_fill_${ye}`,I?fe&&`icon_fill_active_hover_${fe}`:Se&&`icon_fill_hover_${Se}`,N&&me&&`icon_fill_disabled_${me}`,xe&&`shape_${xe}`,Y&&`border-color_${Y}`,Z&&`border-color_hover_${Z}`,re&&`border-width_${re}`,ee&&`border_type_${ee}`,ne&&"icon_with-badge",ce&&`centering_${ce}`,D&&"cursor_type_pointer",L&&"skeleton"),ref:a,"data-testid":n,"data-tour":c,style:Ce,onClick:D,onMouseEnter:M,onMouseLeave:W,children:[w,jsxRuntimeExports.jsxs(h,{className:clsx((g||_||D)&&"cursor_type_pointer",g||_?"icon__link":"icon__item",pe&&`icon_size_${pe}`),href:g||_,LinkComponent:"div",rel:v,target:P,children:[V,(ne||T)&&jsxRuntimeExports.jsx(C,{appearance:r(ie,ae),className:clsx(u,"icon__badge"),size:le,textColor:te,textSize:se,shape:oe,value:ne}),A&&jsxRuntimeExports.jsx(F,{appearance:ze,className:clsx(s,"icon__tooltip",j&&`alignment_${j}`),title:be,titleSize:ge,text:ue,textSize:_e})]}),X]})})),Q=e=>e.replace(/fill=".*?"/g,'fill=""').replace(/stroke=".*?"/g,'stroke=""');
7933
+ const z={sizeXXL:{size:"xxl"},sizeXL:{size:"xl"},sizeL:{size:"l"},sizeM:{size:"m"},sizeS:{size:"s"},sizeXS:{size:"xs"},sizeXXS:{size:"xxs"}},u={appearance:z};function _(r){const{appearance:i,className:a,dataTestId:o,dataTour:l,text:t,cursor:s,style:n,tag:c="span",before:S,after:p,isActive:x,isDisabled:z,isSkeleton:_,onClick:b,onDoubleClick:g,children:C}=r,v=e$1(i,u,z),P=u$1(r,v),{textAlignClass:T,textColorActiveClass:h,textColorActiveHoverClass:H,textColorClass:A,textColorDisabledClass:B,textColorHoverClass:$,textDecorationClass:w,textFontClass:F,textStyleClass:X,textTruncateClass:I,textWeightClass:k,textWrapClass:N,cursorClass:Q,sizeClass:L,widthClass:D}=P,{styles:M}=c$1(r);return jsxRuntimeExports.jsxs(c,{className:clsx(a,"text",L&&`text_size_${L}`,k&&`text-weight_${k}`,T&&`text-align_${T}`,z&&B&&`text-color_${B}`,!x&&!z&&A&&`text-color_${A}`,!x&&!z&&$&&`text-color_hover_${$}`,x&&!z&&H&&`text-color_active_hover_${H}`,x&&!z&&h&&`text-color_active_${h}`,F&&`text-font_${F}`,X&&`text-style_${X}`,N&&`word-wrap_${N}`,w&&`text-decoration_${w}`,I&&`text-truncate_${I}`,_&&"skeleton",D&&`width_${D}`,Q&&`cursor_${Q}`,b&&(s||"cursor_type_pointer")),"data-testid":o,"data-tour":l,style:Object.assign({},M,n),onClick:b,onDoubleClick:g,children:[S,C||t,p]})}const b$1={sizeXXL:{size:"xxl",textSize:"xl",iconSize:"24"},sizeXL:{size:"xl",textSize:"l",iconSize:"24"},sizeL:{size:"l",textSize:"l",iconSize:"24"},sizeM:{size:"m",textSize:"m",iconSize:"24"},sizeS:{size:"s",textSize:"s",iconSize:"24"},sizeXS:{size:"xs",textSize:"xxs",iconSize:"24"},sizeXXS:{size:"xxs",textSize:"xxs",iconSize:"24"},circular:{shape:"circular"},rounded:{shape:"rounded"},roundedXL:{shape:"rounded"},roundedL:{shape:"rounded"},roundedM:{shape:"rounded"},roundedS:{shape:"rounded"},solid:{borderColor:"none"},outlined:{fill:"none"},full:{},ghost:{fill:"none",borderColor:"none"},accentPrimary:{fill:"accentPrimary",borderColor:"accentBorderQuaternary",textColor:"accentTextPrimary",dotFill:"accentItemPrimary",iconFill:"accentItemPrimary"},accentQuaternary:{fill:"accentQuaternary",borderColor:"accentBorderQuaternary",textColor:"accentTextPrimary",dotFill:"accentItemPrimary",iconFill:"accentItemPrimary"},accentSecondary:{fill:"accentSecondary",borderColor:"accentBorderQuaternary",textColor:"accentTextQuaternary",dotFill:"accentItemQuaternary",iconFill:"accentItemQuaternary"},accentTertiary:{fill:"accentTertiary",borderColor:"accentBorderSecondary",textColor:"accentTextSecondary",dotFill:"accentItemSecondary",iconFill:"accentItemSecondary"},dangerPrimary:{fill:"dangerPrimary",borderColor:"dangerBorderPrimary",textColor:"dangerTextPrimary",dotFill:"dangerItemPrimary",iconFill:"dangerItemPrimary"},errorPrimary:{fill:"errorPrimary",fillHover:"errorHoverPrimary",textColor:"errorTextPrimary",iconFill:"errorItemPrimary"},infoPrimary:{fill:"infoPrimary",borderColor:"infoBorderSecondary",textColor:"infoTextPrimary",dotFill:"infoItemPrimary",iconFill:"infoItemPrimary"},infoSecondary:{fill:"infoSecondary",borderColor:"infoBorderSecondary",textColor:"infoTextSecondary",dotFill:"infoItemSecondary"},specialPrimary:{fill:"specialPrimary",borderColor:"specialBorderSecondary",textColor:"specialTextPrimary",dotFill:"specialItemPrimary",iconFill:"specialItemPrimary"},extraPrimary:{fill:"extraPrimary",borderColor:"extraBorderSecondary",textColor:"extraTextPrimary",dotFill:"extraItemPrimary",iconFill:"extraItemPrimary"},successPrimary:{fill:"successPrimary",borderColor:"successBorderPrimary",textColor:"successTextPrimary",dotFill:"successItemPrimary",iconFill:"successItemPrimary"},disabledPrimary:{fill:"surfacePrimary",borderColor:"surfaceBorderPrimary",textColor:"surfaceTextPrimary",iconFill:"surfaceItemPrimary"},surfacePrimary:{fill:"surfacePrimary",borderColor:"surfaceBorderTertiary",textColor:"surfaceTextPrimary",dotFill:"surfaceItemPrimary",iconFill:"surfaceItemPrimary"},surfaceQuaternary:{fill:"accentPrimary",borderColor:"surfaceBorderPrimary",textColor:"surfaceTextPrimary"},surfaceSecondary:{fill:"surfaceSecondary",borderColor:"surfaceBorderSecondary",textColor:"surfaceTextPrimary"},surfaceTertiary:{fill:"surfaceTertiary",borderColor:"surfaceBorderTertiary",textColor:"surfaceTextPrimary"},warningPrimary:{fill:"warningPrimary",borderColor:"warningBorderPrimary",textColor:"warningTextPrimary",dotFill:"warningItemPrimary",iconFill:"warningItemPrimary"}},g={appearance:b$1};function C(i){const{appearance:a,className:o,dataTestId:l,dataTour:t,dot:s,icon:n,iconSrc:c,value:S,isSkeleton:p,children:x}=i,z=Boolean(S||0===S),u=e$1(a,g),b=u$1(i,u),{fillClass:C,fillHoverClass:v,borderColorClass:P,borderColorHoverClass:T,borderTypeClass:h,borderWidthClass:H,textColor:A,textSize:B,dotFillClass:$,iconFill:w,iconShape:F,iconSize:X,shapeClass:I,sizeClass:k}=b,{styles:Q}=c$1(i);return jsxRuntimeExports.jsxs("div",{className:clsx(o,"badge",P&&`border-color_${P}`,T&&`border-color_hover_${T}`,H&&`border-width_${H}`,h&&`border_type_${h}`,C&&`fill_${C}`,v&&`fill_hover_${v}`,k&&`badge_size_${k}`,I&&`shape_${I}`,z?n?s?"badge_type_dot-icon-counter":"badge_type_icon-counter":"badge_type_counter":n?"badge_type_icon":s?"badge_type_dot":"badge_type_fill",p&&"skeleton"),"data-testid":l,"data-tour":t,style:Q,children:[s&&jsxRuntimeExports.jsx("div",{className:clsx("badge__dot",$&&`svg_fill_${$}`),children:jsxRuntimeExports.jsx("svg",{width:"6",height:"6",viewBox:"0 0 6 6",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("rect",{width:"6",height:"6",rx:"50"})})}),n&&jsxRuntimeExports.jsx(N,{className:"badge__icon",size:X,iconFill:w,imageSrc:c,shape:F,SvgImage:n}),x||z&&jsxRuntimeExports.jsx(_,{className:"badge__value",size:B,textColor:A,children:S})]})}const P$2={LinkComponent:"a"};function h(e){const{href:i,LinkComponent:o,rel:l,target:t,children:s,...n}=e;if(i){const e=o||P$2.LinkComponent;return jsxRuntimeExports.jsx(e,{href:i,rel:l,target:t,...n,children:s})}else if(o)return jsxRuntimeExports.jsx(o,{...n,children:s});return React.Children.toArray(s).filter(Boolean).map(e=>React.isValidElement(e)?React.cloneElement(e,n):e)}const H={h1:{size:"h1",iconAfterFillSize:"24",iconAfterSize:"24",iconBeforeFillSize:"24",iconBeforeSize:"24"},h2:{size:"h2",iconAfterFillSize:"24",iconAfterSize:"24",iconBeforeFillSize:"24",iconBeforeSize:"24"},h3:{size:"h3",iconAfterFillSize:"24",iconAfterSize:"24",iconBeforeFillSize:"24",iconBeforeSize:"24"},h4:{size:"h4",iconAfterFillSize:"24",iconAfterSize:"24",iconBeforeFillSize:"24",iconBeforeSize:"24"},h5:{size:"h5",iconAfterFillSize:"20",iconAfterSize:"20",iconBeforeFillSize:"20",iconBeforeSize:"20"},h6:{size:"h6",iconAfterFillSize:"16",iconAfterSize:"16",iconBeforeFillSize:"16",iconBeforeSize:"16"},disabledPrimary:{fill:"surfacePrimary",borderColor:"errorBorderQuaternary",borderHover:"errorBorderHoverQuaternary",textColor:"surfaceTextQuaternary",iconBeforeFill:"errorQuaternary"},disabledSecondary:{fill:"surfaceSecondary",borderColor:"surfaceBorderTertiary",borderHover:"surfaceBorderHoverQuaternary",iconBeforeFill:"surfaceQuaternary"},solid:{},outlined:{fill:"none"},full:{},ghost:{fill:"none"},accentPrimary:{fill:"accentPrimary",fillHover:"accentHoverPrimary"},accentSecondary:{fill:"accentPrimary",fillHover:"accentHoverPrimary"},dangerPrimary:{fill:"dangerPrimary",fillHover:"dangerHoverPrimary"},errorPrimary:{fill:"errorPrimary",fillHover:"errorHoverPrimary",textColor:"errorTextPrimary",textColorHover:"errorTextPrimary"},infoPrimary:{fill:"accentPrimary",fillHover:"accentHoverPrimary"},infoSecondary:{fill:"accentPrimary",fillHover:"accentHoverPrimary"},specialPrimary:{fill:"specialPrimary",fillHover:"specialHoverPrimary"},extraPrimary:{fill:"extraPrimary",fillHover:"extraHoverPrimary",textColor:"extraTextPrimary"},successPrimary:{fill:"successPrimary",fillHover:"successHoverPrimary"},surfacePrimary:{fill:"surfacePrimary",fillHover:"surfaceHoverPrimary"},surfaceQuaternary:{fill:"surfaceQuaternary",fillHover:"surfaceHoverQuaternary"},surfaceSecondary:{fill:"surfaceSecondary",fillHover:"surfaceHoverSecondary"},surfaceTertiary:{fill:"surfaceTertiary",fillHover:"surfaceHoverTertiary"},warningPrimary:{fill:"warningPrimary",fillHover:"warningHoverPrimary",textColor:"warningTextSecondary",textColorHover:"warningTextSecondary"},requirePrimary:{fill:"warningTertiary",borderColor:"warningBorderQuaternary",borderHover:"warningBorderQuaternary",textColor:"surfaceTextPrimary",iconBeforeFill:"warningQuaternary"},requireSecondary:{fill:"surfaceSecondary",borderColor:"surfaceBorderTertiary",borderHover:"surfaceBorderQuaternary",iconBeforeFill:"surfaceQuaternary"}},A={appearance:H};function B(i){const{appearance:a,className:l,dataTestId:t,dataTour:s,text:n,afterWrapper:c,beforeWrapper:S,style:p,tag:x="span",before:z,after:u,isActive:_,isDisabled:b,isSkeleton:g,onClick:C,children:v}=i,P=e$1(a,A,b),T=u$1(i,P),{directionClass:h,size:H,fillClass:B,fillHoverClass:$,textAlignClass:w,textColorActiveClass:F,textColorActiveHoverClass:X,textColorClass:I,textColorDisabledClass:k,textColorHoverClass:Q,textFontClass:L,textStyleClass:D,textTruncateClass:M,textWeightClass:W,textWrap:V,heightClass:E,iconAfter:O,iconAfterFill:j,iconAfterFillIcon:q,iconAfterFillSize:G,iconAfterShape:R,iconAfterSize:U,iconAfterSrc:J,iconBadgeAppearance:K,iconBadgeShape:Y,iconBadgeSize:Z,iconBadgeTextColor:ee,iconBadgeTextSize:re,iconBadgeValue:ie,iconBefore:ae,iconBeforeFill:oe,iconBeforeFillIcon:le,iconBeforeFillSize:te,iconBeforeShape:se,iconBeforeSize:ne,iconBeforeSrc:ce,svgFillClass:de,svgFillHoverClass:fe,widthClass:ye,wrapperDirectionClass:me,onClickIconAfter:Se,onClickIconBefore:pe}=T,{styles:xe,wrapper:ze}=c$1(i),ue=React.useMemo(()=>x||(H||"span"),[x,H]);return jsxRuntimeExports.jsxs(ue,{className:clsx(l,"title",B&&`fill_${B}`,$&&`fill_hover_${$}`,de&&`svg_fill_${de}`,fe&&`svg_fill_hover_${fe}`,ye&&`width_${ye}`,E&&`height_${E}`,H&&`title_size_${H}`,h&&`title_direction_${h}`,b&&k&&`text-color_${k}`,!_&&!b&&I&&`text text-color_${I}`,_&&!b&&F&&`text-color_active_${F}`,!_&&!b&&Q&&`text-color_hover_${Q}`,_&&!b&&X&&`text-color_active_hover${X}`,L&&`text-font_${L}`,D&&`text-style_${D}`,W&&`text-weight_${W}`,V&&`word-wrap_${V}`,ie&&"title_badge",g&&"skeleton"),"data-testid":t,"data-tour":s,style:Object.assign({},xe,p),onClick:C,children:[z,jsxRuntimeExports.jsxs("span",{className:clsx(w&&`text-align_${w}`,me&&`title_direction_${me}`,"title__wrapper",M&&`text-truncate_${M}`),style:ze,children:[(ae||ce)&&jsxRuntimeExports.jsx(N,{className:clsx("title__icon_before",ie&&"title__icon_before-badge"),fill:oe,fillSize:te,badgeAppearance:K,badgeClass:"title__icon_before_badge",badgeShape:Y,badgeSize:Z,badgeTextColor:ee,badgeTextSize:re,badgeValue:ie,iconFill:le,iconSize:ne,imageSrc:ce,shape:se,SvgImage:ae,onClick:pe}),S,v||n,c,(O||J)&&jsxRuntimeExports.jsx(N,{className:clsx("title__icon_after",ie&&"title__icon_after-badge"),fill:j,fillSize:G,badgeAppearance:K,badgeClass:"title__icon_after_badge",badgeShape:Y,badgeSize:Z,badgeTextColor:ee,badgeTextSize:re,badgeValue:ie,iconFill:q,iconSize:U,imageSrc:J,shape:R,SvgImage:O,onClick:Se})]}),u]})}const $={defaultPrimary:{fill:"surfacePrimary",fillHover:"surfaceHoverPrimary",titleColor:"surfaceTextPrimary",borderColor:"surfaceBorderPrimary",textColor:"surfaceTextPrimary"},sizeL:{size:"l",titleSize:"h5",textSize:"s"},sizeM:{size:"m",titleSize:"h5",textSize:"s"},sizeS:{size:"s",titleSize:"h5",textSize:"s"},disabledPrimary:{fill:"disabledPrimary",fillHover:"disabledHoverPrimary",titleColor:"surfaceTextPrimary",textColor:"surfaceTextPrimary"},requirePrimary:{fill:"warningPrimary",fillHover:"warningHoverPrimary",titleColor:"warningTextPrimary",borderColor:"warningBorderPrimary",textColor:"warningTextPrimary"},circular:{shape:"circular"},rounded:{shape:"rounded"},roundedXL:{shape:"rounded"},roundedL:{shape:"rounded"},roundedM:{shape:"rounded"},roundedS:{shape:"rounded"},solid:{borderColor:"none"},outlined:{fill:"none"},full:{},ghost:{fill:"none",borderColor:"none"},errorPrimary:{fill:"errorPrimary",fillHover:"errorHoverPrimary",titleColor:"errorTextPrimary",borderColor:"errorBorderPrimary",textColor:"errorTextPrimary"},successPrimary:{fill:"successPrimary",fillHover:"successHoverPrimary",titleColor:"successTextPrimary",borderColor:"successBorderPrimary",textColor:"successTextPrimary"}},w={appearance:$},F=React.forwardRef(function(i,a){const{appearance:o,className:c,dataTestId:S,dataTour:p,initialIsVisible:x,title:z,text:u,before:b,after:g,openTimeoutDelay:C=500,closeTimeoutDelay:v=250,isSkeleton:P,children:T}=i,h=React.useRef(null),H=React.useRef(null),A=React.useRef(null),$=React.useRef(false),[F,X]=React.useState(x),I=React.useCallback(()=>{$.current||(H.current&&clearTimeout(H.current),A.current=setTimeout(()=>{X(true);},C));},[C]),k=React.useCallback(()=>{A.current&&clearTimeout(A.current),H.current=setTimeout(()=>{X(e=>(true===e&&($.current=true),false));},v);},[v]),N=React.useCallback(()=>{$.current=false;},[]);React.useImperativeHandle(a,()=>({get tooltipElement(){return h.current},openTooltip:I,closeTooltip:k,isTooltipVisible:F}),[F,I,k]);const Q=e$1(o,w),L=u$1(i,Q),{alignClass:D,alignDirectionClass:M,alignmentClass:W,alignPosition:V,fillClass:E,titleColor:O,titleSize:j,titleWeight:q,borderColorClass:G,borderTypeClass:R,borderWidthClass:U,textColor:J,textSize:K,textWeight:Y,arrowPosition:Z,elevationClass:ee,shapeClass:re,sizeClass:ie,widthClass:ae}=L,{styles:oe}=c$1(i);return jsxRuntimeExports.jsxs("div",{className:clsx(c,"tooltip",V&&`tooltip_align-position_${V}`,M&&`align_${M}`,D&&`align_${D}`,ee&&`elevation_${ee}`,W&&`alignment_${W}`,ie&&`tooltip_size_${ie}`,P&&"skeleton",ae&&`width_${ae}`),ref:h,"data-testid":S,"data-tour":p,style:oe,onAnimationEnd:N,children:[Z&&jsxRuntimeExports.jsx("div",{className:clsx("tooltip__arrow",Z&&`tooltip__arrow_position_${Z}`,E&&`fill_${E}`),children:" "}),b,jsxRuntimeExports.jsxs("div",{className:clsx("tooltip__inner",U&&`border-width_${U}`,G&&`border-color_${G}`,R&&`border_type_${R}`,E&&`fill_${E}`,re&&`shape_${re}`),children:[z&&jsxRuntimeExports.jsx(B,{className:"tooltip__title text",size:j,textColor:O,textWeight:q,children:z}),u&&jsxRuntimeExports.jsx(_,{className:"tooltip__text",size:K,textColor:J,textWeight:Y,children:u}),T]}),g]})}),I$1={disabledPrimary:{fill:"surfacePrimary",borderColor:"surfaceBorderPrimary",badgeAppearance:"surfacePrimary",iconFill:"surfaceItemQuaternary"},size12_12:{fillSize:"12",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"12"},size14_12:{fillSize:"14",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"12"},size14_14:{fillSize:"14",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"14"},size16_12:{fillSize:"16",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"12"},size16_14:{fillSize:"16",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"14"},size16_16:{fillSize:"16",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"16"},size20_12:{fillSize:"20",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"12"},size20_14:{fillSize:"20",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"14"},size20_16:{fillSize:"20",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"16"},size20_20:{fillSize:"20",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"20"},size24_12:{fillSize:"24",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"12"},size24_14:{fillSize:"24",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"14"},size24_16:{fillSize:"24",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"16"},size24_20:{fillSize:"24",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"20"},size24_24:{fillSize:"24",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"24"},size32_12:{fillSize:"32",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"12"},size32_14:{fillSize:"32",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"14"},size32_16:{fillSize:"32",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"16"},size32_20:{fillSize:"32",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"20"},size32_24:{fillSize:"32",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"24"},size32_32:{fillSize:"32",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"32"},size40_12:{fillSize:"40",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"12"},size40_14:{fillSize:"40",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"14"},size40_16:{fillSize:"40",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"16"},size40_20:{fillSize:"40",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"20"},size40_24:{fillSize:"40",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"24"},size40_32:{fillSize:"40",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"32"},size40_40:{fillSize:"40",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"40"},solid:{borderColor:"none"},outlined:{fill:"none"},full:{},ghost:{fill:"none",borderColor:"none"},accentPrimary:{fill:"accentPrimary",fillHover:"accentHoverPrimary",borderColor:"accentBorderPrimary",badgeAppearance:"surfacePrimary",iconFill:"accentItemPrimary"},accentSecondary:{fill:"accentPrimary",fillHover:"accentHoverPrimary",borderColor:"accentBorderPrimary",iconFill:"accentItemPrimary"},circular:{shape:"circular"},rounded:{shape:"rounded"},roundedXL:{shape:"rounded"},roundedL:{shape:"rounded"},roundedM:{shape:"rounded"},roundedS:{shape:"rounded"},dangerPrimary:{fill:"dangerPrimary",fillHover:"dangerHoverPrimary",borderColor:"dangerBorderSecondary",badgeAppearance:"surfacePrimary",iconFill:"dangerItemPrimary"},errorPrimary:{fill:"errorPrimary",fillHover:"errorHoverPrimary",borderColor:"errorBorderPrimary",badgeAppearance:"surfacePrimary",iconFill:"errorItemPrimary"},infoPrimary:{fill:"infoPrimary",borderColor:"infoBorderPrimary",badgeAppearance:"surfacePrimary",iconFill:"infoItemPrimary"},infoSecondary:{fill:"accentPrimary",fillHover:"accentHoverPrimary",borderColor:"accentBorderPrimary",iconFill:"infoItemSecondary"},specialPrimary:{fill:"specialPrimary",fillHover:"specialHoverPrimary",borderColor:"specialBorderQuaternary",badgeAppearance:"surfacePrimary",iconFill:"specialItemPrimary"},extraPrimary:{fill:"extraPrimary",fillHover:"extraHoverPrimary",borderColor:"extraBorderQuaternary",badgeAppearance:"surfacePrimary",iconFill:"extraItemPrimary"},successPrimary:{fill:"successPrimary",fillHover:"successHoverPrimary",borderColor:"successBorderPrimary",badgeAppearance:"surfacePrimary",iconFill:"successItemPrimary"},surfacePrimary:{fill:"surfacePrimary",fillHover:"surfaceHoverSecondary",borderColor:"surfaceBorderTertiary",badgeAppearance:"surfacePrimary",iconFill:"surfaceItemPrimary"},surfaceQuaternary:{fill:"surfaceQuaternary",fillHover:"surfaceHoverQuaternary",badgeAppearance:"accentPrimary",iconFill:"surfaceItemPrimary"},surfaceSecondary:{fill:"surfaceSecondary",fillHover:"surfaceHoverTertiary",badgeAppearance:"accentPrimary solid rounded",iconFill:"surfaceItemPrimary"},surfaceTertiary:{fill:"surfaceTertiary",fillHover:"surfaceHoverTertiary",badgeAppearance:"accentPrimary",iconFill:"surfaceItemPrimary"},warningPrimary:{fill:"warningPrimary",fillHover:"warningHoverPrimary",borderColor:"warningBorderSecondary",badgeAppearance:"surfacePrimary",iconFill:"warningItemPrimary"}},k={appearance:I$1},N=f$1(React.forwardRef(function(i,a){const{id:l,appearance:t,className:s,dataTestId:n,dataTour:c,width:p,height:z,badgeClass:u,href:_,imageSrc:b,link:g,linkRel:v,linkTarget:P,notification:T,saveFillStroke:H,showTooltip:A,SvgImage:B,svgImageStyles:$,before:w,after:X,isActive:I,isDisabled:N,isSkeleton:L,onClick:D,onMouseEnter:M,onMouseLeave:W}=i,V=React.useMemo(()=>{if(B){const e=B,i={};return p&&(i.width=p),z&&(i.height=z),jsxRuntimeExports.jsx(e,{...i,...$})}return b?b.endsWith(".svg")?jsxRuntimeExports.jsx(InlineSVG,H?{src:b}:{src:b,preProcessor:Q}):jsxRuntimeExports.jsx("img",{src:b}):null},[B,b,p,z,$,H]),E=e$1(t,k,N),O=u$1(i,E),{alignmentClass:j,fillActiveClass:q,fillActiveHoverClass:G,fillClass:R,fillDisabledClass:U,fillHoverClass:J,fillSizeClass:K,borderColorClass:Y,borderColorHoverClass:Z,borderTypeClass:ee,borderWidthClass:re,badgeAppearance:ie,badgeAppearanceSize:ae,badgeShape:oe,badgeSize:le,badgeTextColor:te,badgeTextSize:se,badgeValue:ne,centeringClass:ce,iconFillActiveClass:de,iconFillActiveHoverClass:fe,iconFillClass:ye,iconFillDisabledClass:me,iconFillHoverClass:Se,iconSizeClass:pe,shapeClass:xe,tooltipAppearance:ze,tooltipText:ue,tooltipTextSize:_e,tooltipTitle:be,tooltipTitleSize:ge}=O,{styles:Ce}=c$1(i);return jsxRuntimeExports.jsxs("div",{id:l,className:clsx(s,"icon",I?q&&`fill_active_${q}`:R&&`fill_${R}`,I?G&&`fill_active_hover_${G}`:J&&`fill_hover_${J}`,K&&`icon_fill_size_${K}`,U&&`fill_disabled_${U}`,I?de&&`icon_fill_active_${de}`:ye&&`icon_fill_${ye}`,I?fe&&`icon_fill_active_hover_${fe}`:Se&&`icon_fill_hover_${Se}`,N&&me&&`icon_fill_disabled_${me}`,xe&&`shape_${xe}`,Y&&`border-color_${Y}`,Z&&`border-color_hover_${Z}`,re&&`border-width_${re}`,ee&&`border_type_${ee}`,ne&&"icon_with-badge",ce&&`centering_${ce}`,D&&"cursor_type_pointer",L&&"skeleton"),ref:a,"data-testid":n,"data-tour":c,style:Ce,onClick:D,onMouseEnter:M,onMouseLeave:W,children:[w,jsxRuntimeExports.jsxs(h,{className:clsx((g||_||D)&&"cursor_type_pointer",g||_?"icon__link":"icon__item",pe&&`icon_size_${pe}`),href:g||_,LinkComponent:"div",rel:v,target:P,children:[V,(ne||T)&&jsxRuntimeExports.jsx(C,{appearance:r(ie,ae),className:clsx(u,"icon__badge"),size:le,textColor:te,textSize:se,shape:oe,value:ne}),A&&jsxRuntimeExports.jsx(F,{appearance:ze,className:clsx(s,"icon__tooltip",j&&`alignment_${j}`),title:be,titleSize:ge,text:ue,textSize:_e})]}),X]})})),Q=e=>e.replace(/fill=".*?"/g,'fill=""').replace(/stroke=".*?"/g,'stroke=""');
7887
7934
 
7888
- const t={accentPrimary:{fill:"accentPrimary",borderColor:"surfaceBorderSecondary",itemFill:"accentItemPrimary"},accentTertiary:{fill:"accentTertiary",borderColor:"surfaceBorderSecondary",itemFill:"accentItemSecondary"},specialPrimary:{fill:"specialPrimary",borderColor:"surfaceBorderSecondary",itemFill:"specialItemPrimary"},sizeL:{size:"l",textSize:"m"},sizeM:{size:"m",textSize:"s"},sizeS:{size:"s",textSize:"xs"},extraPrimary:{fill:"extraPrimary",borderColor:"surfaceBorderSecondary",itemFill:"extraItemPrimary"},surfacePrimary:{fill:"surfacePrimary",borderColor:"surfaceBorderPrimary",itemFill:"surfaceItemPrimary"},surfaceSecondary:{fill:"surfaceSecondary",borderColor:"surfaceBorderPrimary",itemFill:"surfaceItemPrimary"},surfaceTertiary:{fill:"surfaceTertiary",borderColor:"surfaceBorderPrimary",itemFill:"surfaceItemPrimary"},warningPrimary:{fill:"warningPrimary",borderColor:"surfaceBorderSecondary",itemFill:"warningItemPrimary"},successPrimary:{fill:"successPrimary",borderColor:"surfaceBorderSecondary",itemFill:"successItemPrimary"},infoPrimary:{fill:"infoPrimary",borderColor:"surfaceBorderSecondary",itemFill:"infoItemPrimary"},dangerPrimary:{fill:"dangerPrimary",borderColor:"surfaceBorderSecondary",itemFill:"dangerItemPrimary"},errorPrimary:{fill:"errorPrimary",borderColor:"surfaceBorderSecondary",itemFill:"errorItemPrimary"},solid:{borderColor:"none"},outlined:{fill:"none"},full:{},ghost:{fill:"none",borderColor:"none"}},c={appearance:t};function m(t){const{appearance:m,className:d,dataTestId:n,dataTour:y,type:f="dot",text:u,isDisabled:P,isSkeleton:p,children:C}=t,_=e$1(m,c,P),S=u$1(t,_),{fillClass:b,borderColorClass:h,textColor:x,textSize:z,heightClass:F,itemFillClass:I,shapeClass:B,sizeClass:$,widthClass:g}=S,{styles:N}=c$1(t);return jsxRuntimeExports.jsxs("div",{className:clsx("loader",d,g&&`width_${g}`,F&&`height_${F}`,b&&`fill_${b}`,$&&`loader_size_${$}`,p&&"skeleton",f&&`loader_type_${f}`,B&&`shape_${B}`),"data-testid":n,"data-tour":y,style:N,children:[C||jsxRuntimeExports.jsxs("div",{className:"loader__inner",children:[jsxRuntimeExports.jsx("span",{className:clsx("loader__item",I&&`fill_${I}`,"circular"===f&&`border-color_${h}`),children:" "}),jsxRuntimeExports.jsx("span",{className:clsx("loader__item",I&&`fill_${I}`),children:" "}),jsxRuntimeExports.jsx("span",{className:clsx("loader__item",I&&`fill_${I}`),children:" "})]}),u&&jsxRuntimeExports.jsx(_$1,{className:"loader__text",size:z,textColor:x,children:u})]})}
7935
+ const t={accentPrimary:{fill:"accentPrimary",borderColor:"surfaceBorderSecondary",itemFill:"accentItemPrimary"},accentTertiary:{fill:"accentTertiary",borderColor:"surfaceBorderSecondary",itemFill:"accentItemSecondary"},specialPrimary:{fill:"specialPrimary",borderColor:"surfaceBorderSecondary",itemFill:"specialItemPrimary"},sizeL:{size:"l",textSize:"m"},sizeM:{size:"m",textSize:"s"},sizeS:{size:"s",textSize:"xs"},extraPrimary:{fill:"extraPrimary",borderColor:"surfaceBorderSecondary",itemFill:"extraItemPrimary"},surfacePrimary:{fill:"surfacePrimary",borderColor:"surfaceBorderPrimary",itemFill:"surfaceItemPrimary"},surfaceSecondary:{fill:"surfaceSecondary",borderColor:"surfaceBorderPrimary",itemFill:"surfaceItemPrimary"},surfaceTertiary:{fill:"surfaceTertiary",borderColor:"surfaceBorderPrimary",itemFill:"surfaceItemPrimary"},warningPrimary:{fill:"warningPrimary",borderColor:"surfaceBorderSecondary",itemFill:"warningItemPrimary"},successPrimary:{fill:"successPrimary",borderColor:"surfaceBorderSecondary",itemFill:"successItemPrimary"},infoPrimary:{fill:"infoPrimary",borderColor:"surfaceBorderSecondary",itemFill:"infoItemPrimary"},dangerPrimary:{fill:"dangerPrimary",borderColor:"surfaceBorderSecondary",itemFill:"dangerItemPrimary"},errorPrimary:{fill:"errorPrimary",borderColor:"surfaceBorderSecondary",itemFill:"errorItemPrimary"},solid:{borderColor:"none"},outlined:{fill:"none"},full:{},ghost:{fill:"none",borderColor:"none"}},c={appearance:t};function m(t){const{appearance:m,className:d,dataTestId:n,dataTour:y,type:f="dot",text:u,isDisabled:P,isSkeleton:p,children:C}=t,_$1=e$1(m,c,P),S=u$1(t,_$1),{fillClass:b,borderColorClass:h,textColor:x,textSize:z,heightClass:F,itemFillClass:I,shapeClass:B,sizeClass:$,widthClass:g}=S,{styles:N}=c$1(t);return jsxRuntimeExports.jsxs("div",{className:clsx("loader",d,g&&`width_${g}`,F&&`height_${F}`,b&&`fill_${b}`,$&&`loader_size_${$}`,p&&"skeleton",f&&`loader_type_${f}`,B&&`shape_${B}`),"data-testid":n,"data-tour":y,style:N,children:[C||jsxRuntimeExports.jsxs("div",{className:"loader__inner",children:[jsxRuntimeExports.jsx("span",{className:clsx("loader__item",I&&`fill_${I}`,"circular"===f&&`border-color_${h}`),children:" "}),jsxRuntimeExports.jsx("span",{className:clsx("loader__item",I&&`fill_${I}`),children:" "}),jsxRuntimeExports.jsx("span",{className:clsx("loader__item",I&&`fill_${I}`),children:" "})]}),u&&jsxRuntimeExports.jsx(_,{className:"loader__text",size:z,textColor:x,children:u})]})}
7889
7936
 
7890
- const I="holding",P$1="idle";const T={sizeXXL:{size:"xxl",labelTextSize:"xl",iconAfterAppearanceSize:"size24_24",iconBeforeAppearanceSize:"size24_24",loaderAppearanceSize:"sizeL"},sizeXL:{size:"xl",labelTextSize:"l",iconAfterAppearanceSize:"size24_24",iconBeforeAppearanceSize:"size24_24",loaderAppearanceSize:"sizeL"},sizeL:{size:"l",labelTextSize:"l",iconAfterAppearanceSize:"size24_24",iconBeforeAppearanceSize:"size24_24",loaderAppearanceSize:"sizeL"},sizeM:{size:"m",labelTextSize:"m",iconAfterAppearanceSize:"size24_24",iconBeforeAppearanceSize:"size24_24",loaderAppearanceSize:"sizeL"},sizeS:{size:"s",labelTextSize:"s",iconAfterAppearanceSize:"size20_20",iconBeforeAppearanceSize:"size20_20",loaderAppearanceSize:"sizeL"},sizeXS:{size:"xs",labelTextSize:"xs",iconAfterAppearanceSize:"size16_16",iconBeforeAppearanceSize:"size16_16",loaderAppearanceSize:"sizeL"},sizeXXS:{size:"xxs",labelTextSize:"xs",iconAfterAppearanceSize:"size14_14",iconBeforeAppearanceSize:"size14_14",loaderAppearanceSize:"sizeL"},circular:{shape:"circular"},rounded:{shape:"rounded"},roundedXL:{shape:"rounded"},roundedL:{shape:"rounded"},roundedM:{shape:"rounded"},roundedS:{shape:"rounded"},solid:{borderColor:"none"},outlined:{fill:"none"},full:{},ghost:{fill:"none",borderColor:"none"},accentMutedPrimary:{fill:"accentTertiary",fillHover:"accentHoverTertiary",labelTextColor:"accentTextQuaternary",labelTextColorHover:"accentTextQuaternary",borderColor:"accentBorderSecondary",iconAfterFillIcon:"accentItemQuaternary",iconBeforeFillIcon:"accentItemQuaternary",iconFillIcon:"accentItemQuaternary",loaderAppearance:"accentTertiary"},accentPrimary:{fill:"accentPrimary",fillHover:"accentHoverPrimary",labelTextColor:"accentTextPrimary",labelTextColorHover:"accentTextPrimary",borderColor:"accentBorderPrimary",iconAfterFillIcon:"accentItemPrimary",iconBeforeFillIcon:"accentItemPrimary",iconFillIcon:"accentItemPrimary",loaderAppearance:"accentPrimary"},accentSecondary:{fill:"accentPrimary",fillHover:"accentHoverPrimary",labelTextColor:"accentTextSecondary",labelTextColorHover:"accentTextSecondary",borderColor:"accentBorderPrimary",iconAfterFillIcon:"accentItemPrimary",iconBeforeFillIcon:"accentItemPrimary",iconFillIcon:"accentItemPrimary",loaderAppearance:"accentPrimary"},dangerMutedPrimary:{fill:"dangerTertiary",fillHover:"dangerHoverPrimary",labelTextColor:"dangerTextQuaternary",labelTextColorHover:"dangerTextQuaternary",borderColor:"dangerBorderSecondary",iconAfterFillIcon:"dangerItemQuaternary",iconBeforeFillIcon:"dangerItemQuaternary",iconFillIcon:"dangerItemQuaternary",loaderAppearance:"dangerTertiary"},dangerPrimary:{fill:"dangerPrimary",fillHover:"dangerHoverPrimary",labelTextColor:"dangerTextPrimary",labelTextColorHover:"dangerTextPrimary",iconAfterFillIcon:"dangerItemPrimary",iconBeforeFillIcon:"dangerItemPrimary",iconFillIcon:"dangerItemPrimary",loaderAppearance:"dangerPrimary"},errorMutedPrimary:{fill:"errorTertiary",fillHover:"errorHoverPrimary",labelTextColor:"errorTextQuaternary",labelTextColorHover:"errorTextQuaternary",borderColor:"errorBorderSecondary",iconAfterFillIcon:"errorItemQuaternary",iconBeforeFillIcon:"errorItemQuaternary",iconFillIcon:"errorItemQuaternary",loaderAppearance:"errorTertiary"},errorPrimary:{fill:"errorPrimary",fillHover:"errorHoverPrimary",labelTextColor:"errorTextPrimary",labelTextColorHover:"errorTextPrimary",iconAfterFillIcon:"errorItemPrimary",iconBeforeFillIcon:"errorItemPrimary",iconFillIcon:"errorItemPrimary",loaderAppearance:"errorPrimary"},infoMutedPrimary:{fill:"infoTertiary",fillHover:"infoHoverTertiary",labelTextColor:"infoTextSecondary",labelTextColorHover:"infoTextSecondary",borderColor:"infoBorderSecondary",iconAfterFillIcon:"infoItemSecondary",iconBeforeFillIcon:"infoItemSecondary",iconFillIcon:"infoItemSecondary",loaderAppearance:"infoTertiary"},infoPrimary:{fill:"infoPrimary",fillHover:"infoHoverPrimary",labelTextColor:"infoTextPrimary",labelTextColorHover:"infoTextPrimary",borderColor:"infoBorderPrimary",iconAfterFillIcon:"infoItemPrimary",iconBeforeFillIcon:"infoItemPrimary",iconFillIcon:"infoItemPrimary",loaderAppearance:"infoPrimary"},infoSecondary:{fill:"infoPrimary",fillHover:"infoHoverPrimary",labelTextColor:"infoTextSecondary",labelTextColorHover:"infoTextSecondary",borderColor:"infoBorderPrimary",iconAfterFillIcon:"infoItemPrimary",iconBeforeFillIcon:"infoItemPrimary",iconFillIcon:"infoItemPrimary",loaderAppearance:"infoPrimary"},specialMutedPrimary:{fill:"specialTertiary",fillHover:"specialHoverPrimary",labelTextColor:"specialTextSecondary",borderColor:"specialBorderTertiary",iconAfterFillIcon:"specialItemSecondary",iconBeforeFillIcon:"specialItemSecondary",iconFillIcon:"specialItemSecondary",loaderAppearance:"specialTertiary"},specialPrimary:{fill:"specialPrimary",fillHover:"specialHoverPrimary",labelTextColor:"specialTextPrimary",iconAfterFillIcon:"specialItemPrimary",iconBeforeFillIcon:"specialItemPrimary",iconFillIcon:"specialItemPrimary",loaderAppearance:"specialPrimary"},extraMutedPrimary:{fill:"extraTertiary",fillHover:"extraHoverPrimary",labelTextColor:"extraTextQuaternary",borderColor:"extraBorderSecondary",iconAfterFillIcon:"extraItemQuaternary",iconBeforeFillIcon:"extraItemQuaternary",iconFillIcon:"extraItemQuaternary",loaderAppearance:"extraPrimary"},extraPrimary:{fill:"extraPrimary",fillHover:"extraHoverPrimary",labelTextColor:"extraTextPrimary",iconAfterFillIcon:"extraItemPrimary",iconBeforeFillIcon:"extraItemPrimary",iconFillIcon:"extraItemPrimary",loaderAppearance:"extraPrimary"},successMutedPrimary:{fill:"successTertiary",fillHover:"successHoverPrimary",labelTextColor:"successTextQuaternary",labelTextColorHover:"successTextQuaternary",borderColor:"successBorderQuaternary",iconAfterFillIcon:"successItemQuaternary",iconBeforeFillIcon:"successItemQuaternary",iconFillIcon:"successItemQuaternary",loaderAppearance:"successTertiary"},successPrimary:{fill:"successPrimary",fillHover:"successHoverPrimary",labelTextColor:"successTextPrimary",labelTextColorHover:"successTextPrimary",iconAfterFillIcon:"successItemPrimary",iconBeforeFillIcon:"successItemPrimary",iconFillIcon:"successItemPrimary",loaderAppearance:"successPrimary"},surfaceMutedPrimary:{fill:"surfaceTertiary",fillHover:"surfaceTertiary",labelTextColor:"surfaceTextQuaternary",borderColor:"surfaceBorderQuaternary",iconAfterFillIcon:"surfaceItemQuaternary",iconBeforeFillIcon:"surfaceItemQuaternary",iconFillIcon:"surfaceItemQuaternary",loaderAppearance:"surfaceTertiary"},surfacePrimary:{fill:"surfacePrimary",fillHover:"surfaceSecondary",labelTextColor:"surfaceTextPrimary",borderColor:"surfaceBorderTertiary",iconAfterFillIcon:"surfaceItemPrimary",iconBeforeFillIcon:"surfaceItemPrimary",iconFillIcon:"surfaceItemPrimary",loaderAppearance:"surfacePrimary"},surfaceQuaternary:{fill:"surfaceTertiary",fillHover:"surfaceTertiary",labelTextColor:"surfaceTextPrimary",borderColor:"surfaceBorderTertiary",iconAfterFillIcon:"surfaceItemPrimary",iconBeforeFillIcon:"surfaceItemPrimary",iconFillIcon:"surfaceItemPrimary",loaderAppearance:"surfacePrimary"},surfaceSecondary:{fill:"surfaceSecondary",fillHover:"surfaceTertiary",labelTextColor:"surfaceTextPrimary",borderColor:"surfaceBorderTertiary",iconAfterFillIcon:"surfaceItemPrimary",iconBeforeFillIcon:"surfaceItemPrimary",iconFillIcon:"surfaceItemPrimary",loaderAppearance:"surfacePrimary"},surfaceTertiary:{fill:"surfaceTertiary",fillHover:"surfaceSecondary",labelTextColor:"surfaceTextPrimary",iconAfterFillIcon:"surfaceItemPrimary",iconBeforeFillIcon:"surfaceItemPrimary",iconFillIcon:"surfaceItemPrimary",loaderAppearance:"surfacePrimary"},warningMutedPrimary:{fill:"warningTertiary",fillHover:"warningHoverPrimary",labelTextColor:"warningTextSecondary",labelTextColorHover:"warningTextPrimary",borderColor:"warningBorderPrimary",iconAfterFillIcon:"warningItemSecondary",iconBeforeFillIcon:"warningItemSecondary",iconFillIcon:"warningItemSecondary",loaderAppearance:"warningTertiary"},warningPrimary:{fill:"warningPrimary",fillHover:"warningHoverPrimary",labelTextColor:"warningTextPrimary",labelTextColorHover:"warningTextPrimary",iconAfterFillIcon:"warningItemPrimary",iconBeforeFillIcon:"warningItemPrimary",iconFillIcon:"warningItemPrimary",loaderAppearance:"warningPrimary"}},x$1={appearance:T},b=React.forwardRef(function(a,T){const{appearance:b,className:A,dataTestId:S,dataTour:F,label:z,Badge:C,href:_,htmlType:v="button",link:H,rel:g,target:B,tooltip:h$1,before:Q,after:w,isDisabled:L,isHolding:M,isLoading:$=false,onClick:N$1,onHoldComplete:k,onMouseDown:X,children:D}=a,W=e$1(b,x$1,L),j=u$1(a,W),{fillClass:q,fillHoverClass:E,labelTextColor:G,labelTextColorHover:R,labelTextSize:U,labelTextTruncate:J,labelTextWeight:K,labelTextWidth:O,labelTextWrap:V,borderColorClass:Y,borderTypeClass:Z,borderWidthClass:ee,elevationClass:re,icon:ae,iconAfter:oe,iconAfterAppearance:ie,iconAfterAppearanceSize:le,iconAfterFill:ne,iconAfterFillIcon:te,iconAfterFillSize:ce,iconAfterShape:se,iconAfterSize:me,iconAfterSrc:fe,iconAppearance:ye,iconAppearanceSize:de,iconBefore:pe,iconBeforeAppearance:ue,iconBeforeAppearanceSize:Ie,iconBeforeFill:Pe,iconBeforeFillIcon:Te,iconBeforeFillSize:xe,iconBeforeShape:be,iconBeforeSize:Ae,iconBeforeSrc:Se,iconFill:Fe,iconFillIcon:ze,iconFillSize:Ce,iconShape:_e,iconSize:ve,iconSrc:He,loaderAppearance:ge,loaderAppearanceSize:Be,loaderFill:he,loaderItemFill:Qe,loaderSize:we,loaderType:Le="dot",shapeClass:Me,sizeClass:$e,widthClass:Ne,zeroGap:ke,zeroPadding:Xe,isSkeleton:De}=j,{label:We,styles:je}=c$1(a),{holdState:qe,onHoldEnd:Ee,onHoldStart:Ge}=function(e){const{holdDurationMs:r=500,isHolding:a,onHoldComplete:t}=e,c=React.useRef(null),s=React.useRef(t),[m,f]=React.useState(P$1),y=React.useRef(0);s.current=t,React.useEffect(()=>(c.current=requestAnimationFrame(function e(){if(m===I&&1===y.current&&s.current&&s.current(),m===I&&y.current<1){const a=y.current,o=Math.min(a+16/r,1);y.current=o,c.current=requestAnimationFrame(e);}if(m===P$1&&y.current>0){const a=y.current,o=Math.max(a-16/r,0);y.current=o,c.current=requestAnimationFrame(e);}}),()=>{c.current&&cancelAnimationFrame(c.current);}),[m,r]);const d=React.useCallback(e=>{a&&("touch"!==e.pointerType&&0!==e.button||f(I));},[a]),p=React.useCallback(e=>{f(P$1);},[]);return {holdState:m,onHoldEnd:p,onHoldStart:d}}({holdDurationMs:500,isHolding:M,onHoldComplete:k}),Re=w||Q||ae||oe||fe||pe||Se||He;return jsxRuntimeExports.jsx(h,{className:clsx(A,"button",z&&Re?"button_type_default":z?"button_type_label":Re?"button_type_icon":"",ee&&`border-width_${ee}`,Y&&`border-color_${Y}`,Z&&`border_type_${Z}`,q&&`fill_${q}`,E&&!L&&`fill_hover_${E}`,Me&&`shape_${Me}`,$e&&`button_size_${$e}`,Ne&&`button_width_${Ne}`,re&&`elevation_${re}`,N$1&&"cursor_type_pointer",L&&"button_state_disabled cursor_type_default",C&&"button_type_badge",Xe&&"button_reset-padding",ke&&"button_reset-gap",$&&"button_state_loading",De&&"skeleton",M&&"button_holding",qe&&`button_state_${qe}`),type:v,title:h$1,"data-testid":S&&`${S}-button`,"data-tour":F,disabled:L,href:H||_,LinkComponent:"button",rel:g,style:je,target:B,onClick:N$1,onMouseDown:X,onPointerCancel:Ee,onPointerDown:Ge,onPointerLeave:Ee,onPointerUp:Ee,children:jsxRuntimeExports.jsxs("div",{className:"button__wrapper",ref:T,children:[M&&jsxRuntimeExports.jsx("div",{className:clsx("button__indication",`button__indication_${qe}`),children:jsxRuntimeExports.jsx("div",{className:"button__indication-item",children:" "})}),$&&jsxRuntimeExports.jsx(m,{appearance:r(ge,Be),className:clsx(A,"button__loader"),type:Le,size:we,fill:he,itemFill:Qe}),Q,(pe||Se)&&jsxRuntimeExports.jsx(N,{appearance:r(ue,Ie),className:"button__icon_before",fill:Pe,fillSize:xe,iconFill:Te,iconSize:Ae,imageSrc:Se,shape:be,SvgImage:pe}),(ae||He)&&jsxRuntimeExports.jsx(N,{appearance:r(ye,de),className:"button__icon",fill:Fe,fillSize:Ce,iconFill:ze,iconSize:ve,imageSrc:He,shape:_e,SvgImage:ae}),(D||z)&&jsxRuntimeExports.jsx(_$1,{className:"button__label",width:O,size:U,textColor:G,textColorHover:R,textTruncate:J,textWeight:K,textWrap:V,style:We,children:D||z}),(oe||fe)&&jsxRuntimeExports.jsx(N,{appearance:r(ie,le),className:"button__icon_after",fill:ne,fillSize:ce,iconFill:te,iconSize:me,imageSrc:fe,shape:se,SvgImage:oe}),C,w]})})});
7937
+ const I="holding",P$1="idle";const T={sizeXXL:{size:"xxl",labelTextSize:"xl",iconAfterAppearanceSize:"size24_24",iconBeforeAppearanceSize:"size24_24",loaderAppearanceSize:"sizeL"},sizeXL:{size:"xl",labelTextSize:"l",iconAfterAppearanceSize:"size24_24",iconBeforeAppearanceSize:"size24_24",loaderAppearanceSize:"sizeL"},sizeL:{size:"l",labelTextSize:"l",iconAfterAppearanceSize:"size24_24",iconBeforeAppearanceSize:"size24_24",loaderAppearanceSize:"sizeL"},sizeM:{size:"m",labelTextSize:"m",iconAfterAppearanceSize:"size24_24",iconBeforeAppearanceSize:"size24_24",loaderAppearanceSize:"sizeL"},sizeS:{size:"s",labelTextSize:"s",iconAfterAppearanceSize:"size20_20",iconBeforeAppearanceSize:"size20_20",loaderAppearanceSize:"sizeL"},sizeXS:{size:"xs",labelTextSize:"xs",iconAfterAppearanceSize:"size16_16",iconBeforeAppearanceSize:"size16_16",loaderAppearanceSize:"sizeL"},sizeXXS:{size:"xxs",labelTextSize:"xs",iconAfterAppearanceSize:"size14_14",iconBeforeAppearanceSize:"size14_14",loaderAppearanceSize:"sizeL"},circular:{shape:"circular"},rounded:{shape:"rounded"},roundedXL:{shape:"rounded"},roundedL:{shape:"rounded"},roundedM:{shape:"rounded"},roundedS:{shape:"rounded"},solid:{borderColor:"none"},outlined:{fill:"none"},full:{},ghost:{fill:"none",borderColor:"none"},accentMutedPrimary:{fill:"accentTertiary",fillHover:"accentHoverTertiary",labelTextColor:"accentTextQuaternary",labelTextColorHover:"accentTextQuaternary",borderColor:"accentBorderSecondary",iconAfterFillIcon:"accentItemQuaternary",iconBeforeFillIcon:"accentItemQuaternary",iconFillIcon:"accentItemQuaternary",loaderAppearance:"accentTertiary"},accentPrimary:{fill:"accentPrimary",fillHover:"accentHoverPrimary",labelTextColor:"accentTextPrimary",labelTextColorHover:"accentTextPrimary",borderColor:"accentBorderPrimary",iconAfterFillIcon:"accentItemPrimary",iconBeforeFillIcon:"accentItemPrimary",iconFillIcon:"accentItemPrimary",loaderAppearance:"accentPrimary"},accentSecondary:{fill:"accentPrimary",fillHover:"accentHoverPrimary",labelTextColor:"accentTextSecondary",labelTextColorHover:"accentTextSecondary",borderColor:"accentBorderPrimary",iconAfterFillIcon:"accentItemPrimary",iconBeforeFillIcon:"accentItemPrimary",iconFillIcon:"accentItemPrimary",loaderAppearance:"accentPrimary"},dangerMutedPrimary:{fill:"dangerTertiary",fillHover:"dangerHoverPrimary",labelTextColor:"dangerTextQuaternary",labelTextColorHover:"dangerTextQuaternary",borderColor:"dangerBorderSecondary",iconAfterFillIcon:"dangerItemQuaternary",iconBeforeFillIcon:"dangerItemQuaternary",iconFillIcon:"dangerItemQuaternary",loaderAppearance:"dangerTertiary"},dangerPrimary:{fill:"dangerPrimary",fillHover:"dangerHoverPrimary",labelTextColor:"dangerTextPrimary",labelTextColorHover:"dangerTextPrimary",iconAfterFillIcon:"dangerItemPrimary",iconBeforeFillIcon:"dangerItemPrimary",iconFillIcon:"dangerItemPrimary",loaderAppearance:"dangerPrimary"},errorMutedPrimary:{fill:"errorTertiary",fillHover:"errorHoverPrimary",labelTextColor:"errorTextQuaternary",labelTextColorHover:"errorTextQuaternary",borderColor:"errorBorderSecondary",iconAfterFillIcon:"errorItemQuaternary",iconBeforeFillIcon:"errorItemQuaternary",iconFillIcon:"errorItemQuaternary",loaderAppearance:"errorTertiary"},errorPrimary:{fill:"errorPrimary",fillHover:"errorHoverPrimary",labelTextColor:"errorTextPrimary",labelTextColorHover:"errorTextPrimary",iconAfterFillIcon:"errorItemPrimary",iconBeforeFillIcon:"errorItemPrimary",iconFillIcon:"errorItemPrimary",loaderAppearance:"errorPrimary"},infoMutedPrimary:{fill:"infoTertiary",fillHover:"infoHoverTertiary",labelTextColor:"infoTextSecondary",labelTextColorHover:"infoTextSecondary",borderColor:"infoBorderSecondary",iconAfterFillIcon:"infoItemSecondary",iconBeforeFillIcon:"infoItemSecondary",iconFillIcon:"infoItemSecondary",loaderAppearance:"infoTertiary"},infoPrimary:{fill:"infoPrimary",fillHover:"infoHoverPrimary",labelTextColor:"infoTextPrimary",labelTextColorHover:"infoTextPrimary",borderColor:"infoBorderPrimary",iconAfterFillIcon:"infoItemPrimary",iconBeforeFillIcon:"infoItemPrimary",iconFillIcon:"infoItemPrimary",loaderAppearance:"infoPrimary"},infoSecondary:{fill:"infoPrimary",fillHover:"infoHoverPrimary",labelTextColor:"infoTextSecondary",labelTextColorHover:"infoTextSecondary",borderColor:"infoBorderPrimary",iconAfterFillIcon:"infoItemPrimary",iconBeforeFillIcon:"infoItemPrimary",iconFillIcon:"infoItemPrimary",loaderAppearance:"infoPrimary"},specialMutedPrimary:{fill:"specialTertiary",fillHover:"specialHoverPrimary",labelTextColor:"specialTextSecondary",borderColor:"specialBorderTertiary",iconAfterFillIcon:"specialItemSecondary",iconBeforeFillIcon:"specialItemSecondary",iconFillIcon:"specialItemSecondary",loaderAppearance:"specialTertiary"},specialPrimary:{fill:"specialPrimary",fillHover:"specialHoverPrimary",labelTextColor:"specialTextPrimary",iconAfterFillIcon:"specialItemPrimary",iconBeforeFillIcon:"specialItemPrimary",iconFillIcon:"specialItemPrimary",loaderAppearance:"specialPrimary"},extraMutedPrimary:{fill:"extraTertiary",fillHover:"extraHoverPrimary",labelTextColor:"extraTextQuaternary",borderColor:"extraBorderSecondary",iconAfterFillIcon:"extraItemQuaternary",iconBeforeFillIcon:"extraItemQuaternary",iconFillIcon:"extraItemQuaternary",loaderAppearance:"extraPrimary"},extraPrimary:{fill:"extraPrimary",fillHover:"extraHoverPrimary",labelTextColor:"extraTextPrimary",iconAfterFillIcon:"extraItemPrimary",iconBeforeFillIcon:"extraItemPrimary",iconFillIcon:"extraItemPrimary",loaderAppearance:"extraPrimary"},successMutedPrimary:{fill:"successTertiary",fillHover:"successHoverPrimary",labelTextColor:"successTextQuaternary",labelTextColorHover:"successTextQuaternary",borderColor:"successBorderQuaternary",iconAfterFillIcon:"successItemQuaternary",iconBeforeFillIcon:"successItemQuaternary",iconFillIcon:"successItemQuaternary",loaderAppearance:"successTertiary"},successPrimary:{fill:"successPrimary",fillHover:"successHoverPrimary",labelTextColor:"successTextPrimary",labelTextColorHover:"successTextPrimary",iconAfterFillIcon:"successItemPrimary",iconBeforeFillIcon:"successItemPrimary",iconFillIcon:"successItemPrimary",loaderAppearance:"successPrimary"},surfaceMutedPrimary:{fill:"surfaceTertiary",fillHover:"surfaceTertiary",labelTextColor:"surfaceTextQuaternary",borderColor:"surfaceBorderQuaternary",iconAfterFillIcon:"surfaceItemQuaternary",iconBeforeFillIcon:"surfaceItemQuaternary",iconFillIcon:"surfaceItemQuaternary",loaderAppearance:"surfaceTertiary"},surfacePrimary:{fill:"surfacePrimary",fillHover:"surfaceSecondary",labelTextColor:"surfaceTextPrimary",borderColor:"surfaceBorderTertiary",iconAfterFillIcon:"surfaceItemPrimary",iconBeforeFillIcon:"surfaceItemPrimary",iconFillIcon:"surfaceItemPrimary",loaderAppearance:"surfacePrimary"},surfaceQuaternary:{fill:"surfaceTertiary",fillHover:"surfaceTertiary",labelTextColor:"surfaceTextPrimary",borderColor:"surfaceBorderTertiary",iconAfterFillIcon:"surfaceItemPrimary",iconBeforeFillIcon:"surfaceItemPrimary",iconFillIcon:"surfaceItemPrimary",loaderAppearance:"surfacePrimary"},surfaceSecondary:{fill:"surfaceSecondary",fillHover:"surfaceTertiary",labelTextColor:"surfaceTextPrimary",borderColor:"surfaceBorderTertiary",iconAfterFillIcon:"surfaceItemPrimary",iconBeforeFillIcon:"surfaceItemPrimary",iconFillIcon:"surfaceItemPrimary",loaderAppearance:"surfacePrimary"},surfaceTertiary:{fill:"surfaceTertiary",fillHover:"surfaceSecondary",labelTextColor:"surfaceTextPrimary",iconAfterFillIcon:"surfaceItemPrimary",iconBeforeFillIcon:"surfaceItemPrimary",iconFillIcon:"surfaceItemPrimary",loaderAppearance:"surfacePrimary"},warningMutedPrimary:{fill:"warningTertiary",fillHover:"warningHoverPrimary",labelTextColor:"warningTextSecondary",labelTextColorHover:"warningTextPrimary",borderColor:"warningBorderPrimary",iconAfterFillIcon:"warningItemSecondary",iconBeforeFillIcon:"warningItemSecondary",iconFillIcon:"warningItemSecondary",loaderAppearance:"warningTertiary"},warningPrimary:{fill:"warningPrimary",fillHover:"warningHoverPrimary",labelTextColor:"warningTextPrimary",labelTextColorHover:"warningTextPrimary",iconAfterFillIcon:"warningItemPrimary",iconBeforeFillIcon:"warningItemPrimary",iconFillIcon:"warningItemPrimary",loaderAppearance:"warningPrimary"}},x$1={appearance:T},b=React.forwardRef(function(a,T){const{appearance:b,className:A,dataTestId:S,dataTour:F,label:z,Badge:C,href:_$1,htmlType:v="button",link:H,rel:g,target:B,tooltip:h$1,before:Q,after:w,isDisabled:L,isHolding:M,isLoading:$=false,onClick:N$1,onHoldComplete:k,onMouseDown:W,children:X}=a,D=e$1(b,x$1,L),j=u$1(a,D),{fillClass:q,fillHoverClass:E,labelTextColor:G,labelTextColorHover:R,labelTextSize:U,labelTextTruncate:J,labelTextWeight:K,labelTextWidth:O,labelTextWrap:V,borderColorClass:Y,borderTypeClass:Z,borderWidthClass:ee,elevationClass:re,icon:ae,iconAfter:oe,iconAfterAppearance:ie,iconAfterAppearanceSize:le,iconAfterFill:ne,iconAfterFillIcon:te,iconAfterFillSize:ce,iconAfterShape:se,iconAfterSize:me,iconAfterSrc:fe,iconAppearance:ye,iconAppearanceSize:de,iconBefore:pe,iconBeforeAppearance:ue,iconBeforeAppearanceSize:Ie,iconBeforeFill:Pe,iconBeforeFillIcon:Te,iconBeforeFillSize:xe,iconBeforeShape:be,iconBeforeSize:Ae,iconBeforeSrc:Se,iconFill:Fe,iconFillIcon:ze,iconFillSize:Ce,iconShape:_e,iconSize:ve,iconSrc:He,loaderAppearance:ge,loaderAppearanceSize:Be,loaderFill:he,loaderItemFill:Qe,loaderSize:we,loaderType:Le="dot",shapeClass:Me,sizeClass:$e,widthClass:Ne,zeroGap:ke,zeroPadding:We,isSkeleton:Xe}=j,{label:De,styles:je}=c$1(a),{holdState:qe,onHoldEnd:Ee,onHoldStart:Ge}=function(e){const{holdDurationMs:r=500,isHolding:a,onHoldComplete:t}=e,c=React.useRef(null),s=React.useRef(t),[m,f]=React.useState(P$1),y=React.useRef(0);s.current=t,React.useEffect(()=>(c.current=requestAnimationFrame(function e(){if(m===I&&1===y.current&&s.current&&s.current(),m===I&&y.current<1){const a=y.current,o=Math.min(a+16/r,1);y.current=o,c.current=requestAnimationFrame(e);}if(m===P$1&&y.current>0){const a=y.current,o=Math.max(a-16/r,0);y.current=o,c.current=requestAnimationFrame(e);}}),()=>{c.current&&cancelAnimationFrame(c.current);}),[m,r]);const d=React.useCallback(e=>{a&&("touch"!==e.pointerType&&0!==e.button||f(I));},[a]),p=React.useCallback(e=>{f(P$1);},[]);return {holdState:m,onHoldEnd:p,onHoldStart:d}}({holdDurationMs:500,isHolding:M,onHoldComplete:k}),Re=w||Q||ae||oe||fe||pe||Se||He;return jsxRuntimeExports.jsx(h,{className:clsx(A,"button",z&&Re?"button_type_default":z?"button_type_label":Re?"button_type_icon":"",ee&&`border-width_${ee}`,Y&&`border-color_${Y}`,Z&&`border_type_${Z}`,q&&`fill_${q}`,E&&!L&&`fill_hover_${E}`,Me&&`shape_${Me}`,$e&&`button_size_${$e}`,Ne&&`button_width_${Ne}`,re&&`elevation_${re}`,N$1&&"cursor_type_pointer",L&&"button_state_disabled cursor_type_default",C&&"button_type_badge",We&&"button_reset-padding",ke&&"button_reset-gap",$&&"button_state_loading",Xe&&"skeleton",M&&"button_holding",qe&&`button_state_${qe}`),type:v,title:h$1,"data-testid":S?.endsWith("Button")?S:`${S}Button`,"data-tour":F,disabled:L,href:H??_$1,LinkComponent:H??_$1?"a":"button",rel:g,style:je,target:B,onClick:N$1,onMouseDown:W,onPointerCancel:Ee,onPointerDown:Ge,onPointerLeave:Ee,onPointerUp:Ee,children:jsxRuntimeExports.jsxs("div",{className:"button__wrapper",ref:T,children:[M&&jsxRuntimeExports.jsx("div",{className:clsx("button__indication",`button__indication_${qe}`),children:jsxRuntimeExports.jsx("div",{className:"button__indication-item",children:" "})}),$&&jsxRuntimeExports.jsx(m,{appearance:r(ge,Be),className:clsx(A,"button__loader"),type:Le,size:we,fill:he,itemFill:Qe}),Q,(pe||Se)&&jsxRuntimeExports.jsx(N,{appearance:r(ue,Ie),className:"button__icon_before",fill:Pe,fillSize:xe,iconFill:Te,iconSize:Ae,imageSrc:Se,shape:be,SvgImage:pe}),(ae||He)&&jsxRuntimeExports.jsx(N,{appearance:r(ye,de),className:"button__icon",fill:Fe,fillSize:Ce,iconFill:ze,iconSize:ve,imageSrc:He,shape:_e,SvgImage:ae}),(X||z)&&jsxRuntimeExports.jsx(_,{className:"button__label",width:O,size:U,textColor:G,textColorHover:R,textTruncate:J,textWeight:K,textWrap:V,style:De,children:X||z}),(oe||fe)&&jsxRuntimeExports.jsx(N,{appearance:r(ie,le),className:"button__icon_after",fill:ne,fillSize:ce,iconFill:te,iconSize:me,imageSrc:fe,shape:se,SvgImage:oe}),C,w]})})});
7891
7938
 
7892
- var _;function nn(){return nn=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r]);}return n},nn.apply(null,arguments)}const Vn={Action:{Close:function(e){return React__namespace.createElement("svg",nn({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",stroke:"none"},e),_||(_=React__namespace.createElement("path",{d:"M19.722 4.703a.95.95 0 0 0-1.343 0L12 11.082l-6.379-6.38a.95.95 0 1 0-1.343 1.344l6.38 6.379-6.38 6.378a.95.95 0 1 0 1.343 1.343L12 13.767l6.379 6.38a.95.95 0 1 0 1.343-1.343l-6.38-6.38 6.38-6.378a.95.95 0 0 0 0-1.343"})))}}};
7939
+ var en;function tn(){return tn=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r]);}return n},tn.apply(null,arguments)}const qn={Action:{Close:function(e){return React__namespace.createElement("svg",tn({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",stroke:"none"},e),en||(en=React__namespace.createElement("path",{d:"M19.722 4.703a.95.95 0 0 0-1.343 0L12 11.082l-6.379-6.38a.95.95 0 1 0-1.343 1.344l6.38 6.379-6.38 6.378a.95.95 0 1 0 1.343 1.343L12 13.767l6.379 6.38a.95.95 0 1 0 1.343-1.343l-6.38-6.38 6.38-6.378a.95.95 0 0 0 0-1.343"})))}}};
7893
7940
 
7894
- const f={...{defaultPrimary:{fill:"surfacePrimary",fillHover:"surfacePrimary",titleTextColor:"surfaceTextPrimary",descTextColor:"surfaceTextPrimary",borderColor:"surfaceBorderPrimary",textColor:"surfaceTextPrimary",buttonAppearance:"accentPrimary sizeXXL solid rounded",loaderAppearance:"accentTertiary sizeS ghost rounded",closeIcon:Vn.Action.Close,closeIconAppearance:"surfacePrimary ghost circular"}},circular:{shape:"circular"},rounded:{shape:"rounded"},roundedXL:{shape:"rounded"},roundedL:{shape:"rounded"},roundedM:{shape:"rounded"},roundedS:{shape:"rounded"},sizeM:{size:"m",titleTextSize:"xxl",descTextSize:"m",loaderAppearanceSize:"sizeS",closeIconAppearanceSize:"size24_24"},sizeS:{size:"m",titleTextSize:"xl",descTextSize:"m",loaderAppearanceSize:"sizeS",closeIconAppearanceSize:"size24_24"},solid:{borderColor:"none"},outlined:{fill:"none"},full:{},ghost:{fill:"none",borderColor:"none"},...{errorPrimary:{fill:"errorPrimary",fillHover:"errorPrimary",titleTextColor:"errorTextPrimary",descTextColor:"errorTextPrimary",borderColor:"errorBorderPrimary",textColor:"errorTextPrimary",buttonAppearance:"surfacePrimary sizeXXL solid rounded",loaderAppearance:"errorPrimary sizeS solid rounded",closeIcon:Vn.Action.Close,closeIconAppearance:"surfacePrimary solid circular"}},...{infoPrimary:{fill:"infoPrimary",fillHover:"infoPrimary",titleTextColor:"infoTextPrimary",descTextColor:"infoTextPrimary",borderColor:"infoBorderPrimary",textColor:"infoTextPrimary",buttonAppearance:"surfacePrimary sizeXXL solid rounded",loaderAppearance:"infoPrimary sizeS solid rounded",closeIcon:Vn.Action.Close,closeIconAppearance:"surfacePrimary solid circular"}},...{successPrimary:{fill:"successPrimary",fillHover:"successPrimary",titleTextColor:"successTextPrimary",descTextColor:"successTextPrimary",borderColor:"successBorderPrimary",textColor:"successTextPrimary",buttonAppearance:"surfacePrimary sizeXXL solid rounded",loaderAppearance:"successPrimary sizeS solid rounded",closeIcon:Vn.Action.Close,closeIconAppearance:"successPrimary ghost circular"}},...{warningPrimary:{fill:"warningPrimary",fillHover:"warningPrimary",titleTextColor:"warningTextPrimary",descTextColor:"warningTextPrimary",borderColor:"surfaceBorderPrimary",textColor:"warningTextPrimary",buttonAppearance:"surfacePrimary sizeXXL solid rounded",loaderAppearance:"warningPrimary sizeS solid rounded",closeIcon:Vn.Action.Close,closeIconAppearance:"surfacePrimary solid circular"}}},y={appearance:f};function x(m$1){const{id:p,appearance:u,className:f,dataTestId:x,dataTour:P,type:C="float",title:_,text:T,before:z,after:A,isSkeleton:S,isLoading:I,onClickButton:h,onClickClose:b$1}=m$1,g=e$1(u,y),v=u$1(m$1,g),{fillClass:L,fillHoverClass:w,titleTextColor:N$1,titleTextSize:X,descTextColor:k,descTextSize:B,buttonAppearance:$,buttonLabel:H,elevationClass:j,loaderAppearance:F,loaderAppearanceSize:M,loaderFill:q,loaderItemFill:D,loaderSize:E,loaderType:G="dot",shapeClass:J,sizeClass:K,widthClass:O,closeIcon:Q,closeIconAppearance:R,closeIconAppearanceSize:U,closeIconSrc:V}=v,{styles:W}=c$1(m$1);return jsxRuntimeExports.jsxs("div",{className:clsx("notification__item",`notification__item_${C}`,O&&`width_${O}`,j&&`elevation_${j}`,L&&`fill_${L}`,K&&`notification__item_size_${K}`,C&&`notification__item_type_${C}`,w&&`fill_${w}`,S&&"skeleton",J&&`shape_${J}`),"data-testid":x,"data-tour":P,style:W,children:[z,jsxRuntimeExports.jsxs("div",{className:clsx(f,"notification__item-wrapper"),children:[_&&jsxRuntimeExports.jsx(_$1,{className:"notification__item-title",size:X,textColor:N$1,children:_}),T&&jsxRuntimeExports.jsx(_$1,{className:"notification__item-text",size:B,textColor:k,children:T}),I&&jsxRuntimeExports.jsx(m,{appearance:r(F,M),className:clsx(f,"button__loader"),type:G,size:E,fill:q,itemFill:D}),b$1&&jsxRuntimeExports.jsx(N,{appearance:r(R,U),className:clsx("notification__item-close","cursor_type_pointer"),imageSrc:V,SvgImage:Q,onClick:()=>b$1&&b$1(p)}),h&&H&&jsxRuntimeExports.jsx(b,{appearance:$,className:"notification__item-button",width:"fill",label:H,onClick:h})]}),A]})}function P(e){const i=f$2(),{hideNotifications:a}=g$1(),{className:t,dataTestId:s,dataTour:c}=e;return jsxRuntimeExports.jsx("div",{className:clsx("notification",t),"data-testid":s,"data-tour":c,children:jsxRuntimeExports.jsx("div",{className:"notification__wrapper",children:i.map(e=>jsxRuntimeExports.jsx(x,{id:e.id,appearance:e.appearance,type:e.type,title:e.title,status:e.status,text:e.text,buttonLabel:e.buttonLabel,after:e.after,closeIcon:e.closeIcon,closeIconSrc:e.closeIconSrc,isLoading:e.isLoading,onClickButton:e.onClickButton,onClickClose:a},e.id))})})}
7941
+ const f={...{defaultPrimary:{fill:"surfacePrimary",fillHover:"surfacePrimary",titleTextColor:"surfaceTextPrimary",descTextColor:"surfaceTextPrimary",borderColor:"surfaceBorderPrimary",textColor:"surfaceTextPrimary",buttonAppearance:"accentPrimary sizeXXL solid rounded",loaderAppearance:"accentTertiary sizeS ghost rounded",closeIcon:qn.Action.Close,closeIconAppearance:"surfacePrimary ghost circular"}},circular:{shape:"circular"},rounded:{shape:"rounded"},roundedXL:{shape:"rounded"},roundedL:{shape:"rounded"},roundedM:{shape:"rounded"},roundedS:{shape:"rounded"},sizeM:{size:"m",titleTextSize:"xxl",descTextSize:"m",loaderAppearanceSize:"sizeS",closeIconAppearanceSize:"size24_24"},sizeS:{size:"m",titleTextSize:"xl",descTextSize:"m",loaderAppearanceSize:"sizeS",closeIconAppearanceSize:"size24_24"},solid:{borderColor:"none"},outlined:{fill:"none"},full:{},ghost:{fill:"none",borderColor:"none"},...{errorPrimary:{fill:"errorPrimary",fillHover:"errorPrimary",titleTextColor:"errorTextPrimary",descTextColor:"errorTextPrimary",borderColor:"errorBorderPrimary",textColor:"errorTextPrimary",buttonAppearance:"surfacePrimary sizeXXL solid rounded",loaderAppearance:"errorPrimary sizeS solid rounded",closeIcon:qn.Action.Close,closeIconAppearance:"surfacePrimary solid circular"}},...{infoPrimary:{fill:"infoPrimary",fillHover:"infoPrimary",titleTextColor:"infoTextPrimary",descTextColor:"infoTextPrimary",borderColor:"infoBorderPrimary",textColor:"infoTextPrimary",buttonAppearance:"surfacePrimary sizeXXL solid rounded",loaderAppearance:"infoPrimary sizeS solid rounded",closeIcon:qn.Action.Close,closeIconAppearance:"surfacePrimary solid circular"}},...{successPrimary:{fill:"successPrimary",fillHover:"successPrimary",titleTextColor:"successTextPrimary",descTextColor:"successTextPrimary",borderColor:"successBorderPrimary",textColor:"successTextPrimary",buttonAppearance:"surfacePrimary sizeXXL solid rounded",loaderAppearance:"successPrimary sizeS solid rounded",closeIcon:qn.Action.Close,closeIconAppearance:"successPrimary ghost circular"}},...{warningPrimary:{fill:"warningPrimary",fillHover:"warningPrimary",titleTextColor:"warningTextPrimary",descTextColor:"warningTextPrimary",borderColor:"surfaceBorderPrimary",textColor:"warningTextPrimary",buttonAppearance:"surfacePrimary sizeXXL solid rounded",loaderAppearance:"warningPrimary sizeS solid rounded",closeIcon:qn.Action.Close,closeIconAppearance:"surfacePrimary solid circular"}}},y={appearance:f};function x(m$1){const{id:p,appearance:u,className:f,dataTestId:x,dataTour:P,type:C="float",title:_$1,text:T,before:z,after:A,isSkeleton:S,isLoading:I,onClickButton:h,onClickClose:b$1}=m$1,g=e$1(u,y),v=u$1(m$1,g),{fillClass:L,fillHoverClass:w,titleTextColor:N$1,titleTextSize:X,descTextColor:k,descTextSize:B,buttonAppearance:$,buttonLabel:H,elevationClass:j,loaderAppearance:F,loaderAppearanceSize:M,loaderFill:q,loaderItemFill:D,loaderSize:E,loaderType:G="dot",shapeClass:J,sizeClass:K,widthClass:O,closeIcon:Q,closeIconAppearance:R,closeIconAppearanceSize:U,closeIconSrc:V}=v,{styles:W}=c$1(m$1);return jsxRuntimeExports.jsxs("div",{className:clsx("notification__item",`notification__item_${C}`,O&&`width_${O}`,j&&`elevation_${j}`,L&&`fill_${L}`,K&&`notification__item_size_${K}`,C&&`notification__item_type_${C}`,w&&`fill_${w}`,S&&"skeleton",J&&`shape_${J}`),"data-testid":x,"data-tour":P,style:W,children:[z,jsxRuntimeExports.jsxs("div",{className:clsx(f,"notification__item-wrapper"),children:[_$1&&jsxRuntimeExports.jsx(_,{className:"notification__item-title",size:X,textColor:N$1,children:_$1}),T&&jsxRuntimeExports.jsx(_,{className:"notification__item-text",size:B,textColor:k,children:T}),I&&jsxRuntimeExports.jsx(m,{appearance:r(F,M),className:clsx(f,"button__loader"),type:G,size:E,fill:q,itemFill:D}),b$1&&jsxRuntimeExports.jsx(N,{appearance:r(R,U),className:clsx("notification__item-close","cursor_type_pointer"),imageSrc:V,SvgImage:Q,onClick:()=>b$1&&b$1(p)}),h&&H&&jsxRuntimeExports.jsx(b,{appearance:$,className:"notification__item-button",width:"fill",label:H,onClick:h})]}),A]})}function P(e){const i=f$2(),{hideNotifications:a}=g$1(),{className:t,dataTestId:s,dataTour:c}=e;return jsxRuntimeExports.jsx("div",{className:clsx("notification",t),"data-testid":s,"data-tour":c,children:jsxRuntimeExports.jsx("div",{className:"notification__wrapper",children:i.map(e=>jsxRuntimeExports.jsx(x,{id:e.id,appearance:e.appearance,type:e.type,title:e.title,status:e.status,text:e.text,buttonLabel:e.buttonLabel,after:e.after,closeIcon:e.closeIcon,closeIconSrc:e.closeIconSrc,isLoading:e.isLoading,onClickButton:e.onClickButton,onClickClose:a},e.id))})})}
7895
7942
 
7896
7943
  exports.P = P;
7897
7944
  exports.d = d;