fastapi-rtk 0.1.9 → 0.1.10

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,232 +1,352 @@
1
- (function(O,h){typeof exports=="object"&&typeof module<"u"?h(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"],h):(O=typeof globalThis<"u"?globalThis:O||self,h(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,h,b,x,$f,Mf,Bn,Le,Fe,le,Gi,Pr,Ff,Va,mn){"use strict";var vz=Object.defineProperty;var bz=(O,h,b)=>h in O?vz(O,h,{enumerable:!0,configurable:!0,writable:!0,value:b}):O[h]=b;var lb=(O,h,b)=>bz(O,typeof h!="symbol"?h+"":h,b);function ub(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=ub(x),Ga=x.createContext({path:"",data:null,info:null,queryParams:null,loading:!1,error:null,streaming:null,specialKey:null,setQueryParams:e=>null,refetch:async e=>null,refetchInfo:async e=>null,getEntry:async e=>({}),addEntry:async e=>({}),updateEntry:async(e,t)=>({}),deleteEntry:async e=>({}),download:async(e,{export_mode:t,delimiter:n,quotechar:o}={})=>null,upload:async(e,{delimiter:t,quotechar:n}={})=>({}),resetError:()=>null});function Oe(){const e=x.useContext(Ga);if(e===void 0)throw new Error("useApi must be used within a ApiProvider");return e}const Df=0,kf=25,Uo=400,Wo=",",Ha=[{value:",",label:"Comma (,)"},{value:";",label:"Semicolon (;)"},{value:"|",label:"Pipe (|)"},{value:" ",label:"Tab"},{value:" ",label:"Space"}],qa=null,Ya=[{value:'"',label:'Double quotes (")'},{value:"'",label:"Single quotes (')"}],$r=50;function _t({path:e,method:t,body:n=void 0,queryParams:o=void 0}){const s=Object.entries(o||{}).reduce((c,[d,p])=>((Array.isArray(p)||typeof p=="object")&&(p=JSON.stringify(p)),c[d]=p,c),{}),a=new $f.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 cb(e){return e&&typeof e=="object"&&!Array.isArray(e)}const xn=(...e)=>{const t={};return e.forEach(n=>{n&&Object.keys(n).forEach(o=>{cb(n[o])&&o!=="ref"&&t[o]?t[o]=xn(t[o],n[o]):t[o]=n[o]})}),t},Ka=e=>e==null?e:typeof e=="boolean"?e.toString():Array.isArray(e)?e.map(t=>Ka(t)).join(", "):typeof e=="object"?e.name_||JSON.stringify(e):e,Hi=(e,t,n=!0)=>{const o=t.split(".");let s=e;for(const a of o)Array.isArray(s)?s=s.map(u=>Hi(u,a,!1)):s=s==null?void 0:s[a];return n?Ka(s):s},Ja=(e,t)=>e===void 0?t:e;function qi(e){return e!=null}const ct=(e,t)=>typeof e=="function"?e(t):e;function Nf(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 ot(...e){const t=Array.from(Array.isArray(e[0])?e[0]:e);return Nf(t)}const jo=e=>new Proxy(e,{get(t,n){return t(o=>o[n])}}),Lf=(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 Yi(e){const[t]=x.useState(()=>Mf.create(()=>({...e}))),[n]=x.useState(()=>jo(t));return x.useEffect(()=>{t.setState(o=>Lf(o,e))},[e,t]),n}const Ra=x.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 Mr(){return x.useContext(Ra)}const Za=x.createContext({baseUrl:"",info:null,loading:!1,error:null});function Bf(){return x.useContext(Za)}async function zf(e,{username:t,password:n}){const o=new FormData;o.append("username",t),o.append("password",n);const{fetchPath:s,options:a}=_t({path:ot(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 Uf(e){const{fetchPath:t,options:n}=_t({path:ot(e,"auth/logout"),method:"POST"});if(!(await fetch(t,n)).ok)throw new Error("Failed to sign out.")}async function Wf(e,t,{email:n}){const{fetchPath:o,options:s}=_t({path:ot(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:p}=_t({path:ot(e,"auth/reset-password"),method:"POST",body:{token:c,password:t}});if(!(await fetch(d,p)).ok)throw new Error("Couldn't reset password")}async function jf(e,t,n,o){const s=ot(e,"auth/login",t);if(!n){window.location.href=ot(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,p=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(){p.closed!==!1&&(window.clearInterval(y),o==null||o())},200)}async function Vf(e,t){const{fetchPath:n,options:o}=_t({path:ot(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 Gf(e,t){const{fetchPath:n,options:o}=_t({path:ot(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 Hf(e,t){const{fetchPath:n,options:o}=_t({path:ot(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 qf(e,t){const n=Bn.useQueryClient(),o=Bn.useQuery({queryKey:["user"],queryFn:({signal:g})=>Gf(e,g),retry:!1,...t}),[s,a]=x.useState(null),u=x.useCallback(({username:g,password:_})=>{a(null),zf(e,{username:g,password:_}).then(()=>n.invalidateQueries({queryKey:["user"]})).catch(C=>a(C))},[e,n]),c=x.useCallback(()=>{a(null),Uf(e).then(()=>n.resetQueries({queryKey:["user"]})).then(()=>n.resetQueries({queryKey:["info"]})).catch(g=>a(g))},[e,n]),d=x.useCallback(g=>{a(null),Hf(e,g).then(()=>n.invalidateQueries({queryKey:["user"]})).catch(_=>a(_))},[e,n]),p=x.useCallback(g=>{a(null),Wf(e,g,o.data).catch(_=>a(_))},[e,o.data]),y=x.useCallback((g,_)=>jf(e,g,_,()=>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:p,oauth_signin:y,refetch:o.refetch}}function Yf(e,t){const n=Bn.useQuery({queryKey:["info"],queryFn:({signal:o})=>Vf(e,o),enabled:!1});return x.useEffect(()=>{t.user&&!n.data&&n.refetch()},[t.user,n]),{baseUrl:e,info:n.data,loading:n.isFetching,error:n.error}}function fb(e){const t={baseUrl:new URL(document.baseURI).pathname+"/api/v1",inheritMantineTheme:!1},{baseUrl:n,authQueryProps:o,children:s}={...t,...e},a=qf(n,o),u=Yi(a),c=Yf(n,a),d=Yi(c);return h.jsx(Ra.Provider,{value:u,children:h.jsx(Za.Provider,{value:d,children:s})})}function db(e){const[t]=x.useState(()=>new Bn.QueryClient);return h.jsx(Bn.QueryClientProvider,{client:t,children:h.jsx(fb,{...e})})}const Xa=x.createContext({bulkActions:{selectedIds:[],setSelectedIds:()=>{}},dispatchBulkActions:async(e,t)=>{},error:null});function hb(){const e=x.useContext(Xa);if(e===void 0)throw new Error("useBulkActions must be used within a ApiProvider");return e}const Kf={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,setItem:()=>{throw new Error("setItem must be defined in a provider")}},Vo={errors:[],data:void 0},Qa=x.createContext(Kf),el=x.createContext(Kf);function zn(e="add"){const t=x.useContext(e==="add"?Qa:el);if(t===void 0)throw new Error("useForms must be used within an ApiProvider");return t}const nr=async e=>{let t;const n=e.headers.get("content-type");if(n&&n.includes("application/json")?t=await e.json():t=await e.text(),!e.ok)throw typeof t=="object"?new Error(typeof t.detail=="string"?t.detail:JSON.stringify(t,void 0,2)):new Error(t);return t},Jf=async(e,t)=>{const{fetchPath:n,options:o}=_t({path:ot(e,"/"),method:"POST",body:t}),s=await fetch(n,o);return await nr(s)},Rf=async(e,t)=>{const{fetchPath:n,options:o}=_t({path:ot(e,t.toString()),method:"DELETE"}),s=await fetch(n,o);return await nr(s)},Zf=async(e,t,{label:n,export_mode:o,delimiter:s,quotechar:a}={})=>{const u={...t,check_validity:!0};n&&(u.label=n),o&&(u.export_mode=o),s&&(u.delimiter=s),a&&(u.quotechar=a);const{fetchPath:c,options:d}=_t({path:ot(e,"/download"),method:"GET",queryParams:u}),p=await fetch(c,d);await nr(p),delete u.check_validity;const{fetchPath:y}=_t({path:ot(e,"/download"),method:"GET",queryParams:u}),g=document.createElement("a");g.href=y,g.download=n,g.style.display="none",document.body.appendChild(g),g.click(),document.body.removeChild(g)},Xf=async(e,t)=>{const{fetchPath:n,options:o}=_t({path:e,method:"GET"}),s=await fetch(n,{signal:t,...o});return await nr(s)},Qf=async(e,t)=>{const{fetchPath:n,options:o}=_t({path:ot(e,t.toString()),method:"GET"}),s=await fetch(n,o);return await nr(s)},ed=async(e,t,n)=>{const{fetchPath:o,options:s}=_t({path:e,method:"GET",queryParams:t}),a=await fetch(o,{signal:n,...s});return await nr(a)},td=async(e,t,n)=>{const{fetchPath:o,options:s}=_t({path:ot(e,t.toString()),method:"PUT",body:n}),a=await fetch(o,s);return await nr(a)},nd=async(e,t,{delimiter:n,quotechar:o}={})=>{const s=new FormData;s.append("file",t);const a={};n&&(a.delimiter=n),o&&(a.quotechar=o);const{fetchPath:u,options:c}=_t({path:ot(e,"/upload"),method:"POST",queryParams:a}),d=await fetch(u,{...c,headers:void 0,body:s});return await nr(d)},rd=async(e,t,n)=>{const{fetchPath:o,options:s}=_t({path:ot(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},Et=e=>e&&typeof e=="object"?Array.isArray(e)?e.join(","):JSON.stringify(e):e,tl=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 Fr(e){this._maxSize=e,this.clear()}Fr.prototype.clear=function(){this._size=0,this._values=Object.create(null)},Fr.prototype.get=function(e){return this._values[e]},Fr.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var pb=/[^.^\]^[]+|(?=\[\]|\.\.)/g,id=/^\d+$/,gb=/^\d/,mb=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,yb=/^\s*(['"]?)(.*?)(\1)\s*$/,nl=512,od=new Fr(nl),sd=new Fr(nl),ad=new Fr(nl),Dr={Cache:Fr,split:il,normalizePath:rl,setter:function(e){var t=rl(e);return sd.get(e)||sd.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=rl(e);return ad.get(e)||ad.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+(ol(n)||id.test(n)?"["+n+"]":(t?".":"")+n)},"")},forEach:function(e,t,n){vb(Array.isArray(e)?e:il(e),t,n)}};function rl(e){return od.get(e)||od.set(e,il(e).map(function(t){return t.replace(yb,"$2")}))}function il(e){return e.match(pb)||[""]}function vb(e,t,n){var o=e.length,s,a,u,c;for(a=0;a<o;a++)s=e[a],s&&(Tb(s)&&(s='"'+s+'"'),c=ol(s),u=!c&&/^\d+$/.test(s),t.call(n,s,c,u,a,e))}function ol(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function bb(e){return e.match(gb)&&!e.match(id)}function _b(e){return mb.test(e)}function Tb(e){return!ol(e)&&(bb(e)||_b(e))}const wb=/[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,Go=e=>e.match(wb)||[],Ho=e=>e[0].toUpperCase()+e.slice(1),sl=(e,t)=>Go(e).join(t).toLowerCase(),ld=e=>Go(e).reduce((t,n)=>`${t}${t?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,"");var al={words:Go,upperFirst:Ho,camelCase:ld,pascalCase:e=>Ho(ld(e)),snakeCase:e=>sl(e,"_"),kebabCase:e=>sl(e,"-"),sentenceCase:e=>Ho(sl(e," ")),titleCase:e=>Go(e).map(Ho).join(" ")},ll={exports:{}};ll.exports=function(e){return ud(Sb(e),e)},ll.exports.array=ud;function ud(e,t){var n=e.length,o=new Array(n),s={},a=n,u=Cb(t),c=Eb(e);for(t.forEach(function(p){if(!c.has(p[0])||!c.has(p[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(p,y,g){if(g.has(p)){var _;try{_=", node was:"+JSON.stringify(p)}catch{_=""}throw new Error("Cyclic dependency"+_)}if(!c.has(p))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(p));if(!s[y]){s[y]=!0;var C=u.get(p)||new Set;if(C=Array.from(C),y=C.length){g.add(p);do{var E=C[--y];d(E,c.get(E),g)}while(y);g.delete(p)}o[--n]=p}}}function Sb(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 Cb(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 Eb(e){for(var t=new Map,n=0,o=e.length;n<o;n++)t.set(e[n],n);return t}var xb=ll.exports;const Ab=rr(xb),Ob=Object.prototype.toString,Ib=Error.prototype.toString,Pb=RegExp.prototype.toString,$b=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",Mb=/^Symbol\((.*)\)(.*)$/;function Fb(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function cd(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return Fb(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return $b.call(e).replace(Mb,"Symbol($1)");const o=Ob.call(e).slice(8,-1);return o==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):o==="Error"||e instanceof Error?"["+Ib.call(e)+"]":o==="RegExp"?Pb.call(e):null}function An(e,t){let n=cd(e,t);return n!==null?n:JSON.stringify(e,function(o,s){let a=cd(this[o],t);return a!==null?a:s},2)}function fd(e){return e==null?[]:[].concat(e)}let dd,hd,pd,Db=/\$\{\s*(\w+)\s*\}/g;dd=Symbol.toStringTag;class gd{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[dd]="Error",this.name="ValidationError",this.value=n,this.path=o,this.type=s,this.errors=[],this.inner=[],fd(t).forEach(a=>{if(Tt.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]}}hd=Symbol.hasInstance,pd=Symbol.toStringTag;class Tt 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(Db,(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 gd(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[pd]="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,Tt)}static[hd](t){return gd[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}},Ut={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"},ul={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},cl={isValue:"${path} field must be ${value}"},qo={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"},md={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 Tt.formatError(On.notType,e)}};var yd=Object.assign(Object.create(null),{mixed:On,string:Ut,number:ir,date:ul,object:qo,array:Yo,boolean:cl,tuple:md});const kr=e=>e&&e.__isYupSchema__;class Ko{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 Ko(t,(c,d)=>{var p;let y=u(...c)?s:a;return(p=y==null?void 0:y(d))!=null?p: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(!kr(s))throw new TypeError("conditions must return a schema object");return s.resolve(n)}}const Jo={context:"$",value:"."};function kb(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]===Jo.context,this.isValue=this.key[0]===Jo.value,this.isSibling=!this.isContext&&!this.isValue;let o=this.isContext?Jo.context:this.isValue?Jo.value:"";this.path=this.key.slice(o.length),this.getter=this.path&&Dr.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 yn=e=>e==null;function ti(e){function t({value:n,path:o="",options:s,originalValue:a,schema:u},c,d){const{name:p,test:y,params:g,message:_,skipAbsent:C}=e;let{parent:E,context:T,abortEarly:P=u.spec.abortEarly,disableStackTrace:k=u.spec.disableStackTrace}=s;function Q(j){return or.isRef(j)?j.getValue(n,E,T):j}function U(j={}){const te=Object.assign({value:n,originalValue:a,label:u.spec.label,path:j.path||o,spec:u.spec,disableStackTrace:j.disableStackTrace||k},g,j.params);for(const me of Object.keys(te))te[me]=Q(te[me]);const ce=new Tt(Tt.formatError(j.message||_,te),n,te.path,j.type||p,te.disableStackTrace);return ce.params=te,ce}const N=P?c:d;let M={path:o,parent:E,type:p,from:s.from,createError:U,resolve:Q,options:s,originalValue:a,schema:u};const B=j=>{Tt.isError(j)?N(j):j?d(null):N(U())},Y=j=>{Tt.isError(j)?N(j):c(j)};if(C&&yn(n))return B(!0);let ie;try{var S;if(ie=y.call(M,n,M),typeof((S=ie)==null?void 0:S.then)=="function"){if(s.sync)throw new Error(`Validation test of type: "${M.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(ie).then(B,Y)}}catch(j){Y(j);return}B(ie)}return t.OPTIONS=e,t}function fl(e,t,n,o=n){let s,a,u;return t?(Dr.forEach(t,(c,d,p)=>{let y=d?c.slice(1,c.length-1):c;e=e.resolve({context:o,parent:s,value:n});let g=e.type==="tuple",_=p?parseInt(y,10):0;if(e.innerType||g){if(g&&!p)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&&_>=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[_],e=g?e.spec.types[_]:e.innerType}if(!p){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 Nb(e,t,n,o){return fl(e,t,n,o).schema}class Ro 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 Ro(this.values())}merge(t,n){const o=this.clone();return t.forEach(s=>o.add(s)),n.forEach(s=>o.delete(s)),o}}function ni(e,t=new Map){if(kr(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]=ni(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,ni(s,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const o of e)n.add(ni(o,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[o,s]of Object.entries(e))n[o]=ni(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 Ro,this._blacklist=new Ro,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=ni(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&&yn(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}".
1
+ (function(D,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("react/jsx-runtime"),require("@mantine/core"),require("react"),require("react-router-dom"),require("@tanstack/react-query"),require("@mantine/hooks"),require("@jsonforms/react"),require("@jsonforms/core"),require("@mantine/dates"),require("@mantine/form"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","@mantine/core","react","react-router-dom","@tanstack/react-query","@mantine/hooks","@jsonforms/react","@jsonforms/core","@mantine/dates","@mantine/form","react-dom"],c):(D=typeof globalThis<"u"?globalThis:D||self,c(D["fastapi-rtk"]={},D.jsxRuntime,D.core,D.React,D.reactRouterDom,D.reactQuery,D.hooks,D.react,D.core$1,D.dates,D.form,D.reactDom))})(this,function(D,c,b,I,Jg,Xn,je,We,me,ni,Ss,ES){"use strict";var Dz=Object.defineProperty;var kz=(D,c,b)=>c in D?Dz(D,c,{enumerable:!0,configurable:!0,writable:!0,value:b}):D[c]=b;var xS=(D,c,b)=>kz(D,typeof c!="symbol"?c+"":c,b);function FS(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const ri=FS(I),Ts=I.createContext({path:"",data:null,info:null,queryParams:null,loading:!1,error:null,streaming:null,specialKey:null,setQueryParams:e=>null,refetch:async e=>null,refetchInfo:async e=>null,getEntry:async e=>({}),addEntry:async e=>({}),updateEntry:async(e,n)=>({}),deleteEntry:async e=>({}),download:async(e,{export_mode:n,delimiter:t,quotechar:r}={})=>null,upload:async(e,{delimiter:n,quotechar:t}={})=>({}),resetError:()=>null});function He(){const e=I.useContext(Ts);if(e===void 0)throw new Error("useApi must be used within a ApiProvider");return e}const Yg=0,Zg=25,Po=400,Do=",",Is=[{value:",",label:"Comma (,)"},{value:";",label:"Semicolon (;)"},{value:"|",label:"Pipe (|)"},{value:" ",label:"Tab"},{value:" ",label:"Space"}],Ms=null,xs=[{value:'"',label:'Double quotes (")'},{value:"'",label:"Single quotes (')"}],Nr=50;function xt({path:e,method:n,body:t=void 0,queryParams:r=void 0}){const o=Object.entries(r||{}).reduce((u,[f,g])=>((Array.isArray(g)||typeof g=="object")&&(g=JSON.stringify(g)),u[f]=g,u),{}),s=new Jg.createSearchParams(o);e=e+"?"+s;const a={method:n,mode:"cors",credentials:"include",headers:{"Content-Type":"application/json"},redirect:"follow",referrerPolicy:"no-referrer",body:t?JSON.stringify(t):null};return{fetchPath:e,options:a}}function AS(e){return e&&typeof e=="object"&&!Array.isArray(e)}const Vn=(...e)=>{const n={};return e.forEach(t=>{t&&Object.keys(t).forEach(r=>{AS(t[r])&&r!=="ref"&&n[r]?n[r]=Vn(n[r],t[r]):n[r]=t[r]})}),n},Es=e=>e==null?e:typeof e=="boolean"?e.toString():Array.isArray(e)?e.map(n=>Es(n)).join(", "):typeof e=="object"?e.name_||JSON.stringify(e):e,ki=(e,n,t=!0)=>{const r=n.split(".");let o=e;for(const s of r)Array.isArray(o)?o=o.map(a=>ki(a,s,!1)):o=o==null?void 0:o[s];return t?Es(o):o},Fs=(e,n)=>e===void 0?n:e;function Li(e){return e!=null}const bt=(e,n)=>typeof e=="function"?e(n):e;function Xg(e){const n=[];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 s=e[o];if(typeof s!="string")throw new TypeError("Url must be a string. Received "+s);s!==""&&(o>0&&(s=s.replace(/^[\/]+/,"")),o<e.length-1?s=s.replace(/[\/]+$/,""):s=s.replace(/[\/]+$/,"/"),n.push(s))}let t=n.join("/");t=t.replace(/\/(\?|&|#[^!])/g,"$1");const r=t.split("?");return t=r.shift()+(r.length>0?"?":"")+r.join("&"),t}function ft(...e){const n=Array.from(Array.isArray(e[0])?e[0]:e);return Xg(n)}const Qg=e=>{let n;const t=new Set,r=(g,h)=>{const p=typeof g=="function"?g(n):g;if(!Object.is(p,n)){const _=n;n=h??(typeof p!="object"||p===null)?p:Object.assign({},n,p),t.forEach(v=>v(n,_))}},o=()=>n,u={setState:r,getState:o,getInitialState:()=>f,subscribe:g=>(t.add(g),()=>t.delete(g))},f=n=e(r,o,u);return u},OS=e=>e?Qg(e):Qg,PS=e=>e;function DS(e,n=PS){const t=I.useSyncExternalStore(e.subscribe,()=>n(e.getState()),()=>n(e.getInitialState()));return I.useDebugValue(t),t}const eh=e=>{const n=OS(e),t=r=>DS(n,r);return Object.assign(t,n),t},th=e=>e?eh(e):eh,ko=e=>new Proxy(e,{get(n,t){return n(r=>r[t])}}),nh=(e,n)=>Object.entries(n).reduce((t,[r,o])=>typeof o=="object"&&JSON.stringify(o)===JSON.stringify(e[r])||o===e[r]?t:{...t,[r]:o},{});function Ni(e){const[n]=I.useState(()=>th(()=>({...e}))),[t]=I.useState(()=>ko(n));return I.useEffect(()=>{n.setState(r=>nh(r,e))},[e,n]),t}const As=I.createContext({user:null,loading:!1,error:null,signin:async(e,n)=>null,signout:async()=>null,update:async e=>null,resetPassword:async e=>null,oauth_signin:(e,n)=>null,refetch:async()=>null});function zr(){return I.useContext(As)}const Os=I.createContext({baseUrl:"",info:null,loading:!1,error:null});function rh(){return I.useContext(Os)}async function ih(e,{username:n,password:t}){const r=new FormData;r.append("username",n),r.append("password",t);const{fetchPath:o,options:s}=xt({path:ft(e,"auth/login"),method:"POST"}),a=await fetch(o,{...s,headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(r)});if(!a.ok)throw a.status===400?new Error("Username or password wrong."):new Error("Failed to sign in.")}async function oh(e){const{fetchPath:n,options:t}=xt({path:ft(e,"auth/logout"),method:"POST"});if(!(await fetch(n,t)).ok)throw new Error("Failed to sign out.")}async function lh(e,n,{email:t}){const{fetchPath:r,options:o}=xt({path:ft(e,"auth/forgot-password"),method:"POST",body:{email:t}}),s=await fetch(r,o);if(!s.ok)throw new Error("Couldn't request token to reset password");const a=await s.json(),{token:u}=a,{fetchPath:f,options:g}=xt({path:ft(e,"auth/reset-password"),method:"POST",body:{token:u,password:n}});if(!(await fetch(f,g)).ok)throw new Error("Couldn't reset password")}async function sh(e,n,t,r){const o=ft(e,"auth/login",n);if(!t){window.location.href=ft(e,"auth/login",n);return}const s=500,a=500,u=window.screenLeft+window.outerWidth/2-s/2,f=window.screenTop+window.outerHeight/2-a/2,g=window.open(o+"?popup=true","auth",`toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=${s}, height=${a}, top=${f}, left=${u}`),h=window.setInterval(function(){g.closed!==!1&&(window.clearInterval(h),r==null||r())},200)}async function ah(e,n){const{fetchPath:t,options:r}=xt({path:ft(e,"info/"),method:"GET"}),o=await fetch(t,{signal:n,...r}),s=await o.json();if(!o.ok){const a=typeof s.detail=="string"?s.detail:JSON.stringify(s.detail,null,2);throw new Error(a)}return s}async function uh(e,n){const{fetchPath:t,options:r}=xt({path:ft(e,"auth/user"),method:"GET"}),o=await fetch(t,{signal:n,...r}),s=await o.json();if(!o.ok){const a=typeof s.detail=="string"?s.detail:JSON.stringify(s.detail,null,2);throw new Error(a)}return s}async function ch(e,n){const{fetchPath:t,options:r}=xt({path:ft(e,"auth/user"),method:"PUT",body:n}),o=await fetch(t,r),s=await o.json();if(!o.ok){const a=typeof s.detail=="string"?s.detail:JSON.stringify(s.detail,null,2);throw new Error(a)}return s}function dh(e,n){const t=Xn.useQueryClient(),r=Xn.useQuery({queryKey:["user"],queryFn:({signal:p})=>uh(e,p),retry:!1,...n}),[o,s]=I.useState(null),a=I.useCallback(({username:p,password:_})=>{s(null),ih(e,{username:p,password:_}).then(()=>t.invalidateQueries({queryKey:["user"]})).catch(v=>s(v))},[e,t]),u=I.useCallback(()=>{s(null),oh(e).then(()=>t.resetQueries({queryKey:["user"]})).then(()=>t.resetQueries({queryKey:["info"]})).catch(p=>s(p))},[e,t]),f=I.useCallback(p=>{s(null),ch(e,p).then(()=>t.invalidateQueries({queryKey:["user"]})).catch(_=>s(_))},[e,t]),g=I.useCallback(p=>{s(null),lh(e,p,r.data).catch(_=>s(_))},[e,r.data]),h=I.useCallback((p,_)=>sh(e,p,_,()=>t.invalidateQueries({queryKey:["user"]})),[e,t]);return{user:r.isError?null:r.data,loading:r.isFetching,error:o?o.message:null,signin:a,signout:u,update:f,resetPassword:g,oauth_signin:h,refetch:r.refetch}}function fh(e,n){const t=Xn.useQuery({queryKey:["info"],queryFn:({signal:r})=>ah(e,r),enabled:!1});return I.useEffect(()=>{n.user&&!t.data&&t.refetch()},[n.user,t]),{baseUrl:e,info:t.data,loading:t.isFetching,error:t.error}}function kS(e){const n={baseUrl:new URL(document.baseURI).pathname+"/api/v1",inheritMantineTheme:!1},{baseUrl:t,authQueryProps:r,children:o}={...n,...e},s=dh(t,r),a=Ni(s),u=fh(t,s),f=Ni(u);return c.jsx(As.Provider,{value:a,children:c.jsx(Os.Provider,{value:f,children:o})})}function LS(e){const[n]=I.useState(()=>new Xn.QueryClient);return c.jsx(Xn.QueryClientProvider,{client:n,children:c.jsx(kS,{...e})})}const Ps=I.createContext({bulkActions:{selectedIds:[],setSelectedIds:()=>{}},dispatchBulkActions:async(e,n)=>{},error:null});function NS(){const e=I.useContext(Ps);if(e===void 0)throw new Error("useBulkActions must be used within a ApiProvider");return e}const gh={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,setItem:()=>{throw new Error("setItem must be defined in a provider")}},Lo={errors:[],data:void 0},Ds=I.createContext(gh),ks=I.createContext(gh);function Qn(e="add"){const n=I.useContext(e==="add"?Ds:ks);if(n===void 0)throw new Error("useForms must be used within an ApiProvider");return n}const gr=async e=>{let n;const t=e.headers.get("content-type");if(t&&t.includes("application/json")?n=await e.json():n=await e.text(),!e.ok)throw typeof n=="object"?new Error(typeof n.detail=="string"?n.detail:JSON.stringify(n,void 0,2)):new Error(n);return n},hh=async(e,n)=>{const{fetchPath:t,options:r}=xt({path:ft(e,"/"),method:"POST",body:n}),o=await fetch(t,r);return await gr(o)},ph=async(e,n)=>{const{fetchPath:t,options:r}=xt({path:ft(e,n.toString()),method:"DELETE"}),o=await fetch(t,r);return await gr(o)},vh=async(e,n,{label:t,export_mode:r,delimiter:o,quotechar:s}={})=>{const a={...n,check_validity:!0};t&&(a.label=t),r&&(a.export_mode=r),o&&(a.delimiter=o),s&&(a.quotechar=s);const{fetchPath:u,options:f}=xt({path:ft(e,"/download"),method:"GET",queryParams:a}),g=await fetch(u,f);await gr(g),delete a.check_validity;const{fetchPath:h}=xt({path:ft(e,"/download"),method:"GET",queryParams:a}),p=document.createElement("a");p.href=h,p.download=t,p.style.display="none",document.body.appendChild(p),p.click(),document.body.removeChild(p)},mh=async(e,n)=>{const{fetchPath:t,options:r}=xt({path:e,method:"GET"}),o=await fetch(t,{signal:n,...r});return await gr(o)},_h=async(e,n)=>{const{fetchPath:t,options:r}=xt({path:ft(e,n.toString()),method:"GET"}),o=await fetch(t,r);return await gr(o)},bh=async(e,n,t)=>{const{fetchPath:r,options:o}=xt({path:e,method:"GET",queryParams:n}),s=await fetch(r,{signal:t,...o});return await gr(s)},yh=async(e,n,t)=>{const{fetchPath:r,options:o}=xt({path:ft(e,n.toString()),method:"PUT",body:t}),s=await fetch(r,o);return await gr(s)},wh=async(e,n,{delimiter:t,quotechar:r}={})=>{const o=new FormData;o.append("file",n);const s={};t&&(s.delimiter=t),r&&(s.quotechar=r);const{fetchPath:a,options:u}=xt({path:ft(e,"/upload"),method:"POST",queryParams:s}),f=await fetch(a,{...u,headers:void 0,body:o});return await gr(f)},Ch=async(e,n,t)=>{const{fetchPath:r,options:o}=xt({path:ft(e,"/bulk",n),method:"POST",body:t}),s=await fetch(r,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},kt=e=>e&&typeof e=="object"?Array.isArray(e)?e.join(","):JSON.stringify(e):e,Ls=e=>{const n={};for(const t of e)switch(t.type){case"RelatedList":n[t.name]=[];break;case"Boolean":n[t.name]="false";break;case"Date":case"DateTime":case"Integer":case"Float":case"Geometry":case"Raw":case"Related":n[t.name]=void 0;break;default:n[t.name]=""}return n};var hr=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}var Ns,Sh;function zS(){if(Sh)return Ns;Sh=1;function e(T){this._maxSize=T,this.clear()}e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(T){return this._values[T]},e.prototype.set=function(T,E){return this._size>=this._maxSize&&this.clear(),T in this._values||this._size++,this._values[T]=E};var n=/[^.^\]^[]+|(?=\[\]|\.\.)/g,t=/^\d+$/,r=/^\d/,o=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,s=/^\s*(['"]?)(.*?)(\1)\s*$/,a=512,u=new e(a),f=new e(a),g=new e(a);Ns={Cache:e,split:p,normalizePath:h,setter:function(T){var E=h(T);return f.get(T)||f.set(T,function(L,O){for(var P=0,k=E.length,z=L;P<k-1;){var j=E[P];if(j==="__proto__"||j==="constructor"||j==="prototype")return L;z=z[E[P++]]}z[E[P]]=O})},getter:function(T,E){var F=h(T);return g.get(T)||g.set(T,function(O){for(var P=0,k=F.length;P<k;)if(O!=null||!E)O=O[F[P++]];else return;return O})},join:function(T){return T.reduce(function(E,F){return E+(v(F)||t.test(F)?"["+F+"]":(E?".":"")+F)},"")},forEach:function(T,E,F){_(Array.isArray(T)?T:p(T),E,F)}};function h(T){return u.get(T)||u.set(T,p(T).map(function(E){return E.replace(s,"$2")}))}function p(T){return T.match(n)||[""]}function _(T,E,F){var L=T.length,O,P,k,z;for(P=0;P<L;P++)O=T[P],O&&(S(O)&&(O='"'+O+'"'),z=v(O),k=!z&&/^\d+$/.test(O),E.call(F,O,z,k,P,T))}function v(T){return typeof T=="string"&&T&&["'",'"'].indexOf(T.charAt(0))!==-1}function y(T){return T.match(r)&&!T.match(t)}function C(T){return o.test(T)}function S(T){return!v(T)&&(y(T)||C(T))}return Ns}var Br=zS(),zs,Th;function RS(){if(Th)return zs;Th=1;const e=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,n=h=>h.match(e)||[],t=h=>h[0].toUpperCase()+h.slice(1),r=(h,p)=>n(h).join(p).toLowerCase(),o=h=>n(h).reduce((p,_)=>`${p}${p?_[0].toUpperCase()+_.slice(1).toLowerCase():_.toLowerCase()}`,"");return zs={words:n,upperFirst:t,camelCase:o,pascalCase:h=>t(o(h)),snakeCase:h=>r(h,"_"),kebabCase:h=>r(h,"-"),sentenceCase:h=>t(r(h," ")),titleCase:h=>n(h).map(t).join(" ")},zs}var Rs=RS(),No={exports:{}},Ih;function BS(){if(Ih)return No.exports;Ih=1,No.exports=function(o){return e(n(o),o)},No.exports.array=e;function e(o,s){var a=o.length,u=new Array(a),f={},g=a,h=t(s),p=r(o);for(s.forEach(function(v){if(!p.has(v[0])||!p.has(v[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});g--;)f[g]||_(o[g],g,new Set);return u;function _(v,y,C){if(C.has(v)){var S;try{S=", node was:"+JSON.stringify(v)}catch{S=""}throw new Error("Cyclic dependency"+S)}if(!p.has(v))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(v));if(!f[y]){f[y]=!0;var T=h.get(v)||new Set;if(T=Array.from(T),y=T.length){C.add(v);do{var E=T[--y];_(E,p.get(E),C)}while(y);C.delete(v)}u[--a]=v}}}function n(o){for(var s=new Set,a=0,u=o.length;a<u;a++){var f=o[a];s.add(f[0]),s.add(f[1])}return Array.from(s)}function t(o){for(var s=new Map,a=0,u=o.length;a<u;a++){var f=o[a];s.has(f[0])||s.set(f[0],new Set),s.has(f[1])||s.set(f[1],new Set),s.get(f[0]).add(f[1])}return s}function r(o){for(var s=new Map,a=0,u=o.length;a<u;a++)s.set(o[a],a);return s}return No.exports}var VS=BS();const $S=Rr(VS),HS=Object.prototype.toString,jS=Error.prototype.toString,qS=RegExp.prototype.toString,GS=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",US=/^Symbol\((.*)\)(.*)$/;function WS(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function Mh(e,n=!1){if(e==null||e===!0||e===!1)return""+e;const t=typeof e;if(t==="number")return WS(e);if(t==="string")return n?`"${e}"`:e;if(t==="function")return"[Function "+(e.name||"anonymous")+"]";if(t==="symbol")return GS.call(e).replace(US,"Symbol($1)");const r=HS.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+jS.call(e)+"]":r==="RegExp"?qS.call(e):null}function $n(e,n){let t=Mh(e,n);return t!==null?t:JSON.stringify(e,function(r,o){let s=Mh(this[r],n);return s!==null?s:o},2)}function xh(e){return e==null?[]:[].concat(e)}let Eh,Fh,Ah,KS=/\$\{\s*(\w+)\s*\}/g;Eh=Symbol.toStringTag;class Oh{constructor(n,t,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[Eh]="Error",this.name="ValidationError",this.value=t,this.path=r,this.type=o,this.errors=[],this.inner=[],xh(n).forEach(s=>{if(Et.isError(s)){this.errors.push(...s.errors);const a=s.inner.length?s.inner:[s];this.inner.push(...a)}else this.errors.push(s)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}Fh=Symbol.hasInstance,Ah=Symbol.toStringTag;class Et extends Error{static formatError(n,t){const r=t.label||t.path||"this";return t=Object.assign({},t,{path:r,originalPath:t.path}),typeof n=="string"?n.replace(KS,(o,s)=>$n(t[s])):typeof n=="function"?n(t):n}static isError(n){return n&&n.name==="ValidationError"}constructor(n,t,r,o,s){const a=new Oh(n,t,r,o);if(s)return a;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[Ah]="Error",this.name=a.name,this.message=a.message,this.type=a.type,this.value=a.value,this.path=a.path,this.errors=a.errors,this.inner=a.inner,Error.captureStackTrace&&Error.captureStackTrace(this,Et)}static[Fh](n){return Oh[Symbol.hasInstance](n)||super[Symbol.hasInstance](n)}}let Hn={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:n,value:t,originalValue:r})=>{const o=r!=null&&r!==t?` (cast from the value \`${$n(r,!0)}\`).`:".";return n!=="mixed"?`${e} must be a \`${n}\` type, but the final value was: \`${$n(t,!0)}\``+o:`${e} must match the configured type. The validated value was: \`${$n(t,!0)}\``+o}},rn={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"},pr={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"},Bs={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Vs={isValue:"${path} field must be ${value}"},zo={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},Ro={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"},Ph={notType:e=>{const{path:n,value:t,spec:r}=e,o=r.types.length;if(Array.isArray(t)){if(t.length<o)return`${n} tuple value has too few items, expected a length of ${o} but got ${t.length} for value: \`${$n(t,!0)}\``;if(t.length>o)return`${n} tuple value has too many items, expected a length of ${o} but got ${t.length} for value: \`${$n(t,!0)}\``}return Et.formatError(Hn.notType,e)}};var Dh=Object.assign(Object.create(null),{mixed:Hn,string:rn,number:pr,date:Bs,object:zo,array:Ro,boolean:Vs,tuple:Ph});const Vr=e=>e&&e.__isYupSchema__;class Bo{static fromOptions(n,t){if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:o,otherwise:s}=t,a=typeof r=="function"?r:(...u)=>u.every(f=>f===r);return new Bo(n,(u,f)=>{var g;let h=a(...u)?o:s;return(g=h==null?void 0:h(f))!=null?g:f})}constructor(n,t){this.fn=void 0,this.refs=n,this.refs=n,this.fn=t}resolve(n,t){let r=this.refs.map(s=>s.getValue(t==null?void 0:t.value,t==null?void 0:t.parent,t==null?void 0:t.context)),o=this.fn(r,n,t);if(o===void 0||o===n)return n;if(!Vr(o))throw new TypeError("conditions must return a schema object");return o.resolve(t)}}const Vo={context:"$",value:"."};function JS(e,n){return new vr(e,n)}class vr{constructor(n,t={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof n!="string")throw new TypeError("ref must be a string, got: "+n);if(this.key=n.trim(),n==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Vo.context,this.isValue=this.key[0]===Vo.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?Vo.context:this.isValue?Vo.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&Br.getter(this.path,!0),this.map=t.map}getValue(n,t,r){let o=this.isContext?r:this.isValue?n:t;return this.getter&&(o=this.getter(o||{})),this.map&&(o=this.map(o)),o}cast(n,t){return this.getValue(n,t==null?void 0:t.parent,t==null?void 0:t.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(n){return n&&n.__isYupRef}}vr.prototype.__isYupRef=!0;const Fn=e=>e==null;function ii(e){function n({value:t,path:r="",options:o,originalValue:s,schema:a},u,f){const{name:g,test:h,params:p,message:_,skipAbsent:v}=e;let{parent:y,context:C,abortEarly:S=a.spec.abortEarly,disableStackTrace:T=a.spec.disableStackTrace}=o;function E(H){return vr.isRef(H)?H.getValue(t,y,C):H}function F(H={}){const re=Object.assign({value:t,originalValue:s,label:a.spec.label,path:H.path||r,spec:a.spec,disableStackTrace:H.disableStackTrace||T},p,H.params);for(const ne of Object.keys(re))re[ne]=E(re[ne]);const Z=new Et(Et.formatError(H.message||_,re),t,re.path,H.type||g,re.disableStackTrace);return Z.params=re,Z}const L=S?u:f;let O={path:r,parent:y,type:g,from:o.from,createError:F,resolve:E,options:o,originalValue:s,schema:a};const P=H=>{Et.isError(H)?L(H):H?f(null):L(F())},k=H=>{Et.isError(H)?L(H):u(H)};if(v&&Fn(t))return P(!0);let j;try{var $;if(j=h.call(O,t,O),typeof(($=j)==null?void 0:$.then)=="function"){if(o.sync)throw new Error(`Validation test of type: "${O.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(j).then(P,k)}}catch(H){k(H);return}P(j)}return n.OPTIONS=e,n}function $s(e,n,t,r=t){let o,s,a;return n?(Br.forEach(n,(u,f,g)=>{let h=f?u.slice(1,u.length-1):u;e=e.resolve({context:r,parent:o,value:t});let p=e.type==="tuple",_=g?parseInt(h,10):0;if(e.innerType||p){if(p&&!g)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${a}" must contain an index to the tuple element, e.g. "${a}[0]"`);if(t&&_>=t.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${u}, in the path: ${n}. because there is no value at that index. `);o=t,t=t&&t[_],e=p?e.spec.types[_]:e.innerType}if(!g){if(!e.fields||!e.fields[h])throw new Error(`The schema does not contain the path: ${n}. (failed at: ${a} which is a type: "${e.type}")`);o=t,t=t&&t[h],e=e.fields[h]}s=h,a=f?"["+u+"]":"."+u}),{schema:e,parent:o,parentPath:s}):{parent:o,parentPath:n,schema:e}}function YS(e,n,t,r){return $s(e,n,t,r).schema}class $o extends Set{describe(){const n=[];for(const t of this.values())n.push(vr.isRef(t)?t.describe():t);return n}resolveAll(n){let t=[];for(const r of this.values())t.push(n(r));return t}clone(){return new $o(this.values())}merge(n,t){const r=this.clone();return n.forEach(o=>r.add(o)),t.forEach(o=>r.delete(o)),r}}function oi(e,n=new Map){if(Vr(e)||!e||typeof e!="object")return e;if(n.has(e))return n.get(e);let t;if(e instanceof Date)t=new Date(e.getTime()),n.set(e,t);else if(e instanceof RegExp)t=new RegExp(e),n.set(e,t);else if(Array.isArray(e)){t=new Array(e.length),n.set(e,t);for(let r=0;r<e.length;r++)t[r]=oi(e[r],n)}else if(e instanceof Map){t=new Map,n.set(e,t);for(const[r,o]of e.entries())t.set(r,oi(o,n))}else if(e instanceof Set){t=new Set,n.set(e,t);for(const r of e)t.add(oi(r,n))}else if(e instanceof Object){t={},n.set(e,t);for(const[r,o]of Object.entries(e))t[r]=oi(o,n)}else throw Error(`Unable to clone ${e}`);return t}class Bt{constructor(n){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 $o,this._blacklist=new $o,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Hn.notType)}),this.type=n.type,this._typeCheck=n.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},n==null?void 0:n.spec),this.withMutation(t=>{t.nonNullable()})}get _type(){return this.type}clone(n){if(this._mutate)return n&&Object.assign(this.spec,n),this;const t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeCheck=this._typeCheck,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.internalTests=Object.assign({},this.internalTests),t.exclusiveTests=Object.assign({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=oi(Object.assign({},this.spec,n)),t}label(n){let t=this.clone();return t.spec.label=n,t}meta(...n){if(n.length===0)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},n[0]),t}withMutation(n){let t=this._mutate;this._mutate=!0;let r=n(this);return this._mutate=t,r}concat(n){if(!n||n===this)return this;if(n.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${n.type}`);let t=this,r=n.clone();const o=Object.assign({},t.spec,r.spec);return r.spec=o,r.internalTests=Object.assign({},t.internalTests,r.internalTests),r._whitelist=t._whitelist.merge(n._whitelist,n._blacklist),r._blacklist=t._blacklist.merge(n._blacklist,n._whitelist),r.tests=t.tests,r.exclusiveTests=t.exclusiveTests,r.withMutation(s=>{n.tests.forEach(a=>{s.test(a.OPTIONS)})}),r.transforms=[...t.transforms,...r.transforms],r}isType(n){return n==null?!!(this.spec.nullable&&n===null||this.spec.optional&&n===void 0):this._typeCheck(n)}resolve(n){let t=this;if(t.conditions.length){let r=t.conditions;t=t.clone(),t.conditions=[],t=r.reduce((o,s)=>s.resolve(o,n),t),t=t.resolve(n)}return t}resolveOptions(n){var t,r,o,s;return Object.assign({},n,{from:n.from||[],strict:(t=n.strict)!=null?t:this.spec.strict,abortEarly:(r=n.abortEarly)!=null?r:this.spec.abortEarly,recursive:(o=n.recursive)!=null?o:this.spec.recursive,disableStackTrace:(s=n.disableStackTrace)!=null?s:this.spec.disableStackTrace})}cast(n,t={}){let r=this.resolve(Object.assign({value:n},t)),o=t.assert==="ignore-optionality",s=r._cast(n,t);if(t.assert!==!1&&!r.isType(s)){if(o&&Fn(s))return s;let a=$n(n),u=$n(s);throw new TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}".
2
2
 
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 p=[];for(let y of Object.values(this.internalTests))y&&p.push(y);this.runTests({path:a,value:d,originalValue:u,options:n,tests:p},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:p}=t,y=T=>{s||(s=!0,n(T,u))},g=T=>{s||(s=!0,o(T,u))},_=a.length,C=[];if(!_)return g([]);let E={value:u,originalValue:c,path:d,options:p,schema:this};for(let T=0;T<a.length;T++){const P=a[T];P(E,y,function(Q){Q&&(Array.isArray(Q)?C.push(...Q):C.push(Q)),--_<=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 p=o[c];const y=Object.assign({},u,{strict:!0,parent:o,value:p,originalValue:a[c],key:void 0,[d?"index":"key"]:c,path:d||c.includes(".")?`${s||""}[${d?c:`"${c}"`}]`:(s?`${s}.`:"")+t});return(g,_,C)=>this.resolve(y)._validate(p,y,_,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,p)=>{Tt.isError(d)&&(d.value=p),c(d)},(d,p)=>{d.length?c(new Tt(d,p,void 0,void 0,a)):u(p)}))}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 Tt.isError(c)&&(c.value=d),c},(c,d)=>{if(c.length)throw new Tt(c,t,void 0,void 0,u);a=d}),a}isValid(t,n){return this.validate(t,n).then(()=>!0,o=>{if(Tt.isError(o))return!1;throw o})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(o){if(Tt.isError(o))return!1;throw o}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):ni(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=ti({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=ti({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=ti(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=fd(t).map(a=>new or(a));return s.forEach(a=>{a.isSibling&&o.deps.push(a.key)}),o.conditions.push(typeof n=="function"?new Ko(s,n):Ko.fromOptions(s,n)),o}typeError(t){let n=this.clone();return n.internalTests.typeError=ti({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=ti({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=ti({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,p,y)=>y.findIndex(g=>g.name===d.name)===p)}}}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}=fl(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 Lb=()=>!0;function Zo(e){return new dl(e)}class dl extends Ot{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:Lb},t))}}Zo.prototype=dl.prototype;function hl(){return new pl}class pl 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=cl.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(n){return yn(n)||n===!0}})}isFalse(t=cl.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(n){return yn(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)}}hl.prototype=pl.prototype;const Bb=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function zb(e){const t=gl(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 gl(e){var t,n;const o=Bb.exec(e);return o?{year:Wn(o[1]),month:Wn(o[2],1)-1,day:Wn(o[3],1),hour:Wn(o[4]),minute:Wn(o[5]),second:Wn(o[6]),millisecond:o[7]?Wn(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:Wn(o[10]),minuteOffset:Wn(o[11])}:null}function Wn(e,t=0){return Number(e)||t}let Ub=/^[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])?)*$/,Wb=/^((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,jb=/^(?:[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,Vb="^\\d{4}-\\d{2}-\\d{2}",Gb="\\d{2}:\\d{2}:\\d{2}",Hb="(([+-]\\d{2}(:?\\d{2})?)|Z)",qb=new RegExp(`${Vb}T${Gb}(\\.\\d+)?${Hb}$`),Yb=e=>yn(e)||e===e.trim(),Kb={}.toString();function Xo(){return new ml}class ml 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===Kb?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=Ut.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=Ut.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=Ut.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||Ut.matches,params:{regex:t},skipAbsent:!0,test:u=>u===""&&o||u.search(t)!==-1})}email(t=Ut.email){return this.matches(Ub,{name:"email",message:t,excludeEmptyString:!0})}url(t=Ut.url){return this.matches(Wb,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=Ut.uuid){return this.matches(jb,{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(qb,{name:"datetime",message:n||Ut.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||Ut.datetime_offset,params:{allowOffset:o},skipAbsent:!0,test:a=>{if(!a||o)return!0;const u=gl(a);return u?!!u.z:!1}}).test({name:"datetime_precision",message:n||Ut.datetime_precision,params:{precision:s},skipAbsent:!0,test:a=>{if(!a||s==null)return!0;const u=gl(a);return u?u.precision===s:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=Ut.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:Yb})}lowercase(t=Ut.lowercase){return this.transform(n=>yn(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>yn(n)||n===n.toLowerCase()})}uppercase(t=Ut.uppercase){return this.transform(n=>yn(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>yn(n)||n===n.toUpperCase()})}}Xo.prototype=ml.prototype;let Jb=e=>e!=+e;function vd(){return new yl}class yl extends Ot{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!Jb(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=>yn(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=>yn(s)?s:Math[t](s))}}vd.prototype=yl.prototype;let bd=new Date(""),Rb=e=>Object.prototype.toString.call(e)==="[object Date]";function vl(){return new ri}class ri extends Ot{constructor(){super({type:"date",check(t){return Rb(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,o)=>!o.spec.coerce||o.isType(t)||t===null?t:(t=zb(t),isNaN(t)?ri.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=ul.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=ul.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)}})}}ri.INVALID_DATE=bd,vl.prototype=ri.prototype,vl.INVALID_DATE=bd;function Zb(e,t=[]){let n=[],o=new Set,s=new Set(t.map(([u,c])=>`${u}-${c}`));function a(u,c){let d=Dr.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):kr(c)&&"deps"in c&&c.deps.forEach(d=>a(d,u))}return Ab.array(Array.from(o),n).reverse()}function _d(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 Td(e){return(t,n)=>_d(e,t)-_d(e,n)}const wd=(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 Qo(e){if("fields"in e){const t={};for(const[n,o]of Object.entries(e.fields))t[n]=Qo(o);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Qo(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Qo)}):"optional"in e?e.optional():e}const Xb=(e,t)=>{const n=[...Dr.normalizePath(t)];if(n.length===1)return n[0]in e;let o=n.pop(),s=Dr.getter(Dr.join(n),!0)(e);return!!(s&&o in s)};let Sd=e=>Object.prototype.toString.call(e)==="[object Object]";function Cd(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(o=>n.indexOf(o)===-1)}const Qb=Td([]);function Ki(e){return new bl(e)}class bl extends Ot{constructor(t){super({type:"object",check(n){return Sd(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=Qb,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={},p=Object.assign({},n,{parent:d,__validating:n.__validating||!1}),y=!1;for(const g of c){let _=a[g],C=g in s;if(_){let E,T=s[g];p.path=(n.path?`${n.path}.`:"")+g,_=_.resolve({value:T,context:n.context,parent:d});let P=_ instanceof Ot?_.spec:void 0,k=P==null?void 0:P.strict;if(P!=null&&P.strip){y=y||g in s;continue}E=!n.__validating||!k?_.cast(s[g],p):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,p)=>{if(!c||!Sd(p)){s(d,p);return}u=u||p;let y=[];for(let g of this._nodes){let _=this.fields[g];!_||or.isRef(_)||y.push(_.asNestedTest({options:n,key:g,parent:p,parentPath:n.path,originalParent:u}))}this.runTests({tests:y,value:p,originalValue:u,options:n},o,g=>{s(g.sort(this._sortErrors).concat(d),p)})})}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=Td(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 Qo(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=Dr.getter(t,!0);return this.transform(a=>{if(!a)return a;let u=a;return Xb(a,t)&&(u=Object.assign({},a),o||delete u[t],u[n]=s(a)),u})}json(){return this.transform(wd)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||qo.exact,test(n){if(n==null)return!0;const o=Cd(this.schema,n);return o.length===0||this.createError({params:{properties:o.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=qo.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=Cd(this.schema,s);return!t||a.length===0||this.createError({params:{unknown:a.join(", ")}})}});return o.spec.noUnknown=t,o}unknown(t=!0,n=qo.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(al.camelCase)}snakeCase(){return this.transformKeys(al.snakeCase)}constantCase(){return this.transformKeys(t=>al.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=bl.prototype;function _l(e){return new Tl(e)}class Tl 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,p)=>{var y;if(!c||!u||!this._typeCheck(p)){s(d,p);return}let g=new Array(p.length);for(let C=0;C<p.length;C++){var _;g[C]=u.asNestedTest({options:n,index:C,parent:p,parentPath:n.path,originalParent:(_=n.originalValue)!=null?_:t})}this.runTests({value:p,tests:g,originalValue:(y=n.originalValue)!=null?y:t,options:n},o,C=>s(C.concat(d),p))})}clone(t){const n=super.clone(t);return n.innerType=this.innerType,n}json(){return this.transform(wd)}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(!kr(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}}_l.prototype=Tl.prototype;function Ed(e){return new wl(e)}class wl 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(md.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 p=c.cast(s[d],Object.assign({},n,{path:`${n.path||""}[${d}]`}));return p!==s[d]&&(a=!0),p});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 p=[];for(let[g,_]of a.entries()){var y;p[g]=_.asNestedTest({options:n,index:g,parent:c,parentPath:n.path,originalParent:(y=n.originalValue)!=null?y:t})}this.runTests({value:c,tests:p,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}}Ed.prototype=wl.prototype;function e1(e){return new es(e)}function xd(e){try{return e()}catch(t){if(Tt.isError(t))return Promise.reject(t);throw t}}class es{constructor(t){this.type="lazy",this.__isYupSchema__=!0,this.spec=void 0,this._resolve=(n,o={})=>{let s=this.builder(n,o);if(!kr(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 es(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 xd(()=>this._resolve(t,n).validate(t,n))}validateSync(t,n){return this._resolve(t,n).validateSync(t,n)}validateAt(t,n,o){return xd(()=>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(Tt.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 t1(e){Object.keys(e).forEach(t=>{Object.keys(e[t]).forEach(n=>{yd[t][n]=e[t][n]})})}function n1(e,t,n){if(!e||!kr(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 Ad=Object.freeze(Object.defineProperty({__proto__:null,ArraySchema:Tl,BooleanSchema:pl,DateSchema:ri,LazySchema:es,MixedSchema:dl,NumberSchema:yl,ObjectSchema:bl,Schema:Ot,StringSchema:ml,TupleSchema:wl,ValidationError:Tt,addMethod:n1,array:_l,bool:hl,boolean:hl,date:vl,defaultLocale:yd,getIn:fl,isSchema:kr,lazy:e1,mixed:Zo,number:vd,object:Ki,printValue:An,reach:Nb,ref:kb,setLocale:t1,string:Xo,tuple:Ed},Symbol.toStringTag,{value:"Module"})),Sl=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=Ad[u]().typeError(`Field must be of type ${u}`).required("Field is required"):c=Ad[u]().typeError(`Field must be of type ${u}`).nullable(!0)}catch(d){console.log(d)}return n[s]=c,n},{});return Ki().shape(t)},Od=e=>e?{...e,add:{columns:e.add_columns,title:e.add_title,schema:Sl(e.add_columns),defaultValues:tl(e.add_columns)},edit:{columns:e.edit_columns,title:e.edit_title,schema:Sl(e.edit_columns),defaultValues:tl(e.edit_columns)}}:null,r1={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||r1)}function Id({path:e,initialQueryParams:t,relation:n,fetchInfo:o=!0,clearInfoOnRefetch:s=!1,clearDataOnRefetch:a=!1,resetQueryParamsOnPathChange:u=!0,infoQueryProps:c,dataQueryProps:d,throwOnError:p=!1,streaming:y=!1}){const[g,_]=x.useState(t?Ji(null,t):null),C=x.useRef(e);x.useEffect(()=>{C.current=e},[e]);const E=x.useRef(e),T=x.useMemo(()=>(E.current=e,g?{...g,...n?{filters:[...g.filters||[],{col:n.foreign_key,opr:n.type,value:Et(n.id)}]}:{}}:null),[g,n]),P=x.useRef(T);x.useEffect(()=>{P.current=T},[T]);const k=x.useCallback(V=>_(q=>{if(typeof V=="function"&&(V=V(q)),!q)return Ji(null,V);const re=Ji({...q},V);if(V&&((V.filters||V.order_column||V.order_direction)&&!V.page&&(re.page=0),y)){if(V.page&&V.page!==q.page&&!V.streaming)throw new Error("You cannot change page in streaming mode, use streaming.fetch() instead");if(V.page_size&&V.page_size!==q.page_size)throw new Error("You cannot change page size in streaming mode, use streaming.fetch() instead")}return re}),[y]),[Q,U]=x.useState(null),N=x.useMemo(()=>Q,[Q]),M=x.useCallback(()=>U(null),[]),{data:B,isFetching:Y,refetch:fe,error:ie}=Bn.useQuery({queryKey:["info",e],queryFn:({signal:V})=>Xf(ot(e,"_info"),V).then(q=>({...Od(q),path:e})),placeholderData:s?null:Bn.keepPreviousData,enabled:o,retry:!1,refetchOnMount:!1,refetchOnReconnect:!1,refetchOnWindowFocus:!1,...c}),{data:S,isFetching:j,refetch:te,error:ce}=Bn.useQuery({queryKey:["data",E.current,JSON.stringify(T)],queryFn:({signal:V})=>T?ed(ot(E.current,"/"),T,V).then(q=>({...q,result:q.result.map((re,he)=>({...re,id:q.ids[he]})),path:E.current})):null,placeholderData:a?null:Bn.keepPreviousData,retry:!1,...d});x.useEffect(()=>{if(ie){U({message:"Couldn't fetch info",originalError:ie});return}if(ce){U({message:"Couldn't fetch list",originalError:ce});return}M()},[ie,ce,M]);const me=x.useMemo(()=>Y||j,[Y,j]);Le.useDidUpdate(()=>{if(!u)return;const V=Ji(null,t);g!=null&&g.page_size&&(V.page_size=g.page_size),_({...V})},[e]);const Be=x.useCallback(async V=>{try{const q=await Qf(C.current,Et(V));return M(),q}catch(q){if(U({message:`Couldn't fetch item with id ${V}`,originalError:q}),p)throw q}},[M,p]),_e=x.useCallback(async V=>{try{const q=await Jf(C.current,V);return M(),q}catch(q){if(U({message:"Couldn't add item",originalError:q}),p)throw q}},[M,p]),De=x.useCallback(async(V,q)=>{try{const re=await td(C.current,Et(V),q);return M(),re}catch(re){if(U({message:`Couldn't update item with id ${V}`,originalError:re}),p)throw re}},[M,p]),ke=x.useCallback(async V=>{try{const q=await Rf(C.current,Et(V));return M(),q}catch(q){if(U({message:`Couldn't delete item with id ${V}`,originalError:q}),p)throw q}},[M,p]),mt=x.useCallback(async(V,{export_mode:q,delimiter:re,quotechar:he}={})=>{try{await Zf(C.current,P.current,{label:V,export_mode:q,delimiter:re,quotechar:he}),M()}catch(ge){if(U({message:"Couldn't download",originalError:ge}),p)throw ge}},[M,p]),K=x.useCallback(async(V,{delimiter:q,quotechar:re}={})=>{try{const he=await nd(C.current,V,{delimiter:q,quotechar:re});return M(),he}catch(he){if(U({message:"Couldn't upload",originalError:he}),p)throw he}},[M,p]),[J,pe]=Le.useSetState({data:{},isEnd:!1,fetch:()=>null});x.useEffect(()=>{y&&pe({fetch:()=>k({page:0,streaming:!0})})},[k,pe,y]),x.useEffect(()=>{y&&S&&pe(V=>{let q=Object.keys(V.data).length;const re={isEnd:!1};return T.page<q?(q=T.page,re.data={[T.page]:S.result}):re.data={...V.data,[T.page]:S.result},S.result.length<T.page_size?(re.isEnd=!0,re.fetch=()=>null):re.fetch=()=>k({page:q+1,streaming:!0}),re})},[S,k,pe,y]);const X=x.useMemo(()=>{const V={all:"all",actions:"actions"};return S==null||S.list_columns.forEach(q=>{V[q]&&(V[q]=`_${q}`)}),V},[S==null?void 0:S.list_columns]),se=x.useCallback(()=>P.current?te():k(),[te,k]);return{path:e,data:S,info:B,queryParams:T,loading:me,error:N,streaming:J,specialKey:X,setQueryParams:k,refetch:se,refetchInfo:fe,getEntry:Be,addEntry:_e,updateEntry:De,deleteEntry:ke,download:mt,upload:K,resetError:M}}const Pd=({path:e})=>{const[t,n]=x.useState([]),[o,s]=x.useState(),a=x.useCallback(async(c,d)=>{try{d===void 0&&(d=t);const p=await rd(e,c,d);return s(void 0),p}catch(p){s({message:"Couldn't perform bulk action",originalError:p})}},[e,t]);return{bulkActions:x.useMemo(()=>({selectedIds:t,setSelectedIds:n}),[t,n]),dispatchBulkActions:a,error:o}},gt={NORMAL:"normal",FULL_SCREEN:"fullScreen",OVERLAY:"overlay"},Cl=()=>{const[e]=x.useState(()=>Mf.create(t=>({opened:!1,setOpened:n=>t({opened:n}),view:gt.NORMAL,setView:n=>t({view:n}),state:Vo,setState:n=>t({state:n}),reset:()=>t({state:Vo}),item:void 0,setItem:n=>t({item:n})})));return e};function $d({resource_name:e="",initialQueryParams:t,relation:n,fetchInfo:o,clearInfoOnRefetch:s,clearDataOnRefetch:a,resetQueryParamsOnPathChange:u,infoQueryProps:c,dataQueryProps:d,throwOnError:p,streaming:y,children:g}){const{baseUrl:_}=Bf(),C=Id({path:ot(_,e),initialQueryParams:t,relation:n,fetchInfo:o,clearInfoOnRefetch:s,clearDataOnRefetch:a,resetQueryParamsOnPathChange:u,infoQueryProps:c,dataQueryProps:d,throwOnError:p,streaming:y}),E=Yi(C),T=Pd(E),P=Yi(T),k=Cl(),[Q]=x.useState(()=>jo(k)),U=Cl(),[N]=x.useState(()=>jo(U));return h.jsx(Ga.Provider,{value:E,children:h.jsx(Xa.Provider,{value:P,children:h.jsx(Qa.Provider,{value:Q,children:h.jsx(el.Provider,{value:N,children:g})})})})}/**
5
- * @license @tabler/icons-react v3.31.0 - MIT
3
+ attempted value: ${a}
4
+ `+(u!==a?`result of cast: ${u}`:""))}return s}_cast(n,t){let r=n===void 0?n:this.transforms.reduce((o,s)=>s.call(this,o,n,this),n);return r===void 0&&(r=this.getDefault(t)),r}_validate(n,t={},r,o){let{path:s,originalValue:a=n,strict:u=this.spec.strict}=t,f=n;u||(f=this._cast(f,Object.assign({assert:!1},t)));let g=[];for(let h of Object.values(this.internalTests))h&&g.push(h);this.runTests({path:s,value:f,originalValue:a,options:t,tests:g},r,h=>{if(h.length)return o(h,f);this.runTests({path:s,value:f,originalValue:a,options:t,tests:this.tests},r,o)})}runTests(n,t,r){let o=!1,{tests:s,value:a,originalValue:u,path:f,options:g}=n,h=C=>{o||(o=!0,t(C,a))},p=C=>{o||(o=!0,r(C,a))},_=s.length,v=[];if(!_)return p([]);let y={value:a,originalValue:u,path:f,options:g,schema:this};for(let C=0;C<s.length;C++){const S=s[C];S(y,h,function(E){E&&(Array.isArray(E)?v.push(...E):v.push(E)),--_<=0&&p(v)})}}asNestedTest({key:n,index:t,parent:r,parentPath:o,originalParent:s,options:a}){const u=n??t;if(u==null)throw TypeError("Must include `key` or `index` for nested validations");const f=typeof u=="number";let g=r[u];const h=Object.assign({},a,{strict:!0,parent:r,value:g,originalValue:s[u],key:void 0,[f?"index":"key"]:u,path:f||u.includes(".")?`${o||""}[${f?u:`"${u}"`}]`:(o?`${o}.`:"")+n});return(p,_,v)=>this.resolve(h)._validate(g,h,_,v)}validate(n,t){var r;let o=this.resolve(Object.assign({},t,{value:n})),s=(r=t==null?void 0:t.disableStackTrace)!=null?r:o.spec.disableStackTrace;return new Promise((a,u)=>o._validate(n,t,(f,g)=>{Et.isError(f)&&(f.value=g),u(f)},(f,g)=>{f.length?u(new Et(f,g,void 0,void 0,s)):a(g)}))}validateSync(n,t){var r;let o=this.resolve(Object.assign({},t,{value:n})),s,a=(r=t==null?void 0:t.disableStackTrace)!=null?r:o.spec.disableStackTrace;return o._validate(n,Object.assign({},t,{sync:!0}),(u,f)=>{throw Et.isError(u)&&(u.value=f),u},(u,f)=>{if(u.length)throw new Et(u,n,void 0,void 0,a);s=f}),s}isValid(n,t){return this.validate(n,t).then(()=>!0,r=>{if(Et.isError(r))return!1;throw r})}isValidSync(n,t){try{return this.validateSync(n,t),!0}catch(r){if(Et.isError(r))return!1;throw r}}_getDefault(n){let t=this.spec.default;return t==null?t:typeof t=="function"?t.call(this,n):oi(t)}getDefault(n){return this.resolve(n||{})._getDefault(n)}default(n){return arguments.length===0?this._getDefault():this.clone({default:n})}strict(n=!0){return this.clone({strict:n})}nullability(n,t){const r=this.clone({nullable:n});return r.internalTests.nullable=ii({message:t,name:"nullable",test(o){return o===null?this.schema.spec.nullable:!0}}),r}optionality(n,t){const r=this.clone({optional:n});return r.internalTests.optionality=ii({message:t,name:"optionality",test(o){return o===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(n=Hn.defined){return this.optionality(!1,n)}nullable(){return this.nullability(!0)}nonNullable(n=Hn.notNull){return this.nullability(!1,n)}required(n=Hn.required){return this.clone().withMutation(t=>t.nonNullable(n).defined(n))}notRequired(){return this.clone().withMutation(n=>n.nullable().optional())}transform(n){let t=this.clone();return t.transforms.push(n),t}test(...n){let t;if(n.length===1?typeof n[0]=="function"?t={test:n[0]}:t=n[0]:n.length===2?t={name:n[0],test:n[1]}:t={name:n[0],message:n[1],test:n[2]},t.message===void 0&&(t.message=Hn.default),typeof t.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),o=ii(t),s=t.exclusive||t.name&&r.exclusiveTests[t.name]===!0;if(t.exclusive&&!t.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(r.exclusiveTests[t.name]=!!t.exclusive),r.tests=r.tests.filter(a=>!(a.OPTIONS.name===t.name&&(s||a.OPTIONS.test===o.OPTIONS.test))),r.tests.push(o),r}when(n,t){!Array.isArray(n)&&typeof n!="string"&&(t=n,n=".");let r=this.clone(),o=xh(n).map(s=>new vr(s));return o.forEach(s=>{s.isSibling&&r.deps.push(s.key)}),r.conditions.push(typeof t=="function"?new Bo(o,t):Bo.fromOptions(o,t)),r}typeError(n){let t=this.clone();return t.internalTests.typeError=ii({message:n,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),t}oneOf(n,t=Hn.oneOf){let r=this.clone();return n.forEach(o=>{r._whitelist.add(o),r._blacklist.delete(o)}),r.internalTests.whiteList=ii({message:t,name:"oneOf",skipAbsent:!0,test(o){let s=this.schema._whitelist,a=s.resolveAll(this.resolve);return a.includes(o)?!0:this.createError({params:{values:Array.from(s).join(", "),resolved:a}})}}),r}notOneOf(n,t=Hn.notOneOf){let r=this.clone();return n.forEach(o=>{r._blacklist.add(o),r._whitelist.delete(o)}),r.internalTests.blacklist=ii({message:t,name:"notOneOf",test(o){let s=this.schema._blacklist,a=s.resolveAll(this.resolve);return a.includes(o)?this.createError({params:{values:Array.from(s).join(", "),resolved:a}}):!0}}),r}strip(n=!0){let t=this.clone();return t.spec.strip=n,t}describe(n){const t=(n?this.resolve(n):this).clone(),{label:r,meta:o,optional:s,nullable:a}=t.spec;return{meta:o,label:r,optional:s,nullable:a,default:t.getDefault(n),type:t.type,oneOf:t._whitelist.describe(),notOneOf:t._blacklist.describe(),tests:t.tests.map(f=>({name:f.OPTIONS.name,params:f.OPTIONS.params})).filter((f,g,h)=>h.findIndex(p=>p.name===f.name)===g)}}}Bt.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Bt.prototype[`${e}At`]=function(n,t,r={}){const{parent:o,parentPath:s,schema:a}=$s(this,n,t,r.context);return a[e](o&&o[s],Object.assign({},r,{parent:o,path:n}))};for(const e of["equals","is"])Bt.prototype[e]=Bt.prototype.oneOf;for(const e of["not","nope"])Bt.prototype[e]=Bt.prototype.notOneOf;const ZS=()=>!0;function Ho(e){return new Hs(e)}class Hs extends Bt{constructor(n){super(typeof n=="function"?{type:"mixed",check:n}:Object.assign({type:"mixed",check:ZS},n))}}Ho.prototype=Hs.prototype;function js(){return new qs}class qs extends Bt{constructor(){super({type:"boolean",check(n){return n instanceof Boolean&&(n=n.valueOf()),typeof n=="boolean"}}),this.withMutation(()=>{this.transform((n,t,r)=>{if(r.spec.coerce&&!r.isType(n)){if(/^(true|1)$/i.test(String(n)))return!0;if(/^(false|0)$/i.test(String(n)))return!1}return n})})}isTrue(n=Vs.isValue){return this.test({message:n,name:"is-value",exclusive:!0,params:{value:"true"},test(t){return Fn(t)||t===!0}})}isFalse(n=Vs.isValue){return this.test({message:n,name:"is-value",exclusive:!0,params:{value:"false"},test(t){return Fn(t)||t===!1}})}default(n){return super.default(n)}defined(n){return super.defined(n)}optional(){return super.optional()}required(n){return super.required(n)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(n){return super.nonNullable(n)}strip(n){return super.strip(n)}}js.prototype=qs.prototype;const XS=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function QS(e){const n=Gs(e);if(!n)return Date.parse?Date.parse(e):Number.NaN;if(n.z===void 0&&n.plusMinus===void 0)return new Date(n.year,n.month,n.day,n.hour,n.minute,n.second,n.millisecond).valueOf();let t=0;return n.z!=="Z"&&n.plusMinus!==void 0&&(t=n.hourOffset*60+n.minuteOffset,n.plusMinus==="+"&&(t=0-t)),Date.UTC(n.year,n.month,n.day,n.hour,n.minute+t,n.second,n.millisecond)}function Gs(e){var n,t;const r=XS.exec(e);return r?{year:er(r[1]),month:er(r[2],1)-1,day:er(r[3],1),hour:er(r[4]),minute:er(r[5]),second:er(r[6]),millisecond:r[7]?er(r[7].substring(0,3)):0,precision:(n=(t=r[7])==null?void 0:t.length)!=null?n:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:er(r[10]),minuteOffset:er(r[11])}:null}function er(e,n=0){return Number(e)||n}let e1=/^[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])?)*$/,t1=/^((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,n1=/^(?:[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,r1="^\\d{4}-\\d{2}-\\d{2}",i1="\\d{2}:\\d{2}:\\d{2}",o1="(([+-]\\d{2}(:?\\d{2})?)|Z)",l1=new RegExp(`${r1}T${i1}(\\.\\d+)?${o1}$`),s1=e=>Fn(e)||e===e.trim(),a1={}.toString();function jo(){return new Us}class Us extends Bt{constructor(){super({type:"string",check(n){return n instanceof String&&(n=n.valueOf()),typeof n=="string"}}),this.withMutation(()=>{this.transform((n,t,r)=>{if(!r.spec.coerce||r.isType(n)||Array.isArray(n))return n;const o=n!=null&&n.toString?n.toString():n;return o===a1?n:o})})}required(n){return super.required(n).withMutation(t=>t.test({message:n||Hn.required,name:"required",skipAbsent:!0,test:r=>!!r.length}))}notRequired(){return super.notRequired().withMutation(n=>(n.tests=n.tests.filter(t=>t.OPTIONS.name!=="required"),n))}length(n,t=rn.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:n},skipAbsent:!0,test(r){return r.length===this.resolve(n)}})}min(n,t=rn.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:n},skipAbsent:!0,test(r){return r.length>=this.resolve(n)}})}max(n,t=rn.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:n},skipAbsent:!0,test(r){return r.length<=this.resolve(n)}})}matches(n,t){let r=!1,o,s;return t&&(typeof t=="object"?{excludeEmptyString:r=!1,message:o,name:s}=t:o=t),this.test({name:s||"matches",message:o||rn.matches,params:{regex:n},skipAbsent:!0,test:a=>a===""&&r||a.search(n)!==-1})}email(n=rn.email){return this.matches(e1,{name:"email",message:n,excludeEmptyString:!0})}url(n=rn.url){return this.matches(t1,{name:"url",message:n,excludeEmptyString:!0})}uuid(n=rn.uuid){return this.matches(n1,{name:"uuid",message:n,excludeEmptyString:!1})}datetime(n){let t="",r,o;return n&&(typeof n=="object"?{message:t="",allowOffset:r=!1,precision:o=void 0}=n:t=n),this.matches(l1,{name:"datetime",message:t||rn.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:t||rn.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:s=>{if(!s||r)return!0;const a=Gs(s);return a?!!a.z:!1}}).test({name:"datetime_precision",message:t||rn.datetime_precision,params:{precision:o},skipAbsent:!0,test:s=>{if(!s||o==null)return!0;const a=Gs(s);return a?a.precision===o:!1}})}ensure(){return this.default("").transform(n=>n===null?"":n)}trim(n=rn.trim){return this.transform(t=>t!=null?t.trim():t).test({message:n,name:"trim",test:s1})}lowercase(n=rn.lowercase){return this.transform(t=>Fn(t)?t:t.toLowerCase()).test({message:n,name:"string_case",exclusive:!0,skipAbsent:!0,test:t=>Fn(t)||t===t.toLowerCase()})}uppercase(n=rn.uppercase){return this.transform(t=>Fn(t)?t:t.toUpperCase()).test({message:n,name:"string_case",exclusive:!0,skipAbsent:!0,test:t=>Fn(t)||t===t.toUpperCase()})}}jo.prototype=Us.prototype;let u1=e=>e!=+e;function kh(){return new Ws}class Ws extends Bt{constructor(){super({type:"number",check(n){return n instanceof Number&&(n=n.valueOf()),typeof n=="number"&&!u1(n)}}),this.withMutation(()=>{this.transform((n,t,r)=>{if(!r.spec.coerce)return n;let o=n;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(n,t=pr.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:n},skipAbsent:!0,test(r){return r>=this.resolve(n)}})}max(n,t=pr.max){return this.test({message:t,name:"max",exclusive:!0,params:{max:n},skipAbsent:!0,test(r){return r<=this.resolve(n)}})}lessThan(n,t=pr.lessThan){return this.test({message:t,name:"max",exclusive:!0,params:{less:n},skipAbsent:!0,test(r){return r<this.resolve(n)}})}moreThan(n,t=pr.moreThan){return this.test({message:t,name:"min",exclusive:!0,params:{more:n},skipAbsent:!0,test(r){return r>this.resolve(n)}})}positive(n=pr.positive){return this.moreThan(0,n)}negative(n=pr.negative){return this.lessThan(0,n)}integer(n=pr.integer){return this.test({name:"integer",message:n,skipAbsent:!0,test:t=>Number.isInteger(t)})}truncate(){return this.transform(n=>Fn(n)?n:n|0)}round(n){var t;let r=["ceil","floor","round","trunc"];if(n=((t=n)==null?void 0:t.toLowerCase())||"round",n==="trunc")return this.truncate();if(r.indexOf(n.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+r.join(", "));return this.transform(o=>Fn(o)?o:Math[n](o))}}kh.prototype=Ws.prototype;let Lh=new Date(""),c1=e=>Object.prototype.toString.call(e)==="[object Date]";function Ks(){return new li}class li extends Bt{constructor(){super({type:"date",check(n){return c1(n)&&!isNaN(n.getTime())}}),this.withMutation(()=>{this.transform((n,t,r)=>!r.spec.coerce||r.isType(n)||n===null?n:(n=QS(n),isNaN(n)?li.INVALID_DATE:new Date(n)))})}prepareParam(n,t){let r;if(vr.isRef(n))r=n;else{let o=this.cast(n);if(!this._typeCheck(o))throw new TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);r=o}return r}min(n,t=Bs.min){let r=this.prepareParam(n,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:n},skipAbsent:!0,test(o){return o>=this.resolve(r)}})}max(n,t=Bs.max){let r=this.prepareParam(n,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:n},skipAbsent:!0,test(o){return o<=this.resolve(r)}})}}li.INVALID_DATE=Lh,Ks.prototype=li.prototype,Ks.INVALID_DATE=Lh;function d1(e,n=[]){let t=[],r=new Set,o=new Set(n.map(([a,u])=>`${a}-${u}`));function s(a,u){let f=Br.split(a)[0];r.add(f),o.has(`${u}-${f}`)||t.push([u,f])}for(const a of Object.keys(e)){let u=e[a];r.add(a),vr.isRef(u)&&u.isSibling?s(u.path,a):Vr(u)&&"deps"in u&&u.deps.forEach(f=>s(f,a))}return $S.array(Array.from(r),t).reverse()}function Nh(e,n){let t=1/0;return e.some((r,o)=>{var s;if((s=n.path)!=null&&s.includes(r))return t=o,!0}),t}function zh(e){return(n,t)=>Nh(e,n)-Nh(e,t)}const Rh=(e,n,t)=>{if(typeof e!="string")return e;let r=e;try{r=JSON.parse(e)}catch{}return t.isType(r)?r:e};function qo(e){if("fields"in e){const n={};for(const[t,r]of Object.entries(e.fields))n[t]=qo(r);return e.setFields(n)}if(e.type==="array"){const n=e.optional();return n.innerType&&(n.innerType=qo(n.innerType)),n}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(qo)}):"optional"in e?e.optional():e}const f1=(e,n)=>{const t=[...Br.normalizePath(n)];if(t.length===1)return t[0]in e;let r=t.pop(),o=Br.getter(Br.join(t),!0)(e);return!!(o&&r in o)};let Bh=e=>Object.prototype.toString.call(e)==="[object Object]";function Vh(e,n){let t=Object.keys(e.fields);return Object.keys(n).filter(r=>t.indexOf(r)===-1)}const g1=zh([]);function zi(e){return new Js(e)}class Js extends Bt{constructor(n){super({type:"object",check(t){return Bh(t)||typeof t=="function"}}),this.fields=Object.create(null),this._sortErrors=g1,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{n&&this.shape(n)})}_cast(n,t={}){var r;let o=super._cast(n,t);if(o===void 0)return this.getDefault(t);if(!this._typeCheck(o))return o;let s=this.fields,a=(r=t.stripUnknown)!=null?r:this.spec.noUnknown,u=[].concat(this._nodes,Object.keys(o).filter(p=>!this._nodes.includes(p))),f={},g=Object.assign({},t,{parent:f,__validating:t.__validating||!1}),h=!1;for(const p of u){let _=s[p],v=p in o;if(_){let y,C=o[p];g.path=(t.path?`${t.path}.`:"")+p,_=_.resolve({value:C,context:t.context,parent:f});let S=_ instanceof Bt?_.spec:void 0,T=S==null?void 0:S.strict;if(S!=null&&S.strip){h=h||p in o;continue}y=!t.__validating||!T?_.cast(o[p],g):o[p],y!==void 0&&(f[p]=y)}else v&&!a&&(f[p]=o[p]);(v!==p in f||f[p]!==o[p])&&(h=!0)}return h?f:o}_validate(n,t={},r,o){let{from:s=[],originalValue:a=n,recursive:u=this.spec.recursive}=t;t.from=[{schema:this,value:a},...s],t.__validating=!0,t.originalValue=a,super._validate(n,t,r,(f,g)=>{if(!u||!Bh(g)){o(f,g);return}a=a||g;let h=[];for(let p of this._nodes){let _=this.fields[p];!_||vr.isRef(_)||h.push(_.asNestedTest({options:t,key:p,parent:g,parentPath:t.path,originalParent:a}))}this.runTests({tests:h,value:g,originalValue:a,options:t},r,p=>{o(p.sort(this._sortErrors).concat(f),g)})})}clone(n){const t=super.clone(n);return t.fields=Object.assign({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(n){let t=super.concat(n),r=t.fields;for(let[o,s]of Object.entries(this.fields)){const a=r[o];r[o]=a===void 0?s:a}return t.withMutation(o=>o.setFields(r,[...this._excludedEdges,...n._excludedEdges]))}_getDefault(n){if("default"in this.spec)return super._getDefault(n);if(!this._nodes.length)return;let t={};return this._nodes.forEach(r=>{var o;const s=this.fields[r];let a=n;(o=a)!=null&&o.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[r]})),t[r]=s&&"getDefault"in s?s.getDefault(a):void 0}),t}setFields(n,t){let r=this.clone();return r.fields=n,r._nodes=d1(n,t),r._sortErrors=zh(Object.keys(n)),t&&(r._excludedEdges=t),r}shape(n,t=[]){return this.clone().withMutation(r=>{let o=r._excludedEdges;return t.length&&(Array.isArray(t[0])||(t=[t]),o=[...r._excludedEdges,...t]),r.setFields(Object.assign(r.fields,n),o)})}partial(){const n={};for(const[t,r]of Object.entries(this.fields))n[t]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(n)}deepPartial(){return qo(this)}pick(n){const t={};for(const r of n)this.fields[r]&&(t[r]=this.fields[r]);return this.setFields(t,this._excludedEdges.filter(([r,o])=>n.includes(r)&&n.includes(o)))}omit(n){const t=[];for(const r of Object.keys(this.fields))n.includes(r)||t.push(r);return this.pick(t)}from(n,t,r){let o=Br.getter(n,!0);return this.transform(s=>{if(!s)return s;let a=s;return f1(s,n)&&(a=Object.assign({},s),r||delete a[n],a[t]=o(s)),a})}json(){return this.transform(Rh)}exact(n){return this.test({name:"exact",exclusive:!0,message:n||zo.exact,test(t){if(t==null)return!0;const r=Vh(this.schema,t);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(n=!0,t=zo.noUnknown){typeof n!="boolean"&&(t=n,n=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:t,test(o){if(o==null)return!0;const s=Vh(this.schema,o);return!n||s.length===0||this.createError({params:{unknown:s.join(", ")}})}});return r.spec.noUnknown=n,r}unknown(n=!0,t=zo.noUnknown){return this.noUnknown(!n,t)}transformKeys(n){return this.transform(t=>{if(!t)return t;const r={};for(const o of Object.keys(t))r[n(o)]=t[o];return r})}camelCase(){return this.transformKeys(Rs.camelCase)}snakeCase(){return this.transformKeys(Rs.snakeCase)}constantCase(){return this.transformKeys(n=>Rs.snakeCase(n).toUpperCase())}describe(n){const t=(n?this.resolve(n):this).clone(),r=super.describe(n);r.fields={};for(const[s,a]of Object.entries(t.fields)){var o;let u=n;(o=u)!=null&&o.value&&(u=Object.assign({},u,{parent:u.value,value:u.value[s]})),r.fields[s]=a.describe(u)}return r}}zi.prototype=Js.prototype;function Ys(e){return new Zs(e)}class Zs extends Bt{constructor(n){super({type:"array",spec:{types:n},check(t){return Array.isArray(t)}}),this.innerType=void 0,this.innerType=n}_cast(n,t){const r=super._cast(n,t);if(!this._typeCheck(r)||!this.innerType)return r;let o=!1;const s=r.map((a,u)=>{const f=this.innerType.cast(a,Object.assign({},t,{path:`${t.path||""}[${u}]`}));return f!==a&&(o=!0),f});return o?s:r}_validate(n,t={},r,o){var s;let a=this.innerType,u=(s=t.recursive)!=null?s:this.spec.recursive;t.originalValue!=null&&t.originalValue,super._validate(n,t,r,(f,g)=>{var h;if(!u||!a||!this._typeCheck(g)){o(f,g);return}let p=new Array(g.length);for(let v=0;v<g.length;v++){var _;p[v]=a.asNestedTest({options:t,index:v,parent:g,parentPath:t.path,originalParent:(_=t.originalValue)!=null?_:n})}this.runTests({value:g,tests:p,originalValue:(h=t.originalValue)!=null?h:n,options:t},r,v=>o(v.concat(f),g))})}clone(n){const t=super.clone(n);return t.innerType=this.innerType,t}json(){return this.transform(Rh)}concat(n){let t=super.concat(n);return t.innerType=this.innerType,n.innerType&&(t.innerType=t.innerType?t.innerType.concat(n.innerType):n.innerType),t}of(n){let t=this.clone();if(!Vr(n))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+$n(n));return t.innerType=n,t.spec=Object.assign({},t.spec,{types:n}),t}length(n,t=Ro.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:n},skipAbsent:!0,test(r){return r.length===this.resolve(n)}})}min(n,t){return t=t||Ro.min,this.test({message:t,name:"min",exclusive:!0,params:{min:n},skipAbsent:!0,test(r){return r.length>=this.resolve(n)}})}max(n,t){return t=t||Ro.max,this.test({message:t,name:"max",exclusive:!0,params:{max:n},skipAbsent:!0,test(r){return r.length<=this.resolve(n)}})}ensure(){return this.default(()=>[]).transform((n,t)=>this._typeCheck(n)?n:t==null?[]:[].concat(t))}compact(n){let t=n?(r,o,s)=>!n(r,o,s):r=>!!r;return this.transform(r=>r!=null?r.filter(t):r)}describe(n){const t=(n?this.resolve(n):this).clone(),r=super.describe(n);if(t.innerType){var o;let s=n;(o=s)!=null&&o.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[0]})),r.innerType=t.innerType.describe(s)}return r}}Ys.prototype=Zs.prototype;function $h(e){return new Xs(e)}class Xs extends Bt{constructor(n){super({type:"tuple",spec:{types:n},check(t){const r=this.spec.types;return Array.isArray(t)&&t.length===r.length}}),this.withMutation(()=>{this.typeError(Ph.notType)})}_cast(n,t){const{types:r}=this.spec,o=super._cast(n,t);if(!this._typeCheck(o))return o;let s=!1;const a=r.map((u,f)=>{const g=u.cast(o[f],Object.assign({},t,{path:`${t.path||""}[${f}]`}));return g!==o[f]&&(s=!0),g});return s?a:o}_validate(n,t={},r,o){let s=this.spec.types;super._validate(n,t,r,(a,u)=>{var f;if(!this._typeCheck(u)){o(a,u);return}let g=[];for(let[p,_]of s.entries()){var h;g[p]=_.asNestedTest({options:t,index:p,parent:u,parentPath:t.path,originalParent:(h=t.originalValue)!=null?h:n})}this.runTests({value:u,tests:g,originalValue:(f=t.originalValue)!=null?f:n,options:t},r,p=>o(p.concat(a),u))})}describe(n){const t=(n?this.resolve(n):this).clone(),r=super.describe(n);return r.innerType=t.spec.types.map((o,s)=>{var a;let u=n;return(a=u)!=null&&a.value&&(u=Object.assign({},u,{parent:u.value,value:u.value[s]})),o.describe(u)}),r}}$h.prototype=Xs.prototype;function h1(e){return new Go(e)}function Hh(e){try{return e()}catch(n){if(Et.isError(n))return Promise.reject(n);throw n}}class Go{constructor(n){this.type="lazy",this.__isYupSchema__=!0,this.spec=void 0,this._resolve=(t,r={})=>{let o=this.builder(t,r);if(!Vr(o))throw new TypeError("lazy() functions must return a valid schema");return this.spec.optional&&(o=o.optional()),o.resolve(r)},this.builder=n,this.spec={meta:void 0,optional:!1}}clone(n){const t=new Go(this.builder);return t.spec=Object.assign({},this.spec,n),t}optionality(n){return this.clone({optional:n})}optional(){return this.optionality(!0)}resolve(n){return this._resolve(n.value,n)}cast(n,t){return this._resolve(n,t).cast(n,t)}asNestedTest(n){let{key:t,index:r,parent:o,options:s}=n,a=o[r??t];return this._resolve(a,Object.assign({},s,{value:a,parent:o})).asNestedTest(n)}validate(n,t){return Hh(()=>this._resolve(n,t).validate(n,t))}validateSync(n,t){return this._resolve(n,t).validateSync(n,t)}validateAt(n,t,r){return Hh(()=>this._resolve(t,r).validateAt(n,t,r))}validateSyncAt(n,t,r){return this._resolve(t,r).validateSyncAt(n,t,r)}isValid(n,t){try{return this._resolve(n,t).isValid(n,t)}catch(r){if(Et.isError(r))return Promise.resolve(!1);throw r}}isValidSync(n,t){return this._resolve(n,t).isValidSync(n,t)}describe(n){return n?this.resolve(n).describe(n):{type:"lazy",meta:this.spec.meta,label:void 0}}meta(...n){if(n.length===0)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},n[0]),t}}function p1(e){Object.keys(e).forEach(n=>{Object.keys(e[n]).forEach(t=>{Dh[n][t]=e[n][t]})})}function v1(e,n,t){if(!e||!Vr(e.prototype))throw new TypeError("You must provide a yup schema constructor function");if(typeof n!="string")throw new TypeError("A Method name must be provided");if(typeof t!="function")throw new TypeError("Method function must be provided");e.prototype[n]=t}const jh=Object.freeze(Object.defineProperty({__proto__:null,ArraySchema:Zs,BooleanSchema:qs,DateSchema:li,LazySchema:Go,MixedSchema:Hs,NumberSchema:Ws,ObjectSchema:Js,Schema:Bt,StringSchema:Us,TupleSchema:Xs,ValidationError:Et,addMethod:v1,array:Ys,bool:js,boolean:js,date:Ks,defaultLocale:Dh,getIn:$s,isSchema:Vr,lazy:h1,mixed:Ho,number:kh,object:zi,printValue:$n,reach:YS,ref:JS,setLocale:p1,string:jo,tuple:$h},Symbol.toStringTag,{value:"Module"})),Qs=e=>{const n=e.reduce((t,r)=>{let{name:o,required:s,type:a}=r;switch(a){case"RelatedList":a="array";break;case"Integer":case"Float":a="number";break;case"Related":case"Geometry":case"Raw":a="mixed";break;default:a="string"}let u;try{s?u=jh[a]().typeError(`Field must be of type ${a}`).required("Field is required"):u=jh[a]().typeError(`Field must be of type ${a}`).nullable(!0)}catch(f){console.log(f)}return t[o]=u,t},{});return zi().shape(n)},qh=e=>e?{...e,add:{columns:e.add_columns,title:e.add_title,schema:Qs(e.add_columns),defaultValues:Ls(e.add_columns)},edit:{columns:e.edit_columns,title:e.edit_title,schema:Qs(e.edit_columns),defaultValues:Ls(e.edit_columns)}}:null,m1={columns:[],filters:[],page:0,page_size:25};function Ri(e,n={}){return Object.entries(n).reduce((t,[r,o])=>o==null?(delete t[r],t):{...t,[r]:o},e||m1)}function Gh({path:e,initialQueryParams:n,relation:t,fetchInfo:r=!0,clearInfoOnRefetch:o=!1,clearDataOnRefetch:s=!1,resetQueryParamsOnPathChange:a=!0,infoQueryProps:u,dataQueryProps:f,throwOnError:g=!1,streaming:h=!1}){const[p,_]=I.useState(n?Ri(null,n):null),v=I.useRef(e);I.useEffect(()=>{v.current=e},[e]);const y=I.useRef(e),C=I.useMemo(()=>(y.current=e,p?{...p,...t?{filters:[...p.filters||[],{col:t.foreign_key,opr:t.type,value:kt(t.id)}]}:{}}:null),[p,t]),S=I.useRef(C);I.useEffect(()=>{S.current=C},[C]);const T=I.useCallback(K=>_(ee=>{if(typeof K=="function"&&(K=K(ee)),!ee)return Ri(null,K);const oe=Ri({...ee},K);if(K&&((K.filters||K.order_column||K.order_direction)&&!K.page&&(oe.page=0),h)){if(K.page&&K.page!==ee.page&&!K.streaming)throw new Error("You cannot change page in streaming mode, use streaming.fetch() instead");if(K.page_size&&K.page_size!==ee.page_size)throw new Error("You cannot change page size in streaming mode, use streaming.fetch() instead")}return oe}),[h]),[E,F]=I.useState(null),L=I.useMemo(()=>E,[E]),O=I.useCallback(()=>F(null),[]),{data:P,isFetching:k,refetch:z,error:j}=Xn.useQuery({queryKey:["info",e],queryFn:({signal:K})=>mh(ft(e,"_info"),K).then(ee=>({...qh(ee),path:e})),placeholderData:o?null:Xn.keepPreviousData,enabled:r,retry:!1,refetchOnMount:!1,refetchOnReconnect:!1,refetchOnWindowFocus:!1,...u}),{data:$,isFetching:H,refetch:re,error:Z}=Xn.useQuery({queryKey:["data",y.current,JSON.stringify(C)],queryFn:({signal:K})=>C?bh(ft(y.current,"/"),C,K).then(ee=>({...ee,result:ee.result.map((oe,xe)=>({...oe,id:ee.ids[xe]})),path:y.current})):null,placeholderData:s?null:Xn.keepPreviousData,retry:!1,...f});I.useEffect(()=>{if(j){F({message:"Couldn't fetch info",originalError:j});return}if(Z){F({message:"Couldn't fetch list",originalError:Z});return}O()},[j,Z,O]);const ne=I.useMemo(()=>k||H,[k,H]);je.useDidUpdate(()=>{if(!a)return;const K=Ri(null,n);p!=null&&p.page_size&&(K.page_size=p.page_size),_({...K})},[e]);const ce=I.useCallback(async K=>{try{const ee=await _h(v.current,kt(K));return O(),ee}catch(ee){if(F({message:`Couldn't fetch item with id ${K}`,originalError:ee}),g)throw ee}},[O,g]),q=I.useCallback(async K=>{try{const ee=await hh(v.current,K);return O(),ee}catch(ee){if(F({message:"Couldn't add item",originalError:ee}),g)throw ee}},[O,g]),U=I.useCallback(async(K,ee)=>{try{const oe=await yh(v.current,kt(K),ee);return O(),oe}catch(oe){if(F({message:`Couldn't update item with id ${K}`,originalError:oe}),g)throw oe}},[O,g]),le=I.useCallback(async K=>{try{const ee=await ph(v.current,kt(K));return O(),ee}catch(ee){if(F({message:`Couldn't delete item with id ${K}`,originalError:ee}),g)throw ee}},[O,g]),_e=I.useCallback(async(K,{export_mode:ee,delimiter:oe,quotechar:xe}={})=>{try{await vh(v.current,S.current,{label:K,export_mode:ee,delimiter:oe,quotechar:xe}),O()}catch(X){if(F({message:"Couldn't download",originalError:X}),g)throw X}},[O,g]),he=I.useCallback(async(K,{delimiter:ee,quotechar:oe}={})=>{try{const xe=await wh(v.current,K,{delimiter:ee,quotechar:oe});return O(),xe}catch(xe){if(F({message:"Couldn't upload",originalError:xe}),g)throw xe}},[O,g]),[de,Ae]=je.useSetState({data:{},isEnd:!1,fetch:()=>null});I.useEffect(()=>{h&&Ae({fetch:()=>T({page:0,streaming:!0})})},[T,Ae,h]),I.useEffect(()=>{h&&$&&Ae(K=>{let ee=Object.keys(K.data).length;const oe={isEnd:!1};return C.page<ee?(ee=C.page,oe.data={[C.page]:$.result}):oe.data={...K.data,[C.page]:$.result},$.result.length<C.page_size?(oe.isEnd=!0,oe.fetch=()=>null):oe.fetch=()=>T({page:ee+1,streaming:!0}),oe})},[$,T,Ae,h]);const ue=I.useMemo(()=>{const K={all:"all",actions:"actions"};return $==null||$.list_columns.forEach(ee=>{K[ee]&&(K[ee]=`_${ee}`)}),K},[$==null?void 0:$.list_columns]),pe=I.useCallback(()=>S.current?re():T(),[re,T]);return{path:e,data:$,info:P,queryParams:C,loading:ne,error:L,streaming:de,specialKey:ue,setQueryParams:T,refetch:pe,refetchInfo:z,getEntry:ce,addEntry:q,updateEntry:U,deleteEntry:le,download:_e,upload:he,resetError:O}}const Uh=({path:e})=>{const[n,t]=I.useState([]),[r,o]=I.useState(),s=I.useCallback(async(u,f)=>{try{f===void 0&&(f=n);const g=await Ch(e,u,f);return o(void 0),g}catch(g){o({message:"Couldn't perform bulk action",originalError:g})}},[e,n]);return{bulkActions:I.useMemo(()=>({selectedIds:n,setSelectedIds:t}),[n,t]),dispatchBulkActions:s,error:r}},St={NORMAL:"normal",FULL_SCREEN:"fullScreen",OVERLAY:"overlay"},ea=()=>{const[e]=I.useState(()=>th(n=>({opened:!1,setOpened:t=>n({opened:t}),view:St.NORMAL,setView:t=>n({view:t}),state:Lo,setState:t=>n({state:t}),reset:()=>n({state:Lo}),item:void 0,setItem:t=>n({item:t})})));return e};function Wh({resource_name:e="",initialQueryParams:n,relation:t,fetchInfo:r,clearInfoOnRefetch:o,clearDataOnRefetch:s,resetQueryParamsOnPathChange:a,infoQueryProps:u,dataQueryProps:f,throwOnError:g,streaming:h,children:p}){const{baseUrl:_}=rh(),v=Gh({path:ft(_,e),initialQueryParams:n,relation:t,fetchInfo:r,clearInfoOnRefetch:o,clearDataOnRefetch:s,resetQueryParamsOnPathChange:a,infoQueryProps:u,dataQueryProps:f,throwOnError:g,streaming:h}),y=Ni(v),C=Uh(y),S=Ni(C),T=ea(),[E]=I.useState(()=>ko(T)),F=ea(),[L]=I.useState(()=>ko(F));return c.jsx(Ts.Provider,{value:y,children:c.jsx(Ps.Provider,{value:S,children:c.jsx(Ds.Provider,{value:E,children:c.jsx(ks.Provider,{value:L,children:p})})})})}/**
5
+ * @license @tabler/icons-react v3.18.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 i1={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
- * @license @tabler/icons-react v3.31.0 - MIT
9
+ */var _1={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
+ * @license @tabler/icons-react v3.18.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 rt=(e,t,n,o)=>{const s=x.forwardRef(({color:a="currentColor",size:u=24,stroke:c=2,title:d,className:p,children:y,...g},_)=>x.createElement("svg",{ref:_,...i1[e],width:u,height:u,className:["tabler-icon",`tabler-icon-${t}`,p].join(" "),strokeWidth:c,stroke:a,...g},[d&&x.createElement("title",{key:"svg-title"},d),...o.map(([C,E])=>x.createElement(C,E)),...Array.isArray(y)?y:[y]]));return s.displayName=`${n}`,s};/**
15
- * @license @tabler/icons-react v3.31.0 - MIT
14
+ */const Te=(e,n,t,r)=>{const o=I.forwardRef(({color:s="currentColor",size:a=24,stroke:u=2,title:f,className:g,children:h,...p},_)=>I.createElement("svg",{ref:_,..._1[e],width:a,height:a,className:["tabler-icon",`tabler-icon-${n}`,g].join(" "),strokeWidth:u,stroke:s,...p},[f&&I.createElement("title",{key:"svg-title"},f),...r.map(([v,y])=>I.createElement(v,y)),...Array.isArray(h)?h:[h]]));return o.displayName=`${t}`,o};/**
15
+ * @license @tabler/icons-react v3.18.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 o1=rt("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
- * @license @tabler/icons-react v3.31.0 - MIT
19
+ */var b1=Te("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
+ * @license @tabler/icons-react v3.18.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 s1=rt("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
- * @license @tabler/icons-react v3.31.0 - MIT
24
+ */var y1=Te("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
+ * @license @tabler/icons-react v3.18.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 El=rt("outline","chevron-down","IconChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]);/**
30
- * @license @tabler/icons-react v3.31.0 - MIT
29
+ */var w1=Te("outline","arrow-autofit-content","IconArrowAutofitContent",[["path",{d:"M6 4l-3 3l3 3",key:"svg-0"}],["path",{d:"M18 4l3 3l-3 3",key:"svg-1"}],["path",{d:"M4 14m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z",key:"svg-2"}],["path",{d:"M10 7h-7",key:"svg-3"}],["path",{d:"M21 7h-7",key:"svg-4"}]]);/**
30
+ * @license @tabler/icons-react v3.18.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 Md=rt("outline","chevron-up","IconChevronUp",[["path",{d:"M6 15l6 -6l6 6",key:"svg-0"}]]);/**
35
- * @license @tabler/icons-react v3.31.0 - MIT
34
+ */var C1=Te("outline","arrow-down","IconArrowDown",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M18 13l-6 6",key:"svg-1"}],["path",{d:"M6 13l6 6",key:"svg-2"}]]);/**
35
+ * @license @tabler/icons-react v3.18.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 a1=rt("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
- * @license @tabler/icons-react v3.31.0 - MIT
39
+ */var S1=Te("outline","arrow-up","IconArrowUp",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M18 11l-6 -6",key:"svg-1"}],["path",{d:"M6 11l6 -6",key:"svg-2"}]]);/**
40
+ * @license @tabler/icons-react v3.18.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 l1=rt("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
- * @license @tabler/icons-react v3.31.0 - MIT
44
+ */var T1=Te("outline","arrows-sort","IconArrowsSort",[["path",{d:"M3 9l4 -4l4 4m-4 -4v14",key:"svg-0"}],["path",{d:"M21 15l-4 4l-4 -4m4 4v-14",key:"svg-1"}]]);/**
45
+ * @license @tabler/icons-react v3.18.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 u1=rt("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
- * @license @tabler/icons-react v3.31.0 - MIT
49
+ */var I1=Te("outline","baseline-density-large","IconBaselineDensityLarge",[["path",{d:"M4 4h16",key:"svg-0"}],["path",{d:"M4 20h16",key:"svg-1"}]]);/**
50
+ * @license @tabler/icons-react v3.18.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 c1=rt("outline","file-type-csv","IconFileTypeCsv",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4",key:"svg-1"}],["path",{d:"M7 16.5a1.5 1.5 0 0 0 -3 0v3a1.5 1.5 0 0 0 3 0",key:"svg-2"}],["path",{d:"M10 20.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75",key:"svg-3"}],["path",{d:"M16 15l2 6l2 -6",key:"svg-4"}]]);/**
55
- * @license @tabler/icons-react v3.31.0 - MIT
54
+ */var M1=Te("outline","baseline-density-medium","IconBaselineDensityMedium",[["path",{d:"M4 20h16",key:"svg-0"}],["path",{d:"M4 12h16",key:"svg-1"}],["path",{d:"M4 4h16",key:"svg-2"}]]);/**
55
+ * @license @tabler/icons-react v3.18.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 f1=rt("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"}]]);/**
60
- * @license @tabler/icons-react v3.31.0 - MIT
59
+ */var x1=Te("outline","baseline-density-small","IconBaselineDensitySmall",[["path",{d:"M4 3h16",key:"svg-0"}],["path",{d:"M4 9h16",key:"svg-1"}],["path",{d:"M4 15h16",key:"svg-2"}],["path",{d:"M4 21h16",key:"svg-3"}]]);/**
60
+ * @license @tabler/icons-react v3.18.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 Fd=rt("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"}]]);/**
65
- * @license @tabler/icons-react v3.31.0 - MIT
64
+ */var E1=Te("outline","box-multiple","IconBoxMultiple",[["path",{d:"M7 3m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M17 17v2a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-10a2 2 0 0 1 2 -2h2",key:"svg-1"}]]);/**
65
+ * @license @tabler/icons-react v3.18.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 d1=rt("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"}]]);/**
70
- * @license @tabler/icons-react v3.31.0 - MIT
69
+ */var Uo=Te("outline","chevron-down","IconChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]);/**
70
+ * @license @tabler/icons-react v3.18.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 h1=rt("outline","info-circle","IconInfoCircle",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 9h.01",key:"svg-1"}],["path",{d:"M11 12h1v4h1",key:"svg-2"}]]);/**
75
- * @license @tabler/icons-react v3.31.0 - MIT
74
+ */var F1=Te("outline","chevron-left-pipe","IconChevronLeftPipe",[["path",{d:"M7 6v12",key:"svg-0"}],["path",{d:"M18 6l-6 6l6 6",key:"svg-1"}]]);/**
75
+ * @license @tabler/icons-react v3.18.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 Dd=rt("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"}]]);/**
80
- * @license @tabler/icons-react v3.31.0 - MIT
79
+ */var A1=Te("outline","chevron-left","IconChevronLeft",[["path",{d:"M15 6l-6 6l6 6",key:"svg-0"}]]);/**
80
+ * @license @tabler/icons-react v3.18.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 p1=rt("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"}]]);/**
85
- * @license @tabler/icons-react v3.31.0 - MIT
84
+ */var O1=Te("outline","chevron-right-pipe","IconChevronRightPipe",[["path",{d:"M6 6l6 6l-6 6",key:"svg-0"}],["path",{d:"M17 5v13",key:"svg-1"}]]);/**
85
+ * @license @tabler/icons-react v3.18.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 g1=rt("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"}]]);/**
90
- * @license @tabler/icons-react v3.31.0 - MIT
89
+ */var P1=Te("outline","chevron-right","IconChevronRight",[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]]);/**
90
+ * @license @tabler/icons-react v3.18.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 xl=rt("outline","plus","IconPlus",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]]);/**
95
- * @license @tabler/icons-react v3.31.0 - MIT
94
+ */var Kh=Te("outline","chevron-up","IconChevronUp",[["path",{d:"M6 15l6 -6l6 6",key:"svg-0"}]]);/**
95
+ * @license @tabler/icons-react v3.18.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 kd=rt("outline","quote","IconQuote",[["path",{d:"M10 11h-4a1 1 0 0 1 -1 -1v-3a1 1 0 0 1 1 -1h3a1 1 0 0 1 1 1v6c0 2.667 -1.333 4.333 -4 5",key:"svg-0"}],["path",{d:"M19 11h-4a1 1 0 0 1 -1 -1v-3a1 1 0 0 1 1 -1h3a1 1 0 0 1 1 1v6c0 2.667 -1.333 4.333 -4 5",key:"svg-1"}]]);/**
100
- * @license @tabler/icons-react v3.31.0 - MIT
99
+ */var D1=Te("outline","chevrons-down","IconChevronsDown",[["path",{d:"M7 7l5 5l5 -5",key:"svg-0"}],["path",{d:"M7 13l5 5l5 -5",key:"svg-1"}]]);/**
100
+ * @license @tabler/icons-react v3.18.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 m1=rt("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"}]]);/**
105
- * @license @tabler/icons-react v3.31.0 - MIT
104
+ */var k1=Te("outline","circle-x","IconCircleX",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M10 10l4 4m0 -4l-4 4",key:"svg-1"}]]);/**
105
+ * @license @tabler/icons-react v3.18.0 - MIT
106
106
  *
107
107
  * This source code is licensed under the MIT license.
108
108
  * See the LICENSE file in the root directory of this source tree.
109
- */var Nd=rt("outline","separator-vertical","IconSeparatorVertical",[["path",{d:"M12 4l0 16",key:"svg-0"}],["path",{d:"M8 8l-4 4l4 4",key:"svg-1"}],["path",{d:"M16 16l4 -4l-4 -4",key:"svg-2"}]]);/**
110
- * @license @tabler/icons-react v3.31.0 - MIT
109
+ */var L1=Te("outline","clear-all","IconClearAll",[["path",{d:"M8 6h12",key:"svg-0"}],["path",{d:"M6 12h12",key:"svg-1"}],["path",{d:"M4 18h12",key:"svg-2"}]]);/**
110
+ * @license @tabler/icons-react v3.18.0 - MIT
111
111
  *
112
112
  * This source code is licensed under the MIT license.
113
113
  * See the LICENSE file in the root directory of this source tree.
114
- */var Ld=rt("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"}]]);/**
115
- * @license @tabler/icons-react v3.31.0 - MIT
114
+ */var N1=Te("outline","columns","IconColumns",[["path",{d:"M4 6l5.5 0",key:"svg-0"}],["path",{d:"M4 10l5.5 0",key:"svg-1"}],["path",{d:"M4 14l5.5 0",key:"svg-2"}],["path",{d:"M4 18l5.5 0",key:"svg-3"}],["path",{d:"M14.5 6l5.5 0",key:"svg-4"}],["path",{d:"M14.5 10l5.5 0",key:"svg-5"}],["path",{d:"M14.5 14l5.5 0",key:"svg-6"}],["path",{d:"M14.5 18l5.5 0",key:"svg-7"}]]);/**
115
+ * @license @tabler/icons-react v3.18.0 - MIT
116
116
  *
117
117
  * This source code is licensed under the MIT license.
118
118
  * See the LICENSE file in the root directory of this source tree.
119
- */var y1=rt("outline","upload","IconUpload",[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 9l5 -5l5 5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]]);/**
120
- * @license @tabler/icons-react v3.31.0 - MIT
119
+ */var z1=Te("outline","device-floppy","IconDeviceFloppy",[["path",{d:"M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2",key:"svg-0"}],["path",{d:"M12 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M14 4l0 4l-6 0l0 -4",key:"svg-2"}]]);/**
120
+ * @license @tabler/icons-react v3.18.0 - MIT
121
121
  *
122
122
  * This source code is licensed under the MIT license.
123
123
  * See the LICENSE file in the root directory of this source tree.
124
- */var v1=rt("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"}]]);/**
125
- * @license @tabler/icons-react v3.31.0 - MIT
124
+ */var R1=Te("outline","dots-vertical","IconDotsVertical",[["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]]);/**
125
+ * @license @tabler/icons-react v3.18.0 - MIT
126
126
  *
127
127
  * This source code is licensed under the MIT license.
128
128
  * See the LICENSE file in the root directory of this source tree.
129
- */var Bd=rt("outline","x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);function sr(e){const t={variant:"transparent",size:"lg",c:"gray",className:"toolbarActionIcon"},n=b.useProps("ActionIcon",t,e);return x.useMemo(()=>({...n,...e}),[n,e])}function b1(e,{autoInvoke:t=!0,initialLoading:n=!1,clearDataOnRefetch:o=!1,...s}={}){const[a,u]=x.useState(null),[c,d]=x.useState(n),[p,y]=x.useState(null),g=x.useRef(null),_=x.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 T=await E.json();if(!E.ok){const P=typeof T.detail=="string"?T.detail:JSON.stringify(T.detail,null,2);throw new Error(P)}return u(T),d(!1),T}).catch(E=>(E&&E.name!=="AbortError"&&(y(E),d(!1)),E))},[e]),C=x.useCallback(()=>{var E;g.current&&((E=g.current)==null||E.abort(""),d(!1))},[]);return x.useEffect(()=>(t&&_(),()=>{g.current&&g.current.abort("")}),[_,t]),{data:a,loading:c,error:p,refetch:_,abort:C}}function zd(e){const t=x.useRef(!1);return x.useMemo(()=>e&&!t.current?(t.current=!0,!0):t.current,[e])}function Ud({opened:e,onClose:t,handleAccept:n,handleReject:o}){return h.jsxs(b.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?",h.jsxs(b.Group,{align:"right",mt:"xl",justify:"flex-end",children:[h.jsx(b.Button,{onClick:o,variant:"default",children:"Abbrechen"}),h.jsx(b.Button,{onClick:n,color:"red",children:"Löschen"})]})]})}const Al=x.memo(({id:e,...t})=>{const{refetch:n,refetchInfo:o,deleteEntry:s}=Oe(),[a,u]=x.useState(!1),c=sr({onClick:()=>u(!0),size:"sm",...t}),d=()=>u(!1),p=()=>s(e).then(y=>{y&&(n(),o())}).catch(()=>{}).finally(()=>u(!1));return h.jsxs(h.Fragment,{children:[h.jsx(b.Tooltip,{label:"Delete",children:h.jsx(b.ActionIcon,{...c,children:h.jsx(Ld,{})})}),h.jsx(Ud,{opened:a,onClose:d,handleAccept:p,handleReject:d})]})});Al.displayName="Delete";const Ol=x.memo(({id:e,...t})=>{const{getEntry:n}=Oe(),{setOpened:o,setItem:s}=zn("edit"),[a,u]=Le.useDebouncedState(!1,$r),c=sr({onClick:()=>{u(!0),n(e).then(d=>{d&&(s(d),o(!0))}).catch(()=>{}).finally(()=>u(!1))},size:"sm",loading:a,...t});return h.jsx(h.Fragment,{children:h.jsx(b.Tooltip,{label:"Edit",children:h.jsx(b.ActionIcon,{...c,children:h.jsx(g1,{})})})})});Ol.displayName="Edit";const Wd=Object.freeze({left:0,top:0,width:16,height:16}),ts=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Il=Object.freeze({...Wd,...ts}),Pl=Object.freeze({...Il,body:"",hidden:!1});function _1(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 jd(e,t){const n=_1(e,t);for(const o in Pl)o in ts?o in e&&!(o in n)&&(n[o]=ts[o]):o in t?n[o]=t[o]:o in e&&(n[o]=e[o]);return n}function T1(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 w1(e,t,n){const o=e.icons,s=e.aliases||Object.create(null);let a={};function u(c){a=jd(o[c]||s[c],a)}return u(t),n.forEach(u),jd(e,a)}function Vd(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=T1(e);for(const s in o){const a=o[s];a&&(t(s,w1(e,s,a)),n.push(s))}return n}const S1={provider:"",aliases:{},not_found:{},...Wd};function $l(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function Gd(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!$l(e,S1))return null;const n=t.icons;for(const s in n){const a=n[s];if(!s||typeof a.body!="string"||!$l(a,Pl))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]||!$l(a,Pl))return null}return t}const Hd=/^[a-z0-9]+(-[a-z0-9]+)*$/,ns=(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(),p={provider:s.length>0?s[0]:o,prefix:d,name:c};return t&&!rs(p)?null:p}const a=s[0],u=a.split("-");if(u.length>1){const c={provider:o,prefix:u.shift(),name:u.join("-")};return t&&!rs(c)?null:c}if(n&&o===""){const c={provider:o,prefix:"",name:a};return t&&!rs(c,n)?null:c}return null},rs=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1,qd=Object.create(null);function C1(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function ii(e,t){const n=qd[e]||(qd[e]=Object.create(null));return n[t]||(n[t]=C1(e,t))}function Yd(e,t){return Gd(t)?Vd(t,(n,o)=>{o?e.icons[n]=o:e.missing.add(n)}):[]}function E1(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}let Ri=!1;function Kd(e){return typeof e=="boolean"&&(Ri=e),Ri}function Jd(e){const t=typeof e=="string"?ns(e,!0,Ri):e;if(t){const n=ii(t.provider,t.prefix),o=t.name;return n.icons[o]||(n.missing.has(o)?null:void 0)}}function x1(e,t){const n=ns(e,!0,Ri);if(!n)return!1;const o=ii(n.provider,n.prefix);return t?E1(o,n.name,t):(o.missing.add(n.name),!0)}function A1(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),Ri&&!t&&!e.prefix){let s=!1;return Gd(e)&&(e.prefix="",Vd(e,(a,u)=>{x1(a,u)&&(s=!0)})),s}const n=e.prefix;if(!rs({prefix:n,name:"a"}))return!1;const o=ii(t,n);return!!Yd(o,e)}const Rd=Object.freeze({width:null,height:null}),Zd=Object.freeze({...Rd,...ts}),O1=/(-?[0-9.]*[0-9]+[0-9.]*)/g,I1=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Xd(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(O1);if(o===null||!o.length)return e;const s=[];let a=o.shift(),u=I1.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 P1(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 $1(e,t){return e?"<defs>"+e+"</defs>"+t:t}function M1(e,t,n){const o=P1(e);return $1(o.defs,t+o.content+n)}const F1=e=>e==="unset"||e==="undefined"||e==="none";function D1(e,t){const n={...Il,...e},o={...Zd,...t},s={left:n.left,top:n.top,width:n.width,height:n.height};let a=n.body;[n,o].forEach(T=>{const P=[],k=T.hFlip,Q=T.vFlip;let U=T.rotate;k?Q?U+=2:(P.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),P.push("scale(-1 1)"),s.top=s.left=0):Q&&(P.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),P.push("scale(1 -1)"),s.top=s.left=0);let N;switch(U<0&&(U-=Math.floor(U/4)*4),U=U%4,U){case 1:N=s.height/2+s.top,P.unshift("rotate(90 "+N.toString()+" "+N.toString()+")");break;case 2:P.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:N=s.width/2+s.left,P.unshift("rotate(-90 "+N.toString()+" "+N.toString()+")");break}U%2===1&&(s.left!==s.top&&(N=s.left,s.left=s.top,s.top=N),s.width!==s.height&&(N=s.width,s.width=s.height,s.height=N)),P.length&&(a=M1(a,'<g transform="'+P.join(" ")+'">',"</g>"))});const u=o.width,c=o.height,d=s.width,p=s.height;let y,g;u===null?(g=c===null?"1em":c==="auto"?p:c,y=Xd(g,d/p)):(y=u==="auto"?d:u,g=c===null?Xd(y,p/d):c==="auto"?p:c);const _={},C=(T,P)=>{F1(P)||(_[T]=P.toString())};C("width",y),C("height",g);const E=[s.left,s.top,d,p];return _.viewBox=E.join(" "),{attributes:_,viewBox:E,body:a}}const k1=/\sid="(\S+)"/g,N1="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let L1=0;function B1(e,t=N1){const n=[];let o;for(;o=k1.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+(L1++).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 Ml=Object.create(null);function z1(e,t){Ml[e]=t}function Fl(e){return Ml[e]||Ml[""]}function Dl(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 kl=Object.create(null),Zi=["https://api.simplesvg.com","https://api.unisvg.com"],is=[];for(;Zi.length>0;)Zi.length===1||Math.random()>.5?is.push(Zi.shift()):is.push(Zi.pop());kl[""]=Dl({resources:["https://api.iconify.design"].concat(is)});function U1(e,t){const n=Dl(t);return n===null?!1:(kl[e]=n,!0)}function Nl(e){return kl[e]}let Qd=(()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}})();function W1(e,t){const n=Nl(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 j1(e){return e===404}const V1=(e,t,n)=>{const o=[],s=W1(e,t),a="icons";let u={type:a,provider:e,prefix:t,icons:[]},c=0;return n.forEach((d,p)=>{c+=d.length+1,c>=s&&p>0&&(o.push(u),u={type:a,provider:e,prefix:t,icons:[]},c=d.length),u.icons.push(d)}),o.push(u),o};function G1(e){if(typeof e=="string"){const t=Nl(e);if(t)return t.path}return"/"}const H1={prepare:V1,send:(e,t,n)=>{if(!Qd){n("abort",424);return}let o=G1(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;Qd(e+o).then(a=>{const u=a.status;if(u!==200){setTimeout(()=>{n(j1(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 q1(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)),p=d[u]||(d[u]=ii(a,u));let y;c in p.icons?y=t.loaded:u===""||p.missing.has(c)?y=t.missing:y=t.pending;const g={provider:a,prefix:u,name:c};y.push(g)}),t}function eh(e,t){e.forEach(n=>{const o=n.loaderCallbacks;o&&(n.loaderCallbacks=o.filter(s=>s.id!==t))})}function Y1(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 p=d.name;if(e.icons[p])u.loaded.push({provider:o,prefix:s,name:p});else if(e.missing.has(p))u.missing.push({provider:o,prefix:s,name:p});else return n=!0,!0;return!1}),u.pending.length!==c&&(n||eh([e],a.id),a.callback(u.loaded.slice(0),u.missing.slice(0),u.pending.slice(0),a.abort))})}))}let K1=0;function J1(e,t,n){const o=K1++,s=eh.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 R1(e,t=!0,n=!1){const o=[];return e.forEach(s=>{const a=typeof s=="string"?ns(s,t,n):s;a&&o.push(a)}),o}var Z1={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function X1(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",p=0,y,g=null,_=[],C=[];typeof o=="function"&&C.push(o);function E(){g&&(clearTimeout(g),g=null)}function T(){d==="pending"&&(d="aborted"),E(),_.forEach(B=>{B.status==="pending"&&(B.status="aborted")}),_=[]}function P(B,Y){Y&&(C=[]),typeof B=="function"&&C.push(B)}function k(){return{startTime:c,payload:t,status:d,queriesSent:p,queriesPending:_.length,subscribe:P,abort:T}}function Q(){d="failed",C.forEach(B=>{B(void 0,y)})}function U(){_.forEach(B=>{B.status==="pending"&&(B.status="aborted")}),_=[]}function N(B,Y,fe){const ie=Y!=="success";switch(_=_.filter(S=>S!==B),d){case"pending":break;case"failed":if(ie||!e.dataAfterTimeout)return;break;default:return}if(Y==="abort"){y=fe,Q();return}if(ie){y=fe,_.length||(u.length?M():Q());return}if(E(),U(),!e.random){const S=e.resources.indexOf(B.resource);S!==-1&&S!==e.index&&(e.index=S)}d="completed",C.forEach(S=>{S(fe)})}function M(){if(d!=="pending")return;E();const B=u.shift();if(B===void 0){if(_.length){g=setTimeout(()=>{E(),d==="pending"&&(U(),Q())},e.timeout);return}Q();return}const Y={status:"pending",resource:B,callback:(fe,ie)=>{N(Y,fe,ie)}};_.push(Y),p++,g=setTimeout(M,e.rotate),n(B,t,Y.callback)}return setTimeout(M),k}function th(e){const t={...Z1,...e};let n=[];function o(){n=n.filter(c=>c().status==="pending")}function s(c,d,p){const y=X1(t,c,d,(g,_)=>{o(),p&&p(g,_)});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 nh(){}const Ll=Object.create(null);function Q1(e){if(!Ll[e]){const t=Nl(e);if(!t)return;const n=th(t),o={config:t,redundancy:n};Ll[e]=o}return Ll[e]}function e_(e,t,n){let o,s;if(typeof e=="string"){const a=Fl(e);if(!a)return n(void 0,424),nh;s=a.send;const u=Q1(e);u&&(o=u.redundancy)}else{const a=Dl(e);if(a){o=th(a);const u=e.resources?e.resources[0]:"",c=Fl(u);c&&(s=c.send)}}return!o||!s?(n(void 0,424),nh):o.query(t,s,n)().abort}function rh(){}function t_(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Y1(e)}))}function n_(e){const t=[],n=[];return e.forEach(o=>{(o.match(Hd)?t:n).push(o)}),{valid:t,invalid:n}}function Xi(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(!Yd(e,n).length){o();return}}catch(s){console.error(s)}o(),t_(e)}function ih(e,t){e instanceof Promise?e.then(n=>{t(n)}).catch(()=>{t(null)}):t(e)}function r_(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)){ih(e.loadIcons(s,o,n),y=>{Xi(e,s,y)});return}if(a){s.forEach(y=>{const g=a(y,o,n);ih(g,_=>{const C=_?{prefix:o,icons:{[y]:_}}:null;Xi(e,[y],C)})});return}const{valid:u,invalid:c}=n_(s);if(c.length&&Xi(e,c,null),!u.length)return;const d=o.match(Hd)?Fl(n):null;if(!d){Xi(e,u,null);return}d.prepare(n,o,u).forEach(y=>{e_(n,y,g=>{Xi(e,y.icons,g)})})}))}const i_=(e,t)=>{const n=R1(e,!0,Kd()),o=q1(n);if(!o.pending.length){let d=!0;return t&&setTimeout(()=>{d&&t(o.loaded,o.missing,o.pending,rh)}),()=>{d=!1}}const s=Object.create(null),a=[];let u,c;return o.pending.forEach(d=>{const{provider:p,prefix:y}=d;if(y===c&&p===u)return;u=p,c=y,a.push(ii(p,y));const g=s[p]||(s[p]=Object.create(null));g[y]||(g[y]=[])}),o.pending.forEach(d=>{const{provider:p,prefix:y,name:g}=d,_=ii(p,y),C=_.pendingIcons||(_.pendingIcons=new Set);C.has(g)||(C.add(g),s[p][y].push(g))}),a.forEach(d=>{const p=s[d.provider][d.prefix];p.length&&r_(d,p)}),t?J1(t,o,a):rh};function o_(e,t){const n={...e};for(const o in t){const s=t[o],a=typeof s;o in Rd?(s===null||s&&(a==="string"||a==="number"))&&(n[o]=s):a===typeof n[o]&&(n[o]=o==="rotate"?s%4:s)}return n}const s_=/[\s,]+/;function a_(e,t){t.split(s_).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function l_(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 u_(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 c_(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function f_(e){return"data:image/svg+xml,"+c_(e)}function d_(e){return'url("'+f_(e)+'")'}let Qi;function h_(){try{Qi=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Qi=null}}function p_(e){return Qi===void 0&&h_(),Qi?Qi.createHTML(e):e}const oh={...Zd,inline:!1},g_={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},m_={display:"inline-block"},Bl={backgroundColor:"currentColor"},sh={backgroundColor:"transparent"},ah={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},lh={WebkitMask:Bl,mask:Bl,background:sh};for(const e in lh){const t=lh[e];for(const n in ah)t[e+n]=ah[n]}const y_={...oh,inline:!0};function uh(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const v_=(e,t,n)=>{const o=t.inline?y_:oh,s=o_(o,t),a=t.mode||"svg",u={},c=t.style||{},d={...a==="svg"?g_:{}};if(n){const P=ns(n,!1,!0);if(P){const k=["iconify"],Q=["provider","prefix"];for(const U of Q)P[U]&&k.push("iconify--"+P[U]);d.className=k.join(" ")}}for(let P in t){const k=t[P];if(k!==void 0)switch(P){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":break;case"_ref":d.ref=k;break;case"className":d[P]=(d[P]?d[P]+" ":"")+k;break;case"inline":case"hFlip":case"vFlip":s[P]=k===!0||k==="true"||k===1;break;case"flip":typeof k=="string"&&a_(s,k);break;case"color":u.color=k;break;case"rotate":typeof k=="string"?s[P]=l_(k):typeof k=="number"&&(s[P]=k);break;case"ariaHidden":case"aria-hidden":k!==!0&&k!=="true"&&delete d["aria-hidden"];break;default:o[P]===void 0&&(d[P]=k)}}const p=D1(e,s),y=p.attributes;if(s.inline&&(u.verticalAlign="-0.125em"),a==="svg"){d.style={...u,...c},Object.assign(d,y);let P=0,k=t.id;return typeof k=="string"&&(k=k.replace(/-/g,"_")),d.dangerouslySetInnerHTML={__html:p_(B1(p.body,k?()=>k+"ID"+P++:"iconifyReact"))},x.createElement("svg",d)}const{body:g,width:_,height:C}=e,E=a==="mask"||(a==="bg"?!1:g.indexOf("currentColor")!==-1),T=u_(g,{...y,width:_+"",height:C+""});return d.style={...u,"--svg":d_(T),width:uh(y.width),height:uh(y.height),...m_,...E?Bl:sh,...c},x.createElement("span",d)};if(Kd(!0),z1("",H1),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"||!A1(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;U1(n,s)||console.error(o)}catch{console.error(o)}}}}function ch(e){const[t,n]=x.useState(!!e.ssr),[o,s]=x.useState({});function a(C){if(C){const E=e.icon;if(typeof E=="object")return{name:"",data:E};const T=Jd(E);if(T)return{name:E,data:T}}return{name:""}}const[u,c]=x.useState(a(!!e.ssr));function d(){const C=o.callback;C&&(C(),s({}))}function p(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"){p({name:"",data:E});return}const T=Jd(E);if(p({name:E,data:T}))if(T===void 0){const P=i_([E],y);s({callback:P})}else T&&((C=e.onLoad)===null||C===void 0||C.call(e,E))}x.useEffect(()=>(n(!0),d),[]),x.useEffect(()=>{t&&y()},[e.icon,t]);const{name:g,data:_}=u;return _?v_({...Il,..._},e,g):e.children?e.children:e.fallback?e.fallback:x.createElement("span",{})}const zl=x.forwardRef((e,t)=>ch({...e,_ref:t}));x.forwardRef((e,t)=>ch({inline:!0,...e,_ref:t}));function fh(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:qi(t)?String(t):null,onChange:o=>n(qi(o)?o===String(!0):void 0)}}function b_(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var jn=b_,__=typeof Un=="object"&&Un&&Un.Object===Object&&Un,dh=__,T_=dh,w_=typeof self=="object"&&self&&self.Object===Object&&self,S_=T_||w_||Function("return this")(),vn=S_,C_=vn,E_=function(){return C_.Date.now()},x_=E_,A_=/\s/;function O_(e){for(var t=e.length;t--&&A_.test(e.charAt(t)););return t}var I_=O_,P_=I_,$_=/^\s+/;function M_(e){return e&&e.slice(0,P_(e)+1).replace($_,"")}var F_=M_,D_=vn,k_=D_.Symbol,os=k_,hh=os,ph=Object.prototype,N_=ph.hasOwnProperty,L_=ph.toString,eo=hh?hh.toStringTag:void 0;function B_(e){var t=N_.call(e,eo),n=e[eo];try{e[eo]=void 0;var o=!0}catch{}var s=L_.call(e);return o&&(t?e[eo]=n:delete e[eo]),s}var z_=B_,U_=Object.prototype,W_=U_.toString;function j_(e){return W_.call(e)}var V_=j_,gh=os,G_=z_,H_=V_,q_="[object Null]",Y_="[object Undefined]",mh=gh?gh.toStringTag:void 0;function K_(e){return e==null?e===void 0?Y_:q_:mh&&mh in Object(e)?G_(e):H_(e)}var oi=K_;function J_(e){return e!=null&&typeof e=="object"}var si=J_,R_=oi,Z_=si,X_="[object Symbol]";function Q_(e){return typeof e=="symbol"||Z_(e)&&R_(e)==X_}var yh=Q_,eT=F_,vh=jn,tT=yh,bh=NaN,nT=/^[-+]0x[0-9a-f]+$/i,rT=/^0b[01]+$/i,iT=/^0o[0-7]+$/i,oT=parseInt;function sT(e){if(typeof e=="number")return e;if(tT(e))return bh;if(vh(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=vh(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=eT(e);var n=rT.test(e);return n||iT.test(e)?oT(e.slice(2),n?2:8):nT.test(e)?bh:+e}var _h=sT,aT=jn,Ul=x_,Th=_h,lT="Expected a function",uT=Math.max,cT=Math.min;function fT(e,t,n){var o,s,a,u,c,d,p=0,y=!1,g=!1,_=!0;if(typeof e!="function")throw new TypeError(lT);t=Th(t)||0,aT(n)&&(y=!!n.leading,g="maxWait"in n,a=g?uT(Th(n.maxWait)||0,t):a,_="trailing"in n?!!n.trailing:_);function C(B){var Y=o,fe=s;return o=s=void 0,p=B,u=e.apply(fe,Y),u}function E(B){return p=B,c=setTimeout(k,t),y?C(B):u}function T(B){var Y=B-d,fe=B-p,ie=t-Y;return g?cT(ie,a-fe):ie}function P(B){var Y=B-d,fe=B-p;return d===void 0||Y>=t||Y<0||g&&fe>=a}function k(){var B=Ul();if(P(B))return Q(B);c=setTimeout(k,T(B))}function Q(B){return c=void 0,_&&o?C(B):(o=s=void 0,u)}function U(){c!==void 0&&clearTimeout(c),p=0,o=d=s=c=void 0}function N(){return c===void 0?u:Q(Ul())}function M(){var B=Ul(),Y=P(B);if(o=arguments,s=this,d=B,Y){if(c===void 0)return E(d);if(g)return clearTimeout(c),c=setTimeout(k,t),C(d)}return c===void 0&&(c=setTimeout(k,t)),u}return M.cancel=U,M.flush=N,M}var dT=fT;const hT=rr(dT),pT=(e,t,n,o,s,a=300)=>{const[u,c]=x.useState(n??t);x.useEffect(()=>{c(n??t)},[n]);const d=x.useCallback(hT(g=>e(o,g),a),[e,o,a]),p=x.useCallback(g=>{const _=s(g);c(_??t),d(_)},[d,s]),y=x.useCallback(()=>{c(t),e(o,void 0)},[t,e,o]);return[u,p,y]};function ar(e,t){return e===t||Array.isArray(e)&&e.includes(t)}var gT=Object.prototype;function mT(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||gT;return e===n}var ss=mT;function yT(e,t){return function(n){return e(t(n))}}var wh=yT,vT=wh,bT=vT(Object.keys,Object),_T=bT,TT=ss,wT=_T,ST=Object.prototype,CT=ST.hasOwnProperty;function ET(e){if(!TT(e))return wT(e);var t=[];for(var n in Object(e))CT.call(e,n)&&n!="constructor"&&t.push(n);return t}var xT=ET,AT=oi,OT=jn,IT="[object AsyncFunction]",PT="[object Function]",$T="[object GeneratorFunction]",MT="[object Proxy]";function FT(e){if(!OT(e))return!1;var t=AT(e);return t==PT||t==$T||t==IT||t==MT}var Wl=FT,DT=vn,kT=DT["__core-js_shared__"],NT=kT,jl=NT,Sh=function(){var e=/[^.]+$/.exec(jl&&jl.keys&&jl.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function LT(e){return!!Sh&&Sh in e}var BT=LT,zT=Function.prototype,UT=zT.toString;function WT(e){if(e!=null){try{return UT.call(e)}catch{}try{return e+""}catch{}}return""}var Ch=WT,jT=Wl,VT=BT,GT=jn,HT=Ch,qT=/[\\^$.*+?()[\]{}|]/g,YT=/^\[object .+?Constructor\]$/,KT=Function.prototype,JT=Object.prototype,RT=KT.toString,ZT=JT.hasOwnProperty,XT=RegExp("^"+RT.call(ZT).replace(qT,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function QT(e){if(!GT(e)||VT(e))return!1;var t=jT(e)?XT:YT;return t.test(HT(e))}var ew=QT;function tw(e,t){return e==null?void 0:e[t]}var nw=tw,rw=ew,iw=nw;function ow(e,t){var n=iw(e,t);return rw(n)?n:void 0}var Nr=ow,sw=Nr,aw=vn,lw=sw(aw,"DataView"),uw=lw,cw=Nr,fw=vn,dw=cw(fw,"Map"),Vl=dw,hw=Nr,pw=vn,gw=hw(pw,"Promise"),mw=gw,yw=Nr,vw=vn,bw=yw(vw,"Set"),Eh=bw,_w=Nr,Tw=vn,ww=_w(Tw,"WeakMap"),Sw=ww,Gl=uw,Hl=Vl,ql=mw,Yl=Eh,Kl=Sw,xh=oi,ai=Ch,Ah="[object Map]",Cw="[object Object]",Oh="[object Promise]",Ih="[object Set]",Ph="[object WeakMap]",$h="[object DataView]",Ew=ai(Gl),xw=ai(Hl),Aw=ai(ql),Ow=ai(Yl),Iw=ai(Kl),Lr=xh;(Gl&&Lr(new Gl(new ArrayBuffer(1)))!=$h||Hl&&Lr(new Hl)!=Ah||ql&&Lr(ql.resolve())!=Oh||Yl&&Lr(new Yl)!=Ih||Kl&&Lr(new Kl)!=Ph)&&(Lr=function(e){var t=xh(e),n=t==Cw?e.constructor:void 0,o=n?ai(n):"";if(o)switch(o){case Ew:return $h;case xw:return Ah;case Aw:return Oh;case Ow:return Ih;case Iw:return Ph}return t});var Pw=Lr,$w=oi,Mw=si,Fw="[object Arguments]";function Dw(e){return Mw(e)&&$w(e)==Fw}var kw=Dw,Mh=kw,Nw=si,Fh=Object.prototype,Lw=Fh.hasOwnProperty,Bw=Fh.propertyIsEnumerable,zw=Mh(function(){return arguments}())?Mh:function(e){return Nw(e)&&Lw.call(e,"callee")&&!Bw.call(e,"callee")},as=zw,Uw=Array.isArray,to=Uw,Ww=9007199254740991;function jw(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ww}var Dh=jw,Vw=Wl,Gw=Dh;function Hw(e){return e!=null&&Gw(e.length)&&!Vw(e)}var ls=Hw,us={exports:{}};function qw(){return!1}var Yw=qw;us.exports,function(e,t){var n=vn,o=Yw,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,p=d||o;e.exports=p}(us,us.exports);var Jl=us.exports,Kw=oi,Jw=Dh,Rw=si,Zw="[object Arguments]",Xw="[object Array]",Qw="[object Boolean]",eS="[object Date]",tS="[object Error]",nS="[object Function]",rS="[object Map]",iS="[object Number]",oS="[object Object]",sS="[object RegExp]",aS="[object Set]",lS="[object String]",uS="[object WeakMap]",cS="[object ArrayBuffer]",fS="[object DataView]",dS="[object Float32Array]",hS="[object Float64Array]",pS="[object Int8Array]",gS="[object Int16Array]",mS="[object Int32Array]",yS="[object Uint8Array]",vS="[object Uint8ClampedArray]",bS="[object Uint16Array]",_S="[object Uint32Array]",Qe={};Qe[dS]=Qe[hS]=Qe[pS]=Qe[gS]=Qe[mS]=Qe[yS]=Qe[vS]=Qe[bS]=Qe[_S]=!0,Qe[Zw]=Qe[Xw]=Qe[cS]=Qe[Qw]=Qe[fS]=Qe[eS]=Qe[tS]=Qe[nS]=Qe[rS]=Qe[iS]=Qe[oS]=Qe[sS]=Qe[aS]=Qe[lS]=Qe[uS]=!1;function TS(e){return Rw(e)&&Jw(e.length)&&!!Qe[Kw(e)]}var wS=TS;function SS(e){return function(t){return e(t)}}var CS=SS,cs={exports:{}};cs.exports,function(e,t){var n=dh,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}(cs,cs.exports);var ES=cs.exports,xS=wS,AS=CS,kh=ES,Nh=kh&&kh.isTypedArray,OS=Nh?AS(Nh):xS,Rl=OS,IS=xT,PS=Pw,$S=as,MS=to,FS=ls,DS=Jl,kS=ss,NS=Rl,LS="[object Map]",BS="[object Set]",zS=Object.prototype,US=zS.hasOwnProperty;function WS(e){if(e==null)return!0;if(FS(e)&&(MS(e)||typeof e=="string"||typeof e.splice=="function"||DS(e)||NS(e)||$S(e)))return!e.length;var t=PS(e);if(t==LS||t==BS)return!e.size;if(kS(e))return!IS(e).length;for(var n in e)if(US.call(e,n))return!1;return!0}var jS=WS;const Lh=rr(jS),VS=(e,t,n,o,s,a,u)=>e.map((c,d)=>h.jsx(b.Grid.Col,{span:s==="row"?12/e.length:12,style:{alignContent:"start"},children:h.jsx(Fe.JsonFormsDispatch,{uischema:c,schema:t,path:n,enabled:o,renderers:a,cells:u})},`${n}-${d}`)),GS=({elements:e,schema:t,path:n,enabled:o,direction:s,renderers:a,cells:u})=>Lh(e)?null:h.jsx(b.Grid,{spacing:s==="row"?2:0,children:VS(e,t,n,o,s,a,u)}),fs=x.memo(GS);function Zl(e){return new Date(e.getTime()-e.getTimezoneOffset()*6e4).toISOString()}function Bh(e){const t=new Date(e);return new Date(t.getTime()+t.getTimezoneOffset()*6e4)}function In(e={}){const t=b.useProps("__",{},{});let n=null;return ar(e.schema.type,"null")||(ar(e.schema.type,"array")?n=[]:ar(e.schema.type,"object")?n={}:ar(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(`
130
- `).map(o=>h.jsx("span",{style:{display:"block"},children:o},o)):void 0}}function bn(e,t,n,o){const{specialKey:s}=Oe(),a=b.useProps((s==null?void 0:s.all)||"all",{},{}),u=b.useProps(e,{},{}),c=b.useProps(t,{},{}),{component:d,props:p}=x.useMemo(()=>xn(a,u,c),[u,a,c]);return[ct(d,{componentProps:n,jsonFormsProps:o}),{...n,...ct(p,{componentProps:n,jsonFormsProps:o})}]}function ds(e,t,{data:n,toggle:o,onChange:s}){const a=b.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?Bh(n):new Date(n):null,clearable:!0,onChange:c=>{c&&(e==="date"?c=Zl(c).split("T")[0]:t?c=Zl(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=h.jsxs(b.Group,{gap:"0.25rem",wrap:"nowrap",children:[h.jsx(b.CloseButton,{variant:"transparent",size:"sm",onClick:()=>s(void 0),style:{visibility:n?void 0:"hidden"}}),h.jsx(b.CloseButton,{title:t?"UTC":"Local",variant:"subtle",size:"sm",onClick:()=>{o(),n&&s(void 0)},icon:h.jsx(zl,{icon:"tabler:timezone",color:t?a.primaryColor:"gray"})})]}),u.rightSectionWidth="3.75rem"),u}function zh({data:e,onChange:t}){const[n,o]=x.useState(""),s=x.useMemo(()=>e?typeof e=="object"?JSON.stringify(e,null,2):e:"",[e]);return x.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 hs(e,t){return{data:x.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 Uh(e,t,{onChange:n}){const o=hs(e,t);return{...o,value:o.value||[],onChange:s=>s.length?n(s):n(void 0)}}function Wh(e,{data:t,onChange:n}){return{value:t||"",allowDecimal:e==="number",hideControls:!0,onChange:o=>n(typeof o=="string"?o||void 0:o??void 0)}}function jh({data:e,onChange:t}){return{value:e||"",onChange:n=>t(n.target.value||void 0)}}function Xl(e){const t=In(e),{path:n,data:o,schema:s}=e,a=x.useMemo(()=>s.format==="checkbox",[s.format]),u=fh(a,{data:o,onChange:t.onChange}),c=x.useMemo(()=>({...t,...u}),[u,t]),[d,p]=bn("Boolean",n,c,e);return d===void 0?a?h.jsx(b.Checkbox,{...p}):h.jsx(b.Select,{...p}):d}function Ql(e){const t=In(e),{path:n,data:o}=e,s=ds("date",!0,{data:o,onChange:t.onChange}),a=x.useMemo(()=>({...t,...s}),[t,s]),[u,c]=bn("Date",n,a,e);return u===void 0?h.jsx(Gi.DateInput,{...c}):u}function eu(e){const t=In(e),{path:n,data:o}=e,s=ds("date-time",!1,{data:o,toggle:()=>null,onChange:t.onChange}),[,{initialUTC:a}]=bn("DateTime",n,{...t,...s},e),[u,{toggle:c}]=Le.useDisclosure(a),{initialUTC:d,...p}=ds("date-time",u,{data:o,toggle:c,onChange:t.onChange}),y=x.useMemo(()=>({...t,...p}),[t,p]),[g,_]=bn("DateTime",n,y,e);return g===void 0?h.jsx(Gi.DateTimePicker,{..._}):g}function Vh(e){const t=In(e),{path:n,data:o}=e,s=Uh(o,e.schema.items,{onChange:t.onChange}),a=x.useMemo(()=>({...t,...s}),[t,s]),[u,c]=bn("EnumArray",n,a,e);return u===void 0?h.jsx(b.MultiSelect,{...c}):u}function tu(e){const t=In(e),{path:n,data:o}=e,s=hs(o,e.schema),a=x.useMemo(()=>({...t,...s}),[t,s]),[u,c]=bn("Enum",n,a,e);return u===void 0?h.jsx(b.Select,{...c}):u}function Gh(e){const t=In(e),{path:n,data:o}=e,s=zh({data:o,onChange:t.onChange}),a=x.useMemo(()=>({...t,...s}),[t,s]),[u,c]=bn("Text",n,a,e);return u===void 0?h.jsx(b.JsonInput,{...c}):u}function no(e){const t=In(e),{path:n,data:o}=e,s=Wh("number",{data:o,onChange:t.onChange}),a=x.useMemo(()=>({...t,...s}),[t,s]),[u,c]=bn("Number",n,a,e);return u===void 0?h.jsx(b.NumberInput,{...c}):u}var ps={exports:{}};/**
129
+ */var B1=Te("outline","dots","IconDots",[["path",{d:"M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]]);/**
130
+ * @license @tabler/icons-react v3.18.0 - MIT
131
+ *
132
+ * This source code is licensed under the MIT license.
133
+ * See the LICENSE file in the root directory of this source tree.
134
+ */var V1=Te("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"}]]);/**
135
+ * @license @tabler/icons-react v3.18.0 - MIT
136
+ *
137
+ * This source code is licensed under the MIT license.
138
+ * See the LICENSE file in the root directory of this source tree.
139
+ */var $1=Te("outline","edit","IconEdit",[["path",{d:"M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1",key:"svg-0"}],["path",{d:"M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415z",key:"svg-1"}],["path",{d:"M16 5l3 3",key:"svg-2"}]]);/**
140
+ * @license @tabler/icons-react v3.18.0 - MIT
141
+ *
142
+ * This source code is licensed under the MIT license.
143
+ * See the LICENSE file in the root directory of this source tree.
144
+ */var H1=Te("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"}]]);/**
145
+ * @license @tabler/icons-react v3.18.0 - MIT
146
+ *
147
+ * This source code is licensed under the MIT license.
148
+ * See the LICENSE file in the root directory of this source tree.
149
+ */var j1=Te("outline","eye-off","IconEyeOff",[["path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828",key:"svg-0"}],["path",{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87",key:"svg-1"}],["path",{d:"M3 3l18 18",key:"svg-2"}]]);/**
150
+ * @license @tabler/icons-react v3.18.0 - MIT
151
+ *
152
+ * This source code is licensed under the MIT license.
153
+ * See the LICENSE file in the root directory of this source tree.
154
+ */var q1=Te("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"}]]);/**
155
+ * @license @tabler/icons-react v3.18.0 - MIT
156
+ *
157
+ * This source code is licensed under the MIT license.
158
+ * See the LICENSE file in the root directory of this source tree.
159
+ */var G1=Te("outline","file-type-csv","IconFileTypeCsv",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4",key:"svg-1"}],["path",{d:"M7 16.5a1.5 1.5 0 0 0 -3 0v3a1.5 1.5 0 0 0 3 0",key:"svg-2"}],["path",{d:"M10 20.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75",key:"svg-3"}],["path",{d:"M16 15l2 6l2 -6",key:"svg-4"}]]);/**
160
+ * @license @tabler/icons-react v3.18.0 - MIT
161
+ *
162
+ * This source code is licensed under the MIT license.
163
+ * See the LICENSE file in the root directory of this source tree.
164
+ */var Jh=Te("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"}]]);/**
165
+ * @license @tabler/icons-react v3.18.0 - MIT
166
+ *
167
+ * This source code is licensed under the MIT license.
168
+ * See the LICENSE file in the root directory of this source tree.
169
+ */var U1=Te("outline","filter-off","IconFilterOff",[["path",{d:"M8 4h12v2.172a2 2 0 0 1 -.586 1.414l-3.914 3.914m-.5 3.5v4l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227",key:"svg-0"}],["path",{d:"M3 3l18 18",key:"svg-1"}]]);/**
170
+ * @license @tabler/icons-react v3.18.0 - MIT
171
+ *
172
+ * This source code is licensed under the MIT license.
173
+ * See the LICENSE file in the root directory of this source tree.
174
+ */var ta=Te("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"}]]);/**
175
+ * @license @tabler/icons-react v3.18.0 - MIT
176
+ *
177
+ * This source code is licensed under the MIT license.
178
+ * See the LICENSE file in the root directory of this source tree.
179
+ */var W1=Te("outline","grip-horizontal","IconGripHorizontal",[["path",{d:"M5 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M5 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M12 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}],["path",{d:"M12 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-3"}],["path",{d:"M19 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-4"}],["path",{d:"M19 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-5"}]]);/**
180
+ * @license @tabler/icons-react v3.18.0 - MIT
181
+ *
182
+ * This source code is licensed under the MIT license.
183
+ * See the LICENSE file in the root directory of this source tree.
184
+ */var K1=Te("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"}]]);/**
185
+ * @license @tabler/icons-react v3.18.0 - MIT
186
+ *
187
+ * This source code is licensed under the MIT license.
188
+ * See the LICENSE file in the root directory of this source tree.
189
+ */var J1=Te("outline","info-circle","IconInfoCircle",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 9h.01",key:"svg-1"}],["path",{d:"M11 12h1v4h1",key:"svg-2"}]]);/**
190
+ * @license @tabler/icons-react v3.18.0 - MIT
191
+ *
192
+ * This source code is licensed under the MIT license.
193
+ * See the LICENSE file in the root directory of this source tree.
194
+ */var Yh=Te("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"}]]);/**
195
+ * @license @tabler/icons-react v3.18.0 - MIT
196
+ *
197
+ * This source code is licensed under the MIT license.
198
+ * See the LICENSE file in the root directory of this source tree.
199
+ */var Y1=Te("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"}]]);/**
200
+ * @license @tabler/icons-react v3.18.0 - MIT
201
+ *
202
+ * This source code is licensed under the MIT license.
203
+ * See the LICENSE file in the root directory of this source tree.
204
+ */var Z1=Te("outline","maximize","IconMaximize",[["path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2",key:"svg-0"}],["path",{d:"M4 16v2a2 2 0 0 0 2 2h2",key:"svg-1"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v2",key:"svg-2"}],["path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2",key:"svg-3"}]]);/**
205
+ * @license @tabler/icons-react v3.18.0 - MIT
206
+ *
207
+ * This source code is licensed under the MIT license.
208
+ * See the LICENSE file in the root directory of this source tree.
209
+ */var X1=Te("outline","minimize","IconMinimize",[["path",{d:"M15 19v-2a2 2 0 0 1 2 -2h2",key:"svg-0"}],["path",{d:"M15 5v2a2 2 0 0 0 2 2h2",key:"svg-1"}],["path",{d:"M5 15h2a2 2 0 0 1 2 2v2",key:"svg-2"}],["path",{d:"M5 9h2a2 2 0 0 0 2 -2v-2",key:"svg-3"}]]);/**
210
+ * @license @tabler/icons-react v3.18.0 - MIT
211
+ *
212
+ * This source code is licensed under the MIT license.
213
+ * See the LICENSE file in the root directory of this source tree.
214
+ */var Q1=Te("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"}]]);/**
215
+ * @license @tabler/icons-react v3.18.0 - MIT
216
+ *
217
+ * This source code is licensed under the MIT license.
218
+ * See the LICENSE file in the root directory of this source tree.
219
+ */var eT=Te("outline","pinned-off","IconPinnedOff",[["path",{d:"M3 3l18 18",key:"svg-0"}],["path",{d:"M15 4.5l-3.249 3.249m-2.57 1.433l-2.181 .818l-1.5 1.5l7 7l1.5 -1.5l.82 -2.186m1.43 -2.563l3.25 -3.251",key:"svg-1"}],["path",{d:"M9 15l-4.5 4.5",key:"svg-2"}],["path",{d:"M14.5 4l5.5 5.5",key:"svg-3"}]]);/**
220
+ * @license @tabler/icons-react v3.18.0 - MIT
221
+ *
222
+ * This source code is licensed under the MIT license.
223
+ * See the LICENSE file in the root directory of this source tree.
224
+ */var tT=Te("outline","pinned","IconPinned",[["path",{d:"M9 4v6l-2 4v2h10v-2l-2 -4v-6",key:"svg-0"}],["path",{d:"M12 16l0 5",key:"svg-1"}],["path",{d:"M8 4l8 0",key:"svg-2"}]]);/**
225
+ * @license @tabler/icons-react v3.18.0 - MIT
226
+ *
227
+ * This source code is licensed under the MIT license.
228
+ * See the LICENSE file in the root directory of this source tree.
229
+ */var na=Te("outline","plus","IconPlus",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]]);/**
230
+ * @license @tabler/icons-react v3.18.0 - MIT
231
+ *
232
+ * This source code is licensed under the MIT license.
233
+ * See the LICENSE file in the root directory of this source tree.
234
+ */var Zh=Te("outline","quote","IconQuote",[["path",{d:"M10 11h-4a1 1 0 0 1 -1 -1v-3a1 1 0 0 1 1 -1h3a1 1 0 0 1 1 1v6c0 2.667 -1.333 4.333 -4 5",key:"svg-0"}],["path",{d:"M19 11h-4a1 1 0 0 1 -1 -1v-3a1 1 0 0 1 1 -1h3a1 1 0 0 1 1 1v6c0 2.667 -1.333 4.333 -4 5",key:"svg-1"}]]);/**
235
+ * @license @tabler/icons-react v3.18.0 - MIT
236
+ *
237
+ * This source code is licensed under the MIT license.
238
+ * See the LICENSE file in the root directory of this source tree.
239
+ */var nT=Te("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"}]]);/**
240
+ * @license @tabler/icons-react v3.18.0 - MIT
241
+ *
242
+ * This source code is licensed under the MIT license.
243
+ * See the LICENSE file in the root directory of this source tree.
244
+ */var rT=Te("outline","search-off","IconSearchOff",[["path",{d:"M5.039 5.062a7 7 0 0 0 9.91 9.89m1.584 -2.434a7 7 0 0 0 -9.038 -9.057",key:"svg-0"}],["path",{d:"M3 3l18 18",key:"svg-1"}]]);/**
245
+ * @license @tabler/icons-react v3.18.0 - MIT
246
+ *
247
+ * This source code is licensed under the MIT license.
248
+ * See the LICENSE file in the root directory of this source tree.
249
+ */var iT=Te("outline","search","IconSearch",[["path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]]);/**
250
+ * @license @tabler/icons-react v3.18.0 - MIT
251
+ *
252
+ * This source code is licensed under the MIT license.
253
+ * See the LICENSE file in the root directory of this source tree.
254
+ */var Xh=Te("outline","separator-vertical","IconSeparatorVertical",[["path",{d:"M12 4l0 16",key:"svg-0"}],["path",{d:"M8 8l-4 4l4 4",key:"svg-1"}],["path",{d:"M16 16l4 -4l-4 -4",key:"svg-2"}]]);/**
255
+ * @license @tabler/icons-react v3.18.0 - MIT
256
+ *
257
+ * This source code is licensed under the MIT license.
258
+ * See the LICENSE file in the root directory of this source tree.
259
+ */var oT=Te("outline","sort-ascending","IconSortAscending",[["path",{d:"M4 6l7 0",key:"svg-0"}],["path",{d:"M4 12l7 0",key:"svg-1"}],["path",{d:"M4 18l9 0",key:"svg-2"}],["path",{d:"M15 9l3 -3l3 3",key:"svg-3"}],["path",{d:"M18 6l0 12",key:"svg-4"}]]);/**
260
+ * @license @tabler/icons-react v3.18.0 - MIT
261
+ *
262
+ * This source code is licensed under the MIT license.
263
+ * See the LICENSE file in the root directory of this source tree.
264
+ */var lT=Te("outline","sort-descending","IconSortDescending",[["path",{d:"M4 6l9 0",key:"svg-0"}],["path",{d:"M4 12l7 0",key:"svg-1"}],["path",{d:"M4 18l7 0",key:"svg-2"}],["path",{d:"M15 15l3 3l3 -3",key:"svg-3"}],["path",{d:"M18 6l0 12",key:"svg-4"}]]);/**
265
+ * @license @tabler/icons-react v3.18.0 - MIT
266
+ *
267
+ * This source code is licensed under the MIT license.
268
+ * See the LICENSE file in the root directory of this source tree.
269
+ */var ra=Te("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"}]]);/**
270
+ * @license @tabler/icons-react v3.18.0 - MIT
271
+ *
272
+ * This source code is licensed under the MIT license.
273
+ * See the LICENSE file in the root directory of this source tree.
274
+ */var sT=Te("outline","upload","IconUpload",[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 9l5 -5l5 5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]]);/**
275
+ * @license @tabler/icons-react v3.18.0 - MIT
276
+ *
277
+ * This source code is licensed under the MIT license.
278
+ * See the LICENSE file in the root directory of this source tree.
279
+ */var aT=Te("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"}]]);/**
280
+ * @license @tabler/icons-react v3.18.0 - MIT
281
+ *
282
+ * This source code is licensed under the MIT license.
283
+ * See the LICENSE file in the root directory of this source tree.
284
+ */var ia=Te("outline","x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);function mr(e){const n={variant:"transparent",size:"lg",c:"gray",className:"toolbarActionIcon"},t=b.useProps("ActionIcon",n,e);return I.useMemo(()=>({...t,...e}),[t,e])}function uT(e,{autoInvoke:n=!0,initialLoading:t=!1,clearDataOnRefetch:r=!1,...o}={}){const[s,a]=I.useState(null),[u,f]=I.useState(t),[g,h]=I.useState(null),p=I.useRef(null),_=I.useCallback(()=>{if(e)return r&&a(null),h(null),p.current&&p.current.abort(),p.current=new AbortController,f(!0),fetch(e,{signal:p.current.signal,...o}).then(async y=>{const C=await y.json();if(!y.ok){const S=typeof C.detail=="string"?C.detail:JSON.stringify(C.detail,null,2);throw new Error(S)}return a(C),f(!1),C}).catch(y=>(y&&y.name!=="AbortError"&&(h(y),f(!1)),y))},[e]),v=I.useCallback(()=>{var y;p.current&&((y=p.current)==null||y.abort(""),f(!1))},[]);return I.useEffect(()=>(n&&_(),()=>{p.current&&p.current.abort("")}),[_,n]),{data:s,loading:u,error:g,refetch:_,abort:v}}function Qh(e){const n=I.useRef(!1);return I.useMemo(()=>e&&!n.current?(n.current=!0,!0):n.current,[e])}function ep({opened:e,onClose:n,handleAccept:t,handleReject:r}){return c.jsxs(b.Modal,{opened:e,onClose:n,"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(b.Group,{align:"right",mt:"xl",justify:"flex-end",children:[c.jsx(b.Button,{onClick:r,variant:"default",children:"Abbrechen"}),c.jsx(b.Button,{onClick:t,color:"red",children:"Löschen"})]})]})}const oa=I.memo(({id:e,...n})=>{const{refetch:t,refetchInfo:r,deleteEntry:o}=He(),[s,a]=I.useState(!1),u=mr({onClick:()=>a(!0),size:"sm",...n}),f=()=>a(!1),g=()=>o(e).then(h=>{h&&(t(),r())}).catch(()=>{}).finally(()=>a(!1));return c.jsxs(c.Fragment,{children:[c.jsx(b.Tooltip,{label:"Delete",children:c.jsx(b.ActionIcon,{...u,children:c.jsx(ra,{})})}),c.jsx(ep,{opened:s,onClose:f,handleAccept:g,handleReject:f})]})});oa.displayName="Delete";const la=I.memo(({id:e,...n})=>{const{getEntry:t}=He(),{setOpened:r,setItem:o}=Qn("edit"),[s,a]=je.useDebouncedState(!1,Nr),u=mr({onClick:()=>{a(!0),t(e).then(f=>{f&&(o(f),r(!0))}).catch(()=>{}).finally(()=>a(!1))},size:"sm",loading:s,...n});return c.jsx(c.Fragment,{children:c.jsx(b.Tooltip,{label:"Edit",children:c.jsx(b.ActionIcon,{...u,children:c.jsx(Q1,{})})})})});la.displayName="Edit";const tp=Object.freeze({left:0,top:0,width:16,height:16}),Wo=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),sa=Object.freeze({...tp,...Wo}),aa=Object.freeze({...sa,body:"",hidden:!1});function cT(e,n){const t={};!e.hFlip!=!n.hFlip&&(t.hFlip=!0),!e.vFlip!=!n.vFlip&&(t.vFlip=!0);const r=((e.rotate||0)+(n.rotate||0))%4;return r&&(t.rotate=r),t}function np(e,n){const t=cT(e,n);for(const r in aa)r in Wo?r in e&&!(r in t)&&(t[r]=Wo[r]):r in n?t[r]=n[r]:r in e&&(t[r]=e[r]);return t}function dT(e,n){const t=e.icons,r=e.aliases||Object.create(null),o=Object.create(null);function s(a){if(t[a])return o[a]=[];if(!(a in o)){o[a]=null;const u=r[a]&&r[a].parent,f=u&&s(u);f&&(o[a]=[u].concat(f))}return o[a]}return Object.keys(t).concat(Object.keys(r)).forEach(s),o}function fT(e,n,t){const r=e.icons,o=e.aliases||Object.create(null);let s={};function a(u){s=np(r[u]||o[u],s)}return a(n),t.forEach(a),np(e,s)}function rp(e,n){const t=[];if(typeof e!="object"||typeof e.icons!="object")return t;e.not_found instanceof Array&&e.not_found.forEach(o=>{n(o,null),t.push(o)});const r=dT(e);for(const o in r){const s=r[o];s&&(n(o,fT(e,o,s)),t.push(o))}return t}const gT={provider:"",aliases:{},not_found:{},...tp};function ua(e,n){for(const t in n)if(t in e&&typeof e[t]!=typeof n[t])return!1;return!0}function ip(e){if(typeof e!="object"||e===null)return null;const n=e;if(typeof n.prefix!="string"||!e.icons||typeof e.icons!="object"||!ua(e,gT))return null;const t=n.icons;for(const o in t){const s=t[o];if(!o||typeof s.body!="string"||!ua(s,aa))return null}const r=n.aliases||Object.create(null);for(const o in r){const s=r[o],a=s.parent;if(!o||typeof a!="string"||!t[a]&&!r[a]||!ua(s,aa))return null}return n}const op=/^[a-z0-9]+(-[a-z0-9]+)*$/,Ko=(e,n,t,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 u=o.pop(),f=o.pop(),g={provider:o.length>0?o[0]:r,prefix:f,name:u};return n&&!Jo(g)?null:g}const s=o[0],a=s.split("-");if(a.length>1){const u={provider:r,prefix:a.shift(),name:a.join("-")};return n&&!Jo(u)?null:u}if(t&&r===""){const u={provider:r,prefix:"",name:s};return n&&!Jo(u,t)?null:u}return null},Jo=(e,n)=>e?!!((n&&e.prefix===""||e.prefix)&&e.name):!1,lp=Object.create(null);function hT(e,n){return{provider:e,prefix:n,icons:Object.create(null),missing:new Set}}function si(e,n){const t=lp[e]||(lp[e]=Object.create(null));return t[n]||(t[n]=hT(e,n))}function sp(e,n){return ip(n)?rp(n,(t,r)=>{r?e.icons[t]=r:e.missing.add(t)}):[]}function pT(e,n,t){try{if(typeof t.body=="string")return e.icons[n]={...t},!0}catch{}return!1}let Bi=!1;function ap(e){return typeof e=="boolean"&&(Bi=e),Bi}function up(e){const n=typeof e=="string"?Ko(e,!0,Bi):e;if(n){const t=si(n.provider,n.prefix),r=n.name;return t.icons[r]||(t.missing.has(r)?null:void 0)}}function vT(e,n){const t=Ko(e,!0,Bi);if(!t)return!1;const r=si(t.provider,t.prefix);return n?pT(r,t.name,n):(r.missing.add(t.name),!0)}function mT(e,n){if(typeof e!="object")return!1;if(typeof n!="string"&&(n=e.provider||""),Bi&&!n&&!e.prefix){let o=!1;return ip(e)&&(e.prefix="",rp(e,(s,a)=>{vT(s,a)&&(o=!0)})),o}const t=e.prefix;if(!Jo({prefix:t,name:"a"}))return!1;const r=si(n,t);return!!sp(r,e)}const cp=Object.freeze({width:null,height:null}),dp=Object.freeze({...cp,...Wo}),_T=/(-?[0-9.]*[0-9]+[0-9.]*)/g,bT=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function fp(e,n,t){if(n===1)return e;if(t=t||100,typeof e=="number")return Math.ceil(e*n*t)/t;if(typeof e!="string")return e;const r=e.split(_T);if(r===null||!r.length)return e;const o=[];let s=r.shift(),a=bT.test(s);for(;;){if(a){const u=parseFloat(s);isNaN(u)?o.push(s):o.push(Math.ceil(u*n*t)/t)}else o.push(s);if(s=r.shift(),s===void 0)return o.join("");a=!a}}function yT(e,n="defs"){let t="";const r=e.indexOf("<"+n);for(;r>=0;){const o=e.indexOf(">",r),s=e.indexOf("</"+n);if(o===-1||s===-1)break;const a=e.indexOf(">",s);if(a===-1)break;t+=e.slice(o+1,s).trim(),e=e.slice(0,r).trim()+e.slice(a+1)}return{defs:t,content:e}}function wT(e,n){return e?"<defs>"+e+"</defs>"+n:n}function CT(e,n,t){const r=yT(e);return wT(r.defs,n+r.content+t)}const ST=e=>e==="unset"||e==="undefined"||e==="none";function TT(e,n){const t={...sa,...e},r={...dp,...n},o={left:t.left,top:t.top,width:t.width,height:t.height};let s=t.body;[t,r].forEach(C=>{const S=[],T=C.hFlip,E=C.vFlip;let F=C.rotate;T?E?F+=2:(S.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),S.push("scale(-1 1)"),o.top=o.left=0):E&&(S.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),S.push("scale(1 -1)"),o.top=o.left=0);let L;switch(F<0&&(F-=Math.floor(F/4)*4),F=F%4,F){case 1:L=o.height/2+o.top,S.unshift("rotate(90 "+L.toString()+" "+L.toString()+")");break;case 2:S.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:L=o.width/2+o.left,S.unshift("rotate(-90 "+L.toString()+" "+L.toString()+")");break}F%2===1&&(o.left!==o.top&&(L=o.left,o.left=o.top,o.top=L),o.width!==o.height&&(L=o.width,o.width=o.height,o.height=L)),S.length&&(s=CT(s,'<g transform="'+S.join(" ")+'">',"</g>"))});const a=r.width,u=r.height,f=o.width,g=o.height;let h,p;a===null?(p=u===null?"1em":u==="auto"?g:u,h=fp(p,f/g)):(h=a==="auto"?f:a,p=u===null?fp(h,g/f):u==="auto"?g:u);const _={},v=(C,S)=>{ST(S)||(_[C]=S.toString())};v("width",h),v("height",p);const y=[o.left,o.top,f,g];return _.viewBox=y.join(" "),{attributes:_,viewBox:y,body:s}}const IT=/\sid="(\S+)"/g,MT="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let xT=0;function ET(e,n=MT){const t=[];let r;for(;r=IT.exec(e);)t.push(r[1]);if(!t.length)return e;const o="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(s=>{const a=typeof n=="function"?n(s):n+(xT++).toString(),u=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+u+')([")]|\\.[a-z])',"g"),"$1"+a+o+"$3")}),e=e.replace(new RegExp(o,"g"),""),e}const ca=Object.create(null);function FT(e,n){ca[e]=n}function da(e){return ca[e]||ca[""]}function fa(e){let n;if(typeof e.resources=="string")n=[e.resources];else if(n=e.resources,!(n instanceof Array)||!n.length)return null;return{resources:n,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 ga=Object.create(null),Vi=["https://api.simplesvg.com","https://api.unisvg.com"],Yo=[];for(;Vi.length>0;)Vi.length===1||Math.random()>.5?Yo.push(Vi.shift()):Yo.push(Vi.pop());ga[""]=fa({resources:["https://api.iconify.design"].concat(Yo)});function AT(e,n){const t=fa(n);return t===null?!1:(ga[e]=t,!0)}function ha(e){return ga[e]}let gp=(()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}})();function OT(e,n){const t=ha(e);if(!t)return 0;let r;if(!t.maxURL)r=0;else{let o=0;t.resources.forEach(a=>{o=Math.max(o,a.length)});const s=n+".json?icons=";r=t.maxURL-o-t.path.length-s.length}return r}function PT(e){return e===404}const DT=(e,n,t)=>{const r=[],o=OT(e,n),s="icons";let a={type:s,provider:e,prefix:n,icons:[]},u=0;return t.forEach((f,g)=>{u+=f.length+1,u>=o&&g>0&&(r.push(a),a={type:s,provider:e,prefix:n,icons:[]},u=f.length),a.icons.push(f)}),r.push(a),r};function kT(e){if(typeof e=="string"){const n=ha(e);if(n)return n.path}return"/"}const LT={prepare:DT,send:(e,n,t)=>{if(!gp){t("abort",424);return}let r=kT(n.provider);switch(n.type){case"icons":{const s=n.prefix,u=n.icons.join(","),f=new URLSearchParams({icons:u});r+=s+".json?"+f.toString();break}case"custom":{const s=n.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:t("abort",400);return}let o=503;gp(e+r).then(s=>{const a=s.status;if(a!==200){setTimeout(()=>{t(PT(a)?"abort":"next",a)});return}return o=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?t("abort",s):t("next",o)});return}setTimeout(()=>{t("success",s)})}).catch(()=>{t("next",o)})}};function NT(e){const n={loaded:[],missing:[],pending:[]},t=Object.create(null);e.sort((o,s)=>o.provider!==s.provider?o.provider.localeCompare(s.provider):o.prefix!==s.prefix?o.prefix.localeCompare(s.prefix):o.name.localeCompare(s.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 s=o.provider,a=o.prefix,u=o.name,f=t[s]||(t[s]=Object.create(null)),g=f[a]||(f[a]=si(s,a));let h;u in g.icons?h=n.loaded:a===""||g.missing.has(u)?h=n.missing:h=n.pending;const p={provider:s,prefix:a,name:u};h.push(p)}),n}function hp(e,n){e.forEach(t=>{const r=t.loaderCallbacks;r&&(t.loaderCallbacks=r.filter(o=>o.id!==n))})}function zT(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const n=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!n.length)return;let t=!1;const r=e.provider,o=e.prefix;n.forEach(s=>{const a=s.icons,u=a.pending.length;a.pending=a.pending.filter(f=>{if(f.prefix!==o)return!0;const g=f.name;if(e.icons[g])a.loaded.push({provider:r,prefix:o,name:g});else if(e.missing.has(g))a.missing.push({provider:r,prefix:o,name:g});else return t=!0,!0;return!1}),a.pending.length!==u&&(t||hp([e],s.id),s.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),s.abort))})}))}let RT=0;function BT(e,n,t){const r=RT++,o=hp.bind(null,t,r);if(!n.pending.length)return o;const s={id:r,icons:n,callback:e,abort:o};return t.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(s)}),o}function VT(e,n=!0,t=!1){const r=[];return e.forEach(o=>{const s=typeof o=="string"?Ko(o,n,t):o;s&&r.push(s)}),r}var $T={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function HT(e,n,t,r){const o=e.resources.length,s=e.random?Math.floor(Math.random()*o):e.index;let a;if(e.random){let P=e.resources.slice(0);for(a=[];P.length>1;){const k=Math.floor(Math.random()*P.length);a.push(P[k]),P=P.slice(0,k).concat(P.slice(k+1))}a=a.concat(P)}else a=e.resources.slice(s).concat(e.resources.slice(0,s));const u=Date.now();let f="pending",g=0,h,p=null,_=[],v=[];typeof r=="function"&&v.push(r);function y(){p&&(clearTimeout(p),p=null)}function C(){f==="pending"&&(f="aborted"),y(),_.forEach(P=>{P.status==="pending"&&(P.status="aborted")}),_=[]}function S(P,k){k&&(v=[]),typeof P=="function"&&v.push(P)}function T(){return{startTime:u,payload:n,status:f,queriesSent:g,queriesPending:_.length,subscribe:S,abort:C}}function E(){f="failed",v.forEach(P=>{P(void 0,h)})}function F(){_.forEach(P=>{P.status==="pending"&&(P.status="aborted")}),_=[]}function L(P,k,z){const j=k!=="success";switch(_=_.filter($=>$!==P),f){case"pending":break;case"failed":if(j||!e.dataAfterTimeout)return;break;default:return}if(k==="abort"){h=z,E();return}if(j){h=z,_.length||(a.length?O():E());return}if(y(),F(),!e.random){const $=e.resources.indexOf(P.resource);$!==-1&&$!==e.index&&(e.index=$)}f="completed",v.forEach($=>{$(z)})}function O(){if(f!=="pending")return;y();const P=a.shift();if(P===void 0){if(_.length){p=setTimeout(()=>{y(),f==="pending"&&(F(),E())},e.timeout);return}E();return}const k={status:"pending",resource:P,callback:(z,j)=>{L(k,z,j)}};_.push(k),g++,p=setTimeout(O,e.rotate),t(P,n,k.callback)}return setTimeout(O),T}function pp(e){const n={...$T,...e};let t=[];function r(){t=t.filter(u=>u().status==="pending")}function o(u,f,g){const h=HT(n,u,f,(p,_)=>{r(),g&&g(p,_)});return t.push(h),h}function s(u){return t.find(f=>u(f))||null}return{query:o,find:s,setIndex:u=>{n.index=u},getIndex:()=>n.index,cleanup:r}}function vp(){}const pa=Object.create(null);function jT(e){if(!pa[e]){const n=ha(e);if(!n)return;const t=pp(n),r={config:n,redundancy:t};pa[e]=r}return pa[e]}function qT(e,n,t){let r,o;if(typeof e=="string"){const s=da(e);if(!s)return t(void 0,424),vp;o=s.send;const a=jT(e);a&&(r=a.redundancy)}else{const s=fa(e);if(s){r=pp(s);const a=e.resources?e.resources[0]:"",u=da(a);u&&(o=u.send)}}return!r||!o?(t(void 0,424),vp):r.query(n,o,t)().abort}function mp(){}function GT(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,zT(e)}))}function UT(e){const n=[],t=[];return e.forEach(r=>{(r.match(op)?n:t).push(r)}),{valid:n,invalid:t}}function $i(e,n,t){function r(){const o=e.pendingIcons;n.forEach(s=>{o&&o.delete(s),e.icons[s]||e.missing.add(s)})}if(t&&typeof t=="object")try{if(!sp(e,t).length){r();return}}catch(o){console.error(o)}r(),GT(e)}function _p(e,n){e instanceof Promise?e.then(t=>{n(t)}).catch(()=>{n(null)}):n(e)}function WT(e,n){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(n).sort():e.iconsToLoad=n,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:t,prefix:r}=e,o=e.iconsToLoad;if(delete e.iconsToLoad,!o||!o.length)return;const s=e.loadIcon;if(e.loadIcons&&(o.length>1||!s)){_p(e.loadIcons(o,r,t),h=>{$i(e,o,h)});return}if(s){o.forEach(h=>{const p=s(h,r,t);_p(p,_=>{const v=_?{prefix:r,icons:{[h]:_}}:null;$i(e,[h],v)})});return}const{valid:a,invalid:u}=UT(o);if(u.length&&$i(e,u,null),!a.length)return;const f=r.match(op)?da(t):null;if(!f){$i(e,a,null);return}f.prepare(t,r,a).forEach(h=>{qT(t,h,p=>{$i(e,h.icons,p)})})}))}const KT=(e,n)=>{const t=VT(e,!0,ap()),r=NT(t);if(!r.pending.length){let f=!0;return n&&setTimeout(()=>{f&&n(r.loaded,r.missing,r.pending,mp)}),()=>{f=!1}}const o=Object.create(null),s=[];let a,u;return r.pending.forEach(f=>{const{provider:g,prefix:h}=f;if(h===u&&g===a)return;a=g,u=h,s.push(si(g,h));const p=o[g]||(o[g]=Object.create(null));p[h]||(p[h]=[])}),r.pending.forEach(f=>{const{provider:g,prefix:h,name:p}=f,_=si(g,h),v=_.pendingIcons||(_.pendingIcons=new Set);v.has(p)||(v.add(p),o[g][h].push(p))}),s.forEach(f=>{const g=o[f.provider][f.prefix];g.length&&WT(f,g)}),n?BT(n,r,s):mp};function JT(e,n){const t={...e};for(const r in n){const o=n[r],s=typeof o;r in cp?(o===null||o&&(s==="string"||s==="number"))&&(t[r]=o):s===typeof t[r]&&(t[r]=r==="rotate"?o%4:o)}return t}const YT=/[\s,]+/;function ZT(e,n){n.split(YT).forEach(t=>{switch(t.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function XT(e,n=0){const t=e.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(t===""){const o=parseInt(e);return isNaN(o)?0:r(o)}else if(t!==e){let o=0;switch(t){case"%":o=25;break;case"deg":o=90}if(o){let s=parseFloat(e.slice(0,e.length-t.length));return isNaN(s)?0:(s=s/o,s%1===0?r(s):0)}}return n}function QT(e,n){let t=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in n)t+=" "+r+'="'+n[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+t+">"+e+"</svg>"}function eI(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function tI(e){return"data:image/svg+xml,"+eI(e)}function nI(e){return'url("'+tI(e)+'")'}let Hi;function rI(){try{Hi=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Hi=null}}function iI(e){return Hi===void 0&&rI(),Hi?Hi.createHTML(e):e}const bp={...dp,inline:!1},oI={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},lI={display:"inline-block"},va={backgroundColor:"currentColor"},yp={backgroundColor:"transparent"},wp={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Cp={WebkitMask:va,mask:va,background:yp};for(const e in Cp){const n=Cp[e];for(const t in wp)n[e+t]=wp[t]}const sI={...bp,inline:!0};function Sp(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const aI=(e,n,t)=>{const r=n.inline?sI:bp,o=JT(r,n),s=n.mode||"svg",a={},u=n.style||{},f={...s==="svg"?oI:{}};if(t){const S=Ko(t,!1,!0);if(S){const T=["iconify"],E=["provider","prefix"];for(const F of E)S[F]&&T.push("iconify--"+S[F]);f.className=T.join(" ")}}for(let S in n){const T=n[S];if(T!==void 0)switch(S){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":break;case"_ref":f.ref=T;break;case"className":f[S]=(f[S]?f[S]+" ":"")+T;break;case"inline":case"hFlip":case"vFlip":o[S]=T===!0||T==="true"||T===1;break;case"flip":typeof T=="string"&&ZT(o,T);break;case"color":a.color=T;break;case"rotate":typeof T=="string"?o[S]=XT(T):typeof T=="number"&&(o[S]=T);break;case"ariaHidden":case"aria-hidden":T!==!0&&T!=="true"&&delete f["aria-hidden"];break;default:r[S]===void 0&&(f[S]=T)}}const g=TT(e,o),h=g.attributes;if(o.inline&&(a.verticalAlign="-0.125em"),s==="svg"){f.style={...a,...u},Object.assign(f,h);let S=0,T=n.id;return typeof T=="string"&&(T=T.replace(/-/g,"_")),f.dangerouslySetInnerHTML={__html:iI(ET(g.body,T?()=>T+"ID"+S++:"iconifyReact"))},I.createElement("svg",f)}const{body:p,width:_,height:v}=e,y=s==="mask"||(s==="bg"?!1:p.indexOf("currentColor")!==-1),C=QT(p,{...h,width:_+"",height:v+""});return f.style={...a,"--svg":nI(C),width:Sp(h.width),height:Sp(h.height),...lI,...y?va:yp,...u},I.createElement("span",f)};if(ap(!0),FT("",LT),typeof document<"u"&&typeof window<"u"){const e=window;if(e.IconifyPreload!==void 0){const n=e.IconifyPreload,t="Invalid IconifyPreload syntax.";typeof n=="object"&&n!==null&&(n instanceof Array?n:[n]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!mT(r))&&console.error(t)}catch{console.error(t)}})}if(e.IconifyProviders!==void 0){const n=e.IconifyProviders;if(typeof n=="object"&&n!==null)for(let t in n){const r="IconifyProviders["+t+"] is invalid.";try{const o=n[t];if(typeof o!="object"||!o||o.resources===void 0)continue;AT(t,o)||console.error(r)}catch{console.error(r)}}}}function Tp(e){const[n,t]=I.useState(!!e.ssr),[r,o]=I.useState({});function s(v){if(v){const y=e.icon;if(typeof y=="object")return{name:"",data:y};const C=up(y);if(C)return{name:y,data:C}}return{name:""}}const[a,u]=I.useState(s(!!e.ssr));function f(){const v=r.callback;v&&(v(),o({}))}function g(v){if(JSON.stringify(a)!==JSON.stringify(v))return f(),u(v),!0}function h(){var v;const y=e.icon;if(typeof y=="object"){g({name:"",data:y});return}const C=up(y);if(g({name:y,data:C}))if(C===void 0){const S=KT([y],h);o({callback:S})}else C&&((v=e.onLoad)===null||v===void 0||v.call(e,y))}I.useEffect(()=>(t(!0),f),[]),I.useEffect(()=>{n&&h()},[e.icon,n]);const{name:p,data:_}=a;return _?aI({...sa,..._},e,p):e.children?e.children:e.fallback?e.fallback:I.createElement("span",{})}const ma=I.forwardRef((e,n)=>Tp({...e,_ref:n}));I.forwardRef((e,n)=>Tp({inline:!0,...e,_ref:n}));function Ip(e,{data:n,onChange:t}){return e?{checked:n||!1,onChange:r=>t(r.target.checked)}:{data:[{value:String(!0),label:"True"},{value:String(!1),label:"False"}],value:Li(n)?String(n):null,onChange:r=>t(Li(r)?r===String(!0):void 0)}}var _a,Mp;function tr(){if(Mp)return _a;Mp=1;function e(n){var t=typeof n;return n!=null&&(t=="object"||t=="function")}return _a=e,_a}var ba,xp;function Ep(){if(xp)return ba;xp=1;var e=typeof hr=="object"&&hr&&hr.Object===Object&&hr;return ba=e,ba}var ya,Fp;function An(){if(Fp)return ya;Fp=1;var e=Ep(),n=typeof self=="object"&&self&&self.Object===Object&&self,t=e||n||Function("return this")();return ya=t,ya}var wa,Ap;function uI(){if(Ap)return wa;Ap=1;var e=An(),n=function(){return e.Date.now()};return wa=n,wa}var Ca,Op;function cI(){if(Op)return Ca;Op=1;var e=/\s/;function n(t){for(var r=t.length;r--&&e.test(t.charAt(r)););return r}return Ca=n,Ca}var Sa,Pp;function dI(){if(Pp)return Sa;Pp=1;var e=cI(),n=/^\s+/;function t(r){return r&&r.slice(0,e(r)+1).replace(n,"")}return Sa=t,Sa}var Ta,Dp;function Zo(){if(Dp)return Ta;Dp=1;var e=An(),n=e.Symbol;return Ta=n,Ta}var Ia,kp;function fI(){if(kp)return Ia;kp=1;var e=Zo(),n=Object.prototype,t=n.hasOwnProperty,r=n.toString,o=e?e.toStringTag:void 0;function s(a){var u=t.call(a,o),f=a[o];try{a[o]=void 0;var g=!0}catch{}var h=r.call(a);return g&&(u?a[o]=f:delete a[o]),h}return Ia=s,Ia}var Ma,Lp;function gI(){if(Lp)return Ma;Lp=1;var e=Object.prototype,n=e.toString;function t(r){return n.call(r)}return Ma=t,Ma}var xa,Np;function ai(){if(Np)return xa;Np=1;var e=Zo(),n=fI(),t=gI(),r="[object Null]",o="[object Undefined]",s=e?e.toStringTag:void 0;function a(u){return u==null?u===void 0?o:r:s&&s in Object(u)?n(u):t(u)}return xa=a,xa}var Ea,zp;function ui(){if(zp)return Ea;zp=1;function e(n){return n!=null&&typeof n=="object"}return Ea=e,Ea}var Fa,Rp;function Bp(){if(Rp)return Fa;Rp=1;var e=ai(),n=ui(),t="[object Symbol]";function r(o){return typeof o=="symbol"||n(o)&&e(o)==t}return Fa=r,Fa}var Aa,Vp;function $p(){if(Vp)return Aa;Vp=1;var e=dI(),n=tr(),t=Bp(),r=NaN,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,a=/^0o[0-7]+$/i,u=parseInt;function f(g){if(typeof g=="number")return g;if(t(g))return r;if(n(g)){var h=typeof g.valueOf=="function"?g.valueOf():g;g=n(h)?h+"":h}if(typeof g!="string")return g===0?g:+g;g=e(g);var p=s.test(g);return p||a.test(g)?u(g.slice(2),p?2:8):o.test(g)?r:+g}return Aa=f,Aa}var Oa,Hp;function hI(){if(Hp)return Oa;Hp=1;var e=tr(),n=uI(),t=$p(),r="Expected a function",o=Math.max,s=Math.min;function a(u,f,g){var h,p,_,v,y,C,S=0,T=!1,E=!1,F=!0;if(typeof u!="function")throw new TypeError(r);f=t(f)||0,e(g)&&(T=!!g.leading,E="maxWait"in g,_=E?o(t(g.maxWait)||0,f):_,F="trailing"in g?!!g.trailing:F);function L(Z){var ne=h,ce=p;return h=p=void 0,S=Z,v=u.apply(ce,ne),v}function O(Z){return S=Z,y=setTimeout(z,f),T?L(Z):v}function P(Z){var ne=Z-C,ce=Z-S,q=f-ne;return E?s(q,_-ce):q}function k(Z){var ne=Z-C,ce=Z-S;return C===void 0||ne>=f||ne<0||E&&ce>=_}function z(){var Z=n();if(k(Z))return j(Z);y=setTimeout(z,P(Z))}function j(Z){return y=void 0,F&&h?L(Z):(h=p=void 0,v)}function $(){y!==void 0&&clearTimeout(y),S=0,h=C=p=y=void 0}function H(){return y===void 0?v:j(n())}function re(){var Z=n(),ne=k(Z);if(h=arguments,p=this,C=Z,ne){if(y===void 0)return O(C);if(E)return clearTimeout(y),y=setTimeout(z,f),L(C)}return y===void 0&&(y=setTimeout(z,f)),v}return re.cancel=$,re.flush=H,re}return Oa=a,Oa}var pI=hI();const vI=Rr(pI),mI=(e,n,t,r,o,s=300)=>{const[a,u]=I.useState(t??n);I.useEffect(()=>{u(t??n)},[t]);const f=I.useCallback(vI(p=>e(r,p),s),[e,r,s]),g=I.useCallback(p=>{const _=o(p);u(_??n),f(_)},[f,o]),h=I.useCallback(()=>{u(n),e(r,void 0)},[n,e,r]);return[a,g,h]};function _r(e,n){return e===n||Array.isArray(e)&&e.includes(n)}var Pa,jp;function Xo(){if(jp)return Pa;jp=1;var e=Object.prototype;function n(t){var r=t&&t.constructor,o=typeof r=="function"&&r.prototype||e;return t===o}return Pa=n,Pa}var Da,qp;function Gp(){if(qp)return Da;qp=1;function e(n,t){return function(r){return n(t(r))}}return Da=e,Da}var ka,Up;function _I(){if(Up)return ka;Up=1;var e=Gp(),n=e(Object.keys,Object);return ka=n,ka}var La,Wp;function bI(){if(Wp)return La;Wp=1;var e=Xo(),n=_I(),t=Object.prototype,r=t.hasOwnProperty;function o(s){if(!e(s))return n(s);var a=[];for(var u in Object(s))r.call(s,u)&&u!="constructor"&&a.push(u);return a}return La=o,La}var Na,Kp;function za(){if(Kp)return Na;Kp=1;var e=ai(),n=tr(),t="[object AsyncFunction]",r="[object Function]",o="[object GeneratorFunction]",s="[object Proxy]";function a(u){if(!n(u))return!1;var f=e(u);return f==r||f==o||f==t||f==s}return Na=a,Na}var Ra,Jp;function yI(){if(Jp)return Ra;Jp=1;var e=An(),n=e["__core-js_shared__"];return Ra=n,Ra}var Ba,Yp;function wI(){if(Yp)return Ba;Yp=1;var e=yI(),n=function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function t(r){return!!n&&n in r}return Ba=t,Ba}var Va,Zp;function Xp(){if(Zp)return Va;Zp=1;var e=Function.prototype,n=e.toString;function t(r){if(r!=null){try{return n.call(r)}catch{}try{return r+""}catch{}}return""}return Va=t,Va}var $a,Qp;function CI(){if(Qp)return $a;Qp=1;var e=za(),n=wI(),t=tr(),r=Xp(),o=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,a=Function.prototype,u=Object.prototype,f=a.toString,g=u.hasOwnProperty,h=RegExp("^"+f.call(g).replace(o,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function p(_){if(!t(_)||n(_))return!1;var v=e(_)?h:s;return v.test(r(_))}return $a=p,$a}var Ha,ev;function SI(){if(ev)return Ha;ev=1;function e(n,t){return n==null?void 0:n[t]}return Ha=e,Ha}var ja,tv;function $r(){if(tv)return ja;tv=1;var e=CI(),n=SI();function t(r,o){var s=n(r,o);return e(s)?s:void 0}return ja=t,ja}var qa,nv;function TI(){if(nv)return qa;nv=1;var e=$r(),n=An(),t=e(n,"DataView");return qa=t,qa}var Ga,rv;function Ua(){if(rv)return Ga;rv=1;var e=$r(),n=An(),t=e(n,"Map");return Ga=t,Ga}var Wa,iv;function II(){if(iv)return Wa;iv=1;var e=$r(),n=An(),t=e(n,"Promise");return Wa=t,Wa}var Ka,ov;function lv(){if(ov)return Ka;ov=1;var e=$r(),n=An(),t=e(n,"Set");return Ka=t,Ka}var Ja,sv;function MI(){if(sv)return Ja;sv=1;var e=$r(),n=An(),t=e(n,"WeakMap");return Ja=t,Ja}var Ya,av;function xI(){if(av)return Ya;av=1;var e=TI(),n=Ua(),t=II(),r=lv(),o=MI(),s=ai(),a=Xp(),u="[object Map]",f="[object Object]",g="[object Promise]",h="[object Set]",p="[object WeakMap]",_="[object DataView]",v=a(e),y=a(n),C=a(t),S=a(r),T=a(o),E=s;return(e&&E(new e(new ArrayBuffer(1)))!=_||n&&E(new n)!=u||t&&E(t.resolve())!=g||r&&E(new r)!=h||o&&E(new o)!=p)&&(E=function(F){var L=s(F),O=L==f?F.constructor:void 0,P=O?a(O):"";if(P)switch(P){case v:return _;case y:return u;case C:return g;case S:return h;case T:return p}return L}),Ya=E,Ya}var Za,uv;function EI(){if(uv)return Za;uv=1;var e=ai(),n=ui(),t="[object Arguments]";function r(o){return n(o)&&e(o)==t}return Za=r,Za}var Xa,cv;function Qo(){if(cv)return Xa;cv=1;var e=EI(),n=ui(),t=Object.prototype,r=t.hasOwnProperty,o=t.propertyIsEnumerable,s=e(function(){return arguments}())?e:function(a){return n(a)&&r.call(a,"callee")&&!o.call(a,"callee")};return Xa=s,Xa}var Qa,dv;function ji(){if(dv)return Qa;dv=1;var e=Array.isArray;return Qa=e,Qa}var eu,fv;function gv(){if(fv)return eu;fv=1;var e=9007199254740991;function n(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=e}return eu=n,eu}var tu,hv;function el(){if(hv)return tu;hv=1;var e=za(),n=gv();function t(r){return r!=null&&n(r.length)&&!e(r)}return tu=t,tu}var qi={exports:{}},nu,pv;function FI(){if(pv)return nu;pv=1;function e(){return!1}return nu=e,nu}qi.exports;var vv;function ru(){return vv||(vv=1,function(e,n){var t=An(),r=FI(),o=n&&!n.nodeType&&n,s=o&&!0&&e&&!e.nodeType&&e,a=s&&s.exports===o,u=a?t.Buffer:void 0,f=u?u.isBuffer:void 0,g=f||r;e.exports=g}(qi,qi.exports)),qi.exports}var iu,mv;function AI(){if(mv)return iu;mv=1;var e=ai(),n=gv(),t=ui(),r="[object Arguments]",o="[object Array]",s="[object Boolean]",a="[object Date]",u="[object Error]",f="[object Function]",g="[object Map]",h="[object Number]",p="[object Object]",_="[object RegExp]",v="[object Set]",y="[object String]",C="[object WeakMap]",S="[object ArrayBuffer]",T="[object DataView]",E="[object Float32Array]",F="[object Float64Array]",L="[object Int8Array]",O="[object Int16Array]",P="[object Int32Array]",k="[object Uint8Array]",z="[object Uint8ClampedArray]",j="[object Uint16Array]",$="[object Uint32Array]",H={};H[E]=H[F]=H[L]=H[O]=H[P]=H[k]=H[z]=H[j]=H[$]=!0,H[r]=H[o]=H[S]=H[s]=H[T]=H[a]=H[u]=H[f]=H[g]=H[h]=H[p]=H[_]=H[v]=H[y]=H[C]=!1;function re(Z){return t(Z)&&n(Z.length)&&!!H[e(Z)]}return iu=re,iu}var ou,_v;function OI(){if(_v)return ou;_v=1;function e(n){return function(t){return n(t)}}return ou=e,ou}var Gi={exports:{}};Gi.exports;var bv;function PI(){return bv||(bv=1,function(e,n){var t=Ep(),r=n&&!n.nodeType&&n,o=r&&!0&&e&&!e.nodeType&&e,s=o&&o.exports===r,a=s&&t.process,u=function(){try{var f=o&&o.require&&o.require("util").types;return f||a&&a.binding&&a.binding("util")}catch{}}();e.exports=u}(Gi,Gi.exports)),Gi.exports}var lu,yv;function su(){if(yv)return lu;yv=1;var e=AI(),n=OI(),t=PI(),r=t&&t.isTypedArray,o=r?n(r):e;return lu=o,lu}var au,wv;function DI(){if(wv)return au;wv=1;var e=bI(),n=xI(),t=Qo(),r=ji(),o=el(),s=ru(),a=Xo(),u=su(),f="[object Map]",g="[object Set]",h=Object.prototype,p=h.hasOwnProperty;function _(v){if(v==null)return!0;if(o(v)&&(r(v)||typeof v=="string"||typeof v.splice=="function"||s(v)||u(v)||t(v)))return!v.length;var y=n(v);if(y==f||y==g)return!v.size;if(a(v))return!e(v).length;for(var C in v)if(p.call(v,C))return!1;return!0}return au=_,au}var kI=DI();const Cv=Rr(kI),LI=(e,n,t,r,o,s,a)=>e.map((u,f)=>c.jsx(b.Grid.Col,{span:o==="row"?12/e.length:12,style:{alignContent:"start"},children:c.jsx(We.JsonFormsDispatch,{uischema:u,schema:n,path:t,enabled:r,renderers:s,cells:a})},`${t}-${f}`)),NI=({elements:e,schema:n,path:t,enabled:r,direction:o,renderers:s,cells:a})=>Cv(e)?null:c.jsx(b.Grid,{spacing:o==="row"?2:0,children:LI(e,n,t,r,o,s,a)}),tl=I.memo(NI);function uu(e){return new Date(e.getTime()-e.getTimezoneOffset()*6e4).toISOString()}function Sv(e){const n=new Date(e);return new Date(n.getTime()+n.getTimezoneOffset()*6e4)}function jn(e={}){const n=b.useProps("__",{},{});let t=null;return _r(e.schema.type,"null")||(_r(e.schema.type,"array")?t=[]:_r(e.schema.type,"object")?t={}:_r(e.schema.type,"string")&&(t="")),{inputWrapperOrder:["label","input","description","error"],label:e.label,description:e.description,required:e.required,disabled:!e.enabled,onChange:r=>e.handleChange(e.path,r??(n.setNull?t:void 0)),error:e.errors?e.errors.split(`
285
+ `).map(r=>c.jsx("span",{style:{display:"block"},children:r},r)):void 0}}function On(e,n,t,r){const{specialKey:o}=He(),s=b.useProps((o==null?void 0:o.all)||"all",{},{}),a=b.useProps(e,{},{}),u=b.useProps(n,{},{}),{component:f,props:g}=I.useMemo(()=>Vn(s,a,u),[a,s,u]);return[bt(f,{componentProps:t,jsonFormsProps:r}),{...t,...bt(g,{componentProps:t,jsonFormsProps:r})}]}function nl(e,n,{data:t,toggle:r,onChange:o}){const s=b.useMantineTheme(),a={valueFormat:e==="date"?"DD.MM.YYYY":n?"DD.MM.YYYY HH:mm (UTC)":"DD.MM.YYYY HH:mm",value:t?e==="date"||n?Sv(t):new Date(t):null,clearable:!0,onChange:u=>{u&&(e==="date"?u=uu(u).split("T")[0]:n?u=uu(u):u=u.toISOString()),o(u||void 0)}};return e!=="date"&&(a.placeholder=n?"DD.MM.YYYY HH:mm (UTC)":"DD.MM.YYYY HH:mm",a.rightSection=c.jsxs(b.Group,{gap:"0.25rem",wrap:"nowrap",children:[c.jsx(b.CloseButton,{variant:"transparent",size:"sm",onClick:()=>o(void 0),style:{visibility:t?void 0:"hidden"}}),c.jsx(b.CloseButton,{title:n?"UTC":"Local",variant:"subtle",size:"sm",onClick:()=>{r(),t&&o(void 0)},icon:c.jsx(ma,{icon:"tabler:timezone",color:n?s.primaryColor:"gray"})})]}),a.rightSectionWidth="3.75rem"),a}function Tv({data:e,onChange:n}){const[t,r]=I.useState(""),o=I.useMemo(()=>e?typeof e=="object"?JSON.stringify(e,null,2):e:"",[e]);return I.useEffect(()=>{r(o)},[o]),{autosize:!0,minRows:4,maxRows:12,validationError:"Invalid JSON",formatOnBlur:!0,value:t,onBlur:()=>{if(!t){n(void 0);return}try{const s=JSON.parse(t);n(s)}catch{}},onChange:r}}function rl(e,n){return{data:I.useMemo(()=>n.oneOf?n.oneOf.map(r=>({value:r.const,label:r.title})):n.enum,[n.enum,n.oneOf]),value:e||null,searchable:!0}}function Iv(e,n,{onChange:t}){const r=rl(e,n);return{...r,value:r.value||[],onChange:o=>o.length?t(o):t(void 0)}}function Mv(e,{data:n,onChange:t}){return{value:n||"",allowDecimal:e==="number",hideControls:!0,onChange:r=>t(typeof r=="string"?r||void 0:r??void 0)}}function xv({data:e,onChange:n}){return{value:e||"",onChange:t=>n(t.target.value||void 0)}}function cu(e){const n=jn(e),{path:t,data:r,schema:o}=e,s=I.useMemo(()=>o.format==="checkbox",[o.format]),a=Ip(s,{data:r,onChange:n.onChange}),u=I.useMemo(()=>({...n,...a}),[a,n]),[f,g]=On("Boolean",t,u,e);return f===void 0?s?c.jsx(b.Checkbox,{...g}):c.jsx(b.Select,{...g}):f}function du(e){const n=jn(e),{path:t,data:r}=e,o=nl("date",!0,{data:r,onChange:n.onChange}),s=I.useMemo(()=>({...n,...o}),[n,o]),[a,u]=On("Date",t,s,e);return a===void 0?c.jsx(ni.DateInput,{...u}):a}function fu(e){const n=jn(e),{path:t,data:r}=e,o=nl("date-time",!1,{data:r,toggle:()=>null,onChange:n.onChange}),[,{initialUTC:s}]=On("DateTime",t,{...n,...o},e),[a,{toggle:u}]=je.useDisclosure(s),{initialUTC:f,...g}=nl("date-time",a,{data:r,toggle:u,onChange:n.onChange}),h=I.useMemo(()=>({...n,...g}),[n,g]),[p,_]=On("DateTime",t,h,e);return p===void 0?c.jsx(ni.DateTimePicker,{..._}):p}function Ev(e){const n=jn(e),{path:t,data:r}=e,o=Iv(r,e.schema.items,{onChange:n.onChange}),s=I.useMemo(()=>({...n,...o}),[n,o]),[a,u]=On("EnumArray",t,s,e);return a===void 0?c.jsx(b.MultiSelect,{...u}):a}function gu(e){const n=jn(e),{path:t,data:r}=e,o=rl(r,e.schema),s=I.useMemo(()=>({...n,...o}),[n,o]),[a,u]=On("Enum",t,s,e);return a===void 0?c.jsx(b.Select,{...u}):a}function Fv(e){const n=jn(e),{path:t,data:r}=e,o=Tv({data:r,onChange:n.onChange}),s=I.useMemo(()=>({...n,...o}),[n,o]),[a,u]=On("Text",t,s,e);return a===void 0?c.jsx(b.JsonInput,{...u}):a}function Ui(e){const n=jn(e),{path:t,data:r}=e,o=Mv("number",{data:r,onChange:n.onChange}),s=I.useMemo(()=>({...n,...o}),[n,o]),[a,u]=On("Number",t,s,e);return a===void 0?c.jsx(b.NumberInput,{...u}):a}var Wi={exports:{}};/**
131
286
  * @license
132
287
  * Lodash <https://lodash.com/>
133
288
  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
134
289
  * Released under MIT license <https://lodash.com/license>
135
290
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
136
291
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
137
- */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__",p=500,y="__lodash_placeholder__",g=1,_=2,C=4,E=1,T=2,P=1,k=2,Q=4,U=8,N=16,M=32,B=64,Y=128,fe=256,ie=512,S=30,j="...",te=800,ce=16,me=1,Be=2,_e=3,De=1/0,ke=9007199254740991,mt=17976931348623157e292,K=NaN,J=4294967295,pe=J-1,X=J>>>1,se=[["ary",Y],["bind",P],["bindKey",k],["curry",U],["curryRight",N],["flip",ie],["partial",M],["partialRight",B],["rearg",fe]],V="[object Arguments]",q="[object Array]",re="[object AsyncFunction]",he="[object Boolean]",ge="[object Date]",xe="[object DOMException]",Ye="[object Error]",ee="[object Function]",yt="[object GeneratorFunction]",Re="[object Map]",Nt="[object Number]",dr="[object Null]",we="[object Object]",Fn="[object Promise]",Si="[object Proxy]",hr="[object RegExp]",Wt="[object Set]",Ur="[object String]",pr="[object Symbol]",Wr="[object Undefined]",sn="[object WeakMap]",gr="[object WeakSet]",mr="[object ArrayBuffer]",qn="[object DataView]",Ci="[object Float32Array]",jr="[object Float64Array]",Ei="[object Int8Array]",yr="[object Int16Array]",vr="[object Int32Array]",Jt="[object Uint8Array]",Dn="[object Uint8ClampedArray]",Vr="[object Uint16Array]",Gr="[object Uint32Array]",gc=/\b__p \+= '';/g,xi=/\b(__p \+=) '' \+/g,Ai=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ys=/&(?:amp|lt|gt|quot|#39);/g,br=/[&<>"']/g,mc=RegExp(Ys.source),yc=RegExp(br.source),pt=/<%-([\s\S]+?)%>/g,_r=/<%([\s\S]+?)%>/g,Ks=/<%=([\s\S]+?)%>/g,Js=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,_o=/^\w*$/,Rs=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Oi=/[\\^$.*+?()[\]{}|]/g,vc=RegExp(Oi.source),jt=/^\s+/,Ii=/\s/,Zs=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Xs=/\{\n\/\* \[wrapped with (.+)\] \*/,To=/,? & /,Qs=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Tn=/[()=,{}\[\]\/\s]/,ea=/\\(\\)?/g,ta=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,wo=/\w*$/,na=/^[-+]0x[0-9a-f]+$/i,bc=/^0b[01]+$/i,de=/^\[object .+?Constructor\]$/,$=/^0o[0-7]+$/i,Z=/^(?:0|[1-9]\d*)$/,ae=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ve=/($^)/,wt=/['\n\r\u2028\u2029\\]/g,lt="\\ud800-\\udfff",It="\\u0300-\\u036f",an="\\ufe20-\\ufe2f",Hr="\\u20d0-\\u20ff",St=It+an+Hr,So="\\u2700-\\u27bf",Co="a-z\\xdf-\\xf6\\xf8-\\xff",pk="\\xac\\xb1\\xd7\\xf7",gk="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",mk="\\u2000-\\u206f",yk=" \\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",U0="A-Z\\xc0-\\xd6\\xd8-\\xde",W0="\\ufe0e\\ufe0f",j0=pk+gk+mk+yk,_c="['’]",vk="["+lt+"]",V0="["+j0+"]",ra="["+St+"]",G0="\\d+",bk="["+So+"]",H0="["+Co+"]",q0="[^"+lt+j0+G0+So+Co+U0+"]",Tc="\\ud83c[\\udffb-\\udfff]",_k="(?:"+ra+"|"+Tc+")",Y0="[^"+lt+"]",wc="(?:\\ud83c[\\udde6-\\uddff]){2}",Sc="[\\ud800-\\udbff][\\udc00-\\udfff]",Pi="["+U0+"]",K0="\\u200d",J0="(?:"+H0+"|"+q0+")",Tk="(?:"+Pi+"|"+q0+")",R0="(?:"+_c+"(?:d|ll|m|re|s|t|ve))?",Z0="(?:"+_c+"(?:D|LL|M|RE|S|T|VE))?",X0=_k+"?",Q0="["+W0+"]?",wk="(?:"+K0+"(?:"+[Y0,wc,Sc].join("|")+")"+Q0+X0+")*",Sk="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ck="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ey=Q0+X0+wk,Ek="(?:"+[bk,wc,Sc].join("|")+")"+ey,xk="(?:"+[Y0+ra+"?",ra,wc,Sc,vk].join("|")+")",Ak=RegExp(_c,"g"),Ok=RegExp(ra,"g"),Cc=RegExp(Tc+"(?="+Tc+")|"+xk+ey,"g"),Ik=RegExp([Pi+"?"+H0+"+"+R0+"(?="+[V0,Pi,"$"].join("|")+")",Tk+"+"+Z0+"(?="+[V0,Pi+J0,"$"].join("|")+")",Pi+"?"+J0+"+"+R0,Pi+"+"+Z0,Ck,Sk,G0,Ek].join("|"),"g"),Pk=RegExp("["+K0+lt+St+W0+"]"),$k=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Mk=["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"],Fk=-1,et={};et[Ci]=et[jr]=et[Ei]=et[yr]=et[vr]=et[Jt]=et[Dn]=et[Vr]=et[Gr]=!0,et[V]=et[q]=et[mr]=et[he]=et[qn]=et[ge]=et[Ye]=et[ee]=et[Re]=et[Nt]=et[we]=et[hr]=et[Wt]=et[Ur]=et[sn]=!1;var Xe={};Xe[V]=Xe[q]=Xe[mr]=Xe[qn]=Xe[he]=Xe[ge]=Xe[Ci]=Xe[jr]=Xe[Ei]=Xe[yr]=Xe[vr]=Xe[Re]=Xe[Nt]=Xe[we]=Xe[hr]=Xe[Wt]=Xe[Ur]=Xe[pr]=Xe[Jt]=Xe[Dn]=Xe[Vr]=Xe[Gr]=!0,Xe[Ye]=Xe[ee]=Xe[sn]=!1;var Dk={À:"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"},kk={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Nk={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Lk={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Bk=parseFloat,zk=parseInt,ty=typeof Un=="object"&&Un&&Un.Object===Object&&Un,Uk=typeof self=="object"&&self&&self.Object===Object&&self,xt=ty||Uk||Function("return this")(),Ec=t&&!t.nodeType&&t,qr=Ec&&!0&&e&&!e.nodeType&&e,ny=qr&&qr.exports===Ec,xc=ny&&ty.process,ln=function(){try{var F=qr&&qr.require&&qr.require("util").types;return F||xc&&xc.binding&&xc.binding("util")}catch{}}(),ry=ln&&ln.isArrayBuffer,iy=ln&&ln.isDate,oy=ln&&ln.isMap,sy=ln&&ln.isRegExp,ay=ln&&ln.isSet,ly=ln&&ln.isTypedArray;function Rt(F,W,L){switch(L.length){case 0:return F.call(W);case 1:return F.call(W,L[0]);case 2:return F.call(W,L[0],L[1]);case 3:return F.call(W,L[0],L[1],L[2])}return F.apply(W,L)}function Wk(F,W,L,oe){for(var Te=-1,ze=F==null?0:F.length;++Te<ze;){var vt=F[Te];W(oe,vt,L(vt),F)}return oe}function un(F,W){for(var L=-1,oe=F==null?0:F.length;++L<oe&&W(F[L],L,F)!==!1;);return F}function jk(F,W){for(var L=F==null?0:F.length;L--&&W(F[L],L,F)!==!1;);return F}function uy(F,W){for(var L=-1,oe=F==null?0:F.length;++L<oe;)if(!W(F[L],L,F))return!1;return!0}function Tr(F,W){for(var L=-1,oe=F==null?0:F.length,Te=0,ze=[];++L<oe;){var vt=F[L];W(vt,L,F)&&(ze[Te++]=vt)}return ze}function ia(F,W){var L=F==null?0:F.length;return!!L&&$i(F,W,0)>-1}function Ac(F,W,L){for(var oe=-1,Te=F==null?0:F.length;++oe<Te;)if(L(W,F[oe]))return!0;return!1}function nt(F,W){for(var L=-1,oe=F==null?0:F.length,Te=Array(oe);++L<oe;)Te[L]=W(F[L],L,F);return Te}function wr(F,W){for(var L=-1,oe=W.length,Te=F.length;++L<oe;)F[Te+L]=W[L];return F}function Oc(F,W,L,oe){var Te=-1,ze=F==null?0:F.length;for(oe&&ze&&(L=F[++Te]);++Te<ze;)L=W(L,F[Te],Te,F);return L}function Vk(F,W,L,oe){var Te=F==null?0:F.length;for(oe&&Te&&(L=F[--Te]);Te--;)L=W(L,F[Te],Te,F);return L}function Ic(F,W){for(var L=-1,oe=F==null?0:F.length;++L<oe;)if(W(F[L],L,F))return!0;return!1}var Gk=Pc("length");function Hk(F){return F.split("")}function qk(F){return F.match(Qs)||[]}function cy(F,W,L){var oe;return L(F,function(Te,ze,vt){if(W(Te,ze,vt))return oe=ze,!1}),oe}function oa(F,W,L,oe){for(var Te=F.length,ze=L+(oe?1:-1);oe?ze--:++ze<Te;)if(W(F[ze],ze,F))return ze;return-1}function $i(F,W,L){return W===W?iN(F,W,L):oa(F,fy,L)}function Yk(F,W,L,oe){for(var Te=L-1,ze=F.length;++Te<ze;)if(oe(F[Te],W))return Te;return-1}function fy(F){return F!==F}function dy(F,W){var L=F==null?0:F.length;return L?Mc(F,W)/L:K}function Pc(F){return function(W){return W==null?n:W[F]}}function $c(F){return function(W){return F==null?n:F[W]}}function hy(F,W,L,oe,Te){return Te(F,function(ze,vt,Ze){L=oe?(oe=!1,ze):W(L,ze,vt,Ze)}),L}function Kk(F,W){var L=F.length;for(F.sort(W);L--;)F[L]=F[L].value;return F}function Mc(F,W){for(var L,oe=-1,Te=F.length;++oe<Te;){var ze=W(F[oe]);ze!==n&&(L=L===n?ze:L+ze)}return L}function Fc(F,W){for(var L=-1,oe=Array(F);++L<F;)oe[L]=W(L);return oe}function Jk(F,W){return nt(W,function(L){return[L,F[L]]})}function py(F){return F&&F.slice(0,vy(F)+1).replace(jt,"")}function Zt(F){return function(W){return F(W)}}function Dc(F,W){return nt(W,function(L){return F[L]})}function Eo(F,W){return F.has(W)}function gy(F,W){for(var L=-1,oe=F.length;++L<oe&&$i(W,F[L],0)>-1;);return L}function my(F,W){for(var L=F.length;L--&&$i(W,F[L],0)>-1;);return L}function Rk(F,W){for(var L=F.length,oe=0;L--;)F[L]===W&&++oe;return oe}var Zk=$c(Dk),Xk=$c(kk);function Qk(F){return"\\"+Lk[F]}function eN(F,W){return F==null?n:F[W]}function Mi(F){return Pk.test(F)}function tN(F){return $k.test(F)}function nN(F){for(var W,L=[];!(W=F.next()).done;)L.push(W.value);return L}function kc(F){var W=-1,L=Array(F.size);return F.forEach(function(oe,Te){L[++W]=[Te,oe]}),L}function yy(F,W){return function(L){return F(W(L))}}function Sr(F,W){for(var L=-1,oe=F.length,Te=0,ze=[];++L<oe;){var vt=F[L];(vt===W||vt===y)&&(F[L]=y,ze[Te++]=L)}return ze}function sa(F){var W=-1,L=Array(F.size);return F.forEach(function(oe){L[++W]=oe}),L}function rN(F){var W=-1,L=Array(F.size);return F.forEach(function(oe){L[++W]=[oe,oe]}),L}function iN(F,W,L){for(var oe=L-1,Te=F.length;++oe<Te;)if(F[oe]===W)return oe;return-1}function oN(F,W,L){for(var oe=L+1;oe--;)if(F[oe]===W)return oe;return oe}function Fi(F){return Mi(F)?aN(F):Gk(F)}function wn(F){return Mi(F)?lN(F):Hk(F)}function vy(F){for(var W=F.length;W--&&Ii.test(F.charAt(W)););return W}var sN=$c(Nk);function aN(F){for(var W=Cc.lastIndex=0;Cc.test(F);)++W;return W}function lN(F){return F.match(Cc)||[]}function uN(F){return F.match(Ik)||[]}var cN=function F(W){W=W==null?xt:Di.defaults(xt.Object(),W,Di.pick(xt,Mk));var L=W.Array,oe=W.Date,Te=W.Error,ze=W.Function,vt=W.Math,Ze=W.Object,Nc=W.RegExp,fN=W.String,cn=W.TypeError,aa=L.prototype,dN=ze.prototype,ki=Ze.prototype,la=W["__core-js_shared__"],ua=dN.toString,Ge=ki.hasOwnProperty,hN=0,by=function(){var r=/[^.]+$/.exec(la&&la.keys&&la.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}(),ca=ki.toString,pN=ua.call(Ze),gN=xt._,mN=Nc("^"+ua.call(Ge).replace(Oi,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),fa=ny?W.Buffer:n,Cr=W.Symbol,da=W.Uint8Array,_y=fa?fa.allocUnsafe:n,ha=yy(Ze.getPrototypeOf,Ze),Ty=Ze.create,wy=ki.propertyIsEnumerable,pa=aa.splice,Sy=Cr?Cr.isConcatSpreadable:n,xo=Cr?Cr.iterator:n,Yr=Cr?Cr.toStringTag:n,ga=function(){try{var r=Xr(Ze,"defineProperty");return r({},"",{}),r}catch{}}(),yN=W.clearTimeout!==xt.clearTimeout&&W.clearTimeout,vN=oe&&oe.now!==xt.Date.now&&oe.now,bN=W.setTimeout!==xt.setTimeout&&W.setTimeout,ma=vt.ceil,ya=vt.floor,Lc=Ze.getOwnPropertySymbols,_N=fa?fa.isBuffer:n,Cy=W.isFinite,TN=aa.join,wN=yy(Ze.keys,Ze),bt=vt.max,Pt=vt.min,SN=oe.now,CN=W.parseInt,Ey=vt.random,EN=aa.reverse,Bc=Xr(W,"DataView"),Ao=Xr(W,"Map"),zc=Xr(W,"Promise"),Ni=Xr(W,"Set"),Oo=Xr(W,"WeakMap"),Io=Xr(Ze,"create"),va=Oo&&new Oo,Li={},xN=Qr(Bc),AN=Qr(Ao),ON=Qr(zc),IN=Qr(Ni),PN=Qr(Oo),ba=Cr?Cr.prototype:n,Po=ba?ba.valueOf:n,xy=ba?ba.toString:n;function v(r){if(ut(r)&&!Se(r)&&!(r instanceof $e)){if(r instanceof fn)return r;if(Ge.call(r,"__wrapped__"))return Av(r)}return new fn(r)}var Bi=function(){function r(){}return function(i){if(!it(i))return{};if(Ty)return Ty(i);r.prototype=i;var l=new r;return r.prototype=n,l}}();function _a(){}function fn(r,i){this.__wrapped__=r,this.__actions__=[],this.__chain__=!!i,this.__index__=0,this.__values__=n}v.templateSettings={escape:pt,evaluate:_r,interpolate:Ks,variable:"",imports:{_:v}},v.prototype=_a.prototype,v.prototype.constructor=v,fn.prototype=Bi(_a.prototype),fn.prototype.constructor=fn;function $e(r){this.__wrapped__=r,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=J,this.__views__=[]}function $N(){var r=new $e(this.__wrapped__);return r.__actions__=Vt(this.__actions__),r.__dir__=this.__dir__,r.__filtered__=this.__filtered__,r.__iteratees__=Vt(this.__iteratees__),r.__takeCount__=this.__takeCount__,r.__views__=Vt(this.__views__),r}function MN(){if(this.__filtered__){var r=new $e(this);r.__dir__=-1,r.__filtered__=!0}else r=this.clone(),r.__dir__*=-1;return r}function FN(){var r=this.__wrapped__.value(),i=this.__dir__,l=Se(r),f=i<0,m=l?r.length:0,w=HL(0,m,this.__views__),A=w.start,I=w.end,D=I-A,G=f?I:A-1,H=this.__iteratees__,R=H.length,ne=0,ue=Pt(D,this.__takeCount__);if(!l||!f&&m==D&&ue==D)return Ry(r,this.__actions__);var ve=[];e:for(;D--&&ne<ue;){G+=i;for(var Ee=-1,be=r[G];++Ee<R;){var Pe=H[Ee],Me=Pe.iteratee,en=Pe.type,zt=Me(be);if(en==Be)be=zt;else if(!zt){if(en==me)continue e;break e}}ve[ne++]=be}return ve}$e.prototype=Bi(_a.prototype),$e.prototype.constructor=$e;function Kr(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 DN(){this.__data__=Io?Io(null):{},this.size=0}function kN(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}function NN(r){var i=this.__data__;if(Io){var l=i[r];return l===d?n:l}return Ge.call(i,r)?i[r]:n}function LN(r){var i=this.__data__;return Io?i[r]!==n:Ge.call(i,r)}function BN(r,i){var l=this.__data__;return this.size+=this.has(r)?0:1,l[r]=Io&&i===n?d:i,this}Kr.prototype.clear=DN,Kr.prototype.delete=kN,Kr.prototype.get=NN,Kr.prototype.has=LN,Kr.prototype.set=BN;function Yn(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 zN(){this.__data__=[],this.size=0}function UN(r){var i=this.__data__,l=Ta(i,r);if(l<0)return!1;var f=i.length-1;return l==f?i.pop():pa.call(i,l,1),--this.size,!0}function WN(r){var i=this.__data__,l=Ta(i,r);return l<0?n:i[l][1]}function jN(r){return Ta(this.__data__,r)>-1}function VN(r,i){var l=this.__data__,f=Ta(l,r);return f<0?(++this.size,l.push([r,i])):l[f][1]=i,this}Yn.prototype.clear=zN,Yn.prototype.delete=UN,Yn.prototype.get=WN,Yn.prototype.has=jN,Yn.prototype.set=VN;function Kn(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 GN(){this.size=0,this.__data__={hash:new Kr,map:new(Ao||Yn),string:new Kr}}function HN(r){var i=Fa(this,r).delete(r);return this.size-=i?1:0,i}function qN(r){return Fa(this,r).get(r)}function YN(r){return Fa(this,r).has(r)}function KN(r,i){var l=Fa(this,r),f=l.size;return l.set(r,i),this.size+=l.size==f?0:1,this}Kn.prototype.clear=GN,Kn.prototype.delete=HN,Kn.prototype.get=qN,Kn.prototype.has=YN,Kn.prototype.set=KN;function Jr(r){var i=-1,l=r==null?0:r.length;for(this.__data__=new Kn;++i<l;)this.add(r[i])}function JN(r){return this.__data__.set(r,d),this}function RN(r){return this.__data__.has(r)}Jr.prototype.add=Jr.prototype.push=JN,Jr.prototype.has=RN;function Sn(r){var i=this.__data__=new Yn(r);this.size=i.size}function ZN(){this.__data__=new Yn,this.size=0}function XN(r){var i=this.__data__,l=i.delete(r);return this.size=i.size,l}function QN(r){return this.__data__.get(r)}function eL(r){return this.__data__.has(r)}function tL(r,i){var l=this.__data__;if(l instanceof Yn){var f=l.__data__;if(!Ao||f.length<s-1)return f.push([r,i]),this.size=++l.size,this;l=this.__data__=new Kn(f)}return l.set(r,i),this.size=l.size,this}Sn.prototype.clear=ZN,Sn.prototype.delete=XN,Sn.prototype.get=QN,Sn.prototype.has=eL,Sn.prototype.set=tL;function Ay(r,i){var l=Se(r),f=!l&&ei(r),m=!l&&!f&&Ir(r),w=!l&&!f&&!m&&ji(r),A=l||f||m||w,I=A?Fc(r.length,fN):[],D=I.length;for(var G in r)(i||Ge.call(r,G))&&!(A&&(G=="length"||m&&(G=="offset"||G=="parent")||w&&(G=="buffer"||G=="byteLength"||G=="byteOffset")||Xn(G,D)))&&I.push(G);return I}function Oy(r){var i=r.length;return i?r[Rc(0,i-1)]:n}function nL(r,i){return Da(Vt(r),Rr(i,0,r.length))}function rL(r){return Da(Vt(r))}function Uc(r,i,l){(l!==n&&!Cn(r[i],l)||l===n&&!(i in r))&&Jn(r,i,l)}function $o(r,i,l){var f=r[i];(!(Ge.call(r,i)&&Cn(f,l))||l===n&&!(i in r))&&Jn(r,i,l)}function Ta(r,i){for(var l=r.length;l--;)if(Cn(r[l][0],i))return l;return-1}function iL(r,i,l,f){return Er(r,function(m,w,A){i(f,m,l(m),A)}),f}function Iy(r,i){return r&&Nn(i,Ct(i),r)}function oL(r,i){return r&&Nn(i,Ht(i),r)}function Jn(r,i,l){i=="__proto__"&&ga?ga(r,i,{configurable:!0,enumerable:!0,value:l,writable:!0}):r[i]=l}function Wc(r,i){for(var l=-1,f=i.length,m=L(f),w=r==null;++l<f;)m[l]=w?n:wf(r,i[l]);return m}function Rr(r,i,l){return r===r&&(l!==n&&(r=r<=l?r:l),i!==n&&(r=r>=i?r:i)),r}function dn(r,i,l,f,m,w){var A,I=i&g,D=i&_,G=i&C;if(l&&(A=m?l(r,f,m,w):l(r)),A!==n)return A;if(!it(r))return r;var H=Se(r);if(H){if(A=YL(r),!I)return Vt(r,A)}else{var R=$t(r),ne=R==ee||R==yt;if(Ir(r))return Qy(r,I);if(R==we||R==V||ne&&!m){if(A=D||ne?{}:vv(r),!I)return D?NL(r,oL(A,r)):kL(r,Iy(A,r))}else{if(!Xe[R])return m?r:{};A=KL(r,R,I)}}w||(w=new Sn);var ue=w.get(r);if(ue)return ue;w.set(r,A),Yv(r)?r.forEach(function(be){A.add(dn(be,i,l,be,r,w))}):Hv(r)&&r.forEach(function(be,Pe){A.set(Pe,dn(be,i,l,Pe,r,w))});var ve=G?D?lf:af:D?Ht:Ct,Ee=H?n:ve(r);return un(Ee||r,function(be,Pe){Ee&&(Pe=be,be=r[Pe]),$o(A,Pe,dn(be,i,l,Pe,r,w))}),A}function sL(r){var i=Ct(r);return function(l){return Py(l,r,i)}}function Py(r,i,l){var f=l.length;if(r==null)return!f;for(r=Ze(r);f--;){var m=l[f],w=i[m],A=r[m];if(A===n&&!(m in r)||!w(A))return!1}return!0}function $y(r,i,l){if(typeof r!="function")throw new cn(u);return Bo(function(){r.apply(n,l)},i)}function Mo(r,i,l,f){var m=-1,w=ia,A=!0,I=r.length,D=[],G=i.length;if(!I)return D;l&&(i=nt(i,Zt(l))),f?(w=Ac,A=!1):i.length>=s&&(w=Eo,A=!1,i=new Jr(i));e:for(;++m<I;){var H=r[m],R=l==null?H:l(H);if(H=f||H!==0?H:0,A&&R===R){for(var ne=G;ne--;)if(i[ne]===R)continue e;D.push(H)}else w(i,R,f)||D.push(H)}return D}var Er=iv(kn),My=iv(Vc,!0);function aL(r,i){var l=!0;return Er(r,function(f,m,w){return l=!!i(f,m,w),l}),l}function wa(r,i,l){for(var f=-1,m=r.length;++f<m;){var w=r[f],A=i(w);if(A!=null&&(I===n?A===A&&!Qt(A):l(A,I)))var I=A,D=w}return D}function lL(r,i,l,f){var m=r.length;for(l=Ce(l),l<0&&(l=-l>m?0:m+l),f=f===n||f>m?m:Ce(f),f<0&&(f+=m),f=l>f?0:Jv(f);l<f;)r[l++]=i;return r}function Fy(r,i){var l=[];return Er(r,function(f,m,w){i(f,m,w)&&l.push(f)}),l}function At(r,i,l,f,m){var w=-1,A=r.length;for(l||(l=RL),m||(m=[]);++w<A;){var I=r[w];i>0&&l(I)?i>1?At(I,i-1,l,f,m):wr(m,I):f||(m[m.length]=I)}return m}var jc=ov(),Dy=ov(!0);function kn(r,i){return r&&jc(r,i,Ct)}function Vc(r,i){return r&&Dy(r,i,Ct)}function Sa(r,i){return Tr(i,function(l){return Qn(r[l])})}function Zr(r,i){i=Ar(i,r);for(var l=0,f=i.length;r!=null&&l<f;)r=r[Ln(i[l++])];return l&&l==f?r:n}function ky(r,i,l){var f=i(r);return Se(r)?f:wr(f,l(r))}function Lt(r){return r==null?r===n?Wr:dr:Yr&&Yr in Ze(r)?GL(r):r5(r)}function Gc(r,i){return r>i}function uL(r,i){return r!=null&&Ge.call(r,i)}function cL(r,i){return r!=null&&i in Ze(r)}function fL(r,i,l){return r>=Pt(i,l)&&r<bt(i,l)}function Hc(r,i,l){for(var f=l?Ac:ia,m=r[0].length,w=r.length,A=w,I=L(w),D=1/0,G=[];A--;){var H=r[A];A&&i&&(H=nt(H,Zt(i))),D=Pt(H.length,D),I[A]=!l&&(i||m>=120&&H.length>=120)?new Jr(A&&H):n}H=r[0];var R=-1,ne=I[0];e:for(;++R<m&&G.length<D;){var ue=H[R],ve=i?i(ue):ue;if(ue=l||ue!==0?ue:0,!(ne?Eo(ne,ve):f(G,ve,l))){for(A=w;--A;){var Ee=I[A];if(!(Ee?Eo(Ee,ve):f(r[A],ve,l)))continue e}ne&&ne.push(ve),G.push(ue)}}return G}function dL(r,i,l,f){return kn(r,function(m,w,A){i(f,l(m),w,A)}),f}function Fo(r,i,l){i=Ar(i,r),r=wv(r,i);var f=r==null?r:r[Ln(pn(i))];return f==null?n:Rt(f,r,l)}function Ny(r){return ut(r)&&Lt(r)==V}function hL(r){return ut(r)&&Lt(r)==mr}function pL(r){return ut(r)&&Lt(r)==ge}function Do(r,i,l,f,m){return r===i?!0:r==null||i==null||!ut(r)&&!ut(i)?r!==r&&i!==i:gL(r,i,l,f,Do,m)}function gL(r,i,l,f,m,w){var A=Se(r),I=Se(i),D=A?q:$t(r),G=I?q:$t(i);D=D==V?we:D,G=G==V?we:G;var H=D==we,R=G==we,ne=D==G;if(ne&&Ir(r)){if(!Ir(i))return!1;A=!0,H=!1}if(ne&&!H)return w||(w=new Sn),A||ji(r)?gv(r,i,l,f,m,w):jL(r,i,D,l,f,m,w);if(!(l&E)){var ue=H&&Ge.call(r,"__wrapped__"),ve=R&&Ge.call(i,"__wrapped__");if(ue||ve){var Ee=ue?r.value():r,be=ve?i.value():i;return w||(w=new Sn),m(Ee,be,l,f,w)}}return ne?(w||(w=new Sn),VL(r,i,l,f,m,w)):!1}function mL(r){return ut(r)&&$t(r)==Re}function qc(r,i,l,f){var m=l.length,w=m,A=!f;if(r==null)return!w;for(r=Ze(r);m--;){var I=l[m];if(A&&I[2]?I[1]!==r[I[0]]:!(I[0]in r))return!1}for(;++m<w;){I=l[m];var D=I[0],G=r[D],H=I[1];if(A&&I[2]){if(G===n&&!(D in r))return!1}else{var R=new Sn;if(f)var ne=f(G,H,D,r,i,R);if(!(ne===n?Do(H,G,E|T,f,R):ne))return!1}}return!0}function Ly(r){if(!it(r)||XL(r))return!1;var i=Qn(r)?mN:de;return i.test(Qr(r))}function yL(r){return ut(r)&&Lt(r)==hr}function vL(r){return ut(r)&&$t(r)==Wt}function bL(r){return ut(r)&&Ua(r.length)&&!!et[Lt(r)]}function By(r){return typeof r=="function"?r:r==null?qt:typeof r=="object"?Se(r)?Wy(r[0],r[1]):Uy(r):sb(r)}function Yc(r){if(!Lo(r))return wN(r);var i=[];for(var l in Ze(r))Ge.call(r,l)&&l!="constructor"&&i.push(l);return i}function _L(r){if(!it(r))return n5(r);var i=Lo(r),l=[];for(var f in r)f=="constructor"&&(i||!Ge.call(r,f))||l.push(f);return l}function Kc(r,i){return r<i}function zy(r,i){var l=-1,f=Gt(r)?L(r.length):[];return Er(r,function(m,w,A){f[++l]=i(m,w,A)}),f}function Uy(r){var i=cf(r);return i.length==1&&i[0][2]?_v(i[0][0],i[0][1]):function(l){return l===r||qc(l,r,i)}}function Wy(r,i){return df(r)&&bv(i)?_v(Ln(r),i):function(l){var f=wf(l,r);return f===n&&f===i?Sf(l,r):Do(i,f,E|T)}}function Ca(r,i,l,f,m){r!==i&&jc(i,function(w,A){if(m||(m=new Sn),it(w))TL(r,i,A,l,Ca,f,m);else{var I=f?f(pf(r,A),w,A+"",r,i,m):n;I===n&&(I=w),Uc(r,A,I)}},Ht)}function TL(r,i,l,f,m,w,A){var I=pf(r,l),D=pf(i,l),G=A.get(D);if(G){Uc(r,l,G);return}var H=w?w(I,D,l+"",r,i,A):n,R=H===n;if(R){var ne=Se(D),ue=!ne&&Ir(D),ve=!ne&&!ue&&ji(D);H=D,ne||ue||ve?Se(I)?H=I:dt(I)?H=Vt(I):ue?(R=!1,H=Qy(D,!0)):ve?(R=!1,H=ev(D,!0)):H=[]:zo(D)||ei(D)?(H=I,ei(I)?H=Rv(I):(!it(I)||Qn(I))&&(H=vv(D))):R=!1}R&&(A.set(D,H),m(H,D,f,w,A),A.delete(D)),Uc(r,l,H)}function jy(r,i){var l=r.length;if(l)return i+=i<0?l:0,Xn(i,l)?r[i]:n}function Vy(r,i,l){i.length?i=nt(i,function(w){return Se(w)?function(A){return Zr(A,w.length===1?w[0]:w)}:w}):i=[qt];var f=-1;i=nt(i,Zt(ye()));var m=zy(r,function(w,A,I){var D=nt(i,function(G){return G(w)});return{criteria:D,index:++f,value:w}});return Kk(m,function(w,A){return DL(w,A,l)})}function wL(r,i){return Gy(r,i,function(l,f){return Sf(r,f)})}function Gy(r,i,l){for(var f=-1,m=i.length,w={};++f<m;){var A=i[f],I=Zr(r,A);l(I,A)&&ko(w,Ar(A,r),I)}return w}function SL(r){return function(i){return Zr(i,r)}}function Jc(r,i,l,f){var m=f?Yk:$i,w=-1,A=i.length,I=r;for(r===i&&(i=Vt(i)),l&&(I=nt(r,Zt(l)));++w<A;)for(var D=0,G=i[w],H=l?l(G):G;(D=m(I,H,D,f))>-1;)I!==r&&pa.call(I,D,1),pa.call(r,D,1);return r}function Hy(r,i){for(var l=r?i.length:0,f=l-1;l--;){var m=i[l];if(l==f||m!==w){var w=m;Xn(m)?pa.call(r,m,1):Qc(r,m)}}return r}function Rc(r,i){return r+ya(Ey()*(i-r+1))}function CL(r,i,l,f){for(var m=-1,w=bt(ma((i-r)/(l||1)),0),A=L(w);w--;)A[f?w:++m]=r,r+=l;return A}function Zc(r,i){var l="";if(!r||i<1||i>ke)return l;do i%2&&(l+=r),i=ya(i/2),i&&(r+=r);while(i);return l}function Ae(r,i){return gf(Tv(r,i,qt),r+"")}function EL(r){return Oy(Vi(r))}function xL(r,i){var l=Vi(r);return Da(l,Rr(i,0,l.length))}function ko(r,i,l,f){if(!it(r))return r;i=Ar(i,r);for(var m=-1,w=i.length,A=w-1,I=r;I!=null&&++m<w;){var D=Ln(i[m]),G=l;if(D==="__proto__"||D==="constructor"||D==="prototype")return r;if(m!=A){var H=I[D];G=f?f(H,D,I):n,G===n&&(G=it(H)?H:Xn(i[m+1])?[]:{})}$o(I,D,G),I=I[D]}return r}var qy=va?function(r,i){return va.set(r,i),r}:qt,AL=ga?function(r,i){return ga(r,"toString",{configurable:!0,enumerable:!1,value:Ef(i),writable:!0})}:qt;function OL(r){return Da(Vi(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 w=L(m);++f<m;)w[f]=r[f+i];return w}function IL(r,i){var l;return Er(r,function(f,m,w){return l=i(f,m,w),!l}),!!l}function Ea(r,i,l){var f=0,m=r==null?f:r.length;if(typeof i=="number"&&i===i&&m<=X){for(;f<m;){var w=f+m>>>1,A=r[w];A!==null&&!Qt(A)&&(l?A<=i:A<i)?f=w+1:m=w}return m}return Xc(r,i,qt,l)}function Xc(r,i,l,f){var m=0,w=r==null?0:r.length;if(w===0)return 0;i=l(i);for(var A=i!==i,I=i===null,D=Qt(i),G=i===n;m<w;){var H=ya((m+w)/2),R=l(r[H]),ne=R!==n,ue=R===null,ve=R===R,Ee=Qt(R);if(A)var be=f||ve;else G?be=ve&&(f||ne):I?be=ve&&ne&&(f||!ue):D?be=ve&&ne&&!ue&&(f||!Ee):ue||Ee?be=!1:be=f?R<=i:R<i;be?m=H+1:w=H}return Pt(w,pe)}function Yy(r,i){for(var l=-1,f=r.length,m=0,w=[];++l<f;){var A=r[l],I=i?i(A):A;if(!l||!Cn(I,D)){var D=I;w[m++]=A===0?0:A}}return w}function Ky(r){return typeof r=="number"?r:Qt(r)?K:+r}function Xt(r){if(typeof r=="string")return r;if(Se(r))return nt(r,Xt)+"";if(Qt(r))return xy?xy.call(r):"";var i=r+"";return i=="0"&&1/r==-1/0?"-0":i}function xr(r,i,l){var f=-1,m=ia,w=r.length,A=!0,I=[],D=I;if(l)A=!1,m=Ac;else if(w>=s){var G=i?null:UL(r);if(G)return sa(G);A=!1,m=Eo,D=new Jr}else D=i?[]:I;e:for(;++f<w;){var H=r[f],R=i?i(H):H;if(H=l||H!==0?H:0,A&&R===R){for(var ne=D.length;ne--;)if(D[ne]===R)continue e;i&&D.push(R),I.push(H)}else m(D,R,l)||(D!==I&&D.push(R),I.push(H))}return I}function Qc(r,i){return i=Ar(i,r),r=wv(r,i),r==null||delete r[Ln(pn(i))]}function Jy(r,i,l,f){return ko(r,i,l(Zr(r,i)),f)}function xa(r,i,l,f){for(var m=r.length,w=f?m:-1;(f?w--:++w<m)&&i(r[w],w,r););return l?hn(r,f?0:w,f?w+1:m):hn(r,f?w+1:0,f?m:w)}function Ry(r,i){var l=r;return l instanceof $e&&(l=l.value()),Oc(i,function(f,m){return m.func.apply(m.thisArg,wr([f],m.args))},l)}function ef(r,i,l){var f=r.length;if(f<2)return f?xr(r[0]):[];for(var m=-1,w=L(f);++m<f;)for(var A=r[m],I=-1;++I<f;)I!=m&&(w[m]=Mo(w[m]||A,r[I],i,l));return xr(At(w,1),i,l)}function Zy(r,i,l){for(var f=-1,m=r.length,w=i.length,A={};++f<m;){var I=f<w?i[f]:n;l(A,r[f],I)}return A}function tf(r){return dt(r)?r:[]}function nf(r){return typeof r=="function"?r:qt}function Ar(r,i){return Se(r)?r:df(r,i)?[r]:xv(je(r))}var PL=Ae;function Or(r,i,l){var f=r.length;return l=l===n?f:l,!i&&l>=f?r:hn(r,i,l)}var Xy=yN||function(r){return xt.clearTimeout(r)};function Qy(r,i){if(i)return r.slice();var l=r.length,f=_y?_y(l):new r.constructor(l);return r.copy(f),f}function rf(r){var i=new r.constructor(r.byteLength);return new da(i).set(new da(r)),i}function $L(r,i){var l=i?rf(r.buffer):r.buffer;return new r.constructor(l,r.byteOffset,r.byteLength)}function ML(r){var i=new r.constructor(r.source,wo.exec(r));return i.lastIndex=r.lastIndex,i}function FL(r){return Po?Ze(Po.call(r)):{}}function ev(r,i){var l=i?rf(r.buffer):r.buffer;return new r.constructor(l,r.byteOffset,r.length)}function tv(r,i){if(r!==i){var l=r!==n,f=r===null,m=r===r,w=Qt(r),A=i!==n,I=i===null,D=i===i,G=Qt(i);if(!I&&!G&&!w&&r>i||w&&A&&D&&!I&&!G||f&&A&&D||!l&&D||!m)return 1;if(!f&&!w&&!G&&r<i||G&&l&&m&&!f&&!w||I&&l&&m||!A&&m||!D)return-1}return 0}function DL(r,i,l){for(var f=-1,m=r.criteria,w=i.criteria,A=m.length,I=l.length;++f<A;){var D=tv(m[f],w[f]);if(D){if(f>=I)return D;var G=l[f];return D*(G=="desc"?-1:1)}}return r.index-i.index}function nv(r,i,l,f){for(var m=-1,w=r.length,A=l.length,I=-1,D=i.length,G=bt(w-A,0),H=L(D+G),R=!f;++I<D;)H[I]=i[I];for(;++m<A;)(R||m<w)&&(H[l[m]]=r[m]);for(;G--;)H[I++]=r[m++];return H}function rv(r,i,l,f){for(var m=-1,w=r.length,A=-1,I=l.length,D=-1,G=i.length,H=bt(w-I,0),R=L(H+G),ne=!f;++m<H;)R[m]=r[m];for(var ue=m;++D<G;)R[ue+D]=i[D];for(;++A<I;)(ne||m<w)&&(R[ue+l[A]]=r[m++]);return R}function Vt(r,i){var l=-1,f=r.length;for(i||(i=L(f));++l<f;)i[l]=r[l];return i}function Nn(r,i,l,f){var m=!l;l||(l={});for(var w=-1,A=i.length;++w<A;){var I=i[w],D=f?f(l[I],r[I],I,l,r):n;D===n&&(D=r[I]),m?Jn(l,I,D):$o(l,I,D)}return l}function kL(r,i){return Nn(r,ff(r),i)}function NL(r,i){return Nn(r,mv(r),i)}function Aa(r,i){return function(l,f){var m=Se(l)?Wk:iL,w=i?i():{};return m(l,r,ye(f,2),w)}}function zi(r){return Ae(function(i,l){var f=-1,m=l.length,w=m>1?l[m-1]:n,A=m>2?l[2]:n;for(w=r.length>3&&typeof w=="function"?(m--,w):n,A&&Bt(l[0],l[1],A)&&(w=m<3?n:w,m=1),i=Ze(i);++f<m;){var I=l[f];I&&r(i,I,f,w)}return i})}function iv(r,i){return function(l,f){if(l==null)return l;if(!Gt(l))return r(l,f);for(var m=l.length,w=i?m:-1,A=Ze(l);(i?w--:++w<m)&&f(A[w],w,A)!==!1;);return l}}function ov(r){return function(i,l,f){for(var m=-1,w=Ze(i),A=f(i),I=A.length;I--;){var D=A[r?I:++m];if(l(w[D],D,w)===!1)break}return i}}function LL(r,i,l){var f=i&P,m=No(r);function w(){var A=this&&this!==xt&&this instanceof w?m:r;return A.apply(f?l:this,arguments)}return w}function sv(r){return function(i){i=je(i);var l=Mi(i)?wn(i):n,f=l?l[0]:i.charAt(0),m=l?Or(l,1).join(""):i.slice(1);return f[r]()+m}}function Ui(r){return function(i){return Oc(ib(rb(i).replace(Ak,"")),r,"")}}function No(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=Bi(r.prototype),f=r.apply(l,i);return it(f)?f:l}}function BL(r,i,l){var f=No(r);function m(){for(var w=arguments.length,A=L(w),I=w,D=Wi(m);I--;)A[I]=arguments[I];var G=w<3&&A[0]!==D&&A[w-1]!==D?[]:Sr(A,D);if(w-=G.length,w<l)return fv(r,i,Oa,m.placeholder,n,A,G,n,n,l-w);var H=this&&this!==xt&&this instanceof m?f:r;return Rt(H,this,A)}return m}function av(r){return function(i,l,f){var m=Ze(i);if(!Gt(i)){var w=ye(l,3);i=Ct(i),l=function(I){return w(m[I],I,m)}}var A=r(i,l,f);return A>-1?m[w?i[A]:A]:n}}function lv(r){return Zn(function(i){var l=i.length,f=l,m=fn.prototype.thru;for(r&&i.reverse();f--;){var w=i[f];if(typeof w!="function")throw new cn(u);if(m&&!A&&Ma(w)=="wrapper")var A=new fn([],!0)}for(f=A?f:l;++f<l;){w=i[f];var I=Ma(w),D=I=="wrapper"?uf(w):n;D&&hf(D[0])&&D[1]==(Y|U|M|fe)&&!D[4].length&&D[9]==1?A=A[Ma(D[0])].apply(A,D[3]):A=w.length==1&&hf(w)?A[I]():A.thru(w)}return function(){var G=arguments,H=G[0];if(A&&G.length==1&&Se(H))return A.plant(H).value();for(var R=0,ne=l?i[R].apply(this,G):H;++R<l;)ne=i[R].call(this,ne);return ne}})}function Oa(r,i,l,f,m,w,A,I,D,G){var H=i&Y,R=i&P,ne=i&k,ue=i&(U|N),ve=i&ie,Ee=ne?n:No(r);function be(){for(var Pe=arguments.length,Me=L(Pe),en=Pe;en--;)Me[en]=arguments[en];if(ue)var zt=Wi(be),tn=Rk(Me,zt);if(f&&(Me=nv(Me,f,m,ue)),w&&(Me=rv(Me,w,A,ue)),Pe-=tn,ue&&Pe<G){var ht=Sr(Me,zt);return fv(r,i,Oa,be.placeholder,l,Me,ht,I,D,G-Pe)}var En=R?l:this,tr=ne?En[r]:r;return Pe=Me.length,I?Me=i5(Me,I):ve&&Pe>1&&Me.reverse(),H&&D<Pe&&(Me.length=D),this&&this!==xt&&this instanceof be&&(tr=Ee||No(tr)),tr.apply(En,Me)}return be}function uv(r,i){return function(l,f){return dL(l,r,i(f),{})}}function Ia(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=Xt(l),f=Xt(f)):(l=Ky(l),f=Ky(f)),m=r(l,f)}return m}}function of(r){return Zn(function(i){return i=nt(i,Zt(ye())),Ae(function(l){var f=this;return r(i,function(m){return Rt(m,f,l)})})})}function Pa(r,i){i=i===n?" ":Xt(i);var l=i.length;if(l<2)return l?Zc(i,r):i;var f=Zc(i,ma(r/Fi(i)));return Mi(i)?Or(wn(f),0,r).join(""):f.slice(0,r)}function zL(r,i,l,f){var m=i&P,w=No(r);function A(){for(var I=-1,D=arguments.length,G=-1,H=f.length,R=L(H+D),ne=this&&this!==xt&&this instanceof A?w:r;++G<H;)R[G]=f[G];for(;D--;)R[G++]=arguments[++I];return Rt(ne,m?l:this,R)}return A}function cv(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),CL(i,l,f,r)}}function $a(r){return function(i,l){return typeof i=="string"&&typeof l=="string"||(i=gn(i),l=gn(l)),r(i,l)}}function fv(r,i,l,f,m,w,A,I,D,G){var H=i&U,R=H?A:n,ne=H?n:A,ue=H?w:n,ve=H?n:w;i|=H?M:B,i&=~(H?B:M),i&Q||(i&=-4);var Ee=[r,i,m,ue,R,ve,ne,I,D,G],be=l.apply(n,Ee);return hf(r)&&Sv(be,Ee),be.placeholder=f,Cv(be,r,i)}function sf(r){var i=vt[r];return function(l,f){if(l=gn(l),f=f==null?0:Pt(Ce(f),292),f&&Cy(l)){var m=(je(l)+"e").split("e"),w=i(m[0]+"e"+(+m[1]+f));return m=(je(w)+"e").split("e"),+(m[0]+"e"+(+m[1]-f))}return i(l)}}var UL=Ni&&1/sa(new Ni([,-0]))[1]==De?function(r){return new Ni(r)}:Of;function dv(r){return function(i){var l=$t(i);return l==Re?kc(i):l==Wt?rN(i):Jk(i,r(i))}}function Rn(r,i,l,f,m,w,A,I){var D=i&k;if(!D&&typeof r!="function")throw new cn(u);var G=f?f.length:0;if(G||(i&=-97,f=m=n),A=A===n?A:bt(Ce(A),0),I=I===n?I:Ce(I),G-=m?m.length:0,i&B){var H=f,R=m;f=m=n}var ne=D?n:uf(r),ue=[r,i,l,f,m,H,R,w,A,I];if(ne&&t5(ue,ne),r=ue[0],i=ue[1],l=ue[2],f=ue[3],m=ue[4],I=ue[9]=ue[9]===n?D?0:r.length:bt(ue[9]-G,0),!I&&i&(U|N)&&(i&=-25),!i||i==P)var ve=LL(r,i,l);else i==U||i==N?ve=BL(r,i,I):(i==M||i==(P|M))&&!m.length?ve=zL(r,i,l,f):ve=Oa.apply(n,ue);var Ee=ne?qy:Sv;return Cv(Ee(ve,ue),r,i)}function hv(r,i,l,f){return r===n||Cn(r,ki[l])&&!Ge.call(f,l)?i:r}function pv(r,i,l,f,m,w){return it(r)&&it(i)&&(w.set(i,r),Ca(r,i,n,pv,w),w.delete(i)),r}function WL(r){return zo(r)?n:r}function gv(r,i,l,f,m,w){var A=l&E,I=r.length,D=i.length;if(I!=D&&!(A&&D>I))return!1;var G=w.get(r),H=w.get(i);if(G&&H)return G==i&&H==r;var R=-1,ne=!0,ue=l&T?new Jr:n;for(w.set(r,i),w.set(i,r);++R<I;){var ve=r[R],Ee=i[R];if(f)var be=A?f(Ee,ve,R,i,r,w):f(ve,Ee,R,r,i,w);if(be!==n){if(be)continue;ne=!1;break}if(ue){if(!Ic(i,function(Pe,Me){if(!Eo(ue,Me)&&(ve===Pe||m(ve,Pe,l,f,w)))return ue.push(Me)})){ne=!1;break}}else if(!(ve===Ee||m(ve,Ee,l,f,w))){ne=!1;break}}return w.delete(r),w.delete(i),ne}function jL(r,i,l,f,m,w,A){switch(l){case qn:if(r.byteLength!=i.byteLength||r.byteOffset!=i.byteOffset)return!1;r=r.buffer,i=i.buffer;case mr:return!(r.byteLength!=i.byteLength||!w(new da(r),new da(i)));case he:case ge:case Nt:return Cn(+r,+i);case Ye:return r.name==i.name&&r.message==i.message;case hr:case Ur:return r==i+"";case Re:var I=kc;case Wt:var D=f&E;if(I||(I=sa),r.size!=i.size&&!D)return!1;var G=A.get(r);if(G)return G==i;f|=T,A.set(r,i);var H=gv(I(r),I(i),f,m,w,A);return A.delete(r),H;case pr:if(Po)return Po.call(r)==Po.call(i)}return!1}function VL(r,i,l,f,m,w){var A=l&E,I=af(r),D=I.length,G=af(i),H=G.length;if(D!=H&&!A)return!1;for(var R=D;R--;){var ne=I[R];if(!(A?ne in i:Ge.call(i,ne)))return!1}var ue=w.get(r),ve=w.get(i);if(ue&&ve)return ue==i&&ve==r;var Ee=!0;w.set(r,i),w.set(i,r);for(var be=A;++R<D;){ne=I[R];var Pe=r[ne],Me=i[ne];if(f)var en=A?f(Me,Pe,ne,i,r,w):f(Pe,Me,ne,r,i,w);if(!(en===n?Pe===Me||m(Pe,Me,l,f,w):en)){Ee=!1;break}be||(be=ne=="constructor")}if(Ee&&!be){var zt=r.constructor,tn=i.constructor;zt!=tn&&"constructor"in r&&"constructor"in i&&!(typeof zt=="function"&&zt instanceof zt&&typeof tn=="function"&&tn instanceof tn)&&(Ee=!1)}return w.delete(r),w.delete(i),Ee}function Zn(r){return gf(Tv(r,n,Pv),r+"")}function af(r){return ky(r,Ct,ff)}function lf(r){return ky(r,Ht,mv)}var uf=va?function(r){return va.get(r)}:Of;function Ma(r){for(var i=r.name+"",l=Li[i],f=Ge.call(Li,i)?l.length:0;f--;){var m=l[f],w=m.func;if(w==null||w==r)return m.name}return i}function Wi(r){var i=Ge.call(v,"placeholder")?v:r;return i.placeholder}function ye(){var r=v.iteratee||xf;return r=r===xf?By:r,arguments.length?r(arguments[0],arguments[1]):r}function Fa(r,i){var l=r.__data__;return ZL(i)?l[typeof i=="string"?"string":"hash"]:l.map}function cf(r){for(var i=Ct(r),l=i.length;l--;){var f=i[l],m=r[f];i[l]=[f,m,bv(m)]}return i}function Xr(r,i){var l=eN(r,i);return Ly(l)?l:n}function GL(r){var i=Ge.call(r,Yr),l=r[Yr];try{r[Yr]=n;var f=!0}catch{}var m=ca.call(r);return f&&(i?r[Yr]=l:delete r[Yr]),m}var ff=Lc?function(r){return r==null?[]:(r=Ze(r),Tr(Lc(r),function(i){return wy.call(r,i)}))}:If,mv=Lc?function(r){for(var i=[];r;)wr(i,ff(r)),r=ha(r);return i}:If,$t=Lt;(Bc&&$t(new Bc(new ArrayBuffer(1)))!=qn||Ao&&$t(new Ao)!=Re||zc&&$t(zc.resolve())!=Fn||Ni&&$t(new Ni)!=Wt||Oo&&$t(new Oo)!=sn)&&($t=function(r){var i=Lt(r),l=i==we?r.constructor:n,f=l?Qr(l):"";if(f)switch(f){case xN:return qn;case AN:return Re;case ON:return Fn;case IN:return Wt;case PN:return sn}return i});function HL(r,i,l){for(var f=-1,m=l.length;++f<m;){var w=l[f],A=w.size;switch(w.type){case"drop":r+=A;break;case"dropRight":i-=A;break;case"take":i=Pt(i,r+A);break;case"takeRight":r=bt(r,i-A);break}}return{start:r,end:i}}function qL(r){var i=r.match(Xs);return i?i[1].split(To):[]}function yv(r,i,l){i=Ar(i,r);for(var f=-1,m=i.length,w=!1;++f<m;){var A=Ln(i[f]);if(!(w=r!=null&&l(r,A)))break;r=r[A]}return w||++f!=m?w:(m=r==null?0:r.length,!!m&&Ua(m)&&Xn(A,m)&&(Se(r)||ei(r)))}function YL(r){var i=r.length,l=new r.constructor(i);return i&&typeof r[0]=="string"&&Ge.call(r,"index")&&(l.index=r.index,l.input=r.input),l}function vv(r){return typeof r.constructor=="function"&&!Lo(r)?Bi(ha(r)):{}}function KL(r,i,l){var f=r.constructor;switch(i){case mr:return rf(r);case he:case ge:return new f(+r);case qn:return $L(r,l);case Ci:case jr:case Ei:case yr:case vr:case Jt:case Dn:case Vr:case Gr:return ev(r,l);case Re:return new f;case Nt:case Ur:return new f(r);case hr:return ML(r);case Wt:return new f;case pr:return FL(r)}}function JL(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(Zs,`{
138
- /* [wrapped with `+i+`] */
139
- `)}function RL(r){return Se(r)||ei(r)||!!(Sy&&r&&r[Sy])}function Xn(r,i){var l=typeof r;return i=i??ke,!!i&&(l=="number"||l!="symbol"&&Z.test(r))&&r>-1&&r%1==0&&r<i}function Bt(r,i,l){if(!it(l))return!1;var f=typeof i;return(f=="number"?Gt(l)&&Xn(i,l.length):f=="string"&&i in l)?Cn(l[i],r):!1}function df(r,i){if(Se(r))return!1;var l=typeof r;return l=="number"||l=="symbol"||l=="boolean"||r==null||Qt(r)?!0:_o.test(r)||!Js.test(r)||i!=null&&r in Ze(i)}function ZL(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}function hf(r){var i=Ma(r),l=v[i];if(typeof l!="function"||!(i in $e.prototype))return!1;if(r===l)return!0;var f=uf(l);return!!f&&r===f[0]}function XL(r){return!!by&&by in r}var QL=la?Qn:Pf;function Lo(r){var i=r&&r.constructor,l=typeof i=="function"&&i.prototype||ki;return r===l}function bv(r){return r===r&&!it(r)}function _v(r,i){return function(l){return l==null?!1:l[r]===i&&(i!==n||r in Ze(l))}}function e5(r){var i=Ba(r,function(f){return l.size===p&&l.clear(),f}),l=i.cache;return i}function t5(r,i){var l=r[1],f=i[1],m=l|f,w=m<(P|k|Y),A=f==Y&&l==U||f==Y&&l==fe&&r[7].length<=i[8]||f==(Y|fe)&&i[7].length<=i[8]&&l==U;if(!(w||A))return r;f&P&&(r[2]=i[2],m|=l&P?0:Q);var I=i[3];if(I){var D=r[3];r[3]=D?nv(D,I,i[4]):I,r[4]=D?Sr(r[3],y):i[4]}return I=i[5],I&&(D=r[5],r[5]=D?rv(D,I,i[6]):I,r[6]=D?Sr(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 n5(r){var i=[];if(r!=null)for(var l in Ze(r))i.push(l);return i}function r5(r){return ca.call(r)}function Tv(r,i,l){return i=bt(i===n?r.length-1:i,0),function(){for(var f=arguments,m=-1,w=bt(f.length-i,0),A=L(w);++m<w;)A[m]=f[i+m];m=-1;for(var I=L(i+1);++m<i;)I[m]=f[m];return I[i]=l(A),Rt(r,this,I)}}function wv(r,i){return i.length<2?r:Zr(r,hn(i,0,-1))}function i5(r,i){for(var l=r.length,f=Pt(i.length,l),m=Vt(r);f--;){var w=i[f];r[f]=Xn(w,l)?m[w]:n}return r}function pf(r,i){if(!(i==="constructor"&&typeof r[i]=="function")&&i!="__proto__")return r[i]}var Sv=Ev(qy),Bo=bN||function(r,i){return xt.setTimeout(r,i)},gf=Ev(AL);function Cv(r,i,l){var f=i+"";return gf(r,JL(f,o5(qL(f),l)))}function Ev(r){var i=0,l=0;return function(){var f=SN(),m=ce-(f-l);if(l=f,m>0){if(++i>=te)return arguments[0]}else i=0;return r.apply(n,arguments)}}function Da(r,i){var l=-1,f=r.length,m=f-1;for(i=i===n?f:i;++l<i;){var w=Rc(l,m),A=r[w];r[w]=r[l],r[l]=A}return r.length=i,r}var xv=e5(function(r){var i=[];return r.charCodeAt(0)===46&&i.push(""),r.replace(Rs,function(l,f,m,w){i.push(m?w.replace(ea,"$1"):f||l)}),i});function Ln(r){if(typeof r=="string"||Qt(r))return r;var i=r+"";return i=="0"&&1/r==-1/0?"-0":i}function Qr(r){if(r!=null){try{return ua.call(r)}catch{}try{return r+""}catch{}}return""}function o5(r,i){return un(se,function(l){var f="_."+l[0];i&l[1]&&!ia(r,f)&&r.push(f)}),r.sort()}function Av(r){if(r instanceof $e)return r.clone();var i=new fn(r.__wrapped__,r.__chain__);return i.__actions__=Vt(r.__actions__),i.__index__=r.__index__,i.__values__=r.__values__,i}function s5(r,i,l){(l?Bt(r,i,l):i===n)?i=1:i=bt(Ce(i),0);var f=r==null?0:r.length;if(!f||i<1)return[];for(var m=0,w=0,A=L(ma(f/i));m<f;)A[w++]=hn(r,m,m+=i);return A}function a5(r){for(var i=-1,l=r==null?0:r.length,f=0,m=[];++i<l;){var w=r[i];w&&(m[f++]=w)}return m}function l5(){var r=arguments.length;if(!r)return[];for(var i=L(r-1),l=arguments[0],f=r;f--;)i[f-1]=arguments[f];return wr(Se(l)?Vt(l):[l],At(i,1))}var u5=Ae(function(r,i){return dt(r)?Mo(r,At(i,1,dt,!0)):[]}),c5=Ae(function(r,i){var l=pn(i);return dt(l)&&(l=n),dt(r)?Mo(r,At(i,1,dt,!0),ye(l,2)):[]}),f5=Ae(function(r,i){var l=pn(i);return dt(l)&&(l=n),dt(r)?Mo(r,At(i,1,dt,!0),n,l):[]});function d5(r,i,l){var f=r==null?0:r.length;return f?(i=l||i===n?1:Ce(i),hn(r,i<0?0:i,f)):[]}function h5(r,i,l){var f=r==null?0:r.length;return f?(i=l||i===n?1:Ce(i),i=f-i,hn(r,0,i<0?0:i)):[]}function p5(r,i){return r&&r.length?xa(r,ye(i,3),!0,!0):[]}function g5(r,i){return r&&r.length?xa(r,ye(i,3),!0):[]}function m5(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),lL(r,i,l,f)):[]}function Ov(r,i,l){var f=r==null?0:r.length;if(!f)return-1;var m=l==null?0:Ce(l);return m<0&&(m=bt(f+m,0)),oa(r,ye(i,3),m)}function Iv(r,i,l){var f=r==null?0:r.length;if(!f)return-1;var m=f-1;return l!==n&&(m=Ce(l),m=l<0?bt(f+m,0):Pt(m,f-1)),oa(r,ye(i,3),m,!0)}function Pv(r){var i=r==null?0:r.length;return i?At(r,1):[]}function y5(r){var i=r==null?0:r.length;return i?At(r,De):[]}function v5(r,i){var l=r==null?0:r.length;return l?(i=i===n?1:Ce(i),At(r,i)):[]}function b5(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 $v(r){return r&&r.length?r[0]:n}function _5(r,i,l){var f=r==null?0:r.length;if(!f)return-1;var m=l==null?0:Ce(l);return m<0&&(m=bt(f+m,0)),$i(r,i,m)}function T5(r){var i=r==null?0:r.length;return i?hn(r,0,-1):[]}var w5=Ae(function(r){var i=nt(r,tf);return i.length&&i[0]===r[0]?Hc(i):[]}),S5=Ae(function(r){var i=pn(r),l=nt(r,tf);return i===pn(l)?i=n:l.pop(),l.length&&l[0]===r[0]?Hc(l,ye(i,2)):[]}),C5=Ae(function(r){var i=pn(r),l=nt(r,tf);return i=typeof i=="function"?i:n,i&&l.pop(),l.length&&l[0]===r[0]?Hc(l,n,i):[]});function E5(r,i){return r==null?"":TN.call(r,i)}function pn(r){var i=r==null?0:r.length;return i?r[i-1]:n}function x5(r,i,l){var f=r==null?0:r.length;if(!f)return-1;var m=f;return l!==n&&(m=Ce(l),m=m<0?bt(f+m,0):Pt(m,f-1)),i===i?oN(r,i,m):oa(r,fy,m,!0)}function A5(r,i){return r&&r.length?jy(r,Ce(i)):n}var O5=Ae(Mv);function Mv(r,i){return r&&r.length&&i&&i.length?Jc(r,i):r}function I5(r,i,l){return r&&r.length&&i&&i.length?Jc(r,i,ye(l,2)):r}function P5(r,i,l){return r&&r.length&&i&&i.length?Jc(r,i,n,l):r}var $5=Zn(function(r,i){var l=r==null?0:r.length,f=Wc(r,i);return Hy(r,nt(i,function(m){return Xn(m,l)?+m:m}).sort(tv)),f});function M5(r,i){var l=[];if(!(r&&r.length))return l;var f=-1,m=[],w=r.length;for(i=ye(i,3);++f<w;){var A=r[f];i(A,f,r)&&(l.push(A),m.push(f))}return Hy(r,m),l}function mf(r){return r==null?r:EN.call(r)}function F5(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:Ce(i),l=l===n?f:Ce(l)),hn(r,i,l)):[]}function D5(r,i){return Ea(r,i)}function k5(r,i,l){return Xc(r,i,ye(l,2))}function N5(r,i){var l=r==null?0:r.length;if(l){var f=Ea(r,i);if(f<l&&Cn(r[f],i))return f}return-1}function L5(r,i){return Ea(r,i,!0)}function B5(r,i,l){return Xc(r,i,ye(l,2),!0)}function z5(r,i){var l=r==null?0:r.length;if(l){var f=Ea(r,i,!0)-1;if(Cn(r[f],i))return f}return-1}function U5(r){return r&&r.length?Yy(r):[]}function W5(r,i){return r&&r.length?Yy(r,ye(i,2)):[]}function j5(r){var i=r==null?0:r.length;return i?hn(r,1,i):[]}function V5(r,i,l){return r&&r.length?(i=l||i===n?1:Ce(i),hn(r,0,i<0?0:i)):[]}function G5(r,i,l){var f=r==null?0:r.length;return f?(i=l||i===n?1:Ce(i),i=f-i,hn(r,i<0?0:i,f)):[]}function H5(r,i){return r&&r.length?xa(r,ye(i,3),!1,!0):[]}function q5(r,i){return r&&r.length?xa(r,ye(i,3)):[]}var Y5=Ae(function(r){return xr(At(r,1,dt,!0))}),K5=Ae(function(r){var i=pn(r);return dt(i)&&(i=n),xr(At(r,1,dt,!0),ye(i,2))}),J5=Ae(function(r){var i=pn(r);return i=typeof i=="function"?i:n,xr(At(r,1,dt,!0),n,i)});function R5(r){return r&&r.length?xr(r):[]}function Z5(r,i){return r&&r.length?xr(r,ye(i,2)):[]}function X5(r,i){return i=typeof i=="function"?i:n,r&&r.length?xr(r,n,i):[]}function yf(r){if(!(r&&r.length))return[];var i=0;return r=Tr(r,function(l){if(dt(l))return i=bt(l.length,i),!0}),Fc(i,function(l){return nt(r,Pc(l))})}function Fv(r,i){if(!(r&&r.length))return[];var l=yf(r);return i==null?l:nt(l,function(f){return Rt(i,n,f)})}var Q5=Ae(function(r,i){return dt(r)?Mo(r,i):[]}),e3=Ae(function(r){return ef(Tr(r,dt))}),t3=Ae(function(r){var i=pn(r);return dt(i)&&(i=n),ef(Tr(r,dt),ye(i,2))}),n3=Ae(function(r){var i=pn(r);return i=typeof i=="function"?i:n,ef(Tr(r,dt),n,i)}),r3=Ae(yf);function i3(r,i){return Zy(r||[],i||[],$o)}function o3(r,i){return Zy(r||[],i||[],ko)}var s3=Ae(function(r){var i=r.length,l=i>1?r[i-1]:n;return l=typeof l=="function"?(r.pop(),l):n,Fv(r,l)});function Dv(r){var i=v(r);return i.__chain__=!0,i}function a3(r,i){return i(r),r}function ka(r,i){return i(r)}var l3=Zn(function(r){var i=r.length,l=i?r[0]:0,f=this.__wrapped__,m=function(w){return Wc(w,r)};return i>1||this.__actions__.length||!(f instanceof $e)||!Xn(l)?this.thru(m):(f=f.slice(l,+l+(i?1:0)),f.__actions__.push({func:ka,args:[m],thisArg:n}),new fn(f,this.__chain__).thru(function(w){return i&&!w.length&&w.push(n),w}))});function u3(){return Dv(this)}function c3(){return new fn(this.value(),this.__chain__)}function f3(){this.__values__===n&&(this.__values__=Kv(this.value()));var r=this.__index__>=this.__values__.length,i=r?n:this.__values__[this.__index__++];return{done:r,value:i}}function d3(){return this}function h3(r){for(var i,l=this;l instanceof _a;){var f=Av(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 p3(){var r=this.__wrapped__;if(r instanceof $e){var i=r;return this.__actions__.length&&(i=new $e(this)),i=i.reverse(),i.__actions__.push({func:ka,args:[mf],thisArg:n}),new fn(i,this.__chain__)}return this.thru(mf)}function g3(){return Ry(this.__wrapped__,this.__actions__)}var m3=Aa(function(r,i,l){Ge.call(r,l)?++r[l]:Jn(r,l,1)});function y3(r,i,l){var f=Se(r)?uy:aL;return l&&Bt(r,i,l)&&(i=n),f(r,ye(i,3))}function v3(r,i){var l=Se(r)?Tr:Fy;return l(r,ye(i,3))}var b3=av(Ov),_3=av(Iv);function T3(r,i){return At(Na(r,i),1)}function w3(r,i){return At(Na(r,i),De)}function S3(r,i,l){return l=l===n?1:Ce(l),At(Na(r,i),l)}function kv(r,i){var l=Se(r)?un:Er;return l(r,ye(i,3))}function Nv(r,i){var l=Se(r)?jk:My;return l(r,ye(i,3))}var C3=Aa(function(r,i,l){Ge.call(r,l)?r[l].push(i):Jn(r,l,[i])});function E3(r,i,l,f){r=Gt(r)?r:Vi(r),l=l&&!f?Ce(l):0;var m=r.length;return l<0&&(l=bt(m+l,0)),Wa(r)?l<=m&&r.indexOf(i,l)>-1:!!m&&$i(r,i,l)>-1}var x3=Ae(function(r,i,l){var f=-1,m=typeof i=="function",w=Gt(r)?L(r.length):[];return Er(r,function(A){w[++f]=m?Rt(i,A,l):Fo(A,i,l)}),w}),A3=Aa(function(r,i,l){Jn(r,l,i)});function Na(r,i){var l=Se(r)?nt:zy;return l(r,ye(i,3))}function O3(r,i,l,f){return r==null?[]:(Se(i)||(i=i==null?[]:[i]),l=f?n:l,Se(l)||(l=l==null?[]:[l]),Vy(r,i,l))}var I3=Aa(function(r,i,l){r[l?0:1].push(i)},function(){return[[],[]]});function P3(r,i,l){var f=Se(r)?Oc:hy,m=arguments.length<3;return f(r,ye(i,4),l,m,Er)}function $3(r,i,l){var f=Se(r)?Vk:hy,m=arguments.length<3;return f(r,ye(i,4),l,m,My)}function M3(r,i){var l=Se(r)?Tr:Fy;return l(r,za(ye(i,3)))}function F3(r){var i=Se(r)?Oy:EL;return i(r)}function D3(r,i,l){(l?Bt(r,i,l):i===n)?i=1:i=Ce(i);var f=Se(r)?nL:xL;return f(r,i)}function k3(r){var i=Se(r)?rL:OL;return i(r)}function N3(r){if(r==null)return 0;if(Gt(r))return Wa(r)?Fi(r):r.length;var i=$t(r);return i==Re||i==Wt?r.size:Yc(r).length}function L3(r,i,l){var f=Se(r)?Ic:IL;return l&&Bt(r,i,l)&&(i=n),f(r,ye(i,3))}var B3=Ae(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]]),Vy(r,At(i,1),[])}),La=vN||function(){return xt.Date.now()};function z3(r,i){if(typeof i!="function")throw new cn(u);return r=Ce(r),function(){if(--r<1)return i.apply(this,arguments)}}function Lv(r,i,l){return i=l?n:i,i=r&&i==null?r.length:i,Rn(r,Y,n,n,n,n,i)}function Bv(r,i){var l;if(typeof i!="function")throw new cn(u);return r=Ce(r),function(){return--r>0&&(l=i.apply(this,arguments)),r<=1&&(i=n),l}}var vf=Ae(function(r,i,l){var f=P;if(l.length){var m=Sr(l,Wi(vf));f|=M}return Rn(r,f,i,l,m)}),zv=Ae(function(r,i,l){var f=P|k;if(l.length){var m=Sr(l,Wi(zv));f|=M}return Rn(i,f,r,l,m)});function Uv(r,i,l){i=l?n:i;var f=Rn(r,U,n,n,n,n,n,i);return f.placeholder=Uv.placeholder,f}function Wv(r,i,l){i=l?n:i;var f=Rn(r,N,n,n,n,n,n,i);return f.placeholder=Wv.placeholder,f}function jv(r,i,l){var f,m,w,A,I,D,G=0,H=!1,R=!1,ne=!0;if(typeof r!="function")throw new cn(u);i=gn(i)||0,it(l)&&(H=!!l.leading,R="maxWait"in l,w=R?bt(gn(l.maxWait)||0,i):w,ne="trailing"in l?!!l.trailing:ne);function ue(ht){var En=f,tr=m;return f=m=n,G=ht,A=r.apply(tr,En),A}function ve(ht){return G=ht,I=Bo(Pe,i),H?ue(ht):A}function Ee(ht){var En=ht-D,tr=ht-G,ab=i-En;return R?Pt(ab,w-tr):ab}function be(ht){var En=ht-D,tr=ht-G;return D===n||En>=i||En<0||R&&tr>=w}function Pe(){var ht=La();if(be(ht))return Me(ht);I=Bo(Pe,Ee(ht))}function Me(ht){return I=n,ne&&f?ue(ht):(f=m=n,A)}function en(){I!==n&&Xy(I),G=0,f=D=m=I=n}function zt(){return I===n?A:Me(La())}function tn(){var ht=La(),En=be(ht);if(f=arguments,m=this,D=ht,En){if(I===n)return ve(D);if(R)return Xy(I),I=Bo(Pe,i),ue(D)}return I===n&&(I=Bo(Pe,i)),A}return tn.cancel=en,tn.flush=zt,tn}var U3=Ae(function(r,i){return $y(r,1,i)}),W3=Ae(function(r,i,l){return $y(r,gn(i)||0,l)});function j3(r){return Rn(r,ie)}function Ba(r,i){if(typeof r!="function"||i!=null&&typeof i!="function")throw new cn(u);var l=function(){var f=arguments,m=i?i.apply(this,f):f[0],w=l.cache;if(w.has(m))return w.get(m);var A=r.apply(this,f);return l.cache=w.set(m,A)||w,A};return l.cache=new(Ba.Cache||Kn),l}Ba.Cache=Kn;function za(r){if(typeof r!="function")throw new cn(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 V3(r){return Bv(2,r)}var G3=PL(function(r,i){i=i.length==1&&Se(i[0])?nt(i[0],Zt(ye())):nt(At(i,1),Zt(ye()));var l=i.length;return Ae(function(f){for(var m=-1,w=Pt(f.length,l);++m<w;)f[m]=i[m].call(this,f[m]);return Rt(r,this,f)})}),bf=Ae(function(r,i){var l=Sr(i,Wi(bf));return Rn(r,M,n,i,l)}),Vv=Ae(function(r,i){var l=Sr(i,Wi(Vv));return Rn(r,B,n,i,l)}),H3=Zn(function(r,i){return Rn(r,fe,n,n,n,i)});function q3(r,i){if(typeof r!="function")throw new cn(u);return i=i===n?i:Ce(i),Ae(r,i)}function Y3(r,i){if(typeof r!="function")throw new cn(u);return i=i==null?0:bt(Ce(i),0),Ae(function(l){var f=l[i],m=Or(l,0,i);return f&&wr(m,f),Rt(r,this,m)})}function K3(r,i,l){var f=!0,m=!0;if(typeof r!="function")throw new cn(u);return it(l)&&(f="leading"in l?!!l.leading:f,m="trailing"in l?!!l.trailing:m),jv(r,i,{leading:f,maxWait:i,trailing:m})}function J3(r){return Lv(r,1)}function R3(r,i){return bf(nf(i),r)}function Z3(){if(!arguments.length)return[];var r=arguments[0];return Se(r)?r:[r]}function X3(r){return dn(r,C)}function Q3(r,i){return i=typeof i=="function"?i:n,dn(r,C,i)}function e4(r){return dn(r,g|C)}function t4(r,i){return i=typeof i=="function"?i:n,dn(r,g|C,i)}function n4(r,i){return i==null||Py(r,i,Ct(i))}function Cn(r,i){return r===i||r!==r&&i!==i}var r4=$a(Gc),i4=$a(function(r,i){return r>=i}),ei=Ny(function(){return arguments}())?Ny:function(r){return ut(r)&&Ge.call(r,"callee")&&!wy.call(r,"callee")},Se=L.isArray,o4=ry?Zt(ry):hL;function Gt(r){return r!=null&&Ua(r.length)&&!Qn(r)}function dt(r){return ut(r)&&Gt(r)}function s4(r){return r===!0||r===!1||ut(r)&&Lt(r)==he}var Ir=_N||Pf,a4=iy?Zt(iy):pL;function l4(r){return ut(r)&&r.nodeType===1&&!zo(r)}function u4(r){if(r==null)return!0;if(Gt(r)&&(Se(r)||typeof r=="string"||typeof r.splice=="function"||Ir(r)||ji(r)||ei(r)))return!r.length;var i=$t(r);if(i==Re||i==Wt)return!r.size;if(Lo(r))return!Yc(r).length;for(var l in r)if(Ge.call(r,l))return!1;return!0}function c4(r,i){return Do(r,i)}function f4(r,i,l){l=typeof l=="function"?l:n;var f=l?l(r,i):n;return f===n?Do(r,i,n,l):!!f}function _f(r){if(!ut(r))return!1;var i=Lt(r);return i==Ye||i==xe||typeof r.message=="string"&&typeof r.name=="string"&&!zo(r)}function d4(r){return typeof r=="number"&&Cy(r)}function Qn(r){if(!it(r))return!1;var i=Lt(r);return i==ee||i==yt||i==re||i==Si}function Gv(r){return typeof r=="number"&&r==Ce(r)}function Ua(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=ke}function it(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}function ut(r){return r!=null&&typeof r=="object"}var Hv=oy?Zt(oy):mL;function h4(r,i){return r===i||qc(r,i,cf(i))}function p4(r,i,l){return l=typeof l=="function"?l:n,qc(r,i,cf(i),l)}function g4(r){return qv(r)&&r!=+r}function m4(r){if(QL(r))throw new Te(a);return Ly(r)}function y4(r){return r===null}function v4(r){return r==null}function qv(r){return typeof r=="number"||ut(r)&&Lt(r)==Nt}function zo(r){if(!ut(r)||Lt(r)!=we)return!1;var i=ha(r);if(i===null)return!0;var l=Ge.call(i,"constructor")&&i.constructor;return typeof l=="function"&&l instanceof l&&ua.call(l)==pN}var Tf=sy?Zt(sy):yL;function b4(r){return Gv(r)&&r>=-9007199254740991&&r<=ke}var Yv=ay?Zt(ay):vL;function Wa(r){return typeof r=="string"||!Se(r)&&ut(r)&&Lt(r)==Ur}function Qt(r){return typeof r=="symbol"||ut(r)&&Lt(r)==pr}var ji=ly?Zt(ly):bL;function _4(r){return r===n}function T4(r){return ut(r)&&$t(r)==sn}function w4(r){return ut(r)&&Lt(r)==gr}var S4=$a(Kc),C4=$a(function(r,i){return r<=i});function Kv(r){if(!r)return[];if(Gt(r))return Wa(r)?wn(r):Vt(r);if(xo&&r[xo])return nN(r[xo]());var i=$t(r),l=i==Re?kc:i==Wt?sa:Vi;return l(r)}function er(r){if(!r)return r===0?r:0;if(r=gn(r),r===De||r===-1/0){var i=r<0?-1:1;return i*mt}return r===r?r:0}function Ce(r){var i=er(r),l=i%1;return i===i?l?i-l:i:0}function Jv(r){return r?Rr(Ce(r),0,J):0}function gn(r){if(typeof r=="number")return r;if(Qt(r))return K;if(it(r)){var i=typeof r.valueOf=="function"?r.valueOf():r;r=it(i)?i+"":i}if(typeof r!="string")return r===0?r:+r;r=py(r);var l=bc.test(r);return l||$.test(r)?zk(r.slice(2),l?2:8):na.test(r)?K:+r}function Rv(r){return Nn(r,Ht(r))}function E4(r){return r?Rr(Ce(r),-9007199254740991,ke):r===0?r:0}function je(r){return r==null?"":Xt(r)}var x4=zi(function(r,i){if(Lo(i)||Gt(i)){Nn(i,Ct(i),r);return}for(var l in i)Ge.call(i,l)&&$o(r,l,i[l])}),Zv=zi(function(r,i){Nn(i,Ht(i),r)}),ja=zi(function(r,i,l,f){Nn(i,Ht(i),r,f)}),A4=zi(function(r,i,l,f){Nn(i,Ct(i),r,f)}),O4=Zn(Wc);function I4(r,i){var l=Bi(r);return i==null?l:Iy(l,i)}var P4=Ae(function(r,i){r=Ze(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 w=i[l],A=Ht(w),I=-1,D=A.length;++I<D;){var G=A[I],H=r[G];(H===n||Cn(H,ki[G])&&!Ge.call(r,G))&&(r[G]=w[G])}return r}),$4=Ae(function(r){return r.push(n,pv),Rt(Xv,n,r)});function M4(r,i){return cy(r,ye(i,3),kn)}function F4(r,i){return cy(r,ye(i,3),Vc)}function D4(r,i){return r==null?r:jc(r,ye(i,3),Ht)}function k4(r,i){return r==null?r:Dy(r,ye(i,3),Ht)}function N4(r,i){return r&&kn(r,ye(i,3))}function L4(r,i){return r&&Vc(r,ye(i,3))}function B4(r){return r==null?[]:Sa(r,Ct(r))}function z4(r){return r==null?[]:Sa(r,Ht(r))}function wf(r,i,l){var f=r==null?n:Zr(r,i);return f===n?l:f}function U4(r,i){return r!=null&&yv(r,i,uL)}function Sf(r,i){return r!=null&&yv(r,i,cL)}var W4=uv(function(r,i,l){i!=null&&typeof i.toString!="function"&&(i=ca.call(i)),r[i]=l},Ef(qt)),j4=uv(function(r,i,l){i!=null&&typeof i.toString!="function"&&(i=ca.call(i)),Ge.call(r,i)?r[i].push(l):r[i]=[l]},ye),V4=Ae(Fo);function Ct(r){return Gt(r)?Ay(r):Yc(r)}function Ht(r){return Gt(r)?Ay(r,!0):_L(r)}function G4(r,i){var l={};return i=ye(i,3),kn(r,function(f,m,w){Jn(l,i(f,m,w),f)}),l}function H4(r,i){var l={};return i=ye(i,3),kn(r,function(f,m,w){Jn(l,m,i(f,m,w))}),l}var q4=zi(function(r,i,l){Ca(r,i,l)}),Xv=zi(function(r,i,l,f){Ca(r,i,l,f)}),Y4=Zn(function(r,i){var l={};if(r==null)return l;var f=!1;i=nt(i,function(w){return w=Ar(w,r),f||(f=w.length>1),w}),Nn(r,lf(r),l),f&&(l=dn(l,g|_|C,WL));for(var m=i.length;m--;)Qc(l,i[m]);return l});function K4(r,i){return Qv(r,za(ye(i)))}var J4=Zn(function(r,i){return r==null?{}:wL(r,i)});function Qv(r,i){if(r==null)return{};var l=nt(lf(r),function(f){return[f]});return i=ye(i),Gy(r,l,function(f,m){return i(f,m[0])})}function R4(r,i,l){i=Ar(i,r);var f=-1,m=i.length;for(m||(m=1,r=n);++f<m;){var w=r==null?n:r[Ln(i[f])];w===n&&(f=m,w=l),r=Qn(w)?w.call(r):w}return r}function Z4(r,i,l){return r==null?r:ko(r,i,l)}function X4(r,i,l,f){return f=typeof f=="function"?f:n,r==null?r:ko(r,i,l,f)}var eb=dv(Ct),tb=dv(Ht);function Q4(r,i,l){var f=Se(r),m=f||Ir(r)||ji(r);if(i=ye(i,4),l==null){var w=r&&r.constructor;m?l=f?new w:[]:it(r)?l=Qn(w)?Bi(ha(r)):{}:l={}}return(m?un:kn)(r,function(A,I,D){return i(l,A,I,D)}),l}function eB(r,i){return r==null?!0:Qc(r,i)}function tB(r,i,l){return r==null?r:Jy(r,i,nf(l))}function nB(r,i,l,f){return f=typeof f=="function"?f:n,r==null?r:Jy(r,i,nf(l),f)}function Vi(r){return r==null?[]:Dc(r,Ct(r))}function rB(r){return r==null?[]:Dc(r,Ht(r))}function iB(r,i,l){return l===n&&(l=i,i=n),l!==n&&(l=gn(l),l=l===l?l:0),i!==n&&(i=gn(i),i=i===i?i:0),Rr(gn(r),i,l)}function oB(r,i,l){return i=er(i),l===n?(l=i,i=0):l=er(l),r=gn(r),fL(r,i,l)}function sB(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=Ey();return Pt(r+m*(i-r+Bk("1e-"+((m+"").length-1))),i)}return Rc(r,i)}var aB=Ui(function(r,i,l){return i=i.toLowerCase(),r+(l?nb(i):i)});function nb(r){return Cf(je(r).toLowerCase())}function rb(r){return r=je(r),r&&r.replace(ae,Zk).replace(Ok,"")}function lB(r,i,l){r=je(r),i=Xt(i);var f=r.length;l=l===n?f:Rr(Ce(l),0,f);var m=l;return l-=i.length,l>=0&&r.slice(l,m)==i}function uB(r){return r=je(r),r&&yc.test(r)?r.replace(br,Xk):r}function cB(r){return r=je(r),r&&vc.test(r)?r.replace(Oi,"\\$&"):r}var fB=Ui(function(r,i,l){return r+(l?"-":"")+i.toLowerCase()}),dB=Ui(function(r,i,l){return r+(l?" ":"")+i.toLowerCase()}),hB=sv("toLowerCase");function pB(r,i,l){r=je(r),i=Ce(i);var f=i?Fi(r):0;if(!i||f>=i)return r;var m=(i-f)/2;return Pa(ya(m),l)+r+Pa(ma(m),l)}function gB(r,i,l){r=je(r),i=Ce(i);var f=i?Fi(r):0;return i&&f<i?r+Pa(i-f,l):r}function mB(r,i,l){r=je(r),i=Ce(i);var f=i?Fi(r):0;return i&&f<i?Pa(i-f,l)+r:r}function yB(r,i,l){return l||i==null?i=0:i&&(i=+i),CN(je(r).replace(jt,""),i||0)}function vB(r,i,l){return(l?Bt(r,i,l):i===n)?i=1:i=Ce(i),Zc(je(r),i)}function bB(){var r=arguments,i=je(r[0]);return r.length<3?i:i.replace(r[1],r[2])}var _B=Ui(function(r,i,l){return r+(l?"_":"")+i.toLowerCase()});function TB(r,i,l){return l&&typeof l!="number"&&Bt(r,i,l)&&(i=l=n),l=l===n?J:l>>>0,l?(r=je(r),r&&(typeof i=="string"||i!=null&&!Tf(i))&&(i=Xt(i),!i&&Mi(r))?Or(wn(r),0,l):r.split(i,l)):[]}var wB=Ui(function(r,i,l){return r+(l?" ":"")+Cf(i)});function SB(r,i,l){return r=je(r),l=l==null?0:Rr(Ce(l),0,r.length),i=Xt(i),r.slice(l,l+i.length)==i}function CB(r,i,l){var f=v.templateSettings;l&&Bt(r,i,l)&&(i=n),r=je(r),i=ja({},i,f,hv);var m=ja({},i.imports,f.imports,hv),w=Ct(m),A=Dc(m,w),I,D,G=0,H=i.interpolate||Ve,R="__p += '",ne=Nc((i.escape||Ve).source+"|"+H.source+"|"+(H===Ks?ta:Ve).source+"|"+(i.evaluate||Ve).source+"|$","g"),ue="//# sourceURL="+(Ge.call(i,"sourceURL")?(i.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Fk+"]")+`
140
- `;r.replace(ne,function(be,Pe,Me,en,zt,tn){return Me||(Me=en),R+=r.slice(G,tn).replace(wt,Qk),Pe&&(I=!0,R+=`' +
141
- __e(`+Pe+`) +
142
- '`),zt&&(D=!0,R+=`';
143
- `+zt+`;
144
- __p += '`),Me&&(R+=`' +
145
- ((__t = (`+Me+`)) == null ? '' : __t) +
146
- '`),G=tn+be.length,be}),R+=`';
147
- `;var ve=Ge.call(i,"variable")&&i.variable;if(!ve)R=`with (obj) {
148
- `+R+`
292
+ */var zI=Wi.exports,Av;function RI(){return Av||(Av=1,function(e,n){(function(){var t,r="4.17.21",o=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",u="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",g=500,h="__lodash_placeholder__",p=1,_=2,v=4,y=1,C=2,S=1,T=2,E=4,F=8,L=16,O=32,P=64,k=128,z=256,j=512,$=30,H="...",re=800,Z=16,ne=1,ce=2,q=3,U=1/0,le=9007199254740991,_e=17976931348623157e292,he=NaN,de=4294967295,Ae=de-1,ue=de>>>1,pe=[["ary",k],["bind",S],["bindKey",T],["curry",F],["curryRight",L],["flip",j],["partial",O],["partialRight",P],["rearg",z]],K="[object Arguments]",ee="[object Array]",oe="[object AsyncFunction]",xe="[object Boolean]",X="[object Date]",Ne="[object DOMException]",Je="[object Error]",Ge="[object Function]",st="[object GeneratorFunction]",Re="[object Map]",De="[object Number]",Pe="[object Null]",Oe="[object Object]",Q="[object Promise]",Be="[object Proxy]",rt="[object RegExp]",Ze="[object Set]",Nt="[object String]",Ct="[object Symbol]",ot="[object Undefined]",Ft="[object WeakMap]",Jt="[object WeakSet]",$t="[object ArrayBuffer]",Tt="[object DataView]",cn="[object Float32Array]",Xe="[object Float64Array]",gt="[object Int8Array]",At="[object Int16Array]",Yt="[object Int32Array]",Zt="[object Uint8Array]",bn="[object Uint8ClampedArray]",nr="[object Uint16Array]",rr="[object Uint32Array]",uo=/\b__p \+= '';/g,Sr=/\b(__p \+=) '' \+/g,Tr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,_i=/&(?:amp|lt|gt|quot|#39);/g,Wn=/[&<>"']/g,co=RegExp(_i.source),fo=RegExp(Wn.source),ht=/<%-([\s\S]+?)%>/g,Kn=/<%([\s\S]+?)%>/g,bi=/<%=([\s\S]+?)%>/g,we=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ir=/^\w*$/,ut=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,pt=/[\\^$.*+?()[\]{}|]/g,Xt=RegExp(pt.source),vt=/^\s+/,Qt=/\s/,Mr=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Pl=/\{\n\/\* \[wrapped with (.+)\] \*/,go=/,? & /,Dl=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ln=/[()=,{}\[\]\/\s]/,kl=/\\(\\)?/g,Ll=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ho=/\w*$/,Nl=/^[-+]0x[0-9a-f]+$/i,Rf=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,R=/^0o[0-7]+$/i,ie=/^(?:0|[1-9]\d*)$/,ve=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,tt=/($^)/,Ot=/['\n\r\u2028\u2029\\]/g,mt="\\ud800-\\udfff",Ht="\\u0300-\\u036f",yn="\\ufe20-\\ufe2f",Ur="\\u20d0-\\u20ff",Pt=Ht+yn+Ur,po="\\u2700-\\u27bf",vo="a-z\\xdf-\\xf6\\xf8-\\xff",FO="\\xac\\xb1\\xd7\\xf7",AO="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",OO="\\u2000-\\u206f",PO=" \\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",ow="A-Z\\xc0-\\xd6\\xd8-\\xde",lw="\\ufe0e\\ufe0f",sw=FO+AO+OO+PO,Bf="['’]",DO="["+mt+"]",aw="["+sw+"]",zl="["+Pt+"]",uw="\\d+",kO="["+po+"]",cw="["+vo+"]",dw="[^"+mt+sw+uw+po+vo+ow+"]",Vf="\\ud83c[\\udffb-\\udfff]",LO="(?:"+zl+"|"+Vf+")",fw="[^"+mt+"]",$f="(?:\\ud83c[\\udde6-\\uddff]){2}",Hf="[\\ud800-\\udbff][\\udc00-\\udfff]",yi="["+ow+"]",gw="\\u200d",hw="(?:"+cw+"|"+dw+")",NO="(?:"+yi+"|"+dw+")",pw="(?:"+Bf+"(?:d|ll|m|re|s|t|ve))?",vw="(?:"+Bf+"(?:D|LL|M|RE|S|T|VE))?",mw=LO+"?",_w="["+lw+"]?",zO="(?:"+gw+"(?:"+[fw,$f,Hf].join("|")+")"+_w+mw+")*",RO="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",BO="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",bw=_w+mw+zO,VO="(?:"+[kO,$f,Hf].join("|")+")"+bw,$O="(?:"+[fw+zl+"?",zl,$f,Hf,DO].join("|")+")",HO=RegExp(Bf,"g"),jO=RegExp(zl,"g"),jf=RegExp(Vf+"(?="+Vf+")|"+$O+bw,"g"),qO=RegExp([yi+"?"+cw+"+"+pw+"(?="+[aw,yi,"$"].join("|")+")",NO+"+"+vw+"(?="+[aw,yi+hw,"$"].join("|")+")",yi+"?"+hw+"+"+pw,yi+"+"+vw,BO,RO,uw,VO].join("|"),"g"),GO=RegExp("["+gw+mt+Pt+lw+"]"),UO=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,WO=["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"],KO=-1,at={};at[cn]=at[Xe]=at[gt]=at[At]=at[Yt]=at[Zt]=at[bn]=at[nr]=at[rr]=!0,at[K]=at[ee]=at[$t]=at[xe]=at[Tt]=at[X]=at[Je]=at[Ge]=at[Re]=at[De]=at[Oe]=at[rt]=at[Ze]=at[Nt]=at[Ft]=!1;var lt={};lt[K]=lt[ee]=lt[$t]=lt[Tt]=lt[xe]=lt[X]=lt[cn]=lt[Xe]=lt[gt]=lt[At]=lt[Yt]=lt[Re]=lt[De]=lt[Oe]=lt[rt]=lt[Ze]=lt[Nt]=lt[Ct]=lt[Zt]=lt[bn]=lt[nr]=lt[rr]=!0,lt[Je]=lt[Ge]=lt[Ft]=!1;var JO={À:"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"},YO={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ZO={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},XO={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},QO=parseFloat,eP=parseInt,yw=typeof hr=="object"&&hr&&hr.Object===Object&&hr,tP=typeof self=="object"&&self&&self.Object===Object&&self,zt=yw||tP||Function("return this")(),qf=n&&!n.nodeType&&n,Wr=qf&&!0&&e&&!e.nodeType&&e,ww=Wr&&Wr.exports===qf,Gf=ww&&yw.process,wn=function(){try{var B=Wr&&Wr.require&&Wr.require("util").types;return B||Gf&&Gf.binding&&Gf.binding("util")}catch{}}(),Cw=wn&&wn.isArrayBuffer,Sw=wn&&wn.isDate,Tw=wn&&wn.isMap,Iw=wn&&wn.isRegExp,Mw=wn&&wn.isSet,xw=wn&&wn.isTypedArray;function dn(B,W,G){switch(G.length){case 0:return B.call(W);case 1:return B.call(W,G[0]);case 2:return B.call(W,G[0],G[1]);case 3:return B.call(W,G[0],G[1],G[2])}return B.apply(W,G)}function nP(B,W,G,fe){for(var ke=-1,Qe=B==null?0:B.length;++ke<Qe;){var It=B[ke];W(fe,It,G(It),B)}return fe}function Cn(B,W){for(var G=-1,fe=B==null?0:B.length;++G<fe&&W(B[G],G,B)!==!1;);return B}function rP(B,W){for(var G=B==null?0:B.length;G--&&W(B[G],G,B)!==!1;);return B}function Ew(B,W){for(var G=-1,fe=B==null?0:B.length;++G<fe;)if(!W(B[G],G,B))return!1;return!0}function xr(B,W){for(var G=-1,fe=B==null?0:B.length,ke=0,Qe=[];++G<fe;){var It=B[G];W(It,G,B)&&(Qe[ke++]=It)}return Qe}function Rl(B,W){var G=B==null?0:B.length;return!!G&&wi(B,W,0)>-1}function Uf(B,W,G){for(var fe=-1,ke=B==null?0:B.length;++fe<ke;)if(G(W,B[fe]))return!0;return!1}function ct(B,W){for(var G=-1,fe=B==null?0:B.length,ke=Array(fe);++G<fe;)ke[G]=W(B[G],G,B);return ke}function Er(B,W){for(var G=-1,fe=W.length,ke=B.length;++G<fe;)B[ke+G]=W[G];return B}function Wf(B,W,G,fe){var ke=-1,Qe=B==null?0:B.length;for(fe&&Qe&&(G=B[++ke]);++ke<Qe;)G=W(G,B[ke],ke,B);return G}function iP(B,W,G,fe){var ke=B==null?0:B.length;for(fe&&ke&&(G=B[--ke]);ke--;)G=W(G,B[ke],ke,B);return G}function Kf(B,W){for(var G=-1,fe=B==null?0:B.length;++G<fe;)if(W(B[G],G,B))return!0;return!1}var oP=Jf("length");function lP(B){return B.split("")}function sP(B){return B.match(Dl)||[]}function Fw(B,W,G){var fe;return G(B,function(ke,Qe,It){if(W(ke,Qe,It))return fe=Qe,!1}),fe}function Bl(B,W,G,fe){for(var ke=B.length,Qe=G+(fe?1:-1);fe?Qe--:++Qe<ke;)if(W(B[Qe],Qe,B))return Qe;return-1}function wi(B,W,G){return W===W?bP(B,W,G):Bl(B,Aw,G)}function aP(B,W,G,fe){for(var ke=G-1,Qe=B.length;++ke<Qe;)if(fe(B[ke],W))return ke;return-1}function Aw(B){return B!==B}function Ow(B,W){var G=B==null?0:B.length;return G?Zf(B,W)/G:he}function Jf(B){return function(W){return W==null?t:W[B]}}function Yf(B){return function(W){return B==null?t:B[W]}}function Pw(B,W,G,fe,ke){return ke(B,function(Qe,It,it){G=fe?(fe=!1,Qe):W(G,Qe,It,it)}),G}function uP(B,W){var G=B.length;for(B.sort(W);G--;)B[G]=B[G].value;return B}function Zf(B,W){for(var G,fe=-1,ke=B.length;++fe<ke;){var Qe=W(B[fe]);Qe!==t&&(G=G===t?Qe:G+Qe)}return G}function Xf(B,W){for(var G=-1,fe=Array(B);++G<B;)fe[G]=W(G);return fe}function cP(B,W){return ct(W,function(G){return[G,B[G]]})}function Dw(B){return B&&B.slice(0,zw(B)+1).replace(vt,"")}function fn(B){return function(W){return B(W)}}function Qf(B,W){return ct(W,function(G){return B[G]})}function mo(B,W){return B.has(W)}function kw(B,W){for(var G=-1,fe=B.length;++G<fe&&wi(W,B[G],0)>-1;);return G}function Lw(B,W){for(var G=B.length;G--&&wi(W,B[G],0)>-1;);return G}function dP(B,W){for(var G=B.length,fe=0;G--;)B[G]===W&&++fe;return fe}var fP=Yf(JO),gP=Yf(YO);function hP(B){return"\\"+XO[B]}function pP(B,W){return B==null?t:B[W]}function Ci(B){return GO.test(B)}function vP(B){return UO.test(B)}function mP(B){for(var W,G=[];!(W=B.next()).done;)G.push(W.value);return G}function eg(B){var W=-1,G=Array(B.size);return B.forEach(function(fe,ke){G[++W]=[ke,fe]}),G}function Nw(B,W){return function(G){return B(W(G))}}function Fr(B,W){for(var G=-1,fe=B.length,ke=0,Qe=[];++G<fe;){var It=B[G];(It===W||It===h)&&(B[G]=h,Qe[ke++]=G)}return Qe}function Vl(B){var W=-1,G=Array(B.size);return B.forEach(function(fe){G[++W]=fe}),G}function _P(B){var W=-1,G=Array(B.size);return B.forEach(function(fe){G[++W]=[fe,fe]}),G}function bP(B,W,G){for(var fe=G-1,ke=B.length;++fe<ke;)if(B[fe]===W)return fe;return-1}function yP(B,W,G){for(var fe=G+1;fe--;)if(B[fe]===W)return fe;return fe}function Si(B){return Ci(B)?CP(B):oP(B)}function Nn(B){return Ci(B)?SP(B):lP(B)}function zw(B){for(var W=B.length;W--&&Qt.test(B.charAt(W)););return W}var wP=Yf(ZO);function CP(B){for(var W=jf.lastIndex=0;jf.test(B);)++W;return W}function SP(B){return B.match(jf)||[]}function TP(B){return B.match(qO)||[]}var IP=function B(W){W=W==null?zt:Ti.defaults(zt.Object(),W,Ti.pick(zt,WO));var G=W.Array,fe=W.Date,ke=W.Error,Qe=W.Function,It=W.Math,it=W.Object,tg=W.RegExp,MP=W.String,Sn=W.TypeError,$l=G.prototype,xP=Qe.prototype,Ii=it.prototype,Hl=W["__core-js_shared__"],jl=xP.toString,nt=Ii.hasOwnProperty,EP=0,Rw=function(){var i=/[^.]+$/.exec(Hl&&Hl.keys&&Hl.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}(),ql=Ii.toString,FP=jl.call(it),AP=zt._,OP=tg("^"+jl.call(nt).replace(pt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Gl=ww?W.Buffer:t,Ar=W.Symbol,Ul=W.Uint8Array,Bw=Gl?Gl.allocUnsafe:t,Wl=Nw(it.getPrototypeOf,it),Vw=it.create,$w=Ii.propertyIsEnumerable,Kl=$l.splice,Hw=Ar?Ar.isConcatSpreadable:t,_o=Ar?Ar.iterator:t,Kr=Ar?Ar.toStringTag:t,Jl=function(){try{var i=Qr(it,"defineProperty");return i({},"",{}),i}catch{}}(),PP=W.clearTimeout!==zt.clearTimeout&&W.clearTimeout,DP=fe&&fe.now!==zt.Date.now&&fe.now,kP=W.setTimeout!==zt.setTimeout&&W.setTimeout,Yl=It.ceil,Zl=It.floor,ng=it.getOwnPropertySymbols,LP=Gl?Gl.isBuffer:t,jw=W.isFinite,NP=$l.join,zP=Nw(it.keys,it),Mt=It.max,jt=It.min,RP=fe.now,BP=W.parseInt,qw=It.random,VP=$l.reverse,rg=Qr(W,"DataView"),bo=Qr(W,"Map"),ig=Qr(W,"Promise"),Mi=Qr(W,"Set"),yo=Qr(W,"WeakMap"),wo=Qr(it,"create"),Xl=yo&&new yo,xi={},$P=ei(rg),HP=ei(bo),jP=ei(ig),qP=ei(Mi),GP=ei(yo),Ql=Ar?Ar.prototype:t,Co=Ql?Ql.valueOf:t,Gw=Ql?Ql.toString:t;function M(i){if(_t(i)&&!Le(i)&&!(i instanceof Ke)){if(i instanceof Tn)return i;if(nt.call(i,"__wrapped__"))return UC(i)}return new Tn(i)}var Ei=function(){function i(){}return function(l){if(!dt(l))return{};if(Vw)return Vw(l);i.prototype=l;var d=new i;return i.prototype=t,d}}();function es(){}function Tn(i,l){this.__wrapped__=i,this.__actions__=[],this.__chain__=!!l,this.__index__=0,this.__values__=t}M.templateSettings={escape:ht,evaluate:Kn,interpolate:bi,variable:"",imports:{_:M}},M.prototype=es.prototype,M.prototype.constructor=M,Tn.prototype=Ei(es.prototype),Tn.prototype.constructor=Tn;function Ke(i){this.__wrapped__=i,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=de,this.__views__=[]}function UP(){var i=new Ke(this.__wrapped__);return i.__actions__=on(this.__actions__),i.__dir__=this.__dir__,i.__filtered__=this.__filtered__,i.__iteratees__=on(this.__iteratees__),i.__takeCount__=this.__takeCount__,i.__views__=on(this.__views__),i}function WP(){if(this.__filtered__){var i=new Ke(this);i.__dir__=-1,i.__filtered__=!0}else i=this.clone(),i.__dir__*=-1;return i}function KP(){var i=this.__wrapped__.value(),l=this.__dir__,d=Le(i),m=l<0,w=d?i.length:0,x=l2(0,w,this.__views__),A=x.start,N=x.end,V=N-A,J=m?N:A-1,Y=this.__iteratees__,te=Y.length,ae=0,be=jt(V,this.__takeCount__);if(!d||!m&&w==V&&be==V)return pC(i,this.__actions__);var Ee=[];e:for(;V--&&ae<be;){J+=l;for(var Ve=-1,Fe=i[J];++Ve<te;){var Ue=Y[Ve],Ye=Ue.iteratee,pn=Ue.type,nn=Ye(Fe);if(pn==ce)Fe=nn;else if(!nn){if(pn==ne)continue e;break e}}Ee[ae++]=Fe}return Ee}Ke.prototype=Ei(es.prototype),Ke.prototype.constructor=Ke;function Jr(i){var l=-1,d=i==null?0:i.length;for(this.clear();++l<d;){var m=i[l];this.set(m[0],m[1])}}function JP(){this.__data__=wo?wo(null):{},this.size=0}function YP(i){var l=this.has(i)&&delete this.__data__[i];return this.size-=l?1:0,l}function ZP(i){var l=this.__data__;if(wo){var d=l[i];return d===f?t:d}return nt.call(l,i)?l[i]:t}function XP(i){var l=this.__data__;return wo?l[i]!==t:nt.call(l,i)}function QP(i,l){var d=this.__data__;return this.size+=this.has(i)?0:1,d[i]=wo&&l===t?f:l,this}Jr.prototype.clear=JP,Jr.prototype.delete=YP,Jr.prototype.get=ZP,Jr.prototype.has=XP,Jr.prototype.set=QP;function ir(i){var l=-1,d=i==null?0:i.length;for(this.clear();++l<d;){var m=i[l];this.set(m[0],m[1])}}function eD(){this.__data__=[],this.size=0}function tD(i){var l=this.__data__,d=ts(l,i);if(d<0)return!1;var m=l.length-1;return d==m?l.pop():Kl.call(l,d,1),--this.size,!0}function nD(i){var l=this.__data__,d=ts(l,i);return d<0?t:l[d][1]}function rD(i){return ts(this.__data__,i)>-1}function iD(i,l){var d=this.__data__,m=ts(d,i);return m<0?(++this.size,d.push([i,l])):d[m][1]=l,this}ir.prototype.clear=eD,ir.prototype.delete=tD,ir.prototype.get=nD,ir.prototype.has=rD,ir.prototype.set=iD;function or(i){var l=-1,d=i==null?0:i.length;for(this.clear();++l<d;){var m=i[l];this.set(m[0],m[1])}}function oD(){this.size=0,this.__data__={hash:new Jr,map:new(bo||ir),string:new Jr}}function lD(i){var l=gs(this,i).delete(i);return this.size-=l?1:0,l}function sD(i){return gs(this,i).get(i)}function aD(i){return gs(this,i).has(i)}function uD(i,l){var d=gs(this,i),m=d.size;return d.set(i,l),this.size+=d.size==m?0:1,this}or.prototype.clear=oD,or.prototype.delete=lD,or.prototype.get=sD,or.prototype.has=aD,or.prototype.set=uD;function Yr(i){var l=-1,d=i==null?0:i.length;for(this.__data__=new or;++l<d;)this.add(i[l])}function cD(i){return this.__data__.set(i,f),this}function dD(i){return this.__data__.has(i)}Yr.prototype.add=Yr.prototype.push=cD,Yr.prototype.has=dD;function zn(i){var l=this.__data__=new ir(i);this.size=l.size}function fD(){this.__data__=new ir,this.size=0}function gD(i){var l=this.__data__,d=l.delete(i);return this.size=l.size,d}function hD(i){return this.__data__.get(i)}function pD(i){return this.__data__.has(i)}function vD(i,l){var d=this.__data__;if(d instanceof ir){var m=d.__data__;if(!bo||m.length<o-1)return m.push([i,l]),this.size=++d.size,this;d=this.__data__=new or(m)}return d.set(i,l),this.size=d.size,this}zn.prototype.clear=fD,zn.prototype.delete=gD,zn.prototype.get=hD,zn.prototype.has=pD,zn.prototype.set=vD;function Uw(i,l){var d=Le(i),m=!d&&ti(i),w=!d&&!m&&Lr(i),x=!d&&!m&&!w&&Pi(i),A=d||m||w||x,N=A?Xf(i.length,MP):[],V=N.length;for(var J in i)(l||nt.call(i,J))&&!(A&&(J=="length"||w&&(J=="offset"||J=="parent")||x&&(J=="buffer"||J=="byteLength"||J=="byteOffset")||ur(J,V)))&&N.push(J);return N}function Ww(i){var l=i.length;return l?i[pg(0,l-1)]:t}function mD(i,l){return hs(on(i),Zr(l,0,i.length))}function _D(i){return hs(on(i))}function og(i,l,d){(d!==t&&!Rn(i[l],d)||d===t&&!(l in i))&&lr(i,l,d)}function So(i,l,d){var m=i[l];(!(nt.call(i,l)&&Rn(m,d))||d===t&&!(l in i))&&lr(i,l,d)}function ts(i,l){for(var d=i.length;d--;)if(Rn(i[d][0],l))return d;return-1}function bD(i,l,d,m){return Or(i,function(w,x,A){l(m,w,d(w),A)}),m}function Kw(i,l){return i&&Yn(l,Dt(l),i)}function yD(i,l){return i&&Yn(l,sn(l),i)}function lr(i,l,d){l=="__proto__"&&Jl?Jl(i,l,{configurable:!0,enumerable:!0,value:d,writable:!0}):i[l]=d}function lg(i,l){for(var d=-1,m=l.length,w=G(m),x=i==null;++d<m;)w[d]=x?t:Vg(i,l[d]);return w}function Zr(i,l,d){return i===i&&(d!==t&&(i=i<=d?i:d),l!==t&&(i=i>=l?i:l)),i}function In(i,l,d,m,w,x){var A,N=l&p,V=l&_,J=l&v;if(d&&(A=w?d(i,m,w,x):d(i)),A!==t)return A;if(!dt(i))return i;var Y=Le(i);if(Y){if(A=a2(i),!N)return on(i,A)}else{var te=qt(i),ae=te==Ge||te==st;if(Lr(i))return _C(i,N);if(te==Oe||te==K||ae&&!w){if(A=V||ae?{}:zC(i),!N)return V?ZD(i,yD(A,i)):YD(i,Kw(A,i))}else{if(!lt[te])return w?i:{};A=u2(i,te,N)}}x||(x=new zn);var be=x.get(i);if(be)return be;x.set(i,A),fS(i)?i.forEach(function(Fe){A.add(In(Fe,l,d,Fe,i,x))}):cS(i)&&i.forEach(function(Fe,Ue){A.set(Ue,In(Fe,l,d,Ue,i,x))});var Ee=J?V?Mg:Ig:V?sn:Dt,Ve=Y?t:Ee(i);return Cn(Ve||i,function(Fe,Ue){Ve&&(Ue=Fe,Fe=i[Ue]),So(A,Ue,In(Fe,l,d,Ue,i,x))}),A}function wD(i){var l=Dt(i);return function(d){return Jw(d,i,l)}}function Jw(i,l,d){var m=d.length;if(i==null)return!m;for(i=it(i);m--;){var w=d[m],x=l[w],A=i[w];if(A===t&&!(w in i)||!x(A))return!1}return!0}function Yw(i,l,d){if(typeof i!="function")throw new Sn(a);return Ao(function(){i.apply(t,d)},l)}function To(i,l,d,m){var w=-1,x=Rl,A=!0,N=i.length,V=[],J=l.length;if(!N)return V;d&&(l=ct(l,fn(d))),m?(x=Uf,A=!1):l.length>=o&&(x=mo,A=!1,l=new Yr(l));e:for(;++w<N;){var Y=i[w],te=d==null?Y:d(Y);if(Y=m||Y!==0?Y:0,A&&te===te){for(var ae=J;ae--;)if(l[ae]===te)continue e;V.push(Y)}else x(l,te,m)||V.push(Y)}return V}var Or=SC(Jn),Zw=SC(ag,!0);function CD(i,l){var d=!0;return Or(i,function(m,w,x){return d=!!l(m,w,x),d}),d}function ns(i,l,d){for(var m=-1,w=i.length;++m<w;){var x=i[m],A=l(x);if(A!=null&&(N===t?A===A&&!hn(A):d(A,N)))var N=A,V=x}return V}function SD(i,l,d,m){var w=i.length;for(d=ze(d),d<0&&(d=-d>w?0:w+d),m=m===t||m>w?w:ze(m),m<0&&(m+=w),m=d>m?0:hS(m);d<m;)i[d++]=l;return i}function Xw(i,l){var d=[];return Or(i,function(m,w,x){l(m,w,x)&&d.push(m)}),d}function Rt(i,l,d,m,w){var x=-1,A=i.length;for(d||(d=d2),w||(w=[]);++x<A;){var N=i[x];l>0&&d(N)?l>1?Rt(N,l-1,d,m,w):Er(w,N):m||(w[w.length]=N)}return w}var sg=TC(),Qw=TC(!0);function Jn(i,l){return i&&sg(i,l,Dt)}function ag(i,l){return i&&Qw(i,l,Dt)}function rs(i,l){return xr(l,function(d){return cr(i[d])})}function Xr(i,l){l=Dr(l,i);for(var d=0,m=l.length;i!=null&&d<m;)i=i[Zn(l[d++])];return d&&d==m?i:t}function eC(i,l,d){var m=l(i);return Le(i)?m:Er(m,d(i))}function en(i){return i==null?i===t?ot:Pe:Kr&&Kr in it(i)?o2(i):_2(i)}function ug(i,l){return i>l}function TD(i,l){return i!=null&&nt.call(i,l)}function ID(i,l){return i!=null&&l in it(i)}function MD(i,l,d){return i>=jt(l,d)&&i<Mt(l,d)}function cg(i,l,d){for(var m=d?Uf:Rl,w=i[0].length,x=i.length,A=x,N=G(x),V=1/0,J=[];A--;){var Y=i[A];A&&l&&(Y=ct(Y,fn(l))),V=jt(Y.length,V),N[A]=!d&&(l||w>=120&&Y.length>=120)?new Yr(A&&Y):t}Y=i[0];var te=-1,ae=N[0];e:for(;++te<w&&J.length<V;){var be=Y[te],Ee=l?l(be):be;if(be=d||be!==0?be:0,!(ae?mo(ae,Ee):m(J,Ee,d))){for(A=x;--A;){var Ve=N[A];if(!(Ve?mo(Ve,Ee):m(i[A],Ee,d)))continue e}ae&&ae.push(Ee),J.push(be)}}return J}function xD(i,l,d,m){return Jn(i,function(w,x,A){l(m,d(w),x,A)}),m}function Io(i,l,d){l=Dr(l,i),i=$C(i,l);var m=i==null?i:i[Zn(xn(l))];return m==null?t:dn(m,i,d)}function tC(i){return _t(i)&&en(i)==K}function ED(i){return _t(i)&&en(i)==$t}function FD(i){return _t(i)&&en(i)==X}function Mo(i,l,d,m,w){return i===l?!0:i==null||l==null||!_t(i)&&!_t(l)?i!==i&&l!==l:AD(i,l,d,m,Mo,w)}function AD(i,l,d,m,w,x){var A=Le(i),N=Le(l),V=A?ee:qt(i),J=N?ee:qt(l);V=V==K?Oe:V,J=J==K?Oe:J;var Y=V==Oe,te=J==Oe,ae=V==J;if(ae&&Lr(i)){if(!Lr(l))return!1;A=!0,Y=!1}if(ae&&!Y)return x||(x=new zn),A||Pi(i)?kC(i,l,d,m,w,x):r2(i,l,V,d,m,w,x);if(!(d&y)){var be=Y&&nt.call(i,"__wrapped__"),Ee=te&&nt.call(l,"__wrapped__");if(be||Ee){var Ve=be?i.value():i,Fe=Ee?l.value():l;return x||(x=new zn),w(Ve,Fe,d,m,x)}}return ae?(x||(x=new zn),i2(i,l,d,m,w,x)):!1}function OD(i){return _t(i)&&qt(i)==Re}function dg(i,l,d,m){var w=d.length,x=w,A=!m;if(i==null)return!x;for(i=it(i);w--;){var N=d[w];if(A&&N[2]?N[1]!==i[N[0]]:!(N[0]in i))return!1}for(;++w<x;){N=d[w];var V=N[0],J=i[V],Y=N[1];if(A&&N[2]){if(J===t&&!(V in i))return!1}else{var te=new zn;if(m)var ae=m(J,Y,V,i,l,te);if(!(ae===t?Mo(Y,J,y|C,m,te):ae))return!1}}return!0}function nC(i){if(!dt(i)||g2(i))return!1;var l=cr(i)?OP:ye;return l.test(ei(i))}function PD(i){return _t(i)&&en(i)==rt}function DD(i){return _t(i)&&qt(i)==Ze}function kD(i){return _t(i)&&ys(i.length)&&!!at[en(i)]}function rC(i){return typeof i=="function"?i:i==null?an:typeof i=="object"?Le(i)?lC(i[0],i[1]):oC(i):IS(i)}function fg(i){if(!Fo(i))return zP(i);var l=[];for(var d in it(i))nt.call(i,d)&&d!="constructor"&&l.push(d);return l}function LD(i){if(!dt(i))return m2(i);var l=Fo(i),d=[];for(var m in i)m=="constructor"&&(l||!nt.call(i,m))||d.push(m);return d}function gg(i,l){return i<l}function iC(i,l){var d=-1,m=ln(i)?G(i.length):[];return Or(i,function(w,x,A){m[++d]=l(w,x,A)}),m}function oC(i){var l=Eg(i);return l.length==1&&l[0][2]?BC(l[0][0],l[0][1]):function(d){return d===i||dg(d,i,l)}}function lC(i,l){return Ag(i)&&RC(l)?BC(Zn(i),l):function(d){var m=Vg(d,i);return m===t&&m===l?$g(d,i):Mo(l,m,y|C)}}function is(i,l,d,m,w){i!==l&&sg(l,function(x,A){if(w||(w=new zn),dt(x))ND(i,l,A,d,is,m,w);else{var N=m?m(Pg(i,A),x,A+"",i,l,w):t;N===t&&(N=x),og(i,A,N)}},sn)}function ND(i,l,d,m,w,x,A){var N=Pg(i,d),V=Pg(l,d),J=A.get(V);if(J){og(i,d,J);return}var Y=x?x(N,V,d+"",i,l,A):t,te=Y===t;if(te){var ae=Le(V),be=!ae&&Lr(V),Ee=!ae&&!be&&Pi(V);Y=V,ae||be||Ee?Le(N)?Y=N:yt(N)?Y=on(N):be?(te=!1,Y=_C(V,!0)):Ee?(te=!1,Y=bC(V,!0)):Y=[]:Oo(V)||ti(V)?(Y=N,ti(N)?Y=pS(N):(!dt(N)||cr(N))&&(Y=zC(V))):te=!1}te&&(A.set(V,Y),w(Y,V,m,x,A),A.delete(V)),og(i,d,Y)}function sC(i,l){var d=i.length;if(d)return l+=l<0?d:0,ur(l,d)?i[l]:t}function aC(i,l,d){l.length?l=ct(l,function(x){return Le(x)?function(A){return Xr(A,x.length===1?x[0]:x)}:x}):l=[an];var m=-1;l=ct(l,fn(Me()));var w=iC(i,function(x,A,N){var V=ct(l,function(J){return J(x)});return{criteria:V,index:++m,value:x}});return uP(w,function(x,A){return JD(x,A,d)})}function zD(i,l){return uC(i,l,function(d,m){return $g(i,m)})}function uC(i,l,d){for(var m=-1,w=l.length,x={};++m<w;){var A=l[m],N=Xr(i,A);d(N,A)&&xo(x,Dr(A,i),N)}return x}function RD(i){return function(l){return Xr(l,i)}}function hg(i,l,d,m){var w=m?aP:wi,x=-1,A=l.length,N=i;for(i===l&&(l=on(l)),d&&(N=ct(i,fn(d)));++x<A;)for(var V=0,J=l[x],Y=d?d(J):J;(V=w(N,Y,V,m))>-1;)N!==i&&Kl.call(N,V,1),Kl.call(i,V,1);return i}function cC(i,l){for(var d=i?l.length:0,m=d-1;d--;){var w=l[d];if(d==m||w!==x){var x=w;ur(w)?Kl.call(i,w,1):_g(i,w)}}return i}function pg(i,l){return i+Zl(qw()*(l-i+1))}function BD(i,l,d,m){for(var w=-1,x=Mt(Yl((l-i)/(d||1)),0),A=G(x);x--;)A[m?x:++w]=i,i+=d;return A}function vg(i,l){var d="";if(!i||l<1||l>le)return d;do l%2&&(d+=i),l=Zl(l/2),l&&(i+=i);while(l);return d}function $e(i,l){return Dg(VC(i,l,an),i+"")}function VD(i){return Ww(Di(i))}function $D(i,l){var d=Di(i);return hs(d,Zr(l,0,d.length))}function xo(i,l,d,m){if(!dt(i))return i;l=Dr(l,i);for(var w=-1,x=l.length,A=x-1,N=i;N!=null&&++w<x;){var V=Zn(l[w]),J=d;if(V==="__proto__"||V==="constructor"||V==="prototype")return i;if(w!=A){var Y=N[V];J=m?m(Y,V,N):t,J===t&&(J=dt(Y)?Y:ur(l[w+1])?[]:{})}So(N,V,J),N=N[V]}return i}var dC=Xl?function(i,l){return Xl.set(i,l),i}:an,HD=Jl?function(i,l){return Jl(i,"toString",{configurable:!0,enumerable:!1,value:jg(l),writable:!0})}:an;function jD(i){return hs(Di(i))}function Mn(i,l,d){var m=-1,w=i.length;l<0&&(l=-l>w?0:w+l),d=d>w?w:d,d<0&&(d+=w),w=l>d?0:d-l>>>0,l>>>=0;for(var x=G(w);++m<w;)x[m]=i[m+l];return x}function qD(i,l){var d;return Or(i,function(m,w,x){return d=l(m,w,x),!d}),!!d}function os(i,l,d){var m=0,w=i==null?m:i.length;if(typeof l=="number"&&l===l&&w<=ue){for(;m<w;){var x=m+w>>>1,A=i[x];A!==null&&!hn(A)&&(d?A<=l:A<l)?m=x+1:w=x}return w}return mg(i,l,an,d)}function mg(i,l,d,m){var w=0,x=i==null?0:i.length;if(x===0)return 0;l=d(l);for(var A=l!==l,N=l===null,V=hn(l),J=l===t;w<x;){var Y=Zl((w+x)/2),te=d(i[Y]),ae=te!==t,be=te===null,Ee=te===te,Ve=hn(te);if(A)var Fe=m||Ee;else J?Fe=Ee&&(m||ae):N?Fe=Ee&&ae&&(m||!be):V?Fe=Ee&&ae&&!be&&(m||!Ve):be||Ve?Fe=!1:Fe=m?te<=l:te<l;Fe?w=Y+1:x=Y}return jt(x,Ae)}function fC(i,l){for(var d=-1,m=i.length,w=0,x=[];++d<m;){var A=i[d],N=l?l(A):A;if(!d||!Rn(N,V)){var V=N;x[w++]=A===0?0:A}}return x}function gC(i){return typeof i=="number"?i:hn(i)?he:+i}function gn(i){if(typeof i=="string")return i;if(Le(i))return ct(i,gn)+"";if(hn(i))return Gw?Gw.call(i):"";var l=i+"";return l=="0"&&1/i==-1/0?"-0":l}function Pr(i,l,d){var m=-1,w=Rl,x=i.length,A=!0,N=[],V=N;if(d)A=!1,w=Uf;else if(x>=o){var J=l?null:t2(i);if(J)return Vl(J);A=!1,w=mo,V=new Yr}else V=l?[]:N;e:for(;++m<x;){var Y=i[m],te=l?l(Y):Y;if(Y=d||Y!==0?Y:0,A&&te===te){for(var ae=V.length;ae--;)if(V[ae]===te)continue e;l&&V.push(te),N.push(Y)}else w(V,te,d)||(V!==N&&V.push(te),N.push(Y))}return N}function _g(i,l){return l=Dr(l,i),i=$C(i,l),i==null||delete i[Zn(xn(l))]}function hC(i,l,d,m){return xo(i,l,d(Xr(i,l)),m)}function ls(i,l,d,m){for(var w=i.length,x=m?w:-1;(m?x--:++x<w)&&l(i[x],x,i););return d?Mn(i,m?0:x,m?x+1:w):Mn(i,m?x+1:0,m?w:x)}function pC(i,l){var d=i;return d instanceof Ke&&(d=d.value()),Wf(l,function(m,w){return w.func.apply(w.thisArg,Er([m],w.args))},d)}function bg(i,l,d){var m=i.length;if(m<2)return m?Pr(i[0]):[];for(var w=-1,x=G(m);++w<m;)for(var A=i[w],N=-1;++N<m;)N!=w&&(x[w]=To(x[w]||A,i[N],l,d));return Pr(Rt(x,1),l,d)}function vC(i,l,d){for(var m=-1,w=i.length,x=l.length,A={};++m<w;){var N=m<x?l[m]:t;d(A,i[m],N)}return A}function yg(i){return yt(i)?i:[]}function wg(i){return typeof i=="function"?i:an}function Dr(i,l){return Le(i)?i:Ag(i,l)?[i]:GC(et(i))}var GD=$e;function kr(i,l,d){var m=i.length;return d=d===t?m:d,!l&&d>=m?i:Mn(i,l,d)}var mC=PP||function(i){return zt.clearTimeout(i)};function _C(i,l){if(l)return i.slice();var d=i.length,m=Bw?Bw(d):new i.constructor(d);return i.copy(m),m}function Cg(i){var l=new i.constructor(i.byteLength);return new Ul(l).set(new Ul(i)),l}function UD(i,l){var d=l?Cg(i.buffer):i.buffer;return new i.constructor(d,i.byteOffset,i.byteLength)}function WD(i){var l=new i.constructor(i.source,ho.exec(i));return l.lastIndex=i.lastIndex,l}function KD(i){return Co?it(Co.call(i)):{}}function bC(i,l){var d=l?Cg(i.buffer):i.buffer;return new i.constructor(d,i.byteOffset,i.length)}function yC(i,l){if(i!==l){var d=i!==t,m=i===null,w=i===i,x=hn(i),A=l!==t,N=l===null,V=l===l,J=hn(l);if(!N&&!J&&!x&&i>l||x&&A&&V&&!N&&!J||m&&A&&V||!d&&V||!w)return 1;if(!m&&!x&&!J&&i<l||J&&d&&w&&!m&&!x||N&&d&&w||!A&&w||!V)return-1}return 0}function JD(i,l,d){for(var m=-1,w=i.criteria,x=l.criteria,A=w.length,N=d.length;++m<A;){var V=yC(w[m],x[m]);if(V){if(m>=N)return V;var J=d[m];return V*(J=="desc"?-1:1)}}return i.index-l.index}function wC(i,l,d,m){for(var w=-1,x=i.length,A=d.length,N=-1,V=l.length,J=Mt(x-A,0),Y=G(V+J),te=!m;++N<V;)Y[N]=l[N];for(;++w<A;)(te||w<x)&&(Y[d[w]]=i[w]);for(;J--;)Y[N++]=i[w++];return Y}function CC(i,l,d,m){for(var w=-1,x=i.length,A=-1,N=d.length,V=-1,J=l.length,Y=Mt(x-N,0),te=G(Y+J),ae=!m;++w<Y;)te[w]=i[w];for(var be=w;++V<J;)te[be+V]=l[V];for(;++A<N;)(ae||w<x)&&(te[be+d[A]]=i[w++]);return te}function on(i,l){var d=-1,m=i.length;for(l||(l=G(m));++d<m;)l[d]=i[d];return l}function Yn(i,l,d,m){var w=!d;d||(d={});for(var x=-1,A=l.length;++x<A;){var N=l[x],V=m?m(d[N],i[N],N,d,i):t;V===t&&(V=i[N]),w?lr(d,N,V):So(d,N,V)}return d}function YD(i,l){return Yn(i,Fg(i),l)}function ZD(i,l){return Yn(i,LC(i),l)}function ss(i,l){return function(d,m){var w=Le(d)?nP:bD,x=l?l():{};return w(d,i,Me(m,2),x)}}function Fi(i){return $e(function(l,d){var m=-1,w=d.length,x=w>1?d[w-1]:t,A=w>2?d[2]:t;for(x=i.length>3&&typeof x=="function"?(w--,x):t,A&&tn(d[0],d[1],A)&&(x=w<3?t:x,w=1),l=it(l);++m<w;){var N=d[m];N&&i(l,N,m,x)}return l})}function SC(i,l){return function(d,m){if(d==null)return d;if(!ln(d))return i(d,m);for(var w=d.length,x=l?w:-1,A=it(d);(l?x--:++x<w)&&m(A[x],x,A)!==!1;);return d}}function TC(i){return function(l,d,m){for(var w=-1,x=it(l),A=m(l),N=A.length;N--;){var V=A[i?N:++w];if(d(x[V],V,x)===!1)break}return l}}function XD(i,l,d){var m=l&S,w=Eo(i);function x(){var A=this&&this!==zt&&this instanceof x?w:i;return A.apply(m?d:this,arguments)}return x}function IC(i){return function(l){l=et(l);var d=Ci(l)?Nn(l):t,m=d?d[0]:l.charAt(0),w=d?kr(d,1).join(""):l.slice(1);return m[i]()+w}}function Ai(i){return function(l){return Wf(SS(CS(l).replace(HO,"")),i,"")}}function Eo(i){return function(){var l=arguments;switch(l.length){case 0:return new i;case 1:return new i(l[0]);case 2:return new i(l[0],l[1]);case 3:return new i(l[0],l[1],l[2]);case 4:return new i(l[0],l[1],l[2],l[3]);case 5:return new i(l[0],l[1],l[2],l[3],l[4]);case 6:return new i(l[0],l[1],l[2],l[3],l[4],l[5]);case 7:return new i(l[0],l[1],l[2],l[3],l[4],l[5],l[6])}var d=Ei(i.prototype),m=i.apply(d,l);return dt(m)?m:d}}function QD(i,l,d){var m=Eo(i);function w(){for(var x=arguments.length,A=G(x),N=x,V=Oi(w);N--;)A[N]=arguments[N];var J=x<3&&A[0]!==V&&A[x-1]!==V?[]:Fr(A,V);if(x-=J.length,x<d)return AC(i,l,as,w.placeholder,t,A,J,t,t,d-x);var Y=this&&this!==zt&&this instanceof w?m:i;return dn(Y,this,A)}return w}function MC(i){return function(l,d,m){var w=it(l);if(!ln(l)){var x=Me(d,3);l=Dt(l),d=function(N){return x(w[N],N,w)}}var A=i(l,d,m);return A>-1?w[x?l[A]:A]:t}}function xC(i){return ar(function(l){var d=l.length,m=d,w=Tn.prototype.thru;for(i&&l.reverse();m--;){var x=l[m];if(typeof x!="function")throw new Sn(a);if(w&&!A&&fs(x)=="wrapper")var A=new Tn([],!0)}for(m=A?m:d;++m<d;){x=l[m];var N=fs(x),V=N=="wrapper"?xg(x):t;V&&Og(V[0])&&V[1]==(k|F|O|z)&&!V[4].length&&V[9]==1?A=A[fs(V[0])].apply(A,V[3]):A=x.length==1&&Og(x)?A[N]():A.thru(x)}return function(){var J=arguments,Y=J[0];if(A&&J.length==1&&Le(Y))return A.plant(Y).value();for(var te=0,ae=d?l[te].apply(this,J):Y;++te<d;)ae=l[te].call(this,ae);return ae}})}function as(i,l,d,m,w,x,A,N,V,J){var Y=l&k,te=l&S,ae=l&T,be=l&(F|L),Ee=l&j,Ve=ae?t:Eo(i);function Fe(){for(var Ue=arguments.length,Ye=G(Ue),pn=Ue;pn--;)Ye[pn]=arguments[pn];if(be)var nn=Oi(Fe),vn=dP(Ye,nn);if(m&&(Ye=wC(Ye,m,w,be)),x&&(Ye=CC(Ye,x,A,be)),Ue-=vn,be&&Ue<J){var wt=Fr(Ye,nn);return AC(i,l,as,Fe.placeholder,d,Ye,wt,N,V,J-Ue)}var Bn=te?d:this,fr=ae?Bn[i]:i;return Ue=Ye.length,N?Ye=b2(Ye,N):Ee&&Ue>1&&Ye.reverse(),Y&&V<Ue&&(Ye.length=V),this&&this!==zt&&this instanceof Fe&&(fr=Ve||Eo(fr)),fr.apply(Bn,Ye)}return Fe}function EC(i,l){return function(d,m){return xD(d,i,l(m),{})}}function us(i,l){return function(d,m){var w;if(d===t&&m===t)return l;if(d!==t&&(w=d),m!==t){if(w===t)return m;typeof d=="string"||typeof m=="string"?(d=gn(d),m=gn(m)):(d=gC(d),m=gC(m)),w=i(d,m)}return w}}function Sg(i){return ar(function(l){return l=ct(l,fn(Me())),$e(function(d){var m=this;return i(l,function(w){return dn(w,m,d)})})})}function cs(i,l){l=l===t?" ":gn(l);var d=l.length;if(d<2)return d?vg(l,i):l;var m=vg(l,Yl(i/Si(l)));return Ci(l)?kr(Nn(m),0,i).join(""):m.slice(0,i)}function e2(i,l,d,m){var w=l&S,x=Eo(i);function A(){for(var N=-1,V=arguments.length,J=-1,Y=m.length,te=G(Y+V),ae=this&&this!==zt&&this instanceof A?x:i;++J<Y;)te[J]=m[J];for(;V--;)te[J++]=arguments[++N];return dn(ae,w?d:this,te)}return A}function FC(i){return function(l,d,m){return m&&typeof m!="number"&&tn(l,d,m)&&(d=m=t),l=dr(l),d===t?(d=l,l=0):d=dr(d),m=m===t?l<d?1:-1:dr(m),BD(l,d,m,i)}}function ds(i){return function(l,d){return typeof l=="string"&&typeof d=="string"||(l=En(l),d=En(d)),i(l,d)}}function AC(i,l,d,m,w,x,A,N,V,J){var Y=l&F,te=Y?A:t,ae=Y?t:A,be=Y?x:t,Ee=Y?t:x;l|=Y?O:P,l&=~(Y?P:O),l&E||(l&=-4);var Ve=[i,l,w,be,te,Ee,ae,N,V,J],Fe=d.apply(t,Ve);return Og(i)&&HC(Fe,Ve),Fe.placeholder=m,jC(Fe,i,l)}function Tg(i){var l=It[i];return function(d,m){if(d=En(d),m=m==null?0:jt(ze(m),292),m&&jw(d)){var w=(et(d)+"e").split("e"),x=l(w[0]+"e"+(+w[1]+m));return w=(et(x)+"e").split("e"),+(w[0]+"e"+(+w[1]-m))}return l(d)}}var t2=Mi&&1/Vl(new Mi([,-0]))[1]==U?function(i){return new Mi(i)}:Ug;function OC(i){return function(l){var d=qt(l);return d==Re?eg(l):d==Ze?_P(l):cP(l,i(l))}}function sr(i,l,d,m,w,x,A,N){var V=l&T;if(!V&&typeof i!="function")throw new Sn(a);var J=m?m.length:0;if(J||(l&=-97,m=w=t),A=A===t?A:Mt(ze(A),0),N=N===t?N:ze(N),J-=w?w.length:0,l&P){var Y=m,te=w;m=w=t}var ae=V?t:xg(i),be=[i,l,d,m,w,Y,te,x,A,N];if(ae&&v2(be,ae),i=be[0],l=be[1],d=be[2],m=be[3],w=be[4],N=be[9]=be[9]===t?V?0:i.length:Mt(be[9]-J,0),!N&&l&(F|L)&&(l&=-25),!l||l==S)var Ee=XD(i,l,d);else l==F||l==L?Ee=QD(i,l,N):(l==O||l==(S|O))&&!w.length?Ee=e2(i,l,d,m):Ee=as.apply(t,be);var Ve=ae?dC:HC;return jC(Ve(Ee,be),i,l)}function PC(i,l,d,m){return i===t||Rn(i,Ii[d])&&!nt.call(m,d)?l:i}function DC(i,l,d,m,w,x){return dt(i)&&dt(l)&&(x.set(l,i),is(i,l,t,DC,x),x.delete(l)),i}function n2(i){return Oo(i)?t:i}function kC(i,l,d,m,w,x){var A=d&y,N=i.length,V=l.length;if(N!=V&&!(A&&V>N))return!1;var J=x.get(i),Y=x.get(l);if(J&&Y)return J==l&&Y==i;var te=-1,ae=!0,be=d&C?new Yr:t;for(x.set(i,l),x.set(l,i);++te<N;){var Ee=i[te],Ve=l[te];if(m)var Fe=A?m(Ve,Ee,te,l,i,x):m(Ee,Ve,te,i,l,x);if(Fe!==t){if(Fe)continue;ae=!1;break}if(be){if(!Kf(l,function(Ue,Ye){if(!mo(be,Ye)&&(Ee===Ue||w(Ee,Ue,d,m,x)))return be.push(Ye)})){ae=!1;break}}else if(!(Ee===Ve||w(Ee,Ve,d,m,x))){ae=!1;break}}return x.delete(i),x.delete(l),ae}function r2(i,l,d,m,w,x,A){switch(d){case Tt:if(i.byteLength!=l.byteLength||i.byteOffset!=l.byteOffset)return!1;i=i.buffer,l=l.buffer;case $t:return!(i.byteLength!=l.byteLength||!x(new Ul(i),new Ul(l)));case xe:case X:case De:return Rn(+i,+l);case Je:return i.name==l.name&&i.message==l.message;case rt:case Nt:return i==l+"";case Re:var N=eg;case Ze:var V=m&y;if(N||(N=Vl),i.size!=l.size&&!V)return!1;var J=A.get(i);if(J)return J==l;m|=C,A.set(i,l);var Y=kC(N(i),N(l),m,w,x,A);return A.delete(i),Y;case Ct:if(Co)return Co.call(i)==Co.call(l)}return!1}function i2(i,l,d,m,w,x){var A=d&y,N=Ig(i),V=N.length,J=Ig(l),Y=J.length;if(V!=Y&&!A)return!1;for(var te=V;te--;){var ae=N[te];if(!(A?ae in l:nt.call(l,ae)))return!1}var be=x.get(i),Ee=x.get(l);if(be&&Ee)return be==l&&Ee==i;var Ve=!0;x.set(i,l),x.set(l,i);for(var Fe=A;++te<V;){ae=N[te];var Ue=i[ae],Ye=l[ae];if(m)var pn=A?m(Ye,Ue,ae,l,i,x):m(Ue,Ye,ae,i,l,x);if(!(pn===t?Ue===Ye||w(Ue,Ye,d,m,x):pn)){Ve=!1;break}Fe||(Fe=ae=="constructor")}if(Ve&&!Fe){var nn=i.constructor,vn=l.constructor;nn!=vn&&"constructor"in i&&"constructor"in l&&!(typeof nn=="function"&&nn instanceof nn&&typeof vn=="function"&&vn instanceof vn)&&(Ve=!1)}return x.delete(i),x.delete(l),Ve}function ar(i){return Dg(VC(i,t,JC),i+"")}function Ig(i){return eC(i,Dt,Fg)}function Mg(i){return eC(i,sn,LC)}var xg=Xl?function(i){return Xl.get(i)}:Ug;function fs(i){for(var l=i.name+"",d=xi[l],m=nt.call(xi,l)?d.length:0;m--;){var w=d[m],x=w.func;if(x==null||x==i)return w.name}return l}function Oi(i){var l=nt.call(M,"placeholder")?M:i;return l.placeholder}function Me(){var i=M.iteratee||qg;return i=i===qg?rC:i,arguments.length?i(arguments[0],arguments[1]):i}function gs(i,l){var d=i.__data__;return f2(l)?d[typeof l=="string"?"string":"hash"]:d.map}function Eg(i){for(var l=Dt(i),d=l.length;d--;){var m=l[d],w=i[m];l[d]=[m,w,RC(w)]}return l}function Qr(i,l){var d=pP(i,l);return nC(d)?d:t}function o2(i){var l=nt.call(i,Kr),d=i[Kr];try{i[Kr]=t;var m=!0}catch{}var w=ql.call(i);return m&&(l?i[Kr]=d:delete i[Kr]),w}var Fg=ng?function(i){return i==null?[]:(i=it(i),xr(ng(i),function(l){return $w.call(i,l)}))}:Wg,LC=ng?function(i){for(var l=[];i;)Er(l,Fg(i)),i=Wl(i);return l}:Wg,qt=en;(rg&&qt(new rg(new ArrayBuffer(1)))!=Tt||bo&&qt(new bo)!=Re||ig&&qt(ig.resolve())!=Q||Mi&&qt(new Mi)!=Ze||yo&&qt(new yo)!=Ft)&&(qt=function(i){var l=en(i),d=l==Oe?i.constructor:t,m=d?ei(d):"";if(m)switch(m){case $P:return Tt;case HP:return Re;case jP:return Q;case qP:return Ze;case GP:return Ft}return l});function l2(i,l,d){for(var m=-1,w=d.length;++m<w;){var x=d[m],A=x.size;switch(x.type){case"drop":i+=A;break;case"dropRight":l-=A;break;case"take":l=jt(l,i+A);break;case"takeRight":i=Mt(i,l-A);break}}return{start:i,end:l}}function s2(i){var l=i.match(Pl);return l?l[1].split(go):[]}function NC(i,l,d){l=Dr(l,i);for(var m=-1,w=l.length,x=!1;++m<w;){var A=Zn(l[m]);if(!(x=i!=null&&d(i,A)))break;i=i[A]}return x||++m!=w?x:(w=i==null?0:i.length,!!w&&ys(w)&&ur(A,w)&&(Le(i)||ti(i)))}function a2(i){var l=i.length,d=new i.constructor(l);return l&&typeof i[0]=="string"&&nt.call(i,"index")&&(d.index=i.index,d.input=i.input),d}function zC(i){return typeof i.constructor=="function"&&!Fo(i)?Ei(Wl(i)):{}}function u2(i,l,d){var m=i.constructor;switch(l){case $t:return Cg(i);case xe:case X:return new m(+i);case Tt:return UD(i,d);case cn:case Xe:case gt:case At:case Yt:case Zt:case bn:case nr:case rr:return bC(i,d);case Re:return new m;case De:case Nt:return new m(i);case rt:return WD(i);case Ze:return new m;case Ct:return KD(i)}}function c2(i,l){var d=l.length;if(!d)return i;var m=d-1;return l[m]=(d>1?"& ":"")+l[m],l=l.join(d>2?", ":" "),i.replace(Mr,`{
293
+ /* [wrapped with `+l+`] */
294
+ `)}function d2(i){return Le(i)||ti(i)||!!(Hw&&i&&i[Hw])}function ur(i,l){var d=typeof i;return l=l??le,!!l&&(d=="number"||d!="symbol"&&ie.test(i))&&i>-1&&i%1==0&&i<l}function tn(i,l,d){if(!dt(d))return!1;var m=typeof l;return(m=="number"?ln(d)&&ur(l,d.length):m=="string"&&l in d)?Rn(d[l],i):!1}function Ag(i,l){if(Le(i))return!1;var d=typeof i;return d=="number"||d=="symbol"||d=="boolean"||i==null||hn(i)?!0:Ir.test(i)||!we.test(i)||l!=null&&i in it(l)}function f2(i){var l=typeof i;return l=="string"||l=="number"||l=="symbol"||l=="boolean"?i!=="__proto__":i===null}function Og(i){var l=fs(i),d=M[l];if(typeof d!="function"||!(l in Ke.prototype))return!1;if(i===d)return!0;var m=xg(d);return!!m&&i===m[0]}function g2(i){return!!Rw&&Rw in i}var h2=Hl?cr:Kg;function Fo(i){var l=i&&i.constructor,d=typeof l=="function"&&l.prototype||Ii;return i===d}function RC(i){return i===i&&!dt(i)}function BC(i,l){return function(d){return d==null?!1:d[i]===l&&(l!==t||i in it(d))}}function p2(i){var l=_s(i,function(m){return d.size===g&&d.clear(),m}),d=l.cache;return l}function v2(i,l){var d=i[1],m=l[1],w=d|m,x=w<(S|T|k),A=m==k&&d==F||m==k&&d==z&&i[7].length<=l[8]||m==(k|z)&&l[7].length<=l[8]&&d==F;if(!(x||A))return i;m&S&&(i[2]=l[2],w|=d&S?0:E);var N=l[3];if(N){var V=i[3];i[3]=V?wC(V,N,l[4]):N,i[4]=V?Fr(i[3],h):l[4]}return N=l[5],N&&(V=i[5],i[5]=V?CC(V,N,l[6]):N,i[6]=V?Fr(i[5],h):l[6]),N=l[7],N&&(i[7]=N),m&k&&(i[8]=i[8]==null?l[8]:jt(i[8],l[8])),i[9]==null&&(i[9]=l[9]),i[0]=l[0],i[1]=w,i}function m2(i){var l=[];if(i!=null)for(var d in it(i))l.push(d);return l}function _2(i){return ql.call(i)}function VC(i,l,d){return l=Mt(l===t?i.length-1:l,0),function(){for(var m=arguments,w=-1,x=Mt(m.length-l,0),A=G(x);++w<x;)A[w]=m[l+w];w=-1;for(var N=G(l+1);++w<l;)N[w]=m[w];return N[l]=d(A),dn(i,this,N)}}function $C(i,l){return l.length<2?i:Xr(i,Mn(l,0,-1))}function b2(i,l){for(var d=i.length,m=jt(l.length,d),w=on(i);m--;){var x=l[m];i[m]=ur(x,d)?w[x]:t}return i}function Pg(i,l){if(!(l==="constructor"&&typeof i[l]=="function")&&l!="__proto__")return i[l]}var HC=qC(dC),Ao=kP||function(i,l){return zt.setTimeout(i,l)},Dg=qC(HD);function jC(i,l,d){var m=l+"";return Dg(i,c2(m,y2(s2(m),d)))}function qC(i){var l=0,d=0;return function(){var m=RP(),w=Z-(m-d);if(d=m,w>0){if(++l>=re)return arguments[0]}else l=0;return i.apply(t,arguments)}}function hs(i,l){var d=-1,m=i.length,w=m-1;for(l=l===t?m:l;++d<l;){var x=pg(d,w),A=i[x];i[x]=i[d],i[d]=A}return i.length=l,i}var GC=p2(function(i){var l=[];return i.charCodeAt(0)===46&&l.push(""),i.replace(ut,function(d,m,w,x){l.push(w?x.replace(kl,"$1"):m||d)}),l});function Zn(i){if(typeof i=="string"||hn(i))return i;var l=i+"";return l=="0"&&1/i==-1/0?"-0":l}function ei(i){if(i!=null){try{return jl.call(i)}catch{}try{return i+""}catch{}}return""}function y2(i,l){return Cn(pe,function(d){var m="_."+d[0];l&d[1]&&!Rl(i,m)&&i.push(m)}),i.sort()}function UC(i){if(i instanceof Ke)return i.clone();var l=new Tn(i.__wrapped__,i.__chain__);return l.__actions__=on(i.__actions__),l.__index__=i.__index__,l.__values__=i.__values__,l}function w2(i,l,d){(d?tn(i,l,d):l===t)?l=1:l=Mt(ze(l),0);var m=i==null?0:i.length;if(!m||l<1)return[];for(var w=0,x=0,A=G(Yl(m/l));w<m;)A[x++]=Mn(i,w,w+=l);return A}function C2(i){for(var l=-1,d=i==null?0:i.length,m=0,w=[];++l<d;){var x=i[l];x&&(w[m++]=x)}return w}function S2(){var i=arguments.length;if(!i)return[];for(var l=G(i-1),d=arguments[0],m=i;m--;)l[m-1]=arguments[m];return Er(Le(d)?on(d):[d],Rt(l,1))}var T2=$e(function(i,l){return yt(i)?To(i,Rt(l,1,yt,!0)):[]}),I2=$e(function(i,l){var d=xn(l);return yt(d)&&(d=t),yt(i)?To(i,Rt(l,1,yt,!0),Me(d,2)):[]}),M2=$e(function(i,l){var d=xn(l);return yt(d)&&(d=t),yt(i)?To(i,Rt(l,1,yt,!0),t,d):[]});function x2(i,l,d){var m=i==null?0:i.length;return m?(l=d||l===t?1:ze(l),Mn(i,l<0?0:l,m)):[]}function E2(i,l,d){var m=i==null?0:i.length;return m?(l=d||l===t?1:ze(l),l=m-l,Mn(i,0,l<0?0:l)):[]}function F2(i,l){return i&&i.length?ls(i,Me(l,3),!0,!0):[]}function A2(i,l){return i&&i.length?ls(i,Me(l,3),!0):[]}function O2(i,l,d,m){var w=i==null?0:i.length;return w?(d&&typeof d!="number"&&tn(i,l,d)&&(d=0,m=w),SD(i,l,d,m)):[]}function WC(i,l,d){var m=i==null?0:i.length;if(!m)return-1;var w=d==null?0:ze(d);return w<0&&(w=Mt(m+w,0)),Bl(i,Me(l,3),w)}function KC(i,l,d){var m=i==null?0:i.length;if(!m)return-1;var w=m-1;return d!==t&&(w=ze(d),w=d<0?Mt(m+w,0):jt(w,m-1)),Bl(i,Me(l,3),w,!0)}function JC(i){var l=i==null?0:i.length;return l?Rt(i,1):[]}function P2(i){var l=i==null?0:i.length;return l?Rt(i,U):[]}function D2(i,l){var d=i==null?0:i.length;return d?(l=l===t?1:ze(l),Rt(i,l)):[]}function k2(i){for(var l=-1,d=i==null?0:i.length,m={};++l<d;){var w=i[l];m[w[0]]=w[1]}return m}function YC(i){return i&&i.length?i[0]:t}function L2(i,l,d){var m=i==null?0:i.length;if(!m)return-1;var w=d==null?0:ze(d);return w<0&&(w=Mt(m+w,0)),wi(i,l,w)}function N2(i){var l=i==null?0:i.length;return l?Mn(i,0,-1):[]}var z2=$e(function(i){var l=ct(i,yg);return l.length&&l[0]===i[0]?cg(l):[]}),R2=$e(function(i){var l=xn(i),d=ct(i,yg);return l===xn(d)?l=t:d.pop(),d.length&&d[0]===i[0]?cg(d,Me(l,2)):[]}),B2=$e(function(i){var l=xn(i),d=ct(i,yg);return l=typeof l=="function"?l:t,l&&d.pop(),d.length&&d[0]===i[0]?cg(d,t,l):[]});function V2(i,l){return i==null?"":NP.call(i,l)}function xn(i){var l=i==null?0:i.length;return l?i[l-1]:t}function $2(i,l,d){var m=i==null?0:i.length;if(!m)return-1;var w=m;return d!==t&&(w=ze(d),w=w<0?Mt(m+w,0):jt(w,m-1)),l===l?yP(i,l,w):Bl(i,Aw,w,!0)}function H2(i,l){return i&&i.length?sC(i,ze(l)):t}var j2=$e(ZC);function ZC(i,l){return i&&i.length&&l&&l.length?hg(i,l):i}function q2(i,l,d){return i&&i.length&&l&&l.length?hg(i,l,Me(d,2)):i}function G2(i,l,d){return i&&i.length&&l&&l.length?hg(i,l,t,d):i}var U2=ar(function(i,l){var d=i==null?0:i.length,m=lg(i,l);return cC(i,ct(l,function(w){return ur(w,d)?+w:w}).sort(yC)),m});function W2(i,l){var d=[];if(!(i&&i.length))return d;var m=-1,w=[],x=i.length;for(l=Me(l,3);++m<x;){var A=i[m];l(A,m,i)&&(d.push(A),w.push(m))}return cC(i,w),d}function kg(i){return i==null?i:VP.call(i)}function K2(i,l,d){var m=i==null?0:i.length;return m?(d&&typeof d!="number"&&tn(i,l,d)?(l=0,d=m):(l=l==null?0:ze(l),d=d===t?m:ze(d)),Mn(i,l,d)):[]}function J2(i,l){return os(i,l)}function Y2(i,l,d){return mg(i,l,Me(d,2))}function Z2(i,l){var d=i==null?0:i.length;if(d){var m=os(i,l);if(m<d&&Rn(i[m],l))return m}return-1}function X2(i,l){return os(i,l,!0)}function Q2(i,l,d){return mg(i,l,Me(d,2),!0)}function ek(i,l){var d=i==null?0:i.length;if(d){var m=os(i,l,!0)-1;if(Rn(i[m],l))return m}return-1}function tk(i){return i&&i.length?fC(i):[]}function nk(i,l){return i&&i.length?fC(i,Me(l,2)):[]}function rk(i){var l=i==null?0:i.length;return l?Mn(i,1,l):[]}function ik(i,l,d){return i&&i.length?(l=d||l===t?1:ze(l),Mn(i,0,l<0?0:l)):[]}function ok(i,l,d){var m=i==null?0:i.length;return m?(l=d||l===t?1:ze(l),l=m-l,Mn(i,l<0?0:l,m)):[]}function lk(i,l){return i&&i.length?ls(i,Me(l,3),!1,!0):[]}function sk(i,l){return i&&i.length?ls(i,Me(l,3)):[]}var ak=$e(function(i){return Pr(Rt(i,1,yt,!0))}),uk=$e(function(i){var l=xn(i);return yt(l)&&(l=t),Pr(Rt(i,1,yt,!0),Me(l,2))}),ck=$e(function(i){var l=xn(i);return l=typeof l=="function"?l:t,Pr(Rt(i,1,yt,!0),t,l)});function dk(i){return i&&i.length?Pr(i):[]}function fk(i,l){return i&&i.length?Pr(i,Me(l,2)):[]}function gk(i,l){return l=typeof l=="function"?l:t,i&&i.length?Pr(i,t,l):[]}function Lg(i){if(!(i&&i.length))return[];var l=0;return i=xr(i,function(d){if(yt(d))return l=Mt(d.length,l),!0}),Xf(l,function(d){return ct(i,Jf(d))})}function XC(i,l){if(!(i&&i.length))return[];var d=Lg(i);return l==null?d:ct(d,function(m){return dn(l,t,m)})}var hk=$e(function(i,l){return yt(i)?To(i,l):[]}),pk=$e(function(i){return bg(xr(i,yt))}),vk=$e(function(i){var l=xn(i);return yt(l)&&(l=t),bg(xr(i,yt),Me(l,2))}),mk=$e(function(i){var l=xn(i);return l=typeof l=="function"?l:t,bg(xr(i,yt),t,l)}),_k=$e(Lg);function bk(i,l){return vC(i||[],l||[],So)}function yk(i,l){return vC(i||[],l||[],xo)}var wk=$e(function(i){var l=i.length,d=l>1?i[l-1]:t;return d=typeof d=="function"?(i.pop(),d):t,XC(i,d)});function QC(i){var l=M(i);return l.__chain__=!0,l}function Ck(i,l){return l(i),i}function ps(i,l){return l(i)}var Sk=ar(function(i){var l=i.length,d=l?i[0]:0,m=this.__wrapped__,w=function(x){return lg(x,i)};return l>1||this.__actions__.length||!(m instanceof Ke)||!ur(d)?this.thru(w):(m=m.slice(d,+d+(l?1:0)),m.__actions__.push({func:ps,args:[w],thisArg:t}),new Tn(m,this.__chain__).thru(function(x){return l&&!x.length&&x.push(t),x}))});function Tk(){return QC(this)}function Ik(){return new Tn(this.value(),this.__chain__)}function Mk(){this.__values__===t&&(this.__values__=gS(this.value()));var i=this.__index__>=this.__values__.length,l=i?t:this.__values__[this.__index__++];return{done:i,value:l}}function xk(){return this}function Ek(i){for(var l,d=this;d instanceof es;){var m=UC(d);m.__index__=0,m.__values__=t,l?w.__wrapped__=m:l=m;var w=m;d=d.__wrapped__}return w.__wrapped__=i,l}function Fk(){var i=this.__wrapped__;if(i instanceof Ke){var l=i;return this.__actions__.length&&(l=new Ke(this)),l=l.reverse(),l.__actions__.push({func:ps,args:[kg],thisArg:t}),new Tn(l,this.__chain__)}return this.thru(kg)}function Ak(){return pC(this.__wrapped__,this.__actions__)}var Ok=ss(function(i,l,d){nt.call(i,d)?++i[d]:lr(i,d,1)});function Pk(i,l,d){var m=Le(i)?Ew:CD;return d&&tn(i,l,d)&&(l=t),m(i,Me(l,3))}function Dk(i,l){var d=Le(i)?xr:Xw;return d(i,Me(l,3))}var kk=MC(WC),Lk=MC(KC);function Nk(i,l){return Rt(vs(i,l),1)}function zk(i,l){return Rt(vs(i,l),U)}function Rk(i,l,d){return d=d===t?1:ze(d),Rt(vs(i,l),d)}function eS(i,l){var d=Le(i)?Cn:Or;return d(i,Me(l,3))}function tS(i,l){var d=Le(i)?rP:Zw;return d(i,Me(l,3))}var Bk=ss(function(i,l,d){nt.call(i,d)?i[d].push(l):lr(i,d,[l])});function Vk(i,l,d,m){i=ln(i)?i:Di(i),d=d&&!m?ze(d):0;var w=i.length;return d<0&&(d=Mt(w+d,0)),ws(i)?d<=w&&i.indexOf(l,d)>-1:!!w&&wi(i,l,d)>-1}var $k=$e(function(i,l,d){var m=-1,w=typeof l=="function",x=ln(i)?G(i.length):[];return Or(i,function(A){x[++m]=w?dn(l,A,d):Io(A,l,d)}),x}),Hk=ss(function(i,l,d){lr(i,d,l)});function vs(i,l){var d=Le(i)?ct:iC;return d(i,Me(l,3))}function jk(i,l,d,m){return i==null?[]:(Le(l)||(l=l==null?[]:[l]),d=m?t:d,Le(d)||(d=d==null?[]:[d]),aC(i,l,d))}var qk=ss(function(i,l,d){i[d?0:1].push(l)},function(){return[[],[]]});function Gk(i,l,d){var m=Le(i)?Wf:Pw,w=arguments.length<3;return m(i,Me(l,4),d,w,Or)}function Uk(i,l,d){var m=Le(i)?iP:Pw,w=arguments.length<3;return m(i,Me(l,4),d,w,Zw)}function Wk(i,l){var d=Le(i)?xr:Xw;return d(i,bs(Me(l,3)))}function Kk(i){var l=Le(i)?Ww:VD;return l(i)}function Jk(i,l,d){(d?tn(i,l,d):l===t)?l=1:l=ze(l);var m=Le(i)?mD:$D;return m(i,l)}function Yk(i){var l=Le(i)?_D:jD;return l(i)}function Zk(i){if(i==null)return 0;if(ln(i))return ws(i)?Si(i):i.length;var l=qt(i);return l==Re||l==Ze?i.size:fg(i).length}function Xk(i,l,d){var m=Le(i)?Kf:qD;return d&&tn(i,l,d)&&(l=t),m(i,Me(l,3))}var Qk=$e(function(i,l){if(i==null)return[];var d=l.length;return d>1&&tn(i,l[0],l[1])?l=[]:d>2&&tn(l[0],l[1],l[2])&&(l=[l[0]]),aC(i,Rt(l,1),[])}),ms=DP||function(){return zt.Date.now()};function eL(i,l){if(typeof l!="function")throw new Sn(a);return i=ze(i),function(){if(--i<1)return l.apply(this,arguments)}}function nS(i,l,d){return l=d?t:l,l=i&&l==null?i.length:l,sr(i,k,t,t,t,t,l)}function rS(i,l){var d;if(typeof l!="function")throw new Sn(a);return i=ze(i),function(){return--i>0&&(d=l.apply(this,arguments)),i<=1&&(l=t),d}}var Ng=$e(function(i,l,d){var m=S;if(d.length){var w=Fr(d,Oi(Ng));m|=O}return sr(i,m,l,d,w)}),iS=$e(function(i,l,d){var m=S|T;if(d.length){var w=Fr(d,Oi(iS));m|=O}return sr(l,m,i,d,w)});function oS(i,l,d){l=d?t:l;var m=sr(i,F,t,t,t,t,t,l);return m.placeholder=oS.placeholder,m}function lS(i,l,d){l=d?t:l;var m=sr(i,L,t,t,t,t,t,l);return m.placeholder=lS.placeholder,m}function sS(i,l,d){var m,w,x,A,N,V,J=0,Y=!1,te=!1,ae=!0;if(typeof i!="function")throw new Sn(a);l=En(l)||0,dt(d)&&(Y=!!d.leading,te="maxWait"in d,x=te?Mt(En(d.maxWait)||0,l):x,ae="trailing"in d?!!d.trailing:ae);function be(wt){var Bn=m,fr=w;return m=w=t,J=wt,A=i.apply(fr,Bn),A}function Ee(wt){return J=wt,N=Ao(Ue,l),Y?be(wt):A}function Ve(wt){var Bn=wt-V,fr=wt-J,MS=l-Bn;return te?jt(MS,x-fr):MS}function Fe(wt){var Bn=wt-V,fr=wt-J;return V===t||Bn>=l||Bn<0||te&&fr>=x}function Ue(){var wt=ms();if(Fe(wt))return Ye(wt);N=Ao(Ue,Ve(wt))}function Ye(wt){return N=t,ae&&m?be(wt):(m=w=t,A)}function pn(){N!==t&&mC(N),J=0,m=V=w=N=t}function nn(){return N===t?A:Ye(ms())}function vn(){var wt=ms(),Bn=Fe(wt);if(m=arguments,w=this,V=wt,Bn){if(N===t)return Ee(V);if(te)return mC(N),N=Ao(Ue,l),be(V)}return N===t&&(N=Ao(Ue,l)),A}return vn.cancel=pn,vn.flush=nn,vn}var tL=$e(function(i,l){return Yw(i,1,l)}),nL=$e(function(i,l,d){return Yw(i,En(l)||0,d)});function rL(i){return sr(i,j)}function _s(i,l){if(typeof i!="function"||l!=null&&typeof l!="function")throw new Sn(a);var d=function(){var m=arguments,w=l?l.apply(this,m):m[0],x=d.cache;if(x.has(w))return x.get(w);var A=i.apply(this,m);return d.cache=x.set(w,A)||x,A};return d.cache=new(_s.Cache||or),d}_s.Cache=or;function bs(i){if(typeof i!="function")throw new Sn(a);return function(){var l=arguments;switch(l.length){case 0:return!i.call(this);case 1:return!i.call(this,l[0]);case 2:return!i.call(this,l[0],l[1]);case 3:return!i.call(this,l[0],l[1],l[2])}return!i.apply(this,l)}}function iL(i){return rS(2,i)}var oL=GD(function(i,l){l=l.length==1&&Le(l[0])?ct(l[0],fn(Me())):ct(Rt(l,1),fn(Me()));var d=l.length;return $e(function(m){for(var w=-1,x=jt(m.length,d);++w<x;)m[w]=l[w].call(this,m[w]);return dn(i,this,m)})}),zg=$e(function(i,l){var d=Fr(l,Oi(zg));return sr(i,O,t,l,d)}),aS=$e(function(i,l){var d=Fr(l,Oi(aS));return sr(i,P,t,l,d)}),lL=ar(function(i,l){return sr(i,z,t,t,t,l)});function sL(i,l){if(typeof i!="function")throw new Sn(a);return l=l===t?l:ze(l),$e(i,l)}function aL(i,l){if(typeof i!="function")throw new Sn(a);return l=l==null?0:Mt(ze(l),0),$e(function(d){var m=d[l],w=kr(d,0,l);return m&&Er(w,m),dn(i,this,w)})}function uL(i,l,d){var m=!0,w=!0;if(typeof i!="function")throw new Sn(a);return dt(d)&&(m="leading"in d?!!d.leading:m,w="trailing"in d?!!d.trailing:w),sS(i,l,{leading:m,maxWait:l,trailing:w})}function cL(i){return nS(i,1)}function dL(i,l){return zg(wg(l),i)}function fL(){if(!arguments.length)return[];var i=arguments[0];return Le(i)?i:[i]}function gL(i){return In(i,v)}function hL(i,l){return l=typeof l=="function"?l:t,In(i,v,l)}function pL(i){return In(i,p|v)}function vL(i,l){return l=typeof l=="function"?l:t,In(i,p|v,l)}function mL(i,l){return l==null||Jw(i,l,Dt(l))}function Rn(i,l){return i===l||i!==i&&l!==l}var _L=ds(ug),bL=ds(function(i,l){return i>=l}),ti=tC(function(){return arguments}())?tC:function(i){return _t(i)&&nt.call(i,"callee")&&!$w.call(i,"callee")},Le=G.isArray,yL=Cw?fn(Cw):ED;function ln(i){return i!=null&&ys(i.length)&&!cr(i)}function yt(i){return _t(i)&&ln(i)}function wL(i){return i===!0||i===!1||_t(i)&&en(i)==xe}var Lr=LP||Kg,CL=Sw?fn(Sw):FD;function SL(i){return _t(i)&&i.nodeType===1&&!Oo(i)}function TL(i){if(i==null)return!0;if(ln(i)&&(Le(i)||typeof i=="string"||typeof i.splice=="function"||Lr(i)||Pi(i)||ti(i)))return!i.length;var l=qt(i);if(l==Re||l==Ze)return!i.size;if(Fo(i))return!fg(i).length;for(var d in i)if(nt.call(i,d))return!1;return!0}function IL(i,l){return Mo(i,l)}function ML(i,l,d){d=typeof d=="function"?d:t;var m=d?d(i,l):t;return m===t?Mo(i,l,t,d):!!m}function Rg(i){if(!_t(i))return!1;var l=en(i);return l==Je||l==Ne||typeof i.message=="string"&&typeof i.name=="string"&&!Oo(i)}function xL(i){return typeof i=="number"&&jw(i)}function cr(i){if(!dt(i))return!1;var l=en(i);return l==Ge||l==st||l==oe||l==Be}function uS(i){return typeof i=="number"&&i==ze(i)}function ys(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=le}function dt(i){var l=typeof i;return i!=null&&(l=="object"||l=="function")}function _t(i){return i!=null&&typeof i=="object"}var cS=Tw?fn(Tw):OD;function EL(i,l){return i===l||dg(i,l,Eg(l))}function FL(i,l,d){return d=typeof d=="function"?d:t,dg(i,l,Eg(l),d)}function AL(i){return dS(i)&&i!=+i}function OL(i){if(h2(i))throw new ke(s);return nC(i)}function PL(i){return i===null}function DL(i){return i==null}function dS(i){return typeof i=="number"||_t(i)&&en(i)==De}function Oo(i){if(!_t(i)||en(i)!=Oe)return!1;var l=Wl(i);if(l===null)return!0;var d=nt.call(l,"constructor")&&l.constructor;return typeof d=="function"&&d instanceof d&&jl.call(d)==FP}var Bg=Iw?fn(Iw):PD;function kL(i){return uS(i)&&i>=-9007199254740991&&i<=le}var fS=Mw?fn(Mw):DD;function ws(i){return typeof i=="string"||!Le(i)&&_t(i)&&en(i)==Nt}function hn(i){return typeof i=="symbol"||_t(i)&&en(i)==Ct}var Pi=xw?fn(xw):kD;function LL(i){return i===t}function NL(i){return _t(i)&&qt(i)==Ft}function zL(i){return _t(i)&&en(i)==Jt}var RL=ds(gg),BL=ds(function(i,l){return i<=l});function gS(i){if(!i)return[];if(ln(i))return ws(i)?Nn(i):on(i);if(_o&&i[_o])return mP(i[_o]());var l=qt(i),d=l==Re?eg:l==Ze?Vl:Di;return d(i)}function dr(i){if(!i)return i===0?i:0;if(i=En(i),i===U||i===-1/0){var l=i<0?-1:1;return l*_e}return i===i?i:0}function ze(i){var l=dr(i),d=l%1;return l===l?d?l-d:l:0}function hS(i){return i?Zr(ze(i),0,de):0}function En(i){if(typeof i=="number")return i;if(hn(i))return he;if(dt(i)){var l=typeof i.valueOf=="function"?i.valueOf():i;i=dt(l)?l+"":l}if(typeof i!="string")return i===0?i:+i;i=Dw(i);var d=Rf.test(i);return d||R.test(i)?eP(i.slice(2),d?2:8):Nl.test(i)?he:+i}function pS(i){return Yn(i,sn(i))}function VL(i){return i?Zr(ze(i),-9007199254740991,le):i===0?i:0}function et(i){return i==null?"":gn(i)}var $L=Fi(function(i,l){if(Fo(l)||ln(l)){Yn(l,Dt(l),i);return}for(var d in l)nt.call(l,d)&&So(i,d,l[d])}),vS=Fi(function(i,l){Yn(l,sn(l),i)}),Cs=Fi(function(i,l,d,m){Yn(l,sn(l),i,m)}),HL=Fi(function(i,l,d,m){Yn(l,Dt(l),i,m)}),jL=ar(lg);function qL(i,l){var d=Ei(i);return l==null?d:Kw(d,l)}var GL=$e(function(i,l){i=it(i);var d=-1,m=l.length,w=m>2?l[2]:t;for(w&&tn(l[0],l[1],w)&&(m=1);++d<m;)for(var x=l[d],A=sn(x),N=-1,V=A.length;++N<V;){var J=A[N],Y=i[J];(Y===t||Rn(Y,Ii[J])&&!nt.call(i,J))&&(i[J]=x[J])}return i}),UL=$e(function(i){return i.push(t,DC),dn(mS,t,i)});function WL(i,l){return Fw(i,Me(l,3),Jn)}function KL(i,l){return Fw(i,Me(l,3),ag)}function JL(i,l){return i==null?i:sg(i,Me(l,3),sn)}function YL(i,l){return i==null?i:Qw(i,Me(l,3),sn)}function ZL(i,l){return i&&Jn(i,Me(l,3))}function XL(i,l){return i&&ag(i,Me(l,3))}function QL(i){return i==null?[]:rs(i,Dt(i))}function eN(i){return i==null?[]:rs(i,sn(i))}function Vg(i,l,d){var m=i==null?t:Xr(i,l);return m===t?d:m}function tN(i,l){return i!=null&&NC(i,l,TD)}function $g(i,l){return i!=null&&NC(i,l,ID)}var nN=EC(function(i,l,d){l!=null&&typeof l.toString!="function"&&(l=ql.call(l)),i[l]=d},jg(an)),rN=EC(function(i,l,d){l!=null&&typeof l.toString!="function"&&(l=ql.call(l)),nt.call(i,l)?i[l].push(d):i[l]=[d]},Me),iN=$e(Io);function Dt(i){return ln(i)?Uw(i):fg(i)}function sn(i){return ln(i)?Uw(i,!0):LD(i)}function oN(i,l){var d={};return l=Me(l,3),Jn(i,function(m,w,x){lr(d,l(m,w,x),m)}),d}function lN(i,l){var d={};return l=Me(l,3),Jn(i,function(m,w,x){lr(d,w,l(m,w,x))}),d}var sN=Fi(function(i,l,d){is(i,l,d)}),mS=Fi(function(i,l,d,m){is(i,l,d,m)}),aN=ar(function(i,l){var d={};if(i==null)return d;var m=!1;l=ct(l,function(x){return x=Dr(x,i),m||(m=x.length>1),x}),Yn(i,Mg(i),d),m&&(d=In(d,p|_|v,n2));for(var w=l.length;w--;)_g(d,l[w]);return d});function uN(i,l){return _S(i,bs(Me(l)))}var cN=ar(function(i,l){return i==null?{}:zD(i,l)});function _S(i,l){if(i==null)return{};var d=ct(Mg(i),function(m){return[m]});return l=Me(l),uC(i,d,function(m,w){return l(m,w[0])})}function dN(i,l,d){l=Dr(l,i);var m=-1,w=l.length;for(w||(w=1,i=t);++m<w;){var x=i==null?t:i[Zn(l[m])];x===t&&(m=w,x=d),i=cr(x)?x.call(i):x}return i}function fN(i,l,d){return i==null?i:xo(i,l,d)}function gN(i,l,d,m){return m=typeof m=="function"?m:t,i==null?i:xo(i,l,d,m)}var bS=OC(Dt),yS=OC(sn);function hN(i,l,d){var m=Le(i),w=m||Lr(i)||Pi(i);if(l=Me(l,4),d==null){var x=i&&i.constructor;w?d=m?new x:[]:dt(i)?d=cr(x)?Ei(Wl(i)):{}:d={}}return(w?Cn:Jn)(i,function(A,N,V){return l(d,A,N,V)}),d}function pN(i,l){return i==null?!0:_g(i,l)}function vN(i,l,d){return i==null?i:hC(i,l,wg(d))}function mN(i,l,d,m){return m=typeof m=="function"?m:t,i==null?i:hC(i,l,wg(d),m)}function Di(i){return i==null?[]:Qf(i,Dt(i))}function _N(i){return i==null?[]:Qf(i,sn(i))}function bN(i,l,d){return d===t&&(d=l,l=t),d!==t&&(d=En(d),d=d===d?d:0),l!==t&&(l=En(l),l=l===l?l:0),Zr(En(i),l,d)}function yN(i,l,d){return l=dr(l),d===t?(d=l,l=0):d=dr(d),i=En(i),MD(i,l,d)}function wN(i,l,d){if(d&&typeof d!="boolean"&&tn(i,l,d)&&(l=d=t),d===t&&(typeof l=="boolean"?(d=l,l=t):typeof i=="boolean"&&(d=i,i=t)),i===t&&l===t?(i=0,l=1):(i=dr(i),l===t?(l=i,i=0):l=dr(l)),i>l){var m=i;i=l,l=m}if(d||i%1||l%1){var w=qw();return jt(i+w*(l-i+QO("1e-"+((w+"").length-1))),l)}return pg(i,l)}var CN=Ai(function(i,l,d){return l=l.toLowerCase(),i+(d?wS(l):l)});function wS(i){return Hg(et(i).toLowerCase())}function CS(i){return i=et(i),i&&i.replace(ve,fP).replace(jO,"")}function SN(i,l,d){i=et(i),l=gn(l);var m=i.length;d=d===t?m:Zr(ze(d),0,m);var w=d;return d-=l.length,d>=0&&i.slice(d,w)==l}function TN(i){return i=et(i),i&&fo.test(i)?i.replace(Wn,gP):i}function IN(i){return i=et(i),i&&Xt.test(i)?i.replace(pt,"\\$&"):i}var MN=Ai(function(i,l,d){return i+(d?"-":"")+l.toLowerCase()}),xN=Ai(function(i,l,d){return i+(d?" ":"")+l.toLowerCase()}),EN=IC("toLowerCase");function FN(i,l,d){i=et(i),l=ze(l);var m=l?Si(i):0;if(!l||m>=l)return i;var w=(l-m)/2;return cs(Zl(w),d)+i+cs(Yl(w),d)}function AN(i,l,d){i=et(i),l=ze(l);var m=l?Si(i):0;return l&&m<l?i+cs(l-m,d):i}function ON(i,l,d){i=et(i),l=ze(l);var m=l?Si(i):0;return l&&m<l?cs(l-m,d)+i:i}function PN(i,l,d){return d||l==null?l=0:l&&(l=+l),BP(et(i).replace(vt,""),l||0)}function DN(i,l,d){return(d?tn(i,l,d):l===t)?l=1:l=ze(l),vg(et(i),l)}function kN(){var i=arguments,l=et(i[0]);return i.length<3?l:l.replace(i[1],i[2])}var LN=Ai(function(i,l,d){return i+(d?"_":"")+l.toLowerCase()});function NN(i,l,d){return d&&typeof d!="number"&&tn(i,l,d)&&(l=d=t),d=d===t?de:d>>>0,d?(i=et(i),i&&(typeof l=="string"||l!=null&&!Bg(l))&&(l=gn(l),!l&&Ci(i))?kr(Nn(i),0,d):i.split(l,d)):[]}var zN=Ai(function(i,l,d){return i+(d?" ":"")+Hg(l)});function RN(i,l,d){return i=et(i),d=d==null?0:Zr(ze(d),0,i.length),l=gn(l),i.slice(d,d+l.length)==l}function BN(i,l,d){var m=M.templateSettings;d&&tn(i,l,d)&&(l=t),i=et(i),l=Cs({},l,m,PC);var w=Cs({},l.imports,m.imports,PC),x=Dt(w),A=Qf(w,x),N,V,J=0,Y=l.interpolate||tt,te="__p += '",ae=tg((l.escape||tt).source+"|"+Y.source+"|"+(Y===bi?Ll:tt).source+"|"+(l.evaluate||tt).source+"|$","g"),be="//# sourceURL="+(nt.call(l,"sourceURL")?(l.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++KO+"]")+`
295
+ `;i.replace(ae,function(Fe,Ue,Ye,pn,nn,vn){return Ye||(Ye=pn),te+=i.slice(J,vn).replace(Ot,hP),Ue&&(N=!0,te+=`' +
296
+ __e(`+Ue+`) +
297
+ '`),nn&&(V=!0,te+=`';
298
+ `+nn+`;
299
+ __p += '`),Ye&&(te+=`' +
300
+ ((__t = (`+Ye+`)) == null ? '' : __t) +
301
+ '`),J=vn+Fe.length,Fe}),te+=`';
302
+ `;var Ee=nt.call(l,"variable")&&l.variable;if(!Ee)te=`with (obj) {
303
+ `+te+`
149
304
  }
150
- `;else if(Tn.test(ve))throw new Te(c);R=(D?R.replace(gc,""):R).replace(xi,"$1").replace(Ai,"$1;"),R="function("+(ve||"obj")+`) {
151
- `+(ve?"":`obj || (obj = {});
152
- `)+"var __t, __p = ''"+(I?", __e = _.escape":"")+(D?`, __j = Array.prototype.join;
305
+ `;else if(Ln.test(Ee))throw new ke(u);te=(V?te.replace(uo,""):te).replace(Sr,"$1").replace(Tr,"$1;"),te="function("+(Ee||"obj")+`) {
306
+ `+(Ee?"":`obj || (obj = {});
307
+ `)+"var __t, __p = ''"+(N?", __e = _.escape":"")+(V?`, __j = Array.prototype.join;
153
308
  function print() { __p += __j.call(arguments, '') }
154
309
  `:`;
155
- `)+R+`return __p
156
- }`;var Ee=ob(function(){return ze(w,ue+"return "+R).apply(n,A)});if(Ee.source=R,_f(Ee))throw Ee;return Ee}function EB(r){return je(r).toLowerCase()}function xB(r){return je(r).toUpperCase()}function AB(r,i,l){if(r=je(r),r&&(l||i===n))return py(r);if(!r||!(i=Xt(i)))return r;var f=wn(r),m=wn(i),w=gy(f,m),A=my(f,m)+1;return Or(f,w,A).join("")}function OB(r,i,l){if(r=je(r),r&&(l||i===n))return r.slice(0,vy(r)+1);if(!r||!(i=Xt(i)))return r;var f=wn(r),m=my(f,wn(i))+1;return Or(f,0,m).join("")}function IB(r,i,l){if(r=je(r),r&&(l||i===n))return r.replace(jt,"");if(!r||!(i=Xt(i)))return r;var f=wn(r),m=gy(f,wn(i));return Or(f,m).join("")}function PB(r,i){var l=S,f=j;if(it(i)){var m="separator"in i?i.separator:m;l="length"in i?Ce(i.length):l,f="omission"in i?Xt(i.omission):f}r=je(r);var w=r.length;if(Mi(r)){var A=wn(r);w=A.length}if(l>=w)return r;var I=l-Fi(f);if(I<1)return f;var D=A?Or(A,0,I).join(""):r.slice(0,I);if(m===n)return D+f;if(A&&(I+=D.length-I),Tf(m)){if(r.slice(I).search(m)){var G,H=D;for(m.global||(m=Nc(m.source,je(wo.exec(m))+"g")),m.lastIndex=0;G=m.exec(H);)var R=G.index;D=D.slice(0,R===n?I:R)}}else if(r.indexOf(Xt(m),I)!=I){var ne=D.lastIndexOf(m);ne>-1&&(D=D.slice(0,ne))}return D+f}function $B(r){return r=je(r),r&&mc.test(r)?r.replace(Ys,sN):r}var MB=Ui(function(r,i,l){return r+(l?" ":"")+i.toUpperCase()}),Cf=sv("toUpperCase");function ib(r,i,l){return r=je(r),i=l?n:i,i===n?tN(r)?uN(r):qk(r):r.match(i)||[]}var ob=Ae(function(r,i){try{return Rt(r,n,i)}catch(l){return _f(l)?l:new Te(l)}}),FB=Zn(function(r,i){return un(i,function(l){l=Ln(l),Jn(r,l,vf(r[l],r))}),r});function DB(r){var i=r==null?0:r.length,l=ye();return r=i?nt(r,function(f){if(typeof f[1]!="function")throw new cn(u);return[l(f[0]),f[1]]}):[],Ae(function(f){for(var m=-1;++m<i;){var w=r[m];if(Rt(w[0],this,f))return Rt(w[1],this,f)}})}function kB(r){return sL(dn(r,g))}function Ef(r){return function(){return r}}function NB(r,i){return r==null||r!==r?i:r}var LB=lv(),BB=lv(!0);function qt(r){return r}function xf(r){return By(typeof r=="function"?r:dn(r,g))}function zB(r){return Uy(dn(r,g))}function UB(r,i){return Wy(r,dn(i,g))}var WB=Ae(function(r,i){return function(l){return Fo(l,r,i)}}),jB=Ae(function(r,i){return function(l){return Fo(r,l,i)}});function Af(r,i,l){var f=Ct(i),m=Sa(i,f);l==null&&!(it(i)&&(m.length||!f.length))&&(l=i,i=r,r=this,m=Sa(i,Ct(i)));var w=!(it(l)&&"chain"in l)||!!l.chain,A=Qn(r);return un(m,function(I){var D=i[I];r[I]=D,A&&(r.prototype[I]=function(){var G=this.__chain__;if(w||G){var H=r(this.__wrapped__),R=H.__actions__=Vt(this.__actions__);return R.push({func:D,args:arguments,thisArg:r}),H.__chain__=G,H}return D.apply(r,wr([this.value()],arguments))})}),r}function VB(){return xt._===this&&(xt._=gN),this}function Of(){}function GB(r){return r=Ce(r),Ae(function(i){return jy(i,r)})}var HB=of(nt),qB=of(uy),YB=of(Ic);function sb(r){return df(r)?Pc(Ln(r)):SL(r)}function KB(r){return function(i){return r==null?n:Zr(r,i)}}var JB=cv(),RB=cv(!0);function If(){return[]}function Pf(){return!1}function ZB(){return{}}function XB(){return""}function QB(){return!0}function ez(r,i){if(r=Ce(r),r<1||r>ke)return[];var l=J,f=Pt(r,J);i=ye(i),r-=J;for(var m=Fc(f,i);++l<r;)i(l);return m}function tz(r){return Se(r)?nt(r,Ln):Qt(r)?[r]:Vt(xv(je(r)))}function nz(r){var i=++hN;return je(r)+i}var rz=Ia(function(r,i){return r+i},0),iz=sf("ceil"),oz=Ia(function(r,i){return r/i},1),sz=sf("floor");function az(r){return r&&r.length?wa(r,qt,Gc):n}function lz(r,i){return r&&r.length?wa(r,ye(i,2),Gc):n}function uz(r){return dy(r,qt)}function cz(r,i){return dy(r,ye(i,2))}function fz(r){return r&&r.length?wa(r,qt,Kc):n}function dz(r,i){return r&&r.length?wa(r,ye(i,2),Kc):n}var hz=Ia(function(r,i){return r*i},1),pz=sf("round"),gz=Ia(function(r,i){return r-i},0);function mz(r){return r&&r.length?Mc(r,qt):0}function yz(r,i){return r&&r.length?Mc(r,ye(i,2)):0}return v.after=z3,v.ary=Lv,v.assign=x4,v.assignIn=Zv,v.assignInWith=ja,v.assignWith=A4,v.at=O4,v.before=Bv,v.bind=vf,v.bindAll=FB,v.bindKey=zv,v.castArray=Z3,v.chain=Dv,v.chunk=s5,v.compact=a5,v.concat=l5,v.cond=DB,v.conforms=kB,v.constant=Ef,v.countBy=m3,v.create=I4,v.curry=Uv,v.curryRight=Wv,v.debounce=jv,v.defaults=P4,v.defaultsDeep=$4,v.defer=U3,v.delay=W3,v.difference=u5,v.differenceBy=c5,v.differenceWith=f5,v.drop=d5,v.dropRight=h5,v.dropRightWhile=p5,v.dropWhile=g5,v.fill=m5,v.filter=v3,v.flatMap=T3,v.flatMapDeep=w3,v.flatMapDepth=S3,v.flatten=Pv,v.flattenDeep=y5,v.flattenDepth=v5,v.flip=j3,v.flow=LB,v.flowRight=BB,v.fromPairs=b5,v.functions=B4,v.functionsIn=z4,v.groupBy=C3,v.initial=T5,v.intersection=w5,v.intersectionBy=S5,v.intersectionWith=C5,v.invert=W4,v.invertBy=j4,v.invokeMap=x3,v.iteratee=xf,v.keyBy=A3,v.keys=Ct,v.keysIn=Ht,v.map=Na,v.mapKeys=G4,v.mapValues=H4,v.matches=zB,v.matchesProperty=UB,v.memoize=Ba,v.merge=q4,v.mergeWith=Xv,v.method=WB,v.methodOf=jB,v.mixin=Af,v.negate=za,v.nthArg=GB,v.omit=Y4,v.omitBy=K4,v.once=V3,v.orderBy=O3,v.over=HB,v.overArgs=G3,v.overEvery=qB,v.overSome=YB,v.partial=bf,v.partialRight=Vv,v.partition=I3,v.pick=J4,v.pickBy=Qv,v.property=sb,v.propertyOf=KB,v.pull=O5,v.pullAll=Mv,v.pullAllBy=I5,v.pullAllWith=P5,v.pullAt=$5,v.range=JB,v.rangeRight=RB,v.rearg=H3,v.reject=M3,v.remove=M5,v.rest=q3,v.reverse=mf,v.sampleSize=D3,v.set=Z4,v.setWith=X4,v.shuffle=k3,v.slice=F5,v.sortBy=B3,v.sortedUniq=U5,v.sortedUniqBy=W5,v.split=TB,v.spread=Y3,v.tail=j5,v.take=V5,v.takeRight=G5,v.takeRightWhile=H5,v.takeWhile=q5,v.tap=a3,v.throttle=K3,v.thru=ka,v.toArray=Kv,v.toPairs=eb,v.toPairsIn=tb,v.toPath=tz,v.toPlainObject=Rv,v.transform=Q4,v.unary=J3,v.union=Y5,v.unionBy=K5,v.unionWith=J5,v.uniq=R5,v.uniqBy=Z5,v.uniqWith=X5,v.unset=eB,v.unzip=yf,v.unzipWith=Fv,v.update=tB,v.updateWith=nB,v.values=Vi,v.valuesIn=rB,v.without=Q5,v.words=ib,v.wrap=R3,v.xor=e3,v.xorBy=t3,v.xorWith=n3,v.zip=r3,v.zipObject=i3,v.zipObjectDeep=o3,v.zipWith=s3,v.entries=eb,v.entriesIn=tb,v.extend=Zv,v.extendWith=ja,Af(v,v),v.add=rz,v.attempt=ob,v.camelCase=aB,v.capitalize=nb,v.ceil=iz,v.clamp=iB,v.clone=X3,v.cloneDeep=e4,v.cloneDeepWith=t4,v.cloneWith=Q3,v.conformsTo=n4,v.deburr=rb,v.defaultTo=NB,v.divide=oz,v.endsWith=lB,v.eq=Cn,v.escape=uB,v.escapeRegExp=cB,v.every=y3,v.find=b3,v.findIndex=Ov,v.findKey=M4,v.findLast=_3,v.findLastIndex=Iv,v.findLastKey=F4,v.floor=sz,v.forEach=kv,v.forEachRight=Nv,v.forIn=D4,v.forInRight=k4,v.forOwn=N4,v.forOwnRight=L4,v.get=wf,v.gt=r4,v.gte=i4,v.has=U4,v.hasIn=Sf,v.head=$v,v.identity=qt,v.includes=E3,v.indexOf=_5,v.inRange=oB,v.invoke=V4,v.isArguments=ei,v.isArray=Se,v.isArrayBuffer=o4,v.isArrayLike=Gt,v.isArrayLikeObject=dt,v.isBoolean=s4,v.isBuffer=Ir,v.isDate=a4,v.isElement=l4,v.isEmpty=u4,v.isEqual=c4,v.isEqualWith=f4,v.isError=_f,v.isFinite=d4,v.isFunction=Qn,v.isInteger=Gv,v.isLength=Ua,v.isMap=Hv,v.isMatch=h4,v.isMatchWith=p4,v.isNaN=g4,v.isNative=m4,v.isNil=v4,v.isNull=y4,v.isNumber=qv,v.isObject=it,v.isObjectLike=ut,v.isPlainObject=zo,v.isRegExp=Tf,v.isSafeInteger=b4,v.isSet=Yv,v.isString=Wa,v.isSymbol=Qt,v.isTypedArray=ji,v.isUndefined=_4,v.isWeakMap=T4,v.isWeakSet=w4,v.join=E5,v.kebabCase=fB,v.last=pn,v.lastIndexOf=x5,v.lowerCase=dB,v.lowerFirst=hB,v.lt=S4,v.lte=C4,v.max=az,v.maxBy=lz,v.mean=uz,v.meanBy=cz,v.min=fz,v.minBy=dz,v.stubArray=If,v.stubFalse=Pf,v.stubObject=ZB,v.stubString=XB,v.stubTrue=QB,v.multiply=hz,v.nth=A5,v.noConflict=VB,v.noop=Of,v.now=La,v.pad=pB,v.padEnd=gB,v.padStart=mB,v.parseInt=yB,v.random=sB,v.reduce=P3,v.reduceRight=$3,v.repeat=vB,v.replace=bB,v.result=R4,v.round=pz,v.runInContext=F,v.sample=F3,v.size=N3,v.snakeCase=_B,v.some=L3,v.sortedIndex=D5,v.sortedIndexBy=k5,v.sortedIndexOf=N5,v.sortedLastIndex=L5,v.sortedLastIndexBy=B5,v.sortedLastIndexOf=z5,v.startCase=wB,v.startsWith=SB,v.subtract=gz,v.sum=mz,v.sumBy=yz,v.template=CB,v.times=ez,v.toFinite=er,v.toInteger=Ce,v.toLength=Jv,v.toLower=EB,v.toNumber=gn,v.toSafeInteger=E4,v.toString=je,v.toUpper=xB,v.trim=AB,v.trimEnd=OB,v.trimStart=IB,v.truncate=PB,v.unescape=$B,v.uniqueId=nz,v.upperCase=MB,v.upperFirst=Cf,v.each=kv,v.eachRight=Nv,v.first=$v,Af(v,function(){var r={};return kn(v,function(i,l){Ge.call(v.prototype,l)||(r[l]=i)}),r}(),{chain:!1}),v.VERSION=o,un(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){v[r].placeholder=v}),un(["drop","take"],function(r,i){$e.prototype[r]=function(l){l=l===n?1:bt(Ce(l),0);var f=this.__filtered__&&!i?new $e(this):this.clone();return f.__filtered__?f.__takeCount__=Pt(l,f.__takeCount__):f.__views__.push({size:Pt(l,J),type:r+(f.__dir__<0?"Right":"")}),f},$e.prototype[r+"Right"]=function(l){return this.reverse()[r](l).reverse()}}),un(["filter","map","takeWhile"],function(r,i){var l=i+1,f=l==me||l==_e;$e.prototype[r]=function(m){var w=this.clone();return w.__iteratees__.push({iteratee:ye(m,3),type:l}),w.__filtered__=w.__filtered__||f,w}}),un(["head","last"],function(r,i){var l="take"+(i?"Right":"");$e.prototype[r]=function(){return this[l](1).value()[0]}}),un(["initial","tail"],function(r,i){var l="drop"+(i?"":"Right");$e.prototype[r]=function(){return this.__filtered__?new $e(this):this[l](1)}}),$e.prototype.compact=function(){return this.filter(qt)},$e.prototype.find=function(r){return this.filter(r).head()},$e.prototype.findLast=function(r){return this.reverse().find(r)},$e.prototype.invokeMap=Ae(function(r,i){return typeof r=="function"?new $e(this):this.map(function(l){return Fo(l,r,i)})}),$e.prototype.reject=function(r){return this.filter(za(ye(r)))},$e.prototype.slice=function(r,i){r=Ce(r);var l=this;return l.__filtered__&&(r>0||i<0)?new $e(l):(r<0?l=l.takeRight(-r):r&&(l=l.drop(r)),i!==n&&(i=Ce(i),l=i<0?l.dropRight(-i):l.take(i-r)),l)},$e.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},$e.prototype.toArray=function(){return this.take(J)},kn($e.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],w=f||/^find/.test(i);m&&(v.prototype[i]=function(){var A=this.__wrapped__,I=f?[1]:arguments,D=A instanceof $e,G=I[0],H=D||Se(A),R=function(Pe){var Me=m.apply(v,wr([Pe],I));return f&&ne?Me[0]:Me};H&&l&&typeof G=="function"&&G.length!=1&&(D=H=!1);var ne=this.__chain__,ue=!!this.__actions__.length,ve=w&&!ne,Ee=D&&!ue;if(!w&&H){A=Ee?A:new $e(this);var be=r.apply(A,I);return be.__actions__.push({func:ka,args:[R],thisArg:n}),new fn(be,ne)}return ve&&Ee?r.apply(this,I):(be=this.thru(R),ve?f?be.value()[0]:be.value():be)})}),un(["pop","push","shift","sort","splice","unshift"],function(r){var i=aa[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 w=this.value();return i.apply(Se(w)?w:[],m)}return this[l](function(A){return i.apply(Se(A)?A:[],m)})}}),kn($e.prototype,function(r,i){var l=v[i];if(l){var f=l.name+"";Ge.call(Li,f)||(Li[f]=[]),Li[f].push({name:i,func:l})}}),Li[Oa(n,k).name]=[{name:"wrapper",func:n}],$e.prototype.clone=$N,$e.prototype.reverse=MN,$e.prototype.value=FN,v.prototype.at=l3,v.prototype.chain=u3,v.prototype.commit=c3,v.prototype.next=f3,v.prototype.plant=h3,v.prototype.reverse=p3,v.prototype.toJSON=v.prototype.valueOf=v.prototype.value=g3,v.prototype.first=v.prototype.head,xo&&(v.prototype[xo]=d3),v},Di=cN();qr?((qr.exports=Di)._=Di,Ec._=Di):xt._=Di}).call(Un)}(ps,ps.exports);var HS=ps.exports;function Hh(e){const{renderers:t,cells:n,uischemas:o,schema:s,label:a,path:u,visible:c,enabled:d,uischema:p,rootSchema:y}=e,g=x.useMemo(()=>le.findUISchema(o,s,p.scope,u,()=>HS.isEmpty(u)?le.Generate.uiSchema(s,"VerticalLayout",void 0,y):{...le.Generate.uiSchema(s,"Group",void 0,y),label:a},p,y),[o,s,u,a,p,y]);return c?h.jsx(Fe.JsonFormsDispatch,{visible:c,enabled:d,schema:s,uischema:g,path:u,renderers:t,cells:n}):null}function nu(e){const t=In(e),{path:n,data:o,schema:s}=e,a=hs(o,s),u=x.useMemo(()=>{var _;const y=o===null,g=(_=t.error)==null?void 0:_.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=x.useMemo(()=>({...t,...a,...u}),[t,u,a]),[d,p]=bn("OneOfEnum",n,c,e);return d===void 0?h.jsx(b.Select,{...p}):d}function ru(e){const t=In(e),{path:n,data:o,schema:s}=e,a=jh({data:o,onChange:t.onChange}),u=x.useMemo(()=>({...t,...a}),[t,a]),[c,d]=bn("Text",n,u,e);return c===void 0?s.format==="password"?h.jsx(b.PasswordInput,{...d}):h.jsx(b.TextInput,{...d}):c}const qh=le.rankWith(1,le.isBooleanControl),Yh=Fe.withJsonFormsCellProps(e=>h.jsx(Xl,{...e})),Kh=le.rankWith(1,le.isDateControl),Jh=Fe.withJsonFormsCellProps(e=>h.jsx(Ql,{...e})),Rh=le.rankWith(1,le.isDateTimeControl),Zh=Fe.withJsonFormsControlProps(e=>h.jsx(eu,{...e})),Xh=le.rankWith(2,le.isEnumControl),Qh=Fe.withJsonFormsEnumProps(Fe.withTranslateProps(e=>h.jsx(tu,{...e})),!1),ep=le.rankWith(1,le.isIntegerControl),tp=Fe.withJsonFormsCellProps(e=>h.jsx(no,{...e})),np=le.rankWith(1,le.isNumberControl),rp=Fe.withJsonFormsCellProps(e=>h.jsx(no,{...e})),ip=le.rankWith(2,le.isOneOfControl),op=Fe.withJsonFormsOneOfEnumProps(Fe.withTranslateProps(e=>h.jsx(nu,{...e})),!1),sp=le.rankWith(1,le.isStringControl),ap=Fe.withJsonFormsCellProps(e=>h.jsx(ru,{...e})),lp=x.memo(function({open:t,onClose:n,onConfirm:o,onCancel:s,title:a,message:u,acceptText:c,declineText:d}){return h.jsxs(b.Modal,{opened:t,withCloseButton:!1,centered:!0,title:a,keepMounted:!0,onClose:n,children:[u,h.jsxs(b.Flex,{justify:"flex-end",align:"center",gap:"sm",children:[h.jsx(b.Button,{onClick:s,children:d}),h.jsx(b.Button,{onClick:o,children:c})]})]})});var iu={exports:{}},He={};/**
157
- * @license React
158
- * react-is.production.js
159
- *
160
- * Copyright (c) Meta Platforms, Inc. and affiliates.
161
- *
162
- * This source code is licensed under the MIT license found in the
163
- * LICENSE file in the root directory of this source tree.
164
- */var up;function qS(){if(up)return He;up=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"),p=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),_=Symbol.for("react.view_transition"),C=Symbol.for("react.client.reference");function E(T){if(typeof T=="object"&&T!==null){var P=T.$$typeof;switch(P){case e:switch(T=T.type,T){case n:case s:case o:case d:case p:case _:return T;default:switch(T=T&&T.$$typeof,T){case u:case c:case g:case y:return T;case a:return T;default:return P}}case t:return P}}}return He.ContextConsumer=a,He.ContextProvider=u,He.Element=e,He.ForwardRef=c,He.Fragment=n,He.Lazy=g,He.Memo=y,He.Portal=t,He.Profiler=s,He.StrictMode=o,He.Suspense=d,He.SuspenseList=p,He.isContextConsumer=function(T){return E(T)===a},He.isContextProvider=function(T){return E(T)===u},He.isElement=function(T){return typeof T=="object"&&T!==null&&T.$$typeof===e},He.isForwardRef=function(T){return E(T)===c},He.isFragment=function(T){return E(T)===n},He.isLazy=function(T){return E(T)===g},He.isMemo=function(T){return E(T)===y},He.isPortal=function(T){return E(T)===t},He.isProfiler=function(T){return E(T)===s},He.isStrictMode=function(T){return E(T)===o},He.isSuspense=function(T){return E(T)===d},He.isSuspenseList=function(T){return E(T)===p},He.isValidElementType=function(T){return typeof T=="string"||typeof T=="function"||T===n||T===s||T===o||T===d||T===p||typeof T=="object"&&T!==null&&(T.$$typeof===g||T.$$typeof===y||T.$$typeof===u||T.$$typeof===a||T.$$typeof===c||T.$$typeof===C||T.getModuleId!==void 0)},He.typeOf=E,He}var qe={};/**
165
- * @license React
166
- * react-is.development.js
167
- *
168
- * Copyright (c) Meta Platforms, Inc. and affiliates.
169
- *
170
- * This source code is licensed under the MIT license found in the
171
- * LICENSE file in the root directory of this source tree.
172
- */var cp;function YS(){return cp||(cp=1,process.env.NODE_ENV!=="production"&&function(){function e(T){if(typeof T=="object"&&T!==null){var P=T.$$typeof;switch(P){case t:switch(T=T.type,T){case o:case a:case s:case p:case y:case C:return T;default:switch(T=T&&T.$$typeof,T){case c:case d:case _:case g:return T;case u:return T;default:return P}}case n:return P}}}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"),p=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),C=Symbol.for("react.view_transition"),E=Symbol.for("react.client.reference");qe.ContextConsumer=u,qe.ContextProvider=c,qe.Element=t,qe.ForwardRef=d,qe.Fragment=o,qe.Lazy=_,qe.Memo=g,qe.Portal=n,qe.Profiler=a,qe.StrictMode=s,qe.Suspense=p,qe.SuspenseList=y,qe.isContextConsumer=function(T){return e(T)===u},qe.isContextProvider=function(T){return e(T)===c},qe.isElement=function(T){return typeof T=="object"&&T!==null&&T.$$typeof===t},qe.isForwardRef=function(T){return e(T)===d},qe.isFragment=function(T){return e(T)===o},qe.isLazy=function(T){return e(T)===_},qe.isMemo=function(T){return e(T)===g},qe.isPortal=function(T){return e(T)===n},qe.isProfiler=function(T){return e(T)===a},qe.isStrictMode=function(T){return e(T)===s},qe.isSuspense=function(T){return e(T)===p},qe.isSuspenseList=function(T){return e(T)===y},qe.isValidElementType=function(T){return typeof T=="string"||typeof T=="function"||T===o||T===a||T===s||T===p||T===y||typeof T=="object"&&T!==null&&(T.$$typeof===_||T.$$typeof===g||T.$$typeof===c||T.$$typeof===u||T.$$typeof===d||T.$$typeof===E||T.getModuleId!==void 0)},qe.typeOf=e}()),qe}process.env.NODE_ENV==="production"?iu.exports=qS():iu.exports=YS();var gs=iu.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 fp(e){if(Mt.isValidElement(e)||gs.isValidElementType(e)||!Vn(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=fp(e[n])}),t}function Yt(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])||gs.isValidElementType(t[s])?o[s]=t[s]:Vn(t[s])&&Object.prototype.hasOwnProperty.call(e,s)&&Vn(e[s])?o[s]=Yt(e[s],t[s],n):n.clone?o[s]=Vn(t[s])?fp(t[s]):t[s]:o[s]=t[s]}),o}var ou={exports:{}},ms={exports:{}},Ue={};/** @license React v16.13.1
173
- * react-is.production.min.js
174
- *
175
- * Copyright (c) Facebook, Inc. and its affiliates.
176
- *
177
- * This source code is licensed under the MIT license found in the
178
- * LICENSE file in the root directory of this source tree.
179
- */var dp;function KS(){if(dp)return Ue;dp=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,p=e?Symbol.for("react.concurrent_mode"):60111,y=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,_=e?Symbol.for("react.suspense_list"):60120,C=e?Symbol.for("react.memo"):60115,E=e?Symbol.for("react.lazy"):60116,T=e?Symbol.for("react.block"):60121,P=e?Symbol.for("react.fundamental"):60117,k=e?Symbol.for("react.responder"):60118,Q=e?Symbol.for("react.scope"):60119;function U(M){if(typeof M=="object"&&M!==null){var B=M.$$typeof;switch(B){case t:switch(M=M.type,M){case d:case p:case o:case a:case s:case g:return M;default:switch(M=M&&M.$$typeof,M){case c:case y:case E:case C:case u:return M;default:return B}}case n:return B}}}function N(M){return U(M)===p}return Ue.AsyncMode=d,Ue.ConcurrentMode=p,Ue.ContextConsumer=c,Ue.ContextProvider=u,Ue.Element=t,Ue.ForwardRef=y,Ue.Fragment=o,Ue.Lazy=E,Ue.Memo=C,Ue.Portal=n,Ue.Profiler=a,Ue.StrictMode=s,Ue.Suspense=g,Ue.isAsyncMode=function(M){return N(M)||U(M)===d},Ue.isConcurrentMode=N,Ue.isContextConsumer=function(M){return U(M)===c},Ue.isContextProvider=function(M){return U(M)===u},Ue.isElement=function(M){return typeof M=="object"&&M!==null&&M.$$typeof===t},Ue.isForwardRef=function(M){return U(M)===y},Ue.isFragment=function(M){return U(M)===o},Ue.isLazy=function(M){return U(M)===E},Ue.isMemo=function(M){return U(M)===C},Ue.isPortal=function(M){return U(M)===n},Ue.isProfiler=function(M){return U(M)===a},Ue.isStrictMode=function(M){return U(M)===s},Ue.isSuspense=function(M){return U(M)===g},Ue.isValidElementType=function(M){return typeof M=="string"||typeof M=="function"||M===o||M===p||M===a||M===s||M===g||M===_||typeof M=="object"&&M!==null&&(M.$$typeof===E||M.$$typeof===C||M.$$typeof===u||M.$$typeof===c||M.$$typeof===y||M.$$typeof===P||M.$$typeof===k||M.$$typeof===Q||M.$$typeof===T)},Ue.typeOf=U,Ue}var We={};/** @license React v16.13.1
180
- * react-is.development.js
181
- *
182
- * Copyright (c) Facebook, Inc. and its affiliates.
183
- *
184
- * This source code is licensed under the MIT license found in the
185
- * LICENSE file in the root directory of this source tree.
186
- */var hp;function JS(){return hp||(hp=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,p=e?Symbol.for("react.concurrent_mode"):60111,y=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,_=e?Symbol.for("react.suspense_list"):60120,C=e?Symbol.for("react.memo"):60115,E=e?Symbol.for("react.lazy"):60116,T=e?Symbol.for("react.block"):60121,P=e?Symbol.for("react.fundamental"):60117,k=e?Symbol.for("react.responder"):60118,Q=e?Symbol.for("react.scope"):60119;function U(ee){return typeof ee=="string"||typeof ee=="function"||ee===o||ee===p||ee===a||ee===s||ee===g||ee===_||typeof ee=="object"&&ee!==null&&(ee.$$typeof===E||ee.$$typeof===C||ee.$$typeof===u||ee.$$typeof===c||ee.$$typeof===y||ee.$$typeof===P||ee.$$typeof===k||ee.$$typeof===Q||ee.$$typeof===T)}function N(ee){if(typeof ee=="object"&&ee!==null){var yt=ee.$$typeof;switch(yt){case t:var Re=ee.type;switch(Re){case d:case p:case o:case a:case s:case g:return Re;default:var Nt=Re&&Re.$$typeof;switch(Nt){case c:case y:case E:case C:case u:return Nt;default:return yt}}case n:return yt}}}var M=d,B=p,Y=c,fe=u,ie=t,S=y,j=o,te=E,ce=C,me=n,Be=a,_e=s,De=g,ke=!1;function mt(ee){return ke||(ke=!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.")),K(ee)||N(ee)===d}function K(ee){return N(ee)===p}function J(ee){return N(ee)===c}function pe(ee){return N(ee)===u}function X(ee){return typeof ee=="object"&&ee!==null&&ee.$$typeof===t}function se(ee){return N(ee)===y}function V(ee){return N(ee)===o}function q(ee){return N(ee)===E}function re(ee){return N(ee)===C}function he(ee){return N(ee)===n}function ge(ee){return N(ee)===a}function xe(ee){return N(ee)===s}function Ye(ee){return N(ee)===g}We.AsyncMode=M,We.ConcurrentMode=B,We.ContextConsumer=Y,We.ContextProvider=fe,We.Element=ie,We.ForwardRef=S,We.Fragment=j,We.Lazy=te,We.Memo=ce,We.Portal=me,We.Profiler=Be,We.StrictMode=_e,We.Suspense=De,We.isAsyncMode=mt,We.isConcurrentMode=K,We.isContextConsumer=J,We.isContextProvider=pe,We.isElement=X,We.isForwardRef=se,We.isFragment=V,We.isLazy=q,We.isMemo=re,We.isPortal=he,We.isProfiler=ge,We.isStrictMode=xe,We.isSuspense=Ye,We.isValidElementType=U,We.typeOf=N}()),We}var pp;function gp(){return pp||(pp=1,process.env.NODE_ENV==="production"?ms.exports=KS():ms.exports=JS()),ms.exports}/*
187
- object-assign
188
- (c) Sindre Sorhus
189
- @license MIT
190
- */var su,mp;function RS(){if(mp)return su;mp=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 p={};return"abcdefghijklmnopqrst".split("").forEach(function(y){p[y]=y}),Object.keys(Object.assign({},p)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return su=s()?Object.assign:function(a,u){for(var c,d=o(a),p,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){p=e(c);for(var _=0;_<p.length;_++)n.call(c,p[_])&&(d[p[_]]=c[p[_]])}}return d},su}var au,yp;function lu(){if(yp)return au;yp=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return au=e,au}var uu,vp;function bp(){return vp||(vp=1,uu=Function.call.bind(Object.prototype.hasOwnProperty)),uu}var cu,_p;function ZS(){if(_p)return cu;_p=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=lu(),n={},o=bp();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,p){if(process.env.NODE_ENV!=="production"){for(var y in a)if(o(a,y)){var g;try{if(typeof a[y]!="function"){var _=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 _.name="Invariant Violation",_}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=p?p():"";e("Failed "+c+" type: "+g.message+(C??""))}}}}return s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},cu=s,cu}var fu,Tp;function XS(){if(Tp)return fu;Tp=1;var e=gp(),t=RS(),n=lu(),o=bp(),s=ZS(),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 fu=function(c,d){var p=typeof Symbol=="function"&&Symbol.iterator,y="@@iterator";function g(K){var J=K&&(p&&K[p]||K[y]);if(typeof J=="function")return J}var _="<<anonymous>>",C={array:k("array"),bigint:k("bigint"),bool:k("boolean"),func:k("function"),number:k("number"),object:k("object"),string:k("string"),symbol:k("symbol"),any:Q(),arrayOf:U,element:N(),elementType:M(),instanceOf:B,node:S(),objectOf:fe,oneOf:Y,oneOfType:ie,shape:te,exact:ce};function E(K,J){return K===J?K!==0||1/K===1/J:K!==K&&J!==J}function T(K,J){this.message=K,this.data=J&&typeof J=="object"?J:{},this.stack=""}T.prototype=Error.prototype;function P(K){if(process.env.NODE_ENV!=="production")var J={},pe=0;function X(V,q,re,he,ge,xe,Ye){if(he=he||_,xe=xe||re,Ye!==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 yt=he+":"+re;!J[yt]&&pe<3&&(a("You are manually calling a React.PropTypes validation function for the `"+xe+"` prop on `"+he+"`. 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."),J[yt]=!0,pe++)}}return q[re]==null?V?q[re]===null?new T("The "+ge+" `"+xe+"` is marked as required "+("in `"+he+"`, but its value is `null`.")):new T("The "+ge+" `"+xe+"` is marked as required in "+("`"+he+"`, but its value is `undefined`.")):null:K(q,re,he,ge,xe)}var se=X.bind(null,!1);return se.isRequired=X.bind(null,!0),se}function k(K){function J(pe,X,se,V,q,re){var he=pe[X],ge=_e(he);if(ge!==K){var xe=De(he);return new T("Invalid "+V+" `"+q+"` of type "+("`"+xe+"` supplied to `"+se+"`, expected ")+("`"+K+"`."),{expectedType:K})}return null}return P(J)}function Q(){return P(u)}function U(K){function J(pe,X,se,V,q){if(typeof K!="function")return new T("Property `"+q+"` of component `"+se+"` has invalid PropType notation inside arrayOf.");var re=pe[X];if(!Array.isArray(re)){var he=_e(re);return new T("Invalid "+V+" `"+q+"` of type "+("`"+he+"` supplied to `"+se+"`, expected an array."))}for(var ge=0;ge<re.length;ge++){var xe=K(re,ge,se,V,q+"["+ge+"]",n);if(xe instanceof Error)return xe}return null}return P(J)}function N(){function K(J,pe,X,se,V){var q=J[pe];if(!c(q)){var re=_e(q);return new T("Invalid "+se+" `"+V+"` of type "+("`"+re+"` supplied to `"+X+"`, expected a single ReactElement."))}return null}return P(K)}function M(){function K(J,pe,X,se,V){var q=J[pe];if(!e.isValidElementType(q)){var re=_e(q);return new T("Invalid "+se+" `"+V+"` of type "+("`"+re+"` supplied to `"+X+"`, expected a single ReactElement type."))}return null}return P(K)}function B(K){function J(pe,X,se,V,q){if(!(pe[X]instanceof K)){var re=K.name||_,he=mt(pe[X]);return new T("Invalid "+V+" `"+q+"` of type "+("`"+he+"` supplied to `"+se+"`, expected ")+("instance of `"+re+"`."))}return null}return P(J)}function Y(K){if(!Array.isArray(K))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 J(pe,X,se,V,q){for(var re=pe[X],he=0;he<K.length;he++)if(E(re,K[he]))return null;var ge=JSON.stringify(K,function(Ye,ee){var yt=De(ee);return yt==="symbol"?String(ee):ee});return new T("Invalid "+V+" `"+q+"` of value `"+String(re)+"` "+("supplied to `"+se+"`, expected one of "+ge+"."))}return P(J)}function fe(K){function J(pe,X,se,V,q){if(typeof K!="function")return new T("Property `"+q+"` of component `"+se+"` has invalid PropType notation inside objectOf.");var re=pe[X],he=_e(re);if(he!=="object")return new T("Invalid "+V+" `"+q+"` of type "+("`"+he+"` supplied to `"+se+"`, expected an object."));for(var ge in re)if(o(re,ge)){var xe=K(re,ge,se,V,q+"."+ge,n);if(xe instanceof Error)return xe}return null}return P(J)}function ie(K){if(!Array.isArray(K))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),u;for(var J=0;J<K.length;J++){var pe=K[J];if(typeof pe!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+ke(pe)+" at index "+J+"."),u}function X(se,V,q,re,he){for(var ge=[],xe=0;xe<K.length;xe++){var Ye=K[xe],ee=Ye(se,V,q,re,he,n);if(ee==null)return null;ee.data&&o(ee.data,"expectedType")&&ge.push(ee.data.expectedType)}var yt=ge.length>0?", expected one of type ["+ge.join(", ")+"]":"";return new T("Invalid "+re+" `"+he+"` supplied to "+("`"+q+"`"+yt+"."))}return P(X)}function S(){function K(J,pe,X,se,V){return me(J[pe])?null:new T("Invalid "+se+" `"+V+"` supplied to "+("`"+X+"`, expected a ReactNode."))}return P(K)}function j(K,J,pe,X,se){return new T((K||"React class")+": "+J+" type `"+pe+"."+X+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+se+"`.")}function te(K){function J(pe,X,se,V,q){var re=pe[X],he=_e(re);if(he!=="object")return new T("Invalid "+V+" `"+q+"` of type `"+he+"` "+("supplied to `"+se+"`, expected `object`."));for(var ge in K){var xe=K[ge];if(typeof xe!="function")return j(se,V,q,ge,De(xe));var Ye=xe(re,ge,se,V,q+"."+ge,n);if(Ye)return Ye}return null}return P(J)}function ce(K){function J(pe,X,se,V,q){var re=pe[X],he=_e(re);if(he!=="object")return new T("Invalid "+V+" `"+q+"` of type `"+he+"` "+("supplied to `"+se+"`, expected `object`."));var ge=t({},pe[X],K);for(var xe in ge){var Ye=K[xe];if(o(K,xe)&&typeof Ye!="function")return j(se,V,q,xe,De(Ye));if(!Ye)return new T("Invalid "+V+" `"+q+"` key `"+xe+"` supplied to `"+se+"`.\nBad object: "+JSON.stringify(pe[X],null," ")+`
191
- Valid keys: `+JSON.stringify(Object.keys(K),null," "));var ee=Ye(re,xe,se,V,q+"."+xe,n);if(ee)return ee}return null}return P(J)}function me(K){switch(typeof K){case"number":case"string":case"undefined":return!0;case"boolean":return!K;case"object":if(Array.isArray(K))return K.every(me);if(K===null||c(K))return!0;var J=g(K);if(J){var pe=J.call(K),X;if(J!==K.entries){for(;!(X=pe.next()).done;)if(!me(X.value))return!1}else for(;!(X=pe.next()).done;){var se=X.value;if(se&&!me(se[1]))return!1}}else return!1;return!0;default:return!1}}function Be(K,J){return K==="symbol"?!0:J?J["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&J instanceof Symbol:!1}function _e(K){var J=typeof K;return Array.isArray(K)?"array":K instanceof RegExp?"object":Be(J,K)?"symbol":J}function De(K){if(typeof K>"u"||K===null)return""+K;var J=_e(K);if(J==="object"){if(K instanceof Date)return"date";if(K instanceof RegExp)return"regexp"}return J}function ke(K){var J=De(K);switch(J){case"array":case"object":return"an "+J;case"boolean":case"date":case"regexp":return"a "+J;default:return J}}function mt(K){return!K.constructor||!K.constructor.name?_:K.constructor.name}return C.checkPropTypes=s,C.resetWarningCache=s.resetWarningCache,C.PropTypes=C,C},fu}var du,wp;function QS(){if(wp)return du;wp=1;var e=lu();function t(){}function n(){}return n.resetWarningCache=t,du=function(){function o(u,c,d,p,y,g){if(g!==e){var _=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 _.name="Invariant Violation",_}}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},du}if(process.env.NODE_ENV!=="production"){var eC=gp(),tC=!0;ou.exports=XS()(eC.isElement,tC)}else ou.exports=QS()();var nC=ou.exports;const Ne=rr(nC);function lr(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 Sp(e,t=""){return e.displayName||e.name||t}function Cp(e,t,n){const o=Sp(t);return e.displayName||(o!==""?`${n}(${o})`:n)}function rC(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Sp(e,"Component");if(typeof e=="object")switch(e.$$typeof){case gs.ForwardRef:return Cp(e,e.render,"ForwardRef");case gs.Memo:return Cp(e,e.type,"memo");default:return}}}function Br(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":lr(7));return e.charAt(0).toUpperCase()+e.slice(1)}function hu(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]=hu(a[d],u[d])}}}else n[s]===void 0&&(n[s]=e[s])}return n}function iC(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 p=a[d];p&&(u+=(c===!0?"":" ")+t(p),c=!1,n&&n[p]&&(u+=" "+n[p]))}o[s]=u}return o}const Ep=e=>e,oC=(()=>{let e=Ep;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Ep}}})(),sC={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 pu(e,t,n="Mui"){const o=sC[t];return o?`${n}-${o}`:`${oC.generate(e)}-${t}`}function aC(e,t,n="Mui"){const o={};return t.forEach(s=>{o[s]=pu(e,s,n)}),o}function lC(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function ro(e,t){return t?Yt(e,t,{clone:!1}):e}const ur=process.env.NODE_ENV!=="production"?Ne.oneOfType([Ne.number,Ne.string,Ne.object,Ne.array]):{};function uC(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 cC(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function fC(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>\`.
192
- For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:lr(18,`(${t})`));return null}const[,o,s]=n,a=Number.isNaN(+o)?o||0:+o;return e.containerQueries(s).up(a)}function dC(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 ys={xs:0,sm:600,md:900,lg:1200,xl:1536},xp={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${ys[e]}px)`},hC={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:ys[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||xp;return t.reduce((u,c,d)=>(u[a.up(a.keys[d])]=n(t[d]),u),{})}if(typeof t=="object"){const a=o.breakpoints||xp;return Object.keys(t).reduce((u,c)=>{if(cC(a.keys,c)){const d=fC(o.containerQueries?o:hC,c);d&&(u[d]=n(t[c],c))}else if(Object.keys(a.values||ys).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 pC(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((o,s)=>{const a=e.up(s);return o[a]={},o},{}))||{}}function gC(e,t){return e.reduce((n,o)=>{const s=n[o];return(!s||Object.keys(s).length===0)&&delete n[o],n},t)}function vs(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 bs(e,t,n,o=n){let s;return typeof e=="function"?s=e(n):Array.isArray(e)?s=e[n]||o:s=vs(e,n)||o,t&&(s=t(s,o,e)),s}function ft(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,p=vs(d,o)||{};return Gn(u,c,g=>{let _=bs(p,s,g);return g===_&&typeof g=="string"&&(_=bs(p,s,`${t}${g==="default"?"":Br(g)}`,g)),n===!1?_:{[n]:_}})};return a.propTypes=process.env.NODE_ENV!=="production"?{[t]:ur}:{},a.filterProps=[t],a}function mC(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const yC={m:"margin",p:"padding"},vC={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Ap={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},bC=mC(e=>{if(e.length>2)if(Ap[e])e=Ap[e];else return[e];const[t,n]=e.split(""),o=yC[t],s=vC[n]||"";return Array.isArray(s)?s.map(a=>o+a):[o+s]}),_s=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Ts=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],_C=[..._s,...Ts];function io(e,t,n,o){const s=vs(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(`
193
- `)):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(`
194
- `)));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(`
195
- `)),()=>{})}function gu(e){return io(e,"spacing",8,"spacing")}function oo(e,t){return typeof t=="string"||t==null?t:e(t)}function TC(e,t){return n=>e.reduce((o,s)=>(o[s]=oo(t,n),o),{})}function wC(e,t,n,o){if(!t.includes(n))return null;const s=bC(n),a=TC(s,o),u=e[n];return Gn(e,u,a)}function Op(e,t){const n=gu(e.theme);return Object.keys(e).map(o=>wC(e,t,o,n)).reduce(ro,{})}function st(e){return Op(e,_s)}st.propTypes=process.env.NODE_ENV!=="production"?_s.reduce((e,t)=>(e[t]=ur,e),{}):{},st.filterProps=_s;function at(e){return Op(e,Ts)}at.propTypes=process.env.NODE_ENV!=="production"?Ts.reduce((e,t)=>(e[t]=ur,e),{}):{},at.filterProps=Ts,process.env.NODE_ENV!=="production"&&_C.reduce((e,t)=>(e[t]=ur,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]?ro(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 nn(e){return typeof e!="number"?e:`${e}px solid`}function rn(e,t){return ft({prop:e,themeKey:"borders",transform:t})}const SC=rn("border",nn),CC=rn("borderTop",nn),EC=rn("borderRight",nn),xC=rn("borderBottom",nn),AC=rn("borderLeft",nn),OC=rn("borderColor"),IC=rn("borderTopColor"),PC=rn("borderRightColor"),$C=rn("borderBottomColor"),MC=rn("borderLeftColor"),FC=rn("outline",nn),DC=rn("outlineColor"),Ss=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=io(e.theme,"shape.borderRadius",4,"borderRadius"),n=o=>({borderRadius:oo(t,o)});return Gn(e,e.borderRadius,n)}return null};Ss.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:ur}:{},Ss.filterProps=["borderRadius"],ws(SC,CC,EC,xC,AC,OC,IC,PC,$C,MC,Ss,FC,DC);const Cs=e=>{if(e.gap!==void 0&&e.gap!==null){const t=io(e.theme,"spacing",8,"gap"),n=o=>({gap:oo(t,o)});return Gn(e,e.gap,n)}return null};Cs.propTypes=process.env.NODE_ENV!=="production"?{gap:ur}:{},Cs.filterProps=["gap"];const Es=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=io(e.theme,"spacing",8,"columnGap"),n=o=>({columnGap:oo(t,o)});return Gn(e,e.columnGap,n)}return null};Es.propTypes=process.env.NODE_ENV!=="production"?{columnGap:ur}:{},Es.filterProps=["columnGap"];const xs=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=io(e.theme,"spacing",8,"rowGap"),n=o=>({rowGap:oo(t,o)});return Gn(e,e.rowGap,n)}return null};xs.propTypes=process.env.NODE_ENV!=="production"?{rowGap:ur}:{},xs.filterProps=["rowGap"];const kC=ft({prop:"gridColumn"}),NC=ft({prop:"gridRow"}),LC=ft({prop:"gridAutoFlow"}),BC=ft({prop:"gridAutoColumns"}),zC=ft({prop:"gridAutoRows"}),UC=ft({prop:"gridTemplateColumns"}),WC=ft({prop:"gridTemplateRows"}),jC=ft({prop:"gridTemplateAreas"}),VC=ft({prop:"gridArea"});ws(Cs,Es,xs,kC,NC,LC,BC,zC,UC,WC,jC,VC);function li(e,t){return t==="grey"?t:e}const GC=ft({prop:"color",themeKey:"palette",transform:li}),HC=ft({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:li}),qC=ft({prop:"backgroundColor",themeKey:"palette",transform:li});ws(GC,HC,qC);function Kt(e){return e<=1&&e!==0?`${e*100}%`:e}const YC=ft({prop:"width",transform:Kt}),mu=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])||ys[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};mu.filterProps=["maxWidth"];const KC=ft({prop:"minWidth",transform:Kt}),JC=ft({prop:"height",transform:Kt}),RC=ft({prop:"maxHeight",transform:Kt}),ZC=ft({prop:"minHeight",transform:Kt});ft({prop:"size",cssProperty:"width",transform:Kt}),ft({prop:"size",cssProperty:"height",transform:Kt});const XC=ft({prop:"boxSizing"});ws(YC,mu,KC,JC,RC,ZC,XC);const As={border:{themeKey:"borders",transform:nn},borderTop:{themeKey:"borders",transform:nn},borderRight:{themeKey:"borders",transform:nn},borderBottom:{themeKey:"borders",transform:nn},borderLeft:{themeKey:"borders",transform:nn},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:nn},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Ss},color:{themeKey:"palette",transform:li},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:li},backgroundColor:{themeKey:"palette",transform:li},p:{style:at},pt:{style:at},pr:{style:at},pb:{style:at},pl:{style:at},px:{style:at},py:{style:at},padding:{style:at},paddingTop:{style:at},paddingRight:{style:at},paddingBottom:{style:at},paddingLeft:{style:at},paddingX:{style:at},paddingY:{style:at},paddingInline:{style:at},paddingInlineStart:{style:at},paddingInlineEnd:{style:at},paddingBlock:{style:at},paddingBlockStart:{style:at},paddingBlockEnd:{style:at},m:{style:st},mt:{style:st},mr:{style:st},mb:{style:st},ml:{style:st},mx:{style:st},my:{style:st},margin:{style:st},marginTop:{style:st},marginRight:{style:st},marginBottom:{style:st},marginLeft:{style:st},marginX:{style:st},marginY:{style:st},marginInline:{style:st},marginInlineStart:{style:st},marginInlineEnd:{style:st},marginBlock:{style:st},marginBlockStart:{style:st},marginBlockEnd:{style:st},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:Cs},rowGap:{style:xs},columnGap:{style:Es},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:mu},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 QC(...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 eE(e,t){return typeof e=="function"?e(t):e}function tE(){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:p,transform:y,style:g}=c;if(o==null)return null;if(p==="typography"&&o==="inherit")return{[n]:o};const _=vs(s,p)||{};return g?g(u):Gn(u,o,E=>{let T=bs(_,y,E);return E===T&&typeof E=="string"&&(T=bs(_,y,`${n}${E==="default"?"":Br(E)}`,E)),d===!1?T:{[d]:T}})}function t(n){const{sx:o,theme:s={}}=n||{};if(!o)return null;const a=s.unstable_sxConfig??As;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 p=pC(s.breakpoints),y=Object.keys(p);let g=p;return Object.keys(d).forEach(_=>{const C=eE(d[_],s);if(C!=null)if(typeof C=="object")if(a[_])g=ro(g,e(_,C,s,a));else{const E=Gn({theme:s},C,T=>({[_]:T}));QC(E,C)?g[_]=t({sx:C,theme:s}):g=ro(g,E)}else g=ro(g,e(_,C,s,a))}),uC(s,gC(y,g))}return Array.isArray(o)?o.map(u):u(o)}return t}const ui=tE();ui.filterProps=["sx"];function yu(){return yu=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},yu.apply(null,arguments)}function nE(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 rE={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 Ip(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var iE=/[A-Z]|^ms/g,oE=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Pp=function(t){return t.charCodeAt(1)===45},$p=function(t){return t!=null&&typeof t!="boolean"},vu=Ip(function(e){return Pp(e)?e:e.replace(iE,"-$&").toLowerCase()}),Mp=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(oE,function(o,s,a){return Pn={name:s,styles:a,next:Pn},s})}return rE[t]!==1&&!Pp(t)&&typeof n=="number"&&n!==0?n+"px":n};function so(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 sE(e,t,n)}case"function":{if(e!==void 0){var d=Pn,p=n(e);return Pn=d,so(e,t,p)}break}}var y=n;if(t==null)return y;var g=t[y];return g!==void 0?g:y}function sE(e,t,n){var o="";if(Array.isArray(n))for(var s=0;s<n.length;s++)o+=so(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]+"}":$p(c)&&(o+=vu(a)+":"+Mp(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++)$p(u[d])&&(o+=vu(a)+":"+Mp(a,u[d])+";");else{var p=so(e,t,u);switch(a){case"animation":case"animationName":{o+=vu(a)+":"+p+";";break}default:o+=a+"{"+p+"}"}}}return o}var Fp=/label:\s*([^\s;{]+)\s*(;|$)/g,Pn;function Dp(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+=so(n,t,a);else{var u=a;s+=u[0]}for(var c=1;c<e.length;c++)if(s+=so(n,t,e[c]),o){var d=a;s+=d[c]}Fp.lastIndex=0;for(var p="",y;(y=Fp.exec(s))!==null;)p+="-"+y[1];var g=nE(s)+p;return{name:g,styles:s,next:Pn}}var aE=function(t){return t()},lE=Mt.useInsertionEffect?Mt.useInsertionEffect:!1,uE=lE||aE,cE=!0;function fE(e,t,n){var o="";return n.split(" ").forEach(function(s){e[s]!==void 0?t.push(e[s]+";"):s&&(o+=s+" ")}),o}var kp=function(t,n,o){var s=t.key+"-"+n.name;(o===!1||cE===!1)&&t.registered[s]===void 0&&(t.registered[s]=n.styles)},dE=function(t,n,o){kp(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)}},hE=/^((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)-.*))$/,pE=Ip(function(e){return hE.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),gE=pE,mE=function(t){return t!=="theme"},Np=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?gE:mE},Lp=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},yE=function(t){var n=t.cache,o=t.serialized,s=t.isStringTag;return kp(n,o,s),uE(function(){return dE(n,o,s)}),null},vE=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=Lp(t,n,o),d=c||Np(s),p=!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 _=y[0];g.push(_[0]);for(var C=y.length,E=1;E<C;E++)g.push(y[E],_[E])}var T=Ff.withEmotionCache(function(P,k,Q){var U=p&&P.as||s,N="",M=[],B=P;if(P.theme==null){B={};for(var Y in P)B[Y]=P[Y];B.theme=Mt.useContext(Ff.ThemeContext)}typeof P.className=="string"?N=fE(k.registered,M,P.className):P.className!=null&&(N=P.className+" ");var fe=Dp(g.concat(M),k.registered,B);N+=k.key+"-"+fe.name,u!==void 0&&(N+=" "+u);var ie=p&&c===void 0?Np(U):d,S={};for(var j in P)p&&j==="as"||ie(j)&&(S[j]=P[j]);return S.className=N,Q&&(S.ref=Q),Mt.createElement(Mt.Fragment,null,Mt.createElement(yE,{cache:k,serialized:fe,isStringTag:typeof U=="string"}),Mt.createElement(U,S))});return T.displayName=a!==void 0?a:"Styled("+(typeof s=="string"?s:s.displayName||s.name||"Component")+")",T.defaultProps=t.defaultProps,T.__emotion_real=T,T.__emotion_base=s,T.__emotion_styles=g,T.__emotion_forwardProp=c,Object.defineProperty(T,"toString",{value:function(){return"."+u}}),T.withComponent=function(P,k){var Q=e(P,yu({},n,k,{shouldForwardProp:Lp(T,k,!0)}));return Q.apply(void 0,g)},T}},bE=["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"],bu=vE.bind(null);bE.forEach(function(e){bu[e]=bu(e)});/**
196
- * @mui/styled-engine v6.4.11
197
- *
198
- * @license MIT
199
- * This source code is licensed under the MIT license found in the
200
- * LICENSE file in the root directory of this source tree.
201
- */function _E(e,t){const n=bu(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(`
202
- `)):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 TE(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const Bp=[];function zp(e){return Bp[0]=e,Dp(Bp)}const wE=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=wE(t),u=Object.keys(a);function c(_){return`@media (min-width:${typeof t[_]=="number"?t[_]:_}${n})`}function d(_){return`@media (max-width:${(typeof t[_]=="number"?t[_]:_)-o/100}${n})`}function p(_,C){const E=u.indexOf(C);return`@media (min-width:${typeof t[_]=="number"?t[_]:_}${n}) and (max-width:${(E!==-1&&typeof t[u[E]]=="number"?t[u[E]]:C)-o/100}${n})`}function y(_){return u.indexOf(_)+1<u.length?p(_,u[u.indexOf(_)+1]):c(_)}function g(_){const C=u.indexOf(_);return C===0?c(u[1]):C===u.length-1?d(u[C]):p(_,u[u.indexOf(_)+1]).replace("@media","@media not all and")}return{keys:u,values:a,up:c,down:d,between:p,only:y,not:g,unit:n,...s}}const CE={borderRadius:4};function Up(e=8,t=gu({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 EE(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 Wp(e={},...t){const{breakpoints:n={},palette:o={},spacing:s,shape:a={},...u}=e,c=SE(n),d=Up(s);let p=Yt({breakpoints:c,direction:"ltr",components:{},palette:{mode:"light",...o},spacing:d,shape:{...CE,...a}},u);return p=dC(p),p.applyStyles=EE,p=t.reduce((y,g)=>Yt(y,g),p),p.unstable_sxConfig={...As,...u==null?void 0:u.unstable_sxConfig},p.unstable_sx=function(g){return ui({sx:g,theme:this})},p}function jp(e){const{variants:t,...n}=e,o={variants:t,style:zp(n),isProcessed:!0};return o.style===n||t&&t.forEach(s=>{typeof s.style!="function"&&(s.style=zp(s.style))}),o}const xE=Wp();function _u(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function AE(e){return e?(t,n)=>n[e]:null}function OE(e,t,n){e.theme=ME(e.theme)?n:e.theme[t]||e.theme}function Os(e,t){const n=typeof t=="function"?t(e):t;if(Array.isArray(n))return n.flatMap(o=>Os(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 Vp(e,n.variants,[o])}return n!=null&&n.isProcessed?n.style:n}function Vp(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 IE(e={}){const{themeId:t,defaultTheme:n=xE,rootShouldForwardProp:o=_u,slotShouldForwardProp:s=_u}=e;function a(c){OE(c,t,n)}return(c,d={})=>{TE(c,M=>M.filter(B=>B!==ui));const{name:p,slot:y,skipVariantsResolver:g,skipSx:_,overridesResolver:C=AE(Gp(y)),...E}=d,T=g!==void 0?g:y&&y!=="Root"&&y!=="root"||!1,P=_||!1;let k=_u;y==="Root"||y==="root"?k=o:y?k=s:FE(c)&&(k=void 0);const Q=_E(c,{shouldForwardProp:k,label:$E(p,y),...E}),U=M=>{if(typeof M=="function"&&M.__emotion_real!==M)return function(Y){return Os(Y,M)};if(Vn(M)){const B=jp(M);return B.variants?function(fe){return Os(fe,B)}:B.style}return M},N=(...M)=>{const B=[],Y=M.map(U),fe=[];if(B.push(a),p&&C&&fe.push(function(te){var _e,De;const me=(De=(_e=te.theme.components)==null?void 0:_e[p])==null?void 0:De.styleOverrides;if(!me)return null;const Be={};for(const ke in me)Be[ke]=Os(te,me[ke]);return C(te,Be)}),p&&!T&&fe.push(function(te){var Be,_e;const ce=te.theme,me=(_e=(Be=ce==null?void 0:ce.components)==null?void 0:Be[p])==null?void 0:_e.variants;return me?Vp(te,me):null}),P||fe.push(ui),Array.isArray(Y[0])){const j=Y.shift(),te=new Array(B.length).fill(""),ce=new Array(fe.length).fill("");let me;me=[...te,...j,...ce],me.raw=[...te,...j.raw,...ce],B.unshift(me)}const ie=[...B,...Y,...fe],S=Q(...ie);return c.muiName&&(S.muiName=c.muiName),process.env.NODE_ENV!=="production"&&(S.displayName=PE(p,y,c)),S};return Q.withConfig&&(N.withConfig=Q.withConfig),N}}function PE(e,t,n){return e?`${e}${Br(t||"")}`:`Styled(${rC(n)})`}function $E(e,t){let n;return process.env.NODE_ENV!=="production"&&e&&(n=`${e}-${Gp(t||"Root")}`),n}function ME(e){for(const t in e)return!1;return!0}function FE(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Gp(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function Tu(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}].`),lC(e,t,n)}function DE(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 cr(e){if(e.type)return e;if(e.charAt(0)==="#")return cr(DE(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.
203
- The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:lr(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.
204
- The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:lr(10,s))}else o=o.split(",");return o=o.map(a=>parseFloat(a)),{type:n,values:o,colorSpace:s}}const kE=e=>{const t=cr(e);return t.values.slice(0,3).map((n,o)=>t.type.includes("hsl")&&o!==0?`${n}%`:n).join(" ")},ao=(e,t)=>{try{return kE(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function Is(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 Hp(e){e=cr(e);const{values:t}=e,n=t[0],o=t[1]/100,s=t[2]/100,a=o*Math.min(s,1-s),u=(p,y=(p+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])),Is({type:c,values:d})}function wu(e){e=cr(e);let t=e.type==="hsl"||e.type==="hsla"?cr(Hp(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 qp(e,t){const n=wu(e),o=wu(t);return(Math.max(n,o)+.05)/(Math.min(n,o)+.05)}function NE(e,t){return e=cr(e),t=Tu(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,Is(e)}function Ps(e,t,n){try{return NE(e,t)}catch{return e}}function Su(e,t){if(e=cr(e),t=Tu(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 Is(e)}function Ke(e,t,n){try{return Su(e,t)}catch{return e}}function Cu(e,t){if(e=cr(e),t=Tu(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 Is(e)}function Je(e,t,n){try{return Cu(e,t)}catch{return e}}function LE(e,t=.15){return wu(e)>.5?Su(e,t):Cu(e,t)}function $s(e,t,n){try{return LE(e,t)}catch{return e}}const BE=Mt.createContext(void 0);process.env.NODE_ENV!=="production"&&(Ne.node,Ne.object);function zE(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?hu(s.defaultProps,o):!s.styleOverrides&&!s.variants?hu(s,o):o}function UE({props:e,name:t}){const n=Mt.useContext(BE);return zE({props:e,name:t,theme:{components:n}})}const Yp={theme:void 0};function WE(e){let t,n;return function(s){let a=t;return(a===void 0||s.theme!==n)&&(Yp.theme=s.theme,a=jp(e(Yp)),t=a,n=s.theme),a}}function jE(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 Kp=(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])})},VE=(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)},GE=(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 Eu(e,t){const{prefix:n,shouldSkipGeneratingVar:o}=t||{},s={},a={},u={};return VE(e,(c,d,p)=>{if((typeof d=="string"||typeof d=="number")&&(!o||!o(c,d))){const y=`--${n?`${n}-`:""}${c.join("-")}`,g=GE(c,d);Object.assign(s,{[y]:g}),Kp(a,c,`var(${y})`,p),Kp(u,c,`var(${y}, ${g})`,p)}},c=>c[0]==="vars"),{css:s,vars:a,varsWithDefaults:u}}function HE(e,t={}){const{getSelector:n=P,disableCssColorScheme:o,colorSchemeSelector:s}=t,{colorSchemes:a={},components:u,defaultColorScheme:c="light",...d}=e,{vars:p,css:y,varsWithDefaults:g}=Eu(d,t);let _=g;const C={},{[c]:E,...T}=a;if(Object.entries(T||{}).forEach(([U,N])=>{const{vars:M,css:B,varsWithDefaults:Y}=Eu(N,t);_=Yt(_,Y),C[U]={css:B,vars:M}}),E){const{css:U,vars:N,varsWithDefaults:M}=Eu(E,t);_=Yt(_,M),C[c]={css:U,vars:N}}function P(U,N){var B,Y;let M=s;if(s==="class"&&(M=".%s"),s==="data"&&(M="[data-%s]"),s!=null&&s.startsWith("data-")&&!s.includes("%s")&&(M=`[${s}="%s"]`),U){if(M==="media")return e.defaultColorScheme===U?":root":{[`@media (prefers-color-scheme: ${((Y=(B=a[U])==null?void 0:B.palette)==null?void 0:Y.mode)||U})`]:{":root":N}};if(M)return e.defaultColorScheme===U?`:root, ${M.replace("%s",String(U))}`:M.replace("%s",String(U))}return":root"}return{vars:_,generateThemeVars:()=>{let U={...p};return Object.entries(C).forEach(([,{vars:N}])=>{U=Yt(U,N)}),U},generateStyleSheets:()=>{var fe,ie;const U=[],N=e.defaultColorScheme||"light";function M(S,j){Object.keys(j).length&&U.push(typeof S=="string"?{[S]:{...j}}:S)}M(n(void 0,{...y}),y);const{[N]:B,...Y}=C;if(B){const{css:S}=B,j=(ie=(fe=a[N])==null?void 0:fe.palette)==null?void 0:ie.mode,te=!o&&j?{colorScheme:j,...S}:{...S};M(n(N,{...te}),te)}return Object.entries(Y).forEach(([S,{css:j}])=>{var me,Be;const te=(Be=(me=a[S])==null?void 0:me.palette)==null?void 0:Be.mode,ce=!o&&te?{colorScheme:te,...j}:{...j};M(n(S,{...ce}),ce)}),U}}}function qE(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 lo={black:"#000",white:"#fff"},YE={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"},ci={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},fi={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},uo={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},di={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},hi={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},pi={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Jp(){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:lo.white,default:lo.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 KE=Jp();function Rp(){return{text:{primary:lo.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:lo.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 Zp=Rp();function Xp(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=Cu(e.main,s):t==="dark"&&(e.dark=Su(e.main,a)))}function JE(e="light"){return e==="dark"?{main:di[200],light:di[50],dark:di[400]}:{main:di[700],light:di[400],dark:di[800]}}function RE(e="light"){return e==="dark"?{main:ci[200],light:ci[50],dark:ci[400]}:{main:ci[500],light:ci[300],dark:ci[700]}}function ZE(e="light"){return e==="dark"?{main:fi[500],light:fi[300],dark:fi[700]}:{main:fi[700],light:fi[400],dark:fi[800]}}function XE(e="light"){return e==="dark"?{main:hi[400],light:hi[300],dark:hi[700]}:{main:hi[700],light:hi[500],dark:hi[900]}}function QE(e="light"){return e==="dark"?{main:pi[400],light:pi[300],dark:pi[700]}:{main:pi[800],light:pi[500],dark:pi[900]}}function ex(e="light"){return e==="dark"?{main:uo[400],light:uo[300],dark:uo[700]}:{main:"#ed6c02",light:uo[500],dark:uo[900]}}function xu(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:o=.2,...s}=e,a=e.primary||JE(t),u=e.secondary||RE(t),c=e.error||ZE(t),d=e.info||XE(t),p=e.success||QE(t),y=e.warning||ex(t);function g(T){const P=qp(T,Zp.text.primary)>=n?Zp.text.primary:KE.text.primary;if(process.env.NODE_ENV!=="production"){const k=qp(T,P);k<3&&console.error([`MUI: The contrast ratio of ${k}:1 for ${P} on ${T}`,"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(`
205
- `))}return P}const _=({color:T,name:P,mainShade:k=500,lightShade:Q=300,darkShade:U=700})=>{if(T={...T},!T.main&&T[k]&&(T.main=T[k]),!T.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${P?` (${P})`:""} provided to augmentColor(color) is invalid.
206
- The color object needs to have a \`main\` property or a \`${k}\` property.`:lr(11,P?` (${P})`:"",k));if(typeof T.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${P?` (${P})`:""} provided to augmentColor(color) is invalid.
207
- \`color.main\` should be a string, but \`${JSON.stringify(T.main)}\` was provided instead.
208
-
209
- Did you intend to use one of the following approaches?
210
-
211
- import { green } from "@mui/material/colors";
212
-
213
- const theme1 = createTheme({ palette: {
214
- primary: green,
215
- } });
216
-
217
- const theme2 = createTheme({ palette: {
218
- primary: { main: green[500] },
219
- } });`:lr(12,P?` (${P})`:"",JSON.stringify(T.main)));return Xp(T,"light",Q,o),Xp(T,"dark",U,o),T.contrastText||(T.contrastText=g(T.main)),T};let C;return t==="light"?C=Jp():t==="dark"&&(C=Rp()),process.env.NODE_ENV!=="production"&&(C||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),Yt({common:{...lo},mode:t,primary:_({color:a,name:"primary"}),secondary:_({color:u,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:_({color:c,name:"error"}),warning:_({color:y,name:"warning"}),info:_({color:d,name:"info"}),success:_({color:p,name:"success"}),grey:YE,contrastThreshold:n,getContrastText:g,augmentColor:_,tonalOffset:o,...C},s)}function tx(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 nx(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function rx(e){return Math.round(e*1e5)/1e5}const Qp={textTransform:"uppercase"},eg='"Roboto", "Helvetica", "Arial", sans-serif';function ix(e,t){const{fontFamily:n=eg,fontSize:o=14,fontWeightLight:s=300,fontWeightRegular:a=400,fontWeightMedium:u=500,fontWeightBold:c=700,htmlFontSize:d=16,allVariants:p,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 _=o/14,C=y||(P=>`${P/d*_}rem`),E=(P,k,Q,U,N)=>({fontFamily:n,fontWeight:P,fontSize:C(k),lineHeight:Q,...n===eg?{letterSpacing:`${rx(U/k)}em`}:{},...N,...p}),T={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,Qp),caption:E(a,12,1.66,.4),overline:E(a,12,2.66,1,Qp),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Yt({htmlFontSize:d,pxToRem:C,fontFamily:n,fontSize:o,fontWeightLight:s,fontWeightRegular:a,fontWeightMedium:u,fontWeightBold:c,...T},g,{clone:!1})}const ox=.2,sx=.14,ax=.12;function tt(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${ox})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${sx})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${ax})`].join(",")}const lx=["none",tt(0,2,1,-1,0,1,1,0,0,1,3,0),tt(0,3,1,-2,0,2,2,0,0,1,5,0),tt(0,3,3,-2,0,3,4,0,0,1,8,0),tt(0,2,4,-1,0,4,5,0,0,1,10,0),tt(0,3,5,-1,0,5,8,0,0,1,14,0),tt(0,3,5,-1,0,6,10,0,0,1,18,0),tt(0,4,5,-2,0,7,10,1,0,2,16,1),tt(0,5,5,-3,0,8,10,1,0,3,14,2),tt(0,5,6,-3,0,9,12,1,0,3,16,2),tt(0,6,6,-3,0,10,14,1,0,4,18,3),tt(0,6,7,-4,0,11,15,1,0,4,20,3),tt(0,7,8,-4,0,12,17,2,0,5,22,4),tt(0,7,8,-4,0,13,19,2,0,5,24,4),tt(0,7,9,-4,0,14,21,2,0,5,26,4),tt(0,8,9,-5,0,15,22,2,0,6,28,5),tt(0,8,10,-5,0,16,24,2,0,6,30,5),tt(0,8,11,-5,0,17,26,2,0,6,32,5),tt(0,9,11,-5,0,18,28,2,0,7,34,6),tt(0,9,12,-6,0,19,29,2,0,7,36,6),tt(0,10,13,-6,0,20,31,3,0,8,38,7),tt(0,10,13,-6,0,21,33,3,0,8,40,7),tt(0,10,14,-6,0,22,35,3,0,8,42,7),tt(0,11,14,-7,0,23,36,3,0,9,44,8),tt(0,11,15,-7,0,24,38,3,0,9,46,8)],ux={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)"},cx={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function tg(e){return`${Math.round(e)}ms`}function fx(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function dx(e){const t={...ux,...e.easing},n={...cx,...e.duration};return{getAutoHeightDuration:fx,create:(s=["all"],a={})=>{const{duration:u=n.standard,easing:c=t.easeInOut,delay:d=0,...p}=a;if(process.env.NODE_ENV!=="production"){const y=_=>typeof _=="string",g=_=>!Number.isNaN(parseFloat(_));!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(`
220
- `)),Object.keys(p).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(p).join(",")}].`)}return(Array.isArray(s)?s:[s]).map(y=>`${y} ${typeof u=="string"?u:tg(u)} ${c} ${typeof d=="string"?d:tg(d)}`).join(",")},...e,easing:t,duration:n}}const hx={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function px(e){return Vn(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function ng(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];!px(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';
221
-
222
- const theme = ${JSON.stringify(t,null,2)};
223
-
224
- theme.breakpoints = createBreakpoints(theme.breakpoints || {});
225
- theme.transitions = createTransitions(theme.transitions || {});
226
-
227
- export default theme;`}function Au(e={},...t){const{breakpoints:n,mixins:o={},spacing:s,palette:a={},transitions:u={},typography:c={},shape:d,...p}=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.":lr(20));const y=xu(a),g=Wp(e);let _=Yt(g,{mixins:nx(g.breakpoints,o),palette:y,shadows:lx.slice(),typography:ix(y,c),transitions:dx(u),zIndex:{...hx}});if(_=Yt(_,p),_=t.reduce((C,E)=>Yt(C,E),_),process.env.NODE_ENV!=="production"){const C=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],E=(T,P)=>{let k;for(k in T){const Q=T[k];if(C.includes(k)&&Object.keys(Q).length>0){if(process.env.NODE_ENV!=="production"){const U=pu("",k);console.error([`MUI: The \`${P}\` component increases the CSS specificity of the \`${k}\` internal state.`,"You can not override it like this: ",JSON.stringify(T,null,2),"",`Instead, you need to use the '&.${U}' syntax:`,JSON.stringify({root:{[`&.${U}`]:Q}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
228
- `))}T[k]={}}}};Object.keys(_.components).forEach(T=>{const P=_.components[T].styleOverrides;P&&T.startsWith("Mui")&&E(P,T)})}return _.unstable_sxConfig={...As,...p==null?void 0:p.unstable_sxConfig},_.unstable_sx=function(E){return ui({sx:E,theme:this})},_.toRuntimeSource=ng,_}function gx(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 mx=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=gx(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function rg(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function ig(e){return e==="dark"?mx:[]}function yx(e){const{palette:t={mode:"light"},opacity:n,overlays:o,...s}=e,a=xu(t);return{palette:a,opacity:{...rg(a.mode),...n},overlays:o||ig(a.mode),...s}}function vx(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 bx=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],_x=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 bx(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 Tx(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function z(e,t,n){!e[t]&&n&&(e[t]=n)}function co(e){return typeof e!="string"||!e.startsWith("hsl")?e:Hp(e)}function Hn(e,t){`${t}Channel`in e||(e[`${t}Channel`]=ao(co(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().
229
- 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 wx(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")=>jE(e);function Ou(e,t,n,o){if(!t)return;t=t===!0?{}:t;const s=o==="dark"?"dark":"light";if(!n){e[o]=yx({...t,palette:{mode:s,...t==null?void 0:t.palette}});return}const{palette:a,...u}=Au({...n,palette:{mode:s,...t==null?void 0:t.palette}});return e[o]={...t,palette:a,opacity:{...rg(s),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||ig(s)},u}function Cx(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:o,disableCssColorScheme:s=!1,cssVarPrefix:a="mui",shouldSkipGeneratingVar:u=vx,colorSchemeSelector:c=n.light&&n.dark?"media":void 0,rootSelector:d=":root",...p}=e,y=Object.keys(n)[0],g=o||(n.light&&y!=="light"?"light":y),_=Sx(a),{[g]:C,light:E,dark:T,...P}=n,k={...P};let Q=C;if((g==="dark"&&!("dark"in n)||g==="light"&&!("light"in n))&&(Q=!0),!Q)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${g}\` option is either missing or invalid.`:lr(21,g));const U=Ou(k,Q,p,g);E&&!k.light&&Ou(k,E,void 0,"light"),T&&!k.dark&&Ou(k,T,void 0,"dark");let N={defaultColorScheme:g,...U,cssVarPrefix:a,colorSchemeSelector:c,rootSelector:d,getCssVar:_,colorSchemes:k,font:{...tx(U.typography),...U.font},spacing:wx(p.spacing)};Object.keys(N.colorSchemes).forEach(ie=>{const S=N.colorSchemes[ie].palette,j=te=>{const ce=te.split("-"),me=ce[1],Be=ce[2];return _(te,S[me][Be])};if(S.mode==="light"&&(z(S.common,"background","#fff"),z(S.common,"onBackground","#000")),S.mode==="dark"&&(z(S.common,"background","#000"),z(S.common,"onBackground","#fff")),Tx(S,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),S.mode==="light"){z(S.Alert,"errorColor",Ke(S.error.light,.6)),z(S.Alert,"infoColor",Ke(S.info.light,.6)),z(S.Alert,"successColor",Ke(S.success.light,.6)),z(S.Alert,"warningColor",Ke(S.warning.light,.6)),z(S.Alert,"errorFilledBg",j("palette-error-main")),z(S.Alert,"infoFilledBg",j("palette-info-main")),z(S.Alert,"successFilledBg",j("palette-success-main")),z(S.Alert,"warningFilledBg",j("palette-warning-main")),z(S.Alert,"errorFilledColor",$n(()=>S.getContrastText(S.error.main))),z(S.Alert,"infoFilledColor",$n(()=>S.getContrastText(S.info.main))),z(S.Alert,"successFilledColor",$n(()=>S.getContrastText(S.success.main))),z(S.Alert,"warningFilledColor",$n(()=>S.getContrastText(S.warning.main))),z(S.Alert,"errorStandardBg",Je(S.error.light,.9)),z(S.Alert,"infoStandardBg",Je(S.info.light,.9)),z(S.Alert,"successStandardBg",Je(S.success.light,.9)),z(S.Alert,"warningStandardBg",Je(S.warning.light,.9)),z(S.Alert,"errorIconColor",j("palette-error-main")),z(S.Alert,"infoIconColor",j("palette-info-main")),z(S.Alert,"successIconColor",j("palette-success-main")),z(S.Alert,"warningIconColor",j("palette-warning-main")),z(S.AppBar,"defaultBg",j("palette-grey-100")),z(S.Avatar,"defaultBg",j("palette-grey-400")),z(S.Button,"inheritContainedBg",j("palette-grey-300")),z(S.Button,"inheritContainedHoverBg",j("palette-grey-A100")),z(S.Chip,"defaultBorder",j("palette-grey-400")),z(S.Chip,"defaultAvatarColor",j("palette-grey-700")),z(S.Chip,"defaultIconColor",j("palette-grey-700")),z(S.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),z(S.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),z(S.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),z(S.LinearProgress,"primaryBg",Je(S.primary.main,.62)),z(S.LinearProgress,"secondaryBg",Je(S.secondary.main,.62)),z(S.LinearProgress,"errorBg",Je(S.error.main,.62)),z(S.LinearProgress,"infoBg",Je(S.info.main,.62)),z(S.LinearProgress,"successBg",Je(S.success.main,.62)),z(S.LinearProgress,"warningBg",Je(S.warning.main,.62)),z(S.Skeleton,"bg",`rgba(${j("palette-text-primaryChannel")} / 0.11)`),z(S.Slider,"primaryTrack",Je(S.primary.main,.62)),z(S.Slider,"secondaryTrack",Je(S.secondary.main,.62)),z(S.Slider,"errorTrack",Je(S.error.main,.62)),z(S.Slider,"infoTrack",Je(S.info.main,.62)),z(S.Slider,"successTrack",Je(S.success.main,.62)),z(S.Slider,"warningTrack",Je(S.warning.main,.62));const te=$s(S.background.default,.8);z(S.SnackbarContent,"bg",te),z(S.SnackbarContent,"color",$n(()=>S.getContrastText(te))),z(S.SpeedDialAction,"fabHoverBg",$s(S.background.paper,.15)),z(S.StepConnector,"border",j("palette-grey-400")),z(S.StepContent,"border",j("palette-grey-400")),z(S.Switch,"defaultColor",j("palette-common-white")),z(S.Switch,"defaultDisabledColor",j("palette-grey-100")),z(S.Switch,"primaryDisabledColor",Je(S.primary.main,.62)),z(S.Switch,"secondaryDisabledColor",Je(S.secondary.main,.62)),z(S.Switch,"errorDisabledColor",Je(S.error.main,.62)),z(S.Switch,"infoDisabledColor",Je(S.info.main,.62)),z(S.Switch,"successDisabledColor",Je(S.success.main,.62)),z(S.Switch,"warningDisabledColor",Je(S.warning.main,.62)),z(S.TableCell,"border",Je(Ps(S.divider,1),.88)),z(S.Tooltip,"bg",Ps(S.grey[700],.92))}if(S.mode==="dark"){z(S.Alert,"errorColor",Je(S.error.light,.6)),z(S.Alert,"infoColor",Je(S.info.light,.6)),z(S.Alert,"successColor",Je(S.success.light,.6)),z(S.Alert,"warningColor",Je(S.warning.light,.6)),z(S.Alert,"errorFilledBg",j("palette-error-dark")),z(S.Alert,"infoFilledBg",j("palette-info-dark")),z(S.Alert,"successFilledBg",j("palette-success-dark")),z(S.Alert,"warningFilledBg",j("palette-warning-dark")),z(S.Alert,"errorFilledColor",$n(()=>S.getContrastText(S.error.dark))),z(S.Alert,"infoFilledColor",$n(()=>S.getContrastText(S.info.dark))),z(S.Alert,"successFilledColor",$n(()=>S.getContrastText(S.success.dark))),z(S.Alert,"warningFilledColor",$n(()=>S.getContrastText(S.warning.dark))),z(S.Alert,"errorStandardBg",Ke(S.error.light,.9)),z(S.Alert,"infoStandardBg",Ke(S.info.light,.9)),z(S.Alert,"successStandardBg",Ke(S.success.light,.9)),z(S.Alert,"warningStandardBg",Ke(S.warning.light,.9)),z(S.Alert,"errorIconColor",j("palette-error-main")),z(S.Alert,"infoIconColor",j("palette-info-main")),z(S.Alert,"successIconColor",j("palette-success-main")),z(S.Alert,"warningIconColor",j("palette-warning-main")),z(S.AppBar,"defaultBg",j("palette-grey-900")),z(S.AppBar,"darkBg",j("palette-background-paper")),z(S.AppBar,"darkColor",j("palette-text-primary")),z(S.Avatar,"defaultBg",j("palette-grey-600")),z(S.Button,"inheritContainedBg",j("palette-grey-800")),z(S.Button,"inheritContainedHoverBg",j("palette-grey-700")),z(S.Chip,"defaultBorder",j("palette-grey-700")),z(S.Chip,"defaultAvatarColor",j("palette-grey-300")),z(S.Chip,"defaultIconColor",j("palette-grey-300")),z(S.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),z(S.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),z(S.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),z(S.LinearProgress,"primaryBg",Ke(S.primary.main,.5)),z(S.LinearProgress,"secondaryBg",Ke(S.secondary.main,.5)),z(S.LinearProgress,"errorBg",Ke(S.error.main,.5)),z(S.LinearProgress,"infoBg",Ke(S.info.main,.5)),z(S.LinearProgress,"successBg",Ke(S.success.main,.5)),z(S.LinearProgress,"warningBg",Ke(S.warning.main,.5)),z(S.Skeleton,"bg",`rgba(${j("palette-text-primaryChannel")} / 0.13)`),z(S.Slider,"primaryTrack",Ke(S.primary.main,.5)),z(S.Slider,"secondaryTrack",Ke(S.secondary.main,.5)),z(S.Slider,"errorTrack",Ke(S.error.main,.5)),z(S.Slider,"infoTrack",Ke(S.info.main,.5)),z(S.Slider,"successTrack",Ke(S.success.main,.5)),z(S.Slider,"warningTrack",Ke(S.warning.main,.5));const te=$s(S.background.default,.98);z(S.SnackbarContent,"bg",te),z(S.SnackbarContent,"color",$n(()=>S.getContrastText(te))),z(S.SpeedDialAction,"fabHoverBg",$s(S.background.paper,.15)),z(S.StepConnector,"border",j("palette-grey-600")),z(S.StepContent,"border",j("palette-grey-600")),z(S.Switch,"defaultColor",j("palette-grey-300")),z(S.Switch,"defaultDisabledColor",j("palette-grey-600")),z(S.Switch,"primaryDisabledColor",Ke(S.primary.main,.55)),z(S.Switch,"secondaryDisabledColor",Ke(S.secondary.main,.55)),z(S.Switch,"errorDisabledColor",Ke(S.error.main,.55)),z(S.Switch,"infoDisabledColor",Ke(S.info.main,.55)),z(S.Switch,"successDisabledColor",Ke(S.success.main,.55)),z(S.Switch,"warningDisabledColor",Ke(S.warning.main,.55)),z(S.TableCell,"border",Ke(Ps(S.divider,1),.68)),z(S.Tooltip,"bg",Ps(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(te=>{const ce=S[te];te!=="tonalOffset"&&ce&&typeof ce=="object"&&(ce.main&&z(S[te],"mainChannel",ao(co(ce.main))),ce.light&&z(S[te],"lightChannel",ao(co(ce.light))),ce.dark&&z(S[te],"darkChannel",ao(co(ce.dark))),ce.contrastText&&z(S[te],"contrastTextChannel",ao(co(ce.contrastText))),te==="text"&&(Hn(S[te],"primary"),Hn(S[te],"secondary")),te==="action"&&(ce.active&&Hn(S[te],"active"),ce.selected&&Hn(S[te],"selected")))})}),N=t.reduce((ie,S)=>Yt(ie,S),N);const M={prefix:a,disableCssColorScheme:s,shouldSkipGeneratingVar:u,getSelector:_x(N)},{vars:B,generateThemeVars:Y,generateStyleSheets:fe}=HE(N,M);return N.vars=B,Object.entries(N.colorSchemes[N.defaultColorScheme]).forEach(([ie,S])=>{N[ie]=S}),N.generateThemeVars=Y,N.generateStyleSheets=fe,N.generateSpacing=function(){return Up(p.spacing,gu(this))},N.getColorSchemeSelector=qE(c),N.spacing=N.generateSpacing(),N.shouldSkipGeneratingVar=u,N.unstable_sxConfig={...As,...p==null?void 0:p.unstable_sxConfig},N.unstable_sx=function(S){return ui({sx:S,theme:this})},N.toRuntimeSource=ng,N}function og(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:xu({...n===!0?{}:n.palette,mode:t})})}function Ex(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],p={...s,...n?{[c]:{...typeof d!="boolean"&&d,palette:n}}:void 0};if(o===!1){if(!("colorSchemes"in e))return Au(e,...t);let y=n;"palette"in e||p[c]&&(p[c]!==!0?y=p[c].palette:c==="dark"&&(y={mode:"dark"}));const g=Au({...e,palette:y},...t);return g.defaultColorScheme=c,g.colorSchemes=p,g.palette.mode==="light"&&(g.colorSchemes.light={...p.light!==!0&&p.light,palette:g.palette},og(g,"dark",p.dark)),g.palette.mode==="dark"&&(g.colorSchemes.dark={...p.dark!==!0&&p.dark,palette:g.palette},og(g,"light",p.light)),g}return!n&&!("light"in p)&&c==="light"&&(p.light=!0),Cx({...u,colorSchemes:p,defaultColorScheme:c,...typeof o!="boolean"&&o},...t)}const xx=Ex(),Ax="$$material";function Ox(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Ix=IE({themeId:Ax,defaultTheme:xx,rootShouldForwardProp:e=>Ox(e)&&e!=="classes"}),Px=WE;process.env.NODE_ENV!=="production"&&(Ne.node,Ne.object.isRequired);function $x(e){return UE(e)}function Mx(e){return pu("MuiSvgIcon",e)}aC("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Fx=e=>{const{color:t,fontSize:n,classes:o}=e,s={root:["root",t!=="inherit"&&`color${Br(t)}`,`fontSize${Br(n)}`]};return iC(s,Mx,o)},Dx=Ix("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Br(n.color)}`],t[`fontSize${Br(n.fontSize)}`]]}})(Px(({theme:e})=>{var t,n,o,s,a,u,c,d,p,y,g,_,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:T=>!T.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=(p=e.typography)==null?void 0:p.pxToRem)==null?void 0:y.call(p,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,T])=>T&&T.main).map(([T])=>{var P,k;return{props:{color:T},style:{color:(k=(P=(e.vars??e).palette)==null?void 0:P[T])==null?void 0:k.main}}}),{props:{color:"action"},style:{color:(_=(g=(e.vars??e).palette)==null?void 0:g.action)==null?void 0:_.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}}]}})),Ms=Mt.forwardRef(function(t,n){const o=$x({props:t,name:"MuiSvgIcon"}),{children:s,className:a,color:u="inherit",component:c="svg",fontSize:d="medium",htmlColor:p,inheritViewBox:y=!1,titleAccess:g,viewBox:_="0 0 24 24",...C}=o,E=Mt.isValidElement(s)&&s.type==="svg",T={...o,color:u,component:c,fontSize:d,instanceFontSize:t.fontSize,inheritViewBox:y,viewBox:_,hasSvgAsChild:E},P={};y||(P.viewBox=_);const k=Fx(T);return h.jsxs(Dx,{as:c,className:Pr(k.root,a),focusable:"false",color:p,"aria-hidden":g?void 0:!0,role:g?"img":void 0,ref:n,...P,...C,...E&&s.props,ownerState:T,children:[E?s.props.children:s,g?h.jsx("title",{children:g}):null]})});process.env.NODE_ENV!=="production"&&(Ms.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}),Ms.muiName="SvgIcon";function Iu(e,t){function n(o,s){return h.jsx(Ms,{"data-testid":`${t}Icon`,ref:s,...o,children:e})}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=Ms.muiName,Mt.memo(Mt.forwardRef(n))}const kx=Iu(h.jsx("path",{d:"m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z"}),"ArrowDownward"),Nx=Iu(h.jsx("path",{d:"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8z"}),"ArrowUpward"),Lx=Iu(h.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 Bx(){this.__data__=[],this.size=0}var zx=Bx;function Ux(e,t){return e===t||e!==e&&t!==t}var Fs=Ux,Wx=Fs;function jx(e,t){for(var n=e.length;n--;)if(Wx(e[n][0],t))return n;return-1}var Ds=jx,Vx=Ds,Gx=Array.prototype,Hx=Gx.splice;function qx(e){var t=this.__data__,n=Vx(t,e);if(n<0)return!1;var o=t.length-1;return n==o?t.pop():Hx.call(t,n,1),--this.size,!0}var Yx=qx,Kx=Ds;function Jx(e){var t=this.__data__,n=Kx(t,e);return n<0?void 0:t[n][1]}var Rx=Jx,Zx=Ds;function Xx(e){return Zx(this.__data__,e)>-1}var Qx=Xx,eA=Ds;function tA(e,t){var n=this.__data__,o=eA(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}var nA=tA,rA=zx,iA=Yx,oA=Rx,sA=Qx,aA=nA;function gi(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])}}gi.prototype.clear=rA,gi.prototype.delete=iA,gi.prototype.get=oA,gi.prototype.has=sA,gi.prototype.set=aA;var ks=gi,lA=ks;function uA(){this.__data__=new lA,this.size=0}var cA=uA;function fA(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var dA=fA;function hA(e){return this.__data__.get(e)}var pA=hA;function gA(e){return this.__data__.has(e)}var mA=gA,yA=Nr,vA=yA(Object,"create"),Ns=vA,sg=Ns;function bA(){this.__data__=sg?sg(null):{},this.size=0}var _A=bA;function TA(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var wA=TA,SA=Ns,CA="__lodash_hash_undefined__",EA=Object.prototype,xA=EA.hasOwnProperty;function AA(e){var t=this.__data__;if(SA){var n=t[e];return n===CA?void 0:n}return xA.call(t,e)?t[e]:void 0}var OA=AA,IA=Ns,PA=Object.prototype,$A=PA.hasOwnProperty;function MA(e){var t=this.__data__;return IA?t[e]!==void 0:$A.call(t,e)}var FA=MA,DA=Ns,kA="__lodash_hash_undefined__";function NA(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=DA&&t===void 0?kA:t,this}var LA=NA,BA=_A,zA=wA,UA=OA,WA=FA,jA=LA;function mi(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])}}mi.prototype.clear=BA,mi.prototype.delete=zA,mi.prototype.get=UA,mi.prototype.has=WA,mi.prototype.set=jA;var VA=mi,ag=VA,GA=ks,HA=Vl;function qA(){this.size=0,this.__data__={hash:new ag,map:new(HA||GA),string:new ag}}var YA=qA;function KA(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var JA=KA,RA=JA;function ZA(e,t){var n=e.__data__;return RA(t)?n[typeof t=="string"?"string":"hash"]:n.map}var Ls=ZA,XA=Ls;function QA(e){var t=XA(this,e).delete(e);return this.size-=t?1:0,t}var eO=QA,tO=Ls;function nO(e){return tO(this,e).get(e)}var rO=nO,iO=Ls;function oO(e){return iO(this,e).has(e)}var sO=oO,aO=Ls;function lO(e,t){var n=aO(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}var uO=lO,cO=YA,fO=eO,dO=rO,hO=sO,pO=uO;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=cO,yi.prototype.delete=fO,yi.prototype.get=dO,yi.prototype.has=hO,yi.prototype.set=pO;var lg=yi,gO=ks,mO=Vl,yO=lg,vO=200;function bO(e,t){var n=this.__data__;if(n instanceof gO){var o=n.__data__;if(!mO||o.length<vO-1)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new yO(o)}return n.set(e,t),this.size=n.size,this}var _O=bO,TO=ks,wO=cA,SO=dA,CO=pA,EO=mA,xO=_O;function vi(e){var t=this.__data__=new TO(e);this.size=t.size}vi.prototype.clear=wO,vi.prototype.delete=SO,vi.prototype.get=CO,vi.prototype.has=EO,vi.prototype.set=xO;var AO=vi,OO=Nr,IO=function(){try{var e=OO(Object,"defineProperty");return e({},"",{}),e}catch{}}(),ug=IO,cg=ug;function PO(e,t,n){t=="__proto__"&&cg?cg(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Pu=PO,$O=Pu,MO=Fs;function FO(e,t,n){(n!==void 0&&!MO(e[t],n)||n===void 0&&!(t in e))&&$O(e,t,n)}var fg=FO;function DO(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 kO=DO,NO=kO,LO=NO(),BO=LO,Bs={exports:{}};Bs.exports,function(e,t){var n=vn,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(p,y){if(y)return p.slice();var g=p.length,_=c?c(g):new p.constructor(g);return p.copy(_),_}e.exports=d}(Bs,Bs.exports);var zO=Bs.exports,UO=vn,WO=UO.Uint8Array,jO=WO,dg=jO;function VO(e){var t=new e.constructor(e.byteLength);return new dg(t).set(new dg(e)),t}var GO=VO,HO=GO;function qO(e,t){var n=t?HO(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var YO=qO;function KO(e,t){var n=-1,o=e.length;for(t||(t=Array(o));++n<o;)t[n]=e[n];return t}var JO=KO,RO=jn,hg=Object.create,ZO=function(){function e(){}return function(t){if(!RO(t))return{};if(hg)return hg(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),XO=ZO,QO=wh,e2=QO(Object.getPrototypeOf,Object),pg=e2,t2=XO,n2=pg,r2=ss;function i2(e){return typeof e.constructor=="function"&&!r2(e)?t2(n2(e)):{}}var o2=i2,s2=ls,a2=si;function l2(e){return a2(e)&&s2(e)}var gg=l2,u2=oi,c2=pg,f2=si,d2="[object Object]",h2=Function.prototype,p2=Object.prototype,mg=h2.toString,g2=p2.hasOwnProperty,m2=mg.call(Object);function y2(e){if(!f2(e)||u2(e)!=d2)return!1;var t=c2(e);if(t===null)return!0;var n=g2.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&mg.call(n)==m2}var v2=y2;function b2(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var yg=b2,_2=Pu,T2=Fs,w2=Object.prototype,S2=w2.hasOwnProperty;function C2(e,t,n){var o=e[t];(!(S2.call(e,t)&&T2(o,n))||n===void 0&&!(t in e))&&_2(e,t,n)}var E2=C2,x2=E2,A2=Pu;function O2(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?A2(n,c,d):x2(n,c,d)}return n}var I2=O2;function P2(e,t){for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o}var $2=P2,M2=9007199254740991,F2=/^(?:0|[1-9]\d*)$/;function D2(e,t){var n=typeof e;return t=t??M2,!!t&&(n=="number"||n!="symbol"&&F2.test(e))&&e>-1&&e%1==0&&e<t}var vg=D2,k2=$2,N2=as,L2=to,B2=Jl,z2=vg,U2=Rl,W2=Object.prototype,j2=W2.hasOwnProperty;function V2(e,t){var n=L2(e),o=!n&&N2(e),s=!n&&!o&&B2(e),a=!n&&!o&&!s&&U2(e),u=n||o||s||a,c=u?k2(e.length,String):[],d=c.length;for(var p in e)(t||j2.call(e,p))&&!(u&&(p=="length"||s&&(p=="offset"||p=="parent")||a&&(p=="buffer"||p=="byteLength"||p=="byteOffset")||z2(p,d)))&&c.push(p);return c}var G2=V2;function H2(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var q2=H2,Y2=jn,K2=ss,J2=q2,R2=Object.prototype,Z2=R2.hasOwnProperty;function X2(e){if(!Y2(e))return J2(e);var t=K2(e),n=[];for(var o in e)o=="constructor"&&(t||!Z2.call(e,o))||n.push(o);return n}var Q2=X2,eI=G2,tI=Q2,nI=ls;function rI(e){return nI(e)?eI(e,!0):tI(e)}var bg=rI,iI=I2,oI=bg;function sI(e){return iI(e,oI(e))}var aI=sI,_g=fg,lI=zO,uI=YO,cI=JO,fI=o2,Tg=as,wg=to,dI=gg,hI=Jl,pI=Wl,gI=jn,mI=v2,yI=Rl,Sg=yg,vI=aI;function bI(e,t,n,o,s,a,u){var c=Sg(e,n),d=Sg(t,n),p=u.get(d);if(p){_g(e,n,p);return}var y=a?a(c,d,n+"",e,t,u):void 0,g=y===void 0;if(g){var _=wg(d),C=!_&&hI(d),E=!_&&!C&&yI(d);y=d,_||C||E?wg(c)?y=c:dI(c)?y=cI(c):C?(g=!1,y=lI(d,!0)):E?(g=!1,y=uI(d,!0)):y=[]:mI(d)||Tg(d)?(y=c,Tg(c)?y=vI(c):(!gI(c)||pI(c))&&(y=fI(d))):g=!1}g&&(u.set(d,y),s(y,d,o,a,u),u.delete(d)),_g(e,n,y)}var _I=bI,TI=AO,wI=fg,SI=BO,CI=_I,EI=jn,xI=bg,AI=yg;function Cg(e,t,n,o,s){e!==t&&SI(t,function(a,u){if(s||(s=new TI),EI(a))CI(e,t,u,n,Cg,o,s);else{var c=o?o(AI(e,u),a,u+"",e,t,s):void 0;c===void 0&&(c=a),wI(e,u,c)}},xI)}var OI=Cg;function II(e){return e}var Eg=II;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 $I=PI,MI=$I,xg=Math.max;function FI(e,t,n){return t=xg(t===void 0?e.length-1:t,0),function(){for(var o=arguments,s=-1,a=xg(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),MI(e,this,c)}}var DI=FI;function kI(e){return function(){return e}}var NI=kI,LI=NI,Ag=ug,BI=Eg,zI=Ag?function(e,t){return Ag(e,"toString",{configurable:!0,enumerable:!1,value:LI(t),writable:!0})}:BI,UI=zI,WI=800,jI=16,VI=Date.now;function GI(e){var t=0,n=0;return function(){var o=VI(),s=jI-(o-n);if(n=o,s>0){if(++t>=WI)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var HI=GI,qI=UI,YI=HI,KI=YI(qI),JI=KI,RI=Eg,ZI=DI,XI=JI;function QI(e,t){return XI(ZI(e,t,RI),e+"")}var Og=QI,eP=Fs,tP=ls,nP=vg,rP=jn;function iP(e,t,n){if(!rP(n))return!1;var o=typeof t;return(o=="number"?tP(n)&&nP(t,n.length):o=="string"&&t in n)?eP(n[t],e):!1}var Ig=iP,oP=Og,sP=Ig;function aP(e){return oP(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&&sP(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 lP=aP,uP=OI,cP=lP,fP=cP(function(e,t,n){uP(e,t,n)}),dP=fP;const hP=rr(dP);var pP=Math.ceil,gP=Math.max;function mP(e,t,n,o){for(var s=-1,a=gP(pP((t-e)/(n||1)),0),u=Array(a);a--;)u[o?a:++s]=e,e+=n;return u}var yP=mP,vP=_h,bP=1/0,_P=17976931348623157e292;function TP(e){if(!e)return e===0?e:0;if(e=vP(e),e===bP||e===-1/0){var t=e<0?-1:1;return t*_P}return e===e?e:0}var wP=TP,SP=yP,CP=Ig,$u=wP;function EP(e){return function(t,n,o){return o&&typeof o!="number"&&CP(t,n,o)&&(n=o=void 0),t=$u(t),n===void 0?(n=t,t=0):n=$u(n),o=o===void 0?t<n?1:-1:$u(o),SP(t,n,o,e)}}var xP=EP,AP=xP,OP=AP(),IP=OP;const PP=rr(IP);function $P(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 MP=$P;function FP(e){return function(t){return e==null?void 0:e[t]}}var DP=FP,kP=DP,NP={À:"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"},LP=kP(NP),BP=LP;function zP(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 UP=zP,Pg=os,WP=UP,jP=to,VP=yh,$g=Pg?Pg.prototype:void 0,Mg=$g?$g.toString:void 0;function Fg(e){if(typeof e=="string")return e;if(jP(e))return WP(e,Fg)+"";if(VP(e))return Mg?Mg.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var GP=Fg,HP=GP;function qP(e){return e==null?"":HP(e)}var Mu=qP,YP=BP,KP=Mu,JP=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,RP="\\u0300-\\u036f",ZP="\\ufe20-\\ufe2f",XP="\\u20d0-\\u20ff",QP=RP+ZP+XP,e$="["+QP+"]",t$=RegExp(e$,"g");function n$(e){return e=KP(e),e&&e.replace(JP,YP).replace(t$,"")}var r$=n$,i$=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function o$(e){return e.match(i$)||[]}var s$=o$,a$=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function l$(e){return a$.test(e)}var u$=l$,Dg="\\ud800-\\udfff",c$="\\u0300-\\u036f",f$="\\ufe20-\\ufe2f",d$="\\u20d0-\\u20ff",h$=c$+f$+d$,kg="\\u2700-\\u27bf",Ng="a-z\\xdf-\\xf6\\xf8-\\xff",p$="\\xac\\xb1\\xd7\\xf7",g$="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",m$="\\u2000-\\u206f",y$=" \\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",Lg="A-Z\\xc0-\\xd6\\xd8-\\xde",v$="\\ufe0e\\ufe0f",Bg=p$+g$+m$+y$,zg="['’]",Ug="["+Bg+"]",b$="["+h$+"]",Wg="\\d+",_$="["+kg+"]",jg="["+Ng+"]",Vg="[^"+Dg+Bg+Wg+kg+Ng+Lg+"]",T$="\\ud83c[\\udffb-\\udfff]",w$="(?:"+b$+"|"+T$+")",S$="[^"+Dg+"]",Gg="(?:\\ud83c[\\udde6-\\uddff]){2}",Hg="[\\ud800-\\udbff][\\udc00-\\udfff]",bi="["+Lg+"]",C$="\\u200d",qg="(?:"+jg+"|"+Vg+")",E$="(?:"+bi+"|"+Vg+")",Yg="(?:"+zg+"(?:d|ll|m|re|s|t|ve))?",Kg="(?:"+zg+"(?:D|LL|M|RE|S|T|VE))?",Jg=w$+"?",Rg="["+v$+"]?",x$="(?:"+C$+"(?:"+[S$,Gg,Hg].join("|")+")"+Rg+Jg+")*",A$="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",O$="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",I$=Rg+Jg+x$,P$="(?:"+[_$,Gg,Hg].join("|")+")"+I$,$$=RegExp([bi+"?"+jg+"+"+Yg+"(?="+[Ug,bi,"$"].join("|")+")",E$+"+"+Kg+"(?="+[Ug,bi+qg,"$"].join("|")+")",bi+"?"+qg+"+"+Yg,bi+"+"+Kg,O$,A$,Wg,P$].join("|"),"g");function M$(e){return e.match($$)||[]}var F$=M$,D$=s$,k$=u$,N$=Mu,L$=F$;function B$(e,t,n){return e=N$(e),t=n?void 0:t,t===void 0?k$(e)?L$(e):D$(e):e.match(t)||[]}var z$=B$,U$=MP,W$=r$,j$=z$,V$="['’]",G$=RegExp(V$,"g");function H$(e){return function(t){return U$(j$(W$(t).replace(G$,"")),e,"")}}var q$=H$;function Y$(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 K$=Y$,J$=K$;function R$(e,t,n){var o=e.length;return n=n===void 0?o:n,!t&&n>=o?e:J$(e,t,n)}var Z$=R$,X$="\\ud800-\\udfff",Q$="\\u0300-\\u036f",eM="\\ufe20-\\ufe2f",tM="\\u20d0-\\u20ff",nM=Q$+eM+tM,rM="\\ufe0e\\ufe0f",iM="\\u200d",oM=RegExp("["+iM+X$+nM+rM+"]");function sM(e){return oM.test(e)}var Zg=sM;function aM(e){return e.split("")}var lM=aM,Xg="\\ud800-\\udfff",uM="\\u0300-\\u036f",cM="\\ufe20-\\ufe2f",fM="\\u20d0-\\u20ff",dM=uM+cM+fM,hM="\\ufe0e\\ufe0f",pM="["+Xg+"]",Fu="["+dM+"]",Du="\\ud83c[\\udffb-\\udfff]",gM="(?:"+Fu+"|"+Du+")",Qg="[^"+Xg+"]",em="(?:\\ud83c[\\udde6-\\uddff]){2}",tm="[\\ud800-\\udbff][\\udc00-\\udfff]",mM="\\u200d",nm=gM+"?",rm="["+hM+"]?",yM="(?:"+mM+"(?:"+[Qg,em,tm].join("|")+")"+rm+nm+")*",vM=rm+nm+yM,bM="(?:"+[Qg+Fu+"?",Fu,em,tm,pM].join("|")+")",_M=RegExp(Du+"(?="+Du+")|"+bM+vM,"g");function TM(e){return e.match(_M)||[]}var wM=TM,SM=lM,CM=Zg,EM=wM;function xM(e){return CM(e)?EM(e):SM(e)}var AM=xM,OM=Z$,IM=Zg,PM=AM,$M=Mu;function MM(e){return function(t){t=$M(t);var n=IM(t)?PM(t):void 0,o=n?n[0]:t.charAt(0),s=n?OM(n,1).join(""):t.slice(1);return o[e]()+s}}var FM=MM,DM=FM,kM=DM("toUpperCase"),NM=kM,LM=q$,BM=NM,zM=LM(function(e,t,n){return e+(n?" ":"")+BM(t)}),UM=zM;const WM=rr(UM);function jM(e,t){for(var n=-1,o=t.length,s=e.length;++n<o;)e[s+n]=t[n];return e}var VM=jM,im=os,GM=as,HM=to,om=im?im.isConcatSpreadable:void 0;function qM(e){return HM(e)||GM(e)||!!(om&&e&&e[om])}var YM=qM,KM=VM,JM=YM;function sm(e,t,n,o,s){var a=-1,u=e.length;for(n||(n=JM),s||(s=[]);++a<u;){var c=e[a];t>0&&n(c)?t>1?sm(c,t-1,n,o,s):KM(s,c):o||(s[s.length]=c)}return s}var RM=sm,ZM="__lodash_hash_undefined__";function XM(e){return this.__data__.set(e,ZM),this}var QM=XM;function eF(e){return this.__data__.has(e)}var tF=eF,nF=lg,rF=QM,iF=tF;function zs(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new nF;++t<n;)this.add(e[t])}zs.prototype.add=zs.prototype.push=rF,zs.prototype.has=iF;var oF=zs;function sF(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 aF=sF;function lF(e){return e!==e}var uF=lF;function cF(e,t,n){for(var o=n-1,s=e.length;++o<s;)if(e[o]===t)return o;return-1}var fF=cF,dF=aF,hF=uF,pF=fF;function gF(e,t,n){return t===t?pF(e,t,n):dF(e,hF,n)}var mF=gF,yF=mF;function vF(e,t){var n=e==null?0:e.length;return!!n&&yF(e,t,0)>-1}var bF=vF;function _F(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 TF=_F;function wF(e,t){return e.has(t)}var SF=wF;function CF(){}var EF=CF;function xF(e){var t=-1,n=Array(e.size);return e.forEach(function(o){n[++t]=o}),n}var am=xF,ku=Eh,AF=EF,OF=am,IF=1/0,PF=ku&&1/OF(new ku([,-0]))[1]==IF?function(e){return new ku(e)}:AF,$F=PF,MF=oF,FF=bF,DF=TF,kF=SF,NF=$F,LF=am,BF=200;function zF(e,t,n){var o=-1,s=FF,a=e.length,u=!0,c=[],d=c;if(n)u=!1,s=DF;else if(a>=BF){var p=t?null:NF(e);if(p)return LF(p);u=!1,s=kF,d=new MF}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 _=d.length;_--;)if(d[_]===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 UF=zF,WF=RM,jF=Og,VF=UF,GF=gg,HF=jF(function(e){return VF(WF(e,1,GF,!0))}),qF=HF;const YF=rr(qF),_i=({children:e,...t})=>h.jsx(b.Table.Td,{...xn({style:{alignContent:"start"}},t),children:e}),lm=({errorMessages:e,id:t})=>{const n=(e==null?void 0:e.split(`
230
- `))||[];return h.jsx(b.Tooltip,{id:t,label:`${n.length} error(s)`,position:"right",children:h.jsx(b.Indicator,{size:"0.85rem",label:n.length,disabled:!e,style:{visibility:e?"visible":"hidden"},children:h.jsx(l1,{})})})},KF={paddingLeft:0,paddingRight:0},um=x.memo(function({numColumns:t,errors:n,label:o,description:s,path:a,addItem:u,schema:c,enabled:d,translations:p,rootSchema:y}){const g={bg:"transparent",size:"sm",c:"gray"},_=b.useProps("ActionIcon",g,{});return h.jsxs(b.Table.Tr,{children:[h.jsx(_i,{colSpan:t,children:h.jsxs(b.Stack,{children:[h.jsxs(b.Grid,{justify:"flex-start",align:"center",gutter:"sm",children:[h.jsx(b.Grid.Col,{span:"content",children:h.jsx(b.Text,{children:o})}),h.jsx(b.Grid.Col,{span:"content",children:h.jsx(lm,{id:"tooltip-validation",errorMessages:n})})]}),s&&h.jsx(b.Text,{size:"sm",children:s})]})}),d?h.jsx(_i,{align:"right",style:KF,children:h.jsx(b.Tooltip,{id:"tooltip-add",label:p.addTooltip,position:"left",children:h.jsx(b.ActionIcon,{bg:_.bg,size:_.size,c:_.c,onClick:u(a,le.createDefaultValue(c,y)),children:h.jsx(xl,{})})})}):null]})}),cm={fixedCell:{width:"150px",height:"50px",paddingLeft:0,paddingRight:0,textAlign:"center"},fixedCellSmall:{width:"50px",height:"50px",paddingLeft:0,paddingRight:0,textAlign:"center"}},fm=(e,t,n,o,s)=>{if(t.type==="object")return dm(t).map(a=>{var d,p;const u=le.Paths.compose(n,a),c={propName:a,schema:t,title:((p=(d=t.properties)==null?void 0:d[a])==null?void 0:p.title)??WM(a),rowPath:n,cellPath:u,enabled:o,cells:s};return h.jsx(e,{...c},u)});{const a={schema:t,rowPath:n,cellPath:n,enabled:o};return h.jsx(e,{...a},n)}},dm=e=>e.type==="object"&&typeof e.properties=="object"?Object.keys(e.properties).filter(t=>e.properties[t].type!=="array"):[""],JF=({numColumns:e,translations:t})=>h.jsx(b.Table.Tr,{children:h.jsx(_i,{colSpan:e,children:h.jsx(b.Text,{align:"center",children:t.noDataMessage})})}),RF=x.memo(function({title:t}){return h.jsx(b.Table.Th,{children:t})}),ZF=(e,t)=>{const n=t.rowPath+(t.schema.type==="object"?"."+t.propName:""),o=le.formatErrorMessage(YF(le.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}},hm=e=>({type:"Control",scope:e,label:!1}),XF=x.memo(function({path:t,propName:n,schema:o,rootSchema:s,errors:a,enabled:u,renderers:c,cells:d,isValid:p}){return h.jsxs(_i,{children:[o.properties?h.jsx(Fe.DispatchCell,{schema:le.Resolve.schema(o,`#/properties/${le.encode(n)}`,s),uischema:hm(`#/properties/${le.encode(n)}`),path:t,enabled:u,renderers:c,cells:d}):h.jsx(Fe.DispatchCell,{schema:o,uischema:hm("#"),path:t,enabled:u,renderers:c,cells:d}),h.jsx(b.Text,{size:"xs",children:p?"":a})]})}),QF=e=>{const t=Fe.useJsonForms(),n=ZF(t,e),o=Lh(n.errors);return h.jsx(XF,{...n,isValid:o})},eD=({childPath:e,schema:t,rowIndex:n,openDeleteDialog:o,moveUpCreator:s,moveDownCreator:a,enableUp:u,enableDown:c,showSortButtons:d,enabled:p,cells:y,path:g,translations:_})=>{const C={bg:"transparent",size:"sm",c:"gray"},E=b.useProps("ActionIcon",C,{}),T=x.useMemo(()=>s(g,n),[s,g,n]),P=x.useMemo(()=>a(g,n),[a,g,n]);return h.jsxs(b.Table.Tr,{children:[fm(QF,t,e,p,y),p?h.jsx(_i,{style:d?cm.fixedCell:cm.fixedCellSmall,children:h.jsxs(b.Grid,{justify:"flex-end",align:"center",children:[d?h.jsxs(x.Fragment,{children:[h.jsx(b.Grid.Col,{span:"content",children:h.jsx(b.Tooltip,{id:"tooltip-up",title:_.up,position:"bottom",opened:u?void 0:!1,children:h.jsx(b.ActionIcon,{bg:E.bg,size:E.size,c:E.c,"aria-label":_.upAriaLabel,onClick:T,disabled:!u,children:h.jsx(Nx,{})})})}),h.jsx(b.Grid.Col,{span:"content",children:h.jsx(b.Tooltip,{id:"tooltip-down",title:_.down,position:"bottom",opened:c?void 0:!1,children:h.jsx(b.ActionIcon,{bg:E.bg,size:E.size,c:E.c,"aria-label":_.downAriaLabel,onClick:P,disabled:!c,children:h.jsx(kx,{})})})})]}):null,h.jsx(b.Grid.Col,{span:"content",children:h.jsx(b.Tooltip,{id:"tooltip-remove",label:_.removeTooltip,children:h.jsx(b.ActionIcon,{bg:E.bg,size:E.size,c:E.c,"aria-label":_.removeAriaLabel,onClick:()=>o(e,n),children:h.jsx(Lx,{})})})})]})}):null]},e)},pm=x.memo(eD),tD=({data:e,path:t,schema:n,openDeleteDialog:o,moveUp:s,moveDown:a,uischema:u,config:c,enabled:d,cells:p,translations:y})=>{if(e===0)return h.jsx(JF,{numColumns:dm(n).length+1,translations:y});const _=hP({},c,u.options);return h.jsx(x.Fragment,{children:PP(e).map(C=>{const E=le.Paths.compose(t,`${C}`);return h.jsx(pm,{childPath:E,rowIndex:C,schema:n,openDeleteDialog:o,moveUpCreator:s,moveDownCreator:a,enableUp:C!==0,enableDown:C!==e-1,showSortButtons:_.showSortButtons||_.showArrayTableSortButtons,enabled:d,cells:p,path:t,translations:y},E)})})};class gm extends x.Component{constructor(){super(...arguments);lb(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:p,visible:y,enabled:g,cells:_,translations:C}=this.props,E=c,T=a.type==="object",P=T?fm(RF,a,s,g,_):void 0;return y?h.jsxs(b.Table,{children:[h.jsxs(b.Table.Thead,{children:[h.jsx(um,{errors:d,label:n,description:o,addItem:this.addItem,numColumns:T?P.length:1,path:s,uischema:E,schema:a,rootSchema:u,enabled:g,translations:C}),T&&h.jsxs(b.Table.Tr,{children:[P,g?h.jsx(b.Table.Th,{}):null]})]}),h.jsx(b.Table.Tbody,{children:h.jsx(tD,{openDeleteDialog:p,translations:C,...this.props})})]}):null}}const nD=e=>{const[t,n]=x.useState(!1),[o,s]=x.useState(void 0),[a,u]=x.useState(void 0),{removeItems:c,visible:d}=e,p=x.useCallback((C,E)=>{n(!0),s(C),u(E)},[n,s,u]),y=x.useCallback(()=>n(!1),[n]),g=x.useCallback(()=>{const C=o.substring(0,o.lastIndexOf("."));c(C,[a])(),n(!1)},[n,o,a]),_=x.useCallback(()=>n(!1),[n]);return d?h.jsxs(h.Fragment,{children:[h.jsx(gm,{...e,openDeleteDialog:p}),h.jsx(lp,{open:t,onCancel:y,onConfirm:g,onClose:_,acceptText:e.translations.deleteDialogAccept,declineText:e.translations.deleteDialogDecline,title:e.translations.deleteDialogTitle,message:e.translations.deleteDialogMessage})]}):null},mm=le.rankWith(1,le.or(le.isObjectArrayControl,le.isPrimitiveArrayControl)),ym=Fe.withJsonFormsArrayLayoutProps(nD),rD=e=>e.oneOf!==void 0&&e.oneOf.length>0&&e.oneOf.every(t=>t.const!==void 0),iD=e=>e.type==="string"&&e.enum!==void 0;function vm(e,t){if(!e.scope||e.type!=="Control")return!1;const n=le.resolveSchema(t,e.scope);return!!(ar(n.type,"array")&&!Array.isArray(n.items)&&n.uniqueItems===!0&&(rD(n.items)||iD(n.items)))}function bm(e,t){if(!e.scope||e.type!=="Control")return!1;const n=le.resolveSchema(t,e.scope);return!!(ar(n.type,"object")&&!n.properties)}const _m=le.rankWith(1,vm),Tm=Fe.withJsonFormsMultiEnumProps(e=>h.jsx(Vh,{...e})),wm=le.rankWith(1,le.isObjectControl),Sm=Fe.withJsonFormsDetailProps(e=>h.jsx(Hh,{...e})),Cm=le.rankWith(1,le.isBooleanControl),Em=Fe.withJsonFormsControlProps(e=>h.jsx(Xl,{...e})),xm=le.rankWith(1,le.isDateControl),Am=Fe.withJsonFormsControlProps(e=>h.jsx(Ql,{...e})),Om=le.rankWith(1,le.isDateTimeControl),Im=Fe.withJsonFormsControlProps(e=>h.jsx(eu,{...e})),Pm=le.rankWith(2,le.isEnumControl),$m=Fe.withJsonFormsEnumProps(Fe.withTranslateProps(e=>h.jsx(tu,{...e})),!1),Mm=le.rankWith(1,le.isIntegerControl),Fm=Fe.withJsonFormsControlProps(e=>h.jsx(no,{...e})),Dm=le.rankWith(2,bm),km=Fe.withJsonFormsControlProps(e=>h.jsx(Gh,{...e})),Nm=le.rankWith(1,le.isNumberControl),Lm=Fe.withJsonFormsControlProps(e=>h.jsx(no,{...e})),Bm=le.rankWith(2,le.isOneOfControl),zm=Fe.withJsonFormsOneOfEnumProps(Fe.withTranslateProps(e=>h.jsx(nu,{...e})),!1),Um=le.rankWith(1,le.isStringControl),Wm=Fe.withJsonFormsControlProps(e=>h.jsx(ru,{...e})),oD=e=>{const{text:t,visible:n}=e;return n?h.jsx(b.Title,{fw:"bold",size:"xl",children:t}):null},jm=le.rankWith(1,le.isLabelable),Vm=Fe.withJsonFormsLabelProps(oD),sD=({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 h.jsx(b.Fieldset,{legend:u,children:h.jsx(fs,{...d,renderers:s,cells:a})})},Gm=le.rankWith(1,le.uiTypeIs("Group")),Hm=Fe.withJsonFormsLayoutProps(sD),aD=({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 h.jsx(fs,{...c,renderers:t,cells:n})},qm=le.rankWith(1,le.uiTypeIs("HorizontalLayout")),Ym=Fe.withJsonFormsLayoutProps(aD),lD=({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 h.jsx(fs,{...c,renderers:s,cells:a})},Km=le.rankWith(1,le.uiTypeIs("VerticalLayout")),Jm=Fe.withJsonFormsLayoutProps(lD),Rm=[{tester:sp,cell:ap},{tester:np,cell:rp},{tester:ep,cell:tp},{tester:qh,cell:Yh},{tester:Kh,cell:Jh},{tester:Rh,cell:Zh},{tester:Xh,cell:Qh},{tester:ip,cell:op}],Zm=[{tester:xm,renderer:Am},{tester:Om,renderer:Im},{tester:Nm,renderer:Lm},{tester:Mm,renderer:Fm},{tester:Um,renderer:Wm},{tester:Cm,renderer:Em},{tester:Pm,renderer:$m},{tester:Bm,renderer:zm},{tester:Dm,renderer:km},{tester:mm,renderer:ym},{tester:_m,renderer:Tm},{tester:wm,renderer:Sm},{tester:qm,renderer:Ym},{tester:Km,renderer:Jm},{tester:Gm,renderer:Hm},{tester:jm,renderer:Vm}];function Nu({schema:e,uischema:t,state:n,setState:o,view:s,setView:a,jsonForms:u,onSubmit:c,buttonText:d,buttonLoading:p,...y}){const g=x.useMemo(()=>b.createTheme({components:{...Object.entries(u||{}).reduce((_,[C,E])=>(_[C]||(_[C]={defaultProps:{}}),_[C].defaultProps=E,_),{})}}),[u]);return h.jsx(b.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:h.jsxs(h.Fragment,{children:[y.title,h.jsx(b.Group,{children:h.jsxs(b.Group,{gap:"xs",pr:"xs",children:[h.jsx(b.CloseButton,{onClick:()=>a(s!==gt.OVERLAY?gt.OVERLAY:gt.NORMAL),title:s!==gt.OVERLAY?"Overlay":"Exit overlay",icon:h.jsx(zl,{icon:s!==gt.OVERLAY?"tabler:stack-forward":"tabler:stack",fontSize:"1.25rem"})}),h.jsx(b.CloseButton,{onClick:()=>a(s!==gt.FULL_SCREEN?gt.FULL_SCREEN:gt.NORMAL),title:s!==gt.FULL_SCREEN?"Full screen":"Exit full screen",icon:h.jsx(zl,{icon:s!==gt.FULL_SCREEN?"tabler:maximize":"tabler:minimize",fontSize:"1.25rem"})})]})})]}),classNames:{content:"mrt-table-container"},styles:xn(y.styles,{title:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between"}}),children:h.jsxs(b.Box,{component:"form",pos:"relative",onSubmit:c,children:[h.jsx(b.MantineThemeProvider,{inherit:!0,theme:g,children:e&&h.jsx(Fe.JsonForms,{schema:e,uischema:t??void 0,renderers:Zm,cells:Rm,data:n.data,onChange:o})}),h.jsx(b.Group,{justify:"end",mt:"xl",children:h.jsx(b.Button,{type:"submit",loading:p,children:d})})]})})}const Lu={styles:{content:{height:450}}},Bu={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 Xm(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(p=>({value:p.const,label:p.title})):a.enum;if(u){const p=u.map(y=>y.value);if(ar(s.type,"array")){const y=((c=e[o])==null?void 0:c.map(g=>g.id_||g))||[];n[o]=p.filter(g=>y.includes(g))}else n[o]=p.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 zu({jsonForms:e,...t}){const{info:n,refetch:o,refetchInfo:s,updateEntry:a}=Oe(),{opened:u,setOpened:c,item:d,state:p,setState:y,reset:g,view:_,setView:C}=zn("edit"),[E,T]=Le.useDebouncedState(!1,$r),{jsonForms:P}=b.useProps("EditDialog",{},{}),k=x.useMemo(()=>xn({__:{setNull:!0}},P,e),[P,e]),Q=x.useCallback(N=>{N==null||N.preventDefault(),T(!0),a(d==null?void 0:d.id,p.data).then(M=>{M&&(o(),s())}).catch(()=>{}).finally(()=>{T(!1),c(!1)})},[T,a,d==null?void 0:d.id,p.data,o,s,c]),U=x.useMemo(()=>({...Vo,data:Xm((d==null?void 0:d.result)||{},n.edit_schema)}),[n.edit_schema,d==null?void 0:d.result]);return x.useEffect(()=>{y({data:U.data})},[U,y]),h.jsx(Nu,{schema:n.edit_schema,uischema:n.edit_uischema,state:p,setState:y,view:_,setView:C,jsonForms:k,onSubmit:Q,buttonText:"Edit",buttonLoading:E,opened:u,onClose:()=>c(!1),onExitTransitionEnd:g,..._===gt.OVERLAY?Bu:{},..._===gt.NORMAL?Lu:{},...t,title:t.title??(n==null?void 0:n.edit_title)})}function Uu(){const{error:e,resetError:t}=Oe();return h.jsx(b.Modal,{opened:e,onClose:t,title:h.jsxs(b.Group,{children:[h.jsx(o1,{size:16,color:"red"}),h.jsx(b.Text,{children:e?e.message:"Error"})]}),centered:!0,children:e?h.jsx(b.Text,{children:e.originalError.detail||e.originalError.message}):null})}/*! @license DOMPurify 3.2.5 | (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.5/LICENSE */const{entries:Qm,setPrototypeOf:e0,isFrozen:uD,getPrototypeOf:cD,getOwnPropertyDescriptor:fD}=Object;let{freeze:Ft,seal:on,create:t0}=Object,{apply:Wu,construct:ju}=typeof Reflect<"u"&&Reflect;Ft||(Ft=function(t){return t}),on||(on=function(t){return t}),Wu||(Wu=function(t,n,o){return t.apply(n,o)}),ju||(ju=function(t,n){return new t(...n)});const Us=kt(Array.prototype.forEach),dD=kt(Array.prototype.lastIndexOf),n0=kt(Array.prototype.pop),fo=kt(Array.prototype.push),hD=kt(Array.prototype.splice),Ws=kt(String.prototype.toLowerCase),Vu=kt(String.prototype.toString),r0=kt(String.prototype.match),ho=kt(String.prototype.replace),pD=kt(String.prototype.indexOf),gD=kt(String.prototype.trim),_n=kt(Object.prototype.hasOwnProperty),Dt=kt(RegExp.prototype.test),po=mD(TypeError);function kt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),s=1;s<n;s++)o[s-1]=arguments[s];return Wu(e,t,o)}}function mD(e){return function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return ju(e,n)}}function Ie(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ws;e0&&e0(e,null);let o=t.length;for(;o--;){let s=t[o];if(typeof s=="string"){const a=n(s);a!==s&&(uD(t)||(t[o]=a),s=a)}e[s]=!0}return e}function yD(e){for(let t=0;t<e.length;t++)_n(e,t)||(e[t]=null);return e}function zr(e){const t=t0(null);for(const[n,o]of Qm(e))_n(e,n)&&(Array.isArray(o)?t[n]=yD(o):o&&typeof o=="object"&&o.constructor===Object?t[n]=zr(o):t[n]=o);return t}function go(e,t){for(;e!==null;){const o=fD(e,t);if(o){if(o.get)return kt(o.get);if(typeof o.value=="function")return kt(o.value)}e=cD(e)}function n(){return null}return n}const i0=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"]),Gu=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"]),Hu=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"]),vD=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"]),qu=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"]),bD=Ft(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),o0=Ft(["#text"]),s0=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"]),Yu=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"]),a0=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"]),_D=on(/\{\{[\w\W]*|[\w\W]*\}\}/gm),TD=on(/<%[\w\W]*|[\w\W]*%>/gm),wD=on(/\$\{[\w\W]*/gm),SD=on(/^data-[\-\w.\u00B7-\uFFFF]+$/),CD=on(/^aria-[\-\w]+$/),l0=on(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ED=on(/^(?:\w+script|data):/i),xD=on(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),u0=on(/^html$/i),AD=on(/^[a-z][.\w]*(-[.\w]+)+$/i);var c0=Object.freeze({__proto__:null,ARIA_ATTR:CD,ATTR_WHITESPACE:xD,CUSTOM_ELEMENT:AD,DATA_ATTR:SD,DOCTYPE_NAME:u0,ERB_EXPR:TD,IS_ALLOWED_URI:l0,IS_SCRIPT_OR_DATA:ED,MUSTACHE_EXPR:_D,TMPLIT_EXPR:wD});const mo={element:1,text:3,progressingInstruction:7,comment:8,document:9},OD=function(){return typeof window>"u"?null:window},ID=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}},f0=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function d0(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:OD();const t=de=>d0(de);if(t.version="3.2.5",t.removed=[],!e||!e.document||e.document.nodeType!==mo.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:p,NamedNodeMap:y=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:g,DOMParser:_,trustedTypes:C}=e,E=d.prototype,T=go(E,"cloneNode"),P=go(E,"remove"),k=go(E,"nextSibling"),Q=go(E,"childNodes"),U=go(E,"parentNode");if(typeof u=="function"){const de=n.createElement("template");de.content&&de.content.ownerDocument&&(n=de.content.ownerDocument)}let N,M="";const{implementation:B,createNodeIterator:Y,createDocumentFragment:fe,getElementsByTagName:ie}=n,{importNode:S}=o;let j=f0();t.isSupported=typeof Qm=="function"&&typeof U=="function"&&B&&B.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:te,ERB_EXPR:ce,TMPLIT_EXPR:me,DATA_ATTR:Be,ARIA_ATTR:_e,IS_SCRIPT_OR_DATA:De,ATTR_WHITESPACE:ke,CUSTOM_ELEMENT:mt}=c0;let{IS_ALLOWED_URI:K}=c0,J=null;const pe=Ie({},[...i0,...Gu,...Hu,...qu,...o0]);let X=null;const se=Ie({},[...s0,...Yu,...a0,...js]);let V=Object.seal(t0(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}})),q=null,re=null,he=!0,ge=!0,xe=!1,Ye=!0,ee=!1,yt=!0,Re=!1,Nt=!1,dr=!1,we=!1,Fn=!1,Si=!1,hr=!0,Wt=!1;const Ur="user-content-";let pr=!0,Wr=!1,sn={},gr=null;const mr=Ie({},["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 qn=null;const Ci=Ie({},["audio","video","img","source","image","track"]);let jr=null;const Ei=Ie({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),yr="http://www.w3.org/1998/Math/MathML",vr="http://www.w3.org/2000/svg",Jt="http://www.w3.org/1999/xhtml";let Dn=Jt,Vr=!1,Gr=null;const gc=Ie({},[yr,vr,Jt],Vu);let xi=Ie({},["mi","mo","mn","ms","mtext"]),Ai=Ie({},["annotation-xml"]);const Ys=Ie({},["title","style","font","a","script"]);let br=null;const mc=["application/xhtml+xml","text/html"],yc="text/html";let pt=null,_r=null;const Ks=n.createElement("form"),Js=function($){return $ instanceof RegExp||$ instanceof Function},_o=function(){let $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(_r&&_r===$)){if((!$||typeof $!="object")&&($={}),$=zr($),br=mc.indexOf($.PARSER_MEDIA_TYPE)===-1?yc:$.PARSER_MEDIA_TYPE,pt=br==="application/xhtml+xml"?Vu:Ws,J=_n($,"ALLOWED_TAGS")?Ie({},$.ALLOWED_TAGS,pt):pe,X=_n($,"ALLOWED_ATTR")?Ie({},$.ALLOWED_ATTR,pt):se,Gr=_n($,"ALLOWED_NAMESPACES")?Ie({},$.ALLOWED_NAMESPACES,Vu):gc,jr=_n($,"ADD_URI_SAFE_ATTR")?Ie(zr(Ei),$.ADD_URI_SAFE_ATTR,pt):Ei,qn=_n($,"ADD_DATA_URI_TAGS")?Ie(zr(Ci),$.ADD_DATA_URI_TAGS,pt):Ci,gr=_n($,"FORBID_CONTENTS")?Ie({},$.FORBID_CONTENTS,pt):mr,q=_n($,"FORBID_TAGS")?Ie({},$.FORBID_TAGS,pt):{},re=_n($,"FORBID_ATTR")?Ie({},$.FORBID_ATTR,pt):{},sn=_n($,"USE_PROFILES")?$.USE_PROFILES:!1,he=$.ALLOW_ARIA_ATTR!==!1,ge=$.ALLOW_DATA_ATTR!==!1,xe=$.ALLOW_UNKNOWN_PROTOCOLS||!1,Ye=$.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ee=$.SAFE_FOR_TEMPLATES||!1,yt=$.SAFE_FOR_XML!==!1,Re=$.WHOLE_DOCUMENT||!1,we=$.RETURN_DOM||!1,Fn=$.RETURN_DOM_FRAGMENT||!1,Si=$.RETURN_TRUSTED_TYPE||!1,dr=$.FORCE_BODY||!1,hr=$.SANITIZE_DOM!==!1,Wt=$.SANITIZE_NAMED_PROPS||!1,pr=$.KEEP_CONTENT!==!1,Wr=$.IN_PLACE||!1,K=$.ALLOWED_URI_REGEXP||l0,Dn=$.NAMESPACE||Jt,xi=$.MATHML_TEXT_INTEGRATION_POINTS||xi,Ai=$.HTML_INTEGRATION_POINTS||Ai,V=$.CUSTOM_ELEMENT_HANDLING||{},$.CUSTOM_ELEMENT_HANDLING&&Js($.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(V.tagNameCheck=$.CUSTOM_ELEMENT_HANDLING.tagNameCheck),$.CUSTOM_ELEMENT_HANDLING&&Js($.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(V.attributeNameCheck=$.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),$.CUSTOM_ELEMENT_HANDLING&&typeof $.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(V.allowCustomizedBuiltInElements=$.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ee&&(ge=!1),Fn&&(we=!0),sn&&(J=Ie({},o0),X=[],sn.html===!0&&(Ie(J,i0),Ie(X,s0)),sn.svg===!0&&(Ie(J,Gu),Ie(X,Yu),Ie(X,js)),sn.svgFilters===!0&&(Ie(J,Hu),Ie(X,Yu),Ie(X,js)),sn.mathMl===!0&&(Ie(J,qu),Ie(X,a0),Ie(X,js))),$.ADD_TAGS&&(J===pe&&(J=zr(J)),Ie(J,$.ADD_TAGS,pt)),$.ADD_ATTR&&(X===se&&(X=zr(X)),Ie(X,$.ADD_ATTR,pt)),$.ADD_URI_SAFE_ATTR&&Ie(jr,$.ADD_URI_SAFE_ATTR,pt),$.FORBID_CONTENTS&&(gr===mr&&(gr=zr(gr)),Ie(gr,$.FORBID_CONTENTS,pt)),pr&&(J["#text"]=!0),Re&&Ie(J,["html","head","body"]),J.table&&(Ie(J,["tbody"]),delete q.tbody),$.TRUSTED_TYPES_POLICY){if(typeof $.TRUSTED_TYPES_POLICY.createHTML!="function")throw po('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof $.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw po('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');N=$.TRUSTED_TYPES_POLICY,M=N.createHTML("")}else N===void 0&&(N=ID(C,s)),N!==null&&typeof M=="string"&&(M=N.createHTML(""));Ft&&Ft($),_r=$}},Rs=Ie({},[...Gu,...Hu,...vD]),Oi=Ie({},[...qu,...bD]),vc=function($){let Z=U($);(!Z||!Z.tagName)&&(Z={namespaceURI:Dn,tagName:"template"});const ae=Ws($.tagName),Ve=Ws(Z.tagName);return Gr[$.namespaceURI]?$.namespaceURI===vr?Z.namespaceURI===Jt?ae==="svg":Z.namespaceURI===yr?ae==="svg"&&(Ve==="annotation-xml"||xi[Ve]):!!Rs[ae]:$.namespaceURI===yr?Z.namespaceURI===Jt?ae==="math":Z.namespaceURI===vr?ae==="math"&&Ai[Ve]:!!Oi[ae]:$.namespaceURI===Jt?Z.namespaceURI===vr&&!Ai[Ve]||Z.namespaceURI===yr&&!xi[Ve]?!1:!Oi[ae]&&(Ys[ae]||!Rs[ae]):!!(br==="application/xhtml+xml"&&Gr[$.namespaceURI]):!1},jt=function($){fo(t.removed,{element:$});try{U($).removeChild($)}catch{P($)}},Ii=function($,Z){try{fo(t.removed,{attribute:Z.getAttributeNode($),from:Z})}catch{fo(t.removed,{attribute:null,from:Z})}if(Z.removeAttribute($),$==="is")if(we||Fn)try{jt(Z)}catch{}else try{Z.setAttribute($,"")}catch{}},Zs=function($){let Z=null,ae=null;if(dr)$="<remove></remove>"+$;else{const lt=r0($,/^[\r\n\t ]+/);ae=lt&&lt[0]}br==="application/xhtml+xml"&&Dn===Jt&&($='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+$+"</body></html>");const Ve=N?N.createHTML($):$;if(Dn===Jt)try{Z=new _().parseFromString(Ve,br)}catch{}if(!Z||!Z.documentElement){Z=B.createDocument(Dn,"template",null);try{Z.documentElement.innerHTML=Vr?M:Ve}catch{}}const wt=Z.body||Z.documentElement;return $&&ae&&wt.insertBefore(n.createTextNode(ae),wt.childNodes[0]||null),Dn===Jt?ie.call(Z,Re?"html":"body")[0]:Re?Z.documentElement:wt},Xs=function($){return Y.call($.ownerDocument||$,$,p.SHOW_ELEMENT|p.SHOW_COMMENT|p.SHOW_TEXT|p.SHOW_PROCESSING_INSTRUCTION|p.SHOW_CDATA_SECTION,null)},To=function($){return $ instanceof g&&(typeof $.nodeName!="string"||typeof $.textContent!="string"||typeof $.removeChild!="function"||!($.attributes instanceof y)||typeof $.removeAttribute!="function"||typeof $.setAttribute!="function"||typeof $.namespaceURI!="string"||typeof $.insertBefore!="function"||typeof $.hasChildNodes!="function")},Qs=function($){return typeof c=="function"&&$ instanceof c};function Tn(de,$,Z){Us(de,ae=>{ae.call(t,$,Z,_r)})}const ea=function($){let Z=null;if(Tn(j.beforeSanitizeElements,$,null),To($))return jt($),!0;const ae=pt($.nodeName);if(Tn(j.uponSanitizeElement,$,{tagName:ae,allowedTags:J}),$.hasChildNodes()&&!Qs($.firstElementChild)&&Dt(/<[/\w!]/g,$.innerHTML)&&Dt(/<[/\w!]/g,$.textContent)||$.nodeType===mo.progressingInstruction||yt&&$.nodeType===mo.comment&&Dt(/<[/\w]/g,$.data))return jt($),!0;if(!J[ae]||q[ae]){if(!q[ae]&&wo(ae)&&(V.tagNameCheck instanceof RegExp&&Dt(V.tagNameCheck,ae)||V.tagNameCheck instanceof Function&&V.tagNameCheck(ae)))return!1;if(pr&&!gr[ae]){const Ve=U($)||$.parentNode,wt=Q($)||$.childNodes;if(wt&&Ve){const lt=wt.length;for(let It=lt-1;It>=0;--It){const an=T(wt[It],!0);an.__removalCount=($.__removalCount||0)+1,Ve.insertBefore(an,k($))}}}return jt($),!0}return $ instanceof d&&!vc($)||(ae==="noscript"||ae==="noembed"||ae==="noframes")&&Dt(/<\/no(script|embed|frames)/i,$.innerHTML)?(jt($),!0):(ee&&$.nodeType===mo.text&&(Z=$.textContent,Us([te,ce,me],Ve=>{Z=ho(Z,Ve," ")}),$.textContent!==Z&&(fo(t.removed,{element:$.cloneNode()}),$.textContent=Z)),Tn(j.afterSanitizeElements,$,null),!1)},ta=function($,Z,ae){if(hr&&(Z==="id"||Z==="name")&&(ae in n||ae in Ks))return!1;if(!(ge&&!re[Z]&&Dt(Be,Z))){if(!(he&&Dt(_e,Z))){if(!X[Z]||re[Z]){if(!(wo($)&&(V.tagNameCheck instanceof RegExp&&Dt(V.tagNameCheck,$)||V.tagNameCheck instanceof Function&&V.tagNameCheck($))&&(V.attributeNameCheck instanceof RegExp&&Dt(V.attributeNameCheck,Z)||V.attributeNameCheck instanceof Function&&V.attributeNameCheck(Z))||Z==="is"&&V.allowCustomizedBuiltInElements&&(V.tagNameCheck instanceof RegExp&&Dt(V.tagNameCheck,ae)||V.tagNameCheck instanceof Function&&V.tagNameCheck(ae))))return!1}else if(!jr[Z]){if(!Dt(K,ho(ae,ke,""))){if(!((Z==="src"||Z==="xlink:href"||Z==="href")&&$!=="script"&&pD(ae,"data:")===0&&qn[$])){if(!(xe&&!Dt(De,ho(ae,ke,"")))){if(ae)return!1}}}}}}return!0},wo=function($){return $!=="annotation-xml"&&r0($,mt)},na=function($){Tn(j.beforeSanitizeAttributes,$,null);const{attributes:Z}=$;if(!Z||To($))return;const ae={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:X,forceKeepAttr:void 0};let Ve=Z.length;for(;Ve--;){const wt=Z[Ve],{name:lt,namespaceURI:It,value:an}=wt,Hr=pt(lt);let St=lt==="value"?an:gD(an);if(ae.attrName=Hr,ae.attrValue=St,ae.keepAttr=!0,ae.forceKeepAttr=void 0,Tn(j.uponSanitizeAttribute,$,ae),St=ae.attrValue,Wt&&(Hr==="id"||Hr==="name")&&(Ii(lt,$),St=Ur+St),yt&&Dt(/((--!?|])>)|<\/(style|title)/i,St)){Ii(lt,$);continue}if(ae.forceKeepAttr||(Ii(lt,$),!ae.keepAttr))continue;if(!Ye&&Dt(/\/>/i,St)){Ii(lt,$);continue}ee&&Us([te,ce,me],Co=>{St=ho(St,Co," ")});const So=pt($.nodeName);if(ta(So,Hr,St)){if(N&&typeof C=="object"&&typeof C.getAttributeType=="function"&&!It)switch(C.getAttributeType(So,Hr)){case"TrustedHTML":{St=N.createHTML(St);break}case"TrustedScriptURL":{St=N.createScriptURL(St);break}}try{It?$.setAttributeNS(It,lt,St):$.setAttribute(lt,St),To($)?jt($):n0(t.removed)}catch{}}}Tn(j.afterSanitizeAttributes,$,null)},bc=function de($){let Z=null;const ae=Xs($);for(Tn(j.beforeSanitizeShadowDOM,$,null);Z=ae.nextNode();)Tn(j.uponSanitizeShadowNode,Z,null),ea(Z),na(Z),Z.content instanceof a&&de(Z.content);Tn(j.afterSanitizeShadowDOM,$,null)};return t.sanitize=function(de){let $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Z=null,ae=null,Ve=null,wt=null;if(Vr=!de,Vr&&(de="<!-->"),typeof de!="string"&&!Qs(de))if(typeof de.toString=="function"){if(de=de.toString(),typeof de!="string")throw po("dirty is not a string, aborting")}else throw po("toString is not a function");if(!t.isSupported)return de;if(Nt||_o($),t.removed=[],typeof de=="string"&&(Wr=!1),Wr){if(de.nodeName){const an=pt(de.nodeName);if(!J[an]||q[an])throw po("root node is forbidden and cannot be sanitized in-place")}}else if(de instanceof c)Z=Zs("<!---->"),ae=Z.ownerDocument.importNode(de,!0),ae.nodeType===mo.element&&ae.nodeName==="BODY"||ae.nodeName==="HTML"?Z=ae:Z.appendChild(ae);else{if(!we&&!ee&&!Re&&de.indexOf("<")===-1)return N&&Si?N.createHTML(de):de;if(Z=Zs(de),!Z)return we?null:Si?M:""}Z&&dr&&jt(Z.firstChild);const lt=Xs(Wr?de:Z);for(;Ve=lt.nextNode();)ea(Ve),na(Ve),Ve.content instanceof a&&bc(Ve.content);if(Wr)return de;if(we){if(Fn)for(wt=fe.call(Z.ownerDocument);Z.firstChild;)wt.appendChild(Z.firstChild);else wt=Z;return(X.shadowroot||X.shadowrootmode)&&(wt=S.call(o,wt,!0)),wt}let It=Re?Z.outerHTML:Z.innerHTML;return Re&&J["!doctype"]&&Z.ownerDocument&&Z.ownerDocument.doctype&&Z.ownerDocument.doctype.name&&Dt(u0,Z.ownerDocument.doctype.name)&&(It="<!DOCTYPE "+Z.ownerDocument.doctype.name+`>
231
- `+It),ee&&Us([te,ce,me],an=>{It=ho(It,an," ")}),N&&Si?N.createHTML(It):It},t.setConfig=function(){let de=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};_o(de),Nt=!0},t.clearConfig=function(){_r=null,Nt=!1},t.isValidAttribute=function(de,$,Z){_r||_o({});const ae=pt(de),Ve=pt($);return ta(ae,Ve,Z)},t.addHook=function(de,$){typeof $=="function"&&fo(j[de],$)},t.removeHook=function(de,$){if($!==void 0){const Z=dD(j[de],$);return Z===-1?void 0:hD(j[de],Z,1)[0]}return n0(j[de])},t.removeHooks=function(de){j[de]=[]},t.removeAllHooks=function(){j=f0()},t}var h0=d0();const Mn=x.forwardRef(({fallback:e,functionProps:t,children:n},o)=>{if(n=ct(n,t),n===null)return null;const s=n||e;return x.isValidElement(s)?x.cloneElement(s,{ref:o}):s});Mn.displayName="FallbackWrapper";const PD={field:"_field_zdaf7_1",rtl:"_rtl_zdaf7_7",borderRight:"_borderRight_zdaf7_12"},yo=x.memo(({id:e,entry:t,loading:n,rightBorder:o,children:s,onClickEntry:a,customElement:u,sanitize:c,...d})=>{const p={text:{style:{whiteSpace:"nowrap",overflow:"ellipsis"}}},{text:y}=b.useProps("Field",p,d),g={};Object.entries(y).forEach(([C,E])=>{typeof E=="function"&&(g[C]=E(t))});const _=b.useStyles({name:"Field",props:d,classes:PD});return h.jsx(b.Table.Td,{..._("field"),onClick:a?()=>a(e,t):null,...d,children:h.jsx(b.Box,{w:"100%",children:h.jsx(b.Skeleton,{visible:n,children:h.jsx(Mn,{fallback:Array.isArray(s)?s.map((C,E)=>h.jsx(b.Text,{...y,...g,children:c?h0.sanitize(C):C},E)):x.isValidElement(s)?s:h.jsx(b.Text,{...y,...g,children:c?h0.sanitize(s):s}),functionProps:t,children:u})})})})});yo.displayName="Field";const p0={row:"_row_138r2_1",selected:"_selected_138r2_5"};function g0({entry:e,selected:t,children:n}){const o=b.useStyles({name:"Row",classes:p0}),s=b.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?p0.selected:""}`,h.jsx(b.Table.Tr,{className:a,style:{...u},...s,children:n})}function $D({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||h.jsx(Gs,{id:n})}function m0({data:e,loading:t,hideActions:n,hideCheckbox:o,selection:s,toggleRow:a,onClickEntry:u,bodyCustomizer:c,bodySeparator:d}){const p=e.list_columns.includes("actions")?"_actions":"actions",y=x.useMemo(()=>e!=null&&e.list_columns.includes("all")?"_all":"all",[e==null?void 0:e.list_columns]);return h.jsx(b.Table.Tbody,{children:e.result.length?e.result.map((g,_)=>{const C=e.ids[_];return h.jsxs(g0,{entry:{...g,id:C},children:[o?null:h.jsx(yo,{loading:t,children:h.jsx(b.Checkbox,{pl:2,checked:s.includes(C),onChange:()=>{a(C)}})},_),n?null:h.jsx(yo,{loading:t,children:h.jsx($D,{bodyCustomizer:c,actionColumn:p,id:Et(C),entry:g})}),e.list_columns.map((E,T)=>{let P=c==null?void 0:c[E];typeof P=="function"&&(P=P({id:C,...g}));let k=Hi(g,E);typeof k=="number"?k=k.toLocaleString():k==null&&(k="");const Q=(d==null?void 0:d[E])||(d==null?void 0:d[y]);return Q&&(k=k.split(Q)),P===null?null:h.jsx(yo,{id:C,entry:g,loading:t,onClickEntry:u,customElement:P,sanitize:!0,children:k},T)})]},Et(C))}):h.jsx("tr",{children:h.jsx("td",{style:{padding:"8px"},colSpan:n?e.list_columns.length:e.list_columns.length+1,children:h.jsx(b.Text,{style:{fontStyle:"italic"},size:"sm",c:"dimmed",children:"No data available"})})})})}const y0={root:"_root_1kmay_1",wrapper:"_wrapper_1kmay_7",icon:"_icon_1kmay_18"};function Vs({column:e,label:t,orderColumn:n,related:o,toggleAll:s,allChecked:a,classNames:u,styles:c,customElement:d,...p}){const{queryParams:y,setQueryParams:g,loading:_}=Oe(),C={fw:700,size:"sm",color:"gray.8",hoverColor:"gray.6",selectedColor:"blue"},E=b.useStyles({name:"FieldTitle",classes:y0,classNames:u,styles:c,props:p}),T=b.useProps("FieldTitle",C,p),{hovered:P,ref:k}=Le.useHover(),Q=n&&y.order_column===n,U=E("wrapper");return U.style.cursor=n?U.style.cursor:"auto",h.jsx(b.Table.Th,{className:y0.fieldTitleRoot,...E("root"),onClick:n&&!_?()=>g({order_column:n,order_direction:y.order_direction==="asc"?"desc":"asc"}):null,children:h.jsx(b.Box,{ref:k,...U,children:e==="Checkbox"?h.jsx(b.Checkbox,{pb:5,pl:2,onChange:s,checked:a}):h.jsxs(h.Fragment,{children:[h.jsx(b.Box,{w:"100%",fw:T.fw,size:"xl",c:P&&n?T.hoverColor:Q?T.selectedColor:T.color,children:d||t||e}),o?h.jsx(b.Tooltip,{label:"Related Field",children:h.jsx(b.Indicator,{label:"rel",style:{indicator:{top:"-1px !important",right:"-2px !important",padding:"4px"}},children:h.jsx(b.Box,{...E("icon"),children:Q?y.order_direction==="asc"?h.jsx(El,{size:14,strokeWidth:1.5}):h.jsx(Md,{size:14,strokeWidth:1.5}):null})})}):h.jsx(b.Box,{...E("icon"),children:Q?y.order_direction==="asc"?h.jsx(El,{size:14,strokeWidth:1.5}):h.jsx(Md,{size:14,strokeWidth:1.5}):null})]})})})}const Ku=x.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 p=c==null?void 0:c[d];return typeof p=="function"&&(p=p()),h.jsx(b.Table.Thead,{children:h.jsxs(b.Table.Tr,{children:[s?null:h.jsx(Vs,{data:e,column:"Checkbox",allChecked:a,toggleAll:u}),o?null:h.jsx(Vs,{column:"Actions",customElement:p}),e.list_columns.map((y,g)=>{var C;let _=c==null?void 0:c[y];return typeof _=="function"&&(_=_(e.label_columns[y])),_===null?null:h.jsx(Vs,{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:_},y)})]})})});Ku.displayName="Header";const MD={scrollbar:"_scrollbar_isyo2_1"};function v0({bulkActions:e,hideActions:t,loading:n,onSelectCheckbox:o,onClickEntry:s,hideCheckbox:a,hideDownload:u,headerCustomizer:c,bodyCustomizer:d,bodySeparator:p,...y}){const g=b.useMantineTheme(),_=b.Table.extend({highlightOnHover:!0,striped:!0,horizontalSpacing:"md",verticalSpacing:"sm"}),C=b.useProps("DatagridTable",_,y),{data:E,info:T}=Oe(),[P,k]=x.useState([]),[Q,U]=x.useState(!1),N=B=>{k(Y=>Y.includes(B)?Y.filter(fe=>fe!==B):[...Y,B])},M=()=>{k(B=>B.length===E.ids.length?[]:E.ids.map((Y,fe)=>Y))};return x.useEffect(()=>{U(P.length===E.result.length&&P.length>0),o&&o(P),e==null||e.setSelectedIds(P.map(B=>B))},[P]),x.useEffect(()=>{k([]),o&&o([])},[E]),h.jsx(b.ScrollArea,{options:{className:g.colorScheme==="dark"?"os-theme-light":void 0},style:{flex:1,flexDirection:"column"},classNames:MD,children:h.jsxs(b.Table,{stickyHeader:!0,...C,children:[h.jsx(Ku,{data:E,info:T,hideActions:t,hideCheckbox:a,allChecked:Q,setSelection:k,toggleAll:M,headerCustomizer:c}),h.jsx(m0,{data:E,loading:n,hideActions:t,hideCheckbox:a,selection:P,setSelection:k,toggleRow:N,onClickEntry:s,bodyCustomizer:d,bodySeparator:p})]})})}const Ju=x.memo(({counter:e,...t})=>{const{data:n,queryParams:o,setQueryParams:s}=Oe(),a=b.useMantineTheme(),u=[{value:"10",label:"10"},{value:"25",label:"25"},{value:"50",label:"50"}],c=String(o.page_size),[d,p]=x.useState(o.page);x.useEffect(()=>{p(o.page)},[o.page]);const y=_=>{p(_-1),s({page:_-1})},g=_=>{s({page_size:parseInt(_,10),page:0})};return h.jsxs(h.Fragment,{children:[h.jsx(b.Divider,{}),h.jsxs(b.Box,{style:{display:"flex",justifyContent:"space-between",alignItems:"center",height:54,border:"none",borderTopWidth:"1px",padding:"var(--mantine-spacing-md)"},children:[h.jsxs(b.Box,{style:{display:"flex",alignItems:"center",gap:"var(--mantine-spacing-sm)"},children:[h.jsx(b.Text,{children:"Rows per page:"}),h.jsx(b.Select,{value:c,defaultValue:c,onChange:_=>g(_),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"}}}})})]}),h.jsx(b.Pagination,{size:"sm",total:Math.ceil(n.count/c),value:d+1,onChange:y,...t}),e&&n?h.jsxs(h.Fragment,{children:[h.jsx(b.Text,{c:a.primaryColor,size:"xs",fw:400,pl:20,children:"Total Records"}),h.jsx(b.Text,{c:a.primaryColor,size:"md",fw:700,pl:10,children:n.count})]}):null]})]})});Ju.displayName="Pagination";function FD(e){return t=>{try{return e.validateSync(t,{abortEarly:!1}),{}}catch(n){const o={};return n instanceof Tt&&n.inner.forEach(s=>{o[s.path.replaceAll("[",".").replaceAll("]","")]=s.message}),o}}}function DD({form:e,name:t,items:n,...o}){return h.jsx(b.Autocomplete,{data:n,...e.getInputProps(t),value:String(e.getInputProps(t).value)||"",...o})}function b0({form:e,name:t,...n}){return h.jsx(h.Fragment,{children:h.jsx(Gi.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 _0({form:e,name:t,...n}){return h.jsx(h.Fragment,{children:h.jsx(Gi.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 vo({form:e,name:t,...n}){const o=e.getInputProps(t).value,s=x.useMemo(()=>o&&typeof o=="object"?JSON.stringify(o):o||"",[o]);return t==="password"?h.jsx(b.PasswordInput,{...e.getInputProps(t),value:s,...n}):h.jsx(b.TextInput,{...e.getInputProps(t),value:s,...n})}function Ru({form:e,name:t,filter:n,...o}){const[s,a]=x.useState(""),u=e.getInputProps(t).value,c=x.useMemo(()=>u?typeof u=="object"?JSON.stringify(u,null,2):u:"",[u]);return x.useEffect(()=>{a(c)},[c]),n?h.jsx(vo,{form:e,name:t,...o}):h.jsx(b.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 p=JSON.parse(d);e.getInputProps(t).onChange(p)}catch{}}})}function T0({form:e,name:t,filter:n,...o}){const[s,a]=x.useState(!!n);return h.jsxs(b.InputWrapper,{label:o.label,description:o.description,children:[!n&&h.jsxs(b.Group,{align:"center",gap:"xs",py:"0.25rem",children:[h.jsx(b.Checkbox,{checked:s,onChange:u=>a(u.currentTarget.checked)}),h.jsx(b.Text,{size:"xs",children:"WKT"})]}),s?h.jsx(vo,{form:e,name:t,...o,label:void 0,description:void 0}):h.jsx(Ru,{form:e,name:t,...o,label:void 0,description:void 0})]})}function w0({form:e,name:t,items:n,...o}){const s=n.map(u=>({value:String(Et(u.id)),label:u.value})),a=Array.isArray(e.getInputProps(t).value)?e.getInputProps(t).value.map(u=>String(typeof u=="object"?Et(u.id):u)):[];return h.jsx(b.MultiSelect,{data:s,searchable:!0,...e.getInputProps(t),value:a||[],...o})}function S0({form:e,name:t,items:n,filter:o,...s}){var u;const a=n.map(c=>({value:String(Et(c.id)),label:c.value}));return h.jsx(b.Select,{data:a,searchable:!0,...e.getInputProps(t),onChange:c=>{if(o){e.setFieldValue(t,c);return}const d=n.find(p=>String(Et(p.id))===c)||null;e.setFieldValue(t,d)},value:o?e.getInputProps(t).value:String(Et((u=e.getInputProps(t).value)==null?void 0:u.id))||"",...s})}function Zu({form:e,name:t,items:n,...o}){return h.jsx(b.Select,{data:n,searchable:!0,...e.getInputProps(t),value:String(e.getInputProps(t).value)||"",...o})}function Xu({form:e,name:t,schema:n,filter:o,withinPortal:s=!0,...a}){if(!n.type)return null;switch(n.type){case"Boolean":return h.jsx(Zu,{form:e,name:t,items:[{label:"true",value:o?"1":"true"},{label:"false",value:o?"0":"false"}],...a});case"RelatedList":return h.jsx(w0,{form:e,name:t,items:n.values,comboboxProps:{withinPortal:s},...a});case"Related":return h.jsx(S0,{form:e,name:t,items:n.values,filter:o,comboboxProps:{withinPortal:s},...a});case"DateTime":return h.jsx(_0,{form:e,name:t,valueFormat:"DD.MM.YYYY HH:mm:ss",schema:n,popoverProps:{withinPortal:s},...a});case"Date":return h.jsx(b0,{form:e,name:t,valueFormat:"DD.MM.YYYY",schema:n,popoverProps:{withinPortal:s},...a});case"Geometry":return h.jsx(T0,{form:e,name:t,filter:o,...a});case"Raw":return h.jsx(Ru,{form:e,name:t,filter:o,...a});case"Integer":case"Float":return h.jsx(vo,{form:e,name:t,...a});case"Enum":return h.jsx(Zu,{form:e,name:t,items:n.values,comboboxProps:{withinPortal:s},...a});default:return h.jsx(vo,{form:e,name:t,...a})}}function kD({form:e,name:t,items:n,onChange:o,...s}){return h.jsx(b.Select,{data:n,searchable:!0,...e.getInputProps(t),onChange:o,...s})}function Qu({form:e,name:t,label:n,comboboxProps:o,...s}){const a=b.useCombobox({onDropdownClose:()=>a.resetSelectedOption(),onDropdownOpen:()=>a.updateSelectedOptionIndex("active")}),[u,c]=x.useState([]),[d,p]=x.useState(""),y=C=>{d!==""&&(u.includes(d)||c(E=>[...E,d]),p(""))},g=C=>c(E=>E.filter(T=>T!==C)),_=u.map(C=>h.jsx(b.Pill,{withRemoveButton:!0,onRemove:()=>g(C),children:C},C));return x.useEffect(()=>{const C=e.getInputProps(t).value;if(C)try{c([...C])}catch(E){console.error("Error parsing JSON:",E)}},[]),x.useEffect(()=>{e.getInputProps(t).onChange(u)},[u]),h.jsx(b.InputWrapper,{label:n,children:h.jsxs(b.Combobox,{store:a,onOptionSubmit:y,...o,children:[h.jsx(b.Combobox.DropdownTarget,{children:h.jsx(b.PillsInput,{onClick:()=>a.openDropdown(),children:h.jsxs(b.Pill.Group,{children:[_,h.jsx(b.Combobox.EventsTarget,{children:h.jsx(b.PillsInput.Field,{onFocus:()=>a.openDropdown(),onBlur:()=>a.closeDropdown(),value:d,placeholder:"Search values",onChange:C=>{a.updateSelectedOptionIndex(),p(C.currentTarget.value)},onKeyDown:C=>{C.key==="Backspace"&&d.length===0&&(C.preventDefault(),g(u[u.length-1]))}})})]})})}),h.jsx(b.Combobox.Dropdown,{children:h.jsx(b.Combobox.Options,{children:h.jsxs(b.Combobox.Option,{value:"$create",children:["+ Create ",d]})})})]})})}function ND({form:e,name:t,items:n,onChange:o,...s}){return h.jsx(b.Select,{data:n,searchable:!0,...e.getInputProps(t),onChange:o,...s})}function C0({onClose:e,...t}){const{info:n,queryParams:o,setQueryParams:s,path:a}=Oe(),u=Va.useForm({initialValues:{filters:[]},validate:FD(Ki({filters:_l().of(Ki({col:Xo().transform(g=>g||void 0).required("Field is required"),opr:Xo().transform(g=>g||void 0).required("col is required"),value:Zo().when("col",{is:g=>g&&n.filters[g].schema.required,then:()=>Zo().required("Value is required")})}))}))}),c={bg:"transparent",size:"sm",c:"gray"},d=b.useProps("ActionIcon",c,t);x.useEffect(()=>{u.setValues({filters:[]}),u.reset()},[a]),x.useEffect(()=>{if(o.filters&&o.filters.length){const g=o.filters.filter(_=>!_.id).map(_=>({..._,key:Le.randomId()}));u.setFieldValue("filters",g)}},[o.filters]);const p=g=>{const _=g.filters.map(({key:E,...T})=>T),C=JSON.parse(JSON.stringify(_));s({filters:C,page:0}),e()},y=u.values.filters.map((g,_)=>h.jsxs(b.Box,{px:"sm",children:[h.jsxs(b.Flex,{my:"md",gap:"md",style:{whiteSpace:"nowrap"},children:[h.jsx(b.Box,{style:{width:"192px"},children:n&&n.filters&&h.jsx(kD,{form:u,name:`filters.${_}.col`,items:Object.entries(n.filters).map(([C,E])=>({label:E.label,value:String(C)})),onChange:C=>{u.setFieldValue(`filters.${_}`,{col:C,opr:"",value:"",key:Le.randomId()})}})}),h.jsx(b.Box,{style:{width:"192px"},children:g.col?h.jsx(ND,{form:u,name:`filters.${_}.opr`,items:n.filters[g.col].filters.filter(C=>!C.id).map(C=>({label:C.name,value:C.operator})),onChange:C=>{u.setFieldValue(`filters.${_}`,{col:u.values.filters[_].col,opr:C,value:"",key:Le.randomId()})}}):null}),h.jsx(b.Box,{style:{width:"192px"},children:g.col?g.opr==="in"?h.jsx(Qu,{form:u,name:`filters.${_}.value`}):h.jsx(Xu,{form:u,name:`filters.${_}.value`,schema:n.filters[g.col].schema,filter:!0}):null}),h.jsx(b.ActionIcon,{bg:d.bg,size:d.size,c:d.c,onClick:()=>{u.removeListItem("filters",_)},children:h.jsx(Ld,{})})]}),u.values.filters.length>1&&_<u.values.filters.length-1?h.jsx(b.Divider,{my:"md",labelPosition:"center",label:"AND"}):null]},g.key));return h.jsxs(b.Box,{component:"form",onSubmit:u.onSubmit(p),children:[y.length===0&&h.jsx(b.Box,{style:{width:"642px"},children:h.jsx(b.Text,{style:{fontStyle:"italic",padding:"7px"},size:"sm",c:"dimmed",children:"No filters selected..."})}),h.jsx(b.ScrollArea.Autosize,{mah:"40vh",mt:20,children:y}),h.jsx(b.Divider,{my:"sm"}),h.jsxs(b.Box,{style:{display:"flex",justifyContent:"space-between"},children:[h.jsx(b.Button,{variant:"subtle",leftSection:h.jsx(xl,{}),onClick:()=>{u.insertListItem("filters",{col:"",opr:"",value:"",key:Le.randomId()})},children:"Add Filter"}),h.jsx(b.Group,{spacing:"md",children:h.jsx(b.Button,{type:"submit",children:"Apply"})})]})]})}function E0(...e){const{queryParams:t}=Oe(),n={bg:"transparent",size:"sm",c:"gray"},o=b.useProps("ActionIcon",n,e),[s,a]=x.useState(!1);return h.jsxs(b.Popover,{opened:s,position:"bottom-end",onClose:()=>a(!1),closeOnClickOutside:!1,children:[h.jsx(b.Popover.Target,{children:h.jsx(b.Tooltip,{opened:s?!1:null,label:"Filter",children:(t==null?void 0:t.filters.filter(u=>!u.id).length)!=0?h.jsx(b.Indicator,{zIndex:20,size:16,label:t==null?void 0:t.filters.length,children:h.jsx(b.ActionIcon,{bg:o.bg,size:o.size,c:o.c,onClick:()=>a(!0),children:h.jsx(Fd,{})})}):h.jsx(b.ActionIcon,{bg:o.bg,size:o.size,c:o.c,onClick:()=>a(!0),children:h.jsx(Fd,{})})})}),h.jsxs(b.Popover.Dropdown,{px:"xs",children:[h.jsx(b.Box,{style:{position:"absolute",top:4,right:4},children:h.jsx(b.CloseButton,{title:"Filters",onClick:()=>a(!1)})}),h.jsx(C0,{onClose:()=>{a(!1)}})]})]})}const ec=x.memo(({hideAdd:e,hideFilter:t,hideDownload:n,toolbarCustomizer:o})=>{const{info:s}=Oe(),a=x.useMemo(()=>{const c={};return Object.entries(o).forEach(([d,p])=>{c[d]=p,typeof c[d]=="function"&&(c[d]=c[d]())}),c},[o]),u=s.permissions.includes("can_post");return h.jsxs(b.Flex,{justify:"flex-end",p:"md",gap:"sm",children:[!n&&(a.download||h.jsx(qs,{size:"sm"})),u&&!e?a.add||h.jsx(Hs,{size:"sm"}):null,t?null:a.filter||h.jsx(E0,{})]})});ec.displayName="Toolbar";function tc({children:e,cond:t}){return zd(t)?e:null}const nc=x.forwardRef((e,t)=>{const{path:n,data:o,loading:s,info:a,setQueryParams:u}=Oe(),{hideToolbar:c=!1,hideFilter:d=!1,hideAdd:p=!1,hideSettings:y=!1,hideActions:g=!1,hidePagination:_=!1,hideError:C=!1,hideDownload:E=!0,onSelectCheckbox:T=null,onClickEntry:P=null,fetchOnMount:k=!0,bulkActions:Q=null,styles:U,headerCustomizer:N={},bodyCustomizer:M={},toolbarCustomizer:B={},counter:Y=!1,bodySeparator:fe,form:ie}=e;x.useEffect(()=>{!o&&k&&u({})},[o]);const{setView:S}=zn("add"),{setView:j}=zn("edit");if(x.useEffect(()=>{var ce,me;(ce=ie==null?void 0:ie.add)!=null&&ce.initialView&&S(ie.add.initialView),(me=ie==null?void 0:ie.edit)!=null&&me.initialView&&j(ie.edit.initialView)},[]),!a)return;const te=Q===null;return h.jsxs(b.Paper,{ref:t,h:"100%",display:"flex",pos:"relative",style:{flexDirection:"column",...U},children:[h.jsxs(tc,{cond:!!a,children:[h.jsx(ic,{jsonForms:ie==null?void 0:ie.add}),h.jsx(zu,{jsonForms:ie==null?void 0:ie.edit})]}),c?null:h.jsx(ec,{hideFilter:d,hideAdd:p,hideSettings:y,hideDownload:E,toolbarCustomizer:B}),o?h.jsx(v0,{bulkActions:Q,hideActions:g,loading:s,onSelectCheckbox:T,onClickEntry:P,hideCheckbox:te,hideDownload:E,headerCustomizer:N,bodyCustomizer:M,bodySeparator:fe}):null,!_&&o?h.jsx(Ju,{counter:Y}):null,C?null:h.jsx(Uu,{})]})});nc.displayName="DataGrid";function LD({relatedPath:e,...t}){const{path:n}=Oe();return ot(n?n.substring(0,n.lastIndexOf("/")):"",e.substring(0,e.lastIndexOf("/"))),h.jsx($d,{resource_name:e.replace("/",""),relation:t,children:h.jsx(nc,{hideToolbar:!0,hideDownload:!1})})}const BD=x.memo(LD);function x0({item:e,info:t,opened:n,onClose:o,...s}){const a={modal:{},tabs:{},tabsList:{},tabsPanel:{}},{modal:u,tabs:c,tabsList:d,tabsPanel:p}=b.useProps("ViewDialog",a,s);return h.jsx(b.Modal,{opened:n,onClose:o,title:`${e==null?void 0:e.show_title} (#${Et(e==null?void 0:e.id)})`,size:"lg",centered:!0,zIndex:1e3,...u,children:e&&h.jsxs(b.Tabs,{defaultValue:"details",...c,children:[h.jsxs(b.Tabs.List,{...d,children:[h.jsx(b.Tabs.Tab,{value:"details",children:"Details"}),t.relations.map((y,g)=>h.jsx(b.Tabs.Tab,{value:y.name,children:y.name},g))]}),h.jsx(b.Tabs.Panel,{pt:"xs",value:"details",...p,children:h.jsx(b.Paper,{p:"xs",withBorder:!0,children:h.jsx(b.Stack,{spacing:"md",children:h.jsx(b.ScrollArea,{h:450,type:"auto",children:e.show_columns.map((y,g)=>h.jsxs(b.Grid,{maw:500,children:[h.jsx(b.Grid.Col,{span:4,children:h.jsx(b.Text,{size:"md",children:e.label_columns[y]})}),h.jsx(b.Grid.Col,{span:1,children:h.jsx(b.Text,{size:"xs",children:":"})}),h.jsx(b.Grid.Col,{span:6,children:h.jsx(b.Text,{size:"md",children:Hi(e.result,y)})})]},g))})})})}),t.relations.map((y,g)=>h.jsx(b.Tabs.Panel,{pt:"xs",value:y.name,children:h.jsx(b.Paper,{withBorder:!0,children:h.jsx(BD,{relatedPath:y.path,id:Et(e.id),foreign_key:y.foreign_key,type:y.type})})},g))]})})}const rc=x.memo(({id:e,...t})=>{const{info:n,getEntry:o}=Oe(),[s,a]=x.useState(null),[u,c]=Le.useDebouncedState(!1,$r),[d,p]=x.useState(!1),y=sr({onClick:()=>{c(!0),o(e).then(g=>{g&&(a(g),p(!0))}).catch(()=>{}).finally(()=>c(!1))},size:"sm",loading:u,...t});return h.jsxs(h.Fragment,{children:[h.jsx(b.Tooltip,{label:"Details",children:h.jsx(b.ActionIcon,{...y,children:h.jsx(u1,{})})}),h.jsx(x0,{item:s,info:n,opened:d,onClose:()=>p(!1)})]})});rc.displayName="View";const Gs=x.memo(({id:e})=>{const{info:t}=Oe();return h.jsxs(b.Flex,{style:{gap:4,whiteSpace:"nowrap"},children:[t!=null&&t.permissions.includes("can_get")?h.jsx(rc,{id:e}):null,t!=null&&t.permissions.includes("can_put")?h.jsx(Ol,{id:e}):null,t!=null&&t.permissions.includes("can_delete")?h.jsx(Al,{id:e}):null]})});Gs.displayName="Actions";const Hs=x.memo(({tooltipProps:e,...t})=>{const{setOpened:n}=zn("add"),o=sr({onClick:()=>n(!0),...t});return h.jsx(h.Fragment,{children:h.jsx(b.Tooltip,{...e,label:(e==null?void 0:e.label)??"Add Item",children:h.jsx(b.ActionIcon,{...o,children:h.jsx(xl,{})})})})});Hs.displayName="Add";function ic({jsonForms:e,...t}){const{info:n,refetch:o,refetchInfo:s,addEntry:a}=Oe(),{opened:u,setOpened:c,state:d,setState:p,reset:y,view:g,setView:_}=zn("add"),[C,E]=Le.useDebouncedState(!1,$r),{jsonForms:T}=b.useProps("AddDialog",{},{}),P=x.useMemo(()=>xn(T,e),[T,e]),k=x.useCallback(Q=>{Q==null||Q.preventDefault(),E(!0),a(d.data).then(U=>{U&&(o(),s())}).catch(()=>{}).finally(()=>{E(!1),c(!1)})},[a,o,s,E,c,d.data]);return h.jsx(Nu,{schema:n.add_schema,uischema:n.add_uischema,state:d,setState:p,view:g,setView:_,jsonForms:P,onSubmit:k,buttonText:"Add",buttonLoading:C,opened:u,onClose:()=>c(!1),onExitTransitionEnd:y,...g===gt.OVERLAY?Bu:{},...g===gt.NORMAL?Lu:{},...t,title:t.title??(n==null?void 0:n.add_title)})}const A0=[{name:"John Doe",age:25,friend:"Jane Doe","friend.name":"Jane Doe","friend.age":30},{name:"Jane Doe",age:30,friend:"John Doe","friend.name":"John Doe","friend.age":25}],zD=[{label:"Name",key:"name"},{label:"Age",key:"age"},{label:"Friend",key:"friend"}],UD=[{label:"Name",key:"name"},{label:"Age",key:"age"},{label:"Friend Name",key:"friend.name"},{label:"Friend Age",key:"friend.age"}],WD=A0.map(e=>h.jsxs(b.Table.Tr,{children:[h.jsx(b.Table.Td,{p:4,children:e.name}),h.jsx(b.Table.Td,{p:4,children:e.age}),h.jsx(b.Table.Td,{p:4,children:e.friend})]},e.name)),jD=A0.map(e=>h.jsxs(b.Table.Tr,{children:[h.jsx(b.Table.Td,{p:4,children:e.name}),h.jsx(b.Table.Td,{p:4,children:e.age}),h.jsx(b.Table.Td,{p:4,children:e["friend.name"]}),h.jsx(b.Table.Td,{p:4,children:e["friend.age"]})]},e.name)),O0={simplified:{title:"Simplified version of the data",description:"This is a simplified version of the data. It shows only the properties of the elements and their relationships"},detailed:{title:"Detailed version of the data",description:"This is a detailed version of the data. It shows all the properties of the elements including all the properties of their relationships"}},qs=x.memo(({tooltipProps:e,...t})=>{const{download:n}=Oe(),[o,{toggle:s,close:a}]=Le.useDisclosure(),[u,c]=Le.useDebouncedState(!1,$r),[d,p]=x.useState("simplified"),[y,g]=x.useState(Wo),[_,C]=x.useState(qa),E=sr({onClick:s,...t}),T=()=>{c(!0),n(void 0,{export_mode:d,delimiter:y,quotechar:_}).catch(()=>{}).finally(()=>{c(!1),a()})};return h.jsxs(h.Fragment,{children:[h.jsx(b.Modal,{title:"Download data",centered:!0,size:"xl",opened:o,onClose:a,children:h.jsxs(b.Stack,{children:[h.jsxs(b.Group,{grow:!0,children:[h.jsx(b.Select,{label:"Delimiter",description:"Select the delimiter used in the CSV file",value:y,onChange:g,data:Ha,placeholder:"Select delimiter",allowDeselect:!1,leftSection:h.jsx(Nd,{})}),h.jsx(b.Select,{label:"Quote character",description:"Select the quote character used in the CSV file",value:_,onChange:C,data:Ya,placeholder:"Select quote character",leftSection:h.jsx(kd,{})})]}),h.jsx(b.Box,{children:h.jsx(b.SegmentedControl,{value:d,onChange:p,data:[{label:"Simplified",value:"simplified"},{label:"Detailed",value:"detailed"}]})}),h.jsxs(b.Card,{shadow:"md",withBorder:!0,children:[h.jsxs(b.Group,{justify:"space-between",children:[h.jsx(b.Text,{children:O0[d].title}),h.jsx(b.Tooltip,{label:O0[d].description,children:h.jsx(b.ThemeIcon,{variant:"transparent",size:"sm",style:{cursor:"pointer"},children:h.jsx(h1,{})})})]}),h.jsxs(b.Table,{withColumnBorders:!0,children:[h.jsx(b.Table.Thead,{children:h.jsx(b.Table.Tr,{children:d==="simplified"?zD.map(P=>h.jsx(b.Table.Th,{p:4,children:P.label},P.key)):UD.map(P=>h.jsx(b.Table.Th,{p:4,children:P.label},P.key))})}),h.jsx(b.Table.Tbody,{children:d==="simplified"?WD:jD})]})]}),h.jsx(b.Group,{justify:"end",children:h.jsx(b.Button,{mt:"md",onClick:T,loading:u,children:"Download"})})]})}),u?h.jsx(b.ThemeIcon,{variant:"transparent",size:E.size,c:E.c,children:h.jsx(b.Loader,{size:"100%",color:E.c})}):h.jsx(b.Tooltip,{...e,label:(e==null?void 0:e.label)??"Download",children:h.jsx(b.ActionIcon,{...E,children:h.jsx(a1,{})})})]})});qs.displayName="Download";const oc=x.memo(({tooltipProps:e,...t})=>{const[n,o]=x.useState(!1),{refetch:s}=Oe(),a=sr({onClick:()=>{o(!0),s().finally(()=>{o(!1)})},...t});return n?h.jsx(b.ThemeIcon,{variant:"transparent",size:a.size,c:a.c,children:h.jsx(b.Loader,{size:"100%",color:a.c})}):h.jsx(b.Tooltip,{...e,label:(e==null?void 0:e.refresh)??"Refresh",children:h.jsx(b.ActionIcon,{...a,children:h.jsx(m1,{})})})});oc.displayName="Refresh";const sc=x.memo(({tooltipProps:e,...t})=>{const{upload:n,refetch:o}=Oe(),[s,{toggle:a,close:u}]=Le.useDisclosure(),[c,d]=Le.useDebouncedState(!1,$r),[p,y]=x.useState(),[g,_]=x.useState(Wo),[C,E]=x.useState(qa),T=sr({onClick:a,...t}),P=()=>{d(!0),n(p,{delimiter:g,quotechar:C}).then(k=>{k&&o()}).catch(()=>{}).finally(()=>{d(!1),u()})};return h.jsxs(h.Fragment,{children:[h.jsx(b.Modal,{title:"Import data",centered:!0,opened:s,onClose:u,onExitTransitionEnd:()=>{y(null),_(Wo)},children:h.jsxs(b.Stack,{children:[h.jsxs(b.Group,{grow:!0,children:[h.jsx(b.Select,{label:"Delimiter",description:"Select the delimiter used in the CSV file",value:g,onChange:_,data:Ha,placeholder:"Select delimiter",leftSection:h.jsx(Nd,{})}),h.jsx(b.Select,{label:"Quote character",description:"Select the quote character used in the CSV file",value:C,onChange:E,data:Ya,placeholder:"Select quote character",leftSection:h.jsx(kd,{})})]}),h.jsx(b.FileInput,{label:"CSV file",description:"CSV file containing the data to import",value:p,onChange:y,accept:"text/csv",placeholder:"Upload CSV file",leftSection:h.jsx(c1,{}),clearable:!0,required:!0}),h.jsx(b.Group,{justify:"end",children:h.jsx(b.Button,{onClick:P,disabled:!p,loading:c,children:"Upload"})})]})}),h.jsx(b.Tooltip,{...e,label:(e==null?void 0:e.label)??"Upload CSV",children:h.jsx(b.ActionIcon,{...T,children:h.jsx(y1,{})})})]})});sc.displayName="Upload";function VD({children:e,fetch:t=!0,loading:n=h.jsx(b.Center,{children:h.jsx(b.Loader,{})}),end:o=h.jsx(b.Center,{children:"End of data"}),fetchWrapper:s=b.Center,fetchWrapperProps:a}){const{streaming:u,loading:c}=Oe(),{ref:d,inViewport:p}=Le.useInViewport(),y=x.useMemo(()=>Object.values(u.data).flat(),[u.data]),g=x.useMemo(()=>typeof e=="function"?e(y):e,[e,y]);return x.useEffect(()=>{p&&t&&u.fetch()},[p]),h.jsxs(h.Fragment,{children:[g,c&&n,u.isEnd&&o,h.jsx(s,{ref:d,id:"IS-load-trigger",mih:"1%",...a})]})}function GD(e,t){const n=Oe(),o=Mr(),s=x.useCallback(({row:a,...u})=>h.jsx(Mn,{fallback:h.jsx(Gs,{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 HD(e,t){return{enableRowSelection:!!e||!!t}}const fr=(e={},...t)=>t.reduce((n,o)=>xn(n,e[o]),{}),bo=(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}`},ac=(e="")=>{e.startsWith("filter")&&(e=e.slice(6));const[t="",n=""]=e.split("*");return{col:t,operator:n}};function qD({col:e,colFilter:t,onClick:n,...o}){return h.jsxs(b.Menu,{shadow:"md",width:"target",...o,children:[h.jsx(b.Menu.Target,{children:h.jsx(b.Button,{children:"Add filter"})}),h.jsx(b.Menu.Dropdown,{children:t.filters.filter(s=>!s.id).map(s=>h.jsx(b.Menu.Item,{onClick:()=>n({col:e,opr:s.operator,value:""}),children:s.name},`${t.label}-${s.name}`))})]})}function YD({col:e}){const{info:t,queryParams:n,setQueryParams:o}=Oe(),s=Va.useForm({initialValues:{filters:(n==null?void 0:n.filters)||[]}}),a=x.useMemo(()=>(t==null?void 0:t.filters[e])||{},[e,t==null?void 0:t.filters]),u=x.useMemo(()=>{var y;return((y=a==null?void 0:a.filters)==null?void 0:y.reduce((g,_)=>({...g,[_.operator]:_.name}),{}))||{}},[a==null?void 0:a.filters]),[c]=Le.useDebouncedValue(s.getValues(),Uo);Le.useDidUpdate(()=>{const y=c.filters.filter(g=>g.value);o({filters:y})},[c]);const d=s.getValues().filters,p=d.map((y,g)=>y.col===e&&!y.id?h.jsxs(x.Fragment,{children:[h.jsx(b.Grid.Col,{span:1.5,py:0,children:h.jsx(b.Center,{h:"100%",w:"100%",children:h.jsx(b.CloseButton,{onClick:()=>s.removeListItem("filters",g),size:"md",title:"Remove filter",variant:"outline"})})}),h.jsx(b.Grid.Col,{span:10.5,py:0,children:y.opr==="in"?h.jsx(Qu,{form:s,name:`filters.${g}.value`,label:u[y.opr],comboboxProps:{withinPortal:!1}}):h.jsx(Xu,{form:s,name:`filters.${g}.value`,label:u[y.opr],schema:a.schema,withinPortal:!1,filter:!0})}),g>=0&&g+1<d.length&&h.jsx(b.Grid.Col,{span:12,py:0,children:h.jsx(b.Divider,{my:"sm",label:"AND",align:"center"})})]},`${y.col}-${g}`):null).filter(Boolean);return h.jsxs(b.Grid,{w:p.length?"25rem":"100%",gap:"md",gutter:"xs",children:[p.length?p:h.jsx(b.Grid.Col,{span:12,children:h.jsx(b.Text,{align:"center",c:"gray",style:{fontStyle:"italic"},children:"No filters"})}),h.jsx(b.Grid.Col,{span:12,children:h.jsx(b.Stack,{children:h.jsx(qD,{col:e,colFilter:a||{filters:[]},onClick:y=>s.insertListItem("filters",y),withinPortal:!1})})})]})}function KD({filters:e,col:t,opr:n,table:o}){const s=b.useMantineTheme();return e.map(a=>{const u=a.operator===n;return h.jsx(b.Menu.Item,{color:u?s.primaryColor:void 0,leftSection:h.jsx(b.Text,{size:"xl",ta:"center",w:"2ch",style:{transform:"translateY(-0.1em)"},children:a.name[0]}),onClick:()=>o.setColumnFilterFns(c=>({...c,[t]:bo(t,a.operator)})),value:a.opr,children:a.name},a.operator)})}function JD({enableAdvancedFilters:e,mode:t,setMode:n,col:o,opr:s,filters:a,table:u}){return h.jsxs(h.Fragment,{children:[e&&h.jsxs(h.Fragment,{children:[h.jsx(b.Menu.Item,{component:"div",p:0,children:h.jsx(b.SegmentedControl,{fullWidth:!0,size:"sm",data:["Basic","Advanced"],value:t,onChange:n})}),h.jsx(b.Menu.Divider,{})]}),t==="Basic"&&h.jsx(KD,{filters:a,col:o,opr:s,table:u}),t==="Advanced"&&h.jsx(YD,{col:o})]})}const Ti=e=>e!=null&&e!=="",I0=x.forwardRef(({clearIcon:e,mrtprops:{textinputprops:t},...n},o)=>{const{value:s,onChange:a,leftInputProps:u,rightInputProps:c,groupProps:d,cleariconprops:p,...y}=n,[g,_]=x.useState([null,null]);x.useEffect(()=>{s||_([null,null])},[s]),x.useEffect(()=>{const N=JSON.stringify(g);g.every(Ti)&&N!==s?a(JSON.stringify(g)):g.every(M=>!Ti(M))&&a(void 0)},[g]);const C=x.useCallback((N,M)=>{_(B=>{const Y=[...B];return Y[M]=N,Y})},[]);let[E,T]=g;const P=Ti(T)&&!Ti(E),k=Ti(E)&&!Ti(T),Q=typeof E=="number"?h.jsx(b.ActionIcon,{...p,onClick:()=>_(N=>[null,N[1]]),children:h.jsx(Bd,{})}):null,U=typeof T=="number"?h.jsx(b.ActionIcon,{...p,onClick:()=>_(N=>[N[0],null]),children:h.jsx(Bd,{})}):null;return h.jsxs(b.Group,{w:"100%",wrap:"nowrap",align:"center",gap:"xs",...d,children:[h.jsx(b.NumberInput,{ref:o,styles:{wrapper:{marginBottom:0}},hideControls:!0,rightSection:Q,...y,...t,value:E??"",onChange:N=>C(N,0),placeholder:P?"Start value is required":"Start value",error:P&&" ",...u}),h.jsx(b.NumberInput,{styles:{wrapper:{marginBottom:0}},hideControls:!0,rightSection:U,...y,...t,value:T??"",onChange:N=>C(N,1),placeholder:k?"End value is required":"End value",error:k&&" ",...c})]})});I0.displayName="HeaderBetweenInput";const P0=x.forwardRef(({clearIcon:e,mrtprops:{selectprops:t},...n},o)=>h.jsx(b.Select,{ref:o,data:[{value:String(!0),label:"True"},{value:String(!1),label:"False"}],...t,...n,value:qi(n.value)?String(n.value):null,onChange:s=>n.onChange(qi(s)?s===String(!0):void 0)}));P0.displayName="HeaderBooleanInput";const lc=e=>e==="range"?[null,null]:null,$0=(e,t)=>e==="range"?t.every(n=>n!==null):t!==null,uc=x.forwardRef(({type:e,clearIcon:t,mrtprops:{dateinputprops:n},...o},s)=>{const{value:a,onChange:u,...c}=o,[d,p]=x.useState(lc(e));return x.useEffect(()=>{p(lc(e))},[e]),x.useEffect(()=>{a||p(lc(e))},[e,a]),x.useEffect(()=>{const y=JSON.stringify(e==="range"?d.map(g=>g?g.toISOString():null):(d==null?void 0:d.toISOString())??null);$0(e,d)&&y!==a?u(y):$0(e,d)||u(void 0)},[d]),h.jsx(Gi.DatePickerInput,{ref:s,type:e,clearable:!0,valueFormat:"DD.MM.YYYY",...c,...n,value:e==="range"?Array.isArray(d)?d:[null,null]:Array.isArray(d)?null:d,onChange:p})});uc.displayName="HeaderDateInput";const M0=x.forwardRef(({data:e,clearIcon:t,mrtprops:{multiselectprops:n},placeholder:o,...s},a)=>{const u=Array.isArray(s.value)?s.value.map(c=>String(typeof c=="object"?Et(c.id):c)):[];return h.jsxs(b.Box,{...s,children:[!u.length&&h.jsx(b.TextInput,{pos:"absolute",placeholder:o,...s,value:void 0,onChange:void 0}),h.jsx(b.MultiSelect,{ref:a,styles:{pill:{maxWidth:"5rem"}},data:e,...n,...s,value:u})]})});M0.displayName="HeaderMultiSelectInput";const F0=x.forwardRef(({clearIcon:e,mrtprops:{textinputprops:t},...n},o)=>h.jsx(b.NumberInput,{ref:o,rightSection:e,...t,...n,value:n.value??""}));F0.displayName="HeaderNumberInput";const cc=x.forwardRef(({data:e,clearIcon:t,mrtprops:{selectprops:n},...o},s)=>h.jsx(b.Select,{ref:s,data:e,searchable:!0,...n,...o,value:o.value??null}));cc.displayName="HeaderSelectInput";const fc=x.forwardRef(({clearIcon:e,mrtprops:{multiselectprops:t},...n},o)=>h.jsx(b.TagsInput,{ref:o,styles:{pill:{maxWidth:"5rem"}},...t,...n,value:n.value??[],onChange:s=>n.onChange(s.length?s:void 0)}));fc.displayName="HeaderTagsInput";const dc=x.forwardRef((e,t)=>{const[n,o]=x.useState();return h.jsx(fc,{ref:t,...e,searchValue:n?n.toString():"",onSearchChange:s=>{if(!s){o(void 0);return}const a=Number(s);isNaN(a)||o(a)}})});dc.displayName="HeaderTagsNumberInput";const hc=x.forwardRef(({clearIcon:e,mrtprops:{textinputprops:t},...n},o)=>h.jsx(b.TextInput,{ref:o,rightSection:e,...t,...n,value:n.value||""}));hc.displayName="HeaderTextInput";const D0=x.forwardRef(({component:e,...t},n)=>{const o=Oe(),s=Mr(),a=x.useMemo(()=>({api:o,auth:s,componentProps:{...t,ref:n}}),[o,s,t,n]);return h.jsx(Mn,{ref:n,fallback:h.jsx(hc,{...t}),functionProps:a,children:e})});D0.displayName="HeaderInput";const RD=(e,t)=>{if(!(!e||!t)){switch(e){case"tc":return({componentProps:n})=>h.jsx(hc,{...n});case"in":switch(t.type){case"Integer":return({componentProps:n})=>h.jsx(dc,{...n});case"Enum":return({componentProps:n})=>h.jsx(dc,{data:t.values,...n})}return({componentProps:n})=>h.jsx(fc,{...n});case"bw":switch(t.type){case"Date":case"DateTime":return({componentProps:n})=>h.jsx(uc,{type:"range",...n});default:return({componentProps:n})=>h.jsx(I0,{...n})}case"eq":case"neq":switch(t.type){case"Boolean":return({componentProps:n})=>h.jsx(P0,{...n})}break;case"rel_o_m":case"nrel_o_m":return({componentProps:n})=>h.jsx(cc,{data:t.values.map(o=>({value:String(Et(o.id)),label:o.value})),...n});case"rel_m_m":case"nrel_m_m":return({componentProps:n})=>h.jsx(M0,{data:t.values.map(o=>({value:String(Et(o.id)),label:o.value})),...n})}switch(t.type){case"Integer":return({componentProps:n})=>h.jsx(F0,{...n});case"Enum":return({componentProps:n})=>h.jsx(cc,{data:t.values,...n});case"Date":case"DateTime":return({componentProps:n})=>h.jsx(uc,{...n})}}},wi={root:"_root_yn5fy_1","date-filter":"_date-filter_yn5fy_5"},k0=x.forwardRef(({label:e,disabled:t,children:n,...o},s)=>t?x.cloneElement(n,{ref:s}):h.jsx(b.Tooltip,{label:e,...o,children:x.cloneElement(n,{ref:s})}));k0.displayName="FilterIconWrapper";const N0=x.forwardRef(({indicator:e,children:t,...n},o)=>{const{height:s,ref:a}=Le.useElementSize(),u=Le.useMergedRef(o,a);if(!e)return x.cloneElement(t,{ref:u});const c=2;//! This is the height offset between the button from ActionIcon and the icon itself
232
- return h.jsx(b.Indicator,{zIndex:20,size:16,label:e,styles:{root:{height:s+c}},...n,children:x.cloneElement(t,{ref:u})})});N0.displayName="FilterIndicatorWrapper";function ZD({children:e,enableFilterModes:t,enableAdvancedFilters:n,filterProps:o,filterModeDescription:s,filterMenu:a,filters:u,filterFn:c,mrtProps:{column:d,table:p,...y}}){var pe;const{info:g,queryParams:_}=Oe(),C=Oe(),E=Mr(),T=x.useMemo(()=>{var X,se;return(se=(X=g==null?void 0:g.filters)==null?void 0:X[d.id])==null?void 0:se.schema},[d.id,g==null?void 0:g.filters]),[P,k]=x.useState("Basic"),[Q,{toggle:U}]=Le.useDisclosure(),N=((pe=p.getState().columnFilterFns)==null?void 0:pe[d.id])||c,M=x.useMemo(()=>ac(N).operator,[N]),B=x.useMemo(()=>{var X;return(X=u==null?void 0:u.find(se=>se.operator===M))==null?void 0:X.name},[u,M]),Y=Va.useField({mode:"controlled"}),fe=x.useRef(M),ie=x.useMemo(()=>(_==null?void 0:_.filters.filter(X=>X.id!==d.id&&X.col===d.id).map(X=>({...X})))||[],[_,d.id]);fe.current!==M&&(fe.current=M,Y.reset());const S=x.useCallback(()=>{Y.reset(),d.setFilterValue(void 0)},[]),[j]=Le.useDebouncedValue(Y.getInputProps().value,Uo),te=Le.useMounted(),ce=x.useMemo(()=>_==null?void 0:_.filters.find(X=>X.col===d.id&&X.opr===M),[d.id,M,_==null?void 0:_.filters]);x.useEffect(()=>{te&&d.setFilterValue(j??void 0)},[j]),x.useEffect(()=>{if(!te)return;const X=d.getFilterValue();X===void 0?S():Y.getInputProps().onChange(X)},[d.getFilterValue()]),x.useEffect(()=>{te&&(ce||S())},[ce]);const me=x.useMemo(()=>{const X={variant:"subtle"};return!(u!=null&&u.length)&&(X.disabled=!0,X.c="gray"),X},[u==null?void 0:u.length]),Be=x.useMemo(()=>Ja(t?e==null?void 0:e[M]:e,RD(M,T)),[e,t,M,T]),_e=x.useMemo(()=>({...me,variant:"transparent",c:void 0,size:"sm",onClick:S}),[me,S]),De=x.useMemo(()=>({api:C,auth:E,mrtProps:{column:d,table:p,...y}}),[C,E,d,y,p]),ke=x.useMemo(()=>({...De,componentProps:{label:p.options.localization.changeFilterMode,disabled:!(u!=null&&u.length),indicator:ie.length,aiProps:me,onClick:U}}),[me,ie.length,u==null?void 0:u.length,De,p.options.localization.changeFilterMode,U]),mt=x.useMemo(()=>({...De,componentProps:{filterMode:B}}),[B,De]),K=ct(t?fr(o,M):o,De),J=x.useMemo(()=>{var X,se;return{w:"100%",variant:"unstyled",disabled:!(u!=null&&u.length),title:u.length?void 0:"No filters",placeholder:(X=p.options.localization.filterByColumn)==null?void 0:X.replace("{column}",String(d.columnDef.header)),"aria-label":(se=p.options.localization.filterByColumn)==null?void 0:se.replace("{column}",String(d.columnDef.header)),style:{fontWeight:"normal"},mrtprops:{column:d,table:p,...y,textinputprops:{className:Pr("mrt-filter-text-input",wi.root),...ct(p.mantineFilterTextInputProps,[{column:d,table:p,...y}]),...ct(d.columnDef.mantineFilterTextInputProps,[{column:d,table:p,...y}])},selectprops:{className:Pr("mrt-filter-text-input",wi.root),...ct(p.mantineFilterSelectProps||{clearable:!0},{column:d,table:p,...y}),...ct(d.columnDef.mantineFilterSelectProps,{column:d,table:p,...y})},multiselectprops:{className:Pr("mrt-filter-text-input",wi.root),...ct(p.mantineFilterMultiSelectProps||{clearable:!0},{column:d,table:p,...y}),...ct(d.columnDef.mantineFilterMultiSelectProps,{column:d,table:p,...y})},dateinputprops:{className:Pr("mrt-filter-text-input",wi.root,wi["date-filter"]),...ct(p.mantineFilterDateInputProps,{column:d,table:p,...y}),...ct(d.columnDef.mantineFilterDateInputProps,{column:d,table:p,...y})},autocompleteprops:{className:Pr("mrt-filter-text-input",wi.root),...ct(p.mantineFilterAutocompleteProps,{column:d,table:p,...y}),...ct(d.columnDef.mantineFilterAutocompleteProps,{column:d,table:p,...y})}},ref:V=>{V&&(p.refs.filterInputRefs.current[`${d.id}-0`]=V)},clearIcon:Y.isDirty()&&h.jsx(b.CloseButton,{..._e}),...K,cleariconprops:_e}},[_e,d,K,Y,u.length,y,p]);return h.jsxs(b.Menu,{opened:Q,closeOnClickOutside:!0,onChange:U,children:[h.jsxs(b.Stack,{w:"100%",gap:"0.25rem",children:[h.jsxs(b.Flex,{align:"flex-end",children:[h.jsx(D0,{component:Be,field:Y,...Y.getInputProps(),...J}),t&&h.jsx(b.Menu.Target,{children:h.jsx(Mn,{fallback:u.length?h.jsx(k0,{label:p.options.localization.changeFilterMode,position:"bottom-start",withArrow:!0,arrowPosition:"side",children:h.jsx(N0,{indicator:n?ie.length:void 0,children:h.jsx(b.ActionIcon,{...me,onClick:U,children:h.jsx(f1,{})})})}):null,functionProps:ke,children:a})})]}),t&&h.jsx(Mn,{fallback:u.length?h.jsx(b.Input.Description,{size:"xs",children:p.options.localization.filterMode.replace("{filterType}",mn.localizedFilterOption(fr(p.options.localization,d.id),B)||mn.localizedFilterOption(p.options.localization,B)||B)}):null,functionProps:mt,children:s})]}),h.jsx(b.Menu.Dropdown,{children:h.jsx(JD,{enableAdvancedFilters:n,mode:P,setMode:k,col:d.id,opr:M,filters:u,table:p})})]})}function XD({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?h.jsx(b.Tooltip,{label:t[s].original,children:h.jsx(b.Highlight,{highlight:e,children:t[s].truncated},s)},s):h.jsx(b.Highlight,{highlight:e,children:o},s)}):t!=null&&t.truncated?h.jsx(b.Tooltip,{label:t.original,children:h.jsx(b.Highlight,{highlight:e,children:t.truncated})}):h.jsx(b.Highlight,{highlight:e,children:n})}function QD(e,t,n,o){const{path:s,info:a,data:u,specialKey:c}=Oe(),d=Oe(),p=Mr(),y=x.useMemo(()=>(u==null?void 0:u.list_columns.map(C=>{var ie,S,j,te,ce,me,Be;const{component:E,enableFilterModes:T,enableAdvancedFilters:P,filterComponent:k,filterProps:Q,filterModeDescription:U,filterMenu:N,defaultOpr:M=((te=(j=(S=(ie=a==null?void 0:a.filters)==null?void 0:ie[C])==null?void 0:S.filters)==null?void 0:j[0])==null?void 0:te.operator)||""}=fr(t,c.all,C),B=bo(C,M),Y=((me=(ce=a==null?void 0:a.filters)==null?void 0:ce[C])==null?void 0:me.filters)||[],fe={};return E!==void 0&&(fe.Header=_e=>ct(E,{api:d,auth:p,mrtProps:_e})),{accessorKey:C,accessorFn:_e=>Hi(_e,C),header:(Be=u==null?void 0:u.label_columns)==null?void 0:Be[C],Filter:_e=>h.jsx(ZD,{enableFilterModes:T,enableAdvancedFilters:P,filterProps:Q,filterModeDescription:U,filterMenu:N,filters:Y,filterFn:B,mrtProps:_e,children:k}),enableSorting:u==null?void 0:u.order_columns.includes(C),filterFn:Y.length?B:void 0,columnFilterModeOptions:Y.map(_e=>bo(C,_e.operator)),Cell:({cell:_e,table:De,column:ke,...mt})=>{const K=De.getState().globalFilter,J=ke.getFilterValue()||"",{component:pe,separator:X,truncate:se}=fr(n,c.all,C);let V=[];K&&V.push(...K.split(o).map(ge=>ge.trim())),J&&typeof J=="string"&&V.push(...J.split(o).map(ge=>ge.trim()));let q=_e.getValue();typeof q=="number"?q=q.toLocaleString():q==null&&(q=""),X&&(q=q.split(X));let re={};se&&(Array.isArray(q)?re=q.map(ge=>({original:ge,truncated:ge.length>se?`${ge.slice(0,se)}...`:null})):re={original:q,truncated:q.length>se?`${q.slice(0,se)}...`:null});const he={api:d,auth:p,data:_e.row.original,highlight:V,componentProps:{value:q},mrtProps:{cell:_e,table:De,column:ke,...mt}};return h.jsx(Mn,{fallback:h.jsx(XD,{highlight:V,truncate:re,children:q}),functionProps:he,children:pe})},...fe,...fr(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,p,t,n,o]),[g,_]=Le.useSetState({});return x.useEffect(()=>{y.length&&_({[u.path]:y})},[y]),{columns:y.length?y:(g==null?void 0:g[s])||y,manualFiltering:!0}}function ek(){const{data:e,loading:t}=Oe();return{data:(e==null?void 0:e.result)||[],rowCount:(e==null?void 0:e.count)||0,state:{showLoadingOverlay:t}}}function tk(e){const{data:t}=Oe();return e?{mantineTableBodyRowProps:({row:n})=>({onClick:()=>{const o=t.ids[n.id];e(o,n.original)},style:{cursor:"pointer"}})}:null}function nk(){const{info:e}=Oe();return{filterFns:x.useMemo(()=>Object.entries((e==null?void 0:e.filters)||{}).reduce((t,[n,o])=>(o.filters.forEach(s=>t[bo(n,s.operator)]=null),t),{}),[e==null?void 0:e.filters])}}function rk(){const{queryParams:e,setQueryParams:t}=Oe(),n=x.useMemo(()=>e==null?void 0:e.global_filter,[e==null?void 0:e.global_filter]),[o,s]=x.useState(n||""),[a]=Le.useDebouncedValue(o,Uo);return Le.useDidUpdate(()=>{n&&n!==a&&s(n)},[n]),Le.useDidUpdate(()=>{a?t({page:0,global_filter:a}):e!=null&&e.global_filter&&t({page:0,global_filter:void 0})},[a]),{manualFiltering:!0,onGlobalFilterChange:s,state:{globalFilter:o}}}function ik(e){const{data:t,queryParams:n,setQueryParams:o}=Oe(),s=x.useMemo(()=>({pageIndex:(n==null?void 0:n.page)||Df,pageSize:(n==null?void 0:n.page_size)||kf}),[n==null?void 0:n.page,n==null?void 0:n.page_size]),a=x.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 ok(e,t){const{info:n,specialKey:o,setQueryParams:s}=Oe(),a=x.useMemo(()=>{const u=[];return e.getState().columnFilters.forEach(({id:c,value:d})=>{var _,C,E,T,P;const{updateQueryParams:p=!0,defaultOpr:y=((T=(E=(C=(_=n==null?void 0:n.filters)==null?void 0:_[c])==null?void 0:C.filters)==null?void 0:E[0])==null?void 0:T.operator)||""}=fr(t,o.all,c);if(!p)return;let g=(P=e.getState().columnFilterFns)==null?void 0:P[c];g?g=ac(g).operator:g=y,u.push({id:c,col:c,opr:g,value:d})}),u},[o.all,e.getState().columnFilters]);Le.useDidUpdate(()=>{s(u=>({...u,filters:[...(u==null?void 0:u.filters.filter(c=>!c.id))??[],...a]}))},[a])}function sk(e){const{ref:t,height:n}=Le.useElementSize(),{ref:o,height:s}=Le.useElementSize(),a=x.useMemo(()=>{const p={h:"100%",withBorder:e};return e||(p.shadow=void 0),p},[e]),u=x.useMemo(()=>({ref:o}),[o]),c=x.useMemo(()=>({ref:t,pos:"sticky",bottom:0}),[t]),d=x.useMemo(()=>({h:`calc(100% - ${s+n}px)`}),[s,n]);return{mantinePaperProps:a,mantineTopToolbarProps:u,mantineBottomToolbarProps:c,mantineTableContainerProps:d}}function ak(){const{queryParams:e,setQueryParams:t,data:n}=Oe(),o=x.useMemo(()=>e!=null&&e.order_column?[{id:e.order_column,desc:e.order_direction==="desc"}]:[],[e==null?void 0:e.order_column,e==null?void 0:e.order_direction]),s=x.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 lk(e,t){return{toggleGlobalFilter:h.jsx(mn.MRT_ToggleGlobalFilterButton,{table:e,disabled:!1},"basic-toggleGlobalFilter"),filter:h.jsx(mn.MRT_ToggleFiltersButton,{table:e},"basic-filter"),refresh:h.jsx(oc,{tooltipProps:{label:e.options.localization.refresh}},"basic-refresh"),add:(t==null?void 0:t.add)&&h.jsx(Hs,{tooltipProps:{label:e.options.localization.add}},"basic-add"),download:(t==null?void 0:t.download)&&h.jsx(qs,{tooltipProps:{label:e.options.localization.download}},"basic-download"),upload:(t==null?void 0:t.upload)&&h.jsx(sc,{tooltipProps:{label:e.options.localization.upload}},"basic-upload"),showHideColumns:h.jsx(mn.MRT_ShowHideColumnsButton,{table:e},"basic-showHideColumns"),toggleDensePadding:h.jsx(mn.MRT_ToggleDensePaddingButton,{table:e},"basic-toggleDensePadding"),toggleFullScreen:h.jsx(mn.MRT_ToggleFullScreenButton,{table:e},"basic-toggleFullScreen")}}function L0(e,t,n,o){Object.entries(e||{}).forEach(([a,u])=>{a in t&&(t[a]=h.jsx(Mn,{fallback:t[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=h.jsx(Mn,{functionProps:n,children:u},`order-${a}`);a>s.length?s.push(c):s=[...s.slice(0,a),c,...s.slice(a)]}),h.jsx(b.Flex,{gap:"0.125rem",align:"center",children:s})}function uk(e={},t,n){const{info:o,queryParams:s,setQueryParams:a}=Oe(),u=Oe(),c=Mr(),{customizer:d,custom:p,leftToolbar:y}=e,g=x.useMemo(()=>t?[{label:"All",value:"[]"},...t.map(E=>({label:E.name,value:JSON.stringify(E.value)}))]:[],[t]),_=x.useMemo(()=>g.length?h.jsx(b.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:x.useCallback(({table:E})=>{const T={api:u,auth:c,mrtProps:{table:E}},P={add:o==null?void 0:o.permissions.includes("can_post"),download:o==null?void 0:o.permissions.includes("can_download"),upload:o==null?void 0:o.permissions.includes("can_upload")},k=lk(E,P);return L0(d,k,T,p)},[u,c,p,d,o==null?void 0:o.permissions]),enableTopToolbar:!n,enableFilters:(d==null?void 0:d.filter)!==null,...x.useMemo(()=>{if(_&&y)throw new Error("quickFilters and toolbar.leftToolbar are mutually exclusive, please use only one of them");const E={};if(_&&(E.renderTopToolbarCustomActions=()=>h.jsx(b.Group,{justify:"space-between",children:h.jsx(b.Box,{children:_})}),E.positionToolbarAlertBanner="bottom"),y){const{custom:T}=y;E.renderTopToolbarCustomActions=({table:P})=>L0(void 0,{},{api:u,auth:c,mrtProps:{table:P}},T),E.positionToolbarAlertBanner="bottom"}return E},[u,c,y,_])}}const B0={"toolbar-alert":"_toolbar-alert_bw71q_25","head-overlay":"_head-overlay_bw71q_28"},ck=({alertBanner:e,table:t,...n})=>{var _e,De;const{getFilteredSelectedRowModel:o,getPrePaginationRowModel:s,getState:a,resetRowSelection:u,options:{enableRowSelection:c,enableSelectAll:d,icons:{IconX:p},localization:y,mantineToolbarAlertBannerBadgeProps:g,mantineToolbarAlertBannerProps:_,manualPagination:C,positionToolbarAlertBanner:E,rowCount:T}}=t,{density:P,grouping:k,rowSelection:Q}=a(),{left:U,right:N,renderToolbarAlertBannerContent:M,wrapperProps:B}=e??{},{flex:Y,group:fe,stack:ie}=B??{},S={...ct(_,{table:t}),...n},j=ct(g,{table:t}),te=T??s().flatRows.length,ce=x.useMemo(()=>C?Object.values(Q).filter(Boolean).length:o().rows.length,[Q,te,C]),me=ce?h.jsxs(b.Flex,{align:"center",gap:"sm",children:[(De=(_e=y.selectedCountOfRowCountRowsSelected)==null?void 0:_e.replace("{selectedCount}",ce.toString()))==null?void 0:De.replace("{rowCount}",te.toString()),h.jsx(b.Button,{onClick:u,size:"compact-xs",variant:"subtle",children:y.clearSelection}),h.jsx(b.Button,{onClick:ke=>mn.getMRT_SelectAllHandler({table:t})(ke,!1,!0),size:"compact-xs",variant:"subtle",children:y.clearSelectionOnThisPage??"Clear selection on this page"})]}):null,Be=k.length>0?h.jsxs(b.Group,{gap:"xs",children:[y.groupedBy,k.map((ke,mt)=>h.jsxs(x.Fragment,{children:[mt>0?y.thenBy:"",h.jsxs(b.Badge,{className:"alert-badge",rightSection:h.jsx(b.ActionIcon,{color:"white",onClick:()=>t.getColumn(ke).toggleGrouping(),size:"xs",variant:"subtle",children:h.jsx(p,{style:{transform:"scale(0.8)"}})}),variant:"filled",...j,children:[t.getColumn(ke).columnDef.header," "]})]},`${mt}-${ke}`))]}):null;return h.jsxs(b.Flex,{className:Pr(B0["toolbar-alert"],E==="head-overlay"&&B0["head-overlay"],P),...Y,children:[c&&d&&E==="head-overlay"&&h.jsx(mn.MRT_SelectCheckbox,{table:t}),h.jsxs(b.Group,{align:"flex-start",gap:"xs",...fe,children:[ct(U,{table:t}),Ja(ct(M,{selectedAlert:me,groupedAlert:Be,table:t}),h.jsxs(b.Stack,{gap:"xs",...ie,children:[S==null?void 0:S.children,me,Be]})),ct(N,{table:t})]})]})};function fk(e){const{alertBanner:t}=e;return{renderToolbarAlertBannerContent:({table:n})=>h.jsx(ck,{alertBanner:t,table:n})}}const dk={enableStickyHeader:!0,enableColumnPinning:!0},z0=x.forwardRef((e,t)=>{var Re,Nt,dr;const{info:n,data:o,queryParams:s,refetch:a,specialKey:u}=Oe(),c=b.useProps("NextGenDataGrid",{},{}),{fetchOnMount:d=!0,hideToolbar:p,hideActions:y,hidePagination:g,hideError:_,onSelectCheckbox:C,onClickEntry:E,bulkActions:T,table:P,quickFilters:k,withBorder:Q,columnProps:U,header:N,body:M,form:B,toolbar:Y={},textFilterSeparator:fe=";",bodySeparator:ie,bodyTruncate:S,headerCustomizer:j,bodyCustomizer:te,toolbarCustomizer:ce,hideAdd:me,hideDownload:Be,hideFilter:_e,...De}=x.useMemo(()=>xn(c,e),[e,c]);ie&&Object.keys(M).forEach(we=>{M[we]=M[we]||{},M[we].separator=M[we].separator||ie}),S&&Object.keys(M).forEach(we=>{M[we]=M[we]||{},M[we].truncate=M[we].truncate||S}),j&&Object.keys(j).forEach(we=>{N[we]=N[we]||{},N[we].component=j[we].component||j[we]}),te&&Object.keys(te).forEach(we=>{M[we]=M[we]||{},M[we].component=te[we].component||te[we]}),ce&&(Y.custom=Y.custom||ce),me&&(Y.customizer=Y.customizer||{},Y.customizer.add=Y.customizer.add||null),Be&&(Y.customizer=Y.customizer||{},Y.customizer.download=Y.customizer.download||null),_e&&(Y.customizer=Y.customizer||{},Y.customizer.filter=Y.customizer.filter||null),x.useEffect(()=>{process.env.NODE_ENV==="development"&&(ie&&console.warn("bodySeparator is deprecated, please use body.[col].separator instead"),S&&console.warn("bodyTruncate is deprecated, please use body.[col].truncate instead"),j&&console.warn("headerCustomizer is deprecated, please use header.[col].component instead"),te&&console.warn("bodyCustomizer is deprecated, please use body.[col].component instead"),ce&&console.warn("toolbarCustomizer is deprecated, please use toolbar.custom instead"),me&&console.warn("hideAdd is deprecated, please use toolbar.customizer.add instead"),Be&&console.warn("hideDownload is deprecated, please use toolbar.customizer.download instead"),_e&&console.warn("hideFilter is deprecated, please use toolbar.customizer.filter instead"))},[]);const ke=ek(),mt=ak(),K=ik(g),J=QD(U,N,M,fe),pe=sk(Q),X=GD(y,(Re=fr(M,u.actions))==null?void 0:Re.component),se=rk(),V=uk(Y,k,p),q=tk(E),re=HD(C,T),he=nk(),ge=fk(Y),xe=x.useMemo(()=>xn(dk,{mantinePaperProps:{ref:t},getRowId:we=>we.id},J,ke,mt,K,pe,X,se,V,q,re,he,ge,P),[t,J,ke,mt,K,pe,X,se,V,q,re,he,ge,P]),Ye=mn.useMantineReactTable(xe);ok(Ye,N),x.useEffect(()=>{!s&&d&&a()},[]),x.useEffect(()=>{C==null||C(Object.keys(Ye.getState().rowSelection)),T==null||T.setSelectedIds(Object.keys(Ye.getState().rowSelection))},[T,o==null?void 0:o.ids,Ye.getState().rowSelection,C]);const{setView:ee}=zn("add"),{setView:yt}=zn("edit");return x.useEffect(()=>{var we,Fn;(we=B==null?void 0:B.add)!=null&&we.initialView&&ee(B.add.initialView),(Fn=B==null?void 0:B.edit)!=null&&Fn.initialView&&yt(B.edit.initialView)},[]),h.jsxs(b.Box,{h:"100%",w:"100%",pos:"relative",children:[h.jsxs(tc,{cond:!!n,children:[h.jsx(ic,{jsonForms:B==null?void 0:B.add,...(Nt=B==null?void 0:B.add)==null?void 0:Nt.dialogProps}),h.jsx(zu,{jsonForms:B==null?void 0:B.edit,...(dr=B==null?void 0:B.edit)==null?void 0:dr.dialogProps})]}),h.jsx(mn.MantineReactTable,{table:Ye,...De}),_?null:h.jsx(Uu,{})]})});z0.displayName="NextGenDataGrid";const pc={iconSmall:"_iconSmall_sxv3z_1",btn:"_btn_sxv3z_17"};function hk({basePath:e="/security",Target:t,children:n}){const o=$f.useNavigate(),{user:s,signout:a}=Mr(),[u,c]=x.useState(!1),p=[{resource_name:e+"/users",label:"Users",name:"UsersApi",Icon:v1},{resource_name:e+"/roles",label:"Roles",name:"RolesApi",Icon:d1},{resource_name:e+"/permissions",label:"Base Permissions",name:"PermissionsApi",Icon:Dd},{resource_name:e+"/permissionviews",label:"Permission on Views",name:"PermissionViewApi",Icon:Dd},{resource_name:e+"/viewsmenus",label:"Views/Menus",name:"ViewsMenusApi",Icon:s1}].filter(y=>s.permissions.includes(y.name));return h.jsxs(b.Menu,{width:260,position:"bottom-end",transition:"pop-top-right",withinPortal:!0,opened:u,onClose:()=>c(!1),onOpen:()=>c(!0),children:[h.jsx(b.Menu.Target,{children:t||h.jsx(b.UnstyledButton,{className:pc.btn,style:{borderRadius:4},p:"xs",children:h.jsxs(b.Group,{style:{flexWrap:"nowrap"},spacing:7,children:[h.jsx(b.Text,{weight:500,size:"sm",style:{lineHeight:1,whiteSpace:"nowrap"},mr:3,children:`${s.first_name} ${s.last_name}`}),h.jsx(El,{size:12})]})})}),h.jsxs(b.Menu.Dropdown,{children:[p.length?h.jsxs(h.Fragment,{children:[h.jsx(b.Menu.Label,{children:"Security"}),p.map((y,g)=>h.jsx(b.Menu.Item,{p:12,leftSection:h.jsx(y.Icon,{className:pc.iconSmall}),onClick:()=>o(y.resource_name),children:y.label},g)),h.jsx(b.Menu.Divider,{})]}):null,n,h.jsx(b.Menu.Item,{leftSection:h.jsx(p1,{p:12,className:pc.iconSmall}),onClick:a,children:"Logout"})]})]})}O.Actions=Gs,O.Add=Hs,O.AddDialog=ic,O.AlertDialog=Ud,O.ApiContext=Ga,O.ApiProvider=$d,O.AuthContext=Ra,O.Body=m0,O.BulkActionsContext=Xa,O.CommonModal=Nu,O.DEBOUNCE_DELAY=Uo,O.DEBOUNCE_LOADING_DELAY=$r,O.DEFAULT_DELIMITER=Wo,O.DEFAULT_PAGE=Df,O.DEFAULT_PAGE_SIZE=kf,O.DEFAULT_QUOTECHAR=qa,O.DELIMITER_DATA=Ha,O.DataGrid=nc,O.Delete=Al,O.DeleteDialog=lp,O.Download=qs,O.Edit=Ol,O.EditDialog=zu,O.ErrorDialog=Uu,O.FallbackWrapper=Mn,O.Field=yo,O.FieldTitle=Vs,O.Filter=E0,O.FilterMenu=C0,O.FormAutocomplete=DD,O.FormContextAdd=Qa,O.FormContextEdit=el,O.FormDatePicker=b0,O.FormDateTimePicker=_0,O.FormField=Xu,O.FormFilterIn=Qu,O.FormGeometryField=T0,O.FormJsonField=Ru,O.FormRelatedListSelect=w0,O.FormRelatedSelect=S0,O.FormSelect=Zu,O.FormTextField=vo,O.Header=Ku,O.InfiniteScroll=VD,O.InfoContext=Za,O.LazyLoadWrapper=tc,O.Main=v0,O.MantineArrayControlRenderer=ym,O.MantineBooleanCell=Yh,O.MantineBooleanControl=Em,O.MantineBooleanInput=Xl,O.MantineDateCell=Jh,O.MantineDateControl=Am,O.MantineDateInput=Ql,O.MantineDateTimeCell=Zh,O.MantineDateTimeControl=Im,O.MantineDateTimeInput=eu,O.MantineEnumArrayInput=Vh,O.MantineEnumArrayRenderer=Tm,O.MantineEnumCell=Qh,O.MantineEnumControl=$m,O.MantineEnumInput=tu,O.MantineGroupLayoutRenderer=Hm,O.MantineGroupLayoutTester=Gm,O.MantineHorizontalLayoutRenderer=Ym,O.MantineIntegerCell=tp,O.MantineIntegerControl=Fm,O.MantineJsonControl=km,O.MantineJsonInput=Gh,O.MantineLabelRenderer=Vm,O.MantineLabelTester=jm,O.MantineLayoutRenderer=fs,O.MantineNumberCell=rp,O.MantineNumberControl=Lm,O.MantineNumberInput=no,O.MantineObjectControl=Sm,O.MantineObjectControlTester=wm,O.MantineObjectInput=Hh,O.MantineOneOfEnumCell=op,O.MantineOneOfEnumControl=zm,O.MantineOneOfEnumInput=nu,O.MantineTableControl=gm,O.MantineTextCell=ap,O.MantineTextControl=Wm,O.MantineTextInput=ru,O.MantineVerticalLayoutRenderer=Jm,O.NextGenDataGrid=z0,O.NoBorderTableCell=_i,O.NonEmptyRow=pm,O.Pagination=Ju,O.Provider=db,O.QUOTECHAR_DATA=Ya,O.Refresh=oc,O.Row=g0,O.TableToolbar=um,O.Toolbar=ec,O.Upload=sc,O.UserMenu=hk,O.VIEW_MODE=gt,O.ValidationIcon=lm,O.View=rc,O.ViewDialog=x0,O.authInfo=Vf,O.authOAuthSignin=jf,O.authResetPassword=Wf,O.authSignin=zf,O.authSignout=Uf,O.compareStateWithStore=Lf,O.convertId=Et,O.convertInfo=Od,O.convertLocalToUTCISOString=Zl,O.convertToFormInputs=Xm,O.convertUTCISOStringToLocal=Bh,O.createFetchParams=_t,O.createItem=Jf,O.createProxy=jo,O.createQueryParams=Ji,O.deepMerge=xn,O.deleteItem=Rf,O.downloadItems=Zf,O.fromFilterFnToFilter=ac,O.fromFilterToFilterFn=bo,O.getDefaultValues=tl,O.getInfo=Xf,O.getItem=Qf,O.getItems=ed,O.getProps=fr,O.getUser=Gf,O.getValidationSchema=Sl,O.getValue=Hi,O.getValueOrDefault=Ja,O.initialState=Vo,O.isEnumArrayControl=vm,O.isJsonControl=bm,O.isSchemaTypeInclude=ar,O.isTruthy=qi,O.mantineArrayControlTester=mm,O.mantineBooleanCellTester=qh,O.mantineBooleanControlTester=Cm,O.mantineCells=Rm,O.mantineDateCellTester=Kh,O.mantineDateControlTester=xm,O.mantineDateTimeCellTester=Rh,O.mantineDateTimeControlTester=Om,O.mantineEnumArrayRendererTester=_m,O.mantineEnumCellTester=Xh,O.mantineEnumControlTester=Pm,O.mantineHorizontalLayoutTester=qm,O.mantineIntegerCellTester=ep,O.mantineIntegerControlTester=Mm,O.mantineJsonControlTester=Dm,O.mantineNumberCellTester=np,O.mantineNumberControlTester=Nm,O.mantineOneOfEnumCellTester=ip,O.mantineOneOfEnumControlTester=Bm,O.mantineRenderers=Zm,O.mantineTextCellTester=sp,O.mantineTextControlTester=Um,O.mantineVerticalLayoutTester=Km,O.normalProps=Lu,O.normalize=Nf,O.overlayProps=Bu,O.parseFromValuesOrFunc=ct,O.parseValue=Ka,O.postBulk=rd,O.updateItem=td,O.updateUser=Hf,O.uploadItems=nd,O.urlJoin=ot,O.useActionIcon=sr,O.useApi=Oe,O.useAuth=Mr,O.useBooleanProps=fh,O.useBulkActions=hb,O.useCommonProps=In,O.useContextProps=bn,O.useCustomFetch=b1,O.useDateProps=ds,O.useDebouncedChange=pT,O.useForms=zn,O.useInfo=Bf,O.useJsonProps=zh,O.useMultiSelectProps=Uh,O.useNumberProps=Wh,O.useProvideApi=Id,O.useProvideAuth=qf,O.useProvideBulk=Pd,O.useProvideForm=Cl,O.useProvideInfo=Yf,O.useProxy=Yi,O.useSelectProps=hs,O.useTextProps=jh,O.useTrueOnce=zd,Object.defineProperty(O,Symbol.toStringTag,{value:"Module"})});
310
+ `)+te+`return __p
311
+ }`;var Ve=TS(function(){return Qe(x,be+"return "+te).apply(t,A)});if(Ve.source=te,Rg(Ve))throw Ve;return Ve}function VN(i){return et(i).toLowerCase()}function $N(i){return et(i).toUpperCase()}function HN(i,l,d){if(i=et(i),i&&(d||l===t))return Dw(i);if(!i||!(l=gn(l)))return i;var m=Nn(i),w=Nn(l),x=kw(m,w),A=Lw(m,w)+1;return kr(m,x,A).join("")}function jN(i,l,d){if(i=et(i),i&&(d||l===t))return i.slice(0,zw(i)+1);if(!i||!(l=gn(l)))return i;var m=Nn(i),w=Lw(m,Nn(l))+1;return kr(m,0,w).join("")}function qN(i,l,d){if(i=et(i),i&&(d||l===t))return i.replace(vt,"");if(!i||!(l=gn(l)))return i;var m=Nn(i),w=kw(m,Nn(l));return kr(m,w).join("")}function GN(i,l){var d=$,m=H;if(dt(l)){var w="separator"in l?l.separator:w;d="length"in l?ze(l.length):d,m="omission"in l?gn(l.omission):m}i=et(i);var x=i.length;if(Ci(i)){var A=Nn(i);x=A.length}if(d>=x)return i;var N=d-Si(m);if(N<1)return m;var V=A?kr(A,0,N).join(""):i.slice(0,N);if(w===t)return V+m;if(A&&(N+=V.length-N),Bg(w)){if(i.slice(N).search(w)){var J,Y=V;for(w.global||(w=tg(w.source,et(ho.exec(w))+"g")),w.lastIndex=0;J=w.exec(Y);)var te=J.index;V=V.slice(0,te===t?N:te)}}else if(i.indexOf(gn(w),N)!=N){var ae=V.lastIndexOf(w);ae>-1&&(V=V.slice(0,ae))}return V+m}function UN(i){return i=et(i),i&&co.test(i)?i.replace(_i,wP):i}var WN=Ai(function(i,l,d){return i+(d?" ":"")+l.toUpperCase()}),Hg=IC("toUpperCase");function SS(i,l,d){return i=et(i),l=d?t:l,l===t?vP(i)?TP(i):sP(i):i.match(l)||[]}var TS=$e(function(i,l){try{return dn(i,t,l)}catch(d){return Rg(d)?d:new ke(d)}}),KN=ar(function(i,l){return Cn(l,function(d){d=Zn(d),lr(i,d,Ng(i[d],i))}),i});function JN(i){var l=i==null?0:i.length,d=Me();return i=l?ct(i,function(m){if(typeof m[1]!="function")throw new Sn(a);return[d(m[0]),m[1]]}):[],$e(function(m){for(var w=-1;++w<l;){var x=i[w];if(dn(x[0],this,m))return dn(x[1],this,m)}})}function YN(i){return wD(In(i,p))}function jg(i){return function(){return i}}function ZN(i,l){return i==null||i!==i?l:i}var XN=xC(),QN=xC(!0);function an(i){return i}function qg(i){return rC(typeof i=="function"?i:In(i,p))}function ez(i){return oC(In(i,p))}function tz(i,l){return lC(i,In(l,p))}var nz=$e(function(i,l){return function(d){return Io(d,i,l)}}),rz=$e(function(i,l){return function(d){return Io(i,d,l)}});function Gg(i,l,d){var m=Dt(l),w=rs(l,m);d==null&&!(dt(l)&&(w.length||!m.length))&&(d=l,l=i,i=this,w=rs(l,Dt(l)));var x=!(dt(d)&&"chain"in d)||!!d.chain,A=cr(i);return Cn(w,function(N){var V=l[N];i[N]=V,A&&(i.prototype[N]=function(){var J=this.__chain__;if(x||J){var Y=i(this.__wrapped__),te=Y.__actions__=on(this.__actions__);return te.push({func:V,args:arguments,thisArg:i}),Y.__chain__=J,Y}return V.apply(i,Er([this.value()],arguments))})}),i}function iz(){return zt._===this&&(zt._=AP),this}function Ug(){}function oz(i){return i=ze(i),$e(function(l){return sC(l,i)})}var lz=Sg(ct),sz=Sg(Ew),az=Sg(Kf);function IS(i){return Ag(i)?Jf(Zn(i)):RD(i)}function uz(i){return function(l){return i==null?t:Xr(i,l)}}var cz=FC(),dz=FC(!0);function Wg(){return[]}function Kg(){return!1}function fz(){return{}}function gz(){return""}function hz(){return!0}function pz(i,l){if(i=ze(i),i<1||i>le)return[];var d=de,m=jt(i,de);l=Me(l),i-=de;for(var w=Xf(m,l);++d<i;)l(d);return w}function vz(i){return Le(i)?ct(i,Zn):hn(i)?[i]:on(GC(et(i)))}function mz(i){var l=++EP;return et(i)+l}var _z=us(function(i,l){return i+l},0),bz=Tg("ceil"),yz=us(function(i,l){return i/l},1),wz=Tg("floor");function Cz(i){return i&&i.length?ns(i,an,ug):t}function Sz(i,l){return i&&i.length?ns(i,Me(l,2),ug):t}function Tz(i){return Ow(i,an)}function Iz(i,l){return Ow(i,Me(l,2))}function Mz(i){return i&&i.length?ns(i,an,gg):t}function xz(i,l){return i&&i.length?ns(i,Me(l,2),gg):t}var Ez=us(function(i,l){return i*l},1),Fz=Tg("round"),Az=us(function(i,l){return i-l},0);function Oz(i){return i&&i.length?Zf(i,an):0}function Pz(i,l){return i&&i.length?Zf(i,Me(l,2)):0}return M.after=eL,M.ary=nS,M.assign=$L,M.assignIn=vS,M.assignInWith=Cs,M.assignWith=HL,M.at=jL,M.before=rS,M.bind=Ng,M.bindAll=KN,M.bindKey=iS,M.castArray=fL,M.chain=QC,M.chunk=w2,M.compact=C2,M.concat=S2,M.cond=JN,M.conforms=YN,M.constant=jg,M.countBy=Ok,M.create=qL,M.curry=oS,M.curryRight=lS,M.debounce=sS,M.defaults=GL,M.defaultsDeep=UL,M.defer=tL,M.delay=nL,M.difference=T2,M.differenceBy=I2,M.differenceWith=M2,M.drop=x2,M.dropRight=E2,M.dropRightWhile=F2,M.dropWhile=A2,M.fill=O2,M.filter=Dk,M.flatMap=Nk,M.flatMapDeep=zk,M.flatMapDepth=Rk,M.flatten=JC,M.flattenDeep=P2,M.flattenDepth=D2,M.flip=rL,M.flow=XN,M.flowRight=QN,M.fromPairs=k2,M.functions=QL,M.functionsIn=eN,M.groupBy=Bk,M.initial=N2,M.intersection=z2,M.intersectionBy=R2,M.intersectionWith=B2,M.invert=nN,M.invertBy=rN,M.invokeMap=$k,M.iteratee=qg,M.keyBy=Hk,M.keys=Dt,M.keysIn=sn,M.map=vs,M.mapKeys=oN,M.mapValues=lN,M.matches=ez,M.matchesProperty=tz,M.memoize=_s,M.merge=sN,M.mergeWith=mS,M.method=nz,M.methodOf=rz,M.mixin=Gg,M.negate=bs,M.nthArg=oz,M.omit=aN,M.omitBy=uN,M.once=iL,M.orderBy=jk,M.over=lz,M.overArgs=oL,M.overEvery=sz,M.overSome=az,M.partial=zg,M.partialRight=aS,M.partition=qk,M.pick=cN,M.pickBy=_S,M.property=IS,M.propertyOf=uz,M.pull=j2,M.pullAll=ZC,M.pullAllBy=q2,M.pullAllWith=G2,M.pullAt=U2,M.range=cz,M.rangeRight=dz,M.rearg=lL,M.reject=Wk,M.remove=W2,M.rest=sL,M.reverse=kg,M.sampleSize=Jk,M.set=fN,M.setWith=gN,M.shuffle=Yk,M.slice=K2,M.sortBy=Qk,M.sortedUniq=tk,M.sortedUniqBy=nk,M.split=NN,M.spread=aL,M.tail=rk,M.take=ik,M.takeRight=ok,M.takeRightWhile=lk,M.takeWhile=sk,M.tap=Ck,M.throttle=uL,M.thru=ps,M.toArray=gS,M.toPairs=bS,M.toPairsIn=yS,M.toPath=vz,M.toPlainObject=pS,M.transform=hN,M.unary=cL,M.union=ak,M.unionBy=uk,M.unionWith=ck,M.uniq=dk,M.uniqBy=fk,M.uniqWith=gk,M.unset=pN,M.unzip=Lg,M.unzipWith=XC,M.update=vN,M.updateWith=mN,M.values=Di,M.valuesIn=_N,M.without=hk,M.words=SS,M.wrap=dL,M.xor=pk,M.xorBy=vk,M.xorWith=mk,M.zip=_k,M.zipObject=bk,M.zipObjectDeep=yk,M.zipWith=wk,M.entries=bS,M.entriesIn=yS,M.extend=vS,M.extendWith=Cs,Gg(M,M),M.add=_z,M.attempt=TS,M.camelCase=CN,M.capitalize=wS,M.ceil=bz,M.clamp=bN,M.clone=gL,M.cloneDeep=pL,M.cloneDeepWith=vL,M.cloneWith=hL,M.conformsTo=mL,M.deburr=CS,M.defaultTo=ZN,M.divide=yz,M.endsWith=SN,M.eq=Rn,M.escape=TN,M.escapeRegExp=IN,M.every=Pk,M.find=kk,M.findIndex=WC,M.findKey=WL,M.findLast=Lk,M.findLastIndex=KC,M.findLastKey=KL,M.floor=wz,M.forEach=eS,M.forEachRight=tS,M.forIn=JL,M.forInRight=YL,M.forOwn=ZL,M.forOwnRight=XL,M.get=Vg,M.gt=_L,M.gte=bL,M.has=tN,M.hasIn=$g,M.head=YC,M.identity=an,M.includes=Vk,M.indexOf=L2,M.inRange=yN,M.invoke=iN,M.isArguments=ti,M.isArray=Le,M.isArrayBuffer=yL,M.isArrayLike=ln,M.isArrayLikeObject=yt,M.isBoolean=wL,M.isBuffer=Lr,M.isDate=CL,M.isElement=SL,M.isEmpty=TL,M.isEqual=IL,M.isEqualWith=ML,M.isError=Rg,M.isFinite=xL,M.isFunction=cr,M.isInteger=uS,M.isLength=ys,M.isMap=cS,M.isMatch=EL,M.isMatchWith=FL,M.isNaN=AL,M.isNative=OL,M.isNil=DL,M.isNull=PL,M.isNumber=dS,M.isObject=dt,M.isObjectLike=_t,M.isPlainObject=Oo,M.isRegExp=Bg,M.isSafeInteger=kL,M.isSet=fS,M.isString=ws,M.isSymbol=hn,M.isTypedArray=Pi,M.isUndefined=LL,M.isWeakMap=NL,M.isWeakSet=zL,M.join=V2,M.kebabCase=MN,M.last=xn,M.lastIndexOf=$2,M.lowerCase=xN,M.lowerFirst=EN,M.lt=RL,M.lte=BL,M.max=Cz,M.maxBy=Sz,M.mean=Tz,M.meanBy=Iz,M.min=Mz,M.minBy=xz,M.stubArray=Wg,M.stubFalse=Kg,M.stubObject=fz,M.stubString=gz,M.stubTrue=hz,M.multiply=Ez,M.nth=H2,M.noConflict=iz,M.noop=Ug,M.now=ms,M.pad=FN,M.padEnd=AN,M.padStart=ON,M.parseInt=PN,M.random=wN,M.reduce=Gk,M.reduceRight=Uk,M.repeat=DN,M.replace=kN,M.result=dN,M.round=Fz,M.runInContext=B,M.sample=Kk,M.size=Zk,M.snakeCase=LN,M.some=Xk,M.sortedIndex=J2,M.sortedIndexBy=Y2,M.sortedIndexOf=Z2,M.sortedLastIndex=X2,M.sortedLastIndexBy=Q2,M.sortedLastIndexOf=ek,M.startCase=zN,M.startsWith=RN,M.subtract=Az,M.sum=Oz,M.sumBy=Pz,M.template=BN,M.times=pz,M.toFinite=dr,M.toInteger=ze,M.toLength=hS,M.toLower=VN,M.toNumber=En,M.toSafeInteger=VL,M.toString=et,M.toUpper=$N,M.trim=HN,M.trimEnd=jN,M.trimStart=qN,M.truncate=GN,M.unescape=UN,M.uniqueId=mz,M.upperCase=WN,M.upperFirst=Hg,M.each=eS,M.eachRight=tS,M.first=YC,Gg(M,function(){var i={};return Jn(M,function(l,d){nt.call(M.prototype,d)||(i[d]=l)}),i}(),{chain:!1}),M.VERSION=r,Cn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){M[i].placeholder=M}),Cn(["drop","take"],function(i,l){Ke.prototype[i]=function(d){d=d===t?1:Mt(ze(d),0);var m=this.__filtered__&&!l?new Ke(this):this.clone();return m.__filtered__?m.__takeCount__=jt(d,m.__takeCount__):m.__views__.push({size:jt(d,de),type:i+(m.__dir__<0?"Right":"")}),m},Ke.prototype[i+"Right"]=function(d){return this.reverse()[i](d).reverse()}}),Cn(["filter","map","takeWhile"],function(i,l){var d=l+1,m=d==ne||d==q;Ke.prototype[i]=function(w){var x=this.clone();return x.__iteratees__.push({iteratee:Me(w,3),type:d}),x.__filtered__=x.__filtered__||m,x}}),Cn(["head","last"],function(i,l){var d="take"+(l?"Right":"");Ke.prototype[i]=function(){return this[d](1).value()[0]}}),Cn(["initial","tail"],function(i,l){var d="drop"+(l?"":"Right");Ke.prototype[i]=function(){return this.__filtered__?new Ke(this):this[d](1)}}),Ke.prototype.compact=function(){return this.filter(an)},Ke.prototype.find=function(i){return this.filter(i).head()},Ke.prototype.findLast=function(i){return this.reverse().find(i)},Ke.prototype.invokeMap=$e(function(i,l){return typeof i=="function"?new Ke(this):this.map(function(d){return Io(d,i,l)})}),Ke.prototype.reject=function(i){return this.filter(bs(Me(i)))},Ke.prototype.slice=function(i,l){i=ze(i);var d=this;return d.__filtered__&&(i>0||l<0)?new Ke(d):(i<0?d=d.takeRight(-i):i&&(d=d.drop(i)),l!==t&&(l=ze(l),d=l<0?d.dropRight(-l):d.take(l-i)),d)},Ke.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},Ke.prototype.toArray=function(){return this.take(de)},Jn(Ke.prototype,function(i,l){var d=/^(?:filter|find|map|reject)|While$/.test(l),m=/^(?:head|last)$/.test(l),w=M[m?"take"+(l=="last"?"Right":""):l],x=m||/^find/.test(l);w&&(M.prototype[l]=function(){var A=this.__wrapped__,N=m?[1]:arguments,V=A instanceof Ke,J=N[0],Y=V||Le(A),te=function(Ue){var Ye=w.apply(M,Er([Ue],N));return m&&ae?Ye[0]:Ye};Y&&d&&typeof J=="function"&&J.length!=1&&(V=Y=!1);var ae=this.__chain__,be=!!this.__actions__.length,Ee=x&&!ae,Ve=V&&!be;if(!x&&Y){A=Ve?A:new Ke(this);var Fe=i.apply(A,N);return Fe.__actions__.push({func:ps,args:[te],thisArg:t}),new Tn(Fe,ae)}return Ee&&Ve?i.apply(this,N):(Fe=this.thru(te),Ee?m?Fe.value()[0]:Fe.value():Fe)})}),Cn(["pop","push","shift","sort","splice","unshift"],function(i){var l=$l[i],d=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",m=/^(?:pop|shift)$/.test(i);M.prototype[i]=function(){var w=arguments;if(m&&!this.__chain__){var x=this.value();return l.apply(Le(x)?x:[],w)}return this[d](function(A){return l.apply(Le(A)?A:[],w)})}}),Jn(Ke.prototype,function(i,l){var d=M[l];if(d){var m=d.name+"";nt.call(xi,m)||(xi[m]=[]),xi[m].push({name:l,func:d})}}),xi[as(t,T).name]=[{name:"wrapper",func:t}],Ke.prototype.clone=UP,Ke.prototype.reverse=WP,Ke.prototype.value=KP,M.prototype.at=Sk,M.prototype.chain=Tk,M.prototype.commit=Ik,M.prototype.next=Mk,M.prototype.plant=Ek,M.prototype.reverse=Fk,M.prototype.toJSON=M.prototype.valueOf=M.prototype.value=Ak,M.prototype.first=M.prototype.head,_o&&(M.prototype[_o]=xk),M},Ti=IP();Wr?((Wr.exports=Ti)._=Ti,qf._=Ti):zt._=Ti}).call(zI)}(Wi,Wi.exports)),Wi.exports}var BI=RI();function Ov(e){const{renderers:n,cells:t,uischemas:r,schema:o,label:s,path:a,visible:u,enabled:f,uischema:g,rootSchema:h}=e,p=I.useMemo(()=>me.findUISchema(r,o,g.scope,a,()=>BI.isEmpty(a)?me.Generate.uiSchema(o,"VerticalLayout",void 0,h):{...me.Generate.uiSchema(o,"Group",void 0,h),label:s},g,h),[r,o,a,s,g,h]);return u?c.jsx(We.JsonFormsDispatch,{visible:u,enabled:f,schema:o,uischema:p,path:a,renderers:n,cells:t}):null}function hu(e){const n=jn(e),{path:t,data:r,schema:o}=e,s=rl(r,o),a=I.useMemo(()=>{var _;const h=r===null,p=(_=n.error)==null?void 0:_.filter(v=>v.key==="is a required property"||!h?v:!1);return p!=null&&p.length?{error:p}:{error:h&&n.required?"is a required property":void 0}},[n.error,n.required,r]),u=I.useMemo(()=>({...n,...s,...a}),[n,a,s]),[f,g]=On("OneOfEnum",t,u,e);return f===void 0?c.jsx(b.Select,{...g}):f}function pu(e){const n=jn(e),{path:t,data:r,schema:o}=e,s=xv({data:r,onChange:n.onChange}),a=I.useMemo(()=>({...n,...s}),[n,s]),[u,f]=On("Text",t,a,e);return u===void 0?o.format==="password"?c.jsx(b.PasswordInput,{...f}):c.jsx(b.TextInput,{...f}):u}const Pv=me.rankWith(1,me.isBooleanControl),Dv=We.withJsonFormsCellProps(e=>c.jsx(cu,{...e})),kv=me.rankWith(1,me.isDateControl),Lv=We.withJsonFormsCellProps(e=>c.jsx(du,{...e})),Nv=me.rankWith(1,me.isDateTimeControl),zv=We.withJsonFormsControlProps(e=>c.jsx(fu,{...e})),Rv=me.rankWith(2,me.isEnumControl),Bv=We.withJsonFormsEnumProps(We.withTranslateProps(e=>c.jsx(gu,{...e})),!1),Vv=me.rankWith(1,me.isIntegerControl),$v=We.withJsonFormsCellProps(e=>c.jsx(Ui,{...e})),Hv=me.rankWith(1,me.isNumberControl),jv=We.withJsonFormsCellProps(e=>c.jsx(Ui,{...e})),qv=me.rankWith(2,me.isOneOfControl),Gv=We.withJsonFormsOneOfEnumProps(We.withTranslateProps(e=>c.jsx(hu,{...e})),!1),Uv=me.rankWith(1,me.isStringControl),Wv=We.withJsonFormsCellProps(e=>c.jsx(pu,{...e})),Kv=I.memo(function({open:n,onClose:t,onConfirm:r,onCancel:o,title:s,message:a,acceptText:u,declineText:f}){return c.jsxs(b.Modal,{opened:n,withCloseButton:!1,centered:!0,title:s,keepMounted:!0,onClose:t,children:[a,c.jsxs(b.Flex,{justify:"flex-end",align:"center",gap:"sm",children:[c.jsx(b.Button,{onClick:o,children:f}),c.jsx(b.Button,{onClick:r,children:u})]})]})});var vu,Jv;function VI(){if(Jv)return vu;Jv=1;function e(){this.__data__=[],this.size=0}return vu=e,vu}var mu,Yv;function il(){if(Yv)return mu;Yv=1;function e(n,t){return n===t||n!==n&&t!==t}return mu=e,mu}var _u,Zv;function ol(){if(Zv)return _u;Zv=1;var e=il();function n(t,r){for(var o=t.length;o--;)if(e(t[o][0],r))return o;return-1}return _u=n,_u}var bu,Xv;function $I(){if(Xv)return bu;Xv=1;var e=ol(),n=Array.prototype,t=n.splice;function r(o){var s=this.__data__,a=e(s,o);if(a<0)return!1;var u=s.length-1;return a==u?s.pop():t.call(s,a,1),--this.size,!0}return bu=r,bu}var yu,Qv;function HI(){if(Qv)return yu;Qv=1;var e=ol();function n(t){var r=this.__data__,o=e(r,t);return o<0?void 0:r[o][1]}return yu=n,yu}var wu,e0;function jI(){if(e0)return wu;e0=1;var e=ol();function n(t){return e(this.__data__,t)>-1}return wu=n,wu}var Cu,t0;function qI(){if(t0)return Cu;t0=1;var e=ol();function n(t,r){var o=this.__data__,s=e(o,t);return s<0?(++this.size,o.push([t,r])):o[s][1]=r,this}return Cu=n,Cu}var Su,n0;function ll(){if(n0)return Su;n0=1;var e=VI(),n=$I(),t=HI(),r=jI(),o=qI();function s(a){var u=-1,f=a==null?0:a.length;for(this.clear();++u<f;){var g=a[u];this.set(g[0],g[1])}}return s.prototype.clear=e,s.prototype.delete=n,s.prototype.get=t,s.prototype.has=r,s.prototype.set=o,Su=s,Su}var Tu,r0;function GI(){if(r0)return Tu;r0=1;var e=ll();function n(){this.__data__=new e,this.size=0}return Tu=n,Tu}var Iu,i0;function UI(){if(i0)return Iu;i0=1;function e(n){var t=this.__data__,r=t.delete(n);return this.size=t.size,r}return Iu=e,Iu}var Mu,o0;function WI(){if(o0)return Mu;o0=1;function e(n){return this.__data__.get(n)}return Mu=e,Mu}var xu,l0;function KI(){if(l0)return xu;l0=1;function e(n){return this.__data__.has(n)}return xu=e,xu}var Eu,s0;function sl(){if(s0)return Eu;s0=1;var e=$r(),n=e(Object,"create");return Eu=n,Eu}var Fu,a0;function JI(){if(a0)return Fu;a0=1;var e=sl();function n(){this.__data__=e?e(null):{},this.size=0}return Fu=n,Fu}var Au,u0;function YI(){if(u0)return Au;u0=1;function e(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t}return Au=e,Au}var Ou,c0;function ZI(){if(c0)return Ou;c0=1;var e=sl(),n="__lodash_hash_undefined__",t=Object.prototype,r=t.hasOwnProperty;function o(s){var a=this.__data__;if(e){var u=a[s];return u===n?void 0:u}return r.call(a,s)?a[s]:void 0}return Ou=o,Ou}var Pu,d0;function XI(){if(d0)return Pu;d0=1;var e=sl(),n=Object.prototype,t=n.hasOwnProperty;function r(o){var s=this.__data__;return e?s[o]!==void 0:t.call(s,o)}return Pu=r,Pu}var Du,f0;function QI(){if(f0)return Du;f0=1;var e=sl(),n="__lodash_hash_undefined__";function t(r,o){var s=this.__data__;return this.size+=this.has(r)?0:1,s[r]=e&&o===void 0?n:o,this}return Du=t,Du}var ku,g0;function eM(){if(g0)return ku;g0=1;var e=JI(),n=YI(),t=ZI(),r=XI(),o=QI();function s(a){var u=-1,f=a==null?0:a.length;for(this.clear();++u<f;){var g=a[u];this.set(g[0],g[1])}}return s.prototype.clear=e,s.prototype.delete=n,s.prototype.get=t,s.prototype.has=r,s.prototype.set=o,ku=s,ku}var Lu,h0;function tM(){if(h0)return Lu;h0=1;var e=eM(),n=ll(),t=Ua();function r(){this.size=0,this.__data__={hash:new e,map:new(t||n),string:new e}}return Lu=r,Lu}var Nu,p0;function nM(){if(p0)return Nu;p0=1;function e(n){var t=typeof n;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?n!=="__proto__":n===null}return Nu=e,Nu}var zu,v0;function al(){if(v0)return zu;v0=1;var e=nM();function n(t,r){var o=t.__data__;return e(r)?o[typeof r=="string"?"string":"hash"]:o.map}return zu=n,zu}var Ru,m0;function rM(){if(m0)return Ru;m0=1;var e=al();function n(t){var r=e(this,t).delete(t);return this.size-=r?1:0,r}return Ru=n,Ru}var Bu,_0;function iM(){if(_0)return Bu;_0=1;var e=al();function n(t){return e(this,t).get(t)}return Bu=n,Bu}var Vu,b0;function oM(){if(b0)return Vu;b0=1;var e=al();function n(t){return e(this,t).has(t)}return Vu=n,Vu}var $u,y0;function lM(){if(y0)return $u;y0=1;var e=al();function n(t,r){var o=e(this,t),s=o.size;return o.set(t,r),this.size+=o.size==s?0:1,this}return $u=n,$u}var Hu,w0;function C0(){if(w0)return Hu;w0=1;var e=tM(),n=rM(),t=iM(),r=oM(),o=lM();function s(a){var u=-1,f=a==null?0:a.length;for(this.clear();++u<f;){var g=a[u];this.set(g[0],g[1])}}return s.prototype.clear=e,s.prototype.delete=n,s.prototype.get=t,s.prototype.has=r,s.prototype.set=o,Hu=s,Hu}var ju,S0;function sM(){if(S0)return ju;S0=1;var e=ll(),n=Ua(),t=C0(),r=200;function o(s,a){var u=this.__data__;if(u instanceof e){var f=u.__data__;if(!n||f.length<r-1)return f.push([s,a]),this.size=++u.size,this;u=this.__data__=new t(f)}return u.set(s,a),this.size=u.size,this}return ju=o,ju}var qu,T0;function aM(){if(T0)return qu;T0=1;var e=ll(),n=GI(),t=UI(),r=WI(),o=KI(),s=sM();function a(u){var f=this.__data__=new e(u);this.size=f.size}return a.prototype.clear=n,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=o,a.prototype.set=s,qu=a,qu}var Gu,I0;function M0(){if(I0)return Gu;I0=1;var e=$r(),n=function(){try{var t=e(Object,"defineProperty");return t({},"",{}),t}catch{}}();return Gu=n,Gu}var Uu,x0;function Wu(){if(x0)return Uu;x0=1;var e=M0();function n(t,r,o){r=="__proto__"&&e?e(t,r,{configurable:!0,enumerable:!0,value:o,writable:!0}):t[r]=o}return Uu=n,Uu}var Ku,E0;function F0(){if(E0)return Ku;E0=1;var e=Wu(),n=il();function t(r,o,s){(s!==void 0&&!n(r[o],s)||s===void 0&&!(o in r))&&e(r,o,s)}return Ku=t,Ku}var Ju,A0;function uM(){if(A0)return Ju;A0=1;function e(n){return function(t,r,o){for(var s=-1,a=Object(t),u=o(t),f=u.length;f--;){var g=u[n?f:++s];if(r(a[g],g,a)===!1)break}return t}}return Ju=e,Ju}var Yu,O0;function cM(){if(O0)return Yu;O0=1;var e=uM(),n=e();return Yu=n,Yu}var Ki={exports:{}};Ki.exports;var P0;function dM(){return P0||(P0=1,function(e,n){var t=An(),r=n&&!n.nodeType&&n,o=r&&!0&&e&&!e.nodeType&&e,s=o&&o.exports===r,a=s?t.Buffer:void 0,u=a?a.allocUnsafe:void 0;function f(g,h){if(h)return g.slice();var p=g.length,_=u?u(p):new g.constructor(p);return g.copy(_),_}e.exports=f}(Ki,Ki.exports)),Ki.exports}var Zu,D0;function fM(){if(D0)return Zu;D0=1;var e=An(),n=e.Uint8Array;return Zu=n,Zu}var Xu,k0;function gM(){if(k0)return Xu;k0=1;var e=fM();function n(t){var r=new t.constructor(t.byteLength);return new e(r).set(new e(t)),r}return Xu=n,Xu}var Qu,L0;function hM(){if(L0)return Qu;L0=1;var e=gM();function n(t,r){var o=r?e(t.buffer):t.buffer;return new t.constructor(o,t.byteOffset,t.length)}return Qu=n,Qu}var ec,N0;function pM(){if(N0)return ec;N0=1;function e(n,t){var r=-1,o=n.length;for(t||(t=Array(o));++r<o;)t[r]=n[r];return t}return ec=e,ec}var tc,z0;function vM(){if(z0)return tc;z0=1;var e=tr(),n=Object.create,t=function(){function r(){}return function(o){if(!e(o))return{};if(n)return n(o);r.prototype=o;var s=new r;return r.prototype=void 0,s}}();return tc=t,tc}var nc,R0;function B0(){if(R0)return nc;R0=1;var e=Gp(),n=e(Object.getPrototypeOf,Object);return nc=n,nc}var rc,V0;function mM(){if(V0)return rc;V0=1;var e=vM(),n=B0(),t=Xo();function r(o){return typeof o.constructor=="function"&&!t(o)?e(n(o)):{}}return rc=r,rc}var ic,$0;function H0(){if($0)return ic;$0=1;var e=el(),n=ui();function t(r){return n(r)&&e(r)}return ic=t,ic}var oc,j0;function _M(){if(j0)return oc;j0=1;var e=ai(),n=B0(),t=ui(),r="[object Object]",o=Function.prototype,s=Object.prototype,a=o.toString,u=s.hasOwnProperty,f=a.call(Object);function g(h){if(!t(h)||e(h)!=r)return!1;var p=n(h);if(p===null)return!0;var _=u.call(p,"constructor")&&p.constructor;return typeof _=="function"&&_ instanceof _&&a.call(_)==f}return oc=g,oc}var lc,q0;function G0(){if(q0)return lc;q0=1;function e(n,t){if(!(t==="constructor"&&typeof n[t]=="function")&&t!="__proto__")return n[t]}return lc=e,lc}var sc,U0;function bM(){if(U0)return sc;U0=1;var e=Wu(),n=il(),t=Object.prototype,r=t.hasOwnProperty;function o(s,a,u){var f=s[a];(!(r.call(s,a)&&n(f,u))||u===void 0&&!(a in s))&&e(s,a,u)}return sc=o,sc}var ac,W0;function yM(){if(W0)return ac;W0=1;var e=bM(),n=Wu();function t(r,o,s,a){var u=!s;s||(s={});for(var f=-1,g=o.length;++f<g;){var h=o[f],p=a?a(s[h],r[h],h,s,r):void 0;p===void 0&&(p=r[h]),u?n(s,h,p):e(s,h,p)}return s}return ac=t,ac}var uc,K0;function wM(){if(K0)return uc;K0=1;function e(n,t){for(var r=-1,o=Array(n);++r<n;)o[r]=t(r);return o}return uc=e,uc}var cc,J0;function Y0(){if(J0)return cc;J0=1;var e=9007199254740991,n=/^(?:0|[1-9]\d*)$/;function t(r,o){var s=typeof r;return o=o??e,!!o&&(s=="number"||s!="symbol"&&n.test(r))&&r>-1&&r%1==0&&r<o}return cc=t,cc}var dc,Z0;function CM(){if(Z0)return dc;Z0=1;var e=wM(),n=Qo(),t=ji(),r=ru(),o=Y0(),s=su(),a=Object.prototype,u=a.hasOwnProperty;function f(g,h){var p=t(g),_=!p&&n(g),v=!p&&!_&&r(g),y=!p&&!_&&!v&&s(g),C=p||_||v||y,S=C?e(g.length,String):[],T=S.length;for(var E in g)(h||u.call(g,E))&&!(C&&(E=="length"||v&&(E=="offset"||E=="parent")||y&&(E=="buffer"||E=="byteLength"||E=="byteOffset")||o(E,T)))&&S.push(E);return S}return dc=f,dc}var fc,X0;function SM(){if(X0)return fc;X0=1;function e(n){var t=[];if(n!=null)for(var r in Object(n))t.push(r);return t}return fc=e,fc}var gc,Q0;function TM(){if(Q0)return gc;Q0=1;var e=tr(),n=Xo(),t=SM(),r=Object.prototype,o=r.hasOwnProperty;function s(a){if(!e(a))return t(a);var u=n(a),f=[];for(var g in a)g=="constructor"&&(u||!o.call(a,g))||f.push(g);return f}return gc=s,gc}var hc,em;function tm(){if(em)return hc;em=1;var e=CM(),n=TM(),t=el();function r(o){return t(o)?e(o,!0):n(o)}return hc=r,hc}var pc,nm;function IM(){if(nm)return pc;nm=1;var e=yM(),n=tm();function t(r){return e(r,n(r))}return pc=t,pc}var vc,rm;function MM(){if(rm)return vc;rm=1;var e=F0(),n=dM(),t=hM(),r=pM(),o=mM(),s=Qo(),a=ji(),u=H0(),f=ru(),g=za(),h=tr(),p=_M(),_=su(),v=G0(),y=IM();function C(S,T,E,F,L,O,P){var k=v(S,E),z=v(T,E),j=P.get(z);if(j){e(S,E,j);return}var $=O?O(k,z,E+"",S,T,P):void 0,H=$===void 0;if(H){var re=a(z),Z=!re&&f(z),ne=!re&&!Z&&_(z);$=z,re||Z||ne?a(k)?$=k:u(k)?$=r(k):Z?(H=!1,$=n(z,!0)):ne?(H=!1,$=t(z,!0)):$=[]:p(z)||s(z)?($=k,s(k)?$=y(k):(!h(k)||g(k))&&($=o(z))):H=!1}H&&(P.set(z,$),L($,z,F,O,P),P.delete(z)),e(S,E,$)}return vc=C,vc}var mc,im;function xM(){if(im)return mc;im=1;var e=aM(),n=F0(),t=cM(),r=MM(),o=tr(),s=tm(),a=G0();function u(f,g,h,p,_){f!==g&&t(g,function(v,y){if(_||(_=new e),o(v))r(f,g,y,h,u,p,_);else{var C=p?p(a(f,y),v,y+"",f,g,_):void 0;C===void 0&&(C=v),n(f,y,C)}},s)}return mc=u,mc}var _c,om;function lm(){if(om)return _c;om=1;function e(n){return n}return _c=e,_c}var bc,sm;function EM(){if(sm)return bc;sm=1;function e(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}return bc=e,bc}var yc,am;function FM(){if(am)return yc;am=1;var e=EM(),n=Math.max;function t(r,o,s){return o=n(o===void 0?r.length-1:o,0),function(){for(var a=arguments,u=-1,f=n(a.length-o,0),g=Array(f);++u<f;)g[u]=a[o+u];u=-1;for(var h=Array(o+1);++u<o;)h[u]=a[u];return h[o]=s(g),e(r,this,h)}}return yc=t,yc}var wc,um;function AM(){if(um)return wc;um=1;function e(n){return function(){return n}}return wc=e,wc}var Cc,cm;function OM(){if(cm)return Cc;cm=1;var e=AM(),n=M0(),t=lm(),r=n?function(o,s){return n(o,"toString",{configurable:!0,enumerable:!1,value:e(s),writable:!0})}:t;return Cc=r,Cc}var Sc,dm;function PM(){if(dm)return Sc;dm=1;var e=800,n=16,t=Date.now;function r(o){var s=0,a=0;return function(){var u=t(),f=n-(u-a);if(a=u,f>0){if(++s>=e)return arguments[0]}else s=0;return o.apply(void 0,arguments)}}return Sc=r,Sc}var Tc,fm;function DM(){if(fm)return Tc;fm=1;var e=OM(),n=PM(),t=n(e);return Tc=t,Tc}var Ic,gm;function hm(){if(gm)return Ic;gm=1;var e=lm(),n=FM(),t=DM();function r(o,s){return t(n(o,s,e),o+"")}return Ic=r,Ic}var Mc,pm;function vm(){if(pm)return Mc;pm=1;var e=il(),n=el(),t=Y0(),r=tr();function o(s,a,u){if(!r(u))return!1;var f=typeof a;return(f=="number"?n(u)&&t(a,u.length):f=="string"&&a in u)?e(u[a],s):!1}return Mc=o,Mc}var xc,mm;function kM(){if(mm)return xc;mm=1;var e=hm(),n=vm();function t(r){return e(function(o,s){var a=-1,u=s.length,f=u>1?s[u-1]:void 0,g=u>2?s[2]:void 0;for(f=r.length>3&&typeof f=="function"?(u--,f):void 0,g&&n(s[0],s[1],g)&&(f=u<3?void 0:f,u=1),o=Object(o);++a<u;){var h=s[a];h&&r(o,h,a,f)}return o})}return xc=t,xc}var Ec,_m;function LM(){if(_m)return Ec;_m=1;var e=xM(),n=kM(),t=n(function(r,o,s){e(r,o,s)});return Ec=t,Ec}var NM=LM();const zM=Rr(NM);var Fc,bm;function RM(){if(bm)return Fc;bm=1;var e=Math.ceil,n=Math.max;function t(r,o,s,a){for(var u=-1,f=n(e((o-r)/(s||1)),0),g=Array(f);f--;)g[a?f:++u]=r,r+=s;return g}return Fc=t,Fc}var Ac,ym;function BM(){if(ym)return Ac;ym=1;var e=$p(),n=1/0,t=17976931348623157e292;function r(o){if(!o)return o===0?o:0;if(o=e(o),o===n||o===-1/0){var s=o<0?-1:1;return s*t}return o===o?o:0}return Ac=r,Ac}var Oc,wm;function VM(){if(wm)return Oc;wm=1;var e=RM(),n=vm(),t=BM();function r(o){return function(s,a,u){return u&&typeof u!="number"&&n(s,a,u)&&(a=u=void 0),s=t(s),a===void 0?(a=s,s=0):a=t(a),u=u===void 0?s<a?1:-1:t(u),e(s,a,u,o)}}return Oc=r,Oc}var Pc,Cm;function $M(){if(Cm)return Pc;Cm=1;var e=VM(),n=e();return Pc=n,Pc}var HM=$M();const jM=Rr(HM);var Dc,Sm;function qM(){if(Sm)return Dc;Sm=1;function e(n,t,r,o){var s=-1,a=n==null?0:n.length;for(o&&a&&(r=n[++s]);++s<a;)r=t(r,n[s],s,n);return r}return Dc=e,Dc}var kc,Tm;function GM(){if(Tm)return kc;Tm=1;function e(n){return function(t){return n==null?void 0:n[t]}}return kc=e,kc}var Lc,Im;function UM(){if(Im)return Lc;Im=1;var e=GM(),n={À:"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"},t=e(n);return Lc=t,Lc}var Nc,Mm;function WM(){if(Mm)return Nc;Mm=1;function e(n,t){for(var r=-1,o=n==null?0:n.length,s=Array(o);++r<o;)s[r]=t(n[r],r,n);return s}return Nc=e,Nc}var zc,xm;function KM(){if(xm)return zc;xm=1;var e=Zo(),n=WM(),t=ji(),r=Bp(),o=e?e.prototype:void 0,s=o?o.toString:void 0;function a(u){if(typeof u=="string")return u;if(t(u))return n(u,a)+"";if(r(u))return s?s.call(u):"";var f=u+"";return f=="0"&&1/u==-1/0?"-0":f}return zc=a,zc}var Rc,Em;function Bc(){if(Em)return Rc;Em=1;var e=KM();function n(t){return t==null?"":e(t)}return Rc=n,Rc}var Vc,Fm;function JM(){if(Fm)return Vc;Fm=1;var e=UM(),n=Bc(),t=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,r="\\u0300-\\u036f",o="\\ufe20-\\ufe2f",s="\\u20d0-\\u20ff",a=r+o+s,u="["+a+"]",f=RegExp(u,"g");function g(h){return h=n(h),h&&h.replace(t,e).replace(f,"")}return Vc=g,Vc}var $c,Am;function YM(){if(Am)return $c;Am=1;var e=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function n(t){return t.match(e)||[]}return $c=n,$c}var Hc,Om;function ZM(){if(Om)return Hc;Om=1;var e=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function n(t){return e.test(t)}return Hc=n,Hc}var jc,Pm;function XM(){if(Pm)return jc;Pm=1;var e="\\ud800-\\udfff",n="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",o=n+t+r,s="\\u2700-\\u27bf",a="a-z\\xdf-\\xf6\\xf8-\\xff",u="\\xac\\xb1\\xd7\\xf7",f="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",g="\\u2000-\\u206f",h=" \\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",p="A-Z\\xc0-\\xd6\\xd8-\\xde",_="\\ufe0e\\ufe0f",v=u+f+g+h,y="['’]",C="["+v+"]",S="["+o+"]",T="\\d+",E="["+s+"]",F="["+a+"]",L="[^"+e+v+T+s+a+p+"]",O="\\ud83c[\\udffb-\\udfff]",P="(?:"+S+"|"+O+")",k="[^"+e+"]",z="(?:\\ud83c[\\udde6-\\uddff]){2}",j="[\\ud800-\\udbff][\\udc00-\\udfff]",$="["+p+"]",H="\\u200d",re="(?:"+F+"|"+L+")",Z="(?:"+$+"|"+L+")",ne="(?:"+y+"(?:d|ll|m|re|s|t|ve))?",ce="(?:"+y+"(?:D|LL|M|RE|S|T|VE))?",q=P+"?",U="["+_+"]?",le="(?:"+H+"(?:"+[k,z,j].join("|")+")"+U+q+")*",_e="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",he="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",de=U+q+le,Ae="(?:"+[E,z,j].join("|")+")"+de,ue=RegExp([$+"?"+F+"+"+ne+"(?="+[C,$,"$"].join("|")+")",Z+"+"+ce+"(?="+[C,$+re,"$"].join("|")+")",$+"?"+re+"+"+ne,$+"+"+ce,he,_e,T,Ae].join("|"),"g");function pe(K){return K.match(ue)||[]}return jc=pe,jc}var qc,Dm;function QM(){if(Dm)return qc;Dm=1;var e=YM(),n=ZM(),t=Bc(),r=XM();function o(s,a,u){return s=t(s),a=u?void 0:a,a===void 0?n(s)?r(s):e(s):s.match(a)||[]}return qc=o,qc}var Gc,km;function ex(){if(km)return Gc;km=1;var e=qM(),n=JM(),t=QM(),r="['’]",o=RegExp(r,"g");function s(a){return function(u){return e(t(n(u).replace(o,"")),a,"")}}return Gc=s,Gc}var Uc,Lm;function tx(){if(Lm)return Uc;Lm=1;function e(n,t,r){var o=-1,s=n.length;t<0&&(t=-t>s?0:s+t),r=r>s?s:r,r<0&&(r+=s),s=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(s);++o<s;)a[o]=n[o+t];return a}return Uc=e,Uc}var Wc,Nm;function nx(){if(Nm)return Wc;Nm=1;var e=tx();function n(t,r,o){var s=t.length;return o=o===void 0?s:o,!r&&o>=s?t:e(t,r,o)}return Wc=n,Wc}var Kc,zm;function Rm(){if(zm)return Kc;zm=1;var e="\\ud800-\\udfff",n="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",o=n+t+r,s="\\ufe0e\\ufe0f",a="\\u200d",u=RegExp("["+a+e+o+s+"]");function f(g){return u.test(g)}return Kc=f,Kc}var Jc,Bm;function rx(){if(Bm)return Jc;Bm=1;function e(n){return n.split("")}return Jc=e,Jc}var Yc,Vm;function ix(){if(Vm)return Yc;Vm=1;var e="\\ud800-\\udfff",n="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",o=n+t+r,s="\\ufe0e\\ufe0f",a="["+e+"]",u="["+o+"]",f="\\ud83c[\\udffb-\\udfff]",g="(?:"+u+"|"+f+")",h="[^"+e+"]",p="(?:\\ud83c[\\udde6-\\uddff]){2}",_="[\\ud800-\\udbff][\\udc00-\\udfff]",v="\\u200d",y=g+"?",C="["+s+"]?",S="(?:"+v+"(?:"+[h,p,_].join("|")+")"+C+y+")*",T=C+y+S,E="(?:"+[h+u+"?",u,p,_,a].join("|")+")",F=RegExp(f+"(?="+f+")|"+E+T,"g");function L(O){return O.match(F)||[]}return Yc=L,Yc}var Zc,$m;function ox(){if($m)return Zc;$m=1;var e=rx(),n=Rm(),t=ix();function r(o){return n(o)?t(o):e(o)}return Zc=r,Zc}var Xc,Hm;function lx(){if(Hm)return Xc;Hm=1;var e=nx(),n=Rm(),t=ox(),r=Bc();function o(s){return function(a){a=r(a);var u=n(a)?t(a):void 0,f=u?u[0]:a.charAt(0),g=u?e(u,1).join(""):a.slice(1);return f[s]()+g}}return Xc=o,Xc}var Qc,jm;function sx(){if(jm)return Qc;jm=1;var e=lx(),n=e("toUpperCase");return Qc=n,Qc}var ed,qm;function ax(){if(qm)return ed;qm=1;var e=ex(),n=sx(),t=e(function(r,o,s){return r+(s?" ":"")+n(o)});return ed=t,ed}var ux=ax();const cx=Rr(ux);var td,Gm;function dx(){if(Gm)return td;Gm=1;function e(n,t){for(var r=-1,o=t.length,s=n.length;++r<o;)n[s+r]=t[r];return n}return td=e,td}var nd,Um;function fx(){if(Um)return nd;Um=1;var e=Zo(),n=Qo(),t=ji(),r=e?e.isConcatSpreadable:void 0;function o(s){return t(s)||n(s)||!!(r&&s&&s[r])}return nd=o,nd}var rd,Wm;function gx(){if(Wm)return rd;Wm=1;var e=dx(),n=fx();function t(r,o,s,a,u){var f=-1,g=r.length;for(s||(s=n),u||(u=[]);++f<g;){var h=r[f];o>0&&s(h)?o>1?t(h,o-1,s,a,u):e(u,h):a||(u[u.length]=h)}return u}return rd=t,rd}var id,Km;function hx(){if(Km)return id;Km=1;var e="__lodash_hash_undefined__";function n(t){return this.__data__.set(t,e),this}return id=n,id}var od,Jm;function px(){if(Jm)return od;Jm=1;function e(n){return this.__data__.has(n)}return od=e,od}var ld,Ym;function vx(){if(Ym)return ld;Ym=1;var e=C0(),n=hx(),t=px();function r(o){var s=-1,a=o==null?0:o.length;for(this.__data__=new e;++s<a;)this.add(o[s])}return r.prototype.add=r.prototype.push=n,r.prototype.has=t,ld=r,ld}var sd,Zm;function mx(){if(Zm)return sd;Zm=1;function e(n,t,r,o){for(var s=n.length,a=r+(o?1:-1);o?a--:++a<s;)if(t(n[a],a,n))return a;return-1}return sd=e,sd}var ad,Xm;function _x(){if(Xm)return ad;Xm=1;function e(n){return n!==n}return ad=e,ad}var ud,Qm;function bx(){if(Qm)return ud;Qm=1;function e(n,t,r){for(var o=r-1,s=n.length;++o<s;)if(n[o]===t)return o;return-1}return ud=e,ud}var cd,e_;function yx(){if(e_)return cd;e_=1;var e=mx(),n=_x(),t=bx();function r(o,s,a){return s===s?t(o,s,a):e(o,n,a)}return cd=r,cd}var dd,t_;function wx(){if(t_)return dd;t_=1;var e=yx();function n(t,r){var o=t==null?0:t.length;return!!o&&e(t,r,0)>-1}return dd=n,dd}var fd,n_;function Cx(){if(n_)return fd;n_=1;function e(n,t,r){for(var o=-1,s=n==null?0:n.length;++o<s;)if(r(t,n[o]))return!0;return!1}return fd=e,fd}var gd,r_;function Sx(){if(r_)return gd;r_=1;function e(n,t){return n.has(t)}return gd=e,gd}var hd,i_;function Tx(){if(i_)return hd;i_=1;function e(){}return hd=e,hd}var pd,o_;function l_(){if(o_)return pd;o_=1;function e(n){var t=-1,r=Array(n.size);return n.forEach(function(o){r[++t]=o}),r}return pd=e,pd}var vd,s_;function Ix(){if(s_)return vd;s_=1;var e=lv(),n=Tx(),t=l_(),r=1/0,o=e&&1/t(new e([,-0]))[1]==r?function(s){return new e(s)}:n;return vd=o,vd}var md,a_;function Mx(){if(a_)return md;a_=1;var e=vx(),n=wx(),t=Cx(),r=Sx(),o=Ix(),s=l_(),a=200;function u(f,g,h){var p=-1,_=n,v=f.length,y=!0,C=[],S=C;if(h)y=!1,_=t;else if(v>=a){var T=g?null:o(f);if(T)return s(T);y=!1,_=r,S=new e}else S=g?[]:C;e:for(;++p<v;){var E=f[p],F=g?g(E):E;if(E=h||E!==0?E:0,y&&F===F){for(var L=S.length;L--;)if(S[L]===F)continue e;g&&S.push(F),C.push(E)}else _(S,F,h)||(S!==C&&S.push(F),C.push(E))}return C}return md=u,md}var _d,u_;function xx(){if(u_)return _d;u_=1;var e=gx(),n=hm(),t=Mx(),r=H0(),o=n(function(s){return t(e(s,1,r,!0))});return _d=o,_d}var Ex=xx();const Fx=Rr(Ex),ci=({children:e,...n})=>c.jsx(b.Table.Td,{...Vn({style:{alignContent:"start"}},n),children:e}),c_=({errorMessages:e,id:n})=>{const t=(e==null?void 0:e.split(`
312
+ `))||[];return c.jsx(b.Tooltip,{id:n,label:`${t.length} error(s)`,position:"right",children:c.jsx(b.Indicator,{size:"0.85rem",label:t.length,disabled:!e,style:{visibility:e?"visible":"hidden"},children:c.jsx(H1,{})})})},Ax={paddingLeft:0,paddingRight:0},d_=I.memo(function(n){const{numColumns:t,errors:r,label:o,description:s,path:a,addItem:u,schema:f,enabled:g,translations:h,rootSchema:p}=n,_={variant:"transparent",size:"sm",mt:"0.25rem"},v=b.useProps("ActionIcon",_,{});return c.jsxs(b.Table.Tr,{children:[c.jsx(ci,{colSpan:t,children:c.jsxs(b.Stack,{children:[c.jsxs(b.Grid,{justify:"flex-start",align:"center",gutter:"sm",children:[c.jsx(b.Grid.Col,{span:"content",children:c.jsx(b.Text,{children:o})}),c.jsx(b.Grid.Col,{span:"content",children:c.jsx(c_,{id:"tooltip-validation",errorMessages:r})})]}),s&&c.jsx(b.Text,{size:"sm",children:s})]})}),g?c.jsx(ci,{align:"right",style:Ax,children:c.jsx(b.ActionIcon,{id:"tooltip-add",title:h.addTooltip,onClick:u(a,me.createDefaultValue(f,p)),...v,children:c.jsx(na,{})})}):null]})}),f_={fixedCell:{width:"150px",height:"50px",paddingLeft:0,paddingRight:0,textAlign:"center"},fixedCellSmall:{width:"50px",height:"50px",paddingLeft:0,paddingRight:0,textAlign:"center"}},g_=(e,n,t,r,o)=>{if(n.type==="object")return h_(n).map(s=>{var f,g;const a=me.Paths.compose(t,s),u={propName:s,schema:n,title:((g=(f=n.properties)==null?void 0:f[s])==null?void 0:g.title)??cx(s),rowPath:t,cellPath:a,enabled:r,cells:o};return c.jsx(e,{...u},a)});{const s={schema:n,rowPath:t,cellPath:t,enabled:r};return c.jsx(e,{...s},t)}},h_=e=>e.type==="object"&&typeof e.properties=="object"?Object.keys(e.properties).filter(n=>e.properties[n].type!=="array"):[""],Ox=({numColumns:e,translations:n})=>c.jsx(b.Table.Tr,{children:c.jsx(ci,{colSpan:e,children:c.jsx(b.Text,{align:"center",children:n.noDataMessage})})}),Px=I.memo(function({title:n}){return c.jsx(b.Table.Th,{children:n})}),Dx=(e,n)=>{const t=n.rowPath+(n.schema.type==="object"?"."+n.propName:""),r=me.formatErrorMessage(Fx(me.errorsAt(t,n.schema,o=>o===t)(e.core.errors).map(o=>o.message)));return{rowPath:n.rowPath,propName:n.propName,schema:n.schema,rootSchema:e.core.schema,errors:r,path:t,enabled:n.enabled,cells:n.cells||e.cells,renderers:n.renderers||e.renderers}},p_=e=>({type:"Control",scope:e,label:!1}),kx=I.memo(function({path:n,propName:t,schema:r,rootSchema:o,errors:s,enabled:a,renderers:u,cells:f,isValid:g}){return c.jsxs(ci,{children:[r.properties?c.jsx(We.DispatchCell,{schema:me.Resolve.schema(r,`#/properties/${me.encode(t)}`,o),uischema:p_(`#/properties/${me.encode(t)}`),path:n,enabled:a,renderers:u,cells:f}):c.jsx(We.DispatchCell,{schema:r,uischema:p_("#"),path:n,enabled:a,renderers:u,cells:f}),c.jsx(b.Text,{size:"xs",children:g?"":s})]})}),Lx=e=>{const n=We.useJsonForms(),t=Dx(n,e),r=Cv(t.errors);return c.jsx(kx,{...t,isValid:r})},Nx=e=>{const{childPath:n,schema:t,rowIndex:r,openDeleteDialog:o,moveUpCreator:s,moveDownCreator:a,enableUp:u,enableDown:f,showSortButtons:g,enabled:h,cells:p,path:_,translations:v}=e,y={variant:"transparent",size:"sm",mt:"0.25rem"},C=b.useProps("ActionIcon",y,{}),S=I.useMemo(()=>s(_,r),[s,_,r]),T=I.useMemo(()=>a(_,r),[a,_,r]);return c.jsxs(b.Table.Tr,{children:[g_(Lx,t,n,h,p),h?c.jsx(ci,{style:g?f_.fixedCell:f_.fixedCellSmall,children:c.jsxs(b.Grid,{justify:"flex-end",align:"center",children:[g?c.jsxs(I.Fragment,{children:[c.jsx(b.Grid.Col,{span:"content",children:c.jsx(b.ActionIcon,{title:v.up,"aria-label":v.upAriaLabel,onClick:S,disabled:!u,...C,children:c.jsx(S1,{})})}),c.jsx(b.Grid.Col,{span:"content",children:c.jsx(b.ActionIcon,{title:v.down,"aria-label":v.downAriaLabel,onClick:T,disabled:!f,...C,children:c.jsx(C1,{})})})]}):null,c.jsx(b.Grid.Col,{span:"content",children:c.jsx(b.ActionIcon,{id:"tooltip-remove",title:v.removeTooltip,"aria-label":v.removeAriaLabel,onClick:()=>o(n,r),...C,children:c.jsx(ra,{})})})]})}):null]},n)},v_=I.memo(Nx),zx=e=>{const{data:n,path:t,schema:r,openDeleteDialog:o,moveUp:s,moveDown:a,uischema:u,config:f,enabled:g,cells:h,translations:p}=e;if(n===0)return c.jsx(Ox,{numColumns:h_(r).length+1,translations:p});const v=zM({},f,u.options);return c.jsx(I.Fragment,{children:jM(n).map(y=>{const C=me.Paths.compose(t,`${y}`);return c.jsx(v_,{childPath:C,rowIndex:y,schema:r,openDeleteDialog:o,moveUpCreator:s,moveDownCreator:a,enableUp:y!==0,enableDown:y!==n-1,showSortButtons:v.showSortButtons||v.showArrayTableSortButtons,enabled:g,cells:h,path:t,translations:p},C)})})};class m_ extends I.Component{constructor(){super(...arguments);xS(this,"addItem",(t,r)=>this.props.addItem(t,r))}render(){const{label:t,description:r,path:o,schema:s,rootSchema:a,uischema:u,errors:f,openDeleteDialog:g,visible:h,enabled:p,cells:_,translations:v}=this.props,y=u,C=s.type==="object",S=C?g_(Px,s,o,p,_):void 0;return h?c.jsxs(b.Table,{children:[c.jsxs(b.Table.Thead,{children:[c.jsx(d_,{errors:f,label:t,description:r,addItem:this.addItem,numColumns:C?S.length:1,path:o,uischema:y,schema:s,rootSchema:a,enabled:p,translations:v}),C&&c.jsxs(b.Table.Tr,{children:[S,p?c.jsx(b.Table.Th,{}):null]})]}),c.jsx(b.Table.Tbody,{children:c.jsx(zx,{openDeleteDialog:g,translations:v,...this.props})})]}):null}}const Rx=e=>{const[n,t]=I.useState(!1),[r,o]=I.useState(void 0),[s,a]=I.useState(void 0),{removeItems:u,visible:f}=e,g=I.useCallback((v,y)=>{t(!0),o(v),a(y)},[t,o,a]),h=I.useCallback(()=>t(!1),[t]),p=I.useCallback(()=>{const v=r.substring(0,r.lastIndexOf("."));u(v,[s])(),t(!1)},[r,u,s]),_=I.useCallback(()=>t(!1),[t]);return f?c.jsxs(c.Fragment,{children:[c.jsx(m_,{...e,openDeleteDialog:g}),c.jsx(Kv,{open:n,onCancel:h,onConfirm:p,onClose:_,acceptText:e.translations.deleteDialogAccept,declineText:e.translations.deleteDialogDecline,title:e.translations.deleteDialogTitle,message:e.translations.deleteDialogMessage})]}):null},__=me.rankWith(1,me.or(me.isObjectArrayControl,me.isPrimitiveArrayControl)),b_=We.withJsonFormsArrayLayoutProps(We.withTranslateProps(We.withArrayTranslationProps(Rx))),Bx=e=>e.oneOf!==void 0&&e.oneOf.length>0&&e.oneOf.every(n=>n.const!==void 0),Vx=e=>e.type==="string"&&e.enum!==void 0;function y_(e,n){if(!e.scope||e.type!=="Control")return!1;const t=me.resolveSchema(n,e.scope);return!!(_r(t.type,"array")&&!Array.isArray(t.items)&&t.uniqueItems===!0&&(Bx(t.items)||Vx(t.items)))}function w_(e,n){if(!e.scope||e.type!=="Control")return!1;const t=me.resolveSchema(n,e.scope);return!!(_r(t.type,"object")&&!t.properties)}const C_=me.rankWith(1,y_),S_=We.withJsonFormsMultiEnumProps(e=>c.jsx(Ev,{...e})),T_=me.rankWith(1,me.isObjectControl),I_=We.withJsonFormsDetailProps(e=>c.jsx(Ov,{...e})),M_=me.rankWith(1,me.isBooleanControl),x_=We.withJsonFormsControlProps(e=>c.jsx(cu,{...e})),E_=me.rankWith(1,me.isDateControl),F_=We.withJsonFormsControlProps(e=>c.jsx(du,{...e})),A_=me.rankWith(1,me.isDateTimeControl),O_=We.withJsonFormsControlProps(e=>c.jsx(fu,{...e})),P_=me.rankWith(2,me.isEnumControl),D_=We.withJsonFormsEnumProps(We.withTranslateProps(e=>c.jsx(gu,{...e})),!1),k_=me.rankWith(1,me.isIntegerControl),L_=We.withJsonFormsControlProps(e=>c.jsx(Ui,{...e})),N_=me.rankWith(2,w_),z_=We.withJsonFormsControlProps(e=>c.jsx(Fv,{...e})),R_=me.rankWith(1,me.isNumberControl),B_=We.withJsonFormsControlProps(e=>c.jsx(Ui,{...e})),V_=me.rankWith(2,me.isOneOfControl),$_=We.withJsonFormsOneOfEnumProps(We.withTranslateProps(e=>c.jsx(hu,{...e})),!1),H_=me.rankWith(1,me.isStringControl),j_=We.withJsonFormsControlProps(e=>c.jsx(pu,{...e})),$x=e=>{const{text:n,visible:t}=e;return t?c.jsx(b.Title,{fw:"bold",size:"xl",children:n}):null},q_=me.rankWith(1,me.isLabelable),G_=We.withJsonFormsLabelProps($x),Hx=({uischema:e,schema:n,path:t,enabled:r,renderers:o,cells:s,label:a})=>{const f={elements:e.elements,schema:n,path:t,enabled:r,direction:"column"};return c.jsx(b.Fieldset,{legend:a,children:c.jsx(tl,{...f,renderers:o,cells:s})})},U_=me.rankWith(1,me.uiTypeIs("Group")),W_=We.withJsonFormsLayoutProps(Hx),jx=({uischema:e,renderers:n,cells:t,schema:r,path:o,enabled:s})=>{const u={elements:e.elements,schema:r,path:o,enabled:s,direction:"row"};return c.jsx(tl,{...u,renderers:n,cells:t})},K_=me.rankWith(1,me.uiTypeIs("HorizontalLayout")),J_=We.withJsonFormsLayoutProps(jx),qx=({uischema:e,schema:n,path:t,enabled:r,renderers:o,cells:s})=>{const u={elements:e.elements,schema:n,path:t,enabled:r,direction:"column"};return c.jsx(tl,{...u,renderers:o,cells:s})},Y_=me.rankWith(1,me.uiTypeIs("VerticalLayout")),Z_=We.withJsonFormsLayoutProps(qx),X_=[{tester:Uv,cell:Wv},{tester:Hv,cell:jv},{tester:Vv,cell:$v},{tester:Pv,cell:Dv},{tester:kv,cell:Lv},{tester:Nv,cell:zv},{tester:Rv,cell:Bv},{tester:qv,cell:Gv}],Q_=[{tester:E_,renderer:F_},{tester:A_,renderer:O_},{tester:R_,renderer:B_},{tester:k_,renderer:L_},{tester:H_,renderer:j_},{tester:M_,renderer:x_},{tester:P_,renderer:D_},{tester:V_,renderer:$_},{tester:N_,renderer:z_},{tester:__,renderer:b_},{tester:C_,renderer:S_},{tester:T_,renderer:I_},{tester:K_,renderer:J_},{tester:Y_,renderer:Z_},{tester:U_,renderer:W_},{tester:q_,renderer:G_}];function bd({schema:e,uischema:n,state:t,setState:r,view:o,setView:s,jsonForms:a,onSubmit:u,buttonText:f,buttonLoading:g,...h}){const p=I.useMemo(()=>b.createTheme({components:{...Object.entries(a||{}).reduce((_,[v,y])=>(_[v]||(_[v]={defaultProps:{}}),_[v].defaultProps=y,_),{})}}),[a]);return c.jsx(b.Modal,{size:"lg",centered:!0,fullScreen:o===St.FULL_SCREEN,radius:o!==St.NORMAL?0:void 0,transitionProps:o!==St.NORMAL?{transition:"fade",duration:200}:void 0,...h,title:c.jsxs(c.Fragment,{children:[h.title,c.jsx(b.Group,{children:c.jsxs(b.Group,{gap:"xs",pr:"xs",children:[c.jsx(b.CloseButton,{onClick:()=>s(o!==St.OVERLAY?St.OVERLAY:St.NORMAL),title:o!==St.OVERLAY?"Overlay":"Exit overlay",icon:c.jsx(ma,{icon:o!==St.OVERLAY?"tabler:stack-forward":"tabler:stack",fontSize:"1.25rem"})}),c.jsx(b.CloseButton,{onClick:()=>s(o!==St.FULL_SCREEN?St.FULL_SCREEN:St.NORMAL),title:o!==St.FULL_SCREEN?"Full screen":"Exit full screen",icon:c.jsx(ma,{icon:o!==St.FULL_SCREEN?"tabler:maximize":"tabler:minimize",fontSize:"1.25rem"})})]})})]}),classNames:{content:"mrt-table-container"},styles:Vn(h.styles,{title:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between"}}),children:c.jsxs(b.Box,{component:"form",pos:"relative",onSubmit:u,children:[c.jsx(b.MantineThemeProvider,{inherit:!0,theme:p,children:e&&c.jsx(We.JsonForms,{schema:e,uischema:n??void 0,renderers:Q_,cells:X_,data:t.data,onChange:r})}),c.jsx(b.Group,{justify:"end",mt:"xl",children:c.jsx(b.Button,{type:"submit",loading:g,children:f})})]})})}const yd={styles:{content:{height:450}}},wd={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 eb(e,n){const t={};return Object.entries(n.properties||{}).forEach(([r,o])=>{var u,f;const s=o.items?o.items:o,a=s.oneOf?s.oneOf.map(g=>({value:g.const,label:g.title})):s.enum;if(a){const g=a.map(h=>h.value);if(_r(o.type,"array")){const h=((u=e[r])==null?void 0:u.map(p=>p.id_||p))||[];t[r]=g.filter(p=>h.includes(p))}else t[r]=g.find(h=>{var p;return h===(((p=e[r])==null?void 0:p.id_)||e[r])})}else t[r]=(((f=e[r])==null?void 0:f.id_)||e[r])??void 0}),t}function Cd({jsonForms:e,...n}){const{info:t,refetch:r,refetchInfo:o,updateEntry:s}=He(),{opened:a,setOpened:u,item:f,state:g,setState:h,reset:p,view:_,setView:v}=Qn("edit"),[y,C]=je.useDebouncedState(!1,Nr),{jsonForms:S}=b.useProps("EditDialog",{},{}),T=I.useMemo(()=>Vn({__:{setNull:!0}},S,e),[S,e]),E=I.useCallback(L=>{L==null||L.preventDefault(),C(!0),s(f==null?void 0:f.id,g.data).then(O=>{O&&(r(),o())}).catch(()=>{}).finally(()=>{C(!1),u(!1)})},[C,s,f==null?void 0:f.id,g.data,r,o,u]),F=I.useMemo(()=>({...Lo,data:eb((f==null?void 0:f.result)||{},t.edit_schema)}),[t.edit_schema,f==null?void 0:f.result]);return I.useEffect(()=>{h({data:F.data})},[F,h]),c.jsx(bd,{schema:t.edit_schema,uischema:t.edit_uischema,state:g,setState:h,view:_,setView:v,jsonForms:T,onSubmit:E,buttonText:"Edit",buttonLoading:y,opened:a,onClose:()=>u(!1),onExitTransitionEnd:p,..._===St.OVERLAY?wd:{},..._===St.NORMAL?yd:{},...n,title:n.title??(t==null?void 0:t.edit_title)})}function Sd(){const{error:e,resetError:n}=He();return c.jsx(b.Modal,{opened:e,onClose:n,title:c.jsxs(b.Group,{children:[c.jsx(b1,{size:16,color:"red"}),c.jsx(b.Text,{children:e?e.message:"Error"})]}),centered:!0,children:e?c.jsx(b.Text,{children:e.originalError.detail||e.originalError.message}):null})}/*! @license DOMPurify 3.2.5 | (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.5/LICENSE */const{entries:tb,setPrototypeOf:nb,isFrozen:Gx,getPrototypeOf:Ux,getOwnPropertyDescriptor:Wx}=Object;let{freeze:Gt,seal:mn,create:rb}=Object,{apply:Td,construct:Id}=typeof Reflect<"u"&&Reflect;Gt||(Gt=function(n){return n}),mn||(mn=function(n){return n}),Td||(Td=function(n,t,r){return n.apply(t,r)}),Id||(Id=function(n,t){return new n(...t)});const ul=Wt(Array.prototype.forEach),Kx=Wt(Array.prototype.lastIndexOf),ib=Wt(Array.prototype.pop),Ji=Wt(Array.prototype.push),Jx=Wt(Array.prototype.splice),cl=Wt(String.prototype.toLowerCase),Md=Wt(String.prototype.toString),ob=Wt(String.prototype.match),Yi=Wt(String.prototype.replace),Yx=Wt(String.prototype.indexOf),Zx=Wt(String.prototype.trim),Pn=Wt(Object.prototype.hasOwnProperty),Ut=Wt(RegExp.prototype.test),Zi=Xx(TypeError);function Wt(e){return function(n){n instanceof RegExp&&(n.lastIndex=0);for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];return Td(e,n,r)}}function Xx(e){return function(){for(var n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];return Id(e,t)}}function qe(e,n){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:cl;nb&&nb(e,null);let r=n.length;for(;r--;){let o=n[r];if(typeof o=="string"){const s=t(o);s!==o&&(Gx(n)||(n[r]=s),o=s)}e[o]=!0}return e}function Qx(e){for(let n=0;n<e.length;n++)Pn(e,n)||(e[n]=null);return e}function Hr(e){const n=rb(null);for(const[t,r]of tb(e))Pn(e,t)&&(Array.isArray(r)?n[t]=Qx(r):r&&typeof r=="object"&&r.constructor===Object?n[t]=Hr(r):n[t]=r);return n}function Xi(e,n){for(;e!==null;){const r=Wx(e,n);if(r){if(r.get)return Wt(r.get);if(typeof r.value=="function")return Wt(r.value)}e=Ux(e)}function t(){return null}return t}const lb=Gt(["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"]),xd=Gt(["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"]),Ed=Gt(["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"]),eE=Gt(["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"]),Fd=Gt(["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"]),tE=Gt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),sb=Gt(["#text"]),ab=Gt(["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"]),Ad=Gt(["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"]),ub=Gt(["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"]),dl=Gt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),nE=mn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),rE=mn(/<%[\w\W]*|[\w\W]*%>/gm),iE=mn(/\$\{[\w\W]*/gm),oE=mn(/^data-[\-\w.\u00B7-\uFFFF]+$/),lE=mn(/^aria-[\-\w]+$/),cb=mn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),sE=mn(/^(?:\w+script|data):/i),aE=mn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),db=mn(/^html$/i),uE=mn(/^[a-z][.\w]*(-[.\w]+)+$/i);var fb=Object.freeze({__proto__:null,ARIA_ATTR:lE,ATTR_WHITESPACE:aE,CUSTOM_ELEMENT:uE,DATA_ATTR:oE,DOCTYPE_NAME:db,ERB_EXPR:rE,IS_ALLOWED_URI:cb,IS_SCRIPT_OR_DATA:sE,MUSTACHE_EXPR:nE,TMPLIT_EXPR:iE});const Qi={element:1,text:3,progressingInstruction:7,comment:8,document:9},cE=function(){return typeof window>"u"?null:window},dE=function(n,t){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let r=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(r=t.getAttribute(o));const s="dompurify"+(r?"#"+r:"");try{return n.createPolicy(s,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},gb=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function hb(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:cE();const n=ye=>hb(ye);if(n.version="3.2.5",n.removed=[],!e||!e.document||e.document.nodeType!==Qi.document||!e.Element)return n.isSupported=!1,n;let{document:t}=e;const r=t,o=r.currentScript,{DocumentFragment:s,HTMLTemplateElement:a,Node:u,Element:f,NodeFilter:g,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:p,DOMParser:_,trustedTypes:v}=e,y=f.prototype,C=Xi(y,"cloneNode"),S=Xi(y,"remove"),T=Xi(y,"nextSibling"),E=Xi(y,"childNodes"),F=Xi(y,"parentNode");if(typeof a=="function"){const ye=t.createElement("template");ye.content&&ye.content.ownerDocument&&(t=ye.content.ownerDocument)}let L,O="";const{implementation:P,createNodeIterator:k,createDocumentFragment:z,getElementsByTagName:j}=t,{importNode:$}=r;let H=gb();n.isSupported=typeof tb=="function"&&typeof F=="function"&&P&&P.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:re,ERB_EXPR:Z,TMPLIT_EXPR:ne,DATA_ATTR:ce,ARIA_ATTR:q,IS_SCRIPT_OR_DATA:U,ATTR_WHITESPACE:le,CUSTOM_ELEMENT:_e}=fb;let{IS_ALLOWED_URI:he}=fb,de=null;const Ae=qe({},[...lb,...xd,...Ed,...Fd,...sb]);let ue=null;const pe=qe({},[...ab,...Ad,...ub,...dl]);let K=Object.seal(rb(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}})),ee=null,oe=null,xe=!0,X=!0,Ne=!1,Je=!0,Ge=!1,st=!0,Re=!1,De=!1,Pe=!1,Oe=!1,Q=!1,Be=!1,rt=!0,Ze=!1;const Nt="user-content-";let Ct=!0,ot=!1,Ft={},Jt=null;const $t=qe({},["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 Tt=null;const cn=qe({},["audio","video","img","source","image","track"]);let Xe=null;const gt=qe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),At="http://www.w3.org/1998/Math/MathML",Yt="http://www.w3.org/2000/svg",Zt="http://www.w3.org/1999/xhtml";let bn=Zt,nr=!1,rr=null;const uo=qe({},[At,Yt,Zt],Md);let Sr=qe({},["mi","mo","mn","ms","mtext"]),Tr=qe({},["annotation-xml"]);const _i=qe({},["title","style","font","a","script"]);let Wn=null;const co=["application/xhtml+xml","text/html"],fo="text/html";let ht=null,Kn=null;const bi=t.createElement("form"),we=function(R){return R instanceof RegExp||R instanceof Function},Ir=function(){let R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Kn&&Kn===R)){if((!R||typeof R!="object")&&(R={}),R=Hr(R),Wn=co.indexOf(R.PARSER_MEDIA_TYPE)===-1?fo:R.PARSER_MEDIA_TYPE,ht=Wn==="application/xhtml+xml"?Md:cl,de=Pn(R,"ALLOWED_TAGS")?qe({},R.ALLOWED_TAGS,ht):Ae,ue=Pn(R,"ALLOWED_ATTR")?qe({},R.ALLOWED_ATTR,ht):pe,rr=Pn(R,"ALLOWED_NAMESPACES")?qe({},R.ALLOWED_NAMESPACES,Md):uo,Xe=Pn(R,"ADD_URI_SAFE_ATTR")?qe(Hr(gt),R.ADD_URI_SAFE_ATTR,ht):gt,Tt=Pn(R,"ADD_DATA_URI_TAGS")?qe(Hr(cn),R.ADD_DATA_URI_TAGS,ht):cn,Jt=Pn(R,"FORBID_CONTENTS")?qe({},R.FORBID_CONTENTS,ht):$t,ee=Pn(R,"FORBID_TAGS")?qe({},R.FORBID_TAGS,ht):{},oe=Pn(R,"FORBID_ATTR")?qe({},R.FORBID_ATTR,ht):{},Ft=Pn(R,"USE_PROFILES")?R.USE_PROFILES:!1,xe=R.ALLOW_ARIA_ATTR!==!1,X=R.ALLOW_DATA_ATTR!==!1,Ne=R.ALLOW_UNKNOWN_PROTOCOLS||!1,Je=R.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ge=R.SAFE_FOR_TEMPLATES||!1,st=R.SAFE_FOR_XML!==!1,Re=R.WHOLE_DOCUMENT||!1,Oe=R.RETURN_DOM||!1,Q=R.RETURN_DOM_FRAGMENT||!1,Be=R.RETURN_TRUSTED_TYPE||!1,Pe=R.FORCE_BODY||!1,rt=R.SANITIZE_DOM!==!1,Ze=R.SANITIZE_NAMED_PROPS||!1,Ct=R.KEEP_CONTENT!==!1,ot=R.IN_PLACE||!1,he=R.ALLOWED_URI_REGEXP||cb,bn=R.NAMESPACE||Zt,Sr=R.MATHML_TEXT_INTEGRATION_POINTS||Sr,Tr=R.HTML_INTEGRATION_POINTS||Tr,K=R.CUSTOM_ELEMENT_HANDLING||{},R.CUSTOM_ELEMENT_HANDLING&&we(R.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(K.tagNameCheck=R.CUSTOM_ELEMENT_HANDLING.tagNameCheck),R.CUSTOM_ELEMENT_HANDLING&&we(R.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(K.attributeNameCheck=R.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),R.CUSTOM_ELEMENT_HANDLING&&typeof R.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(K.allowCustomizedBuiltInElements=R.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ge&&(X=!1),Q&&(Oe=!0),Ft&&(de=qe({},sb),ue=[],Ft.html===!0&&(qe(de,lb),qe(ue,ab)),Ft.svg===!0&&(qe(de,xd),qe(ue,Ad),qe(ue,dl)),Ft.svgFilters===!0&&(qe(de,Ed),qe(ue,Ad),qe(ue,dl)),Ft.mathMl===!0&&(qe(de,Fd),qe(ue,ub),qe(ue,dl))),R.ADD_TAGS&&(de===Ae&&(de=Hr(de)),qe(de,R.ADD_TAGS,ht)),R.ADD_ATTR&&(ue===pe&&(ue=Hr(ue)),qe(ue,R.ADD_ATTR,ht)),R.ADD_URI_SAFE_ATTR&&qe(Xe,R.ADD_URI_SAFE_ATTR,ht),R.FORBID_CONTENTS&&(Jt===$t&&(Jt=Hr(Jt)),qe(Jt,R.FORBID_CONTENTS,ht)),Ct&&(de["#text"]=!0),Re&&qe(de,["html","head","body"]),de.table&&(qe(de,["tbody"]),delete ee.tbody),R.TRUSTED_TYPES_POLICY){if(typeof R.TRUSTED_TYPES_POLICY.createHTML!="function")throw Zi('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof R.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Zi('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');L=R.TRUSTED_TYPES_POLICY,O=L.createHTML("")}else L===void 0&&(L=dE(v,o)),L!==null&&typeof O=="string"&&(O=L.createHTML(""));Gt&&Gt(R),Kn=R}},ut=qe({},[...xd,...Ed,...eE]),pt=qe({},[...Fd,...tE]),Xt=function(R){let ie=F(R);(!ie||!ie.tagName)&&(ie={namespaceURI:bn,tagName:"template"});const ve=cl(R.tagName),tt=cl(ie.tagName);return rr[R.namespaceURI]?R.namespaceURI===Yt?ie.namespaceURI===Zt?ve==="svg":ie.namespaceURI===At?ve==="svg"&&(tt==="annotation-xml"||Sr[tt]):!!ut[ve]:R.namespaceURI===At?ie.namespaceURI===Zt?ve==="math":ie.namespaceURI===Yt?ve==="math"&&Tr[tt]:!!pt[ve]:R.namespaceURI===Zt?ie.namespaceURI===Yt&&!Tr[tt]||ie.namespaceURI===At&&!Sr[tt]?!1:!pt[ve]&&(_i[ve]||!ut[ve]):!!(Wn==="application/xhtml+xml"&&rr[R.namespaceURI]):!1},vt=function(R){Ji(n.removed,{element:R});try{F(R).removeChild(R)}catch{S(R)}},Qt=function(R,ie){try{Ji(n.removed,{attribute:ie.getAttributeNode(R),from:ie})}catch{Ji(n.removed,{attribute:null,from:ie})}if(ie.removeAttribute(R),R==="is")if(Oe||Q)try{vt(ie)}catch{}else try{ie.setAttribute(R,"")}catch{}},Mr=function(R){let ie=null,ve=null;if(Pe)R="<remove></remove>"+R;else{const mt=ob(R,/^[\r\n\t ]+/);ve=mt&&mt[0]}Wn==="application/xhtml+xml"&&bn===Zt&&(R='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+R+"</body></html>");const tt=L?L.createHTML(R):R;if(bn===Zt)try{ie=new _().parseFromString(tt,Wn)}catch{}if(!ie||!ie.documentElement){ie=P.createDocument(bn,"template",null);try{ie.documentElement.innerHTML=nr?O:tt}catch{}}const Ot=ie.body||ie.documentElement;return R&&ve&&Ot.insertBefore(t.createTextNode(ve),Ot.childNodes[0]||null),bn===Zt?j.call(ie,Re?"html":"body")[0]:Re?ie.documentElement:Ot},Pl=function(R){return k.call(R.ownerDocument||R,R,g.SHOW_ELEMENT|g.SHOW_COMMENT|g.SHOW_TEXT|g.SHOW_PROCESSING_INSTRUCTION|g.SHOW_CDATA_SECTION,null)},go=function(R){return R instanceof p&&(typeof R.nodeName!="string"||typeof R.textContent!="string"||typeof R.removeChild!="function"||!(R.attributes instanceof h)||typeof R.removeAttribute!="function"||typeof R.setAttribute!="function"||typeof R.namespaceURI!="string"||typeof R.insertBefore!="function"||typeof R.hasChildNodes!="function")},Dl=function(R){return typeof u=="function"&&R instanceof u};function Ln(ye,R,ie){ul(ye,ve=>{ve.call(n,R,ie,Kn)})}const kl=function(R){let ie=null;if(Ln(H.beforeSanitizeElements,R,null),go(R))return vt(R),!0;const ve=ht(R.nodeName);if(Ln(H.uponSanitizeElement,R,{tagName:ve,allowedTags:de}),R.hasChildNodes()&&!Dl(R.firstElementChild)&&Ut(/<[/\w!]/g,R.innerHTML)&&Ut(/<[/\w!]/g,R.textContent)||R.nodeType===Qi.progressingInstruction||st&&R.nodeType===Qi.comment&&Ut(/<[/\w]/g,R.data))return vt(R),!0;if(!de[ve]||ee[ve]){if(!ee[ve]&&ho(ve)&&(K.tagNameCheck instanceof RegExp&&Ut(K.tagNameCheck,ve)||K.tagNameCheck instanceof Function&&K.tagNameCheck(ve)))return!1;if(Ct&&!Jt[ve]){const tt=F(R)||R.parentNode,Ot=E(R)||R.childNodes;if(Ot&&tt){const mt=Ot.length;for(let Ht=mt-1;Ht>=0;--Ht){const yn=C(Ot[Ht],!0);yn.__removalCount=(R.__removalCount||0)+1,tt.insertBefore(yn,T(R))}}}return vt(R),!0}return R instanceof f&&!Xt(R)||(ve==="noscript"||ve==="noembed"||ve==="noframes")&&Ut(/<\/no(script|embed|frames)/i,R.innerHTML)?(vt(R),!0):(Ge&&R.nodeType===Qi.text&&(ie=R.textContent,ul([re,Z,ne],tt=>{ie=Yi(ie,tt," ")}),R.textContent!==ie&&(Ji(n.removed,{element:R.cloneNode()}),R.textContent=ie)),Ln(H.afterSanitizeElements,R,null),!1)},Ll=function(R,ie,ve){if(rt&&(ie==="id"||ie==="name")&&(ve in t||ve in bi))return!1;if(!(X&&!oe[ie]&&Ut(ce,ie))){if(!(xe&&Ut(q,ie))){if(!ue[ie]||oe[ie]){if(!(ho(R)&&(K.tagNameCheck instanceof RegExp&&Ut(K.tagNameCheck,R)||K.tagNameCheck instanceof Function&&K.tagNameCheck(R))&&(K.attributeNameCheck instanceof RegExp&&Ut(K.attributeNameCheck,ie)||K.attributeNameCheck instanceof Function&&K.attributeNameCheck(ie))||ie==="is"&&K.allowCustomizedBuiltInElements&&(K.tagNameCheck instanceof RegExp&&Ut(K.tagNameCheck,ve)||K.tagNameCheck instanceof Function&&K.tagNameCheck(ve))))return!1}else if(!Xe[ie]){if(!Ut(he,Yi(ve,le,""))){if(!((ie==="src"||ie==="xlink:href"||ie==="href")&&R!=="script"&&Yx(ve,"data:")===0&&Tt[R])){if(!(Ne&&!Ut(U,Yi(ve,le,"")))){if(ve)return!1}}}}}}return!0},ho=function(R){return R!=="annotation-xml"&&ob(R,_e)},Nl=function(R){Ln(H.beforeSanitizeAttributes,R,null);const{attributes:ie}=R;if(!ie||go(R))return;const ve={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ue,forceKeepAttr:void 0};let tt=ie.length;for(;tt--;){const Ot=ie[tt],{name:mt,namespaceURI:Ht,value:yn}=Ot,Ur=ht(mt);let Pt=mt==="value"?yn:Zx(yn);if(ve.attrName=Ur,ve.attrValue=Pt,ve.keepAttr=!0,ve.forceKeepAttr=void 0,Ln(H.uponSanitizeAttribute,R,ve),Pt=ve.attrValue,Ze&&(Ur==="id"||Ur==="name")&&(Qt(mt,R),Pt=Nt+Pt),st&&Ut(/((--!?|])>)|<\/(style|title)/i,Pt)){Qt(mt,R);continue}if(ve.forceKeepAttr||(Qt(mt,R),!ve.keepAttr))continue;if(!Je&&Ut(/\/>/i,Pt)){Qt(mt,R);continue}Ge&&ul([re,Z,ne],vo=>{Pt=Yi(Pt,vo," ")});const po=ht(R.nodeName);if(Ll(po,Ur,Pt)){if(L&&typeof v=="object"&&typeof v.getAttributeType=="function"&&!Ht)switch(v.getAttributeType(po,Ur)){case"TrustedHTML":{Pt=L.createHTML(Pt);break}case"TrustedScriptURL":{Pt=L.createScriptURL(Pt);break}}try{Ht?R.setAttributeNS(Ht,mt,Pt):R.setAttribute(mt,Pt),go(R)?vt(R):ib(n.removed)}catch{}}}Ln(H.afterSanitizeAttributes,R,null)},Rf=function ye(R){let ie=null;const ve=Pl(R);for(Ln(H.beforeSanitizeShadowDOM,R,null);ie=ve.nextNode();)Ln(H.uponSanitizeShadowNode,ie,null),kl(ie),Nl(ie),ie.content instanceof s&&ye(ie.content);Ln(H.afterSanitizeShadowDOM,R,null)};return n.sanitize=function(ye){let R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ie=null,ve=null,tt=null,Ot=null;if(nr=!ye,nr&&(ye="<!-->"),typeof ye!="string"&&!Dl(ye))if(typeof ye.toString=="function"){if(ye=ye.toString(),typeof ye!="string")throw Zi("dirty is not a string, aborting")}else throw Zi("toString is not a function");if(!n.isSupported)return ye;if(De||Ir(R),n.removed=[],typeof ye=="string"&&(ot=!1),ot){if(ye.nodeName){const yn=ht(ye.nodeName);if(!de[yn]||ee[yn])throw Zi("root node is forbidden and cannot be sanitized in-place")}}else if(ye instanceof u)ie=Mr("<!---->"),ve=ie.ownerDocument.importNode(ye,!0),ve.nodeType===Qi.element&&ve.nodeName==="BODY"||ve.nodeName==="HTML"?ie=ve:ie.appendChild(ve);else{if(!Oe&&!Ge&&!Re&&ye.indexOf("<")===-1)return L&&Be?L.createHTML(ye):ye;if(ie=Mr(ye),!ie)return Oe?null:Be?O:""}ie&&Pe&&vt(ie.firstChild);const mt=Pl(ot?ye:ie);for(;tt=mt.nextNode();)kl(tt),Nl(tt),tt.content instanceof s&&Rf(tt.content);if(ot)return ye;if(Oe){if(Q)for(Ot=z.call(ie.ownerDocument);ie.firstChild;)Ot.appendChild(ie.firstChild);else Ot=ie;return(ue.shadowroot||ue.shadowrootmode)&&(Ot=$.call(r,Ot,!0)),Ot}let Ht=Re?ie.outerHTML:ie.innerHTML;return Re&&de["!doctype"]&&ie.ownerDocument&&ie.ownerDocument.doctype&&ie.ownerDocument.doctype.name&&Ut(db,ie.ownerDocument.doctype.name)&&(Ht="<!DOCTYPE "+ie.ownerDocument.doctype.name+`>
313
+ `+Ht),Ge&&ul([re,Z,ne],yn=>{Ht=Yi(Ht,yn," ")}),L&&Be?L.createHTML(Ht):Ht},n.setConfig=function(){let ye=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ir(ye),De=!0},n.clearConfig=function(){Kn=null,De=!1},n.isValidAttribute=function(ye,R,ie){Kn||Ir({});const ve=ht(ye),tt=ht(R);return Ll(ve,tt,ie)},n.addHook=function(ye,R){typeof R=="function"&&Ji(H[ye],R)},n.removeHook=function(ye,R){if(R!==void 0){const ie=Kx(H[ye],R);return ie===-1?void 0:Jx(H[ye],ie,1)[0]}return ib(H[ye])},n.removeHooks=function(ye){H[ye]=[]},n.removeAllHooks=function(){H=gb()},n}var pb=hb();const qn=I.forwardRef(({fallback:e,functionProps:n,children:t},r)=>{if(t=bt(t,n),t===null)return null;const o=t||e;return I.isValidElement(o)?I.cloneElement(o,{ref:r}):o});qn.displayName="FallbackWrapper";const fE={field:"_field_zdaf7_1",rtl:"_rtl_zdaf7_7",borderRight:"_borderRight_zdaf7_12"},eo=I.memo(({id:e,entry:n,loading:t,rightBorder:r,children:o,onClickEntry:s,customElement:a,sanitize:u,...f})=>{const g={text:{style:{whiteSpace:"nowrap",overflow:"ellipsis"}}},{text:h}=b.useProps("Field",g,f),p={};Object.entries(h).forEach(([v,y])=>{typeof y=="function"&&(p[v]=y(n))});const _=b.useStyles({name:"Field",props:f,classes:fE});return c.jsx(b.Table.Td,{..._("field"),onClick:s?()=>s(e,n):null,...f,children:c.jsx(b.Box,{w:"100%",children:c.jsx(b.Skeleton,{visible:t,children:c.jsx(qn,{fallback:Array.isArray(o)?o.map((v,y)=>c.jsx(b.Text,{...h,...p,children:u?pb.sanitize(v):v},y)):I.isValidElement(o)?o:c.jsx(b.Text,{...h,...p,children:u?pb.sanitize(o):o}),functionProps:n,children:a})})})})});eo.displayName="Field";const vb={row:"_row_138r2_1",selected:"_selected_138r2_5"};function mb({entry:e,selected:n,children:t}){const r=b.useStyles({name:"Row",classes:vb}),o=b.useProps("Row",{},{});Object.entries(o).forEach(([u,f])=>{typeof f=="function"&&(o[u]=f(e))});var{className:s,style:a}=r("row");return s=`${s} ${n?vb.selected:""}`,c.jsx(b.Table.Tr,{className:s,style:{...a},...o,children:t})}function gE({bodyCustomizer:e,actionColumn:n,id:t,entry:r}){let o=e==null?void 0:e[n];return typeof o=="function"&&(o=o({id:t,...r})),o===null?null:o||c.jsx(gl,{id:t})}function _b({data:e,loading:n,hideActions:t,hideCheckbox:r,selection:o,toggleRow:s,onClickEntry:a,bodyCustomizer:u,bodySeparator:f}){const g=e.list_columns.includes("actions")?"_actions":"actions",h=I.useMemo(()=>e!=null&&e.list_columns.includes("all")?"_all":"all",[e==null?void 0:e.list_columns]);return c.jsx(b.Table.Tbody,{children:e.result.length?e.result.map((p,_)=>{const v=e.ids[_];return c.jsxs(mb,{entry:{...p,id:v},children:[r?null:c.jsx(eo,{loading:n,children:c.jsx(b.Checkbox,{pl:2,checked:o.includes(v),onChange:()=>{s(v)}})},_),t?null:c.jsx(eo,{loading:n,children:c.jsx(gE,{bodyCustomizer:u,actionColumn:g,id:kt(v),entry:p})}),e.list_columns.map((y,C)=>{let S=u==null?void 0:u[y];typeof S=="function"&&(S=S({id:v,...p}));let T=ki(p,y);typeof T=="number"?T=T.toLocaleString():T==null&&(T="");const E=(f==null?void 0:f[y])||(f==null?void 0:f[h]);return E&&(T=T.split(E)),S===null?null:c.jsx(eo,{id:v,entry:p,loading:n,onClickEntry:a,customElement:S,sanitize:!0,children:T},C)})]},kt(v))}):c.jsx("tr",{children:c.jsx("td",{style:{padding:"8px"},colSpan:t?e.list_columns.length:e.list_columns.length+1,children:c.jsx(b.Text,{style:{fontStyle:"italic"},size:"sm",c:"dimmed",children:"No data available"})})})})}const bb={root:"_root_1kmay_1",wrapper:"_wrapper_1kmay_7",icon:"_icon_1kmay_18"};function fl({column:e,label:n,orderColumn:t,related:r,toggleAll:o,allChecked:s,classNames:a,styles:u,customElement:f,...g}){const{queryParams:h,setQueryParams:p,loading:_}=He(),v={fw:700,size:"sm",color:"gray.8",hoverColor:"gray.6",selectedColor:"blue"},y=b.useStyles({name:"FieldTitle",classes:bb,classNames:a,styles:u,props:g}),C=b.useProps("FieldTitle",v,g),{hovered:S,ref:T}=je.useHover(),E=t&&h.order_column===t,F=y("wrapper");return F.style.cursor=t?F.style.cursor:"auto",c.jsx(b.Table.Th,{className:bb.fieldTitleRoot,...y("root"),onClick:t&&!_?()=>p({order_column:t,order_direction:h.order_direction==="asc"?"desc":"asc"}):null,children:c.jsx(b.Box,{ref:T,...F,children:e==="Checkbox"?c.jsx(b.Checkbox,{pb:5,pl:2,onChange:o,checked:s}):c.jsxs(c.Fragment,{children:[c.jsx(b.Box,{w:"100%",fw:C.fw,size:"xl",c:S&&t?C.hoverColor:E?C.selectedColor:C.color,children:f||n||e}),r?c.jsx(b.Tooltip,{label:"Related Field",children:c.jsx(b.Indicator,{label:"rel",style:{indicator:{top:"-1px !important",right:"-2px !important",padding:"4px"}},children:c.jsx(b.Box,{...y("icon"),children:E?h.order_direction==="asc"?c.jsx(Uo,{size:14,strokeWidth:1.5}):c.jsx(Kh,{size:14,strokeWidth:1.5}):null})})}):c.jsx(b.Box,{...y("icon"),children:E?h.order_direction==="asc"?c.jsx(Uo,{size:14,strokeWidth:1.5}):c.jsx(Kh,{size:14,strokeWidth:1.5}):null})]})})})}const Od=I.memo(({data:e,info:n,settings:t,hideActions:r,hideCheckbox:o,allChecked:s,toggleAll:a,headerCustomizer:u})=>{const f=e.list_columns.includes("actions")?"_actions":"actions";let g=u==null?void 0:u[f];return typeof g=="function"&&(g=g()),c.jsx(b.Table.Thead,{children:c.jsxs(b.Table.Tr,{children:[o?null:c.jsx(fl,{data:e,column:"Checkbox",allChecked:s,toggleAll:a}),r?null:c.jsx(fl,{column:"Actions",customElement:g}),e.list_columns.map((h,p)=>{var v;let _=u==null?void 0:u[h];return typeof _=="function"&&(_=_(e.label_columns[h])),_===null?null:c.jsx(fl,{column:h,label:e.label_columns[h],orderColumn:e.order_columns.find(y=>y===h)||e.order_columns.find(y=>y.startsWith(`${h}.`)),related:((v=n.filters[h])==null?void 0:v.schema.type)==="Nested",customElement:_},h)})]})})});Od.displayName="Header";const hE={scrollbar:"_scrollbar_isyo2_1"};function yb({bulkActions:e,hideActions:n,loading:t,onSelectCheckbox:r,onClickEntry:o,hideCheckbox:s,hideDownload:a,headerCustomizer:u,bodyCustomizer:f,bodySeparator:g,...h}){const p=b.useMantineTheme(),_=b.Table.extend({highlightOnHover:!0,striped:!0,horizontalSpacing:"md",verticalSpacing:"sm"}),v=b.useProps("DatagridTable",_,h),{data:y,info:C}=He(),[S,T]=I.useState([]),[E,F]=I.useState(!1),L=P=>{T(k=>k.includes(P)?k.filter(z=>z!==P):[...k,P])},O=()=>{T(P=>P.length===y.ids.length?[]:y.ids.map((k,z)=>k))};return I.useEffect(()=>{F(S.length===y.result.length&&S.length>0),r&&r(S),e==null||e.setSelectedIds(S.map(P=>P))},[S]),I.useEffect(()=>{T([]),r&&r([])},[y]),c.jsx(b.ScrollArea,{options:{className:p.colorScheme==="dark"?"os-theme-light":void 0},style:{flex:1,flexDirection:"column"},classNames:hE,children:c.jsxs(b.Table,{stickyHeader:!0,...v,children:[c.jsx(Od,{data:y,info:C,hideActions:n,hideCheckbox:s,allChecked:E,setSelection:T,toggleAll:O,headerCustomizer:u}),c.jsx(_b,{data:y,loading:t,hideActions:n,hideCheckbox:s,selection:S,setSelection:T,toggleRow:L,onClickEntry:o,bodyCustomizer:f,bodySeparator:g})]})})}const Pd=I.memo(({counter:e,...n})=>{const{data:t,queryParams:r,setQueryParams:o}=He(),s=b.useMantineTheme(),a=[{value:"10",label:"10"},{value:"25",label:"25"},{value:"50",label:"50"}],u=String(r.page_size),[f,g]=I.useState(r.page);I.useEffect(()=>{g(r.page)},[r.page]);const h=_=>{g(_-1),o({page:_-1})},p=_=>{o({page_size:parseInt(_,10),page:0})};return c.jsxs(c.Fragment,{children:[c.jsx(b.Divider,{}),c.jsxs(b.Box,{style:{display:"flex",justifyContent:"space-between",alignItems:"center",height:54,border:"none",borderTopWidth:"1px",padding:"var(--mantine-spacing-md)"},children:[c.jsxs(b.Box,{style:{display:"flex",alignItems:"center",gap:"var(--mantine-spacing-sm)"},children:[c.jsx(b.Text,{children:"Rows per page:"}),c.jsx(b.Select,{value:u,defaultValue:u,onChange:_=>p(_),data:a,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(b.Pagination,{size:"sm",total:Math.ceil(t.count/u),value:f+1,onChange:h,...n}),e&&t?c.jsxs(c.Fragment,{children:[c.jsx(b.Text,{c:s.primaryColor,size:"xs",fw:400,pl:20,children:"Total Records"}),c.jsx(b.Text,{c:s.primaryColor,size:"md",fw:700,pl:10,children:t.count})]}):null]})]})});Pd.displayName="Pagination";function pE(e){return n=>{try{return e.validateSync(n,{abortEarly:!1}),{}}catch(t){const r={};return t instanceof Et&&t.inner.forEach(o=>{r[o.path.replaceAll("[",".").replaceAll("]","")]=o.message}),r}}}function vE({form:e,name:n,items:t,...r}){return c.jsx(b.Autocomplete,{data:t,...e.getInputProps(n),value:String(e.getInputProps(n).value)||"",...r})}function wb({form:e,name:n,...t}){return c.jsx(c.Fragment,{children:c.jsx(ni.DateInput,{...e.getInputProps(n),onChange:r=>{if(r instanceof Date){const o=new Date(r.getTime()-r.getTimezoneOffset()*6e4);e.setFieldValue(n,o.toISOString().substring(0,10))}},value:e.getInputProps(n).value?new Date(e.getInputProps(n).value):null,...t})})}function Cb({form:e,name:n,...t}){return c.jsx(c.Fragment,{children:c.jsx(ni.DateTimePicker,{...e.getInputProps(n),onChange:r=>{if(r instanceof Date){const o=new Date(r);e.setFieldValue(n,o.toISOString())}},value:e.getInputProps(n).value?new Date(e.getInputProps(n).value):null,...t})})}function to({form:e,name:n,...t}){const r=e.getInputProps(n).value,o=I.useMemo(()=>r&&typeof r=="object"?JSON.stringify(r):r||"",[r]);return n==="password"?c.jsx(b.PasswordInput,{...e.getInputProps(n),value:o,...t}):c.jsx(b.TextInput,{...e.getInputProps(n),value:o,...t})}function Dd({form:e,name:n,filter:t,...r}){const[o,s]=I.useState(""),a=e.getInputProps(n).value,u=I.useMemo(()=>a?typeof a=="object"?JSON.stringify(a,null,2):a:"",[a]);return I.useEffect(()=>{s(u)},[u]),t?c.jsx(to,{form:e,name:n,...r}):c.jsx(b.JsonInput,{autosize:!0,minRows:4,maxRows:12,validationError:"Invalid JSON",...e.getInputProps(n),...r,value:o,onChange:f=>{if(s(f),!f){e.getInputProps(n).onChange(null);return}try{const g=JSON.parse(f);e.getInputProps(n).onChange(g)}catch{}}})}function Sb({form:e,name:n,filter:t,...r}){const[o,s]=I.useState(!!t);return c.jsxs(b.InputWrapper,{label:r.label,description:r.description,children:[!t&&c.jsxs(b.Group,{align:"center",gap:"xs",py:"0.25rem",children:[c.jsx(b.Checkbox,{checked:o,onChange:a=>s(a.currentTarget.checked)}),c.jsx(b.Text,{size:"xs",children:"WKT"})]}),o?c.jsx(to,{form:e,name:n,...r,label:void 0,description:void 0}):c.jsx(Dd,{form:e,name:n,...r,label:void 0,description:void 0})]})}function Tb({form:e,name:n,items:t,...r}){const o=t.map(a=>({value:String(kt(a.id)),label:a.value})),s=Array.isArray(e.getInputProps(n).value)?e.getInputProps(n).value.map(a=>String(typeof a=="object"?kt(a.id):a)):[];return c.jsx(b.MultiSelect,{data:o,searchable:!0,...e.getInputProps(n),value:s||[],...r})}function Ib({form:e,name:n,items:t,filter:r,...o}){var a;const s=t.map(u=>({value:String(kt(u.id)),label:u.value}));return c.jsx(b.Select,{data:s,searchable:!0,...e.getInputProps(n),onChange:u=>{if(r){e.setFieldValue(n,u);return}const f=t.find(g=>String(kt(g.id))===u)||null;e.setFieldValue(n,f)},value:r?e.getInputProps(n).value:String(kt((a=e.getInputProps(n).value)==null?void 0:a.id))||"",...o})}function kd({form:e,name:n,items:t,...r}){return c.jsx(b.Select,{data:t,searchable:!0,...e.getInputProps(n),value:String(e.getInputProps(n).value)||"",...r})}function Ld({form:e,name:n,schema:t,filter:r,withinPortal:o=!0,...s}){if(!t.type)return null;switch(t.type){case"Boolean":return c.jsx(kd,{form:e,name:n,items:[{label:"true",value:r?"1":"true"},{label:"false",value:r?"0":"false"}],...s});case"RelatedList":return c.jsx(Tb,{form:e,name:n,items:t.values,comboboxProps:{withinPortal:o},...s});case"Related":return c.jsx(Ib,{form:e,name:n,items:t.values,filter:r,comboboxProps:{withinPortal:o},...s});case"DateTime":return c.jsx(Cb,{form:e,name:n,valueFormat:"DD.MM.YYYY HH:mm:ss",schema:t,popoverProps:{withinPortal:o},...s});case"Date":return c.jsx(wb,{form:e,name:n,valueFormat:"DD.MM.YYYY",schema:t,popoverProps:{withinPortal:o},...s});case"Geometry":return c.jsx(Sb,{form:e,name:n,filter:r,...s});case"Raw":return c.jsx(Dd,{form:e,name:n,filter:r,...s});case"Integer":case"Float":return c.jsx(to,{form:e,name:n,...s});case"Enum":return c.jsx(kd,{form:e,name:n,items:t.values,comboboxProps:{withinPortal:o},...s});default:return c.jsx(to,{form:e,name:n,...s})}}function mE({form:e,name:n,items:t,onChange:r,...o}){return c.jsx(b.Select,{data:t,searchable:!0,...e.getInputProps(n),onChange:r,...o})}function Nd({form:e,name:n,label:t,comboboxProps:r,...o}){const s=b.useCombobox({onDropdownClose:()=>s.resetSelectedOption(),onDropdownOpen:()=>s.updateSelectedOptionIndex("active")}),[a,u]=I.useState([]),[f,g]=I.useState(""),h=v=>{f!==""&&(a.includes(f)||u(y=>[...y,f]),g(""))},p=v=>u(y=>y.filter(C=>C!==v)),_=a.map(v=>c.jsx(b.Pill,{withRemoveButton:!0,onRemove:()=>p(v),children:v},v));return I.useEffect(()=>{const v=e.getInputProps(n).value;if(v)try{u([...v])}catch(y){console.error("Error parsing JSON:",y)}},[]),I.useEffect(()=>{e.getInputProps(n).onChange(a)},[a]),c.jsx(b.InputWrapper,{label:t,children:c.jsxs(b.Combobox,{store:s,onOptionSubmit:h,...r,children:[c.jsx(b.Combobox.DropdownTarget,{children:c.jsx(b.PillsInput,{onClick:()=>s.openDropdown(),children:c.jsxs(b.Pill.Group,{children:[_,c.jsx(b.Combobox.EventsTarget,{children:c.jsx(b.PillsInput.Field,{onFocus:()=>s.openDropdown(),onBlur:()=>s.closeDropdown(),value:f,placeholder:"Search values",onChange:v=>{s.updateSelectedOptionIndex(),g(v.currentTarget.value)},onKeyDown:v=>{v.key==="Backspace"&&f.length===0&&(v.preventDefault(),p(a[a.length-1]))}})})]})})}),c.jsx(b.Combobox.Dropdown,{children:c.jsx(b.Combobox.Options,{children:c.jsxs(b.Combobox.Option,{value:"$create",children:["+ Create ",f]})})})]})})}function _E({form:e,name:n,items:t,onChange:r,...o}){return c.jsx(b.Select,{data:t,searchable:!0,...e.getInputProps(n),onChange:r,...o})}function Mb({onClose:e,...n}){const{info:t,queryParams:r,setQueryParams:o,path:s}=He(),a=Ss.useForm({initialValues:{filters:[]},validate:pE(zi({filters:Ys().of(zi({col:jo().transform(p=>p||void 0).required("Field is required"),opr:jo().transform(p=>p||void 0).required("col is required"),value:Ho().when("col",{is:p=>p&&t.filters[p].schema.required,then:()=>Ho().required("Value is required")})}))}))}),u={bg:"transparent",size:"sm",c:"gray"},f=b.useProps("ActionIcon",u,n);I.useEffect(()=>{a.setValues({filters:[]}),a.reset()},[s]),I.useEffect(()=>{if(r.filters&&r.filters.length){const p=r.filters.filter(_=>!_.id).map(_=>({..._,key:je.randomId()}));a.setFieldValue("filters",p)}},[r.filters]);const g=p=>{const _=p.filters.map(({key:y,...C})=>C),v=JSON.parse(JSON.stringify(_));o({filters:v,page:0}),e()},h=a.values.filters.map((p,_)=>c.jsxs(b.Box,{px:"sm",children:[c.jsxs(b.Flex,{my:"md",gap:"md",style:{whiteSpace:"nowrap"},children:[c.jsx(b.Box,{style:{width:"192px"},children:t&&t.filters&&c.jsx(mE,{form:a,name:`filters.${_}.col`,items:Object.entries(t.filters).map(([v,y])=>({label:y.label,value:String(v)})),onChange:v=>{a.setFieldValue(`filters.${_}`,{col:v,opr:"",value:"",key:je.randomId()})}})}),c.jsx(b.Box,{style:{width:"192px"},children:p.col?c.jsx(_E,{form:a,name:`filters.${_}.opr`,items:t.filters[p.col].filters.filter(v=>!v.id).map(v=>({label:v.name,value:v.operator})),onChange:v=>{a.setFieldValue(`filters.${_}`,{col:a.values.filters[_].col,opr:v,value:"",key:je.randomId()})}}):null}),c.jsx(b.Box,{style:{width:"192px"},children:p.col?p.opr==="in"?c.jsx(Nd,{form:a,name:`filters.${_}.value`}):c.jsx(Ld,{form:a,name:`filters.${_}.value`,schema:t.filters[p.col].schema,filter:!0}):null}),c.jsx(b.ActionIcon,{bg:f.bg,size:f.size,c:f.c,onClick:()=>{a.removeListItem("filters",_)},children:c.jsx(ra,{})})]}),a.values.filters.length>1&&_<a.values.filters.length-1?c.jsx(b.Divider,{my:"md",labelPosition:"center",label:"AND"}):null]},p.key));return c.jsxs(b.Box,{component:"form",onSubmit:a.onSubmit(g),children:[h.length===0&&c.jsx(b.Box,{style:{width:"642px"},children:c.jsx(b.Text,{style:{fontStyle:"italic",padding:"7px"},size:"sm",c:"dimmed",children:"No filters selected..."})}),c.jsx(b.ScrollArea.Autosize,{mah:"40vh",mt:20,children:h}),c.jsx(b.Divider,{my:"sm"}),c.jsxs(b.Box,{style:{display:"flex",justifyContent:"space-between"},children:[c.jsx(b.Button,{variant:"subtle",leftSection:c.jsx(na,{}),onClick:()=>{a.insertListItem("filters",{col:"",opr:"",value:"",key:je.randomId()})},children:"Add Filter"}),c.jsx(b.Group,{spacing:"md",children:c.jsx(b.Button,{type:"submit",children:"Apply"})})]})]})}function xb(...e){const{queryParams:n}=He(),t={bg:"transparent",size:"sm",c:"gray"},r=b.useProps("ActionIcon",t,e),[o,s]=I.useState(!1);return c.jsxs(b.Popover,{opened:o,position:"bottom-end",onClose:()=>s(!1),closeOnClickOutside:!1,children:[c.jsx(b.Popover.Target,{children:c.jsx(b.Tooltip,{opened:o?!1:null,label:"Filter",children:(n==null?void 0:n.filters.filter(a=>!a.id).length)!=0?c.jsx(b.Indicator,{zIndex:20,size:16,label:n==null?void 0:n.filters.length,children:c.jsx(b.ActionIcon,{bg:r.bg,size:r.size,c:r.c,onClick:()=>s(!0),children:c.jsx(ta,{})})}):c.jsx(b.ActionIcon,{bg:r.bg,size:r.size,c:r.c,onClick:()=>s(!0),children:c.jsx(ta,{})})})}),c.jsxs(b.Popover.Dropdown,{px:"xs",children:[c.jsx(b.Box,{style:{position:"absolute",top:4,right:4},children:c.jsx(b.CloseButton,{title:"Filters",onClick:()=>s(!1)})}),c.jsx(Mb,{onClose:()=>{s(!1)}})]})]})}const zd=I.memo(({hideAdd:e,hideFilter:n,hideDownload:t,toolbarCustomizer:r})=>{const{info:o}=He(),s=I.useMemo(()=>{const u={};return Object.entries(r).forEach(([f,g])=>{u[f]=g,typeof u[f]=="function"&&(u[f]=u[f]())}),u},[r]),a=o.permissions.includes("can_post");return c.jsxs(b.Flex,{justify:"flex-end",p:"md",gap:"sm",children:[!t&&(s.download||c.jsx(pl,{size:"sm"})),a&&!e?s.add||c.jsx(hl,{size:"sm"}):null,n?null:s.filter||c.jsx(xb,{})]})});zd.displayName="Toolbar";function Rd({children:e,cond:n}){return Qh(n)?e:null}const Bd=I.forwardRef((e,n)=>{const{path:t,data:r,loading:o,info:s,setQueryParams:a}=He(),{hideToolbar:u=!1,hideFilter:f=!1,hideAdd:g=!1,hideSettings:h=!1,hideActions:p=!1,hidePagination:_=!1,hideError:v=!1,hideDownload:y=!0,onSelectCheckbox:C=null,onClickEntry:S=null,fetchOnMount:T=!0,bulkActions:E=null,styles:F,headerCustomizer:L={},bodyCustomizer:O={},toolbarCustomizer:P={},counter:k=!1,bodySeparator:z,form:j}=e;I.useEffect(()=>{!r&&T&&a({})},[r]);const{setView:$}=Qn("add"),{setView:H}=Qn("edit");if(I.useEffect(()=>{var Z,ne;(Z=j==null?void 0:j.add)!=null&&Z.initialView&&$(j.add.initialView),(ne=j==null?void 0:j.edit)!=null&&ne.initialView&&H(j.edit.initialView)},[]),!s)return;const re=E===null;return c.jsxs(b.Paper,{ref:n,h:"100%",display:"flex",pos:"relative",style:{flexDirection:"column",...F},children:[c.jsxs(Rd,{cond:!!s,children:[c.jsx($d,{jsonForms:j==null?void 0:j.add}),c.jsx(Cd,{jsonForms:j==null?void 0:j.edit})]}),u?null:c.jsx(zd,{hideFilter:f,hideAdd:g,hideSettings:h,hideDownload:y,toolbarCustomizer:P}),r?c.jsx(yb,{bulkActions:E,hideActions:p,loading:o,onSelectCheckbox:C,onClickEntry:S,hideCheckbox:re,hideDownload:y,headerCustomizer:L,bodyCustomizer:O,bodySeparator:z}):null,!_&&r?c.jsx(Pd,{counter:k}):null,v?null:c.jsx(Sd,{})]})});Bd.displayName="DataGrid";function bE({relatedPath:e,...n}){const{path:t}=He();return ft(t?t.substring(0,t.lastIndexOf("/")):"",e.substring(0,e.lastIndexOf("/"))),c.jsx(Wh,{resource_name:e.replace("/",""),relation:n,children:c.jsx(Bd,{hideToolbar:!0,hideDownload:!1})})}const yE=I.memo(bE);function Eb({item:e,info:n,opened:t,onClose:r,...o}){const s={modal:{},tabs:{},tabsList:{},tabsPanel:{}},{modal:a,tabs:u,tabsList:f,tabsPanel:g}=b.useProps("ViewDialog",s,o);return c.jsx(b.Modal,{opened:t,onClose:r,title:`${e==null?void 0:e.show_title} (#${kt(e==null?void 0:e.id)})`,size:"lg",centered:!0,zIndex:1e3,...a,children:e&&c.jsxs(b.Tabs,{defaultValue:"details",...u,children:[c.jsxs(b.Tabs.List,{...f,children:[c.jsx(b.Tabs.Tab,{value:"details",children:"Details"}),n.relations.map((h,p)=>c.jsx(b.Tabs.Tab,{value:h.name,children:h.name},p))]}),c.jsx(b.Tabs.Panel,{pt:"xs",value:"details",...g,children:c.jsx(b.Paper,{p:"xs",withBorder:!0,children:c.jsx(b.Stack,{spacing:"md",children:c.jsx(b.ScrollArea,{h:450,type:"auto",children:e.show_columns.map((h,p)=>c.jsxs(b.Grid,{maw:500,children:[c.jsx(b.Grid.Col,{span:4,children:c.jsx(b.Text,{size:"md",children:e.label_columns[h]})}),c.jsx(b.Grid.Col,{span:1,children:c.jsx(b.Text,{size:"xs",children:":"})}),c.jsx(b.Grid.Col,{span:6,children:c.jsx(b.Text,{size:"md",children:ki(e.result,h)})})]},p))})})})}),n.relations.map((h,p)=>c.jsx(b.Tabs.Panel,{pt:"xs",value:h.name,children:c.jsx(b.Paper,{withBorder:!0,children:c.jsx(yE,{relatedPath:h.path,id:kt(e.id),foreign_key:h.foreign_key,type:h.type})})},p))]})})}const Vd=I.memo(({id:e,...n})=>{const{info:t,getEntry:r}=He(),[o,s]=I.useState(null),[a,u]=je.useDebouncedState(!1,Nr),[f,g]=I.useState(!1),h=mr({onClick:()=>{u(!0),r(e).then(p=>{p&&(s(p),g(!0))}).catch(()=>{}).finally(()=>u(!1))},size:"sm",loading:a,...n});return c.jsxs(c.Fragment,{children:[c.jsx(b.Tooltip,{label:"Details",children:c.jsx(b.ActionIcon,{...h,children:c.jsx(q1,{})})}),c.jsx(Eb,{item:o,info:t,opened:f,onClose:()=>g(!1)})]})});Vd.displayName="View";const gl=I.memo(({id:e})=>{const{info:n}=He();return c.jsxs(b.Flex,{style:{gap:4,whiteSpace:"nowrap"},children:[n!=null&&n.permissions.includes("can_get")?c.jsx(Vd,{id:e}):null,n!=null&&n.permissions.includes("can_put")?c.jsx(la,{id:e}):null,n!=null&&n.permissions.includes("can_delete")?c.jsx(oa,{id:e}):null]})});gl.displayName="Actions";const hl=I.memo(({tooltipProps:e,...n})=>{const{setOpened:t}=Qn("add"),r=mr({onClick:()=>t(!0),...n});return c.jsx(c.Fragment,{children:c.jsx(b.Tooltip,{...e,label:(e==null?void 0:e.label)??"Add Item",children:c.jsx(b.ActionIcon,{...r,children:c.jsx(na,{})})})})});hl.displayName="Add";function $d({jsonForms:e,...n}){const{info:t,refetch:r,refetchInfo:o,addEntry:s}=He(),{opened:a,setOpened:u,state:f,setState:g,reset:h,view:p,setView:_}=Qn("add"),[v,y]=je.useDebouncedState(!1,Nr),{jsonForms:C}=b.useProps("AddDialog",{},{}),S=I.useMemo(()=>Vn(C,e),[C,e]),T=I.useCallback(E=>{E==null||E.preventDefault(),y(!0),s(f.data).then(F=>{F&&(r(),o())}).catch(()=>{}).finally(()=>{y(!1),u(!1)})},[s,r,o,y,u,f.data]);return c.jsx(bd,{schema:t.add_schema,uischema:t.add_uischema,state:f,setState:g,view:p,setView:_,jsonForms:S,onSubmit:T,buttonText:"Add",buttonLoading:v,opened:a,onClose:()=>u(!1),onExitTransitionEnd:h,...p===St.OVERLAY?wd:{},...p===St.NORMAL?yd:{},...n,title:n.title??(t==null?void 0:t.add_title)})}const Fb=[{name:"John Doe",age:25,friend:"Jane Doe","friend.name":"Jane Doe","friend.age":30},{name:"Jane Doe",age:30,friend:"John Doe","friend.name":"John Doe","friend.age":25}],wE=[{label:"Name",key:"name"},{label:"Age",key:"age"},{label:"Friend",key:"friend"}],CE=[{label:"Name",key:"name"},{label:"Age",key:"age"},{label:"Friend Name",key:"friend.name"},{label:"Friend Age",key:"friend.age"}],SE=Fb.map(e=>c.jsxs(b.Table.Tr,{children:[c.jsx(b.Table.Td,{p:4,children:e.name}),c.jsx(b.Table.Td,{p:4,children:e.age}),c.jsx(b.Table.Td,{p:4,children:e.friend})]},e.name)),TE=Fb.map(e=>c.jsxs(b.Table.Tr,{children:[c.jsx(b.Table.Td,{p:4,children:e.name}),c.jsx(b.Table.Td,{p:4,children:e.age}),c.jsx(b.Table.Td,{p:4,children:e["friend.name"]}),c.jsx(b.Table.Td,{p:4,children:e["friend.age"]})]},e.name)),Ab={simplified:{title:"Simplified version of the data",description:"This is a simplified version of the data. It shows only the properties of the elements and their relationships"},detailed:{title:"Detailed version of the data",description:"This is a detailed version of the data. It shows all the properties of the elements including all the properties of their relationships"}},pl=I.memo(({tooltipProps:e,...n})=>{const{download:t}=He(),[r,{toggle:o,close:s}]=je.useDisclosure(),[a,u]=je.useDebouncedState(!1,Nr),[f,g]=I.useState("simplified"),[h,p]=I.useState(Do),[_,v]=I.useState(Ms),y=mr({onClick:o,...n}),C=()=>{u(!0),t(void 0,{export_mode:f,delimiter:h,quotechar:_}).catch(()=>{}).finally(()=>{u(!1),s()})};return c.jsxs(c.Fragment,{children:[c.jsx(b.Modal,{title:"Download data",centered:!0,size:"xl",opened:r,onClose:s,children:c.jsxs(b.Stack,{children:[c.jsxs(b.Group,{grow:!0,children:[c.jsx(b.Select,{label:"Delimiter",description:"Select the delimiter used in the CSV file",value:h,onChange:p,data:Is,placeholder:"Select delimiter",allowDeselect:!1,leftSection:c.jsx(Xh,{})}),c.jsx(b.Select,{label:"Quote character",description:"Select the quote character used in the CSV file",value:_,onChange:v,data:xs,placeholder:"Select quote character",leftSection:c.jsx(Zh,{})})]}),c.jsx(b.Box,{children:c.jsx(b.SegmentedControl,{value:f,onChange:g,data:[{label:"Simplified",value:"simplified"},{label:"Detailed",value:"detailed"}]})}),c.jsxs(b.Card,{shadow:"md",withBorder:!0,children:[c.jsxs(b.Group,{justify:"space-between",children:[c.jsx(b.Text,{children:Ab[f].title}),c.jsx(b.Tooltip,{label:Ab[f].description,children:c.jsx(b.ThemeIcon,{variant:"transparent",size:"sm",style:{cursor:"pointer"},children:c.jsx(J1,{})})})]}),c.jsxs(b.Table,{withColumnBorders:!0,children:[c.jsx(b.Table.Thead,{children:c.jsx(b.Table.Tr,{children:f==="simplified"?wE.map(S=>c.jsx(b.Table.Th,{p:4,children:S.label},S.key)):CE.map(S=>c.jsx(b.Table.Th,{p:4,children:S.label},S.key))})}),c.jsx(b.Table.Tbody,{children:f==="simplified"?SE:TE})]})]}),c.jsx(b.Group,{justify:"end",children:c.jsx(b.Button,{mt:"md",onClick:C,loading:a,children:"Download"})})]})}),a?c.jsx(b.ThemeIcon,{variant:"transparent",size:y.size,c:y.c,children:c.jsx(b.Loader,{size:"100%",color:y.c})}):c.jsx(b.Tooltip,{...e,label:(e==null?void 0:e.label)??"Download",children:c.jsx(b.ActionIcon,{...y,children:c.jsx(V1,{})})})]})});pl.displayName="Download";const Hd=I.memo(({tooltipProps:e,...n})=>{const[t,r]=I.useState(!1),{refetch:o}=He(),s=mr({onClick:()=>{r(!0),o().finally(()=>{r(!1)})},...n});return t?c.jsx(b.ThemeIcon,{variant:"transparent",size:s.size,c:s.c,children:c.jsx(b.Loader,{size:"100%",color:s.c})}):c.jsx(b.Tooltip,{...e,label:(e==null?void 0:e.refresh)??"Refresh",children:c.jsx(b.ActionIcon,{...s,children:c.jsx(nT,{})})})});Hd.displayName="Refresh";const jd=I.memo(({tooltipProps:e,...n})=>{const{upload:t,refetch:r}=He(),[o,{toggle:s,close:a}]=je.useDisclosure(),[u,f]=je.useDebouncedState(!1,Nr),[g,h]=I.useState(),[p,_]=I.useState(Do),[v,y]=I.useState(Ms),C=mr({onClick:s,...n}),S=()=>{f(!0),t(g,{delimiter:p,quotechar:v}).then(T=>{T&&r()}).catch(()=>{}).finally(()=>{f(!1),a()})};return c.jsxs(c.Fragment,{children:[c.jsx(b.Modal,{title:"Import data",centered:!0,opened:o,onClose:a,onExitTransitionEnd:()=>{h(null),_(Do)},children:c.jsxs(b.Stack,{children:[c.jsxs(b.Group,{grow:!0,children:[c.jsx(b.Select,{label:"Delimiter",description:"Select the delimiter used in the CSV file",value:p,onChange:_,data:Is,placeholder:"Select delimiter",leftSection:c.jsx(Xh,{})}),c.jsx(b.Select,{label:"Quote character",description:"Select the quote character used in the CSV file",value:v,onChange:y,data:xs,placeholder:"Select quote character",leftSection:c.jsx(Zh,{})})]}),c.jsx(b.FileInput,{label:"CSV file",description:"CSV file containing the data to import",value:g,onChange:h,accept:"text/csv",placeholder:"Upload CSV file",leftSection:c.jsx(G1,{}),clearable:!0,required:!0}),c.jsx(b.Group,{justify:"end",children:c.jsx(b.Button,{onClick:S,disabled:!g,loading:u,children:"Upload"})})]})}),c.jsx(b.Tooltip,{...e,label:(e==null?void 0:e.label)??"Upload CSV",children:c.jsx(b.ActionIcon,{...C,children:c.jsx(sT,{})})})]})});jd.displayName="Upload";function IE({children:e,fetch:n=!0,loading:t=c.jsx(b.Center,{children:c.jsx(b.Loader,{})}),end:r=c.jsx(b.Center,{children:"End of data"}),fetchWrapper:o=b.Center,fetchWrapperProps:s}){const{streaming:a,loading:u}=He(),{ref:f,inViewport:g}=je.useInViewport(),h=I.useMemo(()=>Object.values(a.data).flat(),[a.data]),p=I.useMemo(()=>typeof e=="function"?e(h):e,[e,h]);return I.useEffect(()=>{g&&n&&a.fetch()},[g]),c.jsxs(c.Fragment,{children:[p,u&&t,a.isEnd&&r,c.jsx(o,{ref:f,id:"IS-load-trigger",mih:"1%",...s})]})}function Ob(e){var n,t,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(n=0;n<o;n++)e[n]&&(t=Ob(e[n]))&&(r&&(r+=" "),r+=t)}else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function ge(){for(var e,n,t=0,r="",o=arguments.length;t<o;t++)(e=arguments[t])&&(n=Ob(e))&&(r&&(r+=" "),r+=n);return r}/**
314
+ * table-core
315
+ *
316
+ * Copyright (c) TanStack
317
+ *
318
+ * This source code is licensed under the MIT license found in the
319
+ * LICENSE.md file in the root directory of this source tree.
320
+ *
321
+ * @license MIT
322
+ */function br(e,n){return typeof e=="function"?e(n):e}function un(e,n){return t=>{n.setState(r=>({...r,[e]:br(t,r[e])}))}}function vl(e){return e instanceof Function}function ME(e){return Array.isArray(e)&&e.every(n=>typeof n=="number")}function Pb(e,n){const t=[],r=o=>{o.forEach(s=>{t.push(s);const a=n(s);a!=null&&a.length&&r(a)})};return r(e),t}function Ce(e,n,t){let r=[],o;return s=>{let a;t.key&&t.debug&&(a=Date.now());const u=e(s);if(!(u.length!==r.length||u.some((h,p)=>r[p]!==h)))return o;r=u;let g;if(t.key&&t.debug&&(g=Date.now()),o=n(...u),t==null||t.onChange==null||t.onChange(o),t.key&&t.debug&&t!=null&&t.debug()){const h=Math.round((Date.now()-a)*100)/100,p=Math.round((Date.now()-g)*100)/100,_=p/16,v=(y,C)=>{for(y=String(y);y.length<C;)y=" "+y;return y};console.info(`%c⏱ ${v(p,5)} /${v(h,5)} ms`,`
323
+ font-size: .6rem;
324
+ font-weight: bold;
325
+ color: hsl(${Math.max(0,Math.min(120-120*_,120))}deg 100% 31%);`,t==null?void 0:t.key)}return o}}function Se(e,n,t,r){return{debug:()=>{var o;return(o=e==null?void 0:e.debugAll)!=null?o:e[n]},key:process.env.NODE_ENV==="development"&&t,onChange:r}}function xE(e,n,t,r){const o=()=>{var a;return(a=s.getValue())!=null?a:e.options.renderFallbackValue},s={id:`${n.id}_${t.id}`,row:n,column:t,getValue:()=>n.getValue(r),renderValue:o,getContext:Ce(()=>[e,t,n,s],(a,u,f,g)=>({table:a,column:u,row:f,cell:g,getValue:g.getValue,renderValue:g.renderValue}),Se(e.options,"debugCells","cell.getContext"))};return e._features.forEach(a=>{a.createCell==null||a.createCell(s,t,n,e)},{}),s}function EE(e,n,t,r){var o,s;const u={...e._getDefaultColumnDef(),...n},f=u.accessorKey;let g=(o=(s=u.id)!=null?s:f?typeof String.prototype.replaceAll=="function"?f.replaceAll(".","_"):f.replace(/\./g,"_"):void 0)!=null?o:typeof u.header=="string"?u.header:void 0,h;if(u.accessorFn?h=u.accessorFn:f&&(f.includes(".")?h=_=>{let v=_;for(const C of f.split(".")){var y;v=(y=v)==null?void 0:y[C],process.env.NODE_ENV!=="production"&&v===void 0&&console.warn(`"${C}" in deeply nested key "${f}" returned undefined.`)}return v}:h=_=>_[u.accessorKey]),!g)throw process.env.NODE_ENV!=="production"?new Error(u.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let p={id:`${String(g)}`,accessorFn:h,parent:r,depth:t,columnDef:u,columns:[],getFlatColumns:Ce(()=>[!0],()=>{var _;return[p,...(_=p.columns)==null?void 0:_.flatMap(v=>v.getFlatColumns())]},Se(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:Ce(()=>[e._getOrderColumnsFn()],_=>{var v;if((v=p.columns)!=null&&v.length){let y=p.columns.flatMap(C=>C.getLeafColumns());return _(y)}return[p]},Se(e.options,"debugColumns","column.getLeafColumns"))};for(const _ of e._features)_.createColumn==null||_.createColumn(p,e);return p}const Vt="debugHeaders";function Db(e,n,t){var r;let s={id:(r=t.id)!=null?r:n.id,column:n,index:t.index,isPlaceholder:!!t.isPlaceholder,placeholderId:t.placeholderId,depth:t.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const a=[],u=f=>{f.subHeaders&&f.subHeaders.length&&f.subHeaders.map(u),a.push(f)};return u(s),a},getContext:()=>({table:e,header:s,column:n})};return e._features.forEach(a=>{a.createHeader==null||a.createHeader(s,e)}),s}const FE={createTable:e=>{e.getHeaderGroups=Ce(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,t,r,o)=>{var s,a;const u=(s=r==null?void 0:r.map(p=>t.find(_=>_.id===p)).filter(Boolean))!=null?s:[],f=(a=o==null?void 0:o.map(p=>t.find(_=>_.id===p)).filter(Boolean))!=null?a:[],g=t.filter(p=>!(r!=null&&r.includes(p.id))&&!(o!=null&&o.includes(p.id)));return ml(n,[...u,...g,...f],e)},Se(e.options,Vt,"getHeaderGroups")),e.getCenterHeaderGroups=Ce(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,t,r,o)=>(t=t.filter(s=>!(r!=null&&r.includes(s.id))&&!(o!=null&&o.includes(s.id))),ml(n,t,e,"center")),Se(e.options,Vt,"getCenterHeaderGroups")),e.getLeftHeaderGroups=Ce(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(n,t,r)=>{var o;const s=(o=r==null?void 0:r.map(a=>t.find(u=>u.id===a)).filter(Boolean))!=null?o:[];return ml(n,s,e,"left")},Se(e.options,Vt,"getLeftHeaderGroups")),e.getRightHeaderGroups=Ce(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(n,t,r)=>{var o;const s=(o=r==null?void 0:r.map(a=>t.find(u=>u.id===a)).filter(Boolean))!=null?o:[];return ml(n,s,e,"right")},Se(e.options,Vt,"getRightHeaderGroups")),e.getFooterGroups=Ce(()=>[e.getHeaderGroups()],n=>[...n].reverse(),Se(e.options,Vt,"getFooterGroups")),e.getLeftFooterGroups=Ce(()=>[e.getLeftHeaderGroups()],n=>[...n].reverse(),Se(e.options,Vt,"getLeftFooterGroups")),e.getCenterFooterGroups=Ce(()=>[e.getCenterHeaderGroups()],n=>[...n].reverse(),Se(e.options,Vt,"getCenterFooterGroups")),e.getRightFooterGroups=Ce(()=>[e.getRightHeaderGroups()],n=>[...n].reverse(),Se(e.options,Vt,"getRightFooterGroups")),e.getFlatHeaders=Ce(()=>[e.getHeaderGroups()],n=>n.map(t=>t.headers).flat(),Se(e.options,Vt,"getFlatHeaders")),e.getLeftFlatHeaders=Ce(()=>[e.getLeftHeaderGroups()],n=>n.map(t=>t.headers).flat(),Se(e.options,Vt,"getLeftFlatHeaders")),e.getCenterFlatHeaders=Ce(()=>[e.getCenterHeaderGroups()],n=>n.map(t=>t.headers).flat(),Se(e.options,Vt,"getCenterFlatHeaders")),e.getRightFlatHeaders=Ce(()=>[e.getRightHeaderGroups()],n=>n.map(t=>t.headers).flat(),Se(e.options,Vt,"getRightFlatHeaders")),e.getCenterLeafHeaders=Ce(()=>[e.getCenterFlatHeaders()],n=>n.filter(t=>{var r;return!((r=t.subHeaders)!=null&&r.length)}),Se(e.options,Vt,"getCenterLeafHeaders")),e.getLeftLeafHeaders=Ce(()=>[e.getLeftFlatHeaders()],n=>n.filter(t=>{var r;return!((r=t.subHeaders)!=null&&r.length)}),Se(e.options,Vt,"getLeftLeafHeaders")),e.getRightLeafHeaders=Ce(()=>[e.getRightFlatHeaders()],n=>n.filter(t=>{var r;return!((r=t.subHeaders)!=null&&r.length)}),Se(e.options,Vt,"getRightLeafHeaders")),e.getLeafHeaders=Ce(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(n,t,r)=>{var o,s,a,u,f,g;return[...(o=(s=n[0])==null?void 0:s.headers)!=null?o:[],...(a=(u=t[0])==null?void 0:u.headers)!=null?a:[],...(f=(g=r[0])==null?void 0:g.headers)!=null?f:[]].map(h=>h.getLeafHeaders()).flat()},Se(e.options,Vt,"getLeafHeaders"))}};function ml(e,n,t,r){var o,s;let a=0;const u=function(_,v){v===void 0&&(v=1),a=Math.max(a,v),_.filter(y=>y.getIsVisible()).forEach(y=>{var C;(C=y.columns)!=null&&C.length&&u(y.columns,v+1)},0)};u(e);let f=[];const g=(_,v)=>{const y={depth:v,id:[r,`${v}`].filter(Boolean).join("_"),headers:[]},C=[];_.forEach(S=>{const T=[...C].reverse()[0],E=S.column.depth===y.depth;let F,L=!1;if(E&&S.column.parent?F=S.column.parent:(F=S.column,L=!0),T&&(T==null?void 0:T.column)===F)T.subHeaders.push(S);else{const O=Db(t,F,{id:[r,v,F.id,S==null?void 0:S.id].filter(Boolean).join("_"),isPlaceholder:L,placeholderId:L?`${C.filter(P=>P.column===F).length}`:void 0,depth:v,index:C.length});O.subHeaders.push(S),C.push(O)}y.headers.push(S),S.headerGroup=y}),f.push(y),v>0&&g(C,v-1)},h=n.map((_,v)=>Db(t,_,{depth:a,index:v}));g(h,a-1),f.reverse();const p=_=>_.filter(y=>y.column.getIsVisible()).map(y=>{let C=0,S=0,T=[0];y.subHeaders&&y.subHeaders.length?(T=[],p(y.subHeaders).forEach(F=>{let{colSpan:L,rowSpan:O}=F;C+=L,T.push(O)})):C=1;const E=Math.min(...T);return S=S+E,y.colSpan=C,y.rowSpan=S,{colSpan:C,rowSpan:S}});return p((o=(s=f[0])==null?void 0:s.headers)!=null?o:[]),f}const di=(e,n,t,r,o,s,a)=>{let u={id:n,index:r,original:t,depth:o,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:f=>{if(u._valuesCache.hasOwnProperty(f))return u._valuesCache[f];const g=e.getColumn(f);if(g!=null&&g.accessorFn)return u._valuesCache[f]=g.accessorFn(u.original,r),u._valuesCache[f]},getUniqueValues:f=>{if(u._uniqueValuesCache.hasOwnProperty(f))return u._uniqueValuesCache[f];const g=e.getColumn(f);if(g!=null&&g.accessorFn)return g.columnDef.getUniqueValues?(u._uniqueValuesCache[f]=g.columnDef.getUniqueValues(u.original,r),u._uniqueValuesCache[f]):(u._uniqueValuesCache[f]=[u.getValue(f)],u._uniqueValuesCache[f])},renderValue:f=>{var g;return(g=u.getValue(f))!=null?g:e.options.renderFallbackValue},subRows:s??[],getLeafRows:()=>Pb(u.subRows,f=>f.subRows),getParentRow:()=>u.parentId?e.getRow(u.parentId,!0):void 0,getParentRows:()=>{let f=[],g=u;for(;;){const h=g.getParentRow();if(!h)break;f.push(h),g=h}return f.reverse()},getAllCells:Ce(()=>[e.getAllLeafColumns()],f=>f.map(g=>xE(e,u,g,g.id)),Se(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:Ce(()=>[u.getAllCells()],f=>f.reduce((g,h)=>(g[h.column.id]=h,g),{}),Se(e.options,"debugRows","getAllCellsByColumnId"))};for(let f=0;f<e._features.length;f++){const g=e._features[f];g==null||g.createRow==null||g.createRow(u,e)}return u},AE={createColumn:(e,n)=>{e._getFacetedRowModel=n.options.getFacetedRowModel&&n.options.getFacetedRowModel(n,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():n.getPreFilteredRowModel(),e._getFacetedUniqueValues=n.options.getFacetedUniqueValues&&n.options.getFacetedUniqueValues(n,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=n.options.getFacetedMinMaxValues&&n.options.getFacetedMinMaxValues(n,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},kb=(e,n,t)=>{var r,o;const s=t==null||(r=t.toString())==null?void 0:r.toLowerCase();return!!(!((o=e.getValue(n))==null||(o=o.toString())==null||(o=o.toLowerCase())==null)&&o.includes(s))};kb.autoRemove=e=>Dn(e);const Lb=(e,n,t)=>{var r;return!!(!((r=e.getValue(n))==null||(r=r.toString())==null)&&r.includes(t))};Lb.autoRemove=e=>Dn(e);const Nb=(e,n,t)=>{var r;return((r=e.getValue(n))==null||(r=r.toString())==null?void 0:r.toLowerCase())===(t==null?void 0:t.toLowerCase())};Nb.autoRemove=e=>Dn(e);const zb=(e,n,t)=>{var r;return(r=e.getValue(n))==null?void 0:r.includes(t)};zb.autoRemove=e=>Dn(e)||!(e!=null&&e.length);const Rb=(e,n,t)=>!t.some(r=>{var o;return!((o=e.getValue(n))!=null&&o.includes(r))});Rb.autoRemove=e=>Dn(e)||!(e!=null&&e.length);const Bb=(e,n,t)=>t.some(r=>{var o;return(o=e.getValue(n))==null?void 0:o.includes(r)});Bb.autoRemove=e=>Dn(e)||!(e!=null&&e.length);const Vb=(e,n,t)=>e.getValue(n)===t;Vb.autoRemove=e=>Dn(e);const $b=(e,n,t)=>e.getValue(n)==t;$b.autoRemove=e=>Dn(e);const qd=(e,n,t)=>{let[r,o]=t;const s=e.getValue(n);return s>=r&&s<=o};qd.resolveFilterValue=e=>{let[n,t]=e,r=typeof n!="number"?parseFloat(n):n,o=typeof t!="number"?parseFloat(t):t,s=n===null||Number.isNaN(r)?-1/0:r,a=t===null||Number.isNaN(o)?1/0:o;if(s>a){const u=s;s=a,a=u}return[s,a]},qd.autoRemove=e=>Dn(e)||Dn(e[0])&&Dn(e[1]);const Gn={includesString:kb,includesStringSensitive:Lb,equalsString:Nb,arrIncludes:zb,arrIncludesAll:Rb,arrIncludesSome:Bb,equals:Vb,weakEquals:$b,inNumberRange:qd};function Dn(e){return e==null||e===""}const OE={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:un("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,n)=>{e.getAutoFilterFn=()=>{const t=n.getCoreRowModel().flatRows[0],r=t==null?void 0:t.getValue(e.id);return typeof r=="string"?Gn.includesString:typeof r=="number"?Gn.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Gn.equals:Array.isArray(r)?Gn.arrIncludes:Gn.weakEquals},e.getFilterFn=()=>{var t,r;return vl(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(t=(r=n.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?t:Gn[e.columnDef.filterFn]},e.getCanFilter=()=>{var t,r,o;return((t=e.columnDef.enableColumnFilter)!=null?t:!0)&&((r=n.options.enableColumnFilters)!=null?r:!0)&&((o=n.options.enableFilters)!=null?o:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var t;return(t=n.getState().columnFilters)==null||(t=t.find(r=>r.id===e.id))==null?void 0:t.value},e.getFilterIndex=()=>{var t,r;return(t=(r=n.getState().columnFilters)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?t:-1},e.setFilterValue=t=>{n.setColumnFilters(r=>{const o=e.getFilterFn(),s=r==null?void 0:r.find(h=>h.id===e.id),a=br(t,s?s.value:void 0);if(Hb(o,a,e)){var u;return(u=r==null?void 0:r.filter(h=>h.id!==e.id))!=null?u:[]}const f={id:e.id,value:a};if(s){var g;return(g=r==null?void 0:r.map(h=>h.id===e.id?f:h))!=null?g:[]}return r!=null&&r.length?[...r,f]:[f]})}},createRow:(e,n)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=n=>{const t=e.getAllLeafColumns(),r=o=>{var s;return(s=br(n,o))==null?void 0:s.filter(a=>{const u=t.find(f=>f.id===a.id);if(u){const f=u.getFilterFn();if(Hb(f,a.value,u))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=n=>{var t,r;e.setColumnFilters(n?[]:(t=(r=e.initialState)==null?void 0:r.columnFilters)!=null?t:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function Hb(e,n,t){return(e&&e.autoRemove?e.autoRemove(n,t):!1)||typeof n>"u"||typeof n=="string"&&!n}const _l={sum:(e,n,t)=>t.reduce((r,o)=>{const s=o.getValue(e);return r+(typeof s=="number"?s:0)},0),min:(e,n,t)=>{let r;return t.forEach(o=>{const s=o.getValue(e);s!=null&&(r>s||r===void 0&&s>=s)&&(r=s)}),r},max:(e,n,t)=>{let r;return t.forEach(o=>{const s=o.getValue(e);s!=null&&(r<s||r===void 0&&s>=s)&&(r=s)}),r},extent:(e,n,t)=>{let r,o;return t.forEach(s=>{const a=s.getValue(e);a!=null&&(r===void 0?a>=a&&(r=o=a):(r>a&&(r=a),o<a&&(o=a)))}),[r,o]},mean:(e,n)=>{let t=0,r=0;if(n.forEach(o=>{let s=o.getValue(e);s!=null&&(s=+s)>=s&&(++t,r+=s)}),t)return r/t},median:(e,n)=>{if(!n.length)return;const t=n.map(s=>s.getValue(e));if(!ME(t))return;if(t.length===1)return t[0];const r=Math.floor(t.length/2),o=t.sort((s,a)=>s-a);return t.length%2!==0?o[r]:(o[r-1]+o[r])/2},unique:(e,n)=>Array.from(new Set(n.map(t=>t.getValue(e))).values()),uniqueCount:(e,n)=>new Set(n.map(t=>t.getValue(e))).size,count:(e,n)=>n.length},PE={getDefaultColumnDef:()=>({aggregatedCell:e=>{var n,t;return(n=(t=e.getValue())==null||t.toString==null?void 0:t.toString())!=null?n:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:un("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,n)=>{e.toggleGrouping=()=>{n.setGrouping(t=>t!=null&&t.includes(e.id)?t.filter(r=>r!==e.id):[...t??[],e.id])},e.getCanGroup=()=>{var t,r;return((t=e.columnDef.enableGrouping)!=null?t:!0)&&((r=n.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var t;return(t=n.getState().grouping)==null?void 0:t.includes(e.id)},e.getGroupedIndex=()=>{var t;return(t=n.getState().grouping)==null?void 0:t.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const t=n.getCoreRowModel().flatRows[0],r=t==null?void 0:t.getValue(e.id);if(typeof r=="number")return _l.sum;if(Object.prototype.toString.call(r)==="[object Date]")return _l.extent},e.getAggregationFn=()=>{var t,r;if(!e)throw new Error;return vl(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(t=(r=n.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?t:_l[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=n=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(n),e.resetGrouping=n=>{var t,r;e.setGrouping(n?[]:(t=(r=e.initialState)==null?void 0:r.grouping)!=null?t:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,n)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=t=>{if(e._groupingValuesCache.hasOwnProperty(t))return e._groupingValuesCache[t];const r=n.getColumn(t);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[t]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[t]):e.getValue(t)},e._groupingValuesCache={}},createCell:(e,n,t,r)=>{e.getIsGrouped=()=>n.getIsGrouped()&&n.id===t.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&n.getIsGrouped(),e.getIsAggregated=()=>{var o;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((o=t.subRows)!=null&&o.length)}}};function DE(e,n,t){if(!(n!=null&&n.length)||!t)return e;const r=e.filter(s=>!n.includes(s.id));return t==="remove"?r:[...n.map(s=>e.find(a=>a.id===s)).filter(Boolean),...r]}const kE={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:un("columnOrder",e)}),createColumn:(e,n)=>{e.getIndex=Ce(t=>[no(n,t)],t=>t.findIndex(r=>r.id===e.id),Se(n.options,"debugColumns","getIndex")),e.getIsFirstColumn=t=>{var r;return((r=no(n,t)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=t=>{var r;const o=no(n,t);return((r=o[o.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=n=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(n),e.resetColumnOrder=n=>{var t;e.setColumnOrder(n?[]:(t=e.initialState.columnOrder)!=null?t:[])},e._getOrderColumnsFn=Ce(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(n,t,r)=>o=>{let s=[];if(!(n!=null&&n.length))s=o;else{const a=[...n],u=[...o];for(;u.length&&a.length;){const f=a.shift(),g=u.findIndex(h=>h.id===f);g>-1&&s.push(u.splice(g,1)[0])}s=[...s,...u]}return DE(s,t,r)},Se(e.options,"debugTable","_getOrderColumnsFn"))}},Gd=()=>({left:[],right:[]}),LE={getInitialState:e=>({columnPinning:Gd(),...e}),getDefaultOptions:e=>({onColumnPinningChange:un("columnPinning",e)}),createColumn:(e,n)=>{e.pin=t=>{const r=e.getLeafColumns().map(o=>o.id).filter(Boolean);n.setColumnPinning(o=>{var s,a;if(t==="right"){var u,f;return{left:((u=o==null?void 0:o.left)!=null?u:[]).filter(p=>!(r!=null&&r.includes(p))),right:[...((f=o==null?void 0:o.right)!=null?f:[]).filter(p=>!(r!=null&&r.includes(p))),...r]}}if(t==="left"){var g,h;return{left:[...((g=o==null?void 0:o.left)!=null?g:[]).filter(p=>!(r!=null&&r.includes(p))),...r],right:((h=o==null?void 0:o.right)!=null?h:[]).filter(p=>!(r!=null&&r.includes(p)))}}return{left:((s=o==null?void 0:o.left)!=null?s:[]).filter(p=>!(r!=null&&r.includes(p))),right:((a=o==null?void 0:o.right)!=null?a:[]).filter(p=>!(r!=null&&r.includes(p)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var o,s,a;return((o=r.columnDef.enablePinning)!=null?o:!0)&&((s=(a=n.options.enableColumnPinning)!=null?a:n.options.enablePinning)!=null?s:!0)}),e.getIsPinned=()=>{const t=e.getLeafColumns().map(u=>u.id),{left:r,right:o}=n.getState().columnPinning,s=t.some(u=>r==null?void 0:r.includes(u)),a=t.some(u=>o==null?void 0:o.includes(u));return s?"left":a?"right":!1},e.getPinnedIndex=()=>{var t,r;const o=e.getIsPinned();return o?(t=(r=n.getState().columnPinning)==null||(r=r[o])==null?void 0:r.indexOf(e.id))!=null?t:-1:0}},createRow:(e,n)=>{e.getCenterVisibleCells=Ce(()=>[e._getAllVisibleCells(),n.getState().columnPinning.left,n.getState().columnPinning.right],(t,r,o)=>{const s=[...r??[],...o??[]];return t.filter(a=>!s.includes(a.column.id))},Se(n.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=Ce(()=>[e._getAllVisibleCells(),n.getState().columnPinning.left],(t,r)=>(r??[]).map(s=>t.find(a=>a.column.id===s)).filter(Boolean).map(s=>({...s,position:"left"})),Se(n.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=Ce(()=>[e._getAllVisibleCells(),n.getState().columnPinning.right],(t,r)=>(r??[]).map(s=>t.find(a=>a.column.id===s)).filter(Boolean).map(s=>({...s,position:"right"})),Se(n.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=n=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(n),e.resetColumnPinning=n=>{var t,r;return e.setColumnPinning(n?Gd():(t=(r=e.initialState)==null?void 0:r.columnPinning)!=null?t:Gd())},e.getIsSomeColumnsPinned=n=>{var t;const r=e.getState().columnPinning;if(!n){var o,s;return!!((o=r.left)!=null&&o.length||(s=r.right)!=null&&s.length)}return!!((t=r[n])!=null&&t.length)},e.getLeftLeafColumns=Ce(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(n,t)=>(t??[]).map(r=>n.find(o=>o.id===r)).filter(Boolean),Se(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=Ce(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(n,t)=>(t??[]).map(r=>n.find(o=>o.id===r)).filter(Boolean),Se(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=Ce(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,t,r)=>{const o=[...t??[],...r??[]];return n.filter(s=>!o.includes(s.id))},Se(e.options,"debugColumns","getCenterLeafColumns"))}},bl={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Ud=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),NE={getDefaultColumnDef:()=>bl,getInitialState:e=>({columnSizing:{},columnSizingInfo:Ud(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:un("columnSizing",e),onColumnSizingInfoChange:un("columnSizingInfo",e)}),createColumn:(e,n)=>{e.getSize=()=>{var t,r,o;const s=n.getState().columnSizing[e.id];return Math.min(Math.max((t=e.columnDef.minSize)!=null?t:bl.minSize,(r=s??e.columnDef.size)!=null?r:bl.size),(o=e.columnDef.maxSize)!=null?o:bl.maxSize)},e.getStart=Ce(t=>[t,no(n,t),n.getState().columnSizing],(t,r)=>r.slice(0,e.getIndex(t)).reduce((o,s)=>o+s.getSize(),0),Se(n.options,"debugColumns","getStart")),e.getAfter=Ce(t=>[t,no(n,t),n.getState().columnSizing],(t,r)=>r.slice(e.getIndex(t)+1).reduce((o,s)=>o+s.getSize(),0),Se(n.options,"debugColumns","getAfter")),e.resetSize=()=>{n.setColumnSizing(t=>{let{[e.id]:r,...o}=t;return o})},e.getCanResize=()=>{var t,r;return((t=e.columnDef.enableResizing)!=null?t:!0)&&((r=n.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>n.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,n)=>{e.getSize=()=>{let t=0;const r=o=>{if(o.subHeaders.length)o.subHeaders.forEach(r);else{var s;t+=(s=o.column.getSize())!=null?s:0}};return r(e),t},e.getStart=()=>{if(e.index>0){const t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},e.getResizeHandler=t=>{const r=n.getColumn(e.column.id),o=r==null?void 0:r.getCanResize();return s=>{if(!r||!o||(s.persist==null||s.persist(),Wd(s)&&s.touches&&s.touches.length>1))return;const a=e.getSize(),u=e?e.getLeafHeaders().map(T=>[T.column.id,T.column.getSize()]):[[r.id,r.getSize()]],f=Wd(s)?Math.round(s.touches[0].clientX):s.clientX,g={},h=(T,E)=>{typeof E=="number"&&(n.setColumnSizingInfo(F=>{var L,O;const P=n.options.columnResizeDirection==="rtl"?-1:1,k=(E-((L=F==null?void 0:F.startOffset)!=null?L:0))*P,z=Math.max(k/((O=F==null?void 0:F.startSize)!=null?O:0),-.999999);return F.columnSizingStart.forEach(j=>{let[$,H]=j;g[$]=Math.round(Math.max(H+H*z,0)*100)/100}),{...F,deltaOffset:k,deltaPercentage:z}}),(n.options.columnResizeMode==="onChange"||T==="end")&&n.setColumnSizing(F=>({...F,...g})))},p=T=>h("move",T),_=T=>{h("end",T),n.setColumnSizingInfo(E=>({...E,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},v=t||typeof document<"u"?document:null,y={moveHandler:T=>p(T.clientX),upHandler:T=>{v==null||v.removeEventListener("mousemove",y.moveHandler),v==null||v.removeEventListener("mouseup",y.upHandler),_(T.clientX)}},C={moveHandler:T=>(T.cancelable&&(T.preventDefault(),T.stopPropagation()),p(T.touches[0].clientX),!1),upHandler:T=>{var E;v==null||v.removeEventListener("touchmove",C.moveHandler),v==null||v.removeEventListener("touchend",C.upHandler),T.cancelable&&(T.preventDefault(),T.stopPropagation()),_((E=T.touches[0])==null?void 0:E.clientX)}},S=zE()?{passive:!1}:!1;Wd(s)?(v==null||v.addEventListener("touchmove",C.moveHandler,S),v==null||v.addEventListener("touchend",C.upHandler,S)):(v==null||v.addEventListener("mousemove",y.moveHandler,S),v==null||v.addEventListener("mouseup",y.upHandler,S)),n.setColumnSizingInfo(T=>({...T,startOffset:f,startSize:a,deltaOffset:0,deltaPercentage:0,columnSizingStart:u,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=n=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(n),e.setColumnSizingInfo=n=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(n),e.resetColumnSizing=n=>{var t;e.setColumnSizing(n?{}:(t=e.initialState.columnSizing)!=null?t:{})},e.resetHeaderSizeInfo=n=>{var t;e.setColumnSizingInfo(n?Ud():(t=e.initialState.columnSizingInfo)!=null?t:Ud())},e.getTotalSize=()=>{var n,t;return(n=(t=e.getHeaderGroups()[0])==null?void 0:t.headers.reduce((r,o)=>r+o.getSize(),0))!=null?n:0},e.getLeftTotalSize=()=>{var n,t;return(n=(t=e.getLeftHeaderGroups()[0])==null?void 0:t.headers.reduce((r,o)=>r+o.getSize(),0))!=null?n:0},e.getCenterTotalSize=()=>{var n,t;return(n=(t=e.getCenterHeaderGroups()[0])==null?void 0:t.headers.reduce((r,o)=>r+o.getSize(),0))!=null?n:0},e.getRightTotalSize=()=>{var n,t;return(n=(t=e.getRightHeaderGroups()[0])==null?void 0:t.headers.reduce((r,o)=>r+o.getSize(),0))!=null?n:0}}};let yl=null;function zE(){if(typeof yl=="boolean")return yl;let e=!1;try{const n={get passive(){return e=!0,!1}},t=()=>{};window.addEventListener("test",t,n),window.removeEventListener("test",t)}catch{e=!1}return yl=e,yl}function Wd(e){return e.type==="touchstart"}const RE={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:un("columnVisibility",e)}),createColumn:(e,n)=>{e.toggleVisibility=t=>{e.getCanHide()&&n.setColumnVisibility(r=>({...r,[e.id]:t??!e.getIsVisible()}))},e.getIsVisible=()=>{var t,r;const o=e.columns;return(t=o.length?o.some(s=>s.getIsVisible()):(r=n.getState().columnVisibility)==null?void 0:r[e.id])!=null?t:!0},e.getCanHide=()=>{var t,r;return((t=e.columnDef.enableHiding)!=null?t:!0)&&((r=n.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>t=>{e.toggleVisibility==null||e.toggleVisibility(t.target.checked)}},createRow:(e,n)=>{e._getAllVisibleCells=Ce(()=>[e.getAllCells(),n.getState().columnVisibility],t=>t.filter(r=>r.column.getIsVisible()),Se(n.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=Ce(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(t,r,o)=>[...t,...r,...o],Se(n.options,"debugRows","getVisibleCells"))},createTable:e=>{const n=(t,r)=>Ce(()=>[r(),r().filter(o=>o.getIsVisible()).map(o=>o.id).join("_")],o=>o.filter(s=>s.getIsVisible==null?void 0:s.getIsVisible()),Se(e.options,"debugColumns",t));e.getVisibleFlatColumns=n("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=n("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=n("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=n("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=n("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=t=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(t),e.resetColumnVisibility=t=>{var r;e.setColumnVisibility(t?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=t=>{var r;t=(r=t)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((o,s)=>({...o,[s.id]:t||!(s.getCanHide!=null&&s.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(t=>!(t.getIsVisible!=null&&t.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(t=>t.getIsVisible==null?void 0:t.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>t=>{var r;e.toggleAllColumnsVisible((r=t.target)==null?void 0:r.checked)}}};function no(e,n){return n?n==="center"?e.getCenterVisibleLeafColumns():n==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const BE={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},VE={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:un("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:n=>{var t;const r=(t=e.getCoreRowModel().flatRows[0])==null||(t=t._getAllCellsByColumnId()[n.id])==null?void 0:t.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,n)=>{e.getCanGlobalFilter=()=>{var t,r,o,s;return((t=e.columnDef.enableGlobalFilter)!=null?t:!0)&&((r=n.options.enableGlobalFilter)!=null?r:!0)&&((o=n.options.enableFilters)!=null?o:!0)&&((s=n.options.getColumnCanGlobalFilter==null?void 0:n.options.getColumnCanGlobalFilter(e))!=null?s:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Gn.includesString,e.getGlobalFilterFn=()=>{var n,t;const{globalFilterFn:r}=e.options;return vl(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(n=(t=e.options.filterFns)==null?void 0:t[r])!=null?n:Gn[r]},e.setGlobalFilter=n=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(n)},e.resetGlobalFilter=n=>{e.setGlobalFilter(n?void 0:e.initialState.globalFilter)}}},$E={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:un("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let n=!1,t=!1;e._autoResetExpanded=()=>{var r,o;if(!n){e._queue(()=>{n=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(t)return;t=!0,e._queue(()=>{e.resetExpanded(),t=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var o,s;e.setExpanded(r?{}:(o=(s=e.initialState)==null?void 0:s.expanded)!=null?o:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(o=>!o.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(s=>{const a=s.split(".");r=Math.max(r,a.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,n)=>{e.toggleExpanded=t=>{n.setExpanded(r=>{var o;const s=r===!0?!0:!!(r!=null&&r[e.id]);let a={};if(r===!0?Object.keys(n.getRowModel().rowsById).forEach(u=>{a[u]=!0}):a=r,t=(o=t)!=null?o:!s,!s&&t)return{...a,[e.id]:!0};if(s&&!t){const{[e.id]:u,...f}=a;return f}return r})},e.getIsExpanded=()=>{var t;const r=n.getState().expanded;return!!((t=n.options.getIsRowExpanded==null?void 0:n.options.getIsRowExpanded(e))!=null?t:r===!0||r!=null&&r[e.id])},e.getCanExpand=()=>{var t,r,o;return(t=n.options.getRowCanExpand==null?void 0:n.options.getRowCanExpand(e))!=null?t:((r=n.options.enableExpanding)!=null?r:!0)&&!!((o=e.subRows)!=null&&o.length)},e.getIsAllParentsExpanded=()=>{let t=!0,r=e;for(;t&&r.parentId;)r=n.getRow(r.parentId,!0),t=r.getIsExpanded();return t},e.getToggleExpandedHandler=()=>{const t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},Kd=0,Jd=10,Yd=()=>({pageIndex:Kd,pageSize:Jd}),HE={getInitialState:e=>({...e,pagination:{...Yd(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:un("pagination",e)}),createTable:e=>{let n=!1,t=!1;e._autoResetPageIndex=()=>{var r,o;if(!n){e._queue(()=>{n=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(t)return;t=!0,e._queue(()=>{e.resetPageIndex(),t=!1})}},e.setPagination=r=>{const o=s=>br(r,s);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(o)},e.resetPagination=r=>{var o;e.setPagination(r?Yd():(o=e.initialState.pagination)!=null?o:Yd())},e.setPageIndex=r=>{e.setPagination(o=>{let s=br(r,o.pageIndex);const a=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return s=Math.max(0,Math.min(s,a)),{...o,pageIndex:s}})},e.resetPageIndex=r=>{var o,s;e.setPageIndex(r?Kd:(o=(s=e.initialState)==null||(s=s.pagination)==null?void 0:s.pageIndex)!=null?o:Kd)},e.resetPageSize=r=>{var o,s;e.setPageSize(r?Jd:(o=(s=e.initialState)==null||(s=s.pagination)==null?void 0:s.pageSize)!=null?o:Jd)},e.setPageSize=r=>{e.setPagination(o=>{const s=Math.max(1,br(r,o.pageSize)),a=o.pageSize*o.pageIndex,u=Math.floor(a/s);return{...o,pageIndex:u,pageSize:s}})},e.setPageCount=r=>e.setPagination(o=>{var s;let a=br(r,(s=e.options.pageCount)!=null?s:-1);return typeof a=="number"&&(a=Math.max(-1,a)),{...o,pageCount:a}}),e.getPageOptions=Ce(()=>[e.getPageCount()],r=>{let o=[];return r&&r>0&&(o=[...new Array(r)].fill(null).map((s,a)=>a)),o},Se(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,o=e.getPageCount();return o===-1?!0:o===0?!1:r<o-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},Zd=()=>({top:[],bottom:[]}),jE={getInitialState:e=>({rowPinning:Zd(),...e}),getDefaultOptions:e=>({onRowPinningChange:un("rowPinning",e)}),createRow:(e,n)=>{e.pin=(t,r,o)=>{const s=r?e.getLeafRows().map(f=>{let{id:g}=f;return g}):[],a=o?e.getParentRows().map(f=>{let{id:g}=f;return g}):[],u=new Set([...a,e.id,...s]);n.setRowPinning(f=>{var g,h;if(t==="bottom"){var p,_;return{top:((p=f==null?void 0:f.top)!=null?p:[]).filter(C=>!(u!=null&&u.has(C))),bottom:[...((_=f==null?void 0:f.bottom)!=null?_:[]).filter(C=>!(u!=null&&u.has(C))),...Array.from(u)]}}if(t==="top"){var v,y;return{top:[...((v=f==null?void 0:f.top)!=null?v:[]).filter(C=>!(u!=null&&u.has(C))),...Array.from(u)],bottom:((y=f==null?void 0:f.bottom)!=null?y:[]).filter(C=>!(u!=null&&u.has(C)))}}return{top:((g=f==null?void 0:f.top)!=null?g:[]).filter(C=>!(u!=null&&u.has(C))),bottom:((h=f==null?void 0:f.bottom)!=null?h:[]).filter(C=>!(u!=null&&u.has(C)))}})},e.getCanPin=()=>{var t;const{enableRowPinning:r,enablePinning:o}=n.options;return typeof r=="function"?r(e):(t=r??o)!=null?t:!0},e.getIsPinned=()=>{const t=[e.id],{top:r,bottom:o}=n.getState().rowPinning,s=t.some(u=>r==null?void 0:r.includes(u)),a=t.some(u=>o==null?void 0:o.includes(u));return s?"top":a?"bottom":!1},e.getPinnedIndex=()=>{var t,r;const o=e.getIsPinned();if(!o)return-1;const s=(t=o==="top"?n.getTopRows():n.getBottomRows())==null?void 0:t.map(a=>{let{id:u}=a;return u});return(r=s==null?void 0:s.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=n=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(n),e.resetRowPinning=n=>{var t,r;return e.setRowPinning(n?Zd():(t=(r=e.initialState)==null?void 0:r.rowPinning)!=null?t:Zd())},e.getIsSomeRowsPinned=n=>{var t;const r=e.getState().rowPinning;if(!n){var o,s;return!!((o=r.top)!=null&&o.length||(s=r.bottom)!=null&&s.length)}return!!((t=r[n])!=null&&t.length)},e._getPinnedRows=(n,t,r)=>{var o;return((o=e.options.keepPinnedRows)==null||o?(t??[]).map(a=>{const u=e.getRow(a,!0);return u.getIsAllParentsExpanded()?u:null}):(t??[]).map(a=>n.find(u=>u.id===a))).filter(Boolean).map(a=>({...a,position:r}))},e.getTopRows=Ce(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(n,t)=>e._getPinnedRows(n,t,"top"),Se(e.options,"debugRows","getTopRows")),e.getBottomRows=Ce(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(n,t)=>e._getPinnedRows(n,t,"bottom"),Se(e.options,"debugRows","getBottomRows")),e.getCenterRows=Ce(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(n,t,r)=>{const o=new Set([...t??[],...r??[]]);return n.filter(s=>!o.has(s.id))},Se(e.options,"debugRows","getCenterRows"))}},qE={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:un("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=n=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(n),e.resetRowSelection=n=>{var t;return e.setRowSelection(n?{}:(t=e.initialState.rowSelection)!=null?t:{})},e.toggleAllRowsSelected=n=>{e.setRowSelection(t=>{n=typeof n<"u"?n:!e.getIsAllRowsSelected();const r={...t},o=e.getPreGroupedRowModel().flatRows;return n?o.forEach(s=>{s.getCanSelect()&&(r[s.id]=!0)}):o.forEach(s=>{delete r[s.id]}),r})},e.toggleAllPageRowsSelected=n=>e.setRowSelection(t=>{const r=typeof n<"u"?n:!e.getIsAllPageRowsSelected(),o={...t};return e.getRowModel().rows.forEach(s=>{Xd(o,s.id,r,!0,e)}),o}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=Ce(()=>[e.getState().rowSelection,e.getCoreRowModel()],(n,t)=>Object.keys(n).length?Qd(e,t):{rows:[],flatRows:[],rowsById:{}},Se(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=Ce(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(n,t)=>Object.keys(n).length?Qd(e,t):{rows:[],flatRows:[],rowsById:{}},Se(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=Ce(()=>[e.getState().rowSelection,e.getSortedRowModel()],(n,t)=>Object.keys(n).length?Qd(e,t):{rows:[],flatRows:[],rowsById:{}},Se(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{const n=e.getFilteredRowModel().flatRows,{rowSelection:t}=e.getState();let r=!!(n.length&&Object.keys(t).length);return r&&n.some(o=>o.getCanSelect()&&!t[o.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const n=e.getPaginationRowModel().flatRows.filter(o=>o.getCanSelect()),{rowSelection:t}=e.getState();let r=!!n.length;return r&&n.some(o=>!t[o.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var n;const t=Object.keys((n=e.getState().rowSelection)!=null?n:{}).length;return t>0&&t<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const n=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:n.filter(t=>t.getCanSelect()).some(t=>t.getIsSelected()||t.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>n=>{e.toggleAllRowsSelected(n.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>n=>{e.toggleAllPageRowsSelected(n.target.checked)}},createRow:(e,n)=>{e.toggleSelected=(t,r)=>{const o=e.getIsSelected();n.setRowSelection(s=>{var a;if(t=typeof t<"u"?t:!o,e.getCanSelect()&&o===t)return s;const u={...s};return Xd(u,e.id,t,(a=r==null?void 0:r.selectChildren)!=null?a:!0,n),u})},e.getIsSelected=()=>{const{rowSelection:t}=n.getState();return ef(e,t)},e.getIsSomeSelected=()=>{const{rowSelection:t}=n.getState();return tf(e,t)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:t}=n.getState();return tf(e,t)==="all"},e.getCanSelect=()=>{var t;return typeof n.options.enableRowSelection=="function"?n.options.enableRowSelection(e):(t=n.options.enableRowSelection)!=null?t:!0},e.getCanSelectSubRows=()=>{var t;return typeof n.options.enableSubRowSelection=="function"?n.options.enableSubRowSelection(e):(t=n.options.enableSubRowSelection)!=null?t:!0},e.getCanMultiSelect=()=>{var t;return typeof n.options.enableMultiRowSelection=="function"?n.options.enableMultiRowSelection(e):(t=n.options.enableMultiRowSelection)!=null?t:!0},e.getToggleSelectedHandler=()=>{const t=e.getCanSelect();return r=>{var o;t&&e.toggleSelected((o=r.target)==null?void 0:o.checked)}}}},Xd=(e,n,t,r,o)=>{var s;const a=o.getRow(n,!0);t?(a.getCanMultiSelect()||Object.keys(e).forEach(u=>delete e[u]),a.getCanSelect()&&(e[n]=!0)):delete e[n],r&&(s=a.subRows)!=null&&s.length&&a.getCanSelectSubRows()&&a.subRows.forEach(u=>Xd(e,u.id,t,r,o))};function Qd(e,n){const t=e.getState().rowSelection,r=[],o={},s=function(a,u){return a.map(f=>{var g;const h=ef(f,t);if(h&&(r.push(f),o[f.id]=f),(g=f.subRows)!=null&&g.length&&(f={...f,subRows:s(f.subRows)}),h)return f}).filter(Boolean)};return{rows:s(n.rows),flatRows:r,rowsById:o}}function ef(e,n){var t;return(t=n[e.id])!=null?t:!1}function tf(e,n,t){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let o=!0,s=!1;return e.subRows.forEach(a=>{if(!(s&&!o)&&(a.getCanSelect()&&(ef(a,n)?s=!0:o=!1),a.subRows&&a.subRows.length)){const u=tf(a,n);u==="all"?s=!0:(u==="some"&&(s=!0),o=!1)}}),o?"all":s?"some":!1}const nf=/([0-9]+)/gm,GE=(e,n,t)=>jb(yr(e.getValue(t)).toLowerCase(),yr(n.getValue(t)).toLowerCase()),UE=(e,n,t)=>jb(yr(e.getValue(t)),yr(n.getValue(t))),WE=(e,n,t)=>rf(yr(e.getValue(t)).toLowerCase(),yr(n.getValue(t)).toLowerCase()),KE=(e,n,t)=>rf(yr(e.getValue(t)),yr(n.getValue(t))),JE=(e,n,t)=>{const r=e.getValue(t),o=n.getValue(t);return r>o?1:r<o?-1:0},YE=(e,n,t)=>rf(e.getValue(t),n.getValue(t));function rf(e,n){return e===n?0:e>n?1:-1}function yr(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function jb(e,n){const t=e.split(nf).filter(Boolean),r=n.split(nf).filter(Boolean);for(;t.length&&r.length;){const o=t.shift(),s=r.shift(),a=parseInt(o,10),u=parseInt(s,10),f=[a,u].sort();if(isNaN(f[0])){if(o>s)return 1;if(s>o)return-1;continue}if(isNaN(f[1]))return isNaN(a)?-1:1;if(a>u)return 1;if(u>a)return-1}return t.length-r.length}const jr={alphanumeric:GE,alphanumericCaseSensitive:UE,text:WE,textCaseSensitive:KE,datetime:JE,basic:YE},ZE=[FE,RE,kE,LE,AE,OE,BE,VE,{getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:un("sorting",e),isMultiSortEvent:n=>n.shiftKey}),createColumn:(e,n)=>{e.getAutoSortingFn=()=>{const t=n.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const o of t){const s=o==null?void 0:o.getValue(e.id);if(Object.prototype.toString.call(s)==="[object Date]")return jr.datetime;if(typeof s=="string"&&(r=!0,s.split(nf).length>1))return jr.alphanumeric}return r?jr.text:jr.basic},e.getAutoSortDir=()=>{const t=n.getFilteredRowModel().flatRows[0];return typeof(t==null?void 0:t.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var t,r;if(!e)throw new Error;return vl(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(t=(r=n.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?t:jr[e.columnDef.sortingFn]},e.toggleSorting=(t,r)=>{const o=e.getNextSortingOrder(),s=typeof t<"u"&&t!==null;n.setSorting(a=>{const u=a==null?void 0:a.find(v=>v.id===e.id),f=a==null?void 0:a.findIndex(v=>v.id===e.id);let g=[],h,p=s?t:o==="desc";if(a!=null&&a.length&&e.getCanMultiSort()&&r?u?h="toggle":h="add":a!=null&&a.length&&f!==a.length-1?h="replace":u?h="toggle":h="replace",h==="toggle"&&(s||o||(h="remove")),h==="add"){var _;g=[...a,{id:e.id,desc:p}],g.splice(0,g.length-((_=n.options.maxMultiSortColCount)!=null?_:Number.MAX_SAFE_INTEGER))}else h==="toggle"?g=a.map(v=>v.id===e.id?{...v,desc:p}:v):h==="remove"?g=a.filter(v=>v.id!==e.id):g=[{id:e.id,desc:p}];return g})},e.getFirstSortDir=()=>{var t,r;return((t=(r=e.columnDef.sortDescFirst)!=null?r:n.options.sortDescFirst)!=null?t:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=t=>{var r,o;const s=e.getFirstSortDir(),a=e.getIsSorted();return a?a!==s&&((r=n.options.enableSortingRemoval)==null||r)&&(!(t&&(o=n.options.enableMultiRemove)!=null)||o)?!1:a==="desc"?"asc":"desc":s},e.getCanSort=()=>{var t,r;return((t=e.columnDef.enableSorting)!=null?t:!0)&&((r=n.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var t,r;return(t=(r=e.columnDef.enableMultiSort)!=null?r:n.options.enableMultiSort)!=null?t:!!e.accessorFn},e.getIsSorted=()=>{var t;const r=(t=n.getState().sorting)==null?void 0:t.find(o=>o.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var t,r;return(t=(r=n.getState().sorting)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?t:-1},e.clearSorting=()=>{n.setSorting(t=>t!=null&&t.length?t.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const t=e.getCanSort();return r=>{t&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?n.options.isMultiSortEvent==null?void 0:n.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=n=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(n),e.resetSorting=n=>{var t,r;e.setSorting(n?[]:(t=(r=e.initialState)==null?void 0:r.sorting)!=null?t:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},PE,$E,HE,jE,qE,NE];function XE(e){var n,t;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const r=[...ZE,...(n=e._features)!=null?n:[]];let o={_features:r};const s=o._features.reduce((_,v)=>Object.assign(_,v.getDefaultOptions==null?void 0:v.getDefaultOptions(o)),{}),a=_=>o.options.mergeOptions?o.options.mergeOptions(s,_):{...s,..._};let f={...{},...(t=e.initialState)!=null?t:{}};o._features.forEach(_=>{var v;f=(v=_.getInitialState==null?void 0:_.getInitialState(f))!=null?v:f});const g=[];let h=!1;const p={_features:r,options:{...s,...e},initialState:f,_queue:_=>{g.push(_),h||(h=!0,Promise.resolve().then(()=>{for(;g.length;)g.shift()();h=!1}).catch(v=>setTimeout(()=>{throw v})))},reset:()=>{o.setState(o.initialState)},setOptions:_=>{const v=br(_,o.options);o.options=a(v)},getState:()=>o.options.state,setState:_=>{o.options.onStateChange==null||o.options.onStateChange(_)},_getRowId:(_,v,y)=>{var C;return(C=o.options.getRowId==null?void 0:o.options.getRowId(_,v,y))!=null?C:`${y?[y.id,v].join("."):v}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(_,v)=>{let y=(v?o.getPrePaginationRowModel():o.getRowModel()).rowsById[_];if(!y&&(y=o.getCoreRowModel().rowsById[_],!y))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${_}`):new Error;return y},_getDefaultColumnDef:Ce(()=>[o.options.defaultColumn],_=>{var v;return _=(v=_)!=null?v:{},{header:y=>{const C=y.header.column.columnDef;return C.accessorKey?C.accessorKey:C.accessorFn?C.id:null},cell:y=>{var C,S;return(C=(S=y.renderValue())==null||S.toString==null?void 0:S.toString())!=null?C:null},...o._features.reduce((y,C)=>Object.assign(y,C.getDefaultColumnDef==null?void 0:C.getDefaultColumnDef()),{}),..._}},Se(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>o.options.columns,getAllColumns:Ce(()=>[o._getColumnDefs()],_=>{const v=function(y,C,S){return S===void 0&&(S=0),y.map(T=>{const E=EE(o,T,S,C),F=T;return E.columns=F.columns?v(F.columns,E,S+1):[],E})};return v(_)},Se(e,"debugColumns","getAllColumns")),getAllFlatColumns:Ce(()=>[o.getAllColumns()],_=>_.flatMap(v=>v.getFlatColumns()),Se(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:Ce(()=>[o.getAllFlatColumns()],_=>_.reduce((v,y)=>(v[y.id]=y,v),{}),Se(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:Ce(()=>[o.getAllColumns(),o._getOrderColumnsFn()],(_,v)=>{let y=_.flatMap(C=>C.getLeafColumns());return v(y)},Se(e,"debugColumns","getAllLeafColumns")),getColumn:_=>{const v=o._getAllFlatColumnsById()[_];return process.env.NODE_ENV!=="production"&&!v&&console.error(`[Table] Column with id '${_}' does not exist.`),v}};Object.assign(o,p);for(let _=0;_<o._features.length;_++){const v=o._features[_];v==null||v.createTable==null||v.createTable(o)}return o}function QE(){return e=>Ce(()=>[e.options.data],n=>{const t={rows:[],flatRows:[],rowsById:{}},r=function(o,s,a){s===void 0&&(s=0);const u=[];for(let g=0;g<o.length;g++){const h=di(e,e._getRowId(o[g],g,a),o[g],g,s,void 0,a==null?void 0:a.id);if(t.flatRows.push(h),t.rowsById[h.id]=h,u.push(h),e.options.getSubRows){var f;h.originalSubRows=e.options.getSubRows(o[g],g),(f=h.originalSubRows)!=null&&f.length&&(h.subRows=r(h.originalSubRows,s+1,h))}}return u};return t.rows=r(n),t},Se(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function eF(){return e=>Ce(()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows],(n,t,r)=>!t.rows.length||n!==!0&&!Object.keys(n??{}).length||!r?t:qb(t),Se(e.options,"debugTable","getExpandedRowModel"))}function qb(e){const n=[],t=r=>{var o;n.push(r),(o=r.subRows)!=null&&o.length&&r.getIsExpanded()&&r.subRows.forEach(t)};return e.rows.forEach(t),{rows:n,flatRows:e.flatRows,rowsById:e.rowsById}}function tF(){return(e,n)=>Ce(()=>{var t;return[(t=e.getColumn(n))==null?void 0:t.getFacetedRowModel()]},t=>{if(!t)return;const r=t.flatRows.flatMap(a=>{var u;return(u=a.getUniqueValues(n))!=null?u:[]}).map(Number).filter(a=>!Number.isNaN(a));if(!r.length)return;let o=r[0],s=r[r.length-1];for(const a of r)a<o?o=a:a>s&&(s=a);return[o,s]},Se(e.options,"debugTable","getFacetedMinMaxValues"))}function Gb(e,n,t){return t.options.filterFromLeafRows?nF(e,n,t):rF(e,n,t)}function nF(e,n,t){var r;const o=[],s={},a=(r=t.options.maxLeafRowFilterDepth)!=null?r:100,u=function(f,g){g===void 0&&(g=0);const h=[];for(let _=0;_<f.length;_++){var p;let v=f[_];const y=di(t,v.id,v.original,v.index,v.depth,void 0,v.parentId);if(y.columnFilters=v.columnFilters,(p=v.subRows)!=null&&p.length&&g<a){if(y.subRows=u(v.subRows,g+1),v=y,n(v)&&!y.subRows.length){h.push(v),s[v.id]=v,o.push(v);continue}if(n(v)||y.subRows.length){h.push(v),s[v.id]=v,o.push(v);continue}}else v=y,n(v)&&(h.push(v),s[v.id]=v,o.push(v))}return h};return{rows:u(e),flatRows:o,rowsById:s}}function rF(e,n,t){var r;const o=[],s={},a=(r=t.options.maxLeafRowFilterDepth)!=null?r:100,u=function(f,g){g===void 0&&(g=0);const h=[];for(let _=0;_<f.length;_++){let v=f[_];if(n(v)){var p;if((p=v.subRows)!=null&&p.length&&g<a){const C=di(t,v.id,v.original,v.index,v.depth,void 0,v.parentId);C.subRows=u(v.subRows,g+1),v=C}h.push(v),o.push(v),s[v.id]=v}}return h};return{rows:u(e),flatRows:o,rowsById:s}}function iF(){return(e,n)=>Ce(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter,e.getFilteredRowModel()],(t,r,o)=>{if(!t.rows.length||!(r!=null&&r.length)&&!o)return t;const s=[...r.map(u=>u.id).filter(u=>u!==n),o?"__global__":void 0].filter(Boolean),a=u=>{for(let f=0;f<s.length;f++)if(u.columnFilters[s[f]]===!1)return!1;return!0};return Gb(t.rows,a,e)},Se(e.options,"debugTable","getFacetedRowModel"))}function oF(){return(e,n)=>Ce(()=>{var t;return[(t=e.getColumn(n))==null?void 0:t.getFacetedRowModel()]},t=>{if(!t)return new Map;let r=new Map;for(let s=0;s<t.flatRows.length;s++){const a=t.flatRows[s].getUniqueValues(n);for(let u=0;u<a.length;u++){const f=a[u];if(r.has(f)){var o;r.set(f,((o=r.get(f))!=null?o:0)+1)}else r.set(f,1)}}return r},Se(e.options,"debugTable",`getFacetedUniqueValues_${n}`))}function lF(){return e=>Ce(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(n,t,r)=>{if(!n.rows.length||!(t!=null&&t.length)&&!r){for(let _=0;_<n.flatRows.length;_++)n.flatRows[_].columnFilters={},n.flatRows[_].columnFiltersMeta={};return n}const o=[],s=[];(t??[]).forEach(_=>{var v;const y=e.getColumn(_.id);if(!y)return;const C=y.getFilterFn();if(!C){process.env.NODE_ENV!=="production"&&console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${y.id}.`);return}o.push({id:_.id,filterFn:C,resolvedValue:(v=C.resolveFilterValue==null?void 0:C.resolveFilterValue(_.value))!=null?v:_.value})});const a=(t??[]).map(_=>_.id),u=e.getGlobalFilterFn(),f=e.getAllLeafColumns().filter(_=>_.getCanGlobalFilter());r&&u&&f.length&&(a.push("__global__"),f.forEach(_=>{var v;s.push({id:_.id,filterFn:u,resolvedValue:(v=u.resolveFilterValue==null?void 0:u.resolveFilterValue(r))!=null?v:r})}));let g,h;for(let _=0;_<n.flatRows.length;_++){const v=n.flatRows[_];if(v.columnFilters={},o.length)for(let y=0;y<o.length;y++){g=o[y];const C=g.id;v.columnFilters[C]=g.filterFn(v,C,g.resolvedValue,S=>{v.columnFiltersMeta[C]=S})}if(s.length){for(let y=0;y<s.length;y++){h=s[y];const C=h.id;if(h.filterFn(v,C,h.resolvedValue,S=>{v.columnFiltersMeta[C]=S})){v.columnFilters.__global__=!0;break}}v.columnFilters.__global__!==!0&&(v.columnFilters.__global__=!1)}}const p=_=>{for(let v=0;v<a.length;v++)if(_.columnFilters[a[v]]===!1)return!1;return!0};return Gb(n.rows,p,e)},Se(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function sF(){return e=>Ce(()=>[e.getState().grouping,e.getPreGroupedRowModel()],(n,t)=>{if(!t.rows.length||!n.length)return t.rows.forEach(f=>{f.depth=0,f.parentId=void 0}),t;const r=n.filter(f=>e.getColumn(f)),o=[],s={},a=function(f,g,h){if(g===void 0&&(g=0),g>=r.length)return f.map(y=>(y.depth=g,o.push(y),s[y.id]=y,y.subRows&&(y.subRows=a(y.subRows,g+1,y.id)),y));const p=r[g],_=aF(f,p);return Array.from(_.entries()).map((y,C)=>{let[S,T]=y,E=`${p}:${S}`;E=h?`${h}>${E}`:E;const F=a(T,g+1,E);F.forEach(P=>{P.parentId=E});const L=g?Pb(T,P=>P.subRows):T,O=di(e,E,L[0].original,C,g,void 0,h);return Object.assign(O,{groupingColumnId:p,groupingValue:S,subRows:F,leafRows:L,getValue:P=>{if(r.includes(P)){if(O._valuesCache.hasOwnProperty(P))return O._valuesCache[P];if(T[0]){var k;O._valuesCache[P]=(k=T[0].getValue(P))!=null?k:void 0}return O._valuesCache[P]}if(O._groupingValuesCache.hasOwnProperty(P))return O._groupingValuesCache[P];const z=e.getColumn(P),j=z==null?void 0:z.getAggregationFn();if(j)return O._groupingValuesCache[P]=j(P,L,T),O._groupingValuesCache[P]}}),F.forEach(P=>{o.push(P),s[P.id]=P}),O})},u=a(t.rows,0);return u.forEach(f=>{o.push(f),s[f.id]=f}),{rows:u,flatRows:o,rowsById:s}},Se(e.options,"debugTable","getGroupedRowModel",()=>{e._queue(()=>{e._autoResetExpanded(),e._autoResetPageIndex()})}))}function aF(e,n){const t=new Map;return e.reduce((r,o)=>{const s=`${o.getGroupingValue(n)}`,a=r.get(s);return a?a.push(o):r.set(s,[o]),r},t)}function uF(e){return n=>Ce(()=>[n.getState().pagination,n.getPrePaginationRowModel(),n.options.paginateExpandedRows?void 0:n.getState().expanded],(t,r)=>{if(!r.rows.length)return r;const{pageSize:o,pageIndex:s}=t;let{rows:a,flatRows:u,rowsById:f}=r;const g=o*s,h=g+o;a=a.slice(g,h);let p;n.options.paginateExpandedRows?p={rows:a,flatRows:u,rowsById:f}:p=qb({rows:a,flatRows:u,rowsById:f}),p.flatRows=[];const _=v=>{p.flatRows.push(v),v.subRows.length&&v.subRows.forEach(_)};return p.rows.forEach(_),p},Se(n.options,"debugTable","getPaginationRowModel"))}function cF(){return e=>Ce(()=>[e.getState().sorting,e.getPreSortedRowModel()],(n,t)=>{if(!t.rows.length||!(n!=null&&n.length))return t;const r=e.getState().sorting,o=[],s=r.filter(f=>{var g;return(g=e.getColumn(f.id))==null?void 0:g.getCanSort()}),a={};s.forEach(f=>{const g=e.getColumn(f.id);g&&(a[f.id]={sortUndefined:g.columnDef.sortUndefined,invertSorting:g.columnDef.invertSorting,sortingFn:g.getSortingFn()})});const u=f=>{const g=f.map(h=>({...h}));return g.sort((h,p)=>{for(let v=0;v<s.length;v+=1){var _;const y=s[v],C=a[y.id],S=C.sortUndefined,T=(_=y==null?void 0:y.desc)!=null?_:!1;let E=0;if(S){const F=h.getValue(y.id),L=p.getValue(y.id),O=F===void 0,P=L===void 0;if(O||P){if(S==="first")return O?-1:1;if(S==="last")return O?1:-1;E=O&&P?0:O?S:-S}}if(E===0&&(E=C.sortingFn(h,p,y.id)),E!==0)return T&&(E*=-1),C.invertSorting&&(E*=-1),E}return h.index-p.index}),g.forEach(h=>{var p;o.push(h),(p=h.subRows)!=null&&p.length&&(h.subRows=u(h.subRows))}),g};return{rows:u(t.rows),flatRows:o,rowsById:t.rowsById}},Se(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/**
326
+ * react-table
327
+ *
328
+ * Copyright (c) TanStack
329
+ *
330
+ * This source code is licensed under the MIT license found in the
331
+ * LICENSE.md file in the root directory of this source tree.
332
+ *
333
+ * @license MIT
334
+ */function dF(e){const n={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[t]=ri.useState(()=>({current:XE(n)})),[r,o]=ri.useState(()=>t.current.initialState);return t.current.setOptions(s=>({...s,...e,state:{...r,...e.state},onStateChange:a=>{o(a),e.onStateChange==null||e.onStateChange(a)}})),t.current}/**
335
+ * match-sorter-utils
336
+ *
337
+ * Copyright (c) TanStack
338
+ *
339
+ * This source code is licensed under the MIT license found in the
340
+ * LICENSE.md file in the root directory of this source tree.
341
+ *
342
+ * @license MIT
343
+ */const Ub={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ù:"u",ú:"u",û:"u",ü:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"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",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z"},fF=Object.keys(Ub).join("|"),gF=new RegExp(fF,"g");function hF(e){return e.replace(gF,n=>Ub[n])}/**
344
+ * @name match-sorter
345
+ * @license MIT license.
346
+ * @copyright (c) 2099 Kent C. Dodds
347
+ * @author Kent C. Dodds <me@kentcdodds.com> (https://kentcdodds.com)
348
+ */const Kt={CASE_SENSITIVE_EQUAL:7,EQUAL:6,STARTS_WITH:5,WORD_STARTS_WITH:4,CONTAINS:3,ACRONYM:2,MATCHES:1,NO_MATCH:0};function pF(e,n,t){var r;if(t=t||{},t.threshold=(r=t.threshold)!=null?r:Kt.MATCHES,!t.accessors){const a=Wb(e,n,t);return{rankedValue:e,rank:a,accessorIndex:-1,accessorThreshold:t.threshold,passed:a>=t.threshold}}const o=yF(e,t.accessors),s={rankedValue:e,rank:Kt.NO_MATCH,accessorIndex:-1,accessorThreshold:t.threshold,passed:!1};for(let a=0;a<o.length;a++){const u=o[a];let f=Wb(u.itemValue,n,t);const{minRanking:g,maxRanking:h,threshold:p=t.threshold}=u.attributes;f<g&&f>=Kt.MATCHES?f=g:f>h&&(f=h),f=Math.min(f,h),f>=p&&f>s.rank&&(s.rank=f,s.passed=!0,s.accessorIndex=a,s.accessorThreshold=p,s.rankedValue=u.itemValue)}return s}function Wb(e,n,t){return e=Kb(e,t),n=Kb(n,t),n.length>e.length?Kt.NO_MATCH:e===n?Kt.CASE_SENSITIVE_EQUAL:(e=e.toLowerCase(),n=n.toLowerCase(),e===n?Kt.EQUAL:e.startsWith(n)?Kt.STARTS_WITH:e.includes(` ${n}`)?Kt.WORD_STARTS_WITH:e.includes(n)?Kt.CONTAINS:n.length===1?Kt.NO_MATCH:vF(e).includes(n)?Kt.ACRONYM:mF(e,n))}function vF(e){let n="";return e.split(" ").forEach(r=>{r.split("-").forEach(s=>{n+=s.substr(0,1)})}),n}function mF(e,n){let t=0,r=0;function o(f,g,h){for(let p=h,_=g.length;p<_;p++)if(g[p]===f)return t+=1,p+1;return-1}function s(f){const g=1/f,h=t/n.length;return Kt.MATCHES+h*g}const a=o(n[0],e,0);if(a<0)return Kt.NO_MATCH;r=a;for(let f=1,g=n.length;f<g;f++){const h=n[f];if(r=o(h,e,r),!(r>-1))return Kt.NO_MATCH}const u=r-a;return s(u)}function _F(e,n){return e.rank===n.rank?0:e.rank>n.rank?-1:1}function Kb(e,n){let{keepDiacritics:t}=n;return e=`${e}`,t||(e=hF(e)),e}function bF(e,n){let t=n;typeof n=="object"&&(t=n.accessor);const r=t(e);return r==null?[]:Array.isArray(r)?r:[String(r)]}function yF(e,n){const t=[];for(let r=0,o=n.length;r<o;r++){const s=n[r],a=wF(s),u=bF(e,s);for(let f=0,g=u.length;f<g;f++)t.push({itemValue:u[f],attributes:a})}return t}const Jb={maxRanking:1/0,minRanking:-1/0};function wF(e){return typeof e=="function"?Jb:{...Jb,...e}}function fi(e,n,t){let r=t.initialDeps??[],o;return()=>{var s,a,u,f;let g;t.key&&((s=t.debug)!=null&&s.call(t))&&(g=Date.now());const h=e();if(!(h.length!==r.length||h.some((v,y)=>r[y]!==v)))return o;r=h;let _;if(t.key&&((a=t.debug)!=null&&a.call(t))&&(_=Date.now()),o=n(...h),t.key&&((u=t.debug)!=null&&u.call(t))){const v=Math.round((Date.now()-g)*100)/100,y=Math.round((Date.now()-_)*100)/100,C=y/16,S=(T,E)=>{for(T=String(T);T.length<E;)T=" "+T;return T};console.info(`%c⏱ ${S(y,5)} /${S(v,5)} ms`,`
349
+ font-size: .6rem;
350
+ font-weight: bold;
351
+ color: hsl(${Math.max(0,Math.min(120-120*C,120))}deg 100% 31%);`,t==null?void 0:t.key)}return(f=t==null?void 0:t.onChange)==null||f.call(t,o),o}}function of(e,n){if(e===void 0)throw new Error("Unexpected undefined");return e}const CF=(e,n)=>Math.abs(e-n)<1,SF=(e,n,t)=>{let r;return function(...o){e.clearTimeout(r),r=e.setTimeout(()=>n.apply(this,o),t)}},TF=e=>e,Yb=e=>{const n=Math.max(e.startIndex-e.overscan,0),t=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let o=n;o<=t;o++)r.push(o);return r},IF=(e,n)=>{const t=e.scrollElement;if(!t)return;const r=e.targetWindow;if(!r)return;const o=a=>{const{width:u,height:f}=a;n({width:Math.round(u),height:Math.round(f)})};if(o(t.getBoundingClientRect()),!r.ResizeObserver)return()=>{};const s=new r.ResizeObserver(a=>{const u=a[0];if(u!=null&&u.borderBoxSize){const f=u.borderBoxSize[0];if(f){o({width:f.inlineSize,height:f.blockSize});return}}o(t.getBoundingClientRect())});return s.observe(t,{box:"border-box"}),()=>{s.unobserve(t)}},Zb={passive:!0},MF=typeof window>"u"?!0:"onscrollend"in window,xF=(e,n)=>{const t=e.scrollElement;if(!t)return;const r=e.targetWindow;if(!r)return;let o=0;const s=e.options.useScrollendEvent&&MF?()=>{}:SF(r,()=>{n(o,!1)},e.options.isScrollingResetDelay),a=g=>()=>{const{horizontal:h,isRtl:p}=e.options;o=h?t.scrollLeft*(p&&-1||1):t.scrollTop,s(),n(o,g)},u=a(!0),f=a(!1);return f(),t.addEventListener("scroll",u,Zb),t.addEventListener("scrollend",f,Zb),()=>{t.removeEventListener("scroll",u),t.removeEventListener("scrollend",f)}},EF=(e,n,t)=>{if(n!=null&&n.borderBoxSize){const r=n.borderBoxSize[0];if(r)return Math.round(r[t.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[t.options.horizontal?"width":"height"])},FF=(e,{adjustments:n=0,behavior:t},r)=>{var o,s;const a=e+n;(s=(o=r.scrollElement)==null?void 0:o.scrollTo)==null||s.call(o,{[r.options.horizontal?"left":"top"]:a,behavior:t})};class AF{constructor(n){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let t=null;const r=()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(o=>{o.forEach(s=>{this._measureElement(s.target,s)})}));return{disconnect:()=>{var o;(o=r())==null||o.disconnect(),t=null},observe:o=>{var s;return(s=r())==null?void 0:s.observe(o,{box:"border-box"})},unobserve:o=>{var s;return(s=r())==null?void 0:s.unobserve(o)}}})(),this.range=null,this.setOptions=t=>{Object.entries(t).forEach(([r,o])=>{typeof o>"u"&&delete t[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:TF,rangeExtractor:Yb,onChange:()=>{},measureElement:EF,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!0,...t}},this.notify=t=>{var r,o;(o=(r=this.options).onChange)==null||o.call(r,this,t)},this.maybeNotify=fi(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),t=>{this.notify(t)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this.elementsCache.forEach(o=>{this.observer.observe(o)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,o=>{this.scrollRect=o,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(o,s)=>{this.scrollAdjustments=0,this.scrollDirection=s?this.getScrollOffset()<o?"forward":"backward":null,this.scrollOffset=o,this.isScrolling=s,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(t,r)=>{const o=new Map,s=new Map;for(let a=r-1;a>=0;a--){const u=t[a];if(o.has(u.lane))continue;const f=s.get(u.lane);if(f==null||u.end>f.end?s.set(u.lane,u):u.end<f.end&&o.set(u.lane,!0),o.size===this.options.lanes)break}return s.size===this.options.lanes?Array.from(s.values()).sort((a,u)=>a.end===u.end?a.index-u.index:a.end-u.end)[0]:void 0},this.getMeasurementOptions=fi(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(t,r,o,s,a)=>(this.pendingMeasuredCacheIndexes=[],{count:t,paddingStart:r,scrollMargin:o,getItemKey:s,enabled:a}),{key:!1}),this.getMeasurements=fi(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:t,paddingStart:r,scrollMargin:o,getItemKey:s,enabled:a},u)=>{if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(h=>{this.itemSizeCache.set(h.key,h.size)}));const f=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const g=this.measurementsCache.slice(0,f);for(let h=f;h<t;h++){const p=s(h),_=this.options.lanes===1?g[h-1]:this.getFurthestMeasurement(g,h),v=_?_.end+this.options.gap:r+o,y=u.get(p),C=typeof y=="number"?y:this.options.estimateSize(h),S=v+C,T=_?_.lane:h%this.options.lanes;g[h]={index:h,start:v,size:C,end:S,key:p,lane:T}}return this.measurementsCache=g,g},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=fi(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(t,r,o)=>this.range=t.length>0&&r>0?OF({measurements:t,outerSize:r,scrollOffset:o}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getIndexes=fi(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(t,r,o,s)=>r===null?[]:t({startIndex:r.startIndex,endIndex:r.endIndex,overscan:o,count:s}),{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.indexFromElement=t=>{const r=this.options.indexAttribute,o=t.getAttribute(r);return o?parseInt(o,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(t,r)=>{const o=this.indexFromElement(t),s=this.measurementsCache[o];if(!s)return;const a=s.key,u=this.elementsCache.get(a);u!==t&&(u&&this.observer.unobserve(u),this.observer.observe(t),this.elementsCache.set(a,t)),t.isConnected&&this.resizeItem(o,this.options.measureElement(t,r,this))},this.resizeItem=(t,r)=>{const o=this.measurementsCache[t];if(!o)return;const s=this.itemSizeCache.get(o.key)??o.size,a=r-s;a!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,a,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",a),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=a,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,r)),this.notify(!1))},this.measureElement=t=>{if(!t){this.elementsCache.forEach((r,o)=>{r.isConnected||(this.observer.unobserve(r),this.elementsCache.delete(o))});return}this._measureElement(t,void 0)},this.getVirtualItems=fi(()=>[this.getIndexes(),this.getMeasurements()],(t,r)=>{const o=[];for(let s=0,a=t.length;s<a;s++){const u=t[s],f=r[u];o.push(f)}return o},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=t=>{const r=this.getMeasurements();if(r.length!==0)return of(r[Xb(0,r.length-1,o=>of(r[o]).start,t)])},this.getOffsetForAlignment=(t,r)=>{const o=this.getSize(),s=this.getScrollOffset();r==="auto"&&t>=s+o&&(r="end"),r==="end"&&(t-=o);const a=this.options.horizontal?"scrollWidth":"scrollHeight",f=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[a]:this.scrollElement[a]:0)-o;return Math.max(Math.min(f,t),0)},this.getOffsetForIndex=(t,r="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const o=this.measurementsCache[t];if(!o)return;const s=this.getSize(),a=this.getScrollOffset();if(r==="auto")if(o.end>=a+s-this.options.scrollPaddingEnd)r="end";else if(o.start<=a+this.options.scrollPaddingStart)r="start";else return[a,r];const u=o.start-this.options.scrollPaddingStart+(o.size-s)/2;switch(r){case"center":return[this.getOffsetForAlignment(u,r),r];case"end":return[this.getOffsetForAlignment(o.end+this.options.scrollPaddingEnd,r),r];default:return[this.getOffsetForAlignment(o.start-this.options.scrollPaddingStart,r),r]}},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(t,{align:r="start",behavior:o}={})=>{this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(t,r),{adjustments:void 0,behavior:o})},this.scrollToIndex=(t,{align:r="auto",behavior:o}={})=>{t=Math.max(0,Math.min(t,this.options.count-1)),this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const s=this.getOffsetForIndex(t,r);if(!s)return;const[a,u]=s;this._scrollToOffset(a,{adjustments:void 0,behavior:o}),o!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(t))){const[g]=of(this.getOffsetForIndex(t,u));CF(g,this.getScrollOffset())||this.scrollToIndex(t,{align:u,behavior:o})}else this.scrollToIndex(t,{align:u,behavior:o})}))},this.scrollBy=(t,{behavior:r}={})=>{this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+t,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var t;const r=this.getMeasurements();let o;return r.length===0?o=this.options.paddingStart:o=this.options.lanes===1?((t=r[r.length-1])==null?void 0:t.end)??0:Math.max(...r.slice(-this.options.lanes).map(s=>s.end)),Math.max(o-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(t,{adjustments:r,behavior:o})=>{this.options.scrollToFn(t,{behavior:o,adjustments:r},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(n)}}const Xb=(e,n,t,r)=>{for(;e<=n;){const o=(e+n)/2|0,s=t(o);if(s<r)e=o+1;else if(s>r)n=o-1;else return o}return e>0?e-1:0};function OF({measurements:e,outerSize:n,scrollOffset:t}){const r=e.length-1,s=Xb(0,r,u=>e[u].start,t);let a=s;for(;a<r&&e[a].end<t+n;)a++;return{startIndex:s,endIndex:a}}const Qb=typeof document<"u"?ri.useLayoutEffect:ri.useEffect;function PF(e){const n=ri.useReducer(()=>({}),{})[1],t={...e,onChange:(o,s)=>{var a;s?ES.flushSync(n):n(),(a=e.onChange)==null||a.call(e,o,s)}},[r]=ri.useState(()=>new AF(t));return r.setOptions(t),Qb(()=>r._didMount(),[]),Qb(()=>r._willUpdate()),r}function ey(e){return PF({observeElementRect:IF,observeElementOffset:xF,scrollToFn:FF,...e})}function Ie(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(t[r[o]]=e[r[o]]);return t}typeof SuppressedError=="function"&&SuppressedError;var _n={root:"MRT_TableBody-module_root__kGhRy","root-grid":"MRT_TableBody-module_root-grid__WdOGg","root-no-rows":"MRT_TableBody-module_root-no-rows__iyi9K","root-virtualized":"MRT_TableBody-module_root-virtualized__TxPAi","empty-row-tr-grid":"MRT_TableBody-module_empty-row-tr-grid__LTgxw","empty-row-td-grid":"MRT_TableBody-module_empty-row-td-grid__pzlgG","empty-row-td-content":"MRT_TableBody-module_empty-row-td-content__Cc2XW",pinned:"MRT_TableBody-module_pinned__XHpcs"},lf={root:"MRT_TableBodyRow-module_root__2c3D4","root-grid":"MRT_TableBodyRow-module_root-grid__AwXTe","root-virtualized":"MRT_TableBodyRow-module_root-virtualized__zYgxq"},Un={root:"MRT_TableBodyCell-module_root__Wf-zi","root-grid":"MRT_TableBodyCell-module_root-grid__zIuC-","root-virtualized":"MRT_TableBodyCell-module_root-virtualized__jLl8R","root-data-col":"MRT_TableBodyCell-module_root-data-col__HHcxc","root-nowrap":"MRT_TableBodyCell-module_root-nowrap__-k1Jo","root-cursor-pointer":"MRT_TableBodyCell-module_root-cursor-pointer__4kw7J","root-editable-hover":"MRT_TableBodyCell-module_root-editable-hover__2DKSa","root-cell-hover-reveal":"MRT_TableBodyCell-module_root-cell-hover-reveal__T1fAH","cell-hover-reveal":"MRT_TableBodyCell-module_cell-hover-reveal__Q-1Xj",overflowing:"MRT_TableBodyCell-module_overflowing__QcXP4"};const se=(e,n)=>e instanceof Function?e(n):e,sf=["string","number"],DF=["text","autocomplete"],ty=({cell:e,renderedColumnIndex:n=0,renderedRowIndex:t=0,table:r})=>{var o,s;const{getState:a,options:{enableFilterMatchHighlighting:u,mantineHighlightProps:f}}=r,{column:g,row:h}=e,{columnDef:p}=g,{globalFilter:_,globalFilterFn:v}=a(),y=g.getFilterValue(),C=se(f,{cell:e,column:g,row:h,table:r});let S=e.getIsAggregated()&&p.AggregatedCell?p.AggregatedCell({cell:e,column:g,row:h,table:r}):h.getIsGrouped()&&!e.getIsGrouped()?null:e.getIsGrouped()&&p.GroupedCell?p.GroupedCell({cell:e,column:g,row:h,table:r}):void 0;const T=S!==void 0;if(T||(S=e.renderValue()),u&&p.enableFilterMatchHighlighting!==!1&&S&&sf.includes(typeof S)&&(y&&sf.includes(typeof y)&&DF.includes(p.filterVariant)||_&&sf.includes(typeof _)&&g.getCanGlobalFilter())){let E=((s=(o=g.getFilterValue())!==null&&o!==void 0?o:_)!==null&&s!==void 0?s:"").toString();(y?p._filterFn:v)==="fuzzy"&&(E=E.split(" ")),S=c.jsx(b.Highlight,Object.assign({color:"yellow.3",highlight:E},C,{children:S==null?void 0:S.toString()}))}return p.Cell&&!T&&(S=p.Cell({cell:e,column:g,renderedCellValue:S,renderedColumnIndex:n,renderedRowIndex:t,row:h,table:r})),S},kn=e=>e.replace(/[^a-zA-Z0-9]/g,"_"),kF=e=>{var n,t;return typeof e.primaryShade=="number"?e.primaryShade:(t=(n=e.primaryShade)===null||n===void 0?void 0:n.dark)!==null&&t!==void 0?t:7},LF=(e,n)=>e.colors[e.primaryColor][kF(e)];function wl(e,n){const t=`data-${e}`;switch(typeof n){case"boolean":return n?{[t]:""}:null;case"number":return{[t]:`${n}`};case"string":return{[t]:n};default:return null}}var NF={root:"MRT_CopyButton-module_root__mkXy4"};const zF=e=>{var{cell:n,children:t,table:r}=e,o=Ie(e,["cell","children","table"]);const{options:{localization:{clickToCopy:s,copiedToClipboard:a},mantineCopyButtonProps:u}}=r,{column:f,row:g}=n,{columnDef:h}=f,p={cell:n,column:f,row:g,table:r},_=Object.assign(Object.assign(Object.assign({},se(u,p)),se(h.mantineCopyButtonProps,p)),o);return c.jsx(b.CopyButton,{value:n.getValue(),children:({copied:v,copy:y})=>{var C;return c.jsx(b.Tooltip,{color:v?"green":void 0,label:(C=_==null?void 0:_.title)!==null&&C!==void 0?C:v?a:s,openDelay:1e3,withinPortal:!0,children:c.jsx(b.UnstyledButton,Object.assign({},_,{className:ge("mrt-copy-button",NF.root,_==null?void 0:_.className),onClick:S=>{S.stopPropagation(),y()},role:"presentation",title:void 0,children:t}))})}})},Cl=e=>{var n,{cell:t,table:r}=e,o=Ie(e,["cell","table"]);const{getState:s,options:{createDisplayMode:a,editDisplayMode:u,mantineEditSelectProps:f,mantineEditTextInputProps:g},refs:{editInputRefs:h},setCreatingRow:p,setEditingCell:_,setEditingRow:v}=r,{column:y,row:C}=t,{columnDef:S}=y,{creatingRow:T,editingRow:E}=s(),F=(T==null?void 0:T.id)===C.id,L=(E==null?void 0:E.id)===C.id,O=S.editVariant==="select",P=S.editVariant==="multi-select",[k,z]=I.useState(()=>t.getValue()),j={cell:t,column:y,row:C,table:r},$=Object.assign(Object.assign(Object.assign({},se(g,j)),se(S.mantineEditTextInputProps,j)),o),H=Object.assign(Object.assign(Object.assign({},se(f,j)),se(S.mantineEditSelectProps,j)),o),re=q=>{C._valuesCache[y.id]=q,F?p(C):L&&v(C)},Z=q=>{var U;(U=$.onBlur)===null||U===void 0||U.call($,q),re(k),_(null)},ne=q=>{var U,le;(U=$.onKeyDown)===null||U===void 0||U.call($,q),q.key==="Enter"&&((le=h.current[t.id])===null||le===void 0||le.blur())};if(S.Edit)return(n=S.Edit)===null||n===void 0?void 0:n.call(S,{cell:t,column:y,row:C,table:r});const ce={disabled:se(S.enableEditing,C)===!1,label:["custom","modal"].includes(F?a:u)?y.columnDef.header:void 0,name:t.id,onClick:q=>{var U;q.stopPropagation(),(U=$==null?void 0:$.onClick)===null||U===void 0||U.call($,q)},placeholder:["custom","modal"].includes(F?a:u)?void 0:S.header,value:k,variant:u==="table"?"unstyled":"default"};return O?c.jsx(b.Select,Object.assign({},ce,{searchable:!0,value:k},H,{onBlur:Z,onChange:(q,U)=>{var le,_e;(_e=(le=H).onChange)===null||_e===void 0||_e.call(le,q,U),z(q)},onClick:q=>{var U;q.stopPropagation(),(U=H==null?void 0:H.onClick)===null||U===void 0||U.call(H,q)},ref:q=>{q&&(h.current[t.id]=q,H.ref&&(H.ref.current=q))}})):P?c.jsx(b.MultiSelect,Object.assign({},ce,{searchable:!0,value:k},H,{onBlur:Z,onChange:q=>{var U,le;(le=(U=H).onChange)===null||le===void 0||le.call(U,k),z(q),document.activeElement!==h.current[t.id]&&re(q)},onClick:q=>{var U;q.stopPropagation(),(U=H==null?void 0:H.onClick)===null||U===void 0||U.call(H,q)},ref:q=>{q&&(h.current[t.id]=q,H.ref&&(H.ref.current=q))}})):c.jsx(b.TextInput,Object.assign({},ce,{onKeyDown:ne,value:k??""},$,{onBlur:Z,onChange:q=>{var U;(U=$.onChange)===null||U===void 0||U.call($,q),z(q.target.value)},onClick:q=>{var U;q.stopPropagation(),(U=$==null?void 0:$.onClick)===null||U===void 0||U.call($,q)},ref:q=>{q&&(h.current[t.id]=q,$.ref&&($.ref.current=q))}}))},ny=e=>{var n,t,r,o,s,{cell:a,numRows:u=1,renderedColumnIndex:f=0,renderedRowIndex:g=0,rowRef:h,table:p,virtualCell:_}=e,v=Ie(e,["cell","numRows","renderedColumnIndex","renderedRowIndex","rowRef","table","virtualCell"]);const y=b.useDirection(),{getState:C,options:{columnResizeDirection:S,columnResizeMode:T,createDisplayMode:E,editDisplayMode:F,enableClickToCopy:L,enableColumnOrdering:O,enableColumnPinning:P,enableEditing:k,enableGrouping:z,layoutMode:j,mantineSkeletonProps:$,mantineTableBodyCellProps:H},refs:{editInputRefs:re},setEditingCell:Z,setHoveredColumn:ne}=p,{columnSizingInfo:ce,creatingRow:q,density:U,draggingColumn:le,editingCell:_e,editingRow:he,hoveredColumn:de,isLoading:Ae,showSkeletons:ue}=C(),{column:pe,row:K}=a,{columnDef:ee}=pe,{columnDefType:oe}=ee,xe={cell:a,column:pe,renderedColumnIndex:f,renderedRowIndex:g,row:K,table:p},X=Object.assign(Object.assign(Object.assign({},se(H,xe)),se(ee.mantineTableBodyCellProps,xe)),v),Ne=se($,xe),[Je,Ge]=I.useState(100);I.useEffect(()=>{if(!Ae&&!ue||Je!==100)return;const Xe=pe.getSize();Ge(oe==="display"?Xe/2:Math.round(Math.random()*(Xe-Xe/3)+Xe/3))},[Ae,ue]);const st={minWidth:`max(calc(var(--col-${kn(pe==null?void 0:pe.id)}-size) * 1px), ${(n=ee.minSize)!==null&&n!==void 0?n:30}px)`,width:`calc(var(--col-${kn(pe.id)}-size) * 1px)`};j==="grid"?st.flex=`${[0,!1].includes(ee.grow)?0:`var(--col-${kn(pe.id)}-size)`} 0 auto`:j==="grid-no-grow"&&(st.flex=`${+(ee.grow||0)} 0 auto`);const Re=(le==null?void 0:le.id)===pe.id,De=(de==null?void 0:de.id)===pe.id,Pe=P&&ee.columnDefType!=="group"&&pe.getIsPinned(),Oe=!a.getIsPlaceholder()&&se(k,K)&&se(ee.enableEditing,K)!==!1,Q=Oe&&!["custom","modal"].includes(F)&&(F==="table"||(he==null?void 0:he.id)===K.id||(_e==null?void 0:_e.id)===a.id)&&!K.getIsGrouped(),Be=Oe&&E==="row"&&(q==null?void 0:q.id)===K.id,rt=se(L,a)||se(ee.enableClickToCopy,a)&&se(ee.enableClickToCopy,a)!==!1,Ze=Xe=>{var gt;(gt=X==null?void 0:X.onDoubleClick)===null||gt===void 0||gt.call(X,Xe),Oe&&F==="cell"&&(Z(a),setTimeout(()=>{var At;const Yt=re.current[a.id];Yt&&(Yt.focus(),(At=Yt.select)===null||At===void 0||At.call(Yt))},100))},Nt=Xe=>{var gt;(gt=X==null?void 0:X.onDragEnter)===null||gt===void 0||gt.call(X,Xe),z&&(de==null?void 0:de.id)==="drop-zone"&&ne(null),O&&le&&ne(ee.enableColumnOrdering!==!1?pe:null)},Ct={cell:a,renderedColumnIndex:f,renderedRowIndex:g,table:p},ot=I.useRef(null),[Ft,Jt]=I.useState(!1),$t=()=>{if(!ee.enableCellHoverReveal)return;const Xe=ot.current;if(Xe){const gt=Xe.scrollWidth>Xe.clientWidth;Jt(gt)}},Tt=()=>{ee.enableCellHoverReveal&&Jt(!1)},cn=()=>{var Xe,gt,At;return a.getIsPlaceholder()?(gt=(Xe=ee.PlaceholderCell)===null||Xe===void 0?void 0:Xe.call(ee,{cell:a,column:pe,row:K,table:p}))!==null&&gt!==void 0?gt:null:ue!==!1&&(Ae||ue)?c.jsx(b.Skeleton,Object.assign({height:20,width:Je},Ne)):oe==="display"&&(["mrt-row-expand","mrt-row-numbers","mrt-row-select"].includes(pe.id)||!K.getIsGrouped())?(At=ee.Cell)===null||At===void 0?void 0:At.call(ee,Object.assign({column:pe,renderedCellValue:a.renderValue(),row:K,rowRef:h},Ct)):Be||Q?c.jsx(Cl,{cell:a,table:p}):rt&&ee.enableClickToCopy!==!1?c.jsx(zF,{cell:a,table:p,children:c.jsx(ty,Object.assign({},Ct))}):c.jsx(ty,Object.assign({},Ct))};return c.jsx(b.TableTd,Object.assign({"data-column-pinned":Pe||void 0,"data-dragging-column":Re||void 0,"data-first-right-pinned":Pe==="right"&&pe.getIsFirstColumn(Pe)||void 0,"data-hovered-column-target":De||void 0,"data-index":f,"data-last-left-pinned":Pe==="left"&&pe.getIsLastColumn(Pe)||void 0,"data-last-row":g===u-1||void 0,"data-resizing":T==="onChange"&&(ce==null?void 0:ce.isResizingColumn)===pe.id&&S||void 0},X,{__vars:Object.assign({"--mrt-cell-align":(t=X.align)!==null&&t!==void 0?t:y.dir==="rtl"?"right":"left","--mrt-table-cell-left":Pe==="left"?`${pe.getStart(Pe)}`:void 0,"--mrt-table-cell-right":Pe==="right"?`${pe.getAfter(Pe)}`:void 0},X.__vars),className:ge(Un.root,(j==null?void 0:j.startsWith("grid"))&&Un["root-grid"],_&&Un["root-virtualized"],Oe&&F==="cell"&&Un["root-cursor-pointer"],Oe&&["cell","table"].includes(F??"")&&oe!=="display"&&Un["root-editable-hover"],oe==="data"&&Un["root-data-col"],U==="xs"&&Un["root-nowrap"],ee.enableCellHoverReveal&&Un["root-cell-hover-reveal"],X==null?void 0:X.className),onDoubleClick:Ze,onDragEnter:Nt,onMouseEnter:$t,onMouseLeave:Tt,style:Xe=>Object.assign(Object.assign({},st),se(X.style,Xe)),children:c.jsx(c.Fragment,{children:(r=X.children)!==null&&r!==void 0?r:ee.enableCellHoverReveal?c.jsxs("div",{className:ge(ee.enableCellHoverReveal&&!(Be||Q)&&Un["cell-hover-reveal"],Ft&&Un.overflowing),ref:ot,children:[cn(),a.getIsGrouped()&&!ee.GroupedCell&&c.jsxs(c.Fragment,{children:[" (",(o=K.subRows)===null||o===void 0?void 0:o.length,")"]})]}):c.jsxs(c.Fragment,{children:[cn(),a.getIsGrouped()&&!ee.GroupedCell&&c.jsxs(c.Fragment,{children:[" (",(s=K.subRows)===null||s===void 0?void 0:s.length,")"]})]})})}))},RF=I.memo(ny,(e,n)=>n.cell===e.cell);var qr={root:"MRT_TableDetailPanel-module_root__vQAlM","root-grid":"MRT_TableDetailPanel-module_root-grid__7UMC6","root-virtual-row":"MRT_TableDetailPanel-module_root-virtual-row__r-X4Z",inner:"MRT_TableDetailPanel-module_inner__o-Fk-","inner-grid":"MRT_TableDetailPanel-module_inner-grid__WLZgF","inner-expanded":"MRT_TableDetailPanel-module_inner-expanded__6tg9T","inner-virtual":"MRT_TableDetailPanel-module_inner-virtual__TItRy"};const BF=e=>{var n,t,{parentRowRef:r,renderedRowIndex:o=0,row:s,rowVirtualizer:a,striped:u,table:f,virtualRow:g}=e,h=Ie(e,["parentRowRef","renderedRowIndex","row","rowVirtualizer","striped","table","virtualRow"]);const{getState:p,getVisibleLeafColumns:_,options:{layoutMode:v,mantineDetailPanelProps:y,mantineTableBodyRowProps:C,renderDetailPanel:S}}=f,{isLoading:T}=p(),E=se(C,{isDetailPanel:!0,row:s,table:f}),F=Object.assign(Object.assign({},se(y,{row:s,table:f})),h),L=s.getAllCells().filter(P=>P.column.columnDef.columnDefType==="data").map(P=>c.jsx(Cl,{cell:P,table:f},P.id)),O=!T&&s.getIsExpanded()&&(S==null?void 0:S({internalEditComponents:L,row:s,table:f}));return c.jsx(b.TableTr,Object.assign({"data-index":S?o*2+1:o,"data-striped":u,ref:P=>{var k;P&&((k=a==null?void 0:a.measureElement)===null||k===void 0||k.call(a,P))}},E,{__vars:Object.assign({"--mrt-parent-row-height":g?`${(t=(n=r.current)===null||n===void 0?void 0:n.getBoundingClientRect())===null||t===void 0?void 0:t.height}px`:void 0,"--mrt-virtual-row-start":g?`${g.start}px`:void 0},E==null?void 0:E.__vars),className:ge("mantine-Table-tr-detail-panel",qr.root,(v==null?void 0:v.startsWith("grid"))&&qr["root-grid"],g&&qr["root-virtual-row"],E==null?void 0:E.className),children:c.jsx(b.TableTd,Object.assign({colSpan:_().length,component:"td"},F,{__vars:{"--mrt-inner-width":`${f.getTotalSize()}px`},className:ge("mantine-Table-td-detail-panel",qr.inner,(v==null?void 0:v.startsWith("grid"))&&qr["inner-grid"],s.getIsExpanded()&&qr["inner-expanded"],g&&qr["inner-virtual"]),p:s.getIsExpanded()&&O?"md":0,children:a?s.getIsExpanded()&&O:c.jsx(b.Collapse,{in:s.getIsExpanded(),children:O})}))}))},VF=(e,n,t)=>{let r=0;return e.columnFiltersMeta[t]&&(r=_F(e.columnFiltersMeta[t],n.columnFiltersMeta[t])),r===0?jr.alphanumeric(e,n,t):r},$F=Object.assign(Object.assign({},jr),{fuzzy:VF}),HF=(e,n)=>Math.max(...Object.values(n.columnFiltersMeta).map(t=>t.rank))-Math.max(...Object.values(e.columnFiltersMeta).map(t=>t.rank)),ry=(e,n)=>{const{getCenterRows:t,getPrePaginationRowModel:r,getRowModel:o,getState:s,getTopRows:a,options:{createDisplayMode:u,enablePagination:f,enableRowPinning:g,manualPagination:h,positionCreatingRow:p,rowPinningDisplayMode:_}}=e,{creatingRow:v,pagination:y}=s(),C=jF(e);let S=[];if(!C)S=!g||_!=null&&_.includes("sticky")?n?r().rows:o().rows:t();else{if(S=r().rows.sort((T,E)=>HF(T,E)),f&&!h&&!n){const T=y.pageIndex*y.pageSize;S=S.slice(T,T+y.pageSize)}g&&!(_!=null&&_.includes("sticky"))&&(S=S.filter(T=>!T.getIsPinned()))}if(g&&(_!=null&&_.includes("sticky"))){const T=S.filter(E=>E.getIsPinned()).map(E=>E.id);S=[...a().filter(E=>!T.includes(E.id)),...S]}if(p!==void 0&&v&&u==="row"){const T=isNaN(+p)?p==="top"?0:S.length:+p;S=[...S.slice(0,T),v,...S.slice(T)]}return S},iy=e=>{const{getState:n,options:{enableGlobalFilterRankedResults:t,manualExpanding:r,manualFiltering:o,manualGrouping:s,manualSorting:a}}=e,{expanded:u,globalFilterFn:f}=n();return!r&&!o&&!s&&!a&&t&&f==="fuzzy"&&u!==!0&&!Object.values(u).some(Boolean)},jF=e=>{const{globalFilter:n,sorting:t}=e.getState();return iy(e)&&n&&!Object.values(t).some(Boolean)},Sl=({row:e,table:n})=>{const{options:{enableRowSelection:t}}=n;return e.getIsSelected()||se(t,e)&&e.getCanSelectSubRows()&&e.getIsAllSubRowsSelected()},qF=({renderedRowIndex:e=0,row:n,table:t})=>(r,o)=>{var s;const{getState:a,options:{enableBatchRowSelection:u,enableMultiRowSelection:f,enableRowPinning:g,manualPagination:h,rowPinningDisplayMode:p},refs:{lastSelectedRowId:_}}=t,{pagination:{pageIndex:v,pageSize:y}}=a(),C=h?0:y*v,S=Sl({row:n,table:t});n.toggleSelected(o??!S);const T=new Set([n.id]);if(u&&f&&r.nativeEvent.shiftKey&&_.current!==null){const E=ry(t,!0),F=E.findIndex(L=>L.id===_.current);if(F!==-1){const L=Sl({row:E==null?void 0:E[F],table:t}),O=e+C,[P,k]=F<O?[F,O]:[O,F];if(S!==L)for(let z=P;z<=k;z++)E[z].toggleSelected(!S),T.add(E[z].id)}}_.current=n.id,n.getCanSelectSubRows()&&n.getIsAllSubRowsSelected()&&((s=n.subRows)===null||s===void 0||s.forEach(E=>E.toggleSelected(!1))),g&&(p!=null&&p.includes("select"))&&T.forEach(E=>{t.getRow(E).pin(S?!1:p!=null&&p.includes("bottom")?"bottom":"top")})},af=({table:e})=>(n,t,r)=>{const{options:{enableRowPinning:o,rowPinningDisplayMode:s,selectAllMode:a},refs:{lastSelectedRowId:u}}=e;a==="all"||r?e.toggleAllRowsSelected(t??n.target.checked):e.toggleAllPageRowsSelected(t??n.target.checked),o&&(s!=null&&s.includes("select"))&&e.setRowPinning({bottom:[],top:[]}),u.current=null},ro=e=>{var n,t,r,{children:o,columnVirtualizer:s,numRows:a,pinnedRowIds:u,renderedRowIndex:f=0,row:g,rowVirtualizer:h,table:p,tableProps:_,virtualRow:v}=e,y=Ie(e,["children","columnVirtualizer","numRows","pinnedRowIds","renderedRowIndex","row","rowVirtualizer","table","tableProps","virtualRow"]);const{getState:C,options:{enableRowOrdering:S,enableRowPinning:T,enableStickyFooter:E,enableStickyHeader:F,layoutMode:L,mantineTableBodyRowProps:O,memoMode:P,renderDetailPanel:k,rowPinningDisplayMode:z},refs:{tableFooterRef:j,tableHeadRef:$},setHoveredRow:H}=p,{density:re,draggingColumn:Z,draggingRow:ne,editingCell:ce,editingRow:q,hoveredRow:U,isFullScreen:le,rowPinning:_e}=C(),he=g.getVisibleCells(),{virtualColumns:de,virtualPaddingLeft:Ae,virtualPaddingRight:ue}=s??{},pe=Sl({row:g,table:p}),K=T&&g.getIsPinned(),ee=K&&(z==null?void 0:z.includes("sticky"))&&"sticky",oe=(ne==null?void 0:ne.id)===g.id,xe=(U==null?void 0:U.id)===g.id,X=Object.assign(Object.assign({},se(O,{renderedRowIndex:f,row:g,table:p})),y),[Ne,Je]=I.useMemo(()=>!T||!ee||!u||!g.getIsPinned()?[]:[[...u].reverse().indexOf(g.id),u.indexOf(g.id)],[u,_e]),Ge=(F||le)&&((n=$.current)===null||n===void 0?void 0:n.clientHeight)||0,st=E&&((t=j.current)===null||t===void 0?void 0:t.clientHeight)||0,Re=parseInt((r=X==null?void 0:X.style)===null||r===void 0?void 0:r.height,10)||(re==="xs"?37:re==="md"?53:69),De=Q=>{S&&ne&&H(g)},Pe=I.useRef(null);let Oe=_.striped;return Oe&&(Oe===!0&&(Oe="odd"),Oe==="odd"&&f%2!==0&&(Oe=!1),Oe==="even"&&f%2===0&&(Oe=!1)),c.jsxs(c.Fragment,{children:[c.jsxs(b.TableTr,Object.assign({"data-dragging-row":oe||void 0,"data-hovered-row-target":xe||void 0,"data-index":k?f*2:f,"data-row-pinned":ee||K||void 0,"data-selected":pe||void 0,"data-striped":Oe,onDragEnter:De,ref:Q=>{Q&&(Pe.current=Q,h==null||h.measureElement(Q))}},X,{__vars:Object.assign(Object.assign({},X==null?void 0:X.__vars),{"--mrt-pinned-row-bottom":!v&&Ne!==void 0&&K?`${Ne*Re+(E?st-1:0)}`:void 0,"--mrt-pinned-row-top":v?void 0:Je!==void 0&&K?`${Je*Re+(F||le?Ge-1:0)}`:void 0,"--mrt-virtual-row-start":v?`${v.start}`:void 0}),className:ge(lf.root,(L==null?void 0:L.startsWith("grid"))&&lf["root-grid"],v&&lf["root-virtualized"],X==null?void 0:X.className),children:[Ae?c.jsx(b.Box,{component:"td",display:"flex",w:Ae}):null,o||(de??g.getVisibleCells()).map((Q,Be)=>{let rt=Q;s&&(Be=Q.index,rt=he[Be]);const Ze={cell:rt,numRows:a,renderedColumnIndex:Be,renderedRowIndex:f,rowRef:Pe,table:p,virtualCell:s?Q:void 0};return P==="cells"&&rt.column.columnDef.columnDefType==="data"&&!Z&&!ne&&(ce==null?void 0:ce.id)!==rt.id&&(q==null?void 0:q.id)!==g.id?c.jsx(RF,Object.assign({},Ze),rt.id):c.jsx(ny,Object.assign({},Ze),rt.id)}),ue?c.jsx(b.Box,{component:"td",display:"flex",w:ue}):null]})),k&&!g.getIsGrouped()&&c.jsx(BF,{parentRowRef:Pe,renderedRowIndex:f,row:g,rowVirtualizer:h,striped:Oe,table:p,virtualRow:v})]})},uf=I.memo(ro,(e,n)=>e.row===n.row);var io={root:"MRT_ExpandButton-module_root__IFYio","root-ltr":"MRT_ExpandButton-module_root-ltr__FHNnp",chevron:"MRT_ExpandButton-module_chevron__XzC5P",right:"MRT_ExpandButton-module_right__-pC-A",up:"MRT_ExpandButton-module_up__TZGBo","root-rtl":"MRT_ExpandButton-module_root-rtl__zoudS"};const cf=e=>{var n,t,{row:r,table:o}=e,s=Ie(e,["row","table"]);const a=b.useDirection(),{options:{icons:{IconChevronDown:u},localization:f,mantineExpandButtonProps:g,positionExpandColumn:h,renderDetailPanel:p}}=o,_=Object.assign(Object.assign({},se(g,{row:r,table:o})),s),v=r.getAllCells().filter(F=>F.column.columnDef.columnDefType==="data").map(F=>c.jsx(Cl,{cell:F,table:o},F.id)),y=r.getCanExpand(),C=r.getIsExpanded(),S=!!(p!=null&&p({internalEditComponents:v,row:r,table:o})),T=F=>{var L;F.stopPropagation(),r.toggleExpanded(),(L=_==null?void 0:_.onClick)===null||L===void 0||L.call(_,F)},E=a.dir==="rtl"||h==="last";return c.jsx(b.Tooltip,{disabled:!y&&!S,label:(n=_==null?void 0:_.title)!==null&&n!==void 0?n:C?f.collapse:f.expand,openDelay:1e3,withinPortal:!0,children:c.jsx(b.ActionIcon,Object.assign({"aria-label":f.expand,color:"gray",disabled:!y&&!S,variant:"subtle"},_,{__vars:{"--mrt-row-depth":`${r.depth}`},className:ge("mrt-expand-button",io.root,io[`root-${E?"rtl":"ltr"}`],_==null?void 0:_.className),onClick:T,title:void 0,children:(t=_==null?void 0:_.children)!==null&&t!==void 0?t:c.jsx(u,{className:ge("mrt-expand-button-chevron",io.chevron,!y&&!p?io.right:C?io.up:void 0)})}))})},GF=e=>{var n,t,{table:r,tableProps:o}=e,s=Ie(e,["table","tableProps"]);const{getState:a,options:{layoutMode:u,localization:f,renderDetailPanel:g,renderEmptyRowsFallback:h},refs:{tablePaperRef:p}}=r,{columnFilters:_,globalFilter:v}=a(),y=I.useMemo(()=>di(r,"mrt-row-empty",{},0,0),[]),C=Object.assign(Object.assign({},s),{renderedRowIndex:0,row:y,virtualRow:void 0});return c.jsxs(ro,Object.assign({className:ge("mrt-table-body-row",(u==null?void 0:u.startsWith("grid"))&&_n["empty-row-tr-grid"]),table:r,tableProps:o},C,{children:[g&&c.jsx(b.TableTd,{className:ge("mrt-table-body-cell",(u==null?void 0:u.startsWith("grid"))&&_n["empty-row-td-grid"]),colSpan:1,children:c.jsx(cf,{row:y,table:r})}),c.jsx("td",{className:ge("mrt-table-body-cell",(u==null?void 0:u.startsWith("grid"))&&_n["empty-row-td-grid"]),colSpan:r.getVisibleLeafColumns().length,children:(n=h==null?void 0:h({table:r}))!==null&&n!==void 0?n:c.jsx(b.Text,{__vars:{"--mrt-paper-width":`${(t=p.current)===null||t===void 0?void 0:t.clientWidth}`},className:ge(_n["empty-row-td-content"]),children:v||_.length?f.noResultsFound:f.noRecordsToDisplay})})]}))},UF=e=>{const{getRowModel:n,getState:t,options:{data:r,enableGlobalFilterRankedResults:o,positionCreatingRow:s}}=e,{creatingRow:a,expanded:u,globalFilter:f,pagination:g,rowPinning:h,sorting:p}=t();return I.useMemo(()=>ry(e),[a,r,o,u,n().rows,f,g.pageIndex,g.pageSize,s,h,p])},oy=(e,n)=>{const t=Yb(e);return n===void 0||(n>=0&&n<Math.max(e.startIndex-e.overscan,0)&&t.unshift(n),n>=0&&n>e.endIndex+e.overscan&&t.push(n)),t},WF=(e,n)=>{var t;const{getRowModel:r,getState:o,options:{enableRowVirtualization:s,renderDetailPanel:a,rowVirtualizerInstanceRef:u,rowVirtualizerOptions:f},refs:{tableContainerRef:g}}=e,{density:h,draggingRow:p,expanded:_}=o();if(!s)return;const v=se(f,{table:e}),y=(t=n==null?void 0:n.length)!==null&&t!==void 0?t:r().rows.length,C=h==="xs"?42.7:h==="md"?54.7:70.7,S=ey(Object.assign({count:a?y*2:y,estimateSize:T=>a&&T%2===1?_===!0?100:0:C,getScrollElement:()=>g.current,measureElement:typeof window<"u"&&navigator.userAgent.indexOf("Firefox")===-1?T=>T==null?void 0:T.getBoundingClientRect().height:void 0,overscan:4,rangeExtractor:I.useCallback(T=>{var E;return oy(T,(E=p==null?void 0:p.index)!==null&&E!==void 0?E:0)},[p])},v));return S.virtualRows=S.getVirtualItems(),u&&(u.current=S),S},ly=e=>{var n,t,r,{columnVirtualizer:o,table:s,tableProps:a}=e,u=Ie(e,["columnVirtualizer","table","tableProps"]);const{getBottomRows:f,getIsSomeRowsPinned:g,getRowModel:h,getState:p,getTopRows:_,options:{enableStickyFooter:v,enableStickyHeader:y,layoutMode:C,mantineTableBodyProps:S,memoMode:T,renderDetailPanel:E,rowPinningDisplayMode:F},refs:{tableFooterRef:L,tableHeadRef:O}}=s,{isFullScreen:P,rowPinning:k}=p(),z=Object.assign(Object.assign({},se(S,{table:s})),u),j=(y||P)&&((n=O.current)===null||n===void 0?void 0:n.clientHeight)||0,$=v&&((t=L.current)===null||t===void 0?void 0:t.clientHeight)||0,H=I.useMemo(()=>{var q,U;return!(!((q=k.bottom)===null||q===void 0)&&q.length)&&!(!((U=k.top)===null||U===void 0)&&U.length)?[]:h().rows.filter(le=>le.getIsPinned()).map(le=>le.id)},[k,h().rows]),re=UF(s),Z=WF(s,re),{virtualRows:ne}=Z??{},ce={columnVirtualizer:o,numRows:re.length,table:s,tableProps:a};return c.jsxs(c.Fragment,{children:[!(F!=null&&F.includes("sticky"))&&g("top")&&c.jsx(b.TableTbody,Object.assign({},z,{__vars:Object.assign({"--mrt-table-head-height":`${j}`},z==null?void 0:z.__vars),className:ge(_n.pinned,(C==null?void 0:C.startsWith("grid"))&&_n["root-grid"],z==null?void 0:z.className),children:_().map((q,U)=>{const le=Object.assign(Object.assign({},ce),{renderedRowIndex:U,row:q});return T==="rows"?c.jsx(uf,Object.assign({},le),q.id):c.jsx(ro,Object.assign({},le),q.id)})})),c.jsx(b.TableTbody,Object.assign({},z,{__vars:Object.assign({"--mrt-table-body-height":Z?`${Z.getTotalSize()}px`:void 0},z==null?void 0:z.__vars),className:ge(_n.root,(C==null?void 0:C.startsWith("grid"))&&_n["root-grid"],!re.length&&_n["root-no-rows"],Z&&_n["root-virtualized"],z==null?void 0:z.className),children:(r=z==null?void 0:z.children)!==null&&r!==void 0?r:re.length?c.jsx(c.Fragment,{children:(ne??re).map((q,U)=>{if(Z)if(E){if(q.index%2===1)return null;U=q.index/2}else U=q.index;const le=Z?re[U]:q,_e=Object.assign(Object.assign({},ce),{pinnedRowIds:H,renderedRowIndex:U,row:le,rowVirtualizer:Z,virtualRow:Z?q:void 0}),he=`${le.id}-${le.index}`;return T==="rows"?c.jsx(uf,Object.assign({},_e),he):c.jsx(ro,Object.assign({},_e),he)})}):c.jsx(GF,Object.assign({},ce))})),!(F!=null&&F.includes("sticky"))&&g("bottom")&&c.jsx(b.TableTbody,Object.assign({},z,{__vars:Object.assign({"--mrt-table-footer-height":`${$}`},z==null?void 0:z.__vars),className:ge(_n.pinned,(C==null?void 0:C.startsWith("grid"))&&_n["root-grid"],z==null?void 0:z.className),children:f().map((q,U)=>{const le=Object.assign(Object.assign({},ce),{renderedRowIndex:U,row:q});return T==="rows"?c.jsx(uf,Object.assign({},le),q.id):c.jsx(ro,Object.assign({},le),q.id)})}))]})},KF=I.memo(ly,(e,n)=>e.table.options.data===n.table.options.data);var JF={"grab-icon":"MRT_GrabHandleButton-module_grab-icon__mQimy"};const df=({actionIconProps:e,onDragEnd:n,onDragStart:t,table:{options:{icons:{IconGripHorizontal:r},localization:{move:o}}}})=>{var s,a;return c.jsx(b.Tooltip,{label:(s=e==null?void 0:e.title)!==null&&s!==void 0?s:o,openDelay:1e3,withinPortal:!0,children:c.jsx(b.ActionIcon,Object.assign({"aria-label":(a=e==null?void 0:e.title)!==null&&a!==void 0?a:o,draggable:!0},e,{className:ge("mrt-grab-handle-button",JF["grab-icon"],e==null?void 0:e.className),color:"gray",onClick:u=>{var f;u.stopPropagation(),(f=e==null?void 0:e.onClick)===null||f===void 0||f.call(e,u)},onDragEnd:n,onDragStart:t,size:"sm",title:void 0,variant:"transparent",children:c.jsx(r,{size:"100%"})}))})},YF=e=>{var{row:n,rowRef:t,table:r}=e,o=Ie(e,["row","rowRef","table"]);const{options:{mantineRowDragHandleProps:s}}=r,a=Object.assign(Object.assign({},se(s,{row:n,table:r})),o),u=g=>{var h;(h=a==null?void 0:a.onDragStart)===null||h===void 0||h.call(a,g),g.dataTransfer.setDragImage(t.current,0,0),r.setDraggingRow(n)},f=g=>{var h;(h=a==null?void 0:a.onDragEnd)===null||h===void 0||h.call(a,g),r.setDraggingRow(null),r.setHoveredRow(null)};return c.jsx(df,{actionIconProps:a,onDragEnd:f,onDragStart:u,table:r})},ff=e=>{var{pinningPosition:n,row:t,table:r}=e,o=Ie(e,["pinningPosition","row","table"]);const{options:{icons:{IconPinned:s,IconX:a},localization:u,rowPinningDisplayMode:f}}=r,g=t.getIsPinned(),[h,p]=I.useState(!1),_=v=>{p(!1),v.stopPropagation(),t.pin(g?!1:n)};return c.jsx(b.Tooltip,{label:g?u.unpin:u.pin,openDelay:1e3,opened:h,children:c.jsx(b.ActionIcon,Object.assign({"aria-label":u.pin,color:"gray",onClick:_,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),size:"xs",style:{height:"24px",width:"24px"},variant:"subtle"},o,{children:g?c.jsx(a,{}):c.jsx(s,{fontSize:"small",style:{transform:`rotate(${f==="sticky"?135:n==="top"?180:0}deg)`}})}))})},ZF=e=>{var{row:n,table:t}=e,r=Ie(e,["row","table"]);const{getState:o,options:{enableRowPinning:s,rowPinningDisplayMode:a}}=t,{density:u}=o();if(!se(s,n))return null;const g=Object.assign({row:n,table:t},r);return a==="top-and-bottom"&&!n.getIsPinned()?c.jsxs(b.Box,{style:{display:"flex",flexDirection:u==="xs"?"row":"column"},children:[c.jsx(ff,Object.assign({pinningPosition:"top"},g)),c.jsx(ff,Object.assign({pinningPosition:"bottom"},g))]}):c.jsx(ff,Object.assign({pinningPosition:a==="bottom"?"bottom":"top"},g))};var gf={root:"MRT_ColumnPinningButtons-module_root__scTtW",left:"MRT_ColumnPinningButtons-module_left__W6Aog",right:"MRT_ColumnPinningButtons-module_right__7AJE3"};const XF=({column:e,table:n})=>{const{options:{icons:{IconPinned:t,IconPinnedOff:r},localization:o}}=n;return c.jsx(b.Flex,{className:ge("mrt-column-pinning-buttons",gf.root),children:e.getIsPinned()?c.jsx(b.Tooltip,{label:o.unpin,withinPortal:!0,children:c.jsx(b.ActionIcon,{color:"gray",onClick:()=>e.pin(!1),size:"md",variant:"subtle",children:c.jsx(r,{})})}):c.jsxs(c.Fragment,{children:[c.jsx(b.Tooltip,{label:o.pinToLeft,withinPortal:!0,children:c.jsx(b.ActionIcon,{color:"gray",onClick:()=>e.pin("left"),size:"md",variant:"subtle",children:c.jsx(t,{className:gf.left})})}),c.jsx(b.Tooltip,{label:o.pinToRight,withinPortal:!0,children:c.jsx(b.ActionIcon,{color:"gray",onClick:()=>e.pin("right"),size:"md",variant:"subtle",children:c.jsx(t,{className:gf.right})})})]})})};var QF={root:"MRT_EditActionButtons-module_root__BfxVZ"};const sy=e=>{var{row:n,table:t,variant:r="icon"}=e,o=Ie(e,["row","table","variant"]);const{getState:s,options:{icons:{IconCircleX:a,IconDeviceFloppy:u},localization:f,onCreatingRowCancel:g,onCreatingRowSave:h,onEditingRowCancel:p,onEditingRowSave:_},refs:{editInputRefs:v},setCreatingRow:y,setEditingRow:C}=t,{creatingRow:S,editingRow:T,isSaving:E}=s(),F=(S==null?void 0:S.id)===n.id,L=(T==null?void 0:T.id)===n.id,O=()=>{F?(g==null||g({row:n,table:t}),y(null)):L&&(p==null||p({row:n,table:t}),C(null)),n._valuesCache={}},P=()=>{var k;(k=Object.values(v==null?void 0:v.current).filter(z=>{var j,$;return n.id===(($=(j=z==null?void 0:z.name)===null||j===void 0?void 0:j.split("_"))===null||$===void 0?void 0:$[0])}))===null||k===void 0||k.forEach(z=>{z.value!==void 0&&Object.hasOwn(n==null?void 0:n._valuesCache,z.name)&&(n._valuesCache[z.name]=z.value)}),F?h==null||h({exitCreatingMode:()=>y(null),row:n,table:t,values:n._valuesCache}):L&&(_==null||_({exitEditingMode:()=>C(null),row:n,table:t,values:n==null?void 0:n._valuesCache}))};return c.jsx(b.Box,Object.assign({className:ge("mrt-edit-action-buttons",QF.root),onClick:k=>k.stopPropagation()},o,{children:r==="icon"?c.jsxs(c.Fragment,{children:[c.jsx(b.Tooltip,{label:f.cancel,withinPortal:!0,children:c.jsx(b.ActionIcon,{"aria-label":f.cancel,color:"red",onClick:O,variant:"subtle",children:c.jsx(a,{})})}),c.jsx(b.Tooltip,{label:f.save,withinPortal:!0,children:c.jsx(b.ActionIcon,{"aria-label":f.save,color:"blue",loading:E,onClick:P,variant:"subtle",children:c.jsx(u,{})})})]}):c.jsxs(c.Fragment,{children:[c.jsx(b.Button,{onClick:O,variant:"subtle",children:f.cancel}),c.jsx(b.Button,{loading:E,onClick:P,variant:"filled",children:f.save})]})}))};var Tl={root:"MRT_ExpandAllButton-module_root__gkBZD",chevron:"MRT_ExpandAllButton-module_chevron__Iep0j",up:"MRT_ExpandAllButton-module_up__Xth3U",right:"MRT_ExpandAllButton-module_right__bS4L-"};const eA=e=>{var n,t,{table:r}=e,o=Ie(e,["table"]);const{getCanSomeRowsExpand:s,getIsAllRowsExpanded:a,getIsSomeRowsExpanded:u,getState:f,options:{icons:{IconChevronsDown:g},localization:h,mantineExpandAllButtonProps:p,renderDetailPanel:_},toggleAllRowsExpanded:v}=r,{density:y,isLoading:C}=f(),S=Object.assign(Object.assign({},se(p,{table:r})),o),T=a();return c.jsx(b.Tooltip,{label:((n=S==null?void 0:S.title)!==null&&n!==void 0?n:T)?h.collapseAll:h.expandAll,openDelay:1e3,withinPortal:!0,children:c.jsx(b.ActionIcon,Object.assign({"aria-label":h.expandAll,color:"gray",variant:"subtle"},S,{className:ge("mrt-expand-all-button",Tl.root,S==null?void 0:S.className,y),disabled:C||!_&&!s(),onClick:()=>v(!T),title:void 0,children:(t=S==null?void 0:S.children)!==null&&t!==void 0?t:c.jsx(g,{className:ge(Tl.chevron,T?Tl.up:u()?Tl.right:void 0)})}))})};var ay={root:"MRT_ShowHideColumnsMenu-module_root__2UWak",content:"MRT_ShowHideColumnsMenu-module_content__ehkWQ"},gi={root:"MRT_ShowHideColumnsMenuItems-module_root__wYgv-",menu:"MRT_ShowHideColumnsMenuItems-module_menu__CeATR",grab:"MRT_ShowHideColumnsMenuItems-module_grab__a-d-y",pin:"MRT_ShowHideColumnsMenuItems-module_pin__P437b",switch:"MRT_ShowHideColumnsMenuItems-module_switch__tMsdt",header:"MRT_ShowHideColumnsMenuItems-module_header__xVkKb"};const hi=e=>{var n,t,r,o;return(o=(n=e.id)!==null&&n!==void 0?n:(r=(t=e.accessorKey)===null||t===void 0?void 0:t.toString)===null||r===void 0?void 0:r.call(t))!==null&&o!==void 0?o:e.header},Il=e=>{const n=[],t=r=>{r.forEach(o=>{o.columns?t(o.columns):n.push(o)})};return t(e),n},uy=({columnDefs:e,tableOptions:n})=>{const{aggregationFns:t={},defaultDisplayColumn:r,filterFns:o={},sortingFns:s={},state:{columnFilterFns:a={}}={}}=n;return e.map(u=>{var f,g;if(u.id||(u.id=hi(u)),u.columnDefType||(u.columnDefType="data"),!((f=u.columns)===null||f===void 0)&&f.length)u.columnDefType="group",u.columns=uy({columnDefs:u.columns,tableOptions:n});else if(u.columnDefType==="data"){if(Array.isArray(u.aggregationFn)){const h=u.aggregationFn;u.aggregationFn=(p,_,v)=>h.map(y=>{var C;return(C=t[y])===null||C===void 0?void 0:C.call(t,p,_,v)})}Object.keys(o).includes(a[u.id])&&(u.filterFn=(g=o[a[u.id]])!==null&&g!==void 0?g:o.fuzzy,u._filterFn=a[u.id]),Object.keys(s).includes(u.sortingFn)&&(u.sortingFn=s[u.sortingFn])}else u.columnDefType==="display"&&(u=Object.assign(Object.assign({},r),u));return u})},cy=(e,n,t)=>{e.getCanPin()&&e.pin(n.getIsPinned());const r=[...t];return r.splice(r.indexOf(n.id),0,r.splice(r.indexOf(e.id),1)[0]),r},tA=e=>{const{filterVariant:n}=e;return n==="multi-select"?"arrIncludesSome":n!=null&&n.includes("range")?"betweenInclusive":["checkbox","date","select"].includes(n||"")?"equals":"fuzzy"},dy=({allColumns:e,column:n,hoveredColumn:t,setHoveredColumn:r,table:o})=>{var s;const a=b.useMantineTheme(),{getState:u,options:{enableColumnOrdering:f,enableColumnPinning:g,enableHiding:h,localization:p},setColumnOrder:_}=o,{columnOrder:v}=u(),{columnDef:y}=n,{columnDefType:C}=y,S=C!=="group"&&n.getIsVisible()||C==="group"&&n.getLeafColumns().some(z=>z.getIsVisible()),T=z=>{var j,$;C==="group"?($=(j=z==null?void 0:z.columns)===null||j===void 0?void 0:j.forEach)===null||$===void 0||$.call(j,H=>{H.toggleVisibility(!S)}):z.toggleVisibility()},E=I.useRef(null),[F,L]=I.useState(!1),O=z=>{L(!0),z.dataTransfer.setDragImage(E.current,0,0)},P=z=>{L(!1),r(null),t&&_(cy(n,t,v))},k=z=>{!F&&y.enableColumnOrdering!==!1&&r(n)};return!y.header||y.visibleInShowHideMenu===!1?null:c.jsxs(c.Fragment,{children:[c.jsx(b.Menu.Item,Object.assign({className:gi.root,component:"span",onDragEnter:k,ref:E,style:{"--_column-depth":`${(n.depth+.5)*2}rem`,"--_hover-color":LF(a)}},wl("dragging",F),wl("order-hovered",(t==null?void 0:t.id)===n.id),{children:c.jsxs(b.Box,{className:gi.menu,children:[C!=="group"&&f&&!e.some(z=>z.columnDef.columnDefType==="group")&&(y.enableColumnOrdering!==!1?c.jsx(df,{onDragEnd:P,onDragStart:O,table:o}):c.jsx(b.Box,{className:gi.grab})),g&&(n.getCanPin()?c.jsx(XF,{column:n,table:o}):c.jsx(b.Box,{className:gi.pin})),h?c.jsx(b.Tooltip,{label:p.toggleVisibility,openDelay:1e3,withinPortal:!0,children:c.jsx(b.Switch,{checked:S,className:gi.switch,disabled:!n.getCanHide(),label:y.header,onChange:()=>T(n)})}):c.jsx(b.Text,{className:gi.header,children:y.header})]})})),(s=n.columns)===null||s===void 0?void 0:s.map((z,j)=>c.jsx(dy,{allColumns:e,column:z,hoveredColumn:t,setHoveredColumn:r,table:o},`${j}-${z.id}`))]})};function Gr({header:e,id:n,size:t,tableOptions:r}){const{defaultDisplayColumn:o,displayColumnDefOptions:s,localization:a}=r;return Object.assign(Object.assign(Object.assign(Object.assign({},o),{header:e?a[e]:"",size:t}),s==null?void 0:s[n]),{id:n})}const fy=e=>{const{enableRowPinning:n,rowPinningDisplayMode:t}=e;return!!(n&&!(t!=null&&t.startsWith("select")))},gy=e=>{const{enableRowDragging:n,enableRowOrdering:t}=e;return!!(n||t)},hf=e=>{const{enableExpanding:n,enableGrouping:t,renderDetailPanel:r,state:{grouping:o}}=e;return!!(n||t&&(o!=null&&o.length)||r)},pf=e=>{const{createDisplayMode:n,editDisplayMode:t,enableEditing:r,enableRowActions:o,state:{creatingRow:s}}=e;return!!(o||s&&n==="row"||r&&["modal","row"].includes(t??""))},hy=e=>!!e.enableRowSelection,py=e=>!!e.enableRowNumbers,vy=e=>e.layoutMode==="grid-no-grow",nA=e=>[fy(e)&&"mrt-row-pin",gy(e)&&"mrt-row-drag",e.positionActionsColumn==="first"&&pf(e)&&"mrt-row-actions",e.positionExpandColumn==="first"&&hf(e)&&"mrt-row-expand",hy(e)&&"mrt-row-select",py(e)&&"mrt-row-numbers"].filter(Boolean),rA=e=>[e.positionActionsColumn==="last"&&pf(e)&&"mrt-row-actions",e.positionExpandColumn==="last"&&hf(e)&&"mrt-row-expand",vy(e)&&"mrt-row-spacer"].filter(Boolean),vf=(e,n=!1)=>{const{state:{columnOrder:t=[]}}=e,r=nA(e),o=rA(e),s=Il(e.columns).map(u=>hi(u));let a=n?s:Array.from(new Set([...t,...s]));return a=a.filter(u=>!r.includes(u)&&!o.includes(u)),[...r,...a,...o]},iA=({table:e})=>{const{getAllColumns:n,getAllLeafColumns:t,getCenterLeafColumns:r,getIsAllColumnsVisible:o,getIsSomeColumnsPinned:s,getIsSomeColumnsVisible:a,getLeftLeafColumns:u,getRightLeafColumns:f,getState:g,options:{enableColumnOrdering:h,enableColumnPinning:p,enableHiding:_,localization:v}}=e,{columnOrder:y,columnPinning:C}=g(),S=L=>{t().filter(O=>O.columnDef.enableHiding!==!1).forEach(O=>O.toggleVisibility(L))},T=I.useMemo(()=>{const L=n();return y.length>0&&!L.some(O=>O.columnDef.columnDefType==="group")?[...u(),...Array.from(new Set(y)).map(O=>r().find(P=>(P==null?void 0:P.id)===O)),...f()].filter(Boolean):L},[y,C,n(),r(),u(),f()]),[E,F]=I.useState(null);return c.jsxs(b.Menu.Dropdown,{className:ge("mrt-show-hide-columns-menu",ay.root),children:[c.jsxs(b.Flex,{className:ay.content,children:[_&&c.jsx(b.Button,{disabled:!a(),onClick:()=>S(!1),variant:"subtle",children:v.hideAll}),h&&c.jsx(b.Button,{onClick:()=>e.setColumnOrder(vf(e.options,!0)),variant:"subtle",children:v.resetOrder}),p&&c.jsx(b.Button,{disabled:!s(),onClick:()=>e.resetColumnPinning(!0),variant:"subtle",children:v.unpinAll}),_&&c.jsx(b.Button,{disabled:o(),onClick:()=>S(!0),variant:"subtle",children:v.showAll})]}),c.jsx(b.Menu.Divider,{}),T.map((L,O)=>c.jsx(dy,{allColumns:T,column:L,hoveredColumn:E,setHoveredColumn:F,table:e},`${O}-${L.id}`))]})},my=e=>{var{table:n,title:t}=e,r=Ie(e,["table","title"]);const{icons:{IconColumns:o},localization:{showHideColumns:s}}=n.options;return c.jsxs(b.Menu,{closeOnItemClick:!1,withinPortal:!0,children:[c.jsx(b.Tooltip,{label:t??s,withinPortal:!0,children:c.jsx(b.Menu.Target,{children:c.jsx(b.ActionIcon,Object.assign({"aria-label":t??s,color:"gray",size:"lg",variant:"subtle"},r,{children:c.jsx(o,{})}))})}),c.jsx(iA,{table:n})]})},oA={md:"xs",xl:"md",xs:"xl"},_y=e=>{var{table:{getState:n,options:{icons:{IconBaselineDensityLarge:t,IconBaselineDensityMedium:r,IconBaselineDensitySmall:o},localization:{toggleDensity:s}},setDensity:a},title:u}=e,f=Ie(e,["table","title"]);const{density:g}=n();return c.jsx(b.Tooltip,{label:u??s,withinPortal:!0,children:c.jsx(b.ActionIcon,Object.assign({"aria-label":u??s,color:"gray",onClick:()=>a(h=>oA[h]),size:"lg",variant:"subtle"},f,{children:g==="xs"?c.jsx(o,{}):g==="md"?c.jsx(r,{}):c.jsx(t,{})}))})},by=e=>{var{table:{getState:n,options:{icons:{IconFilter:t,IconFilterOff:r},localization:{showHideFilters:o}},setShowColumnFilters:s},title:a}=e,u=Ie(e,["table","title"]);const{showColumnFilters:f}=n();return c.jsx(b.Tooltip,{label:a??o,withinPortal:!0,children:c.jsx(b.ActionIcon,Object.assign({"aria-label":a??o,color:"gray",onClick:()=>s(g=>!g),size:"lg",variant:"subtle"},u,{children:f?c.jsx(r,{}):c.jsx(t,{})}))})},yy=e=>{var{table:{getState:n,options:{icons:{IconMaximize:t,IconMinimize:r},localization:{toggleFullScreen:o}},setIsFullScreen:s},title:a}=e,u=Ie(e,["table","title"]);const{isFullScreen:f}=n(),[g,h]=I.useState(!1),p=()=>{h(!1),s(_=>!_)};return c.jsx(b.Tooltip,{label:a??o,opened:g,withinPortal:!0,children:c.jsx(b.ActionIcon,Object.assign({"aria-label":a??o,color:"gray",onClick:p,onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),size:"lg",variant:"subtle"},u,{children:f?c.jsx(r,{}):c.jsx(t,{})}))})},wy=e=>{var{table:{getState:n,options:{icons:{IconSearch:t,IconSearchOff:r},localization:{showHideSearch:o}},refs:{searchInputRef:s},setShowGlobalFilter:a},title:u}=e,f=Ie(e,["table","title"]);const{globalFilter:g,showGlobalFilter:h}=n(),p=()=>{a(!h),setTimeout(()=>{var _;return(_=s.current)===null||_===void 0?void 0:_.focus()},100)};return c.jsx(b.Tooltip,{label:u??o,withinPortal:!0,children:c.jsx(b.ActionIcon,Object.assign({"aria-label":u??o,color:"gray",disabled:!!g,onClick:p,size:"lg",variant:"subtle"},f,{children:h?c.jsx(r,{}):c.jsx(t,{})}))})},lA=e=>{var{handleEdit:n,row:t,table:r}=e,o=Ie(e,["handleEdit","row","table"]);const{options:{editDisplayMode:s,enableEditing:a,icons:{IconDots:u,IconEdit:f},localization:g,positionActionsColumn:h,renderRowActionMenuItems:p}}=r;return c.jsxs(b.Menu,{closeOnItemClick:!0,position:h==="first"?"bottom-start":h==="last"?"bottom-end":void 0,withinPortal:!0,children:[c.jsx(b.Tooltip,{label:g.rowActions,openDelay:1e3,withinPortal:!0,children:c.jsx(b.Menu.Target,{children:c.jsx(b.ActionIcon,Object.assign({"aria-label":g.rowActions,color:"gray",onClick:_=>_.stopPropagation(),size:"sm",variant:"subtle"},o,{children:c.jsx(u,{})}))})}),c.jsxs(b.Menu.Dropdown,{onClick:_=>_.stopPropagation(),children:[a&&s!=="table"&&c.jsx(b.Menu.Item,{leftSection:c.jsx(f,{}),onClick:n,children:g.edit}),p==null?void 0:p({row:t,table:r})]})]})},sA=({cell:e,row:n,table:t})=>{const{getState:r,options:{createDisplayMode:o,editDisplayMode:s,enableEditing:a,icons:{IconEdit:u},localization:{edit:f},renderRowActionMenuItems:g,renderRowActions:h},setEditingRow:p}=t,{creatingRow:_,editingRow:v}=r(),y=(_==null?void 0:_.id)===n.id,C=(v==null?void 0:v.id)===n.id,S=E=>{E.stopPropagation(),p(Object.assign({},n))},T=y&&o==="row"||C&&s==="row";return c.jsx(c.Fragment,{children:h&&!T?h({cell:e,row:n,table:t}):T?c.jsx(sy,{row:n,table:t}):!g&&se(a,n)?c.jsx(b.Tooltip,{label:f,openDelay:1e3,position:"right",withinPortal:!0,children:c.jsx(b.ActionIcon,{"aria-label":f,color:"gray",disabled:!!v&&v.id!==n.id,onClick:S,size:"md",variant:"subtle",children:c.jsx(u,{})})}):g?c.jsx(lA,{handleEdit:S,row:n,table:t}):null})};var mf={root:"MRT_TableFooter-module_root__-JXpw",grid:"MRT_TableFooter-module_grid__J3Ga-",sticky:"MRT_TableFooter-module_sticky__GcoK6"},Cy={root:"MRT_TableFooterRow-module_root__EuoPr","layout-mode-grid":"MRT_TableFooterRow-module_layout-mode-grid__dUEMF"},_f={root:"MRT_TableFooterCell-module_root__d8Scs",grid:"MRT_TableFooterCell-module_grid__H9jLk",group:"MRT_TableFooterCell-module_group__l3-p-"};const aA=e=>{var n,t,r,o,s,{footer:a,renderedColumnIndex:u,table:f}=e,g=Ie(e,["footer","renderedColumnIndex","table"]);const h=b.useDirection(),{options:{enableColumnPinning:p,layoutMode:_,mantineTableFooterCellProps:v}}=f,{column:y}=a,{columnDef:C}=y,{columnDefType:S}=C,T=p&&C.columnDefType!=="group"&&y.getIsPinned(),E={column:y,table:f},F=Object.assign(Object.assign(Object.assign({},se(v,E)),se(C.mantineTableFooterCellProps,E)),g),L={minWidth:`max(calc(var(--header-${kn(a==null?void 0:a.id)}-size) * 1px), ${(n=C.minSize)!==null&&n!==void 0?n:30}px)`,width:`calc(var(--header-${kn(a.id)}-size) * 1px)`};return _==="grid"?L.flex=`${[0,!1].includes(C.grow)?0:`var(--header-${kn(a.id)}-size)`} 0 auto`:_==="grid-no-grow"&&(L.flex=`${+(C.grow||0)} 0 auto`),c.jsx(b.TableTh,Object.assign({colSpan:a.colSpan,"data-column-pinned":T||void 0,"data-first-right-pinned":T==="right"&&y.getIsFirstColumn(T)||void 0,"data-index":u,"data-last-left-pinned":T==="left"&&y.getIsLastColumn(T)||void 0},F,{__vars:Object.assign({"--mrt-cell-align":(t=F.align)!==null&&t!==void 0?t:S==="group"?"center":h.dir==="rtl"?"right":"left","--mrt-table-cell-left":T==="left"?`${y.getStart(T)}`:void 0,"--mrt-table-cell-right":T==="right"?`${y.getAfter(T)}`:void 0},F==null?void 0:F.__vars),className:ge(_f.root,(_==null?void 0:_.startsWith("grid"))&&_f.grid,S==="group"&&_f.group,F==null?void 0:F.className),style:O=>Object.assign(Object.assign({},L),se(F.style,O)),children:(r=F.children)!==null&&r!==void 0?r:a.isPlaceholder?null:(s=(o=se(C.Footer,{column:y,footer:a,table:f}))!==null&&o!==void 0?o:C.footer)!==null&&s!==void 0?s:null}))},uA=e=>{var n,{columnVirtualizer:t,footerGroup:r,table:o}=e,s=Ie(e,["columnVirtualizer","footerGroup","table"]);const{options:{layoutMode:a,mantineTableFooterRowProps:u}}=o,{virtualColumns:f,virtualPaddingLeft:g,virtualPaddingRight:h}=t??{};if(!(!((n=r.headers)===null||n===void 0)&&n.some(_=>typeof _.column.columnDef.footer=="string"&&!!_.column.columnDef.footer||_.column.columnDef.Footer)))return null;const p=Object.assign(Object.assign({},se(u,{footerGroup:r,table:o})),s);return c.jsxs(b.TableTr,Object.assign({className:ge(Cy.root,(a==null?void 0:a.startsWith("grid"))&&Cy["layout-mode-grid"])},p,{children:[g?c.jsx(b.Box,{component:"th",display:"flex",w:g}):null,(f??r.headers).map((_,v)=>{let y=_;return t&&(v=_.index,y=r.headers[v]),c.jsx(aA,{footer:y,renderedColumnIndex:v,table:o},y.id)}),h?c.jsx(b.Box,{component:"th",display:"flex",w:h}):null]}))},cA=e=>{var{columnVirtualizer:n,table:t}=e,r=Ie(e,["columnVirtualizer","table"]);const{getFooterGroups:o,getState:s,options:{enableStickyFooter:a,layoutMode:u,mantineTableFooterProps:f},refs:{tableFooterRef:g}}=t,{isFullScreen:h}=s(),p=Object.assign(Object.assign({},se(f,{table:t})),r),_=(h||a)&&a!==!1;return c.jsx(b.TableTfoot,Object.assign({},p,{className:ge(mf.root,p==null?void 0:p.className,_&&mf.sticky,(u==null?void 0:u.startsWith("grid"))&&mf.grid),ref:v=>{g.current=v,p!=null&&p.ref&&(p.ref.current=v)},children:o().map(v=>c.jsx(uA,{columnVirtualizer:n,footerGroup:v,table:t},v.id))}))};var wr={root:"MRT_TableHead-module_root__j9NkO","root-grid":"MRT_TableHead-module_root-grid__c3aGl","root-table-row-group":"MRT_TableHead-module_root-table-row-group__d9FO4","root-sticky":"MRT_TableHead-module_root-sticky__0kuDE","banner-tr":"MRT_TableHead-module_banner-tr__EhT-x","banner-th":"MRT_TableHead-module_banner-th__KwM5a",grid:"MRT_TableHead-module_grid__OJ-td"},bf={root:"MRT_TableHeadRow-module_root__hUKv4","layout-mode-grid":"MRT_TableHeadRow-module_layout-mode-grid__4ZGri",sticky:"MRT_TableHeadRow-module_sticky__Ej7Ax"},Lt={root:"MRT_TableHeadCell-module_root__6y50a","root-grid":"MRT_TableHeadCell-module_root-grid__bAf1d","root-virtualized":"MRT_TableHeadCell-module_root-virtualized__CWLit","root-no-select":"MRT_TableHeadCell-module_root-no-select__BEOVU",content:"MRT_TableHeadCell-module_content__-pzSK","content-spaced":"MRT_TableHeadCell-module_content-spaced__S85Aa","content-center":"MRT_TableHeadCell-module_content-center__c-17L","content-right":"MRT_TableHeadCell-module_content-right__NSRZU","content-wrapper":"MRT_TableHeadCell-module_content-wrapper__py6aJ","content-wrapper-hidden-overflow":"MRT_TableHeadCell-module_content-wrapper-hidden-overflow__QY40r","content-wrapper-nowrap":"MRT_TableHeadCell-module_content-wrapper-nowrap__-4aIg",labels:"MRT_TableHeadCell-module_labels__oiMSr","labels-right":"MRT_TableHeadCell-module_labels-right__6ZJp-","labels-center":"MRT_TableHeadCell-module_labels-center__MM9q8","labels-sortable":"MRT_TableHeadCell-module_labels-sortable__tyuLr","labels-data":"MRT_TableHeadCell-module_labels-data__PvFGO","content-actions":"MRT_TableHeadCell-module_content-actions__utxbm"},dA={"filter-mode-label":"MRT_TableHeadCellFilterContainer-module_filter-mode-label__8reK-"};const Sy=(e,n,t,r)=>{const o=pF(e.getValue(n),t,{threshold:Kt.MATCHES});return r(o),o.passed};Sy.autoRemove=e=>!e;const Ty=(e,n,t)=>{var r;return(r=e.getValue(n))===null||r===void 0?void 0:r.toString().toLowerCase().trim().includes(t.toString().toLowerCase().trim())};Ty.autoRemove=e=>!e;const Iy=(e,n,t)=>{var r;return(r=e.getValue(n))===null||r===void 0?void 0:r.toString().toLowerCase().trim().startsWith(t.toString().toLowerCase().trim())};Iy.autoRemove=e=>!e;const My=(e,n,t)=>{var r;return(r=e.getValue(n))===null||r===void 0?void 0:r.toString().toLowerCase().trim().endsWith(t.toString().toLowerCase().trim())};My.autoRemove=e=>!e;const Ml=(e,n,t)=>{var r;return((r=e.getValue(n))===null||r===void 0?void 0:r.toString().toLowerCase().trim())===(t==null?void 0:t.toString().toLowerCase().trim())};Ml.autoRemove=e=>!e;const xy=(e,n,t)=>{var r;return((r=e.getValue(n))===null||r===void 0?void 0:r.toString().toLowerCase().trim())!==t.toString().toLowerCase().trim()};xy.autoRemove=e=>!e;const xl=(e,n,t)=>{var r;return!isNaN(+t)&&!isNaN(+e.getValue(n))?+e.getValue(n)>+t:((r=e.getValue(n))===null||r===void 0?void 0:r.toString().toLowerCase().trim())>(t==null?void 0:t.toString().toLowerCase().trim())};xl.autoRemove=e=>!e;const yf=(e,n,t)=>Ml(e,n,t)||xl(e,n,t);yf.autoRemove=e=>!e;const El=(e,n,t)=>{var r;return!isNaN(+t)&&!isNaN(+e.getValue(n))?+e.getValue(n)<+t:((r=e.getValue(n))===null||r===void 0?void 0:r.toString().toLowerCase().trim())<(t==null?void 0:t.toString().toLowerCase().trim())};El.autoRemove=e=>!e;const wf=(e,n,t)=>Ml(e,n,t)||El(e,n,t);wf.autoRemove=e=>!e;const Ey=(e,n,t)=>(["",void 0].includes(t[0])||xl(e,n,t[0]))&&(!isNaN(+t[0])&&!isNaN(+t[1])&&+t[0]>+t[1]||["",void 0].includes(t[1])||El(e,n,t[1]));Ey.autoRemove=e=>!e;const Fy=(e,n,t)=>(["",void 0].includes(t[0])||yf(e,n,t[0]))&&(!isNaN(+t[0])&&!isNaN(+t[1])&&+t[0]>+t[1]||["",void 0].includes(t[1])||wf(e,n,t[1]));Fy.autoRemove=e=>!e;const Ay=(e,n,t)=>{var r;return!(!((r=e.getValue(n))===null||r===void 0)&&r.toString().trim())};Ay.autoRemove=e=>!e;const Oy=(e,n,t)=>{var r;return!!(!((r=e.getValue(n))===null||r===void 0)&&r.toString().trim())};Oy.autoRemove=e=>!e;const fA=Object.assign(Object.assign({},Gn),{between:Ey,betweenInclusive:Fy,contains:Ty,empty:Ay,endsWith:My,equals:Ml,fuzzy:Sy,greaterThan:xl,greaterThanOrEqualTo:yf,lessThan:El,lessThanOrEqualTo:wf,notEmpty:Oy,notEquals:xy,startsWith:Iy});function oo(e,n){var t;if(!n)return"";const r=`filter${n[0].toUpperCase()}${n.slice(1)}`;return(t=e[r])!==null&&t!==void 0?t:""}var gA={root:"MRT_FilterCheckBox-module_root__59h9r"};const hA=e=>{var n,t,r,{column:o,table:s}=e,a=Ie(e,["column","table"]);const{getState:u,options:{localization:f,mantineFilterCheckboxProps:g}}=s,{density:h}=u(),{columnDef:p}=o,_={column:o,table:s},v=Object.assign(Object.assign(Object.assign({},se(g,_)),se(p.mantineFilterCheckboxProps,_)),a),y=(n=f.filterByColumn)===null||n===void 0?void 0:n.replace("{column}",p.header),C=o.getFilterValue();return c.jsx(b.Tooltip,{label:(t=v==null?void 0:v.title)!==null&&t!==void 0?t:y,openDelay:1e3,withinPortal:!0,children:c.jsx(b.Checkbox,Object.assign({checked:C==="true",className:ge("mrt-filter-checkbox",gA.root),indeterminate:C===void 0,label:(r=v.title)!==null&&r!==void 0?r:y,size:h==="xs"?"sm":"md"},v,{onChange:S=>{var T;o.setFilterValue(o.getFilterValue()===void 0?"true":o.getFilterValue()==="true"?"false":void 0),(T=v==null?void 0:v.onChange)===null||T===void 0||T.call(v,S)},onClick:S=>{var T;S.stopPropagation(),(T=v==null?void 0:v.onClick)===null||T===void 0||T.call(v,S)},title:void 0}))})};var pA={root:"MRT_FilterRangeFields-module_root__KfCcg"},lo={root:"MRT_FilterTextInput-module_root__Ss8Ql","date-filter":"MRT_FilterTextInput-module_date-filter__jOBLB","range-filter":"MRT_FilterTextInput-module_range-filter__JQHAL","not-filter-chip":"MRT_FilterTextInput-module_not-filter-chip__u8b1y","filter-chip-badge":"MRT_FilterTextInput-module_filter-chip-badge__Sel2k"};const Cf=e=>{var n,t,r,o,s,a,u,f,{header:g,rangeFilterIndex:h,table:p}=e,_=Ie(e,["header","rangeFilterIndex","table"]);const{options:{columnFilterDisplayMode:v,columnFilterModeOptions:y,icons:{IconX:C},localization:S,mantineFilterAutocompleteProps:T,mantineFilterDateInputProps:E,mantineFilterMultiSelectProps:F={clearable:!0},mantineFilterSelectProps:L,mantineFilterTextInputProps:O,manualFiltering:P},refs:{filterInputRefs:k},setColumnFilterFns:z}=p,{column:j}=g,{columnDef:$}=j,H={column:j,rangeFilterIndex:h,table:p},re=Object.assign(Object.assign(Object.assign({},se(O,H)),se($.mantineFilterTextInputProps,H)),_),Z=Object.assign(Object.assign({},se(L,H)),se($.mantineFilterSelectProps,H)),ne=Object.assign(Object.assign({},se(F,H)),se($.mantineFilterMultiSelectProps,H)),ce=Object.assign(Object.assign({},se(E,H)),se($.mantineFilterDateInputProps,H)),q=Object.assign(Object.assign({},se(T,H)),se($.mantineFilterAutocompleteProps,H)),U=$.filterVariant==="range"||$.filterVariant==="date-range"||h!==void 0,le=$.filterVariant==="select",_e=$.filterVariant==="multi-select",he=$.filterVariant==="date"||$.filterVariant==="date-range",de=$.filterVariant==="autocomplete",Ae=(n=$==null?void 0:$.columnFilterModeOptions)!==null&&n!==void 0?n:y,ue=$._filterFn,pe=["empty","notEmpty"].includes(ue)?oo(S,ue):"",K=U?h===0?S.min:h===1?S.max:"":(t=re==null?void 0:re.placeholder)!==null&&t!==void 0?t:(r=S.filterByColumn)===null||r===void 0?void 0:r.replace("{column}",String($.header)),ee=j.getFacetedUniqueValues(),oe=I.useMemo(()=>{var Q,Be,rt;return((rt=(Be=(Q=q==null?void 0:q.data)!==null&&Q!==void 0?Q:Z==null?void 0:Z.data)!==null&&Be!==void 0?Be:ne==null?void 0:ne.data)!==null&&rt!==void 0?rt:(de||le||_e)&&ee?Array.from(ee.keys()).filter(Ze=>Ze!==null).sort((Ze,Nt)=>Ze.localeCompare(Nt)):[]).filter(Ze=>Ze!=null)},[q==null?void 0:q.data,ee,de,_e,le,ne==null?void 0:ne.data,Z==null?void 0:Z.data]),xe=I.useRef(!1),[X,Ne]=I.useState(()=>{var Q,Be;return _e?j.getFilterValue()||[]:U?((Q=j.getFilterValue())===null||Q===void 0?void 0:Q[h])||"":(Be=j.getFilterValue())!==null&&Be!==void 0?Be:""}),[Je]=je.useDebouncedValue(X,P?400:200);I.useEffect(()=>{xe.current&&(U?j.setFilterValue(Q=>{const Be=Array.isArray(Q)?Q:["",""];return Be[h]=Je,Be}):j.setFilterValue(Je??void 0))},[Je]),I.useEffect(()=>{if(!xe.current){xe.current=!0;return}const Q=j.getFilterValue();Q===void 0?Ge():Ne(U&&h!==void 0?(Q??["",""])[h]:Q??"")},[j.getFilterValue()]);const Ge=()=>{_e?(Ne([]),j.setFilterValue([])):U?(Ne(""),j.setFilterValue(Q=>{const Be=Array.isArray(Q)?Q:["",""];return Be[h]=void 0,Be})):le?(Ne(null),j.setFilterValue(null)):(Ne(""),j.setFilterValue(void 0))},st=()=>{_e?(Ne([]),j.setFilterValue([])):(Ne(""),j.setFilterValue(void 0)),z(Q=>{var Be;return Object.assign(Object.assign({},Q),{[g.id]:(Be=Ae==null?void 0:Ae[0])!==null&&Be!==void 0?Be:"fuzzy"})})},Re={"aria-label":K,className:ge("mrt-filter-text-input",lo.root,he?lo["date-filter"]:U?lo["range-filter"]:!pe&&lo["not-filter-chip"]),disabled:!!pe,onChange:Ne,onClick:Q=>Q.stopPropagation(),placeholder:K,style:Object.assign({},_e?ne==null?void 0:ne.style:le?Z==null?void 0:Z.style:he?ce==null?void 0:ce.style:re==null?void 0:re.style),title:K,value:_e&&!Array.isArray(X)?[]:X,variant:"unstyled"},{className:De}=Re,Pe=Ie(Re,["className"]),Oe=X?c.jsx(b.ActionIcon,{"aria-label":S.clearFilter,color:"var(--mantine-color-gray-7)",onClick:Ge,size:"sm",title:(o=S.clearFilter)!==null&&o!==void 0?o:"",variant:"transparent",children:c.jsx(C,{})}):null;return $.Filter?c.jsx(c.Fragment,{children:(s=$.Filter)===null||s===void 0?void 0:s.call($,{column:j,header:g,rangeFilterIndex:h,table:p})}):pe?c.jsx(b.Box,{style:Pe.style,children:c.jsx(b.Badge,{className:lo["filter-chip-badge"],onClick:st,rightSection:Oe,size:"lg",children:pe})}):_e?c.jsx(b.MultiSelect,Object.assign({},Pe,{searchable:!0},ne,{className:ge(De,ne.className),data:oe,onChange:Q=>Ne(Q),ref:Q=>{Q&&(k.current[`${j.id}-${h??0}`]=Q,ne.ref&&(ne.ref.current=Q))},rightSection:!((a=X==null?void 0:X.toString())===null||a===void 0)&&a.length&&(ne!=null&&ne.clearable)?Oe:void 0,style:Pe.style})):le?c.jsx(b.Select,Object.assign({},Pe,{clearable:!0,searchable:!0},Z,{className:ge(De,Z.className),clearButtonProps:{size:"md"},data:oe,ref:Q=>{Q&&(k.current[`${j.id}-${h??0}`]=Q,Z.ref&&(Z.ref.current=Q))},style:Pe.style})):he?c.jsx(ni.DateInput,Object.assign({},Pe,{allowDeselect:!0,clearable:!0,popoverProps:{withinPortal:v!=="popover"}},ce,{className:ge(De,ce.className),onChange:Q=>Pe.onChange(Q===null?"":Q),ref:Q=>{Q&&(k.current[`${j.id}-${h??0}`]=Q,ce.ref&&(ce.ref.current=Q))},style:Pe.style})):de?c.jsx(b.Autocomplete,Object.assign({},Pe,{onChange:Q=>Ne(Q),rightSection:!((u=X==null?void 0:X.toString())===null||u===void 0)&&u.length?Oe:void 0},q,{className:ge(De,q.className),data:oe,ref:Q=>{Q&&(k.current[`${j.id}-${h??0}`]=Q,q.ref&&(q.ref.current=Q))},style:Pe.style})):c.jsx(b.TextInput,Object.assign({},Pe,{onChange:Q=>Ne(Q.target.value),rightSection:!((f=X==null?void 0:X.toString())===null||f===void 0)&&f.length?Oe:void 0},re,{className:ge(De,re.className),mt:0,ref:Q=>{Q&&(k.current[`${j.id}-${h??0}`]=Q,re.ref&&(re.ref.current=Q))},style:Pe.style}))},vA=e=>{var{header:n,table:t}=e,r=Ie(e,["header","table"]);return c.jsxs(b.Box,Object.assign({},r,{className:ge("mrt-filter-range-fields",pA.root,r.className),children:[c.jsx(Cf,{header:n,rangeFilterIndex:0,table:t}),c.jsx(Cf,{header:n,rangeFilterIndex:1,table:t})]}))};var mA={root:"MRT_FilterRangeSlider-module_root__uwYEk"};const _A=e=>{var n,{header:t,table:r}=e,o=Ie(e,["header","table"]);const{options:{mantineFilterRangeSliderProps:s},refs:{filterInputRefs:a}}=r,{column:u}=t,{columnDef:f}=u,g={column:u,table:r},h=Object.assign(Object.assign(Object.assign({},se(s,g)),se(f.mantineFilterRangeSliderProps,g)),o);let[p,_]=h.min!==void 0&&h.max!==void 0?[h.min,h.max]:(n=u.getFacetedMinMaxValues())!==null&&n!==void 0?n:[0,1];Array.isArray(p)&&(p=p[0]),Array.isArray(_)&&(_=_[0]),p===null&&(p=0),_===null&&(_=1);const[v,y]=I.useState([p,_]),C=u.getFilterValue(),S=I.useRef(!1);return I.useEffect(()=>{S.current&&(C===void 0?y([p,_]):Array.isArray(C)&&y(C)),S.current=!0},[C,p,_]),c.jsx(b.RangeSlider,Object.assign({className:ge("mrt-filter-range-slider",mA.root),max:_,min:p,onChange:T=>{y(T)},onChangeEnd:T=>{Array.isArray(T)&&(T[0]<=p&&T[1]>=_?u.setFilterValue(void 0):u.setFilterValue(T))},value:v},h,{ref:T=>{T&&(a.current[`${u.id}-0`]=T,h!=null&&h.ref&&(h.ref=T))}}))};var bA={symbol:"MRT_FilterOptionMenu-module_symbol__a1Bsy"};const yA=e=>[{divider:!1,label:e.filterFuzzy,option:"fuzzy",symbol:"≈"},{divider:!1,label:e.filterContains,option:"contains",symbol:"*"},{divider:!1,label:e.filterStartsWith,option:"startsWith",symbol:"a"},{divider:!0,label:e.filterEndsWith,option:"endsWith",symbol:"z"},{divider:!1,label:e.filterEquals,option:"equals",symbol:"="},{divider:!0,label:e.filterNotEquals,option:"notEquals",symbol:"≠"},{divider:!1,label:e.filterBetween,option:"between",symbol:"⇿"},{divider:!0,label:e.filterBetweenInclusive,option:"betweenInclusive",symbol:"⬌"},{divider:!1,label:e.filterGreaterThan,option:"greaterThan",symbol:">"},{divider:!1,label:e.filterGreaterThanOrEqualTo,option:"greaterThanOrEqualTo",symbol:"≥"},{divider:!1,label:e.filterLessThan,option:"lessThan",symbol:"<"},{divider:!0,label:e.filterLessThanOrEqualTo,option:"lessThanOrEqualTo",symbol:"≤"},{divider:!1,label:e.filterEmpty,option:"empty",symbol:"∅"},{divider:!1,label:e.filterNotEmpty,option:"notEmpty",symbol:"!∅"}],Fl=["between","betweenInclusive","inNumberRange"],Sf=["empty","notEmpty"],wA=["arrIncludesSome","arrIncludesAll","arrIncludes"],Py=["range-slider","date-range","range"],Dy=({header:e,onSelect:n,table:t})=>{var r,o,s,a;const{getState:u,options:{columnFilterModeOptions:f,globalFilterModeOptions:g,localization:h,renderColumnFilterModeMenuItems:p,renderGlobalFilterModeMenuItems:_},setColumnFilterFns:v,setGlobalFilterFn:y}=t,{globalFilterFn:C}=u(),{column:S}=e??{},{columnDef:T}=S??{},E=S==null?void 0:S.getFilterValue();let F=(r=T==null?void 0:T.columnFilterModeOptions)!==null&&r!==void 0?r:f;Py.includes(T==null?void 0:T.filterVariant)&&(F=[...Fl,...F??[]].filter(k=>Fl.includes(k)));const L=I.useMemo(()=>yA(h).filter(k=>T?F===void 0||(F==null?void 0:F.includes(k.option)):(!g||g.includes(k.option))&&["contains","fuzzy","startsWith"].includes(k.option)),[]),O=k=>{var z;const j=(z=T==null?void 0:T._filterFn)!==null&&z!==void 0?z:"";!e||!S?y(k):k!==j&&(v($=>Object.assign(Object.assign({},$),{[e.id]:k})),Sf.includes(k)?E!==" "&&!Sf.includes(j)?S.setFilterValue(" "):E&&S.setFilterValue(E):(T==null?void 0:T.filterVariant)==="multi-select"||wA.includes(k)?E instanceof String||E!=null&&E.length?S.setFilterValue([]):E&&S.setFilterValue(E):Py.includes(T==null?void 0:T.filterVariant)||Fl.includes(k)?!Array.isArray(E)||!(E!=null&&E.every($=>$===""))&&!Fl.includes(j)?S.setFilterValue(["",""]):S.setFilterValue(E):Array.isArray(E)?S.setFilterValue(""):E===" "&&Sf.includes(j)?S.setFilterValue(void 0):S.setFilterValue(E)),n==null||n()},P=e&&T?T._filterFn:C;return c.jsx(b.Menu.Dropdown,{children:(a=e&&S&&T?(s=(o=T.renderColumnFilterModeMenuItems)===null||o===void 0?void 0:o.call(T,{column:S,internalFilterOptions:L,onSelectFilterMode:O,table:t}))!==null&&s!==void 0?s:p==null?void 0:p({column:S,internalFilterOptions:L,onSelectFilterMode:O,table:t}):_==null?void 0:_({internalFilterOptions:L,onSelectFilterMode:O,table:t}))!==null&&a!==void 0?a:L.map(({divider:k,label:z,option:j,symbol:$},H)=>c.jsxs(I.Fragment,{children:[c.jsx(b.Menu.Item,{color:j===P?"blue":void 0,leftSection:c.jsx("span",{className:bA.symbol,children:$}),onClick:()=>O(j),value:j,children:z}),k&&c.jsx(b.Menu.Divider,{})]},H))})},ky=e=>{var n,t,{header:r,table:o}=e,s=Ie(e,["header","table"]);const{getState:a,options:{columnFilterDisplayMode:u,columnFilterModeOptions:f,enableColumnFilterModes:g,icons:{IconFilterCog:h},localization:p},refs:{filterInputRefs:_}}=o,{showColumnFilters:v}=a(),{column:y}=r,{columnDef:C}=y,S=C._filterFn,T=(n=C==null?void 0:C.columnFilterModeOptions)!==null&&n!==void 0?n:f,E=g&&C.enableColumnFilterModes!==!1&&(T===void 0||!!(T!=null&&T.length));return c.jsx(b.Collapse,{in:v||u==="popover",children:c.jsxs(b.Flex,Object.assign({direction:"column"},s,{children:[c.jsxs(b.Flex,{align:"flex-end",children:[C.filterVariant==="checkbox"?c.jsx(hA,{column:y,table:o}):C.filterVariant==="range-slider"?c.jsx(_A,{header:r,table:o}):["date-range","range"].includes((t=C.filterVariant)!==null&&t!==void 0?t:"")||["between","betweenInclusive","inNumberRange"].includes(C._filterFn)?c.jsx(vA,{header:r,table:o}):c.jsx(Cf,{header:r,table:o}),E&&c.jsxs(b.Menu,{withinPortal:u!=="popover",children:[c.jsx(b.Tooltip,{label:p.changeFilterMode,position:"bottom-start",withinPortal:!0,children:c.jsx(b.Menu.Target,{children:c.jsx(b.ActionIcon,{"aria-label":p.changeFilterMode,color:"gray",size:"md",variant:"subtle",children:c.jsx(h,{})})})}),c.jsx(Dy,{header:r,onSelect:()=>setTimeout(()=>{var F;return(F=_.current[`${y.id}-0`])===null||F===void 0?void 0:F.focus()},100),table:o})]})]}),E?c.jsx(b.Text,{c:"dimmed",className:dA["filter-mode-label"],component:"label",children:p.filterMode.replace("{filterType}",oo(p,S))}):null]}))})};var CA={root:"MRT_TableHeadCellFilterLabel-module_root__Rur2R"};const SA=e=>{var n,t,r,{header:o,table:s}=e,a=Ie(e,["header","table"]);const{options:{columnFilterDisplayMode:u,icons:{IconFilter:f},localization:g},refs:{filterInputRefs:h},setShowColumnFilters:p}=s,{column:_}=o,{columnDef:v}=_,y=_.getFilterValue(),[C,S]=I.useState(!1),T=Array.isArray(y)&&y.some(Boolean)||!!y&&!Array.isArray(y),E=v.filterVariant==="range"||v.filterVariant==="date-range"||["between","betweenInclusive","inNumberRange"].includes(v._filterFn),F=v._filterFn,L=v.filterTooltipValueFn||(P=>P),O=u==="popover"&&!T?(n=g.filterByColumn)===null||n===void 0?void 0:n.replace("{column}",String(v.header)):g.filteringByColumn.replace("{column}",String(v.header)).replace("{filterType}",oo(g,F)).replace("{filterValue}",`"${Array.isArray(_.getFilterValue())?_.getFilterValue().map(P=>L(P)).join(`" ${E?g.and:g.or} "`):L(_.getFilterValue())}"`).replace('" "',"");return c.jsx(c.Fragment,{children:c.jsxs(b.Popover,{keepMounted:v.filterVariant==="range-slider",onChange:S,onClose:()=>S(!1),opened:C,position:"top",shadow:"xl",width:360,withinPortal:!0,children:[c.jsx(b.Transition,{mounted:u==="popover"||!!_.getFilterValue()&&!E||E&&(!!(!((t=_.getFilterValue())===null||t===void 0)&&t[0])||!!(!((r=_.getFilterValue())===null||r===void 0)&&r[1])),transition:"scale",children:()=>c.jsx(b.Popover.Target,{children:c.jsx(b.Tooltip,{disabled:C,label:O,multiline:!0,w:O.length>40?300:void 0,withinPortal:!0,children:c.jsx(b.ActionIcon,Object.assign({className:ge("mrt-table-head-cell-filter-label-icon",CA.root),size:18},wl("active",T),{onClick:P=>{P.stopPropagation(),u==="popover"?S(k=>!k):p(!0),setTimeout(()=>{const k=h.current[`${_.id}-0`];k==null||k.focus(),k==null||k.select()},100)}},a,{children:c.jsx(f,{size:"100%"})}))})})}),u==="popover"&&c.jsx(b.Popover.Dropdown,{onClick:P=>P.stopPropagation(),onKeyDown:P=>P.key==="Enter"&&S(!1),onMouseDown:P=>P.stopPropagation(),children:c.jsx(ky,{header:o,table:s})})]})})},TA=e=>{var{column:n,table:t,tableHeadCellRef:r}=e,o=Ie(e,["column","table","tableHeadCellRef"]);const{getState:s,options:{enableColumnOrdering:a,mantineColumnDragHandleProps:u},setColumnOrder:f,setDraggingColumn:g,setHoveredColumn:h}=t,{columnDef:p}=n,{columnOrder:_,draggingColumn:v,hoveredColumn:y}=s(),C={column:n,table:t},S=Object.assign(Object.assign(Object.assign({},se(u,C)),se(p.mantineColumnDragHandleProps,C)),o),T=F=>{var L;(L=S==null?void 0:S.onDragStart)===null||L===void 0||L.call(S,F),g(n),F.dataTransfer.setDragImage(r.current,0,0)},E=F=>{var L;(L=S==null?void 0:S.onDragEnd)===null||L===void 0||L.call(S,F),(y==null?void 0:y.id)==="drop-zone"?n.toggleGrouping():a&&y&&(y==null?void 0:y.id)!==(v==null?void 0:v.id)&&f(cy(n,y,_)),g(null),h(null)};return c.jsx(df,{actionIconProps:S,onDragEnd:E,onDragStart:T,table:t})};var Tf={root:"MRT_TableHeadCellResizeHandle-module_root__paufe","root-ltr":"MRT_TableHeadCellResizeHandle-module_root-ltr__652AZ","root-rtl":"MRT_TableHeadCellResizeHandle-module_root-rtl__5VlSo","root-hide":"MRT_TableHeadCellResizeHandle-module_root-hide__-ILlD"};const IA=e=>{var n,{header:t,table:r}=e,o=Ie(e,["header","table"]);const{getState:s,options:{columnResizeDirection:a,columnResizeMode:u},setColumnSizingInfo:f}=r,{density:g}=s(),{column:h}=t,p=t.getResizeHandler(),_=h.getIsResizing()&&u==="onEnd"?`translateX(${(a==="rtl"?-1:1)*((n=s().columnSizingInfo.deltaOffset)!==null&&n!==void 0?n:0)}px)`:void 0;return c.jsx(b.Box,Object.assign({onDoubleClick:()=>{f(v=>Object.assign(Object.assign({},v),{isResizingColumn:!1})),h.resetSize()},onMouseDown:p,onTouchStart:p,role:"separator"},o,{__vars:Object.assign({"--mrt-transform":_},o.__vars),className:ge("mrt-table-head-cell-resize-handle",Tf.root,Tf[`root-${a}`],!t.subHeaders.length&&u==="onChange"&&Tf["root-hide"],g,o.className)}))};var Ly={"sort-icon":"MRT_TableHeadCellSortLabel-module_sort-icon__zs1xA","multi-sort-indicator":"MRT_TableHeadCellSortLabel-module_multi-sort-indicator__MGBj2"};const MA=e=>{var{header:n,table:t}=e,r=Ie(e,["header","table"]);const{getState:o,options:{icons:{IconArrowsSort:s,IconSortAscending:a,IconSortDescending:u},localization:f}}=t,g=n.column,{columnDef:h}=g,{sorting:p}=o(),_=g.getIsSorted(),v=g.getSortIndex(),y=_?_==="desc"?f.sortedByColumnDesc.replace("{column}",h.header):f.sortedByColumnAsc.replace("{column}",h.header):g.getNextSortingOrder()==="desc"?f.sortByColumnDesc.replace("{column}",h.header):f.sortByColumnAsc.replace("{column}",h.header),C=c.jsx(b.ActionIcon,Object.assign({"aria-label":y},wl("sorted",_),r,{className:ge("mrt-table-head-sort-button",Ly["sort-icon"],r.className),children:_==="desc"?c.jsx(u,{size:"100%"}):_==="asc"?c.jsx(a,{size:"100%"}):c.jsx(s,{size:"100%"})}));return c.jsx(b.Tooltip,{label:y,openDelay:1e3,withinPortal:!0,children:p.length<2||v===-1?C:c.jsx(b.Indicator,{className:ge("mrt-table-head-multi-sort-indicator",Ly["multi-sort-indicator"]),inline:!0,label:v+1,offset:4,children:C})})};var Ny={left:"MRT_ColumnActionMenu-module_left__cfNmY",right:"MRT_ColumnActionMenu-module_right__-nK56"};const xA=e=>{var n,t,r,o,s,a,u,f,g,h,{header:p,table:_}=e,v=Ie(e,["header","table"]);const{getState:y,options:{columnFilterDisplayMode:C,enableColumnFilters:S,enableColumnPinning:T,enableColumnResizing:E,enableGrouping:F,enableHiding:L,enableSorting:O,enableSortingRemoval:P,icons:{IconArrowAutofitContent:k,IconBoxMultiple:z,IconClearAll:j,IconColumns:$,IconDotsVertical:H,IconEyeOff:re,IconFilter:Z,IconFilterOff:ne,IconPinned:ce,IconPinnedOff:q,IconSortAscending:U,IconSortDescending:le},localization:_e,mantineColumnActionsButtonProps:he,renderColumnActionsMenuItems:de},refs:{filterInputRefs:Ae},setColumnOrder:ue,setColumnSizingInfo:pe,setShowColumnFilters:K,toggleAllColumnsVisible:ee}=_,{column:oe}=p,{columnDef:xe}=oe,{columnSizing:X,columnVisibility:Ne}=y(),Je={column:oe,table:_},Ge=Object.assign(Object.assign({},se(he,Je)),se(xe.mantineColumnActionsButtonProps,Je)),st=()=>{oe.clearSorting()},Re=()=>{oe.toggleSorting(!1)},De=()=>{oe.toggleSorting(!0)},Pe=()=>{pe(ot=>Object.assign(Object.assign({},ot),{isResizingColumn:!1})),oe.resetSize()},Oe=()=>{oe.toggleVisibility(!1)},Q=ot=>{oe.pin(ot)},Be=()=>{oe.toggleGrouping(),ue(ot=>["mrt-row-expand",...ot])},rt=()=>{oe.setFilterValue("")},Ze=()=>{K(!0),setTimeout(()=>{var ot;return(ot=Ae.current[`${oe.id}-0`])===null||ot===void 0?void 0:ot.focus()},100)},Nt=()=>{ee(!0)},Ct=c.jsxs(c.Fragment,{children:[O&&oe.getCanSort()&&c.jsxs(c.Fragment,{children:[P!==!1&&c.jsx(b.Menu.Item,{disabled:!oe.getIsSorted(),leftSection:c.jsx(j,{}),onClick:st,children:_e.clearSort}),c.jsx(b.Menu.Item,{disabled:oe.getIsSorted()==="asc",leftSection:c.jsx(U,{}),onClick:Re,children:(n=_e.sortByColumnAsc)===null||n===void 0?void 0:n.replace("{column}",String(xe.header))}),c.jsx(b.Menu.Item,{disabled:oe.getIsSorted()==="desc",leftSection:c.jsx(le,{}),onClick:De,children:(t=_e.sortByColumnDesc)===null||t===void 0?void 0:t.replace("{column}",String(xe.header))}),(S||F||L)&&c.jsx(b.Menu.Divider,{},3)]}),S&&C!=="popover"&&oe.getCanFilter()&&c.jsxs(c.Fragment,{children:[c.jsx(b.Menu.Item,{disabled:!oe.getFilterValue(),leftSection:c.jsx(ne,{}),onClick:rt,children:_e.clearFilter}),c.jsx(b.Menu.Item,{leftSection:c.jsx(Z,{}),onClick:Ze,children:(r=_e.filterByColumn)===null||r===void 0?void 0:r.replace("{column}",String(xe.header))}),(F||L)&&c.jsx(b.Menu.Divider,{},2)]}),F&&oe.getCanGroup()&&c.jsxs(c.Fragment,{children:[c.jsx(b.Menu.Item,{leftSection:c.jsx(z,{}),onClick:Be,children:(o=_e[oe.getIsGrouped()?"ungroupByColumn":"groupByColumn"])===null||o===void 0?void 0:o.replace("{column}",String(xe.header))}),T&&c.jsx(b.Menu.Divider,{})]}),T&&oe.getCanPin()&&c.jsxs(c.Fragment,{children:[c.jsx(b.Menu.Item,{disabled:oe.getIsPinned()==="left"||!oe.getCanPin(),leftSection:c.jsx(ce,{className:Ny.left}),onClick:()=>Q("left"),children:_e.pinToLeft}),c.jsx(b.Menu.Item,{disabled:oe.getIsPinned()==="right"||!oe.getCanPin(),leftSection:c.jsx(ce,{className:Ny.right}),onClick:()=>Q("right"),children:_e.pinToRight}),c.jsx(b.Menu.Item,{disabled:!oe.getIsPinned(),leftSection:c.jsx(q,{}),onClick:()=>Q(!1),children:_e.unpin}),L&&c.jsx(b.Menu.Divider,{})]}),E&&oe.getCanResize()&&c.jsx(b.Menu.Item,{disabled:!X[oe.id],leftSection:c.jsx(k,{}),onClick:Pe,children:_e.resetColumnSize},0),L&&c.jsxs(c.Fragment,{children:[c.jsx(b.Menu.Item,{disabled:!oe.getCanHide(),leftSection:c.jsx(re,{}),onClick:Oe,children:(s=_e.hideColumn)===null||s===void 0?void 0:s.replace("{column}",String(xe.header))},0),c.jsx(b.Menu.Item,{disabled:!Object.values(Ne).filter(ot=>!ot).length,leftSection:c.jsx($,{}),onClick:Nt,children:(a=_e.showAllColumns)===null||a===void 0?void 0:a.replace("{column}",String(xe.header))},1)]})]});return c.jsxs(b.Menu,Object.assign({closeOnItemClick:!0,position:"bottom-start",withinPortal:!0},v,{children:[c.jsx(b.Tooltip,{label:(u=Ge==null?void 0:Ge.title)!==null&&u!==void 0?u:_e.columnActions,openDelay:1e3,withinPortal:!0,children:c.jsx(b.Menu.Target,{children:c.jsx(b.ActionIcon,Object.assign({"aria-label":_e.columnActions,color:"gray",size:"sm",variant:"subtle"},Ge,{children:c.jsx(H,{size:"100%"})}))})}),c.jsx(b.Menu.Dropdown,{children:(h=(g=(f=xe.renderColumnActionsMenuItems)===null||f===void 0?void 0:f.call(xe,{column:oe,internalColumnMenuItems:Ct,table:_}))!==null&&g!==void 0?g:de==null?void 0:de({column:oe,internalColumnMenuItems:Ct,table:_}))!==null&&h!==void 0?h:Ct})]}))},EA=e=>{var n,t,r,o,s,a,{columnVirtualizer:u,header:f,renderedHeaderIndex:g=0,table:h}=e,p=Ie(e,["columnVirtualizer","header","renderedHeaderIndex","table"]);const _=b.useDirection(),{getState:v,options:{columnFilterDisplayMode:y,columnResizeDirection:C,columnResizeMode:S,enableColumnActions:T,enableColumnDragging:E,enableColumnOrdering:F,enableColumnPinning:L,enableGrouping:O,enableHeaderActionsHoverReveal:P,enableMultiSort:k,layoutMode:z,mantineTableHeadCellProps:j},refs:{tableHeadCellRefs:$},setHoveredColumn:H}=h,{columnSizingInfo:re,draggingColumn:Z,grouping:ne,hoveredColumn:ce}=v(),{column:q}=f,{columnDef:U}=q,{columnDefType:le}=U,_e={column:q,table:h},he=Object.assign(Object.assign(Object.assign({},se(j,_e)),se(U.mantineTableHeadCellProps,_e)),p),de={minWidth:`max(calc(var(--header-${kn(f==null?void 0:f.id)}-size) * 1px), ${(n=U.minSize)!==null&&n!==void 0?n:30}px)`,width:`calc(var(--header-${kn(f.id)}-size) * 1px)`};z==="grid"?de.flex=`${[0,!1].includes(U.grow)?0:`var(--header-${kn(f.id)}-size)`} 0 auto`:z==="grid-no-grow"&&(de.flex=`${+(U.grow||0)} 0 auto`);const Ae=L&&U.columnDefType!=="group"&&q.getIsPinned(),ue=(Z==null?void 0:Z.id)===q.id,pe=(ce==null?void 0:ce.id)===q.id,{hovered:K,ref:ee}=je.useHover(),[oe,xe]=I.useState(!1),X=(T||U.enableColumnActions)&&U.enableColumnActions!==!1,Ne=!P||oe||K&&!h.getVisibleFlatColumns().find(De=>De.getIsResizing()),Je=E!==!1&&U.enableColumnDragging!==!1&&(E||F&&U.enableColumnOrdering!==!1||O&&U.enableGrouping!==!1&&!ne.includes(q.id))&&Ne,Ge=I.useMemo(()=>{let De=0;return q.getCanSort()&&De++,Ne&&(De+=1.75),Je&&(De+=1.25),De},[Ne,Je]),st=De=>{O&&(ce==null?void 0:ce.id)==="drop-zone"&&H(null),F&&Z&&le!=="group"&&H(U.enableColumnOrdering!==!1?q:null)},Re=(U==null?void 0:U.Header)instanceof Function?(t=U==null?void 0:U.Header)===null||t===void 0?void 0:t.call(U,{column:q,header:f,table:h}):(r=U==null?void 0:U.Header)!==null&&r!==void 0?r:U.header;return c.jsxs(b.TableTh,Object.assign({colSpan:f.colSpan,"data-column-pinned":Ae||void 0,"data-dragging-column":ue||void 0,"data-first-right-pinned":Ae==="right"&&q.getIsFirstColumn(Ae)||void 0,"data-hovered-column-target":pe||void 0,"data-index":g,"data-last-left-pinned":Ae==="left"&&q.getIsLastColumn(Ae)||void 0,"data-resizing":S==="onChange"&&(re==null?void 0:re.isResizingColumn)===q.id&&C||void 0},he,{__vars:{"--mrt-table-cell-left":Ae==="left"?`${q.getStart(Ae)}`:void 0,"--mrt-table-cell-right":Ae==="right"?`${q.getAfter(Ae)}`:void 0},align:le==="group"?"center":_.dir==="rtl"?"right":"left",className:ge(Lt.root,(z==null?void 0:z.startsWith("grid"))&&Lt["root-grid"],k&&q.getCanSort()&&Lt["root-no-select"],u&&Lt["root-virtualized"],he==null?void 0:he.className),onDragEnter:st,ref:De=>{var Pe;De&&($.current[q.id]=De,ee.current=De,le!=="group"&&((Pe=u==null?void 0:u.measureElement)===null||Pe===void 0||Pe.call(u,De)))},style:De=>Object.assign(Object.assign({},de),se(he==null?void 0:he.style,De)),children:[f.isPlaceholder?null:(o=he.children)!==null&&o!==void 0?o:c.jsxs(b.Flex,{className:ge("mrt-table-head-cell-content",Lt.content,(le==="group"||(he==null?void 0:he.align)==="center")&&Lt["content-center"],(he==null?void 0:he.align)==="right"&&Lt["content-right"],q.getCanResize()&&Lt["content-spaced"]),children:[c.jsxs(b.Flex,{__vars:{"--mrt-table-head-cell-labels-padding-left":`${Ge}`},className:ge("mrt-table-head-cell-labels",Lt.labels,q.getCanSort()&&le!=="group"&&Lt["labels-sortable"],(he==null?void 0:he.align)==="right"?Lt["labels-right"]:(he==null?void 0:he.align)==="center"&&Lt["labels-center"],le==="data"&&Lt["labels-data"]),onClick:q.getToggleSortingHandler(),children:[c.jsx(b.Flex,{className:ge("mrt-table-head-cell-content-wrapper",Lt["content-wrapper"],le==="data"&&Lt["content-wrapper-hidden-overflow"],((a=(s=U.header)===null||s===void 0?void 0:s.length)!==null&&a!==void 0?a:0)<20&&Lt["content-wrapper-nowrap"]),children:Re}),q.getCanFilter()&&(q.getIsFiltered()||Ne)&&c.jsx(SA,{header:f,table:h}),q.getCanSort()&&(q.getIsSorted()||Ne)&&c.jsx(MA,{header:f,table:h})]}),le!=="group"&&c.jsxs(b.Flex,{className:ge("mrt-table-head-cell-content-actions",Lt["content-actions"]),children:[Je&&c.jsx(TA,{column:q,table:h,tableHeadCellRef:{current:$.current[q.id]}}),X&&Ne&&c.jsx(xA,{header:f,onChange:xe,opened:oe,table:h})]}),q.getCanResize()&&c.jsx(IA,{header:f,table:h})]}),y==="subheader"&&q.getCanFilter()&&c.jsx(ky,{header:f,table:h})]}))},FA=e=>{var{columnVirtualizer:n,headerGroup:t,table:r}=e,o=Ie(e,["columnVirtualizer","headerGroup","table"]);const{getState:s,options:{enableStickyHeader:a,layoutMode:u,mantineTableHeadRowProps:f}}=r,{isFullScreen:g}=s(),{virtualColumns:h,virtualPaddingLeft:p,virtualPaddingRight:_}=n??{},v=Object.assign(Object.assign({},se(f,{headerGroup:t,table:r})),o);return c.jsxs(b.TableTr,Object.assign({},v,{className:ge(bf.root,(a||g)&&bf.sticky,(u==null?void 0:u.startsWith("grid"))&&bf["layout-mode-grid"],v==null?void 0:v.className),children:[p?c.jsx(b.Box,{component:"th",display:"flex",w:p}):null,(h??t.headers).map((y,C)=>{let S=y;return n&&(C=y.index,S=t.headers[C]),c.jsx(EA,{columnVirtualizer:n,header:S,renderedHeaderIndex:C,table:r},S.id)}),_?c.jsx(b.Box,{component:"th",display:"flex",w:_}):null]}))};var pi={alert:"MRT_ToolbarAlertBanner-module_alert__PAhUK","alert-stacked":"MRT_ToolbarAlertBanner-module_alert-stacked__HR7Nq","alert-bottom":"MRT_ToolbarAlertBanner-module_alert-bottom__u9L-S","alert-badge":"MRT_ToolbarAlertBanner-module_alert-badge__GwDmX","toolbar-alert":"MRT_ToolbarAlertBanner-module_toolbar-alert__3sJGU","head-overlay":"MRT_ToolbarAlertBanner-module_head-overlay__Hw7jK"};const Al=e=>{var n,{renderedRowIndex:t=0,row:r,table:o}=e,s=Ie(e,["renderedRowIndex","row","table"]);const{getState:a,options:{enableMultiRowSelection:u,localization:f,mantineSelectAllCheckboxProps:g,mantineSelectCheckboxProps:h,selectAllMode:p,selectDisplayMode:_}}=o,{density:v,isLoading:y}=a(),C=!r,S=C?p==="page"?o.getIsAllPageRowsSelected():o.getIsAllRowsSelected():void 0,T=C?S:Sl({row:r,table:o}),E=Object.assign(Object.assign({},C?se(g,{table:o}):se(h,{row:r,table:o})),s),F=r?qF({renderedRowIndex:t,row:r,table:o}):void 0,L=af({table:o}),O=Object.assign(Object.assign({"aria-label":C?f.toggleSelectAll:f.toggleSelectRow,checked:T,disabled:y||r&&!r.getCanSelect()||(r==null?void 0:r.id)==="mrt-row-create",onChange:P=>{P.stopPropagation(),C?L(P):F(P)},size:v==="xs"?"sm":"md"},E),{onClick:P=>{var k;P.stopPropagation(),(k=E==null?void 0:E.onClick)===null||k===void 0||k.call(E,P)},title:void 0});return c.jsx(b.Tooltip,{label:(n=E==null?void 0:E.title)!==null&&n!==void 0?n:C?f.toggleSelectAll:f.toggleSelectRow,openDelay:1e3,withinPortal:!0,children:c.jsx("span",{children:_==="switch"?c.jsx(b.Switch,Object.assign({},O)):_==="radio"||u===!1?c.jsx(b.Radio,Object.assign({},O)):c.jsx(b.Checkbox,Object.assign({indeterminate:!T&&C?o.getIsSomeRowsSelected():(r==null?void 0:r.getIsSomeSelected())&&r.getCanSelectSubRows()},O))})})},If=e=>{var n,t,r,{stackAlertBanner:o,table:s}=e,a=Ie(e,["stackAlertBanner","table"]);const{getFilteredSelectedRowModel:u,getPrePaginationRowModel:f,getState:g,options:{enableRowSelection:h,enableSelectAll:p,icons:{IconX:_},localization:v,mantineToolbarAlertBannerBadgeProps:y,mantineToolbarAlertBannerProps:C,manualPagination:S,positionToolbarAlertBanner:T,renderToolbarAlertBannerContent:E,rowCount:F}}=s,{density:L,grouping:O,rowSelection:P,showAlertBanner:k}=g(),z=Object.assign(Object.assign({},se(C,{table:s})),a),j=se(y,{table:s}),$=F??f().flatRows.length,H=I.useMemo(()=>S?Object.values(P).filter(Boolean).length:u().rows.length,[P,$,S]),re=H?c.jsxs(b.Flex,{align:"center",gap:"sm",children:[(t=(n=v.selectedCountOfRowCountRowsSelected)===null||n===void 0?void 0:n.replace("{selectedCount}",H.toString()))===null||t===void 0?void 0:t.replace("{rowCount}",$.toString()),c.jsx(b.Button,{onClick:ne=>af({table:s})(ne,!1,!0),size:"compact-xs",variant:"subtle",children:v.clearSelection})]}):null,Z=O.length>0?c.jsxs(b.Flex,{children:[v.groupedBy," ",O.map((ne,ce)=>c.jsxs(I.Fragment,{children:[ce>0?v.thenBy:"",c.jsxs(b.Badge,Object.assign({className:pi["alert-badge"],rightSection:c.jsx(b.ActionIcon,{color:"white",onClick:()=>s.getColumn(ne).toggleGrouping(),size:"xs",variant:"subtle",children:c.jsx(_,{style:{transform:"scale(0.8)"}})}),variant:"filled"},j,{children:[s.getColumn(ne).columnDef.header," "]}))]},`${ce}-${ne}`))]}):null;return c.jsx(b.Collapse,{in:k||!!re||!!Z,transitionDuration:o?200:0,children:c.jsx(b.Alert,Object.assign({color:"blue",icon:!1},z,{className:ge(pi.alert,o&&!T&&pi["alert-stacked"],!o&&T==="bottom"&&pi["alert-bottom"],z==null?void 0:z.className),children:(r=E==null?void 0:E({groupedAlert:Z,selectedAlert:re,table:s}))!==null&&r!==void 0?r:c.jsxs(b.Flex,{className:ge(pi["toolbar-alert"],T==="head-overlay"&&pi["head-overlay"],L),children:[h&&p&&T==="head-overlay"&&c.jsx(Al,{table:s}),c.jsxs(b.Stack,{children:[z==null?void 0:z.children,re,Z]})]})}))})},AA=e=>{var{columnVirtualizer:n,table:t}=e,r=Ie(e,["columnVirtualizer","table"]);const{getHeaderGroups:o,getSelectedRowModel:s,getState:a,options:{enableStickyHeader:u,layoutMode:f,mantineTableHeadProps:g,positionToolbarAlertBanner:h},refs:{tableHeadRef:p}}=t,{isFullScreen:_,showAlertBanner:v}=a(),y=Object.assign(Object.assign({},se(g,{table:t})),r),C=u||_;return c.jsx(b.TableThead,Object.assign({},y,{className:ge(wr.root,f!=null&&f.startsWith("grid")?wr["root-grid"]:wr["root-table-row-group"],C&&wr["root-sticky"],y==null?void 0:y.className),pos:C&&(f!=null&&f.startsWith("grid"))?"sticky":"relative",ref:S=>{p.current=S,y!=null&&y.ref&&(y.ref.current=S)},children:h==="head-overlay"&&(v||s().rows.length>0)?c.jsx(b.TableTr,{className:ge(wr["banner-tr"],(f==null?void 0:f.startsWith("grid"))&&wr.grid),children:c.jsx(b.TableTh,{className:ge(wr["banner-th"],(f==null?void 0:f.startsWith("grid"))&&wr.grid),colSpan:t.getVisibleLeafColumns().length,children:c.jsx(If,{table:t})})}):o().map(S=>c.jsx(FA,{columnVirtualizer:n,headerGroup:S,table:t},S.id))}))};var zy={root:"MRT_GlobalFilterTextInput-module_root__Xmcpv",collapse:"MRT_GlobalFilterTextInput-module_collapse__v311d"};const Mf=e=>{var{table:n}=e,t=Ie(e,["table"]);const{getState:r,options:{enableGlobalFilterModes:o,icons:{IconSearch:s,IconX:a},localization:u,mantineSearchTextInputProps:f,manualFiltering:g,positionGlobalFilter:h},refs:{searchInputRef:p},setGlobalFilter:_}=n,{globalFilter:v,showGlobalFilter:y}=r(),C=Object.assign(Object.assign({},se(f,{table:n})),t),S=I.useRef(!1),[T,E]=I.useState(v??""),[F]=je.useDebouncedValue(T,g?500:250);I.useEffect(()=>{_(F||void 0)},[F]);const L=()=>{E(""),_(void 0)};return I.useEffect(()=>{S.current&&(v===void 0?L():E(v)),S.current=!0},[v]),c.jsxs(b.Collapse,{className:zy.collapse,in:y,children:[o&&c.jsxs(b.Menu,{withinPortal:!0,children:[c.jsx(b.Menu.Target,{children:c.jsx(b.ActionIcon,{"aria-label":u.changeSearchMode,color:"gray",size:"sm",variant:"transparent",children:c.jsx(s,{})})}),c.jsx(Dy,{onSelect:L,table:n})]}),c.jsx(b.TextInput,Object.assign({leftSection:!o&&c.jsx(s,{}),mt:0,mx:h!=="left"?"mx":void 0,onChange:O=>E(O.target.value),placeholder:u.search,rightSection:T?c.jsx(b.ActionIcon,{"aria-label":u.clearSearch,color:"gray",disabled:!(T!=null&&T.length),onClick:L,size:"sm",variant:"transparent",children:c.jsx(b.Tooltip,{label:u.clearSearch,withinPortal:!0,children:c.jsx(a,{})})}):null,value:T??"",variant:"filled"},C,{className:ge("mrt-global-filter-text-input",zy.root,C==null?void 0:C.className),ref:O=>{O&&(p.current=O,C!=null&&C.ref&&(C.ref=O))}}))]})},OA=(e,n,t=-1,r=0,o,s)=>di(e,"mrt-row-create",Object.assign({},...Il(e.options.columns).map(a=>({[hi(a)]:""}))),t,r,o,s),PA=e=>Object.assign({Cell:({cell:n,row:t,table:r})=>c.jsx(sA,{cell:n,row:t,table:r})},Gr({header:"actions",id:"mrt-row-actions",size:70,tableOptions:e})),DA=e=>Object.assign({Cell:({row:n,rowRef:t,table:r})=>c.jsx(YF,{row:n,rowRef:t,table:r}),grow:!1},Gr({header:"move",id:"mrt-row-drag",size:60,tableOptions:e})),kA=e=>{var n;const{defaultColumn:t,enableExpandAll:r,groupedColumnMode:o,positionExpandColumn:s,renderDetailPanel:a,state:{grouping:u}}=e,f=s==="last"?{align:"right"}:void 0;return Object.assign({Cell:({cell:g,column:h,row:p,table:_})=>{var v,y,C;const S={row:p,table:_},T=(v=p.subRows)===null||v===void 0?void 0:v.length;return e.groupedColumnMode==="remove"&&p.groupingColumnId?c.jsxs(b.Flex,{align:"center",gap:"0.25rem",children:[c.jsx(cf,Object.assign({},S)),c.jsx(b.Tooltip,{label:_.getColumn(p.groupingColumnId).columnDef.header,openDelay:1e3,position:"right",children:c.jsx("span",{children:p.groupingValue})}),!!T&&c.jsxs("span",{children:["(",T,")"]})]}):c.jsxs(c.Fragment,{children:[c.jsx(cf,Object.assign({},S)),(C=(y=h.columnDef).GroupedCell)===null||C===void 0?void 0:C.call(y,{cell:g,column:h,row:p,table:_})]})},Header:r?({table:g})=>{var h;return c.jsxs(b.Flex,{align:"center",children:[c.jsx(eA,{table:g}),o==="remove"&&((h=u==null?void 0:u.map(p=>g.getColumn(p).columnDef.header))===null||h===void 0?void 0:h.join(", "))]})}:void 0,mantineTableBodyCellProps:f,mantineTableHeadCellProps:f},Gr({header:"expand",id:"mrt-row-expand",size:o==="remove"?(n=t==null?void 0:t.size)!==null&&n!==void 0?n:180:a?r?60:70:100,tableOptions:e}))},LA=e=>{const{localization:n,rowNumberDisplayMode:t}=e,{pagination:{pageIndex:r,pageSize:o}}=e.state;return Object.assign({Cell:({renderedRowIndex:s=0,row:a})=>{var u;return((u=t==="static"?s+o*r:a.index)!==null&&u!==void 0?u:0)+1},grow:!1,Header:()=>n.rowNumber},Gr({header:"rowNumbers",id:"mrt-row-numbers",size:50,tableOptions:e}))},NA=e=>Object.assign({Cell:({row:n,table:t})=>c.jsx(ZF,{row:n,table:t}),grow:!1},Gr({header:"pin",id:"mrt-row-pin",size:60,tableOptions:e})),zA=e=>{const{enableMultiRowSelection:n,enableSelectAll:t}=e;return Object.assign({Cell:({renderedRowIndex:r,row:o,table:s})=>c.jsx(Al,{renderedRowIndex:r,row:o,table:s}),grow:!1,Header:t&&n?({table:r})=>c.jsx(Al,{table:r}):void 0},Gr({header:"select",id:"mrt-row-select",size:t?60:70,tableOptions:e}))},RA=Object.assign({},_l),BA={IconArrowAutofitContent:w1,IconArrowsSort:T1,IconBaselineDensityLarge:I1,IconBaselineDensityMedium:M1,IconBaselineDensitySmall:x1,IconBoxMultiple:E1,IconChevronDown:Uo,IconChevronLeft:A1,IconChevronLeftPipe:F1,IconChevronRight:P1,IconChevronRightPipe:O1,IconChevronsDown:D1,IconCircleX:k1,IconClearAll:L1,IconColumns:N1,IconDeviceFloppy:z1,IconDots:B1,IconDotsVertical:R1,IconEdit:$1,IconEyeOff:j1,IconFilter:ta,IconFilterCog:Jh,IconFilterOff:U1,IconGripHorizontal:W1,IconMaximize:Z1,IconMinimize:X1,IconPinned:tT,IconPinnedOff:eT,IconSearch:iT,IconSearchOff:rT,IconSortAscending:oT,IconSortDescending:lT,IconX:ia},VA={actions:"Actions",and:"and",cancel:"Cancel",changeFilterMode:"Change filter mode",changeSearchMode:"Change search mode",clearFilter:"Clear filter",clearSearch:"Clear search",clearSelection:"Clear selection",clearSort:"Clear sort",clickToCopy:"Click to copy",copy:"Copy",collapse:"Collapse",collapseAll:"Collapse all",columnActions:"Column Actions",copiedToClipboard:"Copied to clipboard",dropToGroupBy:"Drop to group by {column}",edit:"Edit",expand:"Expand",expandAll:"Expand all",filterArrIncludes:"Includes",filterArrIncludesAll:"Includes all",filterArrIncludesSome:"Includes",filterBetween:"Between",filterBetweenInclusive:"Between Inclusive",filterByColumn:"Filter by {column}",filterContains:"Contains",filterEmpty:"Empty",filterEndsWith:"Ends With",filterEquals:"Equals",filterEqualsString:"Equals",filterFuzzy:"Fuzzy",filterGreaterThan:"Greater Than",filterGreaterThanOrEqualTo:"Greater Than Or Equal To",filterInNumberRange:"Between",filterIncludesString:"Contains",filterIncludesStringSensitive:"Contains",filterLessThan:"Less Than",filterLessThanOrEqualTo:"Less Than Or Equal To",filterMode:"Filter Mode: {filterType}",filterNotEmpty:"Not Empty",filterNotEquals:"Not Equals",filterStartsWith:"Starts With",filterWeakEquals:"Equals",filteringByColumn:"Filtering by {column} - {filterType} {filterValue}",goToFirstPage:"Go to first page",goToLastPage:"Go to last page",goToNextPage:"Go to next page",goToPreviousPage:"Go to previous page",grab:"Grab",groupByColumn:"Group by {column}",groupedBy:"Grouped by ",hideAll:"Hide all",hideColumn:"Hide {column} column",max:"Max",min:"Min",move:"Move",noRecordsToDisplay:"No records to display",noResultsFound:"No results found",of:"of",or:"or",pin:"Pin",pinToLeft:"Pin to left",pinToRight:"Pin to right",resetColumnSize:"Reset column size",resetOrder:"Reset order",rowActions:"Row Actions",rowNumber:"#",rowNumbers:"Row Numbers",rowsPerPage:"Rows per page",save:"Save",search:"Search",selectedCountOfRowCountRowsSelected:"{selectedCount} of {rowCount} row(s) selected",select:"Select",showAll:"Show all",showAllColumns:"Show all columns",showHideColumns:"Show/Hide columns",showHideFilters:"Show/Hide filters",showHideSearch:"Show/Hide search",sortByColumnAsc:"Sort by {column} ascending",sortByColumnDesc:"Sort by {column} descending",sortedByColumnAsc:"Sorted by {column} ascending",sortedByColumnDesc:"Sorted by {column} descending",thenBy:", then by ",toggleDensity:"Toggle density",toggleFullScreen:"Toggle full screen",toggleSelectAll:"Toggle select all",toggleSelectRow:"Toggle select row",toggleVisibility:"Toggle visibility",ungroupByColumn:"Ungroup by {column}",unpin:"Unpin",unpinAll:"Unpin all"},$A={filterVariant:"text",maxSize:1e3,minSize:40,size:180},Ry={columnDefType:"display",enableClickToCopy:!1,enableColumnActions:!1,enableColumnDragging:!1,enableColumnFilter:!1,enableColumnOrdering:!1,enableEditing:!1,enableGlobalFilter:!1,enableGrouping:!1,enableHiding:!1,enableResizing:!1,enableSorting:!1},HA=e=>{var n,{aggregationFns:t,autoResetExpanded:r=!1,columnFilterDisplayMode:o="subheader",columnResizeDirection:s,columnResizeMode:a="onChange",createDisplayMode:u="modal",defaultColumn:f,defaultDisplayColumn:g,editDisplayMode:h="modal",enableBatchRowSelection:p=!0,enableBottomToolbar:_=!0,enableColumnActions:v=!0,enableColumnFilters:y=!0,enableColumnOrdering:C=!1,enableColumnPinning:S=!1,enableColumnResizing:T=!1,enableColumnVirtualization:E,enableDensityToggle:F=!0,enableExpandAll:L=!0,enableExpanding:O,enableFacetedValues:P=!1,enableFilterMatchHighlighting:k=!0,enableFilters:z=!0,enableFullScreenToggle:j=!0,enableGlobalFilter:$=!0,enableGlobalFilterRankedResults:H=!0,enableGrouping:re=!1,enableHeaderActionsHoverReveal:Z=!1,enableHiding:ne=!0,enableMultiRowSelection:ce=!0,enableMultiSort:q=!0,enablePagination:U=!0,enableRowPinning:le=!1,enableRowSelection:_e=!1,enableRowVirtualization:he,enableSelectAll:de=!0,enableSorting:Ae=!0,enableStickyHeader:ue=!1,enableTableFooter:pe=!0,enableTableHead:K=!0,enableToolbarInternalActions:ee=!0,enableTopToolbar:oe=!0,filterFns:xe,icons:X,layoutMode:Ne,localization:Je,manualFiltering:Ge,manualGrouping:st,manualPagination:Re,manualSorting:De,paginationDisplayMode:Pe="default",positionActionsColumn:Oe="first",positionCreatingRow:Q="top",positionExpandColumn:Be="first",positionGlobalFilter:rt="right",positionPagination:Ze="bottom",positionToolbarAlertBanner:Nt="top",positionToolbarDropZone:Ct="top",rowNumberDisplayMode:ot="static",rowPinningDisplayMode:Ft="sticky",selectAllMode:Jt="page",sortingFns:$t}=e,Tt=Ie(e,["aggregationFns","autoResetExpanded","columnFilterDisplayMode","columnResizeDirection","columnResizeMode","createDisplayMode","defaultColumn","defaultDisplayColumn","editDisplayMode","enableBatchRowSelection","enableBottomToolbar","enableColumnActions","enableColumnFilters","enableColumnOrdering","enableColumnPinning","enableColumnResizing","enableColumnVirtualization","enableDensityToggle","enableExpandAll","enableExpanding","enableFacetedValues","enableFilterMatchHighlighting","enableFilters","enableFullScreenToggle","enableGlobalFilter","enableGlobalFilterRankedResults","enableGrouping","enableHeaderActionsHoverReveal","enableHiding","enableMultiRowSelection","enableMultiSort","enablePagination","enableRowPinning","enableRowSelection","enableRowVirtualization","enableSelectAll","enableSorting","enableStickyHeader","enableTableFooter","enableTableHead","enableToolbarInternalActions","enableTopToolbar","filterFns","icons","layoutMode","localization","manualFiltering","manualGrouping","manualPagination","manualSorting","paginationDisplayMode","positionActionsColumn","positionCreatingRow","positionExpandColumn","positionGlobalFilter","positionPagination","positionToolbarAlertBanner","positionToolbarDropZone","rowNumberDisplayMode","rowPinningDisplayMode","selectAllMode","sortingFns"]);const cn=b.useDirection();return X=I.useMemo(()=>Object.assign(Object.assign({},BA),X),[X]),Je=I.useMemo(()=>Object.assign(Object.assign({},VA),Je),[Je]),t=I.useMemo(()=>Object.assign(Object.assign({},RA),t),[]),xe=I.useMemo(()=>Object.assign(Object.assign({},fA),xe),[]),$t=I.useMemo(()=>Object.assign(Object.assign({},$F),$t),[]),f=I.useMemo(()=>Object.assign(Object.assign({},$A),f),[f]),g=I.useMemo(()=>Object.assign(Object.assign({},Ry),g),[g]),[E,he]=I.useMemo(()=>[E,he],[]),s||(s=cn.dir||"ltr"),Ne=Ne||(T?"grid-no-grow":"semantic"),Ne==="semantic"&&(he||E)&&(Ne="grid"),he&&(ue=!0),U===!1&&Re===void 0&&(Re=!0),!((n=Tt.data)===null||n===void 0)&&n.length||(Ge=!0,st=!0,Re=!0,De=!0),Object.assign({aggregationFns:t,autoResetExpanded:r,columnFilterDisplayMode:o,columnResizeDirection:s,columnResizeMode:a,createDisplayMode:u,defaultColumn:f,defaultDisplayColumn:g,editDisplayMode:h,enableBatchRowSelection:p,enableBottomToolbar:_,enableColumnActions:v,enableColumnFilters:y,enableColumnOrdering:C,enableColumnPinning:S,enableColumnResizing:T,enableColumnVirtualization:E,enableDensityToggle:F,enableExpandAll:L,enableExpanding:O,enableFacetedValues:P,enableFilterMatchHighlighting:k,enableFilters:z,enableFullScreenToggle:j,enableGlobalFilter:$,enableGlobalFilterRankedResults:H,enableGrouping:re,enableHeaderActionsHoverReveal:Z,enableHiding:ne,enableMultiRowSelection:ce,enableMultiSort:q,enablePagination:U,enableRowPinning:le,enableRowSelection:_e,enableRowVirtualization:he,enableSelectAll:de,enableSorting:Ae,enableStickyHeader:ue,enableTableFooter:pe,enableTableHead:K,enableToolbarInternalActions:ee,enableTopToolbar:oe,filterFns:xe,getCoreRowModel:QE(),getExpandedRowModel:O||re?eF():void 0,getFacetedMinMaxValues:P?tF():void 0,getFacetedRowModel:P?iF():void 0,getFacetedUniqueValues:P?oF():void 0,getFilteredRowModel:y||$||z?lF():void 0,getGroupedRowModel:re?sF():void 0,getPaginationRowModel:U?uF():void 0,getSortedRowModel:Ae?cF():void 0,getSubRows:Xe=>Xe==null?void 0:Xe.subRows,icons:X,layoutMode:Ne,localization:Je,manualFiltering:Ge,manualGrouping:st,manualPagination:Re,manualSorting:De,paginationDisplayMode:Pe,positionActionsColumn:Oe,positionCreatingRow:Q,positionExpandColumn:Be,positionGlobalFilter:rt,positionPagination:Ze,positionToolbarAlertBanner:Nt,positionToolbarDropZone:Ct,rowNumberDisplayMode:ot,rowPinningDisplayMode:Ft,selectAllMode:Jt,sortingFns:$t},Tt)},xf={children:null,style:{minWidth:0,padding:0,width:0}},jA=e=>Object.assign(Object.assign(Object.assign(Object.assign({},Gr({id:"mrt-row-spacer",size:0,tableOptions:e})),{grow:!0}),Ry),{mantineTableBodyCellProps:xf,mantineTableFooterCellProps:xf,mantineTableHeadCellProps:xf}),qA=e=>{const{getIsSomeRowsPinned:n,getPrePaginationRowModel:t,getState:r,options:{enablePagination:o,enableRowPinning:s,rowCount:a}}=e,{columnOrder:u,density:f,globalFilter:g,isFullScreen:h,isLoading:p,pagination:_,showSkeletons:v,sorting:y}=r(),C=e.options.columns.length,S=a??t().rows.length,T=I.useReducer(()=>({}),{})[1],E=I.useRef(),F=I.useRef();I.useEffect(()=>{typeof window<"u"&&(E.current=document.body.style.height)},[]),I.useEffect(()=>{if(typeof window<"u")if(h)F.current=document.body.getBoundingClientRect().top,document.body.style.height="100dvh";else{if(document.body.style.height=E.current,!F.current)return;window.scrollTo({behavior:"instant",top:-1*F.current})}},[h]),I.useEffect(()=>{C!==u.length&&e.setColumnOrder(vf(e.options))},[C]),I.useEffect(()=>{if(!o||p||v)return;const{pageIndex:O,pageSize:P}=_,k=O*P;k>=S&&k>0&&e.setPageIndex(Math.ceil(S/P)-1)},[S]);const L=I.useRef(y);I.useEffect(()=>{y.length&&(L.current=y)},[y]),I.useEffect(()=>{iy(e)&&(g?e.setSorting([]):e.setSorting(()=>L.current||[]))},[g]),I.useEffect(()=>{s&&n()&&setTimeout(()=>{T()},150)},[f])},GA=e=>{var n,t,r,o,s,a,u,f,g,h,p,_,v,y,C,S,T,E,F,L,O,P,k,z,j,$,H,re,Z,ne,ce,q,U;const le=I.useRef(null),_e=I.useRef(null),he=I.useRef({}),de=I.useRef({}),Ae=I.useRef(null),ue=I.useRef(null),pe=I.useRef({}),K=I.useRef(null),ee=I.useRef(null),oe=I.useRef(null),xe=I.useRef(null),X=I.useMemo(()=>{var pt,Xt,vt;const Qt=(pt=e.initialState)!==null&&pt!==void 0?pt:{};return Qt.columnOrder=(Xt=Qt.columnOrder)!==null&&Xt!==void 0?Xt:vf(Object.assign(Object.assign({},e),{state:Object.assign(Object.assign({},e.initialState),e.state)})),Qt.globalFilterFn=(vt=e.globalFilterFn)!==null&&vt!==void 0?vt:"fuzzy",Qt},[]);e.initialState=X;const[Ne,Je]=I.useState((n=X.creatingRow)!==null&&n!==void 0?n:null),[Ge,st]=I.useState(()=>Object.assign({},...Il(e.columns).map(pt=>{var Xt,vt,Qt,Mr;return{[hi(pt)]:pt.filterFn instanceof Function?(Xt=pt.filterFn.name)!==null&&Xt!==void 0?Xt:"custom":(Mr=(vt=pt.filterFn)!==null&&vt!==void 0?vt:(Qt=X==null?void 0:X.columnFilterFns)===null||Qt===void 0?void 0:Qt[hi(pt)])!==null&&Mr!==void 0?Mr:tA(pt)}}))),[Re,De]=I.useState((t=X.columnOrder)!==null&&t!==void 0?t:[]),[Pe,Oe]=I.useState((r=X.columnSizingInfo)!==null&&r!==void 0?r:{}),[Q,Be]=I.useState((o=X==null?void 0:X.density)!==null&&o!==void 0?o:"md"),[rt,Ze]=I.useState((s=X.draggingColumn)!==null&&s!==void 0?s:null),[Nt,Ct]=I.useState((a=X.draggingRow)!==null&&a!==void 0?a:null),[ot,Ft]=I.useState((u=X.editingCell)!==null&&u!==void 0?u:null),[Jt,$t]=I.useState((f=X.editingRow)!==null&&f!==void 0?f:null),[Tt,cn]=I.useState((g=X.globalFilterFn)!==null&&g!==void 0?g:"fuzzy"),[Xe,gt]=I.useState((h=X.grouping)!==null&&h!==void 0?h:[]),[At,Yt]=I.useState((p=X.hoveredColumn)!==null&&p!==void 0?p:null),[Zt,bn]=I.useState((_=X.hoveredRow)!==null&&_!==void 0?_:null),[nr,rr]=I.useState((v=X==null?void 0:X.isFullScreen)!==null&&v!==void 0?v:!1),[uo,Sr]=I.useState((y=X==null?void 0:X.pagination)!==null&&y!==void 0?y:{pageIndex:0,pageSize:10}),[Tr,_i]=I.useState((C=X==null?void 0:X.showAlertBanner)!==null&&C!==void 0?C:!1),[Wn,co]=I.useState((S=X==null?void 0:X.showColumnFilters)!==null&&S!==void 0?S:!1),[fo,ht]=I.useState((T=X==null?void 0:X.showGlobalFilter)!==null&&T!==void 0?T:!1),[Kn,bi]=I.useState((E=X==null?void 0:X.showToolbarDropZone)!==null&&E!==void 0?E:!1);e.state=Object.assign({columnFilterFns:Ge,columnOrder:Re,columnSizingInfo:Pe,creatingRow:Ne,density:Q,draggingColumn:rt,draggingRow:Nt,editingCell:ot,editingRow:Jt,globalFilterFn:Tt,grouping:Xe,hoveredColumn:At,hoveredRow:Zt,isFullScreen:nr,pagination:uo,showAlertBanner:Tr,showColumnFilters:Wn,showGlobalFilter:fo,showToolbarDropZone:Kn},e.state);const we=e,Ir=I.useRef([]);we.columns=we.state.columnSizingInfo.isResizingColumn||we.state.draggingColumn||we.state.draggingRow?Ir.current:uy({columnDefs:[...[fy(we)&&NA(we),gy(we)&&DA(we),pf(we)&&PA(we),hf(we)&&kA(we),hy(we)&&zA(we),py(we)&&LA(we)].filter(Boolean),...we.columns,...[vy(we)&&jA(we)].filter(Boolean)],tableOptions:we}),Ir.current=we.columns,we.data=I.useMemo(()=>(we.state.isLoading||we.state.showSkeletons)&&!we.data.length?[...Array(Math.min(we.state.pagination.pageSize,20)).fill(null)].map(()=>Object.assign({},...Il(we.columns).map(pt=>({[hi(pt)]:null})))):we.data,[we.data,we.state.isLoading,we.state.showSkeletons]);const ut=dF(Object.assign(Object.assign({onColumnOrderChange:De,onColumnSizingInfoChange:Oe,onGroupingChange:gt,onPaginationChange:Sr},we),{globalFilterFn:(F=we.filterFns)===null||F===void 0?void 0:F[Tt??"fuzzy"]}));return ut.refs={bottomToolbarRef:_e,editInputRefs:he,filterInputRefs:de,lastSelectedRowId:le,searchInputRef:Ae,tableContainerRef:ue,tableFooterRef:xe,tableHeadCellRefs:pe,tableHeadRef:oe,tablePaperRef:K,topToolbarRef:ee},ut.setCreatingRow=pt=>{let Xt=pt;pt===!0&&(Xt=OA(ut)),we!=null&&we.onCreatingRowChange?we.onCreatingRowChange(Xt):Je(Xt)},ut.setColumnFilterFns=(L=we.onColumnFilterFnsChange)!==null&&L!==void 0?L:st,ut.setDensity=(O=we.onDensityChange)!==null&&O!==void 0?O:Be,ut.setDraggingColumn=(P=we.onDraggingColumnChange)!==null&&P!==void 0?P:Ze,ut.setDraggingRow=(k=we.onDraggingRowChange)!==null&&k!==void 0?k:Ct,ut.setEditingCell=(z=we.onEditingCellChange)!==null&&z!==void 0?z:Ft,ut.setEditingRow=(j=we.onEditingRowChange)!==null&&j!==void 0?j:$t,ut.setGlobalFilterFn=($=we.onGlobalFilterFnChange)!==null&&$!==void 0?$:cn,ut.setHoveredColumn=(H=we.onHoveredColumnChange)!==null&&H!==void 0?H:Yt,ut.setHoveredRow=(re=we.onHoveredRowChange)!==null&&re!==void 0?re:bn,ut.setIsFullScreen=(Z=we.onIsFullScreenChange)!==null&&Z!==void 0?Z:rr,ut.setShowAlertBanner=(ne=we.onShowAlertBannerChange)!==null&&ne!==void 0?ne:_i,ut.setShowColumnFilters=(ce=we.onShowColumnFiltersChange)!==null&&ce!==void 0?ce:co,ut.setShowGlobalFilter=(q=we.onShowGlobalFilterChange)!==null&&q!==void 0?q:ht,ut.setShowToolbarDropZone=(U=we.onShowToolbarDropZoneChange)!==null&&U!==void 0?U:bi,qA(ut),ut},By=e=>GA(HA(e));var UA={root:"MRT_TablePaper-module_root__q0v5L"},Ef={root:"MRT_TableContainer-module_root__JIsGB","root-sticky":"MRT_TableContainer-module_root-sticky__uC4qx","root-fullscreen":"MRT_TableContainer-module_root-fullscreen__aM8Jg"},Vy={root:"MRT_Table-module_root__ms2uS","root-grid":"MRT_Table-module_root-grid__2Pynz"};const WA=e=>{var n,t,r,o;const{getLeftLeafColumns:s,getRightLeafColumns:a,getState:u,getVisibleLeafColumns:f,options:{columnVirtualizerInstanceRef:g,columnVirtualizerOptions:h,enableColumnPinning:p,enableColumnVirtualization:_},refs:{tableContainerRef:v}}=e,{columnPinning:y,draggingColumn:C}=u();if(!_)return;const S=se(h,{table:e}),T=f(),[E,F]=I.useMemo(()=>p?[s().map($=>$.getPinnedIndex()),a().map($=>T.length-$.getPinnedIndex()-1).sort(($,H)=>$-H)]:[[],[]],[T.length,y,p]),L=E.length,O=F.length,P=I.useMemo(()=>C!=null&&C.id?T.findIndex($=>$.id===(C==null?void 0:C.id)):void 0,[C==null?void 0:C.id]),k=ey(Object.assign({count:T.length,estimateSize:$=>T[$].getSize(),getScrollElement:()=>v.current,horizontal:!0,overscan:3,rangeExtractor:I.useCallback($=>{const H=oy($,P);return!L&&!O?H:[...new Set([...E,...H,...F])]},[E,F,P])},S)),z=k.getVirtualItems();k.virtualColumns=z;const j=z.length;if(j){const $=k.getTotalSize(),H=((n=z[L])===null||n===void 0?void 0:n.start)||0,re=((t=z[E.length-1])===null||t===void 0?void 0:t.end)||0,Z=((r=z[j-O])===null||r===void 0?void 0:r.start)||0,ne=((o=z[j-O-1])===null||o===void 0?void 0:o.end)||0;k.virtualPaddingLeft=H-re,k.virtualPaddingRight=$-ne-(O?$-Z:0)}return g&&(g.current=k),k},KA=e=>{var{table:n}=e,t=Ie(e,["table"]);const{getFlatHeaders:r,getState:o,options:{columns:s,enableTableFooter:a,enableTableHead:u,layoutMode:f,mantineTableProps:g,memoMode:h}}=n,{columnSizing:p,columnSizingInfo:_,columnVisibility:v,density:y}=o(),C=Object.assign(Object.assign({highlightOnHover:!0,horizontalSpacing:y,verticalSpacing:y},se(g,{table:n})),t),S=I.useMemo(()=>{const O=r(),P={};for(let k=0;k<O.length;k++){const z=O[k],j=z.getSize();P[`--header-${kn(z.id)}-size`]=j,P[`--col-${kn(z.column.id)}-size`]=j}return P},[s,p,_,v]),E={columnVirtualizer:WA(n),table:n},{colorScheme:F}=b.useMantineColorScheme(),{stripedColor:L}=C;return c.jsxs(b.Table,Object.assign({className:ge("mrt-table",Vy.root,(f==null?void 0:f.startsWith("grid"))&&Vy["root-grid"],C.className)},C,{__vars:Object.assign(Object.assign(Object.assign({},S),{"--mrt-striped-row-background-color":L,"--mrt-striped-row-hover-background-color":L?F==="dark"?b.lighten(L,.08):b.darken(L,.12):void 0}),C.__vars),children:[u&&c.jsx(AA,Object.assign({},E)),h==="table-body"||_.isResizingColumn?c.jsx(KF,Object.assign({},E,{tableProps:C})):c.jsx(ly,Object.assign({},E,{tableProps:C})),a&&c.jsx(cA,Object.assign({},E))]}))},JA=e=>{var n,{open:t,table:r}=e,o=Ie(e,["open","table"]);const{getState:s,options:{mantineCreateRowModalProps:a,mantineEditRowModalProps:u,onCreatingRowCancel:f,onEditingRowCancel:g,renderCreateRowModalContent:h,renderEditRowModalContent:p},setCreatingRow:_,setEditingRow:v}=r,{creatingRow:y,editingRow:C}=s(),S=y??C,T={row:S,table:r},E=Object.assign(Object.assign(Object.assign({},se(u,T)),y&&se(a,T)),o),F=S.getAllCells().filter(O=>O.column.columnDef.columnDefType==="data").map(O=>c.jsx(Cl,{cell:O,table:r},O.id)),L=()=>{var O;y?(f==null||f({row:S,table:r}),_(null)):(g==null||g({row:S,table:r}),v(null)),S._valuesCache={},(O=E.onClose)===null||O===void 0||O.call(E)};return I.createElement(b.Modal,Object.assign({opened:t,withCloseButton:!1},E,{key:S.id,onClose:L}),(n=y&&(h==null?void 0:h({internalEditComponents:F,row:S,table:r}))||(p==null?void 0:p({internalEditComponents:F,row:S,table:r})))!==null&&n!==void 0?n:c.jsxs(c.Fragment,{children:[c.jsx("form",{onSubmit:O=>O.preventDefault(),children:c.jsx(b.Stack,{gap:"lg",pb:24,pt:16,children:F})}),c.jsx(b.Flex,{justify:"flex-end",children:c.jsx(sy,{row:S,table:r,variant:"text"})})]}))},YA=typeof window<"u"?I.useLayoutEffect:I.useEffect,ZA=e=>{var{table:n}=e,t=Ie(e,["table"]);const{getState:r,options:{createDisplayMode:o,editDisplayMode:s,enableStickyHeader:a,mantineLoadingOverlayProps:u,mantineTableContainerProps:f},refs:{bottomToolbarRef:g,tableContainerRef:h,topToolbarRef:p}}=n,{creatingRow:_,editingRow:v,isFullScreen:y,isLoading:C,showLoadingOverlay:S}=r(),[T,E]=I.useState(0),F=Object.assign(Object.assign({},se(f,{table:n})),t),L=se(u,{table:n});YA(()=>{var k,z,j,$;const H=typeof document<"u"&&(z=(k=p.current)===null||k===void 0?void 0:k.offsetHeight)!==null&&z!==void 0?z:0,re=typeof document<"u"&&($=(j=g==null?void 0:g.current)===null||j===void 0?void 0:j.offsetHeight)!==null&&$!==void 0?$:0;E(H+re)});const O=o==="modal"&&_,P=s==="modal"&&v;return c.jsxs(b.Box,Object.assign({},F,{__vars:Object.assign({"--mrt-top-toolbar-height":`${T}`},F==null?void 0:F.__vars),className:ge("mrt-table-container",Ef.root,a&&Ef["root-sticky"],y&&Ef["root-fullscreen"],F==null?void 0:F.className),ref:k=>{k&&(h.current=k,F!=null&&F.ref&&(F.ref.current=k))},children:[c.jsx(b.LoadingOverlay,Object.assign({visible:C||S,zIndex:2},L)),c.jsx(KA,{table:n}),(O||P)&&c.jsx(JA,{open:!0,table:n})]}))};var $y={"common-toolbar-styles":"common-styles-module_common-toolbar-styles__DnjR8"},so={root:"MRT_BottomToolbar-module_root__VDeWo","root-fullscreen":"MRT_BottomToolbar-module_root-fullscreen__esE15","custom-toolbar-container":"MRT_BottomToolbar-module_custom-toolbar-container__XcDRF","paginator-container":"MRT_BottomToolbar-module_paginator-container__A3eWY","paginator-container-alert-banner":"MRT_BottomToolbar-module_paginator-container-alert-banner__gyqtO"},Hy={collapse:"MRT_ProgressBar-module_collapse__rOLJH","collapse-top":"MRT_ProgressBar-module_collapse-top__oCi0h"};const jy=e=>{var{isTopToolbar:n,table:t}=e,r=Ie(e,["isTopToolbar","table"]);const{getState:o,options:{mantineProgressProps:s}}=t,{isSaving:a,showProgressBars:u}=o(),f=Object.assign(Object.assign({},se(s,{isTopToolbar:n,table:t})),r);return c.jsx(b.Collapse,{className:ge(Hy.collapse,n&&Hy["collapse-top"]),in:a||u,children:c.jsx(b.Progress,Object.assign({animated:!0,"aria-busy":"true","aria-label":"Loading",radius:0,value:100},f))})};var Ff={root:"MRT_TablePagination-module_root__yZ8pm",pagesize:"MRT_TablePagination-module_pagesize__-vmTn","with-top-margin":"MRT_TablePagination-module_with-top-margin__aM5-m"};const qy=[5,10,15,20,25,30,50,100].map(e=>e.toString()),Gy=e=>{var n,{position:t="bottom",table:r}=e,o=Ie(e,["position","table"]);const{getPrePaginationRowModel:s,getState:a,options:{enableToolbarInternalActions:u,icons:{IconChevronLeft:f,IconChevronLeftPipe:g,IconChevronRight:h,IconChevronRightPipe:p},localization:_,mantinePaginationProps:v,paginationDisplayMode:y,rowCount:C},setPageIndex:S,setPageSize:T}=r,{pagination:{pageIndex:E=0,pageSize:F=10},showGlobalFilter:L}=a(),O=Object.assign(Object.assign({},se(v,{table:r})),o),P=C??s().rows.length,k=Math.ceil(P/F),z=k>2,j=E*F,$=Math.min(E*F+F,P),H=O??{},{rowsPerPageOptions:re=qy,showRowsPerPage:Z=!0,withEdges:ne=z}=H,ce=Ie(H,["rowsPerPageOptions","showRowsPerPage","withEdges"]),q=t==="top"&&u&&!L;return c.jsxs(b.Box,{className:ge("mrt-table-pagination",Ff.root,q&&Ff["with-top-margin"]),children:[(O==null?void 0:O.showRowsPerPage)!==!1&&c.jsxs(b.Group,{gap:"xs",children:[c.jsx(b.Text,{id:"rpp-label",children:_.rowsPerPage}),c.jsx(b.Select,{allowDeselect:!1,"aria-labelledby":"rpp-label",className:Ff.pagesize,data:(n=O==null?void 0:O.rowsPerPageOptions)!==null&&n!==void 0?n:qy,onChange:U=>T(+U),value:F.toString()})]}),y==="pages"?c.jsx(b.Pagination,Object.assign({firstIcon:g,lastIcon:p,nextIcon:h,onChange:U=>S(U-1),previousIcon:f,total:k,value:E+1,withEdges:ne},ce)):y==="default"?c.jsxs(c.Fragment,{children:[c.jsx(b.Text,{children:`${$===0?0:(j+1).toLocaleString()}-${$.toLocaleString()} ${_.of} ${P.toLocaleString()}`}),c.jsxs(b.Group,{gap:6,children:[ne&&c.jsx(b.ActionIcon,{"aria-label":_.goToFirstPage,color:"gray",disabled:E<=0,onClick:()=>S(0),variant:"subtle",children:c.jsx(g,{})}),c.jsx(b.ActionIcon,{"aria-label":_.goToPreviousPage,color:"gray",disabled:E<=0,onClick:()=>S(E-1),variant:"subtle",children:c.jsx(f,{})}),c.jsx(b.ActionIcon,{"aria-label":_.goToNextPage,color:"gray",disabled:$>=P,onClick:()=>S(E+1),variant:"subtle",children:c.jsx(h,{})}),ne&&c.jsx(b.ActionIcon,{"aria-label":_.goToLastPage,color:"gray",disabled:$>=P,onClick:()=>S(k-1),variant:"subtle",children:c.jsx(p,{})})]})]}):null]})};var Uy={root:"MRT_ToolbarDropZone-module_root__eGTXb",hovered:"MRT_ToolbarDropZone-module_hovered__g7PeJ"};const Wy=e=>{var{table:n}=e,t=Ie(e,["table"]);const{getState:r,options:{enableGrouping:o,localization:s},setHoveredColumn:a,setShowToolbarDropZone:u}=n,{draggingColumn:f,grouping:g,hoveredColumn:h,showToolbarDropZone:p}=r(),_=v=>{a({id:"drop-zone"})};return I.useEffect(()=>{var v;((v=n.options.state)===null||v===void 0?void 0:v.showToolbarDropZone)!==void 0&&u(!!o&&!!f&&f.columnDef.enableGrouping!==!1&&!g.includes(f.id))},[o,f,g]),c.jsx(b.Transition,{mounted:p,transition:"fade",children:()=>{var v,y;return c.jsx(b.Flex,Object.assign({className:ge("mrt-toolbar-dropzone",Uy.root,(h==null?void 0:h.id)==="drop-zone"&&Uy.hovered),onDragEnter:_},t,{children:c.jsx(b.Text,{children:s.dropToGroupBy.replace("{column}",(y=(v=f==null?void 0:f.columnDef)===null||v===void 0?void 0:v.header)!==null&&y!==void 0?y:"")})}))}})},XA=e=>{var{table:n}=e,t=Ie(e,["table"]);const{getState:r,options:{enablePagination:o,mantineBottomToolbarProps:s,positionPagination:a,positionToolbarAlertBanner:u,positionToolbarDropZone:f,renderBottomToolbarCustomActions:g},refs:{bottomToolbarRef:h}}=n,{isFullScreen:p}=r(),_=je.useMediaQuery("(max-width: 720px)"),v=Object.assign(Object.assign({},se(s,{table:n})),t),y=_||!!g;return c.jsxs(b.Box,Object.assign({},v,{className:ge("mrt-bottom-toolbar",so.root,$y["common-toolbar-styles"],p&&so["root-fullscreen"],v==null?void 0:v.className),ref:C=>{C&&(h.current=C,v!=null&&v.ref&&(v.ref.current=C))},children:[c.jsx(jy,{isTopToolbar:!1,table:n}),u==="bottom"&&c.jsx(If,{stackAlertBanner:y,table:n}),["both","bottom"].includes(f??"")&&c.jsx(Wy,{table:n}),c.jsxs(b.Box,{className:so["custom-toolbar-container"],children:[g?g({table:n}):c.jsx("span",{}),c.jsx(b.Box,{className:ge(so["paginator-container"],y&&so["paginator-container-alert-banner"]),children:o&&["both","bottom"].includes(a??"")&&c.jsx(Gy,{position:"bottom",table:n})})]})]}))};var Ol={root:"MRT_TopToolbar-module_root__r4-V9","root-fullscreen":"MRT_TopToolbar-module_root-fullscreen__3itT8","actions-container":"MRT_TopToolbar-module_actions-container__-uL0u","actions-container-stack-alert":"MRT_TopToolbar-module_actions-container-stack-alert__OYDL6"},QA={root:"MRT_ToolbarInternalButtons-module_root__NKoUG"};const eO=e=>{var n,{table:t}=e,r=Ie(e,["table"]);const{options:{columnFilterDisplayMode:o,enableColumnFilters:s,enableColumnOrdering:a,enableColumnPinning:u,enableDensityToggle:f,enableFilters:g,enableFullScreenToggle:h,enableGlobalFilter:p,enableHiding:_,initialState:v,renderToolbarInternalActions:y}}=t;return c.jsx(b.Flex,Object.assign({},r,{className:ge("mrt-toolbar-internal-buttons",QA.root,r==null?void 0:r.className),children:(n=y==null?void 0:y({table:t}))!==null&&n!==void 0?n:c.jsxs(c.Fragment,{children:[g&&p&&!(v!=null&&v.showGlobalFilter)&&c.jsx(wy,{table:t}),g&&s&&o!=="popover"&&c.jsx(by,{table:t}),(_||a||u)&&c.jsx(my,{table:t}),f&&c.jsx(_y,{table:t}),h&&c.jsx(yy,{table:t})]})}))},tO=e=>{var n,{table:t}=e,r=Ie(e,["table"]);const{getState:o,options:{enableGlobalFilter:s,enablePagination:a,enableToolbarInternalActions:u,mantineTopToolbarProps:f,positionGlobalFilter:g,positionPagination:h,positionToolbarAlertBanner:p,positionToolbarDropZone:_,renderTopToolbarCustomActions:v},refs:{topToolbarRef:y}}=t,{isFullScreen:C,showGlobalFilter:S}=o(),T=je.useMediaQuery("(max-width:720px)"),E=je.useMediaQuery("(max-width:1024px)"),F=Object.assign(Object.assign({},se(f,{table:t})),r),L=T||!!v||S&&E,O={style:E?void 0:{zIndex:3},table:t};return c.jsxs(b.Box,Object.assign({},F,{className:ge($y["common-toolbar-styles"],Ol.root,C&&Ol["root-fullscreen"],F==null?void 0:F.className),ref:P=>{P&&(y.current=P,F!=null&&F.ref&&(F.ref.current=P))},children:[p==="top"&&c.jsx(If,{stackAlertBanner:L,table:t}),["both","top"].includes(_??"")&&c.jsx(Wy,{table:t}),c.jsxs(b.Flex,{className:ge(Ol["actions-container"],L&&Ol["actions-container-stack-alert"]),children:[s&&g==="left"&&c.jsx(Mf,Object.assign({},O)),(n=v==null?void 0:v({table:t}))!==null&&n!==void 0?n:c.jsx("span",{}),u?c.jsxs(b.Flex,{justify:"end",wrap:"wrap-reverse",children:[s&&g==="right"&&c.jsx(Mf,Object.assign({},O)),c.jsx(eO,{table:t})]}):s&&g==="right"&&c.jsx(Mf,Object.assign({},O))]}),a&&["both","top"].includes(h??"")&&c.jsx(b.Flex,{justify:"end",children:c.jsx(Gy,{position:"top",table:t})}),c.jsx(jy,{isTopToolbar:!0,table:t})]}))},nO=e=>{var n,t,{table:r}=e,o=Ie(e,["table"]);const{getState:s,options:{enableBottomToolbar:a,enableTopToolbar:u,mantinePaperProps:f,renderBottomToolbar:g,renderTopToolbar:h},refs:{tablePaperRef:p}}=r,{isFullScreen:_}=s(),v=Object.assign(Object.assign({},se(f,{table:r})),o);return c.jsxs(b.Paper,Object.assign({shadow:"xs",withBorder:!0},v,{className:ge("mrt-table-paper",UA.root,_&&"mrt-table-paper-fullscreen",v==null?void 0:v.className),ref:y=>{p.current=y,v!=null&&v.ref&&(v.ref.current=y)},style:y=>Object.assign(Object.assign({zIndex:_?200:void 0},se(v==null?void 0:v.style,y)),_?{border:0,borderRadius:0,bottom:0,height:"100vh",left:0,margin:0,maxHeight:"100vh",maxWidth:"100vw",padding:0,position:"fixed",right:0,top:0,width:"100vw"}:null),children:[u&&((n=se(h,{table:r}))!==null&&n!==void 0?n:c.jsx(tO,{table:r})),c.jsx(ZA,{table:r}),a&&((t=se(g,{table:r}))!==null&&t!==void 0?t:c.jsx(XA,{table:r}))]}))},rO=e=>e.table!==void 0,iO=e=>{let n;return rO(e)?n=e.table:n=By(e),c.jsx(nO,{table:n})};function oO(e,n){const t=He(),r=zr(),o=I.useCallback(({row:s,...a})=>c.jsx(qn,{fallback:c.jsx(gl,{id:s.original.id}),functionProps:{api:t,auth:r,data:s.original,mrtProps:{row:s,...a}},children:n}),[t,r,n]);return{enableEditing:!e,editDisplayMode:"modal",renderRowActions:o}}function lO(e,n){return{enableRowSelection:!!e||!!n}}const Cr=(e={},...n)=>n.reduce((t,r)=>Vn(t,e[r]),{}),ao=(e,n,t=!1)=>{let r="";t&&(r+="filter");const o=t?e[0].toUpperCase():e[0].toLowerCase();return r+=o+e.slice(1),`${r}*${n}`},Af=(e="")=>{e.startsWith("filter")&&(e=e.slice(6));const[n="",t=""]=e.split("*");return{col:n,operator:t}};function sO({col:e,colFilter:n,onClick:t,...r}){return c.jsxs(b.Menu,{shadow:"md",width:"target",...r,children:[c.jsx(b.Menu.Target,{children:c.jsx(b.Button,{children:"Add filter"})}),c.jsx(b.Menu.Dropdown,{children:n.filters.filter(o=>!o.id).map(o=>c.jsx(b.Menu.Item,{onClick:()=>t({col:e,opr:o.operator,value:""}),children:o.name},`${n.label}-${o.name}`))})]})}function aO({col:e}){const{info:n,queryParams:t,setQueryParams:r}=He(),o=Ss.useForm({initialValues:{filters:(t==null?void 0:t.filters)||[]}}),s=I.useMemo(()=>(n==null?void 0:n.filters[e])||{},[e,n==null?void 0:n.filters]),a=I.useMemo(()=>{var h;return((h=s==null?void 0:s.filters)==null?void 0:h.reduce((p,_)=>({...p,[_.operator]:_.name}),{}))||{}},[s==null?void 0:s.filters]),[u]=je.useDebouncedValue(o.getValues(),Po);je.useDidUpdate(()=>{const h=u.filters.filter(p=>p.value);r({filters:h})},[u]);const f=o.getValues().filters,g=f.map((h,p)=>h.col===e&&!h.id?c.jsxs(I.Fragment,{children:[c.jsx(b.Grid.Col,{span:1.5,py:0,children:c.jsx(b.Center,{h:"100%",w:"100%",children:c.jsx(b.CloseButton,{onClick:()=>o.removeListItem("filters",p),size:"md",title:"Remove filter",variant:"outline"})})}),c.jsx(b.Grid.Col,{span:10.5,py:0,children:h.opr==="in"?c.jsx(Nd,{form:o,name:`filters.${p}.value`,label:a[h.opr],comboboxProps:{withinPortal:!1}}):c.jsx(Ld,{form:o,name:`filters.${p}.value`,label:a[h.opr],schema:s.schema,withinPortal:!1,filter:!0})}),p>=0&&p+1<f.length&&c.jsx(b.Grid.Col,{span:12,py:0,children:c.jsx(b.Divider,{my:"sm",label:"AND",align:"center"})})]},`${h.col}-${p}`):null).filter(Boolean);return c.jsxs(b.Grid,{w:g.length?"25rem":"100%",gap:"md",gutter:"xs",children:[g.length?g:c.jsx(b.Grid.Col,{span:12,children:c.jsx(b.Text,{align:"center",c:"gray",style:{fontStyle:"italic"},children:"No filters"})}),c.jsx(b.Grid.Col,{span:12,children:c.jsx(b.Stack,{children:c.jsx(sO,{col:e,colFilter:s||{filters:[]},onClick:h=>o.insertListItem("filters",h),withinPortal:!1})})})]})}function uO({filters:e,col:n,opr:t,table:r}){const o=b.useMantineTheme();return e.map(s=>{const a=s.operator===t;return c.jsx(b.Menu.Item,{color:a?o.primaryColor:void 0,leftSection:c.jsx(b.Text,{size:"xl",ta:"center",w:"2ch",style:{transform:"translateY(-0.1em)"},children:s.name[0]}),onClick:()=>r.setColumnFilterFns(u=>({...u,[n]:ao(n,s.operator)})),value:s.opr,children:s.name},s.operator)})}function cO({enableAdvancedFilters:e,mode:n,setMode:t,col:r,opr:o,filters:s,table:a}){return c.jsxs(c.Fragment,{children:[e&&c.jsxs(c.Fragment,{children:[c.jsx(b.Menu.Item,{component:"div",p:0,children:c.jsx(b.SegmentedControl,{fullWidth:!0,size:"sm",data:["Basic","Advanced"],value:n,onChange:t})}),c.jsx(b.Menu.Divider,{})]}),n==="Basic"&&c.jsx(uO,{filters:s,col:r,opr:o,table:a}),n==="Advanced"&&c.jsx(aO,{col:r})]})}const vi=e=>e!=null&&e!=="",Ky=I.forwardRef(({clearIcon:e,mrtprops:{textinputprops:n},...t},r)=>{const{value:o,onChange:s,leftInputProps:a,rightInputProps:u,groupProps:f,cleariconprops:g,...h}=t,[p,_]=I.useState([null,null]);I.useEffect(()=>{o||_([null,null])},[o]),I.useEffect(()=>{const L=JSON.stringify(p);p.every(vi)&&L!==o?s(JSON.stringify(p)):p.every(O=>!vi(O))&&s(void 0)},[p]);const v=I.useCallback((L,O)=>{_(P=>{const k=[...P];return k[O]=L,k})},[]);let[y,C]=p;const S=vi(C)&&!vi(y),T=vi(y)&&!vi(C),E=typeof y=="number"?c.jsx(b.ActionIcon,{...g,onClick:()=>_(L=>[null,L[1]]),children:c.jsx(ia,{})}):null,F=typeof C=="number"?c.jsx(b.ActionIcon,{...g,onClick:()=>_(L=>[L[0],null]),children:c.jsx(ia,{})}):null;return c.jsxs(b.Group,{w:"100%",wrap:"nowrap",align:"center",gap:"xs",...f,children:[c.jsx(b.NumberInput,{ref:r,styles:{wrapper:{marginBottom:0}},hideControls:!0,rightSection:E,...h,...n,value:y??"",onChange:L=>v(L,0),placeholder:S?"Start value is required":"Start value",error:S&&" ",...a}),c.jsx(b.NumberInput,{styles:{wrapper:{marginBottom:0}},hideControls:!0,rightSection:F,...h,...n,value:C??"",onChange:L=>v(L,1),placeholder:T?"End value is required":"End value",error:T&&" ",...u})]})});Ky.displayName="HeaderBetweenInput";const Jy=I.forwardRef(({clearIcon:e,mrtprops:{selectprops:n},...t},r)=>c.jsx(b.Select,{ref:r,data:[{value:String(!0),label:"True"},{value:String(!1),label:"False"}],...n,...t,value:Li(t.value)?String(t.value):null,onChange:o=>t.onChange(Li(o)?o===String(!0):void 0)}));Jy.displayName="HeaderBooleanInput";const Of=e=>e==="range"?[null,null]:null,Yy=(e,n)=>e==="range"?n.every(t=>t!==null):n!==null,Pf=I.forwardRef(({type:e,clearIcon:n,mrtprops:{dateinputprops:t},...r},o)=>{const{value:s,onChange:a,...u}=r,[f,g]=I.useState(Of(e));return I.useEffect(()=>{g(Of(e))},[e]),I.useEffect(()=>{s||g(Of(e))},[e,s]),I.useEffect(()=>{const h=JSON.stringify(e==="range"?f.map(p=>p?p.toISOString():null):(f==null?void 0:f.toISOString())??null);Yy(e,f)&&h!==s?a(h):Yy(e,f)||a(void 0)},[f]),c.jsx(ni.DatePickerInput,{ref:o,type:e,clearable:!0,valueFormat:"DD.MM.YYYY",...u,...t,value:e==="range"?Array.isArray(f)?f:[null,null]:Array.isArray(f)?null:f,onChange:g})});Pf.displayName="HeaderDateInput";const Zy=I.forwardRef(({data:e,clearIcon:n,mrtprops:{multiselectprops:t},placeholder:r,...o},s)=>{const a=Array.isArray(o.value)?o.value.map(u=>String(typeof u=="object"?kt(u.id):u)):[];return c.jsxs(b.Box,{...o,children:[!a.length&&c.jsx(b.TextInput,{pos:"absolute",placeholder:r,...o,value:void 0,onChange:void 0}),c.jsx(b.MultiSelect,{ref:s,styles:{pill:{maxWidth:"5rem"}},data:e,...t,...o,value:a})]})});Zy.displayName="HeaderMultiSelectInput";const Xy=I.forwardRef(({clearIcon:e,mrtprops:{textinputprops:n},...t},r)=>c.jsx(b.NumberInput,{ref:r,rightSection:e,...n,...t,value:t.value??""}));Xy.displayName="HeaderNumberInput";const Df=I.forwardRef(({data:e,clearIcon:n,mrtprops:{selectprops:t},...r},o)=>c.jsx(b.Select,{ref:o,data:e,searchable:!0,...t,...r,value:r.value??null}));Df.displayName="HeaderSelectInput";const kf=I.forwardRef(({clearIcon:e,mrtprops:{multiselectprops:n},...t},r)=>c.jsx(b.TagsInput,{ref:r,styles:{pill:{maxWidth:"5rem"}},...n,...t,value:t.value??[],onChange:o=>t.onChange(o.length?o:void 0)}));kf.displayName="HeaderTagsInput";const Lf=I.forwardRef((e,n)=>{const[t,r]=I.useState();return c.jsx(kf,{ref:n,...e,searchValue:t?t.toString():"",onSearchChange:o=>{if(!o){r(void 0);return}const s=Number(o);isNaN(s)||r(s)}})});Lf.displayName="HeaderTagsNumberInput";const Nf=I.forwardRef(({clearIcon:e,mrtprops:{textinputprops:n},...t},r)=>c.jsx(b.TextInput,{ref:r,rightSection:e,...n,...t,value:t.value||""}));Nf.displayName="HeaderTextInput";const Qy=I.forwardRef(({component:e,...n},t)=>{const r=He(),o=zr(),s=I.useMemo(()=>({api:r,auth:o,componentProps:{...n,ref:t}}),[r,o,n,t]);return c.jsx(qn,{ref:t,fallback:c.jsx(Nf,{...n}),functionProps:s,children:e})});Qy.displayName="HeaderInput";const dO=(e,n)=>{if(!(!e||!n)){switch(e){case"tc":return({componentProps:t})=>c.jsx(Nf,{...t});case"in":switch(n.type){case"Integer":return({componentProps:t})=>c.jsx(Lf,{...t});case"Enum":return({componentProps:t})=>c.jsx(Lf,{data:n.values,...t})}return({componentProps:t})=>c.jsx(kf,{...t});case"bw":switch(n.type){case"Date":case"DateTime":return({componentProps:t})=>c.jsx(Pf,{type:"range",...t});default:return({componentProps:t})=>c.jsx(Ky,{...t})}case"eq":case"neq":switch(n.type){case"Boolean":return({componentProps:t})=>c.jsx(Jy,{...t})}break;case"rel_o_m":case"nrel_o_m":return({componentProps:t})=>c.jsx(Df,{data:n.values.map(r=>({value:String(kt(r.id)),label:r.value})),...t});case"rel_m_m":case"nrel_m_m":return({componentProps:t})=>c.jsx(Zy,{data:n.values.map(r=>({value:String(kt(r.id)),label:r.value})),...t})}switch(n.type){case"Integer":return({componentProps:t})=>c.jsx(Xy,{...t});case"Enum":return({componentProps:t})=>c.jsx(Df,{data:n.values,...t});case"Date":case"DateTime":return({componentProps:t})=>c.jsx(Pf,{...t})}}},mi={root:"_root_yn5fy_1","date-filter":"_date-filter_yn5fy_5"},ew=I.forwardRef(({label:e,disabled:n,children:t,...r},o)=>n?I.cloneElement(t,{ref:o}):c.jsx(b.Tooltip,{label:e,...r,children:I.cloneElement(t,{ref:o})}));ew.displayName="FilterIconWrapper";const tw=I.forwardRef(({indicator:e,children:n,...t},r)=>{const{height:o,ref:s}=je.useElementSize(),a=je.useMergedRef(r,s);if(!e)return I.cloneElement(n,{ref:a});const u=2;//! This is the height offset between the button from ActionIcon and the icon itself
352
+ return c.jsx(b.Indicator,{zIndex:20,size:16,label:e,styles:{root:{height:o+u}},...t,children:I.cloneElement(n,{ref:a})})});tw.displayName="FilterIndicatorWrapper";function fO({children:e,enableFilterModes:n,enableAdvancedFilters:t,filterProps:r,filterModeDescription:o,filterMenu:s,filters:a,filterFn:u,mrtProps:{column:f,table:g,...h}}){var Ae;const{info:p,queryParams:_}=He(),v=He(),y=zr(),C=I.useMemo(()=>{var ue,pe;return(pe=(ue=p==null?void 0:p.filters)==null?void 0:ue[f.id])==null?void 0:pe.schema},[f.id,p==null?void 0:p.filters]),[S,T]=I.useState("Basic"),[E,{toggle:F}]=je.useDisclosure(),L=((Ae=g.getState().columnFilterFns)==null?void 0:Ae[f.id])||u,O=I.useMemo(()=>Af(L).operator,[L]),P=I.useMemo(()=>{var ue;return(ue=a==null?void 0:a.find(pe=>pe.operator===O))==null?void 0:ue.name},[a,O]),k=Ss.useField({mode:"controlled"}),z=I.useRef(O),j=I.useMemo(()=>(_==null?void 0:_.filters.filter(ue=>ue.id!==f.id&&ue.col===f.id).map(ue=>({...ue})))||[],[_,f.id]);z.current!==O&&(z.current=O,k.reset());const $=I.useCallback(()=>{k.reset(),f.setFilterValue(void 0)},[]),[H]=je.useDebouncedValue(k.getInputProps().value,Po),re=je.useMounted(),Z=I.useMemo(()=>_==null?void 0:_.filters.find(ue=>ue.col===f.id&&ue.opr===O),[f.id,O,_==null?void 0:_.filters]);I.useEffect(()=>{re&&f.setFilterValue(H??void 0)},[H]),I.useEffect(()=>{if(!re)return;const ue=f.getFilterValue();ue===void 0?$():k.getInputProps().onChange(ue)},[f.getFilterValue()]),I.useEffect(()=>{re&&(Z||$())},[Z]);const ne=I.useMemo(()=>{const ue={variant:"subtle"};return!(a!=null&&a.length)&&(ue.disabled=!0,ue.c="gray"),ue},[a==null?void 0:a.length]),ce=I.useMemo(()=>Fs(n?e==null?void 0:e[O]:e,dO(O,C)),[e,n,O,C]),q=I.useMemo(()=>({...ne,variant:"transparent",c:void 0,size:"sm",onClick:$}),[ne,$]),U=I.useMemo(()=>({api:v,auth:y,mrtProps:{column:f,table:g,...h}}),[v,y,f,h,g]),le=I.useMemo(()=>({...U,componentProps:{label:g.options.localization.changeFilterMode,disabled:!(a!=null&&a.length),indicator:j.length,aiProps:ne,onClick:F}}),[ne,j.length,a==null?void 0:a.length,U,g.options.localization.changeFilterMode,F]),_e=I.useMemo(()=>({...U,componentProps:{filterMode:P}}),[P,U]),he=bt(n?Cr(r,O):r,U),de=I.useMemo(()=>{var ue,pe;return{w:"100%",variant:"unstyled",disabled:!(a!=null&&a.length),title:a.length?void 0:"No filters",placeholder:(ue=g.options.localization.filterByColumn)==null?void 0:ue.replace("{column}",String(f.columnDef.header)),"aria-label":(pe=g.options.localization.filterByColumn)==null?void 0:pe.replace("{column}",String(f.columnDef.header)),style:{fontWeight:"normal"},mrtprops:{column:f,table:g,...h,textinputprops:{className:ge("mrt-filter-text-input",mi.root),...bt(g.mantineFilterTextInputProps,[{column:f,table:g,...h}]),...bt(f.columnDef.mantineFilterTextInputProps,[{column:f,table:g,...h}])},selectprops:{className:ge("mrt-filter-text-input",mi.root),...bt(g.mantineFilterSelectProps||{clearable:!0},{column:f,table:g,...h}),...bt(f.columnDef.mantineFilterSelectProps,{column:f,table:g,...h})},multiselectprops:{className:ge("mrt-filter-text-input",mi.root),...bt(g.mantineFilterMultiSelectProps||{clearable:!0},{column:f,table:g,...h}),...bt(f.columnDef.mantineFilterMultiSelectProps,{column:f,table:g,...h})},dateinputprops:{className:ge("mrt-filter-text-input",mi.root,mi["date-filter"]),...bt(g.mantineFilterDateInputProps,{column:f,table:g,...h}),...bt(f.columnDef.mantineFilterDateInputProps,{column:f,table:g,...h})},autocompleteprops:{className:ge("mrt-filter-text-input",mi.root),...bt(g.mantineFilterAutocompleteProps,{column:f,table:g,...h}),...bt(f.columnDef.mantineFilterAutocompleteProps,{column:f,table:g,...h})}},ref:K=>{K&&(g.refs.filterInputRefs.current[`${f.id}-0`]=K)},clearIcon:k.isDirty()&&c.jsx(b.CloseButton,{...q}),...he,cleariconprops:q}},[q,f,he,k,a.length,h,g]);return c.jsxs(b.Menu,{opened:E,closeOnClickOutside:!0,onChange:F,children:[c.jsxs(b.Stack,{w:"100%",gap:"0.25rem",children:[c.jsxs(b.Flex,{align:"flex-end",children:[c.jsx(Qy,{component:ce,field:k,...k.getInputProps(),...de}),n&&c.jsx(b.Menu.Target,{children:c.jsx(qn,{fallback:a.length?c.jsx(ew,{label:g.options.localization.changeFilterMode,position:"bottom-start",withArrow:!0,arrowPosition:"side",children:c.jsx(tw,{indicator:t?j.length:void 0,children:c.jsx(b.ActionIcon,{...ne,onClick:F,children:c.jsx(Jh,{})})})}):null,functionProps:le,children:s})})]}),n&&c.jsx(qn,{fallback:a.length?c.jsx(b.Input.Description,{size:"xs",children:g.options.localization.filterMode.replace("{filterType}",oo(Cr(g.options.localization,f.id),P)||oo(g.options.localization,P)||P)}):null,functionProps:_e,children:o})]}),c.jsx(b.Menu.Dropdown,{children:c.jsx(cO,{enableAdvancedFilters:t,mode:S,setMode:T,col:f.id,opr:O,filters:a,table:g})})]})}function gO({highlight:e,truncate:n,children:t}){return Array.isArray(t)?t.map((r,o)=>{var s;return(s=n==null?void 0:n[o])!=null&&s.truncated?c.jsx(b.Tooltip,{label:n[o].original,children:c.jsx(b.Highlight,{highlight:e,children:n[o].truncated},o)},o):c.jsx(b.Highlight,{highlight:e,children:r},o)}):n!=null&&n.truncated?c.jsx(b.Tooltip,{label:n.original,children:c.jsx(b.Highlight,{highlight:e,children:n.truncated})}):c.jsx(b.Highlight,{highlight:e,children:t})}function hO(e,n,t,r){const{path:o,info:s,data:a,specialKey:u}=He(),f=He(),g=zr(),h=I.useMemo(()=>(a==null?void 0:a.list_columns.map(v=>{var j,$,H,re,Z,ne,ce;const{component:y,enableFilterModes:C,enableAdvancedFilters:S,filterComponent:T,filterProps:E,filterModeDescription:F,filterMenu:L,defaultOpr:O=((re=(H=($=(j=s==null?void 0:s.filters)==null?void 0:j[v])==null?void 0:$.filters)==null?void 0:H[0])==null?void 0:re.operator)||""}=Cr(n,u.all,v),P=ao(v,O),k=((ne=(Z=s==null?void 0:s.filters)==null?void 0:Z[v])==null?void 0:ne.filters)||[],z={};return y!==void 0&&(z.Header=q=>bt(y,{api:f,auth:g,mrtProps:q})),{accessorKey:v,accessorFn:q=>ki(q,v),header:(ce=a==null?void 0:a.label_columns)==null?void 0:ce[v],Filter:q=>c.jsx(fO,{enableFilterModes:C,enableAdvancedFilters:S,filterProps:E,filterModeDescription:F,filterMenu:L,filters:k,filterFn:P,mrtProps:q,children:T}),enableSorting:a==null?void 0:a.order_columns.includes(v),filterFn:k.length?P:void 0,columnFilterModeOptions:k.map(q=>ao(v,q.operator)),Cell:({cell:q,table:U,column:le,..._e})=>{const he=U.getState().globalFilter,de=le.getFilterValue()||"",{component:Ae,separator:ue,truncate:pe}=Cr(t,u.all,v);let K=[];he&&K.push(...he.split(r).map(X=>X.trim())),de&&typeof de=="string"&&K.push(...de.split(r).map(X=>X.trim()));let ee=q.getValue();typeof ee=="number"?ee=ee.toLocaleString():ee==null&&(ee=""),ue&&(ee=ee.split(ue));let oe={};pe&&(Array.isArray(ee)?oe=ee.map(X=>({original:X,truncated:X.length>pe?`${X.slice(0,pe)}...`:null})):oe={original:ee,truncated:ee.length>pe?`${ee.slice(0,pe)}...`:null});const xe={api:f,auth:g,data:q.row.original,highlight:K,componentProps:{value:ee},mrtProps:{cell:q,table:U,column:le,..._e}};return c.jsx(qn,{fallback:c.jsx(gO,{highlight:K,truncate:oe,children:ee}),functionProps:xe,children:Ae})},...z,...Cr(e,u.all,v)}}))||[],[a==null?void 0:a.list_columns,a==null?void 0:a.label_columns,a==null?void 0:a.order_columns,s,e,u.all,f,g,n,t,r]),[p,_]=je.useSetState({});return I.useEffect(()=>{h.length&&_({[a.path]:h})},[h]),{columns:h.length?h:(p==null?void 0:p[o])||h,manualFiltering:!0}}function pO(){const{data:e,loading:n}=He();return{data:(e==null?void 0:e.result)||[],rowCount:(e==null?void 0:e.count)||0,state:{showLoadingOverlay:n}}}function vO(e){const{data:n}=He();return e?{mantineTableBodyRowProps:({row:t})=>({onClick:()=>{const r=n.ids[t.id];e(r,t.original)},style:{cursor:"pointer"}})}:null}function mO(){const{info:e}=He();return{filterFns:I.useMemo(()=>Object.entries((e==null?void 0:e.filters)||{}).reduce((n,[t,r])=>(r.filters.forEach(o=>n[ao(t,o.operator)]=null),n),{}),[e==null?void 0:e.filters])}}function _O(){const{queryParams:e,setQueryParams:n}=He(),t=I.useMemo(()=>e==null?void 0:e.global_filter,[e==null?void 0:e.global_filter]),[r,o]=I.useState(t||""),[s]=je.useDebouncedValue(r,Po);return je.useDidUpdate(()=>{t&&t!==s&&o(t)},[t]),je.useDidUpdate(()=>{s?n({page:0,global_filter:s}):e!=null&&e.global_filter&&n({page:0,global_filter:void 0})},[s]),{manualFiltering:!0,onGlobalFilterChange:o,state:{globalFilter:r}}}function bO(e){const{data:n,queryParams:t,setQueryParams:r}=He(),o=I.useMemo(()=>({pageIndex:(t==null?void 0:t.page)||Yg,pageSize:(t==null?void 0:t.page_size)||Zg}),[t==null?void 0:t.page,t==null?void 0:t.page_size]),s=I.useCallback(a=>{const u=a(o);!(n!=null&&n.count)&&u.pageIndex===0||r({page:u.pageIndex,page_size:u.pageSize})},[n==null?void 0:n.count,o,r]);return{enablePagination:!e,manualPagination:!0,state:{pagination:o},onPaginationChange:s}}function yO(e,n){const{info:t,specialKey:r,setQueryParams:o}=He(),s=I.useMemo(()=>{const a=[];return e.getState().columnFilters.forEach(({id:u,value:f})=>{var _,v,y,C,S;const{updateQueryParams:g=!0,defaultOpr:h=((C=(y=(v=(_=t==null?void 0:t.filters)==null?void 0:_[u])==null?void 0:v.filters)==null?void 0:y[0])==null?void 0:C.operator)||""}=Cr(n,r.all,u);if(!g)return;let p=(S=e.getState().columnFilterFns)==null?void 0:S[u];p?p=Af(p).operator:p=h,a.push({id:u,col:u,opr:p,value:f})}),a},[r.all,e.getState().columnFilters]);je.useDidUpdate(()=>{o(a=>({...a,filters:[...(a==null?void 0:a.filters.filter(u=>!u.id))??[],...s]}))},[s])}function wO(e){const{ref:n,height:t}=je.useElementSize(),{ref:r,height:o}=je.useElementSize(),s=I.useMemo(()=>{const g={h:"100%",withBorder:e};return e||(g.shadow=void 0),g},[e]),a=I.useMemo(()=>({ref:r}),[r]),u=I.useMemo(()=>({ref:n,pos:"sticky",bottom:0}),[n]),f=I.useMemo(()=>({h:`calc(100% - ${o+t}px)`}),[o,t]);return{mantinePaperProps:s,mantineTopToolbarProps:a,mantineBottomToolbarProps:u,mantineTableContainerProps:f}}function CO(){const{queryParams:e,setQueryParams:n,data:t}=He(),r=I.useMemo(()=>e!=null&&e.order_column?[{id:e.order_column,desc:e.order_direction==="desc"}]:[],[e==null?void 0:e.order_column,e==null?void 0:e.order_direction]),o=I.useCallback(s=>{const a=s(r);if(!a.length){n({order_column:null,order_direction:null});return}const u=a[0];n({order_column:t.order_columns.includes(u.id)?u.id:`${u.id}.id`,order_direction:u.desc?"desc":"asc"})},[t==null?void 0:t.order_columns,n,r]);return{manualSorting:!0,state:{sorting:r},onSortingChange:o}}function SO(e,n){return{toggleGlobalFilter:c.jsx(wy,{table:e,disabled:!1},"basic-toggleGlobalFilter"),filter:c.jsx(by,{table:e},"basic-filter"),refresh:c.jsx(Hd,{tooltipProps:{label:e.options.localization.refresh}},"basic-refresh"),add:(n==null?void 0:n.add)&&c.jsx(hl,{tooltipProps:{label:e.options.localization.add}},"basic-add"),download:(n==null?void 0:n.download)&&c.jsx(pl,{tooltipProps:{label:e.options.localization.download}},"basic-download"),upload:(n==null?void 0:n.upload)&&c.jsx(jd,{tooltipProps:{label:e.options.localization.upload}},"basic-upload"),showHideColumns:c.jsx(my,{table:e},"basic-showHideColumns"),toggleDensePadding:c.jsx(_y,{table:e},"basic-toggleDensePadding"),toggleFullScreen:c.jsx(yy,{table:e},"basic-toggleFullScreen")}}function nw(e,n,t,r){Object.entries(e||{}).forEach(([s,a])=>{s in n&&(n[s]=c.jsx(qn,{fallback:n[s],functionProps:t,children:a},`custom-${s}`))});let o=Object.values(n);return Object.entries(r||{}).forEach(([s,a])=>{s=Number(s)-1;const u=c.jsx(qn,{functionProps:t,children:a},`order-${s}`);s>o.length?o.push(u):o=[...o.slice(0,s),u,...o.slice(s)]}),c.jsx(b.Flex,{gap:"0.125rem",align:"center",children:o})}function TO(e={},n,t){const{info:r,queryParams:o,setQueryParams:s}=He(),a=He(),u=zr(),{customizer:f,custom:g,leftToolbar:h}=e,p=I.useMemo(()=>n?[{label:"All",value:"[]"},...n.map(y=>({label:y.name,value:JSON.stringify(y.value)}))]:[],[n]),_=I.useMemo(()=>p.length?c.jsx(b.SegmentedControl,{value:JSON.stringify((o==null?void 0:o.filters)||[]),onChange:y=>s({filters:JSON.parse(y)}),data:p}):null,[o==null?void 0:o.filters,p,s]);return{renderToolbarInternalActions:I.useCallback(({table:y})=>{const C={api:a,auth:u,mrtProps:{table:y}},S={add:r==null?void 0:r.permissions.includes("can_post"),download:r==null?void 0:r.permissions.includes("can_download"),upload:r==null?void 0:r.permissions.includes("can_upload")},T=SO(y,S);return nw(f,T,C,g)},[a,u,g,f,r==null?void 0:r.permissions]),enableTopToolbar:!t,enableFilters:(f==null?void 0:f.filter)!==null,...I.useMemo(()=>{if(_&&h)throw new Error("quickFilters and toolbar.leftToolbar are mutually exclusive, please use only one of them");const y={};if(_&&(y.renderTopToolbarCustomActions=()=>c.jsx(b.Group,{justify:"space-between",children:c.jsx(b.Box,{children:_})}),y.positionToolbarAlertBanner="bottom"),h){const{custom:C}=h;y.renderTopToolbarCustomActions=({table:S})=>nw(void 0,{},{api:a,auth:u,mrtProps:{table:S}},C),y.positionToolbarAlertBanner="bottom"}return y},[a,u,h,_])}}const rw={"toolbar-alert":"_toolbar-alert_bw71q_25","head-overlay":"_head-overlay_bw71q_28"},IO=({alertBanner:e,table:n,...t})=>{var q,U;const{getFilteredSelectedRowModel:r,getPrePaginationRowModel:o,getState:s,resetRowSelection:a,options:{enableRowSelection:u,enableSelectAll:f,icons:{IconX:g},localization:h,mantineToolbarAlertBannerBadgeProps:p,mantineToolbarAlertBannerProps:_,manualPagination:v,positionToolbarAlertBanner:y,rowCount:C}}=n,{density:S,grouping:T,rowSelection:E}=s(),{left:F,right:L,renderToolbarAlertBannerContent:O,wrapperProps:P}=e??{},{flex:k,group:z,stack:j}=P??{},$={...bt(_,{table:n}),...t},H=bt(p,{table:n}),re=C??o().flatRows.length,Z=I.useMemo(()=>v?Object.values(E).filter(Boolean).length:r().rows.length,[E,re,v]),ne=Z?c.jsxs(b.Flex,{align:"center",gap:"sm",children:[(U=(q=h.selectedCountOfRowCountRowsSelected)==null?void 0:q.replace("{selectedCount}",Z.toString()))==null?void 0:U.replace("{rowCount}",re.toString()),c.jsx(b.Button,{onClick:a,size:"compact-xs",variant:"subtle",children:h.clearSelection}),c.jsx(b.Button,{onClick:le=>af({table:n})(le,!1,!0),size:"compact-xs",variant:"subtle",children:h.clearSelectionOnThisPage??"Clear selection on this page"})]}):null,ce=T.length>0?c.jsxs(b.Group,{gap:"xs",children:[h.groupedBy,T.map((le,_e)=>c.jsxs(I.Fragment,{children:[_e>0?h.thenBy:"",c.jsxs(b.Badge,{className:"alert-badge",rightSection:c.jsx(b.ActionIcon,{color:"white",onClick:()=>n.getColumn(le).toggleGrouping(),size:"xs",variant:"subtle",children:c.jsx(g,{style:{transform:"scale(0.8)"}})}),variant:"filled",...H,children:[n.getColumn(le).columnDef.header," "]})]},`${_e}-${le}`))]}):null;return c.jsxs(b.Flex,{className:ge(rw["toolbar-alert"],y==="head-overlay"&&rw["head-overlay"],S),...k,children:[u&&f&&y==="head-overlay"&&c.jsx(Al,{table:n}),c.jsxs(b.Group,{align:"flex-start",gap:"xs",...z,children:[bt(F,{table:n}),Fs(bt(O,{selectedAlert:ne,groupedAlert:ce,table:n}),c.jsxs(b.Stack,{gap:"xs",...j,children:[$==null?void 0:$.children,ne,ce]})),bt(L,{table:n})]})]})};function MO(e){const{alertBanner:n}=e;return{renderToolbarAlertBannerContent:({table:t})=>c.jsx(IO,{alertBanner:n,table:t})}}const xO={enableStickyHeader:!0,enableColumnPinning:!0},iw=I.forwardRef((e,n)=>{var De,Pe,Oe;const{info:t,data:r,queryParams:o,refetch:s,specialKey:a}=He(),u=b.useProps("NextGenDataGrid",{},{}),{children:f,fetchOnMount:g=!0,hideToolbar:h,hideActions:p,hidePagination:_,hideError:v,onSelectCheckbox:y,onClickEntry:C,bulkActions:S,table:T,quickFilters:E,withBorder:F,columnProps:L,header:O,body:P,form:k,toolbar:z={},textFilterSeparator:j=";",bodySeparator:$,bodyTruncate:H,headerCustomizer:re,bodyCustomizer:Z,toolbarCustomizer:ne,hideAdd:ce,hideDownload:q,hideFilter:U,...le}=I.useMemo(()=>Vn(u,e),[e,u]);$&&Object.keys(P).forEach(Q=>{P[Q]=P[Q]||{},P[Q].separator=P[Q].separator||$}),H&&Object.keys(P).forEach(Q=>{P[Q]=P[Q]||{},P[Q].truncate=P[Q].truncate||H}),re&&Object.keys(re).forEach(Q=>{O[Q]=O[Q]||{},O[Q].component=re[Q].component||re[Q]}),Z&&Object.keys(Z).forEach(Q=>{P[Q]=P[Q]||{},P[Q].component=Z[Q].component||Z[Q]}),ne&&(z.custom=z.custom||ne),ce&&(z.customizer=z.customizer||{},z.customizer.add=z.customizer.add||null),q&&(z.customizer=z.customizer||{},z.customizer.download=z.customizer.download||null),U&&(z.customizer=z.customizer||{},z.customizer.filter=z.customizer.filter||null),I.useEffect(()=>{process.env.NODE_ENV==="development"&&($&&console.warn("bodySeparator is deprecated, please use body.[col].separator instead"),H&&console.warn("bodyTruncate is deprecated, please use body.[col].truncate instead"),re&&console.warn("headerCustomizer is deprecated, please use header.[col].component instead"),Z&&console.warn("bodyCustomizer is deprecated, please use body.[col].component instead"),ne&&console.warn("toolbarCustomizer is deprecated, please use toolbar.custom instead"),ce&&console.warn("hideAdd is deprecated, please use toolbar.customizer.add instead"),q&&console.warn("hideDownload is deprecated, please use toolbar.customizer.download instead"),U&&console.warn("hideFilter is deprecated, please use toolbar.customizer.filter instead"))},[]);const _e=pO(),he=CO(),de=bO(_),Ae=hO(L,O,P,j),ue=wO(F),pe=oO(p,(De=Cr(P,a.actions))==null?void 0:De.component),K=_O(),ee=TO(z,E,h),oe=vO(C),xe=lO(y,S),X=mO(),Ne=MO(z),Je=I.useMemo(()=>Vn(xO,{mantinePaperProps:{ref:n},getRowId:Q=>Q.id},Ae,_e,he,de,ue,pe,K,ee,oe,xe,X,Ne,T),[n,Ae,_e,he,de,ue,pe,K,ee,oe,xe,X,Ne,T]),Ge=By(Je);yO(Ge,O),I.useEffect(()=>{!o&&g&&s()},[]),I.useEffect(()=>{y==null||y(Object.keys(Ge.getState().rowSelection)),S==null||S.setSelectedIds(Object.keys(Ge.getState().rowSelection))},[S,r==null?void 0:r.ids,Ge.getState().rowSelection,y]);const{setView:st}=Qn("add"),{setView:Re}=Qn("edit");return I.useEffect(()=>{var Q,Be;(Q=k==null?void 0:k.add)!=null&&Q.initialView&&st(k.add.initialView),(Be=k==null?void 0:k.edit)!=null&&Be.initialView&&Re(k.edit.initialView)},[]),c.jsxs(b.Box,{h:"100%",w:"100%",pos:"relative",children:[c.jsxs(Rd,{cond:!!t,children:[c.jsx($d,{jsonForms:k==null?void 0:k.add,...(Pe=k==null?void 0:k.add)==null?void 0:Pe.dialogProps}),c.jsx(Cd,{jsonForms:k==null?void 0:k.edit,...(Oe=k==null?void 0:k.edit)==null?void 0:Oe.dialogProps})]}),c.jsx(iO,{table:Ge,...le}),f==null?void 0:f(Ge),v?null:c.jsx(Sd,{})]})});iw.displayName="NextGenDataGrid";const zf={iconSmall:"_iconSmall_sxv3z_1",btn:"_btn_sxv3z_17"};function EO({basePath:e="/security",Target:n,children:t}){const r=Jg.useNavigate(),{user:o,signout:s}=zr(),[a,u]=I.useState(!1),g=[{resource_name:e+"/users",label:"Users",name:"UsersApi",Icon:aT},{resource_name:e+"/roles",label:"Roles",name:"RolesApi",Icon:K1},{resource_name:e+"/permissions",label:"Base Permissions",name:"PermissionsApi",Icon:Yh},{resource_name:e+"/permissionviews",label:"Permission on Views",name:"PermissionViewApi",Icon:Yh},{resource_name:e+"/viewsmenus",label:"Views/Menus",name:"ViewsMenusApi",Icon:y1}].filter(h=>o.permissions.includes(h.name));return c.jsxs(b.Menu,{width:260,position:"bottom-end",transition:"pop-top-right",withinPortal:!0,opened:a,onClose:()=>u(!1),onOpen:()=>u(!0),children:[c.jsx(b.Menu.Target,{children:n||c.jsx(b.UnstyledButton,{className:zf.btn,style:{borderRadius:4},p:"xs",children:c.jsxs(b.Group,{style:{flexWrap:"nowrap"},spacing:7,children:[c.jsx(b.Text,{weight:500,size:"sm",style:{lineHeight:1,whiteSpace:"nowrap"},mr:3,children:`${o.first_name} ${o.last_name}`}),c.jsx(Uo,{size:12})]})})}),c.jsxs(b.Menu.Dropdown,{children:[g.length?c.jsxs(c.Fragment,{children:[c.jsx(b.Menu.Label,{children:"Security"}),g.map((h,p)=>c.jsx(b.Menu.Item,{p:12,leftSection:c.jsx(h.Icon,{className:zf.iconSmall}),onClick:()=>r(h.resource_name),children:h.label},p)),c.jsx(b.Menu.Divider,{})]}):null,t,c.jsx(b.Menu.Item,{leftSection:c.jsx(Y1,{p:12,className:zf.iconSmall}),onClick:s,children:"Logout"})]})]})}D.Actions=gl,D.Add=hl,D.AddDialog=$d,D.AlertDialog=ep,D.ApiContext=Ts,D.ApiProvider=Wh,D.AuthContext=As,D.Body=_b,D.BulkActionsContext=Ps,D.CommonModal=bd,D.DEBOUNCE_DELAY=Po,D.DEBOUNCE_LOADING_DELAY=Nr,D.DEFAULT_DELIMITER=Do,D.DEFAULT_PAGE=Yg,D.DEFAULT_PAGE_SIZE=Zg,D.DEFAULT_QUOTECHAR=Ms,D.DELIMITER_DATA=Is,D.DataGrid=Bd,D.Delete=oa,D.DeleteDialog=Kv,D.Download=pl,D.Edit=la,D.EditDialog=Cd,D.ErrorDialog=Sd,D.FallbackWrapper=qn,D.Field=eo,D.FieldTitle=fl,D.Filter=xb,D.FilterMenu=Mb,D.FormAutocomplete=vE,D.FormContextAdd=Ds,D.FormContextEdit=ks,D.FormDatePicker=wb,D.FormDateTimePicker=Cb,D.FormField=Ld,D.FormFilterIn=Nd,D.FormGeometryField=Sb,D.FormJsonField=Dd,D.FormRelatedListSelect=Tb,D.FormRelatedSelect=Ib,D.FormSelect=kd,D.FormTextField=to,D.Header=Od,D.InfiniteScroll=IE,D.InfoContext=Os,D.LazyLoadWrapper=Rd,D.Main=yb,D.MantineArrayControlRenderer=b_,D.MantineBooleanCell=Dv,D.MantineBooleanControl=x_,D.MantineBooleanInput=cu,D.MantineDateCell=Lv,D.MantineDateControl=F_,D.MantineDateInput=du,D.MantineDateTimeCell=zv,D.MantineDateTimeControl=O_,D.MantineDateTimeInput=fu,D.MantineEnumArrayInput=Ev,D.MantineEnumArrayRenderer=S_,D.MantineEnumCell=Bv,D.MantineEnumControl=D_,D.MantineEnumInput=gu,D.MantineGroupLayoutRenderer=W_,D.MantineGroupLayoutTester=U_,D.MantineHorizontalLayoutRenderer=J_,D.MantineIntegerCell=$v,D.MantineIntegerControl=L_,D.MantineJsonControl=z_,D.MantineJsonInput=Fv,D.MantineLabelRenderer=G_,D.MantineLabelTester=q_,D.MantineLayoutRenderer=tl,D.MantineNumberCell=jv,D.MantineNumberControl=B_,D.MantineNumberInput=Ui,D.MantineObjectControl=I_,D.MantineObjectControlTester=T_,D.MantineObjectInput=Ov,D.MantineOneOfEnumCell=Gv,D.MantineOneOfEnumControl=$_,D.MantineOneOfEnumInput=hu,D.MantineTableControl=m_,D.MantineTextCell=Wv,D.MantineTextControl=j_,D.MantineTextInput=pu,D.MantineVerticalLayoutRenderer=Z_,D.NextGenDataGrid=iw,D.NoBorderTableCell=ci,D.NonEmptyRow=v_,D.Pagination=Pd,D.Provider=LS,D.QUOTECHAR_DATA=xs,D.Refresh=Hd,D.Row=mb,D.TableToolbar=d_,D.Toolbar=zd,D.Upload=jd,D.UserMenu=EO,D.VIEW_MODE=St,D.ValidationIcon=c_,D.View=Vd,D.ViewDialog=Eb,D.authInfo=ah,D.authOAuthSignin=sh,D.authResetPassword=lh,D.authSignin=ih,D.authSignout=oh,D.compareStateWithStore=nh,D.convertId=kt,D.convertInfo=qh,D.convertLocalToUTCISOString=uu,D.convertToFormInputs=eb,D.convertUTCISOStringToLocal=Sv,D.createFetchParams=xt,D.createItem=hh,D.createProxy=ko,D.createQueryParams=Ri,D.deepMerge=Vn,D.deleteItem=ph,D.downloadItems=vh,D.fromFilterFnToFilter=Af,D.fromFilterToFilterFn=ao,D.getDefaultValues=Ls,D.getInfo=mh,D.getItem=_h,D.getItems=bh,D.getProps=Cr,D.getUser=uh,D.getValidationSchema=Qs,D.getValue=ki,D.getValueOrDefault=Fs,D.initialState=Lo,D.isEnumArrayControl=y_,D.isJsonControl=w_,D.isSchemaTypeInclude=_r,D.isTruthy=Li,D.mantineArrayControlTester=__,D.mantineBooleanCellTester=Pv,D.mantineBooleanControlTester=M_,D.mantineCells=X_,D.mantineDateCellTester=kv,D.mantineDateControlTester=E_,D.mantineDateTimeCellTester=Nv,D.mantineDateTimeControlTester=A_,D.mantineEnumArrayRendererTester=C_,D.mantineEnumCellTester=Rv,D.mantineEnumControlTester=P_,D.mantineHorizontalLayoutTester=K_,D.mantineIntegerCellTester=Vv,D.mantineIntegerControlTester=k_,D.mantineJsonControlTester=N_,D.mantineNumberCellTester=Hv,D.mantineNumberControlTester=R_,D.mantineOneOfEnumCellTester=qv,D.mantineOneOfEnumControlTester=V_,D.mantineRenderers=Q_,D.mantineTextCellTester=Uv,D.mantineTextControlTester=H_,D.mantineVerticalLayoutTester=Y_,D.normalProps=yd,D.normalize=Xg,D.overlayProps=wd,D.parseFromValuesOrFunc=bt,D.parseValue=Es,D.postBulk=Ch,D.updateItem=yh,D.updateUser=ch,D.uploadItems=wh,D.urlJoin=ft,D.useActionIcon=mr,D.useApi=He,D.useAuth=zr,D.useBooleanProps=Ip,D.useBulkActions=NS,D.useCommonProps=jn,D.useContextProps=On,D.useCustomFetch=uT,D.useDateProps=nl,D.useDebouncedChange=mI,D.useForms=Qn,D.useInfo=rh,D.useJsonProps=Tv,D.useMultiSelectProps=Iv,D.useNumberProps=Mv,D.useProvideApi=Gh,D.useProvideAuth=dh,D.useProvideBulk=Uh,D.useProvideForm=ea,D.useProvideInfo=fh,D.useProxy=Ni,D.useSelectProps=rl,D.useTextProps=xv,D.useTrueOnce=Qh,Object.defineProperty(D,Symbol.toStringTag,{value:"Module"})});