Linux server292.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
LiteSpeed
: 162.0.235.5 | : 216.73.216.150
Cant Read [ /etc/named.conf ]
8.3.25
comfsblg
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
home /
comfsblg /
jobspot /
dist /
assets /
[ HOME SHELL ]
Name
Size
Permission
Action
8learningLandingPage-BxAeOnRC....
5.35
KB
-rw-r--r--
AboutUsPage-v3iTUt-Y.js
8.61
KB
-rw-r--r--
AccessibilityStatementPage-Dbz...
7.34
KB
-rw-r--r--
AccountPage-sx-Cy3cO.js
69.81
KB
-rw-r--r--
ApplyJobPage-B4LepRCa.js
8.25
KB
-rw-r--r--
CareerGuidancePage-BtXt-O9W.js
12.62
KB
-rw-r--r--
CareerResourcesPage-BXjxs3AN.j...
6.72
KB
-rw-r--r--
ChartsWidget1-eYxi7HrY.js
6.06
KB
-rw-r--r--
ChatPage-C9e7Tf75.js
26.33
KB
-rw-r--r--
CompanyFollow-C_nOjFaS.js
2.04
KB
-rw-r--r--
CompanyFollowersPage-Bny9CAsO....
3.14
KB
-rw-r--r--
CompanyJobApplicationsPage-DKQ...
16.44
KB
-rw-r--r--
CompanyJobOffersPage-B4Fd195R....
6.66
KB
-rw-r--r--
ContactUsPage-DUketUTZ.js
5.29
KB
-rw-r--r--
Container-zyPQsKCF.js
2.25
KB
-rw-r--r--
CourseApiService-CkzEEhl_.js
3.7
KB
-rw-r--r--
CourseDetailsPage-Bcy4t_KD.js
9.09
KB
-rw-r--r--
CoursesPage-DvuiPxmL.js
10.13
KB
-rw-r--r--
CoverLetterGuidePage-hJEMe05p....
12.42
KB
-rw-r--r--
CvBankPage-bOAXYUnP.js
14.12
KB
-rw-r--r--
CvModel-DrFgAuyu.js
6.33
KB
-rw-r--r--
CvPDFPage-BUObCrrF.js
2.47
KB
-rw-r--r--
DisabilityInclusionPage-4299bX...
11.7
KB
-rw-r--r--
Dropdown1-UGVH9NzS.js
2.27
KB
-rw-r--r--
EmployeeDetailsPage-DFkK2CHl.j...
6.51
KB
-rw-r--r--
EmployerFAQPage-S7lrcptO.js
10.8
KB
-rw-r--r--
EmployersPage-DRhY53a3.js
7.26
KB
-rw-r--r--
InterviewTipsPage-BJ7aYyRF.js
15.71
KB
-rw-r--r--
JobCreatePage-D-Ncpkvi.css
21.52
KB
-rw-r--r--
JobCreatePage-n40SwcyD.js
241.51
KB
-rw-r--r--
JobDetailPage-Ch9Qkdb-.js
28.32
KB
-rw-r--r--
JobOffer-DZXDwm2j.js
2.65
KB
-rw-r--r--
JobSeekerFAQPage-DnLwGKr3.js
10.03
KB
-rw-r--r--
JobsPage-Caz20Wft.js
6.22
KB
-rw-r--r--
ListsWidget2-x9S0Hirq.js
17.34
KB
-rw-r--r--
MyCVPage-B14hiBZD.js
2.2
KB
-rw-r--r--
MyCompanyFollowsPage-DXtQPsVD....
4.3
KB
-rw-r--r--
MyCvViewsPage-gBsRqUHE.js
4.77
KB
-rw-r--r--
MyJobApplicationsPage-CNQ6620B...
6.14
KB
-rw-r--r--
MyJobOffersPage-CrQd3_n2.js
7.23
KB
-rw-r--r--
MyJonApplicationModel-1B2s8ml9...
3.45
KB
-rw-r--r--
MyShortListedJobApplicationsPa...
6.2
KB
-rw-r--r--
PrivacyPolicyPage-BYFqjTRP.js
17.31
KB
-rw-r--r--
ProfileEditPage-DSZQntuQ.js
69.48
KB
-rw-r--r--
ProfilePage-Dyg0d8fl.js
35.71
KB
-rw-r--r--
Row-DPZyTb7u.js
432
B
-rw-r--r--
SalaryGuidePage-TNz3Wo0q.js
12.86
KB
-rw-r--r--
ServiceApiService-M3M9HWad.js
4.65
KB
-rw-r--r--
ServiceDetailsPage-B29kv5us.js
6.71
KB
-rw-r--r--
ServicesPage-BfKuD8DN.js
9.79
KB
-rw-r--r--
SiteMapPage-D5JPTP5u.js
6.27
KB
-rw-r--r--
TablesWidget5-DZK4T4po.js
19.53
KB
-rw-r--r--
TermsAndConditionsPage-C9Z_qPQ...
15.07
KB
-rw-r--r--
UsersPage-D9i6KJrQ.js
125.33
KB
-rw-r--r--
WidgetsPage-aJXvNKtY.js
219.63
KB
-rw-r--r--
WizardsPage-BSIvJ-JL.js
29.3
KB
-rw-r--r--
bootstrap-icons-BOrJxbIo.woff
171.91
KB
-rw-r--r--
bootstrap-icons-BtvjY1KL.woff2
127.34
KB
-rw-r--r--
fa-brands-400-Dur5g48u.ttf
204.47
KB
-rw-r--r--
fa-brands-400-O7nZalfM.woff2
115.3
KB
-rw-r--r--
fa-regular-400-Bf3rG5Nx.ttf
66.38
KB
-rw-r--r--
fa-regular-400-DgEfZSYE.woff2
24.87
KB
-rw-r--r--
fa-solid-900-BV3CbEM2.ttf
413.75
KB
-rw-r--r--
fa-solid-900-DOQJEhcS.woff2
153.51
KB
-rw-r--r--
fa-v4compatibility-B9MWI-E6.tt...
10.58
KB
-rw-r--r--
fa-v4compatibility-BX8XWJtE.wo...
4.69
KB
-rw-r--r--
fonticon-DWAcCzk_.ttf
28.82
KB
-rw-r--r--
fonticon-DwNJt5rD.woff2
13.53
KB
-rw-r--r--
fonticon-HMxJuE9W.svg
237.07
KB
-rw-r--r--
fonticon-VqleVTVL.eot
28.99
KB
-rw-r--r--
fonticon-zHHFr-fU.woff
16
KB
-rw-r--r--
index-BH1zEgzQ.js
2.14
MB
-rw-r--r--
index-BszjlO3o.js
31.34
KB
-rw-r--r--
index-DxnCHZMK.css
1.91
MB
-rw-r--r--
keenicons-duotone-BdYtl4gH.eot
183.27
KB
-rw-r--r--
keenicons-duotone-C4mN2-ZY.svg
674.09
KB
-rw-r--r--
keenicons-duotone-CtM_kZPp.wof...
183.18
KB
-rw-r--r--
keenicons-duotone-DKdN_-MP.ttf
183.11
KB
-rw-r--r--
keenicons-outline-2dtxAfdV.wof...
241.05
KB
-rw-r--r--
keenicons-outline-CkekYDxi.svg
1.01
MB
-rw-r--r--
keenicons-outline-DQbBVMHT.ttf
240.98
KB
-rw-r--r--
keenicons-outline-UBChmC0V.eot
241.14
KB
-rw-r--r--
keenicons-solid-3fU7eTfe.ttf
161.26
KB
-rw-r--r--
keenicons-solid-7nivxdSK.eot
161.42
KB
-rw-r--r--
keenicons-solid-B_g1gF03.woff
161.34
KB
-rw-r--r--
keenicons-solid-Bbtzhe37.svg
679.13
KB
-rw-r--r--
la-brands-400-Cq-R4OEF.woff2
82.79
KB
-rw-r--r--
la-brands-400-D0lxOIwB.woff
96.36
KB
-rw-r--r--
la-brands-400-LN4CMlGg.eot
152.6
KB
-rw-r--r--
la-brands-400-gDglUfU7.ttf
152.41
KB
-rw-r--r--
la-brands-400-wsUI3UJ9.svg
905.6
KB
-rw-r--r--
la-regular-400-BmVb34ql.svg
110.87
KB
-rw-r--r--
la-regular-400-CmnW_RTo.ttf
32.93
KB
-rw-r--r--
la-regular-400-Cx6vm3uW.eot
33.12
KB
-rw-r--r--
la-regular-400-DuFMN_sw.woff2
12.6
KB
-rw-r--r--
la-regular-400-ehe5HgcS.woff
15.13
KB
-rw-r--r--
la-solid-900-BUOWlSBQ.ttf
220.83
KB
-rw-r--r--
la-solid-900-CR_Kd-su.woff
122.48
KB
-rw-r--r--
la-solid-900-DkmX4G2x.eot
221.01
KB
-rw-r--r--
la-solid-900-TjMEgv3Q.woff2
94.48
KB
-rw-r--r--
la-solid-900-dtlPMWb8.svg
901.51
KB
-rw-r--r--
socicon-CSO5PcLV.woff
37.79
KB
-rw-r--r--
socicon-DFwHIzOF.ttf
51.2
KB
-rw-r--r--
socicon-DTk6ugo7.svg
128.22
KB
-rw-r--r--
socicon-DpTpLguA.eot
51.36
KB
-rw-r--r--
useIsomorphicEffect-BzIh6twu.j...
5.57
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : UsersPage-D9i6KJrQ.js
var Xn=e=>{throw TypeError(e)};var Vt=(e,t,n)=>t.has(e)||Xn("Cannot "+n);var h=(e,t,n)=>(Vt(e,t,"read from private field"),n?n.call(e):t.get(e)),E=(e,t,n)=>t.has(e)?Xn("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),_=(e,t,n,r)=>(Vt(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),A=(e,t,n)=>(Vt(e,t,"access private method"),n);import{j as u,b5 as Q,bg as Uo,b8 as Yn,aT as zo,r as x,bh as Pe,bi as Br,aI as Ge,aH as mn,b0 as Bo,D as qo,X as Zn,ad as Qo,ae as Wo,aa as Ko,ab as Lt,ac as Jo,af as Xo,a9 as Yo}from"./index-BH1zEgzQ.js";const Zo=e=>{const{className:t,shadow:n,flush:r,resetSidePaddings:o,border:i,dashed:s,stretch:l,rounded:a,utilityP:c,utilityPY:d,utilityPX:p,children:f}=e;return u.jsx("div",{className:Q("card",t&&t,{"shadow-sm":n,"card-flush":r,"card-px-0":o,"card-bordered":i,"card-dashed":s},l&&`card-${l}`,c&&`p-${c}`,p&&`px-${p}`,d&&`py-${d}`,a&&`card-${a}`),children:f})},ei=e=>{const{className:t,scroll:n,height:r,children:o}=e;return u.jsx("div",{className:Q("card-body",t&&t,{"card-scroll":n},r&&`h-${r}px`),children:o})};var Be=TypeError;const ti={},ni=Object.freeze(Object.defineProperty({__proto__:null,default:ti},Symbol.toStringTag,{value:"Module"})),ri=Uo(ni);var Tn=typeof Map=="function"&&Map.prototype,Tt=Object.getOwnPropertyDescriptor&&Tn?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,xt=Tn&&Tt&&typeof Tt.get=="function"?Tt.get:null,er=Tn&&Map.prototype.forEach,Gn=typeof Set=="function"&&Set.prototype,Gt=Object.getOwnPropertyDescriptor&&Gn?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Ct=Gn&&Gt&&typeof Gt.get=="function"?Gt.get:null,tr=Gn&&Set.prototype.forEach,oi=typeof WeakMap=="function"&&WeakMap.prototype,Xe=oi?WeakMap.prototype.has:null,ii=typeof WeakSet=="function"&&WeakSet.prototype,Ye=ii?WeakSet.prototype.has:null,si=typeof WeakRef=="function"&&WeakRef.prototype,nr=si?WeakRef.prototype.deref:null,ai=Boolean.prototype.valueOf,li=Object.prototype.toString,ui=Function.prototype.toString,ci=String.prototype.match,Hn=String.prototype.slice,he=String.prototype.replace,di=String.prototype.toUpperCase,rr=String.prototype.toLowerCase,qr=RegExp.prototype.test,or=Array.prototype.concat,ee=Array.prototype.join,fi=Array.prototype.slice,ir=Math.floor,yn=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Ht=Object.getOwnPropertySymbols,vn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,He=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Ze=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===He||!0)?Symbol.toStringTag:null,Qr=Object.prototype.propertyIsEnumerable,sr=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function ar(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||qr.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-ir(-e):ir(e);if(r!==e){var o=String(r),i=Hn.call(t,o.length+1);return he.call(o,n,"$&_")+"."+he.call(he.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return he.call(t,n,"$&_")}var Sn=ri,lr=Sn.custom,ur=Jr(lr)?lr:null,Wr={__proto__:null,double:'"',single:"'"},gi={__proto__:null,double:/(["\\])/g,single:/(['\\])/g},Pt=function e(t,n,r,o){var i=n||{};if(re(i,"quoteStyle")&&!re(Wr,i.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(re(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=re(i,"customInspect")?i.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(re(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(re(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var l=i.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Yr(t,i);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var a=String(t);return l?ar(t,a):a}if(typeof t=="bigint"){var c=String(t)+"n";return l?ar(t,c):c}var d=typeof i.depth>"u"?5:i.depth;if(typeof r>"u"&&(r=0),r>=d&&d>0&&typeof t=="object")return wn(t)?"[Array]":"[Object]";var p=Ai(i,r);if(typeof o>"u")o=[];else if(Xr(o,t)>=0)return"[Circular]";function f(q,ae,le){if(ae&&(o=fi.call(o),o.push(ae)),le){var qe={depth:i.depth};return re(i,"quoteStyle")&&(qe.quoteStyle=i.quoteStyle),e(q,qe,r+1,o)}return e(q,i,r+1,o)}if(typeof t=="function"&&!cr(t)){var g=Ci(t),m=dt(t,f);return"[Function"+(g?": "+g:" (anonymous)")+"]"+(m.length>0?" { "+ee.call(m,", ")+" }":"")}if(Jr(t)){var y=He?he.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):vn.call(t);return typeof t=="object"&&!He?Qe(y):y}if($i(t)){for(var v="<"+rr.call(String(t.nodeName)),w=t.attributes||[],$=0;$<w.length;$++)v+=" "+w[$].name+"="+Kr(pi(w[$].value),"double",i);return v+=">",t.childNodes&&t.childNodes.length&&(v+="..."),v+="</"+rr.call(String(t.nodeName))+">",v}if(wn(t)){if(t.length===0)return"[]";var S=dt(t,f);return p&&!Ii(S)?"["+xn(S,p)+"]":"[ "+ee.call(S,", ")+" ]"}if(mi(t)){var O=dt(t,f);return!("cause"in Error.prototype)&&"cause"in t&&!Qr.call(t,"cause")?"{ ["+String(t)+"] "+ee.call(or.call("[cause]: "+f(t.cause),O),", ")+" }":O.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+ee.call(O,", ")+" }"}if(typeof t=="object"&&s){if(ur&&typeof t[ur]=="function"&&Sn)return Sn(t,{depth:d-r});if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(Ri(t)){var D=[];return er&&er.call(t,function(q,ae){D.push(f(ae,t,!0)+" => "+f(q,t))}),dr("Map",xt.call(t),D,p)}if(Fi(t)){var K=[];return tr&&tr.call(t,function(q){K.push(f(q,t))}),dr("Set",Ct.call(t),K,p)}if(_i(t))return Ut("WeakMap");if(Pi(t))return Ut("WeakSet");if(bi(t))return Ut("WeakRef");if(vi(t))return Qe(f(Number(t)));if(wi(t))return Qe(f(yn.call(t)));if(Si(t))return Qe(ai.call(t));if(yi(t))return Qe(f(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof Yn<"u"&&t===Yn)return"{ [object globalThis] }";if(!hi(t)&&!cr(t)){var j=dt(t,f),J=sr?sr(t)===Object.prototype:t instanceof Object||t.constructor===Object,I=t instanceof Object?"":"null prototype",V=!J&&Ze&&Object(t)===t&&Ze in t?Hn.call(Se(t),8,-1):I?"Object":"",G=J||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",B=G+(V||I?"["+ee.call(or.call([],V||[],I||[]),": ")+"] ":"");return j.length===0?B+"{}":p?B+"{"+xn(j,p)+"}":B+"{ "+ee.call(j,", ")+" }"}return String(t)};function Kr(e,t,n){var r=n.quoteStyle||t,o=Wr[r];return o+e+o}function pi(e){return he.call(String(e),/"/g,""")}function $e(e){return!Ze||!(typeof e=="object"&&(Ze in e||typeof e[Ze]<"u"))}function wn(e){return Se(e)==="[object Array]"&&$e(e)}function hi(e){return Se(e)==="[object Date]"&&$e(e)}function cr(e){return Se(e)==="[object RegExp]"&&$e(e)}function mi(e){return Se(e)==="[object Error]"&&$e(e)}function yi(e){return Se(e)==="[object String]"&&$e(e)}function vi(e){return Se(e)==="[object Number]"&&$e(e)}function Si(e){return Se(e)==="[object Boolean]"&&$e(e)}function Jr(e){if(He)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!vn)return!1;try{return vn.call(e),!0}catch{}return!1}function wi(e){if(!e||typeof e!="object"||!yn)return!1;try{return yn.call(e),!0}catch{}return!1}var xi=Object.prototype.hasOwnProperty||function(e){return e in this};function re(e,t){return xi.call(e,t)}function Se(e){return li.call(e)}function Ci(e){if(e.name)return e.name;var t=ci.call(ui.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Xr(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function Ri(e){if(!xt||!e||typeof e!="object")return!1;try{xt.call(e);try{Ct.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function _i(e){if(!Xe||!e||typeof e!="object")return!1;try{Xe.call(e,Xe);try{Ye.call(e,Ye)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function bi(e){if(!nr||!e||typeof e!="object")return!1;try{return nr.call(e),!0}catch{}return!1}function Fi(e){if(!Ct||!e||typeof e!="object")return!1;try{Ct.call(e);try{xt.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function Pi(e){if(!Ye||!e||typeof e!="object")return!1;try{Ye.call(e,Ye);try{Xe.call(e,Xe)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function $i(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Yr(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Yr(Hn.call(e,0,t.maxStringLength),t)+r}var o=gi[t.quoteStyle||"single"];o.lastIndex=0;var i=he.call(he.call(e,o,"\\$1"),/[\x00-\x1f]/g,Ei);return Kr(i,"single",t)}function Ei(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+di.call(t.toString(16))}function Qe(e){return"Object("+e+")"}function Ut(e){return e+" { ? }"}function dr(e,t,n,r){var o=r?xn(n,r):ee.call(n,", ");return e+" ("+t+") {"+o+"}"}function Ii(e){for(var t=0;t<e.length;t++)if(Xr(e[t],` `)>=0)return!1;return!0}function Ai(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=ee.call(Array(e.indent+1)," ");else return null;return{base:n,prev:ee.call(Array(t+1),n)}}function xn(e,t){if(e.length===0)return"";var n=` `+t.prev+t.base;return n+ee.call(e,","+n)+` `+t.prev}function dt(e,t){var n=wn(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=re(e,o)?t(e[o],e):""}var i=typeof Ht=="function"?Ht(e):[],s;if(He){s={};for(var l=0;l<i.length;l++)s["$"+i[l]]=i[l]}for(var a in e)re(e,a)&&(n&&String(Number(a))===a&&a<e.length||He&&s["$"+a]instanceof Symbol||(qr.call(/[^\w$]/,a)?r.push(t(a,e)+": "+t(e[a],e)):r.push(a+": "+t(e[a],e))));if(typeof Ht=="function")for(var c=0;c<i.length;c++)Qr.call(e,i[c])&&r.push("["+t(i[c])+"]: "+t(e[i[c]],e));return r}var Mi=Pt,Oi=Be,$t=function(e,t,n){for(var r=e,o;(o=r.next)!=null;r=o)if(o.key===t)return r.next=o.next,n||(o.next=e.next,e.next=o),o},ji=function(e,t){if(e){var n=$t(e,t);return n&&n.value}},Ni=function(e,t,n){var r=$t(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},Di=function(e,t){return e?!!$t(e,t):!1},ki=function(e,t){if(e)return $t(e,t,!0)},Vi=function(){var t,n={assert:function(r){if(!n.has(r))throw new Oi("Side channel does not contain "+Mi(r))},delete:function(r){var o=t&&t.next,i=ki(t,r);return i&&o&&o===i&&(t=void 0),!!i},get:function(r){return ji(t,r)},has:function(r){return Di(t,r)},set:function(r,o){t||(t={next:void 0}),Ni(t,r,o)}};return n},Zr=Object,Li=Error,Ti=EvalError,Gi=RangeError,Hi=ReferenceError,Ui=SyntaxError,zi=URIError,Bi=Math.abs,qi=Math.floor,Qi=Math.max,Wi=Math.min,Ki=Math.pow,Ji=Math.round,Xi=Number.isNaN||function(t){return t!==t},Yi=Xi,Zi=function(t){return Yi(t)||t===0?t:t<0?-1:1},es=Object.getOwnPropertyDescriptor,mt=es;if(mt)try{mt([],"length")}catch{mt=null}var eo=mt,yt=Object.defineProperty||!1;if(yt)try{yt({},"a",{value:1})}catch{yt=!1}var ts=yt,zt,fr;function ns(){return fr||(fr=1,zt=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;t[n]=o;for(var i in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(t,n);if(l.value!==o||l.enumerable!==!0)return!1}return!0}),zt}var Bt,gr;function rs(){if(gr)return Bt;gr=1;var e=typeof Symbol<"u"&&Symbol,t=ns();return Bt=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},Bt}var qt,pr;function to(){return pr||(pr=1,qt=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),qt}var Qt,hr;function no(){if(hr)return Qt;hr=1;var e=Zr;return Qt=e.getPrototypeOf||null,Qt}var Wt,mr;function os(){if(mr)return Wt;mr=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,n=Math.max,r="[object Function]",o=function(a,c){for(var d=[],p=0;p<a.length;p+=1)d[p]=a[p];for(var f=0;f<c.length;f+=1)d[f+a.length]=c[f];return d},i=function(a,c){for(var d=[],p=c,f=0;p<a.length;p+=1,f+=1)d[f]=a[p];return d},s=function(l,a){for(var c="",d=0;d<l.length;d+=1)c+=l[d],d+1<l.length&&(c+=a);return c};return Wt=function(a){var c=this;if(typeof c!="function"||t.apply(c)!==r)throw new TypeError(e+c);for(var d=i(arguments,1),p,f=function(){if(this instanceof p){var w=c.apply(this,o(d,arguments));return Object(w)===w?w:this}return c.apply(a,o(d,arguments))},g=n(0,c.length-d.length),m=[],y=0;y<g;y++)m[y]="$"+y;if(p=Function("binder","return function ("+s(m,",")+"){ return binder.apply(this,arguments); }")(f),c.prototype){var v=function(){};v.prototype=c.prototype,p.prototype=new v,v.prototype=null}return p},Wt}var Kt,yr;function Et(){if(yr)return Kt;yr=1;var e=os();return Kt=Function.prototype.bind||e,Kt}var Jt,vr;function Un(){return vr||(vr=1,Jt=Function.prototype.call),Jt}var Xt,Sr;function ro(){return Sr||(Sr=1,Xt=Function.prototype.apply),Xt}var is=typeof Reflect<"u"&&Reflect&&Reflect.apply,ss=Et(),as=ro(),ls=Un(),us=is,cs=us||ss.call(ls,as),ds=Et(),fs=Be,gs=Un(),ps=cs,oo=function(t){if(t.length<1||typeof t[0]!="function")throw new fs("a function is required");return ps(ds,gs,t)},Yt,wr;function hs(){if(wr)return Yt;wr=1;var e=oo,t=eo,n;try{n=[].__proto__===Array.prototype}catch(s){if(!s||typeof s!="object"||!("code"in s)||s.code!=="ERR_PROTO_ACCESS")throw s}var r=!!n&&t&&t(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return Yt=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(l){return i(l==null?l:o(l))}:!1,Yt}var Zt,xr;function ms(){if(xr)return Zt;xr=1;var e=to(),t=no(),n=hs();return Zt=e?function(o){return e(o)}:t?function(o){if(!o||typeof o!="object"&&typeof o!="function")throw new TypeError("getProto: not an object");return t(o)}:n?function(o){return n(o)}:null,Zt}var en,Cr;function ys(){if(Cr)return en;Cr=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Et();return en=n.call(e,t),en}var b,vs=Zr,Ss=Li,ws=Ti,xs=Gi,Cs=Hi,Ue=Ui,Oe=Be,Rs=zi,_s=Bi,bs=qi,Fs=Qi,Ps=Wi,$s=Ki,Es=Ji,Is=Zi,io=Function,tn=function(e){try{return io('"use strict"; return ('+e+").constructor;")()}catch{}},nt=eo,As=ts,nn=function(){throw new Oe},Ms=nt?function(){try{return arguments.callee,nn}catch{try{return nt(arguments,"callee").get}catch{return nn}}}():nn,Ee=rs()(),k=ms(),Os=no(),js=to(),so=ro(),st=Un(),Me={},Ns=typeof Uint8Array>"u"||!k?b:k(Uint8Array),Fe={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?b:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?b:ArrayBuffer,"%ArrayIteratorPrototype%":Ee&&k?k([][Symbol.iterator]()):b,"%AsyncFromSyncIteratorPrototype%":b,"%AsyncFunction%":Me,"%AsyncGenerator%":Me,"%AsyncGeneratorFunction%":Me,"%AsyncIteratorPrototype%":Me,"%Atomics%":typeof Atomics>"u"?b:Atomics,"%BigInt%":typeof BigInt>"u"?b:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?b:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?b:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?b:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Ss,"%eval%":eval,"%EvalError%":ws,"%Float16Array%":typeof Float16Array>"u"?b:Float16Array,"%Float32Array%":typeof Float32Array>"u"?b:Float32Array,"%Float64Array%":typeof Float64Array>"u"?b:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?b:FinalizationRegistry,"%Function%":io,"%GeneratorFunction%":Me,"%Int8Array%":typeof Int8Array>"u"?b:Int8Array,"%Int16Array%":typeof Int16Array>"u"?b:Int16Array,"%Int32Array%":typeof Int32Array>"u"?b:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ee&&k?k(k([][Symbol.iterator]())):b,"%JSON%":typeof JSON=="object"?JSON:b,"%Map%":typeof Map>"u"?b:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ee||!k?b:k(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":vs,"%Object.getOwnPropertyDescriptor%":nt,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?b:Promise,"%Proxy%":typeof Proxy>"u"?b:Proxy,"%RangeError%":xs,"%ReferenceError%":Cs,"%Reflect%":typeof Reflect>"u"?b:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?b:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ee||!k?b:k(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?b:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ee&&k?k(""[Symbol.iterator]()):b,"%Symbol%":Ee?Symbol:b,"%SyntaxError%":Ue,"%ThrowTypeError%":Ms,"%TypedArray%":Ns,"%TypeError%":Oe,"%Uint8Array%":typeof Uint8Array>"u"?b:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?b:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?b:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?b:Uint32Array,"%URIError%":Rs,"%WeakMap%":typeof WeakMap>"u"?b:WeakMap,"%WeakRef%":typeof WeakRef>"u"?b:WeakRef,"%WeakSet%":typeof WeakSet>"u"?b:WeakSet,"%Function.prototype.call%":st,"%Function.prototype.apply%":so,"%Object.defineProperty%":As,"%Object.getPrototypeOf%":Os,"%Math.abs%":_s,"%Math.floor%":bs,"%Math.max%":Fs,"%Math.min%":Ps,"%Math.pow%":$s,"%Math.round%":Es,"%Math.sign%":Is,"%Reflect.getPrototypeOf%":js};if(k)try{null.error}catch(e){var Ds=k(k(e));Fe["%Error.prototype%"]=Ds}var ks=function e(t){var n;if(t==="%AsyncFunction%")n=tn("async function () {}");else if(t==="%GeneratorFunction%")n=tn("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=tn("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&k&&(n=k(o.prototype))}return Fe[t]=n,n},Rr={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},at=Et(),Rt=ys(),Vs=at.call(st,Array.prototype.concat),Ls=at.call(so,Array.prototype.splice),_r=at.call(st,String.prototype.replace),_t=at.call(st,String.prototype.slice),Ts=at.call(st,RegExp.prototype.exec),Gs=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Hs=/\\(\\)?/g,Us=function(t){var n=_t(t,0,1),r=_t(t,-1);if(n==="%"&&r!=="%")throw new Ue("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Ue("invalid intrinsic syntax, expected opening `%`");var o=[];return _r(t,Gs,function(i,s,l,a){o[o.length]=l?_r(a,Hs,"$1"):s||i}),o},zs=function(t,n){var r=t,o;if(Rt(Rr,r)&&(o=Rr[r],r="%"+o[0]+"%"),Rt(Fe,r)){var i=Fe[r];if(i===Me&&(i=ks(r)),typeof i>"u"&&!n)throw new Oe("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:i}}throw new Ue("intrinsic "+t+" does not exist!")},zn=function(t,n){if(typeof t!="string"||t.length===0)throw new Oe("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Oe('"allowMissing" argument must be a boolean');if(Ts(/^%?[^%]*%?$/,t)===null)throw new Ue("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=Us(t),o=r.length>0?r[0]:"",i=zs("%"+o+"%",n),s=i.name,l=i.value,a=!1,c=i.alias;c&&(o=c[0],Ls(r,Vs([0,1],c)));for(var d=1,p=!0;d<r.length;d+=1){var f=r[d],g=_t(f,0,1),m=_t(f,-1);if((g==='"'||g==="'"||g==="`"||m==='"'||m==="'"||m==="`")&&g!==m)throw new Ue("property names with quotes must have matching quotes");if((f==="constructor"||!p)&&(a=!0),o+="."+f,s="%"+o+"%",Rt(Fe,s))l=Fe[s];else if(l!=null){if(!(f in l)){if(!n)throw new Oe("base intrinsic for "+t+" exists, but the property is not available.");return}if(nt&&d+1>=r.length){var y=nt(l,f);p=!!y,p&&"get"in y&&!("originalValue"in y.get)?l=y.get:l=l[f]}else p=Rt(l,f),l=l[f];p&&!a&&(Fe[s]=l)}}return l},ao=zn,lo=oo,Bs=lo([ao("%String.prototype.indexOf%")]),uo=function(t,n){var r=ao(t,!!n);return typeof r=="function"&&Bs(t,".prototype.")>-1?lo([r]):r},qs=zn,lt=uo,Qs=Pt,Ws=Be,br=qs("%Map%",!0),Ks=lt("Map.prototype.get",!0),Js=lt("Map.prototype.set",!0),Xs=lt("Map.prototype.has",!0),Ys=lt("Map.prototype.delete",!0),Zs=lt("Map.prototype.size",!0),co=!!br&&function(){var t,n={assert:function(r){if(!n.has(r))throw new Ws("Side channel does not contain "+Qs(r))},delete:function(r){if(t){var o=Ys(t,r);return Zs(t)===0&&(t=void 0),o}return!1},get:function(r){if(t)return Ks(t,r)},has:function(r){return t?Xs(t,r):!1},set:function(r,o){t||(t=new br),Js(t,r,o)}};return n},ea=zn,It=uo,ta=Pt,ft=co,na=Be,Ie=ea("%WeakMap%",!0),ra=It("WeakMap.prototype.get",!0),oa=It("WeakMap.prototype.set",!0),ia=It("WeakMap.prototype.has",!0),sa=It("WeakMap.prototype.delete",!0),aa=Ie?function(){var t,n,r={assert:function(o){if(!r.has(o))throw new na("Side channel does not contain "+ta(o))},delete:function(o){if(Ie&&o&&(typeof o=="object"||typeof o=="function")){if(t)return sa(t,o)}else if(ft&&n)return n.delete(o);return!1},get:function(o){return Ie&&o&&(typeof o=="object"||typeof o=="function")&&t?ra(t,o):n&&n.get(o)},has:function(o){return Ie&&o&&(typeof o=="object"||typeof o=="function")&&t?ia(t,o):!!n&&n.has(o)},set:function(o,i){Ie&&o&&(typeof o=="object"||typeof o=="function")?(t||(t=new Ie),oa(t,o,i)):ft&&(n||(n=ft()),n.set(o,i))}};return r}:ft,la=Be,ua=Pt,ca=Vi,da=co,fa=aa,ga=fa||da||ca,pa=function(){var t,n={assert:function(r){if(!n.has(r))throw new la("Side channel does not contain "+ua(r))},delete:function(r){return!!t&&t.delete(r)},get:function(r){return t&&t.get(r)},has:function(r){return!!t&&t.has(r)},set:function(r,o){t||(t=ga()),t.set(r,o)}};return n},ha=String.prototype.replace,ma=/%20/g,rn={RFC1738:"RFC1738",RFC3986:"RFC3986"},Bn={default:rn.RFC3986,formatters:{RFC1738:function(e){return ha.call(e,ma,"+")},RFC3986:function(e){return String(e)}},RFC1738:rn.RFC1738,RFC3986:rn.RFC3986},ya=Bn,on=Object.prototype.hasOwnProperty,xe=Array.isArray,X=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),va=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(xe(r)){for(var o=[],i=0;i<r.length;++i)typeof r[i]<"u"&&o.push(r[i]);n.obj[n.prop]=o}}},fo=function(t,n){for(var r=n&&n.plainObjects?Object.create(null):{},o=0;o<t.length;++o)typeof t[o]<"u"&&(r[o]=t[o]);return r},Sa=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(xe(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!on.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var o=t;return xe(t)&&!xe(n)&&(o=fo(t,r)),xe(t)&&xe(n)?(n.forEach(function(i,s){if(on.call(t,s)){var l=t[s];l&&typeof l=="object"&&i&&typeof i=="object"?t[s]=e(l,i,r):t.push(i)}else t[s]=i}),t):Object.keys(n).reduce(function(i,s){var l=n[s];return on.call(i,s)?i[s]=e(i[s],l,r):i[s]=l,i},o)},wa=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},xa=function(e,t,n){var r=e.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},sn=1024,Ca=function(t,n,r,o,i){if(t.length===0)return t;var s=t;if(typeof t=="symbol"?s=Symbol.prototype.toString.call(t):typeof t!="string"&&(s=String(t)),r==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(g){return"%26%23"+parseInt(g.slice(2),16)+"%3B"});for(var l="",a=0;a<s.length;a+=sn){for(var c=s.length>=sn?s.slice(a,a+sn):s,d=[],p=0;p<c.length;++p){var f=c.charCodeAt(p);if(f===45||f===46||f===95||f===126||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||i===ya.RFC1738&&(f===40||f===41)){d[d.length]=c.charAt(p);continue}if(f<128){d[d.length]=X[f];continue}if(f<2048){d[d.length]=X[192|f>>6]+X[128|f&63];continue}if(f<55296||f>=57344){d[d.length]=X[224|f>>12]+X[128|f>>6&63]+X[128|f&63];continue}p+=1,f=65536+((f&1023)<<10|c.charCodeAt(p)&1023),d[d.length]=X[240|f>>18]+X[128|f>>12&63]+X[128|f>>6&63]+X[128|f&63]}l+=d.join("")}return l},Ra=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o<n.length;++o)for(var i=n[o],s=i.obj[i.prop],l=Object.keys(s),a=0;a<l.length;++a){var c=l[a],d=s[c];typeof d=="object"&&d!==null&&r.indexOf(d)===-1&&(n.push({obj:s,prop:c}),r.push(d))}return va(n),t},_a=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},ba=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},Fa=function(t,n){return[].concat(t,n)},Pa=function(t,n){if(xe(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},go={arrayToObject:fo,assign:wa,combine:Fa,compact:Ra,decode:xa,encode:Ca,isBuffer:ba,isRegExp:_a,maybeMap:Pa,merge:Sa},po=pa,vt=go,et=Bn,$a=Object.prototype.hasOwnProperty,ho={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},Y=Array.isArray,Ea=Array.prototype.push,mo=function(e,t){Ea.apply(e,Y(t)?t:[t])},Ia=Date.prototype.toISOString,Fr=et.default,N={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:vt.encode,encodeValuesOnly:!1,format:Fr,formatter:et.formatters[Fr],indices:!1,serializeDate:function(t){return Ia.call(t)},skipNulls:!1,strictNullHandling:!1},Aa=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},an={},Ma=function e(t,n,r,o,i,s,l,a,c,d,p,f,g,m,y,v,w,$){for(var S=t,O=$,D=0,K=!1;(O=O.get(an))!==void 0&&!K;){var j=O.get(t);if(D+=1,typeof j<"u"){if(j===D)throw new RangeError("Cyclic object value");K=!0}typeof O.get(an)>"u"&&(D=0)}if(typeof d=="function"?S=d(n,S):S instanceof Date?S=g(S):r==="comma"&&Y(S)&&(S=vt.maybeMap(S,function(kt){return kt instanceof Date?g(kt):kt})),S===null){if(s)return c&&!v?c(n,N.encoder,w,"key",m):n;S=""}if(Aa(S)||vt.isBuffer(S)){if(c){var J=v?n:c(n,N.encoder,w,"key",m);return[y(J)+"="+y(c(S,N.encoder,w,"value",m))]}return[y(n)+"="+y(String(S))]}var I=[];if(typeof S>"u")return I;var V;if(r==="comma"&&Y(S))v&&c&&(S=vt.maybeMap(S,c)),V=[{value:S.length>0?S.join(",")||null:void 0}];else if(Y(d))V=d;else{var G=Object.keys(S);V=p?G.sort(p):G}var B=a?n.replace(/\./g,"%2E"):n,q=o&&Y(S)&&S.length===1?B+"[]":B;if(i&&Y(S)&&S.length===0)return q+"[]";for(var ae=0;ae<V.length;++ae){var le=V[ae],qe=typeof le=="object"&&typeof le.value<"u"?le.value:S[le];if(!(l&&qe===null)){var Dt=f&&a?le.replace(/\./g,"%2E"):le,Ho=Y(S)?typeof r=="function"?r(q,Dt):q:q+(f?"."+Dt:"["+Dt+"]");$.set(t,D);var Jn=po();Jn.set(an,$),mo(I,e(qe,Ho,r,o,i,s,l,a,r==="comma"&&v&&Y(S)?null:c,d,p,f,g,m,y,v,w,Jn))}}return I},Oa=function(t){if(!t)return N;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.encodeDotInKeys<"u"&&typeof t.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var n=t.charset||N.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=et.default;if(typeof t.format<"u"){if(!$a.call(et.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=et.formatters[r],i=N.filter;(typeof t.filter=="function"||Y(t.filter))&&(i=t.filter);var s;if(t.arrayFormat in ho?s=t.arrayFormat:"indices"in t?s=t.indices?"indices":"repeat":s=N.arrayFormat,"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var l=typeof t.allowDots>"u"?t.encodeDotInKeys===!0?!0:N.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:N.addQueryPrefix,allowDots:l,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:N.allowEmptyArrays,arrayFormat:s,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:N.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?N.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:N.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:N.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:N.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:N.encodeValuesOnly,filter:i,format:r,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:N.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:N.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:N.strictNullHandling}},ja=function(e,t){var n=e,r=Oa(t),o,i;typeof r.filter=="function"?(i=r.filter,n=i("",n)):Y(r.filter)&&(i=r.filter,o=i);var s=[];if(typeof n!="object"||n===null)return"";var l=ho[r.arrayFormat],a=l==="comma"&&r.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var c=po(),d=0;d<o.length;++d){var p=o[d];r.skipNulls&&n[p]===null||mo(s,Ma(n[p],p,l,a,r.allowEmptyArrays,r.strictNullHandling,r.skipNulls,r.encodeDotInKeys,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,c))}var f=s.join(r.delimiter),g=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?g+="utf8=%26%2310003%3B&":g+="utf8=%E2%9C%93&"),f.length>0?g+f:""},ze=go,Cn=Object.prototype.hasOwnProperty,Na=Array.isArray,M={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:ze.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},Da=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},yo=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},ka="utf8=%26%2310003%3B",Va="utf8=%E2%9C%93",La=function(t,n){var r={__proto__:null},o=n.ignoreQueryPrefix?t.replace(/^\?/,""):t;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var i=n.parameterLimit===1/0?void 0:n.parameterLimit,s=o.split(n.delimiter,i),l=-1,a,c=n.charset;if(n.charsetSentinel)for(a=0;a<s.length;++a)s[a].indexOf("utf8=")===0&&(s[a]===Va?c="utf-8":s[a]===ka&&(c="iso-8859-1"),l=a,a=s.length);for(a=0;a<s.length;++a)if(a!==l){var d=s[a],p=d.indexOf("]="),f=p===-1?d.indexOf("="):p+1,g,m;f===-1?(g=n.decoder(d,M.decoder,c,"key"),m=n.strictNullHandling?null:""):(g=n.decoder(d.slice(0,f),M.decoder,c,"key"),m=ze.maybeMap(yo(d.slice(f+1),n),function(v){return n.decoder(v,M.decoder,c,"value")})),m&&n.interpretNumericEntities&&c==="iso-8859-1"&&(m=Da(m)),d.indexOf("[]=")>-1&&(m=Na(m)?[m]:m);var y=Cn.call(r,g);y&&n.duplicates==="combine"?r[g]=ze.combine(r[g],m):(!y||n.duplicates==="last")&&(r[g]=m)}return r},Ta=function(e,t,n,r){for(var o=r?t:yo(t,n),i=e.length-1;i>=0;--i){var s,l=e[i];if(l==="[]"&&n.parseArrays)s=n.allowEmptyArrays&&(o===""||n.strictNullHandling&&o===null)?[]:[].concat(o);else{s=n.plainObjects?Object.create(null):{};var a=l.charAt(0)==="["&&l.charAt(l.length-1)==="]"?l.slice(1,-1):l,c=n.decodeDotInKeys?a.replace(/%2E/g,"."):a,d=parseInt(c,10);!n.parseArrays&&c===""?s={0:o}:!isNaN(d)&&l!==c&&String(d)===c&&d>=0&&n.parseArrays&&d<=n.arrayLimit?(s=[],s[d]=o):c!=="__proto__"&&(s[c]=o)}o=s}return o},Ga=function(t,n,r,o){if(t){var i=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/,l=/(\[[^[\]]*])/g,a=r.depth>0&&s.exec(i),c=a?i.slice(0,a.index):i,d=[];if(c){if(!r.plainObjects&&Cn.call(Object.prototype,c)&&!r.allowPrototypes)return;d.push(c)}for(var p=0;r.depth>0&&(a=l.exec(i))!==null&&p<r.depth;){if(p+=1,!r.plainObjects&&Cn.call(Object.prototype,a[1].slice(1,-1))&&!r.allowPrototypes)return;d.push(a[1])}return a&&d.push("["+i.slice(a.index)+"]"),Ta(d,n,r,o)}},Ha=function(t){if(!t)return M;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.decodeDotInKeys<"u"&&typeof t.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(t.decoder!==null&&typeof t.decoder<"u"&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=typeof t.charset>"u"?M.charset:t.charset,r=typeof t.duplicates>"u"?M.duplicates:t.duplicates;if(r!=="combine"&&r!=="first"&&r!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var o=typeof t.allowDots>"u"?t.decodeDotInKeys===!0?!0:M.allowDots:!!t.allowDots;return{allowDots:o,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:M.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:M.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:M.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:M.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:M.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:M.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:M.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:M.decoder,delimiter:typeof t.delimiter=="string"||ze.isRegExp(t.delimiter)?t.delimiter:M.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:M.depth,duplicates:r,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:M.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:M.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:M.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:M.strictNullHandling}},Ua=function(e,t){var n=Ha(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?La(e,n):e,o=n.plainObjects?Object.create(null):{},i=Object.keys(r),s=0;s<i.length;++s){var l=i[s],a=Ga(l,r[l],n,typeof e=="string");o=ze.merge(o,a,n)}return n.allowSparse===!0?o:ze.compact(o)},za=ja,Ba=Ua,qa=Bn,Qa={formats:qa,parse:Ba,stringify:za};const ln=zo(Qa);function Wa(e){return x.createContext(e)}function bt(e){return e!=null&&e!==""}function Pr(e){const t=ln.stringify(e,{filter:["page","items_per_page"],skipNulls:!0}),n=ln.stringify(e,{filter:["sort","order"],skipNulls:!0}),r=bt(e.search)?ln.stringify(e,{filter:["search"],skipNulls:!0}):"",o=e.filter?Object.entries(e.filter).filter(i=>bt(i[1])).map(i=>`filter_${i[0]}=${i[1]}`).join("&"):"";return[t,n,r,o].filter(i=>i).join("&").toLowerCase()}function Ka(e,t){return e?!0:!t||!t.length}function Ja(e,t){return e?e.length>0&&e.length===t.length:!1}function Xa(e,t,n){if(e)if(t.includes(e))n(t.filter(r=>r!==e));else{const r=[...t];r.push(e),n(r)}}function Ya(e,t,n){if(e){t([]);return}!n||!n.length||t(n.filter(r=>r.id).map(r=>r.id))}function Za(e,t){const[n,r]=x.useState(e);return x.useEffect(()=>{const o=setTimeout(()=>{r(e)},t);return()=>{clearTimeout(o)}},[e,t]),n}const ye={page:1,items_per_page:10},vo={state:ye,updateState:()=>{}},el={refetch:()=>{},isLoading:!1,query:""},Rn={selected:[],onSelect:()=>{},onSelectAll:()=>{},clearSelected:()=>{},setItemIdForUpdate:()=>{},isAllSelected:!1,disabled:!1},At={USERS_LIST:"users-list"};var Mt=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},rt=typeof window>"u"||"Deno"in globalThis;function tl(){}function $r(e){return typeof e=="number"&&e>=0&&e!==1/0}function nl(e,t){return Math.max(e+(t||0)-Date.now(),0)}function St(e,t){return typeof e=="function"?e(t):e}function te(e,t){return typeof e=="function"?e(t):e}function Er(e){return JSON.stringify(e,(t,n)=>_n(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function So(e,t){if(e===t)return e;const n=Ir(e)&&Ir(t);if(n||_n(e)&&_n(t)){const r=n?e:Object.keys(e),o=r.length,i=n?t:Object.keys(t),s=i.length,l=n?[]:{};let a=0;for(let c=0;c<s;c++){const d=n?c:i[c];(!n&&r.includes(d)||n)&&e[d]===void 0&&t[d]===void 0?(l[d]=void 0,a++):(l[d]=So(e[d],t[d]),l[d]===e[d]&&e[d]!==void 0&&a++)}return o===s&&a===o?e:l}return t}function Ft(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Ir(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function _n(e){if(!Ar(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Ar(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Ar(e){return Object.prototype.toString.call(e)==="[object Object]"}function Mr(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?So(e,t):t}var Ce,ue,je,Gr,rl=(Gr=class extends Mt{constructor(){super();E(this,Ce);E(this,ue);E(this,je);_(this,je,t=>{if(!rt&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){h(this,ue)||this.setEventListener(h(this,je))}onUnsubscribe(){var t;this.hasListeners()||((t=h(this,ue))==null||t.call(this),_(this,ue,void 0))}setEventListener(t){var n;_(this,je,t),(n=h(this,ue))==null||n.call(this),_(this,ue,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){h(this,Ce)!==t&&(_(this,Ce,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof h(this,Ce)=="boolean"?h(this,Ce):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ce=new WeakMap,ue=new WeakMap,je=new WeakMap,Gr),ol=new rl,Ne,ce,De,Hr,il=(Hr=class extends Mt{constructor(){super();E(this,Ne,!0);E(this,ce);E(this,De);_(this,De,t=>{if(!rt&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){h(this,ce)||this.setEventListener(h(this,De))}onUnsubscribe(){var t;this.hasListeners()||((t=h(this,ce))==null||t.call(this),_(this,ce,void 0))}setEventListener(t){var n;_(this,De,t),(n=h(this,ce))==null||n.call(this),_(this,ce,t(this.setOnline.bind(this)))}setOnline(t){h(this,Ne)!==t&&(_(this,Ne,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return h(this,Ne)}},Ne=new WeakMap,ce=new WeakMap,De=new WeakMap,Hr),sl=new il;function Or(){let e,t;const n=new Promise((o,i)=>{e=o,t=i});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}function al(e){return(e??"online")==="online"?sl.isOnline():!0}function ll(){let e=[],t=0,n=l=>{l()},r=l=>{l()},o=l=>setTimeout(l,0);const i=l=>{t?e.push(l):o(()=>{n(l)})},s=()=>{const l=e;e=[],l.length&&o(()=>{r(()=>{l.forEach(a=>{n(a)})})})};return{batch:l=>{let a;t++;try{a=l()}finally{t--,t||s()}return a},batchCalls:l=>(...a)=>{i(()=>{l(...a)})},schedule:i,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{o=l}}}var Ot=ll();function ul(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:al(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function cl(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var H,F,ot,T,Re,ke,de,Z,it,Ve,Le,_e,be,fe,Te,P,Je,bn,Fn,Pn,$n,En,In,An,wo,Ur,dl=(Ur=class extends Mt{constructor(t,n){super();E(this,P);E(this,H);E(this,F);E(this,ot);E(this,T);E(this,Re);E(this,ke);E(this,de);E(this,Z);E(this,it);E(this,Ve);E(this,Le);E(this,_e);E(this,be);E(this,fe);E(this,Te,new Set);this.options=n,_(this,H,t),_(this,Z,null),_(this,de,Or()),this.options.experimental_prefetchInRender||h(this,de).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(h(this,F).addObserver(this),jr(h(this,F),this.options)?A(this,P,Je).call(this):this.updateResult(),A(this,P,$n).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Mn(h(this,F),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Mn(h(this,F),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,A(this,P,En).call(this),A(this,P,In).call(this),h(this,F).removeObserver(this)}setOptions(t,n){const r=this.options,o=h(this,F);if(this.options=h(this,H).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof te(this.options.enabled,h(this,F))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");A(this,P,An).call(this),h(this,F).setOptions(this.options),r._defaulted&&!Ft(this.options,r)&&h(this,H).getQueryCache().notify({type:"observerOptionsUpdated",query:h(this,F),observer:this});const i=this.hasListeners();i&&Nr(h(this,F),o,this.options,r)&&A(this,P,Je).call(this),this.updateResult(n),i&&(h(this,F)!==o||te(this.options.enabled,h(this,F))!==te(r.enabled,h(this,F))||St(this.options.staleTime,h(this,F))!==St(r.staleTime,h(this,F)))&&A(this,P,bn).call(this);const s=A(this,P,Fn).call(this);i&&(h(this,F)!==o||te(this.options.enabled,h(this,F))!==te(r.enabled,h(this,F))||s!==h(this,fe))&&A(this,P,Pn).call(this,s)}getOptimisticResult(t){const n=h(this,H).getQueryCache().build(h(this,H),t),r=this.createResult(n,t);return gl(this,r)&&(_(this,T,r),_(this,ke,this.options),_(this,Re,h(this,F).state)),r}getCurrentResult(){return h(this,T)}trackResult(t,n){const r={};return Object.keys(t).forEach(o=>{Object.defineProperty(r,o,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(o),n==null||n(o),t[o])})}),r}trackProp(t){h(this,Te).add(t)}getCurrentQuery(){return h(this,F)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=h(this,H).defaultQueryOptions(t),r=h(this,H).getQueryCache().build(h(this,H),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return A(this,P,Je).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),h(this,T)))}createResult(t,n){var J;const r=h(this,F),o=this.options,i=h(this,T),s=h(this,Re),l=h(this,ke),c=t!==r?t.state:h(this,ot),{state:d}=t;let p={...d},f=!1,g;if(n._optimisticResults){const I=this.hasListeners(),V=!I&&jr(t,n),G=I&&Nr(t,r,n,o);(V||G)&&(p={...p,...ul(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:m,errorUpdatedAt:y,status:v}=p;if(n.select&&p.data!==void 0)if(i&&p.data===(s==null?void 0:s.data)&&n.select===h(this,it))g=h(this,Ve);else try{_(this,it,n.select),g=n.select(p.data),g=Mr(i==null?void 0:i.data,g,n),_(this,Ve,g),_(this,Z,null)}catch(I){_(this,Z,I)}else g=p.data;if(n.placeholderData!==void 0&&g===void 0&&v==="pending"){let I;if(i!=null&&i.isPlaceholderData&&n.placeholderData===(l==null?void 0:l.placeholderData))I=i.data;else if(I=typeof n.placeholderData=="function"?n.placeholderData((J=h(this,Le))==null?void 0:J.state.data,h(this,Le)):n.placeholderData,n.select&&I!==void 0)try{I=n.select(I),_(this,Z,null)}catch(V){_(this,Z,V)}I!==void 0&&(v="success",g=Mr(i==null?void 0:i.data,I,n),f=!0)}h(this,Z)&&(m=h(this,Z),g=h(this,Ve),y=Date.now(),v="error");const w=p.fetchStatus==="fetching",$=v==="pending",S=v==="error",O=$&&w,D=g!==void 0,j={status:v,fetchStatus:p.fetchStatus,isPending:$,isSuccess:v==="success",isError:S,isInitialLoading:O,isLoading:O,data:g,dataUpdatedAt:p.dataUpdatedAt,error:m,errorUpdatedAt:y,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>c.dataUpdateCount||p.errorUpdateCount>c.errorUpdateCount,isFetching:w,isRefetching:w&&!$,isLoadingError:S&&!D,isPaused:p.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:S&&D,isStale:qn(t,n),refetch:this.refetch,promise:h(this,de)};if(this.options.experimental_prefetchInRender){const I=B=>{j.status==="error"?B.reject(j.error):j.data!==void 0&&B.resolve(j.data)},V=()=>{const B=_(this,de,j.promise=Or());I(B)},G=h(this,de);switch(G.status){case"pending":t.queryHash===r.queryHash&&I(G);break;case"fulfilled":(j.status==="error"||j.data!==G.value)&&V();break;case"rejected":(j.status!=="error"||j.error!==G.reason)&&V();break}}return j}updateResult(t){const n=h(this,T),r=this.createResult(h(this,F),this.options);if(_(this,Re,h(this,F).state),_(this,ke,this.options),h(this,Re).data!==void 0&&_(this,Le,h(this,F)),Ft(r,n))return;_(this,T,r);const o={},i=()=>{if(!n)return!0;const{notifyOnChangeProps:s}=this.options,l=typeof s=="function"?s():s;if(l==="all"||!l&&!h(this,Te).size)return!0;const a=new Set(l??h(this,Te));return this.options.throwOnError&&a.add("error"),Object.keys(h(this,T)).some(c=>{const d=c;return h(this,T)[d]!==n[d]&&a.has(d)})};(t==null?void 0:t.listeners)!==!1&&i()&&(o.listeners=!0),A(this,P,wo).call(this,{...o,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&A(this,P,$n).call(this)}},H=new WeakMap,F=new WeakMap,ot=new WeakMap,T=new WeakMap,Re=new WeakMap,ke=new WeakMap,de=new WeakMap,Z=new WeakMap,it=new WeakMap,Ve=new WeakMap,Le=new WeakMap,_e=new WeakMap,be=new WeakMap,fe=new WeakMap,Te=new WeakMap,P=new WeakSet,Je=function(t){A(this,P,An).call(this);let n=h(this,F).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(tl)),n},bn=function(){A(this,P,En).call(this);const t=St(this.options.staleTime,h(this,F));if(rt||h(this,T).isStale||!$r(t))return;const r=nl(h(this,T).dataUpdatedAt,t)+1;_(this,_e,setTimeout(()=>{h(this,T).isStale||this.updateResult()},r))},Fn=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(h(this,F)):this.options.refetchInterval)??!1},Pn=function(t){A(this,P,In).call(this),_(this,fe,t),!(rt||te(this.options.enabled,h(this,F))===!1||!$r(h(this,fe))||h(this,fe)===0)&&_(this,be,setInterval(()=>{(this.options.refetchIntervalInBackground||ol.isFocused())&&A(this,P,Je).call(this)},h(this,fe)))},$n=function(){A(this,P,bn).call(this),A(this,P,Pn).call(this,A(this,P,Fn).call(this))},En=function(){h(this,_e)&&(clearTimeout(h(this,_e)),_(this,_e,void 0))},In=function(){h(this,be)&&(clearInterval(h(this,be)),_(this,be,void 0))},An=function(){const t=h(this,H).getQueryCache().build(h(this,H),this.options);if(t===h(this,F))return;const n=h(this,F);_(this,F,t),_(this,ot,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},wo=function(t){Ot.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(h(this,T))}),h(this,H).getQueryCache().notify({query:h(this,F),type:"observerResultsUpdated"})})},Ur);function fl(e,t){return te(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function jr(e,t){return fl(e,t)||e.state.data!==void 0&&Mn(e,t,t.refetchOnMount)}function Mn(e,t,n){if(te(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&qn(e,t)}return!1}function Nr(e,t,n,r){return(e!==t||te(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&qn(e,n)}function qn(e,t){return te(t.enabled,e)!==!1&&e.isStaleByTime(St(t.staleTime,e))}function gl(e,t){return!Ft(e.getCurrentResult(),t)}var ge,pe,U,ie,se,wt,On,zr,pl=(zr=class extends Mt{constructor(t,n){super();E(this,se);E(this,ge);E(this,pe);E(this,U);E(this,ie);_(this,ge,t),this.setOptions(n),this.bindMethods(),A(this,se,wt).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const n=this.options;this.options=h(this,ge).defaultMutationOptions(t),Ft(this.options,n)||h(this,ge).getMutationCache().notify({type:"observerOptionsUpdated",mutation:h(this,U),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Er(n.mutationKey)!==Er(this.options.mutationKey)?this.reset():((r=h(this,U))==null?void 0:r.state.status)==="pending"&&h(this,U).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=h(this,U))==null||t.removeObserver(this)}onMutationUpdate(t){A(this,se,wt).call(this),A(this,se,On).call(this,t)}getCurrentResult(){return h(this,pe)}reset(){var t;(t=h(this,U))==null||t.removeObserver(this),_(this,U,void 0),A(this,se,wt).call(this),A(this,se,On).call(this)}mutate(t,n){var r;return _(this,ie,n),(r=h(this,U))==null||r.removeObserver(this),_(this,U,h(this,ge).getMutationCache().build(h(this,ge),this.options)),h(this,U).addObserver(this),h(this,U).execute(t)}},ge=new WeakMap,pe=new WeakMap,U=new WeakMap,ie=new WeakMap,se=new WeakSet,wt=function(){var n;const t=((n=h(this,U))==null?void 0:n.state)??cl();_(this,pe,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},On=function(t){Ot.batch(()=>{var n,r,o,i,s,l,a,c;if(h(this,ie)&&this.hasListeners()){const d=h(this,pe).variables,p=h(this,pe).context;(t==null?void 0:t.type)==="success"?((r=(n=h(this,ie)).onSuccess)==null||r.call(n,t.data,d,p),(i=(o=h(this,ie)).onSettled)==null||i.call(o,t.data,null,d,p)):(t==null?void 0:t.type)==="error"&&((l=(s=h(this,ie)).onError)==null||l.call(s,t.error,d,p),(c=(a=h(this,ie)).onSettled)==null||c.call(a,void 0,t.error,d,p))}this.listeners.forEach(d=>{d(h(this,pe))})})},zr),hl=x.createContext(void 0),jt=e=>{const t=x.useContext(hl);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},xo=x.createContext(!1),ml=()=>x.useContext(xo);xo.Provider;function yl(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var vl=x.createContext(yl()),Sl=()=>x.useContext(vl);function Co(e,t){return typeof e=="function"?e(...t):!!e}function jn(){}var wl=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},xl=e=>{x.useEffect(()=>{e.clearReset()},[e])},Cl=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||Co(n,[e.error,r])),Rl=e=>{const t=e.staleTime;e.suspense&&(e.staleTime=typeof t=="function"?(...n)=>Math.max(t(...n),1e3):Math.max(t??1e3,1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},_l=(e,t)=>e.isLoading&&e.isFetching&&!t,bl=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Dr=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Fl(e,t,n){var p,f,g,m,y;const r=jt(),o=ml(),i=Sl(),s=r.defaultQueryOptions(e);(f=(p=r.getDefaultOptions().queries)==null?void 0:p._experimental_beforeQuery)==null||f.call(p,s),s._optimisticResults=o?"isRestoring":"optimistic",Rl(s),wl(s,i),xl(i);const l=!r.getQueryCache().get(s.queryHash),[a]=x.useState(()=>new t(r,s)),c=a.getOptimisticResult(s),d=!o&&e.subscribed!==!1;if(x.useSyncExternalStore(x.useCallback(v=>{const w=d?a.subscribe(Ot.batchCalls(v)):jn;return a.updateResult(),w},[a,d]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),x.useEffect(()=>{a.setOptions(s,{listeners:!1})},[s,a]),bl(s,c))throw Dr(s,a,i);if(Cl({result:c,errorResetBoundary:i,throwOnError:s.throwOnError,query:r.getQueryCache().get(s.queryHash),suspense:s.suspense}))throw c.error;if((m=(g=r.getDefaultOptions().queries)==null?void 0:g._experimental_afterQuery)==null||m.call(g,s,c),s.experimental_prefetchInRender&&!rt&&_l(c,o)){const v=l?Dr(s,a,i):(y=r.getQueryCache().get(s.queryHash))==null?void 0:y.promise;v==null||v.catch(jn).finally(()=>{a.updateResult()})}return s.notifyOnChangeProps?c:a.trackResult(c)}function Ro(e,t){return Fl(e,dl)}function _o(e,t){const n=jt(),[r]=x.useState(()=>new pl(n,e));x.useEffect(()=>{r.setOptions(e)},[r,e]);const o=x.useSyncExternalStore(x.useCallback(s=>r.subscribe(Ot.batchCalls(s)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=x.useCallback((s,l)=>{r.mutate(s,l).catch(jn)},[r]);if(o.error&&Co(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:i,mutateAsync:o.mutate}}const bo="https://preview.keenthemes.com/theme-api/api",ut=`${bo}/user`,Pl=`${bo}/users/query`,$l=e=>Pe.get(`${Pl}?${e}`).then(t=>t.data),El=e=>Pe.get(`${ut}/${e}`).then(t=>t.data).then(t=>t.data),Il=e=>Pe.put(ut,e).then(t=>t.data).then(t=>t.data),Al=e=>Pe.post(`${ut}/${e.id}`,e).then(t=>t.data).then(t=>t.data),Ml=e=>Pe.delete(`${ut}/${e}`).then(()=>{}),Ol=e=>{const t=e.map(n=>Pe.delete(`${ut}/${n}`));return Pe.all(t).then(()=>{})},Fo=x.createContext(vo),jl=({children:e})=>{const[t,n]=x.useState(vo.state),r=o=>{const i={...t,...o};n(i)};return u.jsx(Fo.Provider,{value:{state:t,updateState:r},children:e})},ct=()=>x.useContext(Fo),Po=Wa(el),Nl=({children:e})=>{const{state:t}=ct(),[n,r]=x.useState(Pr(t)),o=x.useMemo(()=>Pr(t),[t]);x.useEffect(()=>{n!==o&&r(o)},[o]);const{isFetching:i,refetch:s,data:l}=Ro({queryKey:[`${At.USERS_LIST}-${n}`],queryFn:()=>$l(n),refetchOnWindowFocus:!1});return u.jsx(Po.Provider,{value:{isLoading:i,refetch:s,response:l,query:n},children:e})},we=()=>x.useContext(Po),$o=()=>{const{response:e}=we();return e?(e==null?void 0:e.data)||[]:[]},Dl=()=>{const e={links:[],...ye},{response:t}=we();return!t||!t.payload||!t.payload.pagination?e:t.payload.pagination},Eo=()=>{const{isLoading:e}=we();return e},Io=x.createContext(Rn),kl=({children:e})=>{const[t,n]=x.useState(Rn.selected),[r,o]=x.useState(Rn.itemIdForUpdate),{isLoading:i}=we(),s=$o(),l=x.useMemo(()=>Ka(i,s),[i,s]),a=x.useMemo(()=>Ja(s,t),[s,t]);return u.jsx(Io.Provider,{value:{selected:t,itemIdForUpdate:r,setItemIdForUpdate:o,disabled:l,isAllSelected:a,onSelect:c=>{Xa(c,t,n)},onSelectAll:()=>{Ya(a,n,s)},clearSelected:()=>{n([])}},children:e})},ne=()=>x.useContext(Io),Vl=()=>{const{updateState:e}=ct(),{isLoading:t}=we(),[n,r]=x.useState(),[o,i]=x.useState();x.useEffect(()=>{Br.reinitialization()},[]);const s=()=>{e({filter:void 0,...ye})},l=()=>{e({filter:{role:n,last_login:o},...ye})};return u.jsxs(u.Fragment,{children:[u.jsxs("button",{disabled:t,type:"button",className:"btn btn-light-primary me-3","data-kt-menu-trigger":"click","data-kt-menu-placement":"bottom-end",children:[u.jsx(Ge,{iconName:"filter",className:"fs-2"}),"Filter"]}),u.jsxs("div",{className:"menu menu-sub menu-sub-dropdown w-300px w-md-325px","data-kt-menu":"true",children:[u.jsx("div",{className:"px-7 py-5",children:u.jsx("div",{className:"fs-5 text-gray-900 fw-bolder",children:"Filter Options"})}),u.jsx("div",{className:"separator border-gray-200"}),u.jsxs("div",{className:"px-7 py-5","data-kt-user-table-filter":"form",children:[u.jsxs("div",{className:"mb-10",children:[u.jsx("label",{className:"form-label fs-6 fw-bold",children:"Role:"}),u.jsxs("select",{className:"form-select form-select-solid fw-bolder","data-kt-select2":"true","data-placeholder":"Select option","data-allow-clear":"true","data-kt-user-table-filter":"role","data-hide-search":"true",onChange:a=>r(a.target.value),value:n,children:[u.jsx("option",{value:""}),u.jsx("option",{value:"Administrator",children:"Administrator"}),u.jsx("option",{value:"Analyst",children:"Analyst"}),u.jsx("option",{value:"Developer",children:"Developer"}),u.jsx("option",{value:"Support",children:"Support"}),u.jsx("option",{value:"Trial",children:"Trial"})]})]}),u.jsxs("div",{className:"mb-10",children:[u.jsx("label",{className:"form-label fs-6 fw-bold",children:"Last login:"}),u.jsxs("select",{className:"form-select form-select-solid fw-bolder","data-kt-select2":"true","data-placeholder":"Select option","data-allow-clear":"true","data-kt-user-table-filter":"two-step","data-hide-search":"true",onChange:a=>i(a.target.value),value:o,children:[u.jsx("option",{value:""}),u.jsx("option",{value:"Yesterday",children:"Yesterday"}),u.jsx("option",{value:"20 mins ago",children:"20 mins ago"}),u.jsx("option",{value:"5 hours ago",children:"5 hours ago"}),u.jsx("option",{value:"2 days ago",children:"2 days ago"})]})]}),u.jsxs("div",{className:"d-flex justify-content-end",children:[u.jsx("button",{type:"button",disabled:t,onClick:l,className:"btn btn-light btn-active-light-primary fw-bold me-2 px-6","data-kt-menu-dismiss":"true","data-kt-user-table-filter":"reset",children:"Reset"}),u.jsx("button",{disabled:t,type:"button",onClick:s,className:"btn btn-primary fw-bold px-6","data-kt-menu-dismiss":"true","data-kt-user-table-filter":"filter",children:"Apply"})]})]})]})]})},Ll=()=>{const{setItemIdForUpdate:e}=ne(),t=()=>{e(null)};return u.jsxs("div",{className:"d-flex justify-content-end","data-kt-user-table-toolbar":"base",children:[u.jsx(Vl,{}),u.jsxs("button",{type:"button",className:"btn btn-light-primary me-3",children:[u.jsx(Ge,{iconName:"exit-up",className:"fs-2"}),"Export"]}),u.jsxs("button",{type:"button",className:"btn btn-primary",onClick:t,children:[u.jsx(Ge,{iconName:"plus",className:"fs-2"}),"Add User"]})]})},Tl=()=>{const{selected:e,clearSelected:t}=ne(),n=jt(),{query:r}=we(),o=_o({mutationFn:()=>Ol(e),onSuccess:()=>{n.invalidateQueries({queryKey:[`${At.USERS_LIST}-${r}`]}),t()}});return u.jsxs("div",{className:"d-flex justify-content-end align-items-center",children:[u.jsxs("div",{className:"fw-bolder me-5",children:[u.jsx("span",{className:"me-2",children:e.length})," Selected"]}),u.jsx("button",{type:"button",className:"btn btn-danger",onClick:async()=>await o.mutateAsync(),children:"Delete Selected"})]})},Gl=()=>{const{updateState:e}=ct(),[t,n]=x.useState(""),r=Za(t,150);return x.useEffect(()=>{r!==void 0&&t!==void 0&&e({search:r,...ye})},[r]),u.jsx("div",{className:"card-title",children:u.jsxs("div",{className:"d-flex align-items-center position-relative my-1",children:[u.jsx(Ge,{iconName:"magnifier",className:"fs-1 position-absolute ms-6"}),u.jsx("input",{type:"text","data-kt-user-table-filter":"search",className:"form-control form-control-solid w-250px ps-14",placeholder:"Search user",value:t,onChange:o=>n(o.target.value)})]})})},Hl=()=>{const{selected:e}=ne();return u.jsxs("div",{className:"card-header border-0 pt-6",children:[u.jsx(Gl,{}),u.jsx("div",{className:"card-toolbar",children:e.length>0?u.jsx(Tl,{}):u.jsx(Ll,{})})]})};/** * table-core * * Copyright (c) TanStack * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function me(e,t){return typeof e=="function"?e(t):e}function z(e,t){return n=>{t.setState(r=>({...r,[e]:me(n,r[e])}))}}function Nt(e){return e instanceof Function}function Ul(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function zl(e,t){const n=[],r=o=>{o.forEach(i=>{n.push(i);const s=t(i);s!=null&&s.length&&r(s)})};return r(e),n}function C(e,t,n){let r=[],o;return i=>{let s;n.key&&n.debug&&(s=Date.now());const l=e(i);if(!(l.length!==r.length||l.some((d,p)=>r[p]!==d)))return o;r=l;let c;if(n.key&&n.debug&&(c=Date.now()),o=t(...l),n==null||n.onChange==null||n.onChange(o),n.key&&n.debug&&n!=null&&n.debug()){const d=Math.round((Date.now()-s)*100)/100,p=Math.round((Date.now()-c)*100)/100,f=p/16,g=(m,y)=>{for(m=String(m);m.length<y;)m=" "+m;return m};console.info(`%c⏱ ${g(p,5)} /${g(d,5)} ms`,` font-size: .6rem; font-weight: bold; color: hsl(${Math.max(0,Math.min(120-120*f,120))}deg 100% 31%);`,n==null?void 0:n.key)}return o}}function R(e,t,n,r){return{debug:()=>{var o;return(o=e==null?void 0:e.debugAll)!=null?o:e[t]},key:!1,onChange:r}}function Bl(e,t,n,r){const o=()=>{var s;return(s=i.getValue())!=null?s:e.options.renderFallbackValue},i={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:o,getContext:C(()=>[e,n,t,i],(s,l,a,c)=>({table:s,column:l,row:a,cell:c,getValue:c.getValue,renderValue:c.renderValue}),R(e.options,"debugCells"))};return e._features.forEach(s=>{s.createCell==null||s.createCell(i,n,t,e)},{}),i}function ql(e,t,n,r){var o,i;const l={...e._getDefaultColumnDef(),...t},a=l.accessorKey;let c=(o=(i=l.id)!=null?i:a?typeof String.prototype.replaceAll=="function"?a.replaceAll(".","_"):a.replace(/\./g,"_"):void 0)!=null?o:typeof l.header=="string"?l.header:void 0,d;if(l.accessorFn?d=l.accessorFn:a&&(a.includes(".")?d=f=>{let g=f;for(const y of a.split(".")){var m;g=(m=g)==null?void 0:m[y]}return g}:d=f=>f[l.accessorKey]),!c)throw new Error;let p={id:`${String(c)}`,accessorFn:d,parent:r,depth:n,columnDef:l,columns:[],getFlatColumns:C(()=>[!0],()=>{var f;return[p,...(f=p.columns)==null?void 0:f.flatMap(g=>g.getFlatColumns())]},R(e.options,"debugColumns")),getLeafColumns:C(()=>[e._getOrderColumnsFn()],f=>{var g;if((g=p.columns)!=null&&g.length){let m=p.columns.flatMap(y=>y.getLeafColumns());return f(m)}return[p]},R(e.options,"debugColumns"))};for(const f of e._features)f.createColumn==null||f.createColumn(p,e);return p}const L="debugHeaders";function kr(e,t,n){var r;let i={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const s=[],l=a=>{a.subHeaders&&a.subHeaders.length&&a.subHeaders.map(l),s.push(a)};return l(i),s},getContext:()=>({table:e,header:i,column:t})};return e._features.forEach(s=>{s.createHeader==null||s.createHeader(i,e)}),i}const Ql={createTable:e=>{e.getHeaderGroups=C(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>{var i,s;const l=(i=r==null?void 0:r.map(p=>n.find(f=>f.id===p)).filter(Boolean))!=null?i:[],a=(s=o==null?void 0:o.map(p=>n.find(f=>f.id===p)).filter(Boolean))!=null?s:[],c=n.filter(p=>!(r!=null&&r.includes(p.id))&&!(o!=null&&o.includes(p.id)));return gt(t,[...l,...c,...a],e)},R(e.options,L)),e.getCenterHeaderGroups=C(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>(n=n.filter(i=>!(r!=null&&r.includes(i.id))&&!(o!=null&&o.includes(i.id))),gt(t,n,e,"center")),R(e.options,L)),e.getLeftHeaderGroups=C(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var o;const i=(o=r==null?void 0:r.map(s=>n.find(l=>l.id===s)).filter(Boolean))!=null?o:[];return gt(t,i,e,"left")},R(e.options,L)),e.getRightHeaderGroups=C(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var o;const i=(o=r==null?void 0:r.map(s=>n.find(l=>l.id===s)).filter(Boolean))!=null?o:[];return gt(t,i,e,"right")},R(e.options,L)),e.getFooterGroups=C(()=>[e.getHeaderGroups()],t=>[...t].reverse(),R(e.options,L)),e.getLeftFooterGroups=C(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),R(e.options,L)),e.getCenterFooterGroups=C(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),R(e.options,L)),e.getRightFooterGroups=C(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),R(e.options,L)),e.getFlatHeaders=C(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),R(e.options,L)),e.getLeftFlatHeaders=C(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),R(e.options,L)),e.getCenterFlatHeaders=C(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),R(e.options,L)),e.getRightFlatHeaders=C(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),R(e.options,L)),e.getCenterLeafHeaders=C(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),R(e.options,L)),e.getLeftLeafHeaders=C(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),R(e.options,L)),e.getRightLeafHeaders=C(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),R(e.options,L)),e.getLeafHeaders=C(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var o,i,s,l,a,c;return[...(o=(i=t[0])==null?void 0:i.headers)!=null?o:[],...(s=(l=n[0])==null?void 0:l.headers)!=null?s:[],...(a=(c=r[0])==null?void 0:c.headers)!=null?a:[]].map(d=>d.getLeafHeaders()).flat()},R(e.options,L))}};function gt(e,t,n,r){var o,i;let s=0;const l=function(f,g){g===void 0&&(g=1),s=Math.max(s,g),f.filter(m=>m.getIsVisible()).forEach(m=>{var y;(y=m.columns)!=null&&y.length&&l(m.columns,g+1)},0)};l(e);let a=[];const c=(f,g)=>{const m={depth:g,id:[r,`${g}`].filter(Boolean).join("_"),headers:[]},y=[];f.forEach(v=>{const w=[...y].reverse()[0],$=v.column.depth===m.depth;let S,O=!1;if($&&v.column.parent?S=v.column.parent:(S=v.column,O=!0),w&&(w==null?void 0:w.column)===S)w.subHeaders.push(v);else{const D=kr(n,S,{id:[r,g,S.id,v==null?void 0:v.id].filter(Boolean).join("_"),isPlaceholder:O,placeholderId:O?`${y.filter(K=>K.column===S).length}`:void 0,depth:g,index:y.length});D.subHeaders.push(v),y.push(D)}m.headers.push(v),v.headerGroup=m}),a.push(m),g>0&&c(y,g-1)},d=t.map((f,g)=>kr(n,f,{depth:s,index:g}));c(d,s-1),a.reverse();const p=f=>f.filter(m=>m.column.getIsVisible()).map(m=>{let y=0,v=0,w=[0];m.subHeaders&&m.subHeaders.length?(w=[],p(m.subHeaders).forEach(S=>{let{colSpan:O,rowSpan:D}=S;y+=O,w.push(D)})):y=1;const $=Math.min(...w);return v=v+$,m.colSpan=y,m.rowSpan=v,{colSpan:y,rowSpan:v}});return p((o=(i=a[0])==null?void 0:i.headers)!=null?o:[]),a}const Wl=(e,t,n,r,o,i,s)=>{let l={id:t,index:r,original:n,depth:o,parentId:s,_valuesCache:{},_uniqueValuesCache:{},getValue:a=>{if(l._valuesCache.hasOwnProperty(a))return l._valuesCache[a];const c=e.getColumn(a);if(c!=null&&c.accessorFn)return l._valuesCache[a]=c.accessorFn(l.original,r),l._valuesCache[a]},getUniqueValues:a=>{if(l._uniqueValuesCache.hasOwnProperty(a))return l._uniqueValuesCache[a];const c=e.getColumn(a);if(c!=null&&c.accessorFn)return c.columnDef.getUniqueValues?(l._uniqueValuesCache[a]=c.columnDef.getUniqueValues(l.original,r),l._uniqueValuesCache[a]):(l._uniqueValuesCache[a]=[l.getValue(a)],l._uniqueValuesCache[a])},renderValue:a=>{var c;return(c=l.getValue(a))!=null?c:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>zl(l.subRows,a=>a.subRows),getParentRow:()=>l.parentId?e.getRow(l.parentId,!0):void 0,getParentRows:()=>{let a=[],c=l;for(;;){const d=c.getParentRow();if(!d)break;a.push(d),c=d}return a.reverse()},getAllCells:C(()=>[e.getAllLeafColumns()],a=>a.map(c=>Bl(e,l,c,c.id)),R(e.options,"debugRows")),_getAllCellsByColumnId:C(()=>[l.getAllCells()],a=>a.reduce((c,d)=>(c[d.column.id]=d,c),{}),R(e.options,"debugRows"))};for(let a=0;a<e._features.length;a++){const c=e._features[a];c==null||c.createRow==null||c.createRow(l,e)}return l},Kl={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},Ao=(e,t,n)=>{var r,o;const i=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((o=e.getValue(t))==null||(o=o.toString())==null||(o=o.toLowerCase())==null)&&o.includes(i))};Ao.autoRemove=e=>W(e);const Mo=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};Mo.autoRemove=e=>W(e);const Oo=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===(n==null?void 0:n.toLowerCase())};Oo.autoRemove=e=>W(e);const jo=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};jo.autoRemove=e=>W(e);const No=(e,t,n)=>!n.some(r=>{var o;return!((o=e.getValue(t))!=null&&o.includes(r))});No.autoRemove=e=>W(e)||!(e!=null&&e.length);const Do=(e,t,n)=>n.some(r=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(r)});Do.autoRemove=e=>W(e)||!(e!=null&&e.length);const ko=(e,t,n)=>e.getValue(t)===n;ko.autoRemove=e=>W(e);const Vo=(e,t,n)=>e.getValue(t)==n;Vo.autoRemove=e=>W(e);const Qn=(e,t,n)=>{let[r,o]=n;const i=e.getValue(t);return i>=r&&i<=o};Qn.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,o=typeof n!="number"?parseFloat(n):n,i=t===null||Number.isNaN(r)?-1/0:r,s=n===null||Number.isNaN(o)?1/0:o;if(i>s){const l=i;i=s,s=l}return[i,s]};Qn.autoRemove=e=>W(e)||W(e[0])&&W(e[1]);const oe={includesString:Ao,includesStringSensitive:Mo,equalsString:Oo,arrIncludes:jo,arrIncludesAll:No,arrIncludesSome:Do,equals:ko,weakEquals:Vo,inNumberRange:Qn};function W(e){return e==null||e===""}const Jl={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:z("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);return typeof r=="string"?oe.includesString:typeof r=="number"?oe.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?oe.equals:Array.isArray(r)?oe.arrIncludes:oe.weakEquals},e.getFilterFn=()=>{var n,r;return Nt(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:oe[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,o;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const o=e.getFilterFn(),i=r==null?void 0:r.find(d=>d.id===e.id),s=me(n,i?i.value:void 0);if(Vr(o,s,e)){var l;return(l=r==null?void 0:r.filter(d=>d.id!==e.id))!=null?l:[]}const a={id:e.id,value:s};if(i){var c;return(c=r==null?void 0:r.map(d=>d.id===e.id?a:d))!=null?c:[]}return r!=null&&r.length?[...r,a]:[a]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=o=>{var i;return(i=me(t,o))==null?void 0:i.filter(s=>{const l=n.find(a=>a.id===s.id);if(l){const a=l.getFilterFn();if(Vr(a,s.value,l))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},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 Vr(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const Xl=(e,t,n)=>n.reduce((r,o)=>{const i=o.getValue(e);return r+(typeof i=="number"?i:0)},0),Yl=(e,t,n)=>{let r;return n.forEach(o=>{const i=o.getValue(e);i!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}),r},Zl=(e,t,n)=>{let r;return n.forEach(o=>{const i=o.getValue(e);i!=null&&(r<i||r===void 0&&i>=i)&&(r=i)}),r},eu=(e,t,n)=>{let r,o;return n.forEach(i=>{const s=i.getValue(e);s!=null&&(r===void 0?s>=s&&(r=o=s):(r>s&&(r=s),o<s&&(o=s)))}),[r,o]},tu=(e,t)=>{let n=0,r=0;if(t.forEach(o=>{let i=o.getValue(e);i!=null&&(i=+i)>=i&&(++n,r+=i)}),n)return r/n},nu=(e,t)=>{if(!t.length)return;const n=t.map(i=>i.getValue(e));if(!Ul(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),o=n.sort((i,s)=>i-s);return n.length%2!==0?o[r]:(o[r-1]+o[r])/2},ru=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),ou=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,iu=(e,t)=>t.length,un={sum:Xl,min:Yl,max:Zl,extent:eu,mean:tu,median:nu,unique:ru,uniqueCount:ou,count:iu},su={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:z("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);if(typeof r=="number")return un.sum;if(Object.prototype.toString.call(r)==="[object Date]")return un.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return Nt(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:un[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},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,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var o;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((o=n.subRows)!=null&&o.length)}}};function au(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(i=>!t.includes(i.id));return n==="remove"?r:[...t.map(i=>e.find(s=>s.id===i)).filter(Boolean),...r]}const lu={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:z("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=C(n=>[tt(t,n)],n=>n.findIndex(r=>r.id===e.id),R(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return((r=tt(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const o=tt(t,n);return((r=o[o.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=C(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>o=>{let i=[];if(!(t!=null&&t.length))i=o;else{const s=[...t],l=[...o];for(;l.length&&s.length;){const a=s.shift(),c=l.findIndex(d=>d.id===a);c>-1&&i.push(l.splice(c,1)[0])}i=[...i,...l]}return au(i,n,r)},R(e.options,"debugTable"))}},cn=()=>({left:[],right:[]}),uu={getInitialState:e=>({columnPinning:cn(),...e}),getDefaultOptions:e=>({onColumnPinningChange:z("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(o=>o.id).filter(Boolean);t.setColumnPinning(o=>{var i,s;if(n==="right"){var l,a;return{left:((l=o==null?void 0:o.left)!=null?l:[]).filter(p=>!(r!=null&&r.includes(p))),right:[...((a=o==null?void 0:o.right)!=null?a:[]).filter(p=>!(r!=null&&r.includes(p))),...r]}}if(n==="left"){var c,d;return{left:[...((c=o==null?void 0:o.left)!=null?c:[]).filter(p=>!(r!=null&&r.includes(p))),...r],right:((d=o==null?void 0:o.right)!=null?d:[]).filter(p=>!(r!=null&&r.includes(p)))}}return{left:((i=o==null?void 0:o.left)!=null?i:[]).filter(p=>!(r!=null&&r.includes(p))),right:((s=o==null?void 0:o.right)!=null?s:[]).filter(p=>!(r!=null&&r.includes(p)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var o,i,s;return((o=r.columnDef.enablePinning)!=null?o:!0)&&((i=(s=t.options.enableColumnPinning)!=null?s:t.options.enablePinning)!=null?i:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(l=>l.id),{left:r,right:o}=t.getState().columnPinning,i=n.some(l=>r==null?void 0:r.includes(l)),s=n.some(l=>o==null?void 0:o.includes(l));return i?"left":s?"right":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();return o?(n=(r=t.getState().columnPinning)==null||(r=r[o])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=C(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,o)=>{const i=[...r??[],...o??[]];return n.filter(s=>!i.includes(s.column.id))},R(t.options,"debugRows")),e.getLeftVisibleCells=C(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(i=>n.find(s=>s.column.id===i)).filter(Boolean).map(i=>({...i,position:"left"})),R(t.options,"debugRows")),e.getRightVisibleCells=C(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(i=>n.find(s=>s.column.id===i)).filter(Boolean).map(i=>({...i,position:"right"})),R(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?cn():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:cn())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var o,i;return!!((o=r.left)!=null&&o.length||(i=r.right)!=null&&i.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=C(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),R(e.options,"debugColumns")),e.getRightLeafColumns=C(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),R(e.options,"debugColumns")),e.getCenterLeafColumns=C(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const o=[...n??[],...r??[]];return t.filter(i=>!o.includes(i.id))},R(e.options,"debugColumns"))}},pt={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},dn=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),cu={getDefaultColumnDef:()=>pt,getInitialState:e=>({columnSizing:{},columnSizingInfo:dn(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:z("columnSizing",e),onColumnSizingInfoChange:z("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,o;const i=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:pt.minSize,(r=i??e.columnDef.size)!=null?r:pt.size),(o=e.columnDef.maxSize)!=null?o:pt.maxSize)},e.getStart=C(n=>[n,tt(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((o,i)=>o+i.getSize(),0),R(t.options,"debugColumns")),e.getAfter=C(n=>[n,tt(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((o,i)=>o+i.getSize(),0),R(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...o}=n;return o})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=o=>{if(o.subHeaders.length)o.subHeaders.forEach(r);else{var i;n+=(i=o.column.getSize())!=null?i:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),o=r==null?void 0:r.getCanResize();return i=>{if(!r||!o||(i.persist==null||i.persist(),fn(i)&&i.touches&&i.touches.length>1))return;const s=e.getSize(),l=e?e.getLeafHeaders().map(w=>[w.column.id,w.column.getSize()]):[[r.id,r.getSize()]],a=fn(i)?Math.round(i.touches[0].clientX):i.clientX,c={},d=(w,$)=>{typeof $=="number"&&(t.setColumnSizingInfo(S=>{var O,D;const K=t.options.columnResizeDirection==="rtl"?-1:1,j=($-((O=S==null?void 0:S.startOffset)!=null?O:0))*K,J=Math.max(j/((D=S==null?void 0:S.startSize)!=null?D:0),-.999999);return S.columnSizingStart.forEach(I=>{let[V,G]=I;c[V]=Math.round(Math.max(G+G*J,0)*100)/100}),{...S,deltaOffset:j,deltaPercentage:J}}),(t.options.columnResizeMode==="onChange"||w==="end")&&t.setColumnSizing(S=>({...S,...c})))},p=w=>d("move",w),f=w=>{d("end",w),t.setColumnSizingInfo($=>({...$,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},g=n||typeof document<"u"?document:null,m={moveHandler:w=>p(w.clientX),upHandler:w=>{g==null||g.removeEventListener("mousemove",m.moveHandler),g==null||g.removeEventListener("mouseup",m.upHandler),f(w.clientX)}},y={moveHandler:w=>(w.cancelable&&(w.preventDefault(),w.stopPropagation()),p(w.touches[0].clientX),!1),upHandler:w=>{var $;g==null||g.removeEventListener("touchmove",y.moveHandler),g==null||g.removeEventListener("touchend",y.upHandler),w.cancelable&&(w.preventDefault(),w.stopPropagation()),f(($=w.touches[0])==null?void 0:$.clientX)}},v=du()?{passive:!1}:!1;fn(i)?(g==null||g.addEventListener("touchmove",y.moveHandler,v),g==null||g.addEventListener("touchend",y.upHandler,v)):(g==null||g.addEventListener("mousemove",m.moveHandler,v),g==null||g.addEventListener("mouseup",m.upHandler,v)),t.setColumnSizingInfo(w=>({...w,startOffset:a,startSize:s,deltaOffset:0,deltaPercentage:0,columnSizingStart:l,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?dn():(n=e.initialState.columnSizingInfo)!=null?n:dn())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0}}};let ht=null;function du(){if(typeof ht=="boolean")return ht;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return ht=e,ht}function fn(e){return e.type==="touchstart"}const fu={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:z("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const o=e.columns;return(n=o.length?o.some(i=>i.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=C(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),R(t.options,"debugRows")),e.getVisibleCells=C(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,o)=>[...n,...r,...o],R(t.options,"debugRows"))},createTable:e=>{const t=(n,r)=>C(()=>[r(),r().filter(o=>o.getIsVisible()).map(o=>o.id).join("_")],o=>o.filter(i=>i.getIsVisible==null?void 0:i.getIsVisible()),R(e.options,"debugColumns"));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((o,i)=>({...o,[i.id]:n||!(i.getCanHide!=null&&i.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function tt(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const gu={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()}}},pu={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:z("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,o,i;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&((i=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?i:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>oe.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return Nt(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:oe[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},hu={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:z("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!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,i;e.setExpanded(r?{}:(o=(i=e.initialState)==null?void 0:i.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(i=>{const s=i.split(".");r=Math.max(r,s.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,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var o;const i=r===!0?!0:!!(r!=null&&r[e.id]);let s={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(l=>{s[l]=!0}):s=r,n=(o=n)!=null?o:!i,!i&&n)return{...s,[e.id]:!0};if(i&&!n){const{[e.id]:l,...a}=s;return a}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r!=null&&r[e.id])},e.getCanExpand=()=>{var n,r,o;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((o=e.subRows)!=null&&o.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},Nn=0,Dn=10,gn=()=>({pageIndex:Nn,pageSize:Dn}),mu={getInitialState:e=>({...e,pagination:{...gn(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:z("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const o=i=>me(r,i);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(o)},e.resetPagination=r=>{var o;e.setPagination(r?gn():(o=e.initialState.pagination)!=null?o:gn())},e.setPageIndex=r=>{e.setPagination(o=>{let i=me(r,o.pageIndex);const s=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return i=Math.max(0,Math.min(i,s)),{...o,pageIndex:i}})},e.resetPageIndex=r=>{var o,i;e.setPageIndex(r?Nn:(o=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageIndex)!=null?o:Nn)},e.resetPageSize=r=>{var o,i;e.setPageSize(r?Dn:(o=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageSize)!=null?o:Dn)},e.setPageSize=r=>{e.setPagination(o=>{const i=Math.max(1,me(r,o.pageSize)),s=o.pageSize*o.pageIndex,l=Math.floor(s/i);return{...o,pageIndex:l,pageSize:i}})},e.setPageCount=r=>e.setPagination(o=>{var i;let s=me(r,(i=e.options.pageCount)!=null?i:-1);return typeof s=="number"&&(s=Math.max(-1,s)),{...o,pageCount:s}}),e.getPageOptions=C(()=>[e.getPageCount()],r=>{let o=[];return r&&r>0&&(o=[...new Array(r)].fill(null).map((i,s)=>s)),o},R(e.options,"debugTable")),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}}},pn=()=>({top:[],bottom:[]}),yu={getInitialState:e=>({rowPinning:pn(),...e}),getDefaultOptions:e=>({onRowPinningChange:z("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,o)=>{const i=r?e.getLeafRows().map(a=>{let{id:c}=a;return c}):[],s=o?e.getParentRows().map(a=>{let{id:c}=a;return c}):[],l=new Set([...s,e.id,...i]);t.setRowPinning(a=>{var c,d;if(n==="bottom"){var p,f;return{top:((p=a==null?void 0:a.top)!=null?p:[]).filter(y=>!(l!=null&&l.has(y))),bottom:[...((f=a==null?void 0:a.bottom)!=null?f:[]).filter(y=>!(l!=null&&l.has(y))),...Array.from(l)]}}if(n==="top"){var g,m;return{top:[...((g=a==null?void 0:a.top)!=null?g:[]).filter(y=>!(l!=null&&l.has(y))),...Array.from(l)],bottom:((m=a==null?void 0:a.bottom)!=null?m:[]).filter(y=>!(l!=null&&l.has(y)))}}return{top:((c=a==null?void 0:a.top)!=null?c:[]).filter(y=>!(l!=null&&l.has(y))),bottom:((d=a==null?void 0:a.bottom)!=null?d:[]).filter(y=>!(l!=null&&l.has(y)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:o}=t.options;return typeof r=="function"?r(e):(n=r??o)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:o}=t.getState().rowPinning,i=n.some(l=>r==null?void 0:r.includes(l)),s=n.some(l=>o==null?void 0:o.includes(l));return i?"top":s?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();if(!o)return-1;const i=(n=o==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(s=>{let{id:l}=s;return l});return(r=i==null?void 0:i.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?pn():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:pn())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var o,i;return!!((o=r.top)!=null&&o.length||(i=r.bottom)!=null&&i.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var o;return((o=e.options.keepPinnedRows)==null||o?(n??[]).map(s=>{const l=e.getRow(s,!0);return l.getIsAllParentsExpanded()?l:null}):(n??[]).map(s=>t.find(l=>l.id===s))).filter(Boolean).map(s=>({...s,position:r}))},e.getTopRows=C(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),R(e.options,"debugRows")),e.getBottomRows=C(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),R(e.options,"debugRows")),e.getCenterRows=C(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const o=new Set([...n??[],...r??[]]);return t.filter(i=>!o.has(i.id))},R(e.options,"debugRows"))}},vu={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:z("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},o=e.getPreGroupedRowModel().flatRows;return t?o.forEach(i=>{i.getCanSelect()&&(r[i.id]=!0)}):o.forEach(i=>{delete r[i.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),o={...n};return e.getRowModel().rows.forEach(i=>{kn(o,i.id,r,!0,e)}),o}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=C(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?hn(e,n):{rows:[],flatRows:[],rowsById:{}},R(e.options,"debugTable")),e.getFilteredSelectedRowModel=C(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?hn(e,n):{rows:[],flatRows:[],rowsById:{}},R(e.options,"debugTable")),e.getGroupedSelectedRowModel=C(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?hn(e,n):{rows:[],flatRows:[],rowsById:{}},R(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(o=>o.getCanSelect()&&!n[o.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(o=>o.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(o=>!n[o.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const o=e.getIsSelected();t.setRowSelection(i=>{var s;if(n=typeof n<"u"?n:!o,e.getCanSelect()&&o===n)return i;const l={...i};return kn(l,e.id,n,(s=r==null?void 0:r.selectChildren)!=null?s:!0,t),l})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return Wn(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return Vn(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return Vn(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var o;n&&e.toggleSelected((o=r.target)==null?void 0:o.checked)}}}},kn=(e,t,n,r,o)=>{var i;const s=o.getRow(t,!0);n?(s.getCanMultiSelect()||Object.keys(e).forEach(l=>delete e[l]),s.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(i=s.subRows)!=null&&i.length&&s.getCanSelectSubRows()&&s.subRows.forEach(l=>kn(e,l.id,n,r,o))};function hn(e,t){const n=e.getState().rowSelection,r=[],o={},i=function(s,l){return s.map(a=>{var c;const d=Wn(a,n);if(d&&(r.push(a),o[a.id]=a),(c=a.subRows)!=null&&c.length&&(a={...a,subRows:i(a.subRows)}),d)return a}).filter(Boolean)};return{rows:i(t.rows),flatRows:r,rowsById:o}}function Wn(e,t){var n;return(n=t[e.id])!=null?n:!1}function Vn(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let o=!0,i=!1;return e.subRows.forEach(s=>{if(!(i&&!o)&&(s.getCanSelect()&&(Wn(s,t)?i=!0:o=!1),s.subRows&&s.subRows.length)){const l=Vn(s,t);l==="all"?i=!0:(l==="some"&&(i=!0),o=!1)}}),o?"all":i?"some":!1}const Ln=/([0-9]+)/gm,Su=(e,t,n)=>Lo(ve(e.getValue(n)).toLowerCase(),ve(t.getValue(n)).toLowerCase()),wu=(e,t,n)=>Lo(ve(e.getValue(n)),ve(t.getValue(n))),xu=(e,t,n)=>Kn(ve(e.getValue(n)).toLowerCase(),ve(t.getValue(n)).toLowerCase()),Cu=(e,t,n)=>Kn(ve(e.getValue(n)),ve(t.getValue(n))),Ru=(e,t,n)=>{const r=e.getValue(n),o=t.getValue(n);return r>o?1:r<o?-1:0},_u=(e,t,n)=>Kn(e.getValue(n),t.getValue(n));function Kn(e,t){return e===t?0:e>t?1:-1}function ve(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function Lo(e,t){const n=e.split(Ln).filter(Boolean),r=t.split(Ln).filter(Boolean);for(;n.length&&r.length;){const o=n.shift(),i=r.shift(),s=parseInt(o,10),l=parseInt(i,10),a=[s,l].sort();if(isNaN(a[0])){if(o>i)return 1;if(i>o)return-1;continue}if(isNaN(a[1]))return isNaN(s)?-1:1;if(s>l)return 1;if(l>s)return-1}return n.length-r.length}const We={alphanumeric:Su,alphanumericCaseSensitive:wu,text:xu,textCaseSensitive:Cu,datetime:Ru,basic:_u},bu={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:z("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const o of n){const i=o==null?void 0:o.getValue(e.id);if(Object.prototype.toString.call(i)==="[object Date]")return We.datetime;if(typeof i=="string"&&(r=!0,i.split(Ln).length>1))return We.alphanumeric}return r?We.text:We.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return Nt(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:We[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const o=e.getNextSortingOrder(),i=typeof n<"u"&&n!==null;t.setSorting(s=>{const l=s==null?void 0:s.find(g=>g.id===e.id),a=s==null?void 0:s.findIndex(g=>g.id===e.id);let c=[],d,p=i?n:o==="desc";if(s!=null&&s.length&&e.getCanMultiSort()&&r?l?d="toggle":d="add":s!=null&&s.length&&a!==s.length-1?d="replace":l?d="toggle":d="replace",d==="toggle"&&(i||o||(d="remove")),d==="add"){var f;c=[...s,{id:e.id,desc:p}],c.splice(0,c.length-((f=t.options.maxMultiSortColCount)!=null?f:Number.MAX_SAFE_INTEGER))}else d==="toggle"?c=s.map(g=>g.id===e.id?{...g,desc:p}:g):d==="remove"?c=s.filter(g=>g.id!==e.id):c=[{id:e.id,desc:p}];return c})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,o;const i=e.getFirstSortDir(),s=e.getIsSorted();return s?s!==i&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(o=t.options.enableMultiRemove)!=null)||o)?!1:s==="desc"?"asc":"desc":i},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(o=>o.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},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())}},Fu=[Ql,fu,lu,uu,Kl,Jl,gu,pu,bu,su,hu,mu,yu,vu,cu];function Pu(e){var t,n;const r=[...Fu,...(t=e._features)!=null?t:[]];let o={_features:r};const i=o._features.reduce((f,g)=>Object.assign(f,g.getDefaultOptions==null?void 0:g.getDefaultOptions(o)),{}),s=f=>o.options.mergeOptions?o.options.mergeOptions(i,f):{...i,...f};let a={...{},...(n=e.initialState)!=null?n:{}};o._features.forEach(f=>{var g;a=(g=f.getInitialState==null?void 0:f.getInitialState(a))!=null?g:a});const c=[];let d=!1;const p={_features:r,options:{...i,...e},initialState:a,_queue:f=>{c.push(f),d||(d=!0,Promise.resolve().then(()=>{for(;c.length;)c.shift()();d=!1}).catch(g=>setTimeout(()=>{throw g})))},reset:()=>{o.setState(o.initialState)},setOptions:f=>{const g=me(f,o.options);o.options=s(g)},getState:()=>o.options.state,setState:f=>{o.options.onStateChange==null||o.options.onStateChange(f)},_getRowId:(f,g,m)=>{var y;return(y=o.options.getRowId==null?void 0:o.options.getRowId(f,g,m))!=null?y:`${m?[m.id,g].join("."):g}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(f,g)=>{let m=(g?o.getPrePaginationRowModel():o.getRowModel()).rowsById[f];if(!m&&(m=o.getCoreRowModel().rowsById[f],!m))throw new Error;return m},_getDefaultColumnDef:C(()=>[o.options.defaultColumn],f=>{var g;return f=(g=f)!=null?g:{},{header:m=>{const y=m.header.column.columnDef;return y.accessorKey?y.accessorKey:y.accessorFn?y.id:null},cell:m=>{var y,v;return(y=(v=m.renderValue())==null||v.toString==null?void 0:v.toString())!=null?y:null},...o._features.reduce((m,y)=>Object.assign(m,y.getDefaultColumnDef==null?void 0:y.getDefaultColumnDef()),{}),...f}},R(e,"debugColumns")),_getColumnDefs:()=>o.options.columns,getAllColumns:C(()=>[o._getColumnDefs()],f=>{const g=function(m,y,v){return v===void 0&&(v=0),m.map(w=>{const $=ql(o,w,v,y),S=w;return $.columns=S.columns?g(S.columns,$,v+1):[],$})};return g(f)},R(e,"debugColumns")),getAllFlatColumns:C(()=>[o.getAllColumns()],f=>f.flatMap(g=>g.getFlatColumns()),R(e,"debugColumns")),_getAllFlatColumnsById:C(()=>[o.getAllFlatColumns()],f=>f.reduce((g,m)=>(g[m.id]=m,g),{}),R(e,"debugColumns")),getAllLeafColumns:C(()=>[o.getAllColumns(),o._getOrderColumnsFn()],(f,g)=>{let m=f.flatMap(y=>y.getLeafColumns());return g(m)},R(e,"debugColumns")),getColumn:f=>o._getAllFlatColumnsById()[f]};Object.assign(o,p);for(let f=0;f<o._features.length;f++){const g=o._features[f];g==null||g.createTable==null||g.createTable(o)}return o}function $u(){return e=>C(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(o,i,s){i===void 0&&(i=0);const l=[];for(let c=0;c<o.length;c++){const d=Wl(e,e._getRowId(o[c],c,s),o[c],c,i,void 0,s==null?void 0:s.id);if(n.flatRows.push(d),n.rowsById[d.id]=d,l.push(d),e.options.getSubRows){var a;d.originalSubRows=e.options.getSubRows(o[c],c),(a=d.originalSubRows)!=null&&a.length&&(d.subRows=r(d.originalSubRows,i+1,d))}}return l};return n.rows=r(t),n},R(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}/** * react-table * * Copyright (c) TanStack * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function To(e,t){return e?Eu(e)?x.createElement(e,t):e:null}function Eu(e){return Iu(e)||typeof e=="function"||Au(e)}function Iu(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function Au(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function Mu(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=x.useState(()=>({current:Pu(t)})),[r,o]=x.useState(()=>n.current.initialState);return n.current.setOptions(i=>({...i,...e,state:{...r,...e.state},onStateChange:s=>{o(s),e.onStateChange==null||e.onStateChange(s)}})),n.current}const Ou=({header:e})=>To(e.column.columnDef.header,e.getContext()),ju=({row:e})=>u.jsx("tr",{children:e.getVisibleCells().map(t=>u.jsx("td",{className:Q({"text-end min-w-100px":t.column.id==="actions"}),children:To(t.column.columnDef.cell,t.getContext())},t.id))}),Nu=({user:e})=>{var t,n,r;return u.jsxs("div",{className:"d-flex align-items-center",children:[u.jsx("div",{className:"symbol symbol-circle symbol-50px overflow-hidden me-3",children:u.jsx("a",{href:"#",children:e.avatar?u.jsx("div",{className:"symbol-label",children:u.jsx("img",{src:mn(`media/${e.avatar}`),alt:e.name,className:"w-100"})}):u.jsx("div",{className:Q("symbol-label fs-3",`bg-light-${(t=e.initials)==null?void 0:t.state}`,`text-${(n=e.initials)==null?void 0:n.state}`),children:(r=e.initials)==null?void 0:r.label})})}),u.jsxs("div",{className:"d-flex flex-column",children:[u.jsx("a",{href:"#",className:"text-gray-800 text-hover-primary mb-1",children:e.name}),u.jsx("span",{children:e.email})]})]})},Du=({last_login:e})=>u.jsx("div",{className:"badge badge-light fw-bolder",children:e}),ku=({two_steps:e})=>u.jsxs(u.Fragment,{children:[" ",e&&u.jsx("div",{className:"badge badge-light-success fw-bolder",children:"Enabled"})]}),Vu=({id:e})=>{const{setItemIdForUpdate:t}=ne(),{query:n}=we(),r=jt();x.useEffect(()=>{Br.reinitialization()},[]);const o=()=>{t(e)},i=_o({mutationFn:()=>Ml(e),onSuccess:()=>{r.invalidateQueries({queryKey:[`${At.USERS_LIST}-${n}`]})}});return u.jsxs(u.Fragment,{children:[u.jsxs("a",{href:"#",className:"btn btn-light btn-active-light-primary btn-sm","data-kt-menu-trigger":"click","data-kt-menu-placement":"bottom-end",children:["Actions",u.jsx(Ge,{iconName:"down",className:"fs-5 m-0"})]}),u.jsxs("div",{className:"menu menu-sub menu-sub-dropdown menu-column menu-rounded menu-gray-600 menu-state-bg-light-primary fw-bold fs-7 w-125px py-4","data-kt-menu":"true",children:[u.jsx("div",{className:"menu-item px-3",children:u.jsx("a",{className:"menu-link px-3",onClick:o,children:"Edit"})}),u.jsx("div",{className:"menu-item px-3",children:u.jsx("a",{className:"menu-link px-3","data-kt-users-table-filter":"delete_row",onClick:async()=>await i.mutateAsync(),children:"Delete"})})]})]})},Lu=({id:e})=>{const{selected:t,onSelect:n}=ne(),r=x.useMemo(()=>t.includes(e),[e,t]);return u.jsx("div",{className:"form-check form-check-custom form-check-solid",children:u.jsx("input",{className:"form-check-input",type:"checkbox","data-kt-check":r,"data-kt-check-target":"#kt_table_users .form-check-input",checked:r,onChange:()=>n(e)})})},Ae=({className:e,title:t,tableProps:n})=>{const r=n.column.id,{state:o,updateState:i}=ct(),s=x.useMemo(()=>o.sort&&o.sort===r,[o,r]),l=x.useMemo(()=>o.order,[o]),a=()=>{if(!(r==="actions"||r==="selection")){if(!s){i({sort:r,order:"asc",...ye});return}if(s&&l!==void 0){if(l==="asc"){i({sort:r,order:"desc",...ye});return}i({sort:void 0,order:void 0,...ye})}}};return u.jsx("td",{className:Q(e,s&&l!==void 0&&`table-sort-${l}`),style:{cursor:"pointer"},onClick:a,children:t})},Tu=()=>{const{isAllSelected:e,onSelectAll:t}=ne();return u.jsx("th",{className:"w-10px pe-2",children:u.jsx("div",{className:"form-check form-check-sm form-check-custom form-check-solid me-3",children:u.jsx("input",{className:"form-check-input",type:"checkbox","data-kt-check":e,"data-kt-check-target":"#kt_table_users .form-check-input",checked:e,onChange:t})})})},Gu=[{header:()=>u.jsx(Tu,{}),id:"selection",cell:e=>u.jsx(Lu,{id:e.row.original.id})},{header:e=>u.jsx(Ae,{tableProps:e,title:"Name",className:"min-w-125px"}),id:"name",cell:e=>u.jsx(Nu,{user:e.row.original})},{header:e=>u.jsx(Ae,{tableProps:e,title:"Role",className:"min-w-125px"}),accessorKey:"role"},{header:e=>u.jsx(Ae,{tableProps:e,title:"Last login",className:"min-w-125px"}),id:"last_login",cell:e=>u.jsx(Du,{last_login:e.row.original.last_login})},{header:e=>u.jsx(Ae,{tableProps:e,title:"Two steps",className:"min-w-125px"}),id:"two_steps",cell:e=>u.jsx(ku,{two_steps:e.row.original.two_steps})},{header:e=>u.jsx(Ae,{tableProps:e,title:"Joined day",className:"min-w-125px"}),accessorKey:"joined_day"},{header:e=>u.jsx(Ae,{tableProps:e,title:"Actions",className:"text-end min-w-100px"}),id:"actions",cell:e=>u.jsx(Vu,{id:e.row.original.id})}],Go=()=>{const e={borderRadius:"0.475rem",boxShadow:"0 0 50px 0 rgb(82 63 105 / 15%)",backgroundColor:"#fff",color:"#7e8299",fontWeight:"500",margin:"0",width:"auto",padding:"1rem 2rem",top:"calc(50% - 2rem)",left:"calc(50% - 4rem)"};return u.jsx("div",{style:{...e,position:"absolute",textAlign:"center"},children:"Processing..."})},Lr=e=>e==="« Previous"?"Previous":e==="Next »"?"Next":e,Hu=()=>{var l;const e=Dl(),t=Eo(),{updateState:n}=ct(),r=a=>{!a||t||e.page===a||n({page:a,items_per_page:e.items_per_page||10})},o=5,i=a=>{var m;if(!((m=a==null?void 0:a.links)!=null&&m.length))return[];const c=[...a.links];let d=[];const p=c.shift(),f=c.pop(),g=Math.floor(o/2);return d.push(p),(a.page<=Math.round(o/2)||c.length<=o)&&(d=[...d,...c.slice(0,o)]),a.page>c.length-g&&c.length>o&&(d=[...d,...c.slice(c.length-o,c.length)]),!(a.page<=Math.round(o/2)||c.length<=o)&&!(a.page>c.length-g)&&(d=[...d,...c.slice(a.page-1-g,a.page+g)]),d.push(f),d},s=x.useMemo(()=>i(e),[e]);return u.jsxs("div",{className:"row",children:[u.jsx("div",{className:"col-sm-12 col-md-5 d-flex align-items-center justify-content-center justify-content-md-start"}),u.jsx("div",{className:"col-sm-12 col-md-7 d-flex align-items-center justify-content-center justify-content-md-end",children:u.jsx("div",{id:"kt_table_users_paginate",children:u.jsxs("ul",{className:"pagination",children:[u.jsx("li",{className:Q("page-item",{disabled:t||e.page===1}),children:u.jsx("a",{onClick:()=>r(1),style:{cursor:"pointer"},className:"page-link",children:"First"})}),s==null?void 0:s.map(a=>({...a,label:Lr(a.label)})).map(a=>u.jsx("li",{className:Q("page-item",{active:e.page===a.page,disabled:t,previous:a.label==="Previous",next:a.label==="Next"}),children:u.jsx("a",{className:Q("page-link",{"page-text":a.label==="Previous"||a.label==="Next","me-5":a.label==="Previous"}),onClick:()=>r(a.page),style:{cursor:"pointer"},children:Lr(a.label)})},a.label)),u.jsx("li",{className:Q("page-item",{disabled:t||e.page===(((l=e.links)==null?void 0:l.length)||3)-2}),children:u.jsx("a",{onClick:()=>{var a;return r((((a=e.links)==null?void 0:a.length)||3)-2)},style:{cursor:"pointer"},className:"page-link",children:"Last"})})]})})})]})},Uu=()=>{const e=$o(),t=Eo(),n=x.useMemo(()=>e,[e]),r=x.useMemo(()=>Gu,[]),o=Mu({data:n,columns:r,getCoreRowModel:$u()});return u.jsxs(ei,{className:"py-4",children:[u.jsx("div",{className:"table-responsive",children:u.jsxs("table",{id:"kt_table_users",className:"table align-middle table-row-dashed fs-6 gy-5 dataTable no-footer",children:[u.jsx("thead",{children:o.getHeaderGroups().map(i=>u.jsx("tr",{className:"text-start text-muted fw-bolder fs-7 text-uppercase gs-0",children:i.headers.map(s=>u.jsx(Ou,{header:s},s.id))},i.id))}),u.jsx("tbody",{className:"text-gray-600 fw-bold",children:o.getRowModel().rows.length>0?o.getRowModel().rows.map(i=>u.jsx(ju,{row:i},i.id)):u.jsx("tr",{children:u.jsx("td",{colSpan:7,children:u.jsx("div",{className:"d-flex text-center w-100 align-content-center justify-content-center",children:"No matching records found"})})})})]})}),u.jsx(Hu,{}),t&&u.jsx(Go,{})]})},zu=()=>{const{setItemIdForUpdate:e}=ne();return u.jsxs("div",{className:"modal-header",children:[u.jsx("h2",{className:"fw-bolder",children:"Add User"}),u.jsx("div",{className:"btn btn-icon btn-sm btn-active-icon-primary","data-kt-users-modal-action":"close",onClick:()=>e(void 0),style:{cursor:"pointer"},children:u.jsx(Ge,{iconName:"cross",className:"fs-1"})})]})},Ke={avatar:"avatars/300-6.jpg",position:"Art Director",role:"Administrator",name:"",email:""},Bu=qo().shape({email:Zn().email("Wrong email format").min(3,"Minimum 3 symbols").max(50,"Maximum 50 symbols").required("Email is required"),name:Zn().min(3,"Minimum 3 symbols").max(50,"Maximum 50 symbols").required("Name is required")}),Tr=({user:e,isUserLoading:t})=>{const{setItemIdForUpdate:n}=ne(),{refetch:r}=we(),[o]=x.useState({...e,avatar:e.avatar||Ke.avatar,role:e.role||Ke.role,position:e.position||Ke.position,name:e.name||Ke.name,email:e.email||Ke.email}),i=c=>{c&&r(),n(void 0)},s=mn("media/svg/avatars/blank.svg"),l=mn(`media/${o.avatar}`),a=Bo({initialValues:o,validationSchema:Bu,onSubmit:async(c,{setSubmitting:d})=>{d(!0);try{bt(c.id)?await Al(c):await Il(c)}catch(p){console.error(p)}finally{d(!0),i(!0)}}});return u.jsxs(u.Fragment,{children:[u.jsxs("form",{id:"kt_modal_add_user_form",className:"form",onSubmit:a.handleSubmit,noValidate:!0,children:[u.jsxs("div",{className:"d-flex flex-column scroll-y me-n7 pe-7",id:"kt_modal_add_user_scroll","data-kt-scroll":"true","data-kt-scroll-activate":"{default: false, lg: true}","data-kt-scroll-max-height":"auto","data-kt-scroll-dependencies":"#kt_modal_add_user_header","data-kt-scroll-wrappers":"#kt_modal_add_user_scroll","data-kt-scroll-offset":"300px",children:[u.jsxs("div",{className:"fv-row mb-7",children:[u.jsx("label",{className:"d-block fw-bold fs-6 mb-5",children:"Avatar"}),u.jsx("div",{className:"image-input image-input-outline","data-kt-image-input":"true",style:{backgroundImage:`url('${s}')`},children:u.jsx("div",{className:"image-input-wrapper w-125px h-125px",style:{backgroundImage:`url('${l}')`}})})]}),u.jsxs("div",{className:"fv-row mb-7",children:[u.jsx("label",{className:"required fw-bold fs-6 mb-2",children:"Full Name"}),u.jsx("input",{placeholder:"Full name",...a.getFieldProps("name"),type:"text",name:"name",className:Q("form-control form-control-solid mb-3 mb-lg-0",{"is-invalid":a.touched.name&&a.errors.name},{"is-valid":a.touched.name&&!a.errors.name}),autoComplete:"off",disabled:a.isSubmitting||t}),a.touched.name&&a.errors.name&&u.jsx("div",{className:"fv-plugins-message-container",children:u.jsx("div",{className:"fv-help-block",children:u.jsx("span",{role:"alert",children:a.errors.name})})})]}),u.jsxs("div",{className:"fv-row mb-7",children:[u.jsx("label",{className:"required fw-bold fs-6 mb-2",children:"Email"}),u.jsx("input",{placeholder:"Email",...a.getFieldProps("email"),className:Q("form-control form-control-solid mb-3 mb-lg-0",{"is-invalid":a.touched.email&&a.errors.email},{"is-valid":a.touched.email&&!a.errors.email}),type:"email",name:"email",autoComplete:"off",disabled:a.isSubmitting||t}),a.touched.email&&a.errors.email&&u.jsx("div",{className:"fv-plugins-message-container",children:u.jsx("span",{role:"alert",children:a.errors.email})})]}),u.jsxs("div",{className:"mb-7",children:[u.jsx("label",{className:"required fw-bold fs-6 mb-5",children:"Role"}),u.jsx("div",{className:"d-flex fv-row",children:u.jsxs("div",{className:"form-check form-check-custom form-check-solid",children:[u.jsx("input",{className:"form-check-input me-3",...a.getFieldProps("role"),name:"role",type:"radio",value:"Administrator",id:"kt_modal_update_role_option_0",checked:a.values.role==="Administrator",disabled:a.isSubmitting||t}),u.jsxs("label",{className:"form-check-label",htmlFor:"kt_modal_update_role_option_0",children:[u.jsx("div",{className:"fw-bolder text-gray-800",children:"Administrator"}),u.jsx("div",{className:"text-gray-600",children:"Best for business owners and company administrators"})]})]})}),u.jsx("div",{className:"separator separator-dashed my-5"}),u.jsx("div",{className:"d-flex fv-row",children:u.jsxs("div",{className:"form-check form-check-custom form-check-solid",children:[u.jsx("input",{className:"form-check-input me-3",...a.getFieldProps("role"),name:"role",type:"radio",value:"Developer",id:"kt_modal_update_role_option_1",checked:a.values.role==="Developer",disabled:a.isSubmitting||t}),u.jsxs("label",{className:"form-check-label",htmlFor:"kt_modal_update_role_option_1",children:[u.jsx("div",{className:"fw-bolder text-gray-800",children:"Developer"}),u.jsx("div",{className:"text-gray-600",children:"Best for developers or people primarily using the API"})]})]})}),u.jsx("div",{className:"separator separator-dashed my-5"}),u.jsx("div",{className:"d-flex fv-row",children:u.jsxs("div",{className:"form-check form-check-custom form-check-solid",children:[u.jsx("input",{className:"form-check-input me-3",...a.getFieldProps("role"),name:"role",type:"radio",value:"Analyst",id:"kt_modal_update_role_option_2",checked:a.values.role==="Analyst",disabled:a.isSubmitting||t}),u.jsxs("label",{className:"form-check-label",htmlFor:"kt_modal_update_role_option_2",children:[u.jsx("div",{className:"fw-bolder text-gray-800",children:"Analyst"}),u.jsx("div",{className:"text-gray-600",children:"Best for people who need full access to analytics data, but don't need to update business settings"})]})]})}),u.jsx("div",{className:"separator separator-dashed my-5"}),u.jsx("div",{className:"d-flex fv-row",children:u.jsxs("div",{className:"form-check form-check-custom form-check-solid",children:[u.jsx("input",{className:"form-check-input me-3",...a.getFieldProps("role"),name:"role",type:"radio",value:"Support",id:"kt_modal_update_role_option_3",checked:a.values.role==="Support",disabled:a.isSubmitting||t}),u.jsxs("label",{className:"form-check-label",htmlFor:"kt_modal_update_role_option_3",children:[u.jsx("div",{className:"fw-bolder text-gray-800",children:"Support"}),u.jsx("div",{className:"text-gray-600",children:"Best for employees who regularly refund payments and respond to disputes"})]})]})}),u.jsx("div",{className:"separator separator-dashed my-5"}),u.jsx("div",{className:"d-flex fv-row",children:u.jsxs("div",{className:"form-check form-check-custom form-check-solid",children:[u.jsx("input",{className:"form-check-input me-3",...a.getFieldProps("role"),name:"role",type:"radio",id:"kt_modal_update_role_option_4",value:"Trial",checked:a.values.role==="Trial",disabled:a.isSubmitting||t}),u.jsxs("label",{className:"form-check-label",htmlFor:"kt_modal_update_role_option_4",children:[u.jsx("div",{className:"fw-bolder text-gray-800",children:"Trial"}),u.jsx("div",{className:"text-gray-600",children:"Best for people who need to preview content data, but don't need to make any updates"})]})]})})]})]}),u.jsxs("div",{className:"text-center pt-15",children:[u.jsx("button",{type:"reset",onClick:()=>i(),className:"btn btn-light me-3","data-kt-users-modal-action":"cancel",disabled:a.isSubmitting||t,children:"Discard"}),u.jsxs("button",{type:"submit",className:"btn btn-primary","data-kt-users-modal-action":"submit",disabled:t||a.isSubmitting||!a.isValid||!a.touched,children:[u.jsx("span",{className:"indicator-label",children:"Submit"}),(a.isSubmitting||t)&&u.jsxs("span",{className:"indicator-progress",children:["Please wait..."," ",u.jsx("span",{className:"spinner-border spinner-border-sm align-middle ms-2"})]})]})]})]}),(a.isSubmitting||t)&&u.jsx(Go,{})]})},qu=()=>{const{itemIdForUpdate:e}=ne(),t=bt(e),{isLoading:n,data:r,error:o}=Ro({queryKey:[`${At.USERS_LIST}-user-${e}`],queryFn:()=>El(e),enabled:t});return e?!n&&!o&&r?u.jsx(Tr,{isUserLoading:n,user:r}):null:u.jsx(Tr,{isUserLoading:n,user:{id:void 0}})},Qu=()=>(x.useEffect(()=>(document.body.classList.add("modal-open"),()=>{document.body.classList.remove("modal-open")}),[]),u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"modal fade show d-block",id:"kt_modal_add_user",role:"dialog",tabIndex:-1,"aria-modal":"true",children:u.jsx("div",{className:"modal-dialog modal-dialog-centered mw-650px",children:u.jsxs("div",{className:"modal-content",children:[u.jsx(zu,{}),u.jsx("div",{className:"modal-body scroll-y mx-5 mx-xl-15 my-7",children:u.jsx(qu,{})})]})})}),u.jsx("div",{className:"modal-backdrop fade show"})]})),Wu=()=>{const{itemIdForUpdate:e}=ne();return u.jsxs(u.Fragment,{children:[u.jsxs(Zo,{children:[u.jsx(Hl,{}),u.jsx(Uu,{})]}),e!==void 0&&u.jsx(Qu,{})]})},Ku=()=>u.jsx(jl,{children:u.jsx(Nl,{children:u.jsxs(kl,{children:[u.jsx(Qo,{}),u.jsx(Wo,{children:u.jsx(Wu,{})})]})})}),Ju=[{title:"User Management",path:"/apps/user-management/users",isSeparator:!1,isActive:!1},{title:"",path:"",isSeparator:!0,isActive:!1}],Zu=()=>u.jsxs(Ko,{children:[u.jsx(Lt,{element:u.jsx(Xo,{}),children:u.jsx(Lt,{path:"users",element:u.jsxs(u.Fragment,{children:[u.jsx(Jo,{breadcrumbs:Ju,children:"Users list"}),u.jsx(Ku,{})]})})}),u.jsx(Lt,{index:!0,element:u.jsx(Yo,{to:"/apps/user-management/users"})})]});export{Zu as default};
Close