@dartcom/ui-kit 10.3.8 → 10.3.9
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/components/list/list.d.ts.map +1 -1
- package/dist/components/list/list.stories.d.ts +1 -0
- package/dist/components/list/list.stories.d.ts.map +1 -1
- package/dist/index.cjs +12 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -7,7 +7,7 @@ import{useTheme as e,useMediaQuery as t,CircularProgress as n,Typography as i,Bo
|
|
|
7
7
|
*
|
|
8
8
|
* This source code is licensed under the MIT license found in the
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/var zl,Dl,Il=(Ll||(Ll=1,"production"===process.env.NODE_ENV?Cl.exports=function(){if(kl)return Rl;kl=1;var e=S,t="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},n=e.useState,i=e.useEffect,r=e.useLayoutEffect,s=e.useDebugValue;function o(e){var n=e.getSnapshot;e=e.value;try{var i=n();return!t(e,i)}catch(e){return!0}}var a="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var a=t(),l=n({inst:{value:a,getSnapshot:t}}),u=l[0].inst,c=l[1];return r(function(){u.value=a,u.getSnapshot=t,o(u)&&c({inst:u})},[e,a,t]),i(function(){return o(u)&&c({inst:u}),e(function(){o(u)&&c({inst:u})})},[e]),s(a),a};return Rl.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:a,Rl}():Cl.exports=(Ml||(Ml=1,"production"!==process.env.NODE_ENV&&function(){function e(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!n(e,i)}catch(e){return!0}}"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=S,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=t.useState,r=t.useEffect,s=t.useLayoutEffect,o=t.useDebugValue,a=!1,l=!1,u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(u,c){a||void 0===t.startTransition||(a=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var h=c();if(!l){var d=c();n(h,d)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),l=!0)}var f=(d=i({inst:{value:h,getSnapshot:c}}))[0].inst,p=d[1];return s(function(){f.value=h,f.getSnapshot=c,e(f)&&p({inst:f})},[u,h,c]),r(function(){return e(f)&&p({inst:f}),u(function(){e(f)&&p({inst:f})})},[u]),o(h),h};Nl.useSyncExternalStore=void 0!==t.useSyncExternalStore?t.useSyncExternalStore:u,"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Nl)),Cl.exports);function Fl(e){e.reaction=new ts("observer".concat(e.name),function(){var t;e.stateVersion=Symbol(),null===(t=e.onStoreChange)||void 0===t||t.call(e)})}var jl=!0,Bl="function"==typeof Symbol&&Symbol.for,Ul=null!==(Dl=null===(zl=Object.getOwnPropertyDescriptor(function(){},"name"))||void 0===zl?void 0:zl.configurable)&&void 0!==Dl&&Dl,Vl=Bl?Symbol.for("react.forward_ref"):"function"==typeof k&&k(function(e){return null}).$$typeof,Gl=Bl?Symbol.for("react.memo"):"function"==typeof j&&j(function(e){return null}).$$typeof;function $l(e,t){if(process.env.NODE_ENV,Gl&&e.$$typeof===Gl)throw new Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");var n=!1,i=e,r=e.displayName||e.name;if(Vl&&e.$$typeof===Vl&&(n=!0,"function"!=typeof(i=e.render)))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var s,o,a=function(e,t){return function(e,t){void 0===t&&(t="observed");var n=S.useRef(null);if(!n.current){var i={reaction:null,onStoreChange:null,stateVersion:Symbol(),name:t,subscribe:function(e){return Pl.unregister(i),i.onStoreChange=e,i.reaction||(Fl(i),i.stateVersion=Symbol()),function(){var e;i.onStoreChange=null,null===(e=i.reaction)||void 0===e||e.dispose(),i.reaction=null}},getSnapshot:function(){return i.stateVersion}};n.current=i}var r,s,o=n.current;if(o.reaction||(Fl(o),Pl.register(n,o,o)),S.useDebugValue(o.reaction,Sl),Il.useSyncExternalStore(o.subscribe,o.getSnapshot,o.getSnapshot),o.reaction.track(function(){try{r=e()}catch(e){s=e}}),s)throw s;return r}(function(){return i(e,t)},r)};return a.displayName=e.displayName,Ul&&Object.defineProperty(a,"name",{value:e.name,writable:!0,configurable:!0}),e.contextTypes&&(a.contextTypes=e.contextTypes,"production"!==process.env.NODE_ENV&&jl&&(jl=!1,console.warn("[mobx-react-lite] Support for Legacy Context in function components will be removed in the next major release."))),n&&(a=k(a)),a=j(a),s=e,o=a,Object.keys(s).forEach(function(e){Zl[e]||Object.defineProperty(o,e,Object.getOwnPropertyDescriptor(s,e))}),"production"!==process.env.NODE_ENV&&Object.defineProperty(a,"contextTypes",{set:function(){var e,t;throw new Error("[mobx-react-lite] `".concat(this.displayName||(null===(e=this.type)||void 0===e?void 0:e.displayName)||(null===(t=this.type)||void 0===t?void 0:t.name)||"Component",".contextTypes` must be set before applying `observer`."))}}),a}var Zl={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};process.env.NODE_ENV,function(e){e||(e=Tl,"production"!==process.env.NODE_ENV&&console.warn("[MobX] Failed to get unstable_batched updates from react-dom / react-native")),Cs({reactionScheduler:e})}(W),Pl.finalizeAllImmediately;var ql=$l(({onUnauthorized:e,children:t})=>(T.useEffect(()=>{ra.isUnauthorized&&e()},[ra.isUnauthorized]),H(T.Fragment,{children:t})));function Wl(e,t){if(void 0!==e.one&&1===t)return e.one;const n=t%10,i=t%100;return 1===n&&11!==i?e.singularNominative.replace("{{count}}",String(t)):n>=2&&n<=4&&(i<10||i>20)?e.singularGenitive.replace("{{count}}",String(t)):e.pluralGenitive.replace("{{count}}",String(t))}function Hl(e){return(t,n)=>n?.addSuffix?n.comparison&&n.comparison>0?e.future?Wl(e.future,t):"через "+Wl(e.regular,t):e.past?Wl(e.past,t):Wl(e.regular,t)+" назад":Wl(e.regular,t)}const Kl={lessThanXSeconds:Hl({regular:{one:"меньше секунды",singularNominative:"меньше {{count}} секунды",singularGenitive:"меньше {{count}} секунд",pluralGenitive:"меньше {{count}} секунд"},future:{one:"меньше, чем через секунду",singularNominative:"меньше, чем через {{count}} секунду",singularGenitive:"меньше, чем через {{count}} секунды",pluralGenitive:"меньше, чем через {{count}} секунд"}}),xSeconds:Hl({regular:{singularNominative:"{{count}} секунда",singularGenitive:"{{count}} секунды",pluralGenitive:"{{count}} секунд"},past:{singularNominative:"{{count}} секунду назад",singularGenitive:"{{count}} секунды назад",pluralGenitive:"{{count}} секунд назад"},future:{singularNominative:"через {{count}} секунду",singularGenitive:"через {{count}} секунды",pluralGenitive:"через {{count}} секунд"}}),halfAMinute:(e,t)=>t?.addSuffix?t.comparison&&t.comparison>0?"через полминуты":"полминуты назад":"полминуты",lessThanXMinutes:Hl({regular:{one:"меньше минуты",singularNominative:"меньше {{count}} минуты",singularGenitive:"меньше {{count}} минут",pluralGenitive:"меньше {{count}} минут"},future:{one:"меньше, чем через минуту",singularNominative:"меньше, чем через {{count}} минуту",singularGenitive:"меньше, чем через {{count}} минуты",pluralGenitive:"меньше, чем через {{count}} минут"}}),xMinutes:Hl({regular:{singularNominative:"{{count}} минута",singularGenitive:"{{count}} минуты",pluralGenitive:"{{count}} минут"},past:{singularNominative:"{{count}} минуту назад",singularGenitive:"{{count}} минуты назад",pluralGenitive:"{{count}} минут назад"},future:{singularNominative:"через {{count}} минуту",singularGenitive:"через {{count}} минуты",pluralGenitive:"через {{count}} минут"}}),aboutXHours:Hl({regular:{singularNominative:"около {{count}} часа",singularGenitive:"около {{count}} часов",pluralGenitive:"около {{count}} часов"},future:{singularNominative:"приблизительно через {{count}} час",singularGenitive:"приблизительно через {{count}} часа",pluralGenitive:"приблизительно через {{count}} часов"}}),xHours:Hl({regular:{singularNominative:"{{count}} час",singularGenitive:"{{count}} часа",pluralGenitive:"{{count}} часов"}}),xDays:Hl({regular:{singularNominative:"{{count}} день",singularGenitive:"{{count}} дня",pluralGenitive:"{{count}} дней"}}),aboutXWeeks:Hl({regular:{singularNominative:"около {{count}} недели",singularGenitive:"около {{count}} недель",pluralGenitive:"около {{count}} недель"},future:{singularNominative:"приблизительно через {{count}} неделю",singularGenitive:"приблизительно через {{count}} недели",pluralGenitive:"приблизительно через {{count}} недель"}}),xWeeks:Hl({regular:{singularNominative:"{{count}} неделя",singularGenitive:"{{count}} недели",pluralGenitive:"{{count}} недель"}}),aboutXMonths:Hl({regular:{singularNominative:"около {{count}} месяца",singularGenitive:"около {{count}} месяцев",pluralGenitive:"около {{count}} месяцев"},future:{singularNominative:"приблизительно через {{count}} месяц",singularGenitive:"приблизительно через {{count}} месяца",pluralGenitive:"приблизительно через {{count}} месяцев"}}),xMonths:Hl({regular:{singularNominative:"{{count}} месяц",singularGenitive:"{{count}} месяца",pluralGenitive:"{{count}} месяцев"}}),aboutXYears:Hl({regular:{singularNominative:"около {{count}} года",singularGenitive:"около {{count}} лет",pluralGenitive:"около {{count}} лет"},future:{singularNominative:"приблизительно через {{count}} год",singularGenitive:"приблизительно через {{count}} года",pluralGenitive:"приблизительно через {{count}} лет"}}),xYears:Hl({regular:{singularNominative:"{{count}} год",singularGenitive:"{{count}} года",pluralGenitive:"{{count}} лет"}}),overXYears:Hl({regular:{singularNominative:"больше {{count}} года",singularGenitive:"больше {{count}} лет",pluralGenitive:"больше {{count}} лет"},future:{singularNominative:"больше, чем через {{count}} год",singularGenitive:"больше, чем через {{count}} года",pluralGenitive:"больше, чем через {{count}} лет"}}),almostXYears:Hl({regular:{singularNominative:"почти {{count}} год",singularGenitive:"почти {{count}} года",pluralGenitive:"почти {{count}} лет"},future:{singularNominative:"почти через {{count}} год",singularGenitive:"почти через {{count}} года",pluralGenitive:"почти через {{count}} лет"}})};function Yl(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Xl={date:Yl({formats:{full:"EEEE, d MMMM y 'г.'",long:"d MMMM y 'г.'",medium:"d MMM y 'г.'",short:"dd.MM.y"},defaultWidth:"full"}),time:Yl({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:Yl({formats:{any:"{{date}}, {{time}}"},defaultWidth:"any"})},Jl=Symbol.for("constructDateFrom");function Ql(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&Jl in e?e[Jl](t):e instanceof Date?new e.constructor(t):new Date(t)}let eu={};function tu(e,t){const n=eu,i=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,r=(s=e,o=t?.in,Ql(o||s,s));var s,o;const a=r.getDay(),l=(a<i?7:0)+a-i;return r.setDate(r.getDate()-l),r.setHours(0,0,0,0),r}function nu(e,t,n){const[i,r]=function(e,...t){const n=Ql.bind(null,e||t.find(e=>"object"==typeof e));return t.map(n)}(n?.in,e,t);return+tu(i,n)===+tu(r,n)}const iu=["воскресенье","понедельник","вторник","среду","четверг","пятницу","субботу"];function ru(e){const t=iu[e];return 2===e?"'во "+t+" в' p":"'в "+t+" в' p"}const su={lastWeek:(e,t,n)=>{const i=e.getDay();return nu(e,t,n)?ru(i):function(e){const t=iu[e];switch(e){case 0:return"'в прошлое "+t+" в' p";case 1:case 2:case 4:return"'в прошлый "+t+" в' p";case 3:case 5:case 6:return"'в прошлую "+t+" в' p"}}(i)},yesterday:"'вчера в' p",today:"'сегодня в' p",tomorrow:"'завтра в' p",nextWeek:(e,t,n)=>{const i=e.getDay();return nu(e,t,n)?ru(i):function(e){const t=iu[e];switch(e){case 0:return"'в следующее "+t+" в' p";case 1:case 2:case 4:return"'в следующий "+t+" в' p";case 3:case 5:case 6:return"'в следующую "+t+" в' p"}}(i)},other:"P"};function ou(e){return(t,n)=>{let i;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{const t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}return i[e.argumentCallback?e.argumentCallback(t):t]}}const au={ordinalNumber:(e,t)=>{const n=Number(e),i=t?.unit;let r;return r="date"===i?"-е":"week"===i||"minute"===i||"second"===i?"-я":"-й",n+r},era:ou({values:{narrow:["до н.э.","н.э."],abbreviated:["до н. э.","н. э."],wide:["до нашей эры","нашей эры"]},defaultWidth:"wide"}),quarter:ou({values:{narrow:["1","2","3","4"],abbreviated:["1-й кв.","2-й кв.","3-й кв.","4-й кв."],wide:["1-й квартал","2-й квартал","3-й квартал","4-й квартал"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:ou({values:{narrow:["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],abbreviated:["янв.","фев.","март","апр.","май","июнь","июль","авг.","сент.","окт.","нояб.","дек."],wide:["январь","февраль","март","апрель","май","июнь","июль","август","сентябрь","октябрь","ноябрь","декабрь"]},defaultWidth:"wide",formattingValues:{narrow:["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],abbreviated:["янв.","фев.","мар.","апр.","мая","июн.","июл.","авг.","сент.","окт.","нояб.","дек."],wide:["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"]},defaultFormattingWidth:"wide"}),day:ou({values:{narrow:["В","П","В","С","Ч","П","С"],short:["вс","пн","вт","ср","чт","пт","сб"],abbreviated:["вск","пнд","втр","срд","чтв","птн","суб"],wide:["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"]},defaultWidth:"wide"}),dayPeriod:ou({values:{narrow:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утро",afternoon:"день",evening:"веч.",night:"ночь"},abbreviated:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утро",afternoon:"день",evening:"веч.",night:"ночь"},wide:{am:"ДП",pm:"ПП",midnight:"полночь",noon:"полдень",morning:"утро",afternoon:"день",evening:"вечер",night:"ночь"}},defaultWidth:"any",formattingValues:{narrow:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утра",afternoon:"дня",evening:"веч.",night:"ночи"},abbreviated:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утра",afternoon:"дня",evening:"веч.",night:"ночи"},wide:{am:"ДП",pm:"ПП",midnight:"полночь",noon:"полдень",morning:"утра",afternoon:"дня",evening:"вечера",night:"ночи"}},defaultFormattingWidth:"wide"})};function lu(e){return(t,n={})=>{const i=n.width,r=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],s=t.match(r);if(!s)return null;const o=s[0],a=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n;return}(a,e=>e.test(o)):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n;return}(a,e=>e.test(o));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;return{value:u,rest:t.slice(o.length)}}}const uu={ordinalNumber:(cu={matchPattern:/^(\d+)(-?(е|я|й|ое|ье|ая|ья|ый|ой|ий|ый))?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const n=e.match(cu.matchPattern);if(!n)return null;const i=n[0],r=e.match(cu.parsePattern);if(!r)return null;let s=cu.valueCallback?cu.valueCallback(r[0]):r[0];return s=t.valueCallback?t.valueCallback(s):s,{value:s,rest:e.slice(i.length)}}),era:lu({matchPatterns:{narrow:/^((до )?н\.?\s?э\.?)/i,abbreviated:/^((до )?н\.?\s?э\.?)/i,wide:/^(до нашей эры|нашей эры|наша эра)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^д/i,/^н/i]},defaultParseWidth:"any"}),quarter:lu({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234](-?[ыои]?й?)? кв.?/i,wide:/^[1234](-?[ыои]?й?)? квартал/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:lu({matchPatterns:{narrow:/^[яфмаисонд]/i,abbreviated:/^(янв|фев|март?|апр|ма[йя]|июн[ья]?|июл[ья]?|авг|сент?|окт|нояб?|дек)\.?/i,wide:/^(январ[ья]|феврал[ья]|марта?|апрел[ья]|ма[йя]|июн[ья]|июл[ья]|августа?|сентябр[ья]|октябр[ья]|октябр[ья]|ноябр[ья]|декабр[ья])/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^я/i,/^ф/i,/^м/i,/^а/i,/^м/i,/^и/i,/^и/i,/^а/i,/^с/i,/^о/i,/^н/i,/^я/i],any:[/^я/i,/^ф/i,/^мар/i,/^ап/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^ав/i,/^с/i,/^о/i,/^н/i,/^д/i]},defaultParseWidth:"any"}),day:lu({matchPatterns:{narrow:/^[впсч]/i,short:/^(вс|во|пн|по|вт|ср|чт|че|пт|пя|сб|су)\.?/i,abbreviated:/^(вск|вос|пнд|пон|втр|вто|срд|сре|чтв|чет|птн|пят|суб).?/i,wide:/^(воскресень[ея]|понедельника?|вторника?|сред[аы]|четверга?|пятниц[аы]|суббот[аы])/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^в/i,/^п/i,/^в/i,/^с/i,/^ч/i,/^п/i,/^с/i],any:[/^в[ос]/i,/^п[он]/i,/^в/i,/^ср/i,/^ч/i,/^п[ят]/i,/^с[уб]/i]},defaultParseWidth:"any"}),dayPeriod:lu({matchPatterns:{narrow:/^([дп]п|полн\.?|полд\.?|утр[оа]|день|дня|веч\.?|ноч[ьи])/i,abbreviated:/^([дп]п|полн\.?|полд\.?|утр[оа]|день|дня|веч\.?|ноч[ьи])/i,wide:/^([дп]п|полночь|полдень|утр[оа]|день|дня|вечера?|ноч[ьи])/i},defaultMatchWidth:"wide",parsePatterns:{any:{am:/^дп/i,pm:/^пп/i,midnight:/^полн/i,noon:/^полд/i,morning:/^у/i,afternoon:/^д[ен]/i,evening:/^в/i,night:/^н/i}},defaultParseWidth:"any"})};var cu;const hu={code:"ru",formatDistance:(e,t,n)=>Kl[e](t,n),formatLong:Xl,formatRelative:(e,t,n,i)=>{const r=su[e];return"function"==typeof r?r(t,n,i):r},localize:au,match:uu,options:{weekStartsOn:1,firstWeekContainsDate:1}},du=e=>H(X,{...e,dateAdapter:J,adapterLocale:hu}),fu=e=>H(n,{...e}),pu=({children:e,configOptions:t})=>{const[n,r]=T.useState(null),[s,o]=T.useState("");return T.useEffect(()=>(da.initialize({...t,onCheck:e=>{const{valid:n,reason:i}=e;o(i),r(n),t.onCheck?.(e)}}),()=>{da.deactivate()}),[t]),null===n?H(fu,{color:"primary"}):n?H(T.Fragment,{children:e}):H(i,{color:"error",children:s})},mu=({children:e})=>{const[t,n]=T.useState(!1);return T.useEffect(()=>{(async()=>{try{await Promise.resolve().then(function(){return jb}),await Promise.resolve().then(function(){return Ub}),await Promise.resolve().then(function(){return Zb}),await Promise.resolve().then(function(){return Hb}),await Promise.resolve().then(function(){return tx}),await Promise.resolve().then(function(){return rx}),n(!0)}catch{n(!1)}})()},[]),t?H(T.Fragment,{children:e}):null},_u=new class{#W;#j;#d;#H;#K;#Y;#X;#J;constructor(e={}){this.#W=e.queryCache||new hl,this.#j=e.mutationCache||new ll,this.#d=e.defaultOptions||{},this.#H=new Map,this.#K=new Map,this.#Y=0}mount(){this.#Y++,1===this.#Y&&(this.#X=ja.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#W.onFocus())}),this.#J=Ga.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#W.onOnline())}))}unmount(){this.#Y--,0===this.#Y&&(this.#X?.(),this.#X=void 0,this.#J?.(),this.#J=void 0)}isFetching(e){return this.#W.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#j.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#W.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#W.build(this,t),i=n.state.data;return void 0===i?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ba(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return this.#W.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){const i=this.defaultQueryOptions({queryKey:e}),r=this.#W.get(i.queryHash),s=r?.state.data,o=function(e,t){return"function"==typeof e?e(t):e}(t,s);if(void 0!==o)return this.#W.build(this,i).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Va.batch(()=>this.#W.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#W.get(t.queryHash)?.state}removeQueries(e){const t=this.#W;Va.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){const n=this.#W;return Va.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},i=Va.batch(()=>this.#W.findAll(e).map(e=>e.cancel(n)));return Promise.all(i).then(ga).catch(ga)}invalidateQueries(e,t={}){return Va.batch(()=>(this.#W.findAll(e).forEach(e=>{e.invalidate()}),"none"===e?.refetchType?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},i=Va.batch(()=>this.#W.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(ga)),"paused"===e.state.fetchStatus?Promise.resolve():t}));return Promise.all(i).then(ga)}fetchQuery(e){const t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);const n=this.#W.build(this,t);return n.isStaleByTime(ba(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ga).catch(ga)}fetchInfiniteQuery(e){return e.behavior=rl(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ga).catch(ga)}ensureInfiniteQueryData(e){return e.behavior=rl(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ga.isOnline()?this.#j.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#W}getMutationCache(){return this.#j}getDefaultOptions(){return this.#d}setDefaultOptions(e){this.#d=e}setQueryDefaults(e,t){this.#H.set(Ta(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#H.values()],n={};return t.forEach(t=>{Sa(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#K.set(Ta(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#K.values()],n={};return t.forEach(t=>{Sa(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#d.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Aa(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Da&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#d.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#W.clear(),this.#j.clear()}},gu=e=>H(pl,{...e,client:_u}),yu=({children:e,themeOptions:t})=>{const n=Q(t);return H(ee,{theme:n,children:e})},vu=({children:e,configOptions:t,themeOptions:n})=>H(mn,{children:H(gu,{children:H(ca,{children:H(yu,{themeOptions:n,children:H(du,{children:H(mu,{children:H(pu,{configOptions:t,children:e})})})})})})}),bu=()=>vl({mutationKey:["logout-mutation"],mutationFn:async e=>await da.instance.apiService.post({url:"logout"}),onError:El(),onSuccess:()=>{_u.invalidateQueries({queryKey:["user"]})}});var xu,wu,Eu,Au;!function(e){e.GET="GET",e.DELETE="DELETE",e.PUT="PUT",e.POST="POST"}(xu||(xu={})),function(e){e.TOP_RIGHT="top-right",e.BOTTOM_RIGHT="bottom-right",e.BOTTOM_LEFT="bottom-left",e.TOP_LEFT="top-left"}(wu||(wu={}));var Tu,Su,ku=function(){if(Au)return Eu;function e(e){this._maxSize=e,this.clear()}Au=1,e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(e){return this._values[e]},e.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,n=/^\d+$/,i=/^\d/,r=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,s=/^\s*(['"]?)(.*?)(\1)\s*$/,o=new e(512),a=new e(512),l=new e(512);function u(e){return o.get(e)||o.set(e,c(e).map(function(e){return e.replace(s,"$2")}))}function c(e){return e.match(t)||[""]}function h(e){return"string"==typeof e&&e&&-1!==["'",'"'].indexOf(e.charAt(0))}function d(e){return!h(e)&&(function(e){return e.match(i)&&!e.match(n)}(e)||function(e){return r.test(e)}(e))}return Eu={Cache:e,split:c,normalizePath:u,setter:function(e){var t=u(e);return a.get(e)||a.set(e,function(e,n){for(var i=0,r=t.length,s=e;i<r-1;){var o=t[i];if("__proto__"===o||"constructor"===o||"prototype"===o)return e;s=s[t[i++]]}s[t[i]]=n})},getter:function(e,t){var n=u(e);return l.get(e)||l.set(e,function(e){for(var i=0,r=n.length;i<r;){if(null==e&&t)return;e=e[n[i++]]}return e})},join:function(e){return e.reduce(function(e,t){return e+(h(t)||n.test(t)?"["+t+"]":(e?".":"")+t)},"")},forEach:function(e,t,n){!function(e,t,n){var i,r,s,o,a=e.length;for(r=0;r<a;r++)(i=e[r])&&(d(i)&&(i='"'+i+'"'),s=!(o=h(i))&&/^\d+$/.test(i),t.call(n,i,o,s,r,e))}(Array.isArray(e)?e:c(e),t,n)}},Eu}();var Ou,Pu=function(){if(Su)return Tu;Su=1;const e=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,t=t=>t.match(e)||[],n=e=>e[0].toUpperCase()+e.slice(1),i=(e,n)=>t(e).join(n).toLowerCase(),r=e=>t(e).reduce((e,t)=>`${e}${e?t[0].toUpperCase()+t.slice(1).toLowerCase():t.toLowerCase()}`,"");return Tu={words:t,upperFirst:n,camelCase:r,pascalCase:e=>n(r(e)),snakeCase:e=>i(e,"_"),kebabCase:e=>i(e,"-"),sentenceCase:e=>n(i(e," ")),titleCase:e=>t(e).map(n).join(" ")}}(),Cu={exports:{}};var Ru=function(){if(Ou)return Cu.exports;function e(e,t){var n=e.length,i=new Array(n),r={},s=n,o=function(e){for(var t=new Map,n=0,i=e.length;n<i;n++){var r=e[n];t.has(r[0])||t.set(r[0],new Set),t.has(r[1])||t.set(r[1],new Set),t.get(r[0]).add(r[1])}return t}(t),a=function(e){for(var t=new Map,n=0,i=e.length;n<i;n++)t.set(e[n],n);return t}(e);for(t.forEach(function(e){if(!a.has(e[0])||!a.has(e[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});s--;)r[s]||l(e[s],s,new Set);return i;function l(e,t,s){if(s.has(e)){var u;try{u=", node was:"+JSON.stringify(e)}catch(e){u=""}throw new Error("Cyclic dependency"+u)}if(!a.has(e))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(e));if(!r[t]){r[t]=!0;var c=o.get(e)||new Set;if(t=(c=Array.from(c)).length){s.add(e);do{var h=c[--t];l(h,a.get(h),s)}while(t);s.delete(e)}i[--n]=e}}}return Ou=1,Cu.exports=function(t){return e(function(e){for(var t=new Set,n=0,i=e.length;n<i;n++){var r=e[n];t.add(r[0]),t.add(r[1])}return Array.from(t)}(t),t)},Cu.exports.array=e,Cu.exports}(),Mu=Ae(Ru);const Lu=Object.prototype.toString,Nu=Error.prototype.toString,zu=RegExp.prototype.toString,Du="undefined"!=typeof Symbol?Symbol.prototype.toString:()=>"",Iu=/^Symbol\((.*)\)(.*)$/;function Fu(e,t=!1){if(null==e||!0===e||!1===e)return""+e;const n=typeof e;if("number"===n)return function(e){return e!=+e?"NaN":0===e&&1/e<0?"-0":""+e}(e);if("string"===n)return t?`"${e}"`:e;if("function"===n)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===n)return Du.call(e).replace(Iu,"Symbol($1)");const i=Lu.call(e).slice(8,-1);return"Date"===i?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===i||e instanceof Error?"["+Nu.call(e)+"]":"RegExp"===i?zu.call(e):null}function ju(e,t){let n=Fu(e,t);return null!==n?n:JSON.stringify(e,function(e,n){let i=Fu(this[e],t);return null!==i?i:n},2)}function Bu(e){return null==e?[]:[].concat(e)}let Uu,Vu,Gu,$u=/\$\{\s*(\w+)\s*\}/g;Uu=Symbol.toStringTag;class Zu{constructor(e,t,n,i){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[Uu]="Error",this.name="ValidationError",this.value=t,this.path=n,this.type=i,this.errors=[],this.inner=[],Bu(e).forEach(e=>{if(qu.isError(e)){this.errors.push(...e.errors);const t=e.inner.length?e.inner:[e];this.inner.push(...t)}else this.errors.push(e)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}Vu=Symbol.hasInstance,Gu=Symbol.toStringTag;class qu extends Error{static formatError(e,t){const n=t.label||t.path||"this";return t=Object.assign({},t,{path:n,originalPath:t.path}),"string"==typeof e?e.replace($u,(e,n)=>ju(t[n])):"function"==typeof e?e(t):e}static isError(e){return e&&"ValidationError"===e.name}constructor(e,t,n,i,r){const s=new Zu(e,t,n,i);if(r)return s;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[Gu]="Error",this.name=s.name,this.message=s.message,this.type=s.type,this.value=s.value,this.path=s.path,this.errors=s.errors,this.inner=s.inner,Error.captureStackTrace&&Error.captureStackTrace(this,qu)}static[Vu](e){return Zu[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let Wu={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:i})=>{const r=null!=i&&i!==n?` (cast from the value \`${ju(i,!0)}\`).`:".";return"mixed"!==t?`${e} must be a \`${t}\` type, but the final value was: \`${ju(n,!0)}\``+r:`${e} must match the configured type. The validated value was: \`${ju(n,!0)}\``+r}},Hu={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},Ku={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},Yu={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Xu={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},Ju={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},Qu={notType:e=>{const{path:t,value:n,spec:i}=e,r=i.types.length;if(Array.isArray(n)){if(n.length<r)return`${t} tuple value has too few items, expected a length of ${r} but got ${n.length} for value: \`${ju(n,!0)}\``;if(n.length>r)return`${t} tuple value has too many items, expected a length of ${r} but got ${n.length} for value: \`${ju(n,!0)}\``}return qu.formatError(Wu.notType,e)}};Object.assign(Object.create(null),{mixed:Wu,string:Hu,number:Ku,date:Yu,object:Xu,array:Ju,boolean:{isValue:"${path} field must be ${value}"},tuple:Qu});const ec=e=>e&&e.__isYupSchema__;class tc{static fromOptions(e,t){if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:i,otherwise:r}=t,s="function"==typeof n?n:(...e)=>e.every(e=>e===n);return new tc(e,(e,t)=>{var n;let o=s(...e)?i:r;return null!=(n=null==o?void 0:o(t))?n:t})}constructor(e,t){this.fn=void 0,this.refs=e,this.refs=e,this.fn=t}resolve(e,t){let n=this.refs.map(e=>e.getValue(null==t?void 0:t.value,null==t?void 0:t.parent,null==t?void 0:t.context)),i=this.fn(n,e,t);if(void 0===i||i===e)return e;if(!ec(i))throw new TypeError("conditions must return a schema object");return i.resolve(t)}}const nc="$",ic=".";class rc{constructor(e,t={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,"string"!=typeof e)throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),""===e)throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===nc,this.isValue=this.key[0]===ic,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?nc:this.isValue?ic:"";this.path=this.key.slice(n.length),this.getter=this.path&&ku.getter(this.path,!0),this.map=t.map}getValue(e,t,n){let i=this.isContext?n:this.isValue?e:t;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}cast(e,t){return this.getValue(e,null==t?void 0:t.parent,null==t?void 0:t.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}rc.prototype.__isYupRef=!0;const sc=e=>null==e;function oc(e){function t({value:t,path:n="",options:i,originalValue:r,schema:s},o,a){const{name:l,test:u,params:c,message:h,skipAbsent:d}=e;let{parent:f,context:p,abortEarly:m=s.spec.abortEarly,disableStackTrace:_=s.spec.disableStackTrace}=i;const g={value:t,parent:f,context:p};function y(e={}){const i=ac(Object.assign({value:t,originalValue:r,label:s.spec.label,path:e.path||n,spec:s.spec,disableStackTrace:e.disableStackTrace||_},c,e.params),g),o=new qu(qu.formatError(e.message||h,i),t,i.path,e.type||l,i.disableStackTrace);return o.params=i,o}const v=m?o:a;let b={path:n,parent:f,type:l,from:i.from,createError:y,resolve:e=>lc(e,g),options:i,originalValue:r,schema:s};const x=e=>{qu.isError(e)?v(e):e?a(null):v(y())},w=e=>{qu.isError(e)?v(e):o(e)};if(d&&sc(t))return x(!0);let E;try{var A;if(E=u.call(b,t,b),"function"==typeof(null==(A=E)?void 0:A.then)){if(i.sync)throw new Error(`Validation test of type: "${b.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(E).then(x,w)}}catch(e){return void w(e)}x(E)}return t.OPTIONS=e,t}function ac(e,t){if(!e)return e;for(const n of Object.keys(e))e[n]=lc(e[n],t);return e}function lc(e,t){return rc.isRef(e)?e.getValue(t.value,t.parent,t.context):e}function uc(e,t,n,i=n){let r,s,o;return t?(ku.forEach(t,(a,l,u)=>{let c=l?a.slice(1,a.length-1):a,h="tuple"===(e=e.resolve({context:i,parent:r,value:n})).type,d=u?parseInt(c,10):0;if(e.innerType||h){if(h&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(n&&d>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${a}, in the path: ${t}. because there is no value at that index. `);r=n,n=n&&n[d],e=h?e.spec.types[d]:e.innerType}if(!u){if(!e.fields||!e.fields[c])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e.type}")`);r=n,n=n&&n[c],e=e.fields[c]}s=c,o=l?"["+a+"]":"."+a}),{schema:e,parent:r,parentPath:s}):{parent:r,parentPath:t,schema:e}}class cc extends Set{describe(){const e=[];for(const t of this.values())e.push(rc.isRef(t)?t.describe():t);return e}resolveAll(e){let t=[];for(const n of this.values())t.push(e(n));return t}clone(){return new cc(this.values())}merge(e,t){const n=this.clone();return e.forEach(e=>n.add(e)),t.forEach(e=>n.delete(e)),n}}function hc(e,t=new Map){if(ec(e)||!e||"object"!=typeof e)return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let i=0;i<e.length;i++)n[i]=hc(e[i],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[i,r]of e.entries())n.set(i,hc(r,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const i of e)n.add(hc(i,t))}else{if(!(e instanceof Object))throw Error(`Unable to clone ${e}`);n={},t.set(e,n);for(const[i,r]of Object.entries(e))n[i]=hc(r,t)}return n}function dc(e){if(null==e||!e.length)return;const t=[];let n="",i=!1,r=!1;for(let s=0;s<e.length;s++){const o=e[s];"["!==o||r?"]"!==o||r?'"'!==o?"."!==o||i||r?n+=o:n&&(t.push(n),n=""):r=!r:(n&&(/^\d+$/.test(n)?t.push(n):t.push(n.replace(/^"|"$/g,"")),n=""),i=!1):(n&&(t.push(...n.split(".").filter(Boolean)),n=""),i=!0)}return n&&t.push(...n.split(".").filter(Boolean)),t}function fc(e,t){var n;if((null==(n=e.inner)||!n.length)&&e.errors.length)return function(e,t){const n=t?`${t}.${e.path}`:e.path;return e.errors.map(e=>({message:e,path:dc(n)}))}(e,t);const i=t?`${t}.${e.path}`:e.path;return e.inner.flatMap(e=>fc(e,i))}class pc{constructor(e){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new cc,this._blacklist=new cc,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Wu.notType)}),this.type=e.type,this._typeCheck=e.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},null==e?void 0:e.spec),this.withMutation(e=>{e.nonNullable()})}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeCheck=this._typeCheck,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.internalTests=Object.assign({},this.internalTests),t.exclusiveTests=Object.assign({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=hc(Object.assign({},this.spec,e)),t}label(e){let t=this.clone();return t.spec.label=e,t}meta(...e){if(0===e.length)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}withMutation(e){let t=this._mutate;this._mutate=!0;let n=e(this);return this._mutate=t,n}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&"mixed"!==this.type)throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let t=this,n=e.clone();const i=Object.assign({},t.spec,n.spec);return n.spec=i,n.internalTests=Object.assign({},t.internalTests,n.internalTests),n._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),n._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),n.tests=t.tests,n.exclusiveTests=t.exclusiveTests,n.withMutation(t=>{e.tests.forEach(e=>{t.test(e.OPTIONS)})}),n.transforms=[...t.transforms,...n.transforms],n}isType(e){return null==e?!(!this.spec.nullable||null!==e)||!(!this.spec.optional||void 0!==e):this._typeCheck(e)}resolve(e){let t=this;if(t.conditions.length){let n=t.conditions;t=t.clone(),t.conditions=[],t=n.reduce((t,n)=>n.resolve(t,e),t),t=t.resolve(e)}return t}resolveOptions(e){var t,n,i,r;return Object.assign({},e,{from:e.from||[],strict:null!=(t=e.strict)?t:this.spec.strict,abortEarly:null!=(n=e.abortEarly)?n:this.spec.abortEarly,recursive:null!=(i=e.recursive)?i:this.spec.recursive,disableStackTrace:null!=(r=e.disableStackTrace)?r:this.spec.disableStackTrace})}cast(e,t={}){let n=this.resolve(Object.assign({},t,{value:e})),i="ignore-optionality"===t.assert,r=n._cast(e,t);if(!1!==t.assert&&!n.isType(r)){if(i&&sc(r))return r;let s=ju(e),o=ju(r);throw new TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}". \n\nattempted value: ${s} \n`+(o!==s?`result of cast: ${o}`:""))}return r}_cast(e,t){let n=void 0===e?e:this.transforms.reduce((n,i)=>i.call(this,n,e,this,t),e);return void 0===n&&(n=this.getDefault(t)),n}_validate(e,t={},n,i){let{path:r,originalValue:s=e,strict:o=this.spec.strict}=t,a=e;o||(a=this._cast(a,Object.assign({assert:!1},t)));let l=[];for(let e of Object.values(this.internalTests))e&&l.push(e);this.runTests({path:r,value:a,originalValue:s,options:t,tests:l},n,e=>{if(e.length)return i(e,a);this.runTests({path:r,value:a,originalValue:s,options:t,tests:this.tests},n,i)})}runTests(e,t,n){let i=!1,{tests:r,value:s,originalValue:o,path:a,options:l}=e,u=e=>{i||(i=!0,t(e,s))},c=e=>{i||(i=!0,n(e,s))},h=r.length,d=[];if(!h)return c([]);let f={value:s,originalValue:o,path:a,options:l,schema:this};for(let e=0;e<r.length;e++){(0,r[e])(f,u,function(e){e&&(Array.isArray(e)?d.push(...e):d.push(e)),--h<=0&&c(d)})}}asNestedTest({key:e,index:t,parent:n,parentPath:i,originalParent:r,options:s}){const o=null!=e?e:t;if(null==o)throw TypeError("Must include `key` or `index` for nested validations");const a="number"==typeof o;let l=n[o];const u=Object.assign({},s,{strict:!0,parent:n,value:l,originalValue:r[o],key:void 0,[a?"index":"key"]:o,path:a||o.includes(".")?`${i||""}[${a?o:`"${o}"`}]`:(i?`${i}.`:"")+e});return(e,t,n)=>this.resolve(u)._validate(l,u,t,n)}validate(e,t){var n;let i=this.resolve(Object.assign({},t,{value:e})),r=null!=(n=null==t?void 0:t.disableStackTrace)?n:i.spec.disableStackTrace;return new Promise((n,s)=>i._validate(e,t,(e,t)=>{qu.isError(e)&&(e.value=t),s(e)},(e,t)=>{e.length?s(new qu(e,t,void 0,void 0,r)):n(t)}))}validateSync(e,t){var n;let i,r=this.resolve(Object.assign({},t,{value:e})),s=null!=(n=null==t?void 0:t.disableStackTrace)?n:r.spec.disableStackTrace;return r._validate(e,Object.assign({},t,{sync:!0}),(e,t)=>{throw qu.isError(e)&&(e.value=t),e},(t,n)=>{if(t.length)throw new qu(t,e,void 0,void 0,s);i=n}),i}isValid(e,t){return this.validate(e,t).then(()=>!0,e=>{if(qu.isError(e))return!1;throw e})}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(e){if(qu.isError(e))return!1;throw e}}_getDefault(e){let t=this.spec.default;return null==t?t:"function"==typeof t?t.call(this,e):hc(t)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){if(0===arguments.length)return this._getDefault();return this.clone({default:e})}strict(e=!0){return this.clone({strict:e})}nullability(e,t){const n=this.clone({nullable:e});return n.internalTests.nullable=oc({message:t,name:"nullable",test(e){return null!==e||this.schema.spec.nullable}}),n}optionality(e,t){const n=this.clone({optional:e});return n.internalTests.optionality=oc({message:t,name:"optionality",test(e){return void 0!==e||this.schema.spec.optional}}),n}optional(){return this.optionality(!0)}defined(e=Wu.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=Wu.notNull){return this.nullability(!1,e)}required(e=Wu.required){return this.clone().withMutation(t=>t.nonNullable(e).defined(e))}notRequired(){return this.clone().withMutation(e=>e.nullable().optional())}transform(e){let t=this.clone();return t.transforms.push(e),t}test(...e){let t;if(t=1===e.length?"function"==typeof e[0]?{test:e[0]}:e[0]:2===e.length?{name:e[0],test:e[1]}:{name:e[0],message:e[1],test:e[2]},void 0===t.message&&(t.message=Wu.default),"function"!=typeof t.test)throw new TypeError("`test` is a required parameters");let n=this.clone(),i=oc(t),r=t.exclusive||t.name&&!0===n.exclusiveTests[t.name];if(t.exclusive&&!t.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(n.exclusiveTests[t.name]=!!t.exclusive),n.tests=n.tests.filter(e=>{if(e.OPTIONS.name===t.name){if(r)return!1;if(e.OPTIONS.test===i.OPTIONS.test)return!1}return!0}),n.tests.push(i),n}when(e,t){Array.isArray(e)||"string"==typeof e||(t=e,e=".");let n=this.clone(),i=Bu(e).map(e=>new rc(e));return i.forEach(e=>{e.isSibling&&n.deps.push(e.key)}),n.conditions.push("function"==typeof t?new tc(i,t):tc.fromOptions(i,t)),n}typeError(e){let t=this.clone();return t.internalTests.typeError=oc({message:e,name:"typeError",skipAbsent:!0,test(e){return!!this.schema._typeCheck(e)||this.createError({params:{type:this.schema.type}})}}),t}oneOf(e,t=Wu.oneOf){let n=this.clone();return e.forEach(e=>{n._whitelist.add(e),n._blacklist.delete(e)}),n.internalTests.whiteList=oc({message:t,name:"oneOf",skipAbsent:!0,test(e){let t=this.schema._whitelist,n=t.resolveAll(this.resolve);return!!n.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:n}})}}),n}notOneOf(e,t=Wu.notOneOf){let n=this.clone();return e.forEach(e=>{n._blacklist.add(e),n._whitelist.delete(e)}),n.internalTests.blacklist=oc({message:t,name:"notOneOf",test(e){let t=this.schema._blacklist,n=t.resolveAll(this.resolve);return!n.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:n}})}}),n}strip(e=!0){let t=this.clone();return t.spec.strip=e,t}describe(e){const t=(e?this.resolve(e):this).clone(),{label:n,meta:i,optional:r,nullable:s}=t.spec,o={meta:i,label:n,optional:r,nullable:s,default:t.getDefault(e),type:t.type,oneOf:t._whitelist.describe(),notOneOf:t._blacklist.describe(),tests:t.tests.filter((e,t,n)=>n.findIndex(t=>t.OPTIONS.name===e.OPTIONS.name)===t).map(t=>{const n=t.OPTIONS.params&&e?ac(Object.assign({},t.OPTIONS.params),e):t.OPTIONS.params;return{name:t.OPTIONS.name,params:n}})};return o}get"~standard"(){const e=this,t={version:1,vendor:"yup",async validate(t){try{return{value:await e.validate(t,{abortEarly:!1})}}catch(e){if(e instanceof qu)return{issues:fc(e)};throw e}}};return t}}pc.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])pc.prototype[`${e}At`]=function(t,n,i={}){const{parent:r,parentPath:s,schema:o}=uc(this,t,n,i.context);return o[e](r&&r[s],Object.assign({},i,{parent:r,path:t}))};for(const e of["equals","is"])pc.prototype[e]=pc.prototype.oneOf;for(const e of["not","nope"])pc.prototype[e]=pc.prototype.notOneOf;const mc=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function _c(e){var t,n;const i=mc.exec(e);return i?{year:gc(i[1]),month:gc(i[2],1)-1,day:gc(i[3],1),hour:gc(i[4]),minute:gc(i[5]),second:gc(i[6]),millisecond:i[7]?gc(i[7].substring(0,3)):0,precision:null!=(t=null==(n=i[7])?void 0:n.length)?t:void 0,z:i[8]||void 0,plusMinus:i[9]||void 0,hourOffset:gc(i[10]),minuteOffset:gc(i[11])}:null}function gc(e,t=0){return Number(e)||t}let yc=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,vc=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,bc=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,xc=new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"),wc=e=>sc(e)||e===e.trim(),Ec={}.toString();function Ac(){return new Tc}class Tc extends pc{constructor(){super({type:"string",check:e=>(e instanceof String&&(e=e.valueOf()),"string"==typeof e)}),this.withMutation(()=>{this.transform((e,t)=>{if(!this.spec.coerce||this.isType(e))return e;if(Array.isArray(e))return e;const n=null!=e&&e.toString?e.toString():e;return n===Ec?e:n})})}required(e){return super.required(e).withMutation(t=>t.test({message:e||Wu.required,name:"required",skipAbsent:!0,test:e=>!!e.length}))}notRequired(){return super.notRequired().withMutation(e=>(e.tests=e.tests.filter(e=>"required"!==e.OPTIONS.name),e))}length(e,t=Hu.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(t){return t.length===this.resolve(e)}})}min(e,t=Hu.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t.length>=this.resolve(e)}})}max(e,t=Hu.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}matches(e,t){let n,i,r=!1;return t&&("object"==typeof t?({excludeEmptyString:r=!1,message:n,name:i}=t):n=t),this.test({name:i||"matches",message:n||Hu.matches,params:{regex:e},skipAbsent:!0,test:t=>""===t&&r||-1!==t.search(e)})}email(e=Hu.email){return this.matches(yc,{name:"email",message:e,excludeEmptyString:!0})}url(e=Hu.url){return this.matches(vc,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=Hu.uuid){return this.matches(bc,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let t,n,i="";return e&&("object"==typeof e?({message:i="",allowOffset:t=!1,precision:n}=e):i=e),this.matches(xc,{name:"datetime",message:i||Hu.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:i||Hu.datetime_offset,params:{allowOffset:t},skipAbsent:!0,test:e=>{if(!e||t)return!0;const n=_c(e);return!!n&&!!n.z}}).test({name:"datetime_precision",message:i||Hu.datetime_precision,params:{precision:n},skipAbsent:!0,test:e=>{if(!e||null==n)return!0;const t=_c(e);return!!t&&t.precision===n}})}ensure(){return this.default("").transform(e=>null===e?"":e)}trim(e=Hu.trim){return this.transform(e=>null!=e?e.trim():e).test({message:e,name:"trim",test:wc})}lowercase(e=Hu.lowercase){return this.transform(e=>sc(e)?e:e.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>sc(e)||e===e.toLowerCase()})}uppercase(e=Hu.uppercase){return this.transform(e=>sc(e)?e:e.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>sc(e)||e===e.toUpperCase()})}}Ac.prototype=Tc.prototype;function Sc(){return new kc}class kc extends pc{constructor(){super({type:"number",check:e=>(e instanceof Number&&(e=e.valueOf()),"number"==typeof e&&!(e=>e!=+e)(e))}),this.withMutation(()=>{this.transform((e,t)=>{if(!this.spec.coerce)return e;let n=e;if("string"==typeof n){if(n=n.replace(/\s/g,""),""===n)return NaN;n=+n}return this.isType(n)||null===n?n:parseFloat(n)})})}min(e,t=Ku.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t>=this.resolve(e)}})}max(e,t=Ku.max){return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(t){return t<=this.resolve(e)}})}lessThan(e,t=Ku.lessThan){return this.test({message:t,name:"max",exclusive:!0,params:{less:e},skipAbsent:!0,test(t){return t<this.resolve(e)}})}moreThan(e,t=Ku.moreThan){return this.test({message:t,name:"min",exclusive:!0,params:{more:e},skipAbsent:!0,test(t){return t>this.resolve(e)}})}positive(e=Ku.positive){return this.moreThan(0,e)}negative(e=Ku.negative){return this.lessThan(0,e)}integer(e=Ku.integer){return this.test({name:"integer",message:e,skipAbsent:!0,test:e=>Number.isInteger(e)})}truncate(){return this.transform(e=>sc(e)?e:0|e)}round(e){var t;let n=["ceil","floor","round","trunc"];if("trunc"===(e=(null==(t=e)?void 0:t.toLowerCase())||"round"))return this.truncate();if(-1===n.indexOf(e.toLowerCase()))throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform(t=>sc(t)?t:Math[e](t))}}Sc.prototype=kc.prototype;let Oc=new Date("");function Pc(){return new Cc}class Cc extends pc{constructor(){super({type:"date",check(e){return t=e,"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(e.getTime());var t}}),this.withMutation(()=>{this.transform((e,t)=>!this.spec.coerce||this.isType(e)||null===e?e:(e=function(e){const t=_c(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(void 0===t.z&&void 0===t.plusMinus)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return"Z"!==t.z&&void 0!==t.plusMinus&&(n=60*t.hourOffset+t.minuteOffset,"+"===t.plusMinus&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}(e),isNaN(e)?Cc.INVALID_DATE:new Date(e)))})}prepareParam(e,t){let n;if(rc.isRef(e))n=e;else{let i=this.cast(e);if(!this._typeCheck(i))throw new TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);n=i}return n}min(e,t=Yu.min){let n=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(e){return e>=this.resolve(n)}})}max(e,t=Yu.max){let n=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(e){return e<=this.resolve(n)}})}}function Rc(e,t){let n=1/0;return e.some((e,i)=>{var r;if(null!=(r=t.path)&&r.includes(e))return n=i,!0}),n}function Mc(e){return(t,n)=>Rc(e,t)-Rc(e,n)}Cc.INVALID_DATE=Oc,Pc.prototype=Cc.prototype,Pc.INVALID_DATE=Oc;const Lc=(e,t,n)=>{if("string"!=typeof e)return e;let i=e;try{i=JSON.parse(e)}catch(e){}return n.isType(i)?i:e};function Nc(e){if("fields"in e){const t={};for(const[n,i]of Object.entries(e.fields))t[n]=Nc(i);return e.setFields(t)}if("array"===e.type){const t=e.optional();return t.innerType&&(t.innerType=Nc(t.innerType)),t}return"tuple"===e.type?e.optional().clone({types:e.spec.types.map(Nc)}):"optional"in e?e.optional():e}let zc=e=>"[object Object]"===Object.prototype.toString.call(e);function Dc(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(e=>-1===n.indexOf(e))}const Ic=Mc([]);function Fc(e){return new jc(e)}class jc extends pc{constructor(e){super({type:"object",check:e=>zc(e)||"function"==typeof e}),this.fields=Object.create(null),this._sortErrors=Ic,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{e&&this.shape(e)})}_cast(e,t={}){var n;let i=super._cast(e,t);if(void 0===i)return this.getDefault(t);if(!this._typeCheck(i))return i;let r=this.fields,s=null!=(n=t.stripUnknown)?n:this.spec.noUnknown,o=[].concat(this._nodes,Object.keys(i).filter(e=>!this._nodes.includes(e))),a={},l=Object.assign({},t,{parent:a,__validating:t.__validating||!1}),u=!1;for(const e of o){let n=r[e],o=e in i,c=i[e];if(n){let r;l.path=(t.path?`${t.path}.`:"")+e,n=n.resolve({value:c,context:t.context,parent:a});let s=n instanceof pc?n.spec:void 0,o=null==s?void 0:s.strict;if(null!=s&&s.strip){u=u||e in i;continue}r=t.__validating&&o?c:n.cast(c,l),void 0!==r&&(a[e]=r)}else o&&!s&&(a[e]=c);o===e in a&&a[e]===c||(u=!0)}return u?a:i}_validate(e,t={},n,i){let{from:r=[],originalValue:s=e,recursive:o=this.spec.recursive}=t;t.from=[{schema:this,value:s},...r],t.__validating=!0,t.originalValue=s,super._validate(e,t,n,(e,r)=>{if(!o||!zc(r))return void i(e,r);s=s||r;let a=[];for(let e of this._nodes){let n=this.fields[e];n&&!rc.isRef(n)&&a.push(n.asNestedTest({options:t,key:e,parent:r,parentPath:t.path,originalParent:s}))}this.runTests({tests:a,value:r,originalValue:s,options:t},n,t=>{i(t.sort(this._sortErrors).concat(e),r)})})}clone(e){const t=super.clone(e);return t.fields=Object.assign({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),n=t.fields;for(let[e,t]of Object.entries(this.fields)){const i=n[e];n[e]=void 0===i?t:i}return t.withMutation(t=>t.setFields(n,[...this._excludedEdges,...e._excludedEdges]))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let t={};return this._nodes.forEach(n=>{var i;const r=this.fields[n];let s=e;null!=(i=s)&&i.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[n]})),t[n]=r&&"getDefault"in r?r.getDefault(s):void 0}),t}setFields(e,t){let n=this.clone();return n.fields=e,n._nodes=function(e,t=[]){let n=[],i=new Set,r=new Set(t.map(([e,t])=>`${e}-${t}`));function s(e,t){let s=ku.split(e)[0];i.add(s),r.has(`${t}-${s}`)||n.push([t,s])}for(const t of Object.keys(e)){let n=e[t];i.add(t),rc.isRef(n)&&n.isSibling?s(n.path,t):ec(n)&&"deps"in n&&n.deps.forEach(e=>s(e,t))}return Mu.array(Array.from(i),n).reverse()}(e,t),n._sortErrors=Mc(Object.keys(e)),t&&(n._excludedEdges=t),n}shape(e,t=[]){return this.clone().withMutation(n=>{let i=n._excludedEdges;return t.length&&(Array.isArray(t[0])||(t=[t]),i=[...n._excludedEdges,...t]),n.setFields(Object.assign(n.fields,e),i)})}partial(){const e={};for(const[t,n]of Object.entries(this.fields))e[t]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(e)}deepPartial(){return Nc(this)}pick(e){const t={};for(const n of e)this.fields[n]&&(t[n]=this.fields[n]);return this.setFields(t,this._excludedEdges.filter(([t,n])=>e.includes(t)&&e.includes(n)))}omit(e){const t=[];for(const n of Object.keys(this.fields))e.includes(n)||t.push(n);return this.pick(t)}from(e,t,n){let i=ku.getter(e,!0);return this.transform(r=>{if(!r)return r;let s=r;return((e,t)=>{const n=[...ku.normalizePath(t)];if(1===n.length)return n[0]in e;let i=n.pop(),r=ku.getter(ku.join(n),!0)(e);return!(!r||!(i in r))})(r,e)&&(s=Object.assign({},r),n||delete s[e],s[t]=i(r)),s})}json(){return this.transform(Lc)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||Xu.exact,test(e){if(null==e)return!0;const t=Dc(this.schema,e);return 0===t.length||this.createError({params:{properties:t.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,t=Xu.noUnknown){"boolean"!=typeof e&&(t=e,e=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:t,test(t){if(null==t)return!0;const n=Dc(this.schema,t);return!e||0===n.length||this.createError({params:{unknown:n.join(", ")}})}});return n.spec.noUnknown=e,n}unknown(e=!0,t=Xu.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform(t=>{if(!t)return t;const n={};for(const i of Object.keys(t))n[e(i)]=t[i];return n})}camelCase(){return this.transformKeys(Pu.camelCase)}snakeCase(){return this.transformKeys(Pu.snakeCase)}constantCase(){return this.transformKeys(e=>Pu.snakeCase(e).toUpperCase())}describe(e){const t=(e?this.resolve(e):this).clone(),n=super.describe(e);n.fields={};for(const[r,s]of Object.entries(t.fields)){var i;let t=e;null!=(i=t)&&i.value&&(t=Object.assign({},t,{parent:t.value,value:t.value[r]})),n.fields[r]=s.describe(t)}return n}}function Bc(e){return new Uc(e)}Fc.prototype=jc.prototype;class Uc extends pc{constructor(e){super({type:"array",spec:{types:e},check:e=>Array.isArray(e)}),this.innerType=void 0,this.innerType=e}_cast(e,t){const n=super._cast(e,t);if(!this._typeCheck(n)||!this.innerType)return n;let i=!1;const r=n.map((e,r)=>{const s=this.innerType.cast(e,Object.assign({},t,{path:`${t.path||""}[${r}]`,parent:n,originalValue:e,value:e,index:r}));return s!==e&&(i=!0),s});return i?r:n}_validate(e,t={},n,i){var r;let s=this.innerType,o=null!=(r=t.recursive)?r:this.spec.recursive;null!=t.originalValue&&t.originalValue,super._validate(e,t,n,(r,a)=>{var l;if(!o||!s||!this._typeCheck(a))return void i(r,a);let u=new Array(a.length);for(let n=0;n<a.length;n++){var c;u[n]=s.asNestedTest({options:t,index:n,parent:a,parentPath:t.path,originalParent:null!=(c=t.originalValue)?c:e})}this.runTests({value:a,tests:u,originalValue:null!=(l=t.originalValue)?l:e,options:t},n,e=>i(e.concat(r),a))})}clone(e){const t=super.clone(e);return t.innerType=this.innerType,t}json(){return this.transform(Lc)}concat(e){let t=super.concat(e);return t.innerType=this.innerType,e.innerType&&(t.innerType=t.innerType?t.innerType.concat(e.innerType):e.innerType),t}of(e){let t=this.clone();if(!ec(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+ju(e));return t.innerType=e,t.spec=Object.assign({},t.spec,{types:e}),t}length(e,t=Ju.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(t){return t.length===this.resolve(e)}})}min(e,t){return t=t||Ju.min,this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t.length>=this.resolve(e)}})}max(e,t){return t=t||Ju.max,this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}ensure(){return this.default(()=>[]).transform((e,t)=>this._typeCheck(e)?e:null==t?[]:[].concat(t))}compact(e){let t=e?(t,n,i)=>!e(t,n,i):e=>!!e;return this.transform(e=>null!=e?e.filter(t):e)}describe(e){const t=(e?this.resolve(e):this).clone(),n=super.describe(e);if(t.innerType){var i;let r=e;null!=(i=r)&&i.value&&(r=Object.assign({},r,{parent:r.value,value:r.value[0]})),n.innerType=t.innerType.describe(r)}return n}}Bc.prototype=Uc.prototype;const Vc="Данное поле обязательно для заполнения",Gc=()=>Ac(),$c=(e=Vc)=>Gc().required(e),Zc=Sc(),qc=Zc.required(Vc),Wc=Bc(),Hc=Pc(),Kc=Hc.required(Vc),Yc=({items:e,onOpen:t,defaultValue:n=null})=>{const[i,l]=T.useState(n),u=T.useCallback(()=>{l(null)},[]);T.useEffect(()=>{n&&l(n)},[n]);const c=T.useId();return H(r,{id:c,children:e.map(({value:e,summary:n,getDetails:r})=>{const h=`${c}-accordion-${e}`;return K(s,{expanded:e===i,children:[H(o,{expandIcon:H(ne,{}),onClick:()=>{l(n=>n===e?null:(t?.(e),e))},"aria-controls":`${h}-content`,id:`${h}-header`,children:n}),H(a,{children:r({onClose:u})})]},h)})})},Xc=e=>{const{children:t,variant:n="contained",loading:i,icon:r,sx:s,...o}=e;return r?H(ie,{...o,loading:i,children:r}):H(l,{sx:{whiteSpace:"nowrap",padding:"5px 15px",textTransform:"none",...s},loading:i,loadingPosition:"start",variant:n,...o,children:t})},Jc={reset:le,edit:oe,move:ae,save:ue,delete:se,clear:re},Qc=u(c)(()=>({padding:0})),eh=({title:e,iconProps:t,...n})=>{const i=T.useId(),r=Jc[t.name],s=t.color??"primary";return e?H(h,{title:e,children:H(Qc,{id:i,...n,onClick:e=>{e.stopPropagation(),n.onClick?.(e)},children:H(r,{fontSize:"medium",color:s})})}):H(Qc,{id:i,...n,onClick:e=>{e.stopPropagation(),n.onClick?.(e)},children:H(r,{fontSize:"medium",color:s})})},th=T.forwardRef(function(e,t){return H(d,{direction:"up",ref:t,...e})}),nh=({notification:e,onDelete:t,disabled:n=!1,...i})=>{const r=T.useId(),[s,o]=T.useState(!1),a=()=>{o(!1)},u=T.useMemo(()=>({name:"delete",color:n?"disabled":"error"}),[n]);return K(T.Fragment,{children:[e?H(h,{title:e.title,children:H(eh,{...i,iconProps:u,onClick:()=>{o(!0)},disabled:n})}):H(eh,{...i,iconProps:u,onClick:t,disabled:n}),e?K(f,{slots:{transition:th},open:s,onClose:a,children:[H(p,{id:`${r}-dialog-title`,children:e.title}),H(m,{children:H(_,{id:`${r}-dialog-text`,children:e.description})}),K(g,{children:[H(l,{variant:"contained",color:"error",sx:{textTransform:"none"},onClick:a,children:"Отмена"}),H(l,{variant:"contained",sx:{textTransform:"none"},onClick:()=>{t(),a()},children:"Подтвердить"})]})]}):null]})},ih=u("input")({clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:1,overflow:"hidden",position:"absolute",bottom:0,left:0,whiteSpace:"nowrap",width:1}),rh=({children:e,accept:t,onFilesLoad:n,...i})=>K(Xc,{...i,component:"label",variant:"contained",startIcon:H(ce,{}),children:[e,H(ih,{type:"file",accept:t,onChange:e=>{const{target:{files:t}}=e;t&&n({event:e,files:t})},multiple:!0})]});var sh=$l(({name:e,title:t,description:n,onSuccess:i,onOpen:r,onClose:s,theme:o="info",agreeButton:a,disagreeButton:l,content:u})=>{const c=T.useId(),h=T.useId(),d=T.useId(),v=na.getIsOpen(e),b=()=>{na.close(e)};return T.useEffect(()=>{v?r?.():s?.()},[v]),K(f,{id:c,open:v,onClose:b,"aria-labelledby":h,"aria-describedby":d,children:[H(p,{id:h,sx:({palette:e})=>({background:e[o].main,color:e[o].contrastText}),children:t}),H(y,{}),K(m,{sx:({spacing:e})=>({display:"grid",gap:e(2)}),children:[H(_,{id:d,children:n}),u?K(T.Fragment,{children:[H(y,{}),u]}):null]}),H(y,{}),K(g,{children:[H(Xc,{color:"error",onClick:b,disabled:l?.disabled,children:l?.text??"Закрыть"}),H(Xc,{color:"success",onClick:()=>{i(),b()},disabled:a?.disabled,children:a?.text??"Подтвердить"})]})]})});const oh=({children:e,sx:t,...n})=>H(r,{...n,sx:e=>{const{spacing:n,shadows:i}=e;return{p:n(2),borderRadius:"12px",boxShadow:i,maxHeight:"85vh",maxWidth:"85vw",overflowX:"auto",...t?.(e)}},children:e});var ah=e=>"checkbox"===e.type,lh=e=>e instanceof Date,uh=e=>null==e;const ch=e=>"object"==typeof e;var hh=e=>!uh(e)&&!Array.isArray(e)&&ch(e)&&!lh(e),dh=e=>hh(e)&&e.target?ah(e.target)?e.target.checked:e.target.value:e,fh=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),ph="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function mh(e){if(e instanceof Date)return new Date(e);const t="undefined"!=typeof FileList&&e instanceof FileList;if(ph&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!(n||hh(e)&&(e=>{const t=e.constructor&&e.constructor.prototype;return hh(t)&&t.hasOwnProperty("isPrototypeOf")})(e)))return e;const i=n?[]:Object.create(Object.getPrototypeOf(e));for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=mh(e[t]));return i}var _h=e=>/^\w*$/.test(e),gh=e=>void 0===e,yh=e=>Array.isArray(e)?e.filter(Boolean):[],vh=e=>yh(e.replace(/["|']|\]/g,"").split(/\.|\[/)),bh=(e,t,n)=>{if(!t||!hh(e))return n;const i=(_h(t)?[t]:vh(t)).reduce((e,t)=>uh(e)?e:e[t],e);return gh(i)||i===e?gh(e[t])?n:e[t]:i},xh=e=>"boolean"==typeof e,wh=e=>"function"==typeof e,Eh=(e,t,n)=>{let i=-1;const r=_h(t)?[t]:vh(t),s=r.length,o=s-1;for(;++i<s;){const t=r[i];let s=n;if(i!==o){const n=e[t];s=hh(n)||Array.isArray(n)?n:isNaN(+r[i+1])?{}:[]}if("__proto__"===t||"constructor"===t||"prototype"===t)return;e[t]=s,e=e[t]}};const Ah="blur",Th="focusout",Sh="change",kh="onBlur",Oh="onChange",Ph="onSubmit",Ch="onTouched",Rh="all",Mh="max",Lh="min",Nh="maxLength",zh="minLength",Dh="pattern",Ih="required",Fh="validate",jh=S.createContext(null);jh.displayName="HookFormControlContext";const Bh=()=>S.useContext(jh);var Uh=(e,t,n,i=!0)=>{const r={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(r,s,{get:()=>{const r=s;return t._proxyFormState[r]!==Rh&&(t._proxyFormState[r]=!i||Rh),n&&(n[r]=!0),e[r]}});return r};const Vh="undefined"!=typeof window?S.useLayoutEffect:S.useEffect;var Gh=e=>"string"==typeof e,$h=(e,t,n,i,r)=>Gh(e)?(i&&t.watch.add(e),bh(n,e,r)):Array.isArray(e)?e.map(e=>(i&&t.watch.add(e),bh(n,e))):(i&&(t.watchAll=!0),n),Zh=e=>uh(e)||!ch(e);function qh(e,t,n=new WeakSet){if(Zh(e)||Zh(t))return Object.is(e,t);if(lh(e)&&lh(t))return Object.is(e.getTime(),t.getTime());const i=Object.keys(e),r=Object.keys(t);if(i.length!==r.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const s of i){const i=e[s];if(!r.includes(s))return!1;if("ref"!==s){const e=t[s];if(lh(i)&&lh(e)||hh(i)&&hh(e)||Array.isArray(i)&&Array.isArray(e)?!qh(i,e,n):!Object.is(i,e))return!1}}return!0}function Wh(e){const t=Bh(),{name:n,disabled:i,control:r=t,shouldUnregister:s,defaultValue:o,exact:a=!0}=e,l=fh(r._names.array,n),u=S.useMemo(()=>bh(r._formValues,n,bh(r._defaultValues,n,o)),[r,n,o]),c=function(e){const t=Bh(),{control:n=t,name:i,defaultValue:r,disabled:s,exact:o,compute:a}=e||{},l=S.useRef(r),u=S.useRef(a),c=S.useRef(void 0),h=S.useRef(n),d=S.useRef(i);u.current=a;const[f,p]=S.useState(()=>{const e=n._getWatch(i,l.current);return u.current?u.current(e):e}),m=S.useCallback(e=>{const t=$h(i,n._names,e||n._formValues,!1,l.current);return u.current?u.current(t):t},[n._formValues,n._names,i]),_=S.useCallback(e=>{if(!s){const t=$h(i,n._names,e||n._formValues,!1,l.current);if(u.current){const e=u.current(t);qh(e,c.current)||(p(e),c.current=e)}else p(t)}},[n._formValues,n._names,s,i]);Vh(()=>(h.current===n&&qh(d.current,i)||(h.current=n,d.current=i,_()),n._subscribe({name:i,formState:{values:!0},exact:o,callback:e=>{_(e.values)}})),[n,o,i,_]),S.useEffect(()=>n._removeUnmounted());const g=h.current!==n,y=d.current,v=S.useMemo(()=>{if(s)return null;const e=!g&&!qh(y,i);return g||e?m():null},[s,g,i,y,m]);return null!==v?v:f}({control:r,name:n,defaultValue:u,exact:a}),h=function(e){const t=Bh(),{control:n=t,disabled:i,name:r,exact:s}=e||{},[o,a]=S.useState(n._formState),l=S.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Vh(()=>n._subscribe({name:r,formState:l.current,exact:s,callback:e=>{!i&&a({...n._formState,...e})}}),[r,i,s]),S.useEffect(()=>{l.current.isValid&&n._setValid(!0)},[n]),S.useMemo(()=>Uh(o,n,l.current,!1),[o,n])}({control:r,name:n,exact:a}),d=S.useRef(e),f=S.useRef(void 0),p=S.useRef(r.register(n,{...e.rules,value:c,...xh(e.disabled)?{disabled:e.disabled}:{}}));d.current=e;const m=S.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!bh(h.errors,n)},isDirty:{enumerable:!0,get:()=>!!bh(h.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!bh(h.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!bh(h.validatingFields,n)},error:{enumerable:!0,get:()=>bh(h.errors,n)}}),[h,n]),_=S.useCallback(e=>p.current.onChange({target:{value:dh(e),name:n},type:Sh}),[n]),g=S.useCallback(()=>p.current.onBlur({target:{value:bh(r._formValues,n),name:n},type:Ah}),[n,r._formValues]),y=S.useCallback(e=>{const t=bh(r._fields,n);t&&t._f&&e&&(t._f.ref={focus:()=>wh(e.focus)&&e.focus(),select:()=>wh(e.select)&&e.select(),setCustomValidity:t=>wh(e.setCustomValidity)&&e.setCustomValidity(t),reportValidity:()=>wh(e.reportValidity)&&e.reportValidity()})},[r._fields,n]),v=S.useMemo(()=>({name:n,value:c,...xh(i)||h.disabled?{disabled:h.disabled||i}:{},onChange:_,onBlur:g,ref:y}),[n,i,h.disabled,_,g,y,c]);return S.useEffect(()=>{const e=r._options.shouldUnregister||s,t=f.current;t&&t!==n&&!l&&r.unregister(t),r.register(n,{...d.current.rules,...xh(d.current.disabled)?{disabled:d.current.disabled}:{}});const i=(e,t)=>{const n=bh(r._fields,e);n&&n._f&&(n._f.mount=t)};if(i(n,!0),e){const e=mh(bh(r._options.defaultValues,n,d.current.defaultValue));Eh(r._defaultValues,n,e),gh(bh(r._formValues,n))&&Eh(r._formValues,n,e)}return!l&&r.register(n),f.current=n,()=>{(l?e&&!r._state.action:e)?r.unregister(n):i(n,!1)}},[n,r,l,s]),S.useEffect(()=>{r._setDisabledField({disabled:i,name:n})},[i,n,r]),S.useMemo(()=>({field:v,formState:h,fieldState:m}),[v,h,m])}const Hh=e=>e.render(Wh(e)),Kh=S.createContext(null);Kh.displayName="HookFormContext";const Yh=()=>S.useContext(Kh),Xh=e=>{const{children:t,watch:n,getValues:i,getFieldState:r,setError:s,clearErrors:o,setValue:a,trigger:l,formState:u,resetField:c,reset:h,handleSubmit:d,unregister:f,control:p,register:m,setFocus:_,subscribe:g}=e;return S.createElement(Kh.Provider,{value:S.useMemo(()=>({watch:n,getValues:i,getFieldState:r,setError:s,clearErrors:o,setValue:a,trigger:l,formState:u,resetField:c,reset:h,handleSubmit:d,unregister:f,control:p,register:m,setFocus:_,subscribe:g}),[o,p,u,r,i,d,m,h,c,s,_,a,g,l,f,n])},S.createElement(jh.Provider,{value:p},t))};var Jh=(e,t,n,i,r)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[i]:r||!0}}:{},Qh=e=>Array.isArray(e)?e:[e],ed=()=>{let e=[];return{get observers(){return e},next:t=>{for(const n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(e=>e!==t)}}),unsubscribe:()=>{e=[]}}};function td(e,t){const n={};for(const i in e)if(e.hasOwnProperty(i)){const r=e[i],s=t[i];if(r&&hh(r)&&s){const e=td(r,s);hh(e)&&(n[i]=e)}else e[i]&&(n[i]=s)}return n}var nd=e=>hh(e)&&!Object.keys(e).length,id=e=>"file"===e.type,rd=e=>{if(!ph)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},sd=e=>"select-multiple"===e.type,od=e=>"radio"===e.type,ad=e=>rd(e)&&e.isConnected;function ld(e,t){const n=Array.isArray(t)?t:_h(t)?[t]:vh(t),i=1===n.length?e:function(e,t){const n=t.slice(0,-1).length;let i=0;for(;i<n;)e=gh(e)?i++:e[t[i++]];return e}(e,n),r=n.length-1,s=n[r];return i&&delete i[s],0!==r&&(hh(i)&&nd(i)||Array.isArray(i)&&function(e){for(const t in e)if(e.hasOwnProperty(t)&&!gh(e[t]))return!1;return!0}(i))&&ld(e,n.slice(0,-1)),e}function ud(e){return Array.isArray(e)||hh(e)&&!(e=>{for(const t in e)if(wh(e[t]))return!0;return!1})(e)}function cd(e,t={}){for(const n in e){const i=e[n];ud(i)?(t[n]=Array.isArray(i)?[]:{},cd(i,t[n])):gh(i)||(t[n]=!0)}return t}function hd(e,t,n){n||(n=cd(t));for(const i in e){const r=e[i];if(ud(r))gh(t)||Zh(n[i])?n[i]=cd(r,Array.isArray(r)?[]:{}):hd(r,uh(t)?{}:t[i],n[i]);else{const e=t[i];n[i]=!qh(r,e)}}return n}const dd={value:!1,isValid:!1},fd={value:!0,isValid:!0};var pd=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!gh(e[0].attributes.value)?gh(e[0].value)||""===e[0].value?fd:{value:e[0].value,isValid:!0}:fd:dd}return dd},md=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:i})=>gh(e)?e:t?""===e?NaN:e?+e:e:n&&Gh(e)?new Date(e):i?i(e):e;const _d={isValid:!1,value:null};var gd=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,_d):_d;function yd(e){const t=e.ref;return id(t)?t.files:od(t)?gd(e.refs).value:sd(t)?[...t.selectedOptions].map(({value:e})=>e):ah(t)?pd(e.refs).value:md(gh(t.value)?e.ref.value:t.value,e)}var vd=e=>e instanceof RegExp,bd=e=>gh(e)?e:vd(e)?e.source:hh(e)?vd(e.value)?e.value.source:e.value:e,xd=e=>({isOnSubmit:!e||e===Ph,isOnBlur:e===kh,isOnChange:e===Oh,isOnAll:e===Rh,isOnTouch:e===Ch});const wd="AsyncFunction";var Ed=e=>!!e&&!!e.validate&&!!(wh(e.validate)&&e.validate.constructor.name===wd||hh(e.validate)&&Object.values(e.validate).find(e=>e.constructor.name===wd)),Ad=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))));const Td=(e,t,n,i)=>{for(const r of n||Object.keys(e)){const n=bh(e,r);if(n){const{_f:e,...s}=n;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],r)&&!i)return!0;if(e.ref&&t(e.ref,e.name)&&!i)return!0;if(Td(s,t))break}else if(hh(s)&&Td(s,t))break}}};function Sd(e,t,n){const i=bh(e,n);if(i||_h(n))return{error:i,name:n};const r=n.split(".");for(;r.length;){const i=r.join("."),s=bh(t,i),o=bh(e,i);if(s&&!Array.isArray(s)&&n!==i)return{name:n};if(o&&o.type)return{name:i,error:o};if(o&&o.root&&o.root.type)return{name:`${i}.root`,error:o.root};r.pop()}return{name:n}}var kd=(e,t,n)=>{const i=Qh(bh(e,n));return Eh(i,"root",t[n]),Eh(e,n,i),e};function Od(e,t,n="validate"){if(Gh(e)||Array.isArray(e)&&e.every(Gh)||xh(e)&&!e)return{type:n,message:Gh(e)?e:"",ref:t}}var Pd=e=>hh(e)&&!vd(e)?e:{value:e,message:""},Cd=async(e,t,n,i,r,s)=>{const{ref:o,refs:a,required:l,maxLength:u,minLength:c,min:h,max:d,pattern:f,validate:p,name:m,valueAsNumber:_,mount:g}=e._f,y=bh(n,m);if(!g||t.has(m))return{};const v=a?a[0]:o,b=e=>{r&&v.reportValidity&&(v.setCustomValidity(xh(e)?"":e||""),v.reportValidity())},x={},w=od(o),E=ah(o),A=w||E,T=(_||id(o))&&gh(o.value)&&gh(y)||rd(o)&&""===o.value||""===y||Array.isArray(y)&&!y.length,S=Jh.bind(null,m,i,x),k=(e,t,n,i=Nh,r=zh)=>{const s=e?t:n;x[m]={type:e?i:r,message:s,ref:o,...S(e?i:r,s)}};if(s?!Array.isArray(y)||!y.length:l&&(!A&&(T||uh(y))||xh(y)&&!y||E&&!pd(a).isValid||w&&!gd(a).isValid)){const{value:e,message:t}=Gh(l)?{value:!!l,message:l}:Pd(l);if(e&&(x[m]={type:Ih,message:t,ref:v,...S(Ih,t)},!i))return b(t),x}if(!(T||uh(h)&&uh(d))){let e,t;const n=Pd(d),r=Pd(h);if(uh(y)||isNaN(y)){const i=o.valueAsDate||new Date(y),s=e=>new Date((new Date).toDateString()+" "+e),a="time"==o.type,l="week"==o.type;Gh(n.value)&&y&&(e=a?s(y)>s(n.value):l?y>n.value:i>new Date(n.value)),Gh(r.value)&&y&&(t=a?s(y)<s(r.value):l?y<r.value:i<new Date(r.value))}else{const i=o.valueAsNumber||(y?+y:y);uh(n.value)||(e=i>n.value),uh(r.value)||(t=i<r.value)}if((e||t)&&(k(!!e,n.message,r.message,Mh,Lh),!i))return b(x[m].message),x}if((u||c)&&!T&&(Gh(y)||s&&Array.isArray(y))){const e=Pd(u),t=Pd(c),n=!uh(e.value)&&y.length>+e.value,r=!uh(t.value)&&y.length<+t.value;if((n||r)&&(k(n,e.message,t.message),!i))return b(x[m].message),x}if(f&&!T&&Gh(y)){const{value:e,message:t}=Pd(f);if(vd(e)&&!y.match(e)&&(x[m]={type:Dh,message:t,ref:o,...S(Dh,t)},!i))return b(t),x}if(p)if(wh(p)){const e=Od(await p(y,n),v);if(e&&(x[m]={...e,...S(Fh,e.message)},!i))return b(e.message),x}else if(hh(p)){let e={};for(const t in p){if(!nd(e)&&!i)break;const r=Od(await p[t](y,n),v,t);r&&(e={...r,...S(t,r.message)},b(r.message),i&&(x[m]=e))}if(!nd(e)&&(x[m]={ref:v,...e},!i))return x}return b(!0),x};const Rd={mode:Ph,reValidateMode:Oh,shouldFocusError:!0};function Md(e={}){let t,n={...Rd,...e},i={submitCount:0,isDirty:!1,isReady:!1,isLoading:wh(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:n.errors||{},disabled:n.disabled||!1},r={},s=(hh(n.defaultValues)||hh(n.values))&&mh(n.defaultValues||n.values)||{},o=n.shouldUnregister?{}:mh(s),a={action:!1,mount:!1,watch:!1,keepIsValid:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},u=0;const c={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},h={...c};let d={...h};const f={array:ed(),state:ed()},p=n.criteriaMode===Rh,m=async e=>{if(!a.keepIsValid&&!n.disabled&&(h.isValid||d.isValid||e)){let e;n.resolver?(e=nd((await b()).errors),_()):e=await x(r,!0),e!==i.isValid&&f.state.next({isValid:e})}},_=(e,t)=>{!n.disabled&&(h.isValidating||h.validatingFields||d.isValidating||d.validatingFields)&&((e||Array.from(l.mount)).forEach(e=>{e&&(t?Eh(i.validatingFields,e,t):ld(i.validatingFields,e))}),f.state.next({validatingFields:i.validatingFields,isValidating:!nd(i.validatingFields)}))},g=(e,t,n,i)=>{const l=bh(r,e);if(l){const r=bh(o,e,gh(n)?bh(s,e):n);gh(r)||i&&i.defaultChecked||t?Eh(o,e,t?r:yd(l._f)):A(e,r),a.mount&&!a.action&&m()}},y=(e,t,r,o,a)=>{let l=!1,u=!1;const c={name:e};if(!n.disabled){if(!r||o){(h.isDirty||d.isDirty)&&(u=i.isDirty,i.isDirty=c.isDirty=w(),l=u!==c.isDirty);const n=qh(bh(s,e),t);u=!!bh(i.dirtyFields,e),n?ld(i.dirtyFields,e):Eh(i.dirtyFields,e,!0),c.dirtyFields=i.dirtyFields,l=l||(h.dirtyFields||d.dirtyFields)&&u!==!n}if(r){const t=bh(i.touchedFields,e);t||(Eh(i.touchedFields,e,r),c.touchedFields=i.touchedFields,l=l||(h.touchedFields||d.touchedFields)&&t!==r)}l&&a&&f.state.next(c)}return l?c:{}},v=(e,r,s,o)=>{const a=bh(i.errors,e),l=(h.isValid||d.isValid)&&xh(r)&&i.isValid!==r;var c;if(n.delayError&&s?(c=()=>((e,t)=>{Eh(i.errors,e,t),f.state.next({errors:i.errors})})(e,s),t=e=>{clearTimeout(u),u=setTimeout(c,e)},t(n.delayError)):(clearTimeout(u),t=null,s?Eh(i.errors,e,s):ld(i.errors,e)),(s?!qh(a,s):a)||!nd(o)||l){const t={...o,...l&&xh(r)?{isValid:r}:{},errors:i.errors,name:e};i={...i,...t},f.state.next(t)}},b=async e=>{_(e,!0);const t=await n.resolver(o,n.context,((e,t,n,i)=>{const r={};for(const n of e){const e=bh(t,n);e&&Eh(r,n,e._f)}return{criteriaMode:n,names:[...e],fields:r,shouldUseNativeValidation:i}})(e||l.mount,r,n.criteriaMode,n.shouldUseNativeValidation));return t},x=async(t,r,s={valid:!0})=>{for(const a in t){const u=t[a];if(u){const{_f:t,...a}=u;if(t){const a=l.array.has(t.name),c=u._f&&Ed(u._f);c&&h.validatingFields&&_([t.name],!0);const d=await Cd(u,l.disabled,o,p,n.shouldUseNativeValidation&&!r,a);if(c&&h.validatingFields&&_([t.name]),d[t.name]&&(s.valid=!1,r||e.shouldUseNativeValidation))break;!r&&(bh(d,t.name)?a?kd(i.errors,d,t.name):Eh(i.errors,t.name,d[t.name]):ld(i.errors,t.name))}!nd(a)&&await x(a,r,s)}}return s.valid},w=(e,t)=>!n.disabled&&(e&&t&&Eh(o,e,t),!qh(C(),s)),E=(e,t,n)=>$h(e,l,{...a.mount?o:gh(t)?s:Gh(e)?{[e]:t}:t},n,t),A=(e,t,n={})=>{const i=bh(r,e);let s=t;if(i){const n=i._f;n&&(!n.disabled&&Eh(o,e,md(t,n)),s=rd(n.ref)&&uh(t)?"":t,sd(n.ref)?[...n.ref.options].forEach(e=>e.selected=s.includes(e.value)):n.refs?ah(n.ref)?n.refs.forEach(e=>{e.defaultChecked&&e.disabled||(Array.isArray(s)?e.checked=!!s.find(t=>t===e.value):e.checked=s===e.value||!!s)}):n.refs.forEach(e=>e.checked=e.value===s):id(n.ref)?n.ref.value="":(n.ref.value=s,n.ref.type||f.state.next({name:e,values:mh(o)})))}(n.shouldDirty||n.shouldTouch)&&y(e,s,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&P(e)},T=(e,t,n)=>{for(const i in t){if(!t.hasOwnProperty(i))return;const s=t[i],o=e+"."+i,a=bh(r,o);(l.array.has(e)||hh(s)||a&&!a._f)&&!lh(s)?T(o,s,n):A(o,s,n)}},S=(e,t,n={})=>{const u=bh(r,e),c=l.array.has(e),p=mh(t);Eh(o,e,p),c?(f.array.next({name:e,values:mh(o)}),(h.isDirty||h.dirtyFields||d.isDirty||d.dirtyFields)&&n.shouldDirty&&f.state.next({name:e,dirtyFields:hd(s,o),isDirty:w(e,p)})):!u||u._f||uh(p)?A(e,p,n):T(e,p,n),Ad(e,l)?f.state.next({...i,name:e,values:mh(o)}):f.state.next({name:a.mount?e:void 0,values:mh(o)})},k=async e=>{a.mount=!0;const s=e.target;let u=s.name,c=!0;const g=bh(r,u),w=e=>{c=Number.isNaN(e)||lh(e)&&isNaN(e.getTime())||qh(e,bh(o,u,e))},E=xd(n.mode),A=xd(n.reValidateMode);if(g){let a,S;const k=s.type?yd(g._f):dh(e),O=e.type===Ah||e.type===Th,C=!((T=g._f).mount&&(T.required||T.min||T.max||T.maxLength||T.minLength||T.pattern||T.validate)||n.resolver||bh(i.errors,u)||g._f.deps)||((e,t,n,i,r)=>!r.isOnAll&&(!n&&r.isOnTouch?!(t||e):(n?i.isOnBlur:r.isOnBlur)?!e:!(n?i.isOnChange:r.isOnChange)||e))(O,bh(i.touchedFields,u),i.isSubmitted,A,E),R=Ad(u,l,O);Eh(o,u,k),O?s&&s.readOnly||(g._f.onBlur&&g._f.onBlur(e),t&&t(0)):g._f.onChange&&g._f.onChange(e);const M=y(u,k,O),L=!nd(M)||R;if(!O&&f.state.next({name:u,type:e.type,values:mh(o)}),C)return(h.isValid||d.isValid)&&("onBlur"===n.mode?O&&m():O||m()),L&&f.state.next({name:u,...R?{}:M});if(!O&&R&&f.state.next({...i}),n.resolver){const{errors:e}=await b([u]);if(_([u]),w(k),c){const t=Sd(i.errors,r,u),n=Sd(e,r,t.name||u);a=n.error,u=n.name,S=nd(e)}}else _([u],!0),a=(await Cd(g,l.disabled,o,p,n.shouldUseNativeValidation))[u],_([u]),w(k),c&&(a?S=!1:(h.isValid||d.isValid)&&(S=await x(r,!0)));c&&(g._f.deps&&(!Array.isArray(g._f.deps)||g._f.deps.length>0)&&P(g._f.deps),v(u,S,a,M))}var T},O=(e,t)=>{if(bh(i.errors,t)&&e.focus)return e.focus(),1},P=async(e,t={})=>{let s,o;const a=Qh(e);if(n.resolver){const t=await(async e=>{const{errors:t}=await b(e);if(_(e),e)for(const n of e){const e=bh(t,n);e?Eh(i.errors,n,e):ld(i.errors,n)}else i.errors=t;return t})(gh(e)?e:a);s=nd(t),o=e?!a.some(e=>bh(t,e)):s}else e?(o=(await Promise.all(a.map(async e=>{const t=bh(r,e);return await x(t&&t._f?{[e]:t}:t)}))).every(Boolean),(o||i.isValid)&&m()):o=s=await x(r);return f.state.next({...!Gh(e)||(h.isValid||d.isValid)&&s!==i.isValid?{}:{name:e},...n.resolver||!e?{isValid:s}:{},errors:i.errors}),t.shouldFocus&&!o&&Td(r,O,e?a:l.mount),o},C=(e,t)=>{let n={...a.mount?o:s};return t&&(n=td(t.dirtyFields?i.dirtyFields:i.touchedFields,n)),gh(e)?n:Gh(e)?bh(n,e):e.map(e=>bh(n,e))},R=(e,t)=>({invalid:!!bh((t||i).errors,e),isDirty:!!bh((t||i).dirtyFields,e),error:bh((t||i).errors,e),isValidating:!!bh(i.validatingFields,e),isTouched:!!bh((t||i).touchedFields,e)}),M=(e,t,n)=>{const s=(bh(r,e,{_f:{}})._f||{}).ref,o=bh(i.errors,e)||{},{ref:a,message:l,type:u,...c}=o;Eh(i.errors,e,{...c,...t,ref:s}),f.state.next({name:e,errors:i.errors,isValid:!1}),n&&n.shouldFocus&&s&&s.focus&&s.focus()},L=e=>f.state.subscribe({next:t=>{var n,r,a;n=e.name,r=t.name,a=e.exact,n&&r&&n!==r&&!Qh(n).some(e=>e&&(a?e===r:e.startsWith(r)||r.startsWith(e)))||!((e,t,n,i)=>{n(e);const{name:r,...s}=e;return nd(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(e=>t[e]===(!i||Rh))})(t,e.formState||h,U,e.reRenderRoot)||e.callback({values:{...o},...i,...t,defaultValues:s})}}).unsubscribe,N=(e,t={})=>{for(const a of e?Qh(e):l.mount)l.mount.delete(a),l.array.delete(a),t.keepValue||(ld(r,a),ld(o,a)),!t.keepError&&ld(i.errors,a),!t.keepDirty&&ld(i.dirtyFields,a),!t.keepTouched&&ld(i.touchedFields,a),!t.keepIsValidating&&ld(i.validatingFields,a),!n.shouldUnregister&&!t.keepDefaultValue&&ld(s,a);f.state.next({values:mh(o)}),f.state.next({...i,...t.keepDirty?{isDirty:w()}:{}}),!t.keepIsValid&&m()},z=({disabled:e,name:t})=>{if(xh(e)&&a.mount||e||l.disabled.has(t)){const n=l.disabled.has(t)!==!!e;e?l.disabled.add(t):l.disabled.delete(t),n&&a.mount&&!a.action&&m()}},D=(e,t={})=>{let i=bh(r,e);const o=xh(t.disabled)||xh(n.disabled);return Eh(r,e,{...i||{},_f:{...i&&i._f?i._f:{ref:{name:e}},name:e,mount:!0,...t}}),l.mount.add(e),i?z({disabled:xh(t.disabled)?t.disabled:n.disabled,name:e}):g(e,!0,t.value),{...o?{disabled:t.disabled||n.disabled}:{},...n.progressive?{required:!!t.required,min:bd(t.min),max:bd(t.max),minLength:bd(t.minLength),maxLength:bd(t.maxLength),pattern:bd(t.pattern)}:{},name:e,onChange:k,onBlur:k,ref:o=>{if(o){D(e,t),i=bh(r,e);const n=gh(o.value)&&o.querySelectorAll&&o.querySelectorAll("input,select,textarea")[0]||o,a=(e=>od(e)||ah(e))(n),l=i._f.refs||[];if(a?l.find(e=>e===n):n===i._f.ref)return;Eh(r,e,{_f:{...i._f,...a?{refs:[...l.filter(ad),n,...Array.isArray(bh(s,e))?[{}]:[]],ref:{type:n.type,name:e}}:{ref:n}}}),g(e,!1,void 0,n)}else i=bh(r,e,{}),i._f&&(i._f.mount=!1),(n.shouldUnregister||t.shouldUnregister)&&(!fh(l.array,e)||!a.action)&&l.unMount.add(e)}}},I=()=>n.shouldFocusError&&Td(r,O,l.mount),F=(e,t)=>async s=>{let a;s&&(s.preventDefault&&s.preventDefault(),s.persist&&s.persist());let u=mh(o);if(f.state.next({isSubmitting:!0}),n.resolver){const{errors:e,values:t}=await b();_(),i.errors=e,u=mh(t)}else await x(r);if(l.disabled.size)for(const e of l.disabled)ld(u,e);if(ld(i.errors,"root"),nd(i.errors)){f.state.next({errors:{}});try{await e(u,s)}catch(e){a=e}}else t&&await t({...i.errors},s),I(),setTimeout(I);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:nd(i.errors)&&!a,submitCount:i.submitCount+1,errors:i.errors}),a)throw a},j=(e,t={})=>{const u=e?mh(e):s,c=mh(u),d=nd(e),p=d?s:c;if(t.keepDefaultValues||(s=u),!t.keepValues){if(t.keepDirtyValues){const e=new Set([...l.mount,...Object.keys(hd(s,o))]);for(const t of Array.from(e)){const e=bh(i.dirtyFields,t),n=bh(o,t),r=bh(p,t);e&&!gh(n)?Eh(p,t,n):e||gh(r)||S(t,r)}}else{if(ph&&gh(e))for(const e of l.mount){const t=bh(r,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(rd(e)){const t=e.closest("form");if(t){t.reset();break}}}}if(t.keepFieldsRef)for(const e of l.mount)S(e,bh(p,e));else r={}}o=n.shouldUnregister?t.keepDefaultValues?mh(s):{}:mh(p),f.array.next({values:{...p}}),f.state.next({values:{...p}})}l={mount:t.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!h.isValid||!!t.keepIsValid||!!t.keepDirtyValues||!n.shouldUnregister&&!nd(p),a.watch=!!n.shouldUnregister,a.keepIsValid=!!t.keepIsValid,a.action=!1,t.keepErrors||(i.errors={}),f.state.next({submitCount:t.keepSubmitCount?i.submitCount:0,isDirty:!d&&(t.keepDirty?i.isDirty:!(!t.keepDefaultValues||qh(e,s))),isSubmitted:!!t.keepIsSubmitted&&i.isSubmitted,dirtyFields:d?{}:t.keepDirtyValues?t.keepDefaultValues&&o?hd(s,o):i.dirtyFields:t.keepDefaultValues&&e?hd(s,e):t.keepDirty?i.dirtyFields:{},touchedFields:t.keepTouched?i.touchedFields:{},errors:t.keepErrors?i.errors:{},isSubmitSuccessful:!!t.keepIsSubmitSuccessful&&i.isSubmitSuccessful,isSubmitting:!1,defaultValues:s})},B=(e,t)=>j(wh(e)?e(o):e,{...n.resetOptions,...t}),U=e=>{i={...i,...e}},V={control:{register:D,unregister:N,getFieldState:R,handleSubmit:F,setError:M,_subscribe:L,_runSchema:b,_updateIsValidating:_,_focusError:I,_getWatch:E,_getDirty:w,_setValid:m,_setFieldArray:(e,t=[],l,u,c=!0,p=!0)=>{if(u&&l&&!n.disabled){if(a.action=!0,p&&Array.isArray(bh(r,e))){const t=l(bh(r,e),u.argA,u.argB);c&&Eh(r,e,t)}if(p&&Array.isArray(bh(i.errors,e))){const t=l(bh(i.errors,e),u.argA,u.argB);c&&Eh(i.errors,e,t),((e,t)=>{!yh(bh(e,t)).length&&ld(e,t)})(i.errors,e)}if((h.touchedFields||d.touchedFields)&&p&&Array.isArray(bh(i.touchedFields,e))){const t=l(bh(i.touchedFields,e),u.argA,u.argB);c&&Eh(i.touchedFields,e,t)}(h.dirtyFields||d.dirtyFields)&&(i.dirtyFields=hd(s,o)),f.state.next({name:e,isDirty:w(e,t),dirtyFields:i.dirtyFields,errors:i.errors,isValid:i.isValid})}else Eh(o,e,t)},_setDisabledField:z,_setErrors:e=>{i.errors=e,f.state.next({errors:i.errors,isValid:!1})},_getFieldArray:e=>yh(bh(a.mount?o:s,e,n.shouldUnregister?bh(s,e,[]):[])),_reset:j,_resetDefaultValues:()=>wh(n.defaultValues)&&n.defaultValues().then(e=>{B(e,n.resetOptions),f.state.next({isLoading:!1})}),_removeUnmounted:()=>{for(const e of l.unMount){const t=bh(r,e);t&&(t._f.refs?t._f.refs.every(e=>!ad(e)):!ad(t._f.ref))&&N(e)}l.unMount=new Set},_disableForm:e=>{xh(e)&&(f.state.next({disabled:e}),Td(r,(t,n)=>{const i=bh(r,n);i&&(t.disabled=i._f.disabled||e,Array.isArray(i._f.refs)&&i._f.refs.forEach(t=>{t.disabled=i._f.disabled||e}))},0,!1))},_subjects:f,_proxyFormState:h,get _fields(){return r},get _formValues(){return o},get _state(){return a},set _state(e){a=e},get _defaultValues(){return s},get _names(){return l},set _names(e){l=e},get _formState(){return i},get _options(){return n},set _options(e){n={...n,...e}}},subscribe:e=>(a.mount=!0,d={...d,...e.formState},L({...e,formState:{...c,...e.formState}})),trigger:P,register:D,handleSubmit:F,watch:(e,t)=>wh(e)?f.state.subscribe({next:n=>"values"in n&&e(E(void 0,t),n)}):E(e,t,!0),setValue:S,getValues:C,reset:B,resetField:(e,t={})=>{bh(r,e)&&(gh(t.defaultValue)?S(e,mh(bh(s,e))):(S(e,t.defaultValue),Eh(s,e,mh(t.defaultValue))),t.keepTouched||ld(i.touchedFields,e),t.keepDirty||(ld(i.dirtyFields,e),i.isDirty=t.defaultValue?w(e,mh(bh(s,e))):w()),t.keepError||(ld(i.errors,e),h.isValid&&m()),f.state.next({...i}))},clearErrors:e=>{e&&Qh(e).forEach(e=>ld(i.errors,e)),f.state.next({errors:e?i.errors:{}})},unregister:N,setError:M,setFocus:(e,t={})=>{const n=bh(r,e),i=n&&n._f;if(i){const e=i.refs?i.refs[0]:i.ref;e.focus&&setTimeout(()=>{e.focus(),t.shouldSelect&&wh(e.select)&&e.select()})}},getFieldState:R};return{...V,formControl:V}}const Ld=({sx:e,...t})=>H(fe,{variant:"body1",sx:{color:"var(--color-white)",cursor:"default",...e},...t}),Nd=te(he)({padding:0,marginRight:"5px",marginLeft:"10px","& .MuiSvgIcon-root":{color:"var(--color-orange-medium)"}});function zd({label:e,name:t,...n}){const i=T.useId(),{control:r,setValue:s,watch:o}=Yh(),a=o(t),l=`${i}-${t}-${String(a)}`;return H(Hh,{control:r,name:t,render:({field:t})=>{const{value:i,name:r}=t;return e?H(de,{color:"white",control:H(Nd,{...n,checked:i,onChange:(e,t)=>{s(r,t,{shouldValidate:!0})}}),label:H(Ld,{children:e})}):H(Nd,{...n,checked:i,onChange:(e,t)=>{s(r,t,{shouldValidate:!0})}})}},l)}var Dd=function(e){var t=e.as,n=e.errors,i=e.name,r=e.message,s=e.render,o=function(e,t){if(null==e)return{};var n,i,r={},s=Object.keys(e);for(i=0;i<s.length;i++)t.indexOf(n=s[i])>=0||(r[n]=e[n]);return r}(e,["as","errors","name","message","render"]),a=Yh(),l=bh(n||a.formState.errors,i);if(!l)return null;var u=l.message,c=l.types,h=Object.assign({},o,{children:u||r});return T.isValidElement(t)?T.cloneElement(t,h):s?s({message:u||r,messages:c}):T.createElement(t||T.Fragment,h)};function Id({name:t}){const{palette:n}=e(),{formState:{errors:i}}=Yh();return H(Dd,{errors:i,name:t,render:({message:e})=>H(Ld,{variant:"body2",style:{color:n.error.main},children:e})})}function Fd({form:e,sx:t={},onSubmit:n,children:i}){const{handleSubmit:s}=e;return H(Xh,{...e,children:H(r,{component:"form",sx:{display:"grid",gap:"15px",...t},onSubmit:s(n),children:i})})}const jd=()=>Yh(),Bd=e=>H(v,{size:"small",...e});function Ud({name:e,...t}){const{control:n}=Yh(),i=T.useId();return H(Hh,{control:n,name:e,render:({field:n})=>K(r,{sx:({spacing:e})=>({display:"grid",width:"100%",gap:e(1)}),children:[H(pe,{...t,...n,id:i,slots:{field:Bd}}),H(Id,{name:e})]})})}const Vd=({text:e="Нет данных"})=>H(i,{variant:"body2",sx:{textAlign:"center",color:"var(--gray-light-color)"},children:e});function Gd({items:e,columnsCount:t=1,getContent:n,title:s,getKey:o,onClick:a,onClear:l,sx:u,isShowNoData:c=!0}){const h=0===e.length;return K(r,{sx:({spacing:e,breakpoints:t})=>({display:"grid",gridTemplateColumns:"1fr",gap:e(2),...u?.root,[t.down("sm")]:{gap:e(1)}}),children:[s||l?K(r,{sx:({spacing:e})=>({display:"flex",alignItems:"center",gap:e(1)}),children:[s?H(i,{variant:"h6",noWrap:!0,sx:{textAlign:"center",fontWeight:700,...u?.title},children:s}):null,l?H(eh,{iconProps:{name:"clear",color:"warning"},onClick:l}):null]}):null,h?H(T.Fragment,{children:c?H(Vd,{}):null}):H(b,{sx:({spacing:e,breakpoints:n})=>({display:"grid",gridTemplateColumns:`repeat(${t}, 1fr)`,gap:e(2),...u?.list,[n.down("sm")]:{gap:e(1)}}),disablePadding:!0,children:e.map((e,t)=>H(x,{onClick:()=>a?.(e,t),sx:()=>({...u?.item}),disablePadding:!0,children:n(e,t)},o(e,t)))})]})}const $d="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function Zd(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function qd(e){return"nodeType"in e}function Wd(e){var t,n;return e?Zd(e)?e:qd(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function Hd(e){const{Document:t}=Wd(e);return e instanceof t}function Kd(e){return!Zd(e)&&e instanceof Wd(e).HTMLElement}function Yd(e){return e instanceof Wd(e).SVGElement}function Xd(e){return e?Zd(e)?e.document:qd(e)?Hd(e)?e:Kd(e)||Yd(e)?e.ownerDocument:document:document:document}const Jd=$d?z:C;function Qd(e){const t=O(e);return Jd(()=>{t.current=e}),P(function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return null==t.current?void 0:t.current(...n)},[])}function ef(e,t){void 0===t&&(t=[e]);const n=O(e);return Jd(()=>{n.current!==e&&(n.current=e)},t),n}function tf(e,t){const n=O();return N(()=>{const t=e(n.current);return n.current=t,t},[...t])}function nf(e){const t=Qd(e),n=O(null),i=P(e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e},[]);return[n,i]}function rf(e){const t=O();return C(()=>{t.current=e},[e]),t.current}let sf={};function of(e,t){return N(()=>{if(t)return t;const n=null==sf[e]?0:sf[e]+1;return sf[e]=n,e+"-"+n},[e,t])}function af(e){return function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return i.reduce((t,n)=>{const i=Object.entries(n);for(const[n,r]of i){const i=t[n];null!=i&&(t[n]=i+e*r)}return t},{...t})}}const lf=af(1),uf=af(-1);function cf(e){if(!e)return!1;const{KeyboardEvent:t}=Wd(e.target);return t&&e instanceof t}function hf(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=Wd(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const df=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[df.Translate.toString(e),df.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:i}=e;return t+" "+n+"ms "+i}}}),ff="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function pf(e){return e.matches(ff)?e:e.querySelector(ff)}const mf={display:"none"};function _f(e){let{id:t,value:n}=e;return S.createElement("div",{id:t,style:mf},n)}function gf(e){let{id:t,announcement:n,ariaLiveType:i="assertive"}=e;return S.createElement("div",{id:t,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":i,"aria-atomic":!0},n)}const yf=U(null);const vf={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},bf={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function xf(e){let{announcements:t=bf,container:n,hiddenTextDescribedById:i,screenReaderInstructions:r=vf}=e;const{announce:s,announcement:o}=function(){const[e,t]=B("");return{announce:P(e=>{null!=e&&t(e)},[]),announcement:e}}(),a=of("DndLiveRegion"),[l,u]=B(!1);if(C(()=>{u(!0)},[]),function(e){const t=I(yf);C(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}(N(()=>({onDragStart(e){let{active:n}=e;s(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:i}=e;t.onDragMove&&s(t.onDragMove({active:n,over:i}))},onDragOver(e){let{active:n,over:i}=e;s(t.onDragOver({active:n,over:i}))},onDragEnd(e){let{active:n,over:i}=e;s(t.onDragEnd({active:n,over:i}))},onDragCancel(e){let{active:n,over:i}=e;s(t.onDragCancel({active:n,over:i}))}}),[s,t])),!l)return null;const c=S.createElement(S.Fragment,null,S.createElement(_f,{id:i,value:r.draggable}),S.createElement(gf,{id:a,announcement:o}));return n?q(c,n):c}var wf;function Ef(){}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(wf||(wf={}));const Af=Object.freeze({x:0,y:0});function Tf(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Sf(e,t){let{data:{value:n}}=e,{data:{value:i}}=t;return n-i}function kf(e,t){let{data:{value:n}}=e,{data:{value:i}}=t;return i-n}function Of(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const Pf=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:i}=e;const r=Of(t,t.left,t.top),s=[];for(const e of i){const{id:t}=e,i=n.get(t);if(i){const n=Tf(Of(i),r);s.push({id:t,data:{droppableContainer:e,value:n}})}}return s.sort(Sf)};function Cf(e,t){const n=Math.max(t.top,e.top),i=Math.max(t.left,e.left),r=Math.min(t.left+t.width,e.left+e.width),s=Math.min(t.top+t.height,e.top+e.height),o=r-i,a=s-n;if(i<r&&n<s){const n=t.width*t.height,i=e.width*e.height,r=o*a;return Number((r/(n+i-r)).toFixed(4))}return 0}const Rf=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:i}=e;const r=[];for(const e of i){const{id:i}=e,s=n.get(i);if(s){const n=Cf(s,t);n>0&&r.push({id:i,data:{droppableContainer:e,value:n}})}}return r.sort(kf)};function Mf(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Af}function Lf(e){return function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return i.reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}const Nf=Lf(1);const zf={ignoreTransform:!1};function Df(e,t){void 0===t&&(t=zf);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:i}=Wd(e).getComputedStyle(e);t&&(n=function(e,t,n){const i=function(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(t);if(!i)return e;const{scaleX:r,scaleY:s,x:o,y:a}=i,l=e.left-o-(1-r)*parseFloat(n),u=e.top-a-(1-s)*parseFloat(n.slice(n.indexOf(" ")+1)),c=r?e.width/r:e.width,h=s?e.height/s:e.height;return{width:c,height:h,top:u,right:l+c,bottom:u+h,left:l}}(n,t,i))}const{top:i,left:r,width:s,height:o,bottom:a,right:l}=n;return{top:i,left:r,width:s,height:o,bottom:a,right:l}}function If(e){return Df(e,{ignoreTransform:!0})}function Ff(e,t){const n=[];return e?function i(r){if(null!=t&&n.length>=t)return n;if(!r)return n;if(Hd(r)&&null!=r.scrollingElement&&!n.includes(r.scrollingElement))return n.push(r.scrollingElement),n;if(!Kd(r)||Yd(r))return n;if(n.includes(r))return n;const s=Wd(e).getComputedStyle(r);return r!==e&&function(e,t){void 0===t&&(t=Wd(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const i=t[e];return"string"==typeof i&&n.test(i)})}(r,s)&&n.push(r),function(e,t){return void 0===t&&(t=Wd(e).getComputedStyle(e)),"fixed"===t.position}(r,s)?n:i(r.parentNode)}(e):n}function jf(e){const[t]=Ff(e,1);return null!=t?t:null}function Bf(e){return $d&&e?Zd(e)?e:qd(e)?Hd(e)||e===Xd(e).scrollingElement?window:Kd(e)?e:null:null:null}function Uf(e){return Zd(e)?e.scrollX:e.scrollLeft}function Vf(e){return Zd(e)?e.scrollY:e.scrollTop}function Gf(e){return{x:Uf(e),y:Vf(e)}}var $f;function Zf(e){return!(!$d||!e)&&e===document.scrollingElement}function qf(e){const t={x:0,y:0},n=Zf(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},i={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=i.y,isRight:e.scrollLeft>=i.x,maxScroll:i,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}($f||($f={}));const Wf={x:.2,y:.2};function Hf(e,t,n,i,r){let{top:s,left:o,right:a,bottom:l}=n;void 0===i&&(i=10),void 0===r&&(r=Wf);const{isTop:u,isBottom:c,isLeft:h,isRight:d}=qf(e),f={x:0,y:0},p={x:0,y:0},m=t.height*r.y,_=t.width*r.x;return!u&&s<=t.top+m?(f.y=$f.Backward,p.y=i*Math.abs((t.top+m-s)/m)):!c&&l>=t.bottom-m&&(f.y=$f.Forward,p.y=i*Math.abs((t.bottom-m-l)/m)),!d&&a>=t.right-_?(f.x=$f.Forward,p.x=i*Math.abs((t.right-_-a)/_)):!h&&o<=t.left+_&&(f.x=$f.Backward,p.x=i*Math.abs((t.left+_-o)/_)),{direction:f,speed:p}}function Kf(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:i,bottom:r}=e.getBoundingClientRect();return{top:t,left:n,right:i,bottom:r,width:e.clientWidth,height:e.clientHeight}}function Yf(e){return e.reduce((e,t)=>lf(e,Gf(t)),Af)}const Xf=[["x",["left","right"],function(e){return e.reduce((e,t)=>e+Uf(t),0)}],["y",["top","bottom"],function(e){return e.reduce((e,t)=>e+Vf(t),0)}]];class Jf{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=Ff(t),i=Yf(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,r]of Xf)for(const s of t)Object.defineProperty(this,s,{get:()=>{const t=r(n),o=i[e]-t;return this.rect[s]+o},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Qf{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)})},this.target=e}add(e,t,n){var i;null==(i=this.target)||i.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function ep(e,t){const n=Math.abs(e.x),i=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+i**2)>t:"x"in t&&"y"in t?n>t.x&&i>t.y:"x"in t?n>t.x:"y"in t&&i>t.y}var tp,np;function ip(e){e.preventDefault()}function rp(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(tp||(tp={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"}(np||(np={}));const sp={start:[np.Space,np.Enter],cancel:[np.Esc],end:[np.Space,np.Enter,np.Tab]},op=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case np.Right:return{...n,x:n.x+25};case np.Left:return{...n,x:n.x-25};case np.Down:return{...n,y:n.y+25};case np.Up:return{...n,y:n.y-25}}};class ap{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new Qf(Xd(t)),this.windowListeners=new Qf(Wd(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(tp.Resize,this.handleCancel),this.windowListeners.add(tp.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(tp.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&function(e,t){if(void 0===t&&(t=Df),!e)return;const{top:n,left:i,bottom:r,right:s}=t(e);jf(e)&&(r<=0||s<=0||n>=window.innerHeight||i>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(n),t(Af)}handleKeyDown(e){if(cf(e)){const{active:t,context:n,options:i}=this.props,{keyboardCodes:r=sp,coordinateGetter:s=op,scrollBehavior:o="smooth"}=i,{code:a}=e;if(r.end.includes(a))return void this.handleEnd(e);if(r.cancel.includes(a))return void this.handleCancel(e);const{collisionRect:l}=n.current,u=l?{x:l.left,y:l.top}:Af;this.referenceCoordinates||(this.referenceCoordinates=u);const c=s(e,{active:t,context:n.current,currentCoordinates:u});if(c){const t=uf(c,u),i={x:0,y:0},{scrollableAncestors:r}=n.current;for(const n of r){const r=e.code,{isTop:s,isRight:a,isLeft:l,isBottom:u,maxScroll:h,minScroll:d}=qf(n),f=Kf(n),p={x:Math.min(r===np.Right?f.right-f.width/2:f.right,Math.max(r===np.Right?f.left:f.left+f.width/2,c.x)),y:Math.min(r===np.Down?f.bottom-f.height/2:f.bottom,Math.max(r===np.Down?f.top:f.top+f.height/2,c.y))},m=r===np.Right&&!a||r===np.Left&&!l,_=r===np.Down&&!u||r===np.Up&&!s;if(m&&p.x!==c.x){const e=n.scrollLeft+t.x,s=r===np.Right&&e<=h.x||r===np.Left&&e>=d.x;if(s&&!t.y)return void n.scrollTo({left:e,behavior:o});i.x=s?n.scrollLeft-e:r===np.Right?n.scrollLeft-h.x:n.scrollLeft-d.x,i.x&&n.scrollBy({left:-i.x,behavior:o});break}if(_&&p.y!==c.y){const e=n.scrollTop+t.y,s=r===np.Down&&e<=h.y||r===np.Up&&e>=d.y;if(s&&!t.x)return void n.scrollTo({top:e,behavior:o});i.y=s?n.scrollTop-e:r===np.Down?n.scrollTop-h.y:n.scrollTop-d.y,i.y&&n.scrollBy({top:-i.y,behavior:o});break}}this.handleMove(e,lf(uf(c,this.referenceCoordinates),i))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function lp(e){return Boolean(e&&"distance"in e)}function up(e){return Boolean(e&&"delay"in e)}ap.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:i=sp,onActivation:r}=t,{active:s}=n;const{code:o}=e.nativeEvent;if(i.start.includes(o)){const t=s.activatorNode.current;return(!t||e.target===t)&&(e.preventDefault(),null==r||r({event:e.nativeEvent}),!0)}return!1}}];class cp{constructor(e,t,n){var i;void 0===n&&(n=function(e){const{EventTarget:t}=Wd(e);return e instanceof t?e:Xd(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:r}=e,{target:s}=r;this.props=e,this.events=t,this.document=Xd(s),this.documentListeners=new Qf(this.document),this.listeners=new Qf(n),this.windowListeners=new Qf(Wd(s)),this.initialCoordinates=null!=(i=hf(r))?i:Af,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(tp.Resize,this.handleCancel),this.windowListeners.add(tp.DragStart,ip),this.windowListeners.add(tp.VisibilityChange,this.handleCancel),this.windowListeners.add(tp.ContextMenu,ip),this.documentListeners.add(tp.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(up(t))return this.timeoutId=setTimeout(this.handleStart,t.delay),void this.handlePending(t);if(lp(t))return void this.handlePending(t)}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){const{active:n,onPending:i}=this.props;i(n,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(tp.Click,rp,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(tp.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:i,props:r}=this,{onMove:s,options:{activationConstraint:o}}=r;if(!i)return;const a=null!=(t=hf(e))?t:Af,l=uf(i,a);if(!n&&o){if(lp(o)){if(null!=o.tolerance&&ep(l,o.tolerance))return this.handleCancel();if(ep(l,o.distance))return this.handleStart()}return up(o)&&ep(l,o.tolerance)?this.handleCancel():void this.handlePending(o,l)}e.cancelable&&e.preventDefault(),s(a)}handleEnd(){const{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){const{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===np.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const hp={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class dp extends cp{constructor(e){const{event:t}=e,n=Xd(t.target);super(e,hp,n)}}dp.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;return!(!n.isPrimary||0!==n.button)&&(null==i||i({event:n}),!0)}}];const fp={move:{name:"mousemove"},end:{name:"mouseup"}};var pp;!function(e){e[e.RightClick=2]="RightClick"}(pp||(pp={}));(class extends cp{constructor(e){super(e,fp,Xd(e.event.target))}}).activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;return n.button!==pp.RightClick&&(null==i||i({event:n}),!0)}}];const mp={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};var _p,gp;function yp(e){let{acceleration:t,activator:n=_p.Pointer,canScroll:i,draggingRect:r,enabled:s,interval:o=5,order:a=gp.TreeOrder,pointerCoordinates:l,scrollableAncestors:u,scrollableAncestorRects:c,delta:h,threshold:d}=e;const f=function(e){let{delta:t,disabled:n}=e;const i=rf(t);return tf(e=>{if(n||!i||!e)return vp;const r={x:Math.sign(t.x-i.x),y:Math.sign(t.y-i.y)};return{x:{[$f.Backward]:e.x[$f.Backward]||-1===r.x,[$f.Forward]:e.x[$f.Forward]||1===r.x},y:{[$f.Backward]:e.y[$f.Backward]||-1===r.y,[$f.Forward]:e.y[$f.Forward]||1===r.y}}},[n,t,i])}({delta:h,disabled:!s}),[p,m]=function(){const e=O(null);return[P((t,n)=>{e.current=setInterval(t,n)},[]),P(()=>{null!==e.current&&(clearInterval(e.current),e.current=null)},[])]}(),_=O({x:0,y:0}),g=O({x:0,y:0}),y=N(()=>{switch(n){case _p.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case _p.DraggableRect:return r}},[n,r,l]),v=O(null),b=P(()=>{const e=v.current;if(!e)return;const t=_.current.x*g.current.x,n=_.current.y*g.current.y;e.scrollBy(t,n)},[]),x=N(()=>a===gp.TreeOrder?[...u].reverse():u,[a,u]);C(()=>{if(s&&u.length&&y){for(const e of x){if(!1===(null==i?void 0:i(e)))continue;const n=u.indexOf(e),r=c[n];if(!r)continue;const{direction:s,speed:a}=Hf(e,r,y,t,d);for(const e of["x","y"])f[e][s[e]]||(a[e]=0,s[e]=0);if(a.x>0||a.y>0)return m(),v.current=e,p(b,o),_.current=a,void(g.current=s)}_.current={x:0,y:0},g.current={x:0,y:0},m()}else m()},[t,b,i,m,s,o,JSON.stringify(y),JSON.stringify(f),p,u,x,c,JSON.stringify(d)])}(class extends cp{constructor(e){super(e,mp)}static setup(){return window.addEventListener(mp.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(mp.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;const{touches:r}=n;return!(r.length>1)&&(null==i||i({event:n}),!0)}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(_p||(_p={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(gp||(gp={}));const vp={x:{[$f.Backward]:!1,[$f.Forward]:!1},y:{[$f.Backward]:!1,[$f.Forward]:!1}};var bp,xp;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(bp||(bp={})),function(e){e.Optimized="optimized"}(xp||(xp={}));const wp=new Map;function Ep(e,t){return tf(n=>e?n||("function"==typeof t?t(e):e):null,[t,e])}function Ap(e){let{callback:t,disabled:n}=e;const i=Qd(t),r=N(()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(i)},[n]);return C(()=>()=>null==r?void 0:r.disconnect(),[r]),r}function Tp(e){return new Jf(Df(e),e)}function Sp(e,t,n){void 0===t&&(t=Tp);const[i,r]=B(null);function s(){r(i=>{if(!e)return null;var r;if(!1===e.isConnected)return null!=(r=null!=i?i:n)?r:null;const s=t(e);return JSON.stringify(i)===JSON.stringify(s)?i:s})}const o=function(e){let{callback:t,disabled:n}=e;const i=Qd(t),r=N(()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(i)},[i,n]);return C(()=>()=>null==r?void 0:r.disconnect(),[r]),r}({callback(t){if(e)for(const n of t){const{type:t,target:i}=n;if("childList"===t&&i instanceof HTMLElement&&i.contains(e)){s();break}}}}),a=Ap({callback:s});return Jd(()=>{s(),e?(null==a||a.observe(e),null==o||o.observe(document.body,{childList:!0,subtree:!0})):(null==a||a.disconnect(),null==o||o.disconnect())},[e]),i}const kp=[];function Op(e,t){void 0===t&&(t=[]);const n=O(null);return C(()=>{n.current=null},t),C(()=>{const t=e!==Af;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?uf(e,n.current):Af}function Pp(e){return N(()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null,[e])}const Cp=[];function Rp(e){let{measure:t}=e;const[n,i]=B(null),r=P(e=>{for(const{target:n}of e)if(Kd(n)){i(e=>{const i=t(n);return e?{...e,width:i.width,height:i.height}:i});break}},[t]),s=Ap({callback:r}),o=P(e=>{const n=function(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Kd(t)?t:e}(e);null==s||s.disconnect(),n&&(null==s||s.observe(n)),i(n?t(n):null)},[t,s]),[a,l]=nf(o);return N(()=>({nodeRef:a,rect:n,setRef:l}),[n,a,l])}const Mp=[{sensor:dp,options:{}},{sensor:ap,options:{}}],Lp={current:{}},Np={draggable:{measure:If},droppable:{measure:If,strategy:bp.WhileDragging,frequency:xp.Optimized},dragOverlay:{measure:Df}};class zp extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const Dp={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new zp,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Ef},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Np,measureDroppableContainers:Ef,windowRect:null,measuringScheduled:!1},Ip=U({activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Ef,draggableNodes:new Map,over:null,measureDroppableContainers:Ef}),Fp=U(Dp);function jp(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new zp}}}function Bp(e,t){switch(t.type){case wf.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case wf.DragMove:return null==e.draggable.active?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case wf.DragEnd:case wf.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case wf.RegisterDroppable:{const{element:n}=t,{id:i}=n,r=new zp(e.droppable.containers);return r.set(i,n),{...e,droppable:{...e.droppable,containers:r}}}case wf.SetDroppableDisabled:{const{id:n,key:i,disabled:r}=t,s=e.droppable.containers.get(n);if(!s||i!==s.key)return e;const o=new zp(e.droppable.containers);return o.set(n,{...s,disabled:r}),{...e,droppable:{...e.droppable,containers:o}}}case wf.UnregisterDroppable:{const{id:n,key:i}=t,r=e.droppable.containers.get(n);if(!r||i!==r.key)return e;const s=new zp(e.droppable.containers);return s.delete(n),{...e,droppable:{...e.droppable,containers:s}}}default:return e}}function Up(e){let{disabled:t}=e;const{active:n,activatorEvent:i,draggableNodes:r}=I(Ip),s=rf(i),o=rf(null==n?void 0:n.id);return C(()=>{if(!t&&!i&&s&&null!=o){if(!cf(s))return;if(document.activeElement===s.target)return;const e=r.get(o);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=pf(e);if(t){t.focus();break}}})}},[i,t,r,o,s]),null}const Vp=U({...Af,scaleX:1,scaleY:1});var Gp;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(Gp||(Gp={}));const $p=j(function(e){var t,n,i,r;let{id:s,accessibility:o,autoScroll:a=!0,children:l,sensors:u=Mp,collisionDetection:c=Rf,measuring:h,modifiers:d,...f}=e;const p=V(Bp,void 0,jp),[m,_]=p,[g,y]=function(){const[e]=B(()=>new Set),t=P(t=>(e.add(t),()=>e.delete(t)),[e]);return[P(t=>{let{type:n,event:i}=t;e.forEach(e=>{var t;return null==(t=e[n])?void 0:t.call(e,i)})},[e]),t]}(),[v,b]=B(Gp.Uninitialized),x=v===Gp.Initialized,{draggable:{active:w,nodes:E,translate:A},droppable:{containers:T}}=m,k=null!=w?E.get(w):null,R=O({initial:null,translated:null}),M=N(()=>{var e;return null!=w?{id:w,data:null!=(e=null==k?void 0:k.data)?e:Lp,rect:R}:null},[w,k]),L=O(null),[z,D]=B(null),[I,F]=B(null),j=ef(f,Object.values(f)),U=of("DndDescribedBy",s),G=N(()=>T.getEnabled(),[T]),$=N(()=>({draggable:{...Np.draggable,...null==Z?void 0:Z.draggable},droppable:{...Np.droppable,...null==Z?void 0:Z.droppable},dragOverlay:{...Np.dragOverlay,...null==Z?void 0:Z.dragOverlay}}),[null==(Z=h)?void 0:Z.draggable,null==Z?void 0:Z.droppable,null==Z?void 0:Z.dragOverlay]);var Z;const{droppableRects:q,measureDroppableContainers:H,measuringScheduled:K}=function(e,t){let{dragging:n,dependencies:i,config:r}=t;const[s,o]=B(null),{frequency:a,measure:l,strategy:u}=r,c=O(e),h=function(){switch(u){case bp.Always:return!1;case bp.BeforeDragging:return n;default:return!n}}(),d=ef(h),f=P(function(e){void 0===e&&(e=[]),d.current||o(t=>null===t?e:t.concat(e.filter(e=>!t.includes(e))))},[d]),p=O(null),m=tf(t=>{if(h&&!n)return wp;if(!t||t===wp||c.current!==e||null!=s){const t=new Map;for(let n of e){if(!n)continue;if(s&&s.length>0&&!s.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,i=e?new Jf(l(e),e):null;n.rect.current=i,i&&t.set(n.id,i)}return t}return t},[e,s,n,h,l]);return C(()=>{c.current=e},[e]),C(()=>{h||f()},[n,h]),C(()=>{s&&s.length>0&&o(null)},[JSON.stringify(s)]),C(()=>{h||"number"!=typeof a||null!==p.current||(p.current=setTimeout(()=>{f(),p.current=null},a))},[a,h,f,...i]),{droppableRects:m,measureDroppableContainers:f,measuringScheduled:null!=s}}(G,{dragging:x,dependencies:[A.x,A.y],config:$.droppable}),Y=function(e,t){const n=null!=t?e.get(t):void 0,i=n?n.node.current:null;return tf(e=>{var n;return null==t?null:null!=(n=null!=i?i:e)?n:null},[i,t])}(E,w),X=N(()=>I?hf(I):null,[I]),J=function(){const e=!1===(null==z?void 0:z.autoScrollEnabled),t="object"==typeof a?!1===a.enabled:!1===a,n=x&&!e&&!t;if("object"==typeof a)return{...a,enabled:n};return{enabled:n}}(),Q=function(e,t){return Ep(e,t)}(Y,$.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:i,config:r=!0}=e;const s=O(!1),{x:o,y:a}="boolean"==typeof r?{x:r,y:r}:r;Jd(()=>{if(!o&&!a||!t)return void(s.current=!1);if(s.current||!i)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const r=Mf(n(e),i);if(o||(r.x=0),a||(r.y=0),s.current=!0,Math.abs(r.x)>0||Math.abs(r.y)>0){const t=jf(e);t&&t.scrollBy({top:r.y,left:r.x})}},[t,o,a,i,n])}({activeNode:null!=w?E.get(w):null,config:J.layoutShiftCompensation,initialRect:Q,measure:$.draggable.measure});const ee=Sp(Y,$.draggable.measure,Q),te=Sp(Y?Y.parentElement:null),ne=O({activatorEvent:null,active:null,activeNode:Y,collisionRect:null,collisions:null,droppableRects:q,draggableNodes:E,draggingNode:null,draggingNodeRect:null,droppableContainers:T,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ie=T.getNodeFor(null==(t=ne.current.over)?void 0:t.id),re=Rp({measure:$.dragOverlay.measure}),se=null!=(n=re.nodeRef.current)?n:Y,oe=x?null!=(i=re.rect)?i:ee:null,ae=Boolean(re.nodeRef.current&&re.rect),le=Mf(ue=ae?null:ee,Ep(ue));var ue;const ce=Pp(se?Wd(se):null),he=function(e){const t=O(e),n=tf(n=>e?n&&n!==kp&&e&&t.current&&e.parentNode===t.current.parentNode?n:Ff(e):kp,[e]);return C(()=>{t.current=e},[e]),n}(x?null!=ie?ie:Y:null),de=function(e,t){void 0===t&&(t=Df);const[n]=e,i=Pp(n?Wd(n):null),[r,s]=B(Cp);function o(){s(()=>e.length?e.map(e=>Zf(e)?i:new Jf(t(e),e)):Cp)}const a=Ap({callback:o});return Jd(()=>{null==a||a.disconnect(),o(),e.forEach(e=>null==a?void 0:a.observe(e))},[e]),r}(he),fe=function(e,t){let{transform:n,...i}=t;return null!=e&&e.length?e.reduce((e,t)=>t({transform:e,...i}),n):n}(d,{transform:{x:A.x-le.x,y:A.y-le.y,scaleX:1,scaleY:1},activatorEvent:I,active:M,activeNodeRect:ee,containerNodeRect:te,draggingNodeRect:oe,over:ne.current.over,overlayNodeRect:re.rect,scrollableAncestors:he,scrollableAncestorRects:de,windowRect:ce}),pe=X?lf(X,A):null,me=function(e){const[t,n]=B(null),i=O(e),r=P(e=>{const t=Bf(e.target);t&&n(e=>e?(e.set(t,Gf(t)),new Map(e)):null)},[]);return C(()=>{const t=i.current;if(e!==t){s(t);const o=e.map(e=>{const t=Bf(e);return t?(t.addEventListener("scroll",r,{passive:!0}),[t,Gf(t)]):null}).filter(e=>null!=e);n(o.length?new Map(o):null),i.current=e}return()=>{s(e),s(t)};function s(e){e.forEach(e=>{const t=Bf(e);null==t||t.removeEventListener("scroll",r)})}},[r,e]),N(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>lf(e,t),Af):Yf(e):Af,[e,t])}(he),_e=Op(me),ge=Op(me,[ee]),ye=lf(fe,_e),ve=oe?Nf(oe,fe):null,be=M&&ve?c({active:M,collisionRect:ve,droppableRects:q,droppableContainers:G,pointerCoordinates:pe}):null,xe=function(e,t){if(!e||0===e.length)return null;const[n]=e;return n[t]}(be,"id"),[we,Ee]=B(null),Ae=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(ae?fe:lf(fe,ge),null!=(r=null==we?void 0:we.rect)?r:null,ee),Te=O(null),Se=P((e,t)=>{let{sensor:n,options:i}=t;if(null==L.current)return;const r=E.get(L.current);if(!r)return;const s=e.nativeEvent,o=new n({active:L.current,activeNode:r,event:s,options:i,context:ne,onAbort(e){if(!E.get(e))return;const{onDragAbort:t}=j.current,n={id:e};null==t||t(n),g({type:"onDragAbort",event:n})},onPending(e,t,n,i){if(!E.get(e))return;const{onDragPending:r}=j.current,s={id:e,constraint:t,initialCoordinates:n,offset:i};null==r||r(s),g({type:"onDragPending",event:s})},onStart(e){const t=L.current;if(null==t)return;const n=E.get(t);if(!n)return;const{onDragStart:i}=j.current,r={activatorEvent:s,active:{id:t,data:n.data,rect:R}};W(()=>{null==i||i(r),b(Gp.Initializing),_({type:wf.DragStart,initialCoordinates:e,active:t}),g({type:"onDragStart",event:r}),D(Te.current),F(s)})},onMove(e){_({type:wf.DragMove,coordinates:e})},onEnd:a(wf.DragEnd),onCancel:a(wf.DragCancel)});function a(e){return async function(){const{active:t,collisions:n,over:i,scrollAdjustedTranslate:r}=ne.current;let o=null;if(t&&r){const{cancelDrop:a}=j.current;if(o={activatorEvent:s,active:t,collisions:n,delta:r,over:i},e===wf.DragEnd&&"function"==typeof a){await Promise.resolve(a(o))&&(e=wf.DragCancel)}}L.current=null,W(()=>{_({type:e}),b(Gp.Uninitialized),Ee(null),D(null),F(null),Te.current=null;const t=e===wf.DragEnd?"onDragEnd":"onDragCancel";if(o){const e=j.current[t];null==e||e(o),g({type:t,event:o})}})}}Te.current=o},[E]),ke=P((e,t)=>(n,i)=>{const r=n.nativeEvent,s=E.get(i);if(null!==L.current||!s||r.dndKit||r.defaultPrevented)return;const o={active:s};!0===e(n,t.options,o)&&(r.dndKit={capturedBy:t.sensor},L.current=i,Se(n,t))},[E,Se]),Oe=function(e,t){return N(()=>e.reduce((e,n)=>{const{sensor:i}=n;return[...e,...i.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}))]},[]),[e,t])}(u,ke);!function(e){C(()=>{if(!$d)return;const t=e.map(e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()});return()=>{for(const e of t)null==e||e()}},e.map(e=>{let{sensor:t}=e;return t}))}(u),Jd(()=>{ee&&v===Gp.Initializing&&b(Gp.Initialized)},[ee,v]),C(()=>{const{onDragMove:e}=j.current,{active:t,activatorEvent:n,collisions:i,over:r}=ne.current;if(!t||!n)return;const s={active:t,activatorEvent:n,collisions:i,delta:{x:ye.x,y:ye.y},over:r};W(()=>{null==e||e(s),g({type:"onDragMove",event:s})})},[ye.x,ye.y]),C(()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:i,scrollAdjustedTranslate:r}=ne.current;if(!e||null==L.current||!t||!r)return;const{onDragOver:s}=j.current,o=i.get(xe),a=o&&o.rect.current?{id:o.id,rect:o.rect.current,data:o.data,disabled:o.disabled}:null,l={active:e,activatorEvent:t,collisions:n,delta:{x:r.x,y:r.y},over:a};W(()=>{Ee(a),null==s||s(l),g({type:"onDragOver",event:l})})},[xe]),Jd(()=>{ne.current={activatorEvent:I,active:M,activeNode:Y,collisionRect:ve,collisions:be,droppableRects:q,draggableNodes:E,draggingNode:se,draggingNodeRect:oe,droppableContainers:T,over:we,scrollableAncestors:he,scrollAdjustedTranslate:ye},R.current={initial:oe,translated:ve}},[M,Y,be,ve,E,se,oe,q,T,we,he,ye]),yp({...J,delta:A,draggingRect:ve,pointerCoordinates:pe,scrollableAncestors:he,scrollableAncestorRects:de});const Pe=N(()=>({active:M,activeNode:Y,activeNodeRect:ee,activatorEvent:I,collisions:be,containerNodeRect:te,dragOverlay:re,draggableNodes:E,droppableContainers:T,droppableRects:q,over:we,measureDroppableContainers:H,scrollableAncestors:he,scrollableAncestorRects:de,measuringConfiguration:$,measuringScheduled:K,windowRect:ce}),[M,Y,ee,I,be,te,re,E,T,q,we,H,he,de,$,K,ce]),Ce=N(()=>({activatorEvent:I,activators:Oe,active:M,activeNodeRect:ee,ariaDescribedById:{draggable:U},dispatch:_,draggableNodes:E,over:we,measureDroppableContainers:H}),[I,Oe,M,ee,_,U,E,we,H]);return S.createElement(yf.Provider,{value:y},S.createElement(Ip.Provider,{value:Ce},S.createElement(Fp.Provider,{value:Pe},S.createElement(Vp.Provider,{value:Ae},l)),S.createElement(Up,{disabled:!1===(null==o?void 0:o.restoreFocus)})),S.createElement(xf,{...o,hiddenTextDescribedById:U}))}),Zp=U(null),qp="button";function Wp(e){let{id:t,data:n,disabled:i=!1,attributes:r}=e;const s=of("Draggable"),{activators:o,activatorEvent:a,active:l,activeNodeRect:u,ariaDescribedById:c,draggableNodes:h,over:d}=I(Ip),{role:f=qp,roleDescription:p="draggable",tabIndex:m=0}=null!=r?r:{},_=(null==l?void 0:l.id)===t,g=I(_?Vp:Zp),[y,v]=nf(),[b,x]=nf(),w=function(e,t){return N(()=>e.reduce((e,n)=>{let{eventName:i,handler:r}=n;return e[i]=e=>{r(e,t)},e},{}),[e,t])}(o,t),E=ef(n);Jd(()=>(h.set(t,{id:t,key:s,node:y,activatorNode:b,data:E}),()=>{const e=h.get(t);e&&e.key===s&&h.delete(t)}),[h,t]);return{active:l,activatorEvent:a,activeNodeRect:u,attributes:N(()=>({role:f,tabIndex:m,"aria-disabled":i,"aria-pressed":!(!_||f!==qp)||void 0,"aria-roledescription":p,"aria-describedby":c.draggable}),[i,f,m,_,p,c.draggable]),isDragging:_,listeners:i?void 0:w,node:y,over:d,setNodeRef:v,setActivatorNodeRef:x,transform:g}}const Hp={timeout:25};function Kp(e,t,n){const i=e.slice();return i.splice(n<0?i.length+n:n,0,i.splice(t,1)[0]),i}function Yp(e,t){return e.reduce((e,n,i)=>{const r=t.get(n);return r&&(e[i]=r),e},Array(e.length))}function Xp(e){return null!==e&&e>=0}const Jp=e=>{let{rects:t,activeIndex:n,overIndex:i,index:r}=e;const s=Kp(t,i,n),o=t[r],a=s[r];return a&&o?{x:a.left-o.left,y:a.top-o.top,scaleX:a.width/o.width,scaleY:a.height/o.height}:null},Qp={scaleX:1,scaleY:1},em=e=>{var t;let{activeIndex:n,activeNodeRect:i,index:r,rects:s,overIndex:o}=e;const a=null!=(t=s[n])?t:i;if(!a)return null;if(r===n){const e=s[o];return e?{x:0,y:n<o?e.top+e.height-(a.top+a.height):e.top-a.top,...Qp}:null}const l=function(e,t,n){const i=e[t],r=e[t-1],s=e[t+1];if(!i)return 0;if(n<t)return r?i.top-(r.top+r.height):s?s.top-(i.top+i.height):0;return s?s.top-(i.top+i.height):r?i.top-(r.top+r.height):0}(s,r,n);return r>n&&r<=o?{x:0,y:-a.height-l,...Qp}:r<n&&r>=o?{x:0,y:a.height+l,...Qp}:{x:0,y:0,...Qp}};const tm="Sortable",nm=S.createContext({activeIndex:-1,containerId:tm,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Jp,disabled:{draggable:!1,droppable:!1}});function im(e){let{children:t,id:n,items:i,strategy:r=Jp,disabled:s=!1}=e;const{active:o,dragOverlay:a,droppableRects:l,over:u,measureDroppableContainers:c}=I(Fp),h=of(tm,n),d=Boolean(null!==a.rect),f=N(()=>i.map(e=>"object"==typeof e&&"id"in e?e.id:e),[i]),p=null!=o,m=o?f.indexOf(o.id):-1,_=u?f.indexOf(u.id):-1,g=O(f),y=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(f,g.current),v=-1!==_&&-1===m||y,b=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(s);Jd(()=>{y&&p&&c(f)},[y,f,p,c]),C(()=>{g.current=f},[f]);const x=N(()=>({activeIndex:m,containerId:h,disabled:b,disableTransforms:v,items:f,overIndex:_,useDragOverlay:d,sortedRects:Yp(f,l),strategy:r}),[m,h,b.draggable,b.droppable,v,f,_,l,d,r]);return S.createElement(nm.Provider,{value:x},t)}const rm=e=>{let{id:t,items:n,activeIndex:i,overIndex:r}=e;return Kp(n,i,r).indexOf(t)},sm=e=>{let{containerId:t,isSorting:n,wasDragging:i,index:r,items:s,newIndex:o,previousItems:a,previousContainerId:l,transition:u}=e;return!(!u||!i)&&((a===s||r!==o)&&(!!n||o!==r&&t===l))},om={duration:200,easing:"ease"},am="transform",lm=df.Transition.toString({property:am,duration:0,easing:"linear"}),um={roleDescription:"sortable"};function cm(e){let{animateLayoutChanges:t=sm,attributes:n,disabled:i,data:r,getNewIndex:s=rm,id:o,strategy:a,resizeObserverConfig:l,transition:u=om}=e;const{items:c,containerId:h,activeIndex:d,disabled:f,disableTransforms:p,sortedRects:m,overIndex:_,useDragOverlay:g,strategy:y}=I(nm),v=function(e,t){var n,i;if("boolean"==typeof e)return{draggable:e,droppable:!1};return{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(i=null==e?void 0:e.droppable)?i:t.droppable}}(i,f),b=c.indexOf(o),x=N(()=>({sortable:{containerId:h,index:b,items:c},...r}),[h,r,b,c]),w=N(()=>c.slice(c.indexOf(o)),[c,o]),{rect:E,node:A,isOver:T,setNodeRef:S}=function(e){let{data:t,disabled:n=!1,id:i,resizeObserverConfig:r}=e;const s=of("Droppable"),{active:o,dispatch:a,over:l,measureDroppableContainers:u}=I(Ip),c=O({disabled:n}),h=O(!1),d=O(null),f=O(null),{disabled:p,updateMeasurementsFor:m,timeout:_}={...Hp,...r},g=ef(null!=m?m:i),y=Ap({callback:P(()=>{h.current?(null!=f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{u(Array.isArray(g.current)?g.current:[g.current]),f.current=null},_)):h.current=!0},[_]),disabled:p||!o}),v=P((e,t)=>{y&&(t&&(y.unobserve(t),h.current=!1),e&&y.observe(e))},[y]),[b,x]=nf(v),w=ef(t);return C(()=>{y&&b.current&&(y.disconnect(),h.current=!1,y.observe(b.current))},[b,y]),C(()=>(a({type:wf.RegisterDroppable,element:{id:i,key:s,disabled:n,node:b,rect:d,data:w}}),()=>a({type:wf.UnregisterDroppable,key:s,id:i})),[i]),C(()=>{n!==c.current.disabled&&(a({type:wf.SetDroppableDisabled,id:i,key:s,disabled:n}),c.current.disabled=n)},[i,s,n,a]),{active:o,rect:d,isOver:(null==l?void 0:l.id)===i,node:b,over:l,setNodeRef:x}}({id:o,data:x,disabled:v.droppable,resizeObserverConfig:{updateMeasurementsFor:w,...l}}),{active:k,activatorEvent:R,activeNodeRect:M,attributes:L,setNodeRef:z,listeners:D,isDragging:F,over:j,setActivatorNodeRef:U,transform:V}=Wp({id:o,data:x,attributes:{...um,...n},disabled:v.draggable}),G=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(()=>e=>{t.forEach(t=>t(e))},t)}(S,z),$=Boolean(k),Z=$&&!p&&Xp(d)&&Xp(_),q=!g&&F,W=q&&Z?V:null,H=Z?null!=W?W:(null!=a?a:y)({rects:m,activeNodeRect:M,activeIndex:d,overIndex:_,index:b}):null,K=Xp(d)&&Xp(_)?s({id:o,items:c,activeIndex:d,overIndex:_}):b,Y=null==k?void 0:k.id,X=O({activeId:Y,items:c,newIndex:K,containerId:h}),J=c!==X.current.items,Q=t({active:k,containerId:h,isDragging:F,isSorting:$,id:o,index:b,items:c,newIndex:X.current.newIndex,previousItems:X.current.items,previousContainerId:X.current.containerId,transition:u,wasDragging:null!=X.current.activeId}),ee=function(e){let{disabled:t,index:n,node:i,rect:r}=e;const[s,o]=B(null),a=O(n);return Jd(()=>{if(!t&&n!==a.current&&i.current){const e=r.current;if(e){const t=Df(i.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&o(n)}}n!==a.current&&(a.current=n)},[t,n,i,r]),C(()=>{s&&o(null)},[s]),s}({disabled:!Q,index:b,node:A,rect:E});return C(()=>{$&&X.current.newIndex!==K&&(X.current.newIndex=K),h!==X.current.containerId&&(X.current.containerId=h),c!==X.current.items&&(X.current.items=c)},[$,K,h,c]),C(()=>{if(Y===X.current.activeId)return;if(null!=Y&&null==X.current.activeId)return void(X.current.activeId=Y);const e=setTimeout(()=>{X.current.activeId=Y},50);return()=>clearTimeout(e)},[Y]),{active:k,activeIndex:d,attributes:L,data:x,rect:E,index:b,newIndex:K,items:c,isOver:T,isSorting:$,isDragging:F,listeners:D,node:A,overIndex:_,over:j,setNodeRef:G,setActivatorNodeRef:U,setDroppableNodeRef:S,setDraggableNodeRef:z,transform:null!=ee?ee:H,transition:function(){if(ee||J&&X.current.newIndex===b)return lm;if(q&&!cf(R)||!u)return;if($||Q)return df.Transition.toString({...u,property:am});return}()}}np.Down,np.Right,np.Up,np.Left;const hm=({id:e,sx:t,children:n})=>{const{isDragging:i}=Wp({id:e}),{attributes:s,listeners:o,setNodeRef:a,transform:l,transition:u}=cm({id:e,strategy:em,transition:{duration:300,easing:"cubic-bezier(0.25, 1, 0.5, 1)"}}),c={...t?.default,...i?t?.dragging:{},transform:df.Translate.toString(l),transition:u,cursor:"pointer"};return H(r,{ref:a,style:c,...o,...s,children:n})};function dm({items:e,getItem:t,getId:n,onDragEnd:i,sx:r,title:s,draggableSx:o}){const a=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(()=>[...t].filter(e=>null!=e),[...t])}(N(()=>({sensor:l,options:null!=u?u:{}}),[l=dp,u={activationConstraint:{distance:8}}]));var l,u;return H($p,{sensors:a,collisionDetection:Pf,onDragEnd:t=>{const{active:r,over:s}=t,o=e.findIndex(e=>n(e)===r.id),a=e.findIndex(e=>n(e)===s?.id),l=Kp(e,o,a);i(l)},children:H(im,{items:e.map(n),strategy:em,children:H(Gd,{items:e,sx:r,title:s,getKey:n,getContent:(e,i)=>{const r=n(e);return H(hm,{id:r,sx:o,children:t(e,i)},r)}})})})}var fm,pm={exports:{}},mm={},_m={exports:{}},gm={exports:{}},ym={};var vm,bm,xm,wm,Em,Am,Tm,Sm,km,Om,Pm,Cm,Rm,Mm,Lm,Nm={};
|
|
10
|
+
*/var zl,Dl,Il=(Ll||(Ll=1,"production"===process.env.NODE_ENV?Cl.exports=function(){if(kl)return Rl;kl=1;var e=S,t="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},n=e.useState,i=e.useEffect,r=e.useLayoutEffect,s=e.useDebugValue;function o(e){var n=e.getSnapshot;e=e.value;try{var i=n();return!t(e,i)}catch(e){return!0}}var a="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var a=t(),l=n({inst:{value:a,getSnapshot:t}}),u=l[0].inst,c=l[1];return r(function(){u.value=a,u.getSnapshot=t,o(u)&&c({inst:u})},[e,a,t]),i(function(){return o(u)&&c({inst:u}),e(function(){o(u)&&c({inst:u})})},[e]),s(a),a};return Rl.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:a,Rl}():Cl.exports=(Ml||(Ml=1,"production"!==process.env.NODE_ENV&&function(){function e(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!n(e,i)}catch(e){return!0}}"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=S,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=t.useState,r=t.useEffect,s=t.useLayoutEffect,o=t.useDebugValue,a=!1,l=!1,u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(u,c){a||void 0===t.startTransition||(a=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var h=c();if(!l){var d=c();n(h,d)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),l=!0)}var f=(d=i({inst:{value:h,getSnapshot:c}}))[0].inst,p=d[1];return s(function(){f.value=h,f.getSnapshot=c,e(f)&&p({inst:f})},[u,h,c]),r(function(){return e(f)&&p({inst:f}),u(function(){e(f)&&p({inst:f})})},[u]),o(h),h};Nl.useSyncExternalStore=void 0!==t.useSyncExternalStore?t.useSyncExternalStore:u,"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Nl)),Cl.exports);function Fl(e){e.reaction=new ts("observer".concat(e.name),function(){var t;e.stateVersion=Symbol(),null===(t=e.onStoreChange)||void 0===t||t.call(e)})}var jl=!0,Bl="function"==typeof Symbol&&Symbol.for,Ul=null!==(Dl=null===(zl=Object.getOwnPropertyDescriptor(function(){},"name"))||void 0===zl?void 0:zl.configurable)&&void 0!==Dl&&Dl,Vl=Bl?Symbol.for("react.forward_ref"):"function"==typeof k&&k(function(e){return null}).$$typeof,Gl=Bl?Symbol.for("react.memo"):"function"==typeof j&&j(function(e){return null}).$$typeof;function $l(e,t){if(process.env.NODE_ENV,Gl&&e.$$typeof===Gl)throw new Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");var n=!1,i=e,r=e.displayName||e.name;if(Vl&&e.$$typeof===Vl&&(n=!0,"function"!=typeof(i=e.render)))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var s,o,a=function(e,t){return function(e,t){void 0===t&&(t="observed");var n=S.useRef(null);if(!n.current){var i={reaction:null,onStoreChange:null,stateVersion:Symbol(),name:t,subscribe:function(e){return Pl.unregister(i),i.onStoreChange=e,i.reaction||(Fl(i),i.stateVersion=Symbol()),function(){var e;i.onStoreChange=null,null===(e=i.reaction)||void 0===e||e.dispose(),i.reaction=null}},getSnapshot:function(){return i.stateVersion}};n.current=i}var r,s,o=n.current;if(o.reaction||(Fl(o),Pl.register(n,o,o)),S.useDebugValue(o.reaction,Sl),Il.useSyncExternalStore(o.subscribe,o.getSnapshot,o.getSnapshot),o.reaction.track(function(){try{r=e()}catch(e){s=e}}),s)throw s;return r}(function(){return i(e,t)},r)};return a.displayName=e.displayName,Ul&&Object.defineProperty(a,"name",{value:e.name,writable:!0,configurable:!0}),e.contextTypes&&(a.contextTypes=e.contextTypes,"production"!==process.env.NODE_ENV&&jl&&(jl=!1,console.warn("[mobx-react-lite] Support for Legacy Context in function components will be removed in the next major release."))),n&&(a=k(a)),a=j(a),s=e,o=a,Object.keys(s).forEach(function(e){Zl[e]||Object.defineProperty(o,e,Object.getOwnPropertyDescriptor(s,e))}),"production"!==process.env.NODE_ENV&&Object.defineProperty(a,"contextTypes",{set:function(){var e,t;throw new Error("[mobx-react-lite] `".concat(this.displayName||(null===(e=this.type)||void 0===e?void 0:e.displayName)||(null===(t=this.type)||void 0===t?void 0:t.name)||"Component",".contextTypes` must be set before applying `observer`."))}}),a}var Zl={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};process.env.NODE_ENV,function(e){e||(e=Tl,"production"!==process.env.NODE_ENV&&console.warn("[MobX] Failed to get unstable_batched updates from react-dom / react-native")),Cs({reactionScheduler:e})}(W),Pl.finalizeAllImmediately;var ql=$l(({onUnauthorized:e,children:t})=>(T.useEffect(()=>{ra.isUnauthorized&&e()},[ra.isUnauthorized]),H(T.Fragment,{children:t})));function Wl(e,t){if(void 0!==e.one&&1===t)return e.one;const n=t%10,i=t%100;return 1===n&&11!==i?e.singularNominative.replace("{{count}}",String(t)):n>=2&&n<=4&&(i<10||i>20)?e.singularGenitive.replace("{{count}}",String(t)):e.pluralGenitive.replace("{{count}}",String(t))}function Hl(e){return(t,n)=>n?.addSuffix?n.comparison&&n.comparison>0?e.future?Wl(e.future,t):"через "+Wl(e.regular,t):e.past?Wl(e.past,t):Wl(e.regular,t)+" назад":Wl(e.regular,t)}const Kl={lessThanXSeconds:Hl({regular:{one:"меньше секунды",singularNominative:"меньше {{count}} секунды",singularGenitive:"меньше {{count}} секунд",pluralGenitive:"меньше {{count}} секунд"},future:{one:"меньше, чем через секунду",singularNominative:"меньше, чем через {{count}} секунду",singularGenitive:"меньше, чем через {{count}} секунды",pluralGenitive:"меньше, чем через {{count}} секунд"}}),xSeconds:Hl({regular:{singularNominative:"{{count}} секунда",singularGenitive:"{{count}} секунды",pluralGenitive:"{{count}} секунд"},past:{singularNominative:"{{count}} секунду назад",singularGenitive:"{{count}} секунды назад",pluralGenitive:"{{count}} секунд назад"},future:{singularNominative:"через {{count}} секунду",singularGenitive:"через {{count}} секунды",pluralGenitive:"через {{count}} секунд"}}),halfAMinute:(e,t)=>t?.addSuffix?t.comparison&&t.comparison>0?"через полминуты":"полминуты назад":"полминуты",lessThanXMinutes:Hl({regular:{one:"меньше минуты",singularNominative:"меньше {{count}} минуты",singularGenitive:"меньше {{count}} минут",pluralGenitive:"меньше {{count}} минут"},future:{one:"меньше, чем через минуту",singularNominative:"меньше, чем через {{count}} минуту",singularGenitive:"меньше, чем через {{count}} минуты",pluralGenitive:"меньше, чем через {{count}} минут"}}),xMinutes:Hl({regular:{singularNominative:"{{count}} минута",singularGenitive:"{{count}} минуты",pluralGenitive:"{{count}} минут"},past:{singularNominative:"{{count}} минуту назад",singularGenitive:"{{count}} минуты назад",pluralGenitive:"{{count}} минут назад"},future:{singularNominative:"через {{count}} минуту",singularGenitive:"через {{count}} минуты",pluralGenitive:"через {{count}} минут"}}),aboutXHours:Hl({regular:{singularNominative:"около {{count}} часа",singularGenitive:"около {{count}} часов",pluralGenitive:"около {{count}} часов"},future:{singularNominative:"приблизительно через {{count}} час",singularGenitive:"приблизительно через {{count}} часа",pluralGenitive:"приблизительно через {{count}} часов"}}),xHours:Hl({regular:{singularNominative:"{{count}} час",singularGenitive:"{{count}} часа",pluralGenitive:"{{count}} часов"}}),xDays:Hl({regular:{singularNominative:"{{count}} день",singularGenitive:"{{count}} дня",pluralGenitive:"{{count}} дней"}}),aboutXWeeks:Hl({regular:{singularNominative:"около {{count}} недели",singularGenitive:"около {{count}} недель",pluralGenitive:"около {{count}} недель"},future:{singularNominative:"приблизительно через {{count}} неделю",singularGenitive:"приблизительно через {{count}} недели",pluralGenitive:"приблизительно через {{count}} недель"}}),xWeeks:Hl({regular:{singularNominative:"{{count}} неделя",singularGenitive:"{{count}} недели",pluralGenitive:"{{count}} недель"}}),aboutXMonths:Hl({regular:{singularNominative:"около {{count}} месяца",singularGenitive:"около {{count}} месяцев",pluralGenitive:"около {{count}} месяцев"},future:{singularNominative:"приблизительно через {{count}} месяц",singularGenitive:"приблизительно через {{count}} месяца",pluralGenitive:"приблизительно через {{count}} месяцев"}}),xMonths:Hl({regular:{singularNominative:"{{count}} месяц",singularGenitive:"{{count}} месяца",pluralGenitive:"{{count}} месяцев"}}),aboutXYears:Hl({regular:{singularNominative:"около {{count}} года",singularGenitive:"около {{count}} лет",pluralGenitive:"около {{count}} лет"},future:{singularNominative:"приблизительно через {{count}} год",singularGenitive:"приблизительно через {{count}} года",pluralGenitive:"приблизительно через {{count}} лет"}}),xYears:Hl({regular:{singularNominative:"{{count}} год",singularGenitive:"{{count}} года",pluralGenitive:"{{count}} лет"}}),overXYears:Hl({regular:{singularNominative:"больше {{count}} года",singularGenitive:"больше {{count}} лет",pluralGenitive:"больше {{count}} лет"},future:{singularNominative:"больше, чем через {{count}} год",singularGenitive:"больше, чем через {{count}} года",pluralGenitive:"больше, чем через {{count}} лет"}}),almostXYears:Hl({regular:{singularNominative:"почти {{count}} год",singularGenitive:"почти {{count}} года",pluralGenitive:"почти {{count}} лет"},future:{singularNominative:"почти через {{count}} год",singularGenitive:"почти через {{count}} года",pluralGenitive:"почти через {{count}} лет"}})};function Yl(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Xl={date:Yl({formats:{full:"EEEE, d MMMM y 'г.'",long:"d MMMM y 'г.'",medium:"d MMM y 'г.'",short:"dd.MM.y"},defaultWidth:"full"}),time:Yl({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:Yl({formats:{any:"{{date}}, {{time}}"},defaultWidth:"any"})},Jl=Symbol.for("constructDateFrom");function Ql(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&Jl in e?e[Jl](t):e instanceof Date?new e.constructor(t):new Date(t)}let eu={};function tu(e,t){const n=eu,i=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,r=(s=e,o=t?.in,Ql(o||s,s));var s,o;const a=r.getDay(),l=(a<i?7:0)+a-i;return r.setDate(r.getDate()-l),r.setHours(0,0,0,0),r}function nu(e,t,n){const[i,r]=function(e,...t){const n=Ql.bind(null,e||t.find(e=>"object"==typeof e));return t.map(n)}(n?.in,e,t);return+tu(i,n)===+tu(r,n)}const iu=["воскресенье","понедельник","вторник","среду","четверг","пятницу","субботу"];function ru(e){const t=iu[e];return 2===e?"'во "+t+" в' p":"'в "+t+" в' p"}const su={lastWeek:(e,t,n)=>{const i=e.getDay();return nu(e,t,n)?ru(i):function(e){const t=iu[e];switch(e){case 0:return"'в прошлое "+t+" в' p";case 1:case 2:case 4:return"'в прошлый "+t+" в' p";case 3:case 5:case 6:return"'в прошлую "+t+" в' p"}}(i)},yesterday:"'вчера в' p",today:"'сегодня в' p",tomorrow:"'завтра в' p",nextWeek:(e,t,n)=>{const i=e.getDay();return nu(e,t,n)?ru(i):function(e){const t=iu[e];switch(e){case 0:return"'в следующее "+t+" в' p";case 1:case 2:case 4:return"'в следующий "+t+" в' p";case 3:case 5:case 6:return"'в следующую "+t+" в' p"}}(i)},other:"P"};function ou(e){return(t,n)=>{let i;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{const t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}return i[e.argumentCallback?e.argumentCallback(t):t]}}const au={ordinalNumber:(e,t)=>{const n=Number(e),i=t?.unit;let r;return r="date"===i?"-е":"week"===i||"minute"===i||"second"===i?"-я":"-й",n+r},era:ou({values:{narrow:["до н.э.","н.э."],abbreviated:["до н. э.","н. э."],wide:["до нашей эры","нашей эры"]},defaultWidth:"wide"}),quarter:ou({values:{narrow:["1","2","3","4"],abbreviated:["1-й кв.","2-й кв.","3-й кв.","4-й кв."],wide:["1-й квартал","2-й квартал","3-й квартал","4-й квартал"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:ou({values:{narrow:["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],abbreviated:["янв.","фев.","март","апр.","май","июнь","июль","авг.","сент.","окт.","нояб.","дек."],wide:["январь","февраль","март","апрель","май","июнь","июль","август","сентябрь","октябрь","ноябрь","декабрь"]},defaultWidth:"wide",formattingValues:{narrow:["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],abbreviated:["янв.","фев.","мар.","апр.","мая","июн.","июл.","авг.","сент.","окт.","нояб.","дек."],wide:["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"]},defaultFormattingWidth:"wide"}),day:ou({values:{narrow:["В","П","В","С","Ч","П","С"],short:["вс","пн","вт","ср","чт","пт","сб"],abbreviated:["вск","пнд","втр","срд","чтв","птн","суб"],wide:["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"]},defaultWidth:"wide"}),dayPeriod:ou({values:{narrow:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утро",afternoon:"день",evening:"веч.",night:"ночь"},abbreviated:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утро",afternoon:"день",evening:"веч.",night:"ночь"},wide:{am:"ДП",pm:"ПП",midnight:"полночь",noon:"полдень",morning:"утро",afternoon:"день",evening:"вечер",night:"ночь"}},defaultWidth:"any",formattingValues:{narrow:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утра",afternoon:"дня",evening:"веч.",night:"ночи"},abbreviated:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утра",afternoon:"дня",evening:"веч.",night:"ночи"},wide:{am:"ДП",pm:"ПП",midnight:"полночь",noon:"полдень",morning:"утра",afternoon:"дня",evening:"вечера",night:"ночи"}},defaultFormattingWidth:"wide"})};function lu(e){return(t,n={})=>{const i=n.width,r=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],s=t.match(r);if(!s)return null;const o=s[0],a=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n;return}(a,e=>e.test(o)):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n;return}(a,e=>e.test(o));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;return{value:u,rest:t.slice(o.length)}}}const uu={ordinalNumber:(cu={matchPattern:/^(\d+)(-?(е|я|й|ое|ье|ая|ья|ый|ой|ий|ый))?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const n=e.match(cu.matchPattern);if(!n)return null;const i=n[0],r=e.match(cu.parsePattern);if(!r)return null;let s=cu.valueCallback?cu.valueCallback(r[0]):r[0];return s=t.valueCallback?t.valueCallback(s):s,{value:s,rest:e.slice(i.length)}}),era:lu({matchPatterns:{narrow:/^((до )?н\.?\s?э\.?)/i,abbreviated:/^((до )?н\.?\s?э\.?)/i,wide:/^(до нашей эры|нашей эры|наша эра)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^д/i,/^н/i]},defaultParseWidth:"any"}),quarter:lu({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234](-?[ыои]?й?)? кв.?/i,wide:/^[1234](-?[ыои]?й?)? квартал/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:lu({matchPatterns:{narrow:/^[яфмаисонд]/i,abbreviated:/^(янв|фев|март?|апр|ма[йя]|июн[ья]?|июл[ья]?|авг|сент?|окт|нояб?|дек)\.?/i,wide:/^(январ[ья]|феврал[ья]|марта?|апрел[ья]|ма[йя]|июн[ья]|июл[ья]|августа?|сентябр[ья]|октябр[ья]|октябр[ья]|ноябр[ья]|декабр[ья])/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^я/i,/^ф/i,/^м/i,/^а/i,/^м/i,/^и/i,/^и/i,/^а/i,/^с/i,/^о/i,/^н/i,/^я/i],any:[/^я/i,/^ф/i,/^мар/i,/^ап/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^ав/i,/^с/i,/^о/i,/^н/i,/^д/i]},defaultParseWidth:"any"}),day:lu({matchPatterns:{narrow:/^[впсч]/i,short:/^(вс|во|пн|по|вт|ср|чт|че|пт|пя|сб|су)\.?/i,abbreviated:/^(вск|вос|пнд|пон|втр|вто|срд|сре|чтв|чет|птн|пят|суб).?/i,wide:/^(воскресень[ея]|понедельника?|вторника?|сред[аы]|четверга?|пятниц[аы]|суббот[аы])/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^в/i,/^п/i,/^в/i,/^с/i,/^ч/i,/^п/i,/^с/i],any:[/^в[ос]/i,/^п[он]/i,/^в/i,/^ср/i,/^ч/i,/^п[ят]/i,/^с[уб]/i]},defaultParseWidth:"any"}),dayPeriod:lu({matchPatterns:{narrow:/^([дп]п|полн\.?|полд\.?|утр[оа]|день|дня|веч\.?|ноч[ьи])/i,abbreviated:/^([дп]п|полн\.?|полд\.?|утр[оа]|день|дня|веч\.?|ноч[ьи])/i,wide:/^([дп]п|полночь|полдень|утр[оа]|день|дня|вечера?|ноч[ьи])/i},defaultMatchWidth:"wide",parsePatterns:{any:{am:/^дп/i,pm:/^пп/i,midnight:/^полн/i,noon:/^полд/i,morning:/^у/i,afternoon:/^д[ен]/i,evening:/^в/i,night:/^н/i}},defaultParseWidth:"any"})};var cu;const hu={code:"ru",formatDistance:(e,t,n)=>Kl[e](t,n),formatLong:Xl,formatRelative:(e,t,n,i)=>{const r=su[e];return"function"==typeof r?r(t,n,i):r},localize:au,match:uu,options:{weekStartsOn:1,firstWeekContainsDate:1}},du=e=>H(X,{...e,dateAdapter:J,adapterLocale:hu}),fu=e=>H(n,{...e}),pu=({children:e,configOptions:t})=>{const[n,r]=T.useState(null),[s,o]=T.useState("");return T.useEffect(()=>(da.initialize({...t,onCheck:e=>{const{valid:n,reason:i}=e;o(i),r(n),t.onCheck?.(e)}}),()=>{da.deactivate()}),[t]),null===n?H(fu,{color:"primary"}):n?H(T.Fragment,{children:e}):H(i,{color:"error",children:s})},mu=({children:e})=>{const[t,n]=T.useState(!1);return T.useEffect(()=>{(async()=>{try{await Promise.resolve().then(function(){return jb}),await Promise.resolve().then(function(){return Ub}),await Promise.resolve().then(function(){return Zb}),await Promise.resolve().then(function(){return Hb}),await Promise.resolve().then(function(){return tx}),await Promise.resolve().then(function(){return rx}),n(!0)}catch{n(!1)}})()},[]),t?H(T.Fragment,{children:e}):null},_u=new class{#W;#j;#d;#H;#K;#Y;#X;#J;constructor(e={}){this.#W=e.queryCache||new hl,this.#j=e.mutationCache||new ll,this.#d=e.defaultOptions||{},this.#H=new Map,this.#K=new Map,this.#Y=0}mount(){this.#Y++,1===this.#Y&&(this.#X=ja.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#W.onFocus())}),this.#J=Ga.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#W.onOnline())}))}unmount(){this.#Y--,0===this.#Y&&(this.#X?.(),this.#X=void 0,this.#J?.(),this.#J=void 0)}isFetching(e){return this.#W.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#j.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#W.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#W.build(this,t),i=n.state.data;return void 0===i?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ba(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return this.#W.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){const i=this.defaultQueryOptions({queryKey:e}),r=this.#W.get(i.queryHash),s=r?.state.data,o=function(e,t){return"function"==typeof e?e(t):e}(t,s);if(void 0!==o)return this.#W.build(this,i).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Va.batch(()=>this.#W.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#W.get(t.queryHash)?.state}removeQueries(e){const t=this.#W;Va.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){const n=this.#W;return Va.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},i=Va.batch(()=>this.#W.findAll(e).map(e=>e.cancel(n)));return Promise.all(i).then(ga).catch(ga)}invalidateQueries(e,t={}){return Va.batch(()=>(this.#W.findAll(e).forEach(e=>{e.invalidate()}),"none"===e?.refetchType?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},i=Va.batch(()=>this.#W.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(ga)),"paused"===e.state.fetchStatus?Promise.resolve():t}));return Promise.all(i).then(ga)}fetchQuery(e){const t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);const n=this.#W.build(this,t);return n.isStaleByTime(ba(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ga).catch(ga)}fetchInfiniteQuery(e){return e.behavior=rl(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ga).catch(ga)}ensureInfiniteQueryData(e){return e.behavior=rl(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ga.isOnline()?this.#j.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#W}getMutationCache(){return this.#j}getDefaultOptions(){return this.#d}setDefaultOptions(e){this.#d=e}setQueryDefaults(e,t){this.#H.set(Ta(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#H.values()],n={};return t.forEach(t=>{Sa(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#K.set(Ta(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#K.values()],n={};return t.forEach(t=>{Sa(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#d.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Aa(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Da&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#d.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#W.clear(),this.#j.clear()}},gu=e=>H(pl,{...e,client:_u}),yu=({children:e,themeOptions:t})=>{const n=Q(t);return H(ee,{theme:n,children:e})},vu=({children:e,configOptions:t,themeOptions:n})=>H(mn,{children:H(gu,{children:H(ca,{children:H(yu,{themeOptions:n,children:H(du,{children:H(mu,{children:H(pu,{configOptions:t,children:e})})})})})})}),bu=()=>vl({mutationKey:["logout-mutation"],mutationFn:async e=>await da.instance.apiService.post({url:"logout"}),onError:El(),onSuccess:()=>{_u.invalidateQueries({queryKey:["user"]})}});var xu,wu,Eu,Au;!function(e){e.GET="GET",e.DELETE="DELETE",e.PUT="PUT",e.POST="POST"}(xu||(xu={})),function(e){e.TOP_RIGHT="top-right",e.BOTTOM_RIGHT="bottom-right",e.BOTTOM_LEFT="bottom-left",e.TOP_LEFT="top-left"}(wu||(wu={}));var Tu,Su,ku=function(){if(Au)return Eu;function e(e){this._maxSize=e,this.clear()}Au=1,e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(e){return this._values[e]},e.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,n=/^\d+$/,i=/^\d/,r=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,s=/^\s*(['"]?)(.*?)(\1)\s*$/,o=new e(512),a=new e(512),l=new e(512);function u(e){return o.get(e)||o.set(e,c(e).map(function(e){return e.replace(s,"$2")}))}function c(e){return e.match(t)||[""]}function h(e){return"string"==typeof e&&e&&-1!==["'",'"'].indexOf(e.charAt(0))}function d(e){return!h(e)&&(function(e){return e.match(i)&&!e.match(n)}(e)||function(e){return r.test(e)}(e))}return Eu={Cache:e,split:c,normalizePath:u,setter:function(e){var t=u(e);return a.get(e)||a.set(e,function(e,n){for(var i=0,r=t.length,s=e;i<r-1;){var o=t[i];if("__proto__"===o||"constructor"===o||"prototype"===o)return e;s=s[t[i++]]}s[t[i]]=n})},getter:function(e,t){var n=u(e);return l.get(e)||l.set(e,function(e){for(var i=0,r=n.length;i<r;){if(null==e&&t)return;e=e[n[i++]]}return e})},join:function(e){return e.reduce(function(e,t){return e+(h(t)||n.test(t)?"["+t+"]":(e?".":"")+t)},"")},forEach:function(e,t,n){!function(e,t,n){var i,r,s,o,a=e.length;for(r=0;r<a;r++)(i=e[r])&&(d(i)&&(i='"'+i+'"'),s=!(o=h(i))&&/^\d+$/.test(i),t.call(n,i,o,s,r,e))}(Array.isArray(e)?e:c(e),t,n)}},Eu}();var Ou,Pu=function(){if(Su)return Tu;Su=1;const e=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,t=t=>t.match(e)||[],n=e=>e[0].toUpperCase()+e.slice(1),i=(e,n)=>t(e).join(n).toLowerCase(),r=e=>t(e).reduce((e,t)=>`${e}${e?t[0].toUpperCase()+t.slice(1).toLowerCase():t.toLowerCase()}`,"");return Tu={words:t,upperFirst:n,camelCase:r,pascalCase:e=>n(r(e)),snakeCase:e=>i(e,"_"),kebabCase:e=>i(e,"-"),sentenceCase:e=>n(i(e," ")),titleCase:e=>t(e).map(n).join(" ")}}(),Cu={exports:{}};var Ru=function(){if(Ou)return Cu.exports;function e(e,t){var n=e.length,i=new Array(n),r={},s=n,o=function(e){for(var t=new Map,n=0,i=e.length;n<i;n++){var r=e[n];t.has(r[0])||t.set(r[0],new Set),t.has(r[1])||t.set(r[1],new Set),t.get(r[0]).add(r[1])}return t}(t),a=function(e){for(var t=new Map,n=0,i=e.length;n<i;n++)t.set(e[n],n);return t}(e);for(t.forEach(function(e){if(!a.has(e[0])||!a.has(e[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});s--;)r[s]||l(e[s],s,new Set);return i;function l(e,t,s){if(s.has(e)){var u;try{u=", node was:"+JSON.stringify(e)}catch(e){u=""}throw new Error("Cyclic dependency"+u)}if(!a.has(e))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(e));if(!r[t]){r[t]=!0;var c=o.get(e)||new Set;if(t=(c=Array.from(c)).length){s.add(e);do{var h=c[--t];l(h,a.get(h),s)}while(t);s.delete(e)}i[--n]=e}}}return Ou=1,Cu.exports=function(t){return e(function(e){for(var t=new Set,n=0,i=e.length;n<i;n++){var r=e[n];t.add(r[0]),t.add(r[1])}return Array.from(t)}(t),t)},Cu.exports.array=e,Cu.exports}(),Mu=Ae(Ru);const Lu=Object.prototype.toString,Nu=Error.prototype.toString,zu=RegExp.prototype.toString,Du="undefined"!=typeof Symbol?Symbol.prototype.toString:()=>"",Iu=/^Symbol\((.*)\)(.*)$/;function Fu(e,t=!1){if(null==e||!0===e||!1===e)return""+e;const n=typeof e;if("number"===n)return function(e){return e!=+e?"NaN":0===e&&1/e<0?"-0":""+e}(e);if("string"===n)return t?`"${e}"`:e;if("function"===n)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===n)return Du.call(e).replace(Iu,"Symbol($1)");const i=Lu.call(e).slice(8,-1);return"Date"===i?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===i||e instanceof Error?"["+Nu.call(e)+"]":"RegExp"===i?zu.call(e):null}function ju(e,t){let n=Fu(e,t);return null!==n?n:JSON.stringify(e,function(e,n){let i=Fu(this[e],t);return null!==i?i:n},2)}function Bu(e){return null==e?[]:[].concat(e)}let Uu,Vu,Gu,$u=/\$\{\s*(\w+)\s*\}/g;Uu=Symbol.toStringTag;class Zu{constructor(e,t,n,i){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[Uu]="Error",this.name="ValidationError",this.value=t,this.path=n,this.type=i,this.errors=[],this.inner=[],Bu(e).forEach(e=>{if(qu.isError(e)){this.errors.push(...e.errors);const t=e.inner.length?e.inner:[e];this.inner.push(...t)}else this.errors.push(e)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}Vu=Symbol.hasInstance,Gu=Symbol.toStringTag;class qu extends Error{static formatError(e,t){const n=t.label||t.path||"this";return t=Object.assign({},t,{path:n,originalPath:t.path}),"string"==typeof e?e.replace($u,(e,n)=>ju(t[n])):"function"==typeof e?e(t):e}static isError(e){return e&&"ValidationError"===e.name}constructor(e,t,n,i,r){const s=new Zu(e,t,n,i);if(r)return s;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[Gu]="Error",this.name=s.name,this.message=s.message,this.type=s.type,this.value=s.value,this.path=s.path,this.errors=s.errors,this.inner=s.inner,Error.captureStackTrace&&Error.captureStackTrace(this,qu)}static[Vu](e){return Zu[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let Wu={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:i})=>{const r=null!=i&&i!==n?` (cast from the value \`${ju(i,!0)}\`).`:".";return"mixed"!==t?`${e} must be a \`${t}\` type, but the final value was: \`${ju(n,!0)}\``+r:`${e} must match the configured type. The validated value was: \`${ju(n,!0)}\``+r}},Hu={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},Ku={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},Yu={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Xu={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},Ju={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},Qu={notType:e=>{const{path:t,value:n,spec:i}=e,r=i.types.length;if(Array.isArray(n)){if(n.length<r)return`${t} tuple value has too few items, expected a length of ${r} but got ${n.length} for value: \`${ju(n,!0)}\``;if(n.length>r)return`${t} tuple value has too many items, expected a length of ${r} but got ${n.length} for value: \`${ju(n,!0)}\``}return qu.formatError(Wu.notType,e)}};Object.assign(Object.create(null),{mixed:Wu,string:Hu,number:Ku,date:Yu,object:Xu,array:Ju,boolean:{isValue:"${path} field must be ${value}"},tuple:Qu});const ec=e=>e&&e.__isYupSchema__;class tc{static fromOptions(e,t){if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:i,otherwise:r}=t,s="function"==typeof n?n:(...e)=>e.every(e=>e===n);return new tc(e,(e,t)=>{var n;let o=s(...e)?i:r;return null!=(n=null==o?void 0:o(t))?n:t})}constructor(e,t){this.fn=void 0,this.refs=e,this.refs=e,this.fn=t}resolve(e,t){let n=this.refs.map(e=>e.getValue(null==t?void 0:t.value,null==t?void 0:t.parent,null==t?void 0:t.context)),i=this.fn(n,e,t);if(void 0===i||i===e)return e;if(!ec(i))throw new TypeError("conditions must return a schema object");return i.resolve(t)}}const nc="$",ic=".";class rc{constructor(e,t={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,"string"!=typeof e)throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),""===e)throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===nc,this.isValue=this.key[0]===ic,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?nc:this.isValue?ic:"";this.path=this.key.slice(n.length),this.getter=this.path&&ku.getter(this.path,!0),this.map=t.map}getValue(e,t,n){let i=this.isContext?n:this.isValue?e:t;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}cast(e,t){return this.getValue(e,null==t?void 0:t.parent,null==t?void 0:t.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}rc.prototype.__isYupRef=!0;const sc=e=>null==e;function oc(e){function t({value:t,path:n="",options:i,originalValue:r,schema:s},o,a){const{name:l,test:u,params:c,message:h,skipAbsent:d}=e;let{parent:f,context:p,abortEarly:m=s.spec.abortEarly,disableStackTrace:_=s.spec.disableStackTrace}=i;const g={value:t,parent:f,context:p};function y(e={}){const i=ac(Object.assign({value:t,originalValue:r,label:s.spec.label,path:e.path||n,spec:s.spec,disableStackTrace:e.disableStackTrace||_},c,e.params),g),o=new qu(qu.formatError(e.message||h,i),t,i.path,e.type||l,i.disableStackTrace);return o.params=i,o}const v=m?o:a;let b={path:n,parent:f,type:l,from:i.from,createError:y,resolve:e=>lc(e,g),options:i,originalValue:r,schema:s};const x=e=>{qu.isError(e)?v(e):e?a(null):v(y())},w=e=>{qu.isError(e)?v(e):o(e)};if(d&&sc(t))return x(!0);let E;try{var A;if(E=u.call(b,t,b),"function"==typeof(null==(A=E)?void 0:A.then)){if(i.sync)throw new Error(`Validation test of type: "${b.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(E).then(x,w)}}catch(e){return void w(e)}x(E)}return t.OPTIONS=e,t}function ac(e,t){if(!e)return e;for(const n of Object.keys(e))e[n]=lc(e[n],t);return e}function lc(e,t){return rc.isRef(e)?e.getValue(t.value,t.parent,t.context):e}function uc(e,t,n,i=n){let r,s,o;return t?(ku.forEach(t,(a,l,u)=>{let c=l?a.slice(1,a.length-1):a,h="tuple"===(e=e.resolve({context:i,parent:r,value:n})).type,d=u?parseInt(c,10):0;if(e.innerType||h){if(h&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(n&&d>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${a}, in the path: ${t}. because there is no value at that index. `);r=n,n=n&&n[d],e=h?e.spec.types[d]:e.innerType}if(!u){if(!e.fields||!e.fields[c])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e.type}")`);r=n,n=n&&n[c],e=e.fields[c]}s=c,o=l?"["+a+"]":"."+a}),{schema:e,parent:r,parentPath:s}):{parent:r,parentPath:t,schema:e}}class cc extends Set{describe(){const e=[];for(const t of this.values())e.push(rc.isRef(t)?t.describe():t);return e}resolveAll(e){let t=[];for(const n of this.values())t.push(e(n));return t}clone(){return new cc(this.values())}merge(e,t){const n=this.clone();return e.forEach(e=>n.add(e)),t.forEach(e=>n.delete(e)),n}}function hc(e,t=new Map){if(ec(e)||!e||"object"!=typeof e)return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let i=0;i<e.length;i++)n[i]=hc(e[i],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[i,r]of e.entries())n.set(i,hc(r,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const i of e)n.add(hc(i,t))}else{if(!(e instanceof Object))throw Error(`Unable to clone ${e}`);n={},t.set(e,n);for(const[i,r]of Object.entries(e))n[i]=hc(r,t)}return n}function dc(e){if(null==e||!e.length)return;const t=[];let n="",i=!1,r=!1;for(let s=0;s<e.length;s++){const o=e[s];"["!==o||r?"]"!==o||r?'"'!==o?"."!==o||i||r?n+=o:n&&(t.push(n),n=""):r=!r:(n&&(/^\d+$/.test(n)?t.push(n):t.push(n.replace(/^"|"$/g,"")),n=""),i=!1):(n&&(t.push(...n.split(".").filter(Boolean)),n=""),i=!0)}return n&&t.push(...n.split(".").filter(Boolean)),t}function fc(e,t){var n;if((null==(n=e.inner)||!n.length)&&e.errors.length)return function(e,t){const n=t?`${t}.${e.path}`:e.path;return e.errors.map(e=>({message:e,path:dc(n)}))}(e,t);const i=t?`${t}.${e.path}`:e.path;return e.inner.flatMap(e=>fc(e,i))}class pc{constructor(e){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new cc,this._blacklist=new cc,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Wu.notType)}),this.type=e.type,this._typeCheck=e.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},null==e?void 0:e.spec),this.withMutation(e=>{e.nonNullable()})}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeCheck=this._typeCheck,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.internalTests=Object.assign({},this.internalTests),t.exclusiveTests=Object.assign({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=hc(Object.assign({},this.spec,e)),t}label(e){let t=this.clone();return t.spec.label=e,t}meta(...e){if(0===e.length)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}withMutation(e){let t=this._mutate;this._mutate=!0;let n=e(this);return this._mutate=t,n}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&"mixed"!==this.type)throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let t=this,n=e.clone();const i=Object.assign({},t.spec,n.spec);return n.spec=i,n.internalTests=Object.assign({},t.internalTests,n.internalTests),n._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),n._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),n.tests=t.tests,n.exclusiveTests=t.exclusiveTests,n.withMutation(t=>{e.tests.forEach(e=>{t.test(e.OPTIONS)})}),n.transforms=[...t.transforms,...n.transforms],n}isType(e){return null==e?!(!this.spec.nullable||null!==e)||!(!this.spec.optional||void 0!==e):this._typeCheck(e)}resolve(e){let t=this;if(t.conditions.length){let n=t.conditions;t=t.clone(),t.conditions=[],t=n.reduce((t,n)=>n.resolve(t,e),t),t=t.resolve(e)}return t}resolveOptions(e){var t,n,i,r;return Object.assign({},e,{from:e.from||[],strict:null!=(t=e.strict)?t:this.spec.strict,abortEarly:null!=(n=e.abortEarly)?n:this.spec.abortEarly,recursive:null!=(i=e.recursive)?i:this.spec.recursive,disableStackTrace:null!=(r=e.disableStackTrace)?r:this.spec.disableStackTrace})}cast(e,t={}){let n=this.resolve(Object.assign({},t,{value:e})),i="ignore-optionality"===t.assert,r=n._cast(e,t);if(!1!==t.assert&&!n.isType(r)){if(i&&sc(r))return r;let s=ju(e),o=ju(r);throw new TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}". \n\nattempted value: ${s} \n`+(o!==s?`result of cast: ${o}`:""))}return r}_cast(e,t){let n=void 0===e?e:this.transforms.reduce((n,i)=>i.call(this,n,e,this,t),e);return void 0===n&&(n=this.getDefault(t)),n}_validate(e,t={},n,i){let{path:r,originalValue:s=e,strict:o=this.spec.strict}=t,a=e;o||(a=this._cast(a,Object.assign({assert:!1},t)));let l=[];for(let e of Object.values(this.internalTests))e&&l.push(e);this.runTests({path:r,value:a,originalValue:s,options:t,tests:l},n,e=>{if(e.length)return i(e,a);this.runTests({path:r,value:a,originalValue:s,options:t,tests:this.tests},n,i)})}runTests(e,t,n){let i=!1,{tests:r,value:s,originalValue:o,path:a,options:l}=e,u=e=>{i||(i=!0,t(e,s))},c=e=>{i||(i=!0,n(e,s))},h=r.length,d=[];if(!h)return c([]);let f={value:s,originalValue:o,path:a,options:l,schema:this};for(let e=0;e<r.length;e++){(0,r[e])(f,u,function(e){e&&(Array.isArray(e)?d.push(...e):d.push(e)),--h<=0&&c(d)})}}asNestedTest({key:e,index:t,parent:n,parentPath:i,originalParent:r,options:s}){const o=null!=e?e:t;if(null==o)throw TypeError("Must include `key` or `index` for nested validations");const a="number"==typeof o;let l=n[o];const u=Object.assign({},s,{strict:!0,parent:n,value:l,originalValue:r[o],key:void 0,[a?"index":"key"]:o,path:a||o.includes(".")?`${i||""}[${a?o:`"${o}"`}]`:(i?`${i}.`:"")+e});return(e,t,n)=>this.resolve(u)._validate(l,u,t,n)}validate(e,t){var n;let i=this.resolve(Object.assign({},t,{value:e})),r=null!=(n=null==t?void 0:t.disableStackTrace)?n:i.spec.disableStackTrace;return new Promise((n,s)=>i._validate(e,t,(e,t)=>{qu.isError(e)&&(e.value=t),s(e)},(e,t)=>{e.length?s(new qu(e,t,void 0,void 0,r)):n(t)}))}validateSync(e,t){var n;let i,r=this.resolve(Object.assign({},t,{value:e})),s=null!=(n=null==t?void 0:t.disableStackTrace)?n:r.spec.disableStackTrace;return r._validate(e,Object.assign({},t,{sync:!0}),(e,t)=>{throw qu.isError(e)&&(e.value=t),e},(t,n)=>{if(t.length)throw new qu(t,e,void 0,void 0,s);i=n}),i}isValid(e,t){return this.validate(e,t).then(()=>!0,e=>{if(qu.isError(e))return!1;throw e})}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(e){if(qu.isError(e))return!1;throw e}}_getDefault(e){let t=this.spec.default;return null==t?t:"function"==typeof t?t.call(this,e):hc(t)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){if(0===arguments.length)return this._getDefault();return this.clone({default:e})}strict(e=!0){return this.clone({strict:e})}nullability(e,t){const n=this.clone({nullable:e});return n.internalTests.nullable=oc({message:t,name:"nullable",test(e){return null!==e||this.schema.spec.nullable}}),n}optionality(e,t){const n=this.clone({optional:e});return n.internalTests.optionality=oc({message:t,name:"optionality",test(e){return void 0!==e||this.schema.spec.optional}}),n}optional(){return this.optionality(!0)}defined(e=Wu.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=Wu.notNull){return this.nullability(!1,e)}required(e=Wu.required){return this.clone().withMutation(t=>t.nonNullable(e).defined(e))}notRequired(){return this.clone().withMutation(e=>e.nullable().optional())}transform(e){let t=this.clone();return t.transforms.push(e),t}test(...e){let t;if(t=1===e.length?"function"==typeof e[0]?{test:e[0]}:e[0]:2===e.length?{name:e[0],test:e[1]}:{name:e[0],message:e[1],test:e[2]},void 0===t.message&&(t.message=Wu.default),"function"!=typeof t.test)throw new TypeError("`test` is a required parameters");let n=this.clone(),i=oc(t),r=t.exclusive||t.name&&!0===n.exclusiveTests[t.name];if(t.exclusive&&!t.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(n.exclusiveTests[t.name]=!!t.exclusive),n.tests=n.tests.filter(e=>{if(e.OPTIONS.name===t.name){if(r)return!1;if(e.OPTIONS.test===i.OPTIONS.test)return!1}return!0}),n.tests.push(i),n}when(e,t){Array.isArray(e)||"string"==typeof e||(t=e,e=".");let n=this.clone(),i=Bu(e).map(e=>new rc(e));return i.forEach(e=>{e.isSibling&&n.deps.push(e.key)}),n.conditions.push("function"==typeof t?new tc(i,t):tc.fromOptions(i,t)),n}typeError(e){let t=this.clone();return t.internalTests.typeError=oc({message:e,name:"typeError",skipAbsent:!0,test(e){return!!this.schema._typeCheck(e)||this.createError({params:{type:this.schema.type}})}}),t}oneOf(e,t=Wu.oneOf){let n=this.clone();return e.forEach(e=>{n._whitelist.add(e),n._blacklist.delete(e)}),n.internalTests.whiteList=oc({message:t,name:"oneOf",skipAbsent:!0,test(e){let t=this.schema._whitelist,n=t.resolveAll(this.resolve);return!!n.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:n}})}}),n}notOneOf(e,t=Wu.notOneOf){let n=this.clone();return e.forEach(e=>{n._blacklist.add(e),n._whitelist.delete(e)}),n.internalTests.blacklist=oc({message:t,name:"notOneOf",test(e){let t=this.schema._blacklist,n=t.resolveAll(this.resolve);return!n.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:n}})}}),n}strip(e=!0){let t=this.clone();return t.spec.strip=e,t}describe(e){const t=(e?this.resolve(e):this).clone(),{label:n,meta:i,optional:r,nullable:s}=t.spec,o={meta:i,label:n,optional:r,nullable:s,default:t.getDefault(e),type:t.type,oneOf:t._whitelist.describe(),notOneOf:t._blacklist.describe(),tests:t.tests.filter((e,t,n)=>n.findIndex(t=>t.OPTIONS.name===e.OPTIONS.name)===t).map(t=>{const n=t.OPTIONS.params&&e?ac(Object.assign({},t.OPTIONS.params),e):t.OPTIONS.params;return{name:t.OPTIONS.name,params:n}})};return o}get"~standard"(){const e=this,t={version:1,vendor:"yup",async validate(t){try{return{value:await e.validate(t,{abortEarly:!1})}}catch(e){if(e instanceof qu)return{issues:fc(e)};throw e}}};return t}}pc.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])pc.prototype[`${e}At`]=function(t,n,i={}){const{parent:r,parentPath:s,schema:o}=uc(this,t,n,i.context);return o[e](r&&r[s],Object.assign({},i,{parent:r,path:t}))};for(const e of["equals","is"])pc.prototype[e]=pc.prototype.oneOf;for(const e of["not","nope"])pc.prototype[e]=pc.prototype.notOneOf;const mc=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function _c(e){var t,n;const i=mc.exec(e);return i?{year:gc(i[1]),month:gc(i[2],1)-1,day:gc(i[3],1),hour:gc(i[4]),minute:gc(i[5]),second:gc(i[6]),millisecond:i[7]?gc(i[7].substring(0,3)):0,precision:null!=(t=null==(n=i[7])?void 0:n.length)?t:void 0,z:i[8]||void 0,plusMinus:i[9]||void 0,hourOffset:gc(i[10]),minuteOffset:gc(i[11])}:null}function gc(e,t=0){return Number(e)||t}let yc=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,vc=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,bc=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,xc=new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"),wc=e=>sc(e)||e===e.trim(),Ec={}.toString();function Ac(){return new Tc}class Tc extends pc{constructor(){super({type:"string",check:e=>(e instanceof String&&(e=e.valueOf()),"string"==typeof e)}),this.withMutation(()=>{this.transform((e,t)=>{if(!this.spec.coerce||this.isType(e))return e;if(Array.isArray(e))return e;const n=null!=e&&e.toString?e.toString():e;return n===Ec?e:n})})}required(e){return super.required(e).withMutation(t=>t.test({message:e||Wu.required,name:"required",skipAbsent:!0,test:e=>!!e.length}))}notRequired(){return super.notRequired().withMutation(e=>(e.tests=e.tests.filter(e=>"required"!==e.OPTIONS.name),e))}length(e,t=Hu.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(t){return t.length===this.resolve(e)}})}min(e,t=Hu.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t.length>=this.resolve(e)}})}max(e,t=Hu.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}matches(e,t){let n,i,r=!1;return t&&("object"==typeof t?({excludeEmptyString:r=!1,message:n,name:i}=t):n=t),this.test({name:i||"matches",message:n||Hu.matches,params:{regex:e},skipAbsent:!0,test:t=>""===t&&r||-1!==t.search(e)})}email(e=Hu.email){return this.matches(yc,{name:"email",message:e,excludeEmptyString:!0})}url(e=Hu.url){return this.matches(vc,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=Hu.uuid){return this.matches(bc,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let t,n,i="";return e&&("object"==typeof e?({message:i="",allowOffset:t=!1,precision:n}=e):i=e),this.matches(xc,{name:"datetime",message:i||Hu.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:i||Hu.datetime_offset,params:{allowOffset:t},skipAbsent:!0,test:e=>{if(!e||t)return!0;const n=_c(e);return!!n&&!!n.z}}).test({name:"datetime_precision",message:i||Hu.datetime_precision,params:{precision:n},skipAbsent:!0,test:e=>{if(!e||null==n)return!0;const t=_c(e);return!!t&&t.precision===n}})}ensure(){return this.default("").transform(e=>null===e?"":e)}trim(e=Hu.trim){return this.transform(e=>null!=e?e.trim():e).test({message:e,name:"trim",test:wc})}lowercase(e=Hu.lowercase){return this.transform(e=>sc(e)?e:e.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>sc(e)||e===e.toLowerCase()})}uppercase(e=Hu.uppercase){return this.transform(e=>sc(e)?e:e.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>sc(e)||e===e.toUpperCase()})}}Ac.prototype=Tc.prototype;function Sc(){return new kc}class kc extends pc{constructor(){super({type:"number",check:e=>(e instanceof Number&&(e=e.valueOf()),"number"==typeof e&&!(e=>e!=+e)(e))}),this.withMutation(()=>{this.transform((e,t)=>{if(!this.spec.coerce)return e;let n=e;if("string"==typeof n){if(n=n.replace(/\s/g,""),""===n)return NaN;n=+n}return this.isType(n)||null===n?n:parseFloat(n)})})}min(e,t=Ku.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t>=this.resolve(e)}})}max(e,t=Ku.max){return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(t){return t<=this.resolve(e)}})}lessThan(e,t=Ku.lessThan){return this.test({message:t,name:"max",exclusive:!0,params:{less:e},skipAbsent:!0,test(t){return t<this.resolve(e)}})}moreThan(e,t=Ku.moreThan){return this.test({message:t,name:"min",exclusive:!0,params:{more:e},skipAbsent:!0,test(t){return t>this.resolve(e)}})}positive(e=Ku.positive){return this.moreThan(0,e)}negative(e=Ku.negative){return this.lessThan(0,e)}integer(e=Ku.integer){return this.test({name:"integer",message:e,skipAbsent:!0,test:e=>Number.isInteger(e)})}truncate(){return this.transform(e=>sc(e)?e:0|e)}round(e){var t;let n=["ceil","floor","round","trunc"];if("trunc"===(e=(null==(t=e)?void 0:t.toLowerCase())||"round"))return this.truncate();if(-1===n.indexOf(e.toLowerCase()))throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform(t=>sc(t)?t:Math[e](t))}}Sc.prototype=kc.prototype;let Oc=new Date("");function Pc(){return new Cc}class Cc extends pc{constructor(){super({type:"date",check(e){return t=e,"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(e.getTime());var t}}),this.withMutation(()=>{this.transform((e,t)=>!this.spec.coerce||this.isType(e)||null===e?e:(e=function(e){const t=_c(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(void 0===t.z&&void 0===t.plusMinus)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return"Z"!==t.z&&void 0!==t.plusMinus&&(n=60*t.hourOffset+t.minuteOffset,"+"===t.plusMinus&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}(e),isNaN(e)?Cc.INVALID_DATE:new Date(e)))})}prepareParam(e,t){let n;if(rc.isRef(e))n=e;else{let i=this.cast(e);if(!this._typeCheck(i))throw new TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);n=i}return n}min(e,t=Yu.min){let n=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(e){return e>=this.resolve(n)}})}max(e,t=Yu.max){let n=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(e){return e<=this.resolve(n)}})}}function Rc(e,t){let n=1/0;return e.some((e,i)=>{var r;if(null!=(r=t.path)&&r.includes(e))return n=i,!0}),n}function Mc(e){return(t,n)=>Rc(e,t)-Rc(e,n)}Cc.INVALID_DATE=Oc,Pc.prototype=Cc.prototype,Pc.INVALID_DATE=Oc;const Lc=(e,t,n)=>{if("string"!=typeof e)return e;let i=e;try{i=JSON.parse(e)}catch(e){}return n.isType(i)?i:e};function Nc(e){if("fields"in e){const t={};for(const[n,i]of Object.entries(e.fields))t[n]=Nc(i);return e.setFields(t)}if("array"===e.type){const t=e.optional();return t.innerType&&(t.innerType=Nc(t.innerType)),t}return"tuple"===e.type?e.optional().clone({types:e.spec.types.map(Nc)}):"optional"in e?e.optional():e}let zc=e=>"[object Object]"===Object.prototype.toString.call(e);function Dc(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(e=>-1===n.indexOf(e))}const Ic=Mc([]);function Fc(e){return new jc(e)}class jc extends pc{constructor(e){super({type:"object",check:e=>zc(e)||"function"==typeof e}),this.fields=Object.create(null),this._sortErrors=Ic,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{e&&this.shape(e)})}_cast(e,t={}){var n;let i=super._cast(e,t);if(void 0===i)return this.getDefault(t);if(!this._typeCheck(i))return i;let r=this.fields,s=null!=(n=t.stripUnknown)?n:this.spec.noUnknown,o=[].concat(this._nodes,Object.keys(i).filter(e=>!this._nodes.includes(e))),a={},l=Object.assign({},t,{parent:a,__validating:t.__validating||!1}),u=!1;for(const e of o){let n=r[e],o=e in i,c=i[e];if(n){let r;l.path=(t.path?`${t.path}.`:"")+e,n=n.resolve({value:c,context:t.context,parent:a});let s=n instanceof pc?n.spec:void 0,o=null==s?void 0:s.strict;if(null!=s&&s.strip){u=u||e in i;continue}r=t.__validating&&o?c:n.cast(c,l),void 0!==r&&(a[e]=r)}else o&&!s&&(a[e]=c);o===e in a&&a[e]===c||(u=!0)}return u?a:i}_validate(e,t={},n,i){let{from:r=[],originalValue:s=e,recursive:o=this.spec.recursive}=t;t.from=[{schema:this,value:s},...r],t.__validating=!0,t.originalValue=s,super._validate(e,t,n,(e,r)=>{if(!o||!zc(r))return void i(e,r);s=s||r;let a=[];for(let e of this._nodes){let n=this.fields[e];n&&!rc.isRef(n)&&a.push(n.asNestedTest({options:t,key:e,parent:r,parentPath:t.path,originalParent:s}))}this.runTests({tests:a,value:r,originalValue:s,options:t},n,t=>{i(t.sort(this._sortErrors).concat(e),r)})})}clone(e){const t=super.clone(e);return t.fields=Object.assign({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),n=t.fields;for(let[e,t]of Object.entries(this.fields)){const i=n[e];n[e]=void 0===i?t:i}return t.withMutation(t=>t.setFields(n,[...this._excludedEdges,...e._excludedEdges]))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let t={};return this._nodes.forEach(n=>{var i;const r=this.fields[n];let s=e;null!=(i=s)&&i.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[n]})),t[n]=r&&"getDefault"in r?r.getDefault(s):void 0}),t}setFields(e,t){let n=this.clone();return n.fields=e,n._nodes=function(e,t=[]){let n=[],i=new Set,r=new Set(t.map(([e,t])=>`${e}-${t}`));function s(e,t){let s=ku.split(e)[0];i.add(s),r.has(`${t}-${s}`)||n.push([t,s])}for(const t of Object.keys(e)){let n=e[t];i.add(t),rc.isRef(n)&&n.isSibling?s(n.path,t):ec(n)&&"deps"in n&&n.deps.forEach(e=>s(e,t))}return Mu.array(Array.from(i),n).reverse()}(e,t),n._sortErrors=Mc(Object.keys(e)),t&&(n._excludedEdges=t),n}shape(e,t=[]){return this.clone().withMutation(n=>{let i=n._excludedEdges;return t.length&&(Array.isArray(t[0])||(t=[t]),i=[...n._excludedEdges,...t]),n.setFields(Object.assign(n.fields,e),i)})}partial(){const e={};for(const[t,n]of Object.entries(this.fields))e[t]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(e)}deepPartial(){return Nc(this)}pick(e){const t={};for(const n of e)this.fields[n]&&(t[n]=this.fields[n]);return this.setFields(t,this._excludedEdges.filter(([t,n])=>e.includes(t)&&e.includes(n)))}omit(e){const t=[];for(const n of Object.keys(this.fields))e.includes(n)||t.push(n);return this.pick(t)}from(e,t,n){let i=ku.getter(e,!0);return this.transform(r=>{if(!r)return r;let s=r;return((e,t)=>{const n=[...ku.normalizePath(t)];if(1===n.length)return n[0]in e;let i=n.pop(),r=ku.getter(ku.join(n),!0)(e);return!(!r||!(i in r))})(r,e)&&(s=Object.assign({},r),n||delete s[e],s[t]=i(r)),s})}json(){return this.transform(Lc)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||Xu.exact,test(e){if(null==e)return!0;const t=Dc(this.schema,e);return 0===t.length||this.createError({params:{properties:t.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,t=Xu.noUnknown){"boolean"!=typeof e&&(t=e,e=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:t,test(t){if(null==t)return!0;const n=Dc(this.schema,t);return!e||0===n.length||this.createError({params:{unknown:n.join(", ")}})}});return n.spec.noUnknown=e,n}unknown(e=!0,t=Xu.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform(t=>{if(!t)return t;const n={};for(const i of Object.keys(t))n[e(i)]=t[i];return n})}camelCase(){return this.transformKeys(Pu.camelCase)}snakeCase(){return this.transformKeys(Pu.snakeCase)}constantCase(){return this.transformKeys(e=>Pu.snakeCase(e).toUpperCase())}describe(e){const t=(e?this.resolve(e):this).clone(),n=super.describe(e);n.fields={};for(const[r,s]of Object.entries(t.fields)){var i;let t=e;null!=(i=t)&&i.value&&(t=Object.assign({},t,{parent:t.value,value:t.value[r]})),n.fields[r]=s.describe(t)}return n}}function Bc(e){return new Uc(e)}Fc.prototype=jc.prototype;class Uc extends pc{constructor(e){super({type:"array",spec:{types:e},check:e=>Array.isArray(e)}),this.innerType=void 0,this.innerType=e}_cast(e,t){const n=super._cast(e,t);if(!this._typeCheck(n)||!this.innerType)return n;let i=!1;const r=n.map((e,r)=>{const s=this.innerType.cast(e,Object.assign({},t,{path:`${t.path||""}[${r}]`,parent:n,originalValue:e,value:e,index:r}));return s!==e&&(i=!0),s});return i?r:n}_validate(e,t={},n,i){var r;let s=this.innerType,o=null!=(r=t.recursive)?r:this.spec.recursive;null!=t.originalValue&&t.originalValue,super._validate(e,t,n,(r,a)=>{var l;if(!o||!s||!this._typeCheck(a))return void i(r,a);let u=new Array(a.length);for(let n=0;n<a.length;n++){var c;u[n]=s.asNestedTest({options:t,index:n,parent:a,parentPath:t.path,originalParent:null!=(c=t.originalValue)?c:e})}this.runTests({value:a,tests:u,originalValue:null!=(l=t.originalValue)?l:e,options:t},n,e=>i(e.concat(r),a))})}clone(e){const t=super.clone(e);return t.innerType=this.innerType,t}json(){return this.transform(Lc)}concat(e){let t=super.concat(e);return t.innerType=this.innerType,e.innerType&&(t.innerType=t.innerType?t.innerType.concat(e.innerType):e.innerType),t}of(e){let t=this.clone();if(!ec(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+ju(e));return t.innerType=e,t.spec=Object.assign({},t.spec,{types:e}),t}length(e,t=Ju.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(t){return t.length===this.resolve(e)}})}min(e,t){return t=t||Ju.min,this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t.length>=this.resolve(e)}})}max(e,t){return t=t||Ju.max,this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}ensure(){return this.default(()=>[]).transform((e,t)=>this._typeCheck(e)?e:null==t?[]:[].concat(t))}compact(e){let t=e?(t,n,i)=>!e(t,n,i):e=>!!e;return this.transform(e=>null!=e?e.filter(t):e)}describe(e){const t=(e?this.resolve(e):this).clone(),n=super.describe(e);if(t.innerType){var i;let r=e;null!=(i=r)&&i.value&&(r=Object.assign({},r,{parent:r.value,value:r.value[0]})),n.innerType=t.innerType.describe(r)}return n}}Bc.prototype=Uc.prototype;const Vc="Данное поле обязательно для заполнения",Gc=()=>Ac(),$c=(e=Vc)=>Gc().required(e),Zc=Sc(),qc=Zc.required(Vc),Wc=Bc(),Hc=Pc(),Kc=Hc.required(Vc),Yc=({items:e,onOpen:t,defaultValue:n=null})=>{const[i,l]=T.useState(n),u=T.useCallback(()=>{l(null)},[]);T.useEffect(()=>{n&&l(n)},[n]);const c=T.useId();return H(r,{id:c,children:e.map(({value:e,summary:n,getDetails:r})=>{const h=`${c}-accordion-${e}`;return K(s,{expanded:e===i,children:[H(o,{expandIcon:H(ne,{}),onClick:()=>{l(n=>n===e?null:(t?.(e),e))},"aria-controls":`${h}-content`,id:`${h}-header`,children:n}),H(a,{children:r({onClose:u})})]},h)})})},Xc=e=>{const{children:t,variant:n="contained",loading:i,icon:r,sx:s,...o}=e;return r?H(ie,{...o,loading:i,children:r}):H(l,{sx:{whiteSpace:"nowrap",padding:"5px 15px",textTransform:"none",...s},loading:i,loadingPosition:"start",variant:n,...o,children:t})},Jc={reset:le,edit:oe,move:ae,save:ue,delete:se,clear:re},Qc=u(c)(()=>({padding:0})),eh=({title:e,iconProps:t,...n})=>{const i=T.useId(),r=Jc[t.name],s=t.color??"primary";return e?H(h,{title:e,children:H(Qc,{id:i,...n,onClick:e=>{e.stopPropagation(),n.onClick?.(e)},children:H(r,{fontSize:"medium",color:s})})}):H(Qc,{id:i,...n,onClick:e=>{e.stopPropagation(),n.onClick?.(e)},children:H(r,{fontSize:"medium",color:s})})},th=T.forwardRef(function(e,t){return H(d,{direction:"up",ref:t,...e})}),nh=({notification:e,onDelete:t,disabled:n=!1,...i})=>{const r=T.useId(),[s,o]=T.useState(!1),a=()=>{o(!1)},u=T.useMemo(()=>({name:"delete",color:n?"disabled":"error"}),[n]);return K(T.Fragment,{children:[e?H(h,{title:e.title,children:H(eh,{...i,iconProps:u,onClick:()=>{o(!0)},disabled:n})}):H(eh,{...i,iconProps:u,onClick:t,disabled:n}),e?K(f,{slots:{transition:th},open:s,onClose:a,children:[H(p,{id:`${r}-dialog-title`,children:e.title}),H(m,{children:H(_,{id:`${r}-dialog-text`,children:e.description})}),K(g,{children:[H(l,{variant:"contained",color:"error",sx:{textTransform:"none"},onClick:a,children:"Отмена"}),H(l,{variant:"contained",sx:{textTransform:"none"},onClick:()=>{t(),a()},children:"Подтвердить"})]})]}):null]})},ih=u("input")({clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:1,overflow:"hidden",position:"absolute",bottom:0,left:0,whiteSpace:"nowrap",width:1}),rh=({children:e,accept:t,onFilesLoad:n,...i})=>K(Xc,{...i,component:"label",variant:"contained",startIcon:H(ce,{}),children:[e,H(ih,{type:"file",accept:t,onChange:e=>{const{target:{files:t}}=e;t&&n({event:e,files:t})},multiple:!0})]});var sh=$l(({name:e,title:t,description:n,onSuccess:i,onOpen:r,onClose:s,theme:o="info",agreeButton:a,disagreeButton:l,content:u})=>{const c=T.useId(),h=T.useId(),d=T.useId(),v=na.getIsOpen(e),b=()=>{na.close(e)};return T.useEffect(()=>{v?r?.():s?.()},[v]),K(f,{id:c,open:v,onClose:b,"aria-labelledby":h,"aria-describedby":d,children:[H(p,{id:h,sx:({palette:e})=>({background:e[o].main,color:e[o].contrastText}),children:t}),H(y,{}),K(m,{sx:({spacing:e})=>({display:"grid",gap:e(2)}),children:[H(_,{id:d,children:n}),u?K(T.Fragment,{children:[H(y,{}),u]}):null]}),H(y,{}),K(g,{children:[H(Xc,{color:"error",onClick:b,disabled:l?.disabled,children:l?.text??"Закрыть"}),H(Xc,{color:"success",onClick:()=>{i(),b()},disabled:a?.disabled,children:a?.text??"Подтвердить"})]})]})});const oh=({children:e,sx:t,...n})=>H(r,{...n,sx:e=>{const{spacing:n,shadows:i}=e;return{p:n(2),borderRadius:"12px",boxShadow:i,maxHeight:"85vh",maxWidth:"85vw",overflowX:"auto",...t?.(e)}},children:e});var ah=e=>"checkbox"===e.type,lh=e=>e instanceof Date,uh=e=>null==e;const ch=e=>"object"==typeof e;var hh=e=>!uh(e)&&!Array.isArray(e)&&ch(e)&&!lh(e),dh=e=>hh(e)&&e.target?ah(e.target)?e.target.checked:e.target.value:e,fh=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),ph="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function mh(e){if(e instanceof Date)return new Date(e);const t="undefined"!=typeof FileList&&e instanceof FileList;if(ph&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!(n||hh(e)&&(e=>{const t=e.constructor&&e.constructor.prototype;return hh(t)&&t.hasOwnProperty("isPrototypeOf")})(e)))return e;const i=n?[]:Object.create(Object.getPrototypeOf(e));for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=mh(e[t]));return i}var _h=e=>/^\w*$/.test(e),gh=e=>void 0===e,yh=e=>Array.isArray(e)?e.filter(Boolean):[],vh=e=>yh(e.replace(/["|']|\]/g,"").split(/\.|\[/)),bh=(e,t,n)=>{if(!t||!hh(e))return n;const i=(_h(t)?[t]:vh(t)).reduce((e,t)=>uh(e)?e:e[t],e);return gh(i)||i===e?gh(e[t])?n:e[t]:i},xh=e=>"boolean"==typeof e,wh=e=>"function"==typeof e,Eh=(e,t,n)=>{let i=-1;const r=_h(t)?[t]:vh(t),s=r.length,o=s-1;for(;++i<s;){const t=r[i];let s=n;if(i!==o){const n=e[t];s=hh(n)||Array.isArray(n)?n:isNaN(+r[i+1])?{}:[]}if("__proto__"===t||"constructor"===t||"prototype"===t)return;e[t]=s,e=e[t]}};const Ah="blur",Th="focusout",Sh="change",kh="onBlur",Oh="onChange",Ph="onSubmit",Ch="onTouched",Rh="all",Mh="max",Lh="min",Nh="maxLength",zh="minLength",Dh="pattern",Ih="required",Fh="validate",jh=S.createContext(null);jh.displayName="HookFormControlContext";const Bh=()=>S.useContext(jh);var Uh=(e,t,n,i=!0)=>{const r={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(r,s,{get:()=>{const r=s;return t._proxyFormState[r]!==Rh&&(t._proxyFormState[r]=!i||Rh),n&&(n[r]=!0),e[r]}});return r};const Vh="undefined"!=typeof window?S.useLayoutEffect:S.useEffect;var Gh=e=>"string"==typeof e,$h=(e,t,n,i,r)=>Gh(e)?(i&&t.watch.add(e),bh(n,e,r)):Array.isArray(e)?e.map(e=>(i&&t.watch.add(e),bh(n,e))):(i&&(t.watchAll=!0),n),Zh=e=>uh(e)||!ch(e);function qh(e,t,n=new WeakSet){if(Zh(e)||Zh(t))return Object.is(e,t);if(lh(e)&&lh(t))return Object.is(e.getTime(),t.getTime());const i=Object.keys(e),r=Object.keys(t);if(i.length!==r.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const s of i){const i=e[s];if(!r.includes(s))return!1;if("ref"!==s){const e=t[s];if(lh(i)&&lh(e)||hh(i)&&hh(e)||Array.isArray(i)&&Array.isArray(e)?!qh(i,e,n):!Object.is(i,e))return!1}}return!0}function Wh(e){const t=Bh(),{name:n,disabled:i,control:r=t,shouldUnregister:s,defaultValue:o,exact:a=!0}=e,l=fh(r._names.array,n),u=S.useMemo(()=>bh(r._formValues,n,bh(r._defaultValues,n,o)),[r,n,o]),c=function(e){const t=Bh(),{control:n=t,name:i,defaultValue:r,disabled:s,exact:o,compute:a}=e||{},l=S.useRef(r),u=S.useRef(a),c=S.useRef(void 0),h=S.useRef(n),d=S.useRef(i);u.current=a;const[f,p]=S.useState(()=>{const e=n._getWatch(i,l.current);return u.current?u.current(e):e}),m=S.useCallback(e=>{const t=$h(i,n._names,e||n._formValues,!1,l.current);return u.current?u.current(t):t},[n._formValues,n._names,i]),_=S.useCallback(e=>{if(!s){const t=$h(i,n._names,e||n._formValues,!1,l.current);if(u.current){const e=u.current(t);qh(e,c.current)||(p(e),c.current=e)}else p(t)}},[n._formValues,n._names,s,i]);Vh(()=>(h.current===n&&qh(d.current,i)||(h.current=n,d.current=i,_()),n._subscribe({name:i,formState:{values:!0},exact:o,callback:e=>{_(e.values)}})),[n,o,i,_]),S.useEffect(()=>n._removeUnmounted());const g=h.current!==n,y=d.current,v=S.useMemo(()=>{if(s)return null;const e=!g&&!qh(y,i);return g||e?m():null},[s,g,i,y,m]);return null!==v?v:f}({control:r,name:n,defaultValue:u,exact:a}),h=function(e){const t=Bh(),{control:n=t,disabled:i,name:r,exact:s}=e||{},[o,a]=S.useState(n._formState),l=S.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Vh(()=>n._subscribe({name:r,formState:l.current,exact:s,callback:e=>{!i&&a({...n._formState,...e})}}),[r,i,s]),S.useEffect(()=>{l.current.isValid&&n._setValid(!0)},[n]),S.useMemo(()=>Uh(o,n,l.current,!1),[o,n])}({control:r,name:n,exact:a}),d=S.useRef(e),f=S.useRef(void 0),p=S.useRef(r.register(n,{...e.rules,value:c,...xh(e.disabled)?{disabled:e.disabled}:{}}));d.current=e;const m=S.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!bh(h.errors,n)},isDirty:{enumerable:!0,get:()=>!!bh(h.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!bh(h.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!bh(h.validatingFields,n)},error:{enumerable:!0,get:()=>bh(h.errors,n)}}),[h,n]),_=S.useCallback(e=>p.current.onChange({target:{value:dh(e),name:n},type:Sh}),[n]),g=S.useCallback(()=>p.current.onBlur({target:{value:bh(r._formValues,n),name:n},type:Ah}),[n,r._formValues]),y=S.useCallback(e=>{const t=bh(r._fields,n);t&&t._f&&e&&(t._f.ref={focus:()=>wh(e.focus)&&e.focus(),select:()=>wh(e.select)&&e.select(),setCustomValidity:t=>wh(e.setCustomValidity)&&e.setCustomValidity(t),reportValidity:()=>wh(e.reportValidity)&&e.reportValidity()})},[r._fields,n]),v=S.useMemo(()=>({name:n,value:c,...xh(i)||h.disabled?{disabled:h.disabled||i}:{},onChange:_,onBlur:g,ref:y}),[n,i,h.disabled,_,g,y,c]);return S.useEffect(()=>{const e=r._options.shouldUnregister||s,t=f.current;t&&t!==n&&!l&&r.unregister(t),r.register(n,{...d.current.rules,...xh(d.current.disabled)?{disabled:d.current.disabled}:{}});const i=(e,t)=>{const n=bh(r._fields,e);n&&n._f&&(n._f.mount=t)};if(i(n,!0),e){const e=mh(bh(r._options.defaultValues,n,d.current.defaultValue));Eh(r._defaultValues,n,e),gh(bh(r._formValues,n))&&Eh(r._formValues,n,e)}return!l&&r.register(n),f.current=n,()=>{(l?e&&!r._state.action:e)?r.unregister(n):i(n,!1)}},[n,r,l,s]),S.useEffect(()=>{r._setDisabledField({disabled:i,name:n})},[i,n,r]),S.useMemo(()=>({field:v,formState:h,fieldState:m}),[v,h,m])}const Hh=e=>e.render(Wh(e)),Kh=S.createContext(null);Kh.displayName="HookFormContext";const Yh=()=>S.useContext(Kh),Xh=e=>{const{children:t,watch:n,getValues:i,getFieldState:r,setError:s,clearErrors:o,setValue:a,trigger:l,formState:u,resetField:c,reset:h,handleSubmit:d,unregister:f,control:p,register:m,setFocus:_,subscribe:g}=e;return S.createElement(Kh.Provider,{value:S.useMemo(()=>({watch:n,getValues:i,getFieldState:r,setError:s,clearErrors:o,setValue:a,trigger:l,formState:u,resetField:c,reset:h,handleSubmit:d,unregister:f,control:p,register:m,setFocus:_,subscribe:g}),[o,p,u,r,i,d,m,h,c,s,_,a,g,l,f,n])},S.createElement(jh.Provider,{value:p},t))};var Jh=(e,t,n,i,r)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[i]:r||!0}}:{},Qh=e=>Array.isArray(e)?e:[e],ed=()=>{let e=[];return{get observers(){return e},next:t=>{for(const n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(e=>e!==t)}}),unsubscribe:()=>{e=[]}}};function td(e,t){const n={};for(const i in e)if(e.hasOwnProperty(i)){const r=e[i],s=t[i];if(r&&hh(r)&&s){const e=td(r,s);hh(e)&&(n[i]=e)}else e[i]&&(n[i]=s)}return n}var nd=e=>hh(e)&&!Object.keys(e).length,id=e=>"file"===e.type,rd=e=>{if(!ph)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},sd=e=>"select-multiple"===e.type,od=e=>"radio"===e.type,ad=e=>rd(e)&&e.isConnected;function ld(e,t){const n=Array.isArray(t)?t:_h(t)?[t]:vh(t),i=1===n.length?e:function(e,t){const n=t.slice(0,-1).length;let i=0;for(;i<n;)e=gh(e)?i++:e[t[i++]];return e}(e,n),r=n.length-1,s=n[r];return i&&delete i[s],0!==r&&(hh(i)&&nd(i)||Array.isArray(i)&&function(e){for(const t in e)if(e.hasOwnProperty(t)&&!gh(e[t]))return!1;return!0}(i))&&ld(e,n.slice(0,-1)),e}function ud(e){return Array.isArray(e)||hh(e)&&!(e=>{for(const t in e)if(wh(e[t]))return!0;return!1})(e)}function cd(e,t={}){for(const n in e){const i=e[n];ud(i)?(t[n]=Array.isArray(i)?[]:{},cd(i,t[n])):gh(i)||(t[n]=!0)}return t}function hd(e,t,n){n||(n=cd(t));for(const i in e){const r=e[i];if(ud(r))gh(t)||Zh(n[i])?n[i]=cd(r,Array.isArray(r)?[]:{}):hd(r,uh(t)?{}:t[i],n[i]);else{const e=t[i];n[i]=!qh(r,e)}}return n}const dd={value:!1,isValid:!1},fd={value:!0,isValid:!0};var pd=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!gh(e[0].attributes.value)?gh(e[0].value)||""===e[0].value?fd:{value:e[0].value,isValid:!0}:fd:dd}return dd},md=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:i})=>gh(e)?e:t?""===e?NaN:e?+e:e:n&&Gh(e)?new Date(e):i?i(e):e;const _d={isValid:!1,value:null};var gd=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,_d):_d;function yd(e){const t=e.ref;return id(t)?t.files:od(t)?gd(e.refs).value:sd(t)?[...t.selectedOptions].map(({value:e})=>e):ah(t)?pd(e.refs).value:md(gh(t.value)?e.ref.value:t.value,e)}var vd=e=>e instanceof RegExp,bd=e=>gh(e)?e:vd(e)?e.source:hh(e)?vd(e.value)?e.value.source:e.value:e,xd=e=>({isOnSubmit:!e||e===Ph,isOnBlur:e===kh,isOnChange:e===Oh,isOnAll:e===Rh,isOnTouch:e===Ch});const wd="AsyncFunction";var Ed=e=>!!e&&!!e.validate&&!!(wh(e.validate)&&e.validate.constructor.name===wd||hh(e.validate)&&Object.values(e.validate).find(e=>e.constructor.name===wd)),Ad=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))));const Td=(e,t,n,i)=>{for(const r of n||Object.keys(e)){const n=bh(e,r);if(n){const{_f:e,...s}=n;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],r)&&!i)return!0;if(e.ref&&t(e.ref,e.name)&&!i)return!0;if(Td(s,t))break}else if(hh(s)&&Td(s,t))break}}};function Sd(e,t,n){const i=bh(e,n);if(i||_h(n))return{error:i,name:n};const r=n.split(".");for(;r.length;){const i=r.join("."),s=bh(t,i),o=bh(e,i);if(s&&!Array.isArray(s)&&n!==i)return{name:n};if(o&&o.type)return{name:i,error:o};if(o&&o.root&&o.root.type)return{name:`${i}.root`,error:o.root};r.pop()}return{name:n}}var kd=(e,t,n)=>{const i=Qh(bh(e,n));return Eh(i,"root",t[n]),Eh(e,n,i),e};function Od(e,t,n="validate"){if(Gh(e)||Array.isArray(e)&&e.every(Gh)||xh(e)&&!e)return{type:n,message:Gh(e)?e:"",ref:t}}var Pd=e=>hh(e)&&!vd(e)?e:{value:e,message:""},Cd=async(e,t,n,i,r,s)=>{const{ref:o,refs:a,required:l,maxLength:u,minLength:c,min:h,max:d,pattern:f,validate:p,name:m,valueAsNumber:_,mount:g}=e._f,y=bh(n,m);if(!g||t.has(m))return{};const v=a?a[0]:o,b=e=>{r&&v.reportValidity&&(v.setCustomValidity(xh(e)?"":e||""),v.reportValidity())},x={},w=od(o),E=ah(o),A=w||E,T=(_||id(o))&&gh(o.value)&&gh(y)||rd(o)&&""===o.value||""===y||Array.isArray(y)&&!y.length,S=Jh.bind(null,m,i,x),k=(e,t,n,i=Nh,r=zh)=>{const s=e?t:n;x[m]={type:e?i:r,message:s,ref:o,...S(e?i:r,s)}};if(s?!Array.isArray(y)||!y.length:l&&(!A&&(T||uh(y))||xh(y)&&!y||E&&!pd(a).isValid||w&&!gd(a).isValid)){const{value:e,message:t}=Gh(l)?{value:!!l,message:l}:Pd(l);if(e&&(x[m]={type:Ih,message:t,ref:v,...S(Ih,t)},!i))return b(t),x}if(!(T||uh(h)&&uh(d))){let e,t;const n=Pd(d),r=Pd(h);if(uh(y)||isNaN(y)){const i=o.valueAsDate||new Date(y),s=e=>new Date((new Date).toDateString()+" "+e),a="time"==o.type,l="week"==o.type;Gh(n.value)&&y&&(e=a?s(y)>s(n.value):l?y>n.value:i>new Date(n.value)),Gh(r.value)&&y&&(t=a?s(y)<s(r.value):l?y<r.value:i<new Date(r.value))}else{const i=o.valueAsNumber||(y?+y:y);uh(n.value)||(e=i>n.value),uh(r.value)||(t=i<r.value)}if((e||t)&&(k(!!e,n.message,r.message,Mh,Lh),!i))return b(x[m].message),x}if((u||c)&&!T&&(Gh(y)||s&&Array.isArray(y))){const e=Pd(u),t=Pd(c),n=!uh(e.value)&&y.length>+e.value,r=!uh(t.value)&&y.length<+t.value;if((n||r)&&(k(n,e.message,t.message),!i))return b(x[m].message),x}if(f&&!T&&Gh(y)){const{value:e,message:t}=Pd(f);if(vd(e)&&!y.match(e)&&(x[m]={type:Dh,message:t,ref:o,...S(Dh,t)},!i))return b(t),x}if(p)if(wh(p)){const e=Od(await p(y,n),v);if(e&&(x[m]={...e,...S(Fh,e.message)},!i))return b(e.message),x}else if(hh(p)){let e={};for(const t in p){if(!nd(e)&&!i)break;const r=Od(await p[t](y,n),v,t);r&&(e={...r,...S(t,r.message)},b(r.message),i&&(x[m]=e))}if(!nd(e)&&(x[m]={ref:v,...e},!i))return x}return b(!0),x};const Rd={mode:Ph,reValidateMode:Oh,shouldFocusError:!0};function Md(e={}){let t,n={...Rd,...e},i={submitCount:0,isDirty:!1,isReady:!1,isLoading:wh(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:n.errors||{},disabled:n.disabled||!1},r={},s=(hh(n.defaultValues)||hh(n.values))&&mh(n.defaultValues||n.values)||{},o=n.shouldUnregister?{}:mh(s),a={action:!1,mount:!1,watch:!1,keepIsValid:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},u=0;const c={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},h={...c};let d={...h};const f={array:ed(),state:ed()},p=n.criteriaMode===Rh,m=async e=>{if(!a.keepIsValid&&!n.disabled&&(h.isValid||d.isValid||e)){let e;n.resolver?(e=nd((await b()).errors),_()):e=await x(r,!0),e!==i.isValid&&f.state.next({isValid:e})}},_=(e,t)=>{!n.disabled&&(h.isValidating||h.validatingFields||d.isValidating||d.validatingFields)&&((e||Array.from(l.mount)).forEach(e=>{e&&(t?Eh(i.validatingFields,e,t):ld(i.validatingFields,e))}),f.state.next({validatingFields:i.validatingFields,isValidating:!nd(i.validatingFields)}))},g=(e,t,n,i)=>{const l=bh(r,e);if(l){const r=bh(o,e,gh(n)?bh(s,e):n);gh(r)||i&&i.defaultChecked||t?Eh(o,e,t?r:yd(l._f)):A(e,r),a.mount&&!a.action&&m()}},y=(e,t,r,o,a)=>{let l=!1,u=!1;const c={name:e};if(!n.disabled){if(!r||o){(h.isDirty||d.isDirty)&&(u=i.isDirty,i.isDirty=c.isDirty=w(),l=u!==c.isDirty);const n=qh(bh(s,e),t);u=!!bh(i.dirtyFields,e),n?ld(i.dirtyFields,e):Eh(i.dirtyFields,e,!0),c.dirtyFields=i.dirtyFields,l=l||(h.dirtyFields||d.dirtyFields)&&u!==!n}if(r){const t=bh(i.touchedFields,e);t||(Eh(i.touchedFields,e,r),c.touchedFields=i.touchedFields,l=l||(h.touchedFields||d.touchedFields)&&t!==r)}l&&a&&f.state.next(c)}return l?c:{}},v=(e,r,s,o)=>{const a=bh(i.errors,e),l=(h.isValid||d.isValid)&&xh(r)&&i.isValid!==r;var c;if(n.delayError&&s?(c=()=>((e,t)=>{Eh(i.errors,e,t),f.state.next({errors:i.errors})})(e,s),t=e=>{clearTimeout(u),u=setTimeout(c,e)},t(n.delayError)):(clearTimeout(u),t=null,s?Eh(i.errors,e,s):ld(i.errors,e)),(s?!qh(a,s):a)||!nd(o)||l){const t={...o,...l&&xh(r)?{isValid:r}:{},errors:i.errors,name:e};i={...i,...t},f.state.next(t)}},b=async e=>{_(e,!0);const t=await n.resolver(o,n.context,((e,t,n,i)=>{const r={};for(const n of e){const e=bh(t,n);e&&Eh(r,n,e._f)}return{criteriaMode:n,names:[...e],fields:r,shouldUseNativeValidation:i}})(e||l.mount,r,n.criteriaMode,n.shouldUseNativeValidation));return t},x=async(t,r,s={valid:!0})=>{for(const a in t){const u=t[a];if(u){const{_f:t,...a}=u;if(t){const a=l.array.has(t.name),c=u._f&&Ed(u._f);c&&h.validatingFields&&_([t.name],!0);const d=await Cd(u,l.disabled,o,p,n.shouldUseNativeValidation&&!r,a);if(c&&h.validatingFields&&_([t.name]),d[t.name]&&(s.valid=!1,r||e.shouldUseNativeValidation))break;!r&&(bh(d,t.name)?a?kd(i.errors,d,t.name):Eh(i.errors,t.name,d[t.name]):ld(i.errors,t.name))}!nd(a)&&await x(a,r,s)}}return s.valid},w=(e,t)=>!n.disabled&&(e&&t&&Eh(o,e,t),!qh(C(),s)),E=(e,t,n)=>$h(e,l,{...a.mount?o:gh(t)?s:Gh(e)?{[e]:t}:t},n,t),A=(e,t,n={})=>{const i=bh(r,e);let s=t;if(i){const n=i._f;n&&(!n.disabled&&Eh(o,e,md(t,n)),s=rd(n.ref)&&uh(t)?"":t,sd(n.ref)?[...n.ref.options].forEach(e=>e.selected=s.includes(e.value)):n.refs?ah(n.ref)?n.refs.forEach(e=>{e.defaultChecked&&e.disabled||(Array.isArray(s)?e.checked=!!s.find(t=>t===e.value):e.checked=s===e.value||!!s)}):n.refs.forEach(e=>e.checked=e.value===s):id(n.ref)?n.ref.value="":(n.ref.value=s,n.ref.type||f.state.next({name:e,values:mh(o)})))}(n.shouldDirty||n.shouldTouch)&&y(e,s,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&P(e)},T=(e,t,n)=>{for(const i in t){if(!t.hasOwnProperty(i))return;const s=t[i],o=e+"."+i,a=bh(r,o);(l.array.has(e)||hh(s)||a&&!a._f)&&!lh(s)?T(o,s,n):A(o,s,n)}},S=(e,t,n={})=>{const u=bh(r,e),c=l.array.has(e),p=mh(t);Eh(o,e,p),c?(f.array.next({name:e,values:mh(o)}),(h.isDirty||h.dirtyFields||d.isDirty||d.dirtyFields)&&n.shouldDirty&&f.state.next({name:e,dirtyFields:hd(s,o),isDirty:w(e,p)})):!u||u._f||uh(p)?A(e,p,n):T(e,p,n),Ad(e,l)?f.state.next({...i,name:e,values:mh(o)}):f.state.next({name:a.mount?e:void 0,values:mh(o)})},k=async e=>{a.mount=!0;const s=e.target;let u=s.name,c=!0;const g=bh(r,u),w=e=>{c=Number.isNaN(e)||lh(e)&&isNaN(e.getTime())||qh(e,bh(o,u,e))},E=xd(n.mode),A=xd(n.reValidateMode);if(g){let a,S;const k=s.type?yd(g._f):dh(e),O=e.type===Ah||e.type===Th,C=!((T=g._f).mount&&(T.required||T.min||T.max||T.maxLength||T.minLength||T.pattern||T.validate)||n.resolver||bh(i.errors,u)||g._f.deps)||((e,t,n,i,r)=>!r.isOnAll&&(!n&&r.isOnTouch?!(t||e):(n?i.isOnBlur:r.isOnBlur)?!e:!(n?i.isOnChange:r.isOnChange)||e))(O,bh(i.touchedFields,u),i.isSubmitted,A,E),R=Ad(u,l,O);Eh(o,u,k),O?s&&s.readOnly||(g._f.onBlur&&g._f.onBlur(e),t&&t(0)):g._f.onChange&&g._f.onChange(e);const M=y(u,k,O),L=!nd(M)||R;if(!O&&f.state.next({name:u,type:e.type,values:mh(o)}),C)return(h.isValid||d.isValid)&&("onBlur"===n.mode?O&&m():O||m()),L&&f.state.next({name:u,...R?{}:M});if(!O&&R&&f.state.next({...i}),n.resolver){const{errors:e}=await b([u]);if(_([u]),w(k),c){const t=Sd(i.errors,r,u),n=Sd(e,r,t.name||u);a=n.error,u=n.name,S=nd(e)}}else _([u],!0),a=(await Cd(g,l.disabled,o,p,n.shouldUseNativeValidation))[u],_([u]),w(k),c&&(a?S=!1:(h.isValid||d.isValid)&&(S=await x(r,!0)));c&&(g._f.deps&&(!Array.isArray(g._f.deps)||g._f.deps.length>0)&&P(g._f.deps),v(u,S,a,M))}var T},O=(e,t)=>{if(bh(i.errors,t)&&e.focus)return e.focus(),1},P=async(e,t={})=>{let s,o;const a=Qh(e);if(n.resolver){const t=await(async e=>{const{errors:t}=await b(e);if(_(e),e)for(const n of e){const e=bh(t,n);e?Eh(i.errors,n,e):ld(i.errors,n)}else i.errors=t;return t})(gh(e)?e:a);s=nd(t),o=e?!a.some(e=>bh(t,e)):s}else e?(o=(await Promise.all(a.map(async e=>{const t=bh(r,e);return await x(t&&t._f?{[e]:t}:t)}))).every(Boolean),(o||i.isValid)&&m()):o=s=await x(r);return f.state.next({...!Gh(e)||(h.isValid||d.isValid)&&s!==i.isValid?{}:{name:e},...n.resolver||!e?{isValid:s}:{},errors:i.errors}),t.shouldFocus&&!o&&Td(r,O,e?a:l.mount),o},C=(e,t)=>{let n={...a.mount?o:s};return t&&(n=td(t.dirtyFields?i.dirtyFields:i.touchedFields,n)),gh(e)?n:Gh(e)?bh(n,e):e.map(e=>bh(n,e))},R=(e,t)=>({invalid:!!bh((t||i).errors,e),isDirty:!!bh((t||i).dirtyFields,e),error:bh((t||i).errors,e),isValidating:!!bh(i.validatingFields,e),isTouched:!!bh((t||i).touchedFields,e)}),M=(e,t,n)=>{const s=(bh(r,e,{_f:{}})._f||{}).ref,o=bh(i.errors,e)||{},{ref:a,message:l,type:u,...c}=o;Eh(i.errors,e,{...c,...t,ref:s}),f.state.next({name:e,errors:i.errors,isValid:!1}),n&&n.shouldFocus&&s&&s.focus&&s.focus()},L=e=>f.state.subscribe({next:t=>{var n,r,a;n=e.name,r=t.name,a=e.exact,n&&r&&n!==r&&!Qh(n).some(e=>e&&(a?e===r:e.startsWith(r)||r.startsWith(e)))||!((e,t,n,i)=>{n(e);const{name:r,...s}=e;return nd(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(e=>t[e]===(!i||Rh))})(t,e.formState||h,U,e.reRenderRoot)||e.callback({values:{...o},...i,...t,defaultValues:s})}}).unsubscribe,N=(e,t={})=>{for(const a of e?Qh(e):l.mount)l.mount.delete(a),l.array.delete(a),t.keepValue||(ld(r,a),ld(o,a)),!t.keepError&&ld(i.errors,a),!t.keepDirty&&ld(i.dirtyFields,a),!t.keepTouched&&ld(i.touchedFields,a),!t.keepIsValidating&&ld(i.validatingFields,a),!n.shouldUnregister&&!t.keepDefaultValue&&ld(s,a);f.state.next({values:mh(o)}),f.state.next({...i,...t.keepDirty?{isDirty:w()}:{}}),!t.keepIsValid&&m()},z=({disabled:e,name:t})=>{if(xh(e)&&a.mount||e||l.disabled.has(t)){const n=l.disabled.has(t)!==!!e;e?l.disabled.add(t):l.disabled.delete(t),n&&a.mount&&!a.action&&m()}},D=(e,t={})=>{let i=bh(r,e);const o=xh(t.disabled)||xh(n.disabled);return Eh(r,e,{...i||{},_f:{...i&&i._f?i._f:{ref:{name:e}},name:e,mount:!0,...t}}),l.mount.add(e),i?z({disabled:xh(t.disabled)?t.disabled:n.disabled,name:e}):g(e,!0,t.value),{...o?{disabled:t.disabled||n.disabled}:{},...n.progressive?{required:!!t.required,min:bd(t.min),max:bd(t.max),minLength:bd(t.minLength),maxLength:bd(t.maxLength),pattern:bd(t.pattern)}:{},name:e,onChange:k,onBlur:k,ref:o=>{if(o){D(e,t),i=bh(r,e);const n=gh(o.value)&&o.querySelectorAll&&o.querySelectorAll("input,select,textarea")[0]||o,a=(e=>od(e)||ah(e))(n),l=i._f.refs||[];if(a?l.find(e=>e===n):n===i._f.ref)return;Eh(r,e,{_f:{...i._f,...a?{refs:[...l.filter(ad),n,...Array.isArray(bh(s,e))?[{}]:[]],ref:{type:n.type,name:e}}:{ref:n}}}),g(e,!1,void 0,n)}else i=bh(r,e,{}),i._f&&(i._f.mount=!1),(n.shouldUnregister||t.shouldUnregister)&&(!fh(l.array,e)||!a.action)&&l.unMount.add(e)}}},I=()=>n.shouldFocusError&&Td(r,O,l.mount),F=(e,t)=>async s=>{let a;s&&(s.preventDefault&&s.preventDefault(),s.persist&&s.persist());let u=mh(o);if(f.state.next({isSubmitting:!0}),n.resolver){const{errors:e,values:t}=await b();_(),i.errors=e,u=mh(t)}else await x(r);if(l.disabled.size)for(const e of l.disabled)ld(u,e);if(ld(i.errors,"root"),nd(i.errors)){f.state.next({errors:{}});try{await e(u,s)}catch(e){a=e}}else t&&await t({...i.errors},s),I(),setTimeout(I);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:nd(i.errors)&&!a,submitCount:i.submitCount+1,errors:i.errors}),a)throw a},j=(e,t={})=>{const u=e?mh(e):s,c=mh(u),d=nd(e),p=d?s:c;if(t.keepDefaultValues||(s=u),!t.keepValues){if(t.keepDirtyValues){const e=new Set([...l.mount,...Object.keys(hd(s,o))]);for(const t of Array.from(e)){const e=bh(i.dirtyFields,t),n=bh(o,t),r=bh(p,t);e&&!gh(n)?Eh(p,t,n):e||gh(r)||S(t,r)}}else{if(ph&&gh(e))for(const e of l.mount){const t=bh(r,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(rd(e)){const t=e.closest("form");if(t){t.reset();break}}}}if(t.keepFieldsRef)for(const e of l.mount)S(e,bh(p,e));else r={}}o=n.shouldUnregister?t.keepDefaultValues?mh(s):{}:mh(p),f.array.next({values:{...p}}),f.state.next({values:{...p}})}l={mount:t.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!h.isValid||!!t.keepIsValid||!!t.keepDirtyValues||!n.shouldUnregister&&!nd(p),a.watch=!!n.shouldUnregister,a.keepIsValid=!!t.keepIsValid,a.action=!1,t.keepErrors||(i.errors={}),f.state.next({submitCount:t.keepSubmitCount?i.submitCount:0,isDirty:!d&&(t.keepDirty?i.isDirty:!(!t.keepDefaultValues||qh(e,s))),isSubmitted:!!t.keepIsSubmitted&&i.isSubmitted,dirtyFields:d?{}:t.keepDirtyValues?t.keepDefaultValues&&o?hd(s,o):i.dirtyFields:t.keepDefaultValues&&e?hd(s,e):t.keepDirty?i.dirtyFields:{},touchedFields:t.keepTouched?i.touchedFields:{},errors:t.keepErrors?i.errors:{},isSubmitSuccessful:!!t.keepIsSubmitSuccessful&&i.isSubmitSuccessful,isSubmitting:!1,defaultValues:s})},B=(e,t)=>j(wh(e)?e(o):e,{...n.resetOptions,...t}),U=e=>{i={...i,...e}},V={control:{register:D,unregister:N,getFieldState:R,handleSubmit:F,setError:M,_subscribe:L,_runSchema:b,_updateIsValidating:_,_focusError:I,_getWatch:E,_getDirty:w,_setValid:m,_setFieldArray:(e,t=[],l,u,c=!0,p=!0)=>{if(u&&l&&!n.disabled){if(a.action=!0,p&&Array.isArray(bh(r,e))){const t=l(bh(r,e),u.argA,u.argB);c&&Eh(r,e,t)}if(p&&Array.isArray(bh(i.errors,e))){const t=l(bh(i.errors,e),u.argA,u.argB);c&&Eh(i.errors,e,t),((e,t)=>{!yh(bh(e,t)).length&&ld(e,t)})(i.errors,e)}if((h.touchedFields||d.touchedFields)&&p&&Array.isArray(bh(i.touchedFields,e))){const t=l(bh(i.touchedFields,e),u.argA,u.argB);c&&Eh(i.touchedFields,e,t)}(h.dirtyFields||d.dirtyFields)&&(i.dirtyFields=hd(s,o)),f.state.next({name:e,isDirty:w(e,t),dirtyFields:i.dirtyFields,errors:i.errors,isValid:i.isValid})}else Eh(o,e,t)},_setDisabledField:z,_setErrors:e=>{i.errors=e,f.state.next({errors:i.errors,isValid:!1})},_getFieldArray:e=>yh(bh(a.mount?o:s,e,n.shouldUnregister?bh(s,e,[]):[])),_reset:j,_resetDefaultValues:()=>wh(n.defaultValues)&&n.defaultValues().then(e=>{B(e,n.resetOptions),f.state.next({isLoading:!1})}),_removeUnmounted:()=>{for(const e of l.unMount){const t=bh(r,e);t&&(t._f.refs?t._f.refs.every(e=>!ad(e)):!ad(t._f.ref))&&N(e)}l.unMount=new Set},_disableForm:e=>{xh(e)&&(f.state.next({disabled:e}),Td(r,(t,n)=>{const i=bh(r,n);i&&(t.disabled=i._f.disabled||e,Array.isArray(i._f.refs)&&i._f.refs.forEach(t=>{t.disabled=i._f.disabled||e}))},0,!1))},_subjects:f,_proxyFormState:h,get _fields(){return r},get _formValues(){return o},get _state(){return a},set _state(e){a=e},get _defaultValues(){return s},get _names(){return l},set _names(e){l=e},get _formState(){return i},get _options(){return n},set _options(e){n={...n,...e}}},subscribe:e=>(a.mount=!0,d={...d,...e.formState},L({...e,formState:{...c,...e.formState}})),trigger:P,register:D,handleSubmit:F,watch:(e,t)=>wh(e)?f.state.subscribe({next:n=>"values"in n&&e(E(void 0,t),n)}):E(e,t,!0),setValue:S,getValues:C,reset:B,resetField:(e,t={})=>{bh(r,e)&&(gh(t.defaultValue)?S(e,mh(bh(s,e))):(S(e,t.defaultValue),Eh(s,e,mh(t.defaultValue))),t.keepTouched||ld(i.touchedFields,e),t.keepDirty||(ld(i.dirtyFields,e),i.isDirty=t.defaultValue?w(e,mh(bh(s,e))):w()),t.keepError||(ld(i.errors,e),h.isValid&&m()),f.state.next({...i}))},clearErrors:e=>{e&&Qh(e).forEach(e=>ld(i.errors,e)),f.state.next({errors:e?i.errors:{}})},unregister:N,setError:M,setFocus:(e,t={})=>{const n=bh(r,e),i=n&&n._f;if(i){const e=i.refs?i.refs[0]:i.ref;e.focus&&setTimeout(()=>{e.focus(),t.shouldSelect&&wh(e.select)&&e.select()})}},getFieldState:R};return{...V,formControl:V}}const Ld=({sx:e,...t})=>H(fe,{variant:"body1",sx:{color:"var(--color-white)",cursor:"default",...e},...t}),Nd=te(he)({padding:0,marginRight:"5px",marginLeft:"10px","& .MuiSvgIcon-root":{color:"var(--color-orange-medium)"}});function zd({label:e,name:t,...n}){const i=T.useId(),{control:r,setValue:s,watch:o}=Yh(),a=o(t),l=`${i}-${t}-${String(a)}`;return H(Hh,{control:r,name:t,render:({field:t})=>{const{value:i,name:r}=t;return e?H(de,{color:"white",control:H(Nd,{...n,checked:i,onChange:(e,t)=>{s(r,t,{shouldValidate:!0})}}),label:H(Ld,{children:e})}):H(Nd,{...n,checked:i,onChange:(e,t)=>{s(r,t,{shouldValidate:!0})}})}},l)}var Dd=function(e){var t=e.as,n=e.errors,i=e.name,r=e.message,s=e.render,o=function(e,t){if(null==e)return{};var n,i,r={},s=Object.keys(e);for(i=0;i<s.length;i++)t.indexOf(n=s[i])>=0||(r[n]=e[n]);return r}(e,["as","errors","name","message","render"]),a=Yh(),l=bh(n||a.formState.errors,i);if(!l)return null;var u=l.message,c=l.types,h=Object.assign({},o,{children:u||r});return T.isValidElement(t)?T.cloneElement(t,h):s?s({message:u||r,messages:c}):T.createElement(t||T.Fragment,h)};function Id({name:t}){const{palette:n}=e(),{formState:{errors:i}}=Yh();return H(Dd,{errors:i,name:t,render:({message:e})=>H(Ld,{variant:"body2",style:{color:n.error.main},children:e})})}function Fd({form:e,sx:t={},onSubmit:n,children:i}){const{handleSubmit:s}=e;return H(Xh,{...e,children:H(r,{component:"form",sx:{display:"grid",gap:"15px",...t},onSubmit:s(n),children:i})})}const jd=()=>Yh(),Bd=e=>H(v,{size:"small",...e});function Ud({name:e,...t}){const{control:n}=Yh(),i=T.useId();return H(Hh,{control:n,name:e,render:({field:n})=>K(r,{sx:({spacing:e})=>({display:"grid",width:"100%",gap:e(1)}),children:[H(pe,{...t,...n,id:i,slots:{field:Bd}}),H(Id,{name:e})]})})}const Vd=({text:e="Нет данных"})=>H(i,{variant:"body2",sx:{textAlign:"center",color:"var(--gray-light-color)"},children:e});function Gd({items:e,columnsCount:t=1,getContent:n,title:s,getKey:o,onClick:a,onClear:l,sx:u,isShowNoData:c=!0}){const h=T.useMemo(()=>e.length>0,[e.length]),d=T.useMemo(()=>Boolean(l)&&h,[l,h]);return K(r,{sx:({spacing:e,breakpoints:t})=>({display:"grid",gridTemplateColumns:"1fr",gap:e(2),...u?.root,[t.down("sm")]:{gap:e(1)}}),children:[s||l?K(r,{sx:({spacing:e})=>({display:"flex",alignItems:"center",justifyContent:"center",gap:e(1)}),children:[s?H(i,{variant:"h6",noWrap:!0,sx:{textAlign:"center",fontWeight:700,...u?.title},children:s}):null,d?H(eh,{iconProps:{name:"clear",color:"warning"},onClick:l}):null]}):null,h?H(b,{sx:({spacing:e,breakpoints:n})=>({display:"grid",gridTemplateColumns:`repeat(${t}, 1fr)`,gap:e(2),...u?.list,[n.down("sm")]:{gap:e(1)}}),disablePadding:!0,children:e.map((e,t)=>H(x,{onClick:()=>a?.(e,t),sx:()=>({...u?.item}),disablePadding:!0,children:n(e,t)},o(e,t)))}):H(T.Fragment,{children:c?H(Vd,{}):null})]})}const $d="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function Zd(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function qd(e){return"nodeType"in e}function Wd(e){var t,n;return e?Zd(e)?e:qd(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function Hd(e){const{Document:t}=Wd(e);return e instanceof t}function Kd(e){return!Zd(e)&&e instanceof Wd(e).HTMLElement}function Yd(e){return e instanceof Wd(e).SVGElement}function Xd(e){return e?Zd(e)?e.document:qd(e)?Hd(e)?e:Kd(e)||Yd(e)?e.ownerDocument:document:document:document}const Jd=$d?z:C;function Qd(e){const t=O(e);return Jd(()=>{t.current=e}),P(function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return null==t.current?void 0:t.current(...n)},[])}function ef(e,t){void 0===t&&(t=[e]);const n=O(e);return Jd(()=>{n.current!==e&&(n.current=e)},t),n}function tf(e,t){const n=O();return N(()=>{const t=e(n.current);return n.current=t,t},[...t])}function nf(e){const t=Qd(e),n=O(null),i=P(e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e},[]);return[n,i]}function rf(e){const t=O();return C(()=>{t.current=e},[e]),t.current}let sf={};function of(e,t){return N(()=>{if(t)return t;const n=null==sf[e]?0:sf[e]+1;return sf[e]=n,e+"-"+n},[e,t])}function af(e){return function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return i.reduce((t,n)=>{const i=Object.entries(n);for(const[n,r]of i){const i=t[n];null!=i&&(t[n]=i+e*r)}return t},{...t})}}const lf=af(1),uf=af(-1);function cf(e){if(!e)return!1;const{KeyboardEvent:t}=Wd(e.target);return t&&e instanceof t}function hf(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=Wd(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const df=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[df.Translate.toString(e),df.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:i}=e;return t+" "+n+"ms "+i}}}),ff="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function pf(e){return e.matches(ff)?e:e.querySelector(ff)}const mf={display:"none"};function _f(e){let{id:t,value:n}=e;return S.createElement("div",{id:t,style:mf},n)}function gf(e){let{id:t,announcement:n,ariaLiveType:i="assertive"}=e;return S.createElement("div",{id:t,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":i,"aria-atomic":!0},n)}const yf=U(null);const vf={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},bf={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function xf(e){let{announcements:t=bf,container:n,hiddenTextDescribedById:i,screenReaderInstructions:r=vf}=e;const{announce:s,announcement:o}=function(){const[e,t]=B("");return{announce:P(e=>{null!=e&&t(e)},[]),announcement:e}}(),a=of("DndLiveRegion"),[l,u]=B(!1);if(C(()=>{u(!0)},[]),function(e){const t=I(yf);C(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}(N(()=>({onDragStart(e){let{active:n}=e;s(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:i}=e;t.onDragMove&&s(t.onDragMove({active:n,over:i}))},onDragOver(e){let{active:n,over:i}=e;s(t.onDragOver({active:n,over:i}))},onDragEnd(e){let{active:n,over:i}=e;s(t.onDragEnd({active:n,over:i}))},onDragCancel(e){let{active:n,over:i}=e;s(t.onDragCancel({active:n,over:i}))}}),[s,t])),!l)return null;const c=S.createElement(S.Fragment,null,S.createElement(_f,{id:i,value:r.draggable}),S.createElement(gf,{id:a,announcement:o}));return n?q(c,n):c}var wf;function Ef(){}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(wf||(wf={}));const Af=Object.freeze({x:0,y:0});function Tf(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Sf(e,t){let{data:{value:n}}=e,{data:{value:i}}=t;return n-i}function kf(e,t){let{data:{value:n}}=e,{data:{value:i}}=t;return i-n}function Of(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const Pf=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:i}=e;const r=Of(t,t.left,t.top),s=[];for(const e of i){const{id:t}=e,i=n.get(t);if(i){const n=Tf(Of(i),r);s.push({id:t,data:{droppableContainer:e,value:n}})}}return s.sort(Sf)};function Cf(e,t){const n=Math.max(t.top,e.top),i=Math.max(t.left,e.left),r=Math.min(t.left+t.width,e.left+e.width),s=Math.min(t.top+t.height,e.top+e.height),o=r-i,a=s-n;if(i<r&&n<s){const n=t.width*t.height,i=e.width*e.height,r=o*a;return Number((r/(n+i-r)).toFixed(4))}return 0}const Rf=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:i}=e;const r=[];for(const e of i){const{id:i}=e,s=n.get(i);if(s){const n=Cf(s,t);n>0&&r.push({id:i,data:{droppableContainer:e,value:n}})}}return r.sort(kf)};function Mf(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Af}function Lf(e){return function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return i.reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}const Nf=Lf(1);const zf={ignoreTransform:!1};function Df(e,t){void 0===t&&(t=zf);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:i}=Wd(e).getComputedStyle(e);t&&(n=function(e,t,n){const i=function(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(t);if(!i)return e;const{scaleX:r,scaleY:s,x:o,y:a}=i,l=e.left-o-(1-r)*parseFloat(n),u=e.top-a-(1-s)*parseFloat(n.slice(n.indexOf(" ")+1)),c=r?e.width/r:e.width,h=s?e.height/s:e.height;return{width:c,height:h,top:u,right:l+c,bottom:u+h,left:l}}(n,t,i))}const{top:i,left:r,width:s,height:o,bottom:a,right:l}=n;return{top:i,left:r,width:s,height:o,bottom:a,right:l}}function If(e){return Df(e,{ignoreTransform:!0})}function Ff(e,t){const n=[];return e?function i(r){if(null!=t&&n.length>=t)return n;if(!r)return n;if(Hd(r)&&null!=r.scrollingElement&&!n.includes(r.scrollingElement))return n.push(r.scrollingElement),n;if(!Kd(r)||Yd(r))return n;if(n.includes(r))return n;const s=Wd(e).getComputedStyle(r);return r!==e&&function(e,t){void 0===t&&(t=Wd(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const i=t[e];return"string"==typeof i&&n.test(i)})}(r,s)&&n.push(r),function(e,t){return void 0===t&&(t=Wd(e).getComputedStyle(e)),"fixed"===t.position}(r,s)?n:i(r.parentNode)}(e):n}function jf(e){const[t]=Ff(e,1);return null!=t?t:null}function Bf(e){return $d&&e?Zd(e)?e:qd(e)?Hd(e)||e===Xd(e).scrollingElement?window:Kd(e)?e:null:null:null}function Uf(e){return Zd(e)?e.scrollX:e.scrollLeft}function Vf(e){return Zd(e)?e.scrollY:e.scrollTop}function Gf(e){return{x:Uf(e),y:Vf(e)}}var $f;function Zf(e){return!(!$d||!e)&&e===document.scrollingElement}function qf(e){const t={x:0,y:0},n=Zf(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},i={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=i.y,isRight:e.scrollLeft>=i.x,maxScroll:i,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}($f||($f={}));const Wf={x:.2,y:.2};function Hf(e,t,n,i,r){let{top:s,left:o,right:a,bottom:l}=n;void 0===i&&(i=10),void 0===r&&(r=Wf);const{isTop:u,isBottom:c,isLeft:h,isRight:d}=qf(e),f={x:0,y:0},p={x:0,y:0},m=t.height*r.y,_=t.width*r.x;return!u&&s<=t.top+m?(f.y=$f.Backward,p.y=i*Math.abs((t.top+m-s)/m)):!c&&l>=t.bottom-m&&(f.y=$f.Forward,p.y=i*Math.abs((t.bottom-m-l)/m)),!d&&a>=t.right-_?(f.x=$f.Forward,p.x=i*Math.abs((t.right-_-a)/_)):!h&&o<=t.left+_&&(f.x=$f.Backward,p.x=i*Math.abs((t.left+_-o)/_)),{direction:f,speed:p}}function Kf(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:i,bottom:r}=e.getBoundingClientRect();return{top:t,left:n,right:i,bottom:r,width:e.clientWidth,height:e.clientHeight}}function Yf(e){return e.reduce((e,t)=>lf(e,Gf(t)),Af)}const Xf=[["x",["left","right"],function(e){return e.reduce((e,t)=>e+Uf(t),0)}],["y",["top","bottom"],function(e){return e.reduce((e,t)=>e+Vf(t),0)}]];class Jf{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=Ff(t),i=Yf(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,r]of Xf)for(const s of t)Object.defineProperty(this,s,{get:()=>{const t=r(n),o=i[e]-t;return this.rect[s]+o},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Qf{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)})},this.target=e}add(e,t,n){var i;null==(i=this.target)||i.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function ep(e,t){const n=Math.abs(e.x),i=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+i**2)>t:"x"in t&&"y"in t?n>t.x&&i>t.y:"x"in t?n>t.x:"y"in t&&i>t.y}var tp,np;function ip(e){e.preventDefault()}function rp(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(tp||(tp={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"}(np||(np={}));const sp={start:[np.Space,np.Enter],cancel:[np.Esc],end:[np.Space,np.Enter,np.Tab]},op=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case np.Right:return{...n,x:n.x+25};case np.Left:return{...n,x:n.x-25};case np.Down:return{...n,y:n.y+25};case np.Up:return{...n,y:n.y-25}}};class ap{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new Qf(Xd(t)),this.windowListeners=new Qf(Wd(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(tp.Resize,this.handleCancel),this.windowListeners.add(tp.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(tp.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&function(e,t){if(void 0===t&&(t=Df),!e)return;const{top:n,left:i,bottom:r,right:s}=t(e);jf(e)&&(r<=0||s<=0||n>=window.innerHeight||i>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(n),t(Af)}handleKeyDown(e){if(cf(e)){const{active:t,context:n,options:i}=this.props,{keyboardCodes:r=sp,coordinateGetter:s=op,scrollBehavior:o="smooth"}=i,{code:a}=e;if(r.end.includes(a))return void this.handleEnd(e);if(r.cancel.includes(a))return void this.handleCancel(e);const{collisionRect:l}=n.current,u=l?{x:l.left,y:l.top}:Af;this.referenceCoordinates||(this.referenceCoordinates=u);const c=s(e,{active:t,context:n.current,currentCoordinates:u});if(c){const t=uf(c,u),i={x:0,y:0},{scrollableAncestors:r}=n.current;for(const n of r){const r=e.code,{isTop:s,isRight:a,isLeft:l,isBottom:u,maxScroll:h,minScroll:d}=qf(n),f=Kf(n),p={x:Math.min(r===np.Right?f.right-f.width/2:f.right,Math.max(r===np.Right?f.left:f.left+f.width/2,c.x)),y:Math.min(r===np.Down?f.bottom-f.height/2:f.bottom,Math.max(r===np.Down?f.top:f.top+f.height/2,c.y))},m=r===np.Right&&!a||r===np.Left&&!l,_=r===np.Down&&!u||r===np.Up&&!s;if(m&&p.x!==c.x){const e=n.scrollLeft+t.x,s=r===np.Right&&e<=h.x||r===np.Left&&e>=d.x;if(s&&!t.y)return void n.scrollTo({left:e,behavior:o});i.x=s?n.scrollLeft-e:r===np.Right?n.scrollLeft-h.x:n.scrollLeft-d.x,i.x&&n.scrollBy({left:-i.x,behavior:o});break}if(_&&p.y!==c.y){const e=n.scrollTop+t.y,s=r===np.Down&&e<=h.y||r===np.Up&&e>=d.y;if(s&&!t.x)return void n.scrollTo({top:e,behavior:o});i.y=s?n.scrollTop-e:r===np.Down?n.scrollTop-h.y:n.scrollTop-d.y,i.y&&n.scrollBy({top:-i.y,behavior:o});break}}this.handleMove(e,lf(uf(c,this.referenceCoordinates),i))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function lp(e){return Boolean(e&&"distance"in e)}function up(e){return Boolean(e&&"delay"in e)}ap.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:i=sp,onActivation:r}=t,{active:s}=n;const{code:o}=e.nativeEvent;if(i.start.includes(o)){const t=s.activatorNode.current;return(!t||e.target===t)&&(e.preventDefault(),null==r||r({event:e.nativeEvent}),!0)}return!1}}];class cp{constructor(e,t,n){var i;void 0===n&&(n=function(e){const{EventTarget:t}=Wd(e);return e instanceof t?e:Xd(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:r}=e,{target:s}=r;this.props=e,this.events=t,this.document=Xd(s),this.documentListeners=new Qf(this.document),this.listeners=new Qf(n),this.windowListeners=new Qf(Wd(s)),this.initialCoordinates=null!=(i=hf(r))?i:Af,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(tp.Resize,this.handleCancel),this.windowListeners.add(tp.DragStart,ip),this.windowListeners.add(tp.VisibilityChange,this.handleCancel),this.windowListeners.add(tp.ContextMenu,ip),this.documentListeners.add(tp.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(up(t))return this.timeoutId=setTimeout(this.handleStart,t.delay),void this.handlePending(t);if(lp(t))return void this.handlePending(t)}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){const{active:n,onPending:i}=this.props;i(n,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(tp.Click,rp,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(tp.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:i,props:r}=this,{onMove:s,options:{activationConstraint:o}}=r;if(!i)return;const a=null!=(t=hf(e))?t:Af,l=uf(i,a);if(!n&&o){if(lp(o)){if(null!=o.tolerance&&ep(l,o.tolerance))return this.handleCancel();if(ep(l,o.distance))return this.handleStart()}return up(o)&&ep(l,o.tolerance)?this.handleCancel():void this.handlePending(o,l)}e.cancelable&&e.preventDefault(),s(a)}handleEnd(){const{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){const{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===np.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const hp={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class dp extends cp{constructor(e){const{event:t}=e,n=Xd(t.target);super(e,hp,n)}}dp.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;return!(!n.isPrimary||0!==n.button)&&(null==i||i({event:n}),!0)}}];const fp={move:{name:"mousemove"},end:{name:"mouseup"}};var pp;!function(e){e[e.RightClick=2]="RightClick"}(pp||(pp={}));(class extends cp{constructor(e){super(e,fp,Xd(e.event.target))}}).activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;return n.button!==pp.RightClick&&(null==i||i({event:n}),!0)}}];const mp={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};var _p,gp;function yp(e){let{acceleration:t,activator:n=_p.Pointer,canScroll:i,draggingRect:r,enabled:s,interval:o=5,order:a=gp.TreeOrder,pointerCoordinates:l,scrollableAncestors:u,scrollableAncestorRects:c,delta:h,threshold:d}=e;const f=function(e){let{delta:t,disabled:n}=e;const i=rf(t);return tf(e=>{if(n||!i||!e)return vp;const r={x:Math.sign(t.x-i.x),y:Math.sign(t.y-i.y)};return{x:{[$f.Backward]:e.x[$f.Backward]||-1===r.x,[$f.Forward]:e.x[$f.Forward]||1===r.x},y:{[$f.Backward]:e.y[$f.Backward]||-1===r.y,[$f.Forward]:e.y[$f.Forward]||1===r.y}}},[n,t,i])}({delta:h,disabled:!s}),[p,m]=function(){const e=O(null);return[P((t,n)=>{e.current=setInterval(t,n)},[]),P(()=>{null!==e.current&&(clearInterval(e.current),e.current=null)},[])]}(),_=O({x:0,y:0}),g=O({x:0,y:0}),y=N(()=>{switch(n){case _p.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case _p.DraggableRect:return r}},[n,r,l]),v=O(null),b=P(()=>{const e=v.current;if(!e)return;const t=_.current.x*g.current.x,n=_.current.y*g.current.y;e.scrollBy(t,n)},[]),x=N(()=>a===gp.TreeOrder?[...u].reverse():u,[a,u]);C(()=>{if(s&&u.length&&y){for(const e of x){if(!1===(null==i?void 0:i(e)))continue;const n=u.indexOf(e),r=c[n];if(!r)continue;const{direction:s,speed:a}=Hf(e,r,y,t,d);for(const e of["x","y"])f[e][s[e]]||(a[e]=0,s[e]=0);if(a.x>0||a.y>0)return m(),v.current=e,p(b,o),_.current=a,void(g.current=s)}_.current={x:0,y:0},g.current={x:0,y:0},m()}else m()},[t,b,i,m,s,o,JSON.stringify(y),JSON.stringify(f),p,u,x,c,JSON.stringify(d)])}(class extends cp{constructor(e){super(e,mp)}static setup(){return window.addEventListener(mp.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(mp.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;const{touches:r}=n;return!(r.length>1)&&(null==i||i({event:n}),!0)}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(_p||(_p={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(gp||(gp={}));const vp={x:{[$f.Backward]:!1,[$f.Forward]:!1},y:{[$f.Backward]:!1,[$f.Forward]:!1}};var bp,xp;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(bp||(bp={})),function(e){e.Optimized="optimized"}(xp||(xp={}));const wp=new Map;function Ep(e,t){return tf(n=>e?n||("function"==typeof t?t(e):e):null,[t,e])}function Ap(e){let{callback:t,disabled:n}=e;const i=Qd(t),r=N(()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(i)},[n]);return C(()=>()=>null==r?void 0:r.disconnect(),[r]),r}function Tp(e){return new Jf(Df(e),e)}function Sp(e,t,n){void 0===t&&(t=Tp);const[i,r]=B(null);function s(){r(i=>{if(!e)return null;var r;if(!1===e.isConnected)return null!=(r=null!=i?i:n)?r:null;const s=t(e);return JSON.stringify(i)===JSON.stringify(s)?i:s})}const o=function(e){let{callback:t,disabled:n}=e;const i=Qd(t),r=N(()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(i)},[i,n]);return C(()=>()=>null==r?void 0:r.disconnect(),[r]),r}({callback(t){if(e)for(const n of t){const{type:t,target:i}=n;if("childList"===t&&i instanceof HTMLElement&&i.contains(e)){s();break}}}}),a=Ap({callback:s});return Jd(()=>{s(),e?(null==a||a.observe(e),null==o||o.observe(document.body,{childList:!0,subtree:!0})):(null==a||a.disconnect(),null==o||o.disconnect())},[e]),i}const kp=[];function Op(e,t){void 0===t&&(t=[]);const n=O(null);return C(()=>{n.current=null},t),C(()=>{const t=e!==Af;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?uf(e,n.current):Af}function Pp(e){return N(()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null,[e])}const Cp=[];function Rp(e){let{measure:t}=e;const[n,i]=B(null),r=P(e=>{for(const{target:n}of e)if(Kd(n)){i(e=>{const i=t(n);return e?{...e,width:i.width,height:i.height}:i});break}},[t]),s=Ap({callback:r}),o=P(e=>{const n=function(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Kd(t)?t:e}(e);null==s||s.disconnect(),n&&(null==s||s.observe(n)),i(n?t(n):null)},[t,s]),[a,l]=nf(o);return N(()=>({nodeRef:a,rect:n,setRef:l}),[n,a,l])}const Mp=[{sensor:dp,options:{}},{sensor:ap,options:{}}],Lp={current:{}},Np={draggable:{measure:If},droppable:{measure:If,strategy:bp.WhileDragging,frequency:xp.Optimized},dragOverlay:{measure:Df}};class zp extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const Dp={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new zp,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Ef},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Np,measureDroppableContainers:Ef,windowRect:null,measuringScheduled:!1},Ip=U({activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Ef,draggableNodes:new Map,over:null,measureDroppableContainers:Ef}),Fp=U(Dp);function jp(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new zp}}}function Bp(e,t){switch(t.type){case wf.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case wf.DragMove:return null==e.draggable.active?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case wf.DragEnd:case wf.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case wf.RegisterDroppable:{const{element:n}=t,{id:i}=n,r=new zp(e.droppable.containers);return r.set(i,n),{...e,droppable:{...e.droppable,containers:r}}}case wf.SetDroppableDisabled:{const{id:n,key:i,disabled:r}=t,s=e.droppable.containers.get(n);if(!s||i!==s.key)return e;const o=new zp(e.droppable.containers);return o.set(n,{...s,disabled:r}),{...e,droppable:{...e.droppable,containers:o}}}case wf.UnregisterDroppable:{const{id:n,key:i}=t,r=e.droppable.containers.get(n);if(!r||i!==r.key)return e;const s=new zp(e.droppable.containers);return s.delete(n),{...e,droppable:{...e.droppable,containers:s}}}default:return e}}function Up(e){let{disabled:t}=e;const{active:n,activatorEvent:i,draggableNodes:r}=I(Ip),s=rf(i),o=rf(null==n?void 0:n.id);return C(()=>{if(!t&&!i&&s&&null!=o){if(!cf(s))return;if(document.activeElement===s.target)return;const e=r.get(o);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=pf(e);if(t){t.focus();break}}})}},[i,t,r,o,s]),null}const Vp=U({...Af,scaleX:1,scaleY:1});var Gp;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(Gp||(Gp={}));const $p=j(function(e){var t,n,i,r;let{id:s,accessibility:o,autoScroll:a=!0,children:l,sensors:u=Mp,collisionDetection:c=Rf,measuring:h,modifiers:d,...f}=e;const p=V(Bp,void 0,jp),[m,_]=p,[g,y]=function(){const[e]=B(()=>new Set),t=P(t=>(e.add(t),()=>e.delete(t)),[e]);return[P(t=>{let{type:n,event:i}=t;e.forEach(e=>{var t;return null==(t=e[n])?void 0:t.call(e,i)})},[e]),t]}(),[v,b]=B(Gp.Uninitialized),x=v===Gp.Initialized,{draggable:{active:w,nodes:E,translate:A},droppable:{containers:T}}=m,k=null!=w?E.get(w):null,R=O({initial:null,translated:null}),M=N(()=>{var e;return null!=w?{id:w,data:null!=(e=null==k?void 0:k.data)?e:Lp,rect:R}:null},[w,k]),L=O(null),[z,D]=B(null),[I,F]=B(null),j=ef(f,Object.values(f)),U=of("DndDescribedBy",s),G=N(()=>T.getEnabled(),[T]),$=N(()=>({draggable:{...Np.draggable,...null==Z?void 0:Z.draggable},droppable:{...Np.droppable,...null==Z?void 0:Z.droppable},dragOverlay:{...Np.dragOverlay,...null==Z?void 0:Z.dragOverlay}}),[null==(Z=h)?void 0:Z.draggable,null==Z?void 0:Z.droppable,null==Z?void 0:Z.dragOverlay]);var Z;const{droppableRects:q,measureDroppableContainers:H,measuringScheduled:K}=function(e,t){let{dragging:n,dependencies:i,config:r}=t;const[s,o]=B(null),{frequency:a,measure:l,strategy:u}=r,c=O(e),h=function(){switch(u){case bp.Always:return!1;case bp.BeforeDragging:return n;default:return!n}}(),d=ef(h),f=P(function(e){void 0===e&&(e=[]),d.current||o(t=>null===t?e:t.concat(e.filter(e=>!t.includes(e))))},[d]),p=O(null),m=tf(t=>{if(h&&!n)return wp;if(!t||t===wp||c.current!==e||null!=s){const t=new Map;for(let n of e){if(!n)continue;if(s&&s.length>0&&!s.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,i=e?new Jf(l(e),e):null;n.rect.current=i,i&&t.set(n.id,i)}return t}return t},[e,s,n,h,l]);return C(()=>{c.current=e},[e]),C(()=>{h||f()},[n,h]),C(()=>{s&&s.length>0&&o(null)},[JSON.stringify(s)]),C(()=>{h||"number"!=typeof a||null!==p.current||(p.current=setTimeout(()=>{f(),p.current=null},a))},[a,h,f,...i]),{droppableRects:m,measureDroppableContainers:f,measuringScheduled:null!=s}}(G,{dragging:x,dependencies:[A.x,A.y],config:$.droppable}),Y=function(e,t){const n=null!=t?e.get(t):void 0,i=n?n.node.current:null;return tf(e=>{var n;return null==t?null:null!=(n=null!=i?i:e)?n:null},[i,t])}(E,w),X=N(()=>I?hf(I):null,[I]),J=function(){const e=!1===(null==z?void 0:z.autoScrollEnabled),t="object"==typeof a?!1===a.enabled:!1===a,n=x&&!e&&!t;if("object"==typeof a)return{...a,enabled:n};return{enabled:n}}(),Q=function(e,t){return Ep(e,t)}(Y,$.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:i,config:r=!0}=e;const s=O(!1),{x:o,y:a}="boolean"==typeof r?{x:r,y:r}:r;Jd(()=>{if(!o&&!a||!t)return void(s.current=!1);if(s.current||!i)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const r=Mf(n(e),i);if(o||(r.x=0),a||(r.y=0),s.current=!0,Math.abs(r.x)>0||Math.abs(r.y)>0){const t=jf(e);t&&t.scrollBy({top:r.y,left:r.x})}},[t,o,a,i,n])}({activeNode:null!=w?E.get(w):null,config:J.layoutShiftCompensation,initialRect:Q,measure:$.draggable.measure});const ee=Sp(Y,$.draggable.measure,Q),te=Sp(Y?Y.parentElement:null),ne=O({activatorEvent:null,active:null,activeNode:Y,collisionRect:null,collisions:null,droppableRects:q,draggableNodes:E,draggingNode:null,draggingNodeRect:null,droppableContainers:T,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ie=T.getNodeFor(null==(t=ne.current.over)?void 0:t.id),re=Rp({measure:$.dragOverlay.measure}),se=null!=(n=re.nodeRef.current)?n:Y,oe=x?null!=(i=re.rect)?i:ee:null,ae=Boolean(re.nodeRef.current&&re.rect),le=Mf(ue=ae?null:ee,Ep(ue));var ue;const ce=Pp(se?Wd(se):null),he=function(e){const t=O(e),n=tf(n=>e?n&&n!==kp&&e&&t.current&&e.parentNode===t.current.parentNode?n:Ff(e):kp,[e]);return C(()=>{t.current=e},[e]),n}(x?null!=ie?ie:Y:null),de=function(e,t){void 0===t&&(t=Df);const[n]=e,i=Pp(n?Wd(n):null),[r,s]=B(Cp);function o(){s(()=>e.length?e.map(e=>Zf(e)?i:new Jf(t(e),e)):Cp)}const a=Ap({callback:o});return Jd(()=>{null==a||a.disconnect(),o(),e.forEach(e=>null==a?void 0:a.observe(e))},[e]),r}(he),fe=function(e,t){let{transform:n,...i}=t;return null!=e&&e.length?e.reduce((e,t)=>t({transform:e,...i}),n):n}(d,{transform:{x:A.x-le.x,y:A.y-le.y,scaleX:1,scaleY:1},activatorEvent:I,active:M,activeNodeRect:ee,containerNodeRect:te,draggingNodeRect:oe,over:ne.current.over,overlayNodeRect:re.rect,scrollableAncestors:he,scrollableAncestorRects:de,windowRect:ce}),pe=X?lf(X,A):null,me=function(e){const[t,n]=B(null),i=O(e),r=P(e=>{const t=Bf(e.target);t&&n(e=>e?(e.set(t,Gf(t)),new Map(e)):null)},[]);return C(()=>{const t=i.current;if(e!==t){s(t);const o=e.map(e=>{const t=Bf(e);return t?(t.addEventListener("scroll",r,{passive:!0}),[t,Gf(t)]):null}).filter(e=>null!=e);n(o.length?new Map(o):null),i.current=e}return()=>{s(e),s(t)};function s(e){e.forEach(e=>{const t=Bf(e);null==t||t.removeEventListener("scroll",r)})}},[r,e]),N(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>lf(e,t),Af):Yf(e):Af,[e,t])}(he),_e=Op(me),ge=Op(me,[ee]),ye=lf(fe,_e),ve=oe?Nf(oe,fe):null,be=M&&ve?c({active:M,collisionRect:ve,droppableRects:q,droppableContainers:G,pointerCoordinates:pe}):null,xe=function(e,t){if(!e||0===e.length)return null;const[n]=e;return n[t]}(be,"id"),[we,Ee]=B(null),Ae=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(ae?fe:lf(fe,ge),null!=(r=null==we?void 0:we.rect)?r:null,ee),Te=O(null),Se=P((e,t)=>{let{sensor:n,options:i}=t;if(null==L.current)return;const r=E.get(L.current);if(!r)return;const s=e.nativeEvent,o=new n({active:L.current,activeNode:r,event:s,options:i,context:ne,onAbort(e){if(!E.get(e))return;const{onDragAbort:t}=j.current,n={id:e};null==t||t(n),g({type:"onDragAbort",event:n})},onPending(e,t,n,i){if(!E.get(e))return;const{onDragPending:r}=j.current,s={id:e,constraint:t,initialCoordinates:n,offset:i};null==r||r(s),g({type:"onDragPending",event:s})},onStart(e){const t=L.current;if(null==t)return;const n=E.get(t);if(!n)return;const{onDragStart:i}=j.current,r={activatorEvent:s,active:{id:t,data:n.data,rect:R}};W(()=>{null==i||i(r),b(Gp.Initializing),_({type:wf.DragStart,initialCoordinates:e,active:t}),g({type:"onDragStart",event:r}),D(Te.current),F(s)})},onMove(e){_({type:wf.DragMove,coordinates:e})},onEnd:a(wf.DragEnd),onCancel:a(wf.DragCancel)});function a(e){return async function(){const{active:t,collisions:n,over:i,scrollAdjustedTranslate:r}=ne.current;let o=null;if(t&&r){const{cancelDrop:a}=j.current;if(o={activatorEvent:s,active:t,collisions:n,delta:r,over:i},e===wf.DragEnd&&"function"==typeof a){await Promise.resolve(a(o))&&(e=wf.DragCancel)}}L.current=null,W(()=>{_({type:e}),b(Gp.Uninitialized),Ee(null),D(null),F(null),Te.current=null;const t=e===wf.DragEnd?"onDragEnd":"onDragCancel";if(o){const e=j.current[t];null==e||e(o),g({type:t,event:o})}})}}Te.current=o},[E]),ke=P((e,t)=>(n,i)=>{const r=n.nativeEvent,s=E.get(i);if(null!==L.current||!s||r.dndKit||r.defaultPrevented)return;const o={active:s};!0===e(n,t.options,o)&&(r.dndKit={capturedBy:t.sensor},L.current=i,Se(n,t))},[E,Se]),Oe=function(e,t){return N(()=>e.reduce((e,n)=>{const{sensor:i}=n;return[...e,...i.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}))]},[]),[e,t])}(u,ke);!function(e){C(()=>{if(!$d)return;const t=e.map(e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()});return()=>{for(const e of t)null==e||e()}},e.map(e=>{let{sensor:t}=e;return t}))}(u),Jd(()=>{ee&&v===Gp.Initializing&&b(Gp.Initialized)},[ee,v]),C(()=>{const{onDragMove:e}=j.current,{active:t,activatorEvent:n,collisions:i,over:r}=ne.current;if(!t||!n)return;const s={active:t,activatorEvent:n,collisions:i,delta:{x:ye.x,y:ye.y},over:r};W(()=>{null==e||e(s),g({type:"onDragMove",event:s})})},[ye.x,ye.y]),C(()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:i,scrollAdjustedTranslate:r}=ne.current;if(!e||null==L.current||!t||!r)return;const{onDragOver:s}=j.current,o=i.get(xe),a=o&&o.rect.current?{id:o.id,rect:o.rect.current,data:o.data,disabled:o.disabled}:null,l={active:e,activatorEvent:t,collisions:n,delta:{x:r.x,y:r.y},over:a};W(()=>{Ee(a),null==s||s(l),g({type:"onDragOver",event:l})})},[xe]),Jd(()=>{ne.current={activatorEvent:I,active:M,activeNode:Y,collisionRect:ve,collisions:be,droppableRects:q,draggableNodes:E,draggingNode:se,draggingNodeRect:oe,droppableContainers:T,over:we,scrollableAncestors:he,scrollAdjustedTranslate:ye},R.current={initial:oe,translated:ve}},[M,Y,be,ve,E,se,oe,q,T,we,he,ye]),yp({...J,delta:A,draggingRect:ve,pointerCoordinates:pe,scrollableAncestors:he,scrollableAncestorRects:de});const Pe=N(()=>({active:M,activeNode:Y,activeNodeRect:ee,activatorEvent:I,collisions:be,containerNodeRect:te,dragOverlay:re,draggableNodes:E,droppableContainers:T,droppableRects:q,over:we,measureDroppableContainers:H,scrollableAncestors:he,scrollableAncestorRects:de,measuringConfiguration:$,measuringScheduled:K,windowRect:ce}),[M,Y,ee,I,be,te,re,E,T,q,we,H,he,de,$,K,ce]),Ce=N(()=>({activatorEvent:I,activators:Oe,active:M,activeNodeRect:ee,ariaDescribedById:{draggable:U},dispatch:_,draggableNodes:E,over:we,measureDroppableContainers:H}),[I,Oe,M,ee,_,U,E,we,H]);return S.createElement(yf.Provider,{value:y},S.createElement(Ip.Provider,{value:Ce},S.createElement(Fp.Provider,{value:Pe},S.createElement(Vp.Provider,{value:Ae},l)),S.createElement(Up,{disabled:!1===(null==o?void 0:o.restoreFocus)})),S.createElement(xf,{...o,hiddenTextDescribedById:U}))}),Zp=U(null),qp="button";function Wp(e){let{id:t,data:n,disabled:i=!1,attributes:r}=e;const s=of("Draggable"),{activators:o,activatorEvent:a,active:l,activeNodeRect:u,ariaDescribedById:c,draggableNodes:h,over:d}=I(Ip),{role:f=qp,roleDescription:p="draggable",tabIndex:m=0}=null!=r?r:{},_=(null==l?void 0:l.id)===t,g=I(_?Vp:Zp),[y,v]=nf(),[b,x]=nf(),w=function(e,t){return N(()=>e.reduce((e,n)=>{let{eventName:i,handler:r}=n;return e[i]=e=>{r(e,t)},e},{}),[e,t])}(o,t),E=ef(n);Jd(()=>(h.set(t,{id:t,key:s,node:y,activatorNode:b,data:E}),()=>{const e=h.get(t);e&&e.key===s&&h.delete(t)}),[h,t]);return{active:l,activatorEvent:a,activeNodeRect:u,attributes:N(()=>({role:f,tabIndex:m,"aria-disabled":i,"aria-pressed":!(!_||f!==qp)||void 0,"aria-roledescription":p,"aria-describedby":c.draggable}),[i,f,m,_,p,c.draggable]),isDragging:_,listeners:i?void 0:w,node:y,over:d,setNodeRef:v,setActivatorNodeRef:x,transform:g}}const Hp={timeout:25};function Kp(e,t,n){const i=e.slice();return i.splice(n<0?i.length+n:n,0,i.splice(t,1)[0]),i}function Yp(e,t){return e.reduce((e,n,i)=>{const r=t.get(n);return r&&(e[i]=r),e},Array(e.length))}function Xp(e){return null!==e&&e>=0}const Jp=e=>{let{rects:t,activeIndex:n,overIndex:i,index:r}=e;const s=Kp(t,i,n),o=t[r],a=s[r];return a&&o?{x:a.left-o.left,y:a.top-o.top,scaleX:a.width/o.width,scaleY:a.height/o.height}:null},Qp={scaleX:1,scaleY:1},em=e=>{var t;let{activeIndex:n,activeNodeRect:i,index:r,rects:s,overIndex:o}=e;const a=null!=(t=s[n])?t:i;if(!a)return null;if(r===n){const e=s[o];return e?{x:0,y:n<o?e.top+e.height-(a.top+a.height):e.top-a.top,...Qp}:null}const l=function(e,t,n){const i=e[t],r=e[t-1],s=e[t+1];if(!i)return 0;if(n<t)return r?i.top-(r.top+r.height):s?s.top-(i.top+i.height):0;return s?s.top-(i.top+i.height):r?i.top-(r.top+r.height):0}(s,r,n);return r>n&&r<=o?{x:0,y:-a.height-l,...Qp}:r<n&&r>=o?{x:0,y:a.height+l,...Qp}:{x:0,y:0,...Qp}};const tm="Sortable",nm=S.createContext({activeIndex:-1,containerId:tm,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Jp,disabled:{draggable:!1,droppable:!1}});function im(e){let{children:t,id:n,items:i,strategy:r=Jp,disabled:s=!1}=e;const{active:o,dragOverlay:a,droppableRects:l,over:u,measureDroppableContainers:c}=I(Fp),h=of(tm,n),d=Boolean(null!==a.rect),f=N(()=>i.map(e=>"object"==typeof e&&"id"in e?e.id:e),[i]),p=null!=o,m=o?f.indexOf(o.id):-1,_=u?f.indexOf(u.id):-1,g=O(f),y=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(f,g.current),v=-1!==_&&-1===m||y,b=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(s);Jd(()=>{y&&p&&c(f)},[y,f,p,c]),C(()=>{g.current=f},[f]);const x=N(()=>({activeIndex:m,containerId:h,disabled:b,disableTransforms:v,items:f,overIndex:_,useDragOverlay:d,sortedRects:Yp(f,l),strategy:r}),[m,h,b.draggable,b.droppable,v,f,_,l,d,r]);return S.createElement(nm.Provider,{value:x},t)}const rm=e=>{let{id:t,items:n,activeIndex:i,overIndex:r}=e;return Kp(n,i,r).indexOf(t)},sm=e=>{let{containerId:t,isSorting:n,wasDragging:i,index:r,items:s,newIndex:o,previousItems:a,previousContainerId:l,transition:u}=e;return!(!u||!i)&&((a===s||r!==o)&&(!!n||o!==r&&t===l))},om={duration:200,easing:"ease"},am="transform",lm=df.Transition.toString({property:am,duration:0,easing:"linear"}),um={roleDescription:"sortable"};function cm(e){let{animateLayoutChanges:t=sm,attributes:n,disabled:i,data:r,getNewIndex:s=rm,id:o,strategy:a,resizeObserverConfig:l,transition:u=om}=e;const{items:c,containerId:h,activeIndex:d,disabled:f,disableTransforms:p,sortedRects:m,overIndex:_,useDragOverlay:g,strategy:y}=I(nm),v=function(e,t){var n,i;if("boolean"==typeof e)return{draggable:e,droppable:!1};return{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(i=null==e?void 0:e.droppable)?i:t.droppable}}(i,f),b=c.indexOf(o),x=N(()=>({sortable:{containerId:h,index:b,items:c},...r}),[h,r,b,c]),w=N(()=>c.slice(c.indexOf(o)),[c,o]),{rect:E,node:A,isOver:T,setNodeRef:S}=function(e){let{data:t,disabled:n=!1,id:i,resizeObserverConfig:r}=e;const s=of("Droppable"),{active:o,dispatch:a,over:l,measureDroppableContainers:u}=I(Ip),c=O({disabled:n}),h=O(!1),d=O(null),f=O(null),{disabled:p,updateMeasurementsFor:m,timeout:_}={...Hp,...r},g=ef(null!=m?m:i),y=Ap({callback:P(()=>{h.current?(null!=f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{u(Array.isArray(g.current)?g.current:[g.current]),f.current=null},_)):h.current=!0},[_]),disabled:p||!o}),v=P((e,t)=>{y&&(t&&(y.unobserve(t),h.current=!1),e&&y.observe(e))},[y]),[b,x]=nf(v),w=ef(t);return C(()=>{y&&b.current&&(y.disconnect(),h.current=!1,y.observe(b.current))},[b,y]),C(()=>(a({type:wf.RegisterDroppable,element:{id:i,key:s,disabled:n,node:b,rect:d,data:w}}),()=>a({type:wf.UnregisterDroppable,key:s,id:i})),[i]),C(()=>{n!==c.current.disabled&&(a({type:wf.SetDroppableDisabled,id:i,key:s,disabled:n}),c.current.disabled=n)},[i,s,n,a]),{active:o,rect:d,isOver:(null==l?void 0:l.id)===i,node:b,over:l,setNodeRef:x}}({id:o,data:x,disabled:v.droppable,resizeObserverConfig:{updateMeasurementsFor:w,...l}}),{active:k,activatorEvent:R,activeNodeRect:M,attributes:L,setNodeRef:z,listeners:D,isDragging:F,over:j,setActivatorNodeRef:U,transform:V}=Wp({id:o,data:x,attributes:{...um,...n},disabled:v.draggable}),G=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(()=>e=>{t.forEach(t=>t(e))},t)}(S,z),$=Boolean(k),Z=$&&!p&&Xp(d)&&Xp(_),q=!g&&F,W=q&&Z?V:null,H=Z?null!=W?W:(null!=a?a:y)({rects:m,activeNodeRect:M,activeIndex:d,overIndex:_,index:b}):null,K=Xp(d)&&Xp(_)?s({id:o,items:c,activeIndex:d,overIndex:_}):b,Y=null==k?void 0:k.id,X=O({activeId:Y,items:c,newIndex:K,containerId:h}),J=c!==X.current.items,Q=t({active:k,containerId:h,isDragging:F,isSorting:$,id:o,index:b,items:c,newIndex:X.current.newIndex,previousItems:X.current.items,previousContainerId:X.current.containerId,transition:u,wasDragging:null!=X.current.activeId}),ee=function(e){let{disabled:t,index:n,node:i,rect:r}=e;const[s,o]=B(null),a=O(n);return Jd(()=>{if(!t&&n!==a.current&&i.current){const e=r.current;if(e){const t=Df(i.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&o(n)}}n!==a.current&&(a.current=n)},[t,n,i,r]),C(()=>{s&&o(null)},[s]),s}({disabled:!Q,index:b,node:A,rect:E});return C(()=>{$&&X.current.newIndex!==K&&(X.current.newIndex=K),h!==X.current.containerId&&(X.current.containerId=h),c!==X.current.items&&(X.current.items=c)},[$,K,h,c]),C(()=>{if(Y===X.current.activeId)return;if(null!=Y&&null==X.current.activeId)return void(X.current.activeId=Y);const e=setTimeout(()=>{X.current.activeId=Y},50);return()=>clearTimeout(e)},[Y]),{active:k,activeIndex:d,attributes:L,data:x,rect:E,index:b,newIndex:K,items:c,isOver:T,isSorting:$,isDragging:F,listeners:D,node:A,overIndex:_,over:j,setNodeRef:G,setActivatorNodeRef:U,setDroppableNodeRef:S,setDraggableNodeRef:z,transform:null!=ee?ee:H,transition:function(){if(ee||J&&X.current.newIndex===b)return lm;if(q&&!cf(R)||!u)return;if($||Q)return df.Transition.toString({...u,property:am});return}()}}np.Down,np.Right,np.Up,np.Left;const hm=({id:e,sx:t,children:n})=>{const{isDragging:i}=Wp({id:e}),{attributes:s,listeners:o,setNodeRef:a,transform:l,transition:u}=cm({id:e,strategy:em,transition:{duration:300,easing:"cubic-bezier(0.25, 1, 0.5, 1)"}}),c={...t?.default,...i?t?.dragging:{},transform:df.Translate.toString(l),transition:u,cursor:"pointer"};return H(r,{ref:a,style:c,...o,...s,children:n})};function dm({items:e,getItem:t,getId:n,onDragEnd:i,sx:r,title:s,draggableSx:o}){const a=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(()=>[...t].filter(e=>null!=e),[...t])}(N(()=>({sensor:l,options:null!=u?u:{}}),[l=dp,u={activationConstraint:{distance:8}}]));var l,u;return H($p,{sensors:a,collisionDetection:Pf,onDragEnd:t=>{const{active:r,over:s}=t,o=e.findIndex(e=>n(e)===r.id),a=e.findIndex(e=>n(e)===s?.id),l=Kp(e,o,a);i(l)},children:H(im,{items:e.map(n),strategy:em,children:H(Gd,{items:e,sx:r,title:s,getKey:n,getContent:(e,i)=>{const r=n(e);return H(hm,{id:r,sx:o,children:t(e,i)},r)}})})})}var fm,pm={exports:{}},mm={},_m={exports:{}},gm={exports:{}},ym={};var vm,bm,xm,wm,Em,Am,Tm,Sm,km,Om,Pm,Cm,Rm,Mm,Lm,Nm={};
|
|
11
11
|
/** @license React v16.13.1
|
|
12
12
|
* react-is.development.js
|
|
13
13
|
*
|