@true-engineering/true-react-common-ui-kit 4.0.0-alpha63 → 4.0.0-alpha64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hooks/use-resize-ref.d.ts +2 -1
- package/dist/true-react-common-ui-kit.js +14 -16
- package/dist/true-react-common-ui-kit.js.map +1 -1
- package/dist/true-react-common-ui-kit.umd.cjs +1 -1
- package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/src/components/ControlWrapper/ControlWrapper.tsx +5 -9
- package/src/components/Input/InputBase.tsx +4 -8
- package/src/hooks/use-resize-ref.ts +11 -4
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("react-jss"),require("@true-engineering/true-react-platform-helpers"),require("react/jsx-runtime"),require("react-transition-group"),require("clsx"),require("react-overlays/usePopper"),require("hex-to-rgba"),require("@floating-ui/react"),require("react-input-mask"),require("react-datepicker/dist/react-datepicker.css"),require("date-fns"),require("react-datepicker"),require("react-overlays"),require("ts-debounce"),require("scroll-into-view-if-needed"),require("date-fns/locale"),require("filesize"),require("country-flag-icons"),require("country-flag-icons/react/3x2"),require("react-remove-scroll")):"function"==typeof define&&define.amd?define(["exports","react","react-jss","@true-engineering/true-react-platform-helpers","react/jsx-runtime","react-transition-group","clsx","react-overlays/usePopper","hex-to-rgba","@floating-ui/react","react-input-mask","react-datepicker/dist/react-datepicker.css","date-fns","react-datepicker","react-overlays","ts-debounce","scroll-into-view-if-needed","date-fns/locale","filesize","country-flag-icons","country-flag-icons/react/3x2","react-remove-scroll"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).TrueReactKitUiKit={},e.React,e.reactJss,e.trueReactPlatformHelpers,e.jsxRuntime,e.reactTransitionGroup,e.clsx,e.usePopper,e.rgba,e.react$1,e.InputMask,null,e.dateFns,e.ReactDatePicker,e.reactOverlays,e.tsDebounce,e.scrollIntoViewIfNeeded,e.locale,e.filesize,e.countryFlagIcons,e.Flags,e.reactRemoveScroll)}(this,function(e,t,o,n,i,r,a,l,s,d,c,u,p,h,m,y,f,g,C,v,x,b){"use strict";function w(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const o in e)if("default"!==o){const n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:()=>e[o]})}return t.default=e,Object.freeze(t)}const S=w(x),N={FONT_MAIN:"#222a37",FONT_MEDIUM:"#505f79",FONT_LABEL:"#7a869a",FONT_DISABLED:"#95a0b3",GREY_ACTIVE:"#95a0b3",BORDER_MAIN:"#d0d6e1",BORDER_LIGHT:"#dde3ed",GREY_HOVER:"#dde3ed",GREY_FOCUS:"#eceff5",GREY_DISABLED:"#eceff5",GREY_BACKGROUND:"#f6f8fc",CLASSIC_WHITE:"#ffffff",RED_ACTIVE:"#912e34",RED_HOVER:"#c13e45",RED_WARNING:"#f14d56",RED_WARNING_LIGHT:"#ff6261",RED_BACKGROUND:"#feedee",ORANGE_BACKGROUND:"#fff4e9",GREEN_BACKGROUND:"#f4f9e6",BLUE_BACKGROUND:"#ebf1ff",GREEN_FOCUS:"#97ba1e",ORANGE_FOCUS:"#ff991f"},k={BORDER_RADIUS_LARGE:16,BORDER_RADIUS_MEDIUM:12,BORDER_RADIUS_STD:8,BORDER_RADIUS_SMALL:6,BORDER_RADIUS_EXTRA_SMALL:4,CONTROL:{HEIGHT:48,PADDING:16,ICON_SIZE:24,ICON_INNER_SIZE:24,ICON_GAP:8},Z_INDEX:{CONTROL_INVALID:1,CONTROL_FOCUS:2}},E={withAngle:(e=6,t="left",o=100)=>({display:"inline-block",position:"relative",marginTop:2*e-1,boxShadow:"0 8px 20px 0 rgba(0, 0, 0, 0.04)",border:["solid",1,N.BORDER_MAIN],borderRadius:k.BORDER_RADIUS_EXTRA_SMALL,"&:before":{content:'""',position:"absolute",top:-e,left:"left"===t&&o,right:"right"===t&&o,width:0,height:0,borderLeft:[e,"solid","transparent"],borderRight:[e,"solid","transparent"],borderBottom:[e,"solid",N.BORDER_MAIN]},"&:after":{content:'""',position:"absolute",top:1-e,left:"left"===t&&o+1,right:"right"===t&&o+1,width:0,height:0,borderLeft:[e-1,"solid","transparent"],borderRight:[e-1,"solid","transparent"],borderBottom:[e-1,"solid",N.CLASSIC_WHITE]}}),withScrollBar:{boxSizing:"border-box",overflow:"auto","@supports selector(::-webkit-scrollbar)":{"--webkit-scrollbar-width":"10px","--webkit-scrollbar-height":"10px","&::-webkit-scrollbar":{width:"var(--webkit-scrollbar-width)",height:"var(--webkit-scrollbar-height)","&-thumb":{width:6,minHeight:30,border:[2,"solid","transparent"],borderRadius:5,backgroundColor:N.BORDER_MAIN,backgroundClip:"padding-box","&:hover":{backgroundColor:N.GREY_ACTIVE}},"&-track-piece":{backgroundColor:"transparent"},"&-corner":{backgroundColor:"transparent"}}},"@supports not selector(::-webkit-scrollbar)":{scrollbarWidth:"thin",scrollbarColor:`${N.BORDER_MAIN} transparent`}}},R={defaultTransition:"0.25s ease-in-out",slideUp:{"slide-up-enter":{opacity:0,transform:"translateY(15px)"},"slide-up-enter-active":{opacity:1,transform:"translateY(0px)",transition:"150ms ease-in-out",transitionProperty:"opacity, transform"},"slide-up-exit-active":{opacity:1,transform:"translateY(0px)"},"slide-up-exit":{opacity:0,transform:"translateY(15px)",transition:"150ms ease-in-out",transitionProperty:"opacity, transform"}}},I={animations:R,colors:N,dimensions:k,helpers:E},j=t.createContext(I),T=j.Provider,M=()=>t.useContext(j),D=(...e)=>e.flat().filter(n.isObject),A=(e,o)=>t.useMemo(()=>D(e,o),[e,o]),L=e=>{const{components:t}=M();return n.isNotEmpty(e)?t?.[e]:void 0},F=e=>e.startsWith("tweak"),O=e=>n.isNotEmpty(e)&&!Object.keys(e).every(F),B=()=>{let e;const t=new WeakMap;return(o,i=0)=>{const r=o.at(i);if(n.isNotEmpty(r))return(e=>(t.has(e)||t.set(e,B()),t.get(e)))(r)(o,i+1);if(!n.isNotEmpty(e)){const[t,...i]=o;e=n.isArrayNotEmpty(i)?n.mergeStyles(t,...i):t}return e}},z=B(),_=o.createUseStyles(e=>e),P=(e,o)=>{const i=n.isString(e)?e:void 0,r=o??e;return"production"!==process.env.NODE_ENV&&((e,t="LocalComponent")=>{const o=Object.keys(e).filter(F);n.isArrayNotEmpty(o)&&console.error(`${t}: Названия классов не должны начинаться со слова "tweak": ${o}`)})(r,i),({theme:e,tweakStyles:o=e})=>{const n=L(i),a=t.useMemo(()=>{const e=D(r,n,o).filter(O);return{theme:z(e)}},[n,o]);return _(a)}},W=(e,o)=>{const n=t.useRef(!1);t.useEffect(()=>{let t;return n.current?t=e():n.current=!0,()=>{void 0!==t&&t()}},o)},H={name:"minWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.minWidth=`${e.rects.reference.width}px`},effect:({state:e})=>{e.elements.popper.style.minWidth=`${e.elements.reference.offsetWidth}px`}},$=[{countryEn:"Abkhazia",countryRu:"Абхазия",countryCode:"AB",phoneMask:"(999) 999-99-99",dialCode:"7",dialCodePriority:1,fullCodes:["7"]},{countryEn:"Afghanistan",countryRu:"Афганистан",countryCode:"AF",dialCode:"93",fullCodes:["93"]},{countryEn:"Albania",countryRu:"Албания",countryCode:"AL",dialCode:"355",fullCodes:["355"]},{countryEn:"Algeria",countryRu:"Алжир",countryCode:"DZ",dialCode:"213",fullCodes:["213"]},{countryEn:"Andorra",countryRu:"Андорра",countryCode:"AD",dialCode:"376",fullCodes:["376"]},{countryEn:"Angola",countryRu:"Ангола",countryCode:"AO",dialCode:"244",fullCodes:["244"]},{countryEn:"Antigua and Barbuda",countryRu:"Антигуа и Барбуда",countryCode:"AG",dialCode:"1268",fullCodes:["1268"]},{countryEn:"Argentina",countryRu:"Аргентина",countryCode:"AR",dialCode:"54",phoneMask:"(99) 99999999",fullCodes:["54"]},{countryEn:"Armenia",countryRu:"Армения",countryCode:"AM",dialCode:"374",fullCodes:["374"]},{countryEn:"Aruba",countryRu:"Аруба",countryCode:"AW",dialCode:"297",fullCodes:["297"]},{countryEn:"Australia",countryRu:"Австралия",countryCode:"AU",dialCode:"61",phoneMask:"(99) 9999 9999",dialCodePriority:0,areaCodes:["2","3","4","7","8","02","03","04","07","08"],fullCodes:["612","613","614","617","618","6102","6103","6104","6107","6108"]},{countryEn:"Austria",countryRu:"Австрия",countryCode:"AT",dialCode:"43",fullCodes:["43"]},{countryEn:"Azerbaijan",countryRu:"Азербайджан",countryCode:"AZ",dialCode:"994",fullCodes:["994"]},{countryEn:"Bahamas",countryRu:"Багамы",countryCode:"BS",dialCode:"1242",fullCodes:["1242"]},{countryEn:"Bahrain",countryRu:"Бахрейн",countryCode:"BH",dialCode:"973",fullCodes:["973"]},{countryEn:"Bangladesh",countryRu:"Бангладеш",countryCode:"BD",dialCode:"880",fullCodes:["880"]},{countryEn:"Barbados",countryRu:"Барбадос",countryCode:"BB",dialCode:"1246",fullCodes:["1246"]},{countryEn:"Belarus",countryRu:"Беларусь",countryCode:"BY",dialCode:"375",phoneMask:"(99) 999 99 99",fullCodes:["375"]},{countryEn:"Belgium",countryRu:"Бельгия",countryCode:"BE",dialCode:"32",phoneMask:"999 99 99 99",fullCodes:["32"]},{countryEn:"Belize",countryRu:"Белиз",countryCode:"BZ",dialCode:"501",fullCodes:["501"]},{countryEn:"Benin",countryRu:"Бенин",countryCode:"BJ",dialCode:"229",fullCodes:["229"]},{countryEn:"Bhutan",countryRu:"Бутан",countryCode:"BT",dialCode:"975",fullCodes:["975"]},{countryEn:"Bolivia",countryRu:"Боливия",countryCode:"BO",dialCode:"591",fullCodes:["591"]},{countryEn:"Bosnia and Herzegovina",countryRu:"Босния и Герцеговина",countryCode:"BA",dialCode:"387",fullCodes:["387"]},{countryEn:"Botswana",countryRu:"Ботсвана",countryCode:"BW",dialCode:"267",fullCodes:["267"]},{countryEn:"Brazil",countryRu:"Бразилия",countryCode:"BR",dialCode:"55",phoneMask:"(99) 999999999",fullCodes:["55"]},{countryEn:"British Indian Ocean Territory",countryRu:"Британская территория в Индийском океане",countryCode:"IO",dialCode:"246",fullCodes:["246"]},{countryEn:"Brunei",countryRu:"Бруней-Даруссалам",countryCode:"BN",dialCode:"673",fullCodes:["673"]},{countryEn:"Bulgaria",countryRu:"Болгария",countryCode:"BG",dialCode:"359",fullCodes:["359"]},{countryEn:"Burkina Faso",countryRu:"Буркина-Фасо",countryCode:"BF",dialCode:"226",fullCodes:["226"]},{countryEn:"Burundi",countryRu:"Бурунди",countryCode:"BI",dialCode:"257",fullCodes:["257"]},{countryEn:"Cambodia",countryRu:"Камбоджа",countryCode:"KH",dialCode:"855",fullCodes:["855"]},{countryEn:"Cameroon",countryRu:"Камерун",countryCode:"CM",dialCode:"237",fullCodes:["237"]},{countryEn:"Canada",countryRu:"Канада",countryCode:"CA",dialCode:"1",phoneMask:"(999) 999-9999",dialCodePriority:1,areaCodes:["204","226","236","249","250","289","306","343","365","387","403","416","418","431","437","438","450","506","514","519","548","579","581","587","604","613","639","647","672","705","709","742","778","780","782","807","819","825","867","873","902","905"],fullCodes:["1204","1226","1236","1249","1250","1289","1306","1343","1365","1387","1403","1416","1418","1431","1437","1438","1450","1506","1514","1519","1548","1579","1581","1587","1604","1613","1639","1647","1672","1705","1709","1742","1778","1780","1782","1807","1819","1825","1867","1873","1902","1905"]},{countryEn:"Cape Verde",countryRu:"Кабо-Верде",countryCode:"CV",dialCode:"238",fullCodes:["238"]},{countryEn:"Caribbean Netherlands",countryRu:"Бонайре, Саба и Синт-Эстатиус",countryCode:"BQ",dialCode:"599",dialCodePriority:1,fullCodes:["599"]},{countryEn:"Central African Republic",countryRu:"Центрально-Африканская Республика",countryCode:"CF",dialCode:"236",fullCodes:["236"]},{countryEn:"Chad",countryRu:"Чад",countryCode:"TD",dialCode:"235",fullCodes:["235"]},{countryEn:"Chile",countryRu:"Чили",countryCode:"CL",dialCode:"56",fullCodes:["56"]},{countryEn:"China",countryRu:"Китай",countryCode:"CN",dialCode:"86",phoneMask:"99-999999999",fullCodes:["86"]},{countryEn:"Colombia",countryRu:"Колумбия",countryCode:"CO",dialCode:"57",fullCodes:["57"]},{countryEn:"Comoros",countryRu:"Коморы",countryCode:"KM",dialCode:"269",fullCodes:["269"]},{countryEn:"DR Congo",countryRu:"ДР Конго",countryCode:"CD",dialCode:"243",fullCodes:["243"]},{countryEn:"Republic of the Congo",countryRu:"Республика Конго",countryCode:"CG",dialCode:"242",fullCodes:["242"]},{countryEn:"Costa Rica",countryRu:"Коста-Рика",countryCode:"CR",dialCode:"506",phoneMask:"9999-9999",fullCodes:["506"]},{countryEn:"Côte d’Ivoire",countryRu:"Кот д’Ивуар",countryCode:"CI",dialCode:"225",phoneMask:"99 99 99 99",fullCodes:["225"]},{countryEn:"Croatia",countryRu:"Хорватия",countryCode:"HR",dialCode:"385",fullCodes:["385"]},{countryEn:"Cuba",countryRu:"Куба",countryCode:"CU",dialCode:"53",fullCodes:["53"]},{countryEn:"Curaçao",countryRu:"Кюрасао",countryCode:"CW",dialCode:"599",dialCodePriority:0,fullCodes:["599"]},{countryEn:"Cyprus",countryRu:"Кипр",countryCode:"CY",dialCode:"357",phoneMask:"99 999999",fullCodes:["357"]},{countryEn:"Czech Republic",countryRu:"Чешская Республика",countryCode:"CZ",dialCode:"420",fullCodes:["420"]},{countryEn:"Denmark",countryRu:"Дания",countryCode:"DK",dialCode:"45",phoneMask:"99 99 99 99",fullCodes:["45"]},{countryEn:"Djibouti",countryRu:"Джибути",countryCode:"DJ",dialCode:"253",fullCodes:["253"]},{countryEn:"Dominica",countryRu:"Доминика",countryCode:"DM",dialCode:"1767",fullCodes:["1767"]},{countryEn:"Dominican Republic",countryRu:"Доминиканская Республика",countryCode:"DO",dialCode:"1",dialCodePriority:2,areaCodes:["809","829","849"],fullCodes:["1809","1829","1849"]},{countryEn:"Ecuador",countryRu:"Эквадор",countryCode:"EC",dialCode:"593",fullCodes:["593"]},{countryEn:"Egypt",countryRu:"Египет",countryCode:"EG",dialCode:"20",fullCodes:["20"]},{countryEn:"El Salvador",countryRu:"Эль-Сальвадор",countryCode:"SV",dialCode:"503",phoneMask:"9999-9999",fullCodes:["503"]},{countryEn:"Equatorial Guinea",countryRu:"Экваториальная Гвинея",countryCode:"GQ",dialCode:"240",fullCodes:["240"]},{countryEn:"Eritrea",countryRu:"Эритрея",countryCode:"ER",dialCode:"291",fullCodes:["291"]},{countryEn:"Estonia",countryRu:"Эстония",countryCode:"EE",dialCode:"372",phoneMask:"9999 999999",fullCodes:["372"]},{countryEn:"Ethiopia",countryRu:"Эфиопия",countryCode:"ET",dialCode:"251",fullCodes:["251"]},{countryEn:"Fiji",countryRu:"Фиджи",countryCode:"FJ",dialCode:"679",fullCodes:["679"]},{countryEn:"Finland",countryRu:"Финляндия",countryCode:"FI",dialCode:"358",phoneMask:"99 999 99 99",fullCodes:["358"]},{countryEn:"France",countryRu:"Франция",countryCode:"FR",dialCode:"33",phoneMask:"9 99 99 99 99",fullCodes:["33"]},{countryEn:"French Guiana",countryRu:"Французская Гвиана",countryCode:"GF",dialCode:"594",fullCodes:["594"]},{countryEn:"French Polynesia",countryRu:"Французская Полинезия",countryCode:"PF",dialCode:"689",fullCodes:["689"]},{countryEn:"Gabon",countryRu:"Габон",countryCode:"GA",dialCode:"241",fullCodes:["241"]},{countryEn:"Gambia",countryRu:"Гамбия",countryCode:"GM",dialCode:"220",fullCodes:["220"]},{countryEn:"Georgia",countryRu:"Грузия",countryCode:"GE",dialCode:"995",fullCodes:["995"]},{countryEn:"Germany",countryRu:"Германия",countryCode:"DE",dialCode:"49",phoneMask:"9999 99999999",fullCodes:["49"]},{countryEn:"Ghana",countryRu:"Гана",countryCode:"GH",dialCode:"233",fullCodes:["233"]},{countryEn:"Greece",countryRu:"Греция",countryCode:"GR",dialCode:"30",fullCodes:["30"]},{countryEn:"Grenada",countryRu:"Гренада",countryCode:"GD",dialCode:"1473",fullCodes:["1473"]},{countryEn:"Guadeloupe",countryRu:"Гваделупа",countryCode:"GP",dialCode:"590",dialCodePriority:0,fullCodes:["590"]},{countryEn:"Guam",countryRu:"Гуам",countryCode:"GU",dialCode:"1671",fullCodes:["1671"]},{countryEn:"Guatemala",countryRu:"Гватемала",countryCode:"GT",dialCode:"502",phoneMask:"9999-9999",fullCodes:["502"]},{countryEn:"Guinea",countryRu:"Гвинея",countryCode:"GN",dialCode:"224",fullCodes:["224"]},{countryEn:"Guinea-Bissau",countryRu:"Гвинея-Бисау",countryCode:"GW",dialCode:"245",fullCodes:["245"]},{countryEn:"Guyana",countryRu:"Гайана",countryCode:"GY",dialCode:"592",fullCodes:["592"]},{countryEn:"Haiti",countryRu:"Гаити",countryCode:"HT",dialCode:"509",phoneMask:"9999-9999",fullCodes:["509"]},{countryEn:"Honduras",countryRu:"Гондурас",countryCode:"HN",dialCode:"504",fullCodes:["504"]},{countryEn:"Hong Kong",countryRu:"Гонконг",countryCode:"HK",dialCode:"852",phoneMask:"9999 9999",fullCodes:["852"]},{countryEn:"Hungary",countryRu:"Венгрия",countryCode:"HU",dialCode:"36",fullCodes:["36"]},{countryEn:"Iceland",countryRu:"Исландия",countryCode:"IS",dialCode:"354",phoneMask:"999 9999",fullCodes:["354"]},{countryEn:"India",countryRu:"Индия",countryCode:"IN",dialCode:"91",phoneMask:"99999-99999",fullCodes:["91"]},{countryEn:"Indonesia",countryRu:"Индонезия",countryCode:"ID",dialCode:"62",fullCodes:["62"]},{countryEn:"Iran",countryRu:"Иран",countryCode:"IR",dialCode:"98",fullCodes:["98"]},{countryEn:"Iraq",countryRu:"Ирак",countryCode:"IQ",dialCode:"964",fullCodes:["964"]},{countryEn:"Ireland",countryRu:"Ирландия",countryCode:"IE",dialCode:"353",phoneMask:"99 9999999",fullCodes:["353"]},{countryEn:"Israel",countryRu:"Израиль",countryCode:"IL",dialCode:"972",phoneMask:"999 999 9999",fullCodes:["972"]},{countryEn:"Italy",countryRu:"Италия",countryCode:"IT",dialCode:"39",phoneMask:"999 9999999",dialCodePriority:0,fullCodes:["39"]},{countryEn:"Jamaica",countryRu:"Ямайка",countryCode:"JM",dialCode:"1876",fullCodes:["1876"]},{countryEn:"Japan",countryRu:"Япония",countryCode:"JP",dialCode:"81",phoneMask:"99 9999 9999",fullCodes:["81"]},{countryEn:"Jordan",countryRu:"Иордания",countryCode:"JO",dialCode:"962",fullCodes:["962"]},{countryEn:"Kazakhstan",countryRu:"Казахстан",countryCode:"KZ",dialCode:"7",phoneMask:"(999) 999-99-99",dialCodePriority:1,fullCodes:["7"]},{countryEn:"Kenya",countryRu:"Кения",countryCode:"KE",dialCode:"254",fullCodes:["254"]},{countryEn:"Kiribati",countryRu:"Кирибати",countryCode:"KI",dialCode:"686",fullCodes:["686"]},{countryEn:"Kosovo",countryRu:"Косово",countryCode:"XK",dialCode:"383",fullCodes:["383"]},{countryEn:"Kuwait",countryRu:"Кувейт",countryCode:"KW",dialCode:"965",fullCodes:["965"]},{countryEn:"Kyrgyzstan",countryRu:"Киргизия",countryCode:"KG",dialCode:"996",fullCodes:["996"]},{countryEn:"Laos",countryRu:"Лаос",countryCode:"LA",dialCode:"856",fullCodes:["856"]},{countryEn:"Latvia",countryRu:"Латвия",countryCode:"LV",dialCode:"371",fullCodes:["371"]},{countryEn:"Lebanon",countryRu:"Ливан",countryCode:"LB",dialCode:"961",fullCodes:["961"]},{countryEn:"Lesotho",countryRu:"Лесото",countryCode:"LS",dialCode:"266",fullCodes:["266"]},{countryEn:"Liberia",countryRu:"Либерия",countryCode:"LR",dialCode:"231",fullCodes:["231"]},{countryEn:"Libya",countryRu:"Ливийская Арабская Джамахирия",countryCode:"LY",dialCode:"218",fullCodes:["218"]},{countryEn:"Liechtenstein",countryRu:"Лихтенштейн",countryCode:"LI",dialCode:"423",fullCodes:["423"]},{countryEn:"Lithuania",countryRu:"Литва",countryCode:"LT",dialCode:"370",fullCodes:["370"]},{countryEn:"Luxembourg",countryRu:"Люксембург",countryCode:"LU",dialCode:"352",fullCodes:["352"]},{countryEn:"Macau",countryRu:"Макао",countryCode:"MO",dialCode:"853",fullCodes:["853"]},{countryEn:"Macedonia",countryRu:"Республика Македония",countryCode:"MK",dialCode:"389",fullCodes:["389"]},{countryEn:"Madagascar",countryRu:"Мадагаскар",countryCode:"MG",dialCode:"261",fullCodes:["261"]},{countryEn:"Malawi",countryRu:"Малави",countryCode:"MW",dialCode:"265",fullCodes:["265"]},{countryEn:"Malaysia",countryRu:"Малайзия",countryCode:"MY",dialCode:"60",phoneMask:"99-9999-9999",fullCodes:["60"]},{countryEn:"Maldives",countryRu:"Мальдивы",countryCode:"MV",dialCode:"960",fullCodes:["960"]},{countryEn:"Mali",countryRu:"Мали",countryCode:"ML",dialCode:"223",fullCodes:["223"]},{countryEn:"Malta",countryRu:"Мальта",countryCode:"MT",dialCode:"356",fullCodes:["356"]},{countryEn:"Marshall Islands",countryRu:"Маршалловы острова",countryCode:"MH",dialCode:"692",fullCodes:["692"]},{countryEn:"Martinique",countryRu:"Мартиника",countryCode:"MQ",dialCode:"596",fullCodes:["596"]},{countryEn:"Mauritania",countryRu:"Мавритания",countryCode:"MR",dialCode:"222",fullCodes:["222"]},{countryEn:"Mauritius",countryRu:"Маврикий",countryCode:"MU",dialCode:"230",fullCodes:["230"]},{countryEn:"Mexico",countryRu:"Мексика",countryCode:"MX",dialCode:"52",phoneMask:"999 999 9999",dialCodePriority:0,areaCodes:["55","81","33","656","664","998","774","229"],fullCodes:["5255","5281","5233","52656","52664","52998","52774","52229"]},{countryEn:"Micronesia",countryRu:"Микронезия, Федеративные Штаты",countryCode:"FM",dialCode:"691",fullCodes:["691"]},{countryEn:"Moldova",countryRu:"Молдова, Республика",countryCode:"MD",dialCode:"373",phoneMask:"(99) 99-99-99",fullCodes:["373"]},{countryEn:"Monaco",countryRu:"Монако",countryCode:"MC",dialCode:"377",fullCodes:["377"]},{countryEn:"Mongolia",countryRu:"Монголия",countryCode:"MN",dialCode:"976",fullCodes:["976"]},{countryEn:"Montenegro",countryRu:"Черногория",countryCode:"ME",dialCode:"382",fullCodes:["382"]},{countryEn:"Morocco",countryRu:"Марокко",countryCode:"MA",dialCode:"212",fullCodes:["212"]},{countryEn:"Mozambique",countryRu:"Мозамбик",countryCode:"MZ",dialCode:"258",fullCodes:["258"]},{countryEn:"Myanmar",countryRu:"Мьянма",countryCode:"MM",dialCode:"95",fullCodes:["95"]},{countryEn:"Namibia",countryRu:"Намибия",countryCode:"NA",dialCode:"264",fullCodes:["264"]},{countryEn:"Nauru",countryRu:"Науру",countryCode:"NR",dialCode:"674",fullCodes:["674"]},{countryEn:"Nepal",countryRu:"Непал",countryCode:"NP",dialCode:"977",fullCodes:["977"]},{countryEn:"Netherlands",countryRu:"Нидерланды",countryCode:"NL",dialCode:"31",phoneMask:"99 99999999",fullCodes:["31"]},{countryEn:"New Caledonia",countryRu:"Новая Каледония",countryCode:"NC",dialCode:"687",fullCodes:["687"]},{countryEn:"New Zealand",countryRu:"Новая Зеландия",countryCode:"NZ",dialCode:"64",phoneMask:"999-999-9999",fullCodes:["64"]},{countryEn:"Nicaragua",countryRu:"Никарагуа",countryCode:"NI",dialCode:"505",fullCodes:["505"]},{countryEn:"Niger",countryRu:"Нигер",countryCode:"NE",dialCode:"227",fullCodes:["227"]},{countryEn:"Nigeria",countryRu:"Нигерия",countryCode:"NG",dialCode:"234",fullCodes:["234"]},{countryEn:"North Korea",countryRu:"Северная Корея",countryCode:"KP",dialCode:"850",fullCodes:["850"]},{countryEn:"Norway",countryRu:"Норвегия",countryCode:"NO",dialCode:"47",phoneMask:"999 99 999",fullCodes:["47"]},{countryEn:"Oman",countryRu:"Оман",countryCode:"OM",dialCode:"968",fullCodes:["968"]},{countryEn:"Pakistan",countryRu:"Пакистан",countryCode:"PK",dialCode:"92",phoneMask:"999-9999999",fullCodes:["92"]},{countryEn:"Palau",countryRu:"Палау",countryCode:"PW",dialCode:"680",fullCodes:["680"]},{countryEn:"Palestine",countryRu:"Палестинская территория",countryCode:"PS",dialCode:"970",fullCodes:["970"]},{countryEn:"Panama",countryRu:"Панама",countryCode:"PA",dialCode:"507",fullCodes:["507"]},{countryEn:"Papua New Guinea",countryRu:"Папуа-Новая Гвинея",countryCode:"PG",dialCode:"675",fullCodes:["675"]},{countryEn:"Paraguay",countryRu:"Парагвай",countryCode:"PY",dialCode:"595",fullCodes:["595"]},{countryEn:"Peru",countryRu:"Перу",countryCode:"PE",dialCode:"51",fullCodes:["51"]},{countryEn:"Philippines",countryRu:"Филиппины",countryCode:"PH",dialCode:"63",phoneMask:"9999 9999999",fullCodes:["63"]},{countryEn:"Poland",countryRu:"Польша",countryCode:"PL",dialCode:"48",phoneMask:"999-999-999",fullCodes:["48"]},{countryEn:"Portugal",countryRu:"Португалия",countryCode:"PT",dialCode:"351",fullCodes:["351"]},{countryEn:"Puerto Rico",countryRu:"Пуэрто-Рико",countryCode:"PR",dialCode:"1",dialCodePriority:3,areaCodes:["787","939"],fullCodes:["1787","1939"]},{countryEn:"Qatar",countryRu:"Катар",countryCode:"QA",dialCode:"974",fullCodes:["974"]},{countryEn:"Réunion",countryRu:"Реюньон",countryCode:"RE",dialCode:"262",fullCodes:["262"]},{countryEn:"Romania",countryRu:"Румыния",countryCode:"RO",dialCode:"40",fullCodes:["40"]},{countryEn:"Russia",countryRu:"Россия",countryCode:"RU",dialCode:"7",phoneMask:"(999) 999-99-99",dialCodePriority:0,fullCodes:["7"]},{countryEn:"Rwanda",countryRu:"Руанда",countryCode:"RW",dialCode:"250",fullCodes:["250"]},{countryEn:"Saint Kitts and Nevis",countryRu:"Сент-Китс и Невис",countryCode:"KN",dialCode:"1869",fullCodes:["1869"]},{countryEn:"Saint Lucia",countryRu:"Сент-Люсия",countryCode:"LC",dialCode:"1758",fullCodes:["1758"]},{countryEn:"Saint Vincent and the Grenadines",countryRu:"Сент-Винсент и Гренадины",countryCode:"VC",dialCode:"1784",fullCodes:["1784"]},{countryEn:"Samoa",countryRu:"Самоа",countryCode:"WS",dialCode:"685",fullCodes:["685"]},{countryEn:"San Marino",countryRu:"Сан-Марино",countryCode:"SM",dialCode:"378",fullCodes:["378"]},{countryEn:"São Tomé and Príncipe",countryRu:"Сан-Томе и Принсипи",countryCode:"ST",dialCode:"239",fullCodes:["239"]},{countryEn:"Saudi Arabia",countryRu:"Саудовская Аравия",countryCode:"SA",dialCode:"966",fullCodes:["966"]},{countryEn:"Senegal",countryRu:"Сенегал",countryCode:"SN",dialCode:"221",fullCodes:["221"]},{countryEn:"Serbia",countryRu:"Сербия",countryCode:"RS",dialCode:"381",fullCodes:["381"]},{countryEn:"Seychelles",countryRu:"Сейшелы",countryCode:"SC",dialCode:"248",fullCodes:["248"]},{countryEn:"Sierra Leone",countryRu:"Сьерра-Леоне",countryCode:"SL",dialCode:"232",fullCodes:["232"]},{countryEn:"Singapore",countryRu:"Сингапур",countryCode:"SG",dialCode:"65",phoneMask:"9999-9999",fullCodes:["65"]},{countryEn:"Slovakia",countryRu:"Словакия",countryCode:"SK",dialCode:"421",fullCodes:["421"]},{countryEn:"Slovenia",countryRu:"Словения",countryCode:"SI",dialCode:"386",fullCodes:["386"]},{countryEn:"Solomon Islands",countryRu:"Соломоновы острова",countryCode:"SB",dialCode:"677",fullCodes:["677"]},{countryEn:"Somalia",countryRu:"Сомали",countryCode:"SO",dialCode:"252",fullCodes:["252"]},{countryEn:"South Africa",countryRu:"Южная Африка",countryCode:"ZA",dialCode:"27",fullCodes:["27"]},{countryEn:"South Korea",countryRu:"Южная Корея",countryCode:"KR",dialCode:"82",phoneMask:"999 9999 9999",fullCodes:["82"]},{countryCode:"OS",countryEn:"South Ossetia",countryRu:"Южная Осетия",phoneMask:"(999) 999-99-99",dialCode:"7",dialCodePriority:1,fullCodes:["7"]},{countryEn:"South Sudan",countryRu:"Южный Судан",countryCode:"SS",dialCode:"211",fullCodes:["211"]},{countryEn:"Spain",countryRu:"Испания",countryCode:"ES",dialCode:"34",phoneMask:"999 999 999",fullCodes:["34"]},{countryEn:"Sri Lanka",countryRu:"Шри-Ланка",countryCode:"LK",dialCode:"94",fullCodes:["94"]},{countryEn:"Sudan",countryRu:"Судан",countryCode:"SD",dialCode:"249",fullCodes:["249"]},{countryEn:"Suriname",countryRu:"Суринам",countryCode:"SR",dialCode:"597",fullCodes:["597"]},{countryEn:"Swaziland",countryRu:"Свазиленд",countryCode:"SZ",dialCode:"268",fullCodes:["268"]},{countryEn:"Sweden",countryRu:"Швеция",countryCode:"SE",dialCode:"46",phoneMask:"(999) 999-999",fullCodes:["46"]},{countryEn:"Switzerland",countryRu:"Швейцария",countryCode:"CH",dialCode:"41",phoneMask:"99 999 99 99",fullCodes:["41"]},{countryEn:"Syria",countryRu:"Сирийская Арабская Республика",countryCode:"SY",dialCode:"963",fullCodes:["963"]},{countryEn:"Taiwan",countryRu:"Тайвань",countryCode:"TW",dialCode:"886",fullCodes:["886"]},{countryEn:"Tajikistan",countryRu:"Таджикистан",countryCode:"TJ",dialCode:"992",fullCodes:["992"]},{countryEn:"Tanzania",countryRu:"Танзания",countryCode:"TZ",dialCode:"255",fullCodes:["255"]},{countryEn:"Thailand",countryRu:"Таиланд",countryCode:"TH",dialCode:"66",fullCodes:["66"]},{countryEn:"Timor-Leste",countryRu:"Тимор-Лесте",countryCode:"TL",dialCode:"670",fullCodes:["670"]},{countryEn:"Togo",countryRu:"Того",countryCode:"TG",dialCode:"228",fullCodes:["228"]},{countryEn:"Tonga",countryRu:"Тонга",countryCode:"TO",dialCode:"676",fullCodes:["676"]},{countryEn:"Trinidad and Tobago",countryRu:"Тринидад и Тобаго",countryCode:"TT",dialCode:"1868",fullCodes:["1868"]},{countryEn:"Tunisia",countryRu:"Тунис",countryCode:"TN",dialCode:"216",fullCodes:["216"]},{countryEn:"Turkey",countryRu:"Турция",countryCode:"TR",dialCode:"90",phoneMask:"999 999 99 99",fullCodes:["90"]},{countryEn:"Turkmenistan",countryRu:"Туркмения",countryCode:"TM",dialCode:"993",fullCodes:["993"]},{countryEn:"Tuvalu",countryRu:"Тувалу",countryCode:"TV",dialCode:"688",fullCodes:["688"]},{countryEn:"Uganda",countryRu:"Уганда",countryCode:"UG",dialCode:"256",fullCodes:["256"]},{countryEn:"Ukraine",countryRu:"Украина",countryCode:"UA",dialCode:"380",phoneMask:"(99) 999 99 99",fullCodes:["380"]},{countryEn:"United Arab Emirates",countryRu:"Объединенные Арабские Эмираты",countryCode:"AE",dialCode:"971",fullCodes:["971"]},{countryEn:"United Kingdom",countryRu:"Соединенное Королевство",countryCode:"GB",dialCode:"44",phoneMask:"9999 999999",fullCodes:["44"]},{countryEn:"United States",countryRu:"Соединенные Штаты",countryCode:"US",dialCode:"1",phoneMask:"(999) 999-9999",dialCodePriority:0,areaCodes:["907","205","251","256","334","479","501","870","480","520","602","623","928","209","213","310","323","408","415","510","530","559","562","619","626","650","661","707","714","760","805","818","831","858","909","916","925","949","951","303","719","970","203","860","202","302","239","305","321","352","386","407","561","727","772","813","850","863","904","941","954","229","404","478","706","770","912","808","319","515","563","641","712","208","217","309","312","618","630","708","773","815","847","219","260","317","574","765","812","316","620","785","913","270","502","606","859","225","318","337","504","985","413","508","617","781","978","301","410","207","231","248","269","313","517","586","616","734","810","906","989","218","320","507","612","651","763","952","314","417","573","636","660","816","228","601","662","406","252","336","704","828","910","919","701","308","402","603","201","609","732","856","908","973","505","575","702","775","212","315","516","518","585","607","631","716","718","845","914","216","330","419","440","513","614","740","937","405","580","918","503","541","215","412","570","610","717","724","814","401","803","843","864","605","423","615","731","865","901","931","210","214","254","281","325","361","409","432","512","713","806","817","830","903","915","936","940","956","972","979","435","801","276","434","540","703","757","804","802","206","253","360","425","509","262","414","608","715","920","304","307"],fullCodes:["1907","1205","1251","1256","1334","1479","1501","1870","1480","1520","1602","1623","1928","1209","1213","1310","1323","1408","1415","1510","1530","1559","1562","1619","1626","1650","1661","1707","1714","1760","1805","1818","1831","1858","1909","1916","1925","1949","1951","1303","1719","1970","1203","1860","1202","1302","1239","1305","1321","1352","1386","1407","1561","1727","1772","1813","1850","1863","1904","1941","1954","1229","1404","1478","1706","1770","1912","1808","1319","1515","1563","1641","1712","1208","1217","1309","1312","1618","1630","1708","1773","1815","1847","1219","1260","1317","1574","1765","1812","1316","1620","1785","1913","1270","1502","1606","1859","1225","1318","1337","1504","1985","1413","1508","1617","1781","1978","1301","1410","1207","1231","1248","1269","1313","1517","1586","1616","1734","1810","1906","1989","1218","1320","1507","1612","1651","1763","1952","1314","1417","1573","1636","1660","1816","1228","1601","1662","1406","1252","1336","1704","1828","1910","1919","1701","1308","1402","1603","1201","1609","1732","1856","1908","1973","1505","1575","1702","1775","1212","1315","1516","1518","1585","1607","1631","1716","1718","1845","1914","1216","1330","1419","1440","1513","1614","1740","1937","1405","1580","1918","1503","1541","1215","1412","1570","1610","1717","1724","1814","1401","1803","1843","1864","1605","1423","1615","1731","1865","1901","1931","1210","1214","1254","1281","1325","1361","1409","1432","1512","1713","1806","1817","1830","1903","1915","1936","1940","1956","1972","1979","1435","1801","1276","1434","1540","1703","1757","1804","1802","1206","1253","1360","1425","1509","1262","1414","1608","1715","1920","1304","1307"]},{countryEn:"Uruguay",countryRu:"Уругвай",countryCode:"UY",dialCode:"598",fullCodes:["598"]},{countryEn:"Uzbekistan",countryRu:"Узбекистан",countryCode:"UZ",dialCode:"998",fullCodes:["998"]},{countryEn:"Vanuatu",countryRu:"Вануату",countryCode:"VU",dialCode:"678",fullCodes:["678"]},{countryEn:"Vatican City",countryRu:"Ватикан",countryCode:"VA",dialCode:"39",phoneMask:"99 9999 9999",dialCodePriority:1,fullCodes:["39"]},{countryEn:"Venezuela",countryRu:"Венесуэла",countryCode:"VE",dialCode:"58",fullCodes:["58"]},{countryEn:"Vietnam",countryRu:"Вьетнам",countryCode:"VN",dialCode:"84",fullCodes:["84"]},{countryEn:"Yemen",countryRu:"Йемен",countryCode:"YE",dialCode:"967",fullCodes:["967"]},{countryEn:"Zambia",countryRu:"Замбия",countryCode:"ZM",dialCode:"260",fullCodes:["260"]},{countryEn:"Zimbabwe",countryRu:"Зимбабве",countryCode:"ZW",dialCode:"263",fullCodes:["263"]}],V={aac:"audio/aac",abw:"application/x-abiword",arc:"application/x-freearc",avi:"video/x-msvideo",azw:"application/vnd.amazon.ebook",bin:"application/octet-stream",bmp:"image/bmp",bz:"application/x-bzip",bz2:"application/x-bzip2",csh:"application/x-csh",css:"text/css",csv:"text/csv",doc:"application/msword",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",eot:"application/vnd.ms-fontobject",epub:"application/epub+zip",gz:"application/gzip",gif:"image/gif",htm:"text/html",html:"text/html",ico:"image/vnd.microsoft.icon",ics:"text/calendar",jar:"application/java-archive",jpeg:"image/jpeg",jpg:"image/jpeg",js:"text/javascript",json:"application/json",jsonld:"application/ld+json",mid:".midi",mjs:"text/javascript",mp3:"audio/mpeg",mpeg:"video/mpeg",mpkg:"application/vnd.apple.installer+xml",odp:"application/vnd.oasis.opendocument.presentation",ods:"application/vnd.oasis.opendocument.spreadsheet",odt:"application/vnd.oasis.opendocument.text",oga:"audio/ogg",ogv:"video/ogg",ogx:"application/ogg",opus:"audio/opus",otf:"font/otf",png:"image/png",pdf:"application/pdf",php:"application/php",ppt:"application/vnd.ms-powerpoint",pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation",rar:"application/vnd.rar",rtf:"application/rtf",sh:"application/x-sh",svg:"image/svg+xml",swf:"application/x-shockwave-flash",tar:"application/x-tar",tif:"image/tiff",tiff:"image/tiff",ts:"video/mp2t",ttf:"font/ttf",txt:"text/plain",vsd:"application/vnd.visio",wav:"audio/wav",weba:"audio/webm",webm:"video/webm",webp:"image/webp",woff:"font/woff",woff2:"font/woff2",xhtml:"application/xhtml+xml",xls:"application/vnd.ms-excel",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xml:"XML",xul:"application/vnd.mozilla.xul+xml",zip:"application/zip","3gp":"video/3gpp","3g2":"video/3gpp2","7z":"application/x-7z-compressed"},G=(e,t=$)=>n.isNotEmpty(e)?t.find(t=>t.countryCode===e):void 0,U=(e,t=$)=>n.isNotEmpty(e)?t.findIndex(t=>t.countryCode===e):-1,K=(e,t)=>"ru"===t.toLowerCase()?e.countryRu:e.countryEn,Z=(e,t)=>e.sort((e,o)=>K(e,t).localeCompare(K(o,t))),Y=(e,t)=>{const o=t.toLowerCase().trim().replace("+","");return[e.countryRu,e.countryEn,...e.countryRu.split(" "),...e.countryEn.split(" "),e.dialCode].map(e=>e.toLowerCase()).some(e=>e.startsWith(o))},q=e=>(e?.dialCode??"")+(e?.phoneNumber??""),X=e=>{if(n.isStringEmpty(e))return;const t=$.filter(t=>t.fullCodes.some(t=>e.startsWith(t)));if(1===t.length)return t[0].countryCode;const o=$.filter(t=>e.startsWith(t.dialCode)).sort((e,t)=>(e.dialCodePriority??1e3)-(t.dialCodePriority??1e3));return o.at(0)?.countryCode},J=(e,t)=>{const o=t??X(e),n=G(o)?.dialCode;return{dialCode:n,phoneNumber:e.slice(n?.length),countryCode:o}},Q="+ 9 999 999 999 999 99",ee=e=>{let t=Q;if(n.isNotEmpty(e)){const o=G(e);if(void 0!==o){const e=o.dialCode.length,n=o.phoneMask??t.substring(2,t.length-e);t=`+ ${"9".repeat(e)} ${n}`}}return t},te=e=>{let t="";return e.split("").forEach(e=>{e.toLowerCase()===e?t+=e:t+=`-${e.toLowerCase()}`}),t},oe=e=>"HTML"===e.nodeName||e===document?e:e.parentNode??e.host,ne=(e,t)=>{if(e===t)return!0;const o=oe(e);return o!==e&&ne(o,t)},ie=e=>1!==e.nodeType?{}:getComputedStyle(e,null),re=e=>{if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}const{overflow:t,overflowX:o,overflowY:n}=ie(e)??{};return/(auto|scroll|overlay)/.test((t??"")+(n??"")+(o??""))?e:re(oe(e))},ae=(e,t=-1/0,o=1/0)=>Math.min(o,Math.max(t,e)),le=(e,t=" ")=>{if(void 0===e)return"";const o=e.split(".");return o[0]=o[0].replace(/^0+(?=\d)/,"").replace(/\B(?=(\d{3})+(?!\d))/g,t),(o[1]??"").length>0?o.join("."):o[0]},se=(e,t=" ")=>void 0===e||isNaN(e)?"":le(String(e),t),de=e=>(e??"").replace(",",".").replace(/\s/g,""),ce=e=>{const t=de(e);if(""===t)return;const o=Number(t);return isNaN(o)?void 0:o},ue=(e,t)=>{null!==t&&null!==e&&(e.selectionStart?(e.focus(),e.setSelectionRange(t,t)):e.focus())},pe=e=>void 0!==e&&null!==e.match(/\s/),he=e=>void 0===e||isNaN(e)?0:e.toString().length,me=t.memo,ye=({isOpen:e,onDropdownClose:o,referenceElement:n,dropdownElement:i,options:r,dependenciesForPositionUpdating:a=[]})=>{const{shouldUsePopper:s=!1,shouldRenderInBody:d=!1,shouldHideOnScroll:c=!1,scrollParent:u="document",canBeFlipped:p=!1,modifiers:h=[],placement:m="bottom-start",flipOptions:y}=r??{};let f;return t.useEffect(()=>{if(!c||!e)return;const t="auto"===u?re(n):"document"===u?document:u;return t.addEventListener("scroll",o),()=>{t.removeEventListener("scroll",o)}},[c,e]),s&&(f=l(n,i,{enabled:e,placement:m,modifiers:[...d?[H]:[],{name:"offset",options:{offset:[0,6]}},{name:"flip",options:{fallbackPlacements:p?["bottom-start","top-start"]:["bottom-start"],...y}},...h]})),t.useEffect(()=>{0!==a.length&&f?.update()},a),f},fe=e=>{const o=t.useRef(e);return t.useLayoutEffect(()=>{o.current=e}),o},ge=({observerOptions:e,...o})=>{const i=fe(o),{ref:r,disconnect:a}=t.useMemo(()=>{const t=new IntersectionObserver(([{isIntersecting:e}])=>{const{current:t}=i;t?.isDisabled||(e?t?.onIntersection?.():t?.onIntersectionEnd?.())},e);return{ref:e=>{t.disconnect(),n.isNotEmpty(e)&&t.observe(e)},disconnect:()=>t.disconnect()}},[i,e]);return t.useEffect(()=>a,[a]),r},Ce=()=>{const e=t.useRef(!1);return t.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),t.useCallback(()=>e.current,[])},ve=e=>t.useMemo(()=>n.mergeRefs(e),e),xe=(e,t)=>!!e.classList.contains(t)||e!==document.body&&(!!e.parentElement&&xe(e.parentElement,t)),be=(e,t)=>e===t||e!==document.body&&(!!e.parentElement&&be(e.parentElement,t));function we(e,t,o){Se(e,t,void 0,o)}function Se(e,o,i,r){const a=fe({refOrGetter:e,ignoreRef:r,ignoreClassName:i,handler:o});t.useEffect(()=>{const e=e=>{const t=a.current,o=n.isFunction(t.refOrGetter)?t.refOrGetter():t.refOrGetter?.current,i=t.ignoreRef?.current,r=e.target;n.isEmpty(o)||o.contains(r)||n.isNotEmpty(t.ignoreClassName)&&xe(r,t.ignoreClassName)||n.isNotEmpty(i)&&be(r,i)||t.handler(e)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e)}},[a])}const Ne=({innerStyles:e,tweakStyles:o,className:n,currentComponentName:i})=>{const r=L(i);return t.useMemo(()=>D(e,D(r,o).map(e=>e[n])),[e,n,r,o])},ke={avatar:' <svg\n width="100%"\n height="100%"\n viewBox="0 0 32 32"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <circle opacity="0.5" cx="16" cy="16" r="16" fill="#DDE3ED" />\n <mask\n id="mask0_0_12744"\n style="mask-type: \'alpha\';"\n maskUnits="userSpaceOnUse"\n x="0"\n y="0"\n width="32"\n height="32"\n >\n <circle cx="16" cy="16" r="16" fill="white" />\n </mask>\n <g mask="url(#mask0_0_12744)">\n <circle cx="16" cy="29" r="13" fill="url(#paint0_linear_0_12744)" />\n <mask\n id="mask1_0_12744"\n style="mask-type: \'alpha\';"\n maskUnits="userSpaceOnUse"\n x="3"\n y="16"\n width="26"\n height="26"\n >\n <circle cx="16" cy="29" r="13" fill="white" />\n </mask>\n <g mask="url(#mask1_0_12744)">\n <ellipse\n cx="16"\n cy="17.5"\n rx="6"\n ry="7.5"\n fill="#505F79"\n fill-opacity="0.204983"\n />\n </g>\n </g>\n <ellipse cx="16" cy="13" rx="6" ry="7" fill="white" />\n <defs>\n <linearGradient\n id="paint0_linear_0_12744"\n x1="13.347"\n y1="46.279"\n x2="33.5318"\n y2="30.8088"\n gradientUnits="userSpaceOnUse"\n >\n <stop stop-color="#ABD229" />\n <stop offset="1" stop-color="#9CD03F" />\n </linearGradient>\n </defs>\n </svg>',calendar:'<svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M6 12h3V9H6v3zm-2 4V7h12l.002 9H4zM16 4h-1V3c0-.552-.448-1-1-1s-1 .448-1 1v1H7V3c0-.552-.448-1-1-1s-1 .448-1 1v1H4c-1.103 0-2 .897-2 2v10c0 1.103.897 2 2 2h12c1.103 0 2-.897 2-2V6c0-1.103-.897-2-2-2z"></path></svg>',check:'<svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="m7.5 13.086 7.793-7.793a1 1 0 1 1 1.414 1.414l-8.5 8.5a1 1 0 0 1-1.414 0l-3.5-3.5a1 1 0 1 1 1.414-1.414L7.5 13.086Z"></path></svg>',"chevron-down-small":'<svg width="100%" height="100%" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M8.24512 8.84751L11.038 6.05461C11.4285 5.66409 12.0617 5.66409 12.4522 6.05461C12.8427 6.44514 12.8427 7.0783 12.4522 7.46883L8.95222 10.9688C8.5617 11.3593 7.92853 11.3593 7.53801 10.9688L4.03801 7.46883C3.64749 7.0783 3.64749 6.44514 4.03801 6.05461C4.42853 5.66409 5.0617 5.66409 5.45222 6.05461L8.24512 8.84751Z"></path></svg>',"chevron-down":'<svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M10.0029 11.6053L5.71004 7.31242C5.31951 6.9219 4.68635 6.9219 4.29582 7.31242C3.9053 7.70295 3.9053 8.33611 4.29582 8.72664L9.29582 13.7266C9.68635 14.1172 10.3195 14.1172 10.71 13.7266L15.71 8.72664C16.1006 8.33611 16.1006 7.70295 15.71 7.31242C15.3195 6.9219 14.6863 6.9219 14.2958 7.31242L10.0029 11.6053Z"></path></svg>',"chevron-left":'<svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M8.41421 10L12.7071 5.70711C13.0976 5.31658 13.0976 4.68342 12.7071 4.29289C12.3166 3.90237 11.6834 3.90237 11.2929 4.29289L6.29289 9.29289C5.90237 9.68342 5.90237 10.3166 6.29289 10.7071L11.2929 15.7071C11.6834 16.0976 12.3166 16.0976 12.7071 15.7071C13.0976 15.3166 13.0976 14.6834 12.7071 14.2929L8.41421 10Z"></path></svg>',"chevron-right":'<svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M11.5858 10L7.29289 5.70711C6.90237 5.31658 6.90237 4.68342 7.29289 4.29289C7.68342 3.90237 8.31658 3.90237 8.70711 4.29289L13.7071 9.29289C14.0976 9.68342 14.0976 10.3166 13.7071 10.7071L8.70711 15.7071C8.31658 16.0976 7.68342 16.0976 7.29289 15.7071C6.90237 15.3166 6.90237 14.6834 7.29289 14.2929L11.5858 10Z"></path></svg>',"close-large":'<svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M6.102 4.709c-.446-.36-1.055-.373-1.415-.012-.39.39-.342 1.072.108 1.523l3.783 3.782-3.783 3.782-.096.108c-.36.446-.373 1.055-.012 1.415.39.391 1.072.342 1.523-.108l3.782-3.783 3.782 3.783.108.097c.446.358 1.055.372 1.415.011.39-.39.342-1.072-.108-1.523l-3.783-3.782L15.19 6.22l.097-.108c.358-.446.372-1.055.011-1.415-.39-.39-1.072-.342-1.523.108L9.992 8.588 6.21 4.805l-.108-.096Z"></path></svg>',"close-window":'<svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="currentColor" d="M4.5 4.5l11 11m0-11l-11 11" stroke-width="2" stroke-linejoin="round" stroke-linecap="round"></path></svg>',close:'<svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M11.985 10l2.407-2.293c.41-.39.41-1.023 0-1.414-.41-.39-1.074-.39-1.485 0L10.5 8.586 8.093 6.293c-.411-.39-1.075-.39-1.485 0-.41.391-.41 1.023 0 1.414L9.015 10l-2.407 2.293c-.41.391-.41 1.023 0 1.414.205.195.473.293.742.293s.538-.098.743-.293l2.407-2.293 2.407 2.293c.205.195.474.293.743.293s.537-.098.742-.293c.41-.391.41-1.023 0-1.414L11.985 10z"></path></svg>',"file-excel":'<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 20 20" fill="none">\n <rect width="20" height="20" rx="4" fill="#21A366"/>\n <rect width="20" height="20" rx="4" fill="url(#paint0_linear_0_16081)" style="mix-blend-mode:overlay"/>\n <path d="M8.00342 14.5244L10.0728 11.3062L12.1357 14.5244H14.4019L11.2217 9.73828L14.1162 5.21875H11.939L10.1108 8.2085L8.24463 5.21875H6.04834L8.93018 9.66846L5.75 14.5244H8.00342Z" fill="white"/>\n <defs>\n <linearGradient id="paint0_linear_0_16081" x1="-9.95187" y1="9.95187" x2="9.95187" y2="29.8556" gradientUnits="userSpaceOnUse">\n <stop stop-color="white" stop-opacity="0.245559"/>\n <stop offset="1" stop-opacity="0.498578"/>\n </linearGradient>\n </defs>\n</svg>',"file-image":'<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 20 20" fill="none">\n <rect width="20" height="20" rx="4" fill="#FF991F"/>\n <rect width="20" height="20" rx="4" fill="url(#paint0_linear_0_16103)" style="mix-blend-mode:overlay"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M3.90113 15C3.09595 15 2.62093 14.097 3.07709 13.4335L6.67606 8.19861C7.07341 7.62064 7.9268 7.62065 8.32414 8.19861L13.0001 15H3.90113Z" fill="white"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M9.53962 15L12.7076 10.2481C13.1034 9.65434 13.9758 9.65434 14.3717 10.2481L16.5031 13.4453C16.9462 14.1099 16.4698 15 15.6711 15H9.53962Z" fill="white"/>\n <path d="M16.0001 5.5C16.0001 6.32843 15.3285 7 14.5001 7C13.6717 7 13.0001 6.32843 13.0001 5.5C13.0001 4.67157 13.6717 4 14.5001 4C15.3285 4 16.0001 4.67157 16.0001 5.5Z" fill="white"/>\n <defs>\n <linearGradient id="paint0_linear_0_16103" x1="-9.95187" y1="9.95187" x2="9.95187" y2="29.8556" gradientUnits="userSpaceOnUse">\n <stop stop-color="white" stop-opacity="0.245559"/>\n <stop offset="1" stop-opacity="0.498578"/>\n </linearGradient>\n </defs>\n</svg>',"file-other":'<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 20 20" fill="none">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M18 6.60751L11.392 -0.000488281L5 0.000113437C3.34315 0.000113437 2 1.34326 2 3.00011V17.0001C2 18.657 3.34315 20.0001 5 20.0001H15C16.6569 20.0001 18 18.657 18 17.0001V6.60751ZM17 8.00011L10 1.00011V6.00011C10 7.10468 10.8954 8.00011 12 8.00011H17Z" fill="#AABFFC"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M18 6.60751L11.392 -0.000488281L5 0.000113437C3.34315 0.000113437 2 1.34326 2 3.00011V17.0001C2 18.657 3.34315 20.0001 5 20.0001H15C16.6569 20.0001 18 18.657 18 17.0001V6.60751ZM17 8.00011L10 1.00011V6.00011C10 7.10468 10.8954 8.00011 12 8.00011H17Z" fill="url(#paint0_linear_0_16113)" style="mix-blend-mode:overlay"/>\n <defs>\n <linearGradient id="paint0_linear_0_16113" x1="-5.9615" y1="9.95168" x2="13.4572" y2="25.4862" gradientUnits="userSpaceOnUse">\n <stop stop-color="white" stop-opacity="0.245559"/>\n <stop offset="1" stop-opacity="0.498578"/>\n </linearGradient>\n </defs>\n</svg>',"file-pdf":'<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 20 20" fill="none">\n <rect width="20" height="20" rx="4" fill="#FF5630"/>\n <rect width="20" height="20" rx="4" fill="url(#paint0_linear_0_16087)" style="mix-blend-mode:overlay"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M4.55535 13.6488V11.0388H4.92535C5.65535 11.0388 5.93535 10.9988 6.27535 10.8688C6.97535 10.5988 7.36535 9.92876 7.36535 8.99876C7.36535 8.21876 7.07535 7.57876 6.57535 7.25876C6.27535 7.06876 5.82535 6.97876 5.09535 6.97876H2.98535V13.6488H4.55535ZM4.84535 9.90876H4.54535V8.10876H4.84535C5.51535 8.10876 5.75535 8.34876 5.75535 9.02876C5.75535 9.66876 5.51535 9.90876 4.84535 9.90876ZM11.6393 13.4388C11.2793 13.5988 10.9993 13.6488 10.4393 13.6488H8.21935V6.97876H10.2593C11.2393 6.97876 11.7193 7.11876 12.1093 7.52876C12.5993 8.02876 12.7693 8.71876 12.7693 10.1388C12.7693 10.9388 12.7093 11.6788 12.6093 12.1588C12.4893 12.7388 12.1193 13.2188 11.6393 13.4388ZM10.0793 12.5188H9.79935V8.10876H10.0193C10.9713 8.10876 11.1466 8.35839 11.1586 9.95112L11.1593 10.1488C11.1593 12.2088 11.0193 12.5188 10.0793 12.5188ZM15.3333 10.8188V13.6488H13.7533V6.97876H17.6033V8.23876H15.3333V9.58876H17.4433V10.8188H15.3333Z" fill="white"/>\n <defs>\n <linearGradient id="paint0_linear_0_16087" x1="-9.95187" y1="9.95187" x2="9.95187" y2="29.8556" gradientUnits="userSpaceOnUse">\n <stop stop-color="white" stop-opacity="0.245559"/>\n <stop offset="1" stop-opacity="0.498578"/>\n </linearGradient>\n </defs>\n</svg>',"file-word":'<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 20 20" fill="none">\n <rect width="20" height="20" rx="4" fill="#2C7CD3"/>\n <rect width="20" height="20" rx="4" fill="url(#paint0_linear_0_16075)" style="mix-blend-mode:overlay"/>\n <path d="M8.0542 14.9946L9.90137 8.0376L11.7549 14.9946H13.748L16.0078 5.68896H14.1162L12.688 12.189L11.0566 5.68896H8.82227L7.12109 12.0811L5.71826 5.68896H3.79492L6.0166 14.9946H8.0542Z" fill="white"/>\n <defs>\n <linearGradient id="paint0_linear_0_16075" x1="-9.95187" y1="9.95187" x2="9.95187" y2="29.8556" gradientUnits="userSpaceOnUse">\n <stop stop-color="white" stop-opacity="0.245559"/>\n <stop offset="1" stop-opacity="0.498578"/>\n </linearGradient>\n </defs>\n</svg>',"file-xml":'<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 20 20" fill="none">\n <rect width="20" height="20" rx="4" fill="#FF991F"/>\n <rect width="20" height="20" rx="4" fill="url(#paint0_linear_2163_24057)" style="mix-blend-mode:overlay"/>\n <path d="M1.97561 5.99658L3.56111 9.43008L1.84961 13.0001H3.66611L4.21211 11.6771C4.40111 11.0996 4.45361 10.8791 4.49561 10.6166H4.52711C4.54811 10.8686 4.61111 11.1101 4.77911 11.5826L5.34611 13.0001H7.20461L5.49311 9.44058L7.07861 5.99658H5.28311L4.86311 7.06758C4.85261 7.08858 4.83161 7.16208 4.80011 7.25658C4.75811 7.44558 4.70561 7.63458 4.65311 7.82358C4.60061 8.02308 4.57961 8.10708 4.56911 8.23308H4.52711C4.49561 8.02308 4.43261 7.78158 4.27511 7.23558L3.82361 5.99658H1.97561Z" fill="white"/>\n <path d="M7.53437 5.99658V13.0001H9.05687V9.78708L9.02537 9.34608L8.98337 8.41158C8.98337 8.33808 8.96237 8.00208 8.92037 7.47708H8.98337C9.05687 7.90758 9.10937 8.21208 9.18287 8.53758C9.24587 8.87358 9.34037 9.28308 9.44537 9.77658L10.1804 13.0001H11.3984L12.1544 9.59808C12.2909 8.98908 12.5324 7.79208 12.5744 7.47708H12.6374C12.6059 7.80258 12.5849 8.01258 12.5744 8.22258L12.5534 8.98908C12.5429 9.25158 12.5324 9.52458 12.5219 9.80808V13.0001H14.0444V5.99658H11.6714L11.2409 8.10708C11.0834 8.74758 10.8419 10.3751 10.8419 10.8161L10.7999 10.8266C10.7894 10.2911 10.5269 8.61108 10.3274 7.85508L9.92837 5.99658H7.53437Z" fill="white"/>\n <path d="M14.8685 5.99658V13.0001H18.89V11.6666H16.5275V5.99658H14.8685Z" fill="white"/>\n <defs>\n <linearGradient id="paint0_linear_2163_24057" x1="-9.95187" y1="9.95187" x2="9.95187" y2="29.8556" gradientUnits="userSpaceOnUse">\n <stop stop-color="white" stop-opacity="0.245559"/>\n <stop offset="1" stop-opacity="0.498578"/>\n </linearGradient>\n </defs>\n</svg>',"file-zip":'<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 20 20" fill="none">\n <g clip-path="url(#clip0_922_22603)">\n <path d="M16 0H4C1.79086 0 0 1.79086 0 4V16C0 18.2091 1.79086 20 4 20H16C18.2091 20 20 18.2091 20 16V4C20 1.79086 18.2091 0 16 0Z" fill="#A1D237"/>\n <path d="M16 0H4C1.79086 0 0 1.79086 0 4V16C0 18.2091 1.79086 20 4 20H16C18.2091 20 20 18.2091 20 16V4C20 1.79086 18.2091 0 16 0Z" fill="url(#paint0_linear_922_22603)" style="mix-blend-mode:overlay"/>\n <path d="M8.32086 14V12.6807H6.32086C5.92513 12.6807 5.72193 12.6927 5.58289 12.7166C5.64706 12.6207 5.68984 12.5367 5.73262 12.4528C5.7861 12.3568 5.83957 12.2609 5.89305 12.1529L8.28877 7.22339V6H4.17112V7.31934H6.20321C6.39572 7.31934 6.59893 7.30735 6.69519 7.29535C6.58824 7.47526 6.49198 7.65517 6.41711 7.81109L4 12.8246V14H8.32086ZM10.4813 14V6H9.03743V14H10.4813ZM12.9519 14V10.8096H13.4439C14.2139 10.8096 14.5241 10.7616 14.877 10.6057C15.5936 10.2699 16 9.47826 16 8.38681C16 7.45127 15.6898 6.69565 15.1444 6.32384C14.8342 6.09595 14.3743 6 13.6364 6H11.508V14H12.9519ZM13.4118 9.6102H12.9519V7.1994H13.3797C13.7219 7.1994 13.9679 7.24738 14.107 7.34333C14.385 7.53523 14.5241 7.87106 14.5241 8.38681C14.5241 8.91454 14.4064 9.25037 14.1497 9.44228C13.9893 9.57421 13.8075 9.6102 13.4118 9.6102Z" fill="white"/>\n </g>\n <defs>\n <linearGradient id="paint0_linear_922_22603" x1="-9.95187" y1="9.95187" x2="9.95187" y2="29.8556" gradientUnits="userSpaceOnUse">\n <stop stop-color="white" stop-opacity="0.245559"/>\n <stop offset="1" stop-opacity="0.498578"/>\n </linearGradient>\n <clipPath id="clip0_922_22603">\n <rect width="20" height="20" fill="white"/>\n </clipPath>\n </defs>\n</svg>',filter:'<svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M12 11c1.306 0 2.417.834 2.829 2H17c.552 0 1 .448 1 1s-.448 1-1 1h-2.17c-.412 1.165-1.524 2-2.83 2s-2.418-.835-2.83-2H3c-.552 0-1-.448-1-1s.448-1 1-1h6.171c.412-1.166 1.523-2 2.829-2zM5 3c1.306 0 2.417.834 2.829 2H17c.552 0 1 .448 1 1s-.448 1-1 1H7.83C7.417 8.165 6.305 9 5 9 3.343 9 2 7.657 2 6s1.343-3 3-3z"></path></svg>',information:'<svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M10 8c-.552 0-1-.448-1-1s.448-1 1-1 1 .448 1 1-.448 1-1 1zm0 8c3.307 0 6-2.693 6-6 0-3.308-2.693-6-6-6-3.308 0-6 2.692-6 6 0 3.307 2.692 6 6 6zm0-14c2.122 0 4.157.843 5.657 2.343S18 7.878 18 10s-.843 4.157-2.343 5.657S12.122 18 10 18s-4.157-.843-5.657-2.343S2 12.122 2 10c0-4.418 3.582-8 8-8zm0 12c-.552 0-1-.448-1-1v-3c0-.552.448-1 1-1s1 .448 1 1v3c0 .552-.448 1-1 1z"></path></svg>',menu:'<svg width="100%" height="100%" viewBox="1 1 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M5.08154 9.02148C5.08154 8.77083 5.16211 8.55778 5.32324 8.38232C5.48438 8.20687 5.70817 8.11914 5.99463 8.11914C6.28109 8.11914 6.50667 8.20687 6.67139 8.38232C6.8361 8.55778 6.91846 8.77083 6.91846 9.02148C6.91846 9.27214 6.8361 9.47803 6.67139 9.63916C6.50667 9.80029 6.28109 9.88086 5.99463 9.88086C5.70817 9.88086 5.48438 9.80029 5.32324 9.63916C5.16211 9.47803 5.08154 9.27214 5.08154 9.02148ZM8.08154 9.02148C8.08154 8.77083 8.16211 8.55778 8.32324 8.38232C8.48438 8.20687 8.70817 8.11914 8.99463 8.11914C9.28109 8.11914 9.50667 8.20687 9.67139 8.38232C9.8361 8.55778 9.91846 8.77083 9.91846 9.02148C9.91846 9.27214 9.8361 9.47803 9.67139 9.63916C9.50667 9.80029 9.28109 9.88086 8.99463 9.88086C8.70817 9.88086 8.48438 9.80029 8.32324 9.63916C8.16211 9.47803 8.08154 9.27214 8.08154 9.02148ZM11.0815 9.02148C11.0815 8.77083 11.1621 8.55778 11.3232 8.38232C11.4844 8.20687 11.7082 8.11914 11.9946 8.11914C12.2811 8.11914 12.5067 8.20687 12.6714 8.38232C12.8361 8.55778 12.9185 8.77083 12.9185 9.02148C12.9185 9.27214 12.8361 9.47803 12.6714 9.63916C12.5067 9.80029 12.2811 9.88086 11.9946 9.88086C11.7082 9.88086 11.4844 9.80029 11.3232 9.63916C11.1621 9.47803 11.0815 9.27214 11.0815 9.02148Z"></path></svg>',minus:'<svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M16 11H4a1 1 0 1 1 0-2h12a1 1 0 1 1 0 2Z"></path></svg>',plus:'<svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M16 11h-5v5a1 1 0 1 1-2 0v-5H4a1 1 0 1 1 0-2h5V4a1 1 0 0 1 2 0v5h5a1 1 0 1 1 0 2Z"></path></svg>',search:'<svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M9 2c3.866 0 7 3.134 7 7 0 1.7-.606 3.259-1.614 4.472l2.589 2.59c.39.39.39 1.023 0 1.414-.39.39-1.024.39-1.414 0l-2.662-2.661C11.785 15.563 10.443 16 9 16c-3.866 0-7-3.134-7-7s3.134-7 7-7zm0 2C6.239 4 4 6.239 4 9s2.239 5 5 5 5-2.239 5-5-2.239-5-5-5z"></path></svg>',"status-error":'<svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M10 0C4.48 0 0 4.48 0 10s4.48 10 10 10 10-4.48 10-10S15.52 0 10 0z"></path><path fill-rule="evenodd" clip-rule="evenodd" fill="#FFF" stroke="none" d="M14 11H6c-.552 0-1-.448-1-1s.448-1 1-1h8c.552 0 1 .448 1 1s-.448 1-1 1z"></path></svg>',"status-info":'<svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M10 0C4.48 0 0 4.48 0 10s4.48 10 10 10 10-4.48 10-10S15.52 0 10 0z"></path><path fill-rule="evenodd" clip-rule="evenodd" fill="#FFF" stroke="none" d="M10 15c-.552 0-1-.448-1-1v-4c0-.552.448-1 1-1s1 .448 1 1v4c0 .552-.448 1-1 1zM10 7c-.552 0-1-.448-1-1s.448-1 1-1 1 .448 1 1-.448 1-1 1z"></path></svg>',"status-not-ok":'<svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M10 0C4.48 0 0 4.48 0 10s4.48 10 10 10 10-4.48 10-10S15.52 0 10 0z"></path><path fill-rule="evenodd" clip-rule="evenodd" fill="#FFF" stroke="none" d="M11.414 10l2.293-2.293c.391-.391.391-1.023 0-1.414-.39-.391-1.023-.391-1.414 0L10 8.586 7.707 6.293c-.39-.391-1.023-.391-1.414 0-.39.391-.39 1.023 0 1.414L8.586 10l-2.293 2.293c-.39.391-.39 1.023 0 1.414.195.195.451.293.707.293.256 0 .512-.098.707-.293L10 11.414l2.293 2.293c.195.195.451.293.707.293.256 0 .512-.098.707-.293.391-.391.391-1.023 0-1.414L11.414 10z"></path></svg>',"status-ok":'<svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M10 0C4.48 0 0 4.48 0 10s4.48 10 10 10 10-4.48 10-10S15.52 0 10 0z"></path><path fill-rule="evenodd" clip-rule="evenodd" fill="#FFF" stroke="none" d="M8.333 11.252l4.96-4.96c.39-.39 1.024-.39 1.414 0 .39.391.39 1.025 0 1.415L9.04 13.374c-.39.39-1.023.39-1.414 0L5.293 11.04c-.39-.39-.39-1.023 0-1.414.39-.39 1.024-.39 1.414 0l1.626 1.626z"></path></svg>',"status-warning":'<svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M10 0C4.48 0 0 4.48 0 10s4.48 10 10 10 10-4.48 10-10S15.52 0 10 0z"></path><path fill-rule="evenodd" clip-rule="evenodd" fill="#FFF" stroke="none" d="M10 5c-.552 0-1 .448-1 1v4c0 .552.448 1 1 1s1-.448 1-1V6c0-.552-.448-1-1-1zM10 13c-.552 0-1 .448-1 1s.448 1 1 1 1-.448 1-1-.448-1-1-1z"></path></svg>',"trash-can":'<svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M16 6v10c0 1.105-.895 2-2 2H6c-1.105 0-2-.895-2-2V6h12zM8 8c-.552 0-1 .448-1 1v6c0 .552.448 1 1 1s1-.448 1-1V9c0-.552-.448-1-1-1zm4 0c-.552 0-1 .448-1 1v6c0 .552.448 1 1 1s1-.448 1-1V9c0-.552-.448-1-1-1zm0-6l1 1h3c.552 0 1 .448 1 1s-.448 1-1 1H4c-.552 0-1-.448-1-1s.448-1 1-1h3l1-1h4z"></path></svg>'},Ee=P("Icon",{root:{display:"flex",alignItems:"center"}}),Re=({type:e,data:t,testId:o,tweakStyles:r})=>{const a=Ee({theme:r}),l=M(),s=l.icons?.[e]??ke[e];return n.isEmpty(s)?(console.error(`Иконки ${e} не существует`),null):i.jsx("div",{className:a.root,...n.addDataAttributes(t,o),dangerouslySetInnerHTML:{__html:s}})},Ie=e=>"string"==typeof e?i.jsx(Re,{type:e}):e,je=d.size({apply({rects:e,elements:t}){Object.assign(t.floating.style,{minWidth:`${e.reference.width}px`})}}),Te=P("WithPopup",{trigger:{width:"fit-content"},clickable:{cursor:"pointer"},active:{},disabled:{cursor:"auto"},popup:{zIndex:5,outline:"none"},arrow:{},animationEnd:{},animationStart:{},"dropdown-initial":{extend:"animationEnd"},"dropdown-open":{extend:"animationStart"},"dropdown-close":{visibility:"hidden",extend:"animationEnd"},"dropdown-unmounted":{extend:"animationEnd"}}),Me=({trigger:e,children:o,middlewares:r=[],eventType:l="click",placement:s=("click"===l?"bottom-end":"top"),hoverDelay:c=0,popupOffset:u=6,arrowProps:p,popupData:h,shouldStopPropagation:m="click"===l,shouldHideOnScroll:y=!1,shouldRenderInBody:f=!0,canBeFlipped:g=!0,isTriggerWrapped:C="hover"===l,isDisabled:v=!1,shouldShowArrow:x=!1,isMinWidthSameAsTrigger:b=!1,hoverOptions:w,clickOptions:S,focusOptions:N,dismissOptions:k,transitionOptions:E,tweakStyles:R,data:I,testId:j,onToggle:T})=>{const M=Te({theme:R}),[D,A]=t.useState(!1),L=D&&!v,F=t.useRef(null),O=(e,t)=>{t?.stopPropagation(),T?.(e,t),A(e)},{refs:B,floatingStyles:z,context:_}=d.useFloating({open:L,middleware:[d.offset(u),g&&d.flip({fallbackAxisSideDirection:"start"}),b&&je,...r,x&&d.arrow({element:F})],whileElementsMounted:d.autoUpdate,placement:s,onOpenChange:O}),P=d.useHover(_,{enabled:"hover"===l,delay:{open:c,close:0},handleClose:d.safePolygon(),...w}),W=d.useFocus(_,{enabled:"hover"===l,...N}),H=d.useClick(_,{enabled:"click"===l,...S}),$=d.useDismiss(_,{enabled:"click"===l,ancestorScroll:y,...k}),{getFloatingProps:V,getReferenceProps:G}=d.useInteractions([P,H,W,$]),{isMounted:U,status:K}=d.useTransitionStatus(_,{duration:{close:500},...E}),Z=G({ref:B.setReference,...m&&{onClick:n.stopPropagation}}),Y=n.applyAction(e,{referenceProps:C?void 0:Z,triggerProps:{isActive:L,isDisabled:v,...!C&&{data:I,testId:j,...Z}}});return i.jsxs(i.Fragment,{children:[C?i.jsx("div",{className:a(M.trigger,{[M.clickable]:"click"===l,[M.disabled]:v,[M.active]:L}),...Z,...n.addDataAttributes(I,j),children:Y}):Y,U&&i.jsx(d.FloatingPortal,{root:f?document.body:B.reference.current,children:i.jsx("div",{ref:B.setFloating,style:z,className:M.popup,...V(),...n.addDataAttributes(h,j,"popup"),children:i.jsxs("div",{className:M[`dropdown-${K}`],children:[x&&i.jsx(d.FloatingArrow,{...p,ref:F,context:_,className:M.arrow}),n.applyAction(o,{floatingContext:_,onClose:e=>{O(!1,e)}})]})})})]})},De=P("ListItem",{root:{display:"flex",alignItems:"center",gap:12,boxSizing:"border-box",fontSize:16,whiteSpace:"nowrap",minHeight:40,padding:[0,16],transition:R.defaultTransition,transitionProperty:"background-color",cursor:"pointer"},default:{},destructive:{},focused:{},disabledItem:{cursor:"default"},spacer:{height:1,backgroundColor:N.BORDER_LIGHT},withIconGap:{paddingLeft:48},icon:{width:20,height:20,flexShrink:0},content:{flexGrow:1},chevron:{}}),Ae=({icon:e,item:t,nestedItems:o,size:r,disabled:l,isFocused:s,shouldDrawSpacerAbove:d,shouldDrawSpacerBelow:c,testId:u,tweakStyles:p,view:h="default",withIconGap:m,data:y,onClick:f})=>{const g=De({theme:p});return i.jsxs(i.Fragment,{children:[d&&i.jsx("div",{className:g.spacer}),i.jsxs("div",{className:a(g.root,g[h],n.isNotEmpty(r)&&g[r],{[g.disabledItem]:l,[g.withIconGap]:m,[g.focused]:s}),...n.addClickHandler(f,!l),...n.addDataAttributes({...y,disabled:!!l||void 0},u),children:[n.isReactNodeNotEmpty(e)&&i.jsx("span",{className:g.icon,children:Ie(e)}),i.jsx("span",{className:g.content,children:t}),n.isArrayNotEmpty(o)&&i.jsx("span",{className:a(g.icon,g.chevron),children:i.jsx(Re,{type:"chevron-right"})})]}),c&&i.jsx("div",{className:g.spacer})]})},Le=P("List",{root:{minWidth:180,backgroundColor:N.CLASSIC_WHITE,padding:[8,0],listStyle:"none",margin:0,textAlign:"left"},nestedItems:{marginTop:-8,paddingLeft:4}}),Fe={trigger:{width:"100%"}},Oe=({items:e,size:o,testId:r,data:l,tweakStyles:s,onClick:d})=>{const c=Le({theme:s}),u=e.filter(({isHidden:e})=>!e);return i.jsx("div",{className:a(c.root,n.isNotEmpty(o)&&c[o]),...n.addDataAttributes(l,r),children:u.map((a,l)=>{const s={testId:n.getTestId(r,`item-${l}`),size:o,...a,shouldDrawSpacerAbove:a.shouldDrawSpacerAbove&&0!==l,shouldDrawSpacerBelow:a.shouldDrawSpacerBelow&&l!==e.length-1,onClick:e=>((e,{onClick:t})=>{n.isNotEmpty(t)&&(t(e),d?.(e))})(e,a)};return i.jsx(t.Fragment,{children:n.isArrayNotEmpty(a.nestedItems)?i.jsx(Me,{eventType:"hover",tweakStyles:Fe,placement:"right-start",popupOffset:0,shouldRenderInBody:!1,trigger:({triggerProps:e})=>i.jsx(Ae,{...s,isFocused:e.isActive}),children:i.jsx("div",{className:c.nestedItems,children:i.jsx(Oe,{items:a.nestedItems,size:o,onClick:d})})}):i.jsx(Ae,{...s})},l)})})},Be=P("AccountInfo",{root:{display:"flex"},account:{display:"flex",position:"relative",alignItems:"center",cursor:"pointer"},accountName:{margin:[0,2,0,10],fontSize:14,transition:R.defaultTransition,transitionProperty:"color"},accountNameOpened:{},accountChevron:{width:16,height:16,transition:R.defaultTransition,transitionProperty:"transform, color"},accountChevronOpened:{transform:"rotate(180deg)"},accountMenu:{position:"absolute",zIndex:90,top:"100%",right:0,marginTop:8},avatarIcon:{width:32,height:32},...R.slideUp}),ze=P("AddButton",{root:{display:"flex",alignItems:"center",padding:"0px 16px",height:52,cursor:"pointer",outline:"none",transition:"border-color 0.1s ease-in, background-color 0.1s ease-in",fontSize:14,"&:hover":{transition:"border-color 0.1s ease-in, background-color 0.1s ease-in"}},disabled:{cursor:"default"},icon:{width:20,display:"inline-block",marginRight:8},fullWidth:{width:"100%"}}),_e=P("DotsPreloader",{root:{display:"flex",gap:4,"--dot-size":"8px","&::before, &::after":{content:'""',extend:"fadedDot"},"&::before":{animationDelay:"0"},"&::after":{animationDelay:"360ms"}},"@keyframes FadedDots":{"0%":{opacity:.2},"30%":{opacity:1},"100%":{opacity:.2}},fadedDot:{display:"block",animationDuration:750,animationIterationCount:"infinite",animationName:"$FadedDots",borderRadius:"50%",width:"var(--dot-size)",height:"var(--dot-size)",backgroundColor:"currentColor"},dot:{extend:"fadedDot",animationDelay:"180ms"}}),Pe=({tweakStyles:e})=>{const t=_e({theme:e});return i.jsx("div",{className:t.root,children:i.jsx("span",{className:t.dot})})},We=()=>i.jsxs("svg",{width:"100%",height:"100%",viewBox:"0 0 40 40",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("defs",{children:i.jsxs("linearGradient",{x1:"8.042%",y1:"0%",x2:"65.682%",y2:"23.865%",id:"a",children:[i.jsx("stop",{stopColor:"currentColor",stopOpacity:"0",offset:"0%"}),i.jsx("stop",{stopColor:"currentColor",stopOpacity:".631",offset:"63.146%"}),i.jsx("stop",{stopColor:"currentColor",offset:"100%"})]})}),i.jsx("g",{transform:"translate(2,2)",fill:"none",children:i.jsx("path",{d:"M36 18c0-9.94-8.06-18-18-18",stroke:"url(#a)",strokeWidth:"3",children:i.jsx("animateTransform",{xmlns:"http://www.w3.org/2000/svg",attributeName:"transform",attributeType:"XML",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",begin:"0s",repeatCount:"indefinite",fill:"freeze"})})})]}),He=P("SvgPreloader",{root:{display:"flex",width:"100%",height:"100%"}}),$e=({type:e="default",tweakStyles:t})=>{const o=He({theme:t}),n=M(),r=n.preloaders?.[e]??We;return"string"==typeof r?i.jsx("div",{className:o.root,dangerouslySetInnerHTML:{__html:r}}):i.jsx(r,{})},Ve=P("ThemedPreloader",{root:{display:"flex"},dots:{},default:{},logo:{},currentColor:{color:"currentColor"}}),Ge=({type:e="default",useCurrentColor:t=!1,data:o,testId:r,tweakStyles:l})=>{const s=Ve({theme:l}),d=Ne({tweakStyles:l,className:"tweakDotsPreloader",currentComponentName:"ThemedPreloader"}),c=Ne({tweakStyles:l,className:"tweakSvgPreloader",currentComponentName:"ThemedPreloader"});return i.jsx("div",{className:a(s.root,s[e],{[s.currentColor]:t}),...n.addDataAttributes(o,r),children:"dots"===e?i.jsx(Pe,{tweakStyles:d}):i.jsx($e,{type:e,tweakStyles:c})})},Ue=P("Button",{root:{display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",outline:"none",boxSizing:"border-box",transition:R.defaultTransition,transitionProperty:"background-color, color, box-shadow, border-color",maxWidth:"100%",border:[1,"solid","transparent"],position:"relative",boxShadow:"none","&[disabled]":{cursor:"default",pointerEvents:"none"}},primary:{},secondary:{},outline:{},warning:{},destructive:{},text:{},custom:{},children:{},icon:{width:20,height:20,flexShrink:0},iconFromLeft:{flexDirection:"row",gap:6,"& $icon":{marginLeft:-4}},iconFromRight:{flexDirection:"row-reverse",gap:6,"& $icon":{marginRight:-4}},onlyIcon:{},withIcon:{},s:{padding:[0,12],height:32,fontSize:14,letterSpacing:.15,"&$onlyIcon":{padding:0,width:32},"& $icon":{width:16,height:16},"& $iconFromLeft":{gap:4},"& $iconFromRight":{gap:4}},m:{padding:[0,12],height:42,fontSize:16,"& $iconFromLeft":{gap:6},"& $iconFromRight":{gap:6},"&$onlyIcon":{padding:0,width:42}},l:{padding:[0,16],height:48,fontSize:16,"& $iconFromLeft":{gap:6},"& $iconFromRight":{gap:6},"&$onlyIcon":{padding:0,width:48}},xl:{padding:[0,20],height:56,fontSize:16,"&$onlyIcon":{padding:0,width:56},"& $iconFromLeft":{gap:8},"& $iconFromRight":{gap:8}},fullWidth:{minWidth:"auto",width:"100%"},inline:{borderTopLeftRadius:0,borderBottomLeftRadius:0},active:{},content:{display:"flex",alignItems:"center",height:"100%"},loader:{display:"none",position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)"},loading:{"& $content":{visibility:"hidden"},"& $loader":{display:"block"}},disabled:{}}),Ke={tweakDotsPreloader:{fadedDot:{width:6,height:6}}},Ze=e=>"s"===e||"m"===e?Ke:void 0,Ye=t.forwardRef(function({type:e="button",children:t,size:o="l",view:r="primary",isFullWidth:l=!1,isInline:s=!1,isDisabled:d=!1,isActive:c=!1,isLoading:u=!1,shouldSkipTabNavigation:p=!1,data:h,testId:m,tweakStyles:y,icon:f,iconPosition:g="left",preloaderType:C="dots",...v},x){const b=Ue({theme:y}),w=Ne({innerStyles:Ze(o),tweakStyles:y,className:"tweakPreloader",currentComponentName:"Button"}),S=n.isReactNodeNotEmpty(f),N=n.isReactNodeNotEmpty(t),k=d||u;return i.jsxs("button",{ref:x,type:e,className:a(b.root,b[o],b[r],{[b.disabled]:d,[b.fullWidth]:l,[b.inline]:s,[b.active]:c,[b.loading]:u,[b.onlyIcon]:S&&!N}),tabIndex:p?-1:void 0,disabled:k,...v,...n.addDataAttributes(h,m),children:[i.jsxs("span",{className:a(b.content,{[b.iconFromRight]:N&&S&&"right"===g,[b.iconFromLeft]:N&&S&&"left"===g}),children:[S&&i.jsx("span",{className:b.icon,children:n.isReactNodeNotEmpty(f)&&Ie(f)}),N&&i.jsx("span",{className:a(b.children,S&&b.withIcon),children:t})]}),u&&i.jsx("span",{className:b.loader,children:i.jsx(Ge,{type:C,useCurrentColor:!0,tweakStyles:w})})]})}),qe=P("Checkbox",{root:{position:"relative",cursor:"pointer",display:"flex",alignItems:"center",gap:14,width:"fit-content"},checked:{},invalid:{},disabled:{cursor:"default",pointerEvents:"none"},input:{width:1,height:1,position:"absolute",opacity:0},children:{display:"flex",alignItems:"center"},check:{width:18,height:18,borderRadius:2,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box"},labelPositionLeft:{flexDirection:"row-reverse"}});function Xe({value:e,children:t,size:o,isChecked:r=!1,isSemiChecked:l=!1,isInvalid:s=!1,isDisabled:d=!1,isReadonly:c=!1,labelPosition:u="right",data:p,testId:h,tweakStyles:m,onSelect:y}){const f=qe({theme:m}),g=!d&&!c,C=r||l,v=t=>y?.({value:e,isSelected:!C},t);return i.jsxs("label",{className:a(f.root,n.isNotEmpty(o)&&f[o],{[f.checked]:C,[f.invalid]:s,[f.disabled]:d,[f.labelPositionLeft]:"left"===u}),...n.addDataAttributes(p,h),children:[i.jsx("input",{className:f.input,type:"checkbox",checked:C,disabled:d,readOnly:c,...g&&{onChange:v,onKeyDown:n.getSelectKeyHandler(v)}}),i.jsx("div",{className:f.check,children:C&&i.jsx(Re,{type:l?"minus":"check"})}),n.isReactNodeNotEmpty(t)&&i.jsx("div",{className:f.children,children:t})]})}const Je=P("CloseButton",{root:{width:40,height:40,maxWidth:"100%",maxHeight:"100%",padding:5,color:N.FONT_MEDIUM,border:0,borderRadius:"50%",appearance:"none",backgroundColor:"transparent",cursor:"pointer",transition:R.defaultTransition,transitionProperty:"background-color","&:hover":{backgroundColor:s(N.BORDER_MAIN,.5)},"&:focus":{backgroundColor:N.GREY_FOCUS},"&:active":{backgroundColor:s(N.FONT_DISABLED,.5)}}}),Qe=P("CssBaseline",{"@global html, body":{fontFamily:"Arial, sans-serif",color:N.FONT_MAIN,padding:0,margin:0},"@global":{},root:{}}),et=P("WithMessages",{withMessages:{display:"flex",flexDirection:"column",width:"100%",position:"relative"},error:{color:"red"},info:{color:"gray"},horizontal:{display:"flex","& > *":{flexGrow:1,"&:not(:first-child)":{marginLeft:-1}}},vertical:{display:"flex",flexDirection:"column","& > *:not(:first-child)":{marginTop:-1}},message:{fontSize:12},children:{}}),tt=t.forwardRef(function({children:e,infoMessage:t,errorMessage:o,controlsDirection:r,tweakStyles:l,testId:s,data:d},c){const u=et({theme:l}),p=n.isReactNodeNotEmpty(o),h=n.isReactNodeNotEmpty(t)&&!p;return i.jsxs("div",{ref:c,className:u.withMessages,"data-invalid":!!p||void 0,...n.addDataAttributes(d,s),children:[n.isReactNodeNotEmpty(e)&&i.jsx("div",{className:a(u.children,{[u.horizontal]:"horizontal"===r,[u.vertical]:"vertical"===r}),children:e}),(p||h)&&i.jsxs("div",{className:u.message,children:[p&&i.jsx("div",{className:u.error,...n.addDataTestId(s,"error"),children:o}),h&&i.jsx("div",{className:u.info,...n.addDataTestId(s,"info"),children:t})]})]})}),ot=e=>n.isObject(e)&&"iconComponent"in e,nt=e=>ot(e)?e:{iconComponent:e},{CONTROL:it,Z_INDEX:rt}=k,at=P("ControlWrapper",{controlWrapper:{"--control-height":it.HEIGHT-2+"px","--control-padding":`${it.PADDING}px`,"--icon-size":`${it.ICON_SIZE}px`,"--icon-inner-size":`${it.ICON_INNER_SIZE}px`,"--icon-gap":`${it.ICON_GAP}px`,display:"flex",width:"100%",backgroundColor:"white",position:"relative",border:["solid",1,"gray"],borderRadius:8,boxSizing:"border-box",zIndex:0},disabled:{},focused:{position:"relative",zIndex:rt.CONTROL_FOCUS},invalid:{zIndex:rt.CONTROL_INVALID},withValue:{},loading:{},minContent:{width:"min-content"},label:{position:"absolute",pointerEvents:"none",left:"var(--control-padding)",top:"calc(var(--control-height) / 2)",transformOrigin:"top left",transform:"translateY(-50%)",transition:R.defaultTransition,transitionProperty:"transform, color",fontSize:16,zIndex:1},activeLabel:{},requiredLabel:{"&:after":{content:'""',display:"block",position:"absolute",top:0,right:-8,width:6,height:6,borderRadius:"50%",backgroundColor:"orange"}},disabledLabel:{},wrapper:{display:"flex",flexGrow:1,minWidth:0,textAlign:"left"},controls:{display:"flex",marginLeft:"auto",flexShrink:0},startControls:{paddingLeft:"var(--control-padding)"},icon:{display:"flex",alignItems:"center",justifyContent:"center",minWidth:"var(--icon-size)",width:"var(--icon-size)",height:"100%",flexShrink:0,cursor:"default","&:last-child":{paddingRight:6}},iconInner:{width:"var(--icon-inner-size)"},customIcon:{width:"unset","& $iconInner":{width:"unset"}},startIcon:{},endIcon:{},activeIcon:{cursor:"pointer",outline:"none"},clearIcon:{"& $iconInner":{width:"var(--icon-inner-size)"}},loader:{"& $iconInner":{width:"var(--icon-inner-size)"}},withStartControls:{},"placement-top":{borderBottomLeftRadius:0,borderBottomRightRadius:0},"placement-bottom":{borderTopLeftRadius:0,borderTopRightRadius:0},"placement-top-left":{borderTopRightRadius:0,borderBottomLeftRadius:0,borderBottomRightRadius:0},"placement-top-right":{borderTopLeftRadius:0,borderBottomLeftRadius:0,borderBottomRightRadius:0},"placement-bottom-left":{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomRightRadius:0},"placement-bottom-right":{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:0},"placement-left":{borderTopRightRadius:0,borderBottomRightRadius:0},"placement-right":{borderTopLeftRadius:0,borderBottomLeftRadius:0},"placement-middle":{borderRadius:0}}),lt=({label:e,icon:o,startIcon:r,endIcon:l=o,groupPlacement:s,isInvalid:d,isFocused:c,isRequired:u,isLoading:p,isFullWidth:h,isActive:m,isDisabled:y,hasValue:f,size:g,testId:C,children:v,tweakStyles:x,data:b,onClear:w})=>{const S=at({theme:x}),[N,k]=t.useState(),E=n.getArray(r).map(nt),R=n.getArray(l).map(nt),I=n.isArrayNotEmpty(E),j=!p&&n.isArrayNotEmpty(R),T=!y&&!p&&f&&n.isNotEmpty(w),M=j||T||p,D=Ne({tweakStyles:x,className:"tweakPreloader",currentComponentName:"ControlWrapper"}),A=t.useCallback(e=>{k(e?.clientWidth)},[r,g]),L=({key:e,iconComponent:t,onClick:o,shouldResetSize:r=!1},l,s)=>i.jsx("div",{className:a(S.icon,S[`${l}Icon`],{[S.activeIcon]:!y&&n.isNotEmpty(o),[S.customIcon]:r}),...n.addClickHandler(o,!y),...n.addDataTestId(C,`${l}-icon`),children:i.jsx("div",{className:S.iconInner,children:Ie(t)})},e??s);return i.jsxs("div",{className:a(S.controlWrapper,n.isNotEmpty(s)&&S[`placement-${s}`],n.isNotEmpty(g)&&S[g],{[S.invalid]:d,[S.focused]:c,[S.withValue]:f,[S.disabled]:y,[S.loading]:p,[S.minContent]:!h,[S.withStartControls]:I}),style:I?{"--start-controls-width":`${N}px`}:void 0,...n.addDataAttributes(b,C),children:[n.isReactNodeNotEmpty(e)&&i.jsx("div",{className:a(S.label,{[S.requiredLabel]:u,[S.disabledLabel]:y,[S.activeLabel]:c||f||m}),children:e}),i.jsxs("div",{className:S.wrapper,children:[I&&i.jsx("div",{className:a(S.controls,S.startControls),ref:A,children:E.map((e,t)=>L(e,"start",t))}),v,M&&i.jsxs("div",{className:S.controls,children:[T&&L({iconComponent:"close",onClick:w},"clear"),j&&R.map((e,t)=>L(e,"end",t)),p&&i.jsx("div",{className:a(S.icon,S.loader),...n.addDataTestId(C,"loading"),children:i.jsx("div",{className:S.iconInner,children:i.jsx(Ge,{tweakStyles:D})})})]})]})]})},st=P("Input",{inputContent:{height:"var(--control-height)",padding:[0,"var(--control-padding)"],fontSize:16,fontFamily:"inherit"},input:{extend:"inputContent",width:"100%",outline:"none",outlineStyle:"none",boxSizing:"border-box",border:"none",background:"none",color:"black","&[readonly]":{cursor:"default"},"&::placeholder":{opacity:1},"&::-webkit-date-and-time-value":{textAlign:"left"},MozAppearance:"textfield","&::-webkit-inner-spin-button,&::-webkit-outer-spin-button,&::-webkit-calendar-picker-indicator":{display:"none",WebkitAppearance:"none",margin:0}},defaultWrapper:{display:"flex",flexGrow:1},autoSizeWrapper:{position:"relative",minWidth:0,zIndex:0},autoSized:{position:"absolute",top:0,left:0,height:"100%"},withUnits:{extend:"autoSized",paddingRight:"calc(8px + var(--units-width) - 1px)","& + $fakeValue":{paddingRight:8}},withLabel:{},withValue:{},fakeValue:{extend:"inputContent",visibility:"hidden",maxWidth:"100%",overflow:"hidden",minWidth:8,whiteSpace:"nowrap"},units:{alignSelf:"center",paddingRight:"var(--control-padding)"},focusedInput:{},disabledInput:{},invalidInput:{}}),dt=t.forwardRef(function({value:e="",placeholder:o,label:r,type:l="text",isDisabled:s,autoComplete:d,inputMode:u,isReadonly:p,isInvalid:h,isActive:m,isClearable:y,isAutoSized:f,name:g,tweakStyles:C,maxLength:v,shouldFocusOnMount:x,units:b,testId:w,tabIndex:S,shouldAlwaysShowPlaceholder:N,onChange:k,onPaste:E,onFocus:R,onBlur:I,onKeyDown:j,mask:T,maskPlaceholder:M,alwaysShowMask:D,beforeMaskedStateChange:A,data:L,groupPlacement:F,startIcon:O,icon:B,endIcon:z=B,isLoading:_,isRequired:P,size:W,children:H,...$},V){const G=st({theme:C}),U=Ne({tweakStyles:C,className:"tweakControlWrapper",currentComponentName:"Input"}),[K,Z]=t.useState(!1),[Y,q]=t.useState(),X=t.useRef(null),J=ve([V,X]),Q=u??(["email","tel","url"].includes(l)?l:void 0),ee=K||m,te=n.isArrayLikeNotEmpty(e),oe=n.isReactNodeNotEmpty(b),ne=(!n.isReactNodeNotEmpty(r)||ee||N)&&n.isStringNotEmpty(o),ie=t.useCallback(e=>{q(e?.clientWidth)},[b]),re={className:a(G.input,{[G.withUnits]:oe,[G.withValue]:te,[G.withLabel]:n.isReactNodeNotEmpty(r),[G.autoSized]:f,[G.focusedInput]:K,[G.disabledInput]:s,[G.invalidInput]:h}),style:oe&&te?{"--units-width":`${Y}px`}:void 0,value:e,type:l,autoComplete:d,inputMode:Q,disabled:s,placeholder:ne?o:void 0,name:g,maxLength:v,readOnly:p,tabIndex:S,onKeyDown:j,onPaste:E,onFocus:e=>{Z(!0),R?.(e)},onBlur:e=>{Z(!1),I?.(e)},onChange:e=>{k(e.currentTarget.value,e,"change")},...n.addDataTestId(w),...$};return t.useEffect(()=>{x&&X.current?.focus()},[x]),i.jsxs(lt,{label:r,isDisabled:s,isFocused:ee,isActive:ne,isInvalid:h,hasValue:te,isFullWidth:!f,tweakStyles:U,onClear:y&&te?async e=>{await k("",e,"clear"),X.current?.focus()}:void 0,data:L,groupPlacement:F,startIcon:O,endIcon:z,isLoading:_,isRequired:P,size:W,children:[i.jsxs("div",{className:a(G.defaultWrapper,{[G.autoSizeWrapper]:oe||f}),children:[n.isNotEmpty(T)?i.jsx(c,{ref:J,mask:T,maskPlaceholder:M,alwaysShowMask:D,beforeMaskedStateChange:A,...re}):i.jsx("input",{ref:J,...re}),(oe||f)&&i.jsx("div",{className:G.fakeValue,children:e}),oe&&te&&i.jsx("div",{className:G.units,ref:ie,children:b})]}),H]})}),ct=t.forwardRef(function({infoMessage:e,errorMessage:t,isInvalid:o,testId:r,tweakStyles:a,...l},s){const d=Ne({tweakStyles:a,className:"tweakWithMessages",currentComponentName:"Input"});return i.jsx(tt,{errorMessage:t,infoMessage:e,testId:n.getTestId(r,"wrapper"),tweakStyles:d,children:i.jsx(dt,{...l,ref:s,testId:r,tweakStyles:a,isInvalid:o})})}),ut="__.__.____",pt=`${ut} - ${ut}`,ht=P("DateInput",{root:{width:"100%",height:"100%",cursor:"pointer",position:"relative"}}),mt=t.forwardRef(function({date:e,startDate:t="",endDate:o="",mask:r,className:l,placeholder:s,data:d,isRange:c=!1,tweakStyles:u,onClick:p,onChange:h,...m},y){const f=ht({theme:u}),g=Ne({tweakStyles:u,className:"tweakInput",currentComponentName:"DateInput"});return i.jsx("div",{className:a(f.root,l),...n.addDataAttributes(d),onClick:p,children:i.jsx(ct,{...m,ref:y,value:c?`${t}${o}`:e,mask:r??(c?"99.99.9999 - 99.99.9999":"99.99.9999"),placeholder:s??(c?pt:ut),tweakStyles:g,onChange:(e,t)=>{"click"===t.type&&(t.target.value=""),h?.(t,e)},beforeMaskedStateChange:({nextState:e})=>e.value===ut||e.value===pt?{value:"",selection:{start:0,end:0}}:e})})});class yt extends h{handleClickOutside;constructor(e){super(e),this.handleClickOutside=this.handleCalendarClickOutside,this.handleCalendarClickOutside=n.doNothing}}const ft={tweakControlWrapper:{startControls:{position:"absolute",left:0,top:0,height:"100%",pointerEvents:"none"},controlWrapper:{borderColor:"transparent"}},inputContent:{paddingLeft:"calc(var(--start-controls-width) + var(--control-padding))"}},gt=t.forwardRef(function({isClearable:e=!0,tweakStyles:t,...o},n){const r=Ne({innerStyles:ft,tweakStyles:t,className:"tweakInput",currentComponentName:"SearchInput"});return i.jsx(ct,{ref:n,startIcon:"search",isClearable:e,tweakStyles:r,...o})}),Ct={active:!0,elementType:"div",options:{behavior:"smooth",scrollMode:"if-needed"}};class vt extends t.PureComponent{static defaultProps=Ct;node=t.createRef();componentDidMount(){const{active:e}=this.props;e&&this.handleScrollIntoViewIfNeeded()}componentDidUpdate({active:e}){const{active:t}=this.props;!e&&t&&this.handleScrollIntoViewIfNeeded()}handleScrollIntoViewIfNeeded=()=>{const{options:e}=this.props,{current:t}=this.node;t&&f(t,e)};render(){const{active:e,elementType:o,children:n,options:i,...r}=this.props;return t.createElement(o??"div",{ref:this.node,...r},n)}}const xt=-2,bt=-1,wt=[10,20],St=P("SelectList",{root:{borderRadius:k.BORDER_RADIUS_SMALL,boxShadow:"0 13px 74px -27px rgba(0, 0, 0, 0.11)",boxSizing:"border-box",padding:[10,0],fontSize:16,overflow:"hidden"},withListHeader:{paddingTop:0},withListFooter:{paddingBottom:0},listHeader:{},listFooter:{},list:{height:"100%",maxHeight:240,cursor:"pointer",backgroundColor:N.CLASSIC_WHITE,...E.withScrollBar},cell:{display:"flex",cursor:"pointer",minHeight:40,width:"auto",padding:wt,alignItems:"center",boxSizing:"border-box",fontSize:14},cellWithCheckbox:{padding:0},noMatchesLabel:{pointerEvents:"none"},focused:{},active:{},disabled:{cursor:"default"},loading:{cursor:"default",pointerEvents:"none"},defaultCell:{}}),Nt={root:{padding:wt,width:"100%"},input:{display:"none"}},kt=({classes:e,index:t,isSemiChecked:o,isDisabled:r,isActive:l,children:s,isFocused:d,isMultiSelect:c,data:u,onOptionSelect:p,onToggleCheckbox:h})=>{const m=c&&i.jsx(Xe,{isChecked:l||o,isSemiChecked:o,isDisabled:r,tweakStyles:Nt,onSelect:({isSelected:e},o)=>h(t,e,o),children:s});return i.jsx(vt,{active:d,options:{block:"nearest"},className:a(e.cell,{[e.cellWithCheckbox]:c,[e.focused]:d,[e.active]:l&&!c,[e.disabled]:r}),...n.addDataAttributes({disabled:r,active:l,focused:d,...u}),onClick:r||c?void 0:e=>p(t,e),children:c?m:s})};function Et({options:e,focusedIndex:o,size:r,activeValue:l,defaultOptionLabel:s,noMatchesLabel:d="Совпадений не найдено",isLoading:c,loadingLabel:u="Загрузка...",tweakStyles:p,testId:h,shouldScrollToList:m=!0,areAllOptionsSelected:y,customListHeader:f,customListFooter:g,isMultiSelect:C,isOptionDisabled:v,allOptionsLabel:x,onOptionSelect:b,onToggleCheckbox:w,convertValueToString:S,convertValueToReactNode:N=S,convertValueToId:k}){const E=St({theme:p}),R=n.isReactNodeNotEmpty(f),I=n.isReactNodeNotEmpty(g),j=t.useMemo(()=>e.map(v),[e,v]),T=t.useMemo(()=>e.map((e,t)=>N(e,j[t])),[e,N,j]),M=t.useMemo(()=>new Set(n.getArray(l).map(k)),[l,k]);return i.jsxs(vt,{active:m&&!C,className:a(E.root,n.isNotEmpty(r)&&E[r],{[E.withListHeader]:R,[E.withListFooter]:I}),children:[R&&i.jsx("div",{className:E.listHeader,children:f}),i.jsx("div",{className:E.list,...n.addDataTestId(h),tabIndex:-1,children:c?i.jsx("div",{className:a(E.cell,E.loading),children:u}):i.jsxs(i.Fragment,{children:[n.isReactNodeNotEmpty(s)&&i.jsx(vt,{active:o===xt,options:{block:"nearest"},className:a(E.cell,E.defaultCell,o===xt&&E.focused),onClick:e=>b(xt,e),children:s}),n.isReactNodeNotEmpty(x)&&i.jsx(kt,{classes:E,index:bt,isSemiChecked:M.size>0&&!y,isActive:y,isFocused:o===bt,isMultiSelect:C,onOptionSelect:b,onToggleCheckbox:w,children:x}),T.map((t,n)=>{const r=e[n],a=k(r),l=o===n,s=M.has(a),d=j[n];return i.jsx(kt,{classes:E,index:n,isDisabled:d,isActive:s,isFocused:l,isMultiSelect:C,onOptionSelect:b,onToggleCheckbox:w,data:{id:a},children:t},n)}),0===T.length&&i.jsx("div",{className:a(E.cell,E.noMatchesLabel),children:d})]})}),I&&i.jsx("div",{className:E.listFooter,children:g})]})}const Rt=e=>"object"==typeof e&&null!==e&&(e?.isDisabled??!1),It=e=>void 0===e?void 0:String(e),jt=(e,t)=>e===t,{Z_INDEX:Tt}=k,Mt=P("Select",{root:{width:"100%",position:"relative",boxSizing:"border-box"},inputWrapper:{width:"100%",cursor:"text"},listWrapper:{left:-1,zIndex:3,width:"fit-content",minWidth:"calc(100% + 1px)"},withoutPopper:{position:"absolute",top:"100%",paddingTop:4},listWrapperInBody:{minWidth:"auto",width:"auto",maxWidth:"min-content"},arrow:{width:"var(--icon-inner-size, 20px)",height:"var(--icon-inner-size, 20px)",cursor:"pointer",transition:R.defaultTransition,transitionProperty:"transform",zIndex:Tt.CONTROL_FOCUS+1},activeArrow:{transform:"rotate(180deg)"},disabled:{"& $arrow":{cursor:"default"}},counter:{}}),Dt={input:{"&[readonly]":{cursor:"pointer"}}},At={input:{cursor:"pointer"}},Lt=n.mergeStyles(Dt,At),Ft=n.mergeStyles(Dt,At),Ot=({hasReadonlyInput:e,isMultiSelect:t})=>e&&t?Ft:e&&!t?Lt:Dt;function Bt(e){const{options:o,isMultiSelect:r,value:l,header:s,footer:d,defaultOptionLabel:c,allOptionsLabel:u,debounceTime:p=400,optionsMode:h="normal",noMatchesLabel:f,loadingLabel:g,tweakStyles:C,testId:v,isActive:x,isReadonly:b,isDisabled:w,dropdownOptions:S,minSymbolsCountToOpenList:N=0,dropdownIcon:k="chevron-down",shouldScrollToList:E=!0,searchInput:R,icon:I,endIcon:j=I,onChange:T,onFocus:M,onBlur:D,onType:A,onOpen:L,isOptionDisabled:F=Rt,compareValuesOnChange:O=jt,convertValueToString:B=It,convertValueToId:z,convertValueToReactNode:_,optionsFilter:P,infoMessage:W,errorMessage:H,size:$,...V}=e,G=Mt({theme:C}),{shouldRenderInList:U=!1,...K}=R??{},Z="normal"!==h&&U,Y=b||"normal"===h||U,q=Ne({tweakStyles:C,className:"tweakWithMessages",currentComponentName:"Select"}),X=Ne({innerStyles:Ot({hasReadonlyInput:Y,isMultiSelect:r}),tweakStyles:C,className:"tweakInput",currentComponentName:"Select"}),J=Ne({tweakStyles:C,className:"tweakSearchInput",currentComponentName:"Select"}),Q=Ne({tweakStyles:C,className:"tweakSelectList",currentComponentName:"Select"}),ee=Ce(),[te,oe]=t.useState(!1),[ie,re]=t.useState(!1),ae=n.isReactNodeNotEmpty(c),[le,se]=t.useState(xt),[de,ce]=t.useState(""),[ue,pe]=t.useState(!0),he=t.useRef(null),me=t.useRef(null),fe=t.useRef(null),ge=t.useRef(null),ve=r?l?.[0]:l,xe=r&&n.isStringNotEmpty(u)&&""===de,be=t.useMemo(()=>{if("search"!==h)return o;return(P??n.createFilter(e=>[B(e)??""]))(o,de)},[P,o,B,de,h]),Se=t.useMemo(()=>o.filter(e=>!F(e)),[o,F]),ke=r&&l?.length===Se.length,Ee=r&&n.isNotEmpty(l)&&l.length>1&&!ke,Re=t.useMemo(()=>{const e=[];return ue&&ae&&e.push(xt),xe&&e.push(bt),e.concat(be.reduce((e,t,o)=>(F(t)||e.push(o),e),[]))},[be,ae,F,xe,ue]),je=n.isNotEmpty(ve)?B(ve):void 0,Te=ke&&n.isNotEmpty(u)?u:je,Me=t.useCallback(e=>(z??(e=>t=>n.isNotEmpty(t?.id)?String(t.id):e(t))(B))(e),[z,B]),De=t.useCallback(()=>{oe(!1),ce(""),pe(!0)},[S?.shouldUsePopper]),Ae=t.useCallback(e=>{te&&(De(),D?.(e))},[te,De,D]),Le=()=>{b||te||oe(!0)},Fe=t.useCallback((e,t)=>{O(l,e)||T(e,t)},[l,O,T]),Oe=t.useCallback((e,t)=>{Fe(e===xt?void 0:be[e],t),Ae(t),ge.current?.blur()},[Fe,Ae,be]),Be=t.useCallback((e,t,o)=>{if(!r)return;if(e===xt||e===bt&&!t)return void Fe(void 0,o);if(e===bt&&t)return void Fe(Se,o);const n=be[e];Fe(t?[...l??[],n]:l?.filter(e=>Me(e)!==Me(n)),o)},[r,be,Fe,l,Se,Me]),ze=t.useCallback(async e=>{void 0!==A&&(ee()&&re(!0),await A(e),ee()&&re(!1),"dynamic"===h&&pe(""===e))},[ee,A,h]),_e=t.useMemo(()=>y.debounce(ze,p,{isImmediate:0===p}),[ze,p]),Pe=(e,t)=>{void 0!==A&&_e(e),"dynamic"!==h&&pe(""===e),""!==e||Z||Fe(void 0,t),ce(e)};we(fe,Ae,me);const We=de.trim().length>=N,He=te&&(be.length>0||void 0!==c&&!We||V.isLoading||void 0!==f||Z)&&("normal"===h||We),$e=e=>{if(te&&!He)return void Ae(e);if(!n.isNotEmpty(e.relatedTarget)||!n.isNotEmpty(fe.current)||!n.isNotEmpty(me.current))return;ne(e.relatedTarget,fe.current)||ne(e.relatedTarget,me.current)||Ae(e)},{shouldUsePopper:Ve=!1,shouldRenderInBody:Ge=!1,shouldHideOnScroll:Ue=!1}=S??{},Ke=ye({isOpen:He,onDropdownClose:Ae,referenceElement:me.current,dropdownElement:fe.current,options:S,dependenciesForPositionUpdating:[V.isLoading,be.length]});t.useEffect(()=>{const e=n.isNotEmpty(ve)?Re.find(e=>{const t=be[e];return n.isNotEmpty(t)&&Me(t)===Me(ve)}):void 0;se(e??Re[0])},[ve,be,Re,Me]),t.useEffect(()=>{He&&L?.()},[He]);const Ze=Z&&i.jsx(gt,{size:$,value:de,onChange:Pe,tweakStyles:J,placeholder:"Поиск",...K}),Ye=(n.isReactNodeNotEmpty(Ze)||n.isReactNodeNotEmpty(s))&&i.jsxs(i.Fragment,{children:[Ze,s]}),qe=i.jsx("div",{className:a(G.listWrapper,{[G.withoutPopper]:!Ve,[G.listWrapperInBody]:Ge}),ref:fe,style:Ke?.styles.popper,tabIndex:0,onBlur:$e,...Ke?.attributes.popper,children:He&&i.jsx(Et,{options:be,size:$,defaultOptionLabel:ae&&ue&&c,allOptionsLabel:xe&&u,areAllOptionsSelected:ke,customListHeader:Ye,customListFooter:n.applyAction(d,{filteredOptions:be}),noMatchesLabel:f,focusedIndex:le,activeValue:l,isLoading:V.isLoading,loadingLabel:g,tweakStyles:Q,testId:n.getTestId(v,"list"),isMultiSelect:r,shouldScrollToList:E&&!Ve&&!Ue,isOptionDisabled:F,convertValueToString:B,convertValueToReactNode:_,convertValueToId:Me,onOptionSelect:Oe,onToggleCheckbox:Be})});return i.jsx(tt,{errorMessage:H,infoMessage:W,tweakStyles:q,testId:n.getTestId(v,"wrapper"),children:i.jsxs("div",{className:G.root,onKeyDown:e=>{if(!te)return;e.stopPropagation();const t=Re.findIndex(e=>e===le);switch(e.code){case"Enter":case"NumpadEnter":{let t=le;if(t===xt&&1===be.length&&(t=0),r){let o;if(t===bt)o=ke;else{const e=be[t],n=Me(e);o=l?.some(e=>Me(e)===n)??!1}Be(t,!o,e)}else Oe(t,e);break}case"ArrowDown":{e.preventDefault();const o=(t+1)%Re.length;se(Re[o]);break}case"ArrowUp":{e.preventDefault();const o=(t-1+Re.length)%Re.length;se(Re[o]);break}}},ref:he,children:[i.jsx("div",{className:a(G.inputWrapper,w&&G.disabled),onClick:w||b?void 0:()=>{Le()},ref:me,children:i.jsx(dt,{value:""===de||U?Te:de,size:$,onChange:Pe,isActive:te||x,isReadonly:Y,onFocus:e=>{M?.(e),Le()},onBlur:$e,isDisabled:w,ref:ge,isLoading:ie,tweakStyles:X,testId:v,icon:[r&&Ee?{key:"counter",iconComponent:i.jsxs("div",{className:G.counter,children:["(+",l.length-1,")"]},"counter"),shouldResetSize:!0}:void 0,...n.getArray(j),i.jsx("div",{className:a(G.arrow,He&&G.activeArrow),onClick:()=>{te?(ge.current?.blur(),De()):ge.current?.focus()},children:Ie(k)},"arrow")].filter(n.isNotEmpty),...V})}),Ve?i.jsx(m.Portal,{container:Ge?document.body:me.current,children:i.jsx(i.Fragment,{children:qe})}):i.jsx(i.Fragment,{children:He&&qe})]})})}const zt=P("DatePickerHeader",{btn:{width:36,height:36,padding:8,boxSizing:"border-box",border:"none",outline:"none",cursor:"pointer",marginLeft:8},header:{margin:6,display:"flex",alignItems:"center"},buttons:{flexShrink:0,marginLeft:"auto"}}),_t={tweakSelectList:{cell:{fontSize:14,minHeight:35}},tweakInput:{tweakControlWrapper:{controlWrapper:{"--control-height":"35px",border:"none"}},inputContent:{fontSize:16,fontWeight:"bold"}}},Pt=({date:e,months:o=[],tweakStyles:n,prevMonthButtonDisabled:r,nextMonthButtonDisabled:a,changeYear:l,changeMonth:s,decreaseMonth:d,increaseMonth:c})=>{const u=zt({theme:n}),h=Ne({innerStyles:_t,tweakStyles:n,className:"tweakSelect",currentComponentName:"DatePickerHeader"}),m=t.useMemo(()=>Array.from(Array(41)).map((e,t)=>p.getYear(new Date)-30+t),[]);return i.jsxs("div",{className:u.header,children:[i.jsx(Bt,{value:o[p.getMonth(e)],options:o,dropdownIcon:"chevron-down-small",isAutoSized:!0,tweakStyles:h,onChange:e=>s(o.indexOf(e))}),i.jsx(Bt,{value:p.getYear(e),options:m,dropdownIcon:"chevron-down-small",isAutoSized:!0,tweakStyles:h,onChange:e=>l(e)}),i.jsxs("div",{className:u.buttons,children:[i.jsx("button",{type:"button",className:u.btn,disabled:r,onClick:d,children:i.jsx(Re,{type:"chevron-left"})}),i.jsx("button",{type:"button",className:u.btn,disabled:a,onClick:c,children:i.jsx(Re,{type:"chevron-right"})})]})]})},Wt=e=>i.jsx(d.FloatingPortal,{root:document.body,...e}),Ht={ru:g.ru,en:g.enUS},$t=e=>t=>n.isNotEmpty(t)?p.format(t,e):"",Vt=e=>t=>{const o=t===ut?"":t;return n.isStringNotEmpty(o)?p.parse(t,e,new Date):null},Gt=(e,t)=>n.isEmpty(e)&&n.isEmpty(t)||n.isNotEmpty(e)&&n.isNotEmpty(t)&&p.isSameDay(e,t),Ut=P("DatePicker",{root:{width:"100%",height:"100%"},day:{},dayInner:{},datepicker:{},popper:{zIndex:10,'&[data-placement^="bottom"]':{paddingTop:6},'&[data-placement^="top"]':{paddingBottom:6},'&[data-placement^="left"]':{paddingRight:6},'&[data-placement^="right"]':{paddingLeft:6}}}),Kt=t.forwardRef(function({data:e,selectedDate:o=null,minDate:r,maxDate:l,endDate:s=null,startDate:c=null,locale:u,months:h,calendarStartDay:m=1,dateFormat:y="dd.MM.yyyy",monthsShown:f,placeholder:g,isRange:C=!1,isInline:v=!1,isDisabled:x,isClearable:b,strictParsing:w,fixedHeight:S,focusSelectedMonth:N,disabledKeyboardNavigation:k,shouldRenderPopperInBody:E=!1,allowSameDay:R=!1,shouldCloseOnSelect:I,showPreviousMonths:j,preventOpenOnFocus:T,popperModifiers:M=[],popperPlacement:D="bottom-start",todayButton:A,highlightDates:L,calendarContainer:F,dayClassName:O,customInput:B=mt,customInputRef:z,renderCustomHeader:_,filterDate:P,onYearChange:W,onMonthChange:H,onCalendarOpen:$,onCalendarClose:V,onChangeDate:G,onChangeRange:U,onBlur:K,onFocus:Z,onKeyDown:Y,tweakStyles:q,...X},J){const Q=Ut({theme:q}),ee=Ne({tweakStyles:q,className:"tweakDateInput",currentComponentName:"DatePicker"}),{formatDate:te,parseDateValue:oe}=t.useMemo(()=>({formatDate:$t(y),parseDateValue:Vt(y)}),[y]),ne=t.useRef(),ie=ve([J,ne]),[re,ae]=t.useState(!1),[le,se]=t.useState(te(o)),[de,ce]=t.useState(c),[ue,pe]=t.useState(te(c)),[he,me]=t.useState(s),[ye,fe]=t.useState(te(s)),ge=C?n.isStringNotEmpty(ue)||n.isStringNotEmpty(ye):n.isStringNotEmpty(le),Ce={...X,isRange:C,isDisabled:x,isClearable:b,isActive:re,icon:b&&ge?void 0:"calendar",tweakStyles:ee,...C?{startDate:ue,endDate:ye}:{date:le}},xe=e=>(n.isEmpty(r)||p.isAfter(e,r))&&(n.isEmpty(l)||p.isBefore(e,l)),be=(e,t)=>{!R&&Gt(e?.[0],c)&&Gt(e?.[1],s)||(ce(e?.[0]??null),me(e?.[1]??null),U?.(e,t))},we=(e=null,t=null)=>{let o=te(e);const n=te(t);""===o&&""!==n&&(o=ut),ce(e),pe(o),me(t),fe(n)};return t.useEffect(()=>{se(te(o)),we(c,s)},[o,c,s]),Se(()=>ne.current?.calendar?.containerRef?.current,e=>ne.current?.handleClickOutside(e),"react-datepicker-ignore-onclickoutside"),i.jsx("div",{className:Q.root,...n.addDataAttributes(e),children:i.jsx(yt,{ref:ie,minDate:r,maxDate:l,locale:n.isString(u)?Ht[u]:u,dateFormat:y,placeholderText:g,calendarStartDay:m,inline:v,disabled:x,fixedHeight:S,showPreviousMonths:j,focusSelectedMonth:N,monthsShown:f,allowSameDay:R,showPopperArrow:!1,popperClassName:Q.popper,calendarClassName:Q.datepicker,dayClassName:e=>a(Q.day,O?.(e)),disabledKeyboardNavigation:k,popperContainer:E?Wt:void 0,popperModifiers:[d.offset(-10),...M],popperPlacement:D,strictParsing:w,preventOpenOnFocus:T,shouldCloseOnSelect:I,customInputRef:z,customInput:i.jsx(B,{...Ce}),renderDayContents:e=>i.jsx("div",{className:Q.dayInner,children:e}),renderCustomHeader:_??(e=>i.jsx(Pt,{...e,months:h})),todayButton:A,highlightDates:L,calendarContainer:F,filterDate:P,onYearChange:W,onMonthChange:H,onFocus:Z,onKeyDown:Y,onCalendarOpen:()=>{ae(!0),$?.()},onCalendarClose:()=>{ae(!1),C?(be([de,he]),we(de,he)):se(te(o)),V?.()},onChangeRaw:(e,t)=>{void 0!==t&&(C?(e=>{const t=e.slice(0,10);let o=oe(t);const i=e.slice(13);let r=oe(i);(n.isNotEmpty(o)&&!p.isValid(o)||n.isNotEmpty(o)&&!xe(o))&&(o=de),(n.isNotEmpty(r)&&!p.isValid(r)||n.isNotEmpty(r)&&!xe(r))&&(r=he),(n.isEmpty(o)&&p.isValid(r)||p.isValid(o)&&p.isValid(r)&&p.isAfter(o,r))&&(o=r,r=null),pe(t),ce(o),fe(i),me(r)})(t):se(t))},...C?{startDate:de,endDate:he,selected:de,selectsRange:!0,onBlur:e=>{K?.(e),be([de,he],e),we(de,he)},onChange:be}:{selected:o,onBlur:e=>{K?.(e),se(te(o))},onChange:(e,t)=>{G?.(e,t)}}})})}),Zt=/(http(s?):\/\/(.*))(\s?)/,Yt=P("Description",{root:{},button:{cursor:"pointer",display:"inline-block",color:N.FONT_MEDIUM,marginTop:18,textTransform:"capitalize",borderBottom:[1,"dashed",N.FONT_MEDIUM],"&:hover":{color:N.FONT_MAIN}},link:{color:N.FONT_MEDIUM,textDecoration:"none",borderBottom:[1,"dashed",N.FONT_MEDIUM],"&:hover":{color:N.FONT_MAIN}}}),qt=e=>{e.preventDefault(),e.stopPropagation()},Xt=P("FileInput",{root:{display:"flex",flexDirection:"column",width:"100%"},label:{position:"relative",width:"fit-content",fontSize:16,marginBottom:12},requiredLabel:{"&:after":{content:'""',position:"absolute",right:-8,top:4,transform:"translate(0, -50%)",width:6,height:6,borderRadius:"50%"}},description:{marginBottom:8,fontSize:12},text:{padding:[16,0]},inputWrapper:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",boxSizing:"border-box",marginBottom:8,transition:R.defaultTransition,transitionProperty:"background-color, color"},inputLabel:{position:"absolute",inset:0,cursor:"pointer","& input":{opacity:0,width:1,height:1,zIndex:-1}},dragged:{},active:{},disabled:{cursor:"not-allowed",pointerEvents:"none"},fileList:{display:"flex",flexWrap:"wrap",columnGap:6,rowGap:12}}),Jt=t.forwardRef(function({fileList:e,label:o,text:r,description:l,isDragAndDropDisabled:s=!1,isRequired:d=!1,isReadOnly:c=!1,isMultipleDisabled:u=!1,isDisabled:p=!1,isActive:h=!1,accept:m,onAdd:y,testId:f,tweakStyles:g,data:C},v){const x=Xt({theme:g}),[b,w]=t.useState(!1),S=e=>{p||n.isEmpty(e)||0===e?.length||y?.([...e])},N=e=>{qt(e),w(!0)},k=e=>{qt(e),w(!1)},E=s||p?void 0:{onDragOver:N,onDragEnter:N,onDragLeave:k,onDrop:e=>{k(e),S(e.dataTransfer.files)}};return i.jsxs("div",{className:x.root,...n.addDataAttributes(C,f),children:[n.isReactNodeNotEmpty(o)&&i.jsx("div",{className:a(x.label,{[x.requiredLabel]:d}),children:o}),!c&&i.jsxs("div",{className:a(x.inputWrapper,{[x.dragged]:b,[x.disabled]:p,[x.active]:h}),...E,children:[n.isReactNodeNotEmpty(r)&&i.jsx("div",{className:x.text,children:r}),i.jsx("label",{className:x.inputLabel,children:i.jsx("input",{ref:v,type:"file",value:"",onChange:e=>{S(e.target.files)},multiple:!u,disabled:p,accept:m,...n.addDataTestId(f,"input")})})]}),n.isReactNodeNotEmpty(l)&&i.jsx("div",{className:x.description,children:l}),i.jsx("div",{className:x.fileList,children:e})]})}),Qt=P("IconButton",{root:{display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",outline:"none",boxSizing:"border-box",transition:R.defaultTransition,transitionProperty:"background-color, color, border-color, opacity, visibility",border:"none",position:"relative",boxShadow:"none",borderRadius:"50%",background:"none",padding:0,flexShrink:0,"&:disabled":{extend:"disabled"},"&:active":{extend:"active"},width:"var(--icon-button-size)",height:"var(--icon-button-size)","--icon-button-icon-size":"20px"},"cancel-light":{},cancel:{},main:{},custom:{},active:{},disabled:{cursor:"not-allowed",pointerEvents:"none"},loading:{"& $loader":{display:"block"}},icon:{display:"flex",alignItems:"center",width:"var(--icon-button-icon-size)",height:"var(--icon-button-icon-size)"},loader:{display:"none",position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",width:"var(--icon-button-icon-size)",height:"var(--icon-button-icon-size)"},s:{"--icon-button-size":"24px"},m:{"--icon-button-size":"32px"},l:{"--icon-button-size":"40px"}}),eo=t.forwardRef(function({icon:e,size:t="m",view:o="cancel-light",isDisabled:r=!1,isActive:l=!1,isLoading:s=!1,type:d="button",testId:c,tweakStyles:u,data:p,onClick:h,...m},y){const f=Qt({theme:u}),g=r||s;return i.jsx("button",{ref:y,className:a(f.root,f[o],f[t],{[f.disabled]:r,[f.active]:l,[f.loading]:s}),type:d,disabled:r,onClick:g?void 0:h,...m,...n.addDataAttributes(p,c),children:s?i.jsx("span",{className:f.loader,children:i.jsx(Ge,{type:"default",useCurrentColor:!0})}):i.jsx("span",{className:f.icon,children:Ie(e)})})}),to=P("Tooltip",{root:{display:"inline-block",boxSizing:"border-box"},tooltip:{fontSize:14,padding:[18,20],letterSpacing:.15,backgroundColor:N.CLASSIC_WHITE,color:N.FONT_MAIN,boxShadow:`0 0 1px ${s(N.FONT_MAIN,.4)}, 0 -2px 6px ${s(N.FONT_MAIN,.06)}, 0 8px 32px -8px ${s(N.FONT_MAIN,.3)}`,borderRadius:12,lineHeight:1.4,maxWidth:320},hint:{whiteSpace:"nowrap",fontSize:12,padding:[8,12],borderRadius:k.BORDER_RADIUS_SMALL,backgroundColor:N.FONT_MEDIUM,color:N.CLASSIC_WHITE,letterSpacing:.2},custom:{},info:{},error:{"&$tooltip":{backgroundColor:N.RED_WARNING,color:N.CLASSIC_WHITE},"&$hint":{backgroundColor:N.RED_WARNING}}}),oo=({text:e,view:t="tooltip",type:o="info",size:r,data:l,testId:s,tweakStyles:d})=>{const c=to({theme:d});return i.jsx("div",{className:a(c.root,c[t],c[o],n.isNotEmpty(r)&&c[r]),...n.addDataAttributes(l,s),children:e})},no=P("TextWithTooltip",{root:{position:"relative"},tooltip:{zIndex:9999},clickable:{cursor:"pointer"}}),io=({children:e,tooltipText:o,tooltipPosition:r="top",tooltipView:s="tooltip",tooltipType:d="info",tooltipModifiers:c=[],tooltipOffsetOptions:u,tooltipSize:p,isDisabled:h=!1,shouldRenderInBody:y=!0,mouseEventType:f="hover",hoverDelay:g,testId:C,data:v,tweakStyles:x})=>{const b=no({theme:x}),w=Ne({tweakStyles:x,className:"tweakTooltip",currentComponentName:"TextWithTooltip"}),[S,N]=t.useState(!1),[k,E]=t.useState(),R=t.useRef(null),I=t.useRef(null),j=void 0!==g;t.useEffect(()=>()=>clearTimeout(k),[]);const{styles:T,attributes:M}=l(R.current,I.current,{enabled:S,placement:r,modifiers:[{name:"offset",options:{offset:[0,6],...u}},...c]});we(I,()=>{"click"===f&&N(!1)},R);const D="click"===f?{onClick:()=>N(!0)}:{onMouseEnter:()=>{if(j){const e=setTimeout(()=>{N(!0)},g);E(e)}else N(!0)},onMouseLeave:()=>{j&&clearTimeout(k),N(!1)}},A=null!=o&&!h;return i.jsxs("div",{className:a(b.root,"click"===f&&A&&b.clickable),...A?D:void 0,...n.addDataAttributes(v,C),ref:R,children:[A&&i.jsx(m.Portal,{container:y?document.body:R.current,children:i.jsx("div",{className:b.tooltip,style:T.popper,...M.popper,ref:I,children:i.jsx(oo,{view:s,type:d,text:o,size:p,tweakStyles:w})})}),e]})},ro={[V.xls]:"file-excel",[V.xlsx]:"file-excel",[V.jpeg]:"file-image",[V.png]:"file-image",[V.pdf]:"file-pdf",[V.doc]:"file-word",[V.docx]:"file-word",[V.xml]:"file-xml",[V.zip]:"file-zip"},ao=e=>{const t=e.split(".");return t.length>1?t.pop():void 0},lo=e=>{const t=ao(e);return n.isNotEmpty(t)?V[t]:void 0},so=({type:e,name:t})=>{if(n.isNotEmpty(e)&&e in ro)return ro[e];const o=lo(t);return n.isNotEmpty(o)&&o in ro?ro[o]:"file-other"},co=P("FileItem",{root:{display:"flex",flexDirection:"column",gap:4},fileItemWrapper:{display:"flex",gap:12,width:"100%",cursor:"pointer",boxSizing:"border-box",transition:R.defaultTransition,transitionProperty:"background-color, color, box-shadow, border-color"},m:{"&$fileItemWrapper":{padding:[10,10,10,12]},"--icon-size":"20px"},l:{"&$fileItemWrapper":{padding:[12,16]},"--icon-size":"32px"},fileIcon:{maxWidth:"var(--icon-size)",maxHeight:"var(--icon-size)"},fileName:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",fontSize:16},fileNameContainer:{overflow:"hidden",marginRight:"auto"},preloader:{display:"flex",margin:6},"preloader-dots":{width:26,marginTop:12},"preloader-default":{width:20,height:20},"preloader-logo":{width:20,height:20},metadata:{display:"flex",flexDirection:"column",gap:2,fontSize:12},actions:{display:"flex",flexShrink:0,margin:-6},fileSize:{},footer:{},error:{fontSize:12},info:{fontSize:12},disabled:{cursor:"not-allowed"}}),uo={tweakDotsPreloader:{root:{gap:4,"--dot-size":"6px"}}},po=["THIS_MONTH","LAST_MONTH","THIS_YEAR","LAST_YEAR","CUSTOM"],ho={ru:{clear:"Очистить",all:"Все",chosen:"Выбранные",nothingFound:"Ничего не найдено",searchPlaceholder:"Поиск"},en:{clear:"Clear",all:"All",chosen:"Chosen",nothingFound:"Nothing found",searchPlaceholder:"Search"}},mo={ru:{clear:"Очистить",all:"Все",other:"Остальные",chosen:"Выбранные",nothingFound:"Не найдено",from:"От",to:"До",back:"Назад",searchPlaceholder:"Поиск",displayedFields:"Поля для поиска",months:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],periods:{THIS_MONTH:"Этот месяц",LAST_MONTH:"Прошлый месяц",THIS_YEAR:"Этот год",LAST_YEAR:"Прошлый год",CUSTOM:"Другой период"}},en:{clear:"Clear",all:"All",other:"Others",chosen:"Chosen",nothingFound:"Nothing found",from:"From",to:"To",back:"Back",searchPlaceholder:"Search",displayedFields:"Displayed fields",months:["January","February","March","April","May","June","July","August","September","October","November","December"],periods:{THIS_MONTH:"This month",LAST_MONTH:"Previous month",THIS_YEAR:"This year",LAST_YEAR:"Previous year",CUSTOM:"Custom"}}},yo={},fo={THIS_MONTH:()=>{const e=new Date;return{from:p.startOfMonth(e),to:p.endOfMonth(e)}},LAST_MONTH:()=>{const e=p.sub(new Date,{months:1});return{from:p.startOfMonth(e),to:p.endOfMonth(e)}},THIS_YEAR:()=>{const e=new Date;return{from:p.startOfYear(e),to:p.endOfYear(e)}},LAST_YEAR:()=>{const e=p.sub(new Date,{years:1});return{from:p.startOfYear(e),to:p.endOfYear(e)}}},go=(e="en",t,o)=>n.merge(mo[e],t,o),Co=e=>e.includes(void 0)?e:e.sort((e,t)=>e<t?-1:1),vo=e=>String(e),xo=(e,t)=>e.slice(0,t).split("").filter(pe).length,bo=t.forwardRef(function({value:e,canBeFloat:o=!1,canBeNegative:r=!1,defaultValue:a,precision:l=3,intPartPrecision:s=7,onChange:d,onBlur:c,min:u,max:p,...h},m){const[y,f]=t.useState(()=>((e,t)=>{const o=se(e);return n.isStringNotEmpty(o)?o:se(t)})(e,a)),[g,C]=t.useState(!1),v=e=>{f(n.isStringNotEmpty(e)?e:se(a))};return W(()=>{void 0!==e?v(se(e)):f(se(e))},[e]),i.jsx(ct,{value:y,onChange:async(e,t)=>{const n=y,i=t.target,a=i.selectionStart??0,c=de(e);if(""===c)return d(void 0),void f("");const u=new RegExp((({canBeFloat:e,canBeNegative:t,intPartPrecision:o,precision:n})=>`^${t?"(\\-)?":""}\\d{0,${o}}${e?`(\\.\\d{0,${n}})?`:""}$`)({precision:l,intPartPrecision:s,canBeNegative:r,canBeFloat:o}));if(!u.test(c))return await f(n),void ue(i,a-1);const p=o&&/^[-]*[\d\s]*[.,]$/.test(e),h=le(c),m=p?`${h}.`:h;await f(m),ue(i,((e,t,o,n)=>{if(t===o)return n?e+1:e;const i=o.length>t.length,r=xo(t,e-(i?1:0)),a=e+(xo(o,e)-r);return a<=0?0:a-(pe(o[a-1])?1:0)})(a,n,m,g))},onBlur:t=>{const o=t.currentTarget.value,n=ce(o),i=void 0!==n?ae(n,u,p):void 0;i!==e?d(i):v(se(e)),void 0!==c&&c(t)},onKeyDown:e=>{C("Delete"===e.key)},ref:m,...h})}),wo=P("FiltersPane",{root:{display:"flex",flexWrap:"wrap",gap:8,width:"100%"},settings:{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:18,boxSizing:"border-box",width:40,height:36,cursor:"pointer",transition:R.defaultTransition,transitionProperty:"background-color"},settingsIcon:{width:16,height:16},clear:{display:"flex",alignItems:"center",height:36},filterWithClearButton:{display:"flex",gap:16,minWidth:0}}),So={s:{paddingLeft:0,paddingRight:0,minWidth:"unset"},text:{background:"none",color:N.GREY_ACTIVE,"&:hover, &:focus":{color:N.FONT_MEDIUM},"&:active":{color:N.FONT_MAIN},"&:hover, &:focus, &:active":{background:"none",borderColor:"transparent"}}},No={text:{color:N.GREY_ACTIVE,"&:hover, &:focus":{color:N.FONT_MEDIUM},"&:active":{color:N.FONT_MEDIUM}}},ko=P("FilterInterval",{root:{padding:8,background:N.CLASSIC_WHITE},inputWrapper:{padding:[4,12],display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:20,marginBottom:12},autosize:{minWidth:120,height:0,opacity:0,paddingRight:16,fontSize:16,whiteSpace:"pre",userSelect:"none",pointerEvents:"none"},clear:{display:"flex",justifyContent:"flex-end"}}),Eo={input:{minWidth:120},tweakControlWrapper:{icon:{padding:0,width:24,"&:last-child":{paddingRight:0}}}},Ro=structuredClone(No),Io=({data:e,tweakStyles:o,value:r,labelName:a,withFieldNameInLabel:l,localeKey:s,locale:d,canBeFloat:c,onChange:u,fromInput:p,toInput:h,testId:m})=>{const y=ko({theme:o}),f=t.useMemo(()=>go(s,d),[s,d]),g=Ne({innerStyles:Eo,tweakStyles:o,className:"tweakInput",currentComponentName:"FilterInterval"}),C=Ne({innerStyles:Ro,tweakStyles:o,className:"tweakClearButton",currentComponentName:"FilterInterval"});return i.jsxs("div",{className:y.root,...n.addDataAttributes(e,m),children:[i.jsxs("div",{className:y.inputWrapper,children:[i.jsxs("div",{children:[i.jsx(bo,{onChange:e=>{u(void 0!==e||void 0!==r?.[1]?Co([e,r?.[1]]):void 0)},value:r?.[0],label:l?`${a} ${f.from.toLocaleLowerCase()}`:f.from,canBeFloat:c,isClearable:!0,tweakStyles:g,testId:n.getTestId(m,"start"),...p}),l&&i.jsxs("div",{className:y.autosize,children:[a," ",f.from]})]}),i.jsxs("div",{children:[i.jsx(bo,{onChange:e=>{u(void 0!==e||void 0!==r?.[0]?Co([r?.[0],e]):void 0)},value:r?.[1],label:l?`${a} ${f.to.toLocaleLowerCase()}`:f.to,canBeFloat:c,isClearable:!0,tweakStyles:g,testId:n.getTestId(m,"end"),...h}),l&&i.jsxs("div",{className:y.autosize,children:[a," ",f.to]})]})]}),i.jsx("div",{className:y.clear,children:i.jsx(Ye,{onClick:()=>{u(void 0)},size:"s",view:"text",testId:n.getTestId(m,"clear-button"),tweakStyles:C,children:f.clear})})]})},jo={ru:{clear:"Очистить",all:"Все",chosen:"Выбранные",nothingFound:"Не найдено",searchPlaceholder:"Поиск"},en:{clear:"Clear",all:"All",chosen:"Chosen",nothingFound:"Nothing found",searchPlaceholder:"Search"}},To=e=>String(e),Mo=P("MultiSelectList",{root:{width:220,background:N.CLASSIC_WHITE},list:{paddingTop:12,maxHeight:212,overscrollBehavior:"contain",...E.withScrollBar},label:{boxSizing:"border-box",fontSize:14,padding:[12,16],userSelect:"none",display:"flex",alignItems:"center",color:N.FONT_LABEL},labelChosen:{fontWeight:"bold",color:N.FONT_MAIN,padding:[4,16,12]},withoutTopGap:{paddingTop:0},item:{boxSizing:"border-box",padding:0,maxWidth:"100%",fontSize:14},option:{display:"inline-block",userSelect:"none",maxWidth:"100%",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},panel:{display:"flex",padding:[0,6,8]},clear:{marginLeft:"auto"},selectedItem:{},preloader:{width:80,height:40,margin:"auto",display:"flex",alignItems:"center",justifyContent:"center"},dropdownInput:{borderBottom:[1,"solid",N.BORDER_MAIN]},nothingFound:{display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",padding:16,fontSize:14}}),Do={tweakInput:{tweakControlWrapper:{controlWrapper:{"--control-height":"40px",backgroundColor:"transparent",border:"none"}}}},Ao={root:{padding:[11,16],boxSizing:"border-box",width:"100%"},children:{marginRight:"auto",overflow:"hidden"}},Lo={text:{color:N.GREY_ACTIVE,"&:hover, &:focus":{color:N.FONT_MEDIUM},"&:active":{color:N.FONT_MEDIUM}}};function Fo({value:e,tweakStyles:o,data:r,isSearchEnabled:l=!1,localeKey:s="en",locale:d=jo[s],onChange:c,onClose:u,options:p,fetchOptions:h,isGroupingEnabled:m=l,getValueView:f=To,getValueId:g=To,getValueString:C=To,checkboxPosition:v="left",pageSize:x,searchMaxLength:b,testId:w}){const S=Ce(),N=Mo({theme:o}),k=Ne({innerStyles:Ao,tweakStyles:o,className:"tweakCheckbox",currentComponentName:"MultiSelectList"}),E=Ne({innerStyles:Do,tweakStyles:o,className:"tweakSearchInput",currentComponentName:"MultiSelectList"}),R=Ne({innerStyles:Lo,tweakStyles:o,className:"tweakClearButton",currentComponentName:"MultiSelectList"}),[I,j]=t.useState(0),[T,M]=t.useState(""),[D,A]=t.useState([]),[L,F]=t.useState(!1),[O,B]=t.useState(!1),[z,_]=t.useState(0),[P,W]=t.useState(!1),H=t.useRef(),$=e?.include,V=t.useMemo(()=>((e="en",t,o)=>n.merge(jo[e],t,o))(s,d),[s,d]),G=t.useMemo(()=>$?.map(g),[g,$]),U=t.useMemo(()=>D.filter(e=>!G?.includes(g(e))),[g,D,G]),K=t.useCallback(async e=>{if(void 0!==h){F(!0);try{const t=await h(e?.trim()??"");S()&&void 0!==t&&(A(t),_(0),W(0===t.length||void 0!==x&&t.length<x))}finally{S()&&F(!1)}}},[h,x]),Z=t.useCallback(y.debounce(K),[K]);const Y=({value:e,isSelected:t})=>{var o;n.isNotEmpty(e)&&(0!==(o=t?[...$??[],e]:$?.filter(t=>g(t)!==g(e))??[]).length?c({include:o}):c(void 0))},q=t=>{if("Escape"===t.code&&(c(e),u&&u()),"ArrowDown"===t.code&&I<U.length+(e?.include.length??0)-1&&j(I+1),"ArrowUp"===t.code&&I>=1&&j(I-1),"Enter"===t.code){if(void 0===U[I]&&(void 0===e||0===e.include.length))return;void 0!==e?I<e.include.length?c({...e,include:e.include.filter(t=>g(t)!==g(e.include[I]))??[]}):c({...e,include:[...e.include,U[I-e.include.length]]}):c({include:[U[I]]})}},X=e=>$?.some(t=>g(t)===e),J=t.useCallback(async(e,t)=>{if(void 0!==h){B(!0);try{const o=await h(e??"",t??0);S()&&(o.length>0&&A(e=>[...e,...o]),(0===o.length||void 0!==x&&o.length<x)&&W(!0))}finally{S()&&B(!1)}}},[h,g]),Q=t.useCallback(e=>{O||P||(H.current&&H.current.disconnect(),H.current=new IntersectionObserver(async e=>{e[0].isIntersecting&&(await J(T,z+1),S()&&_(e=>e+1))}),e&&H.current.observe(e))},[z,J,O,P,T]);t.useEffect(()=>{if(void 0===h)return void A(p??[]);(async()=>{F(!0);try{const e=await h("");void 0!==e&&S()&&((0===e.length||void 0!==x&&e.length<x)&&W(!0),A(e))}finally{S()&&F(!1)}})()},[]),t.useEffect(()=>(document.addEventListener("keydown",q,!1),()=>{document.removeEventListener("keydown",q,!1)}));const ee=m?U:D,te=m&&n.isArrayNotEmpty($),oe=!L&&!n.isArrayNotEmpty(D),ne=te&&(n.isArrayNotEmpty(U)||!n.isArrayNotEmpty(D)),ie=L||O,re=!L&&(n.isArrayNotEmpty(D)||n.isArrayNotEmpty($));return i.jsxs("div",{className:N.root,...n.addDataAttributes(r,w),children:[l&&i.jsx("div",{className:N.dropdownInput,children:i.jsx(gt,{value:T,placeholder:V.searchPlaceholder,onChange:function(e){if(M(e),void 0===h){if(void 0!==p){const t=e.toLowerCase();A(p.filter(e=>C(e).toLowerCase().includes(t)))}}else F(!0),Z(e)},tweakStyles:E,maxLength:b,testId:n.getTestId(w,"search"),shouldFocusOnMount:!0})}),re&&i.jsxs("div",{className:N.list,...n.addDataTestId(w,"list"),children:[te&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:a(N.label,N.labelChosen,!l&&N.withoutTopGap),children:V.chosen}),$?.map(e=>{const t=g(e),o=f(e);return i.jsx("div",{className:a(N.item),children:i.jsx(Xe,{onSelect:Y,isChecked:!0,value:e,tweakStyles:k,labelPosition:"left"===v?"right":"left",data:{id:t},children:i.jsx("div",{className:N.option,...n.addDataAttributes({option:t}),children:o})})},t)})]}),!L&&i.jsxs(i.Fragment,{children:[ne&&i.jsx("div",{className:N.label,children:V.all}),ee.map((e,t)=>{const o=g(e),r=f(e);return i.jsx("div",{className:a(N.item),ref:ee.length-1===t?Q:void 0,children:i.jsx(Xe,{onSelect:Y,isChecked:X(o),value:e,tweakStyles:k,labelPosition:"left"===v?"right":"left",data:{id:o},children:i.jsx("div",{className:N.option,...n.addDataAttributes({option:o}),children:r})})},o)})]})]}),ie&&i.jsx("div",{className:N.preloader,children:i.jsx(Ge,{type:"dots"})}),oe&&i.jsx("div",{className:N.nothingFound,children:V.nothingFound}),i.jsx("div",{className:N.panel,children:i.jsx("div",{className:N.clear,children:i.jsx(Ye,{onClick:()=>{c(void 0)},size:"s",view:"text",testId:n.getTestId(w,"clear-button"),tweakStyles:R,children:V.clear})})})]})}function Oo(e){return i.jsx(Fo,{...e})}const Bo=P("FilterSelect",{root:{width:220,background:N.CLASSIC_WHITE},list:{paddingTop:12,padding:[12,0],maxHeight:224,overscrollBehavior:"contain",...E.withScrollBar},label:{boxSizing:"border-box",fontSize:14,padding:[12,16],userSelect:"none",display:"flex",alignItems:"center",color:N.FONT_LABEL},labelChosen:{fontWeight:"bold",color:N.FONT_MAIN,padding:[4,16,12]},withoutTopGap:{paddingTop:0},withClearButton:{paddingBottom:0,maxHeight:212},item:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:[10,16],maxWidth:"100%",cursor:"pointer",fontSize:14,minHeight:40,transition:R.defaultTransition,transitionProperty:"background-color",boxSizing:"border-box"},option:{display:"inline-block",userSelect:"none",width:"100%",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},icon:{width:20,height:20,marginRight:4,alignSelf:"center",flexShrink:0},panel:{display:"flex",padding:[0,6,8],gap:8},panelWithFooter:{borderTop:[1,"solid",N.BORDER_MAIN],padding:[8,16]},footer:{wordBreak:"break-word",alignSelf:"center"},clear:{marginLeft:"auto",alignSelf:"center"},preloader:{width:80,height:40,margin:"auto",display:"flex",alignItems:"center",justifyContent:"center"},dropdownInput:{borderBottom:[1,"solid",N.BORDER_MAIN]},nothingFound:{display:"flex",alignItems:"center",textAlign:"center",padding:16,fontSize:14}}),zo={tweakInput:{tweakControlWrapper:{controlWrapper:{"--control-height":"40px",backgroundColor:"transparent",border:"none"}}}},_o=structuredClone(No);function Po({data:e,tweakStyles:o,value:r,isSearchEnabled:l=!1,isGroupingEnabled:s=!1,localeKey:d,locale:c,onChange:u,onClose:p,options:h,fetchOptions:m,footer:f,getValueView:g=vo,getValueId:C=vo,getValueString:v=vo,hasClearButton:x=!0,testId:b}){const w=Bo({theme:o}),S=Ne({innerStyles:zo,tweakStyles:o,className:"tweakSearchInput",currentComponentName:"FilterSelect"}),N=Ne({innerStyles:_o,tweakStyles:o,className:"tweakClearButton",currentComponentName:"FilterSelect"}),k=Ce(),E=t.useMemo(()=>((e="en",t,o)=>n.merge(ho[e],t,o))(d,c),[d,c]),R=t.useRef(),[I,j]=t.useState(""),[T,M]=t.useState([]),[D,A]=t.useState(0),[L,F]=t.useState(!1),[O,B]=t.useState(!1),[z,_]=t.useState(!1),P=O||z,W=n.isReactNodeNotEmpty(f),H=t.useCallback(async e=>{if(void 0!==m){B(!0);try{const t=await m(e?.trim()??"");k()&&void 0!==t&&(M(t),A(0),F(!1))}finally{k()&&B(!1)}}},[m]),$=t.useMemo(()=>y.debounce(H),[H]),V=e=>{u(e),p?.()},G=t.useCallback(async(e,t)=>{if(void 0!==m){_(!0);try{const o=await m(e?.trim()??"",t??0);k()&&(o.length>0?M(e=>[...e,...o]):F(!0))}finally{k()&&_(!1)}}},[m]),U=t.useCallback(e=>{z||L||(R.current&&R.current.disconnect(),R.current=new IntersectionObserver(async e=>{e[0].isIntersecting&&(await G(I,D+1),k()&&A(e=>e+1))}),e&&R.current.observe(e))},[D,G,z,L,I]);return t.useEffect(()=>{if(void 0===m)return void M(h??[]);(async()=>{B(!0);try{const e=await m("");void 0!==e&&k()&&M(e)}finally{B(!1)}})()},[]),i.jsxs("div",{className:w.root,...n.addDataAttributes(e,b),children:[l&&i.jsx("div",{className:w.dropdownInput,children:i.jsx(gt,{value:I,placeholder:E.searchPlaceholder,onChange:e=>{if(j(e),void 0===m){if(void 0!==h){const t=e.toLowerCase();M(h.filter(e=>v(e).toLowerCase().includes(t)))}}else $(e)},tweakStyles:S,testId:n.getTestId(b,"search"),shouldFocusOnMount:!0})}),!O&&i.jsxs(i.Fragment,{children:[n.isArrayNotEmpty(T)&&i.jsxs("div",{className:a(w.list,{[w.withClearButton]:x}),...n.addDataTestId(b,"list"),children:[s&&n.isNotEmpty(r)&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:a(w.label,w.labelChosen,{[w.withoutTopGap]:!l}),children:E.chosen}),i.jsxs("div",{className:w.item,onClick:()=>V(void 0),children:[i.jsx("div",{className:w.option,children:g(r)}),i.jsx("div",{className:w.icon,children:i.jsx(Re,{type:"check"})})]}),i.jsx("div",{className:w.label,children:E.all})]}),T.map((e,t)=>{const o=n.isNotEmpty(r)&&C(r)===C(e);if(s&&o)return null;const a=C(e),l=g(e),d=i.jsxs("div",{className:w.item,ref:T.length-1===t&&void 0!==m?U:void 0,onClick:()=>V(e),children:[i.jsx("div",{className:w.option,...n.addDataAttributes({id:a,option:a}),children:l}),o&&i.jsx("div",{className:w.icon,children:i.jsx(Re,{type:"check"})})]},a);return void 0!==h&&""===I?i.jsx(vt,{active:o,children:d},a):d})]}),P&&i.jsx("div",{className:w.preloader,children:i.jsx(Ge,{type:"dots"})}),!n.isArrayNotEmpty(T)&&i.jsx("div",{className:w.nothingFound,children:E.nothingFound}),(x||W)&&i.jsxs("div",{className:a(w.panel,{[w.panelWithFooter]:W}),children:[W&&i.jsx("div",{className:w.footer,children:f}),x&&i.jsx("div",{className:w.clear,children:i.jsx(Ye,{onClick:()=>{void 0!==h&&M(h),V(void 0),j("")},size:"s",view:"text",testId:n.getTestId(b,"clear-button"),tweakStyles:N,children:E.clear})})]})]}),O&&i.jsx("div",{className:w.preloader,children:i.jsx(Ge,{type:"dots"})})]})}const Wo=P("FilterWithDates",{root:{width:320,background:N.CLASSIC_WHITE,position:"relative",zIndex:20},container:{display:"flex",gap:20,padding:[8,20]},containerItem:{width:"50%",height:44},btnRow:{display:"flex",flexDirection:"row-reverse",justifyContent:"space-between",padding:8},datepicker:{}}),Ho=structuredClone(No),$o=No,Vo={popper:{marginTop:28,marginLeft:-20}},Go={popper:{marginTop:56,marginLeft:-20}},Uo={popper:{marginTop:28,marginLeft:-170}},Ko={popper:{marginTop:56,marginLeft:-170}},Zo=({value:e,onChange:o,localeKey:r,locale:a,onStartBtnSubmit:l,onEndBtnSubmit:s,data:d,tweakStyles:c,testId:u,startPickerProps:h=yo,endPickerProps:m=yo,isClearable:y=!0})=>{const f=Wo({theme:c}),C=Ne({innerStyles:Ho,tweakStyles:c,className:"tweakClearButton",currentComponentName:"FilterWithDates"}),v=Ne({innerStyles:$o,tweakStyles:c,className:"tweakBackButton",currentComponentName:"FilterWithDates"}),x=y||n.isNotEmpty(l),b=Ne({innerStyles:x?Go:Vo,tweakStyles:c,className:"tweakStartDatePicker",currentComponentName:"FilterWithDates"}),w=Ne({innerStyles:x?Ko:Uo,tweakStyles:c,className:"tweakEndDatePicker",currentComponentName:"FilterWithDates"}),[S,N]=t.useState(!1),[k,E]=t.useState(!1),R=t.useRef(null),I="ru"===r?g.ru:g.enUS,j=t.useMemo(()=>go(r,a),[r,a]),T=S||k;return i.jsxs("div",{className:f.root,...n.addDataAttributes(d,u),children:[i.jsxs("div",{className:f.container,children:[i.jsx("div",{className:f.containerItem,children:i.jsx(Kt,{selectedDate:e?.from,maxDate:e?.to??void 0,label:j.from,months:j.months,locale:I,onChangeDate:t=>{null!==t&&void 0!==e&&null!==e.to&&p.isAfter(t,e.to)?o({from:e.to,to:t}):o({from:t,to:e?.to??null})},tweakStyles:b,testId:n.getTestId(u,"from"),isClearable:y,...h})}),i.jsx("div",{className:f.containerItem,children:i.jsx(Kt,{selectedDate:e?.to,label:j.to,months:j.months,minDate:e?.from??void 0,locale:I,onChangeDate:t=>{null!==t&&void 0!==e&&null!==e.from&&p.isBefore(t,e.from)?o({from:t,to:e.from}):o({from:e?.from??null,to:t})},tweakStyles:w,testId:n.getTestId(u,"to"),isClearable:y,...m})})]}),i.jsxs("div",{className:f.btnRow,children:[y&&i.jsx("div",{children:i.jsx(Ye,{onClick:()=>{s()},size:"s",view:"text",testId:n.getTestId(u,"clear-button"),isFullWidth:!0,tweakStyles:C,children:j.clear})}),l&&i.jsx("div",{children:i.jsx(Ye,{onClick:l,size:"s",view:"text",isFullWidth:!0,tweakStyles:v,children:j.back})})]}),T&&i.jsx("div",{ref:R,className:f.datepicker,children:i.jsx(Kt,{selectedDate:(S?e?.from:e?.to)??null,label:"",locale:I,months:j.months,isInline:!0,onChangeDate:S?t=>{o({from:t,to:e?.to??null}),N(!1)}:t=>{o({from:e?.from??null,to:t}),E(!1)}})})]})},Yo=P("FilterWithPeriod",{root:{},main:{},picker:{}}),qo={list:{maxHeight:"auto"}},Xo=({value:e,localeKey:o,locale:r,onChange:a,onClose:l,periods:s,tweakStyles:d,testId:c})=>{const u=Yo({theme:d}),p=t.useMemo(()=>go(o,r),[o,r]),[h,m]=t.useState("CUSTOM"!==e?.periodType),[y,f]=t.useState("CUSTOM"===e?.periodType),[g,C]=t.useState(e),v=t.useMemo(()=>{const e={...fo};return s?.forEach(t=>{Array.isArray(t)&&(e[t[0]]=t[1])}),e},[s]),x=t.useMemo(()=>void 0===s?[...po]:s.map(e=>Array.isArray(e)?e[0]:e),[s]),b=t.useCallback(e=>p.periods[e]??e,[p.periods]),w=t.useRef(null),S=t.useRef(null);Se(S,()=>{g?.from||g?.to||C(void 0),f(!1)}),t.useEffect(()=>{C(e)},[e,e?.from,e?.to,e?.periodType]);const N=Ne({innerStyles:qo,tweakStyles:d,className:"tweakFilterSelect",currentComponentName:"FilterWithPeriod"});return i.jsxs("div",{className:u.root,children:[h&&i.jsx("div",{className:u.main,ref:w,children:i.jsx(Po,{options:x,value:g?.periodType,onChange:e=>{void 0!==e?(e=>{let t=null,o=null;if(e in v){const n=v[e]();t=n.from,o=n.to}const n={from:t,to:o,periodType:e};C(n),"CUSTOM"===e?f(!0):(void 0!==l&&l(),a({...n,label:b(e)})),m(!1)})(e):(a(void 0),void 0!==l&&l())},localeKey:o,locale:p,tweakStyles:N,getValueView:b,testId:n.getTestId(c,"select")})}),y&&i.jsx("div",{className:u.picker,ref:S,children:i.jsx(Zo,{onStartBtnSubmit:()=>{f(!1),m(!0)},onEndBtnSubmit:()=>{a(void 0),f(!1),void 0!==l&&l()},value:g,onChange:e=>{e.from||e.to?a({...e,periodType:"CUSTOM"}):a(void 0)},localeKey:o,locale:p,testId:n.getTestId(c,"dates")})})]})},Jo=e=>n.isEmpty(e)||e instanceof Date,Qo=e=>Jo(e?.from)&&Jo(e?.to);function en(e){const{filter:o,value:r,onChange:a,onClose:l,localeKey:s,locale:d,testId:c}=e,u=o.localeKey??s,p=t.useMemo(()=>go(u,d,o.locale),[u,d,o.locale]);if("select"===o.type)return i.jsx(Po,{value:r,onChange:a,onClose:l,localeKey:u,locale:p,testId:n.getTestId(c,"select"),...o});if("dateRange"===o.type){const e=(e=>n.isString(e?.periodType)&&Qo(e))(r)?{...r}:void 0;return i.jsx(Xo,{value:e,onChange:a,onClose:l,localeKey:u,locale:p,testId:n.getTestId(c,"period"),...o})}if("dateRangeWithoutPeriod"===o.type){const e=Qo(r)?r:void 0;return i.jsx(Zo,{value:e,onChange:e=>a({...e,periodType:"CUSTOM"}),onEndBtnSubmit:()=>a(void 0),localeKey:u,locale:p,testId:n.getTestId(c,"dates"),...o})}if("multiSelect"===o.type){const e=(e=>Array.isArray(e?.include))(r)?r:void 0;return i.jsx(Oo,{value:e,onChange:a,onClose:l,localeKey:u,locale:p,testId:n.getTestId(c,"multiSelect"),...o})}if("interval"===o.type){const e=Array.isArray(r)?r:void 0;return i.jsx(Io,{value:e,onChange:a,localeKey:u,locale:p,labelName:o.name,testId:n.getTestId(c,"interval"),...o})}if("custom"===o.type&&o.component){const t=o.component;return i.jsx(t,{...e,filter:o,testId:n.getTestId(c,"dropdown")})}return"boolean"!==o.type&&console.warn(`%cДля фильтра ${o.name} не задан тип или component`,"background: red; color: black"),null}const tn=P("FiltersPaneSearch",{root:{display:"flex",position:"relative",backgroundColor:s(N.BORDER_MAIN,.3),border:[1,"transparent","solid"],borderRadius:18,paddingRight:8,transition:R.defaultTransition,transitionProperty:"background-color, border-color"},focused:{backgroundColor:N.CLASSIC_WHITE,borderColor:N.BORDER_MAIN},disabled:{"& $selectBlock":{cursor:"default"}},hasValue:{backgroundColor:N.CLASSIC_WHITE,borderColor:N.BORDER_MAIN},selectWrapper:{position:"relative",display:"flex",flexShrink:0},selectBlock:{display:"flex",alignItems:"center",gap:6,cursor:"pointer",height:"100%"},selectLabel:{flexShrink:0,fontSize:14,userSelect:"none"},chevronIcon:{flexShrink:0,width:20,height:20,marginRight:4,transition:"transform .2s ease",opacity:.5},open:{transform:"rotate(180deg)"},dropdown:{position:"absolute",top:34,right:0,zIndex:20,minWidth:200,marginTop:6,borderRadius:k.BORDER_RADIUS_SMALL,backgroundColor:N.CLASSIC_WHITE,overflow:"hidden"},dropdownInput:{borderBottom:[1,"solid",N.BORDER_MAIN]},active:{fontWeight:"bold"}}),on={tweakInput:{tweakControlWrapper:{controlWrapper:{"--control-height":"34px",backgroundColor:"transparent",border:"none",minWidth:140},focused:{backgroundColor:"transparent",border:"none"}}}},nn={root:{borderRadius:0,borderBottomLeftRadius:6,borderBottomRightRadius:6,boxShadow:"none",width:"100%"}};function rn({value:e,fields:o=[],field:r,onChange:l,localeKey:s,locale:d,getValueId:c,getValueView:u,getValueString:p,hasClearSelectButton:h,isDisabled:m=!1,isSelectSearchEnabled:y=!0,isAutoSized:f=!1,maxLength:g,data:C,tweakStyles:v,testId:x}){const b=tn({theme:v}),w=Ne({innerStyles:on,tweakStyles:v,className:"tweakSearchInput",currentComponentName:"FiltersPaneSearch"}),S=Ne({innerStyles:nn,tweakStyles:v,className:"tweakSelect",currentComponentName:"FiltersPaneSearch"}),[N,k]=t.useState(!1),[E,R]=t.useState(!1),I=t.useRef(null),j=t.useMemo(()=>go(s,d),[s,d]);Se(I,()=>R(!1));return i.jsxs("div",{className:a(b.root,{[b.focused]:N,[b.disabled]:m,[b.hasValue]:n.isArrayLikeNotEmpty(e)}),ref:I,...n.addDataAttributes(C,x),children:[i.jsx(gt,{value:e,onChange:e=>{l({value:e,field:r})},placeholder:j.searchPlaceholder,tweakStyles:w,onFocus:()=>k(!0),onBlur:()=>k(!1),testId:n.getTestId(x,"input"),maxLength:g,isDisabled:m,isAutoSized:f}),i.jsxs("div",{className:b.selectWrapper,children:[n.isArrayNotEmpty(o)&&i.jsxs("div",{className:b.selectBlock,onClick:m?void 0:()=>R(!E),...n.addDataTestId(x,"select"),children:[i.jsx("div",{className:a(b.selectLabel,{[b.active]:n.isNotEmpty(r)}),children:n.isNotEmpty(r)?u?.(r):j.displayedFields}),i.jsx("div",{className:a(b.chevronIcon,E&&b.open),children:i.jsx(Re,{type:"chevron-down"})})]}),E&&i.jsx("div",{className:b.dropdown,children:i.jsx(Po,{tweakStyles:S,value:r,options:o,getValueView:u,getValueId:c,getValueString:p,localeKey:s,locale:j,onChange:t=>{l({value:e,field:t}),R(!1)},isSearchEnabled:y,hasClearButton:h,testId:n.getTestId(x,"dropdown")})})]})]})}const an=P("FilterValueView",{text:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},count:{whiteSpace:"pre"}});function ln({value:e,filter:o,locale:r,localeKey:a,tweakStyles:l}){const s=an({theme:l}),d=o.localeKey??a,c=t.useMemo(()=>go(d,r,o.locale),[d,r,o.locale]);if(n.isEmpty(e))return i.jsx(i.Fragment,{});if(n.isNotEmpty(o.getSelectedValueView))return i.jsx("span",{className:s.text,children:o.getSelectedValueView(e)});const u="custom"===o.type&&"multiple"===o.valueViewType,h="custom"===o.type&&"range"===o.valueViewType,m="dateRange"===o.type||"dateRangeWithoutPeriod"===o.type,y=e=>n.isNotEmpty(e)?e instanceof Date?p.format(e,o.dateFormat||"dd.MM.yyyy"):"object"==typeof e&&"value"in e&&n.isNotEmpty(e.value)?String(e.value):"string"==typeof e||"number"==typeof e||"boolean"==typeof e?String(e):(console.warn(`%c Ошибка конфигурации фильтра ${o.name}. Невозможно отобразить значение фильтра. Задайте filterValueViewComponent или filterValueViewType.`,"background: orange; color: black"),""):"";if("select"===o.type){const t=o.getValueView??vo;return i.jsx("span",{className:s.text,children:t(e)})}if("multiSelect"===o.type){const t=e,n=o.getValueView??vo,{include:r}=t;return i.jsx(i.Fragment,{children:Array.isArray(r)&&r.length>0&&i.jsxs(i.Fragment,{children:[i.jsx("span",{className:s.text,children:n(r[0])}),i.jsx("span",{className:s.count,children:r.length>1&&` (+${r.length-1})`})]})})}if("interval"===o.type){const t=e,o=t[0],n=t[1],r=[];return void 0!==o&&r.push(`${c.from.toLowerCase()} ${String(o)}`),void 0!==n&&r.push(`${c.to.toLowerCase()} ${String(n)}`),i.jsx("span",{className:s.text,children:r.join(" ")})}if(m){const{from:t,to:o,periodType:n,label:r}=e,a=null!=t,l=null!=o;if("CUSTOM"!==n)return i.jsx("span",{className:s.text,children:y(r)});const d=[];return a&&(l||d.push(c.from.toLowerCase()),d.push(y(t))),l&&(a?d.push("—"):d.push(c.to.toLowerCase()),d.push(y(o))),i.jsx("span",{className:s.text,children:d.join(" ")})}if(u){const t=o.getSelectedValue??y;return i.jsx(i.Fragment,{children:Array.isArray(e)&&e.length>0&&i.jsxs(i.Fragment,{children:[i.jsx("span",{className:s.text,children:t(e[0])}),i.jsx("span",{className:s.count,children:e.length>1&&` (+${e.length-1})`})]})})}if(h&&Array.isArray(e)){const t=e,o=t[0],n=t[1],r=[];return void 0!==o&&r.push(`${c.from.toLowerCase()} ${String(o)}`),void 0!==n&&r.push(`${c.to.toLowerCase()} ${String(n)}`),i.jsx("span",{className:s.text,children:r.join(" ")})}return i.jsx("span",{className:s.text,children:y(e)})}const sn=e=>Array.isArray(e)?e.some(sn):n.isObject(e)?Object.values(e).some(sn):"boolean"==typeof e?e:n.isNotEmpty(e),dn=P("FilterWrapper",{root:{position:"relative",transition:R.defaultTransition,transitionProperty:"background-color, border-color",border:[1,"solid",N.BORDER_MAIN],borderRadius:18,boxSizing:"border-box",height:36,minWidth:0},item:{display:"flex",padding:[0,8,0,16],cursor:"pointer"},booleanItem:{padding:0},name:{fontSize:14,lineHeight:"34px",whiteSpace:"nowrap"},boolean:{padding:[0,16]},noValue:{},openNoValue:{},openWithValue:{},disabled:{"& > $item":{cursor:"default"}},withValue:{},iconContainer:{width:20,height:20,transition:"transform .2s ease-in-out",alignSelf:"center",marginLeft:6,marginRight:4,flexShrink:0},chevronIcon:{},clearIcon:{},open:{transform:"rotate(180deg)"},dropdown:{position:"absolute",zIndex:20,marginTop:6,border:[1,N.BORDER_MAIN,"solid"]},left:{left:0},right:{right:0},value:{alignSelf:"center",fontSize:14,lineHeight:"16px",margin:[0,2,0,8],fontWeight:"bold",display:"flex",minWidth:0}});function cn({filter:e,value:t,isDisabled:o,locale:r,localeKey:l,data:s,testId:d,tweakStyles:c,onChange:u}){const p=A(c,e.tweakWrapperStyles),h=dn({theme:p}),m=Ne({tweakStyles:p,className:"tweakWithPopup",currentComponentName:"FilterWrapper"}),y=Ne({tweakStyles:p,className:"tweakValueView",currentComponentName:"FilterWrapper"});if(e.isInline)return i.jsx(en,{value:t,filter:e,localeKey:l,locale:r,onChange:u,testId:d});const f="boolean"===e.type,g=()=>{f&&u(!t)},C=e=>{e.stopPropagation(),u(void 0)},v=sn(t),x=(e.isClearable??!1)&&v;return i.jsx(Me,{placement:"bottom-start",canBeFlipped:!0,isDisabled:f||o,tweakStyles:m,trigger:({triggerProps:{isActive:c},referenceProps:u})=>i.jsx("div",{className:a(h.root,{[h.noValue]:!v,[h.openNoValue]:c&&!v,[h.withValue]:!c&&v,[h.openWithValue]:c&&v,[h.boolean]:f,[h.disabled]:o}),...n.addDataAttributes(s,d),...u,children:i.jsxs("div",{onClick:g,className:a(h.item,{[h.booleanItem]:f}),children:[i.jsx("div",{className:h.name,children:e.name}),!f&&n.isNotEmpty(t)&&i.jsx("div",{className:h.value,children:i.jsx(ln,{value:t,filter:e,locale:r,localeKey:l,testId:n.getTestId(d,"value"),tweakStyles:y})}),!f&&!x&&i.jsx("div",{className:a(h.iconContainer,h.chevronIcon,{[h.open]:c}),children:i.jsx(Re,{type:"chevron-down"})}),x&&i.jsx("div",{className:a(h.iconContainer,h.clearIcon),onClick:C,children:i.jsx(Re,{type:"close-large"})})]})}),children:({onClose:o})=>i.jsx(en,{value:t,filter:e,locale:r,localeKey:l,onClose:o,onChange:u,testId:d})})}const un={AB:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 341.3"><path fill="#FFF" d="M0 0h512v341.3H0z"/><g fill="#6DA544"><path d="M0 0h512v48.8H0zM0 97.5h512v48.8H0zM0 195h512v48.8H0zM0 292.6h512v48.8H0z"/></g><path fill="#D80027" d="M0 0h256v146.3H0z"/><path fill="#FFF" d="m116.9 114.4-7.5-14.8V69.9L128 59l18.6 10.9v22.3l7.4-7.4 4.2 3-4.2 11.8-14.9 14.8z"/><circle fill="#FFF" cx="82" cy="82.8" r="5.4"/><circle fill="#FFF" cx="90.8" cy="61.7" r="5.4"/><circle fill="#FFF" cx="106.6" cy="46.2" r="5.4"/><circle fill="#FFF" cx="128" cy="40.8" r="5.4"/><circle fill="#FFF" cx="149.4" cy="46.2" r="5.4"/><circle fill="#FFF" cx="165.2" cy="61.7" r="5.4"/><circle fill="#FFF" cx="174" cy="82.8" r="5.4"/></svg>',OS:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 450 300"><path fill="#FFF" d="M0 0h450v300H0z"/><path fill="red" d="M0 100h450v200H0z"/><path fill="#FFDF00" d="M0 200h450v100H0z"/></svg>'},pn=P("Flag",{root:{display:"flex",width:"100%",height:"100%",boxSizing:"border-box",border:[1,"solid",N.BORDER_MAIN],borderRadius:2},noFlag:{width:20,color:N.FONT_MEDIUM}}),hn=({countryCode:e="",tweakStyles:t})=>{const o=pn({theme:t}),n=e.toUpperCase();if(v.hasFlag(n)){const e=S[n];return i.jsx("div",{className:o.root,children:i.jsx(e,{})})}const r=un[n];return void 0!==r?i.jsx("div",{className:o.root,dangerouslySetInnerHTML:{__html:r}}):i.jsx("div",{className:o.noFlag,children:i.jsx(Re,{type:"minus"})})},mn={table:{Root:"table",Head:"thead",Body:"tbody",Row:"tr",Header:"th",Cell:"td"},divs:{Root:"div",Head:"div",Body:"div",Row:"div",Header:"div",Cell:"div"}},yn=P("Skeleton",{root:{display:"flex",width:"100%",height:"100%",backgroundColor:s(N.GREY_DISABLED,.8),position:"relative",borderRadius:4,overflow:"hidden","-webkit-mask-image":"-webkit-radial-gradient(white, black)","&::after":{content:'""',animation:"$skeleton 1.6s linear 0.5s infinite",background:`linear-gradient(90deg, transparent, ${s(N.GREY_BACKGROUND,.65)}, transparent)`,position:"absolute",transform:"translateX(-100%)",bottom:0,left:0,right:0,top:0}},"@keyframes skeleton":{"0%":{transform:"translateX(-100%)"},"50%":{transform:"translateX(100%)"},"100%":{transform:"translateX(100%)"}}}),fn=({height:e,tweakStyles:t})=>{const o=yn({theme:t});return i.jsx("div",{className:o.root,style:{height:e}})},gn=e=>n.isNotEmpty(e)&&e.scrollWidth!==e.clientWidth,Cn=(e,t)=>e instanceof Date?p.format(e,t?.dateFormat??"dd.MM.yyyy"):String(e),vn=P("FlexibleTable",{flexibleTableWrapper:{},root:{width:"100%",position:"relative",borderCollapse:"separate",borderSpacing:0},scroll:{...E.withScrollBar,maxHeight:"100%"},head:{},body:{},loaderRow:{},loaderCell:{},loader:{position:"sticky",left:0,maxWidth:"100vw",height:48,display:"flex",justifyContent:"center",alignItems:"center"},headerRow:{position:"relative",verticalAlign:"bottom"},header:{position:"sticky",boxSizing:"content-box",top:0,zIndex:10,fontSize:12,fontWeight:"normal",padding:[0,7,16,7]},headerSticky:{zIndex:20,left:0,paddingLeft:24,paddingRight:12,"&::before":{content:'""',display:"block",width:"100%",height:"100%",position:"absolute",left:0,top:0,background:"transparent",pointerEvents:"none",zIndex:1,transition:R.defaultTransition,transitionProperty:"box-shadow","[data-scrolled] &":{boxShadow:"4px 0 4px rgba(0, 0, 0, 0.05)"}},"&::after":{content:'""',display:"block",width:12,height:"100%",position:"absolute",left:"100%",top:0,background:`linear-gradient(90deg, ${N.CLASSIC_WHITE}, ${s(N.CLASSIC_WHITE,0)})`,zIndex:0}},headerSecond:{paddingLeft:12},nothingFoundRow:{},nothingFound:{}}),xn=P("FlexibleTableCell",{root:{position:"relative",boxSizing:"content-box",padding:[14,7],fontSize:14,lineHeight:1.42,zIndex:5,verticalAlign:"top"},sticky:{zIndex:19,paddingLeft:24,paddingRight:12,left:0,...n.getTransition(["box-shadow"]),"[data-scrolled] &":{boxShadow:"4px 0 4px rgba(0, 0, 0, 0.05)"}},second:{paddingLeft:12},loading:{},skeleton:{height:21},clickable:{cursor:"pointer"}});function bn({row:e,columnName:o,config:r,renderMode:l,isSecond:s,isSticky:d,isLoading:c,updateNestedComponent:u,tweakStyles:p,...h}){const m=xn({theme:p}),y=e[o],{component:f=Cn(y,r[o]),width:g,maxWidth:C,minWidth:v,left:x,right:b,position:w,cellAlign:S,cellVerticalAlign:N,shouldRenderDataId:k,shouldRenderComponent:E=n.isNotEmpty,onCellClick:R}=r[o]??{},I=d||"sticky"===w,j=!c&&n.isNotEmpty(R),T={...h,onSetNestedComponent:t.useCallback(e=>u(e,o),[o,u]),value:y,row:e},M=mn[l];return i.jsx(M.Cell,{className:a(m.root,{[m.sticky]:I,[m.second]:s,[m.loading]:c,[m.clickable]:j}),style:{textAlign:S,position:I?"sticky":w,width:g,maxWidth:C,minWidth:v,right:b,left:x,verticalAlign:N},onClick:j?e=>R?.(e,T):void 0,...n.addDataAttributes({id:k?o:void 0}),children:c?i.jsx("div",{className:m.skeleton,children:i.jsx(fn,{})}):n.applyAction(E,y,e,o)&&n.applyAction(f,T)})}const wn=P("FlexibleTableRow",{root:{position:"relative"},active:{},editable:{cursor:"pointer"},clickable:{cursor:"pointer"},nestedComponent:{}}),Sn=me(function({item:e,config:o,columns:r,uniqueField:l,renderMode:s,isActive:d=!1,isFocusable:c=!1,isFirstColumnSticky:u=!1,isLoading:p=!1,rowAttributes:h,isExpandableRowComponentInitiallyOpen:m=!1,rowRef:y,tweakStyles:f,expandableRowComponent:g,onRowHover:C,onRowClick:v}){const x=wn({theme:f}),b=Ne({tweakStyles:f,className:"tweakTableCell",currentComponentName:"FlexibleTableRow"}),[w,S]=t.useState(!1),[N,k]=t.useState(()=>({isOpen:m})),E=!p&&(n.isNotEmpty(v)||n.isNotEmpty(C)),R=!p&&(n.isNotEmpty(v)||n.isNotEmpty(g)),{isOpen:I,cellKey:j}=N,T=Object.fromEntries(h?.map(t=>[t,e[t]])??[]),M=()=>{k({isOpen:!1})},D=t.useCallback((e,t)=>{n.isEmpty(e)?M():k({isOpen:!0,component:e,cellKey:t})},[]),A=mn[s];return i.jsxs(i.Fragment,{children:[i.jsx(A.Row,{ref:y,className:a(x.root,{[x.active]:d,[x.editable]:E,[x.clickable]:R}),...!p&&{onClick:()=>{n.isNotEmpty(l)&&v?.(e[l]),n.isEmpty(g)||(I?n.isEmpty(j)&&M():k({isOpen:!0}))},onMouseEnter:t=>{n.isNotEmpty(l)&&n.isNotEmpty(C)&&(t.stopPropagation(),C(e[l])),c&&S(!0)},onMouseLeave:()=>{C?.(void 0),c&&S(!1)}},...n.addDataAttributes({...T,active:!!d||void 0,editable:!!E||void 0,isExpandableComponentActive:!!I||void 0}),children:r.map((t,r)=>i.jsx(bn,{isSticky:u&&0===r,isSecond:u&&1===r,isLoading:p,row:e,config:o,columnName:t,tweakStyles:b,renderMode:s,isFocusedRow:w,isActiveRow:d,isNestedComponentExpanded:I&&j===t,isRowNestedComponentExpanded:I&&n.isEmpty(j),updateNestedComponent:D},t))}),I&&i.jsx(A.Row,{className:x.root,children:i.jsx(A.Cell,{className:x.nestedComponent,colSpan:r.length,children:N.component??g?.(e,!0,M)})})]})});const Nn=P("DocActions",{docActions:{display:"grid",alignItems:"center",gridTemplateColumns:"max-content 1fr"},neutral:{},inverse:{},counterWrapper:{},title:{},actionsWrapper:{justifySelf:"end"}}),kn=({title:e,view:t="neutral",children:o,tweakStyles:n,...r})=>{const l=Nn({theme:n}),s=Ne({tweakStyles:n,className:"tweakCheckbox",currentComponentName:"DocActions"});return i.jsxs("div",{className:a(l.docActions,l[t]),children:[i.jsx("div",{className:l.counterWrapper,children:i.jsx(Xe,{tweakStyles:s,...r,children:i.jsx("span",{className:l.title,children:e})})}),i.jsx("div",{className:l.actionsWrapper,children:o})]})},En=o.createUseStyles({...R.slideUp}),Rn={tweakControlWrapper:{controlWrapper:{"--increment-buttons-width":"36px","--increment-buttons-gap":"1px","--increment-buttons-margin":"1px","--increment-button-icon-size":"16px"}}},In=P("IncrementInput",{buttons:{display:"flex",flexDirection:"column",height:"calc(100% - var(--increment-buttons-margin) * 2)",margin:"var(--increment-buttons-margin)",gap:"var(--increment-buttons-gap)",flexShrink:0,order:1e3,zIndex:k.Z_INDEX.CONTROL_FOCUS+1},button:{display:"flex",alignItems:"center",justifyContent:"center",width:"var(--increment-buttons-width)",flexGrow:1,cursor:"pointer",border:"none",outline:"none",color:N.FONT_MEDIUM,backgroundColor:N.GREY_BACKGROUND,transition:R.defaultTransition,transitionProperty:"background-color, color","&:hover, &:focus":{backgroundColor:N.GREY_HOVER},"&:active":{backgroundColor:N.GREY_ACTIVE}},disabledButton:{cursor:"default",color:N.FONT_DISABLED,backgroundColor:N.CLASSIC_WHITE,"&:hover":{backgroundColor:N.CLASSIC_WHITE}},errorButton:{},icon:{width:"var(--increment-button-icon-size)",height:"var(--increment-button-icon-size)"}}),jn=P("Modal",{root:{},fixedPosition:{position:"fixed",top:0,right:0,bottom:0,left:0,zIndex:999,overflowX:"hidden","-webkit-overflow-scrolling":"touch","& $innerOverlay":{display:"flex",width:"100%",minHeight:"100%",boxSizing:"border-box"}},innerOverlay:{},sideBar:{"& $modal":{borderRadius:0,margin:0,minHeight:"100%"}},"position-static":{},"position-left":{},"position-right":{justifyContent:"flex-end"},"position-center":{padding:[50,30]},overlay:{backgroundColor:s(N.BORDER_MAIN,.5)},modal:{backgroundColor:N.CLASSIC_WHITE,borderRadius:k.BORDER_RADIUS_LARGE,boxShadow:`0 8px 32px -8px ${s(N.FONT_MAIN,.24)}, 0 -2px 6px 0 ${s(N.FONT_MAIN,.04)}, 0 0 1px 0 ${s(N.FONT_MAIN,.15)}`,margin:"auto",position:"relative",maxWidth:"100%"},title:{fontSize:28,lineHeight:1.3,marginTop:0},titleWithCloseButton:{paddingRight:32},close:{position:"absolute"},content:{},footer:{display:"flex",gap:12},stickyFooterWrapper:{position:"sticky",bottom:0,marginTop:"auto",zIndex:1},stickyFooter:{borderTop:[1,"solid",N.BORDER_LIGHT],padding:[16,40],borderBottomLeftRadius:k.BORDER_RADIUS_LARGE,borderBottomRightRadius:k.BORDER_RADIUS_LARGE,backgroundColor:N.CLASSIC_WHITE},"buttons-left":{justifyContent:"flex-start"},"buttons-center":{justifyContent:"center"},"buttons-right":{justifyContent:"flex-end"},withoutFooter:{},withStickyFooter:{display:"flex",flexDirection:"column","& $content":{position:"relative",zIndex:1}},footerWrapper:{},l:{"& $modal":{padding:[36,40],fontSize:16,width:560,"&$withStickyFooter":{paddingBottom:0}},"& $withoutFooter":{paddingBottom:54},"& $title":{fontSize:28,marginBottom:32},"& $close":{right:27,top:22},"& $footerWrapper":{paddingTop:40},"& $stickyFooter":{paddingLeft:40,paddingRight:40,marginLeft:-40,marginRight:-40}},m:{"& $modal":{padding:[32,36],width:480,"&$withStickyFooter":{paddingBottom:0}},"& $withoutFooter":{paddingBottom:48},"& $title":{fontSize:24,marginBottom:28},"& $close":{right:23,top:18},"& $footerWrapper":{paddingTop:36},"& $stickyFooter":{paddingLeft:36,paddingRight:36,marginLeft:-36,marginRight:-36}},s:{"& $modal":{padding:[24,26],fontSize:14,width:360,"&$withStickyFooter":{paddingBottom:0}},"& $withoutFooter":{paddingBottom:40},"& $title":{fontSize:20,marginBottom:15},"& $close":{right:14,top:11},"& $footerWrapper":{paddingTop:28},"& $stickyFooter":{paddingLeft:26,paddingRight:26,marginLeft:-26,marginRight:-26}},modalWrapper:{display:"flex",width:"100%"},animationEnd:{"& $modal":{opacity:0},"& $position-center $modal":{transform:"translateY(35px)"},"& $position-right $modal":{transform:"translateX(35px)"},"& $position-left $modal":{transform:"translateX(-35px)"},"& $overlay":{opacity:0}},animationStart:{"& $modal":{opacity:1,transition:"0.15s ease",transitionProperty:"transform, opacity"},"& $position-center $modal":{transform:"translateY(0)"},"& $position-right $modal":{transform:"translateX(0)"},"& $position-left $modal":{transform:"translateX(0)"},"& $overlay":{opacity:1,transition:"opacity 0.2s ease"}},"modal-enter":{extend:"animationEnd"},"modal-enter-active":{extend:"animationStart"},"modal-exit":{extend:"animationStart"},"modal-exit-active":{extend:"animationEnd"}}),Tn={m:{width:40,height:40},icon:{width:30,height:30}},Mn=P("MoreMenu",{root:{position:"relative"},hasCircle:{},button:{display:"flex",alignItems:"center",justifyContent:"center",width:32,height:32,backgroundColor:"transparent",color:N.FONT_MEDIUM,padding:0,borderRadius:"50%",border:"none",cursor:"pointer",transition:R.defaultTransition,transitionProperty:"background-color","&$hasCircle":{backgroundColor:s(N.GREY_HOVER,.5)},"&:hover":{backgroundColor:s(N.BORDER_MAIN,.5)},"&:focus":{backgroundColor:s(N.FONT_DISABLED,.2)},"&:active, &$active":{backgroundColor:s(N.FONT_DISABLED,.5)},"&$disabled":{backgroundColor:s(N.GREY_FOCUS,.5),color:N.BORDER_MAIN}},icon:{width:30,height:30},active:{},disabled:{cursor:"default"},menu:{position:"absolute",zIndex:5,top:"100%",right:0,marginTop:6}}),Dn=P("MultiSelectInput",{root:{display:"flex",justifyContent:"center",flexDirection:"column",height:"100%",padding:[0,12],overflow:"hidden",whiteSpace:"nowrap"},placeholder:{fontSize:16,userSelect:"none"},placeholderSmall:{fontSize:12,marginBottom:2,position:"relative"},values:{width:"100%"},value:{width:"calc(100% - 64px)",overflow:"hidden",textOverflow:"ellipsis"},amount:{boxSizing:"border-box",position:"absolute",top:"calc(50% - 11px)",right:44,height:22,minWidth:22,fontSize:14,lineHeight:"16px",textAlign:"center",padding:[2,4]},indicator:{position:"absolute",top:0,right:0,height:"100%",width:36,borderRadius:6,display:"flex",alignItems:"center",justifyContent:"center"},arrow:{width:20,height:20,transition:"transform .2s ease"},arrowUp:{transform:"rotate(180deg)"},indicatorDisabled:{}});function An({value:e,isOpen:t,isDisabled:o=!1,placeholder:n="",tweakStyles:r,onToggle:l}){const s=Dn({theme:r}),d=e?.include;return i.jsxs("div",{className:s.root,onClick:()=>!o&&l(!t),children:[(void 0===d||d&&0===d.length)&&i.jsx("div",{className:s.placeholder,children:n}),void 0!==d&&d.length>0&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:a(s.placeholder,s.placeholderSmall),children:n}),i.jsxs("div",{className:s.values,children:[i.jsx("div",{className:s.value,children:d.join(", ")}),i.jsx("div",{className:s.amount,children:d.length})]})]}),i.jsx("div",{className:a(s.indicator,o&&s.indicatorDisabled),children:i.jsx("div",{className:a(s.arrow,t&&s.arrowUp),children:i.jsx(Re,{type:"chevron-down"})})})]})}const Ln=P("MultiSelect",{root:{position:"relative",boxSizing:"border-box",height:"100%",width:"100%",cursor:"pointer",fontSize:16},required:{"&:before":{content:'""',position:"absolute",left:-12,top:"50%",transform:"translate(0, -50%)",width:6,height:6,borderRadius:"50%"}},disabled:{cursor:"default"},listContainer:{position:"absolute",top:"calc(100% + 4px)",left:-1,right:-1,zIndex:2},invalid:{},open:{},full:{},left:{},right:{}}),Fn={root:{width:"100%"}};const On=P("Notification",{root:{display:"flex"},inline:{width:"fit-content"},icon:{width:20,height:20,marginRight:16,flexShrink:0},body:{flexGrow:1},title:{display:"block",fontWeight:"bold"},text:{display:"block"},content:{},s:{},m:{},l:{},withText:{},withTitle:{},error:{},info:{},warning:{},ok:{},"not-ok":{},custom:{}}),Bn=P("PhoneInputCountryList",{root:{borderRadius:k.BORDER_RADIUS_SMALL,backgroundColor:N.CLASSIC_WHITE,border:[1,"solid",N.BORDER_MAIN],boxShadow:"1px 2px 10px rgba(0, 0, 0, 0.25)",overflow:"hidden"},searchContainer:{width:"100%",height:k.CONTROL.HEIGHT,display:"flex",alignItems:"center",boxSizing:"border-box",padding:[0,8,0,16],borderBottom:[1,"solid",N.BORDER_MAIN]},icon:{width:20,height:20},searchIcon:{extend:"icon",color:N.FONT_LABEL,flexShrink:0},flagList:{maxHeight:260,padding:[10,0],...E.withScrollBar},listItem:{height:40,padding:[12,16],display:"flex",alignItems:"center",cursor:"pointer",fontSize:14,lineHeight:"20px",letterSpacing:.15,whiteSpace:"nowrap",boxSizing:"border-box"},selectedCountry:{backgroundColor:N.GREY_BACKGROUND},activeCountry:{backgroundColor:N.GREY_FOCUS},flag:{width:22,height:16,flexShrink:0},countryName:{color:N.FONT_MAIN,overflowX:"hidden",textOverflow:"ellipsis",margin:[0,8,0,12]},dialCode:{color:N.GREY_ACTIVE},emptyResult:{color:N.FONT_LABEL,padding:[6,16]}}),zn={tweakControlWrapper:{controlWrapper:{border:"none",height:"calc(var(--control-height) - 2px)"}},input:{fontSize:14,lineHeight:"20px",letterSpacing:.15}},_n=({locale:e,placeholder:o,selectedCountryCode:n,closeList:r,noMatchesLabel:l,onChange:s,tweakStyles:d})=>{const c=Bn({theme:d}),u=Ne({innerStyles:zn,tweakStyles:d,className:"tweakInput",currentComponentName:"PhoneInputCountryList"}),p=t.useMemo(()=>Z($,e),[e]),h=U(n,p),[m,y]=t.useState(""),[f,g]=t.useState(p),[C,v]=t.useState(-1!==h?h:0),x=e=>{const t=f.length-1;"Escape"!==e.code&&"Tab"!==e.code||r(),"ArrowDown"===e.code&&-1!==t&&(e.preventDefault(),v(C<t?C+1:0)),"ArrowUp"===e.code&&-1!==t&&(e.preventDefault(),v(C>0?C-1:t)),"Enter"!==e.code&&"NumpadEnter"!==e.code||(0===f.length?r():C>=0&&s(f[C],e))};return t.useEffect(()=>(document.addEventListener("keydown",x,!1),()=>{document.removeEventListener("keydown",x,!1)})),i.jsxs("div",{className:c.root,children:[i.jsxs("div",{className:c.searchContainer,children:[i.jsx("div",{className:c.searchIcon,children:i.jsx(Re,{type:"search"})}),i.jsx(ct,{value:m,placeholder:o,onChange:e=>{const t=p.filter(t=>Y(t,e)),o=t.length>0?0:-1,i=U(n,t);g(t),y(e),v(-1!==i?i:o)},tweakStyles:u,isClearable:!0,shouldFocusOnMount:!0})]}),i.jsxs("div",{className:c.flagList,children:[f.map((t,o)=>i.jsx(vt,{active:C===o,options:{block:"nearest"},children:i.jsxs("div",{className:a(c.listItem,{[c.activeCountry]:h===o,[c.selectedCountry]:C===o}),onMouseEnter:()=>v(o),onClick:e=>s(t,e),children:[i.jsx("div",{className:c.flag,children:i.jsx(hn,{countryCode:t.countryCode})}),i.jsx("div",{className:c.countryName,children:K(t,e)}),i.jsx("div",{className:c.dialCode,children:`+${t.dialCode}`})]})},t.countryCode)),0===f.length&&i.jsx("div",{className:c.emptyResult,children:l})]})]})},Pn={phoneNumber:"",dialCode:""},Wn=P("PhoneInput",{root:{width:"100%",position:"relative",boxSizing:"border-box",zIndex:0},countrySelectContainer:{position:"absolute",left:1,top:1,width:80,height:k.CONTROL.HEIGHT-2,display:"flex",alignItems:"center",justifyContent:"center",borderRight:["solid",1,N.BORDER_MAIN],transition:"border-color 0.2s ease-in",cursor:"pointer",zIndex:k.Z_INDEX.CONTROL_FOCUS+1},disabledCountrySelect:{cursor:"default"},flag:{width:22,height:16},arrow:{width:20,color:N.GREY_ACTIVE,marginLeft:8,transition:"transform .2s ease"},up:{transform:"rotate(180deg)"},invalidArrow:{color:N.RED_WARNING},focusedBorder:{},invalidBorder:{borderColor:N.RED_WARNING},inputContainer:{position:"relative",flex:1},flagListContainer:{position:"absolute",width:"100%",top:k.CONTROL.HEIGHT+6,left:-1,zIndex:3}}),Hn={tweakControlWrapper:{controlWrapper:{paddingLeft:80},label:{marginLeft:80}}},$n=P("RadioButton",{input:{appearance:"none",cursor:"pointer",borderRadius:"50%",width:18,height:18,outline:"none",transition:"0.1s all ease-in-out",margin:0,border:[1,"solid","#000"],"&:checked":{border:[5,"solid","#000"]}},label:{display:"flex",alignItems:"center",cursor:"pointer"},content:{marginLeft:8},isDisabled:{cursor:"default"},isInvalid:{}});const Vn=e=>n.isNotEmpty(e)?{width:e.clientWidth-6,transform:`translateX(${e.offsetLeft}px)`}:void 0,Gn=P("Selector",{root:{display:"flex",alignItems:"center",listStyle:"none",position:"relative"},required:{"&::before":{top:"50%",left:-12,width:6,height:6,content:'""',position:"absolute",transform:"translate(0, -50%)",borderRadius:"50%",backgroundColor:N.ORANGE_FOCUS}},invalid:{},optionWrapper:{height:"100%"},option:{display:"flex",alignItems:"center",justifyContent:"center",appearance:"none",borderRadius:0,padding:0,border:"none",cursor:"pointer",width:"100%"},active:{cursor:"default"},disabled:{cursor:"default","& $optionText":{color:N.FONT_LABEL}},optionIcon:{width:20,height:20},optionText:{},iconFromRight:{"& $option":{flexDirection:"row-reverse"}},s:{},m:{},l:{},line:{},selector:{display:"grid",gridAutoFlow:"column",gridAutoColumns:"1fr",borderRadius:k.BORDER_RADIUS_SMALL,backgroundColor:N.BORDER_LIGHT,width:"fit-content",position:"relative",border:["solid",1,"transparent"],"& $line":{content:'""',position:"absolute",left:3,height:"calc(100% - 6px)",backgroundColor:N.CLASSIC_WHITE,borderRadius:k.BORDER_RADIUS_SMALL,transition:R.defaultTransition,transitionProperty:"transform, width"},"&$invalid":{borderColor:N.RED_WARNING},"& $option":{gap:6,position:"relative",zIndex:1,height:"100%",color:N.FONT_MEDIUM,fontSize:16,transition:R.defaultTransition,transitionProperty:"color",background:"none","&$s":{padding:[4,8],fontSize:10,lineHeight:"14px"},"&$m":{padding:[14,18]},"&$l":{padding:[16,24]},"&:hover, &:focus":{color:N.FONT_MAIN},"&$active":{color:N.FONT_MAIN}}},autoWidth:{"&$selector":{gridAutoColumns:"auto","& $line":{width:"unset",transform:"unset"}}}});const Un={default:/./i,agencyName:/^[a-zA-Z\s0-9-]*$/i,surname:/^[a-zA-Z\s-]*$/i,name:/^[a-zA-Z\s-.`']*$/i,surnameRuEn:/^[a-zA-Zа-яА-Я\s-]*$/i,nameRuEn:/^[a-zA-Zа-яА-Я\s-.`']*$/i,email:/^[a-zA-Z0-9@_\-.+']*$/i,digits:/^[0-9]*$/i,docNumber:/^[a-zA-Z0-9]*$/i,benefitCert:/^[a-zA-Z0-9/]*$/i},Kn={"й":"q","ц":"w","у":"e","к":"r","е":"t","н":"y","г":"u","ш":"i","щ":"o","з":"p","х":"[","ъ":"]","ф":"a","ы":"s","в":"d","а":"f","п":"g","р":"h","о":"j","л":"k","д":"l","ж":";","э":"'","я":"z","ч":"x","с":"c","м":"v","и":"b","т":"n","ь":"m","б":",","ю":".","ё":"`"},Zn={...Kn,'"':"@"},Yn={"й":"i","ц":"ts","у":"u","к":"k","е":"e","н":"n","г":"g","ш":"sh","щ":"shch","з":"z","х":"h","ъ":"ie","ф":"f","ы":"y","в":"v","а":"a","п":"p","р":"r","о":"o","л":"l","д":"d","ж":"zh","э":"e","я":"ia","ч":"ch","с":"s","м":"m","и":"i","т":"t","ь":"","б":"b","ю":"iu","ё":"e"},qn=(e,t,o,n)=>e.split("").map(e=>{if(t.test(e))return e;if(!n)return"";const i=o[e.toLowerCase()]??e,r=e.toUpperCase()===e?i.toUpperCase():i;return t.test(r)?r:""}).join(""),Xn=t.forwardRef(function({value:e="",smartType:o="default",regExp:r,maxLength:a,isUpperCase:l=!1,isTransliterationEnabled:s=!0,onChange:d,...c},u){const p=t.useRef(null),h=ve([u,p]),m=r||Un[o],y=e=>l?e.toUpperCase():e,f=(e,t)=>{const o=p.current;n.isNotEmpty(o)&&"email"!==o.type&&(o.value=t,o.setSelectionRange(e,e))};return i.jsx(ct,{...c,ref:h,value:e,maxLength:a,onPaste:async t=>{t.preventDefault();const o=t.clipboardData.getData("text/plain").split("").join(""),i=t.currentTarget,r=i.selectionStart??0,l=i.selectionEnd??0,c=m.test(o);let u=c?o:qn(o,m,Yn,s);const p=u.length+e.length-(l-r);n.isNotEmpty(a)&&a>=0&&p>a&&(u=u.substring(0,u.length-(p-a)));const h=y(`${e.substring(0,r)}${u}${e.substring(l)}`);d(h,{rawValue:o,isValid:c},t),f(r+u.length,h)},onChange:async(t,i)=>{const r=m.test(t),a=y(r?t:qn(t,m,"email"===o?Zn:Kn,s));d(a,{rawValue:t,isValid:r},i);const l=p.current;if(n.isNotEmpty(l)){const t=l.selectionStart;f(n.isEmpty(t)||a!==e?t:t-1,a)}}})}),Jn=P("Status",{root:{display:"inline-flex",verticalAlign:"middle",color:"var(--status-color)",backgroundColor:"var(--status-background)",width:"max-content",alignItems:"center","& > *":{flexShrink:0}},icon:{"& > div":{display:"inline-block"}},iconLeft:{order:-1},text:{},badge:{color:N.CLASSIC_WHITE,backgroundColor:"var(--status-color)"},xs:{padding:[2,4],gap:4,borderRadius:2,fontSize:12,lineHeight:"16px",letterSpacing:.24,fontWeight:"bold","& $icon":{width:16,height:16},"& $badge":{padding:[0,2],marginRight:-1,borderRadius:4}},s:{padding:[3,8,5,8],gap:4,borderRadius:6,fontSize:13,lineHeight:"16px",letterSpacing:.2,fontWeight:"bold","& $text":{},"& $icon":{width:16,height:16},"& $badge":{padding:[0,4,2,4],margin:[0,-4,-2,0],borderRadius:4}},m:{padding:[7,12],gap:4,borderRadius:6,fontSize:15,lineHeight:"18px",letterSpacing:.15,fontWeight:"bold","& $text":{},"& $icon":{width:18,height:18},"& $badge":{padding:[2,4],margin:[-2,-7,-2,0],borderRadius:4}},custom:{}}),Qn=P("Switch",{root:{display:"flex",alignItems:"center",cursor:"pointer","--switch-width":"36px","--switch-height":"20px","--switch-toggle-width":"16px","--switch-toggle-height":"16px","--switch-toggle-padding":"calc((var(--switch-height) - var(--switch-toggle-height)) / 2)","--switch-label-gap":"12px"},primary:{},secondary:{},invalid:{},disabled:{pointerEvents:"none",cursor:"default"},checked:{"& $switch::before":{left:"calc(var(--switch-width) - var(--switch-toggle-width) - var(--switch-toggle-padding))"}},switch:{position:"relative",flexShrink:0,display:"block",width:"var(--switch-width)",height:"var(--switch-height)",borderRadius:"calc(infinity * 1px)",boxSizing:"border-box",transition:R.defaultTransition,transitionProperty:"opacity, background-color",backgroundColor:"#333","&::before":{content:'""',position:"absolute",top:"var(--switch-toggle-padding)",left:"var(--switch-toggle-padding)",width:"var(--switch-toggle-width)",height:"var(--switch-toggle-height)",right:"auto",display:"block",backgroundColor:"#fff",borderRadius:"calc(infinity * 1px)",zIndex:1,transition:R.defaultTransition,transitionProperty:"left, background-color"}},input:{display:"none"},label:{transition:R.defaultTransition,transitionProperty:"opacity, color"},labelLeft:{order:-1,marginRight:"var(--switch-label-gap)"},labelRight:{marginLeft:"var(--switch-label-gap)"}}),ei=P("TextArea",{root:{width:"100%"},textarea:{...E.withScrollBar,width:"100%",height:"100%",fontFamily:"inherit",fontSize:16,padding:[14,0,8,"var(--control-padding)"],scrollPadding:"14px 0 8px var(--control-padding)",scrollbarGutter:"stable",boxSizing:"border-box",outline:"none",outlineStyle:"none",transition:R.defaultTransition,transitionProperty:"background-color",border:"none",resize:"none",background:"transparent","&::placeholder":{opacity:1},MozAppearance:"textfield","&::-webkit-inner-spin-button,&::-webkit-outer-spin-button":{WebkitAppearance:"none",margin:0}},wrapper:{width:"100%"},autoSized:{display:"grid",gridTemplateRows:"minmax(0, 100%)","& > $textarea, &::after":{gridArea:"1 / 1"},"&::after":{extend:"textarea",content:'attr(data-value) " "',overflowWrap:"break-word",whiteSpace:"pre-wrap",visibility:"hidden"}},symbolsCount:{textAlign:"right",marginTop:4,fontSize:12,marginLeft:"auto",whiteSpace:"nowrap",pointerEvents:"none"},symbolsCountError:{color:"red"},symbolsCountActive:{},"counter-default":{},withLabel:{}}),ti=t.forwardRef(function({value:e="",placeholder:o,name:r,counterPosition:l="default",shouldFocusOnMount:s,hasCounter:d=!0,shouldTrimAfterMaxLength:c,isAutoSized:u=!0,shouldAlwaysShowPlaceholder:p,isActive:h,maxLength:m,rows:y,data:f,testId:g,tweakStyles:C,onChange:v,onPaste:x,onFocus:b,onBlur:w,infoMessage:S,errorMessage:N,label:k,isDisabled:E,isInvalid:R,isRequired:I,size:j,groupPlacement:T,...M},D){const A=ei({theme:C}),L=d&&n.isNotEmpty(m),F=`${e.length} / ${m}`,O=Ne({tweakStyles:C,className:"tweakWithMessages",currentComponentName:"TextArea"}),B=Ne({tweakStyles:C,className:"tweakControlWrapper",currentComponentName:"TextArea"}),[z,_]=t.useState(!1),P=z||h,W=n.isArrayLikeNotEmpty(e),H=n.isReactNodeNotEmpty(k),$=(!H||P||p)&&n.isStringNotEmpty(o);return i.jsx("div",{className:a(A.root,n.isNotEmpty(j)&&A[j]),style:{"--counter-length":F.length},children:i.jsx(tt,{errorMessage:N,infoMessage:S,tweakStyles:O,testId:n.getTestId(g,"wrapper"),children:i.jsx(lt,{label:k,tweakStyles:B,isFocused:P,isDisabled:E,hasValue:W,isInvalid:R,isRequired:I,groupPlacement:T,size:j,isFullWidth:!0,children:i.jsxs("div",{className:a(A.wrapper,{[A.autoSized]:u,[A.withLabel]:H}),...u&&{"data-value":e},children:[i.jsx("textarea",{ref:D,className:A.textarea,value:e,disabled:E,placeholder:$?o:void 0,maxLength:c?m:void 0,name:r,rows:y,onPaste:x,onFocus:e=>{_(!0),b?.(e)},onBlur:e=>{_(!1),w?.(e)},onChange:e=>{v(e.currentTarget.value,e)},autoFocus:s,...n.addDataAttributes(f,g),...M}),L&&i.jsx("span",{className:a(A.symbolsCount,A[`counter-${l}`],{[A.symbolsCountError]:e.length>m,[A.symbolsCountActive]:P||W}),...n.addDataAttributes({counterPosition:l}),children:F})]})})})})}),oi=P("TextButton",{root:{display:"flex",alignItems:"center",height:24,padding:0,position:"relative",background:"transparent",border:"none",borderRadius:0,cursor:"pointer",outline:"none",transition:R.defaultTransition,transitionProperty:"color","&[disabled]":{cursor:"default",pointerEvents:"none"}},xl:{fontSize:16,"& $content":{gap:14}},l:{fontSize:14,letterSpacing:"0.15px","& $content":{gap:10,"&$reverseContent":{gap:6}}},primary:{},secondary:{},custom:{},active:{},disabled:{},bold:{fontWeight:"bold"},iconContainer:{display:"flex",alignItems:"center",justifyContent:"center"},circle:{width:24,height:24,borderRadius:"50%",transition:R.defaultTransition,transitionProperty:["background","color"]},icon:{width:20,height:20},content:{display:"flex",alignItems:"center",height:"100%"},reverseContent:{flexDirection:"row-reverse"},loader:{display:"none",height:8,position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)"},loading:{"& $content":{visibility:"hidden"},"& $loader":{display:"block"}}}),ni={tweakDotsPreloader:{fadedDot:{width:6,height:6}},logo:{width:24,height:24},default:{width:24,height:24}},ii=t.forwardRef(function({children:e,icon:t,view:o="primary",isDisabled:r=!1,isBold:l=!1,isLoading:s=!1,isActive:d=!1,hasCircleUnderIcon:c=!1,size:u="l",iconPosition:p="left",preloaderType:h="dots",type:m="button",testId:y,tweakStyles:f,data:g,onClick:C,...v},x){const b=oi({theme:f}),w=Ne({innerStyles:ni,tweakStyles:f,className:"tweakPreloader",currentComponentName:"TextButton"}),S=r||s;return i.jsxs("button",{ref:x,type:m,className:a(b.root,b[u],b[o],{[b.bold]:l,[b.loading]:s,[b.active]:d,[b.disabled]:r}),disabled:S,onClick:S?void 0:C,...v,...n.addDataAttributes(g,y),children:[i.jsxs("span",{className:a(b.content,"right"===p&&b.reverseContent),children:[n.isReactNodeNotEmpty(t)&&i.jsx("span",{className:a(b.iconContainer,c&&b.circle),children:i.jsx("span",{className:b.icon,children:Ie(t)})}),e]}),s&&i.jsx("span",{className:b.loader,children:i.jsx(Ge,{type:h,useCurrentColor:!0,tweakStyles:w})})]})}),ri=P("TextWithInfo",{root:{display:"inline-block",height:40,padding:[0,18],borderRadius:20,boxSizing:"border-box",color:N.FONT_MEDIUM,"&:hover":{backgroundColor:N.GREY_FOCUS}},container:{display:"flex",height:"100%",alignItems:"center"},selected:{backgroundColor:N.GREY_FOCUS},text:{cursor:"pointer",fontSize:16},info:{width:20,marginLeft:4,color:N.FONT_DISABLED,cursor:"pointer",borderRadius:"50%","&:link":{color:N.FONT_DISABLED},"&:hover":{color:N.CLASSIC_WHITE,backgroundColor:N.FONT_DISABLED},"&:visited":{color:N.FONT_DISABLED,"&:hover":{color:N.CLASSIC_WHITE,backgroundColor:N.FONT_DISABLED}}}}),ai=P("Toaster",{root:{borderRadius:8,position:"relative",background:N.CLASSIC_WHITE,padding:[20,40,20,20],display:"flex"},iconContainer:{width:20,height:20,flexShrink:0,marginRight:16},error:{color:N.RED_WARNING},info:{},warning:{color:N.ORANGE_FOCUS},ok:{color:N.GREEN_FOCUS},"not-ok":{color:N.FONT_LABEL},text:{},title:{},content:{"&:not(:first-child):not(:empty)":{marginTop:16}},close:{position:"absolute",top:12,right:12,width:32,height:32}}),li=P("NewMoreMenu",{hasCircle:{},button:{display:"flex",alignItems:"center",justifyContent:"center",width:32,height:32,backgroundColor:"transparent",color:N.FONT_MEDIUM,padding:0,borderRadius:"50%",border:"none",cursor:"pointer",transition:R.defaultTransition,transitionProperty:"background-color"},icon:{width:30,height:30},active:{},disabled:{cursor:"default"}}),si={popup:{zIndex:9999}};e.rgba=s,e.AccountInfo=({data:e,testId:o,avatar:l,tweakStyles:s,accountName:d,options:c})=>{const u=Be({theme:s}),p=Ne({tweakStyles:s,className:"tweakList",currentComponentName:"AccountInfo"}),h=t.useRef(null),m=t.useRef(null),[y,f]=t.useState(!1),g=e=>{e.stopPropagation(),f(e=>!e)};return we(m,()=>f(!1),h),i.jsxs("div",{className:u.root,...n.addDataAttributes(e,o),children:[l??i.jsx("div",{className:u.avatarIcon,children:i.jsx(Re,{type:"avatar"})}),i.jsxs("div",{ref:h,className:u.account,onClick:g,children:[i.jsx("div",{className:a(u.accountName,y&&u.accountNameOpened),children:d}),i.jsx("div",{className:a(u.accountChevron,y&&u.accountChevronOpened),children:i.jsx(Re,{type:"chevron-down-small"})}),i.jsx(r.CSSTransition,{in:y,timeout:150,unmountOnExit:!0,classNames:{enter:u["slide-up-enter"],enterActive:u["slide-up-enter-active"],exit:u["slide-up-exit"],exitActive:u["slide-up-exit-active"]},children:i.jsx("div",{ref:m,className:u.accountMenu,onClick:g,children:i.jsx(Oe,{items:c,tweakStyles:p})})})]})]})},e.AddButton=({text:e,type:t="button",isDisabled:o=!1,onClick:r,isFullWidth:l=!1,data:s,testId:d,tweakStyles:c})=>{const u=ze({theme:c});return i.jsxs("button",{type:t,className:a(u.root,o&&u.disabled,l&&u.fullWidth),onClick:o?void 0:r,disabled:o,...n.addDataAttributes(s,d),children:[i.jsx("div",{className:u.icon,children:i.jsx(Re,{type:"plus"})}),i.jsx("div",{children:e})]})},e.Button=Ye,e.Checkbox=Xe,e.CloseButton=({tweakStyles:e,testId:t,data:o,icon:r="close",onClose:a})=>{const l=Je({theme:e});return i.jsx("button",{type:"button",className:l.root,onClick:a,...n.addDataAttributes(o,t),children:i.jsx(Re,{type:r})})},e.ControlWrapper=lt,e.CssBaseline=({data:e,testId:t,tweakStyles:o})=>{const r=Qe({theme:o});return i.jsx("div",{className:r.root,...n.addDataAttributes(e,t)})},e.DEFAULT_PHONE_MASK=Q,e.DOC_ACTIONS_VIEWS=["neutral","inverse"],e.DateInput=mt,e.DatePicker=Kt,e.Description=({text:e,moreTitle:o,lessTitle:r,truncateIndex:a=150,isAlwaysOpen:l=!0,testId:s,data:d,tweakStyles:c})=>{const u=Yt({theme:c}),p=e.length<a,[h,m]=t.useState(l),y=e.match(Zt),f=y&&y[0],g=e.replace(Zt,""),C=e.slice(0,e.slice(0,a).lastIndexOf(" "));return i.jsxs("div",{className:u.root,...n.addDataAttributes(d,s),children:[l||h||p?i.jsxs("div",{children:[i.jsxs("span",{children:[g," "]}),!!f&&i.jsx("a",{className:u.link,href:f,target:"_blank",rel:"noopener noreferrer",children:f})]}):i.jsx("div",{children:i.jsx("span",{children:C})}),l||p?void 0:i.jsx("div",{className:u.button,onClick:()=>m(!h),children:h?r:o})]})},e.DocActions=kn,e.EMPTY_DATE_INPUT_VALUE=ut,e.EMPTY_DATE_RANGE_INPUT_VALUE=pt,e.FileInput=Jt,e.FileItem=({fileInfo:e,icon:t=so(e),metadata:o,actions:r,error:l,info:s,isDisabled:d=!1,areActionsDisabled:c=!1,isLoading:u=!1,shouldShowSize:p=!1,itemSize:h="m",preloaderType:m="default",removeIcon:y="trash-can",onRemove:f,onClick:g,testId:v,data:x,tweakStyles:b})=>{const w=co({theme:b}),S=Ne({tweakStyles:b,className:"tweakRemoveIconButton",currentComponentName:"FileItem"}),N=Ne({innerStyles:uo,tweakStyles:b,className:"tweakPreloader",currentComponentName:"FileItem"}),k=Ne({tweakStyles:b,className:"tweakTooltip",currentComponentName:"FileItem"}),{name:E,size:R}=e,I=n.isFunction(f);return i.jsxs("div",{className:w.root,children:[i.jsxs("div",{className:a(w.fileItemWrapper,w[h],{[w.disabled]:d}),...n.addDataAttributes(x,v),...n.addClickHandler(e=>{e.stopPropagation(),g?.(e)},!d),children:[i.jsx("div",{className:w.fileIcon,children:Ie(t)}),i.jsxs("div",{className:w.fileNameContainer,children:[i.jsx(io,{tooltipText:E,tooltipView:"hint",tweakStyles:k,children:i.jsx("div",{className:w.fileName,children:E})}),i.jsxs("div",{className:w.metadata,children:[o,p&&n.isNotEmpty(R)&&i.jsx("div",{className:w.fileSize,children:C.filesize(R)})]})]}),i.jsxs("div",{className:w.actions,children:[u?i.jsx("div",{className:a(w.preloader,w[`preloader-${m}`]),children:i.jsx(Ge,{type:m,tweakStyles:N,useCurrentColor:!0})}):I&&i.jsx(eo,{icon:y,onClick:e=>{e.stopPropagation(),f?.(e)},isDisabled:c,tweakStyles:S}),r]})]}),i.jsxs("div",{className:w.footer,children:[n.isReactNodeNotEmpty(l)&&i.jsx("div",{className:w.error,children:l}),n.isReactNodeNotEmpty(s)&&i.jsx("div",{className:w.info,children:s})]})]})},e.Filter=en,e.FilterInterval=Io,e.FilterMultiSelect=Oo,e.FilterSelect=Po,e.FilterValueView=ln,e.FilterWithDates=Zo,e.FilterWithPeriod=Xo,e.FilterWrapper=cn,e.FiltersPane=function({data:e,tweakStyles:o,filtersConfig:r,enabledFilters:a,values:l={},localeKey:s,locale:d,search:c,isDisabled:u=!1,hasClearButton:p=!0,shouldRenderDataId:h=!1,settingsIcon:m="filter",testId:y,onChangeFilters:f,onSettingsButtonClick:g,onClear:C}){const v=wo({theme:o}),x=Ne({innerStyles:So,tweakStyles:o,className:"tweakClearButton",currentComponentName:"FiltersPane"}),b=Ne({tweakStyles:o,className:"tweakFilterWrapper",currentComponentName:"FiltersPane"}),w=t.useMemo(()=>go(s,d),[s,d]),S=a??Object.keys(r),N=p&&(n.isNotEmpty(c)||S.some(e=>n.isNotEmpty(r[e]))),k=i.jsx("div",{className:v.clear,children:i.jsx(Ye,{onClick:()=>{n.isNotEmpty(C)?C():(f({}),void 0!==c&&c.onChange({}))},size:"s",view:"text",isDisabled:u,testId:n.getTestId(y,"clear-button"),tweakStyles:x,children:w.clear})});return i.jsxs("div",{className:v.root,...n.addDataAttributes(e,y),children:[void 0!==g&&i.jsx("div",{className:v.settings,tabIndex:0,...n.addDataTestId(y,"settings-button"),onClick:u?void 0:g,children:i.jsx("div",{className:v.settingsIcon,children:Ie(m)})}),void 0!==c&&i.jsx(rn,{...c,locale:go(c.localeKey??s,c.locale,d),localeKey:c.localeKey??s,isDisabled:c.isDisabled??u,testId:n.getTestId(y,"search")}),S.map((e,t)=>{const o=t===S.length-1,a=String(e),c=l[a],p=r[a];if(void 0===p)return console.error(`enabledFilters содержит фильтр ${a}, не описанный в конфиге`),o?k:null;const m=i.jsx(cn,{filter:p,locale:d,localeKey:s,onChange:e=>f({...l,[a]:e}),value:c,isDisabled:u||p?.requiredFilledFilters?.some(e=>!l[e]),tweakStyles:b,data:h?{id:a}:void 0,testId:n.getTestId(y,`filter-${a}`)},a);return o?i.jsxs("div",{className:v.filterWithClearButton,children:[m,N&&i.jsx(i.Fragment,{children:k})]},a):m})]})},e.FiltersPaneSearch=rn,e.Flag=hn,e.FlexibleTable=function({content:e,headerContent:o,config:r,enabledColumns:l,activeRows:s,uniqueField:d,isLoading:c=!1,isFirstColumnSticky:u=!1,isHorizontallyScrollable:p=!1,isRowFocusable:h=!1,infinityScrollConfig:m,renderMode:y="table",refForScroll:f,nothingFoundContent:g,data:C,testId:v,tweakStyles:x,shouldRenderHeader:b=!0,onHeadClick:w,isExpandableRowComponentInitiallyOpen:S,...N}){const k=vn({theme:x}),E=Ne({tweakStyles:x,className:"tweakTableRow",currentComponentName:"FlexibleTable"}),R=t.useRef(null),I=t.useMemo(()=>l??Object.keys(r),[l,r]),j=(e,t)=>({...N,item:e,renderMode:y,config:r,columns:I,uniqueField:d,isLoading:c,isFirstColumnSticky:u,isFocusable:h,tweakStyles:E,isExpandableRowComponentInitiallyOpen:n.applyAction(S,e,t)}),T=t.useCallback((e,t)=>o=>{p&&n.isNotEmpty(o)&&t(o)?o.dataset[e]="true":o?.removeAttribute(`data-${e}`)},[p]),M=t.useMemo(()=>T("scrollable",gn),[T]),D=t.useMemo(()=>T("scrolled",e=>e.scrollLeft>0),[T]),A=ve([f,R,M,D]),L=m&&{isLoading:m.isLoading,onInfinityScroll:()=>m.onInfinityScroll((m.activePage??0)+1),isEnabled:m.isEnabled??!m.isLastPage},F=ge({isDisabled:!L?.isEnabled||L.isLoading,onIntersection:L?.onInfinityScroll}),O=n.isReactNodeNotEmpty(g)&&!n.isArrayNotEmpty(e)&&!L?.isLoading&&!L?.isEnabled;t.useEffect(()=>{const e=R.current;if(n.isEmpty(e)||!p)return;const t=()=>{D(e)},o=()=>{M(e)};return e.addEventListener("scroll",t),window.addEventListener("resize",o),()=>{e.removeEventListener("scroll",t),window.removeEventListener("resize",o)}},[R,p,D,M]);const B=t.useMemo(()=>new Set(s),[s]),z=mn[y];return i.jsx("div",{ref:A,className:a(k.flexibleTableWrapper,{[k.scroll]:p}),children:i.jsxs(z.Root,{className:k.root,...n.addDataAttributes({...C,isLoading:c},v),children:[b&&i.jsx(z.Head,{className:k.head,children:i.jsx(z.Row,{className:k.headerRow,children:I.map((e,t)=>{const{position:l,minWidth:s,width:d,maxWidth:c,titleAlign:p="left",right:h,left:m,title:y="",shouldRenderDataId:f}=r?.[e]??{},g="sticky"===l||u&&0===t;return i.jsx(z.Header,{className:a(k.header,{[k.headerSticky]:g,[k.headerSecond]:u&&1===t}),style:{minWidth:s,width:d,maxWidth:c,textAlign:p,position:g?"sticky":l,right:h,left:m},onClick:n.isNotEmpty(w)?()=>w(e):void 0,...n.addDataAttributes({id:f?e:void 0}),children:n.applyAction(y,{value:o?.[e]})},e)})})}),i.jsx(z.Body,{className:k.body,children:c?n.indexMap(6,e=>t.createElement(Sn,{...j({},e),key:e})):i.jsxs(i.Fragment,{children:[O&&i.jsx(z.Row,{className:k.nothingFoundRow,children:i.jsx(z.Cell,{className:k.nothingFound,colSpan:I.length,children:g})}),e.map((e,o)=>t.createElement(Sn,{...j(e,o),isActive:B.has(o),key:n.isNotEmpty(d)?e[d]:o})),L?.isEnabled&&i.jsx(z.Row,{className:k.loaderRow,children:i.jsx(z.Cell,{className:k.loaderCell,colSpan:I.length,children:i.jsx("div",{ref:F,className:k.loader,children:i.jsx(Ge,{type:"dots",testId:n.getTestId(v,"loader")})})})})]})})]})})},e.FloatDocActions=({isOpen:e,children:t,...o})=>{const n=En();return i.jsx(r.CSSTransition,{in:e,timeout:150,mountOnEnter:!0,unmountOnExit:!0,classNames:{enter:n["slide-up-enter"],enterActive:n["slide-up-enter-active"],exit:n["slide-up-exit"],exitActive:n["slide-up-exit-active"]},children:i.jsx(kn,{...o,children:t})})},e.GROUP_PLACEMENTS=["left","right","middle","top","bottom","top-left","top-right","bottom-left","bottom-right"],e.Icon=Re,e.IconButton=eo,e.IncrementInput=({value:e,onChange:o,min:r,max:l,step:s=1,intPartPrecision:d,tweakStyles:c,isDisabled:u,isReadonly:p,isInvalid:h,...m})=>{const y=Ne({innerStyles:Rn,tweakStyles:c,className:"tweakInput",currentComponentName:"IncrementInput"}),f=In({theme:c}),g=u||p,C=g||n.isNotEmpty(d)&&he((e??0)+s)>d||n.isNotEmpty(l)&&n.isNotEmpty(e)&&e>=l,v=g||n.isNotEmpty(r)&&n.isNotEmpty(e)&&e<=r;return t.useEffect(()=>{n.isNumberInteger(s)||console.error("Параметр step должен быть целым числом")},[s]),i.jsx(bo,{...m,isInvalid:h,isDisabled:u,isReadonly:p,min:r,max:l,intPartPrecision:d,onChange:o,value:e,tweakStyles:y,children:i.jsxs("div",{className:f.buttons,children:[i.jsx("button",{className:a(f.button,{[f.disabledButton]:C,[f.errorButton]:h}),type:"button",disabled:C,onClick:()=>{o(ae((e??0)+s,r,l))},children:i.jsx("div",{className:f.icon,children:i.jsx(Re,{type:"plus"})})}),i.jsx("button",{className:a(f.button,{[f.disabledButton]:v,[f.errorButton]:h}),type:"button",disabled:v,onClick:()=>{o(ae((e??0)-s,r,l))},children:i.jsx("div",{className:f.icon,children:i.jsx(Re,{type:"minus"})})})]})})},e.Input=ct,e.InputBase=dt,e.List=Oe,e.ListItem=Ae,e.Modal=({data:e,tweakStyles:o,title:l,size:s="l",isFooterSticky:d=!1,footer:c,buttons:u,buttonsAlign:p="right",hasCloseButton:h=!0,hasOverlay:m=!0,isOpen:y=!1,position:f="center",children:g,zIndex:C,testId:v,shouldCloseOnOverlayClick:x=!0,shouldCloseOnEsc:w=!0,shouldBlockScroll:S=!0,timeout:N=150,unmountOnExit:k=!0,onClose:E,...R})=>{const I=jn({theme:o}),j=Ne({innerStyles:Tn,tweakStyles:o,className:"tweakCloseButton",currentComponentName:"Modal"}),[T,M]=t.useState(!1),D=R.in??y,A=n.isReactNodeNotEmpty(c)||n.isArrayNotEmpty(u),L=t.useRef(null),F=t.useCallback(e=>{"Escape"===e.code&&void 0!==E&&E()},[E]);return t.useEffect(()=>w&&void 0!==E&&D?(document.addEventListener("keydown",F),()=>document.removeEventListener("keydown",F)):()=>null,[w,E,D,F]),i.jsx(r.CSSTransition,{in:D,timeout:N,unmountOnExit:k,classNames:{enter:I["modal-enter"],enterActive:I["modal-enter-active"],exit:I["modal-exit"],exitActive:I["modal-exit-active"]},...R,children:i.jsx("div",{className:I.modalWrapper,children:i.jsx(b.RemoveScroll,{enabled:S,forwardProps:!0,children:i.jsx("div",{className:a(I.root,I[s],{[I.overlay]:"static"!==f&&m,[I.sideBar]:"left"===f||"right"===f,[I.fixedPosition]:"static"!==f}),style:{zIndex:C},...n.addDataAttributes(e,v),children:i.jsx("div",{ref:L,className:a(I.innerOverlay,I[`position-${f}`]),onMouseDown:x?e=>{void 0!==E&&e.target===L.current&&M(!0)}:void 0,onMouseUp:x?e=>{void 0!==E&&(e.target===L.current&&T&&E(),M(!1))}:void 0,children:i.jsxs("div",{className:a(I.modal,{[I.withoutFooter]:!A,[I.withStickyFooter]:d}),children:[h&&i.jsx("div",{className:I.close,children:i.jsx(eo,{testId:n.getTestId(v,"close-button"),tweakStyles:j,view:"cancel-light",icon:"close",onClick:E})}),n.isReactNodeNotEmpty(l)&&i.jsx("h3",{className:a(I.title,{[I.titleWithCloseButton]:h}),children:l}),n.isReactNodeNotEmpty(g)&&i.jsx("div",{className:I.content,children:g}),A&&i.jsx("div",{className:a(I.footerWrapper,{[I.stickyFooterWrapper]:d}),children:i.jsx("div",{className:a(I.footer,I[`buttons-${p}`],{[I.stickyFooter]:d}),children:n.isReactNodeNotEmpty(c)?c:u})})]})})})})})})},e.MoreMenu=({items:e,isDisabled:o=!1,hasDefaultStateBackground:r=!0,data:l,testId:s,tweakStyles:d,onMenuOpen:c,onMenuClose:u})=>{const p=Mn({theme:d}),h=Ne({tweakStyles:d,className:"tweakList",currentComponentName:"MoreMenu"}),[m,y]=t.useState(!1),f=t.useRef(null),g=t.useRef(null),C=o||0===e.length,v=()=>{y(!1),u?.()};return we(f,v,g),i.jsxs("div",{className:p.root,children:[i.jsx("button",{ref:g,className:a(p.button,{[p.hasCircle]:r,[p.disabled]:C,[p.active]:m}),onClick:C?void 0:e=>{const t=!m;e.stopPropagation(),y(t),t?c?.():u?.()},...n.addDataAttributes(l,s),children:i.jsx("div",{className:p.icon,children:i.jsx(Re,{type:"menu"})})}),m&&!C&&i.jsx("div",{className:p.menu,ref:f,children:i.jsx(Oe,{items:e,testId:n.getTestId(s,"list"),tweakStyles:h,onClick:v})})]})},e.MultiSelect=function({value:e,corners:o="full",isInvalid:r=!1,isRequired:l=!1,isDisabled:s=!1,placeholder:d="",localeKey:c,locale:u,testId:p,data:h,onChange:m,fetchOptions:y,tweakStyles:f}){const g=Ln({theme:f}),C=Ne({innerStyles:Fn,tweakStyles:f,className:"tweakMultiSelectList",currentComponentName:"MultiSelect"}),[v,x]=t.useState(!1),b=t.useRef(null),w=()=>{x(!1)};return Se(b,w,g.root),i.jsxs("div",{className:a(g.root,g[o],v&&g.open,r&&!s&&g.invalid,l&&g.required,s&&g.disabled),...n.addDataAttributes(h,p),children:[i.jsx(An,{value:e,isOpen:v,isDisabled:s,placeholder:d,onToggle:e=>x(e)}),v&&i.jsx("div",{className:g.listContainer,ref:b,children:i.jsx(Fo,{tweakStyles:C,value:e,localeKey:c,locale:u,fetchOptions:y,onChange:m,onClose:w})})]})},e.MultiSelectList=Fo,e.NewMoreMenu=({items:e,isDisabled:t=!1,hasDefaultStateBackground:o=!0,data:r,renderTrigger:l,listSize:s,testId:d,tweakStyles:c,...u})=>{const p=li({theme:c}),h=Ne({tweakStyles:c,className:"tweakWithPopup",currentComponentName:"NewMoreMenu"}),m=Ne({tweakStyles:c,className:"tweakList",currentComponentName:"NewMoreMenu"});return i.jsx(Me,{isDisabled:t||n.isArrayEmpty(e),tweakStyles:h,...u,trigger:l??(({triggerProps:e,referenceProps:t})=>i.jsx("button",{className:a(p.button,{[p.hasCircle]:o,[p.disabled]:e.isDisabled,[p.active]:e.isActive}),disabled:e.isDisabled,...n.addDataAttributes(r,d),...t,children:i.jsx("div",{className:p.icon,children:i.jsx(Re,{type:"menu"})})})),children:({onClose:t})=>i.jsx(Oe,{items:e,size:s,tweakStyles:m,onClick:t})})},e.Notification=({children:e,type:t,isFullWidth:o=!0,text:r,title:l,testId:s,size:d="s",data:c,icon:u,tweakStyles:p})=>{const h=On({theme:p}),m=n.isStringNotEmpty(r),y=n.isStringNotEmpty(l),f="custom"!==t,g=n.isReactNodeNotEmpty(u)||f;return i.jsxs("div",{className:a(h.root,h[d],h[t],{[h.inline]:!o,[h.withTitle]:y,[h.withText]:m}),...n.addDataAttributes(c,s),children:[g&&i.jsx("div",{className:h.icon,children:n.isReactNodeNotEmpty(u)?Ie(u):f&&i.jsx(Re,{type:`status-${t}`})}),i.jsxs("div",{className:h.body,children:[y&&i.jsx("span",{className:h.title,...n.addDataTestId(s,"title"),children:l}),m&&i.jsx("span",{className:h.text,...n.addDataTestId(s,"text"),children:r}),n.isReactNodeNotEmpty(e)&&i.jsx("div",{className:h.content,children:e})]})]})},e.NumberInput=bo,e.PERIODS=po,e.PERIODS_GETTERS=fo,e.PhoneInput=({locale:e="ru",value:o=Pn,onChange:r,data:l,testId:s,isDisabled:d,isInvalid:c,isActive:u,tweakStyles:p,codeSearchPlaceholder:h="Поиск",noMatchesLabel:m="Ничего не найдено",...y})=>{const f=Wn({theme:p}),g=Ne({innerStyles:Hn,tweakStyles:p,className:"tweakInput",currentComponentName:"PhoneInput"}),C=Ne({tweakStyles:p,className:"tweakCountryList",currentComponentName:"PhoneInput"}),[v,x]=t.useState(!1),[b,w]=t.useState(!1),S=t.useRef(null),N=t.useRef(null),k=t.useRef(null),E=q(o),R=t.useMemo(()=>o?.countryCode??X(E),[E,o?.countryCode]),I=()=>{x(!1)};return we(S,I,N),i.jsxs("div",{className:f.root,...n.addDataAttributes(l,s),children:[i.jsxs("div",{className:a(f.countrySelectContainer,{[f.disabledCountrySelect]:d,[f.invalidBorder]:c,[f.focusedBorder]:u||v||b}),ref:N,onClick:d?void 0:()=>x(!v),children:[i.jsx("div",{className:f.flag,children:i.jsx(hn,{countryCode:R})}),i.jsx("div",{className:a(f.arrow,{[f.up]:v,[f.invalidArrow]:c}),children:i.jsx(Re,{type:"chevron-down"})})]}),i.jsx(ct,{value:E,mask:ee(R),ref:k,isDisabled:d,isInvalid:c,isActive:v||u,testId:n.getTestId(s,"input"),tweakStyles:g,onChange:(e,t)=>{if("change"===t.type){const o=e.replace(/[^0-9]/g,"");let n=R;const i=G(R);if(void 0!==i){const e=i.fullCodes.some(e=>o.length>=e.length?o.startsWith(e):e.startsWith(o)),t=o.startsWith(i.dialCode);e&&t||(n=void 0)}r(J(o,n),t)}},onFocus:e=>{w(!0),void 0!==y.onFocus&&y?.onFocus(e)},onBlur:e=>{w(!1),void 0!==y.onBlur&&y?.onBlur(e)},...y}),v&&i.jsx("div",{className:f.flagListContainer,ref:S,children:i.jsx(_n,{selectedCountryCode:R,placeholder:h,locale:e,tweakStyles:C,noMatchesLabel:m,onChange:(e,t)=>{e.countryCode!==R&&r({phoneNumber:e.dialCode!==o.dialCode?"":J(E).phoneNumber,dialCode:e.dialCode,countryCode:e.countryCode},t),I();const n=k?.current;null!==n&&n.focus()},closeList:I})})]})},e.RadioButton=function({children:e,value:t,groupName:o,size:r,isChecked:l,isDisabled:s=!1,isInvalid:d=!1,data:c,testId:u,tweakStyles:p,onChange:h}){const m=$n({theme:p});return i.jsxs("label",{className:a(m.label,n.isNotEmpty(r)&&m[r],{[m.isDisabled]:s}),htmlFor:`${o}--${t}`,...n.addDataAttributes(c,u),children:[i.jsx("input",{id:`${o}--${t}`,type:"radio",value:t,name:o,checked:l,disabled:s,onChange:e=>h(e.target.value),className:a(m.input,{[m.isDisabled]:s,[m.isInvalid]:d})}),n.isReactNodeNotEmpty(e)&&i.jsx("span",{className:m.content,children:e})]})},e.SLIDE_UP_ANIMATION_DURATION=150,e.ScrollIntoViewIfNeeded=vt,e.SearchInput=gt,e.Select=Bt,e.SelectList=Et,e.Selector=function({options:e,value:o,isDisabled:r=!1,isRequired:l=!1,isInvalid:s=!1,hasSameOptionsWidth:d=!0,iconPosition:c="left",size:u="l",testId:p,data:h,tweakStyles:m,onChange:y}){const f=Gn({theme:m}),g=e.map(e=>e.value),[C,v]=t.useState([]),x=t.useRef(null);n.hasDuplicates(g)&&console.error("Selector: Значения options.value должны быть уникальными"),t.useEffect(()=>{const e=x.current;null!==e&&v([...e.querySelectorAll(`.${f.optionWrapper}`)])},[e,u]);const b=n.isNotEmpty(o)?C[g.indexOf(o)]:void 0;return i.jsxs("div",{className:a(f.root,f.selector,{[f.iconFromRight]:"right"===c,[f.invalid]:s,[f.required]:l,[f.autoWidth]:d}),ref:x,...n.addDataAttributes(h,p),children:[n.isNotEmpty(b)&&i.jsx("div",{className:f.line,style:Vn(b)}),e.map(e=>{const t=e.value.toString(),l=e.isDisabled??r,s=e.value===o;return i.jsx("div",{className:f.optionWrapper,children:i.jsxs("button",{type:"button",className:a(f.option,f[u],{[f.active]:s,[f.disabled]:l}),disabled:l,onClick:l?void 0:()=>y(e.value),...n.addDataTestId(p,t),children:[n.isReactNodeNotEmpty(e.icon)&&i.jsx("div",{className:f.optionIcon,children:Ie(e.icon)}),i.jsx("div",{className:f.optionText,children:e.label})]})},t)})]})},e.Skeleton=fn,e.SmartInput=Xn,e.Status=({children:e,color:t,size:o="s",icon:r,iconPosition:l="right",badge:s,tweakStyles:d,testId:c,data:u})=>{const p=Jn({theme:d});return i.jsxs("span",{className:a(p.root,p[o],p[t]),...n.addDataAttributes(u,c),children:[n.isReactNodeNotEmpty(e)&&i.jsx("span",{className:p.text,children:e}),n.isReactNodeNotEmpty(r)&&i.jsx("span",{className:a(p.icon,"left"===l&&p.iconLeft),children:Ie(r)}),n.isReactNodeNotEmpty(s)&&i.jsx("span",{className:p.badge,children:s})]})},e.Switch=({isDisabled:e=!1,isChecked:t=!1,isInvalid:o=!1,value:r,children:l,labelPosition:s="right",color:d="primary",size:c,data:u,tweakStyles:p,testId:h,onChange:m})=>{const y=Qn({theme:p});return i.jsxs("label",{className:a(y.root,y[d],n.isNotEmpty(c)&&y[c],{[y.disabled]:e,[y.checked]:t,[y.invalid]:o}),...n.addDataAttributes(u,h),children:[i.jsx("span",{className:y.switch,children:i.jsx("input",{type:"checkbox",name:r,className:y.input,onChange:e?void 0:()=>m({name:r,isEnabled:!t}),checked:t,disabled:e,...n.addDataTestId(h,"input")})}),n.isReactNodeNotEmpty(l)&&i.jsx("span",{className:a(y.label,y["left"===s?"labelLeft":"labelRight"]),children:l})]})},e.TextArea=ti,e.TextButton=ii,e.TextWithInfo=({text:e,isSelected:t=!1,info:o,textTooltip:r,onClick:l,testId:s,data:d,tweakStyles:c})=>{const u=ri({theme:c});return i.jsx("div",{className:a(u.root,t&&u.selected),...n.addDataAttributes(d,s),children:i.jsxs("div",{className:u.container,children:[i.jsx("div",{className:u.text,onClick:l,children:void 0!==r?i.jsx(io,{tooltipText:r,children:e}):e}),o&&i.jsx("a",{className:u.info,href:o.link,target:"_blank",rel:"noopener noreferrer",children:void 0!==o.infoTooltip?i.jsx(io,{tooltipText:o.infoTooltip,children:i.jsx(Re,{type:"information"})}):i.jsx(Re,{type:"information"})})]})})},e.TextWithTooltip=io,e.ThemeContext=j,e.ThemeProvider=T,e.ThemedPreloader=Ge,e.Toaster=({type:e="error",title:o,text:r,children:l,timeout:s=7e3,hasCloseButton:d=!1,shouldCloseOnClick:c=!1,data:u,testId:p,tweakStyles:h,onClose:m,onTimeEnd:y})=>{const f=ai({theme:h}),g=Ne({tweakStyles:h,className:"tweakCloseButton",currentComponentName:"Toaster"});return t.useEffect(()=>{if(!Number.isFinite(s)||n.isEmpty(y))return;const e=window.setTimeout(()=>y(),s);return()=>window.clearTimeout(e)},[]),i.jsxs("div",{className:f.root,onClick:c?m:void 0,...n.addDataAttributes(u,p),children:[i.jsx("div",{className:a(f.iconContainer,f[e]),children:i.jsx(Re,{type:`status-${e}`})}),i.jsxs("div",{children:[n.isReactNodeNotEmpty(o)&&i.jsx("div",{className:f.title,children:o}),n.isReactNodeNotEmpty(r)&&i.jsx("div",{className:f.text,children:r}),n.isReactNodeNotEmpty(l)&&i.jsx("div",{className:f.content,children:l})]}),d&&n.isNotEmpty(m)&&i.jsx("div",{className:f.close,children:i.jsx(eo,{view:"cancel-light",icon:"close-window",tweakStyles:g,onClick:m})})]})},e.Tooltip=oo,e.WithMessages=tt,e.WithPopup=Me,e.WithTooltip=({children:e,eventType:t="hover",placement:o="top",tooltipText:r,tooltipView:a="tooltip",tooltipType:l="info",tooltipSize:s,isDisabled:d=!1,popupData:c,tweakStyles:u,...p})=>{const h=Ne({innerStyles:si,tweakStyles:u,className:"tweakWithPopup",currentComponentName:"WithTooltip"}),m=Ne({tweakStyles:u,className:"tweakTooltip",currentComponentName:"WithTooltip"});return i.jsx(Me,{trigger:e,placement:o,eventType:t,popupData:{...c,tooltipView:a},isDisabled:d||!n.isReactNodeNotEmpty(r),isTriggerWrapped:!0,tweakStyles:h,...p,children:i.jsx(oo,{view:a,type:l,text:r,size:s,tweakStyles:m,testId:n.getTestId(p.testId,"tooltip")})})},e.addDataAttributes=(e={})=>Object.fromEntries(Object.entries(e).map(([e,t])=>n.isString(t)&&n.isStringNotEmpty(t)||n.isNotEmpty(t)?[`data-${te(e)}`,t]:[])),e.animations=R,e.checkElementParentsClassNames=xe,e.checkSearchStringInCountry=Y,e.colors=N,e.common=I,e.convertToControlWrapperIcon=nt,e.createThemedStyles=P,e.dimensions=k,e.excludeStorybookParams=e=>new RegExp(`^(on.*|${["tweakStyles","data",...e].join("|")})$`),e.findCountryByCode=G,e.findCountryIndexByCode=U,e.formatNumber=se,e.formatStringNumber=le,e.genericMemo=me,e.getCountryCodeFromPhone=X,e.getCountryTextByLocale=K,e.getFileExtensionByFilename=ao,e.getFileIcon=so,e.getFullPhone=q,e.getMimeTypeByFilename=lo,e.getNumberInRange=ae,e.getNumberLength=he,e.getParentNode=oe,e.getPhoneMask=ee,e.getPhoneObjFromString=J,e.getScrollParent=re,e.getStyleComputedProperty=ie,e.hasExactParent=ne,e.helpers=E,e.iconsMap=ke,e.isControlWrapperIcon=ot,e.isElementOffScreen=(e,t)=>{const o=e,n=re(e),{scrollHeight:i}=n;o.hidden=!0;const{scrollHeight:r}=n;o.hidden=!1;const a=i!==r;if(a&&void 0!==t){const e=o.getBoundingClientRect(),i=n.getBoundingClientRect(),r=e.top-i.top;if(t.clientHeight+o.clientHeight>r)return!1}return a},e.isElementOneOfParents=be,e.isSpaceChar=pe,e.mimeTypes=V,e.minWidthModifier=H,e.mixStyles=D,e.phoneInfo=$,e.removeStringFormat=de,e.renderIcon=Ie,e.setCaretPosition=ue,e.sortCountriesByLocale=Z,e.stringToNumber=ce,e.transformToKebab=te,e.trimStringToMaxLength=(e,t)=>e.length>t?e.slice(0,t):e,e.useDidMountEffect=W,e.useDropdown=ye,e.useIntersectionRef=ge,e.useIsMounted=Ce,e.useLatestRef=fe,e.useMerge=(e,o)=>t.useMemo(()=>n.isNotEmpty(e)&&n.isNotEmpty(o)?n.mergeStyles(e,o):e??o,[e,o]),e.useMergedRefs=ve,e.useMixedStyles=A,e.useOnClickOutside=Se,e.useOnClickOutsideWithRef=we,e.useResizeRef=e=>{const o=fe(e),{ref:i,disconnect:r}=t.useMemo(()=>{const e=new ResizeObserver(([e])=>{const{current:t}=o;t.isDisabled||t?.onChange(e)});return{ref:t=>{e.disconnect(),n.isNotEmpty(t)&&e.observe(t)},disconnect:()=>e.disconnect()}},[o]);return t.useEffect(()=>r,[r]),i},e.useTheme=M,e.useThemeComponentStyles=L,e.useTweakStyles=Ne,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("react-jss"),require("@true-engineering/true-react-platform-helpers"),require("react/jsx-runtime"),require("react-transition-group"),require("clsx"),require("react-overlays/usePopper"),require("hex-to-rgba"),require("@floating-ui/react"),require("react-input-mask"),require("react-datepicker/dist/react-datepicker.css"),require("date-fns"),require("react-datepicker"),require("react-overlays"),require("ts-debounce"),require("scroll-into-view-if-needed"),require("date-fns/locale"),require("filesize"),require("country-flag-icons"),require("country-flag-icons/react/3x2"),require("react-remove-scroll")):"function"==typeof define&&define.amd?define(["exports","react","react-jss","@true-engineering/true-react-platform-helpers","react/jsx-runtime","react-transition-group","clsx","react-overlays/usePopper","hex-to-rgba","@floating-ui/react","react-input-mask","react-datepicker/dist/react-datepicker.css","date-fns","react-datepicker","react-overlays","ts-debounce","scroll-into-view-if-needed","date-fns/locale","filesize","country-flag-icons","country-flag-icons/react/3x2","react-remove-scroll"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).TrueReactKitUiKit={},e.React,e.reactJss,e.trueReactPlatformHelpers,e.jsxRuntime,e.reactTransitionGroup,e.clsx,e.usePopper,e.rgba,e.react$1,e.InputMask,null,e.dateFns,e.ReactDatePicker,e.reactOverlays,e.tsDebounce,e.scrollIntoViewIfNeeded,e.locale,e.filesize,e.countryFlagIcons,e.Flags,e.reactRemoveScroll)}(this,function(e,t,o,n,i,r,a,l,s,d,c,u,p,h,m,y,g,f,C,v,x,b){"use strict";function w(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const o in e)if("default"!==o){const n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:()=>e[o]})}return t.default=e,Object.freeze(t)}const S=w(x),N={FONT_MAIN:"#222a37",FONT_MEDIUM:"#505f79",FONT_LABEL:"#7a869a",FONT_DISABLED:"#95a0b3",GREY_ACTIVE:"#95a0b3",BORDER_MAIN:"#d0d6e1",BORDER_LIGHT:"#dde3ed",GREY_HOVER:"#dde3ed",GREY_FOCUS:"#eceff5",GREY_DISABLED:"#eceff5",GREY_BACKGROUND:"#f6f8fc",CLASSIC_WHITE:"#ffffff",RED_ACTIVE:"#912e34",RED_HOVER:"#c13e45",RED_WARNING:"#f14d56",RED_WARNING_LIGHT:"#ff6261",RED_BACKGROUND:"#feedee",ORANGE_BACKGROUND:"#fff4e9",GREEN_BACKGROUND:"#f4f9e6",BLUE_BACKGROUND:"#ebf1ff",GREEN_FOCUS:"#97ba1e",ORANGE_FOCUS:"#ff991f"},k={BORDER_RADIUS_LARGE:16,BORDER_RADIUS_MEDIUM:12,BORDER_RADIUS_STD:8,BORDER_RADIUS_SMALL:6,BORDER_RADIUS_EXTRA_SMALL:4,CONTROL:{HEIGHT:48,PADDING:16,ICON_SIZE:24,ICON_INNER_SIZE:24,ICON_GAP:8},Z_INDEX:{CONTROL_INVALID:1,CONTROL_FOCUS:2}},E={withAngle:(e=6,t="left",o=100)=>({display:"inline-block",position:"relative",marginTop:2*e-1,boxShadow:"0 8px 20px 0 rgba(0, 0, 0, 0.04)",border:["solid",1,N.BORDER_MAIN],borderRadius:k.BORDER_RADIUS_EXTRA_SMALL,"&:before":{content:'""',position:"absolute",top:-e,left:"left"===t&&o,right:"right"===t&&o,width:0,height:0,borderLeft:[e,"solid","transparent"],borderRight:[e,"solid","transparent"],borderBottom:[e,"solid",N.BORDER_MAIN]},"&:after":{content:'""',position:"absolute",top:1-e,left:"left"===t&&o+1,right:"right"===t&&o+1,width:0,height:0,borderLeft:[e-1,"solid","transparent"],borderRight:[e-1,"solid","transparent"],borderBottom:[e-1,"solid",N.CLASSIC_WHITE]}}),withScrollBar:{boxSizing:"border-box",overflow:"auto","@supports selector(::-webkit-scrollbar)":{"--webkit-scrollbar-width":"10px","--webkit-scrollbar-height":"10px","&::-webkit-scrollbar":{width:"var(--webkit-scrollbar-width)",height:"var(--webkit-scrollbar-height)","&-thumb":{width:6,minHeight:30,border:[2,"solid","transparent"],borderRadius:5,backgroundColor:N.BORDER_MAIN,backgroundClip:"padding-box","&:hover":{backgroundColor:N.GREY_ACTIVE}},"&-track-piece":{backgroundColor:"transparent"},"&-corner":{backgroundColor:"transparent"}}},"@supports not selector(::-webkit-scrollbar)":{scrollbarWidth:"thin",scrollbarColor:`${N.BORDER_MAIN} transparent`}}},R={defaultTransition:"0.25s ease-in-out",slideUp:{"slide-up-enter":{opacity:0,transform:"translateY(15px)"},"slide-up-enter-active":{opacity:1,transform:"translateY(0px)",transition:"150ms ease-in-out",transitionProperty:"opacity, transform"},"slide-up-exit-active":{opacity:1,transform:"translateY(0px)"},"slide-up-exit":{opacity:0,transform:"translateY(15px)",transition:"150ms ease-in-out",transitionProperty:"opacity, transform"}}},I={animations:R,colors:N,dimensions:k,helpers:E},j=t.createContext(I),T=j.Provider,M=()=>t.useContext(j),D=(...e)=>e.flat().filter(n.isObject),A=(e,o)=>t.useMemo(()=>D(e,o),[e,o]),L=e=>{const{components:t}=M();return n.isNotEmpty(e)?t?.[e]:void 0},F=e=>e.startsWith("tweak"),O=e=>n.isNotEmpty(e)&&!Object.keys(e).every(F),B=()=>{let e;const t=new WeakMap;return(o,i=0)=>{const r=o.at(i);if(n.isNotEmpty(r))return(e=>(t.has(e)||t.set(e,B()),t.get(e)))(r)(o,i+1);if(!n.isNotEmpty(e)){const[t,...i]=o;e=n.isArrayNotEmpty(i)?n.mergeStyles(t,...i):t}return e}},z=B(),_=o.createUseStyles(e=>e),P=(e,o)=>{const i=n.isString(e)?e:void 0,r=o??e;return"production"!==process.env.NODE_ENV&&((e,t="LocalComponent")=>{const o=Object.keys(e).filter(F);n.isArrayNotEmpty(o)&&console.error(`${t}: Названия классов не должны начинаться со слова "tweak": ${o}`)})(r,i),({theme:e,tweakStyles:o=e})=>{const n=L(i),a=t.useMemo(()=>{const e=D(r,n,o).filter(O);return{theme:z(e)}},[n,o]);return _(a)}},W=(e,o)=>{const n=t.useRef(!1);t.useEffect(()=>{let t;return n.current?t=e():n.current=!0,()=>{void 0!==t&&t()}},o)},H={name:"minWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.minWidth=`${e.rects.reference.width}px`},effect:({state:e})=>{e.elements.popper.style.minWidth=`${e.elements.reference.offsetWidth}px`}},$=[{countryEn:"Abkhazia",countryRu:"Абхазия",countryCode:"AB",phoneMask:"(999) 999-99-99",dialCode:"7",dialCodePriority:1,fullCodes:["7"]},{countryEn:"Afghanistan",countryRu:"Афганистан",countryCode:"AF",dialCode:"93",fullCodes:["93"]},{countryEn:"Albania",countryRu:"Албания",countryCode:"AL",dialCode:"355",fullCodes:["355"]},{countryEn:"Algeria",countryRu:"Алжир",countryCode:"DZ",dialCode:"213",fullCodes:["213"]},{countryEn:"Andorra",countryRu:"Андорра",countryCode:"AD",dialCode:"376",fullCodes:["376"]},{countryEn:"Angola",countryRu:"Ангола",countryCode:"AO",dialCode:"244",fullCodes:["244"]},{countryEn:"Antigua and Barbuda",countryRu:"Антигуа и Барбуда",countryCode:"AG",dialCode:"1268",fullCodes:["1268"]},{countryEn:"Argentina",countryRu:"Аргентина",countryCode:"AR",dialCode:"54",phoneMask:"(99) 99999999",fullCodes:["54"]},{countryEn:"Armenia",countryRu:"Армения",countryCode:"AM",dialCode:"374",fullCodes:["374"]},{countryEn:"Aruba",countryRu:"Аруба",countryCode:"AW",dialCode:"297",fullCodes:["297"]},{countryEn:"Australia",countryRu:"Австралия",countryCode:"AU",dialCode:"61",phoneMask:"(99) 9999 9999",dialCodePriority:0,areaCodes:["2","3","4","7","8","02","03","04","07","08"],fullCodes:["612","613","614","617","618","6102","6103","6104","6107","6108"]},{countryEn:"Austria",countryRu:"Австрия",countryCode:"AT",dialCode:"43",fullCodes:["43"]},{countryEn:"Azerbaijan",countryRu:"Азербайджан",countryCode:"AZ",dialCode:"994",fullCodes:["994"]},{countryEn:"Bahamas",countryRu:"Багамы",countryCode:"BS",dialCode:"1242",fullCodes:["1242"]},{countryEn:"Bahrain",countryRu:"Бахрейн",countryCode:"BH",dialCode:"973",fullCodes:["973"]},{countryEn:"Bangladesh",countryRu:"Бангладеш",countryCode:"BD",dialCode:"880",fullCodes:["880"]},{countryEn:"Barbados",countryRu:"Барбадос",countryCode:"BB",dialCode:"1246",fullCodes:["1246"]},{countryEn:"Belarus",countryRu:"Беларусь",countryCode:"BY",dialCode:"375",phoneMask:"(99) 999 99 99",fullCodes:["375"]},{countryEn:"Belgium",countryRu:"Бельгия",countryCode:"BE",dialCode:"32",phoneMask:"999 99 99 99",fullCodes:["32"]},{countryEn:"Belize",countryRu:"Белиз",countryCode:"BZ",dialCode:"501",fullCodes:["501"]},{countryEn:"Benin",countryRu:"Бенин",countryCode:"BJ",dialCode:"229",fullCodes:["229"]},{countryEn:"Bhutan",countryRu:"Бутан",countryCode:"BT",dialCode:"975",fullCodes:["975"]},{countryEn:"Bolivia",countryRu:"Боливия",countryCode:"BO",dialCode:"591",fullCodes:["591"]},{countryEn:"Bosnia and Herzegovina",countryRu:"Босния и Герцеговина",countryCode:"BA",dialCode:"387",fullCodes:["387"]},{countryEn:"Botswana",countryRu:"Ботсвана",countryCode:"BW",dialCode:"267",fullCodes:["267"]},{countryEn:"Brazil",countryRu:"Бразилия",countryCode:"BR",dialCode:"55",phoneMask:"(99) 999999999",fullCodes:["55"]},{countryEn:"British Indian Ocean Territory",countryRu:"Британская территория в Индийском океане",countryCode:"IO",dialCode:"246",fullCodes:["246"]},{countryEn:"Brunei",countryRu:"Бруней-Даруссалам",countryCode:"BN",dialCode:"673",fullCodes:["673"]},{countryEn:"Bulgaria",countryRu:"Болгария",countryCode:"BG",dialCode:"359",fullCodes:["359"]},{countryEn:"Burkina Faso",countryRu:"Буркина-Фасо",countryCode:"BF",dialCode:"226",fullCodes:["226"]},{countryEn:"Burundi",countryRu:"Бурунди",countryCode:"BI",dialCode:"257",fullCodes:["257"]},{countryEn:"Cambodia",countryRu:"Камбоджа",countryCode:"KH",dialCode:"855",fullCodes:["855"]},{countryEn:"Cameroon",countryRu:"Камерун",countryCode:"CM",dialCode:"237",fullCodes:["237"]},{countryEn:"Canada",countryRu:"Канада",countryCode:"CA",dialCode:"1",phoneMask:"(999) 999-9999",dialCodePriority:1,areaCodes:["204","226","236","249","250","289","306","343","365","387","403","416","418","431","437","438","450","506","514","519","548","579","581","587","604","613","639","647","672","705","709","742","778","780","782","807","819","825","867","873","902","905"],fullCodes:["1204","1226","1236","1249","1250","1289","1306","1343","1365","1387","1403","1416","1418","1431","1437","1438","1450","1506","1514","1519","1548","1579","1581","1587","1604","1613","1639","1647","1672","1705","1709","1742","1778","1780","1782","1807","1819","1825","1867","1873","1902","1905"]},{countryEn:"Cape Verde",countryRu:"Кабо-Верде",countryCode:"CV",dialCode:"238",fullCodes:["238"]},{countryEn:"Caribbean Netherlands",countryRu:"Бонайре, Саба и Синт-Эстатиус",countryCode:"BQ",dialCode:"599",dialCodePriority:1,fullCodes:["599"]},{countryEn:"Central African Republic",countryRu:"Центрально-Африканская Республика",countryCode:"CF",dialCode:"236",fullCodes:["236"]},{countryEn:"Chad",countryRu:"Чад",countryCode:"TD",dialCode:"235",fullCodes:["235"]},{countryEn:"Chile",countryRu:"Чили",countryCode:"CL",dialCode:"56",fullCodes:["56"]},{countryEn:"China",countryRu:"Китай",countryCode:"CN",dialCode:"86",phoneMask:"99-999999999",fullCodes:["86"]},{countryEn:"Colombia",countryRu:"Колумбия",countryCode:"CO",dialCode:"57",fullCodes:["57"]},{countryEn:"Comoros",countryRu:"Коморы",countryCode:"KM",dialCode:"269",fullCodes:["269"]},{countryEn:"DR Congo",countryRu:"ДР Конго",countryCode:"CD",dialCode:"243",fullCodes:["243"]},{countryEn:"Republic of the Congo",countryRu:"Республика Конго",countryCode:"CG",dialCode:"242",fullCodes:["242"]},{countryEn:"Costa Rica",countryRu:"Коста-Рика",countryCode:"CR",dialCode:"506",phoneMask:"9999-9999",fullCodes:["506"]},{countryEn:"Côte d’Ivoire",countryRu:"Кот д’Ивуар",countryCode:"CI",dialCode:"225",phoneMask:"99 99 99 99",fullCodes:["225"]},{countryEn:"Croatia",countryRu:"Хорватия",countryCode:"HR",dialCode:"385",fullCodes:["385"]},{countryEn:"Cuba",countryRu:"Куба",countryCode:"CU",dialCode:"53",fullCodes:["53"]},{countryEn:"Curaçao",countryRu:"Кюрасао",countryCode:"CW",dialCode:"599",dialCodePriority:0,fullCodes:["599"]},{countryEn:"Cyprus",countryRu:"Кипр",countryCode:"CY",dialCode:"357",phoneMask:"99 999999",fullCodes:["357"]},{countryEn:"Czech Republic",countryRu:"Чешская Республика",countryCode:"CZ",dialCode:"420",fullCodes:["420"]},{countryEn:"Denmark",countryRu:"Дания",countryCode:"DK",dialCode:"45",phoneMask:"99 99 99 99",fullCodes:["45"]},{countryEn:"Djibouti",countryRu:"Джибути",countryCode:"DJ",dialCode:"253",fullCodes:["253"]},{countryEn:"Dominica",countryRu:"Доминика",countryCode:"DM",dialCode:"1767",fullCodes:["1767"]},{countryEn:"Dominican Republic",countryRu:"Доминиканская Республика",countryCode:"DO",dialCode:"1",dialCodePriority:2,areaCodes:["809","829","849"],fullCodes:["1809","1829","1849"]},{countryEn:"Ecuador",countryRu:"Эквадор",countryCode:"EC",dialCode:"593",fullCodes:["593"]},{countryEn:"Egypt",countryRu:"Египет",countryCode:"EG",dialCode:"20",fullCodes:["20"]},{countryEn:"El Salvador",countryRu:"Эль-Сальвадор",countryCode:"SV",dialCode:"503",phoneMask:"9999-9999",fullCodes:["503"]},{countryEn:"Equatorial Guinea",countryRu:"Экваториальная Гвинея",countryCode:"GQ",dialCode:"240",fullCodes:["240"]},{countryEn:"Eritrea",countryRu:"Эритрея",countryCode:"ER",dialCode:"291",fullCodes:["291"]},{countryEn:"Estonia",countryRu:"Эстония",countryCode:"EE",dialCode:"372",phoneMask:"9999 999999",fullCodes:["372"]},{countryEn:"Ethiopia",countryRu:"Эфиопия",countryCode:"ET",dialCode:"251",fullCodes:["251"]},{countryEn:"Fiji",countryRu:"Фиджи",countryCode:"FJ",dialCode:"679",fullCodes:["679"]},{countryEn:"Finland",countryRu:"Финляндия",countryCode:"FI",dialCode:"358",phoneMask:"99 999 99 99",fullCodes:["358"]},{countryEn:"France",countryRu:"Франция",countryCode:"FR",dialCode:"33",phoneMask:"9 99 99 99 99",fullCodes:["33"]},{countryEn:"French Guiana",countryRu:"Французская Гвиана",countryCode:"GF",dialCode:"594",fullCodes:["594"]},{countryEn:"French Polynesia",countryRu:"Французская Полинезия",countryCode:"PF",dialCode:"689",fullCodes:["689"]},{countryEn:"Gabon",countryRu:"Габон",countryCode:"GA",dialCode:"241",fullCodes:["241"]},{countryEn:"Gambia",countryRu:"Гамбия",countryCode:"GM",dialCode:"220",fullCodes:["220"]},{countryEn:"Georgia",countryRu:"Грузия",countryCode:"GE",dialCode:"995",fullCodes:["995"]},{countryEn:"Germany",countryRu:"Германия",countryCode:"DE",dialCode:"49",phoneMask:"9999 99999999",fullCodes:["49"]},{countryEn:"Ghana",countryRu:"Гана",countryCode:"GH",dialCode:"233",fullCodes:["233"]},{countryEn:"Greece",countryRu:"Греция",countryCode:"GR",dialCode:"30",fullCodes:["30"]},{countryEn:"Grenada",countryRu:"Гренада",countryCode:"GD",dialCode:"1473",fullCodes:["1473"]},{countryEn:"Guadeloupe",countryRu:"Гваделупа",countryCode:"GP",dialCode:"590",dialCodePriority:0,fullCodes:["590"]},{countryEn:"Guam",countryRu:"Гуам",countryCode:"GU",dialCode:"1671",fullCodes:["1671"]},{countryEn:"Guatemala",countryRu:"Гватемала",countryCode:"GT",dialCode:"502",phoneMask:"9999-9999",fullCodes:["502"]},{countryEn:"Guinea",countryRu:"Гвинея",countryCode:"GN",dialCode:"224",fullCodes:["224"]},{countryEn:"Guinea-Bissau",countryRu:"Гвинея-Бисау",countryCode:"GW",dialCode:"245",fullCodes:["245"]},{countryEn:"Guyana",countryRu:"Гайана",countryCode:"GY",dialCode:"592",fullCodes:["592"]},{countryEn:"Haiti",countryRu:"Гаити",countryCode:"HT",dialCode:"509",phoneMask:"9999-9999",fullCodes:["509"]},{countryEn:"Honduras",countryRu:"Гондурас",countryCode:"HN",dialCode:"504",fullCodes:["504"]},{countryEn:"Hong Kong",countryRu:"Гонконг",countryCode:"HK",dialCode:"852",phoneMask:"9999 9999",fullCodes:["852"]},{countryEn:"Hungary",countryRu:"Венгрия",countryCode:"HU",dialCode:"36",fullCodes:["36"]},{countryEn:"Iceland",countryRu:"Исландия",countryCode:"IS",dialCode:"354",phoneMask:"999 9999",fullCodes:["354"]},{countryEn:"India",countryRu:"Индия",countryCode:"IN",dialCode:"91",phoneMask:"99999-99999",fullCodes:["91"]},{countryEn:"Indonesia",countryRu:"Индонезия",countryCode:"ID",dialCode:"62",fullCodes:["62"]},{countryEn:"Iran",countryRu:"Иран",countryCode:"IR",dialCode:"98",fullCodes:["98"]},{countryEn:"Iraq",countryRu:"Ирак",countryCode:"IQ",dialCode:"964",fullCodes:["964"]},{countryEn:"Ireland",countryRu:"Ирландия",countryCode:"IE",dialCode:"353",phoneMask:"99 9999999",fullCodes:["353"]},{countryEn:"Israel",countryRu:"Израиль",countryCode:"IL",dialCode:"972",phoneMask:"999 999 9999",fullCodes:["972"]},{countryEn:"Italy",countryRu:"Италия",countryCode:"IT",dialCode:"39",phoneMask:"999 9999999",dialCodePriority:0,fullCodes:["39"]},{countryEn:"Jamaica",countryRu:"Ямайка",countryCode:"JM",dialCode:"1876",fullCodes:["1876"]},{countryEn:"Japan",countryRu:"Япония",countryCode:"JP",dialCode:"81",phoneMask:"99 9999 9999",fullCodes:["81"]},{countryEn:"Jordan",countryRu:"Иордания",countryCode:"JO",dialCode:"962",fullCodes:["962"]},{countryEn:"Kazakhstan",countryRu:"Казахстан",countryCode:"KZ",dialCode:"7",phoneMask:"(999) 999-99-99",dialCodePriority:1,fullCodes:["7"]},{countryEn:"Kenya",countryRu:"Кения",countryCode:"KE",dialCode:"254",fullCodes:["254"]},{countryEn:"Kiribati",countryRu:"Кирибати",countryCode:"KI",dialCode:"686",fullCodes:["686"]},{countryEn:"Kosovo",countryRu:"Косово",countryCode:"XK",dialCode:"383",fullCodes:["383"]},{countryEn:"Kuwait",countryRu:"Кувейт",countryCode:"KW",dialCode:"965",fullCodes:["965"]},{countryEn:"Kyrgyzstan",countryRu:"Киргизия",countryCode:"KG",dialCode:"996",fullCodes:["996"]},{countryEn:"Laos",countryRu:"Лаос",countryCode:"LA",dialCode:"856",fullCodes:["856"]},{countryEn:"Latvia",countryRu:"Латвия",countryCode:"LV",dialCode:"371",fullCodes:["371"]},{countryEn:"Lebanon",countryRu:"Ливан",countryCode:"LB",dialCode:"961",fullCodes:["961"]},{countryEn:"Lesotho",countryRu:"Лесото",countryCode:"LS",dialCode:"266",fullCodes:["266"]},{countryEn:"Liberia",countryRu:"Либерия",countryCode:"LR",dialCode:"231",fullCodes:["231"]},{countryEn:"Libya",countryRu:"Ливийская Арабская Джамахирия",countryCode:"LY",dialCode:"218",fullCodes:["218"]},{countryEn:"Liechtenstein",countryRu:"Лихтенштейн",countryCode:"LI",dialCode:"423",fullCodes:["423"]},{countryEn:"Lithuania",countryRu:"Литва",countryCode:"LT",dialCode:"370",fullCodes:["370"]},{countryEn:"Luxembourg",countryRu:"Люксембург",countryCode:"LU",dialCode:"352",fullCodes:["352"]},{countryEn:"Macau",countryRu:"Макао",countryCode:"MO",dialCode:"853",fullCodes:["853"]},{countryEn:"Macedonia",countryRu:"Республика Македония",countryCode:"MK",dialCode:"389",fullCodes:["389"]},{countryEn:"Madagascar",countryRu:"Мадагаскар",countryCode:"MG",dialCode:"261",fullCodes:["261"]},{countryEn:"Malawi",countryRu:"Малави",countryCode:"MW",dialCode:"265",fullCodes:["265"]},{countryEn:"Malaysia",countryRu:"Малайзия",countryCode:"MY",dialCode:"60",phoneMask:"99-9999-9999",fullCodes:["60"]},{countryEn:"Maldives",countryRu:"Мальдивы",countryCode:"MV",dialCode:"960",fullCodes:["960"]},{countryEn:"Mali",countryRu:"Мали",countryCode:"ML",dialCode:"223",fullCodes:["223"]},{countryEn:"Malta",countryRu:"Мальта",countryCode:"MT",dialCode:"356",fullCodes:["356"]},{countryEn:"Marshall Islands",countryRu:"Маршалловы острова",countryCode:"MH",dialCode:"692",fullCodes:["692"]},{countryEn:"Martinique",countryRu:"Мартиника",countryCode:"MQ",dialCode:"596",fullCodes:["596"]},{countryEn:"Mauritania",countryRu:"Мавритания",countryCode:"MR",dialCode:"222",fullCodes:["222"]},{countryEn:"Mauritius",countryRu:"Маврикий",countryCode:"MU",dialCode:"230",fullCodes:["230"]},{countryEn:"Mexico",countryRu:"Мексика",countryCode:"MX",dialCode:"52",phoneMask:"999 999 9999",dialCodePriority:0,areaCodes:["55","81","33","656","664","998","774","229"],fullCodes:["5255","5281","5233","52656","52664","52998","52774","52229"]},{countryEn:"Micronesia",countryRu:"Микронезия, Федеративные Штаты",countryCode:"FM",dialCode:"691",fullCodes:["691"]},{countryEn:"Moldova",countryRu:"Молдова, Республика",countryCode:"MD",dialCode:"373",phoneMask:"(99) 99-99-99",fullCodes:["373"]},{countryEn:"Monaco",countryRu:"Монако",countryCode:"MC",dialCode:"377",fullCodes:["377"]},{countryEn:"Mongolia",countryRu:"Монголия",countryCode:"MN",dialCode:"976",fullCodes:["976"]},{countryEn:"Montenegro",countryRu:"Черногория",countryCode:"ME",dialCode:"382",fullCodes:["382"]},{countryEn:"Morocco",countryRu:"Марокко",countryCode:"MA",dialCode:"212",fullCodes:["212"]},{countryEn:"Mozambique",countryRu:"Мозамбик",countryCode:"MZ",dialCode:"258",fullCodes:["258"]},{countryEn:"Myanmar",countryRu:"Мьянма",countryCode:"MM",dialCode:"95",fullCodes:["95"]},{countryEn:"Namibia",countryRu:"Намибия",countryCode:"NA",dialCode:"264",fullCodes:["264"]},{countryEn:"Nauru",countryRu:"Науру",countryCode:"NR",dialCode:"674",fullCodes:["674"]},{countryEn:"Nepal",countryRu:"Непал",countryCode:"NP",dialCode:"977",fullCodes:["977"]},{countryEn:"Netherlands",countryRu:"Нидерланды",countryCode:"NL",dialCode:"31",phoneMask:"99 99999999",fullCodes:["31"]},{countryEn:"New Caledonia",countryRu:"Новая Каледония",countryCode:"NC",dialCode:"687",fullCodes:["687"]},{countryEn:"New Zealand",countryRu:"Новая Зеландия",countryCode:"NZ",dialCode:"64",phoneMask:"999-999-9999",fullCodes:["64"]},{countryEn:"Nicaragua",countryRu:"Никарагуа",countryCode:"NI",dialCode:"505",fullCodes:["505"]},{countryEn:"Niger",countryRu:"Нигер",countryCode:"NE",dialCode:"227",fullCodes:["227"]},{countryEn:"Nigeria",countryRu:"Нигерия",countryCode:"NG",dialCode:"234",fullCodes:["234"]},{countryEn:"North Korea",countryRu:"Северная Корея",countryCode:"KP",dialCode:"850",fullCodes:["850"]},{countryEn:"Norway",countryRu:"Норвегия",countryCode:"NO",dialCode:"47",phoneMask:"999 99 999",fullCodes:["47"]},{countryEn:"Oman",countryRu:"Оман",countryCode:"OM",dialCode:"968",fullCodes:["968"]},{countryEn:"Pakistan",countryRu:"Пакистан",countryCode:"PK",dialCode:"92",phoneMask:"999-9999999",fullCodes:["92"]},{countryEn:"Palau",countryRu:"Палау",countryCode:"PW",dialCode:"680",fullCodes:["680"]},{countryEn:"Palestine",countryRu:"Палестинская территория",countryCode:"PS",dialCode:"970",fullCodes:["970"]},{countryEn:"Panama",countryRu:"Панама",countryCode:"PA",dialCode:"507",fullCodes:["507"]},{countryEn:"Papua New Guinea",countryRu:"Папуа-Новая Гвинея",countryCode:"PG",dialCode:"675",fullCodes:["675"]},{countryEn:"Paraguay",countryRu:"Парагвай",countryCode:"PY",dialCode:"595",fullCodes:["595"]},{countryEn:"Peru",countryRu:"Перу",countryCode:"PE",dialCode:"51",fullCodes:["51"]},{countryEn:"Philippines",countryRu:"Филиппины",countryCode:"PH",dialCode:"63",phoneMask:"9999 9999999",fullCodes:["63"]},{countryEn:"Poland",countryRu:"Польша",countryCode:"PL",dialCode:"48",phoneMask:"999-999-999",fullCodes:["48"]},{countryEn:"Portugal",countryRu:"Португалия",countryCode:"PT",dialCode:"351",fullCodes:["351"]},{countryEn:"Puerto Rico",countryRu:"Пуэрто-Рико",countryCode:"PR",dialCode:"1",dialCodePriority:3,areaCodes:["787","939"],fullCodes:["1787","1939"]},{countryEn:"Qatar",countryRu:"Катар",countryCode:"QA",dialCode:"974",fullCodes:["974"]},{countryEn:"Réunion",countryRu:"Реюньон",countryCode:"RE",dialCode:"262",fullCodes:["262"]},{countryEn:"Romania",countryRu:"Румыния",countryCode:"RO",dialCode:"40",fullCodes:["40"]},{countryEn:"Russia",countryRu:"Россия",countryCode:"RU",dialCode:"7",phoneMask:"(999) 999-99-99",dialCodePriority:0,fullCodes:["7"]},{countryEn:"Rwanda",countryRu:"Руанда",countryCode:"RW",dialCode:"250",fullCodes:["250"]},{countryEn:"Saint Kitts and Nevis",countryRu:"Сент-Китс и Невис",countryCode:"KN",dialCode:"1869",fullCodes:["1869"]},{countryEn:"Saint Lucia",countryRu:"Сент-Люсия",countryCode:"LC",dialCode:"1758",fullCodes:["1758"]},{countryEn:"Saint Vincent and the Grenadines",countryRu:"Сент-Винсент и Гренадины",countryCode:"VC",dialCode:"1784",fullCodes:["1784"]},{countryEn:"Samoa",countryRu:"Самоа",countryCode:"WS",dialCode:"685",fullCodes:["685"]},{countryEn:"San Marino",countryRu:"Сан-Марино",countryCode:"SM",dialCode:"378",fullCodes:["378"]},{countryEn:"São Tomé and Príncipe",countryRu:"Сан-Томе и Принсипи",countryCode:"ST",dialCode:"239",fullCodes:["239"]},{countryEn:"Saudi Arabia",countryRu:"Саудовская Аравия",countryCode:"SA",dialCode:"966",fullCodes:["966"]},{countryEn:"Senegal",countryRu:"Сенегал",countryCode:"SN",dialCode:"221",fullCodes:["221"]},{countryEn:"Serbia",countryRu:"Сербия",countryCode:"RS",dialCode:"381",fullCodes:["381"]},{countryEn:"Seychelles",countryRu:"Сейшелы",countryCode:"SC",dialCode:"248",fullCodes:["248"]},{countryEn:"Sierra Leone",countryRu:"Сьерра-Леоне",countryCode:"SL",dialCode:"232",fullCodes:["232"]},{countryEn:"Singapore",countryRu:"Сингапур",countryCode:"SG",dialCode:"65",phoneMask:"9999-9999",fullCodes:["65"]},{countryEn:"Slovakia",countryRu:"Словакия",countryCode:"SK",dialCode:"421",fullCodes:["421"]},{countryEn:"Slovenia",countryRu:"Словения",countryCode:"SI",dialCode:"386",fullCodes:["386"]},{countryEn:"Solomon Islands",countryRu:"Соломоновы острова",countryCode:"SB",dialCode:"677",fullCodes:["677"]},{countryEn:"Somalia",countryRu:"Сомали",countryCode:"SO",dialCode:"252",fullCodes:["252"]},{countryEn:"South Africa",countryRu:"Южная Африка",countryCode:"ZA",dialCode:"27",fullCodes:["27"]},{countryEn:"South Korea",countryRu:"Южная Корея",countryCode:"KR",dialCode:"82",phoneMask:"999 9999 9999",fullCodes:["82"]},{countryCode:"OS",countryEn:"South Ossetia",countryRu:"Южная Осетия",phoneMask:"(999) 999-99-99",dialCode:"7",dialCodePriority:1,fullCodes:["7"]},{countryEn:"South Sudan",countryRu:"Южный Судан",countryCode:"SS",dialCode:"211",fullCodes:["211"]},{countryEn:"Spain",countryRu:"Испания",countryCode:"ES",dialCode:"34",phoneMask:"999 999 999",fullCodes:["34"]},{countryEn:"Sri Lanka",countryRu:"Шри-Ланка",countryCode:"LK",dialCode:"94",fullCodes:["94"]},{countryEn:"Sudan",countryRu:"Судан",countryCode:"SD",dialCode:"249",fullCodes:["249"]},{countryEn:"Suriname",countryRu:"Суринам",countryCode:"SR",dialCode:"597",fullCodes:["597"]},{countryEn:"Swaziland",countryRu:"Свазиленд",countryCode:"SZ",dialCode:"268",fullCodes:["268"]},{countryEn:"Sweden",countryRu:"Швеция",countryCode:"SE",dialCode:"46",phoneMask:"(999) 999-999",fullCodes:["46"]},{countryEn:"Switzerland",countryRu:"Швейцария",countryCode:"CH",dialCode:"41",phoneMask:"99 999 99 99",fullCodes:["41"]},{countryEn:"Syria",countryRu:"Сирийская Арабская Республика",countryCode:"SY",dialCode:"963",fullCodes:["963"]},{countryEn:"Taiwan",countryRu:"Тайвань",countryCode:"TW",dialCode:"886",fullCodes:["886"]},{countryEn:"Tajikistan",countryRu:"Таджикистан",countryCode:"TJ",dialCode:"992",fullCodes:["992"]},{countryEn:"Tanzania",countryRu:"Танзания",countryCode:"TZ",dialCode:"255",fullCodes:["255"]},{countryEn:"Thailand",countryRu:"Таиланд",countryCode:"TH",dialCode:"66",fullCodes:["66"]},{countryEn:"Timor-Leste",countryRu:"Тимор-Лесте",countryCode:"TL",dialCode:"670",fullCodes:["670"]},{countryEn:"Togo",countryRu:"Того",countryCode:"TG",dialCode:"228",fullCodes:["228"]},{countryEn:"Tonga",countryRu:"Тонга",countryCode:"TO",dialCode:"676",fullCodes:["676"]},{countryEn:"Trinidad and Tobago",countryRu:"Тринидад и Тобаго",countryCode:"TT",dialCode:"1868",fullCodes:["1868"]},{countryEn:"Tunisia",countryRu:"Тунис",countryCode:"TN",dialCode:"216",fullCodes:["216"]},{countryEn:"Turkey",countryRu:"Турция",countryCode:"TR",dialCode:"90",phoneMask:"999 999 99 99",fullCodes:["90"]},{countryEn:"Turkmenistan",countryRu:"Туркмения",countryCode:"TM",dialCode:"993",fullCodes:["993"]},{countryEn:"Tuvalu",countryRu:"Тувалу",countryCode:"TV",dialCode:"688",fullCodes:["688"]},{countryEn:"Uganda",countryRu:"Уганда",countryCode:"UG",dialCode:"256",fullCodes:["256"]},{countryEn:"Ukraine",countryRu:"Украина",countryCode:"UA",dialCode:"380",phoneMask:"(99) 999 99 99",fullCodes:["380"]},{countryEn:"United Arab Emirates",countryRu:"Объединенные Арабские Эмираты",countryCode:"AE",dialCode:"971",fullCodes:["971"]},{countryEn:"United Kingdom",countryRu:"Соединенное Королевство",countryCode:"GB",dialCode:"44",phoneMask:"9999 999999",fullCodes:["44"]},{countryEn:"United States",countryRu:"Соединенные Штаты",countryCode:"US",dialCode:"1",phoneMask:"(999) 999-9999",dialCodePriority:0,areaCodes:["907","205","251","256","334","479","501","870","480","520","602","623","928","209","213","310","323","408","415","510","530","559","562","619","626","650","661","707","714","760","805","818","831","858","909","916","925","949","951","303","719","970","203","860","202","302","239","305","321","352","386","407","561","727","772","813","850","863","904","941","954","229","404","478","706","770","912","808","319","515","563","641","712","208","217","309","312","618","630","708","773","815","847","219","260","317","574","765","812","316","620","785","913","270","502","606","859","225","318","337","504","985","413","508","617","781","978","301","410","207","231","248","269","313","517","586","616","734","810","906","989","218","320","507","612","651","763","952","314","417","573","636","660","816","228","601","662","406","252","336","704","828","910","919","701","308","402","603","201","609","732","856","908","973","505","575","702","775","212","315","516","518","585","607","631","716","718","845","914","216","330","419","440","513","614","740","937","405","580","918","503","541","215","412","570","610","717","724","814","401","803","843","864","605","423","615","731","865","901","931","210","214","254","281","325","361","409","432","512","713","806","817","830","903","915","936","940","956","972","979","435","801","276","434","540","703","757","804","802","206","253","360","425","509","262","414","608","715","920","304","307"],fullCodes:["1907","1205","1251","1256","1334","1479","1501","1870","1480","1520","1602","1623","1928","1209","1213","1310","1323","1408","1415","1510","1530","1559","1562","1619","1626","1650","1661","1707","1714","1760","1805","1818","1831","1858","1909","1916","1925","1949","1951","1303","1719","1970","1203","1860","1202","1302","1239","1305","1321","1352","1386","1407","1561","1727","1772","1813","1850","1863","1904","1941","1954","1229","1404","1478","1706","1770","1912","1808","1319","1515","1563","1641","1712","1208","1217","1309","1312","1618","1630","1708","1773","1815","1847","1219","1260","1317","1574","1765","1812","1316","1620","1785","1913","1270","1502","1606","1859","1225","1318","1337","1504","1985","1413","1508","1617","1781","1978","1301","1410","1207","1231","1248","1269","1313","1517","1586","1616","1734","1810","1906","1989","1218","1320","1507","1612","1651","1763","1952","1314","1417","1573","1636","1660","1816","1228","1601","1662","1406","1252","1336","1704","1828","1910","1919","1701","1308","1402","1603","1201","1609","1732","1856","1908","1973","1505","1575","1702","1775","1212","1315","1516","1518","1585","1607","1631","1716","1718","1845","1914","1216","1330","1419","1440","1513","1614","1740","1937","1405","1580","1918","1503","1541","1215","1412","1570","1610","1717","1724","1814","1401","1803","1843","1864","1605","1423","1615","1731","1865","1901","1931","1210","1214","1254","1281","1325","1361","1409","1432","1512","1713","1806","1817","1830","1903","1915","1936","1940","1956","1972","1979","1435","1801","1276","1434","1540","1703","1757","1804","1802","1206","1253","1360","1425","1509","1262","1414","1608","1715","1920","1304","1307"]},{countryEn:"Uruguay",countryRu:"Уругвай",countryCode:"UY",dialCode:"598",fullCodes:["598"]},{countryEn:"Uzbekistan",countryRu:"Узбекистан",countryCode:"UZ",dialCode:"998",fullCodes:["998"]},{countryEn:"Vanuatu",countryRu:"Вануату",countryCode:"VU",dialCode:"678",fullCodes:["678"]},{countryEn:"Vatican City",countryRu:"Ватикан",countryCode:"VA",dialCode:"39",phoneMask:"99 9999 9999",dialCodePriority:1,fullCodes:["39"]},{countryEn:"Venezuela",countryRu:"Венесуэла",countryCode:"VE",dialCode:"58",fullCodes:["58"]},{countryEn:"Vietnam",countryRu:"Вьетнам",countryCode:"VN",dialCode:"84",fullCodes:["84"]},{countryEn:"Yemen",countryRu:"Йемен",countryCode:"YE",dialCode:"967",fullCodes:["967"]},{countryEn:"Zambia",countryRu:"Замбия",countryCode:"ZM",dialCode:"260",fullCodes:["260"]},{countryEn:"Zimbabwe",countryRu:"Зимбабве",countryCode:"ZW",dialCode:"263",fullCodes:["263"]}],V={aac:"audio/aac",abw:"application/x-abiword",arc:"application/x-freearc",avi:"video/x-msvideo",azw:"application/vnd.amazon.ebook",bin:"application/octet-stream",bmp:"image/bmp",bz:"application/x-bzip",bz2:"application/x-bzip2",csh:"application/x-csh",css:"text/css",csv:"text/csv",doc:"application/msword",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",eot:"application/vnd.ms-fontobject",epub:"application/epub+zip",gz:"application/gzip",gif:"image/gif",htm:"text/html",html:"text/html",ico:"image/vnd.microsoft.icon",ics:"text/calendar",jar:"application/java-archive",jpeg:"image/jpeg",jpg:"image/jpeg",js:"text/javascript",json:"application/json",jsonld:"application/ld+json",mid:".midi",mjs:"text/javascript",mp3:"audio/mpeg",mpeg:"video/mpeg",mpkg:"application/vnd.apple.installer+xml",odp:"application/vnd.oasis.opendocument.presentation",ods:"application/vnd.oasis.opendocument.spreadsheet",odt:"application/vnd.oasis.opendocument.text",oga:"audio/ogg",ogv:"video/ogg",ogx:"application/ogg",opus:"audio/opus",otf:"font/otf",png:"image/png",pdf:"application/pdf",php:"application/php",ppt:"application/vnd.ms-powerpoint",pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation",rar:"application/vnd.rar",rtf:"application/rtf",sh:"application/x-sh",svg:"image/svg+xml",swf:"application/x-shockwave-flash",tar:"application/x-tar",tif:"image/tiff",tiff:"image/tiff",ts:"video/mp2t",ttf:"font/ttf",txt:"text/plain",vsd:"application/vnd.visio",wav:"audio/wav",weba:"audio/webm",webm:"video/webm",webp:"image/webp",woff:"font/woff",woff2:"font/woff2",xhtml:"application/xhtml+xml",xls:"application/vnd.ms-excel",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xml:"XML",xul:"application/vnd.mozilla.xul+xml",zip:"application/zip","3gp":"video/3gpp","3g2":"video/3gpp2","7z":"application/x-7z-compressed"},G=(e,t=$)=>n.isNotEmpty(e)?t.find(t=>t.countryCode===e):void 0,U=(e,t=$)=>n.isNotEmpty(e)?t.findIndex(t=>t.countryCode===e):-1,K=(e,t)=>"ru"===t.toLowerCase()?e.countryRu:e.countryEn,Z=(e,t)=>e.sort((e,o)=>K(e,t).localeCompare(K(o,t))),Y=(e,t)=>{const o=t.toLowerCase().trim().replace("+","");return[e.countryRu,e.countryEn,...e.countryRu.split(" "),...e.countryEn.split(" "),e.dialCode].map(e=>e.toLowerCase()).some(e=>e.startsWith(o))},q=e=>(e?.dialCode??"")+(e?.phoneNumber??""),X=e=>{if(n.isStringEmpty(e))return;const t=$.filter(t=>t.fullCodes.some(t=>e.startsWith(t)));if(1===t.length)return t[0].countryCode;const o=$.filter(t=>e.startsWith(t.dialCode)).sort((e,t)=>(e.dialCodePriority??1e3)-(t.dialCodePriority??1e3));return o.at(0)?.countryCode},J=(e,t)=>{const o=t??X(e),n=G(o)?.dialCode;return{dialCode:n,phoneNumber:e.slice(n?.length),countryCode:o}},Q="+ 9 999 999 999 999 99",ee=e=>{let t=Q;if(n.isNotEmpty(e)){const o=G(e);if(void 0!==o){const e=o.dialCode.length,n=o.phoneMask??t.substring(2,t.length-e);t=`+ ${"9".repeat(e)} ${n}`}}return t},te=e=>{let t="";return e.split("").forEach(e=>{e.toLowerCase()===e?t+=e:t+=`-${e.toLowerCase()}`}),t},oe=e=>"HTML"===e.nodeName||e===document?e:e.parentNode??e.host,ne=(e,t)=>{if(e===t)return!0;const o=oe(e);return o!==e&&ne(o,t)},ie=e=>1!==e.nodeType?{}:getComputedStyle(e,null),re=e=>{if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}const{overflow:t,overflowX:o,overflowY:n}=ie(e)??{};return/(auto|scroll|overlay)/.test((t??"")+(n??"")+(o??""))?e:re(oe(e))},ae=(e,t=-1/0,o=1/0)=>Math.min(o,Math.max(t,e)),le=(e,t=" ")=>{if(void 0===e)return"";const o=e.split(".");return o[0]=o[0].replace(/^0+(?=\d)/,"").replace(/\B(?=(\d{3})+(?!\d))/g,t),(o[1]??"").length>0?o.join("."):o[0]},se=(e,t=" ")=>void 0===e||isNaN(e)?"":le(String(e),t),de=e=>(e??"").replace(",",".").replace(/\s/g,""),ce=e=>{const t=de(e);if(""===t)return;const o=Number(t);return isNaN(o)?void 0:o},ue=(e,t)=>{null!==t&&null!==e&&(e.selectionStart?(e.focus(),e.setSelectionRange(t,t)):e.focus())},pe=e=>void 0!==e&&null!==e.match(/\s/),he=e=>void 0===e||isNaN(e)?0:e.toString().length,me=t.memo,ye=({isOpen:e,onDropdownClose:o,referenceElement:n,dropdownElement:i,options:r,dependenciesForPositionUpdating:a=[]})=>{const{shouldUsePopper:s=!1,shouldRenderInBody:d=!1,shouldHideOnScroll:c=!1,scrollParent:u="document",canBeFlipped:p=!1,modifiers:h=[],placement:m="bottom-start",flipOptions:y}=r??{};let g;return t.useEffect(()=>{if(!c||!e)return;const t="auto"===u?re(n):"document"===u?document:u;return t.addEventListener("scroll",o),()=>{t.removeEventListener("scroll",o)}},[c,e]),s&&(g=l(n,i,{enabled:e,placement:m,modifiers:[...d?[H]:[],{name:"offset",options:{offset:[0,6]}},{name:"flip",options:{fallbackPlacements:p?["bottom-start","top-start"]:["bottom-start"],...y}},...h]})),t.useEffect(()=>{0!==a.length&&g?.update()},a),g},ge=e=>{const o=t.useRef(e);return t.useLayoutEffect(()=>{o.current=e}),o},fe=({observerOptions:e,...o})=>{const i=ge(o),{ref:r,disconnect:a}=t.useMemo(()=>{const t=new IntersectionObserver(([{isIntersecting:e}])=>{const{current:t}=i;t?.isDisabled||(e?t?.onIntersection?.():t?.onIntersectionEnd?.())},e);return{ref:e=>{t.disconnect(),n.isNotEmpty(e)&&t.observe(e)},disconnect:()=>t.disconnect()}},[i,e]);return t.useEffect(()=>a,[a]),r},Ce=e=>{const o=ge(e),{ref:i,disconnect:r}=t.useMemo(()=>{const e=new ResizeObserver(([e])=>{const{current:t}=o;t.isDisabled||(t.onChange?.(e),t.onTargetChange?.(e.target))});return{ref:t=>{e.disconnect(),n.isNotEmpty(t)&&(e.observe(t),o.current.isDisabled||o.current.onTargetChange?.(t))},disconnect:()=>e.disconnect()}},[o]);return t.useEffect(()=>r,[r]),i},ve=()=>{const e=t.useRef(!1);return t.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),t.useCallback(()=>e.current,[])},xe=e=>t.useMemo(()=>n.mergeRefs(e),e),be=(e,t)=>!!e.classList.contains(t)||e!==document.body&&(!!e.parentElement&&be(e.parentElement,t)),we=(e,t)=>e===t||e!==document.body&&(!!e.parentElement&&we(e.parentElement,t));function Se(e,t,o){Ne(e,t,void 0,o)}function Ne(e,o,i,r){const a=ge({refOrGetter:e,ignoreRef:r,ignoreClassName:i,handler:o});t.useEffect(()=>{const e=e=>{const t=a.current,o=n.isFunction(t.refOrGetter)?t.refOrGetter():t.refOrGetter?.current,i=t.ignoreRef?.current,r=e.target;n.isEmpty(o)||o.contains(r)||n.isNotEmpty(t.ignoreClassName)&&be(r,t.ignoreClassName)||n.isNotEmpty(i)&&we(r,i)||t.handler(e)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e)}},[a])}const ke=({innerStyles:e,tweakStyles:o,className:n,currentComponentName:i})=>{const r=L(i);return t.useMemo(()=>D(e,D(r,o).map(e=>e[n])),[e,n,r,o])},Ee={avatar:' <svg\n width="100%"\n height="100%"\n viewBox="0 0 32 32"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <circle opacity="0.5" cx="16" cy="16" r="16" fill="#DDE3ED" />\n <mask\n id="mask0_0_12744"\n style="mask-type: \'alpha\';"\n maskUnits="userSpaceOnUse"\n x="0"\n y="0"\n width="32"\n height="32"\n >\n <circle cx="16" cy="16" r="16" fill="white" />\n </mask>\n <g mask="url(#mask0_0_12744)">\n <circle cx="16" cy="29" r="13" fill="url(#paint0_linear_0_12744)" />\n <mask\n id="mask1_0_12744"\n style="mask-type: \'alpha\';"\n maskUnits="userSpaceOnUse"\n x="3"\n y="16"\n width="26"\n height="26"\n >\n <circle cx="16" cy="29" r="13" fill="white" />\n </mask>\n <g mask="url(#mask1_0_12744)">\n <ellipse\n cx="16"\n cy="17.5"\n rx="6"\n ry="7.5"\n fill="#505F79"\n fill-opacity="0.204983"\n />\n </g>\n </g>\n <ellipse cx="16" cy="13" rx="6" ry="7" fill="white" />\n <defs>\n <linearGradient\n id="paint0_linear_0_12744"\n x1="13.347"\n y1="46.279"\n x2="33.5318"\n y2="30.8088"\n gradientUnits="userSpaceOnUse"\n >\n <stop stop-color="#ABD229" />\n <stop offset="1" stop-color="#9CD03F" />\n </linearGradient>\n </defs>\n </svg>',calendar:'<svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M6 12h3V9H6v3zm-2 4V7h12l.002 9H4zM16 4h-1V3c0-.552-.448-1-1-1s-1 .448-1 1v1H7V3c0-.552-.448-1-1-1s-1 .448-1 1v1H4c-1.103 0-2 .897-2 2v10c0 1.103.897 2 2 2h12c1.103 0 2-.897 2-2V6c0-1.103-.897-2-2-2z"></path></svg>',check:'<svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="m7.5 13.086 7.793-7.793a1 1 0 1 1 1.414 1.414l-8.5 8.5a1 1 0 0 1-1.414 0l-3.5-3.5a1 1 0 1 1 1.414-1.414L7.5 13.086Z"></path></svg>',"chevron-down-small":'<svg width="100%" height="100%" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M8.24512 8.84751L11.038 6.05461C11.4285 5.66409 12.0617 5.66409 12.4522 6.05461C12.8427 6.44514 12.8427 7.0783 12.4522 7.46883L8.95222 10.9688C8.5617 11.3593 7.92853 11.3593 7.53801 10.9688L4.03801 7.46883C3.64749 7.0783 3.64749 6.44514 4.03801 6.05461C4.42853 5.66409 5.0617 5.66409 5.45222 6.05461L8.24512 8.84751Z"></path></svg>',"chevron-down":'<svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M10.0029 11.6053L5.71004 7.31242C5.31951 6.9219 4.68635 6.9219 4.29582 7.31242C3.9053 7.70295 3.9053 8.33611 4.29582 8.72664L9.29582 13.7266C9.68635 14.1172 10.3195 14.1172 10.71 13.7266L15.71 8.72664C16.1006 8.33611 16.1006 7.70295 15.71 7.31242C15.3195 6.9219 14.6863 6.9219 14.2958 7.31242L10.0029 11.6053Z"></path></svg>',"chevron-left":'<svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M8.41421 10L12.7071 5.70711C13.0976 5.31658 13.0976 4.68342 12.7071 4.29289C12.3166 3.90237 11.6834 3.90237 11.2929 4.29289L6.29289 9.29289C5.90237 9.68342 5.90237 10.3166 6.29289 10.7071L11.2929 15.7071C11.6834 16.0976 12.3166 16.0976 12.7071 15.7071C13.0976 15.3166 13.0976 14.6834 12.7071 14.2929L8.41421 10Z"></path></svg>',"chevron-right":'<svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M11.5858 10L7.29289 5.70711C6.90237 5.31658 6.90237 4.68342 7.29289 4.29289C7.68342 3.90237 8.31658 3.90237 8.70711 4.29289L13.7071 9.29289C14.0976 9.68342 14.0976 10.3166 13.7071 10.7071L8.70711 15.7071C8.31658 16.0976 7.68342 16.0976 7.29289 15.7071C6.90237 15.3166 6.90237 14.6834 7.29289 14.2929L11.5858 10Z"></path></svg>',"close-large":'<svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M6.102 4.709c-.446-.36-1.055-.373-1.415-.012-.39.39-.342 1.072.108 1.523l3.783 3.782-3.783 3.782-.096.108c-.36.446-.373 1.055-.012 1.415.39.391 1.072.342 1.523-.108l3.782-3.783 3.782 3.783.108.097c.446.358 1.055.372 1.415.011.39-.39.342-1.072-.108-1.523l-3.783-3.782L15.19 6.22l.097-.108c.358-.446.372-1.055.011-1.415-.39-.39-1.072-.342-1.523.108L9.992 8.588 6.21 4.805l-.108-.096Z"></path></svg>',"close-window":'<svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="currentColor" d="M4.5 4.5l11 11m0-11l-11 11" stroke-width="2" stroke-linejoin="round" stroke-linecap="round"></path></svg>',close:'<svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M11.985 10l2.407-2.293c.41-.39.41-1.023 0-1.414-.41-.39-1.074-.39-1.485 0L10.5 8.586 8.093 6.293c-.411-.39-1.075-.39-1.485 0-.41.391-.41 1.023 0 1.414L9.015 10l-2.407 2.293c-.41.391-.41 1.023 0 1.414.205.195.473.293.742.293s.538-.098.743-.293l2.407-2.293 2.407 2.293c.205.195.474.293.743.293s.537-.098.742-.293c.41-.391.41-1.023 0-1.414L11.985 10z"></path></svg>',"file-excel":'<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 20 20" fill="none">\n <rect width="20" height="20" rx="4" fill="#21A366"/>\n <rect width="20" height="20" rx="4" fill="url(#paint0_linear_0_16081)" style="mix-blend-mode:overlay"/>\n <path d="M8.00342 14.5244L10.0728 11.3062L12.1357 14.5244H14.4019L11.2217 9.73828L14.1162 5.21875H11.939L10.1108 8.2085L8.24463 5.21875H6.04834L8.93018 9.66846L5.75 14.5244H8.00342Z" fill="white"/>\n <defs>\n <linearGradient id="paint0_linear_0_16081" x1="-9.95187" y1="9.95187" x2="9.95187" y2="29.8556" gradientUnits="userSpaceOnUse">\n <stop stop-color="white" stop-opacity="0.245559"/>\n <stop offset="1" stop-opacity="0.498578"/>\n </linearGradient>\n </defs>\n</svg>',"file-image":'<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 20 20" fill="none">\n <rect width="20" height="20" rx="4" fill="#FF991F"/>\n <rect width="20" height="20" rx="4" fill="url(#paint0_linear_0_16103)" style="mix-blend-mode:overlay"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M3.90113 15C3.09595 15 2.62093 14.097 3.07709 13.4335L6.67606 8.19861C7.07341 7.62064 7.9268 7.62065 8.32414 8.19861L13.0001 15H3.90113Z" fill="white"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M9.53962 15L12.7076 10.2481C13.1034 9.65434 13.9758 9.65434 14.3717 10.2481L16.5031 13.4453C16.9462 14.1099 16.4698 15 15.6711 15H9.53962Z" fill="white"/>\n <path d="M16.0001 5.5C16.0001 6.32843 15.3285 7 14.5001 7C13.6717 7 13.0001 6.32843 13.0001 5.5C13.0001 4.67157 13.6717 4 14.5001 4C15.3285 4 16.0001 4.67157 16.0001 5.5Z" fill="white"/>\n <defs>\n <linearGradient id="paint0_linear_0_16103" x1="-9.95187" y1="9.95187" x2="9.95187" y2="29.8556" gradientUnits="userSpaceOnUse">\n <stop stop-color="white" stop-opacity="0.245559"/>\n <stop offset="1" stop-opacity="0.498578"/>\n </linearGradient>\n </defs>\n</svg>',"file-other":'<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 20 20" fill="none">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M18 6.60751L11.392 -0.000488281L5 0.000113437C3.34315 0.000113437 2 1.34326 2 3.00011V17.0001C2 18.657 3.34315 20.0001 5 20.0001H15C16.6569 20.0001 18 18.657 18 17.0001V6.60751ZM17 8.00011L10 1.00011V6.00011C10 7.10468 10.8954 8.00011 12 8.00011H17Z" fill="#AABFFC"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M18 6.60751L11.392 -0.000488281L5 0.000113437C3.34315 0.000113437 2 1.34326 2 3.00011V17.0001C2 18.657 3.34315 20.0001 5 20.0001H15C16.6569 20.0001 18 18.657 18 17.0001V6.60751ZM17 8.00011L10 1.00011V6.00011C10 7.10468 10.8954 8.00011 12 8.00011H17Z" fill="url(#paint0_linear_0_16113)" style="mix-blend-mode:overlay"/>\n <defs>\n <linearGradient id="paint0_linear_0_16113" x1="-5.9615" y1="9.95168" x2="13.4572" y2="25.4862" gradientUnits="userSpaceOnUse">\n <stop stop-color="white" stop-opacity="0.245559"/>\n <stop offset="1" stop-opacity="0.498578"/>\n </linearGradient>\n </defs>\n</svg>',"file-pdf":'<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 20 20" fill="none">\n <rect width="20" height="20" rx="4" fill="#FF5630"/>\n <rect width="20" height="20" rx="4" fill="url(#paint0_linear_0_16087)" style="mix-blend-mode:overlay"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M4.55535 13.6488V11.0388H4.92535C5.65535 11.0388 5.93535 10.9988 6.27535 10.8688C6.97535 10.5988 7.36535 9.92876 7.36535 8.99876C7.36535 8.21876 7.07535 7.57876 6.57535 7.25876C6.27535 7.06876 5.82535 6.97876 5.09535 6.97876H2.98535V13.6488H4.55535ZM4.84535 9.90876H4.54535V8.10876H4.84535C5.51535 8.10876 5.75535 8.34876 5.75535 9.02876C5.75535 9.66876 5.51535 9.90876 4.84535 9.90876ZM11.6393 13.4388C11.2793 13.5988 10.9993 13.6488 10.4393 13.6488H8.21935V6.97876H10.2593C11.2393 6.97876 11.7193 7.11876 12.1093 7.52876C12.5993 8.02876 12.7693 8.71876 12.7693 10.1388C12.7693 10.9388 12.7093 11.6788 12.6093 12.1588C12.4893 12.7388 12.1193 13.2188 11.6393 13.4388ZM10.0793 12.5188H9.79935V8.10876H10.0193C10.9713 8.10876 11.1466 8.35839 11.1586 9.95112L11.1593 10.1488C11.1593 12.2088 11.0193 12.5188 10.0793 12.5188ZM15.3333 10.8188V13.6488H13.7533V6.97876H17.6033V8.23876H15.3333V9.58876H17.4433V10.8188H15.3333Z" fill="white"/>\n <defs>\n <linearGradient id="paint0_linear_0_16087" x1="-9.95187" y1="9.95187" x2="9.95187" y2="29.8556" gradientUnits="userSpaceOnUse">\n <stop stop-color="white" stop-opacity="0.245559"/>\n <stop offset="1" stop-opacity="0.498578"/>\n </linearGradient>\n </defs>\n</svg>',"file-word":'<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 20 20" fill="none">\n <rect width="20" height="20" rx="4" fill="#2C7CD3"/>\n <rect width="20" height="20" rx="4" fill="url(#paint0_linear_0_16075)" style="mix-blend-mode:overlay"/>\n <path d="M8.0542 14.9946L9.90137 8.0376L11.7549 14.9946H13.748L16.0078 5.68896H14.1162L12.688 12.189L11.0566 5.68896H8.82227L7.12109 12.0811L5.71826 5.68896H3.79492L6.0166 14.9946H8.0542Z" fill="white"/>\n <defs>\n <linearGradient id="paint0_linear_0_16075" x1="-9.95187" y1="9.95187" x2="9.95187" y2="29.8556" gradientUnits="userSpaceOnUse">\n <stop stop-color="white" stop-opacity="0.245559"/>\n <stop offset="1" stop-opacity="0.498578"/>\n </linearGradient>\n </defs>\n</svg>',"file-xml":'<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 20 20" fill="none">\n <rect width="20" height="20" rx="4" fill="#FF991F"/>\n <rect width="20" height="20" rx="4" fill="url(#paint0_linear_2163_24057)" style="mix-blend-mode:overlay"/>\n <path d="M1.97561 5.99658L3.56111 9.43008L1.84961 13.0001H3.66611L4.21211 11.6771C4.40111 11.0996 4.45361 10.8791 4.49561 10.6166H4.52711C4.54811 10.8686 4.61111 11.1101 4.77911 11.5826L5.34611 13.0001H7.20461L5.49311 9.44058L7.07861 5.99658H5.28311L4.86311 7.06758C4.85261 7.08858 4.83161 7.16208 4.80011 7.25658C4.75811 7.44558 4.70561 7.63458 4.65311 7.82358C4.60061 8.02308 4.57961 8.10708 4.56911 8.23308H4.52711C4.49561 8.02308 4.43261 7.78158 4.27511 7.23558L3.82361 5.99658H1.97561Z" fill="white"/>\n <path d="M7.53437 5.99658V13.0001H9.05687V9.78708L9.02537 9.34608L8.98337 8.41158C8.98337 8.33808 8.96237 8.00208 8.92037 7.47708H8.98337C9.05687 7.90758 9.10937 8.21208 9.18287 8.53758C9.24587 8.87358 9.34037 9.28308 9.44537 9.77658L10.1804 13.0001H11.3984L12.1544 9.59808C12.2909 8.98908 12.5324 7.79208 12.5744 7.47708H12.6374C12.6059 7.80258 12.5849 8.01258 12.5744 8.22258L12.5534 8.98908C12.5429 9.25158 12.5324 9.52458 12.5219 9.80808V13.0001H14.0444V5.99658H11.6714L11.2409 8.10708C11.0834 8.74758 10.8419 10.3751 10.8419 10.8161L10.7999 10.8266C10.7894 10.2911 10.5269 8.61108 10.3274 7.85508L9.92837 5.99658H7.53437Z" fill="white"/>\n <path d="M14.8685 5.99658V13.0001H18.89V11.6666H16.5275V5.99658H14.8685Z" fill="white"/>\n <defs>\n <linearGradient id="paint0_linear_2163_24057" x1="-9.95187" y1="9.95187" x2="9.95187" y2="29.8556" gradientUnits="userSpaceOnUse">\n <stop stop-color="white" stop-opacity="0.245559"/>\n <stop offset="1" stop-opacity="0.498578"/>\n </linearGradient>\n </defs>\n</svg>',"file-zip":'<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 20 20" fill="none">\n <g clip-path="url(#clip0_922_22603)">\n <path d="M16 0H4C1.79086 0 0 1.79086 0 4V16C0 18.2091 1.79086 20 4 20H16C18.2091 20 20 18.2091 20 16V4C20 1.79086 18.2091 0 16 0Z" fill="#A1D237"/>\n <path d="M16 0H4C1.79086 0 0 1.79086 0 4V16C0 18.2091 1.79086 20 4 20H16C18.2091 20 20 18.2091 20 16V4C20 1.79086 18.2091 0 16 0Z" fill="url(#paint0_linear_922_22603)" style="mix-blend-mode:overlay"/>\n <path d="M8.32086 14V12.6807H6.32086C5.92513 12.6807 5.72193 12.6927 5.58289 12.7166C5.64706 12.6207 5.68984 12.5367 5.73262 12.4528C5.7861 12.3568 5.83957 12.2609 5.89305 12.1529L8.28877 7.22339V6H4.17112V7.31934H6.20321C6.39572 7.31934 6.59893 7.30735 6.69519 7.29535C6.58824 7.47526 6.49198 7.65517 6.41711 7.81109L4 12.8246V14H8.32086ZM10.4813 14V6H9.03743V14H10.4813ZM12.9519 14V10.8096H13.4439C14.2139 10.8096 14.5241 10.7616 14.877 10.6057C15.5936 10.2699 16 9.47826 16 8.38681C16 7.45127 15.6898 6.69565 15.1444 6.32384C14.8342 6.09595 14.3743 6 13.6364 6H11.508V14H12.9519ZM13.4118 9.6102H12.9519V7.1994H13.3797C13.7219 7.1994 13.9679 7.24738 14.107 7.34333C14.385 7.53523 14.5241 7.87106 14.5241 8.38681C14.5241 8.91454 14.4064 9.25037 14.1497 9.44228C13.9893 9.57421 13.8075 9.6102 13.4118 9.6102Z" fill="white"/>\n </g>\n <defs>\n <linearGradient id="paint0_linear_922_22603" x1="-9.95187" y1="9.95187" x2="9.95187" y2="29.8556" gradientUnits="userSpaceOnUse">\n <stop stop-color="white" stop-opacity="0.245559"/>\n <stop offset="1" stop-opacity="0.498578"/>\n </linearGradient>\n <clipPath id="clip0_922_22603">\n <rect width="20" height="20" fill="white"/>\n </clipPath>\n </defs>\n</svg>',filter:'<svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M12 11c1.306 0 2.417.834 2.829 2H17c.552 0 1 .448 1 1s-.448 1-1 1h-2.17c-.412 1.165-1.524 2-2.83 2s-2.418-.835-2.83-2H3c-.552 0-1-.448-1-1s.448-1 1-1h6.171c.412-1.166 1.523-2 2.829-2zM5 3c1.306 0 2.417.834 2.829 2H17c.552 0 1 .448 1 1s-.448 1-1 1H7.83C7.417 8.165 6.305 9 5 9 3.343 9 2 7.657 2 6s1.343-3 3-3z"></path></svg>',information:'<svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M10 8c-.552 0-1-.448-1-1s.448-1 1-1 1 .448 1 1-.448 1-1 1zm0 8c3.307 0 6-2.693 6-6 0-3.308-2.693-6-6-6-3.308 0-6 2.692-6 6 0 3.307 2.692 6 6 6zm0-14c2.122 0 4.157.843 5.657 2.343S18 7.878 18 10s-.843 4.157-2.343 5.657S12.122 18 10 18s-4.157-.843-5.657-2.343S2 12.122 2 10c0-4.418 3.582-8 8-8zm0 12c-.552 0-1-.448-1-1v-3c0-.552.448-1 1-1s1 .448 1 1v3c0 .552-.448 1-1 1z"></path></svg>',menu:'<svg width="100%" height="100%" viewBox="1 1 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M5.08154 9.02148C5.08154 8.77083 5.16211 8.55778 5.32324 8.38232C5.48438 8.20687 5.70817 8.11914 5.99463 8.11914C6.28109 8.11914 6.50667 8.20687 6.67139 8.38232C6.8361 8.55778 6.91846 8.77083 6.91846 9.02148C6.91846 9.27214 6.8361 9.47803 6.67139 9.63916C6.50667 9.80029 6.28109 9.88086 5.99463 9.88086C5.70817 9.88086 5.48438 9.80029 5.32324 9.63916C5.16211 9.47803 5.08154 9.27214 5.08154 9.02148ZM8.08154 9.02148C8.08154 8.77083 8.16211 8.55778 8.32324 8.38232C8.48438 8.20687 8.70817 8.11914 8.99463 8.11914C9.28109 8.11914 9.50667 8.20687 9.67139 8.38232C9.8361 8.55778 9.91846 8.77083 9.91846 9.02148C9.91846 9.27214 9.8361 9.47803 9.67139 9.63916C9.50667 9.80029 9.28109 9.88086 8.99463 9.88086C8.70817 9.88086 8.48438 9.80029 8.32324 9.63916C8.16211 9.47803 8.08154 9.27214 8.08154 9.02148ZM11.0815 9.02148C11.0815 8.77083 11.1621 8.55778 11.3232 8.38232C11.4844 8.20687 11.7082 8.11914 11.9946 8.11914C12.2811 8.11914 12.5067 8.20687 12.6714 8.38232C12.8361 8.55778 12.9185 8.77083 12.9185 9.02148C12.9185 9.27214 12.8361 9.47803 12.6714 9.63916C12.5067 9.80029 12.2811 9.88086 11.9946 9.88086C11.7082 9.88086 11.4844 9.80029 11.3232 9.63916C11.1621 9.47803 11.0815 9.27214 11.0815 9.02148Z"></path></svg>',minus:'<svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M16 11H4a1 1 0 1 1 0-2h12a1 1 0 1 1 0 2Z"></path></svg>',plus:'<svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M16 11h-5v5a1 1 0 1 1-2 0v-5H4a1 1 0 1 1 0-2h5V4a1 1 0 0 1 2 0v5h5a1 1 0 1 1 0 2Z"></path></svg>',search:'<svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M9 2c3.866 0 7 3.134 7 7 0 1.7-.606 3.259-1.614 4.472l2.589 2.59c.39.39.39 1.023 0 1.414-.39.39-1.024.39-1.414 0l-2.662-2.661C11.785 15.563 10.443 16 9 16c-3.866 0-7-3.134-7-7s3.134-7 7-7zm0 2C6.239 4 4 6.239 4 9s2.239 5 5 5 5-2.239 5-5-2.239-5-5-5z"></path></svg>',"status-error":'<svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M10 0C4.48 0 0 4.48 0 10s4.48 10 10 10 10-4.48 10-10S15.52 0 10 0z"></path><path fill-rule="evenodd" clip-rule="evenodd" fill="#FFF" stroke="none" d="M14 11H6c-.552 0-1-.448-1-1s.448-1 1-1h8c.552 0 1 .448 1 1s-.448 1-1 1z"></path></svg>',"status-info":'<svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M10 0C4.48 0 0 4.48 0 10s4.48 10 10 10 10-4.48 10-10S15.52 0 10 0z"></path><path fill-rule="evenodd" clip-rule="evenodd" fill="#FFF" stroke="none" d="M10 15c-.552 0-1-.448-1-1v-4c0-.552.448-1 1-1s1 .448 1 1v4c0 .552-.448 1-1 1zM10 7c-.552 0-1-.448-1-1s.448-1 1-1 1 .448 1 1-.448 1-1 1z"></path></svg>',"status-not-ok":'<svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M10 0C4.48 0 0 4.48 0 10s4.48 10 10 10 10-4.48 10-10S15.52 0 10 0z"></path><path fill-rule="evenodd" clip-rule="evenodd" fill="#FFF" stroke="none" d="M11.414 10l2.293-2.293c.391-.391.391-1.023 0-1.414-.39-.391-1.023-.391-1.414 0L10 8.586 7.707 6.293c-.39-.391-1.023-.391-1.414 0-.39.391-.39 1.023 0 1.414L8.586 10l-2.293 2.293c-.39.391-.39 1.023 0 1.414.195.195.451.293.707.293.256 0 .512-.098.707-.293L10 11.414l2.293 2.293c.195.195.451.293.707.293.256 0 .512-.098.707-.293.391-.391.391-1.023 0-1.414L11.414 10z"></path></svg>',"status-ok":'<svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M10 0C4.48 0 0 4.48 0 10s4.48 10 10 10 10-4.48 10-10S15.52 0 10 0z"></path><path fill-rule="evenodd" clip-rule="evenodd" fill="#FFF" stroke="none" d="M8.333 11.252l4.96-4.96c.39-.39 1.024-.39 1.414 0 .39.391.39 1.025 0 1.415L9.04 13.374c-.39.39-1.023.39-1.414 0L5.293 11.04c-.39-.39-.39-1.023 0-1.414.39-.39 1.024-.39 1.414 0l1.626 1.626z"></path></svg>',"status-warning":'<svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M10 0C4.48 0 0 4.48 0 10s4.48 10 10 10 10-4.48 10-10S15.52 0 10 0z"></path><path fill-rule="evenodd" clip-rule="evenodd" fill="#FFF" stroke="none" d="M10 5c-.552 0-1 .448-1 1v4c0 .552.448 1 1 1s1-.448 1-1V6c0-.552-.448-1-1-1zM10 13c-.552 0-1 .448-1 1s.448 1 1 1 1-.448 1-1-.448-1-1-1z"></path></svg>',"trash-can":'<svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M16 6v10c0 1.105-.895 2-2 2H6c-1.105 0-2-.895-2-2V6h12zM8 8c-.552 0-1 .448-1 1v6c0 .552.448 1 1 1s1-.448 1-1V9c0-.552-.448-1-1-1zm4 0c-.552 0-1 .448-1 1v6c0 .552.448 1 1 1s1-.448 1-1V9c0-.552-.448-1-1-1zm0-6l1 1h3c.552 0 1 .448 1 1s-.448 1-1 1H4c-.552 0-1-.448-1-1s.448-1 1-1h3l1-1h4z"></path></svg>'},Re=P("Icon",{root:{display:"flex",alignItems:"center"}}),Ie=({type:e,data:t,testId:o,tweakStyles:r})=>{const a=Re({theme:r}),l=M(),s=l.icons?.[e]??Ee[e];return n.isEmpty(s)?(console.error(`Иконки ${e} не существует`),null):i.jsx("div",{className:a.root,...n.addDataAttributes(t,o),dangerouslySetInnerHTML:{__html:s}})},je=e=>"string"==typeof e?i.jsx(Ie,{type:e}):e,Te=d.size({apply({rects:e,elements:t}){Object.assign(t.floating.style,{minWidth:`${e.reference.width}px`})}}),Me=P("WithPopup",{trigger:{width:"fit-content"},clickable:{cursor:"pointer"},active:{},disabled:{cursor:"auto"},popup:{zIndex:5,outline:"none"},arrow:{},animationEnd:{},animationStart:{},"dropdown-initial":{extend:"animationEnd"},"dropdown-open":{extend:"animationStart"},"dropdown-close":{visibility:"hidden",extend:"animationEnd"},"dropdown-unmounted":{extend:"animationEnd"}}),De=({trigger:e,children:o,middlewares:r=[],eventType:l="click",placement:s=("click"===l?"bottom-end":"top"),hoverDelay:c=0,popupOffset:u=6,arrowProps:p,popupData:h,shouldStopPropagation:m="click"===l,shouldHideOnScroll:y=!1,shouldRenderInBody:g=!0,canBeFlipped:f=!0,isTriggerWrapped:C="hover"===l,isDisabled:v=!1,shouldShowArrow:x=!1,isMinWidthSameAsTrigger:b=!1,hoverOptions:w,clickOptions:S,focusOptions:N,dismissOptions:k,transitionOptions:E,tweakStyles:R,data:I,testId:j,onToggle:T})=>{const M=Me({theme:R}),[D,A]=t.useState(!1),L=D&&!v,F=t.useRef(null),O=(e,t)=>{t?.stopPropagation(),T?.(e,t),A(e)},{refs:B,floatingStyles:z,context:_}=d.useFloating({open:L,middleware:[d.offset(u),f&&d.flip({fallbackAxisSideDirection:"start"}),b&&Te,...r,x&&d.arrow({element:F})],whileElementsMounted:d.autoUpdate,placement:s,onOpenChange:O}),P=d.useHover(_,{enabled:"hover"===l,delay:{open:c,close:0},handleClose:d.safePolygon(),...w}),W=d.useFocus(_,{enabled:"hover"===l,...N}),H=d.useClick(_,{enabled:"click"===l,...S}),$=d.useDismiss(_,{enabled:"click"===l,ancestorScroll:y,...k}),{getFloatingProps:V,getReferenceProps:G}=d.useInteractions([P,H,W,$]),{isMounted:U,status:K}=d.useTransitionStatus(_,{duration:{close:500},...E}),Z=G({ref:B.setReference,...m&&{onClick:n.stopPropagation}}),Y=n.applyAction(e,{referenceProps:C?void 0:Z,triggerProps:{isActive:L,isDisabled:v,...!C&&{data:I,testId:j,...Z}}});return i.jsxs(i.Fragment,{children:[C?i.jsx("div",{className:a(M.trigger,{[M.clickable]:"click"===l,[M.disabled]:v,[M.active]:L}),...Z,...n.addDataAttributes(I,j),children:Y}):Y,U&&i.jsx(d.FloatingPortal,{root:g?document.body:B.reference.current,children:i.jsx("div",{ref:B.setFloating,style:z,className:M.popup,...V(),...n.addDataAttributes(h,j,"popup"),children:i.jsxs("div",{className:M[`dropdown-${K}`],children:[x&&i.jsx(d.FloatingArrow,{...p,ref:F,context:_,className:M.arrow}),n.applyAction(o,{floatingContext:_,onClose:e=>{O(!1,e)}})]})})})]})},Ae=P("ListItem",{root:{display:"flex",alignItems:"center",gap:12,boxSizing:"border-box",fontSize:16,whiteSpace:"nowrap",minHeight:40,padding:[0,16],transition:R.defaultTransition,transitionProperty:"background-color",cursor:"pointer"},default:{},destructive:{},focused:{},disabledItem:{cursor:"default"},spacer:{height:1,backgroundColor:N.BORDER_LIGHT},withIconGap:{paddingLeft:48},icon:{width:20,height:20,flexShrink:0},content:{flexGrow:1},chevron:{}}),Le=({icon:e,item:t,nestedItems:o,size:r,disabled:l,isFocused:s,shouldDrawSpacerAbove:d,shouldDrawSpacerBelow:c,testId:u,tweakStyles:p,view:h="default",withIconGap:m,data:y,onClick:g})=>{const f=Ae({theme:p});return i.jsxs(i.Fragment,{children:[d&&i.jsx("div",{className:f.spacer}),i.jsxs("div",{className:a(f.root,f[h],n.isNotEmpty(r)&&f[r],{[f.disabledItem]:l,[f.withIconGap]:m,[f.focused]:s}),...n.addClickHandler(g,!l),...n.addDataAttributes({...y,disabled:!!l||void 0},u),children:[n.isReactNodeNotEmpty(e)&&i.jsx("span",{className:f.icon,children:je(e)}),i.jsx("span",{className:f.content,children:t}),n.isArrayNotEmpty(o)&&i.jsx("span",{className:a(f.icon,f.chevron),children:i.jsx(Ie,{type:"chevron-right"})})]}),c&&i.jsx("div",{className:f.spacer})]})},Fe=P("List",{root:{minWidth:180,backgroundColor:N.CLASSIC_WHITE,padding:[8,0],listStyle:"none",margin:0,textAlign:"left"},nestedItems:{marginTop:-8,paddingLeft:4}}),Oe={trigger:{width:"100%"}},Be=({items:e,size:o,testId:r,data:l,tweakStyles:s,onClick:d})=>{const c=Fe({theme:s}),u=e.filter(({isHidden:e})=>!e);return i.jsx("div",{className:a(c.root,n.isNotEmpty(o)&&c[o]),...n.addDataAttributes(l,r),children:u.map((a,l)=>{const s={testId:n.getTestId(r,`item-${l}`),size:o,...a,shouldDrawSpacerAbove:a.shouldDrawSpacerAbove&&0!==l,shouldDrawSpacerBelow:a.shouldDrawSpacerBelow&&l!==e.length-1,onClick:e=>((e,{onClick:t})=>{n.isNotEmpty(t)&&(t(e),d?.(e))})(e,a)};return i.jsx(t.Fragment,{children:n.isArrayNotEmpty(a.nestedItems)?i.jsx(De,{eventType:"hover",tweakStyles:Oe,placement:"right-start",popupOffset:0,shouldRenderInBody:!1,trigger:({triggerProps:e})=>i.jsx(Le,{...s,isFocused:e.isActive}),children:i.jsx("div",{className:c.nestedItems,children:i.jsx(Be,{items:a.nestedItems,size:o,onClick:d})})}):i.jsx(Le,{...s})},l)})})},ze=P("AccountInfo",{root:{display:"flex"},account:{display:"flex",position:"relative",alignItems:"center",cursor:"pointer"},accountName:{margin:[0,2,0,10],fontSize:14,transition:R.defaultTransition,transitionProperty:"color"},accountNameOpened:{},accountChevron:{width:16,height:16,transition:R.defaultTransition,transitionProperty:"transform, color"},accountChevronOpened:{transform:"rotate(180deg)"},accountMenu:{position:"absolute",zIndex:90,top:"100%",right:0,marginTop:8},avatarIcon:{width:32,height:32},...R.slideUp}),_e=P("AddButton",{root:{display:"flex",alignItems:"center",padding:"0px 16px",height:52,cursor:"pointer",outline:"none",transition:"border-color 0.1s ease-in, background-color 0.1s ease-in",fontSize:14,"&:hover":{transition:"border-color 0.1s ease-in, background-color 0.1s ease-in"}},disabled:{cursor:"default"},icon:{width:20,display:"inline-block",marginRight:8},fullWidth:{width:"100%"}}),Pe=P("DotsPreloader",{root:{display:"flex",gap:4,"--dot-size":"8px","&::before, &::after":{content:'""',extend:"fadedDot"},"&::before":{animationDelay:"0"},"&::after":{animationDelay:"360ms"}},"@keyframes FadedDots":{"0%":{opacity:.2},"30%":{opacity:1},"100%":{opacity:.2}},fadedDot:{display:"block",animationDuration:750,animationIterationCount:"infinite",animationName:"$FadedDots",borderRadius:"50%",width:"var(--dot-size)",height:"var(--dot-size)",backgroundColor:"currentColor"},dot:{extend:"fadedDot",animationDelay:"180ms"}}),We=({tweakStyles:e})=>{const t=Pe({theme:e});return i.jsx("div",{className:t.root,children:i.jsx("span",{className:t.dot})})},He=()=>i.jsxs("svg",{width:"100%",height:"100%",viewBox:"0 0 40 40",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("defs",{children:i.jsxs("linearGradient",{x1:"8.042%",y1:"0%",x2:"65.682%",y2:"23.865%",id:"a",children:[i.jsx("stop",{stopColor:"currentColor",stopOpacity:"0",offset:"0%"}),i.jsx("stop",{stopColor:"currentColor",stopOpacity:".631",offset:"63.146%"}),i.jsx("stop",{stopColor:"currentColor",offset:"100%"})]})}),i.jsx("g",{transform:"translate(2,2)",fill:"none",children:i.jsx("path",{d:"M36 18c0-9.94-8.06-18-18-18",stroke:"url(#a)",strokeWidth:"3",children:i.jsx("animateTransform",{xmlns:"http://www.w3.org/2000/svg",attributeName:"transform",attributeType:"XML",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",begin:"0s",repeatCount:"indefinite",fill:"freeze"})})})]}),$e=P("SvgPreloader",{root:{display:"flex",width:"100%",height:"100%"}}),Ve=({type:e="default",tweakStyles:t})=>{const o=$e({theme:t}),n=M(),r=n.preloaders?.[e]??He;return"string"==typeof r?i.jsx("div",{className:o.root,dangerouslySetInnerHTML:{__html:r}}):i.jsx(r,{})},Ge=P("ThemedPreloader",{root:{display:"flex"},dots:{},default:{},logo:{},currentColor:{color:"currentColor"}}),Ue=({type:e="default",useCurrentColor:t=!1,data:o,testId:r,tweakStyles:l})=>{const s=Ge({theme:l}),d=ke({tweakStyles:l,className:"tweakDotsPreloader",currentComponentName:"ThemedPreloader"}),c=ke({tweakStyles:l,className:"tweakSvgPreloader",currentComponentName:"ThemedPreloader"});return i.jsx("div",{className:a(s.root,s[e],{[s.currentColor]:t}),...n.addDataAttributes(o,r),children:"dots"===e?i.jsx(We,{tweakStyles:d}):i.jsx(Ve,{type:e,tweakStyles:c})})},Ke=P("Button",{root:{display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",outline:"none",boxSizing:"border-box",transition:R.defaultTransition,transitionProperty:"background-color, color, box-shadow, border-color",maxWidth:"100%",border:[1,"solid","transparent"],position:"relative",boxShadow:"none","&[disabled]":{cursor:"default",pointerEvents:"none"}},primary:{},secondary:{},outline:{},warning:{},destructive:{},text:{},custom:{},children:{},icon:{width:20,height:20,flexShrink:0},iconFromLeft:{flexDirection:"row",gap:6,"& $icon":{marginLeft:-4}},iconFromRight:{flexDirection:"row-reverse",gap:6,"& $icon":{marginRight:-4}},onlyIcon:{},withIcon:{},s:{padding:[0,12],height:32,fontSize:14,letterSpacing:.15,"&$onlyIcon":{padding:0,width:32},"& $icon":{width:16,height:16},"& $iconFromLeft":{gap:4},"& $iconFromRight":{gap:4}},m:{padding:[0,12],height:42,fontSize:16,"& $iconFromLeft":{gap:6},"& $iconFromRight":{gap:6},"&$onlyIcon":{padding:0,width:42}},l:{padding:[0,16],height:48,fontSize:16,"& $iconFromLeft":{gap:6},"& $iconFromRight":{gap:6},"&$onlyIcon":{padding:0,width:48}},xl:{padding:[0,20],height:56,fontSize:16,"&$onlyIcon":{padding:0,width:56},"& $iconFromLeft":{gap:8},"& $iconFromRight":{gap:8}},fullWidth:{minWidth:"auto",width:"100%"},inline:{borderTopLeftRadius:0,borderBottomLeftRadius:0},active:{},content:{display:"flex",alignItems:"center",height:"100%"},loader:{display:"none",position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)"},loading:{"& $content":{visibility:"hidden"},"& $loader":{display:"block"}},disabled:{}}),Ze={tweakDotsPreloader:{fadedDot:{width:6,height:6}}},Ye=e=>"s"===e||"m"===e?Ze:void 0,qe=t.forwardRef(function({type:e="button",children:t,size:o="l",view:r="primary",isFullWidth:l=!1,isInline:s=!1,isDisabled:d=!1,isActive:c=!1,isLoading:u=!1,shouldSkipTabNavigation:p=!1,data:h,testId:m,tweakStyles:y,icon:g,iconPosition:f="left",preloaderType:C="dots",...v},x){const b=Ke({theme:y}),w=ke({innerStyles:Ye(o),tweakStyles:y,className:"tweakPreloader",currentComponentName:"Button"}),S=n.isReactNodeNotEmpty(g),N=n.isReactNodeNotEmpty(t),k=d||u;return i.jsxs("button",{ref:x,type:e,className:a(b.root,b[o],b[r],{[b.disabled]:d,[b.fullWidth]:l,[b.inline]:s,[b.active]:c,[b.loading]:u,[b.onlyIcon]:S&&!N}),tabIndex:p?-1:void 0,disabled:k,...v,...n.addDataAttributes(h,m),children:[i.jsxs("span",{className:a(b.content,{[b.iconFromRight]:N&&S&&"right"===f,[b.iconFromLeft]:N&&S&&"left"===f}),children:[S&&i.jsx("span",{className:b.icon,children:n.isReactNodeNotEmpty(g)&&je(g)}),N&&i.jsx("span",{className:a(b.children,S&&b.withIcon),children:t})]}),u&&i.jsx("span",{className:b.loader,children:i.jsx(Ue,{type:C,useCurrentColor:!0,tweakStyles:w})})]})}),Xe=P("Checkbox",{root:{position:"relative",cursor:"pointer",display:"flex",alignItems:"center",gap:14,width:"fit-content"},checked:{},invalid:{},disabled:{cursor:"default",pointerEvents:"none"},input:{width:1,height:1,position:"absolute",opacity:0},children:{display:"flex",alignItems:"center"},check:{width:18,height:18,borderRadius:2,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box"},labelPositionLeft:{flexDirection:"row-reverse"}});function Je({value:e,children:t,size:o,isChecked:r=!1,isSemiChecked:l=!1,isInvalid:s=!1,isDisabled:d=!1,isReadonly:c=!1,labelPosition:u="right",data:p,testId:h,tweakStyles:m,onSelect:y}){const g=Xe({theme:m}),f=!d&&!c,C=r||l,v=t=>y?.({value:e,isSelected:!C},t);return i.jsxs("label",{className:a(g.root,n.isNotEmpty(o)&&g[o],{[g.checked]:C,[g.invalid]:s,[g.disabled]:d,[g.labelPositionLeft]:"left"===u}),...n.addDataAttributes(p,h),children:[i.jsx("input",{className:g.input,type:"checkbox",checked:C,disabled:d,readOnly:c,...f&&{onChange:v,onKeyDown:n.getSelectKeyHandler(v)}}),i.jsx("div",{className:g.check,children:C&&i.jsx(Ie,{type:l?"minus":"check"})}),n.isReactNodeNotEmpty(t)&&i.jsx("div",{className:g.children,children:t})]})}const Qe=P("CloseButton",{root:{width:40,height:40,maxWidth:"100%",maxHeight:"100%",padding:5,color:N.FONT_MEDIUM,border:0,borderRadius:"50%",appearance:"none",backgroundColor:"transparent",cursor:"pointer",transition:R.defaultTransition,transitionProperty:"background-color","&:hover":{backgroundColor:s(N.BORDER_MAIN,.5)},"&:focus":{backgroundColor:N.GREY_FOCUS},"&:active":{backgroundColor:s(N.FONT_DISABLED,.5)}}}),et=P("CssBaseline",{"@global html, body":{fontFamily:"Arial, sans-serif",color:N.FONT_MAIN,padding:0,margin:0},"@global":{},root:{}}),tt=P("WithMessages",{withMessages:{display:"flex",flexDirection:"column",width:"100%",position:"relative"},error:{color:"red"},info:{color:"gray"},horizontal:{display:"flex","& > *":{flexGrow:1,"&:not(:first-child)":{marginLeft:-1}}},vertical:{display:"flex",flexDirection:"column","& > *:not(:first-child)":{marginTop:-1}},message:{fontSize:12},children:{}}),ot=t.forwardRef(function({children:e,infoMessage:t,errorMessage:o,controlsDirection:r,tweakStyles:l,testId:s,data:d},c){const u=tt({theme:l}),p=n.isReactNodeNotEmpty(o),h=n.isReactNodeNotEmpty(t)&&!p;return i.jsxs("div",{ref:c,className:u.withMessages,"data-invalid":!!p||void 0,...n.addDataAttributes(d,s),children:[n.isReactNodeNotEmpty(e)&&i.jsx("div",{className:a(u.children,{[u.horizontal]:"horizontal"===r,[u.vertical]:"vertical"===r}),children:e}),(p||h)&&i.jsxs("div",{className:u.message,children:[p&&i.jsx("div",{className:u.error,...n.addDataTestId(s,"error"),children:o}),h&&i.jsx("div",{className:u.info,...n.addDataTestId(s,"info"),children:t})]})]})}),nt=e=>n.isObject(e)&&"iconComponent"in e,it=e=>nt(e)?e:{iconComponent:e},{CONTROL:rt,Z_INDEX:at}=k,lt=P("ControlWrapper",{controlWrapper:{"--control-height":rt.HEIGHT-2+"px","--control-padding":`${rt.PADDING}px`,"--icon-size":`${rt.ICON_SIZE}px`,"--icon-inner-size":`${rt.ICON_INNER_SIZE}px`,"--icon-gap":`${rt.ICON_GAP}px`,display:"flex",width:"100%",backgroundColor:"white",position:"relative",border:["solid",1,"gray"],borderRadius:8,boxSizing:"border-box",zIndex:0},disabled:{},focused:{position:"relative",zIndex:at.CONTROL_FOCUS},invalid:{zIndex:at.CONTROL_INVALID},withValue:{},loading:{},minContent:{width:"min-content"},label:{position:"absolute",pointerEvents:"none",left:"var(--control-padding)",top:"calc(var(--control-height) / 2)",transformOrigin:"top left",transform:"translateY(-50%)",transition:R.defaultTransition,transitionProperty:"transform, color",fontSize:16,zIndex:1},activeLabel:{},requiredLabel:{"&:after":{content:'""',display:"block",position:"absolute",top:0,right:-8,width:6,height:6,borderRadius:"50%",backgroundColor:"orange"}},disabledLabel:{},wrapper:{display:"flex",flexGrow:1,minWidth:0,textAlign:"left"},controls:{display:"flex",marginLeft:"auto",flexShrink:0},startControls:{paddingLeft:"var(--control-padding)"},icon:{display:"flex",alignItems:"center",justifyContent:"center",minWidth:"var(--icon-size)",width:"var(--icon-size)",height:"100%",flexShrink:0,cursor:"default","&:last-child":{paddingRight:6}},iconInner:{width:"var(--icon-inner-size)"},customIcon:{width:"unset","& $iconInner":{width:"unset"}},startIcon:{},endIcon:{},activeIcon:{cursor:"pointer",outline:"none"},clearIcon:{"& $iconInner":{width:"var(--icon-inner-size)"}},loader:{"& $iconInner":{width:"var(--icon-inner-size)"}},withStartControls:{},"placement-top":{borderBottomLeftRadius:0,borderBottomRightRadius:0},"placement-bottom":{borderTopLeftRadius:0,borderTopRightRadius:0},"placement-top-left":{borderTopRightRadius:0,borderBottomLeftRadius:0,borderBottomRightRadius:0},"placement-top-right":{borderTopLeftRadius:0,borderBottomLeftRadius:0,borderBottomRightRadius:0},"placement-bottom-left":{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomRightRadius:0},"placement-bottom-right":{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:0},"placement-left":{borderTopRightRadius:0,borderBottomRightRadius:0},"placement-right":{borderTopLeftRadius:0,borderBottomLeftRadius:0},"placement-middle":{borderRadius:0}}),st=({label:e,icon:o,startIcon:r,endIcon:l=o,groupPlacement:s,isInvalid:d,isFocused:c,isRequired:u,isLoading:p,isFullWidth:h,isActive:m,isDisabled:y,hasValue:g,size:f,testId:C,children:v,tweakStyles:x,data:b,onClear:w})=>{const S=lt({theme:x}),[N,k]=t.useState(),E=n.getArray(r).map(it),R=n.getArray(l).map(it),I=n.isArrayNotEmpty(E),j=!p&&n.isArrayNotEmpty(R),T=!y&&!p&&g&&n.isNotEmpty(w),M=j||T||p,D=ke({tweakStyles:x,className:"tweakPreloader",currentComponentName:"ControlWrapper"}),A=Ce({onTargetChange:e=>k(e.clientWidth)}),L=({key:e,iconComponent:t,onClick:o,shouldResetSize:r=!1},l,s)=>i.jsx("div",{className:a(S.icon,S[`${l}Icon`],{[S.activeIcon]:!y&&n.isNotEmpty(o),[S.customIcon]:r}),...n.addClickHandler(o,!y),...n.addDataTestId(C,`${l}-icon`),children:i.jsx("div",{className:S.iconInner,children:je(t)})},e??s);return i.jsxs("div",{className:a(S.controlWrapper,n.isNotEmpty(s)&&S[`placement-${s}`],n.isNotEmpty(f)&&S[f],{[S.invalid]:d,[S.focused]:c,[S.withValue]:g,[S.disabled]:y,[S.loading]:p,[S.minContent]:!h,[S.withStartControls]:I}),style:I?{"--start-controls-width":`${N}px`}:void 0,...n.addDataAttributes(b,C),children:[n.isReactNodeNotEmpty(e)&&i.jsx("div",{className:a(S.label,{[S.requiredLabel]:u,[S.disabledLabel]:y,[S.activeLabel]:c||g||m}),children:e}),i.jsxs("div",{className:S.wrapper,children:[I&&i.jsx("div",{className:a(S.controls,S.startControls),ref:A,children:E.map((e,t)=>L(e,"start",t))}),v,M&&i.jsxs("div",{className:S.controls,children:[T&&L({iconComponent:"close",onClick:w},"clear"),j&&R.map((e,t)=>L(e,"end",t)),p&&i.jsx("div",{className:a(S.icon,S.loader),...n.addDataTestId(C,"loading"),children:i.jsx("div",{className:S.iconInner,children:i.jsx(Ue,{tweakStyles:D})})})]})]})]})},dt=P("Input",{inputContent:{height:"var(--control-height)",padding:[0,"var(--control-padding)"],fontSize:16,fontFamily:"inherit"},input:{extend:"inputContent",width:"100%",outline:"none",outlineStyle:"none",boxSizing:"border-box",border:"none",background:"none",color:"black","&[readonly]":{cursor:"default"},"&::placeholder":{opacity:1},"&::-webkit-date-and-time-value":{textAlign:"left"},MozAppearance:"textfield","&::-webkit-inner-spin-button,&::-webkit-outer-spin-button,&::-webkit-calendar-picker-indicator":{display:"none",WebkitAppearance:"none",margin:0}},defaultWrapper:{display:"flex",flexGrow:1},autoSizeWrapper:{position:"relative",minWidth:0,zIndex:0},autoSized:{position:"absolute",top:0,left:0,height:"100%"},withUnits:{extend:"autoSized",paddingRight:"calc(8px + var(--units-width) - 1px)","& + $fakeValue":{paddingRight:8}},withLabel:{},withValue:{},fakeValue:{extend:"inputContent",visibility:"hidden",maxWidth:"100%",overflow:"hidden",minWidth:8,whiteSpace:"nowrap"},units:{alignSelf:"center",paddingRight:"var(--control-padding)"},focusedInput:{},disabledInput:{},invalidInput:{}}),ct=t.forwardRef(function({value:e="",placeholder:o,label:r,type:l="text",isDisabled:s,autoComplete:d,inputMode:u,isReadonly:p,isInvalid:h,isActive:m,isClearable:y,isAutoSized:g,name:f,tweakStyles:C,maxLength:v,shouldFocusOnMount:x,units:b,testId:w,tabIndex:S,shouldAlwaysShowPlaceholder:N,onChange:k,onPaste:E,onFocus:R,onBlur:I,onKeyDown:j,mask:T,maskPlaceholder:M,alwaysShowMask:D,beforeMaskedStateChange:A,data:L,groupPlacement:F,startIcon:O,icon:B,endIcon:z=B,isLoading:_,isRequired:P,size:W,children:H,...$},V){const G=dt({theme:C}),U=ke({tweakStyles:C,className:"tweakControlWrapper",currentComponentName:"Input"}),[K,Z]=t.useState(!1),[Y,q]=t.useState(),X=t.useRef(null),J=xe([V,X]),Q=u??(["email","tel","url"].includes(l)?l:void 0),ee=K||m,te=n.isArrayLikeNotEmpty(e),oe=n.isReactNodeNotEmpty(b),ne=(!n.isReactNodeNotEmpty(r)||ee||N)&&n.isStringNotEmpty(o),ie=Ce({onTargetChange:e=>q(e.clientWidth)}),re={className:a(G.input,{[G.withUnits]:oe,[G.withValue]:te,[G.withLabel]:n.isReactNodeNotEmpty(r),[G.autoSized]:g,[G.focusedInput]:K,[G.disabledInput]:s,[G.invalidInput]:h}),style:oe&&te?{"--units-width":`${Y}px`}:void 0,value:e,type:l,autoComplete:d,inputMode:Q,disabled:s,placeholder:ne?o:void 0,name:f,maxLength:v,readOnly:p,tabIndex:S,onKeyDown:j,onPaste:E,onFocus:e=>{Z(!0),R?.(e)},onBlur:e=>{Z(!1),I?.(e)},onChange:e=>{k(e.currentTarget.value,e,"change")},...n.addDataTestId(w),...$};return t.useEffect(()=>{x&&X.current?.focus()},[x]),i.jsxs(st,{label:r,isDisabled:s,isFocused:ee,isActive:ne,isInvalid:h,hasValue:te,isFullWidth:!g,tweakStyles:U,onClear:y&&te?async e=>{await k("",e,"clear"),X.current?.focus()}:void 0,data:L,groupPlacement:F,startIcon:O,endIcon:z,isLoading:_,isRequired:P,size:W,children:[i.jsxs("div",{className:a(G.defaultWrapper,{[G.autoSizeWrapper]:oe||g}),children:[n.isNotEmpty(T)?i.jsx(c,{ref:J,mask:T,maskPlaceholder:M,alwaysShowMask:D,beforeMaskedStateChange:A,...re}):i.jsx("input",{ref:J,...re}),(oe||g)&&i.jsx("div",{className:G.fakeValue,children:e}),oe&&te&&i.jsx("div",{className:G.units,ref:ie,children:b})]}),H]})}),ut=t.forwardRef(function({infoMessage:e,errorMessage:t,isInvalid:o,testId:r,tweakStyles:a,...l},s){const d=ke({tweakStyles:a,className:"tweakWithMessages",currentComponentName:"Input"});return i.jsx(ot,{errorMessage:t,infoMessage:e,testId:n.getTestId(r,"wrapper"),tweakStyles:d,children:i.jsx(ct,{...l,ref:s,testId:r,tweakStyles:a,isInvalid:o})})}),pt="__.__.____",ht=`${pt} - ${pt}`,mt=P("DateInput",{root:{width:"100%",height:"100%",cursor:"pointer",position:"relative"}}),yt=t.forwardRef(function({date:e,startDate:t="",endDate:o="",mask:r,className:l,placeholder:s,data:d,isRange:c=!1,tweakStyles:u,onClick:p,onChange:h,...m},y){const g=mt({theme:u}),f=ke({tweakStyles:u,className:"tweakInput",currentComponentName:"DateInput"});return i.jsx("div",{className:a(g.root,l),...n.addDataAttributes(d),onClick:p,children:i.jsx(ut,{...m,ref:y,value:c?`${t}${o}`:e,mask:r??(c?"99.99.9999 - 99.99.9999":"99.99.9999"),placeholder:s??(c?ht:pt),tweakStyles:f,onChange:(e,t)=>{"click"===t.type&&(t.target.value=""),h?.(t,e)},beforeMaskedStateChange:({nextState:e})=>e.value===pt||e.value===ht?{value:"",selection:{start:0,end:0}}:e})})});class gt extends h{handleClickOutside;constructor(e){super(e),this.handleClickOutside=this.handleCalendarClickOutside,this.handleCalendarClickOutside=n.doNothing}}const ft={tweakControlWrapper:{startControls:{position:"absolute",left:0,top:0,height:"100%",pointerEvents:"none"},controlWrapper:{borderColor:"transparent"}},inputContent:{paddingLeft:"calc(var(--start-controls-width) + var(--control-padding))"}},Ct=t.forwardRef(function({isClearable:e=!0,tweakStyles:t,...o},n){const r=ke({innerStyles:ft,tweakStyles:t,className:"tweakInput",currentComponentName:"SearchInput"});return i.jsx(ut,{ref:n,startIcon:"search",isClearable:e,tweakStyles:r,...o})}),vt={active:!0,elementType:"div",options:{behavior:"smooth",scrollMode:"if-needed"}};class xt extends t.PureComponent{static defaultProps=vt;node=t.createRef();componentDidMount(){const{active:e}=this.props;e&&this.handleScrollIntoViewIfNeeded()}componentDidUpdate({active:e}){const{active:t}=this.props;!e&&t&&this.handleScrollIntoViewIfNeeded()}handleScrollIntoViewIfNeeded=()=>{const{options:e}=this.props,{current:t}=this.node;t&&g(t,e)};render(){const{active:e,elementType:o,children:n,options:i,...r}=this.props;return t.createElement(o??"div",{ref:this.node,...r},n)}}const bt=-2,wt=-1,St=[10,20],Nt=P("SelectList",{root:{borderRadius:k.BORDER_RADIUS_SMALL,boxShadow:"0 13px 74px -27px rgba(0, 0, 0, 0.11)",boxSizing:"border-box",padding:[10,0],fontSize:16,overflow:"hidden"},withListHeader:{paddingTop:0},withListFooter:{paddingBottom:0},listHeader:{},listFooter:{},list:{height:"100%",maxHeight:240,cursor:"pointer",backgroundColor:N.CLASSIC_WHITE,...E.withScrollBar},cell:{display:"flex",cursor:"pointer",minHeight:40,width:"auto",padding:St,alignItems:"center",boxSizing:"border-box",fontSize:14},cellWithCheckbox:{padding:0},noMatchesLabel:{pointerEvents:"none"},focused:{},active:{},disabled:{cursor:"default"},loading:{cursor:"default",pointerEvents:"none"},defaultCell:{}}),kt={root:{padding:St,width:"100%"},input:{display:"none"}},Et=({classes:e,index:t,isSemiChecked:o,isDisabled:r,isActive:l,children:s,isFocused:d,isMultiSelect:c,data:u,onOptionSelect:p,onToggleCheckbox:h})=>{const m=c&&i.jsx(Je,{isChecked:l||o,isSemiChecked:o,isDisabled:r,tweakStyles:kt,onSelect:({isSelected:e},o)=>h(t,e,o),children:s});return i.jsx(xt,{active:d,options:{block:"nearest"},className:a(e.cell,{[e.cellWithCheckbox]:c,[e.focused]:d,[e.active]:l&&!c,[e.disabled]:r}),...n.addDataAttributes({disabled:r,active:l,focused:d,...u}),onClick:r||c?void 0:e=>p(t,e),children:c?m:s})};function Rt({options:e,focusedIndex:o,size:r,activeValue:l,defaultOptionLabel:s,noMatchesLabel:d="Совпадений не найдено",isLoading:c,loadingLabel:u="Загрузка...",tweakStyles:p,testId:h,shouldScrollToList:m=!0,areAllOptionsSelected:y,customListHeader:g,customListFooter:f,isMultiSelect:C,isOptionDisabled:v,allOptionsLabel:x,onOptionSelect:b,onToggleCheckbox:w,convertValueToString:S,convertValueToReactNode:N=S,convertValueToId:k}){const E=Nt({theme:p}),R=n.isReactNodeNotEmpty(g),I=n.isReactNodeNotEmpty(f),j=t.useMemo(()=>e.map(v),[e,v]),T=t.useMemo(()=>e.map((e,t)=>N(e,j[t])),[e,N,j]),M=t.useMemo(()=>new Set(n.getArray(l).map(k)),[l,k]);return i.jsxs(xt,{active:m&&!C,className:a(E.root,n.isNotEmpty(r)&&E[r],{[E.withListHeader]:R,[E.withListFooter]:I}),children:[R&&i.jsx("div",{className:E.listHeader,children:g}),i.jsx("div",{className:E.list,...n.addDataTestId(h),tabIndex:-1,children:c?i.jsx("div",{className:a(E.cell,E.loading),children:u}):i.jsxs(i.Fragment,{children:[n.isReactNodeNotEmpty(s)&&i.jsx(xt,{active:o===bt,options:{block:"nearest"},className:a(E.cell,E.defaultCell,o===bt&&E.focused),onClick:e=>b(bt,e),children:s}),n.isReactNodeNotEmpty(x)&&i.jsx(Et,{classes:E,index:wt,isSemiChecked:M.size>0&&!y,isActive:y,isFocused:o===wt,isMultiSelect:C,onOptionSelect:b,onToggleCheckbox:w,children:x}),T.map((t,n)=>{const r=e[n],a=k(r),l=o===n,s=M.has(a),d=j[n];return i.jsx(Et,{classes:E,index:n,isDisabled:d,isActive:s,isFocused:l,isMultiSelect:C,onOptionSelect:b,onToggleCheckbox:w,data:{id:a},children:t},n)}),0===T.length&&i.jsx("div",{className:a(E.cell,E.noMatchesLabel),children:d})]})}),I&&i.jsx("div",{className:E.listFooter,children:f})]})}const It=e=>"object"==typeof e&&null!==e&&(e?.isDisabled??!1),jt=e=>void 0===e?void 0:String(e),Tt=(e,t)=>e===t,{Z_INDEX:Mt}=k,Dt=P("Select",{root:{width:"100%",position:"relative",boxSizing:"border-box"},inputWrapper:{width:"100%",cursor:"text"},listWrapper:{left:-1,zIndex:3,width:"fit-content",minWidth:"calc(100% + 1px)"},withoutPopper:{position:"absolute",top:"100%",paddingTop:4},listWrapperInBody:{minWidth:"auto",width:"auto",maxWidth:"min-content"},arrow:{width:"var(--icon-inner-size, 20px)",height:"var(--icon-inner-size, 20px)",cursor:"pointer",transition:R.defaultTransition,transitionProperty:"transform",zIndex:Mt.CONTROL_FOCUS+1},activeArrow:{transform:"rotate(180deg)"},disabled:{"& $arrow":{cursor:"default"}},counter:{}}),At={input:{"&[readonly]":{cursor:"pointer"}}},Lt={input:{cursor:"pointer"}},Ft=n.mergeStyles(At,Lt),Ot=n.mergeStyles(At,Lt),Bt=({hasReadonlyInput:e,isMultiSelect:t})=>e&&t?Ot:e&&!t?Ft:At;function zt(e){const{options:o,isMultiSelect:r,value:l,header:s,footer:d,defaultOptionLabel:c,allOptionsLabel:u,debounceTime:p=400,optionsMode:h="normal",noMatchesLabel:g,loadingLabel:f,tweakStyles:C,testId:v,isActive:x,isReadonly:b,isDisabled:w,dropdownOptions:S,minSymbolsCountToOpenList:N=0,dropdownIcon:k="chevron-down",shouldScrollToList:E=!0,searchInput:R,icon:I,endIcon:j=I,onChange:T,onFocus:M,onBlur:D,onType:A,onOpen:L,isOptionDisabled:F=It,compareValuesOnChange:O=Tt,convertValueToString:B=jt,convertValueToId:z,convertValueToReactNode:_,optionsFilter:P,infoMessage:W,errorMessage:H,size:$,...V}=e,G=Dt({theme:C}),{shouldRenderInList:U=!1,...K}=R??{},Z="normal"!==h&&U,Y=b||"normal"===h||U,q=ke({tweakStyles:C,className:"tweakWithMessages",currentComponentName:"Select"}),X=ke({innerStyles:Bt({hasReadonlyInput:Y,isMultiSelect:r}),tweakStyles:C,className:"tweakInput",currentComponentName:"Select"}),J=ke({tweakStyles:C,className:"tweakSearchInput",currentComponentName:"Select"}),Q=ke({tweakStyles:C,className:"tweakSelectList",currentComponentName:"Select"}),ee=ve(),[te,oe]=t.useState(!1),[ie,re]=t.useState(!1),ae=n.isReactNodeNotEmpty(c),[le,se]=t.useState(bt),[de,ce]=t.useState(""),[ue,pe]=t.useState(!0),he=t.useRef(null),me=t.useRef(null),ge=t.useRef(null),fe=t.useRef(null),Ce=r?l?.[0]:l,xe=r&&n.isStringNotEmpty(u)&&""===de,be=t.useMemo(()=>{if("search"!==h)return o;return(P??n.createFilter(e=>[B(e)??""]))(o,de)},[P,o,B,de,h]),we=t.useMemo(()=>o.filter(e=>!F(e)),[o,F]),Ne=r&&l?.length===we.length,Ee=r&&n.isNotEmpty(l)&&l.length>1&&!Ne,Re=t.useMemo(()=>{const e=[];return ue&&ae&&e.push(bt),xe&&e.push(wt),e.concat(be.reduce((e,t,o)=>(F(t)||e.push(o),e),[]))},[be,ae,F,xe,ue]),Ie=n.isNotEmpty(Ce)?B(Ce):void 0,Te=Ne&&n.isNotEmpty(u)?u:Ie,Me=t.useCallback(e=>(z??(e=>t=>n.isNotEmpty(t?.id)?String(t.id):e(t))(B))(e),[z,B]),De=t.useCallback(()=>{oe(!1),ce(""),pe(!0)},[S?.shouldUsePopper]),Ae=t.useCallback(e=>{te&&(De(),D?.(e))},[te,De,D]),Le=()=>{b||te||oe(!0)},Fe=t.useCallback((e,t)=>{O(l,e)||T(e,t)},[l,O,T]),Oe=t.useCallback((e,t)=>{Fe(e===bt?void 0:be[e],t),Ae(t),fe.current?.blur()},[Fe,Ae,be]),Be=t.useCallback((e,t,o)=>{if(!r)return;if(e===bt||e===wt&&!t)return void Fe(void 0,o);if(e===wt&&t)return void Fe(we,o);const n=be[e];Fe(t?[...l??[],n]:l?.filter(e=>Me(e)!==Me(n)),o)},[r,be,Fe,l,we,Me]),ze=t.useCallback(async e=>{void 0!==A&&(ee()&&re(!0),await A(e),ee()&&re(!1),"dynamic"===h&&pe(""===e))},[ee,A,h]),_e=t.useMemo(()=>y.debounce(ze,p,{isImmediate:0===p}),[ze,p]),Pe=(e,t)=>{void 0!==A&&_e(e),"dynamic"!==h&&pe(""===e),""!==e||Z||Fe(void 0,t),ce(e)};Se(ge,Ae,me);const We=de.trim().length>=N,He=te&&(be.length>0||void 0!==c&&!We||V.isLoading||void 0!==g||Z)&&("normal"===h||We),$e=e=>{if(te&&!He)return void Ae(e);if(!n.isNotEmpty(e.relatedTarget)||!n.isNotEmpty(ge.current)||!n.isNotEmpty(me.current))return;ne(e.relatedTarget,ge.current)||ne(e.relatedTarget,me.current)||Ae(e)},{shouldUsePopper:Ve=!1,shouldRenderInBody:Ge=!1,shouldHideOnScroll:Ue=!1}=S??{},Ke=ye({isOpen:He,onDropdownClose:Ae,referenceElement:me.current,dropdownElement:ge.current,options:S,dependenciesForPositionUpdating:[V.isLoading,be.length]});t.useEffect(()=>{const e=n.isNotEmpty(Ce)?Re.find(e=>{const t=be[e];return n.isNotEmpty(t)&&Me(t)===Me(Ce)}):void 0;se(e??Re[0])},[Ce,be,Re,Me]),t.useEffect(()=>{He&&L?.()},[He]);const Ze=Z&&i.jsx(Ct,{size:$,value:de,onChange:Pe,tweakStyles:J,placeholder:"Поиск",...K}),Ye=(n.isReactNodeNotEmpty(Ze)||n.isReactNodeNotEmpty(s))&&i.jsxs(i.Fragment,{children:[Ze,s]}),qe=i.jsx("div",{className:a(G.listWrapper,{[G.withoutPopper]:!Ve,[G.listWrapperInBody]:Ge}),ref:ge,style:Ke?.styles.popper,tabIndex:0,onBlur:$e,...Ke?.attributes.popper,children:He&&i.jsx(Rt,{options:be,size:$,defaultOptionLabel:ae&&ue&&c,allOptionsLabel:xe&&u,areAllOptionsSelected:Ne,customListHeader:Ye,customListFooter:n.applyAction(d,{filteredOptions:be}),noMatchesLabel:g,focusedIndex:le,activeValue:l,isLoading:V.isLoading,loadingLabel:f,tweakStyles:Q,testId:n.getTestId(v,"list"),isMultiSelect:r,shouldScrollToList:E&&!Ve&&!Ue,isOptionDisabled:F,convertValueToString:B,convertValueToReactNode:_,convertValueToId:Me,onOptionSelect:Oe,onToggleCheckbox:Be})});return i.jsx(ot,{errorMessage:H,infoMessage:W,tweakStyles:q,testId:n.getTestId(v,"wrapper"),children:i.jsxs("div",{className:G.root,onKeyDown:e=>{if(!te)return;e.stopPropagation();const t=Re.findIndex(e=>e===le);switch(e.code){case"Enter":case"NumpadEnter":{let t=le;if(t===bt&&1===be.length&&(t=0),r){let o;if(t===wt)o=Ne;else{const e=be[t],n=Me(e);o=l?.some(e=>Me(e)===n)??!1}Be(t,!o,e)}else Oe(t,e);break}case"ArrowDown":{e.preventDefault();const o=(t+1)%Re.length;se(Re[o]);break}case"ArrowUp":{e.preventDefault();const o=(t-1+Re.length)%Re.length;se(Re[o]);break}}},ref:he,children:[i.jsx("div",{className:a(G.inputWrapper,w&&G.disabled),onClick:w||b?void 0:()=>{Le()},ref:me,children:i.jsx(ct,{value:""===de||U?Te:de,size:$,onChange:Pe,isActive:te||x,isReadonly:Y,onFocus:e=>{M?.(e),Le()},onBlur:$e,isDisabled:w,ref:fe,isLoading:ie,tweakStyles:X,testId:v,icon:[r&&Ee?{key:"counter",iconComponent:i.jsxs("div",{className:G.counter,children:["(+",l.length-1,")"]},"counter"),shouldResetSize:!0}:void 0,...n.getArray(j),i.jsx("div",{className:a(G.arrow,He&&G.activeArrow),onClick:()=>{te?(fe.current?.blur(),De()):fe.current?.focus()},children:je(k)},"arrow")].filter(n.isNotEmpty),...V})}),Ve?i.jsx(m.Portal,{container:Ge?document.body:me.current,children:i.jsx(i.Fragment,{children:qe})}):i.jsx(i.Fragment,{children:He&&qe})]})})}const _t=P("DatePickerHeader",{btn:{width:36,height:36,padding:8,boxSizing:"border-box",border:"none",outline:"none",cursor:"pointer",marginLeft:8},header:{margin:6,display:"flex",alignItems:"center"},buttons:{flexShrink:0,marginLeft:"auto"}}),Pt={tweakSelectList:{cell:{fontSize:14,minHeight:35}},tweakInput:{tweakControlWrapper:{controlWrapper:{"--control-height":"35px",border:"none"}},inputContent:{fontSize:16,fontWeight:"bold"}}},Wt=({date:e,months:o=[],tweakStyles:n,prevMonthButtonDisabled:r,nextMonthButtonDisabled:a,changeYear:l,changeMonth:s,decreaseMonth:d,increaseMonth:c})=>{const u=_t({theme:n}),h=ke({innerStyles:Pt,tweakStyles:n,className:"tweakSelect",currentComponentName:"DatePickerHeader"}),m=t.useMemo(()=>Array.from(Array(41)).map((e,t)=>p.getYear(new Date)-30+t),[]);return i.jsxs("div",{className:u.header,children:[i.jsx(zt,{value:o[p.getMonth(e)],options:o,dropdownIcon:"chevron-down-small",isAutoSized:!0,tweakStyles:h,onChange:e=>s(o.indexOf(e))}),i.jsx(zt,{value:p.getYear(e),options:m,dropdownIcon:"chevron-down-small",isAutoSized:!0,tweakStyles:h,onChange:e=>l(e)}),i.jsxs("div",{className:u.buttons,children:[i.jsx("button",{type:"button",className:u.btn,disabled:r,onClick:d,children:i.jsx(Ie,{type:"chevron-left"})}),i.jsx("button",{type:"button",className:u.btn,disabled:a,onClick:c,children:i.jsx(Ie,{type:"chevron-right"})})]})]})},Ht=e=>i.jsx(d.FloatingPortal,{root:document.body,...e}),$t={ru:f.ru,en:f.enUS},Vt=e=>t=>n.isNotEmpty(t)?p.format(t,e):"",Gt=e=>t=>{const o=t===pt?"":t;return n.isStringNotEmpty(o)?p.parse(t,e,new Date):null},Ut=(e,t)=>n.isEmpty(e)&&n.isEmpty(t)||n.isNotEmpty(e)&&n.isNotEmpty(t)&&p.isSameDay(e,t),Kt=P("DatePicker",{root:{width:"100%",height:"100%"},day:{},dayInner:{},datepicker:{},popper:{zIndex:10,'&[data-placement^="bottom"]':{paddingTop:6},'&[data-placement^="top"]':{paddingBottom:6},'&[data-placement^="left"]':{paddingRight:6},'&[data-placement^="right"]':{paddingLeft:6}}}),Zt=t.forwardRef(function({data:e,selectedDate:o=null,minDate:r,maxDate:l,endDate:s=null,startDate:c=null,locale:u,months:h,calendarStartDay:m=1,dateFormat:y="dd.MM.yyyy",monthsShown:g,placeholder:f,isRange:C=!1,isInline:v=!1,isDisabled:x,isClearable:b,strictParsing:w,fixedHeight:S,focusSelectedMonth:N,disabledKeyboardNavigation:k,shouldRenderPopperInBody:E=!1,allowSameDay:R=!1,shouldCloseOnSelect:I,showPreviousMonths:j,preventOpenOnFocus:T,popperModifiers:M=[],popperPlacement:D="bottom-start",todayButton:A,highlightDates:L,calendarContainer:F,dayClassName:O,customInput:B=yt,customInputRef:z,renderCustomHeader:_,filterDate:P,onYearChange:W,onMonthChange:H,onCalendarOpen:$,onCalendarClose:V,onChangeDate:G,onChangeRange:U,onBlur:K,onFocus:Z,onKeyDown:Y,tweakStyles:q,...X},J){const Q=Kt({theme:q}),ee=ke({tweakStyles:q,className:"tweakDateInput",currentComponentName:"DatePicker"}),{formatDate:te,parseDateValue:oe}=t.useMemo(()=>({formatDate:Vt(y),parseDateValue:Gt(y)}),[y]),ne=t.useRef(),ie=xe([J,ne]),[re,ae]=t.useState(!1),[le,se]=t.useState(te(o)),[de,ce]=t.useState(c),[ue,pe]=t.useState(te(c)),[he,me]=t.useState(s),[ye,ge]=t.useState(te(s)),fe=C?n.isStringNotEmpty(ue)||n.isStringNotEmpty(ye):n.isStringNotEmpty(le),Ce={...X,isRange:C,isDisabled:x,isClearable:b,isActive:re,icon:b&&fe?void 0:"calendar",tweakStyles:ee,...C?{startDate:ue,endDate:ye}:{date:le}},ve=e=>(n.isEmpty(r)||p.isAfter(e,r))&&(n.isEmpty(l)||p.isBefore(e,l)),be=(e,t)=>{!R&&Ut(e?.[0],c)&&Ut(e?.[1],s)||(ce(e?.[0]??null),me(e?.[1]??null),U?.(e,t))},we=(e=null,t=null)=>{let o=te(e);const n=te(t);""===o&&""!==n&&(o=pt),ce(e),pe(o),me(t),ge(n)};return t.useEffect(()=>{se(te(o)),we(c,s)},[o,c,s]),Ne(()=>ne.current?.calendar?.containerRef?.current,e=>ne.current?.handleClickOutside(e),"react-datepicker-ignore-onclickoutside"),i.jsx("div",{className:Q.root,...n.addDataAttributes(e),children:i.jsx(gt,{ref:ie,minDate:r,maxDate:l,locale:n.isString(u)?$t[u]:u,dateFormat:y,placeholderText:f,calendarStartDay:m,inline:v,disabled:x,fixedHeight:S,showPreviousMonths:j,focusSelectedMonth:N,monthsShown:g,allowSameDay:R,showPopperArrow:!1,popperClassName:Q.popper,calendarClassName:Q.datepicker,dayClassName:e=>a(Q.day,O?.(e)),disabledKeyboardNavigation:k,popperContainer:E?Ht:void 0,popperModifiers:[d.offset(-10),...M],popperPlacement:D,strictParsing:w,preventOpenOnFocus:T,shouldCloseOnSelect:I,customInputRef:z,customInput:i.jsx(B,{...Ce}),renderDayContents:e=>i.jsx("div",{className:Q.dayInner,children:e}),renderCustomHeader:_??(e=>i.jsx(Wt,{...e,months:h})),todayButton:A,highlightDates:L,calendarContainer:F,filterDate:P,onYearChange:W,onMonthChange:H,onFocus:Z,onKeyDown:Y,onCalendarOpen:()=>{ae(!0),$?.()},onCalendarClose:()=>{ae(!1),C?(be([de,he]),we(de,he)):se(te(o)),V?.()},onChangeRaw:(e,t)=>{void 0!==t&&(C?(e=>{const t=e.slice(0,10);let o=oe(t);const i=e.slice(13);let r=oe(i);(n.isNotEmpty(o)&&!p.isValid(o)||n.isNotEmpty(o)&&!ve(o))&&(o=de),(n.isNotEmpty(r)&&!p.isValid(r)||n.isNotEmpty(r)&&!ve(r))&&(r=he),(n.isEmpty(o)&&p.isValid(r)||p.isValid(o)&&p.isValid(r)&&p.isAfter(o,r))&&(o=r,r=null),pe(t),ce(o),ge(i),me(r)})(t):se(t))},...C?{startDate:de,endDate:he,selected:de,selectsRange:!0,onBlur:e=>{K?.(e),be([de,he],e),we(de,he)},onChange:be}:{selected:o,onBlur:e=>{K?.(e),se(te(o))},onChange:(e,t)=>{G?.(e,t)}}})})}),Yt=/(http(s?):\/\/(.*))(\s?)/,qt=P("Description",{root:{},button:{cursor:"pointer",display:"inline-block",color:N.FONT_MEDIUM,marginTop:18,textTransform:"capitalize",borderBottom:[1,"dashed",N.FONT_MEDIUM],"&:hover":{color:N.FONT_MAIN}},link:{color:N.FONT_MEDIUM,textDecoration:"none",borderBottom:[1,"dashed",N.FONT_MEDIUM],"&:hover":{color:N.FONT_MAIN}}}),Xt=e=>{e.preventDefault(),e.stopPropagation()},Jt=P("FileInput",{root:{display:"flex",flexDirection:"column",width:"100%"},label:{position:"relative",width:"fit-content",fontSize:16,marginBottom:12},requiredLabel:{"&:after":{content:'""',position:"absolute",right:-8,top:4,transform:"translate(0, -50%)",width:6,height:6,borderRadius:"50%"}},description:{marginBottom:8,fontSize:12},text:{padding:[16,0]},inputWrapper:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",boxSizing:"border-box",marginBottom:8,transition:R.defaultTransition,transitionProperty:"background-color, color"},inputLabel:{position:"absolute",inset:0,cursor:"pointer","& input":{opacity:0,width:1,height:1,zIndex:-1}},dragged:{},active:{},disabled:{cursor:"not-allowed",pointerEvents:"none"},fileList:{display:"flex",flexWrap:"wrap",columnGap:6,rowGap:12}}),Qt=t.forwardRef(function({fileList:e,label:o,text:r,description:l,isDragAndDropDisabled:s=!1,isRequired:d=!1,isReadOnly:c=!1,isMultipleDisabled:u=!1,isDisabled:p=!1,isActive:h=!1,accept:m,onAdd:y,testId:g,tweakStyles:f,data:C},v){const x=Jt({theme:f}),[b,w]=t.useState(!1),S=e=>{p||n.isEmpty(e)||0===e?.length||y?.([...e])},N=e=>{Xt(e),w(!0)},k=e=>{Xt(e),w(!1)},E=s||p?void 0:{onDragOver:N,onDragEnter:N,onDragLeave:k,onDrop:e=>{k(e),S(e.dataTransfer.files)}};return i.jsxs("div",{className:x.root,...n.addDataAttributes(C,g),children:[n.isReactNodeNotEmpty(o)&&i.jsx("div",{className:a(x.label,{[x.requiredLabel]:d}),children:o}),!c&&i.jsxs("div",{className:a(x.inputWrapper,{[x.dragged]:b,[x.disabled]:p,[x.active]:h}),...E,children:[n.isReactNodeNotEmpty(r)&&i.jsx("div",{className:x.text,children:r}),i.jsx("label",{className:x.inputLabel,children:i.jsx("input",{ref:v,type:"file",value:"",onChange:e=>{S(e.target.files)},multiple:!u,disabled:p,accept:m,...n.addDataTestId(g,"input")})})]}),n.isReactNodeNotEmpty(l)&&i.jsx("div",{className:x.description,children:l}),i.jsx("div",{className:x.fileList,children:e})]})}),eo=P("IconButton",{root:{display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",outline:"none",boxSizing:"border-box",transition:R.defaultTransition,transitionProperty:"background-color, color, border-color, opacity, visibility",border:"none",position:"relative",boxShadow:"none",borderRadius:"50%",background:"none",padding:0,flexShrink:0,"&:disabled":{extend:"disabled"},"&:active":{extend:"active"},width:"var(--icon-button-size)",height:"var(--icon-button-size)","--icon-button-icon-size":"20px"},"cancel-light":{},cancel:{},main:{},custom:{},active:{},disabled:{cursor:"not-allowed",pointerEvents:"none"},loading:{"& $loader":{display:"block"}},icon:{display:"flex",alignItems:"center",width:"var(--icon-button-icon-size)",height:"var(--icon-button-icon-size)"},loader:{display:"none",position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",width:"var(--icon-button-icon-size)",height:"var(--icon-button-icon-size)"},s:{"--icon-button-size":"24px"},m:{"--icon-button-size":"32px"},l:{"--icon-button-size":"40px"}}),to=t.forwardRef(function({icon:e,size:t="m",view:o="cancel-light",isDisabled:r=!1,isActive:l=!1,isLoading:s=!1,type:d="button",testId:c,tweakStyles:u,data:p,onClick:h,...m},y){const g=eo({theme:u}),f=r||s;return i.jsx("button",{ref:y,className:a(g.root,g[o],g[t],{[g.disabled]:r,[g.active]:l,[g.loading]:s}),type:d,disabled:r,onClick:f?void 0:h,...m,...n.addDataAttributes(p,c),children:s?i.jsx("span",{className:g.loader,children:i.jsx(Ue,{type:"default",useCurrentColor:!0})}):i.jsx("span",{className:g.icon,children:je(e)})})}),oo=P("Tooltip",{root:{display:"inline-block",boxSizing:"border-box"},tooltip:{fontSize:14,padding:[18,20],letterSpacing:.15,backgroundColor:N.CLASSIC_WHITE,color:N.FONT_MAIN,boxShadow:`0 0 1px ${s(N.FONT_MAIN,.4)}, 0 -2px 6px ${s(N.FONT_MAIN,.06)}, 0 8px 32px -8px ${s(N.FONT_MAIN,.3)}`,borderRadius:12,lineHeight:1.4,maxWidth:320},hint:{whiteSpace:"nowrap",fontSize:12,padding:[8,12],borderRadius:k.BORDER_RADIUS_SMALL,backgroundColor:N.FONT_MEDIUM,color:N.CLASSIC_WHITE,letterSpacing:.2},custom:{},info:{},error:{"&$tooltip":{backgroundColor:N.RED_WARNING,color:N.CLASSIC_WHITE},"&$hint":{backgroundColor:N.RED_WARNING}}}),no=({text:e,view:t="tooltip",type:o="info",size:r,data:l,testId:s,tweakStyles:d})=>{const c=oo({theme:d});return i.jsx("div",{className:a(c.root,c[t],c[o],n.isNotEmpty(r)&&c[r]),...n.addDataAttributes(l,s),children:e})},io=P("TextWithTooltip",{root:{position:"relative"},tooltip:{zIndex:9999},clickable:{cursor:"pointer"}}),ro=({children:e,tooltipText:o,tooltipPosition:r="top",tooltipView:s="tooltip",tooltipType:d="info",tooltipModifiers:c=[],tooltipOffsetOptions:u,tooltipSize:p,isDisabled:h=!1,shouldRenderInBody:y=!0,mouseEventType:g="hover",hoverDelay:f,testId:C,data:v,tweakStyles:x})=>{const b=io({theme:x}),w=ke({tweakStyles:x,className:"tweakTooltip",currentComponentName:"TextWithTooltip"}),[S,N]=t.useState(!1),[k,E]=t.useState(),R=t.useRef(null),I=t.useRef(null),j=void 0!==f;t.useEffect(()=>()=>clearTimeout(k),[]);const{styles:T,attributes:M}=l(R.current,I.current,{enabled:S,placement:r,modifiers:[{name:"offset",options:{offset:[0,6],...u}},...c]});Se(I,()=>{"click"===g&&N(!1)},R);const D="click"===g?{onClick:()=>N(!0)}:{onMouseEnter:()=>{if(j){const e=setTimeout(()=>{N(!0)},f);E(e)}else N(!0)},onMouseLeave:()=>{j&&clearTimeout(k),N(!1)}},A=null!=o&&!h;return i.jsxs("div",{className:a(b.root,"click"===g&&A&&b.clickable),...A?D:void 0,...n.addDataAttributes(v,C),ref:R,children:[A&&i.jsx(m.Portal,{container:y?document.body:R.current,children:i.jsx("div",{className:b.tooltip,style:T.popper,...M.popper,ref:I,children:i.jsx(no,{view:s,type:d,text:o,size:p,tweakStyles:w})})}),e]})},ao={[V.xls]:"file-excel",[V.xlsx]:"file-excel",[V.jpeg]:"file-image",[V.png]:"file-image",[V.pdf]:"file-pdf",[V.doc]:"file-word",[V.docx]:"file-word",[V.xml]:"file-xml",[V.zip]:"file-zip"},lo=e=>{const t=e.split(".");return t.length>1?t.pop():void 0},so=e=>{const t=lo(e);return n.isNotEmpty(t)?V[t]:void 0},co=({type:e,name:t})=>{if(n.isNotEmpty(e)&&e in ao)return ao[e];const o=so(t);return n.isNotEmpty(o)&&o in ao?ao[o]:"file-other"},uo=P("FileItem",{root:{display:"flex",flexDirection:"column",gap:4},fileItemWrapper:{display:"flex",gap:12,width:"100%",cursor:"pointer",boxSizing:"border-box",transition:R.defaultTransition,transitionProperty:"background-color, color, box-shadow, border-color"},m:{"&$fileItemWrapper":{padding:[10,10,10,12]},"--icon-size":"20px"},l:{"&$fileItemWrapper":{padding:[12,16]},"--icon-size":"32px"},fileIcon:{maxWidth:"var(--icon-size)",maxHeight:"var(--icon-size)"},fileName:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",fontSize:16},fileNameContainer:{overflow:"hidden",marginRight:"auto"},preloader:{display:"flex",margin:6},"preloader-dots":{width:26,marginTop:12},"preloader-default":{width:20,height:20},"preloader-logo":{width:20,height:20},metadata:{display:"flex",flexDirection:"column",gap:2,fontSize:12},actions:{display:"flex",flexShrink:0,margin:-6},fileSize:{},footer:{},error:{fontSize:12},info:{fontSize:12},disabled:{cursor:"not-allowed"}}),po={tweakDotsPreloader:{root:{gap:4,"--dot-size":"6px"}}},ho=["THIS_MONTH","LAST_MONTH","THIS_YEAR","LAST_YEAR","CUSTOM"],mo={ru:{clear:"Очистить",all:"Все",chosen:"Выбранные",nothingFound:"Ничего не найдено",searchPlaceholder:"Поиск"},en:{clear:"Clear",all:"All",chosen:"Chosen",nothingFound:"Nothing found",searchPlaceholder:"Search"}},yo={ru:{clear:"Очистить",all:"Все",other:"Остальные",chosen:"Выбранные",nothingFound:"Не найдено",from:"От",to:"До",back:"Назад",searchPlaceholder:"Поиск",displayedFields:"Поля для поиска",months:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],periods:{THIS_MONTH:"Этот месяц",LAST_MONTH:"Прошлый месяц",THIS_YEAR:"Этот год",LAST_YEAR:"Прошлый год",CUSTOM:"Другой период"}},en:{clear:"Clear",all:"All",other:"Others",chosen:"Chosen",nothingFound:"Nothing found",from:"From",to:"To",back:"Back",searchPlaceholder:"Search",displayedFields:"Displayed fields",months:["January","February","March","April","May","June","July","August","September","October","November","December"],periods:{THIS_MONTH:"This month",LAST_MONTH:"Previous month",THIS_YEAR:"This year",LAST_YEAR:"Previous year",CUSTOM:"Custom"}}},go={},fo={THIS_MONTH:()=>{const e=new Date;return{from:p.startOfMonth(e),to:p.endOfMonth(e)}},LAST_MONTH:()=>{const e=p.sub(new Date,{months:1});return{from:p.startOfMonth(e),to:p.endOfMonth(e)}},THIS_YEAR:()=>{const e=new Date;return{from:p.startOfYear(e),to:p.endOfYear(e)}},LAST_YEAR:()=>{const e=p.sub(new Date,{years:1});return{from:p.startOfYear(e),to:p.endOfYear(e)}}},Co=(e="en",t,o)=>n.merge(yo[e],t,o),vo=e=>e.includes(void 0)?e:e.sort((e,t)=>e<t?-1:1),xo=e=>String(e),bo=(e,t)=>e.slice(0,t).split("").filter(pe).length,wo=t.forwardRef(function({value:e,canBeFloat:o=!1,canBeNegative:r=!1,defaultValue:a,precision:l=3,intPartPrecision:s=7,onChange:d,onBlur:c,min:u,max:p,...h},m){const[y,g]=t.useState(()=>((e,t)=>{const o=se(e);return n.isStringNotEmpty(o)?o:se(t)})(e,a)),[f,C]=t.useState(!1),v=e=>{g(n.isStringNotEmpty(e)?e:se(a))};return W(()=>{void 0!==e?v(se(e)):g(se(e))},[e]),i.jsx(ut,{value:y,onChange:async(e,t)=>{const n=y,i=t.target,a=i.selectionStart??0,c=de(e);if(""===c)return d(void 0),void g("");const u=new RegExp((({canBeFloat:e,canBeNegative:t,intPartPrecision:o,precision:n})=>`^${t?"(\\-)?":""}\\d{0,${o}}${e?`(\\.\\d{0,${n}})?`:""}$`)({precision:l,intPartPrecision:s,canBeNegative:r,canBeFloat:o}));if(!u.test(c))return await g(n),void ue(i,a-1);const p=o&&/^[-]*[\d\s]*[.,]$/.test(e),h=le(c),m=p?`${h}.`:h;await g(m),ue(i,((e,t,o,n)=>{if(t===o)return n?e+1:e;const i=o.length>t.length,r=bo(t,e-(i?1:0)),a=e+(bo(o,e)-r);return a<=0?0:a-(pe(o[a-1])?1:0)})(a,n,m,f))},onBlur:t=>{const o=t.currentTarget.value,n=ce(o),i=void 0!==n?ae(n,u,p):void 0;i!==e?d(i):v(se(e)),void 0!==c&&c(t)},onKeyDown:e=>{C("Delete"===e.key)},ref:m,...h})}),So=P("FiltersPane",{root:{display:"flex",flexWrap:"wrap",gap:8,width:"100%"},settings:{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:18,boxSizing:"border-box",width:40,height:36,cursor:"pointer",transition:R.defaultTransition,transitionProperty:"background-color"},settingsIcon:{width:16,height:16},clear:{display:"flex",alignItems:"center",height:36},filterWithClearButton:{display:"flex",gap:16,minWidth:0}}),No={s:{paddingLeft:0,paddingRight:0,minWidth:"unset"},text:{background:"none",color:N.GREY_ACTIVE,"&:hover, &:focus":{color:N.FONT_MEDIUM},"&:active":{color:N.FONT_MAIN},"&:hover, &:focus, &:active":{background:"none",borderColor:"transparent"}}},ko={text:{color:N.GREY_ACTIVE,"&:hover, &:focus":{color:N.FONT_MEDIUM},"&:active":{color:N.FONT_MEDIUM}}},Eo=P("FilterInterval",{root:{padding:8,background:N.CLASSIC_WHITE},inputWrapper:{padding:[4,12],display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:20,marginBottom:12},autosize:{minWidth:120,height:0,opacity:0,paddingRight:16,fontSize:16,whiteSpace:"pre",userSelect:"none",pointerEvents:"none"},clear:{display:"flex",justifyContent:"flex-end"}}),Ro={input:{minWidth:120},tweakControlWrapper:{icon:{padding:0,width:24,"&:last-child":{paddingRight:0}}}},Io=structuredClone(ko),jo=({data:e,tweakStyles:o,value:r,labelName:a,withFieldNameInLabel:l,localeKey:s,locale:d,canBeFloat:c,onChange:u,fromInput:p,toInput:h,testId:m})=>{const y=Eo({theme:o}),g=t.useMemo(()=>Co(s,d),[s,d]),f=ke({innerStyles:Ro,tweakStyles:o,className:"tweakInput",currentComponentName:"FilterInterval"}),C=ke({innerStyles:Io,tweakStyles:o,className:"tweakClearButton",currentComponentName:"FilterInterval"});return i.jsxs("div",{className:y.root,...n.addDataAttributes(e,m),children:[i.jsxs("div",{className:y.inputWrapper,children:[i.jsxs("div",{children:[i.jsx(wo,{onChange:e=>{u(void 0!==e||void 0!==r?.[1]?vo([e,r?.[1]]):void 0)},value:r?.[0],label:l?`${a} ${g.from.toLocaleLowerCase()}`:g.from,canBeFloat:c,isClearable:!0,tweakStyles:f,testId:n.getTestId(m,"start"),...p}),l&&i.jsxs("div",{className:y.autosize,children:[a," ",g.from]})]}),i.jsxs("div",{children:[i.jsx(wo,{onChange:e=>{u(void 0!==e||void 0!==r?.[0]?vo([r?.[0],e]):void 0)},value:r?.[1],label:l?`${a} ${g.to.toLocaleLowerCase()}`:g.to,canBeFloat:c,isClearable:!0,tweakStyles:f,testId:n.getTestId(m,"end"),...h}),l&&i.jsxs("div",{className:y.autosize,children:[a," ",g.to]})]})]}),i.jsx("div",{className:y.clear,children:i.jsx(qe,{onClick:()=>{u(void 0)},size:"s",view:"text",testId:n.getTestId(m,"clear-button"),tweakStyles:C,children:g.clear})})]})},To={ru:{clear:"Очистить",all:"Все",chosen:"Выбранные",nothingFound:"Не найдено",searchPlaceholder:"Поиск"},en:{clear:"Clear",all:"All",chosen:"Chosen",nothingFound:"Nothing found",searchPlaceholder:"Search"}},Mo=e=>String(e),Do=P("MultiSelectList",{root:{width:220,background:N.CLASSIC_WHITE},list:{paddingTop:12,maxHeight:212,overscrollBehavior:"contain",...E.withScrollBar},label:{boxSizing:"border-box",fontSize:14,padding:[12,16],userSelect:"none",display:"flex",alignItems:"center",color:N.FONT_LABEL},labelChosen:{fontWeight:"bold",color:N.FONT_MAIN,padding:[4,16,12]},withoutTopGap:{paddingTop:0},item:{boxSizing:"border-box",padding:0,maxWidth:"100%",fontSize:14},option:{display:"inline-block",userSelect:"none",maxWidth:"100%",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},panel:{display:"flex",padding:[0,6,8]},clear:{marginLeft:"auto"},selectedItem:{},preloader:{width:80,height:40,margin:"auto",display:"flex",alignItems:"center",justifyContent:"center"},dropdownInput:{borderBottom:[1,"solid",N.BORDER_MAIN]},nothingFound:{display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",padding:16,fontSize:14}}),Ao={tweakInput:{tweakControlWrapper:{controlWrapper:{"--control-height":"40px",backgroundColor:"transparent",border:"none"}}}},Lo={root:{padding:[11,16],boxSizing:"border-box",width:"100%"},children:{marginRight:"auto",overflow:"hidden"}},Fo={text:{color:N.GREY_ACTIVE,"&:hover, &:focus":{color:N.FONT_MEDIUM},"&:active":{color:N.FONT_MEDIUM}}};function Oo({value:e,tweakStyles:o,data:r,isSearchEnabled:l=!1,localeKey:s="en",locale:d=To[s],onChange:c,onClose:u,options:p,fetchOptions:h,isGroupingEnabled:m=l,getValueView:g=Mo,getValueId:f=Mo,getValueString:C=Mo,checkboxPosition:v="left",pageSize:x,searchMaxLength:b,testId:w}){const S=ve(),N=Do({theme:o}),k=ke({innerStyles:Lo,tweakStyles:o,className:"tweakCheckbox",currentComponentName:"MultiSelectList"}),E=ke({innerStyles:Ao,tweakStyles:o,className:"tweakSearchInput",currentComponentName:"MultiSelectList"}),R=ke({innerStyles:Fo,tweakStyles:o,className:"tweakClearButton",currentComponentName:"MultiSelectList"}),[I,j]=t.useState(0),[T,M]=t.useState(""),[D,A]=t.useState([]),[L,F]=t.useState(!1),[O,B]=t.useState(!1),[z,_]=t.useState(0),[P,W]=t.useState(!1),H=t.useRef(),$=e?.include,V=t.useMemo(()=>((e="en",t,o)=>n.merge(To[e],t,o))(s,d),[s,d]),G=t.useMemo(()=>$?.map(f),[f,$]),U=t.useMemo(()=>D.filter(e=>!G?.includes(f(e))),[f,D,G]),K=t.useCallback(async e=>{if(void 0!==h){F(!0);try{const t=await h(e?.trim()??"");S()&&void 0!==t&&(A(t),_(0),W(0===t.length||void 0!==x&&t.length<x))}finally{S()&&F(!1)}}},[h,x]),Z=t.useCallback(y.debounce(K),[K]);const Y=({value:e,isSelected:t})=>{var o;n.isNotEmpty(e)&&(0!==(o=t?[...$??[],e]:$?.filter(t=>f(t)!==f(e))??[]).length?c({include:o}):c(void 0))},q=t=>{if("Escape"===t.code&&(c(e),u&&u()),"ArrowDown"===t.code&&I<U.length+(e?.include.length??0)-1&&j(I+1),"ArrowUp"===t.code&&I>=1&&j(I-1),"Enter"===t.code){if(void 0===U[I]&&(void 0===e||0===e.include.length))return;void 0!==e?I<e.include.length?c({...e,include:e.include.filter(t=>f(t)!==f(e.include[I]))??[]}):c({...e,include:[...e.include,U[I-e.include.length]]}):c({include:[U[I]]})}},X=e=>$?.some(t=>f(t)===e),J=t.useCallback(async(e,t)=>{if(void 0!==h){B(!0);try{const o=await h(e??"",t??0);S()&&(o.length>0&&A(e=>[...e,...o]),(0===o.length||void 0!==x&&o.length<x)&&W(!0))}finally{S()&&B(!1)}}},[h,f]),Q=t.useCallback(e=>{O||P||(H.current&&H.current.disconnect(),H.current=new IntersectionObserver(async e=>{e[0].isIntersecting&&(await J(T,z+1),S()&&_(e=>e+1))}),e&&H.current.observe(e))},[z,J,O,P,T]);t.useEffect(()=>{if(void 0===h)return void A(p??[]);(async()=>{F(!0);try{const e=await h("");void 0!==e&&S()&&((0===e.length||void 0!==x&&e.length<x)&&W(!0),A(e))}finally{S()&&F(!1)}})()},[]),t.useEffect(()=>(document.addEventListener("keydown",q,!1),()=>{document.removeEventListener("keydown",q,!1)}));const ee=m?U:D,te=m&&n.isArrayNotEmpty($),oe=!L&&!n.isArrayNotEmpty(D),ne=te&&(n.isArrayNotEmpty(U)||!n.isArrayNotEmpty(D)),ie=L||O,re=!L&&(n.isArrayNotEmpty(D)||n.isArrayNotEmpty($));return i.jsxs("div",{className:N.root,...n.addDataAttributes(r,w),children:[l&&i.jsx("div",{className:N.dropdownInput,children:i.jsx(Ct,{value:T,placeholder:V.searchPlaceholder,onChange:function(e){if(M(e),void 0===h){if(void 0!==p){const t=e.toLowerCase();A(p.filter(e=>C(e).toLowerCase().includes(t)))}}else F(!0),Z(e)},tweakStyles:E,maxLength:b,testId:n.getTestId(w,"search"),shouldFocusOnMount:!0})}),re&&i.jsxs("div",{className:N.list,...n.addDataTestId(w,"list"),children:[te&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:a(N.label,N.labelChosen,!l&&N.withoutTopGap),children:V.chosen}),$?.map(e=>{const t=f(e),o=g(e);return i.jsx("div",{className:a(N.item),children:i.jsx(Je,{onSelect:Y,isChecked:!0,value:e,tweakStyles:k,labelPosition:"left"===v?"right":"left",data:{id:t},children:i.jsx("div",{className:N.option,...n.addDataAttributes({option:t}),children:o})})},t)})]}),!L&&i.jsxs(i.Fragment,{children:[ne&&i.jsx("div",{className:N.label,children:V.all}),ee.map((e,t)=>{const o=f(e),r=g(e);return i.jsx("div",{className:a(N.item),ref:ee.length-1===t?Q:void 0,children:i.jsx(Je,{onSelect:Y,isChecked:X(o),value:e,tweakStyles:k,labelPosition:"left"===v?"right":"left",data:{id:o},children:i.jsx("div",{className:N.option,...n.addDataAttributes({option:o}),children:r})})},o)})]})]}),ie&&i.jsx("div",{className:N.preloader,children:i.jsx(Ue,{type:"dots"})}),oe&&i.jsx("div",{className:N.nothingFound,children:V.nothingFound}),i.jsx("div",{className:N.panel,children:i.jsx("div",{className:N.clear,children:i.jsx(qe,{onClick:()=>{c(void 0)},size:"s",view:"text",testId:n.getTestId(w,"clear-button"),tweakStyles:R,children:V.clear})})})]})}function Bo(e){return i.jsx(Oo,{...e})}const zo=P("FilterSelect",{root:{width:220,background:N.CLASSIC_WHITE},list:{paddingTop:12,padding:[12,0],maxHeight:224,overscrollBehavior:"contain",...E.withScrollBar},label:{boxSizing:"border-box",fontSize:14,padding:[12,16],userSelect:"none",display:"flex",alignItems:"center",color:N.FONT_LABEL},labelChosen:{fontWeight:"bold",color:N.FONT_MAIN,padding:[4,16,12]},withoutTopGap:{paddingTop:0},withClearButton:{paddingBottom:0,maxHeight:212},item:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:[10,16],maxWidth:"100%",cursor:"pointer",fontSize:14,minHeight:40,transition:R.defaultTransition,transitionProperty:"background-color",boxSizing:"border-box"},option:{display:"inline-block",userSelect:"none",width:"100%",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},icon:{width:20,height:20,marginRight:4,alignSelf:"center",flexShrink:0},panel:{display:"flex",padding:[0,6,8],gap:8},panelWithFooter:{borderTop:[1,"solid",N.BORDER_MAIN],padding:[8,16]},footer:{wordBreak:"break-word",alignSelf:"center"},clear:{marginLeft:"auto",alignSelf:"center"},preloader:{width:80,height:40,margin:"auto",display:"flex",alignItems:"center",justifyContent:"center"},dropdownInput:{borderBottom:[1,"solid",N.BORDER_MAIN]},nothingFound:{display:"flex",alignItems:"center",textAlign:"center",padding:16,fontSize:14}}),_o={tweakInput:{tweakControlWrapper:{controlWrapper:{"--control-height":"40px",backgroundColor:"transparent",border:"none"}}}},Po=structuredClone(ko);function Wo({data:e,tweakStyles:o,value:r,isSearchEnabled:l=!1,isGroupingEnabled:s=!1,localeKey:d,locale:c,onChange:u,onClose:p,options:h,fetchOptions:m,footer:g,getValueView:f=xo,getValueId:C=xo,getValueString:v=xo,hasClearButton:x=!0,testId:b}){const w=zo({theme:o}),S=ke({innerStyles:_o,tweakStyles:o,className:"tweakSearchInput",currentComponentName:"FilterSelect"}),N=ke({innerStyles:Po,tweakStyles:o,className:"tweakClearButton",currentComponentName:"FilterSelect"}),k=ve(),E=t.useMemo(()=>((e="en",t,o)=>n.merge(mo[e],t,o))(d,c),[d,c]),R=t.useRef(),[I,j]=t.useState(""),[T,M]=t.useState([]),[D,A]=t.useState(0),[L,F]=t.useState(!1),[O,B]=t.useState(!1),[z,_]=t.useState(!1),P=O||z,W=n.isReactNodeNotEmpty(g),H=t.useCallback(async e=>{if(void 0!==m){B(!0);try{const t=await m(e?.trim()??"");k()&&void 0!==t&&(M(t),A(0),F(!1))}finally{k()&&B(!1)}}},[m]),$=t.useMemo(()=>y.debounce(H),[H]),V=e=>{u(e),p?.()},G=t.useCallback(async(e,t)=>{if(void 0!==m){_(!0);try{const o=await m(e?.trim()??"",t??0);k()&&(o.length>0?M(e=>[...e,...o]):F(!0))}finally{k()&&_(!1)}}},[m]),U=t.useCallback(e=>{z||L||(R.current&&R.current.disconnect(),R.current=new IntersectionObserver(async e=>{e[0].isIntersecting&&(await G(I,D+1),k()&&A(e=>e+1))}),e&&R.current.observe(e))},[D,G,z,L,I]);return t.useEffect(()=>{if(void 0===m)return void M(h??[]);(async()=>{B(!0);try{const e=await m("");void 0!==e&&k()&&M(e)}finally{B(!1)}})()},[]),i.jsxs("div",{className:w.root,...n.addDataAttributes(e,b),children:[l&&i.jsx("div",{className:w.dropdownInput,children:i.jsx(Ct,{value:I,placeholder:E.searchPlaceholder,onChange:e=>{if(j(e),void 0===m){if(void 0!==h){const t=e.toLowerCase();M(h.filter(e=>v(e).toLowerCase().includes(t)))}}else $(e)},tweakStyles:S,testId:n.getTestId(b,"search"),shouldFocusOnMount:!0})}),!O&&i.jsxs(i.Fragment,{children:[n.isArrayNotEmpty(T)&&i.jsxs("div",{className:a(w.list,{[w.withClearButton]:x}),...n.addDataTestId(b,"list"),children:[s&&n.isNotEmpty(r)&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:a(w.label,w.labelChosen,{[w.withoutTopGap]:!l}),children:E.chosen}),i.jsxs("div",{className:w.item,onClick:()=>V(void 0),children:[i.jsx("div",{className:w.option,children:f(r)}),i.jsx("div",{className:w.icon,children:i.jsx(Ie,{type:"check"})})]}),i.jsx("div",{className:w.label,children:E.all})]}),T.map((e,t)=>{const o=n.isNotEmpty(r)&&C(r)===C(e);if(s&&o)return null;const a=C(e),l=f(e),d=i.jsxs("div",{className:w.item,ref:T.length-1===t&&void 0!==m?U:void 0,onClick:()=>V(e),children:[i.jsx("div",{className:w.option,...n.addDataAttributes({id:a,option:a}),children:l}),o&&i.jsx("div",{className:w.icon,children:i.jsx(Ie,{type:"check"})})]},a);return void 0!==h&&""===I?i.jsx(xt,{active:o,children:d},a):d})]}),P&&i.jsx("div",{className:w.preloader,children:i.jsx(Ue,{type:"dots"})}),!n.isArrayNotEmpty(T)&&i.jsx("div",{className:w.nothingFound,children:E.nothingFound}),(x||W)&&i.jsxs("div",{className:a(w.panel,{[w.panelWithFooter]:W}),children:[W&&i.jsx("div",{className:w.footer,children:g}),x&&i.jsx("div",{className:w.clear,children:i.jsx(qe,{onClick:()=>{void 0!==h&&M(h),V(void 0),j("")},size:"s",view:"text",testId:n.getTestId(b,"clear-button"),tweakStyles:N,children:E.clear})})]})]}),O&&i.jsx("div",{className:w.preloader,children:i.jsx(Ue,{type:"dots"})})]})}const Ho=P("FilterWithDates",{root:{width:320,background:N.CLASSIC_WHITE,position:"relative",zIndex:20},container:{display:"flex",gap:20,padding:[8,20]},containerItem:{width:"50%",height:44},btnRow:{display:"flex",flexDirection:"row-reverse",justifyContent:"space-between",padding:8},datepicker:{}}),$o=structuredClone(ko),Vo=ko,Go={popper:{marginTop:28,marginLeft:-20}},Uo={popper:{marginTop:56,marginLeft:-20}},Ko={popper:{marginTop:28,marginLeft:-170}},Zo={popper:{marginTop:56,marginLeft:-170}},Yo=({value:e,onChange:o,localeKey:r,locale:a,onStartBtnSubmit:l,onEndBtnSubmit:s,data:d,tweakStyles:c,testId:u,startPickerProps:h=go,endPickerProps:m=go,isClearable:y=!0})=>{const g=Ho({theme:c}),C=ke({innerStyles:$o,tweakStyles:c,className:"tweakClearButton",currentComponentName:"FilterWithDates"}),v=ke({innerStyles:Vo,tweakStyles:c,className:"tweakBackButton",currentComponentName:"FilterWithDates"}),x=y||n.isNotEmpty(l),b=ke({innerStyles:x?Uo:Go,tweakStyles:c,className:"tweakStartDatePicker",currentComponentName:"FilterWithDates"}),w=ke({innerStyles:x?Zo:Ko,tweakStyles:c,className:"tweakEndDatePicker",currentComponentName:"FilterWithDates"}),[S,N]=t.useState(!1),[k,E]=t.useState(!1),R=t.useRef(null),I="ru"===r?f.ru:f.enUS,j=t.useMemo(()=>Co(r,a),[r,a]),T=S||k;return i.jsxs("div",{className:g.root,...n.addDataAttributes(d,u),children:[i.jsxs("div",{className:g.container,children:[i.jsx("div",{className:g.containerItem,children:i.jsx(Zt,{selectedDate:e?.from,maxDate:e?.to??void 0,label:j.from,months:j.months,locale:I,onChangeDate:t=>{null!==t&&void 0!==e&&null!==e.to&&p.isAfter(t,e.to)?o({from:e.to,to:t}):o({from:t,to:e?.to??null})},tweakStyles:b,testId:n.getTestId(u,"from"),isClearable:y,...h})}),i.jsx("div",{className:g.containerItem,children:i.jsx(Zt,{selectedDate:e?.to,label:j.to,months:j.months,minDate:e?.from??void 0,locale:I,onChangeDate:t=>{null!==t&&void 0!==e&&null!==e.from&&p.isBefore(t,e.from)?o({from:t,to:e.from}):o({from:e?.from??null,to:t})},tweakStyles:w,testId:n.getTestId(u,"to"),isClearable:y,...m})})]}),i.jsxs("div",{className:g.btnRow,children:[y&&i.jsx("div",{children:i.jsx(qe,{onClick:()=>{s()},size:"s",view:"text",testId:n.getTestId(u,"clear-button"),isFullWidth:!0,tweakStyles:C,children:j.clear})}),l&&i.jsx("div",{children:i.jsx(qe,{onClick:l,size:"s",view:"text",isFullWidth:!0,tweakStyles:v,children:j.back})})]}),T&&i.jsx("div",{ref:R,className:g.datepicker,children:i.jsx(Zt,{selectedDate:(S?e?.from:e?.to)??null,label:"",locale:I,months:j.months,isInline:!0,onChangeDate:S?t=>{o({from:t,to:e?.to??null}),N(!1)}:t=>{o({from:e?.from??null,to:t}),E(!1)}})})]})},qo=P("FilterWithPeriod",{root:{},main:{},picker:{}}),Xo={list:{maxHeight:"auto"}},Jo=({value:e,localeKey:o,locale:r,onChange:a,onClose:l,periods:s,tweakStyles:d,testId:c})=>{const u=qo({theme:d}),p=t.useMemo(()=>Co(o,r),[o,r]),[h,m]=t.useState("CUSTOM"!==e?.periodType),[y,g]=t.useState("CUSTOM"===e?.periodType),[f,C]=t.useState(e),v=t.useMemo(()=>{const e={...fo};return s?.forEach(t=>{Array.isArray(t)&&(e[t[0]]=t[1])}),e},[s]),x=t.useMemo(()=>void 0===s?[...ho]:s.map(e=>Array.isArray(e)?e[0]:e),[s]),b=t.useCallback(e=>p.periods[e]??e,[p.periods]),w=t.useRef(null),S=t.useRef(null);Ne(S,()=>{f?.from||f?.to||C(void 0),g(!1)}),t.useEffect(()=>{C(e)},[e,e?.from,e?.to,e?.periodType]);const N=ke({innerStyles:Xo,tweakStyles:d,className:"tweakFilterSelect",currentComponentName:"FilterWithPeriod"});return i.jsxs("div",{className:u.root,children:[h&&i.jsx("div",{className:u.main,ref:w,children:i.jsx(Wo,{options:x,value:f?.periodType,onChange:e=>{void 0!==e?(e=>{let t=null,o=null;if(e in v){const n=v[e]();t=n.from,o=n.to}const n={from:t,to:o,periodType:e};C(n),"CUSTOM"===e?g(!0):(void 0!==l&&l(),a({...n,label:b(e)})),m(!1)})(e):(a(void 0),void 0!==l&&l())},localeKey:o,locale:p,tweakStyles:N,getValueView:b,testId:n.getTestId(c,"select")})}),y&&i.jsx("div",{className:u.picker,ref:S,children:i.jsx(Yo,{onStartBtnSubmit:()=>{g(!1),m(!0)},onEndBtnSubmit:()=>{a(void 0),g(!1),void 0!==l&&l()},value:f,onChange:e=>{e.from||e.to?a({...e,periodType:"CUSTOM"}):a(void 0)},localeKey:o,locale:p,testId:n.getTestId(c,"dates")})})]})},Qo=e=>n.isEmpty(e)||e instanceof Date,en=e=>Qo(e?.from)&&Qo(e?.to);function tn(e){const{filter:o,value:r,onChange:a,onClose:l,localeKey:s,locale:d,testId:c}=e,u=o.localeKey??s,p=t.useMemo(()=>Co(u,d,o.locale),[u,d,o.locale]);if("select"===o.type)return i.jsx(Wo,{value:r,onChange:a,onClose:l,localeKey:u,locale:p,testId:n.getTestId(c,"select"),...o});if("dateRange"===o.type){const e=(e=>n.isString(e?.periodType)&&en(e))(r)?{...r}:void 0;return i.jsx(Jo,{value:e,onChange:a,onClose:l,localeKey:u,locale:p,testId:n.getTestId(c,"period"),...o})}if("dateRangeWithoutPeriod"===o.type){const e=en(r)?r:void 0;return i.jsx(Yo,{value:e,onChange:e=>a({...e,periodType:"CUSTOM"}),onEndBtnSubmit:()=>a(void 0),localeKey:u,locale:p,testId:n.getTestId(c,"dates"),...o})}if("multiSelect"===o.type){const e=(e=>Array.isArray(e?.include))(r)?r:void 0;return i.jsx(Bo,{value:e,onChange:a,onClose:l,localeKey:u,locale:p,testId:n.getTestId(c,"multiSelect"),...o})}if("interval"===o.type){const e=Array.isArray(r)?r:void 0;return i.jsx(jo,{value:e,onChange:a,localeKey:u,locale:p,labelName:o.name,testId:n.getTestId(c,"interval"),...o})}if("custom"===o.type&&o.component){const t=o.component;return i.jsx(t,{...e,filter:o,testId:n.getTestId(c,"dropdown")})}return"boolean"!==o.type&&console.warn(`%cДля фильтра ${o.name} не задан тип или component`,"background: red; color: black"),null}const on=P("FiltersPaneSearch",{root:{display:"flex",position:"relative",backgroundColor:s(N.BORDER_MAIN,.3),border:[1,"transparent","solid"],borderRadius:18,paddingRight:8,transition:R.defaultTransition,transitionProperty:"background-color, border-color"},focused:{backgroundColor:N.CLASSIC_WHITE,borderColor:N.BORDER_MAIN},disabled:{"& $selectBlock":{cursor:"default"}},hasValue:{backgroundColor:N.CLASSIC_WHITE,borderColor:N.BORDER_MAIN},selectWrapper:{position:"relative",display:"flex",flexShrink:0},selectBlock:{display:"flex",alignItems:"center",gap:6,cursor:"pointer",height:"100%"},selectLabel:{flexShrink:0,fontSize:14,userSelect:"none"},chevronIcon:{flexShrink:0,width:20,height:20,marginRight:4,transition:"transform .2s ease",opacity:.5},open:{transform:"rotate(180deg)"},dropdown:{position:"absolute",top:34,right:0,zIndex:20,minWidth:200,marginTop:6,borderRadius:k.BORDER_RADIUS_SMALL,backgroundColor:N.CLASSIC_WHITE,overflow:"hidden"},dropdownInput:{borderBottom:[1,"solid",N.BORDER_MAIN]},active:{fontWeight:"bold"}}),nn={tweakInput:{tweakControlWrapper:{controlWrapper:{"--control-height":"34px",backgroundColor:"transparent",border:"none",minWidth:140},focused:{backgroundColor:"transparent",border:"none"}}}},rn={root:{borderRadius:0,borderBottomLeftRadius:6,borderBottomRightRadius:6,boxShadow:"none",width:"100%"}};function an({value:e,fields:o=[],field:r,onChange:l,localeKey:s,locale:d,getValueId:c,getValueView:u,getValueString:p,hasClearSelectButton:h,isDisabled:m=!1,isSelectSearchEnabled:y=!0,isAutoSized:g=!1,maxLength:f,data:C,tweakStyles:v,testId:x}){const b=on({theme:v}),w=ke({innerStyles:nn,tweakStyles:v,className:"tweakSearchInput",currentComponentName:"FiltersPaneSearch"}),S=ke({innerStyles:rn,tweakStyles:v,className:"tweakSelect",currentComponentName:"FiltersPaneSearch"}),[N,k]=t.useState(!1),[E,R]=t.useState(!1),I=t.useRef(null),j=t.useMemo(()=>Co(s,d),[s,d]);Ne(I,()=>R(!1));return i.jsxs("div",{className:a(b.root,{[b.focused]:N,[b.disabled]:m,[b.hasValue]:n.isArrayLikeNotEmpty(e)}),ref:I,...n.addDataAttributes(C,x),children:[i.jsx(Ct,{value:e,onChange:e=>{l({value:e,field:r})},placeholder:j.searchPlaceholder,tweakStyles:w,onFocus:()=>k(!0),onBlur:()=>k(!1),testId:n.getTestId(x,"input"),maxLength:f,isDisabled:m,isAutoSized:g}),i.jsxs("div",{className:b.selectWrapper,children:[n.isArrayNotEmpty(o)&&i.jsxs("div",{className:b.selectBlock,onClick:m?void 0:()=>R(!E),...n.addDataTestId(x,"select"),children:[i.jsx("div",{className:a(b.selectLabel,{[b.active]:n.isNotEmpty(r)}),children:n.isNotEmpty(r)?u?.(r):j.displayedFields}),i.jsx("div",{className:a(b.chevronIcon,E&&b.open),children:i.jsx(Ie,{type:"chevron-down"})})]}),E&&i.jsx("div",{className:b.dropdown,children:i.jsx(Wo,{tweakStyles:S,value:r,options:o,getValueView:u,getValueId:c,getValueString:p,localeKey:s,locale:j,onChange:t=>{l({value:e,field:t}),R(!1)},isSearchEnabled:y,hasClearButton:h,testId:n.getTestId(x,"dropdown")})})]})]})}const ln=P("FilterValueView",{text:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},count:{whiteSpace:"pre"}});function sn({value:e,filter:o,locale:r,localeKey:a,tweakStyles:l}){const s=ln({theme:l}),d=o.localeKey??a,c=t.useMemo(()=>Co(d,r,o.locale),[d,r,o.locale]);if(n.isEmpty(e))return i.jsx(i.Fragment,{});if(n.isNotEmpty(o.getSelectedValueView))return i.jsx("span",{className:s.text,children:o.getSelectedValueView(e)});const u="custom"===o.type&&"multiple"===o.valueViewType,h="custom"===o.type&&"range"===o.valueViewType,m="dateRange"===o.type||"dateRangeWithoutPeriod"===o.type,y=e=>n.isNotEmpty(e)?e instanceof Date?p.format(e,o.dateFormat||"dd.MM.yyyy"):"object"==typeof e&&"value"in e&&n.isNotEmpty(e.value)?String(e.value):"string"==typeof e||"number"==typeof e||"boolean"==typeof e?String(e):(console.warn(`%c Ошибка конфигурации фильтра ${o.name}. Невозможно отобразить значение фильтра. Задайте filterValueViewComponent или filterValueViewType.`,"background: orange; color: black"),""):"";if("select"===o.type){const t=o.getValueView??xo;return i.jsx("span",{className:s.text,children:t(e)})}if("multiSelect"===o.type){const t=e,n=o.getValueView??xo,{include:r}=t;return i.jsx(i.Fragment,{children:Array.isArray(r)&&r.length>0&&i.jsxs(i.Fragment,{children:[i.jsx("span",{className:s.text,children:n(r[0])}),i.jsx("span",{className:s.count,children:r.length>1&&` (+${r.length-1})`})]})})}if("interval"===o.type){const t=e,o=t[0],n=t[1],r=[];return void 0!==o&&r.push(`${c.from.toLowerCase()} ${String(o)}`),void 0!==n&&r.push(`${c.to.toLowerCase()} ${String(n)}`),i.jsx("span",{className:s.text,children:r.join(" ")})}if(m){const{from:t,to:o,periodType:n,label:r}=e,a=null!=t,l=null!=o;if("CUSTOM"!==n)return i.jsx("span",{className:s.text,children:y(r)});const d=[];return a&&(l||d.push(c.from.toLowerCase()),d.push(y(t))),l&&(a?d.push("—"):d.push(c.to.toLowerCase()),d.push(y(o))),i.jsx("span",{className:s.text,children:d.join(" ")})}if(u){const t=o.getSelectedValue??y;return i.jsx(i.Fragment,{children:Array.isArray(e)&&e.length>0&&i.jsxs(i.Fragment,{children:[i.jsx("span",{className:s.text,children:t(e[0])}),i.jsx("span",{className:s.count,children:e.length>1&&` (+${e.length-1})`})]})})}if(h&&Array.isArray(e)){const t=e,o=t[0],n=t[1],r=[];return void 0!==o&&r.push(`${c.from.toLowerCase()} ${String(o)}`),void 0!==n&&r.push(`${c.to.toLowerCase()} ${String(n)}`),i.jsx("span",{className:s.text,children:r.join(" ")})}return i.jsx("span",{className:s.text,children:y(e)})}const dn=e=>Array.isArray(e)?e.some(dn):n.isObject(e)?Object.values(e).some(dn):"boolean"==typeof e?e:n.isNotEmpty(e),cn=P("FilterWrapper",{root:{position:"relative",transition:R.defaultTransition,transitionProperty:"background-color, border-color",border:[1,"solid",N.BORDER_MAIN],borderRadius:18,boxSizing:"border-box",height:36,minWidth:0},item:{display:"flex",padding:[0,8,0,16],cursor:"pointer"},booleanItem:{padding:0},name:{fontSize:14,lineHeight:"34px",whiteSpace:"nowrap"},boolean:{padding:[0,16]},noValue:{},openNoValue:{},openWithValue:{},disabled:{"& > $item":{cursor:"default"}},withValue:{},iconContainer:{width:20,height:20,transition:"transform .2s ease-in-out",alignSelf:"center",marginLeft:6,marginRight:4,flexShrink:0},chevronIcon:{},clearIcon:{},open:{transform:"rotate(180deg)"},dropdown:{position:"absolute",zIndex:20,marginTop:6,border:[1,N.BORDER_MAIN,"solid"]},left:{left:0},right:{right:0},value:{alignSelf:"center",fontSize:14,lineHeight:"16px",margin:[0,2,0,8],fontWeight:"bold",display:"flex",minWidth:0}});function un({filter:e,value:t,isDisabled:o,locale:r,localeKey:l,data:s,testId:d,tweakStyles:c,onChange:u}){const p=A(c,e.tweakWrapperStyles),h=cn({theme:p}),m=ke({tweakStyles:p,className:"tweakWithPopup",currentComponentName:"FilterWrapper"}),y=ke({tweakStyles:p,className:"tweakValueView",currentComponentName:"FilterWrapper"});if(e.isInline)return i.jsx(tn,{value:t,filter:e,localeKey:l,locale:r,onChange:u,testId:d});const g="boolean"===e.type,f=()=>{g&&u(!t)},C=e=>{e.stopPropagation(),u(void 0)},v=dn(t),x=(e.isClearable??!1)&&v;return i.jsx(De,{placement:"bottom-start",canBeFlipped:!0,isDisabled:g||o,tweakStyles:m,trigger:({triggerProps:{isActive:c},referenceProps:u})=>i.jsx("div",{className:a(h.root,{[h.noValue]:!v,[h.openNoValue]:c&&!v,[h.withValue]:!c&&v,[h.openWithValue]:c&&v,[h.boolean]:g,[h.disabled]:o}),...n.addDataAttributes(s,d),...u,children:i.jsxs("div",{onClick:f,className:a(h.item,{[h.booleanItem]:g}),children:[i.jsx("div",{className:h.name,children:e.name}),!g&&n.isNotEmpty(t)&&i.jsx("div",{className:h.value,children:i.jsx(sn,{value:t,filter:e,locale:r,localeKey:l,testId:n.getTestId(d,"value"),tweakStyles:y})}),!g&&!x&&i.jsx("div",{className:a(h.iconContainer,h.chevronIcon,{[h.open]:c}),children:i.jsx(Ie,{type:"chevron-down"})}),x&&i.jsx("div",{className:a(h.iconContainer,h.clearIcon),onClick:C,children:i.jsx(Ie,{type:"close-large"})})]})}),children:({onClose:o})=>i.jsx(tn,{value:t,filter:e,locale:r,localeKey:l,onClose:o,onChange:u,testId:d})})}const pn={AB:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 341.3"><path fill="#FFF" d="M0 0h512v341.3H0z"/><g fill="#6DA544"><path d="M0 0h512v48.8H0zM0 97.5h512v48.8H0zM0 195h512v48.8H0zM0 292.6h512v48.8H0z"/></g><path fill="#D80027" d="M0 0h256v146.3H0z"/><path fill="#FFF" d="m116.9 114.4-7.5-14.8V69.9L128 59l18.6 10.9v22.3l7.4-7.4 4.2 3-4.2 11.8-14.9 14.8z"/><circle fill="#FFF" cx="82" cy="82.8" r="5.4"/><circle fill="#FFF" cx="90.8" cy="61.7" r="5.4"/><circle fill="#FFF" cx="106.6" cy="46.2" r="5.4"/><circle fill="#FFF" cx="128" cy="40.8" r="5.4"/><circle fill="#FFF" cx="149.4" cy="46.2" r="5.4"/><circle fill="#FFF" cx="165.2" cy="61.7" r="5.4"/><circle fill="#FFF" cx="174" cy="82.8" r="5.4"/></svg>',OS:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 450 300"><path fill="#FFF" d="M0 0h450v300H0z"/><path fill="red" d="M0 100h450v200H0z"/><path fill="#FFDF00" d="M0 200h450v100H0z"/></svg>'},hn=P("Flag",{root:{display:"flex",width:"100%",height:"100%",boxSizing:"border-box",border:[1,"solid",N.BORDER_MAIN],borderRadius:2},noFlag:{width:20,color:N.FONT_MEDIUM}}),mn=({countryCode:e="",tweakStyles:t})=>{const o=hn({theme:t}),n=e.toUpperCase();if(v.hasFlag(n)){const e=S[n];return i.jsx("div",{className:o.root,children:i.jsx(e,{})})}const r=pn[n];return void 0!==r?i.jsx("div",{className:o.root,dangerouslySetInnerHTML:{__html:r}}):i.jsx("div",{className:o.noFlag,children:i.jsx(Ie,{type:"minus"})})},yn={table:{Root:"table",Head:"thead",Body:"tbody",Row:"tr",Header:"th",Cell:"td"},divs:{Root:"div",Head:"div",Body:"div",Row:"div",Header:"div",Cell:"div"}},gn=P("Skeleton",{root:{display:"flex",width:"100%",height:"100%",backgroundColor:s(N.GREY_DISABLED,.8),position:"relative",borderRadius:4,overflow:"hidden","-webkit-mask-image":"-webkit-radial-gradient(white, black)","&::after":{content:'""',animation:"$skeleton 1.6s linear 0.5s infinite",background:`linear-gradient(90deg, transparent, ${s(N.GREY_BACKGROUND,.65)}, transparent)`,position:"absolute",transform:"translateX(-100%)",bottom:0,left:0,right:0,top:0}},"@keyframes skeleton":{"0%":{transform:"translateX(-100%)"},"50%":{transform:"translateX(100%)"},"100%":{transform:"translateX(100%)"}}}),fn=({height:e,tweakStyles:t})=>{const o=gn({theme:t});return i.jsx("div",{className:o.root,style:{height:e}})},Cn=e=>n.isNotEmpty(e)&&e.scrollWidth!==e.clientWidth,vn=(e,t)=>e instanceof Date?p.format(e,t?.dateFormat??"dd.MM.yyyy"):String(e),xn=P("FlexibleTable",{flexibleTableWrapper:{},root:{width:"100%",position:"relative",borderCollapse:"separate",borderSpacing:0},scroll:{...E.withScrollBar,maxHeight:"100%"},head:{},body:{},loaderRow:{},loaderCell:{},loader:{position:"sticky",left:0,maxWidth:"100vw",height:48,display:"flex",justifyContent:"center",alignItems:"center"},headerRow:{position:"relative",verticalAlign:"bottom"},header:{position:"sticky",boxSizing:"content-box",top:0,zIndex:10,fontSize:12,fontWeight:"normal",padding:[0,7,16,7]},headerSticky:{zIndex:20,left:0,paddingLeft:24,paddingRight:12,"&::before":{content:'""',display:"block",width:"100%",height:"100%",position:"absolute",left:0,top:0,background:"transparent",pointerEvents:"none",zIndex:1,transition:R.defaultTransition,transitionProperty:"box-shadow","[data-scrolled] &":{boxShadow:"4px 0 4px rgba(0, 0, 0, 0.05)"}},"&::after":{content:'""',display:"block",width:12,height:"100%",position:"absolute",left:"100%",top:0,background:`linear-gradient(90deg, ${N.CLASSIC_WHITE}, ${s(N.CLASSIC_WHITE,0)})`,zIndex:0}},headerSecond:{paddingLeft:12},nothingFoundRow:{},nothingFound:{}}),bn=P("FlexibleTableCell",{root:{position:"relative",boxSizing:"content-box",padding:[14,7],fontSize:14,lineHeight:1.42,zIndex:5,verticalAlign:"top"},sticky:{zIndex:19,paddingLeft:24,paddingRight:12,left:0,...n.getTransition(["box-shadow"]),"[data-scrolled] &":{boxShadow:"4px 0 4px rgba(0, 0, 0, 0.05)"}},second:{paddingLeft:12},loading:{},skeleton:{height:21},clickable:{cursor:"pointer"}});function wn({row:e,columnName:o,config:r,renderMode:l,isSecond:s,isSticky:d,isLoading:c,updateNestedComponent:u,tweakStyles:p,...h}){const m=bn({theme:p}),y=e[o],{component:g=vn(y,r[o]),width:f,maxWidth:C,minWidth:v,left:x,right:b,position:w,cellAlign:S,cellVerticalAlign:N,shouldRenderDataId:k,shouldRenderComponent:E=n.isNotEmpty,onCellClick:R}=r[o]??{},I=d||"sticky"===w,j=!c&&n.isNotEmpty(R),T={...h,onSetNestedComponent:t.useCallback(e=>u(e,o),[o,u]),value:y,row:e},M=yn[l];return i.jsx(M.Cell,{className:a(m.root,{[m.sticky]:I,[m.second]:s,[m.loading]:c,[m.clickable]:j}),style:{textAlign:S,position:I?"sticky":w,width:f,maxWidth:C,minWidth:v,right:b,left:x,verticalAlign:N},onClick:j?e=>R?.(e,T):void 0,...n.addDataAttributes({id:k?o:void 0}),children:c?i.jsx("div",{className:m.skeleton,children:i.jsx(fn,{})}):n.applyAction(E,y,e,o)&&n.applyAction(g,T)})}const Sn=P("FlexibleTableRow",{root:{position:"relative"},active:{},editable:{cursor:"pointer"},clickable:{cursor:"pointer"},nestedComponent:{}}),Nn=me(function({item:e,config:o,columns:r,uniqueField:l,renderMode:s,isActive:d=!1,isFocusable:c=!1,isFirstColumnSticky:u=!1,isLoading:p=!1,rowAttributes:h,isExpandableRowComponentInitiallyOpen:m=!1,rowRef:y,tweakStyles:g,expandableRowComponent:f,onRowHover:C,onRowClick:v}){const x=Sn({theme:g}),b=ke({tweakStyles:g,className:"tweakTableCell",currentComponentName:"FlexibleTableRow"}),[w,S]=t.useState(!1),[N,k]=t.useState(()=>({isOpen:m})),E=!p&&(n.isNotEmpty(v)||n.isNotEmpty(C)),R=!p&&(n.isNotEmpty(v)||n.isNotEmpty(f)),{isOpen:I,cellKey:j}=N,T=Object.fromEntries(h?.map(t=>[t,e[t]])??[]),M=()=>{k({isOpen:!1})},D=t.useCallback((e,t)=>{n.isEmpty(e)?M():k({isOpen:!0,component:e,cellKey:t})},[]),A=yn[s];return i.jsxs(i.Fragment,{children:[i.jsx(A.Row,{ref:y,className:a(x.root,{[x.active]:d,[x.editable]:E,[x.clickable]:R}),...!p&&{onClick:()=>{n.isNotEmpty(l)&&v?.(e[l]),n.isEmpty(f)||(I?n.isEmpty(j)&&M():k({isOpen:!0}))},onMouseEnter:t=>{n.isNotEmpty(l)&&n.isNotEmpty(C)&&(t.stopPropagation(),C(e[l])),c&&S(!0)},onMouseLeave:()=>{C?.(void 0),c&&S(!1)}},...n.addDataAttributes({...T,active:!!d||void 0,editable:!!E||void 0,isExpandableComponentActive:!!I||void 0}),children:r.map((t,r)=>i.jsx(wn,{isSticky:u&&0===r,isSecond:u&&1===r,isLoading:p,row:e,config:o,columnName:t,tweakStyles:b,renderMode:s,isFocusedRow:w,isActiveRow:d,isNestedComponentExpanded:I&&j===t,isRowNestedComponentExpanded:I&&n.isEmpty(j),updateNestedComponent:D},t))}),I&&i.jsx(A.Row,{className:x.root,children:i.jsx(A.Cell,{className:x.nestedComponent,colSpan:r.length,children:N.component??f?.(e,!0,M)})})]})});const kn=P("DocActions",{docActions:{display:"grid",alignItems:"center",gridTemplateColumns:"max-content 1fr"},neutral:{},inverse:{},counterWrapper:{},title:{},actionsWrapper:{justifySelf:"end"}}),En=({title:e,view:t="neutral",children:o,tweakStyles:n,...r})=>{const l=kn({theme:n}),s=ke({tweakStyles:n,className:"tweakCheckbox",currentComponentName:"DocActions"});return i.jsxs("div",{className:a(l.docActions,l[t]),children:[i.jsx("div",{className:l.counterWrapper,children:i.jsx(Je,{tweakStyles:s,...r,children:i.jsx("span",{className:l.title,children:e})})}),i.jsx("div",{className:l.actionsWrapper,children:o})]})},Rn=o.createUseStyles({...R.slideUp}),In={tweakControlWrapper:{controlWrapper:{"--increment-buttons-width":"36px","--increment-buttons-gap":"1px","--increment-buttons-margin":"1px","--increment-button-icon-size":"16px"}}},jn=P("IncrementInput",{buttons:{display:"flex",flexDirection:"column",height:"calc(100% - var(--increment-buttons-margin) * 2)",margin:"var(--increment-buttons-margin)",gap:"var(--increment-buttons-gap)",flexShrink:0,order:1e3,zIndex:k.Z_INDEX.CONTROL_FOCUS+1},button:{display:"flex",alignItems:"center",justifyContent:"center",width:"var(--increment-buttons-width)",flexGrow:1,cursor:"pointer",border:"none",outline:"none",color:N.FONT_MEDIUM,backgroundColor:N.GREY_BACKGROUND,transition:R.defaultTransition,transitionProperty:"background-color, color","&:hover, &:focus":{backgroundColor:N.GREY_HOVER},"&:active":{backgroundColor:N.GREY_ACTIVE}},disabledButton:{cursor:"default",color:N.FONT_DISABLED,backgroundColor:N.CLASSIC_WHITE,"&:hover":{backgroundColor:N.CLASSIC_WHITE}},errorButton:{},icon:{width:"var(--increment-button-icon-size)",height:"var(--increment-button-icon-size)"}}),Tn=P("Modal",{root:{},fixedPosition:{position:"fixed",top:0,right:0,bottom:0,left:0,zIndex:999,overflowX:"hidden","-webkit-overflow-scrolling":"touch","& $innerOverlay":{display:"flex",width:"100%",minHeight:"100%",boxSizing:"border-box"}},innerOverlay:{},sideBar:{"& $modal":{borderRadius:0,margin:0,minHeight:"100%"}},"position-static":{},"position-left":{},"position-right":{justifyContent:"flex-end"},"position-center":{padding:[50,30]},overlay:{backgroundColor:s(N.BORDER_MAIN,.5)},modal:{backgroundColor:N.CLASSIC_WHITE,borderRadius:k.BORDER_RADIUS_LARGE,boxShadow:`0 8px 32px -8px ${s(N.FONT_MAIN,.24)}, 0 -2px 6px 0 ${s(N.FONT_MAIN,.04)}, 0 0 1px 0 ${s(N.FONT_MAIN,.15)}`,margin:"auto",position:"relative",maxWidth:"100%"},title:{fontSize:28,lineHeight:1.3,marginTop:0},titleWithCloseButton:{paddingRight:32},close:{position:"absolute"},content:{},footer:{display:"flex",gap:12},stickyFooterWrapper:{position:"sticky",bottom:0,marginTop:"auto",zIndex:1},stickyFooter:{borderTop:[1,"solid",N.BORDER_LIGHT],padding:[16,40],borderBottomLeftRadius:k.BORDER_RADIUS_LARGE,borderBottomRightRadius:k.BORDER_RADIUS_LARGE,backgroundColor:N.CLASSIC_WHITE},"buttons-left":{justifyContent:"flex-start"},"buttons-center":{justifyContent:"center"},"buttons-right":{justifyContent:"flex-end"},withoutFooter:{},withStickyFooter:{display:"flex",flexDirection:"column","& $content":{position:"relative",zIndex:1}},footerWrapper:{},l:{"& $modal":{padding:[36,40],fontSize:16,width:560,"&$withStickyFooter":{paddingBottom:0}},"& $withoutFooter":{paddingBottom:54},"& $title":{fontSize:28,marginBottom:32},"& $close":{right:27,top:22},"& $footerWrapper":{paddingTop:40},"& $stickyFooter":{paddingLeft:40,paddingRight:40,marginLeft:-40,marginRight:-40}},m:{"& $modal":{padding:[32,36],width:480,"&$withStickyFooter":{paddingBottom:0}},"& $withoutFooter":{paddingBottom:48},"& $title":{fontSize:24,marginBottom:28},"& $close":{right:23,top:18},"& $footerWrapper":{paddingTop:36},"& $stickyFooter":{paddingLeft:36,paddingRight:36,marginLeft:-36,marginRight:-36}},s:{"& $modal":{padding:[24,26],fontSize:14,width:360,"&$withStickyFooter":{paddingBottom:0}},"& $withoutFooter":{paddingBottom:40},"& $title":{fontSize:20,marginBottom:15},"& $close":{right:14,top:11},"& $footerWrapper":{paddingTop:28},"& $stickyFooter":{paddingLeft:26,paddingRight:26,marginLeft:-26,marginRight:-26}},modalWrapper:{display:"flex",width:"100%"},animationEnd:{"& $modal":{opacity:0},"& $position-center $modal":{transform:"translateY(35px)"},"& $position-right $modal":{transform:"translateX(35px)"},"& $position-left $modal":{transform:"translateX(-35px)"},"& $overlay":{opacity:0}},animationStart:{"& $modal":{opacity:1,transition:"0.15s ease",transitionProperty:"transform, opacity"},"& $position-center $modal":{transform:"translateY(0)"},"& $position-right $modal":{transform:"translateX(0)"},"& $position-left $modal":{transform:"translateX(0)"},"& $overlay":{opacity:1,transition:"opacity 0.2s ease"}},"modal-enter":{extend:"animationEnd"},"modal-enter-active":{extend:"animationStart"},"modal-exit":{extend:"animationStart"},"modal-exit-active":{extend:"animationEnd"}}),Mn={m:{width:40,height:40},icon:{width:30,height:30}},Dn=P("MoreMenu",{root:{position:"relative"},hasCircle:{},button:{display:"flex",alignItems:"center",justifyContent:"center",width:32,height:32,backgroundColor:"transparent",color:N.FONT_MEDIUM,padding:0,borderRadius:"50%",border:"none",cursor:"pointer",transition:R.defaultTransition,transitionProperty:"background-color","&$hasCircle":{backgroundColor:s(N.GREY_HOVER,.5)},"&:hover":{backgroundColor:s(N.BORDER_MAIN,.5)},"&:focus":{backgroundColor:s(N.FONT_DISABLED,.2)},"&:active, &$active":{backgroundColor:s(N.FONT_DISABLED,.5)},"&$disabled":{backgroundColor:s(N.GREY_FOCUS,.5),color:N.BORDER_MAIN}},icon:{width:30,height:30},active:{},disabled:{cursor:"default"},menu:{position:"absolute",zIndex:5,top:"100%",right:0,marginTop:6}}),An=P("MultiSelectInput",{root:{display:"flex",justifyContent:"center",flexDirection:"column",height:"100%",padding:[0,12],overflow:"hidden",whiteSpace:"nowrap"},placeholder:{fontSize:16,userSelect:"none"},placeholderSmall:{fontSize:12,marginBottom:2,position:"relative"},values:{width:"100%"},value:{width:"calc(100% - 64px)",overflow:"hidden",textOverflow:"ellipsis"},amount:{boxSizing:"border-box",position:"absolute",top:"calc(50% - 11px)",right:44,height:22,minWidth:22,fontSize:14,lineHeight:"16px",textAlign:"center",padding:[2,4]},indicator:{position:"absolute",top:0,right:0,height:"100%",width:36,borderRadius:6,display:"flex",alignItems:"center",justifyContent:"center"},arrow:{width:20,height:20,transition:"transform .2s ease"},arrowUp:{transform:"rotate(180deg)"},indicatorDisabled:{}});function Ln({value:e,isOpen:t,isDisabled:o=!1,placeholder:n="",tweakStyles:r,onToggle:l}){const s=An({theme:r}),d=e?.include;return i.jsxs("div",{className:s.root,onClick:()=>!o&&l(!t),children:[(void 0===d||d&&0===d.length)&&i.jsx("div",{className:s.placeholder,children:n}),void 0!==d&&d.length>0&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:a(s.placeholder,s.placeholderSmall),children:n}),i.jsxs("div",{className:s.values,children:[i.jsx("div",{className:s.value,children:d.join(", ")}),i.jsx("div",{className:s.amount,children:d.length})]})]}),i.jsx("div",{className:a(s.indicator,o&&s.indicatorDisabled),children:i.jsx("div",{className:a(s.arrow,t&&s.arrowUp),children:i.jsx(Ie,{type:"chevron-down"})})})]})}const Fn=P("MultiSelect",{root:{position:"relative",boxSizing:"border-box",height:"100%",width:"100%",cursor:"pointer",fontSize:16},required:{"&:before":{content:'""',position:"absolute",left:-12,top:"50%",transform:"translate(0, -50%)",width:6,height:6,borderRadius:"50%"}},disabled:{cursor:"default"},listContainer:{position:"absolute",top:"calc(100% + 4px)",left:-1,right:-1,zIndex:2},invalid:{},open:{},full:{},left:{},right:{}}),On={root:{width:"100%"}};const Bn=P("Notification",{root:{display:"flex"},inline:{width:"fit-content"},icon:{width:20,height:20,marginRight:16,flexShrink:0},body:{flexGrow:1},title:{display:"block",fontWeight:"bold"},text:{display:"block"},content:{},s:{},m:{},l:{},withText:{},withTitle:{},error:{},info:{},warning:{},ok:{},"not-ok":{},custom:{}}),zn=P("PhoneInputCountryList",{root:{borderRadius:k.BORDER_RADIUS_SMALL,backgroundColor:N.CLASSIC_WHITE,border:[1,"solid",N.BORDER_MAIN],boxShadow:"1px 2px 10px rgba(0, 0, 0, 0.25)",overflow:"hidden"},searchContainer:{width:"100%",height:k.CONTROL.HEIGHT,display:"flex",alignItems:"center",boxSizing:"border-box",padding:[0,8,0,16],borderBottom:[1,"solid",N.BORDER_MAIN]},icon:{width:20,height:20},searchIcon:{extend:"icon",color:N.FONT_LABEL,flexShrink:0},flagList:{maxHeight:260,padding:[10,0],...E.withScrollBar},listItem:{height:40,padding:[12,16],display:"flex",alignItems:"center",cursor:"pointer",fontSize:14,lineHeight:"20px",letterSpacing:.15,whiteSpace:"nowrap",boxSizing:"border-box"},selectedCountry:{backgroundColor:N.GREY_BACKGROUND},activeCountry:{backgroundColor:N.GREY_FOCUS},flag:{width:22,height:16,flexShrink:0},countryName:{color:N.FONT_MAIN,overflowX:"hidden",textOverflow:"ellipsis",margin:[0,8,0,12]},dialCode:{color:N.GREY_ACTIVE},emptyResult:{color:N.FONT_LABEL,padding:[6,16]}}),_n={tweakControlWrapper:{controlWrapper:{border:"none",height:"calc(var(--control-height) - 2px)"}},input:{fontSize:14,lineHeight:"20px",letterSpacing:.15}},Pn=({locale:e,placeholder:o,selectedCountryCode:n,closeList:r,noMatchesLabel:l,onChange:s,tweakStyles:d})=>{const c=zn({theme:d}),u=ke({innerStyles:_n,tweakStyles:d,className:"tweakInput",currentComponentName:"PhoneInputCountryList"}),p=t.useMemo(()=>Z($,e),[e]),h=U(n,p),[m,y]=t.useState(""),[g,f]=t.useState(p),[C,v]=t.useState(-1!==h?h:0),x=e=>{const t=g.length-1;"Escape"!==e.code&&"Tab"!==e.code||r(),"ArrowDown"===e.code&&-1!==t&&(e.preventDefault(),v(C<t?C+1:0)),"ArrowUp"===e.code&&-1!==t&&(e.preventDefault(),v(C>0?C-1:t)),"Enter"!==e.code&&"NumpadEnter"!==e.code||(0===g.length?r():C>=0&&s(g[C],e))};return t.useEffect(()=>(document.addEventListener("keydown",x,!1),()=>{document.removeEventListener("keydown",x,!1)})),i.jsxs("div",{className:c.root,children:[i.jsxs("div",{className:c.searchContainer,children:[i.jsx("div",{className:c.searchIcon,children:i.jsx(Ie,{type:"search"})}),i.jsx(ut,{value:m,placeholder:o,onChange:e=>{const t=p.filter(t=>Y(t,e)),o=t.length>0?0:-1,i=U(n,t);f(t),y(e),v(-1!==i?i:o)},tweakStyles:u,isClearable:!0,shouldFocusOnMount:!0})]}),i.jsxs("div",{className:c.flagList,children:[g.map((t,o)=>i.jsx(xt,{active:C===o,options:{block:"nearest"},children:i.jsxs("div",{className:a(c.listItem,{[c.activeCountry]:h===o,[c.selectedCountry]:C===o}),onMouseEnter:()=>v(o),onClick:e=>s(t,e),children:[i.jsx("div",{className:c.flag,children:i.jsx(mn,{countryCode:t.countryCode})}),i.jsx("div",{className:c.countryName,children:K(t,e)}),i.jsx("div",{className:c.dialCode,children:`+${t.dialCode}`})]})},t.countryCode)),0===g.length&&i.jsx("div",{className:c.emptyResult,children:l})]})]})},Wn={phoneNumber:"",dialCode:""},Hn=P("PhoneInput",{root:{width:"100%",position:"relative",boxSizing:"border-box",zIndex:0},countrySelectContainer:{position:"absolute",left:1,top:1,width:80,height:k.CONTROL.HEIGHT-2,display:"flex",alignItems:"center",justifyContent:"center",borderRight:["solid",1,N.BORDER_MAIN],transition:"border-color 0.2s ease-in",cursor:"pointer",zIndex:k.Z_INDEX.CONTROL_FOCUS+1},disabledCountrySelect:{cursor:"default"},flag:{width:22,height:16},arrow:{width:20,color:N.GREY_ACTIVE,marginLeft:8,transition:"transform .2s ease"},up:{transform:"rotate(180deg)"},invalidArrow:{color:N.RED_WARNING},focusedBorder:{},invalidBorder:{borderColor:N.RED_WARNING},inputContainer:{position:"relative",flex:1},flagListContainer:{position:"absolute",width:"100%",top:k.CONTROL.HEIGHT+6,left:-1,zIndex:3}}),$n={tweakControlWrapper:{controlWrapper:{paddingLeft:80},label:{marginLeft:80}}},Vn=P("RadioButton",{input:{appearance:"none",cursor:"pointer",borderRadius:"50%",width:18,height:18,outline:"none",transition:"0.1s all ease-in-out",margin:0,border:[1,"solid","#000"],"&:checked":{border:[5,"solid","#000"]}},label:{display:"flex",alignItems:"center",cursor:"pointer"},content:{marginLeft:8},isDisabled:{cursor:"default"},isInvalid:{}});const Gn=e=>n.isNotEmpty(e)?{width:e.clientWidth-6,transform:`translateX(${e.offsetLeft}px)`}:void 0,Un=P("Selector",{root:{display:"flex",alignItems:"center",listStyle:"none",position:"relative"},required:{"&::before":{top:"50%",left:-12,width:6,height:6,content:'""',position:"absolute",transform:"translate(0, -50%)",borderRadius:"50%",backgroundColor:N.ORANGE_FOCUS}},invalid:{},optionWrapper:{height:"100%"},option:{display:"flex",alignItems:"center",justifyContent:"center",appearance:"none",borderRadius:0,padding:0,border:"none",cursor:"pointer",width:"100%"},active:{cursor:"default"},disabled:{cursor:"default","& $optionText":{color:N.FONT_LABEL}},optionIcon:{width:20,height:20},optionText:{},iconFromRight:{"& $option":{flexDirection:"row-reverse"}},s:{},m:{},l:{},line:{},selector:{display:"grid",gridAutoFlow:"column",gridAutoColumns:"1fr",borderRadius:k.BORDER_RADIUS_SMALL,backgroundColor:N.BORDER_LIGHT,width:"fit-content",position:"relative",border:["solid",1,"transparent"],"& $line":{content:'""',position:"absolute",left:3,height:"calc(100% - 6px)",backgroundColor:N.CLASSIC_WHITE,borderRadius:k.BORDER_RADIUS_SMALL,transition:R.defaultTransition,transitionProperty:"transform, width"},"&$invalid":{borderColor:N.RED_WARNING},"& $option":{gap:6,position:"relative",zIndex:1,height:"100%",color:N.FONT_MEDIUM,fontSize:16,transition:R.defaultTransition,transitionProperty:"color",background:"none","&$s":{padding:[4,8],fontSize:10,lineHeight:"14px"},"&$m":{padding:[14,18]},"&$l":{padding:[16,24]},"&:hover, &:focus":{color:N.FONT_MAIN},"&$active":{color:N.FONT_MAIN}}},autoWidth:{"&$selector":{gridAutoColumns:"auto","& $line":{width:"unset",transform:"unset"}}}});const Kn={default:/./i,agencyName:/^[a-zA-Z\s0-9-]*$/i,surname:/^[a-zA-Z\s-]*$/i,name:/^[a-zA-Z\s-.`']*$/i,surnameRuEn:/^[a-zA-Zа-яА-Я\s-]*$/i,nameRuEn:/^[a-zA-Zа-яА-Я\s-.`']*$/i,email:/^[a-zA-Z0-9@_\-.+']*$/i,digits:/^[0-9]*$/i,docNumber:/^[a-zA-Z0-9]*$/i,benefitCert:/^[a-zA-Z0-9/]*$/i},Zn={"й":"q","ц":"w","у":"e","к":"r","е":"t","н":"y","г":"u","ш":"i","щ":"o","з":"p","х":"[","ъ":"]","ф":"a","ы":"s","в":"d","а":"f","п":"g","р":"h","о":"j","л":"k","д":"l","ж":";","э":"'","я":"z","ч":"x","с":"c","м":"v","и":"b","т":"n","ь":"m","б":",","ю":".","ё":"`"},Yn={...Zn,'"':"@"},qn={"й":"i","ц":"ts","у":"u","к":"k","е":"e","н":"n","г":"g","ш":"sh","щ":"shch","з":"z","х":"h","ъ":"ie","ф":"f","ы":"y","в":"v","а":"a","п":"p","р":"r","о":"o","л":"l","д":"d","ж":"zh","э":"e","я":"ia","ч":"ch","с":"s","м":"m","и":"i","т":"t","ь":"","б":"b","ю":"iu","ё":"e"},Xn=(e,t,o,n)=>e.split("").map(e=>{if(t.test(e))return e;if(!n)return"";const i=o[e.toLowerCase()]??e,r=e.toUpperCase()===e?i.toUpperCase():i;return t.test(r)?r:""}).join(""),Jn=t.forwardRef(function({value:e="",smartType:o="default",regExp:r,maxLength:a,isUpperCase:l=!1,isTransliterationEnabled:s=!0,onChange:d,...c},u){const p=t.useRef(null),h=xe([u,p]),m=r||Kn[o],y=e=>l?e.toUpperCase():e,g=(e,t)=>{const o=p.current;n.isNotEmpty(o)&&"email"!==o.type&&(o.value=t,o.setSelectionRange(e,e))};return i.jsx(ut,{...c,ref:h,value:e,maxLength:a,onPaste:async t=>{t.preventDefault();const o=t.clipboardData.getData("text/plain").split("").join(""),i=t.currentTarget,r=i.selectionStart??0,l=i.selectionEnd??0,c=m.test(o);let u=c?o:Xn(o,m,qn,s);const p=u.length+e.length-(l-r);n.isNotEmpty(a)&&a>=0&&p>a&&(u=u.substring(0,u.length-(p-a)));const h=y(`${e.substring(0,r)}${u}${e.substring(l)}`);d(h,{rawValue:o,isValid:c},t),g(r+u.length,h)},onChange:async(t,i)=>{const r=m.test(t),a=y(r?t:Xn(t,m,"email"===o?Yn:Zn,s));d(a,{rawValue:t,isValid:r},i);const l=p.current;if(n.isNotEmpty(l)){const t=l.selectionStart;g(n.isEmpty(t)||a!==e?t:t-1,a)}}})}),Qn=P("Status",{root:{display:"inline-flex",verticalAlign:"middle",color:"var(--status-color)",backgroundColor:"var(--status-background)",width:"max-content",alignItems:"center","& > *":{flexShrink:0}},icon:{"& > div":{display:"inline-block"}},iconLeft:{order:-1},text:{},badge:{color:N.CLASSIC_WHITE,backgroundColor:"var(--status-color)"},xs:{padding:[2,4],gap:4,borderRadius:2,fontSize:12,lineHeight:"16px",letterSpacing:.24,fontWeight:"bold","& $icon":{width:16,height:16},"& $badge":{padding:[0,2],marginRight:-1,borderRadius:4}},s:{padding:[3,8,5,8],gap:4,borderRadius:6,fontSize:13,lineHeight:"16px",letterSpacing:.2,fontWeight:"bold","& $text":{},"& $icon":{width:16,height:16},"& $badge":{padding:[0,4,2,4],margin:[0,-4,-2,0],borderRadius:4}},m:{padding:[7,12],gap:4,borderRadius:6,fontSize:15,lineHeight:"18px",letterSpacing:.15,fontWeight:"bold","& $text":{},"& $icon":{width:18,height:18},"& $badge":{padding:[2,4],margin:[-2,-7,-2,0],borderRadius:4}},custom:{}}),ei=P("Switch",{root:{display:"flex",alignItems:"center",cursor:"pointer","--switch-width":"36px","--switch-height":"20px","--switch-toggle-width":"16px","--switch-toggle-height":"16px","--switch-toggle-padding":"calc((var(--switch-height) - var(--switch-toggle-height)) / 2)","--switch-label-gap":"12px"},primary:{},secondary:{},invalid:{},disabled:{pointerEvents:"none",cursor:"default"},checked:{"& $switch::before":{left:"calc(var(--switch-width) - var(--switch-toggle-width) - var(--switch-toggle-padding))"}},switch:{position:"relative",flexShrink:0,display:"block",width:"var(--switch-width)",height:"var(--switch-height)",borderRadius:"calc(infinity * 1px)",boxSizing:"border-box",transition:R.defaultTransition,transitionProperty:"opacity, background-color",backgroundColor:"#333","&::before":{content:'""',position:"absolute",top:"var(--switch-toggle-padding)",left:"var(--switch-toggle-padding)",width:"var(--switch-toggle-width)",height:"var(--switch-toggle-height)",right:"auto",display:"block",backgroundColor:"#fff",borderRadius:"calc(infinity * 1px)",zIndex:1,transition:R.defaultTransition,transitionProperty:"left, background-color"}},input:{display:"none"},label:{transition:R.defaultTransition,transitionProperty:"opacity, color"},labelLeft:{order:-1,marginRight:"var(--switch-label-gap)"},labelRight:{marginLeft:"var(--switch-label-gap)"}}),ti=P("TextArea",{root:{width:"100%"},textarea:{...E.withScrollBar,width:"100%",height:"100%",fontFamily:"inherit",fontSize:16,padding:[14,0,8,"var(--control-padding)"],scrollPadding:"14px 0 8px var(--control-padding)",scrollbarGutter:"stable",boxSizing:"border-box",outline:"none",outlineStyle:"none",transition:R.defaultTransition,transitionProperty:"background-color",border:"none",resize:"none",background:"transparent","&::placeholder":{opacity:1},MozAppearance:"textfield","&::-webkit-inner-spin-button,&::-webkit-outer-spin-button":{WebkitAppearance:"none",margin:0}},wrapper:{width:"100%"},autoSized:{display:"grid",gridTemplateRows:"minmax(0, 100%)","& > $textarea, &::after":{gridArea:"1 / 1"},"&::after":{extend:"textarea",content:'attr(data-value) " "',overflowWrap:"break-word",whiteSpace:"pre-wrap",visibility:"hidden"}},symbolsCount:{textAlign:"right",marginTop:4,fontSize:12,marginLeft:"auto",whiteSpace:"nowrap",pointerEvents:"none"},symbolsCountError:{color:"red"},symbolsCountActive:{},"counter-default":{},withLabel:{}}),oi=t.forwardRef(function({value:e="",placeholder:o,name:r,counterPosition:l="default",shouldFocusOnMount:s,hasCounter:d=!0,shouldTrimAfterMaxLength:c,isAutoSized:u=!0,shouldAlwaysShowPlaceholder:p,isActive:h,maxLength:m,rows:y,data:g,testId:f,tweakStyles:C,onChange:v,onPaste:x,onFocus:b,onBlur:w,infoMessage:S,errorMessage:N,label:k,isDisabled:E,isInvalid:R,isRequired:I,size:j,groupPlacement:T,...M},D){const A=ti({theme:C}),L=d&&n.isNotEmpty(m),F=`${e.length} / ${m}`,O=ke({tweakStyles:C,className:"tweakWithMessages",currentComponentName:"TextArea"}),B=ke({tweakStyles:C,className:"tweakControlWrapper",currentComponentName:"TextArea"}),[z,_]=t.useState(!1),P=z||h,W=n.isArrayLikeNotEmpty(e),H=n.isReactNodeNotEmpty(k),$=(!H||P||p)&&n.isStringNotEmpty(o);return i.jsx("div",{className:a(A.root,n.isNotEmpty(j)&&A[j]),style:{"--counter-length":F.length},children:i.jsx(ot,{errorMessage:N,infoMessage:S,tweakStyles:O,testId:n.getTestId(f,"wrapper"),children:i.jsx(st,{label:k,tweakStyles:B,isFocused:P,isDisabled:E,hasValue:W,isInvalid:R,isRequired:I,groupPlacement:T,size:j,isFullWidth:!0,children:i.jsxs("div",{className:a(A.wrapper,{[A.autoSized]:u,[A.withLabel]:H}),...u&&{"data-value":e},children:[i.jsx("textarea",{ref:D,className:A.textarea,value:e,disabled:E,placeholder:$?o:void 0,maxLength:c?m:void 0,name:r,rows:y,onPaste:x,onFocus:e=>{_(!0),b?.(e)},onBlur:e=>{_(!1),w?.(e)},onChange:e=>{v(e.currentTarget.value,e)},autoFocus:s,...n.addDataAttributes(g,f),...M}),L&&i.jsx("span",{className:a(A.symbolsCount,A[`counter-${l}`],{[A.symbolsCountError]:e.length>m,[A.symbolsCountActive]:P||W}),...n.addDataAttributes({counterPosition:l}),children:F})]})})})})}),ni=P("TextButton",{root:{display:"flex",alignItems:"center",height:24,padding:0,position:"relative",background:"transparent",border:"none",borderRadius:0,cursor:"pointer",outline:"none",transition:R.defaultTransition,transitionProperty:"color","&[disabled]":{cursor:"default",pointerEvents:"none"}},xl:{fontSize:16,"& $content":{gap:14}},l:{fontSize:14,letterSpacing:"0.15px","& $content":{gap:10,"&$reverseContent":{gap:6}}},primary:{},secondary:{},custom:{},active:{},disabled:{},bold:{fontWeight:"bold"},iconContainer:{display:"flex",alignItems:"center",justifyContent:"center"},circle:{width:24,height:24,borderRadius:"50%",transition:R.defaultTransition,transitionProperty:["background","color"]},icon:{width:20,height:20},content:{display:"flex",alignItems:"center",height:"100%"},reverseContent:{flexDirection:"row-reverse"},loader:{display:"none",height:8,position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)"},loading:{"& $content":{visibility:"hidden"},"& $loader":{display:"block"}}}),ii={tweakDotsPreloader:{fadedDot:{width:6,height:6}},logo:{width:24,height:24},default:{width:24,height:24}},ri=t.forwardRef(function({children:e,icon:t,view:o="primary",isDisabled:r=!1,isBold:l=!1,isLoading:s=!1,isActive:d=!1,hasCircleUnderIcon:c=!1,size:u="l",iconPosition:p="left",preloaderType:h="dots",type:m="button",testId:y,tweakStyles:g,data:f,onClick:C,...v},x){const b=ni({theme:g}),w=ke({innerStyles:ii,tweakStyles:g,className:"tweakPreloader",currentComponentName:"TextButton"}),S=r||s;return i.jsxs("button",{ref:x,type:m,className:a(b.root,b[u],b[o],{[b.bold]:l,[b.loading]:s,[b.active]:d,[b.disabled]:r}),disabled:S,onClick:S?void 0:C,...v,...n.addDataAttributes(f,y),children:[i.jsxs("span",{className:a(b.content,"right"===p&&b.reverseContent),children:[n.isReactNodeNotEmpty(t)&&i.jsx("span",{className:a(b.iconContainer,c&&b.circle),children:i.jsx("span",{className:b.icon,children:je(t)})}),e]}),s&&i.jsx("span",{className:b.loader,children:i.jsx(Ue,{type:h,useCurrentColor:!0,tweakStyles:w})})]})}),ai=P("TextWithInfo",{root:{display:"inline-block",height:40,padding:[0,18],borderRadius:20,boxSizing:"border-box",color:N.FONT_MEDIUM,"&:hover":{backgroundColor:N.GREY_FOCUS}},container:{display:"flex",height:"100%",alignItems:"center"},selected:{backgroundColor:N.GREY_FOCUS},text:{cursor:"pointer",fontSize:16},info:{width:20,marginLeft:4,color:N.FONT_DISABLED,cursor:"pointer",borderRadius:"50%","&:link":{color:N.FONT_DISABLED},"&:hover":{color:N.CLASSIC_WHITE,backgroundColor:N.FONT_DISABLED},"&:visited":{color:N.FONT_DISABLED,"&:hover":{color:N.CLASSIC_WHITE,backgroundColor:N.FONT_DISABLED}}}}),li=P("Toaster",{root:{borderRadius:8,position:"relative",background:N.CLASSIC_WHITE,padding:[20,40,20,20],display:"flex"},iconContainer:{width:20,height:20,flexShrink:0,marginRight:16},error:{color:N.RED_WARNING},info:{},warning:{color:N.ORANGE_FOCUS},ok:{color:N.GREEN_FOCUS},"not-ok":{color:N.FONT_LABEL},text:{},title:{},content:{"&:not(:first-child):not(:empty)":{marginTop:16}},close:{position:"absolute",top:12,right:12,width:32,height:32}}),si=P("NewMoreMenu",{hasCircle:{},button:{display:"flex",alignItems:"center",justifyContent:"center",width:32,height:32,backgroundColor:"transparent",color:N.FONT_MEDIUM,padding:0,borderRadius:"50%",border:"none",cursor:"pointer",transition:R.defaultTransition,transitionProperty:"background-color"},icon:{width:30,height:30},active:{},disabled:{cursor:"default"}}),di={popup:{zIndex:9999}};e.rgba=s,e.AccountInfo=({data:e,testId:o,avatar:l,tweakStyles:s,accountName:d,options:c})=>{const u=ze({theme:s}),p=ke({tweakStyles:s,className:"tweakList",currentComponentName:"AccountInfo"}),h=t.useRef(null),m=t.useRef(null),[y,g]=t.useState(!1),f=e=>{e.stopPropagation(),g(e=>!e)};return Se(m,()=>g(!1),h),i.jsxs("div",{className:u.root,...n.addDataAttributes(e,o),children:[l??i.jsx("div",{className:u.avatarIcon,children:i.jsx(Ie,{type:"avatar"})}),i.jsxs("div",{ref:h,className:u.account,onClick:f,children:[i.jsx("div",{className:a(u.accountName,y&&u.accountNameOpened),children:d}),i.jsx("div",{className:a(u.accountChevron,y&&u.accountChevronOpened),children:i.jsx(Ie,{type:"chevron-down-small"})}),i.jsx(r.CSSTransition,{in:y,timeout:150,unmountOnExit:!0,classNames:{enter:u["slide-up-enter"],enterActive:u["slide-up-enter-active"],exit:u["slide-up-exit"],exitActive:u["slide-up-exit-active"]},children:i.jsx("div",{ref:m,className:u.accountMenu,onClick:f,children:i.jsx(Be,{items:c,tweakStyles:p})})})]})]})},e.AddButton=({text:e,type:t="button",isDisabled:o=!1,onClick:r,isFullWidth:l=!1,data:s,testId:d,tweakStyles:c})=>{const u=_e({theme:c});return i.jsxs("button",{type:t,className:a(u.root,o&&u.disabled,l&&u.fullWidth),onClick:o?void 0:r,disabled:o,...n.addDataAttributes(s,d),children:[i.jsx("div",{className:u.icon,children:i.jsx(Ie,{type:"plus"})}),i.jsx("div",{children:e})]})},e.Button=qe,e.Checkbox=Je,e.CloseButton=({tweakStyles:e,testId:t,data:o,icon:r="close",onClose:a})=>{const l=Qe({theme:e});return i.jsx("button",{type:"button",className:l.root,onClick:a,...n.addDataAttributes(o,t),children:i.jsx(Ie,{type:r})})},e.ControlWrapper=st,e.CssBaseline=({data:e,testId:t,tweakStyles:o})=>{const r=et({theme:o});return i.jsx("div",{className:r.root,...n.addDataAttributes(e,t)})},e.DEFAULT_PHONE_MASK=Q,e.DOC_ACTIONS_VIEWS=["neutral","inverse"],e.DateInput=yt,e.DatePicker=Zt,e.Description=({text:e,moreTitle:o,lessTitle:r,truncateIndex:a=150,isAlwaysOpen:l=!0,testId:s,data:d,tweakStyles:c})=>{const u=qt({theme:c}),p=e.length<a,[h,m]=t.useState(l),y=e.match(Yt),g=y&&y[0],f=e.replace(Yt,""),C=e.slice(0,e.slice(0,a).lastIndexOf(" "));return i.jsxs("div",{className:u.root,...n.addDataAttributes(d,s),children:[l||h||p?i.jsxs("div",{children:[i.jsxs("span",{children:[f," "]}),!!g&&i.jsx("a",{className:u.link,href:g,target:"_blank",rel:"noopener noreferrer",children:g})]}):i.jsx("div",{children:i.jsx("span",{children:C})}),l||p?void 0:i.jsx("div",{className:u.button,onClick:()=>m(!h),children:h?r:o})]})},e.DocActions=En,e.EMPTY_DATE_INPUT_VALUE=pt,e.EMPTY_DATE_RANGE_INPUT_VALUE=ht,e.FileInput=Qt,e.FileItem=({fileInfo:e,icon:t=co(e),metadata:o,actions:r,error:l,info:s,isDisabled:d=!1,areActionsDisabled:c=!1,isLoading:u=!1,shouldShowSize:p=!1,itemSize:h="m",preloaderType:m="default",removeIcon:y="trash-can",onRemove:g,onClick:f,testId:v,data:x,tweakStyles:b})=>{const w=uo({theme:b}),S=ke({tweakStyles:b,className:"tweakRemoveIconButton",currentComponentName:"FileItem"}),N=ke({innerStyles:po,tweakStyles:b,className:"tweakPreloader",currentComponentName:"FileItem"}),k=ke({tweakStyles:b,className:"tweakTooltip",currentComponentName:"FileItem"}),{name:E,size:R}=e,I=n.isFunction(g);return i.jsxs("div",{className:w.root,children:[i.jsxs("div",{className:a(w.fileItemWrapper,w[h],{[w.disabled]:d}),...n.addDataAttributes(x,v),...n.addClickHandler(e=>{e.stopPropagation(),f?.(e)},!d),children:[i.jsx("div",{className:w.fileIcon,children:je(t)}),i.jsxs("div",{className:w.fileNameContainer,children:[i.jsx(ro,{tooltipText:E,tooltipView:"hint",tweakStyles:k,children:i.jsx("div",{className:w.fileName,children:E})}),i.jsxs("div",{className:w.metadata,children:[o,p&&n.isNotEmpty(R)&&i.jsx("div",{className:w.fileSize,children:C.filesize(R)})]})]}),i.jsxs("div",{className:w.actions,children:[u?i.jsx("div",{className:a(w.preloader,w[`preloader-${m}`]),children:i.jsx(Ue,{type:m,tweakStyles:N,useCurrentColor:!0})}):I&&i.jsx(to,{icon:y,onClick:e=>{e.stopPropagation(),g?.(e)},isDisabled:c,tweakStyles:S}),r]})]}),i.jsxs("div",{className:w.footer,children:[n.isReactNodeNotEmpty(l)&&i.jsx("div",{className:w.error,children:l}),n.isReactNodeNotEmpty(s)&&i.jsx("div",{className:w.info,children:s})]})]})},e.Filter=tn,e.FilterInterval=jo,e.FilterMultiSelect=Bo,e.FilterSelect=Wo,e.FilterValueView=sn,e.FilterWithDates=Yo,e.FilterWithPeriod=Jo,e.FilterWrapper=un,e.FiltersPane=function({data:e,tweakStyles:o,filtersConfig:r,enabledFilters:a,values:l={},localeKey:s,locale:d,search:c,isDisabled:u=!1,hasClearButton:p=!0,shouldRenderDataId:h=!1,settingsIcon:m="filter",testId:y,onChangeFilters:g,onSettingsButtonClick:f,onClear:C}){const v=So({theme:o}),x=ke({innerStyles:No,tweakStyles:o,className:"tweakClearButton",currentComponentName:"FiltersPane"}),b=ke({tweakStyles:o,className:"tweakFilterWrapper",currentComponentName:"FiltersPane"}),w=t.useMemo(()=>Co(s,d),[s,d]),S=a??Object.keys(r),N=p&&(n.isNotEmpty(c)||S.some(e=>n.isNotEmpty(r[e]))),k=i.jsx("div",{className:v.clear,children:i.jsx(qe,{onClick:()=>{n.isNotEmpty(C)?C():(g({}),void 0!==c&&c.onChange({}))},size:"s",view:"text",isDisabled:u,testId:n.getTestId(y,"clear-button"),tweakStyles:x,children:w.clear})});return i.jsxs("div",{className:v.root,...n.addDataAttributes(e,y),children:[void 0!==f&&i.jsx("div",{className:v.settings,tabIndex:0,...n.addDataTestId(y,"settings-button"),onClick:u?void 0:f,children:i.jsx("div",{className:v.settingsIcon,children:je(m)})}),void 0!==c&&i.jsx(an,{...c,locale:Co(c.localeKey??s,c.locale,d),localeKey:c.localeKey??s,isDisabled:c.isDisabled??u,testId:n.getTestId(y,"search")}),S.map((e,t)=>{const o=t===S.length-1,a=String(e),c=l[a],p=r[a];if(void 0===p)return console.error(`enabledFilters содержит фильтр ${a}, не описанный в конфиге`),o?k:null;const m=i.jsx(un,{filter:p,locale:d,localeKey:s,onChange:e=>g({...l,[a]:e}),value:c,isDisabled:u||p?.requiredFilledFilters?.some(e=>!l[e]),tweakStyles:b,data:h?{id:a}:void 0,testId:n.getTestId(y,`filter-${a}`)},a);return o?i.jsxs("div",{className:v.filterWithClearButton,children:[m,N&&i.jsx(i.Fragment,{children:k})]},a):m})]})},e.FiltersPaneSearch=an,e.Flag=mn,e.FlexibleTable=function({content:e,headerContent:o,config:r,enabledColumns:l,activeRows:s,uniqueField:d,isLoading:c=!1,isFirstColumnSticky:u=!1,isHorizontallyScrollable:p=!1,isRowFocusable:h=!1,infinityScrollConfig:m,renderMode:y="table",refForScroll:g,nothingFoundContent:f,data:C,testId:v,tweakStyles:x,shouldRenderHeader:b=!0,onHeadClick:w,isExpandableRowComponentInitiallyOpen:S,...N}){const k=xn({theme:x}),E=ke({tweakStyles:x,className:"tweakTableRow",currentComponentName:"FlexibleTable"}),R=t.useRef(null),I=t.useMemo(()=>l??Object.keys(r),[l,r]),j=(e,t)=>({...N,item:e,renderMode:y,config:r,columns:I,uniqueField:d,isLoading:c,isFirstColumnSticky:u,isFocusable:h,tweakStyles:E,isExpandableRowComponentInitiallyOpen:n.applyAction(S,e,t)}),T=t.useCallback((e,t)=>o=>{p&&n.isNotEmpty(o)&&t(o)?o.dataset[e]="true":o?.removeAttribute(`data-${e}`)},[p]),M=t.useMemo(()=>T("scrollable",Cn),[T]),D=t.useMemo(()=>T("scrolled",e=>e.scrollLeft>0),[T]),A=xe([g,R,M,D]),L=m&&{isLoading:m.isLoading,onInfinityScroll:()=>m.onInfinityScroll((m.activePage??0)+1),isEnabled:m.isEnabled??!m.isLastPage},F=fe({isDisabled:!L?.isEnabled||L.isLoading,onIntersection:L?.onInfinityScroll}),O=n.isReactNodeNotEmpty(f)&&!n.isArrayNotEmpty(e)&&!L?.isLoading&&!L?.isEnabled;t.useEffect(()=>{const e=R.current;if(n.isEmpty(e)||!p)return;const t=()=>{D(e)},o=()=>{M(e)};return e.addEventListener("scroll",t),window.addEventListener("resize",o),()=>{e.removeEventListener("scroll",t),window.removeEventListener("resize",o)}},[R,p,D,M]);const B=t.useMemo(()=>new Set(s),[s]),z=yn[y];return i.jsx("div",{ref:A,className:a(k.flexibleTableWrapper,{[k.scroll]:p}),children:i.jsxs(z.Root,{className:k.root,...n.addDataAttributes({...C,isLoading:c},v),children:[b&&i.jsx(z.Head,{className:k.head,children:i.jsx(z.Row,{className:k.headerRow,children:I.map((e,t)=>{const{position:l,minWidth:s,width:d,maxWidth:c,titleAlign:p="left",right:h,left:m,title:y="",shouldRenderDataId:g}=r?.[e]??{},f="sticky"===l||u&&0===t;return i.jsx(z.Header,{className:a(k.header,{[k.headerSticky]:f,[k.headerSecond]:u&&1===t}),style:{minWidth:s,width:d,maxWidth:c,textAlign:p,position:f?"sticky":l,right:h,left:m},onClick:n.isNotEmpty(w)?()=>w(e):void 0,...n.addDataAttributes({id:g?e:void 0}),children:n.applyAction(y,{value:o?.[e]})},e)})})}),i.jsx(z.Body,{className:k.body,children:c?n.indexMap(6,e=>t.createElement(Nn,{...j({},e),key:e})):i.jsxs(i.Fragment,{children:[O&&i.jsx(z.Row,{className:k.nothingFoundRow,children:i.jsx(z.Cell,{className:k.nothingFound,colSpan:I.length,children:f})}),e.map((e,o)=>t.createElement(Nn,{...j(e,o),isActive:B.has(o),key:n.isNotEmpty(d)?e[d]:o})),L?.isEnabled&&i.jsx(z.Row,{className:k.loaderRow,children:i.jsx(z.Cell,{className:k.loaderCell,colSpan:I.length,children:i.jsx("div",{ref:F,className:k.loader,children:i.jsx(Ue,{type:"dots",testId:n.getTestId(v,"loader")})})})})]})})]})})},e.FloatDocActions=({isOpen:e,children:t,...o})=>{const n=Rn();return i.jsx(r.CSSTransition,{in:e,timeout:150,mountOnEnter:!0,unmountOnExit:!0,classNames:{enter:n["slide-up-enter"],enterActive:n["slide-up-enter-active"],exit:n["slide-up-exit"],exitActive:n["slide-up-exit-active"]},children:i.jsx(En,{...o,children:t})})},e.GROUP_PLACEMENTS=["left","right","middle","top","bottom","top-left","top-right","bottom-left","bottom-right"],e.Icon=Ie,e.IconButton=to,e.IncrementInput=({value:e,onChange:o,min:r,max:l,step:s=1,intPartPrecision:d,tweakStyles:c,isDisabled:u,isReadonly:p,isInvalid:h,...m})=>{const y=ke({innerStyles:In,tweakStyles:c,className:"tweakInput",currentComponentName:"IncrementInput"}),g=jn({theme:c}),f=u||p,C=f||n.isNotEmpty(d)&&he((e??0)+s)>d||n.isNotEmpty(l)&&n.isNotEmpty(e)&&e>=l,v=f||n.isNotEmpty(r)&&n.isNotEmpty(e)&&e<=r;return t.useEffect(()=>{n.isNumberInteger(s)||console.error("Параметр step должен быть целым числом")},[s]),i.jsx(wo,{...m,isInvalid:h,isDisabled:u,isReadonly:p,min:r,max:l,intPartPrecision:d,onChange:o,value:e,tweakStyles:y,children:i.jsxs("div",{className:g.buttons,children:[i.jsx("button",{className:a(g.button,{[g.disabledButton]:C,[g.errorButton]:h}),type:"button",disabled:C,onClick:()=>{o(ae((e??0)+s,r,l))},children:i.jsx("div",{className:g.icon,children:i.jsx(Ie,{type:"plus"})})}),i.jsx("button",{className:a(g.button,{[g.disabledButton]:v,[g.errorButton]:h}),type:"button",disabled:v,onClick:()=>{o(ae((e??0)-s,r,l))},children:i.jsx("div",{className:g.icon,children:i.jsx(Ie,{type:"minus"})})})]})})},e.Input=ut,e.InputBase=ct,e.List=Be,e.ListItem=Le,e.Modal=({data:e,tweakStyles:o,title:l,size:s="l",isFooterSticky:d=!1,footer:c,buttons:u,buttonsAlign:p="right",hasCloseButton:h=!0,hasOverlay:m=!0,isOpen:y=!1,position:g="center",children:f,zIndex:C,testId:v,shouldCloseOnOverlayClick:x=!0,shouldCloseOnEsc:w=!0,shouldBlockScroll:S=!0,timeout:N=150,unmountOnExit:k=!0,onClose:E,...R})=>{const I=Tn({theme:o}),j=ke({innerStyles:Mn,tweakStyles:o,className:"tweakCloseButton",currentComponentName:"Modal"}),[T,M]=t.useState(!1),D=R.in??y,A=n.isReactNodeNotEmpty(c)||n.isArrayNotEmpty(u),L=t.useRef(null),F=t.useCallback(e=>{"Escape"===e.code&&void 0!==E&&E()},[E]);return t.useEffect(()=>w&&void 0!==E&&D?(document.addEventListener("keydown",F),()=>document.removeEventListener("keydown",F)):()=>null,[w,E,D,F]),i.jsx(r.CSSTransition,{in:D,timeout:N,unmountOnExit:k,classNames:{enter:I["modal-enter"],enterActive:I["modal-enter-active"],exit:I["modal-exit"],exitActive:I["modal-exit-active"]},...R,children:i.jsx("div",{className:I.modalWrapper,children:i.jsx(b.RemoveScroll,{enabled:S,forwardProps:!0,children:i.jsx("div",{className:a(I.root,I[s],{[I.overlay]:"static"!==g&&m,[I.sideBar]:"left"===g||"right"===g,[I.fixedPosition]:"static"!==g}),style:{zIndex:C},...n.addDataAttributes(e,v),children:i.jsx("div",{ref:L,className:a(I.innerOverlay,I[`position-${g}`]),onMouseDown:x?e=>{void 0!==E&&e.target===L.current&&M(!0)}:void 0,onMouseUp:x?e=>{void 0!==E&&(e.target===L.current&&T&&E(),M(!1))}:void 0,children:i.jsxs("div",{className:a(I.modal,{[I.withoutFooter]:!A,[I.withStickyFooter]:d}),children:[h&&i.jsx("div",{className:I.close,children:i.jsx(to,{testId:n.getTestId(v,"close-button"),tweakStyles:j,view:"cancel-light",icon:"close",onClick:E})}),n.isReactNodeNotEmpty(l)&&i.jsx("h3",{className:a(I.title,{[I.titleWithCloseButton]:h}),children:l}),n.isReactNodeNotEmpty(f)&&i.jsx("div",{className:I.content,children:f}),A&&i.jsx("div",{className:a(I.footerWrapper,{[I.stickyFooterWrapper]:d}),children:i.jsx("div",{className:a(I.footer,I[`buttons-${p}`],{[I.stickyFooter]:d}),children:n.isReactNodeNotEmpty(c)?c:u})})]})})})})})})},e.MoreMenu=({items:e,isDisabled:o=!1,hasDefaultStateBackground:r=!0,data:l,testId:s,tweakStyles:d,onMenuOpen:c,onMenuClose:u})=>{const p=Dn({theme:d}),h=ke({tweakStyles:d,className:"tweakList",currentComponentName:"MoreMenu"}),[m,y]=t.useState(!1),g=t.useRef(null),f=t.useRef(null),C=o||0===e.length,v=()=>{y(!1),u?.()};return Se(g,v,f),i.jsxs("div",{className:p.root,children:[i.jsx("button",{ref:f,className:a(p.button,{[p.hasCircle]:r,[p.disabled]:C,[p.active]:m}),onClick:C?void 0:e=>{const t=!m;e.stopPropagation(),y(t),t?c?.():u?.()},...n.addDataAttributes(l,s),children:i.jsx("div",{className:p.icon,children:i.jsx(Ie,{type:"menu"})})}),m&&!C&&i.jsx("div",{className:p.menu,ref:g,children:i.jsx(Be,{items:e,testId:n.getTestId(s,"list"),tweakStyles:h,onClick:v})})]})},e.MultiSelect=function({value:e,corners:o="full",isInvalid:r=!1,isRequired:l=!1,isDisabled:s=!1,placeholder:d="",localeKey:c,locale:u,testId:p,data:h,onChange:m,fetchOptions:y,tweakStyles:g}){const f=Fn({theme:g}),C=ke({innerStyles:On,tweakStyles:g,className:"tweakMultiSelectList",currentComponentName:"MultiSelect"}),[v,x]=t.useState(!1),b=t.useRef(null),w=()=>{x(!1)};return Ne(b,w,f.root),i.jsxs("div",{className:a(f.root,f[o],v&&f.open,r&&!s&&f.invalid,l&&f.required,s&&f.disabled),...n.addDataAttributes(h,p),children:[i.jsx(Ln,{value:e,isOpen:v,isDisabled:s,placeholder:d,onToggle:e=>x(e)}),v&&i.jsx("div",{className:f.listContainer,ref:b,children:i.jsx(Oo,{tweakStyles:C,value:e,localeKey:c,locale:u,fetchOptions:y,onChange:m,onClose:w})})]})},e.MultiSelectList=Oo,e.NewMoreMenu=({items:e,isDisabled:t=!1,hasDefaultStateBackground:o=!0,data:r,renderTrigger:l,listSize:s,testId:d,tweakStyles:c,...u})=>{const p=si({theme:c}),h=ke({tweakStyles:c,className:"tweakWithPopup",currentComponentName:"NewMoreMenu"}),m=ke({tweakStyles:c,className:"tweakList",currentComponentName:"NewMoreMenu"});return i.jsx(De,{isDisabled:t||n.isArrayEmpty(e),tweakStyles:h,...u,trigger:l??(({triggerProps:e,referenceProps:t})=>i.jsx("button",{className:a(p.button,{[p.hasCircle]:o,[p.disabled]:e.isDisabled,[p.active]:e.isActive}),disabled:e.isDisabled,...n.addDataAttributes(r,d),...t,children:i.jsx("div",{className:p.icon,children:i.jsx(Ie,{type:"menu"})})})),children:({onClose:t})=>i.jsx(Be,{items:e,size:s,tweakStyles:m,onClick:t})})},e.Notification=({children:e,type:t,isFullWidth:o=!0,text:r,title:l,testId:s,size:d="s",data:c,icon:u,tweakStyles:p})=>{const h=Bn({theme:p}),m=n.isStringNotEmpty(r),y=n.isStringNotEmpty(l),g="custom"!==t,f=n.isReactNodeNotEmpty(u)||g;return i.jsxs("div",{className:a(h.root,h[d],h[t],{[h.inline]:!o,[h.withTitle]:y,[h.withText]:m}),...n.addDataAttributes(c,s),children:[f&&i.jsx("div",{className:h.icon,children:n.isReactNodeNotEmpty(u)?je(u):g&&i.jsx(Ie,{type:`status-${t}`})}),i.jsxs("div",{className:h.body,children:[y&&i.jsx("span",{className:h.title,...n.addDataTestId(s,"title"),children:l}),m&&i.jsx("span",{className:h.text,...n.addDataTestId(s,"text"),children:r}),n.isReactNodeNotEmpty(e)&&i.jsx("div",{className:h.content,children:e})]})]})},e.NumberInput=wo,e.PERIODS=ho,e.PERIODS_GETTERS=fo,e.PhoneInput=({locale:e="ru",value:o=Wn,onChange:r,data:l,testId:s,isDisabled:d,isInvalid:c,isActive:u,tweakStyles:p,codeSearchPlaceholder:h="Поиск",noMatchesLabel:m="Ничего не найдено",...y})=>{const g=Hn({theme:p}),f=ke({innerStyles:$n,tweakStyles:p,className:"tweakInput",currentComponentName:"PhoneInput"}),C=ke({tweakStyles:p,className:"tweakCountryList",currentComponentName:"PhoneInput"}),[v,x]=t.useState(!1),[b,w]=t.useState(!1),S=t.useRef(null),N=t.useRef(null),k=t.useRef(null),E=q(o),R=t.useMemo(()=>o?.countryCode??X(E),[E,o?.countryCode]),I=()=>{x(!1)};return Se(S,I,N),i.jsxs("div",{className:g.root,...n.addDataAttributes(l,s),children:[i.jsxs("div",{className:a(g.countrySelectContainer,{[g.disabledCountrySelect]:d,[g.invalidBorder]:c,[g.focusedBorder]:u||v||b}),ref:N,onClick:d?void 0:()=>x(!v),children:[i.jsx("div",{className:g.flag,children:i.jsx(mn,{countryCode:R})}),i.jsx("div",{className:a(g.arrow,{[g.up]:v,[g.invalidArrow]:c}),children:i.jsx(Ie,{type:"chevron-down"})})]}),i.jsx(ut,{value:E,mask:ee(R),ref:k,isDisabled:d,isInvalid:c,isActive:v||u,testId:n.getTestId(s,"input"),tweakStyles:f,onChange:(e,t)=>{if("change"===t.type){const o=e.replace(/[^0-9]/g,"");let n=R;const i=G(R);if(void 0!==i){const e=i.fullCodes.some(e=>o.length>=e.length?o.startsWith(e):e.startsWith(o)),t=o.startsWith(i.dialCode);e&&t||(n=void 0)}r(J(o,n),t)}},onFocus:e=>{w(!0),void 0!==y.onFocus&&y?.onFocus(e)},onBlur:e=>{w(!1),void 0!==y.onBlur&&y?.onBlur(e)},...y}),v&&i.jsx("div",{className:g.flagListContainer,ref:S,children:i.jsx(Pn,{selectedCountryCode:R,placeholder:h,locale:e,tweakStyles:C,noMatchesLabel:m,onChange:(e,t)=>{e.countryCode!==R&&r({phoneNumber:e.dialCode!==o.dialCode?"":J(E).phoneNumber,dialCode:e.dialCode,countryCode:e.countryCode},t),I();const n=k?.current;null!==n&&n.focus()},closeList:I})})]})},e.RadioButton=function({children:e,value:t,groupName:o,size:r,isChecked:l,isDisabled:s=!1,isInvalid:d=!1,data:c,testId:u,tweakStyles:p,onChange:h}){const m=Vn({theme:p});return i.jsxs("label",{className:a(m.label,n.isNotEmpty(r)&&m[r],{[m.isDisabled]:s}),htmlFor:`${o}--${t}`,...n.addDataAttributes(c,u),children:[i.jsx("input",{id:`${o}--${t}`,type:"radio",value:t,name:o,checked:l,disabled:s,onChange:e=>h(e.target.value),className:a(m.input,{[m.isDisabled]:s,[m.isInvalid]:d})}),n.isReactNodeNotEmpty(e)&&i.jsx("span",{className:m.content,children:e})]})},e.SLIDE_UP_ANIMATION_DURATION=150,e.ScrollIntoViewIfNeeded=xt,e.SearchInput=Ct,e.Select=zt,e.SelectList=Rt,e.Selector=function({options:e,value:o,isDisabled:r=!1,isRequired:l=!1,isInvalid:s=!1,hasSameOptionsWidth:d=!0,iconPosition:c="left",size:u="l",testId:p,data:h,tweakStyles:m,onChange:y}){const g=Un({theme:m}),f=e.map(e=>e.value),[C,v]=t.useState([]),x=t.useRef(null);n.hasDuplicates(f)&&console.error("Selector: Значения options.value должны быть уникальными"),t.useEffect(()=>{const e=x.current;null!==e&&v([...e.querySelectorAll(`.${g.optionWrapper}`)])},[e,u]);const b=n.isNotEmpty(o)?C[f.indexOf(o)]:void 0;return i.jsxs("div",{className:a(g.root,g.selector,{[g.iconFromRight]:"right"===c,[g.invalid]:s,[g.required]:l,[g.autoWidth]:d}),ref:x,...n.addDataAttributes(h,p),children:[n.isNotEmpty(b)&&i.jsx("div",{className:g.line,style:Gn(b)}),e.map(e=>{const t=e.value.toString(),l=e.isDisabled??r,s=e.value===o;return i.jsx("div",{className:g.optionWrapper,children:i.jsxs("button",{type:"button",className:a(g.option,g[u],{[g.active]:s,[g.disabled]:l}),disabled:l,onClick:l?void 0:()=>y(e.value),...n.addDataTestId(p,t),children:[n.isReactNodeNotEmpty(e.icon)&&i.jsx("div",{className:g.optionIcon,children:je(e.icon)}),i.jsx("div",{className:g.optionText,children:e.label})]})},t)})]})},e.Skeleton=fn,e.SmartInput=Jn,e.Status=({children:e,color:t,size:o="s",icon:r,iconPosition:l="right",badge:s,tweakStyles:d,testId:c,data:u})=>{const p=Qn({theme:d});return i.jsxs("span",{className:a(p.root,p[o],p[t]),...n.addDataAttributes(u,c),children:[n.isReactNodeNotEmpty(e)&&i.jsx("span",{className:p.text,children:e}),n.isReactNodeNotEmpty(r)&&i.jsx("span",{className:a(p.icon,"left"===l&&p.iconLeft),children:je(r)}),n.isReactNodeNotEmpty(s)&&i.jsx("span",{className:p.badge,children:s})]})},e.Switch=({isDisabled:e=!1,isChecked:t=!1,isInvalid:o=!1,value:r,children:l,labelPosition:s="right",color:d="primary",size:c,data:u,tweakStyles:p,testId:h,onChange:m})=>{const y=ei({theme:p});return i.jsxs("label",{className:a(y.root,y[d],n.isNotEmpty(c)&&y[c],{[y.disabled]:e,[y.checked]:t,[y.invalid]:o}),...n.addDataAttributes(u,h),children:[i.jsx("span",{className:y.switch,children:i.jsx("input",{type:"checkbox",name:r,className:y.input,onChange:e?void 0:()=>m({name:r,isEnabled:!t}),checked:t,disabled:e,...n.addDataTestId(h,"input")})}),n.isReactNodeNotEmpty(l)&&i.jsx("span",{className:a(y.label,y["left"===s?"labelLeft":"labelRight"]),children:l})]})},e.TextArea=oi,e.TextButton=ri,e.TextWithInfo=({text:e,isSelected:t=!1,info:o,textTooltip:r,onClick:l,testId:s,data:d,tweakStyles:c})=>{const u=ai({theme:c});return i.jsx("div",{className:a(u.root,t&&u.selected),...n.addDataAttributes(d,s),children:i.jsxs("div",{className:u.container,children:[i.jsx("div",{className:u.text,onClick:l,children:void 0!==r?i.jsx(ro,{tooltipText:r,children:e}):e}),o&&i.jsx("a",{className:u.info,href:o.link,target:"_blank",rel:"noopener noreferrer",children:void 0!==o.infoTooltip?i.jsx(ro,{tooltipText:o.infoTooltip,children:i.jsx(Ie,{type:"information"})}):i.jsx(Ie,{type:"information"})})]})})},e.TextWithTooltip=ro,e.ThemeContext=j,e.ThemeProvider=T,e.ThemedPreloader=Ue,e.Toaster=({type:e="error",title:o,text:r,children:l,timeout:s=7e3,hasCloseButton:d=!1,shouldCloseOnClick:c=!1,data:u,testId:p,tweakStyles:h,onClose:m,onTimeEnd:y})=>{const g=li({theme:h}),f=ke({tweakStyles:h,className:"tweakCloseButton",currentComponentName:"Toaster"});return t.useEffect(()=>{if(!Number.isFinite(s)||n.isEmpty(y))return;const e=window.setTimeout(()=>y(),s);return()=>window.clearTimeout(e)},[]),i.jsxs("div",{className:g.root,onClick:c?m:void 0,...n.addDataAttributes(u,p),children:[i.jsx("div",{className:a(g.iconContainer,g[e]),children:i.jsx(Ie,{type:`status-${e}`})}),i.jsxs("div",{children:[n.isReactNodeNotEmpty(o)&&i.jsx("div",{className:g.title,children:o}),n.isReactNodeNotEmpty(r)&&i.jsx("div",{className:g.text,children:r}),n.isReactNodeNotEmpty(l)&&i.jsx("div",{className:g.content,children:l})]}),d&&n.isNotEmpty(m)&&i.jsx("div",{className:g.close,children:i.jsx(to,{view:"cancel-light",icon:"close-window",tweakStyles:f,onClick:m})})]})},e.Tooltip=no,e.WithMessages=ot,e.WithPopup=De,e.WithTooltip=({children:e,eventType:t="hover",placement:o="top",tooltipText:r,tooltipView:a="tooltip",tooltipType:l="info",tooltipSize:s,isDisabled:d=!1,popupData:c,tweakStyles:u,...p})=>{const h=ke({innerStyles:di,tweakStyles:u,className:"tweakWithPopup",currentComponentName:"WithTooltip"}),m=ke({tweakStyles:u,className:"tweakTooltip",currentComponentName:"WithTooltip"});return i.jsx(De,{trigger:e,placement:o,eventType:t,popupData:{...c,tooltipView:a},isDisabled:d||!n.isReactNodeNotEmpty(r),isTriggerWrapped:!0,tweakStyles:h,...p,children:i.jsx(no,{view:a,type:l,text:r,size:s,tweakStyles:m,testId:n.getTestId(p.testId,"tooltip")})})},e.addDataAttributes=(e={})=>Object.fromEntries(Object.entries(e).map(([e,t])=>n.isString(t)&&n.isStringNotEmpty(t)||n.isNotEmpty(t)?[`data-${te(e)}`,t]:[])),e.animations=R,e.checkElementParentsClassNames=be,e.checkSearchStringInCountry=Y,e.colors=N,e.common=I,e.convertToControlWrapperIcon=it,e.createThemedStyles=P,e.dimensions=k,e.excludeStorybookParams=e=>new RegExp(`^(on.*|${["tweakStyles","data",...e].join("|")})$`),e.findCountryByCode=G,e.findCountryIndexByCode=U,e.formatNumber=se,e.formatStringNumber=le,e.genericMemo=me,e.getCountryCodeFromPhone=X,e.getCountryTextByLocale=K,e.getFileExtensionByFilename=lo,e.getFileIcon=co,e.getFullPhone=q,e.getMimeTypeByFilename=so,e.getNumberInRange=ae,e.getNumberLength=he,e.getParentNode=oe,e.getPhoneMask=ee,e.getPhoneObjFromString=J,e.getScrollParent=re,e.getStyleComputedProperty=ie,e.hasExactParent=ne,e.helpers=E,e.iconsMap=Ee,e.isControlWrapperIcon=nt,e.isElementOffScreen=(e,t)=>{const o=e,n=re(e),{scrollHeight:i}=n;o.hidden=!0;const{scrollHeight:r}=n;o.hidden=!1;const a=i!==r;if(a&&void 0!==t){const e=o.getBoundingClientRect(),i=n.getBoundingClientRect(),r=e.top-i.top;if(t.clientHeight+o.clientHeight>r)return!1}return a},e.isElementOneOfParents=we,e.isSpaceChar=pe,e.mimeTypes=V,e.minWidthModifier=H,e.mixStyles=D,e.phoneInfo=$,e.removeStringFormat=de,e.renderIcon=je,e.setCaretPosition=ue,e.sortCountriesByLocale=Z,e.stringToNumber=ce,e.transformToKebab=te,e.trimStringToMaxLength=(e,t)=>e.length>t?e.slice(0,t):e,e.useDidMountEffect=W,e.useDropdown=ye,e.useIntersectionRef=fe,e.useIsMounted=ve,e.useLatestRef=ge,e.useMerge=(e,o)=>t.useMemo(()=>n.isNotEmpty(e)&&n.isNotEmpty(o)?n.mergeStyles(e,o):e??o,[e,o]),e.useMergedRefs=xe,e.useMixedStyles=A,e.useOnClickOutside=Ne,e.useOnClickOutsideWithRef=Se,e.useResizeRef=Ce,e.useTheme=M,e.useThemeComponentStyles=L,e.useTweakStyles=ke,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
|
|
2
2
|
//# sourceMappingURL=true-react-common-ui-kit.umd.cjs.map
|