fastapi-rtk 0.0.112 → 0.0.113

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.
@@ -1,108 +1,134 @@
1
- (function(T,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("react/jsx-runtime"),require("@mantine/core"),require("react"),require("react-router-dom"),require("zustand"),require("@tanstack/react-query"),require("@mantine/hooks"),require("@jsonforms/react"),require("@jsonforms/core"),require("@mantine/dates"),require("clsx"),require("@emotion/react"),require("@mantine/form"),require("mantine-react-table")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","@mantine/core","react","react-router-dom","zustand","@tanstack/react-query","@mantine/hooks","@jsonforms/react","@jsonforms/core","@mantine/dates","clsx","@emotion/react","@mantine/form","mantine-react-table"],c):(T=typeof globalThis<"u"?globalThis:T||self,c(T["fastapi-rtk"]={},T.jsxRuntime,T.core,T.React,T.reactRouterDom,T.zustand,T.reactQuery,T.hooks,T.react,T.core$1,T.dates,T.clsx,T.react$1,T.form,T.mantineReactTable))})(this,function(T,c,h,v,Cs,Es,lt,ye,te,V,jt,xt,As,eo,Je){"use strict";var a2=Object.defineProperty;var l2=(T,c,h)=>c in T?a2(T,c,{enumerable:!0,configurable:!0,writable:!0,value:h}):T[c]=h;var tp=(T,c,h)=>l2(T,typeof c!="symbol"?c+"":c,h);function np(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Fe=np(v),to=v.createContext({path:"",data:null,info:null,queryParams:null,loading:!1,error:null,streaming:null,specialKey:null,setQueryParams:e=>null,refetch:()=>null,refetchInfo:()=>null,getEntry:async e=>({}),addEntry:async(e,t)=>({}),updateEntry:async(e,t,n)=>({}),deleteEntry:async(e,t)=>({}),download:async e=>null});function X(){const e=v.useContext(to);if(e===void 0)throw new Error("useApi must be used within a ApiProvider");return e}const xs=0,Os=25,Tt=250,zt="global",Bt="header:",no=Bt+"ctt",ro=Bt+"between_integer",oo=Bt+"between_date",Ot=e=>e!==zt&&!e.startsWith(Bt);function Ie({path:e,method:t,body:n=void 0,queryParams:r=void 0}){const o=Object.entries(r||{}).reduce((a,[l,u])=>((Array.isArray(u)||typeof u=="object")&&(u=JSON.stringify(u)),a[l]=u,a),{}),i=new Cs.createSearchParams(o);e=e+"?"+i;const s={method:t,mode:"cors",credentials:"include",headers:{"Content-Type":"application/json"},redirect:"follow",referrerPolicy:"no-referrer",body:n?JSON.stringify(n):null};return{fetchPath:e,options:s}}function rp(e){return e&&typeof e=="object"&&!Array.isArray(e)}const ct=(...e)=>{const t={};return e.forEach(n=>{n&&Object.keys(n).forEach(r=>{rp(n[r])&&r!=="ref"&&t[r]?t[r]=ct(t[r],n[r]):t[r]=n[r]})}),t},io=e=>e==null?e:typeof e=="boolean"?e.toString():Array.isArray(e)?e.map(t=>io(t)).join(", "):typeof e=="object"?e.name_||JSON.stringify(e):e,gn=(e,t,n=!0)=>{const r=t.split(".");let o=e;for(const i of r)Array.isArray(o)?o=o.map(s=>gn(s,i,!1)):o=o==null?void 0:o[i];return n?io(o):o},so=(e,t)=>e===void 0?t:e,Te=(e,t)=>typeof e=="function"?e(t):e;function Ps(e){const t=[];if(e.length===0)return"";if(typeof e[0]!="string")throw new TypeError("Url must be a string. Received "+e[0]);e[0].match(/^[^/:]+:\/*$/)&&e.length>1&&(e[0]=e.shift()+e[0]),e[0].match(/^file:\/\/\//)?e[0]=e[0].replace(/^([^/:]+):\/*/,"$1:///"):e[0]=e[0].replace(/^([^/:]+):\/*/,"$1://");for(let o=0;o<e.length;o++){let i=e[o];if(typeof i!="string")throw new TypeError("Url must be a string. Received "+i);i!==""&&(o>0&&(i=i.replace(/^[\/]+/,"")),o<e.length-1?i=i.replace(/[\/]+$/,""):i=i.replace(/[\/]+$/,"/"),t.push(i))}let n=t.join("/");n=n.replace(/\/(\?|&|#[^!])/g,"$1");const r=n.split("?");return n=r.shift()+(r.length>0?"?":"")+r.join("&"),n}function we(...e){const t=Array.from(Array.isArray(e[0])?e[0]:e);return Ps(t)}const Hn=e=>new Proxy(e,{get(t,n){return t(r=>r[n])}}),Is=(e,t)=>Object.entries(t).reduce((n,[r,o])=>typeof o=="object"&&JSON.stringify(o)===JSON.stringify(e[r])||o===e[r]?n:{...n,[r]:o},{});function mn(e){const[t]=v.useState(()=>Es.create(()=>({...e}))),[n]=v.useState(()=>Hn(t));return v.useEffect(()=>{t.setState(r=>Is(r,e))},[e,t]),n}const ao=v.createContext({user:null,loading:!1,error:null,signin:async(e,t)=>null,signout:async()=>null,update:async e=>null,resetPassword:async e=>null,oauth_signin:(e,t)=>null,refetch:async()=>null});function Pt(){return v.useContext(ao)}const lo=v.createContext({baseUrl:"",info:null,loading:!1,error:null});function $s(){return v.useContext(lo)}async function ks(e,{username:t,password:n}){const r=new FormData;r.append("username",t),r.append("password",n);const{fetchPath:o,options:i}=Ie({path:we(e,"auth/login"),method:"POST"}),s=await fetch(o,{...i,headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(r)});if(!s.ok)throw s.status===400?new Error("Username or password wrong."):new Error("Failed to sign in.")}async function Ms(e){const{fetchPath:t,options:n}=Ie({path:we(e,"auth/logout"),method:"POST"});if(!(await fetch(t,n)).ok)throw new Error("Failed to sign out.")}async function Fs(e,t,{email:n}){const{fetchPath:r,options:o}=Ie({path:we(e,"auth/forgot-password"),method:"POST",body:{email:n}}),i=await fetch(r,o);if(!i.ok)throw new Error("Couldn't request token to reset password");const s=await i.json(),{token:a}=s,{fetchPath:l,options:u}=Ie({path:we(e,"auth/reset-password"),method:"POST",body:{token:a,password:t}});if(!(await fetch(l,u)).ok)throw new Error("Couldn't reset password")}async function Ds(e,t,n,r){const o=we(e,"auth/login",t);if(!n){window.location.href=we(e,"auth/login",t);return}const i=500,s=500,a=window.screenLeft+window.outerWidth/2-i/2,l=window.screenTop+window.outerHeight/2-s/2,u=window.open(o+"?popup=true","auth",`toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=${i}, height=${s}, top=${l}, left=${a}`),d=window.setInterval(function(){u.closed!==!1&&(window.clearInterval(d),r==null||r())},200)}async function Ns(e,t){const{fetchPath:n,options:r}=Ie({path:we(e,"info/"),method:"GET"}),o=await fetch(n,{signal:t,...r}),i=await o.json();if(!o.ok){const s=typeof i.detail=="string"?i.detail:JSON.stringify(i.detail,null,2);throw new Error(s)}return i}async function Ls(e,t){const{fetchPath:n,options:r}=Ie({path:we(e,"auth/user"),method:"GET"}),o=await fetch(n,{signal:t,...r}),i=await o.json();if(!o.ok){const s=typeof i.detail=="string"?i.detail:JSON.stringify(i.detail,null,2);throw new Error(s)}return i}async function js(e,t){const{fetchPath:n,options:r}=Ie({path:we(e,"auth/user"),method:"PUT",body:t}),o=await fetch(n,r),i=await o.json();if(!o.ok){const s=typeof i.detail=="string"?i.detail:JSON.stringify(i.detail,null,2);throw new Error(s)}return i}function zs(e,t){const n=lt.useQueryClient(),r=lt.useQuery({queryKey:["user"],queryFn:({signal:f})=>Ls(e,f),retry:!1,...t}),[o,i]=v.useState(null),s=v.useCallback(({username:f,password:p})=>{i(null),ks(e,{username:f,password:p}).then(()=>n.invalidateQueries({queryKey:["user"]})).catch(y=>i(y))},[e,n]),a=v.useCallback(()=>{i(null),Ms(e).then(()=>n.resetQueries({queryKey:["user"]})).then(()=>n.resetQueries({queryKey:["info"]})).catch(f=>i(f))},[e,n]),l=v.useCallback(f=>{i(null),js(e,f).then(()=>n.invalidateQueries({queryKey:["user"]})).catch(p=>i(p))},[e,n]),u=v.useCallback(f=>{i(null),Fs(e,f,r.data).catch(p=>i(p))},[e,r.data]),d=v.useCallback((f,p)=>Ds(e,f,p,()=>n.invalidateQueries({queryKey:["user"]})),[e,n]);return{user:r.isError?null:r.data,loading:r.isFetching,error:o?o.message:null,signin:s,signout:a,update:l,resetPassword:u,oauth_signin:d,refetch:r.refetch}}function Bs(e,t){const n=lt.useQuery({queryKey:["info"],queryFn:({signal:r})=>Ns(e,r),enabled:!1});return v.useEffect(()=>{t.user&&!n.data&&n.refetch()},[t.user,n]),{baseUrl:e,info:n.data,loading:n.isFetching,error:n.error}}function op(e){const t={baseUrl:new URL(document.baseURI).pathname+"/api/v1",inheritMantineTheme:!1},{baseUrl:n,authQueryProps:r,children:o}={...t,...e},i=zs(n,r),s=mn(i),a=Bs(n,i),l=mn(a);return c.jsx(ao.Provider,{value:s,children:c.jsx(lo.Provider,{value:l,children:o})})}function ip(e){const[t]=v.useState(()=>new lt.QueryClient);return c.jsx(lt.QueryClientProvider,{client:t,children:c.jsx(op,{...e})})}const co=v.createContext({bulkActions:{selectedIds:[],setSelectedIds:()=>{}},dispatchBulkActions:async(e,t)=>{},error:null});function sp(){const e=v.useContext(co);if(e===void 0)throw new Error("useBulkActions must be used within a ApiProvider");return e}const Us={opened:!1,setOpened:()=>{throw new Error("setOpened must be defined in a provider")},view:0,setView:()=>{throw new Error("setView must be defined in a provider")},state:void 0,setState:()=>{throw new Error("setState must be defined in a provider")},reset:()=>{throw new Error("reset must be defined in a provider")},item:void 0,itemLoading:!1,setItem:()=>{throw new Error("setItem must be defined in a provider")},setItemLoading:()=>{throw new Error("setItemLoading must be defined in a provider")}},Yn={errors:[],data:void 0},uo=v.createContext(Us),fo=v.createContext(Us);function ut(e="add"){const t=v.useContext(e==="add"?uo:fo);if(t===void 0)throw new Error("useForms must be used within an ApiProvider");return t}const Vs=async(e,t)=>{const{fetchPath:n,options:r}=Ie({path:we(e,"/"),method:"POST",body:t}),o=await fetch(n,r);let i=null;const s=o.headers.get("content-type");if(s&&s.includes("application/json")?i=await o.json():i=await o.text(),!o.ok)throw typeof i=="object"?new Error(typeof i.detail=="string"?i.detail:JSON.stringify(i,null,2)):new Error(i);return i},Ws=async(e,t)=>{const{fetchPath:n,options:r}=Ie({path:we(e,t.toString()),method:"DELETE"}),o=await fetch(n,r);let i=null;const s=o.headers.get("content-type");if(s&&s.includes("application/json")?i=await o.json():i=await o.text(),!o.ok)throw typeof i=="object"?new Error(typeof i.detail=="string"?i.detail:JSON.stringify(i,null,2)):new Error(i);return i},Gs=async(e,t)=>{const{fetchPath:n,options:r}=Ie({path:e,method:"GET"}),o=await fetch(n,{signal:t,...r}),i=await o.json();if(!o.ok){const s=typeof i.detail=="string"?i.detail:JSON.stringify(i.detail,null,2);throw new Error(s)}return i},Hs=async(e,t)=>{const{fetchPath:n,options:r}=Ie({path:we(e,t.toString()),method:"GET"}),o=await fetch(n,r);let i=null;const s=o.headers.get("content-type");if(s&&s.includes("application/json")?i=await o.json():i=await o.text(),!o.ok)throw typeof i=="object"?new Error(typeof i.detail=="string"?i.detail:JSON.stringify(i,null,2)):new Error(i);return i},Ys=async(e,t,n)=>{const{fetchPath:r,options:o}=Ie({path:e,method:"GET",queryParams:t}),i=await fetch(r,{signal:n,...o});let s=null;const a=i.headers.get("content-type");if(a&&a.includes("application/json")?s=await i.json():s=await i.text(),!i.ok)throw typeof s=="object"?new Error(typeof s.detail=="string"?s.detail:JSON.stringify(s,null,2)):new Error(s);return s},qs=async(e,t,n)=>{const{fetchPath:r,options:o}=Ie({path:we(e,t.toString()),method:"PUT",body:n}),i=await fetch(r,o);let s=null;const a=i.headers.get("content-type");if(a&&a.includes("application/json")?s=await i.json():s=await i.text(),!i.ok)throw typeof s=="object"?new Error(typeof s.detail=="string"?s.detail:JSON.stringify(s,null,2)):new Error(s);return s},Js=async(e,t,n)=>{const{fetchPath:r,options:o}=Ie({path:we(e,"/bulk",t),method:"POST",body:n}),i=await fetch(r,o);let s=null;const a=i.headers.get("content-type");if(a&&a.includes("application/json")?s=await i.json():s=await i.text(),!i.ok)throw typeof s=="object"?new Error(typeof s.detail=="string"?s.detail:JSON.stringify(s,null,2)):new Error(s);return s},ze=e=>e&&typeof e=="object"?Array.isArray(e)?e.join(","):JSON.stringify(e):e,po=e=>{const t={};for(const n of e)switch(n.type){case"RelatedList":t[n.name]=[];break;case"Boolean":t[n.name]="false";break;case"Date":case"DateTime":case"Integer":case"Float":case"Geometry":case"Raw":case"Related":t[n.name]=void 0;break;default:t[n.name]=""}return t};var qn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function St(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function It(e){this._maxSize=e,this.clear()}It.prototype.clear=function(){this._size=0,this._values=Object.create(null)},It.prototype.get=function(e){return this._values[e]},It.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var ap=/[^.^\]^[]+|(?=\[\]|\.\.)/g,Ks=/^\d+$/,lp=/^\d/,cp=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,up=/^\s*(['"]?)(.*?)(\1)\s*$/,ho=512,Xs=new It(ho),Zs=new It(ho),Qs=new It(ho),$t={Cache:It,split:mo,normalizePath:go,setter:function(e){var t=go(e);return Zs.get(e)||Zs.set(e,function(r,o){for(var i=0,s=t.length,a=r;i<s-1;){var l=t[i];if(l==="__proto__"||l==="constructor"||l==="prototype")return r;a=a[t[i++]]}a[t[i]]=o})},getter:function(e,t){var n=go(e);return Qs.get(e)||Qs.set(e,function(o){for(var i=0,s=n.length;i<s;)if(o!=null||!t)o=o[n[i++]];else return;return o})},join:function(e){return e.reduce(function(t,n){return t+(yo(n)||Ks.test(n)?"["+n+"]":(t?".":"")+n)},"")},forEach:function(e,t,n){fp(Array.isArray(e)?e:mo(e),t,n)}};function go(e){return Xs.get(e)||Xs.set(e,mo(e).map(function(t){return t.replace(up,"$2")}))}function mo(e){return e.match(ap)||[""]}function fp(e,t,n){var r=e.length,o,i,s,a;for(i=0;i<r;i++)o=e[i],o&&(hp(o)&&(o='"'+o+'"'),a=yo(o),s=!a&&/^\d+$/.test(o),t.call(n,o,a,s,i,e))}function yo(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function dp(e){return e.match(lp)&&!e.match(Ks)}function pp(e){return cp.test(e)}function hp(e){return!yo(e)&&(dp(e)||pp(e))}const gp=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,Jn=e=>e.match(gp)||[],Kn=e=>e[0].toUpperCase()+e.slice(1),bo=(e,t)=>Jn(e).join(t).toLowerCase(),Rs=e=>Jn(e).reduce((t,n)=>`${t}${t?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,"");var vo={words:Jn,upperFirst:Kn,camelCase:Rs,pascalCase:e=>Kn(Rs(e)),snakeCase:e=>bo(e,"_"),kebabCase:e=>bo(e,"-"),sentenceCase:e=>Kn(bo(e," ")),titleCase:e=>Jn(e).map(Kn).join(" ")},To={exports:{}};To.exports=function(e){return ea(mp(e),e)},To.exports.array=ea;function ea(e,t){var n=e.length,r=new Array(n),o={},i=n,s=yp(t),a=bp(e);for(t.forEach(function(u){if(!a.has(u[0])||!a.has(u[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});i--;)o[i]||l(e[i],i,new Set);return r;function l(u,d,f){if(f.has(u)){var p;try{p=", node was:"+JSON.stringify(u)}catch{p=""}throw new Error("Cyclic dependency"+p)}if(!a.has(u))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(u));if(!o[d]){o[d]=!0;var y=s.get(u)||new Set;if(y=Array.from(y),d=y.length){f.add(u);do{var b=y[--d];l(b,a.get(b),f)}while(d);f.delete(u)}r[--n]=u}}}function mp(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var o=e[n];t.add(o[0]),t.add(o[1])}return Array.from(t)}function yp(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var o=e[n];t.has(o[0])||t.set(o[0],new Set),t.has(o[1])||t.set(o[1],new Set),t.get(o[0]).add(o[1])}return t}function bp(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}var vp=To.exports;const Tp=St(vp),Sp=Object.prototype.toString,wp=Error.prototype.toString,_p=RegExp.prototype.toString,Cp=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",Ep=/^Symbol\((.*)\)(.*)$/;function Ap(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function ta(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return Ap(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return Cp.call(e).replace(Ep,"Symbol($1)");const r=Sp.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+wp.call(e)+"]":r==="RegExp"?_p.call(e):null}function Re(e,t){let n=ta(e,t);return n!==null?n:JSON.stringify(e,function(r,o){let i=ta(this[r],t);return i!==null?i:o},2)}function na(e){return e==null?[]:[].concat(e)}let ra,oa,ia,xp=/\$\{\s*(\w+)\s*\}/g;ra=Symbol.toStringTag;class sa{constructor(t,n,r,o){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[ra]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=o,this.errors=[],this.inner=[],na(t).forEach(i=>{if(Ee.isError(i)){this.errors.push(...i.errors);const s=i.inner.length?i.inner:[i];this.inner.push(...s)}else this.errors.push(i)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}oa=Symbol.hasInstance,ia=Symbol.toStringTag;class Ee extends Error{static formatError(t,n){const r=n.label||n.path||"this";return n=Object.assign({},n,{path:r,originalPath:n.path}),typeof t=="string"?t.replace(xp,(o,i)=>Re(n[i])):typeof t=="function"?t(n):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,n,r,o,i){const s=new sa(t,n,r,o);if(i)return s;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[ia]="Error",this.name=s.name,this.message=s.message,this.type=s.type,this.value=s.value,this.path=s.path,this.errors=s.errors,this.inner=s.inner,Error.captureStackTrace&&Error.captureStackTrace(this,Ee)}static[oa](t){return sa[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let et={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const o=r!=null&&r!==n?` (cast from the value \`${Re(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Re(n,!0)}\``+o:`${e} must match the configured type. The validated value was: \`${Re(n,!0)}\``+o}},Be={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},wt={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},So={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},wo={isValue:"${path} field must be ${value}"},Xn={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},Zn={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},aa={notType:e=>{const{path:t,value:n,spec:r}=e,o=r.types.length;if(Array.isArray(n)){if(n.length<o)return`${t} tuple value has too few items, expected a length of ${o} but got ${n.length} for value: \`${Re(n,!0)}\``;if(n.length>o)return`${t} tuple value has too many items, expected a length of ${o} but got ${n.length} for value: \`${Re(n,!0)}\``}return Ee.formatError(et.notType,e)}};var la=Object.assign(Object.create(null),{mixed:et,string:Be,number:wt,date:So,object:Xn,array:Zn,boolean:wo,tuple:aa});const kt=e=>e&&e.__isYupSchema__;class Qn{static fromOptions(t,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:o,otherwise:i}=n,s=typeof r=="function"?r:(...a)=>a.every(l=>l===r);return new Qn(t,(a,l)=>{var u;let d=s(...a)?o:i;return(u=d==null?void 0:d(l))!=null?u:l})}constructor(t,n){this.fn=void 0,this.refs=t,this.refs=t,this.fn=n}resolve(t,n){let r=this.refs.map(i=>i.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),o=this.fn(r,t,n);if(o===void 0||o===t)return t;if(!kt(o))throw new TypeError("conditions must return a schema object");return o.resolve(n)}}const Rn={context:"$",value:"."};function Op(e,t){return new _t(e,t)}class _t{constructor(t,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Rn.context,this.isValue=this.key[0]===Rn.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?Rn.context:this.isValue?Rn.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&$t.getter(this.path,!0),this.map=n.map}getValue(t,n,r){let o=this.isContext?r:this.isValue?t:n;return this.getter&&(o=this.getter(o||{})),this.map&&(o=this.map(o)),o}cast(t,n){return this.getValue(t,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}_t.prototype.__isYupRef=!0;const Ke=e=>e==null;function Ut(e){function t({value:n,path:r="",options:o,originalValue:i,schema:s},a,l){const{name:u,test:d,params:f,message:p,skipAbsent:y}=e;let{parent:b,context:g,abortEarly:w=s.spec.abortEarly,disableStackTrace:E=s.spec.disableStackTrace}=o;function F(P){return _t.isRef(P)?P.getValue(n,b,g):P}function I(P={}){const L=Object.assign({value:n,originalValue:i,label:s.spec.label,path:P.path||r,spec:s.spec,disableStackTrace:P.disableStackTrace||E},f,P.params);for(const q of Object.keys(L))L[q]=F(L[q]);const Y=new Ee(Ee.formatError(P.message||p,L),n,L.path,P.type||u,L.disableStackTrace);return Y.params=L,Y}const A=w?a:l;let _={path:r,parent:b,type:u,from:o.from,createError:I,resolve:F,options:o,originalValue:i,schema:s};const x=P=>{Ee.isError(P)?A(P):P?l(null):A(I())},k=P=>{Ee.isError(P)?A(P):a(P)};if(y&&Ke(n))return x(!0);let z;try{var m;if(z=d.call(_,n,_),typeof((m=z)==null?void 0:m.then)=="function"){if(o.sync)throw new Error(`Validation test of type: "${_.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(z).then(x,k)}}catch(P){k(P);return}x(z)}return t.OPTIONS=e,t}function _o(e,t,n,r=n){let o,i,s;return t?($t.forEach(t,(a,l,u)=>{let d=l?a.slice(1,a.length-1):a;e=e.resolve({context:r,parent:o,value:n});let f=e.type==="tuple",p=u?parseInt(d,10):0;if(e.innerType||f){if(f&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${s}" must contain an index to the tuple element, e.g. "${s}[0]"`);if(n&&p>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${a}, in the path: ${t}. because there is no value at that index. `);o=n,n=n&&n[p],e=f?e.spec.types[p]:e.innerType}if(!u){if(!e.fields||!e.fields[d])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${s} which is a type: "${e.type}")`);o=n,n=n&&n[d],e=e.fields[d]}i=d,s=l?"["+a+"]":"."+a}),{schema:e,parent:o,parentPath:i}):{parent:o,parentPath:t,schema:e}}function Pp(e,t,n,r){return _o(e,t,n,r).schema}class er extends Set{describe(){const t=[];for(const n of this.values())t.push(_t.isRef(n)?n.describe():n);return t}resolveAll(t){let n=[];for(const r of this.values())n.push(t(r));return n}clone(){return new er(this.values())}merge(t,n){const r=this.clone();return t.forEach(o=>r.add(o)),n.forEach(o=>r.delete(o)),r}}function Vt(e,t=new Map){if(kt(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r<e.length;r++)n[r]=Vt(e[r],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[r,o]of e.entries())n.set(r,Vt(o,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(Vt(r,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[r,o]of Object.entries(e))n[r]=Vt(o,t)}else throw Error(`Unable to clone ${e}`);return n}class $e{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new er,this._blacklist=new er,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(et.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(n=>{n.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=Vt(Object.assign({},this.spec,t)),n}label(t){let n=this.clone();return n.spec.label=t,n}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}withMutation(t){let n=this._mutate;this._mutate=!0;let r=t(this);return this._mutate=n,r}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let n=this,r=t.clone();const o=Object.assign({},n.spec,r.spec);return r.spec=o,r.internalTests=Object.assign({},n.internalTests,r.internalTests),r._whitelist=n._whitelist.merge(t._whitelist,t._blacklist),r._blacklist=n._blacklist.merge(t._blacklist,t._whitelist),r.tests=n.tests,r.exclusiveTests=n.exclusiveTests,r.withMutation(i=>{t.tests.forEach(s=>{i.test(s.OPTIONS)})}),r.transforms=[...n.transforms,...r.transforms],r}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let n=this;if(n.conditions.length){let r=n.conditions;n=n.clone(),n.conditions=[],n=r.reduce((o,i)=>i.resolve(o,t),n),n=n.resolve(t)}return n}resolveOptions(t){var n,r,o,i;return Object.assign({},t,{from:t.from||[],strict:(n=t.strict)!=null?n:this.spec.strict,abortEarly:(r=t.abortEarly)!=null?r:this.spec.abortEarly,recursive:(o=t.recursive)!=null?o:this.spec.recursive,disableStackTrace:(i=t.disableStackTrace)!=null?i:this.spec.disableStackTrace})}cast(t,n={}){let r=this.resolve(Object.assign({value:t},n)),o=n.assert==="ignore-optionality",i=r._cast(t,n);if(n.assert!==!1&&!r.isType(i)){if(o&&Ke(i))return i;let s=Re(t),a=Re(i);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}".
1
+ (function(O,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("react/jsx-runtime"),require("@mantine/core"),require("react"),require("react-router-dom"),require("zustand"),require("@tanstack/react-query"),require("@mantine/hooks"),require("@jsonforms/react"),require("@jsonforms/core"),require("@mantine/dates"),require("clsx"),require("@emotion/react"),require("@mantine/form"),require("mantine-react-table")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","@mantine/core","react","react-router-dom","zustand","@tanstack/react-query","@mantine/hooks","@jsonforms/react","@jsonforms/core","@mantine/dates","clsx","@emotion/react","@mantine/form","mantine-react-table"],p):(O=typeof globalThis<"u"?globalThis:O||self,p(O["fastapi-rtk"]={},O.jsxRuntime,O.core,O.React,O.reactRouterDom,O.zustand,O.reactQuery,O.hooks,O.react,O.core$1,O.dates,O.clsx,O.react$1,O.form,O.mantineReactTable))})(this,function(O,p,T,A,yf,vf,Ln,rt,Me,se,ei,Ar,bf,za,yn){"use strict";var e4=Object.defineProperty;var t4=(O,p,T)=>p in O?e4(O,p,{enumerable:!0,configurable:!0,writable:!0,value:T}):O[p]=T;var Jv=(O,p,T)=>t4(O,typeof p!="symbol"?p+"":p,T);function Zv(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Mt=Zv(A),Ua=A.createContext({path:"",data:null,info:null,queryParams:null,loading:!1,error:null,streaming:null,specialKey:null,setQueryParams:e=>null,refetch:()=>null,refetchInfo:()=>null,getEntry:async e=>({}),addEntry:async(e,t)=>({}),updateEntry:async(e,t,n)=>({}),deleteEntry:async(e,t)=>({}),download:async e=>null});function xe(){const e=A.useContext(Ua);if(e===void 0)throw new Error("useApi must be used within a ApiProvider");return e}const _f=0,wf=25,nr=250,ti="global",ni="header:",ja=ni+"ctt",Wa=ni+"between_integer",Va=ni+"between_date",Or=e=>e!==ti&&!e.startsWith(ni);function At({path:e,method:t,body:n=void 0,queryParams:o=void 0}){const s=Object.entries(o||{}).reduce((c,[d,h])=>((Array.isArray(h)||typeof h=="object")&&(h=JSON.stringify(h)),c[d]=h,c),{}),a=new yf.createSearchParams(s);e=e+"?"+a;const u={method:t,mode:"cors",credentials:"include",headers:{"Content-Type":"application/json"},redirect:"follow",referrerPolicy:"no-referrer",body:n?JSON.stringify(n):null};return{fetchPath:e,options:u}}function Xv(e){return e&&typeof e=="object"&&!Array.isArray(e)}const Bn=(...e)=>{const t={};return e.forEach(n=>{n&&Object.keys(n).forEach(o=>{Xv(n[o])&&o!=="ref"&&t[o]?t[o]=Bn(t[o],n[o]):t[o]=n[o]})}),t},Ga=e=>e==null?e:typeof e=="boolean"?e.toString():Array.isArray(e)?e.map(t=>Ga(t)).join(", "):typeof e=="object"?e.name_||JSON.stringify(e):e,Ri=(e,t,n=!0)=>{const o=t.split(".");let s=e;for(const a of o)Array.isArray(s)?s=s.map(u=>Ri(u,a,!1)):s=s==null?void 0:s[a];return n?Ga(s):s},Ha=(e,t)=>e===void 0?t:e,lt=(e,t)=>typeof e=="function"?e(t):e;function Tf(e){const t=[];if(e.length===0)return"";if(typeof e[0]!="string")throw new TypeError("Url must be a string. Received "+e[0]);e[0].match(/^[^/:]+:\/*$/)&&e.length>1&&(e[0]=e.shift()+e[0]),e[0].match(/^file:\/\/\//)?e[0]=e[0].replace(/^([^/:]+):\/*/,"$1:///"):e[0]=e[0].replace(/^([^/:]+):\/*/,"$1://");for(let s=0;s<e.length;s++){let a=e[s];if(typeof a!="string")throw new TypeError("Url must be a string. Received "+a);a!==""&&(s>0&&(a=a.replace(/^[\/]+/,"")),s<e.length-1?a=a.replace(/[\/]+$/,""):a=a.replace(/[\/]+$/,"/"),t.push(a))}let n=t.join("/");n=n.replace(/\/(\?|&|#[^!])/g,"$1");const o=n.split("?");return n=o.shift()+(o.length>0?"?":"")+o.join("&"),n}function dt(...e){const t=Array.from(Array.isArray(e[0])?e[0]:e);return Tf(t)}const jo=e=>new Proxy(e,{get(t,n){return t(o=>o[n])}}),Sf=(e,t)=>Object.entries(t).reduce((n,[o,s])=>typeof s=="object"&&JSON.stringify(s)===JSON.stringify(e[o])||s===e[o]?n:{...n,[o]:s},{});function qi(e){const[t]=A.useState(()=>vf.create(()=>({...e}))),[n]=A.useState(()=>jo(t));return A.useEffect(()=>{t.setState(o=>Sf(o,e))},[e,t]),n}const Ya=A.createContext({user:null,loading:!1,error:null,signin:async(e,t)=>null,signout:async()=>null,update:async e=>null,resetPassword:async e=>null,oauth_signin:(e,t)=>null,refetch:async()=>null});function Ir(){return A.useContext(Ya)}const Ra=A.createContext({baseUrl:"",info:null,loading:!1,error:null});function Cf(){return A.useContext(Ra)}async function Ef(e,{username:t,password:n}){const o=new FormData;o.append("username",t),o.append("password",n);const{fetchPath:s,options:a}=At({path:dt(e,"auth/login"),method:"POST"}),u=await fetch(s,{...a,headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(o)});if(!u.ok)throw u.status===400?new Error("Username or password wrong."):new Error("Failed to sign in.")}async function xf(e){const{fetchPath:t,options:n}=At({path:dt(e,"auth/logout"),method:"POST"});if(!(await fetch(t,n)).ok)throw new Error("Failed to sign out.")}async function Af(e,t,{email:n}){const{fetchPath:o,options:s}=At({path:dt(e,"auth/forgot-password"),method:"POST",body:{email:n}}),a=await fetch(o,s);if(!a.ok)throw new Error("Couldn't request token to reset password");const u=await a.json(),{token:c}=u,{fetchPath:d,options:h}=At({path:dt(e,"auth/reset-password"),method:"POST",body:{token:c,password:t}});if(!(await fetch(d,h)).ok)throw new Error("Couldn't reset password")}async function Of(e,t,n,o){const s=dt(e,"auth/login",t);if(!n){window.location.href=dt(e,"auth/login",t);return}const a=500,u=500,c=window.screenLeft+window.outerWidth/2-a/2,d=window.screenTop+window.outerHeight/2-u/2,h=window.open(s+"?popup=true","auth",`toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=${a}, height=${u}, top=${d}, left=${c}`),y=window.setInterval(function(){h.closed!==!1&&(window.clearInterval(y),o==null||o())},200)}async function If(e,t){const{fetchPath:n,options:o}=At({path:dt(e,"info/"),method:"GET"}),s=await fetch(n,{signal:t,...o}),a=await s.json();if(!s.ok){const u=typeof a.detail=="string"?a.detail:JSON.stringify(a.detail,null,2);throw new Error(u)}return a}async function Pf(e,t){const{fetchPath:n,options:o}=At({path:dt(e,"auth/user"),method:"GET"}),s=await fetch(n,{signal:t,...o}),a=await s.json();if(!s.ok){const u=typeof a.detail=="string"?a.detail:JSON.stringify(a.detail,null,2);throw new Error(u)}return a}async function $f(e,t){const{fetchPath:n,options:o}=At({path:dt(e,"auth/user"),method:"PUT",body:t}),s=await fetch(n,o),a=await s.json();if(!s.ok){const u=typeof a.detail=="string"?a.detail:JSON.stringify(a.detail,null,2);throw new Error(u)}return a}function Mf(e,t){const n=Ln.useQueryClient(),o=Ln.useQuery({queryKey:["user"],queryFn:({signal:g})=>Pf(e,g),retry:!1,...t}),[s,a]=A.useState(null),u=A.useCallback(({username:g,password:b})=>{a(null),Ef(e,{username:g,password:b}).then(()=>n.invalidateQueries({queryKey:["user"]})).catch(C=>a(C))},[e,n]),c=A.useCallback(()=>{a(null),xf(e).then(()=>n.resetQueries({queryKey:["user"]})).then(()=>n.resetQueries({queryKey:["info"]})).catch(g=>a(g))},[e,n]),d=A.useCallback(g=>{a(null),$f(e,g).then(()=>n.invalidateQueries({queryKey:["user"]})).catch(b=>a(b))},[e,n]),h=A.useCallback(g=>{a(null),Af(e,g,o.data).catch(b=>a(b))},[e,o.data]),y=A.useCallback((g,b)=>Of(e,g,b,()=>n.invalidateQueries({queryKey:["user"]})),[e,n]);return{user:o.isError?null:o.data,loading:o.isFetching,error:s?s.message:null,signin:u,signout:c,update:d,resetPassword:h,oauth_signin:y,refetch:o.refetch}}function Ff(e,t){const n=Ln.useQuery({queryKey:["info"],queryFn:({signal:o})=>If(e,o),enabled:!1});return A.useEffect(()=>{t.user&&!n.data&&n.refetch()},[t.user,n]),{baseUrl:e,info:n.data,loading:n.isFetching,error:n.error}}function Qv(e){const t={baseUrl:new URL(document.baseURI).pathname+"/api/v1",inheritMantineTheme:!1},{baseUrl:n,authQueryProps:o,children:s}={...t,...e},a=Mf(n,o),u=qi(a),c=Ff(n,a),d=qi(c);return p.jsx(Ya.Provider,{value:u,children:p.jsx(Ra.Provider,{value:d,children:s})})}function eb(e){const[t]=A.useState(()=>new Ln.QueryClient);return p.jsx(Ln.QueryClientProvider,{client:t,children:p.jsx(Qv,{...e})})}const qa=A.createContext({bulkActions:{selectedIds:[],setSelectedIds:()=>{}},dispatchBulkActions:async(e,t)=>{},error:null});function tb(){const e=A.useContext(qa);if(e===void 0)throw new Error("useBulkActions must be used within a ApiProvider");return e}const Df={opened:!1,setOpened:()=>{throw new Error("setOpened must be defined in a provider")},view:0,setView:()=>{throw new Error("setView must be defined in a provider")},state:void 0,setState:()=>{throw new Error("setState must be defined in a provider")},reset:()=>{throw new Error("reset must be defined in a provider")},item:void 0,itemLoading:!1,setItem:()=>{throw new Error("setItem must be defined in a provider")},setItemLoading:()=>{throw new Error("setItemLoading must be defined in a provider")}},Wo={errors:[],data:void 0},Ka=A.createContext(Df),Ja=A.createContext(Df);function zn(e="add"){const t=A.useContext(e==="add"?Ka:Ja);if(t===void 0)throw new Error("useForms must be used within an ApiProvider");return t}const kf=async(e,t)=>{const{fetchPath:n,options:o}=At({path:dt(e,"/"),method:"POST",body:t}),s=await fetch(n,o);let a=null;const u=s.headers.get("content-type");if(u&&u.includes("application/json")?a=await s.json():a=await s.text(),!s.ok)throw typeof a=="object"?new Error(typeof a.detail=="string"?a.detail:JSON.stringify(a,null,2)):new Error(a);return a},Nf=async(e,t)=>{const{fetchPath:n,options:o}=At({path:dt(e,t.toString()),method:"DELETE"}),s=await fetch(n,o);let a=null;const u=s.headers.get("content-type");if(u&&u.includes("application/json")?a=await s.json():a=await s.text(),!s.ok)throw typeof a=="object"?new Error(typeof a.detail=="string"?a.detail:JSON.stringify(a,null,2)):new Error(a);return a},Lf=async(e,t)=>{const{fetchPath:n,options:o}=At({path:e,method:"GET"}),s=await fetch(n,{signal:t,...o}),a=await s.json();if(!s.ok){const u=typeof a.detail=="string"?a.detail:JSON.stringify(a.detail,null,2);throw new Error(u)}return a},Bf=async(e,t)=>{const{fetchPath:n,options:o}=At({path:dt(e,t.toString()),method:"GET"}),s=await fetch(n,o);let a=null;const u=s.headers.get("content-type");if(u&&u.includes("application/json")?a=await s.json():a=await s.text(),!s.ok)throw typeof a=="object"?new Error(typeof a.detail=="string"?a.detail:JSON.stringify(a,null,2)):new Error(a);return a},zf=async(e,t,n)=>{const{fetchPath:o,options:s}=At({path:e,method:"GET",queryParams:t}),a=await fetch(o,{signal:n,...s});let u=null;const c=a.headers.get("content-type");if(c&&c.includes("application/json")?u=await a.json():u=await a.text(),!a.ok)throw typeof u=="object"?new Error(typeof u.detail=="string"?u.detail:JSON.stringify(u,null,2)):new Error(u);return u},Uf=async(e,t,n)=>{const{fetchPath:o,options:s}=At({path:dt(e,t.toString()),method:"PUT",body:n}),a=await fetch(o,s);let u=null;const c=a.headers.get("content-type");if(c&&c.includes("application/json")?u=await a.json():u=await a.text(),!a.ok)throw typeof u=="object"?new Error(typeof u.detail=="string"?u.detail:JSON.stringify(u,null,2)):new Error(u);return u},jf=async(e,t,n)=>{const{fetchPath:o,options:s}=At({path:dt(e,"/bulk",t),method:"POST",body:n}),a=await fetch(o,s);let u=null;const c=a.headers.get("content-type");if(c&&c.includes("application/json")?u=await a.json():u=await a.text(),!a.ok)throw typeof u=="object"?new Error(typeof u.detail=="string"?u.detail:JSON.stringify(u,null,2)):new Error(u);return u},Ut=e=>e&&typeof e=="object"?Array.isArray(e)?e.join(","):JSON.stringify(e):e,Za=e=>{const t={};for(const n of e)switch(n.type){case"RelatedList":t[n.name]=[];break;case"Boolean":t[n.name]="false";break;case"Date":case"DateTime":case"Integer":case"Float":case"Geometry":case"Raw":case"Related":t[n.name]=void 0;break;default:t[n.name]=""}return t};var Un=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function rr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Pr(e){this._maxSize=e,this.clear()}Pr.prototype.clear=function(){this._size=0,this._values=Object.create(null)},Pr.prototype.get=function(e){return this._values[e]},Pr.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var nb=/[^.^\]^[]+|(?=\[\]|\.\.)/g,Wf=/^\d+$/,rb=/^\d/,ib=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,ob=/^\s*(['"]?)(.*?)(\1)\s*$/,Xa=512,Vf=new Pr(Xa),Gf=new Pr(Xa),Hf=new Pr(Xa),$r={Cache:Pr,split:el,normalizePath:Qa,setter:function(e){var t=Qa(e);return Gf.get(e)||Gf.set(e,function(o,s){for(var a=0,u=t.length,c=o;a<u-1;){var d=t[a];if(d==="__proto__"||d==="constructor"||d==="prototype")return o;c=c[t[a++]]}c[t[a]]=s})},getter:function(e,t){var n=Qa(e);return Hf.get(e)||Hf.set(e,function(s){for(var a=0,u=n.length;a<u;)if(s!=null||!t)s=s[n[a++]];else return;return s})},join:function(e){return e.reduce(function(t,n){return t+(tl(n)||Wf.test(n)?"["+n+"]":(t?".":"")+n)},"")},forEach:function(e,t,n){sb(Array.isArray(e)?e:el(e),t,n)}};function Qa(e){return Vf.get(e)||Vf.set(e,el(e).map(function(t){return t.replace(ob,"$2")}))}function el(e){return e.match(nb)||[""]}function sb(e,t,n){var o=e.length,s,a,u,c;for(a=0;a<o;a++)s=e[a],s&&(ub(s)&&(s='"'+s+'"'),c=tl(s),u=!c&&/^\d+$/.test(s),t.call(n,s,c,u,a,e))}function tl(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function ab(e){return e.match(rb)&&!e.match(Wf)}function lb(e){return ib.test(e)}function ub(e){return!tl(e)&&(ab(e)||lb(e))}const cb=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,Vo=e=>e.match(cb)||[],Go=e=>e[0].toUpperCase()+e.slice(1),nl=(e,t)=>Vo(e).join(t).toLowerCase(),Yf=e=>Vo(e).reduce((t,n)=>`${t}${t?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,"");var rl={words:Vo,upperFirst:Go,camelCase:Yf,pascalCase:e=>Go(Yf(e)),snakeCase:e=>nl(e,"_"),kebabCase:e=>nl(e,"-"),sentenceCase:e=>Go(nl(e," ")),titleCase:e=>Vo(e).map(Go).join(" ")},il={exports:{}};il.exports=function(e){return Rf(fb(e),e)},il.exports.array=Rf;function Rf(e,t){var n=e.length,o=new Array(n),s={},a=n,u=db(t),c=pb(e);for(t.forEach(function(h){if(!c.has(h[0])||!c.has(h[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});a--;)s[a]||d(e[a],a,new Set);return o;function d(h,y,g){if(g.has(h)){var b;try{b=", node was:"+JSON.stringify(h)}catch{b=""}throw new Error("Cyclic dependency"+b)}if(!c.has(h))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(h));if(!s[y]){s[y]=!0;var C=u.get(h)||new Set;if(C=Array.from(C),y=C.length){g.add(h);do{var E=C[--y];d(E,c.get(E),g)}while(y);g.delete(h)}o[--n]=h}}}function fb(e){for(var t=new Set,n=0,o=e.length;n<o;n++){var s=e[n];t.add(s[0]),t.add(s[1])}return Array.from(t)}function db(e){for(var t=new Map,n=0,o=e.length;n<o;n++){var s=e[n];t.has(s[0])||t.set(s[0],new Set),t.has(s[1])||t.set(s[1],new Set),t.get(s[0]).add(s[1])}return t}function pb(e){for(var t=new Map,n=0,o=e.length;n<o;n++)t.set(e[n],n);return t}var hb=il.exports;const gb=rr(hb),mb=Object.prototype.toString,yb=Error.prototype.toString,vb=RegExp.prototype.toString,bb=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",_b=/^Symbol\((.*)\)(.*)$/;function wb(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function qf(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return wb(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return bb.call(e).replace(_b,"Symbol($1)");const o=mb.call(e).slice(8,-1);return o==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):o==="Error"||e instanceof Error?"["+yb.call(e)+"]":o==="RegExp"?vb.call(e):null}function An(e,t){let n=qf(e,t);return n!==null?n:JSON.stringify(e,function(o,s){let a=qf(this[o],t);return a!==null?a:s},2)}function Kf(e){return e==null?[]:[].concat(e)}let Jf,Zf,Xf,Tb=/\$\{\s*(\w+)\s*\}/g;Jf=Symbol.toStringTag;class Qf{constructor(t,n,o,s){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[Jf]="Error",this.name="ValidationError",this.value=n,this.path=o,this.type=s,this.errors=[],this.inner=[],Kf(t).forEach(a=>{if(_t.isError(a)){this.errors.push(...a.errors);const u=a.inner.length?a.inner:[a];this.inner.push(...u)}else this.errors.push(a)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}Zf=Symbol.hasInstance,Xf=Symbol.toStringTag;class _t extends Error{static formatError(t,n){const o=n.label||n.path||"this";return n=Object.assign({},n,{path:o,originalPath:n.path}),typeof t=="string"?t.replace(Tb,(s,a)=>An(n[a])):typeof t=="function"?t(n):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,n,o,s,a){const u=new Qf(t,n,o,s);if(a)return u;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[Xf]="Error",this.name=u.name,this.message=u.message,this.type=u.type,this.value=u.value,this.path=u.path,this.errors=u.errors,this.inner=u.inner,Error.captureStackTrace&&Error.captureStackTrace(this,_t)}static[Zf](t){return Qf[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let On={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:o})=>{const s=o!=null&&o!==n?` (cast from the value \`${An(o,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${An(n,!0)}\``+s:`${e} must match the configured type. The validated value was: \`${An(n,!0)}\``+s}},jt={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},ir={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},ol={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},sl={isValue:"${path} field must be ${value}"},Ho={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},Yo={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},ed={notType:e=>{const{path:t,value:n,spec:o}=e,s=o.types.length;if(Array.isArray(n)){if(n.length<s)return`${t} tuple value has too few items, expected a length of ${s} but got ${n.length} for value: \`${An(n,!0)}\``;if(n.length>s)return`${t} tuple value has too many items, expected a length of ${s} but got ${n.length} for value: \`${An(n,!0)}\``}return _t.formatError(On.notType,e)}};var td=Object.assign(Object.create(null),{mixed:On,string:jt,number:ir,date:ol,object:Ho,array:Yo,boolean:sl,tuple:ed});const Mr=e=>e&&e.__isYupSchema__;class Ro{static fromOptions(t,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:o,then:s,otherwise:a}=n,u=typeof o=="function"?o:(...c)=>c.every(d=>d===o);return new Ro(t,(c,d)=>{var h;let y=u(...c)?s:a;return(h=y==null?void 0:y(d))!=null?h:d})}constructor(t,n){this.fn=void 0,this.refs=t,this.refs=t,this.fn=n}resolve(t,n){let o=this.refs.map(a=>a.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),s=this.fn(o,t,n);if(s===void 0||s===t)return t;if(!Mr(s))throw new TypeError("conditions must return a schema object");return s.resolve(n)}}const qo={context:"$",value:"."};function Sb(e,t){return new or(e,t)}class or{constructor(t,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===qo.context,this.isValue=this.key[0]===qo.value,this.isSibling=!this.isContext&&!this.isValue;let o=this.isContext?qo.context:this.isValue?qo.value:"";this.path=this.key.slice(o.length),this.getter=this.path&&$r.getter(this.path,!0),this.map=n.map}getValue(t,n,o){let s=this.isContext?o:this.isValue?t:n;return this.getter&&(s=this.getter(s||{})),this.map&&(s=this.map(s)),s}cast(t,n){return this.getValue(t,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}or.prototype.__isYupRef=!0;const vn=e=>e==null;function ri(e){function t({value:n,path:o="",options:s,originalValue:a,schema:u},c,d){const{name:h,test:y,params:g,message:b,skipAbsent:C}=e;let{parent:E,context:w,abortEarly:$=u.spec.abortEarly,disableStackTrace:N=u.spec.disableStackTrace}=s;function J(W){return or.isRef(W)?W.getValue(n,E,w):W}function V(W={}){const Q=Object.assign({value:n,originalValue:a,label:u.spec.label,path:W.path||o,spec:u.spec,disableStackTrace:W.disableStackTrace||N},g,W.params);for(const he of Object.keys(Q))Q[he]=J(Q[he]);const fe=new _t(_t.formatError(W.message||b,Q),n,Q.path,W.type||h,Q.disableStackTrace);return fe.params=Q,fe}const L=$?c:d;let D={path:o,parent:E,type:h,from:s.from,createError:V,resolve:J,options:s,originalValue:a,schema:u};const B=W=>{_t.isError(W)?L(W):W?d(null):L(V())},Y=W=>{_t.isError(W)?L(W):c(W)};if(C&&vn(n))return B(!0);let te;try{var S;if(te=y.call(D,n,D),typeof((S=te)==null?void 0:S.then)=="function"){if(s.sync)throw new Error(`Validation test of type: "${D.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(te).then(B,Y)}}catch(W){Y(W);return}B(te)}return t.OPTIONS=e,t}function al(e,t,n,o=n){let s,a,u;return t?($r.forEach(t,(c,d,h)=>{let y=d?c.slice(1,c.length-1):c;e=e.resolve({context:o,parent:s,value:n});let g=e.type==="tuple",b=h?parseInt(y,10):0;if(e.innerType||g){if(g&&!h)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${u}" must contain an index to the tuple element, e.g. "${u}[0]"`);if(n&&b>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${c}, in the path: ${t}. because there is no value at that index. `);s=n,n=n&&n[b],e=g?e.spec.types[b]:e.innerType}if(!h){if(!e.fields||!e.fields[y])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${u} which is a type: "${e.type}")`);s=n,n=n&&n[y],e=e.fields[y]}a=y,u=d?"["+c+"]":"."+c}),{schema:e,parent:s,parentPath:a}):{parent:s,parentPath:t,schema:e}}function Cb(e,t,n,o){return al(e,t,n,o).schema}class Ko extends Set{describe(){const t=[];for(const n of this.values())t.push(or.isRef(n)?n.describe():n);return t}resolveAll(t){let n=[];for(const o of this.values())n.push(t(o));return n}clone(){return new Ko(this.values())}merge(t,n){const o=this.clone();return t.forEach(s=>o.add(s)),n.forEach(s=>o.delete(s)),o}}function ii(e,t=new Map){if(Mr(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let o=0;o<e.length;o++)n[o]=ii(e[o],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[o,s]of e.entries())n.set(o,ii(s,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const o of e)n.add(ii(o,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[o,s]of Object.entries(e))n[o]=ii(s,t)}else throw Error(`Unable to clone ${e}`);return n}class Ot{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new Ko,this._blacklist=new Ko,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(On.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(n=>{n.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=ii(Object.assign({},this.spec,t)),n}label(t){let n=this.clone();return n.spec.label=t,n}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}withMutation(t){let n=this._mutate;this._mutate=!0;let o=t(this);return this._mutate=n,o}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let n=this,o=t.clone();const s=Object.assign({},n.spec,o.spec);return o.spec=s,o.internalTests=Object.assign({},n.internalTests,o.internalTests),o._whitelist=n._whitelist.merge(t._whitelist,t._blacklist),o._blacklist=n._blacklist.merge(t._blacklist,t._whitelist),o.tests=n.tests,o.exclusiveTests=n.exclusiveTests,o.withMutation(a=>{t.tests.forEach(u=>{a.test(u.OPTIONS)})}),o.transforms=[...n.transforms,...o.transforms],o}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let n=this;if(n.conditions.length){let o=n.conditions;n=n.clone(),n.conditions=[],n=o.reduce((s,a)=>a.resolve(s,t),n),n=n.resolve(t)}return n}resolveOptions(t){var n,o,s,a;return Object.assign({},t,{from:t.from||[],strict:(n=t.strict)!=null?n:this.spec.strict,abortEarly:(o=t.abortEarly)!=null?o:this.spec.abortEarly,recursive:(s=t.recursive)!=null?s:this.spec.recursive,disableStackTrace:(a=t.disableStackTrace)!=null?a:this.spec.disableStackTrace})}cast(t,n={}){let o=this.resolve(Object.assign({value:t},n)),s=n.assert==="ignore-optionality",a=o._cast(t,n);if(n.assert!==!1&&!o.isType(a)){if(s&&vn(a))return a;let u=An(t),c=An(a);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${o.type}".
2
2
 
3
- attempted value: ${s}
4
- `+(a!==s?`result of cast: ${a}`:""))}return i}_cast(t,n){let r=t===void 0?t:this.transforms.reduce((o,i)=>i.call(this,o,t,this),t);return r===void 0&&(r=this.getDefault(n)),r}_validate(t,n={},r,o){let{path:i,originalValue:s=t,strict:a=this.spec.strict}=n,l=t;a||(l=this._cast(l,Object.assign({assert:!1},n)));let u=[];for(let d of Object.values(this.internalTests))d&&u.push(d);this.runTests({path:i,value:l,originalValue:s,options:n,tests:u},r,d=>{if(d.length)return o(d,l);this.runTests({path:i,value:l,originalValue:s,options:n,tests:this.tests},r,o)})}runTests(t,n,r){let o=!1,{tests:i,value:s,originalValue:a,path:l,options:u}=t,d=g=>{o||(o=!0,n(g,s))},f=g=>{o||(o=!0,r(g,s))},p=i.length,y=[];if(!p)return f([]);let b={value:s,originalValue:a,path:l,options:u,schema:this};for(let g=0;g<i.length;g++){const w=i[g];w(b,d,function(F){F&&(Array.isArray(F)?y.push(...F):y.push(F)),--p<=0&&f(y)})}}asNestedTest({key:t,index:n,parent:r,parentPath:o,originalParent:i,options:s}){const a=t??n;if(a==null)throw TypeError("Must include `key` or `index` for nested validations");const l=typeof a=="number";let u=r[a];const d=Object.assign({},s,{strict:!0,parent:r,value:u,originalValue:i[a],key:void 0,[l?"index":"key"]:a,path:l||a.includes(".")?`${o||""}[${l?a:`"${a}"`}]`:(o?`${o}.`:"")+t});return(f,p,y)=>this.resolve(d)._validate(u,d,p,y)}validate(t,n){var r;let o=this.resolve(Object.assign({},n,{value:t})),i=(r=n==null?void 0:n.disableStackTrace)!=null?r:o.spec.disableStackTrace;return new Promise((s,a)=>o._validate(t,n,(l,u)=>{Ee.isError(l)&&(l.value=u),a(l)},(l,u)=>{l.length?a(new Ee(l,u,void 0,void 0,i)):s(u)}))}validateSync(t,n){var r;let o=this.resolve(Object.assign({},n,{value:t})),i,s=(r=n==null?void 0:n.disableStackTrace)!=null?r:o.spec.disableStackTrace;return o._validate(t,Object.assign({},n,{sync:!0}),(a,l)=>{throw Ee.isError(a)&&(a.value=l),a},(a,l)=>{if(a.length)throw new Ee(a,t,void 0,void 0,s);i=l}),i}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(Ee.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(Ee.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):Vt(n)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,n){const r=this.clone({nullable:t});return r.internalTests.nullable=Ut({message:n,name:"nullable",test(o){return o===null?this.schema.spec.nullable:!0}}),r}optionality(t,n){const r=this.clone({optional:t});return r.internalTests.optionality=Ut({message:n,name:"optionality",test(o){return o===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=et.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=et.notNull){return this.nullability(!1,t)}required(t=et.required){return this.clone().withMutation(n=>n.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let n=this.clone();return n.transforms.push(t),n}test(...t){let n;if(t.length===1?typeof t[0]=="function"?n={test:t[0]}:n=t[0]:t.length===2?n={name:t[0],test:t[1]}:n={name:t[0],message:t[1],test:t[2]},n.message===void 0&&(n.message=et.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),o=Ut(n),i=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(s=>!(s.OPTIONS.name===n.name&&(i||s.OPTIONS.test===o.OPTIONS.test))),r.tests.push(o),r}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let r=this.clone(),o=na(t).map(i=>new _t(i));return o.forEach(i=>{i.isSibling&&r.deps.push(i.key)}),r.conditions.push(typeof n=="function"?new Qn(o,n):Qn.fromOptions(o,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=Ut({message:t,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(t,n=et.oneOf){let r=this.clone();return t.forEach(o=>{r._whitelist.add(o),r._blacklist.delete(o)}),r.internalTests.whiteList=Ut({message:n,name:"oneOf",skipAbsent:!0,test(o){let i=this.schema._whitelist,s=i.resolveAll(this.resolve);return s.includes(o)?!0:this.createError({params:{values:Array.from(i).join(", "),resolved:s}})}}),r}notOneOf(t,n=et.notOneOf){let r=this.clone();return t.forEach(o=>{r._blacklist.add(o),r._whitelist.delete(o)}),r.internalTests.blacklist=Ut({message:n,name:"notOneOf",test(o){let i=this.schema._blacklist,s=i.resolveAll(this.resolve);return s.includes(o)?this.createError({params:{values:Array.from(i).join(", "),resolved:s}}):!0}}),r}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:r,meta:o,optional:i,nullable:s}=n.spec;return{meta:o,label:r,optional:i,nullable:s,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,u,d)=>d.findIndex(f=>f.name===l.name)===u)}}}$e.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])$e.prototype[`${e}At`]=function(t,n,r={}){const{parent:o,parentPath:i,schema:s}=_o(this,t,n,r.context);return s[e](o&&o[i],Object.assign({},r,{parent:o,path:t}))};for(const e of["equals","is"])$e.prototype[e]=$e.prototype.oneOf;for(const e of["not","nope"])$e.prototype[e]=$e.prototype.notOneOf;const Ip=()=>!0;function tr(e){return new Co(e)}class Co extends $e{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:Ip},t))}}tr.prototype=Co.prototype;function Eo(){return new Ao}class Ao extends $e{constructor(){super({type:"boolean",check(t){return t instanceof Boolean&&(t=t.valueOf()),typeof t=="boolean"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(r.spec.coerce&&!r.isType(t)){if(/^(true|1)$/i.test(String(t)))return!0;if(/^(false|0)$/i.test(String(t)))return!1}return t})})}isTrue(t=wo.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(n){return Ke(n)||n===!0}})}isFalse(t=wo.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(n){return Ke(n)||n===!1}})}default(t){return super.default(t)}defined(t){return super.defined(t)}optional(){return super.optional()}required(t){return super.required(t)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(t){return super.nonNullable(t)}strip(t){return super.strip(t)}}Eo.prototype=Ao.prototype;const $p=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function kp(e){const t=xo(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(n=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}function xo(e){var t,n;const r=$p.exec(e);return r?{year:ft(r[1]),month:ft(r[2],1)-1,day:ft(r[3],1),hour:ft(r[4]),minute:ft(r[5]),second:ft(r[6]),millisecond:r[7]?ft(r[7].substring(0,3)):0,precision:(t=(n=r[7])==null?void 0:n.length)!=null?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:ft(r[10]),minuteOffset:ft(r[11])}:null}function ft(e,t=0){return Number(e)||t}let Mp=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Fp=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,Dp=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Np="^\\d{4}-\\d{2}-\\d{2}",Lp="\\d{2}:\\d{2}:\\d{2}",jp="(([+-]\\d{2}(:?\\d{2})?)|Z)",zp=new RegExp(`${Np}T${Lp}(\\.\\d+)?${jp}$`),Bp=e=>Ke(e)||e===e.trim(),Up={}.toString();function nr(){return new Oo}class Oo extends $e{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce||r.isType(t)||Array.isArray(t))return t;const o=t!=null&&t.toString?t.toString():t;return o===Up?t:o})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||et.required,name:"required",skipAbsent:!0,test:r=>!!r.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(n=>n.OPTIONS.name!=="required"),t))}length(t,n=Be.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n=Be.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n=Be.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}matches(t,n){let r=!1,o,i;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:o,name:i}=n:o=n),this.test({name:i||"matches",message:o||Be.matches,params:{regex:t},skipAbsent:!0,test:s=>s===""&&r||s.search(t)!==-1})}email(t=Be.email){return this.matches(Mp,{name:"email",message:t,excludeEmptyString:!0})}url(t=Be.url){return this.matches(Fp,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=Be.uuid){return this.matches(Dp,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let n="",r,o;return t&&(typeof t=="object"?{message:n="",allowOffset:r=!1,precision:o=void 0}=t:n=t),this.matches(zp,{name:"datetime",message:n||Be.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||Be.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:i=>{if(!i||r)return!0;const s=xo(i);return s?!!s.z:!1}}).test({name:"datetime_precision",message:n||Be.datetime_precision,params:{precision:o},skipAbsent:!0,test:i=>{if(!i||o==null)return!0;const s=xo(i);return s?s.precision===o:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=Be.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:Bp})}lowercase(t=Be.lowercase){return this.transform(n=>Ke(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>Ke(n)||n===n.toLowerCase()})}uppercase(t=Be.uppercase){return this.transform(n=>Ke(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>Ke(n)||n===n.toUpperCase()})}}nr.prototype=Oo.prototype;let Vp=e=>e!=+e;function ca(){return new Po}class Po extends $e{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!Vp(t)}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce)return t;let o=t;if(typeof o=="string"){if(o=o.replace(/\s/g,""),o==="")return NaN;o=+o}return r.isType(o)||o===null?o:parseFloat(o)})})}min(t,n=wt.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r>=this.resolve(t)}})}max(t,n=wt.max){return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(r){return r<=this.resolve(t)}})}lessThan(t,n=wt.lessThan){return this.test({message:n,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(r){return r<this.resolve(t)}})}moreThan(t,n=wt.moreThan){return this.test({message:n,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(r){return r>this.resolve(t)}})}positive(t=wt.positive){return this.moreThan(0,t)}negative(t=wt.negative){return this.lessThan(0,t)}integer(t=wt.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:n=>Number.isInteger(n)})}truncate(){return this.transform(t=>Ke(t)?t:t|0)}round(t){var n;let r=["ceil","floor","round","trunc"];if(t=((n=t)==null?void 0:n.toLowerCase())||"round",t==="trunc")return this.truncate();if(r.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+r.join(", "));return this.transform(o=>Ke(o)?o:Math[t](o))}}ca.prototype=Po.prototype;let ua=new Date(""),Wp=e=>Object.prototype.toString.call(e)==="[object Date]";function Io(){return new Wt}class Wt extends $e{constructor(){super({type:"date",check(t){return Wp(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=kp(t),isNaN(t)?Wt.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(_t.isRef(t))r=t;else{let o=this.cast(t);if(!this._typeCheck(o))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=o}return r}min(t,n=So.min){let r=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o>=this.resolve(r)}})}max(t,n=So.max){let r=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(o){return o<=this.resolve(r)}})}}Wt.INVALID_DATE=ua,Io.prototype=Wt.prototype,Io.INVALID_DATE=ua;function Gp(e,t=[]){let n=[],r=new Set,o=new Set(t.map(([s,a])=>`${s}-${a}`));function i(s,a){let l=$t.split(s)[0];r.add(l),o.has(`${a}-${l}`)||n.push([a,l])}for(const s of Object.keys(e)){let a=e[s];r.add(s),_t.isRef(a)&&a.isSibling?i(a.path,s):kt(a)&&"deps"in a&&a.deps.forEach(l=>i(l,s))}return Tp.array(Array.from(r),n).reverse()}function fa(e,t){let n=1/0;return e.some((r,o)=>{var i;if((i=t.path)!=null&&i.includes(r))return n=o,!0}),n}function da(e){return(t,n)=>fa(e,t)-fa(e,n)}const pa=(e,t,n)=>{if(typeof e!="string")return e;let r=e;try{r=JSON.parse(e)}catch{}return n.isType(r)?r:e};function rr(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=rr(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=rr(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(rr)}):"optional"in e?e.optional():e}const Hp=(e,t)=>{const n=[...$t.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),o=$t.getter($t.join(n),!0)(e);return!!(o&&r in o)};let ha=e=>Object.prototype.toString.call(e)==="[object Object]";function ga(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const Yp=da([]);function yn(e){return new $o(e)}class $o extends $e{constructor(t){super({type:"object",check(n){return ha(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=Yp,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,n={}){var r;let o=super._cast(t,n);if(o===void 0)return this.getDefault(n);if(!this._typeCheck(o))return o;let i=this.fields,s=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(o).filter(f=>!this._nodes.includes(f))),l={},u=Object.assign({},n,{parent:l,__validating:n.__validating||!1}),d=!1;for(const f of a){let p=i[f],y=f in o;if(p){let b,g=o[f];u.path=(n.path?`${n.path}.`:"")+f,p=p.resolve({value:g,context:n.context,parent:l});let w=p instanceof $e?p.spec:void 0,E=w==null?void 0:w.strict;if(w!=null&&w.strip){d=d||f in o;continue}b=!n.__validating||!E?p.cast(o[f],u):o[f],b!==void 0&&(l[f]=b)}else y&&!s&&(l[f]=o[f]);(y!==f in l||l[f]!==o[f])&&(d=!0)}return d?l:o}_validate(t,n={},r,o){let{from:i=[],originalValue:s=t,recursive:a=this.spec.recursive}=n;n.from=[{schema:this,value:s},...i],n.__validating=!0,n.originalValue=s,super._validate(t,n,r,(l,u)=>{if(!a||!ha(u)){o(l,u);return}s=s||u;let d=[];for(let f of this._nodes){let p=this.fields[f];!p||_t.isRef(p)||d.push(p.asNestedTest({options:n,key:f,parent:u,parentPath:n.path,originalParent:s}))}this.runTests({tests:d,value:u,originalValue:s,options:n},r,f=>{o(f.sort(this._sortErrors).concat(l),u)})})}clone(t){const n=super.clone(t);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(t){let n=super.concat(t),r=n.fields;for(let[o,i]of Object.entries(this.fields)){const s=r[o];r[o]=s===void 0?i:s}return n.withMutation(o=>o.setFields(r,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let n={};return this._nodes.forEach(r=>{var o;const i=this.fields[r];let s=t;(o=s)!=null&&o.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[r]})),n[r]=i&&"getDefault"in i?i.getDefault(s):void 0}),n}setFields(t,n){let r=this.clone();return r.fields=t,r._nodes=Gp(t,n),r._sortErrors=da(Object.keys(t)),n&&(r._excludedEdges=n),r}shape(t,n=[]){return this.clone().withMutation(r=>{let o=r._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),o=[...r._excludedEdges,...n]),r.setFields(Object.assign(r.fields,t),o)})}partial(){const t={};for(const[n,r]of Object.entries(this.fields))t[n]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(t)}deepPartial(){return rr(this)}pick(t){const n={};for(const r of t)this.fields[r]&&(n[r]=this.fields[r]);return this.setFields(n,this._excludedEdges.filter(([r,o])=>t.includes(r)&&t.includes(o)))}omit(t){const n=[];for(const r of Object.keys(this.fields))t.includes(r)||n.push(r);return this.pick(n)}from(t,n,r){let o=$t.getter(t,!0);return this.transform(i=>{if(!i)return i;let s=i;return Hp(i,t)&&(s=Object.assign({},i),r||delete s[t],s[n]=o(i)),s})}json(){return this.transform(pa)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Xn.exact,test(n){if(n==null)return!0;const r=ga(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=Xn.noUnknown){typeof t!="boolean"&&(n=t,t=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:n,test(o){if(o==null)return!0;const i=ga(this.schema,o);return!t||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=Xn.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>{if(!n)return n;const r={};for(const o of Object.keys(n))r[t(o)]=n[o];return r})}camelCase(){return this.transformKeys(vo.camelCase)}snakeCase(){return this.transformKeys(vo.snakeCase)}constantCase(){return this.transformKeys(t=>vo.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[i,s]of Object.entries(n.fields)){var o;let a=t;(o=a)!=null&&o.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[i]})),r.fields[i]=s.describe(a)}return r}}yn.prototype=$o.prototype;function ko(e){return new Mo(e)}class Mo extends $e{constructor(t){super({type:"array",spec:{types:t},check(n){return Array.isArray(n)}}),this.innerType=void 0,this.innerType=t}_cast(t,n){const r=super._cast(t,n);if(!this._typeCheck(r)||!this.innerType)return r;let o=!1;const i=r.map((s,a)=>{const l=this.innerType.cast(s,Object.assign({},n,{path:`${n.path||""}[${a}]`}));return l!==s&&(o=!0),l});return o?i:r}_validate(t,n={},r,o){var i;let s=this.innerType,a=(i=n.recursive)!=null?i:this.spec.recursive;n.originalValue!=null&&n.originalValue,super._validate(t,n,r,(l,u)=>{var d;if(!a||!s||!this._typeCheck(u)){o(l,u);return}let f=new Array(u.length);for(let y=0;y<u.length;y++){var p;f[y]=s.asNestedTest({options:n,index:y,parent:u,parentPath:n.path,originalParent:(p=n.originalValue)!=null?p:t})}this.runTests({value:u,tests:f,originalValue:(d=n.originalValue)!=null?d:t,options:n},r,y=>o(y.concat(l),u))})}clone(t){const n=super.clone(t);return n.innerType=this.innerType,n}json(){return this.transform(pa)}concat(t){let n=super.concat(t);return n.innerType=this.innerType,t.innerType&&(n.innerType=n.innerType?n.innerType.concat(t.innerType):t.innerType),n}of(t){let n=this.clone();if(!kt(t))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+Re(t));return n.innerType=t,n.spec=Object.assign({},n.spec,{types:t}),n}length(t,n=Zn.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n){return n=n||Zn.min,this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n){return n=n||Zn.max,this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}ensure(){return this.default(()=>[]).transform((t,n)=>this._typeCheck(t)?t:n==null?[]:[].concat(n))}compact(t){let n=t?(r,o,i)=>!t(r,o,i):r=>!!r;return this.transform(r=>r!=null?r.filter(n):r)}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);if(n.innerType){var o;let i=t;(o=i)!=null&&o.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[0]})),r.innerType=n.innerType.describe(i)}return r}}ko.prototype=Mo.prototype;function ma(e){return new Fo(e)}class Fo extends $e{constructor(t){super({type:"tuple",spec:{types:t},check(n){const r=this.spec.types;return Array.isArray(n)&&n.length===r.length}}),this.withMutation(()=>{this.typeError(aa.notType)})}_cast(t,n){const{types:r}=this.spec,o=super._cast(t,n);if(!this._typeCheck(o))return o;let i=!1;const s=r.map((a,l)=>{const u=a.cast(o[l],Object.assign({},n,{path:`${n.path||""}[${l}]`}));return u!==o[l]&&(i=!0),u});return i?s:o}_validate(t,n={},r,o){let i=this.spec.types;super._validate(t,n,r,(s,a)=>{var l;if(!this._typeCheck(a)){o(s,a);return}let u=[];for(let[f,p]of i.entries()){var d;u[f]=p.asNestedTest({options:n,index:f,parent:a,parentPath:n.path,originalParent:(d=n.originalValue)!=null?d:t})}this.runTests({value:a,tests:u,originalValue:(l=n.originalValue)!=null?l:t,options:n},r,f=>o(f.concat(s),a))})}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);return r.innerType=n.spec.types.map((o,i)=>{var s;let a=t;return(s=a)!=null&&s.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[i]})),o.describe(a)}),r}}ma.prototype=Fo.prototype;function qp(e){return new or(e)}function ya(e){try{return e()}catch(t){if(Ee.isError(t))return Promise.reject(t);throw t}}class or{constructor(t){this.type="lazy",this.__isYupSchema__=!0,this.spec=void 0,this._resolve=(n,r={})=>{let o=this.builder(n,r);if(!kt(o))throw new TypeError("lazy() functions must return a valid schema");return this.spec.optional&&(o=o.optional()),o.resolve(r)},this.builder=t,this.spec={meta:void 0,optional:!1}}clone(t){const n=new or(this.builder);return n.spec=Object.assign({},this.spec,t),n}optionality(t){return this.clone({optional:t})}optional(){return this.optionality(!0)}resolve(t){return this._resolve(t.value,t)}cast(t,n){return this._resolve(t,n).cast(t,n)}asNestedTest(t){let{key:n,index:r,parent:o,options:i}=t,s=o[r??n];return this._resolve(s,Object.assign({},i,{value:s,parent:o})).asNestedTest(t)}validate(t,n){return ya(()=>this._resolve(t,n).validate(t,n))}validateSync(t,n){return this._resolve(t,n).validateSync(t,n)}validateAt(t,n,r){return ya(()=>this._resolve(n,r).validateAt(t,n,r))}validateSyncAt(t,n,r){return this._resolve(n,r).validateSyncAt(t,n,r)}isValid(t,n){try{return this._resolve(t,n).isValid(t,n)}catch(r){if(Ee.isError(r))return Promise.resolve(!1);throw r}}isValidSync(t,n){return this._resolve(t,n).isValidSync(t,n)}describe(t){return t?this.resolve(t).describe(t):{type:"lazy",meta:this.spec.meta,label:void 0}}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}}function Jp(e){Object.keys(e).forEach(t=>{Object.keys(e[t]).forEach(n=>{la[t][n]=e[t][n]})})}function Kp(e,t,n){if(!e||!kt(e.prototype))throw new TypeError("You must provide a yup schema constructor function");if(typeof t!="string")throw new TypeError("A Method name must be provided");if(typeof n!="function")throw new TypeError("Method function must be provided");e.prototype[t]=n}const ba=Object.freeze(Object.defineProperty({__proto__:null,ArraySchema:Mo,BooleanSchema:Ao,DateSchema:Wt,LazySchema:or,MixedSchema:Co,NumberSchema:Po,ObjectSchema:$o,Schema:$e,StringSchema:Oo,TupleSchema:Fo,ValidationError:Ee,addMethod:Kp,array:ko,bool:Eo,boolean:Eo,date:Io,defaultLocale:la,getIn:_o,isSchema:kt,lazy:qp,mixed:tr,number:ca,object:yn,printValue:Re,reach:Pp,ref:Op,setLocale:Jp,string:nr,tuple:ma},Symbol.toStringTag,{value:"Module"})),Do=e=>{const t=e.reduce((n,r)=>{let{name:o,required:i,type:s}=r;switch(s){case"RelatedList":s="array";break;case"Integer":case"Float":s="number";break;case"Related":case"Geometry":case"Raw":s="mixed";break;default:s="string"}let a;try{i?a=ba[s]().typeError(`Field must be of type ${s}`).required("Field is required"):a=ba[s]().typeError(`Field must be of type ${s}`).nullable(!0)}catch(l){console.log(l)}return n[o]=a,n},{});return yn().shape(t)},va=e=>e?{...e,add:{columns:e.add_columns,title:e.add_title,schema:Do(e.add_columns),defaultValues:po(e.add_columns)},edit:{columns:e.edit_columns,title:e.edit_title,schema:Do(e.edit_columns),defaultValues:po(e.edit_columns)}}:null,Xp={columns:[],filters:[],page:0,page_size:25};function bn(e,t={}){return Object.entries(t).reduce((n,[r,o])=>o==null?(delete n[r],n):{...n,[r]:o},e||Xp)}const Ta=async(e,t,n)=>{const{fetchPath:r,options:o}=Ie({path:we(t,"/download"),method:"POST"}),i=await fetch(r,{...o,body:JSON.stringify(n)});let s=null;const a=i.headers.get("content-type");if(a&&a.includes("application/json")?s=await i.json():s=await i.blob(),!i.ok)throw typeof s=="object"?new Error(typeof s.detail=="string"?s.detail:JSON.stringify(s,null,2)):new Error(s);const l=document.createElement("a"),u=URL.createObjectURL(s);l.href=u,l.download=e.toLowerCase()+".csv",l.click()};function Sa({path:e,initialQueryParams:t,relation:n,fetchInfo:r=!0,clearInfoOnRefetch:o=!1,clearDataOnRefetch:i=!1,resetQueryParamsOnPathChange:s=!0,infoQueryProps:a,dataQueryProps:l,streaming:u=!1}){const[d,f]=v.useState(t?bn(null,t):null),p=v.useRef(e),y=v.useMemo(()=>(p.current=e,n?{...d,filters:[...d.filters,{col:n.foreign_key,opr:n.type,value:ze(n.id)}]}:d),[n,d]),b=v.useCallback(C=>f(M=>{if(typeof C=="function"&&(C=C(M)),!M)return bn(null,C);const N=bn({...M},C);if(C&&((C.filters||C.order_column||C.order_direction)&&!C.page&&(N.page=0),u)){if(C.page&&C.page!==M.page&&!C.streaming)throw new Error("You cannot change page in streaming mode, use streaming.fetch() instead");if(C.page_size&&C.page_size!==M.page_size)throw new Error("You cannot change page size in streaming mode, use streaming.fetch() instead")}return N}),[u]),[g,w]=v.useState(null),E=v.useMemo(()=>g,[g]),F=v.useCallback(()=>w(null),[]),{data:I,isFetching:A,refetch:_,error:x}=lt.useQuery({queryKey:[`info-${e}`],queryFn:({signal:C})=>Gs(we(e,"_info"),C).then(M=>({...va(M),path:e})),placeholderData:o?null:lt.keepPreviousData,enabled:r,retry:!1,refetchOnMount:!1,refetchOnReconnect:!1,refetchOnWindowFocus:!1,...a}),{data:k,isFetching:G,refetch:z,error:m}=lt.useQuery({queryKey:[`data-${p.current}`,JSON.stringify(y)],queryFn:({signal:C})=>y?Ys(we(p.current,"/"),y,C).then(M=>({...M,result:M.result.map((N,W)=>({...N,id:M.ids[W]})),path:p.current})):null,placeholderData:i?null:lt.keepPreviousData,retry:!1,...l});v.useEffect(()=>{if(x){w({message:"Couldn't fetch info",originalError:x});return}if(m){w({message:"Couldn't fetch list",originalError:m});return}F()},[x,m,F]);const P=v.useMemo(()=>A||G,[A,G]);ye.useDidUpdate(()=>{if(!s)return;const C=bn(null,t);d!=null&&d.page_size&&(C.page_size=d.page_size),b(C)},[e]);const L=v.useCallback(async C=>{try{const M=await Hs(e,ze(C));return F(),M}catch(M){w({message:`Couldn't fetch item with id ${C}`,originalError:M})}},[e,F]),Y=v.useCallback(async(C,M)=>{try{const N=await Vs(e,C);return M||(_(),z()),F(),N}catch(N){w({message:"Couldn't add item",originalError:N})}},[z,_,e,F]),q=v.useCallback(async(C,M,N)=>{try{const W=await qs(e,ze(C),M);return N||(_(),z()),F(),W}catch(W){w({message:`Couldn't update item with id ${C}`,originalError:W})}},[z,_,e,F]),re=v.useCallback(async(C,M)=>{try{const N=await Ws(e,ze(C));return M||(_(),z()),F(),N}catch(N){w({message:`Couldn't delete item with id ${C}`,originalError:N})}},[z,_,e,F]),oe=v.useCallback(async C=>{try{await Ta(C,e,y)}catch(M){w({message:"Couldn't download",originalError:M})}},[e,y]),[he,le]=ye.useSetState({data:{},isEnd:!1,fetch:()=>null});v.useEffect(()=>{u&&le({fetch:()=>b({page:0,streaming:!0})})},[b,le,u]),v.useEffect(()=>{u&&k&&le(C=>{let M=Object.keys(C.data).length;const N={isEnd:!1};return y.page<M?(M=y.page,N.data={[y.page]:k.result}):N.data={...C.data,[y.page]:k.result},k.result.length<y.page_size?(N.isEnd=!0,N.fetch=()=>null):N.fetch=()=>b({page:M+1,streaming:!0}),N})},[k,b,le,u]);const xe=v.useMemo(()=>{const C={all:"all",actions:"actions"};return k==null||k.list_columns.forEach(M=>{C[M]&&(C[M]=`_${M}`)}),C},[k==null?void 0:k.list_columns]),$=v.useCallback(()=>y?z():b(),[z,y,b]);return{path:e,data:k,info:I,queryParams:y,loading:P,error:E,streaming:he,specialKey:xe,setQueryParams:b,refetch:$,refetchInfo:_,getEntry:L,addEntry:Y,updateEntry:q,deleteEntry:re,download:oe}}const wa=({path:e,refetch:t})=>{const[n,r]=v.useState([]),[o,i]=v.useState(null),s=v.useCallback(async(l,u)=>{try{i(null);const d=await Js(e,l,n);return u||t(),d}catch(d){console.error(d),i({message:"Couldn't perform bulk action",originalError:d})}},[e,t,n]);return{bulkActions:v.useMemo(()=>({selectedIds:n,setSelectedIds:r}),[n,r]),dispatchBulkActions:s,error:o}},_e={NORMAL:"normal",FULL_SCREEN:"fullScreen",OVERLAY:"overlay"},No=()=>{const[e]=v.useState(()=>Es.create(t=>({opened:!1,setOpened:n=>t({opened:n}),view:_e.NORMAL,setView:n=>t({view:n}),state:Yn,setState:n=>t({state:n}),reset:()=>t({state:Yn}),item:void 0,itemLoading:!1,setItem:n=>t({item:n,itemLoading:!1}),setItemLoading:n=>t({itemLoading:n})})));return e};function _a({resource_name:e="",initialQueryParams:t,relation:n,fetchInfo:r,clearInfoOnRefetch:o,clearDataOnRefetch:i,resetQueryParamsOnPathChange:s,infoQueryProps:a,dataQueryProps:l,children:u,streaming:d}){const{baseUrl:f}=$s(),p=Sa({path:we(f,e),initialQueryParams:t,relation:n,fetchInfo:r,clearInfoOnRefetch:o,clearDataOnRefetch:i,resetQueryParamsOnPathChange:s,infoQueryProps:a,dataQueryProps:l,streaming:d}),y=mn(p),b=wa(y),g=mn(b),w=No(),[E]=v.useState(()=>Hn(w)),F=No(),[I]=v.useState(()=>Hn(F));return c.jsx(to.Provider,{value:y,children:c.jsx(co.Provider,{value:g,children:c.jsx(uo.Provider,{value:E,children:c.jsx(fo.Provider,{value:I,children:u})})})})}/**
3
+ attempted value: ${u}
4
+ `+(c!==u?`result of cast: ${c}`:""))}return a}_cast(t,n){let o=t===void 0?t:this.transforms.reduce((s,a)=>a.call(this,s,t,this),t);return o===void 0&&(o=this.getDefault(n)),o}_validate(t,n={},o,s){let{path:a,originalValue:u=t,strict:c=this.spec.strict}=n,d=t;c||(d=this._cast(d,Object.assign({assert:!1},n)));let h=[];for(let y of Object.values(this.internalTests))y&&h.push(y);this.runTests({path:a,value:d,originalValue:u,options:n,tests:h},o,y=>{if(y.length)return s(y,d);this.runTests({path:a,value:d,originalValue:u,options:n,tests:this.tests},o,s)})}runTests(t,n,o){let s=!1,{tests:a,value:u,originalValue:c,path:d,options:h}=t,y=w=>{s||(s=!0,n(w,u))},g=w=>{s||(s=!0,o(w,u))},b=a.length,C=[];if(!b)return g([]);let E={value:u,originalValue:c,path:d,options:h,schema:this};for(let w=0;w<a.length;w++){const $=a[w];$(E,y,function(J){J&&(Array.isArray(J)?C.push(...J):C.push(J)),--b<=0&&g(C)})}}asNestedTest({key:t,index:n,parent:o,parentPath:s,originalParent:a,options:u}){const c=t??n;if(c==null)throw TypeError("Must include `key` or `index` for nested validations");const d=typeof c=="number";let h=o[c];const y=Object.assign({},u,{strict:!0,parent:o,value:h,originalValue:a[c],key:void 0,[d?"index":"key"]:c,path:d||c.includes(".")?`${s||""}[${d?c:`"${c}"`}]`:(s?`${s}.`:"")+t});return(g,b,C)=>this.resolve(y)._validate(h,y,b,C)}validate(t,n){var o;let s=this.resolve(Object.assign({},n,{value:t})),a=(o=n==null?void 0:n.disableStackTrace)!=null?o:s.spec.disableStackTrace;return new Promise((u,c)=>s._validate(t,n,(d,h)=>{_t.isError(d)&&(d.value=h),c(d)},(d,h)=>{d.length?c(new _t(d,h,void 0,void 0,a)):u(h)}))}validateSync(t,n){var o;let s=this.resolve(Object.assign({},n,{value:t})),a,u=(o=n==null?void 0:n.disableStackTrace)!=null?o:s.spec.disableStackTrace;return s._validate(t,Object.assign({},n,{sync:!0}),(c,d)=>{throw _t.isError(c)&&(c.value=d),c},(c,d)=>{if(c.length)throw new _t(c,t,void 0,void 0,u);a=d}),a}isValid(t,n){return this.validate(t,n).then(()=>!0,o=>{if(_t.isError(o))return!1;throw o})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(o){if(_t.isError(o))return!1;throw o}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):ii(n)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,n){const o=this.clone({nullable:t});return o.internalTests.nullable=ri({message:n,name:"nullable",test(s){return s===null?this.schema.spec.nullable:!0}}),o}optionality(t,n){const o=this.clone({optional:t});return o.internalTests.optionality=ri({message:n,name:"optionality",test(s){return s===void 0?this.schema.spec.optional:!0}}),o}optional(){return this.optionality(!0)}defined(t=On.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=On.notNull){return this.nullability(!1,t)}required(t=On.required){return this.clone().withMutation(n=>n.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let n=this.clone();return n.transforms.push(t),n}test(...t){let n;if(t.length===1?typeof t[0]=="function"?n={test:t[0]}:n=t[0]:t.length===2?n={name:t[0],test:t[1]}:n={name:t[0],message:t[1],test:t[2]},n.message===void 0&&(n.message=On.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let o=this.clone(),s=ri(n),a=n.exclusive||n.name&&o.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(o.exclusiveTests[n.name]=!!n.exclusive),o.tests=o.tests.filter(u=>!(u.OPTIONS.name===n.name&&(a||u.OPTIONS.test===s.OPTIONS.test))),o.tests.push(s),o}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let o=this.clone(),s=Kf(t).map(a=>new or(a));return s.forEach(a=>{a.isSibling&&o.deps.push(a.key)}),o.conditions.push(typeof n=="function"?new Ro(s,n):Ro.fromOptions(s,n)),o}typeError(t){let n=this.clone();return n.internalTests.typeError=ri({message:t,name:"typeError",skipAbsent:!0,test(o){return this.schema._typeCheck(o)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(t,n=On.oneOf){let o=this.clone();return t.forEach(s=>{o._whitelist.add(s),o._blacklist.delete(s)}),o.internalTests.whiteList=ri({message:n,name:"oneOf",skipAbsent:!0,test(s){let a=this.schema._whitelist,u=a.resolveAll(this.resolve);return u.includes(s)?!0:this.createError({params:{values:Array.from(a).join(", "),resolved:u}})}}),o}notOneOf(t,n=On.notOneOf){let o=this.clone();return t.forEach(s=>{o._blacklist.add(s),o._whitelist.delete(s)}),o.internalTests.blacklist=ri({message:n,name:"notOneOf",test(s){let a=this.schema._blacklist,u=a.resolveAll(this.resolve);return u.includes(s)?this.createError({params:{values:Array.from(a).join(", "),resolved:u}}):!0}}),o}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:o,meta:s,optional:a,nullable:u}=n.spec;return{meta:s,label:o,optional:a,nullable:u,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(d=>({name:d.OPTIONS.name,params:d.OPTIONS.params})).filter((d,h,y)=>y.findIndex(g=>g.name===d.name)===h)}}}Ot.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Ot.prototype[`${e}At`]=function(t,n,o={}){const{parent:s,parentPath:a,schema:u}=al(this,t,n,o.context);return u[e](s&&s[a],Object.assign({},o,{parent:s,path:t}))};for(const e of["equals","is"])Ot.prototype[e]=Ot.prototype.oneOf;for(const e of["not","nope"])Ot.prototype[e]=Ot.prototype.notOneOf;const Eb=()=>!0;function Jo(e){return new ll(e)}class ll extends Ot{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:Eb},t))}}Jo.prototype=ll.prototype;function ul(){return new cl}class cl extends Ot{constructor(){super({type:"boolean",check(t){return t instanceof Boolean&&(t=t.valueOf()),typeof t=="boolean"}}),this.withMutation(()=>{this.transform((t,n,o)=>{if(o.spec.coerce&&!o.isType(t)){if(/^(true|1)$/i.test(String(t)))return!0;if(/^(false|0)$/i.test(String(t)))return!1}return t})})}isTrue(t=sl.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(n){return vn(n)||n===!0}})}isFalse(t=sl.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(n){return vn(n)||n===!1}})}default(t){return super.default(t)}defined(t){return super.defined(t)}optional(){return super.optional()}required(t){return super.required(t)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(t){return super.nonNullable(t)}strip(t){return super.strip(t)}}ul.prototype=cl.prototype;const xb=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function Ab(e){const t=fl(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(n=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}function fl(e){var t,n;const o=xb.exec(e);return o?{year:jn(o[1]),month:jn(o[2],1)-1,day:jn(o[3],1),hour:jn(o[4]),minute:jn(o[5]),second:jn(o[6]),millisecond:o[7]?jn(o[7].substring(0,3)):0,precision:(t=(n=o[7])==null?void 0:n.length)!=null?t:void 0,z:o[8]||void 0,plusMinus:o[9]||void 0,hourOffset:jn(o[10]),minuteOffset:jn(o[11])}:null}function jn(e,t=0){return Number(e)||t}let Ob=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Ib=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,Pb=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,$b="^\\d{4}-\\d{2}-\\d{2}",Mb="\\d{2}:\\d{2}:\\d{2}",Fb="(([+-]\\d{2}(:?\\d{2})?)|Z)",Db=new RegExp(`${$b}T${Mb}(\\.\\d+)?${Fb}$`),kb=e=>vn(e)||e===e.trim(),Nb={}.toString();function Zo(){return new dl}class dl extends Ot{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,n,o)=>{if(!o.spec.coerce||o.isType(t)||Array.isArray(t))return t;const s=t!=null&&t.toString?t.toString():t;return s===Nb?t:s})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||On.required,name:"required",skipAbsent:!0,test:o=>!!o.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(n=>n.OPTIONS.name!=="required"),t))}length(t,n=jt.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(o){return o.length===this.resolve(t)}})}min(t,n=jt.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o.length>=this.resolve(t)}})}max(t,n=jt.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:t},skipAbsent:!0,test(o){return o.length<=this.resolve(t)}})}matches(t,n){let o=!1,s,a;return n&&(typeof n=="object"?{excludeEmptyString:o=!1,message:s,name:a}=n:s=n),this.test({name:a||"matches",message:s||jt.matches,params:{regex:t},skipAbsent:!0,test:u=>u===""&&o||u.search(t)!==-1})}email(t=jt.email){return this.matches(Ob,{name:"email",message:t,excludeEmptyString:!0})}url(t=jt.url){return this.matches(Ib,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=jt.uuid){return this.matches(Pb,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let n="",o,s;return t&&(typeof t=="object"?{message:n="",allowOffset:o=!1,precision:s=void 0}=t:n=t),this.matches(Db,{name:"datetime",message:n||jt.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||jt.datetime_offset,params:{allowOffset:o},skipAbsent:!0,test:a=>{if(!a||o)return!0;const u=fl(a);return u?!!u.z:!1}}).test({name:"datetime_precision",message:n||jt.datetime_precision,params:{precision:s},skipAbsent:!0,test:a=>{if(!a||s==null)return!0;const u=fl(a);return u?u.precision===s:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=jt.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:kb})}lowercase(t=jt.lowercase){return this.transform(n=>vn(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>vn(n)||n===n.toLowerCase()})}uppercase(t=jt.uppercase){return this.transform(n=>vn(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>vn(n)||n===n.toUpperCase()})}}Zo.prototype=dl.prototype;let Lb=e=>e!=+e;function nd(){return new pl}class pl extends Ot{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!Lb(t)}}),this.withMutation(()=>{this.transform((t,n,o)=>{if(!o.spec.coerce)return t;let s=t;if(typeof s=="string"){if(s=s.replace(/\s/g,""),s==="")return NaN;s=+s}return o.isType(s)||s===null?s:parseFloat(s)})})}min(t,n=ir.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o>=this.resolve(t)}})}max(t,n=ir.max){return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(o){return o<=this.resolve(t)}})}lessThan(t,n=ir.lessThan){return this.test({message:n,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(o){return o<this.resolve(t)}})}moreThan(t,n=ir.moreThan){return this.test({message:n,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(o){return o>this.resolve(t)}})}positive(t=ir.positive){return this.moreThan(0,t)}negative(t=ir.negative){return this.lessThan(0,t)}integer(t=ir.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:n=>Number.isInteger(n)})}truncate(){return this.transform(t=>vn(t)?t:t|0)}round(t){var n;let o=["ceil","floor","round","trunc"];if(t=((n=t)==null?void 0:n.toLowerCase())||"round",t==="trunc")return this.truncate();if(o.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+o.join(", "));return this.transform(s=>vn(s)?s:Math[t](s))}}nd.prototype=pl.prototype;let rd=new Date(""),Bb=e=>Object.prototype.toString.call(e)==="[object Date]";function hl(){return new oi}class oi extends Ot{constructor(){super({type:"date",check(t){return Bb(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,o)=>!o.spec.coerce||o.isType(t)||t===null?t:(t=Ab(t),isNaN(t)?oi.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let o;if(or.isRef(t))o=t;else{let s=this.cast(t);if(!this._typeCheck(s))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);o=s}return o}min(t,n=ol.min){let o=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(s){return s>=this.resolve(o)}})}max(t,n=ol.max){let o=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(s){return s<=this.resolve(o)}})}}oi.INVALID_DATE=rd,hl.prototype=oi.prototype,hl.INVALID_DATE=rd;function zb(e,t=[]){let n=[],o=new Set,s=new Set(t.map(([u,c])=>`${u}-${c}`));function a(u,c){let d=$r.split(u)[0];o.add(d),s.has(`${c}-${d}`)||n.push([c,d])}for(const u of Object.keys(e)){let c=e[u];o.add(u),or.isRef(c)&&c.isSibling?a(c.path,u):Mr(c)&&"deps"in c&&c.deps.forEach(d=>a(d,u))}return gb.array(Array.from(o),n).reverse()}function id(e,t){let n=1/0;return e.some((o,s)=>{var a;if((a=t.path)!=null&&a.includes(o))return n=s,!0}),n}function od(e){return(t,n)=>id(e,t)-id(e,n)}const sd=(e,t,n)=>{if(typeof e!="string")return e;let o=e;try{o=JSON.parse(e)}catch{}return n.isType(o)?o:e};function Xo(e){if("fields"in e){const t={};for(const[n,o]of Object.entries(e.fields))t[n]=Xo(o);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Xo(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Xo)}):"optional"in e?e.optional():e}const Ub=(e,t)=>{const n=[...$r.normalizePath(t)];if(n.length===1)return n[0]in e;let o=n.pop(),s=$r.getter($r.join(n),!0)(e);return!!(s&&o in s)};let ad=e=>Object.prototype.toString.call(e)==="[object Object]";function ld(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(o=>n.indexOf(o)===-1)}const jb=od([]);function Ki(e){return new gl(e)}class gl extends Ot{constructor(t){super({type:"object",check(n){return ad(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=jb,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,n={}){var o;let s=super._cast(t,n);if(s===void 0)return this.getDefault(n);if(!this._typeCheck(s))return s;let a=this.fields,u=(o=n.stripUnknown)!=null?o:this.spec.noUnknown,c=[].concat(this._nodes,Object.keys(s).filter(g=>!this._nodes.includes(g))),d={},h=Object.assign({},n,{parent:d,__validating:n.__validating||!1}),y=!1;for(const g of c){let b=a[g],C=g in s;if(b){let E,w=s[g];h.path=(n.path?`${n.path}.`:"")+g,b=b.resolve({value:w,context:n.context,parent:d});let $=b instanceof Ot?b.spec:void 0,N=$==null?void 0:$.strict;if($!=null&&$.strip){y=y||g in s;continue}E=!n.__validating||!N?b.cast(s[g],h):s[g],E!==void 0&&(d[g]=E)}else C&&!u&&(d[g]=s[g]);(C!==g in d||d[g]!==s[g])&&(y=!0)}return y?d:s}_validate(t,n={},o,s){let{from:a=[],originalValue:u=t,recursive:c=this.spec.recursive}=n;n.from=[{schema:this,value:u},...a],n.__validating=!0,n.originalValue=u,super._validate(t,n,o,(d,h)=>{if(!c||!ad(h)){s(d,h);return}u=u||h;let y=[];for(let g of this._nodes){let b=this.fields[g];!b||or.isRef(b)||y.push(b.asNestedTest({options:n,key:g,parent:h,parentPath:n.path,originalParent:u}))}this.runTests({tests:y,value:h,originalValue:u,options:n},o,g=>{s(g.sort(this._sortErrors).concat(d),h)})})}clone(t){const n=super.clone(t);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(t){let n=super.concat(t),o=n.fields;for(let[s,a]of Object.entries(this.fields)){const u=o[s];o[s]=u===void 0?a:u}return n.withMutation(s=>s.setFields(o,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let n={};return this._nodes.forEach(o=>{var s;const a=this.fields[o];let u=t;(s=u)!=null&&s.value&&(u=Object.assign({},u,{parent:u.value,value:u.value[o]})),n[o]=a&&"getDefault"in a?a.getDefault(u):void 0}),n}setFields(t,n){let o=this.clone();return o.fields=t,o._nodes=zb(t,n),o._sortErrors=od(Object.keys(t)),n&&(o._excludedEdges=n),o}shape(t,n=[]){return this.clone().withMutation(o=>{let s=o._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),s=[...o._excludedEdges,...n]),o.setFields(Object.assign(o.fields,t),s)})}partial(){const t={};for(const[n,o]of Object.entries(this.fields))t[n]="optional"in o&&o.optional instanceof Function?o.optional():o;return this.setFields(t)}deepPartial(){return Xo(this)}pick(t){const n={};for(const o of t)this.fields[o]&&(n[o]=this.fields[o]);return this.setFields(n,this._excludedEdges.filter(([o,s])=>t.includes(o)&&t.includes(s)))}omit(t){const n=[];for(const o of Object.keys(this.fields))t.includes(o)||n.push(o);return this.pick(n)}from(t,n,o){let s=$r.getter(t,!0);return this.transform(a=>{if(!a)return a;let u=a;return Ub(a,t)&&(u=Object.assign({},a),o||delete u[t],u[n]=s(a)),u})}json(){return this.transform(sd)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Ho.exact,test(n){if(n==null)return!0;const o=ld(this.schema,n);return o.length===0||this.createError({params:{properties:o.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=Ho.noUnknown){typeof t!="boolean"&&(n=t,t=!0);let o=this.test({name:"noUnknown",exclusive:!0,message:n,test(s){if(s==null)return!0;const a=ld(this.schema,s);return!t||a.length===0||this.createError({params:{unknown:a.join(", ")}})}});return o.spec.noUnknown=t,o}unknown(t=!0,n=Ho.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>{if(!n)return n;const o={};for(const s of Object.keys(n))o[t(s)]=n[s];return o})}camelCase(){return this.transformKeys(rl.camelCase)}snakeCase(){return this.transformKeys(rl.snakeCase)}constantCase(){return this.transformKeys(t=>rl.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),o=super.describe(t);o.fields={};for(const[a,u]of Object.entries(n.fields)){var s;let c=t;(s=c)!=null&&s.value&&(c=Object.assign({},c,{parent:c.value,value:c.value[a]})),o.fields[a]=u.describe(c)}return o}}Ki.prototype=gl.prototype;function ml(e){return new yl(e)}class yl extends Ot{constructor(t){super({type:"array",spec:{types:t},check(n){return Array.isArray(n)}}),this.innerType=void 0,this.innerType=t}_cast(t,n){const o=super._cast(t,n);if(!this._typeCheck(o)||!this.innerType)return o;let s=!1;const a=o.map((u,c)=>{const d=this.innerType.cast(u,Object.assign({},n,{path:`${n.path||""}[${c}]`}));return d!==u&&(s=!0),d});return s?a:o}_validate(t,n={},o,s){var a;let u=this.innerType,c=(a=n.recursive)!=null?a:this.spec.recursive;n.originalValue!=null&&n.originalValue,super._validate(t,n,o,(d,h)=>{var y;if(!c||!u||!this._typeCheck(h)){s(d,h);return}let g=new Array(h.length);for(let C=0;C<h.length;C++){var b;g[C]=u.asNestedTest({options:n,index:C,parent:h,parentPath:n.path,originalParent:(b=n.originalValue)!=null?b:t})}this.runTests({value:h,tests:g,originalValue:(y=n.originalValue)!=null?y:t,options:n},o,C=>s(C.concat(d),h))})}clone(t){const n=super.clone(t);return n.innerType=this.innerType,n}json(){return this.transform(sd)}concat(t){let n=super.concat(t);return n.innerType=this.innerType,t.innerType&&(n.innerType=n.innerType?n.innerType.concat(t.innerType):t.innerType),n}of(t){let n=this.clone();if(!Mr(t))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+An(t));return n.innerType=t,n.spec=Object.assign({},n.spec,{types:t}),n}length(t,n=Yo.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(o){return o.length===this.resolve(t)}})}min(t,n){return n=n||Yo.min,this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o.length>=this.resolve(t)}})}max(t,n){return n=n||Yo.max,this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(o){return o.length<=this.resolve(t)}})}ensure(){return this.default(()=>[]).transform((t,n)=>this._typeCheck(t)?t:n==null?[]:[].concat(n))}compact(t){let n=t?(o,s,a)=>!t(o,s,a):o=>!!o;return this.transform(o=>o!=null?o.filter(n):o)}describe(t){const n=(t?this.resolve(t):this).clone(),o=super.describe(t);if(n.innerType){var s;let a=t;(s=a)!=null&&s.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[0]})),o.innerType=n.innerType.describe(a)}return o}}ml.prototype=yl.prototype;function ud(e){return new vl(e)}class vl extends Ot{constructor(t){super({type:"tuple",spec:{types:t},check(n){const o=this.spec.types;return Array.isArray(n)&&n.length===o.length}}),this.withMutation(()=>{this.typeError(ed.notType)})}_cast(t,n){const{types:o}=this.spec,s=super._cast(t,n);if(!this._typeCheck(s))return s;let a=!1;const u=o.map((c,d)=>{const h=c.cast(s[d],Object.assign({},n,{path:`${n.path||""}[${d}]`}));return h!==s[d]&&(a=!0),h});return a?u:s}_validate(t,n={},o,s){let a=this.spec.types;super._validate(t,n,o,(u,c)=>{var d;if(!this._typeCheck(c)){s(u,c);return}let h=[];for(let[g,b]of a.entries()){var y;h[g]=b.asNestedTest({options:n,index:g,parent:c,parentPath:n.path,originalParent:(y=n.originalValue)!=null?y:t})}this.runTests({value:c,tests:h,originalValue:(d=n.originalValue)!=null?d:t,options:n},o,g=>s(g.concat(u),c))})}describe(t){const n=(t?this.resolve(t):this).clone(),o=super.describe(t);return o.innerType=n.spec.types.map((s,a)=>{var u;let c=t;return(u=c)!=null&&u.value&&(c=Object.assign({},c,{parent:c.value,value:c.value[a]})),s.describe(c)}),o}}ud.prototype=vl.prototype;function Wb(e){return new Qo(e)}function cd(e){try{return e()}catch(t){if(_t.isError(t))return Promise.reject(t);throw t}}class Qo{constructor(t){this.type="lazy",this.__isYupSchema__=!0,this.spec=void 0,this._resolve=(n,o={})=>{let s=this.builder(n,o);if(!Mr(s))throw new TypeError("lazy() functions must return a valid schema");return this.spec.optional&&(s=s.optional()),s.resolve(o)},this.builder=t,this.spec={meta:void 0,optional:!1}}clone(t){const n=new Qo(this.builder);return n.spec=Object.assign({},this.spec,t),n}optionality(t){return this.clone({optional:t})}optional(){return this.optionality(!0)}resolve(t){return this._resolve(t.value,t)}cast(t,n){return this._resolve(t,n).cast(t,n)}asNestedTest(t){let{key:n,index:o,parent:s,options:a}=t,u=s[o??n];return this._resolve(u,Object.assign({},a,{value:u,parent:s})).asNestedTest(t)}validate(t,n){return cd(()=>this._resolve(t,n).validate(t,n))}validateSync(t,n){return this._resolve(t,n).validateSync(t,n)}validateAt(t,n,o){return cd(()=>this._resolve(n,o).validateAt(t,n,o))}validateSyncAt(t,n,o){return this._resolve(n,o).validateSyncAt(t,n,o)}isValid(t,n){try{return this._resolve(t,n).isValid(t,n)}catch(o){if(_t.isError(o))return Promise.resolve(!1);throw o}}isValidSync(t,n){return this._resolve(t,n).isValidSync(t,n)}describe(t){return t?this.resolve(t).describe(t):{type:"lazy",meta:this.spec.meta,label:void 0}}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}}function Vb(e){Object.keys(e).forEach(t=>{Object.keys(e[t]).forEach(n=>{td[t][n]=e[t][n]})})}function Gb(e,t,n){if(!e||!Mr(e.prototype))throw new TypeError("You must provide a yup schema constructor function");if(typeof t!="string")throw new TypeError("A Method name must be provided");if(typeof n!="function")throw new TypeError("Method function must be provided");e.prototype[t]=n}const fd=Object.freeze(Object.defineProperty({__proto__:null,ArraySchema:yl,BooleanSchema:cl,DateSchema:oi,LazySchema:Qo,MixedSchema:ll,NumberSchema:pl,ObjectSchema:gl,Schema:Ot,StringSchema:dl,TupleSchema:vl,ValidationError:_t,addMethod:Gb,array:ml,bool:ul,boolean:ul,date:hl,defaultLocale:td,getIn:al,isSchema:Mr,lazy:Wb,mixed:Jo,number:nd,object:Ki,printValue:An,reach:Cb,ref:Sb,setLocale:Vb,string:Zo,tuple:ud},Symbol.toStringTag,{value:"Module"})),bl=e=>{const t=e.reduce((n,o)=>{let{name:s,required:a,type:u}=o;switch(u){case"RelatedList":u="array";break;case"Integer":case"Float":u="number";break;case"Related":case"Geometry":case"Raw":u="mixed";break;default:u="string"}let c;try{a?c=fd[u]().typeError(`Field must be of type ${u}`).required("Field is required"):c=fd[u]().typeError(`Field must be of type ${u}`).nullable(!0)}catch(d){console.log(d)}return n[s]=c,n},{});return Ki().shape(t)},dd=e=>e?{...e,add:{columns:e.add_columns,title:e.add_title,schema:bl(e.add_columns),defaultValues:Za(e.add_columns)},edit:{columns:e.edit_columns,title:e.edit_title,schema:bl(e.edit_columns),defaultValues:Za(e.edit_columns)}}:null,Hb={columns:[],filters:[],page:0,page_size:25};function Ji(e,t={}){return Object.entries(t).reduce((n,[o,s])=>s==null?(delete n[o],n):{...n,[o]:s},e||Hb)}const pd=async(e,t,n)=>{const{fetchPath:o,options:s}=At({path:dt(t,"/download"),method:"POST"}),a=await fetch(o,{...s,body:JSON.stringify(n)});let u=null;const c=a.headers.get("content-type");if(c&&c.includes("application/json")?u=await a.json():u=await a.blob(),!a.ok)throw typeof u=="object"?new Error(typeof u.detail=="string"?u.detail:JSON.stringify(u,null,2)):new Error(u);const d=document.createElement("a"),h=URL.createObjectURL(u);d.href=h,d.download=e.toLowerCase()+".csv",d.click()};function hd({path:e,initialQueryParams:t,relation:n,fetchInfo:o=!0,clearInfoOnRefetch:s=!1,clearDataOnRefetch:a=!1,resetQueryParamsOnPathChange:u=!0,infoQueryProps:c,dataQueryProps:d,streaming:h=!1}){const[y,g]=A.useState(t?Ji(null,t):null),b=A.useRef(e),C=A.useMemo(()=>(b.current=e,n?{...y,filters:[...y.filters,{col:n.foreign_key,opr:n.type,value:Ut(n.id)}]}:y),[n,y]),E=A.useCallback(k=>g(K=>{if(typeof k=="function"&&(k=k(K)),!K)return Ji(null,k);const X=Ji({...K},k);if(k&&((k.filters||k.order_column||k.order_direction)&&!k.page&&(X.page=0),h)){if(k.page&&k.page!==K.page&&!k.streaming)throw new Error("You cannot change page in streaming mode, use streaming.fetch() instead");if(k.page_size&&k.page_size!==K.page_size)throw new Error("You cannot change page size in streaming mode, use streaming.fetch() instead")}return X}),[h]),[w,$]=A.useState(null),N=A.useMemo(()=>w,[w]),J=A.useCallback(()=>$(null),[]),{data:V,isFetching:L,refetch:D,error:B}=Ln.useQuery({queryKey:[`info-${e}`],queryFn:({signal:k})=>Lf(dt(e,"_info"),k).then(K=>({...dd(K),path:e})),placeholderData:s?null:Ln.keepPreviousData,enabled:o,retry:!1,refetchOnMount:!1,refetchOnReconnect:!1,refetchOnWindowFocus:!1,...c}),{data:Y,isFetching:ae,refetch:te,error:S}=Ln.useQuery({queryKey:[`data-${b.current}`,JSON.stringify(C)],queryFn:({signal:k})=>C?zf(dt(b.current,"/"),C,k).then(K=>({...K,result:K.result.map((X,ue)=>({...X,id:K.ids[ue]})),path:b.current})):null,placeholderData:a?null:Ln.keepPreviousData,retry:!1,...d});A.useEffect(()=>{if(B){$({message:"Couldn't fetch info",originalError:B});return}if(S){$({message:"Couldn't fetch list",originalError:S});return}J()},[B,S,J]);const W=A.useMemo(()=>L||ae,[L,ae]);rt.useDidUpdate(()=>{if(!u)return;const k=Ji(null,t);y!=null&&y.page_size&&(k.page_size=y.page_size),E(k)},[e]);const Q=A.useCallback(async k=>{try{const K=await Bf(e,Ut(k));return J(),K}catch(K){$({message:`Couldn't fetch item with id ${k}`,originalError:K})}},[e,J]),fe=A.useCallback(async(k,K)=>{try{const X=await kf(e,k);return K||(D(),te()),J(),X}catch(X){$({message:"Couldn't add item",originalError:X})}},[te,D,e,J]),he=A.useCallback(async(k,K,X)=>{try{const ue=await Uf(e,Ut(k),K);return X||(D(),te()),J(),ue}catch(ue){$({message:`Couldn't update item with id ${k}`,originalError:ue})}},[te,D,e,J]),Fe=A.useCallback(async(k,K)=>{try{const X=await Nf(e,Ut(k));return K||(D(),te()),J(),X}catch(X){$({message:`Couldn't delete item with id ${k}`,originalError:X})}},[te,D,e,J]),De=A.useCallback(async k=>{try{await pd(k,e,C)}catch(K){$({message:"Couldn't download",originalError:K})}},[e,C]),[Ue,Ie]=rt.useSetState({data:{},isEnd:!1,fetch:()=>null});A.useEffect(()=>{h&&Ie({fetch:()=>E({page:0,streaming:!0})})},[E,Ie,h]),A.useEffect(()=>{h&&Y&&Ie(k=>{let K=Object.keys(k.data).length;const X={isEnd:!1};return C.page<K?(K=C.page,X.data={[C.page]:Y.result}):X.data={...k.data,[C.page]:Y.result},Y.result.length<C.page_size?(X.isEnd=!0,X.fetch=()=>null):X.fetch=()=>E({page:K+1,streaming:!0}),X})},[Y,E,Ie,h]);const pt=A.useMemo(()=>{const k={all:"all",actions:"actions"};return Y==null||Y.list_columns.forEach(K=>{k[K]&&(k[K]=`_${K}`)}),k},[Y==null?void 0:Y.list_columns]),R=A.useCallback(()=>C?te():E(),[te,C,E]);return{path:e,data:Y,info:V,queryParams:C,loading:W,error:N,streaming:Ue,specialKey:pt,setQueryParams:E,refetch:R,refetchInfo:D,getEntry:Q,addEntry:fe,updateEntry:he,deleteEntry:Fe,download:De}}const gd=({path:e,refetch:t})=>{const[n,o]=A.useState([]),[s,a]=A.useState(null),u=A.useCallback(async(d,h)=>{try{a(null);const y=await jf(e,d,n);return h||t(),y}catch(y){console.error(y),a({message:"Couldn't perform bulk action",originalError:y})}},[e,t,n]);return{bulkActions:A.useMemo(()=>({selectedIds:n,setSelectedIds:o}),[n,o]),dispatchBulkActions:u,error:s}},gt={NORMAL:"normal",FULL_SCREEN:"fullScreen",OVERLAY:"overlay"},_l=()=>{const[e]=A.useState(()=>vf.create(t=>({opened:!1,setOpened:n=>t({opened:n}),view:gt.NORMAL,setView:n=>t({view:n}),state:Wo,setState:n=>t({state:n}),reset:()=>t({state:Wo}),item:void 0,itemLoading:!1,setItem:n=>t({item:n,itemLoading:!1}),setItemLoading:n=>t({itemLoading:n})})));return e};function md({resource_name:e="",initialQueryParams:t,relation:n,fetchInfo:o,clearInfoOnRefetch:s,clearDataOnRefetch:a,resetQueryParamsOnPathChange:u,infoQueryProps:c,dataQueryProps:d,children:h,streaming:y}){const{baseUrl:g}=Cf(),b=hd({path:dt(g,e),initialQueryParams:t,relation:n,fetchInfo:o,clearInfoOnRefetch:s,clearDataOnRefetch:a,resetQueryParamsOnPathChange:u,infoQueryProps:c,dataQueryProps:d,streaming:y}),C=qi(b),E=gd(C),w=qi(E),$=_l(),[N]=A.useState(()=>jo($)),J=_l(),[V]=A.useState(()=>jo(J));return p.jsx(Ua.Provider,{value:C,children:p.jsx(qa.Provider,{value:w,children:p.jsx(Ka.Provider,{value:N,children:p.jsx(Ja.Provider,{value:V,children:h})})})})}/**
5
5
  * @license @tabler/icons-react v3.31.0 - MIT
6
6
  *
7
7
  * This source code is licensed under the MIT license.
8
8
  * See the LICENSE file in the root directory of this source tree.
9
- */var Zp={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};/**
9
+ */var Yb={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};/**
10
10
  * @license @tabler/icons-react v3.31.0 - MIT
11
11
  *
12
12
  * This source code is licensed under the MIT license.
13
13
  * See the LICENSE file in the root directory of this source tree.
14
- */const Ae=(e,t,n,r)=>{const o=v.forwardRef(({color:i="currentColor",size:s=24,stroke:a=2,title:l,className:u,children:d,...f},p)=>v.createElement("svg",{ref:p,...Zp[e],width:s,height:s,className:["tabler-icon",`tabler-icon-${t}`,u].join(" "),strokeWidth:a,stroke:i,...f},[l&&v.createElement("title",{key:"svg-title"},l),...r.map(([y,b])=>v.createElement(y,b)),...Array.isArray(d)?d:[d]]));return o.displayName=`${n}`,o};/**
14
+ */const wt=(e,t,n,o)=>{const s=A.forwardRef(({color:a="currentColor",size:u=24,stroke:c=2,title:d,className:h,children:y,...g},b)=>A.createElement("svg",{ref:b,...Yb[e],width:u,height:u,className:["tabler-icon",`tabler-icon-${t}`,h].join(" "),strokeWidth:c,stroke:a,...g},[d&&A.createElement("title",{key:"svg-title"},d),...o.map(([C,E])=>A.createElement(C,E)),...Array.isArray(y)?y:[y]]));return s.displayName=`${n}`,s};/**
15
15
  * @license @tabler/icons-react v3.31.0 - MIT
16
16
  *
17
17
  * This source code is licensed under the MIT license.
18
18
  * See the LICENSE file in the root directory of this source tree.
19
- */var Qp=Ae("outline","alert-circle","IconAlertCircle",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 8v4",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]]);/**
19
+ */var Rb=wt("outline","alert-circle","IconAlertCircle",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 8v4",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]]);/**
20
20
  * @license @tabler/icons-react v3.31.0 - MIT
21
21
  *
22
22
  * This source code is licensed under the MIT license.
23
23
  * See the LICENSE file in the root directory of this source tree.
24
- */var Rp=Ae("outline","app-window","IconAppWindow",[["path",{d:"M3 5m0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M6 8h.01",key:"svg-1"}],["path",{d:"M9 8h.01",key:"svg-2"}]]);/**
24
+ */var qb=wt("outline","app-window","IconAppWindow",[["path",{d:"M3 5m0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M6 8h.01",key:"svg-1"}],["path",{d:"M9 8h.01",key:"svg-2"}]]);/**
25
25
  * @license @tabler/icons-react v3.31.0 - MIT
26
26
  *
27
27
  * This source code is licensed under the MIT license.
28
28
  * See the LICENSE file in the root directory of this source tree.
29
- */var Lo=Ae("outline","chevron-down","IconChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]);/**
29
+ */var wl=wt("outline","chevron-down","IconChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]);/**
30
30
  * @license @tabler/icons-react v3.31.0 - MIT
31
31
  *
32
32
  * This source code is licensed under the MIT license.
33
33
  * See the LICENSE file in the root directory of this source tree.
34
- */var Ca=Ae("outline","chevron-up","IconChevronUp",[["path",{d:"M6 15l6 -6l6 6",key:"svg-0"}]]);/**
34
+ */var yd=wt("outline","chevron-up","IconChevronUp",[["path",{d:"M6 15l6 -6l6 6",key:"svg-0"}]]);/**
35
35
  * @license @tabler/icons-react v3.31.0 - MIT
36
36
  *
37
37
  * This source code is licensed under the MIT license.
38
38
  * See the LICENSE file in the root directory of this source tree.
39
- */var Ea=Ae("outline","download","IconDownload",[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 11l5 5l5 -5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]]);/**
39
+ */var vd=wt("outline","download","IconDownload",[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 11l5 5l5 -5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]]);/**
40
40
  * @license @tabler/icons-react v3.31.0 - MIT
41
41
  *
42
42
  * This source code is licensed under the MIT license.
43
43
  * See the LICENSE file in the root directory of this source tree.
44
- */var eh=Ae("outline","exclamation-circle","IconExclamationCircle",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 9v4",key:"svg-1"}],["path",{d:"M12 16v.01",key:"svg-2"}]]);/**
44
+ */var Kb=wt("outline","exclamation-circle","IconExclamationCircle",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 9v4",key:"svg-1"}],["path",{d:"M12 16v.01",key:"svg-2"}]]);/**
45
45
  * @license @tabler/icons-react v3.31.0 - MIT
46
46
  *
47
47
  * This source code is licensed under the MIT license.
48
48
  * See the LICENSE file in the root directory of this source tree.
49
- */var th=Ae("outline","eye","IconEye",[["path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6",key:"svg-1"}]]);/**
49
+ */var Jb=wt("outline","eye","IconEye",[["path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6",key:"svg-1"}]]);/**
50
50
  * @license @tabler/icons-react v3.31.0 - MIT
51
51
  *
52
52
  * This source code is licensed under the MIT license.
53
53
  * See the LICENSE file in the root directory of this source tree.
54
- */var nh=Ae("outline","filter-cog","IconFilterCog",[["path",{d:"M12 20l-3 1v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v1.5",key:"svg-0"}],["path",{d:"M19.001 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M19.001 15.5v1.5",key:"svg-2"}],["path",{d:"M19.001 21v1.5",key:"svg-3"}],["path",{d:"M22.032 17.25l-1.299 .75",key:"svg-4"}],["path",{d:"M17.27 20l-1.3 .75",key:"svg-5"}],["path",{d:"M15.97 17.25l1.3 .75",key:"svg-6"}],["path",{d:"M20.733 20l1.3 .75",key:"svg-7"}]]);/**
54
+ */var Zb=wt("outline","filter-cog","IconFilterCog",[["path",{d:"M12 20l-3 1v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v1.5",key:"svg-0"}],["path",{d:"M19.001 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M19.001 15.5v1.5",key:"svg-2"}],["path",{d:"M19.001 21v1.5",key:"svg-3"}],["path",{d:"M22.032 17.25l-1.299 .75",key:"svg-4"}],["path",{d:"M17.27 20l-1.3 .75",key:"svg-5"}],["path",{d:"M15.97 17.25l1.3 .75",key:"svg-6"}],["path",{d:"M20.733 20l1.3 .75",key:"svg-7"}]]);/**
55
55
  * @license @tabler/icons-react v3.31.0 - MIT
56
56
  *
57
57
  * This source code is licensed under the MIT license.
58
58
  * See the LICENSE file in the root directory of this source tree.
59
- */var Aa=Ae("outline","filter","IconFilter",[["path",{d:"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z",key:"svg-0"}]]);/**
59
+ */var bd=wt("outline","filter","IconFilter",[["path",{d:"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z",key:"svg-0"}]]);/**
60
60
  * @license @tabler/icons-react v3.31.0 - MIT
61
61
  *
62
62
  * This source code is licensed under the MIT license.
63
63
  * See the LICENSE file in the root directory of this source tree.
64
- */var rh=Ae("outline","id-badge-2","IconIdBadge2",[["path",{d:"M7 12h3v4h-3z",key:"svg-0"}],["path",{d:"M10 6h-6a1 1 0 0 0 -1 1v12a1 1 0 0 0 1 1h16a1 1 0 0 0 1 -1v-12a1 1 0 0 0 -1 -1h-6",key:"svg-1"}],["path",{d:"M10 3m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v3a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z",key:"svg-2"}],["path",{d:"M14 16h2",key:"svg-3"}],["path",{d:"M14 12h4",key:"svg-4"}]]);/**
64
+ */var Xb=wt("outline","id-badge-2","IconIdBadge2",[["path",{d:"M7 12h3v4h-3z",key:"svg-0"}],["path",{d:"M10 6h-6a1 1 0 0 0 -1 1v12a1 1 0 0 0 1 1h16a1 1 0 0 0 1 -1v-12a1 1 0 0 0 -1 -1h-6",key:"svg-1"}],["path",{d:"M10 3m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v3a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z",key:"svg-2"}],["path",{d:"M14 16h2",key:"svg-3"}],["path",{d:"M14 12h4",key:"svg-4"}]]);/**
65
65
  * @license @tabler/icons-react v3.31.0 - MIT
66
66
  *
67
67
  * This source code is licensed under the MIT license.
68
68
  * See the LICENSE file in the root directory of this source tree.
69
- */var xa=Ae("outline","lock","IconLock",[["path",{d:"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6z",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-4a4 4 0 1 1 8 0v4",key:"svg-2"}]]);/**
69
+ */var _d=wt("outline","lock","IconLock",[["path",{d:"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6z",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-4a4 4 0 1 1 8 0v4",key:"svg-2"}]]);/**
70
70
  * @license @tabler/icons-react v3.31.0 - MIT
71
71
  *
72
72
  * This source code is licensed under the MIT license.
73
73
  * See the LICENSE file in the root directory of this source tree.
74
- */var oh=Ae("outline","logout","IconLogout",[["path",{d:"M14 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M9 12h12l-3 -3",key:"svg-1"}],["path",{d:"M18 15l3 -3",key:"svg-2"}]]);/**
74
+ */var Qb=wt("outline","logout","IconLogout",[["path",{d:"M14 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M9 12h12l-3 -3",key:"svg-1"}],["path",{d:"M18 15l3 -3",key:"svg-2"}]]);/**
75
75
  * @license @tabler/icons-react v3.31.0 - MIT
76
76
  *
77
77
  * This source code is licensed under the MIT license.
78
78
  * See the LICENSE file in the root directory of this source tree.
79
- */var ih=Ae("outline","pencil","IconPencil",[["path",{d:"M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4",key:"svg-0"}],["path",{d:"M13.5 6.5l4 4",key:"svg-1"}]]);/**
79
+ */var e_=wt("outline","pencil","IconPencil",[["path",{d:"M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4",key:"svg-0"}],["path",{d:"M13.5 6.5l4 4",key:"svg-1"}]]);/**
80
80
  * @license @tabler/icons-react v3.31.0 - MIT
81
81
  *
82
82
  * This source code is licensed under the MIT license.
83
83
  * See the LICENSE file in the root directory of this source tree.
84
- */var jo=Ae("outline","plus","IconPlus",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]]);/**
84
+ */var Tl=wt("outline","plus","IconPlus",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]]);/**
85
85
  * @license @tabler/icons-react v3.31.0 - MIT
86
86
  *
87
87
  * This source code is licensed under the MIT license.
88
88
  * See the LICENSE file in the root directory of this source tree.
89
- */var sh=Ae("outline","refresh","IconRefresh",[["path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4",key:"svg-0"}],["path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4",key:"svg-1"}]]);/**
89
+ */var t_=wt("outline","refresh","IconRefresh",[["path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4",key:"svg-0"}],["path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4",key:"svg-1"}]]);/**
90
90
  * @license @tabler/icons-react v3.31.0 - MIT
91
91
  *
92
92
  * This source code is licensed under the MIT license.
93
93
  * See the LICENSE file in the root directory of this source tree.
94
- */var Oa=Ae("outline","trash","IconTrash",[["path",{d:"M4 7l16 0",key:"svg-0"}],["path",{d:"M10 11l0 6",key:"svg-1"}],["path",{d:"M14 11l0 6",key:"svg-2"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-3"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-4"}]]);/**
94
+ */var wd=wt("outline","trash","IconTrash",[["path",{d:"M4 7l16 0",key:"svg-0"}],["path",{d:"M10 11l0 6",key:"svg-1"}],["path",{d:"M14 11l0 6",key:"svg-2"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-3"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-4"}]]);/**
95
95
  * @license @tabler/icons-react v3.31.0 - MIT
96
96
  *
97
97
  * This source code is licensed under the MIT license.
98
98
  * See the LICENSE file in the root directory of this source tree.
99
- */var ah=Ae("outline","users","IconUsers",[["path",{d:"M9 7m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"svg-2"}],["path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85",key:"svg-3"}]]);/**
99
+ */var n_=wt("outline","users","IconUsers",[["path",{d:"M9 7m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"svg-2"}],["path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85",key:"svg-3"}]]);/**
100
100
  * @license @tabler/icons-react v3.31.0 - MIT
101
101
  *
102
102
  * This source code is licensed under the MIT license.
103
103
  * See the LICENSE file in the root directory of this source tree.
104
- */var Pa=Ae("outline","x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);function Ia({opened:e,onClose:t,handleAccept:n,handleReject:r}){return c.jsxs(h.Modal,{opened:e,onClose:t,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",title:"Item löschen?",centered:!0,children:["Sind Sie Sicher, dass Sie das Item löschen wollen?",c.jsxs(h.Group,{align:"right",mt:"xl",justify:"flex-end",children:[c.jsx(h.Button,{onClick:r,variant:"default",children:"Abbrechen"}),c.jsx(h.Button,{onClick:n,color:"red",children:"Löschen"})]})]})}function $a({id:e,...t}){const{deleteEntry:n}=X(),r={bg:"transparent",size:"sm",c:"gray"},o=h.useProps("ActionIcon",r,t),[i,s]=v.useState(!1),a=()=>{s(!1)},l=async()=>{n(e),s(!1)};return c.jsxs(c.Fragment,{children:[c.jsx(h.Tooltip,{label:"Delete",children:c.jsx(h.ActionIcon,{bg:o.bg,size:o.size,c:o.c,onClick:()=>{s(!0)},children:c.jsx(Oa,{})})}),c.jsx(Ia,{opened:i,onClose:a,handleAccept:l,handleReject:a})]})}function ka({id:e,...t}){const{getEntry:n}=X(),r={variant:"transparent",size:"sm",c:"gray"},o=h.useProps("ActionIcon",r,t),{setOpened:i,setItem:s,setItemLoading:a}=ut("edit");return c.jsx(c.Fragment,{children:c.jsx(h.Tooltip,{label:"Edit",children:c.jsx(h.ActionIcon,{variant:o.variant,size:o.size,c:o.c,onClick:async()=>{a(!0),i(!0),n(e).then(l=>{l?s(l):a(!1)}).catch(()=>a(!1))},children:c.jsx(ih,{})})})})}const Ma=Object.freeze({left:0,top:0,width:16,height:16}),ir=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),zo=Object.freeze({...Ma,...ir}),Bo=Object.freeze({...zo,body:"",hidden:!1});function lh(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function Fa(e,t){const n=lh(e,t);for(const r in Bo)r in ir?r in e&&!(r in n)&&(n[r]=ir[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function ch(e,t){const n=e.icons,r=e.aliases||Object.create(null),o=Object.create(null);function i(s){if(n[s])return o[s]=[];if(!(s in o)){o[s]=null;const a=r[s]&&r[s].parent,l=a&&i(a);l&&(o[s]=[a].concat(l))}return o[s]}return Object.keys(n).concat(Object.keys(r)).forEach(i),o}function uh(e,t,n){const r=e.icons,o=e.aliases||Object.create(null);let i={};function s(a){i=Fa(r[a]||o[a],i)}return s(t),n.forEach(s),Fa(e,i)}function Da(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(o=>{t(o,null),n.push(o)});const r=ch(e);for(const o in r){const i=r[o];i&&(t(o,uh(e,o,i)),n.push(o))}return n}const fh={provider:"",aliases:{},not_found:{},...Ma};function Uo(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function Na(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!Uo(e,fh))return null;const n=t.icons;for(const o in n){const i=n[o];if(!o||typeof i.body!="string"||!Uo(i,Bo))return null}const r=t.aliases||Object.create(null);for(const o in r){const i=r[o],s=i.parent;if(!o||typeof s!="string"||!n[s]&&!r[s]||!Uo(i,Bo))return null}return t}const La=/^[a-z0-9]+(-[a-z0-9]+)*$/,sr=(e,t,n,r="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;r=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const a=o.pop(),l=o.pop(),u={provider:o.length>0?o[0]:r,prefix:l,name:a};return t&&!ar(u)?null:u}const i=o[0],s=i.split("-");if(s.length>1){const a={provider:r,prefix:s.shift(),name:s.join("-")};return t&&!ar(a)?null:a}if(n&&r===""){const a={provider:r,prefix:"",name:i};return t&&!ar(a,n)?null:a}return null},ar=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1,ja=Object.create(null);function dh(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function Gt(e,t){const n=ja[e]||(ja[e]=Object.create(null));return n[t]||(n[t]=dh(e,t))}function za(e,t){return Na(t)?Da(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function ph(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}let vn=!1;function Ba(e){return typeof e=="boolean"&&(vn=e),vn}function Ua(e){const t=typeof e=="string"?sr(e,!0,vn):e;if(t){const n=Gt(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function hh(e,t){const n=sr(e,!0,vn);if(!n)return!1;const r=Gt(n.provider,n.prefix);return t?ph(r,n.name,t):(r.missing.add(n.name),!0)}function gh(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),vn&&!t&&!e.prefix){let o=!1;return Na(e)&&(e.prefix="",Da(e,(i,s)=>{hh(i,s)&&(o=!0)})),o}const n=e.prefix;if(!ar({prefix:n,name:"a"}))return!1;const r=Gt(t,n);return!!za(r,e)}const Va=Object.freeze({width:null,height:null}),Wa=Object.freeze({...Va,...ir}),mh=/(-?[0-9.]*[0-9]+[0-9.]*)/g,yh=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Ga(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(mh);if(r===null||!r.length)return e;const o=[];let i=r.shift(),s=yh.test(i);for(;;){if(s){const a=parseFloat(i);isNaN(a)?o.push(i):o.push(Math.ceil(a*t*n)/n)}else o.push(i);if(i=r.shift(),i===void 0)return o.join("");s=!s}}function bh(e,t="defs"){let n="";const r=e.indexOf("<"+t);for(;r>=0;){const o=e.indexOf(">",r),i=e.indexOf("</"+t);if(o===-1||i===-1)break;const s=e.indexOf(">",i);if(s===-1)break;n+=e.slice(o+1,i).trim(),e=e.slice(0,r).trim()+e.slice(s+1)}return{defs:n,content:e}}function vh(e,t){return e?"<defs>"+e+"</defs>"+t:t}function Th(e,t,n){const r=bh(e);return vh(r.defs,t+r.content+n)}const Sh=e=>e==="unset"||e==="undefined"||e==="none";function wh(e,t){const n={...zo,...e},r={...Wa,...t},o={left:n.left,top:n.top,width:n.width,height:n.height};let i=n.body;[n,r].forEach(g=>{const w=[],E=g.hFlip,F=g.vFlip;let I=g.rotate;E?F?I+=2:(w.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),w.push("scale(-1 1)"),o.top=o.left=0):F&&(w.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),w.push("scale(1 -1)"),o.top=o.left=0);let A;switch(I<0&&(I-=Math.floor(I/4)*4),I=I%4,I){case 1:A=o.height/2+o.top,w.unshift("rotate(90 "+A.toString()+" "+A.toString()+")");break;case 2:w.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:A=o.width/2+o.left,w.unshift("rotate(-90 "+A.toString()+" "+A.toString()+")");break}I%2===1&&(o.left!==o.top&&(A=o.left,o.left=o.top,o.top=A),o.width!==o.height&&(A=o.width,o.width=o.height,o.height=A)),w.length&&(i=Th(i,'<g transform="'+w.join(" ")+'">',"</g>"))});const s=r.width,a=r.height,l=o.width,u=o.height;let d,f;s===null?(f=a===null?"1em":a==="auto"?u:a,d=Ga(f,l/u)):(d=s==="auto"?l:s,f=a===null?Ga(d,u/l):a==="auto"?u:a);const p={},y=(g,w)=>{Sh(w)||(p[g]=w.toString())};y("width",d),y("height",f);const b=[o.left,o.top,l,u];return p.viewBox=b.join(" "),{attributes:p,viewBox:b,body:i}}const _h=/\sid="(\S+)"/g,Ch="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Eh=0;function Ah(e,t=Ch){const n=[];let r;for(;r=_h.exec(e);)n.push(r[1]);if(!n.length)return e;const o="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(i=>{const s=typeof t=="function"?t(i):t+(Eh++).toString(),a=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+s+o+"$3")}),e=e.replace(new RegExp(o,"g"),""),e}const Vo=Object.create(null);function xh(e,t){Vo[e]=t}function Wo(e){return Vo[e]||Vo[""]}function Go(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Ho=Object.create(null),Tn=["https://api.simplesvg.com","https://api.unisvg.com"],lr=[];for(;Tn.length>0;)Tn.length===1||Math.random()>.5?lr.push(Tn.shift()):lr.push(Tn.pop());Ho[""]=Go({resources:["https://api.iconify.design"].concat(lr)});function Oh(e,t){const n=Go(t);return n===null?!1:(Ho[e]=n,!0)}function Yo(e){return Ho[e]}let Ha=(()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}})();function Ph(e,t){const n=Yo(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let o=0;n.resources.forEach(s=>{o=Math.max(o,s.length)});const i=t+".json?icons=";r=n.maxURL-o-n.path.length-i.length}return r}function Ih(e){return e===404}const $h=(e,t,n)=>{const r=[],o=Ph(e,t),i="icons";let s={type:i,provider:e,prefix:t,icons:[]},a=0;return n.forEach((l,u)=>{a+=l.length+1,a>=o&&u>0&&(r.push(s),s={type:i,provider:e,prefix:t,icons:[]},a=l.length),s.icons.push(l)}),r.push(s),r};function kh(e){if(typeof e=="string"){const t=Yo(e);if(t)return t.path}return"/"}const Mh={prepare:$h,send:(e,t,n)=>{if(!Ha){n("abort",424);return}let r=kh(t.provider);switch(t.type){case"icons":{const i=t.prefix,a=t.icons.join(","),l=new URLSearchParams({icons:a});r+=i+".json?"+l.toString();break}case"custom":{const i=t.uri;r+=i.slice(0,1)==="/"?i.slice(1):i;break}default:n("abort",400);return}let o=503;Ha(e+r).then(i=>{const s=i.status;if(s!==200){setTimeout(()=>{n(Ih(s)?"abort":"next",s)});return}return o=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{i===404?n("abort",i):n("next",o)});return}setTimeout(()=>{n("success",i)})}).catch(()=>{n("next",o)})}};function Fh(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((o,i)=>o.provider!==i.provider?o.provider.localeCompare(i.provider):o.prefix!==i.prefix?o.prefix.localeCompare(i.prefix):o.name.localeCompare(i.name));let r={provider:"",prefix:"",name:""};return e.forEach(o=>{if(r.name===o.name&&r.prefix===o.prefix&&r.provider===o.provider)return;r=o;const i=o.provider,s=o.prefix,a=o.name,l=n[i]||(n[i]=Object.create(null)),u=l[s]||(l[s]=Gt(i,s));let d;a in u.icons?d=t.loaded:s===""||u.missing.has(a)?d=t.missing:d=t.pending;const f={provider:i,prefix:s,name:a};d.push(f)}),t}function Ya(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(o=>o.id!==t))})}function Dh(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,o=e.prefix;t.forEach(i=>{const s=i.icons,a=s.pending.length;s.pending=s.pending.filter(l=>{if(l.prefix!==o)return!0;const u=l.name;if(e.icons[u])s.loaded.push({provider:r,prefix:o,name:u});else if(e.missing.has(u))s.missing.push({provider:r,prefix:o,name:u});else return n=!0,!0;return!1}),s.pending.length!==a&&(n||Ya([e],i.id),i.callback(s.loaded.slice(0),s.missing.slice(0),s.pending.slice(0),i.abort))})}))}let Nh=0;function Lh(e,t,n){const r=Nh++,o=Ya.bind(null,n,r);if(!t.pending.length)return o;const i={id:r,icons:t,callback:e,abort:o};return n.forEach(s=>{(s.loaderCallbacks||(s.loaderCallbacks=[])).push(i)}),o}function jh(e,t=!0,n=!1){const r=[];return e.forEach(o=>{const i=typeof o=="string"?sr(o,t,n):o;i&&r.push(i)}),r}var zh={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Bh(e,t,n,r){const o=e.resources.length,i=e.random?Math.floor(Math.random()*o):e.index;let s;if(e.random){let x=e.resources.slice(0);for(s=[];x.length>1;){const k=Math.floor(Math.random()*x.length);s.push(x[k]),x=x.slice(0,k).concat(x.slice(k+1))}s=s.concat(x)}else s=e.resources.slice(i).concat(e.resources.slice(0,i));const a=Date.now();let l="pending",u=0,d,f=null,p=[],y=[];typeof r=="function"&&y.push(r);function b(){f&&(clearTimeout(f),f=null)}function g(){l==="pending"&&(l="aborted"),b(),p.forEach(x=>{x.status==="pending"&&(x.status="aborted")}),p=[]}function w(x,k){k&&(y=[]),typeof x=="function"&&y.push(x)}function E(){return{startTime:a,payload:t,status:l,queriesSent:u,queriesPending:p.length,subscribe:w,abort:g}}function F(){l="failed",y.forEach(x=>{x(void 0,d)})}function I(){p.forEach(x=>{x.status==="pending"&&(x.status="aborted")}),p=[]}function A(x,k,G){const z=k!=="success";switch(p=p.filter(m=>m!==x),l){case"pending":break;case"failed":if(z||!e.dataAfterTimeout)return;break;default:return}if(k==="abort"){d=G,F();return}if(z){d=G,p.length||(s.length?_():F());return}if(b(),I(),!e.random){const m=e.resources.indexOf(x.resource);m!==-1&&m!==e.index&&(e.index=m)}l="completed",y.forEach(m=>{m(G)})}function _(){if(l!=="pending")return;b();const x=s.shift();if(x===void 0){if(p.length){f=setTimeout(()=>{b(),l==="pending"&&(I(),F())},e.timeout);return}F();return}const k={status:"pending",resource:x,callback:(G,z)=>{A(k,G,z)}};p.push(k),u++,f=setTimeout(_,e.rotate),n(x,t,k.callback)}return setTimeout(_),E}function qa(e){const t={...zh,...e};let n=[];function r(){n=n.filter(a=>a().status==="pending")}function o(a,l,u){const d=Bh(t,a,l,(f,p)=>{r(),u&&u(f,p)});return n.push(d),d}function i(a){return n.find(l=>a(l))||null}return{query:o,find:i,setIndex:a=>{t.index=a},getIndex:()=>t.index,cleanup:r}}function Ja(){}const qo=Object.create(null);function Uh(e){if(!qo[e]){const t=Yo(e);if(!t)return;const n=qa(t),r={config:t,redundancy:n};qo[e]=r}return qo[e]}function Vh(e,t,n){let r,o;if(typeof e=="string"){const i=Wo(e);if(!i)return n(void 0,424),Ja;o=i.send;const s=Uh(e);s&&(r=s.redundancy)}else{const i=Go(e);if(i){r=qa(i);const s=e.resources?e.resources[0]:"",a=Wo(s);a&&(o=a.send)}}return!r||!o?(n(void 0,424),Ja):r.query(t,o,n)().abort}function Ka(){}function Wh(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Dh(e)}))}function Gh(e){const t=[],n=[];return e.forEach(r=>{(r.match(La)?t:n).push(r)}),{valid:t,invalid:n}}function Sn(e,t,n){function r(){const o=e.pendingIcons;t.forEach(i=>{o&&o.delete(i),e.icons[i]||e.missing.add(i)})}if(n&&typeof n=="object")try{if(!za(e,n).length){r();return}}catch(o){console.error(o)}r(),Wh(e)}function Xa(e,t){e instanceof Promise?e.then(n=>{t(n)}).catch(()=>{t(null)}):t(e)}function Hh(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,o=e.iconsToLoad;if(delete e.iconsToLoad,!o||!o.length)return;const i=e.loadIcon;if(e.loadIcons&&(o.length>1||!i)){Xa(e.loadIcons(o,r,n),d=>{Sn(e,o,d)});return}if(i){o.forEach(d=>{const f=i(d,r,n);Xa(f,p=>{const y=p?{prefix:r,icons:{[d]:p}}:null;Sn(e,[d],y)})});return}const{valid:s,invalid:a}=Gh(o);if(a.length&&Sn(e,a,null),!s.length)return;const l=r.match(La)?Wo(n):null;if(!l){Sn(e,s,null);return}l.prepare(n,r,s).forEach(d=>{Vh(n,d,f=>{Sn(e,d.icons,f)})})}))}const Yh=(e,t)=>{const n=jh(e,!0,Ba()),r=Fh(n);if(!r.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(r.loaded,r.missing,r.pending,Ka)}),()=>{l=!1}}const o=Object.create(null),i=[];let s,a;return r.pending.forEach(l=>{const{provider:u,prefix:d}=l;if(d===a&&u===s)return;s=u,a=d,i.push(Gt(u,d));const f=o[u]||(o[u]=Object.create(null));f[d]||(f[d]=[])}),r.pending.forEach(l=>{const{provider:u,prefix:d,name:f}=l,p=Gt(u,d),y=p.pendingIcons||(p.pendingIcons=new Set);y.has(f)||(y.add(f),o[u][d].push(f))}),i.forEach(l=>{const u=o[l.provider][l.prefix];u.length&&Hh(l,u)}),t?Lh(t,r,i):Ka};function qh(e,t){const n={...e};for(const r in t){const o=t[r],i=typeof o;r in Va?(o===null||o&&(i==="string"||i==="number"))&&(n[r]=o):i===typeof n[r]&&(n[r]=r==="rotate"?o%4:o)}return n}const Jh=/[\s,]+/;function Kh(e,t){t.split(Jh).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function Xh(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(n===""){const o=parseInt(e);return isNaN(o)?0:r(o)}else if(n!==e){let o=0;switch(n){case"%":o=25;break;case"deg":o=90}if(o){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i=i/o,i%1===0?r(i):0)}}return t}function Zh(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function Qh(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Rh(e){return"data:image/svg+xml,"+Qh(e)}function eg(e){return'url("'+Rh(e)+'")'}let wn;function tg(){try{wn=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{wn=null}}function ng(e){return wn===void 0&&tg(),wn?wn.createHTML(e):e}const Za={...Wa,inline:!1},rg={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},og={display:"inline-block"},Jo={backgroundColor:"currentColor"},Qa={backgroundColor:"transparent"},Ra={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},el={WebkitMask:Jo,mask:Jo,background:Qa};for(const e in el){const t=el[e];for(const n in Ra)t[e+n]=Ra[n]}const ig={...Za,inline:!0};function tl(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const sg=(e,t,n)=>{const r=t.inline?ig:Za,o=qh(r,t),i=t.mode||"svg",s={},a=t.style||{},l={...i==="svg"?rg:{}};if(n){const w=sr(n,!1,!0);if(w){const E=["iconify"],F=["provider","prefix"];for(const I of F)w[I]&&E.push("iconify--"+w[I]);l.className=E.join(" ")}}for(let w in t){const E=t[w];if(E!==void 0)switch(w){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":break;case"_ref":l.ref=E;break;case"className":l[w]=(l[w]?l[w]+" ":"")+E;break;case"inline":case"hFlip":case"vFlip":o[w]=E===!0||E==="true"||E===1;break;case"flip":typeof E=="string"&&Kh(o,E);break;case"color":s.color=E;break;case"rotate":typeof E=="string"?o[w]=Xh(E):typeof E=="number"&&(o[w]=E);break;case"ariaHidden":case"aria-hidden":E!==!0&&E!=="true"&&delete l["aria-hidden"];break;default:r[w]===void 0&&(l[w]=E)}}const u=wh(e,o),d=u.attributes;if(o.inline&&(s.verticalAlign="-0.125em"),i==="svg"){l.style={...s,...a},Object.assign(l,d);let w=0,E=t.id;return typeof E=="string"&&(E=E.replace(/-/g,"_")),l.dangerouslySetInnerHTML={__html:ng(Ah(u.body,E?()=>E+"ID"+w++:"iconifyReact"))},v.createElement("svg",l)}const{body:f,width:p,height:y}=e,b=i==="mask"||(i==="bg"?!1:f.indexOf("currentColor")!==-1),g=Zh(f,{...d,width:p+"",height:y+""});return l.style={...s,"--svg":eg(g),width:tl(d.width),height:tl(d.height),...og,...b?Jo:Qa,...a},v.createElement("span",l)};if(Ba(!0),xh("",Mh),typeof document<"u"&&typeof window<"u"){const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!gh(r))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const r="IconifyProviders["+n+"] is invalid.";try{const o=t[n];if(typeof o!="object"||!o||o.resources===void 0)continue;Oh(n,o)||console.error(r)}catch{console.error(r)}}}}function nl(e){const[t,n]=v.useState(!!e.ssr),[r,o]=v.useState({});function i(y){if(y){const b=e.icon;if(typeof b=="object")return{name:"",data:b};const g=Ua(b);if(g)return{name:b,data:g}}return{name:""}}const[s,a]=v.useState(i(!!e.ssr));function l(){const y=r.callback;y&&(y(),o({}))}function u(y){if(JSON.stringify(s)!==JSON.stringify(y))return l(),a(y),!0}function d(){var y;const b=e.icon;if(typeof b=="object"){u({name:"",data:b});return}const g=Ua(b);if(u({name:b,data:g}))if(g===void 0){const w=Yh([b],d);o({callback:w})}else g&&((y=e.onLoad)===null||y===void 0||y.call(e,b))}v.useEffect(()=>(n(!0),l),[]),v.useEffect(()=>{t&&d()},[e.icon,t]);const{name:f,data:p}=s;return p?sg({...zo,...p},e,f):e.children?e.children:v.createElement("span",{})}const Ko=v.forwardRef((e,t)=>nl({...e,_ref:t}));v.forwardRef((e,t)=>nl({inline:!0,...e,_ref:t}));const rl=V.createAjv({formats:{relation:e=>typeof e=="string"||e===null}});function ag(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var dt=ag,lg=typeof qn=="object"&&qn&&qn.Object===Object&&qn,ol=lg,cg=ol,ug=typeof self=="object"&&self&&self.Object===Object&&self,fg=cg||ug||Function("return this")(),Xe=fg,dg=Xe,pg=function(){return dg.Date.now()},hg=pg,gg=/\s/;function mg(e){for(var t=e.length;t--&&gg.test(e.charAt(t)););return t}var yg=mg,bg=yg,vg=/^\s+/;function Tg(e){return e&&e.slice(0,bg(e)+1).replace(vg,"")}var Sg=Tg,wg=Xe,_g=wg.Symbol,cr=_g,il=cr,sl=Object.prototype,Cg=sl.hasOwnProperty,Eg=sl.toString,_n=il?il.toStringTag:void 0;function Ag(e){var t=Cg.call(e,_n),n=e[_n];try{e[_n]=void 0;var r=!0}catch{}var o=Eg.call(e);return r&&(t?e[_n]=n:delete e[_n]),o}var xg=Ag,Og=Object.prototype,Pg=Og.toString;function Ig(e){return Pg.call(e)}var $g=Ig,al=cr,kg=xg,Mg=$g,Fg="[object Null]",Dg="[object Undefined]",ll=al?al.toStringTag:void 0;function Ng(e){return e==null?e===void 0?Dg:Fg:ll&&ll in Object(e)?kg(e):Mg(e)}var Ht=Ng;function Lg(e){return e!=null&&typeof e=="object"}var Yt=Lg,jg=Ht,zg=Yt,Bg="[object Symbol]";function Ug(e){return typeof e=="symbol"||zg(e)&&jg(e)==Bg}var cl=Ug,Vg=Sg,ul=dt,Wg=cl,fl=NaN,Gg=/^[-+]0x[0-9a-f]+$/i,Hg=/^0b[01]+$/i,Yg=/^0o[0-7]+$/i,qg=parseInt;function Jg(e){if(typeof e=="number")return e;if(Wg(e))return fl;if(ul(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ul(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Vg(e);var n=Hg.test(e);return n||Yg.test(e)?qg(e.slice(2),n?2:8):Gg.test(e)?fl:+e}var dl=Jg,Kg=dt,Xo=hg,pl=dl,Xg="Expected a function",Zg=Math.max,Qg=Math.min;function Rg(e,t,n){var r,o,i,s,a,l,u=0,d=!1,f=!1,p=!0;if(typeof e!="function")throw new TypeError(Xg);t=pl(t)||0,Kg(n)&&(d=!!n.leading,f="maxWait"in n,i=f?Zg(pl(n.maxWait)||0,t):i,p="trailing"in n?!!n.trailing:p);function y(x){var k=r,G=o;return r=o=void 0,u=x,s=e.apply(G,k),s}function b(x){return u=x,a=setTimeout(E,t),d?y(x):s}function g(x){var k=x-l,G=x-u,z=t-k;return f?Qg(z,i-G):z}function w(x){var k=x-l,G=x-u;return l===void 0||k>=t||k<0||f&&G>=i}function E(){var x=Xo();if(w(x))return F(x);a=setTimeout(E,g(x))}function F(x){return a=void 0,p&&r?y(x):(r=o=void 0,s)}function I(){a!==void 0&&clearTimeout(a),u=0,r=l=o=a=void 0}function A(){return a===void 0?s:F(Xo())}function _(){var x=Xo(),k=w(x);if(r=arguments,o=this,l=x,k){if(a===void 0)return b(l);if(f)return clearTimeout(a),a=setTimeout(E,t),y(l)}return a===void 0&&(a=setTimeout(E,t)),s}return _.cancel=I,_.flush=A,_}var em=Rg;const tm=St(em),nm=(e,t,n,r,o,i=300)=>{const[s,a]=v.useState(n??t);v.useEffect(()=>{a(n??t)},[n]);const l=v.useCallback(tm(f=>e(r,f),i),[e,r,i]),u=v.useCallback(f=>{const p=o(f);a(p??t),l(p)},[l,o]),d=v.useCallback(()=>{a(t),e(r,void 0)},[t,e,r]);return[s,u,d]};function tt(e,t){return e===t||Array.isArray(e)&&e.includes(t)}function Zo(e){return e!=null}var rm=Object.prototype;function om(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||rm;return e===n}var ur=om;function im(e,t){return function(n){return e(t(n))}}var hl=im,sm=hl,am=sm(Object.keys,Object),lm=am,cm=ur,um=lm,fm=Object.prototype,dm=fm.hasOwnProperty;function pm(e){if(!cm(e))return um(e);var t=[];for(var n in Object(e))dm.call(e,n)&&n!="constructor"&&t.push(n);return t}var hm=pm,gm=Ht,mm=dt,ym="[object AsyncFunction]",bm="[object Function]",vm="[object GeneratorFunction]",Tm="[object Proxy]";function Sm(e){if(!mm(e))return!1;var t=gm(e);return t==bm||t==vm||t==ym||t==Tm}var Qo=Sm,wm=Xe,_m=wm["__core-js_shared__"],Cm=_m,Ro=Cm,gl=function(){var e=/[^.]+$/.exec(Ro&&Ro.keys&&Ro.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Em(e){return!!gl&&gl in e}var Am=Em,xm=Function.prototype,Om=xm.toString;function Pm(e){if(e!=null){try{return Om.call(e)}catch{}try{return e+""}catch{}}return""}var ml=Pm,Im=Qo,$m=Am,km=dt,Mm=ml,Fm=/[\\^$.*+?()[\]{}|]/g,Dm=/^\[object .+?Constructor\]$/,Nm=Function.prototype,Lm=Object.prototype,jm=Nm.toString,zm=Lm.hasOwnProperty,Bm=RegExp("^"+jm.call(zm).replace(Fm,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Um(e){if(!km(e)||$m(e))return!1;var t=Im(e)?Bm:Dm;return t.test(Mm(e))}var Vm=Um;function Wm(e,t){return e==null?void 0:e[t]}var Gm=Wm,Hm=Vm,Ym=Gm;function qm(e,t){var n=Ym(e,t);return Hm(n)?n:void 0}var Mt=qm,Jm=Mt,Km=Xe,Xm=Jm(Km,"DataView"),Zm=Xm,Qm=Mt,Rm=Xe,ey=Qm(Rm,"Map"),ei=ey,ty=Mt,ny=Xe,ry=ty(ny,"Promise"),oy=ry,iy=Mt,sy=Xe,ay=iy(sy,"Set"),yl=ay,ly=Mt,cy=Xe,uy=ly(cy,"WeakMap"),fy=uy,ti=Zm,ni=ei,ri=oy,oi=yl,ii=fy,bl=Ht,qt=ml,vl="[object Map]",dy="[object Object]",Tl="[object Promise]",Sl="[object Set]",wl="[object WeakMap]",_l="[object DataView]",py=qt(ti),hy=qt(ni),gy=qt(ri),my=qt(oi),yy=qt(ii),Ft=bl;(ti&&Ft(new ti(new ArrayBuffer(1)))!=_l||ni&&Ft(new ni)!=vl||ri&&Ft(ri.resolve())!=Tl||oi&&Ft(new oi)!=Sl||ii&&Ft(new ii)!=wl)&&(Ft=function(e){var t=bl(e),n=t==dy?e.constructor:void 0,r=n?qt(n):"";if(r)switch(r){case py:return _l;case hy:return vl;case gy:return Tl;case my:return Sl;case yy:return wl}return t});var by=Ft,vy=Ht,Ty=Yt,Sy="[object Arguments]";function wy(e){return Ty(e)&&vy(e)==Sy}var _y=wy,Cl=_y,Cy=Yt,El=Object.prototype,Ey=El.hasOwnProperty,Ay=El.propertyIsEnumerable,xy=Cl(function(){return arguments}())?Cl:function(e){return Cy(e)&&Ey.call(e,"callee")&&!Ay.call(e,"callee")},fr=xy,Oy=Array.isArray,Cn=Oy,Py=9007199254740991;function Iy(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Py}var Al=Iy,$y=Qo,ky=Al;function My(e){return e!=null&&ky(e.length)&&!$y(e)}var dr=My,pr={exports:{}};function Fy(){return!1}var Dy=Fy;pr.exports,function(e,t){var n=Xe,r=Dy,o=t&&!t.nodeType&&t,i=o&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===o,a=s?n.Buffer:void 0,l=a?a.isBuffer:void 0,u=l||r;e.exports=u}(pr,pr.exports);var si=pr.exports,Ny=Ht,Ly=Al,jy=Yt,zy="[object Arguments]",By="[object Array]",Uy="[object Boolean]",Vy="[object Date]",Wy="[object Error]",Gy="[object Function]",Hy="[object Map]",Yy="[object Number]",qy="[object Object]",Jy="[object RegExp]",Ky="[object Set]",Xy="[object String]",Zy="[object WeakMap]",Qy="[object ArrayBuffer]",Ry="[object DataView]",e0="[object Float32Array]",t0="[object Float64Array]",n0="[object Int8Array]",r0="[object Int16Array]",o0="[object Int32Array]",i0="[object Uint8Array]",s0="[object Uint8ClampedArray]",a0="[object Uint16Array]",l0="[object Uint32Array]",pe={};pe[e0]=pe[t0]=pe[n0]=pe[r0]=pe[o0]=pe[i0]=pe[s0]=pe[a0]=pe[l0]=!0,pe[zy]=pe[By]=pe[Qy]=pe[Uy]=pe[Ry]=pe[Vy]=pe[Wy]=pe[Gy]=pe[Hy]=pe[Yy]=pe[qy]=pe[Jy]=pe[Ky]=pe[Xy]=pe[Zy]=!1;function c0(e){return jy(e)&&Ly(e.length)&&!!pe[Ny(e)]}var u0=c0;function f0(e){return function(t){return e(t)}}var d0=f0,hr={exports:{}};hr.exports,function(e,t){var n=ol,r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===r,s=i&&n.process,a=function(){try{var l=o&&o.require&&o.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}}();e.exports=a}(hr,hr.exports);var p0=hr.exports,h0=u0,g0=d0,xl=p0,Ol=xl&&xl.isTypedArray,m0=Ol?g0(Ol):h0,ai=m0,y0=hm,b0=by,v0=fr,T0=Cn,S0=dr,w0=si,_0=ur,C0=ai,E0="[object Map]",A0="[object Set]",x0=Object.prototype,O0=x0.hasOwnProperty;function P0(e){if(e==null)return!0;if(S0(e)&&(T0(e)||typeof e=="string"||typeof e.splice=="function"||w0(e)||C0(e)||v0(e)))return!e.length;var t=b0(e);if(t==E0||t==A0)return!e.size;if(_0(e))return!y0(e).length;for(var n in e)if(O0.call(e,n))return!1;return!0}var I0=P0;const Pl=St(I0),$0=(e,t,n,r,o,i,s)=>e.map((a,l)=>c.jsx(h.Grid.Col,{span:o==="row"?12/e.length:12,style:{alignContent:"end"},children:c.jsx(te.JsonFormsDispatch,{uischema:a,schema:t,path:n,enabled:r,renderers:i,cells:s})},`${n}-${l}`)),k0=({elements:e,schema:t,path:n,enabled:r,direction:o,renderers:i,cells:s})=>Pl(e)?null:c.jsx(h.Grid,{spacing:o==="row"?2:0,children:$0(e,t,n,r,o,i,s)}),li=v.memo(k0);function ci(e){return new Date(e.getTime()-e.getTimezoneOffset()*6e4).toISOString()}function Il(e){const t=new Date(e);return new Date(t.getTime()+t.getTimezoneOffset()*6e4)}function $l(e,{data:t,onChange:n}){return e?{checked:t||!1,onChange:r=>n(r.target.checked)}:{data:[{value:String(!0),label:"True"},{value:String(!1),label:"False"}],value:Zo(t)?String(t):null,onChange:r=>n(Zo(r)?r===String(!0):void 0)}}function nt(e={}){const t=h.useProps("__",{},{});let n=null;return tt(e.schema.type,"null")||(tt(e.schema.type,"array")?n=[]:tt(e.schema.type,"object")?n={}:tt(e.schema.type,"string")&&(n="")),{label:e.label,description:e.description,required:e.required,disabled:!e.enabled,onChange:r=>e.handleChange(e.path,r??(t.setNull?n:void 0)),error:e.errors?e.errors.split(`
105
- `).map(r=>c.jsx("span",{style:{display:"block"},children:r},r)):void 0}}function Ze(e,t,n,r){const{specialKey:o}=X(),i=h.useProps((o==null?void 0:o.all)||"all",{},{}),s=h.useProps(e,{},{}),a=h.useProps(t,{},{}),{component:l,props:u}=v.useMemo(()=>ct(i,s,a),[s,i,a]);return[Te(l,{componentProps:n,jsonFormsProps:r}),{...n,...Te(u,{componentProps:n,jsonFormsProps:r})}]}function gr(e,t,{data:n,toggle:r,onChange:o}){const i=h.useMantineTheme(),s={valueFormat:e==="date"?"DD.MM.YYYY":t?"DD.MM.YYYY HH:mm (UTC)":"DD.MM.YYYY HH:mm",value:n?e==="date"||t?Il(n):new Date(n):null,clearable:!0,onChange:a=>{a&&(e==="date"?a=ci(a).split("T")[0]:t?a=ci(a):a=a.toISOString()),o(a||void 0)}};return e!=="date"&&(s.placeholder=t?"DD.MM.YYYY HH:mm (UTC)":"DD.MM.YYYY HH:mm",s.rightSection=c.jsxs(h.Group,{gap:"0.25rem",wrap:"nowrap",children:[c.jsx(h.CloseButton,{variant:"transparent",size:"sm",onClick:()=>o(void 0),style:{visibility:n?void 0:"hidden"}}),c.jsx(h.CloseButton,{title:t?"UTC":"Local",variant:"subtle",size:"sm",onClick:()=>{r(),n&&o(void 0)},icon:c.jsx(Ko,{icon:"tabler:timezone",color:t?i.primaryColor:"gray"})})]}),s.rightSectionWidth="3.75rem"),s}function kl({data:e,onChange:t}){const[n,r]=v.useState(""),o=v.useMemo(()=>e?typeof e=="object"?JSON.stringify(e,null,2):e:"",[e]);return v.useEffect(()=>{r(o)},[o]),{autosize:!0,minRows:4,maxRows:12,validationError:"Invalid JSON",formatOnBlur:!0,value:n,onBlur:()=>{if(!n){t(void 0);return}try{const i=JSON.parse(n);t(i)}catch{}},onChange:r}}function mr(e,t){return{data:v.useMemo(()=>t.related_items||(t.oneOf?t.oneOf.map(r=>({value:r.const,label:r.title})):t.enum),[t.enum,t.related_items,t.oneOf]),value:e||null,searchable:!0}}function Ml(e,t,{onChange:n}){const r=mr(e,t);return{...r,value:r.value||[],onChange:o=>o.length?n(o):n(void 0)}}function Fl(e,{data:t,onChange:n}){return{value:t||"",allowDecimal:e==="number",hideControls:!0,onChange:r=>n(r||void 0)}}function Dl({data:e,onChange:t}){return{value:e||"",onChange:n=>t(n.target.value||void 0)}}function ui(e){const t=nt(e),{path:n,data:r,schema:o}=e,i=v.useMemo(()=>o.format==="checkbox",[o.format]),s=$l(i,{data:r,onChange:t.onChange}),a=v.useMemo(()=>({...t,...s}),[s,t]),[l,u]=Ze("Boolean",n,a,e);return l===void 0?i?c.jsx(h.Checkbox,{...u}):c.jsx(h.Select,{...u}):l}function fi(e){const t=nt(e),{path:n,data:r}=e,o=gr("date",!0,{data:r,onChange:t.onChange}),i=v.useMemo(()=>({...t,...o}),[t,o]),[s,a]=Ze("Date",n,i,e);return s===void 0?c.jsx(jt.DateInput,{...a}):s}function di(e){const t=nt(e),{path:n,data:r}=e,o=gr("date-time",!1,{data:r,toggle:()=>null,onChange:t.onChange}),[,{initialUTC:i}]=Ze("DateTime",n,{...t,...o},e),[s,{toggle:a}]=ye.useDisclosure(i),{initialUTC:l,...u}=gr("date-time",s,{data:r,toggle:a,onChange:t.onChange}),d=v.useMemo(()=>({...t,...u}),[t,u]),[f,p]=Ze("DateTime",n,d,e);return f===void 0?c.jsx(jt.DateTimePicker,{...p}):f}function pi(e){const t=nt(e),{path:n,data:r}=e,o=Ml(r,e.schema.items,{onChange:t.onChange}),i=v.useMemo(()=>({...t,...o}),[t,o]),[s,a]=Ze("EnumArray",n,i,e);return s===void 0?c.jsx(h.MultiSelect,{...a}):s}function yr(e){const t=nt(e),{path:n,data:r}=e,o=mr(r,e.schema),i=v.useMemo(()=>({...t,...o}),[t,o]),[s,a]=Ze("Enum",n,i,e);return s===void 0?c.jsx(h.Select,{...a}):s}function Nl(e){const t=nt(e),{path:n,data:r}=e,o=kl({data:r,onChange:t.onChange}),i=v.useMemo(()=>({...t,...o}),[t,o]),[s,a]=Ze("Text",n,i,e);return s===void 0?c.jsx(h.JsonInput,{...a}):s}function En(e){const t=nt(e),{path:n,data:r}=e,o=Fl("number",{data:r,onChange:t.onChange}),i=v.useMemo(()=>({...t,...o}),[t,o]),[s,a]=Ze("Number",n,i,e);return s===void 0?c.jsx(h.NumberInput,{...a}):s}function hi(e){const t=nt(e),{path:n,data:r,schema:o}=e,i=mr(r,o),s=v.useMemo(()=>{var p;const d=r===null,f=(p=t.error)==null?void 0:p.filter(y=>y.key==="is a required property"||!d?y:!1);return f!=null&&f.length?{error:f}:{error:d&&t.required?"is a required property":void 0}},[t.error,t.required,r]),a=v.useMemo(()=>({...t,...i,...s}),[t,s,i]),[l,u]=Ze("OneOfEnum",n,a,e);return l===void 0?c.jsx(h.Select,{...u}):l}function gi(e){const t=nt(e),{path:n,data:r,schema:o}=e,i=Dl({data:r,onChange:t.onChange}),s=v.useMemo(()=>({...t,...i}),[t,i]),[a,l]=Ze("Text",n,s,e);return a===void 0?o.format==="password"?c.jsx(h.PasswordInput,{...l}):c.jsx(h.TextInput,{...l}):a}const Ll=V.rankWith(1,V.isBooleanControl),jl=te.withJsonFormsCellProps(e=>c.jsx(ui,{...e})),zl=V.rankWith(1,V.isDateControl),Bl=te.withJsonFormsCellProps(e=>c.jsx(fi,{...e})),Ul=V.rankWith(1,V.isDateTimeControl),Vl=te.withJsonFormsControlProps(e=>c.jsx(di,{...e})),Wl=V.rankWith(2,V.isEnumControl),Gl=te.withJsonFormsEnumProps(te.withTranslateProps(e=>c.jsx(yr,{...e})),!1),Hl=V.rankWith(1,V.isIntegerControl),Yl=te.withJsonFormsCellProps(e=>c.jsx(En,{...e})),ql=V.rankWith(1,V.isNumberControl),Jl=te.withJsonFormsCellProps(e=>c.jsx(En,{...e})),Kl=V.rankWith(2,V.isOneOfControl),Xl=te.withJsonFormsOneOfEnumProps(te.withTranslateProps(e=>c.jsx(hi,{...e})),!1),Zl=V.rankWith(1,V.isStringControl),Ql=te.withJsonFormsCellProps(e=>c.jsx(gi,{...e})),Rl=v.memo(function({open:t,onClose:n,onConfirm:r,onCancel:o,title:i,message:s,acceptText:a,declineText:l}){return c.jsxs(h.Modal,{opened:t,withCloseButton:!1,centered:!0,title:i,keepMounted:!0,onClose:n,children:[s,c.jsxs(h.Flex,{justify:"flex-end",align:"center",gap:"sm",children:[c.jsx(h.Button,{onClick:o,children:l}),c.jsx(h.Button,{onClick:r,children:a})]})]})});var mi={exports:{}},ce={};/**
104
+ */var Td=wt("outline","x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);function Sd({opened:e,onClose:t,handleAccept:n,handleReject:o}){return p.jsxs(T.Modal,{opened:e,onClose:t,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",title:"Item löschen?",centered:!0,children:["Sind Sie Sicher, dass Sie das Item löschen wollen?",p.jsxs(T.Group,{align:"right",mt:"xl",justify:"flex-end",children:[p.jsx(T.Button,{onClick:o,variant:"default",children:"Abbrechen"}),p.jsx(T.Button,{onClick:n,color:"red",children:"Löschen"})]})]})}function Cd({id:e,...t}){const{deleteEntry:n}=xe(),o={bg:"transparent",size:"sm",c:"gray"},s=T.useProps("ActionIcon",o,t),[a,u]=A.useState(!1),c=()=>{u(!1)},d=async()=>{n(e),u(!1)};return p.jsxs(p.Fragment,{children:[p.jsx(T.Tooltip,{label:"Delete",children:p.jsx(T.ActionIcon,{bg:s.bg,size:s.size,c:s.c,onClick:()=>{u(!0)},children:p.jsx(wd,{})})}),p.jsx(Sd,{opened:a,onClose:c,handleAccept:d,handleReject:c})]})}function Ed({id:e,...t}){const{getEntry:n}=xe(),o={variant:"transparent",size:"sm",c:"gray"},s=T.useProps("ActionIcon",o,t),{setOpened:a,setItem:u,setItemLoading:c}=zn("edit");return p.jsx(p.Fragment,{children:p.jsx(T.Tooltip,{label:"Edit",children:p.jsx(T.ActionIcon,{variant:s.variant,size:s.size,c:s.c,onClick:async()=>{c(!0),a(!0),n(e).then(d=>{d?u(d):c(!1)}).catch(()=>c(!1))},children:p.jsx(e_,{})})})})}const xd=Object.freeze({left:0,top:0,width:16,height:16}),es=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Sl=Object.freeze({...xd,...es}),Cl=Object.freeze({...Sl,body:"",hidden:!1});function r_(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const o=((e.rotate||0)+(t.rotate||0))%4;return o&&(n.rotate=o),n}function Ad(e,t){const n=r_(e,t);for(const o in Cl)o in es?o in e&&!(o in n)&&(n[o]=es[o]):o in t?n[o]=t[o]:o in e&&(n[o]=e[o]);return n}function i_(e,t){const n=e.icons,o=e.aliases||Object.create(null),s=Object.create(null);function a(u){if(n[u])return s[u]=[];if(!(u in s)){s[u]=null;const c=o[u]&&o[u].parent,d=c&&a(c);d&&(s[u]=[c].concat(d))}return s[u]}return Object.keys(n).concat(Object.keys(o)).forEach(a),s}function o_(e,t,n){const o=e.icons,s=e.aliases||Object.create(null);let a={};function u(c){a=Ad(o[c]||s[c],a)}return u(t),n.forEach(u),Ad(e,a)}function Od(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(s=>{t(s,null),n.push(s)});const o=i_(e);for(const s in o){const a=o[s];a&&(t(s,o_(e,s,a)),n.push(s))}return n}const s_={provider:"",aliases:{},not_found:{},...xd};function El(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function Id(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!El(e,s_))return null;const n=t.icons;for(const s in n){const a=n[s];if(!s||typeof a.body!="string"||!El(a,Cl))return null}const o=t.aliases||Object.create(null);for(const s in o){const a=o[s],u=a.parent;if(!s||typeof u!="string"||!n[u]&&!o[u]||!El(a,Cl))return null}return t}const Pd=/^[a-z0-9]+(-[a-z0-9]+)*$/,ts=(e,t,n,o="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;o=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const c=s.pop(),d=s.pop(),h={provider:s.length>0?s[0]:o,prefix:d,name:c};return t&&!ns(h)?null:h}const a=s[0],u=a.split("-");if(u.length>1){const c={provider:o,prefix:u.shift(),name:u.join("-")};return t&&!ns(c)?null:c}if(n&&o===""){const c={provider:o,prefix:"",name:a};return t&&!ns(c,n)?null:c}return null},ns=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1,$d=Object.create(null);function a_(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function si(e,t){const n=$d[e]||($d[e]=Object.create(null));return n[t]||(n[t]=a_(e,t))}function Md(e,t){return Id(t)?Od(t,(n,o)=>{o?e.icons[n]=o:e.missing.add(n)}):[]}function l_(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}let Zi=!1;function Fd(e){return typeof e=="boolean"&&(Zi=e),Zi}function Dd(e){const t=typeof e=="string"?ts(e,!0,Zi):e;if(t){const n=si(t.provider,t.prefix),o=t.name;return n.icons[o]||(n.missing.has(o)?null:void 0)}}function u_(e,t){const n=ts(e,!0,Zi);if(!n)return!1;const o=si(n.provider,n.prefix);return t?l_(o,n.name,t):(o.missing.add(n.name),!0)}function c_(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),Zi&&!t&&!e.prefix){let s=!1;return Id(e)&&(e.prefix="",Od(e,(a,u)=>{u_(a,u)&&(s=!0)})),s}const n=e.prefix;if(!ns({prefix:n,name:"a"}))return!1;const o=si(t,n);return!!Md(o,e)}const kd=Object.freeze({width:null,height:null}),Nd=Object.freeze({...kd,...es}),f_=/(-?[0-9.]*[0-9]+[0-9.]*)/g,d_=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Ld(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const o=e.split(f_);if(o===null||!o.length)return e;const s=[];let a=o.shift(),u=d_.test(a);for(;;){if(u){const c=parseFloat(a);isNaN(c)?s.push(a):s.push(Math.ceil(c*t*n)/n)}else s.push(a);if(a=o.shift(),a===void 0)return s.join("");u=!u}}function p_(e,t="defs"){let n="";const o=e.indexOf("<"+t);for(;o>=0;){const s=e.indexOf(">",o),a=e.indexOf("</"+t);if(s===-1||a===-1)break;const u=e.indexOf(">",a);if(u===-1)break;n+=e.slice(s+1,a).trim(),e=e.slice(0,o).trim()+e.slice(u+1)}return{defs:n,content:e}}function h_(e,t){return e?"<defs>"+e+"</defs>"+t:t}function g_(e,t,n){const o=p_(e);return h_(o.defs,t+o.content+n)}const m_=e=>e==="unset"||e==="undefined"||e==="none";function y_(e,t){const n={...Sl,...e},o={...Nd,...t},s={left:n.left,top:n.top,width:n.width,height:n.height};let a=n.body;[n,o].forEach(w=>{const $=[],N=w.hFlip,J=w.vFlip;let V=w.rotate;N?J?V+=2:($.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),$.push("scale(-1 1)"),s.top=s.left=0):J&&($.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),$.push("scale(1 -1)"),s.top=s.left=0);let L;switch(V<0&&(V-=Math.floor(V/4)*4),V=V%4,V){case 1:L=s.height/2+s.top,$.unshift("rotate(90 "+L.toString()+" "+L.toString()+")");break;case 2:$.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:L=s.width/2+s.left,$.unshift("rotate(-90 "+L.toString()+" "+L.toString()+")");break}V%2===1&&(s.left!==s.top&&(L=s.left,s.left=s.top,s.top=L),s.width!==s.height&&(L=s.width,s.width=s.height,s.height=L)),$.length&&(a=g_(a,'<g transform="'+$.join(" ")+'">',"</g>"))});const u=o.width,c=o.height,d=s.width,h=s.height;let y,g;u===null?(g=c===null?"1em":c==="auto"?h:c,y=Ld(g,d/h)):(y=u==="auto"?d:u,g=c===null?Ld(y,h/d):c==="auto"?h:c);const b={},C=(w,$)=>{m_($)||(b[w]=$.toString())};C("width",y),C("height",g);const E=[s.left,s.top,d,h];return b.viewBox=E.join(" "),{attributes:b,viewBox:E,body:a}}const v_=/\sid="(\S+)"/g,b_="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let __=0;function w_(e,t=b_){const n=[];let o;for(;o=v_.exec(e);)n.push(o[1]);if(!n.length)return e;const s="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(a=>{const u=typeof t=="function"?t(a):t+(__++).toString(),c=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+u+s+"$3")}),e=e.replace(new RegExp(s,"g"),""),e}const xl=Object.create(null);function T_(e,t){xl[e]=t}function Al(e){return xl[e]||xl[""]}function Ol(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Il=Object.create(null),Xi=["https://api.simplesvg.com","https://api.unisvg.com"],rs=[];for(;Xi.length>0;)Xi.length===1||Math.random()>.5?rs.push(Xi.shift()):rs.push(Xi.pop());Il[""]=Ol({resources:["https://api.iconify.design"].concat(rs)});function S_(e,t){const n=Ol(t);return n===null?!1:(Il[e]=n,!0)}function Pl(e){return Il[e]}let Bd=(()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}})();function C_(e,t){const n=Pl(e);if(!n)return 0;let o;if(!n.maxURL)o=0;else{let s=0;n.resources.forEach(u=>{s=Math.max(s,u.length)});const a=t+".json?icons=";o=n.maxURL-s-n.path.length-a.length}return o}function E_(e){return e===404}const x_=(e,t,n)=>{const o=[],s=C_(e,t),a="icons";let u={type:a,provider:e,prefix:t,icons:[]},c=0;return n.forEach((d,h)=>{c+=d.length+1,c>=s&&h>0&&(o.push(u),u={type:a,provider:e,prefix:t,icons:[]},c=d.length),u.icons.push(d)}),o.push(u),o};function A_(e){if(typeof e=="string"){const t=Pl(e);if(t)return t.path}return"/"}const O_={prepare:x_,send:(e,t,n)=>{if(!Bd){n("abort",424);return}let o=A_(t.provider);switch(t.type){case"icons":{const a=t.prefix,c=t.icons.join(","),d=new URLSearchParams({icons:c});o+=a+".json?"+d.toString();break}case"custom":{const a=t.uri;o+=a.slice(0,1)==="/"?a.slice(1):a;break}default:n("abort",400);return}let s=503;Bd(e+o).then(a=>{const u=a.status;if(u!==200){setTimeout(()=>{n(E_(u)?"abort":"next",u)});return}return s=501,a.json()}).then(a=>{if(typeof a!="object"||a===null){setTimeout(()=>{a===404?n("abort",a):n("next",s)});return}setTimeout(()=>{n("success",a)})}).catch(()=>{n("next",s)})}};function I_(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((s,a)=>s.provider!==a.provider?s.provider.localeCompare(a.provider):s.prefix!==a.prefix?s.prefix.localeCompare(a.prefix):s.name.localeCompare(a.name));let o={provider:"",prefix:"",name:""};return e.forEach(s=>{if(o.name===s.name&&o.prefix===s.prefix&&o.provider===s.provider)return;o=s;const a=s.provider,u=s.prefix,c=s.name,d=n[a]||(n[a]=Object.create(null)),h=d[u]||(d[u]=si(a,u));let y;c in h.icons?y=t.loaded:u===""||h.missing.has(c)?y=t.missing:y=t.pending;const g={provider:a,prefix:u,name:c};y.push(g)}),t}function zd(e,t){e.forEach(n=>{const o=n.loaderCallbacks;o&&(n.loaderCallbacks=o.filter(s=>s.id!==t))})}function P_(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const o=e.provider,s=e.prefix;t.forEach(a=>{const u=a.icons,c=u.pending.length;u.pending=u.pending.filter(d=>{if(d.prefix!==s)return!0;const h=d.name;if(e.icons[h])u.loaded.push({provider:o,prefix:s,name:h});else if(e.missing.has(h))u.missing.push({provider:o,prefix:s,name:h});else return n=!0,!0;return!1}),u.pending.length!==c&&(n||zd([e],a.id),a.callback(u.loaded.slice(0),u.missing.slice(0),u.pending.slice(0),a.abort))})}))}let $_=0;function M_(e,t,n){const o=$_++,s=zd.bind(null,n,o);if(!t.pending.length)return s;const a={id:o,icons:t,callback:e,abort:s};return n.forEach(u=>{(u.loaderCallbacks||(u.loaderCallbacks=[])).push(a)}),s}function F_(e,t=!0,n=!1){const o=[];return e.forEach(s=>{const a=typeof s=="string"?ts(s,t,n):s;a&&o.push(a)}),o}var D_={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function k_(e,t,n,o){const s=e.resources.length,a=e.random?Math.floor(Math.random()*s):e.index;let u;if(e.random){let B=e.resources.slice(0);for(u=[];B.length>1;){const Y=Math.floor(Math.random()*B.length);u.push(B[Y]),B=B.slice(0,Y).concat(B.slice(Y+1))}u=u.concat(B)}else u=e.resources.slice(a).concat(e.resources.slice(0,a));const c=Date.now();let d="pending",h=0,y,g=null,b=[],C=[];typeof o=="function"&&C.push(o);function E(){g&&(clearTimeout(g),g=null)}function w(){d==="pending"&&(d="aborted"),E(),b.forEach(B=>{B.status==="pending"&&(B.status="aborted")}),b=[]}function $(B,Y){Y&&(C=[]),typeof B=="function"&&C.push(B)}function N(){return{startTime:c,payload:t,status:d,queriesSent:h,queriesPending:b.length,subscribe:$,abort:w}}function J(){d="failed",C.forEach(B=>{B(void 0,y)})}function V(){b.forEach(B=>{B.status==="pending"&&(B.status="aborted")}),b=[]}function L(B,Y,ae){const te=Y!=="success";switch(b=b.filter(S=>S!==B),d){case"pending":break;case"failed":if(te||!e.dataAfterTimeout)return;break;default:return}if(Y==="abort"){y=ae,J();return}if(te){y=ae,b.length||(u.length?D():J());return}if(E(),V(),!e.random){const S=e.resources.indexOf(B.resource);S!==-1&&S!==e.index&&(e.index=S)}d="completed",C.forEach(S=>{S(ae)})}function D(){if(d!=="pending")return;E();const B=u.shift();if(B===void 0){if(b.length){g=setTimeout(()=>{E(),d==="pending"&&(V(),J())},e.timeout);return}J();return}const Y={status:"pending",resource:B,callback:(ae,te)=>{L(Y,ae,te)}};b.push(Y),h++,g=setTimeout(D,e.rotate),n(B,t,Y.callback)}return setTimeout(D),N}function Ud(e){const t={...D_,...e};let n=[];function o(){n=n.filter(c=>c().status==="pending")}function s(c,d,h){const y=k_(t,c,d,(g,b)=>{o(),h&&h(g,b)});return n.push(y),y}function a(c){return n.find(d=>c(d))||null}return{query:s,find:a,setIndex:c=>{t.index=c},getIndex:()=>t.index,cleanup:o}}function jd(){}const $l=Object.create(null);function N_(e){if(!$l[e]){const t=Pl(e);if(!t)return;const n=Ud(t),o={config:t,redundancy:n};$l[e]=o}return $l[e]}function L_(e,t,n){let o,s;if(typeof e=="string"){const a=Al(e);if(!a)return n(void 0,424),jd;s=a.send;const u=N_(e);u&&(o=u.redundancy)}else{const a=Ol(e);if(a){o=Ud(a);const u=e.resources?e.resources[0]:"",c=Al(u);c&&(s=c.send)}}return!o||!s?(n(void 0,424),jd):o.query(t,s,n)().abort}function Wd(){}function B_(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,P_(e)}))}function z_(e){const t=[],n=[];return e.forEach(o=>{(o.match(Pd)?t:n).push(o)}),{valid:t,invalid:n}}function Qi(e,t,n){function o(){const s=e.pendingIcons;t.forEach(a=>{s&&s.delete(a),e.icons[a]||e.missing.add(a)})}if(n&&typeof n=="object")try{if(!Md(e,n).length){o();return}}catch(s){console.error(s)}o(),B_(e)}function Vd(e,t){e instanceof Promise?e.then(n=>{t(n)}).catch(()=>{t(null)}):t(e)}function U_(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:o}=e,s=e.iconsToLoad;if(delete e.iconsToLoad,!s||!s.length)return;const a=e.loadIcon;if(e.loadIcons&&(s.length>1||!a)){Vd(e.loadIcons(s,o,n),y=>{Qi(e,s,y)});return}if(a){s.forEach(y=>{const g=a(y,o,n);Vd(g,b=>{const C=b?{prefix:o,icons:{[y]:b}}:null;Qi(e,[y],C)})});return}const{valid:u,invalid:c}=z_(s);if(c.length&&Qi(e,c,null),!u.length)return;const d=o.match(Pd)?Al(n):null;if(!d){Qi(e,u,null);return}d.prepare(n,o,u).forEach(y=>{L_(n,y,g=>{Qi(e,y.icons,g)})})}))}const j_=(e,t)=>{const n=F_(e,!0,Fd()),o=I_(n);if(!o.pending.length){let d=!0;return t&&setTimeout(()=>{d&&t(o.loaded,o.missing,o.pending,Wd)}),()=>{d=!1}}const s=Object.create(null),a=[];let u,c;return o.pending.forEach(d=>{const{provider:h,prefix:y}=d;if(y===c&&h===u)return;u=h,c=y,a.push(si(h,y));const g=s[h]||(s[h]=Object.create(null));g[y]||(g[y]=[])}),o.pending.forEach(d=>{const{provider:h,prefix:y,name:g}=d,b=si(h,y),C=b.pendingIcons||(b.pendingIcons=new Set);C.has(g)||(C.add(g),s[h][y].push(g))}),a.forEach(d=>{const h=s[d.provider][d.prefix];h.length&&U_(d,h)}),t?M_(t,o,a):Wd};function W_(e,t){const n={...e};for(const o in t){const s=t[o],a=typeof s;o in kd?(s===null||s&&(a==="string"||a==="number"))&&(n[o]=s):a===typeof n[o]&&(n[o]=o==="rotate"?s%4:s)}return n}const V_=/[\s,]+/;function G_(e,t){t.split(V_).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function H_(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function o(s){for(;s<0;)s+=4;return s%4}if(n===""){const s=parseInt(e);return isNaN(s)?0:o(s)}else if(n!==e){let s=0;switch(n){case"%":s=25;break;case"deg":s=90}if(s){let a=parseFloat(e.slice(0,e.length-n.length));return isNaN(a)?0:(a=a/s,a%1===0?o(a):0)}}return t}function Y_(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const o in t)n+=" "+o+'="'+t[o]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function R_(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function q_(e){return"data:image/svg+xml,"+R_(e)}function K_(e){return'url("'+q_(e)+'")'}let eo;function J_(){try{eo=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{eo=null}}function Z_(e){return eo===void 0&&J_(),eo?eo.createHTML(e):e}const Gd={...Nd,inline:!1},X_={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Q_={display:"inline-block"},Ml={backgroundColor:"currentColor"},Hd={backgroundColor:"transparent"},Yd={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Rd={WebkitMask:Ml,mask:Ml,background:Hd};for(const e in Rd){const t=Rd[e];for(const n in Yd)t[e+n]=Yd[n]}const e1={...Gd,inline:!0};function qd(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const t1=(e,t,n)=>{const o=t.inline?e1:Gd,s=W_(o,t),a=t.mode||"svg",u={},c=t.style||{},d={...a==="svg"?X_:{}};if(n){const $=ts(n,!1,!0);if($){const N=["iconify"],J=["provider","prefix"];for(const V of J)$[V]&&N.push("iconify--"+$[V]);d.className=N.join(" ")}}for(let $ in t){const N=t[$];if(N!==void 0)switch($){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":break;case"_ref":d.ref=N;break;case"className":d[$]=(d[$]?d[$]+" ":"")+N;break;case"inline":case"hFlip":case"vFlip":s[$]=N===!0||N==="true"||N===1;break;case"flip":typeof N=="string"&&G_(s,N);break;case"color":u.color=N;break;case"rotate":typeof N=="string"?s[$]=H_(N):typeof N=="number"&&(s[$]=N);break;case"ariaHidden":case"aria-hidden":N!==!0&&N!=="true"&&delete d["aria-hidden"];break;default:o[$]===void 0&&(d[$]=N)}}const h=y_(e,s),y=h.attributes;if(s.inline&&(u.verticalAlign="-0.125em"),a==="svg"){d.style={...u,...c},Object.assign(d,y);let $=0,N=t.id;return typeof N=="string"&&(N=N.replace(/-/g,"_")),d.dangerouslySetInnerHTML={__html:Z_(w_(h.body,N?()=>N+"ID"+$++:"iconifyReact"))},A.createElement("svg",d)}const{body:g,width:b,height:C}=e,E=a==="mask"||(a==="bg"?!1:g.indexOf("currentColor")!==-1),w=Y_(g,{...y,width:b+"",height:C+""});return d.style={...u,"--svg":K_(w),width:qd(y.width),height:qd(y.height),...Q_,...E?Ml:Hd,...c},A.createElement("span",d)};if(Fd(!0),T_("",O_),typeof document<"u"&&typeof window<"u"){const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!c_(o))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const o="IconifyProviders["+n+"] is invalid.";try{const s=t[n];if(typeof s!="object"||!s||s.resources===void 0)continue;S_(n,s)||console.error(o)}catch{console.error(o)}}}}function Kd(e){const[t,n]=A.useState(!!e.ssr),[o,s]=A.useState({});function a(C){if(C){const E=e.icon;if(typeof E=="object")return{name:"",data:E};const w=Dd(E);if(w)return{name:E,data:w}}return{name:""}}const[u,c]=A.useState(a(!!e.ssr));function d(){const C=o.callback;C&&(C(),s({}))}function h(C){if(JSON.stringify(u)!==JSON.stringify(C))return d(),c(C),!0}function y(){var C;const E=e.icon;if(typeof E=="object"){h({name:"",data:E});return}const w=Dd(E);if(h({name:E,data:w}))if(w===void 0){const $=j_([E],y);s({callback:$})}else w&&((C=e.onLoad)===null||C===void 0||C.call(e,E))}A.useEffect(()=>(n(!0),d),[]),A.useEffect(()=>{t&&y()},[e.icon,t]);const{name:g,data:b}=u;return b?t1({...Sl,...b},e,g):e.children?e.children:A.createElement("span",{})}const Fl=A.forwardRef((e,t)=>Kd({...e,_ref:t}));A.forwardRef((e,t)=>Kd({inline:!0,...e,_ref:t}));function n1(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Wn=n1,r1=typeof Un=="object"&&Un&&Un.Object===Object&&Un,Jd=r1,i1=Jd,o1=typeof self=="object"&&self&&self.Object===Object&&self,s1=i1||o1||Function("return this")(),bn=s1,a1=bn,l1=function(){return a1.Date.now()},u1=l1,c1=/\s/;function f1(e){for(var t=e.length;t--&&c1.test(e.charAt(t)););return t}var d1=f1,p1=d1,h1=/^\s+/;function g1(e){return e&&e.slice(0,p1(e)+1).replace(h1,"")}var m1=g1,y1=bn,v1=y1.Symbol,is=v1,Zd=is,Xd=Object.prototype,b1=Xd.hasOwnProperty,_1=Xd.toString,to=Zd?Zd.toStringTag:void 0;function w1(e){var t=b1.call(e,to),n=e[to];try{e[to]=void 0;var o=!0}catch{}var s=_1.call(e);return o&&(t?e[to]=n:delete e[to]),s}var T1=w1,S1=Object.prototype,C1=S1.toString;function E1(e){return C1.call(e)}var x1=E1,Qd=is,A1=T1,O1=x1,I1="[object Null]",P1="[object Undefined]",ep=Qd?Qd.toStringTag:void 0;function $1(e){return e==null?e===void 0?P1:I1:ep&&ep in Object(e)?A1(e):O1(e)}var ai=$1;function M1(e){return e!=null&&typeof e=="object"}var li=M1,F1=ai,D1=li,k1="[object Symbol]";function N1(e){return typeof e=="symbol"||D1(e)&&F1(e)==k1}var tp=N1,L1=m1,np=Wn,B1=tp,rp=NaN,z1=/^[-+]0x[0-9a-f]+$/i,U1=/^0b[01]+$/i,j1=/^0o[0-7]+$/i,W1=parseInt;function V1(e){if(typeof e=="number")return e;if(B1(e))return rp;if(np(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=np(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=L1(e);var n=U1.test(e);return n||j1.test(e)?W1(e.slice(2),n?2:8):z1.test(e)?rp:+e}var ip=V1,G1=Wn,Dl=u1,op=ip,H1="Expected a function",Y1=Math.max,R1=Math.min;function q1(e,t,n){var o,s,a,u,c,d,h=0,y=!1,g=!1,b=!0;if(typeof e!="function")throw new TypeError(H1);t=op(t)||0,G1(n)&&(y=!!n.leading,g="maxWait"in n,a=g?Y1(op(n.maxWait)||0,t):a,b="trailing"in n?!!n.trailing:b);function C(B){var Y=o,ae=s;return o=s=void 0,h=B,u=e.apply(ae,Y),u}function E(B){return h=B,c=setTimeout(N,t),y?C(B):u}function w(B){var Y=B-d,ae=B-h,te=t-Y;return g?R1(te,a-ae):te}function $(B){var Y=B-d,ae=B-h;return d===void 0||Y>=t||Y<0||g&&ae>=a}function N(){var B=Dl();if($(B))return J(B);c=setTimeout(N,w(B))}function J(B){return c=void 0,b&&o?C(B):(o=s=void 0,u)}function V(){c!==void 0&&clearTimeout(c),h=0,o=d=s=c=void 0}function L(){return c===void 0?u:J(Dl())}function D(){var B=Dl(),Y=$(B);if(o=arguments,s=this,d=B,Y){if(c===void 0)return E(d);if(g)return clearTimeout(c),c=setTimeout(N,t),C(d)}return c===void 0&&(c=setTimeout(N,t)),u}return D.cancel=V,D.flush=L,D}var K1=q1;const J1=rr(K1),Z1=(e,t,n,o,s,a=300)=>{const[u,c]=A.useState(n??t);A.useEffect(()=>{c(n??t)},[n]);const d=A.useCallback(J1(g=>e(o,g),a),[e,o,a]),h=A.useCallback(g=>{const b=s(g);c(b??t),d(b)},[d,s]),y=A.useCallback(()=>{c(t),e(o,void 0)},[t,e,o]);return[u,h,y]};function sr(e,t){return e===t||Array.isArray(e)&&e.includes(t)}function kl(e){return e!=null}var X1=Object.prototype;function Q1(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||X1;return e===n}var os=Q1;function ew(e,t){return function(n){return e(t(n))}}var sp=ew,tw=sp,nw=tw(Object.keys,Object),rw=nw,iw=os,ow=rw,sw=Object.prototype,aw=sw.hasOwnProperty;function lw(e){if(!iw(e))return ow(e);var t=[];for(var n in Object(e))aw.call(e,n)&&n!="constructor"&&t.push(n);return t}var uw=lw,cw=ai,fw=Wn,dw="[object AsyncFunction]",pw="[object Function]",hw="[object GeneratorFunction]",gw="[object Proxy]";function mw(e){if(!fw(e))return!1;var t=cw(e);return t==pw||t==hw||t==dw||t==gw}var Nl=mw,yw=bn,vw=yw["__core-js_shared__"],bw=vw,Ll=bw,ap=function(){var e=/[^.]+$/.exec(Ll&&Ll.keys&&Ll.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function _w(e){return!!ap&&ap in e}var ww=_w,Tw=Function.prototype,Sw=Tw.toString;function Cw(e){if(e!=null){try{return Sw.call(e)}catch{}try{return e+""}catch{}}return""}var lp=Cw,Ew=Nl,xw=ww,Aw=Wn,Ow=lp,Iw=/[\\^$.*+?()[\]{}|]/g,Pw=/^\[object .+?Constructor\]$/,$w=Function.prototype,Mw=Object.prototype,Fw=$w.toString,Dw=Mw.hasOwnProperty,kw=RegExp("^"+Fw.call(Dw).replace(Iw,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Nw(e){if(!Aw(e)||xw(e))return!1;var t=Ew(e)?kw:Pw;return t.test(Ow(e))}var Lw=Nw;function Bw(e,t){return e==null?void 0:e[t]}var zw=Bw,Uw=Lw,jw=zw;function Ww(e,t){var n=jw(e,t);return Uw(n)?n:void 0}var Fr=Ww,Vw=Fr,Gw=bn,Hw=Vw(Gw,"DataView"),Yw=Hw,Rw=Fr,qw=bn,Kw=Rw(qw,"Map"),Bl=Kw,Jw=Fr,Zw=bn,Xw=Jw(Zw,"Promise"),Qw=Xw,eT=Fr,tT=bn,nT=eT(tT,"Set"),up=nT,rT=Fr,iT=bn,oT=rT(iT,"WeakMap"),sT=oT,zl=Yw,Ul=Bl,jl=Qw,Wl=up,Vl=sT,cp=ai,ui=lp,fp="[object Map]",aT="[object Object]",dp="[object Promise]",pp="[object Set]",hp="[object WeakMap]",gp="[object DataView]",lT=ui(zl),uT=ui(Ul),cT=ui(jl),fT=ui(Wl),dT=ui(Vl),Dr=cp;(zl&&Dr(new zl(new ArrayBuffer(1)))!=gp||Ul&&Dr(new Ul)!=fp||jl&&Dr(jl.resolve())!=dp||Wl&&Dr(new Wl)!=pp||Vl&&Dr(new Vl)!=hp)&&(Dr=function(e){var t=cp(e),n=t==aT?e.constructor:void 0,o=n?ui(n):"";if(o)switch(o){case lT:return gp;case uT:return fp;case cT:return dp;case fT:return pp;case dT:return hp}return t});var pT=Dr,hT=ai,gT=li,mT="[object Arguments]";function yT(e){return gT(e)&&hT(e)==mT}var vT=yT,mp=vT,bT=li,yp=Object.prototype,_T=yp.hasOwnProperty,wT=yp.propertyIsEnumerable,TT=mp(function(){return arguments}())?mp:function(e){return bT(e)&&_T.call(e,"callee")&&!wT.call(e,"callee")},ss=TT,ST=Array.isArray,no=ST,CT=9007199254740991;function ET(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=CT}var vp=ET,xT=Nl,AT=vp;function OT(e){return e!=null&&AT(e.length)&&!xT(e)}var as=OT,ls={exports:{}};function IT(){return!1}var PT=IT;ls.exports,function(e,t){var n=bn,o=PT,s=t&&!t.nodeType&&t,a=s&&!0&&e&&!e.nodeType&&e,u=a&&a.exports===s,c=u?n.Buffer:void 0,d=c?c.isBuffer:void 0,h=d||o;e.exports=h}(ls,ls.exports);var Gl=ls.exports,$T=ai,MT=vp,FT=li,DT="[object Arguments]",kT="[object Array]",NT="[object Boolean]",LT="[object Date]",BT="[object Error]",zT="[object Function]",UT="[object Map]",jT="[object Number]",WT="[object Object]",VT="[object RegExp]",GT="[object Set]",HT="[object String]",YT="[object WeakMap]",RT="[object ArrayBuffer]",qT="[object DataView]",KT="[object Float32Array]",JT="[object Float64Array]",ZT="[object Int8Array]",XT="[object Int16Array]",QT="[object Int32Array]",eS="[object Uint8Array]",tS="[object Uint8ClampedArray]",nS="[object Uint16Array]",rS="[object Uint32Array]",Ze={};Ze[KT]=Ze[JT]=Ze[ZT]=Ze[XT]=Ze[QT]=Ze[eS]=Ze[tS]=Ze[nS]=Ze[rS]=!0,Ze[DT]=Ze[kT]=Ze[RT]=Ze[NT]=Ze[qT]=Ze[LT]=Ze[BT]=Ze[zT]=Ze[UT]=Ze[jT]=Ze[WT]=Ze[VT]=Ze[GT]=Ze[HT]=Ze[YT]=!1;function iS(e){return FT(e)&&MT(e.length)&&!!Ze[$T(e)]}var oS=iS;function sS(e){return function(t){return e(t)}}var aS=sS,us={exports:{}};us.exports,function(e,t){var n=Jd,o=t&&!t.nodeType&&t,s=o&&!0&&e&&!e.nodeType&&e,a=s&&s.exports===o,u=a&&n.process,c=function(){try{var d=s&&s.require&&s.require("util").types;return d||u&&u.binding&&u.binding("util")}catch{}}();e.exports=c}(us,us.exports);var lS=us.exports,uS=oS,cS=aS,bp=lS,_p=bp&&bp.isTypedArray,fS=_p?cS(_p):uS,Hl=fS,dS=uw,pS=pT,hS=ss,gS=no,mS=as,yS=Gl,vS=os,bS=Hl,_S="[object Map]",wS="[object Set]",TS=Object.prototype,SS=TS.hasOwnProperty;function CS(e){if(e==null)return!0;if(mS(e)&&(gS(e)||typeof e=="string"||typeof e.splice=="function"||yS(e)||bS(e)||hS(e)))return!e.length;var t=pS(e);if(t==_S||t==wS)return!e.size;if(vS(e))return!dS(e).length;for(var n in e)if(SS.call(e,n))return!1;return!0}var ES=CS;const wp=rr(ES),xS=(e,t,n,o,s,a,u)=>e.map((c,d)=>p.jsx(T.Grid.Col,{span:s==="row"?12/e.length:12,style:{alignContent:"start"},children:p.jsx(Me.JsonFormsDispatch,{uischema:c,schema:t,path:n,enabled:o,renderers:a,cells:u})},`${n}-${d}`)),AS=({elements:e,schema:t,path:n,enabled:o,direction:s,renderers:a,cells:u})=>wp(e)?null:p.jsx(T.Grid,{spacing:s==="row"?2:0,children:xS(e,t,n,o,s,a,u)}),cs=A.memo(AS);function Yl(e){return new Date(e.getTime()-e.getTimezoneOffset()*6e4).toISOString()}function Tp(e){const t=new Date(e);return new Date(t.getTime()+t.getTimezoneOffset()*6e4)}function Sp(e,{data:t,onChange:n}){return e?{checked:t||!1,onChange:o=>n(o.target.checked)}:{data:[{value:String(!0),label:"True"},{value:String(!1),label:"False"}],value:kl(t)?String(t):null,onChange:o=>n(kl(o)?o===String(!0):void 0)}}function In(e={}){const t=T.useProps("__",{},{});let n=null;return sr(e.schema.type,"null")||(sr(e.schema.type,"array")?n=[]:sr(e.schema.type,"object")?n={}:sr(e.schema.type,"string")&&(n="")),{inputWrapperOrder:["label","input","description","error"],label:e.label,description:e.description,required:e.required,disabled:!e.enabled,onChange:o=>e.handleChange(e.path,o??(t.setNull?n:void 0)),error:e.errors?e.errors.split(`
105
+ `).map(o=>p.jsx("span",{style:{display:"block"},children:o},o)):void 0}}function _n(e,t,n,o){const{specialKey:s}=xe(),a=T.useProps((s==null?void 0:s.all)||"all",{},{}),u=T.useProps(e,{},{}),c=T.useProps(t,{},{}),{component:d,props:h}=A.useMemo(()=>Bn(a,u,c),[u,a,c]);return[lt(d,{componentProps:n,jsonFormsProps:o}),{...n,...lt(h,{componentProps:n,jsonFormsProps:o})}]}function fs(e,t,{data:n,toggle:o,onChange:s}){const a=T.useMantineTheme(),u={valueFormat:e==="date"?"DD.MM.YYYY":t?"DD.MM.YYYY HH:mm (UTC)":"DD.MM.YYYY HH:mm",value:n?e==="date"||t?Tp(n):new Date(n):null,clearable:!0,onChange:c=>{c&&(e==="date"?c=Yl(c).split("T")[0]:t?c=Yl(c):c=c.toISOString()),s(c||void 0)}};return e!=="date"&&(u.placeholder=t?"DD.MM.YYYY HH:mm (UTC)":"DD.MM.YYYY HH:mm",u.rightSection=p.jsxs(T.Group,{gap:"0.25rem",wrap:"nowrap",children:[p.jsx(T.CloseButton,{variant:"transparent",size:"sm",onClick:()=>s(void 0),style:{visibility:n?void 0:"hidden"}}),p.jsx(T.CloseButton,{title:t?"UTC":"Local",variant:"subtle",size:"sm",onClick:()=>{o(),n&&s(void 0)},icon:p.jsx(Fl,{icon:"tabler:timezone",color:t?a.primaryColor:"gray"})})]}),u.rightSectionWidth="3.75rem"),u}function Cp({data:e,onChange:t}){const[n,o]=A.useState(""),s=A.useMemo(()=>e?typeof e=="object"?JSON.stringify(e,null,2):e:"",[e]);return A.useEffect(()=>{o(s)},[s]),{autosize:!0,minRows:4,maxRows:12,validationError:"Invalid JSON",formatOnBlur:!0,value:n,onBlur:()=>{if(!n){t(void 0);return}try{const a=JSON.parse(n);t(a)}catch{}},onChange:o}}function ds(e,t){return{data:A.useMemo(()=>t.oneOf?t.oneOf.map(o=>({value:o.const,label:o.title})):t.enum,[t.enum,t.oneOf]),value:e||null,searchable:!0}}function Ep(e,t,{onChange:n}){const o=ds(e,t);return{...o,value:o.value||[],onChange:s=>s.length?n(s):n(void 0)}}function xp(e,{data:t,onChange:n}){return{value:t||"",allowDecimal:e==="number",hideControls:!0,onChange:o=>n(o||void 0)}}function Ap({data:e,onChange:t}){return{value:e||"",onChange:n=>t(n.target.value||void 0)}}function Rl(e){const t=In(e),{path:n,data:o,schema:s}=e,a=A.useMemo(()=>s.format==="checkbox",[s.format]),u=Sp(a,{data:o,onChange:t.onChange}),c=A.useMemo(()=>({...t,...u}),[u,t]),[d,h]=_n("Boolean",n,c,e);return d===void 0?a?p.jsx(T.Checkbox,{...h}):p.jsx(T.Select,{...h}):d}function ql(e){const t=In(e),{path:n,data:o}=e,s=fs("date",!0,{data:o,onChange:t.onChange}),a=A.useMemo(()=>({...t,...s}),[t,s]),[u,c]=_n("Date",n,a,e);return u===void 0?p.jsx(ei.DateInput,{...c}):u}function Kl(e){const t=In(e),{path:n,data:o}=e,s=fs("date-time",!1,{data:o,toggle:()=>null,onChange:t.onChange}),[,{initialUTC:a}]=_n("DateTime",n,{...t,...s},e),[u,{toggle:c}]=rt.useDisclosure(a),{initialUTC:d,...h}=fs("date-time",u,{data:o,toggle:c,onChange:t.onChange}),y=A.useMemo(()=>({...t,...h}),[t,h]),[g,b]=_n("DateTime",n,y,e);return g===void 0?p.jsx(ei.DateTimePicker,{...b}):g}function Op(e){const t=In(e),{path:n,data:o}=e,s=Ep(o,e.schema.items,{onChange:t.onChange}),a=A.useMemo(()=>({...t,...s}),[t,s]),[u,c]=_n("EnumArray",n,a,e);return u===void 0?p.jsx(T.MultiSelect,{...c}):u}function Jl(e){const t=In(e),{path:n,data:o}=e,s=ds(o,e.schema),a=A.useMemo(()=>({...t,...s}),[t,s]),[u,c]=_n("Enum",n,a,e);return u===void 0?p.jsx(T.Select,{...c}):u}function Ip(e){const t=In(e),{path:n,data:o}=e,s=Cp({data:o,onChange:t.onChange}),a=A.useMemo(()=>({...t,...s}),[t,s]),[u,c]=_n("Text",n,a,e);return u===void 0?p.jsx(T.JsonInput,{...c}):u}function ro(e){const t=In(e),{path:n,data:o}=e,s=xp("number",{data:o,onChange:t.onChange}),a=A.useMemo(()=>({...t,...s}),[t,s]),[u,c]=_n("Number",n,a,e);return u===void 0?p.jsx(T.NumberInput,{...c}):u}var ps={exports:{}};/**
106
+ * @license
107
+ * Lodash <https://lodash.com/>
108
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
109
+ * Released under MIT license <https://lodash.com/license>
110
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
111
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
112
+ */ps.exports,function(e,t){(function(){var n,o="4.17.21",s=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",c="Invalid `variable` option passed into `_.template`",d="__lodash_hash_undefined__",h=500,y="__lodash_placeholder__",g=1,b=2,C=4,E=1,w=2,$=1,N=2,J=4,V=8,L=16,D=32,B=64,Y=128,ae=256,te=512,S=30,W="...",Q=800,fe=16,he=1,Fe=2,De=3,Ue=1/0,Ie=9007199254740991,pt=17976931348623157e292,R=NaN,k=4294967295,K=k-1,X=k>>>1,ue=[["ary",Y],["bind",$],["bindKey",N],["curry",V],["curryRight",L],["flip",te],["partial",D],["partialRight",B],["rearg",ae]],ne="[object Arguments]",de="[object Array]",ye="[object AsyncFunction]",ve="[object Boolean]",we="[object Date]",Se="[object DOMException]",et="[object Error]",ee="[object Function]",mt="[object GeneratorFunction]",Ke="[object Map]",Nt="[object Number]",Ne="[object Null]",yt="[object Object]",Br="[object Promise]",xi="[object Proxy]",cr="[object RegExp]",Wt="[object Set]",zr="[object String]",fr="[object Symbol]",Ur="[object Undefined]",an="[object WeakMap]",dr="[object WeakSet]",pr="[object ArrayBuffer]",Yn="[object DataView]",Ai="[object Float32Array]",jr="[object Float64Array]",Oi="[object Int8Array]",hr="[object Int16Array]",gr="[object Int32Array]",Jt="[object Uint8Array]",Fn="[object Uint8ClampedArray]",Wr="[object Uint16Array]",Vr="[object Uint32Array]",tc=/\b__p \+= '';/g,Ii=/\b(__p \+=) '' \+/g,Pi=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Vs=/&(?:amp|lt|gt|quot|#39);/g,mr=/[&<>"']/g,nc=RegExp(Vs.source),rc=RegExp(mr.source),ht=/<%-([\s\S]+?)%>/g,yr=/<%([\s\S]+?)%>/g,Gs=/<%=([\s\S]+?)%>/g,Hs=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wo=/^\w*$/,Ys=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,$i=/[\\^$.*+?()[\]{}|]/g,ic=RegExp($i.source),Vt=/^\s+/,Mi=/\s/,Rs=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,qs=/\{\n\/\* \[wrapped with (.+)\] \*/,To=/,? & /,Ks=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Tn=/[()=,{}\[\]\/\s]/,Js=/\\(\\)?/g,Zs=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,So=/\w*$/,Xs=/^[-+]0x[0-9a-f]+$/i,oc=/^0b[01]+$/i,ce=/^\[object .+?Constructor\]$/,P=/^0o[0-7]+$/i,Z=/^(?:0|[1-9]\d*)$/,oe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,We=/($^)/,Tt=/['\n\r\u2028\u2029\\]/g,st="\\ud800-\\udfff",It="\\u0300-\\u036f",ln="\\ufe20-\\ufe2f",Gr="\\u20d0-\\u20ff",St=It+ln+Gr,Co="\\u2700-\\u27bf",Eo="a-z\\xdf-\\xf6\\xf8-\\xff",JD="\\xac\\xb1\\xd7\\xf7",ZD="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",XD="\\u2000-\\u206f",QD=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",O0="A-Z\\xc0-\\xd6\\xd8-\\xde",I0="\\ufe0e\\ufe0f",P0=JD+ZD+XD+QD,sc="['’]",ek="["+st+"]",$0="["+P0+"]",Qs="["+St+"]",M0="\\d+",tk="["+Co+"]",F0="["+Eo+"]",D0="[^"+st+P0+M0+Co+Eo+O0+"]",ac="\\ud83c[\\udffb-\\udfff]",nk="(?:"+Qs+"|"+ac+")",k0="[^"+st+"]",lc="(?:\\ud83c[\\udde6-\\uddff]){2}",uc="[\\ud800-\\udbff][\\udc00-\\udfff]",Fi="["+O0+"]",N0="\\u200d",L0="(?:"+F0+"|"+D0+")",rk="(?:"+Fi+"|"+D0+")",B0="(?:"+sc+"(?:d|ll|m|re|s|t|ve))?",z0="(?:"+sc+"(?:D|LL|M|RE|S|T|VE))?",U0=nk+"?",j0="["+I0+"]?",ik="(?:"+N0+"(?:"+[k0,lc,uc].join("|")+")"+j0+U0+")*",ok="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",sk="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",W0=j0+U0+ik,ak="(?:"+[tk,lc,uc].join("|")+")"+W0,lk="(?:"+[k0+Qs+"?",Qs,lc,uc,ek].join("|")+")",uk=RegExp(sc,"g"),ck=RegExp(Qs,"g"),cc=RegExp(ac+"(?="+ac+")|"+lk+W0,"g"),fk=RegExp([Fi+"?"+F0+"+"+B0+"(?="+[$0,Fi,"$"].join("|")+")",rk+"+"+z0+"(?="+[$0,Fi+L0,"$"].join("|")+")",Fi+"?"+L0+"+"+B0,Fi+"+"+z0,sk,ok,M0,ak].join("|"),"g"),dk=RegExp("["+N0+st+St+I0+"]"),pk=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,hk=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],gk=-1,Xe={};Xe[Ai]=Xe[jr]=Xe[Oi]=Xe[hr]=Xe[gr]=Xe[Jt]=Xe[Fn]=Xe[Wr]=Xe[Vr]=!0,Xe[ne]=Xe[de]=Xe[pr]=Xe[ve]=Xe[Yn]=Xe[we]=Xe[et]=Xe[ee]=Xe[Ke]=Xe[Nt]=Xe[yt]=Xe[cr]=Xe[Wt]=Xe[zr]=Xe[an]=!1;var Je={};Je[ne]=Je[de]=Je[pr]=Je[Yn]=Je[ve]=Je[we]=Je[Ai]=Je[jr]=Je[Oi]=Je[hr]=Je[gr]=Je[Ke]=Je[Nt]=Je[yt]=Je[cr]=Je[Wt]=Je[zr]=Je[fr]=Je[Jt]=Je[Fn]=Je[Wr]=Je[Vr]=!0,Je[et]=Je[ee]=Je[an]=!1;var mk={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},yk={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},vk={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},bk={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},_k=parseFloat,wk=parseInt,V0=typeof Un=="object"&&Un&&Un.Object===Object&&Un,Tk=typeof self=="object"&&self&&self.Object===Object&&self,Et=V0||Tk||Function("return this")(),fc=t&&!t.nodeType&&t,Hr=fc&&!0&&e&&!e.nodeType&&e,G0=Hr&&Hr.exports===fc,dc=G0&&V0.process,un=function(){try{var M=Hr&&Hr.require&&Hr.require("util").types;return M||dc&&dc.binding&&dc.binding("util")}catch{}}(),H0=un&&un.isArrayBuffer,Y0=un&&un.isDate,R0=un&&un.isMap,q0=un&&un.isRegExp,K0=un&&un.isSet,J0=un&&un.isTypedArray;function Zt(M,j,z){switch(z.length){case 0:return M.call(j);case 1:return M.call(j,z[0]);case 2:return M.call(j,z[0],z[1]);case 3:return M.call(j,z[0],z[1],z[2])}return M.apply(j,z)}function Sk(M,j,z,ie){for(var be=-1,Le=M==null?0:M.length;++be<Le;){var vt=M[be];j(ie,vt,z(vt),M)}return ie}function cn(M,j){for(var z=-1,ie=M==null?0:M.length;++z<ie&&j(M[z],z,M)!==!1;);return M}function Ck(M,j){for(var z=M==null?0:M.length;z--&&j(M[z],z,M)!==!1;);return M}function Z0(M,j){for(var z=-1,ie=M==null?0:M.length;++z<ie;)if(!j(M[z],z,M))return!1;return!0}function vr(M,j){for(var z=-1,ie=M==null?0:M.length,be=0,Le=[];++z<ie;){var vt=M[z];j(vt,z,M)&&(Le[be++]=vt)}return Le}function ea(M,j){var z=M==null?0:M.length;return!!z&&Di(M,j,0)>-1}function pc(M,j,z){for(var ie=-1,be=M==null?0:M.length;++ie<be;)if(z(j,M[ie]))return!0;return!1}function tt(M,j){for(var z=-1,ie=M==null?0:M.length,be=Array(ie);++z<ie;)be[z]=j(M[z],z,M);return be}function br(M,j){for(var z=-1,ie=j.length,be=M.length;++z<ie;)M[be+z]=j[z];return M}function hc(M,j,z,ie){var be=-1,Le=M==null?0:M.length;for(ie&&Le&&(z=M[++be]);++be<Le;)z=j(z,M[be],be,M);return z}function Ek(M,j,z,ie){var be=M==null?0:M.length;for(ie&&be&&(z=M[--be]);be--;)z=j(z,M[be],be,M);return z}function gc(M,j){for(var z=-1,ie=M==null?0:M.length;++z<ie;)if(j(M[z],z,M))return!0;return!1}var xk=mc("length");function Ak(M){return M.split("")}function Ok(M){return M.match(Ks)||[]}function X0(M,j,z){var ie;return z(M,function(be,Le,vt){if(j(be,Le,vt))return ie=Le,!1}),ie}function ta(M,j,z,ie){for(var be=M.length,Le=z+(ie?1:-1);ie?Le--:++Le<be;)if(j(M[Le],Le,M))return Le;return-1}function Di(M,j,z){return j===j?Uk(M,j,z):ta(M,Q0,z)}function Ik(M,j,z,ie){for(var be=z-1,Le=M.length;++be<Le;)if(ie(M[be],j))return be;return-1}function Q0(M){return M!==M}function ey(M,j){var z=M==null?0:M.length;return z?vc(M,j)/z:R}function mc(M){return function(j){return j==null?n:j[M]}}function yc(M){return function(j){return M==null?n:M[j]}}function ty(M,j,z,ie,be){return be(M,function(Le,vt,qe){z=ie?(ie=!1,Le):j(z,Le,vt,qe)}),z}function Pk(M,j){var z=M.length;for(M.sort(j);z--;)M[z]=M[z].value;return M}function vc(M,j){for(var z,ie=-1,be=M.length;++ie<be;){var Le=j(M[ie]);Le!==n&&(z=z===n?Le:z+Le)}return z}function bc(M,j){for(var z=-1,ie=Array(M);++z<M;)ie[z]=j(z);return ie}function $k(M,j){return tt(j,function(z){return[z,M[z]]})}function ny(M){return M&&M.slice(0,sy(M)+1).replace(Vt,"")}function Xt(M){return function(j){return M(j)}}function _c(M,j){return tt(j,function(z){return M[z]})}function xo(M,j){return M.has(j)}function ry(M,j){for(var z=-1,ie=M.length;++z<ie&&Di(j,M[z],0)>-1;);return z}function iy(M,j){for(var z=M.length;z--&&Di(j,M[z],0)>-1;);return z}function Mk(M,j){for(var z=M.length,ie=0;z--;)M[z]===j&&++ie;return ie}var Fk=yc(mk),Dk=yc(yk);function kk(M){return"\\"+bk[M]}function Nk(M,j){return M==null?n:M[j]}function ki(M){return dk.test(M)}function Lk(M){return pk.test(M)}function Bk(M){for(var j,z=[];!(j=M.next()).done;)z.push(j.value);return z}function wc(M){var j=-1,z=Array(M.size);return M.forEach(function(ie,be){z[++j]=[be,ie]}),z}function oy(M,j){return function(z){return M(j(z))}}function _r(M,j){for(var z=-1,ie=M.length,be=0,Le=[];++z<ie;){var vt=M[z];(vt===j||vt===y)&&(M[z]=y,Le[be++]=z)}return Le}function na(M){var j=-1,z=Array(M.size);return M.forEach(function(ie){z[++j]=ie}),z}function zk(M){var j=-1,z=Array(M.size);return M.forEach(function(ie){z[++j]=[ie,ie]}),z}function Uk(M,j,z){for(var ie=z-1,be=M.length;++ie<be;)if(M[ie]===j)return ie;return-1}function jk(M,j,z){for(var ie=z+1;ie--;)if(M[ie]===j)return ie;return ie}function Ni(M){return ki(M)?Vk(M):xk(M)}function Sn(M){return ki(M)?Gk(M):Ak(M)}function sy(M){for(var j=M.length;j--&&Mi.test(M.charAt(j)););return j}var Wk=yc(vk);function Vk(M){for(var j=cc.lastIndex=0;cc.test(M);)++j;return j}function Gk(M){return M.match(cc)||[]}function Hk(M){return M.match(fk)||[]}var Yk=function M(j){j=j==null?Et:Li.defaults(Et.Object(),j,Li.pick(Et,hk));var z=j.Array,ie=j.Date,be=j.Error,Le=j.Function,vt=j.Math,qe=j.Object,Tc=j.RegExp,Rk=j.String,fn=j.TypeError,ra=z.prototype,qk=Le.prototype,Bi=qe.prototype,ia=j["__core-js_shared__"],oa=qk.toString,Ve=Bi.hasOwnProperty,Kk=0,ay=function(){var r=/[^.]+$/.exec(ia&&ia.keys&&ia.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}(),sa=Bi.toString,Jk=oa.call(qe),Zk=Et._,Xk=Tc("^"+oa.call(Ve).replace($i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),aa=G0?j.Buffer:n,wr=j.Symbol,la=j.Uint8Array,ly=aa?aa.allocUnsafe:n,ua=oy(qe.getPrototypeOf,qe),uy=qe.create,cy=Bi.propertyIsEnumerable,ca=ra.splice,fy=wr?wr.isConcatSpreadable:n,Ao=wr?wr.iterator:n,Yr=wr?wr.toStringTag:n,fa=function(){try{var r=Zr(qe,"defineProperty");return r({},"",{}),r}catch{}}(),Qk=j.clearTimeout!==Et.clearTimeout&&j.clearTimeout,eN=ie&&ie.now!==Et.Date.now&&ie.now,tN=j.setTimeout!==Et.setTimeout&&j.setTimeout,da=vt.ceil,pa=vt.floor,Sc=qe.getOwnPropertySymbols,nN=aa?aa.isBuffer:n,dy=j.isFinite,rN=ra.join,iN=oy(qe.keys,qe),bt=vt.max,Pt=vt.min,oN=ie.now,sN=j.parseInt,py=vt.random,aN=ra.reverse,Cc=Zr(j,"DataView"),Oo=Zr(j,"Map"),Ec=Zr(j,"Promise"),zi=Zr(j,"Set"),Io=Zr(j,"WeakMap"),Po=Zr(qe,"create"),ha=Io&&new Io,Ui={},lN=Xr(Cc),uN=Xr(Oo),cN=Xr(Ec),fN=Xr(zi),dN=Xr(Io),ga=wr?wr.prototype:n,$o=ga?ga.valueOf:n,hy=ga?ga.toString:n;function v(r){if(at(r)&&!_e(r)&&!(r instanceof Pe)){if(r instanceof dn)return r;if(Ve.call(r,"__wrapped__"))return gv(r)}return new dn(r)}var ji=function(){function r(){}return function(i){if(!nt(i))return{};if(uy)return uy(i);r.prototype=i;var l=new r;return r.prototype=n,l}}();function ma(){}function dn(r,i){this.__wrapped__=r,this.__actions__=[],this.__chain__=!!i,this.__index__=0,this.__values__=n}v.templateSettings={escape:ht,evaluate:yr,interpolate:Gs,variable:"",imports:{_:v}},v.prototype=ma.prototype,v.prototype.constructor=v,dn.prototype=ji(ma.prototype),dn.prototype.constructor=dn;function Pe(r){this.__wrapped__=r,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=k,this.__views__=[]}function pN(){var r=new Pe(this.__wrapped__);return r.__actions__=Gt(this.__actions__),r.__dir__=this.__dir__,r.__filtered__=this.__filtered__,r.__iteratees__=Gt(this.__iteratees__),r.__takeCount__=this.__takeCount__,r.__views__=Gt(this.__views__),r}function hN(){if(this.__filtered__){var r=new Pe(this);r.__dir__=-1,r.__filtered__=!0}else r=this.clone(),r.__dir__*=-1;return r}function gN(){var r=this.__wrapped__.value(),i=this.__dir__,l=_e(r),f=i<0,m=l?r.length:0,_=AL(0,m,this.__views__),x=_.start,I=_.end,F=I-x,G=f?I:x-1,H=this.__iteratees__,q=H.length,re=0,le=Pt(F,this.__takeCount__);if(!l||!f&&m==F&&le==F)return By(r,this.__actions__);var ge=[];e:for(;F--&&re<le;){G+=i;for(var Ce=-1,me=r[G];++Ce<q;){var Oe=H[Ce],$e=Oe.iteratee,tn=Oe.type,zt=$e(me);if(tn==Fe)me=zt;else if(!zt){if(tn==he)continue e;break e}}ge[re++]=me}return ge}Pe.prototype=ji(ma.prototype),Pe.prototype.constructor=Pe;function Rr(r){var i=-1,l=r==null?0:r.length;for(this.clear();++i<l;){var f=r[i];this.set(f[0],f[1])}}function mN(){this.__data__=Po?Po(null):{},this.size=0}function yN(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}function vN(r){var i=this.__data__;if(Po){var l=i[r];return l===d?n:l}return Ve.call(i,r)?i[r]:n}function bN(r){var i=this.__data__;return Po?i[r]!==n:Ve.call(i,r)}function _N(r,i){var l=this.__data__;return this.size+=this.has(r)?0:1,l[r]=Po&&i===n?d:i,this}Rr.prototype.clear=mN,Rr.prototype.delete=yN,Rr.prototype.get=vN,Rr.prototype.has=bN,Rr.prototype.set=_N;function Rn(r){var i=-1,l=r==null?0:r.length;for(this.clear();++i<l;){var f=r[i];this.set(f[0],f[1])}}function wN(){this.__data__=[],this.size=0}function TN(r){var i=this.__data__,l=ya(i,r);if(l<0)return!1;var f=i.length-1;return l==f?i.pop():ca.call(i,l,1),--this.size,!0}function SN(r){var i=this.__data__,l=ya(i,r);return l<0?n:i[l][1]}function CN(r){return ya(this.__data__,r)>-1}function EN(r,i){var l=this.__data__,f=ya(l,r);return f<0?(++this.size,l.push([r,i])):l[f][1]=i,this}Rn.prototype.clear=wN,Rn.prototype.delete=TN,Rn.prototype.get=SN,Rn.prototype.has=CN,Rn.prototype.set=EN;function qn(r){var i=-1,l=r==null?0:r.length;for(this.clear();++i<l;){var f=r[i];this.set(f[0],f[1])}}function xN(){this.size=0,this.__data__={hash:new Rr,map:new(Oo||Rn),string:new Rr}}function AN(r){var i=Ia(this,r).delete(r);return this.size-=i?1:0,i}function ON(r){return Ia(this,r).get(r)}function IN(r){return Ia(this,r).has(r)}function PN(r,i){var l=Ia(this,r),f=l.size;return l.set(r,i),this.size+=l.size==f?0:1,this}qn.prototype.clear=xN,qn.prototype.delete=AN,qn.prototype.get=ON,qn.prototype.has=IN,qn.prototype.set=PN;function qr(r){var i=-1,l=r==null?0:r.length;for(this.__data__=new qn;++i<l;)this.add(r[i])}function $N(r){return this.__data__.set(r,d),this}function MN(r){return this.__data__.has(r)}qr.prototype.add=qr.prototype.push=$N,qr.prototype.has=MN;function Cn(r){var i=this.__data__=new Rn(r);this.size=i.size}function FN(){this.__data__=new Rn,this.size=0}function DN(r){var i=this.__data__,l=i.delete(r);return this.size=i.size,l}function kN(r){return this.__data__.get(r)}function NN(r){return this.__data__.has(r)}function LN(r,i){var l=this.__data__;if(l instanceof Rn){var f=l.__data__;if(!Oo||f.length<s-1)return f.push([r,i]),this.size=++l.size,this;l=this.__data__=new qn(f)}return l.set(r,i),this.size=l.size,this}Cn.prototype.clear=FN,Cn.prototype.delete=DN,Cn.prototype.get=kN,Cn.prototype.has=NN,Cn.prototype.set=LN;function gy(r,i){var l=_e(r),f=!l&&Qr(r),m=!l&&!f&&xr(r),_=!l&&!f&&!m&&Hi(r),x=l||f||m||_,I=x?bc(r.length,Rk):[],F=I.length;for(var G in r)(i||Ve.call(r,G))&&!(x&&(G=="length"||m&&(G=="offset"||G=="parent")||_&&(G=="buffer"||G=="byteLength"||G=="byteOffset")||Xn(G,F)))&&I.push(G);return I}function my(r){var i=r.length;return i?r[Nc(0,i-1)]:n}function BN(r,i){return Pa(Gt(r),Kr(i,0,r.length))}function zN(r){return Pa(Gt(r))}function xc(r,i,l){(l!==n&&!En(r[i],l)||l===n&&!(i in r))&&Kn(r,i,l)}function Mo(r,i,l){var f=r[i];(!(Ve.call(r,i)&&En(f,l))||l===n&&!(i in r))&&Kn(r,i,l)}function ya(r,i){for(var l=r.length;l--;)if(En(r[l][0],i))return l;return-1}function UN(r,i,l,f){return Tr(r,function(m,_,x){i(f,m,l(m),x)}),f}function yy(r,i){return r&&kn(i,Ct(i),r)}function jN(r,i){return r&&kn(i,Yt(i),r)}function Kn(r,i,l){i=="__proto__"&&fa?fa(r,i,{configurable:!0,enumerable:!0,value:l,writable:!0}):r[i]=l}function Ac(r,i){for(var l=-1,f=i.length,m=z(f),_=r==null;++l<f;)m[l]=_?n:lf(r,i[l]);return m}function Kr(r,i,l){return r===r&&(l!==n&&(r=r<=l?r:l),i!==n&&(r=r>=i?r:i)),r}function pn(r,i,l,f,m,_){var x,I=i&g,F=i&b,G=i&C;if(l&&(x=m?l(r,f,m,_):l(r)),x!==n)return x;if(!nt(r))return r;var H=_e(r);if(H){if(x=IL(r),!I)return Gt(r,x)}else{var q=$t(r),re=q==ee||q==mt;if(xr(r))return jy(r,I);if(q==yt||q==ne||re&&!m){if(x=F||re?{}:sv(r),!I)return F?vL(r,jN(x,r)):yL(r,yy(x,r))}else{if(!Je[q])return m?r:{};x=PL(r,q,I)}}_||(_=new Cn);var le=_.get(r);if(le)return le;_.set(r,x),kv(r)?r.forEach(function(me){x.add(pn(me,i,l,me,r,_))}):Fv(r)&&r.forEach(function(me,Oe){x.set(Oe,pn(me,i,l,Oe,r,_))});var ge=G?F?Rc:Yc:F?Yt:Ct,Ce=H?n:ge(r);return cn(Ce||r,function(me,Oe){Ce&&(Oe=me,me=r[Oe]),Mo(x,Oe,pn(me,i,l,Oe,r,_))}),x}function WN(r){var i=Ct(r);return function(l){return vy(l,r,i)}}function vy(r,i,l){var f=l.length;if(r==null)return!f;for(r=qe(r);f--;){var m=l[f],_=i[m],x=r[m];if(x===n&&!(m in r)||!_(x))return!1}return!0}function by(r,i,l){if(typeof r!="function")throw new fn(u);return zo(function(){r.apply(n,l)},i)}function Fo(r,i,l,f){var m=-1,_=ea,x=!0,I=r.length,F=[],G=i.length;if(!I)return F;l&&(i=tt(i,Xt(l))),f?(_=pc,x=!1):i.length>=s&&(_=xo,x=!1,i=new qr(i));e:for(;++m<I;){var H=r[m],q=l==null?H:l(H);if(H=f||H!==0?H:0,x&&q===q){for(var re=G;re--;)if(i[re]===q)continue e;F.push(H)}else _(i,q,f)||F.push(H)}return F}var Tr=Yy(Dn),_y=Yy(Ic,!0);function VN(r,i){var l=!0;return Tr(r,function(f,m,_){return l=!!i(f,m,_),l}),l}function va(r,i,l){for(var f=-1,m=r.length;++f<m;){var _=r[f],x=i(_);if(x!=null&&(I===n?x===x&&!en(x):l(x,I)))var I=x,F=_}return F}function GN(r,i,l,f){var m=r.length;for(l=Te(l),l<0&&(l=-l>m?0:m+l),f=f===n||f>m?m:Te(f),f<0&&(f+=m),f=l>f?0:Lv(f);l<f;)r[l++]=i;return r}function wy(r,i){var l=[];return Tr(r,function(f,m,_){i(f,m,_)&&l.push(f)}),l}function xt(r,i,l,f,m){var _=-1,x=r.length;for(l||(l=ML),m||(m=[]);++_<x;){var I=r[_];i>0&&l(I)?i>1?xt(I,i-1,l,f,m):br(m,I):f||(m[m.length]=I)}return m}var Oc=Ry(),Ty=Ry(!0);function Dn(r,i){return r&&Oc(r,i,Ct)}function Ic(r,i){return r&&Ty(r,i,Ct)}function ba(r,i){return vr(i,function(l){return Qn(r[l])})}function Jr(r,i){i=Cr(i,r);for(var l=0,f=i.length;r!=null&&l<f;)r=r[Nn(i[l++])];return l&&l==f?r:n}function Sy(r,i,l){var f=i(r);return _e(r)?f:br(f,l(r))}function Lt(r){return r==null?r===n?Ur:Ne:Yr&&Yr in qe(r)?xL(r):zL(r)}function Pc(r,i){return r>i}function HN(r,i){return r!=null&&Ve.call(r,i)}function YN(r,i){return r!=null&&i in qe(r)}function RN(r,i,l){return r>=Pt(i,l)&&r<bt(i,l)}function $c(r,i,l){for(var f=l?pc:ea,m=r[0].length,_=r.length,x=_,I=z(_),F=1/0,G=[];x--;){var H=r[x];x&&i&&(H=tt(H,Xt(i))),F=Pt(H.length,F),I[x]=!l&&(i||m>=120&&H.length>=120)?new qr(x&&H):n}H=r[0];var q=-1,re=I[0];e:for(;++q<m&&G.length<F;){var le=H[q],ge=i?i(le):le;if(le=l||le!==0?le:0,!(re?xo(re,ge):f(G,ge,l))){for(x=_;--x;){var Ce=I[x];if(!(Ce?xo(Ce,ge):f(r[x],ge,l)))continue e}re&&re.push(ge),G.push(le)}}return G}function qN(r,i,l,f){return Dn(r,function(m,_,x){i(f,l(m),_,x)}),f}function Do(r,i,l){i=Cr(i,r),r=cv(r,i);var f=r==null?r:r[Nn(gn(i))];return f==null?n:Zt(f,r,l)}function Cy(r){return at(r)&&Lt(r)==ne}function KN(r){return at(r)&&Lt(r)==pr}function JN(r){return at(r)&&Lt(r)==we}function ko(r,i,l,f,m){return r===i?!0:r==null||i==null||!at(r)&&!at(i)?r!==r&&i!==i:ZN(r,i,l,f,ko,m)}function ZN(r,i,l,f,m,_){var x=_e(r),I=_e(i),F=x?de:$t(r),G=I?de:$t(i);F=F==ne?yt:F,G=G==ne?yt:G;var H=F==yt,q=G==yt,re=F==G;if(re&&xr(r)){if(!xr(i))return!1;x=!0,H=!1}if(re&&!H)return _||(_=new Cn),x||Hi(r)?rv(r,i,l,f,m,_):CL(r,i,F,l,f,m,_);if(!(l&E)){var le=H&&Ve.call(r,"__wrapped__"),ge=q&&Ve.call(i,"__wrapped__");if(le||ge){var Ce=le?r.value():r,me=ge?i.value():i;return _||(_=new Cn),m(Ce,me,l,f,_)}}return re?(_||(_=new Cn),EL(r,i,l,f,m,_)):!1}function XN(r){return at(r)&&$t(r)==Ke}function Mc(r,i,l,f){var m=l.length,_=m,x=!f;if(r==null)return!_;for(r=qe(r);m--;){var I=l[m];if(x&&I[2]?I[1]!==r[I[0]]:!(I[0]in r))return!1}for(;++m<_;){I=l[m];var F=I[0],G=r[F],H=I[1];if(x&&I[2]){if(G===n&&!(F in r))return!1}else{var q=new Cn;if(f)var re=f(G,H,F,r,i,q);if(!(re===n?ko(H,G,E|w,f,q):re))return!1}}return!0}function Ey(r){if(!nt(r)||DL(r))return!1;var i=Qn(r)?Xk:ce;return i.test(Xr(r))}function QN(r){return at(r)&&Lt(r)==cr}function eL(r){return at(r)&&$t(r)==Wt}function tL(r){return at(r)&&Na(r.length)&&!!Xe[Lt(r)]}function xy(r){return typeof r=="function"?r:r==null?Rt:typeof r=="object"?_e(r)?Iy(r[0],r[1]):Oy(r):qv(r)}function Fc(r){if(!Bo(r))return iN(r);var i=[];for(var l in qe(r))Ve.call(r,l)&&l!="constructor"&&i.push(l);return i}function nL(r){if(!nt(r))return BL(r);var i=Bo(r),l=[];for(var f in r)f=="constructor"&&(i||!Ve.call(r,f))||l.push(f);return l}function Dc(r,i){return r<i}function Ay(r,i){var l=-1,f=Ht(r)?z(r.length):[];return Tr(r,function(m,_,x){f[++l]=i(m,_,x)}),f}function Oy(r){var i=Kc(r);return i.length==1&&i[0][2]?lv(i[0][0],i[0][1]):function(l){return l===r||Mc(l,r,i)}}function Iy(r,i){return Zc(r)&&av(i)?lv(Nn(r),i):function(l){var f=lf(l,r);return f===n&&f===i?uf(l,r):ko(i,f,E|w)}}function _a(r,i,l,f,m){r!==i&&Oc(i,function(_,x){if(m||(m=new Cn),nt(_))rL(r,i,x,l,_a,f,m);else{var I=f?f(Qc(r,x),_,x+"",r,i,m):n;I===n&&(I=_),xc(r,x,I)}},Yt)}function rL(r,i,l,f,m,_,x){var I=Qc(r,l),F=Qc(i,l),G=x.get(F);if(G){xc(r,l,G);return}var H=_?_(I,F,l+"",r,i,x):n,q=H===n;if(q){var re=_e(F),le=!re&&xr(F),ge=!re&&!le&&Hi(F);H=F,re||le||ge?_e(I)?H=I:ct(I)?H=Gt(I):le?(q=!1,H=jy(F,!0)):ge?(q=!1,H=Wy(F,!0)):H=[]:Uo(F)||Qr(F)?(H=I,Qr(I)?H=Bv(I):(!nt(I)||Qn(I))&&(H=sv(F))):q=!1}q&&(x.set(F,H),m(H,F,f,_,x),x.delete(F)),xc(r,l,H)}function Py(r,i){var l=r.length;if(l)return i+=i<0?l:0,Xn(i,l)?r[i]:n}function $y(r,i,l){i.length?i=tt(i,function(_){return _e(_)?function(x){return Jr(x,_.length===1?_[0]:_)}:_}):i=[Rt];var f=-1;i=tt(i,Xt(pe()));var m=Ay(r,function(_,x,I){var F=tt(i,function(G){return G(_)});return{criteria:F,index:++f,value:_}});return Pk(m,function(_,x){return mL(_,x,l)})}function iL(r,i){return My(r,i,function(l,f){return uf(r,f)})}function My(r,i,l){for(var f=-1,m=i.length,_={};++f<m;){var x=i[f],I=Jr(r,x);l(I,x)&&No(_,Cr(x,r),I)}return _}function oL(r){return function(i){return Jr(i,r)}}function kc(r,i,l,f){var m=f?Ik:Di,_=-1,x=i.length,I=r;for(r===i&&(i=Gt(i)),l&&(I=tt(r,Xt(l)));++_<x;)for(var F=0,G=i[_],H=l?l(G):G;(F=m(I,H,F,f))>-1;)I!==r&&ca.call(I,F,1),ca.call(r,F,1);return r}function Fy(r,i){for(var l=r?i.length:0,f=l-1;l--;){var m=i[l];if(l==f||m!==_){var _=m;Xn(m)?ca.call(r,m,1):zc(r,m)}}return r}function Nc(r,i){return r+pa(py()*(i-r+1))}function sL(r,i,l,f){for(var m=-1,_=bt(da((i-r)/(l||1)),0),x=z(_);_--;)x[f?_:++m]=r,r+=l;return x}function Lc(r,i){var l="";if(!r||i<1||i>Ie)return l;do i%2&&(l+=r),i=pa(i/2),i&&(r+=r);while(i);return l}function Ee(r,i){return ef(uv(r,i,Rt),r+"")}function aL(r){return my(Yi(r))}function lL(r,i){var l=Yi(r);return Pa(l,Kr(i,0,l.length))}function No(r,i,l,f){if(!nt(r))return r;i=Cr(i,r);for(var m=-1,_=i.length,x=_-1,I=r;I!=null&&++m<_;){var F=Nn(i[m]),G=l;if(F==="__proto__"||F==="constructor"||F==="prototype")return r;if(m!=x){var H=I[F];G=f?f(H,F,I):n,G===n&&(G=nt(H)?H:Xn(i[m+1])?[]:{})}Mo(I,F,G),I=I[F]}return r}var Dy=ha?function(r,i){return ha.set(r,i),r}:Rt,uL=fa?function(r,i){return fa(r,"toString",{configurable:!0,enumerable:!1,value:ff(i),writable:!0})}:Rt;function cL(r){return Pa(Yi(r))}function hn(r,i,l){var f=-1,m=r.length;i<0&&(i=-i>m?0:m+i),l=l>m?m:l,l<0&&(l+=m),m=i>l?0:l-i>>>0,i>>>=0;for(var _=z(m);++f<m;)_[f]=r[f+i];return _}function fL(r,i){var l;return Tr(r,function(f,m,_){return l=i(f,m,_),!l}),!!l}function wa(r,i,l){var f=0,m=r==null?f:r.length;if(typeof i=="number"&&i===i&&m<=X){for(;f<m;){var _=f+m>>>1,x=r[_];x!==null&&!en(x)&&(l?x<=i:x<i)?f=_+1:m=_}return m}return Bc(r,i,Rt,l)}function Bc(r,i,l,f){var m=0,_=r==null?0:r.length;if(_===0)return 0;i=l(i);for(var x=i!==i,I=i===null,F=en(i),G=i===n;m<_;){var H=pa((m+_)/2),q=l(r[H]),re=q!==n,le=q===null,ge=q===q,Ce=en(q);if(x)var me=f||ge;else G?me=ge&&(f||re):I?me=ge&&re&&(f||!le):F?me=ge&&re&&!le&&(f||!Ce):le||Ce?me=!1:me=f?q<=i:q<i;me?m=H+1:_=H}return Pt(_,K)}function ky(r,i){for(var l=-1,f=r.length,m=0,_=[];++l<f;){var x=r[l],I=i?i(x):x;if(!l||!En(I,F)){var F=I;_[m++]=x===0?0:x}}return _}function Ny(r){return typeof r=="number"?r:en(r)?R:+r}function Qt(r){if(typeof r=="string")return r;if(_e(r))return tt(r,Qt)+"";if(en(r))return hy?hy.call(r):"";var i=r+"";return i=="0"&&1/r==-1/0?"-0":i}function Sr(r,i,l){var f=-1,m=ea,_=r.length,x=!0,I=[],F=I;if(l)x=!1,m=pc;else if(_>=s){var G=i?null:TL(r);if(G)return na(G);x=!1,m=xo,F=new qr}else F=i?[]:I;e:for(;++f<_;){var H=r[f],q=i?i(H):H;if(H=l||H!==0?H:0,x&&q===q){for(var re=F.length;re--;)if(F[re]===q)continue e;i&&F.push(q),I.push(H)}else m(F,q,l)||(F!==I&&F.push(q),I.push(H))}return I}function zc(r,i){return i=Cr(i,r),r=cv(r,i),r==null||delete r[Nn(gn(i))]}function Ly(r,i,l,f){return No(r,i,l(Jr(r,i)),f)}function Ta(r,i,l,f){for(var m=r.length,_=f?m:-1;(f?_--:++_<m)&&i(r[_],_,r););return l?hn(r,f?0:_,f?_+1:m):hn(r,f?_+1:0,f?m:_)}function By(r,i){var l=r;return l instanceof Pe&&(l=l.value()),hc(i,function(f,m){return m.func.apply(m.thisArg,br([f],m.args))},l)}function Uc(r,i,l){var f=r.length;if(f<2)return f?Sr(r[0]):[];for(var m=-1,_=z(f);++m<f;)for(var x=r[m],I=-1;++I<f;)I!=m&&(_[m]=Fo(_[m]||x,r[I],i,l));return Sr(xt(_,1),i,l)}function zy(r,i,l){for(var f=-1,m=r.length,_=i.length,x={};++f<m;){var I=f<_?i[f]:n;l(x,r[f],I)}return x}function jc(r){return ct(r)?r:[]}function Wc(r){return typeof r=="function"?r:Rt}function Cr(r,i){return _e(r)?r:Zc(r,i)?[r]:hv(je(r))}var dL=Ee;function Er(r,i,l){var f=r.length;return l=l===n?f:l,!i&&l>=f?r:hn(r,i,l)}var Uy=Qk||function(r){return Et.clearTimeout(r)};function jy(r,i){if(i)return r.slice();var l=r.length,f=ly?ly(l):new r.constructor(l);return r.copy(f),f}function Vc(r){var i=new r.constructor(r.byteLength);return new la(i).set(new la(r)),i}function pL(r,i){var l=i?Vc(r.buffer):r.buffer;return new r.constructor(l,r.byteOffset,r.byteLength)}function hL(r){var i=new r.constructor(r.source,So.exec(r));return i.lastIndex=r.lastIndex,i}function gL(r){return $o?qe($o.call(r)):{}}function Wy(r,i){var l=i?Vc(r.buffer):r.buffer;return new r.constructor(l,r.byteOffset,r.length)}function Vy(r,i){if(r!==i){var l=r!==n,f=r===null,m=r===r,_=en(r),x=i!==n,I=i===null,F=i===i,G=en(i);if(!I&&!G&&!_&&r>i||_&&x&&F&&!I&&!G||f&&x&&F||!l&&F||!m)return 1;if(!f&&!_&&!G&&r<i||G&&l&&m&&!f&&!_||I&&l&&m||!x&&m||!F)return-1}return 0}function mL(r,i,l){for(var f=-1,m=r.criteria,_=i.criteria,x=m.length,I=l.length;++f<x;){var F=Vy(m[f],_[f]);if(F){if(f>=I)return F;var G=l[f];return F*(G=="desc"?-1:1)}}return r.index-i.index}function Gy(r,i,l,f){for(var m=-1,_=r.length,x=l.length,I=-1,F=i.length,G=bt(_-x,0),H=z(F+G),q=!f;++I<F;)H[I]=i[I];for(;++m<x;)(q||m<_)&&(H[l[m]]=r[m]);for(;G--;)H[I++]=r[m++];return H}function Hy(r,i,l,f){for(var m=-1,_=r.length,x=-1,I=l.length,F=-1,G=i.length,H=bt(_-I,0),q=z(H+G),re=!f;++m<H;)q[m]=r[m];for(var le=m;++F<G;)q[le+F]=i[F];for(;++x<I;)(re||m<_)&&(q[le+l[x]]=r[m++]);return q}function Gt(r,i){var l=-1,f=r.length;for(i||(i=z(f));++l<f;)i[l]=r[l];return i}function kn(r,i,l,f){var m=!l;l||(l={});for(var _=-1,x=i.length;++_<x;){var I=i[_],F=f?f(l[I],r[I],I,l,r):n;F===n&&(F=r[I]),m?Kn(l,I,F):Mo(l,I,F)}return l}function yL(r,i){return kn(r,Jc(r),i)}function vL(r,i){return kn(r,iv(r),i)}function Sa(r,i){return function(l,f){var m=_e(l)?Sk:UN,_=i?i():{};return m(l,r,pe(f,2),_)}}function Wi(r){return Ee(function(i,l){var f=-1,m=l.length,_=m>1?l[m-1]:n,x=m>2?l[2]:n;for(_=r.length>3&&typeof _=="function"?(m--,_):n,x&&Bt(l[0],l[1],x)&&(_=m<3?n:_,m=1),i=qe(i);++f<m;){var I=l[f];I&&r(i,I,f,_)}return i})}function Yy(r,i){return function(l,f){if(l==null)return l;if(!Ht(l))return r(l,f);for(var m=l.length,_=i?m:-1,x=qe(l);(i?_--:++_<m)&&f(x[_],_,x)!==!1;);return l}}function Ry(r){return function(i,l,f){for(var m=-1,_=qe(i),x=f(i),I=x.length;I--;){var F=x[r?I:++m];if(l(_[F],F,_)===!1)break}return i}}function bL(r,i,l){var f=i&$,m=Lo(r);function _(){var x=this&&this!==Et&&this instanceof _?m:r;return x.apply(f?l:this,arguments)}return _}function qy(r){return function(i){i=je(i);var l=ki(i)?Sn(i):n,f=l?l[0]:i.charAt(0),m=l?Er(l,1).join(""):i.slice(1);return f[r]()+m}}function Vi(r){return function(i){return hc(Yv(Hv(i).replace(uk,"")),r,"")}}function Lo(r){return function(){var i=arguments;switch(i.length){case 0:return new r;case 1:return new r(i[0]);case 2:return new r(i[0],i[1]);case 3:return new r(i[0],i[1],i[2]);case 4:return new r(i[0],i[1],i[2],i[3]);case 5:return new r(i[0],i[1],i[2],i[3],i[4]);case 6:return new r(i[0],i[1],i[2],i[3],i[4],i[5]);case 7:return new r(i[0],i[1],i[2],i[3],i[4],i[5],i[6])}var l=ji(r.prototype),f=r.apply(l,i);return nt(f)?f:l}}function _L(r,i,l){var f=Lo(r);function m(){for(var _=arguments.length,x=z(_),I=_,F=Gi(m);I--;)x[I]=arguments[I];var G=_<3&&x[0]!==F&&x[_-1]!==F?[]:_r(x,F);if(_-=G.length,_<l)return Qy(r,i,Ca,m.placeholder,n,x,G,n,n,l-_);var H=this&&this!==Et&&this instanceof m?f:r;return Zt(H,this,x)}return m}function Ky(r){return function(i,l,f){var m=qe(i);if(!Ht(i)){var _=pe(l,3);i=Ct(i),l=function(I){return _(m[I],I,m)}}var x=r(i,l,f);return x>-1?m[_?i[x]:x]:n}}function Jy(r){return Zn(function(i){var l=i.length,f=l,m=dn.prototype.thru;for(r&&i.reverse();f--;){var _=i[f];if(typeof _!="function")throw new fn(u);if(m&&!x&&Oa(_)=="wrapper")var x=new dn([],!0)}for(f=x?f:l;++f<l;){_=i[f];var I=Oa(_),F=I=="wrapper"?qc(_):n;F&&Xc(F[0])&&F[1]==(Y|V|D|ae)&&!F[4].length&&F[9]==1?x=x[Oa(F[0])].apply(x,F[3]):x=_.length==1&&Xc(_)?x[I]():x.thru(_)}return function(){var G=arguments,H=G[0];if(x&&G.length==1&&_e(H))return x.plant(H).value();for(var q=0,re=l?i[q].apply(this,G):H;++q<l;)re=i[q].call(this,re);return re}})}function Ca(r,i,l,f,m,_,x,I,F,G){var H=i&Y,q=i&$,re=i&N,le=i&(V|L),ge=i&te,Ce=re?n:Lo(r);function me(){for(var Oe=arguments.length,$e=z(Oe),tn=Oe;tn--;)$e[tn]=arguments[tn];if(le)var zt=Gi(me),nn=Mk($e,zt);if(f&&($e=Gy($e,f,m,le)),_&&($e=Hy($e,_,x,le)),Oe-=nn,le&&Oe<G){var ft=_r($e,zt);return Qy(r,i,Ca,me.placeholder,l,$e,ft,I,F,G-Oe)}var xn=q?l:this,tr=re?xn[r]:r;return Oe=$e.length,I?$e=UL($e,I):ge&&Oe>1&&$e.reverse(),H&&F<Oe&&($e.length=F),this&&this!==Et&&this instanceof me&&(tr=Ce||Lo(tr)),tr.apply(xn,$e)}return me}function Zy(r,i){return function(l,f){return qN(l,r,i(f),{})}}function Ea(r,i){return function(l,f){var m;if(l===n&&f===n)return i;if(l!==n&&(m=l),f!==n){if(m===n)return f;typeof l=="string"||typeof f=="string"?(l=Qt(l),f=Qt(f)):(l=Ny(l),f=Ny(f)),m=r(l,f)}return m}}function Gc(r){return Zn(function(i){return i=tt(i,Xt(pe())),Ee(function(l){var f=this;return r(i,function(m){return Zt(m,f,l)})})})}function xa(r,i){i=i===n?" ":Qt(i);var l=i.length;if(l<2)return l?Lc(i,r):i;var f=Lc(i,da(r/Ni(i)));return ki(i)?Er(Sn(f),0,r).join(""):f.slice(0,r)}function wL(r,i,l,f){var m=i&$,_=Lo(r);function x(){for(var I=-1,F=arguments.length,G=-1,H=f.length,q=z(H+F),re=this&&this!==Et&&this instanceof x?_:r;++G<H;)q[G]=f[G];for(;F--;)q[G++]=arguments[++I];return Zt(re,m?l:this,q)}return x}function Xy(r){return function(i,l,f){return f&&typeof f!="number"&&Bt(i,l,f)&&(l=f=n),i=er(i),l===n?(l=i,i=0):l=er(l),f=f===n?i<l?1:-1:er(f),sL(i,l,f,r)}}function Aa(r){return function(i,l){return typeof i=="string"&&typeof l=="string"||(i=mn(i),l=mn(l)),r(i,l)}}function Qy(r,i,l,f,m,_,x,I,F,G){var H=i&V,q=H?x:n,re=H?n:x,le=H?_:n,ge=H?n:_;i|=H?D:B,i&=~(H?B:D),i&J||(i&=-4);var Ce=[r,i,m,le,q,ge,re,I,F,G],me=l.apply(n,Ce);return Xc(r)&&fv(me,Ce),me.placeholder=f,dv(me,r,i)}function Hc(r){var i=vt[r];return function(l,f){if(l=mn(l),f=f==null?0:Pt(Te(f),292),f&&dy(l)){var m=(je(l)+"e").split("e"),_=i(m[0]+"e"+(+m[1]+f));return m=(je(_)+"e").split("e"),+(m[0]+"e"+(+m[1]-f))}return i(l)}}var TL=zi&&1/na(new zi([,-0]))[1]==Ue?function(r){return new zi(r)}:hf;function ev(r){return function(i){var l=$t(i);return l==Ke?wc(i):l==Wt?zk(i):$k(i,r(i))}}function Jn(r,i,l,f,m,_,x,I){var F=i&N;if(!F&&typeof r!="function")throw new fn(u);var G=f?f.length:0;if(G||(i&=-97,f=m=n),x=x===n?x:bt(Te(x),0),I=I===n?I:Te(I),G-=m?m.length:0,i&B){var H=f,q=m;f=m=n}var re=F?n:qc(r),le=[r,i,l,f,m,H,q,_,x,I];if(re&&LL(le,re),r=le[0],i=le[1],l=le[2],f=le[3],m=le[4],I=le[9]=le[9]===n?F?0:r.length:bt(le[9]-G,0),!I&&i&(V|L)&&(i&=-25),!i||i==$)var ge=bL(r,i,l);else i==V||i==L?ge=_L(r,i,I):(i==D||i==($|D))&&!m.length?ge=wL(r,i,l,f):ge=Ca.apply(n,le);var Ce=re?Dy:fv;return dv(Ce(ge,le),r,i)}function tv(r,i,l,f){return r===n||En(r,Bi[l])&&!Ve.call(f,l)?i:r}function nv(r,i,l,f,m,_){return nt(r)&&nt(i)&&(_.set(i,r),_a(r,i,n,nv,_),_.delete(i)),r}function SL(r){return Uo(r)?n:r}function rv(r,i,l,f,m,_){var x=l&E,I=r.length,F=i.length;if(I!=F&&!(x&&F>I))return!1;var G=_.get(r),H=_.get(i);if(G&&H)return G==i&&H==r;var q=-1,re=!0,le=l&w?new qr:n;for(_.set(r,i),_.set(i,r);++q<I;){var ge=r[q],Ce=i[q];if(f)var me=x?f(Ce,ge,q,i,r,_):f(ge,Ce,q,r,i,_);if(me!==n){if(me)continue;re=!1;break}if(le){if(!gc(i,function(Oe,$e){if(!xo(le,$e)&&(ge===Oe||m(ge,Oe,l,f,_)))return le.push($e)})){re=!1;break}}else if(!(ge===Ce||m(ge,Ce,l,f,_))){re=!1;break}}return _.delete(r),_.delete(i),re}function CL(r,i,l,f,m,_,x){switch(l){case Yn:if(r.byteLength!=i.byteLength||r.byteOffset!=i.byteOffset)return!1;r=r.buffer,i=i.buffer;case pr:return!(r.byteLength!=i.byteLength||!_(new la(r),new la(i)));case ve:case we:case Nt:return En(+r,+i);case et:return r.name==i.name&&r.message==i.message;case cr:case zr:return r==i+"";case Ke:var I=wc;case Wt:var F=f&E;if(I||(I=na),r.size!=i.size&&!F)return!1;var G=x.get(r);if(G)return G==i;f|=w,x.set(r,i);var H=rv(I(r),I(i),f,m,_,x);return x.delete(r),H;case fr:if($o)return $o.call(r)==$o.call(i)}return!1}function EL(r,i,l,f,m,_){var x=l&E,I=Yc(r),F=I.length,G=Yc(i),H=G.length;if(F!=H&&!x)return!1;for(var q=F;q--;){var re=I[q];if(!(x?re in i:Ve.call(i,re)))return!1}var le=_.get(r),ge=_.get(i);if(le&&ge)return le==i&&ge==r;var Ce=!0;_.set(r,i),_.set(i,r);for(var me=x;++q<F;){re=I[q];var Oe=r[re],$e=i[re];if(f)var tn=x?f($e,Oe,re,i,r,_):f(Oe,$e,re,r,i,_);if(!(tn===n?Oe===$e||m(Oe,$e,l,f,_):tn)){Ce=!1;break}me||(me=re=="constructor")}if(Ce&&!me){var zt=r.constructor,nn=i.constructor;zt!=nn&&"constructor"in r&&"constructor"in i&&!(typeof zt=="function"&&zt instanceof zt&&typeof nn=="function"&&nn instanceof nn)&&(Ce=!1)}return _.delete(r),_.delete(i),Ce}function Zn(r){return ef(uv(r,n,vv),r+"")}function Yc(r){return Sy(r,Ct,Jc)}function Rc(r){return Sy(r,Yt,iv)}var qc=ha?function(r){return ha.get(r)}:hf;function Oa(r){for(var i=r.name+"",l=Ui[i],f=Ve.call(Ui,i)?l.length:0;f--;){var m=l[f],_=m.func;if(_==null||_==r)return m.name}return i}function Gi(r){var i=Ve.call(v,"placeholder")?v:r;return i.placeholder}function pe(){var r=v.iteratee||df;return r=r===df?xy:r,arguments.length?r(arguments[0],arguments[1]):r}function Ia(r,i){var l=r.__data__;return FL(i)?l[typeof i=="string"?"string":"hash"]:l.map}function Kc(r){for(var i=Ct(r),l=i.length;l--;){var f=i[l],m=r[f];i[l]=[f,m,av(m)]}return i}function Zr(r,i){var l=Nk(r,i);return Ey(l)?l:n}function xL(r){var i=Ve.call(r,Yr),l=r[Yr];try{r[Yr]=n;var f=!0}catch{}var m=sa.call(r);return f&&(i?r[Yr]=l:delete r[Yr]),m}var Jc=Sc?function(r){return r==null?[]:(r=qe(r),vr(Sc(r),function(i){return cy.call(r,i)}))}:gf,iv=Sc?function(r){for(var i=[];r;)br(i,Jc(r)),r=ua(r);return i}:gf,$t=Lt;(Cc&&$t(new Cc(new ArrayBuffer(1)))!=Yn||Oo&&$t(new Oo)!=Ke||Ec&&$t(Ec.resolve())!=Br||zi&&$t(new zi)!=Wt||Io&&$t(new Io)!=an)&&($t=function(r){var i=Lt(r),l=i==yt?r.constructor:n,f=l?Xr(l):"";if(f)switch(f){case lN:return Yn;case uN:return Ke;case cN:return Br;case fN:return Wt;case dN:return an}return i});function AL(r,i,l){for(var f=-1,m=l.length;++f<m;){var _=l[f],x=_.size;switch(_.type){case"drop":r+=x;break;case"dropRight":i-=x;break;case"take":i=Pt(i,r+x);break;case"takeRight":r=bt(r,i-x);break}}return{start:r,end:i}}function OL(r){var i=r.match(qs);return i?i[1].split(To):[]}function ov(r,i,l){i=Cr(i,r);for(var f=-1,m=i.length,_=!1;++f<m;){var x=Nn(i[f]);if(!(_=r!=null&&l(r,x)))break;r=r[x]}return _||++f!=m?_:(m=r==null?0:r.length,!!m&&Na(m)&&Xn(x,m)&&(_e(r)||Qr(r)))}function IL(r){var i=r.length,l=new r.constructor(i);return i&&typeof r[0]=="string"&&Ve.call(r,"index")&&(l.index=r.index,l.input=r.input),l}function sv(r){return typeof r.constructor=="function"&&!Bo(r)?ji(ua(r)):{}}function PL(r,i,l){var f=r.constructor;switch(i){case pr:return Vc(r);case ve:case we:return new f(+r);case Yn:return pL(r,l);case Ai:case jr:case Oi:case hr:case gr:case Jt:case Fn:case Wr:case Vr:return Wy(r,l);case Ke:return new f;case Nt:case zr:return new f(r);case cr:return hL(r);case Wt:return new f;case fr:return gL(r)}}function $L(r,i){var l=i.length;if(!l)return r;var f=l-1;return i[f]=(l>1?"& ":"")+i[f],i=i.join(l>2?", ":" "),r.replace(Rs,`{
113
+ /* [wrapped with `+i+`] */
114
+ `)}function ML(r){return _e(r)||Qr(r)||!!(fy&&r&&r[fy])}function Xn(r,i){var l=typeof r;return i=i??Ie,!!i&&(l=="number"||l!="symbol"&&Z.test(r))&&r>-1&&r%1==0&&r<i}function Bt(r,i,l){if(!nt(l))return!1;var f=typeof i;return(f=="number"?Ht(l)&&Xn(i,l.length):f=="string"&&i in l)?En(l[i],r):!1}function Zc(r,i){if(_e(r))return!1;var l=typeof r;return l=="number"||l=="symbol"||l=="boolean"||r==null||en(r)?!0:wo.test(r)||!Hs.test(r)||i!=null&&r in qe(i)}function FL(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}function Xc(r){var i=Oa(r),l=v[i];if(typeof l!="function"||!(i in Pe.prototype))return!1;if(r===l)return!0;var f=qc(l);return!!f&&r===f[0]}function DL(r){return!!ay&&ay in r}var kL=ia?Qn:mf;function Bo(r){var i=r&&r.constructor,l=typeof i=="function"&&i.prototype||Bi;return r===l}function av(r){return r===r&&!nt(r)}function lv(r,i){return function(l){return l==null?!1:l[r]===i&&(i!==n||r in qe(l))}}function NL(r){var i=Da(r,function(f){return l.size===h&&l.clear(),f}),l=i.cache;return i}function LL(r,i){var l=r[1],f=i[1],m=l|f,_=m<($|N|Y),x=f==Y&&l==V||f==Y&&l==ae&&r[7].length<=i[8]||f==(Y|ae)&&i[7].length<=i[8]&&l==V;if(!(_||x))return r;f&$&&(r[2]=i[2],m|=l&$?0:J);var I=i[3];if(I){var F=r[3];r[3]=F?Gy(F,I,i[4]):I,r[4]=F?_r(r[3],y):i[4]}return I=i[5],I&&(F=r[5],r[5]=F?Hy(F,I,i[6]):I,r[6]=F?_r(r[5],y):i[6]),I=i[7],I&&(r[7]=I),f&Y&&(r[8]=r[8]==null?i[8]:Pt(r[8],i[8])),r[9]==null&&(r[9]=i[9]),r[0]=i[0],r[1]=m,r}function BL(r){var i=[];if(r!=null)for(var l in qe(r))i.push(l);return i}function zL(r){return sa.call(r)}function uv(r,i,l){return i=bt(i===n?r.length-1:i,0),function(){for(var f=arguments,m=-1,_=bt(f.length-i,0),x=z(_);++m<_;)x[m]=f[i+m];m=-1;for(var I=z(i+1);++m<i;)I[m]=f[m];return I[i]=l(x),Zt(r,this,I)}}function cv(r,i){return i.length<2?r:Jr(r,hn(i,0,-1))}function UL(r,i){for(var l=r.length,f=Pt(i.length,l),m=Gt(r);f--;){var _=i[f];r[f]=Xn(_,l)?m[_]:n}return r}function Qc(r,i){if(!(i==="constructor"&&typeof r[i]=="function")&&i!="__proto__")return r[i]}var fv=pv(Dy),zo=tN||function(r,i){return Et.setTimeout(r,i)},ef=pv(uL);function dv(r,i,l){var f=i+"";return ef(r,$L(f,jL(OL(f),l)))}function pv(r){var i=0,l=0;return function(){var f=oN(),m=fe-(f-l);if(l=f,m>0){if(++i>=Q)return arguments[0]}else i=0;return r.apply(n,arguments)}}function Pa(r,i){var l=-1,f=r.length,m=f-1;for(i=i===n?f:i;++l<i;){var _=Nc(l,m),x=r[_];r[_]=r[l],r[l]=x}return r.length=i,r}var hv=NL(function(r){var i=[];return r.charCodeAt(0)===46&&i.push(""),r.replace(Ys,function(l,f,m,_){i.push(m?_.replace(Js,"$1"):f||l)}),i});function Nn(r){if(typeof r=="string"||en(r))return r;var i=r+"";return i=="0"&&1/r==-1/0?"-0":i}function Xr(r){if(r!=null){try{return oa.call(r)}catch{}try{return r+""}catch{}}return""}function jL(r,i){return cn(ue,function(l){var f="_."+l[0];i&l[1]&&!ea(r,f)&&r.push(f)}),r.sort()}function gv(r){if(r instanceof Pe)return r.clone();var i=new dn(r.__wrapped__,r.__chain__);return i.__actions__=Gt(r.__actions__),i.__index__=r.__index__,i.__values__=r.__values__,i}function WL(r,i,l){(l?Bt(r,i,l):i===n)?i=1:i=bt(Te(i),0);var f=r==null?0:r.length;if(!f||i<1)return[];for(var m=0,_=0,x=z(da(f/i));m<f;)x[_++]=hn(r,m,m+=i);return x}function VL(r){for(var i=-1,l=r==null?0:r.length,f=0,m=[];++i<l;){var _=r[i];_&&(m[f++]=_)}return m}function GL(){var r=arguments.length;if(!r)return[];for(var i=z(r-1),l=arguments[0],f=r;f--;)i[f-1]=arguments[f];return br(_e(l)?Gt(l):[l],xt(i,1))}var HL=Ee(function(r,i){return ct(r)?Fo(r,xt(i,1,ct,!0)):[]}),YL=Ee(function(r,i){var l=gn(i);return ct(l)&&(l=n),ct(r)?Fo(r,xt(i,1,ct,!0),pe(l,2)):[]}),RL=Ee(function(r,i){var l=gn(i);return ct(l)&&(l=n),ct(r)?Fo(r,xt(i,1,ct,!0),n,l):[]});function qL(r,i,l){var f=r==null?0:r.length;return f?(i=l||i===n?1:Te(i),hn(r,i<0?0:i,f)):[]}function KL(r,i,l){var f=r==null?0:r.length;return f?(i=l||i===n?1:Te(i),i=f-i,hn(r,0,i<0?0:i)):[]}function JL(r,i){return r&&r.length?Ta(r,pe(i,3),!0,!0):[]}function ZL(r,i){return r&&r.length?Ta(r,pe(i,3),!0):[]}function XL(r,i,l,f){var m=r==null?0:r.length;return m?(l&&typeof l!="number"&&Bt(r,i,l)&&(l=0,f=m),GN(r,i,l,f)):[]}function mv(r,i,l){var f=r==null?0:r.length;if(!f)return-1;var m=l==null?0:Te(l);return m<0&&(m=bt(f+m,0)),ta(r,pe(i,3),m)}function yv(r,i,l){var f=r==null?0:r.length;if(!f)return-1;var m=f-1;return l!==n&&(m=Te(l),m=l<0?bt(f+m,0):Pt(m,f-1)),ta(r,pe(i,3),m,!0)}function vv(r){var i=r==null?0:r.length;return i?xt(r,1):[]}function QL(r){var i=r==null?0:r.length;return i?xt(r,Ue):[]}function e5(r,i){var l=r==null?0:r.length;return l?(i=i===n?1:Te(i),xt(r,i)):[]}function t5(r){for(var i=-1,l=r==null?0:r.length,f={};++i<l;){var m=r[i];f[m[0]]=m[1]}return f}function bv(r){return r&&r.length?r[0]:n}function n5(r,i,l){var f=r==null?0:r.length;if(!f)return-1;var m=l==null?0:Te(l);return m<0&&(m=bt(f+m,0)),Di(r,i,m)}function r5(r){var i=r==null?0:r.length;return i?hn(r,0,-1):[]}var i5=Ee(function(r){var i=tt(r,jc);return i.length&&i[0]===r[0]?$c(i):[]}),o5=Ee(function(r){var i=gn(r),l=tt(r,jc);return i===gn(l)?i=n:l.pop(),l.length&&l[0]===r[0]?$c(l,pe(i,2)):[]}),s5=Ee(function(r){var i=gn(r),l=tt(r,jc);return i=typeof i=="function"?i:n,i&&l.pop(),l.length&&l[0]===r[0]?$c(l,n,i):[]});function a5(r,i){return r==null?"":rN.call(r,i)}function gn(r){var i=r==null?0:r.length;return i?r[i-1]:n}function l5(r,i,l){var f=r==null?0:r.length;if(!f)return-1;var m=f;return l!==n&&(m=Te(l),m=m<0?bt(f+m,0):Pt(m,f-1)),i===i?jk(r,i,m):ta(r,Q0,m,!0)}function u5(r,i){return r&&r.length?Py(r,Te(i)):n}var c5=Ee(_v);function _v(r,i){return r&&r.length&&i&&i.length?kc(r,i):r}function f5(r,i,l){return r&&r.length&&i&&i.length?kc(r,i,pe(l,2)):r}function d5(r,i,l){return r&&r.length&&i&&i.length?kc(r,i,n,l):r}var p5=Zn(function(r,i){var l=r==null?0:r.length,f=Ac(r,i);return Fy(r,tt(i,function(m){return Xn(m,l)?+m:m}).sort(Vy)),f});function h5(r,i){var l=[];if(!(r&&r.length))return l;var f=-1,m=[],_=r.length;for(i=pe(i,3);++f<_;){var x=r[f];i(x,f,r)&&(l.push(x),m.push(f))}return Fy(r,m),l}function tf(r){return r==null?r:aN.call(r)}function g5(r,i,l){var f=r==null?0:r.length;return f?(l&&typeof l!="number"&&Bt(r,i,l)?(i=0,l=f):(i=i==null?0:Te(i),l=l===n?f:Te(l)),hn(r,i,l)):[]}function m5(r,i){return wa(r,i)}function y5(r,i,l){return Bc(r,i,pe(l,2))}function v5(r,i){var l=r==null?0:r.length;if(l){var f=wa(r,i);if(f<l&&En(r[f],i))return f}return-1}function b5(r,i){return wa(r,i,!0)}function _5(r,i,l){return Bc(r,i,pe(l,2),!0)}function w5(r,i){var l=r==null?0:r.length;if(l){var f=wa(r,i,!0)-1;if(En(r[f],i))return f}return-1}function T5(r){return r&&r.length?ky(r):[]}function S5(r,i){return r&&r.length?ky(r,pe(i,2)):[]}function C5(r){var i=r==null?0:r.length;return i?hn(r,1,i):[]}function E5(r,i,l){return r&&r.length?(i=l||i===n?1:Te(i),hn(r,0,i<0?0:i)):[]}function x5(r,i,l){var f=r==null?0:r.length;return f?(i=l||i===n?1:Te(i),i=f-i,hn(r,i<0?0:i,f)):[]}function A5(r,i){return r&&r.length?Ta(r,pe(i,3),!1,!0):[]}function O5(r,i){return r&&r.length?Ta(r,pe(i,3)):[]}var I5=Ee(function(r){return Sr(xt(r,1,ct,!0))}),P5=Ee(function(r){var i=gn(r);return ct(i)&&(i=n),Sr(xt(r,1,ct,!0),pe(i,2))}),$5=Ee(function(r){var i=gn(r);return i=typeof i=="function"?i:n,Sr(xt(r,1,ct,!0),n,i)});function M5(r){return r&&r.length?Sr(r):[]}function F5(r,i){return r&&r.length?Sr(r,pe(i,2)):[]}function D5(r,i){return i=typeof i=="function"?i:n,r&&r.length?Sr(r,n,i):[]}function nf(r){if(!(r&&r.length))return[];var i=0;return r=vr(r,function(l){if(ct(l))return i=bt(l.length,i),!0}),bc(i,function(l){return tt(r,mc(l))})}function wv(r,i){if(!(r&&r.length))return[];var l=nf(r);return i==null?l:tt(l,function(f){return Zt(i,n,f)})}var k5=Ee(function(r,i){return ct(r)?Fo(r,i):[]}),N5=Ee(function(r){return Uc(vr(r,ct))}),L5=Ee(function(r){var i=gn(r);return ct(i)&&(i=n),Uc(vr(r,ct),pe(i,2))}),B5=Ee(function(r){var i=gn(r);return i=typeof i=="function"?i:n,Uc(vr(r,ct),n,i)}),z5=Ee(nf);function U5(r,i){return zy(r||[],i||[],Mo)}function j5(r,i){return zy(r||[],i||[],No)}var W5=Ee(function(r){var i=r.length,l=i>1?r[i-1]:n;return l=typeof l=="function"?(r.pop(),l):n,wv(r,l)});function Tv(r){var i=v(r);return i.__chain__=!0,i}function V5(r,i){return i(r),r}function $a(r,i){return i(r)}var G5=Zn(function(r){var i=r.length,l=i?r[0]:0,f=this.__wrapped__,m=function(_){return Ac(_,r)};return i>1||this.__actions__.length||!(f instanceof Pe)||!Xn(l)?this.thru(m):(f=f.slice(l,+l+(i?1:0)),f.__actions__.push({func:$a,args:[m],thisArg:n}),new dn(f,this.__chain__).thru(function(_){return i&&!_.length&&_.push(n),_}))});function H5(){return Tv(this)}function Y5(){return new dn(this.value(),this.__chain__)}function R5(){this.__values__===n&&(this.__values__=Nv(this.value()));var r=this.__index__>=this.__values__.length,i=r?n:this.__values__[this.__index__++];return{done:r,value:i}}function q5(){return this}function K5(r){for(var i,l=this;l instanceof ma;){var f=gv(l);f.__index__=0,f.__values__=n,i?m.__wrapped__=f:i=f;var m=f;l=l.__wrapped__}return m.__wrapped__=r,i}function J5(){var r=this.__wrapped__;if(r instanceof Pe){var i=r;return this.__actions__.length&&(i=new Pe(this)),i=i.reverse(),i.__actions__.push({func:$a,args:[tf],thisArg:n}),new dn(i,this.__chain__)}return this.thru(tf)}function Z5(){return By(this.__wrapped__,this.__actions__)}var X5=Sa(function(r,i,l){Ve.call(r,l)?++r[l]:Kn(r,l,1)});function Q5(r,i,l){var f=_e(r)?Z0:VN;return l&&Bt(r,i,l)&&(i=n),f(r,pe(i,3))}function eB(r,i){var l=_e(r)?vr:wy;return l(r,pe(i,3))}var tB=Ky(mv),nB=Ky(yv);function rB(r,i){return xt(Ma(r,i),1)}function iB(r,i){return xt(Ma(r,i),Ue)}function oB(r,i,l){return l=l===n?1:Te(l),xt(Ma(r,i),l)}function Sv(r,i){var l=_e(r)?cn:Tr;return l(r,pe(i,3))}function Cv(r,i){var l=_e(r)?Ck:_y;return l(r,pe(i,3))}var sB=Sa(function(r,i,l){Ve.call(r,l)?r[l].push(i):Kn(r,l,[i])});function aB(r,i,l,f){r=Ht(r)?r:Yi(r),l=l&&!f?Te(l):0;var m=r.length;return l<0&&(l=bt(m+l,0)),La(r)?l<=m&&r.indexOf(i,l)>-1:!!m&&Di(r,i,l)>-1}var lB=Ee(function(r,i,l){var f=-1,m=typeof i=="function",_=Ht(r)?z(r.length):[];return Tr(r,function(x){_[++f]=m?Zt(i,x,l):Do(x,i,l)}),_}),uB=Sa(function(r,i,l){Kn(r,l,i)});function Ma(r,i){var l=_e(r)?tt:Ay;return l(r,pe(i,3))}function cB(r,i,l,f){return r==null?[]:(_e(i)||(i=i==null?[]:[i]),l=f?n:l,_e(l)||(l=l==null?[]:[l]),$y(r,i,l))}var fB=Sa(function(r,i,l){r[l?0:1].push(i)},function(){return[[],[]]});function dB(r,i,l){var f=_e(r)?hc:ty,m=arguments.length<3;return f(r,pe(i,4),l,m,Tr)}function pB(r,i,l){var f=_e(r)?Ek:ty,m=arguments.length<3;return f(r,pe(i,4),l,m,_y)}function hB(r,i){var l=_e(r)?vr:wy;return l(r,ka(pe(i,3)))}function gB(r){var i=_e(r)?my:aL;return i(r)}function mB(r,i,l){(l?Bt(r,i,l):i===n)?i=1:i=Te(i);var f=_e(r)?BN:lL;return f(r,i)}function yB(r){var i=_e(r)?zN:cL;return i(r)}function vB(r){if(r==null)return 0;if(Ht(r))return La(r)?Ni(r):r.length;var i=$t(r);return i==Ke||i==Wt?r.size:Fc(r).length}function bB(r,i,l){var f=_e(r)?gc:fL;return l&&Bt(r,i,l)&&(i=n),f(r,pe(i,3))}var _B=Ee(function(r,i){if(r==null)return[];var l=i.length;return l>1&&Bt(r,i[0],i[1])?i=[]:l>2&&Bt(i[0],i[1],i[2])&&(i=[i[0]]),$y(r,xt(i,1),[])}),Fa=eN||function(){return Et.Date.now()};function wB(r,i){if(typeof i!="function")throw new fn(u);return r=Te(r),function(){if(--r<1)return i.apply(this,arguments)}}function Ev(r,i,l){return i=l?n:i,i=r&&i==null?r.length:i,Jn(r,Y,n,n,n,n,i)}function xv(r,i){var l;if(typeof i!="function")throw new fn(u);return r=Te(r),function(){return--r>0&&(l=i.apply(this,arguments)),r<=1&&(i=n),l}}var rf=Ee(function(r,i,l){var f=$;if(l.length){var m=_r(l,Gi(rf));f|=D}return Jn(r,f,i,l,m)}),Av=Ee(function(r,i,l){var f=$|N;if(l.length){var m=_r(l,Gi(Av));f|=D}return Jn(i,f,r,l,m)});function Ov(r,i,l){i=l?n:i;var f=Jn(r,V,n,n,n,n,n,i);return f.placeholder=Ov.placeholder,f}function Iv(r,i,l){i=l?n:i;var f=Jn(r,L,n,n,n,n,n,i);return f.placeholder=Iv.placeholder,f}function Pv(r,i,l){var f,m,_,x,I,F,G=0,H=!1,q=!1,re=!0;if(typeof r!="function")throw new fn(u);i=mn(i)||0,nt(l)&&(H=!!l.leading,q="maxWait"in l,_=q?bt(mn(l.maxWait)||0,i):_,re="trailing"in l?!!l.trailing:re);function le(ft){var xn=f,tr=m;return f=m=n,G=ft,x=r.apply(tr,xn),x}function ge(ft){return G=ft,I=zo(Oe,i),H?le(ft):x}function Ce(ft){var xn=ft-F,tr=ft-G,Kv=i-xn;return q?Pt(Kv,_-tr):Kv}function me(ft){var xn=ft-F,tr=ft-G;return F===n||xn>=i||xn<0||q&&tr>=_}function Oe(){var ft=Fa();if(me(ft))return $e(ft);I=zo(Oe,Ce(ft))}function $e(ft){return I=n,re&&f?le(ft):(f=m=n,x)}function tn(){I!==n&&Uy(I),G=0,f=F=m=I=n}function zt(){return I===n?x:$e(Fa())}function nn(){var ft=Fa(),xn=me(ft);if(f=arguments,m=this,F=ft,xn){if(I===n)return ge(F);if(q)return Uy(I),I=zo(Oe,i),le(F)}return I===n&&(I=zo(Oe,i)),x}return nn.cancel=tn,nn.flush=zt,nn}var TB=Ee(function(r,i){return by(r,1,i)}),SB=Ee(function(r,i,l){return by(r,mn(i)||0,l)});function CB(r){return Jn(r,te)}function Da(r,i){if(typeof r!="function"||i!=null&&typeof i!="function")throw new fn(u);var l=function(){var f=arguments,m=i?i.apply(this,f):f[0],_=l.cache;if(_.has(m))return _.get(m);var x=r.apply(this,f);return l.cache=_.set(m,x)||_,x};return l.cache=new(Da.Cache||qn),l}Da.Cache=qn;function ka(r){if(typeof r!="function")throw new fn(u);return function(){var i=arguments;switch(i.length){case 0:return!r.call(this);case 1:return!r.call(this,i[0]);case 2:return!r.call(this,i[0],i[1]);case 3:return!r.call(this,i[0],i[1],i[2])}return!r.apply(this,i)}}function EB(r){return xv(2,r)}var xB=dL(function(r,i){i=i.length==1&&_e(i[0])?tt(i[0],Xt(pe())):tt(xt(i,1),Xt(pe()));var l=i.length;return Ee(function(f){for(var m=-1,_=Pt(f.length,l);++m<_;)f[m]=i[m].call(this,f[m]);return Zt(r,this,f)})}),of=Ee(function(r,i){var l=_r(i,Gi(of));return Jn(r,D,n,i,l)}),$v=Ee(function(r,i){var l=_r(i,Gi($v));return Jn(r,B,n,i,l)}),AB=Zn(function(r,i){return Jn(r,ae,n,n,n,i)});function OB(r,i){if(typeof r!="function")throw new fn(u);return i=i===n?i:Te(i),Ee(r,i)}function IB(r,i){if(typeof r!="function")throw new fn(u);return i=i==null?0:bt(Te(i),0),Ee(function(l){var f=l[i],m=Er(l,0,i);return f&&br(m,f),Zt(r,this,m)})}function PB(r,i,l){var f=!0,m=!0;if(typeof r!="function")throw new fn(u);return nt(l)&&(f="leading"in l?!!l.leading:f,m="trailing"in l?!!l.trailing:m),Pv(r,i,{leading:f,maxWait:i,trailing:m})}function $B(r){return Ev(r,1)}function MB(r,i){return of(Wc(i),r)}function FB(){if(!arguments.length)return[];var r=arguments[0];return _e(r)?r:[r]}function DB(r){return pn(r,C)}function kB(r,i){return i=typeof i=="function"?i:n,pn(r,C,i)}function NB(r){return pn(r,g|C)}function LB(r,i){return i=typeof i=="function"?i:n,pn(r,g|C,i)}function BB(r,i){return i==null||vy(r,i,Ct(i))}function En(r,i){return r===i||r!==r&&i!==i}var zB=Aa(Pc),UB=Aa(function(r,i){return r>=i}),Qr=Cy(function(){return arguments}())?Cy:function(r){return at(r)&&Ve.call(r,"callee")&&!cy.call(r,"callee")},_e=z.isArray,jB=H0?Xt(H0):KN;function Ht(r){return r!=null&&Na(r.length)&&!Qn(r)}function ct(r){return at(r)&&Ht(r)}function WB(r){return r===!0||r===!1||at(r)&&Lt(r)==ve}var xr=nN||mf,VB=Y0?Xt(Y0):JN;function GB(r){return at(r)&&r.nodeType===1&&!Uo(r)}function HB(r){if(r==null)return!0;if(Ht(r)&&(_e(r)||typeof r=="string"||typeof r.splice=="function"||xr(r)||Hi(r)||Qr(r)))return!r.length;var i=$t(r);if(i==Ke||i==Wt)return!r.size;if(Bo(r))return!Fc(r).length;for(var l in r)if(Ve.call(r,l))return!1;return!0}function YB(r,i){return ko(r,i)}function RB(r,i,l){l=typeof l=="function"?l:n;var f=l?l(r,i):n;return f===n?ko(r,i,n,l):!!f}function sf(r){if(!at(r))return!1;var i=Lt(r);return i==et||i==Se||typeof r.message=="string"&&typeof r.name=="string"&&!Uo(r)}function qB(r){return typeof r=="number"&&dy(r)}function Qn(r){if(!nt(r))return!1;var i=Lt(r);return i==ee||i==mt||i==ye||i==xi}function Mv(r){return typeof r=="number"&&r==Te(r)}function Na(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=Ie}function nt(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}function at(r){return r!=null&&typeof r=="object"}var Fv=R0?Xt(R0):XN;function KB(r,i){return r===i||Mc(r,i,Kc(i))}function JB(r,i,l){return l=typeof l=="function"?l:n,Mc(r,i,Kc(i),l)}function ZB(r){return Dv(r)&&r!=+r}function XB(r){if(kL(r))throw new be(a);return Ey(r)}function QB(r){return r===null}function e3(r){return r==null}function Dv(r){return typeof r=="number"||at(r)&&Lt(r)==Nt}function Uo(r){if(!at(r)||Lt(r)!=yt)return!1;var i=ua(r);if(i===null)return!0;var l=Ve.call(i,"constructor")&&i.constructor;return typeof l=="function"&&l instanceof l&&oa.call(l)==Jk}var af=q0?Xt(q0):QN;function t3(r){return Mv(r)&&r>=-9007199254740991&&r<=Ie}var kv=K0?Xt(K0):eL;function La(r){return typeof r=="string"||!_e(r)&&at(r)&&Lt(r)==zr}function en(r){return typeof r=="symbol"||at(r)&&Lt(r)==fr}var Hi=J0?Xt(J0):tL;function n3(r){return r===n}function r3(r){return at(r)&&$t(r)==an}function i3(r){return at(r)&&Lt(r)==dr}var o3=Aa(Dc),s3=Aa(function(r,i){return r<=i});function Nv(r){if(!r)return[];if(Ht(r))return La(r)?Sn(r):Gt(r);if(Ao&&r[Ao])return Bk(r[Ao]());var i=$t(r),l=i==Ke?wc:i==Wt?na:Yi;return l(r)}function er(r){if(!r)return r===0?r:0;if(r=mn(r),r===Ue||r===-1/0){var i=r<0?-1:1;return i*pt}return r===r?r:0}function Te(r){var i=er(r),l=i%1;return i===i?l?i-l:i:0}function Lv(r){return r?Kr(Te(r),0,k):0}function mn(r){if(typeof r=="number")return r;if(en(r))return R;if(nt(r)){var i=typeof r.valueOf=="function"?r.valueOf():r;r=nt(i)?i+"":i}if(typeof r!="string")return r===0?r:+r;r=ny(r);var l=oc.test(r);return l||P.test(r)?wk(r.slice(2),l?2:8):Xs.test(r)?R:+r}function Bv(r){return kn(r,Yt(r))}function a3(r){return r?Kr(Te(r),-9007199254740991,Ie):r===0?r:0}function je(r){return r==null?"":Qt(r)}var l3=Wi(function(r,i){if(Bo(i)||Ht(i)){kn(i,Ct(i),r);return}for(var l in i)Ve.call(i,l)&&Mo(r,l,i[l])}),zv=Wi(function(r,i){kn(i,Yt(i),r)}),Ba=Wi(function(r,i,l,f){kn(i,Yt(i),r,f)}),u3=Wi(function(r,i,l,f){kn(i,Ct(i),r,f)}),c3=Zn(Ac);function f3(r,i){var l=ji(r);return i==null?l:yy(l,i)}var d3=Ee(function(r,i){r=qe(r);var l=-1,f=i.length,m=f>2?i[2]:n;for(m&&Bt(i[0],i[1],m)&&(f=1);++l<f;)for(var _=i[l],x=Yt(_),I=-1,F=x.length;++I<F;){var G=x[I],H=r[G];(H===n||En(H,Bi[G])&&!Ve.call(r,G))&&(r[G]=_[G])}return r}),p3=Ee(function(r){return r.push(n,nv),Zt(Uv,n,r)});function h3(r,i){return X0(r,pe(i,3),Dn)}function g3(r,i){return X0(r,pe(i,3),Ic)}function m3(r,i){return r==null?r:Oc(r,pe(i,3),Yt)}function y3(r,i){return r==null?r:Ty(r,pe(i,3),Yt)}function v3(r,i){return r&&Dn(r,pe(i,3))}function b3(r,i){return r&&Ic(r,pe(i,3))}function _3(r){return r==null?[]:ba(r,Ct(r))}function w3(r){return r==null?[]:ba(r,Yt(r))}function lf(r,i,l){var f=r==null?n:Jr(r,i);return f===n?l:f}function T3(r,i){return r!=null&&ov(r,i,HN)}function uf(r,i){return r!=null&&ov(r,i,YN)}var S3=Zy(function(r,i,l){i!=null&&typeof i.toString!="function"&&(i=sa.call(i)),r[i]=l},ff(Rt)),C3=Zy(function(r,i,l){i!=null&&typeof i.toString!="function"&&(i=sa.call(i)),Ve.call(r,i)?r[i].push(l):r[i]=[l]},pe),E3=Ee(Do);function Ct(r){return Ht(r)?gy(r):Fc(r)}function Yt(r){return Ht(r)?gy(r,!0):nL(r)}function x3(r,i){var l={};return i=pe(i,3),Dn(r,function(f,m,_){Kn(l,i(f,m,_),f)}),l}function A3(r,i){var l={};return i=pe(i,3),Dn(r,function(f,m,_){Kn(l,m,i(f,m,_))}),l}var O3=Wi(function(r,i,l){_a(r,i,l)}),Uv=Wi(function(r,i,l,f){_a(r,i,l,f)}),I3=Zn(function(r,i){var l={};if(r==null)return l;var f=!1;i=tt(i,function(_){return _=Cr(_,r),f||(f=_.length>1),_}),kn(r,Rc(r),l),f&&(l=pn(l,g|b|C,SL));for(var m=i.length;m--;)zc(l,i[m]);return l});function P3(r,i){return jv(r,ka(pe(i)))}var $3=Zn(function(r,i){return r==null?{}:iL(r,i)});function jv(r,i){if(r==null)return{};var l=tt(Rc(r),function(f){return[f]});return i=pe(i),My(r,l,function(f,m){return i(f,m[0])})}function M3(r,i,l){i=Cr(i,r);var f=-1,m=i.length;for(m||(m=1,r=n);++f<m;){var _=r==null?n:r[Nn(i[f])];_===n&&(f=m,_=l),r=Qn(_)?_.call(r):_}return r}function F3(r,i,l){return r==null?r:No(r,i,l)}function D3(r,i,l,f){return f=typeof f=="function"?f:n,r==null?r:No(r,i,l,f)}var Wv=ev(Ct),Vv=ev(Yt);function k3(r,i,l){var f=_e(r),m=f||xr(r)||Hi(r);if(i=pe(i,4),l==null){var _=r&&r.constructor;m?l=f?new _:[]:nt(r)?l=Qn(_)?ji(ua(r)):{}:l={}}return(m?cn:Dn)(r,function(x,I,F){return i(l,x,I,F)}),l}function N3(r,i){return r==null?!0:zc(r,i)}function L3(r,i,l){return r==null?r:Ly(r,i,Wc(l))}function B3(r,i,l,f){return f=typeof f=="function"?f:n,r==null?r:Ly(r,i,Wc(l),f)}function Yi(r){return r==null?[]:_c(r,Ct(r))}function z3(r){return r==null?[]:_c(r,Yt(r))}function U3(r,i,l){return l===n&&(l=i,i=n),l!==n&&(l=mn(l),l=l===l?l:0),i!==n&&(i=mn(i),i=i===i?i:0),Kr(mn(r),i,l)}function j3(r,i,l){return i=er(i),l===n?(l=i,i=0):l=er(l),r=mn(r),RN(r,i,l)}function W3(r,i,l){if(l&&typeof l!="boolean"&&Bt(r,i,l)&&(i=l=n),l===n&&(typeof i=="boolean"?(l=i,i=n):typeof r=="boolean"&&(l=r,r=n)),r===n&&i===n?(r=0,i=1):(r=er(r),i===n?(i=r,r=0):i=er(i)),r>i){var f=r;r=i,i=f}if(l||r%1||i%1){var m=py();return Pt(r+m*(i-r+_k("1e-"+((m+"").length-1))),i)}return Nc(r,i)}var V3=Vi(function(r,i,l){return i=i.toLowerCase(),r+(l?Gv(i):i)});function Gv(r){return cf(je(r).toLowerCase())}function Hv(r){return r=je(r),r&&r.replace(oe,Fk).replace(ck,"")}function G3(r,i,l){r=je(r),i=Qt(i);var f=r.length;l=l===n?f:Kr(Te(l),0,f);var m=l;return l-=i.length,l>=0&&r.slice(l,m)==i}function H3(r){return r=je(r),r&&rc.test(r)?r.replace(mr,Dk):r}function Y3(r){return r=je(r),r&&ic.test(r)?r.replace($i,"\\$&"):r}var R3=Vi(function(r,i,l){return r+(l?"-":"")+i.toLowerCase()}),q3=Vi(function(r,i,l){return r+(l?" ":"")+i.toLowerCase()}),K3=qy("toLowerCase");function J3(r,i,l){r=je(r),i=Te(i);var f=i?Ni(r):0;if(!i||f>=i)return r;var m=(i-f)/2;return xa(pa(m),l)+r+xa(da(m),l)}function Z3(r,i,l){r=je(r),i=Te(i);var f=i?Ni(r):0;return i&&f<i?r+xa(i-f,l):r}function X3(r,i,l){r=je(r),i=Te(i);var f=i?Ni(r):0;return i&&f<i?xa(i-f,l)+r:r}function Q3(r,i,l){return l||i==null?i=0:i&&(i=+i),sN(je(r).replace(Vt,""),i||0)}function ez(r,i,l){return(l?Bt(r,i,l):i===n)?i=1:i=Te(i),Lc(je(r),i)}function tz(){var r=arguments,i=je(r[0]);return r.length<3?i:i.replace(r[1],r[2])}var nz=Vi(function(r,i,l){return r+(l?"_":"")+i.toLowerCase()});function rz(r,i,l){return l&&typeof l!="number"&&Bt(r,i,l)&&(i=l=n),l=l===n?k:l>>>0,l?(r=je(r),r&&(typeof i=="string"||i!=null&&!af(i))&&(i=Qt(i),!i&&ki(r))?Er(Sn(r),0,l):r.split(i,l)):[]}var iz=Vi(function(r,i,l){return r+(l?" ":"")+cf(i)});function oz(r,i,l){return r=je(r),l=l==null?0:Kr(Te(l),0,r.length),i=Qt(i),r.slice(l,l+i.length)==i}function sz(r,i,l){var f=v.templateSettings;l&&Bt(r,i,l)&&(i=n),r=je(r),i=Ba({},i,f,tv);var m=Ba({},i.imports,f.imports,tv),_=Ct(m),x=_c(m,_),I,F,G=0,H=i.interpolate||We,q="__p += '",re=Tc((i.escape||We).source+"|"+H.source+"|"+(H===Gs?Zs:We).source+"|"+(i.evaluate||We).source+"|$","g"),le="//# sourceURL="+(Ve.call(i,"sourceURL")?(i.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++gk+"]")+`
115
+ `;r.replace(re,function(me,Oe,$e,tn,zt,nn){return $e||($e=tn),q+=r.slice(G,nn).replace(Tt,kk),Oe&&(I=!0,q+=`' +
116
+ __e(`+Oe+`) +
117
+ '`),zt&&(F=!0,q+=`';
118
+ `+zt+`;
119
+ __p += '`),$e&&(q+=`' +
120
+ ((__t = (`+$e+`)) == null ? '' : __t) +
121
+ '`),G=nn+me.length,me}),q+=`';
122
+ `;var ge=Ve.call(i,"variable")&&i.variable;if(!ge)q=`with (obj) {
123
+ `+q+`
124
+ }
125
+ `;else if(Tn.test(ge))throw new be(c);q=(F?q.replace(tc,""):q).replace(Ii,"$1").replace(Pi,"$1;"),q="function("+(ge||"obj")+`) {
126
+ `+(ge?"":`obj || (obj = {});
127
+ `)+"var __t, __p = ''"+(I?", __e = _.escape":"")+(F?`, __j = Array.prototype.join;
128
+ function print() { __p += __j.call(arguments, '') }
129
+ `:`;
130
+ `)+q+`return __p
131
+ }`;var Ce=Rv(function(){return Le(_,le+"return "+q).apply(n,x)});if(Ce.source=q,sf(Ce))throw Ce;return Ce}function az(r){return je(r).toLowerCase()}function lz(r){return je(r).toUpperCase()}function uz(r,i,l){if(r=je(r),r&&(l||i===n))return ny(r);if(!r||!(i=Qt(i)))return r;var f=Sn(r),m=Sn(i),_=ry(f,m),x=iy(f,m)+1;return Er(f,_,x).join("")}function cz(r,i,l){if(r=je(r),r&&(l||i===n))return r.slice(0,sy(r)+1);if(!r||!(i=Qt(i)))return r;var f=Sn(r),m=iy(f,Sn(i))+1;return Er(f,0,m).join("")}function fz(r,i,l){if(r=je(r),r&&(l||i===n))return r.replace(Vt,"");if(!r||!(i=Qt(i)))return r;var f=Sn(r),m=ry(f,Sn(i));return Er(f,m).join("")}function dz(r,i){var l=S,f=W;if(nt(i)){var m="separator"in i?i.separator:m;l="length"in i?Te(i.length):l,f="omission"in i?Qt(i.omission):f}r=je(r);var _=r.length;if(ki(r)){var x=Sn(r);_=x.length}if(l>=_)return r;var I=l-Ni(f);if(I<1)return f;var F=x?Er(x,0,I).join(""):r.slice(0,I);if(m===n)return F+f;if(x&&(I+=F.length-I),af(m)){if(r.slice(I).search(m)){var G,H=F;for(m.global||(m=Tc(m.source,je(So.exec(m))+"g")),m.lastIndex=0;G=m.exec(H);)var q=G.index;F=F.slice(0,q===n?I:q)}}else if(r.indexOf(Qt(m),I)!=I){var re=F.lastIndexOf(m);re>-1&&(F=F.slice(0,re))}return F+f}function pz(r){return r=je(r),r&&nc.test(r)?r.replace(Vs,Wk):r}var hz=Vi(function(r,i,l){return r+(l?" ":"")+i.toUpperCase()}),cf=qy("toUpperCase");function Yv(r,i,l){return r=je(r),i=l?n:i,i===n?Lk(r)?Hk(r):Ok(r):r.match(i)||[]}var Rv=Ee(function(r,i){try{return Zt(r,n,i)}catch(l){return sf(l)?l:new be(l)}}),gz=Zn(function(r,i){return cn(i,function(l){l=Nn(l),Kn(r,l,rf(r[l],r))}),r});function mz(r){var i=r==null?0:r.length,l=pe();return r=i?tt(r,function(f){if(typeof f[1]!="function")throw new fn(u);return[l(f[0]),f[1]]}):[],Ee(function(f){for(var m=-1;++m<i;){var _=r[m];if(Zt(_[0],this,f))return Zt(_[1],this,f)}})}function yz(r){return WN(pn(r,g))}function ff(r){return function(){return r}}function vz(r,i){return r==null||r!==r?i:r}var bz=Jy(),_z=Jy(!0);function Rt(r){return r}function df(r){return xy(typeof r=="function"?r:pn(r,g))}function wz(r){return Oy(pn(r,g))}function Tz(r,i){return Iy(r,pn(i,g))}var Sz=Ee(function(r,i){return function(l){return Do(l,r,i)}}),Cz=Ee(function(r,i){return function(l){return Do(r,l,i)}});function pf(r,i,l){var f=Ct(i),m=ba(i,f);l==null&&!(nt(i)&&(m.length||!f.length))&&(l=i,i=r,r=this,m=ba(i,Ct(i)));var _=!(nt(l)&&"chain"in l)||!!l.chain,x=Qn(r);return cn(m,function(I){var F=i[I];r[I]=F,x&&(r.prototype[I]=function(){var G=this.__chain__;if(_||G){var H=r(this.__wrapped__),q=H.__actions__=Gt(this.__actions__);return q.push({func:F,args:arguments,thisArg:r}),H.__chain__=G,H}return F.apply(r,br([this.value()],arguments))})}),r}function Ez(){return Et._===this&&(Et._=Zk),this}function hf(){}function xz(r){return r=Te(r),Ee(function(i){return Py(i,r)})}var Az=Gc(tt),Oz=Gc(Z0),Iz=Gc(gc);function qv(r){return Zc(r)?mc(Nn(r)):oL(r)}function Pz(r){return function(i){return r==null?n:Jr(r,i)}}var $z=Xy(),Mz=Xy(!0);function gf(){return[]}function mf(){return!1}function Fz(){return{}}function Dz(){return""}function kz(){return!0}function Nz(r,i){if(r=Te(r),r<1||r>Ie)return[];var l=k,f=Pt(r,k);i=pe(i),r-=k;for(var m=bc(f,i);++l<r;)i(l);return m}function Lz(r){return _e(r)?tt(r,Nn):en(r)?[r]:Gt(hv(je(r)))}function Bz(r){var i=++Kk;return je(r)+i}var zz=Ea(function(r,i){return r+i},0),Uz=Hc("ceil"),jz=Ea(function(r,i){return r/i},1),Wz=Hc("floor");function Vz(r){return r&&r.length?va(r,Rt,Pc):n}function Gz(r,i){return r&&r.length?va(r,pe(i,2),Pc):n}function Hz(r){return ey(r,Rt)}function Yz(r,i){return ey(r,pe(i,2))}function Rz(r){return r&&r.length?va(r,Rt,Dc):n}function qz(r,i){return r&&r.length?va(r,pe(i,2),Dc):n}var Kz=Ea(function(r,i){return r*i},1),Jz=Hc("round"),Zz=Ea(function(r,i){return r-i},0);function Xz(r){return r&&r.length?vc(r,Rt):0}function Qz(r,i){return r&&r.length?vc(r,pe(i,2)):0}return v.after=wB,v.ary=Ev,v.assign=l3,v.assignIn=zv,v.assignInWith=Ba,v.assignWith=u3,v.at=c3,v.before=xv,v.bind=rf,v.bindAll=gz,v.bindKey=Av,v.castArray=FB,v.chain=Tv,v.chunk=WL,v.compact=VL,v.concat=GL,v.cond=mz,v.conforms=yz,v.constant=ff,v.countBy=X5,v.create=f3,v.curry=Ov,v.curryRight=Iv,v.debounce=Pv,v.defaults=d3,v.defaultsDeep=p3,v.defer=TB,v.delay=SB,v.difference=HL,v.differenceBy=YL,v.differenceWith=RL,v.drop=qL,v.dropRight=KL,v.dropRightWhile=JL,v.dropWhile=ZL,v.fill=XL,v.filter=eB,v.flatMap=rB,v.flatMapDeep=iB,v.flatMapDepth=oB,v.flatten=vv,v.flattenDeep=QL,v.flattenDepth=e5,v.flip=CB,v.flow=bz,v.flowRight=_z,v.fromPairs=t5,v.functions=_3,v.functionsIn=w3,v.groupBy=sB,v.initial=r5,v.intersection=i5,v.intersectionBy=o5,v.intersectionWith=s5,v.invert=S3,v.invertBy=C3,v.invokeMap=lB,v.iteratee=df,v.keyBy=uB,v.keys=Ct,v.keysIn=Yt,v.map=Ma,v.mapKeys=x3,v.mapValues=A3,v.matches=wz,v.matchesProperty=Tz,v.memoize=Da,v.merge=O3,v.mergeWith=Uv,v.method=Sz,v.methodOf=Cz,v.mixin=pf,v.negate=ka,v.nthArg=xz,v.omit=I3,v.omitBy=P3,v.once=EB,v.orderBy=cB,v.over=Az,v.overArgs=xB,v.overEvery=Oz,v.overSome=Iz,v.partial=of,v.partialRight=$v,v.partition=fB,v.pick=$3,v.pickBy=jv,v.property=qv,v.propertyOf=Pz,v.pull=c5,v.pullAll=_v,v.pullAllBy=f5,v.pullAllWith=d5,v.pullAt=p5,v.range=$z,v.rangeRight=Mz,v.rearg=AB,v.reject=hB,v.remove=h5,v.rest=OB,v.reverse=tf,v.sampleSize=mB,v.set=F3,v.setWith=D3,v.shuffle=yB,v.slice=g5,v.sortBy=_B,v.sortedUniq=T5,v.sortedUniqBy=S5,v.split=rz,v.spread=IB,v.tail=C5,v.take=E5,v.takeRight=x5,v.takeRightWhile=A5,v.takeWhile=O5,v.tap=V5,v.throttle=PB,v.thru=$a,v.toArray=Nv,v.toPairs=Wv,v.toPairsIn=Vv,v.toPath=Lz,v.toPlainObject=Bv,v.transform=k3,v.unary=$B,v.union=I5,v.unionBy=P5,v.unionWith=$5,v.uniq=M5,v.uniqBy=F5,v.uniqWith=D5,v.unset=N3,v.unzip=nf,v.unzipWith=wv,v.update=L3,v.updateWith=B3,v.values=Yi,v.valuesIn=z3,v.without=k5,v.words=Yv,v.wrap=MB,v.xor=N5,v.xorBy=L5,v.xorWith=B5,v.zip=z5,v.zipObject=U5,v.zipObjectDeep=j5,v.zipWith=W5,v.entries=Wv,v.entriesIn=Vv,v.extend=zv,v.extendWith=Ba,pf(v,v),v.add=zz,v.attempt=Rv,v.camelCase=V3,v.capitalize=Gv,v.ceil=Uz,v.clamp=U3,v.clone=DB,v.cloneDeep=NB,v.cloneDeepWith=LB,v.cloneWith=kB,v.conformsTo=BB,v.deburr=Hv,v.defaultTo=vz,v.divide=jz,v.endsWith=G3,v.eq=En,v.escape=H3,v.escapeRegExp=Y3,v.every=Q5,v.find=tB,v.findIndex=mv,v.findKey=h3,v.findLast=nB,v.findLastIndex=yv,v.findLastKey=g3,v.floor=Wz,v.forEach=Sv,v.forEachRight=Cv,v.forIn=m3,v.forInRight=y3,v.forOwn=v3,v.forOwnRight=b3,v.get=lf,v.gt=zB,v.gte=UB,v.has=T3,v.hasIn=uf,v.head=bv,v.identity=Rt,v.includes=aB,v.indexOf=n5,v.inRange=j3,v.invoke=E3,v.isArguments=Qr,v.isArray=_e,v.isArrayBuffer=jB,v.isArrayLike=Ht,v.isArrayLikeObject=ct,v.isBoolean=WB,v.isBuffer=xr,v.isDate=VB,v.isElement=GB,v.isEmpty=HB,v.isEqual=YB,v.isEqualWith=RB,v.isError=sf,v.isFinite=qB,v.isFunction=Qn,v.isInteger=Mv,v.isLength=Na,v.isMap=Fv,v.isMatch=KB,v.isMatchWith=JB,v.isNaN=ZB,v.isNative=XB,v.isNil=e3,v.isNull=QB,v.isNumber=Dv,v.isObject=nt,v.isObjectLike=at,v.isPlainObject=Uo,v.isRegExp=af,v.isSafeInteger=t3,v.isSet=kv,v.isString=La,v.isSymbol=en,v.isTypedArray=Hi,v.isUndefined=n3,v.isWeakMap=r3,v.isWeakSet=i3,v.join=a5,v.kebabCase=R3,v.last=gn,v.lastIndexOf=l5,v.lowerCase=q3,v.lowerFirst=K3,v.lt=o3,v.lte=s3,v.max=Vz,v.maxBy=Gz,v.mean=Hz,v.meanBy=Yz,v.min=Rz,v.minBy=qz,v.stubArray=gf,v.stubFalse=mf,v.stubObject=Fz,v.stubString=Dz,v.stubTrue=kz,v.multiply=Kz,v.nth=u5,v.noConflict=Ez,v.noop=hf,v.now=Fa,v.pad=J3,v.padEnd=Z3,v.padStart=X3,v.parseInt=Q3,v.random=W3,v.reduce=dB,v.reduceRight=pB,v.repeat=ez,v.replace=tz,v.result=M3,v.round=Jz,v.runInContext=M,v.sample=gB,v.size=vB,v.snakeCase=nz,v.some=bB,v.sortedIndex=m5,v.sortedIndexBy=y5,v.sortedIndexOf=v5,v.sortedLastIndex=b5,v.sortedLastIndexBy=_5,v.sortedLastIndexOf=w5,v.startCase=iz,v.startsWith=oz,v.subtract=Zz,v.sum=Xz,v.sumBy=Qz,v.template=sz,v.times=Nz,v.toFinite=er,v.toInteger=Te,v.toLength=Lv,v.toLower=az,v.toNumber=mn,v.toSafeInteger=a3,v.toString=je,v.toUpper=lz,v.trim=uz,v.trimEnd=cz,v.trimStart=fz,v.truncate=dz,v.unescape=pz,v.uniqueId=Bz,v.upperCase=hz,v.upperFirst=cf,v.each=Sv,v.eachRight=Cv,v.first=bv,pf(v,function(){var r={};return Dn(v,function(i,l){Ve.call(v.prototype,l)||(r[l]=i)}),r}(),{chain:!1}),v.VERSION=o,cn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){v[r].placeholder=v}),cn(["drop","take"],function(r,i){Pe.prototype[r]=function(l){l=l===n?1:bt(Te(l),0);var f=this.__filtered__&&!i?new Pe(this):this.clone();return f.__filtered__?f.__takeCount__=Pt(l,f.__takeCount__):f.__views__.push({size:Pt(l,k),type:r+(f.__dir__<0?"Right":"")}),f},Pe.prototype[r+"Right"]=function(l){return this.reverse()[r](l).reverse()}}),cn(["filter","map","takeWhile"],function(r,i){var l=i+1,f=l==he||l==De;Pe.prototype[r]=function(m){var _=this.clone();return _.__iteratees__.push({iteratee:pe(m,3),type:l}),_.__filtered__=_.__filtered__||f,_}}),cn(["head","last"],function(r,i){var l="take"+(i?"Right":"");Pe.prototype[r]=function(){return this[l](1).value()[0]}}),cn(["initial","tail"],function(r,i){var l="drop"+(i?"":"Right");Pe.prototype[r]=function(){return this.__filtered__?new Pe(this):this[l](1)}}),Pe.prototype.compact=function(){return this.filter(Rt)},Pe.prototype.find=function(r){return this.filter(r).head()},Pe.prototype.findLast=function(r){return this.reverse().find(r)},Pe.prototype.invokeMap=Ee(function(r,i){return typeof r=="function"?new Pe(this):this.map(function(l){return Do(l,r,i)})}),Pe.prototype.reject=function(r){return this.filter(ka(pe(r)))},Pe.prototype.slice=function(r,i){r=Te(r);var l=this;return l.__filtered__&&(r>0||i<0)?new Pe(l):(r<0?l=l.takeRight(-r):r&&(l=l.drop(r)),i!==n&&(i=Te(i),l=i<0?l.dropRight(-i):l.take(i-r)),l)},Pe.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},Pe.prototype.toArray=function(){return this.take(k)},Dn(Pe.prototype,function(r,i){var l=/^(?:filter|find|map|reject)|While$/.test(i),f=/^(?:head|last)$/.test(i),m=v[f?"take"+(i=="last"?"Right":""):i],_=f||/^find/.test(i);m&&(v.prototype[i]=function(){var x=this.__wrapped__,I=f?[1]:arguments,F=x instanceof Pe,G=I[0],H=F||_e(x),q=function(Oe){var $e=m.apply(v,br([Oe],I));return f&&re?$e[0]:$e};H&&l&&typeof G=="function"&&G.length!=1&&(F=H=!1);var re=this.__chain__,le=!!this.__actions__.length,ge=_&&!re,Ce=F&&!le;if(!_&&H){x=Ce?x:new Pe(this);var me=r.apply(x,I);return me.__actions__.push({func:$a,args:[q],thisArg:n}),new dn(me,re)}return ge&&Ce?r.apply(this,I):(me=this.thru(q),ge?f?me.value()[0]:me.value():me)})}),cn(["pop","push","shift","sort","splice","unshift"],function(r){var i=ra[r],l=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",f=/^(?:pop|shift)$/.test(r);v.prototype[r]=function(){var m=arguments;if(f&&!this.__chain__){var _=this.value();return i.apply(_e(_)?_:[],m)}return this[l](function(x){return i.apply(_e(x)?x:[],m)})}}),Dn(Pe.prototype,function(r,i){var l=v[i];if(l){var f=l.name+"";Ve.call(Ui,f)||(Ui[f]=[]),Ui[f].push({name:i,func:l})}}),Ui[Ca(n,N).name]=[{name:"wrapper",func:n}],Pe.prototype.clone=pN,Pe.prototype.reverse=hN,Pe.prototype.value=gN,v.prototype.at=G5,v.prototype.chain=H5,v.prototype.commit=Y5,v.prototype.next=R5,v.prototype.plant=K5,v.prototype.reverse=J5,v.prototype.toJSON=v.prototype.valueOf=v.prototype.value=Z5,v.prototype.first=v.prototype.head,Ao&&(v.prototype[Ao]=q5),v},Li=Yk();Hr?((Hr.exports=Li)._=Li,fc._=Li):Et._=Li}).call(Un)}(ps,ps.exports);var OS=ps.exports;function Pp(e){const{renderers:t,cells:n,uischemas:o,schema:s,label:a,path:u,visible:c,enabled:d,uischema:h,rootSchema:y}=e,g=A.useMemo(()=>se.findUISchema(o,s,h.scope,u,()=>OS.isEmpty(u)?se.Generate.uiSchema(s,"VerticalLayout",void 0,y):{...se.Generate.uiSchema(s,"Group",void 0,y),label:a},h,y),[o,s,u,a,h,y]);return c?p.jsx(Me.JsonFormsDispatch,{visible:c,enabled:d,schema:s,uischema:g,path:u,renderers:t,cells:n}):null}function Zl(e){const t=In(e),{path:n,data:o,schema:s}=e,a=ds(o,s),u=A.useMemo(()=>{var b;const y=o===null,g=(b=t.error)==null?void 0:b.filter(C=>C.key==="is a required property"||!y?C:!1);return g!=null&&g.length?{error:g}:{error:y&&t.required?"is a required property":void 0}},[t.error,t.required,o]),c=A.useMemo(()=>({...t,...a,...u}),[t,u,a]),[d,h]=_n("OneOfEnum",n,c,e);return d===void 0?p.jsx(T.Select,{...h}):d}function Xl(e){const t=In(e),{path:n,data:o,schema:s}=e,a=Ap({data:o,onChange:t.onChange}),u=A.useMemo(()=>({...t,...a}),[t,a]),[c,d]=_n("Text",n,u,e);return c===void 0?s.format==="password"?p.jsx(T.PasswordInput,{...d}):p.jsx(T.TextInput,{...d}):c}const $p=se.rankWith(1,se.isBooleanControl),Mp=Me.withJsonFormsCellProps(e=>p.jsx(Rl,{...e})),Fp=se.rankWith(1,se.isDateControl),Dp=Me.withJsonFormsCellProps(e=>p.jsx(ql,{...e})),kp=se.rankWith(1,se.isDateTimeControl),Np=Me.withJsonFormsControlProps(e=>p.jsx(Kl,{...e})),Lp=se.rankWith(2,se.isEnumControl),Bp=Me.withJsonFormsEnumProps(Me.withTranslateProps(e=>p.jsx(Jl,{...e})),!1),zp=se.rankWith(1,se.isIntegerControl),Up=Me.withJsonFormsCellProps(e=>p.jsx(ro,{...e})),jp=se.rankWith(1,se.isNumberControl),Wp=Me.withJsonFormsCellProps(e=>p.jsx(ro,{...e})),Vp=se.rankWith(2,se.isOneOfControl),Gp=Me.withJsonFormsOneOfEnumProps(Me.withTranslateProps(e=>p.jsx(Zl,{...e})),!1),Hp=se.rankWith(1,se.isStringControl),Yp=Me.withJsonFormsCellProps(e=>p.jsx(Xl,{...e})),Rp=A.memo(function({open:t,onClose:n,onConfirm:o,onCancel:s,title:a,message:u,acceptText:c,declineText:d}){return p.jsxs(T.Modal,{opened:t,withCloseButton:!1,centered:!0,title:a,keepMounted:!0,onClose:n,children:[u,p.jsxs(T.Flex,{justify:"flex-end",align:"center",gap:"sm",children:[p.jsx(T.Button,{onClick:s,children:d}),p.jsx(T.Button,{onClick:o,children:c})]})]})});var Ql={exports:{}},Ge={};/**
106
132
  * @license React
107
133
  * react-is.production.js
108
134
  *
@@ -110,7 +136,7 @@ attempted value: ${s}
110
136
  *
111
137
  * This source code is licensed under the MIT license found in the
112
138
  * LICENSE file in the root directory of this source tree.
113
- */var ec;function M0(){if(ec)return ce;ec=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),s=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),y=Symbol.for("react.client.reference");function b(g){if(typeof g=="object"&&g!==null){var w=g.$$typeof;switch(w){case e:switch(g=g.type,g){case n:case o:case r:case l:case u:return g;default:switch(g=g&&g.$$typeof,g){case s:case a:case f:case d:return g;case i:return g;default:return w}}case t:return w}}}return ce.ContextConsumer=i,ce.ContextProvider=s,ce.Element=e,ce.ForwardRef=a,ce.Fragment=n,ce.Lazy=f,ce.Memo=d,ce.Portal=t,ce.Profiler=o,ce.StrictMode=r,ce.Suspense=l,ce.SuspenseList=u,ce.isContextConsumer=function(g){return b(g)===i},ce.isContextProvider=function(g){return b(g)===s},ce.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===e},ce.isForwardRef=function(g){return b(g)===a},ce.isFragment=function(g){return b(g)===n},ce.isLazy=function(g){return b(g)===f},ce.isMemo=function(g){return b(g)===d},ce.isPortal=function(g){return b(g)===t},ce.isProfiler=function(g){return b(g)===o},ce.isStrictMode=function(g){return b(g)===r},ce.isSuspense=function(g){return b(g)===l},ce.isSuspenseList=function(g){return b(g)===u},ce.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===n||g===o||g===r||g===l||g===u||g===p||typeof g=="object"&&g!==null&&(g.$$typeof===f||g.$$typeof===d||g.$$typeof===s||g.$$typeof===i||g.$$typeof===a||g.$$typeof===y||g.getModuleId!==void 0)},ce.typeOf=b,ce}var ue={};/**
139
+ */var qp;function IS(){if(qp)return Ge;qp=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),b=Symbol.for("react.offscreen"),C=Symbol.for("react.client.reference");function E(w){if(typeof w=="object"&&w!==null){var $=w.$$typeof;switch($){case e:switch(w=w.type,w){case n:case s:case o:case d:case h:return w;default:switch(w=w&&w.$$typeof,w){case u:case c:case g:case y:return w;case a:return w;default:return $}}case t:return $}}}return Ge.ContextConsumer=a,Ge.ContextProvider=u,Ge.Element=e,Ge.ForwardRef=c,Ge.Fragment=n,Ge.Lazy=g,Ge.Memo=y,Ge.Portal=t,Ge.Profiler=s,Ge.StrictMode=o,Ge.Suspense=d,Ge.SuspenseList=h,Ge.isContextConsumer=function(w){return E(w)===a},Ge.isContextProvider=function(w){return E(w)===u},Ge.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===e},Ge.isForwardRef=function(w){return E(w)===c},Ge.isFragment=function(w){return E(w)===n},Ge.isLazy=function(w){return E(w)===g},Ge.isMemo=function(w){return E(w)===y},Ge.isPortal=function(w){return E(w)===t},Ge.isProfiler=function(w){return E(w)===s},Ge.isStrictMode=function(w){return E(w)===o},Ge.isSuspense=function(w){return E(w)===d},Ge.isSuspenseList=function(w){return E(w)===h},Ge.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===n||w===s||w===o||w===d||w===h||w===b||typeof w=="object"&&w!==null&&(w.$$typeof===g||w.$$typeof===y||w.$$typeof===u||w.$$typeof===a||w.$$typeof===c||w.$$typeof===C||w.getModuleId!==void 0)},Ge.typeOf=E,Ge}var He={};/**
114
140
  * @license React
115
141
  * react-is.development.js
116
142
  *
@@ -118,42 +144,42 @@ attempted value: ${s}
118
144
  *
119
145
  * This source code is licensed under the MIT license found in the
120
146
  * LICENSE file in the root directory of this source tree.
121
- */var tc;function F0(){return tc||(tc=1,process.env.NODE_ENV!=="production"&&function(){function e(g){if(typeof g=="object"&&g!==null){var w=g.$$typeof;switch(w){case t:switch(g=g.type,g){case r:case i:case o:case u:case d:return g;default:switch(g=g&&g.$$typeof,g){case a:case l:case p:case f:return g;case s:return g;default:return w}}case n:return w}}}var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),b=Symbol.for("react.client.reference");ue.ContextConsumer=s,ue.ContextProvider=a,ue.Element=t,ue.ForwardRef=l,ue.Fragment=r,ue.Lazy=p,ue.Memo=f,ue.Portal=n,ue.Profiler=i,ue.StrictMode=o,ue.Suspense=u,ue.SuspenseList=d,ue.isContextConsumer=function(g){return e(g)===s},ue.isContextProvider=function(g){return e(g)===a},ue.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===t},ue.isForwardRef=function(g){return e(g)===l},ue.isFragment=function(g){return e(g)===r},ue.isLazy=function(g){return e(g)===p},ue.isMemo=function(g){return e(g)===f},ue.isPortal=function(g){return e(g)===n},ue.isProfiler=function(g){return e(g)===i},ue.isStrictMode=function(g){return e(g)===o},ue.isSuspense=function(g){return e(g)===u},ue.isSuspenseList=function(g){return e(g)===d},ue.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===r||g===i||g===o||g===u||g===d||g===y||typeof g=="object"&&g!==null&&(g.$$typeof===p||g.$$typeof===f||g.$$typeof===a||g.$$typeof===s||g.$$typeof===l||g.$$typeof===b||g.getModuleId!==void 0)},ue.typeOf=e}()),ue}process.env.NODE_ENV==="production"?mi.exports=M0():mi.exports=F0();var br=mi.exports;function pt(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function nc(e){if(Fe.isValidElement(e)||br.isValidElementType(e)||!pt(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=nc(e[n])}),t}function We(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return pt(e)&&pt(t)&&Object.keys(t).forEach(o=>{Fe.isValidElement(t[o])||br.isValidElementType(t[o])?r[o]=t[o]:pt(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&pt(e[o])?r[o]=We(e[o],t[o],n):n.clone?r[o]=pt(t[o])?nc(t[o]):t[o]:r[o]=t[o]}),r}var yi={exports:{}},vr={exports:{}},ie={};/** @license React v16.13.1
147
+ */var Kp;function PS(){return Kp||(Kp=1,process.env.NODE_ENV!=="production"&&function(){function e(w){if(typeof w=="object"&&w!==null){var $=w.$$typeof;switch($){case t:switch(w=w.type,w){case o:case a:case s:case h:case y:return w;default:switch(w=w&&w.$$typeof,w){case c:case d:case b:case g:return w;case u:return w;default:return $}}case n:return $}}}var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),C=Symbol.for("react.offscreen"),E=Symbol.for("react.client.reference");He.ContextConsumer=u,He.ContextProvider=c,He.Element=t,He.ForwardRef=d,He.Fragment=o,He.Lazy=b,He.Memo=g,He.Portal=n,He.Profiler=a,He.StrictMode=s,He.Suspense=h,He.SuspenseList=y,He.isContextConsumer=function(w){return e(w)===u},He.isContextProvider=function(w){return e(w)===c},He.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},He.isForwardRef=function(w){return e(w)===d},He.isFragment=function(w){return e(w)===o},He.isLazy=function(w){return e(w)===b},He.isMemo=function(w){return e(w)===g},He.isPortal=function(w){return e(w)===n},He.isProfiler=function(w){return e(w)===a},He.isStrictMode=function(w){return e(w)===s},He.isSuspense=function(w){return e(w)===h},He.isSuspenseList=function(w){return e(w)===y},He.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===o||w===a||w===s||w===h||w===y||w===C||typeof w=="object"&&w!==null&&(w.$$typeof===b||w.$$typeof===g||w.$$typeof===c||w.$$typeof===u||w.$$typeof===d||w.$$typeof===E||w.getModuleId!==void 0)},He.typeOf=e}()),He}process.env.NODE_ENV==="production"?Ql.exports=IS():Ql.exports=PS();var hs=Ql.exports;function Vn(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Jp(e){if(Mt.isValidElement(e)||hs.isValidElementType(e)||!Vn(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=Jp(e[n])}),t}function qt(e,t,n={clone:!0}){const o=n.clone?{...e}:e;return Vn(e)&&Vn(t)&&Object.keys(t).forEach(s=>{Mt.isValidElement(t[s])||hs.isValidElementType(t[s])?o[s]=t[s]:Vn(t[s])&&Object.prototype.hasOwnProperty.call(e,s)&&Vn(e[s])?o[s]=qt(e[s],t[s],n):n.clone?o[s]=Vn(t[s])?Jp(t[s]):t[s]:o[s]=t[s]}),o}var eu={exports:{}},gs={exports:{}},Be={};/** @license React v16.13.1
122
148
  * react-is.production.min.js
123
149
  *
124
150
  * Copyright (c) Facebook, Inc. and its affiliates.
125
151
  *
126
152
  * This source code is licensed under the MIT license found in the
127
153
  * LICENSE file in the root directory of this source tree.
128
- */var rc;function D0(){if(rc)return ie;rc=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,w=e?Symbol.for("react.fundamental"):60117,E=e?Symbol.for("react.responder"):60118,F=e?Symbol.for("react.scope"):60119;function I(_){if(typeof _=="object"&&_!==null){var x=_.$$typeof;switch(x){case t:switch(_=_.type,_){case l:case u:case r:case i:case o:case f:return _;default:switch(_=_&&_.$$typeof,_){case a:case d:case b:case y:case s:return _;default:return x}}case n:return x}}}function A(_){return I(_)===u}return ie.AsyncMode=l,ie.ConcurrentMode=u,ie.ContextConsumer=a,ie.ContextProvider=s,ie.Element=t,ie.ForwardRef=d,ie.Fragment=r,ie.Lazy=b,ie.Memo=y,ie.Portal=n,ie.Profiler=i,ie.StrictMode=o,ie.Suspense=f,ie.isAsyncMode=function(_){return A(_)||I(_)===l},ie.isConcurrentMode=A,ie.isContextConsumer=function(_){return I(_)===a},ie.isContextProvider=function(_){return I(_)===s},ie.isElement=function(_){return typeof _=="object"&&_!==null&&_.$$typeof===t},ie.isForwardRef=function(_){return I(_)===d},ie.isFragment=function(_){return I(_)===r},ie.isLazy=function(_){return I(_)===b},ie.isMemo=function(_){return I(_)===y},ie.isPortal=function(_){return I(_)===n},ie.isProfiler=function(_){return I(_)===i},ie.isStrictMode=function(_){return I(_)===o},ie.isSuspense=function(_){return I(_)===f},ie.isValidElementType=function(_){return typeof _=="string"||typeof _=="function"||_===r||_===u||_===i||_===o||_===f||_===p||typeof _=="object"&&_!==null&&(_.$$typeof===b||_.$$typeof===y||_.$$typeof===s||_.$$typeof===a||_.$$typeof===d||_.$$typeof===w||_.$$typeof===E||_.$$typeof===F||_.$$typeof===g)},ie.typeOf=I,ie}var se={};/** @license React v16.13.1
154
+ */var Zp;function $S(){if(Zp)return Be;Zp=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,u=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,d=e?Symbol.for("react.async_mode"):60111,h=e?Symbol.for("react.concurrent_mode"):60111,y=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,b=e?Symbol.for("react.suspense_list"):60120,C=e?Symbol.for("react.memo"):60115,E=e?Symbol.for("react.lazy"):60116,w=e?Symbol.for("react.block"):60121,$=e?Symbol.for("react.fundamental"):60117,N=e?Symbol.for("react.responder"):60118,J=e?Symbol.for("react.scope"):60119;function V(D){if(typeof D=="object"&&D!==null){var B=D.$$typeof;switch(B){case t:switch(D=D.type,D){case d:case h:case o:case a:case s:case g:return D;default:switch(D=D&&D.$$typeof,D){case c:case y:case E:case C:case u:return D;default:return B}}case n:return B}}}function L(D){return V(D)===h}return Be.AsyncMode=d,Be.ConcurrentMode=h,Be.ContextConsumer=c,Be.ContextProvider=u,Be.Element=t,Be.ForwardRef=y,Be.Fragment=o,Be.Lazy=E,Be.Memo=C,Be.Portal=n,Be.Profiler=a,Be.StrictMode=s,Be.Suspense=g,Be.isAsyncMode=function(D){return L(D)||V(D)===d},Be.isConcurrentMode=L,Be.isContextConsumer=function(D){return V(D)===c},Be.isContextProvider=function(D){return V(D)===u},Be.isElement=function(D){return typeof D=="object"&&D!==null&&D.$$typeof===t},Be.isForwardRef=function(D){return V(D)===y},Be.isFragment=function(D){return V(D)===o},Be.isLazy=function(D){return V(D)===E},Be.isMemo=function(D){return V(D)===C},Be.isPortal=function(D){return V(D)===n},Be.isProfiler=function(D){return V(D)===a},Be.isStrictMode=function(D){return V(D)===s},Be.isSuspense=function(D){return V(D)===g},Be.isValidElementType=function(D){return typeof D=="string"||typeof D=="function"||D===o||D===h||D===a||D===s||D===g||D===b||typeof D=="object"&&D!==null&&(D.$$typeof===E||D.$$typeof===C||D.$$typeof===u||D.$$typeof===c||D.$$typeof===y||D.$$typeof===$||D.$$typeof===N||D.$$typeof===J||D.$$typeof===w)},Be.typeOf=V,Be}var ze={};/** @license React v16.13.1
129
155
  * react-is.development.js
130
156
  *
131
157
  * Copyright (c) Facebook, Inc. and its affiliates.
132
158
  *
133
159
  * This source code is licensed under the MIT license found in the
134
160
  * LICENSE file in the root directory of this source tree.
135
- */var oc;function N0(){return oc||(oc=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,w=e?Symbol.for("react.fundamental"):60117,E=e?Symbol.for("react.responder"):60118,F=e?Symbol.for("react.scope"):60119;function I(j){return typeof j=="string"||typeof j=="function"||j===r||j===u||j===i||j===o||j===f||j===p||typeof j=="object"&&j!==null&&(j.$$typeof===b||j.$$typeof===y||j.$$typeof===s||j.$$typeof===a||j.$$typeof===d||j.$$typeof===w||j.$$typeof===E||j.$$typeof===F||j.$$typeof===g)}function A(j){if(typeof j=="object"&&j!==null){var ke=j.$$typeof;switch(ke){case t:var Ue=j.type;switch(Ue){case l:case u:case r:case i:case o:case f:return Ue;default:var mt=Ue&&Ue.$$typeof;switch(mt){case a:case d:case b:case y:case s:return mt;default:return ke}}case n:return ke}}}var _=l,x=u,k=a,G=s,z=t,m=d,P=r,L=b,Y=y,q=n,re=i,oe=o,he=f,le=!1;function xe(j){return le||(le=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),$(j)||A(j)===l}function $(j){return A(j)===u}function C(j){return A(j)===a}function M(j){return A(j)===s}function N(j){return typeof j=="object"&&j!==null&&j.$$typeof===t}function W(j){return A(j)===d}function B(j){return A(j)===r}function J(j){return A(j)===b}function K(j){return A(j)===y}function Z(j){return A(j)===n}function ee(j){return A(j)===i}function Q(j){return A(j)===o}function Ce(j){return A(j)===f}se.AsyncMode=_,se.ConcurrentMode=x,se.ContextConsumer=k,se.ContextProvider=G,se.Element=z,se.ForwardRef=m,se.Fragment=P,se.Lazy=L,se.Memo=Y,se.Portal=q,se.Profiler=re,se.StrictMode=oe,se.Suspense=he,se.isAsyncMode=xe,se.isConcurrentMode=$,se.isContextConsumer=C,se.isContextProvider=M,se.isElement=N,se.isForwardRef=W,se.isFragment=B,se.isLazy=J,se.isMemo=K,se.isPortal=Z,se.isProfiler=ee,se.isStrictMode=Q,se.isSuspense=Ce,se.isValidElementType=I,se.typeOf=A}()),se}var ic;function sc(){return ic||(ic=1,process.env.NODE_ENV==="production"?vr.exports=D0():vr.exports=N0()),vr.exports}/*
161
+ */var Xp;function MS(){return Xp||(Xp=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,u=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,d=e?Symbol.for("react.async_mode"):60111,h=e?Symbol.for("react.concurrent_mode"):60111,y=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,b=e?Symbol.for("react.suspense_list"):60120,C=e?Symbol.for("react.memo"):60115,E=e?Symbol.for("react.lazy"):60116,w=e?Symbol.for("react.block"):60121,$=e?Symbol.for("react.fundamental"):60117,N=e?Symbol.for("react.responder"):60118,J=e?Symbol.for("react.scope"):60119;function V(ee){return typeof ee=="string"||typeof ee=="function"||ee===o||ee===h||ee===a||ee===s||ee===g||ee===b||typeof ee=="object"&&ee!==null&&(ee.$$typeof===E||ee.$$typeof===C||ee.$$typeof===u||ee.$$typeof===c||ee.$$typeof===y||ee.$$typeof===$||ee.$$typeof===N||ee.$$typeof===J||ee.$$typeof===w)}function L(ee){if(typeof ee=="object"&&ee!==null){var mt=ee.$$typeof;switch(mt){case t:var Ke=ee.type;switch(Ke){case d:case h:case o:case a:case s:case g:return Ke;default:var Nt=Ke&&Ke.$$typeof;switch(Nt){case c:case y:case E:case C:case u:return Nt;default:return mt}}case n:return mt}}}var D=d,B=h,Y=c,ae=u,te=t,S=y,W=o,Q=E,fe=C,he=n,Fe=a,De=s,Ue=g,Ie=!1;function pt(ee){return Ie||(Ie=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),R(ee)||L(ee)===d}function R(ee){return L(ee)===h}function k(ee){return L(ee)===c}function K(ee){return L(ee)===u}function X(ee){return typeof ee=="object"&&ee!==null&&ee.$$typeof===t}function ue(ee){return L(ee)===y}function ne(ee){return L(ee)===o}function de(ee){return L(ee)===E}function ye(ee){return L(ee)===C}function ve(ee){return L(ee)===n}function we(ee){return L(ee)===a}function Se(ee){return L(ee)===s}function et(ee){return L(ee)===g}ze.AsyncMode=D,ze.ConcurrentMode=B,ze.ContextConsumer=Y,ze.ContextProvider=ae,ze.Element=te,ze.ForwardRef=S,ze.Fragment=W,ze.Lazy=Q,ze.Memo=fe,ze.Portal=he,ze.Profiler=Fe,ze.StrictMode=De,ze.Suspense=Ue,ze.isAsyncMode=pt,ze.isConcurrentMode=R,ze.isContextConsumer=k,ze.isContextProvider=K,ze.isElement=X,ze.isForwardRef=ue,ze.isFragment=ne,ze.isLazy=de,ze.isMemo=ye,ze.isPortal=ve,ze.isProfiler=we,ze.isStrictMode=Se,ze.isSuspense=et,ze.isValidElementType=V,ze.typeOf=L}()),ze}var Qp;function eh(){return Qp||(Qp=1,process.env.NODE_ENV==="production"?gs.exports=$S():gs.exports=MS()),gs.exports}/*
136
162
  object-assign
137
163
  (c) Sindre Sorhus
138
164
  @license MIT
139
- */var bi,ac;function L0(){if(ac)return bi;ac=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var s={},a=0;a<10;a++)s["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(s).map(function(d){return s[d]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(d){u[d]=d}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return bi=o()?Object.assign:function(i,s){for(var a,l=r(i),u,d=1;d<arguments.length;d++){a=Object(arguments[d]);for(var f in a)t.call(a,f)&&(l[f]=a[f]);if(e){u=e(a);for(var p=0;p<u.length;p++)n.call(a,u[p])&&(l[u[p]]=a[u[p]])}}return l},bi}var vi,lc;function Ti(){if(lc)return vi;lc=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return vi=e,vi}var Si,cc;function uc(){return cc||(cc=1,Si=Function.call.bind(Object.prototype.hasOwnProperty)),Si}var wi,fc;function j0(){if(fc)return wi;fc=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Ti(),n={},r=uc();e=function(i){var s="Warning: "+i;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function o(i,s,a,l,u){if(process.env.NODE_ENV!=="production"){for(var d in i)if(r(i,d)){var f;try{if(typeof i[d]!="function"){var p=Error((l||"React class")+": "+a+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}f=i[d](s,d,l,a,null,t)}catch(b){f=b}if(f&&!(f instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var y=u?u():"";e("Failed "+a+" type: "+f.message+(y??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},wi=o,wi}var _i,dc;function z0(){if(dc)return _i;dc=1;var e=sc(),t=L0(),n=Ti(),r=uc(),o=j0(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function s(){return null}return _i=function(a,l){var u=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function f($){var C=$&&(u&&$[u]||$[d]);if(typeof C=="function")return C}var p="<<anonymous>>",y={array:E("array"),bigint:E("bigint"),bool:E("boolean"),func:E("function"),number:E("number"),object:E("object"),string:E("string"),symbol:E("symbol"),any:F(),arrayOf:I,element:A(),elementType:_(),instanceOf:x,node:m(),objectOf:G,oneOf:k,oneOfType:z,shape:L,exact:Y};function b($,C){return $===C?$!==0||1/$===1/C:$!==$&&C!==C}function g($,C){this.message=$,this.data=C&&typeof C=="object"?C:{},this.stack=""}g.prototype=Error.prototype;function w($){if(process.env.NODE_ENV!=="production")var C={},M=0;function N(B,J,K,Z,ee,Q,Ce){if(Z=Z||p,Q=Q||K,Ce!==n){if(l){var j=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw j.name="Invariant Violation",j}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ke=Z+":"+K;!C[ke]&&M<3&&(i("You are manually calling a React.PropTypes validation function for the `"+Q+"` prop on `"+Z+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),C[ke]=!0,M++)}}return J[K]==null?B?J[K]===null?new g("The "+ee+" `"+Q+"` is marked as required "+("in `"+Z+"`, but its value is `null`.")):new g("The "+ee+" `"+Q+"` is marked as required in "+("`"+Z+"`, but its value is `undefined`.")):null:$(J,K,Z,ee,Q)}var W=N.bind(null,!1);return W.isRequired=N.bind(null,!0),W}function E($){function C(M,N,W,B,J,K){var Z=M[N],ee=oe(Z);if(ee!==$){var Q=he(Z);return new g("Invalid "+B+" `"+J+"` of type "+("`"+Q+"` supplied to `"+W+"`, expected ")+("`"+$+"`."),{expectedType:$})}return null}return w(C)}function F(){return w(s)}function I($){function C(M,N,W,B,J){if(typeof $!="function")return new g("Property `"+J+"` of component `"+W+"` has invalid PropType notation inside arrayOf.");var K=M[N];if(!Array.isArray(K)){var Z=oe(K);return new g("Invalid "+B+" `"+J+"` of type "+("`"+Z+"` supplied to `"+W+"`, expected an array."))}for(var ee=0;ee<K.length;ee++){var Q=$(K,ee,W,B,J+"["+ee+"]",n);if(Q instanceof Error)return Q}return null}return w(C)}function A(){function $(C,M,N,W,B){var J=C[M];if(!a(J)){var K=oe(J);return new g("Invalid "+W+" `"+B+"` of type "+("`"+K+"` supplied to `"+N+"`, expected a single ReactElement."))}return null}return w($)}function _(){function $(C,M,N,W,B){var J=C[M];if(!e.isValidElementType(J)){var K=oe(J);return new g("Invalid "+W+" `"+B+"` of type "+("`"+K+"` supplied to `"+N+"`, expected a single ReactElement type."))}return null}return w($)}function x($){function C(M,N,W,B,J){if(!(M[N]instanceof $)){var K=$.name||p,Z=xe(M[N]);return new g("Invalid "+B+" `"+J+"` of type "+("`"+Z+"` supplied to `"+W+"`, expected ")+("instance of `"+K+"`."))}return null}return w(C)}function k($){if(!Array.isArray($))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),s;function C(M,N,W,B,J){for(var K=M[N],Z=0;Z<$.length;Z++)if(b(K,$[Z]))return null;var ee=JSON.stringify($,function(Ce,j){var ke=he(j);return ke==="symbol"?String(j):j});return new g("Invalid "+B+" `"+J+"` of value `"+String(K)+"` "+("supplied to `"+W+"`, expected one of "+ee+"."))}return w(C)}function G($){function C(M,N,W,B,J){if(typeof $!="function")return new g("Property `"+J+"` of component `"+W+"` has invalid PropType notation inside objectOf.");var K=M[N],Z=oe(K);if(Z!=="object")return new g("Invalid "+B+" `"+J+"` of type "+("`"+Z+"` supplied to `"+W+"`, expected an object."));for(var ee in K)if(r(K,ee)){var Q=$(K,ee,W,B,J+"."+ee,n);if(Q instanceof Error)return Q}return null}return w(C)}function z($){if(!Array.isArray($))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var C=0;C<$.length;C++){var M=$[C];if(typeof M!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+le(M)+" at index "+C+"."),s}function N(W,B,J,K,Z){for(var ee=[],Q=0;Q<$.length;Q++){var Ce=$[Q],j=Ce(W,B,J,K,Z,n);if(j==null)return null;j.data&&r(j.data,"expectedType")&&ee.push(j.data.expectedType)}var ke=ee.length>0?", expected one of type ["+ee.join(", ")+"]":"";return new g("Invalid "+K+" `"+Z+"` supplied to "+("`"+J+"`"+ke+"."))}return w(N)}function m(){function $(C,M,N,W,B){return q(C[M])?null:new g("Invalid "+W+" `"+B+"` supplied to "+("`"+N+"`, expected a ReactNode."))}return w($)}function P($,C,M,N,W){return new g(($||"React class")+": "+C+" type `"+M+"."+N+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+W+"`.")}function L($){function C(M,N,W,B,J){var K=M[N],Z=oe(K);if(Z!=="object")return new g("Invalid "+B+" `"+J+"` of type `"+Z+"` "+("supplied to `"+W+"`, expected `object`."));for(var ee in $){var Q=$[ee];if(typeof Q!="function")return P(W,B,J,ee,he(Q));var Ce=Q(K,ee,W,B,J+"."+ee,n);if(Ce)return Ce}return null}return w(C)}function Y($){function C(M,N,W,B,J){var K=M[N],Z=oe(K);if(Z!=="object")return new g("Invalid "+B+" `"+J+"` of type `"+Z+"` "+("supplied to `"+W+"`, expected `object`."));var ee=t({},M[N],$);for(var Q in ee){var Ce=$[Q];if(r($,Q)&&typeof Ce!="function")return P(W,B,J,Q,he(Ce));if(!Ce)return new g("Invalid "+B+" `"+J+"` key `"+Q+"` supplied to `"+W+"`.\nBad object: "+JSON.stringify(M[N],null," ")+`
140
- Valid keys: `+JSON.stringify(Object.keys($),null," "));var j=Ce(K,Q,W,B,J+"."+Q,n);if(j)return j}return null}return w(C)}function q($){switch(typeof $){case"number":case"string":case"undefined":return!0;case"boolean":return!$;case"object":if(Array.isArray($))return $.every(q);if($===null||a($))return!0;var C=f($);if(C){var M=C.call($),N;if(C!==$.entries){for(;!(N=M.next()).done;)if(!q(N.value))return!1}else for(;!(N=M.next()).done;){var W=N.value;if(W&&!q(W[1]))return!1}}else return!1;return!0;default:return!1}}function re($,C){return $==="symbol"?!0:C?C["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&C instanceof Symbol:!1}function oe($){var C=typeof $;return Array.isArray($)?"array":$ instanceof RegExp?"object":re(C,$)?"symbol":C}function he($){if(typeof $>"u"||$===null)return""+$;var C=oe($);if(C==="object"){if($ instanceof Date)return"date";if($ instanceof RegExp)return"regexp"}return C}function le($){var C=he($);switch(C){case"array":case"object":return"an "+C;case"boolean":case"date":case"regexp":return"a "+C;default:return C}}function xe($){return!$.constructor||!$.constructor.name?p:$.constructor.name}return y.checkPropTypes=o,y.resetWarningCache=o.resetWarningCache,y.PropTypes=y,y},_i}var Ci,pc;function B0(){if(pc)return Ci;pc=1;var e=Ti();function t(){}function n(){}return n.resetWarningCache=t,Ci=function(){function r(s,a,l,u,d,f){if(f!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},Ci}if(process.env.NODE_ENV!=="production"){var U0=sc(),V0=!0;yi.exports=z0()(U0.isElement,V0)}else yi.exports=B0()();var W0=yi.exports;const ne=St(W0);function Ct(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}function hc(e,t=""){return e.displayName||e.name||t}function gc(e,t,n){const r=hc(t);return e.displayName||(r!==""?`${n}(${r})`:n)}function G0(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return hc(e,"Component");if(typeof e=="object")switch(e.$$typeof){case br.ForwardRef:return gc(e,e.render,"ForwardRef");case br.Memo:return gc(e,e.type,"memo");default:return}}}function Dt(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":Ct(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Ei(e,t){const n={...t};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const o=r;if(o==="components"||o==="slots")n[o]={...e[o],...n[o]};else if(o==="componentsProps"||o==="slotProps"){const i=e[o],s=t[o];if(!s)n[o]=i||{};else if(!i)n[o]=s;else{n[o]={...s};for(const a in i)if(Object.prototype.hasOwnProperty.call(i,a)){const l=a;n[o][l]=Ei(i[l],s[l])}}}else n[o]===void 0&&(n[o]=e[o])}return n}function H0(e,t,n=void 0){const r={};for(const o in e){const i=e[o];let s="",a=!0;for(let l=0;l<i.length;l+=1){const u=i[l];u&&(s+=(a===!0?"":" ")+t(u),a=!1,n&&n[u]&&(s+=" "+n[u]))}r[o]=s}return r}const mc=e=>e,Y0=(()=>{let e=mc;return{configure(t){e=t},generate(t){return e(t)},reset(){e=mc}}})(),q0={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Ai(e,t,n="Mui"){const r=q0[t];return r?`${n}-${r}`:`${Y0.generate(e)}-${t}`}function J0(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=Ai(e,o,n)}),r}function K0(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function An(e,t){return t?We(e,t,{clone:!1}):e}const Et=process.env.NODE_ENV!=="production"?ne.oneOfType([ne.number,ne.string,ne.object,ne.array]):{};function X0(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,o)=>{var s,a;const i=/min-width:\s*([0-9.]+)/;return+(((s=r.match(i))==null?void 0:s[1])||0)-+(((a=o.match(i))==null?void 0:a[1])||0)});return n.length?n.reduce((r,o)=>{const i=t[o];return delete r[o],r[o]=i,r},{...t}):t}function Z0(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function Q0(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n){if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The provided shorthand ${`(${t})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
141
- For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:Ct(18,`(${t})`));return null}const[,r,o]=n,i=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(i)}function R0(e){const t=(i,s)=>i.replace("@media",s?`@container ${s}`:"@container");function n(i,s){i.up=(...a)=>t(e.breakpoints.up(...a),s),i.down=(...a)=>t(e.breakpoints.down(...a),s),i.between=(...a)=>t(e.breakpoints.between(...a),s),i.only=(...a)=>t(e.breakpoints.only(...a),s),i.not=(...a)=>{const l=t(e.breakpoints.not(...a),s);return l.includes("not all and")?l.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):l}}const r={},o=i=>(n(r,i),r);return n(o),{...e,containerQueries:o}}const Tr={xs:0,sm:600,md:900,lg:1200,xl:1536},yc={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Tr[e]}px)`},eb={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:Tr[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function ht(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const i=r.breakpoints||yc;return t.reduce((s,a,l)=>(s[i.up(i.keys[l])]=n(t[l]),s),{})}if(typeof t=="object"){const i=r.breakpoints||yc;return Object.keys(t).reduce((s,a)=>{if(Z0(i.keys,a)){const l=Q0(r.containerQueries?r:eb,a);l&&(s[l]=n(t[a],a))}else if(Object.keys(i.values||Tr).includes(a)){const l=i.up(a);s[l]=n(t[a],a)}else{const l=a;s[l]=t[l]}return s},{})}return n(t)}function tb(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,o)=>{const i=e.up(o);return r[i]={},r},{}))||{}}function nb(e,t){return e.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},t)}function Sr(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((o,i)=>o&&o[i]?o[i]:null,e);if(r!=null)return r}return t.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,e)}function wr(e,t,n,r=n){let o;return typeof e=="function"?o=e(n):Array.isArray(e)?o=e[n]||r:o=Sr(e,n)||r,t&&(o=t(o,r,e)),o}function Se(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,i=s=>{if(s[t]==null)return null;const a=s[t],l=s.theme,u=Sr(l,r)||{};return ht(s,a,f=>{let p=wr(u,o,f);return f===p&&typeof f=="string"&&(p=wr(u,o,`${t}${f==="default"?"":Dt(f)}`,f)),n===!1?p:{[n]:p}})};return i.propTypes=process.env.NODE_ENV!=="production"?{[t]:Et}:{},i.filterProps=[t],i}function rb(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const ob={m:"margin",p:"padding"},ib={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},bc={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},sb=rb(e=>{if(e.length>2)if(bc[e])e=bc[e];else return[e];const[t,n]=e.split(""),r=ob[t],o=ib[n]||"";return Array.isArray(o)?o.map(i=>r+i):[r+o]}),_r=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Cr=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],ab=[..._r,...Cr];function xn(e,t,n,r){const o=Sr(e,t,!0)??n;return typeof o=="number"||typeof o=="string"?i=>typeof i=="string"?i:(process.env.NODE_ENV!=="production"&&typeof i!="number"&&console.error(`MUI: Expected ${r} argument to be a number or a string, got ${i}.`),typeof o=="string"?`calc(${i} * ${o})`:o*i):Array.isArray(o)?i=>{if(typeof i=="string")return i;const s=Math.abs(i);process.env.NODE_ENV!=="production"&&(Number.isInteger(s)?s>o.length-1&&console.error([`MUI: The value provided (${s}) overflows.`,`The supported values are: ${JSON.stringify(o)}.`,`${s} > ${o.length-1}, you need to add the missing values.`].join(`
165
+ */var tu,th;function FS(){if(th)return tu;th=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function o(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function s(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var u={},c=0;c<10;c++)u["_"+String.fromCharCode(c)]=c;var d=Object.getOwnPropertyNames(u).map(function(y){return u[y]});if(d.join("")!=="0123456789")return!1;var h={};return"abcdefghijklmnopqrst".split("").forEach(function(y){h[y]=y}),Object.keys(Object.assign({},h)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return tu=s()?Object.assign:function(a,u){for(var c,d=o(a),h,y=1;y<arguments.length;y++){c=Object(arguments[y]);for(var g in c)t.call(c,g)&&(d[g]=c[g]);if(e){h=e(c);for(var b=0;b<h.length;b++)n.call(c,h[b])&&(d[h[b]]=c[h[b]])}}return d},tu}var nu,nh;function ru(){if(nh)return nu;nh=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return nu=e,nu}var iu,rh;function ih(){return rh||(rh=1,iu=Function.call.bind(Object.prototype.hasOwnProperty)),iu}var ou,oh;function DS(){if(oh)return ou;oh=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=ru(),n={},o=ih();e=function(a){var u="Warning: "+a;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}}}function s(a,u,c,d,h){if(process.env.NODE_ENV!=="production"){for(var y in a)if(o(a,y)){var g;try{if(typeof a[y]!="function"){var b=Error((d||"React class")+": "+c+" type `"+y+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[y]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw b.name="Invariant Violation",b}g=a[y](u,y,d,c,null,t)}catch(E){g=E}if(g&&!(g instanceof Error)&&e((d||"React class")+": type specification of "+c+" `"+y+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof g+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),g instanceof Error&&!(g.message in n)){n[g.message]=!0;var C=h?h():"";e("Failed "+c+" type: "+g.message+(C??""))}}}}return s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},ou=s,ou}var su,sh;function kS(){if(sh)return su;sh=1;var e=eh(),t=FS(),n=ru(),o=ih(),s=DS(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(c){var d="Warning: "+c;typeof console<"u"&&console.error(d);try{throw new Error(d)}catch{}});function u(){return null}return su=function(c,d){var h=typeof Symbol=="function"&&Symbol.iterator,y="@@iterator";function g(R){var k=R&&(h&&R[h]||R[y]);if(typeof k=="function")return k}var b="<<anonymous>>",C={array:N("array"),bigint:N("bigint"),bool:N("boolean"),func:N("function"),number:N("number"),object:N("object"),string:N("string"),symbol:N("symbol"),any:J(),arrayOf:V,element:L(),elementType:D(),instanceOf:B,node:S(),objectOf:ae,oneOf:Y,oneOfType:te,shape:Q,exact:fe};function E(R,k){return R===k?R!==0||1/R===1/k:R!==R&&k!==k}function w(R,k){this.message=R,this.data=k&&typeof k=="object"?k:{},this.stack=""}w.prototype=Error.prototype;function $(R){if(process.env.NODE_ENV!=="production")var k={},K=0;function X(ne,de,ye,ve,we,Se,et){if(ve=ve||b,Se=Se||ye,et!==n){if(d){var ee=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw ee.name="Invariant Violation",ee}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var mt=ve+":"+ye;!k[mt]&&K<3&&(a("You are manually calling a React.PropTypes validation function for the `"+Se+"` prop on `"+ve+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),k[mt]=!0,K++)}}return de[ye]==null?ne?de[ye]===null?new w("The "+we+" `"+Se+"` is marked as required "+("in `"+ve+"`, but its value is `null`.")):new w("The "+we+" `"+Se+"` is marked as required in "+("`"+ve+"`, but its value is `undefined`.")):null:R(de,ye,ve,we,Se)}var ue=X.bind(null,!1);return ue.isRequired=X.bind(null,!0),ue}function N(R){function k(K,X,ue,ne,de,ye){var ve=K[X],we=De(ve);if(we!==R){var Se=Ue(ve);return new w("Invalid "+ne+" `"+de+"` of type "+("`"+Se+"` supplied to `"+ue+"`, expected ")+("`"+R+"`."),{expectedType:R})}return null}return $(k)}function J(){return $(u)}function V(R){function k(K,X,ue,ne,de){if(typeof R!="function")return new w("Property `"+de+"` of component `"+ue+"` has invalid PropType notation inside arrayOf.");var ye=K[X];if(!Array.isArray(ye)){var ve=De(ye);return new w("Invalid "+ne+" `"+de+"` of type "+("`"+ve+"` supplied to `"+ue+"`, expected an array."))}for(var we=0;we<ye.length;we++){var Se=R(ye,we,ue,ne,de+"["+we+"]",n);if(Se instanceof Error)return Se}return null}return $(k)}function L(){function R(k,K,X,ue,ne){var de=k[K];if(!c(de)){var ye=De(de);return new w("Invalid "+ue+" `"+ne+"` of type "+("`"+ye+"` supplied to `"+X+"`, expected a single ReactElement."))}return null}return $(R)}function D(){function R(k,K,X,ue,ne){var de=k[K];if(!e.isValidElementType(de)){var ye=De(de);return new w("Invalid "+ue+" `"+ne+"` of type "+("`"+ye+"` supplied to `"+X+"`, expected a single ReactElement type."))}return null}return $(R)}function B(R){function k(K,X,ue,ne,de){if(!(K[X]instanceof R)){var ye=R.name||b,ve=pt(K[X]);return new w("Invalid "+ne+" `"+de+"` of type "+("`"+ve+"` supplied to `"+ue+"`, expected ")+("instance of `"+ye+"`."))}return null}return $(k)}function Y(R){if(!Array.isArray(R))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),u;function k(K,X,ue,ne,de){for(var ye=K[X],ve=0;ve<R.length;ve++)if(E(ye,R[ve]))return null;var we=JSON.stringify(R,function(et,ee){var mt=Ue(ee);return mt==="symbol"?String(ee):ee});return new w("Invalid "+ne+" `"+de+"` of value `"+String(ye)+"` "+("supplied to `"+ue+"`, expected one of "+we+"."))}return $(k)}function ae(R){function k(K,X,ue,ne,de){if(typeof R!="function")return new w("Property `"+de+"` of component `"+ue+"` has invalid PropType notation inside objectOf.");var ye=K[X],ve=De(ye);if(ve!=="object")return new w("Invalid "+ne+" `"+de+"` of type "+("`"+ve+"` supplied to `"+ue+"`, expected an object."));for(var we in ye)if(o(ye,we)){var Se=R(ye,we,ue,ne,de+"."+we,n);if(Se instanceof Error)return Se}return null}return $(k)}function te(R){if(!Array.isArray(R))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),u;for(var k=0;k<R.length;k++){var K=R[k];if(typeof K!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Ie(K)+" at index "+k+"."),u}function X(ue,ne,de,ye,ve){for(var we=[],Se=0;Se<R.length;Se++){var et=R[Se],ee=et(ue,ne,de,ye,ve,n);if(ee==null)return null;ee.data&&o(ee.data,"expectedType")&&we.push(ee.data.expectedType)}var mt=we.length>0?", expected one of type ["+we.join(", ")+"]":"";return new w("Invalid "+ye+" `"+ve+"` supplied to "+("`"+de+"`"+mt+"."))}return $(X)}function S(){function R(k,K,X,ue,ne){return he(k[K])?null:new w("Invalid "+ue+" `"+ne+"` supplied to "+("`"+X+"`, expected a ReactNode."))}return $(R)}function W(R,k,K,X,ue){return new w((R||"React class")+": "+k+" type `"+K+"."+X+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ue+"`.")}function Q(R){function k(K,X,ue,ne,de){var ye=K[X],ve=De(ye);if(ve!=="object")return new w("Invalid "+ne+" `"+de+"` of type `"+ve+"` "+("supplied to `"+ue+"`, expected `object`."));for(var we in R){var Se=R[we];if(typeof Se!="function")return W(ue,ne,de,we,Ue(Se));var et=Se(ye,we,ue,ne,de+"."+we,n);if(et)return et}return null}return $(k)}function fe(R){function k(K,X,ue,ne,de){var ye=K[X],ve=De(ye);if(ve!=="object")return new w("Invalid "+ne+" `"+de+"` of type `"+ve+"` "+("supplied to `"+ue+"`, expected `object`."));var we=t({},K[X],R);for(var Se in we){var et=R[Se];if(o(R,Se)&&typeof et!="function")return W(ue,ne,de,Se,Ue(et));if(!et)return new w("Invalid "+ne+" `"+de+"` key `"+Se+"` supplied to `"+ue+"`.\nBad object: "+JSON.stringify(K[X],null," ")+`
166
+ Valid keys: `+JSON.stringify(Object.keys(R),null," "));var ee=et(ye,Se,ue,ne,de+"."+Se,n);if(ee)return ee}return null}return $(k)}function he(R){switch(typeof R){case"number":case"string":case"undefined":return!0;case"boolean":return!R;case"object":if(Array.isArray(R))return R.every(he);if(R===null||c(R))return!0;var k=g(R);if(k){var K=k.call(R),X;if(k!==R.entries){for(;!(X=K.next()).done;)if(!he(X.value))return!1}else for(;!(X=K.next()).done;){var ue=X.value;if(ue&&!he(ue[1]))return!1}}else return!1;return!0;default:return!1}}function Fe(R,k){return R==="symbol"?!0:k?k["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&k instanceof Symbol:!1}function De(R){var k=typeof R;return Array.isArray(R)?"array":R instanceof RegExp?"object":Fe(k,R)?"symbol":k}function Ue(R){if(typeof R>"u"||R===null)return""+R;var k=De(R);if(k==="object"){if(R instanceof Date)return"date";if(R instanceof RegExp)return"regexp"}return k}function Ie(R){var k=Ue(R);switch(k){case"array":case"object":return"an "+k;case"boolean":case"date":case"regexp":return"a "+k;default:return k}}function pt(R){return!R.constructor||!R.constructor.name?b:R.constructor.name}return C.checkPropTypes=s,C.resetWarningCache=s.resetWarningCache,C.PropTypes=C,C},su}var au,ah;function NS(){if(ah)return au;ah=1;var e=ru();function t(){}function n(){}return n.resetWarningCache=t,au=function(){function o(u,c,d,h,y,g){if(g!==e){var b=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw b.name="Invariant Violation",b}}o.isRequired=o;function s(){return o}var a={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:s,element:o,elementType:o,instanceOf:s,node:o,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},au}if(process.env.NODE_ENV!=="production"){var LS=eh(),BS=!0;eu.exports=kS()(LS.isElement,BS)}else eu.exports=NS()();var zS=eu.exports;const ke=rr(zS);function ar(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(o=>n.searchParams.append("args[]",o)),`Minified MUI error #${e}; visit ${n} for the full message.`}function lh(e,t=""){return e.displayName||e.name||t}function uh(e,t,n){const o=lh(t);return e.displayName||(o!==""?`${n}(${o})`:n)}function US(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return lh(e,"Component");if(typeof e=="object")switch(e.$$typeof){case hs.ForwardRef:return uh(e,e.render,"ForwardRef");case hs.Memo:return uh(e,e.type,"memo");default:return}}}function kr(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":ar(7));return e.charAt(0).toUpperCase()+e.slice(1)}function lu(e,t){const n={...t};for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)){const s=o;if(s==="components"||s==="slots")n[s]={...e[s],...n[s]};else if(s==="componentsProps"||s==="slotProps"){const a=e[s],u=t[s];if(!u)n[s]=a||{};else if(!a)n[s]=u;else{n[s]={...u};for(const c in a)if(Object.prototype.hasOwnProperty.call(a,c)){const d=c;n[s][d]=lu(a[d],u[d])}}}else n[s]===void 0&&(n[s]=e[s])}return n}function jS(e,t,n=void 0){const o={};for(const s in e){const a=e[s];let u="",c=!0;for(let d=0;d<a.length;d+=1){const h=a[d];h&&(u+=(c===!0?"":" ")+t(h),c=!1,n&&n[h]&&(u+=" "+n[h]))}o[s]=u}return o}const ch=e=>e,WS=(()=>{let e=ch;return{configure(t){e=t},generate(t){return e(t)},reset(){e=ch}}})(),VS={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function uu(e,t,n="Mui"){const o=VS[t];return o?`${n}-${o}`:`${WS.generate(e)}-${t}`}function GS(e,t,n="Mui"){const o={};return t.forEach(s=>{o[s]=uu(e,s,n)}),o}function HS(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function io(e,t){return t?qt(e,t,{clone:!1}):e}const lr=process.env.NODE_ENV!=="production"?ke.oneOfType([ke.number,ke.string,ke.object,ke.array]):{};function YS(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(o=>o.startsWith("@container")).sort((o,s)=>{var u,c;const a=/min-width:\s*([0-9.]+)/;return+(((u=o.match(a))==null?void 0:u[1])||0)-+(((c=s.match(a))==null?void 0:c[1])||0)});return n.length?n.reduce((o,s)=>{const a=t[s];return delete o[s],o[s]=a,o},{...t}):t}function RS(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function qS(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n){if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The provided shorthand ${`(${t})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
167
+ For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:ar(18,`(${t})`));return null}const[,o,s]=n,a=Number.isNaN(+o)?o||0:+o;return e.containerQueries(s).up(a)}function KS(e){const t=(a,u)=>a.replace("@media",u?`@container ${u}`:"@container");function n(a,u){a.up=(...c)=>t(e.breakpoints.up(...c),u),a.down=(...c)=>t(e.breakpoints.down(...c),u),a.between=(...c)=>t(e.breakpoints.between(...c),u),a.only=(...c)=>t(e.breakpoints.only(...c),u),a.not=(...c)=>{const d=t(e.breakpoints.not(...c),u);return d.includes("not all and")?d.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):d}}const o={},s=a=>(n(o,a),o);return n(s),{...e,containerQueries:s}}const ms={xs:0,sm:600,md:900,lg:1200,xl:1536},fh={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${ms[e]}px)`},JS={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:ms[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Gn(e,t,n){const o=e.theme||{};if(Array.isArray(t)){const a=o.breakpoints||fh;return t.reduce((u,c,d)=>(u[a.up(a.keys[d])]=n(t[d]),u),{})}if(typeof t=="object"){const a=o.breakpoints||fh;return Object.keys(t).reduce((u,c)=>{if(RS(a.keys,c)){const d=qS(o.containerQueries?o:JS,c);d&&(u[d]=n(t[c],c))}else if(Object.keys(a.values||ms).includes(c)){const d=a.up(c);u[d]=n(t[c],c)}else{const d=c;u[d]=t[d]}return u},{})}return n(t)}function ZS(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((o,s)=>{const a=e.up(s);return o[a]={},o},{}))||{}}function XS(e,t){return e.reduce((n,o)=>{const s=n[o];return(!s||Object.keys(s).length===0)&&delete n[o],n},t)}function ys(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const o=`vars.${t}`.split(".").reduce((s,a)=>s&&s[a]?s[a]:null,e);if(o!=null)return o}return t.split(".").reduce((o,s)=>o&&o[s]!=null?o[s]:null,e)}function vs(e,t,n,o=n){let s;return typeof e=="function"?s=e(n):Array.isArray(e)?s=e[n]||o:s=ys(e,n)||o,t&&(s=t(s,o,e)),s}function ut(e){const{prop:t,cssProperty:n=e.prop,themeKey:o,transform:s}=e,a=u=>{if(u[t]==null)return null;const c=u[t],d=u.theme,h=ys(d,o)||{};return Gn(u,c,g=>{let b=vs(h,s,g);return g===b&&typeof g=="string"&&(b=vs(h,s,`${t}${g==="default"?"":kr(g)}`,g)),n===!1?b:{[n]:b}})};return a.propTypes=process.env.NODE_ENV!=="production"?{[t]:lr}:{},a.filterProps=[t],a}function QS(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const eC={m:"margin",p:"padding"},tC={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},dh={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},nC=QS(e=>{if(e.length>2)if(dh[e])e=dh[e];else return[e];const[t,n]=e.split(""),o=eC[t],s=tC[n]||"";return Array.isArray(s)?s.map(a=>o+a):[o+s]}),bs=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],_s=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],rC=[...bs,..._s];function oo(e,t,n,o){const s=ys(e,t,!0)??n;return typeof s=="number"||typeof s=="string"?a=>typeof a=="string"?a:(process.env.NODE_ENV!=="production"&&typeof a!="number"&&console.error(`MUI: Expected ${o} argument to be a number or a string, got ${a}.`),typeof s=="string"?`calc(${a} * ${s})`:s*a):Array.isArray(s)?a=>{if(typeof a=="string")return a;const u=Math.abs(a);process.env.NODE_ENV!=="production"&&(Number.isInteger(u)?u>s.length-1&&console.error([`MUI: The value provided (${u}) overflows.`,`The supported values are: ${JSON.stringify(s)}.`,`${u} > ${s.length-1}, you need to add the missing values.`].join(`
142
168
  `)):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join(`
143
- `)));const a=o[s];return i>=0?a:typeof a=="number"?-a:`-${a}`}:typeof o=="function"?o:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${t}\` value (${o}) is invalid.`,"It should be a number, an array or a function."].join(`
144
- `)),()=>{})}function xi(e){return xn(e,"spacing",8,"spacing")}function On(e,t){return typeof t=="string"||t==null?t:e(t)}function lb(e,t){return n=>e.reduce((r,o)=>(r[o]=On(t,n),r),{})}function cb(e,t,n,r){if(!t.includes(n))return null;const o=sb(n),i=lb(o,r),s=e[n];return ht(e,s,i)}function vc(e,t){const n=xi(e.theme);return Object.keys(e).map(r=>cb(e,t,r,n)).reduce(An,{})}function be(e){return vc(e,_r)}be.propTypes=process.env.NODE_ENV!=="production"?_r.reduce((e,t)=>(e[t]=Et,e),{}):{},be.filterProps=_r;function ve(e){return vc(e,Cr)}ve.propTypes=process.env.NODE_ENV!=="production"?Cr.reduce((e,t)=>(e[t]=Et,e),{}):{},ve.filterProps=Cr,process.env.NODE_ENV!=="production"&&ab.reduce((e,t)=>(e[t]=Et,e),{});function Er(...e){const t=e.reduce((r,o)=>(o.filterProps.forEach(i=>{r[i]=o}),r),{}),n=r=>Object.keys(r).reduce((o,i)=>t[i]?An(o,t[i](r)):o,{});return n.propTypes=process.env.NODE_ENV!=="production"?e.reduce((r,o)=>Object.assign(r,o.propTypes),{}):{},n.filterProps=e.reduce((r,o)=>r.concat(o.filterProps),[]),n}function He(e){return typeof e!="number"?e:`${e}px solid`}function Ye(e,t){return Se({prop:e,themeKey:"borders",transform:t})}const ub=Ye("border",He),fb=Ye("borderTop",He),db=Ye("borderRight",He),pb=Ye("borderBottom",He),hb=Ye("borderLeft",He),gb=Ye("borderColor"),mb=Ye("borderTopColor"),yb=Ye("borderRightColor"),bb=Ye("borderBottomColor"),vb=Ye("borderLeftColor"),Tb=Ye("outline",He),Sb=Ye("outlineColor"),Ar=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=xn(e.theme,"shape.borderRadius",4,"borderRadius"),n=r=>({borderRadius:On(t,r)});return ht(e,e.borderRadius,n)}return null};Ar.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:Et}:{},Ar.filterProps=["borderRadius"],Er(ub,fb,db,pb,hb,gb,mb,yb,bb,vb,Ar,Tb,Sb);const xr=e=>{if(e.gap!==void 0&&e.gap!==null){const t=xn(e.theme,"spacing",8,"gap"),n=r=>({gap:On(t,r)});return ht(e,e.gap,n)}return null};xr.propTypes=process.env.NODE_ENV!=="production"?{gap:Et}:{},xr.filterProps=["gap"];const Or=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=xn(e.theme,"spacing",8,"columnGap"),n=r=>({columnGap:On(t,r)});return ht(e,e.columnGap,n)}return null};Or.propTypes=process.env.NODE_ENV!=="production"?{columnGap:Et}:{},Or.filterProps=["columnGap"];const Pr=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=xn(e.theme,"spacing",8,"rowGap"),n=r=>({rowGap:On(t,r)});return ht(e,e.rowGap,n)}return null};Pr.propTypes=process.env.NODE_ENV!=="production"?{rowGap:Et}:{},Pr.filterProps=["rowGap"];const wb=Se({prop:"gridColumn"}),_b=Se({prop:"gridRow"}),Cb=Se({prop:"gridAutoFlow"}),Eb=Se({prop:"gridAutoColumns"}),Ab=Se({prop:"gridAutoRows"}),xb=Se({prop:"gridTemplateColumns"}),Ob=Se({prop:"gridTemplateRows"}),Pb=Se({prop:"gridTemplateAreas"}),Ib=Se({prop:"gridArea"});Er(xr,Or,Pr,wb,_b,Cb,Eb,Ab,xb,Ob,Pb,Ib);function Jt(e,t){return t==="grey"?t:e}const $b=Se({prop:"color",themeKey:"palette",transform:Jt}),kb=Se({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Jt}),Mb=Se({prop:"backgroundColor",themeKey:"palette",transform:Jt});Er($b,kb,Mb);function Ge(e){return e<=1&&e!==0?`${e*100}%`:e}const Fb=Se({prop:"width",transform:Ge}),Oi=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var o,i,s,a,l;const r=((s=(i=(o=e.theme)==null?void 0:o.breakpoints)==null?void 0:i.values)==null?void 0:s[n])||Tr[n];return r?((l=(a=e.theme)==null?void 0:a.breakpoints)==null?void 0:l.unit)!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:Ge(n)}};return ht(e,e.maxWidth,t)}return null};Oi.filterProps=["maxWidth"];const Db=Se({prop:"minWidth",transform:Ge}),Nb=Se({prop:"height",transform:Ge}),Lb=Se({prop:"maxHeight",transform:Ge}),jb=Se({prop:"minHeight",transform:Ge});Se({prop:"size",cssProperty:"width",transform:Ge}),Se({prop:"size",cssProperty:"height",transform:Ge});const zb=Se({prop:"boxSizing"});Er(Fb,Oi,Db,Nb,Lb,jb,zb);const Ir={border:{themeKey:"borders",transform:He},borderTop:{themeKey:"borders",transform:He},borderRight:{themeKey:"borders",transform:He},borderBottom:{themeKey:"borders",transform:He},borderLeft:{themeKey:"borders",transform:He},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:He},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Ar},color:{themeKey:"palette",transform:Jt},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Jt},backgroundColor:{themeKey:"palette",transform:Jt},p:{style:ve},pt:{style:ve},pr:{style:ve},pb:{style:ve},pl:{style:ve},px:{style:ve},py:{style:ve},padding:{style:ve},paddingTop:{style:ve},paddingRight:{style:ve},paddingBottom:{style:ve},paddingLeft:{style:ve},paddingX:{style:ve},paddingY:{style:ve},paddingInline:{style:ve},paddingInlineStart:{style:ve},paddingInlineEnd:{style:ve},paddingBlock:{style:ve},paddingBlockStart:{style:ve},paddingBlockEnd:{style:ve},m:{style:be},mt:{style:be},mr:{style:be},mb:{style:be},ml:{style:be},mx:{style:be},my:{style:be},margin:{style:be},marginTop:{style:be},marginRight:{style:be},marginBottom:{style:be},marginLeft:{style:be},marginX:{style:be},marginY:{style:be},marginInline:{style:be},marginInlineStart:{style:be},marginInlineEnd:{style:be},marginBlock:{style:be},marginBlockStart:{style:be},marginBlockEnd:{style:be},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:xr},rowGap:{style:Pr},columnGap:{style:Or},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Ge},maxWidth:{style:Oi},minWidth:{transform:Ge},height:{transform:Ge},maxHeight:{transform:Ge},minHeight:{transform:Ge},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function Bb(...e){const t=e.reduce((r,o)=>r.concat(Object.keys(o)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function Ub(e,t){return typeof e=="function"?e(t):e}function Vb(){function e(n,r,o,i){const s={[n]:r,theme:o},a=i[n];if(!a)return{[n]:r};const{cssProperty:l=n,themeKey:u,transform:d,style:f}=a;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const p=Sr(o,u)||{};return f?f(s):ht(s,r,b=>{let g=wr(p,d,b);return b===g&&typeof b=="string"&&(g=wr(p,d,`${n}${b==="default"?"":Dt(b)}`,b)),l===!1?g:{[l]:g}})}function t(n){const{sx:r,theme:o={}}=n||{};if(!r)return null;const i=o.unstable_sxConfig??Ir;function s(a){let l=a;if(typeof a=="function")l=a(o);else if(typeof a!="object")return a;if(!l)return null;const u=tb(o.breakpoints),d=Object.keys(u);let f=u;return Object.keys(l).forEach(p=>{const y=Ub(l[p],o);if(y!=null)if(typeof y=="object")if(i[p])f=An(f,e(p,y,o,i));else{const b=ht({theme:o},y,g=>({[p]:g}));Bb(b,y)?f[p]=t({sx:y,theme:o}):f=An(f,b)}else f=An(f,e(p,y,o,i))}),X0(o,nb(d,f))}return Array.isArray(r)?r.map(s):s(r)}return t}const Kt=Vb();Kt.filterProps=["sx"];function Pi(){return Pi=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},Pi.apply(null,arguments)}function Wb(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Gb={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Tc(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Hb=/[A-Z]|^ms/g,Yb=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Sc=function(t){return t.charCodeAt(1)===45},wc=function(t){return t!=null&&typeof t!="boolean"},Ii=Tc(function(e){return Sc(e)?e:e.replace(Hb,"-$&").toLowerCase()}),_c=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(Yb,function(r,o,i){return rt={name:o,styles:i,next:rt},o})}return Gb[t]!==1&&!Sc(t)&&typeof n=="number"&&n!==0?n+"px":n};function Pn(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var o=n;if(o.anim===1)return rt={name:o.name,styles:o.styles,next:rt},o.name;var i=n;if(i.styles!==void 0){var s=i.next;if(s!==void 0)for(;s!==void 0;)rt={name:s.name,styles:s.styles,next:rt},s=s.next;var a=i.styles+";";return a}return qb(e,t,n)}case"function":{if(e!==void 0){var l=rt,u=n(e);return rt=l,Pn(e,t,u)}break}}var d=n;if(t==null)return d;var f=t[d];return f!==void 0?f:d}function qb(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Pn(e,t,n[o])+";";else for(var i in n){var s=n[i];if(typeof s!="object"){var a=s;t!=null&&t[a]!==void 0?r+=i+"{"+t[a]+"}":wc(a)&&(r+=Ii(i)+":"+_c(i,a)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&(t==null||t[s[0]]===void 0))for(var l=0;l<s.length;l++)wc(s[l])&&(r+=Ii(i)+":"+_c(i,s[l])+";");else{var u=Pn(e,t,s);switch(i){case"animation":case"animationName":{r+=Ii(i)+":"+u+";";break}default:r+=i+"{"+u+"}"}}}return r}var Cc=/label:\s*([^\s;{]+)\s*(;|$)/g,rt;function Ec(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,o="";rt=void 0;var i=e[0];if(i==null||i.raw===void 0)r=!1,o+=Pn(n,t,i);else{var s=i;o+=s[0]}for(var a=1;a<e.length;a++)if(o+=Pn(n,t,e[a]),r){var l=i;o+=l[a]}Cc.lastIndex=0;for(var u="",d;(d=Cc.exec(o))!==null;)u+="-"+d[1];var f=Wb(o)+u;return{name:f,styles:o,next:rt}}var Jb=function(t){return t()},Kb=Fe.useInsertionEffect?Fe.useInsertionEffect:!1,Xb=Kb||Jb,Zb=!0;function Qb(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(r+=o+" ")}),r}var Ac=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||Zb===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},Rb=function(t,n,r){Ac(t,n,r);var o=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var i=n;do t.insert(n===i?"."+o:"",i,t.sheet,!0),i=i.next;while(i!==void 0)}},ev=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,tv=Tc(function(e){return ev.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),nv=tv,rv=function(t){return t!=="theme"},xc=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?nv:rv},Oc=function(t,n,r){var o;if(n){var i=n.shouldForwardProp;o=t.__emotion_forwardProp&&i?function(s){return t.__emotion_forwardProp(s)&&i(s)}:i}return typeof o!="function"&&r&&(o=t.__emotion_forwardProp),o},ov=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return Ac(n,r,o),Xb(function(){return Rb(n,r,o)}),null},iv=function e(t,n){var r=t.__emotion_real===t,o=r&&t.__emotion_base||t,i,s;n!==void 0&&(i=n.label,s=n.target);var a=Oc(t,n,r),l=a||xc(o),u=!l("as");return function(){var d=arguments,f=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(i!==void 0&&f.push("label:"+i+";"),d[0]==null||d[0].raw===void 0)f.push.apply(f,d);else{var p=d[0];f.push(p[0]);for(var y=d.length,b=1;b<y;b++)f.push(d[b],p[b])}var g=As.withEmotionCache(function(w,E,F){var I=u&&w.as||o,A="",_=[],x=w;if(w.theme==null){x={};for(var k in w)x[k]=w[k];x.theme=Fe.useContext(As.ThemeContext)}typeof w.className=="string"?A=Qb(E.registered,_,w.className):w.className!=null&&(A=w.className+" ");var G=Ec(f.concat(_),E.registered,x);A+=E.key+"-"+G.name,s!==void 0&&(A+=" "+s);var z=u&&a===void 0?xc(I):l,m={};for(var P in w)u&&P==="as"||z(P)&&(m[P]=w[P]);return m.className=A,F&&(m.ref=F),Fe.createElement(Fe.Fragment,null,Fe.createElement(ov,{cache:E,serialized:G,isStringTag:typeof I=="string"}),Fe.createElement(I,m))});return g.displayName=i!==void 0?i:"Styled("+(typeof o=="string"?o:o.displayName||o.name||"Component")+")",g.defaultProps=t.defaultProps,g.__emotion_real=g,g.__emotion_base=o,g.__emotion_styles=f,g.__emotion_forwardProp=a,Object.defineProperty(g,"toString",{value:function(){return"."+s}}),g.withComponent=function(w,E){var F=e(w,Pi({},n,E,{shouldForwardProp:Oc(g,E,!0)}));return F.apply(void 0,f)},g}},sv=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],$i=iv.bind(null);sv.forEach(function(e){$i[e]=$i(e)});/**
169
+ `)));const c=s[u];return a>=0?c:typeof c=="number"?-c:`-${c}`}:typeof s=="function"?s:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${t}\` value (${s}) is invalid.`,"It should be a number, an array or a function."].join(`
170
+ `)),()=>{})}function cu(e){return oo(e,"spacing",8,"spacing")}function so(e,t){return typeof t=="string"||t==null?t:e(t)}function iC(e,t){return n=>e.reduce((o,s)=>(o[s]=so(t,n),o),{})}function oC(e,t,n,o){if(!t.includes(n))return null;const s=nC(n),a=iC(s,o),u=e[n];return Gn(e,u,a)}function ph(e,t){const n=cu(e.theme);return Object.keys(e).map(o=>oC(e,t,o,n)).reduce(io,{})}function it(e){return ph(e,bs)}it.propTypes=process.env.NODE_ENV!=="production"?bs.reduce((e,t)=>(e[t]=lr,e),{}):{},it.filterProps=bs;function ot(e){return ph(e,_s)}ot.propTypes=process.env.NODE_ENV!=="production"?_s.reduce((e,t)=>(e[t]=lr,e),{}):{},ot.filterProps=_s,process.env.NODE_ENV!=="production"&&rC.reduce((e,t)=>(e[t]=lr,e),{});function ws(...e){const t=e.reduce((o,s)=>(s.filterProps.forEach(a=>{o[a]=s}),o),{}),n=o=>Object.keys(o).reduce((s,a)=>t[a]?io(s,t[a](o)):s,{});return n.propTypes=process.env.NODE_ENV!=="production"?e.reduce((o,s)=>Object.assign(o,s.propTypes),{}):{},n.filterProps=e.reduce((o,s)=>o.concat(s.filterProps),[]),n}function rn(e){return typeof e!="number"?e:`${e}px solid`}function on(e,t){return ut({prop:e,themeKey:"borders",transform:t})}const sC=on("border",rn),aC=on("borderTop",rn),lC=on("borderRight",rn),uC=on("borderBottom",rn),cC=on("borderLeft",rn),fC=on("borderColor"),dC=on("borderTopColor"),pC=on("borderRightColor"),hC=on("borderBottomColor"),gC=on("borderLeftColor"),mC=on("outline",rn),yC=on("outlineColor"),Ts=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=oo(e.theme,"shape.borderRadius",4,"borderRadius"),n=o=>({borderRadius:so(t,o)});return Gn(e,e.borderRadius,n)}return null};Ts.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:lr}:{},Ts.filterProps=["borderRadius"],ws(sC,aC,lC,uC,cC,fC,dC,pC,hC,gC,Ts,mC,yC);const Ss=e=>{if(e.gap!==void 0&&e.gap!==null){const t=oo(e.theme,"spacing",8,"gap"),n=o=>({gap:so(t,o)});return Gn(e,e.gap,n)}return null};Ss.propTypes=process.env.NODE_ENV!=="production"?{gap:lr}:{},Ss.filterProps=["gap"];const Cs=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=oo(e.theme,"spacing",8,"columnGap"),n=o=>({columnGap:so(t,o)});return Gn(e,e.columnGap,n)}return null};Cs.propTypes=process.env.NODE_ENV!=="production"?{columnGap:lr}:{},Cs.filterProps=["columnGap"];const Es=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=oo(e.theme,"spacing",8,"rowGap"),n=o=>({rowGap:so(t,o)});return Gn(e,e.rowGap,n)}return null};Es.propTypes=process.env.NODE_ENV!=="production"?{rowGap:lr}:{},Es.filterProps=["rowGap"];const vC=ut({prop:"gridColumn"}),bC=ut({prop:"gridRow"}),_C=ut({prop:"gridAutoFlow"}),wC=ut({prop:"gridAutoColumns"}),TC=ut({prop:"gridAutoRows"}),SC=ut({prop:"gridTemplateColumns"}),CC=ut({prop:"gridTemplateRows"}),EC=ut({prop:"gridTemplateAreas"}),xC=ut({prop:"gridArea"});ws(Ss,Cs,Es,vC,bC,_C,wC,TC,SC,CC,EC,xC);function ci(e,t){return t==="grey"?t:e}const AC=ut({prop:"color",themeKey:"palette",transform:ci}),OC=ut({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:ci}),IC=ut({prop:"backgroundColor",themeKey:"palette",transform:ci});ws(AC,OC,IC);function Kt(e){return e<=1&&e!==0?`${e*100}%`:e}const PC=ut({prop:"width",transform:Kt}),fu=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var s,a,u,c,d;const o=((u=(a=(s=e.theme)==null?void 0:s.breakpoints)==null?void 0:a.values)==null?void 0:u[n])||ms[n];return o?((d=(c=e.theme)==null?void 0:c.breakpoints)==null?void 0:d.unit)!=="px"?{maxWidth:`${o}${e.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:Kt(n)}};return Gn(e,e.maxWidth,t)}return null};fu.filterProps=["maxWidth"];const $C=ut({prop:"minWidth",transform:Kt}),MC=ut({prop:"height",transform:Kt}),FC=ut({prop:"maxHeight",transform:Kt}),DC=ut({prop:"minHeight",transform:Kt});ut({prop:"size",cssProperty:"width",transform:Kt}),ut({prop:"size",cssProperty:"height",transform:Kt});const kC=ut({prop:"boxSizing"});ws(PC,fu,$C,MC,FC,DC,kC);const xs={border:{themeKey:"borders",transform:rn},borderTop:{themeKey:"borders",transform:rn},borderRight:{themeKey:"borders",transform:rn},borderBottom:{themeKey:"borders",transform:rn},borderLeft:{themeKey:"borders",transform:rn},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:rn},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Ts},color:{themeKey:"palette",transform:ci},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:ci},backgroundColor:{themeKey:"palette",transform:ci},p:{style:ot},pt:{style:ot},pr:{style:ot},pb:{style:ot},pl:{style:ot},px:{style:ot},py:{style:ot},padding:{style:ot},paddingTop:{style:ot},paddingRight:{style:ot},paddingBottom:{style:ot},paddingLeft:{style:ot},paddingX:{style:ot},paddingY:{style:ot},paddingInline:{style:ot},paddingInlineStart:{style:ot},paddingInlineEnd:{style:ot},paddingBlock:{style:ot},paddingBlockStart:{style:ot},paddingBlockEnd:{style:ot},m:{style:it},mt:{style:it},mr:{style:it},mb:{style:it},ml:{style:it},mx:{style:it},my:{style:it},margin:{style:it},marginTop:{style:it},marginRight:{style:it},marginBottom:{style:it},marginLeft:{style:it},marginX:{style:it},marginY:{style:it},marginInline:{style:it},marginInlineStart:{style:it},marginInlineEnd:{style:it},marginBlock:{style:it},marginBlockStart:{style:it},marginBlockEnd:{style:it},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Ss},rowGap:{style:Es},columnGap:{style:Cs},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Kt},maxWidth:{style:fu},minWidth:{transform:Kt},height:{transform:Kt},maxHeight:{transform:Kt},minHeight:{transform:Kt},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function NC(...e){const t=e.reduce((o,s)=>o.concat(Object.keys(s)),[]),n=new Set(t);return e.every(o=>n.size===Object.keys(o).length)}function LC(e,t){return typeof e=="function"?e(t):e}function BC(){function e(n,o,s,a){const u={[n]:o,theme:s},c=a[n];if(!c)return{[n]:o};const{cssProperty:d=n,themeKey:h,transform:y,style:g}=c;if(o==null)return null;if(h==="typography"&&o==="inherit")return{[n]:o};const b=ys(s,h)||{};return g?g(u):Gn(u,o,E=>{let w=vs(b,y,E);return E===w&&typeof E=="string"&&(w=vs(b,y,`${n}${E==="default"?"":kr(E)}`,E)),d===!1?w:{[d]:w}})}function t(n){const{sx:o,theme:s={}}=n||{};if(!o)return null;const a=s.unstable_sxConfig??xs;function u(c){let d=c;if(typeof c=="function")d=c(s);else if(typeof c!="object")return c;if(!d)return null;const h=ZS(s.breakpoints),y=Object.keys(h);let g=h;return Object.keys(d).forEach(b=>{const C=LC(d[b],s);if(C!=null)if(typeof C=="object")if(a[b])g=io(g,e(b,C,s,a));else{const E=Gn({theme:s},C,w=>({[b]:w}));NC(E,C)?g[b]=t({sx:C,theme:s}):g=io(g,E)}else g=io(g,e(b,C,s,a))}),YS(s,XS(y,g))}return Array.isArray(o)?o.map(u):u(o)}return t}const fi=BC();fi.filterProps=["sx"];function du(){return du=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},du.apply(null,arguments)}function zC(e){for(var t=0,n,o=0,s=e.length;s>=4;++o,s-=4)n=e.charCodeAt(o)&255|(e.charCodeAt(++o)&255)<<8|(e.charCodeAt(++o)&255)<<16|(e.charCodeAt(++o)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(s){case 3:t^=(e.charCodeAt(o+2)&255)<<16;case 2:t^=(e.charCodeAt(o+1)&255)<<8;case 1:t^=e.charCodeAt(o)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var UC={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function hh(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var jC=/[A-Z]|^ms/g,WC=/_EMO_([^_]+?)_([^]*?)_EMO_/g,gh=function(t){return t.charCodeAt(1)===45},mh=function(t){return t!=null&&typeof t!="boolean"},pu=hh(function(e){return gh(e)?e:e.replace(jC,"-$&").toLowerCase()}),yh=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(WC,function(o,s,a){return Pn={name:s,styles:a,next:Pn},s})}return UC[t]!==1&&!gh(t)&&typeof n=="number"&&n!==0?n+"px":n};function ao(e,t,n){if(n==null)return"";var o=n;if(o.__emotion_styles!==void 0)return o;switch(typeof n){case"boolean":return"";case"object":{var s=n;if(s.anim===1)return Pn={name:s.name,styles:s.styles,next:Pn},s.name;var a=n;if(a.styles!==void 0){var u=a.next;if(u!==void 0)for(;u!==void 0;)Pn={name:u.name,styles:u.styles,next:Pn},u=u.next;var c=a.styles+";";return c}return VC(e,t,n)}case"function":{if(e!==void 0){var d=Pn,h=n(e);return Pn=d,ao(e,t,h)}break}}var y=n;if(t==null)return y;var g=t[y];return g!==void 0?g:y}function VC(e,t,n){var o="";if(Array.isArray(n))for(var s=0;s<n.length;s++)o+=ao(e,t,n[s])+";";else for(var a in n){var u=n[a];if(typeof u!="object"){var c=u;t!=null&&t[c]!==void 0?o+=a+"{"+t[c]+"}":mh(c)&&(o+=pu(a)+":"+yh(a,c)+";")}else if(Array.isArray(u)&&typeof u[0]=="string"&&(t==null||t[u[0]]===void 0))for(var d=0;d<u.length;d++)mh(u[d])&&(o+=pu(a)+":"+yh(a,u[d])+";");else{var h=ao(e,t,u);switch(a){case"animation":case"animationName":{o+=pu(a)+":"+h+";";break}default:o+=a+"{"+h+"}"}}}return o}var vh=/label:\s*([^\s;{]+)\s*(;|$)/g,Pn;function bh(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var o=!0,s="";Pn=void 0;var a=e[0];if(a==null||a.raw===void 0)o=!1,s+=ao(n,t,a);else{var u=a;s+=u[0]}for(var c=1;c<e.length;c++)if(s+=ao(n,t,e[c]),o){var d=a;s+=d[c]}vh.lastIndex=0;for(var h="",y;(y=vh.exec(s))!==null;)h+="-"+y[1];var g=zC(s)+h;return{name:g,styles:s,next:Pn}}var GC=function(t){return t()},HC=Mt.useInsertionEffect?Mt.useInsertionEffect:!1,YC=HC||GC,RC=!0;function qC(e,t,n){var o="";return n.split(" ").forEach(function(s){e[s]!==void 0?t.push(e[s]+";"):s&&(o+=s+" ")}),o}var _h=function(t,n,o){var s=t.key+"-"+n.name;(o===!1||RC===!1)&&t.registered[s]===void 0&&(t.registered[s]=n.styles)},KC=function(t,n,o){_h(t,n,o);var s=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var a=n;do t.insert(n===a?"."+s:"",a,t.sheet,!0),a=a.next;while(a!==void 0)}},JC=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,ZC=hh(function(e){return JC.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),XC=ZC,QC=function(t){return t!=="theme"},wh=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?XC:QC},Th=function(t,n,o){var s;if(n){var a=n.shouldForwardProp;s=t.__emotion_forwardProp&&a?function(u){return t.__emotion_forwardProp(u)&&a(u)}:a}return typeof s!="function"&&o&&(s=t.__emotion_forwardProp),s},eE=function(t){var n=t.cache,o=t.serialized,s=t.isStringTag;return _h(n,o,s),YC(function(){return KC(n,o,s)}),null},tE=function e(t,n){var o=t.__emotion_real===t,s=o&&t.__emotion_base||t,a,u;n!==void 0&&(a=n.label,u=n.target);var c=Th(t,n,o),d=c||wh(s),h=!d("as");return function(){var y=arguments,g=o&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(a!==void 0&&g.push("label:"+a+";"),y[0]==null||y[0].raw===void 0)g.push.apply(g,y);else{var b=y[0];g.push(b[0]);for(var C=y.length,E=1;E<C;E++)g.push(y[E],b[E])}var w=bf.withEmotionCache(function($,N,J){var V=h&&$.as||s,L="",D=[],B=$;if($.theme==null){B={};for(var Y in $)B[Y]=$[Y];B.theme=Mt.useContext(bf.ThemeContext)}typeof $.className=="string"?L=qC(N.registered,D,$.className):$.className!=null&&(L=$.className+" ");var ae=bh(g.concat(D),N.registered,B);L+=N.key+"-"+ae.name,u!==void 0&&(L+=" "+u);var te=h&&c===void 0?wh(V):d,S={};for(var W in $)h&&W==="as"||te(W)&&(S[W]=$[W]);return S.className=L,J&&(S.ref=J),Mt.createElement(Mt.Fragment,null,Mt.createElement(eE,{cache:N,serialized:ae,isStringTag:typeof V=="string"}),Mt.createElement(V,S))});return w.displayName=a!==void 0?a:"Styled("+(typeof s=="string"?s:s.displayName||s.name||"Component")+")",w.defaultProps=t.defaultProps,w.__emotion_real=w,w.__emotion_base=s,w.__emotion_styles=g,w.__emotion_forwardProp=c,Object.defineProperty(w,"toString",{value:function(){return"."+u}}),w.withComponent=function($,N){var J=e($,du({},n,N,{shouldForwardProp:Th(w,N,!0)}));return J.apply(void 0,g)},w}},nE=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],hu=tE.bind(null);nE.forEach(function(e){hu[e]=hu(e)});/**
145
171
  * @mui/styled-engine v6.4.8
146
172
  *
147
173
  * @license MIT
148
174
  * This source code is licensed under the MIT license found in the
149
175
  * LICENSE file in the root directory of this source tree.
150
- */function av(e,t){const n=$i(e,t);return process.env.NODE_ENV!=="production"?(...r)=>{const o=typeof e=="string"?`"${e}"`:"component";return r.length===0?console.error([`MUI: Seems like you called \`styled(${o})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
151
- `)):r.some(i=>i===void 0)&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),n(...r)}:n}function lv(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const Pc=[];function Ic(e){return Pc[0]=e,Ec(Pc)}const cv=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>({...n,[r.key]:r.val}),{})};function uv(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=e,i=cv(t),s=Object.keys(i);function a(p){return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n})`}function l(p){return`@media (max-width:${(typeof t[p]=="number"?t[p]:p)-r/100}${n})`}function u(p,y){const b=s.indexOf(y);return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n}) and (max-width:${(b!==-1&&typeof t[s[b]]=="number"?t[s[b]]:y)-r/100}${n})`}function d(p){return s.indexOf(p)+1<s.length?u(p,s[s.indexOf(p)+1]):a(p)}function f(p){const y=s.indexOf(p);return y===0?a(s[1]):y===s.length-1?l(s[y]):u(p,s[s.indexOf(p)+1]).replace("@media","@media not all and")}return{keys:s,values:i,up:a,down:l,between:u,only:d,not:f,unit:n,...o}}const fv={borderRadius:4};function $c(e=8,t=xi({spacing:e})){if(e.mui)return e;const n=(...r)=>(process.env.NODE_ENV!=="production"&&(r.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${r.length}`)),(r.length===0?[1]:r).map(i=>{const s=t(i);return typeof s=="number"?`${s}px`:s}).join(" "));return n.mui=!0,n}function dv(e,t){var r;const n=this;if(n.vars){if(!((r=n.colorSchemes)!=null&&r[e])||typeof n.getColorSchemeSelector!="function")return{};let o=n.getColorSchemeSelector(e);return o==="&"?t:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:t})}return n.palette.mode===e?t:{}}function kc(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:i={},...s}=e,a=uv(n),l=$c(o);let u=We({breakpoints:a,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:l,shape:{...fv,...i}},s);return u=R0(u),u.applyStyles=dv,u=t.reduce((d,f)=>We(d,f),u),u.unstable_sxConfig={...Ir,...s==null?void 0:s.unstable_sxConfig},u.unstable_sx=function(f){return Kt({sx:f,theme:this})},u}function Mc(e){const{variants:t,...n}=e,r={variants:t,style:Ic(n),isProcessed:!0};return r.style===n||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=Ic(o.style))}),r}const pv=kc();function ki(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function hv(e){return e?(t,n)=>n[e]:null}function gv(e,t,n){e.theme=vv(e.theme)?n:e.theme[t]||e.theme}function $r(e,t){const n=typeof t=="function"?t(e):t;if(Array.isArray(n))return n.flatMap(r=>$r(e,r));if(Array.isArray(n==null?void 0:n.variants)){let r;if(n.isProcessed)r=n.style;else{const{variants:o,...i}=n;r=i}return Fc(e,n.variants,[r])}return n!=null&&n.isProcessed?n.style:n}function Fc(e,t,n=[]){var o;let r;e:for(let i=0;i<t.length;i+=1){const s=t[i];if(typeof s.props=="function"){if(r??(r={...e,...e.ownerState,ownerState:e.ownerState}),!s.props(r))continue}else for(const a in s.props)if(e[a]!==s.props[a]&&((o=e.ownerState)==null?void 0:o[a])!==s.props[a])continue e;typeof s.style=="function"?(r??(r={...e,...e.ownerState,ownerState:e.ownerState}),n.push(s.style(r))):n.push(s.style)}return n}function mv(e={}){const{themeId:t,defaultTheme:n=pv,rootShouldForwardProp:r=ki,slotShouldForwardProp:o=ki}=e;function i(a){gv(a,t,n)}return(a,l={})=>{lv(a,_=>_.filter(x=>x!==Kt));const{name:u,slot:d,skipVariantsResolver:f,skipSx:p,overridesResolver:y=hv(Dc(d)),...b}=l,g=f!==void 0?f:d&&d!=="Root"&&d!=="root"||!1,w=p||!1;let E=ki;d==="Root"||d==="root"?E=r:d?E=o:Tv(a)&&(E=void 0);const F=av(a,{shouldForwardProp:E,label:bv(u,d),...b}),I=_=>{if(typeof _=="function"&&_.__emotion_real!==_)return function(k){return $r(k,_)};if(pt(_)){const x=Mc(_);return x.variants?function(G){return $r(G,x)}:x.style}return _},A=(..._)=>{const x=[],k=_.map(I),G=[];if(x.push(i),u&&y&&G.push(function(L){var oe,he;const q=(he=(oe=L.theme.components)==null?void 0:oe[u])==null?void 0:he.styleOverrides;if(!q)return null;const re={};for(const le in q)re[le]=$r(L,q[le]);return y(L,re)}),u&&!g&&G.push(function(L){var re,oe;const Y=L.theme,q=(oe=(re=Y==null?void 0:Y.components)==null?void 0:re[u])==null?void 0:oe.variants;return q?Fc(L,q):null}),w||G.push(Kt),Array.isArray(k[0])){const P=k.shift(),L=new Array(x.length).fill(""),Y=new Array(G.length).fill("");let q;q=[...L,...P,...Y],q.raw=[...L,...P.raw,...Y],x.unshift(q)}const z=[...x,...k,...G],m=F(...z);return a.muiName&&(m.muiName=a.muiName),process.env.NODE_ENV!=="production"&&(m.displayName=yv(u,d,a)),m};return F.withConfig&&(A.withConfig=F.withConfig),A}}function yv(e,t,n){return e?`${e}${Dt(t||"")}`:`Styled(${G0(n)})`}function bv(e,t){let n;return process.env.NODE_ENV!=="production"&&e&&(n=`${e}-${Dc(t||"Root")}`),n}function vv(e){for(const t in e)return!1;return!0}function Tv(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Dc(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function Mi(e,t=0,n=1){return process.env.NODE_ENV!=="production"&&(e<t||e>n)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${n}].`),K0(e,t,n)}function Sv(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),process.env.NODE_ENV!=="production"&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),n?`rgb${n.length===4?"a":""}(${n.map((r,o)=>o<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function At(e){if(e.type)return e;if(e.charAt(0)==="#")return At(Sv(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
152
- The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:Ct(9,e));let r=e.substring(t+1,e.length-1),o;if(n==="color"){if(r=r.split(" "),o=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(o))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${o}\` color space.
153
- The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:Ct(10,o))}else r=r.split(",");return r=r.map(i=>parseFloat(i)),{type:n,values:r,colorSpace:o}}const wv=e=>{const t=At(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},In=(e,t)=>{try{return wv(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function kr(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((o,i)=>i<3?parseInt(o,10):o):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function Nc(e){e=At(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),s=(u,d=(u+n/30)%12)=>o-i*Math.max(Math.min(d-3,9-d,1),-1);let a="rgb";const l=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(a+="a",l.push(t[3])),kr({type:a,values:l})}function Fi(e){e=At(e);let t=e.type==="hsl"||e.type==="hsla"?At(Nc(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Lc(e,t){const n=Fi(e),r=Fi(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function _v(e,t){return e=At(e),t=Mi(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,kr(e)}function Mr(e,t,n){try{return _v(e,t)}catch{return e}}function Di(e,t){if(e=At(e),t=Mi(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return kr(e)}function fe(e,t,n){try{return Di(e,t)}catch{return e}}function Ni(e,t){if(e=At(e),t=Mi(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return kr(e)}function de(e,t,n){try{return Ni(e,t)}catch{return e}}function Cv(e,t=.15){return Fi(e)>.5?Di(e,t):Ni(e,t)}function Fr(e,t,n){try{return Cv(e,t)}catch{return e}}const Ev=Fe.createContext(void 0);process.env.NODE_ENV!=="production"&&(ne.node,ne.object);function Av(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const o=t.components[n];return o.defaultProps?Ei(o.defaultProps,r):!o.styleOverrides&&!o.variants?Ei(o,r):r}function xv({props:e,name:t}){const n=Fe.useContext(Ev);return Av({props:e,name:t,theme:{components:n}})}const jc={theme:void 0};function Ov(e){let t,n;return function(o){let i=t;return(i===void 0||o.theme!==n)&&(jc.theme=o.theme,i=Mc(e(jc)),t=i,n=o.theme),i}}function Pv(e=""){function t(...r){if(!r.length)return"";const o=r[0];return typeof o=="string"&&!o.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${o}${t(...r.slice(1))})`:`, ${o}`}return(r,...o)=>`var(--${e?`${e}-`:""}${r}${t(...o)})`}const zc=(e,t,n,r=[])=>{let o=e;t.forEach((i,s)=>{s===t.length-1?Array.isArray(o)?o[Number(i)]=n:o&&typeof o=="object"&&(o[i]=n):o&&typeof o=="object"&&(o[i]||(o[i]=r.includes(i)?[]:{}),o=o[i])})},Iv=(e,t,n)=>{function r(o,i=[],s=[]){Object.entries(o).forEach(([a,l])=>{(!n||n&&!n([...i,a]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?r(l,[...i,a],Array.isArray(l)?[...s,a]:s):t([...i,a],l,s))})}r(e)},$v=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function Li(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},o={},i={},s={};return Iv(e,(a,l,u)=>{if((typeof l=="string"||typeof l=="number")&&(!r||!r(a,l))){const d=`--${n?`${n}-`:""}${a.join("-")}`,f=$v(a,l);Object.assign(o,{[d]:f}),zc(i,a,`var(${d})`,u),zc(s,a,`var(${d}, ${f})`,u)}},a=>a[0]==="vars"),{css:o,vars:i,varsWithDefaults:s}}function kv(e,t={}){const{getSelector:n=w,disableCssColorScheme:r,colorSchemeSelector:o}=t,{colorSchemes:i={},components:s,defaultColorScheme:a="light",...l}=e,{vars:u,css:d,varsWithDefaults:f}=Li(l,t);let p=f;const y={},{[a]:b,...g}=i;if(Object.entries(g||{}).forEach(([I,A])=>{const{vars:_,css:x,varsWithDefaults:k}=Li(A,t);p=We(p,k),y[I]={css:x,vars:_}}),b){const{css:I,vars:A,varsWithDefaults:_}=Li(b,t);p=We(p,_),y[a]={css:I,vars:A}}function w(I,A){var x,k;let _=o;if(o==="class"&&(_=".%s"),o==="data"&&(_="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(_=`[${o}="%s"]`),I){if(_==="media")return e.defaultColorScheme===I?":root":{[`@media (prefers-color-scheme: ${((k=(x=i[I])==null?void 0:x.palette)==null?void 0:k.mode)||I})`]:{":root":A}};if(_)return e.defaultColorScheme===I?`:root, ${_.replace("%s",String(I))}`:_.replace("%s",String(I))}return":root"}return{vars:p,generateThemeVars:()=>{let I={...u};return Object.entries(y).forEach(([,{vars:A}])=>{I=We(I,A)}),I},generateStyleSheets:()=>{var G,z;const I=[],A=e.defaultColorScheme||"light";function _(m,P){Object.keys(P).length&&I.push(typeof m=="string"?{[m]:{...P}}:m)}_(n(void 0,{...d}),d);const{[A]:x,...k}=y;if(x){const{css:m}=x,P=(z=(G=i[A])==null?void 0:G.palette)==null?void 0:z.mode,L=!r&&P?{colorScheme:P,...m}:{...m};_(n(A,{...L}),L)}return Object.entries(k).forEach(([m,{css:P}])=>{var q,re;const L=(re=(q=i[m])==null?void 0:q.palette)==null?void 0:re.mode,Y=!r&&L?{colorScheme:L,...P}:{...P};_(n(m,{...Y}),Y)}),I}}}function Mv(e){return function(n){return e==="media"?(process.env.NODE_ENV!=="production"&&n!=="light"&&n!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${n}'.`),`@media (prefers-color-scheme: ${n})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}const $n={black:"#000",white:"#fff"},Fv={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Xt={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Zt={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},kn={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},Qt={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Rt={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},en={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Bc(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:$n.white,default:$n.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const Dv=Bc();function Uc(){return{text:{primary:$n.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:$n.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const Vc=Uc();function Wc(e,t,n,r){const o=r.light||r,i=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=Ni(e.main,o):t==="dark"&&(e.dark=Di(e.main,i)))}function Nv(e="light"){return e==="dark"?{main:Qt[200],light:Qt[50],dark:Qt[400]}:{main:Qt[700],light:Qt[400],dark:Qt[800]}}function Lv(e="light"){return e==="dark"?{main:Xt[200],light:Xt[50],dark:Xt[400]}:{main:Xt[500],light:Xt[300],dark:Xt[700]}}function jv(e="light"){return e==="dark"?{main:Zt[500],light:Zt[300],dark:Zt[700]}:{main:Zt[700],light:Zt[400],dark:Zt[800]}}function zv(e="light"){return e==="dark"?{main:Rt[400],light:Rt[300],dark:Rt[700]}:{main:Rt[700],light:Rt[500],dark:Rt[900]}}function Bv(e="light"){return e==="dark"?{main:en[400],light:en[300],dark:en[700]}:{main:en[800],light:en[500],dark:en[900]}}function Uv(e="light"){return e==="dark"?{main:kn[400],light:kn[300],dark:kn[700]}:{main:"#ed6c02",light:kn[500],dark:kn[900]}}function ji(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,...o}=e,i=e.primary||Nv(t),s=e.secondary||Lv(t),a=e.error||jv(t),l=e.info||zv(t),u=e.success||Bv(t),d=e.warning||Uv(t);function f(g){const w=Lc(g,Vc.text.primary)>=n?Vc.text.primary:Dv.text.primary;if(process.env.NODE_ENV!=="production"){const E=Lc(g,w);E<3&&console.error([`MUI: The contrast ratio of ${E}:1 for ${w} on ${g}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
154
- `))}return w}const p=({color:g,name:w,mainShade:E=500,lightShade:F=300,darkShade:I=700})=>{if(g={...g},!g.main&&g[E]&&(g.main=g[E]),!g.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${w?` (${w})`:""} provided to augmentColor(color) is invalid.
155
- The color object needs to have a \`main\` property or a \`${E}\` property.`:Ct(11,w?` (${w})`:"",E));if(typeof g.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${w?` (${w})`:""} provided to augmentColor(color) is invalid.
156
- \`color.main\` should be a string, but \`${JSON.stringify(g.main)}\` was provided instead.
176
+ */function rE(e,t){const n=hu(e,t);return process.env.NODE_ENV!=="production"?(...o)=>{const s=typeof e=="string"?`"${e}"`:"component";return o.length===0?console.error([`MUI: Seems like you called \`styled(${s})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
177
+ `)):o.some(a=>a===void 0)&&console.error(`MUI: the styled(${s})(...args) API requires all its args to be defined.`),n(...o)}:n}function iE(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const Sh=[];function Ch(e){return Sh[0]=e,bh(Sh)}const oE=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,o)=>n.val-o.val),t.reduce((n,o)=>({...n,[o.key]:o.val}),{})};function sE(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:o=5,...s}=e,a=oE(t),u=Object.keys(a);function c(b){return`@media (min-width:${typeof t[b]=="number"?t[b]:b}${n})`}function d(b){return`@media (max-width:${(typeof t[b]=="number"?t[b]:b)-o/100}${n})`}function h(b,C){const E=u.indexOf(C);return`@media (min-width:${typeof t[b]=="number"?t[b]:b}${n}) and (max-width:${(E!==-1&&typeof t[u[E]]=="number"?t[u[E]]:C)-o/100}${n})`}function y(b){return u.indexOf(b)+1<u.length?h(b,u[u.indexOf(b)+1]):c(b)}function g(b){const C=u.indexOf(b);return C===0?c(u[1]):C===u.length-1?d(u[C]):h(b,u[u.indexOf(b)+1]).replace("@media","@media not all and")}return{keys:u,values:a,up:c,down:d,between:h,only:y,not:g,unit:n,...s}}const aE={borderRadius:4};function Eh(e=8,t=cu({spacing:e})){if(e.mui)return e;const n=(...o)=>(process.env.NODE_ENV!=="production"&&(o.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${o.length}`)),(o.length===0?[1]:o).map(a=>{const u=t(a);return typeof u=="number"?`${u}px`:u}).join(" "));return n.mui=!0,n}function lE(e,t){var o;const n=this;if(n.vars){if(!((o=n.colorSchemes)!=null&&o[e])||typeof n.getColorSchemeSelector!="function")return{};let s=n.getColorSchemeSelector(e);return s==="&"?t:((s.includes("data-")||s.includes("."))&&(s=`*:where(${s.replace(/\s*&$/,"")}) &`),{[s]:t})}return n.palette.mode===e?t:{}}function xh(e={},...t){const{breakpoints:n={},palette:o={},spacing:s,shape:a={},...u}=e,c=sE(n),d=Eh(s);let h=qt({breakpoints:c,direction:"ltr",components:{},palette:{mode:"light",...o},spacing:d,shape:{...aE,...a}},u);return h=KS(h),h.applyStyles=lE,h=t.reduce((y,g)=>qt(y,g),h),h.unstable_sxConfig={...xs,...u==null?void 0:u.unstable_sxConfig},h.unstable_sx=function(g){return fi({sx:g,theme:this})},h}function Ah(e){const{variants:t,...n}=e,o={variants:t,style:Ch(n),isProcessed:!0};return o.style===n||t&&t.forEach(s=>{typeof s.style!="function"&&(s.style=Ch(s.style))}),o}const uE=xh();function gu(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function cE(e){return e?(t,n)=>n[e]:null}function fE(e,t,n){e.theme=gE(e.theme)?n:e.theme[t]||e.theme}function As(e,t){const n=typeof t=="function"?t(e):t;if(Array.isArray(n))return n.flatMap(o=>As(e,o));if(Array.isArray(n==null?void 0:n.variants)){let o;if(n.isProcessed)o=n.style;else{const{variants:s,...a}=n;o=a}return Oh(e,n.variants,[o])}return n!=null&&n.isProcessed?n.style:n}function Oh(e,t,n=[]){var s;let o;e:for(let a=0;a<t.length;a+=1){const u=t[a];if(typeof u.props=="function"){if(o??(o={...e,...e.ownerState,ownerState:e.ownerState}),!u.props(o))continue}else for(const c in u.props)if(e[c]!==u.props[c]&&((s=e.ownerState)==null?void 0:s[c])!==u.props[c])continue e;typeof u.style=="function"?(o??(o={...e,...e.ownerState,ownerState:e.ownerState}),n.push(u.style(o))):n.push(u.style)}return n}function dE(e={}){const{themeId:t,defaultTheme:n=uE,rootShouldForwardProp:o=gu,slotShouldForwardProp:s=gu}=e;function a(c){fE(c,t,n)}return(c,d={})=>{iE(c,D=>D.filter(B=>B!==fi));const{name:h,slot:y,skipVariantsResolver:g,skipSx:b,overridesResolver:C=cE(Ih(y)),...E}=d,w=g!==void 0?g:y&&y!=="Root"&&y!=="root"||!1,$=b||!1;let N=gu;y==="Root"||y==="root"?N=o:y?N=s:mE(c)&&(N=void 0);const J=rE(c,{shouldForwardProp:N,label:hE(h,y),...E}),V=D=>{if(typeof D=="function"&&D.__emotion_real!==D)return function(Y){return As(Y,D)};if(Vn(D)){const B=Ah(D);return B.variants?function(ae){return As(ae,B)}:B.style}return D},L=(...D)=>{const B=[],Y=D.map(V),ae=[];if(B.push(a),h&&C&&ae.push(function(Q){var De,Ue;const he=(Ue=(De=Q.theme.components)==null?void 0:De[h])==null?void 0:Ue.styleOverrides;if(!he)return null;const Fe={};for(const Ie in he)Fe[Ie]=As(Q,he[Ie]);return C(Q,Fe)}),h&&!w&&ae.push(function(Q){var Fe,De;const fe=Q.theme,he=(De=(Fe=fe==null?void 0:fe.components)==null?void 0:Fe[h])==null?void 0:De.variants;return he?Oh(Q,he):null}),$||ae.push(fi),Array.isArray(Y[0])){const W=Y.shift(),Q=new Array(B.length).fill(""),fe=new Array(ae.length).fill("");let he;he=[...Q,...W,...fe],he.raw=[...Q,...W.raw,...fe],B.unshift(he)}const te=[...B,...Y,...ae],S=J(...te);return c.muiName&&(S.muiName=c.muiName),process.env.NODE_ENV!=="production"&&(S.displayName=pE(h,y,c)),S};return J.withConfig&&(L.withConfig=J.withConfig),L}}function pE(e,t,n){return e?`${e}${kr(t||"")}`:`Styled(${US(n)})`}function hE(e,t){let n;return process.env.NODE_ENV!=="production"&&e&&(n=`${e}-${Ih(t||"Root")}`),n}function gE(e){for(const t in e)return!1;return!0}function mE(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Ih(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function mu(e,t=0,n=1){return process.env.NODE_ENV!=="production"&&(e<t||e>n)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${n}].`),HS(e,t,n)}function yE(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(o=>o+o)),process.env.NODE_ENV!=="production"&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),n?`rgb${n.length===4?"a":""}(${n.map((o,s)=>s<3?parseInt(o,16):Math.round(parseInt(o,16)/255*1e3)/1e3).join(", ")})`:""}function ur(e){if(e.type)return e;if(e.charAt(0)==="#")return ur(yE(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
178
+ The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:ar(9,e));let o=e.substring(t+1,e.length-1),s;if(n==="color"){if(o=o.split(" "),s=o.shift(),o.length===4&&o[3].charAt(0)==="/"&&(o[3]=o[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(s))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${s}\` color space.
179
+ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:ar(10,s))}else o=o.split(",");return o=o.map(a=>parseFloat(a)),{type:n,values:o,colorSpace:s}}const vE=e=>{const t=ur(e);return t.values.slice(0,3).map((n,o)=>t.type.includes("hsl")&&o!==0?`${n}%`:n).join(" ")},lo=(e,t)=>{try{return vE(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function Os(e){const{type:t,colorSpace:n}=e;let{values:o}=e;return t.includes("rgb")?o=o.map((s,a)=>a<3?parseInt(s,10):s):t.includes("hsl")&&(o[1]=`${o[1]}%`,o[2]=`${o[2]}%`),t.includes("color")?o=`${n} ${o.join(" ")}`:o=`${o.join(", ")}`,`${t}(${o})`}function Ph(e){e=ur(e);const{values:t}=e,n=t[0],o=t[1]/100,s=t[2]/100,a=o*Math.min(s,1-s),u=(h,y=(h+n/30)%12)=>s-a*Math.max(Math.min(y-3,9-y,1),-1);let c="rgb";const d=[Math.round(u(0)*255),Math.round(u(8)*255),Math.round(u(4)*255)];return e.type==="hsla"&&(c+="a",d.push(t[3])),Os({type:c,values:d})}function yu(e){e=ur(e);let t=e.type==="hsl"||e.type==="hsla"?ur(Ph(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function $h(e,t){const n=yu(e),o=yu(t);return(Math.max(n,o)+.05)/(Math.min(n,o)+.05)}function bE(e,t){return e=ur(e),t=mu(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,Os(e)}function Is(e,t,n){try{return bE(e,t)}catch{return e}}function vu(e,t){if(e=ur(e),t=mu(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return Os(e)}function Ye(e,t,n){try{return vu(e,t)}catch{return e}}function bu(e,t){if(e=ur(e),t=mu(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return Os(e)}function Re(e,t,n){try{return bu(e,t)}catch{return e}}function _E(e,t=.15){return yu(e)>.5?vu(e,t):bu(e,t)}function Ps(e,t,n){try{return _E(e,t)}catch{return e}}const wE=Mt.createContext(void 0);process.env.NODE_ENV!=="production"&&(ke.node,ke.object);function TE(e){const{theme:t,name:n,props:o}=e;if(!t||!t.components||!t.components[n])return o;const s=t.components[n];return s.defaultProps?lu(s.defaultProps,o):!s.styleOverrides&&!s.variants?lu(s,o):o}function SE({props:e,name:t}){const n=Mt.useContext(wE);return TE({props:e,name:t,theme:{components:n}})}const Mh={theme:void 0};function CE(e){let t,n;return function(s){let a=t;return(a===void 0||s.theme!==n)&&(Mh.theme=s.theme,a=Ah(e(Mh)),t=a,n=s.theme),a}}function EE(e=""){function t(...o){if(!o.length)return"";const s=o[0];return typeof s=="string"&&!s.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${s}${t(...o.slice(1))})`:`, ${s}`}return(o,...s)=>`var(--${e?`${e}-`:""}${o}${t(...s)})`}const Fh=(e,t,n,o=[])=>{let s=e;t.forEach((a,u)=>{u===t.length-1?Array.isArray(s)?s[Number(a)]=n:s&&typeof s=="object"&&(s[a]=n):s&&typeof s=="object"&&(s[a]||(s[a]=o.includes(a)?[]:{}),s=s[a])})},xE=(e,t,n)=>{function o(s,a=[],u=[]){Object.entries(s).forEach(([c,d])=>{(!n||n&&!n([...a,c]))&&d!=null&&(typeof d=="object"&&Object.keys(d).length>0?o(d,[...a,c],Array.isArray(d)?[...u,c]:u):t([...a,c],d,u))})}o(e)},AE=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(o=>e.includes(o))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function _u(e,t){const{prefix:n,shouldSkipGeneratingVar:o}=t||{},s={},a={},u={};return xE(e,(c,d,h)=>{if((typeof d=="string"||typeof d=="number")&&(!o||!o(c,d))){const y=`--${n?`${n}-`:""}${c.join("-")}`,g=AE(c,d);Object.assign(s,{[y]:g}),Fh(a,c,`var(${y})`,h),Fh(u,c,`var(${y}, ${g})`,h)}},c=>c[0]==="vars"),{css:s,vars:a,varsWithDefaults:u}}function OE(e,t={}){const{getSelector:n=$,disableCssColorScheme:o,colorSchemeSelector:s}=t,{colorSchemes:a={},components:u,defaultColorScheme:c="light",...d}=e,{vars:h,css:y,varsWithDefaults:g}=_u(d,t);let b=g;const C={},{[c]:E,...w}=a;if(Object.entries(w||{}).forEach(([V,L])=>{const{vars:D,css:B,varsWithDefaults:Y}=_u(L,t);b=qt(b,Y),C[V]={css:B,vars:D}}),E){const{css:V,vars:L,varsWithDefaults:D}=_u(E,t);b=qt(b,D),C[c]={css:V,vars:L}}function $(V,L){var B,Y;let D=s;if(s==="class"&&(D=".%s"),s==="data"&&(D="[data-%s]"),s!=null&&s.startsWith("data-")&&!s.includes("%s")&&(D=`[${s}="%s"]`),V){if(D==="media")return e.defaultColorScheme===V?":root":{[`@media (prefers-color-scheme: ${((Y=(B=a[V])==null?void 0:B.palette)==null?void 0:Y.mode)||V})`]:{":root":L}};if(D)return e.defaultColorScheme===V?`:root, ${D.replace("%s",String(V))}`:D.replace("%s",String(V))}return":root"}return{vars:b,generateThemeVars:()=>{let V={...h};return Object.entries(C).forEach(([,{vars:L}])=>{V=qt(V,L)}),V},generateStyleSheets:()=>{var ae,te;const V=[],L=e.defaultColorScheme||"light";function D(S,W){Object.keys(W).length&&V.push(typeof S=="string"?{[S]:{...W}}:S)}D(n(void 0,{...y}),y);const{[L]:B,...Y}=C;if(B){const{css:S}=B,W=(te=(ae=a[L])==null?void 0:ae.palette)==null?void 0:te.mode,Q=!o&&W?{colorScheme:W,...S}:{...S};D(n(L,{...Q}),Q)}return Object.entries(Y).forEach(([S,{css:W}])=>{var he,Fe;const Q=(Fe=(he=a[S])==null?void 0:he.palette)==null?void 0:Fe.mode,fe=!o&&Q?{colorScheme:Q,...W}:{...W};D(n(S,{...fe}),fe)}),V}}}function IE(e){return function(n){return e==="media"?(process.env.NODE_ENV!=="production"&&n!=="light"&&n!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${n}'.`),`@media (prefers-color-scheme: ${n})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}const uo={black:"#000",white:"#fff"},PE={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},di={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},pi={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},co={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},hi={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},gi={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},mi={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Dh(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:uo.white,default:uo.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const $E=Dh();function kh(){return{text:{primary:uo.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:uo.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const Nh=kh();function Lh(e,t,n,o){const s=o.light||o,a=o.dark||o*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=bu(e.main,s):t==="dark"&&(e.dark=vu(e.main,a)))}function ME(e="light"){return e==="dark"?{main:hi[200],light:hi[50],dark:hi[400]}:{main:hi[700],light:hi[400],dark:hi[800]}}function FE(e="light"){return e==="dark"?{main:di[200],light:di[50],dark:di[400]}:{main:di[500],light:di[300],dark:di[700]}}function DE(e="light"){return e==="dark"?{main:pi[500],light:pi[300],dark:pi[700]}:{main:pi[700],light:pi[400],dark:pi[800]}}function kE(e="light"){return e==="dark"?{main:gi[400],light:gi[300],dark:gi[700]}:{main:gi[700],light:gi[500],dark:gi[900]}}function NE(e="light"){return e==="dark"?{main:mi[400],light:mi[300],dark:mi[700]}:{main:mi[800],light:mi[500],dark:mi[900]}}function LE(e="light"){return e==="dark"?{main:co[400],light:co[300],dark:co[700]}:{main:"#ed6c02",light:co[500],dark:co[900]}}function wu(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:o=.2,...s}=e,a=e.primary||ME(t),u=e.secondary||FE(t),c=e.error||DE(t),d=e.info||kE(t),h=e.success||NE(t),y=e.warning||LE(t);function g(w){const $=$h(w,Nh.text.primary)>=n?Nh.text.primary:$E.text.primary;if(process.env.NODE_ENV!=="production"){const N=$h(w,$);N<3&&console.error([`MUI: The contrast ratio of ${N}:1 for ${$} on ${w}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
180
+ `))}return $}const b=({color:w,name:$,mainShade:N=500,lightShade:J=300,darkShade:V=700})=>{if(w={...w},!w.main&&w[N]&&(w.main=w[N]),!w.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${$?` (${$})`:""} provided to augmentColor(color) is invalid.
181
+ The color object needs to have a \`main\` property or a \`${N}\` property.`:ar(11,$?` (${$})`:"",N));if(typeof w.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${$?` (${$})`:""} provided to augmentColor(color) is invalid.
182
+ \`color.main\` should be a string, but \`${JSON.stringify(w.main)}\` was provided instead.
157
183
 
158
184
  Did you intend to use one of the following approaches?
159
185
 
@@ -165,16 +191,16 @@ const theme1 = createTheme({ palette: {
165
191
 
166
192
  const theme2 = createTheme({ palette: {
167
193
  primary: { main: green[500] },
168
- } });`:Ct(12,w?` (${w})`:"",JSON.stringify(g.main)));return Wc(g,"light",F,r),Wc(g,"dark",I,r),g.contrastText||(g.contrastText=f(g.main)),g};let y;return t==="light"?y=Bc():t==="dark"&&(y=Uc()),process.env.NODE_ENV!=="production"&&(y||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),We({common:{...$n},mode:t,primary:p({color:i,name:"primary"}),secondary:p({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:a,name:"error"}),warning:p({color:d,name:"warning"}),info:p({color:l,name:"info"}),success:p({color:u,name:"success"}),grey:Fv,contrastThreshold:n,getContrastText:f,augmentColor:p,tonalOffset:r,...y},o)}function Vv(e){const t={};return Object.entries(e).forEach(r=>{const[o,i]=r;typeof i=="object"&&(t[o]=`${i.fontStyle?`${i.fontStyle} `:""}${i.fontVariant?`${i.fontVariant} `:""}${i.fontWeight?`${i.fontWeight} `:""}${i.fontStretch?`${i.fontStretch} `:""}${i.fontSize||""}${i.lineHeight?`/${i.lineHeight} `:""}${i.fontFamily||""}`)}),t}function Wv(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function Gv(e){return Math.round(e*1e5)/1e5}const Gc={textTransform:"uppercase"},Hc='"Roboto", "Helvetica", "Arial", sans-serif';function Hv(e,t){const{fontFamily:n=Hc,fontSize:r=14,fontWeightLight:o=300,fontWeightRegular:i=400,fontWeightMedium:s=500,fontWeightBold:a=700,htmlFontSize:l=16,allVariants:u,pxToRem:d,...f}=typeof t=="function"?t(e):t;process.env.NODE_ENV!=="production"&&(typeof r!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof l!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const p=r/14,y=d||(w=>`${w/l*p}rem`),b=(w,E,F,I,A)=>({fontFamily:n,fontWeight:w,fontSize:y(E),lineHeight:F,...n===Hc?{letterSpacing:`${Gv(I/E)}em`}:{},...A,...u}),g={h1:b(o,96,1.167,-1.5),h2:b(o,60,1.2,-.5),h3:b(i,48,1.167,0),h4:b(i,34,1.235,.25),h5:b(i,24,1.334,0),h6:b(s,20,1.6,.15),subtitle1:b(i,16,1.75,.15),subtitle2:b(s,14,1.57,.1),body1:b(i,16,1.5,.15),body2:b(i,14,1.43,.15),button:b(s,14,1.75,.4,Gc),caption:b(i,12,1.66,.4),overline:b(i,12,2.66,1,Gc),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return We({htmlFontSize:l,pxToRem:y,fontFamily:n,fontSize:r,fontWeightLight:o,fontWeightRegular:i,fontWeightMedium:s,fontWeightBold:a,...g},f,{clone:!1})}const Yv=.2,qv=.14,Jv=.12;function ge(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Yv})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${qv})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Jv})`].join(",")}const Kv=["none",ge(0,2,1,-1,0,1,1,0,0,1,3,0),ge(0,3,1,-2,0,2,2,0,0,1,5,0),ge(0,3,3,-2,0,3,4,0,0,1,8,0),ge(0,2,4,-1,0,4,5,0,0,1,10,0),ge(0,3,5,-1,0,5,8,0,0,1,14,0),ge(0,3,5,-1,0,6,10,0,0,1,18,0),ge(0,4,5,-2,0,7,10,1,0,2,16,1),ge(0,5,5,-3,0,8,10,1,0,3,14,2),ge(0,5,6,-3,0,9,12,1,0,3,16,2),ge(0,6,6,-3,0,10,14,1,0,4,18,3),ge(0,6,7,-4,0,11,15,1,0,4,20,3),ge(0,7,8,-4,0,12,17,2,0,5,22,4),ge(0,7,8,-4,0,13,19,2,0,5,24,4),ge(0,7,9,-4,0,14,21,2,0,5,26,4),ge(0,8,9,-5,0,15,22,2,0,6,28,5),ge(0,8,10,-5,0,16,24,2,0,6,30,5),ge(0,8,11,-5,0,17,26,2,0,6,32,5),ge(0,9,11,-5,0,18,28,2,0,7,34,6),ge(0,9,12,-6,0,19,29,2,0,7,36,6),ge(0,10,13,-6,0,20,31,3,0,8,38,7),ge(0,10,13,-6,0,21,33,3,0,8,40,7),ge(0,10,14,-6,0,22,35,3,0,8,42,7),ge(0,11,14,-7,0,23,36,3,0,9,44,8),ge(0,11,15,-7,0,24,38,3,0,9,46,8)],Xv={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Zv={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Yc(e){return`${Math.round(e)}ms`}function Qv(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function Rv(e){const t={...Xv,...e.easing},n={...Zv,...e.duration};return{getAutoHeightDuration:Qv,create:(o=["all"],i={})=>{const{duration:s=n.standard,easing:a=t.easeInOut,delay:l=0,...u}=i;if(process.env.NODE_ENV!=="production"){const d=p=>typeof p=="string",f=p=>!Number.isNaN(parseFloat(p));!d(o)&&!Array.isArray(o)&&console.error('MUI: Argument "props" must be a string or Array.'),!f(s)&&!d(s)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${s}.`),d(a)||console.error('MUI: Argument "easing" must be a string.'),!f(l)&&!d(l)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof i!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
169
- `)),Object.keys(u).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(u).join(",")}].`)}return(Array.isArray(o)?o:[o]).map(d=>`${d} ${typeof s=="string"?s:Yc(s)} ${a} ${typeof l=="string"?l:Yc(l)}`).join(",")},...e,easing:t,duration:n}}const eT={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function tT(e){return pt(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function qc(e={}){const t={...e};function n(r){const o=Object.entries(r);for(let i=0;i<o.length;i++){const[s,a]=o[i];!tT(a)||s.startsWith("unstable_")?delete r[s]:pt(a)&&(r[s]={...a},n(r[s]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
194
+ } });`:ar(12,$?` (${$})`:"",JSON.stringify(w.main)));return Lh(w,"light",J,o),Lh(w,"dark",V,o),w.contrastText||(w.contrastText=g(w.main)),w};let C;return t==="light"?C=Dh():t==="dark"&&(C=kh()),process.env.NODE_ENV!=="production"&&(C||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),qt({common:{...uo},mode:t,primary:b({color:a,name:"primary"}),secondary:b({color:u,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:b({color:c,name:"error"}),warning:b({color:y,name:"warning"}),info:b({color:d,name:"info"}),success:b({color:h,name:"success"}),grey:PE,contrastThreshold:n,getContrastText:g,augmentColor:b,tonalOffset:o,...C},s)}function BE(e){const t={};return Object.entries(e).forEach(o=>{const[s,a]=o;typeof a=="object"&&(t[s]=`${a.fontStyle?`${a.fontStyle} `:""}${a.fontVariant?`${a.fontVariant} `:""}${a.fontWeight?`${a.fontWeight} `:""}${a.fontStretch?`${a.fontStretch} `:""}${a.fontSize||""}${a.lineHeight?`/${a.lineHeight} `:""}${a.fontFamily||""}`)}),t}function zE(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function UE(e){return Math.round(e*1e5)/1e5}const Bh={textTransform:"uppercase"},zh='"Roboto", "Helvetica", "Arial", sans-serif';function jE(e,t){const{fontFamily:n=zh,fontSize:o=14,fontWeightLight:s=300,fontWeightRegular:a=400,fontWeightMedium:u=500,fontWeightBold:c=700,htmlFontSize:d=16,allVariants:h,pxToRem:y,...g}=typeof t=="function"?t(e):t;process.env.NODE_ENV!=="production"&&(typeof o!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof d!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const b=o/14,C=y||($=>`${$/d*b}rem`),E=($,N,J,V,L)=>({fontFamily:n,fontWeight:$,fontSize:C(N),lineHeight:J,...n===zh?{letterSpacing:`${UE(V/N)}em`}:{},...L,...h}),w={h1:E(s,96,1.167,-1.5),h2:E(s,60,1.2,-.5),h3:E(a,48,1.167,0),h4:E(a,34,1.235,.25),h5:E(a,24,1.334,0),h6:E(u,20,1.6,.15),subtitle1:E(a,16,1.75,.15),subtitle2:E(u,14,1.57,.1),body1:E(a,16,1.5,.15),body2:E(a,14,1.43,.15),button:E(u,14,1.75,.4,Bh),caption:E(a,12,1.66,.4),overline:E(a,12,2.66,1,Bh),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return qt({htmlFontSize:d,pxToRem:C,fontFamily:n,fontSize:o,fontWeightLight:s,fontWeightRegular:a,fontWeightMedium:u,fontWeightBold:c,...w},g,{clone:!1})}const WE=.2,VE=.14,GE=.12;function Qe(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${WE})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${VE})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${GE})`].join(",")}const HE=["none",Qe(0,2,1,-1,0,1,1,0,0,1,3,0),Qe(0,3,1,-2,0,2,2,0,0,1,5,0),Qe(0,3,3,-2,0,3,4,0,0,1,8,0),Qe(0,2,4,-1,0,4,5,0,0,1,10,0),Qe(0,3,5,-1,0,5,8,0,0,1,14,0),Qe(0,3,5,-1,0,6,10,0,0,1,18,0),Qe(0,4,5,-2,0,7,10,1,0,2,16,1),Qe(0,5,5,-3,0,8,10,1,0,3,14,2),Qe(0,5,6,-3,0,9,12,1,0,3,16,2),Qe(0,6,6,-3,0,10,14,1,0,4,18,3),Qe(0,6,7,-4,0,11,15,1,0,4,20,3),Qe(0,7,8,-4,0,12,17,2,0,5,22,4),Qe(0,7,8,-4,0,13,19,2,0,5,24,4),Qe(0,7,9,-4,0,14,21,2,0,5,26,4),Qe(0,8,9,-5,0,15,22,2,0,6,28,5),Qe(0,8,10,-5,0,16,24,2,0,6,30,5),Qe(0,8,11,-5,0,17,26,2,0,6,32,5),Qe(0,9,11,-5,0,18,28,2,0,7,34,6),Qe(0,9,12,-6,0,19,29,2,0,7,36,6),Qe(0,10,13,-6,0,20,31,3,0,8,38,7),Qe(0,10,13,-6,0,21,33,3,0,8,40,7),Qe(0,10,14,-6,0,22,35,3,0,8,42,7),Qe(0,11,14,-7,0,23,36,3,0,9,44,8),Qe(0,11,15,-7,0,24,38,3,0,9,46,8)],YE={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},RE={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Uh(e){return`${Math.round(e)}ms`}function qE(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function KE(e){const t={...YE,...e.easing},n={...RE,...e.duration};return{getAutoHeightDuration:qE,create:(s=["all"],a={})=>{const{duration:u=n.standard,easing:c=t.easeInOut,delay:d=0,...h}=a;if(process.env.NODE_ENV!=="production"){const y=b=>typeof b=="string",g=b=>!Number.isNaN(parseFloat(b));!y(s)&&!Array.isArray(s)&&console.error('MUI: Argument "props" must be a string or Array.'),!g(u)&&!y(u)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${u}.`),y(c)||console.error('MUI: Argument "easing" must be a string.'),!g(d)&&!y(d)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof a!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
195
+ `)),Object.keys(h).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(h).join(",")}].`)}return(Array.isArray(s)?s:[s]).map(y=>`${y} ${typeof u=="string"?u:Uh(u)} ${c} ${typeof d=="string"?d:Uh(d)}`).join(",")},...e,easing:t,duration:n}}const JE={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function ZE(e){return Vn(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function jh(e={}){const t={...e};function n(o){const s=Object.entries(o);for(let a=0;a<s.length;a++){const[u,c]=s[a];!ZE(c)||u.startsWith("unstable_")?delete o[u]:Vn(c)&&(o[u]={...c},n(o[u]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
170
196
 
171
197
  const theme = ${JSON.stringify(t,null,2)};
172
198
 
173
199
  theme.breakpoints = createBreakpoints(theme.breakpoints || {});
174
200
  theme.transitions = createTransitions(theme.transitions || {});
175
201
 
176
- export default theme;`}function zi(e={},...t){const{breakpoints:n,mixins:r={},spacing:o,palette:i={},transitions:s={},typography:a={},shape:l,...u}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":Ct(20));const d=ji(i),f=kc(e);let p=We(f,{mixins:Wv(f.breakpoints,r),palette:d,shadows:Kv.slice(),typography:Hv(d,a),transitions:Rv(s),zIndex:{...eT}});if(p=We(p,u),p=t.reduce((y,b)=>We(y,b),p),process.env.NODE_ENV!=="production"){const y=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],b=(g,w)=>{let E;for(E in g){const F=g[E];if(y.includes(E)&&Object.keys(F).length>0){if(process.env.NODE_ENV!=="production"){const I=Ai("",E);console.error([`MUI: The \`${w}\` component increases the CSS specificity of the \`${E}\` internal state.`,"You can not override it like this: ",JSON.stringify(g,null,2),"",`Instead, you need to use the '&.${I}' syntax:`,JSON.stringify({root:{[`&.${I}`]:F}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
177
- `))}g[E]={}}}};Object.keys(p.components).forEach(g=>{const w=p.components[g].styleOverrides;w&&g.startsWith("Mui")&&b(w,g)})}return p.unstable_sxConfig={...Ir,...u==null?void 0:u.unstable_sxConfig},p.unstable_sx=function(b){return Kt({sx:b,theme:this})},p.toRuntimeSource=qc,p}function nT(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const rT=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=nT(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function Jc(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Kc(e){return e==="dark"?rT:[]}function oT(e){const{palette:t={mode:"light"},opacity:n,overlays:r,...o}=e,i=ji(t);return{palette:i,opacity:{...Jc(i.mode),...n},overlays:r||Kc(i.mode),...o}}function iT(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const sT=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],aT=e=>(t,n)=>{const r=e.rootSelector||":root",o=e.colorSchemeSelector;let i=o;if(o==="class"&&(i=".%s"),o==="data"&&(i="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(i=`[${o}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const s={};return sT(e.cssVarPrefix).forEach(a=>{s[a]=n[a],delete n[a]}),i==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:s}}:i?{[i.replace("%s",t)]:s,[`${r}, ${i.replace("%s",t)}`]:n}:{[r]:{...n,...s}}}if(i&&i!=="media")return`${r}, ${i.replace("%s",String(t))}`}else if(t){if(i==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(i)return i.replace("%s",String(t))}return r};function lT(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function O(e,t,n){!e[t]&&n&&(e[t]=n)}function Mn(e){return typeof e!="string"||!e.startsWith("hsl")?e:Nc(e)}function gt(e,t){`${t}Channel`in e||(e[`${t}Channel`]=In(Mn(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
178
- To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function cT(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const ot=e=>{try{return e()}catch{}},uT=(e="mui")=>Pv(e);function Bi(e,t,n,r){if(!t)return;t=t===!0?{}:t;const o=r==="dark"?"dark":"light";if(!n){e[r]=oT({...t,palette:{mode:o,...t==null?void 0:t.palette}});return}const{palette:i,...s}=zi({...n,palette:{mode:o,...t==null?void 0:t.palette}});return e[r]={...t,palette:i,opacity:{...Jc(o),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||Kc(o)},s}function fT(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:i="mui",shouldSkipGeneratingVar:s=iT,colorSchemeSelector:a=n.light&&n.dark?"media":void 0,rootSelector:l=":root",...u}=e,d=Object.keys(n)[0],f=r||(n.light&&d!=="light"?"light":d),p=uT(i),{[f]:y,light:b,dark:g,...w}=n,E={...w};let F=y;if((f==="dark"&&!("dark"in n)||f==="light"&&!("light"in n))&&(F=!0),!F)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${f}\` option is either missing or invalid.`:Ct(21,f));const I=Bi(E,F,u,f);b&&!E.light&&Bi(E,b,void 0,"light"),g&&!E.dark&&Bi(E,g,void 0,"dark");let A={defaultColorScheme:f,...I,cssVarPrefix:i,colorSchemeSelector:a,rootSelector:l,getCssVar:p,colorSchemes:E,font:{...Vv(I.typography),...I.font},spacing:cT(u.spacing)};Object.keys(A.colorSchemes).forEach(z=>{const m=A.colorSchemes[z].palette,P=L=>{const Y=L.split("-"),q=Y[1],re=Y[2];return p(L,m[q][re])};if(m.mode==="light"&&(O(m.common,"background","#fff"),O(m.common,"onBackground","#000")),m.mode==="dark"&&(O(m.common,"background","#000"),O(m.common,"onBackground","#fff")),lT(m,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),m.mode==="light"){O(m.Alert,"errorColor",fe(m.error.light,.6)),O(m.Alert,"infoColor",fe(m.info.light,.6)),O(m.Alert,"successColor",fe(m.success.light,.6)),O(m.Alert,"warningColor",fe(m.warning.light,.6)),O(m.Alert,"errorFilledBg",P("palette-error-main")),O(m.Alert,"infoFilledBg",P("palette-info-main")),O(m.Alert,"successFilledBg",P("palette-success-main")),O(m.Alert,"warningFilledBg",P("palette-warning-main")),O(m.Alert,"errorFilledColor",ot(()=>m.getContrastText(m.error.main))),O(m.Alert,"infoFilledColor",ot(()=>m.getContrastText(m.info.main))),O(m.Alert,"successFilledColor",ot(()=>m.getContrastText(m.success.main))),O(m.Alert,"warningFilledColor",ot(()=>m.getContrastText(m.warning.main))),O(m.Alert,"errorStandardBg",de(m.error.light,.9)),O(m.Alert,"infoStandardBg",de(m.info.light,.9)),O(m.Alert,"successStandardBg",de(m.success.light,.9)),O(m.Alert,"warningStandardBg",de(m.warning.light,.9)),O(m.Alert,"errorIconColor",P("palette-error-main")),O(m.Alert,"infoIconColor",P("palette-info-main")),O(m.Alert,"successIconColor",P("palette-success-main")),O(m.Alert,"warningIconColor",P("palette-warning-main")),O(m.AppBar,"defaultBg",P("palette-grey-100")),O(m.Avatar,"defaultBg",P("palette-grey-400")),O(m.Button,"inheritContainedBg",P("palette-grey-300")),O(m.Button,"inheritContainedHoverBg",P("palette-grey-A100")),O(m.Chip,"defaultBorder",P("palette-grey-400")),O(m.Chip,"defaultAvatarColor",P("palette-grey-700")),O(m.Chip,"defaultIconColor",P("palette-grey-700")),O(m.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),O(m.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),O(m.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),O(m.LinearProgress,"primaryBg",de(m.primary.main,.62)),O(m.LinearProgress,"secondaryBg",de(m.secondary.main,.62)),O(m.LinearProgress,"errorBg",de(m.error.main,.62)),O(m.LinearProgress,"infoBg",de(m.info.main,.62)),O(m.LinearProgress,"successBg",de(m.success.main,.62)),O(m.LinearProgress,"warningBg",de(m.warning.main,.62)),O(m.Skeleton,"bg",`rgba(${P("palette-text-primaryChannel")} / 0.11)`),O(m.Slider,"primaryTrack",de(m.primary.main,.62)),O(m.Slider,"secondaryTrack",de(m.secondary.main,.62)),O(m.Slider,"errorTrack",de(m.error.main,.62)),O(m.Slider,"infoTrack",de(m.info.main,.62)),O(m.Slider,"successTrack",de(m.success.main,.62)),O(m.Slider,"warningTrack",de(m.warning.main,.62));const L=Fr(m.background.default,.8);O(m.SnackbarContent,"bg",L),O(m.SnackbarContent,"color",ot(()=>m.getContrastText(L))),O(m.SpeedDialAction,"fabHoverBg",Fr(m.background.paper,.15)),O(m.StepConnector,"border",P("palette-grey-400")),O(m.StepContent,"border",P("palette-grey-400")),O(m.Switch,"defaultColor",P("palette-common-white")),O(m.Switch,"defaultDisabledColor",P("palette-grey-100")),O(m.Switch,"primaryDisabledColor",de(m.primary.main,.62)),O(m.Switch,"secondaryDisabledColor",de(m.secondary.main,.62)),O(m.Switch,"errorDisabledColor",de(m.error.main,.62)),O(m.Switch,"infoDisabledColor",de(m.info.main,.62)),O(m.Switch,"successDisabledColor",de(m.success.main,.62)),O(m.Switch,"warningDisabledColor",de(m.warning.main,.62)),O(m.TableCell,"border",de(Mr(m.divider,1),.88)),O(m.Tooltip,"bg",Mr(m.grey[700],.92))}if(m.mode==="dark"){O(m.Alert,"errorColor",de(m.error.light,.6)),O(m.Alert,"infoColor",de(m.info.light,.6)),O(m.Alert,"successColor",de(m.success.light,.6)),O(m.Alert,"warningColor",de(m.warning.light,.6)),O(m.Alert,"errorFilledBg",P("palette-error-dark")),O(m.Alert,"infoFilledBg",P("palette-info-dark")),O(m.Alert,"successFilledBg",P("palette-success-dark")),O(m.Alert,"warningFilledBg",P("palette-warning-dark")),O(m.Alert,"errorFilledColor",ot(()=>m.getContrastText(m.error.dark))),O(m.Alert,"infoFilledColor",ot(()=>m.getContrastText(m.info.dark))),O(m.Alert,"successFilledColor",ot(()=>m.getContrastText(m.success.dark))),O(m.Alert,"warningFilledColor",ot(()=>m.getContrastText(m.warning.dark))),O(m.Alert,"errorStandardBg",fe(m.error.light,.9)),O(m.Alert,"infoStandardBg",fe(m.info.light,.9)),O(m.Alert,"successStandardBg",fe(m.success.light,.9)),O(m.Alert,"warningStandardBg",fe(m.warning.light,.9)),O(m.Alert,"errorIconColor",P("palette-error-main")),O(m.Alert,"infoIconColor",P("palette-info-main")),O(m.Alert,"successIconColor",P("palette-success-main")),O(m.Alert,"warningIconColor",P("palette-warning-main")),O(m.AppBar,"defaultBg",P("palette-grey-900")),O(m.AppBar,"darkBg",P("palette-background-paper")),O(m.AppBar,"darkColor",P("palette-text-primary")),O(m.Avatar,"defaultBg",P("palette-grey-600")),O(m.Button,"inheritContainedBg",P("palette-grey-800")),O(m.Button,"inheritContainedHoverBg",P("palette-grey-700")),O(m.Chip,"defaultBorder",P("palette-grey-700")),O(m.Chip,"defaultAvatarColor",P("palette-grey-300")),O(m.Chip,"defaultIconColor",P("palette-grey-300")),O(m.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),O(m.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),O(m.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),O(m.LinearProgress,"primaryBg",fe(m.primary.main,.5)),O(m.LinearProgress,"secondaryBg",fe(m.secondary.main,.5)),O(m.LinearProgress,"errorBg",fe(m.error.main,.5)),O(m.LinearProgress,"infoBg",fe(m.info.main,.5)),O(m.LinearProgress,"successBg",fe(m.success.main,.5)),O(m.LinearProgress,"warningBg",fe(m.warning.main,.5)),O(m.Skeleton,"bg",`rgba(${P("palette-text-primaryChannel")} / 0.13)`),O(m.Slider,"primaryTrack",fe(m.primary.main,.5)),O(m.Slider,"secondaryTrack",fe(m.secondary.main,.5)),O(m.Slider,"errorTrack",fe(m.error.main,.5)),O(m.Slider,"infoTrack",fe(m.info.main,.5)),O(m.Slider,"successTrack",fe(m.success.main,.5)),O(m.Slider,"warningTrack",fe(m.warning.main,.5));const L=Fr(m.background.default,.98);O(m.SnackbarContent,"bg",L),O(m.SnackbarContent,"color",ot(()=>m.getContrastText(L))),O(m.SpeedDialAction,"fabHoverBg",Fr(m.background.paper,.15)),O(m.StepConnector,"border",P("palette-grey-600")),O(m.StepContent,"border",P("palette-grey-600")),O(m.Switch,"defaultColor",P("palette-grey-300")),O(m.Switch,"defaultDisabledColor",P("palette-grey-600")),O(m.Switch,"primaryDisabledColor",fe(m.primary.main,.55)),O(m.Switch,"secondaryDisabledColor",fe(m.secondary.main,.55)),O(m.Switch,"errorDisabledColor",fe(m.error.main,.55)),O(m.Switch,"infoDisabledColor",fe(m.info.main,.55)),O(m.Switch,"successDisabledColor",fe(m.success.main,.55)),O(m.Switch,"warningDisabledColor",fe(m.warning.main,.55)),O(m.TableCell,"border",fe(Mr(m.divider,1),.68)),O(m.Tooltip,"bg",Mr(m.grey[700],.92))}gt(m.background,"default"),gt(m.background,"paper"),gt(m.common,"background"),gt(m.common,"onBackground"),gt(m,"divider"),Object.keys(m).forEach(L=>{const Y=m[L];L!=="tonalOffset"&&Y&&typeof Y=="object"&&(Y.main&&O(m[L],"mainChannel",In(Mn(Y.main))),Y.light&&O(m[L],"lightChannel",In(Mn(Y.light))),Y.dark&&O(m[L],"darkChannel",In(Mn(Y.dark))),Y.contrastText&&O(m[L],"contrastTextChannel",In(Mn(Y.contrastText))),L==="text"&&(gt(m[L],"primary"),gt(m[L],"secondary")),L==="action"&&(Y.active&&gt(m[L],"active"),Y.selected&&gt(m[L],"selected")))})}),A=t.reduce((z,m)=>We(z,m),A);const _={prefix:i,disableCssColorScheme:o,shouldSkipGeneratingVar:s,getSelector:aT(A)},{vars:x,generateThemeVars:k,generateStyleSheets:G}=kv(A,_);return A.vars=x,Object.entries(A.colorSchemes[A.defaultColorScheme]).forEach(([z,m])=>{A[z]=m}),A.generateThemeVars=k,A.generateStyleSheets=G,A.generateSpacing=function(){return $c(u.spacing,xi(this))},A.getColorSchemeSelector=Mv(a),A.spacing=A.generateSpacing(),A.shouldSkipGeneratingVar=s,A.unstable_sxConfig={...Ir,...u==null?void 0:u.unstable_sxConfig},A.unstable_sx=function(m){return Kt({sx:m,theme:this})},A.toRuntimeSource=qc,A}function Xc(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:ji({...n===!0?{}:n.palette,mode:t})})}function dT(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:o=n?void 0:{light:!0},defaultColorScheme:i=n==null?void 0:n.mode,...s}=e,a=i||"light",l=o==null?void 0:o[a],u={...o,...n?{[a]:{...typeof l!="boolean"&&l,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return zi(e,...t);let d=n;"palette"in e||u[a]&&(u[a]!==!0?d=u[a].palette:a==="dark"&&(d={mode:"dark"}));const f=zi({...e,palette:d},...t);return f.defaultColorScheme=a,f.colorSchemes=u,f.palette.mode==="light"&&(f.colorSchemes.light={...u.light!==!0&&u.light,palette:f.palette},Xc(f,"dark",u.dark)),f.palette.mode==="dark"&&(f.colorSchemes.dark={...u.dark!==!0&&u.dark,palette:f.palette},Xc(f,"light",u.light)),f}return!n&&!("light"in u)&&a==="light"&&(u.light=!0),fT({...s,colorSchemes:u,defaultColorScheme:a,...typeof r!="boolean"&&r},...t)}const pT=dT(),hT="$$material";function gT(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const mT=mv({themeId:hT,defaultTheme:pT,rootShouldForwardProp:e=>gT(e)&&e!=="classes"}),yT=Ov;process.env.NODE_ENV!=="production"&&(ne.node,ne.object.isRequired);function bT(e){return xv(e)}function vT(e){return Ai("MuiSvgIcon",e)}J0("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const TT=e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root",t!=="inherit"&&`color${Dt(t)}`,`fontSize${Dt(n)}`]};return H0(o,vT,r)},ST=mT("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Dt(n.color)}`],t[`fontSize${Dt(n.fontSize)}`]]}})(yT(({theme:e})=>{var t,n,r,o,i,s,a,l,u,d,f,p,y,b;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(o=(t=e.transitions)==null?void 0:t.create)==null?void 0:o.call(t,"fill",{duration:(r=(n=(e.vars??e).transitions)==null?void 0:n.duration)==null?void 0:r.shorter}),variants:[{props:g=>!g.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((s=(i=e.typography)==null?void 0:i.pxToRem)==null?void 0:s.call(i,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((l=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:l.call(a,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((d=(u=e.typography)==null?void 0:u.pxToRem)==null?void 0:d.call(u,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,g])=>g&&g.main).map(([g])=>{var w,E;return{props:{color:g},style:{color:(E=(w=(e.vars??e).palette)==null?void 0:w[g])==null?void 0:E.main}}}),{props:{color:"action"},style:{color:(p=(f=(e.vars??e).palette)==null?void 0:f.action)==null?void 0:p.active}},{props:{color:"disabled"},style:{color:(b=(y=(e.vars??e).palette)==null?void 0:y.action)==null?void 0:b.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),Dr=Fe.forwardRef(function(t,n){const r=bT({props:t,name:"MuiSvgIcon"}),{children:o,className:i,color:s="inherit",component:a="svg",fontSize:l="medium",htmlColor:u,inheritViewBox:d=!1,titleAccess:f,viewBox:p="0 0 24 24",...y}=r,b=Fe.isValidElement(o)&&o.type==="svg",g={...r,color:s,component:a,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:p,hasSvgAsChild:b},w={};d||(w.viewBox=p);const E=TT(g);return c.jsxs(ST,{as:a,className:xt(E.root,i),focusable:"false",color:u,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:n,...w,...y,...b&&o.props,ownerState:g,children:[b?o.props.children:o,f?c.jsx("title",{children:f}):null]})});process.env.NODE_ENV!=="production"&&(Dr.propTypes={children:ne.node,classes:ne.object,className:ne.string,color:ne.oneOfType([ne.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),ne.string]),component:ne.elementType,fontSize:ne.oneOfType([ne.oneOf(["inherit","large","medium","small"]),ne.string]),htmlColor:ne.string,inheritViewBox:ne.bool,shapeRendering:ne.string,sx:ne.oneOfType([ne.arrayOf(ne.oneOfType([ne.func,ne.object,ne.bool])),ne.func,ne.object]),titleAccess:ne.string,viewBox:ne.string}),Dr.muiName="SvgIcon";function Ui(e,t){function n(r,o){return c.jsx(Dr,{"data-testid":`${t}Icon`,ref:o,...r,children:e})}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=Dr.muiName,Fe.memo(Fe.forwardRef(n))}const wT=Ui(c.jsx("path",{d:"m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z"}),"ArrowDownward"),_T=Ui(c.jsx("path",{d:"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8z"}),"ArrowUpward"),CT=Ui(c.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete");function ET(){this.__data__=[],this.size=0}var AT=ET;function xT(e,t){return e===t||e!==e&&t!==t}var Nr=xT,OT=Nr;function PT(e,t){for(var n=e.length;n--;)if(OT(e[n][0],t))return n;return-1}var Lr=PT,IT=Lr,$T=Array.prototype,kT=$T.splice;function MT(e){var t=this.__data__,n=IT(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():kT.call(t,n,1),--this.size,!0}var FT=MT,DT=Lr;function NT(e){var t=this.__data__,n=DT(t,e);return n<0?void 0:t[n][1]}var LT=NT,jT=Lr;function zT(e){return jT(this.__data__,e)>-1}var BT=zT,UT=Lr;function VT(e,t){var n=this.__data__,r=UT(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var WT=VT,GT=AT,HT=FT,YT=LT,qT=BT,JT=WT;function tn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}tn.prototype.clear=GT,tn.prototype.delete=HT,tn.prototype.get=YT,tn.prototype.has=qT,tn.prototype.set=JT;var jr=tn,KT=jr;function XT(){this.__data__=new KT,this.size=0}var ZT=XT;function QT(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var RT=QT;function e1(e){return this.__data__.get(e)}var t1=e1;function n1(e){return this.__data__.has(e)}var r1=n1,o1=Mt,i1=o1(Object,"create"),zr=i1,Zc=zr;function s1(){this.__data__=Zc?Zc(null):{},this.size=0}var a1=s1;function l1(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var c1=l1,u1=zr,f1="__lodash_hash_undefined__",d1=Object.prototype,p1=d1.hasOwnProperty;function h1(e){var t=this.__data__;if(u1){var n=t[e];return n===f1?void 0:n}return p1.call(t,e)?t[e]:void 0}var g1=h1,m1=zr,y1=Object.prototype,b1=y1.hasOwnProperty;function v1(e){var t=this.__data__;return m1?t[e]!==void 0:b1.call(t,e)}var T1=v1,S1=zr,w1="__lodash_hash_undefined__";function _1(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=S1&&t===void 0?w1:t,this}var C1=_1,E1=a1,A1=c1,x1=g1,O1=T1,P1=C1;function nn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}nn.prototype.clear=E1,nn.prototype.delete=A1,nn.prototype.get=x1,nn.prototype.has=O1,nn.prototype.set=P1;var I1=nn,Qc=I1,$1=jr,k1=ei;function M1(){this.size=0,this.__data__={hash:new Qc,map:new(k1||$1),string:new Qc}}var F1=M1;function D1(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var N1=D1,L1=N1;function j1(e,t){var n=e.__data__;return L1(t)?n[typeof t=="string"?"string":"hash"]:n.map}var Br=j1,z1=Br;function B1(e){var t=z1(this,e).delete(e);return this.size-=t?1:0,t}var U1=B1,V1=Br;function W1(e){return V1(this,e).get(e)}var G1=W1,H1=Br;function Y1(e){return H1(this,e).has(e)}var q1=Y1,J1=Br;function K1(e,t){var n=J1(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var X1=K1,Z1=F1,Q1=U1,R1=G1,eS=q1,tS=X1;function rn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}rn.prototype.clear=Z1,rn.prototype.delete=Q1,rn.prototype.get=R1,rn.prototype.has=eS,rn.prototype.set=tS;var Rc=rn,nS=jr,rS=ei,oS=Rc,iS=200;function sS(e,t){var n=this.__data__;if(n instanceof nS){var r=n.__data__;if(!rS||r.length<iS-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new oS(r)}return n.set(e,t),this.size=n.size,this}var aS=sS,lS=jr,cS=ZT,uS=RT,fS=t1,dS=r1,pS=aS;function on(e){var t=this.__data__=new lS(e);this.size=t.size}on.prototype.clear=cS,on.prototype.delete=uS,on.prototype.get=fS,on.prototype.has=dS,on.prototype.set=pS;var hS=on,gS=Mt,mS=function(){try{var e=gS(Object,"defineProperty");return e({},"",{}),e}catch{}}(),eu=mS,tu=eu;function yS(e,t,n){t=="__proto__"&&tu?tu(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Vi=yS,bS=Vi,vS=Nr;function TS(e,t,n){(n!==void 0&&!vS(e[t],n)||n===void 0&&!(t in e))&&bS(e,t,n)}var nu=TS;function SS(e){return function(t,n,r){for(var o=-1,i=Object(t),s=r(t),a=s.length;a--;){var l=s[e?a:++o];if(n(i[l],l,i)===!1)break}return t}}var wS=SS,_S=wS,CS=_S(),ES=CS,Ur={exports:{}};Ur.exports,function(e,t){var n=Xe,r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===r,s=i?n.Buffer:void 0,a=s?s.allocUnsafe:void 0;function l(u,d){if(d)return u.slice();var f=u.length,p=a?a(f):new u.constructor(f);return u.copy(p),p}e.exports=l}(Ur,Ur.exports);var AS=Ur.exports,xS=Xe,OS=xS.Uint8Array,PS=OS,ru=PS;function IS(e){var t=new e.constructor(e.byteLength);return new ru(t).set(new ru(e)),t}var $S=IS,kS=$S;function MS(e,t){var n=t?kS(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var FS=MS;function DS(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var NS=DS,LS=dt,ou=Object.create,jS=function(){function e(){}return function(t){if(!LS(t))return{};if(ou)return ou(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),zS=jS,BS=hl,US=BS(Object.getPrototypeOf,Object),iu=US,VS=zS,WS=iu,GS=ur;function HS(e){return typeof e.constructor=="function"&&!GS(e)?VS(WS(e)):{}}var YS=HS,qS=dr,JS=Yt;function KS(e){return JS(e)&&qS(e)}var su=KS,XS=Ht,ZS=iu,QS=Yt,RS="[object Object]",ew=Function.prototype,tw=Object.prototype,au=ew.toString,nw=tw.hasOwnProperty,rw=au.call(Object);function ow(e){if(!QS(e)||XS(e)!=RS)return!1;var t=ZS(e);if(t===null)return!0;var n=nw.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&au.call(n)==rw}var iw=ow;function sw(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var lu=sw,aw=Vi,lw=Nr,cw=Object.prototype,uw=cw.hasOwnProperty;function fw(e,t,n){var r=e[t];(!(uw.call(e,t)&&lw(r,n))||n===void 0&&!(t in e))&&aw(e,t,n)}var dw=fw,pw=dw,hw=Vi;function gw(e,t,n,r){var o=!n;n||(n={});for(var i=-1,s=t.length;++i<s;){var a=t[i],l=r?r(n[a],e[a],a,n,e):void 0;l===void 0&&(l=e[a]),o?hw(n,a,l):pw(n,a,l)}return n}var mw=gw;function yw(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var bw=yw,vw=9007199254740991,Tw=/^(?:0|[1-9]\d*)$/;function Sw(e,t){var n=typeof e;return t=t??vw,!!t&&(n=="number"||n!="symbol"&&Tw.test(e))&&e>-1&&e%1==0&&e<t}var cu=Sw,ww=bw,_w=fr,Cw=Cn,Ew=si,Aw=cu,xw=ai,Ow=Object.prototype,Pw=Ow.hasOwnProperty;function Iw(e,t){var n=Cw(e),r=!n&&_w(e),o=!n&&!r&&Ew(e),i=!n&&!r&&!o&&xw(e),s=n||r||o||i,a=s?ww(e.length,String):[],l=a.length;for(var u in e)(t||Pw.call(e,u))&&!(s&&(u=="length"||o&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Aw(u,l)))&&a.push(u);return a}var $w=Iw;function kw(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var Mw=kw,Fw=dt,Dw=ur,Nw=Mw,Lw=Object.prototype,jw=Lw.hasOwnProperty;function zw(e){if(!Fw(e))return Nw(e);var t=Dw(e),n=[];for(var r in e)r=="constructor"&&(t||!jw.call(e,r))||n.push(r);return n}var Bw=zw,Uw=$w,Vw=Bw,Ww=dr;function Gw(e){return Ww(e)?Uw(e,!0):Vw(e)}var uu=Gw,Hw=mw,Yw=uu;function qw(e){return Hw(e,Yw(e))}var Jw=qw,fu=nu,Kw=AS,Xw=FS,Zw=NS,Qw=YS,du=fr,pu=Cn,Rw=su,e_=si,t_=Qo,n_=dt,r_=iw,o_=ai,hu=lu,i_=Jw;function s_(e,t,n,r,o,i,s){var a=hu(e,n),l=hu(t,n),u=s.get(l);if(u){fu(e,n,u);return}var d=i?i(a,l,n+"",e,t,s):void 0,f=d===void 0;if(f){var p=pu(l),y=!p&&e_(l),b=!p&&!y&&o_(l);d=l,p||y||b?pu(a)?d=a:Rw(a)?d=Zw(a):y?(f=!1,d=Kw(l,!0)):b?(f=!1,d=Xw(l,!0)):d=[]:r_(l)||du(l)?(d=a,du(a)?d=i_(a):(!n_(a)||t_(a))&&(d=Qw(l))):f=!1}f&&(s.set(l,d),o(d,l,r,i,s),s.delete(l)),fu(e,n,d)}var a_=s_,l_=hS,c_=nu,u_=ES,f_=a_,d_=dt,p_=uu,h_=lu;function gu(e,t,n,r,o){e!==t&&u_(t,function(i,s){if(o||(o=new l_),d_(i))f_(e,t,s,n,gu,r,o);else{var a=r?r(h_(e,s),i,s+"",e,t,o):void 0;a===void 0&&(a=i),c_(e,s,a)}},p_)}var g_=gu;function m_(e){return e}var mu=m_;function y_(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var b_=y_,v_=b_,yu=Math.max;function T_(e,t,n){return t=yu(t===void 0?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=yu(r.length-t,0),s=Array(i);++o<i;)s[o]=r[t+o];o=-1;for(var a=Array(t+1);++o<t;)a[o]=r[o];return a[t]=n(s),v_(e,this,a)}}var S_=T_;function w_(e){return function(){return e}}var __=w_,C_=__,bu=eu,E_=mu,A_=bu?function(e,t){return bu(e,"toString",{configurable:!0,enumerable:!1,value:C_(t),writable:!0})}:E_,x_=A_,O_=800,P_=16,I_=Date.now;function $_(e){var t=0,n=0;return function(){var r=I_(),o=P_-(r-n);if(n=r,o>0){if(++t>=O_)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var k_=$_,M_=x_,F_=k_,D_=F_(M_),N_=D_,L_=mu,j_=S_,z_=N_;function B_(e,t){return z_(j_(e,t,L_),e+"")}var vu=B_,U_=Nr,V_=dr,W_=cu,G_=dt;function H_(e,t,n){if(!G_(n))return!1;var r=typeof t;return(r=="number"?V_(n)&&W_(t,n.length):r=="string"&&t in n)?U_(n[t],e):!1}var Tu=H_,Y_=vu,q_=Tu;function J_(e){return Y_(function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(i=e.length>3&&typeof i=="function"?(o--,i):void 0,s&&q_(n[0],n[1],s)&&(i=o<3?void 0:i,o=1),t=Object(t);++r<o;){var a=n[r];a&&e(t,a,r,i)}return t})}var K_=J_,X_=g_,Z_=K_,Q_=Z_(function(e,t,n){X_(e,t,n)}),R_=Q_;const eC=St(R_);var tC=Math.ceil,nC=Math.max;function rC(e,t,n,r){for(var o=-1,i=nC(tC((t-e)/(n||1)),0),s=Array(i);i--;)s[r?i:++o]=e,e+=n;return s}var oC=rC,iC=dl,sC=1/0,aC=17976931348623157e292;function lC(e){if(!e)return e===0?e:0;if(e=iC(e),e===sC||e===-1/0){var t=e<0?-1:1;return t*aC}return e===e?e:0}var cC=lC,uC=oC,fC=Tu,Wi=cC;function dC(e){return function(t,n,r){return r&&typeof r!="number"&&fC(t,n,r)&&(n=r=void 0),t=Wi(t),n===void 0?(n=t,t=0):n=Wi(n),r=r===void 0?t<n?1:-1:Wi(r),uC(t,n,r,e)}}var pC=dC,hC=pC,gC=hC(),mC=gC;const yC=St(mC);function bC(e,t,n,r){var o=-1,i=e==null?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}var vC=bC;function TC(e){return function(t){return e==null?void 0:e[t]}}var SC=TC,wC=SC,_C={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},CC=wC(_C),EC=CC;function AC(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var xC=AC,Su=cr,OC=xC,PC=Cn,IC=cl,wu=Su?Su.prototype:void 0,_u=wu?wu.toString:void 0;function Cu(e){if(typeof e=="string")return e;if(PC(e))return OC(e,Cu)+"";if(IC(e))return _u?_u.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var $C=Cu,kC=$C;function MC(e){return e==null?"":kC(e)}var Gi=MC,FC=EC,DC=Gi,NC=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,LC="\\u0300-\\u036f",jC="\\ufe20-\\ufe2f",zC="\\u20d0-\\u20ff",BC=LC+jC+zC,UC="["+BC+"]",VC=RegExp(UC,"g");function WC(e){return e=DC(e),e&&e.replace(NC,FC).replace(VC,"")}var GC=WC,HC=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function YC(e){return e.match(HC)||[]}var qC=YC,JC=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function KC(e){return JC.test(e)}var XC=KC,Eu="\\ud800-\\udfff",ZC="\\u0300-\\u036f",QC="\\ufe20-\\ufe2f",RC="\\u20d0-\\u20ff",eE=ZC+QC+RC,Au="\\u2700-\\u27bf",xu="a-z\\xdf-\\xf6\\xf8-\\xff",tE="\\xac\\xb1\\xd7\\xf7",nE="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",rE="\\u2000-\\u206f",oE=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ou="A-Z\\xc0-\\xd6\\xd8-\\xde",iE="\\ufe0e\\ufe0f",Pu=tE+nE+rE+oE,Iu="['’]",$u="["+Pu+"]",sE="["+eE+"]",ku="\\d+",aE="["+Au+"]",Mu="["+xu+"]",Fu="[^"+Eu+Pu+ku+Au+xu+Ou+"]",lE="\\ud83c[\\udffb-\\udfff]",cE="(?:"+sE+"|"+lE+")",uE="[^"+Eu+"]",Du="(?:\\ud83c[\\udde6-\\uddff]){2}",Nu="[\\ud800-\\udbff][\\udc00-\\udfff]",sn="["+Ou+"]",fE="\\u200d",Lu="(?:"+Mu+"|"+Fu+")",dE="(?:"+sn+"|"+Fu+")",ju="(?:"+Iu+"(?:d|ll|m|re|s|t|ve))?",zu="(?:"+Iu+"(?:D|LL|M|RE|S|T|VE))?",Bu=cE+"?",Uu="["+iE+"]?",pE="(?:"+fE+"(?:"+[uE,Du,Nu].join("|")+")"+Uu+Bu+")*",hE="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",gE="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",mE=Uu+Bu+pE,yE="(?:"+[aE,Du,Nu].join("|")+")"+mE,bE=RegExp([sn+"?"+Mu+"+"+ju+"(?="+[$u,sn,"$"].join("|")+")",dE+"+"+zu+"(?="+[$u,sn+Lu,"$"].join("|")+")",sn+"?"+Lu+"+"+ju,sn+"+"+zu,gE,hE,ku,yE].join("|"),"g");function vE(e){return e.match(bE)||[]}var TE=vE,SE=qC,wE=XC,_E=Gi,CE=TE;function EE(e,t,n){return e=_E(e),t=n?void 0:t,t===void 0?wE(e)?CE(e):SE(e):e.match(t)||[]}var AE=EE,xE=vC,OE=GC,PE=AE,IE="['’]",$E=RegExp(IE,"g");function kE(e){return function(t){return xE(PE(OE(t).replace($E,"")),e,"")}}var ME=kE;function FE(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i}var DE=FE,NE=DE;function LE(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:NE(e,t,n)}var jE=LE,zE="\\ud800-\\udfff",BE="\\u0300-\\u036f",UE="\\ufe20-\\ufe2f",VE="\\u20d0-\\u20ff",WE=BE+UE+VE,GE="\\ufe0e\\ufe0f",HE="\\u200d",YE=RegExp("["+HE+zE+WE+GE+"]");function qE(e){return YE.test(e)}var Vu=qE;function JE(e){return e.split("")}var KE=JE,Wu="\\ud800-\\udfff",XE="\\u0300-\\u036f",ZE="\\ufe20-\\ufe2f",QE="\\u20d0-\\u20ff",RE=XE+ZE+QE,eA="\\ufe0e\\ufe0f",tA="["+Wu+"]",Hi="["+RE+"]",Yi="\\ud83c[\\udffb-\\udfff]",nA="(?:"+Hi+"|"+Yi+")",Gu="[^"+Wu+"]",Hu="(?:\\ud83c[\\udde6-\\uddff]){2}",Yu="[\\ud800-\\udbff][\\udc00-\\udfff]",rA="\\u200d",qu=nA+"?",Ju="["+eA+"]?",oA="(?:"+rA+"(?:"+[Gu,Hu,Yu].join("|")+")"+Ju+qu+")*",iA=Ju+qu+oA,sA="(?:"+[Gu+Hi+"?",Hi,Hu,Yu,tA].join("|")+")",aA=RegExp(Yi+"(?="+Yi+")|"+sA+iA,"g");function lA(e){return e.match(aA)||[]}var cA=lA,uA=KE,fA=Vu,dA=cA;function pA(e){return fA(e)?dA(e):uA(e)}var hA=pA,gA=jE,mA=Vu,yA=hA,bA=Gi;function vA(e){return function(t){t=bA(t);var n=mA(t)?yA(t):void 0,r=n?n[0]:t.charAt(0),o=n?gA(n,1).join(""):t.slice(1);return r[e]()+o}}var TA=vA,SA=TA,wA=SA("toUpperCase"),_A=wA,CA=ME,EA=_A,AA=CA(function(e,t,n){return e+(n?" ":"")+EA(t)}),xA=AA;const OA=St(xA);function PA(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var IA=PA,Ku=cr,$A=fr,kA=Cn,Xu=Ku?Ku.isConcatSpreadable:void 0;function MA(e){return kA(e)||$A(e)||!!(Xu&&e&&e[Xu])}var FA=MA,DA=IA,NA=FA;function Zu(e,t,n,r,o){var i=-1,s=e.length;for(n||(n=NA),o||(o=[]);++i<s;){var a=e[i];t>0&&n(a)?t>1?Zu(a,t-1,n,r,o):DA(o,a):r||(o[o.length]=a)}return o}var LA=Zu,jA="__lodash_hash_undefined__";function zA(e){return this.__data__.set(e,jA),this}var BA=zA;function UA(e){return this.__data__.has(e)}var VA=UA,WA=Rc,GA=BA,HA=VA;function Vr(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new WA;++t<n;)this.add(e[t])}Vr.prototype.add=Vr.prototype.push=GA,Vr.prototype.has=HA;var YA=Vr;function qA(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}var JA=qA;function KA(e){return e!==e}var XA=KA;function ZA(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}var QA=ZA,RA=JA,ex=XA,tx=QA;function nx(e,t,n){return t===t?tx(e,t,n):RA(e,ex,n)}var rx=nx,ox=rx;function ix(e,t){var n=e==null?0:e.length;return!!n&&ox(e,t,0)>-1}var sx=ix;function ax(e,t,n){for(var r=-1,o=e==null?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}var lx=ax;function cx(e,t){return e.has(t)}var ux=cx;function fx(){}var dx=fx;function px(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var Qu=px,qi=yl,hx=dx,gx=Qu,mx=1/0,yx=qi&&1/gx(new qi([,-0]))[1]==mx?function(e){return new qi(e)}:hx,bx=yx,vx=YA,Tx=sx,Sx=lx,wx=ux,_x=bx,Cx=Qu,Ex=200;function Ax(e,t,n){var r=-1,o=Tx,i=e.length,s=!0,a=[],l=a;if(n)s=!1,o=Sx;else if(i>=Ex){var u=t?null:_x(e);if(u)return Cx(u);s=!1,o=wx,l=new vx}else l=t?[]:a;e:for(;++r<i;){var d=e[r],f=t?t(d):d;if(d=n||d!==0?d:0,s&&f===f){for(var p=l.length;p--;)if(l[p]===f)continue e;t&&l.push(f),a.push(d)}else o(l,f,n)||(l!==a&&l.push(f),a.push(d))}return a}var xx=Ax,Ox=LA,Px=vu,Ix=xx,$x=su,kx=Px(function(e){return Ix(Ox(e,1,$x,!0))}),Mx=kx;const Fx=St(Mx),an=({children:e,...t})=>c.jsx(h.Table.Td,{...t,children:e}),Ru=({errorMessages:e,id:t})=>c.jsx(h.Tooltip,{id:t,title:e,children:c.jsx(h.Indicator,{label:e.split(`
179
- `).length,children:c.jsx(eh,{})})}),Dx={paddingLeft:0,paddingRight:0},ef=v.memo(function({numColumns:t,errors:n,label:r,description:o,path:i,addItem:s,schema:a,enabled:l,translations:u,rootSchema:d}){const f={bg:"transparent",size:"sm",c:"gray"},p=h.useProps("ActionIcon",f,{});return c.jsxs(h.Table.Tr,{children:[c.jsx(an,{colSpan:t,children:c.jsxs(h.Stack,{children:[c.jsxs(h.Grid,{justify:"flex-start",align:"center",gutter:"sm",children:[c.jsx(h.Grid.Col,{span:"content",children:c.jsx(h.Text,{children:r})}),c.jsx(h.Grid.Col,{span:"content",children:n.length!==0?c.jsx(h.Grid.Col,{span:"content",children:c.jsx(Ru,{id:"tooltip-validation",errorMessages:n})}):null})]}),o&&c.jsx(h.Text,{size:"sm",children:o})]})}),l?c.jsx(an,{align:"right",style:Dx,children:c.jsx(h.Tooltip,{id:"tooltip-add",title:u.addTooltip,position:"bottom",children:c.jsx(h.ActionIcon,{bg:p.bg,size:p.size,c:p.c,onClick:s(i,V.createDefaultValue(a,d)),children:c.jsx(jo,{})})})}):null]})}),tf={fixedCell:{width:"150px",height:"50px",paddingLeft:0,paddingRight:0,textAlign:"center"},fixedCellSmall:{width:"50px",height:"50px",paddingLeft:0,paddingRight:0,textAlign:"center"}},nf=(e,t,n,r,o)=>{if(t.type==="object")return rf(t).map(i=>{var l,u;const s=V.Paths.compose(n,i),a={propName:i,schema:t,title:((u=(l=t.properties)==null?void 0:l[i])==null?void 0:u.title)??OA(i),rowPath:n,cellPath:s,enabled:r,cells:o};return c.jsx(e,{...a},s)});{const i={schema:t,rowPath:n,cellPath:n,enabled:r};return c.jsx(e,{...i},n)}},rf=e=>e.type==="object"&&typeof e.properties=="object"?Object.keys(e.properties).filter(t=>e.properties[t].type!=="array"):[""],Nx=({numColumns:e,translations:t})=>c.jsx(h.Table.Tr,{children:c.jsx(an,{colSpan:e,children:c.jsx(h.Text,{align:"center",children:t.noDataMessage})})}),Lx=v.memo(function({title:t}){return c.jsx(h.Table.Th,{children:t})}),jx=(e,t)=>{const n=t.rowPath+(t.schema.type==="object"?"."+t.propName:""),r=V.formatErrorMessage(Fx(V.errorsAt(n,t.schema,o=>o===n)(e.core.errors).map(o=>o.message)));return{rowPath:t.rowPath,propName:t.propName,schema:t.schema,rootSchema:e.core.schema,errors:r,path:n,enabled:t.enabled,cells:t.cells||e.cells,renderers:t.renderers||e.renderers}},of=e=>({type:"Control",scope:e,label:!1}),zx=v.memo(function({path:t,propName:n,schema:r,rootSchema:o,errors:i,enabled:s,renderers:a,cells:l,isValid:u}){return c.jsxs(an,{children:[r.properties?c.jsx(te.DispatchCell,{schema:V.Resolve.schema(r,`#/properties/${V.encode(n)}`,o),uischema:of(`#/properties/${V.encode(n)}`),path:t,enabled:s,renderers:a,cells:l}):c.jsx(te.DispatchCell,{schema:r,uischema:of("#"),path:t,enabled:s,renderers:a,cells:l}),c.jsx(h.Text,{size:"xs",children:u?"":i})]})}),Bx=e=>{const t=te.useJsonForms(),n=jx(t,e),r=Pl(n.errors);return c.jsx(zx,{...n,isValid:r})},Ux=({childPath:e,schema:t,rowIndex:n,openDeleteDialog:r,moveUpCreator:o,moveDownCreator:i,enableUp:s,enableDown:a,showSortButtons:l,enabled:u,cells:d,path:f,translations:p})=>{const y={bg:"transparent",size:"sm",c:"gray"},b=h.useProps("ActionIcon",y,{}),g=v.useMemo(()=>o(f,n),[o,f,n]),w=v.useMemo(()=>i(f,n),[i,f,n]);return c.jsxs(h.Table.Tr,{children:[nf(Bx,t,e,u,d),u?c.jsx(an,{style:l?tf.fixedCell:tf.fixedCellSmall,children:c.jsxs(h.Grid,{justify:"flex-end",align:"center",children:[l?c.jsxs(v.Fragment,{children:[c.jsx(h.Grid.Col,{span:"content",children:c.jsx(h.Tooltip,{id:"tooltip-up",title:p.up,position:"bottom",opened:s?void 0:!1,children:c.jsx(h.ActionIcon,{bg:b.bg,size:b.size,c:b.c,"aria-label":p.upAriaLabel,onClick:g,disabled:!s,children:c.jsx(_T,{})})})}),c.jsx(h.Grid.Col,{span:"content",children:c.jsx(h.Tooltip,{id:"tooltip-down",title:p.down,position:"bottom",opened:a?void 0:!1,children:c.jsx(h.ActionIcon,{bg:b.bg,size:b.size,c:b.c,"aria-label":p.downAriaLabel,onClick:w,disabled:!a,children:c.jsx(wT,{})})})})]}):null,c.jsx(h.Grid.Col,{span:"content",children:c.jsx(h.Tooltip,{id:"tooltip-remove",title:p.removeTooltip,position:"bottom",children:c.jsx(h.ActionIcon,{bg:b.bg,size:b.size,c:b.c,"aria-label":p.removeAriaLabel,onClick:()=>r(e,n),children:c.jsx(CT,{})})})})]})}):null]},e)},sf=v.memo(Ux),Vx=({data:e,path:t,schema:n,openDeleteDialog:r,moveUp:o,moveDown:i,uischema:s,config:a,enabled:l,cells:u,translations:d})=>{if(e===0)return c.jsx(Nx,{numColumns:rf(n).length+1,translations:d});const p=eC({},a,s.options);return c.jsx(v.Fragment,{children:yC(e).map(y=>{const b=V.Paths.compose(t,`${y}`);return c.jsx(sf,{childPath:b,rowIndex:y,schema:n,openDeleteDialog:r,moveUpCreator:o,moveDownCreator:i,enableUp:y!==0,enableDown:y!==e-1,showSortButtons:p.showSortButtons||p.showArrayTableSortButtons,enabled:l,cells:u,path:t,translations:d},b)})})};class af extends v.Component{constructor(){super(...arguments);tp(this,"addItem",(n,r)=>this.props.addItem(n,r))}render(){const{label:n,description:r,path:o,schema:i,rootSchema:s,uischema:a,errors:l,openDeleteDialog:u,visible:d,enabled:f,cells:p,translations:y}=this.props,b=a,g=i.type==="object",w=g?nf(Lx,i,o,f,p):void 0;return d?c.jsxs(h.Table,{children:[c.jsxs(h.Table.Thead,{children:[c.jsx(ef,{errors:l,label:n,description:r,addItem:this.addItem,numColumns:g?w.length:1,path:o,uischema:b,schema:i,rootSchema:s,enabled:f,translations:y}),g&&c.jsxs(h.Table.Tr,{children:[w,f?c.jsx(h.Table.Th,{}):null]})]}),c.jsx(h.Table.Tbody,{children:c.jsx(Vx,{openDeleteDialog:u,translations:y,...this.props})})]}):null}}const Wx=e=>{const[t,n]=v.useState(!1),[r,o]=v.useState(void 0),[i,s]=v.useState(void 0),{removeItems:a,visible:l}=e,u=v.useCallback((y,b)=>{n(!0),o(y),s(b)},[n,o,s]),d=v.useCallback(()=>n(!1),[n]),f=v.useCallback(()=>{const y=r.substring(0,r.lastIndexOf("."));a(y,[i])(),n(!1)},[n,r,i]),p=v.useCallback(()=>n(!1),[n]);return l?c.jsxs(c.Fragment,{children:[c.jsx(af,{...e,openDeleteDialog:u}),c.jsx(Rl,{open:t,onCancel:d,onConfirm:f,onClose:p,acceptText:e.translations.deleteDialogAccept,declineText:e.translations.deleteDialogDecline,title:e.translations.deleteDialogTitle,message:e.translations.deleteDialogMessage})]}):null},lf=V.rankWith(1,V.or(V.isObjectArrayControl,V.isPrimitiveArrayControl)),cf=te.withJsonFormsArrayLayoutProps(Wx),Gx=e=>e.oneOf!==void 0&&e.oneOf.length>0&&e.oneOf.every(t=>t.const!==void 0),Hx=e=>e.type==="string"&&e.enum!==void 0;function uf(e,t){if(!e.scope||e.type!=="Control")return!1;const n=V.resolveSchema(t,e.scope);return!!(tt(n.type,"array")&&!Array.isArray(n.items)&&n.uniqueItems===!0&&(Gx(n.items)||Hx(n.items)))}function ff(e,t){if(!e.scope||e.type!=="Control")return!1;const n=V.resolveSchema(t,e.scope);return!!(tt(n.type,"object")&&n.format==="json")}function df(e,t){if(!e.scope||e.type!=="Control")return!1;const n=V.resolveSchema(t,e.scope);return!!(tt(n.type,"array")&&n.format==="relation")}function pf(e,t){if(!e.scope||e.type!=="Control")return!1;const n=V.resolveSchema(t,e.scope);return!!(tt(n.type,"string")&&n.format==="relation")}const hf=V.rankWith(1,uf),gf=te.withJsonFormsMultiEnumProps(e=>c.jsx(pi,{...e})),mf=V.rankWith(2,df),yf=te.withJsonFormsEnumProps(te.withTranslateProps(e=>c.jsx(pi,{...e})),!1),bf=V.rankWith(1,V.isBooleanControl),vf=te.withJsonFormsControlProps(e=>c.jsx(ui,{...e})),Tf=V.rankWith(1,V.isDateControl),Sf=te.withJsonFormsControlProps(e=>c.jsx(fi,{...e})),wf=V.rankWith(1,V.isDateTimeControl),_f=te.withJsonFormsControlProps(e=>c.jsx(di,{...e})),Cf=V.rankWith(2,V.isEnumControl),Ef=te.withJsonFormsEnumProps(te.withTranslateProps(e=>c.jsx(yr,{...e})),!1),Af=V.rankWith(1,V.isIntegerControl),xf=te.withJsonFormsControlProps(e=>c.jsx(En,{...e})),Of=V.rankWith(1,ff),Pf=te.withJsonFormsControlProps(e=>c.jsx(Nl,{...e})),If=V.rankWith(1,V.isNumberControl),$f=te.withJsonFormsControlProps(e=>c.jsx(En,{...e})),kf=V.rankWith(2,V.isOneOfControl),Mf=te.withJsonFormsOneOfEnumProps(te.withTranslateProps(e=>c.jsx(hi,{...e})),!1),Ff=V.rankWith(3,pf),Df=te.withJsonFormsEnumProps(te.withTranslateProps(e=>c.jsx(yr,{...e})),!1),Nf=V.rankWith(1,V.isStringControl),Lf=te.withJsonFormsControlProps(e=>c.jsx(gi,{...e})),Yx=e=>{const{text:t,visible:n}=e;return n?c.jsx(h.Title,{fw:"bold",size:"xl",children:t}):null},jf=V.rankWith(1,V.isLabelable),zf=te.withJsonFormsLabelProps(Yx),qx=({uischema:e,renderers:t,cells:n,schema:r,path:o,enabled:i})=>{const a={elements:e.elements,schema:r,path:o,enabled:i,direction:"row"};return c.jsx(li,{...a,renderers:t,cells:n})},Bf=V.rankWith(1,V.uiTypeIs("HorizontalLayout")),Uf=te.withJsonFormsLayoutProps(qx),Jx=({uischema:e,schema:t,path:n,enabled:r,renderers:o,cells:i})=>{const a={elements:e.elements,schema:t,path:n,enabled:r,direction:"column"};return c.jsx(li,{...a,renderers:o,cells:i})},Vf=V.rankWith(1,V.uiTypeIs("VerticalLayout")),Wf=te.withJsonFormsLayoutProps(Jx),Gf=[{tester:Zl,cell:Ql},{tester:ql,cell:Jl},{tester:Hl,cell:Yl},{tester:Ll,cell:jl},{tester:zl,cell:Bl},{tester:Ul,cell:Vl},{tester:Wl,cell:Gl},{tester:Kl,cell:Xl}],Hf=[{tester:Tf,renderer:Sf},{tester:wf,renderer:_f},{tester:If,renderer:$f},{tester:Af,renderer:xf},{tester:Nf,renderer:Lf},{tester:bf,renderer:vf},{tester:Cf,renderer:Ef},{tester:kf,renderer:Mf},{tester:Of,renderer:Pf},{tester:Ff,renderer:Df},{tester:lf,renderer:cf},{tester:hf,renderer:gf},{tester:mf,renderer:yf},{tester:Bf,renderer:Uf},{tester:Vf,renderer:Wf},{tester:jf,renderer:zf}];function Yf({schema:e,uischema:t,state:n,setState:r,view:o,setView:i,jsonForms:s,onSubmit:a,buttonText:l,loading:u,...d}){const f=v.useMemo(()=>h.createTheme({components:{...Object.entries(s||{}).reduce((p,[y,b])=>(p[y]||(p[y]={defaultProps:{}}),p[y].defaultProps=b,p),{})}}),[s]);return c.jsx(h.Modal,{size:"lg",centered:!0,fullScreen:o===_e.FULL_SCREEN,radius:o!==_e.NORMAL?0:void 0,transitionProps:o!==_e.NORMAL?{transition:"fade",duration:200}:void 0,...d,title:c.jsxs(c.Fragment,{children:[d.title,c.jsx(h.Group,{children:c.jsxs(h.Group,{gap:"xs",pr:"xs",children:[c.jsx(h.CloseButton,{onClick:()=>i(o!==_e.OVERLAY?_e.OVERLAY:_e.NORMAL),title:o!==_e.OVERLAY?"Overlay":"Exit overlay",icon:c.jsx(Ko,{icon:o!==_e.OVERLAY?"tabler:stack-forward":"tabler:stack",fontSize:"1.25rem"})}),c.jsx(h.CloseButton,{onClick:()=>i(o!==_e.FULL_SCREEN?_e.FULL_SCREEN:_e.NORMAL),title:o!==_e.FULL_SCREEN?"Full screen":"Exit full screen",icon:c.jsx(Ko,{icon:o!==_e.FULL_SCREEN?"tabler:maximize":"tabler:minimize",fontSize:"1.25rem"})})]})})]}),classNames:{content:"mrt-table-container"},styles:ct(d.styles,{title:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between"}}),children:c.jsxs(h.Box,{component:"form",pos:"relative",onSubmit:a,children:[c.jsx(h.LoadingOverlay,{visible:u}),c.jsx(h.MantineThemeProvider,{inherit:!0,theme:f,children:c.jsx(te.JsonForms,{schema:e,uischema:t??void 0,renderers:Hf,cells:Gf,data:n.data,onChange:r,ajv:rl})}),c.jsx(h.Group,{justify:"end",mt:"xl",children:c.jsx(h.Button,{type:"submit",children:l})})]})})}const qf={styles:{content:{height:450}}},Jf={withinPortal:!1,h:"100%",w:"100%",pos:"absolute",styles:{overlay:{display:"none"},inner:{position:"relative",height:"100%",width:"100%",padding:0},content:{position:"absolute",height:"100%",width:"100%"}}};function Kf(e,t){const n={};return Object.entries(t.properties||{}).forEach(([r,o])=>{var a,l;const i=o.items?o.items:o,s=i.related_items||(i.oneOf?i.oneOf.map(u=>({value:u.const,label:u.title})):i.enum);if(s){const u=s.map(d=>d.value);if(tt(o.type,"array")){const d=((a=e[r])==null?void 0:a.map(f=>f.id_||f))||[];n[r]=u.filter(f=>d.includes(f))}else n[r]=u.find(d=>{var f;return d===(((f=e[r])==null?void 0:f.id_)||e[r])})}else n[r]=(((l=e[r])==null?void 0:l.id_)||e[r])??void 0}),n}function Ji({jsonForms:e,...t}){const{info:n,updateEntry:r}=X(),{opened:o,setOpened:i,item:s,itemLoading:a,state:l,setState:u,reset:d,view:f,setView:p}=ut("edit"),{jsonForms:y}=h.useProps("EditDialog",{},{}),b=v.useMemo(()=>ct({__:{setNull:!0}},y,e),[y,e]),g=v.useCallback(async E=>{E==null||E.preventDefault(),await r(s==null?void 0:s.id,l.data),i(!1)},[r,s==null?void 0:s.id,l.data,i]),w=v.useMemo(()=>({...Yn,data:Kf((s==null?void 0:s.result)||{},n.edit_schema)}),[n.edit_schema,s==null?void 0:s.result]);return v.useEffect(()=>{u({data:w.data})},[w,u]),c.jsx(Yf,{schema:n.edit_schema,uischema:n.edit_uischema,state:l,setState:u,view:f,setView:p,jsonForms:b,onSubmit:g,buttonText:"Edit",loading:a,opened:o,onClose:()=>i(!1),onExitTransitionEnd:d,...f===_e.OVERLAY?Jf:{},...f===_e.NORMAL?qf:{},...t,title:t.title??(n==null?void 0:n.edit_title)})}function Ki(){const{error:e}=X(),[t,n]=v.useState(!1);return v.useEffect(()=>{e&&n(!0)},[e]),c.jsx(h.Modal,{opened:t,onClose:()=>n(!1),title:c.jsxs(h.Group,{children:[c.jsx(Qp,{size:16,color:"red"}),c.jsx(h.Text,{children:e?e.originalError.detail||e.originalError.message:"Error"})]}),centered:!0,children:e?c.jsx(h.Text,{children:e.message}):null})}/*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE */const{entries:Xf,setPrototypeOf:Zf,isFrozen:Kx,getPrototypeOf:Xx,getOwnPropertyDescriptor:Zx}=Object;let{freeze:De,seal:qe,create:Qf}=Object,{apply:Xi,construct:Zi}=typeof Reflect<"u"&&Reflect;De||(De=function(t){return t}),qe||(qe=function(t){return t}),Xi||(Xi=function(t,n,r){return t.apply(n,r)}),Zi||(Zi=function(t,n){return new t(...n)});const Wr=Le(Array.prototype.forEach),Qx=Le(Array.prototype.lastIndexOf),Rf=Le(Array.prototype.pop),Fn=Le(Array.prototype.push),Rx=Le(Array.prototype.splice),Gr=Le(String.prototype.toLowerCase),Qi=Le(String.prototype.toString),ed=Le(String.prototype.match),Dn=Le(String.prototype.replace),eO=Le(String.prototype.indexOf),tO=Le(String.prototype.trim),Qe=Le(Object.prototype.hasOwnProperty),Ne=Le(RegExp.prototype.test),Nn=nO(TypeError);function Le(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return Xi(e,t,r)}}function nO(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Zi(e,n)}}function R(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Gr;Zf&&Zf(e,null);let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){const i=n(o);i!==o&&(Kx(t)||(t[r]=i),o=i)}e[o]=!0}return e}function rO(e){for(let t=0;t<e.length;t++)Qe(e,t)||(e[t]=null);return e}function Nt(e){const t=Qf(null);for(const[n,r]of Xf(e))Qe(e,n)&&(Array.isArray(r)?t[n]=rO(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=Nt(r):t[n]=r);return t}function Ln(e,t){for(;e!==null;){const r=Zx(e,t);if(r){if(r.get)return Le(r.get);if(typeof r.value=="function")return Le(r.value)}e=Xx(e)}function n(){return null}return n}const td=De(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Ri=De(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),es=De(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),oO=De(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),ts=De(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),iO=De(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),nd=De(["#text"]),rd=De(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),ns=De(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),od=De(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Hr=De(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),sO=qe(/\{\{[\w\W]*|[\w\W]*\}\}/gm),aO=qe(/<%[\w\W]*|[\w\W]*%>/gm),lO=qe(/\$\{[\w\W]*/gm),cO=qe(/^data-[\-\w.\u00B7-\uFFFF]+$/),uO=qe(/^aria-[\-\w]+$/),id=qe(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),fO=qe(/^(?:\w+script|data):/i),dO=qe(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),sd=qe(/^html$/i),pO=qe(/^[a-z][.\w]*(-[.\w]+)+$/i);var ad=Object.freeze({__proto__:null,ARIA_ATTR:uO,ATTR_WHITESPACE:dO,CUSTOM_ELEMENT:pO,DATA_ATTR:cO,DOCTYPE_NAME:sd,ERB_EXPR:aO,IS_ALLOWED_URI:id,IS_SCRIPT_OR_DATA:fO,MUSTACHE_EXPR:sO,TMPLIT_EXPR:lO});const jn={element:1,text:3,progressingInstruction:7,comment:8,document:9},hO=function(){return typeof window>"u"?null:window},gO=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(r=n.getAttribute(o));const i="dompurify"+(r?"#"+r:"");try{return t.createPolicy(i,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}},ld=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function cd(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:hO();const t=H=>cd(H);if(t.version="3.2.4",t.removed=[],!e||!e.document||e.document.nodeType!==jn.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e;const r=n,o=r.currentScript,{DocumentFragment:i,HTMLTemplateElement:s,Node:a,Element:l,NodeFilter:u,NamedNodeMap:d=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:f,DOMParser:p,trustedTypes:y}=e,b=l.prototype,g=Ln(b,"cloneNode"),w=Ln(b,"remove"),E=Ln(b,"nextSibling"),F=Ln(b,"childNodes"),I=Ln(b,"parentNode");if(typeof s=="function"){const H=n.createElement("template");H.content&&H.content.ownerDocument&&(n=H.content.ownerDocument)}let A,_="";const{implementation:x,createNodeIterator:k,createDocumentFragment:G,getElementsByTagName:z}=n,{importNode:m}=r;let P=ld();t.isSupported=typeof Xf=="function"&&typeof I=="function"&&x&&x.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:L,ERB_EXPR:Y,TMPLIT_EXPR:q,DATA_ATTR:re,ARIA_ATTR:oe,IS_SCRIPT_OR_DATA:he,ATTR_WHITESPACE:le,CUSTOM_ELEMENT:xe}=ad;let{IS_ALLOWED_URI:$}=ad,C=null;const M=R({},[...td,...Ri,...es,...ts,...nd]);let N=null;const W=R({},[...rd,...ns,...od,...Hr]);let B=Object.seal(Qf(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),J=null,K=null,Z=!0,ee=!0,Q=!1,Ce=!0,j=!1,ke=!0,Ue=!1,mt=!1,ae=!1,yt=!1,qr=!1,Jr=!1,Ld=!0,jd=!1;const RO="user-content-";let bs=!0,Vn=!1,fn={},dn=null;const zd=R({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Bd=null;const Ud=R({},["audio","video","img","source","image","track"]);let vs=null;const Vd=R({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Kr="http://www.w3.org/1998/Math/MathML",Xr="http://www.w3.org/2000/svg",bt="http://www.w3.org/1999/xhtml";let pn=bt,Ts=!1,Ss=null;const e2=R({},[Kr,Xr,bt],Qi);let Zr=R({},["mi","mo","mn","ms","mtext"]),Qr=R({},["annotation-xml"]);const t2=R({},["title","style","font","a","script"]);let Wn=null;const n2=["application/xhtml+xml","text/html"],r2="text/html";let Oe=null,hn=null;const o2=n.createElement("form"),Wd=function(S){return S instanceof RegExp||S instanceof Function},ws=function(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(hn&&hn===S)){if((!S||typeof S!="object")&&(S={}),S=Nt(S),Wn=n2.indexOf(S.PARSER_MEDIA_TYPE)===-1?r2:S.PARSER_MEDIA_TYPE,Oe=Wn==="application/xhtml+xml"?Qi:Gr,C=Qe(S,"ALLOWED_TAGS")?R({},S.ALLOWED_TAGS,Oe):M,N=Qe(S,"ALLOWED_ATTR")?R({},S.ALLOWED_ATTR,Oe):W,Ss=Qe(S,"ALLOWED_NAMESPACES")?R({},S.ALLOWED_NAMESPACES,Qi):e2,vs=Qe(S,"ADD_URI_SAFE_ATTR")?R(Nt(Vd),S.ADD_URI_SAFE_ATTR,Oe):Vd,Bd=Qe(S,"ADD_DATA_URI_TAGS")?R(Nt(Ud),S.ADD_DATA_URI_TAGS,Oe):Ud,dn=Qe(S,"FORBID_CONTENTS")?R({},S.FORBID_CONTENTS,Oe):zd,J=Qe(S,"FORBID_TAGS")?R({},S.FORBID_TAGS,Oe):{},K=Qe(S,"FORBID_ATTR")?R({},S.FORBID_ATTR,Oe):{},fn=Qe(S,"USE_PROFILES")?S.USE_PROFILES:!1,Z=S.ALLOW_ARIA_ATTR!==!1,ee=S.ALLOW_DATA_ATTR!==!1,Q=S.ALLOW_UNKNOWN_PROTOCOLS||!1,Ce=S.ALLOW_SELF_CLOSE_IN_ATTR!==!1,j=S.SAFE_FOR_TEMPLATES||!1,ke=S.SAFE_FOR_XML!==!1,Ue=S.WHOLE_DOCUMENT||!1,yt=S.RETURN_DOM||!1,qr=S.RETURN_DOM_FRAGMENT||!1,Jr=S.RETURN_TRUSTED_TYPE||!1,ae=S.FORCE_BODY||!1,Ld=S.SANITIZE_DOM!==!1,jd=S.SANITIZE_NAMED_PROPS||!1,bs=S.KEEP_CONTENT!==!1,Vn=S.IN_PLACE||!1,$=S.ALLOWED_URI_REGEXP||id,pn=S.NAMESPACE||bt,Zr=S.MATHML_TEXT_INTEGRATION_POINTS||Zr,Qr=S.HTML_INTEGRATION_POINTS||Qr,B=S.CUSTOM_ELEMENT_HANDLING||{},S.CUSTOM_ELEMENT_HANDLING&&Wd(S.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(B.tagNameCheck=S.CUSTOM_ELEMENT_HANDLING.tagNameCheck),S.CUSTOM_ELEMENT_HANDLING&&Wd(S.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(B.attributeNameCheck=S.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),S.CUSTOM_ELEMENT_HANDLING&&typeof S.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(B.allowCustomizedBuiltInElements=S.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),j&&(ee=!1),qr&&(yt=!0),fn&&(C=R({},nd),N=[],fn.html===!0&&(R(C,td),R(N,rd)),fn.svg===!0&&(R(C,Ri),R(N,ns),R(N,Hr)),fn.svgFilters===!0&&(R(C,es),R(N,ns),R(N,Hr)),fn.mathMl===!0&&(R(C,ts),R(N,od),R(N,Hr))),S.ADD_TAGS&&(C===M&&(C=Nt(C)),R(C,S.ADD_TAGS,Oe)),S.ADD_ATTR&&(N===W&&(N=Nt(N)),R(N,S.ADD_ATTR,Oe)),S.ADD_URI_SAFE_ATTR&&R(vs,S.ADD_URI_SAFE_ATTR,Oe),S.FORBID_CONTENTS&&(dn===zd&&(dn=Nt(dn)),R(dn,S.FORBID_CONTENTS,Oe)),bs&&(C["#text"]=!0),Ue&&R(C,["html","head","body"]),C.table&&(R(C,["tbody"]),delete J.tbody),S.TRUSTED_TYPES_POLICY){if(typeof S.TRUSTED_TYPES_POLICY.createHTML!="function")throw Nn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof S.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Nn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');A=S.TRUSTED_TYPES_POLICY,_=A.createHTML("")}else A===void 0&&(A=gO(y,o)),A!==null&&typeof _=="string"&&(_=A.createHTML(""));De&&De(S),hn=S}},Gd=R({},[...Ri,...es,...oO]),Hd=R({},[...ts,...iO]),i2=function(S){let D=I(S);(!D||!D.tagName)&&(D={namespaceURI:pn,tagName:"template"});const U=Gr(S.tagName),me=Gr(D.tagName);return Ss[S.namespaceURI]?S.namespaceURI===Xr?D.namespaceURI===bt?U==="svg":D.namespaceURI===Kr?U==="svg"&&(me==="annotation-xml"||Zr[me]):!!Gd[U]:S.namespaceURI===Kr?D.namespaceURI===bt?U==="math":D.namespaceURI===Xr?U==="math"&&Qr[me]:!!Hd[U]:S.namespaceURI===bt?D.namespaceURI===Xr&&!Qr[me]||D.namespaceURI===Kr&&!Zr[me]?!1:!Hd[U]&&(t2[U]||!Gd[U]):!!(Wn==="application/xhtml+xml"&&Ss[S.namespaceURI]):!1},st=function(S){Fn(t.removed,{element:S});try{I(S).removeChild(S)}catch{w(S)}},Rr=function(S,D){try{Fn(t.removed,{attribute:D.getAttributeNode(S),from:D})}catch{Fn(t.removed,{attribute:null,from:D})}if(D.removeAttribute(S),S==="is")if(yt||qr)try{st(D)}catch{}else try{D.setAttribute(S,"")}catch{}},Yd=function(S){let D=null,U=null;if(ae)S="<remove></remove>"+S;else{const Pe=ed(S,/^[\r\n\t ]+/);U=Pe&&Pe[0]}Wn==="application/xhtml+xml"&&pn===bt&&(S='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+S+"</body></html>");const me=A?A.createHTML(S):S;if(pn===bt)try{D=new p().parseFromString(me,Wn)}catch{}if(!D||!D.documentElement){D=x.createDocument(pn,"template",null);try{D.documentElement.innerHTML=Ts?_:me}catch{}}const Me=D.body||D.documentElement;return S&&U&&Me.insertBefore(n.createTextNode(U),Me.childNodes[0]||null),pn===bt?z.call(D,Ue?"html":"body")[0]:Ue?D.documentElement:Me},qd=function(S){return k.call(S.ownerDocument||S,S,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},_s=function(S){return S instanceof f&&(typeof S.nodeName!="string"||typeof S.textContent!="string"||typeof S.removeChild!="function"||!(S.attributes instanceof d)||typeof S.removeAttribute!="function"||typeof S.setAttribute!="function"||typeof S.namespaceURI!="string"||typeof S.insertBefore!="function"||typeof S.hasChildNodes!="function")},Jd=function(S){return typeof a=="function"&&S instanceof a};function vt(H,S,D){Wr(H,U=>{U.call(t,S,D,hn)})}const Kd=function(S){let D=null;if(vt(P.beforeSanitizeElements,S,null),_s(S))return st(S),!0;const U=Oe(S.nodeName);if(vt(P.uponSanitizeElement,S,{tagName:U,allowedTags:C}),S.hasChildNodes()&&!Jd(S.firstElementChild)&&Ne(/<[/\w]/g,S.innerHTML)&&Ne(/<[/\w]/g,S.textContent)||S.nodeType===jn.progressingInstruction||ke&&S.nodeType===jn.comment&&Ne(/<[/\w]/g,S.data))return st(S),!0;if(!C[U]||J[U]){if(!J[U]&&Zd(U)&&(B.tagNameCheck instanceof RegExp&&Ne(B.tagNameCheck,U)||B.tagNameCheck instanceof Function&&B.tagNameCheck(U)))return!1;if(bs&&!dn[U]){const me=I(S)||S.parentNode,Me=F(S)||S.childNodes;if(Me&&me){const Pe=Me.length;for(let Ve=Pe-1;Ve>=0;--Ve){const at=g(Me[Ve],!0);at.__removalCount=(S.__removalCount||0)+1,me.insertBefore(at,E(S))}}}return st(S),!0}return S instanceof l&&!i2(S)||(U==="noscript"||U==="noembed"||U==="noframes")&&Ne(/<\/no(script|embed|frames)/i,S.innerHTML)?(st(S),!0):(j&&S.nodeType===jn.text&&(D=S.textContent,Wr([L,Y,q],me=>{D=Dn(D,me," ")}),S.textContent!==D&&(Fn(t.removed,{element:S.cloneNode()}),S.textContent=D)),vt(P.afterSanitizeElements,S,null),!1)},Xd=function(S,D,U){if(Ld&&(D==="id"||D==="name")&&(U in n||U in o2))return!1;if(!(ee&&!K[D]&&Ne(re,D))){if(!(Z&&Ne(oe,D))){if(!N[D]||K[D]){if(!(Zd(S)&&(B.tagNameCheck instanceof RegExp&&Ne(B.tagNameCheck,S)||B.tagNameCheck instanceof Function&&B.tagNameCheck(S))&&(B.attributeNameCheck instanceof RegExp&&Ne(B.attributeNameCheck,D)||B.attributeNameCheck instanceof Function&&B.attributeNameCheck(D))||D==="is"&&B.allowCustomizedBuiltInElements&&(B.tagNameCheck instanceof RegExp&&Ne(B.tagNameCheck,U)||B.tagNameCheck instanceof Function&&B.tagNameCheck(U))))return!1}else if(!vs[D]){if(!Ne($,Dn(U,le,""))){if(!((D==="src"||D==="xlink:href"||D==="href")&&S!=="script"&&eO(U,"data:")===0&&Bd[S])){if(!(Q&&!Ne(he,Dn(U,le,"")))){if(U)return!1}}}}}}return!0},Zd=function(S){return S!=="annotation-xml"&&ed(S,xe)},Qd=function(S){vt(P.beforeSanitizeAttributes,S,null);const{attributes:D}=S;if(!D||_s(S))return;const U={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:N,forceKeepAttr:void 0};let me=D.length;for(;me--;){const Me=D[me],{name:Pe,namespaceURI:Ve,value:at}=Me,Gn=Oe(Pe);let je=Pe==="value"?at:tO(at);if(U.attrName=Gn,U.attrValue=je,U.keepAttr=!0,U.forceKeepAttr=void 0,vt(P.uponSanitizeAttribute,S,U),je=U.attrValue,jd&&(Gn==="id"||Gn==="name")&&(Rr(Pe,S),je=RO+je),ke&&Ne(/((--!?|])>)|<\/(style|title)/i,je)){Rr(Pe,S);continue}if(U.forceKeepAttr||(Rr(Pe,S),!U.keepAttr))continue;if(!Ce&&Ne(/\/>/i,je)){Rr(Pe,S);continue}j&&Wr([L,Y,q],ep=>{je=Dn(je,ep," ")});const Rd=Oe(S.nodeName);if(Xd(Rd,Gn,je)){if(A&&typeof y=="object"&&typeof y.getAttributeType=="function"&&!Ve)switch(y.getAttributeType(Rd,Gn)){case"TrustedHTML":{je=A.createHTML(je);break}case"TrustedScriptURL":{je=A.createScriptURL(je);break}}try{Ve?S.setAttributeNS(Ve,Pe,je):S.setAttribute(Pe,je),_s(S)?st(S):Rf(t.removed)}catch{}}}vt(P.afterSanitizeAttributes,S,null)},s2=function H(S){let D=null;const U=qd(S);for(vt(P.beforeSanitizeShadowDOM,S,null);D=U.nextNode();)vt(P.uponSanitizeShadowNode,D,null),Kd(D),Qd(D),D.content instanceof i&&H(D.content);vt(P.afterSanitizeShadowDOM,S,null)};return t.sanitize=function(H){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},D=null,U=null,me=null,Me=null;if(Ts=!H,Ts&&(H="<!-->"),typeof H!="string"&&!Jd(H))if(typeof H.toString=="function"){if(H=H.toString(),typeof H!="string")throw Nn("dirty is not a string, aborting")}else throw Nn("toString is not a function");if(!t.isSupported)return H;if(mt||ws(S),t.removed=[],typeof H=="string"&&(Vn=!1),Vn){if(H.nodeName){const at=Oe(H.nodeName);if(!C[at]||J[at])throw Nn("root node is forbidden and cannot be sanitized in-place")}}else if(H instanceof a)D=Yd("<!---->"),U=D.ownerDocument.importNode(H,!0),U.nodeType===jn.element&&U.nodeName==="BODY"||U.nodeName==="HTML"?D=U:D.appendChild(U);else{if(!yt&&!j&&!Ue&&H.indexOf("<")===-1)return A&&Jr?A.createHTML(H):H;if(D=Yd(H),!D)return yt?null:Jr?_:""}D&&ae&&st(D.firstChild);const Pe=qd(Vn?H:D);for(;me=Pe.nextNode();)Kd(me),Qd(me),me.content instanceof i&&s2(me.content);if(Vn)return H;if(yt){if(qr)for(Me=G.call(D.ownerDocument);D.firstChild;)Me.appendChild(D.firstChild);else Me=D;return(N.shadowroot||N.shadowrootmode)&&(Me=m.call(r,Me,!0)),Me}let Ve=Ue?D.outerHTML:D.innerHTML;return Ue&&C["!doctype"]&&D.ownerDocument&&D.ownerDocument.doctype&&D.ownerDocument.doctype.name&&Ne(sd,D.ownerDocument.doctype.name)&&(Ve="<!DOCTYPE "+D.ownerDocument.doctype.name+`>
180
- `+Ve),j&&Wr([L,Y,q],at=>{Ve=Dn(Ve,at," ")}),A&&Jr?A.createHTML(Ve):Ve},t.setConfig=function(){let H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ws(H),mt=!0},t.clearConfig=function(){hn=null,mt=!1},t.isValidAttribute=function(H,S,D){hn||ws({});const U=Oe(H),me=Oe(S);return Xd(U,me,D)},t.addHook=function(H,S){typeof S=="function"&&Fn(P[H],S)},t.removeHook=function(H,S){if(S!==void 0){const D=Qx(P[H],S);return D===-1?void 0:Rx(P[H],D,1)[0]}return Rf(P[H])},t.removeHooks=function(H){P[H]=[]},t.removeAllHooks=function(){P=ld()},t}var ud=cd();const it=v.forwardRef(({fallback:e,functionProps:t,children:n},r)=>{if(n=Te(n,t),n===null)return null;const o=n||e;return v.isValidElement(o)?v.cloneElement(o,{ref:r}):o});it.displayName="FallbackWrapper";const mO={field:"_field_zdaf7_1",rtl:"_rtl_zdaf7_7",borderRight:"_borderRight_zdaf7_12"},zn=v.memo(({id:e,entry:t,loading:n,rightBorder:r,children:o,onClickEntry:i,customElement:s,sanitize:a,...l})=>{const u={text:{style:{whiteSpace:"nowrap",overflow:"ellipsis"}}},{text:d}=h.useProps("Field",u,l),f={};Object.entries(d).forEach(([y,b])=>{typeof b=="function"&&(f[y]=b(t))});const p=h.useStyles({name:"Field",props:l,classes:mO});return c.jsx(h.Table.Td,{...p("field"),onClick:i?()=>i(e,t):null,...l,children:c.jsx(h.Box,{w:"100%",children:c.jsx(h.Skeleton,{visible:n,children:c.jsx(it,{fallback:Array.isArray(o)?o.map((y,b)=>c.jsx(h.Text,{...d,...f,children:a?ud.sanitize(y):y},b)):v.isValidElement(o)?o:c.jsx(h.Text,{...d,...f,children:a?ud.sanitize(o):o}),functionProps:t,children:s})})})})});zn.displayName="Field";const fd={row:"_row_138r2_1",selected:"_selected_138r2_5"};function dd({entry:e,selected:t,children:n}){const r=h.useStyles({name:"Row",classes:fd}),o=h.useProps("Row",{},{});Object.entries(o).forEach(([a,l])=>{typeof l=="function"&&(o[a]=l(e))});var{className:i,style:s}=r("row");return i=`${i} ${t?fd.selected:""}`,c.jsx(h.Table.Tr,{className:i,style:{...s},...o,children:n})}function yO({bodyCustomizer:e,actionColumn:t,id:n,entry:r}){let o=e==null?void 0:e[t];return typeof o=="function"&&(o=o({id:n,...r})),o===null?null:o||c.jsx(ds,{id:n})}function pd({data:e,loading:t,hideActions:n,hideCheckbox:r,selection:o,toggleRow:i,onClickEntry:s,bodyCustomizer:a,bodySeparator:l}){const u=e.list_columns.includes("actions")?"_actions":"actions",d=v.useMemo(()=>e!=null&&e.list_columns.includes("all")?"_all":"all",[e==null?void 0:e.list_columns]);return c.jsx(h.Table.Tbody,{children:e.result.length?e.result.map((f,p)=>{const y=e.ids[p];return c.jsxs(dd,{entry:{...f,id:y},children:[r?null:c.jsx(zn,{loading:t,children:c.jsx(h.Checkbox,{pl:2,checked:o.includes(y),onChange:()=>{i(y)}})},p),n?null:c.jsx(zn,{loading:t,children:c.jsx(yO,{bodyCustomizer:a,actionColumn:u,id:ze(y),entry:f})}),e.list_columns.map((b,g)=>{let w=a==null?void 0:a[b];typeof w=="function"&&(w=w({id:y,...f}));let E=gn(f,b);typeof E=="number"?E=E.toLocaleString():E==null&&(E="");const F=(l==null?void 0:l[b])||(l==null?void 0:l[d]);return F&&(E=E.split(F)),w===null?null:c.jsx(zn,{id:y,entry:f,loading:t,onClickEntry:s,customElement:w,sanitize:!0,children:E},g)})]},ze(y))}):c.jsx("tr",{children:c.jsx("td",{style:{padding:"8px"},colSpan:n?e.list_columns.length:e.list_columns.length+1,children:c.jsx(h.Text,{style:{fontStyle:"italic"},size:"sm",c:"dimmed",children:"No data available"})})})})}const hd={root:"_root_1kmay_1",wrapper:"_wrapper_1kmay_7",icon:"_icon_1kmay_18"};function Yr({column:e,label:t,orderColumn:n,related:r,toggleAll:o,allChecked:i,classNames:s,styles:a,customElement:l,...u}){const{queryParams:d,setQueryParams:f,loading:p}=X(),y={fw:700,size:"sm",color:"gray.8",hoverColor:"gray.6",selectedColor:"blue"},b=h.useStyles({name:"FieldTitle",classes:hd,classNames:s,styles:a,props:u}),g=h.useProps("FieldTitle",y,u),{hovered:w,ref:E}=ye.useHover(),F=n&&d.order_column===n,I=b("wrapper");return I.style.cursor=n?I.style.cursor:"auto",c.jsx(h.Table.Th,{className:hd.fieldTitleRoot,...b("root"),onClick:n&&!p?()=>f({order_column:n,order_direction:d.order_direction==="asc"?"desc":"asc"}):null,children:c.jsx(h.Box,{ref:E,...I,children:e==="Checkbox"?c.jsx(h.Checkbox,{pb:5,pl:2,onChange:o,checked:i}):c.jsxs(c.Fragment,{children:[c.jsx(h.Box,{w:"100%",fw:g.fw,size:"xl",c:w&&n?g.hoverColor:F?g.selectedColor:g.color,children:l||t||e}),r?c.jsx(h.Tooltip,{label:"Related Field",children:c.jsx(h.Indicator,{label:"rel",style:{indicator:{top:"-1px !important",right:"-2px !important",padding:"4px"}},children:c.jsx(h.Box,{...b("icon"),children:F?d.order_direction==="asc"?c.jsx(Lo,{size:14,strokeWidth:1.5}):c.jsx(Ca,{size:14,strokeWidth:1.5}):null})})}):c.jsx(h.Box,{...b("icon"),children:F?d.order_direction==="asc"?c.jsx(Lo,{size:14,strokeWidth:1.5}):c.jsx(Ca,{size:14,strokeWidth:1.5}):null})]})})})}const rs=v.memo(({data:e,info:t,settings:n,hideActions:r,hideCheckbox:o,allChecked:i,toggleAll:s,headerCustomizer:a})=>{const l=e.list_columns.includes("actions")?"_actions":"actions";let u=a==null?void 0:a[l];return typeof u=="function"&&(u=u()),c.jsx(h.Table.Thead,{children:c.jsxs(h.Table.Tr,{children:[o?null:c.jsx(Yr,{data:e,column:"Checkbox",allChecked:i,toggleAll:s}),r?null:c.jsx(Yr,{column:"Actions",customElement:u}),e.list_columns.map((d,f)=>{var y;let p=a==null?void 0:a[d];return typeof p=="function"&&(p=p(e.label_columns[d])),p===null?null:c.jsx(Yr,{column:d,label:e.label_columns[d],orderColumn:e.order_columns.find(b=>b===d)||e.order_columns.find(b=>b.startsWith(`${d}.`)),related:((y=t.filters[d])==null?void 0:y.schema.type)==="Nested",customElement:p},d)})]})})});rs.displayName="Header";const bO={scrollbar:"_scrollbar_isyo2_1"};function gd({bulkActions:e,hideActions:t,loading:n,onSelectCheckbox:r,onClickEntry:o,hideCheckbox:i,hideDownload:s,headerCustomizer:a,bodyCustomizer:l,bodySeparator:u,...d}){const f=h.useMantineTheme(),p=h.Table.extend({highlightOnHover:!0,striped:!0,horizontalSpacing:"md",verticalSpacing:"sm"}),y=h.useProps("DatagridTable",p,d),{data:b,info:g}=X(),[w,E]=v.useState([]),[F,I]=v.useState(!1),A=x=>{E(k=>k.includes(x)?k.filter(G=>G!==x):[...k,x])},_=()=>{E(x=>x.length===b.ids.length?[]:b.ids.map((k,G)=>k))};return v.useEffect(()=>{I(w.length===b.result.length&&w.length>0),r&&r(w),e==null||e.setSelectedIds(w.map(x=>x))},[w]),v.useEffect(()=>{E([]),r&&r([])},[b]),c.jsx(h.ScrollArea,{options:{className:f.colorScheme==="dark"?"os-theme-light":void 0},style:{flex:1,flexDirection:"column"},classNames:bO,children:c.jsxs(h.Table,{stickyHeader:!0,...y,children:[c.jsx(rs,{data:b,info:g,hideActions:t,hideCheckbox:i,allChecked:F,setSelection:E,toggleAll:_,headerCustomizer:a}),c.jsx(pd,{data:b,loading:n,hideActions:t,hideCheckbox:i,selection:w,setSelection:E,toggleRow:A,onClickEntry:o,bodyCustomizer:l,bodySeparator:u})]})})}const os=v.memo(({counter:e,...t})=>{const{data:n,queryParams:r,setQueryParams:o}=X(),i=h.useMantineTheme(),s=[{value:"10",label:"10"},{value:"25",label:"25"},{value:"50",label:"50"}],a=String(r.page_size),[l,u]=v.useState(r.page);v.useEffect(()=>{u(r.page)},[r.page]);const d=p=>{u(p-1),o({page:p-1})},f=p=>{o({page_size:parseInt(p,10),page:0})};return c.jsxs(c.Fragment,{children:[c.jsx(h.Divider,{}),c.jsxs(h.Box,{style:{display:"flex",justifyContent:"space-between",alignItems:"center",height:54,border:"none",borderTopWidth:"1px",padding:"var(--mantine-spacing-md)"},children:[c.jsxs(h.Box,{style:{display:"flex",alignItems:"center",gap:"var(--mantine-spacing-sm)"},children:[c.jsx(h.Text,{children:"Rows per page:"}),c.jsx(h.Select,{value:a,defaultValue:a,onChange:p=>f(p),data:s,allowDeselect:!1,w:80,size:"xs",styles:()=>({input:{fontSize:"14px",fontWeight:"250",lineHeight:"52px",border:"1px solid #E6E8ED"},item:{"&[data-selected]":{"&, &:hover":{outline:"none !important"}}}})})]}),c.jsx(h.Pagination,{size:"sm",total:Math.ceil(n.count/a),value:l+1,onChange:d,...t}),e&&n?c.jsxs(c.Fragment,{children:[c.jsx(h.Text,{c:i.primaryColor,size:"xs",fw:400,pl:20,children:"Total Records"}),c.jsx(h.Text,{c:i.primaryColor,size:"md",fw:700,pl:10,children:n.count})]}):null]})]})});os.displayName="Pagination";function md(...e){const[t,n]=v.useState(!1),{download:r}=X(),o={bg:"transparent",size:"sm",c:"gray"},i=h.useProps("ActionIcon",o,e);return t?c.jsx(h.Loader,{color:i.c,size:i.size}):c.jsx(h.Tooltip,{label:"Download",children:c.jsx(h.ActionIcon,{bg:i.bg,size:i.size,c:i.c,onClick:()=>{n(!0),r("download").then(()=>n(!1))},children:c.jsx(Ea,{})})})}function vO(e){return t=>{try{return e.validateSync(t,{abortEarly:!1}),{}}catch(n){const r={};return n instanceof Ee&&n.inner.forEach(o=>{r[o.path.replaceAll("[",".").replaceAll("]","")]=o.message}),r}}}function TO({form:e,name:t,items:n,...r}){return c.jsx(h.Autocomplete,{data:n,...e.getInputProps(t),value:String(e.getInputProps(t).value)||"",...r})}function yd({form:e,name:t,...n}){return c.jsx(c.Fragment,{children:c.jsx(jt.DateInput,{...e.getInputProps(t),onChange:r=>{if(r instanceof Date){const o=new Date(r.getTime()-r.getTimezoneOffset()*6e4);e.setFieldValue(t,o.toISOString().substring(0,10))}},value:e.getInputProps(t).value?new Date(e.getInputProps(t).value):null,...n})})}function bd({form:e,name:t,...n}){return c.jsx(c.Fragment,{children:c.jsx(jt.DateTimePicker,{...e.getInputProps(t),onChange:r=>{if(r instanceof Date){const o=new Date(r);e.setFieldValue(t,o.toISOString())}},value:e.getInputProps(t).value?new Date(e.getInputProps(t).value):null,...n})})}function Bn({form:e,name:t,...n}){const r=e.getInputProps(t).value,o=v.useMemo(()=>r&&typeof r=="object"?JSON.stringify(r):r||"",[r]);return t==="password"?c.jsx(h.PasswordInput,{...e.getInputProps(t),value:o,...n}):c.jsx(h.TextInput,{...e.getInputProps(t),value:o,...n})}function is({form:e,name:t,filter:n,...r}){const[o,i]=v.useState(""),s=e.getInputProps(t).value,a=v.useMemo(()=>s?typeof s=="object"?JSON.stringify(s,null,2):s:"",[s]);return v.useEffect(()=>{i(a)},[a]),n?c.jsx(Bn,{form:e,name:t,...r}):c.jsx(h.JsonInput,{autosize:!0,minRows:4,maxRows:12,validationError:"Invalid JSON",...e.getInputProps(t),...r,value:o,onChange:l=>{if(i(l),!l){e.getInputProps(t).onChange(null);return}try{const u=JSON.parse(l);e.getInputProps(t).onChange(u)}catch{}}})}function vd({form:e,name:t,filter:n,...r}){const[o,i]=v.useState(!!n);return c.jsxs(h.InputWrapper,{label:r.label,description:r.description,children:[!n&&c.jsxs(h.Group,{align:"center",gap:"xs",py:"0.25rem",children:[c.jsx(h.Checkbox,{checked:o,onChange:s=>i(s.currentTarget.checked)}),c.jsx(h.Text,{size:"xs",children:"WKT"})]}),o?c.jsx(Bn,{form:e,name:t,...r,label:void 0,description:void 0}):c.jsx(is,{form:e,name:t,...r,label:void 0,description:void 0})]})}function Td({form:e,name:t,items:n,...r}){const o=n.map(s=>({value:String(ze(s.id)),label:s.value})),i=Array.isArray(e.getInputProps(t).value)?e.getInputProps(t).value.map(s=>String(typeof s=="object"?ze(s.id):s)):[];return c.jsx(h.MultiSelect,{data:o,searchable:!0,...e.getInputProps(t),value:i||[],...r})}function Sd({form:e,name:t,items:n,filter:r,...o}){var s;const i=n.map(a=>({value:String(ze(a.id)),label:a.value}));return c.jsx(h.Select,{data:i,searchable:!0,...e.getInputProps(t),onChange:a=>{if(r){e.setFieldValue(t,a);return}const l=n.find(u=>String(ze(u.id))===a)||null;e.setFieldValue(t,l)},value:r?e.getInputProps(t).value:String(ze((s=e.getInputProps(t).value)==null?void 0:s.id))||"",...o})}function ss({form:e,name:t,items:n,...r}){return c.jsx(h.Select,{data:n,searchable:!0,...e.getInputProps(t),value:String(e.getInputProps(t).value)||"",...r})}function as({form:e,name:t,schema:n,filter:r,withinPortal:o=!0,...i}){if(!n.type)return null;switch(n.type){case"Boolean":return c.jsx(ss,{form:e,name:t,items:[{label:"true",value:r?"1":"true"},{label:"false",value:r?"0":"false"}],...i});case"RelatedList":return c.jsx(Td,{form:e,name:t,items:n.values,comboboxProps:{withinPortal:o},...i});case"Related":return c.jsx(Sd,{form:e,name:t,items:n.values,filter:r,comboboxProps:{withinPortal:o},...i});case"DateTime":return c.jsx(bd,{form:e,name:t,valueFormat:"DD.MM.YYYY HH:mm:ss",schema:n,popoverProps:{withinPortal:o},...i});case"Date":return c.jsx(yd,{form:e,name:t,valueFormat:"DD.MM.YYYY",schema:n,popoverProps:{withinPortal:o},...i});case"Geometry":return c.jsx(vd,{form:e,name:t,filter:r,...i});case"Raw":return c.jsx(is,{form:e,name:t,filter:r,...i});case"Integer":case"Float":return c.jsx(Bn,{form:e,name:t,...i});case"Enum":return c.jsx(ss,{form:e,name:t,items:n.values,comboboxProps:{withinPortal:o},...i});default:return c.jsx(Bn,{form:e,name:t,...i})}}function SO({form:e,name:t,items:n,onChange:r,...o}){return c.jsx(h.Select,{data:n,searchable:!0,...e.getInputProps(t),onChange:r,...o})}function ls({form:e,name:t,label:n,comboboxProps:r,...o}){const i=h.useCombobox({onDropdownClose:()=>i.resetSelectedOption(),onDropdownOpen:()=>i.updateSelectedOptionIndex("active")}),[s,a]=v.useState([]),[l,u]=v.useState(""),d=y=>{l!==""&&(s.includes(l)||a(b=>[...b,l]),u(""))},f=y=>a(b=>b.filter(g=>g!==y)),p=s.map(y=>c.jsx(h.Pill,{withRemoveButton:!0,onRemove:()=>f(y),children:y},y));return v.useEffect(()=>{const y=e.getInputProps(t).value;if(y)try{a([...y])}catch(b){console.error("Error parsing JSON:",b)}},[]),v.useEffect(()=>{e.getInputProps(t).onChange(s)},[s]),c.jsx(h.InputWrapper,{label:n,children:c.jsxs(h.Combobox,{store:i,onOptionSubmit:d,...r,children:[c.jsx(h.Combobox.DropdownTarget,{children:c.jsx(h.PillsInput,{onClick:()=>i.openDropdown(),children:c.jsxs(h.Pill.Group,{children:[p,c.jsx(h.Combobox.EventsTarget,{children:c.jsx(h.PillsInput.Field,{onFocus:()=>i.openDropdown(),onBlur:()=>i.closeDropdown(),value:l,placeholder:"Search values",onChange:y=>{i.updateSelectedOptionIndex(),u(y.currentTarget.value)},onKeyDown:y=>{y.key==="Backspace"&&l.length===0&&(y.preventDefault(),f(s[s.length-1]))}})})]})})}),c.jsx(h.Combobox.Dropdown,{children:c.jsx(h.Combobox.Options,{children:c.jsxs(h.Combobox.Option,{value:"$create",children:["+ Create ",l]})})})]})})}function wO({form:e,name:t,items:n,onChange:r,...o}){return c.jsx(h.Select,{data:n,searchable:!0,...e.getInputProps(t),onChange:r,...o})}function wd({onClose:e,...t}){const{info:n,queryParams:r,setQueryParams:o,path:i}=X(),s=eo.useForm({initialValues:{filters:[]},validate:vO(yn({filters:ko().of(yn({col:nr().transform(f=>f||void 0).required("Field is required"),opr:nr().transform(f=>f||void 0).required("col is required"),value:tr().when("col",{is:f=>f&&n.filters[f].schema.required,then:()=>tr().required("Value is required")})}))}))}),a={bg:"transparent",size:"sm",c:"gray"},l=h.useProps("ActionIcon",a,t);v.useEffect(()=>{s.setValues({filters:[]}),s.reset()},[i]),v.useEffect(()=>{if(r.filters&&r.filters.length){const f=r.filters.filter(p=>Ot(p.opr)).map(p=>({...p,key:ye.randomId()}));s.setFieldValue("filters",f)}},[r.filters]);const u=f=>{const p=f.filters.map(({key:b,...g})=>g),y=JSON.parse(JSON.stringify(p));o({filters:y,page:0}),e()},d=s.values.filters.map((f,p)=>c.jsxs(h.Box,{px:"sm",children:[c.jsxs(h.Flex,{my:"md",gap:"md",style:{whiteSpace:"nowrap"},children:[c.jsx(h.Box,{style:{width:"192px"},children:n&&n.filters&&c.jsx(SO,{form:s,name:`filters.${p}.col`,items:Object.entries(n.filters).map(([y,b])=>({label:b.label,value:String(y)})),onChange:y=>{s.setFieldValue(`filters.${p}`,{col:y,opr:"",value:"",key:ye.randomId()})}})}),c.jsx(h.Box,{style:{width:"192px"},children:f.col?c.jsx(wO,{form:s,name:`filters.${p}.opr`,items:n.filters[f.col].filters.filter(y=>Ot(y.operator)).map(y=>({label:y.name,value:y.operator})),onChange:y=>{s.setFieldValue(`filters.${p}`,{col:s.values.filters[p].col,opr:y,value:"",key:ye.randomId()})}}):null}),c.jsx(h.Box,{style:{width:"192px"},children:f.col?f.opr==="in"?c.jsx(ls,{form:s,name:`filters.${p}.value`}):c.jsx(as,{form:s,name:`filters.${p}.value`,schema:n.filters[f.col].schema,filter:!0}):null}),c.jsx(h.ActionIcon,{bg:l.bg,size:l.size,c:l.c,onClick:()=>{s.removeListItem("filters",p)},children:c.jsx(Oa,{})})]}),s.values.filters.length>1&&p<s.values.filters.length-1?c.jsx(h.Divider,{my:"md",labelPosition:"center",label:"AND"}):null]},f.key));return c.jsxs(h.Box,{component:"form",onSubmit:s.onSubmit(u),children:[d.length===0&&c.jsx(h.Box,{style:{width:"642px"},children:c.jsx(h.Text,{style:{fontStyle:"italic",padding:"7px"},size:"sm",c:"dimmed",children:"No filters selected..."})}),c.jsx(h.ScrollArea.Autosize,{mah:"40vh",mt:20,children:d}),c.jsx(h.Divider,{my:"sm"}),c.jsxs(h.Box,{style:{display:"flex",justifyContent:"space-between"},children:[c.jsx(h.Button,{variant:"subtle",leftSection:c.jsx(jo,{}),onClick:()=>{s.insertListItem("filters",{col:"",opr:"",value:"",key:ye.randomId()})},children:"Add Filter"}),c.jsx(h.Group,{spacing:"md",children:c.jsx(h.Button,{type:"submit",children:"Apply"})})]})]})}function _d(...e){const{queryParams:t}=X(),n={bg:"transparent",size:"sm",c:"gray"},r=h.useProps("ActionIcon",n,e),[o,i]=v.useState(!1);return c.jsxs(h.Popover,{opened:o,position:"bottom-end",onClose:()=>i(!1),closeOnClickOutside:!1,children:[c.jsx(h.Popover.Target,{children:c.jsx(h.Tooltip,{opened:o?!1:null,label:"Filter",children:(t==null?void 0:t.filters.filter(s=>Ot(s.opr)).length)!=0?c.jsx(h.Indicator,{zIndex:20,size:16,label:t==null?void 0:t.filters.length,children:c.jsx(h.ActionIcon,{bg:r.bg,size:r.size,c:r.c,onClick:()=>i(!0),children:c.jsx(Aa,{})})}):c.jsx(h.ActionIcon,{bg:r.bg,size:r.size,c:r.c,onClick:()=>i(!0),children:c.jsx(Aa,{})})})}),c.jsxs(h.Popover.Dropdown,{px:"xs",children:[c.jsx(h.Box,{style:{position:"absolute",top:4,right:4},children:c.jsx(h.CloseButton,{title:"Filters",onClick:()=>i(!1)})}),c.jsx(wd,{onClose:()=>{i(!1)}})]})]})}const cs=v.memo(({hideAdd:e,hideFilter:t,hideDownload:n,toolbarCustomizer:r})=>{const{info:o}=X(),i=v.useMemo(()=>{const a={};return Object.entries(r).forEach(([l,u])=>{a[l]=u,typeof a[l]=="function"&&(a[l]=a[l]())}),a},[r]),s=o.permissions.includes("can_post");return c.jsxs(h.Flex,{justify:"flex-end",p:"md",gap:"sm",children:[!n&&(i.download||c.jsx(md,{})),s&&!e?i.add||c.jsx(ps,{}):null,t?null:i.filter||c.jsx(_d,{})]})});cs.displayName="Toolbar";function _O(e,{autoInvoke:t=!0,initialLoading:n=!1,clearDataOnRefetch:r=!1,...o}={}){const[i,s]=v.useState(null),[a,l]=v.useState(n),[u,d]=v.useState(null),f=v.useRef(null),p=v.useCallback(()=>{if(e)return r&&s(null),d(null),f.current&&f.current.abort(),f.current=new AbortController,l(!0),fetch(e,{signal:f.current.signal,...o}).then(async b=>{const g=await b.json();if(!b.ok){const w=typeof g.detail=="string"?g.detail:JSON.stringify(g.detail,null,2);throw new Error(w)}return s(g),l(!1),g}).catch(b=>(b&&b.name!=="AbortError"&&(d(b),l(!1)),b))},[e]),y=v.useCallback(()=>{var b;f.current&&((b=f.current)==null||b.abort(""),l(!1))},[]);return v.useEffect(()=>(t&&p(),()=>{f.current&&f.current.abort("")}),[p,t]),{data:i,loading:a,error:u,refetch:p,abort:y}}function Cd(e){const t=v.useRef(!1);return v.useMemo(()=>e&&!t.current?(t.current=!0,!0):t.current,[e])}function us({children:e,cond:t}){return Cd(t)?e:null}const fs=v.forwardRef((e,t)=>{const{path:n,data:r,loading:o,info:i,setQueryParams:s}=X(),{hideToolbar:a=!1,hideFilter:l=!1,hideAdd:u=!1,hideSettings:d=!1,hideActions:f=!1,hidePagination:p=!1,hideError:y=!1,hideDownload:b=!0,onSelectCheckbox:g=null,onClickEntry:w=null,fetchOnMount:E=!0,bulkActions:F=null,styles:I,headerCustomizer:A={},bodyCustomizer:_={},toolbarCustomizer:x={},counter:k=!1,bodySeparator:G,form:z}=e;v.useEffect(()=>{!r&&E&&s({})},[r]);const{setView:m}=ut("add"),{setView:P}=ut("edit");if(v.useEffect(()=>{var Y,q;(Y=z==null?void 0:z.add)!=null&&Y.initialView&&m(z.add.initialView),(q=z==null?void 0:z.edit)!=null&&q.initialView&&P(z.edit.initialView)},[]),!i)return;const L=F===null;return c.jsxs(h.Paper,{ref:t,h:"100%",display:"flex",pos:"relative",style:{flexDirection:"column",...I},children:[c.jsxs(us,{cond:!!i,children:[c.jsx(hs,{jsonForms:z==null?void 0:z.add}),c.jsx(Ji,{jsonForms:z==null?void 0:z.edit})]}),a?null:c.jsx(cs,{hideFilter:l,hideAdd:u,hideSettings:d,hideDownload:b,toolbarCustomizer:x}),r?c.jsx(gd,{bulkActions:F,hideActions:f,loading:o,onSelectCheckbox:g,onClickEntry:w,hideCheckbox:L,hideDownload:b,headerCustomizer:A,bodyCustomizer:_,bodySeparator:G}):null,!p&&r?c.jsx(os,{counter:k}):null,y?null:c.jsx(Ki,{})]})});fs.displayName="DataGrid";function CO({relatedPath:e,...t}){const{path:n}=X();return we(n?n.substring(0,n.lastIndexOf("/")):"",e.substring(0,e.lastIndexOf("/"))),c.jsx(_a,{resource_name:e.replace("/",""),relation:t,children:c.jsx(fs,{hideToolbar:!0,hideDownload:!1})})}const EO=v.memo(CO);function Ed({item:e,info:t,loading:n,opened:r,onClose:o,...i}){const s={modal:{},tabs:{},tabsList:{},tabsPanel:{}},{modal:a,tabs:l,tabsList:u,tabsPanel:d}=h.useProps("ViewDialog",s,i);return c.jsxs(h.Modal,{opened:r,onClose:o,title:`${e==null?void 0:e.show_title} (#${ze(e==null?void 0:e.id)})`,size:"lg",centered:!0,zIndex:1e3,...a,children:[c.jsx(h.LoadingOverlay,{visible:n}),!n&&e?c.jsxs(h.Tabs,{defaultValue:"details",...l,children:[c.jsxs(h.Tabs.List,{...u,children:[c.jsx(h.Tabs.Tab,{value:"details",children:"Details"}),t.relations.map((f,p)=>c.jsx(h.Tabs.Tab,{value:f.name,children:f.name},p))]}),c.jsx(h.Tabs.Panel,{pt:"xs",value:"details",...d,children:c.jsx(h.Paper,{p:"xs",withBorder:!0,children:c.jsx(h.Stack,{spacing:"md",children:c.jsx(h.ScrollArea,{h:450,type:"auto",children:e.show_columns.map((f,p)=>c.jsxs(h.Grid,{maw:500,children:[c.jsx(h.Grid.Col,{span:4,children:c.jsx(h.Text,{size:"md",children:e.label_columns[f]})}),c.jsx(h.Grid.Col,{span:1,children:c.jsx(h.Text,{size:"xs",children:":"})}),c.jsx(h.Grid.Col,{span:6,children:c.jsx(h.Text,{size:"md",children:gn(e.result,f)})})]},p))})})})}),t.relations.map((f,p)=>c.jsx(h.Tabs.Panel,{pt:"xs",value:f.name,children:c.jsx(h.Paper,{withBorder:!0,children:c.jsx(EO,{relatedPath:f.path,id:ze(e.id),foreign_key:f.foreign_key,type:f.type})})},p))]}):null]})}function Ad({id:e,...t}){const{info:n,getEntry:r}=X(),o={bg:"transparent",size:"sm",c:"gray"},i=h.useProps("ActionIcon",o,t),[s,a]=v.useState(null),[l,u]=v.useState(!1),[d,f]=v.useState(!1);return c.jsxs(c.Fragment,{children:[c.jsx(h.Tooltip,{label:"Details",children:c.jsx(h.ActionIcon,{bg:i.bg,size:i.size,c:i.c,onClick:async()=>{u(!0);const p=await r(e);p&&(a(p),u(!1),f(!0))},children:c.jsx(th,{})})}),c.jsx(Ed,{item:s,info:n,loading:l,opened:d,onClose:()=>f(!1)})]})}function ds({id:e}){const{info:t}=X();return c.jsxs(h.Flex,{style:{gap:4,whiteSpace:"nowrap"},children:[t!=null&&t.permissions.includes("can_get")?c.jsx(Ad,{id:e}):null,t!=null&&t.permissions.includes("can_put")?c.jsx(ka,{id:e}):null,t!=null&&t.permissions.includes("can_delete")?c.jsx($a,{id:e}):null]})}function ps({tooltipProps:e,actionIconProps:t,...n}){const{setOpened:r}=ut("add"),o={variant:"transparent",size:"sm",c:"gray"},i=h.useProps("ActionIcon",o,n);return c.jsx(c.Fragment,{children:c.jsx(h.Tooltip,{...e,label:(e==null?void 0:e.label)??"Add Item",children:c.jsx(h.ActionIcon,{variant:i.variant,size:i.size,c:i.c,onClick:()=>r(!0),...t,children:c.jsx(jo,{})})})})}function hs({jsonForms:e,...t}){const{info:n,addEntry:r}=X(),{opened:o,setOpened:i,state:s,setState:a,reset:l,view:u,setView:d}=ut("add"),{jsonForms:f}=h.useProps("AddDialog",{},{}),p=v.useMemo(()=>ct(f,e),[f,e]),y=v.useCallback(async b=>{b==null||b.preventDefault(),await r(s.data),i(!1)},[r,i,s.data]);return c.jsx(Yf,{schema:n.add_schema,uischema:n.add_uischema,state:s,setState:a,view:u,setView:d,jsonForms:p,onSubmit:y,buttonText:"Add",opened:o,onClose:()=>i(!1),onExitTransitionEnd:l,...u===_e.OVERLAY?Jf:{},...u===_e.NORMAL?qf:{},...t,title:t.title??(n==null?void 0:n.add_title)})}function AO({children:e,fetch:t=!0,loading:n=c.jsx(h.Center,{children:c.jsx(h.Loader,{})}),end:r=c.jsx(h.Center,{children:"End of data"}),fetchWrapper:o=h.Center,fetchWrapperProps:i}){const{streaming:s,loading:a}=X(),{ref:l,inViewport:u}=ye.useInViewport(),d=v.useMemo(()=>Object.values(s.data).flat(),[s.data]),f=v.useMemo(()=>typeof e=="function"?e(d):e,[e,d]);return v.useEffect(()=>{u&&t&&s.fetch()},[u]),c.jsxs(c.Fragment,{children:[f,a&&n,s.isEnd&&r,c.jsx(o,{ref:l,id:"IS-load-trigger",mih:"1%",...i})]})}function xO(e,t){const n=X(),r=Pt(),o=v.useCallback(({row:i,...s})=>c.jsx(it,{fallback:c.jsx(ds,{id:i.original.id}),functionProps:{api:n,auth:r,data:i.original,mrtProps:{row:i,...s}},children:t}),[n,r,t]);return{enableEditing:!e,editDisplayMode:"modal",renderRowActions:o}}function OO(e,t){return{enableRowSelection:!!e||!!t}}const Lt=(e={},...t)=>t.reduce((n,r)=>ct(n,e[r]),{}),Un=(e,t,n=!1)=>{let r="";n&&(r+="filter");const o=n?e[0].toUpperCase():e[0].toLowerCase();return r+=o+e.slice(1),`${r}.${t}`},xd=(e="")=>{e.startsWith("filter")&&(e=e.slice(6));const[t="",n=""]=e.split(".");return{col:t,operator:n}};function PO({col:e,colFilter:t,onClick:n,...r}){return c.jsxs(h.Menu,{shadow:"md",width:"target",...r,children:[c.jsx(h.Menu.Target,{children:c.jsx(h.Button,{children:"Add filter"})}),c.jsx(h.Menu.Dropdown,{children:t.filters.filter(o=>Ot(o.operator)).map(o=>c.jsx(h.Menu.Item,{onClick:()=>n({col:e,opr:o.operator,value:""}),children:o.name},`${t.label}-${o.name}`))})]})}function IO({col:e}){const{info:t,queryParams:n,setQueryParams:r}=X(),o=eo.useForm({initialValues:{filters:(n==null?void 0:n.filters)||[]}}),i=v.useMemo(()=>(t==null?void 0:t.filters[e])||{},[e,t==null?void 0:t.filters]),s=v.useMemo(()=>{var d;return((d=i==null?void 0:i.filters)==null?void 0:d.reduce((f,p)=>({...f,[p.operator]:p.name}),{}))||{}},[i==null?void 0:i.filters]),[a]=ye.useDebouncedValue(o.getValues(),Tt);ye.useDidUpdate(()=>{const d=a.filters.filter(f=>f.value);r({filters:d})},[a]);const l=o.getValues().filters,u=l.map((d,f)=>d.col===e&&Ot(d.opr)?c.jsxs(v.Fragment,{children:[c.jsx(h.Grid.Col,{span:1.5,py:0,children:c.jsx(h.Center,{h:"100%",w:"100%",children:c.jsx(h.CloseButton,{onClick:()=>o.removeListItem("filters",f),size:"md",title:"Remove filter",variant:"outline"})})}),c.jsx(h.Grid.Col,{span:10.5,py:0,children:d.opr==="in"?c.jsx(ls,{form:o,name:`filters.${f}.value`,label:s[d.opr],comboboxProps:{withinPortal:!1}}):c.jsx(as,{form:o,name:`filters.${f}.value`,label:s[d.opr],schema:i.schema,withinPortal:!1,filter:!0})}),f>=0&&f+1<l.length&&c.jsx(h.Grid.Col,{span:12,py:0,children:c.jsx(h.Divider,{my:"sm",label:"AND",align:"center"})})]},`${d.col}-${f}`):null).filter(Boolean);return c.jsxs(h.Grid,{w:u.length?"25rem":"100%",gap:"md",gutter:"xs",children:[u.length?u:c.jsx(h.Grid.Col,{span:12,children:c.jsx(h.Text,{align:"center",c:"gray",style:{fontStyle:"italic"},children:"No filters"})}),c.jsx(h.Grid.Col,{span:12,children:c.jsx(h.Stack,{children:c.jsx(PO,{col:e,colFilter:i||{filters:[]},onClick:d=>o.insertListItem("filters",d),withinPortal:!1})})})]})}function $O({filters:e,col:t,opr:n,table:r}){const o=h.useMantineTheme();return e.map(i=>{const s=i.operator===n;return c.jsx(h.Menu.Item,{color:s?o.primaryColor:void 0,leftSection:c.jsx(h.Text,{size:"xl",ta:"center",w:"2ch",style:{transform:"translateY(-0.1em)"},children:i.name[0]}),onClick:()=>r.setColumnFilterFns(a=>({...a,[t]:Un(t,i.operator)})),value:i.opr,children:i.name},i.operator)})}function kO({enableAdvancedFilters:e,mode:t,setMode:n,col:r,opr:o,filters:i,table:s}){return c.jsxs(c.Fragment,{children:[e&&c.jsxs(c.Fragment,{children:[c.jsx(h.Menu.Item,{component:"div",p:0,children:c.jsx(h.SegmentedControl,{fullWidth:!0,size:"sm",data:["Basic","Advanced"],value:t,onChange:n})}),c.jsx(h.Menu.Divider,{})]}),t==="Basic"&&c.jsx($O,{filters:i,col:r,opr:o,table:s}),t==="Advanced"&&c.jsx(IO,{col:r})]})}const ln=e=>e!=null&&e!=="",Od=v.forwardRef(({clearIcon:e,mrtprops:{textinputprops:t},...n},r)=>{const{value:o,onChange:i,leftInputProps:s,rightInputProps:a,groupProps:l,cleariconprops:u,...d}=n,[f,p]=v.useState([null,null]);v.useEffect(()=>{o||p([null,null])},[o]),v.useEffect(()=>{const A=JSON.stringify(f);let _=null;return f.every(ln)&&A!==o?_=setTimeout(()=>{i(JSON.stringify(f))},Tt):f.every(x=>!ln(x))&&(_=setTimeout(()=>{i(void 0)},Tt)),()=>clearTimeout(_)},[f]);const y=v.useCallback((A,_)=>{p(x=>{const k=[...x];return k[_]=A,k})},[]);let[b,g]=f;const w=ln(g)&&!ln(b),E=ln(b)&&!ln(g),F=typeof b=="number"?c.jsx(h.ActionIcon,{...u,onClick:()=>p(A=>[null,A[1]]),children:c.jsx(Pa,{})}):null,I=typeof g=="number"?c.jsx(h.ActionIcon,{...u,onClick:()=>p(A=>[A[0],null]),children:c.jsx(Pa,{})}):null;return c.jsxs(h.Group,{w:"100%",wrap:"nowrap",align:"center",gap:"xs",...l,children:[c.jsx(h.NumberInput,{styles:{wrapper:{marginBottom:0}},hideControls:!0,rightSection:F,...d,...t,value:b||"",onChange:A=>y(A,0),placeholder:w?"Start value is required":"Start value",error:w&&" ",ref:r,...s}),c.jsx(h.NumberInput,{styles:{wrapper:{marginBottom:0}},hideControls:!0,rightSection:I,...d,...t,value:g||"",onChange:A=>y(A,1),placeholder:E?"End value is required":"End value",error:E&&" ",...a})]})});Od.displayName="BasicHeaderBetweenInput";const cn=e=>e,Pd=v.forwardRef(({clearIcon:e,mrtprops:{dateinputprops:t},...n},r)=>{const{value:o,onChange:i,leftInputProps:s,rightInputProps:a,groupProps:l,...u}=n,[d,f]=v.useState([null,null]);v.useEffect(()=>{o||f([null,null])},[o]),v.useEffect(()=>{const E=JSON.stringify(d);let F=null;return d.every(cn)&&E!==o?F=setTimeout(()=>{i(JSON.stringify(d))},Tt):d.every(I=>!cn(I))&&(F=setTimeout(()=>{i(void 0)},Tt)),()=>clearTimeout(F)},[d]);const p=v.useCallback((E,F)=>{E&&(E=E.toISOString()),f(I=>{const A=[...I];return A[F]=E,A})},[]);let[y,b]=d;y=y?new Date(y):null,b=b?new Date(b):null;const g=cn(b)&&!cn(y),w=cn(y)&&!cn(b);return c.jsxs(h.Group,{w:"100%",wrap:"nowrap",align:"center",gap:"xs",...l,children:[c.jsx(jt.DateInput,{clearable:!0,valueFormat:"DD.MM.YYYY",styles:{wrapper:{marginBottom:0}},...u,...t,value:y,onChange:E=>p(E,0),placeholder:g?"Start date is required":"Start date",error:g&&" ",ref:r,...s}),c.jsx(jt.DateInput,{clearable:!0,valueFormat:"DD.MM.YYYY",styles:{wrapper:{marginBottom:0}},...u,...t,value:b,onChange:E=>p(E,1),placeholder:w?"End date is required":"End date",error:w&&" ",...a})]})});Pd.displayName="BasicHeaderDateBetweenInput";const Id=v.forwardRef(({clearIcon:e,mrtprops:{textinputprops:t},...n},r)=>c.jsx(h.TextInput,{ref:r,rightSection:e,...t,...n,value:n.value||""}));Id.displayName="BasicHeaderTextInput";const $d=v.forwardRef(({component:e,...t},n)=>{const r=X(),o=Pt(),i=v.useMemo(()=>({api:r,auth:o,componentProps:{...t,ref:n}}),[r,o,t,n]);return c.jsx(it,{ref:n,fallback:c.jsx(Id,{...t}),functionProps:i,children:e})});$d.displayName="HeaderInput";const un={root:"_root_yn5fy_1","date-filter":"_date-filter_yn5fy_5"},gs={[ro]:({componentProps:e})=>c.jsx(Od,{...e}),[oo]:({componentProps:e})=>c.jsx(Pd,{...e})},kd=v.forwardRef(({label:e,disabled:t,children:n,...r},o)=>t?v.cloneElement(n,{ref:o}):c.jsx(h.Tooltip,{label:e,...r,children:v.cloneElement(n,{ref:o})}));kd.displayName="FilterIconWrapper";const Md=v.forwardRef(({indicator:e,children:t,...n},r)=>e?c.jsx(h.Indicator,{zIndex:20,size:16,label:e,...n,children:v.cloneElement(t,{ref:r})}):v.cloneElement(t,{ref:r}));Md.displayName="FilterIndicatorWrapper";function MO({children:e,enableFilterModes:t,enableAdvancedFilters:n,filterProps:r,filterModeDescription:o,filterMenu:i,filters:s,filterFn:a,mrtProps:{column:l,table:u,...d}}){var $;const{queryParams:f,setQueryParams:p}=X(),y=X(),b=Pt(),[g,w]=v.useState("Basic"),[E,{toggle:F}]=ye.useDisclosure(),I=(($=u.getState().columnFilterFns)==null?void 0:$[l.id])||a,A=v.useMemo(()=>xd(I).operator,[I]),_=v.useMemo(()=>{var C;return(C=s==null?void 0:s.find(M=>M.operator===A))==null?void 0:C.name},[s,A]),x=eo.useField({mode:"controlled"}),k=v.useMemo(()=>(f==null?void 0:f.filters.filter(C=>C.col===l.id&&Ot(C.opr)).map(C=>({...C})))||[],[f,l.id]),G=v.useCallback(()=>{x.reset(),l.setFilterValue(void 0)},[]),[z]=ye.useDebouncedValue(x.getInputProps().value,Tt),m=ye.useMounted(),P=v.useMemo(()=>f==null?void 0:f.filters.find(C=>C.col===l.id&&C.opr===A),[l.id,A,f==null?void 0:f.filters]);v.useEffect(()=>{m&&l.setFilterValue(z??void 0)},[z]),v.useEffect(()=>{if(!m)return;const C=l.getFilterValue();C===void 0?G():x.getInputProps().onChange(C)},[l.getFilterValue()]),v.useEffect(()=>{m&&(P||G())},[P]),ye.useDidUpdate(()=>{x.reset()},[A]),ye.useDidUpdate(()=>{let C=!1;const M=f==null?void 0:f.filters.map(B=>{if(B.opr.startsWith(Bt)&&B.col===l.id){if(B.opr===A)C=!0;else return null;return z?{...B,value:z}:null}return B}).filter(Boolean);!C&&z&&M.push({col:l.id,opr:A,value:z});const N=JSON.stringify(M),W=JSON.stringify(f.filters);N!==W&&p({filters:M})},[z]);const L=v.useMemo(()=>{const C={variant:"subtle"};return!(s!=null&&s.length)&&(C.disabled=!0,C.c="gray"),C},[s==null?void 0:s.length]),Y=v.useMemo(()=>so(t?e==null?void 0:e[A]:e,gs==null?void 0:gs[A]),[e,t,A]),q=v.useMemo(()=>({...L,variant:"transparent",c:void 0,size:"sm",onClick:G}),[L,G]),re=v.useMemo(()=>({api:y,auth:b,mrtProps:{column:l,table:u,...d}}),[y,b,l,d,u]),oe=v.useMemo(()=>({...re,componentProps:{label:u.options.localization.changeFilterMode,disabled:!(s!=null&&s.length),indicator:k.length,aiProps:L,onClick:F}}),[L,k.length,s==null?void 0:s.length,re,u.options.localization.changeFilterMode,F]),he=v.useMemo(()=>({...re,componentProps:{filterMode:_}}),[_,re]),le=Te(t?Lt(r,A):r,re),xe=v.useMemo(()=>{var C,M;return{w:"100%",variant:"unstyled",disabled:!(s!=null&&s.length),title:s.length?void 0:"No filters",placeholder:(C=u.options.localization.filterByColumn)==null?void 0:C.replace("{column}",String(l.columnDef.header)),"aria-label":(M=u.options.localization.filterByColumn)==null?void 0:M.replace("{column}",String(l.columnDef.header)),style:{fontWeight:"normal"},mrtprops:{column:l,table:u,...d,textinputprops:{className:xt("mrt-filter-text-input",un.root),...Te(u.mantineFilterTextInputProps,[{column:l,table:u,...d}]),...Te(l.columnDef.mantineFilterTextInputProps,[{column:l,table:u,...d}])},selectprops:{className:xt("mrt-filter-text-input",un.root),...Te(u.mantineFilterSelectProps,{column:l,table:u,...d}),...Te(l.columnDef.mantineFilterSelectProps,{column:l,table:u,...d})},multiselectprops:{className:xt("mrt-filter-text-input",un.root),...Te(u.mantineFilterMultiSelectProps||{clearable:!0},{column:l,table:u,...d}),...Te(l.columnDef.mantineFilterMultiSelectProps,{column:l,table:u,...d})},dateinputprops:{className:xt("mrt-filter-text-input",un.root,un["date-filter"]),...Te(u.mantineFilterDateInputProps,{column:l,table:u,...d}),...Te(l.columnDef.mantineFilterDateInputProps,{column:l,table:u,...d})},autocompleteprops:{className:xt("mrt-filter-text-input",un.root),...Te(u.mantineFilterAutocompleteProps,{column:l,table:u,...d}),...Te(l.columnDef.mantineFilterAutocompleteProps,{column:l,table:u,...d})}},ref:N=>{N&&(u.refs.filterInputRefs.current[`${l.id}-0`]=N)},clearIcon:x.isDirty()&&c.jsx(h.CloseButton,{...q}),...le,cleariconprops:q}},[q,l,le,x,s.length,d,u]);return c.jsxs(h.Menu,{opened:E,closeOnClickOutside:!0,onChange:F,children:[c.jsxs(h.Stack,{w:"100%",gap:"0.25rem",children:[c.jsxs(h.Group,{gap:"xs",justify:"space-between",wrap:"nowrap",children:[c.jsx($d,{component:Y,field:x,...x.getInputProps(),...xe}),t&&c.jsx(h.Menu.Target,{children:c.jsx(it,{fallback:s.length?c.jsx(kd,{label:u.options.localization.changeFilterMode,position:"bottom-start",withArrow:!0,arrowPosition:"side",children:c.jsx(Md,{indicator:k.length,disabled:!n,children:c.jsx(h.ActionIcon,{...L,onClick:F,children:c.jsx(nh,{})})})}):null,functionProps:oe,children:i})})]}),t&&c.jsx(it,{fallback:s.length?c.jsx(h.Input.Description,{size:"xs",children:u.options.localization.filterMode.replace("{filterType}",Je.localizedFilterOption(Lt(u.options.localization,l.id),_)||Je.localizedFilterOption(u.options.localization,_)||_)}):null,functionProps:he,children:o})]}),c.jsx(h.Menu.Dropdown,{children:c.jsx(kO,{enableAdvancedFilters:n,mode:g,setMode:w,col:l.id,opr:A,filters:s,table:u})})]})}function FO({highlight:e,truncate:t,children:n}){return Array.isArray(n)?n.map((r,o)=>{var i;return(i=t==null?void 0:t[o])!=null&&i.truncated?c.jsx(h.Tooltip,{label:t[o].original,children:c.jsx(h.Highlight,{highlight:e,children:t[o].truncated},o)},o):c.jsx(h.Highlight,{highlight:e,children:r},o)}):t!=null&&t.truncated?c.jsx(h.Tooltip,{label:t.original,children:c.jsx(h.Highlight,{highlight:e,children:t.truncated})}):c.jsx(h.Highlight,{highlight:e,children:n})}const DO=(e,t)=>{var r,o,i;const n=(i=(o=(r=e==null?void 0:e.filters)==null?void 0:r[t])==null?void 0:o.schema)==null?void 0:i.type;if(!n)return no;switch(n){case"Date":case"DateTime":return oo;case"Integer":case"Float":return ro;default:return no}};function NO(e,t,n,r){const{path:o,info:i,data:s,specialKey:a}=X(),l=X(),u=Pt(),d=v.useMemo(()=>(s==null?void 0:s.list_columns.map(y=>{var z,m,P;const{component:b,enableFilterModes:g,enableAdvancedFilters:w,filterComponent:E,filterProps:F,filterModeDescription:I,filterMenu:A,defaultOpr:_=DO(i,y)}=Lt(t,a.all,y),x=Un(y,_),k=((m=(z=i==null?void 0:i.filters)==null?void 0:z[y])==null?void 0:m.filters.filter(L=>L.operator.startsWith("header:")))||[],G={};return b!==void 0&&(G.Header=L=>Te(b,{api:l,auth:u,mrtProps:L})),{accessorKey:y,accessorFn:L=>gn(L,y),header:(P=s==null?void 0:s.label_columns)==null?void 0:P[y],Filter:L=>c.jsx(MO,{enableFilterModes:g,enableAdvancedFilters:w,filterProps:F,filterModeDescription:I,filterMenu:A,filters:k,filterFn:x,mrtProps:L,children:E}),enableSorting:(s==null?void 0:s.order_columns.includes(y))||(s==null?void 0:s.order_columns.includes(`${y}.id`)),filterFn:k.length?x:void 0,columnFilterModeOptions:k.map(L=>Un(y,L.operator)),Cell:({cell:L,table:Y,column:q,...re})=>{const oe=Y.getState().globalFilter,he=q.getFilterValue()||"",{component:le,separator:xe,truncate:$}=Lt(n,a.all,y);let C=[];oe&&C.push(...oe.split(r).map(B=>B.trim())),he&&typeof he=="string"&&C.push(...he.split(r).map(B=>B.trim()));let M=L.getValue();typeof M=="number"?M=M.toLocaleString():M==null&&(M=""),xe&&(M=M.split(xe));let N={};$&&(Array.isArray(M)?N=M.map(B=>({original:B,truncated:B.length>$?`${B.slice(0,$)}...`:null})):N={original:M,truncated:M.length>$?`${M.slice(0,$)}...`:null});const W={api:l,auth:u,data:L.row.original,highlight:C,componentProps:{value:M},mrtProps:{cell:L,table:Y,column:q,...re}};return c.jsx(it,{fallback:c.jsx(FO,{highlight:C,truncate:N,children:M}),functionProps:W,children:le})},...G,...Lt(e,a.all,y)}}))||[],[s==null?void 0:s.list_columns,s==null?void 0:s.label_columns,s==null?void 0:s.order_columns,i,e,a.all,l,u,t,n,r]),[f,p]=ye.useSetState({});return v.useEffect(()=>{d.length&&p({[s.path]:d})},[d]),{columns:d.length?d:(f==null?void 0:f[o])||d,manualFiltering:!0}}function LO(){const{data:e,loading:t}=X();return{data:(e==null?void 0:e.result)||[],rowCount:(e==null?void 0:e.count)||0,state:{showLoadingOverlay:t}}}function jO(e){const{data:t}=X();return e?{mantineTableBodyRowProps:({row:n})=>({onClick:()=>{const r=t.ids[n.id];e(r,n.original)},style:{cursor:"pointer"}})}:null}function zO(){const{info:e}=X();return{filterFns:v.useMemo(()=>Object.entries((e==null?void 0:e.filters)||{}).reduce((t,[n,r])=>(r.filters.filter(o=>o.operator.startsWith("header:")).forEach(o=>t[Un(n,o.operator)]=null),t),{}),[e==null?void 0:e.filters])}}function BO(){const{queryParams:e,setQueryParams:t,info:n}=X(),r=v.useMemo(()=>{var u;return(u=e==null?void 0:e.filters)==null?void 0:u.find(d=>d.opr===zt)},[e==null?void 0:e.filters]),[o,i]=v.useState((r==null?void 0:r.value)||""),[s]=ye.useDebouncedValue(o,Tt),a=v.useMemo(()=>{var u;return(u=Object.entries((n==null?void 0:n.filters)||{}).find(([,d])=>d.filters.find(f=>f.operator===zt)))==null?void 0:u[0]},[n==null?void 0:n.filters]);ye.useDidUpdate(()=>{r&&r.value!==s&&i(r.value)},[r]),ye.useDidUpdate(()=>{var y;if(!a)return;const u=((y=e==null?void 0:e.filters)==null?void 0:y.filter(b=>b.opr!==zt))||[],d={col:a,opr:zt,value:s};s&&u.push(d);const f=JSON.stringify(u),p=JSON.stringify((e==null?void 0:e.filters)||[]);f!==p&&t({page:0,filters:u})},[s]);const l=v.useMemo(()=>{const u={disabled:!a};return a||(u.placeholder="No global filter available"),u},[a]);return{manualFiltering:!0,onGlobalFilterChange:i,state:{globalFilter:o},mantineSearchTextInputProps:l}}function UO(e){const{data:t,queryParams:n,setQueryParams:r}=X(),o=v.useMemo(()=>({pageIndex:(n==null?void 0:n.page)||xs,pageSize:(n==null?void 0:n.page_size)||Os}),[n==null?void 0:n.page,n==null?void 0:n.page_size]),i=v.useCallback(s=>{const a=s(o);!(t!=null&&t.count)&&a.pageIndex===0||r({page:a.pageIndex,page_size:a.pageSize})},[t==null?void 0:t.count,o,r]);return{enablePagination:!e,manualPagination:!0,state:{pagination:o},onPaginationChange:i}}function VO(e){const{ref:t,height:n}=ye.useElementSize(),{ref:r,height:o}=ye.useElementSize(),i=v.useMemo(()=>{const u={h:"100%",withBorder:e};return e||(u.shadow=void 0),u},[e]),s=v.useMemo(()=>({ref:r}),[r]),a=v.useMemo(()=>({ref:t,pos:"sticky",bottom:0}),[t]),l=v.useMemo(()=>({h:`calc(100% - ${o+n}px)`}),[o,n]);return{mantinePaperProps:i,mantineTopToolbarProps:s,mantineBottomToolbarProps:a,mantineTableContainerProps:l}}function WO(){const{queryParams:e,setQueryParams:t,data:n}=X(),r=v.useMemo(()=>e!=null&&e.order_column?[{id:e.order_column.split(".id")[0],desc:e.order_direction==="desc"}]:[],[e==null?void 0:e.order_column,e==null?void 0:e.order_direction]),o=v.useCallback(i=>{const s=i(r);if(!s.length){t({order_column:null,order_direction:null});return}const a=s[0];t({order_column:n.order_columns.includes(a.id)?a.id:`${a.id}.id`,order_direction:a.desc?"desc":"asc"})},[n==null?void 0:n.order_columns,t,r]);return{manualSorting:!0,state:{sorting:r},onSortingChange:o}}function GO({table:e,...t}){const[n,r]=v.useState(!1),{download:o}=X(),i={variant:"transparent",size:"md",c:"gray"},s=h.useProps("ActionIcon",i,t);return n?c.jsx(h.ThemeIcon,{variant:"transparent",size:s.size,c:s.c,children:c.jsx(h.Loader,{size:"100%",color:s.c})}):c.jsx(h.Tooltip,{label:e.options.localization.download??"Download",children:c.jsx(h.ActionIcon,{variant:s.variant,size:s.size,c:s.c,className:"filterButton",onClick:()=>{r(!0),o("download").then(()=>r(!1))},children:c.jsx(Ea,{})})})}function HO({table:e,...t}){const[n,r]=v.useState(!1),{loading:o,refetch:i}=X(),s={variant:"transparent",size:"md",c:"gray"},a=h.useProps("ActionIcon",s,t);return v.useEffect(()=>{o||r(!1)},[o]),n?c.jsx(h.ThemeIcon,{variant:"transparent",size:a.size,c:a.c,children:c.jsx(h.Loader,{size:"100%",color:a.c})}):c.jsx(h.Tooltip,{label:e.options.localization.refresh??"Refresh",children:c.jsx(h.ActionIcon,{variant:a.variant,size:a.size,c:a.c,className:"filterButton",onClick:()=>{r(!0),i()},children:c.jsx(sh,{})})})}const ms={toggleGlobalFilter:1,filter:2,download:3,add:4,refresh:5,showHideColumns:6,toggleDensePadding:7,toggleFullScreen:8};function YO(e,t){return{1:c.jsx(Je.MRT_ToggleGlobalFilterButton,{table:e,disabled:!1},"basic-1"),2:c.jsx(Je.MRT_ToggleFiltersButton,{table:e},"basic-2"),3:(t==null?void 0:t["3"])&&c.jsx(GO,{table:e},"basic-3"),4:(t==null?void 0:t["4"])&&c.jsx(ps,{tooltipProps:{label:e.options.localization.add}},"basic-4"),5:c.jsx(HO,{table:e},"basic-5"),6:c.jsx(Je.MRT_ShowHideColumnsButton,{table:e},"basic-6"),7:c.jsx(Je.MRT_ToggleDensePaddingButton,{table:e},"basic-7"),8:c.jsx(Je.MRT_ToggleFullScreenButton,{table:e},"basic-8")}}function Fd(e,t,n,r){Object.entries(e||{}).forEach(([i,s])=>{i in ms&&(t[ms[i]]=c.jsx(it,{fallback:t[ms[i]],functionProps:n,children:s},`custom-${i}`))});let o=Object.values(t);return Object.entries(r||{}).forEach(([i,s])=>{i=Number(i)-1;const a=c.jsx(it,{functionProps:n,children:s},`order-${i}`);i>o.length?o.push(a):o=[...o.slice(0,i),a,...o.slice(i)]}),c.jsx(h.Flex,{gap:"0.125rem",align:"center",children:o})}function qO(e={},t,n){const{info:r,queryParams:o,setQueryParams:i}=X(),s=X(),a=Pt(),{customizer:l,custom:u,leftToolbar:d}=e,f=v.useMemo(()=>t?[{label:"All",value:"[]"},...t.map(b=>({label:b.name,value:JSON.stringify(b.value)}))]:[],[t]),p=v.useMemo(()=>f.length?c.jsx(h.SegmentedControl,{value:JSON.stringify((o==null?void 0:o.filters)||[]),onChange:b=>i({filters:JSON.parse(b)}),data:f}):null,[o==null?void 0:o.filters,f,i]);return{renderToolbarInternalActions:v.useCallback(({table:b})=>{const g={api:s,auth:a,mrtProps:{table:b}},w={3:r==null?void 0:r.permissions.includes("can_download"),4:r==null?void 0:r.permissions.includes("can_post")},E=YO(b,w);return Fd(l,E,g,u)},[s,a,u,l,r==null?void 0:r.permissions]),enableTopToolbar:!n,enableFilters:(l==null?void 0:l.filter)!==null,...v.useMemo(()=>{if(p&&d)throw new Error("quickFilters and toolbar.leftToolbar are mutually exclusive, please use only one of them");const b={};if(p&&(b.renderTopToolbarCustomActions=()=>c.jsx(h.Group,{justify:"space-between",children:c.jsx(h.Box,{children:p})}),b.positionToolbarAlertBanner="bottom"),d){const{custom:g}=d;b.renderTopToolbarCustomActions=({table:w})=>Fd(void 0,{},{api:s,auth:a,mrtProps:{table:w}},g),b.positionToolbarAlertBanner="bottom"}return b},[s,a,d,p])}}const Dd={"toolbar-alert":"_toolbar-alert_bw71q_25","head-overlay":"_head-overlay_bw71q_28"},JO=({alertBanner:e,table:t,...n})=>{var oe,he;const{getFilteredSelectedRowModel:r,getPrePaginationRowModel:o,getState:i,resetRowSelection:s,options:{enableRowSelection:a,enableSelectAll:l,icons:{IconX:u},localization:d,mantineToolbarAlertBannerBadgeProps:f,mantineToolbarAlertBannerProps:p,manualPagination:y,positionToolbarAlertBanner:b,rowCount:g}}=t,{density:w,grouping:E,rowSelection:F}=i(),{left:I,right:A,renderToolbarAlertBannerContent:_,wrapperProps:x}=e??{},{flex:k,group:G,stack:z}=x??{},m={...Te(p,{table:t}),...n},P=Te(f,{table:t}),L=g??o().flatRows.length,Y=v.useMemo(()=>y?Object.values(F).filter(Boolean).length:r().rows.length,[F,L,y]),q=Y?c.jsxs(h.Flex,{align:"center",gap:"sm",children:[(he=(oe=d.selectedCountOfRowCountRowsSelected)==null?void 0:oe.replace("{selectedCount}",Y.toString()))==null?void 0:he.replace("{rowCount}",L.toString()),c.jsx(h.Button,{onClick:s,size:"compact-xs",variant:"subtle",children:d.clearSelection}),c.jsx(h.Button,{onClick:le=>Je.getMRT_SelectAllHandler({table:t})(le,!1,!0),size:"compact-xs",variant:"subtle",children:d.clearSelectionOnThisPage??"Clear selection on this page"})]}):null,re=E.length>0?c.jsxs(h.Group,{gap:"xs",children:[d.groupedBy,E.map((le,xe)=>c.jsxs(v.Fragment,{children:[xe>0?d.thenBy:"",c.jsxs(h.Badge,{className:"alert-badge",rightSection:c.jsx(h.ActionIcon,{color:"white",onClick:()=>t.getColumn(le).toggleGrouping(),size:"xs",variant:"subtle",children:c.jsx(u,{style:{transform:"scale(0.8)"}})}),variant:"filled",...P,children:[t.getColumn(le).columnDef.header," "]})]},`${xe}-${le}`))]}):null;return c.jsxs(h.Flex,{className:xt(Dd["toolbar-alert"],b==="head-overlay"&&Dd["head-overlay"],w),...k,children:[a&&l&&b==="head-overlay"&&c.jsx(Je.MRT_SelectCheckbox,{table:t}),c.jsxs(h.Group,{align:"flex-start",gap:"xs",...G,children:[Te(I,{table:t}),so(Te(_,{selectedAlert:q,groupedAlert:re,table:t}),c.jsxs(h.Stack,{gap:"xs",...z,children:[m==null?void 0:m.children,q,re]})),Te(A,{table:t})]})]})};function KO(e){const{alertBanner:t}=e;return{renderToolbarAlertBannerContent:({table:n})=>c.jsx(JO,{alertBanner:t,table:n})}}function XO(){const{data:e}=X();return v.useMemo(()=>(e==null?void 0:e.result.length)>=1e3,[e])?{enableRowVirtualization:!0,rowVirtualizerOptions:{overscan:5}}:{}}const ZO={enableStickyHeader:!0,enableColumnPinning:!0},Nd=v.forwardRef((e,t)=>{var mt;const{info:n,data:r,queryParams:o,refetch:i,specialKey:s}=X(),a=h.useProps("NextGenDataGrid",{},{}),{fetchOnMount:l=!0,hideToolbar:u,hideActions:d,hidePagination:f,hideError:p,onSelectCheckbox:y,onClickEntry:b,bulkActions:g,table:w,quickFilters:E,withBorder:F,columnProps:I,header:A,body:_,form:x,toolbar:k={},textFilterSeparator:G=";",bodySeparator:z,bodyTruncate:m,headerCustomizer:P,bodyCustomizer:L,toolbarCustomizer:Y,hideAdd:q,hideDownload:re,hideFilter:oe,...he}=v.useMemo(()=>ct(a,e),[e,a]);z&&Object.keys(_).forEach(ae=>{_[ae]=_[ae]||{},_[ae].separator=_[ae].separator||z}),m&&Object.keys(_).forEach(ae=>{_[ae]=_[ae]||{},_[ae].truncate=_[ae].truncate||m}),P&&Object.keys(P).forEach(ae=>{A[ae]=A[ae]||{},A[ae].component=P[ae].component||P[ae]}),L&&Object.keys(L).forEach(ae=>{_[ae]=_[ae]||{},_[ae].component=L[ae].component||L[ae]}),Y&&(k.custom=k.custom||Y),q&&(k.customizer=k.customizer||{},k.customizer.add=k.customizer.add||null),re&&(k.customizer=k.customizer||{},k.customizer.download=k.customizer.download||null),oe&&(k.customizer=k.customizer||{},k.customizer.filter=k.customizer.filter||null),v.useEffect(()=>{process.env.NODE_ENV==="development"&&(z&&console.warn("bodySeparator is deprecated, please use body.[col].separator instead"),m&&console.warn("bodyTruncate is deprecated, please use body.[col].truncate instead"),P&&console.warn("headerCustomizer is deprecated, please use header.[col].component instead"),L&&console.warn("bodyCustomizer is deprecated, please use body.[col].component instead"),Y&&console.warn("toolbarCustomizer is deprecated, please use toolbar.custom instead"),q&&console.warn("hideAdd is deprecated, please use toolbar.customizer.add instead"),re&&console.warn("hideDownload is deprecated, please use toolbar.customizer.download instead"),oe&&console.warn("hideFilter is deprecated, please use toolbar.customizer.filter instead"))},[]);const le=LO(),xe=WO(),$=UO(f),C=NO(I,A,_,G),M=VO(F),N=xO(d,(mt=Lt(_,s.actions))==null?void 0:mt.component),W=BO(),B=XO(),J=qO(k,E,u),K=jO(b),Z=OO(y,g),ee=zO(),Q=KO(k),Ce=v.useMemo(()=>ct(ZO,{mantinePaperProps:{ref:t},getRowId:ae=>ae.id},C,le,xe,$,M,N,W,B,J,K,Z,ee,Q,w),[t,C,le,xe,$,M,N,W,B,J,K,Z,ee,Q,w]),j=Je.useMantineReactTable(Ce);v.useEffect(()=>{!o&&l&&i()},[]),v.useEffect(()=>{y==null||y(Object.keys(j.getState().rowSelection)),g==null||g.setSelectedIds(Object.keys(j.getState().rowSelection))},[g,r==null?void 0:r.ids,j.getState().rowSelection,y]);const{setView:ke}=ut("add"),{setView:Ue}=ut("edit");return v.useEffect(()=>{var ae,yt;(ae=x==null?void 0:x.add)!=null&&ae.initialView&&ke(x.add.initialView),(yt=x==null?void 0:x.edit)!=null&&yt.initialView&&Ue(x.edit.initialView)},[]),c.jsxs(h.Box,{h:"100%",w:"100%",pos:"relative",children:[c.jsxs(us,{cond:!!n,children:[c.jsx(hs,{jsonForms:x==null?void 0:x.add}),c.jsx(Ji,{jsonForms:x==null?void 0:x.edit})]}),c.jsx(Je.MantineReactTable,{table:j,...he}),p?null:c.jsx(Ki,{})]})});Nd.displayName="NextGenDataGrid";const ys={iconSmall:"_iconSmall_sxv3z_1",btn:"_btn_sxv3z_17"};function QO({basePath:e="/security",Target:t,children:n}){const r=Cs.useNavigate(),{user:o,signout:i}=Pt(),[s,a]=v.useState(!1),u=[{resource_name:e+"/users",label:"Users",name:"UsersApi",Icon:ah},{resource_name:e+"/roles",label:"Roles",name:"RolesApi",Icon:rh},{resource_name:e+"/permissions",label:"Base Permissions",name:"PermissionsApi",Icon:xa},{resource_name:e+"/permissionviews",label:"Permission on Views",name:"PermissionViewApi",Icon:xa},{resource_name:e+"/viewsmenus",label:"Views/Menus",name:"ViewsMenusApi",Icon:Rp}].filter(d=>o.permissions.includes(d.name));return c.jsxs(h.Menu,{width:260,position:"bottom-end",transition:"pop-top-right",withinPortal:!0,opened:s,onClose:()=>a(!1),onOpen:()=>a(!0),children:[c.jsx(h.Menu.Target,{children:t||c.jsx(h.UnstyledButton,{className:ys.btn,style:{borderRadius:4},p:"xs",children:c.jsxs(h.Group,{style:{flexWrap:"nowrap"},spacing:7,children:[c.jsx(h.Text,{weight:500,size:"sm",style:{lineHeight:1,whiteSpace:"nowrap"},mr:3,children:`${o.first_name} ${o.last_name}`}),c.jsx(Lo,{size:12})]})})}),c.jsxs(h.Menu.Dropdown,{children:[u.length?c.jsxs(c.Fragment,{children:[c.jsx(h.Menu.Label,{children:"Security"}),u.map((d,f)=>c.jsx(h.Menu.Item,{p:12,leftSection:c.jsx(d.Icon,{className:ys.iconSmall}),onClick:()=>r(d.resource_name),children:d.label},f)),c.jsx(h.Menu.Divider,{})]}):null,n,c.jsx(h.Menu.Item,{leftSection:c.jsx(oh,{p:12,className:ys.iconSmall}),onClick:i,children:"Logout"})]})]})}T.Actions=ds,T.Add=ps,T.AddDialog=hs,T.AlertDialog=Ia,T.ApiContext=to,T.ApiProvider=_a,T.AuthContext=ao,T.Body=pd,T.BulkActionsContext=co,T.DEBOUNCE_DELAY=Tt,T.DEFAULT_PAGE=xs,T.DEFAULT_PAGE_SIZE=Os,T.DataGrid=fs,T.Delete=$a,T.DeleteDialog=Rl,T.Download=md,T.Edit=ka,T.EditDialog=Ji,T.ErrorDialog=Ki,T.FallbackWrapper=it,T.Field=zn,T.FieldTitle=Yr,T.Filter=_d,T.FilterMenu=wd,T.FormAutocomplete=TO,T.FormContextAdd=uo,T.FormContextEdit=fo,T.FormDatePicker=yd,T.FormDateTimePicker=bd,T.FormField=as,T.FormFilterIn=ls,T.FormGeometryField=vd,T.FormJsonField=is,T.FormRelatedListSelect=Td,T.FormRelatedSelect=Sd,T.FormSelect=ss,T.FormTextField=Bn,T.GLOBAL_FILTER_OPERATOR=zt,T.HEADER_BETWEEN_OPERATOR=ro,T.HEADER_CONTAINS_TEXT_OPERATOR=no,T.HEADER_DATE_BETWEEN_OPERATOR=oo,T.HEADER_FILTER_START_KEYWORD=Bt,T.Header=rs,T.InfiniteScroll=AO,T.InfoContext=lo,T.LazyLoadWrapper=us,T.Main=gd,T.MantineArrayControlRenderer=cf,T.MantineBooleanCell=jl,T.MantineBooleanControl=vf,T.MantineBooleanInput=ui,T.MantineDateCell=Bl,T.MantineDateControl=Sf,T.MantineDateInput=fi,T.MantineDateTimeCell=Vl,T.MantineDateTimeControl=_f,T.MantineDateTimeInput=di,T.MantineEnumArrayInput=pi,T.MantineEnumArrayRenderer=gf,T.MantineEnumCell=Gl,T.MantineEnumControl=Ef,T.MantineEnumInput=yr,T.MantineHorizontalLayoutRenderer=Uf,T.MantineIntegerCell=Yl,T.MantineIntegerControl=xf,T.MantineJsonControl=Pf,T.MantineJsonInput=Nl,T.MantineLabelRenderer=zf,T.MantineLabelTester=jf,T.MantineLayoutRenderer=li,T.MantineNumberCell=Jl,T.MantineNumberControl=$f,T.MantineNumberInput=En,T.MantineOneOfEnumCell=Xl,T.MantineOneOfEnumControl=Mf,T.MantineOneOfEnumInput=hi,T.MantineRelationManyControl=yf,T.MantineRelationManyControlTester=mf,T.MantineRelationSingleControl=Df,T.MantineRelationSingleControlTester=Ff,T.MantineTableControl=af,T.MantineTextCell=Ql,T.MantineTextControl=Lf,T.MantineTextInput=gi,T.MantineVerticalLayoutRenderer=Wf,T.NextGenDataGrid=Nd,T.NoBorderTableCell=an,T.NonEmptyRow=sf,T.Pagination=os,T.Provider=ip,T.Row=dd,T.TableToolbar=ef,T.Toolbar=cs,T.UserMenu=QO,T.VIEW_MODE=_e,T.ValidationIcon=Ru,T.View=Ad,T.ViewDialog=Ed,T.ajv=rl,T.authInfo=Ns,T.authOAuthSignin=Ds,T.authResetPassword=Fs,T.authSignin=ks,T.authSignout=Ms,T.compareStateWithStore=Is,T.convertId=ze,T.convertInfo=va,T.convertLocalToUTCISOString=ci,T.convertToFormInputs=Kf,T.convertUTCISOStringToLocal=Il,T.createFetchParams=Ie,T.createItem=Vs,T.createProxy=Hn,T.createQueryParams=bn,T.deepMerge=ct,T.deleteItem=Ws,T.downloadData=Ta,T.fromFilterFnToFilter=xd,T.fromFilterToFilterFn=Un,T.getDefaultValues=po,T.getInfo=Gs,T.getItem=Hs,T.getItems=Ys,T.getProps=Lt,T.getUser=Ls,T.getValidationSchema=Do,T.getValue=gn,T.getValueOrDefault=so,T.initialState=Yn,T.isEnumArrayControl=uf,T.isJsonControl=ff,T.isRelationManyControl=df,T.isRelationSingleControl=pf,T.isSchemaTypeInclude=tt,T.isTruthy=Zo,T.mantineArrayControlTester=lf,T.mantineBooleanCellTester=Ll,T.mantineBooleanControlTester=bf,T.mantineCells=Gf,T.mantineDateCellTester=zl,T.mantineDateControlTester=Tf,T.mantineDateTimeCellTester=Ul,T.mantineDateTimeControlTester=wf,T.mantineEnumArrayRendererTester=hf,T.mantineEnumCellTester=Wl,T.mantineEnumControlTester=Cf,T.mantineHorizontalLayoutTester=Bf,T.mantineIntegerCellTester=Hl,T.mantineIntegerControlTester=Af,T.mantineJsonControlTester=Of,T.mantineNumberCellTester=ql,T.mantineNumberControlTester=If,T.mantineOneOfEnumCellTester=Kl,T.mantineOneOfEnumControlTester=kf,T.mantineRenderers=Hf,T.mantineTextCellTester=Zl,T.mantineTextControlTester=Nf,T.mantineVerticalLayoutTester=Vf,T.normalize=Ps,T.parseFromValuesOrFunc=Te,T.parseValue=io,T.postBulk=Js,T.showFilter=Ot,T.updateItem=qs,T.updateUser=js,T.urlJoin=we,T.useApi=X,T.useAuth=Pt,T.useBooleanProps=$l,T.useBulkActions=sp,T.useCommonProps=nt,T.useContextProps=Ze,T.useCustomFetch=_O,T.useDateProps=gr,T.useDebouncedChange=nm,T.useForms=ut,T.useInfo=$s,T.useJsonProps=kl,T.useMultiSelectProps=Ml,T.useNumberProps=Fl,T.useProvideApi=Sa,T.useProvideAuth=zs,T.useProvideBulk=wa,T.useProvideForm=No,T.useProvideInfo=Bs,T.useProxy=mn,T.useSelectProps=mr,T.useTextProps=Dl,T.useTrueOnce=Cd,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})});
202
+ export default theme;`}function Tu(e={},...t){const{breakpoints:n,mixins:o={},spacing:s,palette:a={},transitions:u={},typography:c={},shape:d,...h}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":ar(20));const y=wu(a),g=xh(e);let b=qt(g,{mixins:zE(g.breakpoints,o),palette:y,shadows:HE.slice(),typography:jE(y,c),transitions:KE(u),zIndex:{...JE}});if(b=qt(b,h),b=t.reduce((C,E)=>qt(C,E),b),process.env.NODE_ENV!=="production"){const C=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],E=(w,$)=>{let N;for(N in w){const J=w[N];if(C.includes(N)&&Object.keys(J).length>0){if(process.env.NODE_ENV!=="production"){const V=uu("",N);console.error([`MUI: The \`${$}\` component increases the CSS specificity of the \`${N}\` internal state.`,"You can not override it like this: ",JSON.stringify(w,null,2),"",`Instead, you need to use the '&.${V}' syntax:`,JSON.stringify({root:{[`&.${V}`]:J}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
203
+ `))}w[N]={}}}};Object.keys(b.components).forEach(w=>{const $=b.components[w].styleOverrides;$&&w.startsWith("Mui")&&E($,w)})}return b.unstable_sxConfig={...xs,...h==null?void 0:h.unstable_sxConfig},b.unstable_sx=function(E){return fi({sx:E,theme:this})},b.toRuntimeSource=jh,b}function XE(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const QE=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=XE(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function Wh(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Vh(e){return e==="dark"?QE:[]}function ex(e){const{palette:t={mode:"light"},opacity:n,overlays:o,...s}=e,a=wu(t);return{palette:a,opacity:{...Wh(a.mode),...n},overlays:o||Vh(a.mode),...s}}function tx(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const nx=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],rx=e=>(t,n)=>{const o=e.rootSelector||":root",s=e.colorSchemeSelector;let a=s;if(s==="class"&&(a=".%s"),s==="data"&&(a="[data-%s]"),s!=null&&s.startsWith("data-")&&!s.includes("%s")&&(a=`[${s}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const u={};return nx(e.cssVarPrefix).forEach(c=>{u[c]=n[c],delete n[c]}),a==="media"?{[o]:n,"@media (prefers-color-scheme: dark)":{[o]:u}}:a?{[a.replace("%s",t)]:u,[`${o}, ${a.replace("%s",t)}`]:n}:{[o]:{...n,...u}}}if(a&&a!=="media")return`${o}, ${a.replace("%s",String(t))}`}else if(t){if(a==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[o]:n}};if(a)return a.replace("%s",String(t))}return o};function ix(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function U(e,t,n){!e[t]&&n&&(e[t]=n)}function fo(e){return typeof e!="string"||!e.startsWith("hsl")?e:Ph(e)}function Hn(e,t){`${t}Channel`in e||(e[`${t}Channel`]=lo(fo(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
204
+ To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function ox(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const $n=e=>{try{return e()}catch{}},sx=(e="mui")=>EE(e);function Su(e,t,n,o){if(!t)return;t=t===!0?{}:t;const s=o==="dark"?"dark":"light";if(!n){e[o]=ex({...t,palette:{mode:s,...t==null?void 0:t.palette}});return}const{palette:a,...u}=Tu({...n,palette:{mode:s,...t==null?void 0:t.palette}});return e[o]={...t,palette:a,opacity:{...Wh(s),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||Vh(s)},u}function ax(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:o,disableCssColorScheme:s=!1,cssVarPrefix:a="mui",shouldSkipGeneratingVar:u=tx,colorSchemeSelector:c=n.light&&n.dark?"media":void 0,rootSelector:d=":root",...h}=e,y=Object.keys(n)[0],g=o||(n.light&&y!=="light"?"light":y),b=sx(a),{[g]:C,light:E,dark:w,...$}=n,N={...$};let J=C;if((g==="dark"&&!("dark"in n)||g==="light"&&!("light"in n))&&(J=!0),!J)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${g}\` option is either missing or invalid.`:ar(21,g));const V=Su(N,J,h,g);E&&!N.light&&Su(N,E,void 0,"light"),w&&!N.dark&&Su(N,w,void 0,"dark");let L={defaultColorScheme:g,...V,cssVarPrefix:a,colorSchemeSelector:c,rootSelector:d,getCssVar:b,colorSchemes:N,font:{...BE(V.typography),...V.font},spacing:ox(h.spacing)};Object.keys(L.colorSchemes).forEach(te=>{const S=L.colorSchemes[te].palette,W=Q=>{const fe=Q.split("-"),he=fe[1],Fe=fe[2];return b(Q,S[he][Fe])};if(S.mode==="light"&&(U(S.common,"background","#fff"),U(S.common,"onBackground","#000")),S.mode==="dark"&&(U(S.common,"background","#000"),U(S.common,"onBackground","#fff")),ix(S,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),S.mode==="light"){U(S.Alert,"errorColor",Ye(S.error.light,.6)),U(S.Alert,"infoColor",Ye(S.info.light,.6)),U(S.Alert,"successColor",Ye(S.success.light,.6)),U(S.Alert,"warningColor",Ye(S.warning.light,.6)),U(S.Alert,"errorFilledBg",W("palette-error-main")),U(S.Alert,"infoFilledBg",W("palette-info-main")),U(S.Alert,"successFilledBg",W("palette-success-main")),U(S.Alert,"warningFilledBg",W("palette-warning-main")),U(S.Alert,"errorFilledColor",$n(()=>S.getContrastText(S.error.main))),U(S.Alert,"infoFilledColor",$n(()=>S.getContrastText(S.info.main))),U(S.Alert,"successFilledColor",$n(()=>S.getContrastText(S.success.main))),U(S.Alert,"warningFilledColor",$n(()=>S.getContrastText(S.warning.main))),U(S.Alert,"errorStandardBg",Re(S.error.light,.9)),U(S.Alert,"infoStandardBg",Re(S.info.light,.9)),U(S.Alert,"successStandardBg",Re(S.success.light,.9)),U(S.Alert,"warningStandardBg",Re(S.warning.light,.9)),U(S.Alert,"errorIconColor",W("palette-error-main")),U(S.Alert,"infoIconColor",W("palette-info-main")),U(S.Alert,"successIconColor",W("palette-success-main")),U(S.Alert,"warningIconColor",W("palette-warning-main")),U(S.AppBar,"defaultBg",W("palette-grey-100")),U(S.Avatar,"defaultBg",W("palette-grey-400")),U(S.Button,"inheritContainedBg",W("palette-grey-300")),U(S.Button,"inheritContainedHoverBg",W("palette-grey-A100")),U(S.Chip,"defaultBorder",W("palette-grey-400")),U(S.Chip,"defaultAvatarColor",W("palette-grey-700")),U(S.Chip,"defaultIconColor",W("palette-grey-700")),U(S.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),U(S.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),U(S.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),U(S.LinearProgress,"primaryBg",Re(S.primary.main,.62)),U(S.LinearProgress,"secondaryBg",Re(S.secondary.main,.62)),U(S.LinearProgress,"errorBg",Re(S.error.main,.62)),U(S.LinearProgress,"infoBg",Re(S.info.main,.62)),U(S.LinearProgress,"successBg",Re(S.success.main,.62)),U(S.LinearProgress,"warningBg",Re(S.warning.main,.62)),U(S.Skeleton,"bg",`rgba(${W("palette-text-primaryChannel")} / 0.11)`),U(S.Slider,"primaryTrack",Re(S.primary.main,.62)),U(S.Slider,"secondaryTrack",Re(S.secondary.main,.62)),U(S.Slider,"errorTrack",Re(S.error.main,.62)),U(S.Slider,"infoTrack",Re(S.info.main,.62)),U(S.Slider,"successTrack",Re(S.success.main,.62)),U(S.Slider,"warningTrack",Re(S.warning.main,.62));const Q=Ps(S.background.default,.8);U(S.SnackbarContent,"bg",Q),U(S.SnackbarContent,"color",$n(()=>S.getContrastText(Q))),U(S.SpeedDialAction,"fabHoverBg",Ps(S.background.paper,.15)),U(S.StepConnector,"border",W("palette-grey-400")),U(S.StepContent,"border",W("palette-grey-400")),U(S.Switch,"defaultColor",W("palette-common-white")),U(S.Switch,"defaultDisabledColor",W("palette-grey-100")),U(S.Switch,"primaryDisabledColor",Re(S.primary.main,.62)),U(S.Switch,"secondaryDisabledColor",Re(S.secondary.main,.62)),U(S.Switch,"errorDisabledColor",Re(S.error.main,.62)),U(S.Switch,"infoDisabledColor",Re(S.info.main,.62)),U(S.Switch,"successDisabledColor",Re(S.success.main,.62)),U(S.Switch,"warningDisabledColor",Re(S.warning.main,.62)),U(S.TableCell,"border",Re(Is(S.divider,1),.88)),U(S.Tooltip,"bg",Is(S.grey[700],.92))}if(S.mode==="dark"){U(S.Alert,"errorColor",Re(S.error.light,.6)),U(S.Alert,"infoColor",Re(S.info.light,.6)),U(S.Alert,"successColor",Re(S.success.light,.6)),U(S.Alert,"warningColor",Re(S.warning.light,.6)),U(S.Alert,"errorFilledBg",W("palette-error-dark")),U(S.Alert,"infoFilledBg",W("palette-info-dark")),U(S.Alert,"successFilledBg",W("palette-success-dark")),U(S.Alert,"warningFilledBg",W("palette-warning-dark")),U(S.Alert,"errorFilledColor",$n(()=>S.getContrastText(S.error.dark))),U(S.Alert,"infoFilledColor",$n(()=>S.getContrastText(S.info.dark))),U(S.Alert,"successFilledColor",$n(()=>S.getContrastText(S.success.dark))),U(S.Alert,"warningFilledColor",$n(()=>S.getContrastText(S.warning.dark))),U(S.Alert,"errorStandardBg",Ye(S.error.light,.9)),U(S.Alert,"infoStandardBg",Ye(S.info.light,.9)),U(S.Alert,"successStandardBg",Ye(S.success.light,.9)),U(S.Alert,"warningStandardBg",Ye(S.warning.light,.9)),U(S.Alert,"errorIconColor",W("palette-error-main")),U(S.Alert,"infoIconColor",W("palette-info-main")),U(S.Alert,"successIconColor",W("palette-success-main")),U(S.Alert,"warningIconColor",W("palette-warning-main")),U(S.AppBar,"defaultBg",W("palette-grey-900")),U(S.AppBar,"darkBg",W("palette-background-paper")),U(S.AppBar,"darkColor",W("palette-text-primary")),U(S.Avatar,"defaultBg",W("palette-grey-600")),U(S.Button,"inheritContainedBg",W("palette-grey-800")),U(S.Button,"inheritContainedHoverBg",W("palette-grey-700")),U(S.Chip,"defaultBorder",W("palette-grey-700")),U(S.Chip,"defaultAvatarColor",W("palette-grey-300")),U(S.Chip,"defaultIconColor",W("palette-grey-300")),U(S.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),U(S.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),U(S.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),U(S.LinearProgress,"primaryBg",Ye(S.primary.main,.5)),U(S.LinearProgress,"secondaryBg",Ye(S.secondary.main,.5)),U(S.LinearProgress,"errorBg",Ye(S.error.main,.5)),U(S.LinearProgress,"infoBg",Ye(S.info.main,.5)),U(S.LinearProgress,"successBg",Ye(S.success.main,.5)),U(S.LinearProgress,"warningBg",Ye(S.warning.main,.5)),U(S.Skeleton,"bg",`rgba(${W("palette-text-primaryChannel")} / 0.13)`),U(S.Slider,"primaryTrack",Ye(S.primary.main,.5)),U(S.Slider,"secondaryTrack",Ye(S.secondary.main,.5)),U(S.Slider,"errorTrack",Ye(S.error.main,.5)),U(S.Slider,"infoTrack",Ye(S.info.main,.5)),U(S.Slider,"successTrack",Ye(S.success.main,.5)),U(S.Slider,"warningTrack",Ye(S.warning.main,.5));const Q=Ps(S.background.default,.98);U(S.SnackbarContent,"bg",Q),U(S.SnackbarContent,"color",$n(()=>S.getContrastText(Q))),U(S.SpeedDialAction,"fabHoverBg",Ps(S.background.paper,.15)),U(S.StepConnector,"border",W("palette-grey-600")),U(S.StepContent,"border",W("palette-grey-600")),U(S.Switch,"defaultColor",W("palette-grey-300")),U(S.Switch,"defaultDisabledColor",W("palette-grey-600")),U(S.Switch,"primaryDisabledColor",Ye(S.primary.main,.55)),U(S.Switch,"secondaryDisabledColor",Ye(S.secondary.main,.55)),U(S.Switch,"errorDisabledColor",Ye(S.error.main,.55)),U(S.Switch,"infoDisabledColor",Ye(S.info.main,.55)),U(S.Switch,"successDisabledColor",Ye(S.success.main,.55)),U(S.Switch,"warningDisabledColor",Ye(S.warning.main,.55)),U(S.TableCell,"border",Ye(Is(S.divider,1),.68)),U(S.Tooltip,"bg",Is(S.grey[700],.92))}Hn(S.background,"default"),Hn(S.background,"paper"),Hn(S.common,"background"),Hn(S.common,"onBackground"),Hn(S,"divider"),Object.keys(S).forEach(Q=>{const fe=S[Q];Q!=="tonalOffset"&&fe&&typeof fe=="object"&&(fe.main&&U(S[Q],"mainChannel",lo(fo(fe.main))),fe.light&&U(S[Q],"lightChannel",lo(fo(fe.light))),fe.dark&&U(S[Q],"darkChannel",lo(fo(fe.dark))),fe.contrastText&&U(S[Q],"contrastTextChannel",lo(fo(fe.contrastText))),Q==="text"&&(Hn(S[Q],"primary"),Hn(S[Q],"secondary")),Q==="action"&&(fe.active&&Hn(S[Q],"active"),fe.selected&&Hn(S[Q],"selected")))})}),L=t.reduce((te,S)=>qt(te,S),L);const D={prefix:a,disableCssColorScheme:s,shouldSkipGeneratingVar:u,getSelector:rx(L)},{vars:B,generateThemeVars:Y,generateStyleSheets:ae}=OE(L,D);return L.vars=B,Object.entries(L.colorSchemes[L.defaultColorScheme]).forEach(([te,S])=>{L[te]=S}),L.generateThemeVars=Y,L.generateStyleSheets=ae,L.generateSpacing=function(){return Eh(h.spacing,cu(this))},L.getColorSchemeSelector=IE(c),L.spacing=L.generateSpacing(),L.shouldSkipGeneratingVar=u,L.unstable_sxConfig={...xs,...h==null?void 0:h.unstable_sxConfig},L.unstable_sx=function(S){return fi({sx:S,theme:this})},L.toRuntimeSource=jh,L}function Gh(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:wu({...n===!0?{}:n.palette,mode:t})})}function lx(e={},...t){const{palette:n,cssVariables:o=!1,colorSchemes:s=n?void 0:{light:!0},defaultColorScheme:a=n==null?void 0:n.mode,...u}=e,c=a||"light",d=s==null?void 0:s[c],h={...s,...n?{[c]:{...typeof d!="boolean"&&d,palette:n}}:void 0};if(o===!1){if(!("colorSchemes"in e))return Tu(e,...t);let y=n;"palette"in e||h[c]&&(h[c]!==!0?y=h[c].palette:c==="dark"&&(y={mode:"dark"}));const g=Tu({...e,palette:y},...t);return g.defaultColorScheme=c,g.colorSchemes=h,g.palette.mode==="light"&&(g.colorSchemes.light={...h.light!==!0&&h.light,palette:g.palette},Gh(g,"dark",h.dark)),g.palette.mode==="dark"&&(g.colorSchemes.dark={...h.dark!==!0&&h.dark,palette:g.palette},Gh(g,"light",h.light)),g}return!n&&!("light"in h)&&c==="light"&&(h.light=!0),ax({...u,colorSchemes:h,defaultColorScheme:c,...typeof o!="boolean"&&o},...t)}const ux=lx(),cx="$$material";function fx(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const dx=dE({themeId:cx,defaultTheme:ux,rootShouldForwardProp:e=>fx(e)&&e!=="classes"}),px=CE;process.env.NODE_ENV!=="production"&&(ke.node,ke.object.isRequired);function hx(e){return SE(e)}function gx(e){return uu("MuiSvgIcon",e)}GS("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const mx=e=>{const{color:t,fontSize:n,classes:o}=e,s={root:["root",t!=="inherit"&&`color${kr(t)}`,`fontSize${kr(n)}`]};return jS(s,gx,o)},yx=dx("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${kr(n.color)}`],t[`fontSize${kr(n.fontSize)}`]]}})(px(({theme:e})=>{var t,n,o,s,a,u,c,d,h,y,g,b,C,E;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(s=(t=e.transitions)==null?void 0:t.create)==null?void 0:s.call(t,"fill",{duration:(o=(n=(e.vars??e).transitions)==null?void 0:n.duration)==null?void 0:o.shorter}),variants:[{props:w=>!w.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((u=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:u.call(a,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((d=(c=e.typography)==null?void 0:c.pxToRem)==null?void 0:d.call(c,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((y=(h=e.typography)==null?void 0:h.pxToRem)==null?void 0:y.call(h,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,w])=>w&&w.main).map(([w])=>{var $,N;return{props:{color:w},style:{color:(N=($=(e.vars??e).palette)==null?void 0:$[w])==null?void 0:N.main}}}),{props:{color:"action"},style:{color:(b=(g=(e.vars??e).palette)==null?void 0:g.action)==null?void 0:b.active}},{props:{color:"disabled"},style:{color:(E=(C=(e.vars??e).palette)==null?void 0:C.action)==null?void 0:E.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),$s=Mt.forwardRef(function(t,n){const o=hx({props:t,name:"MuiSvgIcon"}),{children:s,className:a,color:u="inherit",component:c="svg",fontSize:d="medium",htmlColor:h,inheritViewBox:y=!1,titleAccess:g,viewBox:b="0 0 24 24",...C}=o,E=Mt.isValidElement(s)&&s.type==="svg",w={...o,color:u,component:c,fontSize:d,instanceFontSize:t.fontSize,inheritViewBox:y,viewBox:b,hasSvgAsChild:E},$={};y||($.viewBox=b);const N=mx(w);return p.jsxs(yx,{as:c,className:Ar(N.root,a),focusable:"false",color:h,"aria-hidden":g?void 0:!0,role:g?"img":void 0,ref:n,...$,...C,...E&&s.props,ownerState:w,children:[E?s.props.children:s,g?p.jsx("title",{children:g}):null]})});process.env.NODE_ENV!=="production"&&($s.propTypes={children:ke.node,classes:ke.object,className:ke.string,color:ke.oneOfType([ke.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),ke.string]),component:ke.elementType,fontSize:ke.oneOfType([ke.oneOf(["inherit","large","medium","small"]),ke.string]),htmlColor:ke.string,inheritViewBox:ke.bool,shapeRendering:ke.string,sx:ke.oneOfType([ke.arrayOf(ke.oneOfType([ke.func,ke.object,ke.bool])),ke.func,ke.object]),titleAccess:ke.string,viewBox:ke.string}),$s.muiName="SvgIcon";function Cu(e,t){function n(o,s){return p.jsx($s,{"data-testid":`${t}Icon`,ref:s,...o,children:e})}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=$s.muiName,Mt.memo(Mt.forwardRef(n))}const vx=Cu(p.jsx("path",{d:"m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z"}),"ArrowDownward"),bx=Cu(p.jsx("path",{d:"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8z"}),"ArrowUpward"),_x=Cu(p.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete");function wx(){this.__data__=[],this.size=0}var Tx=wx;function Sx(e,t){return e===t||e!==e&&t!==t}var Ms=Sx,Cx=Ms;function Ex(e,t){for(var n=e.length;n--;)if(Cx(e[n][0],t))return n;return-1}var Fs=Ex,xx=Fs,Ax=Array.prototype,Ox=Ax.splice;function Ix(e){var t=this.__data__,n=xx(t,e);if(n<0)return!1;var o=t.length-1;return n==o?t.pop():Ox.call(t,n,1),--this.size,!0}var Px=Ix,$x=Fs;function Mx(e){var t=this.__data__,n=$x(t,e);return n<0?void 0:t[n][1]}var Fx=Mx,Dx=Fs;function kx(e){return Dx(this.__data__,e)>-1}var Nx=kx,Lx=Fs;function Bx(e,t){var n=this.__data__,o=Lx(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}var zx=Bx,Ux=Tx,jx=Px,Wx=Fx,Vx=Nx,Gx=zx;function yi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}yi.prototype.clear=Ux,yi.prototype.delete=jx,yi.prototype.get=Wx,yi.prototype.has=Vx,yi.prototype.set=Gx;var Ds=yi,Hx=Ds;function Yx(){this.__data__=new Hx,this.size=0}var Rx=Yx;function qx(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var Kx=qx;function Jx(e){return this.__data__.get(e)}var Zx=Jx;function Xx(e){return this.__data__.has(e)}var Qx=Xx,eA=Fr,tA=eA(Object,"create"),ks=tA,Hh=ks;function nA(){this.__data__=Hh?Hh(null):{},this.size=0}var rA=nA;function iA(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var oA=iA,sA=ks,aA="__lodash_hash_undefined__",lA=Object.prototype,uA=lA.hasOwnProperty;function cA(e){var t=this.__data__;if(sA){var n=t[e];return n===aA?void 0:n}return uA.call(t,e)?t[e]:void 0}var fA=cA,dA=ks,pA=Object.prototype,hA=pA.hasOwnProperty;function gA(e){var t=this.__data__;return dA?t[e]!==void 0:hA.call(t,e)}var mA=gA,yA=ks,vA="__lodash_hash_undefined__";function bA(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=yA&&t===void 0?vA:t,this}var _A=bA,wA=rA,TA=oA,SA=fA,CA=mA,EA=_A;function vi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}vi.prototype.clear=wA,vi.prototype.delete=TA,vi.prototype.get=SA,vi.prototype.has=CA,vi.prototype.set=EA;var xA=vi,Yh=xA,AA=Ds,OA=Bl;function IA(){this.size=0,this.__data__={hash:new Yh,map:new(OA||AA),string:new Yh}}var PA=IA;function $A(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var MA=$A,FA=MA;function DA(e,t){var n=e.__data__;return FA(t)?n[typeof t=="string"?"string":"hash"]:n.map}var Ns=DA,kA=Ns;function NA(e){var t=kA(this,e).delete(e);return this.size-=t?1:0,t}var LA=NA,BA=Ns;function zA(e){return BA(this,e).get(e)}var UA=zA,jA=Ns;function WA(e){return jA(this,e).has(e)}var VA=WA,GA=Ns;function HA(e,t){var n=GA(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}var YA=HA,RA=PA,qA=LA,KA=UA,JA=VA,ZA=YA;function bi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}bi.prototype.clear=RA,bi.prototype.delete=qA,bi.prototype.get=KA,bi.prototype.has=JA,bi.prototype.set=ZA;var Rh=bi,XA=Ds,QA=Bl,eO=Rh,tO=200;function nO(e,t){var n=this.__data__;if(n instanceof XA){var o=n.__data__;if(!QA||o.length<tO-1)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new eO(o)}return n.set(e,t),this.size=n.size,this}var rO=nO,iO=Ds,oO=Rx,sO=Kx,aO=Zx,lO=Qx,uO=rO;function _i(e){var t=this.__data__=new iO(e);this.size=t.size}_i.prototype.clear=oO,_i.prototype.delete=sO,_i.prototype.get=aO,_i.prototype.has=lO,_i.prototype.set=uO;var cO=_i,fO=Fr,dO=function(){try{var e=fO(Object,"defineProperty");return e({},"",{}),e}catch{}}(),qh=dO,Kh=qh;function pO(e,t,n){t=="__proto__"&&Kh?Kh(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Eu=pO,hO=Eu,gO=Ms;function mO(e,t,n){(n!==void 0&&!gO(e[t],n)||n===void 0&&!(t in e))&&hO(e,t,n)}var Jh=mO;function yO(e){return function(t,n,o){for(var s=-1,a=Object(t),u=o(t),c=u.length;c--;){var d=u[e?c:++s];if(n(a[d],d,a)===!1)break}return t}}var vO=yO,bO=vO,_O=bO(),wO=_O,Ls={exports:{}};Ls.exports,function(e,t){var n=bn,o=t&&!t.nodeType&&t,s=o&&!0&&e&&!e.nodeType&&e,a=s&&s.exports===o,u=a?n.Buffer:void 0,c=u?u.allocUnsafe:void 0;function d(h,y){if(y)return h.slice();var g=h.length,b=c?c(g):new h.constructor(g);return h.copy(b),b}e.exports=d}(Ls,Ls.exports);var TO=Ls.exports,SO=bn,CO=SO.Uint8Array,EO=CO,Zh=EO;function xO(e){var t=new e.constructor(e.byteLength);return new Zh(t).set(new Zh(e)),t}var AO=xO,OO=AO;function IO(e,t){var n=t?OO(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var PO=IO;function $O(e,t){var n=-1,o=e.length;for(t||(t=Array(o));++n<o;)t[n]=e[n];return t}var MO=$O,FO=Wn,Xh=Object.create,DO=function(){function e(){}return function(t){if(!FO(t))return{};if(Xh)return Xh(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),kO=DO,NO=sp,LO=NO(Object.getPrototypeOf,Object),Qh=LO,BO=kO,zO=Qh,UO=os;function jO(e){return typeof e.constructor=="function"&&!UO(e)?BO(zO(e)):{}}var WO=jO,VO=as,GO=li;function HO(e){return GO(e)&&VO(e)}var eg=HO,YO=ai,RO=Qh,qO=li,KO="[object Object]",JO=Function.prototype,ZO=Object.prototype,tg=JO.toString,XO=ZO.hasOwnProperty,QO=tg.call(Object);function e2(e){if(!qO(e)||YO(e)!=KO)return!1;var t=RO(e);if(t===null)return!0;var n=XO.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&tg.call(n)==QO}var t2=e2;function n2(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var ng=n2,r2=Eu,i2=Ms,o2=Object.prototype,s2=o2.hasOwnProperty;function a2(e,t,n){var o=e[t];(!(s2.call(e,t)&&i2(o,n))||n===void 0&&!(t in e))&&r2(e,t,n)}var l2=a2,u2=l2,c2=Eu;function f2(e,t,n,o){var s=!n;n||(n={});for(var a=-1,u=t.length;++a<u;){var c=t[a],d=o?o(n[c],e[c],c,n,e):void 0;d===void 0&&(d=e[c]),s?c2(n,c,d):u2(n,c,d)}return n}var d2=f2;function p2(e,t){for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o}var h2=p2,g2=9007199254740991,m2=/^(?:0|[1-9]\d*)$/;function y2(e,t){var n=typeof e;return t=t??g2,!!t&&(n=="number"||n!="symbol"&&m2.test(e))&&e>-1&&e%1==0&&e<t}var rg=y2,v2=h2,b2=ss,_2=no,w2=Gl,T2=rg,S2=Hl,C2=Object.prototype,E2=C2.hasOwnProperty;function x2(e,t){var n=_2(e),o=!n&&b2(e),s=!n&&!o&&w2(e),a=!n&&!o&&!s&&S2(e),u=n||o||s||a,c=u?v2(e.length,String):[],d=c.length;for(var h in e)(t||E2.call(e,h))&&!(u&&(h=="length"||s&&(h=="offset"||h=="parent")||a&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||T2(h,d)))&&c.push(h);return c}var A2=x2;function O2(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var I2=O2,P2=Wn,$2=os,M2=I2,F2=Object.prototype,D2=F2.hasOwnProperty;function k2(e){if(!P2(e))return M2(e);var t=$2(e),n=[];for(var o in e)o=="constructor"&&(t||!D2.call(e,o))||n.push(o);return n}var N2=k2,L2=A2,B2=N2,z2=as;function U2(e){return z2(e)?L2(e,!0):B2(e)}var ig=U2,j2=d2,W2=ig;function V2(e){return j2(e,W2(e))}var G2=V2,og=Jh,H2=TO,Y2=PO,R2=MO,q2=WO,sg=ss,ag=no,K2=eg,J2=Gl,Z2=Nl,X2=Wn,Q2=t2,eI=Hl,lg=ng,tI=G2;function nI(e,t,n,o,s,a,u){var c=lg(e,n),d=lg(t,n),h=u.get(d);if(h){og(e,n,h);return}var y=a?a(c,d,n+"",e,t,u):void 0,g=y===void 0;if(g){var b=ag(d),C=!b&&J2(d),E=!b&&!C&&eI(d);y=d,b||C||E?ag(c)?y=c:K2(c)?y=R2(c):C?(g=!1,y=H2(d,!0)):E?(g=!1,y=Y2(d,!0)):y=[]:Q2(d)||sg(d)?(y=c,sg(c)?y=tI(c):(!X2(c)||Z2(c))&&(y=q2(d))):g=!1}g&&(u.set(d,y),s(y,d,o,a,u),u.delete(d)),og(e,n,y)}var rI=nI,iI=cO,oI=Jh,sI=wO,aI=rI,lI=Wn,uI=ig,cI=ng;function ug(e,t,n,o,s){e!==t&&sI(t,function(a,u){if(s||(s=new iI),lI(a))aI(e,t,u,n,ug,o,s);else{var c=o?o(cI(e,u),a,u+"",e,t,s):void 0;c===void 0&&(c=a),oI(e,u,c)}},uI)}var fI=ug;function dI(e){return e}var cg=dI;function pI(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var hI=pI,gI=hI,fg=Math.max;function mI(e,t,n){return t=fg(t===void 0?e.length-1:t,0),function(){for(var o=arguments,s=-1,a=fg(o.length-t,0),u=Array(a);++s<a;)u[s]=o[t+s];s=-1;for(var c=Array(t+1);++s<t;)c[s]=o[s];return c[t]=n(u),gI(e,this,c)}}var yI=mI;function vI(e){return function(){return e}}var bI=vI,_I=bI,dg=qh,wI=cg,TI=dg?function(e,t){return dg(e,"toString",{configurable:!0,enumerable:!1,value:_I(t),writable:!0})}:wI,SI=TI,CI=800,EI=16,xI=Date.now;function AI(e){var t=0,n=0;return function(){var o=xI(),s=EI-(o-n);if(n=o,s>0){if(++t>=CI)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var OI=AI,II=SI,PI=OI,$I=PI(II),MI=$I,FI=cg,DI=yI,kI=MI;function NI(e,t){return kI(DI(e,t,FI),e+"")}var pg=NI,LI=Ms,BI=as,zI=rg,UI=Wn;function jI(e,t,n){if(!UI(n))return!1;var o=typeof t;return(o=="number"?BI(n)&&zI(t,n.length):o=="string"&&t in n)?LI(n[t],e):!1}var hg=jI,WI=pg,VI=hg;function GI(e){return WI(function(t,n){var o=-1,s=n.length,a=s>1?n[s-1]:void 0,u=s>2?n[2]:void 0;for(a=e.length>3&&typeof a=="function"?(s--,a):void 0,u&&VI(n[0],n[1],u)&&(a=s<3?void 0:a,s=1),t=Object(t);++o<s;){var c=n[o];c&&e(t,c,o,a)}return t})}var HI=GI,YI=fI,RI=HI,qI=RI(function(e,t,n){YI(e,t,n)}),KI=qI;const JI=rr(KI);var ZI=Math.ceil,XI=Math.max;function QI(e,t,n,o){for(var s=-1,a=XI(ZI((t-e)/(n||1)),0),u=Array(a);a--;)u[o?a:++s]=e,e+=n;return u}var eP=QI,tP=ip,nP=1/0,rP=17976931348623157e292;function iP(e){if(!e)return e===0?e:0;if(e=tP(e),e===nP||e===-1/0){var t=e<0?-1:1;return t*rP}return e===e?e:0}var oP=iP,sP=eP,aP=hg,xu=oP;function lP(e){return function(t,n,o){return o&&typeof o!="number"&&aP(t,n,o)&&(n=o=void 0),t=xu(t),n===void 0?(n=t,t=0):n=xu(n),o=o===void 0?t<n?1:-1:xu(o),sP(t,n,o,e)}}var uP=lP,cP=uP,fP=cP(),dP=fP;const pP=rr(dP);function hP(e,t,n,o){var s=-1,a=e==null?0:e.length;for(o&&a&&(n=e[++s]);++s<a;)n=t(n,e[s],s,e);return n}var gP=hP;function mP(e){return function(t){return e==null?void 0:e[t]}}var yP=mP,vP=yP,bP={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},_P=vP(bP),wP=_P;function TP(e,t){for(var n=-1,o=e==null?0:e.length,s=Array(o);++n<o;)s[n]=t(e[n],n,e);return s}var SP=TP,gg=is,CP=SP,EP=no,xP=tp,mg=gg?gg.prototype:void 0,yg=mg?mg.toString:void 0;function vg(e){if(typeof e=="string")return e;if(EP(e))return CP(e,vg)+"";if(xP(e))return yg?yg.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var AP=vg,OP=AP;function IP(e){return e==null?"":OP(e)}var Au=IP,PP=wP,$P=Au,MP=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,FP="\\u0300-\\u036f",DP="\\ufe20-\\ufe2f",kP="\\u20d0-\\u20ff",NP=FP+DP+kP,LP="["+NP+"]",BP=RegExp(LP,"g");function zP(e){return e=$P(e),e&&e.replace(MP,PP).replace(BP,"")}var UP=zP,jP=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function WP(e){return e.match(jP)||[]}var VP=WP,GP=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function HP(e){return GP.test(e)}var YP=HP,bg="\\ud800-\\udfff",RP="\\u0300-\\u036f",qP="\\ufe20-\\ufe2f",KP="\\u20d0-\\u20ff",JP=RP+qP+KP,_g="\\u2700-\\u27bf",wg="a-z\\xdf-\\xf6\\xf8-\\xff",ZP="\\xac\\xb1\\xd7\\xf7",XP="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",QP="\\u2000-\\u206f",e$=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Tg="A-Z\\xc0-\\xd6\\xd8-\\xde",t$="\\ufe0e\\ufe0f",Sg=ZP+XP+QP+e$,Cg="['’]",Eg="["+Sg+"]",n$="["+JP+"]",xg="\\d+",r$="["+_g+"]",Ag="["+wg+"]",Og="[^"+bg+Sg+xg+_g+wg+Tg+"]",i$="\\ud83c[\\udffb-\\udfff]",o$="(?:"+n$+"|"+i$+")",s$="[^"+bg+"]",Ig="(?:\\ud83c[\\udde6-\\uddff]){2}",Pg="[\\ud800-\\udbff][\\udc00-\\udfff]",wi="["+Tg+"]",a$="\\u200d",$g="(?:"+Ag+"|"+Og+")",l$="(?:"+wi+"|"+Og+")",Mg="(?:"+Cg+"(?:d|ll|m|re|s|t|ve))?",Fg="(?:"+Cg+"(?:D|LL|M|RE|S|T|VE))?",Dg=o$+"?",kg="["+t$+"]?",u$="(?:"+a$+"(?:"+[s$,Ig,Pg].join("|")+")"+kg+Dg+")*",c$="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",f$="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",d$=kg+Dg+u$,p$="(?:"+[r$,Ig,Pg].join("|")+")"+d$,h$=RegExp([wi+"?"+Ag+"+"+Mg+"(?="+[Eg,wi,"$"].join("|")+")",l$+"+"+Fg+"(?="+[Eg,wi+$g,"$"].join("|")+")",wi+"?"+$g+"+"+Mg,wi+"+"+Fg,f$,c$,xg,p$].join("|"),"g");function g$(e){return e.match(h$)||[]}var m$=g$,y$=VP,v$=YP,b$=Au,_$=m$;function w$(e,t,n){return e=b$(e),t=n?void 0:t,t===void 0?v$(e)?_$(e):y$(e):e.match(t)||[]}var T$=w$,S$=gP,C$=UP,E$=T$,x$="['’]",A$=RegExp(x$,"g");function O$(e){return function(t){return S$(E$(C$(t).replace(A$,"")),e,"")}}var I$=O$;function P$(e,t,n){var o=-1,s=e.length;t<0&&(t=-t>s?0:s+t),n=n>s?s:n,n<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(s);++o<s;)a[o]=e[o+t];return a}var $$=P$,M$=$$;function F$(e,t,n){var o=e.length;return n=n===void 0?o:n,!t&&n>=o?e:M$(e,t,n)}var D$=F$,k$="\\ud800-\\udfff",N$="\\u0300-\\u036f",L$="\\ufe20-\\ufe2f",B$="\\u20d0-\\u20ff",z$=N$+L$+B$,U$="\\ufe0e\\ufe0f",j$="\\u200d",W$=RegExp("["+j$+k$+z$+U$+"]");function V$(e){return W$.test(e)}var Ng=V$;function G$(e){return e.split("")}var H$=G$,Lg="\\ud800-\\udfff",Y$="\\u0300-\\u036f",R$="\\ufe20-\\ufe2f",q$="\\u20d0-\\u20ff",K$=Y$+R$+q$,J$="\\ufe0e\\ufe0f",Z$="["+Lg+"]",Ou="["+K$+"]",Iu="\\ud83c[\\udffb-\\udfff]",X$="(?:"+Ou+"|"+Iu+")",Bg="[^"+Lg+"]",zg="(?:\\ud83c[\\udde6-\\uddff]){2}",Ug="[\\ud800-\\udbff][\\udc00-\\udfff]",Q$="\\u200d",jg=X$+"?",Wg="["+J$+"]?",eM="(?:"+Q$+"(?:"+[Bg,zg,Ug].join("|")+")"+Wg+jg+")*",tM=Wg+jg+eM,nM="(?:"+[Bg+Ou+"?",Ou,zg,Ug,Z$].join("|")+")",rM=RegExp(Iu+"(?="+Iu+")|"+nM+tM,"g");function iM(e){return e.match(rM)||[]}var oM=iM,sM=H$,aM=Ng,lM=oM;function uM(e){return aM(e)?lM(e):sM(e)}var cM=uM,fM=D$,dM=Ng,pM=cM,hM=Au;function gM(e){return function(t){t=hM(t);var n=dM(t)?pM(t):void 0,o=n?n[0]:t.charAt(0),s=n?fM(n,1).join(""):t.slice(1);return o[e]()+s}}var mM=gM,yM=mM,vM=yM("toUpperCase"),bM=vM,_M=I$,wM=bM,TM=_M(function(e,t,n){return e+(n?" ":"")+wM(t)}),SM=TM;const CM=rr(SM);function EM(e,t){for(var n=-1,o=t.length,s=e.length;++n<o;)e[s+n]=t[n];return e}var xM=EM,Vg=is,AM=ss,OM=no,Gg=Vg?Vg.isConcatSpreadable:void 0;function IM(e){return OM(e)||AM(e)||!!(Gg&&e&&e[Gg])}var PM=IM,$M=xM,MM=PM;function Hg(e,t,n,o,s){var a=-1,u=e.length;for(n||(n=MM),s||(s=[]);++a<u;){var c=e[a];t>0&&n(c)?t>1?Hg(c,t-1,n,o,s):$M(s,c):o||(s[s.length]=c)}return s}var FM=Hg,DM="__lodash_hash_undefined__";function kM(e){return this.__data__.set(e,DM),this}var NM=kM;function LM(e){return this.__data__.has(e)}var BM=LM,zM=Rh,UM=NM,jM=BM;function Bs(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new zM;++t<n;)this.add(e[t])}Bs.prototype.add=Bs.prototype.push=UM,Bs.prototype.has=jM;var WM=Bs;function VM(e,t,n,o){for(var s=e.length,a=n+(o?1:-1);o?a--:++a<s;)if(t(e[a],a,e))return a;return-1}var GM=VM;function HM(e){return e!==e}var YM=HM;function RM(e,t,n){for(var o=n-1,s=e.length;++o<s;)if(e[o]===t)return o;return-1}var qM=RM,KM=GM,JM=YM,ZM=qM;function XM(e,t,n){return t===t?ZM(e,t,n):KM(e,JM,n)}var QM=XM,eF=QM;function tF(e,t){var n=e==null?0:e.length;return!!n&&eF(e,t,0)>-1}var nF=tF;function rF(e,t,n){for(var o=-1,s=e==null?0:e.length;++o<s;)if(n(t,e[o]))return!0;return!1}var iF=rF;function oF(e,t){return e.has(t)}var sF=oF;function aF(){}var lF=aF;function uF(e){var t=-1,n=Array(e.size);return e.forEach(function(o){n[++t]=o}),n}var Yg=uF,Pu=up,cF=lF,fF=Yg,dF=1/0,pF=Pu&&1/fF(new Pu([,-0]))[1]==dF?function(e){return new Pu(e)}:cF,hF=pF,gF=WM,mF=nF,yF=iF,vF=sF,bF=hF,_F=Yg,wF=200;function TF(e,t,n){var o=-1,s=mF,a=e.length,u=!0,c=[],d=c;if(n)u=!1,s=yF;else if(a>=wF){var h=t?null:bF(e);if(h)return _F(h);u=!1,s=vF,d=new gF}else d=t?[]:c;e:for(;++o<a;){var y=e[o],g=t?t(y):y;if(y=n||y!==0?y:0,u&&g===g){for(var b=d.length;b--;)if(d[b]===g)continue e;t&&d.push(g),c.push(y)}else s(d,g,n)||(d!==c&&d.push(g),c.push(y))}return c}var SF=TF,CF=FM,EF=pg,xF=SF,AF=eg,OF=EF(function(e){return xF(CF(e,1,AF,!0))}),IF=OF;const PF=rr(IF),Ti=({children:e,...t})=>p.jsx(T.Table.Td,{...t,children:e}),Rg=({errorMessages:e,id:t})=>p.jsx(T.Tooltip,{id:t,title:e,children:p.jsx(T.Indicator,{label:e.split(`
205
+ `).length,children:p.jsx(Kb,{})})}),$F={paddingLeft:0,paddingRight:0},qg=A.memo(function({numColumns:t,errors:n,label:o,description:s,path:a,addItem:u,schema:c,enabled:d,translations:h,rootSchema:y}){const g={bg:"transparent",size:"sm",c:"gray"},b=T.useProps("ActionIcon",g,{});return p.jsxs(T.Table.Tr,{children:[p.jsx(Ti,{colSpan:t,children:p.jsxs(T.Stack,{children:[p.jsxs(T.Grid,{justify:"flex-start",align:"center",gutter:"sm",children:[p.jsx(T.Grid.Col,{span:"content",children:p.jsx(T.Text,{children:o})}),p.jsx(T.Grid.Col,{span:"content",children:n.length!==0?p.jsx(T.Grid.Col,{span:"content",children:p.jsx(Rg,{id:"tooltip-validation",errorMessages:n})}):null})]}),s&&p.jsx(T.Text,{size:"sm",children:s})]})}),d?p.jsx(Ti,{align:"right",style:$F,children:p.jsx(T.Tooltip,{id:"tooltip-add",title:h.addTooltip,position:"bottom",children:p.jsx(T.ActionIcon,{bg:b.bg,size:b.size,c:b.c,onClick:u(a,se.createDefaultValue(c,y)),children:p.jsx(Tl,{})})})}):null]})}),Kg={fixedCell:{width:"150px",height:"50px",paddingLeft:0,paddingRight:0,textAlign:"center"},fixedCellSmall:{width:"50px",height:"50px",paddingLeft:0,paddingRight:0,textAlign:"center"}},Jg=(e,t,n,o,s)=>{if(t.type==="object")return Zg(t).map(a=>{var d,h;const u=se.Paths.compose(n,a),c={propName:a,schema:t,title:((h=(d=t.properties)==null?void 0:d[a])==null?void 0:h.title)??CM(a),rowPath:n,cellPath:u,enabled:o,cells:s};return p.jsx(e,{...c},u)});{const a={schema:t,rowPath:n,cellPath:n,enabled:o};return p.jsx(e,{...a},n)}},Zg=e=>e.type==="object"&&typeof e.properties=="object"?Object.keys(e.properties).filter(t=>e.properties[t].type!=="array"):[""],MF=({numColumns:e,translations:t})=>p.jsx(T.Table.Tr,{children:p.jsx(Ti,{colSpan:e,children:p.jsx(T.Text,{align:"center",children:t.noDataMessage})})}),FF=A.memo(function({title:t}){return p.jsx(T.Table.Th,{children:t})}),DF=(e,t)=>{const n=t.rowPath+(t.schema.type==="object"?"."+t.propName:""),o=se.formatErrorMessage(PF(se.errorsAt(n,t.schema,s=>s===n)(e.core.errors).map(s=>s.message)));return{rowPath:t.rowPath,propName:t.propName,schema:t.schema,rootSchema:e.core.schema,errors:o,path:n,enabled:t.enabled,cells:t.cells||e.cells,renderers:t.renderers||e.renderers}},Xg=e=>({type:"Control",scope:e,label:!1}),kF=A.memo(function({path:t,propName:n,schema:o,rootSchema:s,errors:a,enabled:u,renderers:c,cells:d,isValid:h}){return p.jsxs(Ti,{children:[o.properties?p.jsx(Me.DispatchCell,{schema:se.Resolve.schema(o,`#/properties/${se.encode(n)}`,s),uischema:Xg(`#/properties/${se.encode(n)}`),path:t,enabled:u,renderers:c,cells:d}):p.jsx(Me.DispatchCell,{schema:o,uischema:Xg("#"),path:t,enabled:u,renderers:c,cells:d}),p.jsx(T.Text,{size:"xs",children:h?"":a})]})}),NF=e=>{const t=Me.useJsonForms(),n=DF(t,e),o=wp(n.errors);return p.jsx(kF,{...n,isValid:o})},LF=({childPath:e,schema:t,rowIndex:n,openDeleteDialog:o,moveUpCreator:s,moveDownCreator:a,enableUp:u,enableDown:c,showSortButtons:d,enabled:h,cells:y,path:g,translations:b})=>{const C={bg:"transparent",size:"sm",c:"gray"},E=T.useProps("ActionIcon",C,{}),w=A.useMemo(()=>s(g,n),[s,g,n]),$=A.useMemo(()=>a(g,n),[a,g,n]);return p.jsxs(T.Table.Tr,{children:[Jg(NF,t,e,h,y),h?p.jsx(Ti,{style:d?Kg.fixedCell:Kg.fixedCellSmall,children:p.jsxs(T.Grid,{justify:"flex-end",align:"center",children:[d?p.jsxs(A.Fragment,{children:[p.jsx(T.Grid.Col,{span:"content",children:p.jsx(T.Tooltip,{id:"tooltip-up",title:b.up,position:"bottom",opened:u?void 0:!1,children:p.jsx(T.ActionIcon,{bg:E.bg,size:E.size,c:E.c,"aria-label":b.upAriaLabel,onClick:w,disabled:!u,children:p.jsx(bx,{})})})}),p.jsx(T.Grid.Col,{span:"content",children:p.jsx(T.Tooltip,{id:"tooltip-down",title:b.down,position:"bottom",opened:c?void 0:!1,children:p.jsx(T.ActionIcon,{bg:E.bg,size:E.size,c:E.c,"aria-label":b.downAriaLabel,onClick:$,disabled:!c,children:p.jsx(vx,{})})})})]}):null,p.jsx(T.Grid.Col,{span:"content",children:p.jsx(T.Tooltip,{id:"tooltip-remove",title:b.removeTooltip,position:"bottom",children:p.jsx(T.ActionIcon,{bg:E.bg,size:E.size,c:E.c,"aria-label":b.removeAriaLabel,onClick:()=>o(e,n),children:p.jsx(_x,{})})})})]})}):null]},e)},Qg=A.memo(LF),BF=({data:e,path:t,schema:n,openDeleteDialog:o,moveUp:s,moveDown:a,uischema:u,config:c,enabled:d,cells:h,translations:y})=>{if(e===0)return p.jsx(MF,{numColumns:Zg(n).length+1,translations:y});const b=JI({},c,u.options);return p.jsx(A.Fragment,{children:pP(e).map(C=>{const E=se.Paths.compose(t,`${C}`);return p.jsx(Qg,{childPath:E,rowIndex:C,schema:n,openDeleteDialog:o,moveUpCreator:s,moveDownCreator:a,enableUp:C!==0,enableDown:C!==e-1,showSortButtons:b.showSortButtons||b.showArrayTableSortButtons,enabled:d,cells:h,path:t,translations:y},E)})})};class em extends A.Component{constructor(){super(...arguments);Jv(this,"addItem",(n,o)=>this.props.addItem(n,o))}render(){const{label:n,description:o,path:s,schema:a,rootSchema:u,uischema:c,errors:d,openDeleteDialog:h,visible:y,enabled:g,cells:b,translations:C}=this.props,E=c,w=a.type==="object",$=w?Jg(FF,a,s,g,b):void 0;return y?p.jsxs(T.Table,{children:[p.jsxs(T.Table.Thead,{children:[p.jsx(qg,{errors:d,label:n,description:o,addItem:this.addItem,numColumns:w?$.length:1,path:s,uischema:E,schema:a,rootSchema:u,enabled:g,translations:C}),w&&p.jsxs(T.Table.Tr,{children:[$,g?p.jsx(T.Table.Th,{}):null]})]}),p.jsx(T.Table.Tbody,{children:p.jsx(BF,{openDeleteDialog:h,translations:C,...this.props})})]}):null}}const zF=e=>{const[t,n]=A.useState(!1),[o,s]=A.useState(void 0),[a,u]=A.useState(void 0),{removeItems:c,visible:d}=e,h=A.useCallback((C,E)=>{n(!0),s(C),u(E)},[n,s,u]),y=A.useCallback(()=>n(!1),[n]),g=A.useCallback(()=>{const C=o.substring(0,o.lastIndexOf("."));c(C,[a])(),n(!1)},[n,o,a]),b=A.useCallback(()=>n(!1),[n]);return d?p.jsxs(p.Fragment,{children:[p.jsx(em,{...e,openDeleteDialog:h}),p.jsx(Rp,{open:t,onCancel:y,onConfirm:g,onClose:b,acceptText:e.translations.deleteDialogAccept,declineText:e.translations.deleteDialogDecline,title:e.translations.deleteDialogTitle,message:e.translations.deleteDialogMessage})]}):null},tm=se.rankWith(1,se.or(se.isObjectArrayControl,se.isPrimitiveArrayControl)),nm=Me.withJsonFormsArrayLayoutProps(zF),UF=e=>e.oneOf!==void 0&&e.oneOf.length>0&&e.oneOf.every(t=>t.const!==void 0),jF=e=>e.type==="string"&&e.enum!==void 0;function rm(e,t){if(!e.scope||e.type!=="Control")return!1;const n=se.resolveSchema(t,e.scope);return!!(sr(n.type,"array")&&!Array.isArray(n.items)&&n.uniqueItems===!0&&(UF(n.items)||jF(n.items)))}function im(e,t){if(!e.scope||e.type!=="Control")return!1;const n=se.resolveSchema(t,e.scope);return!!(sr(n.type,"object")&&!n.properties)}const om=se.rankWith(1,rm),sm=Me.withJsonFormsMultiEnumProps(e=>p.jsx(Op,{...e})),am=se.rankWith(1,se.isObjectControl),lm=Me.withJsonFormsDetailProps(e=>p.jsx(Pp,{...e})),um=se.rankWith(1,se.isBooleanControl),cm=Me.withJsonFormsControlProps(e=>p.jsx(Rl,{...e})),fm=se.rankWith(1,se.isDateControl),dm=Me.withJsonFormsControlProps(e=>p.jsx(ql,{...e})),pm=se.rankWith(1,se.isDateTimeControl),hm=Me.withJsonFormsControlProps(e=>p.jsx(Kl,{...e})),gm=se.rankWith(2,se.isEnumControl),mm=Me.withJsonFormsEnumProps(Me.withTranslateProps(e=>p.jsx(Jl,{...e})),!1),ym=se.rankWith(1,se.isIntegerControl),vm=Me.withJsonFormsControlProps(e=>p.jsx(ro,{...e})),bm=se.rankWith(2,im),_m=Me.withJsonFormsControlProps(e=>p.jsx(Ip,{...e})),wm=se.rankWith(1,se.isNumberControl),Tm=Me.withJsonFormsControlProps(e=>p.jsx(ro,{...e})),Sm=se.rankWith(2,se.isOneOfControl),Cm=Me.withJsonFormsOneOfEnumProps(Me.withTranslateProps(e=>p.jsx(Zl,{...e})),!1),Em=se.rankWith(1,se.isStringControl),xm=Me.withJsonFormsControlProps(e=>p.jsx(Xl,{...e})),WF=e=>{const{text:t,visible:n}=e;return n?p.jsx(T.Title,{fw:"bold",size:"xl",children:t}):null},Am=se.rankWith(1,se.isLabelable),Om=Me.withJsonFormsLabelProps(WF),VF=({uischema:e,schema:t,path:n,enabled:o,renderers:s,cells:a,label:u})=>{const d={elements:e.elements,schema:t,path:n,enabled:o,direction:"column"};return p.jsx(T.Fieldset,{legend:u,children:p.jsx(cs,{...d,renderers:s,cells:a})})},Im=se.rankWith(1,se.uiTypeIs("Group")),Pm=Me.withJsonFormsLayoutProps(VF),GF=({uischema:e,renderers:t,cells:n,schema:o,path:s,enabled:a})=>{const c={elements:e.elements,schema:o,path:s,enabled:a,direction:"row"};return p.jsx(cs,{...c,renderers:t,cells:n})},$m=se.rankWith(1,se.uiTypeIs("HorizontalLayout")),Mm=Me.withJsonFormsLayoutProps(GF),HF=({uischema:e,schema:t,path:n,enabled:o,renderers:s,cells:a})=>{const c={elements:e.elements,schema:t,path:n,enabled:o,direction:"column"};return p.jsx(cs,{...c,renderers:s,cells:a})},Fm=se.rankWith(1,se.uiTypeIs("VerticalLayout")),Dm=Me.withJsonFormsLayoutProps(HF),km=[{tester:Hp,cell:Yp},{tester:jp,cell:Wp},{tester:zp,cell:Up},{tester:$p,cell:Mp},{tester:Fp,cell:Dp},{tester:kp,cell:Np},{tester:Lp,cell:Bp},{tester:Vp,cell:Gp}],Nm=[{tester:fm,renderer:dm},{tester:pm,renderer:hm},{tester:wm,renderer:Tm},{tester:ym,renderer:vm},{tester:Em,renderer:xm},{tester:um,renderer:cm},{tester:gm,renderer:mm},{tester:Sm,renderer:Cm},{tester:bm,renderer:_m},{tester:tm,renderer:nm},{tester:om,renderer:sm},{tester:am,renderer:lm},{tester:$m,renderer:Mm},{tester:Fm,renderer:Dm},{tester:Im,renderer:Pm},{tester:Am,renderer:Om}];function Lm({schema:e,uischema:t,state:n,setState:o,view:s,setView:a,jsonForms:u,onSubmit:c,buttonText:d,loading:h,...y}){const g=A.useMemo(()=>T.createTheme({components:{...Object.entries(u||{}).reduce((b,[C,E])=>(b[C]||(b[C]={defaultProps:{}}),b[C].defaultProps=E,b),{})}}),[u]);return p.jsx(T.Modal,{size:"lg",centered:!0,fullScreen:s===gt.FULL_SCREEN,radius:s!==gt.NORMAL?0:void 0,transitionProps:s!==gt.NORMAL?{transition:"fade",duration:200}:void 0,...y,title:p.jsxs(p.Fragment,{children:[y.title,p.jsx(T.Group,{children:p.jsxs(T.Group,{gap:"xs",pr:"xs",children:[p.jsx(T.CloseButton,{onClick:()=>a(s!==gt.OVERLAY?gt.OVERLAY:gt.NORMAL),title:s!==gt.OVERLAY?"Overlay":"Exit overlay",icon:p.jsx(Fl,{icon:s!==gt.OVERLAY?"tabler:stack-forward":"tabler:stack",fontSize:"1.25rem"})}),p.jsx(T.CloseButton,{onClick:()=>a(s!==gt.FULL_SCREEN?gt.FULL_SCREEN:gt.NORMAL),title:s!==gt.FULL_SCREEN?"Full screen":"Exit full screen",icon:p.jsx(Fl,{icon:s!==gt.FULL_SCREEN?"tabler:maximize":"tabler:minimize",fontSize:"1.25rem"})})]})})]}),classNames:{content:"mrt-table-container"},styles:Bn(y.styles,{title:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between"}}),children:p.jsxs(T.Box,{component:"form",pos:"relative",onSubmit:c,children:[p.jsx(T.LoadingOverlay,{visible:h}),p.jsx(T.MantineThemeProvider,{inherit:!0,theme:g,children:p.jsx(Me.JsonForms,{schema:e,uischema:t??void 0,renderers:Nm,cells:km,data:n.data,onChange:o})}),p.jsx(T.Group,{justify:"end",mt:"xl",children:p.jsx(T.Button,{type:"submit",children:d})})]})})}const Bm={styles:{content:{height:450}}},zm={withinPortal:!1,h:"100%",w:"100%",pos:"absolute",styles:{overlay:{display:"none"},inner:{position:"relative",height:"100%",width:"100%",padding:0},content:{position:"absolute",height:"100%",width:"100%"}}};function Um(e,t){const n={};return Object.entries(t.properties||{}).forEach(([o,s])=>{var c,d;const a=s.items?s.items:s,u=a.oneOf?a.oneOf.map(h=>({value:h.const,label:h.title})):a.enum;if(u){const h=u.map(y=>y.value);if(sr(s.type,"array")){const y=((c=e[o])==null?void 0:c.map(g=>g.id_||g))||[];n[o]=h.filter(g=>y.includes(g))}else n[o]=h.find(y=>{var g;return y===(((g=e[o])==null?void 0:g.id_)||e[o])})}else n[o]=(((d=e[o])==null?void 0:d.id_)||e[o])??void 0}),n}function $u({jsonForms:e,...t}){const{info:n,updateEntry:o}=xe(),{opened:s,setOpened:a,item:u,itemLoading:c,state:d,setState:h,reset:y,view:g,setView:b}=zn("edit"),{jsonForms:C}=T.useProps("EditDialog",{},{}),E=A.useMemo(()=>Bn({__:{setNull:!0}},C,e),[C,e]),w=A.useCallback(async N=>{N==null||N.preventDefault(),await o(u==null?void 0:u.id,d.data),a(!1)},[o,u==null?void 0:u.id,d.data,a]),$=A.useMemo(()=>({...Wo,data:Um((u==null?void 0:u.result)||{},n.edit_schema)}),[n.edit_schema,u==null?void 0:u.result]);return A.useEffect(()=>{h({data:$.data})},[$,h]),p.jsx(Lm,{schema:n.edit_schema,uischema:n.edit_uischema,state:d,setState:h,view:g,setView:b,jsonForms:E,onSubmit:w,buttonText:"Edit",loading:c,opened:s,onClose:()=>a(!1),onExitTransitionEnd:y,...g===gt.OVERLAY?zm:{},...g===gt.NORMAL?Bm:{},...t,title:t.title??(n==null?void 0:n.edit_title)})}function Mu(){const{error:e}=xe(),[t,n]=A.useState(!1);return A.useEffect(()=>{e&&n(!0)},[e]),p.jsx(T.Modal,{opened:t,onClose:()=>n(!1),title:p.jsxs(T.Group,{children:[p.jsx(Rb,{size:16,color:"red"}),p.jsx(T.Text,{children:e?e.originalError.detail||e.originalError.message:"Error"})]}),centered:!0,children:e?p.jsx(T.Text,{children:e.message}):null})}/*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE */const{entries:jm,setPrototypeOf:Wm,isFrozen:YF,getPrototypeOf:RF,getOwnPropertyDescriptor:qF}=Object;let{freeze:Ft,seal:sn,create:Vm}=Object,{apply:Fu,construct:Du}=typeof Reflect<"u"&&Reflect;Ft||(Ft=function(t){return t}),sn||(sn=function(t){return t}),Fu||(Fu=function(t,n,o){return t.apply(n,o)}),Du||(Du=function(t,n){return new t(...n)});const zs=kt(Array.prototype.forEach),KF=kt(Array.prototype.lastIndexOf),Gm=kt(Array.prototype.pop),po=kt(Array.prototype.push),JF=kt(Array.prototype.splice),Us=kt(String.prototype.toLowerCase),ku=kt(String.prototype.toString),Hm=kt(String.prototype.match),ho=kt(String.prototype.replace),ZF=kt(String.prototype.indexOf),XF=kt(String.prototype.trim),wn=kt(Object.prototype.hasOwnProperty),Dt=kt(RegExp.prototype.test),go=QF(TypeError);function kt(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),s=1;s<n;s++)o[s-1]=arguments[s];return Fu(e,t,o)}}function QF(e){return function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Du(e,n)}}function Ae(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Us;Wm&&Wm(e,null);let o=t.length;for(;o--;){let s=t[o];if(typeof s=="string"){const a=n(s);a!==s&&(YF(t)||(t[o]=a),s=a)}e[s]=!0}return e}function eD(e){for(let t=0;t<e.length;t++)wn(e,t)||(e[t]=null);return e}function Nr(e){const t=Vm(null);for(const[n,o]of jm(e))wn(e,n)&&(Array.isArray(o)?t[n]=eD(o):o&&typeof o=="object"&&o.constructor===Object?t[n]=Nr(o):t[n]=o);return t}function mo(e,t){for(;e!==null;){const o=qF(e,t);if(o){if(o.get)return kt(o.get);if(typeof o.value=="function")return kt(o.value)}e=RF(e)}function n(){return null}return n}const Ym=Ft(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Nu=Ft(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Lu=Ft(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),tD=Ft(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Bu=Ft(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),nD=Ft(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Rm=Ft(["#text"]),qm=Ft(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),zu=Ft(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Km=Ft(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),js=Ft(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),rD=sn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),iD=sn(/<%[\w\W]*|[\w\W]*%>/gm),oD=sn(/\$\{[\w\W]*/gm),sD=sn(/^data-[\-\w.\u00B7-\uFFFF]+$/),aD=sn(/^aria-[\-\w]+$/),Jm=sn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),lD=sn(/^(?:\w+script|data):/i),uD=sn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Zm=sn(/^html$/i),cD=sn(/^[a-z][.\w]*(-[.\w]+)+$/i);var Xm=Object.freeze({__proto__:null,ARIA_ATTR:aD,ATTR_WHITESPACE:uD,CUSTOM_ELEMENT:cD,DATA_ATTR:sD,DOCTYPE_NAME:Zm,ERB_EXPR:iD,IS_ALLOWED_URI:Jm,IS_SCRIPT_OR_DATA:lD,MUSTACHE_EXPR:rD,TMPLIT_EXPR:oD});const yo={element:1,text:3,progressingInstruction:7,comment:8,document:9},fD=function(){return typeof window>"u"?null:window},dD=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let o=null;const s="data-tt-policy-suffix";n&&n.hasAttribute(s)&&(o=n.getAttribute(s));const a="dompurify"+(o?"#"+o:"");try{return t.createPolicy(a,{createHTML(u){return u},createScriptURL(u){return u}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},Qm=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function e0(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:fD();const t=ce=>e0(ce);if(t.version="3.2.4",t.removed=[],!e||!e.document||e.document.nodeType!==yo.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e;const o=n,s=o.currentScript,{DocumentFragment:a,HTMLTemplateElement:u,Node:c,Element:d,NodeFilter:h,NamedNodeMap:y=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:g,DOMParser:b,trustedTypes:C}=e,E=d.prototype,w=mo(E,"cloneNode"),$=mo(E,"remove"),N=mo(E,"nextSibling"),J=mo(E,"childNodes"),V=mo(E,"parentNode");if(typeof u=="function"){const ce=n.createElement("template");ce.content&&ce.content.ownerDocument&&(n=ce.content.ownerDocument)}let L,D="";const{implementation:B,createNodeIterator:Y,createDocumentFragment:ae,getElementsByTagName:te}=n,{importNode:S}=o;let W=Qm();t.isSupported=typeof jm=="function"&&typeof V=="function"&&B&&B.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:Q,ERB_EXPR:fe,TMPLIT_EXPR:he,DATA_ATTR:Fe,ARIA_ATTR:De,IS_SCRIPT_OR_DATA:Ue,ATTR_WHITESPACE:Ie,CUSTOM_ELEMENT:pt}=Xm;let{IS_ALLOWED_URI:R}=Xm,k=null;const K=Ae({},[...Ym,...Nu,...Lu,...Bu,...Rm]);let X=null;const ue=Ae({},[...qm,...zu,...Km,...js]);let ne=Object.seal(Vm(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),de=null,ye=null,ve=!0,we=!0,Se=!1,et=!0,ee=!1,mt=!0,Ke=!1,Nt=!1,Ne=!1,yt=!1,Br=!1,xi=!1,cr=!0,Wt=!1;const zr="user-content-";let fr=!0,Ur=!1,an={},dr=null;const pr=Ae({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Yn=null;const Ai=Ae({},["audio","video","img","source","image","track"]);let jr=null;const Oi=Ae({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),hr="http://www.w3.org/1998/Math/MathML",gr="http://www.w3.org/2000/svg",Jt="http://www.w3.org/1999/xhtml";let Fn=Jt,Wr=!1,Vr=null;const tc=Ae({},[hr,gr,Jt],ku);let Ii=Ae({},["mi","mo","mn","ms","mtext"]),Pi=Ae({},["annotation-xml"]);const Vs=Ae({},["title","style","font","a","script"]);let mr=null;const nc=["application/xhtml+xml","text/html"],rc="text/html";let ht=null,yr=null;const Gs=n.createElement("form"),Hs=function(P){return P instanceof RegExp||P instanceof Function},wo=function(){let P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(yr&&yr===P)){if((!P||typeof P!="object")&&(P={}),P=Nr(P),mr=nc.indexOf(P.PARSER_MEDIA_TYPE)===-1?rc:P.PARSER_MEDIA_TYPE,ht=mr==="application/xhtml+xml"?ku:Us,k=wn(P,"ALLOWED_TAGS")?Ae({},P.ALLOWED_TAGS,ht):K,X=wn(P,"ALLOWED_ATTR")?Ae({},P.ALLOWED_ATTR,ht):ue,Vr=wn(P,"ALLOWED_NAMESPACES")?Ae({},P.ALLOWED_NAMESPACES,ku):tc,jr=wn(P,"ADD_URI_SAFE_ATTR")?Ae(Nr(Oi),P.ADD_URI_SAFE_ATTR,ht):Oi,Yn=wn(P,"ADD_DATA_URI_TAGS")?Ae(Nr(Ai),P.ADD_DATA_URI_TAGS,ht):Ai,dr=wn(P,"FORBID_CONTENTS")?Ae({},P.FORBID_CONTENTS,ht):pr,de=wn(P,"FORBID_TAGS")?Ae({},P.FORBID_TAGS,ht):{},ye=wn(P,"FORBID_ATTR")?Ae({},P.FORBID_ATTR,ht):{},an=wn(P,"USE_PROFILES")?P.USE_PROFILES:!1,ve=P.ALLOW_ARIA_ATTR!==!1,we=P.ALLOW_DATA_ATTR!==!1,Se=P.ALLOW_UNKNOWN_PROTOCOLS||!1,et=P.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ee=P.SAFE_FOR_TEMPLATES||!1,mt=P.SAFE_FOR_XML!==!1,Ke=P.WHOLE_DOCUMENT||!1,yt=P.RETURN_DOM||!1,Br=P.RETURN_DOM_FRAGMENT||!1,xi=P.RETURN_TRUSTED_TYPE||!1,Ne=P.FORCE_BODY||!1,cr=P.SANITIZE_DOM!==!1,Wt=P.SANITIZE_NAMED_PROPS||!1,fr=P.KEEP_CONTENT!==!1,Ur=P.IN_PLACE||!1,R=P.ALLOWED_URI_REGEXP||Jm,Fn=P.NAMESPACE||Jt,Ii=P.MATHML_TEXT_INTEGRATION_POINTS||Ii,Pi=P.HTML_INTEGRATION_POINTS||Pi,ne=P.CUSTOM_ELEMENT_HANDLING||{},P.CUSTOM_ELEMENT_HANDLING&&Hs(P.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ne.tagNameCheck=P.CUSTOM_ELEMENT_HANDLING.tagNameCheck),P.CUSTOM_ELEMENT_HANDLING&&Hs(P.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ne.attributeNameCheck=P.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),P.CUSTOM_ELEMENT_HANDLING&&typeof P.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(ne.allowCustomizedBuiltInElements=P.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ee&&(we=!1),Br&&(yt=!0),an&&(k=Ae({},Rm),X=[],an.html===!0&&(Ae(k,Ym),Ae(X,qm)),an.svg===!0&&(Ae(k,Nu),Ae(X,zu),Ae(X,js)),an.svgFilters===!0&&(Ae(k,Lu),Ae(X,zu),Ae(X,js)),an.mathMl===!0&&(Ae(k,Bu),Ae(X,Km),Ae(X,js))),P.ADD_TAGS&&(k===K&&(k=Nr(k)),Ae(k,P.ADD_TAGS,ht)),P.ADD_ATTR&&(X===ue&&(X=Nr(X)),Ae(X,P.ADD_ATTR,ht)),P.ADD_URI_SAFE_ATTR&&Ae(jr,P.ADD_URI_SAFE_ATTR,ht),P.FORBID_CONTENTS&&(dr===pr&&(dr=Nr(dr)),Ae(dr,P.FORBID_CONTENTS,ht)),fr&&(k["#text"]=!0),Ke&&Ae(k,["html","head","body"]),k.table&&(Ae(k,["tbody"]),delete de.tbody),P.TRUSTED_TYPES_POLICY){if(typeof P.TRUSTED_TYPES_POLICY.createHTML!="function")throw go('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof P.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw go('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');L=P.TRUSTED_TYPES_POLICY,D=L.createHTML("")}else L===void 0&&(L=dD(C,s)),L!==null&&typeof D=="string"&&(D=L.createHTML(""));Ft&&Ft(P),yr=P}},Ys=Ae({},[...Nu,...Lu,...tD]),$i=Ae({},[...Bu,...nD]),ic=function(P){let Z=V(P);(!Z||!Z.tagName)&&(Z={namespaceURI:Fn,tagName:"template"});const oe=Us(P.tagName),We=Us(Z.tagName);return Vr[P.namespaceURI]?P.namespaceURI===gr?Z.namespaceURI===Jt?oe==="svg":Z.namespaceURI===hr?oe==="svg"&&(We==="annotation-xml"||Ii[We]):!!Ys[oe]:P.namespaceURI===hr?Z.namespaceURI===Jt?oe==="math":Z.namespaceURI===gr?oe==="math"&&Pi[We]:!!$i[oe]:P.namespaceURI===Jt?Z.namespaceURI===gr&&!Pi[We]||Z.namespaceURI===hr&&!Ii[We]?!1:!$i[oe]&&(Vs[oe]||!Ys[oe]):!!(mr==="application/xhtml+xml"&&Vr[P.namespaceURI]):!1},Vt=function(P){po(t.removed,{element:P});try{V(P).removeChild(P)}catch{$(P)}},Mi=function(P,Z){try{po(t.removed,{attribute:Z.getAttributeNode(P),from:Z})}catch{po(t.removed,{attribute:null,from:Z})}if(Z.removeAttribute(P),P==="is")if(yt||Br)try{Vt(Z)}catch{}else try{Z.setAttribute(P,"")}catch{}},Rs=function(P){let Z=null,oe=null;if(Ne)P="<remove></remove>"+P;else{const st=Hm(P,/^[\r\n\t ]+/);oe=st&&st[0]}mr==="application/xhtml+xml"&&Fn===Jt&&(P='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+P+"</body></html>");const We=L?L.createHTML(P):P;if(Fn===Jt)try{Z=new b().parseFromString(We,mr)}catch{}if(!Z||!Z.documentElement){Z=B.createDocument(Fn,"template",null);try{Z.documentElement.innerHTML=Wr?D:We}catch{}}const Tt=Z.body||Z.documentElement;return P&&oe&&Tt.insertBefore(n.createTextNode(oe),Tt.childNodes[0]||null),Fn===Jt?te.call(Z,Ke?"html":"body")[0]:Ke?Z.documentElement:Tt},qs=function(P){return Y.call(P.ownerDocument||P,P,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)},To=function(P){return P instanceof g&&(typeof P.nodeName!="string"||typeof P.textContent!="string"||typeof P.removeChild!="function"||!(P.attributes instanceof y)||typeof P.removeAttribute!="function"||typeof P.setAttribute!="function"||typeof P.namespaceURI!="string"||typeof P.insertBefore!="function"||typeof P.hasChildNodes!="function")},Ks=function(P){return typeof c=="function"&&P instanceof c};function Tn(ce,P,Z){zs(ce,oe=>{oe.call(t,P,Z,yr)})}const Js=function(P){let Z=null;if(Tn(W.beforeSanitizeElements,P,null),To(P))return Vt(P),!0;const oe=ht(P.nodeName);if(Tn(W.uponSanitizeElement,P,{tagName:oe,allowedTags:k}),P.hasChildNodes()&&!Ks(P.firstElementChild)&&Dt(/<[/\w]/g,P.innerHTML)&&Dt(/<[/\w]/g,P.textContent)||P.nodeType===yo.progressingInstruction||mt&&P.nodeType===yo.comment&&Dt(/<[/\w]/g,P.data))return Vt(P),!0;if(!k[oe]||de[oe]){if(!de[oe]&&So(oe)&&(ne.tagNameCheck instanceof RegExp&&Dt(ne.tagNameCheck,oe)||ne.tagNameCheck instanceof Function&&ne.tagNameCheck(oe)))return!1;if(fr&&!dr[oe]){const We=V(P)||P.parentNode,Tt=J(P)||P.childNodes;if(Tt&&We){const st=Tt.length;for(let It=st-1;It>=0;--It){const ln=w(Tt[It],!0);ln.__removalCount=(P.__removalCount||0)+1,We.insertBefore(ln,N(P))}}}return Vt(P),!0}return P instanceof d&&!ic(P)||(oe==="noscript"||oe==="noembed"||oe==="noframes")&&Dt(/<\/no(script|embed|frames)/i,P.innerHTML)?(Vt(P),!0):(ee&&P.nodeType===yo.text&&(Z=P.textContent,zs([Q,fe,he],We=>{Z=ho(Z,We," ")}),P.textContent!==Z&&(po(t.removed,{element:P.cloneNode()}),P.textContent=Z)),Tn(W.afterSanitizeElements,P,null),!1)},Zs=function(P,Z,oe){if(cr&&(Z==="id"||Z==="name")&&(oe in n||oe in Gs))return!1;if(!(we&&!ye[Z]&&Dt(Fe,Z))){if(!(ve&&Dt(De,Z))){if(!X[Z]||ye[Z]){if(!(So(P)&&(ne.tagNameCheck instanceof RegExp&&Dt(ne.tagNameCheck,P)||ne.tagNameCheck instanceof Function&&ne.tagNameCheck(P))&&(ne.attributeNameCheck instanceof RegExp&&Dt(ne.attributeNameCheck,Z)||ne.attributeNameCheck instanceof Function&&ne.attributeNameCheck(Z))||Z==="is"&&ne.allowCustomizedBuiltInElements&&(ne.tagNameCheck instanceof RegExp&&Dt(ne.tagNameCheck,oe)||ne.tagNameCheck instanceof Function&&ne.tagNameCheck(oe))))return!1}else if(!jr[Z]){if(!Dt(R,ho(oe,Ie,""))){if(!((Z==="src"||Z==="xlink:href"||Z==="href")&&P!=="script"&&ZF(oe,"data:")===0&&Yn[P])){if(!(Se&&!Dt(Ue,ho(oe,Ie,"")))){if(oe)return!1}}}}}}return!0},So=function(P){return P!=="annotation-xml"&&Hm(P,pt)},Xs=function(P){Tn(W.beforeSanitizeAttributes,P,null);const{attributes:Z}=P;if(!Z||To(P))return;const oe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:X,forceKeepAttr:void 0};let We=Z.length;for(;We--;){const Tt=Z[We],{name:st,namespaceURI:It,value:ln}=Tt,Gr=ht(st);let St=st==="value"?ln:XF(ln);if(oe.attrName=Gr,oe.attrValue=St,oe.keepAttr=!0,oe.forceKeepAttr=void 0,Tn(W.uponSanitizeAttribute,P,oe),St=oe.attrValue,Wt&&(Gr==="id"||Gr==="name")&&(Mi(st,P),St=zr+St),mt&&Dt(/((--!?|])>)|<\/(style|title)/i,St)){Mi(st,P);continue}if(oe.forceKeepAttr||(Mi(st,P),!oe.keepAttr))continue;if(!et&&Dt(/\/>/i,St)){Mi(st,P);continue}ee&&zs([Q,fe,he],Eo=>{St=ho(St,Eo," ")});const Co=ht(P.nodeName);if(Zs(Co,Gr,St)){if(L&&typeof C=="object"&&typeof C.getAttributeType=="function"&&!It)switch(C.getAttributeType(Co,Gr)){case"TrustedHTML":{St=L.createHTML(St);break}case"TrustedScriptURL":{St=L.createScriptURL(St);break}}try{It?P.setAttributeNS(It,st,St):P.setAttribute(st,St),To(P)?Vt(P):Gm(t.removed)}catch{}}}Tn(W.afterSanitizeAttributes,P,null)},oc=function ce(P){let Z=null;const oe=qs(P);for(Tn(W.beforeSanitizeShadowDOM,P,null);Z=oe.nextNode();)Tn(W.uponSanitizeShadowNode,Z,null),Js(Z),Xs(Z),Z.content instanceof a&&ce(Z.content);Tn(W.afterSanitizeShadowDOM,P,null)};return t.sanitize=function(ce){let P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Z=null,oe=null,We=null,Tt=null;if(Wr=!ce,Wr&&(ce="<!-->"),typeof ce!="string"&&!Ks(ce))if(typeof ce.toString=="function"){if(ce=ce.toString(),typeof ce!="string")throw go("dirty is not a string, aborting")}else throw go("toString is not a function");if(!t.isSupported)return ce;if(Nt||wo(P),t.removed=[],typeof ce=="string"&&(Ur=!1),Ur){if(ce.nodeName){const ln=ht(ce.nodeName);if(!k[ln]||de[ln])throw go("root node is forbidden and cannot be sanitized in-place")}}else if(ce instanceof c)Z=Rs("<!---->"),oe=Z.ownerDocument.importNode(ce,!0),oe.nodeType===yo.element&&oe.nodeName==="BODY"||oe.nodeName==="HTML"?Z=oe:Z.appendChild(oe);else{if(!yt&&!ee&&!Ke&&ce.indexOf("<")===-1)return L&&xi?L.createHTML(ce):ce;if(Z=Rs(ce),!Z)return yt?null:xi?D:""}Z&&Ne&&Vt(Z.firstChild);const st=qs(Ur?ce:Z);for(;We=st.nextNode();)Js(We),Xs(We),We.content instanceof a&&oc(We.content);if(Ur)return ce;if(yt){if(Br)for(Tt=ae.call(Z.ownerDocument);Z.firstChild;)Tt.appendChild(Z.firstChild);else Tt=Z;return(X.shadowroot||X.shadowrootmode)&&(Tt=S.call(o,Tt,!0)),Tt}let It=Ke?Z.outerHTML:Z.innerHTML;return Ke&&k["!doctype"]&&Z.ownerDocument&&Z.ownerDocument.doctype&&Z.ownerDocument.doctype.name&&Dt(Zm,Z.ownerDocument.doctype.name)&&(It="<!DOCTYPE "+Z.ownerDocument.doctype.name+`>
206
+ `+It),ee&&zs([Q,fe,he],ln=>{It=ho(It,ln," ")}),L&&xi?L.createHTML(It):It},t.setConfig=function(){let ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};wo(ce),Nt=!0},t.clearConfig=function(){yr=null,Nt=!1},t.isValidAttribute=function(ce,P,Z){yr||wo({});const oe=ht(ce),We=ht(P);return Zs(oe,We,Z)},t.addHook=function(ce,P){typeof P=="function"&&po(W[ce],P)},t.removeHook=function(ce,P){if(P!==void 0){const Z=KF(W[ce],P);return Z===-1?void 0:JF(W[ce],Z,1)[0]}return Gm(W[ce])},t.removeHooks=function(ce){W[ce]=[]},t.removeAllHooks=function(){W=Qm()},t}var t0=e0();const Mn=A.forwardRef(({fallback:e,functionProps:t,children:n},o)=>{if(n=lt(n,t),n===null)return null;const s=n||e;return A.isValidElement(s)?A.cloneElement(s,{ref:o}):s});Mn.displayName="FallbackWrapper";const pD={field:"_field_zdaf7_1",rtl:"_rtl_zdaf7_7",borderRight:"_borderRight_zdaf7_12"},vo=A.memo(({id:e,entry:t,loading:n,rightBorder:o,children:s,onClickEntry:a,customElement:u,sanitize:c,...d})=>{const h={text:{style:{whiteSpace:"nowrap",overflow:"ellipsis"}}},{text:y}=T.useProps("Field",h,d),g={};Object.entries(y).forEach(([C,E])=>{typeof E=="function"&&(g[C]=E(t))});const b=T.useStyles({name:"Field",props:d,classes:pD});return p.jsx(T.Table.Td,{...b("field"),onClick:a?()=>a(e,t):null,...d,children:p.jsx(T.Box,{w:"100%",children:p.jsx(T.Skeleton,{visible:n,children:p.jsx(Mn,{fallback:Array.isArray(s)?s.map((C,E)=>p.jsx(T.Text,{...y,...g,children:c?t0.sanitize(C):C},E)):A.isValidElement(s)?s:p.jsx(T.Text,{...y,...g,children:c?t0.sanitize(s):s}),functionProps:t,children:u})})})})});vo.displayName="Field";const n0={row:"_row_138r2_1",selected:"_selected_138r2_5"};function r0({entry:e,selected:t,children:n}){const o=T.useStyles({name:"Row",classes:n0}),s=T.useProps("Row",{},{});Object.entries(s).forEach(([c,d])=>{typeof d=="function"&&(s[c]=d(e))});var{className:a,style:u}=o("row");return a=`${a} ${t?n0.selected:""}`,p.jsx(T.Table.Tr,{className:a,style:{...u},...s,children:n})}function hD({bodyCustomizer:e,actionColumn:t,id:n,entry:o}){let s=e==null?void 0:e[t];return typeof s=="function"&&(s=s({id:n,...o})),s===null?null:s||p.jsx(Ku,{id:n})}function i0({data:e,loading:t,hideActions:n,hideCheckbox:o,selection:s,toggleRow:a,onClickEntry:u,bodyCustomizer:c,bodySeparator:d}){const h=e.list_columns.includes("actions")?"_actions":"actions",y=A.useMemo(()=>e!=null&&e.list_columns.includes("all")?"_all":"all",[e==null?void 0:e.list_columns]);return p.jsx(T.Table.Tbody,{children:e.result.length?e.result.map((g,b)=>{const C=e.ids[b];return p.jsxs(r0,{entry:{...g,id:C},children:[o?null:p.jsx(vo,{loading:t,children:p.jsx(T.Checkbox,{pl:2,checked:s.includes(C),onChange:()=>{a(C)}})},b),n?null:p.jsx(vo,{loading:t,children:p.jsx(hD,{bodyCustomizer:c,actionColumn:h,id:Ut(C),entry:g})}),e.list_columns.map((E,w)=>{let $=c==null?void 0:c[E];typeof $=="function"&&($=$({id:C,...g}));let N=Ri(g,E);typeof N=="number"?N=N.toLocaleString():N==null&&(N="");const J=(d==null?void 0:d[E])||(d==null?void 0:d[y]);return J&&(N=N.split(J)),$===null?null:p.jsx(vo,{id:C,entry:g,loading:t,onClickEntry:u,customElement:$,sanitize:!0,children:N},w)})]},Ut(C))}):p.jsx("tr",{children:p.jsx("td",{style:{padding:"8px"},colSpan:n?e.list_columns.length:e.list_columns.length+1,children:p.jsx(T.Text,{style:{fontStyle:"italic"},size:"sm",c:"dimmed",children:"No data available"})})})})}const o0={root:"_root_1kmay_1",wrapper:"_wrapper_1kmay_7",icon:"_icon_1kmay_18"};function Ws({column:e,label:t,orderColumn:n,related:o,toggleAll:s,allChecked:a,classNames:u,styles:c,customElement:d,...h}){const{queryParams:y,setQueryParams:g,loading:b}=xe(),C={fw:700,size:"sm",color:"gray.8",hoverColor:"gray.6",selectedColor:"blue"},E=T.useStyles({name:"FieldTitle",classes:o0,classNames:u,styles:c,props:h}),w=T.useProps("FieldTitle",C,h),{hovered:$,ref:N}=rt.useHover(),J=n&&y.order_column===n,V=E("wrapper");return V.style.cursor=n?V.style.cursor:"auto",p.jsx(T.Table.Th,{className:o0.fieldTitleRoot,...E("root"),onClick:n&&!b?()=>g({order_column:n,order_direction:y.order_direction==="asc"?"desc":"asc"}):null,children:p.jsx(T.Box,{ref:N,...V,children:e==="Checkbox"?p.jsx(T.Checkbox,{pb:5,pl:2,onChange:s,checked:a}):p.jsxs(p.Fragment,{children:[p.jsx(T.Box,{w:"100%",fw:w.fw,size:"xl",c:$&&n?w.hoverColor:J?w.selectedColor:w.color,children:d||t||e}),o?p.jsx(T.Tooltip,{label:"Related Field",children:p.jsx(T.Indicator,{label:"rel",style:{indicator:{top:"-1px !important",right:"-2px !important",padding:"4px"}},children:p.jsx(T.Box,{...E("icon"),children:J?y.order_direction==="asc"?p.jsx(wl,{size:14,strokeWidth:1.5}):p.jsx(yd,{size:14,strokeWidth:1.5}):null})})}):p.jsx(T.Box,{...E("icon"),children:J?y.order_direction==="asc"?p.jsx(wl,{size:14,strokeWidth:1.5}):p.jsx(yd,{size:14,strokeWidth:1.5}):null})]})})})}const Uu=A.memo(({data:e,info:t,settings:n,hideActions:o,hideCheckbox:s,allChecked:a,toggleAll:u,headerCustomizer:c})=>{const d=e.list_columns.includes("actions")?"_actions":"actions";let h=c==null?void 0:c[d];return typeof h=="function"&&(h=h()),p.jsx(T.Table.Thead,{children:p.jsxs(T.Table.Tr,{children:[s?null:p.jsx(Ws,{data:e,column:"Checkbox",allChecked:a,toggleAll:u}),o?null:p.jsx(Ws,{column:"Actions",customElement:h}),e.list_columns.map((y,g)=>{var C;let b=c==null?void 0:c[y];return typeof b=="function"&&(b=b(e.label_columns[y])),b===null?null:p.jsx(Ws,{column:y,label:e.label_columns[y],orderColumn:e.order_columns.find(E=>E===y)||e.order_columns.find(E=>E.startsWith(`${y}.`)),related:((C=t.filters[y])==null?void 0:C.schema.type)==="Nested",customElement:b},y)})]})})});Uu.displayName="Header";const gD={scrollbar:"_scrollbar_isyo2_1"};function s0({bulkActions:e,hideActions:t,loading:n,onSelectCheckbox:o,onClickEntry:s,hideCheckbox:a,hideDownload:u,headerCustomizer:c,bodyCustomizer:d,bodySeparator:h,...y}){const g=T.useMantineTheme(),b=T.Table.extend({highlightOnHover:!0,striped:!0,horizontalSpacing:"md",verticalSpacing:"sm"}),C=T.useProps("DatagridTable",b,y),{data:E,info:w}=xe(),[$,N]=A.useState([]),[J,V]=A.useState(!1),L=B=>{N(Y=>Y.includes(B)?Y.filter(ae=>ae!==B):[...Y,B])},D=()=>{N(B=>B.length===E.ids.length?[]:E.ids.map((Y,ae)=>Y))};return A.useEffect(()=>{V($.length===E.result.length&&$.length>0),o&&o($),e==null||e.setSelectedIds($.map(B=>B))},[$]),A.useEffect(()=>{N([]),o&&o([])},[E]),p.jsx(T.ScrollArea,{options:{className:g.colorScheme==="dark"?"os-theme-light":void 0},style:{flex:1,flexDirection:"column"},classNames:gD,children:p.jsxs(T.Table,{stickyHeader:!0,...C,children:[p.jsx(Uu,{data:E,info:w,hideActions:t,hideCheckbox:a,allChecked:J,setSelection:N,toggleAll:D,headerCustomizer:c}),p.jsx(i0,{data:E,loading:n,hideActions:t,hideCheckbox:a,selection:$,setSelection:N,toggleRow:L,onClickEntry:s,bodyCustomizer:d,bodySeparator:h})]})})}const ju=A.memo(({counter:e,...t})=>{const{data:n,queryParams:o,setQueryParams:s}=xe(),a=T.useMantineTheme(),u=[{value:"10",label:"10"},{value:"25",label:"25"},{value:"50",label:"50"}],c=String(o.page_size),[d,h]=A.useState(o.page);A.useEffect(()=>{h(o.page)},[o.page]);const y=b=>{h(b-1),s({page:b-1})},g=b=>{s({page_size:parseInt(b,10),page:0})};return p.jsxs(p.Fragment,{children:[p.jsx(T.Divider,{}),p.jsxs(T.Box,{style:{display:"flex",justifyContent:"space-between",alignItems:"center",height:54,border:"none",borderTopWidth:"1px",padding:"var(--mantine-spacing-md)"},children:[p.jsxs(T.Box,{style:{display:"flex",alignItems:"center",gap:"var(--mantine-spacing-sm)"},children:[p.jsx(T.Text,{children:"Rows per page:"}),p.jsx(T.Select,{value:c,defaultValue:c,onChange:b=>g(b),data:u,allowDeselect:!1,w:80,size:"xs",styles:()=>({input:{fontSize:"14px",fontWeight:"250",lineHeight:"52px",border:"1px solid #E6E8ED"},item:{"&[data-selected]":{"&, &:hover":{outline:"none !important"}}}})})]}),p.jsx(T.Pagination,{size:"sm",total:Math.ceil(n.count/c),value:d+1,onChange:y,...t}),e&&n?p.jsxs(p.Fragment,{children:[p.jsx(T.Text,{c:a.primaryColor,size:"xs",fw:400,pl:20,children:"Total Records"}),p.jsx(T.Text,{c:a.primaryColor,size:"md",fw:700,pl:10,children:n.count})]}):null]})]})});ju.displayName="Pagination";function a0(...e){const[t,n]=A.useState(!1),{download:o}=xe(),s={bg:"transparent",size:"sm",c:"gray"},a=T.useProps("ActionIcon",s,e);return t?p.jsx(T.Loader,{color:a.c,size:a.size}):p.jsx(T.Tooltip,{label:"Download",children:p.jsx(T.ActionIcon,{bg:a.bg,size:a.size,c:a.c,onClick:()=>{n(!0),o("download").then(()=>n(!1))},children:p.jsx(vd,{})})})}function mD(e){return t=>{try{return e.validateSync(t,{abortEarly:!1}),{}}catch(n){const o={};return n instanceof _t&&n.inner.forEach(s=>{o[s.path.replaceAll("[",".").replaceAll("]","")]=s.message}),o}}}function yD({form:e,name:t,items:n,...o}){return p.jsx(T.Autocomplete,{data:n,...e.getInputProps(t),value:String(e.getInputProps(t).value)||"",...o})}function l0({form:e,name:t,...n}){return p.jsx(p.Fragment,{children:p.jsx(ei.DateInput,{...e.getInputProps(t),onChange:o=>{if(o instanceof Date){const s=new Date(o.getTime()-o.getTimezoneOffset()*6e4);e.setFieldValue(t,s.toISOString().substring(0,10))}},value:e.getInputProps(t).value?new Date(e.getInputProps(t).value):null,...n})})}function u0({form:e,name:t,...n}){return p.jsx(p.Fragment,{children:p.jsx(ei.DateTimePicker,{...e.getInputProps(t),onChange:o=>{if(o instanceof Date){const s=new Date(o);e.setFieldValue(t,s.toISOString())}},value:e.getInputProps(t).value?new Date(e.getInputProps(t).value):null,...n})})}function bo({form:e,name:t,...n}){const o=e.getInputProps(t).value,s=A.useMemo(()=>o&&typeof o=="object"?JSON.stringify(o):o||"",[o]);return t==="password"?p.jsx(T.PasswordInput,{...e.getInputProps(t),value:s,...n}):p.jsx(T.TextInput,{...e.getInputProps(t),value:s,...n})}function Wu({form:e,name:t,filter:n,...o}){const[s,a]=A.useState(""),u=e.getInputProps(t).value,c=A.useMemo(()=>u?typeof u=="object"?JSON.stringify(u,null,2):u:"",[u]);return A.useEffect(()=>{a(c)},[c]),n?p.jsx(bo,{form:e,name:t,...o}):p.jsx(T.JsonInput,{autosize:!0,minRows:4,maxRows:12,validationError:"Invalid JSON",...e.getInputProps(t),...o,value:s,onChange:d=>{if(a(d),!d){e.getInputProps(t).onChange(null);return}try{const h=JSON.parse(d);e.getInputProps(t).onChange(h)}catch{}}})}function c0({form:e,name:t,filter:n,...o}){const[s,a]=A.useState(!!n);return p.jsxs(T.InputWrapper,{label:o.label,description:o.description,children:[!n&&p.jsxs(T.Group,{align:"center",gap:"xs",py:"0.25rem",children:[p.jsx(T.Checkbox,{checked:s,onChange:u=>a(u.currentTarget.checked)}),p.jsx(T.Text,{size:"xs",children:"WKT"})]}),s?p.jsx(bo,{form:e,name:t,...o,label:void 0,description:void 0}):p.jsx(Wu,{form:e,name:t,...o,label:void 0,description:void 0})]})}function f0({form:e,name:t,items:n,...o}){const s=n.map(u=>({value:String(Ut(u.id)),label:u.value})),a=Array.isArray(e.getInputProps(t).value)?e.getInputProps(t).value.map(u=>String(typeof u=="object"?Ut(u.id):u)):[];return p.jsx(T.MultiSelect,{data:s,searchable:!0,...e.getInputProps(t),value:a||[],...o})}function d0({form:e,name:t,items:n,filter:o,...s}){var u;const a=n.map(c=>({value:String(Ut(c.id)),label:c.value}));return p.jsx(T.Select,{data:a,searchable:!0,...e.getInputProps(t),onChange:c=>{if(o){e.setFieldValue(t,c);return}const d=n.find(h=>String(Ut(h.id))===c)||null;e.setFieldValue(t,d)},value:o?e.getInputProps(t).value:String(Ut((u=e.getInputProps(t).value)==null?void 0:u.id))||"",...s})}function Vu({form:e,name:t,items:n,...o}){return p.jsx(T.Select,{data:n,searchable:!0,...e.getInputProps(t),value:String(e.getInputProps(t).value)||"",...o})}function Gu({form:e,name:t,schema:n,filter:o,withinPortal:s=!0,...a}){if(!n.type)return null;switch(n.type){case"Boolean":return p.jsx(Vu,{form:e,name:t,items:[{label:"true",value:o?"1":"true"},{label:"false",value:o?"0":"false"}],...a});case"RelatedList":return p.jsx(f0,{form:e,name:t,items:n.values,comboboxProps:{withinPortal:s},...a});case"Related":return p.jsx(d0,{form:e,name:t,items:n.values,filter:o,comboboxProps:{withinPortal:s},...a});case"DateTime":return p.jsx(u0,{form:e,name:t,valueFormat:"DD.MM.YYYY HH:mm:ss",schema:n,popoverProps:{withinPortal:s},...a});case"Date":return p.jsx(l0,{form:e,name:t,valueFormat:"DD.MM.YYYY",schema:n,popoverProps:{withinPortal:s},...a});case"Geometry":return p.jsx(c0,{form:e,name:t,filter:o,...a});case"Raw":return p.jsx(Wu,{form:e,name:t,filter:o,...a});case"Integer":case"Float":return p.jsx(bo,{form:e,name:t,...a});case"Enum":return p.jsx(Vu,{form:e,name:t,items:n.values,comboboxProps:{withinPortal:s},...a});default:return p.jsx(bo,{form:e,name:t,...a})}}function vD({form:e,name:t,items:n,onChange:o,...s}){return p.jsx(T.Select,{data:n,searchable:!0,...e.getInputProps(t),onChange:o,...s})}function Hu({form:e,name:t,label:n,comboboxProps:o,...s}){const a=T.useCombobox({onDropdownClose:()=>a.resetSelectedOption(),onDropdownOpen:()=>a.updateSelectedOptionIndex("active")}),[u,c]=A.useState([]),[d,h]=A.useState(""),y=C=>{d!==""&&(u.includes(d)||c(E=>[...E,d]),h(""))},g=C=>c(E=>E.filter(w=>w!==C)),b=u.map(C=>p.jsx(T.Pill,{withRemoveButton:!0,onRemove:()=>g(C),children:C},C));return A.useEffect(()=>{const C=e.getInputProps(t).value;if(C)try{c([...C])}catch(E){console.error("Error parsing JSON:",E)}},[]),A.useEffect(()=>{e.getInputProps(t).onChange(u)},[u]),p.jsx(T.InputWrapper,{label:n,children:p.jsxs(T.Combobox,{store:a,onOptionSubmit:y,...o,children:[p.jsx(T.Combobox.DropdownTarget,{children:p.jsx(T.PillsInput,{onClick:()=>a.openDropdown(),children:p.jsxs(T.Pill.Group,{children:[b,p.jsx(T.Combobox.EventsTarget,{children:p.jsx(T.PillsInput.Field,{onFocus:()=>a.openDropdown(),onBlur:()=>a.closeDropdown(),value:d,placeholder:"Search values",onChange:C=>{a.updateSelectedOptionIndex(),h(C.currentTarget.value)},onKeyDown:C=>{C.key==="Backspace"&&d.length===0&&(C.preventDefault(),g(u[u.length-1]))}})})]})})}),p.jsx(T.Combobox.Dropdown,{children:p.jsx(T.Combobox.Options,{children:p.jsxs(T.Combobox.Option,{value:"$create",children:["+ Create ",d]})})})]})})}function bD({form:e,name:t,items:n,onChange:o,...s}){return p.jsx(T.Select,{data:n,searchable:!0,...e.getInputProps(t),onChange:o,...s})}function p0({onClose:e,...t}){const{info:n,queryParams:o,setQueryParams:s,path:a}=xe(),u=za.useForm({initialValues:{filters:[]},validate:mD(Ki({filters:ml().of(Ki({col:Zo().transform(g=>g||void 0).required("Field is required"),opr:Zo().transform(g=>g||void 0).required("col is required"),value:Jo().when("col",{is:g=>g&&n.filters[g].schema.required,then:()=>Jo().required("Value is required")})}))}))}),c={bg:"transparent",size:"sm",c:"gray"},d=T.useProps("ActionIcon",c,t);A.useEffect(()=>{u.setValues({filters:[]}),u.reset()},[a]),A.useEffect(()=>{if(o.filters&&o.filters.length){const g=o.filters.filter(b=>Or(b.opr)).map(b=>({...b,key:rt.randomId()}));u.setFieldValue("filters",g)}},[o.filters]);const h=g=>{const b=g.filters.map(({key:E,...w})=>w),C=JSON.parse(JSON.stringify(b));s({filters:C,page:0}),e()},y=u.values.filters.map((g,b)=>p.jsxs(T.Box,{px:"sm",children:[p.jsxs(T.Flex,{my:"md",gap:"md",style:{whiteSpace:"nowrap"},children:[p.jsx(T.Box,{style:{width:"192px"},children:n&&n.filters&&p.jsx(vD,{form:u,name:`filters.${b}.col`,items:Object.entries(n.filters).map(([C,E])=>({label:E.label,value:String(C)})),onChange:C=>{u.setFieldValue(`filters.${b}`,{col:C,opr:"",value:"",key:rt.randomId()})}})}),p.jsx(T.Box,{style:{width:"192px"},children:g.col?p.jsx(bD,{form:u,name:`filters.${b}.opr`,items:n.filters[g.col].filters.filter(C=>Or(C.operator)).map(C=>({label:C.name,value:C.operator})),onChange:C=>{u.setFieldValue(`filters.${b}`,{col:u.values.filters[b].col,opr:C,value:"",key:rt.randomId()})}}):null}),p.jsx(T.Box,{style:{width:"192px"},children:g.col?g.opr==="in"?p.jsx(Hu,{form:u,name:`filters.${b}.value`}):p.jsx(Gu,{form:u,name:`filters.${b}.value`,schema:n.filters[g.col].schema,filter:!0}):null}),p.jsx(T.ActionIcon,{bg:d.bg,size:d.size,c:d.c,onClick:()=>{u.removeListItem("filters",b)},children:p.jsx(wd,{})})]}),u.values.filters.length>1&&b<u.values.filters.length-1?p.jsx(T.Divider,{my:"md",labelPosition:"center",label:"AND"}):null]},g.key));return p.jsxs(T.Box,{component:"form",onSubmit:u.onSubmit(h),children:[y.length===0&&p.jsx(T.Box,{style:{width:"642px"},children:p.jsx(T.Text,{style:{fontStyle:"italic",padding:"7px"},size:"sm",c:"dimmed",children:"No filters selected..."})}),p.jsx(T.ScrollArea.Autosize,{mah:"40vh",mt:20,children:y}),p.jsx(T.Divider,{my:"sm"}),p.jsxs(T.Box,{style:{display:"flex",justifyContent:"space-between"},children:[p.jsx(T.Button,{variant:"subtle",leftSection:p.jsx(Tl,{}),onClick:()=>{u.insertListItem("filters",{col:"",opr:"",value:"",key:rt.randomId()})},children:"Add Filter"}),p.jsx(T.Group,{spacing:"md",children:p.jsx(T.Button,{type:"submit",children:"Apply"})})]})]})}function h0(...e){const{queryParams:t}=xe(),n={bg:"transparent",size:"sm",c:"gray"},o=T.useProps("ActionIcon",n,e),[s,a]=A.useState(!1);return p.jsxs(T.Popover,{opened:s,position:"bottom-end",onClose:()=>a(!1),closeOnClickOutside:!1,children:[p.jsx(T.Popover.Target,{children:p.jsx(T.Tooltip,{opened:s?!1:null,label:"Filter",children:(t==null?void 0:t.filters.filter(u=>Or(u.opr)).length)!=0?p.jsx(T.Indicator,{zIndex:20,size:16,label:t==null?void 0:t.filters.length,children:p.jsx(T.ActionIcon,{bg:o.bg,size:o.size,c:o.c,onClick:()=>a(!0),children:p.jsx(bd,{})})}):p.jsx(T.ActionIcon,{bg:o.bg,size:o.size,c:o.c,onClick:()=>a(!0),children:p.jsx(bd,{})})})}),p.jsxs(T.Popover.Dropdown,{px:"xs",children:[p.jsx(T.Box,{style:{position:"absolute",top:4,right:4},children:p.jsx(T.CloseButton,{title:"Filters",onClick:()=>a(!1)})}),p.jsx(p0,{onClose:()=>{a(!1)}})]})]})}const Yu=A.memo(({hideAdd:e,hideFilter:t,hideDownload:n,toolbarCustomizer:o})=>{const{info:s}=xe(),a=A.useMemo(()=>{const c={};return Object.entries(o).forEach(([d,h])=>{c[d]=h,typeof c[d]=="function"&&(c[d]=c[d]())}),c},[o]),u=s.permissions.includes("can_post");return p.jsxs(T.Flex,{justify:"flex-end",p:"md",gap:"sm",children:[!n&&(a.download||p.jsx(a0,{})),u&&!e?a.add||p.jsx(Ju,{}):null,t?null:a.filter||p.jsx(h0,{})]})});Yu.displayName="Toolbar";function _D(e,{autoInvoke:t=!0,initialLoading:n=!1,clearDataOnRefetch:o=!1,...s}={}){const[a,u]=A.useState(null),[c,d]=A.useState(n),[h,y]=A.useState(null),g=A.useRef(null),b=A.useCallback(()=>{if(e)return o&&u(null),y(null),g.current&&g.current.abort(),g.current=new AbortController,d(!0),fetch(e,{signal:g.current.signal,...s}).then(async E=>{const w=await E.json();if(!E.ok){const $=typeof w.detail=="string"?w.detail:JSON.stringify(w.detail,null,2);throw new Error($)}return u(w),d(!1),w}).catch(E=>(E&&E.name!=="AbortError"&&(y(E),d(!1)),E))},[e]),C=A.useCallback(()=>{var E;g.current&&((E=g.current)==null||E.abort(""),d(!1))},[]);return A.useEffect(()=>(t&&b(),()=>{g.current&&g.current.abort("")}),[b,t]),{data:a,loading:c,error:h,refetch:b,abort:C}}function g0(e){const t=A.useRef(!1);return A.useMemo(()=>e&&!t.current?(t.current=!0,!0):t.current,[e])}function Ru({children:e,cond:t}){return g0(t)?e:null}const qu=A.forwardRef((e,t)=>{const{path:n,data:o,loading:s,info:a,setQueryParams:u}=xe(),{hideToolbar:c=!1,hideFilter:d=!1,hideAdd:h=!1,hideSettings:y=!1,hideActions:g=!1,hidePagination:b=!1,hideError:C=!1,hideDownload:E=!0,onSelectCheckbox:w=null,onClickEntry:$=null,fetchOnMount:N=!0,bulkActions:J=null,styles:V,headerCustomizer:L={},bodyCustomizer:D={},toolbarCustomizer:B={},counter:Y=!1,bodySeparator:ae,form:te}=e;A.useEffect(()=>{!o&&N&&u({})},[o]);const{setView:S}=zn("add"),{setView:W}=zn("edit");if(A.useEffect(()=>{var fe,he;(fe=te==null?void 0:te.add)!=null&&fe.initialView&&S(te.add.initialView),(he=te==null?void 0:te.edit)!=null&&he.initialView&&W(te.edit.initialView)},[]),!a)return;const Q=J===null;return p.jsxs(T.Paper,{ref:t,h:"100%",display:"flex",pos:"relative",style:{flexDirection:"column",...V},children:[p.jsxs(Ru,{cond:!!a,children:[p.jsx(Zu,{jsonForms:te==null?void 0:te.add}),p.jsx($u,{jsonForms:te==null?void 0:te.edit})]}),c?null:p.jsx(Yu,{hideFilter:d,hideAdd:h,hideSettings:y,hideDownload:E,toolbarCustomizer:B}),o?p.jsx(s0,{bulkActions:J,hideActions:g,loading:s,onSelectCheckbox:w,onClickEntry:$,hideCheckbox:Q,hideDownload:E,headerCustomizer:L,bodyCustomizer:D,bodySeparator:ae}):null,!b&&o?p.jsx(ju,{counter:Y}):null,C?null:p.jsx(Mu,{})]})});qu.displayName="DataGrid";function wD({relatedPath:e,...t}){const{path:n}=xe();return dt(n?n.substring(0,n.lastIndexOf("/")):"",e.substring(0,e.lastIndexOf("/"))),p.jsx(md,{resource_name:e.replace("/",""),relation:t,children:p.jsx(qu,{hideToolbar:!0,hideDownload:!1})})}const TD=A.memo(wD);function m0({item:e,info:t,loading:n,opened:o,onClose:s,...a}){const u={modal:{},tabs:{},tabsList:{},tabsPanel:{}},{modal:c,tabs:d,tabsList:h,tabsPanel:y}=T.useProps("ViewDialog",u,a);return p.jsxs(T.Modal,{opened:o,onClose:s,title:`${e==null?void 0:e.show_title} (#${Ut(e==null?void 0:e.id)})`,size:"lg",centered:!0,zIndex:1e3,...c,children:[p.jsx(T.LoadingOverlay,{visible:n}),!n&&e?p.jsxs(T.Tabs,{defaultValue:"details",...d,children:[p.jsxs(T.Tabs.List,{...h,children:[p.jsx(T.Tabs.Tab,{value:"details",children:"Details"}),t.relations.map((g,b)=>p.jsx(T.Tabs.Tab,{value:g.name,children:g.name},b))]}),p.jsx(T.Tabs.Panel,{pt:"xs",value:"details",...y,children:p.jsx(T.Paper,{p:"xs",withBorder:!0,children:p.jsx(T.Stack,{spacing:"md",children:p.jsx(T.ScrollArea,{h:450,type:"auto",children:e.show_columns.map((g,b)=>p.jsxs(T.Grid,{maw:500,children:[p.jsx(T.Grid.Col,{span:4,children:p.jsx(T.Text,{size:"md",children:e.label_columns[g]})}),p.jsx(T.Grid.Col,{span:1,children:p.jsx(T.Text,{size:"xs",children:":"})}),p.jsx(T.Grid.Col,{span:6,children:p.jsx(T.Text,{size:"md",children:Ri(e.result,g)})})]},b))})})})}),t.relations.map((g,b)=>p.jsx(T.Tabs.Panel,{pt:"xs",value:g.name,children:p.jsx(T.Paper,{withBorder:!0,children:p.jsx(TD,{relatedPath:g.path,id:Ut(e.id),foreign_key:g.foreign_key,type:g.type})})},b))]}):null]})}function y0({id:e,...t}){const{info:n,getEntry:o}=xe(),s={bg:"transparent",size:"sm",c:"gray"},a=T.useProps("ActionIcon",s,t),[u,c]=A.useState(null),[d,h]=A.useState(!1),[y,g]=A.useState(!1);return p.jsxs(p.Fragment,{children:[p.jsx(T.Tooltip,{label:"Details",children:p.jsx(T.ActionIcon,{bg:a.bg,size:a.size,c:a.c,onClick:async()=>{h(!0);const b=await o(e);b&&(c(b),h(!1),g(!0))},children:p.jsx(Jb,{})})}),p.jsx(m0,{item:u,info:n,loading:d,opened:y,onClose:()=>g(!1)})]})}function Ku({id:e}){const{info:t}=xe();return p.jsxs(T.Flex,{style:{gap:4,whiteSpace:"nowrap"},children:[t!=null&&t.permissions.includes("can_get")?p.jsx(y0,{id:e}):null,t!=null&&t.permissions.includes("can_put")?p.jsx(Ed,{id:e}):null,t!=null&&t.permissions.includes("can_delete")?p.jsx(Cd,{id:e}):null]})}function Ju({tooltipProps:e,actionIconProps:t,...n}){const{setOpened:o}=zn("add"),s={variant:"transparent",size:"sm",c:"gray"},a=T.useProps("ActionIcon",s,n);return p.jsx(p.Fragment,{children:p.jsx(T.Tooltip,{...e,label:(e==null?void 0:e.label)??"Add Item",children:p.jsx(T.ActionIcon,{variant:a.variant,size:a.size,c:a.c,onClick:()=>o(!0),...t,children:p.jsx(Tl,{})})})})}function Zu({jsonForms:e,...t}){const{info:n,addEntry:o}=xe(),{opened:s,setOpened:a,state:u,setState:c,reset:d,view:h,setView:y}=zn("add"),{jsonForms:g}=T.useProps("AddDialog",{},{}),b=A.useMemo(()=>Bn(g,e),[g,e]),C=A.useCallback(async E=>{E==null||E.preventDefault(),await o(u.data),a(!1)},[o,a,u.data]);return p.jsx(Lm,{schema:n.add_schema,uischema:n.add_uischema,state:u,setState:c,view:h,setView:y,jsonForms:b,onSubmit:C,buttonText:"Add",opened:s,onClose:()=>a(!1),onExitTransitionEnd:d,...h===gt.OVERLAY?zm:{},...h===gt.NORMAL?Bm:{},...t,title:t.title??(n==null?void 0:n.add_title)})}function SD({children:e,fetch:t=!0,loading:n=p.jsx(T.Center,{children:p.jsx(T.Loader,{})}),end:o=p.jsx(T.Center,{children:"End of data"}),fetchWrapper:s=T.Center,fetchWrapperProps:a}){const{streaming:u,loading:c}=xe(),{ref:d,inViewport:h}=rt.useInViewport(),y=A.useMemo(()=>Object.values(u.data).flat(),[u.data]),g=A.useMemo(()=>typeof e=="function"?e(y):e,[e,y]);return A.useEffect(()=>{h&&t&&u.fetch()},[h]),p.jsxs(p.Fragment,{children:[g,c&&n,u.isEnd&&o,p.jsx(s,{ref:d,id:"IS-load-trigger",mih:"1%",...a})]})}function CD(e,t){const n=xe(),o=Ir(),s=A.useCallback(({row:a,...u})=>p.jsx(Mn,{fallback:p.jsx(Ku,{id:a.original.id}),functionProps:{api:n,auth:o,data:a.original,mrtProps:{row:a,...u}},children:t}),[n,o,t]);return{enableEditing:!e,editDisplayMode:"modal",renderRowActions:s}}function ED(e,t){return{enableRowSelection:!!e||!!t}}const Lr=(e={},...t)=>t.reduce((n,o)=>Bn(n,e[o]),{}),_o=(e,t,n=!1)=>{let o="";n&&(o+="filter");const s=n?e[0].toUpperCase():e[0].toLowerCase();return o+=s+e.slice(1),`${o}.${t}`},v0=(e="")=>{e.startsWith("filter")&&(e=e.slice(6));const[t="",n=""]=e.split(".");return{col:t,operator:n}};function xD({col:e,colFilter:t,onClick:n,...o}){return p.jsxs(T.Menu,{shadow:"md",width:"target",...o,children:[p.jsx(T.Menu.Target,{children:p.jsx(T.Button,{children:"Add filter"})}),p.jsx(T.Menu.Dropdown,{children:t.filters.filter(s=>Or(s.operator)).map(s=>p.jsx(T.Menu.Item,{onClick:()=>n({col:e,opr:s.operator,value:""}),children:s.name},`${t.label}-${s.name}`))})]})}function AD({col:e}){const{info:t,queryParams:n,setQueryParams:o}=xe(),s=za.useForm({initialValues:{filters:(n==null?void 0:n.filters)||[]}}),a=A.useMemo(()=>(t==null?void 0:t.filters[e])||{},[e,t==null?void 0:t.filters]),u=A.useMemo(()=>{var y;return((y=a==null?void 0:a.filters)==null?void 0:y.reduce((g,b)=>({...g,[b.operator]:b.name}),{}))||{}},[a==null?void 0:a.filters]),[c]=rt.useDebouncedValue(s.getValues(),nr);rt.useDidUpdate(()=>{const y=c.filters.filter(g=>g.value);o({filters:y})},[c]);const d=s.getValues().filters,h=d.map((y,g)=>y.col===e&&Or(y.opr)?p.jsxs(A.Fragment,{children:[p.jsx(T.Grid.Col,{span:1.5,py:0,children:p.jsx(T.Center,{h:"100%",w:"100%",children:p.jsx(T.CloseButton,{onClick:()=>s.removeListItem("filters",g),size:"md",title:"Remove filter",variant:"outline"})})}),p.jsx(T.Grid.Col,{span:10.5,py:0,children:y.opr==="in"?p.jsx(Hu,{form:s,name:`filters.${g}.value`,label:u[y.opr],comboboxProps:{withinPortal:!1}}):p.jsx(Gu,{form:s,name:`filters.${g}.value`,label:u[y.opr],schema:a.schema,withinPortal:!1,filter:!0})}),g>=0&&g+1<d.length&&p.jsx(T.Grid.Col,{span:12,py:0,children:p.jsx(T.Divider,{my:"sm",label:"AND",align:"center"})})]},`${y.col}-${g}`):null).filter(Boolean);return p.jsxs(T.Grid,{w:h.length?"25rem":"100%",gap:"md",gutter:"xs",children:[h.length?h:p.jsx(T.Grid.Col,{span:12,children:p.jsx(T.Text,{align:"center",c:"gray",style:{fontStyle:"italic"},children:"No filters"})}),p.jsx(T.Grid.Col,{span:12,children:p.jsx(T.Stack,{children:p.jsx(xD,{col:e,colFilter:a||{filters:[]},onClick:y=>s.insertListItem("filters",y),withinPortal:!1})})})]})}function OD({filters:e,col:t,opr:n,table:o}){const s=T.useMantineTheme();return e.map(a=>{const u=a.operator===n;return p.jsx(T.Menu.Item,{color:u?s.primaryColor:void 0,leftSection:p.jsx(T.Text,{size:"xl",ta:"center",w:"2ch",style:{transform:"translateY(-0.1em)"},children:a.name[0]}),onClick:()=>o.setColumnFilterFns(c=>({...c,[t]:_o(t,a.operator)})),value:a.opr,children:a.name},a.operator)})}function ID({enableAdvancedFilters:e,mode:t,setMode:n,col:o,opr:s,filters:a,table:u}){return p.jsxs(p.Fragment,{children:[e&&p.jsxs(p.Fragment,{children:[p.jsx(T.Menu.Item,{component:"div",p:0,children:p.jsx(T.SegmentedControl,{fullWidth:!0,size:"sm",data:["Basic","Advanced"],value:t,onChange:n})}),p.jsx(T.Menu.Divider,{})]}),t==="Basic"&&p.jsx(OD,{filters:a,col:o,opr:s,table:u}),t==="Advanced"&&p.jsx(AD,{col:o})]})}const Si=e=>e!=null&&e!=="",b0=A.forwardRef(({clearIcon:e,mrtprops:{textinputprops:t},...n},o)=>{const{value:s,onChange:a,leftInputProps:u,rightInputProps:c,groupProps:d,cleariconprops:h,...y}=n,[g,b]=A.useState([null,null]);A.useEffect(()=>{s||b([null,null])},[s]),A.useEffect(()=>{const L=JSON.stringify(g);let D=null;return g.every(Si)&&L!==s?D=setTimeout(()=>{a(JSON.stringify(g))},nr):g.every(B=>!Si(B))&&(D=setTimeout(()=>{a(void 0)},nr)),()=>clearTimeout(D)},[g]);const C=A.useCallback((L,D)=>{b(B=>{const Y=[...B];return Y[D]=L,Y})},[]);let[E,w]=g;const $=Si(w)&&!Si(E),N=Si(E)&&!Si(w),J=typeof E=="number"?p.jsx(T.ActionIcon,{...h,onClick:()=>b(L=>[null,L[1]]),children:p.jsx(Td,{})}):null,V=typeof w=="number"?p.jsx(T.ActionIcon,{...h,onClick:()=>b(L=>[L[0],null]),children:p.jsx(Td,{})}):null;return p.jsxs(T.Group,{w:"100%",wrap:"nowrap",align:"center",gap:"xs",...d,children:[p.jsx(T.NumberInput,{styles:{wrapper:{marginBottom:0}},hideControls:!0,rightSection:J,...y,...t,value:E||"",onChange:L=>C(L,0),placeholder:$?"Start value is required":"Start value",error:$&&" ",ref:o,...u}),p.jsx(T.NumberInput,{styles:{wrapper:{marginBottom:0}},hideControls:!0,rightSection:V,...y,...t,value:w||"",onChange:L=>C(L,1),placeholder:N?"End value is required":"End value",error:N&&" ",...c})]})});b0.displayName="BasicHeaderBetweenInput";const Ci=e=>e,_0=A.forwardRef(({clearIcon:e,mrtprops:{dateinputprops:t},...n},o)=>{const{value:s,onChange:a,leftInputProps:u,rightInputProps:c,groupProps:d,...h}=n,[y,g]=A.useState([null,null]);A.useEffect(()=>{s||g([null,null])},[s]),A.useEffect(()=>{const N=JSON.stringify(y);let J=null;return y.every(Ci)&&N!==s?J=setTimeout(()=>{a(JSON.stringify(y))},nr):y.every(V=>!Ci(V))&&(J=setTimeout(()=>{a(void 0)},nr)),()=>clearTimeout(J)},[y]);const b=A.useCallback((N,J)=>{N&&(N=N.toISOString()),g(V=>{const L=[...V];return L[J]=N,L})},[]);let[C,E]=y;C=C?new Date(C):null,E=E?new Date(E):null;const w=Ci(E)&&!Ci(C),$=Ci(C)&&!Ci(E);return p.jsxs(T.Group,{w:"100%",wrap:"nowrap",align:"center",gap:"xs",...d,children:[p.jsx(ei.DateInput,{clearable:!0,valueFormat:"DD.MM.YYYY",styles:{wrapper:{marginBottom:0}},...h,...t,value:C,onChange:N=>b(N,0),placeholder:w?"Start date is required":"Start date",error:w&&" ",ref:o,...u}),p.jsx(ei.DateInput,{clearable:!0,valueFormat:"DD.MM.YYYY",styles:{wrapper:{marginBottom:0}},...h,...t,value:E,onChange:N=>b(N,1),placeholder:$?"End date is required":"End date",error:$&&" ",...c})]})});_0.displayName="BasicHeaderDateBetweenInput";const w0=A.forwardRef(({clearIcon:e,mrtprops:{textinputprops:t},...n},o)=>p.jsx(T.TextInput,{ref:o,rightSection:e,...t,...n,value:n.value||""}));w0.displayName="BasicHeaderTextInput";const T0=A.forwardRef(({component:e,...t},n)=>{const o=xe(),s=Ir(),a=A.useMemo(()=>({api:o,auth:s,componentProps:{...t,ref:n}}),[o,s,t,n]);return p.jsx(Mn,{ref:n,fallback:p.jsx(w0,{...t}),functionProps:a,children:e})});T0.displayName="HeaderInput";const Ei={root:"_root_yn5fy_1","date-filter":"_date-filter_yn5fy_5"},Xu={[Wa]:({componentProps:e})=>p.jsx(b0,{...e}),[Va]:({componentProps:e})=>p.jsx(_0,{...e})},S0=A.forwardRef(({label:e,disabled:t,children:n,...o},s)=>t?A.cloneElement(n,{ref:s}):p.jsx(T.Tooltip,{label:e,...o,children:A.cloneElement(n,{ref:s})}));S0.displayName="FilterIconWrapper";const C0=A.forwardRef(({indicator:e,children:t,...n},o)=>e?p.jsx(T.Indicator,{zIndex:20,size:16,label:e,...n,children:A.cloneElement(t,{ref:o})}):A.cloneElement(t,{ref:o}));C0.displayName="FilterIndicatorWrapper";function PD({children:e,enableFilterModes:t,enableAdvancedFilters:n,filterProps:o,filterModeDescription:s,filterMenu:a,filters:u,filterFn:c,mrtProps:{column:d,table:h,...y}}){var R;const{queryParams:g,setQueryParams:b}=xe(),C=xe(),E=Ir(),[w,$]=A.useState("Basic"),[N,{toggle:J}]=rt.useDisclosure(),V=((R=h.getState().columnFilterFns)==null?void 0:R[d.id])||c,L=A.useMemo(()=>v0(V).operator,[V]),D=A.useMemo(()=>{var k;return(k=u==null?void 0:u.find(K=>K.operator===L))==null?void 0:k.name},[u,L]),B=za.useField({mode:"controlled"}),Y=A.useMemo(()=>(g==null?void 0:g.filters.filter(k=>k.col===d.id&&Or(k.opr)).map(k=>({...k})))||[],[g,d.id]),ae=A.useCallback(()=>{B.reset(),d.setFilterValue(void 0)},[]),[te]=rt.useDebouncedValue(B.getInputProps().value,nr),S=rt.useMounted(),W=A.useMemo(()=>g==null?void 0:g.filters.find(k=>k.col===d.id&&k.opr===L),[d.id,L,g==null?void 0:g.filters]);A.useEffect(()=>{S&&d.setFilterValue(te??void 0)},[te]),A.useEffect(()=>{if(!S)return;const k=d.getFilterValue();k===void 0?ae():B.getInputProps().onChange(k)},[d.getFilterValue()]),A.useEffect(()=>{S&&(W||ae())},[W]),rt.useDidUpdate(()=>{B.reset()},[L]),rt.useDidUpdate(()=>{let k=!1;const K=g==null?void 0:g.filters.map(ne=>{if(ne.opr.startsWith(ni)&&ne.col===d.id){if(ne.opr===L)k=!0;else return null;return te?{...ne,value:te}:null}return ne}).filter(Boolean);!k&&te&&K.push({col:d.id,opr:L,value:te});const X=JSON.stringify(K),ue=JSON.stringify(g.filters);X!==ue&&b({filters:K})},[te]);const Q=A.useMemo(()=>{const k={variant:"subtle"};return!(u!=null&&u.length)&&(k.disabled=!0,k.c="gray"),k},[u==null?void 0:u.length]),fe=A.useMemo(()=>Ha(t?e==null?void 0:e[L]:e,Xu==null?void 0:Xu[L]),[e,t,L]),he=A.useMemo(()=>({...Q,variant:"transparent",c:void 0,size:"sm",onClick:ae}),[Q,ae]),Fe=A.useMemo(()=>({api:C,auth:E,mrtProps:{column:d,table:h,...y}}),[C,E,d,y,h]),De=A.useMemo(()=>({...Fe,componentProps:{label:h.options.localization.changeFilterMode,disabled:!(u!=null&&u.length),indicator:Y.length,aiProps:Q,onClick:J}}),[Q,Y.length,u==null?void 0:u.length,Fe,h.options.localization.changeFilterMode,J]),Ue=A.useMemo(()=>({...Fe,componentProps:{filterMode:D}}),[D,Fe]),Ie=lt(t?Lr(o,L):o,Fe),pt=A.useMemo(()=>{var k,K;return{w:"100%",variant:"unstyled",disabled:!(u!=null&&u.length),title:u.length?void 0:"No filters",placeholder:(k=h.options.localization.filterByColumn)==null?void 0:k.replace("{column}",String(d.columnDef.header)),"aria-label":(K=h.options.localization.filterByColumn)==null?void 0:K.replace("{column}",String(d.columnDef.header)),style:{fontWeight:"normal"},mrtprops:{column:d,table:h,...y,textinputprops:{className:Ar("mrt-filter-text-input",Ei.root),...lt(h.mantineFilterTextInputProps,[{column:d,table:h,...y}]),...lt(d.columnDef.mantineFilterTextInputProps,[{column:d,table:h,...y}])},selectprops:{className:Ar("mrt-filter-text-input",Ei.root),...lt(h.mantineFilterSelectProps,{column:d,table:h,...y}),...lt(d.columnDef.mantineFilterSelectProps,{column:d,table:h,...y})},multiselectprops:{className:Ar("mrt-filter-text-input",Ei.root),...lt(h.mantineFilterMultiSelectProps||{clearable:!0},{column:d,table:h,...y}),...lt(d.columnDef.mantineFilterMultiSelectProps,{column:d,table:h,...y})},dateinputprops:{className:Ar("mrt-filter-text-input",Ei.root,Ei["date-filter"]),...lt(h.mantineFilterDateInputProps,{column:d,table:h,...y}),...lt(d.columnDef.mantineFilterDateInputProps,{column:d,table:h,...y})},autocompleteprops:{className:Ar("mrt-filter-text-input",Ei.root),...lt(h.mantineFilterAutocompleteProps,{column:d,table:h,...y}),...lt(d.columnDef.mantineFilterAutocompleteProps,{column:d,table:h,...y})}},ref:X=>{X&&(h.refs.filterInputRefs.current[`${d.id}-0`]=X)},clearIcon:B.isDirty()&&p.jsx(T.CloseButton,{...he}),...Ie,cleariconprops:he}},[he,d,Ie,B,u.length,y,h]);return p.jsxs(T.Menu,{opened:N,closeOnClickOutside:!0,onChange:J,children:[p.jsxs(T.Stack,{w:"100%",gap:"0.25rem",children:[p.jsxs(T.Group,{gap:"xs",justify:"space-between",wrap:"nowrap",children:[p.jsx(T0,{component:fe,field:B,...B.getInputProps(),...pt}),t&&p.jsx(T.Menu.Target,{children:p.jsx(Mn,{fallback:u.length?p.jsx(S0,{label:h.options.localization.changeFilterMode,position:"bottom-start",withArrow:!0,arrowPosition:"side",children:p.jsx(C0,{indicator:Y.length,disabled:!n,children:p.jsx(T.ActionIcon,{...Q,onClick:J,children:p.jsx(Zb,{})})})}):null,functionProps:De,children:a})})]}),t&&p.jsx(Mn,{fallback:u.length?p.jsx(T.Input.Description,{size:"xs",children:h.options.localization.filterMode.replace("{filterType}",yn.localizedFilterOption(Lr(h.options.localization,d.id),D)||yn.localizedFilterOption(h.options.localization,D)||D)}):null,functionProps:Ue,children:s})]}),p.jsx(T.Menu.Dropdown,{children:p.jsx(ID,{enableAdvancedFilters:n,mode:w,setMode:$,col:d.id,opr:L,filters:u,table:h})})]})}function $D({highlight:e,truncate:t,children:n}){return Array.isArray(n)?n.map((o,s)=>{var a;return(a=t==null?void 0:t[s])!=null&&a.truncated?p.jsx(T.Tooltip,{label:t[s].original,children:p.jsx(T.Highlight,{highlight:e,children:t[s].truncated},s)},s):p.jsx(T.Highlight,{highlight:e,children:o},s)}):t!=null&&t.truncated?p.jsx(T.Tooltip,{label:t.original,children:p.jsx(T.Highlight,{highlight:e,children:t.truncated})}):p.jsx(T.Highlight,{highlight:e,children:n})}const MD=(e,t)=>{var o,s,a;const n=(a=(s=(o=e==null?void 0:e.filters)==null?void 0:o[t])==null?void 0:s.schema)==null?void 0:a.type;if(!n)return ja;switch(n){case"Date":case"DateTime":return Va;case"Integer":case"Float":return Wa;default:return ja}};function FD(e,t,n,o){const{path:s,info:a,data:u,specialKey:c}=xe(),d=xe(),h=Ir(),y=A.useMemo(()=>(u==null?void 0:u.list_columns.map(C=>{var te,S,W;const{component:E,enableFilterModes:w,enableAdvancedFilters:$,filterComponent:N,filterProps:J,filterModeDescription:V,filterMenu:L,defaultOpr:D=MD(a,C)}=Lr(t,c.all,C),B=_o(C,D),Y=((S=(te=a==null?void 0:a.filters)==null?void 0:te[C])==null?void 0:S.filters.filter(Q=>Q.operator.startsWith("header:")))||[],ae={};return E!==void 0&&(ae.Header=Q=>lt(E,{api:d,auth:h,mrtProps:Q})),{accessorKey:C,accessorFn:Q=>Ri(Q,C),header:(W=u==null?void 0:u.label_columns)==null?void 0:W[C],Filter:Q=>p.jsx(PD,{enableFilterModes:w,enableAdvancedFilters:$,filterProps:J,filterModeDescription:V,filterMenu:L,filters:Y,filterFn:B,mrtProps:Q,children:N}),enableSorting:(u==null?void 0:u.order_columns.includes(C))||(u==null?void 0:u.order_columns.includes(`${C}.id`)),filterFn:Y.length?B:void 0,columnFilterModeOptions:Y.map(Q=>_o(C,Q.operator)),Cell:({cell:Q,table:fe,column:he,...Fe})=>{const De=fe.getState().globalFilter,Ue=he.getFilterValue()||"",{component:Ie,separator:pt,truncate:R}=Lr(n,c.all,C);let k=[];De&&k.push(...De.split(o).map(ne=>ne.trim())),Ue&&typeof Ue=="string"&&k.push(...Ue.split(o).map(ne=>ne.trim()));let K=Q.getValue();typeof K=="number"?K=K.toLocaleString():K==null&&(K=""),pt&&(K=K.split(pt));let X={};R&&(Array.isArray(K)?X=K.map(ne=>({original:ne,truncated:ne.length>R?`${ne.slice(0,R)}...`:null})):X={original:K,truncated:K.length>R?`${K.slice(0,R)}...`:null});const ue={api:d,auth:h,data:Q.row.original,highlight:k,componentProps:{value:K},mrtProps:{cell:Q,table:fe,column:he,...Fe}};return p.jsx(Mn,{fallback:p.jsx($D,{highlight:k,truncate:X,children:K}),functionProps:ue,children:Ie})},...ae,...Lr(e,c.all,C)}}))||[],[u==null?void 0:u.list_columns,u==null?void 0:u.label_columns,u==null?void 0:u.order_columns,a,e,c.all,d,h,t,n,o]),[g,b]=rt.useSetState({});return A.useEffect(()=>{y.length&&b({[u.path]:y})},[y]),{columns:y.length?y:(g==null?void 0:g[s])||y,manualFiltering:!0}}function DD(){const{data:e,loading:t}=xe();return{data:(e==null?void 0:e.result)||[],rowCount:(e==null?void 0:e.count)||0,state:{showLoadingOverlay:t}}}function kD(e){const{data:t}=xe();return e?{mantineTableBodyRowProps:({row:n})=>({onClick:()=>{const o=t.ids[n.id];e(o,n.original)},style:{cursor:"pointer"}})}:null}function ND(){const{info:e}=xe();return{filterFns:A.useMemo(()=>Object.entries((e==null?void 0:e.filters)||{}).reduce((t,[n,o])=>(o.filters.filter(s=>s.operator.startsWith("header:")).forEach(s=>t[_o(n,s.operator)]=null),t),{}),[e==null?void 0:e.filters])}}function LD(){const{queryParams:e,setQueryParams:t,info:n}=xe(),o=A.useMemo(()=>{var h;return(h=e==null?void 0:e.filters)==null?void 0:h.find(y=>y.opr===ti)},[e==null?void 0:e.filters]),[s,a]=A.useState((o==null?void 0:o.value)||""),[u]=rt.useDebouncedValue(s,nr),c=A.useMemo(()=>{var h;return(h=Object.entries((n==null?void 0:n.filters)||{}).find(([,y])=>y.filters.find(g=>g.operator===ti)))==null?void 0:h[0]},[n==null?void 0:n.filters]);rt.useDidUpdate(()=>{o&&o.value!==u&&a(o.value)},[o]),rt.useDidUpdate(()=>{var C;if(!c)return;const h=((C=e==null?void 0:e.filters)==null?void 0:C.filter(E=>E.opr!==ti))||[],y={col:c,opr:ti,value:u};u&&h.push(y);const g=JSON.stringify(h),b=JSON.stringify((e==null?void 0:e.filters)||[]);g!==b&&t({page:0,filters:h})},[u]);const d=A.useMemo(()=>{const h={disabled:!c};return c||(h.placeholder="No global filter available"),h},[c]);return{manualFiltering:!0,onGlobalFilterChange:a,state:{globalFilter:s},mantineSearchTextInputProps:d}}function BD(e){const{data:t,queryParams:n,setQueryParams:o}=xe(),s=A.useMemo(()=>({pageIndex:(n==null?void 0:n.page)||_f,pageSize:(n==null?void 0:n.page_size)||wf}),[n==null?void 0:n.page,n==null?void 0:n.page_size]),a=A.useCallback(u=>{const c=u(s);!(t!=null&&t.count)&&c.pageIndex===0||o({page:c.pageIndex,page_size:c.pageSize})},[t==null?void 0:t.count,s,o]);return{enablePagination:!e,manualPagination:!0,state:{pagination:s},onPaginationChange:a}}function zD(e){const{ref:t,height:n}=rt.useElementSize(),{ref:o,height:s}=rt.useElementSize(),a=A.useMemo(()=>{const h={h:"100%",withBorder:e};return e||(h.shadow=void 0),h},[e]),u=A.useMemo(()=>({ref:o}),[o]),c=A.useMemo(()=>({ref:t,pos:"sticky",bottom:0}),[t]),d=A.useMemo(()=>({h:`calc(100% - ${s+n}px)`}),[s,n]);return{mantinePaperProps:a,mantineTopToolbarProps:u,mantineBottomToolbarProps:c,mantineTableContainerProps:d}}function UD(){const{queryParams:e,setQueryParams:t,data:n}=xe(),o=A.useMemo(()=>e!=null&&e.order_column?[{id:e.order_column.split(".id")[0],desc:e.order_direction==="desc"}]:[],[e==null?void 0:e.order_column,e==null?void 0:e.order_direction]),s=A.useCallback(a=>{const u=a(o);if(!u.length){t({order_column:null,order_direction:null});return}const c=u[0];t({order_column:n.order_columns.includes(c.id)?c.id:`${c.id}.id`,order_direction:c.desc?"desc":"asc"})},[n==null?void 0:n.order_columns,t,o]);return{manualSorting:!0,state:{sorting:o},onSortingChange:s}}function jD({table:e,...t}){const[n,o]=A.useState(!1),{download:s}=xe(),a={variant:"transparent",size:"md",c:"gray"},u=T.useProps("ActionIcon",a,t);return n?p.jsx(T.ThemeIcon,{variant:"transparent",size:u.size,c:u.c,children:p.jsx(T.Loader,{size:"100%",color:u.c})}):p.jsx(T.Tooltip,{label:e.options.localization.download??"Download",children:p.jsx(T.ActionIcon,{variant:u.variant,size:u.size,c:u.c,className:"filterButton",onClick:()=>{o(!0),s("download").then(()=>o(!1))},children:p.jsx(vd,{})})})}function WD({table:e,...t}){const[n,o]=A.useState(!1),{loading:s,refetch:a}=xe(),u={variant:"transparent",size:"md",c:"gray"},c=T.useProps("ActionIcon",u,t);return A.useEffect(()=>{s||o(!1)},[s]),n?p.jsx(T.ThemeIcon,{variant:"transparent",size:c.size,c:c.c,children:p.jsx(T.Loader,{size:"100%",color:c.c})}):p.jsx(T.Tooltip,{label:e.options.localization.refresh??"Refresh",children:p.jsx(T.ActionIcon,{variant:c.variant,size:c.size,c:c.c,className:"filterButton",onClick:()=>{o(!0),a()},children:p.jsx(t_,{})})})}const Qu={toggleGlobalFilter:1,filter:2,download:3,add:4,refresh:5,showHideColumns:6,toggleDensePadding:7,toggleFullScreen:8};function VD(e,t){return{1:p.jsx(yn.MRT_ToggleGlobalFilterButton,{table:e,disabled:!1},"basic-1"),2:p.jsx(yn.MRT_ToggleFiltersButton,{table:e},"basic-2"),3:(t==null?void 0:t["3"])&&p.jsx(jD,{table:e},"basic-3"),4:(t==null?void 0:t["4"])&&p.jsx(Ju,{tooltipProps:{label:e.options.localization.add}},"basic-4"),5:p.jsx(WD,{table:e},"basic-5"),6:p.jsx(yn.MRT_ShowHideColumnsButton,{table:e},"basic-6"),7:p.jsx(yn.MRT_ToggleDensePaddingButton,{table:e},"basic-7"),8:p.jsx(yn.MRT_ToggleFullScreenButton,{table:e},"basic-8")}}function E0(e,t,n,o){Object.entries(e||{}).forEach(([a,u])=>{a in Qu&&(t[Qu[a]]=p.jsx(Mn,{fallback:t[Qu[a]],functionProps:n,children:u},`custom-${a}`))});let s=Object.values(t);return Object.entries(o||{}).forEach(([a,u])=>{a=Number(a)-1;const c=p.jsx(Mn,{functionProps:n,children:u},`order-${a}`);a>s.length?s.push(c):s=[...s.slice(0,a),c,...s.slice(a)]}),p.jsx(T.Flex,{gap:"0.125rem",align:"center",children:s})}function GD(e={},t,n){const{info:o,queryParams:s,setQueryParams:a}=xe(),u=xe(),c=Ir(),{customizer:d,custom:h,leftToolbar:y}=e,g=A.useMemo(()=>t?[{label:"All",value:"[]"},...t.map(E=>({label:E.name,value:JSON.stringify(E.value)}))]:[],[t]),b=A.useMemo(()=>g.length?p.jsx(T.SegmentedControl,{value:JSON.stringify((s==null?void 0:s.filters)||[]),onChange:E=>a({filters:JSON.parse(E)}),data:g}):null,[s==null?void 0:s.filters,g,a]);return{renderToolbarInternalActions:A.useCallback(({table:E})=>{const w={api:u,auth:c,mrtProps:{table:E}},$={3:o==null?void 0:o.permissions.includes("can_download"),4:o==null?void 0:o.permissions.includes("can_post")},N=VD(E,$);return E0(d,N,w,h)},[u,c,h,d,o==null?void 0:o.permissions]),enableTopToolbar:!n,enableFilters:(d==null?void 0:d.filter)!==null,...A.useMemo(()=>{if(b&&y)throw new Error("quickFilters and toolbar.leftToolbar are mutually exclusive, please use only one of them");const E={};if(b&&(E.renderTopToolbarCustomActions=()=>p.jsx(T.Group,{justify:"space-between",children:p.jsx(T.Box,{children:b})}),E.positionToolbarAlertBanner="bottom"),y){const{custom:w}=y;E.renderTopToolbarCustomActions=({table:$})=>E0(void 0,{},{api:u,auth:c,mrtProps:{table:$}},w),E.positionToolbarAlertBanner="bottom"}return E},[u,c,y,b])}}const x0={"toolbar-alert":"_toolbar-alert_bw71q_25","head-overlay":"_head-overlay_bw71q_28"},HD=({alertBanner:e,table:t,...n})=>{var De,Ue;const{getFilteredSelectedRowModel:o,getPrePaginationRowModel:s,getState:a,resetRowSelection:u,options:{enableRowSelection:c,enableSelectAll:d,icons:{IconX:h},localization:y,mantineToolbarAlertBannerBadgeProps:g,mantineToolbarAlertBannerProps:b,manualPagination:C,positionToolbarAlertBanner:E,rowCount:w}}=t,{density:$,grouping:N,rowSelection:J}=a(),{left:V,right:L,renderToolbarAlertBannerContent:D,wrapperProps:B}=e??{},{flex:Y,group:ae,stack:te}=B??{},S={...lt(b,{table:t}),...n},W=lt(g,{table:t}),Q=w??s().flatRows.length,fe=A.useMemo(()=>C?Object.values(J).filter(Boolean).length:o().rows.length,[J,Q,C]),he=fe?p.jsxs(T.Flex,{align:"center",gap:"sm",children:[(Ue=(De=y.selectedCountOfRowCountRowsSelected)==null?void 0:De.replace("{selectedCount}",fe.toString()))==null?void 0:Ue.replace("{rowCount}",Q.toString()),p.jsx(T.Button,{onClick:u,size:"compact-xs",variant:"subtle",children:y.clearSelection}),p.jsx(T.Button,{onClick:Ie=>yn.getMRT_SelectAllHandler({table:t})(Ie,!1,!0),size:"compact-xs",variant:"subtle",children:y.clearSelectionOnThisPage??"Clear selection on this page"})]}):null,Fe=N.length>0?p.jsxs(T.Group,{gap:"xs",children:[y.groupedBy,N.map((Ie,pt)=>p.jsxs(A.Fragment,{children:[pt>0?y.thenBy:"",p.jsxs(T.Badge,{className:"alert-badge",rightSection:p.jsx(T.ActionIcon,{color:"white",onClick:()=>t.getColumn(Ie).toggleGrouping(),size:"xs",variant:"subtle",children:p.jsx(h,{style:{transform:"scale(0.8)"}})}),variant:"filled",...W,children:[t.getColumn(Ie).columnDef.header," "]})]},`${pt}-${Ie}`))]}):null;return p.jsxs(T.Flex,{className:Ar(x0["toolbar-alert"],E==="head-overlay"&&x0["head-overlay"],$),...Y,children:[c&&d&&E==="head-overlay"&&p.jsx(yn.MRT_SelectCheckbox,{table:t}),p.jsxs(T.Group,{align:"flex-start",gap:"xs",...ae,children:[lt(V,{table:t}),Ha(lt(D,{selectedAlert:he,groupedAlert:Fe,table:t}),p.jsxs(T.Stack,{gap:"xs",...te,children:[S==null?void 0:S.children,he,Fe]})),lt(L,{table:t})]})]})};function YD(e){const{alertBanner:t}=e;return{renderToolbarAlertBannerContent:({table:n})=>p.jsx(HD,{alertBanner:t,table:n})}}function RD(){const{data:e}=xe();return A.useMemo(()=>(e==null?void 0:e.result.length)>=1e3,[e])?{enableRowVirtualization:!0,rowVirtualizerOptions:{overscan:5}}:{}}const qD={enableStickyHeader:!0,enableColumnPinning:!0},A0=A.forwardRef((e,t)=>{var Nt;const{info:n,data:o,queryParams:s,refetch:a,specialKey:u}=xe(),c=T.useProps("NextGenDataGrid",{},{}),{fetchOnMount:d=!0,hideToolbar:h,hideActions:y,hidePagination:g,hideError:b,onSelectCheckbox:C,onClickEntry:E,bulkActions:w,table:$,quickFilters:N,withBorder:J,columnProps:V,header:L,body:D,form:B,toolbar:Y={},textFilterSeparator:ae=";",bodySeparator:te,bodyTruncate:S,headerCustomizer:W,bodyCustomizer:Q,toolbarCustomizer:fe,hideAdd:he,hideDownload:Fe,hideFilter:De,...Ue}=A.useMemo(()=>Bn(c,e),[e,c]);te&&Object.keys(D).forEach(Ne=>{D[Ne]=D[Ne]||{},D[Ne].separator=D[Ne].separator||te}),S&&Object.keys(D).forEach(Ne=>{D[Ne]=D[Ne]||{},D[Ne].truncate=D[Ne].truncate||S}),W&&Object.keys(W).forEach(Ne=>{L[Ne]=L[Ne]||{},L[Ne].component=W[Ne].component||W[Ne]}),Q&&Object.keys(Q).forEach(Ne=>{D[Ne]=D[Ne]||{},D[Ne].component=Q[Ne].component||Q[Ne]}),fe&&(Y.custom=Y.custom||fe),he&&(Y.customizer=Y.customizer||{},Y.customizer.add=Y.customizer.add||null),Fe&&(Y.customizer=Y.customizer||{},Y.customizer.download=Y.customizer.download||null),De&&(Y.customizer=Y.customizer||{},Y.customizer.filter=Y.customizer.filter||null),A.useEffect(()=>{process.env.NODE_ENV==="development"&&(te&&console.warn("bodySeparator is deprecated, please use body.[col].separator instead"),S&&console.warn("bodyTruncate is deprecated, please use body.[col].truncate instead"),W&&console.warn("headerCustomizer is deprecated, please use header.[col].component instead"),Q&&console.warn("bodyCustomizer is deprecated, please use body.[col].component instead"),fe&&console.warn("toolbarCustomizer is deprecated, please use toolbar.custom instead"),he&&console.warn("hideAdd is deprecated, please use toolbar.customizer.add instead"),Fe&&console.warn("hideDownload is deprecated, please use toolbar.customizer.download instead"),De&&console.warn("hideFilter is deprecated, please use toolbar.customizer.filter instead"))},[]);const Ie=DD(),pt=UD(),R=BD(g),k=FD(V,L,D,ae),K=zD(J),X=CD(y,(Nt=Lr(D,u.actions))==null?void 0:Nt.component),ue=LD(),ne=RD(),de=GD(Y,N,h),ye=kD(E),ve=ED(C,w),we=ND(),Se=YD(Y),et=A.useMemo(()=>Bn(qD,{mantinePaperProps:{ref:t},getRowId:Ne=>Ne.id},k,Ie,pt,R,K,X,ue,ne,de,ye,ve,we,Se,$),[t,k,Ie,pt,R,K,X,ue,ne,de,ye,ve,we,Se,$]),ee=yn.useMantineReactTable(et);A.useEffect(()=>{!s&&d&&a()},[]),A.useEffect(()=>{C==null||C(Object.keys(ee.getState().rowSelection)),w==null||w.setSelectedIds(Object.keys(ee.getState().rowSelection))},[w,o==null?void 0:o.ids,ee.getState().rowSelection,C]);const{setView:mt}=zn("add"),{setView:Ke}=zn("edit");return A.useEffect(()=>{var Ne,yt;(Ne=B==null?void 0:B.add)!=null&&Ne.initialView&&mt(B.add.initialView),(yt=B==null?void 0:B.edit)!=null&&yt.initialView&&Ke(B.edit.initialView)},[]),p.jsxs(T.Box,{h:"100%",w:"100%",pos:"relative",children:[p.jsxs(Ru,{cond:!!n,children:[p.jsx(Zu,{jsonForms:B==null?void 0:B.add}),p.jsx($u,{jsonForms:B==null?void 0:B.edit})]}),p.jsx(yn.MantineReactTable,{table:ee,...Ue}),b?null:p.jsx(Mu,{})]})});A0.displayName="NextGenDataGrid";const ec={iconSmall:"_iconSmall_sxv3z_1",btn:"_btn_sxv3z_17"};function KD({basePath:e="/security",Target:t,children:n}){const o=yf.useNavigate(),{user:s,signout:a}=Ir(),[u,c]=A.useState(!1),h=[{resource_name:e+"/users",label:"Users",name:"UsersApi",Icon:n_},{resource_name:e+"/roles",label:"Roles",name:"RolesApi",Icon:Xb},{resource_name:e+"/permissions",label:"Base Permissions",name:"PermissionsApi",Icon:_d},{resource_name:e+"/permissionviews",label:"Permission on Views",name:"PermissionViewApi",Icon:_d},{resource_name:e+"/viewsmenus",label:"Views/Menus",name:"ViewsMenusApi",Icon:qb}].filter(y=>s.permissions.includes(y.name));return p.jsxs(T.Menu,{width:260,position:"bottom-end",transition:"pop-top-right",withinPortal:!0,opened:u,onClose:()=>c(!1),onOpen:()=>c(!0),children:[p.jsx(T.Menu.Target,{children:t||p.jsx(T.UnstyledButton,{className:ec.btn,style:{borderRadius:4},p:"xs",children:p.jsxs(T.Group,{style:{flexWrap:"nowrap"},spacing:7,children:[p.jsx(T.Text,{weight:500,size:"sm",style:{lineHeight:1,whiteSpace:"nowrap"},mr:3,children:`${s.first_name} ${s.last_name}`}),p.jsx(wl,{size:12})]})})}),p.jsxs(T.Menu.Dropdown,{children:[h.length?p.jsxs(p.Fragment,{children:[p.jsx(T.Menu.Label,{children:"Security"}),h.map((y,g)=>p.jsx(T.Menu.Item,{p:12,leftSection:p.jsx(y.Icon,{className:ec.iconSmall}),onClick:()=>o(y.resource_name),children:y.label},g)),p.jsx(T.Menu.Divider,{})]}):null,n,p.jsx(T.Menu.Item,{leftSection:p.jsx(Qb,{p:12,className:ec.iconSmall}),onClick:a,children:"Logout"})]})]})}O.Actions=Ku,O.Add=Ju,O.AddDialog=Zu,O.AlertDialog=Sd,O.ApiContext=Ua,O.ApiProvider=md,O.AuthContext=Ya,O.Body=i0,O.BulkActionsContext=qa,O.DEBOUNCE_DELAY=nr,O.DEFAULT_PAGE=_f,O.DEFAULT_PAGE_SIZE=wf,O.DataGrid=qu,O.Delete=Cd,O.DeleteDialog=Rp,O.Download=a0,O.Edit=Ed,O.EditDialog=$u,O.ErrorDialog=Mu,O.FallbackWrapper=Mn,O.Field=vo,O.FieldTitle=Ws,O.Filter=h0,O.FilterMenu=p0,O.FormAutocomplete=yD,O.FormContextAdd=Ka,O.FormContextEdit=Ja,O.FormDatePicker=l0,O.FormDateTimePicker=u0,O.FormField=Gu,O.FormFilterIn=Hu,O.FormGeometryField=c0,O.FormJsonField=Wu,O.FormRelatedListSelect=f0,O.FormRelatedSelect=d0,O.FormSelect=Vu,O.FormTextField=bo,O.GLOBAL_FILTER_OPERATOR=ti,O.HEADER_BETWEEN_OPERATOR=Wa,O.HEADER_CONTAINS_TEXT_OPERATOR=ja,O.HEADER_DATE_BETWEEN_OPERATOR=Va,O.HEADER_FILTER_START_KEYWORD=ni,O.Header=Uu,O.InfiniteScroll=SD,O.InfoContext=Ra,O.LazyLoadWrapper=Ru,O.Main=s0,O.MantineArrayControlRenderer=nm,O.MantineBooleanCell=Mp,O.MantineBooleanControl=cm,O.MantineBooleanInput=Rl,O.MantineDateCell=Dp,O.MantineDateControl=dm,O.MantineDateInput=ql,O.MantineDateTimeCell=Np,O.MantineDateTimeControl=hm,O.MantineDateTimeInput=Kl,O.MantineEnumArrayInput=Op,O.MantineEnumArrayRenderer=sm,O.MantineEnumCell=Bp,O.MantineEnumControl=mm,O.MantineEnumInput=Jl,O.MantineGroupLayoutRenderer=Pm,O.MantineGroupLayoutTester=Im,O.MantineHorizontalLayoutRenderer=Mm,O.MantineIntegerCell=Up,O.MantineIntegerControl=vm,O.MantineJsonControl=_m,O.MantineJsonInput=Ip,O.MantineLabelRenderer=Om,O.MantineLabelTester=Am,O.MantineLayoutRenderer=cs,O.MantineNumberCell=Wp,O.MantineNumberControl=Tm,O.MantineNumberInput=ro,O.MantineObjectControl=lm,O.MantineObjectControlTester=am,O.MantineObjectInput=Pp,O.MantineOneOfEnumCell=Gp,O.MantineOneOfEnumControl=Cm,O.MantineOneOfEnumInput=Zl,O.MantineTableControl=em,O.MantineTextCell=Yp,O.MantineTextControl=xm,O.MantineTextInput=Xl,O.MantineVerticalLayoutRenderer=Dm,O.NextGenDataGrid=A0,O.NoBorderTableCell=Ti,O.NonEmptyRow=Qg,O.Pagination=ju,O.Provider=eb,O.Row=r0,O.TableToolbar=qg,O.Toolbar=Yu,O.UserMenu=KD,O.VIEW_MODE=gt,O.ValidationIcon=Rg,O.View=y0,O.ViewDialog=m0,O.authInfo=If,O.authOAuthSignin=Of,O.authResetPassword=Af,O.authSignin=Ef,O.authSignout=xf,O.compareStateWithStore=Sf,O.convertId=Ut,O.convertInfo=dd,O.convertLocalToUTCISOString=Yl,O.convertToFormInputs=Um,O.convertUTCISOStringToLocal=Tp,O.createFetchParams=At,O.createItem=kf,O.createProxy=jo,O.createQueryParams=Ji,O.deepMerge=Bn,O.deleteItem=Nf,O.downloadData=pd,O.fromFilterFnToFilter=v0,O.fromFilterToFilterFn=_o,O.getDefaultValues=Za,O.getInfo=Lf,O.getItem=Bf,O.getItems=zf,O.getProps=Lr,O.getUser=Pf,O.getValidationSchema=bl,O.getValue=Ri,O.getValueOrDefault=Ha,O.initialState=Wo,O.isEnumArrayControl=rm,O.isJsonControl=im,O.isSchemaTypeInclude=sr,O.isTruthy=kl,O.mantineArrayControlTester=tm,O.mantineBooleanCellTester=$p,O.mantineBooleanControlTester=um,O.mantineCells=km,O.mantineDateCellTester=Fp,O.mantineDateControlTester=fm,O.mantineDateTimeCellTester=kp,O.mantineDateTimeControlTester=pm,O.mantineEnumArrayRendererTester=om,O.mantineEnumCellTester=Lp,O.mantineEnumControlTester=gm,O.mantineHorizontalLayoutTester=$m,O.mantineIntegerCellTester=zp,O.mantineIntegerControlTester=ym,O.mantineJsonControlTester=bm,O.mantineNumberCellTester=jp,O.mantineNumberControlTester=wm,O.mantineOneOfEnumCellTester=Vp,O.mantineOneOfEnumControlTester=Sm,O.mantineRenderers=Nm,O.mantineTextCellTester=Hp,O.mantineTextControlTester=Em,O.mantineVerticalLayoutTester=Fm,O.normalize=Tf,O.parseFromValuesOrFunc=lt,O.parseValue=Ga,O.postBulk=jf,O.showFilter=Or,O.updateItem=Uf,O.updateUser=$f,O.urlJoin=dt,O.useApi=xe,O.useAuth=Ir,O.useBooleanProps=Sp,O.useBulkActions=tb,O.useCommonProps=In,O.useContextProps=_n,O.useCustomFetch=_D,O.useDateProps=fs,O.useDebouncedChange=Z1,O.useForms=zn,O.useInfo=Cf,O.useJsonProps=Cp,O.useMultiSelectProps=Ep,O.useNumberProps=xp,O.useProvideApi=hd,O.useProvideAuth=Mf,O.useProvideBulk=gd,O.useProvideForm=_l,O.useProvideInfo=Ff,O.useProxy=qi,O.useSelectProps=ds,O.useTextProps=Ap,O.useTrueOnce=g0,Object.defineProperty(O,Symbol.toStringTag,{value:"Module"})});