@dartcom/ui-kit 10.2.31 → 10.2.32
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/layers/leaflet/leaflet.d.ts.map +1 -1
- package/dist/components/layers/leaflet/services/tangram-layer.d.ts +13 -3
- package/dist/components/layers/leaflet/services/tangram-layer.d.ts.map +1 -1
- package/dist/index.cjs +80 -69
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +2 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/providers/map/map.d.ts.map +1 -1
- package/dist/services/storybook/decorators.d.ts +1 -0
- package/dist/services/storybook/decorators.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -7,7 +7,7 @@ import*as e from"react";import t,{forwardRef as n,useRef as i,useCallback as r,u
|
|
|
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 El,Al,Tl=(xl||(xl=1,"production"===process.env.NODE_ENV?yl.exports=function(){if(ml)return vl;ml=1;var e=t,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=e.useState,r=e.useEffect,s=e.useLayoutEffect,o=e.useDebugValue;function a(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!n(e,i)}catch(e){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),l=i({inst:{value:n,getSnapshot:t}}),u=l[0].inst,c=l[1];return s(function(){u.value=n,u.getSnapshot=t,a(u)&&c({inst:u})},[e,n,t]),r(function(){return a(u)&&c({inst:u}),e(function(){a(u)&&c({inst:u})})},[e]),o(n),n};return vl.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:l,vl}():yl.exports=(bl||(bl=1,"production"!==process.env.NODE_ENV&&function(){function e(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}}"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var n=t,i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=n.useState,s=n.useEffect,o=n.useLayoutEffect,a=n.useDebugValue,l=!1,u=!1,c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(t,c){l||void 0===n.startTransition||(l=!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(!u){var d=c();i(h,d)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),u=!0)}var f=(d=r({inst:{value:h,getSnapshot:c}}))[0].inst,p=d[1];return o(function(){f.value=h,f.getSnapshot=c,e(f)&&p({inst:f})},[t,h,c]),s(function(){return e(f)&&p({inst:f}),t(function(){e(f)&&p({inst:f})})},[t]),a(h),h};wl.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:c,"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),wl)),yl.exports);function Sl(e){e.reaction=new Kr("observer".concat(e.name),function(){var t;e.stateVersion=Symbol(),null===(t=e.onStoreChange)||void 0===t||t.call(e)})}var kl=!0,Ol="function"==typeof Symbol&&Symbol.for,Pl=null!==(Al=null===(El=Object.getOwnPropertyDescriptor(function(){},"name"))||void 0===El?void 0:El.configurable)&&void 0!==Al&&Al,Cl=Ol?Symbol.for("react.forward_ref"):"function"==typeof n&&n(function(e){return null}).$$typeof,Rl=Ol?Symbol.for("react.memo"):"function"==typeof f&&f(function(e){return null}).$$typeof;function Ml(e,i){if(process.env.NODE_ENV,Rl&&e.$$typeof===Rl)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 r=!1,s=e,o=e.displayName||e.name;if(Cl&&e.$$typeof===Cl&&(r=!0,"function"!=typeof(s=e.render)))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var a,l,u=function(e,n){return function(e,n){void 0===n&&(n="observed");var i=t.useRef(null);if(!i.current){var r={reaction:null,onStoreChange:null,stateVersion:Symbol(),name:n,subscribe:function(e){return gl.unregister(r),r.onStoreChange=e,r.reaction||(Sl(r),r.stateVersion=Symbol()),function(){var e;r.onStoreChange=null,null===(e=r.reaction)||void 0===e||e.dispose(),r.reaction=null}},getSnapshot:function(){return r.stateVersion}};i.current=r}var s,o,a=i.current;if(a.reaction||(Sl(a),gl.register(i,a,a)),t.useDebugValue(a.reaction,pl),Tl.useSyncExternalStore(a.subscribe,a.getSnapshot,a.getSnapshot),a.reaction.track(function(){try{s=e()}catch(e){o=e}}),o)throw o;return s}(function(){return s(e,n)},o)};return u.displayName=e.displayName,Pl&&Object.defineProperty(u,"name",{value:e.name,writable:!0,configurable:!0}),e.contextTypes&&(u.contextTypes=e.contextTypes,"production"!==process.env.NODE_ENV&&kl&&(kl=!1,console.warn("[mobx-react-lite] Support for Legacy Context in function components will be removed in the next major release."))),r&&(u=n(u)),u=f(u),a=e,l=u,Object.keys(a).forEach(function(e){Ll[e]||Object.defineProperty(l,e,Object.getOwnPropertyDescriptor(a,e))}),"production"!==process.env.NODE_ENV&&Object.defineProperty(u,"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`."))}}),u}var Ll={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};process.env.NODE_ENV,function(e){e||(e=fl,"production"!==process.env.NODE_ENV&&console.warn("[MobX] Failed to get unstable_batched updates from react-dom / react-native")),ws({reactionScheduler:e})}(x),gl.finalizeAllImmediately;var Nl=Ml(({onUnauthorized:t,children:n})=>(e.useEffect(()=>{Yo.isUnauthorized&&t()},[Yo.isUnauthorized]),w(e.Fragment,{children:n})));function zl(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 Dl(e){return(t,n)=>n?.addSuffix?n.comparison&&n.comparison>0?e.future?zl(e.future,t):"через "+zl(e.regular,t):e.past?zl(e.past,t):zl(e.regular,t)+" назад":zl(e.regular,t)}const Il={lessThanXSeconds:Dl({regular:{one:"меньше секунды",singularNominative:"меньше {{count}} секунды",singularGenitive:"меньше {{count}} секунд",pluralGenitive:"меньше {{count}} секунд"},future:{one:"меньше, чем через секунду",singularNominative:"меньше, чем через {{count}} секунду",singularGenitive:"меньше, чем через {{count}} секунды",pluralGenitive:"меньше, чем через {{count}} секунд"}}),xSeconds:Dl({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:Dl({regular:{one:"меньше минуты",singularNominative:"меньше {{count}} минуты",singularGenitive:"меньше {{count}} минут",pluralGenitive:"меньше {{count}} минут"},future:{one:"меньше, чем через минуту",singularNominative:"меньше, чем через {{count}} минуту",singularGenitive:"меньше, чем через {{count}} минуты",pluralGenitive:"меньше, чем через {{count}} минут"}}),xMinutes:Dl({regular:{singularNominative:"{{count}} минута",singularGenitive:"{{count}} минуты",pluralGenitive:"{{count}} минут"},past:{singularNominative:"{{count}} минуту назад",singularGenitive:"{{count}} минуты назад",pluralGenitive:"{{count}} минут назад"},future:{singularNominative:"через {{count}} минуту",singularGenitive:"через {{count}} минуты",pluralGenitive:"через {{count}} минут"}}),aboutXHours:Dl({regular:{singularNominative:"около {{count}} часа",singularGenitive:"около {{count}} часов",pluralGenitive:"около {{count}} часов"},future:{singularNominative:"приблизительно через {{count}} час",singularGenitive:"приблизительно через {{count}} часа",pluralGenitive:"приблизительно через {{count}} часов"}}),xHours:Dl({regular:{singularNominative:"{{count}} час",singularGenitive:"{{count}} часа",pluralGenitive:"{{count}} часов"}}),xDays:Dl({regular:{singularNominative:"{{count}} день",singularGenitive:"{{count}} дня",pluralGenitive:"{{count}} дней"}}),aboutXWeeks:Dl({regular:{singularNominative:"около {{count}} недели",singularGenitive:"около {{count}} недель",pluralGenitive:"около {{count}} недель"},future:{singularNominative:"приблизительно через {{count}} неделю",singularGenitive:"приблизительно через {{count}} недели",pluralGenitive:"приблизительно через {{count}} недель"}}),xWeeks:Dl({regular:{singularNominative:"{{count}} неделя",singularGenitive:"{{count}} недели",pluralGenitive:"{{count}} недель"}}),aboutXMonths:Dl({regular:{singularNominative:"около {{count}} месяца",singularGenitive:"около {{count}} месяцев",pluralGenitive:"около {{count}} месяцев"},future:{singularNominative:"приблизительно через {{count}} месяц",singularGenitive:"приблизительно через {{count}} месяца",pluralGenitive:"приблизительно через {{count}} месяцев"}}),xMonths:Dl({regular:{singularNominative:"{{count}} месяц",singularGenitive:"{{count}} месяца",pluralGenitive:"{{count}} месяцев"}}),aboutXYears:Dl({regular:{singularNominative:"около {{count}} года",singularGenitive:"около {{count}} лет",pluralGenitive:"около {{count}} лет"},future:{singularNominative:"приблизительно через {{count}} год",singularGenitive:"приблизительно через {{count}} года",pluralGenitive:"приблизительно через {{count}} лет"}}),xYears:Dl({regular:{singularNominative:"{{count}} год",singularGenitive:"{{count}} года",pluralGenitive:"{{count}} лет"}}),overXYears:Dl({regular:{singularNominative:"больше {{count}} года",singularGenitive:"больше {{count}} лет",pluralGenitive:"больше {{count}} лет"},future:{singularNominative:"больше, чем через {{count}} год",singularGenitive:"больше, чем через {{count}} года",pluralGenitive:"больше, чем через {{count}} лет"}}),almostXYears:Dl({regular:{singularNominative:"почти {{count}} год",singularGenitive:"почти {{count}} года",pluralGenitive:"почти {{count}} лет"},future:{singularNominative:"почти через {{count}} год",singularGenitive:"почти через {{count}} года",pluralGenitive:"почти через {{count}} лет"}})};function Fl(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const jl={date:Fl({formats:{full:"EEEE, d MMMM y 'г.'",long:"d MMMM y 'г.'",medium:"d MMM y 'г.'",short:"dd.MM.y"},defaultWidth:"full"}),time:Fl({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:Fl({formats:{any:"{{date}}, {{time}}"},defaultWidth:"any"})},Bl=Symbol.for("constructDateFrom");function Ul(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&Bl in e?e[Bl](t):e instanceof Date?new e.constructor(t):new Date(t)}let Vl={};function Gl(e,t){const n=Vl,i=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,r=(s=e,o=t?.in,Ul(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 $l(e,t,n){const[i,r]=function(e,...t){const n=Ul.bind(null,e||t.find(e=>"object"==typeof e));return t.map(n)}(n?.in,e,t);return+Gl(i,n)===+Gl(r,n)}const Zl=["воскресенье","понедельник","вторник","среду","четверг","пятницу","субботу"];function ql(e){const t=Zl[e];return 2===e?"'во "+t+" в' p":"'в "+t+" в' p"}const Wl={lastWeek:(e,t,n)=>{const i=e.getDay();return $l(e,t,n)?ql(i):function(e){const t=Zl[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 $l(e,t,n)?ql(i):function(e){const t=Zl[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 Hl(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 Kl={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:Hl({values:{narrow:["до н.э.","н.э."],abbreviated:["до н. э.","н. э."],wide:["до нашей эры","нашей эры"]},defaultWidth:"wide"}),quarter:Hl({values:{narrow:["1","2","3","4"],abbreviated:["1-й кв.","2-й кв.","3-й кв.","4-й кв."],wide:["1-й квартал","2-й квартал","3-й квартал","4-й квартал"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Hl({values:{narrow:["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],abbreviated:["янв.","фев.","март","апр.","май","июнь","июль","авг.","сент.","окт.","нояб.","дек."],wide:["январь","февраль","март","апрель","май","июнь","июль","август","сентябрь","октябрь","ноябрь","декабрь"]},defaultWidth:"wide",formattingValues:{narrow:["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],abbreviated:["янв.","фев.","мар.","апр.","мая","июн.","июл.","авг.","сент.","окт.","нояб.","дек."],wide:["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"]},defaultFormattingWidth:"wide"}),day:Hl({values:{narrow:["В","П","В","С","Ч","П","С"],short:["вс","пн","вт","ср","чт","пт","сб"],abbreviated:["вск","пнд","втр","срд","чтв","птн","суб"],wide:["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"]},defaultWidth:"wide"}),dayPeriod:Hl({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 Yl(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 Xl={ordinalNumber:(Ql={matchPattern:/^(\d+)(-?(е|я|й|ое|ье|ая|ья|ый|ой|ий|ый))?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const n=e.match(Ql.matchPattern);if(!n)return null;const i=n[0],r=e.match(Ql.parsePattern);if(!r)return null;let s=Ql.valueCallback?Ql.valueCallback(r[0]):r[0];return s=t.valueCallback?t.valueCallback(s):s,{value:s,rest:e.slice(i.length)}}),era:Yl({matchPatterns:{narrow:/^((до )?н\.?\s?э\.?)/i,abbreviated:/^((до )?н\.?\s?э\.?)/i,wide:/^(до нашей эры|нашей эры|наша эра)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^д/i,/^н/i]},defaultParseWidth:"any"}),quarter:Yl({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:Yl({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:Yl({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:Yl({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 Ql;const Jl={code:"ru",formatDistance:(e,t,n)=>Il[e](t,n),formatLong:jl,formatRelative:(e,t,n,i)=>{const r=Wl[e];return"function"==typeof r?r(t,n,i):r},localize:Kl,match:Xl,options:{weekStartsOn:1,firstWeekContainsDate:1}},eu=e=>w(T,{...e,dateAdapter:S,adapterLocale:Jl}),tu=({color:e="inherit"})=>w(k,{color:e}),nu=({children:t,configOptions:n})=>{const[i,r]=e.useState(null),[s,o]=e.useState("");return e.useEffect(()=>(ra.initialize({...n,onCheck:e=>{const{valid:t,reason:i}=e;o(i),r(t),n.onCheck?.(e)}}),()=>{ra.deactivate()}),[n]),null===i?w(tu,{color:"primary"}):i?w(e.Fragment,{children:t}):w(O,{color:"error",children:s})},iu=({children:t})=>{const[n,i]=e.useState(!1);return e.useEffect(()=>{Promise.all([Promise.resolve().then(function(){return Ob}),Promise.resolve().then(function(){return Cb}),Promise.resolve().then(function(){return Nb}),Promise.resolve().then(function(){return Ib}),Promise.resolve().then(function(){return $b}),Promise.resolve().then(function(){return Wb})]).then(()=>{i(!0)}).catch(()=>{i(!1)})},[]),n?w(e.Fragment,{children:t}):null},ru=new class{#W;#j;#d;#H;#K;#Y;#X;#Q;constructor(e={}){this.#W=e.queryCache||new il,this.#j=e.mutationCache||new el,this.#d=e.defaultOptions||{},this.#H=new Map,this.#K=new Map,this.#Y=0}mount(){this.#Y++,1===this.#Y&&(this.#X=Ra.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#W.onFocus())}),this.#Q=za.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#W.onOnline())}))}unmount(){this.#Y--,0===this.#Y&&(this.#X?.(),this.#X=void 0,this.#Q?.(),this.#Q=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(da(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 Na.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;Na.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){const n=this.#W;return Na.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},i=Na.batch(()=>this.#W.findAll(e).map(e=>e.cancel(n)));return Promise.all(i).then(ua).catch(ua)}invalidateQueries(e,t={}){return Na.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=Na.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(ua)),"paused"===e.state.fetchStatus?Promise.resolve():t}));return Promise.all(i).then(ua)}fetchQuery(e){const t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);const n=this.#W.build(this,t);return n.isStaleByTime(da(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ua).catch(ua)}fetchInfiniteQuery(e){return e.behavior=Ya(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ua).catch(ua)}ensureInfiniteQueryData(e){return e.behavior=Ya(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return za.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(ga(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#H.values()],n={};return t.forEach(t=>{ya(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#K.set(ga(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#K.values()],n={};return t.forEach(t=>{ya(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=_a(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===Oa&&(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()}},su=e=>w(ol,{...e,client:ru}),ou=({children:e,themeOptions:t})=>{const n=Q(t);return w(J,{theme:n,children:e})},au=({children:e,configOptions:t,themeOptions:n})=>w(dn,{children:w(su,{children:w(na,{children:w(ou,{themeOptions:n,children:w(eu,{children:w(iu,{children:w(nu,{configOptions:t,children:e})})})})})})}),lu=()=>{const{enqueueSnackbar:e}=h(We);return({variant:t,message:n})=>{e({variant:t,message:n,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:3e3,hideIconVariant:!0})}},uu=()=>{const e=lu();return t=>{const{response:n}=t;if(n){const{data:t}=n;if(t){const{detail:n}=t;n&&n.forEach(t=>{e({variant:"error",message:t})})}}}},cu=()=>hl({mutationKey:["logout-mutation"],mutationFn:async e=>await ra.instance.apiService.post({url:"logout"}),onError:uu(),onSuccess:()=>{ru.invalidateQueries({queryKey:["user"]})}}),hu=()=>hl({mutationKey:["sign-in-mutation"],mutationFn:async({body:{username:e,password:t}})=>{const n=pn({username:e,password:fn(t)});return await ra.instance.apiService.post({url:"token",body:n,config:{headers:{"Content-Type":"application/x-www-form-urlencoded"}}})}});var du,fu,pu,mu;!function(e){e.GET="GET",e.DELETE="DELETE",e.PUT="PUT",e.POST="POST"}(du||(du={})),function(e){e.TOP_RIGHT="top-right",e.BOTTOM_RIGHT="bottom-right",e.BOTTOM_LEFT="bottom-left",e.TOP_LEFT="top-left"}(fu||(fu={}));var _u,gu,yu=function(){if(mu)return pu;function e(e){this._maxSize=e,this.clear()}mu=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 pu={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)}},pu}();var vu,bu=function(){if(gu)return _u;gu=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 _u={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(" ")}}(),xu={exports:{}};var wu=function(){if(vu)return xu.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 vu=1,xu.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)},xu.exports.array=e,xu.exports}(),Eu=xe(wu);const Au=Object.prototype.toString,Tu=Error.prototype.toString,Su=RegExp.prototype.toString,ku="undefined"!=typeof Symbol?Symbol.prototype.toString:()=>"",Ou=/^Symbol\((.*)\)(.*)$/;function Pu(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 ku.call(e).replace(Ou,"Symbol($1)");const i=Au.call(e).slice(8,-1);return"Date"===i?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===i||e instanceof Error?"["+Tu.call(e)+"]":"RegExp"===i?Su.call(e):null}function Cu(e,t){let n=Pu(e,t);return null!==n?n:JSON.stringify(e,function(e,n){let i=Pu(this[e],t);return null!==i?i:n},2)}function Ru(e){return null==e?[]:[].concat(e)}let Mu,Lu,Nu,zu=/\$\{\s*(\w+)\s*\}/g;Mu=Symbol.toStringTag;class Du{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[Mu]="Error",this.name="ValidationError",this.value=t,this.path=n,this.type=i,this.errors=[],this.inner=[],Ru(e).forEach(e=>{if(Iu.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]}}Lu=Symbol.hasInstance,Nu=Symbol.toStringTag;class Iu 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(zu,(e,n)=>Cu(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 Du(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[Nu]="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,Iu)}static[Lu](e){return Du[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let Fu={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 \`${Cu(i,!0)}\`).`:".";return"mixed"!==t?`${e} must be a \`${t}\` type, but the final value was: \`${Cu(n,!0)}\``+r:`${e} must match the configured type. The validated value was: \`${Cu(n,!0)}\``+r}},ju={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"},Bu={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"},Uu={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Vu={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},Gu={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"},$u={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: \`${Cu(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: \`${Cu(n,!0)}\``}return Iu.formatError(Fu.notType,e)}};Object.assign(Object.create(null),{mixed:Fu,string:ju,number:Bu,date:Uu,object:Vu,array:Gu,boolean:{isValue:"${path} field must be ${value}"},tuple:$u});const Zu=e=>e&&e.__isYupSchema__;class qu{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 qu(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(!Zu(i))throw new TypeError("conditions must return a schema object");return i.resolve(t)}}const Wu="$",Hu=".";class Ku{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]===Wu,this.isValue=this.key[0]===Hu,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?Wu:this.isValue?Hu:"";this.path=this.key.slice(n.length),this.getter=this.path&&yu.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}}Ku.prototype.__isYupRef=!0;const Yu=e=>null==e;function Xu(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=Qu(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 Iu(Iu.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=>Ju(e,g),options:i,originalValue:r,schema:s};const x=e=>{Iu.isError(e)?v(e):e?a(null):v(y())},w=e=>{Iu.isError(e)?v(e):o(e)};if(d&&Yu(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 Qu(e,t){if(!e)return e;for(const n of Object.keys(e))e[n]=Ju(e[n],t);return e}function Ju(e,t){return Ku.isRef(e)?e.getValue(t.value,t.parent,t.context):e}function ec(e,t,n,i=n){let r,s,o;return t?(yu.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 tc extends Set{describe(){const e=[];for(const t of this.values())e.push(Ku.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 tc(this.values())}merge(e,t){const n=this.clone();return e.forEach(e=>n.add(e)),t.forEach(e=>n.delete(e)),n}}function nc(e,t=new Map){if(Zu(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]=nc(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,nc(r,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const i of e)n.add(nc(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]=nc(r,t)}return n}function ic(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 rc(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:ic(n)}))}(e,t);const i=t?`${t}.${e.path}`:e.path;return e.inner.flatMap(e=>rc(e,i))}class sc{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 tc,this._blacklist=new tc,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Fu.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=nc(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&&Yu(r))return r;let s=Cu(e),o=Cu(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)=>{Iu.isError(e)&&(e.value=t),s(e)},(e,t)=>{e.length?s(new Iu(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 Iu.isError(e)&&(e.value=t),e},(t,n)=>{if(t.length)throw new Iu(t,e,void 0,void 0,s);i=n}),i}isValid(e,t){return this.validate(e,t).then(()=>!0,e=>{if(Iu.isError(e))return!1;throw e})}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(e){if(Iu.isError(e))return!1;throw e}}_getDefault(e){let t=this.spec.default;return null==t?t:"function"==typeof t?t.call(this,e):nc(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=Xu({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=Xu({message:t,name:"optionality",test(e){return void 0!==e||this.schema.spec.optional}}),n}optional(){return this.optionality(!0)}defined(e=Fu.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=Fu.notNull){return this.nullability(!1,e)}required(e=Fu.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=Fu.default),"function"!=typeof t.test)throw new TypeError("`test` is a required parameters");let n=this.clone(),i=Xu(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=Ru(e).map(e=>new Ku(e));return i.forEach(e=>{e.isSibling&&n.deps.push(e.key)}),n.conditions.push("function"==typeof t?new qu(i,t):qu.fromOptions(i,t)),n}typeError(e){let t=this.clone();return t.internalTests.typeError=Xu({message:e,name:"typeError",skipAbsent:!0,test(e){return!!this.schema._typeCheck(e)||this.createError({params:{type:this.schema.type}})}}),t}oneOf(e,t=Fu.oneOf){let n=this.clone();return e.forEach(e=>{n._whitelist.add(e),n._blacklist.delete(e)}),n.internalTests.whiteList=Xu({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=Fu.notOneOf){let n=this.clone();return e.forEach(e=>{n._blacklist.add(e),n._whitelist.delete(e)}),n.internalTests.blacklist=Xu({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?Qu(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 Iu)return{issues:rc(e)};throw e}}};return t}}sc.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])sc.prototype[`${e}At`]=function(t,n,i={}){const{parent:r,parentPath:s,schema:o}=ec(this,t,n,i.context);return o[e](r&&r[s],Object.assign({},i,{parent:r,path:t}))};for(const e of["equals","is"])sc.prototype[e]=sc.prototype.oneOf;for(const e of["not","nope"])sc.prototype[e]=sc.prototype.notOneOf;const oc=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function ac(e){var t,n;const i=oc.exec(e);return i?{year:lc(i[1]),month:lc(i[2],1)-1,day:lc(i[3],1),hour:lc(i[4]),minute:lc(i[5]),second:lc(i[6]),millisecond:i[7]?lc(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:lc(i[10]),minuteOffset:lc(i[11])}:null}function lc(e,t=0){return Number(e)||t}let uc=/^[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])?)*$/,cc=/^((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,hc=/^(?:[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,dc=new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"),fc=e=>Yu(e)||e===e.trim(),pc={}.toString();function mc(){return new _c}class _c extends sc{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===pc?e:n})})}required(e){return super.required(e).withMutation(t=>t.test({message:e||Fu.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=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=ju.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=ju.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||ju.matches,params:{regex:e},skipAbsent:!0,test:t=>""===t&&r||-1!==t.search(e)})}email(e=ju.email){return this.matches(uc,{name:"email",message:e,excludeEmptyString:!0})}url(e=ju.url){return this.matches(cc,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=ju.uuid){return this.matches(hc,{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(dc,{name:"datetime",message:i||ju.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:i||ju.datetime_offset,params:{allowOffset:t},skipAbsent:!0,test:e=>{if(!e||t)return!0;const n=ac(e);return!!n&&!!n.z}}).test({name:"datetime_precision",message:i||ju.datetime_precision,params:{precision:n},skipAbsent:!0,test:e=>{if(!e||null==n)return!0;const t=ac(e);return!!t&&t.precision===n}})}ensure(){return this.default("").transform(e=>null===e?"":e)}trim(e=ju.trim){return this.transform(e=>null!=e?e.trim():e).test({message:e,name:"trim",test:fc})}lowercase(e=ju.lowercase){return this.transform(e=>Yu(e)?e:e.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>Yu(e)||e===e.toLowerCase()})}uppercase(e=ju.uppercase){return this.transform(e=>Yu(e)?e:e.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>Yu(e)||e===e.toUpperCase()})}}mc.prototype=_c.prototype;function gc(){return new yc}class yc extends sc{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=Bu.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=Bu.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=Bu.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=Bu.moreThan){return this.test({message:t,name:"min",exclusive:!0,params:{more:e},skipAbsent:!0,test(t){return t>this.resolve(e)}})}positive(e=Bu.positive){return this.moreThan(0,e)}negative(e=Bu.negative){return this.lessThan(0,e)}integer(e=Bu.integer){return this.test({name:"integer",message:e,skipAbsent:!0,test:e=>Number.isInteger(e)})}truncate(){return this.transform(e=>Yu(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=>Yu(t)?t:Math[e](t))}}gc.prototype=yc.prototype;let vc=new Date("");function bc(){return new xc}class xc extends sc{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=ac(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)?xc.INVALID_DATE:new Date(e)))})}prepareParam(e,t){let n;if(Ku.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=Uu.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=Uu.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 wc(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 Ec(e){return(t,n)=>wc(e,t)-wc(e,n)}xc.INVALID_DATE=vc,bc.prototype=xc.prototype,bc.INVALID_DATE=vc;const Ac=(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 Tc(e){if("fields"in e){const t={};for(const[n,i]of Object.entries(e.fields))t[n]=Tc(i);return e.setFields(t)}if("array"===e.type){const t=e.optional();return t.innerType&&(t.innerType=Tc(t.innerType)),t}return"tuple"===e.type?e.optional().clone({types:e.spec.types.map(Tc)}):"optional"in e?e.optional():e}let Sc=e=>"[object Object]"===Object.prototype.toString.call(e);function kc(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(e=>-1===n.indexOf(e))}const Oc=Ec([]);function Pc(e){return new Cc(e)}class Cc extends sc{constructor(e){super({type:"object",check:e=>Sc(e)||"function"==typeof e}),this.fields=Object.create(null),this._sortErrors=Oc,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 sc?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||!Sc(r))return void i(e,r);s=s||r;let a=[];for(let e of this._nodes){let n=this.fields[e];n&&!Ku.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=yu.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),Ku.isRef(n)&&n.isSibling?s(n.path,t):Zu(n)&&"deps"in n&&n.deps.forEach(e=>s(e,t))}return Eu.array(Array.from(i),n).reverse()}(e,t),n._sortErrors=Ec(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 Tc(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=yu.getter(e,!0);return this.transform(r=>{if(!r)return r;let s=r;return((e,t)=>{const n=[...yu.normalizePath(t)];if(1===n.length)return n[0]in e;let i=n.pop(),r=yu.getter(yu.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(Ac)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||Vu.exact,test(e){if(null==e)return!0;const t=kc(this.schema,e);return 0===t.length||this.createError({params:{properties:t.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,t=Vu.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=kc(this.schema,t);return!e||0===n.length||this.createError({params:{unknown:n.join(", ")}})}});return n.spec.noUnknown=e,n}unknown(e=!0,t=Vu.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(bu.camelCase)}snakeCase(){return this.transformKeys(bu.snakeCase)}constantCase(){return this.transformKeys(e=>bu.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 Rc(e){return new Mc(e)}Pc.prototype=Cc.prototype;class Mc extends sc{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(Ac)}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(!Zu(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+Cu(e));return t.innerType=e,t.spec=Object.assign({},t.spec,{types:e}),t}length(e,t=Gu.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||Gu.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||Gu.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}}Rc.prototype=Mc.prototype;const Lc="Данное поле обязательно для заполнения",Nc=()=>mc(),zc=(e=Lc)=>Nc().required(e),Dc=gc(),Ic=Dc.required(Lc),Fc=Rc(),jc=bc(),Bc=jc.required(Lc),Uc=({items:t,onOpen:n,defaultValue:i=null})=>{const[r,s]=e.useState(i),o=e.useCallback(()=>{s(null)},[]);e.useEffect(()=>{i&&s(i)},[i]);const a=e.useId();return w(P,{id:a,children:t.map(({value:e,summary:t,getDetails:i})=>{const l=`${a}-accordion-${e}`;return E(C,{expanded:e===r,children:[w(R,{expandIcon:w(te,{}),onClick:()=>{s(t=>t===e?null:(n?.(e),e))},"aria-controls":`${l}-content`,id:`${l}-header`,children:t}),w(M,{children:i({onClose:o})})]},l)})})},Vc=e=>{const{children:t,variant:n="contained",loading:i,icon:r,sx:s,...o}=e;return r?w(ne,{...o,loading:i,children:r}):w(N,{sx:{whiteSpace:"nowrap",padding:"5px 15px",textTransform:"none",...s},loading:i,loadingPosition:"start",variant:n,...o,children:t})},Gc={reset:oe,edit:re,move:se,save:ae,delete:ie},$c=({title:t,iconProps:n,...i})=>{const r=e.useId(),s=Gc[n.name],o=n.color??"primary";return t?w(z,{title:t,children:w(D,{id:r,...i,onClick:e=>{e.stopPropagation(),i.onClick?.(e)},children:w(s,{fontSize:"medium",color:o})})}):w(D,{id:r,...i,onClick:e=>{e.stopPropagation(),i.onClick?.(e)},children:w(s,{fontSize:"medium",color:o})})},Zc=e.forwardRef(function(e,t){return w(I,{direction:"up",ref:t,...e})}),qc=({notification:t,onDelete:n,disabled:i=!1,...r})=>{const s=e.useId(),[o,a]=e.useState(!1),l=()=>{a(!1)},u=e.useMemo(()=>({name:"delete",color:i?"disabled":"error"}),[i]);return E(e.Fragment,{children:[t?w(z,{title:t.title,children:w($c,{...r,iconProps:u,onClick:()=>{a(!0)},disabled:i})}):w($c,{...r,iconProps:u,onClick:n,disabled:i}),t?E(F,{slots:{transition:Zc},open:o,onClose:l,children:[w(j,{id:`${s}-dialog-title`,children:t.title}),w(B,{children:w(U,{id:`${s}-dialog-text`,children:t.description})}),E(V,{children:[w(N,{variant:"contained",color:"error",sx:{textTransform:"none"},onClick:l,children:"Отмена"}),w(N,{variant:"contained",sx:{textTransform:"none"},onClick:()=>{n(),l()},children:"Подтвердить"})]})]}):null]})},Wc=G("input")({clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:1,overflow:"hidden",position:"absolute",bottom:0,left:0,whiteSpace:"nowrap",width:1}),Hc=({children:e,accept:t,onFilesLoad:n,...i})=>E(Vc,{...i,component:"label",variant:"contained",startIcon:w(le,{}),children:[e,w(Wc,{type:"file",accept:t,onChange:e=>{const{target:{files:t}}=e;t&&n({event:e,files:t})},multiple:!0})]});var Kc=Ml(({name:t,title:n,description:i,onSuccess:r,onOpen:s,onClose:o,theme:a="info",agreeButton:l,disagreeButton:u,content:c})=>{const h=e.useId(),d=e.useId(),f=e.useId(),p=Ho.getIsOpen(t),m=()=>{Ho.close(t)};return e.useEffect(()=>{p?s?.():o?.()},[p]),E(F,{id:h,open:p,onClose:m,"aria-labelledby":d,"aria-describedby":f,children:[w(j,{id:d,sx:({palette:e})=>({background:e[a].main,color:e[a].contrastText}),children:n}),w($,{}),E(B,{sx:({spacing:e})=>({display:"grid",gap:e(2)}),children:[w(U,{id:f,children:i}),c?E(e.Fragment,{children:[w($,{}),c]}):null]}),w($,{}),E(V,{children:[w(Vc,{color:"error",onClick:m,disabled:u?.disabled,children:u?.text??"Закрыть"}),w(Vc,{color:"success",onClick:()=>{r(),m()},disabled:l?.disabled,children:l?.text??"Подтвердить"})]})]})});const Yc=({children:e,sx:t,...n})=>w(P,{...n,sx:e=>{const{spacing:n}=e;return{px:n(2),py:n(2),borderRadius:"10px",boxShadow:"0px 8px 24px 0px rgba(0,0,0,0.3)",maxHeight:"85vh",maxWidth:"85vw",overflowX:"auto",...t?.(e)}},children:e});var Xc=e=>"checkbox"===e.type,Qc=e=>e instanceof Date,Jc=e=>null==e;const eh=e=>"object"==typeof e;var th=e=>!Jc(e)&&!Array.isArray(e)&&eh(e)&&!Qc(e),nh=e=>th(e)&&e.target?Xc(e.target)?e.target.checked:e.target.value:e,ih=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),rh="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function sh(e){if(e instanceof Date)return new Date(e);const t="undefined"!=typeof FileList&&e instanceof FileList;if(rh&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!(n||th(e)&&(e=>{const t=e.constructor&&e.constructor.prototype;return th(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]=sh(e[t]));return i}var oh=e=>/^\w*$/.test(e),ah=e=>void 0===e,lh=e=>Array.isArray(e)?e.filter(Boolean):[],uh=e=>lh(e.replace(/["|']|\]/g,"").split(/\.|\[/)),ch=(e,t,n)=>{if(!t||!th(e))return n;const i=(oh(t)?[t]:uh(t)).reduce((e,t)=>Jc(e)?e:e[t],e);return ah(i)||i===e?ah(e[t])?n:e[t]:i},hh=e=>"boolean"==typeof e,dh=e=>"function"==typeof e,fh=(e,t,n)=>{let i=-1;const r=oh(t)?[t]:uh(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=th(n)||Array.isArray(n)?n:isNaN(+r[i+1])?{}:[]}if("__proto__"===t||"constructor"===t||"prototype"===t)return;e[t]=s,e=e[t]}};const ph="blur",mh="focusout",_h="change",gh="onBlur",yh="onChange",vh="onSubmit",bh="onTouched",xh="all",wh="max",Eh="min",Ah="maxLength",Th="minLength",Sh="pattern",kh="required",Oh="validate",Ph=t.createContext(null);Ph.displayName="HookFormControlContext";const Ch=()=>t.useContext(Ph);var Rh=(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]!==xh&&(t._proxyFormState[r]=!i||xh),n&&(n[r]=!0),e[r]}});return r};const Mh="undefined"!=typeof window?t.useLayoutEffect:t.useEffect;var Lh=e=>"string"==typeof e,Nh=(e,t,n,i,r)=>Lh(e)?(i&&t.watch.add(e),ch(n,e,r)):Array.isArray(e)?e.map(e=>(i&&t.watch.add(e),ch(n,e))):(i&&(t.watchAll=!0),n),zh=e=>Jc(e)||!eh(e);function Dh(e,t,n=new WeakSet){if(zh(e)||zh(t))return Object.is(e,t);if(Qc(e)&&Qc(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(Qc(i)&&Qc(e)||th(i)&&th(e)||Array.isArray(i)&&Array.isArray(e)?!Dh(i,e,n):!Object.is(i,e))return!1}}return!0}function Ih(e){const n=Ch(),{name:i,disabled:r,control:s=n,shouldUnregister:o,defaultValue:a,exact:l=!0}=e,u=ih(s._names.array,i),c=t.useMemo(()=>ch(s._formValues,i,ch(s._defaultValues,i,a)),[s,i,a]),h=function(e){const n=Ch(),{control:i=n,name:r,defaultValue:s,disabled:o,exact:a,compute:l}=e||{},u=t.useRef(s),c=t.useRef(l),h=t.useRef(void 0),d=t.useRef(i),f=t.useRef(r);c.current=l;const[p,m]=t.useState(()=>{const e=i._getWatch(r,u.current);return c.current?c.current(e):e}),_=t.useCallback(e=>{const t=Nh(r,i._names,e||i._formValues,!1,u.current);return c.current?c.current(t):t},[i._formValues,i._names,r]),g=t.useCallback(e=>{if(!o){const t=Nh(r,i._names,e||i._formValues,!1,u.current);if(c.current){const e=c.current(t);Dh(e,h.current)||(m(e),h.current=e)}else m(t)}},[i._formValues,i._names,o,r]);Mh(()=>(d.current===i&&Dh(f.current,r)||(d.current=i,f.current=r,g()),i._subscribe({name:r,formState:{values:!0},exact:a,callback:e=>{g(e.values)}})),[i,a,r,g]),t.useEffect(()=>i._removeUnmounted());const y=d.current!==i,v=f.current,b=t.useMemo(()=>{if(o)return null;const e=!y&&!Dh(v,r);return y||e?_():null},[o,y,r,v,_]);return null!==b?b:p}({control:s,name:i,defaultValue:c,exact:l}),d=function(e){const n=Ch(),{control:i=n,disabled:r,name:s,exact:o}=e||{},[a,l]=t.useState(i._formState),u=t.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Mh(()=>i._subscribe({name:s,formState:u.current,exact:o,callback:e=>{!r&&l({...i._formState,...e})}}),[s,r,o]),t.useEffect(()=>{u.current.isValid&&i._setValid(!0)},[i]),t.useMemo(()=>Rh(a,i,u.current,!1),[a,i])}({control:s,name:i,exact:l}),f=t.useRef(e),p=t.useRef(void 0),m=t.useRef(s.register(i,{...e.rules,value:h,...hh(e.disabled)?{disabled:e.disabled}:{}}));f.current=e;const _=t.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!ch(d.errors,i)},isDirty:{enumerable:!0,get:()=>!!ch(d.dirtyFields,i)},isTouched:{enumerable:!0,get:()=>!!ch(d.touchedFields,i)},isValidating:{enumerable:!0,get:()=>!!ch(d.validatingFields,i)},error:{enumerable:!0,get:()=>ch(d.errors,i)}}),[d,i]),g=t.useCallback(e=>m.current.onChange({target:{value:nh(e),name:i},type:_h}),[i]),y=t.useCallback(()=>m.current.onBlur({target:{value:ch(s._formValues,i),name:i},type:ph}),[i,s._formValues]),v=t.useCallback(e=>{const t=ch(s._fields,i);t&&t._f&&e&&(t._f.ref={focus:()=>dh(e.focus)&&e.focus(),select:()=>dh(e.select)&&e.select(),setCustomValidity:t=>dh(e.setCustomValidity)&&e.setCustomValidity(t),reportValidity:()=>dh(e.reportValidity)&&e.reportValidity()})},[s._fields,i]),b=t.useMemo(()=>({name:i,value:h,...hh(r)||d.disabled?{disabled:d.disabled||r}:{},onChange:g,onBlur:y,ref:v}),[i,r,d.disabled,g,y,v,h]);return t.useEffect(()=>{const e=s._options.shouldUnregister||o,t=p.current;t&&t!==i&&!u&&s.unregister(t),s.register(i,{...f.current.rules,...hh(f.current.disabled)?{disabled:f.current.disabled}:{}});const n=(e,t)=>{const n=ch(s._fields,e);n&&n._f&&(n._f.mount=t)};if(n(i,!0),e){const e=sh(ch(s._options.defaultValues,i,f.current.defaultValue));fh(s._defaultValues,i,e),ah(ch(s._formValues,i))&&fh(s._formValues,i,e)}return!u&&s.register(i),p.current=i,()=>{(u?e&&!s._state.action:e)?s.unregister(i):n(i,!1)}},[i,s,u,o]),t.useEffect(()=>{s._setDisabledField({disabled:r,name:i})},[r,i,s]),t.useMemo(()=>({field:b,formState:d,fieldState:_}),[b,d,_])}const Fh=e=>e.render(Ih(e)),jh=t.createContext(null);jh.displayName="HookFormContext";const Bh=()=>t.useContext(jh),Uh=e=>{const{children:n,watch:i,getValues:r,getFieldState:s,setError:o,clearErrors:a,setValue:l,trigger:u,formState:c,resetField:h,reset:d,handleSubmit:f,unregister:p,control:m,register:_,setFocus:g,subscribe:y}=e;return t.createElement(jh.Provider,{value:t.useMemo(()=>({watch:i,getValues:r,getFieldState:s,setError:o,clearErrors:a,setValue:l,trigger:u,formState:c,resetField:h,reset:d,handleSubmit:f,unregister:p,control:m,register:_,setFocus:g,subscribe:y}),[a,m,c,s,r,f,_,d,h,o,g,l,y,u,p,i])},t.createElement(Ph.Provider,{value:m},n))};var Vh=(e,t,n,i,r)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[i]:r||!0}}:{},Gh=e=>Array.isArray(e)?e:[e],$h=()=>{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 Zh(e,t){const n={};for(const i in e)if(e.hasOwnProperty(i)){const r=e[i],s=t[i];if(r&&th(r)&&s){const e=Zh(r,s);th(e)&&(n[i]=e)}else e[i]&&(n[i]=s)}return n}var qh=e=>th(e)&&!Object.keys(e).length,Wh=e=>"file"===e.type,Hh=e=>{if(!rh)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Kh=e=>"select-multiple"===e.type,Yh=e=>"radio"===e.type,Xh=e=>Hh(e)&&e.isConnected;function Qh(e,t){const n=Array.isArray(t)?t:oh(t)?[t]:uh(t),i=1===n.length?e:function(e,t){const n=t.slice(0,-1).length;let i=0;for(;i<n;)e=ah(e)?i++:e[t[i++]];return e}(e,n),r=n.length-1,s=n[r];return i&&delete i[s],0!==r&&(th(i)&&qh(i)||Array.isArray(i)&&function(e){for(const t in e)if(e.hasOwnProperty(t)&&!ah(e[t]))return!1;return!0}(i))&&Qh(e,n.slice(0,-1)),e}function Jh(e){return Array.isArray(e)||th(e)&&!(e=>{for(const t in e)if(dh(e[t]))return!0;return!1})(e)}function ed(e,t={}){for(const n in e){const i=e[n];Jh(i)?(t[n]=Array.isArray(i)?[]:{},ed(i,t[n])):ah(i)||(t[n]=!0)}return t}function td(e,t,n){n||(n=ed(t));for(const i in e){const r=e[i];if(Jh(r))ah(t)||zh(n[i])?n[i]=ed(r,Array.isArray(r)?[]:{}):td(r,Jc(t)?{}:t[i],n[i]);else{const e=t[i];n[i]=!Dh(r,e)}}return n}const nd={value:!1,isValid:!1},id={value:!0,isValid:!0};var rd=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&&!ah(e[0].attributes.value)?ah(e[0].value)||""===e[0].value?id:{value:e[0].value,isValid:!0}:id:nd}return nd},sd=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:i})=>ah(e)?e:t?""===e?NaN:e?+e:e:n&&Lh(e)?new Date(e):i?i(e):e;const od={isValid:!1,value:null};var ad=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,od):od;function ld(e){const t=e.ref;return Wh(t)?t.files:Yh(t)?ad(e.refs).value:Kh(t)?[...t.selectedOptions].map(({value:e})=>e):Xc(t)?rd(e.refs).value:sd(ah(t.value)?e.ref.value:t.value,e)}var ud=e=>e instanceof RegExp,cd=e=>ah(e)?e:ud(e)?e.source:th(e)?ud(e.value)?e.value.source:e.value:e,hd=e=>({isOnSubmit:!e||e===vh,isOnBlur:e===gh,isOnChange:e===yh,isOnAll:e===xh,isOnTouch:e===bh});const dd="AsyncFunction";var fd=e=>!!e&&!!e.validate&&!!(dh(e.validate)&&e.validate.constructor.name===dd||th(e.validate)&&Object.values(e.validate).find(e=>e.constructor.name===dd)),pd=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))));const md=(e,t,n,i)=>{for(const r of n||Object.keys(e)){const n=ch(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(md(s,t))break}else if(th(s)&&md(s,t))break}}};function _d(e,t,n){const i=ch(e,n);if(i||oh(n))return{error:i,name:n};const r=n.split(".");for(;r.length;){const i=r.join("."),s=ch(t,i),o=ch(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 gd=(e,t,n)=>{const i=Gh(ch(e,n));return fh(i,"root",t[n]),fh(e,n,i),e};function yd(e,t,n="validate"){if(Lh(e)||Array.isArray(e)&&e.every(Lh)||hh(e)&&!e)return{type:n,message:Lh(e)?e:"",ref:t}}var vd=e=>th(e)&&!ud(e)?e:{value:e,message:""},bd=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=ch(n,m);if(!g||t.has(m))return{};const v=a?a[0]:o,b=e=>{r&&v.reportValidity&&(v.setCustomValidity(hh(e)?"":e||""),v.reportValidity())},x={},w=Yh(o),E=Xc(o),A=w||E,T=(_||Wh(o))&&ah(o.value)&&ah(y)||Hh(o)&&""===o.value||""===y||Array.isArray(y)&&!y.length,S=Vh.bind(null,m,i,x),k=(e,t,n,i=Ah,r=Th)=>{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||Jc(y))||hh(y)&&!y||E&&!rd(a).isValid||w&&!ad(a).isValid)){const{value:e,message:t}=Lh(l)?{value:!!l,message:l}:vd(l);if(e&&(x[m]={type:kh,message:t,ref:v,...S(kh,t)},!i))return b(t),x}if(!(T||Jc(h)&&Jc(d))){let e,t;const n=vd(d),r=vd(h);if(Jc(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;Lh(n.value)&&y&&(e=a?s(y)>s(n.value):l?y>n.value:i>new Date(n.value)),Lh(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);Jc(n.value)||(e=i>n.value),Jc(r.value)||(t=i<r.value)}if((e||t)&&(k(!!e,n.message,r.message,wh,Eh),!i))return b(x[m].message),x}if((u||c)&&!T&&(Lh(y)||s&&Array.isArray(y))){const e=vd(u),t=vd(c),n=!Jc(e.value)&&y.length>+e.value,r=!Jc(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&&Lh(y)){const{value:e,message:t}=vd(f);if(ud(e)&&!y.match(e)&&(x[m]={type:Sh,message:t,ref:o,...S(Sh,t)},!i))return b(t),x}if(p)if(dh(p)){const e=yd(await p(y,n),v);if(e&&(x[m]={...e,...S(Oh,e.message)},!i))return b(e.message),x}else if(th(p)){let e={};for(const t in p){if(!qh(e)&&!i)break;const r=yd(await p[t](y,n),v,t);r&&(e={...r,...S(t,r.message)},b(r.message),i&&(x[m]=e))}if(!qh(e)&&(x[m]={ref:v,...e},!i))return x}return b(!0),x};const xd={mode:vh,reValidateMode:yh,shouldFocusError:!0};function wd(e={}){let t,n={...xd,...e},i={submitCount:0,isDirty:!1,isReady:!1,isLoading:dh(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:n.errors||{},disabled:n.disabled||!1},r={},s=(th(n.defaultValues)||th(n.values))&&sh(n.defaultValues||n.values)||{},o=n.shouldUnregister?{}:sh(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:$h(),state:$h()},p=n.criteriaMode===xh,m=async e=>{if(!a.keepIsValid&&!n.disabled&&(h.isValid||d.isValid||e)){let e;n.resolver?(e=qh((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?fh(i.validatingFields,e,t):Qh(i.validatingFields,e))}),f.state.next({validatingFields:i.validatingFields,isValidating:!qh(i.validatingFields)}))},g=(e,t,n,i)=>{const l=ch(r,e);if(l){const r=ch(o,e,ah(n)?ch(s,e):n);ah(r)||i&&i.defaultChecked||t?fh(o,e,t?r:ld(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=Dh(ch(s,e),t);u=!!ch(i.dirtyFields,e),n?Qh(i.dirtyFields,e):fh(i.dirtyFields,e,!0),c.dirtyFields=i.dirtyFields,l=l||(h.dirtyFields||d.dirtyFields)&&u!==!n}if(r){const t=ch(i.touchedFields,e);t||(fh(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=ch(i.errors,e),l=(h.isValid||d.isValid)&&hh(r)&&i.isValid!==r;var c;if(n.delayError&&s?(c=()=>((e,t)=>{fh(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?fh(i.errors,e,s):Qh(i.errors,e)),(s?!Dh(a,s):a)||!qh(o)||l){const t={...o,...l&&hh(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=ch(t,n);e&&fh(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&&fd(u._f);c&&h.validatingFields&&_([t.name],!0);const d=await bd(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&&(ch(d,t.name)?a?gd(i.errors,d,t.name):fh(i.errors,t.name,d[t.name]):Qh(i.errors,t.name))}!qh(a)&&await x(a,r,s)}}return s.valid},w=(e,t)=>!n.disabled&&(e&&t&&fh(o,e,t),!Dh(C(),s)),E=(e,t,n)=>Nh(e,l,{...a.mount?o:ah(t)?s:Lh(e)?{[e]:t}:t},n,t),A=(e,t,n={})=>{const i=ch(r,e);let s=t;if(i){const n=i._f;n&&(!n.disabled&&fh(o,e,sd(t,n)),s=Hh(n.ref)&&Jc(t)?"":t,Kh(n.ref)?[...n.ref.options].forEach(e=>e.selected=s.includes(e.value)):n.refs?Xc(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):Wh(n.ref)?n.ref.value="":(n.ref.value=s,n.ref.type||f.state.next({name:e,values:sh(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=ch(r,o);(l.array.has(e)||th(s)||a&&!a._f)&&!Qc(s)?T(o,s,n):A(o,s,n)}},S=(e,t,n={})=>{const u=ch(r,e),c=l.array.has(e),p=sh(t);fh(o,e,p),c?(f.array.next({name:e,values:sh(o)}),(h.isDirty||h.dirtyFields||d.isDirty||d.dirtyFields)&&n.shouldDirty&&f.state.next({name:e,dirtyFields:td(s,o),isDirty:w(e,p)})):!u||u._f||Jc(p)?A(e,p,n):T(e,p,n),pd(e,l)?f.state.next({...i,name:e,values:sh(o)}):f.state.next({name:a.mount?e:void 0,values:sh(o)})},k=async e=>{a.mount=!0;const s=e.target;let u=s.name,c=!0;const g=ch(r,u),w=e=>{c=Number.isNaN(e)||Qc(e)&&isNaN(e.getTime())||Dh(e,ch(o,u,e))},E=hd(n.mode),A=hd(n.reValidateMode);if(g){let a,S;const k=s.type?ld(g._f):nh(e),O=e.type===ph||e.type===mh,C=!((T=g._f).mount&&(T.required||T.min||T.max||T.maxLength||T.minLength||T.pattern||T.validate)||n.resolver||ch(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,ch(i.touchedFields,u),i.isSubmitted,A,E),R=pd(u,l,O);fh(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=!qh(M)||R;if(!O&&f.state.next({name:u,type:e.type,values:sh(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=_d(i.errors,r,u),n=_d(e,r,t.name||u);a=n.error,u=n.name,S=qh(e)}}else _([u],!0),a=(await bd(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(ch(i.errors,t)&&e.focus)return e.focus(),1},P=async(e,t={})=>{let s,o;const a=Gh(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=ch(t,n);e?fh(i.errors,n,e):Qh(i.errors,n)}else i.errors=t;return t})(ah(e)?e:a);s=qh(t),o=e?!a.some(e=>ch(t,e)):s}else e?(o=(await Promise.all(a.map(async e=>{const t=ch(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({...!Lh(e)||(h.isValid||d.isValid)&&s!==i.isValid?{}:{name:e},...n.resolver||!e?{isValid:s}:{},errors:i.errors}),t.shouldFocus&&!o&&md(r,O,e?a:l.mount),o},C=(e,t)=>{let n={...a.mount?o:s};return t&&(n=Zh(t.dirtyFields?i.dirtyFields:i.touchedFields,n)),ah(e)?n:Lh(e)?ch(n,e):e.map(e=>ch(n,e))},R=(e,t)=>({invalid:!!ch((t||i).errors,e),isDirty:!!ch((t||i).dirtyFields,e),error:ch((t||i).errors,e),isValidating:!!ch(i.validatingFields,e),isTouched:!!ch((t||i).touchedFields,e)}),M=(e,t,n)=>{const s=(ch(r,e,{_f:{}})._f||{}).ref,o=ch(i.errors,e)||{},{ref:a,message:l,type:u,...c}=o;fh(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&&!Gh(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 qh(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(e=>t[e]===(!i||xh))})(t,e.formState||h,U,e.reRenderRoot)||e.callback({values:{...o},...i,...t,defaultValues:s})}}).unsubscribe,N=(e,t={})=>{for(const a of e?Gh(e):l.mount)l.mount.delete(a),l.array.delete(a),t.keepValue||(Qh(r,a),Qh(o,a)),!t.keepError&&Qh(i.errors,a),!t.keepDirty&&Qh(i.dirtyFields,a),!t.keepTouched&&Qh(i.touchedFields,a),!t.keepIsValidating&&Qh(i.validatingFields,a),!n.shouldUnregister&&!t.keepDefaultValue&&Qh(s,a);f.state.next({values:sh(o)}),f.state.next({...i,...t.keepDirty?{isDirty:w()}:{}}),!t.keepIsValid&&m()},z=({disabled:e,name:t})=>{if(hh(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=ch(r,e);const o=hh(t.disabled)||hh(n.disabled);return fh(r,e,{...i||{},_f:{...i&&i._f?i._f:{ref:{name:e}},name:e,mount:!0,...t}}),l.mount.add(e),i?z({disabled:hh(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:cd(t.min),max:cd(t.max),minLength:cd(t.minLength),maxLength:cd(t.maxLength),pattern:cd(t.pattern)}:{},name:e,onChange:k,onBlur:k,ref:o=>{if(o){D(e,t),i=ch(r,e);const n=ah(o.value)&&o.querySelectorAll&&o.querySelectorAll("input,select,textarea")[0]||o,a=(e=>Yh(e)||Xc(e))(n),l=i._f.refs||[];if(a?l.find(e=>e===n):n===i._f.ref)return;fh(r,e,{_f:{...i._f,...a?{refs:[...l.filter(Xh),n,...Array.isArray(ch(s,e))?[{}]:[]],ref:{type:n.type,name:e}}:{ref:n}}}),g(e,!1,void 0,n)}else i=ch(r,e,{}),i._f&&(i._f.mount=!1),(n.shouldUnregister||t.shouldUnregister)&&(!ih(l.array,e)||!a.action)&&l.unMount.add(e)}}},I=()=>n.shouldFocusError&&md(r,O,l.mount),F=(e,t)=>async s=>{let a;s&&(s.preventDefault&&s.preventDefault(),s.persist&&s.persist());let u=sh(o);if(f.state.next({isSubmitting:!0}),n.resolver){const{errors:e,values:t}=await b();_(),i.errors=e,u=sh(t)}else await x(r);if(l.disabled.size)for(const e of l.disabled)Qh(u,e);if(Qh(i.errors,"root"),qh(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:qh(i.errors)&&!a,submitCount:i.submitCount+1,errors:i.errors}),a)throw a},j=(e,t={})=>{const u=e?sh(e):s,c=sh(u),d=qh(e),p=d?s:c;if(t.keepDefaultValues||(s=u),!t.keepValues){if(t.keepDirtyValues){const e=new Set([...l.mount,...Object.keys(td(s,o))]);for(const t of Array.from(e)){const e=ch(i.dirtyFields,t),n=ch(o,t),r=ch(p,t);e&&!ah(n)?fh(p,t,n):e||ah(r)||S(t,r)}}else{if(rh&&ah(e))for(const e of l.mount){const t=ch(r,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(Hh(e)){const t=e.closest("form");if(t){t.reset();break}}}}if(t.keepFieldsRef)for(const e of l.mount)S(e,ch(p,e));else r={}}o=n.shouldUnregister?t.keepDefaultValues?sh(s):{}:sh(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&&!qh(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||Dh(e,s))),isSubmitted:!!t.keepIsSubmitted&&i.isSubmitted,dirtyFields:d?{}:t.keepDirtyValues?t.keepDefaultValues&&o?td(s,o):i.dirtyFields:t.keepDefaultValues&&e?td(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(dh(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(ch(r,e))){const t=l(ch(r,e),u.argA,u.argB);c&&fh(r,e,t)}if(p&&Array.isArray(ch(i.errors,e))){const t=l(ch(i.errors,e),u.argA,u.argB);c&&fh(i.errors,e,t),((e,t)=>{!lh(ch(e,t)).length&&Qh(e,t)})(i.errors,e)}if((h.touchedFields||d.touchedFields)&&p&&Array.isArray(ch(i.touchedFields,e))){const t=l(ch(i.touchedFields,e),u.argA,u.argB);c&&fh(i.touchedFields,e,t)}(h.dirtyFields||d.dirtyFields)&&(i.dirtyFields=td(s,o)),f.state.next({name:e,isDirty:w(e,t),dirtyFields:i.dirtyFields,errors:i.errors,isValid:i.isValid})}else fh(o,e,t)},_setDisabledField:z,_setErrors:e=>{i.errors=e,f.state.next({errors:i.errors,isValid:!1})},_getFieldArray:e=>lh(ch(a.mount?o:s,e,n.shouldUnregister?ch(s,e,[]):[])),_reset:j,_resetDefaultValues:()=>dh(n.defaultValues)&&n.defaultValues().then(e=>{B(e,n.resetOptions),f.state.next({isLoading:!1})}),_removeUnmounted:()=>{for(const e of l.unMount){const t=ch(r,e);t&&(t._f.refs?t._f.refs.every(e=>!Xh(e)):!Xh(t._f.ref))&&N(e)}l.unMount=new Set},_disableForm:e=>{hh(e)&&(f.state.next({disabled:e}),md(r,(t,n)=>{const i=ch(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)=>dh(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={})=>{ch(r,e)&&(ah(t.defaultValue)?S(e,sh(ch(s,e))):(S(e,t.defaultValue),fh(s,e,sh(t.defaultValue))),t.keepTouched||Qh(i.touchedFields,e),t.keepDirty||(Qh(i.dirtyFields,e),i.isDirty=t.defaultValue?w(e,sh(ch(s,e))):w()),t.keepError||(Qh(i.errors,e),h.isValid&&m()),f.state.next({...i}))},clearErrors:e=>{e&&Gh(e).forEach(e=>Qh(i.errors,e)),f.state.next({errors:e?i.errors:{}})},unregister:N,setError:M,setFocus:(e,t={})=>{const n=ch(r,e),i=n&&n._f;if(i){const e=i.refs?i.refs[0]:i.ref;e.focus&&setTimeout(()=>{e.focus(),t.shouldSelect&&dh(e.select)&&e.select()})}},getFieldState:R};return{...V,formControl:V}}const Ed=({sx:e,...t})=>w(he,{variant:"body1",sx:{color:"var(--color-white)",cursor:"default",...e},...t}),Ad=ee(ue)({padding:0,marginRight:"5px",marginLeft:"10px","& .MuiSvgIcon-root":{color:"var(--color-orange-medium)"}});function Td({label:t,name:n,...i}){const r=e.useId(),{control:s,setValue:o,watch:a}=Bh(),l=a(n),u=`${r}-${n}-${String(l)}`;return w(Fh,{control:s,name:n,render:({field:e})=>{const{value:n,name:r}=e;return t?w(ce,{color:"white",control:w(Ad,{...i,checked:n,onChange:(e,t)=>{o(r,t,{shouldValidate:!0})}}),label:w(Ed,{children:t})}):w(Ad,{...i,checked:n,onChange:(e,t)=>{o(r,t,{shouldValidate:!0})}})}},u)}var Sd=function(t){var n=t.as,i=t.errors,r=t.name,s=t.message,o=t.render,a=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}(t,["as","errors","name","message","render"]),l=Bh(),u=ch(i||l.formState.errors,r);if(!u)return null;var c=u.message,h=u.types,d=Object.assign({},a,{children:c||s});return e.isValidElement(n)?e.cloneElement(n,d):o?o({message:c||s,messages:h}):e.createElement(n||e.Fragment,d)};function kd({name:e}){const{palette:t}=Z(),{formState:{errors:n}}=Bh();return w(Sd,{errors:n,name:e,render:({message:e})=>w(Ed,{variant:"body2",style:{color:t.error.main},children:e})})}function Od({form:e,sx:t={},onSubmit:n,children:i}){const{handleSubmit:r}=e;return w(Uh,{...e,children:w(P,{component:"form",sx:{display:"grid",gap:"15px",...t},onSubmit:r(n),children:i})})}const Pd=()=>Bh(),Cd=e=>w(q,{size:"small",...e});function Rd({name:t,...n}){const{control:i}=Bh(),r=e.useId();return w(Fh,{control:i,name:t,render:({field:e})=>E(P,{sx:({spacing:e})=>({display:"grid",width:"100%",gap:e(1)}),children:[w(de,{...n,...e,id:r,slots:{field:Cd}}),w(kd,{name:t})]})})}const Md=({text:e="Нет данных"})=>w(O,{variant:"body2",sx:{textAlign:"center",color:"var(--gray-light-color)"},children:e});function Ld({items:t,columnsCount:n=1,getContent:i,title:r,getKey:s,onClick:o,sx:a,isShowNoData:l=!0}){const u=0===t.length;return E(P,{sx:{display:"grid",gridTemplateColumns:"1fr",gap:"15px",...a?.root},children:[r?w(O,{variant:"h6",noWrap:!0,sx:{textAlign:"center",fontWeight:700,...a?.title},children:r}):null,u?w(e.Fragment,{children:l?w(Md,{}):null}):w(W,{sx:{display:"grid",gridTemplateColumns:`repeat(${n}, 1fr)`,gap:"15px",...a?.list},disablePadding:!0,children:t.map((e,t)=>w(H,{onClick:()=>o?.(e,t),sx:{...a?.item},disablePadding:!0,children:i(e,t)},s(e,t)))})]})}const Nd="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 Dd(e){return"nodeType"in e}function Id(e){var t,n;return e?zd(e)?e:Dd(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function Fd(e){const{Document:t}=Id(e);return e instanceof t}function jd(e){return!zd(e)&&e instanceof Id(e).HTMLElement}function Bd(e){return e instanceof Id(e).SVGElement}function Ud(e){return e?zd(e)?e.document:Dd(e)?Fd(e)?e:jd(e)||Bd(e)?e.ownerDocument:document:document:document}const Vd=Nd?u:s;function Gd(e){const t=i(e);return Vd(()=>{t.current=e}),r(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 $d(e,t){void 0===t&&(t=[e]);const n=i(e);return Vd(()=>{n.current!==e&&(n.current=e)},t),n}function Zd(e,t){const n=i();return l(()=>{const t=e(n.current);return n.current=t,t},[...t])}function qd(e){const t=Gd(e),n=i(null),s=r(e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e},[]);return[n,s]}function Wd(e){const t=i();return s(()=>{t.current=e},[e]),t.current}let Hd={};function Kd(e,t){return l(()=>{if(t)return t;const n=null==Hd[e]?0:Hd[e]+1;return Hd[e]=n,e+"-"+n},[e,t])}function Yd(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 Xd=Yd(1),Qd=Yd(-1);function Jd(e){if(!e)return!1;const{KeyboardEvent:t}=Id(e.target);return t&&e instanceof t}function ef(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=Id(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 tf=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[tf.Translate.toString(e),tf.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:i}=e;return t+" "+n+"ms "+i}}}),nf="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function rf(e){return e.matches(nf)?e:e.querySelector(nf)}const sf={display:"none"};function of(e){let{id:n,value:i}=e;return t.createElement("div",{id:n,style:sf},i)}function af(e){let{id:n,announcement:i,ariaLiveType:r="assertive"}=e;return t.createElement("div",{id:n,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":r,"aria-atomic":!0},i)}const lf=m(null);const uf={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 "},cf={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 hf(e){let{announcements:n=cf,container:i,hiddenTextDescribedById:o,screenReaderInstructions:a=uf}=e;const{announce:u,announcement:c}=function(){const[e,t]=p("");return{announce:r(e=>{null!=e&&t(e)},[]),announcement:e}}(),d=Kd("DndLiveRegion"),[f,m]=p(!1);if(s(()=>{m(!0)},[]),function(e){const t=h(lf);s(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}(l(()=>({onDragStart(e){let{active:t}=e;u(n.onDragStart({active:t}))},onDragMove(e){let{active:t,over:i}=e;n.onDragMove&&u(n.onDragMove({active:t,over:i}))},onDragOver(e){let{active:t,over:i}=e;u(n.onDragOver({active:t,over:i}))},onDragEnd(e){let{active:t,over:i}=e;u(n.onDragEnd({active:t,over:i}))},onDragCancel(e){let{active:t,over:i}=e;u(n.onDragCancel({active:t,over:i}))}}),[u,n])),!f)return null;const _=t.createElement(t.Fragment,null,t.createElement(of,{id:o,value:a.draggable}),t.createElement(af,{id:d,announcement:c}));return i?b(_,i):_}var df;function ff(){}!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"}(df||(df={}));const pf=Object.freeze({x:0,y:0});function mf(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function _f(e,t){let{data:{value:n}}=e,{data:{value:i}}=t;return n-i}function gf(e,t){let{data:{value:n}}=e,{data:{value:i}}=t;return i-n}function yf(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 vf=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:i}=e;const r=yf(t,t.left,t.top),s=[];for(const e of i){const{id:t}=e,i=n.get(t);if(i){const n=mf(yf(i),r);s.push({id:t,data:{droppableContainer:e,value:n}})}}return s.sort(_f)};function bf(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 xf=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=bf(s,t);n>0&&r.push({id:i,data:{droppableContainer:e,value:n}})}}return r.sort(gf)};function wf(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:pf}function Ef(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 Af=Ef(1);const Tf={ignoreTransform:!1};function Sf(e,t){void 0===t&&(t=Tf);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:i}=Id(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 kf(e){return Sf(e,{ignoreTransform:!0})}function Of(e,t){const n=[];return e?function i(r){if(null!=t&&n.length>=t)return n;if(!r)return n;if(Fd(r)&&null!=r.scrollingElement&&!n.includes(r.scrollingElement))return n.push(r.scrollingElement),n;if(!jd(r)||Bd(r))return n;if(n.includes(r))return n;const s=Id(e).getComputedStyle(r);return r!==e&&function(e,t){void 0===t&&(t=Id(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=Id(e).getComputedStyle(e)),"fixed"===t.position}(r,s)?n:i(r.parentNode)}(e):n}function Pf(e){const[t]=Of(e,1);return null!=t?t:null}function Cf(e){return Nd&&e?zd(e)?e:Dd(e)?Fd(e)||e===Ud(e).scrollingElement?window:jd(e)?e:null:null:null}function Rf(e){return zd(e)?e.scrollX:e.scrollLeft}function Mf(e){return zd(e)?e.scrollY:e.scrollTop}function Lf(e){return{x:Rf(e),y:Mf(e)}}var Nf;function zf(e){return!(!Nd||!e)&&e===document.scrollingElement}function Df(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"}(Nf||(Nf={}));const If={x:.2,y:.2};function Ff(e,t,n,i,r){let{top:s,left:o,right:a,bottom:l}=n;void 0===i&&(i=10),void 0===r&&(r=If);const{isTop:u,isBottom:c,isLeft:h,isRight:d}=Df(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=Nf.Backward,p.y=i*Math.abs((t.top+m-s)/m)):!c&&l>=t.bottom-m&&(f.y=Nf.Forward,p.y=i*Math.abs((t.bottom-m-l)/m)),!d&&a>=t.right-_?(f.x=Nf.Forward,p.x=i*Math.abs((t.right-_-a)/_)):!h&&o<=t.left+_&&(f.x=Nf.Backward,p.x=i*Math.abs((t.left+_-o)/_)),{direction:f,speed:p}}function jf(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 Bf(e){return e.reduce((e,t)=>Xd(e,Lf(t)),pf)}const Uf=[["x",["left","right"],function(e){return e.reduce((e,t)=>e+Rf(t),0)}],["y",["top","bottom"],function(e){return e.reduce((e,t)=>e+Mf(t),0)}]];class Vf{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=Of(t),i=Bf(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,r]of Uf)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 Gf{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 $f(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 Zf,qf;function Wf(e){e.preventDefault()}function Hf(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"}(Zf||(Zf={})),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"}(qf||(qf={}));const Kf={start:[qf.Space,qf.Enter],cancel:[qf.Esc],end:[qf.Space,qf.Enter,qf.Tab]},Yf=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case qf.Right:return{...n,x:n.x+25};case qf.Left:return{...n,x:n.x-25};case qf.Down:return{...n,y:n.y+25};case qf.Up:return{...n,y:n.y-25}}};class Xf{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 Gf(Ud(t)),this.windowListeners=new Gf(Id(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Zf.Resize,this.handleCancel),this.windowListeners.add(Zf.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Zf.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&function(e,t){if(void 0===t&&(t=Sf),!e)return;const{top:n,left:i,bottom:r,right:s}=t(e);Pf(e)&&(r<=0||s<=0||n>=window.innerHeight||i>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(n),t(pf)}handleKeyDown(e){if(Jd(e)){const{active:t,context:n,options:i}=this.props,{keyboardCodes:r=Kf,coordinateGetter:s=Yf,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}:pf;this.referenceCoordinates||(this.referenceCoordinates=u);const c=s(e,{active:t,context:n.current,currentCoordinates:u});if(c){const t=Qd(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}=Df(n),f=jf(n),p={x:Math.min(r===qf.Right?f.right-f.width/2:f.right,Math.max(r===qf.Right?f.left:f.left+f.width/2,c.x)),y:Math.min(r===qf.Down?f.bottom-f.height/2:f.bottom,Math.max(r===qf.Down?f.top:f.top+f.height/2,c.y))},m=r===qf.Right&&!a||r===qf.Left&&!l,_=r===qf.Down&&!u||r===qf.Up&&!s;if(m&&p.x!==c.x){const e=n.scrollLeft+t.x,s=r===qf.Right&&e<=h.x||r===qf.Left&&e>=d.x;if(s&&!t.y)return void n.scrollTo({left:e,behavior:o});i.x=s?n.scrollLeft-e:r===qf.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===qf.Down&&e<=h.y||r===qf.Up&&e>=d.y;if(s&&!t.x)return void n.scrollTo({top:e,behavior:o});i.y=s?n.scrollTop-e:r===qf.Down?n.scrollTop-h.y:n.scrollTop-d.y,i.y&&n.scrollBy({top:-i.y,behavior:o});break}}this.handleMove(e,Xd(Qd(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 Qf(e){return Boolean(e&&"distance"in e)}function Jf(e){return Boolean(e&&"delay"in e)}Xf.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:i=Kf,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 ep{constructor(e,t,n){var i;void 0===n&&(n=function(e){const{EventTarget:t}=Id(e);return e instanceof t?e:Ud(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=Ud(s),this.documentListeners=new Gf(this.document),this.listeners=new Gf(n),this.windowListeners=new Gf(Id(s)),this.initialCoordinates=null!=(i=ef(r))?i:pf,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(Zf.Resize,this.handleCancel),this.windowListeners.add(Zf.DragStart,Wf),this.windowListeners.add(Zf.VisibilityChange,this.handleCancel),this.windowListeners.add(Zf.ContextMenu,Wf),this.documentListeners.add(Zf.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Jf(t))return this.timeoutId=setTimeout(this.handleStart,t.delay),void this.handlePending(t);if(Qf(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(Zf.Click,Hf,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Zf.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=ef(e))?t:pf,l=Qd(i,a);if(!n&&o){if(Qf(o)){if(null!=o.tolerance&&$f(l,o.tolerance))return this.handleCancel();if($f(l,o.distance))return this.handleStart()}return Jf(o)&&$f(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===qf.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const tp={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class np extends ep{constructor(e){const{event:t}=e,n=Ud(t.target);super(e,tp,n)}}np.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 ip={move:{name:"mousemove"},end:{name:"mouseup"}};var rp;!function(e){e[e.RightClick=2]="RightClick"}(rp||(rp={}));(class extends ep{constructor(e){super(e,ip,Ud(e.event.target))}}).activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;return n.button!==rp.RightClick&&(null==i||i({event:n}),!0)}}];const sp={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};var op,ap;function lp(e){let{acceleration:t,activator:n=op.Pointer,canScroll:o,draggingRect:a,enabled:u,interval:c=5,order:h=ap.TreeOrder,pointerCoordinates:d,scrollableAncestors:f,scrollableAncestorRects:p,delta:m,threshold:_}=e;const g=function(e){let{delta:t,disabled:n}=e;const i=Wd(t);return Zd(e=>{if(n||!i||!e)return up;const r={x:Math.sign(t.x-i.x),y:Math.sign(t.y-i.y)};return{x:{[Nf.Backward]:e.x[Nf.Backward]||-1===r.x,[Nf.Forward]:e.x[Nf.Forward]||1===r.x},y:{[Nf.Backward]:e.y[Nf.Backward]||-1===r.y,[Nf.Forward]:e.y[Nf.Forward]||1===r.y}}},[n,t,i])}({delta:m,disabled:!u}),[y,v]=function(){const e=i(null);return[r((t,n)=>{e.current=setInterval(t,n)},[]),r(()=>{null!==e.current&&(clearInterval(e.current),e.current=null)},[])]}(),b=i({x:0,y:0}),x=i({x:0,y:0}),w=l(()=>{switch(n){case op.Pointer:return d?{top:d.y,bottom:d.y,left:d.x,right:d.x}:null;case op.DraggableRect:return a}},[n,a,d]),E=i(null),A=r(()=>{const e=E.current;if(!e)return;const t=b.current.x*x.current.x,n=b.current.y*x.current.y;e.scrollBy(t,n)},[]),T=l(()=>h===ap.TreeOrder?[...f].reverse():f,[h,f]);s(()=>{if(u&&f.length&&w){for(const e of T){if(!1===(null==o?void 0:o(e)))continue;const n=f.indexOf(e),i=p[n];if(!i)continue;const{direction:r,speed:s}=Ff(e,i,w,t,_);for(const e of["x","y"])g[e][r[e]]||(s[e]=0,r[e]=0);if(s.x>0||s.y>0)return v(),E.current=e,y(A,c),b.current=s,void(x.current=r)}b.current={x:0,y:0},x.current={x:0,y:0},v()}else v()},[t,A,o,v,u,c,JSON.stringify(w),JSON.stringify(g),y,f,T,p,JSON.stringify(_)])}(class extends ep{constructor(e){super(e,sp)}static setup(){return window.addEventListener(sp.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(sp.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"}(op||(op={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(ap||(ap={}));const up={x:{[Nf.Backward]:!1,[Nf.Forward]:!1},y:{[Nf.Backward]:!1,[Nf.Forward]:!1}};var cp,hp;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(cp||(cp={})),function(e){e.Optimized="optimized"}(hp||(hp={}));const dp=new Map;function fp(e,t){return Zd(n=>e?n||("function"==typeof t?t(e):e):null,[t,e])}function pp(e){let{callback:t,disabled:n}=e;const i=Gd(t),r=l(()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(i)},[n]);return s(()=>()=>null==r?void 0:r.disconnect(),[r]),r}function mp(e){return new Vf(Sf(e),e)}function _p(e,t,n){void 0===t&&(t=mp);const[i,r]=p(null);function o(){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 a=function(e){let{callback:t,disabled:n}=e;const i=Gd(t),r=l(()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(i)},[i,n]);return s(()=>()=>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)){o();break}}}}),u=pp({callback:o});return Vd(()=>{o(),e?(null==u||u.observe(e),null==a||a.observe(document.body,{childList:!0,subtree:!0})):(null==u||u.disconnect(),null==a||a.disconnect())},[e]),i}const gp=[];function yp(e,t){void 0===t&&(t=[]);const n=i(null);return s(()=>{n.current=null},t),s(()=>{const t=e!==pf;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?Qd(e,n.current):pf}function vp(e){return l(()=>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 bp=[];function xp(e){let{measure:t}=e;const[n,i]=p(null),s=r(e=>{for(const{target:n}of e)if(jd(n)){i(e=>{const i=t(n);return e?{...e,width:i.width,height:i.height}:i});break}},[t]),o=pp({callback:s}),a=r(e=>{const n=function(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return jd(t)?t:e}(e);null==o||o.disconnect(),n&&(null==o||o.observe(n)),i(n?t(n):null)},[t,o]),[u,c]=qd(a);return l(()=>({nodeRef:u,rect:n,setRef:c}),[n,u,c])}const wp=[{sensor:np,options:{}},{sensor:Xf,options:{}}],Ep={current:{}},Ap={draggable:{measure:kf},droppable:{measure:kf,strategy:cp.WhileDragging,frequency:hp.Optimized},dragOverlay:{measure:Sf}};class Tp 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 Sp={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Tp,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:ff},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Ap,measureDroppableContainers:ff,windowRect:null,measuringScheduled:!1},kp=m({activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:ff,draggableNodes:new Map,over:null,measureDroppableContainers:ff}),Op=m(Sp);function Pp(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Tp}}}function Cp(e,t){switch(t.type){case df.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case df.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 df.DragEnd:case df.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case df.RegisterDroppable:{const{element:n}=t,{id:i}=n,r=new Tp(e.droppable.containers);return r.set(i,n),{...e,droppable:{...e.droppable,containers:r}}}case df.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 Tp(e.droppable.containers);return o.set(n,{...s,disabled:r}),{...e,droppable:{...e.droppable,containers:o}}}case df.UnregisterDroppable:{const{id:n,key:i}=t,r=e.droppable.containers.get(n);if(!r||i!==r.key)return e;const s=new Tp(e.droppable.containers);return s.delete(n),{...e,droppable:{...e.droppable,containers:s}}}default:return e}}function Rp(e){let{disabled:t}=e;const{active:n,activatorEvent:i,draggableNodes:r}=h(kp),o=Wd(i),a=Wd(null==n?void 0:n.id);return s(()=>{if(!t&&!i&&o&&null!=a){if(!Jd(o))return;if(document.activeElement===o.target)return;const e=r.get(a);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=rf(e);if(t){t.focus();break}}})}},[i,t,r,a,o]),null}const Mp=m({...pf,scaleX:1,scaleY:1});var Lp;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(Lp||(Lp={}));const Np=f(function(e){var n,o,a,u;let{id:c,accessibility:h,autoScroll:d=!0,children:f,sensors:m=wp,collisionDetection:g=xf,measuring:y,modifiers:v,...b}=e;const w=_(Cp,void 0,Pp),[E,A]=w,[T,S]=function(){const[e]=p(()=>new Set),t=r(t=>(e.add(t),()=>e.delete(t)),[e]);return[r(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]}(),[k,O]=p(Lp.Uninitialized),P=k===Lp.Initialized,{draggable:{active:C,nodes:R,translate:M},droppable:{containers:L}}=E,N=null!=C?R.get(C):null,z=i({initial:null,translated:null}),D=l(()=>{var e;return null!=C?{id:C,data:null!=(e=null==N?void 0:N.data)?e:Ep,rect:z}:null},[C,N]),I=i(null),[F,j]=p(null),[B,U]=p(null),V=$d(b,Object.values(b)),G=Kd("DndDescribedBy",c),$=l(()=>L.getEnabled(),[L]),Z=l(()=>({draggable:{...Ap.draggable,...null==q?void 0:q.draggable},droppable:{...Ap.droppable,...null==q?void 0:q.droppable},dragOverlay:{...Ap.dragOverlay,...null==q?void 0:q.dragOverlay}}),[null==(q=y)?void 0:q.draggable,null==q?void 0:q.droppable,null==q?void 0:q.dragOverlay]);var q;const{droppableRects:W,measureDroppableContainers:H,measuringScheduled:K}=function(e,t){let{dragging:n,dependencies:o,config:a}=t;const[l,u]=p(null),{frequency:c,measure:h,strategy:d}=a,f=i(e),m=function(){switch(d){case cp.Always:return!1;case cp.BeforeDragging:return n;default:return!n}}(),_=$d(m),g=r(function(e){void 0===e&&(e=[]),_.current||u(t=>null===t?e:t.concat(e.filter(e=>!t.includes(e))))},[_]),y=i(null),v=Zd(t=>{if(m&&!n)return dp;if(!t||t===dp||f.current!==e||null!=l){const t=new Map;for(let n of e){if(!n)continue;if(l&&l.length>0&&!l.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,i=e?new Vf(h(e),e):null;n.rect.current=i,i&&t.set(n.id,i)}return t}return t},[e,l,n,m,h]);return s(()=>{f.current=e},[e]),s(()=>{m||g()},[n,m]),s(()=>{l&&l.length>0&&u(null)},[JSON.stringify(l)]),s(()=>{m||"number"!=typeof c||null!==y.current||(y.current=setTimeout(()=>{g(),y.current=null},c))},[c,m,g,...o]),{droppableRects:v,measureDroppableContainers:g,measuringScheduled:null!=l}}($,{dragging:P,dependencies:[M.x,M.y],config:Z.droppable}),Y=function(e,t){const n=null!=t?e.get(t):void 0,i=n?n.node.current:null;return Zd(e=>{var n;return null==t?null:null!=(n=null!=i?i:e)?n:null},[i,t])}(R,C),X=l(()=>B?ef(B):null,[B]),Q=function(){const e=!1===(null==F?void 0:F.autoScrollEnabled),t="object"==typeof d?!1===d.enabled:!1===d,n=P&&!e&&!t;if("object"==typeof d)return{...d,enabled:n};return{enabled:n}}(),J=function(e,t){return fp(e,t)}(Y,Z.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:r,config:s=!0}=e;const o=i(!1),{x:a,y:l}="boolean"==typeof s?{x:s,y:s}:s;Vd(()=>{if(!a&&!l||!t)return void(o.current=!1);if(o.current||!r)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const i=wf(n(e),r);if(a||(i.x=0),l||(i.y=0),o.current=!0,Math.abs(i.x)>0||Math.abs(i.y)>0){const t=Pf(e);t&&t.scrollBy({top:i.y,left:i.x})}},[t,a,l,r,n])}({activeNode:null!=C?R.get(C):null,config:Q.layoutShiftCompensation,initialRect:J,measure:Z.draggable.measure});const ee=_p(Y,Z.draggable.measure,J),te=_p(Y?Y.parentElement:null),ne=i({activatorEvent:null,active:null,activeNode:Y,collisionRect:null,collisions:null,droppableRects:W,draggableNodes:R,draggingNode:null,draggingNodeRect:null,droppableContainers:L,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ie=L.getNodeFor(null==(n=ne.current.over)?void 0:n.id),re=xp({measure:Z.dragOverlay.measure}),se=null!=(o=re.nodeRef.current)?o:Y,oe=P?null!=(a=re.rect)?a:ee:null,ae=Boolean(re.nodeRef.current&&re.rect),le=wf(ue=ae?null:ee,fp(ue));var ue;const ce=vp(se?Id(se):null),he=function(e){const t=i(e),n=Zd(n=>e?n&&n!==gp&&e&&t.current&&e.parentNode===t.current.parentNode?n:Of(e):gp,[e]);return s(()=>{t.current=e},[e]),n}(P?null!=ie?ie:Y:null),de=function(e,t){void 0===t&&(t=Sf);const[n]=e,i=vp(n?Id(n):null),[r,s]=p(bp);function o(){s(()=>e.length?e.map(e=>zf(e)?i:new Vf(t(e),e)):bp)}const a=pp({callback:o});return Vd(()=>{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}(v,{transform:{x:M.x-le.x,y:M.y-le.y,scaleX:1,scaleY:1},activatorEvent:B,active:D,activeNodeRect:ee,containerNodeRect:te,draggingNodeRect:oe,over:ne.current.over,overlayNodeRect:re.rect,scrollableAncestors:he,scrollableAncestorRects:de,windowRect:ce}),pe=X?Xd(X,M):null,me=function(e){const[t,n]=p(null),o=i(e),a=r(e=>{const t=Cf(e.target);t&&n(e=>e?(e.set(t,Lf(t)),new Map(e)):null)},[]);return s(()=>{const t=o.current;if(e!==t){i(t);const r=e.map(e=>{const t=Cf(e);return t?(t.addEventListener("scroll",a,{passive:!0}),[t,Lf(t)]):null}).filter(e=>null!=e);n(r.length?new Map(r):null),o.current=e}return()=>{i(e),i(t)};function i(e){e.forEach(e=>{const t=Cf(e);null==t||t.removeEventListener("scroll",a)})}},[a,e]),l(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>Xd(e,t),pf):Bf(e):pf,[e,t])}(he),_e=yp(me),ge=yp(me,[ee]),ye=Xd(fe,_e),ve=oe?Af(oe,fe):null,be=D&&ve?g({active:D,collisionRect:ve,droppableRects:W,droppableContainers:$,pointerCoordinates:pe}):null,xe=function(e,t){if(!e||0===e.length)return null;const[n]=e;return n[t]}(be,"id"),[we,Ee]=p(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:Xd(fe,ge),null!=(u=null==we?void 0:we.rect)?u:null,ee),Te=i(null),Se=r((e,t)=>{let{sensor:n,options:i}=t;if(null==I.current)return;const r=R.get(I.current);if(!r)return;const s=e.nativeEvent,o=new n({active:I.current,activeNode:r,event:s,options:i,context:ne,onAbort(e){if(!R.get(e))return;const{onDragAbort:t}=V.current,n={id:e};null==t||t(n),T({type:"onDragAbort",event:n})},onPending(e,t,n,i){if(!R.get(e))return;const{onDragPending:r}=V.current,s={id:e,constraint:t,initialCoordinates:n,offset:i};null==r||r(s),T({type:"onDragPending",event:s})},onStart(e){const t=I.current;if(null==t)return;const n=R.get(t);if(!n)return;const{onDragStart:i}=V.current,r={activatorEvent:s,active:{id:t,data:n.data,rect:z}};x(()=>{null==i||i(r),O(Lp.Initializing),A({type:df.DragStart,initialCoordinates:e,active:t}),T({type:"onDragStart",event:r}),j(Te.current),U(s)})},onMove(e){A({type:df.DragMove,coordinates:e})},onEnd:a(df.DragEnd),onCancel:a(df.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}=V.current;if(o={activatorEvent:s,active:t,collisions:n,delta:r,over:i},e===df.DragEnd&&"function"==typeof a){await Promise.resolve(a(o))&&(e=df.DragCancel)}}I.current=null,x(()=>{A({type:e}),O(Lp.Uninitialized),Ee(null),j(null),U(null),Te.current=null;const t=e===df.DragEnd?"onDragEnd":"onDragCancel";if(o){const e=V.current[t];null==e||e(o),T({type:t,event:o})}})}}Te.current=o},[R]),ke=r((e,t)=>(n,i)=>{const r=n.nativeEvent,s=R.get(i);if(null!==I.current||!s||r.dndKit||r.defaultPrevented)return;const o={active:s};!0===e(n,t.options,o)&&(r.dndKit={capturedBy:t.sensor},I.current=i,Se(n,t))},[R,Se]),Oe=function(e,t){return l(()=>e.reduce((e,n)=>{const{sensor:i}=n;return[...e,...i.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}))]},[]),[e,t])}(m,ke);!function(e){s(()=>{if(!Nd)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}))}(m),Vd(()=>{ee&&k===Lp.Initializing&&O(Lp.Initialized)},[ee,k]),s(()=>{const{onDragMove:e}=V.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};x(()=>{null==e||e(s),T({type:"onDragMove",event:s})})},[ye.x,ye.y]),s(()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:i,scrollAdjustedTranslate:r}=ne.current;if(!e||null==I.current||!t||!r)return;const{onDragOver:s}=V.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};x(()=>{Ee(a),null==s||s(l),T({type:"onDragOver",event:l})})},[xe]),Vd(()=>{ne.current={activatorEvent:B,active:D,activeNode:Y,collisionRect:ve,collisions:be,droppableRects:W,draggableNodes:R,draggingNode:se,draggingNodeRect:oe,droppableContainers:L,over:we,scrollableAncestors:he,scrollAdjustedTranslate:ye},z.current={initial:oe,translated:ve}},[D,Y,be,ve,R,se,oe,W,L,we,he,ye]),lp({...Q,delta:M,draggingRect:ve,pointerCoordinates:pe,scrollableAncestors:he,scrollableAncestorRects:de});const Pe=l(()=>({active:D,activeNode:Y,activeNodeRect:ee,activatorEvent:B,collisions:be,containerNodeRect:te,dragOverlay:re,draggableNodes:R,droppableContainers:L,droppableRects:W,over:we,measureDroppableContainers:H,scrollableAncestors:he,scrollableAncestorRects:de,measuringConfiguration:Z,measuringScheduled:K,windowRect:ce}),[D,Y,ee,B,be,te,re,R,L,W,we,H,he,de,Z,K,ce]),Ce=l(()=>({activatorEvent:B,activators:Oe,active:D,activeNodeRect:ee,ariaDescribedById:{draggable:G},dispatch:A,draggableNodes:R,over:we,measureDroppableContainers:H}),[B,Oe,D,ee,A,G,R,we,H]);return t.createElement(lf.Provider,{value:S},t.createElement(kp.Provider,{value:Ce},t.createElement(Op.Provider,{value:Pe},t.createElement(Mp.Provider,{value:Ae},f)),t.createElement(Rp,{disabled:!1===(null==h?void 0:h.restoreFocus)})),t.createElement(hf,{...h,hiddenTextDescribedById:G}))}),zp=m(null),Dp="button";function Ip(e){let{id:t,data:n,disabled:i=!1,attributes:r}=e;const s=Kd("Draggable"),{activators:o,activatorEvent:a,active:u,activeNodeRect:c,ariaDescribedById:d,draggableNodes:f,over:p}=h(kp),{role:m=Dp,roleDescription:_="draggable",tabIndex:g=0}=null!=r?r:{},y=(null==u?void 0:u.id)===t,v=h(y?Mp:zp),[b,x]=qd(),[w,E]=qd(),A=function(e,t){return l(()=>e.reduce((e,n)=>{let{eventName:i,handler:r}=n;return e[i]=e=>{r(e,t)},e},{}),[e,t])}(o,t),T=$d(n);Vd(()=>(f.set(t,{id:t,key:s,node:b,activatorNode:w,data:T}),()=>{const e=f.get(t);e&&e.key===s&&f.delete(t)}),[f,t]);return{active:u,activatorEvent:a,activeNodeRect:c,attributes:l(()=>({role:m,tabIndex:g,"aria-disabled":i,"aria-pressed":!(!y||m!==Dp)||void 0,"aria-roledescription":_,"aria-describedby":d.draggable}),[i,m,g,y,_,d.draggable]),isDragging:y,listeners:i?void 0:A,node:b,over:p,setNodeRef:x,setActivatorNodeRef:E,transform:v}}const Fp={timeout:25};function jp(e,t,n){const i=e.slice();return i.splice(n<0?i.length+n:n,0,i.splice(t,1)[0]),i}function Bp(e,t){return e.reduce((e,n,i)=>{const r=t.get(n);return r&&(e[i]=r),e},Array(e.length))}function Up(e){return null!==e&&e>=0}const Vp=e=>{let{rects:t,activeIndex:n,overIndex:i,index:r}=e;const s=jp(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},Gp={scaleX:1,scaleY:1},$p=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,...Gp}: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,...Gp}:r<n&&r>=o?{x:0,y:a.height+l,...Gp}:{x:0,y:0,...Gp}};const Zp="Sortable",qp=t.createContext({activeIndex:-1,containerId:Zp,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Vp,disabled:{draggable:!1,droppable:!1}});function Wp(e){let{children:n,id:r,items:o,strategy:a=Vp,disabled:u=!1}=e;const{active:c,dragOverlay:d,droppableRects:f,over:p,measureDroppableContainers:m}=h(Op),_=Kd(Zp,r),g=Boolean(null!==d.rect),y=l(()=>o.map(e=>"object"==typeof e&&"id"in e?e.id:e),[o]),v=null!=c,b=c?y.indexOf(c.id):-1,x=p?y.indexOf(p.id):-1,w=i(y),E=!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}(y,w.current),A=-1!==x&&-1===b||E,T=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(u);Vd(()=>{E&&v&&m(y)},[E,y,v,m]),s(()=>{w.current=y},[y]);const S=l(()=>({activeIndex:b,containerId:_,disabled:T,disableTransforms:A,items:y,overIndex:x,useDragOverlay:g,sortedRects:Bp(y,f),strategy:a}),[b,_,T.draggable,T.droppable,A,y,x,f,g,a]);return t.createElement(qp.Provider,{value:S},n)}const Hp=e=>{let{id:t,items:n,activeIndex:i,overIndex:r}=e;return jp(n,i,r).indexOf(t)},Kp=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))},Yp={duration:200,easing:"ease"},Xp="transform",Qp=tf.Transition.toString({property:Xp,duration:0,easing:"linear"}),Jp={roleDescription:"sortable"};function em(e){let{animateLayoutChanges:t=Kp,attributes:n,disabled:o,data:a,getNewIndex:u=Hp,id:c,strategy:d,resizeObserverConfig:f,transition:m=Yp}=e;const{items:_,containerId:g,activeIndex:y,disabled:v,disableTransforms:b,sortedRects:x,overIndex:w,useDragOverlay:E,strategy:A}=h(qp),T=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}}(o,v),S=_.indexOf(c),k=l(()=>({sortable:{containerId:g,index:S,items:_},...a}),[g,a,S,_]),O=l(()=>_.slice(_.indexOf(c)),[_,c]),{rect:P,node:C,isOver:R,setNodeRef:M}=function(e){let{data:t,disabled:n=!1,id:o,resizeObserverConfig:a}=e;const l=Kd("Droppable"),{active:u,dispatch:c,over:d,measureDroppableContainers:f}=h(kp),p=i({disabled:n}),m=i(!1),_=i(null),g=i(null),{disabled:y,updateMeasurementsFor:v,timeout:b}={...Fp,...a},x=$d(null!=v?v:o),w=pp({callback:r(()=>{m.current?(null!=g.current&&clearTimeout(g.current),g.current=setTimeout(()=>{f(Array.isArray(x.current)?x.current:[x.current]),g.current=null},b)):m.current=!0},[b]),disabled:y||!u}),E=r((e,t)=>{w&&(t&&(w.unobserve(t),m.current=!1),e&&w.observe(e))},[w]),[A,T]=qd(E),S=$d(t);return s(()=>{w&&A.current&&(w.disconnect(),m.current=!1,w.observe(A.current))},[A,w]),s(()=>(c({type:df.RegisterDroppable,element:{id:o,key:l,disabled:n,node:A,rect:_,data:S}}),()=>c({type:df.UnregisterDroppable,key:l,id:o})),[o]),s(()=>{n!==p.current.disabled&&(c({type:df.SetDroppableDisabled,id:o,key:l,disabled:n}),p.current.disabled=n)},[o,l,n,c]),{active:u,rect:_,isOver:(null==d?void 0:d.id)===o,node:A,over:d,setNodeRef:T}}({id:c,data:k,disabled:T.droppable,resizeObserverConfig:{updateMeasurementsFor:O,...f}}),{active:L,activatorEvent:N,activeNodeRect:z,attributes:D,setNodeRef:I,listeners:F,isDragging:j,over:B,setActivatorNodeRef:U,transform:V}=Ip({id:c,data:k,attributes:{...Jp,...n},disabled:T.draggable}),G=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return l(()=>e=>{t.forEach(t=>t(e))},t)}(M,I),$=Boolean(L),Z=$&&!b&&Up(y)&&Up(w),q=!E&&j,W=q&&Z?V:null,H=Z?null!=W?W:(null!=d?d:A)({rects:x,activeNodeRect:z,activeIndex:y,overIndex:w,index:S}):null,K=Up(y)&&Up(w)?u({id:c,items:_,activeIndex:y,overIndex:w}):S,Y=null==L?void 0:L.id,X=i({activeId:Y,items:_,newIndex:K,containerId:g}),Q=_!==X.current.items,J=t({active:L,containerId:g,isDragging:j,isSorting:$,id:c,index:S,items:_,newIndex:X.current.newIndex,previousItems:X.current.items,previousContainerId:X.current.containerId,transition:m,wasDragging:null!=X.current.activeId}),ee=function(e){let{disabled:t,index:n,node:r,rect:o}=e;const[a,l]=p(null),u=i(n);return Vd(()=>{if(!t&&n!==u.current&&r.current){const e=o.current;if(e){const t=Sf(r.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)&&l(n)}}n!==u.current&&(u.current=n)},[t,n,r,o]),s(()=>{a&&l(null)},[a]),a}({disabled:!J,index:S,node:C,rect:P});return s(()=>{$&&X.current.newIndex!==K&&(X.current.newIndex=K),g!==X.current.containerId&&(X.current.containerId=g),_!==X.current.items&&(X.current.items=_)},[$,K,g,_]),s(()=>{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:L,activeIndex:y,attributes:D,data:k,rect:P,index:S,newIndex:K,items:_,isOver:R,isSorting:$,isDragging:j,listeners:F,node:C,overIndex:w,over:B,setNodeRef:G,setActivatorNodeRef:U,setDroppableNodeRef:M,setDraggableNodeRef:I,transform:null!=ee?ee:H,transition:function(){if(ee||Q&&X.current.newIndex===S)return Qp;if(q&&!Jd(N)||!m)return;if($||J)return tf.Transition.toString({...m,property:Xp});return}()}}qf.Down,qf.Right,qf.Up,qf.Left;const tm=({id:e,sx:t,children:n})=>{const{isDragging:i}=Ip({id:e}),{attributes:r,listeners:s,setNodeRef:o,transform:a,transition:l}=em({id:e,strategy:$p,transition:{duration:300,easing:"cubic-bezier(0.25, 1, 0.5, 1)"}}),u={...t?.default,...i?t?.dragging:{},transform:tf.Translate.toString(a),transition:l,cursor:"pointer"};return w(P,{ref:o,style:u,...s,...r,children:n})};function nm({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 l(()=>[...t].filter(e=>null!=e),[...t])}(l(()=>({sensor:u,options:null!=c?c:{}}),[u=np,c={activationConstraint:{distance:8}}]));var u,c;return w(Np,{sensors:a,collisionDetection:vf,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=jp(e,o,a);i(l)},children:w(Wp,{items:e.map(n),strategy:$p,children:w(Ld,{items:e,sx:r,title:s,getKey:n,getContent:(e,i)=>{const r=n(e);return w(tm,{id:r,sx:o,children:t(e,i)},r)}})})})}var im,rm={exports:{}},sm={},om={exports:{}},am={exports:{}},lm={};var um,cm,hm,dm,fm,pm,mm,_m,gm,ym,vm,bm,xm,wm,Em,Am={};
|
|
10
|
+
*/var El,Al,Tl=(xl||(xl=1,"production"===process.env.NODE_ENV?yl.exports=function(){if(ml)return vl;ml=1;var e=t,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=e.useState,r=e.useEffect,s=e.useLayoutEffect,o=e.useDebugValue;function a(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!n(e,i)}catch(e){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),l=i({inst:{value:n,getSnapshot:t}}),u=l[0].inst,c=l[1];return s(function(){u.value=n,u.getSnapshot=t,a(u)&&c({inst:u})},[e,n,t]),r(function(){return a(u)&&c({inst:u}),e(function(){a(u)&&c({inst:u})})},[e]),o(n),n};return vl.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:l,vl}():yl.exports=(bl||(bl=1,"production"!==process.env.NODE_ENV&&function(){function e(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}}"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var n=t,i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=n.useState,s=n.useEffect,o=n.useLayoutEffect,a=n.useDebugValue,l=!1,u=!1,c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(t,c){l||void 0===n.startTransition||(l=!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(!u){var d=c();i(h,d)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),u=!0)}var f=(d=r({inst:{value:h,getSnapshot:c}}))[0].inst,p=d[1];return o(function(){f.value=h,f.getSnapshot=c,e(f)&&p({inst:f})},[t,h,c]),s(function(){return e(f)&&p({inst:f}),t(function(){e(f)&&p({inst:f})})},[t]),a(h),h};wl.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:c,"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),wl)),yl.exports);function Sl(e){e.reaction=new Kr("observer".concat(e.name),function(){var t;e.stateVersion=Symbol(),null===(t=e.onStoreChange)||void 0===t||t.call(e)})}var kl=!0,Ol="function"==typeof Symbol&&Symbol.for,Pl=null!==(Al=null===(El=Object.getOwnPropertyDescriptor(function(){},"name"))||void 0===El?void 0:El.configurable)&&void 0!==Al&&Al,Cl=Ol?Symbol.for("react.forward_ref"):"function"==typeof n&&n(function(e){return null}).$$typeof,Rl=Ol?Symbol.for("react.memo"):"function"==typeof f&&f(function(e){return null}).$$typeof;function Ml(e,i){if(process.env.NODE_ENV,Rl&&e.$$typeof===Rl)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 r=!1,s=e,o=e.displayName||e.name;if(Cl&&e.$$typeof===Cl&&(r=!0,"function"!=typeof(s=e.render)))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var a,l,u=function(e,n){return function(e,n){void 0===n&&(n="observed");var i=t.useRef(null);if(!i.current){var r={reaction:null,onStoreChange:null,stateVersion:Symbol(),name:n,subscribe:function(e){return gl.unregister(r),r.onStoreChange=e,r.reaction||(Sl(r),r.stateVersion=Symbol()),function(){var e;r.onStoreChange=null,null===(e=r.reaction)||void 0===e||e.dispose(),r.reaction=null}},getSnapshot:function(){return r.stateVersion}};i.current=r}var s,o,a=i.current;if(a.reaction||(Sl(a),gl.register(i,a,a)),t.useDebugValue(a.reaction,pl),Tl.useSyncExternalStore(a.subscribe,a.getSnapshot,a.getSnapshot),a.reaction.track(function(){try{s=e()}catch(e){o=e}}),o)throw o;return s}(function(){return s(e,n)},o)};return u.displayName=e.displayName,Pl&&Object.defineProperty(u,"name",{value:e.name,writable:!0,configurable:!0}),e.contextTypes&&(u.contextTypes=e.contextTypes,"production"!==process.env.NODE_ENV&&kl&&(kl=!1,console.warn("[mobx-react-lite] Support for Legacy Context in function components will be removed in the next major release."))),r&&(u=n(u)),u=f(u),a=e,l=u,Object.keys(a).forEach(function(e){Ll[e]||Object.defineProperty(l,e,Object.getOwnPropertyDescriptor(a,e))}),"production"!==process.env.NODE_ENV&&Object.defineProperty(u,"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`."))}}),u}var Ll={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};process.env.NODE_ENV,function(e){e||(e=fl,"production"!==process.env.NODE_ENV&&console.warn("[MobX] Failed to get unstable_batched updates from react-dom / react-native")),ws({reactionScheduler:e})}(x),gl.finalizeAllImmediately;var Nl=Ml(({onUnauthorized:t,children:n})=>(e.useEffect(()=>{Yo.isUnauthorized&&t()},[Yo.isUnauthorized]),w(e.Fragment,{children:n})));function zl(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 Dl(e){return(t,n)=>n?.addSuffix?n.comparison&&n.comparison>0?e.future?zl(e.future,t):"через "+zl(e.regular,t):e.past?zl(e.past,t):zl(e.regular,t)+" назад":zl(e.regular,t)}const Il={lessThanXSeconds:Dl({regular:{one:"меньше секунды",singularNominative:"меньше {{count}} секунды",singularGenitive:"меньше {{count}} секунд",pluralGenitive:"меньше {{count}} секунд"},future:{one:"меньше, чем через секунду",singularNominative:"меньше, чем через {{count}} секунду",singularGenitive:"меньше, чем через {{count}} секунды",pluralGenitive:"меньше, чем через {{count}} секунд"}}),xSeconds:Dl({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:Dl({regular:{one:"меньше минуты",singularNominative:"меньше {{count}} минуты",singularGenitive:"меньше {{count}} минут",pluralGenitive:"меньше {{count}} минут"},future:{one:"меньше, чем через минуту",singularNominative:"меньше, чем через {{count}} минуту",singularGenitive:"меньше, чем через {{count}} минуты",pluralGenitive:"меньше, чем через {{count}} минут"}}),xMinutes:Dl({regular:{singularNominative:"{{count}} минута",singularGenitive:"{{count}} минуты",pluralGenitive:"{{count}} минут"},past:{singularNominative:"{{count}} минуту назад",singularGenitive:"{{count}} минуты назад",pluralGenitive:"{{count}} минут назад"},future:{singularNominative:"через {{count}} минуту",singularGenitive:"через {{count}} минуты",pluralGenitive:"через {{count}} минут"}}),aboutXHours:Dl({regular:{singularNominative:"около {{count}} часа",singularGenitive:"около {{count}} часов",pluralGenitive:"около {{count}} часов"},future:{singularNominative:"приблизительно через {{count}} час",singularGenitive:"приблизительно через {{count}} часа",pluralGenitive:"приблизительно через {{count}} часов"}}),xHours:Dl({regular:{singularNominative:"{{count}} час",singularGenitive:"{{count}} часа",pluralGenitive:"{{count}} часов"}}),xDays:Dl({regular:{singularNominative:"{{count}} день",singularGenitive:"{{count}} дня",pluralGenitive:"{{count}} дней"}}),aboutXWeeks:Dl({regular:{singularNominative:"около {{count}} недели",singularGenitive:"около {{count}} недель",pluralGenitive:"около {{count}} недель"},future:{singularNominative:"приблизительно через {{count}} неделю",singularGenitive:"приблизительно через {{count}} недели",pluralGenitive:"приблизительно через {{count}} недель"}}),xWeeks:Dl({regular:{singularNominative:"{{count}} неделя",singularGenitive:"{{count}} недели",pluralGenitive:"{{count}} недель"}}),aboutXMonths:Dl({regular:{singularNominative:"около {{count}} месяца",singularGenitive:"около {{count}} месяцев",pluralGenitive:"около {{count}} месяцев"},future:{singularNominative:"приблизительно через {{count}} месяц",singularGenitive:"приблизительно через {{count}} месяца",pluralGenitive:"приблизительно через {{count}} месяцев"}}),xMonths:Dl({regular:{singularNominative:"{{count}} месяц",singularGenitive:"{{count}} месяца",pluralGenitive:"{{count}} месяцев"}}),aboutXYears:Dl({regular:{singularNominative:"около {{count}} года",singularGenitive:"около {{count}} лет",pluralGenitive:"около {{count}} лет"},future:{singularNominative:"приблизительно через {{count}} год",singularGenitive:"приблизительно через {{count}} года",pluralGenitive:"приблизительно через {{count}} лет"}}),xYears:Dl({regular:{singularNominative:"{{count}} год",singularGenitive:"{{count}} года",pluralGenitive:"{{count}} лет"}}),overXYears:Dl({regular:{singularNominative:"больше {{count}} года",singularGenitive:"больше {{count}} лет",pluralGenitive:"больше {{count}} лет"},future:{singularNominative:"больше, чем через {{count}} год",singularGenitive:"больше, чем через {{count}} года",pluralGenitive:"больше, чем через {{count}} лет"}}),almostXYears:Dl({regular:{singularNominative:"почти {{count}} год",singularGenitive:"почти {{count}} года",pluralGenitive:"почти {{count}} лет"},future:{singularNominative:"почти через {{count}} год",singularGenitive:"почти через {{count}} года",pluralGenitive:"почти через {{count}} лет"}})};function Fl(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const jl={date:Fl({formats:{full:"EEEE, d MMMM y 'г.'",long:"d MMMM y 'г.'",medium:"d MMM y 'г.'",short:"dd.MM.y"},defaultWidth:"full"}),time:Fl({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:Fl({formats:{any:"{{date}}, {{time}}"},defaultWidth:"any"})},Bl=Symbol.for("constructDateFrom");function Ul(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&Bl in e?e[Bl](t):e instanceof Date?new e.constructor(t):new Date(t)}let Vl={};function Gl(e,t){const n=Vl,i=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,r=(s=e,o=t?.in,Ul(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 $l(e,t,n){const[i,r]=function(e,...t){const n=Ul.bind(null,e||t.find(e=>"object"==typeof e));return t.map(n)}(n?.in,e,t);return+Gl(i,n)===+Gl(r,n)}const Zl=["воскресенье","понедельник","вторник","среду","четверг","пятницу","субботу"];function ql(e){const t=Zl[e];return 2===e?"'во "+t+" в' p":"'в "+t+" в' p"}const Wl={lastWeek:(e,t,n)=>{const i=e.getDay();return $l(e,t,n)?ql(i):function(e){const t=Zl[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 $l(e,t,n)?ql(i):function(e){const t=Zl[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 Hl(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 Kl={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:Hl({values:{narrow:["до н.э.","н.э."],abbreviated:["до н. э.","н. э."],wide:["до нашей эры","нашей эры"]},defaultWidth:"wide"}),quarter:Hl({values:{narrow:["1","2","3","4"],abbreviated:["1-й кв.","2-й кв.","3-й кв.","4-й кв."],wide:["1-й квартал","2-й квартал","3-й квартал","4-й квартал"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Hl({values:{narrow:["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],abbreviated:["янв.","фев.","март","апр.","май","июнь","июль","авг.","сент.","окт.","нояб.","дек."],wide:["январь","февраль","март","апрель","май","июнь","июль","август","сентябрь","октябрь","ноябрь","декабрь"]},defaultWidth:"wide",formattingValues:{narrow:["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],abbreviated:["янв.","фев.","мар.","апр.","мая","июн.","июл.","авг.","сент.","окт.","нояб.","дек."],wide:["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"]},defaultFormattingWidth:"wide"}),day:Hl({values:{narrow:["В","П","В","С","Ч","П","С"],short:["вс","пн","вт","ср","чт","пт","сб"],abbreviated:["вск","пнд","втр","срд","чтв","птн","суб"],wide:["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"]},defaultWidth:"wide"}),dayPeriod:Hl({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 Yl(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 Xl={ordinalNumber:(Ql={matchPattern:/^(\d+)(-?(е|я|й|ое|ье|ая|ья|ый|ой|ий|ый))?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const n=e.match(Ql.matchPattern);if(!n)return null;const i=n[0],r=e.match(Ql.parsePattern);if(!r)return null;let s=Ql.valueCallback?Ql.valueCallback(r[0]):r[0];return s=t.valueCallback?t.valueCallback(s):s,{value:s,rest:e.slice(i.length)}}),era:Yl({matchPatterns:{narrow:/^((до )?н\.?\s?э\.?)/i,abbreviated:/^((до )?н\.?\s?э\.?)/i,wide:/^(до нашей эры|нашей эры|наша эра)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^д/i,/^н/i]},defaultParseWidth:"any"}),quarter:Yl({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:Yl({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:Yl({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:Yl({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 Ql;const Jl={code:"ru",formatDistance:(e,t,n)=>Il[e](t,n),formatLong:jl,formatRelative:(e,t,n,i)=>{const r=Wl[e];return"function"==typeof r?r(t,n,i):r},localize:Kl,match:Xl,options:{weekStartsOn:1,firstWeekContainsDate:1}},eu=e=>w(T,{...e,dateAdapter:S,adapterLocale:Jl}),tu=({color:e="inherit"})=>w(k,{color:e}),nu=({children:t,configOptions:n})=>{const[i,r]=e.useState(null),[s,o]=e.useState("");return e.useEffect(()=>(ra.initialize({...n,onCheck:e=>{const{valid:t,reason:i}=e;o(i),r(t),n.onCheck?.(e)}}),()=>{ra.deactivate()}),[n]),null===i?w(tu,{color:"primary"}):i?w(e.Fragment,{children:t}):w(O,{color:"error",children:s})},iu=({children:t})=>{const[n,i]=e.useState(!1);return e.useEffect(()=>{(async()=>{try{await Promise.resolve().then(function(){return Ob}),await Promise.resolve().then(function(){return Cb}),await Promise.resolve().then(function(){return Nb}),await Promise.resolve().then(function(){return Ib}),await Promise.resolve().then(function(){return $b}),await Promise.resolve().then(function(){return Wb}),i(!0)}catch{i(!1)}})()},[]),n?w(e.Fragment,{children:t}):null},ru=new class{#W;#j;#d;#H;#K;#Y;#X;#Q;constructor(e={}){this.#W=e.queryCache||new il,this.#j=e.mutationCache||new el,this.#d=e.defaultOptions||{},this.#H=new Map,this.#K=new Map,this.#Y=0}mount(){this.#Y++,1===this.#Y&&(this.#X=Ra.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#W.onFocus())}),this.#Q=za.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#W.onOnline())}))}unmount(){this.#Y--,0===this.#Y&&(this.#X?.(),this.#X=void 0,this.#Q?.(),this.#Q=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(da(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 Na.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;Na.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){const n=this.#W;return Na.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},i=Na.batch(()=>this.#W.findAll(e).map(e=>e.cancel(n)));return Promise.all(i).then(ua).catch(ua)}invalidateQueries(e,t={}){return Na.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=Na.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(ua)),"paused"===e.state.fetchStatus?Promise.resolve():t}));return Promise.all(i).then(ua)}fetchQuery(e){const t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);const n=this.#W.build(this,t);return n.isStaleByTime(da(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ua).catch(ua)}fetchInfiniteQuery(e){return e.behavior=Ya(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ua).catch(ua)}ensureInfiniteQueryData(e){return e.behavior=Ya(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return za.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(ga(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#H.values()],n={};return t.forEach(t=>{ya(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#K.set(ga(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#K.values()],n={};return t.forEach(t=>{ya(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=_a(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===Oa&&(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()}},su=e=>w(ol,{...e,client:ru}),ou=({children:e,themeOptions:t})=>{const n=Q(t);return w(J,{theme:n,children:e})},au=({children:e,configOptions:t,themeOptions:n})=>w(dn,{children:w(su,{children:w(na,{children:w(ou,{themeOptions:n,children:w(eu,{children:w(iu,{children:w(nu,{configOptions:t,children:e})})})})})})}),lu=()=>{const{enqueueSnackbar:e}=h(We);return({variant:t,message:n})=>{e({variant:t,message:n,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:3e3,hideIconVariant:!0})}},uu=()=>{const e=lu();return t=>{const{response:n}=t;if(n){const{data:t}=n;if(t){const{detail:n}=t;n&&n.forEach(t=>{e({variant:"error",message:t})})}}}},cu=()=>hl({mutationKey:["logout-mutation"],mutationFn:async e=>await ra.instance.apiService.post({url:"logout"}),onError:uu(),onSuccess:()=>{ru.invalidateQueries({queryKey:["user"]})}}),hu=()=>hl({mutationKey:["sign-in-mutation"],mutationFn:async({body:{username:e,password:t}})=>{const n=pn({username:e,password:fn(t)});return await ra.instance.apiService.post({url:"token",body:n,config:{headers:{"Content-Type":"application/x-www-form-urlencoded"}}})}});var du,fu,pu,mu;!function(e){e.GET="GET",e.DELETE="DELETE",e.PUT="PUT",e.POST="POST"}(du||(du={})),function(e){e.TOP_RIGHT="top-right",e.BOTTOM_RIGHT="bottom-right",e.BOTTOM_LEFT="bottom-left",e.TOP_LEFT="top-left"}(fu||(fu={}));var _u,gu,yu=function(){if(mu)return pu;function e(e){this._maxSize=e,this.clear()}mu=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 pu={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)}},pu}();var vu,bu=function(){if(gu)return _u;gu=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 _u={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(" ")}}(),xu={exports:{}};var wu=function(){if(vu)return xu.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 vu=1,xu.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)},xu.exports.array=e,xu.exports}(),Eu=xe(wu);const Au=Object.prototype.toString,Tu=Error.prototype.toString,Su=RegExp.prototype.toString,ku="undefined"!=typeof Symbol?Symbol.prototype.toString:()=>"",Ou=/^Symbol\((.*)\)(.*)$/;function Pu(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 ku.call(e).replace(Ou,"Symbol($1)");const i=Au.call(e).slice(8,-1);return"Date"===i?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===i||e instanceof Error?"["+Tu.call(e)+"]":"RegExp"===i?Su.call(e):null}function Cu(e,t){let n=Pu(e,t);return null!==n?n:JSON.stringify(e,function(e,n){let i=Pu(this[e],t);return null!==i?i:n},2)}function Ru(e){return null==e?[]:[].concat(e)}let Mu,Lu,Nu,zu=/\$\{\s*(\w+)\s*\}/g;Mu=Symbol.toStringTag;class Du{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[Mu]="Error",this.name="ValidationError",this.value=t,this.path=n,this.type=i,this.errors=[],this.inner=[],Ru(e).forEach(e=>{if(Iu.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]}}Lu=Symbol.hasInstance,Nu=Symbol.toStringTag;class Iu 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(zu,(e,n)=>Cu(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 Du(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[Nu]="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,Iu)}static[Lu](e){return Du[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let Fu={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 \`${Cu(i,!0)}\`).`:".";return"mixed"!==t?`${e} must be a \`${t}\` type, but the final value was: \`${Cu(n,!0)}\``+r:`${e} must match the configured type. The validated value was: \`${Cu(n,!0)}\``+r}},ju={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"},Bu={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"},Uu={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Vu={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},Gu={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"},$u={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: \`${Cu(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: \`${Cu(n,!0)}\``}return Iu.formatError(Fu.notType,e)}};Object.assign(Object.create(null),{mixed:Fu,string:ju,number:Bu,date:Uu,object:Vu,array:Gu,boolean:{isValue:"${path} field must be ${value}"},tuple:$u});const Zu=e=>e&&e.__isYupSchema__;class qu{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 qu(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(!Zu(i))throw new TypeError("conditions must return a schema object");return i.resolve(t)}}const Wu="$",Hu=".";class Ku{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]===Wu,this.isValue=this.key[0]===Hu,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?Wu:this.isValue?Hu:"";this.path=this.key.slice(n.length),this.getter=this.path&&yu.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}}Ku.prototype.__isYupRef=!0;const Yu=e=>null==e;function Xu(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=Qu(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 Iu(Iu.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=>Ju(e,g),options:i,originalValue:r,schema:s};const x=e=>{Iu.isError(e)?v(e):e?a(null):v(y())},w=e=>{Iu.isError(e)?v(e):o(e)};if(d&&Yu(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 Qu(e,t){if(!e)return e;for(const n of Object.keys(e))e[n]=Ju(e[n],t);return e}function Ju(e,t){return Ku.isRef(e)?e.getValue(t.value,t.parent,t.context):e}function ec(e,t,n,i=n){let r,s,o;return t?(yu.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 tc extends Set{describe(){const e=[];for(const t of this.values())e.push(Ku.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 tc(this.values())}merge(e,t){const n=this.clone();return e.forEach(e=>n.add(e)),t.forEach(e=>n.delete(e)),n}}function nc(e,t=new Map){if(Zu(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]=nc(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,nc(r,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const i of e)n.add(nc(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]=nc(r,t)}return n}function ic(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 rc(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:ic(n)}))}(e,t);const i=t?`${t}.${e.path}`:e.path;return e.inner.flatMap(e=>rc(e,i))}class sc{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 tc,this._blacklist=new tc,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Fu.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=nc(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&&Yu(r))return r;let s=Cu(e),o=Cu(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)=>{Iu.isError(e)&&(e.value=t),s(e)},(e,t)=>{e.length?s(new Iu(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 Iu.isError(e)&&(e.value=t),e},(t,n)=>{if(t.length)throw new Iu(t,e,void 0,void 0,s);i=n}),i}isValid(e,t){return this.validate(e,t).then(()=>!0,e=>{if(Iu.isError(e))return!1;throw e})}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(e){if(Iu.isError(e))return!1;throw e}}_getDefault(e){let t=this.spec.default;return null==t?t:"function"==typeof t?t.call(this,e):nc(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=Xu({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=Xu({message:t,name:"optionality",test(e){return void 0!==e||this.schema.spec.optional}}),n}optional(){return this.optionality(!0)}defined(e=Fu.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=Fu.notNull){return this.nullability(!1,e)}required(e=Fu.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=Fu.default),"function"!=typeof t.test)throw new TypeError("`test` is a required parameters");let n=this.clone(),i=Xu(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=Ru(e).map(e=>new Ku(e));return i.forEach(e=>{e.isSibling&&n.deps.push(e.key)}),n.conditions.push("function"==typeof t?new qu(i,t):qu.fromOptions(i,t)),n}typeError(e){let t=this.clone();return t.internalTests.typeError=Xu({message:e,name:"typeError",skipAbsent:!0,test(e){return!!this.schema._typeCheck(e)||this.createError({params:{type:this.schema.type}})}}),t}oneOf(e,t=Fu.oneOf){let n=this.clone();return e.forEach(e=>{n._whitelist.add(e),n._blacklist.delete(e)}),n.internalTests.whiteList=Xu({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=Fu.notOneOf){let n=this.clone();return e.forEach(e=>{n._blacklist.add(e),n._whitelist.delete(e)}),n.internalTests.blacklist=Xu({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?Qu(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 Iu)return{issues:rc(e)};throw e}}};return t}}sc.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])sc.prototype[`${e}At`]=function(t,n,i={}){const{parent:r,parentPath:s,schema:o}=ec(this,t,n,i.context);return o[e](r&&r[s],Object.assign({},i,{parent:r,path:t}))};for(const e of["equals","is"])sc.prototype[e]=sc.prototype.oneOf;for(const e of["not","nope"])sc.prototype[e]=sc.prototype.notOneOf;const oc=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function ac(e){var t,n;const i=oc.exec(e);return i?{year:lc(i[1]),month:lc(i[2],1)-1,day:lc(i[3],1),hour:lc(i[4]),minute:lc(i[5]),second:lc(i[6]),millisecond:i[7]?lc(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:lc(i[10]),minuteOffset:lc(i[11])}:null}function lc(e,t=0){return Number(e)||t}let uc=/^[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])?)*$/,cc=/^((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,hc=/^(?:[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,dc=new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"),fc=e=>Yu(e)||e===e.trim(),pc={}.toString();function mc(){return new _c}class _c extends sc{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===pc?e:n})})}required(e){return super.required(e).withMutation(t=>t.test({message:e||Fu.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=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=ju.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=ju.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||ju.matches,params:{regex:e},skipAbsent:!0,test:t=>""===t&&r||-1!==t.search(e)})}email(e=ju.email){return this.matches(uc,{name:"email",message:e,excludeEmptyString:!0})}url(e=ju.url){return this.matches(cc,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=ju.uuid){return this.matches(hc,{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(dc,{name:"datetime",message:i||ju.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:i||ju.datetime_offset,params:{allowOffset:t},skipAbsent:!0,test:e=>{if(!e||t)return!0;const n=ac(e);return!!n&&!!n.z}}).test({name:"datetime_precision",message:i||ju.datetime_precision,params:{precision:n},skipAbsent:!0,test:e=>{if(!e||null==n)return!0;const t=ac(e);return!!t&&t.precision===n}})}ensure(){return this.default("").transform(e=>null===e?"":e)}trim(e=ju.trim){return this.transform(e=>null!=e?e.trim():e).test({message:e,name:"trim",test:fc})}lowercase(e=ju.lowercase){return this.transform(e=>Yu(e)?e:e.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>Yu(e)||e===e.toLowerCase()})}uppercase(e=ju.uppercase){return this.transform(e=>Yu(e)?e:e.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>Yu(e)||e===e.toUpperCase()})}}mc.prototype=_c.prototype;function gc(){return new yc}class yc extends sc{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=Bu.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=Bu.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=Bu.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=Bu.moreThan){return this.test({message:t,name:"min",exclusive:!0,params:{more:e},skipAbsent:!0,test(t){return t>this.resolve(e)}})}positive(e=Bu.positive){return this.moreThan(0,e)}negative(e=Bu.negative){return this.lessThan(0,e)}integer(e=Bu.integer){return this.test({name:"integer",message:e,skipAbsent:!0,test:e=>Number.isInteger(e)})}truncate(){return this.transform(e=>Yu(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=>Yu(t)?t:Math[e](t))}}gc.prototype=yc.prototype;let vc=new Date("");function bc(){return new xc}class xc extends sc{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=ac(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)?xc.INVALID_DATE:new Date(e)))})}prepareParam(e,t){let n;if(Ku.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=Uu.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=Uu.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 wc(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 Ec(e){return(t,n)=>wc(e,t)-wc(e,n)}xc.INVALID_DATE=vc,bc.prototype=xc.prototype,bc.INVALID_DATE=vc;const Ac=(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 Tc(e){if("fields"in e){const t={};for(const[n,i]of Object.entries(e.fields))t[n]=Tc(i);return e.setFields(t)}if("array"===e.type){const t=e.optional();return t.innerType&&(t.innerType=Tc(t.innerType)),t}return"tuple"===e.type?e.optional().clone({types:e.spec.types.map(Tc)}):"optional"in e?e.optional():e}let Sc=e=>"[object Object]"===Object.prototype.toString.call(e);function kc(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(e=>-1===n.indexOf(e))}const Oc=Ec([]);function Pc(e){return new Cc(e)}class Cc extends sc{constructor(e){super({type:"object",check:e=>Sc(e)||"function"==typeof e}),this.fields=Object.create(null),this._sortErrors=Oc,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 sc?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||!Sc(r))return void i(e,r);s=s||r;let a=[];for(let e of this._nodes){let n=this.fields[e];n&&!Ku.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=yu.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),Ku.isRef(n)&&n.isSibling?s(n.path,t):Zu(n)&&"deps"in n&&n.deps.forEach(e=>s(e,t))}return Eu.array(Array.from(i),n).reverse()}(e,t),n._sortErrors=Ec(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 Tc(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=yu.getter(e,!0);return this.transform(r=>{if(!r)return r;let s=r;return((e,t)=>{const n=[...yu.normalizePath(t)];if(1===n.length)return n[0]in e;let i=n.pop(),r=yu.getter(yu.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(Ac)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||Vu.exact,test(e){if(null==e)return!0;const t=kc(this.schema,e);return 0===t.length||this.createError({params:{properties:t.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,t=Vu.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=kc(this.schema,t);return!e||0===n.length||this.createError({params:{unknown:n.join(", ")}})}});return n.spec.noUnknown=e,n}unknown(e=!0,t=Vu.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(bu.camelCase)}snakeCase(){return this.transformKeys(bu.snakeCase)}constantCase(){return this.transformKeys(e=>bu.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 Rc(e){return new Mc(e)}Pc.prototype=Cc.prototype;class Mc extends sc{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(Ac)}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(!Zu(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+Cu(e));return t.innerType=e,t.spec=Object.assign({},t.spec,{types:e}),t}length(e,t=Gu.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||Gu.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||Gu.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}}Rc.prototype=Mc.prototype;const Lc="Данное поле обязательно для заполнения",Nc=()=>mc(),zc=(e=Lc)=>Nc().required(e),Dc=gc(),Ic=Dc.required(Lc),Fc=Rc(),jc=bc(),Bc=jc.required(Lc),Uc=({items:t,onOpen:n,defaultValue:i=null})=>{const[r,s]=e.useState(i),o=e.useCallback(()=>{s(null)},[]);e.useEffect(()=>{i&&s(i)},[i]);const a=e.useId();return w(P,{id:a,children:t.map(({value:e,summary:t,getDetails:i})=>{const l=`${a}-accordion-${e}`;return E(C,{expanded:e===r,children:[w(R,{expandIcon:w(te,{}),onClick:()=>{s(t=>t===e?null:(n?.(e),e))},"aria-controls":`${l}-content`,id:`${l}-header`,children:t}),w(M,{children:i({onClose:o})})]},l)})})},Vc=e=>{const{children:t,variant:n="contained",loading:i,icon:r,sx:s,...o}=e;return r?w(ne,{...o,loading:i,children:r}):w(N,{sx:{whiteSpace:"nowrap",padding:"5px 15px",textTransform:"none",...s},loading:i,loadingPosition:"start",variant:n,...o,children:t})},Gc={reset:oe,edit:re,move:se,save:ae,delete:ie},$c=({title:t,iconProps:n,...i})=>{const r=e.useId(),s=Gc[n.name],o=n.color??"primary";return t?w(z,{title:t,children:w(D,{id:r,...i,onClick:e=>{e.stopPropagation(),i.onClick?.(e)},children:w(s,{fontSize:"medium",color:o})})}):w(D,{id:r,...i,onClick:e=>{e.stopPropagation(),i.onClick?.(e)},children:w(s,{fontSize:"medium",color:o})})},Zc=e.forwardRef(function(e,t){return w(I,{direction:"up",ref:t,...e})}),qc=({notification:t,onDelete:n,disabled:i=!1,...r})=>{const s=e.useId(),[o,a]=e.useState(!1),l=()=>{a(!1)},u=e.useMemo(()=>({name:"delete",color:i?"disabled":"error"}),[i]);return E(e.Fragment,{children:[t?w(z,{title:t.title,children:w($c,{...r,iconProps:u,onClick:()=>{a(!0)},disabled:i})}):w($c,{...r,iconProps:u,onClick:n,disabled:i}),t?E(F,{slots:{transition:Zc},open:o,onClose:l,children:[w(j,{id:`${s}-dialog-title`,children:t.title}),w(B,{children:w(U,{id:`${s}-dialog-text`,children:t.description})}),E(V,{children:[w(N,{variant:"contained",color:"error",sx:{textTransform:"none"},onClick:l,children:"Отмена"}),w(N,{variant:"contained",sx:{textTransform:"none"},onClick:()=>{n(),l()},children:"Подтвердить"})]})]}):null]})},Wc=G("input")({clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:1,overflow:"hidden",position:"absolute",bottom:0,left:0,whiteSpace:"nowrap",width:1}),Hc=({children:e,accept:t,onFilesLoad:n,...i})=>E(Vc,{...i,component:"label",variant:"contained",startIcon:w(le,{}),children:[e,w(Wc,{type:"file",accept:t,onChange:e=>{const{target:{files:t}}=e;t&&n({event:e,files:t})},multiple:!0})]});var Kc=Ml(({name:t,title:n,description:i,onSuccess:r,onOpen:s,onClose:o,theme:a="info",agreeButton:l,disagreeButton:u,content:c})=>{const h=e.useId(),d=e.useId(),f=e.useId(),p=Ho.getIsOpen(t),m=()=>{Ho.close(t)};return e.useEffect(()=>{p?s?.():o?.()},[p]),E(F,{id:h,open:p,onClose:m,"aria-labelledby":d,"aria-describedby":f,children:[w(j,{id:d,sx:({palette:e})=>({background:e[a].main,color:e[a].contrastText}),children:n}),w($,{}),E(B,{sx:({spacing:e})=>({display:"grid",gap:e(2)}),children:[w(U,{id:f,children:i}),c?E(e.Fragment,{children:[w($,{}),c]}):null]}),w($,{}),E(V,{children:[w(Vc,{color:"error",onClick:m,disabled:u?.disabled,children:u?.text??"Закрыть"}),w(Vc,{color:"success",onClick:()=>{r(),m()},disabled:l?.disabled,children:l?.text??"Подтвердить"})]})]})});const Yc=({children:e,sx:t,...n})=>w(P,{...n,sx:e=>{const{spacing:n}=e;return{px:n(2),py:n(2),borderRadius:"10px",boxShadow:"0px 8px 24px 0px rgba(0,0,0,0.3)",maxHeight:"85vh",maxWidth:"85vw",overflowX:"auto",...t?.(e)}},children:e});var Xc=e=>"checkbox"===e.type,Qc=e=>e instanceof Date,Jc=e=>null==e;const eh=e=>"object"==typeof e;var th=e=>!Jc(e)&&!Array.isArray(e)&&eh(e)&&!Qc(e),nh=e=>th(e)&&e.target?Xc(e.target)?e.target.checked:e.target.value:e,ih=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),rh="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function sh(e){if(e instanceof Date)return new Date(e);const t="undefined"!=typeof FileList&&e instanceof FileList;if(rh&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!(n||th(e)&&(e=>{const t=e.constructor&&e.constructor.prototype;return th(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]=sh(e[t]));return i}var oh=e=>/^\w*$/.test(e),ah=e=>void 0===e,lh=e=>Array.isArray(e)?e.filter(Boolean):[],uh=e=>lh(e.replace(/["|']|\]/g,"").split(/\.|\[/)),ch=(e,t,n)=>{if(!t||!th(e))return n;const i=(oh(t)?[t]:uh(t)).reduce((e,t)=>Jc(e)?e:e[t],e);return ah(i)||i===e?ah(e[t])?n:e[t]:i},hh=e=>"boolean"==typeof e,dh=e=>"function"==typeof e,fh=(e,t,n)=>{let i=-1;const r=oh(t)?[t]:uh(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=th(n)||Array.isArray(n)?n:isNaN(+r[i+1])?{}:[]}if("__proto__"===t||"constructor"===t||"prototype"===t)return;e[t]=s,e=e[t]}};const ph="blur",mh="focusout",_h="change",gh="onBlur",yh="onChange",vh="onSubmit",bh="onTouched",xh="all",wh="max",Eh="min",Ah="maxLength",Th="minLength",Sh="pattern",kh="required",Oh="validate",Ph=t.createContext(null);Ph.displayName="HookFormControlContext";const Ch=()=>t.useContext(Ph);var Rh=(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]!==xh&&(t._proxyFormState[r]=!i||xh),n&&(n[r]=!0),e[r]}});return r};const Mh="undefined"!=typeof window?t.useLayoutEffect:t.useEffect;var Lh=e=>"string"==typeof e,Nh=(e,t,n,i,r)=>Lh(e)?(i&&t.watch.add(e),ch(n,e,r)):Array.isArray(e)?e.map(e=>(i&&t.watch.add(e),ch(n,e))):(i&&(t.watchAll=!0),n),zh=e=>Jc(e)||!eh(e);function Dh(e,t,n=new WeakSet){if(zh(e)||zh(t))return Object.is(e,t);if(Qc(e)&&Qc(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(Qc(i)&&Qc(e)||th(i)&&th(e)||Array.isArray(i)&&Array.isArray(e)?!Dh(i,e,n):!Object.is(i,e))return!1}}return!0}function Ih(e){const n=Ch(),{name:i,disabled:r,control:s=n,shouldUnregister:o,defaultValue:a,exact:l=!0}=e,u=ih(s._names.array,i),c=t.useMemo(()=>ch(s._formValues,i,ch(s._defaultValues,i,a)),[s,i,a]),h=function(e){const n=Ch(),{control:i=n,name:r,defaultValue:s,disabled:o,exact:a,compute:l}=e||{},u=t.useRef(s),c=t.useRef(l),h=t.useRef(void 0),d=t.useRef(i),f=t.useRef(r);c.current=l;const[p,m]=t.useState(()=>{const e=i._getWatch(r,u.current);return c.current?c.current(e):e}),_=t.useCallback(e=>{const t=Nh(r,i._names,e||i._formValues,!1,u.current);return c.current?c.current(t):t},[i._formValues,i._names,r]),g=t.useCallback(e=>{if(!o){const t=Nh(r,i._names,e||i._formValues,!1,u.current);if(c.current){const e=c.current(t);Dh(e,h.current)||(m(e),h.current=e)}else m(t)}},[i._formValues,i._names,o,r]);Mh(()=>(d.current===i&&Dh(f.current,r)||(d.current=i,f.current=r,g()),i._subscribe({name:r,formState:{values:!0},exact:a,callback:e=>{g(e.values)}})),[i,a,r,g]),t.useEffect(()=>i._removeUnmounted());const y=d.current!==i,v=f.current,b=t.useMemo(()=>{if(o)return null;const e=!y&&!Dh(v,r);return y||e?_():null},[o,y,r,v,_]);return null!==b?b:p}({control:s,name:i,defaultValue:c,exact:l}),d=function(e){const n=Ch(),{control:i=n,disabled:r,name:s,exact:o}=e||{},[a,l]=t.useState(i._formState),u=t.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Mh(()=>i._subscribe({name:s,formState:u.current,exact:o,callback:e=>{!r&&l({...i._formState,...e})}}),[s,r,o]),t.useEffect(()=>{u.current.isValid&&i._setValid(!0)},[i]),t.useMemo(()=>Rh(a,i,u.current,!1),[a,i])}({control:s,name:i,exact:l}),f=t.useRef(e),p=t.useRef(void 0),m=t.useRef(s.register(i,{...e.rules,value:h,...hh(e.disabled)?{disabled:e.disabled}:{}}));f.current=e;const _=t.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!ch(d.errors,i)},isDirty:{enumerable:!0,get:()=>!!ch(d.dirtyFields,i)},isTouched:{enumerable:!0,get:()=>!!ch(d.touchedFields,i)},isValidating:{enumerable:!0,get:()=>!!ch(d.validatingFields,i)},error:{enumerable:!0,get:()=>ch(d.errors,i)}}),[d,i]),g=t.useCallback(e=>m.current.onChange({target:{value:nh(e),name:i},type:_h}),[i]),y=t.useCallback(()=>m.current.onBlur({target:{value:ch(s._formValues,i),name:i},type:ph}),[i,s._formValues]),v=t.useCallback(e=>{const t=ch(s._fields,i);t&&t._f&&e&&(t._f.ref={focus:()=>dh(e.focus)&&e.focus(),select:()=>dh(e.select)&&e.select(),setCustomValidity:t=>dh(e.setCustomValidity)&&e.setCustomValidity(t),reportValidity:()=>dh(e.reportValidity)&&e.reportValidity()})},[s._fields,i]),b=t.useMemo(()=>({name:i,value:h,...hh(r)||d.disabled?{disabled:d.disabled||r}:{},onChange:g,onBlur:y,ref:v}),[i,r,d.disabled,g,y,v,h]);return t.useEffect(()=>{const e=s._options.shouldUnregister||o,t=p.current;t&&t!==i&&!u&&s.unregister(t),s.register(i,{...f.current.rules,...hh(f.current.disabled)?{disabled:f.current.disabled}:{}});const n=(e,t)=>{const n=ch(s._fields,e);n&&n._f&&(n._f.mount=t)};if(n(i,!0),e){const e=sh(ch(s._options.defaultValues,i,f.current.defaultValue));fh(s._defaultValues,i,e),ah(ch(s._formValues,i))&&fh(s._formValues,i,e)}return!u&&s.register(i),p.current=i,()=>{(u?e&&!s._state.action:e)?s.unregister(i):n(i,!1)}},[i,s,u,o]),t.useEffect(()=>{s._setDisabledField({disabled:r,name:i})},[r,i,s]),t.useMemo(()=>({field:b,formState:d,fieldState:_}),[b,d,_])}const Fh=e=>e.render(Ih(e)),jh=t.createContext(null);jh.displayName="HookFormContext";const Bh=()=>t.useContext(jh),Uh=e=>{const{children:n,watch:i,getValues:r,getFieldState:s,setError:o,clearErrors:a,setValue:l,trigger:u,formState:c,resetField:h,reset:d,handleSubmit:f,unregister:p,control:m,register:_,setFocus:g,subscribe:y}=e;return t.createElement(jh.Provider,{value:t.useMemo(()=>({watch:i,getValues:r,getFieldState:s,setError:o,clearErrors:a,setValue:l,trigger:u,formState:c,resetField:h,reset:d,handleSubmit:f,unregister:p,control:m,register:_,setFocus:g,subscribe:y}),[a,m,c,s,r,f,_,d,h,o,g,l,y,u,p,i])},t.createElement(Ph.Provider,{value:m},n))};var Vh=(e,t,n,i,r)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[i]:r||!0}}:{},Gh=e=>Array.isArray(e)?e:[e],$h=()=>{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 Zh(e,t){const n={};for(const i in e)if(e.hasOwnProperty(i)){const r=e[i],s=t[i];if(r&&th(r)&&s){const e=Zh(r,s);th(e)&&(n[i]=e)}else e[i]&&(n[i]=s)}return n}var qh=e=>th(e)&&!Object.keys(e).length,Wh=e=>"file"===e.type,Hh=e=>{if(!rh)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Kh=e=>"select-multiple"===e.type,Yh=e=>"radio"===e.type,Xh=e=>Hh(e)&&e.isConnected;function Qh(e,t){const n=Array.isArray(t)?t:oh(t)?[t]:uh(t),i=1===n.length?e:function(e,t){const n=t.slice(0,-1).length;let i=0;for(;i<n;)e=ah(e)?i++:e[t[i++]];return e}(e,n),r=n.length-1,s=n[r];return i&&delete i[s],0!==r&&(th(i)&&qh(i)||Array.isArray(i)&&function(e){for(const t in e)if(e.hasOwnProperty(t)&&!ah(e[t]))return!1;return!0}(i))&&Qh(e,n.slice(0,-1)),e}function Jh(e){return Array.isArray(e)||th(e)&&!(e=>{for(const t in e)if(dh(e[t]))return!0;return!1})(e)}function ed(e,t={}){for(const n in e){const i=e[n];Jh(i)?(t[n]=Array.isArray(i)?[]:{},ed(i,t[n])):ah(i)||(t[n]=!0)}return t}function td(e,t,n){n||(n=ed(t));for(const i in e){const r=e[i];if(Jh(r))ah(t)||zh(n[i])?n[i]=ed(r,Array.isArray(r)?[]:{}):td(r,Jc(t)?{}:t[i],n[i]);else{const e=t[i];n[i]=!Dh(r,e)}}return n}const nd={value:!1,isValid:!1},id={value:!0,isValid:!0};var rd=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&&!ah(e[0].attributes.value)?ah(e[0].value)||""===e[0].value?id:{value:e[0].value,isValid:!0}:id:nd}return nd},sd=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:i})=>ah(e)?e:t?""===e?NaN:e?+e:e:n&&Lh(e)?new Date(e):i?i(e):e;const od={isValid:!1,value:null};var ad=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,od):od;function ld(e){const t=e.ref;return Wh(t)?t.files:Yh(t)?ad(e.refs).value:Kh(t)?[...t.selectedOptions].map(({value:e})=>e):Xc(t)?rd(e.refs).value:sd(ah(t.value)?e.ref.value:t.value,e)}var ud=e=>e instanceof RegExp,cd=e=>ah(e)?e:ud(e)?e.source:th(e)?ud(e.value)?e.value.source:e.value:e,hd=e=>({isOnSubmit:!e||e===vh,isOnBlur:e===gh,isOnChange:e===yh,isOnAll:e===xh,isOnTouch:e===bh});const dd="AsyncFunction";var fd=e=>!!e&&!!e.validate&&!!(dh(e.validate)&&e.validate.constructor.name===dd||th(e.validate)&&Object.values(e.validate).find(e=>e.constructor.name===dd)),pd=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))));const md=(e,t,n,i)=>{for(const r of n||Object.keys(e)){const n=ch(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(md(s,t))break}else if(th(s)&&md(s,t))break}}};function _d(e,t,n){const i=ch(e,n);if(i||oh(n))return{error:i,name:n};const r=n.split(".");for(;r.length;){const i=r.join("."),s=ch(t,i),o=ch(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 gd=(e,t,n)=>{const i=Gh(ch(e,n));return fh(i,"root",t[n]),fh(e,n,i),e};function yd(e,t,n="validate"){if(Lh(e)||Array.isArray(e)&&e.every(Lh)||hh(e)&&!e)return{type:n,message:Lh(e)?e:"",ref:t}}var vd=e=>th(e)&&!ud(e)?e:{value:e,message:""},bd=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=ch(n,m);if(!g||t.has(m))return{};const v=a?a[0]:o,b=e=>{r&&v.reportValidity&&(v.setCustomValidity(hh(e)?"":e||""),v.reportValidity())},x={},w=Yh(o),E=Xc(o),A=w||E,T=(_||Wh(o))&&ah(o.value)&&ah(y)||Hh(o)&&""===o.value||""===y||Array.isArray(y)&&!y.length,S=Vh.bind(null,m,i,x),k=(e,t,n,i=Ah,r=Th)=>{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||Jc(y))||hh(y)&&!y||E&&!rd(a).isValid||w&&!ad(a).isValid)){const{value:e,message:t}=Lh(l)?{value:!!l,message:l}:vd(l);if(e&&(x[m]={type:kh,message:t,ref:v,...S(kh,t)},!i))return b(t),x}if(!(T||Jc(h)&&Jc(d))){let e,t;const n=vd(d),r=vd(h);if(Jc(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;Lh(n.value)&&y&&(e=a?s(y)>s(n.value):l?y>n.value:i>new Date(n.value)),Lh(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);Jc(n.value)||(e=i>n.value),Jc(r.value)||(t=i<r.value)}if((e||t)&&(k(!!e,n.message,r.message,wh,Eh),!i))return b(x[m].message),x}if((u||c)&&!T&&(Lh(y)||s&&Array.isArray(y))){const e=vd(u),t=vd(c),n=!Jc(e.value)&&y.length>+e.value,r=!Jc(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&&Lh(y)){const{value:e,message:t}=vd(f);if(ud(e)&&!y.match(e)&&(x[m]={type:Sh,message:t,ref:o,...S(Sh,t)},!i))return b(t),x}if(p)if(dh(p)){const e=yd(await p(y,n),v);if(e&&(x[m]={...e,...S(Oh,e.message)},!i))return b(e.message),x}else if(th(p)){let e={};for(const t in p){if(!qh(e)&&!i)break;const r=yd(await p[t](y,n),v,t);r&&(e={...r,...S(t,r.message)},b(r.message),i&&(x[m]=e))}if(!qh(e)&&(x[m]={ref:v,...e},!i))return x}return b(!0),x};const xd={mode:vh,reValidateMode:yh,shouldFocusError:!0};function wd(e={}){let t,n={...xd,...e},i={submitCount:0,isDirty:!1,isReady:!1,isLoading:dh(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:n.errors||{},disabled:n.disabled||!1},r={},s=(th(n.defaultValues)||th(n.values))&&sh(n.defaultValues||n.values)||{},o=n.shouldUnregister?{}:sh(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:$h(),state:$h()},p=n.criteriaMode===xh,m=async e=>{if(!a.keepIsValid&&!n.disabled&&(h.isValid||d.isValid||e)){let e;n.resolver?(e=qh((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?fh(i.validatingFields,e,t):Qh(i.validatingFields,e))}),f.state.next({validatingFields:i.validatingFields,isValidating:!qh(i.validatingFields)}))},g=(e,t,n,i)=>{const l=ch(r,e);if(l){const r=ch(o,e,ah(n)?ch(s,e):n);ah(r)||i&&i.defaultChecked||t?fh(o,e,t?r:ld(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=Dh(ch(s,e),t);u=!!ch(i.dirtyFields,e),n?Qh(i.dirtyFields,e):fh(i.dirtyFields,e,!0),c.dirtyFields=i.dirtyFields,l=l||(h.dirtyFields||d.dirtyFields)&&u!==!n}if(r){const t=ch(i.touchedFields,e);t||(fh(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=ch(i.errors,e),l=(h.isValid||d.isValid)&&hh(r)&&i.isValid!==r;var c;if(n.delayError&&s?(c=()=>((e,t)=>{fh(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?fh(i.errors,e,s):Qh(i.errors,e)),(s?!Dh(a,s):a)||!qh(o)||l){const t={...o,...l&&hh(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=ch(t,n);e&&fh(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&&fd(u._f);c&&h.validatingFields&&_([t.name],!0);const d=await bd(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&&(ch(d,t.name)?a?gd(i.errors,d,t.name):fh(i.errors,t.name,d[t.name]):Qh(i.errors,t.name))}!qh(a)&&await x(a,r,s)}}return s.valid},w=(e,t)=>!n.disabled&&(e&&t&&fh(o,e,t),!Dh(C(),s)),E=(e,t,n)=>Nh(e,l,{...a.mount?o:ah(t)?s:Lh(e)?{[e]:t}:t},n,t),A=(e,t,n={})=>{const i=ch(r,e);let s=t;if(i){const n=i._f;n&&(!n.disabled&&fh(o,e,sd(t,n)),s=Hh(n.ref)&&Jc(t)?"":t,Kh(n.ref)?[...n.ref.options].forEach(e=>e.selected=s.includes(e.value)):n.refs?Xc(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):Wh(n.ref)?n.ref.value="":(n.ref.value=s,n.ref.type||f.state.next({name:e,values:sh(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=ch(r,o);(l.array.has(e)||th(s)||a&&!a._f)&&!Qc(s)?T(o,s,n):A(o,s,n)}},S=(e,t,n={})=>{const u=ch(r,e),c=l.array.has(e),p=sh(t);fh(o,e,p),c?(f.array.next({name:e,values:sh(o)}),(h.isDirty||h.dirtyFields||d.isDirty||d.dirtyFields)&&n.shouldDirty&&f.state.next({name:e,dirtyFields:td(s,o),isDirty:w(e,p)})):!u||u._f||Jc(p)?A(e,p,n):T(e,p,n),pd(e,l)?f.state.next({...i,name:e,values:sh(o)}):f.state.next({name:a.mount?e:void 0,values:sh(o)})},k=async e=>{a.mount=!0;const s=e.target;let u=s.name,c=!0;const g=ch(r,u),w=e=>{c=Number.isNaN(e)||Qc(e)&&isNaN(e.getTime())||Dh(e,ch(o,u,e))},E=hd(n.mode),A=hd(n.reValidateMode);if(g){let a,S;const k=s.type?ld(g._f):nh(e),O=e.type===ph||e.type===mh,C=!((T=g._f).mount&&(T.required||T.min||T.max||T.maxLength||T.minLength||T.pattern||T.validate)||n.resolver||ch(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,ch(i.touchedFields,u),i.isSubmitted,A,E),R=pd(u,l,O);fh(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=!qh(M)||R;if(!O&&f.state.next({name:u,type:e.type,values:sh(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=_d(i.errors,r,u),n=_d(e,r,t.name||u);a=n.error,u=n.name,S=qh(e)}}else _([u],!0),a=(await bd(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(ch(i.errors,t)&&e.focus)return e.focus(),1},P=async(e,t={})=>{let s,o;const a=Gh(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=ch(t,n);e?fh(i.errors,n,e):Qh(i.errors,n)}else i.errors=t;return t})(ah(e)?e:a);s=qh(t),o=e?!a.some(e=>ch(t,e)):s}else e?(o=(await Promise.all(a.map(async e=>{const t=ch(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({...!Lh(e)||(h.isValid||d.isValid)&&s!==i.isValid?{}:{name:e},...n.resolver||!e?{isValid:s}:{},errors:i.errors}),t.shouldFocus&&!o&&md(r,O,e?a:l.mount),o},C=(e,t)=>{let n={...a.mount?o:s};return t&&(n=Zh(t.dirtyFields?i.dirtyFields:i.touchedFields,n)),ah(e)?n:Lh(e)?ch(n,e):e.map(e=>ch(n,e))},R=(e,t)=>({invalid:!!ch((t||i).errors,e),isDirty:!!ch((t||i).dirtyFields,e),error:ch((t||i).errors,e),isValidating:!!ch(i.validatingFields,e),isTouched:!!ch((t||i).touchedFields,e)}),M=(e,t,n)=>{const s=(ch(r,e,{_f:{}})._f||{}).ref,o=ch(i.errors,e)||{},{ref:a,message:l,type:u,...c}=o;fh(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&&!Gh(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 qh(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(e=>t[e]===(!i||xh))})(t,e.formState||h,U,e.reRenderRoot)||e.callback({values:{...o},...i,...t,defaultValues:s})}}).unsubscribe,N=(e,t={})=>{for(const a of e?Gh(e):l.mount)l.mount.delete(a),l.array.delete(a),t.keepValue||(Qh(r,a),Qh(o,a)),!t.keepError&&Qh(i.errors,a),!t.keepDirty&&Qh(i.dirtyFields,a),!t.keepTouched&&Qh(i.touchedFields,a),!t.keepIsValidating&&Qh(i.validatingFields,a),!n.shouldUnregister&&!t.keepDefaultValue&&Qh(s,a);f.state.next({values:sh(o)}),f.state.next({...i,...t.keepDirty?{isDirty:w()}:{}}),!t.keepIsValid&&m()},z=({disabled:e,name:t})=>{if(hh(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=ch(r,e);const o=hh(t.disabled)||hh(n.disabled);return fh(r,e,{...i||{},_f:{...i&&i._f?i._f:{ref:{name:e}},name:e,mount:!0,...t}}),l.mount.add(e),i?z({disabled:hh(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:cd(t.min),max:cd(t.max),minLength:cd(t.minLength),maxLength:cd(t.maxLength),pattern:cd(t.pattern)}:{},name:e,onChange:k,onBlur:k,ref:o=>{if(o){D(e,t),i=ch(r,e);const n=ah(o.value)&&o.querySelectorAll&&o.querySelectorAll("input,select,textarea")[0]||o,a=(e=>Yh(e)||Xc(e))(n),l=i._f.refs||[];if(a?l.find(e=>e===n):n===i._f.ref)return;fh(r,e,{_f:{...i._f,...a?{refs:[...l.filter(Xh),n,...Array.isArray(ch(s,e))?[{}]:[]],ref:{type:n.type,name:e}}:{ref:n}}}),g(e,!1,void 0,n)}else i=ch(r,e,{}),i._f&&(i._f.mount=!1),(n.shouldUnregister||t.shouldUnregister)&&(!ih(l.array,e)||!a.action)&&l.unMount.add(e)}}},I=()=>n.shouldFocusError&&md(r,O,l.mount),F=(e,t)=>async s=>{let a;s&&(s.preventDefault&&s.preventDefault(),s.persist&&s.persist());let u=sh(o);if(f.state.next({isSubmitting:!0}),n.resolver){const{errors:e,values:t}=await b();_(),i.errors=e,u=sh(t)}else await x(r);if(l.disabled.size)for(const e of l.disabled)Qh(u,e);if(Qh(i.errors,"root"),qh(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:qh(i.errors)&&!a,submitCount:i.submitCount+1,errors:i.errors}),a)throw a},j=(e,t={})=>{const u=e?sh(e):s,c=sh(u),d=qh(e),p=d?s:c;if(t.keepDefaultValues||(s=u),!t.keepValues){if(t.keepDirtyValues){const e=new Set([...l.mount,...Object.keys(td(s,o))]);for(const t of Array.from(e)){const e=ch(i.dirtyFields,t),n=ch(o,t),r=ch(p,t);e&&!ah(n)?fh(p,t,n):e||ah(r)||S(t,r)}}else{if(rh&&ah(e))for(const e of l.mount){const t=ch(r,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(Hh(e)){const t=e.closest("form");if(t){t.reset();break}}}}if(t.keepFieldsRef)for(const e of l.mount)S(e,ch(p,e));else r={}}o=n.shouldUnregister?t.keepDefaultValues?sh(s):{}:sh(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&&!qh(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||Dh(e,s))),isSubmitted:!!t.keepIsSubmitted&&i.isSubmitted,dirtyFields:d?{}:t.keepDirtyValues?t.keepDefaultValues&&o?td(s,o):i.dirtyFields:t.keepDefaultValues&&e?td(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(dh(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(ch(r,e))){const t=l(ch(r,e),u.argA,u.argB);c&&fh(r,e,t)}if(p&&Array.isArray(ch(i.errors,e))){const t=l(ch(i.errors,e),u.argA,u.argB);c&&fh(i.errors,e,t),((e,t)=>{!lh(ch(e,t)).length&&Qh(e,t)})(i.errors,e)}if((h.touchedFields||d.touchedFields)&&p&&Array.isArray(ch(i.touchedFields,e))){const t=l(ch(i.touchedFields,e),u.argA,u.argB);c&&fh(i.touchedFields,e,t)}(h.dirtyFields||d.dirtyFields)&&(i.dirtyFields=td(s,o)),f.state.next({name:e,isDirty:w(e,t),dirtyFields:i.dirtyFields,errors:i.errors,isValid:i.isValid})}else fh(o,e,t)},_setDisabledField:z,_setErrors:e=>{i.errors=e,f.state.next({errors:i.errors,isValid:!1})},_getFieldArray:e=>lh(ch(a.mount?o:s,e,n.shouldUnregister?ch(s,e,[]):[])),_reset:j,_resetDefaultValues:()=>dh(n.defaultValues)&&n.defaultValues().then(e=>{B(e,n.resetOptions),f.state.next({isLoading:!1})}),_removeUnmounted:()=>{for(const e of l.unMount){const t=ch(r,e);t&&(t._f.refs?t._f.refs.every(e=>!Xh(e)):!Xh(t._f.ref))&&N(e)}l.unMount=new Set},_disableForm:e=>{hh(e)&&(f.state.next({disabled:e}),md(r,(t,n)=>{const i=ch(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)=>dh(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={})=>{ch(r,e)&&(ah(t.defaultValue)?S(e,sh(ch(s,e))):(S(e,t.defaultValue),fh(s,e,sh(t.defaultValue))),t.keepTouched||Qh(i.touchedFields,e),t.keepDirty||(Qh(i.dirtyFields,e),i.isDirty=t.defaultValue?w(e,sh(ch(s,e))):w()),t.keepError||(Qh(i.errors,e),h.isValid&&m()),f.state.next({...i}))},clearErrors:e=>{e&&Gh(e).forEach(e=>Qh(i.errors,e)),f.state.next({errors:e?i.errors:{}})},unregister:N,setError:M,setFocus:(e,t={})=>{const n=ch(r,e),i=n&&n._f;if(i){const e=i.refs?i.refs[0]:i.ref;e.focus&&setTimeout(()=>{e.focus(),t.shouldSelect&&dh(e.select)&&e.select()})}},getFieldState:R};return{...V,formControl:V}}const Ed=({sx:e,...t})=>w(he,{variant:"body1",sx:{color:"var(--color-white)",cursor:"default",...e},...t}),Ad=ee(ue)({padding:0,marginRight:"5px",marginLeft:"10px","& .MuiSvgIcon-root":{color:"var(--color-orange-medium)"}});function Td({label:t,name:n,...i}){const r=e.useId(),{control:s,setValue:o,watch:a}=Bh(),l=a(n),u=`${r}-${n}-${String(l)}`;return w(Fh,{control:s,name:n,render:({field:e})=>{const{value:n,name:r}=e;return t?w(ce,{color:"white",control:w(Ad,{...i,checked:n,onChange:(e,t)=>{o(r,t,{shouldValidate:!0})}}),label:w(Ed,{children:t})}):w(Ad,{...i,checked:n,onChange:(e,t)=>{o(r,t,{shouldValidate:!0})}})}},u)}var Sd=function(t){var n=t.as,i=t.errors,r=t.name,s=t.message,o=t.render,a=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}(t,["as","errors","name","message","render"]),l=Bh(),u=ch(i||l.formState.errors,r);if(!u)return null;var c=u.message,h=u.types,d=Object.assign({},a,{children:c||s});return e.isValidElement(n)?e.cloneElement(n,d):o?o({message:c||s,messages:h}):e.createElement(n||e.Fragment,d)};function kd({name:e}){const{palette:t}=Z(),{formState:{errors:n}}=Bh();return w(Sd,{errors:n,name:e,render:({message:e})=>w(Ed,{variant:"body2",style:{color:t.error.main},children:e})})}function Od({form:e,sx:t={},onSubmit:n,children:i}){const{handleSubmit:r}=e;return w(Uh,{...e,children:w(P,{component:"form",sx:{display:"grid",gap:"15px",...t},onSubmit:r(n),children:i})})}const Pd=()=>Bh(),Cd=e=>w(q,{size:"small",...e});function Rd({name:t,...n}){const{control:i}=Bh(),r=e.useId();return w(Fh,{control:i,name:t,render:({field:e})=>E(P,{sx:({spacing:e})=>({display:"grid",width:"100%",gap:e(1)}),children:[w(de,{...n,...e,id:r,slots:{field:Cd}}),w(kd,{name:t})]})})}const Md=({text:e="Нет данных"})=>w(O,{variant:"body2",sx:{textAlign:"center",color:"var(--gray-light-color)"},children:e});function Ld({items:t,columnsCount:n=1,getContent:i,title:r,getKey:s,onClick:o,sx:a,isShowNoData:l=!0}){const u=0===t.length;return E(P,{sx:{display:"grid",gridTemplateColumns:"1fr",gap:"15px",...a?.root},children:[r?w(O,{variant:"h6",noWrap:!0,sx:{textAlign:"center",fontWeight:700,...a?.title},children:r}):null,u?w(e.Fragment,{children:l?w(Md,{}):null}):w(W,{sx:{display:"grid",gridTemplateColumns:`repeat(${n}, 1fr)`,gap:"15px",...a?.list},disablePadding:!0,children:t.map((e,t)=>w(H,{onClick:()=>o?.(e,t),sx:{...a?.item},disablePadding:!0,children:i(e,t)},s(e,t)))})]})}const Nd="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 Dd(e){return"nodeType"in e}function Id(e){var t,n;return e?zd(e)?e:Dd(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function Fd(e){const{Document:t}=Id(e);return e instanceof t}function jd(e){return!zd(e)&&e instanceof Id(e).HTMLElement}function Bd(e){return e instanceof Id(e).SVGElement}function Ud(e){return e?zd(e)?e.document:Dd(e)?Fd(e)?e:jd(e)||Bd(e)?e.ownerDocument:document:document:document}const Vd=Nd?u:s;function Gd(e){const t=i(e);return Vd(()=>{t.current=e}),r(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 $d(e,t){void 0===t&&(t=[e]);const n=i(e);return Vd(()=>{n.current!==e&&(n.current=e)},t),n}function Zd(e,t){const n=i();return l(()=>{const t=e(n.current);return n.current=t,t},[...t])}function qd(e){const t=Gd(e),n=i(null),s=r(e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e},[]);return[n,s]}function Wd(e){const t=i();return s(()=>{t.current=e},[e]),t.current}let Hd={};function Kd(e,t){return l(()=>{if(t)return t;const n=null==Hd[e]?0:Hd[e]+1;return Hd[e]=n,e+"-"+n},[e,t])}function Yd(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 Xd=Yd(1),Qd=Yd(-1);function Jd(e){if(!e)return!1;const{KeyboardEvent:t}=Id(e.target);return t&&e instanceof t}function ef(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=Id(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 tf=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[tf.Translate.toString(e),tf.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:i}=e;return t+" "+n+"ms "+i}}}),nf="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function rf(e){return e.matches(nf)?e:e.querySelector(nf)}const sf={display:"none"};function of(e){let{id:n,value:i}=e;return t.createElement("div",{id:n,style:sf},i)}function af(e){let{id:n,announcement:i,ariaLiveType:r="assertive"}=e;return t.createElement("div",{id:n,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":r,"aria-atomic":!0},i)}const lf=m(null);const uf={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 "},cf={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 hf(e){let{announcements:n=cf,container:i,hiddenTextDescribedById:o,screenReaderInstructions:a=uf}=e;const{announce:u,announcement:c}=function(){const[e,t]=p("");return{announce:r(e=>{null!=e&&t(e)},[]),announcement:e}}(),d=Kd("DndLiveRegion"),[f,m]=p(!1);if(s(()=>{m(!0)},[]),function(e){const t=h(lf);s(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}(l(()=>({onDragStart(e){let{active:t}=e;u(n.onDragStart({active:t}))},onDragMove(e){let{active:t,over:i}=e;n.onDragMove&&u(n.onDragMove({active:t,over:i}))},onDragOver(e){let{active:t,over:i}=e;u(n.onDragOver({active:t,over:i}))},onDragEnd(e){let{active:t,over:i}=e;u(n.onDragEnd({active:t,over:i}))},onDragCancel(e){let{active:t,over:i}=e;u(n.onDragCancel({active:t,over:i}))}}),[u,n])),!f)return null;const _=t.createElement(t.Fragment,null,t.createElement(of,{id:o,value:a.draggable}),t.createElement(af,{id:d,announcement:c}));return i?b(_,i):_}var df;function ff(){}!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"}(df||(df={}));const pf=Object.freeze({x:0,y:0});function mf(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function _f(e,t){let{data:{value:n}}=e,{data:{value:i}}=t;return n-i}function gf(e,t){let{data:{value:n}}=e,{data:{value:i}}=t;return i-n}function yf(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 vf=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:i}=e;const r=yf(t,t.left,t.top),s=[];for(const e of i){const{id:t}=e,i=n.get(t);if(i){const n=mf(yf(i),r);s.push({id:t,data:{droppableContainer:e,value:n}})}}return s.sort(_f)};function bf(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 xf=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=bf(s,t);n>0&&r.push({id:i,data:{droppableContainer:e,value:n}})}}return r.sort(gf)};function wf(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:pf}function Ef(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 Af=Ef(1);const Tf={ignoreTransform:!1};function Sf(e,t){void 0===t&&(t=Tf);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:i}=Id(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 kf(e){return Sf(e,{ignoreTransform:!0})}function Of(e,t){const n=[];return e?function i(r){if(null!=t&&n.length>=t)return n;if(!r)return n;if(Fd(r)&&null!=r.scrollingElement&&!n.includes(r.scrollingElement))return n.push(r.scrollingElement),n;if(!jd(r)||Bd(r))return n;if(n.includes(r))return n;const s=Id(e).getComputedStyle(r);return r!==e&&function(e,t){void 0===t&&(t=Id(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=Id(e).getComputedStyle(e)),"fixed"===t.position}(r,s)?n:i(r.parentNode)}(e):n}function Pf(e){const[t]=Of(e,1);return null!=t?t:null}function Cf(e){return Nd&&e?zd(e)?e:Dd(e)?Fd(e)||e===Ud(e).scrollingElement?window:jd(e)?e:null:null:null}function Rf(e){return zd(e)?e.scrollX:e.scrollLeft}function Mf(e){return zd(e)?e.scrollY:e.scrollTop}function Lf(e){return{x:Rf(e),y:Mf(e)}}var Nf;function zf(e){return!(!Nd||!e)&&e===document.scrollingElement}function Df(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"}(Nf||(Nf={}));const If={x:.2,y:.2};function Ff(e,t,n,i,r){let{top:s,left:o,right:a,bottom:l}=n;void 0===i&&(i=10),void 0===r&&(r=If);const{isTop:u,isBottom:c,isLeft:h,isRight:d}=Df(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=Nf.Backward,p.y=i*Math.abs((t.top+m-s)/m)):!c&&l>=t.bottom-m&&(f.y=Nf.Forward,p.y=i*Math.abs((t.bottom-m-l)/m)),!d&&a>=t.right-_?(f.x=Nf.Forward,p.x=i*Math.abs((t.right-_-a)/_)):!h&&o<=t.left+_&&(f.x=Nf.Backward,p.x=i*Math.abs((t.left+_-o)/_)),{direction:f,speed:p}}function jf(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 Bf(e){return e.reduce((e,t)=>Xd(e,Lf(t)),pf)}const Uf=[["x",["left","right"],function(e){return e.reduce((e,t)=>e+Rf(t),0)}],["y",["top","bottom"],function(e){return e.reduce((e,t)=>e+Mf(t),0)}]];class Vf{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=Of(t),i=Bf(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,r]of Uf)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 Gf{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 $f(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 Zf,qf;function Wf(e){e.preventDefault()}function Hf(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"}(Zf||(Zf={})),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"}(qf||(qf={}));const Kf={start:[qf.Space,qf.Enter],cancel:[qf.Esc],end:[qf.Space,qf.Enter,qf.Tab]},Yf=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case qf.Right:return{...n,x:n.x+25};case qf.Left:return{...n,x:n.x-25};case qf.Down:return{...n,y:n.y+25};case qf.Up:return{...n,y:n.y-25}}};class Xf{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 Gf(Ud(t)),this.windowListeners=new Gf(Id(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Zf.Resize,this.handleCancel),this.windowListeners.add(Zf.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Zf.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&function(e,t){if(void 0===t&&(t=Sf),!e)return;const{top:n,left:i,bottom:r,right:s}=t(e);Pf(e)&&(r<=0||s<=0||n>=window.innerHeight||i>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(n),t(pf)}handleKeyDown(e){if(Jd(e)){const{active:t,context:n,options:i}=this.props,{keyboardCodes:r=Kf,coordinateGetter:s=Yf,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}:pf;this.referenceCoordinates||(this.referenceCoordinates=u);const c=s(e,{active:t,context:n.current,currentCoordinates:u});if(c){const t=Qd(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}=Df(n),f=jf(n),p={x:Math.min(r===qf.Right?f.right-f.width/2:f.right,Math.max(r===qf.Right?f.left:f.left+f.width/2,c.x)),y:Math.min(r===qf.Down?f.bottom-f.height/2:f.bottom,Math.max(r===qf.Down?f.top:f.top+f.height/2,c.y))},m=r===qf.Right&&!a||r===qf.Left&&!l,_=r===qf.Down&&!u||r===qf.Up&&!s;if(m&&p.x!==c.x){const e=n.scrollLeft+t.x,s=r===qf.Right&&e<=h.x||r===qf.Left&&e>=d.x;if(s&&!t.y)return void n.scrollTo({left:e,behavior:o});i.x=s?n.scrollLeft-e:r===qf.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===qf.Down&&e<=h.y||r===qf.Up&&e>=d.y;if(s&&!t.x)return void n.scrollTo({top:e,behavior:o});i.y=s?n.scrollTop-e:r===qf.Down?n.scrollTop-h.y:n.scrollTop-d.y,i.y&&n.scrollBy({top:-i.y,behavior:o});break}}this.handleMove(e,Xd(Qd(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 Qf(e){return Boolean(e&&"distance"in e)}function Jf(e){return Boolean(e&&"delay"in e)}Xf.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:i=Kf,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 ep{constructor(e,t,n){var i;void 0===n&&(n=function(e){const{EventTarget:t}=Id(e);return e instanceof t?e:Ud(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=Ud(s),this.documentListeners=new Gf(this.document),this.listeners=new Gf(n),this.windowListeners=new Gf(Id(s)),this.initialCoordinates=null!=(i=ef(r))?i:pf,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(Zf.Resize,this.handleCancel),this.windowListeners.add(Zf.DragStart,Wf),this.windowListeners.add(Zf.VisibilityChange,this.handleCancel),this.windowListeners.add(Zf.ContextMenu,Wf),this.documentListeners.add(Zf.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Jf(t))return this.timeoutId=setTimeout(this.handleStart,t.delay),void this.handlePending(t);if(Qf(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(Zf.Click,Hf,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Zf.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=ef(e))?t:pf,l=Qd(i,a);if(!n&&o){if(Qf(o)){if(null!=o.tolerance&&$f(l,o.tolerance))return this.handleCancel();if($f(l,o.distance))return this.handleStart()}return Jf(o)&&$f(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===qf.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const tp={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class np extends ep{constructor(e){const{event:t}=e,n=Ud(t.target);super(e,tp,n)}}np.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 ip={move:{name:"mousemove"},end:{name:"mouseup"}};var rp;!function(e){e[e.RightClick=2]="RightClick"}(rp||(rp={}));(class extends ep{constructor(e){super(e,ip,Ud(e.event.target))}}).activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;return n.button!==rp.RightClick&&(null==i||i({event:n}),!0)}}];const sp={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};var op,ap;function lp(e){let{acceleration:t,activator:n=op.Pointer,canScroll:o,draggingRect:a,enabled:u,interval:c=5,order:h=ap.TreeOrder,pointerCoordinates:d,scrollableAncestors:f,scrollableAncestorRects:p,delta:m,threshold:_}=e;const g=function(e){let{delta:t,disabled:n}=e;const i=Wd(t);return Zd(e=>{if(n||!i||!e)return up;const r={x:Math.sign(t.x-i.x),y:Math.sign(t.y-i.y)};return{x:{[Nf.Backward]:e.x[Nf.Backward]||-1===r.x,[Nf.Forward]:e.x[Nf.Forward]||1===r.x},y:{[Nf.Backward]:e.y[Nf.Backward]||-1===r.y,[Nf.Forward]:e.y[Nf.Forward]||1===r.y}}},[n,t,i])}({delta:m,disabled:!u}),[y,v]=function(){const e=i(null);return[r((t,n)=>{e.current=setInterval(t,n)},[]),r(()=>{null!==e.current&&(clearInterval(e.current),e.current=null)},[])]}(),b=i({x:0,y:0}),x=i({x:0,y:0}),w=l(()=>{switch(n){case op.Pointer:return d?{top:d.y,bottom:d.y,left:d.x,right:d.x}:null;case op.DraggableRect:return a}},[n,a,d]),E=i(null),A=r(()=>{const e=E.current;if(!e)return;const t=b.current.x*x.current.x,n=b.current.y*x.current.y;e.scrollBy(t,n)},[]),T=l(()=>h===ap.TreeOrder?[...f].reverse():f,[h,f]);s(()=>{if(u&&f.length&&w){for(const e of T){if(!1===(null==o?void 0:o(e)))continue;const n=f.indexOf(e),i=p[n];if(!i)continue;const{direction:r,speed:s}=Ff(e,i,w,t,_);for(const e of["x","y"])g[e][r[e]]||(s[e]=0,r[e]=0);if(s.x>0||s.y>0)return v(),E.current=e,y(A,c),b.current=s,void(x.current=r)}b.current={x:0,y:0},x.current={x:0,y:0},v()}else v()},[t,A,o,v,u,c,JSON.stringify(w),JSON.stringify(g),y,f,T,p,JSON.stringify(_)])}(class extends ep{constructor(e){super(e,sp)}static setup(){return window.addEventListener(sp.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(sp.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"}(op||(op={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(ap||(ap={}));const up={x:{[Nf.Backward]:!1,[Nf.Forward]:!1},y:{[Nf.Backward]:!1,[Nf.Forward]:!1}};var cp,hp;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(cp||(cp={})),function(e){e.Optimized="optimized"}(hp||(hp={}));const dp=new Map;function fp(e,t){return Zd(n=>e?n||("function"==typeof t?t(e):e):null,[t,e])}function pp(e){let{callback:t,disabled:n}=e;const i=Gd(t),r=l(()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(i)},[n]);return s(()=>()=>null==r?void 0:r.disconnect(),[r]),r}function mp(e){return new Vf(Sf(e),e)}function _p(e,t,n){void 0===t&&(t=mp);const[i,r]=p(null);function o(){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 a=function(e){let{callback:t,disabled:n}=e;const i=Gd(t),r=l(()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(i)},[i,n]);return s(()=>()=>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)){o();break}}}}),u=pp({callback:o});return Vd(()=>{o(),e?(null==u||u.observe(e),null==a||a.observe(document.body,{childList:!0,subtree:!0})):(null==u||u.disconnect(),null==a||a.disconnect())},[e]),i}const gp=[];function yp(e,t){void 0===t&&(t=[]);const n=i(null);return s(()=>{n.current=null},t),s(()=>{const t=e!==pf;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?Qd(e,n.current):pf}function vp(e){return l(()=>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 bp=[];function xp(e){let{measure:t}=e;const[n,i]=p(null),s=r(e=>{for(const{target:n}of e)if(jd(n)){i(e=>{const i=t(n);return e?{...e,width:i.width,height:i.height}:i});break}},[t]),o=pp({callback:s}),a=r(e=>{const n=function(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return jd(t)?t:e}(e);null==o||o.disconnect(),n&&(null==o||o.observe(n)),i(n?t(n):null)},[t,o]),[u,c]=qd(a);return l(()=>({nodeRef:u,rect:n,setRef:c}),[n,u,c])}const wp=[{sensor:np,options:{}},{sensor:Xf,options:{}}],Ep={current:{}},Ap={draggable:{measure:kf},droppable:{measure:kf,strategy:cp.WhileDragging,frequency:hp.Optimized},dragOverlay:{measure:Sf}};class Tp 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 Sp={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Tp,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:ff},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Ap,measureDroppableContainers:ff,windowRect:null,measuringScheduled:!1},kp=m({activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:ff,draggableNodes:new Map,over:null,measureDroppableContainers:ff}),Op=m(Sp);function Pp(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Tp}}}function Cp(e,t){switch(t.type){case df.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case df.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 df.DragEnd:case df.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case df.RegisterDroppable:{const{element:n}=t,{id:i}=n,r=new Tp(e.droppable.containers);return r.set(i,n),{...e,droppable:{...e.droppable,containers:r}}}case df.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 Tp(e.droppable.containers);return o.set(n,{...s,disabled:r}),{...e,droppable:{...e.droppable,containers:o}}}case df.UnregisterDroppable:{const{id:n,key:i}=t,r=e.droppable.containers.get(n);if(!r||i!==r.key)return e;const s=new Tp(e.droppable.containers);return s.delete(n),{...e,droppable:{...e.droppable,containers:s}}}default:return e}}function Rp(e){let{disabled:t}=e;const{active:n,activatorEvent:i,draggableNodes:r}=h(kp),o=Wd(i),a=Wd(null==n?void 0:n.id);return s(()=>{if(!t&&!i&&o&&null!=a){if(!Jd(o))return;if(document.activeElement===o.target)return;const e=r.get(a);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=rf(e);if(t){t.focus();break}}})}},[i,t,r,a,o]),null}const Mp=m({...pf,scaleX:1,scaleY:1});var Lp;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(Lp||(Lp={}));const Np=f(function(e){var n,o,a,u;let{id:c,accessibility:h,autoScroll:d=!0,children:f,sensors:m=wp,collisionDetection:g=xf,measuring:y,modifiers:v,...b}=e;const w=_(Cp,void 0,Pp),[E,A]=w,[T,S]=function(){const[e]=p(()=>new Set),t=r(t=>(e.add(t),()=>e.delete(t)),[e]);return[r(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]}(),[k,O]=p(Lp.Uninitialized),P=k===Lp.Initialized,{draggable:{active:C,nodes:R,translate:M},droppable:{containers:L}}=E,N=null!=C?R.get(C):null,z=i({initial:null,translated:null}),D=l(()=>{var e;return null!=C?{id:C,data:null!=(e=null==N?void 0:N.data)?e:Ep,rect:z}:null},[C,N]),I=i(null),[F,j]=p(null),[B,U]=p(null),V=$d(b,Object.values(b)),G=Kd("DndDescribedBy",c),$=l(()=>L.getEnabled(),[L]),Z=l(()=>({draggable:{...Ap.draggable,...null==q?void 0:q.draggable},droppable:{...Ap.droppable,...null==q?void 0:q.droppable},dragOverlay:{...Ap.dragOverlay,...null==q?void 0:q.dragOverlay}}),[null==(q=y)?void 0:q.draggable,null==q?void 0:q.droppable,null==q?void 0:q.dragOverlay]);var q;const{droppableRects:W,measureDroppableContainers:H,measuringScheduled:K}=function(e,t){let{dragging:n,dependencies:o,config:a}=t;const[l,u]=p(null),{frequency:c,measure:h,strategy:d}=a,f=i(e),m=function(){switch(d){case cp.Always:return!1;case cp.BeforeDragging:return n;default:return!n}}(),_=$d(m),g=r(function(e){void 0===e&&(e=[]),_.current||u(t=>null===t?e:t.concat(e.filter(e=>!t.includes(e))))},[_]),y=i(null),v=Zd(t=>{if(m&&!n)return dp;if(!t||t===dp||f.current!==e||null!=l){const t=new Map;for(let n of e){if(!n)continue;if(l&&l.length>0&&!l.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,i=e?new Vf(h(e),e):null;n.rect.current=i,i&&t.set(n.id,i)}return t}return t},[e,l,n,m,h]);return s(()=>{f.current=e},[e]),s(()=>{m||g()},[n,m]),s(()=>{l&&l.length>0&&u(null)},[JSON.stringify(l)]),s(()=>{m||"number"!=typeof c||null!==y.current||(y.current=setTimeout(()=>{g(),y.current=null},c))},[c,m,g,...o]),{droppableRects:v,measureDroppableContainers:g,measuringScheduled:null!=l}}($,{dragging:P,dependencies:[M.x,M.y],config:Z.droppable}),Y=function(e,t){const n=null!=t?e.get(t):void 0,i=n?n.node.current:null;return Zd(e=>{var n;return null==t?null:null!=(n=null!=i?i:e)?n:null},[i,t])}(R,C),X=l(()=>B?ef(B):null,[B]),Q=function(){const e=!1===(null==F?void 0:F.autoScrollEnabled),t="object"==typeof d?!1===d.enabled:!1===d,n=P&&!e&&!t;if("object"==typeof d)return{...d,enabled:n};return{enabled:n}}(),J=function(e,t){return fp(e,t)}(Y,Z.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:r,config:s=!0}=e;const o=i(!1),{x:a,y:l}="boolean"==typeof s?{x:s,y:s}:s;Vd(()=>{if(!a&&!l||!t)return void(o.current=!1);if(o.current||!r)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const i=wf(n(e),r);if(a||(i.x=0),l||(i.y=0),o.current=!0,Math.abs(i.x)>0||Math.abs(i.y)>0){const t=Pf(e);t&&t.scrollBy({top:i.y,left:i.x})}},[t,a,l,r,n])}({activeNode:null!=C?R.get(C):null,config:Q.layoutShiftCompensation,initialRect:J,measure:Z.draggable.measure});const ee=_p(Y,Z.draggable.measure,J),te=_p(Y?Y.parentElement:null),ne=i({activatorEvent:null,active:null,activeNode:Y,collisionRect:null,collisions:null,droppableRects:W,draggableNodes:R,draggingNode:null,draggingNodeRect:null,droppableContainers:L,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ie=L.getNodeFor(null==(n=ne.current.over)?void 0:n.id),re=xp({measure:Z.dragOverlay.measure}),se=null!=(o=re.nodeRef.current)?o:Y,oe=P?null!=(a=re.rect)?a:ee:null,ae=Boolean(re.nodeRef.current&&re.rect),le=wf(ue=ae?null:ee,fp(ue));var ue;const ce=vp(se?Id(se):null),he=function(e){const t=i(e),n=Zd(n=>e?n&&n!==gp&&e&&t.current&&e.parentNode===t.current.parentNode?n:Of(e):gp,[e]);return s(()=>{t.current=e},[e]),n}(P?null!=ie?ie:Y:null),de=function(e,t){void 0===t&&(t=Sf);const[n]=e,i=vp(n?Id(n):null),[r,s]=p(bp);function o(){s(()=>e.length?e.map(e=>zf(e)?i:new Vf(t(e),e)):bp)}const a=pp({callback:o});return Vd(()=>{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}(v,{transform:{x:M.x-le.x,y:M.y-le.y,scaleX:1,scaleY:1},activatorEvent:B,active:D,activeNodeRect:ee,containerNodeRect:te,draggingNodeRect:oe,over:ne.current.over,overlayNodeRect:re.rect,scrollableAncestors:he,scrollableAncestorRects:de,windowRect:ce}),pe=X?Xd(X,M):null,me=function(e){const[t,n]=p(null),o=i(e),a=r(e=>{const t=Cf(e.target);t&&n(e=>e?(e.set(t,Lf(t)),new Map(e)):null)},[]);return s(()=>{const t=o.current;if(e!==t){i(t);const r=e.map(e=>{const t=Cf(e);return t?(t.addEventListener("scroll",a,{passive:!0}),[t,Lf(t)]):null}).filter(e=>null!=e);n(r.length?new Map(r):null),o.current=e}return()=>{i(e),i(t)};function i(e){e.forEach(e=>{const t=Cf(e);null==t||t.removeEventListener("scroll",a)})}},[a,e]),l(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>Xd(e,t),pf):Bf(e):pf,[e,t])}(he),_e=yp(me),ge=yp(me,[ee]),ye=Xd(fe,_e),ve=oe?Af(oe,fe):null,be=D&&ve?g({active:D,collisionRect:ve,droppableRects:W,droppableContainers:$,pointerCoordinates:pe}):null,xe=function(e,t){if(!e||0===e.length)return null;const[n]=e;return n[t]}(be,"id"),[we,Ee]=p(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:Xd(fe,ge),null!=(u=null==we?void 0:we.rect)?u:null,ee),Te=i(null),Se=r((e,t)=>{let{sensor:n,options:i}=t;if(null==I.current)return;const r=R.get(I.current);if(!r)return;const s=e.nativeEvent,o=new n({active:I.current,activeNode:r,event:s,options:i,context:ne,onAbort(e){if(!R.get(e))return;const{onDragAbort:t}=V.current,n={id:e};null==t||t(n),T({type:"onDragAbort",event:n})},onPending(e,t,n,i){if(!R.get(e))return;const{onDragPending:r}=V.current,s={id:e,constraint:t,initialCoordinates:n,offset:i};null==r||r(s),T({type:"onDragPending",event:s})},onStart(e){const t=I.current;if(null==t)return;const n=R.get(t);if(!n)return;const{onDragStart:i}=V.current,r={activatorEvent:s,active:{id:t,data:n.data,rect:z}};x(()=>{null==i||i(r),O(Lp.Initializing),A({type:df.DragStart,initialCoordinates:e,active:t}),T({type:"onDragStart",event:r}),j(Te.current),U(s)})},onMove(e){A({type:df.DragMove,coordinates:e})},onEnd:a(df.DragEnd),onCancel:a(df.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}=V.current;if(o={activatorEvent:s,active:t,collisions:n,delta:r,over:i},e===df.DragEnd&&"function"==typeof a){await Promise.resolve(a(o))&&(e=df.DragCancel)}}I.current=null,x(()=>{A({type:e}),O(Lp.Uninitialized),Ee(null),j(null),U(null),Te.current=null;const t=e===df.DragEnd?"onDragEnd":"onDragCancel";if(o){const e=V.current[t];null==e||e(o),T({type:t,event:o})}})}}Te.current=o},[R]),ke=r((e,t)=>(n,i)=>{const r=n.nativeEvent,s=R.get(i);if(null!==I.current||!s||r.dndKit||r.defaultPrevented)return;const o={active:s};!0===e(n,t.options,o)&&(r.dndKit={capturedBy:t.sensor},I.current=i,Se(n,t))},[R,Se]),Oe=function(e,t){return l(()=>e.reduce((e,n)=>{const{sensor:i}=n;return[...e,...i.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}))]},[]),[e,t])}(m,ke);!function(e){s(()=>{if(!Nd)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}))}(m),Vd(()=>{ee&&k===Lp.Initializing&&O(Lp.Initialized)},[ee,k]),s(()=>{const{onDragMove:e}=V.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};x(()=>{null==e||e(s),T({type:"onDragMove",event:s})})},[ye.x,ye.y]),s(()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:i,scrollAdjustedTranslate:r}=ne.current;if(!e||null==I.current||!t||!r)return;const{onDragOver:s}=V.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};x(()=>{Ee(a),null==s||s(l),T({type:"onDragOver",event:l})})},[xe]),Vd(()=>{ne.current={activatorEvent:B,active:D,activeNode:Y,collisionRect:ve,collisions:be,droppableRects:W,draggableNodes:R,draggingNode:se,draggingNodeRect:oe,droppableContainers:L,over:we,scrollableAncestors:he,scrollAdjustedTranslate:ye},z.current={initial:oe,translated:ve}},[D,Y,be,ve,R,se,oe,W,L,we,he,ye]),lp({...Q,delta:M,draggingRect:ve,pointerCoordinates:pe,scrollableAncestors:he,scrollableAncestorRects:de});const Pe=l(()=>({active:D,activeNode:Y,activeNodeRect:ee,activatorEvent:B,collisions:be,containerNodeRect:te,dragOverlay:re,draggableNodes:R,droppableContainers:L,droppableRects:W,over:we,measureDroppableContainers:H,scrollableAncestors:he,scrollableAncestorRects:de,measuringConfiguration:Z,measuringScheduled:K,windowRect:ce}),[D,Y,ee,B,be,te,re,R,L,W,we,H,he,de,Z,K,ce]),Ce=l(()=>({activatorEvent:B,activators:Oe,active:D,activeNodeRect:ee,ariaDescribedById:{draggable:G},dispatch:A,draggableNodes:R,over:we,measureDroppableContainers:H}),[B,Oe,D,ee,A,G,R,we,H]);return t.createElement(lf.Provider,{value:S},t.createElement(kp.Provider,{value:Ce},t.createElement(Op.Provider,{value:Pe},t.createElement(Mp.Provider,{value:Ae},f)),t.createElement(Rp,{disabled:!1===(null==h?void 0:h.restoreFocus)})),t.createElement(hf,{...h,hiddenTextDescribedById:G}))}),zp=m(null),Dp="button";function Ip(e){let{id:t,data:n,disabled:i=!1,attributes:r}=e;const s=Kd("Draggable"),{activators:o,activatorEvent:a,active:u,activeNodeRect:c,ariaDescribedById:d,draggableNodes:f,over:p}=h(kp),{role:m=Dp,roleDescription:_="draggable",tabIndex:g=0}=null!=r?r:{},y=(null==u?void 0:u.id)===t,v=h(y?Mp:zp),[b,x]=qd(),[w,E]=qd(),A=function(e,t){return l(()=>e.reduce((e,n)=>{let{eventName:i,handler:r}=n;return e[i]=e=>{r(e,t)},e},{}),[e,t])}(o,t),T=$d(n);Vd(()=>(f.set(t,{id:t,key:s,node:b,activatorNode:w,data:T}),()=>{const e=f.get(t);e&&e.key===s&&f.delete(t)}),[f,t]);return{active:u,activatorEvent:a,activeNodeRect:c,attributes:l(()=>({role:m,tabIndex:g,"aria-disabled":i,"aria-pressed":!(!y||m!==Dp)||void 0,"aria-roledescription":_,"aria-describedby":d.draggable}),[i,m,g,y,_,d.draggable]),isDragging:y,listeners:i?void 0:A,node:b,over:p,setNodeRef:x,setActivatorNodeRef:E,transform:v}}const Fp={timeout:25};function jp(e,t,n){const i=e.slice();return i.splice(n<0?i.length+n:n,0,i.splice(t,1)[0]),i}function Bp(e,t){return e.reduce((e,n,i)=>{const r=t.get(n);return r&&(e[i]=r),e},Array(e.length))}function Up(e){return null!==e&&e>=0}const Vp=e=>{let{rects:t,activeIndex:n,overIndex:i,index:r}=e;const s=jp(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},Gp={scaleX:1,scaleY:1},$p=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,...Gp}: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,...Gp}:r<n&&r>=o?{x:0,y:a.height+l,...Gp}:{x:0,y:0,...Gp}};const Zp="Sortable",qp=t.createContext({activeIndex:-1,containerId:Zp,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Vp,disabled:{draggable:!1,droppable:!1}});function Wp(e){let{children:n,id:r,items:o,strategy:a=Vp,disabled:u=!1}=e;const{active:c,dragOverlay:d,droppableRects:f,over:p,measureDroppableContainers:m}=h(Op),_=Kd(Zp,r),g=Boolean(null!==d.rect),y=l(()=>o.map(e=>"object"==typeof e&&"id"in e?e.id:e),[o]),v=null!=c,b=c?y.indexOf(c.id):-1,x=p?y.indexOf(p.id):-1,w=i(y),E=!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}(y,w.current),A=-1!==x&&-1===b||E,T=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(u);Vd(()=>{E&&v&&m(y)},[E,y,v,m]),s(()=>{w.current=y},[y]);const S=l(()=>({activeIndex:b,containerId:_,disabled:T,disableTransforms:A,items:y,overIndex:x,useDragOverlay:g,sortedRects:Bp(y,f),strategy:a}),[b,_,T.draggable,T.droppable,A,y,x,f,g,a]);return t.createElement(qp.Provider,{value:S},n)}const Hp=e=>{let{id:t,items:n,activeIndex:i,overIndex:r}=e;return jp(n,i,r).indexOf(t)},Kp=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))},Yp={duration:200,easing:"ease"},Xp="transform",Qp=tf.Transition.toString({property:Xp,duration:0,easing:"linear"}),Jp={roleDescription:"sortable"};function em(e){let{animateLayoutChanges:t=Kp,attributes:n,disabled:o,data:a,getNewIndex:u=Hp,id:c,strategy:d,resizeObserverConfig:f,transition:m=Yp}=e;const{items:_,containerId:g,activeIndex:y,disabled:v,disableTransforms:b,sortedRects:x,overIndex:w,useDragOverlay:E,strategy:A}=h(qp),T=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}}(o,v),S=_.indexOf(c),k=l(()=>({sortable:{containerId:g,index:S,items:_},...a}),[g,a,S,_]),O=l(()=>_.slice(_.indexOf(c)),[_,c]),{rect:P,node:C,isOver:R,setNodeRef:M}=function(e){let{data:t,disabled:n=!1,id:o,resizeObserverConfig:a}=e;const l=Kd("Droppable"),{active:u,dispatch:c,over:d,measureDroppableContainers:f}=h(kp),p=i({disabled:n}),m=i(!1),_=i(null),g=i(null),{disabled:y,updateMeasurementsFor:v,timeout:b}={...Fp,...a},x=$d(null!=v?v:o),w=pp({callback:r(()=>{m.current?(null!=g.current&&clearTimeout(g.current),g.current=setTimeout(()=>{f(Array.isArray(x.current)?x.current:[x.current]),g.current=null},b)):m.current=!0},[b]),disabled:y||!u}),E=r((e,t)=>{w&&(t&&(w.unobserve(t),m.current=!1),e&&w.observe(e))},[w]),[A,T]=qd(E),S=$d(t);return s(()=>{w&&A.current&&(w.disconnect(),m.current=!1,w.observe(A.current))},[A,w]),s(()=>(c({type:df.RegisterDroppable,element:{id:o,key:l,disabled:n,node:A,rect:_,data:S}}),()=>c({type:df.UnregisterDroppable,key:l,id:o})),[o]),s(()=>{n!==p.current.disabled&&(c({type:df.SetDroppableDisabled,id:o,key:l,disabled:n}),p.current.disabled=n)},[o,l,n,c]),{active:u,rect:_,isOver:(null==d?void 0:d.id)===o,node:A,over:d,setNodeRef:T}}({id:c,data:k,disabled:T.droppable,resizeObserverConfig:{updateMeasurementsFor:O,...f}}),{active:L,activatorEvent:N,activeNodeRect:z,attributes:D,setNodeRef:I,listeners:F,isDragging:j,over:B,setActivatorNodeRef:U,transform:V}=Ip({id:c,data:k,attributes:{...Jp,...n},disabled:T.draggable}),G=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return l(()=>e=>{t.forEach(t=>t(e))},t)}(M,I),$=Boolean(L),Z=$&&!b&&Up(y)&&Up(w),q=!E&&j,W=q&&Z?V:null,H=Z?null!=W?W:(null!=d?d:A)({rects:x,activeNodeRect:z,activeIndex:y,overIndex:w,index:S}):null,K=Up(y)&&Up(w)?u({id:c,items:_,activeIndex:y,overIndex:w}):S,Y=null==L?void 0:L.id,X=i({activeId:Y,items:_,newIndex:K,containerId:g}),Q=_!==X.current.items,J=t({active:L,containerId:g,isDragging:j,isSorting:$,id:c,index:S,items:_,newIndex:X.current.newIndex,previousItems:X.current.items,previousContainerId:X.current.containerId,transition:m,wasDragging:null!=X.current.activeId}),ee=function(e){let{disabled:t,index:n,node:r,rect:o}=e;const[a,l]=p(null),u=i(n);return Vd(()=>{if(!t&&n!==u.current&&r.current){const e=o.current;if(e){const t=Sf(r.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)&&l(n)}}n!==u.current&&(u.current=n)},[t,n,r,o]),s(()=>{a&&l(null)},[a]),a}({disabled:!J,index:S,node:C,rect:P});return s(()=>{$&&X.current.newIndex!==K&&(X.current.newIndex=K),g!==X.current.containerId&&(X.current.containerId=g),_!==X.current.items&&(X.current.items=_)},[$,K,g,_]),s(()=>{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:L,activeIndex:y,attributes:D,data:k,rect:P,index:S,newIndex:K,items:_,isOver:R,isSorting:$,isDragging:j,listeners:F,node:C,overIndex:w,over:B,setNodeRef:G,setActivatorNodeRef:U,setDroppableNodeRef:M,setDraggableNodeRef:I,transform:null!=ee?ee:H,transition:function(){if(ee||Q&&X.current.newIndex===S)return Qp;if(q&&!Jd(N)||!m)return;if($||J)return tf.Transition.toString({...m,property:Xp});return}()}}qf.Down,qf.Right,qf.Up,qf.Left;const tm=({id:e,sx:t,children:n})=>{const{isDragging:i}=Ip({id:e}),{attributes:r,listeners:s,setNodeRef:o,transform:a,transition:l}=em({id:e,strategy:$p,transition:{duration:300,easing:"cubic-bezier(0.25, 1, 0.5, 1)"}}),u={...t?.default,...i?t?.dragging:{},transform:tf.Translate.toString(a),transition:l,cursor:"pointer"};return w(P,{ref:o,style:u,...s,...r,children:n})};function nm({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 l(()=>[...t].filter(e=>null!=e),[...t])}(l(()=>({sensor:u,options:null!=c?c:{}}),[u=np,c={activationConstraint:{distance:8}}]));var u,c;return w(Np,{sensors:a,collisionDetection:vf,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=jp(e,o,a);i(l)},children:w(Wp,{items:e.map(n),strategy:$p,children:w(Ld,{items:e,sx:r,title:s,getKey:n,getContent:(e,i)=>{const r=n(e);return w(tm,{id:r,sx:o,children:t(e,i)},r)}})})})}var im,rm={exports:{}},sm={},om={exports:{}},am={exports:{}},lm={};var um,cm,hm,dm,fm,pm,mm,_m,gm,ym,vm,bm,xm,wm,Em,Am={};
|
|
11
11
|
/** @license React v16.13.1
|
|
12
12
|
* react-is.development.js
|
|
13
13
|
*
|
|
@@ -20,7 +20,7 @@ import*as e from"react";import t,{forwardRef as n,useRef as i,useCallback as r,u
|
|
|
20
20
|
object-assign
|
|
21
21
|
(c) Sindre Sorhus
|
|
22
22
|
@license MIT
|
|
23
|
-
*/function Sm(){if(dm)return hm;dm=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;return hm=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var i=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==i.join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(i,r){for(var s,o,a=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(i),l=1;l<arguments.length;l++){for(var u in s=Object(arguments[l]))t.call(s,u)&&(a[u]=s[u]);if(e){o=e(s);for(var c=0;c<o.length;c++)n.call(s,o[c])&&(a[o[c]]=s[o[c]])}}return a},hm}function km(){if(pm)return fm;pm=1;return fm="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function Om(){return _m?mm:(_m=1,mm=Function.call.bind(Object.prototype.hasOwnProperty))}function Pm(){if(ym)return gm;ym=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=km(),n={},i=Om();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function r(r,s,o,a,l){if("production"!==process.env.NODE_ENV)for(var u in r)if(i(r,u)){var c;try{if("function"!=typeof r[u]){var h=Error((a||"React class")+": "+o+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}c=r[u](s,u,a,o,null,t)}catch(e){c=e}if(!c||c instanceof Error||e((a||"React class")+": type specification of "+o+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof c+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),c instanceof Error&&!(c.message in n)){n[c.message]=!0;var d=l?l():"";e("Failed "+o+" type: "+c.message+(null!=d?d:""))}}}return r.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},gm=r}function Cm(){if(bm)return vm;bm=1;var e=Tm(),t=Sm(),n=km(),i=Om(),r=Pm(),s=function(){};function o(){return null}return"production"!==process.env.NODE_ENV&&(s=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),vm=function(a,l){var u="function"==typeof Symbol&&Symbol.iterator;var c="<<anonymous>>",h={array:m("array"),bigint:m("bigint"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:p(o),arrayOf:function(e){return p(function(t,i,r,s,o){if("function"!=typeof e)return new f("Property `"+o+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var a=t[i];if(!Array.isArray(a))return new f("Invalid "+s+" `"+o+"` of type `"+y(a)+"` supplied to `"+r+"`, expected an array.");for(var l=0;l<a.length;l++){var u=e(a,l,r,s,o+"["+l+"]",n);if(u instanceof Error)return u}return null})},element:p(function(e,t,n,i,r){var s=e[t];return a(s)?null:new f("Invalid "+i+" `"+r+"` of type `"+y(s)+"` supplied to `"+n+"`, expected a single ReactElement.")}),elementType:p(function(t,n,i,r,s){var o=t[n];return e.isValidElementType(o)?null:new f("Invalid "+r+" `"+s+"` of type `"+y(o)+"` supplied to `"+i+"`, expected a single ReactElement type.")}),instanceOf:function(e){return p(function(t,n,i,r,s){if(!(t[n]instanceof e)){var o=e.name||c;return new f("Invalid "+r+" `"+s+"` of type `"+(((a=t[n]).constructor&&a.constructor.name?a.constructor.name:c)+"` supplied to `")+i+"`, expected instance of `"+o+"`.")}var a;return null})},node:p(function(e,t,n,i,r){return g(e[t])?null:new f("Invalid "+i+" `"+r+"` supplied to `"+n+"`, expected a ReactNode.")}),objectOf:function(e){return p(function(t,r,s,o,a){if("function"!=typeof e)return new f("Property `"+a+"` of component `"+s+"` has invalid PropType notation inside objectOf.");var l=t[r],u=y(l);if("object"!==u)return new f("Invalid "+o+" `"+a+"` of type `"+u+"` supplied to `"+s+"`, expected an object.");for(var c in l)if(i(l,c)){var h=e(l,c,s,o,a+"."+c,n);if(h instanceof Error)return h}return null})},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&s(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),o;return p(function(t,n,i,r,s){for(var o=t[n],a=0;a<e.length;a++)if(d(o,e[a]))return null;var l=JSON.stringify(e,function(e,t){return"symbol"===v(t)?String(t):t});return new f("Invalid "+r+" `"+s+"` of value `"+String(o)+"` supplied to `"+i+"`, expected one of "+l+".")})},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&s("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var t=0;t<e.length;t++){var r=e[t];if("function"!=typeof r)return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+b(r)+" at index "+t+"."),o}return p(function(t,r,s,o,a){for(var l=[],u=0;u<e.length;u++){var c=(0,e[u])(t,r,s,o,a,n);if(null==c)return null;c.data&&i(c.data,"expectedType")&&l.push(c.data.expectedType)}return new f("Invalid "+o+" `"+a+"` supplied to `"+s+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")})},shape:function(e){return p(function(t,i,r,s,o){var a=t[i],l=y(a);if("object"!==l)return new f("Invalid "+s+" `"+o+"` of type `"+l+"` supplied to `"+r+"`, expected `object`.");for(var u in e){var c=e[u];if("function"!=typeof c)return _(r,s,o,u,v(c));var h=c(a,u,r,s,o+"."+u,n);if(h)return h}return null})},exact:function(e){return p(function(r,s,o,a,l){var u=r[s],c=y(u);if("object"!==c)return new f("Invalid "+a+" `"+l+"` of type `"+c+"` supplied to `"+o+"`, expected `object`.");var h=t({},r[s],e);for(var d in h){var p=e[d];if(i(e,d)&&"function"!=typeof p)return _(o,a,l,d,v(p));if(!p)return new f("Invalid "+a+" `"+l+"` key `"+d+"` supplied to `"+o+"`.\nBad object: "+JSON.stringify(r[s],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var m=p(u,d,o,a,l+"."+d,n);if(m)return m}return null})}};function d(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function f(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function p(e){if("production"!==process.env.NODE_ENV)var t={},i=0;function r(r,o,a,u,h,d,p){if(u=u||c,d=d||a,p!==n){if(l){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var _=u+":"+a;!t[_]&&i<3&&(s("You are manually calling a React.PropTypes validation function for the `"+d+"` prop on `"+u+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[_]=!0,i++)}}return null==o[a]?r?null===o[a]?new f("The "+h+" `"+d+"` is marked as required in `"+u+"`, but its value is `null`."):new f("The "+h+" `"+d+"` is marked as required in `"+u+"`, but its value is `undefined`."):null:e(o,a,u,h,d)}var o=r.bind(null,!1);return o.isRequired=r.bind(null,!0),o}function m(e){return p(function(t,n,i,r,s,o){var a=t[n];return y(a)!==e?new f("Invalid "+r+" `"+s+"` of type `"+v(a)+"` supplied to `"+i+"`, expected `"+e+"`.",{expectedType:e}):null})}function _(e,t,n,i,r){return new f((e||"React class")+": "+t+" type `"+n+"."+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+r+"`.")}function g(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(g);if(null===e||a(e))return!0;var t=function(e){var t=e&&(u&&e[u]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var n,i=t.call(e);if(t!==e.entries){for(;!(n=i.next()).done;)if(!g(n.value))return!1}else for(;!(n=i.next()).done;){var r=n.value;if(r&&!g(r[1]))return!1}return!0;default:return!1}}function y(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function v(e){if(null==e)return""+e;var t=y(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function b(e){var t=v(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return f.prototype=Error.prototype,h.checkPropTypes=r,h.resetWarningCache=r.resetWarningCache,h.PropTypes=h,h},vm}function Rm(){if(wm)return xm;wm=1;var e=km();function t(){}function n(){}return n.resetWarningCache=t,xm=function(){function i(t,n,i,r,s,o){if(o!==e){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function r(){return i}i.isRequired=i;var s={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:r,element:i,elementType:i,instanceOf:r,node:i,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},xm}function Mm(){if(Em)return om.exports;if(Em=1,"production"!==process.env.NODE_ENV){var e=Tm();om.exports=Cm()(e.isElement,true)}else om.exports=Rm()();return om.exports}var Lm,Nm={exports:{}};var zm,Dm={},Im={};function Fm(){if(zm)return Im;return zm=1,Object.defineProperty(Im,"__esModule",{value:!0}),Im.dontSetMe=function(e,t,n){if(e[t])return new Error(`Invalid prop ${t} passed to ${n} - do not set this, set it on the child.`)},Im.findInArray=function(e,t){for(let n=0,i=e.length;n<i;n++)if(t.apply(t,[e[n],n,e]))return e[n]},Im.int=function(e){return parseInt(e,10)},Im.isFunction=function(e){return"function"==typeof e||"[object Function]"===Object.prototype.toString.call(e)},Im.isNum=function(e){return"number"==typeof e&&!isNaN(e)},Im}var jm,Bm,Um={};function Vm(){if(Bm)return Dm;Bm=1,Object.defineProperty(Dm,"__esModule",{value:!0}),Dm.addClassName=o,Dm.addEvent=function(e,t,n,i){if(!e)return;const r={capture:!0,...i};e.addEventListener?e.addEventListener(t,n,r):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},Dm.addUserSelectStyles=function(e){if(!e)return;let t=e.getElementById("react-draggable-style-el");t||(t=e.createElement("style"),t.type="text/css",t.id="react-draggable-style-el",t.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",t.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(t));e.body&&o(e.body,"react-draggable-transparent-selection")},Dm.createCSSTransform=function(e,n){const i=r(e,n,"px");return{[(0,t.browserPrefixToKey)("transform",t.default)]:i}},Dm.createSVGTransform=function(e,t){return r(e,t,"")},Dm.getTouch=function(t,n){return t.targetTouches&&(0,e.findInArray)(t.targetTouches,e=>n===e.identifier)||t.changedTouches&&(0,e.findInArray)(t.changedTouches,e=>n===e.identifier)},Dm.getTouchIdentifier=function(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier},Dm.getTranslation=r,Dm.innerHeight=function(t){let n=t.clientHeight;const i=t.ownerDocument.defaultView.getComputedStyle(t);return n-=(0,e.int)(i.paddingTop),n-=(0,e.int)(i.paddingBottom),n},Dm.innerWidth=function(t){let n=t.clientWidth;const i=t.ownerDocument.defaultView.getComputedStyle(t);return n-=(0,e.int)(i.paddingLeft),n-=(0,e.int)(i.paddingRight),n},Dm.matchesSelector=i,Dm.matchesSelectorAndParentsTo=function(e,t,n){let r=e;do{if(i(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1},Dm.offsetXYFromParent=function(e,t,n){const i=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),r=(e.clientX+t.scrollLeft-i.left)/n,s=(e.clientY+t.scrollTop-i.top)/n;return{x:r,y:s}},Dm.outerHeight=function(t){let n=t.clientHeight;const i=t.ownerDocument.defaultView.getComputedStyle(t);return n+=(0,e.int)(i.borderTopWidth),n+=(0,e.int)(i.borderBottomWidth),n},Dm.outerWidth=function(t){let n=t.clientWidth;const i=t.ownerDocument.defaultView.getComputedStyle(t);return n+=(0,e.int)(i.borderLeftWidth),n+=(0,e.int)(i.borderRightWidth),n},Dm.removeClassName=a,Dm.removeEvent=function(e,t,n,i){if(!e)return;const r={capture:!0,...i};e.removeEventListener?e.removeEventListener(t,n,r):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},Dm.scheduleRemoveUserSelectStyles=function(e){window.requestAnimationFrame?window.requestAnimationFrame(()=>{s(e)}):s(e)};var e=Fm(),t=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,i=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var r,s,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(r=t?i:n){if(r.has(e))return r.get(e);r.set(e,o)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((s=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(s.get||s.set)?r(o,t,s):o[t]=e[t]);return o}(e,t)}(function(){if(jm)return Um;jm=1,Object.defineProperty(Um,"__esModule",{value:!0}),Um.browserPrefixToKey=n,Um.browserPrefixToStyle=function(e,t){return t?`-${t.toLowerCase()}-${e}`:e},Um.default=void 0,Um.getPrefix=t;const e=["Moz","Webkit","O","ms"];function t(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window)return"";const i=window.document?.documentElement?.style;if(!i)return"";if(t in i)return"";for(let r=0;r<e.length;r++)if(n(t,e[r])in i)return e[r];return""}function n(e,t){return t?`${t}${function(e){let t="",n=!0;for(let i=0;i<e.length;i++)n?(t+=e[i].toUpperCase(),n=!1):"-"===e[i]?n=!0:t+=e[i];return t}(e)}`:e}return Um.default=t(),Um}());let n="";function i(t,i){return n||(n=(0,e.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(n){return(0,e.isFunction)(t[n])})),!!(0,e.isFunction)(t[n])&&t[n](i)}function r(e,t,n){let{x:i,y:r}=e,s=`translate(${i}${n},${r}${n})`;if(t){s=`translate(${`${"string"==typeof t.x?t.x:t.x+n}`}, ${`${"string"==typeof t.y?t.y:t.y+n}`})`+s}return s}function s(e){if(e)try{if(e.body&&a(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{const t=(e.defaultView||window).getSelection();t&&"Caret"!==t.type&&t.removeAllRanges()}}catch(e){}}function o(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function a(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(`(?:^|\\s)${t}(?!\\S)`,"g"),"")}return Dm}var Gm,$m={};function Zm(){if(Gm)return $m;Gm=1,Object.defineProperty($m,"__esModule",{value:!0}),$m.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},$m.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},$m.createCoreData=function(t,i,r){const s=!(0,e.isNum)(t.lastX),o=n(t);return s?{node:o,deltaX:0,deltaY:0,lastX:i,lastY:r,x:i,y:r}:{node:o,deltaX:i-t.lastX,deltaY:r-t.lastY,lastX:t.lastX,lastY:t.lastY,x:i,y:r}},$m.createDraggableData=function(e,t){const n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}},$m.getBoundPosition=function(i,r,s){if(!i.props.bounds)return[r,s];let{bounds:o}=i.props;o="string"==typeof o?o:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(o);const a=n(i);if("string"==typeof o){const{ownerDocument:n}=a,i=n.defaultView;let r;if("parent"===o)r=a.parentNode;else{r=a.getRootNode().querySelector(o)}if(!(r instanceof i.HTMLElement))throw new Error('Bounds selector "'+o+'" could not find an element.');const s=r,l=i.getComputedStyle(a),u=i.getComputedStyle(s);o={left:-a.offsetLeft+(0,e.int)(u.paddingLeft)+(0,e.int)(l.marginLeft),top:-a.offsetTop+(0,e.int)(u.paddingTop)+(0,e.int)(l.marginTop),right:(0,t.innerWidth)(s)-(0,t.outerWidth)(a)-a.offsetLeft+(0,e.int)(u.paddingRight)-(0,e.int)(l.marginRight),bottom:(0,t.innerHeight)(s)-(0,t.outerHeight)(a)-a.offsetTop+(0,e.int)(u.paddingBottom)-(0,e.int)(l.marginBottom)}}(0,e.isNum)(o.right)&&(r=Math.min(r,o.right));(0,e.isNum)(o.bottom)&&(s=Math.min(s,o.bottom));(0,e.isNum)(o.left)&&(r=Math.max(r,o.left));(0,e.isNum)(o.top)&&(s=Math.max(s,o.top));return[r,s]},$m.getControlPosition=function(e,i,r){const s="number"==typeof i?(0,t.getTouch)(e,i):null;if("number"==typeof i&&!s)return null;const o=n(r),a=r.props.offsetParent||o.offsetParent||o.ownerDocument.body;return(0,t.offsetXYFromParent)(s||e,a,r.props.scale)},$m.snapToGrid=function(e,t,n){const i=Math.round(t/e[0])*e[0],r=Math.round(n/e[1])*e[1];return[i,r]};var e=Fm(),t=Vm();function n(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}return $m}var qm,Wm,Hm,Km,Ym={},Xm={};function Qm(){if(qm)return Xm;return qm=1,Object.defineProperty(Xm,"__esModule",{value:!0}),Xm.default=function(){},Xm}function Jm(){if(Wm)return Ym;Wm=1,Object.defineProperty(Ym,"__esModule",{value:!0}),Ym.default=void 0;var e=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,i=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var r,s,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(r=t?i:n){if(r.has(e))return r.get(e);r.set(e,o)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((s=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(s.get||s.set)?r(o,t,s):o[t]=e[t]);return o}(e,t)}(t),n=l(Mm()),i=l(v),r=Vm(),s=Zm(),o=Fm(),a=l(Qm());function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t);if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const c={start:"touchstart",move:"touchmove",stop:"touchend"},h={start:"mousedown",move:"mousemove",stop:"mouseup"};let d=h,f=class extends e.Component{constructor(){super(...arguments),u(this,"dragging",!1),u(this,"lastX",NaN),u(this,"lastY",NaN),u(this,"touchIdentifier",null),u(this,"mounted",!1),u(this,"handleDragStart",e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&"number"==typeof e.button&&0!==e.button)return!1;const t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!(0,r.matchesSelectorAndParentsTo)(e.target,this.props.handle,t)||this.props.cancel&&(0,r.matchesSelectorAndParentsTo)(e.target,this.props.cancel,t))return;"touchstart"!==e.type||this.props.allowMobileScroll||e.preventDefault();const i=(0,r.getTouchIdentifier)(e);this.touchIdentifier=i;const o=(0,s.getControlPosition)(e,i,this);if(null==o)return;const{x:l,y:u}=o,c=(0,s.createCoreData)(this,l,u);(0,a.default)("DraggableCore: handleDragStart: %j",c),(0,a.default)("calling",this.props.onStart);!1!==this.props.onStart(e,c)&&!1!==this.mounted&&(this.props.enableUserSelectHack&&(0,r.addUserSelectStyles)(n),this.dragging=!0,this.lastX=l,this.lastY=u,(0,r.addEvent)(n,d.move,this.handleDrag),(0,r.addEvent)(n,d.stop,this.handleDragStop))}),u(this,"handleDrag",e=>{const t=(0,s.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:i}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX,t=i-this.lastY;if([e,t]=(0,s.snapToGrid)(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,i=this.lastY+t}const r=(0,s.createCoreData)(this,n,i);(0,a.default)("DraggableCore: handleDrag: %j",r);if(!1!==this.props.onDrag(e,r)&&!1!==this.mounted)this.lastX=n,this.lastY=i;else try{this.handleDragStop(new MouseEvent("mouseup"))}catch(e){const t=document.createEvent("MouseEvents");t.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(t)}}),u(this,"handleDragStop",e=>{if(!this.dragging)return;const t=(0,s.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:i}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=i-this.lastY||0;[e,t]=(0,s.snapToGrid)(this.props.grid,e,t),n=this.lastX+e,i=this.lastY+t}const o=(0,s.createCoreData)(this,n,i);if(!1===this.props.onStop(e,o)||!1===this.mounted)return!1;const l=this.findDOMNode();l&&this.props.enableUserSelectHack&&(0,r.scheduleRemoveUserSelectStyles)(l.ownerDocument),(0,a.default)("DraggableCore: handleDragStop: %j",o),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,l&&((0,a.default)("DraggableCore: Removing handlers"),(0,r.removeEvent)(l.ownerDocument,d.move,this.handleDrag),(0,r.removeEvent)(l.ownerDocument,d.stop,this.handleDragStop))}),u(this,"onMouseDown",e=>(d=h,this.handleDragStart(e))),u(this,"onMouseUp",e=>(d=h,this.handleDragStop(e))),u(this,"onTouchStart",e=>(d=c,this.handleDragStart(e))),u(this,"onTouchEnd",e=>(d=c,this.handleDragStop(e)))}componentDidMount(){this.mounted=!0;const e=this.findDOMNode();e&&(0,r.addEvent)(e,c.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:t}=e;(0,r.removeEvent)(t,h.move,this.handleDrag),(0,r.removeEvent)(t,c.move,this.handleDrag),(0,r.removeEvent)(t,h.stop,this.handleDragStop),(0,r.removeEvent)(t,c.stop,this.handleDragStop),(0,r.removeEvent)(e,c.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,r.scheduleRemoveUserSelectStyles)(t)}}findDOMNode(){return this.props?.nodeRef?this.props?.nodeRef?.current:i.default.findDOMNode(this)}render(){return e.cloneElement(e.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};return Ym.default=f,u(f,"displayName","DraggableCore"),u(f,"propTypes",{allowAnyClick:n.default.bool,allowMobileScroll:n.default.bool,children:n.default.node.isRequired,disabled:n.default.bool,enableUserSelectHack:n.default.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:n.default.arrayOf(n.default.number),handle:n.default.string,cancel:n.default.string,nodeRef:n.default.object,onStart:n.default.func,onDrag:n.default.func,onStop:n.default.func,onMouseDown:n.default.func,scale:n.default.number,className:o.dontSetMe,style:o.dontSetMe,transform:o.dontSetMe}),u(f,"defaultProps",{allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),Ym}function e_(){return Hm||(Hm=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return u.default}}),e.default=void 0;var n=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,i=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var r,s,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(r=t?i:n){if(r.has(e))return r.get(e);r.set(e,o)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((s=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(s.get||s.set)?r(o,t,s):o[t]=e[t]);return o}(e,t)}(t),i=h(Mm()),r=h(v),s=function(){if(Lm)return Nm.exports;function e(t){var n,i,r="";if("string"==typeof t||"number"==typeof t)r+=t;else if("object"==typeof t)if(Array.isArray(t)){var s=t.length;for(n=0;n<s;n++)t[n]&&(i=e(t[n]))&&(r&&(r+=" "),r+=i)}else for(i in t)t[i]&&(r&&(r+=" "),r+=i);return r}function t(){for(var t,n,i=0,r="",s=arguments.length;i<s;i++)(t=arguments[i])&&(n=e(t))&&(r&&(r+=" "),r+=n);return r}return Lm=1,Nm.exports=t,Nm.exports.clsx=t,Nm.exports}(),o=Vm(),a=Zm(),l=Fm(),u=h(Jm()),c=h(Qm());function h(e){return e&&e.__esModule?e:{default:e}}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},d.apply(null,arguments)}function f(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t);if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class p extends n.Component{static getDerivedStateFromProps(e,t){let{position:n}=e,{prevPropsPosition:i}=t;return!n||i&&n.x===i.x&&n.y===i.y?null:((0,c.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:i}),{x:n.x,y:n.y,prevPropsPosition:{...n}})}constructor(e){super(e),f(this,"onDragStart",(e,t)=>{(0,c.default)("Draggable: onDragStart: %j",t);if(!1===this.props.onStart(e,(0,a.createDraggableData)(this,t)))return!1;this.setState({dragging:!0,dragged:!0})}),f(this,"onDrag",(e,t)=>{if(!this.state.dragging)return!1;(0,c.default)("Draggable: onDrag: %j",t);const n=(0,a.createDraggableData)(this,t),i={x:n.x,y:n.y,slackX:0,slackY:0};if(this.props.bounds){const{x:e,y:t}=i;i.x+=this.state.slackX,i.y+=this.state.slackY;const[r,s]=(0,a.getBoundPosition)(this,i.x,i.y);i.x=r,i.y=s,i.slackX=this.state.slackX+(e-i.x),i.slackY=this.state.slackY+(t-i.y),n.x=i.x,n.y=i.y,n.deltaX=i.x-this.state.x,n.deltaY=i.y-this.state.y}if(!1===this.props.onDrag(e,n))return!1;this.setState(i)}),f(this,"onDragStop",(e,t)=>{if(!this.state.dragging)return!1;if(!1===this.props.onStop(e,(0,a.createDraggableData)(this,t)))return!1;(0,c.default)("Draggable: onDragStop: %j",t);const n={dragging:!1,slackX:0,slackY:0};if(Boolean(this.props.position)){const{x:e,y:t}=this.props.position;n.x=e,n.y=t}this.setState(n)}),this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},!e.position||e.onDrag||e.onStop||console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){void 0!==window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){return this.props?.nodeRef?.current??r.default.findDOMNode(this)}render(){const{axis:e,bounds:t,children:i,defaultPosition:r,defaultClassName:l,defaultClassNameDragging:c,defaultClassNameDragged:h,position:f,positionOffset:p,scale:m,..._}=this.props;let g={},y=null;const v=!Boolean(f)||this.state.dragging,b=f||r,x={x:(0,a.canDragX)(this)&&v?this.state.x:b.x,y:(0,a.canDragY)(this)&&v?this.state.y:b.y};this.state.isElementSVG?y=(0,o.createSVGTransform)(x,p):g=(0,o.createCSSTransform)(x,p);const w=(0,s.clsx)(i.props.className||"",l,{[c]:this.state.dragging,[h]:this.state.dragged});return n.createElement(u.default,d({},_,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),n.cloneElement(n.Children.only(i),{className:w,style:{...i.props.style,...g},transform:y}))}}e.default=p,f(p,"displayName","Draggable"),f(p,"propTypes",{...u.default.propTypes,axis:i.default.oneOf(["both","x","y","none"]),bounds:i.default.oneOfType([i.default.shape({left:i.default.number,right:i.default.number,top:i.default.number,bottom:i.default.number}),i.default.string,i.default.oneOf([!1])]),defaultClassName:i.default.string,defaultClassNameDragging:i.default.string,defaultClassNameDragged:i.default.string,defaultPosition:i.default.shape({x:i.default.number,y:i.default.number}),positionOffset:i.default.shape({x:i.default.oneOfType([i.default.number,i.default.string]),y:i.default.oneOfType([i.default.number,i.default.string])}),position:i.default.shape({x:i.default.number,y:i.default.number}),className:l.dontSetMe,style:l.dontSetMe,transform:l.dontSetMe}),f(p,"defaultProps",{...u.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(sm)),sm}var t_=function(){if(Km)return rm.exports;Km=1;const{default:e,DraggableCore:t}=e_();return rm.exports=e,rm.exports.default=e,rm.exports.DraggableCore=t,rm.exports}(),n_=xe(t_);const i_=({zIndex:t,width:n,bottom:i,right:r,left:s,top:o,sx:a,children:l})=>{const u=e.useId(),c=e.useRef(null);return w(K,{children:w(n_,{nodeRef:c,children:w(P,{id:u,ref:c,sx:()=>({position:"absolute",top:o,left:s,bottom:i,right:r,width:n,zIndex:t,backgroundColor:"white"}),children:w(Yc,{sx:a,children:l})})})})},r_=m(null),s_={didCatch:!1,error:null};class o_ extends c{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=s_}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(...e){const{error:t}=this.state;null!==t&&(this.props.onReset?.({args:e,reason:"imperative-api"}),this.setState(s_))}componentDidCatch(e,t){this.props.onError?.(e,t)}componentDidUpdate(e,t){const{didCatch:n}=this.state,{resetKeys:i}=this.props;n&&null!==t.error&&function(e=[],t=[]){return e.length!==t.length||e.some((e,n)=>!Object.is(e,t[n]))}(e.resetKeys,i)&&(this.props.onReset?.({next:i,prev:e.resetKeys,reason:"keys"}),this.setState(s_))}render(){const{children:e,fallbackRender:t,FallbackComponent:n,fallback:i}=this.props,{didCatch:r,error:s}=this.state;let a=e;if(r){const e={error:s,resetErrorBoundary:this.resetErrorBoundary};if("function"==typeof t)a=t(e);else if(n)a=o(n,e);else{if(void 0===i)throw s;a=i}}return o(r_.Provider,{value:{didCatch:r,error:s,resetErrorBoundary:this.resetErrorBoundary}},a)}}const a_=({error:e,resetErrorBoundary:t})=>E(P,{role:"alert",sx:{padding:"20px",background:"#fee"},children:[w(O,{variant:"h2",children:"Ошибка приложения"}),w(O,{variant:"body1",color:"error",children:e.message}),w(Vc,{onClick:t,children:"Попробовать снова"})]}),l_=({children:e,FallbackComponent:t=a_})=>w(o_,{FallbackComponent:t,children:e});function u_(t){const{name:n,type:i}=t,r=e.useId(),{control:s}=Bh();return w(Fh,{name:n,control:s,render:({field:e})=>E(P,{sx:({spacing:e})=>({display:"grid",width:"100%",gap:e(1)}),children:[w(Cd,{id:r,size:"small",...t,...e,onChange:t=>{const{target:n}=t,{value:r}=n;if("number"===i)""===r?e.onChange():e.onChange(Number(r));else e.onChange(t)}}),w(kd,{name:n})]})})}var c_,h_;!function(e){e.ONE_WAY='"OneWay"',e.POINT_ADDRESS='"PointAddress"',e.BUILDING_AREA='"MapBuildingECArea"',e.BUILTUP_AREA='"MapAdminBuiltupArea"',e.ADMIN_AREA='"MapAdminArea"',e.OCEAN_AREA='"MapOceanArea"',e.OCEAN_AREA_LABEL='"MapOceanAreaLabel"',e.FACILITY_AREA='"MapFacilityArea"',e.FACILITY_AREA_LABEL='"MapFacilityAreaLabel"',e.LANDUSE_AREA='"MapLanduseArea"',e.LANDUSE_AREA_LABEL='"MapLanduseAreaLabel"',e.NATURE_FIELD='"MapNatureField"',e.NATURE_FOREST='"MapNatureForest"',e.LINK='"Link"',e.RAILROAD_LINK='"MapRailroadLink"',e.WATER_LINK='"MapWaterLink"',e.WATER_AREA='"MapWaterArea"',e.WATER_AREA_LABEL='"MapWaterAreaLabel"',e.WATER_LAKE_LABEL='"MapWaterLakeLabel"',e.POI='"POI"',e.CITY_POI='"CityPOI"',e.CONDITIONS='"Conditions"',e.ROAD_POLY='"RoadPoly"',e.PARKING_LINE='"ParkingLine"',e.LANE_MARKING_LINE='"LaneMarkingLine"',e.LANE_MARKING_POLY='"LaneMarkingPoly"',e.LANE_MARKING_ARROW='"LaneMarkingArrow"',e.TRAFFIC_SIGN='"TrafficSign"',e.TRAFFIC_SIGNAL='"TrafficSignal"',e.CAMERA='"Camera"',e.PILLAR='"Pillar"'}(c_||(c_={})),function(e){e.TILE="tile",e.NATURE_TILE="nature_tile",e.MSK="msk"}(h_||(h_={}));const d_=new class{constructor(){}log({message:e,context:t,meta:n}){console.log(t,e,n)}warn({message:e,context:t,meta:n}){console.warn(t,e,n)}error({message:e,context:t,meta:n}){console.error(t,e,n)}},f_=256,p_={[h_.TILE]:"https://dalganmap.ru/api/tiles/get_tile/{z}/{x}/{y}.mvt",[h_.NATURE_TILE]:"https://dalganmap.ru/api/tiles/get_nature_tile/{z}/{x}/{y}.mvt",[h_.MSK]:"http://89.108.118.23:3070/tiles/get_tile/{z}/{x}/{y}.mvt"};var m_={global:{links:{getIsConstruction:"function (feature) {\n const { construction } = feature;\n\n return construction;\n}\n",getIsFunctionalClass:"function (feature) {\n const { functional_class, access_id } = feature;\n\n return functional_class === 5 && access_id === 32;\n}\n",getIsLowMobility:"function (feature) {\n const { functional_class, low_mobility } = feature;\n\n return functional_class === 5 && low_mobility === 1;\n}\n"}},cameras:{camera1:{type:"perspective",vanishing_point:[0,-500]}},textures:{arrow:{url:"https://dalganmap.ru/api-image/images/arrow-20.png",sprites:{base:[0,0,20,20]}},"traffic-signal":{url:"https://dalganmap.ru/api-image/images/conditions/traffic-signal.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},pedestrian_crossing:{url:"https://dalganmap.ru/api-image/images/conditions/pedestrian_crossing.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},physical:{url:"https://dalganmap.ru/api-image/images/conditions/physical.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},gate:{url:"https://dalganmap.ru/api-image/images/conditions/gate.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_3578:{url:"https://dalganmap.ru/api-image/images/POI/3578.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5813:{url:"https://dalganmap.ru/api-image/images/POI/5813.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5541:{url:"https://dalganmap.ru/api-image/images/POI/5541.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5540:{url:"https://dalganmap.ru/api-image/images/POI/5540.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_9530(Mail)":{url:"https://dalganmap.ru/api-image/images/POI/mail.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_9530(Delivery)":{url:"https://dalganmap.ru/api-image/images/POI/delivery.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5400:{url:"https://dalganmap.ru/api-image/images/POI/5400.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_6000:{url:"https://dalganmap.ru/api-image/images/POI/6000.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_9565:{url:"https://dalganmap.ru/api-image/images/POI/9565.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_9583:{url:"https://dalganmap.ru/api-image/images/POI/9583.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_8060:{url:"https://dalganmap.ru/api-image/images/POI/8060.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5511:{url:"https://dalganmap.ru/api-image/images/POI/5511.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5512:{url:"https://dalganmap.ru/api-image/images/POI/5512.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5800:{url:"https://dalganmap.ru/api-image/images/POI/5800.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5999:{url:"https://dalganmap.ru/api-image/images/POI/5999.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_7011:{url:"https://dalganmap.ru/api-image/images/POI/7011.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_7389:{url:"https://dalganmap.ru/api-image/images/POI/7389.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_7832:{url:"https://dalganmap.ru/api-image/images/POI/7832.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_7929:{url:"https://dalganmap.ru/api-image/images/POI/7929.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_7990:{url:"https://dalganmap.ru/api-image/images/POI/7990.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_7999:{url:"https://dalganmap.ru/api-image/images/POI/7999.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_8410:{url:"https://dalganmap.ru/api-image/images/POI/8410.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_9517:{url:"https://dalganmap.ru/api-image/images/POI/9517.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_9718:{url:"https://dalganmap.ru/api-image/images/POI/9718.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_9992(mosque)":{url:"https://dalganmap.ru/api-image/images/POI/9992_mosque.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_9992(church)":{url:"https://dalganmap.ru/api-image/images/POI/9992_church.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_9992(temple)":{url:"https://dalganmap.ru/api-image/images/POI/9992_temple.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_9992(davidStar)":{url:"https://dalganmap.ru/api-image/images/POI/9992_davidStar.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_9992(mortar)":{url:"https://dalganmap.ru/api-image/images/POI/9992_mortar.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_4100(metro)":{url:"https://dalganmap.ru/api-image/images/POI/4100_metro.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_4100(diameter)":{url:"https://dalganmap.ru/api-image/images/POI/4100_diameter.png",filtering:"mipmap",sprites:{base:[0,0,41,15]}},POI_4013:{url:"https://dalganmap.ru/api-image/images/POI/4013.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}}},layers:null,styles:{buildings:{base:"polygons",shaders:{blocks:{color:"color.rgb;\n"}}}},lights:{light1:{type:"directional",direction:[.1,.5,-1],diffuse:.7,ambient:.5}},sources:null};const __=e=>{const t=[],n={source:e,layer:c_.BUILDING_AREA,minzoom:15},i={id:gn(),data:n,extruded:{draw:{polygons:{style:"buildings",extrude:"function() {\n return $zoom >= 17;\n }"}}},draw:{polygons:{color:"#DDB07B",height:{property:"height"}},lines:{color:"#DB933F",width:"2px",cap:"round",join:"round"}}};return t.push(i),t},g_=e=>{const t=[],n={source:e,layer:c_.BUILTUP_AREA},i={id:gn(),data:n,draw:{polygons:{color:"#CFC8C8"}}};return t.push(i),t},y_=e=>{const t=[],n={source:e,layer:c_.ADMIN_AREA},i={id:gn(),data:n,draw:{polygons:{color:"#D3D2CF"}}},r={id:gn(),data:n,filter:"function() {\n const { type } = feature;\n\n const isFilter = type === 'R';\n\n return isFilter;\n }",draw:{lines:{color:"#696969",width:"1px",cap:"round",join:"round"}}},s={id:gn(),data:n,filter:"function() {\n const { type } = feature;\n\n const isFilter = type === 'D' && $zoom >= 12;\n\n return isFilter;\n }",draw:{lines:{color:"#696969",dash:[4,7],width:"1px",cap:"round",join:"round"}}};return t.push(i,r,s),t},v_={size:20,extension:"png"},b_=e=>{const t=[],n={source:e,layer:c_.CAMERA},i={},r="camera";i[r]={url:wn(`msk/${r}/${r}_${v_.size}.${v_.extension}`),filtering:"mipmap",sprites:{base:[0,0,v_.size,v_.size]}};const s={id:gn(),data:n,draw:{points:{collide:!1,texture:r,size:v_.size,sprite:"base",placement:"midpoint"}},textures:i,sublayers:{}};return t.push(s),t},x_=e=>{const t=[],n={source:e,layer:c_.CITY_POI},i={id:gn(),data:n,filter:"function() {\n const { capital_order8, capital_order2, capital_order1, poi_name, priority } = feature;\n\n if ($zoom >= 9 && $zoom < 13) {\n return priority < 8;\n }\n\n if ($zoom <= 11) {\n return capital_order8 === 'Y';\n }\n\n if ($zoom >= 15) {\n return capital_order2 !== 'Y';\n }\n\n return true;\n }\n ",draw:{text:{text_source:"poi_name",priority:"function () {\n const { priority } = feature;\n\n if ($zoom <= 15) {\n return priority;\n }\n\n return 1;\n }\n ",font:{fill:"black",size:"function() {\n const { capital_order8 } = feature;\n\n if (capital_order8 === 'Y') {\n return '16px';\n }\n\n return '12px';\n }",weight:"function() {\n const { capital_order2 } = feature;\n\n if (capital_order2 === 'Y') {\n return 'bold';\n }\n\n return 'normal';\n }",stroke:{color:"white",width:"2px"}}}}};return t.push(i),t};var w_;!function(e){e.traffic_signal="traffic_signal",e.pedestrian_crossing="pedestrian_crossing",e.physical="physical",e.gate="gate"}(w_||(w_={}));const E_=e=>{const t=[],n={},i={source:e,layer:c_.CONDITIONS},r={id:gn(),data:i};return Object.values(w_).forEach(e=>{n[`_${e}`]={filter:`function() {\n const { type } = feature;\n\n const isShow = type === '${e}';\n\n return isShow;\n }`,draw:{points:{texture:e,sprite:"base",placement:"midpoint"}}}}),r.sublayers=n,t.push(r),t},A_=e=>{const t=[],n={id:gn(),data:{source:e,layer:c_.FACILITY_AREA},draw:{polygons:{color:"function() {\n const { feature_type } = feature;\n\n switch (feature_type) {\n case '2000408': {\n return '#DBBAC4';\n }\n\n case '1900403': {\n return '#B6C3C7';\n }\n\n case '1907403': {\n return '#A3B9C0';\n }\n\n case '2000123': {\n return '#E4BA7D';\n }\n\n case '2000124': {\n return '#BFE6E3';\n }\n\n case '2000200': {\n return '#A0A9A8';\n }\n\n case '2000403': {\n return '#AF7136';\n }\n\n case '2000420': {\n return '#89AC76';\n }\n\n case '2000457': {\n return '#9494C0';\n }\n\n default: {\n return '#E1D4D4';\n }\n }\n }",order:"function() {\n const { feature_type } = feature;\n\n switch (feature_type) {\n case '1907403': {\n return 301;\n }\n\n default: {\n return 300;\n }\n }\n }"},lines:{color:"#857F7F",width:"2px",cap:"round",join:"round"}}},i={id:gn(),data:{source:e,layer:c_.FACILITY_AREA_LABEL},draw:{text:{text_source:"name",font:{fill:"function() {\n const { feature_type } = feature;\n\n switch(feature_type) {\n case '1900403':\n case '1907403': {\n return '#256D7B';\n }\n\n case '2000420':\n case '2000460':\n case '2000123': {\n return '#00541F';\n }\n\n case '2000408': {\n return '#5E2129';\n }\n\n case '2000124': {\n return '#3E5F8A';\n }\n\n case '2000200': {\n return '#464451';\n }\n\n case '2000403': {\n return '#B03F35';\n }\n\n case '2000457': {\n return '#6A5ACD';\n }\n\n case '1700215':\n case '900159':\n case '900158': {\n return '#474A51';\n }\n\n default: {\n return black;\n }\n }\n }",size:"12px",stroke:{color:"white",width:"3px"}}}}};return t.push(n,i),t},T_=e=>{const t=[],n={id:gn(),data:{source:e,layer:c_.LANDUSE_AREA},draw:{polygons:{color:"function() {\n const { feature_type } = feature;\n\n switch (feature_type) {\n case '509998': {\n return '#ECD175';\n }\n\n case '600102':\n case '900140': {\n return '#3E9A8C';\n }\n\n case '900202':\n case '900130':\n case '900150':\n case '900103': {\n return '#96BE7D';\n }\n\n case '9997010': {\n return null;\n }\n }\n }",order:"function() {\n const { feature_type } = feature;\n\n switch(feature_type) {\n case '900150':\n case '900130':\n case '509998': {\n return 300;\n }\n\n default: {\n return 299;\n }\n }\n }"}}},i={id:gn(),data:{source:e,layer:c_.LANDUSE_AREA_LABEL},filter:"function() {\n return $zoom >= 15;\n }",draw:{text:{text_source:"name",font:{size:"13px",fill:"function() {\n const { feature_type } = feature;\n\n switch(feature_type) {\n case '509998': {\n return '#CD7F32';\n }\n\n default: {\n return '#00541F';\n }\n }\n }",stroke:{color:"white",width:"3px"}}}}};return t.push(n,i),t},S_=e=>{const t=[],n={source:e,layer:c_.LANE_MARKING_ARROW},i={id:gn(),data:n,draw:{polygons:{color:"white"}}};return t.push(i),t},k_=["-1.0","-0.5","-0.3","0.0","0.3","0.5","0.7","1.0","1.5","2.0"],O_=[[5],[4,3],[2,1]],P_="function() {\n const { functional_class, tunnel, tollway } = feature;\n\n const alpha = tunnel ? 0.89 : 1;\n\n const getRGB = (hex, alpha) => {\n const r = +(parseInt(hex.slice(1, 3), 16) / 255).toFixed(2);\n const g = +(parseInt(hex.slice(3, 5), 16) / 255).toFixed(2);\n const b = +(parseInt(hex.slice(5, 7), 16) / 255).toFixed(2);\n\n return [r, g, b, alpha];\n }\n\n if (tollway) {\n return '#D72740';\n }\n\n switch (functional_class) {\n case 1:\n case 2: {\n const color = getRGB('#D1747F', alpha);\n\n return color;\n }\n\n case 3:\n case 4: {\n const color = getRGB('#B1A7AA', alpha);\n\n return color;\n }\n\n case 5: {\n const color = getRGB('#D5CEC3', alpha);\n\n return color;\n }\n }\n}",C_="function() {\n const { functional_class, road_number } = feature;\n\n const getScale = () => {\n if ($zoom <= 15 && $zoom >= 14) { return 7; }\n\n if ($zoom <= 13 && $zoom >= 12) { return 9; }\n\n if ($zoom <= 5) { return 400; }\n\n if ($zoom <= 7) { return 200; }\n\n if ($zoom < 12) { return 50; }\n\n return 1;\n }\n\n const scale = getScale();\n\n switch(functional_class) {\n case 1:\n case 2: {\n return 8 * scale;\n }\n\n case 3:\n case 4: {\n return 7 * scale;\n }\n\n case 5: {\n if (Boolean(road_number)) {\n return 7 * scale;\n }\n\n return 6;\n }\n }\n}",R_={text_source:"street_name",font:{fill:"black",size:"14px",stroke:{color:"white",width:"3px"}}},M_={text:{text_source:"road_number",font:{fill:"#181bff",size:"16px",weight:"bold",underline:!0,background:{color:"black"}}}},L_={text:R_,lines:{color:P_,width:C_,cap:"round",join:"round"}},N_={lines:{color:P_,width:C_,outline:{color:"function() {\n const { functional_class, access_id, tollway } = feature;\n\n if (tollway) {\n return '#B9263B';\n }\n\n switch(functional_class) {\n case 5: {\n return '#989898';\n }\n\n case 3:\n case 4: {\n return '#8F6E78';\n }\n\n case 1:\n case 2: {\n return '#9A414B';\n }\n }\n}",width:"function() {\n const { functional_class, access_id } = feature;\n\n switch(functional_class) {\n case 5: {\n switch (access_id) {\n case 32: {\n return 0;\n }\n\n default: {\n return 1;\n }\n }\n }\n\n default: {\n return 1;\n }\n }\n}"}}},z_={text:R_,lines:{color:"#BABCC2",width:10,cap:"round",join:"round"}},D_={filter:"function() {\n return global.links.getIsLowMobility(feature);\n }",draw:{lines:{width:4}}},I_={filter:"function() {\n return global.links.getIsConstruction(feature);\n }",draw:{lines:{width:3,color:"#9AA096",dash:[2,1]}}},F_={filter:"function() {\n return global.links.getIsFunctionalClass(feature);\n }",draw:{lines:{width:2,color:"#9AA096",dash:[2,1]}}},j_=e=>{const t=[],n={source:e,layer:c_.LINK},i={id:gn(),data:n,draw:M_};return t.push(i),k_.forEach(i=>{const r=[],s=[];O_.forEach(t=>{const o=[],a=[];t.forEach(t=>{const r=(({source:e,zLvl:t,functionClass:n})=>e===h_.MSK?{base:{default:`function() {\n const { functional_class, z_lvl = '0.0', tollway } = feature;\n\n const isFilter = $zoom <= 16 && z_lvl === '${t}' && +functional_class === ${n} && tollway === false;\n\n return isFilter;\n }`,tollway:`function() {\n const { functional_class, z_lvl = '0.0', tollway } = feature;\n\n const isFilter = $zoom <= 16 && z_lvl === '${t}' && +functional_class === ${n} && tollway === true;\n\n return isFilter;\n }`},border:{default:`function() {\n const { functional_class, z_lvl = '0.0', tollway } = feature;\n\n const isFilter = $zoom <= 16 && tollway === false && z_lvl === '${t}' && +functional_class === ${n} && !global.links.getIsConstruction(feature) && !global.links.getIsFunctionalClass(feature);\n\n return isFilter;\n }`,tollway:`function() {\n const { functional_class, z_lvl = '0.0', tollway } = feature;\n\n const isFilter = $zoom <= 16 && tollway === true && z_lvl === '${t}' && +functional_class === ${n} && !global.links.getIsConstruction(feature) && !global.links.getIsFunctionalClass(feature);\n\n return isFilter;\n }`}}:{base:{default:`function() {\n const { functional_class, z_lvl = '0.0', tollway } = feature;\n\n const isFilter = z_lvl === '${t}' && +functional_class === ${n} && tollway === false;\n\n return isFilter;\n }`,tollway:`function() {\n const { functional_class, z_lvl = '0.0', tollway } = feature;\n\n const isFilter = z_lvl === '${t}' && +functional_class === ${n} && tollway === true;\n\n return isFilter;\n }`},border:{default:`function() {\n const { functional_class, z_lvl = '0.0', tollway } = feature;\n\n const isFilter = tollway === false && z_lvl === '${t}' && +functional_class === ${n} && !global.links.getIsConstruction(feature) && !global.links.getIsFunctionalClass(feature);\n\n return isFilter;\n }`,tollway:`function() {\n const { functional_class, z_lvl = '0.0', tollway } = feature;\n\n const isFilter = tollway === true && z_lvl === '${t}' && +functional_class === ${n} && !global.links.getIsConstruction(feature) && !global.links.getIsFunctionalClass(feature);\n\n return isFilter;\n }`}})({source:e,zLvl:i,functionClass:t}),s=(({zLvl:e,functionClass:t})=>`function() {\n const { functional_class, z_lvl = '0.0', tollway } = feature;\n\n const isFilter = $zoom > 16 && z_lvl === '${e}' && +functional_class === ${t};\n\n return isFilter;\n }`)({zLvl:i,functionClass:t}),l={id:gn(),data:n,filter:r.base.default,draw:L_,sublayers:{construction:{...I_},functionalClassAccessId32:{...F_},lowMobility:{...D_}}},u={id:gn(),data:n,filter:r.base.tollway,draw:L_,sublayers:{construction:{...I_},functionalClassAccessId32:{...F_},lowMobility:{...D_}}},c={id:gn(),data:n,filter:s,draw:z_,sublayers:{functionalClassAccessId32:{...F_}}},h={id:gn(),data:n,filter:r.border.default,draw:N_,sublayers:{lowMobility:{...D_}}},d={id:gn(),data:n,filter:r.border.tollway,draw:N_,sublayers:{lowMobility:{...D_}}};if(e===h_.MSK)o.push(c);o.push(l,u),a.push(h,d)}),r.push(...o),s.push(...a)}),t.push(...s,...r)}),t},B_=()=>{const e=[],t={source:h_.NATURE_TILE,layer:c_.NATURE_FIELD},n={id:gn(),data:t,draw:{polygons:{color:"#EBEEC7"}}};return e.push(n),e},U_=()=>{const e=[],t={source:h_.NATURE_TILE,layer:c_.NATURE_FOREST},n={id:gn(),data:t,draw:{polygons:{color:"function() {\n const { feature_type } = feature;\n\n switch (feature_type) {\n case '900202': {\n return '#96BE7D';\n }\n\n default : {\n return null;\n }\n }\n }"}}};return e.push(n),e},V_=e=>{const t=[],n={id:gn(),data:{source:e,layer:c_.OCEAN_AREA},draw:{polygons:{color:"#7DBEE4"}}},i={id:gn(),data:{source:e,layer:c_.OCEAN_AREA_LABEL},draw:{text:{text_source:"name",font:{fill:"#0A80C4",size:"18px",stroke:{color:"white",width:"3px"}}}}};return t.push(n,i),t},G_=e=>{const t=[],n={id:gn(),data:{source:e,layer:c_.ONE_WAY},draw:{points:{texture:"arrow",sprite:"base",angle:"function() {\n const { bearing } = feature;\n \n return bearing;\n }\n "}}};return t.push(n),t},$_={size:20,extension:"png"},Z_=e=>{const t=[],n={source:e,layer:c_.PILLAR},i={},r="pillar";i[r]={url:wn(`msk/${r}/${r}_${$_.size}.${$_.extension}`),filtering:"mipmap",sprites:{base:[0,0,$_.size,$_.size]}};const s={id:gn(),data:n,draw:{points:{collide:!1,texture:r,size:$_.size,sprite:"base",placement:"midpoint"}},textures:i,sublayers:{}};return t.push(s),t},q_='function() {\n const { poi_name, cat_id } = feature;\n\n switch (+cat_id) {\n case 4100: {\n const text = poi_name.replaceAll(/(Метро-|Станция-|МЦД-)/g, "");\n\n return text;\n }\n\n default: {\n return poi_name;\n }\n }\n}',W_=[3578,4013,4100,5400,5511,5512,5540,5541,5800,5813,5999,6e3,7011,7389,7832,7929,7990,8060,8410,9517,9530,9565,9583,9718,9992],H_=e=>{const t={};switch(e){case 4100:t[`_${e}-metro`]={filter:`function() {\n const { poi_name, cat_id } = feature;\n\n const isMetro = poi_name.startsWith('Метро-');\n const isStation = poi_name.startsWith('Станция-');\n\n const isCatId = +cat_id === ${e};\n\n const isFilter = isCatId && (isMetro || isStation);\n\n return isFilter;\n }`,draw:{points:K_({texture:`POI_${e}(metro)`})}},t[`_${e}-diameter`]={filter:`function() {\n const { cat_id, poi_name } = feature;\n\n const isDiameter = poi_name.startsWith('МЦД-');\n\n const isCatId = +cat_id === ${e};\n\n const isFilter = isCatId && isDiameter;\n\n return isFilter;\n }`,draw:{points:K_({texture:`POI_${e}(diameter)`,size:[41,15]})}};break;case 9530:t[`_${e}-mail`]={filter:`function() {\n const { cat_id, poi_name = '' } = feature;\n\n const isCatId = +cat_id === ${e};\n\n const isMail = poi_name.startsWith('Почта');\n\n const isFilter = isCatId && isMail;\n\n return isFilter;\n }`,draw:{points:K_({texture:`POI_${e}(Mail)`})}},t[`_${e}-delivery`]={filter:`function() {\n const { cat_id, poi_name = '' } = feature;\n\n const isCatId = +cat_id === ${e};\n \n const isMail = poi_name.startsWith('Почта');\n\n const isFilter = isCatId && !isMail;\n\n return isFilter;\n }`,draw:{points:K_({texture:`POI_${e}(Delivery)`})}};break;case 9992:{const n={mosque:1,church:2,temple:3,davidStar:4,mortar:6};Object.entries(n).forEach(([n,i])=>{t[`_${e}-${n}`]={filter:`function() {\n const { cat_id, subcat_id } = feature;\n\n const isCatId = +cat_id === ${e};\n const isSubcatId = +subcat_id === ${i};\n\n const isFilter = isCatId && isSubcatId;\n\n return isFilter;\n }`,draw:{points:K_({texture:`POI_${e}(${n})`})}}});break}default:t[`_${e}`]={filter:`function() {\n const { cat_id } = feature;\n\n const isFilter = +cat_id === ${e};\n\n return isFilter;\n }`,draw:{points:K_({texture:`POI_${e}`})}}}return t},K_=({texture:e,size:t=20})=>({texture:e,size:t,sprite:"base",placement:"midpoint"}),Y_=W_.reduce((e,t)=>({...e,...H_(t)}),{}),X_=e=>{const t=[],n={id:gn(),data:{source:e,layer:c_.POI},draw:{points:{text:{text_source:q_,font:{fill:"#464544",size:"12px"}}}},sublayers:Y_};return t.push(n),t},Q_=e=>{const t=[],n={source:e,layer:c_.POINT_ADDRESS,minzoom:15},i={id:gn(),data:n,draw:{text:{text_source:"address",font:{fill:"black",size:"12px"}}}};return t.push(i),t},J_=e=>{const t=[],n={source:e,layer:c_.RAILROAD_LINK},i={id:gn(),data:n,draw:{lines:{color:"#A3A8A",width:5,dash:[1,2],dash_background_color:[0,0,0],join:"round"}}};return t.push(i),t},eg={fileName:"traffic-sign",extension:"svg",dopsCount:2,widths:{map:20,preview:40}},tg={1.1:{title:"Железнодорожный переезд со шлагбаумом",height:20,type:"Предупреждающие знаки"},1.2:{title:"Железнодорожный переезд без шлагбаума",height:20,type:"Предупреждающие знаки"},"1.3.1":{title:"Однопутная железная дорога",height:20,type:"Предупреждающие знаки"},"1.3.2":{title:"Многопутная железная дорога",height:20,type:"Предупреждающие знаки"},"1.4.1":{title:"Приближение к железнодорожному переезду",height:40,type:"Предупреждающие знаки"},"1.4.2":{title:"Приближение к железнодорожному переезду",height:40,type:"Предупреждающие знаки"},"1.4.3":{title:"Приближение к железнодорожному переезду",height:40,type:"Предупреждающие знаки"},"1.4.4":{title:"Приближение к железнодорожному переезду",height:40,type:"Предупреждающие знаки"},"1.4.5":{title:"Приближение к железнодорожному переезду",height:40,type:"Предупреждающие знаки"},"1.4.6":{title:"Приближение к железнодорожному переезду",height:40,type:"Предупреждающие знаки"},1.5:{title:"Пересечение с трамвайной линией",height:20,type:"Предупреждающие знаки"},1.6:{title:"Пересечение равнозначных дорог",height:20,type:"Предупреждающие знаки"},1.7:{title:"Пересечение с круговым движением",height:20,type:"Предупреждающие знаки"},1.8:{title:"Светофорное регулирование",height:20,type:"Предупреждающие знаки"},1.9:{title:"Разводной мост",height:20,type:"Предупреждающие знаки"},"1.10":{title:"Выезд на набережную",height:20,type:"Предупреждающие знаки"},"1.11.1":{title:"Опасный поворот (правый)",height:20,type:"Предупреждающие знаки"},"1.11.2":{title:"Опасный поворот (левый)",height:20,type:"Предупреждающие знаки"},"1.12.1":{title:"Опасные повороты",height:20,type:"Предупреждающие знаки"},"1.12.2":{title:"Опасные повороты",height:20,type:"Предупреждающие знаки"},1.13:{title:"Крутой спуск",height:20,type:"Предупреждающие знаки"},1.14:{title:"Крутой подъём",height:20,type:"Предупреждающие знаки"},1.15:{title:"Скользкая дорога",height:20,type:"Предупреждающие знаки"},1.16:{title:"Неровная дорога",height:20,type:"Предупреждающие знаки"},1.17:{title:"Искусственная неровность",height:20,type:"Предупреждающие знаки"},1.18:{title:"Выброс гравия",height:20,type:"Предупреждающие знаки"},1.19:{title:"Опасная обочина",height:20,type:"Предупреждающие знаки"},"1.20.1":{title:"Сужение дороги",height:20,type:"Предупреждающие знаки"},"1.20.2":{title:"Сужение дороги",height:20,type:"Предупреждающие знаки"},"1.20.3":{title:"Сужение дороги",height:20,type:"Предупреждающие знаки"},1.21:{title:"Двустороннее движение",height:20,type:"Предупреждающие знаки"},1.22:{title:"Пешеходный переход",height:20,type:"Предупреждающие знаки"},1.23:{title:"Дети",height:20,type:"Предупреждающие знаки"},1.24:{title:"Пересечение с велосипедной дорожкой или велопешеходной дорожкой",height:20,type:"Предупреждающие знаки"},1.25:{title:"Дорожные работы",height:20,type:"Предупреждающие знаки"},1.26:{title:"Перегон скота",height:20,type:"Предупреждающие знаки"},1.27:{title:"Дикие животные",height:20,type:"Предупреждающие знаки"},1.28:{title:"Падение камней",height:20,type:"Предупреждающие знаки"},1.29:{title:"Боковой ветер",height:20,type:"Предупреждающие знаки"},"1.30":{title:"Низколетящие самолёты",height:20,type:"Предупреждающие знаки"},1.31:{title:"Тоннель",height:20,type:"Предупреждающие знаки"},1.32:{title:"Затор",height:20,type:"Предупреждающие знаки"},1.33:{title:"Прочие опасности",height:20,type:"Предупреждающие знаки"},"1.34.1 A":{title:"Направление поворота",height:20,type:"Предупреждающие знаки"},"1.34.1 B":{title:"Направление поворота",height:20,type:"Предупреждающие знаки"},"1.34.1 C":{title:"Направление поворота",height:20,type:"Предупреждающие знаки"},"1.34.2 A":{title:"Направление поворота",height:20,type:"Предупреждающие знаки"},"1.34.2 B":{title:"Направление поворота",height:20,type:"Предупреждающие знаки"},"1.34.2 C":{title:"Направление поворота",height:20,type:"Предупреждающие знаки"},"1.34.3 A":{title:"Направление поворота",height:20,type:"Предупреждающие знаки"},"1.34.3 B":{title:"Направление поворота",height:20,type:"Предупреждающие знаки"},1.35:{title:"Участок перекрёстка",height:20,type:"Предупреждающие знаки"},2.1:{title:"Главная дорога",height:20,type:"Знаки приоритета"},2.2:{title:"Конец главной дороги",height:20,type:"Знаки приоритета"},"2.3.1":{title:"Пересечение со второстепенной дорогой",height:20,type:"Знаки приоритета"},"2.3.2":{title:"Примыкание второстепенной дороги",height:20,type:"Знаки приоритета"},"2.3.3":{title:"Примыкание второстепенной дороги",height:20,type:"Знаки приоритета"},"2.3.4":{title:"Примыкание второстепенной дороги",height:20,type:"Знаки приоритета"},"2.3.5":{title:"Примыкание второстепенной дороги",height:20,type:"Знаки приоритета"},"2.3.6":{title:"Примыкание второстепенной дороги",height:20,type:"Знаки приоритета"},"2.3.7":{title:"Примыкание второстепенной дороги",height:20,type:"Знаки приоритета"},2.4:{title:"Уступите дорогу",height:20,type:"Знаки приоритета"},2.5:{title:"Движение без остановки запрещено",height:20,type:"Знаки приоритета"},2.6:{title:"Преимущество встречного движения",height:20,type:"Знаки приоритета"},2.7:{title:"Преимущество перед встречным движением",height:20,type:"Знаки приоритета"},3.1:{title:"Въезд запрещён",height:20,type:"Запрещающие знаки"},3.2:{title:"Движение запрещено",height:20,type:"Запрещающие знаки"},3.3:{title:"Движение механических транспортных средств запрещено",height:20,type:"Запрещающие знаки"},3.4:{title:"Движение грузовых автомобилей запрещено",height:20,type:"Запрещающие знаки"},3.5:{title:"Движение мотоциклов запрещено",height:20,type:"Запрещающие знаки"},3.6:{title:"Движение тракторов запрещено",height:20,type:"Запрещающие знаки"},3.7:{title:"Движение с прицепом запрещено",height:20,type:"Запрещающие знаки"},3.8:{title:"Движение гужевых повозок запрещено",height:20,type:"Запрещающие знаки"},3.9:{title:"Движение на велосипедах запрещено",height:20,type:"Запрещающие знаки"},"3.10":{title:"Движение пешеходов запрещено",height:20,type:"Запрещающие знаки"},3.11:{title:"Ограничение массы",height:20,type:"Запрещающие знаки"},3.12:{title:"Ограничение массы, приходящейся на ось транспортного средства",height:20,type:"Запрещающие знаки"},3.13:{title:"Ограничение высоты",height:20,type:"Запрещающие знаки"},3.14:{title:"Ограничение ширины",height:20,type:"Запрещающие знаки"},3.15:{title:"Ограничение длины",height:20,type:"Запрещающие знаки"},3.16:{title:"Ограничение минимальной дистанции",height:20,type:"Запрещающие знаки"},"3.17.1":{title:"Таможня",height:20,type:"Запрещающие знаки"},"3.17.2":{title:"Опасность",height:20,type:"Запрещающие знаки"},"3.17.3":{title:"Контроль",height:20,type:"Запрещающие знаки"},"3.18.1":{title:"Поворот направо запрещён",height:20,type:"Запрещающие знаки"},"3.18.2":{title:"Поворот налево запрещён",height:20,type:"Запрещающие знаки"},3.19:{title:"Разворот запрещён",height:20,type:"Запрещающие знаки"},"3.20":{title:"Обгон запрещён",height:20,type:"Запрещающие знаки"},3.21:{title:"Конец зоны запрещения обгона",height:20,type:"Запрещающие знаки"},3.22:{title:"Обгон грузовым автомобилям запрещён",height:20,type:"Запрещающие знаки"},3.23:{title:"Конец зоны запрещения обгона грузовым автомобилям",height:20,type:"Запрещающие знаки"},"3.24-50":{title:"Ограничение максимальной скорости",height:20,type:"Запрещающие знаки"},"3.25-50":{title:"Конец зоны ограничения максимальной скорости",height:20,type:"Запрещающие знаки"},3.26:{title:"Подача звукового сигнала запрещена",height:20,type:"Запрещающие знаки"},3.27:{title:"Остановка запрещена",height:20,type:"Запрещающие знаки"},3.28:{title:"Стоянка запрещена",height:20,type:"Запрещающие знаки"},3.29:{title:"Стоянка запрещена по нечётным числам месяца.",height:20,type:"Запрещающие знаки"},"3.30":{title:"Стоянка запрещена по чётным числам месяца",height:20,type:"Запрещающие знаки"},3.31:{title:"Конец зоны всех ограничений",height:20,type:"Запрещающие знаки"},3.32:{title:"Движение транспортных средств с опасными грузами запрещено",height:20,type:"Запрещающие знаки"},3.33:{title:"Движение транспортных средств с взрывчатыми и легковоспламеняющимися грузами запрещено",height:20,type:"Запрещающие знаки"},3.34:{title:"Движение автобусов запрещено",height:20,type:"Запрещающие знаки"},3.35:{title:"Движение на средствах индивидуальной мобильности запрещено",height:20,type:"Запрещающие знаки"},"4.1.1":{title:"Движение прямо",height:20,type:"Предписывающие знаки"},"4.1.2":{title:"Движение направо",height:20,type:"Предписывающие знаки"},"4.1.3":{title:"Движение налево",height:20,type:"Предписывающие знаки"},"4.1.4":{title:"Движение прямо или направо",height:20,type:"Предписывающие знаки"},"4.1.5":{title:"Движение прямо или налево",height:20,type:"Предписывающие знаки"},"4.1.6":{title:"Движение направо или налево",height:20,type:"Предписывающие знаки"},"4.2.1":{title:"Объезд препятствия справа",height:20,type:"Предписывающие знаки"},"4.2.2":{title:"Объезд препятствия слева",height:20,type:"Предписывающие знаки"},"4.2.3":{title:"Объезд препятствия справа или слева",height:20,type:"Предписывающие знаки"},4.3:{title:"Круговое движение",height:20,type:"Предписывающие знаки"},"4.4.1":{title:"Велосипедная дорожка",height:20,type:"Предписывающие знаки"},"4.4.2":{title:"Конец велосипедной дорожки",height:20,type:"Предписывающие знаки"},"4.5.1":{title:"Пешеходная дорожка",height:20,type:"Предписывающие знаки"},"4.5.2":{title:"Пешеходная и велосипедная дорожка с совмещённым движением",height:20,type:"Предписывающие знаки"},"4.5.3":{title:"Конец пешеходной и велосипедной дорожки с совмещённым движением",height:20,type:"Предписывающие знаки"},"4.5.4":{title:"Пешеходная и велосипедная дорожка с разделением движения",height:20,type:"Предписывающие знаки"},"4.5.5":{title:"Пешеходная и велосипедная дорожка с разделением движения",height:20,type:"Предписывающие знаки"},"4.5.6":{title:"Конец пешеходной и велосипедной дорожки с разделением движения",height:20,type:"Предписывающие знаки"},"4.5.7":{title:"Конец пешеходной и велосипедной дорожки с разделением движения",height:20,type:"Предписывающие знаки"},"4.6-50":{title:"Ограничение минимальной скорости",height:20,type:"Предписывающие знаки"},"4.7-50":{title:"Конец зоны ограничения минимальной скорости",height:20,type:"Предписывающие знаки"},"4.8.1":{title:"Направление движения транспортных средств с опасными грузами",height:30,type:"Предписывающие знаки"},"4.8.2":{title:"Направление движения транспортных средств с опасными грузами",height:30,type:"Предписывающие знаки"},"4.8.3":{title:"Направление движения транспортных средств с опасными грузами",height:30,type:"Предписывающие знаки"},5.1:{title:"Автомагистраль",height:30,type:"Знаки особых предписаний"},5.2:{title:"Конец автомагистрали",height:30,type:"Знаки особых предписаний"},5.3:{title:"Дорога для автомобилей",height:30,type:"Знаки особых предписаний"},5.4:{title:"Конец дороги для автомобилей",height:30,type:"Знаки особых предписаний"},5.5:{title:"Дорога с односторонним движением",height:20,type:"Знаки особых предписаний"},5.6:{title:"Конец дороги с односторонним движением",height:20,type:"Знаки особых предписаний"},"5.7.1":{title:"Выезд на дорогу с односторонним движением",height:20,type:"Знаки особых предписаний"},"5.7.2":{title:"Выезд на дорогу с односторонним движением",height:20,type:"Знаки особых предписаний"},5.8:{title:"Реверсивное движение",height:20,type:"Знаки особых предписаний"},5.9:{title:"Конец реверсивного движения",height:20,type:"Знаки особых предписаний"},"5.10":{title:"Выезд на дорогу с реверсивным движением",height:20,type:"Знаки особых предписаний"},"5.11.1":{title:"Дорога с полосой для маршрутных транспортных средств",height:20,type:"Знаки особых предписаний"},"5.11.2":{title:"Дорога с полосой для велосипедистов",height:20,type:"Знаки особых предписаний"},"5.12.1":{title:"Конец дороги с полосой для маршрутных транспортных средств",height:20,type:"Знаки особых предписаний"},"5.12.2":{title:"Конец дороги с полосой для велосипедистов",height:20,type:"Знаки особых предписаний"},"5.13.1":{title:"Выезд на дорогу с полосой для маршрутных транспортных средств",height:20,type:"Знаки особых предписаний"},"5.13.2":{title:"Выезд на дорогу с полосой для маршрутных транспортных средств",height:20,type:"Знаки особых предписаний"},"5.13.3":{title:"Выезд на дорогу с полосой для велосипедистов",height:20,type:"Знаки особых предписаний"},"5.13.4":{title:"Выезд на дорогу с полосой для велосипедистов",height:20,type:"Знаки особых предписаний"},"5.14.1":{title:"Полоса для маршрутных транспортных средств",height:20,type:"Знаки особых предписаний"},"5.14.2":{title:"Полоса для велосипедистов",height:20,type:"Знаки особых предписаний"},"5.14.3":{title:"Конец полосы для маршрутных транспортных средств",height:20,type:"Знаки особых предписаний"},"5.14.4":{title:"Конец полосы для велосипедистов",height:20,type:"Знаки особых предписаний"},"5.15.1":{title:"Направления движения по полосам",height:20,type:"Знаки особых предписаний"},"5.15.2 A":{title:"Направления движения по полосе",height:20,type:"Знаки особых предписаний"},"5.15.2 B":{title:"Направления движения по полосе",height:20,type:"Знаки особых предписаний"},"5.15.2 C":{title:"Направления движения по полосе",height:20,type:"Знаки особых предписаний"},"5.15.2 D":{title:"Направления движения по полосе",height:20,type:"Знаки особых предписаний"},"5.15.2 E":{title:"Направления движения по полосе",height:20,type:"Знаки особых предписаний"},"5.15.2 F":{title:"Направления движения по полосе",height:20,type:"Знаки особых предписаний"},"5.15.2 G":{title:"Направления движения по полосе",height:20,type:"Знаки особых предписаний"},"5.15.2 H":{title:"Направления движения по полосе",height:20,type:"Знаки особых предписаний"},"5.15.2 I":{title:"Направления движения по полосе",height:20,type:"Знаки особых предписаний"},"5.15.2 K":{title:"Направления движения по полосе",height:20,type:"Знаки особых предписаний"},"5.15.3 A":{title:"Начало полосы",height:20,type:"Знаки особых предписаний"},"5.15.3 B":{title:"Начало полосы",height:20,type:"Знаки особых предписаний"},"5.15.3 C":{title:"Начало полосы",height:20,type:"Знаки особых предписаний"},"5.15.4 A":{title:"Начало полосы",height:20,type:"Знаки особых предписаний"},"5.15.4 B":{title:"Начало полосы",height:20,type:"Знаки особых предписаний"},"5.15.5":{title:"Конец полосы",height:20,type:"Знаки особых предписаний"},"5.15.6":{title:"Конец полосы",height:20,type:"Знаки особых предписаний"},"5.15.7 A":{title:"Направление движения по полосам",height:20,type:"Знаки особых предписаний"},"5.15.7 B":{title:"Направление движения по полосам",height:20,type:"Знаки особых предписаний"},"5.15.7 C":{title:"Направление движения по полосам",height:20,type:"Знаки особых предписаний"},"5.15.8":{title:"Число полос",height:20,type:"Знаки особых предписаний"},5.16:{title:"Место остановки автобуса и (или) троллейбуса",height:30,type:"Знаки особых предписаний"},5.17:{title:"Место остановки трамвая",height:30,type:"Знаки особых предписаний"},5.18:{title:"Место стоянки легковых такси",height:30,type:"Знаки особых предписаний"},"5.19.1":{title:"Пешеходный переход",height:20,type:"Знаки особых предписаний"},"5.19.2":{title:"Пешеходный переход",height:20,type:"Знаки особых предписаний"},"5.19.3":{title:"Диагональный пешеходный переход",height:20,type:"Знаки особых предписаний"},"5.19.4 A":{title:"Диагональный пешеходный переход",height:20,type:"Знаки особых предписаний"},"5.19.4 B":{title:"Диагональный пешеходный переход",height:20,type:"Знаки особых предписаний"},"5.20":{title:"Искусственная неровность",height:20,type:"Знаки особых предписаний"},5.21:{title:"Жилая зона",height:30,type:"Знаки особых предписаний"},5.22:{title:"Конец жилой зоны",height:30,type:"Знаки особых предписаний"},"5.23.1":{title:"Начало населённого пункта",height:20,type:"Знаки особых предписаний"},"5.23.2":{title:"Начало населённого пункта",height:20,type:"Знаки особых предписаний"},"5.24.1":{title:"Конец населённого пункта",height:20,type:"Знаки особых предписаний"},"5.24.2":{title:"Конец населённого пункта",height:20,type:"Знаки особых предписаний"},5.25:{title:"Начало населённого пункта",height:20,type:"Знаки особых предписаний"},5.26:{title:"Конец населённого пункта",height:20,type:"Знаки особых предписаний"},5.27:{title:"Зона с ограничением стоянки",height:30,type:"Знаки особых предписаний"},5.28:{title:"Конец зоны с ограничением стоянки",height:30,type:"Знаки особых предписаний"},5.29:{title:"Зона регулируемой стоянки",height:30,type:"Знаки особых предписаний"},"5.30":{title:"Конец зоны регулируемой стоянки",height:30,type:"Знаки особых предписаний"},5.31:{title:"Зона с ограничением максимальной скорости",height:30,type:"Знаки особых предписаний"},5.32:{title:"Конец зоны с ограничением максимальной скорости",height:30,type:"Знаки особых предписаний"},5.33:{title:"Пешеходная зона",height:30,type:"Знаки особых предписаний"},5.34:{title:"Конец пешеходной зоны",height:30,type:"Знаки особых предписаний"},5.35:{title:"Зона с ограничением экологического класса механических транспортных средств",height:30,type:"Знаки особых предписаний"},5.36:{title:"Конец зоны с ограничением экологического класса механических транспортных средств",height:30,type:"Знаки особых предписаний"},"5.37 A":{title:"Зона с ограничением экологического класса по видам транспортных средств",height:30,type:"Знаки особых предписаний"},"5.37 B":{title:"Зона с ограничением экологического класса по видам транспортных средств",height:30,type:"Знаки особых предписаний"},"5.38 A":{title:"Конец зоны с ограничением экологического класса по видам транспортных средств",height:30,type:"Знаки особых предписаний"},"5.38 B":{title:"Конец зоны с ограничением экологического класса по видам транспортных средств",height:30,type:"Знаки особых предписаний"},5.39:{title:"Велосипедная зона",height:30,type:"Знаки особых предписаний"},"5.40":{title:"Конец велосипедной зоны",height:30,type:"Знаки особых предписаний"},6.1:{title:"Общие ограничения максимальной скорости",height:30,type:"Информационные знаки"},"6.2-50":{title:"Рекомендуемая скорость",height:20,type:"Информационные знаки"},"6.3.1":{title:"Место для разворота",height:20,type:"Информационные знаки"},"6.3.2":{title:"Зона для разворота",height:20,type:"Информационные знаки"},"6.4 A":{title:"Парковка (парковочное место)",height:20,type:"Информационные знаки"},"6.4 B":{title:"Парковка (платные услуги)",height:20,type:"Информационные знаки"},"6.4 C":{title:"Парковка (только для инвалидов)",height:20,type:"Информационные знаки"},6.5:{title:"Полоса аварийной остановки",height:20,type:"Информационные знаки"},6.6:{title:"Подземный пешеходный переход",height:20,type:"Информационные знаки"},6.7:{title:"Надземный пешеходный переход",height:20,type:"Информационные знаки"},"6.8.1":{title:"Тупик",height:20,type:"Информационные знаки"},"6.8.2":{title:"Тупик",height:20,type:"Информационные знаки"},"6.8.3":{title:"Тупик",height:20,type:"Информационные знаки"},"6.9.1 A":{title:"Предварительный указатель направлений",height:20,type:"Информационные знаки"},"6.9.1 B":{title:"Предварительный указатель направлений",height:20,type:"Информационные знаки"},"6.9.1 C":{title:"Предварительный указатель направлений",height:20,type:"Информационные знаки"},"6.9.1 D":{title:"Предварительный указатель направлений",height:20,type:"Информационные знаки"},"6.9.1 E":{title:"Предварительный указатель направлений",height:20,type:"Информационные знаки"},"6.9.1 F":{title:"Предварительный указатель направлений",height:20,type:"Информационные знаки"},"6.9.2 A":{title:"Предварительный указатель направления",height:20,type:"Информационные знаки"},"6.9.2 B":{title:"Предварительный указатель направления",height:20,type:"Информационные знаки"},"6.9.2 C":{title:"Предварительный указатель направления",height:20,type:"Информационные знаки"},"6.9.3":{title:"Схема движения",height:20,type:"Информационные знаки"},"6.10.1 A":{title:"Указатель направлений",height:20,type:"Информационные знаки"},"6.10.1 B":{title:"Указатель направлений",height:20,type:"Информационные знаки"},"6.10.1 C":{title:"Указатель направлений",height:20,type:"Информационные знаки"},"6.10.1 D":{title:"Указатель направлений",height:20,type:"Информационные знаки"},"6.10.1 E":{title:"Указатель направлений",height:20,type:"Информационные знаки"},"6.10.1 F":{title:"Указатель направлений",height:20,type:"Информационные знаки"},"6.10.1 G":{title:"Указатель направлений",height:20,type:"Информационные знаки"},"6.10.2 A":{title:"Указатель направления",height:20,type:"Информационные знаки"},"6.10.2 B":{title:"Указатель направления",height:20,type:"Информационные знаки"},"6.11 A":{title:"Наименование объекта",height:20,type:"Информационные знаки"},"6.11 B":{title:"Наименование объекта",height:20,type:"Информационные знаки"},"6.11 C":{title:"Наименование объекта",height:20,type:"Информационные знаки"},"6.11 D":{title:"Наименование объекта",height:20,type:"Информационные знаки"},"6.12 A":{title:"Указатель расстояний",height:20,type:"Информационные знаки"},"6.12 B":{title:"Указатель расстояний",height:20,type:"Информационные знаки"},"6.12 C":{title:"Указатель расстояний",height:20,type:"Информационные знаки"},"6.13 A":{title:"Километровый знак",height:20,type:"Информационные знаки"},"6.13 B":{title:"Километровый знак",height:20,type:"Информационные знаки"},"6.13 C":{title:"Километровый знак",height:20,type:"Информационные знаки"},"6.13 D":{title:"Километровый знак",height:20,type:"Информационные знаки"},"6.13 E":{title:"Километровый знак",height:20,type:"Информационные знаки"},"6.14.1 A":{title:"Номер маршрута",height:20,type:"Информационные знаки"},"6.14.1 B":{title:"Номер маршрута",height:20,type:"Информационные знаки"},"6.14.1 C":{title:"Номер маршрута",height:20,type:"Информационные знаки"},"6.14.1 D":{title:"Номер маршрута",height:20,type:"Информационные знаки"},"6.14.2 A":{title:"Номер маршрута",height:20,type:"Информационные знаки"},"6.14.2 B":{title:"Номер маршрута",height:20,type:"Информационные знаки"},"6.14.2 C":{title:"Номер маршрута",height:20,type:"Информационные знаки"},"6.15.1":{title:"Направление движения для грузовых автомобилей",height:20,type:"Информационные знаки"},"6.15.2":{title:"Направление движения для грузовых автомобилей",height:20,type:"Информационные знаки"},"6.15.3":{title:"Направление движения для грузовых автомобилей",height:20,type:"Информационные знаки"},6.16:{title:"Стоп-линия",height:20,type:"Информационные знаки"},6.17:{title:"Схема объезда",height:25,type:"Информационные знаки"},"6.18.1":{title:"Направление объезда",height:20,type:"Информационные знаки"},"6.18.2":{title:"Направление объезда",height:20,type:"Информационные знаки"},"6.18.3":{title:"Направление объезда",height:20,type:"Информационные знаки"},"6.19.1":{title:"Предварительный указатель перестроения на другую проезжую часть",height:25,type:"Информационные знаки"},"6.19.2":{title:"Предварительный указатель перестроения на другую проезжую часть",height:25,type:"Информационные знаки"},"6.20.1":{title:"Аварийный выход",height:20,type:"Информационные знаки"},"6.20.2":{title:"Аварийный выход",height:20,type:"Информационные знаки"},"6.21.1":{title:"Направление движения к аварийному выходу",height:20,type:"Информационные знаки"},"6.21.2":{title:"Направление движения к аварийному выходу",height:20,type:"Информационные знаки"},6.22:{title:"Фотовидеофиксация",height:20,type:"Информационные знаки"},7.1:{title:"Пункт медицинской помощи",height:30,type:"Знаки сервиса"},7.2:{title:"Больница",height:30,type:"Знаки сервиса"},7.3:{title:"Автозаправочная станция",height:30,type:"Знаки сервиса"},7.4:{title:"Техническое обслуживание автомобилей",height:30,type:"Знаки сервиса"},7.5:{title:"Мойка автомобилей",height:30,type:"Знаки сервиса"},7.6:{title:"Телефон",height:30,type:"Знаки сервиса"},7.7:{title:"Пункт питания",height:30,type:"Знаки сервиса"},7.8:{title:"Питьевая вода",height:30,type:"Знаки сервиса"},7.9:{title:"Гостиница или мотель",height:30,type:"Знаки сервиса"},"7.10":{title:"Кемпинг",height:30,type:"Знаки сервиса"},7.11:{title:"Место отдыха",height:30,type:"Знаки сервиса"},7.12:{title:"Пост ДПС",height:30,type:"Знаки сервиса"},7.13:{title:"Полиция",height:30,type:"Знаки сервиса"},"7.14.1":{title:"Пункт таможенного контроля",height:30,type:"Знаки сервиса"},"7.14.2":{title:"Пункт транспортного контроля",height:30,type:"Знаки сервиса"},7.15:{title:"Зона приёма радиостанции, передающей информацию о дорожном движении",height:30,type:"Знаки сервиса"},7.16:{title:"Зона радиосвязи с аварийными службами",height:30,type:"Знаки сервиса"},7.17:{title:"Бассейн или пляж",height:30,type:"Знаки сервиса"},7.18:{title:"Туалет",height:30,type:"Знаки сервиса"},7.19:{title:"Телефон экстренной связи",height:30,type:"Знаки сервиса"},"7.20":{title:"Огнетушитель",height:30,type:"Знаки сервиса"},7.21:{title:"Автозаправочная станция с возможностью зарядки электромобилей",height:30,type:"Знаки сервиса"}},ng={"8.1.1":{title:"Расстояние до объекта",height:20,type:"Знаки дополнительной информации"},"8.1.2":{title:"Расстояние до объекта",height:20,type:"Знаки дополнительной информации"},"8.1.3":{title:"Расстояние до объекта",height:20,type:"Знаки дополнительной информации"},"8.1.4":{title:"Расстояние до объекта",height:20,type:"Знаки дополнительной информации"},"8.2.1":{title:"Зона действия",height:20,type:"Знаки дополнительной информации"},"8.2.2":{title:"Зона действия",height:40,type:"Знаки дополнительной информации"},"8.2.3":{title:"Зона действия",height:40,type:"Знаки дополнительной информации"},"8.2.4":{title:"Зона действия",height:40,type:"Знаки дополнительной информации"},"8.2.5":{title:"Зона действия",height:20,type:"Знаки дополнительной информации"},"8.2.6":{title:"Зона действия",height:20,type:"Знаки дополнительной информации"},"8.3.1":{title:"Направления действия",height:20,type:"Знаки дополнительной информации"},"8.3.2":{title:"Направления действия",height:20,type:"Знаки дополнительной информации"},"8.3.3":{title:"Направления действия",height:20,type:"Знаки дополнительной информации"},"8.4.1":{title:"Вид транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.2":{title:"Вид транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.3.1":{title:"Вид транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.3.2":{title:"Вид транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.4":{title:"Вид транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.5":{title:"Вид транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.6":{title:"Вид транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.7.1":{title:"Вид транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.7.2":{title:"Вид транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.8":{title:"Вид транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.9":{title:"Кроме вида транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.10":{title:"Кроме вида транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.11":{title:"Кроме вида транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.12":{title:"Кроме вида транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.13":{title:"Кроме вида транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.14":{title:"Кроме вида транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.15":{title:"Кроме вида транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.5.1":{title:"Субботние, воскресные и праздничные дни",height:20,type:"Знаки дополнительной информации"},"8.5.2":{title:"Рабочие дни",height:20,type:"Знаки дополнительной информации"},"8.5.3":{title:"Дни недели",height:20,type:"Знаки дополнительной информации"},"8.5.4":{title:"Время действия",height:20,type:"Знаки дополнительной информации"},"8.5.5":{title:"Время действия",height:20,type:"Знаки дополнительной информации"},"8.5.6":{title:"Время действия",height:20,type:"Знаки дополнительной информации"},"8.5.7":{title:"Время действия",height:20,type:"Знаки дополнительной информации"},"8.6.1":{title:"Способ постановки транспортного средства на стоянку",height:20,type:"Знаки дополнительной информации"},"8.6.2":{title:"Способ постановки транспортного средства на стоянку",height:20,type:"Знаки дополнительной информации"},"8.6.3":{title:"Способ постановки транспортного средства на стоянку",height:20,type:"Знаки дополнительной информации"},"8.6.4":{title:"Способ постановки транспортного средства на стоянку",height:20,type:"Знаки дополнительной информации"},"8.6.5":{title:"Способ постановки транспортного средства на стоянку",height:20,type:"Знаки дополнительной информации"},"8.6.6":{title:"Способ постановки транспортного средства на стоянку",height:20,type:"Знаки дополнительной информации"},"8.6.7":{title:"Способ постановки транспортного средства на стоянку",height:20,type:"Знаки дополнительной информации"},"8.6.8":{title:"Способ постановки транспортного средства на стоянку",height:20,type:"Знаки дополнительной информации"},"8.6.9":{title:"Способ постановки транспортного средства на стоянку",height:20,type:"Знаки дополнительной информации"},8.7:{title:"Стоянка с неработающим двигателем",height:20,type:"Знаки дополнительной информации"},8.8:{title:"Платные услуги",height:20,type:"Знаки дополнительной информации"},"8.9.1":{title:"Ограничение продолжительности стоянки",height:20,type:"Знаки дополнительной информации"},"8.9.2":{title:"Стоянка только для владельцев парковочных разрешений",height:20,type:"Знаки дополнительной информации"},"8.9.3":{title:"Стоянка только транспортных средств дипломатического корпуса",height:20,type:"Знаки дополнительной информации"},"8.10":{title:"Место для осмотра автомобилей",height:20,type:"Знаки дополнительной информации"},8.11:{title:"Ограничение разрешённой максимальной массы",height:20,type:"Знаки дополнительной информации"},8.12:{title:"Опасная обочина",height:20,type:"Знаки дополнительной информации"},8.13:{title:"Направление главной дороги",height:20,type:"Знаки дополнительной информации"},"8.13 B":{title:"Направление главной дороги",height:20,type:"Знаки дополнительной информации"},8.14:{title:"Полоса движения",height:20,type:"Знаки дополнительной информации"},8.15:{title:"Слепые пешеходы",height:20,type:"Знаки дополнительной информации"},8.16:{title:"Влажное покрытие",height:20,type:"Знаки дополнительной информации"},8.17:{title:"Инвалиды",height:20,type:"Знаки дополнительной информации"},8.18:{title:"Кроме инвалидов",height:20,type:"Знаки дополнительной информации"},8.19:{title:"Класс опасного груза",height:20,type:"Знаки дополнительной информации"},"8.20.1":{title:"Тип тележки транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.20.2":{title:"Тип тележки транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.21.1":{title:"Вид маршрутного транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.21.2":{title:"Вид маршрутного транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.21.3":{title:"Вид маршрутного транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.22.1":{title:"Препятствие",height:68,type:"Знаки дополнительной информации"},"8.22.2":{title:"Препятствие",height:68,type:"Знаки дополнительной информации"},"8.22.3":{title:"Препятствие",height:68,type:"Знаки дополнительной информации"},8.24:{title:"Работает эвакуатор",height:20,type:"Знаки дополнительной информации"},8.25:{title:"Экологический класс транспортного средства",height:20,type:"Знаки дополнительной информации"},8.26:{title:"Зарядка электромобилей",height:20,type:"Знаки дополнительной информации"}},ig={...tg,...ng},rg=e=>{const t=[],n={source:e,layer:c_.TRAFFIC_SIGN},i={},r={};Object.keys(tg).forEach(e=>{const t=`${eg.fileName}-${e}`,{height:n}=tg[e],s=sg({type:"map",number:e});i[t]={url:s,filtering:"mipmap",sprites:{base:[0,0,eg.widths.map,n]}},r[t]={filter:`function() {\n const { traffic_sign_number } = feature;\n\n const isFilter = traffic_sign_number === '${e}';\n\n return isFilter;\n }`,draw:{points:{collide:!1,texture:t,size:[eg.widths.map,n],sprite:"base",placement:"midpoint"}}}});const s={id:gn(),data:n,textures:i,sublayers:r};return t.push(s),t},sg=({type:e,number:t})=>{const n=eg.widths[e];return wn(`msk/${eg.fileName}_${n}/${t}.${eg.extension}`)},og=e=>{const t={};e.forEach(({traffic_sign_number:e,traffic_sign_title:n,traffic_sign_type:i,height:r})=>{t[e]={title:n,height:Number(r),type:i}}),_n(t)},ag={size:20,extension:"svg"},lg=e=>{const t=[],n={source:e,layer:c_.TRAFFIC_SIGNAL},i={},r="traffic_signal";i[r]={url:wn(`msk/${r}/${r}_${ag.size}.${ag.extension}`),filtering:"mipmap",sprites:{base:[0,0,ag.size,ag.size]}};const s={id:gn(),data:n,draw:{points:{collide:!1,texture:r,size:ag.size,sprite:"base",placement:"midpoint"}},textures:i,sublayers:{}};return t.push(s),t},ug=e=>{const t=[],n={id:gn(),data:{source:e,layer:c_.WATER_AREA},draw:{polygons:{color:"#7DBEE4"},lines:{color:"#7DBEE4",width:20,cap:"round",join:"round"}}},i={id:gn(),data:{source:e,layer:c_.WATER_AREA_LABEL},filter:"function() {\n const { display_class } = feature;\n\n if ($zoom >= 14) {\n return true;\n } else {\n return display_class <= 4;\n }\n }",draw:{text:{text_source:"name",font:{fill:"#0A80C4",size:"14px",stroke:{color:"white",width:"3px"}}}}},r={id:gn(),data:{source:e,layer:c_.WATER_LAKE_LABEL},filter:"function() {\n const { display_class } = feature;\n\n if ($zoom >= 14) {\n return true;\n } else {\n return display_class <= 4;\n }\n }",draw:{text:{text_source:"name",font:{fill:"#0A80C4",size:"14px",stroke:{color:"white",width:"3px"}}}}};return t.push(n,i,r),t},cg=e=>{const t=[],n={},i={source:e,layer:c_.WATER_LINK},r={id:gn(),data:i};return n.geometry={draw:{lines:{color:"#7DBEE4",width:5,cap:"round",join:"round"}}},n.text={filter:"function() {\n return $zoom >= 10;\n }",draw:{text:{text_source:"name",font:{fill:"#0A80C4",size:"14px",stroke:{color:"white",width:"3px"}}}}},r.sublayers=n,t.push(r),t},hg="white",dg=.5,fg={1.1:{color:hg,width:dg},1.2:{color:hg,width:dg},1.5:{color:hg,width:dg,dash:[4,10]},1.6:{color:hg,width:dg,dash:[5,5]},1.7:{color:hg,width:dg,dash:[4,10]},"1.7-blue":{color:"blue",width:dg,dash:[4,10]},1.8:{color:hg,width:dg},1.12:{color:hg,width:1.5},"1.14.3":{color:hg,width:dg,dash:[3,8]},"1.16.1":{color:hg,width:dg},"1.16.2":{color:hg,width:dg},"1.16.3":{color:hg,width:dg},"1.16.x":{color:hg,width:dg},"1.17.1":{color:"yellow",width:dg},1.26:{color:"yellow",width:dg}};var pg;!function(e){e.ROAD="Road",e.TUNNEL="Tunnel",e.TRAM="Tram",e.CURB="Curb",e.BRIDGE="Bridge"}(pg||(pg={}));const mg={[pg.ROAD]:"#BABCC2",[pg.TUNNEL]:"#EAEBEE",[pg.TRAM]:"#ADA8A8",[pg.CURB]:"#D2D9E6",[pg.BRIDGE]:"#E1DFDD"},_g=({id:e,data:{source:t,layer:n}})=>`${e}-${t}-${n}`,gg=({layer:e,order:t,eventHandlers:n})=>{const i=structuredClone(e),{draw:r,sublayers:s}=i,o=Boolean(n?.[e.data.layer]);if(r){const{points:e,lines:n,polygons:s,text:a,styles:l}=r;e&&(r.points={...structuredClone(e),order:t,interactive:o}),n&&(r.lines={...structuredClone(n),order:t,interactive:o}),s&&(r.polygons={...structuredClone(s),order:t,interactive:o}),a&&(r.text={...structuredClone(a),order:t,interactive:o}),l&&(r.styles=Object.entries(l).reduce((e,[n,i])=>({...e,[n]:{...structuredClone(i),order:t}}),{})),i.draw=structuredClone(r)}return s&&(Object.entries(s).forEach(([e,n])=>{if(n){const{draw:i}=n;if(i){const{points:e,lines:r,polygons:s,text:a}=i;a&&(i.text={...structuredClone(a),order:t,interactive:o}),e&&(i.points={...structuredClone(e),order:t,interactive:o}),r&&(i.lines={...structuredClone(r),order:t,interactive:o}),s&&(i.polygons={...structuredClone(s),order:t,interactive:o}),n.draw=structuredClone(i)}s[e]=structuredClone(n)}}),i.sublayers=structuredClone(s)),i},yg=e=>{const t=y_(e),n=B_(),i=U_(),r=g_(e),s=A_(e),o=T_(e),a=ug(e),l=V_(e),u=[];if(e===h_.MSK)u.push(...t,...r,...s,...o,...a,...l);else u.push(...t,...r,...s,...n,...i,...o,...a,...l);return u},vg=e=>{const t=j_(e),n=J_(e),i=cg(e),r=G_(e),s=E_(e),o=[...i,...n,...t];if(e===h_.MSK);else o.push(...r,...s);return o},bg=e=>{const t=X_(e),n=x_(e);return[...t,...Q_(e),...n,...rg(e),...lg(e),...b_(e),...Z_(e)]},xg=e=>{const t=[],n=__(e),i=yg(e),r=vg(e),s=bg(e),o=(e=>{const t=[],n={source:e,layer:c_.ROAD_POLY};return Object.values(pg).forEach(e=>{const i={id:gn(),data:n,filter:`function() {\n const { type } = feature;\n\n const isFilter = type === '${e}';\n\n return isFilter;\n }`,draw:{polygons:{color:mg[e]}}};t.push(i)}),t})(e),a=(e=>{const t=[],n={source:e,layer:c_.LANE_MARKING_POLY},i={id:gn(),data:n,filter:"function() {\n const { poly_number } = feature;\n\n const isFilter = poly_number === '1.14.1';\n\n return isFilter;\n }",draw:{styles:{zebra_crossing:{attributes:{a_angle:"function() {\n return feature.angle;\n }"}}}}};return t.push(i),t})(e),l=(e=>{const t=[],n={source:e,layer:c_.LANE_MARKING_LINE},i=Object.entries(fg).reduce((e,[t,n])=>{const i={filter:`function () {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '${t}';\n\n return isFilter;\n }`,draw:{lines:n}};return{...e,[t]:i}},{}),r={id:gn(),data:n,sublayers:i},s={"1.3-left":{id:gn(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.3';\n\n return isFilter;\n }",draw:{lines:{color:hg,width:dg,offset:-.5}}},"1.3-right":{id:gn(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.3';\n\n return isFilter;\n }",draw:{lines:{color:hg,width:dg,offset:dg}}},"1.11r-left":{id:gn(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.11r';\n\n return isFilter;\n }",draw:{lines:{color:hg,width:dg,offset:-.5}}},"1.11r-right":{id:gn(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.11r';\n\n return isFilter;\n }",draw:{lines:{color:hg,width:dg,offset:dg,dash:[5,5]}}},"1.11l-left":{id:gn(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.11l';\n\n return isFilter;\n }",draw:{lines:{color:hg,width:dg,offset:-.5,dash:[5,5]}}},"1.11l-right":{id:gn(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.11l';\n\n return isFilter;\n }",draw:{lines:{color:hg,width:dg,offset:dg}}},"1.25-left":{id:gn(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.25';\n\n return isFilter;\n }",draw:{lines:{color:hg,width:1,offset:-.5,dash:[1,1],dash_background_color:[0,0,0,0]}}},"1.25-right":{id:gn(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.25';\n\n return isFilter;\n }",draw:{lines:{color:"rgba(0,0,0,0)",width:1,offset:.5,dash:[1,1],dash_background_color:[1,1,1]}}}};return t.push(r,...Object.values(s)),t})(e),u=S_(e),c=(e=>{const t=[],n={source:e,layer:c_.PARKING_LINE},i={id:gn(),data:n,draw:{lines:{color:"white",width:1}}};return t.push(i),t})(e);if(e===h_.MSK)t.push(...i,...r,...o,...a,...u,...l,...c,...n,...s);else t.push(...i,...r,...n,...s);return t},wg=e=>`${e.getFullYear()}-${`${e.getUTCMonth()+1}`.padStart(2,"0")}-${`${e.getUTCDate()}`.padStart(2,"0")}`,Eg=e=>{const t={[ve.CREATE]:"",[ve.UPDATE]:"",[ve.DELETE]:""};return Object.values(ve).forEach(n=>{t[n]=`${e}-${n}`}),t},Ag=({eventHandlers:t,defaultLayers:n})=>{const[i,r]=e.useState(null),[s,o]=e.useState(null),[a,l]=e.useState(!1),u=e.useMemo(()=>{if(null===i)return null;const{scene:e}=i;return e},[i]),c=e.useCallback(()=>{Promise.resolve().then(function(){return Ob}).then(()=>{if(window.Tangram){const e=window.Tangram.leafletLayer({scene:m_,modifyScrollWheel:!1,modifyZoomBehavior:!1}),{scene:n}=e;n.subscribe({load:({config:e})=>{o(e),l(!0)}}),e.on("load",({sourceTarget:n})=>{const i=n._map;e.setSelectionEvents({click:({feature:e,leaflet_event:n})=>{if(e){const{source_layer:i,properties:r}=e;t?.[i]?.click?.({leaflet_event:n,properties:r})}},hover:({feature:e,leaflet_event:n})=>{const r=i.getContainer();if(e){const{source_layer:i,properties:s}=e;r.style.cursor="pointer",t?.[i]?.hover?.({leaflet_event:n,properties:s})}else r.style.cursor="default"}})}),r(e)}})},[t]),h=e.useCallback(e=>{s?e(s):d_.warn({message:"Config не инициализирована"})},[s]),d=e.useCallback(e=>{h(t=>{u?e({config:t,scene:u}):d_.warn({message:"Scene не инициализирована"})})},[h,u]),f=e.useCallback(e=>{d(({config:t,scene:n})=>{const i=p_[e];t.sources[e]={tile_size:256,url:i,type:"MVT"},n.updateConfig({rebuild:!0})})},[d]),p=e.useCallback(e=>{d(({config:t,scene:n})=>{delete t.sources[e],n.updateConfig({rebuild:!0})})},[d]),m=e.useCallback(e=>{let t=null;return h(n=>{t=structuredClone(n.sources[e])}),t},[h]),_=e.useCallback((e,t)=>{d(({config:n,scene:i})=>{n.sources[e].url=t,i.updateConfig({rebuild:!0})})},[d]),g=e.useCallback(e=>{p(e),f(e)},[p,f]),y=e.useCallback(e=>{d(({config:n,scene:i})=>{const r=E().length+1,s=gg({layer:e,order:r,eventHandlers:t}),o=_g(s),{sublayers:a,draw:l,textures:u}=s;if(l){const{styles:e}=l;e&&(s.draw={...structuredClone(s.draw),...structuredClone(e)})}n.layers[o]={...structuredClone(s),...structuredClone(a)},n.textures={...structuredClone(n.textures),...structuredClone(u)},i.updateConfig({rebuild:!0})})},[d]),v=e.useCallback(e=>{const t=_g(e);d(({config:e,scene:n})=>{delete e.layers[t],n.updateConfig({rebuild:!0})})},[d]),b=e.useCallback(({name:e,style:t})=>{d(({config:n,scene:i})=>{n.styles[e]=structuredClone(t),i.updateConfig({rebuild:!0})})},[d]),x=e.useCallback(e=>{let t=!0;const n=_g(e);return h(e=>{const{visible:i=!0}=e.layers[n];t=i}),t},[_g,h]),w=e.useCallback(({layer:e,visible:t})=>{const n=_g(e);d(({config:e,scene:i})=>{e.layers[n].visible=t,i.updateConfig({rebuild:!0})})},[d]),E=e.useCallback(()=>{const e=[];return h(t=>{e.push(...Object.keys(t.layers))}),e},[h]),A=e.useCallback(()=>{h(e=>{const{layers:t}=e;Object.values(t).forEach(v)})},[h,v]),T=e.useCallback(()=>{const e=[];return h(t=>{e.push(...Object.keys(t.sources))}),e},[s]);return e.useEffect(()=>(ra.instance.isValidApiKey&&c(),()=>{r(null),o(null)}),[ra.instance.isValidApiKey]),e.useEffect(()=>{b({name:"zebra_crossing",style:{base:"polygons",lighting:!1,shaders:{attributes:{a_angle:{type:"float",default:0}},uniforms:{u_stripe_width:1},blocks:{filter:"\n vec3 pos = worldPosition().xyz;\n\n float ang = radians(a_angle);\n\n vec2 dir = vec2(sin(ang), cos(ang));\n\n float positionAlongLine = dot(pos.xy, dir);\n\n float stripe = step(1.0, mod(positionAlongLine / u_stripe_width, 2.0));\n\n color.rgb = mix(vec3(1.0, 1.0, 1.0), vec3(1.0, 0.8, 0.0), stripe);\n \n color.a = 1.0;\n "}}}}),Object.values(h_).forEach(f)},[b,f]),e.useEffect(()=>{n&&a&&n.map(y)},[n,y,a]),{layer:i,scene:u,config:s,addSource:f,getSource:m,updateSource:_,reloadSource:g,addLayer:y,removeLayer:v,addStyle:b,getLayerVisibility:x,toggleLayerVisibility:w,getSources:T,getLayers:E,removeLayers:A}};function Tg(e,t){return Object.freeze({...e,...t})}const Sg=m(null);function kg(){const e=g(Sg);if(null==e)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>");return e}const Og=function(e,t){return null==t?function(t,n){const r=i(void 0);return r.current||(r.current=e(t,n)),r}:function(n,r){const o=i(void 0);o.current||(o.current=e(n,r));const a=i(n),{instance:l}=o.current;return s(function(){a.current!==n&&(t(l,n,a.current),a.current=n)},[l,n,t]),o}}(function({children:e,...t},n){const i=new Pe.Control.Layers(void 0,void 0,t);return r=i,s=Tg(n,{layersControl:i}),Object.freeze({instance:r,context:s,container:o});var r,s,o},function(e,t,n){t.collapsed!==n.collapsed&&(!0===t.collapsed?e.collapse():e.expand())});var Pg;const Cg=function(e){function i(n,i){const{instance:r,context:s}=e(n).current;y(i,()=>r);const{children:o}=n;return null==o?null:t.createElement(Sg,{value:s},o)}return n(i)}((Pg=Og,function(e){const t=kg(),n=Pg(e,t),{instance:r}=n.current,o=i(e.position),{position:a}=e;return s(function(){return r.addTo(t.map),function(){r.remove()}},[t.map,r]),s(function(){null!=a&&a!==o.current&&(r.setPosition(a),o.current=a)},[r,a]),n}));function Rg(e){return function(n){const o=kg(),a=i(n),[u,c]=p(null),{layersControl:h,map:d}=o,f=r(t=>{null!=h&&(a.current.checked&&d.addLayer(t),e(h,t,a.current.name),c(t))},[e,h,d]),m=r(e=>{h?.removeLayer(e),c(null)},[h]),_=l(()=>Tg(o,{layerContainer:{addLayer:f,removeLayer:m}}),[o,f,m]);return s(()=>{null!==u&&a.current!==n&&(!0!==n.checked||null!=a.current.checked&&!1!==a.current.checked?!0!==a.current.checked||null!=n.checked&&!1!==n.checked||d.removeLayer(u):d.addLayer(u),a.current=n)}),n.children?t.createElement(Sg,{value:_},n.children):null}}Cg.BaseLayer=Rg(function(e,t,n){e.addBaseLayer(t,n)}),Cg.Overlay=Rg(function(e,t,n){e.addOverlay(t,n)});class Mg{props;constructor(e){if(this.props=e,ra.instance.isValidApiKey){const e=this._createLayer();if(e){const{scene:t}=e;t.subscribe({load:({config:e})=>{this.config=e,this.isReady=!0,this._init()}}),this.layer=e,this._addHandlers(),this.props.onCreate({layer:e})}}}_createLayer(){if(window.Tangram){return window.Tangram.leafletLayer({scene:m_})}}_addHandlers(){this.layer&&this.layer.addEventListener("load",e=>{const{sourceTarget:t}=e,n=t._map;this.layer&&this.layer.setSelectionEvents({click:({feature:e,leaflet_event:t})=>{if(e){const{source_layer:n,properties:i}=e;this.props.eventHandlers?.[n]?.click?.({leaflet_event:t,properties:i})}},hover:({feature:e,leaflet_event:t})=>{const i=n.getContainer();if(e){const{source_layer:n,properties:r}=e;i.style.cursor="pointer",this.props.eventHandlers?.[n]?.hover?.({leaflet_event:t,properties:r})}else i.style.cursor="default"}})})}removeLayer(){this.layer&&(this.layer.clearAllEventListeners(),this.layer.remove()),this.layer=null}_init(){this.addStyle({name:"zebra_crossing",style:{base:"polygons",lighting:!1,shaders:{attributes:{a_angle:{type:"float",default:0}},uniforms:{u_stripe_width:1},blocks:{filter:"\n vec3 pos = worldPosition().xyz;\n\n float ang = radians(a_angle);\n\n vec2 dir = vec2(sin(ang), cos(ang));\n\n float positionAlongLine = dot(pos.xy, dir);\n\n float stripe = step(1.0, mod(positionAlongLine / u_stripe_width, 2.0));\n\n color.rgb = mix(vec3(1.0, 1.0, 1.0), vec3(1.0, 0.8, 0.0), stripe);\n \n color.a = 1.0;\n "}}}});(this.props.defaultLayers??[]).forEach(e=>{this.addLayer(e)}),Object.values(h_).forEach(e=>{this.addSource(e)})}_layer=null;get layer(){return this._layer}set layer(e){this._layer=e}_config=null;get config(){return this._config}set config(e){this._config=e}_isReady=!1;get isReady(){return this._isReady}set isReady(e){this._isReady=e}get scene(){if(null===this.layer)return null;const{scene:e}=this.layer;return e}addStyle({name:e,style:t}){this.config&&this.scene&&(this.config.styles[e]=structuredClone(t),this.scene.updateConfig({rebuild:!0}))}addSource(e){if(this.config&&this.scene){const t=p_[e];this.config.sources[e]={tile_size:256,url:t,type:"MVT"},this.scene.updateConfig({rebuild:!0})}}deleteSource(e){this.config&&this.scene&&(delete this.config.sources[e],this.scene.updateConfig({rebuild:!0}))}getSource(e){let t=null;return this.config&&(t=structuredClone(this.config.sources[e])),t}updateSource(e,t){this.config&&this.scene&&(this.config.sources[e].url=t,this.scene.updateConfig({rebuild:!0}))}reloadSource(e){this.deleteSource(e),this.addSource(e)}addLayer(e){if(this.config&&this.scene){const t=this.getLayers().length+1,n=gg({layer:e,order:t,eventHandlers:this.props.eventHandlers}),i=_g(n),{sublayers:r,draw:s,textures:o}=n;if(s){const{styles:e={}}=s;e&&(n.draw={...structuredClone(n.draw),...structuredClone(e)})}this.config.layers[i]={...structuredClone(n),...structuredClone(r)},this.config.textures={...structuredClone(this.config.textures),...structuredClone(o)},this.scene.updateConfig({rebuild:!0})}}deleteLayers(){if(this.config){const{layers:e}=this.config;Object.values(e).forEach(e=>{this.deleteLayer(e)})}}deleteLayer(e){const t=_g(e);this.config&&this.scene&&(delete this.config.layers[t],this.scene.updateConfig({rebuild:!0}))}getLayers(){const e=[];return this.config&&e.push(...Object.keys(this.config.layers)),e}getLayerVisibility(e){let t=!0;const n=_g(e);if(this.config){const{visible:e=!0}=this.config.layers[n];t=e}return t}toggleLayerVisibility({layer:e,visible:t}){const n=_g(e);this.config&&this.scene&&(this.config.layers[n].visible=t,this.scene.updateConfig({rebuild:!0}))}}const Lg=({layers:t})=>{const n=e.useRef(null),i=kg().map;return e.useEffect(()=>{const e=Pe.tileLayer("http://{s}.google.com/vt/lyrs=s&x={x}&y={y}&z={z}",{minZoom:2,maxZoom:25,maxNativeZoom:19,subdomains:["mt0","mt1","mt2","mt3"]});new Mg({defaultLayers:t,onCreate:({layer:t})=>{const{current:r}=n;t&&r&&(r.addBaseLayer(t,"Dartcom"),r.addBaseLayer(e,"Google Satellite"),t.addTo(i))},onDelete:({layer:e})=>{const{current:t}=n;t&&i.removeLayer(e)}})},[]),w(Cg,{ref:n,position:"bottomleft"})},Ng={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",bgcolor:"background.paper",border:"2px solid #000",boxShadow:24,p:4,maxHeight:"90vh",overflowX:"auto",overflowY:"auto"};var zg=Ml(({name:t,children:n,onClose:i,onOpen:r})=>{const s=e.useId(),o=Qo.getIsOpen(t);return e.useEffect(()=>{o?r?.({name:t}):i?.({name:t})},[o]),w(pe,{open:o,onClose:()=>{Qo.close(t)},"aria-labelledby":`modal-${s}-title`,"aria-describedby":`modal-${s}-description`,children:w(fe,{sx:({breakpoints:e})=>({...Ng,[e.up("sm")]:{minWidth:400},[e.down("sm")]:{minWidth:"80vw"}}),children:n})})});function Dg({name:t,items:n,label:i,sx:r,getLabel:s,getValue:o,getKey:a}){const{watch:l,resetField:u,setValue:c}=Bh(),h=l(t),d=e.useId(),f=n.find(e=>o(e)===h)??null;return w(Y,{value:f,options:n,id:d,getOptionLabel:e=>s(e),getOptionKey:e=>a(e),sx:{minWidth:150,...r},size:"small",onChange:(e,n)=>{n?c(t,o(n)):u(t)},renderInput:e=>w(Cd,{...e,label:i})})}const Ig=({items:t,initialValue:n,onChange:i})=>{const[r,s]=e.useState(()=>n??t[0].value),o=e.useId();return e.useEffect(()=>{n&&s(n)},[n]),E(me,{value:r,children:[w(P,{sx:{borderBottom:1,borderColor:"divider"},children:w(_e,{"aria-label":`tabs-${o}`,onChange:(e,t)=>{s(t),i?.(t)},children:t.map(({label:e,value:t})=>w(X,{label:e,value:t,sx:{textTransform:"none"}},`${o}-tab-${t}`))})}),t.map(({content:e,value:t})=>w(ge,{value:t,children:e},`${o}-tab-panel-${t}`))]})};var Fg,jg={exports:{}};
|
|
23
|
+
*/function Sm(){if(dm)return hm;dm=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;return hm=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var i=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==i.join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(i,r){for(var s,o,a=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(i),l=1;l<arguments.length;l++){for(var u in s=Object(arguments[l]))t.call(s,u)&&(a[u]=s[u]);if(e){o=e(s);for(var c=0;c<o.length;c++)n.call(s,o[c])&&(a[o[c]]=s[o[c]])}}return a},hm}function km(){if(pm)return fm;pm=1;return fm="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function Om(){return _m?mm:(_m=1,mm=Function.call.bind(Object.prototype.hasOwnProperty))}function Pm(){if(ym)return gm;ym=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=km(),n={},i=Om();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function r(r,s,o,a,l){if("production"!==process.env.NODE_ENV)for(var u in r)if(i(r,u)){var c;try{if("function"!=typeof r[u]){var h=Error((a||"React class")+": "+o+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}c=r[u](s,u,a,o,null,t)}catch(e){c=e}if(!c||c instanceof Error||e((a||"React class")+": type specification of "+o+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof c+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),c instanceof Error&&!(c.message in n)){n[c.message]=!0;var d=l?l():"";e("Failed "+o+" type: "+c.message+(null!=d?d:""))}}}return r.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},gm=r}function Cm(){if(bm)return vm;bm=1;var e=Tm(),t=Sm(),n=km(),i=Om(),r=Pm(),s=function(){};function o(){return null}return"production"!==process.env.NODE_ENV&&(s=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),vm=function(a,l){var u="function"==typeof Symbol&&Symbol.iterator;var c="<<anonymous>>",h={array:m("array"),bigint:m("bigint"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:p(o),arrayOf:function(e){return p(function(t,i,r,s,o){if("function"!=typeof e)return new f("Property `"+o+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var a=t[i];if(!Array.isArray(a))return new f("Invalid "+s+" `"+o+"` of type `"+y(a)+"` supplied to `"+r+"`, expected an array.");for(var l=0;l<a.length;l++){var u=e(a,l,r,s,o+"["+l+"]",n);if(u instanceof Error)return u}return null})},element:p(function(e,t,n,i,r){var s=e[t];return a(s)?null:new f("Invalid "+i+" `"+r+"` of type `"+y(s)+"` supplied to `"+n+"`, expected a single ReactElement.")}),elementType:p(function(t,n,i,r,s){var o=t[n];return e.isValidElementType(o)?null:new f("Invalid "+r+" `"+s+"` of type `"+y(o)+"` supplied to `"+i+"`, expected a single ReactElement type.")}),instanceOf:function(e){return p(function(t,n,i,r,s){if(!(t[n]instanceof e)){var o=e.name||c;return new f("Invalid "+r+" `"+s+"` of type `"+(((a=t[n]).constructor&&a.constructor.name?a.constructor.name:c)+"` supplied to `")+i+"`, expected instance of `"+o+"`.")}var a;return null})},node:p(function(e,t,n,i,r){return g(e[t])?null:new f("Invalid "+i+" `"+r+"` supplied to `"+n+"`, expected a ReactNode.")}),objectOf:function(e){return p(function(t,r,s,o,a){if("function"!=typeof e)return new f("Property `"+a+"` of component `"+s+"` has invalid PropType notation inside objectOf.");var l=t[r],u=y(l);if("object"!==u)return new f("Invalid "+o+" `"+a+"` of type `"+u+"` supplied to `"+s+"`, expected an object.");for(var c in l)if(i(l,c)){var h=e(l,c,s,o,a+"."+c,n);if(h instanceof Error)return h}return null})},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&s(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),o;return p(function(t,n,i,r,s){for(var o=t[n],a=0;a<e.length;a++)if(d(o,e[a]))return null;var l=JSON.stringify(e,function(e,t){return"symbol"===v(t)?String(t):t});return new f("Invalid "+r+" `"+s+"` of value `"+String(o)+"` supplied to `"+i+"`, expected one of "+l+".")})},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&s("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var t=0;t<e.length;t++){var r=e[t];if("function"!=typeof r)return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+b(r)+" at index "+t+"."),o}return p(function(t,r,s,o,a){for(var l=[],u=0;u<e.length;u++){var c=(0,e[u])(t,r,s,o,a,n);if(null==c)return null;c.data&&i(c.data,"expectedType")&&l.push(c.data.expectedType)}return new f("Invalid "+o+" `"+a+"` supplied to `"+s+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")})},shape:function(e){return p(function(t,i,r,s,o){var a=t[i],l=y(a);if("object"!==l)return new f("Invalid "+s+" `"+o+"` of type `"+l+"` supplied to `"+r+"`, expected `object`.");for(var u in e){var c=e[u];if("function"!=typeof c)return _(r,s,o,u,v(c));var h=c(a,u,r,s,o+"."+u,n);if(h)return h}return null})},exact:function(e){return p(function(r,s,o,a,l){var u=r[s],c=y(u);if("object"!==c)return new f("Invalid "+a+" `"+l+"` of type `"+c+"` supplied to `"+o+"`, expected `object`.");var h=t({},r[s],e);for(var d in h){var p=e[d];if(i(e,d)&&"function"!=typeof p)return _(o,a,l,d,v(p));if(!p)return new f("Invalid "+a+" `"+l+"` key `"+d+"` supplied to `"+o+"`.\nBad object: "+JSON.stringify(r[s],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var m=p(u,d,o,a,l+"."+d,n);if(m)return m}return null})}};function d(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function f(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function p(e){if("production"!==process.env.NODE_ENV)var t={},i=0;function r(r,o,a,u,h,d,p){if(u=u||c,d=d||a,p!==n){if(l){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var _=u+":"+a;!t[_]&&i<3&&(s("You are manually calling a React.PropTypes validation function for the `"+d+"` prop on `"+u+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[_]=!0,i++)}}return null==o[a]?r?null===o[a]?new f("The "+h+" `"+d+"` is marked as required in `"+u+"`, but its value is `null`."):new f("The "+h+" `"+d+"` is marked as required in `"+u+"`, but its value is `undefined`."):null:e(o,a,u,h,d)}var o=r.bind(null,!1);return o.isRequired=r.bind(null,!0),o}function m(e){return p(function(t,n,i,r,s,o){var a=t[n];return y(a)!==e?new f("Invalid "+r+" `"+s+"` of type `"+v(a)+"` supplied to `"+i+"`, expected `"+e+"`.",{expectedType:e}):null})}function _(e,t,n,i,r){return new f((e||"React class")+": "+t+" type `"+n+"."+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+r+"`.")}function g(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(g);if(null===e||a(e))return!0;var t=function(e){var t=e&&(u&&e[u]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var n,i=t.call(e);if(t!==e.entries){for(;!(n=i.next()).done;)if(!g(n.value))return!1}else for(;!(n=i.next()).done;){var r=n.value;if(r&&!g(r[1]))return!1}return!0;default:return!1}}function y(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function v(e){if(null==e)return""+e;var t=y(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function b(e){var t=v(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return f.prototype=Error.prototype,h.checkPropTypes=r,h.resetWarningCache=r.resetWarningCache,h.PropTypes=h,h},vm}function Rm(){if(wm)return xm;wm=1;var e=km();function t(){}function n(){}return n.resetWarningCache=t,xm=function(){function i(t,n,i,r,s,o){if(o!==e){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function r(){return i}i.isRequired=i;var s={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:r,element:i,elementType:i,instanceOf:r,node:i,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},xm}function Mm(){if(Em)return om.exports;if(Em=1,"production"!==process.env.NODE_ENV){var e=Tm();om.exports=Cm()(e.isElement,true)}else om.exports=Rm()();return om.exports}var Lm,Nm={exports:{}};var zm,Dm={},Im={};function Fm(){if(zm)return Im;return zm=1,Object.defineProperty(Im,"__esModule",{value:!0}),Im.dontSetMe=function(e,t,n){if(e[t])return new Error(`Invalid prop ${t} passed to ${n} - do not set this, set it on the child.`)},Im.findInArray=function(e,t){for(let n=0,i=e.length;n<i;n++)if(t.apply(t,[e[n],n,e]))return e[n]},Im.int=function(e){return parseInt(e,10)},Im.isFunction=function(e){return"function"==typeof e||"[object Function]"===Object.prototype.toString.call(e)},Im.isNum=function(e){return"number"==typeof e&&!isNaN(e)},Im}var jm,Bm,Um={};function Vm(){if(Bm)return Dm;Bm=1,Object.defineProperty(Dm,"__esModule",{value:!0}),Dm.addClassName=o,Dm.addEvent=function(e,t,n,i){if(!e)return;const r={capture:!0,...i};e.addEventListener?e.addEventListener(t,n,r):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},Dm.addUserSelectStyles=function(e){if(!e)return;let t=e.getElementById("react-draggable-style-el");t||(t=e.createElement("style"),t.type="text/css",t.id="react-draggable-style-el",t.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",t.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(t));e.body&&o(e.body,"react-draggable-transparent-selection")},Dm.createCSSTransform=function(e,n){const i=r(e,n,"px");return{[(0,t.browserPrefixToKey)("transform",t.default)]:i}},Dm.createSVGTransform=function(e,t){return r(e,t,"")},Dm.getTouch=function(t,n){return t.targetTouches&&(0,e.findInArray)(t.targetTouches,e=>n===e.identifier)||t.changedTouches&&(0,e.findInArray)(t.changedTouches,e=>n===e.identifier)},Dm.getTouchIdentifier=function(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier},Dm.getTranslation=r,Dm.innerHeight=function(t){let n=t.clientHeight;const i=t.ownerDocument.defaultView.getComputedStyle(t);return n-=(0,e.int)(i.paddingTop),n-=(0,e.int)(i.paddingBottom),n},Dm.innerWidth=function(t){let n=t.clientWidth;const i=t.ownerDocument.defaultView.getComputedStyle(t);return n-=(0,e.int)(i.paddingLeft),n-=(0,e.int)(i.paddingRight),n},Dm.matchesSelector=i,Dm.matchesSelectorAndParentsTo=function(e,t,n){let r=e;do{if(i(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1},Dm.offsetXYFromParent=function(e,t,n){const i=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),r=(e.clientX+t.scrollLeft-i.left)/n,s=(e.clientY+t.scrollTop-i.top)/n;return{x:r,y:s}},Dm.outerHeight=function(t){let n=t.clientHeight;const i=t.ownerDocument.defaultView.getComputedStyle(t);return n+=(0,e.int)(i.borderTopWidth),n+=(0,e.int)(i.borderBottomWidth),n},Dm.outerWidth=function(t){let n=t.clientWidth;const i=t.ownerDocument.defaultView.getComputedStyle(t);return n+=(0,e.int)(i.borderLeftWidth),n+=(0,e.int)(i.borderRightWidth),n},Dm.removeClassName=a,Dm.removeEvent=function(e,t,n,i){if(!e)return;const r={capture:!0,...i};e.removeEventListener?e.removeEventListener(t,n,r):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},Dm.scheduleRemoveUserSelectStyles=function(e){window.requestAnimationFrame?window.requestAnimationFrame(()=>{s(e)}):s(e)};var e=Fm(),t=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,i=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var r,s,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(r=t?i:n){if(r.has(e))return r.get(e);r.set(e,o)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((s=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(s.get||s.set)?r(o,t,s):o[t]=e[t]);return o}(e,t)}(function(){if(jm)return Um;jm=1,Object.defineProperty(Um,"__esModule",{value:!0}),Um.browserPrefixToKey=n,Um.browserPrefixToStyle=function(e,t){return t?`-${t.toLowerCase()}-${e}`:e},Um.default=void 0,Um.getPrefix=t;const e=["Moz","Webkit","O","ms"];function t(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window)return"";const i=window.document?.documentElement?.style;if(!i)return"";if(t in i)return"";for(let r=0;r<e.length;r++)if(n(t,e[r])in i)return e[r];return""}function n(e,t){return t?`${t}${function(e){let t="",n=!0;for(let i=0;i<e.length;i++)n?(t+=e[i].toUpperCase(),n=!1):"-"===e[i]?n=!0:t+=e[i];return t}(e)}`:e}return Um.default=t(),Um}());let n="";function i(t,i){return n||(n=(0,e.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(n){return(0,e.isFunction)(t[n])})),!!(0,e.isFunction)(t[n])&&t[n](i)}function r(e,t,n){let{x:i,y:r}=e,s=`translate(${i}${n},${r}${n})`;if(t){s=`translate(${`${"string"==typeof t.x?t.x:t.x+n}`}, ${`${"string"==typeof t.y?t.y:t.y+n}`})`+s}return s}function s(e){if(e)try{if(e.body&&a(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{const t=(e.defaultView||window).getSelection();t&&"Caret"!==t.type&&t.removeAllRanges()}}catch(e){}}function o(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function a(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(`(?:^|\\s)${t}(?!\\S)`,"g"),"")}return Dm}var Gm,$m={};function Zm(){if(Gm)return $m;Gm=1,Object.defineProperty($m,"__esModule",{value:!0}),$m.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},$m.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},$m.createCoreData=function(t,i,r){const s=!(0,e.isNum)(t.lastX),o=n(t);return s?{node:o,deltaX:0,deltaY:0,lastX:i,lastY:r,x:i,y:r}:{node:o,deltaX:i-t.lastX,deltaY:r-t.lastY,lastX:t.lastX,lastY:t.lastY,x:i,y:r}},$m.createDraggableData=function(e,t){const n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}},$m.getBoundPosition=function(i,r,s){if(!i.props.bounds)return[r,s];let{bounds:o}=i.props;o="string"==typeof o?o:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(o);const a=n(i);if("string"==typeof o){const{ownerDocument:n}=a,i=n.defaultView;let r;if("parent"===o)r=a.parentNode;else{r=a.getRootNode().querySelector(o)}if(!(r instanceof i.HTMLElement))throw new Error('Bounds selector "'+o+'" could not find an element.');const s=r,l=i.getComputedStyle(a),u=i.getComputedStyle(s);o={left:-a.offsetLeft+(0,e.int)(u.paddingLeft)+(0,e.int)(l.marginLeft),top:-a.offsetTop+(0,e.int)(u.paddingTop)+(0,e.int)(l.marginTop),right:(0,t.innerWidth)(s)-(0,t.outerWidth)(a)-a.offsetLeft+(0,e.int)(u.paddingRight)-(0,e.int)(l.marginRight),bottom:(0,t.innerHeight)(s)-(0,t.outerHeight)(a)-a.offsetTop+(0,e.int)(u.paddingBottom)-(0,e.int)(l.marginBottom)}}(0,e.isNum)(o.right)&&(r=Math.min(r,o.right));(0,e.isNum)(o.bottom)&&(s=Math.min(s,o.bottom));(0,e.isNum)(o.left)&&(r=Math.max(r,o.left));(0,e.isNum)(o.top)&&(s=Math.max(s,o.top));return[r,s]},$m.getControlPosition=function(e,i,r){const s="number"==typeof i?(0,t.getTouch)(e,i):null;if("number"==typeof i&&!s)return null;const o=n(r),a=r.props.offsetParent||o.offsetParent||o.ownerDocument.body;return(0,t.offsetXYFromParent)(s||e,a,r.props.scale)},$m.snapToGrid=function(e,t,n){const i=Math.round(t/e[0])*e[0],r=Math.round(n/e[1])*e[1];return[i,r]};var e=Fm(),t=Vm();function n(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}return $m}var qm,Wm,Hm,Km,Ym={},Xm={};function Qm(){if(qm)return Xm;return qm=1,Object.defineProperty(Xm,"__esModule",{value:!0}),Xm.default=function(){},Xm}function Jm(){if(Wm)return Ym;Wm=1,Object.defineProperty(Ym,"__esModule",{value:!0}),Ym.default=void 0;var e=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,i=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var r,s,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(r=t?i:n){if(r.has(e))return r.get(e);r.set(e,o)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((s=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(s.get||s.set)?r(o,t,s):o[t]=e[t]);return o}(e,t)}(t),n=l(Mm()),i=l(v),r=Vm(),s=Zm(),o=Fm(),a=l(Qm());function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t);if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const c={start:"touchstart",move:"touchmove",stop:"touchend"},h={start:"mousedown",move:"mousemove",stop:"mouseup"};let d=h,f=class extends e.Component{constructor(){super(...arguments),u(this,"dragging",!1),u(this,"lastX",NaN),u(this,"lastY",NaN),u(this,"touchIdentifier",null),u(this,"mounted",!1),u(this,"handleDragStart",e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&"number"==typeof e.button&&0!==e.button)return!1;const t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!(0,r.matchesSelectorAndParentsTo)(e.target,this.props.handle,t)||this.props.cancel&&(0,r.matchesSelectorAndParentsTo)(e.target,this.props.cancel,t))return;"touchstart"!==e.type||this.props.allowMobileScroll||e.preventDefault();const i=(0,r.getTouchIdentifier)(e);this.touchIdentifier=i;const o=(0,s.getControlPosition)(e,i,this);if(null==o)return;const{x:l,y:u}=o,c=(0,s.createCoreData)(this,l,u);(0,a.default)("DraggableCore: handleDragStart: %j",c),(0,a.default)("calling",this.props.onStart);!1!==this.props.onStart(e,c)&&!1!==this.mounted&&(this.props.enableUserSelectHack&&(0,r.addUserSelectStyles)(n),this.dragging=!0,this.lastX=l,this.lastY=u,(0,r.addEvent)(n,d.move,this.handleDrag),(0,r.addEvent)(n,d.stop,this.handleDragStop))}),u(this,"handleDrag",e=>{const t=(0,s.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:i}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX,t=i-this.lastY;if([e,t]=(0,s.snapToGrid)(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,i=this.lastY+t}const r=(0,s.createCoreData)(this,n,i);(0,a.default)("DraggableCore: handleDrag: %j",r);if(!1!==this.props.onDrag(e,r)&&!1!==this.mounted)this.lastX=n,this.lastY=i;else try{this.handleDragStop(new MouseEvent("mouseup"))}catch(e){const t=document.createEvent("MouseEvents");t.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(t)}}),u(this,"handleDragStop",e=>{if(!this.dragging)return;const t=(0,s.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:i}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=i-this.lastY||0;[e,t]=(0,s.snapToGrid)(this.props.grid,e,t),n=this.lastX+e,i=this.lastY+t}const o=(0,s.createCoreData)(this,n,i);if(!1===this.props.onStop(e,o)||!1===this.mounted)return!1;const l=this.findDOMNode();l&&this.props.enableUserSelectHack&&(0,r.scheduleRemoveUserSelectStyles)(l.ownerDocument),(0,a.default)("DraggableCore: handleDragStop: %j",o),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,l&&((0,a.default)("DraggableCore: Removing handlers"),(0,r.removeEvent)(l.ownerDocument,d.move,this.handleDrag),(0,r.removeEvent)(l.ownerDocument,d.stop,this.handleDragStop))}),u(this,"onMouseDown",e=>(d=h,this.handleDragStart(e))),u(this,"onMouseUp",e=>(d=h,this.handleDragStop(e))),u(this,"onTouchStart",e=>(d=c,this.handleDragStart(e))),u(this,"onTouchEnd",e=>(d=c,this.handleDragStop(e)))}componentDidMount(){this.mounted=!0;const e=this.findDOMNode();e&&(0,r.addEvent)(e,c.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:t}=e;(0,r.removeEvent)(t,h.move,this.handleDrag),(0,r.removeEvent)(t,c.move,this.handleDrag),(0,r.removeEvent)(t,h.stop,this.handleDragStop),(0,r.removeEvent)(t,c.stop,this.handleDragStop),(0,r.removeEvent)(e,c.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,r.scheduleRemoveUserSelectStyles)(t)}}findDOMNode(){return this.props?.nodeRef?this.props?.nodeRef?.current:i.default.findDOMNode(this)}render(){return e.cloneElement(e.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};return Ym.default=f,u(f,"displayName","DraggableCore"),u(f,"propTypes",{allowAnyClick:n.default.bool,allowMobileScroll:n.default.bool,children:n.default.node.isRequired,disabled:n.default.bool,enableUserSelectHack:n.default.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:n.default.arrayOf(n.default.number),handle:n.default.string,cancel:n.default.string,nodeRef:n.default.object,onStart:n.default.func,onDrag:n.default.func,onStop:n.default.func,onMouseDown:n.default.func,scale:n.default.number,className:o.dontSetMe,style:o.dontSetMe,transform:o.dontSetMe}),u(f,"defaultProps",{allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),Ym}function e_(){return Hm||(Hm=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return u.default}}),e.default=void 0;var n=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,i=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var r,s,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(r=t?i:n){if(r.has(e))return r.get(e);r.set(e,o)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((s=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(s.get||s.set)?r(o,t,s):o[t]=e[t]);return o}(e,t)}(t),i=h(Mm()),r=h(v),s=function(){if(Lm)return Nm.exports;function e(t){var n,i,r="";if("string"==typeof t||"number"==typeof t)r+=t;else if("object"==typeof t)if(Array.isArray(t)){var s=t.length;for(n=0;n<s;n++)t[n]&&(i=e(t[n]))&&(r&&(r+=" "),r+=i)}else for(i in t)t[i]&&(r&&(r+=" "),r+=i);return r}function t(){for(var t,n,i=0,r="",s=arguments.length;i<s;i++)(t=arguments[i])&&(n=e(t))&&(r&&(r+=" "),r+=n);return r}return Lm=1,Nm.exports=t,Nm.exports.clsx=t,Nm.exports}(),o=Vm(),a=Zm(),l=Fm(),u=h(Jm()),c=h(Qm());function h(e){return e&&e.__esModule?e:{default:e}}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},d.apply(null,arguments)}function f(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t);if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class p extends n.Component{static getDerivedStateFromProps(e,t){let{position:n}=e,{prevPropsPosition:i}=t;return!n||i&&n.x===i.x&&n.y===i.y?null:((0,c.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:i}),{x:n.x,y:n.y,prevPropsPosition:{...n}})}constructor(e){super(e),f(this,"onDragStart",(e,t)=>{(0,c.default)("Draggable: onDragStart: %j",t);if(!1===this.props.onStart(e,(0,a.createDraggableData)(this,t)))return!1;this.setState({dragging:!0,dragged:!0})}),f(this,"onDrag",(e,t)=>{if(!this.state.dragging)return!1;(0,c.default)("Draggable: onDrag: %j",t);const n=(0,a.createDraggableData)(this,t),i={x:n.x,y:n.y,slackX:0,slackY:0};if(this.props.bounds){const{x:e,y:t}=i;i.x+=this.state.slackX,i.y+=this.state.slackY;const[r,s]=(0,a.getBoundPosition)(this,i.x,i.y);i.x=r,i.y=s,i.slackX=this.state.slackX+(e-i.x),i.slackY=this.state.slackY+(t-i.y),n.x=i.x,n.y=i.y,n.deltaX=i.x-this.state.x,n.deltaY=i.y-this.state.y}if(!1===this.props.onDrag(e,n))return!1;this.setState(i)}),f(this,"onDragStop",(e,t)=>{if(!this.state.dragging)return!1;if(!1===this.props.onStop(e,(0,a.createDraggableData)(this,t)))return!1;(0,c.default)("Draggable: onDragStop: %j",t);const n={dragging:!1,slackX:0,slackY:0};if(Boolean(this.props.position)){const{x:e,y:t}=this.props.position;n.x=e,n.y=t}this.setState(n)}),this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},!e.position||e.onDrag||e.onStop||console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){void 0!==window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){return this.props?.nodeRef?.current??r.default.findDOMNode(this)}render(){const{axis:e,bounds:t,children:i,defaultPosition:r,defaultClassName:l,defaultClassNameDragging:c,defaultClassNameDragged:h,position:f,positionOffset:p,scale:m,..._}=this.props;let g={},y=null;const v=!Boolean(f)||this.state.dragging,b=f||r,x={x:(0,a.canDragX)(this)&&v?this.state.x:b.x,y:(0,a.canDragY)(this)&&v?this.state.y:b.y};this.state.isElementSVG?y=(0,o.createSVGTransform)(x,p):g=(0,o.createCSSTransform)(x,p);const w=(0,s.clsx)(i.props.className||"",l,{[c]:this.state.dragging,[h]:this.state.dragged});return n.createElement(u.default,d({},_,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),n.cloneElement(n.Children.only(i),{className:w,style:{...i.props.style,...g},transform:y}))}}e.default=p,f(p,"displayName","Draggable"),f(p,"propTypes",{...u.default.propTypes,axis:i.default.oneOf(["both","x","y","none"]),bounds:i.default.oneOfType([i.default.shape({left:i.default.number,right:i.default.number,top:i.default.number,bottom:i.default.number}),i.default.string,i.default.oneOf([!1])]),defaultClassName:i.default.string,defaultClassNameDragging:i.default.string,defaultClassNameDragged:i.default.string,defaultPosition:i.default.shape({x:i.default.number,y:i.default.number}),positionOffset:i.default.shape({x:i.default.oneOfType([i.default.number,i.default.string]),y:i.default.oneOfType([i.default.number,i.default.string])}),position:i.default.shape({x:i.default.number,y:i.default.number}),className:l.dontSetMe,style:l.dontSetMe,transform:l.dontSetMe}),f(p,"defaultProps",{...u.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(sm)),sm}var t_=function(){if(Km)return rm.exports;Km=1;const{default:e,DraggableCore:t}=e_();return rm.exports=e,rm.exports.default=e,rm.exports.DraggableCore=t,rm.exports}(),n_=xe(t_);const i_=({zIndex:t,width:n,bottom:i,right:r,left:s,top:o,sx:a,children:l})=>{const u=e.useId(),c=e.useRef(null);return w(K,{children:w(n_,{nodeRef:c,children:w(P,{id:u,ref:c,sx:()=>({position:"absolute",top:o,left:s,bottom:i,right:r,width:n,zIndex:t,backgroundColor:"white"}),children:w(Yc,{sx:a,children:l})})})})},r_=m(null),s_={didCatch:!1,error:null};class o_ extends c{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=s_}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(...e){const{error:t}=this.state;null!==t&&(this.props.onReset?.({args:e,reason:"imperative-api"}),this.setState(s_))}componentDidCatch(e,t){this.props.onError?.(e,t)}componentDidUpdate(e,t){const{didCatch:n}=this.state,{resetKeys:i}=this.props;n&&null!==t.error&&function(e=[],t=[]){return e.length!==t.length||e.some((e,n)=>!Object.is(e,t[n]))}(e.resetKeys,i)&&(this.props.onReset?.({next:i,prev:e.resetKeys,reason:"keys"}),this.setState(s_))}render(){const{children:e,fallbackRender:t,FallbackComponent:n,fallback:i}=this.props,{didCatch:r,error:s}=this.state;let a=e;if(r){const e={error:s,resetErrorBoundary:this.resetErrorBoundary};if("function"==typeof t)a=t(e);else if(n)a=o(n,e);else{if(void 0===i)throw s;a=i}}return o(r_.Provider,{value:{didCatch:r,error:s,resetErrorBoundary:this.resetErrorBoundary}},a)}}const a_=({error:e,resetErrorBoundary:t})=>E(P,{role:"alert",sx:{padding:"20px",background:"#fee"},children:[w(O,{variant:"h2",children:"Ошибка приложения"}),w(O,{variant:"body1",color:"error",children:e.message}),w(Vc,{onClick:t,children:"Попробовать снова"})]}),l_=({children:e,FallbackComponent:t=a_})=>w(o_,{FallbackComponent:t,children:e});function u_(t){const{name:n,type:i}=t,r=e.useId(),{control:s}=Bh();return w(Fh,{name:n,control:s,render:({field:e})=>E(P,{sx:({spacing:e})=>({display:"grid",width:"100%",gap:e(1)}),children:[w(Cd,{id:r,size:"small",...t,...e,onChange:t=>{const{target:n}=t,{value:r}=n;if("number"===i)""===r?e.onChange():e.onChange(Number(r));else e.onChange(t)}}),w(kd,{name:n})]})})}var c_,h_;!function(e){e.ONE_WAY='"OneWay"',e.POINT_ADDRESS='"PointAddress"',e.BUILDING_AREA='"MapBuildingECArea"',e.BUILTUP_AREA='"MapAdminBuiltupArea"',e.ADMIN_AREA='"MapAdminArea"',e.OCEAN_AREA='"MapOceanArea"',e.OCEAN_AREA_LABEL='"MapOceanAreaLabel"',e.FACILITY_AREA='"MapFacilityArea"',e.FACILITY_AREA_LABEL='"MapFacilityAreaLabel"',e.LANDUSE_AREA='"MapLanduseArea"',e.LANDUSE_AREA_LABEL='"MapLanduseAreaLabel"',e.NATURE_FIELD='"MapNatureField"',e.NATURE_FOREST='"MapNatureForest"',e.LINK='"Link"',e.RAILROAD_LINK='"MapRailroadLink"',e.WATER_LINK='"MapWaterLink"',e.WATER_AREA='"MapWaterArea"',e.WATER_AREA_LABEL='"MapWaterAreaLabel"',e.WATER_LAKE_LABEL='"MapWaterLakeLabel"',e.POI='"POI"',e.CITY_POI='"CityPOI"',e.CONDITIONS='"Conditions"',e.ROAD_POLY='"RoadPoly"',e.PARKING_LINE='"ParkingLine"',e.LANE_MARKING_LINE='"LaneMarkingLine"',e.LANE_MARKING_POLY='"LaneMarkingPoly"',e.LANE_MARKING_ARROW='"LaneMarkingArrow"',e.TRAFFIC_SIGN='"TrafficSign"',e.TRAFFIC_SIGNAL='"TrafficSignal"',e.CAMERA='"Camera"',e.PILLAR='"Pillar"'}(c_||(c_={})),function(e){e.TILE="tile",e.NATURE_TILE="nature_tile",e.MSK="msk"}(h_||(h_={}));const d_=new class{constructor(){}log({message:e,context:t,meta:n}){console.log(t,e,n)}warn({message:e,context:t,meta:n}){console.warn(t,e,n)}error({message:e,context:t,meta:n}){console.error(t,e,n)}},f_=256,p_={[h_.TILE]:"https://dalganmap.ru/api/tiles/get_tile/{z}/{x}/{y}.mvt",[h_.NATURE_TILE]:"https://dalganmap.ru/api/tiles/get_nature_tile/{z}/{x}/{y}.mvt",[h_.MSK]:"$VITE_API_HOST:$VITE_API_PORT/tiles/get_tile/{z}/{x}/{y}.mvt"};var m_={global:{links:{getIsConstruction:"function (feature) {\n const { construction } = feature;\n\n return construction;\n}\n",getIsFunctionalClass:"function (feature) {\n const { functional_class, access_id } = feature;\n\n return functional_class === 5 && access_id === 32;\n}\n",getIsLowMobility:"function (feature) {\n const { functional_class, low_mobility } = feature;\n\n return functional_class === 5 && low_mobility === 1;\n}\n"}},cameras:{camera1:{type:"perspective",vanishing_point:[0,-500]}},textures:{arrow:{url:"https://dalganmap.ru/api-image/images/arrow-20.png",sprites:{base:[0,0,20,20]}},"traffic-signal":{url:"https://dalganmap.ru/api-image/images/conditions/traffic-signal.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},pedestrian_crossing:{url:"https://dalganmap.ru/api-image/images/conditions/pedestrian_crossing.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},physical:{url:"https://dalganmap.ru/api-image/images/conditions/physical.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},gate:{url:"https://dalganmap.ru/api-image/images/conditions/gate.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_3578:{url:"https://dalganmap.ru/api-image/images/POI/3578.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5813:{url:"https://dalganmap.ru/api-image/images/POI/5813.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5541:{url:"https://dalganmap.ru/api-image/images/POI/5541.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5540:{url:"https://dalganmap.ru/api-image/images/POI/5540.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_9530(Mail)":{url:"https://dalganmap.ru/api-image/images/POI/mail.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_9530(Delivery)":{url:"https://dalganmap.ru/api-image/images/POI/delivery.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5400:{url:"https://dalganmap.ru/api-image/images/POI/5400.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_6000:{url:"https://dalganmap.ru/api-image/images/POI/6000.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_9565:{url:"https://dalganmap.ru/api-image/images/POI/9565.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_9583:{url:"https://dalganmap.ru/api-image/images/POI/9583.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_8060:{url:"https://dalganmap.ru/api-image/images/POI/8060.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5511:{url:"https://dalganmap.ru/api-image/images/POI/5511.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5512:{url:"https://dalganmap.ru/api-image/images/POI/5512.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5800:{url:"https://dalganmap.ru/api-image/images/POI/5800.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5999:{url:"https://dalganmap.ru/api-image/images/POI/5999.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_7011:{url:"https://dalganmap.ru/api-image/images/POI/7011.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_7389:{url:"https://dalganmap.ru/api-image/images/POI/7389.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_7832:{url:"https://dalganmap.ru/api-image/images/POI/7832.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_7929:{url:"https://dalganmap.ru/api-image/images/POI/7929.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_7990:{url:"https://dalganmap.ru/api-image/images/POI/7990.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_7999:{url:"https://dalganmap.ru/api-image/images/POI/7999.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_8410:{url:"https://dalganmap.ru/api-image/images/POI/8410.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_9517:{url:"https://dalganmap.ru/api-image/images/POI/9517.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_9718:{url:"https://dalganmap.ru/api-image/images/POI/9718.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_9992(mosque)":{url:"https://dalganmap.ru/api-image/images/POI/9992_mosque.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_9992(church)":{url:"https://dalganmap.ru/api-image/images/POI/9992_church.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_9992(temple)":{url:"https://dalganmap.ru/api-image/images/POI/9992_temple.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_9992(davidStar)":{url:"https://dalganmap.ru/api-image/images/POI/9992_davidStar.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_9992(mortar)":{url:"https://dalganmap.ru/api-image/images/POI/9992_mortar.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_4100(metro)":{url:"https://dalganmap.ru/api-image/images/POI/4100_metro.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_4100(diameter)":{url:"https://dalganmap.ru/api-image/images/POI/4100_diameter.png",filtering:"mipmap",sprites:{base:[0,0,41,15]}},POI_4013:{url:"https://dalganmap.ru/api-image/images/POI/4013.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}}},layers:null,styles:{buildings:{base:"polygons",shaders:{blocks:{color:"color.rgb;\n"}}}},lights:{light1:{type:"directional",direction:[.1,.5,-1],diffuse:.7,ambient:.5}},sources:null};const __=e=>{const t=[],n={source:e,layer:c_.BUILDING_AREA,minzoom:15},i={id:gn(),data:n,extruded:{draw:{polygons:{style:"buildings",extrude:"function() {\n return $zoom >= 17;\n }"}}},draw:{polygons:{color:"#DDB07B",height:{property:"height"}},lines:{color:"#DB933F",width:"2px",cap:"round",join:"round"}}};return t.push(i),t},g_=e=>{const t=[],n={source:e,layer:c_.BUILTUP_AREA},i={id:gn(),data:n,draw:{polygons:{color:"#CFC8C8"}}};return t.push(i),t},y_=e=>{const t=[],n={source:e,layer:c_.ADMIN_AREA},i={id:gn(),data:n,draw:{polygons:{color:"#D3D2CF"}}},r={id:gn(),data:n,filter:"function() {\n const { type } = feature;\n\n const isFilter = type === 'R';\n\n return isFilter;\n }",draw:{lines:{color:"#696969",width:"1px",cap:"round",join:"round"}}},s={id:gn(),data:n,filter:"function() {\n const { type } = feature;\n\n const isFilter = type === 'D' && $zoom >= 12;\n\n return isFilter;\n }",draw:{lines:{color:"#696969",dash:[4,7],width:"1px",cap:"round",join:"round"}}};return t.push(i,r,s),t},v_={size:20,extension:"png"},b_=e=>{const t=[],n={source:e,layer:c_.CAMERA},i={},r="camera";i[r]={url:wn(`msk/${r}/${r}_${v_.size}.${v_.extension}`),filtering:"mipmap",sprites:{base:[0,0,v_.size,v_.size]}};const s={id:gn(),data:n,draw:{points:{collide:!1,texture:r,size:v_.size,sprite:"base",placement:"midpoint"}},textures:i,sublayers:{}};return t.push(s),t},x_=e=>{const t=[],n={source:e,layer:c_.CITY_POI},i={id:gn(),data:n,filter:"function() {\n const { capital_order8, capital_order2, capital_order1, poi_name, priority } = feature;\n\n if ($zoom >= 9 && $zoom < 13) {\n return priority < 8;\n }\n\n if ($zoom <= 11) {\n return capital_order8 === 'Y';\n }\n\n if ($zoom >= 15) {\n return capital_order2 !== 'Y';\n }\n\n return true;\n }\n ",draw:{text:{text_source:"poi_name",priority:"function () {\n const { priority } = feature;\n\n if ($zoom <= 15) {\n return priority;\n }\n\n return 1;\n }\n ",font:{fill:"black",size:"function() {\n const { capital_order8 } = feature;\n\n if (capital_order8 === 'Y') {\n return '16px';\n }\n\n return '12px';\n }",weight:"function() {\n const { capital_order2 } = feature;\n\n if (capital_order2 === 'Y') {\n return 'bold';\n }\n\n return 'normal';\n }",stroke:{color:"white",width:"2px"}}}}};return t.push(i),t};var w_;!function(e){e.traffic_signal="traffic_signal",e.pedestrian_crossing="pedestrian_crossing",e.physical="physical",e.gate="gate"}(w_||(w_={}));const E_=e=>{const t=[],n={},i={source:e,layer:c_.CONDITIONS},r={id:gn(),data:i};return Object.values(w_).forEach(e=>{n[`_${e}`]={filter:`function() {\n const { type } = feature;\n\n const isShow = type === '${e}';\n\n return isShow;\n }`,draw:{points:{texture:e,sprite:"base",placement:"midpoint"}}}}),r.sublayers=n,t.push(r),t},A_=e=>{const t=[],n={id:gn(),data:{source:e,layer:c_.FACILITY_AREA},draw:{polygons:{color:"function() {\n const { feature_type } = feature;\n\n switch (feature_type) {\n case '2000408': {\n return '#DBBAC4';\n }\n\n case '1900403': {\n return '#B6C3C7';\n }\n\n case '1907403': {\n return '#A3B9C0';\n }\n\n case '2000123': {\n return '#E4BA7D';\n }\n\n case '2000124': {\n return '#BFE6E3';\n }\n\n case '2000200': {\n return '#A0A9A8';\n }\n\n case '2000403': {\n return '#AF7136';\n }\n\n case '2000420': {\n return '#89AC76';\n }\n\n case '2000457': {\n return '#9494C0';\n }\n\n default: {\n return '#E1D4D4';\n }\n }\n }",order:"function() {\n const { feature_type } = feature;\n\n switch (feature_type) {\n case '1907403': {\n return 301;\n }\n\n default: {\n return 300;\n }\n }\n }"},lines:{color:"#857F7F",width:"2px",cap:"round",join:"round"}}},i={id:gn(),data:{source:e,layer:c_.FACILITY_AREA_LABEL},draw:{text:{text_source:"name",font:{fill:"function() {\n const { feature_type } = feature;\n\n switch(feature_type) {\n case '1900403':\n case '1907403': {\n return '#256D7B';\n }\n\n case '2000420':\n case '2000460':\n case '2000123': {\n return '#00541F';\n }\n\n case '2000408': {\n return '#5E2129';\n }\n\n case '2000124': {\n return '#3E5F8A';\n }\n\n case '2000200': {\n return '#464451';\n }\n\n case '2000403': {\n return '#B03F35';\n }\n\n case '2000457': {\n return '#6A5ACD';\n }\n\n case '1700215':\n case '900159':\n case '900158': {\n return '#474A51';\n }\n\n default: {\n return black;\n }\n }\n }",size:"12px",stroke:{color:"white",width:"3px"}}}}};return t.push(n,i),t},T_=e=>{const t=[],n={id:gn(),data:{source:e,layer:c_.LANDUSE_AREA},draw:{polygons:{color:"function() {\n const { feature_type } = feature;\n\n switch (feature_type) {\n case '509998': {\n return '#ECD175';\n }\n\n case '600102':\n case '900140': {\n return '#3E9A8C';\n }\n\n case '900202':\n case '900130':\n case '900150':\n case '900103': {\n return '#96BE7D';\n }\n\n case '9997010': {\n return null;\n }\n }\n }",order:"function() {\n const { feature_type } = feature;\n\n switch(feature_type) {\n case '900150':\n case '900130':\n case '509998': {\n return 300;\n }\n\n default: {\n return 299;\n }\n }\n }"}}},i={id:gn(),data:{source:e,layer:c_.LANDUSE_AREA_LABEL},filter:"function() {\n return $zoom >= 15;\n }",draw:{text:{text_source:"name",font:{size:"13px",fill:"function() {\n const { feature_type } = feature;\n\n switch(feature_type) {\n case '509998': {\n return '#CD7F32';\n }\n\n default: {\n return '#00541F';\n }\n }\n }",stroke:{color:"white",width:"3px"}}}}};return t.push(n,i),t},S_=e=>{const t=[],n={source:e,layer:c_.LANE_MARKING_ARROW},i={id:gn(),data:n,draw:{polygons:{color:"white"}}};return t.push(i),t},k_=["-1.0","-0.5","-0.3","0.0","0.3","0.5","0.7","1.0","1.5","2.0"],O_=[[5],[4,3],[2,1]],P_="function() {\n const { functional_class, tunnel, tollway } = feature;\n\n const alpha = tunnel ? 0.89 : 1;\n\n const getRGB = (hex, alpha) => {\n const r = +(parseInt(hex.slice(1, 3), 16) / 255).toFixed(2);\n const g = +(parseInt(hex.slice(3, 5), 16) / 255).toFixed(2);\n const b = +(parseInt(hex.slice(5, 7), 16) / 255).toFixed(2);\n\n return [r, g, b, alpha];\n }\n\n if (tollway) {\n return '#D72740';\n }\n\n switch (functional_class) {\n case 1:\n case 2: {\n const color = getRGB('#D1747F', alpha);\n\n return color;\n }\n\n case 3:\n case 4: {\n const color = getRGB('#B1A7AA', alpha);\n\n return color;\n }\n\n case 5: {\n const color = getRGB('#D5CEC3', alpha);\n\n return color;\n }\n }\n}",C_="function() {\n const { functional_class, road_number } = feature;\n\n const getScale = () => {\n if ($zoom <= 15 && $zoom >= 14) { return 7; }\n\n if ($zoom <= 13 && $zoom >= 12) { return 9; }\n\n if ($zoom <= 5) { return 400; }\n\n if ($zoom <= 7) { return 200; }\n\n if ($zoom < 12) { return 50; }\n\n return 1;\n }\n\n const scale = getScale();\n\n switch(functional_class) {\n case 1:\n case 2: {\n return 8 * scale;\n }\n\n case 3:\n case 4: {\n return 7 * scale;\n }\n\n case 5: {\n if (Boolean(road_number)) {\n return 7 * scale;\n }\n\n return 6;\n }\n }\n}",R_={text_source:"street_name",font:{fill:"black",size:"14px",stroke:{color:"white",width:"3px"}}},M_={text:{text_source:"road_number",font:{fill:"#181bff",size:"16px",weight:"bold",underline:!0,background:{color:"black"}}}},L_={text:R_,lines:{color:P_,width:C_,cap:"round",join:"round"}},N_={lines:{color:P_,width:C_,outline:{color:"function() {\n const { functional_class, access_id, tollway } = feature;\n\n if (tollway) {\n return '#B9263B';\n }\n\n switch(functional_class) {\n case 5: {\n return '#989898';\n }\n\n case 3:\n case 4: {\n return '#8F6E78';\n }\n\n case 1:\n case 2: {\n return '#9A414B';\n }\n }\n}",width:"function() {\n const { functional_class, access_id } = feature;\n\n switch(functional_class) {\n case 5: {\n switch (access_id) {\n case 32: {\n return 0;\n }\n\n default: {\n return 1;\n }\n }\n }\n\n default: {\n return 1;\n }\n }\n}"}}},z_={text:R_,lines:{color:"#BABCC2",width:10,cap:"round",join:"round"}},D_={filter:"function() {\n return global.links.getIsLowMobility(feature);\n }",draw:{lines:{width:4}}},I_={filter:"function() {\n return global.links.getIsConstruction(feature);\n }",draw:{lines:{width:3,color:"#9AA096",dash:[2,1]}}},F_={filter:"function() {\n return global.links.getIsFunctionalClass(feature);\n }",draw:{lines:{width:2,color:"#9AA096",dash:[2,1]}}},j_=e=>{const t=[],n={source:e,layer:c_.LINK},i={id:gn(),data:n,draw:M_};return t.push(i),k_.forEach(i=>{const r=[],s=[];O_.forEach(t=>{const o=[],a=[];t.forEach(t=>{const r=(({source:e,zLvl:t,functionClass:n})=>e===h_.MSK?{base:{default:`function() {\n const { functional_class, z_lvl = '0.0', tollway } = feature;\n\n const isFilter = $zoom <= 16 && z_lvl === '${t}' && +functional_class === ${n} && tollway === false;\n\n return isFilter;\n }`,tollway:`function() {\n const { functional_class, z_lvl = '0.0', tollway } = feature;\n\n const isFilter = $zoom <= 16 && z_lvl === '${t}' && +functional_class === ${n} && tollway === true;\n\n return isFilter;\n }`},border:{default:`function() {\n const { functional_class, z_lvl = '0.0', tollway } = feature;\n\n const isFilter = $zoom <= 16 && tollway === false && z_lvl === '${t}' && +functional_class === ${n} && !global.links.getIsConstruction(feature) && !global.links.getIsFunctionalClass(feature);\n\n return isFilter;\n }`,tollway:`function() {\n const { functional_class, z_lvl = '0.0', tollway } = feature;\n\n const isFilter = $zoom <= 16 && tollway === true && z_lvl === '${t}' && +functional_class === ${n} && !global.links.getIsConstruction(feature) && !global.links.getIsFunctionalClass(feature);\n\n return isFilter;\n }`}}:{base:{default:`function() {\n const { functional_class, z_lvl = '0.0', tollway } = feature;\n\n const isFilter = z_lvl === '${t}' && +functional_class === ${n} && tollway === false;\n\n return isFilter;\n }`,tollway:`function() {\n const { functional_class, z_lvl = '0.0', tollway } = feature;\n\n const isFilter = z_lvl === '${t}' && +functional_class === ${n} && tollway === true;\n\n return isFilter;\n }`},border:{default:`function() {\n const { functional_class, z_lvl = '0.0', tollway } = feature;\n\n const isFilter = tollway === false && z_lvl === '${t}' && +functional_class === ${n} && !global.links.getIsConstruction(feature) && !global.links.getIsFunctionalClass(feature);\n\n return isFilter;\n }`,tollway:`function() {\n const { functional_class, z_lvl = '0.0', tollway } = feature;\n\n const isFilter = tollway === true && z_lvl === '${t}' && +functional_class === ${n} && !global.links.getIsConstruction(feature) && !global.links.getIsFunctionalClass(feature);\n\n return isFilter;\n }`}})({source:e,zLvl:i,functionClass:t}),s=(({zLvl:e,functionClass:t})=>`function() {\n const { functional_class, z_lvl = '0.0', tollway } = feature;\n\n const isFilter = $zoom > 16 && z_lvl === '${e}' && +functional_class === ${t};\n\n return isFilter;\n }`)({zLvl:i,functionClass:t}),l={id:gn(),data:n,filter:r.base.default,draw:L_,sublayers:{construction:{...I_},functionalClassAccessId32:{...F_},lowMobility:{...D_}}},u={id:gn(),data:n,filter:r.base.tollway,draw:L_,sublayers:{construction:{...I_},functionalClassAccessId32:{...F_},lowMobility:{...D_}}},c={id:gn(),data:n,filter:s,draw:z_,sublayers:{functionalClassAccessId32:{...F_}}},h={id:gn(),data:n,filter:r.border.default,draw:N_,sublayers:{lowMobility:{...D_}}},d={id:gn(),data:n,filter:r.border.tollway,draw:N_,sublayers:{lowMobility:{...D_}}};if(e===h_.MSK)o.push(c);o.push(l,u),a.push(h,d)}),r.push(...o),s.push(...a)}),t.push(...s,...r)}),t},B_=()=>{const e=[],t={source:h_.NATURE_TILE,layer:c_.NATURE_FIELD},n={id:gn(),data:t,draw:{polygons:{color:"#EBEEC7"}}};return e.push(n),e},U_=()=>{const e=[],t={source:h_.NATURE_TILE,layer:c_.NATURE_FOREST},n={id:gn(),data:t,draw:{polygons:{color:"function() {\n const { feature_type } = feature;\n\n switch (feature_type) {\n case '900202': {\n return '#96BE7D';\n }\n\n default : {\n return null;\n }\n }\n }"}}};return e.push(n),e},V_=e=>{const t=[],n={id:gn(),data:{source:e,layer:c_.OCEAN_AREA},draw:{polygons:{color:"#7DBEE4"}}},i={id:gn(),data:{source:e,layer:c_.OCEAN_AREA_LABEL},draw:{text:{text_source:"name",font:{fill:"#0A80C4",size:"18px",stroke:{color:"white",width:"3px"}}}}};return t.push(n,i),t},G_=e=>{const t=[],n={id:gn(),data:{source:e,layer:c_.ONE_WAY},draw:{points:{texture:"arrow",sprite:"base",angle:"function() {\n const { bearing } = feature;\n \n return bearing;\n }\n "}}};return t.push(n),t},$_={size:20,extension:"png"},Z_=e=>{const t=[],n={source:e,layer:c_.PILLAR},i={},r="pillar";i[r]={url:wn(`msk/${r}/${r}_${$_.size}.${$_.extension}`),filtering:"mipmap",sprites:{base:[0,0,$_.size,$_.size]}};const s={id:gn(),data:n,draw:{points:{collide:!1,texture:r,size:$_.size,sprite:"base",placement:"midpoint"}},textures:i,sublayers:{}};return t.push(s),t},q_='function() {\n const { poi_name, cat_id } = feature;\n\n switch (+cat_id) {\n case 4100: {\n const text = poi_name.replaceAll(/(Метро-|Станция-|МЦД-)/g, "");\n\n return text;\n }\n\n default: {\n return poi_name;\n }\n }\n}',W_=[3578,4013,4100,5400,5511,5512,5540,5541,5800,5813,5999,6e3,7011,7389,7832,7929,7990,8060,8410,9517,9530,9565,9583,9718,9992],H_=e=>{const t={};switch(e){case 4100:t[`_${e}-metro`]={filter:`function() {\n const { poi_name, cat_id } = feature;\n\n const isMetro = poi_name.startsWith('Метро-');\n const isStation = poi_name.startsWith('Станция-');\n\n const isCatId = +cat_id === ${e};\n\n const isFilter = isCatId && (isMetro || isStation);\n\n return isFilter;\n }`,draw:{points:K_({texture:`POI_${e}(metro)`})}},t[`_${e}-diameter`]={filter:`function() {\n const { cat_id, poi_name } = feature;\n\n const isDiameter = poi_name.startsWith('МЦД-');\n\n const isCatId = +cat_id === ${e};\n\n const isFilter = isCatId && isDiameter;\n\n return isFilter;\n }`,draw:{points:K_({texture:`POI_${e}(diameter)`,size:[41,15]})}};break;case 9530:t[`_${e}-mail`]={filter:`function() {\n const { cat_id, poi_name = '' } = feature;\n\n const isCatId = +cat_id === ${e};\n\n const isMail = poi_name.startsWith('Почта');\n\n const isFilter = isCatId && isMail;\n\n return isFilter;\n }`,draw:{points:K_({texture:`POI_${e}(Mail)`})}},t[`_${e}-delivery`]={filter:`function() {\n const { cat_id, poi_name = '' } = feature;\n\n const isCatId = +cat_id === ${e};\n \n const isMail = poi_name.startsWith('Почта');\n\n const isFilter = isCatId && !isMail;\n\n return isFilter;\n }`,draw:{points:K_({texture:`POI_${e}(Delivery)`})}};break;case 9992:{const n={mosque:1,church:2,temple:3,davidStar:4,mortar:6};Object.entries(n).forEach(([n,i])=>{t[`_${e}-${n}`]={filter:`function() {\n const { cat_id, subcat_id } = feature;\n\n const isCatId = +cat_id === ${e};\n const isSubcatId = +subcat_id === ${i};\n\n const isFilter = isCatId && isSubcatId;\n\n return isFilter;\n }`,draw:{points:K_({texture:`POI_${e}(${n})`})}}});break}default:t[`_${e}`]={filter:`function() {\n const { cat_id } = feature;\n\n const isFilter = +cat_id === ${e};\n\n return isFilter;\n }`,draw:{points:K_({texture:`POI_${e}`})}}}return t},K_=({texture:e,size:t=20})=>({texture:e,size:t,sprite:"base",placement:"midpoint"}),Y_=W_.reduce((e,t)=>({...e,...H_(t)}),{}),X_=e=>{const t=[],n={id:gn(),data:{source:e,layer:c_.POI},draw:{points:{text:{text_source:q_,font:{fill:"#464544",size:"12px"}}}},sublayers:Y_};return t.push(n),t},Q_=e=>{const t=[],n={source:e,layer:c_.POINT_ADDRESS,minzoom:15},i={id:gn(),data:n,draw:{text:{text_source:"address",font:{fill:"black",size:"12px"}}}};return t.push(i),t},J_=e=>{const t=[],n={source:e,layer:c_.RAILROAD_LINK},i={id:gn(),data:n,draw:{lines:{color:"#A3A8A",width:5,dash:[1,2],dash_background_color:[0,0,0],join:"round"}}};return t.push(i),t},eg={fileName:"traffic-sign",extension:"svg",dopsCount:2,widths:{map:20,preview:40}},tg={1.1:{title:"Железнодорожный переезд со шлагбаумом",height:20,type:"Предупреждающие знаки"},1.2:{title:"Железнодорожный переезд без шлагбаума",height:20,type:"Предупреждающие знаки"},"1.3.1":{title:"Однопутная железная дорога",height:20,type:"Предупреждающие знаки"},"1.3.2":{title:"Многопутная железная дорога",height:20,type:"Предупреждающие знаки"},"1.4.1":{title:"Приближение к железнодорожному переезду",height:40,type:"Предупреждающие знаки"},"1.4.2":{title:"Приближение к железнодорожному переезду",height:40,type:"Предупреждающие знаки"},"1.4.3":{title:"Приближение к железнодорожному переезду",height:40,type:"Предупреждающие знаки"},"1.4.4":{title:"Приближение к железнодорожному переезду",height:40,type:"Предупреждающие знаки"},"1.4.5":{title:"Приближение к железнодорожному переезду",height:40,type:"Предупреждающие знаки"},"1.4.6":{title:"Приближение к железнодорожному переезду",height:40,type:"Предупреждающие знаки"},1.5:{title:"Пересечение с трамвайной линией",height:20,type:"Предупреждающие знаки"},1.6:{title:"Пересечение равнозначных дорог",height:20,type:"Предупреждающие знаки"},1.7:{title:"Пересечение с круговым движением",height:20,type:"Предупреждающие знаки"},1.8:{title:"Светофорное регулирование",height:20,type:"Предупреждающие знаки"},1.9:{title:"Разводной мост",height:20,type:"Предупреждающие знаки"},"1.10":{title:"Выезд на набережную",height:20,type:"Предупреждающие знаки"},"1.11.1":{title:"Опасный поворот (правый)",height:20,type:"Предупреждающие знаки"},"1.11.2":{title:"Опасный поворот (левый)",height:20,type:"Предупреждающие знаки"},"1.12.1":{title:"Опасные повороты",height:20,type:"Предупреждающие знаки"},"1.12.2":{title:"Опасные повороты",height:20,type:"Предупреждающие знаки"},1.13:{title:"Крутой спуск",height:20,type:"Предупреждающие знаки"},1.14:{title:"Крутой подъём",height:20,type:"Предупреждающие знаки"},1.15:{title:"Скользкая дорога",height:20,type:"Предупреждающие знаки"},1.16:{title:"Неровная дорога",height:20,type:"Предупреждающие знаки"},1.17:{title:"Искусственная неровность",height:20,type:"Предупреждающие знаки"},1.18:{title:"Выброс гравия",height:20,type:"Предупреждающие знаки"},1.19:{title:"Опасная обочина",height:20,type:"Предупреждающие знаки"},"1.20.1":{title:"Сужение дороги",height:20,type:"Предупреждающие знаки"},"1.20.2":{title:"Сужение дороги",height:20,type:"Предупреждающие знаки"},"1.20.3":{title:"Сужение дороги",height:20,type:"Предупреждающие знаки"},1.21:{title:"Двустороннее движение",height:20,type:"Предупреждающие знаки"},1.22:{title:"Пешеходный переход",height:20,type:"Предупреждающие знаки"},1.23:{title:"Дети",height:20,type:"Предупреждающие знаки"},1.24:{title:"Пересечение с велосипедной дорожкой или велопешеходной дорожкой",height:20,type:"Предупреждающие знаки"},1.25:{title:"Дорожные работы",height:20,type:"Предупреждающие знаки"},1.26:{title:"Перегон скота",height:20,type:"Предупреждающие знаки"},1.27:{title:"Дикие животные",height:20,type:"Предупреждающие знаки"},1.28:{title:"Падение камней",height:20,type:"Предупреждающие знаки"},1.29:{title:"Боковой ветер",height:20,type:"Предупреждающие знаки"},"1.30":{title:"Низколетящие самолёты",height:20,type:"Предупреждающие знаки"},1.31:{title:"Тоннель",height:20,type:"Предупреждающие знаки"},1.32:{title:"Затор",height:20,type:"Предупреждающие знаки"},1.33:{title:"Прочие опасности",height:20,type:"Предупреждающие знаки"},"1.34.1 A":{title:"Направление поворота",height:20,type:"Предупреждающие знаки"},"1.34.1 B":{title:"Направление поворота",height:20,type:"Предупреждающие знаки"},"1.34.1 C":{title:"Направление поворота",height:20,type:"Предупреждающие знаки"},"1.34.2 A":{title:"Направление поворота",height:20,type:"Предупреждающие знаки"},"1.34.2 B":{title:"Направление поворота",height:20,type:"Предупреждающие знаки"},"1.34.2 C":{title:"Направление поворота",height:20,type:"Предупреждающие знаки"},"1.34.3 A":{title:"Направление поворота",height:20,type:"Предупреждающие знаки"},"1.34.3 B":{title:"Направление поворота",height:20,type:"Предупреждающие знаки"},1.35:{title:"Участок перекрёстка",height:20,type:"Предупреждающие знаки"},2.1:{title:"Главная дорога",height:20,type:"Знаки приоритета"},2.2:{title:"Конец главной дороги",height:20,type:"Знаки приоритета"},"2.3.1":{title:"Пересечение со второстепенной дорогой",height:20,type:"Знаки приоритета"},"2.3.2":{title:"Примыкание второстепенной дороги",height:20,type:"Знаки приоритета"},"2.3.3":{title:"Примыкание второстепенной дороги",height:20,type:"Знаки приоритета"},"2.3.4":{title:"Примыкание второстепенной дороги",height:20,type:"Знаки приоритета"},"2.3.5":{title:"Примыкание второстепенной дороги",height:20,type:"Знаки приоритета"},"2.3.6":{title:"Примыкание второстепенной дороги",height:20,type:"Знаки приоритета"},"2.3.7":{title:"Примыкание второстепенной дороги",height:20,type:"Знаки приоритета"},2.4:{title:"Уступите дорогу",height:20,type:"Знаки приоритета"},2.5:{title:"Движение без остановки запрещено",height:20,type:"Знаки приоритета"},2.6:{title:"Преимущество встречного движения",height:20,type:"Знаки приоритета"},2.7:{title:"Преимущество перед встречным движением",height:20,type:"Знаки приоритета"},3.1:{title:"Въезд запрещён",height:20,type:"Запрещающие знаки"},3.2:{title:"Движение запрещено",height:20,type:"Запрещающие знаки"},3.3:{title:"Движение механических транспортных средств запрещено",height:20,type:"Запрещающие знаки"},3.4:{title:"Движение грузовых автомобилей запрещено",height:20,type:"Запрещающие знаки"},3.5:{title:"Движение мотоциклов запрещено",height:20,type:"Запрещающие знаки"},3.6:{title:"Движение тракторов запрещено",height:20,type:"Запрещающие знаки"},3.7:{title:"Движение с прицепом запрещено",height:20,type:"Запрещающие знаки"},3.8:{title:"Движение гужевых повозок запрещено",height:20,type:"Запрещающие знаки"},3.9:{title:"Движение на велосипедах запрещено",height:20,type:"Запрещающие знаки"},"3.10":{title:"Движение пешеходов запрещено",height:20,type:"Запрещающие знаки"},3.11:{title:"Ограничение массы",height:20,type:"Запрещающие знаки"},3.12:{title:"Ограничение массы, приходящейся на ось транспортного средства",height:20,type:"Запрещающие знаки"},3.13:{title:"Ограничение высоты",height:20,type:"Запрещающие знаки"},3.14:{title:"Ограничение ширины",height:20,type:"Запрещающие знаки"},3.15:{title:"Ограничение длины",height:20,type:"Запрещающие знаки"},3.16:{title:"Ограничение минимальной дистанции",height:20,type:"Запрещающие знаки"},"3.17.1":{title:"Таможня",height:20,type:"Запрещающие знаки"},"3.17.2":{title:"Опасность",height:20,type:"Запрещающие знаки"},"3.17.3":{title:"Контроль",height:20,type:"Запрещающие знаки"},"3.18.1":{title:"Поворот направо запрещён",height:20,type:"Запрещающие знаки"},"3.18.2":{title:"Поворот налево запрещён",height:20,type:"Запрещающие знаки"},3.19:{title:"Разворот запрещён",height:20,type:"Запрещающие знаки"},"3.20":{title:"Обгон запрещён",height:20,type:"Запрещающие знаки"},3.21:{title:"Конец зоны запрещения обгона",height:20,type:"Запрещающие знаки"},3.22:{title:"Обгон грузовым автомобилям запрещён",height:20,type:"Запрещающие знаки"},3.23:{title:"Конец зоны запрещения обгона грузовым автомобилям",height:20,type:"Запрещающие знаки"},"3.24-50":{title:"Ограничение максимальной скорости",height:20,type:"Запрещающие знаки"},"3.25-50":{title:"Конец зоны ограничения максимальной скорости",height:20,type:"Запрещающие знаки"},3.26:{title:"Подача звукового сигнала запрещена",height:20,type:"Запрещающие знаки"},3.27:{title:"Остановка запрещена",height:20,type:"Запрещающие знаки"},3.28:{title:"Стоянка запрещена",height:20,type:"Запрещающие знаки"},3.29:{title:"Стоянка запрещена по нечётным числам месяца.",height:20,type:"Запрещающие знаки"},"3.30":{title:"Стоянка запрещена по чётным числам месяца",height:20,type:"Запрещающие знаки"},3.31:{title:"Конец зоны всех ограничений",height:20,type:"Запрещающие знаки"},3.32:{title:"Движение транспортных средств с опасными грузами запрещено",height:20,type:"Запрещающие знаки"},3.33:{title:"Движение транспортных средств с взрывчатыми и легковоспламеняющимися грузами запрещено",height:20,type:"Запрещающие знаки"},3.34:{title:"Движение автобусов запрещено",height:20,type:"Запрещающие знаки"},3.35:{title:"Движение на средствах индивидуальной мобильности запрещено",height:20,type:"Запрещающие знаки"},"4.1.1":{title:"Движение прямо",height:20,type:"Предписывающие знаки"},"4.1.2":{title:"Движение направо",height:20,type:"Предписывающие знаки"},"4.1.3":{title:"Движение налево",height:20,type:"Предписывающие знаки"},"4.1.4":{title:"Движение прямо или направо",height:20,type:"Предписывающие знаки"},"4.1.5":{title:"Движение прямо или налево",height:20,type:"Предписывающие знаки"},"4.1.6":{title:"Движение направо или налево",height:20,type:"Предписывающие знаки"},"4.2.1":{title:"Объезд препятствия справа",height:20,type:"Предписывающие знаки"},"4.2.2":{title:"Объезд препятствия слева",height:20,type:"Предписывающие знаки"},"4.2.3":{title:"Объезд препятствия справа или слева",height:20,type:"Предписывающие знаки"},4.3:{title:"Круговое движение",height:20,type:"Предписывающие знаки"},"4.4.1":{title:"Велосипедная дорожка",height:20,type:"Предписывающие знаки"},"4.4.2":{title:"Конец велосипедной дорожки",height:20,type:"Предписывающие знаки"},"4.5.1":{title:"Пешеходная дорожка",height:20,type:"Предписывающие знаки"},"4.5.2":{title:"Пешеходная и велосипедная дорожка с совмещённым движением",height:20,type:"Предписывающие знаки"},"4.5.3":{title:"Конец пешеходной и велосипедной дорожки с совмещённым движением",height:20,type:"Предписывающие знаки"},"4.5.4":{title:"Пешеходная и велосипедная дорожка с разделением движения",height:20,type:"Предписывающие знаки"},"4.5.5":{title:"Пешеходная и велосипедная дорожка с разделением движения",height:20,type:"Предписывающие знаки"},"4.5.6":{title:"Конец пешеходной и велосипедной дорожки с разделением движения",height:20,type:"Предписывающие знаки"},"4.5.7":{title:"Конец пешеходной и велосипедной дорожки с разделением движения",height:20,type:"Предписывающие знаки"},"4.6-50":{title:"Ограничение минимальной скорости",height:20,type:"Предписывающие знаки"},"4.7-50":{title:"Конец зоны ограничения минимальной скорости",height:20,type:"Предписывающие знаки"},"4.8.1":{title:"Направление движения транспортных средств с опасными грузами",height:30,type:"Предписывающие знаки"},"4.8.2":{title:"Направление движения транспортных средств с опасными грузами",height:30,type:"Предписывающие знаки"},"4.8.3":{title:"Направление движения транспортных средств с опасными грузами",height:30,type:"Предписывающие знаки"},5.1:{title:"Автомагистраль",height:30,type:"Знаки особых предписаний"},5.2:{title:"Конец автомагистрали",height:30,type:"Знаки особых предписаний"},5.3:{title:"Дорога для автомобилей",height:30,type:"Знаки особых предписаний"},5.4:{title:"Конец дороги для автомобилей",height:30,type:"Знаки особых предписаний"},5.5:{title:"Дорога с односторонним движением",height:20,type:"Знаки особых предписаний"},5.6:{title:"Конец дороги с односторонним движением",height:20,type:"Знаки особых предписаний"},"5.7.1":{title:"Выезд на дорогу с односторонним движением",height:20,type:"Знаки особых предписаний"},"5.7.2":{title:"Выезд на дорогу с односторонним движением",height:20,type:"Знаки особых предписаний"},5.8:{title:"Реверсивное движение",height:20,type:"Знаки особых предписаний"},5.9:{title:"Конец реверсивного движения",height:20,type:"Знаки особых предписаний"},"5.10":{title:"Выезд на дорогу с реверсивным движением",height:20,type:"Знаки особых предписаний"},"5.11.1":{title:"Дорога с полосой для маршрутных транспортных средств",height:20,type:"Знаки особых предписаний"},"5.11.2":{title:"Дорога с полосой для велосипедистов",height:20,type:"Знаки особых предписаний"},"5.12.1":{title:"Конец дороги с полосой для маршрутных транспортных средств",height:20,type:"Знаки особых предписаний"},"5.12.2":{title:"Конец дороги с полосой для велосипедистов",height:20,type:"Знаки особых предписаний"},"5.13.1":{title:"Выезд на дорогу с полосой для маршрутных транспортных средств",height:20,type:"Знаки особых предписаний"},"5.13.2":{title:"Выезд на дорогу с полосой для маршрутных транспортных средств",height:20,type:"Знаки особых предписаний"},"5.13.3":{title:"Выезд на дорогу с полосой для велосипедистов",height:20,type:"Знаки особых предписаний"},"5.13.4":{title:"Выезд на дорогу с полосой для велосипедистов",height:20,type:"Знаки особых предписаний"},"5.14.1":{title:"Полоса для маршрутных транспортных средств",height:20,type:"Знаки особых предписаний"},"5.14.2":{title:"Полоса для велосипедистов",height:20,type:"Знаки особых предписаний"},"5.14.3":{title:"Конец полосы для маршрутных транспортных средств",height:20,type:"Знаки особых предписаний"},"5.14.4":{title:"Конец полосы для велосипедистов",height:20,type:"Знаки особых предписаний"},"5.15.1":{title:"Направления движения по полосам",height:20,type:"Знаки особых предписаний"},"5.15.2 A":{title:"Направления движения по полосе",height:20,type:"Знаки особых предписаний"},"5.15.2 B":{title:"Направления движения по полосе",height:20,type:"Знаки особых предписаний"},"5.15.2 C":{title:"Направления движения по полосе",height:20,type:"Знаки особых предписаний"},"5.15.2 D":{title:"Направления движения по полосе",height:20,type:"Знаки особых предписаний"},"5.15.2 E":{title:"Направления движения по полосе",height:20,type:"Знаки особых предписаний"},"5.15.2 F":{title:"Направления движения по полосе",height:20,type:"Знаки особых предписаний"},"5.15.2 G":{title:"Направления движения по полосе",height:20,type:"Знаки особых предписаний"},"5.15.2 H":{title:"Направления движения по полосе",height:20,type:"Знаки особых предписаний"},"5.15.2 I":{title:"Направления движения по полосе",height:20,type:"Знаки особых предписаний"},"5.15.2 K":{title:"Направления движения по полосе",height:20,type:"Знаки особых предписаний"},"5.15.3 A":{title:"Начало полосы",height:20,type:"Знаки особых предписаний"},"5.15.3 B":{title:"Начало полосы",height:20,type:"Знаки особых предписаний"},"5.15.3 C":{title:"Начало полосы",height:20,type:"Знаки особых предписаний"},"5.15.4 A":{title:"Начало полосы",height:20,type:"Знаки особых предписаний"},"5.15.4 B":{title:"Начало полосы",height:20,type:"Знаки особых предписаний"},"5.15.5":{title:"Конец полосы",height:20,type:"Знаки особых предписаний"},"5.15.6":{title:"Конец полосы",height:20,type:"Знаки особых предписаний"},"5.15.7 A":{title:"Направление движения по полосам",height:20,type:"Знаки особых предписаний"},"5.15.7 B":{title:"Направление движения по полосам",height:20,type:"Знаки особых предписаний"},"5.15.7 C":{title:"Направление движения по полосам",height:20,type:"Знаки особых предписаний"},"5.15.8":{title:"Число полос",height:20,type:"Знаки особых предписаний"},5.16:{title:"Место остановки автобуса и (или) троллейбуса",height:30,type:"Знаки особых предписаний"},5.17:{title:"Место остановки трамвая",height:30,type:"Знаки особых предписаний"},5.18:{title:"Место стоянки легковых такси",height:30,type:"Знаки особых предписаний"},"5.19.1":{title:"Пешеходный переход",height:20,type:"Знаки особых предписаний"},"5.19.2":{title:"Пешеходный переход",height:20,type:"Знаки особых предписаний"},"5.19.3":{title:"Диагональный пешеходный переход",height:20,type:"Знаки особых предписаний"},"5.19.4 A":{title:"Диагональный пешеходный переход",height:20,type:"Знаки особых предписаний"},"5.19.4 B":{title:"Диагональный пешеходный переход",height:20,type:"Знаки особых предписаний"},"5.20":{title:"Искусственная неровность",height:20,type:"Знаки особых предписаний"},5.21:{title:"Жилая зона",height:30,type:"Знаки особых предписаний"},5.22:{title:"Конец жилой зоны",height:30,type:"Знаки особых предписаний"},"5.23.1":{title:"Начало населённого пункта",height:20,type:"Знаки особых предписаний"},"5.23.2":{title:"Начало населённого пункта",height:20,type:"Знаки особых предписаний"},"5.24.1":{title:"Конец населённого пункта",height:20,type:"Знаки особых предписаний"},"5.24.2":{title:"Конец населённого пункта",height:20,type:"Знаки особых предписаний"},5.25:{title:"Начало населённого пункта",height:20,type:"Знаки особых предписаний"},5.26:{title:"Конец населённого пункта",height:20,type:"Знаки особых предписаний"},5.27:{title:"Зона с ограничением стоянки",height:30,type:"Знаки особых предписаний"},5.28:{title:"Конец зоны с ограничением стоянки",height:30,type:"Знаки особых предписаний"},5.29:{title:"Зона регулируемой стоянки",height:30,type:"Знаки особых предписаний"},"5.30":{title:"Конец зоны регулируемой стоянки",height:30,type:"Знаки особых предписаний"},5.31:{title:"Зона с ограничением максимальной скорости",height:30,type:"Знаки особых предписаний"},5.32:{title:"Конец зоны с ограничением максимальной скорости",height:30,type:"Знаки особых предписаний"},5.33:{title:"Пешеходная зона",height:30,type:"Знаки особых предписаний"},5.34:{title:"Конец пешеходной зоны",height:30,type:"Знаки особых предписаний"},5.35:{title:"Зона с ограничением экологического класса механических транспортных средств",height:30,type:"Знаки особых предписаний"},5.36:{title:"Конец зоны с ограничением экологического класса механических транспортных средств",height:30,type:"Знаки особых предписаний"},"5.37 A":{title:"Зона с ограничением экологического класса по видам транспортных средств",height:30,type:"Знаки особых предписаний"},"5.37 B":{title:"Зона с ограничением экологического класса по видам транспортных средств",height:30,type:"Знаки особых предписаний"},"5.38 A":{title:"Конец зоны с ограничением экологического класса по видам транспортных средств",height:30,type:"Знаки особых предписаний"},"5.38 B":{title:"Конец зоны с ограничением экологического класса по видам транспортных средств",height:30,type:"Знаки особых предписаний"},5.39:{title:"Велосипедная зона",height:30,type:"Знаки особых предписаний"},"5.40":{title:"Конец велосипедной зоны",height:30,type:"Знаки особых предписаний"},6.1:{title:"Общие ограничения максимальной скорости",height:30,type:"Информационные знаки"},"6.2-50":{title:"Рекомендуемая скорость",height:20,type:"Информационные знаки"},"6.3.1":{title:"Место для разворота",height:20,type:"Информационные знаки"},"6.3.2":{title:"Зона для разворота",height:20,type:"Информационные знаки"},"6.4 A":{title:"Парковка (парковочное место)",height:20,type:"Информационные знаки"},"6.4 B":{title:"Парковка (платные услуги)",height:20,type:"Информационные знаки"},"6.4 C":{title:"Парковка (только для инвалидов)",height:20,type:"Информационные знаки"},6.5:{title:"Полоса аварийной остановки",height:20,type:"Информационные знаки"},6.6:{title:"Подземный пешеходный переход",height:20,type:"Информационные знаки"},6.7:{title:"Надземный пешеходный переход",height:20,type:"Информационные знаки"},"6.8.1":{title:"Тупик",height:20,type:"Информационные знаки"},"6.8.2":{title:"Тупик",height:20,type:"Информационные знаки"},"6.8.3":{title:"Тупик",height:20,type:"Информационные знаки"},"6.9.1 A":{title:"Предварительный указатель направлений",height:20,type:"Информационные знаки"},"6.9.1 B":{title:"Предварительный указатель направлений",height:20,type:"Информационные знаки"},"6.9.1 C":{title:"Предварительный указатель направлений",height:20,type:"Информационные знаки"},"6.9.1 D":{title:"Предварительный указатель направлений",height:20,type:"Информационные знаки"},"6.9.1 E":{title:"Предварительный указатель направлений",height:20,type:"Информационные знаки"},"6.9.1 F":{title:"Предварительный указатель направлений",height:20,type:"Информационные знаки"},"6.9.2 A":{title:"Предварительный указатель направления",height:20,type:"Информационные знаки"},"6.9.2 B":{title:"Предварительный указатель направления",height:20,type:"Информационные знаки"},"6.9.2 C":{title:"Предварительный указатель направления",height:20,type:"Информационные знаки"},"6.9.3":{title:"Схема движения",height:20,type:"Информационные знаки"},"6.10.1 A":{title:"Указатель направлений",height:20,type:"Информационные знаки"},"6.10.1 B":{title:"Указатель направлений",height:20,type:"Информационные знаки"},"6.10.1 C":{title:"Указатель направлений",height:20,type:"Информационные знаки"},"6.10.1 D":{title:"Указатель направлений",height:20,type:"Информационные знаки"},"6.10.1 E":{title:"Указатель направлений",height:20,type:"Информационные знаки"},"6.10.1 F":{title:"Указатель направлений",height:20,type:"Информационные знаки"},"6.10.1 G":{title:"Указатель направлений",height:20,type:"Информационные знаки"},"6.10.2 A":{title:"Указатель направления",height:20,type:"Информационные знаки"},"6.10.2 B":{title:"Указатель направления",height:20,type:"Информационные знаки"},"6.11 A":{title:"Наименование объекта",height:20,type:"Информационные знаки"},"6.11 B":{title:"Наименование объекта",height:20,type:"Информационные знаки"},"6.11 C":{title:"Наименование объекта",height:20,type:"Информационные знаки"},"6.11 D":{title:"Наименование объекта",height:20,type:"Информационные знаки"},"6.12 A":{title:"Указатель расстояний",height:20,type:"Информационные знаки"},"6.12 B":{title:"Указатель расстояний",height:20,type:"Информационные знаки"},"6.12 C":{title:"Указатель расстояний",height:20,type:"Информационные знаки"},"6.13 A":{title:"Километровый знак",height:20,type:"Информационные знаки"},"6.13 B":{title:"Километровый знак",height:20,type:"Информационные знаки"},"6.13 C":{title:"Километровый знак",height:20,type:"Информационные знаки"},"6.13 D":{title:"Километровый знак",height:20,type:"Информационные знаки"},"6.13 E":{title:"Километровый знак",height:20,type:"Информационные знаки"},"6.14.1 A":{title:"Номер маршрута",height:20,type:"Информационные знаки"},"6.14.1 B":{title:"Номер маршрута",height:20,type:"Информационные знаки"},"6.14.1 C":{title:"Номер маршрута",height:20,type:"Информационные знаки"},"6.14.1 D":{title:"Номер маршрута",height:20,type:"Информационные знаки"},"6.14.2 A":{title:"Номер маршрута",height:20,type:"Информационные знаки"},"6.14.2 B":{title:"Номер маршрута",height:20,type:"Информационные знаки"},"6.14.2 C":{title:"Номер маршрута",height:20,type:"Информационные знаки"},"6.15.1":{title:"Направление движения для грузовых автомобилей",height:20,type:"Информационные знаки"},"6.15.2":{title:"Направление движения для грузовых автомобилей",height:20,type:"Информационные знаки"},"6.15.3":{title:"Направление движения для грузовых автомобилей",height:20,type:"Информационные знаки"},6.16:{title:"Стоп-линия",height:20,type:"Информационные знаки"},6.17:{title:"Схема объезда",height:25,type:"Информационные знаки"},"6.18.1":{title:"Направление объезда",height:20,type:"Информационные знаки"},"6.18.2":{title:"Направление объезда",height:20,type:"Информационные знаки"},"6.18.3":{title:"Направление объезда",height:20,type:"Информационные знаки"},"6.19.1":{title:"Предварительный указатель перестроения на другую проезжую часть",height:25,type:"Информационные знаки"},"6.19.2":{title:"Предварительный указатель перестроения на другую проезжую часть",height:25,type:"Информационные знаки"},"6.20.1":{title:"Аварийный выход",height:20,type:"Информационные знаки"},"6.20.2":{title:"Аварийный выход",height:20,type:"Информационные знаки"},"6.21.1":{title:"Направление движения к аварийному выходу",height:20,type:"Информационные знаки"},"6.21.2":{title:"Направление движения к аварийному выходу",height:20,type:"Информационные знаки"},6.22:{title:"Фотовидеофиксация",height:20,type:"Информационные знаки"},7.1:{title:"Пункт медицинской помощи",height:30,type:"Знаки сервиса"},7.2:{title:"Больница",height:30,type:"Знаки сервиса"},7.3:{title:"Автозаправочная станция",height:30,type:"Знаки сервиса"},7.4:{title:"Техническое обслуживание автомобилей",height:30,type:"Знаки сервиса"},7.5:{title:"Мойка автомобилей",height:30,type:"Знаки сервиса"},7.6:{title:"Телефон",height:30,type:"Знаки сервиса"},7.7:{title:"Пункт питания",height:30,type:"Знаки сервиса"},7.8:{title:"Питьевая вода",height:30,type:"Знаки сервиса"},7.9:{title:"Гостиница или мотель",height:30,type:"Знаки сервиса"},"7.10":{title:"Кемпинг",height:30,type:"Знаки сервиса"},7.11:{title:"Место отдыха",height:30,type:"Знаки сервиса"},7.12:{title:"Пост ДПС",height:30,type:"Знаки сервиса"},7.13:{title:"Полиция",height:30,type:"Знаки сервиса"},"7.14.1":{title:"Пункт таможенного контроля",height:30,type:"Знаки сервиса"},"7.14.2":{title:"Пункт транспортного контроля",height:30,type:"Знаки сервиса"},7.15:{title:"Зона приёма радиостанции, передающей информацию о дорожном движении",height:30,type:"Знаки сервиса"},7.16:{title:"Зона радиосвязи с аварийными службами",height:30,type:"Знаки сервиса"},7.17:{title:"Бассейн или пляж",height:30,type:"Знаки сервиса"},7.18:{title:"Туалет",height:30,type:"Знаки сервиса"},7.19:{title:"Телефон экстренной связи",height:30,type:"Знаки сервиса"},"7.20":{title:"Огнетушитель",height:30,type:"Знаки сервиса"},7.21:{title:"Автозаправочная станция с возможностью зарядки электромобилей",height:30,type:"Знаки сервиса"}},ng={"8.1.1":{title:"Расстояние до объекта",height:20,type:"Знаки дополнительной информации"},"8.1.2":{title:"Расстояние до объекта",height:20,type:"Знаки дополнительной информации"},"8.1.3":{title:"Расстояние до объекта",height:20,type:"Знаки дополнительной информации"},"8.1.4":{title:"Расстояние до объекта",height:20,type:"Знаки дополнительной информации"},"8.2.1":{title:"Зона действия",height:20,type:"Знаки дополнительной информации"},"8.2.2":{title:"Зона действия",height:40,type:"Знаки дополнительной информации"},"8.2.3":{title:"Зона действия",height:40,type:"Знаки дополнительной информации"},"8.2.4":{title:"Зона действия",height:40,type:"Знаки дополнительной информации"},"8.2.5":{title:"Зона действия",height:20,type:"Знаки дополнительной информации"},"8.2.6":{title:"Зона действия",height:20,type:"Знаки дополнительной информации"},"8.3.1":{title:"Направления действия",height:20,type:"Знаки дополнительной информации"},"8.3.2":{title:"Направления действия",height:20,type:"Знаки дополнительной информации"},"8.3.3":{title:"Направления действия",height:20,type:"Знаки дополнительной информации"},"8.4.1":{title:"Вид транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.2":{title:"Вид транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.3.1":{title:"Вид транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.3.2":{title:"Вид транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.4":{title:"Вид транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.5":{title:"Вид транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.6":{title:"Вид транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.7.1":{title:"Вид транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.7.2":{title:"Вид транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.8":{title:"Вид транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.9":{title:"Кроме вида транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.10":{title:"Кроме вида транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.11":{title:"Кроме вида транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.12":{title:"Кроме вида транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.13":{title:"Кроме вида транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.14":{title:"Кроме вида транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.15":{title:"Кроме вида транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.5.1":{title:"Субботние, воскресные и праздничные дни",height:20,type:"Знаки дополнительной информации"},"8.5.2":{title:"Рабочие дни",height:20,type:"Знаки дополнительной информации"},"8.5.3":{title:"Дни недели",height:20,type:"Знаки дополнительной информации"},"8.5.4":{title:"Время действия",height:20,type:"Знаки дополнительной информации"},"8.5.5":{title:"Время действия",height:20,type:"Знаки дополнительной информации"},"8.5.6":{title:"Время действия",height:20,type:"Знаки дополнительной информации"},"8.5.7":{title:"Время действия",height:20,type:"Знаки дополнительной информации"},"8.6.1":{title:"Способ постановки транспортного средства на стоянку",height:20,type:"Знаки дополнительной информации"},"8.6.2":{title:"Способ постановки транспортного средства на стоянку",height:20,type:"Знаки дополнительной информации"},"8.6.3":{title:"Способ постановки транспортного средства на стоянку",height:20,type:"Знаки дополнительной информации"},"8.6.4":{title:"Способ постановки транспортного средства на стоянку",height:20,type:"Знаки дополнительной информации"},"8.6.5":{title:"Способ постановки транспортного средства на стоянку",height:20,type:"Знаки дополнительной информации"},"8.6.6":{title:"Способ постановки транспортного средства на стоянку",height:20,type:"Знаки дополнительной информации"},"8.6.7":{title:"Способ постановки транспортного средства на стоянку",height:20,type:"Знаки дополнительной информации"},"8.6.8":{title:"Способ постановки транспортного средства на стоянку",height:20,type:"Знаки дополнительной информации"},"8.6.9":{title:"Способ постановки транспортного средства на стоянку",height:20,type:"Знаки дополнительной информации"},8.7:{title:"Стоянка с неработающим двигателем",height:20,type:"Знаки дополнительной информации"},8.8:{title:"Платные услуги",height:20,type:"Знаки дополнительной информации"},"8.9.1":{title:"Ограничение продолжительности стоянки",height:20,type:"Знаки дополнительной информации"},"8.9.2":{title:"Стоянка только для владельцев парковочных разрешений",height:20,type:"Знаки дополнительной информации"},"8.9.3":{title:"Стоянка только транспортных средств дипломатического корпуса",height:20,type:"Знаки дополнительной информации"},"8.10":{title:"Место для осмотра автомобилей",height:20,type:"Знаки дополнительной информации"},8.11:{title:"Ограничение разрешённой максимальной массы",height:20,type:"Знаки дополнительной информации"},8.12:{title:"Опасная обочина",height:20,type:"Знаки дополнительной информации"},8.13:{title:"Направление главной дороги",height:20,type:"Знаки дополнительной информации"},"8.13 B":{title:"Направление главной дороги",height:20,type:"Знаки дополнительной информации"},8.14:{title:"Полоса движения",height:20,type:"Знаки дополнительной информации"},8.15:{title:"Слепые пешеходы",height:20,type:"Знаки дополнительной информации"},8.16:{title:"Влажное покрытие",height:20,type:"Знаки дополнительной информации"},8.17:{title:"Инвалиды",height:20,type:"Знаки дополнительной информации"},8.18:{title:"Кроме инвалидов",height:20,type:"Знаки дополнительной информации"},8.19:{title:"Класс опасного груза",height:20,type:"Знаки дополнительной информации"},"8.20.1":{title:"Тип тележки транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.20.2":{title:"Тип тележки транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.21.1":{title:"Вид маршрутного транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.21.2":{title:"Вид маршрутного транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.21.3":{title:"Вид маршрутного транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.22.1":{title:"Препятствие",height:68,type:"Знаки дополнительной информации"},"8.22.2":{title:"Препятствие",height:68,type:"Знаки дополнительной информации"},"8.22.3":{title:"Препятствие",height:68,type:"Знаки дополнительной информации"},8.24:{title:"Работает эвакуатор",height:20,type:"Знаки дополнительной информации"},8.25:{title:"Экологический класс транспортного средства",height:20,type:"Знаки дополнительной информации"},8.26:{title:"Зарядка электромобилей",height:20,type:"Знаки дополнительной информации"}},ig={...tg,...ng},rg=e=>{const t=[],n={source:e,layer:c_.TRAFFIC_SIGN},i={},r={};Object.keys(tg).forEach(e=>{const t=`${eg.fileName}-${e}`,{height:n}=tg[e],s=sg({type:"map",number:e});i[t]={url:s,filtering:"mipmap",sprites:{base:[0,0,eg.widths.map,n]}},r[t]={filter:`function() {\n const { traffic_sign_number } = feature;\n\n const isFilter = traffic_sign_number === '${e}';\n\n return isFilter;\n }`,draw:{points:{collide:!1,texture:t,size:[eg.widths.map,n],sprite:"base",placement:"midpoint"}}}});const s={id:gn(),data:n,textures:i,sublayers:r};return t.push(s),t},sg=({type:e,number:t})=>{const n=eg.widths[e];return wn(`msk/${eg.fileName}_${n}/${t}.${eg.extension}`)},og=e=>{const t={};e.forEach(({traffic_sign_number:e,traffic_sign_title:n,traffic_sign_type:i,height:r})=>{t[e]={title:n,height:Number(r),type:i}}),_n(t)},ag={size:20,extension:"svg"},lg=e=>{const t=[],n={source:e,layer:c_.TRAFFIC_SIGNAL},i={},r="traffic_signal";i[r]={url:wn(`msk/${r}/${r}_${ag.size}.${ag.extension}`),filtering:"mipmap",sprites:{base:[0,0,ag.size,ag.size]}};const s={id:gn(),data:n,draw:{points:{collide:!1,texture:r,size:ag.size,sprite:"base",placement:"midpoint"}},textures:i,sublayers:{}};return t.push(s),t},ug=e=>{const t=[],n={id:gn(),data:{source:e,layer:c_.WATER_AREA},draw:{polygons:{color:"#7DBEE4"},lines:{color:"#7DBEE4",width:20,cap:"round",join:"round"}}},i={id:gn(),data:{source:e,layer:c_.WATER_AREA_LABEL},filter:"function() {\n const { display_class } = feature;\n\n if ($zoom >= 14) {\n return true;\n } else {\n return display_class <= 4;\n }\n }",draw:{text:{text_source:"name",font:{fill:"#0A80C4",size:"14px",stroke:{color:"white",width:"3px"}}}}},r={id:gn(),data:{source:e,layer:c_.WATER_LAKE_LABEL},filter:"function() {\n const { display_class } = feature;\n\n if ($zoom >= 14) {\n return true;\n } else {\n return display_class <= 4;\n }\n }",draw:{text:{text_source:"name",font:{fill:"#0A80C4",size:"14px",stroke:{color:"white",width:"3px"}}}}};return t.push(n,i,r),t},cg=e=>{const t=[],n={},i={source:e,layer:c_.WATER_LINK},r={id:gn(),data:i};return n.geometry={draw:{lines:{color:"#7DBEE4",width:5,cap:"round",join:"round"}}},n.text={filter:"function() {\n return $zoom >= 10;\n }",draw:{text:{text_source:"name",font:{fill:"#0A80C4",size:"14px",stroke:{color:"white",width:"3px"}}}}},r.sublayers=n,t.push(r),t},hg="white",dg=.5,fg={1.1:{color:hg,width:dg},1.2:{color:hg,width:dg},1.5:{color:hg,width:dg,dash:[4,10]},1.6:{color:hg,width:dg,dash:[5,5]},1.7:{color:hg,width:dg,dash:[4,10]},"1.7-blue":{color:"blue",width:dg,dash:[4,10]},1.8:{color:hg,width:dg},1.12:{color:hg,width:1.5},"1.14.3":{color:hg,width:dg,dash:[3,8]},"1.16.1":{color:hg,width:dg},"1.16.2":{color:hg,width:dg},"1.16.3":{color:hg,width:dg},"1.16.x":{color:hg,width:dg},"1.17.1":{color:"yellow",width:dg},1.26:{color:"yellow",width:dg}};var pg;!function(e){e.ROAD="Road",e.TUNNEL="Tunnel",e.TRAM="Tram",e.CURB="Curb",e.BRIDGE="Bridge"}(pg||(pg={}));const mg={[pg.ROAD]:"#BABCC2",[pg.TUNNEL]:"#EAEBEE",[pg.TRAM]:"#ADA8A8",[pg.CURB]:"#D2D9E6",[pg.BRIDGE]:"#E1DFDD"},_g=({id:e,data:{source:t,layer:n}})=>`${e}-${t}-${n}`,gg=({layer:e,order:t,eventHandlers:n})=>{const i=structuredClone(e),{draw:r,sublayers:s}=i,o=Boolean(n?.[e.data.layer]);if(r){const{points:e,lines:n,polygons:s,text:a,styles:l}=r;e&&(r.points={...structuredClone(e),order:t,interactive:o}),n&&(r.lines={...structuredClone(n),order:t,interactive:o}),s&&(r.polygons={...structuredClone(s),order:t,interactive:o}),a&&(r.text={...structuredClone(a),order:t,interactive:o}),l&&(r.styles=Object.entries(l).reduce((e,[n,i])=>({...e,[n]:{...structuredClone(i),order:t}}),{})),i.draw=structuredClone(r)}return s&&(Object.entries(s).forEach(([e,n])=>{if(n){const{draw:i}=n;if(i){const{points:e,lines:r,polygons:s,text:a}=i;a&&(i.text={...structuredClone(a),order:t,interactive:o}),e&&(i.points={...structuredClone(e),order:t,interactive:o}),r&&(i.lines={...structuredClone(r),order:t,interactive:o}),s&&(i.polygons={...structuredClone(s),order:t,interactive:o}),n.draw=structuredClone(i)}s[e]=structuredClone(n)}}),i.sublayers=structuredClone(s)),i},yg=e=>{const t=y_(e),n=B_(),i=U_(),r=g_(e),s=A_(e),o=T_(e),a=ug(e),l=V_(e),u=[];if(e===h_.MSK)u.push(...t,...r,...s,...o,...a,...l);else u.push(...t,...r,...s,...n,...i,...o,...a,...l);return u},vg=e=>{const t=j_(e),n=J_(e),i=cg(e),r=G_(e),s=E_(e),o=[...i,...n,...t];if(e===h_.MSK);else o.push(...r,...s);return o},bg=e=>{const t=X_(e),n=x_(e);return[...t,...Q_(e),...n,...rg(e),...lg(e),...b_(e),...Z_(e)]},xg=e=>{const t=[],n=__(e),i=yg(e),r=vg(e),s=bg(e),o=(e=>{const t=[],n={source:e,layer:c_.ROAD_POLY};return Object.values(pg).forEach(e=>{const i={id:gn(),data:n,filter:`function() {\n const { type } = feature;\n\n const isFilter = type === '${e}';\n\n return isFilter;\n }`,draw:{polygons:{color:mg[e]}}};t.push(i)}),t})(e),a=(e=>{const t=[],n={source:e,layer:c_.LANE_MARKING_POLY},i={id:gn(),data:n,filter:"function() {\n const { poly_number } = feature;\n\n const isFilter = poly_number === '1.14.1';\n\n return isFilter;\n }",draw:{styles:{zebra_crossing:{attributes:{a_angle:"function() {\n return feature.angle;\n }"}}}}};return t.push(i),t})(e),l=(e=>{const t=[],n={source:e,layer:c_.LANE_MARKING_LINE},i=Object.entries(fg).reduce((e,[t,n])=>{const i={filter:`function () {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '${t}';\n\n return isFilter;\n }`,draw:{lines:n}};return{...e,[t]:i}},{}),r={id:gn(),data:n,sublayers:i},s={"1.3-left":{id:gn(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.3';\n\n return isFilter;\n }",draw:{lines:{color:hg,width:dg,offset:-.5}}},"1.3-right":{id:gn(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.3';\n\n return isFilter;\n }",draw:{lines:{color:hg,width:dg,offset:dg}}},"1.11r-left":{id:gn(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.11r';\n\n return isFilter;\n }",draw:{lines:{color:hg,width:dg,offset:-.5}}},"1.11r-right":{id:gn(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.11r';\n\n return isFilter;\n }",draw:{lines:{color:hg,width:dg,offset:dg,dash:[5,5]}}},"1.11l-left":{id:gn(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.11l';\n\n return isFilter;\n }",draw:{lines:{color:hg,width:dg,offset:-.5,dash:[5,5]}}},"1.11l-right":{id:gn(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.11l';\n\n return isFilter;\n }",draw:{lines:{color:hg,width:dg,offset:dg}}},"1.25-left":{id:gn(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.25';\n\n return isFilter;\n }",draw:{lines:{color:hg,width:1,offset:-.5,dash:[1,1],dash_background_color:[0,0,0,0]}}},"1.25-right":{id:gn(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.25';\n\n return isFilter;\n }",draw:{lines:{color:"rgba(0,0,0,0)",width:1,offset:.5,dash:[1,1],dash_background_color:[1,1,1]}}}};return t.push(r,...Object.values(s)),t})(e),u=S_(e),c=(e=>{const t=[],n={source:e,layer:c_.PARKING_LINE},i={id:gn(),data:n,draw:{lines:{color:"white",width:1}}};return t.push(i),t})(e);if(e===h_.MSK)t.push(...i,...r,...o,...a,...u,...l,...c,...n,...s);else t.push(...i,...r,...n,...s);return t},wg=e=>`${e.getFullYear()}-${`${e.getUTCMonth()+1}`.padStart(2,"0")}-${`${e.getUTCDate()}`.padStart(2,"0")}`,Eg=e=>{const t={[ve.CREATE]:"",[ve.UPDATE]:"",[ve.DELETE]:""};return Object.values(ve).forEach(n=>{t[n]=`${e}-${n}`}),t},Ag=({eventHandlers:t,defaultLayers:n})=>{const[i,r]=e.useState(null),[s,o]=e.useState(null),[a,l]=e.useState(!1),u=e.useMemo(()=>{if(null===i)return null;const{scene:e}=i;return e},[i]),c=e.useCallback(()=>{Promise.resolve().then(function(){return Ob}).then(()=>{if(window.Tangram){const e=window.Tangram.leafletLayer({scene:m_,modifyScrollWheel:!1,modifyZoomBehavior:!1}),{scene:n}=e;n.subscribe({load:({config:e})=>{o(e),l(!0)}}),e.on("load",({sourceTarget:n})=>{const i=n._map;e.setSelectionEvents({click:({feature:e,leaflet_event:n})=>{if(e){const{source_layer:i,properties:r}=e;t?.[i]?.click?.({leaflet_event:n,properties:r})}},hover:({feature:e,leaflet_event:n})=>{const r=i.getContainer();if(e){const{source_layer:i,properties:s}=e;r.style.cursor="pointer",t?.[i]?.hover?.({leaflet_event:n,properties:s})}else r.style.cursor="default"}})}),r(e)}})},[t]),h=e.useCallback(e=>{s?e(s):d_.warn({message:"Config не инициализирована"})},[s]),d=e.useCallback(e=>{h(t=>{u?e({config:t,scene:u}):d_.warn({message:"Scene не инициализирована"})})},[h,u]),f=e.useCallback(e=>{d(({config:t,scene:n})=>{const i=p_[e];t.sources[e]={tile_size:256,url:i,type:"MVT"},n.updateConfig({rebuild:!0})})},[d]),p=e.useCallback(e=>{d(({config:t,scene:n})=>{delete t.sources[e],n.updateConfig({rebuild:!0})})},[d]),m=e.useCallback(e=>{let t=null;return h(n=>{t=structuredClone(n.sources[e])}),t},[h]),_=e.useCallback((e,t)=>{d(({config:n,scene:i})=>{n.sources[e].url=t,i.updateConfig({rebuild:!0})})},[d]),g=e.useCallback(e=>{p(e),f(e)},[p,f]),y=e.useCallback(e=>{d(({config:n,scene:i})=>{const r=E().length+1,s=gg({layer:e,order:r,eventHandlers:t}),o=_g(s),{sublayers:a,draw:l,textures:u}=s;if(l){const{styles:e}=l;e&&(s.draw={...structuredClone(s.draw),...structuredClone(e)})}n.layers[o]={...structuredClone(s),...structuredClone(a)},n.textures={...structuredClone(n.textures),...structuredClone(u)},i.updateConfig({rebuild:!0})})},[d]),v=e.useCallback(e=>{const t=_g(e);d(({config:e,scene:n})=>{delete e.layers[t],n.updateConfig({rebuild:!0})})},[d]),b=e.useCallback(({name:e,style:t})=>{d(({config:n,scene:i})=>{n.styles[e]=structuredClone(t),i.updateConfig({rebuild:!0})})},[d]),x=e.useCallback(e=>{let t=!0;const n=_g(e);return h(e=>{const{visible:i=!0}=e.layers[n];t=i}),t},[_g,h]),w=e.useCallback(({layer:e,visible:t})=>{const n=_g(e);d(({config:e,scene:i})=>{e.layers[n].visible=t,i.updateConfig({rebuild:!0})})},[d]),E=e.useCallback(()=>{const e=[];return h(t=>{e.push(...Object.keys(t.layers))}),e},[h]),A=e.useCallback(()=>{h(e=>{const{layers:t}=e;Object.values(t).forEach(v)})},[h,v]),T=e.useCallback(()=>{const e=[];return h(t=>{e.push(...Object.keys(t.sources))}),e},[s]);return e.useEffect(()=>(ra.instance.isValidApiKey&&c(),()=>{r(null),o(null)}),[ra.instance.isValidApiKey]),e.useEffect(()=>{b({name:"zebra_crossing",style:{base:"polygons",lighting:!1,shaders:{attributes:{a_angle:{type:"float",default:0}},uniforms:{u_stripe_width:1},blocks:{filter:"\n vec3 pos = worldPosition().xyz;\n\n float ang = radians(a_angle);\n\n vec2 dir = vec2(sin(ang), cos(ang));\n\n float positionAlongLine = dot(pos.xy, dir);\n\n float stripe = step(1.0, mod(positionAlongLine / u_stripe_width, 2.0));\n\n color.rgb = mix(vec3(1.0, 1.0, 1.0), vec3(1.0, 0.8, 0.0), stripe);\n \n color.a = 1.0;\n "}}}}),Object.values(h_).forEach(f)},[b,f]),e.useEffect(()=>{n&&a&&n.map(y)},[n,y,a]),{layer:i,scene:u,config:s,addSource:f,getSource:m,updateSource:_,reloadSource:g,addLayer:y,removeLayer:v,addStyle:b,getLayerVisibility:x,toggleLayerVisibility:w,getSources:T,getLayers:E,removeLayers:A}};function Tg(e,t){return Object.freeze({...e,...t})}const Sg=m(null);function kg(){const e=g(Sg);if(null==e)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>");return e}const Og=function(e,t){return null==t?function(t,n){const r=i(void 0);return r.current||(r.current=e(t,n)),r}:function(n,r){const o=i(void 0);o.current||(o.current=e(n,r));const a=i(n),{instance:l}=o.current;return s(function(){a.current!==n&&(t(l,n,a.current),a.current=n)},[l,n,t]),o}}(function({children:e,...t},n){const i=new Pe.Control.Layers(void 0,void 0,t);return r=i,s=Tg(n,{layersControl:i}),Object.freeze({instance:r,context:s,container:o});var r,s,o},function(e,t,n){t.collapsed!==n.collapsed&&(!0===t.collapsed?e.collapse():e.expand())});var Pg;const Cg=function(e){function i(n,i){const{instance:r,context:s}=e(n).current;y(i,()=>r);const{children:o}=n;return null==o?null:t.createElement(Sg,{value:s},o)}return n(i)}((Pg=Og,function(e){const t=kg(),n=Pg(e,t),{instance:r}=n.current,o=i(e.position),{position:a}=e;return s(function(){return r.addTo(t.map),function(){r.remove()}},[t.map,r]),s(function(){null!=a&&a!==o.current&&(r.setPosition(a),o.current=a)},[r,a]),n}));function Rg(e){return function(n){const o=kg(),a=i(n),[u,c]=p(null),{layersControl:h,map:d}=o,f=r(t=>{null!=h&&(a.current.checked&&d.addLayer(t),e(h,t,a.current.name),c(t))},[e,h,d]),m=r(e=>{h?.removeLayer(e),c(null)},[h]),_=l(()=>Tg(o,{layerContainer:{addLayer:f,removeLayer:m}}),[o,f,m]);return s(()=>{null!==u&&a.current!==n&&(!0!==n.checked||null!=a.current.checked&&!1!==a.current.checked?!0!==a.current.checked||null!=n.checked&&!1!==n.checked||d.removeLayer(u):d.addLayer(u),a.current=n)}),n.children?t.createElement(Sg,{value:_},n.children):null}}Cg.BaseLayer=Rg(function(e,t,n){e.addBaseLayer(t,n)}),Cg.Overlay=Rg(function(e,t,n){e.addOverlay(t,n)});class Mg{props;constructor(e){this.props=e,this._initLayer()}_initLayer(){if(ra.instance.isValidApiKey){const e=this._createLayer();if(e){const{scene:t}=e;t.subscribe({load:({config:e})=>{this.config=e,this.isReady=!0,this._init()}}),this.layer=e,this.props.onCreate?.({layer:e}),this._addHandlers(e)}}}_createLayer(){if(window.Tangram){return window.Tangram.leafletLayer({scene:m_})}}_addHandlers(e){e.addEventListener("load",({sourceTarget:t})=>{this.props.onLoad?.({layer:e});const n=t._map;e.setSelectionEvents({click:({feature:e,leaflet_event:t})=>{if(e){const{source_layer:n,properties:i}=e;this.props.eventHandlers?.[n]?.click?.({leaflet_event:t,properties:i})}},hover:({feature:e,leaflet_event:t})=>{const i=n.getContainer();if(e){const{source_layer:n,properties:r}=e;i.style.cursor="pointer",this.props.eventHandlers?.[n]?.hover?.({leaflet_event:t,properties:r})}else i.style.cursor="default"}})},this),e.addEventListener("add",()=>{this.props.onAdd?.({layer:e})},this),e.addEventListener("remove",()=>{this.props.onRemove?.({layer:e})},this)}destroy(){this.layer&&(this.props.onDestroy?.({layer:this.layer}),this.layer.clearAllEventListeners(),this.layer.remove()),this.layer=null}_init(){this.addStyle({name:"zebra_crossing",style:{base:"polygons",lighting:!1,shaders:{attributes:{a_angle:{type:"float",default:0}},uniforms:{u_stripe_width:1},blocks:{filter:"\n vec3 pos = worldPosition().xyz;\n\n float ang = radians(a_angle);\n\n vec2 dir = vec2(sin(ang), cos(ang));\n\n float positionAlongLine = dot(pos.xy, dir);\n\n float stripe = step(1.0, mod(positionAlongLine / u_stripe_width, 2.0));\n\n color.rgb = mix(vec3(1.0, 1.0, 1.0), vec3(1.0, 0.8, 0.0), stripe);\n \n color.a = 1.0;\n "}}}});(this.props.defaultLayers??[]).forEach(e=>{this.addLayer(e)}),Object.values(h_).forEach(e=>{this.addSource(e)})}_layer=null;get layer(){return this._layer}set layer(e){this._layer=e}_config=null;get config(){return this._config}set config(e){this._config=e}_isReady=!1;get isReady(){return this._isReady}set isReady(e){this._isReady=e}get scene(){if(null===this.layer)return null;const{scene:e}=this.layer;return e}addStyle({name:e,style:t}){this.config&&this.scene&&(this.config.styles[e]=structuredClone(t),this.scene.updateConfig({rebuild:!0}))}addSource(e){if(this.config&&this.scene){const t=p_[e];this.config.sources[e]={tile_size:256,url:t,type:"MVT"},this.scene.updateConfig({rebuild:!0})}}deleteSource(e){this.config&&this.scene&&(delete this.config.sources[e],this.scene.updateConfig({rebuild:!0}))}getSource(e){let t=null;return this.config&&(t=structuredClone(this.config.sources[e])),t}updateSource(e,t){this.config&&this.scene&&(this.config.sources[e].url=t,this.scene.updateConfig({rebuild:!0}))}reloadSource(e){this.deleteSource(e),this.addSource(e)}addLayer(e){if(this.config&&this.scene){const t=this.getLayers().length+1,n=gg({layer:e,order:t,eventHandlers:this.props.eventHandlers}),i=_g(n),{sublayers:r,draw:s,textures:o}=n;if(s){const{styles:e={}}=s;e&&(n.draw={...structuredClone(n.draw),...structuredClone(e)})}this.config.layers[i]={...structuredClone(n),...structuredClone(r)},this.config.textures={...structuredClone(this.config.textures),...structuredClone(o)},this.scene.updateConfig({rebuild:!0})}}deleteLayers(){if(this.config){const{layers:e}=this.config;Object.values(e).forEach(e=>{this.deleteLayer(e)})}}deleteLayer(e){const t=_g(e);this.config&&this.scene&&(delete this.config.layers[t],this.scene.updateConfig({rebuild:!0}))}getLayers(){const e=[];return this.config&&e.push(...Object.keys(this.config.layers)),e}getLayerVisibility(e){let t=!0;const n=_g(e);if(this.config){const{visible:e=!0}=this.config.layers[n];t=e}return t}toggleLayerVisibility({layer:e,visible:t}){const n=_g(e);this.config&&this.scene&&(this.config.layers[n].visible=t,this.scene.updateConfig({rebuild:!0}))}}const Lg=({layers:t})=>{const n=e.useRef(null),i=kg().map;return e.useEffect(()=>{const{current:e}=n,r=Pe.tileLayer("http://{s}.google.com/vt/lyrs=s&x={x}&y={y}&z={z}",{minZoom:2,maxZoom:25,maxNativeZoom:19,subdomains:["mt0","mt1","mt2","mt3"]});e&&e.addBaseLayer(r,"Google Satellite"),new Mg({defaultLayers:t,onCreate:({layer:t})=>{e&&(e.addBaseLayer(t,"Dartcom"),t.addTo(i))},onDestroy:({layer:t})=>{e&&(e.removeLayer(t),i.removeLayer(t))}})},[]),w(Cg,{ref:n,position:"bottomleft"})},Ng={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",bgcolor:"background.paper",border:"2px solid #000",boxShadow:24,p:4,maxHeight:"90vh",overflowX:"auto",overflowY:"auto"};var zg=Ml(({name:t,children:n,onClose:i,onOpen:r})=>{const s=e.useId(),o=Qo.getIsOpen(t);return e.useEffect(()=>{o?r?.({name:t}):i?.({name:t})},[o]),w(pe,{open:o,onClose:()=>{Qo.close(t)},"aria-labelledby":`modal-${s}-title`,"aria-describedby":`modal-${s}-description`,children:w(fe,{sx:({breakpoints:e})=>({...Ng,[e.up("sm")]:{minWidth:400},[e.down("sm")]:{minWidth:"80vw"}}),children:n})})});function Dg({name:t,items:n,label:i,sx:r,getLabel:s,getValue:o,getKey:a}){const{watch:l,resetField:u,setValue:c}=Bh(),h=l(t),d=e.useId(),f=n.find(e=>o(e)===h)??null;return w(Y,{value:f,options:n,id:d,getOptionLabel:e=>s(e),getOptionKey:e=>a(e),sx:{minWidth:150,...r},size:"small",onChange:(e,n)=>{n?c(t,o(n)):u(t)},renderInput:e=>w(Cd,{...e,label:i})})}const Ig=({items:t,initialValue:n,onChange:i})=>{const[r,s]=e.useState(()=>n??t[0].value),o=e.useId();return e.useEffect(()=>{n&&s(n)},[n]),E(me,{value:r,children:[w(P,{sx:{borderBottom:1,borderColor:"divider"},children:w(_e,{"aria-label":`tabs-${o}`,onChange:(e,t)=>{s(t),i?.(t)},children:t.map(({label:e,value:t})=>w(X,{label:e,value:t,sx:{textTransform:"none"}},`${o}-tab-${t}`))})}),t.map(({content:e,value:t})=>w(ge,{value:t,children:e},`${o}-tab-panel-${t}`))]})};var Fg,jg={exports:{}};
|
|
24
24
|
/* @license
|
|
25
25
|
Papa Parse
|
|
26
26
|
v5.5.3
|