@dartcom/ui-kit 10.1.3 → 10.1.5
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/configs/global/global.d.ts +4 -2
- package/dist/configs/global/global.d.ts.map +1 -1
- package/dist/configs/global/types.d.ts +4 -0
- package/dist/configs/global/types.d.ts.map +1 -1
- package/dist/index.cjs +18 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/services/api/api.d.ts +6 -24
- package/dist/services/api/api.d.ts.map +1 -1
- package/dist/services/api/index.d.ts +1 -0
- package/dist/services/api/index.d.ts.map +1 -1
- package/dist/services/api/types.d.ts +26 -0
- package/dist/services/api/types.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as n from"react";import r,{useLayoutEffect as i,useEffect as s,useRef as o,useMemo as a,useCallback as l,useState as u,createContext as c,memo as h,useReducer as d,useContext as f,use as p,forwardRef as g,createElement as m,cloneElement as _,Component as y,isValidElement as v}from"react";import{Typography as b,Box as x,List as w,ListItem as E,Slide as A,IconButton as S,Dialog as T,DialogTitle as k,DialogContent as O,DialogContentText as R,DialogActions as C,Button as P,styled as M,TextField as N,Autocomplete as D,Accordion as F,AccordionSummary as I,AccordionDetails as z,useTheme as L,Tab as j,CircularProgress as V}from"@mui/material";import U from"@mui/icons-material/Delete";import B from"@mui/icons-material/Edit";import G from"@mui/material/IconButton";import $ from"@mui/icons-material/CloudUpload";import q from"@mui/material/Checkbox";import H from"@mui/material/FormControlLabel";import{styled as W,createTheme as Z,ThemeProvider as K}from"@mui/material/styles";import X from"@mui/material/Typography";import{unstable_batchedUpdates as Y,createPortal as Q}from"react-dom";import{LocalizationProvider as J}from"@mui/x-date-pickers";import{AdapterDateFns as ee}from"@mui/x-date-pickers/AdapterDateFns";import{DateField as te}from"@mui/x-date-pickers/DateField";import ne from"@mui/icons-material/ArrowDownward";import{TabContext as re,TabList as ie,TabPanel as se}from"@mui/lab";import oe from"@mui/material/Box";import ae from"@mui/material/Modal";const le=({text:t="Нет данных"})=>e(b,{variant:"body2",sx:{textAlign:"center",color:"var(--gray-light-color)"},children:t});function ue({items:r,columnsCount:i=1,getContent:s,title:o,getKey:a,onClick:l,sx:u,isShowNoData:c=!0}){const h=0===r.length;return t(x,{sx:{display:"grid",gridTemplateColumns:"1fr",gap:"15px",...u?.root},children:[o?e(b,{variant:"h6",noWrap:!0,sx:{textAlign:"center",fontWeight:700,...u?.title},children:o}):null,h?e(n.Fragment,{children:c?e(le,{}):null}):e(w,{sx:{display:"grid",gridTemplateColumns:`repeat(${i}, 1fr)`,gap:"15px",...u?.list},disablePadding:!0,children:r.map((t,n)=>e(E,{onClick:()=>l?.(t,n),sx:{...u?.item},disablePadding:!0,children:s(t,n)},a(t,n)))})]})}const ce=n.forwardRef(function(t,n){return e(A,{direction:"up",ref:n,...t})}),he=({notification:r,onDelete:i})=>{const s=n.useId(),[o,a]=n.useState(!1),l=()=>{a(!1)};return t(n.Fragment,{children:[e(S,{onClick:e=>{e.stopPropagation(),r?a(!0):i()},children:e(U,{fontSize:"small",color:"error"})}),r?t(T,{slots:{transition:ce},open:o,onClose:l,children:[e(k,{id:`${s}-dialog-title`,children:r.title}),e(O,{children:e(R,{id:`${s}-dialog-text`,children:r.description})}),t(C,{children:[e(P,{variant:"contained",color:"error",sx:{textTransform:"none"},onClick:l,children:"Отмена"}),e(P,{variant:"contained",sx:{textTransform:"none"},onClick:()=>{i(),l()},children:"Подтвердить"})]})]}):null]})},de=t=>{const r=n.useId();return e(n.Fragment,{children:e(S,{id:r,...t,children:e(B,{fontSize:"small",color:"primary"})})})},fe=t=>{const{children:n,variant:r="contained",loading:i,icon:s,sx:o,...a}=t;return s?e(G,{...a,loading:i,children:s}):e(P,{sx:{whiteSpace:"nowrap",padding:"5px 15px",textTransform:"none",...o},loading:i,loadingPosition:"start",variant:r,...a,children:n})},pe=M("input")({clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:1,overflow:"hidden",position:"absolute",bottom:0,left:0,whiteSpace:"nowrap",width:1}),ge=({children:n,accept:r,onFilesLoad:i,...s})=>t(fe,{...s,component:"label",variant:"contained",startIcon:e($,{}),children:[n,e(pe,{type:"file",accept:r,onChange:e=>{const{target:{files:t}}=e;t&&i({event:e,files:t})},multiple:!0})]});var me=e=>"checkbox"===e.type,_e=e=>e instanceof Date,ye=e=>null==e;const ve=e=>"object"==typeof e;var be=e=>!ye(e)&&!Array.isArray(e)&&ve(e)&&!_e(e),xe=e=>be(e)&&e.target?me(e.target)?e.target.checked:e.target.value:e,we=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),Ee="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function Ae(e){if(e instanceof Date)return new Date(e);const t="undefined"!=typeof FileList&&e instanceof FileList;if(Ee&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!(n||be(e)&&(e=>{const t=e.constructor&&e.constructor.prototype;return be(t)&&t.hasOwnProperty("isPrototypeOf")})(e)))return e;const r=n?[]:Object.create(Object.getPrototypeOf(e));for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=Ae(e[t]));return r}var Se=e=>/^\w*$/.test(e),Te=e=>void 0===e,ke=e=>Array.isArray(e)?e.filter(Boolean):[],Oe=e=>ke(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Re=(e,t,n)=>{if(!t||!be(e))return n;const r=(Se(t)?[t]:Oe(t)).reduce((e,t)=>ye(e)?e:e[t],e);return Te(r)||r===e?Te(e[t])?n:e[t]:r},Ce=e=>"boolean"==typeof e,Pe=e=>"function"==typeof e,Me=(e,t,n)=>{let r=-1;const i=Se(t)?[t]:Oe(t),s=i.length,o=s-1;for(;++r<s;){const t=i[r];let s=n;if(r!==o){const n=e[t];s=be(n)||Array.isArray(n)?n:isNaN(+i[r+1])?{}:[]}if("__proto__"===t||"constructor"===t||"prototype"===t)return;e[t]=s,e=e[t]}};const Ne="blur",De="focusout",Fe="change",Ie="onBlur",ze="onChange",Le="onSubmit",je="onTouched",Ve="all",Ue="max",Be="min",Ge="maxLength",$e="minLength",qe="pattern",He="required",We="validate",Ze=r.createContext(null);Ze.displayName="HookFormContext";const Ke=()=>r.useContext(Ze),Xe=e=>{const{children:t,...n}=e;return r.createElement(Ze.Provider,{value:n},t)};var Ye=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(i,s,{get:()=>{const i=s;return t._proxyFormState[i]!==Ve&&(t._proxyFormState[i]=!r||Ve),n&&(n[i]=!0),e[i]}});return i};const Qe="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;var Je=e=>"string"==typeof e,et=(e,t,n,r,i)=>Je(e)?(r&&t.watch.add(e),Re(n,e,i)):Array.isArray(e)?e.map(e=>(r&&t.watch.add(e),Re(n,e))):(r&&(t.watchAll=!0),n),tt=e=>ye(e)||!ve(e);function nt(e,t,n=new WeakSet){if(tt(e)||tt(t))return Object.is(e,t);if(_e(e)&&_e(t))return e.getTime()===t.getTime();const r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const s of r){const r=e[s];if(!i.includes(s))return!1;if("ref"!==s){const e=t[s];if(_e(r)&&_e(e)||be(r)&&be(e)||Array.isArray(r)&&Array.isArray(e)?!nt(r,e,n):!Object.is(r,e))return!1}}return!0}function rt(e){const t=Ke(),{name:n,disabled:i,control:s=t.control,shouldUnregister:o,defaultValue:a,exact:l=!0}=e,u=we(s._names.array,n),c=r.useMemo(()=>Re(s._formValues,n,Re(s._defaultValues,n,a)),[s,n,a]),h=function(e){const t=Ke(),{control:n=t.control,name:i,defaultValue:s,disabled:o,exact:a,compute:l}=e||{},u=r.useRef(s),c=r.useRef(l),h=r.useRef(void 0),d=r.useRef(n),f=r.useRef(i);c.current=l;const[p,g]=r.useState(()=>{const e=n._getWatch(i,u.current);return c.current?c.current(e):e}),m=r.useCallback(e=>{const t=et(i,n._names,e||n._formValues,!1,u.current);return c.current?c.current(t):t},[n._formValues,n._names,i]),_=r.useCallback(e=>{if(!o){const t=et(i,n._names,e||n._formValues,!1,u.current);if(c.current){const e=c.current(t);nt(e,h.current)||(g(e),h.current=e)}else g(t)}},[n._formValues,n._names,o,i]);Qe(()=>(d.current===n&&nt(f.current,i)||(d.current=n,f.current=i,_()),n._subscribe({name:i,formState:{values:!0},exact:a,callback:e=>{_(e.values)}})),[n,a,i,_]),r.useEffect(()=>n._removeUnmounted());const y=d.current!==n,v=f.current,b=r.useMemo(()=>{if(o)return null;const e=!y&&!nt(v,i);return y||e?m():null},[o,y,i,v,m]);return null!==b?b:p}({control:s,name:n,defaultValue:c,exact:l}),d=function(e){const t=Ke(),{control:n=t.control,disabled:i,name:s,exact:o}=e||{},[a,l]=r.useState(n._formState),u=r.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Qe(()=>n._subscribe({name:s,formState:u.current,exact:o,callback:e=>{!i&&l({...n._formState,...e})}}),[s,i,o]),r.useEffect(()=>{u.current.isValid&&n._setValid(!0)},[n]),r.useMemo(()=>Ye(a,n,u.current,!1),[a,n])}({control:s,name:n,exact:l}),f=r.useRef(e),p=r.useRef(void 0),g=r.useRef(s.register(n,{...e.rules,value:h,...Ce(e.disabled)?{disabled:e.disabled}:{}}));f.current=e;const m=r.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Re(d.errors,n)},isDirty:{enumerable:!0,get:()=>!!Re(d.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Re(d.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Re(d.validatingFields,n)},error:{enumerable:!0,get:()=>Re(d.errors,n)}}),[d,n]),_=r.useCallback(e=>g.current.onChange({target:{value:xe(e),name:n},type:Fe}),[n]),y=r.useCallback(()=>g.current.onBlur({target:{value:Re(s._formValues,n),name:n},type:Ne}),[n,s._formValues]),v=r.useCallback(e=>{const t=Re(s._fields,n);t&&t._f&&e&&(t._f.ref={focus:()=>Pe(e.focus)&&e.focus(),select:()=>Pe(e.select)&&e.select(),setCustomValidity:t=>Pe(e.setCustomValidity)&&e.setCustomValidity(t),reportValidity:()=>Pe(e.reportValidity)&&e.reportValidity()})},[s._fields,n]),b=r.useMemo(()=>({name:n,value:h,...Ce(i)||d.disabled?{disabled:d.disabled||i}:{},onChange:_,onBlur:y,ref:v}),[n,i,d.disabled,_,y,v,h]);return r.useEffect(()=>{const e=s._options.shouldUnregister||o,t=p.current;t&&t!==n&&!u&&s.unregister(t),s.register(n,{...f.current.rules,...Ce(f.current.disabled)?{disabled:f.current.disabled}:{}});const r=(e,t)=>{const n=Re(s._fields,e);n&&n._f&&(n._f.mount=t)};if(r(n,!0),e){const e=Ae(Re(s._options.defaultValues,n,f.current.defaultValue));Me(s._defaultValues,n,e),Te(Re(s._formValues,n))&&Me(s._formValues,n,e)}return!u&&s.register(n),p.current=n,()=>{(u?e&&!s._state.action:e)?s.unregister(n):r(n,!1)}},[n,s,u,o]),r.useEffect(()=>{s._setDisabledField({disabled:i,name:n})},[i,n,s]),r.useMemo(()=>({field:b,formState:d,fieldState:m}),[b,d,m])}const it=e=>e.render(rt(e));var st=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},ot=e=>Array.isArray(e)?e:[e],at=()=>{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 lt(e,t){const n={};for(const r in e)if(e.hasOwnProperty(r)){const i=e[r],s=t[r];if(i&&be(i)&&s){const e=lt(i,s);be(e)&&(n[r]=e)}else e[r]&&(n[r]=s)}return n}var ut=e=>be(e)&&!Object.keys(e).length,ct=e=>"file"===e.type,ht=e=>{if(!Ee)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},dt=e=>"select-multiple"===e.type,ft=e=>"radio"===e.type,pt=e=>ht(e)&&e.isConnected;function gt(e,t){const n=Array.isArray(t)?t:Se(t)?[t]:Oe(t),r=1===n.length?e:function(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=Te(e)?r++:e[t[r++]];return e}(e,n),i=n.length-1,s=n[i];return r&&delete r[s],0!==i&&(be(r)&&ut(r)||Array.isArray(r)&&function(e){for(const t in e)if(e.hasOwnProperty(t)&&!Te(e[t]))return!1;return!0}(r))&>(e,n.slice(0,-1)),e}function mt(e){return Array.isArray(e)||be(e)&&!(e=>{for(const t in e)if(Pe(e[t]))return!0;return!1})(e)}function _t(e,t={}){for(const n in e){const r=e[n];mt(r)?(t[n]=Array.isArray(r)?[]:{},_t(r,t[n])):Te(r)||(t[n]=!0)}return t}function yt(e,t,n){n||(n=_t(t));for(const r in e){const i=e[r];if(mt(i))Te(t)||tt(n[r])?n[r]=_t(i,Array.isArray(i)?[]:{}):yt(i,ye(t)?{}:t[r],n[r]);else{const e=t[r];n[r]=!nt(i,e)}}return n}const vt={value:!1,isValid:!1},bt={value:!0,isValid:!0};var xt=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&&!Te(e[0].attributes.value)?Te(e[0].value)||""===e[0].value?bt:{value:e[0].value,isValid:!0}:bt:vt}return vt},wt=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Te(e)?e:t?""===e?NaN:e?+e:e:n&&Je(e)?new Date(e):r?r(e):e;const Et={isValid:!1,value:null};var At=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,Et):Et;function St(e){const t=e.ref;return ct(t)?t.files:ft(t)?At(e.refs).value:dt(t)?[...t.selectedOptions].map(({value:e})=>e):me(t)?xt(e.refs).value:wt(Te(t.value)?e.ref.value:t.value,e)}var Tt=e=>e instanceof RegExp,kt=e=>Te(e)?e:Tt(e)?e.source:be(e)?Tt(e.value)?e.value.source:e.value:e,Ot=e=>({isOnSubmit:!e||e===Le,isOnBlur:e===Ie,isOnChange:e===ze,isOnAll:e===Ve,isOnTouch:e===je});const Rt="AsyncFunction";var Ct=e=>!!e&&!!e.validate&&!!(Pe(e.validate)&&e.validate.constructor.name===Rt||be(e.validate)&&Object.values(e.validate).find(e=>e.constructor.name===Rt)),Pt=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))));const Mt=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const n=Re(e,i);if(n){const{_f:e,...s}=n;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],i)&&!r)return!0;if(e.ref&&t(e.ref,e.name)&&!r)return!0;if(Mt(s,t))break}else if(be(s)&&Mt(s,t))break}}};function Nt(e,t,n){const r=Re(e,n);if(r||Se(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const r=i.join("."),s=Re(t,r),o=Re(e,r);if(s&&!Array.isArray(s)&&n!==r)return{name:n};if(o&&o.type)return{name:r,error:o};if(o&&o.root&&o.root.type)return{name:`${r}.root`,error:o.root};i.pop()}return{name:n}}var Dt=(e,t,n)=>{const r=ot(Re(e,n));return Me(r,"root",t[n]),Me(e,n,r),e};function Ft(e,t,n="validate"){if(Je(e)||Array.isArray(e)&&e.every(Je)||Ce(e)&&!e)return{type:n,message:Je(e)?e:"",ref:t}}var It=e=>be(e)&&!Tt(e)?e:{value:e,message:""},zt=async(e,t,n,r,i,s)=>{const{ref:o,refs:a,required:l,maxLength:u,minLength:c,min:h,max:d,pattern:f,validate:p,name:g,valueAsNumber:m,mount:_}=e._f,y=Re(n,g);if(!_||t.has(g))return{};const v=a?a[0]:o,b=e=>{i&&v.reportValidity&&(v.setCustomValidity(Ce(e)?"":e||""),v.reportValidity())},x={},w=ft(o),E=me(o),A=w||E,S=(m||ct(o))&&Te(o.value)&&Te(y)||ht(o)&&""===o.value||""===y||Array.isArray(y)&&!y.length,T=st.bind(null,g,r,x),k=(e,t,n,r=Ge,i=$e)=>{const s=e?t:n;x[g]={type:e?r:i,message:s,ref:o,...T(e?r:i,s)}};if(s?!Array.isArray(y)||!y.length:l&&(!A&&(S||ye(y))||Ce(y)&&!y||E&&!xt(a).isValid||w&&!At(a).isValid)){const{value:e,message:t}=Je(l)?{value:!!l,message:l}:It(l);if(e&&(x[g]={type:He,message:t,ref:v,...T(He,t)},!r))return b(t),x}if(!(S||ye(h)&&ye(d))){let e,t;const n=It(d),i=It(h);if(ye(y)||isNaN(y)){const r=o.valueAsDate||new Date(y),s=e=>new Date((new Date).toDateString()+" "+e),a="time"==o.type,l="week"==o.type;Je(n.value)&&y&&(e=a?s(y)>s(n.value):l?y>n.value:r>new Date(n.value)),Je(i.value)&&y&&(t=a?s(y)<s(i.value):l?y<i.value:r<new Date(i.value))}else{const r=o.valueAsNumber||(y?+y:y);ye(n.value)||(e=r>n.value),ye(i.value)||(t=r<i.value)}if((e||t)&&(k(!!e,n.message,i.message,Ue,Be),!r))return b(x[g].message),x}if((u||c)&&!S&&(Je(y)||s&&Array.isArray(y))){const e=It(u),t=It(c),n=!ye(e.value)&&y.length>+e.value,i=!ye(t.value)&&y.length<+t.value;if((n||i)&&(k(n,e.message,t.message),!r))return b(x[g].message),x}if(f&&!S&&Je(y)){const{value:e,message:t}=It(f);if(Tt(e)&&!y.match(e)&&(x[g]={type:qe,message:t,ref:o,...T(qe,t)},!r))return b(t),x}if(p)if(Pe(p)){const e=Ft(await p(y,n),v);if(e&&(x[g]={...e,...T(We,e.message)},!r))return b(e.message),x}else if(be(p)){let e={};for(const t in p){if(!ut(e)&&!r)break;const i=Ft(await p[t](y,n),v,t);i&&(e={...i,...T(t,i.message)},b(i.message),r&&(x[g]=e))}if(!ut(e)&&(x[g]={ref:v,...e},!r))return x}return b(!0),x};const Lt={mode:Le,reValidateMode:ze,shouldFocusError:!0};function jt(e={}){let t,n={...Lt,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:Pe(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:n.errors||{},disabled:n.disabled||!1},i={},s=(be(n.defaultValues)||be(n.values))&&Ae(n.defaultValues||n.values)||{},o=n.shouldUnregister?{}:Ae(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:at(),state:at()},p=n.criteriaMode===Ve,g=async e=>{if(!a.keepIsValid&&!n.disabled&&(h.isValid||d.isValid||e)){let e;n.resolver?(e=ut((await b()).errors),m()):e=await x(i,!0),e!==r.isValid&&f.state.next({isValid:e})}},m=(e,t)=>{!n.disabled&&(h.isValidating||h.validatingFields||d.isValidating||d.validatingFields)&&((e||Array.from(l.mount)).forEach(e=>{e&&(t?Me(r.validatingFields,e,t):gt(r.validatingFields,e))}),f.state.next({validatingFields:r.validatingFields,isValidating:!ut(r.validatingFields)}))},_=(e,t,n,r)=>{const l=Re(i,e);if(l){const i=Re(o,e,Te(n)?Re(s,e):n);Te(i)||r&&r.defaultChecked||t?Me(o,e,t?i:St(l._f)):A(e,i),a.mount&&!a.action&&g()}},y=(e,t,i,o,a)=>{let l=!1,u=!1;const c={name:e};if(!n.disabled){if(!i||o){(h.isDirty||d.isDirty)&&(u=r.isDirty,r.isDirty=c.isDirty=w(),l=u!==c.isDirty);const n=nt(Re(s,e),t);u=!!Re(r.dirtyFields,e),n?gt(r.dirtyFields,e):Me(r.dirtyFields,e,!0),c.dirtyFields=r.dirtyFields,l=l||(h.dirtyFields||d.dirtyFields)&&u!==!n}if(i){const t=Re(r.touchedFields,e);t||(Me(r.touchedFields,e,i),c.touchedFields=r.touchedFields,l=l||(h.touchedFields||d.touchedFields)&&t!==i)}l&&a&&f.state.next(c)}return l?c:{}},v=(e,i,s,o)=>{const a=Re(r.errors,e),l=(h.isValid||d.isValid)&&Ce(i)&&r.isValid!==i;var c;if(n.delayError&&s?(c=()=>((e,t)=>{Me(r.errors,e,t),f.state.next({errors:r.errors})})(e,s),t=e=>{clearTimeout(u),u=setTimeout(c,e)},t(n.delayError)):(clearTimeout(u),t=null,s?Me(r.errors,e,s):gt(r.errors,e)),(s?!nt(a,s):a)||!ut(o)||l){const t={...o,...l&&Ce(i)?{isValid:i}:{},errors:r.errors,name:e};r={...r,...t},f.state.next(t)}},b=async e=>{m(e,!0);const t=await n.resolver(o,n.context,((e,t,n,r)=>{const i={};for(const n of e){const e=Re(t,n);e&&Me(i,n,e._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}})(e||l.mount,i,n.criteriaMode,n.shouldUseNativeValidation));return t},x=async(e,t,i={valid:!0})=>{for(const s in e){const a=e[s];if(a){const{_f:e,...s}=a;if(e){const s=l.array.has(e.name),u=a._f&&Ct(a._f);u&&h.validatingFields&&m([e.name],!0);const c=await zt(a,l.disabled,o,p,n.shouldUseNativeValidation&&!t,s);if(u&&h.validatingFields&&m([e.name]),c[e.name]&&(i.valid=!1,t))break;!t&&(Re(c,e.name)?s?Dt(r.errors,c,e.name):Me(r.errors,e.name,c[e.name]):gt(r.errors,e.name))}!ut(s)&&await x(s,t,i)}}return i.valid},w=(e,t)=>!n.disabled&&(e&&t&&Me(o,e,t),!nt(C(),s)),E=(e,t,n)=>et(e,l,{...a.mount?o:Te(t)?s:Je(e)?{[e]:t}:t},n,t),A=(e,t,n={})=>{const r=Re(i,e);let s=t;if(r){const n=r._f;n&&(!n.disabled&&Me(o,e,wt(t,n)),s=ht(n.ref)&&ye(t)?"":t,dt(n.ref)?[...n.ref.options].forEach(e=>e.selected=s.includes(e.value)):n.refs?me(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):ct(n.ref)?n.ref.value="":(n.ref.value=s,n.ref.type||f.state.next({name:e,values:Ae(o)})))}(n.shouldDirty||n.shouldTouch)&&y(e,s,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&R(e)},S=(e,t,n)=>{for(const r in t){if(!t.hasOwnProperty(r))return;const s=t[r],o=e+"."+r,a=Re(i,o);(l.array.has(e)||be(s)||a&&!a._f)&&!_e(s)?S(o,s,n):A(o,s,n)}},T=(e,t,n={})=>{const u=Re(i,e),c=l.array.has(e),p=Ae(t);Me(o,e,p),c?(f.array.next({name:e,values:Ae(o)}),(h.isDirty||h.dirtyFields||d.isDirty||d.dirtyFields)&&n.shouldDirty&&f.state.next({name:e,dirtyFields:yt(s,o),isDirty:w(e,p)})):!u||u._f||ye(p)?A(e,p,n):S(e,p,n),Pt(e,l)&&f.state.next({...r,name:e}),f.state.next({name:a.mount?e:void 0,values:Ae(o)})},k=async e=>{a.mount=!0;const s=e.target;let u=s.name,c=!0;const _=Re(i,u),w=e=>{c=Number.isNaN(e)||_e(e)&&isNaN(e.getTime())||nt(e,Re(o,u,e))},E=Ot(n.mode),A=Ot(n.reValidateMode);if(_){let a,T;const k=s.type?St(_._f):xe(e),O=e.type===Ne||e.type===De,C=!((S=_._f).mount&&(S.required||S.min||S.max||S.maxLength||S.minLength||S.pattern||S.validate)||n.resolver||Re(r.errors,u)||_._f.deps)||((e,t,n,r,i)=>!i.isOnAll&&(!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:!(n?r.isOnChange:i.isOnChange)||e))(O,Re(r.touchedFields,u),r.isSubmitted,A,E),P=Pt(u,l,O);Me(o,u,k),O?s&&s.readOnly||(_._f.onBlur&&_._f.onBlur(e),t&&t(0)):_._f.onChange&&_._f.onChange(e);const M=y(u,k,O),N=!ut(M)||P;if(!O&&f.state.next({name:u,type:e.type,values:Ae(o)}),C)return(h.isValid||d.isValid)&&("onBlur"===n.mode?O&&g():O||g()),N&&f.state.next({name:u,...P?{}:M});if(!O&&P&&f.state.next({...r}),n.resolver){const{errors:e}=await b([u]);if(m([u]),w(k),c){const t=Nt(r.errors,i,u),n=Nt(e,i,t.name||u);a=n.error,u=n.name,T=ut(e)}}else m([u],!0),a=(await zt(_,l.disabled,o,p,n.shouldUseNativeValidation))[u],m([u]),w(k),c&&(a?T=!1:(h.isValid||d.isValid)&&(T=await x(i,!0)));c&&(_._f.deps&&(!Array.isArray(_._f.deps)||_._f.deps.length>0)&&R(_._f.deps),v(u,T,a,M))}var S},O=(e,t)=>{if(Re(r.errors,t)&&e.focus)return e.focus(),1},R=async(e,t={})=>{let s,o;const a=ot(e);if(n.resolver){const t=await(async e=>{const{errors:t}=await b(e);if(m(e),e)for(const n of e){const e=Re(t,n);e?Me(r.errors,n,e):gt(r.errors,n)}else r.errors=t;return t})(Te(e)?e:a);s=ut(t),o=e?!a.some(e=>Re(t,e)):s}else e?(o=(await Promise.all(a.map(async e=>{const t=Re(i,e);return await x(t&&t._f?{[e]:t}:t)}))).every(Boolean),(o||r.isValid)&&g()):o=s=await x(i);return f.state.next({...!Je(e)||(h.isValid||d.isValid)&&s!==r.isValid?{}:{name:e},...n.resolver||!e?{isValid:s}:{},errors:r.errors}),t.shouldFocus&&!o&&Mt(i,O,e?a:l.mount),o},C=(e,t)=>{let n={...a.mount?o:s};return t&&(n=lt(t.dirtyFields?r.dirtyFields:r.touchedFields,n)),Te(e)?n:Je(e)?Re(n,e):e.map(e=>Re(n,e))},P=(e,t)=>({invalid:!!Re((t||r).errors,e),isDirty:!!Re((t||r).dirtyFields,e),error:Re((t||r).errors,e),isValidating:!!Re(r.validatingFields,e),isTouched:!!Re((t||r).touchedFields,e)}),M=(e,t,n)=>{const s=(Re(i,e,{_f:{}})._f||{}).ref,o=Re(r.errors,e)||{},{ref:a,message:l,type:u,...c}=o;Me(r.errors,e,{...c,...t,ref:s}),f.state.next({name:e,errors:r.errors,isValid:!1}),n&&n.shouldFocus&&s&&s.focus&&s.focus()},N=e=>f.state.subscribe({next:t=>{var n,i,a;n=e.name,i=t.name,a=e.exact,n&&i&&n!==i&&!ot(n).some(e=>e&&(a?e===i:e.startsWith(i)||i.startsWith(e)))||!((e,t,n,r)=>{n(e);const{name:i,...s}=e;return ut(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(e=>t[e]===(!r||Ve))})(t,e.formState||h,U,e.reRenderRoot)||e.callback({values:{...o},...r,...t,defaultValues:s})}}).unsubscribe,D=(e,t={})=>{for(const a of e?ot(e):l.mount)l.mount.delete(a),l.array.delete(a),t.keepValue||(gt(i,a),gt(o,a)),!t.keepError&>(r.errors,a),!t.keepDirty&>(r.dirtyFields,a),!t.keepTouched&>(r.touchedFields,a),!t.keepIsValidating&>(r.validatingFields,a),!n.shouldUnregister&&!t.keepDefaultValue&>(s,a);f.state.next({values:Ae(o)}),f.state.next({...r,...t.keepDirty?{isDirty:w()}:{}}),!t.keepIsValid&&g()},F=({disabled:e,name:t})=>{(Ce(e)&&a.mount||e||l.disabled.has(t))&&(e?l.disabled.add(t):l.disabled.delete(t))},I=(e,t={})=>{let r=Re(i,e);const o=Ce(t.disabled)||Ce(n.disabled);return Me(i,e,{...r||{},_f:{...r&&r._f?r._f:{ref:{name:e}},name:e,mount:!0,...t}}),l.mount.add(e),r?F({disabled:Ce(t.disabled)?t.disabled:n.disabled,name:e}):_(e,!0,t.value),{...o?{disabled:t.disabled||n.disabled}:{},...n.progressive?{required:!!t.required,min:kt(t.min),max:kt(t.max),minLength:kt(t.minLength),maxLength:kt(t.maxLength),pattern:kt(t.pattern)}:{},name:e,onChange:k,onBlur:k,ref:o=>{if(o){I(e,t),r=Re(i,e);const n=Te(o.value)&&o.querySelectorAll&&o.querySelectorAll("input,select,textarea")[0]||o,a=(e=>ft(e)||me(e))(n),l=r._f.refs||[];if(a?l.find(e=>e===n):n===r._f.ref)return;Me(i,e,{_f:{...r._f,...a?{refs:[...l.filter(pt),n,...Array.isArray(Re(s,e))?[{}]:[]],ref:{type:n.type,name:e}}:{ref:n}}}),_(e,!1,void 0,n)}else r=Re(i,e,{}),r._f&&(r._f.mount=!1),(n.shouldUnregister||t.shouldUnregister)&&(!we(l.array,e)||!a.action)&&l.unMount.add(e)}}},z=()=>n.shouldFocusError&&Mt(i,O,l.mount),L=(e,t)=>async s=>{let a;s&&(s.preventDefault&&s.preventDefault(),s.persist&&s.persist());let u=Ae(o);if(f.state.next({isSubmitting:!0}),n.resolver){const{errors:e,values:t}=await b();m(),r.errors=e,u=Ae(t)}else await x(i);if(l.disabled.size)for(const e of l.disabled)gt(u,e);if(gt(r.errors,"root"),ut(r.errors)){f.state.next({errors:{}});try{await e(u,s)}catch(e){a=e}}else t&&await t({...r.errors},s),z(),setTimeout(z);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ut(r.errors)&&!a,submitCount:r.submitCount+1,errors:r.errors}),a)throw a},j=(e,t={})=>{const u=e?Ae(e):s,c=Ae(u),d=ut(e),p=d?s:c;if(t.keepDefaultValues||(s=u),!t.keepValues){if(t.keepDirtyValues){const e=new Set([...l.mount,...Object.keys(yt(s,o))]);for(const t of Array.from(e))Re(r.dirtyFields,t)?Me(p,t,Re(o,t)):T(t,Re(p,t))}else{if(Ee&&Te(e))for(const e of l.mount){const t=Re(i,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(ht(e)){const t=e.closest("form");if(t){t.reset();break}}}}if(t.keepFieldsRef)for(const e of l.mount)T(e,Re(p,e));else i={}}o=n.shouldUnregister?t.keepDefaultValues?Ae(s):{}:Ae(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&&!ut(p),a.watch=!!n.shouldUnregister,a.keepIsValid=!!t.keepIsValid,a.action=!1,t.keepErrors||(r.errors={}),f.state.next({submitCount:t.keepSubmitCount?r.submitCount:0,isDirty:!d&&(t.keepDirty?r.isDirty:!(!t.keepDefaultValues||nt(e,s))),isSubmitted:!!t.keepIsSubmitted&&r.isSubmitted,dirtyFields:d?{}:t.keepDirtyValues?t.keepDefaultValues&&o?yt(s,o):r.dirtyFields:t.keepDefaultValues&&e?yt(s,e):t.keepDirty?r.dirtyFields:{},touchedFields:t.keepTouched?r.touchedFields:{},errors:t.keepErrors?r.errors:{},isSubmitSuccessful:!!t.keepIsSubmitSuccessful&&r.isSubmitSuccessful,isSubmitting:!1,defaultValues:s})},V=(e,t)=>j(Pe(e)?e(o):e,{...n.resetOptions,...t}),U=e=>{r={...r,...e}},B={control:{register:I,unregister:D,getFieldState:P,handleSubmit:L,setError:M,_subscribe:N,_runSchema:b,_updateIsValidating:m,_focusError:z,_getWatch:E,_getDirty:w,_setValid:g,_setFieldArray:(e,t=[],l,u,c=!0,p=!0)=>{if(u&&l&&!n.disabled){if(a.action=!0,p&&Array.isArray(Re(i,e))){const t=l(Re(i,e),u.argA,u.argB);c&&Me(i,e,t)}if(p&&Array.isArray(Re(r.errors,e))){const t=l(Re(r.errors,e),u.argA,u.argB);c&&Me(r.errors,e,t),((e,t)=>{!ke(Re(e,t)).length&>(e,t)})(r.errors,e)}if((h.touchedFields||d.touchedFields)&&p&&Array.isArray(Re(r.touchedFields,e))){const t=l(Re(r.touchedFields,e),u.argA,u.argB);c&&Me(r.touchedFields,e,t)}(h.dirtyFields||d.dirtyFields)&&(r.dirtyFields=yt(s,o)),f.state.next({name:e,isDirty:w(e,t),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Me(o,e,t)},_setDisabledField:F,_setErrors:e=>{r.errors=e,f.state.next({errors:r.errors,isValid:!1})},_getFieldArray:e=>ke(Re(a.mount?o:s,e,n.shouldUnregister?Re(s,e,[]):[])),_reset:j,_resetDefaultValues:()=>Pe(n.defaultValues)&&n.defaultValues().then(e=>{V(e,n.resetOptions),f.state.next({isLoading:!1})}),_removeUnmounted:()=>{for(const e of l.unMount){const t=Re(i,e);t&&(t._f.refs?t._f.refs.every(e=>!pt(e)):!pt(t._f.ref))&&D(e)}l.unMount=new Set},_disableForm:e=>{Ce(e)&&(f.state.next({disabled:e}),Mt(i,(t,n)=>{const r=Re(i,n);r&&(t.disabled=r._f.disabled||e,Array.isArray(r._f.refs)&&r._f.refs.forEach(t=>{t.disabled=r._f.disabled||e}))},0,!1))},_subjects:f,_proxyFormState:h,get _fields(){return i},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 r},get _options(){return n},set _options(e){n={...n,...e}}},subscribe:e=>(a.mount=!0,d={...d,...e.formState},N({...e,formState:{...c,...e.formState}})),trigger:R,register:I,handleSubmit:L,watch:(e,t)=>Pe(e)?f.state.subscribe({next:n=>"values"in n&&e(E(void 0,t),n)}):E(e,t,!0),setValue:T,getValues:C,reset:V,resetField:(e,t={})=>{Re(i,e)&&(Te(t.defaultValue)?T(e,Ae(Re(s,e))):(T(e,t.defaultValue),Me(s,e,Ae(t.defaultValue))),t.keepTouched||gt(r.touchedFields,e),t.keepDirty||(gt(r.dirtyFields,e),r.isDirty=t.defaultValue?w(e,Ae(Re(s,e))):w()),t.keepError||(gt(r.errors,e),h.isValid&&g()),f.state.next({...r}))},clearErrors:e=>{e&&ot(e).forEach(e=>gt(r.errors,e)),f.state.next({errors:e?r.errors:{}})},unregister:D,setError:M,setFocus:(e,t={})=>{const n=Re(i,e),r=n&&n._f;if(r){const e=r.refs?r.refs[0]:r.ref;e.focus&&setTimeout(()=>{e.focus(),t.shouldSelect&&Pe(e.select)&&e.select()})}},getFieldState:P};return{...B,formControl:B}}var Vt=()=>{if("undefined"!=typeof crypto&&crypto.randomUUID)return crypto.randomUUID();const e="undefined"==typeof performance?Date.now():1e3*performance.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=(16*Math.random()+e)%16|0;return("x"==t?n:3&n|8).toString(16)})},Ut=(e,t,n={})=>n.shouldFocus||Te(n.shouldFocus)?n.focusName||`${e}.${Te(n.focusIndex)?t:n.focusIndex}.`:"",Bt=(e,t)=>[...e,...ot(t)],Gt=e=>Array.isArray(e)?e.map(()=>{}):void 0;function $t(e,t,n){return[...e.slice(0,t),...ot(n),...e.slice(t)]}var qt=(e,t,n)=>Array.isArray(e)?(Te(e[n])&&(e[n]=void 0),e.splice(n,0,e.splice(t,1)[0]),e):[],Ht=(e,t)=>[...ot(t),...ot(e)];var Wt=(e,t)=>Te(t)?[]:function(e,t){let n=0;const r=[...e];for(const e of t)r.splice(e-n,1),n++;return ke(r).length?r:[]}(e,ot(t).sort((e,t)=>e-t)),Zt=(e,t,n)=>{[e[t],e[n]]=[e[n],e[t]]},Kt=(e,t,n)=>(e[t]=n,e);function Xt(e){const t=Ke(),{control:n=t.control,name:i,keyName:s="id",shouldUnregister:o,rules:a}=e,[l,u]=r.useState(n._getFieldArray(i)),c=r.useRef(n._getFieldArray(i).map(Vt)),h=r.useRef(!1);n._names.array.add(i),r.useMemo(()=>a&&l.length>=0&&n.register(i,a),[n,i,l.length,a]),Qe(()=>n._subjects.array.subscribe({next:({values:e,name:t})=>{if(t===i||!t){const t=Re(e,i);Array.isArray(t)&&(u(t),c.current=t.map(Vt))}}}).unsubscribe,[n,i]);const d=r.useCallback(e=>{h.current=!0,n._setFieldArray(i,e)},[n,i]);return r.useEffect(()=>{if(n._state.action=!1,Pt(i,n._names)&&n._subjects.state.next({...n._formState}),h.current&&(!Ot(n._options.mode).isOnSubmit||n._formState.isSubmitted)&&!Ot(n._options.reValidateMode).isOnSubmit)if(n._options.resolver)n._runSchema([i]).then(e=>{n._updateIsValidating([i]);const t=Re(e.errors,i),r=Re(n._formState.errors,i);(r?!t&&r.type||t&&(r.type!==t.type||r.message!==t.message):t&&t.type)&&(t?Me(n._formState.errors,i,t):gt(n._formState.errors,i),n._subjects.state.next({errors:n._formState.errors}))});else{const e=Re(n._fields,i);!e||!e._f||Ot(n._options.reValidateMode).isOnSubmit&&Ot(n._options.mode).isOnSubmit||zt(e,n._names.disabled,n._formValues,n._options.criteriaMode===Ve,n._options.shouldUseNativeValidation,!0).then(e=>!ut(e)&&n._subjects.state.next({errors:Dt(n._formState.errors,e,i)}))}n._subjects.state.next({name:i,values:Ae(n._formValues)}),n._names.focus&&Mt(n._fields,(e,t)=>{if(n._names.focus&&t.startsWith(n._names.focus)&&e.focus)return e.focus(),1}),n._names.focus="",n._setValid(),h.current=!1},[l,i,n]),r.useEffect(()=>(!Re(n._formValues,i)&&n._setFieldArray(i),()=>{n._options.shouldUnregister||o?n.unregister(i):((e,t)=>{const r=Re(n._fields,e);r&&r._f&&(r._f.mount=t)})(i,!1)}),[i,n,s,o]),{swap:r.useCallback((e,t)=>{const r=n._getFieldArray(i);Zt(r,e,t),Zt(c.current,e,t),d(r),u(r),n._setFieldArray(i,r,Zt,{argA:e,argB:t},!1)},[d,i,n]),move:r.useCallback((e,t)=>{const r=n._getFieldArray(i);qt(r,e,t),qt(c.current,e,t),d(r),u(r),n._setFieldArray(i,r,qt,{argA:e,argB:t},!1)},[d,i,n]),prepend:r.useCallback((e,t)=>{const r=ot(Ae(e)),s=Ht(n._getFieldArray(i),r);n._names.focus=Ut(i,0,t),c.current=Ht(c.current,r.map(Vt)),d(s),u(s),n._setFieldArray(i,s,Ht,{argA:Gt(e)})},[d,i,n]),append:r.useCallback((e,t)=>{const r=ot(Ae(e)),s=Bt(n._getFieldArray(i),r);n._names.focus=Ut(i,s.length-1,t),c.current=Bt(c.current,r.map(Vt)),d(s),u(s),n._setFieldArray(i,s,Bt,{argA:Gt(e)})},[d,i,n]),remove:r.useCallback(e=>{const t=Wt(n._getFieldArray(i),e);c.current=Wt(c.current,e),d(t),u(t),!Array.isArray(Re(n._fields,i))&&Me(n._fields,i,void 0),n._setFieldArray(i,t,Wt,{argA:e})},[d,i,n]),insert:r.useCallback((e,t,r)=>{const s=ot(Ae(t)),o=$t(n._getFieldArray(i),e,s);n._names.focus=Ut(i,e,r),c.current=$t(c.current,e,s.map(Vt)),d(o),u(o),n._setFieldArray(i,o,$t,{argA:e,argB:Gt(t)})},[d,i,n]),update:r.useCallback((e,t)=>{const r=Ae(t),s=Kt(n._getFieldArray(i),e,r);c.current=[...s].map((t,n)=>t&&n!==e?c.current[n]:Vt()),d(s),u([...s]),n._setFieldArray(i,s,Kt,{argA:e,argB:r},!0,!1)},[d,i,n]),replace:r.useCallback(e=>{const t=ot(Ae(e));c.current=t.map(Vt),d([...t]),u([...t]),n._setFieldArray(i,[...t],e=>e,{},!0,!1)},[d,i,n]),fields:r.useMemo(()=>l.map((e,t)=>({...e,[s]:c.current[t]||Vt()})),[l,s])}}function Yt(e={}){const t=r.useRef(void 0),n=r.useRef(void 0),[i,s]=r.useState({isDirty:!1,isValidating:!1,isLoading:Pe(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Pe(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:i},e.defaultValues&&!Pe(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:n,...r}=jt(e);t.current={...r,formState:i}}const o=t.current.control;return o._options=e,Qe(()=>{const e=o._subscribe({formState:o._proxyFormState,callback:()=>s({...o._formState}),reRenderRoot:!0});return s(e=>({...e,isReady:!0})),o._formState.isReady=!0,e},[o]),r.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),r.useEffect(()=>{e.mode&&(o._options.mode=e.mode),e.reValidateMode&&(o._options.reValidateMode=e.reValidateMode)},[o,e.mode,e.reValidateMode]),r.useEffect(()=>{e.errors&&(o._setErrors(e.errors),o._focusError())},[o,e.errors]),r.useEffect(()=>{e.shouldUnregister&&o._subjects.state.next({values:o._getWatch()})},[o,e.shouldUnregister]),r.useEffect(()=>{if(o._proxyFormState.isDirty){const e=o._getDirty();e!==i.isDirty&&o._subjects.state.next({isDirty:e})}},[o,i.isDirty]),r.useEffect(()=>{var t;e.values&&!nt(e.values,n.current)?(o._reset(e.values,{keepFieldsRef:!0,...o._options.resetOptions}),(null===(t=o._options.resetOptions)||void 0===t?void 0:t.keepIsValid)||o._setValid(),n.current=e.values,s(e=>({...e}))):o._resetDefaultValues()},[o,e.values]),r.useEffect(()=>{o._state.mount||(o._setValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),t.current.formState=Ye(i,o),t.current}const Qt=({sx:t,...n})=>e(X,{variant:"body1",sx:{color:"var(--color-white)",cursor:"default",...t},...n}),Jt=W(q)({padding:0,marginRight:"5px",marginLeft:"10px","& .MuiSvgIcon-root":{color:"var(--color-orange-medium)"}});function en({label:t,name:r,...i}){const s=n.useId(),{control:o,setValue:a,watch:l}=Ke(),u=l(r),c=`${s}-${r}-${String(u)}`;return e(it,{control:o,name:r,render:({field:n})=>{const{value:r,name:s}=n;return t?e(H,{color:"white",control:e(Jt,{...i,checked:r,onChange:(e,t)=>{a(s,t,{shouldValidate:!0})}}),label:e(Qt,{children:t})}):e(Jt,{...i,checked:r,onChange:(e,t)=>{a(s,t,{shouldValidate:!0})}})}},c)}function tn({form:t,sx:n={},onSubmit:r,children:i}){const{handleSubmit:s}=t;return e(Xe,{...t,children:e(x,{component:"form",sx:{display:"grid",gap:"15px",...n},onSubmit:s(r),children:i})})}const nn=()=>Ke(),rn=t=>e(N,{size:"small",...t});function sn({name:t,items:r,label:i,sx:s,getLabel:o,getValue:a,getKey:l}){const{watch:u,resetField:c,setValue:h}=Ke(),d=u(t),f=n.useId(),p=r.find(e=>a(e)===d)??null;return e(D,{value:p,options:r,id:f,getOptionLabel:e=>o(e),getOptionKey:e=>l(e),sx:{minWidth:150,...s},size:"small",onChange:(e,n)=>{n?h(t,a(n)):c(t)},renderInput:t=>e(rn,{...t,label:i})})}function on(t){const{name:r,type:i}=t,s=n.useId(),{control:o}=Ke();return e(it,{name:r,control:o,render:({field:n})=>e(rn,{id:s,size:"small",...t,...n,onChange:e=>{const{target:t}=e,{value:r}=t;if("number"===i)""===r?n.onChange():n.onChange(Number(r));else n.onChange(e)}})})}const an="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function ln(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function un(e){return"nodeType"in e}function cn(e){var t,n;return e?ln(e)?e:un(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function hn(e){const{Document:t}=cn(e);return e instanceof t}function dn(e){return!ln(e)&&e instanceof cn(e).HTMLElement}function fn(e){return e instanceof cn(e).SVGElement}function pn(e){return e?ln(e)?e.document:un(e)?hn(e)?e:dn(e)||fn(e)?e.ownerDocument:document:document:document}const gn=an?i:s;function mn(e){const t=o(e);return gn(()=>{t.current=e}),l(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}function _n(e,t){void 0===t&&(t=[e]);const n=o(e);return gn(()=>{n.current!==e&&(n.current=e)},t),n}function yn(e,t){const n=o();return a(()=>{const t=e(n.current);return n.current=t,t},[...t])}function vn(e){const t=mn(e),n=o(null),r=l(e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e},[]);return[n,r]}function bn(e){const t=o();return s(()=>{t.current=e},[e]),t.current}let xn={};function wn(e,t){return a(()=>{if(t)return t;const n=null==xn[e]?0:xn[e]+1;return xn[e]=n,e+"-"+n},[e,t])}function En(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce((t,n)=>{const r=Object.entries(n);for(const[n,i]of r){const r=t[n];null!=r&&(t[n]=r+e*i)}return t},{...t})}}const An=En(1),Sn=En(-1);function Tn(e){if(!e)return!1;const{KeyboardEvent:t}=cn(e.target);return t&&e instanceof t}function kn(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=cn(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 On=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[On.Translate.toString(e),On.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Rn="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Cn(e){return e.matches(Rn)?e:e.querySelector(Rn)}const Pn={display:"none"};function Mn(e){let{id:t,value:n}=e;return r.createElement("div",{id:t,style:Pn},n)}function Nn(e){let{id:t,announcement:n,ariaLiveType:i="assertive"}=e;return r.createElement("div",{id:t,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":i,"aria-atomic":!0},n)}const Dn=c(null);const Fn={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 "},In={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 zn(e){let{announcements:t=In,container:n,hiddenTextDescribedById:i,screenReaderInstructions:o=Fn}=e;const{announce:c,announcement:h}=function(){const[e,t]=u("");return{announce:l(e=>{null!=e&&t(e)},[]),announcement:e}}(),d=wn("DndLiveRegion"),[p,g]=u(!1);if(s(()=>{g(!0)},[]),function(e){const t=f(Dn);s(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}(a(()=>({onDragStart(e){let{active:n}=e;c(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&c(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;c(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;c(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;c(t.onDragCancel({active:n,over:r}))}}),[c,t])),!p)return null;const m=r.createElement(r.Fragment,null,r.createElement(Mn,{id:i,value:o.draggable}),r.createElement(Nn,{id:d,announcement:h}));return n?Q(m,n):m}var Ln;function jn(){}!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"}(Ln||(Ln={}));const Vn=Object.freeze({x:0,y:0});function Un(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Bn(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function Gn(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function $n(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 qn=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=$n(t,t.left,t.top),s=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=Un($n(r),i);s.push({id:t,data:{droppableContainer:e,value:n}})}}return s.sort(Bn)};function Hn(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),s=Math.min(t.top+t.height,e.top+e.height),o=i-r,a=s-n;if(r<i&&n<s){const n=t.width*t.height,r=e.width*e.height,i=o*a;return Number((i/(n+r-i)).toFixed(4))}return 0}const Wn=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=[];for(const e of r){const{id:r}=e,s=n.get(r);if(s){const n=Hn(s,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(Gn)};function Zn(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Vn}function Kn(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.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 Xn=Kn(1);const Yn={ignoreTransform:!1};function Qn(e,t){void 0===t&&(t=Yn);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:r}=cn(e).getComputedStyle(e);t&&(n=function(e,t,n){const r=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(!r)return e;const{scaleX:i,scaleY:s,x:o,y:a}=r,l=e.left-o-(1-i)*parseFloat(n),u=e.top-a-(1-s)*parseFloat(n.slice(n.indexOf(" ")+1)),c=i?e.width/i: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,r))}const{top:r,left:i,width:s,height:o,bottom:a,right:l}=n;return{top:r,left:i,width:s,height:o,bottom:a,right:l}}function Jn(e){return Qn(e,{ignoreTransform:!0})}function er(e,t){const n=[];return e?function r(i){if(null!=t&&n.length>=t)return n;if(!i)return n;if(hn(i)&&null!=i.scrollingElement&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!dn(i)||fn(i))return n;if(n.includes(i))return n;const s=cn(e).getComputedStyle(i);return i!==e&&function(e,t){void 0===t&&(t=cn(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const r=t[e];return"string"==typeof r&&n.test(r)})}(i,s)&&n.push(i),function(e,t){return void 0===t&&(t=cn(e).getComputedStyle(e)),"fixed"===t.position}(i,s)?n:r(i.parentNode)}(e):n}function tr(e){const[t]=er(e,1);return null!=t?t:null}function nr(e){return an&&e?ln(e)?e:un(e)?hn(e)||e===pn(e).scrollingElement?window:dn(e)?e:null:null:null}function rr(e){return ln(e)?e.scrollX:e.scrollLeft}function ir(e){return ln(e)?e.scrollY:e.scrollTop}function sr(e){return{x:rr(e),y:ir(e)}}var or;function ar(e){return!(!an||!e)&&e===document.scrollingElement}function lr(e){const t={x:0,y:0},n=ar(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(or||(or={}));const ur={x:.2,y:.2};function cr(e,t,n,r,i){let{top:s,left:o,right:a,bottom:l}=n;void 0===r&&(r=10),void 0===i&&(i=ur);const{isTop:u,isBottom:c,isLeft:h,isRight:d}=lr(e),f={x:0,y:0},p={x:0,y:0},g=t.height*i.y,m=t.width*i.x;return!u&&s<=t.top+g?(f.y=or.Backward,p.y=r*Math.abs((t.top+g-s)/g)):!c&&l>=t.bottom-g&&(f.y=or.Forward,p.y=r*Math.abs((t.bottom-g-l)/g)),!d&&a>=t.right-m?(f.x=or.Forward,p.x=r*Math.abs((t.right-m-a)/m)):!h&&o<=t.left+m&&(f.x=or.Backward,p.x=r*Math.abs((t.left+m-o)/m)),{direction:f,speed:p}}function hr(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:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function dr(e){return e.reduce((e,t)=>An(e,sr(t)),Vn)}const fr=[["x",["left","right"],function(e){return e.reduce((e,t)=>e+rr(t),0)}],["y",["top","bottom"],function(e){return e.reduce((e,t)=>e+ir(t),0)}]];class pr{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=er(t),r=dr(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,i]of fr)for(const s of t)Object.defineProperty(this,s,{get:()=>{const t=i(n),o=r[e]-t;return this.rect[s]+o},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class gr{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 r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function mr(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t&&r>t.y}var _r,yr;function vr(e){e.preventDefault()}function br(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"}(_r||(_r={})),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"}(yr||(yr={}));const xr={start:[yr.Space,yr.Enter],cancel:[yr.Esc],end:[yr.Space,yr.Enter,yr.Tab]},wr=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case yr.Right:return{...n,x:n.x+25};case yr.Left:return{...n,x:n.x-25};case yr.Down:return{...n,y:n.y+25};case yr.Up:return{...n,y:n.y-25}}};class Er{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 gr(pn(t)),this.windowListeners=new gr(cn(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(_r.Resize,this.handleCancel),this.windowListeners.add(_r.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(_r.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&function(e,t){if(void 0===t&&(t=Qn),!e)return;const{top:n,left:r,bottom:i,right:s}=t(e);tr(e)&&(i<=0||s<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(n),t(Vn)}handleKeyDown(e){if(Tn(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:i=xr,coordinateGetter:s=wr,scrollBehavior:o="smooth"}=r,{code:a}=e;if(i.end.includes(a))return void this.handleEnd(e);if(i.cancel.includes(a))return void this.handleCancel(e);const{collisionRect:l}=n.current,u=l?{x:l.left,y:l.top}:Vn;this.referenceCoordinates||(this.referenceCoordinates=u);const c=s(e,{active:t,context:n.current,currentCoordinates:u});if(c){const t=Sn(c,u),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(const n of i){const i=e.code,{isTop:s,isRight:a,isLeft:l,isBottom:u,maxScroll:h,minScroll:d}=lr(n),f=hr(n),p={x:Math.min(i===yr.Right?f.right-f.width/2:f.right,Math.max(i===yr.Right?f.left:f.left+f.width/2,c.x)),y:Math.min(i===yr.Down?f.bottom-f.height/2:f.bottom,Math.max(i===yr.Down?f.top:f.top+f.height/2,c.y))},g=i===yr.Right&&!a||i===yr.Left&&!l,m=i===yr.Down&&!u||i===yr.Up&&!s;if(g&&p.x!==c.x){const e=n.scrollLeft+t.x,s=i===yr.Right&&e<=h.x||i===yr.Left&&e>=d.x;if(s&&!t.y)return void n.scrollTo({left:e,behavior:o});r.x=s?n.scrollLeft-e:i===yr.Right?n.scrollLeft-h.x:n.scrollLeft-d.x,r.x&&n.scrollBy({left:-r.x,behavior:o});break}if(m&&p.y!==c.y){const e=n.scrollTop+t.y,s=i===yr.Down&&e<=h.y||i===yr.Up&&e>=d.y;if(s&&!t.x)return void n.scrollTo({top:e,behavior:o});r.y=s?n.scrollTop-e:i===yr.Down?n.scrollTop-h.y:n.scrollTop-d.y,r.y&&n.scrollBy({top:-r.y,behavior:o});break}}this.handleMove(e,An(Sn(c,this.referenceCoordinates),r))}}}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 Ar(e){return Boolean(e&&"distance"in e)}function Sr(e){return Boolean(e&&"delay"in e)}Er.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=xr,onActivation:i}=t,{active:s}=n;const{code:o}=e.nativeEvent;if(r.start.includes(o)){const t=s.activatorNode.current;return(!t||e.target===t)&&(e.preventDefault(),null==i||i({event:e.nativeEvent}),!0)}return!1}}];class Tr{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=cn(e);return e instanceof t?e:pn(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:i}=e,{target:s}=i;this.props=e,this.events=t,this.document=pn(s),this.documentListeners=new gr(this.document),this.listeners=new gr(n),this.windowListeners=new gr(cn(s)),this.initialCoordinates=null!=(r=kn(i))?r:Vn,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(_r.Resize,this.handleCancel),this.windowListeners.add(_r.DragStart,vr),this.windowListeners.add(_r.VisibilityChange,this.handleCancel),this.windowListeners.add(_r.ContextMenu,vr),this.documentListeners.add(_r.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Sr(t))return this.timeoutId=setTimeout(this.handleStart,t.delay),void this.handlePending(t);if(Ar(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:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(_r.Click,br,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(_r.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:i}=this,{onMove:s,options:{activationConstraint:o}}=i;if(!r)return;const a=null!=(t=kn(e))?t:Vn,l=Sn(r,a);if(!n&&o){if(Ar(o)){if(null!=o.tolerance&&mr(l,o.tolerance))return this.handleCancel();if(mr(l,o.distance))return this.handleStart()}return Sr(o)&&mr(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===yr.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const kr={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Or extends Tr{constructor(e){const{event:t}=e,n=pn(t.target);super(e,kr,n)}}Or.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!(!n.isPrimary||0!==n.button)&&(null==r||r({event:n}),!0)}}];const Rr={move:{name:"mousemove"},end:{name:"mouseup"}};var Cr;!function(e){e[e.RightClick=2]="RightClick"}(Cr||(Cr={}));(class extends Tr{constructor(e){super(e,Rr,pn(e.event.target))}}).activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==Cr.RightClick&&(null==r||r({event:n}),!0)}}];const Pr={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};var Mr,Nr;function Dr(e){let{acceleration:t,activator:n=Mr.Pointer,canScroll:r,draggingRect:i,enabled:u,interval:c=5,order:h=Nr.TreeOrder,pointerCoordinates:d,scrollableAncestors:f,scrollableAncestorRects:p,delta:g,threshold:m}=e;const _=function(e){let{delta:t,disabled:n}=e;const r=bn(t);return yn(e=>{if(n||!r||!e)return Fr;const i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[or.Backward]:e.x[or.Backward]||-1===i.x,[or.Forward]:e.x[or.Forward]||1===i.x},y:{[or.Backward]:e.y[or.Backward]||-1===i.y,[or.Forward]:e.y[or.Forward]||1===i.y}}},[n,t,r])}({delta:g,disabled:!u}),[y,v]=function(){const e=o(null);return[l((t,n)=>{e.current=setInterval(t,n)},[]),l(()=>{null!==e.current&&(clearInterval(e.current),e.current=null)},[])]}(),b=o({x:0,y:0}),x=o({x:0,y:0}),w=a(()=>{switch(n){case Mr.Pointer:return d?{top:d.y,bottom:d.y,left:d.x,right:d.x}:null;case Mr.DraggableRect:return i}},[n,i,d]),E=o(null),A=l(()=>{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)},[]),S=a(()=>h===Nr.TreeOrder?[...f].reverse():f,[h,f]);s(()=>{if(u&&f.length&&w){for(const e of S){if(!1===(null==r?void 0:r(e)))continue;const n=f.indexOf(e),i=p[n];if(!i)continue;const{direction:s,speed:o}=cr(e,i,w,t,m);for(const e of["x","y"])_[e][s[e]]||(o[e]=0,s[e]=0);if(o.x>0||o.y>0)return v(),E.current=e,y(A,c),b.current=o,void(x.current=s)}b.current={x:0,y:0},x.current={x:0,y:0},v()}else v()},[t,A,r,v,u,c,JSON.stringify(w),JSON.stringify(_),y,f,S,p,JSON.stringify(m)])}(class extends Tr{constructor(e){super(e,Pr)}static setup(){return window.addEventListener(Pr.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Pr.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:i}=n;return!(i.length>1)&&(null==r||r({event:n}),!0)}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(Mr||(Mr={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(Nr||(Nr={}));const Fr={x:{[or.Backward]:!1,[or.Forward]:!1},y:{[or.Backward]:!1,[or.Forward]:!1}};var Ir,zr;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(Ir||(Ir={})),function(e){e.Optimized="optimized"}(zr||(zr={}));const Lr=new Map;function jr(e,t){return yn(n=>e?n||("function"==typeof t?t(e):e):null,[t,e])}function Vr(e){let{callback:t,disabled:n}=e;const r=mn(t),i=a(()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(r)},[n]);return s(()=>()=>null==i?void 0:i.disconnect(),[i]),i}function Ur(e){return new pr(Qn(e),e)}function Br(e,t,n){void 0===t&&(t=Ur);const[r,i]=u(null);function o(){i(r=>{if(!e)return null;var i;if(!1===e.isConnected)return null!=(i=null!=r?r:n)?i:null;const s=t(e);return JSON.stringify(r)===JSON.stringify(s)?r:s})}const l=function(e){let{callback:t,disabled:n}=e;const r=mn(t),i=a(()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(r)},[r,n]);return s(()=>()=>null==i?void 0:i.disconnect(),[i]),i}({callback(t){if(e)for(const n of t){const{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){o();break}}}}),c=Vr({callback:o});return gn(()=>{o(),e?(null==c||c.observe(e),null==l||l.observe(document.body,{childList:!0,subtree:!0})):(null==c||c.disconnect(),null==l||l.disconnect())},[e]),r}const Gr=[];function $r(e,t){void 0===t&&(t=[]);const n=o(null);return s(()=>{n.current=null},t),s(()=>{const t=e!==Vn;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?Sn(e,n.current):Vn}function qr(e){return a(()=>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 Hr=[];function Wr(e){let{measure:t}=e;const[n,r]=u(null),i=l(e=>{for(const{target:n}of e)if(dn(n)){r(e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t]),s=Vr({callback:i}),o=l(e=>{const n=function(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return dn(t)?t:e}(e);null==s||s.disconnect(),n&&(null==s||s.observe(n)),r(n?t(n):null)},[t,s]),[c,h]=vn(o);return a(()=>({nodeRef:c,rect:n,setRef:h}),[n,c,h])}const Zr=[{sensor:Or,options:{}},{sensor:Er,options:{}}],Kr={current:{}},Xr={draggable:{measure:Jn},droppable:{measure:Jn,strategy:Ir.WhileDragging,frequency:zr.Optimized},dragOverlay:{measure:Qn}};class Yr 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 Qr={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Yr,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:jn},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Xr,measureDroppableContainers:jn,windowRect:null,measuringScheduled:!1},Jr=c({activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:jn,draggableNodes:new Map,over:null,measureDroppableContainers:jn}),ei=c(Qr);function ti(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Yr}}}function ni(e,t){switch(t.type){case Ln.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Ln.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 Ln.DragEnd:case Ln.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Ln.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new Yr(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case Ln.SetDroppableDisabled:{const{id:n,key:r,disabled:i}=t,s=e.droppable.containers.get(n);if(!s||r!==s.key)return e;const o=new Yr(e.droppable.containers);return o.set(n,{...s,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case Ln.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const s=new Yr(e.droppable.containers);return s.delete(n),{...e,droppable:{...e.droppable,containers:s}}}default:return e}}function ri(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=f(Jr),o=bn(r),a=bn(null==n?void 0:n.id);return s(()=>{if(!t&&!r&&o&&null!=a){if(!Tn(o))return;if(document.activeElement===o.target)return;const e=i.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=Cn(e);if(t){t.focus();break}}})}},[r,t,i,a,o]),null}const ii=c({...Vn,scaleX:1,scaleY:1});var si;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(si||(si={}));const oi=h(function(e){var t,n,i,c;let{id:h,accessibility:f,autoScroll:p=!0,children:g,sensors:m=Zr,collisionDetection:_=Wn,measuring:y,modifiers:v,...b}=e;const x=d(ni,void 0,ti),[w,E]=x,[A,S]=function(){const[e]=u(()=>new Set),t=l(t=>(e.add(t),()=>e.delete(t)),[e]);return[l(t=>{let{type:n,event:r}=t;e.forEach(e=>{var t;return null==(t=e[n])?void 0:t.call(e,r)})},[e]),t]}(),[T,k]=u(si.Uninitialized),O=T===si.Initialized,{draggable:{active:R,nodes:C,translate:P},droppable:{containers:M}}=w,N=null!=R?C.get(R):null,D=o({initial:null,translated:null}),F=a(()=>{var e;return null!=R?{id:R,data:null!=(e=null==N?void 0:N.data)?e:Kr,rect:D}:null},[R,N]),I=o(null),[z,L]=u(null),[j,V]=u(null),U=_n(b,Object.values(b)),B=wn("DndDescribedBy",h),G=a(()=>M.getEnabled(),[M]),$=a(()=>({draggable:{...Xr.draggable,...null==q?void 0:q.draggable},droppable:{...Xr.droppable,...null==q?void 0:q.droppable},dragOverlay:{...Xr.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:H,measureDroppableContainers:W,measuringScheduled:Z}=function(e,t){let{dragging:n,dependencies:r,config:i}=t;const[a,c]=u(null),{frequency:h,measure:d,strategy:f}=i,p=o(e),g=function(){switch(f){case Ir.Always:return!1;case Ir.BeforeDragging:return n;default:return!n}}(),m=_n(g),_=l(function(e){void 0===e&&(e=[]),m.current||c(t=>null===t?e:t.concat(e.filter(e=>!t.includes(e))))},[m]),y=o(null),v=yn(t=>{if(g&&!n)return Lr;if(!t||t===Lr||p.current!==e||null!=a){const t=new Map;for(let n of e){if(!n)continue;if(a&&a.length>0&&!a.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,r=e?new pr(d(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,a,n,g,d]);return s(()=>{p.current=e},[e]),s(()=>{g||_()},[n,g]),s(()=>{a&&a.length>0&&c(null)},[JSON.stringify(a)]),s(()=>{g||"number"!=typeof h||null!==y.current||(y.current=setTimeout(()=>{_(),y.current=null},h))},[h,g,_,...r]),{droppableRects:v,measureDroppableContainers:_,measuringScheduled:null!=a}}(G,{dragging:O,dependencies:[P.x,P.y],config:$.droppable}),K=function(e,t){const n=null!=t?e.get(t):void 0,r=n?n.node.current:null;return yn(e=>{var n;return null==t?null:null!=(n=null!=r?r:e)?n:null},[r,t])}(C,R),X=a(()=>j?kn(j):null,[j]),Q=function(){const e=!1===(null==z?void 0:z.autoScrollEnabled),t="object"==typeof p?!1===p.enabled:!1===p,n=O&&!e&&!t;if("object"==typeof p)return{...p,enabled:n};return{enabled:n}}(),J=function(e,t){return jr(e,t)}(K,$.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e;const s=o(!1),{x:a,y:l}="boolean"==typeof i?{x:i,y:i}:i;gn(()=>{if(!a&&!l||!t)return void(s.current=!1);if(s.current||!r)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const i=Zn(n(e),r);if(a||(i.x=0),l||(i.y=0),s.current=!0,Math.abs(i.x)>0||Math.abs(i.y)>0){const t=tr(e);t&&t.scrollBy({top:i.y,left:i.x})}},[t,a,l,r,n])}({activeNode:null!=R?C.get(R):null,config:Q.layoutShiftCompensation,initialRect:J,measure:$.draggable.measure});const ee=Br(K,$.draggable.measure,J),te=Br(K?K.parentElement:null),ne=o({activatorEvent:null,active:null,activeNode:K,collisionRect:null,collisions:null,droppableRects:H,draggableNodes:C,draggingNode:null,draggingNodeRect:null,droppableContainers:M,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),re=M.getNodeFor(null==(t=ne.current.over)?void 0:t.id),ie=Wr({measure:$.dragOverlay.measure}),se=null!=(n=ie.nodeRef.current)?n:K,oe=O?null!=(i=ie.rect)?i:ee:null,ae=Boolean(ie.nodeRef.current&&ie.rect),le=Zn(ue=ae?null:ee,jr(ue));var ue;const ce=qr(se?cn(se):null),he=function(e){const t=o(e),n=yn(n=>e?n&&n!==Gr&&e&&t.current&&e.parentNode===t.current.parentNode?n:er(e):Gr,[e]);return s(()=>{t.current=e},[e]),n}(O?null!=re?re:K:null),de=function(e,t){void 0===t&&(t=Qn);const[n]=e,r=qr(n?cn(n):null),[i,s]=u(Hr);function o(){s(()=>e.length?e.map(e=>ar(e)?r:new pr(t(e),e)):Hr)}const a=Vr({callback:o});return gn(()=>{null==a||a.disconnect(),o(),e.forEach(e=>null==a?void 0:a.observe(e))},[e]),i}(he),fe=function(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}(v,{transform:{x:P.x-le.x,y:P.y-le.y,scaleX:1,scaleY:1},activatorEvent:j,active:F,activeNodeRect:ee,containerNodeRect:te,draggingNodeRect:oe,over:ne.current.over,overlayNodeRect:ie.rect,scrollableAncestors:he,scrollableAncestorRects:de,windowRect:ce}),pe=X?An(X,P):null,ge=function(e){const[t,n]=u(null),r=o(e),i=l(e=>{const t=nr(e.target);t&&n(e=>e?(e.set(t,sr(t)),new Map(e)):null)},[]);return s(()=>{const t=r.current;if(e!==t){s(t);const o=e.map(e=>{const t=nr(e);return t?(t.addEventListener("scroll",i,{passive:!0}),[t,sr(t)]):null}).filter(e=>null!=e);n(o.length?new Map(o):null),r.current=e}return()=>{s(e),s(t)};function s(e){e.forEach(e=>{const t=nr(e);null==t||t.removeEventListener("scroll",i)})}},[i,e]),a(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>An(e,t),Vn):dr(e):Vn,[e,t])}(he),me=$r(ge),_e=$r(ge,[ee]),ye=An(fe,me),ve=oe?Xn(oe,fe):null,be=F&&ve?_({active:F,collisionRect:ve,droppableRects:H,droppableContainers:G,pointerCoordinates:pe}):null,xe=function(e,t){if(!e||0===e.length)return null;const[n]=e;return n[t]}(be,"id"),[we,Ee]=u(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:An(fe,_e),null!=(c=null==we?void 0:we.rect)?c:null,ee),Se=o(null),Te=l((e,t)=>{let{sensor:n,options:r}=t;if(null==I.current)return;const i=C.get(I.current);if(!i)return;const s=e.nativeEvent,o=new n({active:I.current,activeNode:i,event:s,options:r,context:ne,onAbort(e){if(!C.get(e))return;const{onDragAbort:t}=U.current,n={id:e};null==t||t(n),A({type:"onDragAbort",event:n})},onPending(e,t,n,r){if(!C.get(e))return;const{onDragPending:i}=U.current,s={id:e,constraint:t,initialCoordinates:n,offset:r};null==i||i(s),A({type:"onDragPending",event:s})},onStart(e){const t=I.current;if(null==t)return;const n=C.get(t);if(!n)return;const{onDragStart:r}=U.current,i={activatorEvent:s,active:{id:t,data:n.data,rect:D}};Y(()=>{null==r||r(i),k(si.Initializing),E({type:Ln.DragStart,initialCoordinates:e,active:t}),A({type:"onDragStart",event:i}),L(Se.current),V(s)})},onMove(e){E({type:Ln.DragMove,coordinates:e})},onEnd:a(Ln.DragEnd),onCancel:a(Ln.DragCancel)});function a(e){return async function(){const{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=ne.current;let o=null;if(t&&i){const{cancelDrop:a}=U.current;if(o={activatorEvent:s,active:t,collisions:n,delta:i,over:r},e===Ln.DragEnd&&"function"==typeof a){await Promise.resolve(a(o))&&(e=Ln.DragCancel)}}I.current=null,Y(()=>{E({type:e}),k(si.Uninitialized),Ee(null),L(null),V(null),Se.current=null;const t=e===Ln.DragEnd?"onDragEnd":"onDragCancel";if(o){const e=U.current[t];null==e||e(o),A({type:t,event:o})}})}}Se.current=o},[C]),ke=l((e,t)=>(n,r)=>{const i=n.nativeEvent,s=C.get(r);if(null!==I.current||!s||i.dndKit||i.defaultPrevented)return;const o={active:s};!0===e(n,t.options,o)&&(i.dndKit={capturedBy:t.sensor},I.current=r,Te(n,t))},[C,Te]),Oe=function(e,t){return a(()=>e.reduce((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}))]},[]),[e,t])}(m,ke);!function(e){s(()=>{if(!an)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),gn(()=>{ee&&T===si.Initializing&&k(si.Initialized)},[ee,T]),s(()=>{const{onDragMove:e}=U.current,{active:t,activatorEvent:n,collisions:r,over:i}=ne.current;if(!t||!n)return;const s={active:t,activatorEvent:n,collisions:r,delta:{x:ye.x,y:ye.y},over:i};Y(()=>{null==e||e(s),A({type:"onDragMove",event:s})})},[ye.x,ye.y]),s(()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:i}=ne.current;if(!e||null==I.current||!t||!i)return;const{onDragOver:s}=U.current,o=r.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:i.x,y:i.y},over:a};Y(()=>{Ee(a),null==s||s(l),A({type:"onDragOver",event:l})})},[xe]),gn(()=>{ne.current={activatorEvent:j,active:F,activeNode:K,collisionRect:ve,collisions:be,droppableRects:H,draggableNodes:C,draggingNode:se,draggingNodeRect:oe,droppableContainers:M,over:we,scrollableAncestors:he,scrollAdjustedTranslate:ye},D.current={initial:oe,translated:ve}},[F,K,be,ve,C,se,oe,H,M,we,he,ye]),Dr({...Q,delta:P,draggingRect:ve,pointerCoordinates:pe,scrollableAncestors:he,scrollableAncestorRects:de});const Re=a(()=>({active:F,activeNode:K,activeNodeRect:ee,activatorEvent:j,collisions:be,containerNodeRect:te,dragOverlay:ie,draggableNodes:C,droppableContainers:M,droppableRects:H,over:we,measureDroppableContainers:W,scrollableAncestors:he,scrollableAncestorRects:de,measuringConfiguration:$,measuringScheduled:Z,windowRect:ce}),[F,K,ee,j,be,te,ie,C,M,H,we,W,he,de,$,Z,ce]),Ce=a(()=>({activatorEvent:j,activators:Oe,active:F,activeNodeRect:ee,ariaDescribedById:{draggable:B},dispatch:E,draggableNodes:C,over:we,measureDroppableContainers:W}),[j,Oe,F,ee,E,B,C,we,W]);return r.createElement(Dn.Provider,{value:S},r.createElement(Jr.Provider,{value:Ce},r.createElement(ei.Provider,{value:Re},r.createElement(ii.Provider,{value:Ae},g)),r.createElement(ri,{disabled:!1===(null==f?void 0:f.restoreFocus)})),r.createElement(zn,{...f,hiddenTextDescribedById:B}))}),ai=c(null),li="button";function ui(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const s=wn("Draggable"),{activators:o,activatorEvent:l,active:u,activeNodeRect:c,ariaDescribedById:h,draggableNodes:d,over:p}=f(Jr),{role:g=li,roleDescription:m="draggable",tabIndex:_=0}=null!=i?i:{},y=(null==u?void 0:u.id)===t,v=f(y?ii:ai),[b,x]=vn(),[w,E]=vn(),A=function(e,t){return a(()=>e.reduce((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e},{}),[e,t])}(o,t),S=_n(n);gn(()=>(d.set(t,{id:t,key:s,node:b,activatorNode:w,data:S}),()=>{const e=d.get(t);e&&e.key===s&&d.delete(t)}),[d,t]);return{active:u,activatorEvent:l,activeNodeRect:c,attributes:a(()=>({role:g,tabIndex:_,"aria-disabled":r,"aria-pressed":!(!y||g!==li)||void 0,"aria-roledescription":m,"aria-describedby":h.draggable}),[r,g,_,y,m,h.draggable]),isDragging:y,listeners:r?void 0:A,node:b,over:p,setNodeRef:x,setActivatorNodeRef:E,transform:v}}const ci={timeout:25};function hi(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function di(e,t){return e.reduce((e,n,r)=>{const i=t.get(n);return i&&(e[r]=i),e},Array(e.length))}function fi(e){return null!==e&&e>=0}const pi=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e;const s=hi(t,r,n),o=t[i],a=s[i];return a&&o?{x:a.left-o.left,y:a.top-o.top,scaleX:a.width/o.width,scaleY:a.height/o.height}:null},gi={scaleX:1,scaleY:1},mi=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:i,rects:s,overIndex:o}=e;const a=null!=(t=s[n])?t:r;if(!a)return null;if(i===n){const e=s[o];return e?{x:0,y:n<o?e.top+e.height-(a.top+a.height):e.top-a.top,...gi}:null}const l=function(e,t,n){const r=e[t],i=e[t-1],s=e[t+1];if(!r)return 0;if(n<t)return i?r.top-(i.top+i.height):s?s.top-(r.top+r.height):0;return s?s.top-(r.top+r.height):i?r.top-(i.top+i.height):0}(s,i,n);return i>n&&i<=o?{x:0,y:-a.height-l,...gi}:i<n&&i>=o?{x:0,y:a.height+l,...gi}:{x:0,y:0,...gi}};const _i="Sortable",yi=r.createContext({activeIndex:-1,containerId:_i,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:pi,disabled:{draggable:!1,droppable:!1}});function vi(e){let{children:t,id:n,items:i,strategy:l=pi,disabled:u=!1}=e;const{active:c,dragOverlay:h,droppableRects:d,over:p,measureDroppableContainers:g}=f(ei),m=wn(_i,n),_=Boolean(null!==h.rect),y=a(()=>i.map(e=>"object"==typeof e&&"id"in e?e.id:e),[i]),v=null!=c,b=c?y.indexOf(c.id):-1,x=p?y.indexOf(p.id):-1,w=o(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,S=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(u);gn(()=>{E&&v&&g(y)},[E,y,v,g]),s(()=>{w.current=y},[y]);const T=a(()=>({activeIndex:b,containerId:m,disabled:S,disableTransforms:A,items:y,overIndex:x,useDragOverlay:_,sortedRects:di(y,d),strategy:l}),[b,m,S.draggable,S.droppable,A,y,x,d,_,l]);return r.createElement(yi.Provider,{value:T},t)}const bi=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return hi(n,r,i).indexOf(t)},xi=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:s,newIndex:o,previousItems:a,previousContainerId:l,transition:u}=e;return!(!u||!r)&&((a===s||i!==o)&&(!!n||o!==i&&t===l))},wi={duration:200,easing:"ease"},Ei="transform",Ai=On.Transition.toString({property:Ei,duration:0,easing:"linear"}),Si={roleDescription:"sortable"};function Ti(e){let{animateLayoutChanges:t=xi,attributes:n,disabled:r,data:i,getNewIndex:c=bi,id:h,strategy:d,resizeObserverConfig:p,transition:g=wi}=e;const{items:m,containerId:_,activeIndex:y,disabled:v,disableTransforms:b,sortedRects:x,overIndex:w,useDragOverlay:E,strategy:A}=f(yi),S=function(e,t){var n,r;if("boolean"==typeof e)return{draggable:e,droppable:!1};return{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(r=null==e?void 0:e.droppable)?r:t.droppable}}(r,v),T=m.indexOf(h),k=a(()=>({sortable:{containerId:_,index:T,items:m},...i}),[_,i,T,m]),O=a(()=>m.slice(m.indexOf(h)),[m,h]),{rect:R,node:C,isOver:P,setNodeRef:M}=function(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const a=wn("Droppable"),{active:u,dispatch:c,over:h,measureDroppableContainers:d}=f(Jr),p=o({disabled:n}),g=o(!1),m=o(null),_=o(null),{disabled:y,updateMeasurementsFor:v,timeout:b}={...ci,...i},x=_n(null!=v?v:r),w=Vr({callback:l(()=>{g.current?(null!=_.current&&clearTimeout(_.current),_.current=setTimeout(()=>{d(Array.isArray(x.current)?x.current:[x.current]),_.current=null},b)):g.current=!0},[b]),disabled:y||!u}),E=l((e,t)=>{w&&(t&&(w.unobserve(t),g.current=!1),e&&w.observe(e))},[w]),[A,S]=vn(E),T=_n(t);return s(()=>{w&&A.current&&(w.disconnect(),g.current=!1,w.observe(A.current))},[A,w]),s(()=>(c({type:Ln.RegisterDroppable,element:{id:r,key:a,disabled:n,node:A,rect:m,data:T}}),()=>c({type:Ln.UnregisterDroppable,key:a,id:r})),[r]),s(()=>{n!==p.current.disabled&&(c({type:Ln.SetDroppableDisabled,id:r,key:a,disabled:n}),p.current.disabled=n)},[r,a,n,c]),{active:u,rect:m,isOver:(null==h?void 0:h.id)===r,node:A,over:h,setNodeRef:S}}({id:h,data:k,disabled:S.droppable,resizeObserverConfig:{updateMeasurementsFor:O,...p}}),{active:N,activatorEvent:D,activeNodeRect:F,attributes:I,setNodeRef:z,listeners:L,isDragging:j,over:V,setActivatorNodeRef:U,transform:B}=ui({id:h,data:k,attributes:{...Si,...n},disabled:S.draggable}),G=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a(()=>e=>{t.forEach(t=>t(e))},t)}(M,z),$=Boolean(N),q=$&&!b&&fi(y)&&fi(w),H=!E&&j,W=H&&q?B:null,Z=q?null!=W?W:(null!=d?d:A)({rects:x,activeNodeRect:F,activeIndex:y,overIndex:w,index:T}):null,K=fi(y)&&fi(w)?c({id:h,items:m,activeIndex:y,overIndex:w}):T,X=null==N?void 0:N.id,Y=o({activeId:X,items:m,newIndex:K,containerId:_}),Q=m!==Y.current.items,J=t({active:N,containerId:_,isDragging:j,isSorting:$,id:h,index:T,items:m,newIndex:Y.current.newIndex,previousItems:Y.current.items,previousContainerId:Y.current.containerId,transition:g,wasDragging:null!=Y.current.activeId}),ee=function(e){let{disabled:t,index:n,node:r,rect:i}=e;const[a,l]=u(null),c=o(n);return gn(()=>{if(!t&&n!==c.current&&r.current){const e=i.current;if(e){const t=Qn(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!==c.current&&(c.current=n)},[t,n,r,i]),s(()=>{a&&l(null)},[a]),a}({disabled:!J,index:T,node:C,rect:R});return s(()=>{$&&Y.current.newIndex!==K&&(Y.current.newIndex=K),_!==Y.current.containerId&&(Y.current.containerId=_),m!==Y.current.items&&(Y.current.items=m)},[$,K,_,m]),s(()=>{if(X===Y.current.activeId)return;if(null!=X&&null==Y.current.activeId)return void(Y.current.activeId=X);const e=setTimeout(()=>{Y.current.activeId=X},50);return()=>clearTimeout(e)},[X]),{active:N,activeIndex:y,attributes:I,data:k,rect:R,index:T,newIndex:K,items:m,isOver:P,isSorting:$,isDragging:j,listeners:L,node:C,overIndex:w,over:V,setNodeRef:G,setActivatorNodeRef:U,setDroppableNodeRef:M,setDraggableNodeRef:z,transform:null!=ee?ee:Z,transition:function(){if(ee||Q&&Y.current.newIndex===T)return Ai;if(H&&!Tn(D)||!g)return;if($||J)return On.Transition.toString({...g,property:Ei});return}()}}yr.Down,yr.Right,yr.Up,yr.Left;const ki=({id:t,sx:n,children:r})=>{const{isDragging:i}=ui({id:t}),{attributes:s,listeners:o,setNodeRef:a,transform:l,transition:u}=Ti({id:t,strategy:mi,transition:{duration:300,easing:"cubic-bezier(0.25, 1, 0.5, 1)"}}),c={...n?.default,...i?n?.dragging:{},transform:On.Translate.toString(l),transition:u,cursor:"pointer"};return e(x,{ref:a,style:c,...o,...s,children:r})};function Oi({items:t,getItem:n,getId:r,onDragEnd:i,sx:s,title:o,draggableSx:l}){const u=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a(()=>[...t].filter(e=>null!=e),[...t])}(a(()=>({sensor:c,options:null!=h?h:{}}),[c=Or,h={activationConstraint:{distance:8}}]));var c,h;return e(oi,{sensors:u,collisionDetection:qn,onDragEnd:e=>{const{active:n,over:s}=e,o=t.findIndex(e=>r(e)===n.id),a=t.findIndex(e=>r(e)===s?.id),l=hi(t,o,a);i(l)},children:e(vi,{items:t.map(r),strategy:mi,children:e(ue,{items:t,sx:s,title:o,getKey:r,getContent:(t,i)=>{const s=r(t);return e(ki,{id:s,sx:l,children:n(t,i)},s)}})})})}const Ri=c(null);function Ci(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Pi(){return function(){const e=p(Ri);if(null==e)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>");return e}().map}var Mi="production"!==process.env.NODE_ENV?{0:"Invalid value for configuration 'enforceActions', expected 'never', 'always' or 'observed'",1:function(e,t){return"Cannot apply '"+e+"' to '"+t.toString()+"': Field not found."},5:"'keys()' can only be used on observable objects, arrays, sets and maps",6:"'values()' can only be used on observable objects, arrays, sets and maps",7:"'entries()' can only be used on observable objects, arrays and maps",8:"'set()' can only be used on observable objects, arrays and maps",9:"'remove()' can only be used on observable objects, arrays and maps",10:"'has()' can only be used on observable objects, arrays and maps",11:"'get()' can only be used on observable objects, arrays and maps",12:"Invalid annotation",13:"Dynamic observable objects cannot be frozen. If you're passing observables to 3rd party component/function that calls Object.freeze, pass copy instead: toJS(observable)",14:"Intercept handlers should return nothing or a change object",15:"Observable arrays cannot be frozen. If you're passing observables to 3rd party component/function that calls Object.freeze, pass copy instead: toJS(observable)",16:"Modification exception: the internal structure of an observable array was changed.",17:function(e,t){return"[mobx.array] Index out of bounds, "+e+" is larger than "+t},18:"mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js",19:function(e){return"Cannot initialize from classes that inherit from Map: "+e.constructor.name},20:function(e){return"Cannot initialize map from "+e},21:function(e){return"Cannot convert to map from '"+e+"'"},22:"mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js",23:"It is not possible to get index atoms from arrays",24:function(e){return"Cannot obtain administration from "+e},25:function(e,t){return"the entry '"+e+"' does not exist in the observable map '"+t+"'"},26:"please specify a property",27:function(e,t){return"no observable property '"+e.toString()+"' found on the observable object '"+t+"'"},28:function(e){return"Cannot obtain atom from "+e},29:"Expecting some object",30:"invalid action stack. did you forget to finish an action?",31:"missing option for computed: get",32:function(e,t){return"Cycle detected in computation "+e+": "+t},33:function(e){return"The setter of computed value '"+e+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"},34:function(e){return"[ComputedValue '"+e+"'] It is not possible to assign a new value to a computed value."},35:"There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`",36:"isolateGlobalState should be called before MobX is running any reactions",37:function(e){return"[mobx] `observableArray."+e+"()` mutates the array in-place, which is not allowed inside a derivation. Use `array.slice()."+e+"()` instead"},38:"'ownKeys()' can only be used on observable objects",39:"'defineProperty()' can only be used on observable objects"}:{};function Ni(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if("production"!==process.env.NODE_ENV){var i="string"==typeof e?e:Mi[e];throw"function"==typeof i&&(i=i.apply(null,n)),new Error("[MobX] "+i)}throw new Error("number"==typeof e?"[MobX] minified error nr: "+e+(n.length?" "+n.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+e)}var Di={};function Fi(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:Di}var Ii=Object.assign,zi=Object.getOwnPropertyDescriptor,Li=Object.defineProperty,ji=Object.prototype,Vi=[];Object.freeze(Vi);var Ui={};Object.freeze(Ui);var Bi="undefined"!=typeof Proxy,Gi=Object.toString();function $i(){Bi||Ni("production"!==process.env.NODE_ENV?"`Proxy` objects are not available in the current environment. Please configure MobX to enable a fallback implementation.`":"Proxy not available")}function qi(e){"production"!==process.env.NODE_ENV&&Ko.verifyProxies&&Ni("MobX is currently configured to be able to run in ES5 mode, but in ES5 MobX won't be able to "+e)}function Hi(){return++Ko.mobxGuid}function Wi(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var Zi=function(){};function Ki(e){return"function"==typeof e}function Xi(e){switch(typeof e){case"string":case"symbol":case"number":return!0}return!1}function Yi(e){return null!==e&&"object"==typeof e}function Qi(e){if(!Yi(e))return!1;var t=Object.getPrototypeOf(e);if(null==t)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n.toString()===Gi}function Ji(e){var t=null==e?void 0:e.constructor;return!!t&&("GeneratorFunction"===t.name||"GeneratorFunction"===t.displayName)}function es(e,t,n){Li(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function ts(e,t,n){Li(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function ns(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(e){return Yi(e)&&!0===e[n]}}function rs(e){return null!=e&&"[object Map]"===Object.prototype.toString.call(e)}function is(e){return null!=e&&"[object Set]"===Object.prototype.toString.call(e)}var ss=void 0!==Object.getOwnPropertySymbols;var os="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:ss?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function as(e){return"string"==typeof e?e:"symbol"==typeof e?e.toString():new String(e).toString()}function ls(e){return null===e?null:"object"==typeof e?""+e:e}function us(e,t){return ji.hasOwnProperty.call(e,t)}var cs=Object.getOwnPropertyDescriptors||function(e){var t={};return os(e).forEach(function(n){t[n]=zi(e,n)}),t};function hs(e,t){return!!(e&t)}function ds(e,t,n){return n?e|=t:e&=~t,e}function fs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ps(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,vs(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function gs(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return fs(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fs(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ms(){return ms=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ms.apply(null,arguments)}function _s(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ys(e,t)}function ys(e,t){return ys=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ys(e,t)}function vs(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}var bs=Symbol("mobx-stored-annotations");function xs(e){return Object.assign(function(t,n){if(Es(n))return e.decorate_20223_(t,n);ws(t,n,e)},e)}function ws(e,t,n){(us(e,bs)||es(e,bs,ms({},e[bs])),"production"!==process.env.NODE_ENV&&Ns(n)&&!us(e[bs],t))&&Ni("'"+(e.constructor.name+".prototype."+t.toString())+"' is decorated with 'override', but no such decorated member was found on prototype.");!function(e,t,n){if("production"!==process.env.NODE_ENV&&!Ns(t)&&us(e[bs],n)){var r=e.constructor.name+".prototype."+n.toString(),i=e[bs][n].annotationType_;Ni("Cannot apply '@"+t.annotationType_+"' to '"+r+"':\nThe field is already decorated with '@"+i+"'.\nRe-decorating fields is not allowed.\nUse '@override' decorator for methods overridden by subclass.")}}(e,n,t),Ns(n)||(e[bs][t]=n)}function Es(e){return"object"==typeof e&&"string"==typeof e.kind}function As(e,t){"production"===process.env.NODE_ENV||t.includes(e.kind)||Ni("The decorator applied to '"+String(e.name)+"' cannot be used on a "+e.kind+" element")}var Ss=Symbol("mobx administration"),Ts=function(){function e(e){void 0===e&&(e="production"!==process.env.NODE_ENV?"Atom@"+Hi():"Atom"),this.name_=void 0,this.flags_=0,this.observers_=new Set,this.lastAccessedBy_=0,this.lowestObserverState_=Po.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=e}var t=e.prototype;return t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(e){return e()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(e){return e()})},t.reportObserved=function(){return ta(this)},t.reportChanged=function(){Jo(),na(this),ea()},t.toString=function(){return this.name_},ps(e,[{key:"isBeingObserved",get:function(){return hs(this.flags_,e.isBeingObservedMask_)},set:function(t){this.flags_=ds(this.flags_,e.isBeingObservedMask_,t)}},{key:"isPendingUnobservation",get:function(){return hs(this.flags_,e.isPendingUnobservationMask_)},set:function(t){this.flags_=ds(this.flags_,e.isPendingUnobservationMask_,t)}},{key:"diffValue",get:function(){return hs(this.flags_,e.diffValueMask_)?1:0},set:function(t){this.flags_=ds(this.flags_,e.diffValueMask_,1===t)}}])}();Ts.isBeingObservedMask_=1,Ts.isPendingUnobservationMask_=2,Ts.diffValueMask_=4;var ks=ns("Atom",Ts);function Os(e,t,n){void 0===t&&(t=Zi),void 0===n&&(n=Zi);var r,i=new Ts(e);return t!==Zi&&Ca(ka,i,t,r),n!==Zi&&Ra(i,n),i}var Rs={structural:function(e,t){return Kl(e,t)},default:function(e,t){return Object.is?Object.is(e,t):e===t?0!==e||1/e==1/t:e!=e&&t!=t}};function Cs(e,t,n){return Ga(e)?e:Array.isArray(e)?_o.array(e,{name:n}):Qi(e)?_o.object(e,void 0,{name:n}):rs(e)?_o.map(e,{name:n}):is(e)?_o.set(e,{name:n}):"function"!=typeof e||Sa(e)||Ba(e)?e:Ji(e)?Va(e):Aa(n,e)}function Ps(e){return e}var Ms="override";function Ns(e){return e.annotationType_===Ms}function Ds(e,t){return{annotationType_:e,options_:t,make_:Fs,extend_:Is,decorate_20223_:zs}}function Fs(e,t,n,r){var i;if(null!=(i=this.options_)&&i.bound)return null===this.extend_(e,t,n,!1)?0:1;if(r===e.target_)return null===this.extend_(e,t,n,!1)?0:2;if(Sa(n.value))return 1;var s=Ls(e,this,t,n,!1);return Li(r,t,s),2}function Is(e,t,n,r){var i=Ls(e,this,t,n);return e.defineProperty_(t,i,r)}function zs(e,t){"production"!==process.env.NODE_ENV&&As(t,["method","field"]);var n,r=t.kind,i=t.name,s=t.addInitializer,o=this,a=function(e){var t,n,r,s;return To(null!=(t=null==(n=o.options_)?void 0:n.name)?t:i.toString(),e,null!=(r=null==(s=o.options_)?void 0:s.autoAction)&&r)};return"field"==r?function(e){var t,n=e;return Sa(n)||(n=a(n)),null!=(t=o.options_)&&t.bound&&((n=n.bind(this)).isMobxAction=!0),n}:"method"==r?(Sa(e)||(e=a(e)),null!=(n=this.options_)&&n.bound&&s(function(){var e=this,t=e[i].bind(e);t.isMobxAction=!0,e[i]=t}),e):void Ni("Cannot apply '"+o.annotationType_+"' to '"+String(i)+"' (kind: "+r+"):\n'"+o.annotationType_+"' can only be used on properties with a function value.")}function Ls(e,t,n,r,i){var s,o,a,l,u,c,h;void 0===i&&(i=Ko.safeDescriptors),function(e,t,n,r){var i=t.annotationType_,s=r.value;"production"===process.env.NODE_ENV||Ki(s)||Ni("Cannot apply '"+i+"' to '"+e.name_+"."+n.toString()+"':\n'"+i+"' can only be used on properties with a function value.")}(e,t,n,r);var d,f=r.value;null!=(s=t.options_)&&s.bound&&(f=f.bind(null!=(d=e.proxy_)?d:e.target_));return{value:To(null!=(o=null==(a=t.options_)?void 0:a.name)?o:n.toString(),f,null!=(l=null==(u=t.options_)?void 0:u.autoAction)&&l,null!=(c=t.options_)&&c.bound?null!=(h=e.proxy_)?h:e.target_:void 0),configurable:!i||e.isPlainObject_,enumerable:!1,writable:!i}}function js(e,t){return{annotationType_:e,options_:t,make_:Vs,extend_:Us,decorate_20223_:Bs}}function Vs(e,t,n,r){var i;if(r===e.target_)return null===this.extend_(e,t,n,!1)?0:2;if(null!=(i=this.options_)&&i.bound&&(!us(e.target_,t)||!Ba(e.target_[t]))&&null===this.extend_(e,t,n,!1))return 0;if(Ba(n.value))return 1;var s=Gs(e,this,t,n,!1,!1);return Li(r,t,s),2}function Us(e,t,n,r){var i,s=Gs(e,this,t,n,null==(i=this.options_)?void 0:i.bound);return e.defineProperty_(t,s,r)}function Bs(e,t){var n;"production"!==process.env.NODE_ENV&&As(t,["method"]);var r=t.name,i=t.addInitializer;return Ba(e)||(e=Va(e)),null!=(n=this.options_)&&n.bound&&i(function(){var e=this,t=e[r].bind(e);t.isMobXFlow=!0,e[r]=t}),e}function Gs(e,t,n,r,i,s){void 0===s&&(s=Ko.safeDescriptors),function(e,t,n,r){var i=t.annotationType_,s=r.value;"production"===process.env.NODE_ENV||Ki(s)||Ni("Cannot apply '"+i+"' to '"+e.name_+"."+n.toString()+"':\n'"+i+"' can only be used on properties with a generator function value.")}(e,t,n,r);var o,a=r.value;(Ba(a)||(a=Va(a)),i)&&((a=a.bind(null!=(o=e.proxy_)?o:e.target_)).isMobXFlow=!0);return{value:a,configurable:!s||e.isPlainObject_,enumerable:!1,writable:!s}}function $s(e,t){return{annotationType_:e,options_:t,make_:qs,extend_:Hs,decorate_20223_:Ws}}function qs(e,t,n){return null===this.extend_(e,t,n,!1)?0:1}function Hs(e,t,n,r){return function(e,t,n,r){var i=t.annotationType_,s=r.get;"production"===process.env.NODE_ENV||s||Ni("Cannot apply '"+i+"' to '"+e.name_+"."+n.toString()+"':\n'"+i+"' can only be used on getter(+setter) properties.")}(e,this,t,n),e.defineComputedProperty_(t,ms({},this.options_,{get:n.get,set:n.set}),r)}function Ws(e,t){"production"!==process.env.NODE_ENV&&As(t,["getter"]);var n=this,r=t.name;return(0,t.addInitializer)(function(){var t=Tl(this)[Ss],i=ms({},n.options_,{get:e,context:this});i.name||(i.name="production"!==process.env.NODE_ENV?t.name_+"."+r.toString():"ObservableObject."+r.toString()),t.values_.set(r,new Co(i))}),function(){return this[Ss].getObservablePropValue_(r)}}function Zs(e,t){return{annotationType_:e,options_:t,make_:Ks,extend_:Xs,decorate_20223_:Ys}}function Ks(e,t,n){return null===this.extend_(e,t,n,!1)?0:1}function Xs(e,t,n,r){var i,s;return function(e,t,n,r){var i=t.annotationType_;"production"===process.env.NODE_ENV||"value"in r||Ni("Cannot apply '"+i+"' to '"+e.name_+"."+n.toString()+"':\n'"+i+"' cannot be used on getter/setter properties")}(e,this,t,n),e.defineObservableProperty_(t,n.value,null!=(i=null==(s=this.options_)?void 0:s.enhancer)?i:Cs,r)}function Ys(e,t){if("production"!==process.env.NODE_ENV){if("field"===t.kind)throw Ni("Please use `@observable accessor "+String(t.name)+"` instead of `@observable "+String(t.name)+"`");As(t,["accessor"])}var n=this,r=t.kind,i=t.name,s=new WeakSet;function o(e,t){var r,o,a=Tl(e)[Ss],l=new Ro(t,null!=(r=null==(o=n.options_)?void 0:o.enhancer)?r:Cs,"production"!==process.env.NODE_ENV?a.name_+"."+i.toString():"ObservableObject."+i.toString(),!1);a.values_.set(i,l),s.add(e)}if("accessor"==r)return{get:function(){return s.has(this)||o(this,e.get.call(this)),this[Ss].getObservablePropValue_(i)},set:function(e){return s.has(this)||o(this,e),this[Ss].setObservablePropValue_(i,e)},init:function(e){return s.has(this)||o(this,e),e}}}var Qs="true",Js=eo();function eo(e){return{annotationType_:Qs,options_:e,make_:to,extend_:no,decorate_20223_:ro}}function to(e,t,n,r){var i,s,o,a;if(n.get)return xo.make_(e,t,n,r);if(n.set){var l=Sa(n.set)?n.set:To(t.toString(),n.set);return r===e.target_?null===e.defineProperty_(t,{configurable:!Ko.safeDescriptors||e.isPlainObject_,set:l})?0:2:(Li(r,t,{configurable:!0,set:l}),2)}if(r!==e.target_&&"function"==typeof n.value)return Ji(n.value)?(null!=(a=this.options_)&&a.autoBind?Va.bound:Va).make_(e,t,n,r):(null!=(o=this.options_)&&o.autoBind?Aa.bound:Aa).make_(e,t,n,r);var u,c=!1===(null==(i=this.options_)?void 0:i.deep)?_o.ref:_o;"function"==typeof n.value&&null!=(s=this.options_)&&s.autoBind&&(n.value=n.value.bind(null!=(u=e.proxy_)?u:e.target_));return c.make_(e,t,n,r)}function no(e,t,n,r){var i,s,o;if(n.get)return xo.extend_(e,t,n,r);if(n.set)return e.defineProperty_(t,{configurable:!Ko.safeDescriptors||e.isPlainObject_,set:To(t.toString(),n.set)},r);"function"==typeof n.value&&null!=(i=this.options_)&&i.autoBind&&(n.value=n.value.bind(null!=(o=e.proxy_)?o:e.target_));return(!1===(null==(s=this.options_)?void 0:s.deep)?_o.ref:_o).extend_(e,t,n,r)}function ro(e,t){Ni("'"+this.annotationType_+"' cannot be used as a decorator")}var io={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function so(e){return e||io}Object.freeze(io);var oo=Zs("observable"),ao=Zs("observable.ref",{enhancer:Ps}),lo=Zs("observable.shallow",{enhancer:function(e,t,n){return null==e||Rl(e)||dl(e)||_l(e)||xl(e)?e:Array.isArray(e)?_o.array(e,{name:n,deep:!1}):Qi(e)?_o.object(e,void 0,{name:n,deep:!1}):rs(e)?_o.map(e,{name:n,deep:!1}):is(e)?_o.set(e,{name:n,deep:!1}):void("production"!==process.env.NODE_ENV&&Ni("The shallow modifier / decorator can only used in combination with arrays, objects, maps and sets"))}}),uo=Zs("observable.struct",{enhancer:function(e,t){return"production"!==process.env.NODE_ENV&&Ga(e)&&Ni("observable.struct should not be used with observable values"),Kl(e,t)?t:e}}),co=xs(oo);function ho(e){return!0===e.deep?Cs:!1===e.deep?Ps:(t=e.defaultDecorator)&&null!=(n=null==(r=t.options_)?void 0:r.enhancer)?n:Cs;var t,n,r}function fo(e,t,n){return Es(t)?oo.decorate_20223_(e,t):Xi(t)?void ws(e,t,oo):Ga(e)?e:Qi(e)?_o.object(e,t,n):Array.isArray(e)?_o.array(e,t):rs(e)?_o.map(e,t):is(e)?_o.set(e,t):"object"==typeof e&&null!==e?e:_o.box(e,t)}Ii(fo,co);var po,go,mo={box:function(e,t){var n=so(t);return new Ro(e,ho(n),n.name,!0,n.equals)},array:function(e,t){var n=so(t);return(!1===Ko.useProxies||!1===n.proxy?Bl:sl)(e,ho(n),n.name)},map:function(e,t){var n=so(t);return new ml(e,ho(n),n.name)},set:function(e,t){var n=so(t);return new bl(e,ho(n),n.name)},object:function(e,t,n){return Hl(function(){return Na(!1===Ko.useProxies||!1===(null==n?void 0:n.proxy)?Tl({},n):function(e,t){var n,r;return $i(),e=Tl(e,t),null!=(r=(n=e[Ss]).proxy_)?r:n.proxy_=new Proxy(e,Ha)}({},n),e,t)})},ref:xs(ao),shallow:xs(lo),deep:co,struct:xs(uo)},_o=Ii(fo,mo),yo="computed",vo=$s(yo),bo=$s("computed.struct",{equals:Rs.structural}),xo=function(e,t){if(Es(t))return vo.decorate_20223_(e,t);if(Xi(t))return ws(e,t,vo);if(Qi(e))return xs($s(yo,e));"production"!==process.env.NODE_ENV&&(Ki(e)||Ni("First argument to `computed` should be an expression."),Ki(t)&&Ni("A setter as second argument is no longer supported, use `{ set: fn }` option instead"));var n=Qi(t)?t:{};return n.get=e,n.name||(n.name=e.name||""),new Co(n)};Object.assign(xo,vo),xo.struct=xs(bo);var wo=0,Eo=1,Ao=null!=(po=null==(go=zi(function(){},"name"))?void 0:go.configurable)&&po,So={value:"action",configurable:!0,writable:!1,enumerable:!1};function To(e,t,n,r){function i(){return function(e,t,n,r,i){var s=function(e,t,n,r){var i="production"!==process.env.NODE_ENV&&ha()&&!!e,s=0;if("production"!==process.env.NODE_ENV&&i){s=Date.now();var o=r?Array.from(r):Vi;fa({type:ma,name:e,object:n,arguments:o})}var a=Ko.trackingDerivation,l=!t||!a;Jo();var u=Ko.allowStateChanges;l&&(Uo(),u=ko(!0));var c=Go(!0),h={runAsAction_:l,prevDerivation_:a,prevAllowStateChanges_:u,prevAllowStateReads_:c,notifySpy_:i,startTime_:s,actionId_:Eo++,parentActionId_:wo};return wo=h.actionId_,h}(e,t,r,i);try{return n.apply(r,i)}catch(e){throw s.error_=e,e}finally{!function(e){wo!==e.actionId_&&Ni(30);wo=e.parentActionId_,void 0!==e.error_&&(Ko.suppressReactionErrors=!0);Oo(e.prevAllowStateChanges_),$o(e.prevAllowStateReads_),ea(),e.runAsAction_&&Bo(e.prevDerivation_);"production"!==process.env.NODE_ENV&&e.notifySpy_&&ga({time:Date.now()-e.startTime_});Ko.suppressReactionErrors=!1}(s)}}(e,n,t,r||this,arguments)}return void 0===n&&(n=!1),"production"!==process.env.NODE_ENV&&(Ki(t)||Ni("`action` can only be invoked on functions"),"string"==typeof e&&e||Ni("actions should have valid names, got: '"+e+"'")),i.isMobxAction=!0,i.toString=function(){return t.toString()},Ao&&(So.value=e,Li(i,"name",So)),i}function ko(e){var t=Ko.allowStateChanges;return Ko.allowStateChanges=e,t}function Oo(e){Ko.allowStateChanges=e}var Ro=function(e){function t(t,n,r,i,s){var o,a;(void 0===r&&(r="production"!==process.env.NODE_ENV?"ObservableValue@"+Hi():"ObservableValue"),void 0===i&&(i=!0),void 0===s&&(s=Rs.default),(o=e.call(this,r)||this).enhancer=void 0,o.name_=void 0,o.equals=void 0,o.hasUnreportedChange_=!1,o.interceptors_=void 0,o.changeListeners_=void 0,o.value_=void 0,o.dehancer=void 0,o.enhancer=n,o.name_=r,o.equals=s,o.value_=n(t,void 0,r),"production"!==process.env.NODE_ENV&&i&&ha())&&da({type:"create",object:o,observableKind:"value",debugObjectName:o.name_,newValue:""+(null==(a=o.value_)?void 0:a.toString())});return o}_s(t,e);var n=t.prototype;return n.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},n.set=function(e){var t=this.value_;if((e=this.prepareNewValue_(e))!==Ko.UNCHANGED){var n=ha();"production"!==process.env.NODE_ENV&&n&&fa({type:nl,object:this,observableKind:"value",debugObjectName:this.name_,newValue:e,oldValue:t}),this.setNewValue_(e),"production"!==process.env.NODE_ENV&&n&&ga()}},n.prepareNewValue_=function(e){if(zo(this),Wa(this)){var t=Ka(this,{object:this,type:nl,newValue:e});if(!t)return Ko.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value_,this.name_),this.equals(this.value_,e)?Ko.UNCHANGED:e},n.setNewValue_=function(e){var t=this.value_;this.value_=e,this.reportChanged(),Xa(this)&&Qa(this,{type:nl,object:this,newValue:e,oldValue:t})},n.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},n.intercept_=function(e){return Za(this,e)},n.observe_=function(e,t){return t&&e({observableKind:"value",debugObjectName:this.name_,object:this,type:nl,newValue:this.value_,oldValue:void 0}),Ya(this,e)},n.raw=function(){return this.value_},n.toJSON=function(){return this.get()},n.toString=function(){return this.name_+"["+this.value_+"]"},n.valueOf=function(){return ls(this.get())},n[Symbol.toPrimitive]=function(){return this.valueOf()},t}(Ts),Co=function(){function e(e){this.dependenciesState_=Po.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.observers_=new Set,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=Po.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new Do(null),this.name_=void 0,this.triggeredBy_=void 0,this.flags_=0,this.derivation=void 0,this.setter_=void 0,this.isTracing_=Mo.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,e.get||Ni(31),this.derivation=e.get,this.name_=e.name||("production"!==process.env.NODE_ENV?"ComputedValue@"+Hi():"ComputedValue"),e.set&&(this.setter_=To("production"!==process.env.NODE_ENV?this.name_+"-setter":"ComputedValue-setter",e.set)),this.equals_=e.equals||(e.compareStructural||e.struct?Rs.structural:Rs.default),this.scope_=e.context,this.requiresReaction_=e.requiresReaction,this.keepAlive_=!!e.keepAlive}var t=e.prototype;return t.onBecomeStale_=function(){!function(e){if(e.lowestObserverState_!==Po.UP_TO_DATE_)return;e.lowestObserverState_=Po.POSSIBLY_STALE_,e.observers_.forEach(function(e){e.dependenciesState_===Po.UP_TO_DATE_&&(e.dependenciesState_=Po.POSSIBLY_STALE_,e.onBecomeStale_())})}(this)},t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(e){return e()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(e){return e()})},t.get=function(){if(this.isComputing&&Ni(32,this.name_,this.derivation),0!==Ko.inBatch||0!==this.observers_.size||this.keepAlive_){if(ta(this),Io(this)){var e=Ko.trackingContext;this.keepAlive_&&!e&&(Ko.trackingContext=this),this.trackAndCompute()&&function(e){if(e.lowestObserverState_===Po.STALE_)return;e.lowestObserverState_=Po.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===Po.POSSIBLY_STALE_?(t.dependenciesState_=Po.STALE_,"production"!==process.env.NODE_ENV&&t.isTracing_!==Mo.NONE&&ra(t,e)):t.dependenciesState_===Po.UP_TO_DATE_&&(e.lowestObserverState_=Po.UP_TO_DATE_)})}(this),Ko.trackingContext=e}}else Io(this)&&(this.warnAboutUntrackedRead_(),Jo(),this.value_=this.computeValue_(!1),ea());var t=this.value_;if(Fo(t))throw t.cause;return t},t.set=function(e){if(this.setter_){this.isRunningSetter&&Ni(33,this.name_),this.isRunningSetter=!0;try{this.setter_.call(this.scope_,e)}finally{this.isRunningSetter=!1}}else Ni(34,this.name_)},t.trackAndCompute=function(){var e=this.value_,t=this.dependenciesState_===Po.NOT_TRACKING_,n=this.computeValue_(!0),r=t||Fo(e)||Fo(n)||!this.equals_(e,n);return r&&(this.value_=n,"production"!==process.env.NODE_ENV&&ha()&&da({observableKind:"computed",debugObjectName:this.name_,object:this.scope_,type:"update",oldValue:e,newValue:n})),r},t.computeValue_=function(e){this.isComputing=!0;var t,n=ko(!1);if(e)t=Lo(this,this.derivation,this.scope_);else if(!0===Ko.disableErrorBoundaries)t=this.derivation.call(this.scope_);else try{t=this.derivation.call(this.scope_)}catch(e){t=new Do(e)}return Oo(n),this.isComputing=!1,t},t.suspend_=function(){this.keepAlive_||(jo(this),this.value_=void 0,"production"!==process.env.NODE_ENV&&this.isTracing_!==Mo.NONE&&console.log("[mobx.trace] Computed value '"+this.name_+"' was suspended and it will recompute on the next access."))},t.observe_=function(e,t){var n=this,r=!0,i=void 0;return function(e,t){var n,r,i,s;void 0===t&&(t=Ui);"production"!==process.env.NODE_ENV&&(Ki(e)||Ni("Autorun expects a function as first argument"),Sa(e)&&Ni("Autorun does not accept actions since actions are untrackable"));var o,a=null!=(n=null==(r=t)?void 0:r.name)?n:"production"!==process.env.NODE_ENV?e.name||"Autorun@"+Hi():"Autorun";if(t.scheduler||t.delay){var l=function(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:Ta}(t),u=!1;o=new sa(a,function(){u||(u=!0,l(function(){u=!1,o.isDisposed||o.track(c)}))},t.onError,t.requiresObservable)}else o=new sa(a,function(){this.track(c)},t.onError,t.requiresObservable);function c(){e(o)}null!=(i=t)&&null!=(i=i.signal)&&i.aborted||o.schedule_();return o.getDisposer_(null==(s=t)?void 0:s.signal)}(function(){var s=n.get();if(!r||t){var o=Uo();e({observableKind:"computed",debugObjectName:n.name_,type:nl,object:n,newValue:s,oldValue:i}),Bo(o)}r=!1,i=s})},t.warnAboutUntrackedRead_=function(){"production"!==process.env.NODE_ENV&&(this.isTracing_!==Mo.NONE&&console.log("[mobx.trace] Computed value '"+this.name_+"' is being read outside a reactive context. Doing a full recompute."),("boolean"==typeof this.requiresReaction_?this.requiresReaction_:Ko.computedRequiresReaction)&&console.warn("[mobx] Computed value '"+this.name_+"' is being read outside a reactive context. Doing a full recompute."))},t.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},t.valueOf=function(){return ls(this.get())},t[Symbol.toPrimitive]=function(){return this.valueOf()},ps(e,[{key:"isComputing",get:function(){return hs(this.flags_,e.isComputingMask_)},set:function(t){this.flags_=ds(this.flags_,e.isComputingMask_,t)}},{key:"isRunningSetter",get:function(){return hs(this.flags_,e.isRunningSetterMask_)},set:function(t){this.flags_=ds(this.flags_,e.isRunningSetterMask_,t)}},{key:"isBeingObserved",get:function(){return hs(this.flags_,e.isBeingObservedMask_)},set:function(t){this.flags_=ds(this.flags_,e.isBeingObservedMask_,t)}},{key:"isPendingUnobservation",get:function(){return hs(this.flags_,e.isPendingUnobservationMask_)},set:function(t){this.flags_=ds(this.flags_,e.isPendingUnobservationMask_,t)}},{key:"diffValue",get:function(){return hs(this.flags_,e.diffValueMask_)?1:0},set:function(t){this.flags_=ds(this.flags_,e.diffValueMask_,1===t)}}])}();Co.isComputingMask_=1,Co.isRunningSetterMask_=2,Co.isBeingObservedMask_=4,Co.isPendingUnobservationMask_=8,Co.diffValueMask_=16;var Po,Mo,No=ns("ComputedValue",Co);!function(e){e[e.NOT_TRACKING_=-1]="NOT_TRACKING_",e[e.UP_TO_DATE_=0]="UP_TO_DATE_",e[e.POSSIBLY_STALE_=1]="POSSIBLY_STALE_",e[e.STALE_=2]="STALE_"}(Po||(Po={})),function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(Mo||(Mo={}));var Do=function(e){this.cause=void 0,this.cause=e};function Fo(e){return e instanceof Do}function Io(e){switch(e.dependenciesState_){case Po.UP_TO_DATE_:return!1;case Po.NOT_TRACKING_:case Po.STALE_:return!0;case Po.POSSIBLY_STALE_:for(var t=Go(!0),n=Uo(),r=e.observing_,i=r.length,s=0;s<i;s++){var o=r[s];if(No(o)){if(Ko.disableErrorBoundaries)o.get();else try{o.get()}catch(e){return Bo(n),$o(t),!0}if(e.dependenciesState_===Po.STALE_)return Bo(n),$o(t),!0}}return qo(e),Bo(n),$o(t),!1}}function zo(e){if("production"!==process.env.NODE_ENV){var t=e.observers_.size>0;Ko.allowStateChanges||!t&&"always"!==Ko.enforceActions||console.warn("[MobX] "+(Ko.enforceActions?"Since strict-mode is enabled, changing (observed) observable values without using an action is not allowed. Tried to modify: ":"Side effects like changing state are not allowed at this point. Are you trying to modify state from, for example, a computed value or the render function of a React component? You can wrap side effects in 'runInAction' (or decorate functions with 'action') if needed. Tried to modify: ")+e.name_)}}function Lo(e,t,n){var r=Go(!0);qo(e),e.newObserving_=new Array(0===e.runId_?100:e.observing_.length),e.unboundDepsCount_=0,e.runId_=++Ko.runId;var i,s=Ko.trackingDerivation;if(Ko.trackingDerivation=e,Ko.inBatch++,!0===Ko.disableErrorBoundaries)i=t.call(n);else try{i=t.call(n)}catch(e){i=new Do(e)}return Ko.inBatch--,Ko.trackingDerivation=s,function(e){for(var t=e.observing_,n=e.observing_=e.newObserving_,r=Po.UP_TO_DATE_,i=0,s=e.unboundDepsCount_,o=0;o<s;o++){var a=n[o];0===a.diffValue&&(a.diffValue=1,i!==o&&(n[i]=a),i++),a.dependenciesState_>r&&(r=a.dependenciesState_)}n.length=i,e.newObserving_=null,s=t.length;for(;s--;){var l=t[s];0===l.diffValue&&Yo(l,e),l.diffValue=0}for(;i--;){var u=n[i];1===u.diffValue&&(u.diffValue=0,Xo(u,e))}r!==Po.UP_TO_DATE_&&(e.dependenciesState_=r,e.onBecomeStale_())}(e),function(e){if("production"===process.env.NODE_ENV)return;if(0!==e.observing_.length)return;("boolean"==typeof e.requiresObservable_?e.requiresObservable_:Ko.reactionRequiresObservable)&&console.warn("[mobx] Derivation '"+e.name_+"' is created/updated without reading any observable value.")}(e),$o(r),i}function jo(e){var t=e.observing_;e.observing_=[];for(var n=t.length;n--;)Yo(t[n],e);e.dependenciesState_=Po.NOT_TRACKING_}function Vo(e){var t=Uo();try{return e()}finally{Bo(t)}}function Uo(){var e=Ko.trackingDerivation;return Ko.trackingDerivation=null,e}function Bo(e){Ko.trackingDerivation=e}function Go(e){var t=Ko.allowStateReads;return Ko.allowStateReads=e,t}function $o(e){Ko.allowStateReads=e}function qo(e){if(e.dependenciesState_!==Po.UP_TO_DATE_){e.dependenciesState_=Po.UP_TO_DATE_;for(var t=e.observing_,n=t.length;n--;)t[n].lowestObserverState_=Po.UP_TO_DATE_}}var Ho=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},Wo=!0,Zo=!1,Ko=function(){var e=Fi();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(Wo=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new Ho).version&&(Wo=!1),Wo?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new Ho):(setTimeout(function(){Zo||Ni(35)},1),new Ho)}();function Xo(e,t){e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function Yo(e,t){e.observers_.delete(t),0===e.observers_.size&&Qo(e)}function Qo(e){!1===e.isPendingUnobservation&&(e.isPendingUnobservation=!0,Ko.pendingUnobservations.push(e))}function Jo(){Ko.inBatch++}function ea(){if(0===--Ko.inBatch){la();for(var e=Ko.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation=!1,0===n.observers_.size&&(n.isBeingObserved&&(n.isBeingObserved=!1,n.onBUO()),n instanceof Co&&n.suspend_())}Ko.pendingUnobservations=[]}}function ta(e){!function(e){"production"!==process.env.NODE_ENV&&!Ko.allowStateReads&&Ko.observableRequiresReaction&&console.warn("[mobx] Observable '"+e.name_+"' being read outside a reactive context.")}(e);var t=Ko.trackingDerivation;return null!==t?(t.runId_!==e.lastAccessedBy_&&(e.lastAccessedBy_=t.runId_,t.newObserving_[t.unboundDepsCount_++]=e,!e.isBeingObserved&&Ko.trackingContext&&(e.isBeingObserved=!0,e.onBO())),e.isBeingObserved):(0===e.observers_.size&&Ko.inBatch>0&&Qo(e),!1)}function na(e){e.lowestObserverState_!==Po.STALE_&&(e.lowestObserverState_=Po.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===Po.UP_TO_DATE_&&("production"!==process.env.NODE_ENV&&t.isTracing_!==Mo.NONE&&ra(t,e),t.onBecomeStale_()),t.dependenciesState_=Po.STALE_}))}function ra(e,t){if(console.log("[mobx.trace] '"+e.name_+"' is invalidated due to a change in: '"+t.name_+"'"),e.isTracing_===Mo.BREAK){var n=[];ia(Da(e),n,1),new Function("debugger;\n/*\nTracing '"+e.name_+"'\n\nYou are entering this break point because derivation '"+e.name_+"' is being traced and '"+t.name_+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(e instanceof Co?e.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+n.join("\n")+"\n*/\n ")()}}function ia(e,t,n){t.length>=1e3?t.push("(and many more)"):(t.push(""+"\t".repeat(n-1)+e.name),e.dependencies&&e.dependencies.forEach(function(e){return ia(e,t,n+1)}))}var sa=function(){function e(e,t,n,r){void 0===e&&(e="production"!==process.env.NODE_ENV?"Reaction@"+Hi():"Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=Po.NOT_TRACKING_,this.runId_=0,this.unboundDepsCount_=0,this.flags_=0,this.isTracing_=Mo.NONE,this.name_=e,this.onInvalidate_=t,this.errorHandler_=n,this.requiresObservable_=r}var t=e.prototype;return t.onBecomeStale_=function(){this.schedule_()},t.schedule_=function(){this.isScheduled||(this.isScheduled=!0,Ko.pendingReactions.push(this),la())},t.runReaction_=function(){if(!this.isDisposed){Jo(),this.isScheduled=!1;var e=Ko.trackingContext;if(Ko.trackingContext=this,Io(this)){this.isTrackPending=!0;try{this.onInvalidate_(),"production"!==process.env.NODE_ENV&&this.isTrackPending&&ha()&&da({name:this.name_,type:"scheduled-reaction"})}catch(e){this.reportExceptionInDerivation_(e)}}Ko.trackingContext=e,ea()}},t.track=function(e){if(!this.isDisposed){Jo();var t,n=ha();"production"!==process.env.NODE_ENV&&n&&(t=Date.now(),fa({name:this.name_,type:"reaction"})),this.isRunning=!0;var r=Ko.trackingContext;Ko.trackingContext=this;var i=Lo(this,e,void 0);Ko.trackingContext=r,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&jo(this),Fo(i)&&this.reportExceptionInDerivation_(i.cause),"production"!==process.env.NODE_ENV&&n&&ga({time:Date.now()-t}),ea()}},t.reportExceptionInDerivation_=function(e){var t=this;if(this.errorHandler_)this.errorHandler_(e,this);else{if(Ko.disableErrorBoundaries)throw e;var n="production"!==process.env.NODE_ENV?"[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'":"[mobx] uncaught error in '"+this+"'";Ko.suppressReactionErrors?"production"!==process.env.NODE_ENV&&console.warn("[mobx] (error in reaction '"+this.name_+"' suppressed, fix error of causing action below)"):console.error(n,e),"production"!==process.env.NODE_ENV&&ha()&&da({type:"error",name:this.name_,message:n,error:""+e}),Ko.globalReactionErrorHandlers.forEach(function(n){return n(e,t)})}},t.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.isRunning||(Jo(),jo(this),ea()))},t.getDisposer_=function(e){var t=this,n=function n(){t.dispose(),null==e||null==e.removeEventListener||e.removeEventListener("abort",n)};return null==e||null==e.addEventListener||e.addEventListener("abort",n),n[Ss]=this,"dispose"in Symbol&&"symbol"==typeof Symbol.dispose&&(n[Symbol.dispose]=n),n},t.toString=function(){return"Reaction["+this.name_+"]"},t.trace=function(e){void 0===e&&(e=!1),function(){if("production"===process.env.NODE_ENV)return;for(var e=!1,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];"boolean"==typeof n[n.length-1]&&(e=n.pop());var i=function(e){switch(e.length){case 0:return Ko.trackingDerivation;case 1:return Gl(e[0]);case 2:return Gl(e[0],e[1])}}(n);if(!i)return Ni("'trace(break?)' can only be used inside a tracked computed value or a Reaction. Consider passing in the computed value or reaction explicitly");i.isTracing_===Mo.NONE&&console.log("[mobx.trace] '"+i.name_+"' tracing enabled");i.isTracing_=e?Mo.BREAK:Mo.LOG}(this,e)},ps(e,[{key:"isDisposed",get:function(){return hs(this.flags_,e.isDisposedMask_)},set:function(t){this.flags_=ds(this.flags_,e.isDisposedMask_,t)}},{key:"isScheduled",get:function(){return hs(this.flags_,e.isScheduledMask_)},set:function(t){this.flags_=ds(this.flags_,e.isScheduledMask_,t)}},{key:"isTrackPending",get:function(){return hs(this.flags_,e.isTrackPendingMask_)},set:function(t){this.flags_=ds(this.flags_,e.isTrackPendingMask_,t)}},{key:"isRunning",get:function(){return hs(this.flags_,e.isRunningMask_)},set:function(t){this.flags_=ds(this.flags_,e.isRunningMask_,t)}},{key:"diffValue",get:function(){return hs(this.flags_,e.diffValueMask_)?1:0},set:function(t){this.flags_=ds(this.flags_,e.diffValueMask_,1===t)}}])}();sa.isDisposedMask_=1,sa.isScheduledMask_=2,sa.isTrackPendingMask_=4,sa.isRunningMask_=8,sa.diffValueMask_=16;var oa=100,aa=function(e){return e()};function la(){Ko.inBatch>0||Ko.isRunningReactions||aa(ua)}function ua(){Ko.isRunningReactions=!0;for(var e=Ko.pendingReactions,t=0;e.length>0;){++t===oa&&(console.error("production"!==process.env.NODE_ENV?"Reaction doesn't converge to a stable state after "+oa+" iterations. Probably there is a cycle in the reactive function: "+e[0]:"[mobx] cycle in reaction: "+e[0]),e.splice(0));for(var n=e.splice(0),r=0,i=n.length;r<i;r++)n[r].runReaction_()}Ko.isRunningReactions=!1}var ca=ns("Reaction",sa);function ha(){return"production"!==process.env.NODE_ENV&&!!Ko.spyListeners.length}function da(e){if("production"!==process.env.NODE_ENV&&Ko.spyListeners.length)for(var t=Ko.spyListeners,n=0,r=t.length;n<r;n++)t[n](e)}function fa(e){"production"!==process.env.NODE_ENV&&da(ms({},e,{spyReportStart:!0}))}var pa={type:"report-end",spyReportEnd:!0};function ga(e){"production"!==process.env.NODE_ENV&&da(e?ms({},e,{type:"report-end",spyReportEnd:!0}):pa)}var ma="action",_a="autoAction",ya=Ds(ma),va=Ds("action.bound",{bound:!0}),ba=Ds(_a,{autoAction:!0}),xa=Ds("autoAction.bound",{autoAction:!0,bound:!0});function wa(e){return function(t,n){return Ki(t)?To(t.name||"<unnamed action>",t,e):Ki(n)?To(t,n,e):Es(n)?(e?ba:ya).decorate_20223_(t,n):Xi(n)?ws(t,n,e?ba:ya):Xi(t)?xs(Ds(e?_a:ma,{name:t,autoAction:e})):void("production"!==process.env.NODE_ENV&&Ni("Invalid arguments for `action`"))}}var Ea=wa(!1);Object.assign(Ea,ya);var Aa=wa(!0);function Sa(e){return Ki(e)&&!0===e.isMobxAction}Object.assign(Aa,ba),Ea.bound=xs(va),Aa.bound=xs(xa);var Ta=function(e){return e()};var ka="onBO",Oa="onBUO";function Ra(e,t,n){return Ca(Oa,e,t,n)}function Ca(e,t,n,r){var i=Gl(t),s=Ki(r)?r:n,o=e+"L";return i[o]?i[o].add(s):i[o]=new Set([s]),function(){var e=i[o];e&&(e.delete(s),0===e.size&&delete i[o])}}var Pa="always";function Ma(e){!0===e.isolateGlobalState&&function(){if((Ko.pendingReactions.length||Ko.inBatch||Ko.isRunningReactions)&&Ni(36),Zo=!0,Wo){var e=Fi();0===--e.__mobxInstanceCount&&(e.__mobxGlobals=void 0),Ko=new Ho}}();var t,n,r=e.useProxies,i=e.enforceActions;if(void 0!==r&&(Ko.useProxies=r===Pa||"never"!==r&&"undefined"!=typeof Proxy),"ifavailable"===r&&(Ko.verifyProxies=!0),void 0!==i){var s=i===Pa?Pa:"observed"===i;Ko.enforceActions=s,Ko.allowStateChanges=!0!==s&&s!==Pa}["computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","disableErrorBoundaries","safeDescriptors"].forEach(function(t){t in e&&(Ko[t]=!!e[t])}),Ko.allowStateReads=!Ko.observableRequiresReaction,"production"!==process.env.NODE_ENV&&!0===Ko.disableErrorBoundaries&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."),e.reactionScheduler&&(t=e.reactionScheduler,n=aa,aa=function(e){return t(function(){return n(e)})})}function Na(e,t,n,r){"production"!==process.env.NODE_ENV&&(arguments.length>4&&Ni("'extendObservable' expected 2-4 arguments"),"object"!=typeof e&&Ni("'extendObservable' expects an object as first argument"),_l(e)&&Ni("'extendObservable' should not be used on maps, use map.merge instead"),Qi(t)||Ni("'extendObservable' only accepts plain objects as second argument"),(Ga(t)||Ga(n))&&Ni("Extending an object with another observable (object) is not supported"));var i=cs(t);return Hl(function(){var t=Tl(e,r)[Ss];os(i).forEach(function(e){t.extend_(e,i[e],!n||(!(e in n)||n[e]))})}),e}function Da(e,t){return Fa(Gl(e,t))}function Fa(e){var t,n={name:e.name_};return e.observing_&&e.observing_.length>0&&(n.dependencies=(t=e.observing_,Array.from(new Set(t))).map(Fa)),n}var Ia=0;function za(){this.message="FLOW_CANCELLED"}za.prototype=Object.create(Error.prototype);var La=js("flow"),ja=js("flow.bound",{bound:!0}),Va=Object.assign(function(e,t){if(Es(t))return La.decorate_20223_(e,t);if(Xi(t))return ws(e,t,La);"production"!==process.env.NODE_ENV&&1!==arguments.length&&Ni("Flow expects single argument with generator function");var n=e,r=n.name||"<unnamed flow>",i=function(){var e,t=arguments,i=++Ia,s=Ea(r+" - runid: "+i+" - init",n).apply(this,t),o=void 0,a=new Promise(function(t,n){var a=0;function l(e){var t;o=void 0;try{t=Ea(r+" - runid: "+i+" - yield "+a++,s.next).call(s,e)}catch(e){return n(e)}c(t)}function u(e){var t;o=void 0;try{t=Ea(r+" - runid: "+i+" - yield "+a++,s.throw).call(s,e)}catch(e){return n(e)}c(t)}function c(e){if(!Ki(null==e?void 0:e.then))return e.done?t(e.value):(o=Promise.resolve(e.value)).then(l,u);e.then(c,n)}e=n,l(void 0)});return a.cancel=Ea(r+" - runid: "+i+" - cancel",function(){try{o&&Ua(o);var t=s.return(void 0),n=Promise.resolve(t.value);n.then(Zi,Zi),Ua(n),e(new za)}catch(t){e(t)}}),a};return i.isMobXFlow=!0,i},La);function Ua(e){Ki(e.cancel)&&e.cancel()}function Ba(e){return!0===(null==e?void 0:e.isMobXFlow)}function Ga(e){return"production"!==process.env.NODE_ENV&&1!==arguments.length&&Ni("isObservable expects only 1 argument. Use isObservableProp to inspect the observability of a property"),function(e){return!!e&&(Rl(e)||!!e[Ss]||ks(e)||ca(e)||No(e))}(e)}function $a(e,t){void 0===t&&(t=void 0),Jo();try{return e.apply(t)}finally{ea()}}function qa(e){return e[Ss]}Va.bound=xs(ja);var Ha={has:function(e,t){return"production"!==process.env.NODE_ENV&&Ko.trackingDerivation&&qi("detect new properties using the 'in' operator. Use 'has' from 'mobx' instead."),qa(e).has_(t)},get:function(e,t){return qa(e).get_(t)},set:function(e,t,n){var r;return!!Xi(t)&&("production"===process.env.NODE_ENV||qa(e).values_.has(t)||qi("add a new observable property through direct assignment. Use 'set' from 'mobx' instead."),null==(r=qa(e).set_(t,n,!0))||r)},deleteProperty:function(e,t){var n;return"production"!==process.env.NODE_ENV&&qi("delete properties from an observable object. Use 'remove' from 'mobx' instead."),!!Xi(t)&&(null==(n=qa(e).delete_(t,!0))||n)},defineProperty:function(e,t,n){var r;return"production"!==process.env.NODE_ENV&&qi("define property on an observable object. Use 'defineProperty' from 'mobx' instead."),null==(r=qa(e).defineProperty_(t,n))||r},ownKeys:function(e){return"production"!==process.env.NODE_ENV&&Ko.trackingDerivation&&qi("iterate keys to detect added / removed properties. Use 'keys' from 'mobx' instead."),qa(e).ownKeys_()},preventExtensions:function(e){Ni(13)}};function Wa(e){return void 0!==e.interceptors_&&e.interceptors_.length>0}function Za(e,t){var n=e.interceptors_||(e.interceptors_=[]);return n.push(t),Wi(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function Ka(e,t){var n=Uo();try{for(var r=[].concat(e.interceptors_||[]),i=0,s=r.length;i<s&&((t=r[i](t))&&!t.type&&Ni(14),t);i++);return t}finally{Bo(n)}}function Xa(e){return void 0!==e.changeListeners_&&e.changeListeners_.length>0}function Ya(e,t){var n=e.changeListeners_||(e.changeListeners_=[]);return n.push(t),Wi(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function Qa(e,t){var n=Uo(),r=e.changeListeners_;if(r){for(var i=0,s=(r=r.slice()).length;i<s;i++)r[i](t);Bo(n)}}var Ja=Symbol("mobx-keys");function el(e,t,n){return"production"!==process.env.NODE_ENV&&(Qi(e)||Qi(Object.getPrototypeOf(e))||Ni("'makeAutoObservable' can only be used for classes that don't have a superclass"),Rl(e)&&Ni("makeAutoObservable can only be used on objects not already made observable")),Qi(e)?Na(e,e,t,n):(Hl(function(){var r=Tl(e,n)[Ss];if(!e[Ja]){var i=Object.getPrototypeOf(e),s=new Set([].concat(os(e),os(i)));s.delete("constructor"),s.delete(Ss),es(i,Ja,s)}e[Ja].forEach(function(e){return r.make_(e,!t||(!(e in t)||t[e]))})}),e)}var tl="splice",nl="update",rl={get:function(e,t){var n=e[Ss];return t===Ss?n:"length"===t?n.getArrayLength_():"string"!=typeof t||isNaN(t)?us(ol,t)?ol[t]:e[t]:n.get_(parseInt(t))},set:function(e,t,n){var r=e[Ss];return"length"===t&&r.setArrayLength_(n),"symbol"==typeof t||isNaN(t)?e[t]=n:r.set_(parseInt(t),n),!0},preventExtensions:function(){Ni(15)}},il=function(){function e(e,t,n,r){void 0===e&&(e="production"!==process.env.NODE_ENV?"ObservableArray@"+Hi():"ObservableArray"),this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=n,this.legacyMode_=r,this.atom_=new Ts(e),this.enhancer_=function(n,r){return t(n,r,"production"!==process.env.NODE_ENV?e+"[..]":"ObservableArray[..]")}}var t=e.prototype;return t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.dehanceValues_=function(e){return void 0!==this.dehancer&&e.length>0?e.map(this.dehancer):e},t.intercept_=function(e){return Za(this,e)},t.observe_=function(e,t){return void 0===t&&(t=!1),t&&e({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),Ya(this,e)},t.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},t.setArrayLength_=function(e){("number"!=typeof e||isNaN(e)||e<0)&&Ni("Out of range: "+e);var t=this.values_.length;if(e!==t)if(e>t){for(var n=new Array(e-t),r=0;r<e-t;r++)n[r]=void 0;this.spliceWithArray_(t,0,n)}else this.spliceWithArray_(e,t-e)},t.updateArrayLength_=function(e,t){e!==this.lastKnownLength_&&Ni(16),this.lastKnownLength_+=t,this.legacyMode_&&t>0&&Ul(e+t+1)},t.spliceWithArray_=function(e,t,n){var r=this;zo(this.atom_);var i=this.values_.length;if(void 0===e?e=0:e>i?e=i:e<0&&(e=Math.max(0,i+e)),t=1===arguments.length?i-e:null==t?0:Math.max(0,Math.min(t,i-e)),void 0===n&&(n=Vi),Wa(this)){var s=Ka(this,{object:this.proxy_,type:tl,index:e,removedCount:t,added:n});if(!s)return Vi;t=s.removedCount,n=s.added}if(n=0===n.length?n:n.map(function(e){return r.enhancer_(e,void 0)}),this.legacyMode_||"production"!==process.env.NODE_ENV){var o=n.length-t;this.updateArrayLength_(i,o)}var a=this.spliceItemsIntoValues_(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice_(e,n,a),this.dehanceValues_(a)},t.spliceItemsIntoValues_=function(e,t,n){var r;if(n.length<1e4)return(r=this.values_).splice.apply(r,[e,t].concat(n));var i=this.values_.slice(e,e+t),s=this.values_.slice(e+t);this.values_.length+=n.length-t;for(var o=0;o<n.length;o++)this.values_[e+o]=n[o];for(var a=0;a<s.length;a++)this.values_[e+n.length+a]=s[a];return i},t.notifyArrayChildUpdate_=function(e,t,n){var r=!this.owned_&&ha(),i=Xa(this),s=i||r?{observableKind:"array",object:this.proxy_,type:nl,debugObjectName:this.atom_.name_,index:e,newValue:t,oldValue:n}:null;"production"!==process.env.NODE_ENV&&r&&fa(s),this.atom_.reportChanged(),i&&Qa(this,s),"production"!==process.env.NODE_ENV&&r&&ga()},t.notifyArraySplice_=function(e,t,n){var r=!this.owned_&&ha(),i=Xa(this),s=i||r?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:tl,index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;"production"!==process.env.NODE_ENV&&r&&fa(s),this.atom_.reportChanged(),i&&Qa(this,s),"production"!==process.env.NODE_ENV&&r&&ga()},t.get_=function(e){if(!(this.legacyMode_&&e>=this.values_.length))return this.atom_.reportObserved(),this.dehanceValue_(this.values_[e]);console.warn("production"!==process.env.NODE_ENV?"[mobx.array] Attempt to read an array index ("+e+") that is out of bounds ("+this.values_.length+"). Please check length first. Out of bound indices will not be tracked by MobX":"[mobx] Out of bounds read: "+e)},t.set_=function(e,t){var n=this.values_;if(this.legacyMode_&&e>n.length&&Ni(17,e,n.length),e<n.length){zo(this.atom_);var r=n[e];if(Wa(this)){var i=Ka(this,{type:nl,object:this.proxy_,index:e,newValue:t});if(!i)return;t=i.newValue}(t=this.enhancer_(t,r))!==r&&(n[e]=t,this.notifyArrayChildUpdate_(e,t,r))}else{for(var s=new Array(e+1-n.length),o=0;o<s.length-1;o++)s[o]=void 0;s[s.length-1]=t,this.spliceWithArray_(n.length,0,s)}},e}();function sl(e,t,n,r){return void 0===n&&(n="production"!==process.env.NODE_ENV?"ObservableArray@"+Hi():"ObservableArray"),void 0===r&&(r=!1),$i(),Hl(function(){var i=new il(n,t,r,!1);ts(i.values_,Ss,i);var s=new Proxy(i.values_,rl);return i.proxy_=s,e&&e.length&&i.spliceWithArray_(0,0,e),s})}var ol={clear:function(){return this.splice(0)},replace:function(e){var t=this[Ss];return t.spliceWithArray_(0,t.values_.length,e)},toJSON:function(){return this.slice()},splice:function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var s=this[Ss];switch(arguments.length){case 0:return[];case 1:return s.spliceWithArray_(e);case 2:return s.spliceWithArray_(e,t)}return s.spliceWithArray_(e,t,r)},spliceWithArray:function(e,t,n){return this[Ss].spliceWithArray_(e,t,n)},push:function(){for(var e=this[Ss],t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.spliceWithArray_(e.values_.length,0,n),e.values_.length},pop:function(){return this.splice(Math.max(this[Ss].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=this[Ss],t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.spliceWithArray_(0,0,n),e.values_.length},reverse:function(){return Ko.trackingDerivation&&Ni(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){Ko.trackingDerivation&&Ni(37,"sort");var e=this.slice();return e.sort.apply(e,arguments),this.replace(e),this},remove:function(e){var t=this[Ss],n=t.dehanceValues_(t.values_).indexOf(e);return n>-1&&(this.splice(n,1),!0)}};function al(e,t){"function"==typeof Array.prototype[e]&&(ol[e]=t(e))}function ll(e){return function(){var t=this[Ss];t.atom_.reportObserved();var n=t.dehanceValues_(t.values_);return n[e].apply(n,arguments)}}function ul(e){return function(t,n){var r=this,i=this[Ss];return i.atom_.reportObserved(),i.dehanceValues_(i.values_)[e](function(e,i){return t.call(n,e,i,r)})}}function cl(e){return function(){var t=this,n=this[Ss];n.atom_.reportObserved();var r=n.dehanceValues_(n.values_),i=arguments[0];return arguments[0]=function(e,n,r){return i(e,n,r,t)},r[e].apply(r,arguments)}}al("at",ll),al("concat",ll),al("flat",ll),al("includes",ll),al("indexOf",ll),al("join",ll),al("lastIndexOf",ll),al("slice",ll),al("toString",ll),al("toLocaleString",ll),al("toSorted",ll),al("toSpliced",ll),al("with",ll),al("every",ul),al("filter",ul),al("find",ul),al("findIndex",ul),al("findLast",ul),al("findLastIndex",ul),al("flatMap",ul),al("forEach",ul),al("map",ul),al("some",ul),al("toReversed",ul),al("reduce",cl),al("reduceRight",cl);var hl=ns("ObservableArrayAdministration",il);function dl(e){return Yi(e)&&hl(e[Ss])}var fl={},pl="add",gl="delete",ml=function(){function e(e,t,n){var r=this;void 0===t&&(t=Cs),void 0===n&&(n="production"!==process.env.NODE_ENV?"ObservableMap@"+Hi():"ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[Ss]=fl,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=t,this.name_=n,Ki(Map)||Ni(18),Hl(function(){r.keysAtom_=Os("production"!==process.env.NODE_ENV?r.name_+".keys()":"ObservableMap.keys()"),r.data_=new Map,r.hasMap_=new Map,e&&r.merge(e)})}var t=e.prototype;return t.has_=function(e){return this.data_.has(e)},t.has=function(e){var t=this;if(!Ko.trackingDerivation)return this.has_(e);var n=this.hasMap_.get(e);if(!n){var r=n=new Ro(this.has_(e),Ps,"production"!==process.env.NODE_ENV?this.name_+"."+as(e)+"?":"ObservableMap.key?",!1);this.hasMap_.set(e,r),Ra(r,function(){return t.hasMap_.delete(e)})}return n.get()},t.set=function(e,t){var n=this.has_(e);if(Wa(this)){var r=Ka(this,{type:n?nl:pl,object:this,newValue:t,name:e});if(!r)return this;t=r.newValue}return n?this.updateValue_(e,t):this.addValue_(e,t),this},t.delete=function(e){var t=this;if((zo(this.keysAtom_),Wa(this))&&!Ka(this,{type:gl,object:this,name:e}))return!1;if(this.has_(e)){var n=ha(),r=Xa(this),i=r||n?{observableKind:"map",debugObjectName:this.name_,type:gl,object:this,oldValue:this.data_.get(e).value_,name:e}:null;return"production"!==process.env.NODE_ENV&&n&&fa(i),$a(function(){var n;t.keysAtom_.reportChanged(),null==(n=t.hasMap_.get(e))||n.setNewValue_(!1),t.data_.get(e).setNewValue_(void 0),t.data_.delete(e)}),r&&Qa(this,i),"production"!==process.env.NODE_ENV&&n&&ga(),!0}return!1},t.updateValue_=function(e,t){var n=this.data_.get(e);if((t=n.prepareNewValue_(t))!==Ko.UNCHANGED){var r=ha(),i=Xa(this),s=i||r?{observableKind:"map",debugObjectName:this.name_,type:nl,object:this,oldValue:n.value_,name:e,newValue:t}:null;"production"!==process.env.NODE_ENV&&r&&fa(s),n.setNewValue_(t),i&&Qa(this,s),"production"!==process.env.NODE_ENV&&r&&ga()}},t.addValue_=function(e,t){var n=this;zo(this.keysAtom_),$a(function(){var r,i=new Ro(t,n.enhancer_,"production"!==process.env.NODE_ENV?n.name_+"."+as(e):"ObservableMap.key",!1);n.data_.set(e,i),t=i.value_,null==(r=n.hasMap_.get(e))||r.setNewValue_(!0),n.keysAtom_.reportChanged()});var r=ha(),i=Xa(this),s=i||r?{observableKind:"map",debugObjectName:this.name_,type:pl,object:this,name:e,newValue:t}:null;"production"!==process.env.NODE_ENV&&r&&fa(s),i&&Qa(this,s),"production"!==process.env.NODE_ENV&&r&&ga()},t.get=function(e){return this.has(e)?this.dehanceValue_(this.data_.get(e).get()):this.dehanceValue_(void 0)},t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},t.values=function(){var e=this,t=this.keys();return yl({next:function(){var n=t.next(),r=n.done,i=n.value;return{done:r,value:r?void 0:e.get(i)}}})},t.entries=function(){var e=this,t=this.keys();return yl({next:function(){var n=t.next(),r=n.done,i=n.value;return{done:r,value:r?void 0:[i,e.get(i)]}}})},t[Symbol.iterator]=function(){return this.entries()},t.forEach=function(e,t){for(var n,r=gs(this);!(n=r()).done;){var i=n.value,s=i[0],o=i[1];e.call(t,o,s,this)}},t.merge=function(e){var t=this;return _l(e)&&(e=new Map(e)),$a(function(){var n,r,i;Qi(e)?function(e){var t=Object.keys(e);if(!ss)return t;var n=Object.getOwnPropertySymbols(e);return n.length?[].concat(t,n.filter(function(t){return ji.propertyIsEnumerable.call(e,t)})):t}(e).forEach(function(n){return t.set(n,e[n])}):Array.isArray(e)?e.forEach(function(e){var n=e[0],r=e[1];return t.set(n,r)}):rs(e)?(n=e,r=Object.getPrototypeOf(n),i=Object.getPrototypeOf(r),null!==Object.getPrototypeOf(i)&&Ni(19,e),e.forEach(function(e,n){return t.set(n,e)})):null!=e&&Ni(20,e)}),this},t.clear=function(){var e=this;$a(function(){Vo(function(){for(var t,n=gs(e.keys());!(t=n()).done;){var r=t.value;e.delete(r)}})})},t.replace=function(e){var t=this;return $a(function(){for(var n,r=function(e){if(rs(e)||_l(e))return e;if(Array.isArray(e))return new Map(e);if(Qi(e)){var t=new Map;for(var n in e)t.set(n,e[n]);return t}return Ni(21,e)}(e),i=new Map,s=!1,o=gs(t.data_.keys());!(n=o()).done;){var a=n.value;if(!r.has(a))if(t.delete(a))s=!0;else{var l=t.data_.get(a);i.set(a,l)}}for(var u,c=gs(r.entries());!(u=c()).done;){var h=u.value,d=h[0],f=h[1],p=t.data_.has(d);if(t.set(d,f),t.data_.has(d)){var g=t.data_.get(d);i.set(d,g),p||(s=!0)}}if(!s)if(t.data_.size!==i.size)t.keysAtom_.reportChanged();else for(var m=t.data_.keys(),_=i.keys(),y=m.next(),v=_.next();!y.done;){if(y.value!==v.value){t.keysAtom_.reportChanged();break}y=m.next(),v=_.next()}t.data_=i}),this},t.toString=function(){return"[object ObservableMap]"},t.toJSON=function(){return Array.from(this)},t.observe_=function(e,t){return"production"!==process.env.NODE_ENV&&!0===t&&Ni("`observe` doesn't support fireImmediately=true in combination with maps."),Ya(this,e)},t.intercept_=function(e){return Za(this,e)},ps(e,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Map"}}])}(),_l=ns("ObservableMap",ml);function yl(e){return e[Symbol.toStringTag]="MapIterator",Jl(e)}var vl={},bl=function(){function e(e,t,n){var r=this;void 0===t&&(t=Cs),void 0===n&&(n="production"!==process.env.NODE_ENV?"ObservableSet@"+Hi():"ObservableSet"),this.name_=void 0,this[Ss]=vl,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=n,Ki(Set)||Ni(22),this.enhancer_=function(e,r){return t(e,r,n)},Hl(function(){r.atom_=Os(r.name_),e&&r.replace(e)})}var t=e.prototype;return t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.clear=function(){var e=this;$a(function(){Vo(function(){for(var t,n=gs(e.data_.values());!(t=n()).done;){var r=t.value;e.delete(r)}})})},t.forEach=function(e,t){for(var n,r=gs(this);!(n=r()).done;){var i=n.value;e.call(t,i,i,this)}},t.add=function(e){var t=this;if(zo(this.atom_),Wa(this)){var n=Ka(this,{type:pl,object:this,newValue:e});if(!n)return this;e=n.newValue}if(!this.has(e)){$a(function(){t.data_.add(t.enhancer_(e,void 0)),t.atom_.reportChanged()});var r="production"!==process.env.NODE_ENV&&ha(),i=Xa(this),s=i||r?{observableKind:"set",debugObjectName:this.name_,type:pl,object:this,newValue:e}:null;r&&"production"!==process.env.NODE_ENV&&fa(s),i&&Qa(this,s),r&&"production"!==process.env.NODE_ENV&&ga()}return this},t.delete=function(e){var t=this;if(Wa(this)&&!Ka(this,{type:gl,object:this,oldValue:e}))return!1;if(this.has(e)){var n="production"!==process.env.NODE_ENV&&ha(),r=Xa(this),i=r||n?{observableKind:"set",debugObjectName:this.name_,type:gl,object:this,oldValue:e}:null;return n&&"production"!==process.env.NODE_ENV&&fa(i),$a(function(){t.atom_.reportChanged(),t.data_.delete(e)}),r&&Qa(this,i),n&&"production"!==process.env.NODE_ENV&&ga(),!0}return!1},t.has=function(e){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(e))},t.entries=function(){var e=this.values();return wl({next:function(){var t=e.next(),n=t.value,r=t.done;return r?{value:void 0,done:r}:{value:[n,n],done:r}}})},t.keys=function(){return this.values()},t.values=function(){this.atom_.reportObserved();var e=this,t=this.data_.values();return wl({next:function(){var n=t.next(),r=n.value,i=n.done;return i?{value:void 0,done:i}:{value:e.dehanceValue_(r),done:i}}})},t.intersection=function(e){return is(e)&&!xl(e)?e.intersection(this):new Set(this).intersection(e)},t.union=function(e){return is(e)&&!xl(e)?e.union(this):new Set(this).union(e)},t.difference=function(e){return new Set(this).difference(e)},t.symmetricDifference=function(e){return is(e)&&!xl(e)?e.symmetricDifference(this):new Set(this).symmetricDifference(e)},t.isSubsetOf=function(e){return new Set(this).isSubsetOf(e)},t.isSupersetOf=function(e){return new Set(this).isSupersetOf(e)},t.isDisjointFrom=function(e){return is(e)&&!xl(e)?e.isDisjointFrom(this):new Set(this).isDisjointFrom(e)},t.replace=function(e){var t=this;return xl(e)&&(e=new Set(e)),$a(function(){Array.isArray(e)||is(e)?(t.clear(),e.forEach(function(e){return t.add(e)})):null!=e&&Ni("Cannot initialize set from "+e)}),this},t.observe_=function(e,t){return"production"!==process.env.NODE_ENV&&!0===t&&Ni("`observe` doesn't support fireImmediately=true in combination with sets."),Ya(this,e)},t.intercept_=function(e){return Za(this,e)},t.toJSON=function(){return Array.from(this)},t.toString=function(){return"[object ObservableSet]"},t[Symbol.iterator]=function(){return this.values()},ps(e,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Set"}}])}(),xl=ns("ObservableSet",bl);function wl(e){return e[Symbol.toStringTag]="SetIterator",Jl(e)}var El=Object.create(null),Al="remove",Sl=function(){function e(e,t,n,r){void 0===t&&(t=new Map),void 0===r&&(r=Js),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=e,this.values_=t,this.name_=n,this.defaultAnnotation_=r,this.keysAtom_=new Ts("production"!==process.env.NODE_ENV?this.name_+".keys":"ObservableObject.keys"),this.isPlainObject_=Qi(this.target_),"production"===process.env.NODE_ENV||tu(this.defaultAnnotation_)||Ni("defaultAnnotation must be valid annotation"),"production"!==process.env.NODE_ENV&&(this.appliedAnnotations_={})}var t=e.prototype;return t.getObservablePropValue_=function(e){return this.values_.get(e).get()},t.setObservablePropValue_=function(e,t){var n=this.values_.get(e);if(n instanceof Co)return n.set(t),!0;if(Wa(this)){var r=Ka(this,{type:nl,object:this.proxy_||this.target_,name:e,newValue:t});if(!r)return null;t=r.newValue}if((t=n.prepareNewValue_(t))!==Ko.UNCHANGED){var i=Xa(this),s="production"!==process.env.NODE_ENV&&ha(),o=i||s?{type:nl,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:n.value_,name:e,newValue:t}:null;"production"!==process.env.NODE_ENV&&s&&fa(o),n.setNewValue_(t),i&&Qa(this,o),"production"!==process.env.NODE_ENV&&s&&ga()}return!0},t.get_=function(e){return Ko.trackingDerivation&&!us(this.target_,e)&&this.has_(e),this.target_[e]},t.set_=function(e,t,n){return void 0===n&&(n=!1),us(this.target_,e)?this.values_.has(e)?this.setObservablePropValue_(e,t):n?Reflect.set(this.target_,e,t):(this.target_[e]=t,!0):this.extend_(e,{value:t,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,n)},t.has_=function(e){if(!Ko.trackingDerivation)return e in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var t=this.pendingKeys_.get(e);return t||(t=new Ro(e in this.target_,Ps,"production"!==process.env.NODE_ENV?this.name_+"."+as(e)+"?":"ObservableObject.key?",!1),this.pendingKeys_.set(e,t)),t.get()},t.make_=function(e,t){if(!0===t&&(t=this.defaultAnnotation_),!1!==t){if(Pl(this,t,e),!(e in this.target_)){var n;if(null!=(n=this.target_[bs])&&n[e])return;Ni(1,t.annotationType_,this.name_+"."+e.toString())}for(var r=this.target_;r&&r!==ji;){var i=zi(r,e);if(i){var s=t.make_(this,e,i,r);if(0===s)return;if(1===s)break}r=Object.getPrototypeOf(r)}Cl(this,t,e)}},t.extend_=function(e,t,n,r){if(void 0===r&&(r=!1),!0===n&&(n=this.defaultAnnotation_),!1===n)return this.defineProperty_(e,t,r);Pl(this,n,e);var i=n.extend_(this,e,t,r);return i&&Cl(this,n,e),i},t.defineProperty_=function(e,t,n){void 0===n&&(n=!1),zo(this.keysAtom_);try{Jo();var r=this.delete_(e);if(!r)return r;if(Wa(this)){var i=Ka(this,{object:this.proxy_||this.target_,name:e,type:pl,newValue:t.value});if(!i)return null;var s=i.newValue;t.value!==s&&(t=ms({},t,{value:s}))}if(n){if(!Reflect.defineProperty(this.target_,e,t))return!1}else Li(this.target_,e,t);this.notifyPropertyAddition_(e,t.value)}finally{ea()}return!0},t.defineObservableProperty_=function(e,t,n,r){void 0===r&&(r=!1),zo(this.keysAtom_);try{Jo();var i=this.delete_(e);if(!i)return i;if(Wa(this)){var s=Ka(this,{object:this.proxy_||this.target_,name:e,type:pl,newValue:t});if(!s)return null;t=s.newValue}var o=Ol(e),a={configurable:!Ko.safeDescriptors||this.isPlainObject_,enumerable:!0,get:o.get,set:o.set};if(r){if(!Reflect.defineProperty(this.target_,e,a))return!1}else Li(this.target_,e,a);var l=new Ro(t,n,"production"!==process.env.NODE_ENV?this.name_+"."+e.toString():"ObservableObject.key",!1);this.values_.set(e,l),this.notifyPropertyAddition_(e,l.value_)}finally{ea()}return!0},t.defineComputedProperty_=function(e,t,n){void 0===n&&(n=!1),zo(this.keysAtom_);try{Jo();var r=this.delete_(e);if(!r)return r;if(Wa(this))if(!Ka(this,{object:this.proxy_||this.target_,name:e,type:pl,newValue:void 0}))return null;t.name||(t.name="production"!==process.env.NODE_ENV?this.name_+"."+e.toString():"ObservableObject.key"),t.context=this.proxy_||this.target_;var i=Ol(e),s={configurable:!Ko.safeDescriptors||this.isPlainObject_,enumerable:!1,get:i.get,set:i.set};if(n){if(!Reflect.defineProperty(this.target_,e,s))return!1}else Li(this.target_,e,s);this.values_.set(e,new Co(t)),this.notifyPropertyAddition_(e,void 0)}finally{ea()}return!0},t.delete_=function(e,t){if(void 0===t&&(t=!1),zo(this.keysAtom_),!us(this.target_,e))return!0;if(Wa(this)&&!Ka(this,{object:this.proxy_||this.target_,name:e,type:Al}))return null;try{var n;Jo();var r,i=Xa(this),s="production"!==process.env.NODE_ENV&&ha(),o=this.values_.get(e),a=void 0;if(!o&&(i||s))a=null==(r=zi(this.target_,e))?void 0:r.value;if(t){if(!Reflect.deleteProperty(this.target_,e))return!1}else delete this.target_[e];if("production"!==process.env.NODE_ENV&&delete this.appliedAnnotations_[e],o&&(this.values_.delete(e),o instanceof Ro&&(a=o.value_),na(o)),this.keysAtom_.reportChanged(),null==(n=this.pendingKeys_)||null==(n=n.get(e))||n.set(e in this.target_),i||s){var l={type:Al,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:a,name:e};"production"!==process.env.NODE_ENV&&s&&fa(l),i&&Qa(this,l),"production"!==process.env.NODE_ENV&&s&&ga()}}finally{ea()}return!0},t.observe_=function(e,t){return"production"!==process.env.NODE_ENV&&!0===t&&Ni("`observe` doesn't support the fire immediately property for observable objects."),Ya(this,e)},t.intercept_=function(e){return Za(this,e)},t.notifyPropertyAddition_=function(e,t){var n,r=Xa(this),i="production"!==process.env.NODE_ENV&&ha();if(r||i){var s=r||i?{type:pl,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:e,newValue:t}:null;"production"!==process.env.NODE_ENV&&i&&fa(s),r&&Qa(this,s),"production"!==process.env.NODE_ENV&&i&&ga()}null==(n=this.pendingKeys_)||null==(n=n.get(e))||n.set(!0),this.keysAtom_.reportChanged()},t.ownKeys_=function(){return this.keysAtom_.reportObserved(),os(this.target_)},t.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},e}();function Tl(e,t){var n;if("production"!==process.env.NODE_ENV&&t&&Rl(e)&&Ni("Options can't be provided for already observable objects."),us(e,Ss))return"production"===process.env.NODE_ENV||$l(e)instanceof Sl||Ni("Cannot convert '"+ql(e)+"' into observable object:\nThe target is already observable of different type.\nExtending builtins is not supported."),e;"production"===process.env.NODE_ENV||Object.isExtensible(e)||Ni("Cannot make the designated object observable; it is not extensible");var r=null!=(n=null==t?void 0:t.name)?n:"production"!==process.env.NODE_ENV?(Qi(e)?"ObservableObject":e.constructor.name)+"@"+Hi():"ObservableObject",i=new Sl(e,new Map,String(r),function(e){var t;return e?null!=(t=e.defaultDecorator)?t:eo(e):void 0}(t));return es(e,Ss,i),e}var kl=ns("ObservableObjectAdministration",Sl);function Ol(e){return El[e]||(El[e]={get:function(){return this[Ss].getObservablePropValue_(e)},set:function(t){return this[Ss].setObservablePropValue_(e,t)}})}function Rl(e){return!!Yi(e)&&kl(e[Ss])}function Cl(e,t,n){var r;"production"!==process.env.NODE_ENV&&(e.appliedAnnotations_[n]=t),null==(r=e.target_[bs])||delete r[n]}function Pl(e,t,n){if("production"===process.env.NODE_ENV||tu(t)||Ni("Cannot annotate '"+e.name_+"."+n.toString()+"': Invalid annotation."),"production"!==process.env.NODE_ENV&&!Ns(t)&&us(e.appliedAnnotations_,n)){var r=e.name_+"."+n.toString(),i=e.appliedAnnotations_[n].annotationType_;Ni("Cannot apply '"+t.annotationType_+"' to '"+r+"':\nThe field is already annotated with '"+i+"'.\nRe-annotating fields is not allowed.\nUse 'override' annotation for methods overridden by subclass.")}}var Ml,Nl,Dl=jl(0),Fl=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,!1===e}(),Il=0,zl=function(){};Ml=zl,Nl=Array.prototype,Object.setPrototypeOf?Object.setPrototypeOf(Ml.prototype,Nl):void 0!==Ml.prototype.__proto__?Ml.prototype.__proto__=Nl:Ml.prototype=Nl;var Ll=function(e){function t(t,n,r,i){var s;return void 0===r&&(r="production"!==process.env.NODE_ENV?"ObservableArray@"+Hi():"ObservableArray"),void 0===i&&(i=!1),s=e.call(this)||this,Hl(function(){var e=new il(r,n,i,!0);e.proxy_=s,ts(s,Ss,e),t&&t.length&&s.spliceWithArray(0,0,t),Fl&&Object.defineProperty(s,"0",Dl)}),s}_s(t,e);var n=t.prototype;return n.concat=function(){this[Ss].atom_.reportObserved();for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Array.prototype.concat.apply(this.slice(),t.map(function(e){return dl(e)?e.slice():e}))},n[Symbol.iterator]=function(){var e=this,t=0;return Jl({next:function(){return t<e.length?{value:e[t++],done:!1}:{done:!0,value:void 0}}})},ps(t,[{key:"length",get:function(){return this[Ss].getArrayLength_()},set:function(e){this[Ss].setArrayLength_(e)}},{key:Symbol.toStringTag,get:function(){return"Array"}}])}(zl);function jl(e){return{enumerable:!1,configurable:!0,get:function(){return this[Ss].get_(e)},set:function(t){this[Ss].set_(e,t)}}}function Vl(e){Li(Ll.prototype,""+e,jl(e))}function Ul(e){if(e>Il){for(var t=Il;t<e+100;t++)Vl(t);Il=e}}function Bl(e,t,n){return new Ll(e,t,n)}function Gl(e,t){if("object"==typeof e&&null!==e){if(dl(e))return void 0!==t&&Ni(23),e[Ss].atom_;if(xl(e))return e.atom_;if(_l(e)){if(void 0===t)return e.keysAtom_;var n=e.data_.get(t)||e.hasMap_.get(t);return n||Ni(25,t,ql(e)),n}if(Rl(e)){if(!t)return Ni(26);var r=e[Ss].values_.get(t);return r||Ni(27,t,ql(e)),r}if(ks(e)||No(e)||ca(e))return e}else if(Ki(e)&&ca(e[Ss]))return e[Ss];Ni(28)}function $l(e,t){return e||Ni(29),ks(e)||No(e)||ca(e)||_l(e)||xl(e)?e:e[Ss]?e[Ss]:void Ni(24,e)}function ql(e,t){var n;if(void 0!==t)n=Gl(e,t);else{if(Sa(e))return e.name;n=Rl(e)||_l(e)||xl(e)?$l(e):Gl(e)}return n.name_}function Hl(e){var t=Uo(),n=ko(!0);Jo();try{return e()}finally{ea(),Oo(n),Bo(t)}}Object.entries(ol).forEach(function(e){var t=e[0],n=e[1];"concat"!==t&&es(Ll.prototype,t,n)}),Ul(1e3);var Wl,Zl=ji.toString;function Kl(e,t,n){return void 0===n&&(n=-1),Xl(e,t,n)}function Xl(e,t,n,r,i){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var s=typeof e;if("function"!==s&&"object"!==s&&"object"!=typeof t)return!1;var o=Zl.call(e);if(o!==Zl.call(t))return!1;switch(o){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0===+e?1/+e==1/t:+e===+t;case"[object Date]":case"[object Boolean]":return+e===+t;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t);case"[object Map]":case"[object Set]":n>=0&&n++}e=Yl(e),t=Yl(t);var a="[object Array]"===o;if(!a){if("object"!=typeof e||"object"!=typeof t)return!1;var l=e.constructor,u=t.constructor;if(l!==u&&!(Ki(l)&&l instanceof l&&Ki(u)&&u instanceof u)&&"constructor"in e&&"constructor"in t)return!1}if(0===n)return!1;n<0&&(n=-1),i=i||[];for(var c=(r=r||[]).length;c--;)if(r[c]===e)return i[c]===t;if(r.push(e),i.push(t),a){if((c=e.length)!==t.length)return!1;for(;c--;)if(!Xl(e[c],t[c],n-1,r,i))return!1}else{var h=Object.keys(e),d=h.length;if(Object.keys(t).length!==d)return!1;for(var f=0;f<d;f++){var p=h[f];if(!us(t,p)||!Xl(e[p],t[p],n-1,r,i))return!1}}return r.pop(),i.pop(),!0}function Yl(e){return dl(e)?e.slice():rs(e)||_l(e)||is(e)||xl(e)?Array.from(e.entries()):e}var Ql=(null==(Wl=Fi().Iterator)?void 0:Wl.prototype)||{};function Jl(e){return e[Symbol.iterator]=eu,Object.assign(Object.create(Ql),e)}function eu(){return this}function tu(e){return e instanceof Object&&"string"==typeof e.annotationType_&&Ki(e.make_)&&Ki(e.extend_)}["Symbol","Map","Set"].forEach(function(e){void 0===Fi()[e]&&Ni("MobX requires global '"+e+"' to be available or polyfilled")}),"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:function(e){return"production"===process.env.NODE_ENV?(console.warn("[mobx.spy] Is a no-op in production builds"),function(){}):(Ko.spyListeners.push(e),Wi(function(){Ko.spyListeners=Ko.spyListeners.filter(function(t){return t!==e})}))},extras:{getDebugName:ql},$mobx:Ss});class nu{constructor(){el(this)}_visible=_o.map();getIsVisible(e){return this._visible.get(e)??!1}_setVisible({name:e,value:t}){this._visible.set(e,t)}openModal(e){this._setVisible({name:e,value:!0})}closeModal(e){this._setVisible({name:e,value:!1})}closeAllModals(){this._visible.clear()}}class ru{constructor(){el(this)}_isUnauthorized=!1;get isUnauthorized(){return this._isUnauthorized}set isUnauthorized(e){this._isUnauthorized=e}}const iu=new class{authStore=new ru;modalStore=new nu},su=n.createContext(iu),ou=({children:t})=>e(su.Provider,{value:iu,children:t}),au=()=>{const e=n.useContext(su);if(null===e)throw new Error("You have forgotten to wrap your root component with RootStoreProvider");return e};function lu(e,t){return function(){return e.apply(t,arguments)}}const{toString:uu}=Object.prototype,{getPrototypeOf:cu}=Object,{iterator:hu,toStringTag:du}=Symbol,fu=(pu=Object.create(null),e=>{const t=uu.call(e);return pu[t]||(pu[t]=t.slice(8,-1).toLowerCase())});var pu;const gu=e=>(e=e.toLowerCase(),t=>fu(t)===e),mu=e=>t=>typeof t===e,{isArray:_u}=Array,yu=mu("undefined");function vu(e){return null!==e&&!yu(e)&&null!==e.constructor&&!yu(e.constructor)&&wu(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const bu=gu("ArrayBuffer");const xu=mu("string"),wu=mu("function"),Eu=mu("number"),Au=e=>null!==e&&"object"==typeof e,Su=e=>{if("object"!==fu(e))return!1;const t=cu(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||du in e||hu in e)},Tu=gu("Date"),ku=gu("File"),Ou=gu("Blob"),Ru=gu("FileList"),Cu=gu("URLSearchParams"),[Pu,Mu,Nu,Du]=["ReadableStream","Request","Response","Headers"].map(gu);function Fu(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,i;if("object"!=typeof e&&(e=[e]),_u(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(vu(e))return;const i=n?Object.getOwnPropertyNames(e):Object.keys(e),s=i.length;let o;for(r=0;r<s;r++)o=i[r],t.call(null,e[o],o,e)}}function Iu(e,t){if(vu(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r,i=n.length;for(;i-- >0;)if(r=n[i],t===r.toLowerCase())return r;return null}const zu="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Lu=e=>!yu(e)&&e!==zu;const ju=(Vu="undefined"!=typeof Uint8Array&&cu(Uint8Array),e=>Vu&&e instanceof Vu);var Vu;const Uu=gu("HTMLFormElement"),Bu=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Gu=gu("RegExp"),$u=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Fu(n,(n,i)=>{let s;!1!==(s=t(n,i,e))&&(r[i]=s||n)}),Object.defineProperties(e,r)};const qu=gu("AsyncFunction"),Hu=(Wu="function"==typeof setImmediate,Zu=wu(zu.postMessage),Wu?setImmediate:Zu?(Ku=`axios@${Math.random()}`,Xu=[],zu.addEventListener("message",({source:e,data:t})=>{e===zu&&t===Ku&&Xu.length&&Xu.shift()()},!1),e=>{Xu.push(e),zu.postMessage(Ku,"*")}):e=>setTimeout(e));var Wu,Zu,Ku,Xu;const Yu="undefined"!=typeof queueMicrotask?queueMicrotask.bind(zu):"undefined"!=typeof process&&process.nextTick||Hu;var Qu={isArray:_u,isArrayBuffer:bu,isBuffer:vu,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||wu(e.append)&&("formdata"===(t=fu(e))||"object"===t&&wu(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&bu(e.buffer),t},isString:xu,isNumber:Eu,isBoolean:e=>!0===e||!1===e,isObject:Au,isPlainObject:Su,isEmptyObject:e=>{if(!Au(e)||vu(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:Pu,isRequest:Mu,isResponse:Nu,isHeaders:Du,isUndefined:yu,isDate:Tu,isFile:ku,isBlob:Ou,isRegExp:Gu,isFunction:wu,isStream:e=>Au(e)&&wu(e.pipe),isURLSearchParams:Cu,isTypedArray:ju,isFileList:Ru,forEach:Fu,merge:function e(){const{caseless:t,skipUndefined:n}=Lu(this)&&this||{},r={},i=(i,s)=>{const o=t&&Iu(r,s)||s;Su(r[o])&&Su(i)?r[o]=e(r[o],i):Su(i)?r[o]=e({},i):_u(i)?r[o]=i.slice():n&&yu(i)||(r[o]=i)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&Fu(arguments[e],i);return r},extend:(e,t,n,{allOwnKeys:r}={})=>(Fu(t,(t,r)=>{n&&wu(t)?e[r]=lu(t,n):e[r]=t},{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let i,s,o;const a={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)o=i[s],r&&!r(o,e,t)||a[o]||(t[o]=e[o],a[o]=!0);e=!1!==n&&cu(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:fu,kindOfTest:gu,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(_u(e))return e;let t=e.length;if(!Eu(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[hu]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:Uu,hasOwnProperty:Bu,hasOwnProp:Bu,reduceDescriptors:$u,freezeMethods:e=>{$u(e,(t,n)=>{if(wu(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];wu(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return _u(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:Iu,global:zu,isContextDefined:Lu,isSpecCompliantForm:function(e){return!!(e&&wu(e.append)&&"FormData"===e[du]&&e[hu])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(Au(e)){if(t.indexOf(e)>=0)return;if(vu(e))return e;if(!("toJSON"in e)){t[r]=e;const i=_u(e)?[]:{};return Fu(e,(e,t)=>{const s=n(e,r+1);!yu(s)&&(i[t]=s)}),t[r]=void 0,i}}return e};return n(e,0)},isAsyncFn:qu,isThenable:e=>e&&(Au(e)||wu(e))&&wu(e.then)&&wu(e.catch),setImmediate:Hu,asap:Yu,isIterable:e=>null!=e&&wu(e[hu])};function Ju(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}Qu.inherits(Ju,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Qu.toJSONObject(this.config),code:this.code,status:this.status}}});const ec=Ju.prototype,tc={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{tc[e]={value:e}}),Object.defineProperties(Ju,tc),Object.defineProperty(ec,"isAxiosError",{value:!0}),Ju.from=(e,t,n,r,i,s)=>{const o=Object.create(ec);Qu.toFlatObject(e,o,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e);const a=e&&e.message?e.message:"Error",l=null==t&&e?e.code:t;return Ju.call(o,a,l,n,r,i),e&&null==o.cause&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",s&&Object.assign(o,s),o};function nc(e){return Qu.isPlainObject(e)||Qu.isArray(e)}function rc(e){return Qu.endsWith(e,"[]")?e.slice(0,-2):e}function ic(e,t,n){return e?e.concat(t).map(function(e,t){return e=rc(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const sc=Qu.toFlatObject(Qu,{},null,function(e){return/^is[A-Z]/.test(e)});function oc(e,t,n){if(!Qu.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=Qu.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!Qu.isUndefined(t[e])})).metaTokens,i=n.visitor||u,s=n.dots,o=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&Qu.isSpecCompliantForm(t);if(!Qu.isFunction(i))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(Qu.isDate(e))return e.toISOString();if(Qu.isBoolean(e))return e.toString();if(!a&&Qu.isBlob(e))throw new Ju("Blob is not supported. Use a Buffer instead.");return Qu.isArrayBuffer(e)||Qu.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,i){let a=e;if(e&&!i&&"object"==typeof e)if(Qu.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(Qu.isArray(e)&&function(e){return Qu.isArray(e)&&!e.some(nc)}(e)||(Qu.isFileList(e)||Qu.endsWith(n,"[]"))&&(a=Qu.toArray(e)))return n=rc(n),a.forEach(function(e,r){!Qu.isUndefined(e)&&null!==e&&t.append(!0===o?ic([n],r,s):null===o?n:n+"[]",l(e))}),!1;return!!nc(e)||(t.append(ic(i,n,s),l(e)),!1)}const c=[],h=Object.assign(sc,{defaultVisitor:u,convertValue:l,isVisitable:nc});if(!Qu.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!Qu.isUndefined(n)){if(-1!==c.indexOf(n))throw Error("Circular reference detected in "+r.join("."));c.push(n),Qu.forEach(n,function(n,s){!0===(!(Qu.isUndefined(n)||null===n)&&i.call(t,n,Qu.isString(s)?s.trim():s,r,h))&&e(n,r?r.concat(s):[s])}),c.pop()}}(e),t}function ac(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function lc(e,t){this._pairs=[],e&&oc(e,this,t)}const uc=lc.prototype;function cc(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function hc(e,t,n){if(!t)return e;const r=n&&n.encode||cc;Qu.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let s;if(s=i?i(t,n):Qu.isURLSearchParams(t)?t.toString():new lc(t,n).toString(r),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}uc.append=function(e,t){this._pairs.push([e,t])},uc.toString=function(e){const t=e?function(t){return e.call(this,t,ac)}:ac;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};class dc{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Qu.forEach(this.handlers,function(t){null!==t&&e(t)})}}var fc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},pc={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:lc,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const gc="undefined"!=typeof window&&"undefined"!=typeof document,mc="object"==typeof navigator&&navigator||void 0,_c=gc&&(!mc||["ReactNative","NativeScript","NS"].indexOf(mc.product)<0),yc="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,vc=gc&&window.location.href||"http://localhost";var bc={...Object.freeze({__proto__:null,hasBrowserEnv:gc,hasStandardBrowserEnv:_c,hasStandardBrowserWebWorkerEnv:yc,navigator:mc,origin:vc}),...pc};function xc(e){function t(e,n,r,i){let s=e[i++];if("__proto__"===s)return!0;const o=Number.isFinite(+s),a=i>=e.length;if(s=!s&&Qu.isArray(r)?r.length:s,a)return Qu.hasOwnProp(r,s)?r[s]=[r[s],n]:r[s]=n,!o;r[s]&&Qu.isObject(r[s])||(r[s]=[]);return t(e,n,r[s],i)&&Qu.isArray(r[s])&&(r[s]=function(e){const t={},n=Object.keys(e);let r;const i=n.length;let s;for(r=0;r<i;r++)s=n[r],t[s]=e[s];return t}(r[s])),!o}if(Qu.isFormData(e)&&Qu.isFunction(e.entries)){const n={};return Qu.forEachEntry(e,(e,r)=>{t(function(e){return Qu.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,n,0)}),n}return null}const wc={transitional:fc,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,i=Qu.isObject(e);i&&Qu.isHTMLForm(e)&&(e=new FormData(e));if(Qu.isFormData(e))return r?JSON.stringify(xc(e)):e;if(Qu.isArrayBuffer(e)||Qu.isBuffer(e)||Qu.isStream(e)||Qu.isFile(e)||Qu.isBlob(e)||Qu.isReadableStream(e))return e;if(Qu.isArrayBufferView(e))return e.buffer;if(Qu.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return oc(e,new bc.classes.URLSearchParams,{visitor:function(e,t,n,r){return bc.isNode&&Qu.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((s=Qu.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return oc(s?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||r?(t.setContentType("application/json",!1),function(e,t,n){if(Qu.isString(e))try{return(t||JSON.parse)(e),Qu.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||wc.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(Qu.isResponse(e)||Qu.isReadableStream(e))return e;if(e&&Qu.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(e){if(n){if("SyntaxError"===e.name)throw Ju.from(e,Ju.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:bc.classes.FormData,Blob:bc.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Qu.forEach(["delete","get","head","post","put","patch"],e=>{wc.headers[e]={}});const Ec=Qu.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const Ac=Symbol("internals");function Sc(e){return e&&String(e).trim().toLowerCase()}function Tc(e){return!1===e||null==e?e:Qu.isArray(e)?e.map(Tc):String(e)}function kc(e,t,n,r,i){return Qu.isFunction(r)?r.call(this,t,n):(i&&(t=n),Qu.isString(t)?Qu.isString(r)?-1!==t.indexOf(r):Qu.isRegExp(r)?r.test(t):void 0:void 0)}let Oc=class{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function i(e,t,n){const i=Sc(t);if(!i)throw new Error("header name must be a non-empty string");const s=Qu.findKey(r,i);(!s||void 0===r[s]||!0===n||void 0===n&&!1!==r[s])&&(r[s||t]=Tc(e))}const s=(e,t)=>Qu.forEach(e,(e,n)=>i(e,n,t));if(Qu.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(Qu.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))s((e=>{const t={};let n,r,i;return e&&e.split("\n").forEach(function(e){i=e.indexOf(":"),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!n||t[n]&&Ec[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t})(e),t);else if(Qu.isObject(e)&&Qu.isIterable(e)){let n,r,i={};for(const t of e){if(!Qu.isArray(t))throw TypeError("Object iterator must return a key-value pair");i[r=t[0]]=(n=i[r])?Qu.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}s(i,t)}else null!=e&&i(t,e,n);return this}get(e,t){if(e=Sc(e)){const n=Qu.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(Qu.isFunction(t))return t.call(this,e,n);if(Qu.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Sc(e)){const n=Qu.findKey(this,e);return!(!n||void 0===this[n]||t&&!kc(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function i(e){if(e=Sc(e)){const i=Qu.findKey(n,e);!i||t&&!kc(0,n[i],i,t)||(delete n[i],r=!0)}}return Qu.isArray(e)?e.forEach(i):i(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const i=t[n];e&&!kc(0,this[i],i,e,!0)||(delete this[i],r=!0)}return r}normalize(e){const t=this,n={};return Qu.forEach(this,(r,i)=>{const s=Qu.findKey(n,i);if(s)return t[s]=Tc(r),void delete t[i];const o=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(i):String(i).trim();o!==i&&delete t[i],t[o]=Tc(r),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Qu.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&Qu.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[Ac]=this[Ac]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Sc(e);t[r]||(!function(e,t){const n=Qu.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})})}(n,e),t[r]=!0)}return Qu.isArray(e)?e.forEach(r):r(e),this}};function Rc(e,t){const n=this||wc,r=t||n,i=Oc.from(r.headers);let s=r.data;return Qu.forEach(e,function(e){s=e.call(n,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function Cc(e){return!(!e||!e.__CANCEL__)}function Pc(e,t,n){Ju.call(this,null==e?"canceled":e,Ju.ERR_CANCELED,t,n),this.name="CanceledError"}function Mc(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Ju("Request failed with status code "+n.status,[Ju.ERR_BAD_REQUEST,Ju.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}Oc.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Qu.reduceDescriptors(Oc.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),Qu.freezeMethods(Oc),Qu.inherits(Pc,Ju,{__CANCEL__:!0});const Nc=(e,t,n=3)=>{let r=0;const i=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i,s=0,o=0;return t=void 0!==t?t:1e3,function(a){const l=Date.now(),u=r[o];i||(i=l),n[s]=a,r[s]=l;let c=o,h=0;for(;c!==s;)h+=n[c++],c%=e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),l-i<t)return;const d=u&&l-u;return d?Math.round(1e3*h/d):void 0}}(50,250);return function(e,t){let n,r,i=0,s=1e3/t;const o=(t,s=Date.now())=>{i=s,n=null,r&&(clearTimeout(r),r=null),e(...t)};return[(...e)=>{const t=Date.now(),a=t-i;a>=s?o(e,t):(n=e,r||(r=setTimeout(()=>{r=null,o(n)},s-a)))},()=>n&&o(n)]}(n=>{const s=n.loaded,o=n.lengthComputable?n.total:void 0,a=s-r,l=i(a);r=s;e({loaded:s,total:o,progress:o?s/o:void 0,bytes:a,rate:l||void 0,estimated:l&&o&&s<=o?(o-s)/l:void 0,event:n,lengthComputable:null!=o,[t?"download":"upload"]:!0})},n)},Dc=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Fc=e=>(...t)=>Qu.asap(()=>e(...t));var Ic=bc.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,bc.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(bc.origin),bc.navigator&&/(msie|trident)/i.test(bc.navigator.userAgent)):()=>!0,zc=bc.hasStandardBrowserEnv?{write(e,t,n,r,i,s,o){if("undefined"==typeof document)return;const a=[`${e}=${encodeURIComponent(t)}`];Qu.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),Qu.isString(r)&&a.push(`path=${r}`),Qu.isString(i)&&a.push(`domain=${i}`),!0===s&&a.push("secure"),Qu.isString(o)&&a.push(`SameSite=${o}`),document.cookie=a.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function Lc(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const jc=e=>e instanceof Oc?{...e}:e;function Vc(e,t){t=t||{};const n={};function r(e,t,n,r){return Qu.isPlainObject(e)&&Qu.isPlainObject(t)?Qu.merge.call({caseless:r},e,t):Qu.isPlainObject(t)?Qu.merge({},t):Qu.isArray(t)?t.slice():t}function i(e,t,n,i){return Qu.isUndefined(t)?Qu.isUndefined(e)?void 0:r(void 0,e,0,i):r(e,t,0,i)}function s(e,t){if(!Qu.isUndefined(t))return r(void 0,t)}function o(e,t){return Qu.isUndefined(t)?Qu.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,i,s){return s in t?r(n,i):s in e?r(void 0,n):void 0}const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(e,t,n)=>i(jc(e),jc(t),0,!0)};return Qu.forEach(Object.keys({...e,...t}),function(r){const s=l[r]||i,o=s(e[r],t[r],r);Qu.isUndefined(o)&&s!==a||(n[r]=o)}),n}var Uc=e=>{const t=Vc({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:s,headers:o,auth:a}=t;if(t.headers=o=Oc.from(o),t.url=hc(Lc(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),Qu.isFormData(n))if(bc.hasStandardBrowserEnv||bc.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(Qu.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&o.set(e,n)})}if(bc.hasStandardBrowserEnv&&(r&&Qu.isFunction(r)&&(r=r(t)),r||!1!==r&&Ic(t.url))){const e=i&&s&&zc.read(s);e&&o.set(i,e)}return t};var Bc="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=Uc(e);let i=r.data;const s=Oc.from(r.headers).normalize();let o,a,l,u,c,{responseType:h,onUploadProgress:d,onDownloadProgress:f}=r;function p(){u&&u(),c&&c(),r.cancelToken&&r.cancelToken.unsubscribe(o),r.signal&&r.signal.removeEventListener("abort",o)}let g=new XMLHttpRequest;function m(){if(!g)return;const r=Oc.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders());Mc(function(e){t(e),p()},function(e){n(e),p()},{data:h&&"text"!==h&&"json"!==h?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:r,config:e,request:g}),g=null}g.open(r.method.toUpperCase(),r.url,!0),g.timeout=r.timeout,"onloadend"in g?g.onloadend=m:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(m)},g.onabort=function(){g&&(n(new Ju("Request aborted",Ju.ECONNABORTED,e,g)),g=null)},g.onerror=function(t){const r=new Ju(t&&t.message?t.message:"Network Error",Ju.ERR_NETWORK,e,g);r.event=t||null,n(r),g=null},g.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const i=r.transitional||fc;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new Ju(t,i.clarifyTimeoutError?Ju.ETIMEDOUT:Ju.ECONNABORTED,e,g)),g=null},void 0===i&&s.setContentType(null),"setRequestHeader"in g&&Qu.forEach(s.toJSON(),function(e,t){g.setRequestHeader(t,e)}),Qu.isUndefined(r.withCredentials)||(g.withCredentials=!!r.withCredentials),h&&"json"!==h&&(g.responseType=r.responseType),f&&([l,c]=Nc(f,!0),g.addEventListener("progress",l)),d&&g.upload&&([a,u]=Nc(d),g.upload.addEventListener("progress",a),g.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(o=t=>{g&&(n(!t||t.type?new Pc(null,e,g):t),g.abort(),g=null)},r.cancelToken&&r.cancelToken.subscribe(o),r.signal&&(r.signal.aborted?o():r.signal.addEventListener("abort",o)));const _=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);_&&-1===bc.protocols.indexOf(_)?n(new Ju("Unsupported protocol "+_+":",Ju.ERR_BAD_REQUEST,e)):g.send(i||null)})};const Gc=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const i=function(e){if(!n){n=!0,o();const t=e instanceof Error?e:this.reason;r.abort(t instanceof Ju?t:new Pc(t instanceof Error?t.message:t))}};let s=t&&setTimeout(()=>{s=null,i(new Ju(`timeout ${t} of ms exceeded`,Ju.ETIMEDOUT))},t);const o=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener("abort",i)}),e=null)};e.forEach(e=>e.addEventListener("abort",i));const{signal:a}=r;return a.unsubscribe=()=>Qu.asap(o),a}},$c=function*(e,t){let n=e.byteLength;if(n<t)return void(yield e);let r,i=0;for(;i<n;)r=i+t,yield e.slice(i,r),i=r},qc=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},Hc=(e,t,n,r)=>{const i=async function*(e,t){for await(const n of qc(e))yield*$c(n,t)}(e,t);let s,o=0,a=e=>{s||(s=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await i.next();if(t)return a(),void e.close();let s=r.byteLength;if(n){let e=o+=s;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw a(e),e}},cancel:e=>(a(e),i.return())},{highWaterMark:2})},{isFunction:Wc}=Qu,Zc=(({Request:e,Response:t})=>({Request:e,Response:t}))(Qu.global),{ReadableStream:Kc,TextEncoder:Xc}=Qu.global,Yc=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Qc=e=>{e=Qu.merge.call({skipUndefined:!0},Zc,e);const{fetch:t,Request:n,Response:r}=e,i=t?Wc(t):"function"==typeof fetch,s=Wc(n),o=Wc(r);if(!i)return!1;const a=i&&Wc(Kc),l=i&&("function"==typeof Xc?(u=new Xc,e=>u.encode(e)):async e=>new Uint8Array(await new n(e).arrayBuffer()));var u;const c=s&&a&&Yc(()=>{let e=!1;const t=new n(bc.origin,{body:new Kc,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),h=o&&a&&Yc(()=>Qu.isReadableStream(new r("").body)),d={stream:h&&(e=>e.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!d[e]&&(d[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new Ju(`Response type '${e}' is not supported`,Ju.ERR_NOT_SUPPORT,n)})});const f=async(e,t)=>{const r=Qu.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(Qu.isBlob(e))return e.size;if(Qu.isSpecCompliantForm(e)){const t=new n(bc.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Qu.isArrayBufferView(e)||Qu.isArrayBuffer(e)?e.byteLength:(Qu.isURLSearchParams(e)&&(e+=""),Qu.isString(e)?(await l(e)).byteLength:void 0)})(t):r};return async e=>{let{url:i,method:o,data:a,signal:l,cancelToken:u,timeout:p,onDownloadProgress:g,onUploadProgress:m,responseType:_,headers:y,withCredentials:v="same-origin",fetchOptions:b}=Uc(e),x=t||fetch;_=_?(_+"").toLowerCase():"text";let w=Gc([l,u&&u.toAbortSignal()],p),E=null;const A=w&&w.unsubscribe&&(()=>{w.unsubscribe()});let S;try{if(m&&c&&"get"!==o&&"head"!==o&&0!==(S=await f(y,a))){let e,t=new n(i,{method:"POST",body:a,duplex:"half"});if(Qu.isFormData(a)&&(e=t.headers.get("content-type"))&&y.setContentType(e),t.body){const[e,n]=Dc(S,Nc(Fc(m)));a=Hc(t.body,65536,e,n)}}Qu.isString(v)||(v=v?"include":"omit");const t=s&&"credentials"in n.prototype,l={...b,signal:w,method:o.toUpperCase(),headers:y.normalize().toJSON(),body:a,duplex:"half",credentials:t?v:void 0};E=s&&new n(i,l);let u=await(s?x(E,b):x(i,l));const p=h&&("stream"===_||"response"===_);if(h&&(g||p&&A)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=u[t]});const t=Qu.toFiniteNumber(u.headers.get("content-length")),[n,i]=g&&Dc(t,Nc(Fc(g),!0))||[];u=new r(Hc(u.body,65536,n,()=>{i&&i(),A&&A()}),e)}_=_||"text";let T=await d[Qu.findKey(d,_)||"text"](u,e);return!p&&A&&A(),await new Promise((t,n)=>{Mc(t,n,{data:T,headers:Oc.from(u.headers),status:u.status,statusText:u.statusText,config:e,request:E})})}catch(t){if(A&&A(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new Ju("Network Error",Ju.ERR_NETWORK,e,E),{cause:t.cause||t});throw Ju.from(t,t&&t.code,e,E)}}},Jc=new Map,eh=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:i}=t,s=[r,i,n];let o,a,l=s.length,u=Jc;for(;l--;)o=s[l],a=u.get(o),void 0===a&&u.set(o,a=l?new Map:Qc(t)),u=a;return a};eh();const th={http:null,xhr:Bc,fetch:{get:eh}};Qu.forEach(th,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const nh=e=>`- ${e}`,rh=e=>Qu.isFunction(e)||null===e||!1===e;var ih={getAdapter:function(e,t){e=Qu.isArray(e)?e:[e];const{length:n}=e;let r,i;const s={};for(let o=0;o<n;o++){let n;if(r=e[o],i=r,!rh(r)&&(i=th[(n=String(r)).toLowerCase()],void 0===i))throw new Ju(`Unknown adapter '${n}'`);if(i&&(Qu.isFunction(i)||(i=i.get(t))))break;s[n||"#"+o]=i}if(!i){const e=Object.entries(s).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new Ju("There is no suitable adapter to dispatch the request "+(n?e.length>1?"since :\n"+e.map(nh).join("\n"):" "+nh(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return i},adapters:th};function sh(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Pc(null,e)}function oh(e){sh(e),e.headers=Oc.from(e.headers),e.data=Rc.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return ih.getAdapter(e.adapter||wc.adapter,e)(e).then(function(t){return sh(e),t.data=Rc.call(e,e.transformResponse,t),t.headers=Oc.from(t.headers),t},function(t){return Cc(t)||(sh(e),t&&t.response&&(t.response.data=Rc.call(e,e.transformResponse,t.response),t.response.headers=Oc.from(t.response.headers))),Promise.reject(t)})}const ah="1.13.2",lh={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{lh[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const uh={};lh.transitional=function(e,t,n){function r(e,t){return"[Axios v"+ah+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,i,s)=>{if(!1===e)throw new Ju(r(i," has been removed"+(t?" in "+t:"")),Ju.ERR_DEPRECATED);return t&&!uh[i]&&(uh[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,s)}},lh.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};var ch={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Ju("options must be an object",Ju.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const s=r[i],o=t[s];if(o){const t=e[s],n=void 0===t||o(t,s,e);if(!0!==n)throw new Ju("option "+s+" must be "+n,Ju.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new Ju("Unknown option "+s,Ju.ERR_BAD_OPTION)}},validators:lh};const hh=ch.validators;let dh=class{constructor(e){this.defaults=e||{},this.interceptors={request:new dc,response:new dc}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Vc(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:i}=t;void 0!==n&&ch.assertOptions(n,{silentJSONParsing:hh.transitional(hh.boolean),forcedJSONParsing:hh.transitional(hh.boolean),clarifyTimeoutError:hh.transitional(hh.boolean)},!1),null!=r&&(Qu.isFunction(r)?t.paramsSerializer={serialize:r}:ch.assertOptions(r,{encode:hh.function,serialize:hh.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),ch.assertOptions(t,{baseUrl:hh.spelling("baseURL"),withXsrfToken:hh.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=i&&Qu.merge(i.common,i[t.method]);i&&Qu.forEach(["delete","get","head","post","put","patch","common"],e=>{delete i[e]}),t.headers=Oc.concat(s,i);const o=[];let a=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,o.unshift(e.fulfilled,e.rejected))});const l=[];let u;this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let c,h=0;if(!a){const e=[oh.bind(this),void 0];for(e.unshift(...o),e.push(...l),c=e.length,u=Promise.resolve(t);h<c;)u=u.then(e[h++],e[h++]);return u}c=o.length;let d=t;for(;h<c;){const e=o[h++],t=o[h++];try{d=e(d)}catch(e){t.call(this,e);break}}try{u=oh.call(this,d)}catch(e){return Promise.reject(e)}for(h=0,c=l.length;h<c;)u=u.then(l[h++],l[h++]);return u}getUri(e){return hc(Lc((e=Vc(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};Qu.forEach(["delete","get","head","options"],function(e){dh.prototype[e]=function(t,n){return this.request(Vc(n||{},{method:e,url:t,data:(n||{}).data}))}}),Qu.forEach(["post","put","patch"],function(e){function t(t){return function(n,r,i){return this.request(Vc(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}dh.prototype[e]=t(),dh.prototype[e+"Form"]=t(!0)});const fh={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(fh).forEach(([e,t])=>{fh[t]=e});const ph=function e(t){const n=new dh(t),r=lu(dh.prototype.request,n);return Qu.extend(r,dh.prototype,n,{allOwnKeys:!0}),Qu.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Vc(t,n))},r}(wc);ph.Axios=dh,ph.CanceledError=Pc,ph.CancelToken=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new Pc(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;const n=new e(function(e){t=e});return{token:n,cancel:t}}},ph.isCancel=Cc,ph.VERSION=ah,ph.toFormData=oc,ph.AxiosError=Ju,ph.Cancel=ph.CanceledError,ph.all=function(e){return Promise.all(e)},ph.spread=function(e){return function(t){return e.apply(null,t)}},ph.isAxiosError=function(e){return Qu.isObject(e)&&!0===e.isAxiosError},ph.mergeConfig=Vc,ph.AxiosHeaders=Oc,ph.formToJSON=e=>xc(Qu.isHTMLForm(e)?new FormData(e):e),ph.getAdapter=ih.getAdapter,ph.HttpStatusCode=fh,ph.default=ph;const{Axios:gh,AxiosError:mh,CanceledError:_h,isCancel:yh,CancelToken:vh,VERSION:bh,all:xh,Cancel:wh,isAxiosError:Eh,spread:Ah,toFormData:Sh,AxiosHeaders:Th,HttpStatusCode:kh,formToJSON:Oh,getAdapter:Rh,mergeConfig:Ch}=ph;class Ph{client;constructor(e){this.client=ph.create({baseURL:e,timeout:1e4,headers:{"Content-Type":"application/json"}}),this.setupInterceptors()}setupInterceptors(){this.client.interceptors.request.use(e=>(iu.authStore.isUnauthorized=!1,e),e=>Promise.reject(e)),this.client.interceptors.response.use(e=>e,e=>(401===e.status&&(iu.authStore.isUnauthorized=!0),Promise.reject(e)))}async get({url:e,config:t}){return(await this.client.get(e,t)).data}async post({url:e,body:t,config:n}){return(await this.client.post(e,t,n)).data}async put({url:e,body:t,config:n}){return(await this.client.put(e,t,n)).data}async patch({url:e,body:t,config:n}){return(await this.client.patch(e,t,n)).data}async delete({url:e,config:t}){return(await this.client.delete(e,t)).data}}const Mh=e=>new Ph(e);class Nh{_apiService;get apiService(){return this._apiService}static _instance=null;static get instance(){if(!Nh._instance)throw new Error("Dartcom Config не инициализирован с приватным ключом. Вызовите Config.initialize(...) первым, чтобы иметь возможность пользоваться компонентами нашей библиотеки");return Nh._instance}static initialize(e){Nh._instance||(Nh._instance=new Nh(e))}static deactivate(){this._instance=null}constructor({apiKey:e,backendUrl:t,onCheck:n}){this._apiKey=e,this._apiService=Mh(t),this._getCheckKeyData().then(e=>{if(e){const{valid:t}=e;n?.(e),this.isValidApiKey=t}})}_apiKey="";_isValidApiKey=!1;get isValidApiKey(){return this._isValidApiKey}set isValidApiKey(e){this._isValidApiKey=e}async _getCheckKeyData(){const e=await this._apiService.get({url:"check_tile_token",config:{params:{tile_token:this._apiKey}}}).then(e=>e).catch(({response:e})=>{if(e){const{data:{detail:t}}=e;return t}});return e}}const Dh={valid:"18c38ab326d12f428e90be50a5141fc8949de497df7f7e0c1796d58e99d006f3",dateExpired:"8cbc5e15e61e649daf57c3a08422ae372c101afb4759036a3864a9fa588ef717",off:"b1520018920b33a4c1f8100c4f3bb3eb93661db829faa99c9cd75537f6300ba9",invalid:"abcdefghijklmnopqrstuvwxyz0123456789"};const Fh=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)}};var Ih,zh;!function(e){e.GET="GET",e.DELETE="DELETE",e.PUT="PUT",e.POST="POST"}(Ih||(Ih={})),function(e){e.TOP_RIGHT="top-right",e.BOTTOM_RIGHT="bottom-right",e.BOTTOM_LEFT="bottom-left",e.TOP_LEFT="top-left"}(zh||(zh={}));const Lh="https://dalganmap.ru/api";function jh(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=jh(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Vh(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=jh(e))&&(r&&(r+=" "),r+=t);return r}let Uh={data:""},Bh=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Gh=/\/\*[^]*?\*\/| +/g,$h=/\n+/g,qh=(e,t)=>{let n="",r="",i="";for(let s in e){let o=e[s];"@"==s[0]?"i"==s[1]?n=s+" "+o+";":r+="f"==s[1]?qh(o,s):s+"{"+qh(o,"k"==s[1]?"":t)+"}":"object"==typeof o?r+=qh(o,t?t.replace(/([^,])+/g,e=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):s):null!=o&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=qh.p?qh.p(s,o):s+":"+o+";")}return n+(t&&i?t+"{"+i+"}":i)+r},Hh={},Wh=e=>{if("object"==typeof e){let t="";for(let n in e)t+=n+Wh(e[n]);return t}return e},Zh=(e,t,n,r,i)=>{let s=Wh(e),o=Hh[s]||(Hh[s]=(e=>{let t=0,n=11;for(;t<e.length;)n=101*n+e.charCodeAt(t++)>>>0;return"go"+n})(s));if(!Hh[o]){let t=s!==e?e:(e=>{let t,n,r=[{}];for(;t=Bh.exec(e.replace(Gh,""));)t[4]?r.shift():t[3]?(n=t[3].replace($h," ").trim(),r.unshift(r[0][n]=r[0][n]||{})):r[0][t[1]]=t[2].replace($h," ").trim();return r[0]})(e);Hh[o]=qh(i?{["@keyframes "+o]:t}:t,n?"":"."+o)}let a=n&&Hh.g?Hh.g:null;return n&&(Hh.g=Hh[o]),((e,t,n,r)=>{r?t.data=t.data.replace(r,e):-1===t.data.indexOf(e)&&(t.data=n?e+t.data:t.data+e)})(Hh[o],t,r,a),o};function Kh(e){let t=this||{},n=e.call?e(t.p):e;return Zh(n.unshift?n.raw?((e,t,n)=>e.reduce((e,r,i)=>{let s=t[i];if(s&&s.call){let e=s(n),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;s=t?"."+t:e&&"object"==typeof e?e.props?"":qh(e,""):!1===e?"":e}return e+r+(null==s?"":s)},""))(n,[].slice.call(arguments,1),t.p):n.reduce((e,n)=>Object.assign(e,n&&n.call?n(t.p):n),{}):n,(e=>{if("object"==typeof window){let t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||Uh})(t.target),t.g,t.o,t.k)}function Xh(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}function Yh(){return Yh=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yh.apply(this,arguments)}function Qh(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Jh(e,t){if(null==e)return{};var n,r,i={},s=Object.keys(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function ed(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}Kh.bind({g:1}),Kh.bind({k:1});var td=function(){return""},nd=r.createContext({enqueueSnackbar:td,closeSnackbar:td}),rd="@media (max-width:599.95px)",id="@media (min-width:600px)",sd=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},od=function(e){return""+sd(e.vertical)+sd(e.horizontal)},ad=function(e){return!!e||0===e},ld="unmounted",ud="exited",cd="entering",hd="entered",dd="exiting",fd=function(e){function t(t){var n;n=e.call(this,t)||this;var r,i=t.appear;return n.appearStatus=null,t.in?i?(r=ud,n.appearStatus=cd):r=hd:r=t.unmountOnExit||t.mountOnEnter?ld:ud,n.state={status:r},n.nextCallback=null,n}Qh(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===ld?{status:ud}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==cd&&n!==hd&&(t=cd):n!==cd&&n!==hd||(t=dd)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=e,n=e;return null!=e&&"number"!=typeof e&&"string"!=typeof e&&(n=e.exit,t=e.enter),{exit:n,enter:t}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===cd?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===ud&&this.setState({status:ld})},n.performEnter=function(e){var t=this,n=this.props.enter,r=e,i=this.getTimeouts();e||n?(this.props.onEnter&&this.props.onEnter(this.node,r),this.safeSetState({status:cd},function(){t.props.onEntering&&t.props.onEntering(t.node,r),t.onTransitionEnd(i.enter,function(){t.safeSetState({status:hd},function(){t.props.onEntered&&t.props.onEntered(t.node,r)})})})):this.safeSetState({status:hd},function(){t.props.onEntered&&t.props.onEntered(t.node,r)})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts();t?(this.props.onExit&&this.props.onExit(this.node),this.safeSetState({status:dd},function(){e.props.onExiting&&e.props.onExiting(e.node),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:ud},function(){e.props.onExited&&e.props.onExited(e.node)})})})):this.safeSetState({status:ud},function(){e.props.onExited&&e.props.onExited(e.node)})},n.cancelNextCallback=function(){null!==this.nextCallback&&this.nextCallback.cancel&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(){n&&(n=!1,t.nextCallback=null,e())},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=null==e&&!this.props.addEndListener;this.node&&!n?(this.props.addEndListener&&this.props.addEndListener(this.node,this.nextCallback),null!=e&&setTimeout(this.nextCallback,e)):setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===ld)return null;var t=this.props;return(0,t.children)(e,Jh(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]))},Xh(t,[{key:"node",get:function(){var e,t=null===(e=this.props.nodeRef)||void 0===e?void 0:e.current;if(!t)throw new Error("notistack - Custom snackbar is not refForwarding");return t}}]),t}(r.Component);function pd(){}function gd(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function md(e,t){return a(function(){return null==e&&null==t?null:function(n){gd(e,n),gd(t,n)}},[e,t])}function _d(e){var t=e.timeout,n=e.style,r=void 0===n?{}:n,i=e.mode;return{duration:"object"==typeof t?t[i]||0:t,easing:r.transitionTimingFunction,delay:r.transitionDelay}}fd.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:pd,onEntering:pd,onEntered:pd,onExit:pd,onExiting:pd,onExited:pd};var yd="cubic-bezier(0.4, 0, 0.2, 1)",vd="cubic-bezier(0.0, 0, 0.2, 1)",bd="cubic-bezier(0.4, 0, 0.6, 1)",xd=function(e){e.scrollTop=e.scrollTop},wd=function(e){return Math.round(e)+"ms"};function Ed(e,t){void 0===e&&(e=["all"]);var n=t||{},r=n.duration,i=void 0===r?300:r,s=n.easing,o=void 0===s?yd:s,a=n.delay,l=void 0===a?0:a;return(Array.isArray(e)?e:[e]).map(function(e){var t="string"==typeof i?i:wd(i),n="string"==typeof l?l:wd(l);return e+" "+t+" "+o+" "+n}).join(",")}function Ad(e){var t=function(e){return e&&e.ownerDocument||document}(e);return t.defaultView||window}function Sd(e,t){if(t){var n=function(e,t){var n,r=t.getBoundingClientRect(),i=Ad(t);if(t.fakeTransform)n=t.fakeTransform;else{var s=i.getComputedStyle(t);n=s.getPropertyValue("-webkit-transform")||s.getPropertyValue("transform")}var o=0,a=0;if(n&&"none"!==n&&"string"==typeof n){var l=n.split("(")[1].split(")")[0].split(",");o=parseInt(l[4],10),a=parseInt(l[5],10)}switch(e){case"left":return"translateX("+(i.innerWidth+o-r.left)+"px)";case"right":return"translateX(-"+(r.left+r.width-o)+"px)";case"up":return"translateY("+(i.innerHeight+a-r.top)+"px)";default:return"translateY(-"+(r.top+r.height-a)+"px)"}}(e,t);n&&(t.style.webkitTransform=n,t.style.transform=n)}}var Td=g(function(e,t){var n=e.children,r=e.direction,i=void 0===r?"down":r,a=e.in,u=e.style,c=e.timeout,h=void 0===c?0:c,d=e.onEnter,f=e.onEntered,p=e.onExit,g=e.onExited,y=Jh(e,["children","direction","in","style","timeout","onEnter","onEntered","onExit","onExited"]),v=o(null),b=md(n.ref,v),x=md(b,t),w=l(function(){v.current&&Sd(i,v.current)},[i]);return s(function(){if(!a&&"down"!==i&&"right"!==i){var e=function(e,t){var n;function r(){for(var r=this,i=arguments.length,s=new Array(i),o=0;o<i;o++)s[o]=arguments[o];clearTimeout(n),n=setTimeout(function(){e.apply(r,s)},t)}return void 0===t&&(t=166),r.clear=function(){clearTimeout(n)},r}(function(){v.current&&Sd(i,v.current)}),t=Ad(v.current);return t.addEventListener("resize",e),function(){e.clear(),t.removeEventListener("resize",e)}}},[i,a]),s(function(){a||w()},[a,w]),m(fd,Object.assign({appear:!0,nodeRef:v,onEnter:function(e,t){Sd(i,e),xd(e),d&&d(e,t)},onEntered:f,onEntering:function(e){var t=(null==u?void 0:u.transitionTimingFunction)||vd,n=_d({timeout:h,mode:"enter",style:Yh({},u,{transitionTimingFunction:t})});e.style.webkitTransition=Ed("-webkit-transform",n),e.style.transition=Ed("transform",n),e.style.webkitTransform="none",e.style.transform="none"},onExit:function(e){var t=(null==u?void 0:u.transitionTimingFunction)||bd,n=_d({timeout:h,mode:"exit",style:Yh({},u,{transitionTimingFunction:t})});e.style.webkitTransition=Ed("-webkit-transform",n),e.style.transition=Ed("transform",n),Sd(i,e),p&&p(e)},onExited:function(e){e.style.webkitTransition="",e.style.transition="",g&&g(e)},in:a,timeout:h},y),function(e,t){return _(n,Yh({ref:x,style:Yh({visibility:"exited"!==e||a?void 0:"hidden"},u,{},n.props.style)},t))})});Td.displayName="Slide";var kd=function(e){return r.createElement("svg",Object.assign({viewBox:"0 0 24 24",focusable:"false",style:{fontSize:20,marginInlineEnd:8,userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0}},e))},Od=function(){return r.createElement(kd,null,r.createElement("path",{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41\n 10.59L10 14.17L17.59 6.58L19 8L10 17Z"}))},Rd=function(){return r.createElement(kd,null,r.createElement("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"}))},Cd=function(){return r.createElement(kd,null,r.createElement("path",{d:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,\n 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,\n 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"}))},Pd=function(){return r.createElement(kd,null,r.createElement("path",{d:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,\n 0 22,12A10,10 0 0,0 12,2Z"}))},Md={maxSnack:3,persist:!1,hideIconVariant:!1,disableWindowBlurListener:!1,variant:"default",autoHideDuration:5e3,iconVariant:{default:void 0,success:r.createElement(Od,null),warning:r.createElement(Rd,null),error:r.createElement(Cd,null),info:r.createElement(Pd,null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:Td,transitionDuration:{enter:225,exit:195}},Nd=function(e,t){return function(n,r){return void 0===r&&(r=!1),r?Yh({},Md[n],{},t[n],{},e[n]):"autoHideDuration"===n?(i=e.autoHideDuration,s=t.autoHideDuration,(o=function(e){return"number"==typeof e||null===e})(i)?i:o(s)?s:Md.autoHideDuration):"transitionDuration"===n?function(e,t){var n=function(e,t){return t.some(function(t){return typeof e===t})};return n(e,["string","number"])?e:n(e,["object"])?Yh({},Md.transitionDuration,{},n(t,["object"])&&t,{},e):n(t,["string","number"])?t:n(t,["object"])?Yh({},Md.transitionDuration,{},t):Md.transitionDuration}(e.transitionDuration,t.transitionDuration):e[n]||t[n]||Md[n];var i,s,o}};function Dd(e){return Object.entries(e).reduce(function(e,t){var n,r=t[0],i=t[1];return Yh({},e,((n={})[r]=Kh(i),n))},{})}var Fd="notistack-SnackbarContainer",Id="notistack-Snackbar",zd="notistack-CollapseWrapper",Ld="notistack-MuiContent",jd=function(e){return"notistack-MuiContent-"+e},Vd=Dd({root:{height:0},entered:{height:"auto"}}),Ud="0px",Bd=g(function(e,t){var n=e.children,r=e.in,i=e.onExited,s=o(null),a=o(null),l=md(t,a),u=function(){return s.current?s.current.clientHeight:0};return m(fd,{in:r,unmountOnExit:!0,onEnter:function(e){e.style.height=Ud},onEntered:function(e){e.style.height="auto"},onEntering:function(e){var t=u(),n=_d({timeout:175,mode:"enter"}),r=n.duration,i=n.easing;e.style.transitionDuration="string"==typeof r?r:r+"ms",e.style.height=t+"px",e.style.transitionTimingFunction=i||""},onExit:function(e){e.style.height=u()+"px"},onExited:i,onExiting:function(e){xd(e);var t=_d({timeout:175,mode:"exit"}),n=t.duration,r=t.easing;e.style.transitionDuration="string"==typeof n?n:n+"ms",e.style.height=Ud,e.style.transitionTimingFunction=r||""},nodeRef:a,timeout:175},function(e,t){return m("div",Object.assign({ref:l,className:Vh(Vd.root,"entered"===e&&Vd.entered),style:Yh({pointerEvents:"all",overflow:"hidden",minHeight:Ud,transition:Ed("height")},"entered"===e&&{overflow:"visible"},{},"exited"===e&&!r&&{visibility:"hidden"})},t),m("div",{ref:s,className:zd,style:{display:"flex",width:"100%"}},n))})});Bd.displayName="Collapse";var Gd={right:"left",left:"right",bottom:"up",top:"down"},$d=function(e){return"anchorOrigin"+od(e)},qd=function(){};function Hd(e,t){return e.reduce(function(e,n){return null==n?e:function(){for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];var o=[].concat(i);t&&-1===o.indexOf(t)&&o.push(t),e.apply(this,o),n.apply(this,o)}},qd)}var Wd="undefined"!=typeof window?i:s;function Zd(e){var t=o(e);return Wd(function(){t.current=e}),l(function(){return t.current.apply(void 0,arguments)},[])}var Kd,Xd=g(function(e,t){var n=e.children,r=e.className,i=e.autoHideDuration,a=e.disableWindowBlurListener,u=void 0!==a&&a,c=e.onClose,h=e.id,d=e.open,f=e.SnackbarProps,p=void 0===f?{}:f,g=o(),_=Zd(function(){c&&c.apply(void 0,arguments)}),y=Zd(function(e){c&&null!=e&&(g.current&&clearTimeout(g.current),g.current=setTimeout(function(){_(null,"timeout",h)},e))});s(function(){return d&&y(i),function(){g.current&&clearTimeout(g.current)}},[d,i,y]);var v=function(){g.current&&clearTimeout(g.current)},b=l(function(){null!=i&&y(.5*i)},[i,y]);return s(function(){if(!u&&d)return window.addEventListener("focus",b),window.addEventListener("blur",v),function(){window.removeEventListener("focus",b),window.removeEventListener("blur",v)}},[u,b,d]),m("div",Object.assign({ref:t},p,{className:Vh(Id,r),onMouseEnter:function(e){p.onMouseEnter&&p.onMouseEnter(e),v()},onMouseLeave:function(e){p.onMouseLeave&&p.onMouseLeave(e),b()}}),n)});Xd.displayName="Snackbar";var Yd=Dd({root:(Kd={display:"flex",flexWrap:"wrap",flexGrow:1},Kd[id]={flexGrow:"initial",minWidth:"288px"},Kd)}),Qd=g(function(e,t){var n=e.className,i=Jh(e,["className"]);return r.createElement("div",Object.assign({ref:t,className:Vh(Yd.root,n)},i))});Qd.displayName="SnackbarContent";var Jd=Dd({root:{backgroundColor:"#313131",fontSize:"0.875rem",lineHeight:1.43,letterSpacing:"0.01071em",color:"#fff",alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"},lessPadding:{paddingLeft:"20px"},default:{backgroundColor:"#313131"},success:{backgroundColor:"#43a047"},error:{backgroundColor:"#d32f2f"},warning:{backgroundColor:"#ff9800"},info:{backgroundColor:"#2196f3"},message:{display:"flex",alignItems:"center",padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:"16px",marginRight:"-8px"}}),ef="notistack-snackbar",tf=g(function(e,t){var n=e.id,i=e.message,s=e.action,o=e.iconVariant,a=e.variant,l=e.hideIconVariant,u=e.style,c=e.className,h=o[a],d=s;return"function"==typeof d&&(d=d(n)),r.createElement(Qd,{ref:t,role:"alert","aria-describedby":ef,style:u,className:Vh(Ld,jd(a),Jd.root,Jd[a],c,!l&&h&&Jd.lessPadding)},r.createElement("div",{id:ef,className:Jd.message},l?null:h,i),d&&r.createElement("div",{className:Jd.action},d))});tf.displayName="MaterialDesignContent";var nf,rf,sf,of,af,lf,uf=h(tf),cf=Dd({wrappedRoot:{width:"100%",position:"relative",transform:"translateX(0)",top:0,right:0,bottom:0,left:0,minWidth:"288px"}}),hf=function(e){var t=o(),n=u(!0),i=n[0],c=n[1],h=Hd([e.snack.onClose,e.onClose]),d=l(function(){t.current=setTimeout(function(){c(function(e){return!e})},125)},[]);s(function(){return function(){t.current&&clearTimeout(t.current)}},[]);var f,p=e.snack,g=e.classes,m=e.Component,_=void 0===m?uf:m,y=a(function(){return function(e){void 0===e&&(e={});var t={containerRoot:!0,containerAnchorOriginTopCenter:!0,containerAnchorOriginBottomCenter:!0,containerAnchorOriginTopRight:!0,containerAnchorOriginBottomRight:!0,containerAnchorOriginTopLeft:!0,containerAnchorOriginBottomLeft:!0};return Object.keys(e).filter(function(e){return!t[e]}).reduce(function(t,n){var r;return Yh({},t,((r={})[n]=e[n],r))},{})}(g)},[g]),v=p.open,b=p.SnackbarProps,x=p.TransitionComponent,w=p.TransitionProps,E=p.transitionDuration,A=p.disableWindowBlurListener,S=p.content,T=Jh(p,["open","SnackbarProps","TransitionComponent","TransitionProps","transitionDuration","disableWindowBlurListener","content","entered","requestClose","onEnter","onEntered","onExit","onExited"]),k=Yh({direction:(f=T.anchorOrigin,"center"!==f.horizontal?Gd[f.horizontal]:Gd[f.vertical]),timeout:E},w),O=S;"function"==typeof O&&(O=O(T.id,T.message));var R=["onEnter","onEntered","onExit","onExited"].reduce(function(t,n){var r;return Yh({},t,((r={})[n]=Hd([e.snack[n],e[n]],T.id),r))},{});return r.createElement(Bd,{in:i,onExited:R.onExited},r.createElement(Xd,{open:v,id:T.id,disableWindowBlurListener:A,autoHideDuration:T.autoHideDuration,className:Vh(cf.wrappedRoot,y.root,y[$d(T.anchorOrigin)]),SnackbarProps:b,onClose:h},r.createElement(x,Object.assign({},k,{appear:!0,in:v,onExit:R.onExit,onExited:d,onEnter:R.onEnter,onEntered:Hd([R.onEntered,function(){e.snack.requestClose&&h(null,"instructed",e.snack.id)}],T.id)}),O||r.createElement(_,Object.assign({},T)))))},df={default:20},ff={default:6,dense:2},pf="."+zd,gf=Dd({root:(nf={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:1400,height:"auto",width:"auto",transition:Ed(["top","right","bottom","left","max-width"],{duration:300,easing:"ease"}),pointerEvents:"none"},nf[pf]={padding:ff.default+"px 0px",transition:"padding 300ms ease 0ms"},nf.maxWidth="calc(100% - "+2*df.default+"px)",nf[rd]={width:"100%",maxWidth:"calc(100% - 32px)"},nf),rootDense:(rf={},rf[pf]={padding:ff.dense+"px 0px"},rf),top:{top:df.default-ff.default+"px",flexDirection:"column"},bottom:{bottom:df.default-ff.default+"px",flexDirection:"column-reverse"},left:(sf={left:df.default+"px"},sf[id]={alignItems:"flex-start"},sf[rd]={left:"16px"},sf),right:(of={right:df.default+"px"},of[id]={alignItems:"flex-end"},of[rd]={right:"16px"},of),center:(af={left:"50%",transform:"translateX(-50%)"},af[id]={alignItems:"center"},af)}),mf=function(e){var t=e.classes,n=void 0===t?{}:t,i=e.anchorOrigin,s=e.dense,o=e.children,a=Vh(Fd,gf[i.vertical],gf[i.horizontal],gf.root,n.containerRoot,n["containerAnchorOrigin"+od(i)],s&&gf.rootDense);return r.createElement("div",{className:a},o)},_f=h(mf),yf="production"!==process.env.NODE_ENV,vf={NO_PERSIST_ALL:"Reached maxSnack while all enqueued snackbars have 'persist' flag. Notistack will dismiss the oldest snackbar anyway to allow other ones in the queue to be presented."},bf=function(e){return!("string"==typeof e||v(e))},xf=function(e){function t(t){var n;return(n=e.call(this,t)||this).enqueueSnackbar=function(e,t){if(void 0===t&&(t={}),null==e)throw new Error("enqueueSnackbar called with invalid argument");var r=bf(e)?e:t,i=bf(e)?e.message:e,s=r.key,o=r.preventDuplicate,a=Jh(r,["key","preventDuplicate"]),l=ad(s),u=l?s:(new Date).getTime()+Math.random(),c=Nd(a,n.props),h=Yh({id:u},a,{message:i,open:!0,entered:!1,requestClose:!1,persist:c("persist"),action:c("action"),content:c("content"),variant:c("variant"),anchorOrigin:c("anchorOrigin"),disableWindowBlurListener:c("disableWindowBlurListener"),autoHideDuration:c("autoHideDuration"),hideIconVariant:c("hideIconVariant"),TransitionComponent:c("TransitionComponent"),transitionDuration:c("transitionDuration"),TransitionProps:c("TransitionProps",!0),iconVariant:c("iconVariant",!0),style:c("style",!0),SnackbarProps:c("SnackbarProps",!0),className:Vh(n.props.className,a.className)});return h.persist&&(h.autoHideDuration=void 0),n.setState(function(e){if(void 0===o&&n.props.preventDuplicate||o){var t=function(e){return l?e.id===u:e.message===i},r=e.queue.findIndex(t)>-1,s=e.snacks.findIndex(t)>-1;if(r||s)return e}return n.handleDisplaySnack(Yh({},e,{queue:[].concat(e.queue,[h])}))}),u},n.handleDisplaySnack=function(e){return e.snacks.length>=n.maxSnack?n.handleDismissOldest(e):n.processQueue(e)},n.processQueue=function(e){var t=e.queue,n=e.snacks;return t.length>0?Yh({},e,{snacks:[].concat(n,[t[0]]),queue:t.slice(1,t.length)}):e},n.handleDismissOldest=function(e){if(e.snacks.some(function(e){return!e.open||e.requestClose}))return e;var t=!1,r=!1;e.snacks.reduce(function(e,t){return e+(t.open&&t.persist?1:0)},0)===n.maxSnack&&("production"!==process.env.NODE_ENV&&function(e){if(yf){var t=vf[e];"undefined"!=typeof console&&console.error("WARNING - notistack: "+t);try{throw new Error(t)}catch(e){}}}("NO_PERSIST_ALL"),r=!0);var i=e.snacks.map(function(e){return t||e.persist&&!r?Yh({},e):(t=!0,e.entered?(e.onClose&&e.onClose(null,"maxsnack",e.id),n.props.onClose&&n.props.onClose(null,"maxsnack",e.id),Yh({},e,{open:!1})):Yh({},e,{requestClose:!0}))});return Yh({},e,{snacks:i})},n.handleEnteredSnack=function(e,t,r){if(!ad(r))throw new Error("handleEnteredSnack Cannot be called with undefined key");n.setState(function(e){return{snacks:e.snacks.map(function(e){return e.id===r?Yh({},e,{entered:!0}):Yh({},e)})}})},n.handleCloseSnack=function(e,t,r){n.props.onClose&&n.props.onClose(e,t,r);var i=void 0===r;n.setState(function(e){var t=e.snacks,n=e.queue;return{snacks:t.map(function(e){return i||e.id===r?e.entered?Yh({},e,{open:!1}):Yh({},e,{requestClose:!0}):Yh({},e)}),queue:n.filter(function(e){return e.id!==r})}})},n.closeSnackbar=function(e){var t=n.state.snacks.find(function(t){return t.id===e});ad(e)&&t&&t.onClose&&t.onClose(null,"instructed",e),n.handleCloseSnack(null,"instructed",e)},n.handleExitedSnack=function(e,t){if(!ad(t))throw new Error("handleExitedSnack Cannot be called with undefined key");n.setState(function(e){var r=n.processQueue(Yh({},e,{snacks:e.snacks.filter(function(e){return e.id!==t})}));return 0===r.queue.length?r:n.handleDismissOldest(r)})},lf=n.enqueueSnackbar,n.closeSnackbar,n.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:n.enqueueSnackbar.bind(ed(n)),closeSnackbar:n.closeSnackbar.bind(ed(n))}},n}return Qh(t,e),t.prototype.render=function(){var e=this,t=this.state.contextValue,n=this.props,i=n.domRoot,s=n.children,o=n.dense,a=void 0!==o&&o,l=n.Components,u=void 0===l?{}:l,c=n.classes,h=this.state.snacks.reduce(function(e,t){var n,r=od(t.anchorOrigin),i=e[r]||[];return Yh({},e,((n={})[r]=[].concat(i,[t]),n))},{}),d=Object.keys(h).map(function(t){var n=h[t],i=n[0];return r.createElement(_f,{key:t,dense:a,anchorOrigin:i.anchorOrigin,classes:c},n.map(function(t){return r.createElement(hf,{key:t.id,snack:t,classes:c,Component:u[t.variant],onClose:e.handleCloseSnack,onEnter:e.props.onEnter,onExit:e.props.onExit,onExited:Hd([e.handleExitedSnack,e.props.onExited],t.id),onEntered:Hd([e.handleEnteredSnack,e.props.onEntered],t.id)})}))});return r.createElement(nd.Provider,{value:t},s,i?Q(d,i):d)},Xh(t,[{key:"maxSnack",get:function(){return this.props.maxSnack||Md.maxSnack}}]),t}(y);const wf=()=>{const{enqueueSnackbar:e}=f(nd);return({variant:t,message:n})=>{e({variant:t,message:n,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:3e3,hideIconVariant:!0})}},Ef=()=>{const e=wf();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})})}}}};var Af,Sf;var Tf=(Sf||(Sf=1,Af=function(){const e=["a","b","c","d","e","f","0","1","2","3","4","5","6","7","8","9"];let t=[];for(let n=0;n<36;n++)t[n]=8===n||13===n||18===n||23===n?"-":e[Math.ceil(Math.random()*e.length-1)];return t.join("")}),Af),kf=Ci(Tf);const Of=e=>{const t=(new Date).getUTCHours();return encodeURIComponent([...e].reduce((n,r,i)=>{const s=(e.charCodeAt(i)-32+t)%95+32;return n+String.fromCharCode(s)},""))},Rf=e=>Object.keys(e).reduce((t,n,r)=>`${t}${0===r?"":"&"}${n}=${e[n]}`,""),Cf=async e=>{const t=JSON.stringify(e,null,2);return await navigator.clipboard.writeText(t).then(()=>(lf?.({message:"Данные были успешно скопированы в буфер обмена",variant:"success"}),!0)).catch(()=>!1)},Pf=()=>kf();var Mf=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Nf={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Df=new class{#e=Nf;#t=!1;setTimeoutProvider(e){"production"!==process.env.NODE_ENV&&this.#t&&e!==this.#e&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:this.#e,provider:e}),this.#e=e,"production"!==process.env.NODE_ENV&&(this.#t=!1)}setTimeout(e,t){return"production"!==process.env.NODE_ENV&&(this.#t=!0),this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return"production"!==process.env.NODE_ENV&&(this.#t=!0),this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};var Ff="undefined"==typeof window||"Deno"in globalThis;function If(){}function zf(e){return"number"==typeof e&&e>=0&&e!==1/0}function Lf(e,t){return Math.max(e+(t||0)-Date.now(),0)}function jf(e,t){return"function"==typeof e?e(t):e}function Vf(e,t){return"function"==typeof e?e(t):e}function Uf(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o)if(r){if(t.queryHash!==Gf(o,t.options))return!1}else if(!qf(t.queryKey,o))return!1;if("all"!==n){const e=t.isActive();if("active"===n&&!e)return!1;if("inactive"===n&&e)return!1}return("boolean"!=typeof a||t.isStale()===a)&&((!i||i===t.state.fetchStatus)&&!(s&&!s(t)))}function Bf(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if($f(t.options.mutationKey)!==$f(s))return!1}else if(!qf(t.options.mutationKey,s))return!1}return(!r||t.state.status===r)&&!(i&&!i(t))}function Gf(e,t){return(t?.queryKeyHashFn||$f)(e)}function $f(e){return JSON.stringify(e,(e,t)=>Xf(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function qf(e,t){return e===t||typeof e==typeof t&&(!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&Object.keys(t).every(n=>qf(e[n],t[n])))}var Hf=Object.prototype.hasOwnProperty;function Wf(e,t){if(e===t)return e;const n=Kf(e)&&Kf(t);if(!(n||Xf(e)&&Xf(t)))return t;const r=(n?e:Object.keys(e)).length,i=n?t:Object.keys(t),s=i.length,o=n?new Array(s):{};let a=0;for(let l=0;l<s;l++){const s=n?l:i[l],u=e[s],c=t[s];if(u===c){o[s]=u,(n?l<r:Hf.call(e,s))&&a++;continue}if(null===u||null===c||"object"!=typeof u||"object"!=typeof c){o[s]=c;continue}const h=Wf(u,c);o[s]=h,h===u&&a++}return r===s&&a===r?e:o}function Zf(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Kf(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Xf(e){if(!Yf(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!!Yf(n)&&(!!n.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype)}function Yf(e){return"[object Object]"===Object.prototype.toString.call(e)}function Qf(e,t,n){if("function"==typeof n.structuralSharing)return n.structuralSharing(e,t);if(!1!==n.structuralSharing){if("production"!==process.env.NODE_ENV)try{return Wf(e,t)}catch(e){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${e}`),e}return Wf(e,t)}return t}function Jf(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function ep(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var tp=Symbol();function np(e,t){return"production"!==process.env.NODE_ENV&&e.queryFn===tp&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==tp?e.queryFn:()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`))}function rp(e,t){return"function"==typeof e?e(...t):!!e}var ip=new class extends Mf{#n;#r;#i;constructor(){super(),this.#i=e=>{if(!Ff&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#r||this.setEventListener(this.#i)}onUnsubscribe(){this.hasListeners()||(this.#r?.(),this.#r=void 0)}setEventListener(e){this.#i=e,this.#r?.(),this.#r=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#n!==e&&(this.#n=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#n?this.#n:"hidden"!==globalThis.document?.visibilityState}};function sp(){let e,t;const n=new Promise((n,r)=>{e=n,t=r});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.status="pending",n.catch(()=>{}),n.resolve=t=>{r({status:"fulfilled",value:t}),e(t)},n.reject=e=>{r({status:"rejected",reason:e}),t(e)},n}var op=function(e){setTimeout(e,0)};var ap=function(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=op;const s=r=>{t?e.push(r):i(()=>{n(r)})};return{batch:s=>{let o;t++;try{o=s()}finally{t--,t||(()=>{const t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})})()}return o},batchCalls:e=>(...t)=>{s(()=>{e(...t)})},schedule:s,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}(),lp=new class extends Mf{#s=!0;#r;#i;constructor(){super(),this.#i=e=>{if(!Ff&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#r||this.setEventListener(this.#i)}onUnsubscribe(){this.hasListeners()||(this.#r?.(),this.#r=void 0)}setEventListener(e){this.#i=e,this.#r?.(),this.#r=e(this.setOnline.bind(this))}setOnline(e){this.#s!==e&&(this.#s=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#s}};function up(e){return Math.min(1e3*2**e,3e4)}function cp(e){return"online"!==(e??"online")||lp.isOnline()}var hp=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function dp(e){let t,n=!1,r=0;const i=sp(),s=()=>"pending"!==i.status,o=()=>ip.isFocused()&&("always"===e.networkMode||lp.isOnline())&&e.canRun(),a=()=>cp(e.networkMode)&&e.canRun(),l=e=>{s()||(t?.(),i.resolve(e))},u=e=>{s()||(t?.(),i.reject(e))},c=()=>new Promise(n=>{t=e=>{(s()||o())&&n(e)},e.onPause?.()}).then(()=>{t=void 0,s()||e.onContinue?.()}),h=()=>{if(s())return;let t;const i=0===r?e.initialPromise:void 0;try{t=i??e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(l).catch(t=>{if(s())return;const i=e.retry??(Ff?0:3),a=e.retryDelay??up,l="function"==typeof a?a(r,t):a,d=!0===i||"number"==typeof i&&r<i||"function"==typeof i&&i(r,t);!n&&d?(r++,e.onFail?.(r,t),function(e){return new Promise(t=>{Df.setTimeout(t,e)})}(l).then(()=>o()?void 0:c()).then(()=>{n?u(t):h()})):u(t)})};return{promise:i,status:()=>i.status,cancel:t=>{if(!s()){const n=new hp(t);u(n),e.onCancel?.(n)}},continue:()=>(t?.(),i),cancelRetry:()=>{n=!0},continueRetry:()=>{n=!1},canStart:a,start:()=>(a()?h():c().then(h),i)}}var fp=class{#o;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),zf(this.gcTime)&&(this.#o=Df.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ff?1/0:3e5))}clearGcTimeout(){this.#o&&(Df.clearTimeout(this.#o),this.#o=void 0)}},pp=class extends fp{#a;#l;#u;#c;#h;#d;#f;constructor(e){super(),this.#f=!1,this.#d=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#c=e.client,this.#u=this.#c.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#a=_p(this.options),this.state=e.state??this.#a,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#h?.promise}setOptions(e){if(this.options={...this.#d,...e},this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){const e=_p(this.options);void 0!==e.data&&(this.setState(mp(e.data,e.dataUpdatedAt)),this.#a=e)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#u.remove(this)}setData(e,t){const n=Qf(this.state.data,e,this.options);return this.#p({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#p({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#h?.promise;return this.#h?.cancel(e),t?t.then(If).catch(If):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#a)}isActive(){return this.observers.some(e=>!1!==Vf(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===tp||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>"static"===jf(e.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(e=0){return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!Lf(this.state.dataUpdatedAt,e))}onFocus(){const e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#h?.continue()}onOnline(){const e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#h?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#u.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#h&&(this.#f?this.#h.cancel({revert:!0}):this.#h.cancelRetry()),this.scheduleGc()),this.#u.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#p({type:"invalidate"})}async fetch(e,t){if("idle"!==this.state.fetchStatus&&"rejected"!==this.#h?.status())if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#h)return this.#h.continueRetry(),this.#h.promise;if(e&&this.setOptions(e),!this.options.queryFn){const e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}"production"!==process.env.NODE_ENV&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#f=!0,n.signal)})},i=()=>{const e=np(this.options,t),n=(()=>{const e={client:this.#c,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#f=!1,this.options.persister?this.options.persister(e,n,this):e(n)},s=(()=>{const e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#c,state:this.state,fetchFn:i};return r(e),e})();this.options.behavior?.onFetch(s,this),this.#l=this.state,"idle"!==this.state.fetchStatus&&this.state.fetchMeta===s.fetchOptions?.meta||this.#p({type:"fetch",meta:s.fetchOptions?.meta}),this.#h=dp({initialPromise:t?.initialPromise,fn:s.fetchFn,onCancel:e=>{e instanceof hp&&e.revert&&this.setState({...this.#l,fetchStatus:"idle"}),n.abort()},onFail:(e,t)=>{this.#p({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#p({type:"pause"})},onContinue:()=>{this.#p({type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0});try{const e=await this.#h.start();if(void 0===e)throw"production"!==process.env.NODE_ENV&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),new Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#u.config.onSuccess?.(e,this),this.#u.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof hp){if(e.silent)return this.#h.promise;if(e.revert){if(void 0===this.state.data)throw e;return this.state.data}}throw this.#p({type:"error",error:e}),this.#u.config.onError?.(e,this),this.#u.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#p(e){this.state=(t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...gp(t.data,this.options),fetchMeta:e.meta??null};case"success":const n={...t,...mp(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#l=e.manual?n:void 0,n;case"error":const r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),ap.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#u.notify({query:this,type:"updated",action:e})})}};function gp(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:cp(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}function mp(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function _p(e){const t="function"==typeof e.initialData?e.initialData():e.initialData,n=void 0!==t,r=n?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var yp=class extends Mf{constructor(e,t){super(),this.options=t,this.#c=e,this.#g=null,this.#m=sp(),this.bindMethods(),this.setOptions(t)}#c;#_=void 0;#y=void 0;#v=void 0;#b;#x;#m;#g;#w;#E;#A;#S;#T;#k;#O=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#_.addObserver(this),vp(this.#_,this.options)?this.#R():this.updateResult(),this.#C())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return bp(this.#_,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return bp(this.#_,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#P(),this.#M(),this.#_.removeObserver(this)}setOptions(e){const t=this.options,n=this.#_;if(this.options=this.#c.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof Vf(this.options.enabled,this.#_))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#N(),this.#_.setOptions(this.options),t._defaulted&&!Zf(this.options,t)&&this.#c.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#_,observer:this});const r=this.hasListeners();r&&xp(this.#_,n,this.options,t)&&this.#R(),this.updateResult(),!r||this.#_===n&&Vf(this.options.enabled,this.#_)===Vf(t.enabled,this.#_)&&jf(this.options.staleTime,this.#_)===jf(t.staleTime,this.#_)||this.#D();const i=this.#F();!r||this.#_===n&&Vf(this.options.enabled,this.#_)===Vf(t.enabled,this.#_)&&i===this.#k||this.#I(i)}getOptimisticResult(e){const t=this.#c.getQueryCache().build(this.#c,e),n=this.createResult(t,e);return function(e,t){if(!Zf(e.getCurrentResult(),t))return!0;return!1}(this,n)&&(this.#v=n,this.#x=this.options,this.#b=this.#_.state),n}getCurrentResult(){return this.#v}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),"promise"===n&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#m.status||this.#m.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,n))})}trackProp(e){this.#O.add(e)}getCurrentQuery(){return this.#_}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#c.defaultQueryOptions(e),n=this.#c.getQueryCache().build(this.#c,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#R({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#v))}#R(e){this.#N();let t=this.#_.fetch(this.options,e);return e?.throwOnError||(t=t.catch(If)),t}#D(){this.#P();const e=jf(this.options.staleTime,this.#_);if(Ff||this.#v.isStale||!zf(e))return;const t=Lf(this.#v.dataUpdatedAt,e)+1;this.#S=Df.setTimeout(()=>{this.#v.isStale||this.updateResult()},t)}#F(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#_):this.options.refetchInterval)??!1}#I(e){this.#M(),this.#k=e,!Ff&&!1!==Vf(this.options.enabled,this.#_)&&zf(this.#k)&&0!==this.#k&&(this.#T=Df.setInterval(()=>{(this.options.refetchIntervalInBackground||ip.isFocused())&&this.#R()},this.#k))}#C(){this.#D(),this.#I(this.#F())}#P(){this.#S&&(Df.clearTimeout(this.#S),this.#S=void 0)}#M(){this.#T&&(Df.clearInterval(this.#T),this.#T=void 0)}createResult(e,t){const n=this.#_,r=this.options,i=this.#v,s=this.#b,o=this.#x,a=e!==n?e.state:this.#y,{state:l}=e;let u,c={...l},h=!1;if(t._optimisticResults){const i=this.hasListeners(),s=!i&&vp(e,t),o=i&&xp(e,n,t,r);(s||o)&&(c={...c,...gp(l.data,e.options)}),"isRestoring"===t._optimisticResults&&(c.fetchStatus="idle")}let{error:d,errorUpdatedAt:f,status:p}=c;u=c.data;let g=!1;if(void 0!==t.placeholderData&&void 0===u&&"pending"===p){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,g=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#A?.state.data,this.#A):t.placeholderData,void 0!==e&&(p="success",u=Qf(i?.data,e,t),h=!0)}if(t.select&&void 0!==u&&!g)if(i&&u===s?.data&&t.select===this.#w)u=this.#E;else try{this.#w=t.select,u=t.select(u),u=Qf(i?.data,u,t),this.#E=u,this.#g=null}catch(e){this.#g=e}this.#g&&(d=this.#g,u=this.#E,f=Date.now(),p="error");const m="fetching"===c.fetchStatus,_="pending"===p,y="error"===p,v=_&&m,b=void 0!==u,x={status:p,fetchStatus:c.fetchStatus,isPending:_,isSuccess:"success"===p,isError:y,isInitialLoading:v,isLoading:v,data:u,dataUpdatedAt:c.dataUpdatedAt,error:d,errorUpdatedAt:f,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>a.dataUpdateCount||c.errorUpdateCount>a.errorUpdateCount,isFetching:m,isRefetching:m&&!_,isLoadingError:y&&!b,isPaused:"paused"===c.fetchStatus,isPlaceholderData:h,isRefetchError:y&&b,isStale:wp(e,t),refetch:this.refetch,promise:this.#m,isEnabled:!1!==Vf(t.enabled,e)};if(this.options.experimental_prefetchInRender){const t=e=>{"error"===x.status?e.reject(x.error):void 0!==x.data&&e.resolve(x.data)},r=()=>{const e=this.#m=x.promise=sp();t(e)},i=this.#m;switch(i.status){case"pending":e.queryHash===n.queryHash&&t(i);break;case"fulfilled":"error"!==x.status&&x.data===i.value||r();break;case"rejected":"error"===x.status&&x.error===i.reason||r()}}return x}updateResult(){const e=this.#v,t=this.createResult(this.#_,this.options);if(this.#b=this.#_.state,this.#x=this.options,void 0!==this.#b.data&&(this.#A=this.#_),Zf(t,e))return;this.#v=t;this.#z({listeners:(()=>{if(!e)return!0;const{notifyOnChangeProps:t}=this.options,n="function"==typeof t?t():t;if("all"===n||!n&&!this.#O.size)return!0;const r=new Set(n??this.#O);return this.options.throwOnError&&r.add("error"),Object.keys(this.#v).some(t=>{const n=t;return this.#v[n]!==e[n]&&r.has(n)})})()})}#N(){const e=this.#c.getQueryCache().build(this.#c,this.options);if(e===this.#_)return;const t=this.#_;this.#_=e,this.#y=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#C()}#z(e){ap.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#v)}),this.#c.getQueryCache().notify({query:this.#_,type:"observerResultsUpdated"})})}};function vp(e,t){return function(e,t){return!1!==Vf(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)}(e,t)||void 0!==e.state.data&&bp(e,t,t.refetchOnMount)}function bp(e,t,n){if(!1!==Vf(t.enabled,e)&&"static"!==jf(t.staleTime,e)){const r="function"==typeof n?n(e):n;return"always"===r||!1!==r&&wp(e,t)}return!1}function xp(e,t,n,r){return(e!==t||!1===Vf(r.enabled,e))&&(!n.suspense||"error"!==e.state.status)&&wp(e,n)}function wp(e,t){return!1!==Vf(t.enabled,e)&&e.isStaleByTime(jf(t.staleTime,e))}function Ep(e){return{onFetch:(t,n)=>{const r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,s=t.state.data?.pages||[],o=t.state.data?.pageParams||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let n=!1;const u=np(t.options,t.fetchOptions),c=async(e,r,i)=>{if(n)return Promise.reject();if(null==r&&e.pages.length)return Promise.resolve(e);const s=(()=>{const e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?"backward":"forward",meta:t.options.meta};return(e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(t.signal.aborted?n=!0:t.signal.addEventListener("abort",()=>{n=!0}),t.signal)})})(e),e})(),o=await u(s),{maxPages:a}=t.options,l=i?ep:Jf;return{pages:l(e.pages,o,a),pageParams:l(e.pageParams,r,a)}};if(i&&s.length){const e="backward"===i,t={pages:s,pageParams:o},n=(e?Sp:Ap)(r,t);a=await c(t,n,e)}else{const t=e??s.length;do{const e=0===l?o[0]??r.initialPageParam:Ap(r,a);if(l>0&&null==e)break;a=await c(a,e),l++}while(l<t)}return a};t.options.persister?t.fetchFn=()=>t.options.persister?.(u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=u}}}function Ap(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Sp(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Tp=class extends fp{#c;#L;#j;#h;constructor(e){super(),this.#c=e.client,this.mutationId=e.mutationId,this.#j=e.mutationCache,this.#L=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#L.includes(e)||(this.#L.push(e),this.clearGcTimeout(),this.#j.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#L=this.#L.filter(t=>t!==e),this.scheduleGc(),this.#j.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#L.length||("pending"===this.state.status?this.scheduleGc():this.#j.remove(this))}continue(){return this.#h?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#p({type:"continue"})},n={client:this.#c,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#h=dp({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(e,t)=>{this.#p({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#p({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#j.canRun(this)});const r="pending"===this.state.status,i=!this.#h.canStart();try{if(r)t();else{this.#p({type:"pending",variables:e,isPaused:i}),await(this.#j.config.onMutate?.(e,this,n));const t=await(this.options.onMutate?.(e,n));t!==this.state.context&&this.#p({type:"pending",context:t,variables:e,isPaused:i})}const s=await this.#h.start();return await(this.#j.config.onSuccess?.(s,e,this.state.context,this,n)),await(this.options.onSuccess?.(s,e,this.state.context,n)),await(this.#j.config.onSettled?.(s,null,this.state.variables,this.state.context,this,n)),await(this.options.onSettled?.(s,null,e,this.state.context,n)),this.#p({type:"success",data:s}),s}catch(t){try{throw await(this.#j.config.onError?.(t,e,this.state.context,this,n)),await(this.options.onError?.(t,e,this.state.context,n)),await(this.#j.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)),await(this.options.onSettled?.(void 0,t,e,this.state.context,n)),t}finally{this.#p({type:"error",error:t})}}finally{this.#j.runNext(this)}}#p(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),ap.batch(()=>{this.#L.forEach(t=>{t.onMutationUpdate(e)}),this.#j.notify({mutation:this,type:"updated",action:e})})}};var kp=class extends Mf{constructor(e={}){super(),this.config=e,this.#V=new Set,this.#U=new Map,this.#B=0}#V;#U;#B;build(e,t,n){const r=new Tp({client:e,mutationCache:this,mutationId:++this.#B,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#V.add(e);const t=Op(e);if("string"==typeof t){const n=this.#U.get(t);n?n.push(e):this.#U.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#V.delete(e)){const t=Op(e);if("string"==typeof t){const n=this.#U.get(t);if(n)if(n.length>1){const t=n.indexOf(e);-1!==t&&n.splice(t,1)}else n[0]===e&&this.#U.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Op(e);if("string"==typeof t){const n=this.#U.get(t),r=n?.find(e=>"pending"===e.state.status);return!r||r===e}return!0}runNext(e){const t=Op(e);if("string"==typeof t){const n=this.#U.get(t)?.find(t=>t!==e&&t.state.isPaused);return n?.continue()??Promise.resolve()}return Promise.resolve()}clear(){ap.batch(()=>{this.#V.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#V.clear(),this.#U.clear()})}getAll(){return Array.from(this.#V)}find(e){const t={exact:!0,...e};return this.getAll().find(e=>Bf(t,e))}findAll(e={}){return this.getAll().filter(t=>Bf(e,t))}notify(e){ap.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(e=>e.state.isPaused);return ap.batch(()=>Promise.all(e.map(e=>e.continue().catch(If))))}};function Op(e){return e.options.scope?.id}var Rp=class extends Mf{#c;#v=void 0;#G;#$;constructor(e,t){super(),this.#c=e,this.setOptions(t),this.bindMethods(),this.#q()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){const t=this.options;this.options=this.#c.defaultMutationOptions(e),Zf(this.options,t)||this.#c.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#G,observer:this}),t?.mutationKey&&this.options.mutationKey&&$f(t.mutationKey)!==$f(this.options.mutationKey)?this.reset():"pending"===this.#G?.state.status&&this.#G.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#G?.removeObserver(this)}onMutationUpdate(e){this.#q(),this.#z(e)}getCurrentResult(){return this.#v}reset(){this.#G?.removeObserver(this),this.#G=void 0,this.#q(),this.#z()}mutate(e,t){return this.#$=t,this.#G?.removeObserver(this),this.#G=this.#c.getMutationCache().build(this.#c,this.options),this.#G.addObserver(this),this.#G.execute(e)}#q(){const e=this.#G?.state??{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0};this.#v={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#z(e){ap.batch(()=>{if(this.#$&&this.hasListeners()){const t=this.#v.variables,n=this.#v.context,r={client:this.#c,meta:this.options.meta,mutationKey:this.options.mutationKey};"success"===e?.type?(this.#$.onSuccess?.(e.data,t,n,r),this.#$.onSettled?.(e.data,null,t,n,r)):"error"===e?.type&&(this.#$.onError?.(e.error,t,n,r),this.#$.onSettled?.(void 0,e.error,t,n,r))}this.listeners.forEach(e=>{e(this.#v)})})}},Cp=class extends Mf{constructor(e={}){super(),this.config=e,this.#H=new Map}#H;build(e,t,n){const r=t.queryKey,i=t.queryHash??Gf(r,t);let s=this.get(i);return s||(s=new pp({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(s)),s}add(e){this.#H.has(e.queryHash)||(this.#H.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#H.get(e.queryHash);t&&(e.destroy(),t===e&&this.#H.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){ap.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#H.get(e)}getAll(){return[...this.#H.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(e=>Uf(t,e))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(t=>Uf(e,t)):t}notify(e){ap.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){ap.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){ap.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Pp=n.createContext(void 0),Mp=e=>{const t=n.useContext(Pp);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Np=({client:t,children:r})=>(n.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),e(Pp.Provider,{value:t,children:r})),Dp=n.createContext(!1);Dp.Provider;var Fp=n.createContext(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}()),Ip=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function zp(e,t,r){if("production"!==process.env.NODE_ENV&&("object"!=typeof e||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const i=n.useContext(Dp),s=n.useContext(Fp),o=Mp(),a=o.defaultQueryOptions(e);o.getDefaultOptions().queries?._experimental_beforeQuery?.(a),"production"!==process.env.NODE_ENV&&(a.queryFn||console.error(`[${a.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),a._optimisticResults=i?"isRestoring":"optimistic",(e=>{if(e.suspense){const t=1e3,n=e=>"static"===e?e:Math.max(e??t,t),r=e.staleTime;e.staleTime="function"==typeof r?(...e)=>n(r(...e)):n(r),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,t))}})(a),((e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))})(a,s),(e=>{n.useEffect(()=>{e.clearReset()},[e])})(s);const l=!o.getQueryCache().get(a.queryHash),[u]=n.useState(()=>new t(o,a)),c=u.getOptimisticResult(a),h=!i&&!1!==e.subscribed;if(n.useSyncExternalStore(n.useCallback(e=>{const t=h?u.subscribe(ap.batchCalls(e)):If;return u.updateResult(),t},[u,h]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),n.useEffect(()=>{u.setOptions(a)},[a,u]),((e,t)=>e?.suspense&&t.isPending)(a,c))throw Ip(a,u,s);if((({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&void 0===e.data||rp(n,[e.error,r])))({result:c,errorResetBoundary:s,throwOnError:a.throwOnError,query:o.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw c.error;if(o.getDefaultOptions().queries?._experimental_afterQuery?.(a,c),a.experimental_prefetchInRender&&!Ff&&((e,t)=>e.isLoading&&e.isFetching&&!t)(c,i)){const e=l?Ip(a,u,s):o.getQueryCache().get(a.queryHash)?.promise;e?.catch(If).finally(()=>{u.updateResult()})}return a.notifyOnChangeProps?c:u.trackResult(c)}function Lp(e,t){const r=Mp(),[i]=n.useState(()=>new Rp(r,e));n.useEffect(()=>{i.setOptions(e)},[i,e]);const s=n.useSyncExternalStore(n.useCallback(e=>i.subscribe(ap.batchCalls(e)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),o=n.useCallback((e,t)=>{i.mutate(e,t).catch(If)},[i]);if(s.error&&rp(i.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:o,mutateAsync:s.mutate}}const jp=()=>Lp({mutationKey:["sign-in-mutation"],mutationFn:async({body:{username:e,password:t}})=>{const n=Rf({username:e,password:Of(t)});return await Nh.instance.apiService.post({url:"token",body:n,config:{headers:{"Content-Type":"application/x-www-form-urlencoded"}}})}});if(!u)throw new Error("mobx-react-lite requires React with Hooks support");if(!function(e,t,n){return Hl(function(){var r=Tl(e,n)[Ss];"production"!==process.env.NODE_ENV&&t&&e[bs]&&Ni("makeObservable second arg must be nullish when using decorators. Mixing @decorator syntax with annotations is not supported."),null!=t||(t=function(e){return us(e,bs)||es(e,bs,ms({},e[bs])),e[bs]}(e)),os(t).forEach(function(e){return r.make_(e,t[e])})}),e})throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");function Vp(e){e()}function Up(e){return Da(e)}var Bp,Gp=function(){function e(e){var t=this;Object.defineProperty(this,"finalize",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"registrations",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"sweepTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sweep",{enumerable:!0,configurable:!0,writable:!0,value:function(e){void 0===e&&(e=1e4),clearTimeout(t.sweepTimeout),t.sweepTimeout=void 0;var n=Date.now();t.registrations.forEach(function(r,i){n-r.registeredAt>=e&&(t.finalize(r.value),t.registrations.delete(i))}),t.registrations.size>0&&t.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.sweep(0)}})}return Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){this.registrations.set(n,{value:t,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.registrations.delete(e)}}),Object.defineProperty(e.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){void 0===this.sweepTimeout&&(this.sweepTimeout=setTimeout(this.sweep,1e4))}}),e}(),$p=new("undefined"!=typeof FinalizationRegistry?FinalizationRegistry:Gp)(function(e){var t;null===(t=e.reaction)||void 0===t||t.dispose(),e.reaction=null}),qp={exports:{}},Hp={};var Wp,Zp,Kp={};
|
|
1
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as n from"react";import r,{useLayoutEffect as i,useEffect as s,useRef as o,useMemo as a,useCallback as l,useState as u,createContext as c,memo as h,useReducer as d,useContext as f,use as p,forwardRef as g,createElement as m,cloneElement as _,Component as y,isValidElement as v}from"react";import{Typography as b,Box as x,List as w,ListItem as E,Slide as A,IconButton as S,Dialog as T,DialogTitle as k,DialogContent as O,DialogContentText as R,DialogActions as C,Button as P,styled as M,TextField as N,Autocomplete as D,Accordion as F,AccordionSummary as I,AccordionDetails as z,useTheme as L,Tab as j,CircularProgress as V}from"@mui/material";import U from"@mui/icons-material/Delete";import B from"@mui/icons-material/Edit";import G from"@mui/material/IconButton";import $ from"@mui/icons-material/CloudUpload";import q from"@mui/material/Checkbox";import H from"@mui/material/FormControlLabel";import{styled as W,createTheme as Z,ThemeProvider as K}from"@mui/material/styles";import X from"@mui/material/Typography";import{unstable_batchedUpdates as Y,createPortal as Q}from"react-dom";import{LocalizationProvider as J}from"@mui/x-date-pickers";import{AdapterDateFns as ee}from"@mui/x-date-pickers/AdapterDateFns";import{DateField as te}from"@mui/x-date-pickers/DateField";import ne from"@mui/icons-material/ArrowDownward";import{TabContext as re,TabList as ie,TabPanel as se}from"@mui/lab";import oe from"@mui/material/Box";import ae from"@mui/material/Modal";const le=({text:t="Нет данных"})=>e(b,{variant:"body2",sx:{textAlign:"center",color:"var(--gray-light-color)"},children:t});function ue({items:r,columnsCount:i=1,getContent:s,title:o,getKey:a,onClick:l,sx:u,isShowNoData:c=!0}){const h=0===r.length;return t(x,{sx:{display:"grid",gridTemplateColumns:"1fr",gap:"15px",...u?.root},children:[o?e(b,{variant:"h6",noWrap:!0,sx:{textAlign:"center",fontWeight:700,...u?.title},children:o}):null,h?e(n.Fragment,{children:c?e(le,{}):null}):e(w,{sx:{display:"grid",gridTemplateColumns:`repeat(${i}, 1fr)`,gap:"15px",...u?.list},disablePadding:!0,children:r.map((t,n)=>e(E,{onClick:()=>l?.(t,n),sx:{...u?.item},disablePadding:!0,children:s(t,n)},a(t,n)))})]})}const ce=n.forwardRef(function(t,n){return e(A,{direction:"up",ref:n,...t})}),he=({notification:r,onDelete:i})=>{const s=n.useId(),[o,a]=n.useState(!1),l=()=>{a(!1)};return t(n.Fragment,{children:[e(S,{onClick:e=>{e.stopPropagation(),r?a(!0):i()},children:e(U,{fontSize:"small",color:"error"})}),r?t(T,{slots:{transition:ce},open:o,onClose:l,children:[e(k,{id:`${s}-dialog-title`,children:r.title}),e(O,{children:e(R,{id:`${s}-dialog-text`,children:r.description})}),t(C,{children:[e(P,{variant:"contained",color:"error",sx:{textTransform:"none"},onClick:l,children:"Отмена"}),e(P,{variant:"contained",sx:{textTransform:"none"},onClick:()=>{i(),l()},children:"Подтвердить"})]})]}):null]})},de=t=>{const r=n.useId();return e(n.Fragment,{children:e(S,{id:r,...t,children:e(B,{fontSize:"small",color:"primary"})})})},fe=t=>{const{children:n,variant:r="contained",loading:i,icon:s,sx:o,...a}=t;return s?e(G,{...a,loading:i,children:s}):e(P,{sx:{whiteSpace:"nowrap",padding:"5px 15px",textTransform:"none",...o},loading:i,loadingPosition:"start",variant:r,...a,children:n})},pe=M("input")({clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:1,overflow:"hidden",position:"absolute",bottom:0,left:0,whiteSpace:"nowrap",width:1}),ge=({children:n,accept:r,onFilesLoad:i,...s})=>t(fe,{...s,component:"label",variant:"contained",startIcon:e($,{}),children:[n,e(pe,{type:"file",accept:r,onChange:e=>{const{target:{files:t}}=e;t&&i({event:e,files:t})},multiple:!0})]});var me=e=>"checkbox"===e.type,_e=e=>e instanceof Date,ye=e=>null==e;const ve=e=>"object"==typeof e;var be=e=>!ye(e)&&!Array.isArray(e)&&ve(e)&&!_e(e),xe=e=>be(e)&&e.target?me(e.target)?e.target.checked:e.target.value:e,we=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),Ee="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function Ae(e){if(e instanceof Date)return new Date(e);const t="undefined"!=typeof FileList&&e instanceof FileList;if(Ee&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!(n||be(e)&&(e=>{const t=e.constructor&&e.constructor.prototype;return be(t)&&t.hasOwnProperty("isPrototypeOf")})(e)))return e;const r=n?[]:Object.create(Object.getPrototypeOf(e));for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=Ae(e[t]));return r}var Se=e=>/^\w*$/.test(e),Te=e=>void 0===e,ke=e=>Array.isArray(e)?e.filter(Boolean):[],Oe=e=>ke(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Re=(e,t,n)=>{if(!t||!be(e))return n;const r=(Se(t)?[t]:Oe(t)).reduce((e,t)=>ye(e)?e:e[t],e);return Te(r)||r===e?Te(e[t])?n:e[t]:r},Ce=e=>"boolean"==typeof e,Pe=e=>"function"==typeof e,Me=(e,t,n)=>{let r=-1;const i=Se(t)?[t]:Oe(t),s=i.length,o=s-1;for(;++r<s;){const t=i[r];let s=n;if(r!==o){const n=e[t];s=be(n)||Array.isArray(n)?n:isNaN(+i[r+1])?{}:[]}if("__proto__"===t||"constructor"===t||"prototype"===t)return;e[t]=s,e=e[t]}};const Ne="blur",De="focusout",Fe="change",Ie="onBlur",ze="onChange",Le="onSubmit",je="onTouched",Ve="all",Ue="max",Be="min",Ge="maxLength",$e="minLength",qe="pattern",He="required",We="validate",Ze=r.createContext(null);Ze.displayName="HookFormContext";const Ke=()=>r.useContext(Ze),Xe=e=>{const{children:t,...n}=e;return r.createElement(Ze.Provider,{value:n},t)};var Ye=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(i,s,{get:()=>{const i=s;return t._proxyFormState[i]!==Ve&&(t._proxyFormState[i]=!r||Ve),n&&(n[i]=!0),e[i]}});return i};const Qe="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;var Je=e=>"string"==typeof e,et=(e,t,n,r,i)=>Je(e)?(r&&t.watch.add(e),Re(n,e,i)):Array.isArray(e)?e.map(e=>(r&&t.watch.add(e),Re(n,e))):(r&&(t.watchAll=!0),n),tt=e=>ye(e)||!ve(e);function nt(e,t,n=new WeakSet){if(tt(e)||tt(t))return Object.is(e,t);if(_e(e)&&_e(t))return e.getTime()===t.getTime();const r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const s of r){const r=e[s];if(!i.includes(s))return!1;if("ref"!==s){const e=t[s];if(_e(r)&&_e(e)||be(r)&&be(e)||Array.isArray(r)&&Array.isArray(e)?!nt(r,e,n):!Object.is(r,e))return!1}}return!0}function rt(e){const t=Ke(),{name:n,disabled:i,control:s=t.control,shouldUnregister:o,defaultValue:a,exact:l=!0}=e,u=we(s._names.array,n),c=r.useMemo(()=>Re(s._formValues,n,Re(s._defaultValues,n,a)),[s,n,a]),h=function(e){const t=Ke(),{control:n=t.control,name:i,defaultValue:s,disabled:o,exact:a,compute:l}=e||{},u=r.useRef(s),c=r.useRef(l),h=r.useRef(void 0),d=r.useRef(n),f=r.useRef(i);c.current=l;const[p,g]=r.useState(()=>{const e=n._getWatch(i,u.current);return c.current?c.current(e):e}),m=r.useCallback(e=>{const t=et(i,n._names,e||n._formValues,!1,u.current);return c.current?c.current(t):t},[n._formValues,n._names,i]),_=r.useCallback(e=>{if(!o){const t=et(i,n._names,e||n._formValues,!1,u.current);if(c.current){const e=c.current(t);nt(e,h.current)||(g(e),h.current=e)}else g(t)}},[n._formValues,n._names,o,i]);Qe(()=>(d.current===n&&nt(f.current,i)||(d.current=n,f.current=i,_()),n._subscribe({name:i,formState:{values:!0},exact:a,callback:e=>{_(e.values)}})),[n,a,i,_]),r.useEffect(()=>n._removeUnmounted());const y=d.current!==n,v=f.current,b=r.useMemo(()=>{if(o)return null;const e=!y&&!nt(v,i);return y||e?m():null},[o,y,i,v,m]);return null!==b?b:p}({control:s,name:n,defaultValue:c,exact:l}),d=function(e){const t=Ke(),{control:n=t.control,disabled:i,name:s,exact:o}=e||{},[a,l]=r.useState(n._formState),u=r.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Qe(()=>n._subscribe({name:s,formState:u.current,exact:o,callback:e=>{!i&&l({...n._formState,...e})}}),[s,i,o]),r.useEffect(()=>{u.current.isValid&&n._setValid(!0)},[n]),r.useMemo(()=>Ye(a,n,u.current,!1),[a,n])}({control:s,name:n,exact:l}),f=r.useRef(e),p=r.useRef(void 0),g=r.useRef(s.register(n,{...e.rules,value:h,...Ce(e.disabled)?{disabled:e.disabled}:{}}));f.current=e;const m=r.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Re(d.errors,n)},isDirty:{enumerable:!0,get:()=>!!Re(d.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Re(d.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Re(d.validatingFields,n)},error:{enumerable:!0,get:()=>Re(d.errors,n)}}),[d,n]),_=r.useCallback(e=>g.current.onChange({target:{value:xe(e),name:n},type:Fe}),[n]),y=r.useCallback(()=>g.current.onBlur({target:{value:Re(s._formValues,n),name:n},type:Ne}),[n,s._formValues]),v=r.useCallback(e=>{const t=Re(s._fields,n);t&&t._f&&e&&(t._f.ref={focus:()=>Pe(e.focus)&&e.focus(),select:()=>Pe(e.select)&&e.select(),setCustomValidity:t=>Pe(e.setCustomValidity)&&e.setCustomValidity(t),reportValidity:()=>Pe(e.reportValidity)&&e.reportValidity()})},[s._fields,n]),b=r.useMemo(()=>({name:n,value:h,...Ce(i)||d.disabled?{disabled:d.disabled||i}:{},onChange:_,onBlur:y,ref:v}),[n,i,d.disabled,_,y,v,h]);return r.useEffect(()=>{const e=s._options.shouldUnregister||o,t=p.current;t&&t!==n&&!u&&s.unregister(t),s.register(n,{...f.current.rules,...Ce(f.current.disabled)?{disabled:f.current.disabled}:{}});const r=(e,t)=>{const n=Re(s._fields,e);n&&n._f&&(n._f.mount=t)};if(r(n,!0),e){const e=Ae(Re(s._options.defaultValues,n,f.current.defaultValue));Me(s._defaultValues,n,e),Te(Re(s._formValues,n))&&Me(s._formValues,n,e)}return!u&&s.register(n),p.current=n,()=>{(u?e&&!s._state.action:e)?s.unregister(n):r(n,!1)}},[n,s,u,o]),r.useEffect(()=>{s._setDisabledField({disabled:i,name:n})},[i,n,s]),r.useMemo(()=>({field:b,formState:d,fieldState:m}),[b,d,m])}const it=e=>e.render(rt(e));var st=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},ot=e=>Array.isArray(e)?e:[e],at=()=>{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 lt(e,t){const n={};for(const r in e)if(e.hasOwnProperty(r)){const i=e[r],s=t[r];if(i&&be(i)&&s){const e=lt(i,s);be(e)&&(n[r]=e)}else e[r]&&(n[r]=s)}return n}var ut=e=>be(e)&&!Object.keys(e).length,ct=e=>"file"===e.type,ht=e=>{if(!Ee)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},dt=e=>"select-multiple"===e.type,ft=e=>"radio"===e.type,pt=e=>ht(e)&&e.isConnected;function gt(e,t){const n=Array.isArray(t)?t:Se(t)?[t]:Oe(t),r=1===n.length?e:function(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=Te(e)?r++:e[t[r++]];return e}(e,n),i=n.length-1,s=n[i];return r&&delete r[s],0!==i&&(be(r)&&ut(r)||Array.isArray(r)&&function(e){for(const t in e)if(e.hasOwnProperty(t)&&!Te(e[t]))return!1;return!0}(r))&>(e,n.slice(0,-1)),e}function mt(e){return Array.isArray(e)||be(e)&&!(e=>{for(const t in e)if(Pe(e[t]))return!0;return!1})(e)}function _t(e,t={}){for(const n in e){const r=e[n];mt(r)?(t[n]=Array.isArray(r)?[]:{},_t(r,t[n])):Te(r)||(t[n]=!0)}return t}function yt(e,t,n){n||(n=_t(t));for(const r in e){const i=e[r];if(mt(i))Te(t)||tt(n[r])?n[r]=_t(i,Array.isArray(i)?[]:{}):yt(i,ye(t)?{}:t[r],n[r]);else{const e=t[r];n[r]=!nt(i,e)}}return n}const vt={value:!1,isValid:!1},bt={value:!0,isValid:!0};var xt=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&&!Te(e[0].attributes.value)?Te(e[0].value)||""===e[0].value?bt:{value:e[0].value,isValid:!0}:bt:vt}return vt},wt=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Te(e)?e:t?""===e?NaN:e?+e:e:n&&Je(e)?new Date(e):r?r(e):e;const Et={isValid:!1,value:null};var At=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,Et):Et;function St(e){const t=e.ref;return ct(t)?t.files:ft(t)?At(e.refs).value:dt(t)?[...t.selectedOptions].map(({value:e})=>e):me(t)?xt(e.refs).value:wt(Te(t.value)?e.ref.value:t.value,e)}var Tt=e=>e instanceof RegExp,kt=e=>Te(e)?e:Tt(e)?e.source:be(e)?Tt(e.value)?e.value.source:e.value:e,Ot=e=>({isOnSubmit:!e||e===Le,isOnBlur:e===Ie,isOnChange:e===ze,isOnAll:e===Ve,isOnTouch:e===je});const Rt="AsyncFunction";var Ct=e=>!!e&&!!e.validate&&!!(Pe(e.validate)&&e.validate.constructor.name===Rt||be(e.validate)&&Object.values(e.validate).find(e=>e.constructor.name===Rt)),Pt=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))));const Mt=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const n=Re(e,i);if(n){const{_f:e,...s}=n;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],i)&&!r)return!0;if(e.ref&&t(e.ref,e.name)&&!r)return!0;if(Mt(s,t))break}else if(be(s)&&Mt(s,t))break}}};function Nt(e,t,n){const r=Re(e,n);if(r||Se(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const r=i.join("."),s=Re(t,r),o=Re(e,r);if(s&&!Array.isArray(s)&&n!==r)return{name:n};if(o&&o.type)return{name:r,error:o};if(o&&o.root&&o.root.type)return{name:`${r}.root`,error:o.root};i.pop()}return{name:n}}var Dt=(e,t,n)=>{const r=ot(Re(e,n));return Me(r,"root",t[n]),Me(e,n,r),e};function Ft(e,t,n="validate"){if(Je(e)||Array.isArray(e)&&e.every(Je)||Ce(e)&&!e)return{type:n,message:Je(e)?e:"",ref:t}}var It=e=>be(e)&&!Tt(e)?e:{value:e,message:""},zt=async(e,t,n,r,i,s)=>{const{ref:o,refs:a,required:l,maxLength:u,minLength:c,min:h,max:d,pattern:f,validate:p,name:g,valueAsNumber:m,mount:_}=e._f,y=Re(n,g);if(!_||t.has(g))return{};const v=a?a[0]:o,b=e=>{i&&v.reportValidity&&(v.setCustomValidity(Ce(e)?"":e||""),v.reportValidity())},x={},w=ft(o),E=me(o),A=w||E,S=(m||ct(o))&&Te(o.value)&&Te(y)||ht(o)&&""===o.value||""===y||Array.isArray(y)&&!y.length,T=st.bind(null,g,r,x),k=(e,t,n,r=Ge,i=$e)=>{const s=e?t:n;x[g]={type:e?r:i,message:s,ref:o,...T(e?r:i,s)}};if(s?!Array.isArray(y)||!y.length:l&&(!A&&(S||ye(y))||Ce(y)&&!y||E&&!xt(a).isValid||w&&!At(a).isValid)){const{value:e,message:t}=Je(l)?{value:!!l,message:l}:It(l);if(e&&(x[g]={type:He,message:t,ref:v,...T(He,t)},!r))return b(t),x}if(!(S||ye(h)&&ye(d))){let e,t;const n=It(d),i=It(h);if(ye(y)||isNaN(y)){const r=o.valueAsDate||new Date(y),s=e=>new Date((new Date).toDateString()+" "+e),a="time"==o.type,l="week"==o.type;Je(n.value)&&y&&(e=a?s(y)>s(n.value):l?y>n.value:r>new Date(n.value)),Je(i.value)&&y&&(t=a?s(y)<s(i.value):l?y<i.value:r<new Date(i.value))}else{const r=o.valueAsNumber||(y?+y:y);ye(n.value)||(e=r>n.value),ye(i.value)||(t=r<i.value)}if((e||t)&&(k(!!e,n.message,i.message,Ue,Be),!r))return b(x[g].message),x}if((u||c)&&!S&&(Je(y)||s&&Array.isArray(y))){const e=It(u),t=It(c),n=!ye(e.value)&&y.length>+e.value,i=!ye(t.value)&&y.length<+t.value;if((n||i)&&(k(n,e.message,t.message),!r))return b(x[g].message),x}if(f&&!S&&Je(y)){const{value:e,message:t}=It(f);if(Tt(e)&&!y.match(e)&&(x[g]={type:qe,message:t,ref:o,...T(qe,t)},!r))return b(t),x}if(p)if(Pe(p)){const e=Ft(await p(y,n),v);if(e&&(x[g]={...e,...T(We,e.message)},!r))return b(e.message),x}else if(be(p)){let e={};for(const t in p){if(!ut(e)&&!r)break;const i=Ft(await p[t](y,n),v,t);i&&(e={...i,...T(t,i.message)},b(i.message),r&&(x[g]=e))}if(!ut(e)&&(x[g]={ref:v,...e},!r))return x}return b(!0),x};const Lt={mode:Le,reValidateMode:ze,shouldFocusError:!0};function jt(e={}){let t,n={...Lt,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:Pe(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:n.errors||{},disabled:n.disabled||!1},i={},s=(be(n.defaultValues)||be(n.values))&&Ae(n.defaultValues||n.values)||{},o=n.shouldUnregister?{}:Ae(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:at(),state:at()},p=n.criteriaMode===Ve,g=async e=>{if(!a.keepIsValid&&!n.disabled&&(h.isValid||d.isValid||e)){let e;n.resolver?(e=ut((await b()).errors),m()):e=await x(i,!0),e!==r.isValid&&f.state.next({isValid:e})}},m=(e,t)=>{!n.disabled&&(h.isValidating||h.validatingFields||d.isValidating||d.validatingFields)&&((e||Array.from(l.mount)).forEach(e=>{e&&(t?Me(r.validatingFields,e,t):gt(r.validatingFields,e))}),f.state.next({validatingFields:r.validatingFields,isValidating:!ut(r.validatingFields)}))},_=(e,t,n,r)=>{const l=Re(i,e);if(l){const i=Re(o,e,Te(n)?Re(s,e):n);Te(i)||r&&r.defaultChecked||t?Me(o,e,t?i:St(l._f)):A(e,i),a.mount&&!a.action&&g()}},y=(e,t,i,o,a)=>{let l=!1,u=!1;const c={name:e};if(!n.disabled){if(!i||o){(h.isDirty||d.isDirty)&&(u=r.isDirty,r.isDirty=c.isDirty=w(),l=u!==c.isDirty);const n=nt(Re(s,e),t);u=!!Re(r.dirtyFields,e),n?gt(r.dirtyFields,e):Me(r.dirtyFields,e,!0),c.dirtyFields=r.dirtyFields,l=l||(h.dirtyFields||d.dirtyFields)&&u!==!n}if(i){const t=Re(r.touchedFields,e);t||(Me(r.touchedFields,e,i),c.touchedFields=r.touchedFields,l=l||(h.touchedFields||d.touchedFields)&&t!==i)}l&&a&&f.state.next(c)}return l?c:{}},v=(e,i,s,o)=>{const a=Re(r.errors,e),l=(h.isValid||d.isValid)&&Ce(i)&&r.isValid!==i;var c;if(n.delayError&&s?(c=()=>((e,t)=>{Me(r.errors,e,t),f.state.next({errors:r.errors})})(e,s),t=e=>{clearTimeout(u),u=setTimeout(c,e)},t(n.delayError)):(clearTimeout(u),t=null,s?Me(r.errors,e,s):gt(r.errors,e)),(s?!nt(a,s):a)||!ut(o)||l){const t={...o,...l&&Ce(i)?{isValid:i}:{},errors:r.errors,name:e};r={...r,...t},f.state.next(t)}},b=async e=>{m(e,!0);const t=await n.resolver(o,n.context,((e,t,n,r)=>{const i={};for(const n of e){const e=Re(t,n);e&&Me(i,n,e._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}})(e||l.mount,i,n.criteriaMode,n.shouldUseNativeValidation));return t},x=async(e,t,i={valid:!0})=>{for(const s in e){const a=e[s];if(a){const{_f:e,...s}=a;if(e){const s=l.array.has(e.name),u=a._f&&Ct(a._f);u&&h.validatingFields&&m([e.name],!0);const c=await zt(a,l.disabled,o,p,n.shouldUseNativeValidation&&!t,s);if(u&&h.validatingFields&&m([e.name]),c[e.name]&&(i.valid=!1,t))break;!t&&(Re(c,e.name)?s?Dt(r.errors,c,e.name):Me(r.errors,e.name,c[e.name]):gt(r.errors,e.name))}!ut(s)&&await x(s,t,i)}}return i.valid},w=(e,t)=>!n.disabled&&(e&&t&&Me(o,e,t),!nt(C(),s)),E=(e,t,n)=>et(e,l,{...a.mount?o:Te(t)?s:Je(e)?{[e]:t}:t},n,t),A=(e,t,n={})=>{const r=Re(i,e);let s=t;if(r){const n=r._f;n&&(!n.disabled&&Me(o,e,wt(t,n)),s=ht(n.ref)&&ye(t)?"":t,dt(n.ref)?[...n.ref.options].forEach(e=>e.selected=s.includes(e.value)):n.refs?me(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):ct(n.ref)?n.ref.value="":(n.ref.value=s,n.ref.type||f.state.next({name:e,values:Ae(o)})))}(n.shouldDirty||n.shouldTouch)&&y(e,s,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&R(e)},S=(e,t,n)=>{for(const r in t){if(!t.hasOwnProperty(r))return;const s=t[r],o=e+"."+r,a=Re(i,o);(l.array.has(e)||be(s)||a&&!a._f)&&!_e(s)?S(o,s,n):A(o,s,n)}},T=(e,t,n={})=>{const u=Re(i,e),c=l.array.has(e),p=Ae(t);Me(o,e,p),c?(f.array.next({name:e,values:Ae(o)}),(h.isDirty||h.dirtyFields||d.isDirty||d.dirtyFields)&&n.shouldDirty&&f.state.next({name:e,dirtyFields:yt(s,o),isDirty:w(e,p)})):!u||u._f||ye(p)?A(e,p,n):S(e,p,n),Pt(e,l)&&f.state.next({...r,name:e}),f.state.next({name:a.mount?e:void 0,values:Ae(o)})},k=async e=>{a.mount=!0;const s=e.target;let u=s.name,c=!0;const _=Re(i,u),w=e=>{c=Number.isNaN(e)||_e(e)&&isNaN(e.getTime())||nt(e,Re(o,u,e))},E=Ot(n.mode),A=Ot(n.reValidateMode);if(_){let a,T;const k=s.type?St(_._f):xe(e),O=e.type===Ne||e.type===De,C=!((S=_._f).mount&&(S.required||S.min||S.max||S.maxLength||S.minLength||S.pattern||S.validate)||n.resolver||Re(r.errors,u)||_._f.deps)||((e,t,n,r,i)=>!i.isOnAll&&(!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:!(n?r.isOnChange:i.isOnChange)||e))(O,Re(r.touchedFields,u),r.isSubmitted,A,E),P=Pt(u,l,O);Me(o,u,k),O?s&&s.readOnly||(_._f.onBlur&&_._f.onBlur(e),t&&t(0)):_._f.onChange&&_._f.onChange(e);const M=y(u,k,O),N=!ut(M)||P;if(!O&&f.state.next({name:u,type:e.type,values:Ae(o)}),C)return(h.isValid||d.isValid)&&("onBlur"===n.mode?O&&g():O||g()),N&&f.state.next({name:u,...P?{}:M});if(!O&&P&&f.state.next({...r}),n.resolver){const{errors:e}=await b([u]);if(m([u]),w(k),c){const t=Nt(r.errors,i,u),n=Nt(e,i,t.name||u);a=n.error,u=n.name,T=ut(e)}}else m([u],!0),a=(await zt(_,l.disabled,o,p,n.shouldUseNativeValidation))[u],m([u]),w(k),c&&(a?T=!1:(h.isValid||d.isValid)&&(T=await x(i,!0)));c&&(_._f.deps&&(!Array.isArray(_._f.deps)||_._f.deps.length>0)&&R(_._f.deps),v(u,T,a,M))}var S},O=(e,t)=>{if(Re(r.errors,t)&&e.focus)return e.focus(),1},R=async(e,t={})=>{let s,o;const a=ot(e);if(n.resolver){const t=await(async e=>{const{errors:t}=await b(e);if(m(e),e)for(const n of e){const e=Re(t,n);e?Me(r.errors,n,e):gt(r.errors,n)}else r.errors=t;return t})(Te(e)?e:a);s=ut(t),o=e?!a.some(e=>Re(t,e)):s}else e?(o=(await Promise.all(a.map(async e=>{const t=Re(i,e);return await x(t&&t._f?{[e]:t}:t)}))).every(Boolean),(o||r.isValid)&&g()):o=s=await x(i);return f.state.next({...!Je(e)||(h.isValid||d.isValid)&&s!==r.isValid?{}:{name:e},...n.resolver||!e?{isValid:s}:{},errors:r.errors}),t.shouldFocus&&!o&&Mt(i,O,e?a:l.mount),o},C=(e,t)=>{let n={...a.mount?o:s};return t&&(n=lt(t.dirtyFields?r.dirtyFields:r.touchedFields,n)),Te(e)?n:Je(e)?Re(n,e):e.map(e=>Re(n,e))},P=(e,t)=>({invalid:!!Re((t||r).errors,e),isDirty:!!Re((t||r).dirtyFields,e),error:Re((t||r).errors,e),isValidating:!!Re(r.validatingFields,e),isTouched:!!Re((t||r).touchedFields,e)}),M=(e,t,n)=>{const s=(Re(i,e,{_f:{}})._f||{}).ref,o=Re(r.errors,e)||{},{ref:a,message:l,type:u,...c}=o;Me(r.errors,e,{...c,...t,ref:s}),f.state.next({name:e,errors:r.errors,isValid:!1}),n&&n.shouldFocus&&s&&s.focus&&s.focus()},N=e=>f.state.subscribe({next:t=>{var n,i,a;n=e.name,i=t.name,a=e.exact,n&&i&&n!==i&&!ot(n).some(e=>e&&(a?e===i:e.startsWith(i)||i.startsWith(e)))||!((e,t,n,r)=>{n(e);const{name:i,...s}=e;return ut(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(e=>t[e]===(!r||Ve))})(t,e.formState||h,U,e.reRenderRoot)||e.callback({values:{...o},...r,...t,defaultValues:s})}}).unsubscribe,D=(e,t={})=>{for(const a of e?ot(e):l.mount)l.mount.delete(a),l.array.delete(a),t.keepValue||(gt(i,a),gt(o,a)),!t.keepError&>(r.errors,a),!t.keepDirty&>(r.dirtyFields,a),!t.keepTouched&>(r.touchedFields,a),!t.keepIsValidating&>(r.validatingFields,a),!n.shouldUnregister&&!t.keepDefaultValue&>(s,a);f.state.next({values:Ae(o)}),f.state.next({...r,...t.keepDirty?{isDirty:w()}:{}}),!t.keepIsValid&&g()},F=({disabled:e,name:t})=>{(Ce(e)&&a.mount||e||l.disabled.has(t))&&(e?l.disabled.add(t):l.disabled.delete(t))},I=(e,t={})=>{let r=Re(i,e);const o=Ce(t.disabled)||Ce(n.disabled);return Me(i,e,{...r||{},_f:{...r&&r._f?r._f:{ref:{name:e}},name:e,mount:!0,...t}}),l.mount.add(e),r?F({disabled:Ce(t.disabled)?t.disabled:n.disabled,name:e}):_(e,!0,t.value),{...o?{disabled:t.disabled||n.disabled}:{},...n.progressive?{required:!!t.required,min:kt(t.min),max:kt(t.max),minLength:kt(t.minLength),maxLength:kt(t.maxLength),pattern:kt(t.pattern)}:{},name:e,onChange:k,onBlur:k,ref:o=>{if(o){I(e,t),r=Re(i,e);const n=Te(o.value)&&o.querySelectorAll&&o.querySelectorAll("input,select,textarea")[0]||o,a=(e=>ft(e)||me(e))(n),l=r._f.refs||[];if(a?l.find(e=>e===n):n===r._f.ref)return;Me(i,e,{_f:{...r._f,...a?{refs:[...l.filter(pt),n,...Array.isArray(Re(s,e))?[{}]:[]],ref:{type:n.type,name:e}}:{ref:n}}}),_(e,!1,void 0,n)}else r=Re(i,e,{}),r._f&&(r._f.mount=!1),(n.shouldUnregister||t.shouldUnregister)&&(!we(l.array,e)||!a.action)&&l.unMount.add(e)}}},z=()=>n.shouldFocusError&&Mt(i,O,l.mount),L=(e,t)=>async s=>{let a;s&&(s.preventDefault&&s.preventDefault(),s.persist&&s.persist());let u=Ae(o);if(f.state.next({isSubmitting:!0}),n.resolver){const{errors:e,values:t}=await b();m(),r.errors=e,u=Ae(t)}else await x(i);if(l.disabled.size)for(const e of l.disabled)gt(u,e);if(gt(r.errors,"root"),ut(r.errors)){f.state.next({errors:{}});try{await e(u,s)}catch(e){a=e}}else t&&await t({...r.errors},s),z(),setTimeout(z);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ut(r.errors)&&!a,submitCount:r.submitCount+1,errors:r.errors}),a)throw a},j=(e,t={})=>{const u=e?Ae(e):s,c=Ae(u),d=ut(e),p=d?s:c;if(t.keepDefaultValues||(s=u),!t.keepValues){if(t.keepDirtyValues){const e=new Set([...l.mount,...Object.keys(yt(s,o))]);for(const t of Array.from(e))Re(r.dirtyFields,t)?Me(p,t,Re(o,t)):T(t,Re(p,t))}else{if(Ee&&Te(e))for(const e of l.mount){const t=Re(i,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(ht(e)){const t=e.closest("form");if(t){t.reset();break}}}}if(t.keepFieldsRef)for(const e of l.mount)T(e,Re(p,e));else i={}}o=n.shouldUnregister?t.keepDefaultValues?Ae(s):{}:Ae(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&&!ut(p),a.watch=!!n.shouldUnregister,a.keepIsValid=!!t.keepIsValid,a.action=!1,t.keepErrors||(r.errors={}),f.state.next({submitCount:t.keepSubmitCount?r.submitCount:0,isDirty:!d&&(t.keepDirty?r.isDirty:!(!t.keepDefaultValues||nt(e,s))),isSubmitted:!!t.keepIsSubmitted&&r.isSubmitted,dirtyFields:d?{}:t.keepDirtyValues?t.keepDefaultValues&&o?yt(s,o):r.dirtyFields:t.keepDefaultValues&&e?yt(s,e):t.keepDirty?r.dirtyFields:{},touchedFields:t.keepTouched?r.touchedFields:{},errors:t.keepErrors?r.errors:{},isSubmitSuccessful:!!t.keepIsSubmitSuccessful&&r.isSubmitSuccessful,isSubmitting:!1,defaultValues:s})},V=(e,t)=>j(Pe(e)?e(o):e,{...n.resetOptions,...t}),U=e=>{r={...r,...e}},B={control:{register:I,unregister:D,getFieldState:P,handleSubmit:L,setError:M,_subscribe:N,_runSchema:b,_updateIsValidating:m,_focusError:z,_getWatch:E,_getDirty:w,_setValid:g,_setFieldArray:(e,t=[],l,u,c=!0,p=!0)=>{if(u&&l&&!n.disabled){if(a.action=!0,p&&Array.isArray(Re(i,e))){const t=l(Re(i,e),u.argA,u.argB);c&&Me(i,e,t)}if(p&&Array.isArray(Re(r.errors,e))){const t=l(Re(r.errors,e),u.argA,u.argB);c&&Me(r.errors,e,t),((e,t)=>{!ke(Re(e,t)).length&>(e,t)})(r.errors,e)}if((h.touchedFields||d.touchedFields)&&p&&Array.isArray(Re(r.touchedFields,e))){const t=l(Re(r.touchedFields,e),u.argA,u.argB);c&&Me(r.touchedFields,e,t)}(h.dirtyFields||d.dirtyFields)&&(r.dirtyFields=yt(s,o)),f.state.next({name:e,isDirty:w(e,t),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Me(o,e,t)},_setDisabledField:F,_setErrors:e=>{r.errors=e,f.state.next({errors:r.errors,isValid:!1})},_getFieldArray:e=>ke(Re(a.mount?o:s,e,n.shouldUnregister?Re(s,e,[]):[])),_reset:j,_resetDefaultValues:()=>Pe(n.defaultValues)&&n.defaultValues().then(e=>{V(e,n.resetOptions),f.state.next({isLoading:!1})}),_removeUnmounted:()=>{for(const e of l.unMount){const t=Re(i,e);t&&(t._f.refs?t._f.refs.every(e=>!pt(e)):!pt(t._f.ref))&&D(e)}l.unMount=new Set},_disableForm:e=>{Ce(e)&&(f.state.next({disabled:e}),Mt(i,(t,n)=>{const r=Re(i,n);r&&(t.disabled=r._f.disabled||e,Array.isArray(r._f.refs)&&r._f.refs.forEach(t=>{t.disabled=r._f.disabled||e}))},0,!1))},_subjects:f,_proxyFormState:h,get _fields(){return i},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 r},get _options(){return n},set _options(e){n={...n,...e}}},subscribe:e=>(a.mount=!0,d={...d,...e.formState},N({...e,formState:{...c,...e.formState}})),trigger:R,register:I,handleSubmit:L,watch:(e,t)=>Pe(e)?f.state.subscribe({next:n=>"values"in n&&e(E(void 0,t),n)}):E(e,t,!0),setValue:T,getValues:C,reset:V,resetField:(e,t={})=>{Re(i,e)&&(Te(t.defaultValue)?T(e,Ae(Re(s,e))):(T(e,t.defaultValue),Me(s,e,Ae(t.defaultValue))),t.keepTouched||gt(r.touchedFields,e),t.keepDirty||(gt(r.dirtyFields,e),r.isDirty=t.defaultValue?w(e,Ae(Re(s,e))):w()),t.keepError||(gt(r.errors,e),h.isValid&&g()),f.state.next({...r}))},clearErrors:e=>{e&&ot(e).forEach(e=>gt(r.errors,e)),f.state.next({errors:e?r.errors:{}})},unregister:D,setError:M,setFocus:(e,t={})=>{const n=Re(i,e),r=n&&n._f;if(r){const e=r.refs?r.refs[0]:r.ref;e.focus&&setTimeout(()=>{e.focus(),t.shouldSelect&&Pe(e.select)&&e.select()})}},getFieldState:P};return{...B,formControl:B}}var Vt=()=>{if("undefined"!=typeof crypto&&crypto.randomUUID)return crypto.randomUUID();const e="undefined"==typeof performance?Date.now():1e3*performance.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=(16*Math.random()+e)%16|0;return("x"==t?n:3&n|8).toString(16)})},Ut=(e,t,n={})=>n.shouldFocus||Te(n.shouldFocus)?n.focusName||`${e}.${Te(n.focusIndex)?t:n.focusIndex}.`:"",Bt=(e,t)=>[...e,...ot(t)],Gt=e=>Array.isArray(e)?e.map(()=>{}):void 0;function $t(e,t,n){return[...e.slice(0,t),...ot(n),...e.slice(t)]}var qt=(e,t,n)=>Array.isArray(e)?(Te(e[n])&&(e[n]=void 0),e.splice(n,0,e.splice(t,1)[0]),e):[],Ht=(e,t)=>[...ot(t),...ot(e)];var Wt=(e,t)=>Te(t)?[]:function(e,t){let n=0;const r=[...e];for(const e of t)r.splice(e-n,1),n++;return ke(r).length?r:[]}(e,ot(t).sort((e,t)=>e-t)),Zt=(e,t,n)=>{[e[t],e[n]]=[e[n],e[t]]},Kt=(e,t,n)=>(e[t]=n,e);function Xt(e){const t=Ke(),{control:n=t.control,name:i,keyName:s="id",shouldUnregister:o,rules:a}=e,[l,u]=r.useState(n._getFieldArray(i)),c=r.useRef(n._getFieldArray(i).map(Vt)),h=r.useRef(!1);n._names.array.add(i),r.useMemo(()=>a&&l.length>=0&&n.register(i,a),[n,i,l.length,a]),Qe(()=>n._subjects.array.subscribe({next:({values:e,name:t})=>{if(t===i||!t){const t=Re(e,i);Array.isArray(t)&&(u(t),c.current=t.map(Vt))}}}).unsubscribe,[n,i]);const d=r.useCallback(e=>{h.current=!0,n._setFieldArray(i,e)},[n,i]);return r.useEffect(()=>{if(n._state.action=!1,Pt(i,n._names)&&n._subjects.state.next({...n._formState}),h.current&&(!Ot(n._options.mode).isOnSubmit||n._formState.isSubmitted)&&!Ot(n._options.reValidateMode).isOnSubmit)if(n._options.resolver)n._runSchema([i]).then(e=>{n._updateIsValidating([i]);const t=Re(e.errors,i),r=Re(n._formState.errors,i);(r?!t&&r.type||t&&(r.type!==t.type||r.message!==t.message):t&&t.type)&&(t?Me(n._formState.errors,i,t):gt(n._formState.errors,i),n._subjects.state.next({errors:n._formState.errors}))});else{const e=Re(n._fields,i);!e||!e._f||Ot(n._options.reValidateMode).isOnSubmit&&Ot(n._options.mode).isOnSubmit||zt(e,n._names.disabled,n._formValues,n._options.criteriaMode===Ve,n._options.shouldUseNativeValidation,!0).then(e=>!ut(e)&&n._subjects.state.next({errors:Dt(n._formState.errors,e,i)}))}n._subjects.state.next({name:i,values:Ae(n._formValues)}),n._names.focus&&Mt(n._fields,(e,t)=>{if(n._names.focus&&t.startsWith(n._names.focus)&&e.focus)return e.focus(),1}),n._names.focus="",n._setValid(),h.current=!1},[l,i,n]),r.useEffect(()=>(!Re(n._formValues,i)&&n._setFieldArray(i),()=>{n._options.shouldUnregister||o?n.unregister(i):((e,t)=>{const r=Re(n._fields,e);r&&r._f&&(r._f.mount=t)})(i,!1)}),[i,n,s,o]),{swap:r.useCallback((e,t)=>{const r=n._getFieldArray(i);Zt(r,e,t),Zt(c.current,e,t),d(r),u(r),n._setFieldArray(i,r,Zt,{argA:e,argB:t},!1)},[d,i,n]),move:r.useCallback((e,t)=>{const r=n._getFieldArray(i);qt(r,e,t),qt(c.current,e,t),d(r),u(r),n._setFieldArray(i,r,qt,{argA:e,argB:t},!1)},[d,i,n]),prepend:r.useCallback((e,t)=>{const r=ot(Ae(e)),s=Ht(n._getFieldArray(i),r);n._names.focus=Ut(i,0,t),c.current=Ht(c.current,r.map(Vt)),d(s),u(s),n._setFieldArray(i,s,Ht,{argA:Gt(e)})},[d,i,n]),append:r.useCallback((e,t)=>{const r=ot(Ae(e)),s=Bt(n._getFieldArray(i),r);n._names.focus=Ut(i,s.length-1,t),c.current=Bt(c.current,r.map(Vt)),d(s),u(s),n._setFieldArray(i,s,Bt,{argA:Gt(e)})},[d,i,n]),remove:r.useCallback(e=>{const t=Wt(n._getFieldArray(i),e);c.current=Wt(c.current,e),d(t),u(t),!Array.isArray(Re(n._fields,i))&&Me(n._fields,i,void 0),n._setFieldArray(i,t,Wt,{argA:e})},[d,i,n]),insert:r.useCallback((e,t,r)=>{const s=ot(Ae(t)),o=$t(n._getFieldArray(i),e,s);n._names.focus=Ut(i,e,r),c.current=$t(c.current,e,s.map(Vt)),d(o),u(o),n._setFieldArray(i,o,$t,{argA:e,argB:Gt(t)})},[d,i,n]),update:r.useCallback((e,t)=>{const r=Ae(t),s=Kt(n._getFieldArray(i),e,r);c.current=[...s].map((t,n)=>t&&n!==e?c.current[n]:Vt()),d(s),u([...s]),n._setFieldArray(i,s,Kt,{argA:e,argB:r},!0,!1)},[d,i,n]),replace:r.useCallback(e=>{const t=ot(Ae(e));c.current=t.map(Vt),d([...t]),u([...t]),n._setFieldArray(i,[...t],e=>e,{},!0,!1)},[d,i,n]),fields:r.useMemo(()=>l.map((e,t)=>({...e,[s]:c.current[t]||Vt()})),[l,s])}}function Yt(e={}){const t=r.useRef(void 0),n=r.useRef(void 0),[i,s]=r.useState({isDirty:!1,isValidating:!1,isLoading:Pe(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Pe(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:i},e.defaultValues&&!Pe(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:n,...r}=jt(e);t.current={...r,formState:i}}const o=t.current.control;return o._options=e,Qe(()=>{const e=o._subscribe({formState:o._proxyFormState,callback:()=>s({...o._formState}),reRenderRoot:!0});return s(e=>({...e,isReady:!0})),o._formState.isReady=!0,e},[o]),r.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),r.useEffect(()=>{e.mode&&(o._options.mode=e.mode),e.reValidateMode&&(o._options.reValidateMode=e.reValidateMode)},[o,e.mode,e.reValidateMode]),r.useEffect(()=>{e.errors&&(o._setErrors(e.errors),o._focusError())},[o,e.errors]),r.useEffect(()=>{e.shouldUnregister&&o._subjects.state.next({values:o._getWatch()})},[o,e.shouldUnregister]),r.useEffect(()=>{if(o._proxyFormState.isDirty){const e=o._getDirty();e!==i.isDirty&&o._subjects.state.next({isDirty:e})}},[o,i.isDirty]),r.useEffect(()=>{var t;e.values&&!nt(e.values,n.current)?(o._reset(e.values,{keepFieldsRef:!0,...o._options.resetOptions}),(null===(t=o._options.resetOptions)||void 0===t?void 0:t.keepIsValid)||o._setValid(),n.current=e.values,s(e=>({...e}))):o._resetDefaultValues()},[o,e.values]),r.useEffect(()=>{o._state.mount||(o._setValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),t.current.formState=Ye(i,o),t.current}const Qt=({sx:t,...n})=>e(X,{variant:"body1",sx:{color:"var(--color-white)",cursor:"default",...t},...n}),Jt=W(q)({padding:0,marginRight:"5px",marginLeft:"10px","& .MuiSvgIcon-root":{color:"var(--color-orange-medium)"}});function en({label:t,name:r,...i}){const s=n.useId(),{control:o,setValue:a,watch:l}=Ke(),u=l(r),c=`${s}-${r}-${String(u)}`;return e(it,{control:o,name:r,render:({field:n})=>{const{value:r,name:s}=n;return t?e(H,{color:"white",control:e(Jt,{...i,checked:r,onChange:(e,t)=>{a(s,t,{shouldValidate:!0})}}),label:e(Qt,{children:t})}):e(Jt,{...i,checked:r,onChange:(e,t)=>{a(s,t,{shouldValidate:!0})}})}},c)}function tn({form:t,sx:n={},onSubmit:r,children:i}){const{handleSubmit:s}=t;return e(Xe,{...t,children:e(x,{component:"form",sx:{display:"grid",gap:"15px",...n},onSubmit:s(r),children:i})})}const nn=()=>Ke(),rn=t=>e(N,{size:"small",...t});function sn({name:t,items:r,label:i,sx:s,getLabel:o,getValue:a,getKey:l}){const{watch:u,resetField:c,setValue:h}=Ke(),d=u(t),f=n.useId(),p=r.find(e=>a(e)===d)??null;return e(D,{value:p,options:r,id:f,getOptionLabel:e=>o(e),getOptionKey:e=>l(e),sx:{minWidth:150,...s},size:"small",onChange:(e,n)=>{n?h(t,a(n)):c(t)},renderInput:t=>e(rn,{...t,label:i})})}function on(t){const{name:r,type:i}=t,s=n.useId(),{control:o}=Ke();return e(it,{name:r,control:o,render:({field:n})=>e(rn,{id:s,size:"small",...t,...n,onChange:e=>{const{target:t}=e,{value:r}=t;if("number"===i)""===r?n.onChange():n.onChange(Number(r));else n.onChange(e)}})})}const an="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function ln(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function un(e){return"nodeType"in e}function cn(e){var t,n;return e?ln(e)?e:un(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function hn(e){const{Document:t}=cn(e);return e instanceof t}function dn(e){return!ln(e)&&e instanceof cn(e).HTMLElement}function fn(e){return e instanceof cn(e).SVGElement}function pn(e){return e?ln(e)?e.document:un(e)?hn(e)?e:dn(e)||fn(e)?e.ownerDocument:document:document:document}const gn=an?i:s;function mn(e){const t=o(e);return gn(()=>{t.current=e}),l(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}function _n(e,t){void 0===t&&(t=[e]);const n=o(e);return gn(()=>{n.current!==e&&(n.current=e)},t),n}function yn(e,t){const n=o();return a(()=>{const t=e(n.current);return n.current=t,t},[...t])}function vn(e){const t=mn(e),n=o(null),r=l(e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e},[]);return[n,r]}function bn(e){const t=o();return s(()=>{t.current=e},[e]),t.current}let xn={};function wn(e,t){return a(()=>{if(t)return t;const n=null==xn[e]?0:xn[e]+1;return xn[e]=n,e+"-"+n},[e,t])}function En(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce((t,n)=>{const r=Object.entries(n);for(const[n,i]of r){const r=t[n];null!=r&&(t[n]=r+e*i)}return t},{...t})}}const An=En(1),Sn=En(-1);function Tn(e){if(!e)return!1;const{KeyboardEvent:t}=cn(e.target);return t&&e instanceof t}function kn(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=cn(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 On=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[On.Translate.toString(e),On.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Rn="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Cn(e){return e.matches(Rn)?e:e.querySelector(Rn)}const Pn={display:"none"};function Mn(e){let{id:t,value:n}=e;return r.createElement("div",{id:t,style:Pn},n)}function Nn(e){let{id:t,announcement:n,ariaLiveType:i="assertive"}=e;return r.createElement("div",{id:t,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":i,"aria-atomic":!0},n)}const Dn=c(null);const Fn={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 "},In={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 zn(e){let{announcements:t=In,container:n,hiddenTextDescribedById:i,screenReaderInstructions:o=Fn}=e;const{announce:c,announcement:h}=function(){const[e,t]=u("");return{announce:l(e=>{null!=e&&t(e)},[]),announcement:e}}(),d=wn("DndLiveRegion"),[p,g]=u(!1);if(s(()=>{g(!0)},[]),function(e){const t=f(Dn);s(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}(a(()=>({onDragStart(e){let{active:n}=e;c(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&c(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;c(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;c(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;c(t.onDragCancel({active:n,over:r}))}}),[c,t])),!p)return null;const m=r.createElement(r.Fragment,null,r.createElement(Mn,{id:i,value:o.draggable}),r.createElement(Nn,{id:d,announcement:h}));return n?Q(m,n):m}var Ln;function jn(){}!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"}(Ln||(Ln={}));const Vn=Object.freeze({x:0,y:0});function Un(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Bn(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function Gn(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function $n(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 qn=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=$n(t,t.left,t.top),s=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=Un($n(r),i);s.push({id:t,data:{droppableContainer:e,value:n}})}}return s.sort(Bn)};function Hn(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),s=Math.min(t.top+t.height,e.top+e.height),o=i-r,a=s-n;if(r<i&&n<s){const n=t.width*t.height,r=e.width*e.height,i=o*a;return Number((i/(n+r-i)).toFixed(4))}return 0}const Wn=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=[];for(const e of r){const{id:r}=e,s=n.get(r);if(s){const n=Hn(s,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(Gn)};function Zn(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Vn}function Kn(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.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 Xn=Kn(1);const Yn={ignoreTransform:!1};function Qn(e,t){void 0===t&&(t=Yn);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:r}=cn(e).getComputedStyle(e);t&&(n=function(e,t,n){const r=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(!r)return e;const{scaleX:i,scaleY:s,x:o,y:a}=r,l=e.left-o-(1-i)*parseFloat(n),u=e.top-a-(1-s)*parseFloat(n.slice(n.indexOf(" ")+1)),c=i?e.width/i: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,r))}const{top:r,left:i,width:s,height:o,bottom:a,right:l}=n;return{top:r,left:i,width:s,height:o,bottom:a,right:l}}function Jn(e){return Qn(e,{ignoreTransform:!0})}function er(e,t){const n=[];return e?function r(i){if(null!=t&&n.length>=t)return n;if(!i)return n;if(hn(i)&&null!=i.scrollingElement&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!dn(i)||fn(i))return n;if(n.includes(i))return n;const s=cn(e).getComputedStyle(i);return i!==e&&function(e,t){void 0===t&&(t=cn(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const r=t[e];return"string"==typeof r&&n.test(r)})}(i,s)&&n.push(i),function(e,t){return void 0===t&&(t=cn(e).getComputedStyle(e)),"fixed"===t.position}(i,s)?n:r(i.parentNode)}(e):n}function tr(e){const[t]=er(e,1);return null!=t?t:null}function nr(e){return an&&e?ln(e)?e:un(e)?hn(e)||e===pn(e).scrollingElement?window:dn(e)?e:null:null:null}function rr(e){return ln(e)?e.scrollX:e.scrollLeft}function ir(e){return ln(e)?e.scrollY:e.scrollTop}function sr(e){return{x:rr(e),y:ir(e)}}var or;function ar(e){return!(!an||!e)&&e===document.scrollingElement}function lr(e){const t={x:0,y:0},n=ar(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(or||(or={}));const ur={x:.2,y:.2};function cr(e,t,n,r,i){let{top:s,left:o,right:a,bottom:l}=n;void 0===r&&(r=10),void 0===i&&(i=ur);const{isTop:u,isBottom:c,isLeft:h,isRight:d}=lr(e),f={x:0,y:0},p={x:0,y:0},g=t.height*i.y,m=t.width*i.x;return!u&&s<=t.top+g?(f.y=or.Backward,p.y=r*Math.abs((t.top+g-s)/g)):!c&&l>=t.bottom-g&&(f.y=or.Forward,p.y=r*Math.abs((t.bottom-g-l)/g)),!d&&a>=t.right-m?(f.x=or.Forward,p.x=r*Math.abs((t.right-m-a)/m)):!h&&o<=t.left+m&&(f.x=or.Backward,p.x=r*Math.abs((t.left+m-o)/m)),{direction:f,speed:p}}function hr(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:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function dr(e){return e.reduce((e,t)=>An(e,sr(t)),Vn)}const fr=[["x",["left","right"],function(e){return e.reduce((e,t)=>e+rr(t),0)}],["y",["top","bottom"],function(e){return e.reduce((e,t)=>e+ir(t),0)}]];class pr{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=er(t),r=dr(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,i]of fr)for(const s of t)Object.defineProperty(this,s,{get:()=>{const t=i(n),o=r[e]-t;return this.rect[s]+o},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class gr{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 r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function mr(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t&&r>t.y}var _r,yr;function vr(e){e.preventDefault()}function br(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"}(_r||(_r={})),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"}(yr||(yr={}));const xr={start:[yr.Space,yr.Enter],cancel:[yr.Esc],end:[yr.Space,yr.Enter,yr.Tab]},wr=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case yr.Right:return{...n,x:n.x+25};case yr.Left:return{...n,x:n.x-25};case yr.Down:return{...n,y:n.y+25};case yr.Up:return{...n,y:n.y-25}}};class Er{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 gr(pn(t)),this.windowListeners=new gr(cn(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(_r.Resize,this.handleCancel),this.windowListeners.add(_r.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(_r.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&function(e,t){if(void 0===t&&(t=Qn),!e)return;const{top:n,left:r,bottom:i,right:s}=t(e);tr(e)&&(i<=0||s<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(n),t(Vn)}handleKeyDown(e){if(Tn(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:i=xr,coordinateGetter:s=wr,scrollBehavior:o="smooth"}=r,{code:a}=e;if(i.end.includes(a))return void this.handleEnd(e);if(i.cancel.includes(a))return void this.handleCancel(e);const{collisionRect:l}=n.current,u=l?{x:l.left,y:l.top}:Vn;this.referenceCoordinates||(this.referenceCoordinates=u);const c=s(e,{active:t,context:n.current,currentCoordinates:u});if(c){const t=Sn(c,u),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(const n of i){const i=e.code,{isTop:s,isRight:a,isLeft:l,isBottom:u,maxScroll:h,minScroll:d}=lr(n),f=hr(n),p={x:Math.min(i===yr.Right?f.right-f.width/2:f.right,Math.max(i===yr.Right?f.left:f.left+f.width/2,c.x)),y:Math.min(i===yr.Down?f.bottom-f.height/2:f.bottom,Math.max(i===yr.Down?f.top:f.top+f.height/2,c.y))},g=i===yr.Right&&!a||i===yr.Left&&!l,m=i===yr.Down&&!u||i===yr.Up&&!s;if(g&&p.x!==c.x){const e=n.scrollLeft+t.x,s=i===yr.Right&&e<=h.x||i===yr.Left&&e>=d.x;if(s&&!t.y)return void n.scrollTo({left:e,behavior:o});r.x=s?n.scrollLeft-e:i===yr.Right?n.scrollLeft-h.x:n.scrollLeft-d.x,r.x&&n.scrollBy({left:-r.x,behavior:o});break}if(m&&p.y!==c.y){const e=n.scrollTop+t.y,s=i===yr.Down&&e<=h.y||i===yr.Up&&e>=d.y;if(s&&!t.x)return void n.scrollTo({top:e,behavior:o});r.y=s?n.scrollTop-e:i===yr.Down?n.scrollTop-h.y:n.scrollTop-d.y,r.y&&n.scrollBy({top:-r.y,behavior:o});break}}this.handleMove(e,An(Sn(c,this.referenceCoordinates),r))}}}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 Ar(e){return Boolean(e&&"distance"in e)}function Sr(e){return Boolean(e&&"delay"in e)}Er.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=xr,onActivation:i}=t,{active:s}=n;const{code:o}=e.nativeEvent;if(r.start.includes(o)){const t=s.activatorNode.current;return(!t||e.target===t)&&(e.preventDefault(),null==i||i({event:e.nativeEvent}),!0)}return!1}}];class Tr{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=cn(e);return e instanceof t?e:pn(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:i}=e,{target:s}=i;this.props=e,this.events=t,this.document=pn(s),this.documentListeners=new gr(this.document),this.listeners=new gr(n),this.windowListeners=new gr(cn(s)),this.initialCoordinates=null!=(r=kn(i))?r:Vn,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(_r.Resize,this.handleCancel),this.windowListeners.add(_r.DragStart,vr),this.windowListeners.add(_r.VisibilityChange,this.handleCancel),this.windowListeners.add(_r.ContextMenu,vr),this.documentListeners.add(_r.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Sr(t))return this.timeoutId=setTimeout(this.handleStart,t.delay),void this.handlePending(t);if(Ar(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:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(_r.Click,br,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(_r.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:i}=this,{onMove:s,options:{activationConstraint:o}}=i;if(!r)return;const a=null!=(t=kn(e))?t:Vn,l=Sn(r,a);if(!n&&o){if(Ar(o)){if(null!=o.tolerance&&mr(l,o.tolerance))return this.handleCancel();if(mr(l,o.distance))return this.handleStart()}return Sr(o)&&mr(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===yr.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const kr={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Or extends Tr{constructor(e){const{event:t}=e,n=pn(t.target);super(e,kr,n)}}Or.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!(!n.isPrimary||0!==n.button)&&(null==r||r({event:n}),!0)}}];const Rr={move:{name:"mousemove"},end:{name:"mouseup"}};var Cr;!function(e){e[e.RightClick=2]="RightClick"}(Cr||(Cr={}));(class extends Tr{constructor(e){super(e,Rr,pn(e.event.target))}}).activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==Cr.RightClick&&(null==r||r({event:n}),!0)}}];const Pr={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};var Mr,Nr;function Dr(e){let{acceleration:t,activator:n=Mr.Pointer,canScroll:r,draggingRect:i,enabled:u,interval:c=5,order:h=Nr.TreeOrder,pointerCoordinates:d,scrollableAncestors:f,scrollableAncestorRects:p,delta:g,threshold:m}=e;const _=function(e){let{delta:t,disabled:n}=e;const r=bn(t);return yn(e=>{if(n||!r||!e)return Fr;const i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[or.Backward]:e.x[or.Backward]||-1===i.x,[or.Forward]:e.x[or.Forward]||1===i.x},y:{[or.Backward]:e.y[or.Backward]||-1===i.y,[or.Forward]:e.y[or.Forward]||1===i.y}}},[n,t,r])}({delta:g,disabled:!u}),[y,v]=function(){const e=o(null);return[l((t,n)=>{e.current=setInterval(t,n)},[]),l(()=>{null!==e.current&&(clearInterval(e.current),e.current=null)},[])]}(),b=o({x:0,y:0}),x=o({x:0,y:0}),w=a(()=>{switch(n){case Mr.Pointer:return d?{top:d.y,bottom:d.y,left:d.x,right:d.x}:null;case Mr.DraggableRect:return i}},[n,i,d]),E=o(null),A=l(()=>{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)},[]),S=a(()=>h===Nr.TreeOrder?[...f].reverse():f,[h,f]);s(()=>{if(u&&f.length&&w){for(const e of S){if(!1===(null==r?void 0:r(e)))continue;const n=f.indexOf(e),i=p[n];if(!i)continue;const{direction:s,speed:o}=cr(e,i,w,t,m);for(const e of["x","y"])_[e][s[e]]||(o[e]=0,s[e]=0);if(o.x>0||o.y>0)return v(),E.current=e,y(A,c),b.current=o,void(x.current=s)}b.current={x:0,y:0},x.current={x:0,y:0},v()}else v()},[t,A,r,v,u,c,JSON.stringify(w),JSON.stringify(_),y,f,S,p,JSON.stringify(m)])}(class extends Tr{constructor(e){super(e,Pr)}static setup(){return window.addEventListener(Pr.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Pr.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:i}=n;return!(i.length>1)&&(null==r||r({event:n}),!0)}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(Mr||(Mr={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(Nr||(Nr={}));const Fr={x:{[or.Backward]:!1,[or.Forward]:!1},y:{[or.Backward]:!1,[or.Forward]:!1}};var Ir,zr;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(Ir||(Ir={})),function(e){e.Optimized="optimized"}(zr||(zr={}));const Lr=new Map;function jr(e,t){return yn(n=>e?n||("function"==typeof t?t(e):e):null,[t,e])}function Vr(e){let{callback:t,disabled:n}=e;const r=mn(t),i=a(()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(r)},[n]);return s(()=>()=>null==i?void 0:i.disconnect(),[i]),i}function Ur(e){return new pr(Qn(e),e)}function Br(e,t,n){void 0===t&&(t=Ur);const[r,i]=u(null);function o(){i(r=>{if(!e)return null;var i;if(!1===e.isConnected)return null!=(i=null!=r?r:n)?i:null;const s=t(e);return JSON.stringify(r)===JSON.stringify(s)?r:s})}const l=function(e){let{callback:t,disabled:n}=e;const r=mn(t),i=a(()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(r)},[r,n]);return s(()=>()=>null==i?void 0:i.disconnect(),[i]),i}({callback(t){if(e)for(const n of t){const{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){o();break}}}}),c=Vr({callback:o});return gn(()=>{o(),e?(null==c||c.observe(e),null==l||l.observe(document.body,{childList:!0,subtree:!0})):(null==c||c.disconnect(),null==l||l.disconnect())},[e]),r}const Gr=[];function $r(e,t){void 0===t&&(t=[]);const n=o(null);return s(()=>{n.current=null},t),s(()=>{const t=e!==Vn;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?Sn(e,n.current):Vn}function qr(e){return a(()=>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 Hr=[];function Wr(e){let{measure:t}=e;const[n,r]=u(null),i=l(e=>{for(const{target:n}of e)if(dn(n)){r(e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t]),s=Vr({callback:i}),o=l(e=>{const n=function(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return dn(t)?t:e}(e);null==s||s.disconnect(),n&&(null==s||s.observe(n)),r(n?t(n):null)},[t,s]),[c,h]=vn(o);return a(()=>({nodeRef:c,rect:n,setRef:h}),[n,c,h])}const Zr=[{sensor:Or,options:{}},{sensor:Er,options:{}}],Kr={current:{}},Xr={draggable:{measure:Jn},droppable:{measure:Jn,strategy:Ir.WhileDragging,frequency:zr.Optimized},dragOverlay:{measure:Qn}};class Yr 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 Qr={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Yr,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:jn},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Xr,measureDroppableContainers:jn,windowRect:null,measuringScheduled:!1},Jr=c({activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:jn,draggableNodes:new Map,over:null,measureDroppableContainers:jn}),ei=c(Qr);function ti(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Yr}}}function ni(e,t){switch(t.type){case Ln.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Ln.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 Ln.DragEnd:case Ln.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Ln.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new Yr(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case Ln.SetDroppableDisabled:{const{id:n,key:r,disabled:i}=t,s=e.droppable.containers.get(n);if(!s||r!==s.key)return e;const o=new Yr(e.droppable.containers);return o.set(n,{...s,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case Ln.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const s=new Yr(e.droppable.containers);return s.delete(n),{...e,droppable:{...e.droppable,containers:s}}}default:return e}}function ri(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=f(Jr),o=bn(r),a=bn(null==n?void 0:n.id);return s(()=>{if(!t&&!r&&o&&null!=a){if(!Tn(o))return;if(document.activeElement===o.target)return;const e=i.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=Cn(e);if(t){t.focus();break}}})}},[r,t,i,a,o]),null}const ii=c({...Vn,scaleX:1,scaleY:1});var si;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(si||(si={}));const oi=h(function(e){var t,n,i,c;let{id:h,accessibility:f,autoScroll:p=!0,children:g,sensors:m=Zr,collisionDetection:_=Wn,measuring:y,modifiers:v,...b}=e;const x=d(ni,void 0,ti),[w,E]=x,[A,S]=function(){const[e]=u(()=>new Set),t=l(t=>(e.add(t),()=>e.delete(t)),[e]);return[l(t=>{let{type:n,event:r}=t;e.forEach(e=>{var t;return null==(t=e[n])?void 0:t.call(e,r)})},[e]),t]}(),[T,k]=u(si.Uninitialized),O=T===si.Initialized,{draggable:{active:R,nodes:C,translate:P},droppable:{containers:M}}=w,N=null!=R?C.get(R):null,D=o({initial:null,translated:null}),F=a(()=>{var e;return null!=R?{id:R,data:null!=(e=null==N?void 0:N.data)?e:Kr,rect:D}:null},[R,N]),I=o(null),[z,L]=u(null),[j,V]=u(null),U=_n(b,Object.values(b)),B=wn("DndDescribedBy",h),G=a(()=>M.getEnabled(),[M]),$=a(()=>({draggable:{...Xr.draggable,...null==q?void 0:q.draggable},droppable:{...Xr.droppable,...null==q?void 0:q.droppable},dragOverlay:{...Xr.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:H,measureDroppableContainers:W,measuringScheduled:Z}=function(e,t){let{dragging:n,dependencies:r,config:i}=t;const[a,c]=u(null),{frequency:h,measure:d,strategy:f}=i,p=o(e),g=function(){switch(f){case Ir.Always:return!1;case Ir.BeforeDragging:return n;default:return!n}}(),m=_n(g),_=l(function(e){void 0===e&&(e=[]),m.current||c(t=>null===t?e:t.concat(e.filter(e=>!t.includes(e))))},[m]),y=o(null),v=yn(t=>{if(g&&!n)return Lr;if(!t||t===Lr||p.current!==e||null!=a){const t=new Map;for(let n of e){if(!n)continue;if(a&&a.length>0&&!a.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,r=e?new pr(d(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,a,n,g,d]);return s(()=>{p.current=e},[e]),s(()=>{g||_()},[n,g]),s(()=>{a&&a.length>0&&c(null)},[JSON.stringify(a)]),s(()=>{g||"number"!=typeof h||null!==y.current||(y.current=setTimeout(()=>{_(),y.current=null},h))},[h,g,_,...r]),{droppableRects:v,measureDroppableContainers:_,measuringScheduled:null!=a}}(G,{dragging:O,dependencies:[P.x,P.y],config:$.droppable}),K=function(e,t){const n=null!=t?e.get(t):void 0,r=n?n.node.current:null;return yn(e=>{var n;return null==t?null:null!=(n=null!=r?r:e)?n:null},[r,t])}(C,R),X=a(()=>j?kn(j):null,[j]),Q=function(){const e=!1===(null==z?void 0:z.autoScrollEnabled),t="object"==typeof p?!1===p.enabled:!1===p,n=O&&!e&&!t;if("object"==typeof p)return{...p,enabled:n};return{enabled:n}}(),J=function(e,t){return jr(e,t)}(K,$.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e;const s=o(!1),{x:a,y:l}="boolean"==typeof i?{x:i,y:i}:i;gn(()=>{if(!a&&!l||!t)return void(s.current=!1);if(s.current||!r)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const i=Zn(n(e),r);if(a||(i.x=0),l||(i.y=0),s.current=!0,Math.abs(i.x)>0||Math.abs(i.y)>0){const t=tr(e);t&&t.scrollBy({top:i.y,left:i.x})}},[t,a,l,r,n])}({activeNode:null!=R?C.get(R):null,config:Q.layoutShiftCompensation,initialRect:J,measure:$.draggable.measure});const ee=Br(K,$.draggable.measure,J),te=Br(K?K.parentElement:null),ne=o({activatorEvent:null,active:null,activeNode:K,collisionRect:null,collisions:null,droppableRects:H,draggableNodes:C,draggingNode:null,draggingNodeRect:null,droppableContainers:M,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),re=M.getNodeFor(null==(t=ne.current.over)?void 0:t.id),ie=Wr({measure:$.dragOverlay.measure}),se=null!=(n=ie.nodeRef.current)?n:K,oe=O?null!=(i=ie.rect)?i:ee:null,ae=Boolean(ie.nodeRef.current&&ie.rect),le=Zn(ue=ae?null:ee,jr(ue));var ue;const ce=qr(se?cn(se):null),he=function(e){const t=o(e),n=yn(n=>e?n&&n!==Gr&&e&&t.current&&e.parentNode===t.current.parentNode?n:er(e):Gr,[e]);return s(()=>{t.current=e},[e]),n}(O?null!=re?re:K:null),de=function(e,t){void 0===t&&(t=Qn);const[n]=e,r=qr(n?cn(n):null),[i,s]=u(Hr);function o(){s(()=>e.length?e.map(e=>ar(e)?r:new pr(t(e),e)):Hr)}const a=Vr({callback:o});return gn(()=>{null==a||a.disconnect(),o(),e.forEach(e=>null==a?void 0:a.observe(e))},[e]),i}(he),fe=function(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}(v,{transform:{x:P.x-le.x,y:P.y-le.y,scaleX:1,scaleY:1},activatorEvent:j,active:F,activeNodeRect:ee,containerNodeRect:te,draggingNodeRect:oe,over:ne.current.over,overlayNodeRect:ie.rect,scrollableAncestors:he,scrollableAncestorRects:de,windowRect:ce}),pe=X?An(X,P):null,ge=function(e){const[t,n]=u(null),r=o(e),i=l(e=>{const t=nr(e.target);t&&n(e=>e?(e.set(t,sr(t)),new Map(e)):null)},[]);return s(()=>{const t=r.current;if(e!==t){s(t);const o=e.map(e=>{const t=nr(e);return t?(t.addEventListener("scroll",i,{passive:!0}),[t,sr(t)]):null}).filter(e=>null!=e);n(o.length?new Map(o):null),r.current=e}return()=>{s(e),s(t)};function s(e){e.forEach(e=>{const t=nr(e);null==t||t.removeEventListener("scroll",i)})}},[i,e]),a(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>An(e,t),Vn):dr(e):Vn,[e,t])}(he),me=$r(ge),_e=$r(ge,[ee]),ye=An(fe,me),ve=oe?Xn(oe,fe):null,be=F&&ve?_({active:F,collisionRect:ve,droppableRects:H,droppableContainers:G,pointerCoordinates:pe}):null,xe=function(e,t){if(!e||0===e.length)return null;const[n]=e;return n[t]}(be,"id"),[we,Ee]=u(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:An(fe,_e),null!=(c=null==we?void 0:we.rect)?c:null,ee),Se=o(null),Te=l((e,t)=>{let{sensor:n,options:r}=t;if(null==I.current)return;const i=C.get(I.current);if(!i)return;const s=e.nativeEvent,o=new n({active:I.current,activeNode:i,event:s,options:r,context:ne,onAbort(e){if(!C.get(e))return;const{onDragAbort:t}=U.current,n={id:e};null==t||t(n),A({type:"onDragAbort",event:n})},onPending(e,t,n,r){if(!C.get(e))return;const{onDragPending:i}=U.current,s={id:e,constraint:t,initialCoordinates:n,offset:r};null==i||i(s),A({type:"onDragPending",event:s})},onStart(e){const t=I.current;if(null==t)return;const n=C.get(t);if(!n)return;const{onDragStart:r}=U.current,i={activatorEvent:s,active:{id:t,data:n.data,rect:D}};Y(()=>{null==r||r(i),k(si.Initializing),E({type:Ln.DragStart,initialCoordinates:e,active:t}),A({type:"onDragStart",event:i}),L(Se.current),V(s)})},onMove(e){E({type:Ln.DragMove,coordinates:e})},onEnd:a(Ln.DragEnd),onCancel:a(Ln.DragCancel)});function a(e){return async function(){const{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=ne.current;let o=null;if(t&&i){const{cancelDrop:a}=U.current;if(o={activatorEvent:s,active:t,collisions:n,delta:i,over:r},e===Ln.DragEnd&&"function"==typeof a){await Promise.resolve(a(o))&&(e=Ln.DragCancel)}}I.current=null,Y(()=>{E({type:e}),k(si.Uninitialized),Ee(null),L(null),V(null),Se.current=null;const t=e===Ln.DragEnd?"onDragEnd":"onDragCancel";if(o){const e=U.current[t];null==e||e(o),A({type:t,event:o})}})}}Se.current=o},[C]),ke=l((e,t)=>(n,r)=>{const i=n.nativeEvent,s=C.get(r);if(null!==I.current||!s||i.dndKit||i.defaultPrevented)return;const o={active:s};!0===e(n,t.options,o)&&(i.dndKit={capturedBy:t.sensor},I.current=r,Te(n,t))},[C,Te]),Oe=function(e,t){return a(()=>e.reduce((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}))]},[]),[e,t])}(m,ke);!function(e){s(()=>{if(!an)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),gn(()=>{ee&&T===si.Initializing&&k(si.Initialized)},[ee,T]),s(()=>{const{onDragMove:e}=U.current,{active:t,activatorEvent:n,collisions:r,over:i}=ne.current;if(!t||!n)return;const s={active:t,activatorEvent:n,collisions:r,delta:{x:ye.x,y:ye.y},over:i};Y(()=>{null==e||e(s),A({type:"onDragMove",event:s})})},[ye.x,ye.y]),s(()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:i}=ne.current;if(!e||null==I.current||!t||!i)return;const{onDragOver:s}=U.current,o=r.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:i.x,y:i.y},over:a};Y(()=>{Ee(a),null==s||s(l),A({type:"onDragOver",event:l})})},[xe]),gn(()=>{ne.current={activatorEvent:j,active:F,activeNode:K,collisionRect:ve,collisions:be,droppableRects:H,draggableNodes:C,draggingNode:se,draggingNodeRect:oe,droppableContainers:M,over:we,scrollableAncestors:he,scrollAdjustedTranslate:ye},D.current={initial:oe,translated:ve}},[F,K,be,ve,C,se,oe,H,M,we,he,ye]),Dr({...Q,delta:P,draggingRect:ve,pointerCoordinates:pe,scrollableAncestors:he,scrollableAncestorRects:de});const Re=a(()=>({active:F,activeNode:K,activeNodeRect:ee,activatorEvent:j,collisions:be,containerNodeRect:te,dragOverlay:ie,draggableNodes:C,droppableContainers:M,droppableRects:H,over:we,measureDroppableContainers:W,scrollableAncestors:he,scrollableAncestorRects:de,measuringConfiguration:$,measuringScheduled:Z,windowRect:ce}),[F,K,ee,j,be,te,ie,C,M,H,we,W,he,de,$,Z,ce]),Ce=a(()=>({activatorEvent:j,activators:Oe,active:F,activeNodeRect:ee,ariaDescribedById:{draggable:B},dispatch:E,draggableNodes:C,over:we,measureDroppableContainers:W}),[j,Oe,F,ee,E,B,C,we,W]);return r.createElement(Dn.Provider,{value:S},r.createElement(Jr.Provider,{value:Ce},r.createElement(ei.Provider,{value:Re},r.createElement(ii.Provider,{value:Ae},g)),r.createElement(ri,{disabled:!1===(null==f?void 0:f.restoreFocus)})),r.createElement(zn,{...f,hiddenTextDescribedById:B}))}),ai=c(null),li="button";function ui(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const s=wn("Draggable"),{activators:o,activatorEvent:l,active:u,activeNodeRect:c,ariaDescribedById:h,draggableNodes:d,over:p}=f(Jr),{role:g=li,roleDescription:m="draggable",tabIndex:_=0}=null!=i?i:{},y=(null==u?void 0:u.id)===t,v=f(y?ii:ai),[b,x]=vn(),[w,E]=vn(),A=function(e,t){return a(()=>e.reduce((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e},{}),[e,t])}(o,t),S=_n(n);gn(()=>(d.set(t,{id:t,key:s,node:b,activatorNode:w,data:S}),()=>{const e=d.get(t);e&&e.key===s&&d.delete(t)}),[d,t]);return{active:u,activatorEvent:l,activeNodeRect:c,attributes:a(()=>({role:g,tabIndex:_,"aria-disabled":r,"aria-pressed":!(!y||g!==li)||void 0,"aria-roledescription":m,"aria-describedby":h.draggable}),[r,g,_,y,m,h.draggable]),isDragging:y,listeners:r?void 0:A,node:b,over:p,setNodeRef:x,setActivatorNodeRef:E,transform:v}}const ci={timeout:25};function hi(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function di(e,t){return e.reduce((e,n,r)=>{const i=t.get(n);return i&&(e[r]=i),e},Array(e.length))}function fi(e){return null!==e&&e>=0}const pi=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e;const s=hi(t,r,n),o=t[i],a=s[i];return a&&o?{x:a.left-o.left,y:a.top-o.top,scaleX:a.width/o.width,scaleY:a.height/o.height}:null},gi={scaleX:1,scaleY:1},mi=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:i,rects:s,overIndex:o}=e;const a=null!=(t=s[n])?t:r;if(!a)return null;if(i===n){const e=s[o];return e?{x:0,y:n<o?e.top+e.height-(a.top+a.height):e.top-a.top,...gi}:null}const l=function(e,t,n){const r=e[t],i=e[t-1],s=e[t+1];if(!r)return 0;if(n<t)return i?r.top-(i.top+i.height):s?s.top-(r.top+r.height):0;return s?s.top-(r.top+r.height):i?r.top-(i.top+i.height):0}(s,i,n);return i>n&&i<=o?{x:0,y:-a.height-l,...gi}:i<n&&i>=o?{x:0,y:a.height+l,...gi}:{x:0,y:0,...gi}};const _i="Sortable",yi=r.createContext({activeIndex:-1,containerId:_i,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:pi,disabled:{draggable:!1,droppable:!1}});function vi(e){let{children:t,id:n,items:i,strategy:l=pi,disabled:u=!1}=e;const{active:c,dragOverlay:h,droppableRects:d,over:p,measureDroppableContainers:g}=f(ei),m=wn(_i,n),_=Boolean(null!==h.rect),y=a(()=>i.map(e=>"object"==typeof e&&"id"in e?e.id:e),[i]),v=null!=c,b=c?y.indexOf(c.id):-1,x=p?y.indexOf(p.id):-1,w=o(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,S=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(u);gn(()=>{E&&v&&g(y)},[E,y,v,g]),s(()=>{w.current=y},[y]);const T=a(()=>({activeIndex:b,containerId:m,disabled:S,disableTransforms:A,items:y,overIndex:x,useDragOverlay:_,sortedRects:di(y,d),strategy:l}),[b,m,S.draggable,S.droppable,A,y,x,d,_,l]);return r.createElement(yi.Provider,{value:T},t)}const bi=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return hi(n,r,i).indexOf(t)},xi=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:s,newIndex:o,previousItems:a,previousContainerId:l,transition:u}=e;return!(!u||!r)&&((a===s||i!==o)&&(!!n||o!==i&&t===l))},wi={duration:200,easing:"ease"},Ei="transform",Ai=On.Transition.toString({property:Ei,duration:0,easing:"linear"}),Si={roleDescription:"sortable"};function Ti(e){let{animateLayoutChanges:t=xi,attributes:n,disabled:r,data:i,getNewIndex:c=bi,id:h,strategy:d,resizeObserverConfig:p,transition:g=wi}=e;const{items:m,containerId:_,activeIndex:y,disabled:v,disableTransforms:b,sortedRects:x,overIndex:w,useDragOverlay:E,strategy:A}=f(yi),S=function(e,t){var n,r;if("boolean"==typeof e)return{draggable:e,droppable:!1};return{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(r=null==e?void 0:e.droppable)?r:t.droppable}}(r,v),T=m.indexOf(h),k=a(()=>({sortable:{containerId:_,index:T,items:m},...i}),[_,i,T,m]),O=a(()=>m.slice(m.indexOf(h)),[m,h]),{rect:R,node:C,isOver:P,setNodeRef:M}=function(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const a=wn("Droppable"),{active:u,dispatch:c,over:h,measureDroppableContainers:d}=f(Jr),p=o({disabled:n}),g=o(!1),m=o(null),_=o(null),{disabled:y,updateMeasurementsFor:v,timeout:b}={...ci,...i},x=_n(null!=v?v:r),w=Vr({callback:l(()=>{g.current?(null!=_.current&&clearTimeout(_.current),_.current=setTimeout(()=>{d(Array.isArray(x.current)?x.current:[x.current]),_.current=null},b)):g.current=!0},[b]),disabled:y||!u}),E=l((e,t)=>{w&&(t&&(w.unobserve(t),g.current=!1),e&&w.observe(e))},[w]),[A,S]=vn(E),T=_n(t);return s(()=>{w&&A.current&&(w.disconnect(),g.current=!1,w.observe(A.current))},[A,w]),s(()=>(c({type:Ln.RegisterDroppable,element:{id:r,key:a,disabled:n,node:A,rect:m,data:T}}),()=>c({type:Ln.UnregisterDroppable,key:a,id:r})),[r]),s(()=>{n!==p.current.disabled&&(c({type:Ln.SetDroppableDisabled,id:r,key:a,disabled:n}),p.current.disabled=n)},[r,a,n,c]),{active:u,rect:m,isOver:(null==h?void 0:h.id)===r,node:A,over:h,setNodeRef:S}}({id:h,data:k,disabled:S.droppable,resizeObserverConfig:{updateMeasurementsFor:O,...p}}),{active:N,activatorEvent:D,activeNodeRect:F,attributes:I,setNodeRef:z,listeners:L,isDragging:j,over:V,setActivatorNodeRef:U,transform:B}=ui({id:h,data:k,attributes:{...Si,...n},disabled:S.draggable}),G=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a(()=>e=>{t.forEach(t=>t(e))},t)}(M,z),$=Boolean(N),q=$&&!b&&fi(y)&&fi(w),H=!E&&j,W=H&&q?B:null,Z=q?null!=W?W:(null!=d?d:A)({rects:x,activeNodeRect:F,activeIndex:y,overIndex:w,index:T}):null,K=fi(y)&&fi(w)?c({id:h,items:m,activeIndex:y,overIndex:w}):T,X=null==N?void 0:N.id,Y=o({activeId:X,items:m,newIndex:K,containerId:_}),Q=m!==Y.current.items,J=t({active:N,containerId:_,isDragging:j,isSorting:$,id:h,index:T,items:m,newIndex:Y.current.newIndex,previousItems:Y.current.items,previousContainerId:Y.current.containerId,transition:g,wasDragging:null!=Y.current.activeId}),ee=function(e){let{disabled:t,index:n,node:r,rect:i}=e;const[a,l]=u(null),c=o(n);return gn(()=>{if(!t&&n!==c.current&&r.current){const e=i.current;if(e){const t=Qn(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!==c.current&&(c.current=n)},[t,n,r,i]),s(()=>{a&&l(null)},[a]),a}({disabled:!J,index:T,node:C,rect:R});return s(()=>{$&&Y.current.newIndex!==K&&(Y.current.newIndex=K),_!==Y.current.containerId&&(Y.current.containerId=_),m!==Y.current.items&&(Y.current.items=m)},[$,K,_,m]),s(()=>{if(X===Y.current.activeId)return;if(null!=X&&null==Y.current.activeId)return void(Y.current.activeId=X);const e=setTimeout(()=>{Y.current.activeId=X},50);return()=>clearTimeout(e)},[X]),{active:N,activeIndex:y,attributes:I,data:k,rect:R,index:T,newIndex:K,items:m,isOver:P,isSorting:$,isDragging:j,listeners:L,node:C,overIndex:w,over:V,setNodeRef:G,setActivatorNodeRef:U,setDroppableNodeRef:M,setDraggableNodeRef:z,transform:null!=ee?ee:Z,transition:function(){if(ee||Q&&Y.current.newIndex===T)return Ai;if(H&&!Tn(D)||!g)return;if($||J)return On.Transition.toString({...g,property:Ei});return}()}}yr.Down,yr.Right,yr.Up,yr.Left;const ki=({id:t,sx:n,children:r})=>{const{isDragging:i}=ui({id:t}),{attributes:s,listeners:o,setNodeRef:a,transform:l,transition:u}=Ti({id:t,strategy:mi,transition:{duration:300,easing:"cubic-bezier(0.25, 1, 0.5, 1)"}}),c={...n?.default,...i?n?.dragging:{},transform:On.Translate.toString(l),transition:u,cursor:"pointer"};return e(x,{ref:a,style:c,...o,...s,children:r})};function Oi({items:t,getItem:n,getId:r,onDragEnd:i,sx:s,title:o,draggableSx:l}){const u=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a(()=>[...t].filter(e=>null!=e),[...t])}(a(()=>({sensor:c,options:null!=h?h:{}}),[c=Or,h={activationConstraint:{distance:8}}]));var c,h;return e(oi,{sensors:u,collisionDetection:qn,onDragEnd:e=>{const{active:n,over:s}=e,o=t.findIndex(e=>r(e)===n.id),a=t.findIndex(e=>r(e)===s?.id),l=hi(t,o,a);i(l)},children:e(vi,{items:t.map(r),strategy:mi,children:e(ue,{items:t,sx:s,title:o,getKey:r,getContent:(t,i)=>{const s=r(t);return e(ki,{id:s,sx:l,children:n(t,i)},s)}})})})}const Ri=c(null);function Ci(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Pi(){return function(){const e=p(Ri);if(null==e)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>");return e}().map}var Mi="production"!==process.env.NODE_ENV?{0:"Invalid value for configuration 'enforceActions', expected 'never', 'always' or 'observed'",1:function(e,t){return"Cannot apply '"+e+"' to '"+t.toString()+"': Field not found."},5:"'keys()' can only be used on observable objects, arrays, sets and maps",6:"'values()' can only be used on observable objects, arrays, sets and maps",7:"'entries()' can only be used on observable objects, arrays and maps",8:"'set()' can only be used on observable objects, arrays and maps",9:"'remove()' can only be used on observable objects, arrays and maps",10:"'has()' can only be used on observable objects, arrays and maps",11:"'get()' can only be used on observable objects, arrays and maps",12:"Invalid annotation",13:"Dynamic observable objects cannot be frozen. If you're passing observables to 3rd party component/function that calls Object.freeze, pass copy instead: toJS(observable)",14:"Intercept handlers should return nothing or a change object",15:"Observable arrays cannot be frozen. If you're passing observables to 3rd party component/function that calls Object.freeze, pass copy instead: toJS(observable)",16:"Modification exception: the internal structure of an observable array was changed.",17:function(e,t){return"[mobx.array] Index out of bounds, "+e+" is larger than "+t},18:"mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js",19:function(e){return"Cannot initialize from classes that inherit from Map: "+e.constructor.name},20:function(e){return"Cannot initialize map from "+e},21:function(e){return"Cannot convert to map from '"+e+"'"},22:"mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js",23:"It is not possible to get index atoms from arrays",24:function(e){return"Cannot obtain administration from "+e},25:function(e,t){return"the entry '"+e+"' does not exist in the observable map '"+t+"'"},26:"please specify a property",27:function(e,t){return"no observable property '"+e.toString()+"' found on the observable object '"+t+"'"},28:function(e){return"Cannot obtain atom from "+e},29:"Expecting some object",30:"invalid action stack. did you forget to finish an action?",31:"missing option for computed: get",32:function(e,t){return"Cycle detected in computation "+e+": "+t},33:function(e){return"The setter of computed value '"+e+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"},34:function(e){return"[ComputedValue '"+e+"'] It is not possible to assign a new value to a computed value."},35:"There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`",36:"isolateGlobalState should be called before MobX is running any reactions",37:function(e){return"[mobx] `observableArray."+e+"()` mutates the array in-place, which is not allowed inside a derivation. Use `array.slice()."+e+"()` instead"},38:"'ownKeys()' can only be used on observable objects",39:"'defineProperty()' can only be used on observable objects"}:{};function Ni(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if("production"!==process.env.NODE_ENV){var i="string"==typeof e?e:Mi[e];throw"function"==typeof i&&(i=i.apply(null,n)),new Error("[MobX] "+i)}throw new Error("number"==typeof e?"[MobX] minified error nr: "+e+(n.length?" "+n.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+e)}var Di={};function Fi(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:Di}var Ii=Object.assign,zi=Object.getOwnPropertyDescriptor,Li=Object.defineProperty,ji=Object.prototype,Vi=[];Object.freeze(Vi);var Ui={};Object.freeze(Ui);var Bi="undefined"!=typeof Proxy,Gi=Object.toString();function $i(){Bi||Ni("production"!==process.env.NODE_ENV?"`Proxy` objects are not available in the current environment. Please configure MobX to enable a fallback implementation.`":"Proxy not available")}function qi(e){"production"!==process.env.NODE_ENV&&Ko.verifyProxies&&Ni("MobX is currently configured to be able to run in ES5 mode, but in ES5 MobX won't be able to "+e)}function Hi(){return++Ko.mobxGuid}function Wi(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var Zi=function(){};function Ki(e){return"function"==typeof e}function Xi(e){switch(typeof e){case"string":case"symbol":case"number":return!0}return!1}function Yi(e){return null!==e&&"object"==typeof e}function Qi(e){if(!Yi(e))return!1;var t=Object.getPrototypeOf(e);if(null==t)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n.toString()===Gi}function Ji(e){var t=null==e?void 0:e.constructor;return!!t&&("GeneratorFunction"===t.name||"GeneratorFunction"===t.displayName)}function es(e,t,n){Li(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function ts(e,t,n){Li(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function ns(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(e){return Yi(e)&&!0===e[n]}}function rs(e){return null!=e&&"[object Map]"===Object.prototype.toString.call(e)}function is(e){return null!=e&&"[object Set]"===Object.prototype.toString.call(e)}var ss=void 0!==Object.getOwnPropertySymbols;var os="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:ss?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function as(e){return"string"==typeof e?e:"symbol"==typeof e?e.toString():new String(e).toString()}function ls(e){return null===e?null:"object"==typeof e?""+e:e}function us(e,t){return ji.hasOwnProperty.call(e,t)}var cs=Object.getOwnPropertyDescriptors||function(e){var t={};return os(e).forEach(function(n){t[n]=zi(e,n)}),t};function hs(e,t){return!!(e&t)}function ds(e,t,n){return n?e|=t:e&=~t,e}function fs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ps(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,vs(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function gs(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return fs(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fs(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ms(){return ms=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ms.apply(null,arguments)}function _s(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ys(e,t)}function ys(e,t){return ys=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ys(e,t)}function vs(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}var bs=Symbol("mobx-stored-annotations");function xs(e){return Object.assign(function(t,n){if(Es(n))return e.decorate_20223_(t,n);ws(t,n,e)},e)}function ws(e,t,n){(us(e,bs)||es(e,bs,ms({},e[bs])),"production"!==process.env.NODE_ENV&&Ns(n)&&!us(e[bs],t))&&Ni("'"+(e.constructor.name+".prototype."+t.toString())+"' is decorated with 'override', but no such decorated member was found on prototype.");!function(e,t,n){if("production"!==process.env.NODE_ENV&&!Ns(t)&&us(e[bs],n)){var r=e.constructor.name+".prototype."+n.toString(),i=e[bs][n].annotationType_;Ni("Cannot apply '@"+t.annotationType_+"' to '"+r+"':\nThe field is already decorated with '@"+i+"'.\nRe-decorating fields is not allowed.\nUse '@override' decorator for methods overridden by subclass.")}}(e,n,t),Ns(n)||(e[bs][t]=n)}function Es(e){return"object"==typeof e&&"string"==typeof e.kind}function As(e,t){"production"===process.env.NODE_ENV||t.includes(e.kind)||Ni("The decorator applied to '"+String(e.name)+"' cannot be used on a "+e.kind+" element")}var Ss=Symbol("mobx administration"),Ts=function(){function e(e){void 0===e&&(e="production"!==process.env.NODE_ENV?"Atom@"+Hi():"Atom"),this.name_=void 0,this.flags_=0,this.observers_=new Set,this.lastAccessedBy_=0,this.lowestObserverState_=Po.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=e}var t=e.prototype;return t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(e){return e()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(e){return e()})},t.reportObserved=function(){return ta(this)},t.reportChanged=function(){Jo(),na(this),ea()},t.toString=function(){return this.name_},ps(e,[{key:"isBeingObserved",get:function(){return hs(this.flags_,e.isBeingObservedMask_)},set:function(t){this.flags_=ds(this.flags_,e.isBeingObservedMask_,t)}},{key:"isPendingUnobservation",get:function(){return hs(this.flags_,e.isPendingUnobservationMask_)},set:function(t){this.flags_=ds(this.flags_,e.isPendingUnobservationMask_,t)}},{key:"diffValue",get:function(){return hs(this.flags_,e.diffValueMask_)?1:0},set:function(t){this.flags_=ds(this.flags_,e.diffValueMask_,1===t)}}])}();Ts.isBeingObservedMask_=1,Ts.isPendingUnobservationMask_=2,Ts.diffValueMask_=4;var ks=ns("Atom",Ts);function Os(e,t,n){void 0===t&&(t=Zi),void 0===n&&(n=Zi);var r,i=new Ts(e);return t!==Zi&&Ca(ka,i,t,r),n!==Zi&&Ra(i,n),i}var Rs={structural:function(e,t){return Kl(e,t)},default:function(e,t){return Object.is?Object.is(e,t):e===t?0!==e||1/e==1/t:e!=e&&t!=t}};function Cs(e,t,n){return Ga(e)?e:Array.isArray(e)?_o.array(e,{name:n}):Qi(e)?_o.object(e,void 0,{name:n}):rs(e)?_o.map(e,{name:n}):is(e)?_o.set(e,{name:n}):"function"!=typeof e||Sa(e)||Ba(e)?e:Ji(e)?Va(e):Aa(n,e)}function Ps(e){return e}var Ms="override";function Ns(e){return e.annotationType_===Ms}function Ds(e,t){return{annotationType_:e,options_:t,make_:Fs,extend_:Is,decorate_20223_:zs}}function Fs(e,t,n,r){var i;if(null!=(i=this.options_)&&i.bound)return null===this.extend_(e,t,n,!1)?0:1;if(r===e.target_)return null===this.extend_(e,t,n,!1)?0:2;if(Sa(n.value))return 1;var s=Ls(e,this,t,n,!1);return Li(r,t,s),2}function Is(e,t,n,r){var i=Ls(e,this,t,n);return e.defineProperty_(t,i,r)}function zs(e,t){"production"!==process.env.NODE_ENV&&As(t,["method","field"]);var n,r=t.kind,i=t.name,s=t.addInitializer,o=this,a=function(e){var t,n,r,s;return To(null!=(t=null==(n=o.options_)?void 0:n.name)?t:i.toString(),e,null!=(r=null==(s=o.options_)?void 0:s.autoAction)&&r)};return"field"==r?function(e){var t,n=e;return Sa(n)||(n=a(n)),null!=(t=o.options_)&&t.bound&&((n=n.bind(this)).isMobxAction=!0),n}:"method"==r?(Sa(e)||(e=a(e)),null!=(n=this.options_)&&n.bound&&s(function(){var e=this,t=e[i].bind(e);t.isMobxAction=!0,e[i]=t}),e):void Ni("Cannot apply '"+o.annotationType_+"' to '"+String(i)+"' (kind: "+r+"):\n'"+o.annotationType_+"' can only be used on properties with a function value.")}function Ls(e,t,n,r,i){var s,o,a,l,u,c,h;void 0===i&&(i=Ko.safeDescriptors),function(e,t,n,r){var i=t.annotationType_,s=r.value;"production"===process.env.NODE_ENV||Ki(s)||Ni("Cannot apply '"+i+"' to '"+e.name_+"."+n.toString()+"':\n'"+i+"' can only be used on properties with a function value.")}(e,t,n,r);var d,f=r.value;null!=(s=t.options_)&&s.bound&&(f=f.bind(null!=(d=e.proxy_)?d:e.target_));return{value:To(null!=(o=null==(a=t.options_)?void 0:a.name)?o:n.toString(),f,null!=(l=null==(u=t.options_)?void 0:u.autoAction)&&l,null!=(c=t.options_)&&c.bound?null!=(h=e.proxy_)?h:e.target_:void 0),configurable:!i||e.isPlainObject_,enumerable:!1,writable:!i}}function js(e,t){return{annotationType_:e,options_:t,make_:Vs,extend_:Us,decorate_20223_:Bs}}function Vs(e,t,n,r){var i;if(r===e.target_)return null===this.extend_(e,t,n,!1)?0:2;if(null!=(i=this.options_)&&i.bound&&(!us(e.target_,t)||!Ba(e.target_[t]))&&null===this.extend_(e,t,n,!1))return 0;if(Ba(n.value))return 1;var s=Gs(e,this,t,n,!1,!1);return Li(r,t,s),2}function Us(e,t,n,r){var i,s=Gs(e,this,t,n,null==(i=this.options_)?void 0:i.bound);return e.defineProperty_(t,s,r)}function Bs(e,t){var n;"production"!==process.env.NODE_ENV&&As(t,["method"]);var r=t.name,i=t.addInitializer;return Ba(e)||(e=Va(e)),null!=(n=this.options_)&&n.bound&&i(function(){var e=this,t=e[r].bind(e);t.isMobXFlow=!0,e[r]=t}),e}function Gs(e,t,n,r,i,s){void 0===s&&(s=Ko.safeDescriptors),function(e,t,n,r){var i=t.annotationType_,s=r.value;"production"===process.env.NODE_ENV||Ki(s)||Ni("Cannot apply '"+i+"' to '"+e.name_+"."+n.toString()+"':\n'"+i+"' can only be used on properties with a generator function value.")}(e,t,n,r);var o,a=r.value;(Ba(a)||(a=Va(a)),i)&&((a=a.bind(null!=(o=e.proxy_)?o:e.target_)).isMobXFlow=!0);return{value:a,configurable:!s||e.isPlainObject_,enumerable:!1,writable:!s}}function $s(e,t){return{annotationType_:e,options_:t,make_:qs,extend_:Hs,decorate_20223_:Ws}}function qs(e,t,n){return null===this.extend_(e,t,n,!1)?0:1}function Hs(e,t,n,r){return function(e,t,n,r){var i=t.annotationType_,s=r.get;"production"===process.env.NODE_ENV||s||Ni("Cannot apply '"+i+"' to '"+e.name_+"."+n.toString()+"':\n'"+i+"' can only be used on getter(+setter) properties.")}(e,this,t,n),e.defineComputedProperty_(t,ms({},this.options_,{get:n.get,set:n.set}),r)}function Ws(e,t){"production"!==process.env.NODE_ENV&&As(t,["getter"]);var n=this,r=t.name;return(0,t.addInitializer)(function(){var t=Tl(this)[Ss],i=ms({},n.options_,{get:e,context:this});i.name||(i.name="production"!==process.env.NODE_ENV?t.name_+"."+r.toString():"ObservableObject."+r.toString()),t.values_.set(r,new Co(i))}),function(){return this[Ss].getObservablePropValue_(r)}}function Zs(e,t){return{annotationType_:e,options_:t,make_:Ks,extend_:Xs,decorate_20223_:Ys}}function Ks(e,t,n){return null===this.extend_(e,t,n,!1)?0:1}function Xs(e,t,n,r){var i,s;return function(e,t,n,r){var i=t.annotationType_;"production"===process.env.NODE_ENV||"value"in r||Ni("Cannot apply '"+i+"' to '"+e.name_+"."+n.toString()+"':\n'"+i+"' cannot be used on getter/setter properties")}(e,this,t,n),e.defineObservableProperty_(t,n.value,null!=(i=null==(s=this.options_)?void 0:s.enhancer)?i:Cs,r)}function Ys(e,t){if("production"!==process.env.NODE_ENV){if("field"===t.kind)throw Ni("Please use `@observable accessor "+String(t.name)+"` instead of `@observable "+String(t.name)+"`");As(t,["accessor"])}var n=this,r=t.kind,i=t.name,s=new WeakSet;function o(e,t){var r,o,a=Tl(e)[Ss],l=new Ro(t,null!=(r=null==(o=n.options_)?void 0:o.enhancer)?r:Cs,"production"!==process.env.NODE_ENV?a.name_+"."+i.toString():"ObservableObject."+i.toString(),!1);a.values_.set(i,l),s.add(e)}if("accessor"==r)return{get:function(){return s.has(this)||o(this,e.get.call(this)),this[Ss].getObservablePropValue_(i)},set:function(e){return s.has(this)||o(this,e),this[Ss].setObservablePropValue_(i,e)},init:function(e){return s.has(this)||o(this,e),e}}}var Qs="true",Js=eo();function eo(e){return{annotationType_:Qs,options_:e,make_:to,extend_:no,decorate_20223_:ro}}function to(e,t,n,r){var i,s,o,a;if(n.get)return xo.make_(e,t,n,r);if(n.set){var l=Sa(n.set)?n.set:To(t.toString(),n.set);return r===e.target_?null===e.defineProperty_(t,{configurable:!Ko.safeDescriptors||e.isPlainObject_,set:l})?0:2:(Li(r,t,{configurable:!0,set:l}),2)}if(r!==e.target_&&"function"==typeof n.value)return Ji(n.value)?(null!=(a=this.options_)&&a.autoBind?Va.bound:Va).make_(e,t,n,r):(null!=(o=this.options_)&&o.autoBind?Aa.bound:Aa).make_(e,t,n,r);var u,c=!1===(null==(i=this.options_)?void 0:i.deep)?_o.ref:_o;"function"==typeof n.value&&null!=(s=this.options_)&&s.autoBind&&(n.value=n.value.bind(null!=(u=e.proxy_)?u:e.target_));return c.make_(e,t,n,r)}function no(e,t,n,r){var i,s,o;if(n.get)return xo.extend_(e,t,n,r);if(n.set)return e.defineProperty_(t,{configurable:!Ko.safeDescriptors||e.isPlainObject_,set:To(t.toString(),n.set)},r);"function"==typeof n.value&&null!=(i=this.options_)&&i.autoBind&&(n.value=n.value.bind(null!=(o=e.proxy_)?o:e.target_));return(!1===(null==(s=this.options_)?void 0:s.deep)?_o.ref:_o).extend_(e,t,n,r)}function ro(e,t){Ni("'"+this.annotationType_+"' cannot be used as a decorator")}var io={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function so(e){return e||io}Object.freeze(io);var oo=Zs("observable"),ao=Zs("observable.ref",{enhancer:Ps}),lo=Zs("observable.shallow",{enhancer:function(e,t,n){return null==e||Rl(e)||dl(e)||_l(e)||xl(e)?e:Array.isArray(e)?_o.array(e,{name:n,deep:!1}):Qi(e)?_o.object(e,void 0,{name:n,deep:!1}):rs(e)?_o.map(e,{name:n,deep:!1}):is(e)?_o.set(e,{name:n,deep:!1}):void("production"!==process.env.NODE_ENV&&Ni("The shallow modifier / decorator can only used in combination with arrays, objects, maps and sets"))}}),uo=Zs("observable.struct",{enhancer:function(e,t){return"production"!==process.env.NODE_ENV&&Ga(e)&&Ni("observable.struct should not be used with observable values"),Kl(e,t)?t:e}}),co=xs(oo);function ho(e){return!0===e.deep?Cs:!1===e.deep?Ps:(t=e.defaultDecorator)&&null!=(n=null==(r=t.options_)?void 0:r.enhancer)?n:Cs;var t,n,r}function fo(e,t,n){return Es(t)?oo.decorate_20223_(e,t):Xi(t)?void ws(e,t,oo):Ga(e)?e:Qi(e)?_o.object(e,t,n):Array.isArray(e)?_o.array(e,t):rs(e)?_o.map(e,t):is(e)?_o.set(e,t):"object"==typeof e&&null!==e?e:_o.box(e,t)}Ii(fo,co);var po,go,mo={box:function(e,t){var n=so(t);return new Ro(e,ho(n),n.name,!0,n.equals)},array:function(e,t){var n=so(t);return(!1===Ko.useProxies||!1===n.proxy?Bl:sl)(e,ho(n),n.name)},map:function(e,t){var n=so(t);return new ml(e,ho(n),n.name)},set:function(e,t){var n=so(t);return new bl(e,ho(n),n.name)},object:function(e,t,n){return Hl(function(){return Na(!1===Ko.useProxies||!1===(null==n?void 0:n.proxy)?Tl({},n):function(e,t){var n,r;return $i(),e=Tl(e,t),null!=(r=(n=e[Ss]).proxy_)?r:n.proxy_=new Proxy(e,Ha)}({},n),e,t)})},ref:xs(ao),shallow:xs(lo),deep:co,struct:xs(uo)},_o=Ii(fo,mo),yo="computed",vo=$s(yo),bo=$s("computed.struct",{equals:Rs.structural}),xo=function(e,t){if(Es(t))return vo.decorate_20223_(e,t);if(Xi(t))return ws(e,t,vo);if(Qi(e))return xs($s(yo,e));"production"!==process.env.NODE_ENV&&(Ki(e)||Ni("First argument to `computed` should be an expression."),Ki(t)&&Ni("A setter as second argument is no longer supported, use `{ set: fn }` option instead"));var n=Qi(t)?t:{};return n.get=e,n.name||(n.name=e.name||""),new Co(n)};Object.assign(xo,vo),xo.struct=xs(bo);var wo=0,Eo=1,Ao=null!=(po=null==(go=zi(function(){},"name"))?void 0:go.configurable)&&po,So={value:"action",configurable:!0,writable:!1,enumerable:!1};function To(e,t,n,r){function i(){return function(e,t,n,r,i){var s=function(e,t,n,r){var i="production"!==process.env.NODE_ENV&&ha()&&!!e,s=0;if("production"!==process.env.NODE_ENV&&i){s=Date.now();var o=r?Array.from(r):Vi;fa({type:ma,name:e,object:n,arguments:o})}var a=Ko.trackingDerivation,l=!t||!a;Jo();var u=Ko.allowStateChanges;l&&(Uo(),u=ko(!0));var c=Go(!0),h={runAsAction_:l,prevDerivation_:a,prevAllowStateChanges_:u,prevAllowStateReads_:c,notifySpy_:i,startTime_:s,actionId_:Eo++,parentActionId_:wo};return wo=h.actionId_,h}(e,t,r,i);try{return n.apply(r,i)}catch(e){throw s.error_=e,e}finally{!function(e){wo!==e.actionId_&&Ni(30);wo=e.parentActionId_,void 0!==e.error_&&(Ko.suppressReactionErrors=!0);Oo(e.prevAllowStateChanges_),$o(e.prevAllowStateReads_),ea(),e.runAsAction_&&Bo(e.prevDerivation_);"production"!==process.env.NODE_ENV&&e.notifySpy_&&ga({time:Date.now()-e.startTime_});Ko.suppressReactionErrors=!1}(s)}}(e,n,t,r||this,arguments)}return void 0===n&&(n=!1),"production"!==process.env.NODE_ENV&&(Ki(t)||Ni("`action` can only be invoked on functions"),"string"==typeof e&&e||Ni("actions should have valid names, got: '"+e+"'")),i.isMobxAction=!0,i.toString=function(){return t.toString()},Ao&&(So.value=e,Li(i,"name",So)),i}function ko(e){var t=Ko.allowStateChanges;return Ko.allowStateChanges=e,t}function Oo(e){Ko.allowStateChanges=e}var Ro=function(e){function t(t,n,r,i,s){var o,a;(void 0===r&&(r="production"!==process.env.NODE_ENV?"ObservableValue@"+Hi():"ObservableValue"),void 0===i&&(i=!0),void 0===s&&(s=Rs.default),(o=e.call(this,r)||this).enhancer=void 0,o.name_=void 0,o.equals=void 0,o.hasUnreportedChange_=!1,o.interceptors_=void 0,o.changeListeners_=void 0,o.value_=void 0,o.dehancer=void 0,o.enhancer=n,o.name_=r,o.equals=s,o.value_=n(t,void 0,r),"production"!==process.env.NODE_ENV&&i&&ha())&&da({type:"create",object:o,observableKind:"value",debugObjectName:o.name_,newValue:""+(null==(a=o.value_)?void 0:a.toString())});return o}_s(t,e);var n=t.prototype;return n.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},n.set=function(e){var t=this.value_;if((e=this.prepareNewValue_(e))!==Ko.UNCHANGED){var n=ha();"production"!==process.env.NODE_ENV&&n&&fa({type:nl,object:this,observableKind:"value",debugObjectName:this.name_,newValue:e,oldValue:t}),this.setNewValue_(e),"production"!==process.env.NODE_ENV&&n&&ga()}},n.prepareNewValue_=function(e){if(zo(this),Wa(this)){var t=Ka(this,{object:this,type:nl,newValue:e});if(!t)return Ko.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value_,this.name_),this.equals(this.value_,e)?Ko.UNCHANGED:e},n.setNewValue_=function(e){var t=this.value_;this.value_=e,this.reportChanged(),Xa(this)&&Qa(this,{type:nl,object:this,newValue:e,oldValue:t})},n.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},n.intercept_=function(e){return Za(this,e)},n.observe_=function(e,t){return t&&e({observableKind:"value",debugObjectName:this.name_,object:this,type:nl,newValue:this.value_,oldValue:void 0}),Ya(this,e)},n.raw=function(){return this.value_},n.toJSON=function(){return this.get()},n.toString=function(){return this.name_+"["+this.value_+"]"},n.valueOf=function(){return ls(this.get())},n[Symbol.toPrimitive]=function(){return this.valueOf()},t}(Ts),Co=function(){function e(e){this.dependenciesState_=Po.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.observers_=new Set,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=Po.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new Do(null),this.name_=void 0,this.triggeredBy_=void 0,this.flags_=0,this.derivation=void 0,this.setter_=void 0,this.isTracing_=Mo.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,e.get||Ni(31),this.derivation=e.get,this.name_=e.name||("production"!==process.env.NODE_ENV?"ComputedValue@"+Hi():"ComputedValue"),e.set&&(this.setter_=To("production"!==process.env.NODE_ENV?this.name_+"-setter":"ComputedValue-setter",e.set)),this.equals_=e.equals||(e.compareStructural||e.struct?Rs.structural:Rs.default),this.scope_=e.context,this.requiresReaction_=e.requiresReaction,this.keepAlive_=!!e.keepAlive}var t=e.prototype;return t.onBecomeStale_=function(){!function(e){if(e.lowestObserverState_!==Po.UP_TO_DATE_)return;e.lowestObserverState_=Po.POSSIBLY_STALE_,e.observers_.forEach(function(e){e.dependenciesState_===Po.UP_TO_DATE_&&(e.dependenciesState_=Po.POSSIBLY_STALE_,e.onBecomeStale_())})}(this)},t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(e){return e()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(e){return e()})},t.get=function(){if(this.isComputing&&Ni(32,this.name_,this.derivation),0!==Ko.inBatch||0!==this.observers_.size||this.keepAlive_){if(ta(this),Io(this)){var e=Ko.trackingContext;this.keepAlive_&&!e&&(Ko.trackingContext=this),this.trackAndCompute()&&function(e){if(e.lowestObserverState_===Po.STALE_)return;e.lowestObserverState_=Po.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===Po.POSSIBLY_STALE_?(t.dependenciesState_=Po.STALE_,"production"!==process.env.NODE_ENV&&t.isTracing_!==Mo.NONE&&ra(t,e)):t.dependenciesState_===Po.UP_TO_DATE_&&(e.lowestObserverState_=Po.UP_TO_DATE_)})}(this),Ko.trackingContext=e}}else Io(this)&&(this.warnAboutUntrackedRead_(),Jo(),this.value_=this.computeValue_(!1),ea());var t=this.value_;if(Fo(t))throw t.cause;return t},t.set=function(e){if(this.setter_){this.isRunningSetter&&Ni(33,this.name_),this.isRunningSetter=!0;try{this.setter_.call(this.scope_,e)}finally{this.isRunningSetter=!1}}else Ni(34,this.name_)},t.trackAndCompute=function(){var e=this.value_,t=this.dependenciesState_===Po.NOT_TRACKING_,n=this.computeValue_(!0),r=t||Fo(e)||Fo(n)||!this.equals_(e,n);return r&&(this.value_=n,"production"!==process.env.NODE_ENV&&ha()&&da({observableKind:"computed",debugObjectName:this.name_,object:this.scope_,type:"update",oldValue:e,newValue:n})),r},t.computeValue_=function(e){this.isComputing=!0;var t,n=ko(!1);if(e)t=Lo(this,this.derivation,this.scope_);else if(!0===Ko.disableErrorBoundaries)t=this.derivation.call(this.scope_);else try{t=this.derivation.call(this.scope_)}catch(e){t=new Do(e)}return Oo(n),this.isComputing=!1,t},t.suspend_=function(){this.keepAlive_||(jo(this),this.value_=void 0,"production"!==process.env.NODE_ENV&&this.isTracing_!==Mo.NONE&&console.log("[mobx.trace] Computed value '"+this.name_+"' was suspended and it will recompute on the next access."))},t.observe_=function(e,t){var n=this,r=!0,i=void 0;return function(e,t){var n,r,i,s;void 0===t&&(t=Ui);"production"!==process.env.NODE_ENV&&(Ki(e)||Ni("Autorun expects a function as first argument"),Sa(e)&&Ni("Autorun does not accept actions since actions are untrackable"));var o,a=null!=(n=null==(r=t)?void 0:r.name)?n:"production"!==process.env.NODE_ENV?e.name||"Autorun@"+Hi():"Autorun";if(t.scheduler||t.delay){var l=function(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:Ta}(t),u=!1;o=new sa(a,function(){u||(u=!0,l(function(){u=!1,o.isDisposed||o.track(c)}))},t.onError,t.requiresObservable)}else o=new sa(a,function(){this.track(c)},t.onError,t.requiresObservable);function c(){e(o)}null!=(i=t)&&null!=(i=i.signal)&&i.aborted||o.schedule_();return o.getDisposer_(null==(s=t)?void 0:s.signal)}(function(){var s=n.get();if(!r||t){var o=Uo();e({observableKind:"computed",debugObjectName:n.name_,type:nl,object:n,newValue:s,oldValue:i}),Bo(o)}r=!1,i=s})},t.warnAboutUntrackedRead_=function(){"production"!==process.env.NODE_ENV&&(this.isTracing_!==Mo.NONE&&console.log("[mobx.trace] Computed value '"+this.name_+"' is being read outside a reactive context. Doing a full recompute."),("boolean"==typeof this.requiresReaction_?this.requiresReaction_:Ko.computedRequiresReaction)&&console.warn("[mobx] Computed value '"+this.name_+"' is being read outside a reactive context. Doing a full recompute."))},t.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},t.valueOf=function(){return ls(this.get())},t[Symbol.toPrimitive]=function(){return this.valueOf()},ps(e,[{key:"isComputing",get:function(){return hs(this.flags_,e.isComputingMask_)},set:function(t){this.flags_=ds(this.flags_,e.isComputingMask_,t)}},{key:"isRunningSetter",get:function(){return hs(this.flags_,e.isRunningSetterMask_)},set:function(t){this.flags_=ds(this.flags_,e.isRunningSetterMask_,t)}},{key:"isBeingObserved",get:function(){return hs(this.flags_,e.isBeingObservedMask_)},set:function(t){this.flags_=ds(this.flags_,e.isBeingObservedMask_,t)}},{key:"isPendingUnobservation",get:function(){return hs(this.flags_,e.isPendingUnobservationMask_)},set:function(t){this.flags_=ds(this.flags_,e.isPendingUnobservationMask_,t)}},{key:"diffValue",get:function(){return hs(this.flags_,e.diffValueMask_)?1:0},set:function(t){this.flags_=ds(this.flags_,e.diffValueMask_,1===t)}}])}();Co.isComputingMask_=1,Co.isRunningSetterMask_=2,Co.isBeingObservedMask_=4,Co.isPendingUnobservationMask_=8,Co.diffValueMask_=16;var Po,Mo,No=ns("ComputedValue",Co);!function(e){e[e.NOT_TRACKING_=-1]="NOT_TRACKING_",e[e.UP_TO_DATE_=0]="UP_TO_DATE_",e[e.POSSIBLY_STALE_=1]="POSSIBLY_STALE_",e[e.STALE_=2]="STALE_"}(Po||(Po={})),function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(Mo||(Mo={}));var Do=function(e){this.cause=void 0,this.cause=e};function Fo(e){return e instanceof Do}function Io(e){switch(e.dependenciesState_){case Po.UP_TO_DATE_:return!1;case Po.NOT_TRACKING_:case Po.STALE_:return!0;case Po.POSSIBLY_STALE_:for(var t=Go(!0),n=Uo(),r=e.observing_,i=r.length,s=0;s<i;s++){var o=r[s];if(No(o)){if(Ko.disableErrorBoundaries)o.get();else try{o.get()}catch(e){return Bo(n),$o(t),!0}if(e.dependenciesState_===Po.STALE_)return Bo(n),$o(t),!0}}return qo(e),Bo(n),$o(t),!1}}function zo(e){if("production"!==process.env.NODE_ENV){var t=e.observers_.size>0;Ko.allowStateChanges||!t&&"always"!==Ko.enforceActions||console.warn("[MobX] "+(Ko.enforceActions?"Since strict-mode is enabled, changing (observed) observable values without using an action is not allowed. Tried to modify: ":"Side effects like changing state are not allowed at this point. Are you trying to modify state from, for example, a computed value or the render function of a React component? You can wrap side effects in 'runInAction' (or decorate functions with 'action') if needed. Tried to modify: ")+e.name_)}}function Lo(e,t,n){var r=Go(!0);qo(e),e.newObserving_=new Array(0===e.runId_?100:e.observing_.length),e.unboundDepsCount_=0,e.runId_=++Ko.runId;var i,s=Ko.trackingDerivation;if(Ko.trackingDerivation=e,Ko.inBatch++,!0===Ko.disableErrorBoundaries)i=t.call(n);else try{i=t.call(n)}catch(e){i=new Do(e)}return Ko.inBatch--,Ko.trackingDerivation=s,function(e){for(var t=e.observing_,n=e.observing_=e.newObserving_,r=Po.UP_TO_DATE_,i=0,s=e.unboundDepsCount_,o=0;o<s;o++){var a=n[o];0===a.diffValue&&(a.diffValue=1,i!==o&&(n[i]=a),i++),a.dependenciesState_>r&&(r=a.dependenciesState_)}n.length=i,e.newObserving_=null,s=t.length;for(;s--;){var l=t[s];0===l.diffValue&&Yo(l,e),l.diffValue=0}for(;i--;){var u=n[i];1===u.diffValue&&(u.diffValue=0,Xo(u,e))}r!==Po.UP_TO_DATE_&&(e.dependenciesState_=r,e.onBecomeStale_())}(e),function(e){if("production"===process.env.NODE_ENV)return;if(0!==e.observing_.length)return;("boolean"==typeof e.requiresObservable_?e.requiresObservable_:Ko.reactionRequiresObservable)&&console.warn("[mobx] Derivation '"+e.name_+"' is created/updated without reading any observable value.")}(e),$o(r),i}function jo(e){var t=e.observing_;e.observing_=[];for(var n=t.length;n--;)Yo(t[n],e);e.dependenciesState_=Po.NOT_TRACKING_}function Vo(e){var t=Uo();try{return e()}finally{Bo(t)}}function Uo(){var e=Ko.trackingDerivation;return Ko.trackingDerivation=null,e}function Bo(e){Ko.trackingDerivation=e}function Go(e){var t=Ko.allowStateReads;return Ko.allowStateReads=e,t}function $o(e){Ko.allowStateReads=e}function qo(e){if(e.dependenciesState_!==Po.UP_TO_DATE_){e.dependenciesState_=Po.UP_TO_DATE_;for(var t=e.observing_,n=t.length;n--;)t[n].lowestObserverState_=Po.UP_TO_DATE_}}var Ho=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},Wo=!0,Zo=!1,Ko=function(){var e=Fi();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(Wo=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new Ho).version&&(Wo=!1),Wo?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new Ho):(setTimeout(function(){Zo||Ni(35)},1),new Ho)}();function Xo(e,t){e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function Yo(e,t){e.observers_.delete(t),0===e.observers_.size&&Qo(e)}function Qo(e){!1===e.isPendingUnobservation&&(e.isPendingUnobservation=!0,Ko.pendingUnobservations.push(e))}function Jo(){Ko.inBatch++}function ea(){if(0===--Ko.inBatch){la();for(var e=Ko.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation=!1,0===n.observers_.size&&(n.isBeingObserved&&(n.isBeingObserved=!1,n.onBUO()),n instanceof Co&&n.suspend_())}Ko.pendingUnobservations=[]}}function ta(e){!function(e){"production"!==process.env.NODE_ENV&&!Ko.allowStateReads&&Ko.observableRequiresReaction&&console.warn("[mobx] Observable '"+e.name_+"' being read outside a reactive context.")}(e);var t=Ko.trackingDerivation;return null!==t?(t.runId_!==e.lastAccessedBy_&&(e.lastAccessedBy_=t.runId_,t.newObserving_[t.unboundDepsCount_++]=e,!e.isBeingObserved&&Ko.trackingContext&&(e.isBeingObserved=!0,e.onBO())),e.isBeingObserved):(0===e.observers_.size&&Ko.inBatch>0&&Qo(e),!1)}function na(e){e.lowestObserverState_!==Po.STALE_&&(e.lowestObserverState_=Po.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===Po.UP_TO_DATE_&&("production"!==process.env.NODE_ENV&&t.isTracing_!==Mo.NONE&&ra(t,e),t.onBecomeStale_()),t.dependenciesState_=Po.STALE_}))}function ra(e,t){if(console.log("[mobx.trace] '"+e.name_+"' is invalidated due to a change in: '"+t.name_+"'"),e.isTracing_===Mo.BREAK){var n=[];ia(Da(e),n,1),new Function("debugger;\n/*\nTracing '"+e.name_+"'\n\nYou are entering this break point because derivation '"+e.name_+"' is being traced and '"+t.name_+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(e instanceof Co?e.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+n.join("\n")+"\n*/\n ")()}}function ia(e,t,n){t.length>=1e3?t.push("(and many more)"):(t.push(""+"\t".repeat(n-1)+e.name),e.dependencies&&e.dependencies.forEach(function(e){return ia(e,t,n+1)}))}var sa=function(){function e(e,t,n,r){void 0===e&&(e="production"!==process.env.NODE_ENV?"Reaction@"+Hi():"Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=Po.NOT_TRACKING_,this.runId_=0,this.unboundDepsCount_=0,this.flags_=0,this.isTracing_=Mo.NONE,this.name_=e,this.onInvalidate_=t,this.errorHandler_=n,this.requiresObservable_=r}var t=e.prototype;return t.onBecomeStale_=function(){this.schedule_()},t.schedule_=function(){this.isScheduled||(this.isScheduled=!0,Ko.pendingReactions.push(this),la())},t.runReaction_=function(){if(!this.isDisposed){Jo(),this.isScheduled=!1;var e=Ko.trackingContext;if(Ko.trackingContext=this,Io(this)){this.isTrackPending=!0;try{this.onInvalidate_(),"production"!==process.env.NODE_ENV&&this.isTrackPending&&ha()&&da({name:this.name_,type:"scheduled-reaction"})}catch(e){this.reportExceptionInDerivation_(e)}}Ko.trackingContext=e,ea()}},t.track=function(e){if(!this.isDisposed){Jo();var t,n=ha();"production"!==process.env.NODE_ENV&&n&&(t=Date.now(),fa({name:this.name_,type:"reaction"})),this.isRunning=!0;var r=Ko.trackingContext;Ko.trackingContext=this;var i=Lo(this,e,void 0);Ko.trackingContext=r,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&jo(this),Fo(i)&&this.reportExceptionInDerivation_(i.cause),"production"!==process.env.NODE_ENV&&n&&ga({time:Date.now()-t}),ea()}},t.reportExceptionInDerivation_=function(e){var t=this;if(this.errorHandler_)this.errorHandler_(e,this);else{if(Ko.disableErrorBoundaries)throw e;var n="production"!==process.env.NODE_ENV?"[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'":"[mobx] uncaught error in '"+this+"'";Ko.suppressReactionErrors?"production"!==process.env.NODE_ENV&&console.warn("[mobx] (error in reaction '"+this.name_+"' suppressed, fix error of causing action below)"):console.error(n,e),"production"!==process.env.NODE_ENV&&ha()&&da({type:"error",name:this.name_,message:n,error:""+e}),Ko.globalReactionErrorHandlers.forEach(function(n){return n(e,t)})}},t.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.isRunning||(Jo(),jo(this),ea()))},t.getDisposer_=function(e){var t=this,n=function n(){t.dispose(),null==e||null==e.removeEventListener||e.removeEventListener("abort",n)};return null==e||null==e.addEventListener||e.addEventListener("abort",n),n[Ss]=this,"dispose"in Symbol&&"symbol"==typeof Symbol.dispose&&(n[Symbol.dispose]=n),n},t.toString=function(){return"Reaction["+this.name_+"]"},t.trace=function(e){void 0===e&&(e=!1),function(){if("production"===process.env.NODE_ENV)return;for(var e=!1,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];"boolean"==typeof n[n.length-1]&&(e=n.pop());var i=function(e){switch(e.length){case 0:return Ko.trackingDerivation;case 1:return Gl(e[0]);case 2:return Gl(e[0],e[1])}}(n);if(!i)return Ni("'trace(break?)' can only be used inside a tracked computed value or a Reaction. Consider passing in the computed value or reaction explicitly");i.isTracing_===Mo.NONE&&console.log("[mobx.trace] '"+i.name_+"' tracing enabled");i.isTracing_=e?Mo.BREAK:Mo.LOG}(this,e)},ps(e,[{key:"isDisposed",get:function(){return hs(this.flags_,e.isDisposedMask_)},set:function(t){this.flags_=ds(this.flags_,e.isDisposedMask_,t)}},{key:"isScheduled",get:function(){return hs(this.flags_,e.isScheduledMask_)},set:function(t){this.flags_=ds(this.flags_,e.isScheduledMask_,t)}},{key:"isTrackPending",get:function(){return hs(this.flags_,e.isTrackPendingMask_)},set:function(t){this.flags_=ds(this.flags_,e.isTrackPendingMask_,t)}},{key:"isRunning",get:function(){return hs(this.flags_,e.isRunningMask_)},set:function(t){this.flags_=ds(this.flags_,e.isRunningMask_,t)}},{key:"diffValue",get:function(){return hs(this.flags_,e.diffValueMask_)?1:0},set:function(t){this.flags_=ds(this.flags_,e.diffValueMask_,1===t)}}])}();sa.isDisposedMask_=1,sa.isScheduledMask_=2,sa.isTrackPendingMask_=4,sa.isRunningMask_=8,sa.diffValueMask_=16;var oa=100,aa=function(e){return e()};function la(){Ko.inBatch>0||Ko.isRunningReactions||aa(ua)}function ua(){Ko.isRunningReactions=!0;for(var e=Ko.pendingReactions,t=0;e.length>0;){++t===oa&&(console.error("production"!==process.env.NODE_ENV?"Reaction doesn't converge to a stable state after "+oa+" iterations. Probably there is a cycle in the reactive function: "+e[0]:"[mobx] cycle in reaction: "+e[0]),e.splice(0));for(var n=e.splice(0),r=0,i=n.length;r<i;r++)n[r].runReaction_()}Ko.isRunningReactions=!1}var ca=ns("Reaction",sa);function ha(){return"production"!==process.env.NODE_ENV&&!!Ko.spyListeners.length}function da(e){if("production"!==process.env.NODE_ENV&&Ko.spyListeners.length)for(var t=Ko.spyListeners,n=0,r=t.length;n<r;n++)t[n](e)}function fa(e){"production"!==process.env.NODE_ENV&&da(ms({},e,{spyReportStart:!0}))}var pa={type:"report-end",spyReportEnd:!0};function ga(e){"production"!==process.env.NODE_ENV&&da(e?ms({},e,{type:"report-end",spyReportEnd:!0}):pa)}var ma="action",_a="autoAction",ya=Ds(ma),va=Ds("action.bound",{bound:!0}),ba=Ds(_a,{autoAction:!0}),xa=Ds("autoAction.bound",{autoAction:!0,bound:!0});function wa(e){return function(t,n){return Ki(t)?To(t.name||"<unnamed action>",t,e):Ki(n)?To(t,n,e):Es(n)?(e?ba:ya).decorate_20223_(t,n):Xi(n)?ws(t,n,e?ba:ya):Xi(t)?xs(Ds(e?_a:ma,{name:t,autoAction:e})):void("production"!==process.env.NODE_ENV&&Ni("Invalid arguments for `action`"))}}var Ea=wa(!1);Object.assign(Ea,ya);var Aa=wa(!0);function Sa(e){return Ki(e)&&!0===e.isMobxAction}Object.assign(Aa,ba),Ea.bound=xs(va),Aa.bound=xs(xa);var Ta=function(e){return e()};var ka="onBO",Oa="onBUO";function Ra(e,t,n){return Ca(Oa,e,t,n)}function Ca(e,t,n,r){var i=Gl(t),s=Ki(r)?r:n,o=e+"L";return i[o]?i[o].add(s):i[o]=new Set([s]),function(){var e=i[o];e&&(e.delete(s),0===e.size&&delete i[o])}}var Pa="always";function Ma(e){!0===e.isolateGlobalState&&function(){if((Ko.pendingReactions.length||Ko.inBatch||Ko.isRunningReactions)&&Ni(36),Zo=!0,Wo){var e=Fi();0===--e.__mobxInstanceCount&&(e.__mobxGlobals=void 0),Ko=new Ho}}();var t,n,r=e.useProxies,i=e.enforceActions;if(void 0!==r&&(Ko.useProxies=r===Pa||"never"!==r&&"undefined"!=typeof Proxy),"ifavailable"===r&&(Ko.verifyProxies=!0),void 0!==i){var s=i===Pa?Pa:"observed"===i;Ko.enforceActions=s,Ko.allowStateChanges=!0!==s&&s!==Pa}["computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","disableErrorBoundaries","safeDescriptors"].forEach(function(t){t in e&&(Ko[t]=!!e[t])}),Ko.allowStateReads=!Ko.observableRequiresReaction,"production"!==process.env.NODE_ENV&&!0===Ko.disableErrorBoundaries&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."),e.reactionScheduler&&(t=e.reactionScheduler,n=aa,aa=function(e){return t(function(){return n(e)})})}function Na(e,t,n,r){"production"!==process.env.NODE_ENV&&(arguments.length>4&&Ni("'extendObservable' expected 2-4 arguments"),"object"!=typeof e&&Ni("'extendObservable' expects an object as first argument"),_l(e)&&Ni("'extendObservable' should not be used on maps, use map.merge instead"),Qi(t)||Ni("'extendObservable' only accepts plain objects as second argument"),(Ga(t)||Ga(n))&&Ni("Extending an object with another observable (object) is not supported"));var i=cs(t);return Hl(function(){var t=Tl(e,r)[Ss];os(i).forEach(function(e){t.extend_(e,i[e],!n||(!(e in n)||n[e]))})}),e}function Da(e,t){return Fa(Gl(e,t))}function Fa(e){var t,n={name:e.name_};return e.observing_&&e.observing_.length>0&&(n.dependencies=(t=e.observing_,Array.from(new Set(t))).map(Fa)),n}var Ia=0;function za(){this.message="FLOW_CANCELLED"}za.prototype=Object.create(Error.prototype);var La=js("flow"),ja=js("flow.bound",{bound:!0}),Va=Object.assign(function(e,t){if(Es(t))return La.decorate_20223_(e,t);if(Xi(t))return ws(e,t,La);"production"!==process.env.NODE_ENV&&1!==arguments.length&&Ni("Flow expects single argument with generator function");var n=e,r=n.name||"<unnamed flow>",i=function(){var e,t=arguments,i=++Ia,s=Ea(r+" - runid: "+i+" - init",n).apply(this,t),o=void 0,a=new Promise(function(t,n){var a=0;function l(e){var t;o=void 0;try{t=Ea(r+" - runid: "+i+" - yield "+a++,s.next).call(s,e)}catch(e){return n(e)}c(t)}function u(e){var t;o=void 0;try{t=Ea(r+" - runid: "+i+" - yield "+a++,s.throw).call(s,e)}catch(e){return n(e)}c(t)}function c(e){if(!Ki(null==e?void 0:e.then))return e.done?t(e.value):(o=Promise.resolve(e.value)).then(l,u);e.then(c,n)}e=n,l(void 0)});return a.cancel=Ea(r+" - runid: "+i+" - cancel",function(){try{o&&Ua(o);var t=s.return(void 0),n=Promise.resolve(t.value);n.then(Zi,Zi),Ua(n),e(new za)}catch(t){e(t)}}),a};return i.isMobXFlow=!0,i},La);function Ua(e){Ki(e.cancel)&&e.cancel()}function Ba(e){return!0===(null==e?void 0:e.isMobXFlow)}function Ga(e){return"production"!==process.env.NODE_ENV&&1!==arguments.length&&Ni("isObservable expects only 1 argument. Use isObservableProp to inspect the observability of a property"),function(e){return!!e&&(Rl(e)||!!e[Ss]||ks(e)||ca(e)||No(e))}(e)}function $a(e,t){void 0===t&&(t=void 0),Jo();try{return e.apply(t)}finally{ea()}}function qa(e){return e[Ss]}Va.bound=xs(ja);var Ha={has:function(e,t){return"production"!==process.env.NODE_ENV&&Ko.trackingDerivation&&qi("detect new properties using the 'in' operator. Use 'has' from 'mobx' instead."),qa(e).has_(t)},get:function(e,t){return qa(e).get_(t)},set:function(e,t,n){var r;return!!Xi(t)&&("production"===process.env.NODE_ENV||qa(e).values_.has(t)||qi("add a new observable property through direct assignment. Use 'set' from 'mobx' instead."),null==(r=qa(e).set_(t,n,!0))||r)},deleteProperty:function(e,t){var n;return"production"!==process.env.NODE_ENV&&qi("delete properties from an observable object. Use 'remove' from 'mobx' instead."),!!Xi(t)&&(null==(n=qa(e).delete_(t,!0))||n)},defineProperty:function(e,t,n){var r;return"production"!==process.env.NODE_ENV&&qi("define property on an observable object. Use 'defineProperty' from 'mobx' instead."),null==(r=qa(e).defineProperty_(t,n))||r},ownKeys:function(e){return"production"!==process.env.NODE_ENV&&Ko.trackingDerivation&&qi("iterate keys to detect added / removed properties. Use 'keys' from 'mobx' instead."),qa(e).ownKeys_()},preventExtensions:function(e){Ni(13)}};function Wa(e){return void 0!==e.interceptors_&&e.interceptors_.length>0}function Za(e,t){var n=e.interceptors_||(e.interceptors_=[]);return n.push(t),Wi(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function Ka(e,t){var n=Uo();try{for(var r=[].concat(e.interceptors_||[]),i=0,s=r.length;i<s&&((t=r[i](t))&&!t.type&&Ni(14),t);i++);return t}finally{Bo(n)}}function Xa(e){return void 0!==e.changeListeners_&&e.changeListeners_.length>0}function Ya(e,t){var n=e.changeListeners_||(e.changeListeners_=[]);return n.push(t),Wi(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function Qa(e,t){var n=Uo(),r=e.changeListeners_;if(r){for(var i=0,s=(r=r.slice()).length;i<s;i++)r[i](t);Bo(n)}}var Ja=Symbol("mobx-keys");function el(e,t,n){return"production"!==process.env.NODE_ENV&&(Qi(e)||Qi(Object.getPrototypeOf(e))||Ni("'makeAutoObservable' can only be used for classes that don't have a superclass"),Rl(e)&&Ni("makeAutoObservable can only be used on objects not already made observable")),Qi(e)?Na(e,e,t,n):(Hl(function(){var r=Tl(e,n)[Ss];if(!e[Ja]){var i=Object.getPrototypeOf(e),s=new Set([].concat(os(e),os(i)));s.delete("constructor"),s.delete(Ss),es(i,Ja,s)}e[Ja].forEach(function(e){return r.make_(e,!t||(!(e in t)||t[e]))})}),e)}var tl="splice",nl="update",rl={get:function(e,t){var n=e[Ss];return t===Ss?n:"length"===t?n.getArrayLength_():"string"!=typeof t||isNaN(t)?us(ol,t)?ol[t]:e[t]:n.get_(parseInt(t))},set:function(e,t,n){var r=e[Ss];return"length"===t&&r.setArrayLength_(n),"symbol"==typeof t||isNaN(t)?e[t]=n:r.set_(parseInt(t),n),!0},preventExtensions:function(){Ni(15)}},il=function(){function e(e,t,n,r){void 0===e&&(e="production"!==process.env.NODE_ENV?"ObservableArray@"+Hi():"ObservableArray"),this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=n,this.legacyMode_=r,this.atom_=new Ts(e),this.enhancer_=function(n,r){return t(n,r,"production"!==process.env.NODE_ENV?e+"[..]":"ObservableArray[..]")}}var t=e.prototype;return t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.dehanceValues_=function(e){return void 0!==this.dehancer&&e.length>0?e.map(this.dehancer):e},t.intercept_=function(e){return Za(this,e)},t.observe_=function(e,t){return void 0===t&&(t=!1),t&&e({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),Ya(this,e)},t.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},t.setArrayLength_=function(e){("number"!=typeof e||isNaN(e)||e<0)&&Ni("Out of range: "+e);var t=this.values_.length;if(e!==t)if(e>t){for(var n=new Array(e-t),r=0;r<e-t;r++)n[r]=void 0;this.spliceWithArray_(t,0,n)}else this.spliceWithArray_(e,t-e)},t.updateArrayLength_=function(e,t){e!==this.lastKnownLength_&&Ni(16),this.lastKnownLength_+=t,this.legacyMode_&&t>0&&Ul(e+t+1)},t.spliceWithArray_=function(e,t,n){var r=this;zo(this.atom_);var i=this.values_.length;if(void 0===e?e=0:e>i?e=i:e<0&&(e=Math.max(0,i+e)),t=1===arguments.length?i-e:null==t?0:Math.max(0,Math.min(t,i-e)),void 0===n&&(n=Vi),Wa(this)){var s=Ka(this,{object:this.proxy_,type:tl,index:e,removedCount:t,added:n});if(!s)return Vi;t=s.removedCount,n=s.added}if(n=0===n.length?n:n.map(function(e){return r.enhancer_(e,void 0)}),this.legacyMode_||"production"!==process.env.NODE_ENV){var o=n.length-t;this.updateArrayLength_(i,o)}var a=this.spliceItemsIntoValues_(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice_(e,n,a),this.dehanceValues_(a)},t.spliceItemsIntoValues_=function(e,t,n){var r;if(n.length<1e4)return(r=this.values_).splice.apply(r,[e,t].concat(n));var i=this.values_.slice(e,e+t),s=this.values_.slice(e+t);this.values_.length+=n.length-t;for(var o=0;o<n.length;o++)this.values_[e+o]=n[o];for(var a=0;a<s.length;a++)this.values_[e+n.length+a]=s[a];return i},t.notifyArrayChildUpdate_=function(e,t,n){var r=!this.owned_&&ha(),i=Xa(this),s=i||r?{observableKind:"array",object:this.proxy_,type:nl,debugObjectName:this.atom_.name_,index:e,newValue:t,oldValue:n}:null;"production"!==process.env.NODE_ENV&&r&&fa(s),this.atom_.reportChanged(),i&&Qa(this,s),"production"!==process.env.NODE_ENV&&r&&ga()},t.notifyArraySplice_=function(e,t,n){var r=!this.owned_&&ha(),i=Xa(this),s=i||r?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:tl,index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;"production"!==process.env.NODE_ENV&&r&&fa(s),this.atom_.reportChanged(),i&&Qa(this,s),"production"!==process.env.NODE_ENV&&r&&ga()},t.get_=function(e){if(!(this.legacyMode_&&e>=this.values_.length))return this.atom_.reportObserved(),this.dehanceValue_(this.values_[e]);console.warn("production"!==process.env.NODE_ENV?"[mobx.array] Attempt to read an array index ("+e+") that is out of bounds ("+this.values_.length+"). Please check length first. Out of bound indices will not be tracked by MobX":"[mobx] Out of bounds read: "+e)},t.set_=function(e,t){var n=this.values_;if(this.legacyMode_&&e>n.length&&Ni(17,e,n.length),e<n.length){zo(this.atom_);var r=n[e];if(Wa(this)){var i=Ka(this,{type:nl,object:this.proxy_,index:e,newValue:t});if(!i)return;t=i.newValue}(t=this.enhancer_(t,r))!==r&&(n[e]=t,this.notifyArrayChildUpdate_(e,t,r))}else{for(var s=new Array(e+1-n.length),o=0;o<s.length-1;o++)s[o]=void 0;s[s.length-1]=t,this.spliceWithArray_(n.length,0,s)}},e}();function sl(e,t,n,r){return void 0===n&&(n="production"!==process.env.NODE_ENV?"ObservableArray@"+Hi():"ObservableArray"),void 0===r&&(r=!1),$i(),Hl(function(){var i=new il(n,t,r,!1);ts(i.values_,Ss,i);var s=new Proxy(i.values_,rl);return i.proxy_=s,e&&e.length&&i.spliceWithArray_(0,0,e),s})}var ol={clear:function(){return this.splice(0)},replace:function(e){var t=this[Ss];return t.spliceWithArray_(0,t.values_.length,e)},toJSON:function(){return this.slice()},splice:function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var s=this[Ss];switch(arguments.length){case 0:return[];case 1:return s.spliceWithArray_(e);case 2:return s.spliceWithArray_(e,t)}return s.spliceWithArray_(e,t,r)},spliceWithArray:function(e,t,n){return this[Ss].spliceWithArray_(e,t,n)},push:function(){for(var e=this[Ss],t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.spliceWithArray_(e.values_.length,0,n),e.values_.length},pop:function(){return this.splice(Math.max(this[Ss].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=this[Ss],t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.spliceWithArray_(0,0,n),e.values_.length},reverse:function(){return Ko.trackingDerivation&&Ni(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){Ko.trackingDerivation&&Ni(37,"sort");var e=this.slice();return e.sort.apply(e,arguments),this.replace(e),this},remove:function(e){var t=this[Ss],n=t.dehanceValues_(t.values_).indexOf(e);return n>-1&&(this.splice(n,1),!0)}};function al(e,t){"function"==typeof Array.prototype[e]&&(ol[e]=t(e))}function ll(e){return function(){var t=this[Ss];t.atom_.reportObserved();var n=t.dehanceValues_(t.values_);return n[e].apply(n,arguments)}}function ul(e){return function(t,n){var r=this,i=this[Ss];return i.atom_.reportObserved(),i.dehanceValues_(i.values_)[e](function(e,i){return t.call(n,e,i,r)})}}function cl(e){return function(){var t=this,n=this[Ss];n.atom_.reportObserved();var r=n.dehanceValues_(n.values_),i=arguments[0];return arguments[0]=function(e,n,r){return i(e,n,r,t)},r[e].apply(r,arguments)}}al("at",ll),al("concat",ll),al("flat",ll),al("includes",ll),al("indexOf",ll),al("join",ll),al("lastIndexOf",ll),al("slice",ll),al("toString",ll),al("toLocaleString",ll),al("toSorted",ll),al("toSpliced",ll),al("with",ll),al("every",ul),al("filter",ul),al("find",ul),al("findIndex",ul),al("findLast",ul),al("findLastIndex",ul),al("flatMap",ul),al("forEach",ul),al("map",ul),al("some",ul),al("toReversed",ul),al("reduce",cl),al("reduceRight",cl);var hl=ns("ObservableArrayAdministration",il);function dl(e){return Yi(e)&&hl(e[Ss])}var fl={},pl="add",gl="delete",ml=function(){function e(e,t,n){var r=this;void 0===t&&(t=Cs),void 0===n&&(n="production"!==process.env.NODE_ENV?"ObservableMap@"+Hi():"ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[Ss]=fl,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=t,this.name_=n,Ki(Map)||Ni(18),Hl(function(){r.keysAtom_=Os("production"!==process.env.NODE_ENV?r.name_+".keys()":"ObservableMap.keys()"),r.data_=new Map,r.hasMap_=new Map,e&&r.merge(e)})}var t=e.prototype;return t.has_=function(e){return this.data_.has(e)},t.has=function(e){var t=this;if(!Ko.trackingDerivation)return this.has_(e);var n=this.hasMap_.get(e);if(!n){var r=n=new Ro(this.has_(e),Ps,"production"!==process.env.NODE_ENV?this.name_+"."+as(e)+"?":"ObservableMap.key?",!1);this.hasMap_.set(e,r),Ra(r,function(){return t.hasMap_.delete(e)})}return n.get()},t.set=function(e,t){var n=this.has_(e);if(Wa(this)){var r=Ka(this,{type:n?nl:pl,object:this,newValue:t,name:e});if(!r)return this;t=r.newValue}return n?this.updateValue_(e,t):this.addValue_(e,t),this},t.delete=function(e){var t=this;if((zo(this.keysAtom_),Wa(this))&&!Ka(this,{type:gl,object:this,name:e}))return!1;if(this.has_(e)){var n=ha(),r=Xa(this),i=r||n?{observableKind:"map",debugObjectName:this.name_,type:gl,object:this,oldValue:this.data_.get(e).value_,name:e}:null;return"production"!==process.env.NODE_ENV&&n&&fa(i),$a(function(){var n;t.keysAtom_.reportChanged(),null==(n=t.hasMap_.get(e))||n.setNewValue_(!1),t.data_.get(e).setNewValue_(void 0),t.data_.delete(e)}),r&&Qa(this,i),"production"!==process.env.NODE_ENV&&n&&ga(),!0}return!1},t.updateValue_=function(e,t){var n=this.data_.get(e);if((t=n.prepareNewValue_(t))!==Ko.UNCHANGED){var r=ha(),i=Xa(this),s=i||r?{observableKind:"map",debugObjectName:this.name_,type:nl,object:this,oldValue:n.value_,name:e,newValue:t}:null;"production"!==process.env.NODE_ENV&&r&&fa(s),n.setNewValue_(t),i&&Qa(this,s),"production"!==process.env.NODE_ENV&&r&&ga()}},t.addValue_=function(e,t){var n=this;zo(this.keysAtom_),$a(function(){var r,i=new Ro(t,n.enhancer_,"production"!==process.env.NODE_ENV?n.name_+"."+as(e):"ObservableMap.key",!1);n.data_.set(e,i),t=i.value_,null==(r=n.hasMap_.get(e))||r.setNewValue_(!0),n.keysAtom_.reportChanged()});var r=ha(),i=Xa(this),s=i||r?{observableKind:"map",debugObjectName:this.name_,type:pl,object:this,name:e,newValue:t}:null;"production"!==process.env.NODE_ENV&&r&&fa(s),i&&Qa(this,s),"production"!==process.env.NODE_ENV&&r&&ga()},t.get=function(e){return this.has(e)?this.dehanceValue_(this.data_.get(e).get()):this.dehanceValue_(void 0)},t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},t.values=function(){var e=this,t=this.keys();return yl({next:function(){var n=t.next(),r=n.done,i=n.value;return{done:r,value:r?void 0:e.get(i)}}})},t.entries=function(){var e=this,t=this.keys();return yl({next:function(){var n=t.next(),r=n.done,i=n.value;return{done:r,value:r?void 0:[i,e.get(i)]}}})},t[Symbol.iterator]=function(){return this.entries()},t.forEach=function(e,t){for(var n,r=gs(this);!(n=r()).done;){var i=n.value,s=i[0],o=i[1];e.call(t,o,s,this)}},t.merge=function(e){var t=this;return _l(e)&&(e=new Map(e)),$a(function(){var n,r,i;Qi(e)?function(e){var t=Object.keys(e);if(!ss)return t;var n=Object.getOwnPropertySymbols(e);return n.length?[].concat(t,n.filter(function(t){return ji.propertyIsEnumerable.call(e,t)})):t}(e).forEach(function(n){return t.set(n,e[n])}):Array.isArray(e)?e.forEach(function(e){var n=e[0],r=e[1];return t.set(n,r)}):rs(e)?(n=e,r=Object.getPrototypeOf(n),i=Object.getPrototypeOf(r),null!==Object.getPrototypeOf(i)&&Ni(19,e),e.forEach(function(e,n){return t.set(n,e)})):null!=e&&Ni(20,e)}),this},t.clear=function(){var e=this;$a(function(){Vo(function(){for(var t,n=gs(e.keys());!(t=n()).done;){var r=t.value;e.delete(r)}})})},t.replace=function(e){var t=this;return $a(function(){for(var n,r=function(e){if(rs(e)||_l(e))return e;if(Array.isArray(e))return new Map(e);if(Qi(e)){var t=new Map;for(var n in e)t.set(n,e[n]);return t}return Ni(21,e)}(e),i=new Map,s=!1,o=gs(t.data_.keys());!(n=o()).done;){var a=n.value;if(!r.has(a))if(t.delete(a))s=!0;else{var l=t.data_.get(a);i.set(a,l)}}for(var u,c=gs(r.entries());!(u=c()).done;){var h=u.value,d=h[0],f=h[1],p=t.data_.has(d);if(t.set(d,f),t.data_.has(d)){var g=t.data_.get(d);i.set(d,g),p||(s=!0)}}if(!s)if(t.data_.size!==i.size)t.keysAtom_.reportChanged();else for(var m=t.data_.keys(),_=i.keys(),y=m.next(),v=_.next();!y.done;){if(y.value!==v.value){t.keysAtom_.reportChanged();break}y=m.next(),v=_.next()}t.data_=i}),this},t.toString=function(){return"[object ObservableMap]"},t.toJSON=function(){return Array.from(this)},t.observe_=function(e,t){return"production"!==process.env.NODE_ENV&&!0===t&&Ni("`observe` doesn't support fireImmediately=true in combination with maps."),Ya(this,e)},t.intercept_=function(e){return Za(this,e)},ps(e,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Map"}}])}(),_l=ns("ObservableMap",ml);function yl(e){return e[Symbol.toStringTag]="MapIterator",Jl(e)}var vl={},bl=function(){function e(e,t,n){var r=this;void 0===t&&(t=Cs),void 0===n&&(n="production"!==process.env.NODE_ENV?"ObservableSet@"+Hi():"ObservableSet"),this.name_=void 0,this[Ss]=vl,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=n,Ki(Set)||Ni(22),this.enhancer_=function(e,r){return t(e,r,n)},Hl(function(){r.atom_=Os(r.name_),e&&r.replace(e)})}var t=e.prototype;return t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.clear=function(){var e=this;$a(function(){Vo(function(){for(var t,n=gs(e.data_.values());!(t=n()).done;){var r=t.value;e.delete(r)}})})},t.forEach=function(e,t){for(var n,r=gs(this);!(n=r()).done;){var i=n.value;e.call(t,i,i,this)}},t.add=function(e){var t=this;if(zo(this.atom_),Wa(this)){var n=Ka(this,{type:pl,object:this,newValue:e});if(!n)return this;e=n.newValue}if(!this.has(e)){$a(function(){t.data_.add(t.enhancer_(e,void 0)),t.atom_.reportChanged()});var r="production"!==process.env.NODE_ENV&&ha(),i=Xa(this),s=i||r?{observableKind:"set",debugObjectName:this.name_,type:pl,object:this,newValue:e}:null;r&&"production"!==process.env.NODE_ENV&&fa(s),i&&Qa(this,s),r&&"production"!==process.env.NODE_ENV&&ga()}return this},t.delete=function(e){var t=this;if(Wa(this)&&!Ka(this,{type:gl,object:this,oldValue:e}))return!1;if(this.has(e)){var n="production"!==process.env.NODE_ENV&&ha(),r=Xa(this),i=r||n?{observableKind:"set",debugObjectName:this.name_,type:gl,object:this,oldValue:e}:null;return n&&"production"!==process.env.NODE_ENV&&fa(i),$a(function(){t.atom_.reportChanged(),t.data_.delete(e)}),r&&Qa(this,i),n&&"production"!==process.env.NODE_ENV&&ga(),!0}return!1},t.has=function(e){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(e))},t.entries=function(){var e=this.values();return wl({next:function(){var t=e.next(),n=t.value,r=t.done;return r?{value:void 0,done:r}:{value:[n,n],done:r}}})},t.keys=function(){return this.values()},t.values=function(){this.atom_.reportObserved();var e=this,t=this.data_.values();return wl({next:function(){var n=t.next(),r=n.value,i=n.done;return i?{value:void 0,done:i}:{value:e.dehanceValue_(r),done:i}}})},t.intersection=function(e){return is(e)&&!xl(e)?e.intersection(this):new Set(this).intersection(e)},t.union=function(e){return is(e)&&!xl(e)?e.union(this):new Set(this).union(e)},t.difference=function(e){return new Set(this).difference(e)},t.symmetricDifference=function(e){return is(e)&&!xl(e)?e.symmetricDifference(this):new Set(this).symmetricDifference(e)},t.isSubsetOf=function(e){return new Set(this).isSubsetOf(e)},t.isSupersetOf=function(e){return new Set(this).isSupersetOf(e)},t.isDisjointFrom=function(e){return is(e)&&!xl(e)?e.isDisjointFrom(this):new Set(this).isDisjointFrom(e)},t.replace=function(e){var t=this;return xl(e)&&(e=new Set(e)),$a(function(){Array.isArray(e)||is(e)?(t.clear(),e.forEach(function(e){return t.add(e)})):null!=e&&Ni("Cannot initialize set from "+e)}),this},t.observe_=function(e,t){return"production"!==process.env.NODE_ENV&&!0===t&&Ni("`observe` doesn't support fireImmediately=true in combination with sets."),Ya(this,e)},t.intercept_=function(e){return Za(this,e)},t.toJSON=function(){return Array.from(this)},t.toString=function(){return"[object ObservableSet]"},t[Symbol.iterator]=function(){return this.values()},ps(e,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Set"}}])}(),xl=ns("ObservableSet",bl);function wl(e){return e[Symbol.toStringTag]="SetIterator",Jl(e)}var El=Object.create(null),Al="remove",Sl=function(){function e(e,t,n,r){void 0===t&&(t=new Map),void 0===r&&(r=Js),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=e,this.values_=t,this.name_=n,this.defaultAnnotation_=r,this.keysAtom_=new Ts("production"!==process.env.NODE_ENV?this.name_+".keys":"ObservableObject.keys"),this.isPlainObject_=Qi(this.target_),"production"===process.env.NODE_ENV||tu(this.defaultAnnotation_)||Ni("defaultAnnotation must be valid annotation"),"production"!==process.env.NODE_ENV&&(this.appliedAnnotations_={})}var t=e.prototype;return t.getObservablePropValue_=function(e){return this.values_.get(e).get()},t.setObservablePropValue_=function(e,t){var n=this.values_.get(e);if(n instanceof Co)return n.set(t),!0;if(Wa(this)){var r=Ka(this,{type:nl,object:this.proxy_||this.target_,name:e,newValue:t});if(!r)return null;t=r.newValue}if((t=n.prepareNewValue_(t))!==Ko.UNCHANGED){var i=Xa(this),s="production"!==process.env.NODE_ENV&&ha(),o=i||s?{type:nl,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:n.value_,name:e,newValue:t}:null;"production"!==process.env.NODE_ENV&&s&&fa(o),n.setNewValue_(t),i&&Qa(this,o),"production"!==process.env.NODE_ENV&&s&&ga()}return!0},t.get_=function(e){return Ko.trackingDerivation&&!us(this.target_,e)&&this.has_(e),this.target_[e]},t.set_=function(e,t,n){return void 0===n&&(n=!1),us(this.target_,e)?this.values_.has(e)?this.setObservablePropValue_(e,t):n?Reflect.set(this.target_,e,t):(this.target_[e]=t,!0):this.extend_(e,{value:t,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,n)},t.has_=function(e){if(!Ko.trackingDerivation)return e in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var t=this.pendingKeys_.get(e);return t||(t=new Ro(e in this.target_,Ps,"production"!==process.env.NODE_ENV?this.name_+"."+as(e)+"?":"ObservableObject.key?",!1),this.pendingKeys_.set(e,t)),t.get()},t.make_=function(e,t){if(!0===t&&(t=this.defaultAnnotation_),!1!==t){if(Pl(this,t,e),!(e in this.target_)){var n;if(null!=(n=this.target_[bs])&&n[e])return;Ni(1,t.annotationType_,this.name_+"."+e.toString())}for(var r=this.target_;r&&r!==ji;){var i=zi(r,e);if(i){var s=t.make_(this,e,i,r);if(0===s)return;if(1===s)break}r=Object.getPrototypeOf(r)}Cl(this,t,e)}},t.extend_=function(e,t,n,r){if(void 0===r&&(r=!1),!0===n&&(n=this.defaultAnnotation_),!1===n)return this.defineProperty_(e,t,r);Pl(this,n,e);var i=n.extend_(this,e,t,r);return i&&Cl(this,n,e),i},t.defineProperty_=function(e,t,n){void 0===n&&(n=!1),zo(this.keysAtom_);try{Jo();var r=this.delete_(e);if(!r)return r;if(Wa(this)){var i=Ka(this,{object:this.proxy_||this.target_,name:e,type:pl,newValue:t.value});if(!i)return null;var s=i.newValue;t.value!==s&&(t=ms({},t,{value:s}))}if(n){if(!Reflect.defineProperty(this.target_,e,t))return!1}else Li(this.target_,e,t);this.notifyPropertyAddition_(e,t.value)}finally{ea()}return!0},t.defineObservableProperty_=function(e,t,n,r){void 0===r&&(r=!1),zo(this.keysAtom_);try{Jo();var i=this.delete_(e);if(!i)return i;if(Wa(this)){var s=Ka(this,{object:this.proxy_||this.target_,name:e,type:pl,newValue:t});if(!s)return null;t=s.newValue}var o=Ol(e),a={configurable:!Ko.safeDescriptors||this.isPlainObject_,enumerable:!0,get:o.get,set:o.set};if(r){if(!Reflect.defineProperty(this.target_,e,a))return!1}else Li(this.target_,e,a);var l=new Ro(t,n,"production"!==process.env.NODE_ENV?this.name_+"."+e.toString():"ObservableObject.key",!1);this.values_.set(e,l),this.notifyPropertyAddition_(e,l.value_)}finally{ea()}return!0},t.defineComputedProperty_=function(e,t,n){void 0===n&&(n=!1),zo(this.keysAtom_);try{Jo();var r=this.delete_(e);if(!r)return r;if(Wa(this))if(!Ka(this,{object:this.proxy_||this.target_,name:e,type:pl,newValue:void 0}))return null;t.name||(t.name="production"!==process.env.NODE_ENV?this.name_+"."+e.toString():"ObservableObject.key"),t.context=this.proxy_||this.target_;var i=Ol(e),s={configurable:!Ko.safeDescriptors||this.isPlainObject_,enumerable:!1,get:i.get,set:i.set};if(n){if(!Reflect.defineProperty(this.target_,e,s))return!1}else Li(this.target_,e,s);this.values_.set(e,new Co(t)),this.notifyPropertyAddition_(e,void 0)}finally{ea()}return!0},t.delete_=function(e,t){if(void 0===t&&(t=!1),zo(this.keysAtom_),!us(this.target_,e))return!0;if(Wa(this)&&!Ka(this,{object:this.proxy_||this.target_,name:e,type:Al}))return null;try{var n;Jo();var r,i=Xa(this),s="production"!==process.env.NODE_ENV&&ha(),o=this.values_.get(e),a=void 0;if(!o&&(i||s))a=null==(r=zi(this.target_,e))?void 0:r.value;if(t){if(!Reflect.deleteProperty(this.target_,e))return!1}else delete this.target_[e];if("production"!==process.env.NODE_ENV&&delete this.appliedAnnotations_[e],o&&(this.values_.delete(e),o instanceof Ro&&(a=o.value_),na(o)),this.keysAtom_.reportChanged(),null==(n=this.pendingKeys_)||null==(n=n.get(e))||n.set(e in this.target_),i||s){var l={type:Al,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:a,name:e};"production"!==process.env.NODE_ENV&&s&&fa(l),i&&Qa(this,l),"production"!==process.env.NODE_ENV&&s&&ga()}}finally{ea()}return!0},t.observe_=function(e,t){return"production"!==process.env.NODE_ENV&&!0===t&&Ni("`observe` doesn't support the fire immediately property for observable objects."),Ya(this,e)},t.intercept_=function(e){return Za(this,e)},t.notifyPropertyAddition_=function(e,t){var n,r=Xa(this),i="production"!==process.env.NODE_ENV&&ha();if(r||i){var s=r||i?{type:pl,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:e,newValue:t}:null;"production"!==process.env.NODE_ENV&&i&&fa(s),r&&Qa(this,s),"production"!==process.env.NODE_ENV&&i&&ga()}null==(n=this.pendingKeys_)||null==(n=n.get(e))||n.set(!0),this.keysAtom_.reportChanged()},t.ownKeys_=function(){return this.keysAtom_.reportObserved(),os(this.target_)},t.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},e}();function Tl(e,t){var n;if("production"!==process.env.NODE_ENV&&t&&Rl(e)&&Ni("Options can't be provided for already observable objects."),us(e,Ss))return"production"===process.env.NODE_ENV||$l(e)instanceof Sl||Ni("Cannot convert '"+ql(e)+"' into observable object:\nThe target is already observable of different type.\nExtending builtins is not supported."),e;"production"===process.env.NODE_ENV||Object.isExtensible(e)||Ni("Cannot make the designated object observable; it is not extensible");var r=null!=(n=null==t?void 0:t.name)?n:"production"!==process.env.NODE_ENV?(Qi(e)?"ObservableObject":e.constructor.name)+"@"+Hi():"ObservableObject",i=new Sl(e,new Map,String(r),function(e){var t;return e?null!=(t=e.defaultDecorator)?t:eo(e):void 0}(t));return es(e,Ss,i),e}var kl=ns("ObservableObjectAdministration",Sl);function Ol(e){return El[e]||(El[e]={get:function(){return this[Ss].getObservablePropValue_(e)},set:function(t){return this[Ss].setObservablePropValue_(e,t)}})}function Rl(e){return!!Yi(e)&&kl(e[Ss])}function Cl(e,t,n){var r;"production"!==process.env.NODE_ENV&&(e.appliedAnnotations_[n]=t),null==(r=e.target_[bs])||delete r[n]}function Pl(e,t,n){if("production"===process.env.NODE_ENV||tu(t)||Ni("Cannot annotate '"+e.name_+"."+n.toString()+"': Invalid annotation."),"production"!==process.env.NODE_ENV&&!Ns(t)&&us(e.appliedAnnotations_,n)){var r=e.name_+"."+n.toString(),i=e.appliedAnnotations_[n].annotationType_;Ni("Cannot apply '"+t.annotationType_+"' to '"+r+"':\nThe field is already annotated with '"+i+"'.\nRe-annotating fields is not allowed.\nUse 'override' annotation for methods overridden by subclass.")}}var Ml,Nl,Dl=jl(0),Fl=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,!1===e}(),Il=0,zl=function(){};Ml=zl,Nl=Array.prototype,Object.setPrototypeOf?Object.setPrototypeOf(Ml.prototype,Nl):void 0!==Ml.prototype.__proto__?Ml.prototype.__proto__=Nl:Ml.prototype=Nl;var Ll=function(e){function t(t,n,r,i){var s;return void 0===r&&(r="production"!==process.env.NODE_ENV?"ObservableArray@"+Hi():"ObservableArray"),void 0===i&&(i=!1),s=e.call(this)||this,Hl(function(){var e=new il(r,n,i,!0);e.proxy_=s,ts(s,Ss,e),t&&t.length&&s.spliceWithArray(0,0,t),Fl&&Object.defineProperty(s,"0",Dl)}),s}_s(t,e);var n=t.prototype;return n.concat=function(){this[Ss].atom_.reportObserved();for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Array.prototype.concat.apply(this.slice(),t.map(function(e){return dl(e)?e.slice():e}))},n[Symbol.iterator]=function(){var e=this,t=0;return Jl({next:function(){return t<e.length?{value:e[t++],done:!1}:{done:!0,value:void 0}}})},ps(t,[{key:"length",get:function(){return this[Ss].getArrayLength_()},set:function(e){this[Ss].setArrayLength_(e)}},{key:Symbol.toStringTag,get:function(){return"Array"}}])}(zl);function jl(e){return{enumerable:!1,configurable:!0,get:function(){return this[Ss].get_(e)},set:function(t){this[Ss].set_(e,t)}}}function Vl(e){Li(Ll.prototype,""+e,jl(e))}function Ul(e){if(e>Il){for(var t=Il;t<e+100;t++)Vl(t);Il=e}}function Bl(e,t,n){return new Ll(e,t,n)}function Gl(e,t){if("object"==typeof e&&null!==e){if(dl(e))return void 0!==t&&Ni(23),e[Ss].atom_;if(xl(e))return e.atom_;if(_l(e)){if(void 0===t)return e.keysAtom_;var n=e.data_.get(t)||e.hasMap_.get(t);return n||Ni(25,t,ql(e)),n}if(Rl(e)){if(!t)return Ni(26);var r=e[Ss].values_.get(t);return r||Ni(27,t,ql(e)),r}if(ks(e)||No(e)||ca(e))return e}else if(Ki(e)&&ca(e[Ss]))return e[Ss];Ni(28)}function $l(e,t){return e||Ni(29),ks(e)||No(e)||ca(e)||_l(e)||xl(e)?e:e[Ss]?e[Ss]:void Ni(24,e)}function ql(e,t){var n;if(void 0!==t)n=Gl(e,t);else{if(Sa(e))return e.name;n=Rl(e)||_l(e)||xl(e)?$l(e):Gl(e)}return n.name_}function Hl(e){var t=Uo(),n=ko(!0);Jo();try{return e()}finally{ea(),Oo(n),Bo(t)}}Object.entries(ol).forEach(function(e){var t=e[0],n=e[1];"concat"!==t&&es(Ll.prototype,t,n)}),Ul(1e3);var Wl,Zl=ji.toString;function Kl(e,t,n){return void 0===n&&(n=-1),Xl(e,t,n)}function Xl(e,t,n,r,i){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var s=typeof e;if("function"!==s&&"object"!==s&&"object"!=typeof t)return!1;var o=Zl.call(e);if(o!==Zl.call(t))return!1;switch(o){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0===+e?1/+e==1/t:+e===+t;case"[object Date]":case"[object Boolean]":return+e===+t;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t);case"[object Map]":case"[object Set]":n>=0&&n++}e=Yl(e),t=Yl(t);var a="[object Array]"===o;if(!a){if("object"!=typeof e||"object"!=typeof t)return!1;var l=e.constructor,u=t.constructor;if(l!==u&&!(Ki(l)&&l instanceof l&&Ki(u)&&u instanceof u)&&"constructor"in e&&"constructor"in t)return!1}if(0===n)return!1;n<0&&(n=-1),i=i||[];for(var c=(r=r||[]).length;c--;)if(r[c]===e)return i[c]===t;if(r.push(e),i.push(t),a){if((c=e.length)!==t.length)return!1;for(;c--;)if(!Xl(e[c],t[c],n-1,r,i))return!1}else{var h=Object.keys(e),d=h.length;if(Object.keys(t).length!==d)return!1;for(var f=0;f<d;f++){var p=h[f];if(!us(t,p)||!Xl(e[p],t[p],n-1,r,i))return!1}}return r.pop(),i.pop(),!0}function Yl(e){return dl(e)?e.slice():rs(e)||_l(e)||is(e)||xl(e)?Array.from(e.entries()):e}var Ql=(null==(Wl=Fi().Iterator)?void 0:Wl.prototype)||{};function Jl(e){return e[Symbol.iterator]=eu,Object.assign(Object.create(Ql),e)}function eu(){return this}function tu(e){return e instanceof Object&&"string"==typeof e.annotationType_&&Ki(e.make_)&&Ki(e.extend_)}["Symbol","Map","Set"].forEach(function(e){void 0===Fi()[e]&&Ni("MobX requires global '"+e+"' to be available or polyfilled")}),"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:function(e){return"production"===process.env.NODE_ENV?(console.warn("[mobx.spy] Is a no-op in production builds"),function(){}):(Ko.spyListeners.push(e),Wi(function(){Ko.spyListeners=Ko.spyListeners.filter(function(t){return t!==e})}))},extras:{getDebugName:ql},$mobx:Ss});class nu{constructor(){el(this)}_visible=_o.map();getIsVisible(e){return this._visible.get(e)??!1}_setVisible({name:e,value:t}){this._visible.set(e,t)}openModal(e){this._setVisible({name:e,value:!0})}closeModal(e){this._setVisible({name:e,value:!1})}closeAllModals(){this._visible.clear()}}class ru{constructor(){el(this)}_isUnauthorized=!1;get isUnauthorized(){return this._isUnauthorized}set isUnauthorized(e){this._isUnauthorized=e}}const iu=new class{authStore=new ru;modalStore=new nu},su=n.createContext(iu),ou=({children:t})=>e(su.Provider,{value:iu,children:t}),au=()=>{const e=n.useContext(su);if(null===e)throw new Error("You have forgotten to wrap your root component with RootStoreProvider");return e};function lu(e,t){return function(){return e.apply(t,arguments)}}const{toString:uu}=Object.prototype,{getPrototypeOf:cu}=Object,{iterator:hu,toStringTag:du}=Symbol,fu=(pu=Object.create(null),e=>{const t=uu.call(e);return pu[t]||(pu[t]=t.slice(8,-1).toLowerCase())});var pu;const gu=e=>(e=e.toLowerCase(),t=>fu(t)===e),mu=e=>t=>typeof t===e,{isArray:_u}=Array,yu=mu("undefined");function vu(e){return null!==e&&!yu(e)&&null!==e.constructor&&!yu(e.constructor)&&wu(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const bu=gu("ArrayBuffer");const xu=mu("string"),wu=mu("function"),Eu=mu("number"),Au=e=>null!==e&&"object"==typeof e,Su=e=>{if("object"!==fu(e))return!1;const t=cu(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||du in e||hu in e)},Tu=gu("Date"),ku=gu("File"),Ou=gu("Blob"),Ru=gu("FileList"),Cu=gu("URLSearchParams"),[Pu,Mu,Nu,Du]=["ReadableStream","Request","Response","Headers"].map(gu);function Fu(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,i;if("object"!=typeof e&&(e=[e]),_u(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(vu(e))return;const i=n?Object.getOwnPropertyNames(e):Object.keys(e),s=i.length;let o;for(r=0;r<s;r++)o=i[r],t.call(null,e[o],o,e)}}function Iu(e,t){if(vu(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r,i=n.length;for(;i-- >0;)if(r=n[i],t===r.toLowerCase())return r;return null}const zu="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Lu=e=>!yu(e)&&e!==zu;const ju=(Vu="undefined"!=typeof Uint8Array&&cu(Uint8Array),e=>Vu&&e instanceof Vu);var Vu;const Uu=gu("HTMLFormElement"),Bu=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Gu=gu("RegExp"),$u=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Fu(n,(n,i)=>{let s;!1!==(s=t(n,i,e))&&(r[i]=s||n)}),Object.defineProperties(e,r)};const qu=gu("AsyncFunction"),Hu=(Wu="function"==typeof setImmediate,Zu=wu(zu.postMessage),Wu?setImmediate:Zu?(Ku=`axios@${Math.random()}`,Xu=[],zu.addEventListener("message",({source:e,data:t})=>{e===zu&&t===Ku&&Xu.length&&Xu.shift()()},!1),e=>{Xu.push(e),zu.postMessage(Ku,"*")}):e=>setTimeout(e));var Wu,Zu,Ku,Xu;const Yu="undefined"!=typeof queueMicrotask?queueMicrotask.bind(zu):"undefined"!=typeof process&&process.nextTick||Hu;var Qu={isArray:_u,isArrayBuffer:bu,isBuffer:vu,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||wu(e.append)&&("formdata"===(t=fu(e))||"object"===t&&wu(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&bu(e.buffer),t},isString:xu,isNumber:Eu,isBoolean:e=>!0===e||!1===e,isObject:Au,isPlainObject:Su,isEmptyObject:e=>{if(!Au(e)||vu(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:Pu,isRequest:Mu,isResponse:Nu,isHeaders:Du,isUndefined:yu,isDate:Tu,isFile:ku,isBlob:Ou,isRegExp:Gu,isFunction:wu,isStream:e=>Au(e)&&wu(e.pipe),isURLSearchParams:Cu,isTypedArray:ju,isFileList:Ru,forEach:Fu,merge:function e(){const{caseless:t,skipUndefined:n}=Lu(this)&&this||{},r={},i=(i,s)=>{const o=t&&Iu(r,s)||s;Su(r[o])&&Su(i)?r[o]=e(r[o],i):Su(i)?r[o]=e({},i):_u(i)?r[o]=i.slice():n&&yu(i)||(r[o]=i)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&Fu(arguments[e],i);return r},extend:(e,t,n,{allOwnKeys:r}={})=>(Fu(t,(t,r)=>{n&&wu(t)?e[r]=lu(t,n):e[r]=t},{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let i,s,o;const a={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)o=i[s],r&&!r(o,e,t)||a[o]||(t[o]=e[o],a[o]=!0);e=!1!==n&&cu(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:fu,kindOfTest:gu,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(_u(e))return e;let t=e.length;if(!Eu(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[hu]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:Uu,hasOwnProperty:Bu,hasOwnProp:Bu,reduceDescriptors:$u,freezeMethods:e=>{$u(e,(t,n)=>{if(wu(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];wu(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return _u(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:Iu,global:zu,isContextDefined:Lu,isSpecCompliantForm:function(e){return!!(e&&wu(e.append)&&"FormData"===e[du]&&e[hu])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(Au(e)){if(t.indexOf(e)>=0)return;if(vu(e))return e;if(!("toJSON"in e)){t[r]=e;const i=_u(e)?[]:{};return Fu(e,(e,t)=>{const s=n(e,r+1);!yu(s)&&(i[t]=s)}),t[r]=void 0,i}}return e};return n(e,0)},isAsyncFn:qu,isThenable:e=>e&&(Au(e)||wu(e))&&wu(e.then)&&wu(e.catch),setImmediate:Hu,asap:Yu,isIterable:e=>null!=e&&wu(e[hu])};function Ju(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}Qu.inherits(Ju,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Qu.toJSONObject(this.config),code:this.code,status:this.status}}});const ec=Ju.prototype,tc={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{tc[e]={value:e}}),Object.defineProperties(Ju,tc),Object.defineProperty(ec,"isAxiosError",{value:!0}),Ju.from=(e,t,n,r,i,s)=>{const o=Object.create(ec);Qu.toFlatObject(e,o,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e);const a=e&&e.message?e.message:"Error",l=null==t&&e?e.code:t;return Ju.call(o,a,l,n,r,i),e&&null==o.cause&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",s&&Object.assign(o,s),o};function nc(e){return Qu.isPlainObject(e)||Qu.isArray(e)}function rc(e){return Qu.endsWith(e,"[]")?e.slice(0,-2):e}function ic(e,t,n){return e?e.concat(t).map(function(e,t){return e=rc(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const sc=Qu.toFlatObject(Qu,{},null,function(e){return/^is[A-Z]/.test(e)});function oc(e,t,n){if(!Qu.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=Qu.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!Qu.isUndefined(t[e])})).metaTokens,i=n.visitor||u,s=n.dots,o=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&Qu.isSpecCompliantForm(t);if(!Qu.isFunction(i))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(Qu.isDate(e))return e.toISOString();if(Qu.isBoolean(e))return e.toString();if(!a&&Qu.isBlob(e))throw new Ju("Blob is not supported. Use a Buffer instead.");return Qu.isArrayBuffer(e)||Qu.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,i){let a=e;if(e&&!i&&"object"==typeof e)if(Qu.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(Qu.isArray(e)&&function(e){return Qu.isArray(e)&&!e.some(nc)}(e)||(Qu.isFileList(e)||Qu.endsWith(n,"[]"))&&(a=Qu.toArray(e)))return n=rc(n),a.forEach(function(e,r){!Qu.isUndefined(e)&&null!==e&&t.append(!0===o?ic([n],r,s):null===o?n:n+"[]",l(e))}),!1;return!!nc(e)||(t.append(ic(i,n,s),l(e)),!1)}const c=[],h=Object.assign(sc,{defaultVisitor:u,convertValue:l,isVisitable:nc});if(!Qu.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!Qu.isUndefined(n)){if(-1!==c.indexOf(n))throw Error("Circular reference detected in "+r.join("."));c.push(n),Qu.forEach(n,function(n,s){!0===(!(Qu.isUndefined(n)||null===n)&&i.call(t,n,Qu.isString(s)?s.trim():s,r,h))&&e(n,r?r.concat(s):[s])}),c.pop()}}(e),t}function ac(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function lc(e,t){this._pairs=[],e&&oc(e,this,t)}const uc=lc.prototype;function cc(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function hc(e,t,n){if(!t)return e;const r=n&&n.encode||cc;Qu.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let s;if(s=i?i(t,n):Qu.isURLSearchParams(t)?t.toString():new lc(t,n).toString(r),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}uc.append=function(e,t){this._pairs.push([e,t])},uc.toString=function(e){const t=e?function(t){return e.call(this,t,ac)}:ac;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};class dc{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Qu.forEach(this.handlers,function(t){null!==t&&e(t)})}}var fc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},pc={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:lc,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const gc="undefined"!=typeof window&&"undefined"!=typeof document,mc="object"==typeof navigator&&navigator||void 0,_c=gc&&(!mc||["ReactNative","NativeScript","NS"].indexOf(mc.product)<0),yc="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,vc=gc&&window.location.href||"http://localhost";var bc={...Object.freeze({__proto__:null,hasBrowserEnv:gc,hasStandardBrowserEnv:_c,hasStandardBrowserWebWorkerEnv:yc,navigator:mc,origin:vc}),...pc};function xc(e){function t(e,n,r,i){let s=e[i++];if("__proto__"===s)return!0;const o=Number.isFinite(+s),a=i>=e.length;if(s=!s&&Qu.isArray(r)?r.length:s,a)return Qu.hasOwnProp(r,s)?r[s]=[r[s],n]:r[s]=n,!o;r[s]&&Qu.isObject(r[s])||(r[s]=[]);return t(e,n,r[s],i)&&Qu.isArray(r[s])&&(r[s]=function(e){const t={},n=Object.keys(e);let r;const i=n.length;let s;for(r=0;r<i;r++)s=n[r],t[s]=e[s];return t}(r[s])),!o}if(Qu.isFormData(e)&&Qu.isFunction(e.entries)){const n={};return Qu.forEachEntry(e,(e,r)=>{t(function(e){return Qu.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,n,0)}),n}return null}const wc={transitional:fc,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,i=Qu.isObject(e);i&&Qu.isHTMLForm(e)&&(e=new FormData(e));if(Qu.isFormData(e))return r?JSON.stringify(xc(e)):e;if(Qu.isArrayBuffer(e)||Qu.isBuffer(e)||Qu.isStream(e)||Qu.isFile(e)||Qu.isBlob(e)||Qu.isReadableStream(e))return e;if(Qu.isArrayBufferView(e))return e.buffer;if(Qu.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return oc(e,new bc.classes.URLSearchParams,{visitor:function(e,t,n,r){return bc.isNode&&Qu.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((s=Qu.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return oc(s?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||r?(t.setContentType("application/json",!1),function(e,t,n){if(Qu.isString(e))try{return(t||JSON.parse)(e),Qu.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||wc.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(Qu.isResponse(e)||Qu.isReadableStream(e))return e;if(e&&Qu.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(e){if(n){if("SyntaxError"===e.name)throw Ju.from(e,Ju.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:bc.classes.FormData,Blob:bc.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Qu.forEach(["delete","get","head","post","put","patch"],e=>{wc.headers[e]={}});const Ec=Qu.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const Ac=Symbol("internals");function Sc(e){return e&&String(e).trim().toLowerCase()}function Tc(e){return!1===e||null==e?e:Qu.isArray(e)?e.map(Tc):String(e)}function kc(e,t,n,r,i){return Qu.isFunction(r)?r.call(this,t,n):(i&&(t=n),Qu.isString(t)?Qu.isString(r)?-1!==t.indexOf(r):Qu.isRegExp(r)?r.test(t):void 0:void 0)}let Oc=class{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function i(e,t,n){const i=Sc(t);if(!i)throw new Error("header name must be a non-empty string");const s=Qu.findKey(r,i);(!s||void 0===r[s]||!0===n||void 0===n&&!1!==r[s])&&(r[s||t]=Tc(e))}const s=(e,t)=>Qu.forEach(e,(e,n)=>i(e,n,t));if(Qu.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(Qu.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))s((e=>{const t={};let n,r,i;return e&&e.split("\n").forEach(function(e){i=e.indexOf(":"),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!n||t[n]&&Ec[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t})(e),t);else if(Qu.isObject(e)&&Qu.isIterable(e)){let n,r,i={};for(const t of e){if(!Qu.isArray(t))throw TypeError("Object iterator must return a key-value pair");i[r=t[0]]=(n=i[r])?Qu.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}s(i,t)}else null!=e&&i(t,e,n);return this}get(e,t){if(e=Sc(e)){const n=Qu.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(Qu.isFunction(t))return t.call(this,e,n);if(Qu.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Sc(e)){const n=Qu.findKey(this,e);return!(!n||void 0===this[n]||t&&!kc(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function i(e){if(e=Sc(e)){const i=Qu.findKey(n,e);!i||t&&!kc(0,n[i],i,t)||(delete n[i],r=!0)}}return Qu.isArray(e)?e.forEach(i):i(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const i=t[n];e&&!kc(0,this[i],i,e,!0)||(delete this[i],r=!0)}return r}normalize(e){const t=this,n={};return Qu.forEach(this,(r,i)=>{const s=Qu.findKey(n,i);if(s)return t[s]=Tc(r),void delete t[i];const o=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(i):String(i).trim();o!==i&&delete t[i],t[o]=Tc(r),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Qu.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&Qu.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[Ac]=this[Ac]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Sc(e);t[r]||(!function(e,t){const n=Qu.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})})}(n,e),t[r]=!0)}return Qu.isArray(e)?e.forEach(r):r(e),this}};function Rc(e,t){const n=this||wc,r=t||n,i=Oc.from(r.headers);let s=r.data;return Qu.forEach(e,function(e){s=e.call(n,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function Cc(e){return!(!e||!e.__CANCEL__)}function Pc(e,t,n){Ju.call(this,null==e?"canceled":e,Ju.ERR_CANCELED,t,n),this.name="CanceledError"}function Mc(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Ju("Request failed with status code "+n.status,[Ju.ERR_BAD_REQUEST,Ju.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}Oc.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Qu.reduceDescriptors(Oc.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),Qu.freezeMethods(Oc),Qu.inherits(Pc,Ju,{__CANCEL__:!0});const Nc=(e,t,n=3)=>{let r=0;const i=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i,s=0,o=0;return t=void 0!==t?t:1e3,function(a){const l=Date.now(),u=r[o];i||(i=l),n[s]=a,r[s]=l;let c=o,h=0;for(;c!==s;)h+=n[c++],c%=e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),l-i<t)return;const d=u&&l-u;return d?Math.round(1e3*h/d):void 0}}(50,250);return function(e,t){let n,r,i=0,s=1e3/t;const o=(t,s=Date.now())=>{i=s,n=null,r&&(clearTimeout(r),r=null),e(...t)};return[(...e)=>{const t=Date.now(),a=t-i;a>=s?o(e,t):(n=e,r||(r=setTimeout(()=>{r=null,o(n)},s-a)))},()=>n&&o(n)]}(n=>{const s=n.loaded,o=n.lengthComputable?n.total:void 0,a=s-r,l=i(a);r=s;e({loaded:s,total:o,progress:o?s/o:void 0,bytes:a,rate:l||void 0,estimated:l&&o&&s<=o?(o-s)/l:void 0,event:n,lengthComputable:null!=o,[t?"download":"upload"]:!0})},n)},Dc=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Fc=e=>(...t)=>Qu.asap(()=>e(...t));var Ic=bc.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,bc.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(bc.origin),bc.navigator&&/(msie|trident)/i.test(bc.navigator.userAgent)):()=>!0,zc=bc.hasStandardBrowserEnv?{write(e,t,n,r,i,s,o){if("undefined"==typeof document)return;const a=[`${e}=${encodeURIComponent(t)}`];Qu.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),Qu.isString(r)&&a.push(`path=${r}`),Qu.isString(i)&&a.push(`domain=${i}`),!0===s&&a.push("secure"),Qu.isString(o)&&a.push(`SameSite=${o}`),document.cookie=a.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function Lc(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const jc=e=>e instanceof Oc?{...e}:e;function Vc(e,t){t=t||{};const n={};function r(e,t,n,r){return Qu.isPlainObject(e)&&Qu.isPlainObject(t)?Qu.merge.call({caseless:r},e,t):Qu.isPlainObject(t)?Qu.merge({},t):Qu.isArray(t)?t.slice():t}function i(e,t,n,i){return Qu.isUndefined(t)?Qu.isUndefined(e)?void 0:r(void 0,e,0,i):r(e,t,0,i)}function s(e,t){if(!Qu.isUndefined(t))return r(void 0,t)}function o(e,t){return Qu.isUndefined(t)?Qu.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,i,s){return s in t?r(n,i):s in e?r(void 0,n):void 0}const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(e,t,n)=>i(jc(e),jc(t),0,!0)};return Qu.forEach(Object.keys({...e,...t}),function(r){const s=l[r]||i,o=s(e[r],t[r],r);Qu.isUndefined(o)&&s!==a||(n[r]=o)}),n}var Uc=e=>{const t=Vc({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:s,headers:o,auth:a}=t;if(t.headers=o=Oc.from(o),t.url=hc(Lc(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),Qu.isFormData(n))if(bc.hasStandardBrowserEnv||bc.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(Qu.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&o.set(e,n)})}if(bc.hasStandardBrowserEnv&&(r&&Qu.isFunction(r)&&(r=r(t)),r||!1!==r&&Ic(t.url))){const e=i&&s&&zc.read(s);e&&o.set(i,e)}return t};var Bc="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=Uc(e);let i=r.data;const s=Oc.from(r.headers).normalize();let o,a,l,u,c,{responseType:h,onUploadProgress:d,onDownloadProgress:f}=r;function p(){u&&u(),c&&c(),r.cancelToken&&r.cancelToken.unsubscribe(o),r.signal&&r.signal.removeEventListener("abort",o)}let g=new XMLHttpRequest;function m(){if(!g)return;const r=Oc.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders());Mc(function(e){t(e),p()},function(e){n(e),p()},{data:h&&"text"!==h&&"json"!==h?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:r,config:e,request:g}),g=null}g.open(r.method.toUpperCase(),r.url,!0),g.timeout=r.timeout,"onloadend"in g?g.onloadend=m:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(m)},g.onabort=function(){g&&(n(new Ju("Request aborted",Ju.ECONNABORTED,e,g)),g=null)},g.onerror=function(t){const r=new Ju(t&&t.message?t.message:"Network Error",Ju.ERR_NETWORK,e,g);r.event=t||null,n(r),g=null},g.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const i=r.transitional||fc;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new Ju(t,i.clarifyTimeoutError?Ju.ETIMEDOUT:Ju.ECONNABORTED,e,g)),g=null},void 0===i&&s.setContentType(null),"setRequestHeader"in g&&Qu.forEach(s.toJSON(),function(e,t){g.setRequestHeader(t,e)}),Qu.isUndefined(r.withCredentials)||(g.withCredentials=!!r.withCredentials),h&&"json"!==h&&(g.responseType=r.responseType),f&&([l,c]=Nc(f,!0),g.addEventListener("progress",l)),d&&g.upload&&([a,u]=Nc(d),g.upload.addEventListener("progress",a),g.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(o=t=>{g&&(n(!t||t.type?new Pc(null,e,g):t),g.abort(),g=null)},r.cancelToken&&r.cancelToken.subscribe(o),r.signal&&(r.signal.aborted?o():r.signal.addEventListener("abort",o)));const _=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);_&&-1===bc.protocols.indexOf(_)?n(new Ju("Unsupported protocol "+_+":",Ju.ERR_BAD_REQUEST,e)):g.send(i||null)})};const Gc=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const i=function(e){if(!n){n=!0,o();const t=e instanceof Error?e:this.reason;r.abort(t instanceof Ju?t:new Pc(t instanceof Error?t.message:t))}};let s=t&&setTimeout(()=>{s=null,i(new Ju(`timeout ${t} of ms exceeded`,Ju.ETIMEDOUT))},t);const o=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener("abort",i)}),e=null)};e.forEach(e=>e.addEventListener("abort",i));const{signal:a}=r;return a.unsubscribe=()=>Qu.asap(o),a}},$c=function*(e,t){let n=e.byteLength;if(n<t)return void(yield e);let r,i=0;for(;i<n;)r=i+t,yield e.slice(i,r),i=r},qc=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},Hc=(e,t,n,r)=>{const i=async function*(e,t){for await(const n of qc(e))yield*$c(n,t)}(e,t);let s,o=0,a=e=>{s||(s=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await i.next();if(t)return a(),void e.close();let s=r.byteLength;if(n){let e=o+=s;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw a(e),e}},cancel:e=>(a(e),i.return())},{highWaterMark:2})},{isFunction:Wc}=Qu,Zc=(({Request:e,Response:t})=>({Request:e,Response:t}))(Qu.global),{ReadableStream:Kc,TextEncoder:Xc}=Qu.global,Yc=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Qc=e=>{e=Qu.merge.call({skipUndefined:!0},Zc,e);const{fetch:t,Request:n,Response:r}=e,i=t?Wc(t):"function"==typeof fetch,s=Wc(n),o=Wc(r);if(!i)return!1;const a=i&&Wc(Kc),l=i&&("function"==typeof Xc?(u=new Xc,e=>u.encode(e)):async e=>new Uint8Array(await new n(e).arrayBuffer()));var u;const c=s&&a&&Yc(()=>{let e=!1;const t=new n(bc.origin,{body:new Kc,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),h=o&&a&&Yc(()=>Qu.isReadableStream(new r("").body)),d={stream:h&&(e=>e.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!d[e]&&(d[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new Ju(`Response type '${e}' is not supported`,Ju.ERR_NOT_SUPPORT,n)})});const f=async(e,t)=>{const r=Qu.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(Qu.isBlob(e))return e.size;if(Qu.isSpecCompliantForm(e)){const t=new n(bc.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Qu.isArrayBufferView(e)||Qu.isArrayBuffer(e)?e.byteLength:(Qu.isURLSearchParams(e)&&(e+=""),Qu.isString(e)?(await l(e)).byteLength:void 0)})(t):r};return async e=>{let{url:i,method:o,data:a,signal:l,cancelToken:u,timeout:p,onDownloadProgress:g,onUploadProgress:m,responseType:_,headers:y,withCredentials:v="same-origin",fetchOptions:b}=Uc(e),x=t||fetch;_=_?(_+"").toLowerCase():"text";let w=Gc([l,u&&u.toAbortSignal()],p),E=null;const A=w&&w.unsubscribe&&(()=>{w.unsubscribe()});let S;try{if(m&&c&&"get"!==o&&"head"!==o&&0!==(S=await f(y,a))){let e,t=new n(i,{method:"POST",body:a,duplex:"half"});if(Qu.isFormData(a)&&(e=t.headers.get("content-type"))&&y.setContentType(e),t.body){const[e,n]=Dc(S,Nc(Fc(m)));a=Hc(t.body,65536,e,n)}}Qu.isString(v)||(v=v?"include":"omit");const t=s&&"credentials"in n.prototype,l={...b,signal:w,method:o.toUpperCase(),headers:y.normalize().toJSON(),body:a,duplex:"half",credentials:t?v:void 0};E=s&&new n(i,l);let u=await(s?x(E,b):x(i,l));const p=h&&("stream"===_||"response"===_);if(h&&(g||p&&A)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=u[t]});const t=Qu.toFiniteNumber(u.headers.get("content-length")),[n,i]=g&&Dc(t,Nc(Fc(g),!0))||[];u=new r(Hc(u.body,65536,n,()=>{i&&i(),A&&A()}),e)}_=_||"text";let T=await d[Qu.findKey(d,_)||"text"](u,e);return!p&&A&&A(),await new Promise((t,n)=>{Mc(t,n,{data:T,headers:Oc.from(u.headers),status:u.status,statusText:u.statusText,config:e,request:E})})}catch(t){if(A&&A(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new Ju("Network Error",Ju.ERR_NETWORK,e,E),{cause:t.cause||t});throw Ju.from(t,t&&t.code,e,E)}}},Jc=new Map,eh=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:i}=t,s=[r,i,n];let o,a,l=s.length,u=Jc;for(;l--;)o=s[l],a=u.get(o),void 0===a&&u.set(o,a=l?new Map:Qc(t)),u=a;return a};eh();const th={http:null,xhr:Bc,fetch:{get:eh}};Qu.forEach(th,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const nh=e=>`- ${e}`,rh=e=>Qu.isFunction(e)||null===e||!1===e;var ih={getAdapter:function(e,t){e=Qu.isArray(e)?e:[e];const{length:n}=e;let r,i;const s={};for(let o=0;o<n;o++){let n;if(r=e[o],i=r,!rh(r)&&(i=th[(n=String(r)).toLowerCase()],void 0===i))throw new Ju(`Unknown adapter '${n}'`);if(i&&(Qu.isFunction(i)||(i=i.get(t))))break;s[n||"#"+o]=i}if(!i){const e=Object.entries(s).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new Ju("There is no suitable adapter to dispatch the request "+(n?e.length>1?"since :\n"+e.map(nh).join("\n"):" "+nh(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return i},adapters:th};function sh(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Pc(null,e)}function oh(e){sh(e),e.headers=Oc.from(e.headers),e.data=Rc.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return ih.getAdapter(e.adapter||wc.adapter,e)(e).then(function(t){return sh(e),t.data=Rc.call(e,e.transformResponse,t),t.headers=Oc.from(t.headers),t},function(t){return Cc(t)||(sh(e),t&&t.response&&(t.response.data=Rc.call(e,e.transformResponse,t.response),t.response.headers=Oc.from(t.response.headers))),Promise.reject(t)})}const ah="1.13.2",lh={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{lh[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const uh={};lh.transitional=function(e,t,n){function r(e,t){return"[Axios v"+ah+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,i,s)=>{if(!1===e)throw new Ju(r(i," has been removed"+(t?" in "+t:"")),Ju.ERR_DEPRECATED);return t&&!uh[i]&&(uh[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,s)}},lh.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};var ch={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Ju("options must be an object",Ju.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const s=r[i],o=t[s];if(o){const t=e[s],n=void 0===t||o(t,s,e);if(!0!==n)throw new Ju("option "+s+" must be "+n,Ju.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new Ju("Unknown option "+s,Ju.ERR_BAD_OPTION)}},validators:lh};const hh=ch.validators;let dh=class{constructor(e){this.defaults=e||{},this.interceptors={request:new dc,response:new dc}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Vc(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:i}=t;void 0!==n&&ch.assertOptions(n,{silentJSONParsing:hh.transitional(hh.boolean),forcedJSONParsing:hh.transitional(hh.boolean),clarifyTimeoutError:hh.transitional(hh.boolean)},!1),null!=r&&(Qu.isFunction(r)?t.paramsSerializer={serialize:r}:ch.assertOptions(r,{encode:hh.function,serialize:hh.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),ch.assertOptions(t,{baseUrl:hh.spelling("baseURL"),withXsrfToken:hh.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=i&&Qu.merge(i.common,i[t.method]);i&&Qu.forEach(["delete","get","head","post","put","patch","common"],e=>{delete i[e]}),t.headers=Oc.concat(s,i);const o=[];let a=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,o.unshift(e.fulfilled,e.rejected))});const l=[];let u;this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let c,h=0;if(!a){const e=[oh.bind(this),void 0];for(e.unshift(...o),e.push(...l),c=e.length,u=Promise.resolve(t);h<c;)u=u.then(e[h++],e[h++]);return u}c=o.length;let d=t;for(;h<c;){const e=o[h++],t=o[h++];try{d=e(d)}catch(e){t.call(this,e);break}}try{u=oh.call(this,d)}catch(e){return Promise.reject(e)}for(h=0,c=l.length;h<c;)u=u.then(l[h++],l[h++]);return u}getUri(e){return hc(Lc((e=Vc(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};Qu.forEach(["delete","get","head","options"],function(e){dh.prototype[e]=function(t,n){return this.request(Vc(n||{},{method:e,url:t,data:(n||{}).data}))}}),Qu.forEach(["post","put","patch"],function(e){function t(t){return function(n,r,i){return this.request(Vc(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}dh.prototype[e]=t(),dh.prototype[e+"Form"]=t(!0)});const fh={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(fh).forEach(([e,t])=>{fh[t]=e});const ph=function e(t){const n=new dh(t),r=lu(dh.prototype.request,n);return Qu.extend(r,dh.prototype,n,{allOwnKeys:!0}),Qu.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Vc(t,n))},r}(wc);ph.Axios=dh,ph.CanceledError=Pc,ph.CancelToken=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new Pc(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;const n=new e(function(e){t=e});return{token:n,cancel:t}}},ph.isCancel=Cc,ph.VERSION=ah,ph.toFormData=oc,ph.AxiosError=Ju,ph.Cancel=ph.CanceledError,ph.all=function(e){return Promise.all(e)},ph.spread=function(e){return function(t){return e.apply(null,t)}},ph.isAxiosError=function(e){return Qu.isObject(e)&&!0===e.isAxiosError},ph.mergeConfig=Vc,ph.AxiosHeaders=Oc,ph.formToJSON=e=>xc(Qu.isHTMLForm(e)?new FormData(e):e),ph.getAdapter=ih.getAdapter,ph.HttpStatusCode=fh,ph.default=ph;const{Axios:gh,AxiosError:mh,CanceledError:_h,isCancel:yh,CancelToken:vh,VERSION:bh,all:xh,Cancel:wh,isAxiosError:Eh,spread:Ah,toFormData:Sh,AxiosHeaders:Th,HttpStatusCode:kh,formToJSON:Oh,getAdapter:Rh,mergeConfig:Ch}=ph;class Ph{client;constructor(e){this.client=ph.create({baseURL:e,timeout:1e4,headers:{"Content-Type":"application/json"}}),this.setupInterceptors()}setupInterceptors(){this.client.interceptors.request.use(e=>(iu.authStore.isUnauthorized=!1,e),e=>Promise.reject(e)),this.client.interceptors.response.use(e=>e,e=>(401===e.status&&(iu.authStore.isUnauthorized=!0),Promise.reject(e)))}async get({url:e,config:t}){return(await this.client.get(e,t)).data}async post({url:e,body:t,config:n}){return(await this.client.post(e,t,n)).data}async put({url:e,body:t,config:n}){return(await this.client.put(e,t,n)).data}async patch({url:e,body:t,config:n}){return(await this.client.patch(e,t,n)).data}async delete({url:e,config:t}){return(await this.client.delete(e,t)).data}}const Mh=e=>new Ph(e);class Nh{configOptions;_apiService;get apiService(){return this._apiService}static _instance=null;static get instance(){if(!Nh._instance)throw new Error("Dartcom Config не инициализирован с приватным ключом. Вызовите Config.initialize(...) первым, чтобы иметь возможность пользоваться компонентами нашей библиотеки");return Nh._instance}static initialize(e){Nh._instance||(Nh._instance=new Nh(e))}static deactivate(){this._instance=null}constructor(e){this.configOptions=e,this._apiKey=e.apiKey,this._apiService=Mh(e.backendUrl),this._getCheckKeyData().then(t=>{if(t){const{valid:n}=t;e.onCheck?.(t),this.isValidApiKey=n}})}_apiKey="";_isValidApiKey=!1;get isValidApiKey(){return this._isValidApiKey}set isValidApiKey(e){this._isValidApiKey=e}async _getCheckKeyData(){const e=await this._apiService.get({url:"check_tile_token",config:{params:{tile_token:this._apiKey}}}).then(e=>e).catch(e=>{const{response:t,message:n}=e;if(this.configOptions.onError?.(e),t){const{data:{detail:e}}=t;return e}return{reason:n,valid:!1}});return e}}const Dh={valid:"18c38ab326d12f428e90be50a5141fc8949de497df7f7e0c1796d58e99d006f3",dateExpired:"8cbc5e15e61e649daf57c3a08422ae372c101afb4759036a3864a9fa588ef717",off:"b1520018920b33a4c1f8100c4f3bb3eb93661db829faa99c9cd75537f6300ba9",invalid:"abcdefghijklmnopqrstuvwxyz0123456789"};const Fh=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)}};var Ih,zh;!function(e){e.GET="GET",e.DELETE="DELETE",e.PUT="PUT",e.POST="POST"}(Ih||(Ih={})),function(e){e.TOP_RIGHT="top-right",e.BOTTOM_RIGHT="bottom-right",e.BOTTOM_LEFT="bottom-left",e.TOP_LEFT="top-left"}(zh||(zh={}));const Lh="https://dalganmap.ru/api";function jh(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=jh(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Vh(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=jh(e))&&(r&&(r+=" "),r+=t);return r}let Uh={data:""},Bh=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Gh=/\/\*[^]*?\*\/| +/g,$h=/\n+/g,qh=(e,t)=>{let n="",r="",i="";for(let s in e){let o=e[s];"@"==s[0]?"i"==s[1]?n=s+" "+o+";":r+="f"==s[1]?qh(o,s):s+"{"+qh(o,"k"==s[1]?"":t)+"}":"object"==typeof o?r+=qh(o,t?t.replace(/([^,])+/g,e=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):s):null!=o&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=qh.p?qh.p(s,o):s+":"+o+";")}return n+(t&&i?t+"{"+i+"}":i)+r},Hh={},Wh=e=>{if("object"==typeof e){let t="";for(let n in e)t+=n+Wh(e[n]);return t}return e},Zh=(e,t,n,r,i)=>{let s=Wh(e),o=Hh[s]||(Hh[s]=(e=>{let t=0,n=11;for(;t<e.length;)n=101*n+e.charCodeAt(t++)>>>0;return"go"+n})(s));if(!Hh[o]){let t=s!==e?e:(e=>{let t,n,r=[{}];for(;t=Bh.exec(e.replace(Gh,""));)t[4]?r.shift():t[3]?(n=t[3].replace($h," ").trim(),r.unshift(r[0][n]=r[0][n]||{})):r[0][t[1]]=t[2].replace($h," ").trim();return r[0]})(e);Hh[o]=qh(i?{["@keyframes "+o]:t}:t,n?"":"."+o)}let a=n&&Hh.g?Hh.g:null;return n&&(Hh.g=Hh[o]),((e,t,n,r)=>{r?t.data=t.data.replace(r,e):-1===t.data.indexOf(e)&&(t.data=n?e+t.data:t.data+e)})(Hh[o],t,r,a),o};function Kh(e){let t=this||{},n=e.call?e(t.p):e;return Zh(n.unshift?n.raw?((e,t,n)=>e.reduce((e,r,i)=>{let s=t[i];if(s&&s.call){let e=s(n),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;s=t?"."+t:e&&"object"==typeof e?e.props?"":qh(e,""):!1===e?"":e}return e+r+(null==s?"":s)},""))(n,[].slice.call(arguments,1),t.p):n.reduce((e,n)=>Object.assign(e,n&&n.call?n(t.p):n),{}):n,(e=>{if("object"==typeof window){let t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||Uh})(t.target),t.g,t.o,t.k)}function Xh(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}function Yh(){return Yh=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yh.apply(this,arguments)}function Qh(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Jh(e,t){if(null==e)return{};var n,r,i={},s=Object.keys(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function ed(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}Kh.bind({g:1}),Kh.bind({k:1});var td=function(){return""},nd=r.createContext({enqueueSnackbar:td,closeSnackbar:td}),rd="@media (max-width:599.95px)",id="@media (min-width:600px)",sd=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},od=function(e){return""+sd(e.vertical)+sd(e.horizontal)},ad=function(e){return!!e||0===e},ld="unmounted",ud="exited",cd="entering",hd="entered",dd="exiting",fd=function(e){function t(t){var n;n=e.call(this,t)||this;var r,i=t.appear;return n.appearStatus=null,t.in?i?(r=ud,n.appearStatus=cd):r=hd:r=t.unmountOnExit||t.mountOnEnter?ld:ud,n.state={status:r},n.nextCallback=null,n}Qh(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===ld?{status:ud}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==cd&&n!==hd&&(t=cd):n!==cd&&n!==hd||(t=dd)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=e,n=e;return null!=e&&"number"!=typeof e&&"string"!=typeof e&&(n=e.exit,t=e.enter),{exit:n,enter:t}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===cd?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===ud&&this.setState({status:ld})},n.performEnter=function(e){var t=this,n=this.props.enter,r=e,i=this.getTimeouts();e||n?(this.props.onEnter&&this.props.onEnter(this.node,r),this.safeSetState({status:cd},function(){t.props.onEntering&&t.props.onEntering(t.node,r),t.onTransitionEnd(i.enter,function(){t.safeSetState({status:hd},function(){t.props.onEntered&&t.props.onEntered(t.node,r)})})})):this.safeSetState({status:hd},function(){t.props.onEntered&&t.props.onEntered(t.node,r)})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts();t?(this.props.onExit&&this.props.onExit(this.node),this.safeSetState({status:dd},function(){e.props.onExiting&&e.props.onExiting(e.node),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:ud},function(){e.props.onExited&&e.props.onExited(e.node)})})})):this.safeSetState({status:ud},function(){e.props.onExited&&e.props.onExited(e.node)})},n.cancelNextCallback=function(){null!==this.nextCallback&&this.nextCallback.cancel&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(){n&&(n=!1,t.nextCallback=null,e())},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=null==e&&!this.props.addEndListener;this.node&&!n?(this.props.addEndListener&&this.props.addEndListener(this.node,this.nextCallback),null!=e&&setTimeout(this.nextCallback,e)):setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===ld)return null;var t=this.props;return(0,t.children)(e,Jh(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]))},Xh(t,[{key:"node",get:function(){var e,t=null===(e=this.props.nodeRef)||void 0===e?void 0:e.current;if(!t)throw new Error("notistack - Custom snackbar is not refForwarding");return t}}]),t}(r.Component);function pd(){}function gd(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function md(e,t){return a(function(){return null==e&&null==t?null:function(n){gd(e,n),gd(t,n)}},[e,t])}function _d(e){var t=e.timeout,n=e.style,r=void 0===n?{}:n,i=e.mode;return{duration:"object"==typeof t?t[i]||0:t,easing:r.transitionTimingFunction,delay:r.transitionDelay}}fd.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:pd,onEntering:pd,onEntered:pd,onExit:pd,onExiting:pd,onExited:pd};var yd="cubic-bezier(0.4, 0, 0.2, 1)",vd="cubic-bezier(0.0, 0, 0.2, 1)",bd="cubic-bezier(0.4, 0, 0.6, 1)",xd=function(e){e.scrollTop=e.scrollTop},wd=function(e){return Math.round(e)+"ms"};function Ed(e,t){void 0===e&&(e=["all"]);var n=t||{},r=n.duration,i=void 0===r?300:r,s=n.easing,o=void 0===s?yd:s,a=n.delay,l=void 0===a?0:a;return(Array.isArray(e)?e:[e]).map(function(e){var t="string"==typeof i?i:wd(i),n="string"==typeof l?l:wd(l);return e+" "+t+" "+o+" "+n}).join(",")}function Ad(e){var t=function(e){return e&&e.ownerDocument||document}(e);return t.defaultView||window}function Sd(e,t){if(t){var n=function(e,t){var n,r=t.getBoundingClientRect(),i=Ad(t);if(t.fakeTransform)n=t.fakeTransform;else{var s=i.getComputedStyle(t);n=s.getPropertyValue("-webkit-transform")||s.getPropertyValue("transform")}var o=0,a=0;if(n&&"none"!==n&&"string"==typeof n){var l=n.split("(")[1].split(")")[0].split(",");o=parseInt(l[4],10),a=parseInt(l[5],10)}switch(e){case"left":return"translateX("+(i.innerWidth+o-r.left)+"px)";case"right":return"translateX(-"+(r.left+r.width-o)+"px)";case"up":return"translateY("+(i.innerHeight+a-r.top)+"px)";default:return"translateY(-"+(r.top+r.height-a)+"px)"}}(e,t);n&&(t.style.webkitTransform=n,t.style.transform=n)}}var Td=g(function(e,t){var n=e.children,r=e.direction,i=void 0===r?"down":r,a=e.in,u=e.style,c=e.timeout,h=void 0===c?0:c,d=e.onEnter,f=e.onEntered,p=e.onExit,g=e.onExited,y=Jh(e,["children","direction","in","style","timeout","onEnter","onEntered","onExit","onExited"]),v=o(null),b=md(n.ref,v),x=md(b,t),w=l(function(){v.current&&Sd(i,v.current)},[i]);return s(function(){if(!a&&"down"!==i&&"right"!==i){var e=function(e,t){var n;function r(){for(var r=this,i=arguments.length,s=new Array(i),o=0;o<i;o++)s[o]=arguments[o];clearTimeout(n),n=setTimeout(function(){e.apply(r,s)},t)}return void 0===t&&(t=166),r.clear=function(){clearTimeout(n)},r}(function(){v.current&&Sd(i,v.current)}),t=Ad(v.current);return t.addEventListener("resize",e),function(){e.clear(),t.removeEventListener("resize",e)}}},[i,a]),s(function(){a||w()},[a,w]),m(fd,Object.assign({appear:!0,nodeRef:v,onEnter:function(e,t){Sd(i,e),xd(e),d&&d(e,t)},onEntered:f,onEntering:function(e){var t=(null==u?void 0:u.transitionTimingFunction)||vd,n=_d({timeout:h,mode:"enter",style:Yh({},u,{transitionTimingFunction:t})});e.style.webkitTransition=Ed("-webkit-transform",n),e.style.transition=Ed("transform",n),e.style.webkitTransform="none",e.style.transform="none"},onExit:function(e){var t=(null==u?void 0:u.transitionTimingFunction)||bd,n=_d({timeout:h,mode:"exit",style:Yh({},u,{transitionTimingFunction:t})});e.style.webkitTransition=Ed("-webkit-transform",n),e.style.transition=Ed("transform",n),Sd(i,e),p&&p(e)},onExited:function(e){e.style.webkitTransition="",e.style.transition="",g&&g(e)},in:a,timeout:h},y),function(e,t){return _(n,Yh({ref:x,style:Yh({visibility:"exited"!==e||a?void 0:"hidden"},u,{},n.props.style)},t))})});Td.displayName="Slide";var kd=function(e){return r.createElement("svg",Object.assign({viewBox:"0 0 24 24",focusable:"false",style:{fontSize:20,marginInlineEnd:8,userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0}},e))},Od=function(){return r.createElement(kd,null,r.createElement("path",{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41\n 10.59L10 14.17L17.59 6.58L19 8L10 17Z"}))},Rd=function(){return r.createElement(kd,null,r.createElement("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"}))},Cd=function(){return r.createElement(kd,null,r.createElement("path",{d:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,\n 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,\n 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"}))},Pd=function(){return r.createElement(kd,null,r.createElement("path",{d:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,\n 0 22,12A10,10 0 0,0 12,2Z"}))},Md={maxSnack:3,persist:!1,hideIconVariant:!1,disableWindowBlurListener:!1,variant:"default",autoHideDuration:5e3,iconVariant:{default:void 0,success:r.createElement(Od,null),warning:r.createElement(Rd,null),error:r.createElement(Cd,null),info:r.createElement(Pd,null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:Td,transitionDuration:{enter:225,exit:195}},Nd=function(e,t){return function(n,r){return void 0===r&&(r=!1),r?Yh({},Md[n],{},t[n],{},e[n]):"autoHideDuration"===n?(i=e.autoHideDuration,s=t.autoHideDuration,(o=function(e){return"number"==typeof e||null===e})(i)?i:o(s)?s:Md.autoHideDuration):"transitionDuration"===n?function(e,t){var n=function(e,t){return t.some(function(t){return typeof e===t})};return n(e,["string","number"])?e:n(e,["object"])?Yh({},Md.transitionDuration,{},n(t,["object"])&&t,{},e):n(t,["string","number"])?t:n(t,["object"])?Yh({},Md.transitionDuration,{},t):Md.transitionDuration}(e.transitionDuration,t.transitionDuration):e[n]||t[n]||Md[n];var i,s,o}};function Dd(e){return Object.entries(e).reduce(function(e,t){var n,r=t[0],i=t[1];return Yh({},e,((n={})[r]=Kh(i),n))},{})}var Fd="notistack-SnackbarContainer",Id="notistack-Snackbar",zd="notistack-CollapseWrapper",Ld="notistack-MuiContent",jd=function(e){return"notistack-MuiContent-"+e},Vd=Dd({root:{height:0},entered:{height:"auto"}}),Ud="0px",Bd=g(function(e,t){var n=e.children,r=e.in,i=e.onExited,s=o(null),a=o(null),l=md(t,a),u=function(){return s.current?s.current.clientHeight:0};return m(fd,{in:r,unmountOnExit:!0,onEnter:function(e){e.style.height=Ud},onEntered:function(e){e.style.height="auto"},onEntering:function(e){var t=u(),n=_d({timeout:175,mode:"enter"}),r=n.duration,i=n.easing;e.style.transitionDuration="string"==typeof r?r:r+"ms",e.style.height=t+"px",e.style.transitionTimingFunction=i||""},onExit:function(e){e.style.height=u()+"px"},onExited:i,onExiting:function(e){xd(e);var t=_d({timeout:175,mode:"exit"}),n=t.duration,r=t.easing;e.style.transitionDuration="string"==typeof n?n:n+"ms",e.style.height=Ud,e.style.transitionTimingFunction=r||""},nodeRef:a,timeout:175},function(e,t){return m("div",Object.assign({ref:l,className:Vh(Vd.root,"entered"===e&&Vd.entered),style:Yh({pointerEvents:"all",overflow:"hidden",minHeight:Ud,transition:Ed("height")},"entered"===e&&{overflow:"visible"},{},"exited"===e&&!r&&{visibility:"hidden"})},t),m("div",{ref:s,className:zd,style:{display:"flex",width:"100%"}},n))})});Bd.displayName="Collapse";var Gd={right:"left",left:"right",bottom:"up",top:"down"},$d=function(e){return"anchorOrigin"+od(e)},qd=function(){};function Hd(e,t){return e.reduce(function(e,n){return null==n?e:function(){for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];var o=[].concat(i);t&&-1===o.indexOf(t)&&o.push(t),e.apply(this,o),n.apply(this,o)}},qd)}var Wd="undefined"!=typeof window?i:s;function Zd(e){var t=o(e);return Wd(function(){t.current=e}),l(function(){return t.current.apply(void 0,arguments)},[])}var Kd,Xd=g(function(e,t){var n=e.children,r=e.className,i=e.autoHideDuration,a=e.disableWindowBlurListener,u=void 0!==a&&a,c=e.onClose,h=e.id,d=e.open,f=e.SnackbarProps,p=void 0===f?{}:f,g=o(),_=Zd(function(){c&&c.apply(void 0,arguments)}),y=Zd(function(e){c&&null!=e&&(g.current&&clearTimeout(g.current),g.current=setTimeout(function(){_(null,"timeout",h)},e))});s(function(){return d&&y(i),function(){g.current&&clearTimeout(g.current)}},[d,i,y]);var v=function(){g.current&&clearTimeout(g.current)},b=l(function(){null!=i&&y(.5*i)},[i,y]);return s(function(){if(!u&&d)return window.addEventListener("focus",b),window.addEventListener("blur",v),function(){window.removeEventListener("focus",b),window.removeEventListener("blur",v)}},[u,b,d]),m("div",Object.assign({ref:t},p,{className:Vh(Id,r),onMouseEnter:function(e){p.onMouseEnter&&p.onMouseEnter(e),v()},onMouseLeave:function(e){p.onMouseLeave&&p.onMouseLeave(e),b()}}),n)});Xd.displayName="Snackbar";var Yd=Dd({root:(Kd={display:"flex",flexWrap:"wrap",flexGrow:1},Kd[id]={flexGrow:"initial",minWidth:"288px"},Kd)}),Qd=g(function(e,t){var n=e.className,i=Jh(e,["className"]);return r.createElement("div",Object.assign({ref:t,className:Vh(Yd.root,n)},i))});Qd.displayName="SnackbarContent";var Jd=Dd({root:{backgroundColor:"#313131",fontSize:"0.875rem",lineHeight:1.43,letterSpacing:"0.01071em",color:"#fff",alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"},lessPadding:{paddingLeft:"20px"},default:{backgroundColor:"#313131"},success:{backgroundColor:"#43a047"},error:{backgroundColor:"#d32f2f"},warning:{backgroundColor:"#ff9800"},info:{backgroundColor:"#2196f3"},message:{display:"flex",alignItems:"center",padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:"16px",marginRight:"-8px"}}),ef="notistack-snackbar",tf=g(function(e,t){var n=e.id,i=e.message,s=e.action,o=e.iconVariant,a=e.variant,l=e.hideIconVariant,u=e.style,c=e.className,h=o[a],d=s;return"function"==typeof d&&(d=d(n)),r.createElement(Qd,{ref:t,role:"alert","aria-describedby":ef,style:u,className:Vh(Ld,jd(a),Jd.root,Jd[a],c,!l&&h&&Jd.lessPadding)},r.createElement("div",{id:ef,className:Jd.message},l?null:h,i),d&&r.createElement("div",{className:Jd.action},d))});tf.displayName="MaterialDesignContent";var nf,rf,sf,of,af,lf,uf=h(tf),cf=Dd({wrappedRoot:{width:"100%",position:"relative",transform:"translateX(0)",top:0,right:0,bottom:0,left:0,minWidth:"288px"}}),hf=function(e){var t=o(),n=u(!0),i=n[0],c=n[1],h=Hd([e.snack.onClose,e.onClose]),d=l(function(){t.current=setTimeout(function(){c(function(e){return!e})},125)},[]);s(function(){return function(){t.current&&clearTimeout(t.current)}},[]);var f,p=e.snack,g=e.classes,m=e.Component,_=void 0===m?uf:m,y=a(function(){return function(e){void 0===e&&(e={});var t={containerRoot:!0,containerAnchorOriginTopCenter:!0,containerAnchorOriginBottomCenter:!0,containerAnchorOriginTopRight:!0,containerAnchorOriginBottomRight:!0,containerAnchorOriginTopLeft:!0,containerAnchorOriginBottomLeft:!0};return Object.keys(e).filter(function(e){return!t[e]}).reduce(function(t,n){var r;return Yh({},t,((r={})[n]=e[n],r))},{})}(g)},[g]),v=p.open,b=p.SnackbarProps,x=p.TransitionComponent,w=p.TransitionProps,E=p.transitionDuration,A=p.disableWindowBlurListener,S=p.content,T=Jh(p,["open","SnackbarProps","TransitionComponent","TransitionProps","transitionDuration","disableWindowBlurListener","content","entered","requestClose","onEnter","onEntered","onExit","onExited"]),k=Yh({direction:(f=T.anchorOrigin,"center"!==f.horizontal?Gd[f.horizontal]:Gd[f.vertical]),timeout:E},w),O=S;"function"==typeof O&&(O=O(T.id,T.message));var R=["onEnter","onEntered","onExit","onExited"].reduce(function(t,n){var r;return Yh({},t,((r={})[n]=Hd([e.snack[n],e[n]],T.id),r))},{});return r.createElement(Bd,{in:i,onExited:R.onExited},r.createElement(Xd,{open:v,id:T.id,disableWindowBlurListener:A,autoHideDuration:T.autoHideDuration,className:Vh(cf.wrappedRoot,y.root,y[$d(T.anchorOrigin)]),SnackbarProps:b,onClose:h},r.createElement(x,Object.assign({},k,{appear:!0,in:v,onExit:R.onExit,onExited:d,onEnter:R.onEnter,onEntered:Hd([R.onEntered,function(){e.snack.requestClose&&h(null,"instructed",e.snack.id)}],T.id)}),O||r.createElement(_,Object.assign({},T)))))},df={default:20},ff={default:6,dense:2},pf="."+zd,gf=Dd({root:(nf={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:1400,height:"auto",width:"auto",transition:Ed(["top","right","bottom","left","max-width"],{duration:300,easing:"ease"}),pointerEvents:"none"},nf[pf]={padding:ff.default+"px 0px",transition:"padding 300ms ease 0ms"},nf.maxWidth="calc(100% - "+2*df.default+"px)",nf[rd]={width:"100%",maxWidth:"calc(100% - 32px)"},nf),rootDense:(rf={},rf[pf]={padding:ff.dense+"px 0px"},rf),top:{top:df.default-ff.default+"px",flexDirection:"column"},bottom:{bottom:df.default-ff.default+"px",flexDirection:"column-reverse"},left:(sf={left:df.default+"px"},sf[id]={alignItems:"flex-start"},sf[rd]={left:"16px"},sf),right:(of={right:df.default+"px"},of[id]={alignItems:"flex-end"},of[rd]={right:"16px"},of),center:(af={left:"50%",transform:"translateX(-50%)"},af[id]={alignItems:"center"},af)}),mf=function(e){var t=e.classes,n=void 0===t?{}:t,i=e.anchorOrigin,s=e.dense,o=e.children,a=Vh(Fd,gf[i.vertical],gf[i.horizontal],gf.root,n.containerRoot,n["containerAnchorOrigin"+od(i)],s&&gf.rootDense);return r.createElement("div",{className:a},o)},_f=h(mf),yf="production"!==process.env.NODE_ENV,vf={NO_PERSIST_ALL:"Reached maxSnack while all enqueued snackbars have 'persist' flag. Notistack will dismiss the oldest snackbar anyway to allow other ones in the queue to be presented."},bf=function(e){return!("string"==typeof e||v(e))},xf=function(e){function t(t){var n;return(n=e.call(this,t)||this).enqueueSnackbar=function(e,t){if(void 0===t&&(t={}),null==e)throw new Error("enqueueSnackbar called with invalid argument");var r=bf(e)?e:t,i=bf(e)?e.message:e,s=r.key,o=r.preventDuplicate,a=Jh(r,["key","preventDuplicate"]),l=ad(s),u=l?s:(new Date).getTime()+Math.random(),c=Nd(a,n.props),h=Yh({id:u},a,{message:i,open:!0,entered:!1,requestClose:!1,persist:c("persist"),action:c("action"),content:c("content"),variant:c("variant"),anchorOrigin:c("anchorOrigin"),disableWindowBlurListener:c("disableWindowBlurListener"),autoHideDuration:c("autoHideDuration"),hideIconVariant:c("hideIconVariant"),TransitionComponent:c("TransitionComponent"),transitionDuration:c("transitionDuration"),TransitionProps:c("TransitionProps",!0),iconVariant:c("iconVariant",!0),style:c("style",!0),SnackbarProps:c("SnackbarProps",!0),className:Vh(n.props.className,a.className)});return h.persist&&(h.autoHideDuration=void 0),n.setState(function(e){if(void 0===o&&n.props.preventDuplicate||o){var t=function(e){return l?e.id===u:e.message===i},r=e.queue.findIndex(t)>-1,s=e.snacks.findIndex(t)>-1;if(r||s)return e}return n.handleDisplaySnack(Yh({},e,{queue:[].concat(e.queue,[h])}))}),u},n.handleDisplaySnack=function(e){return e.snacks.length>=n.maxSnack?n.handleDismissOldest(e):n.processQueue(e)},n.processQueue=function(e){var t=e.queue,n=e.snacks;return t.length>0?Yh({},e,{snacks:[].concat(n,[t[0]]),queue:t.slice(1,t.length)}):e},n.handleDismissOldest=function(e){if(e.snacks.some(function(e){return!e.open||e.requestClose}))return e;var t=!1,r=!1;e.snacks.reduce(function(e,t){return e+(t.open&&t.persist?1:0)},0)===n.maxSnack&&("production"!==process.env.NODE_ENV&&function(e){if(yf){var t=vf[e];"undefined"!=typeof console&&console.error("WARNING - notistack: "+t);try{throw new Error(t)}catch(e){}}}("NO_PERSIST_ALL"),r=!0);var i=e.snacks.map(function(e){return t||e.persist&&!r?Yh({},e):(t=!0,e.entered?(e.onClose&&e.onClose(null,"maxsnack",e.id),n.props.onClose&&n.props.onClose(null,"maxsnack",e.id),Yh({},e,{open:!1})):Yh({},e,{requestClose:!0}))});return Yh({},e,{snacks:i})},n.handleEnteredSnack=function(e,t,r){if(!ad(r))throw new Error("handleEnteredSnack Cannot be called with undefined key");n.setState(function(e){return{snacks:e.snacks.map(function(e){return e.id===r?Yh({},e,{entered:!0}):Yh({},e)})}})},n.handleCloseSnack=function(e,t,r){n.props.onClose&&n.props.onClose(e,t,r);var i=void 0===r;n.setState(function(e){var t=e.snacks,n=e.queue;return{snacks:t.map(function(e){return i||e.id===r?e.entered?Yh({},e,{open:!1}):Yh({},e,{requestClose:!0}):Yh({},e)}),queue:n.filter(function(e){return e.id!==r})}})},n.closeSnackbar=function(e){var t=n.state.snacks.find(function(t){return t.id===e});ad(e)&&t&&t.onClose&&t.onClose(null,"instructed",e),n.handleCloseSnack(null,"instructed",e)},n.handleExitedSnack=function(e,t){if(!ad(t))throw new Error("handleExitedSnack Cannot be called with undefined key");n.setState(function(e){var r=n.processQueue(Yh({},e,{snacks:e.snacks.filter(function(e){return e.id!==t})}));return 0===r.queue.length?r:n.handleDismissOldest(r)})},lf=n.enqueueSnackbar,n.closeSnackbar,n.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:n.enqueueSnackbar.bind(ed(n)),closeSnackbar:n.closeSnackbar.bind(ed(n))}},n}return Qh(t,e),t.prototype.render=function(){var e=this,t=this.state.contextValue,n=this.props,i=n.domRoot,s=n.children,o=n.dense,a=void 0!==o&&o,l=n.Components,u=void 0===l?{}:l,c=n.classes,h=this.state.snacks.reduce(function(e,t){var n,r=od(t.anchorOrigin),i=e[r]||[];return Yh({},e,((n={})[r]=[].concat(i,[t]),n))},{}),d=Object.keys(h).map(function(t){var n=h[t],i=n[0];return r.createElement(_f,{key:t,dense:a,anchorOrigin:i.anchorOrigin,classes:c},n.map(function(t){return r.createElement(hf,{key:t.id,snack:t,classes:c,Component:u[t.variant],onClose:e.handleCloseSnack,onEnter:e.props.onEnter,onExit:e.props.onExit,onExited:Hd([e.handleExitedSnack,e.props.onExited],t.id),onEntered:Hd([e.handleEnteredSnack,e.props.onEntered],t.id)})}))});return r.createElement(nd.Provider,{value:t},s,i?Q(d,i):d)},Xh(t,[{key:"maxSnack",get:function(){return this.props.maxSnack||Md.maxSnack}}]),t}(y);const wf=()=>{const{enqueueSnackbar:e}=f(nd);return({variant:t,message:n})=>{e({variant:t,message:n,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:3e3,hideIconVariant:!0})}},Ef=()=>{const e=wf();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})})}}}};var Af,Sf;var Tf=(Sf||(Sf=1,Af=function(){const e=["a","b","c","d","e","f","0","1","2","3","4","5","6","7","8","9"];let t=[];for(let n=0;n<36;n++)t[n]=8===n||13===n||18===n||23===n?"-":e[Math.ceil(Math.random()*e.length-1)];return t.join("")}),Af),kf=Ci(Tf);const Of=e=>{const t=(new Date).getUTCHours();return encodeURIComponent([...e].reduce((n,r,i)=>{const s=(e.charCodeAt(i)-32+t)%95+32;return n+String.fromCharCode(s)},""))},Rf=e=>Object.keys(e).reduce((t,n,r)=>`${t}${0===r?"":"&"}${n}=${e[n]}`,""),Cf=async e=>{const t=JSON.stringify(e,null,2);return await navigator.clipboard.writeText(t).then(()=>(lf?.({message:"Данные были успешно скопированы в буфер обмена",variant:"success"}),!0)).catch(()=>!1)},Pf=()=>kf();var Mf=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Nf={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Df=new class{#e=Nf;#t=!1;setTimeoutProvider(e){"production"!==process.env.NODE_ENV&&this.#t&&e!==this.#e&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:this.#e,provider:e}),this.#e=e,"production"!==process.env.NODE_ENV&&(this.#t=!1)}setTimeout(e,t){return"production"!==process.env.NODE_ENV&&(this.#t=!0),this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return"production"!==process.env.NODE_ENV&&(this.#t=!0),this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};var Ff="undefined"==typeof window||"Deno"in globalThis;function If(){}function zf(e){return"number"==typeof e&&e>=0&&e!==1/0}function Lf(e,t){return Math.max(e+(t||0)-Date.now(),0)}function jf(e,t){return"function"==typeof e?e(t):e}function Vf(e,t){return"function"==typeof e?e(t):e}function Uf(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o)if(r){if(t.queryHash!==Gf(o,t.options))return!1}else if(!qf(t.queryKey,o))return!1;if("all"!==n){const e=t.isActive();if("active"===n&&!e)return!1;if("inactive"===n&&e)return!1}return("boolean"!=typeof a||t.isStale()===a)&&((!i||i===t.state.fetchStatus)&&!(s&&!s(t)))}function Bf(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if($f(t.options.mutationKey)!==$f(s))return!1}else if(!qf(t.options.mutationKey,s))return!1}return(!r||t.state.status===r)&&!(i&&!i(t))}function Gf(e,t){return(t?.queryKeyHashFn||$f)(e)}function $f(e){return JSON.stringify(e,(e,t)=>Xf(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function qf(e,t){return e===t||typeof e==typeof t&&(!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&Object.keys(t).every(n=>qf(e[n],t[n])))}var Hf=Object.prototype.hasOwnProperty;function Wf(e,t){if(e===t)return e;const n=Kf(e)&&Kf(t);if(!(n||Xf(e)&&Xf(t)))return t;const r=(n?e:Object.keys(e)).length,i=n?t:Object.keys(t),s=i.length,o=n?new Array(s):{};let a=0;for(let l=0;l<s;l++){const s=n?l:i[l],u=e[s],c=t[s];if(u===c){o[s]=u,(n?l<r:Hf.call(e,s))&&a++;continue}if(null===u||null===c||"object"!=typeof u||"object"!=typeof c){o[s]=c;continue}const h=Wf(u,c);o[s]=h,h===u&&a++}return r===s&&a===r?e:o}function Zf(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Kf(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Xf(e){if(!Yf(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!!Yf(n)&&(!!n.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype)}function Yf(e){return"[object Object]"===Object.prototype.toString.call(e)}function Qf(e,t,n){if("function"==typeof n.structuralSharing)return n.structuralSharing(e,t);if(!1!==n.structuralSharing){if("production"!==process.env.NODE_ENV)try{return Wf(e,t)}catch(e){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${e}`),e}return Wf(e,t)}return t}function Jf(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function ep(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var tp=Symbol();function np(e,t){return"production"!==process.env.NODE_ENV&&e.queryFn===tp&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==tp?e.queryFn:()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`))}function rp(e,t){return"function"==typeof e?e(...t):!!e}var ip=new class extends Mf{#n;#r;#i;constructor(){super(),this.#i=e=>{if(!Ff&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#r||this.setEventListener(this.#i)}onUnsubscribe(){this.hasListeners()||(this.#r?.(),this.#r=void 0)}setEventListener(e){this.#i=e,this.#r?.(),this.#r=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#n!==e&&(this.#n=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#n?this.#n:"hidden"!==globalThis.document?.visibilityState}};function sp(){let e,t;const n=new Promise((n,r)=>{e=n,t=r});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.status="pending",n.catch(()=>{}),n.resolve=t=>{r({status:"fulfilled",value:t}),e(t)},n.reject=e=>{r({status:"rejected",reason:e}),t(e)},n}var op=function(e){setTimeout(e,0)};var ap=function(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=op;const s=r=>{t?e.push(r):i(()=>{n(r)})};return{batch:s=>{let o;t++;try{o=s()}finally{t--,t||(()=>{const t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})})()}return o},batchCalls:e=>(...t)=>{s(()=>{e(...t)})},schedule:s,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}(),lp=new class extends Mf{#s=!0;#r;#i;constructor(){super(),this.#i=e=>{if(!Ff&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#r||this.setEventListener(this.#i)}onUnsubscribe(){this.hasListeners()||(this.#r?.(),this.#r=void 0)}setEventListener(e){this.#i=e,this.#r?.(),this.#r=e(this.setOnline.bind(this))}setOnline(e){this.#s!==e&&(this.#s=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#s}};function up(e){return Math.min(1e3*2**e,3e4)}function cp(e){return"online"!==(e??"online")||lp.isOnline()}var hp=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function dp(e){let t,n=!1,r=0;const i=sp(),s=()=>"pending"!==i.status,o=()=>ip.isFocused()&&("always"===e.networkMode||lp.isOnline())&&e.canRun(),a=()=>cp(e.networkMode)&&e.canRun(),l=e=>{s()||(t?.(),i.resolve(e))},u=e=>{s()||(t?.(),i.reject(e))},c=()=>new Promise(n=>{t=e=>{(s()||o())&&n(e)},e.onPause?.()}).then(()=>{t=void 0,s()||e.onContinue?.()}),h=()=>{if(s())return;let t;const i=0===r?e.initialPromise:void 0;try{t=i??e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(l).catch(t=>{if(s())return;const i=e.retry??(Ff?0:3),a=e.retryDelay??up,l="function"==typeof a?a(r,t):a,d=!0===i||"number"==typeof i&&r<i||"function"==typeof i&&i(r,t);!n&&d?(r++,e.onFail?.(r,t),function(e){return new Promise(t=>{Df.setTimeout(t,e)})}(l).then(()=>o()?void 0:c()).then(()=>{n?u(t):h()})):u(t)})};return{promise:i,status:()=>i.status,cancel:t=>{if(!s()){const n=new hp(t);u(n),e.onCancel?.(n)}},continue:()=>(t?.(),i),cancelRetry:()=>{n=!0},continueRetry:()=>{n=!1},canStart:a,start:()=>(a()?h():c().then(h),i)}}var fp=class{#o;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),zf(this.gcTime)&&(this.#o=Df.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ff?1/0:3e5))}clearGcTimeout(){this.#o&&(Df.clearTimeout(this.#o),this.#o=void 0)}},pp=class extends fp{#a;#l;#u;#c;#h;#d;#f;constructor(e){super(),this.#f=!1,this.#d=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#c=e.client,this.#u=this.#c.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#a=_p(this.options),this.state=e.state??this.#a,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#h?.promise}setOptions(e){if(this.options={...this.#d,...e},this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){const e=_p(this.options);void 0!==e.data&&(this.setState(mp(e.data,e.dataUpdatedAt)),this.#a=e)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#u.remove(this)}setData(e,t){const n=Qf(this.state.data,e,this.options);return this.#p({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#p({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#h?.promise;return this.#h?.cancel(e),t?t.then(If).catch(If):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#a)}isActive(){return this.observers.some(e=>!1!==Vf(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===tp||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>"static"===jf(e.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(e=0){return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!Lf(this.state.dataUpdatedAt,e))}onFocus(){const e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#h?.continue()}onOnline(){const e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#h?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#u.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#h&&(this.#f?this.#h.cancel({revert:!0}):this.#h.cancelRetry()),this.scheduleGc()),this.#u.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#p({type:"invalidate"})}async fetch(e,t){if("idle"!==this.state.fetchStatus&&"rejected"!==this.#h?.status())if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#h)return this.#h.continueRetry(),this.#h.promise;if(e&&this.setOptions(e),!this.options.queryFn){const e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}"production"!==process.env.NODE_ENV&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#f=!0,n.signal)})},i=()=>{const e=np(this.options,t),n=(()=>{const e={client:this.#c,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#f=!1,this.options.persister?this.options.persister(e,n,this):e(n)},s=(()=>{const e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#c,state:this.state,fetchFn:i};return r(e),e})();this.options.behavior?.onFetch(s,this),this.#l=this.state,"idle"!==this.state.fetchStatus&&this.state.fetchMeta===s.fetchOptions?.meta||this.#p({type:"fetch",meta:s.fetchOptions?.meta}),this.#h=dp({initialPromise:t?.initialPromise,fn:s.fetchFn,onCancel:e=>{e instanceof hp&&e.revert&&this.setState({...this.#l,fetchStatus:"idle"}),n.abort()},onFail:(e,t)=>{this.#p({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#p({type:"pause"})},onContinue:()=>{this.#p({type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0});try{const e=await this.#h.start();if(void 0===e)throw"production"!==process.env.NODE_ENV&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),new Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#u.config.onSuccess?.(e,this),this.#u.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof hp){if(e.silent)return this.#h.promise;if(e.revert){if(void 0===this.state.data)throw e;return this.state.data}}throw this.#p({type:"error",error:e}),this.#u.config.onError?.(e,this),this.#u.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#p(e){this.state=(t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...gp(t.data,this.options),fetchMeta:e.meta??null};case"success":const n={...t,...mp(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#l=e.manual?n:void 0,n;case"error":const r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),ap.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#u.notify({query:this,type:"updated",action:e})})}};function gp(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:cp(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}function mp(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function _p(e){const t="function"==typeof e.initialData?e.initialData():e.initialData,n=void 0!==t,r=n?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var yp=class extends Mf{constructor(e,t){super(),this.options=t,this.#c=e,this.#g=null,this.#m=sp(),this.bindMethods(),this.setOptions(t)}#c;#_=void 0;#y=void 0;#v=void 0;#b;#x;#m;#g;#w;#E;#A;#S;#T;#k;#O=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#_.addObserver(this),vp(this.#_,this.options)?this.#R():this.updateResult(),this.#C())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return bp(this.#_,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return bp(this.#_,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#P(),this.#M(),this.#_.removeObserver(this)}setOptions(e){const t=this.options,n=this.#_;if(this.options=this.#c.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof Vf(this.options.enabled,this.#_))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#N(),this.#_.setOptions(this.options),t._defaulted&&!Zf(this.options,t)&&this.#c.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#_,observer:this});const r=this.hasListeners();r&&xp(this.#_,n,this.options,t)&&this.#R(),this.updateResult(),!r||this.#_===n&&Vf(this.options.enabled,this.#_)===Vf(t.enabled,this.#_)&&jf(this.options.staleTime,this.#_)===jf(t.staleTime,this.#_)||this.#D();const i=this.#F();!r||this.#_===n&&Vf(this.options.enabled,this.#_)===Vf(t.enabled,this.#_)&&i===this.#k||this.#I(i)}getOptimisticResult(e){const t=this.#c.getQueryCache().build(this.#c,e),n=this.createResult(t,e);return function(e,t){if(!Zf(e.getCurrentResult(),t))return!0;return!1}(this,n)&&(this.#v=n,this.#x=this.options,this.#b=this.#_.state),n}getCurrentResult(){return this.#v}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),"promise"===n&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#m.status||this.#m.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,n))})}trackProp(e){this.#O.add(e)}getCurrentQuery(){return this.#_}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#c.defaultQueryOptions(e),n=this.#c.getQueryCache().build(this.#c,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#R({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#v))}#R(e){this.#N();let t=this.#_.fetch(this.options,e);return e?.throwOnError||(t=t.catch(If)),t}#D(){this.#P();const e=jf(this.options.staleTime,this.#_);if(Ff||this.#v.isStale||!zf(e))return;const t=Lf(this.#v.dataUpdatedAt,e)+1;this.#S=Df.setTimeout(()=>{this.#v.isStale||this.updateResult()},t)}#F(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#_):this.options.refetchInterval)??!1}#I(e){this.#M(),this.#k=e,!Ff&&!1!==Vf(this.options.enabled,this.#_)&&zf(this.#k)&&0!==this.#k&&(this.#T=Df.setInterval(()=>{(this.options.refetchIntervalInBackground||ip.isFocused())&&this.#R()},this.#k))}#C(){this.#D(),this.#I(this.#F())}#P(){this.#S&&(Df.clearTimeout(this.#S),this.#S=void 0)}#M(){this.#T&&(Df.clearInterval(this.#T),this.#T=void 0)}createResult(e,t){const n=this.#_,r=this.options,i=this.#v,s=this.#b,o=this.#x,a=e!==n?e.state:this.#y,{state:l}=e;let u,c={...l},h=!1;if(t._optimisticResults){const i=this.hasListeners(),s=!i&&vp(e,t),o=i&&xp(e,n,t,r);(s||o)&&(c={...c,...gp(l.data,e.options)}),"isRestoring"===t._optimisticResults&&(c.fetchStatus="idle")}let{error:d,errorUpdatedAt:f,status:p}=c;u=c.data;let g=!1;if(void 0!==t.placeholderData&&void 0===u&&"pending"===p){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,g=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#A?.state.data,this.#A):t.placeholderData,void 0!==e&&(p="success",u=Qf(i?.data,e,t),h=!0)}if(t.select&&void 0!==u&&!g)if(i&&u===s?.data&&t.select===this.#w)u=this.#E;else try{this.#w=t.select,u=t.select(u),u=Qf(i?.data,u,t),this.#E=u,this.#g=null}catch(e){this.#g=e}this.#g&&(d=this.#g,u=this.#E,f=Date.now(),p="error");const m="fetching"===c.fetchStatus,_="pending"===p,y="error"===p,v=_&&m,b=void 0!==u,x={status:p,fetchStatus:c.fetchStatus,isPending:_,isSuccess:"success"===p,isError:y,isInitialLoading:v,isLoading:v,data:u,dataUpdatedAt:c.dataUpdatedAt,error:d,errorUpdatedAt:f,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>a.dataUpdateCount||c.errorUpdateCount>a.errorUpdateCount,isFetching:m,isRefetching:m&&!_,isLoadingError:y&&!b,isPaused:"paused"===c.fetchStatus,isPlaceholderData:h,isRefetchError:y&&b,isStale:wp(e,t),refetch:this.refetch,promise:this.#m,isEnabled:!1!==Vf(t.enabled,e)};if(this.options.experimental_prefetchInRender){const t=e=>{"error"===x.status?e.reject(x.error):void 0!==x.data&&e.resolve(x.data)},r=()=>{const e=this.#m=x.promise=sp();t(e)},i=this.#m;switch(i.status){case"pending":e.queryHash===n.queryHash&&t(i);break;case"fulfilled":"error"!==x.status&&x.data===i.value||r();break;case"rejected":"error"===x.status&&x.error===i.reason||r()}}return x}updateResult(){const e=this.#v,t=this.createResult(this.#_,this.options);if(this.#b=this.#_.state,this.#x=this.options,void 0!==this.#b.data&&(this.#A=this.#_),Zf(t,e))return;this.#v=t;this.#z({listeners:(()=>{if(!e)return!0;const{notifyOnChangeProps:t}=this.options,n="function"==typeof t?t():t;if("all"===n||!n&&!this.#O.size)return!0;const r=new Set(n??this.#O);return this.options.throwOnError&&r.add("error"),Object.keys(this.#v).some(t=>{const n=t;return this.#v[n]!==e[n]&&r.has(n)})})()})}#N(){const e=this.#c.getQueryCache().build(this.#c,this.options);if(e===this.#_)return;const t=this.#_;this.#_=e,this.#y=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#C()}#z(e){ap.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#v)}),this.#c.getQueryCache().notify({query:this.#_,type:"observerResultsUpdated"})})}};function vp(e,t){return function(e,t){return!1!==Vf(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)}(e,t)||void 0!==e.state.data&&bp(e,t,t.refetchOnMount)}function bp(e,t,n){if(!1!==Vf(t.enabled,e)&&"static"!==jf(t.staleTime,e)){const r="function"==typeof n?n(e):n;return"always"===r||!1!==r&&wp(e,t)}return!1}function xp(e,t,n,r){return(e!==t||!1===Vf(r.enabled,e))&&(!n.suspense||"error"!==e.state.status)&&wp(e,n)}function wp(e,t){return!1!==Vf(t.enabled,e)&&e.isStaleByTime(jf(t.staleTime,e))}function Ep(e){return{onFetch:(t,n)=>{const r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,s=t.state.data?.pages||[],o=t.state.data?.pageParams||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let n=!1;const u=np(t.options,t.fetchOptions),c=async(e,r,i)=>{if(n)return Promise.reject();if(null==r&&e.pages.length)return Promise.resolve(e);const s=(()=>{const e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?"backward":"forward",meta:t.options.meta};return(e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(t.signal.aborted?n=!0:t.signal.addEventListener("abort",()=>{n=!0}),t.signal)})})(e),e})(),o=await u(s),{maxPages:a}=t.options,l=i?ep:Jf;return{pages:l(e.pages,o,a),pageParams:l(e.pageParams,r,a)}};if(i&&s.length){const e="backward"===i,t={pages:s,pageParams:o},n=(e?Sp:Ap)(r,t);a=await c(t,n,e)}else{const t=e??s.length;do{const e=0===l?o[0]??r.initialPageParam:Ap(r,a);if(l>0&&null==e)break;a=await c(a,e),l++}while(l<t)}return a};t.options.persister?t.fetchFn=()=>t.options.persister?.(u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=u}}}function Ap(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Sp(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Tp=class extends fp{#c;#L;#j;#h;constructor(e){super(),this.#c=e.client,this.mutationId=e.mutationId,this.#j=e.mutationCache,this.#L=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#L.includes(e)||(this.#L.push(e),this.clearGcTimeout(),this.#j.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#L=this.#L.filter(t=>t!==e),this.scheduleGc(),this.#j.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#L.length||("pending"===this.state.status?this.scheduleGc():this.#j.remove(this))}continue(){return this.#h?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#p({type:"continue"})},n={client:this.#c,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#h=dp({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(e,t)=>{this.#p({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#p({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#j.canRun(this)});const r="pending"===this.state.status,i=!this.#h.canStart();try{if(r)t();else{this.#p({type:"pending",variables:e,isPaused:i}),await(this.#j.config.onMutate?.(e,this,n));const t=await(this.options.onMutate?.(e,n));t!==this.state.context&&this.#p({type:"pending",context:t,variables:e,isPaused:i})}const s=await this.#h.start();return await(this.#j.config.onSuccess?.(s,e,this.state.context,this,n)),await(this.options.onSuccess?.(s,e,this.state.context,n)),await(this.#j.config.onSettled?.(s,null,this.state.variables,this.state.context,this,n)),await(this.options.onSettled?.(s,null,e,this.state.context,n)),this.#p({type:"success",data:s}),s}catch(t){try{throw await(this.#j.config.onError?.(t,e,this.state.context,this,n)),await(this.options.onError?.(t,e,this.state.context,n)),await(this.#j.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)),await(this.options.onSettled?.(void 0,t,e,this.state.context,n)),t}finally{this.#p({type:"error",error:t})}}finally{this.#j.runNext(this)}}#p(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),ap.batch(()=>{this.#L.forEach(t=>{t.onMutationUpdate(e)}),this.#j.notify({mutation:this,type:"updated",action:e})})}};var kp=class extends Mf{constructor(e={}){super(),this.config=e,this.#V=new Set,this.#U=new Map,this.#B=0}#V;#U;#B;build(e,t,n){const r=new Tp({client:e,mutationCache:this,mutationId:++this.#B,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#V.add(e);const t=Op(e);if("string"==typeof t){const n=this.#U.get(t);n?n.push(e):this.#U.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#V.delete(e)){const t=Op(e);if("string"==typeof t){const n=this.#U.get(t);if(n)if(n.length>1){const t=n.indexOf(e);-1!==t&&n.splice(t,1)}else n[0]===e&&this.#U.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Op(e);if("string"==typeof t){const n=this.#U.get(t),r=n?.find(e=>"pending"===e.state.status);return!r||r===e}return!0}runNext(e){const t=Op(e);if("string"==typeof t){const n=this.#U.get(t)?.find(t=>t!==e&&t.state.isPaused);return n?.continue()??Promise.resolve()}return Promise.resolve()}clear(){ap.batch(()=>{this.#V.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#V.clear(),this.#U.clear()})}getAll(){return Array.from(this.#V)}find(e){const t={exact:!0,...e};return this.getAll().find(e=>Bf(t,e))}findAll(e={}){return this.getAll().filter(t=>Bf(e,t))}notify(e){ap.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(e=>e.state.isPaused);return ap.batch(()=>Promise.all(e.map(e=>e.continue().catch(If))))}};function Op(e){return e.options.scope?.id}var Rp=class extends Mf{#c;#v=void 0;#G;#$;constructor(e,t){super(),this.#c=e,this.setOptions(t),this.bindMethods(),this.#q()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){const t=this.options;this.options=this.#c.defaultMutationOptions(e),Zf(this.options,t)||this.#c.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#G,observer:this}),t?.mutationKey&&this.options.mutationKey&&$f(t.mutationKey)!==$f(this.options.mutationKey)?this.reset():"pending"===this.#G?.state.status&&this.#G.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#G?.removeObserver(this)}onMutationUpdate(e){this.#q(),this.#z(e)}getCurrentResult(){return this.#v}reset(){this.#G?.removeObserver(this),this.#G=void 0,this.#q(),this.#z()}mutate(e,t){return this.#$=t,this.#G?.removeObserver(this),this.#G=this.#c.getMutationCache().build(this.#c,this.options),this.#G.addObserver(this),this.#G.execute(e)}#q(){const e=this.#G?.state??{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0};this.#v={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#z(e){ap.batch(()=>{if(this.#$&&this.hasListeners()){const t=this.#v.variables,n=this.#v.context,r={client:this.#c,meta:this.options.meta,mutationKey:this.options.mutationKey};"success"===e?.type?(this.#$.onSuccess?.(e.data,t,n,r),this.#$.onSettled?.(e.data,null,t,n,r)):"error"===e?.type&&(this.#$.onError?.(e.error,t,n,r),this.#$.onSettled?.(void 0,e.error,t,n,r))}this.listeners.forEach(e=>{e(this.#v)})})}},Cp=class extends Mf{constructor(e={}){super(),this.config=e,this.#H=new Map}#H;build(e,t,n){const r=t.queryKey,i=t.queryHash??Gf(r,t);let s=this.get(i);return s||(s=new pp({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(s)),s}add(e){this.#H.has(e.queryHash)||(this.#H.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#H.get(e.queryHash);t&&(e.destroy(),t===e&&this.#H.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){ap.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#H.get(e)}getAll(){return[...this.#H.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(e=>Uf(t,e))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(t=>Uf(e,t)):t}notify(e){ap.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){ap.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){ap.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Pp=n.createContext(void 0),Mp=e=>{const t=n.useContext(Pp);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Np=({client:t,children:r})=>(n.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),e(Pp.Provider,{value:t,children:r})),Dp=n.createContext(!1);Dp.Provider;var Fp=n.createContext(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}()),Ip=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function zp(e,t,r){if("production"!==process.env.NODE_ENV&&("object"!=typeof e||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const i=n.useContext(Dp),s=n.useContext(Fp),o=Mp(),a=o.defaultQueryOptions(e);o.getDefaultOptions().queries?._experimental_beforeQuery?.(a),"production"!==process.env.NODE_ENV&&(a.queryFn||console.error(`[${a.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),a._optimisticResults=i?"isRestoring":"optimistic",(e=>{if(e.suspense){const t=1e3,n=e=>"static"===e?e:Math.max(e??t,t),r=e.staleTime;e.staleTime="function"==typeof r?(...e)=>n(r(...e)):n(r),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,t))}})(a),((e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))})(a,s),(e=>{n.useEffect(()=>{e.clearReset()},[e])})(s);const l=!o.getQueryCache().get(a.queryHash),[u]=n.useState(()=>new t(o,a)),c=u.getOptimisticResult(a),h=!i&&!1!==e.subscribed;if(n.useSyncExternalStore(n.useCallback(e=>{const t=h?u.subscribe(ap.batchCalls(e)):If;return u.updateResult(),t},[u,h]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),n.useEffect(()=>{u.setOptions(a)},[a,u]),((e,t)=>e?.suspense&&t.isPending)(a,c))throw Ip(a,u,s);if((({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&void 0===e.data||rp(n,[e.error,r])))({result:c,errorResetBoundary:s,throwOnError:a.throwOnError,query:o.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw c.error;if(o.getDefaultOptions().queries?._experimental_afterQuery?.(a,c),a.experimental_prefetchInRender&&!Ff&&((e,t)=>e.isLoading&&e.isFetching&&!t)(c,i)){const e=l?Ip(a,u,s):o.getQueryCache().get(a.queryHash)?.promise;e?.catch(If).finally(()=>{u.updateResult()})}return a.notifyOnChangeProps?c:u.trackResult(c)}function Lp(e,t){const r=Mp(),[i]=n.useState(()=>new Rp(r,e));n.useEffect(()=>{i.setOptions(e)},[i,e]);const s=n.useSyncExternalStore(n.useCallback(e=>i.subscribe(ap.batchCalls(e)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),o=n.useCallback((e,t)=>{i.mutate(e,t).catch(If)},[i]);if(s.error&&rp(i.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:o,mutateAsync:s.mutate}}const jp=()=>Lp({mutationKey:["sign-in-mutation"],mutationFn:async({body:{username:e,password:t}})=>{const n=Rf({username:e,password:Of(t)});return await Nh.instance.apiService.post({url:"token",body:n,config:{headers:{"Content-Type":"application/x-www-form-urlencoded"}}})}});if(!u)throw new Error("mobx-react-lite requires React with Hooks support");if(!function(e,t,n){return Hl(function(){var r=Tl(e,n)[Ss];"production"!==process.env.NODE_ENV&&t&&e[bs]&&Ni("makeObservable second arg must be nullish when using decorators. Mixing @decorator syntax with annotations is not supported."),null!=t||(t=function(e){return us(e,bs)||es(e,bs,ms({},e[bs])),e[bs]}(e)),os(t).forEach(function(e){return r.make_(e,t[e])})}),e})throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");function Vp(e){e()}function Up(e){return Da(e)}var Bp,Gp=function(){function e(e){var t=this;Object.defineProperty(this,"finalize",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"registrations",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"sweepTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sweep",{enumerable:!0,configurable:!0,writable:!0,value:function(e){void 0===e&&(e=1e4),clearTimeout(t.sweepTimeout),t.sweepTimeout=void 0;var n=Date.now();t.registrations.forEach(function(r,i){n-r.registeredAt>=e&&(t.finalize(r.value),t.registrations.delete(i))}),t.registrations.size>0&&t.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.sweep(0)}})}return Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){this.registrations.set(n,{value:t,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.registrations.delete(e)}}),Object.defineProperty(e.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){void 0===this.sweepTimeout&&(this.sweepTimeout=setTimeout(this.sweep,1e4))}}),e}(),$p=new("undefined"!=typeof FinalizationRegistry?FinalizationRegistry:Gp)(function(e){var t;null===(t=e.reaction)||void 0===t||t.dispose(),e.reaction=null}),qp={exports:{}},Hp={};var Wp,Zp,Kp={};
|
|
2
2
|
/**
|
|
3
3
|
* @license React
|
|
4
4
|
* use-sync-external-store-shim.development.js
|