ubk.erp.webpack 1.0.5 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,19 +1,19 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),k=require("antd"),Tt=require("swr"),ne=require("react"),at=require("swr/mutation"),ge=require("@ant-design/icons"),er=require("react-dom/server"),we=require("react-hot-toast"),tr=()=>d.jsxs(k.Card,{style:{borderRadius:16},children:[d.jsx(k.Typography.Title,{level:3,style:{marginTop:0},children:"UBK ERP"}),d.jsx(k.Typography.Paragraph,{style:{marginBottom:0},children:"Welcome to your webpack-powered ERP system."})]}),ae=({width:e,height:t,display:n,justifyContent:r,alignItems:o,flexDirection:s,gap:i,style:a,children:b,...c})=>{const l={width:e,height:t,display:n,justifyContent:r,alignItems:o,flexDirection:s,gap:i,...a};return d.jsx("div",{style:l,...c,children:b})},xt=({variant:e,fontWeight:t,style:n,children:r,...o})=>{const s=t==="bold"?700:t==="light"?300:t;return e==="h1"?d.jsx(k.Typography.Title,{level:1,style:{fontWeight:s,...n},...o,children:r}):e==="h2"?d.jsx(k.Typography.Title,{level:2,style:{fontWeight:s,...n},...o,children:r}):e==="h3"?d.jsx(k.Typography.Title,{level:3,style:{fontWeight:s,...n},...o,children:r}):e==="h4"?d.jsx(k.Typography.Title,{level:4,style:{fontWeight:s,...n},...o,children:r}):e==="h5"?d.jsx(k.Typography.Title,{level:5,style:{fontWeight:s,...n},...o,children:r}):d.jsx(k.Typography.Text,{style:{fontWeight:s,...n},...o,children:r})};function bn({title:e="",icon:t="",path:n="",onClick:r}){const o=()=>{if(r){r(n);return}typeof window<"u"&&typeof n=="string"&&n.length>0&&window.location.assign(n)};return d.jsxs(k.Card,{hoverable:!0,onClick:o,style:{borderRadius:12,overflow:"hidden",boxShadow:"0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.10)"},bodyStyle:{padding:0,cursor:"pointer",display:"flex",flexDirection:"column",alignItems:"stretch"},children:[d.jsx(ae,{width:"100%",display:"flex",justifyContent:"center",alignItems:"center",style:{padding:"10px 12px",minHeight:80},children:d.jsx("img",{src:t,alt:"",style:{width:45,height:50,objectFit:"contain"}})}),d.jsx(ae,{style:{padding:"0 12px"},children:d.jsx(k.Divider,{style:{margin:0,minWidth:0}})}),d.jsx(ae,{style:{padding:"10px 10px",display:"flex",justifyContent:"center",alignItems:"center",minHeight:35},children:d.jsx(xt,{variant:"button",fontWeight:"bold",style:{fontSize:12},children:e})})]})}function gn(e,t){return function(){return e.apply(t,arguments)}}const{toString:nr}=Object.prototype,{getPrototypeOf:Qe}=Object,{iterator:et,toStringTag:wn}=Symbol,tt=(e=>t=>{const n=nr.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ye=e=>(e=e.toLowerCase(),t=>tt(t)===e),nt=e=>t=>typeof t===e,{isArray:je}=Array,Ce=nt("undefined");function ke(e){return e!==null&&!Ce(e)&&e.constructor!==null&&!Ce(e.constructor)&&de(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const xn=ye("ArrayBuffer");function rr(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&xn(e.buffer),t}const or=nt("string"),de=nt("function"),En=nt("number"),Ie=e=>e!==null&&typeof e=="object",sr=e=>e===!0||e===!1,Ye=e=>{if(tt(e)!=="object")return!1;const t=Qe(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(wn in e)&&!(et in e)},ir=e=>{if(!Ie(e)||ke(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},ar=ye("Date"),lr=ye("File"),cr=e=>!!(e&&typeof e.uri<"u"),ur=e=>e&&typeof e.getParts<"u",dr=ye("Blob"),fr=ye("FileList"),pr=e=>Ie(e)&&de(e.pipe);function hr(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const At=hr(),Dt=typeof At.FormData<"u"?At.FormData:void 0,mr=e=>{if(!e)return!1;if(Dt&&e instanceof Dt)return!0;const t=Qe(e);if(!t||t===Object.prototype||!de(e.append))return!1;const n=tt(e);return n==="formdata"||n==="object"&&de(e.toString)&&e.toString()==="[object FormData]"},yr=ye("URLSearchParams"),[br,gr,wr,xr]=["ReadableStream","Request","Response","Headers"].map(ye),Er=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Fe(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),je(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(ke(e))return;const s=n?Object.getOwnPropertyNames(e):Object.keys(e),i=s.length;let a;for(r=0;r<i;r++)a=s[r],t.call(null,e[a],a,e)}}function vn(e,t){if(ke(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const xe=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Sn=e=>!Ce(e)&&e!==xe;function Et(){const{caseless:e,skipUndefined:t}=Sn(this)&&this||{},n={},r=(o,s)=>{if(s==="__proto__"||s==="constructor"||s==="prototype")return;const i=e&&vn(n,s)||s;Ye(n[i])&&Ye(o)?n[i]=Et(n[i],o):Ye(o)?n[i]=Et({},o):je(o)?n[i]=o.slice():(!t||!Ce(o))&&(n[i]=o)};for(let o=0,s=arguments.length;o<s;o++)arguments[o]&&Fe(arguments[o],r);return n}const vr=(e,t,n,{allOwnKeys:r}={})=>(Fe(t,(o,s)=>{n&&de(o)?Object.defineProperty(e,s,{value:gn(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),Sr=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),_r=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Tr=(e,t,n,r)=>{let o,s,i;const a={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)i=o[s],(!r||r(i,e,t))&&!a[i]&&(t[i]=e[i],a[i]=!0);e=n!==!1&&Qe(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Rr=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Or=e=>{if(!e)return null;if(je(e))return e;let t=e.length;if(!En(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Cr=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Qe(Uint8Array)),jr=(e,t)=>{const r=(e&&e[et]).call(e);let o;for(;(o=r.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},Pr=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Ar=ye("HTMLFormElement"),Dr=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),$t=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),$r=ye("RegExp"),_n=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Fe(n,(o,s)=>{let i;(i=t(o,s,e))!==!1&&(r[s]=i||o)}),Object.defineProperties(e,r)},Mr=e=>{_n(e,(t,n)=>{if(de(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(de(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Nr=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return je(e)?r(e):r(String(e).split(t)),n},kr=()=>{},Ir=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Fr(e){return!!(e&&de(e.append)&&e[wn]==="FormData"&&e[et])}const Lr=e=>{const t=new Array(10),n=(r,o)=>{if(Ie(r)){if(t.indexOf(r)>=0)return;if(ke(r))return r;if(!("toJSON"in r)){t[o]=r;const s=je(r)?[]:{};return Fe(r,(i,a)=>{const b=n(i,o+1);!Ce(b)&&(s[a]=b)}),t[o]=void 0,s}}return r};return n(e,0)},Ur=ye("AsyncFunction"),qr=e=>e&&(Ie(e)||de(e))&&de(e.then)&&de(e.catch),Tn=((e,t)=>e?setImmediate:t?((n,r)=>(xe.addEventListener("message",({source:o,data:s})=>{o===xe&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),xe.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",de(xe.postMessage)),Br=typeof queueMicrotask<"u"?queueMicrotask.bind(xe):typeof process<"u"&&process.nextTick||Tn,Hr=e=>e!=null&&de(e[et]),p={isArray:je,isArrayBuffer:xn,isBuffer:ke,isFormData:mr,isArrayBufferView:rr,isString:or,isNumber:En,isBoolean:sr,isObject:Ie,isPlainObject:Ye,isEmptyObject:ir,isReadableStream:br,isRequest:gr,isResponse:wr,isHeaders:xr,isUndefined:Ce,isDate:ar,isFile:lr,isReactNativeBlob:cr,isReactNative:ur,isBlob:dr,isRegExp:$r,isFunction:de,isStream:pr,isURLSearchParams:yr,isTypedArray:Cr,isFileList:fr,forEach:Fe,merge:Et,extend:vr,trim:Er,stripBOM:Sr,inherits:_r,toFlatObject:Tr,kindOf:tt,kindOfTest:ye,endsWith:Rr,toArray:Or,forEachEntry:jr,matchAll:Pr,isHTMLForm:Ar,hasOwnProperty:$t,hasOwnProp:$t,reduceDescriptors:_n,freezeMethods:Mr,toObjectSet:Nr,toCamelCase:Dr,noop:kr,toFiniteNumber:Ir,findKey:vn,global:xe,isContextDefined:Sn,isSpecCompliantForm:Fr,toJSONObject:Lr,isAsyncFn:Ur,isThenable:qr,setImmediate:Tn,asap:Br,isIterable:Hr};let q=class Rn extends Error{static from(t,n,r,o,s,i){const a=new Rn(t.message,n||t.code,r,o,s);return a.cause=t,a.name=t.name,t.status!=null&&a.status==null&&(a.status=t.status),i&&Object.assign(a,i),a}constructor(t,n,r,o,s){super(t),Object.defineProperty(this,"message",{value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),o&&(this.request=o),s&&(this.response=s,this.status=s.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:p.toJSONObject(this.config),code:this.code,status:this.status}}};q.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";q.ERR_BAD_OPTION="ERR_BAD_OPTION";q.ECONNABORTED="ECONNABORTED";q.ETIMEDOUT="ETIMEDOUT";q.ERR_NETWORK="ERR_NETWORK";q.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";q.ERR_DEPRECATED="ERR_DEPRECATED";q.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";q.ERR_BAD_REQUEST="ERR_BAD_REQUEST";q.ERR_CANCELED="ERR_CANCELED";q.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";q.ERR_INVALID_URL="ERR_INVALID_URL";q.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Wr=null;function vt(e){return p.isPlainObject(e)||p.isArray(e)}function On(e){return p.endsWith(e,"[]")?e.slice(0,-2):e}function lt(e,t,n){return e?e.concat(t).map(function(o,s){return o=On(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function zr(e){return p.isArray(e)&&!e.some(vt)}const Vr=p.toFlatObject(p,{},null,function(t){return/^is[A-Z]/.test(t)});function rt(e,t,n){if(!p.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=p.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,R){return!p.isUndefined(R[f])});const r=n.metaTokens,o=n.visitor||m,s=n.dots,i=n.indexes,a=n.Blob||typeof Blob<"u"&&Blob,b=n.maxDepth===void 0?100:n.maxDepth,c=a&&p.isSpecCompliantForm(t);if(!p.isFunction(o))throw new TypeError("visitor must be a function");function l(u){if(u===null)return"";if(p.isDate(u))return u.toISOString();if(p.isBoolean(u))return u.toString();if(!c&&p.isBlob(u))throw new q("Blob is not supported. Use a Buffer instead.");return p.isArrayBuffer(u)||p.isTypedArray(u)?c&&typeof Blob=="function"?new Blob([u]):Buffer.from(u):u}function m(u,f,R){let P=u;if(p.isReactNative(t)&&p.isReactNativeBlob(u))return t.append(lt(R,f,s),l(u)),!1;if(u&&!R&&typeof u=="object"){if(p.endsWith(f,"{}"))f=r?f:f.slice(0,-2),u=JSON.stringify(u);else if(p.isArray(u)&&zr(u)||(p.isFileList(u)||p.endsWith(f,"[]"))&&(P=p.toArray(u)))return f=On(f),P.forEach(function(M,E){!(p.isUndefined(M)||M===null)&&t.append(i===!0?lt([f],E,s):i===null?f:f+"[]",l(M))}),!1}return vt(u)?!0:(t.append(lt(R,f,s),l(u)),!1)}const S=[],g=Object.assign(Vr,{defaultVisitor:m,convertValue:l,isVisitable:vt});function h(u,f,R=0){if(!p.isUndefined(u)){if(R>b)throw new q("Object is too deeply nested ("+R+" levels). Max depth: "+b,q.ERR_FORM_DATA_DEPTH_EXCEEDED);if(S.indexOf(u)!==-1)throw Error("Circular reference detected in "+f.join("."));S.push(u),p.forEach(u,function(O,M){(!(p.isUndefined(O)||O===null)&&o.call(t,O,p.isString(M)?M.trim():M,f,g))===!0&&h(O,f?f.concat(M):[M],R+1)}),S.pop()}}if(!p.isObject(e))throw new TypeError("data must be an object");return h(e),t}function Mt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Rt(e,t){this._pairs=[],e&&rt(e,this,t)}const Cn=Rt.prototype;Cn.append=function(t,n){this._pairs.push([t,n])};Cn.toString=function(t){const n=t?function(r){return t.call(this,r,Mt)}:Mt;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Yr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function jn(e,t,n){if(!t)return e;const r=n&&n.encode||Yr,o=p.isFunction(n)?{serialize:n}:n,s=o&&o.serialize;let i;if(s?i=s(t,o):i=p.isURLSearchParams(t)?t.toString():new Rt(t,o).toString(r),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Nt{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){p.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Ot={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Jr=typeof URLSearchParams<"u"?URLSearchParams:Rt,Kr=typeof FormData<"u"?FormData:null,Xr=typeof Blob<"u"?Blob:null,Gr={isBrowser:!0,classes:{URLSearchParams:Jr,FormData:Kr,Blob:Xr},protocols:["http","https","file","blob","url","data"]},Ct=typeof window<"u"&&typeof document<"u",St=typeof navigator=="object"&&navigator||void 0,Zr=Ct&&(!St||["ReactNative","NativeScript","NS"].indexOf(St.product)<0),Qr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",eo=Ct&&window.location.href||"http://localhost",to=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ct,hasStandardBrowserEnv:Zr,hasStandardBrowserWebWorkerEnv:Qr,navigator:St,origin:eo},Symbol.toStringTag,{value:"Module"})),ce={...to,...Gr};function no(e,t){return rt(e,new ce.classes.URLSearchParams,{visitor:function(n,r,o,s){return ce.isNode&&p.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function ro(e){return p.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function oo(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],t[s]=e[s];return t}function Pn(e){function t(n,r,o,s){let i=n[s++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),b=s>=n.length;return i=!i&&p.isArray(o)?o.length:i,b?(p.hasOwnProp(o,i)?o[i]=p.isArray(o[i])?o[i].concat(r):[o[i],r]:o[i]=r,!a):((!o[i]||!p.isObject(o[i]))&&(o[i]=[]),t(n,r,o[i],s)&&p.isArray(o[i])&&(o[i]=oo(o[i])),!a)}if(p.isFormData(e)&&p.isFunction(e.entries)){const n={};return p.forEachEntry(e,(r,o)=>{t(ro(r),o,n,0)}),n}return null}const Re=(e,t)=>e!=null&&p.hasOwnProp(e,t)?e[t]:void 0;function so(e,t,n){if(p.isString(e))try{return(t||JSON.parse)(e),p.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Le={transitional:Ot,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=p.isObject(t);if(s&&p.isHTMLForm(t)&&(t=new FormData(t)),p.isFormData(t))return o?JSON.stringify(Pn(t)):t;if(p.isArrayBuffer(t)||p.isBuffer(t)||p.isStream(t)||p.isFile(t)||p.isBlob(t)||p.isReadableStream(t))return t;if(p.isArrayBufferView(t))return t.buffer;if(p.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(s){const b=Re(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return no(t,b).toString();if((a=p.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=Re(this,"env"),l=c&&c.FormData;return rt(a?{"files[]":t}:t,l&&new l,b)}}return s||o?(n.setContentType("application/json",!1),so(t)):t}],transformResponse:[function(t){const n=Re(this,"transitional")||Le.transitional,r=n&&n.forcedJSONParsing,o=Re(this,"responseType"),s=o==="json";if(p.isResponse(t)||p.isReadableStream(t))return t;if(t&&p.isString(t)&&(r&&!o||s)){const a=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,Re(this,"parseReviver"))}catch(b){if(a)throw b.name==="SyntaxError"?q.from(b,q.ERR_BAD_RESPONSE,this,null,Re(this,"response")):b}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ce.classes.FormData,Blob:ce.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};p.forEach(["delete","get","head","post","put","patch"],e=>{Le.headers[e]={}});const io=p.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ao=e=>{const t={};let n,r,o;return e&&e.split(`
2
- `).forEach(function(i){o=i.indexOf(":"),n=i.substring(0,o).trim().toLowerCase(),r=i.substring(o+1).trim(),!(!n||t[n]&&io[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},kt=Symbol("internals"),lo=/[^\x09\x20-\x7E\x80-\xFF]/g;function co(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}function De(e){return e&&String(e).trim().toLowerCase()}function uo(e){return co(e.replace(lo,""))}function Je(e){return e===!1||e==null?e:p.isArray(e)?e.map(Je):uo(String(e))}function fo(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const po=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ct(e,t,n,r,o){if(p.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!p.isString(t)){if(p.isString(r))return t.indexOf(r)!==-1;if(p.isRegExp(r))return r.test(t)}}function ho(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function mo(e,t){const n=p.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,s,i){return this[r].call(this,t,o,s,i)},configurable:!0})})}let fe=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function s(a,b,c){const l=De(b);if(!l)throw new Error("header name must be a non-empty string");const m=p.findKey(o,l);(!m||o[m]===void 0||c===!0||c===void 0&&o[m]!==!1)&&(o[m||b]=Je(a))}const i=(a,b)=>p.forEach(a,(c,l)=>s(c,l,b));if(p.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(p.isString(t)&&(t=t.trim())&&!po(t))i(ao(t),n);else if(p.isObject(t)&&p.isIterable(t)){let a={},b,c;for(const l of t){if(!p.isArray(l))throw TypeError("Object iterator must return a key-value pair");a[c=l[0]]=(b=a[c])?p.isArray(b)?[...b,l[1]]:[b,l[1]]:l[1]}i(a,n)}else t!=null&&s(n,t,r);return this}get(t,n){if(t=De(t),t){const r=p.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return fo(o);if(p.isFunction(n))return n.call(this,o,r);if(p.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=De(t),t){const r=p.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ct(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function s(i){if(i=De(i),i){const a=p.findKey(r,i);a&&(!n||ct(r,r[a],a,n))&&(delete r[a],o=!0)}}return p.isArray(t)?t.forEach(s):s(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const s=n[r];(!t||ct(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const n=this,r={};return p.forEach(this,(o,s)=>{const i=p.findKey(r,s);if(i){n[i]=Je(o),delete n[s];return}const a=t?ho(s):String(s).trim();a!==s&&delete n[s],n[a]=Je(o),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return p.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&p.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
3
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[kt]=this[kt]={accessors:{}}).accessors,o=this.prototype;function s(i){const a=De(i);r[a]||(mo(o,i),r[a]=!0)}return p.isArray(t)?t.forEach(s):s(t),this}};fe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);p.reduceDescriptors(fe.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});p.freezeMethods(fe);function ut(e,t){const n=this||Le,r=t||n,o=fe.from(r.headers);let s=r.data;return p.forEach(e,function(a){s=a.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function An(e){return!!(e&&e.__CANCEL__)}let Ue=class extends q{constructor(t,n,r){super(t??"canceled",q.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Dn(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new q("Request failed with status code "+n.status,[q.ERR_BAD_REQUEST,q.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function yo(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function bo(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,s=0,i;return t=t!==void 0?t:1e3,function(b){const c=Date.now(),l=r[s];i||(i=c),n[o]=b,r[o]=c;let m=s,S=0;for(;m!==o;)S+=n[m++],m=m%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),c-i<t)return;const g=l&&c-l;return g?Math.round(S*1e3/g):void 0}}function go(e,t){let n=0,r=1e3/t,o,s;const i=(c,l=Date.now())=>{n=l,o=null,s&&(clearTimeout(s),s=null),e(...c)};return[(...c)=>{const l=Date.now(),m=l-n;m>=r?i(c,l):(o=c,s||(s=setTimeout(()=>{s=null,i(o)},r-m)))},()=>o&&i(o)]}const Ge=(e,t,n=3)=>{let r=0;const o=bo(50,250);return go(s=>{const i=s.loaded,a=s.lengthComputable?s.total:void 0,b=a!=null?Math.min(i,a):i,c=Math.max(0,b-r),l=o(c);r=Math.max(r,b);const m={loaded:b,total:a,progress:a?b/a:void 0,bytes:c,rate:l||void 0,estimated:l&&a?(a-b)/l:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(m)},n)},It=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ft=e=>(...t)=>p.asap(()=>e(...t)),wo=ce.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,ce.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(ce.origin),ce.navigator&&/(msie|trident)/i.test(ce.navigator.userAgent)):()=>!0,xo=ce.hasStandardBrowserEnv?{write(e,t,n,r,o,s,i){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];p.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),p.isString(r)&&a.push(`path=${r}`),p.isString(o)&&a.push(`domain=${o}`),s===!0&&a.push("secure"),p.isString(i)&&a.push(`SameSite=${i}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Eo(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function vo(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function $n(e,t,n){let r=!Eo(t);return e&&(r||n===!1)?vo(e,t):t}const Lt=e=>e instanceof fe?{...e}:e;function ve(e,t){t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(c,l,m,S){return p.isPlainObject(c)&&p.isPlainObject(l)?p.merge.call({caseless:S},c,l):p.isPlainObject(l)?p.merge({},l):p.isArray(l)?l.slice():l}function o(c,l,m,S){if(p.isUndefined(l)){if(!p.isUndefined(c))return r(void 0,c,m,S)}else return r(c,l,m,S)}function s(c,l){if(!p.isUndefined(l))return r(void 0,l)}function i(c,l){if(p.isUndefined(l)){if(!p.isUndefined(c))return r(void 0,c)}else return r(void 0,l)}function a(c,l,m){if(p.hasOwnProp(t,m))return r(c,l);if(p.hasOwnProp(e,m))return r(void 0,c)}const b={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,allowedSocketPaths:i,responseEncoding:i,validateStatus:a,headers:(c,l,m)=>o(Lt(c),Lt(l),m,!0)};return p.forEach(Object.keys({...e,...t}),function(l){if(l==="__proto__"||l==="constructor"||l==="prototype")return;const m=p.hasOwnProp(b,l)?b[l]:o,S=p.hasOwnProp(e,l)?e[l]:void 0,g=p.hasOwnProp(t,l)?t[l]:void 0,h=m(S,g,l);p.isUndefined(h)&&m!==a||(n[l]=h)}),n}const Mn=e=>{const t=ve({},e),n=S=>p.hasOwnProp(t,S)?t[S]:void 0,r=n("data");let o=n("withXSRFToken");const s=n("xsrfHeaderName"),i=n("xsrfCookieName");let a=n("headers");const b=n("auth"),c=n("baseURL"),l=n("allowAbsoluteUrls"),m=n("url");if(t.headers=a=fe.from(a),t.url=jn($n(c,m,l),e.params,e.paramsSerializer),b&&a.set("Authorization","Basic "+btoa((b.username||"")+":"+(b.password?unescape(encodeURIComponent(b.password)):""))),p.isFormData(r)){if(ce.hasStandardBrowserEnv||ce.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(p.isFunction(r.getHeaders)){const S=r.getHeaders(),g=["content-type","content-length"];Object.entries(S).forEach(([h,u])=>{g.includes(h.toLowerCase())&&a.set(h,u)})}}if(ce.hasStandardBrowserEnv&&(p.isFunction(o)&&(o=o(t)),o===!0||o==null&&wo(t.url))){const g=s&&i&&xo.read(i);g&&a.set(s,g)}return t},So=typeof XMLHttpRequest<"u",_o=So&&function(e){return new Promise(function(n,r){const o=Mn(e);let s=o.data;const i=fe.from(o.headers).normalize();let{responseType:a,onUploadProgress:b,onDownloadProgress:c}=o,l,m,S,g,h;function u(){g&&g(),h&&h(),o.cancelToken&&o.cancelToken.unsubscribe(l),o.signal&&o.signal.removeEventListener("abort",l)}let f=new XMLHttpRequest;f.open(o.method.toUpperCase(),o.url,!0),f.timeout=o.timeout;function R(){if(!f)return;const O=fe.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),E={data:!a||a==="text"||a==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:O,config:e,request:f};Dn(function(re){n(re),u()},function(re){r(re),u()},E),f=null}"onloadend"in f?f.onloadend=R:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(R)},f.onabort=function(){f&&(r(new q("Request aborted",q.ECONNABORTED,e,f)),f=null)},f.onerror=function(M){const E=M&&M.message?M.message:"Network Error",Z=new q(E,q.ERR_NETWORK,e,f);Z.event=M||null,r(Z),f=null},f.ontimeout=function(){let M=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const E=o.transitional||Ot;o.timeoutErrorMessage&&(M=o.timeoutErrorMessage),r(new q(M,E.clarifyTimeoutError?q.ETIMEDOUT:q.ECONNABORTED,e,f)),f=null},s===void 0&&i.setContentType(null),"setRequestHeader"in f&&p.forEach(i.toJSON(),function(M,E){f.setRequestHeader(E,M)}),p.isUndefined(o.withCredentials)||(f.withCredentials=!!o.withCredentials),a&&a!=="json"&&(f.responseType=o.responseType),c&&([S,h]=Ge(c,!0),f.addEventListener("progress",S)),b&&f.upload&&([m,g]=Ge(b),f.upload.addEventListener("progress",m),f.upload.addEventListener("loadend",g)),(o.cancelToken||o.signal)&&(l=O=>{f&&(r(!O||O.type?new Ue(null,e,f):O),f.abort(),f=null)},o.cancelToken&&o.cancelToken.subscribe(l),o.signal&&(o.signal.aborted?l():o.signal.addEventListener("abort",l)));const P=yo(o.url);if(P&&ce.protocols.indexOf(P)===-1){r(new q("Unsupported protocol "+P+":",q.ERR_BAD_REQUEST,e));return}f.send(s||null)})},To=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const s=function(c){if(!o){o=!0,a();const l=c instanceof Error?c:this.reason;r.abort(l instanceof q?l:new Ue(l instanceof Error?l.message:l))}};let i=t&&setTimeout(()=>{i=null,s(new q(`timeout of ${t}ms exceeded`,q.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),e=null)};e.forEach(c=>c.addEventListener("abort",s));const{signal:b}=r;return b.unsubscribe=()=>p.asap(a),b}},Ro=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},Oo=async function*(e,t){for await(const n of Co(e))yield*Ro(n,t)},Co=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},Ut=(e,t,n,r)=>{const o=Oo(e,t);let s=0,i,a=b=>{i||(i=!0,r&&r(b))};return new ReadableStream({async pull(b){try{const{done:c,value:l}=await o.next();if(c){a(),b.close();return}let m=l.byteLength;if(n){let S=s+=m;n(S)}b.enqueue(new Uint8Array(l))}catch(c){throw a(c),c}},cancel(b){return a(b),o.return()}},{highWaterMark:2})},qt=64*1024,{isFunction:We}=p,jo=(({Request:e,Response:t})=>({Request:e,Response:t}))(p.global),{ReadableStream:Bt,TextEncoder:Ht}=p.global,Wt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Po=e=>{e=p.merge.call({skipUndefined:!0},jo,e);const{fetch:t,Request:n,Response:r}=e,o=t?We(t):typeof fetch=="function",s=We(n),i=We(r);if(!o)return!1;const a=o&&We(Bt),b=o&&(typeof Ht=="function"?(h=>u=>h.encode(u))(new Ht):async h=>new Uint8Array(await new n(h).arrayBuffer())),c=s&&a&&Wt(()=>{let h=!1;const u=new n(ce.origin,{body:new Bt,method:"POST",get duplex(){return h=!0,"half"}}),f=u.headers.has("Content-Type");return u.body!=null&&u.body.cancel(),h&&!f}),l=i&&a&&Wt(()=>p.isReadableStream(new r("").body)),m={stream:l&&(h=>h.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(h=>{!m[h]&&(m[h]=(u,f)=>{let R=u&&u[h];if(R)return R.call(u);throw new q(`Response type '${h}' is not supported`,q.ERR_NOT_SUPPORT,f)})});const S=async h=>{if(h==null)return 0;if(p.isBlob(h))return h.size;if(p.isSpecCompliantForm(h))return(await new n(ce.origin,{method:"POST",body:h}).arrayBuffer()).byteLength;if(p.isArrayBufferView(h)||p.isArrayBuffer(h))return h.byteLength;if(p.isURLSearchParams(h)&&(h=h+""),p.isString(h))return(await b(h)).byteLength},g=async(h,u)=>{const f=p.toFiniteNumber(h.getContentLength());return f??S(u)};return async h=>{let{url:u,method:f,data:R,signal:P,cancelToken:O,timeout:M,onDownloadProgress:E,onUploadProgress:Z,responseType:re,headers:V,withCredentials:Y="same-origin",fetchOptions:G}=Mn(h),A=t||fetch;re=re?(re+"").toLowerCase():"text";let L=To([P,O&&O.toAbortSignal()],M),te=null;const _=L&&L.unsubscribe&&(()=>{L.unsubscribe()});let T;try{if(Z&&c&&f!=="get"&&f!=="head"&&(T=await g(V,R))!==0){let x=new n(u,{method:"POST",body:R,duplex:"half"}),D;if(p.isFormData(R)&&(D=x.headers.get("content-type"))&&V.setContentType(D),x.body){const[N,$]=It(T,Ge(Ft(Z)));R=Ut(x.body,qt,N,$)}}p.isString(Y)||(Y=Y?"include":"omit");const w=s&&"credentials"in n.prototype;if(p.isFormData(R)){const x=V.getContentType();x&&/^multipart\/form-data/i.test(x)&&!/boundary=/i.test(x)&&V.delete("content-type")}const j={...G,signal:L,method:f.toUpperCase(),headers:V.normalize().toJSON(),body:R,duplex:"half",credentials:w?Y:void 0};te=s&&new n(u,j);let v=await(s?A(te,G):A(u,j));const F=l&&(re==="stream"||re==="response");if(l&&(E||F&&_)){const x={};["status","statusText","headers"].forEach(B=>{x[B]=v[B]});const D=p.toFiniteNumber(v.headers.get("content-length")),[N,$]=E&&It(D,Ge(Ft(E),!0))||[];v=new r(Ut(v.body,qt,N,()=>{$&&$(),_&&_()}),x)}re=re||"text";let y=await m[p.findKey(m,re)||"text"](v,h);return!F&&_&&_(),await new Promise((x,D)=>{Dn(x,D,{data:y,headers:fe.from(v.headers),status:v.status,statusText:v.statusText,config:h,request:te})})}catch(w){throw _&&_(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new q("Network Error",q.ERR_NETWORK,h,te,w&&w.response),{cause:w.cause||w}):q.from(w,w&&w.code,h,te,w&&w.response)}}},Ao=new Map,Nn=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,s=[r,o,n];let i=s.length,a=i,b,c,l=Ao;for(;a--;)b=s[a],c=l.get(b),c===void 0&&l.set(b,c=a?new Map:Po(t)),l=c;return c};Nn();const jt={http:Wr,xhr:_o,fetch:{get:Nn}};p.forEach(jt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const zt=e=>`- ${e}`,Do=e=>p.isFunction(e)||e===null||e===!1;function $o(e,t){e=p.isArray(e)?e:[e];const{length:n}=e;let r,o;const s={};for(let i=0;i<n;i++){r=e[i];let a;if(o=r,!Do(r)&&(o=jt[(a=String(r)).toLowerCase()],o===void 0))throw new q(`Unknown adapter '${a}'`);if(o&&(p.isFunction(o)||(o=o.get(t))))break;s[a||"#"+i]=o}if(!o){const i=Object.entries(s).map(([b,c])=>`adapter ${b} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=n?i.length>1?`since :
4
- `+i.map(zt).join(`
5
- `):" "+zt(i[0]):"as no adapter specified";throw new q("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return o}const kn={getAdapter:$o,adapters:jt};function dt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ue(null,e)}function Vt(e){return dt(e),e.headers=fe.from(e.headers),e.data=ut.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),kn.getAdapter(e.adapter||Le.adapter,e)(e).then(function(r){return dt(e),r.data=ut.call(e,e.transformResponse,r),r.headers=fe.from(r.headers),r},function(r){return An(r)||(dt(e),r&&r.response&&(r.response.data=ut.call(e,e.transformResponse,r.response),r.response.headers=fe.from(r.response.headers))),Promise.reject(r)})}const In="1.15.2",ot={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ot[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Yt={};ot.transitional=function(t,n,r){function o(s,i){return"[Axios v"+In+"] Transitional option '"+s+"'"+i+(r?". "+r:"")}return(s,i,a)=>{if(t===!1)throw new q(o(i," has been removed"+(n?" in "+n:"")),q.ERR_DEPRECATED);return n&&!Yt[i]&&(Yt[i]=!0,console.warn(o(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,i,a):!0}};ot.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Mo(e,t,n){if(typeof e!="object")throw new q("options must be an object",q.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],i=Object.prototype.hasOwnProperty.call(t,s)?t[s]:void 0;if(i){const a=e[s],b=a===void 0||i(a,s,e);if(b!==!0)throw new q("option "+s+" must be "+b,q.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new q("Unknown option "+s,q.ERR_BAD_OPTION)}}const Ke={assertOptions:Mo,validators:ot},he=Ke.validators;let Ee=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Nt,response:new Nt}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const s=(()=>{if(!o.stack)return"";const i=o.stack.indexOf(`
6
- `);return i===-1?"":o.stack.slice(i+1)})();try{if(!r.stack)r.stack=s;else if(s){const i=s.indexOf(`
7
- `),a=i===-1?-1:s.indexOf(`
8
- `,i+1),b=a===-1?"":s.slice(a+1);String(r.stack).endsWith(b)||(r.stack+=`
9
- `+s)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ve(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&Ke.assertOptions(r,{silentJSONParsing:he.transitional(he.boolean),forcedJSONParsing:he.transitional(he.boolean),clarifyTimeoutError:he.transitional(he.boolean),legacyInterceptorReqResOrdering:he.transitional(he.boolean)},!1),o!=null&&(p.isFunction(o)?n.paramsSerializer={serialize:o}:Ke.assertOptions(o,{encode:he.function,serialize:he.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ke.assertOptions(n,{baseUrl:he.spelling("baseURL"),withXsrfToken:he.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=s&&p.merge(s.common,s[n.method]);s&&p.forEach(["delete","get","head","post","put","patch","common"],h=>{delete s[h]}),n.headers=fe.concat(i,s);const a=[];let b=!0;this.interceptors.request.forEach(function(u){if(typeof u.runWhen=="function"&&u.runWhen(n)===!1)return;b=b&&u.synchronous;const f=n.transitional||Ot;f&&f.legacyInterceptorReqResOrdering?a.unshift(u.fulfilled,u.rejected):a.push(u.fulfilled,u.rejected)});const c=[];this.interceptors.response.forEach(function(u){c.push(u.fulfilled,u.rejected)});let l,m=0,S;if(!b){const h=[Vt.bind(this),void 0];for(h.unshift(...a),h.push(...c),S=h.length,l=Promise.resolve(n);m<S;)l=l.then(h[m++],h[m++]);return l}S=a.length;let g=n;for(;m<S;){const h=a[m++],u=a[m++];try{g=h(g)}catch(f){u.call(this,f);break}}try{l=Vt.call(this,g)}catch(h){return Promise.reject(h)}for(m=0,S=c.length;m<S;)l=l.then(c[m++],c[m++]);return l}getUri(t){t=ve(this.defaults,t);const n=$n(t.baseURL,t.url,t.allowAbsoluteUrls);return jn(n,t.params,t.paramsSerializer)}};p.forEach(["delete","get","head","options"],function(t){Ee.prototype[t]=function(n,r){return this.request(ve(r||{},{method:t,url:n,data:(r||{}).data}))}});p.forEach(["post","put","patch"],function(t){function n(r){return function(s,i,a){return this.request(ve(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}Ee.prototype[t]=n(),Ee.prototype[t+"Form"]=n(!0)});let No=class Fn{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(o=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](o);r._listeners=null}),this.promise.then=o=>{let s;const i=new Promise(a=>{r.subscribe(a),s=a}).then(o);return i.cancel=function(){r.unsubscribe(s)},i},t(function(s,i,a){r.reason||(r.reason=new Ue(s,i,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Fn(function(o){t=o}),cancel:t}}};function ko(e){return function(n){return e.apply(null,n)}}function Io(e){return p.isObject(e)&&e.isAxiosError===!0}const _t={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(_t).forEach(([e,t])=>{_t[t]=e});function Ln(e){const t=new Ee(e),n=gn(Ee.prototype.request,t);return p.extend(n,Ee.prototype,t,{allOwnKeys:!0}),p.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Ln(ve(e,o))},n}const se=Ln(Le);se.Axios=Ee;se.CanceledError=Ue;se.CancelToken=No;se.isCancel=An;se.VERSION=In;se.toFormData=rt;se.AxiosError=q;se.Cancel=se.CanceledError;se.all=function(t){return Promise.all(t)};se.spread=ko;se.isAxiosError=Io;se.mergeConfig=ve;se.AxiosHeaders=fe;se.formToJSON=e=>Pn(p.isHTMLForm(e)?new FormData(e):e);se.getAdapter=kn.getAdapter;se.HttpStatusCode=_t;se.default=se;const{Axios:Ns,AxiosError:ks,CanceledError:Is,isCancel:Fs,CancelToken:Ls,VERSION:Us,all:qs,Cancel:Bs,isAxiosError:Hs,spread:Ws,toFormData:zs,AxiosHeaders:Vs,HttpStatusCode:Ys,formToJSON:Js,getAdapter:Ks,mergeConfig:Xs}=se,Fo=()=>new Promise(e=>setTimeout(()=>e(),800)),Pe=se.create({baseURL:"https://npmapi.ubkerp.com/"}),Lo=async(e,t,n)=>{const r=await Pe.post(e,t,{headers:{Authorization:n}});if(console.log("ddddfdfdfd",r.data?.Status),r.data?.Status=="Success")return r?.data?.data||r?.data;throw new Error(r.data?.msg)},Un=async(e,t)=>{try{let r=e;if(!e.includes("session_id")){const s=e.includes("?")?"&":"?";r=`${e}${s}session_id=1`}return(await Pe.get(r,{headers:{Authorization:t}})).data}catch(n){throw n.response?.status===401&&console.error("401 Unauthorized"),n}},Uo=async(e,t)=>{const n=await Pe.post(e,"",{headers:{Authorization:t}});if(n.data?.Status=="Success")return n?.data?.data||n?.data;throw new Error(n.data?.msg)},ft=async(e,t)=>{const n=localStorage.getItem("authToken"),r=t?.arg;return(await Pe.post(e,r,{headers:{Authorization:n}}))?.data},qo=async(e,t,n)=>(await Fo(),(await Pe.post(e,t,{headers:{Authorization:n}}))?.data),Bo=async(e,t,n)=>(await Pe.delete(`${e}/${t}`,{headers:{Authorization:n}})).data,Ho=({token:e,menu:t})=>{const{isLoading:n,data:r}=Tt(e?["api/sdk/Menus",e]:null,([s,i])=>Uo(s,i)),o=r?.find(s=>s.path===t)?.sub_menu??[];return console.log("menuData",r),d.jsx(k.Row,{gutter:[16,16],children:o?.map((s,i)=>s.dashboard_show==="YES"?d.jsx(k.Col,{xs:24,md:8,lg:8,children:d.jsx(ae,{children:d.jsx(bn,{icon:`https://npmapi.ubkerp.com/icons/frontoffice/${s.icons}`,title:s.submenu_name,path:s.menu_key})})},`${i}office001`):null)})};function Wo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ie={},pt,Jt;function zo(){return Jt||(Jt=1,pt=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,o,s;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(s=Object.keys(t),r=s.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[o]))return!1;for(o=r;o--!==0;){var i=s[o];if(!e(t[i],n[i]))return!1}return!0}return t!==t&&n!==n}),pt}var ze={exports:{}},Ve={exports:{}},Q={};var Kt;function Vo(){if(Kt)return Q;Kt=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,b=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,l=e?Symbol.for("react.forward_ref"):60112,m=e?Symbol.for("react.suspense"):60113,S=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,u=e?Symbol.for("react.block"):60121,f=e?Symbol.for("react.fundamental"):60117,R=e?Symbol.for("react.responder"):60118,P=e?Symbol.for("react.scope"):60119;function O(E){if(typeof E=="object"&&E!==null){var Z=E.$$typeof;switch(Z){case t:switch(E=E.type,E){case b:case c:case r:case s:case o:case m:return E;default:switch(E=E&&E.$$typeof,E){case a:case l:case h:case g:case i:return E;default:return Z}}case n:return Z}}}function M(E){return O(E)===c}return Q.AsyncMode=b,Q.ConcurrentMode=c,Q.ContextConsumer=a,Q.ContextProvider=i,Q.Element=t,Q.ForwardRef=l,Q.Fragment=r,Q.Lazy=h,Q.Memo=g,Q.Portal=n,Q.Profiler=s,Q.StrictMode=o,Q.Suspense=m,Q.isAsyncMode=function(E){return M(E)||O(E)===b},Q.isConcurrentMode=M,Q.isContextConsumer=function(E){return O(E)===a},Q.isContextProvider=function(E){return O(E)===i},Q.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===t},Q.isForwardRef=function(E){return O(E)===l},Q.isFragment=function(E){return O(E)===r},Q.isLazy=function(E){return O(E)===h},Q.isMemo=function(E){return O(E)===g},Q.isPortal=function(E){return O(E)===n},Q.isProfiler=function(E){return O(E)===s},Q.isStrictMode=function(E){return O(E)===o},Q.isSuspense=function(E){return O(E)===m},Q.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===r||E===c||E===s||E===o||E===m||E===S||typeof E=="object"&&E!==null&&(E.$$typeof===h||E.$$typeof===g||E.$$typeof===i||E.$$typeof===a||E.$$typeof===l||E.$$typeof===f||E.$$typeof===R||E.$$typeof===P||E.$$typeof===u)},Q.typeOf=O,Q}var ee={};var Xt;function Yo(){return Xt||(Xt=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,b=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,l=e?Symbol.for("react.forward_ref"):60112,m=e?Symbol.for("react.suspense"):60113,S=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,u=e?Symbol.for("react.block"):60121,f=e?Symbol.for("react.fundamental"):60117,R=e?Symbol.for("react.responder"):60118,P=e?Symbol.for("react.scope"):60119;function O(C){return typeof C=="string"||typeof C=="function"||C===r||C===c||C===s||C===o||C===m||C===S||typeof C=="object"&&C!==null&&(C.$$typeof===h||C.$$typeof===g||C.$$typeof===i||C.$$typeof===a||C.$$typeof===l||C.$$typeof===f||C.$$typeof===R||C.$$typeof===P||C.$$typeof===u)}function M(C){if(typeof C=="object"&&C!==null){var le=C.$$typeof;switch(le){case t:var Se=C.type;switch(Se){case b:case c:case r:case s:case o:case m:return Se;default:var qe=Se&&Se.$$typeof;switch(qe){case a:case l:case h:case g:case i:return qe;default:return le}}case n:return le}}}var E=b,Z=c,re=a,V=i,Y=t,G=l,A=r,L=h,te=g,_=n,T=s,w=o,j=m,v=!1;function F(C){return v||(v=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),y(C)||M(C)===b}function y(C){return M(C)===c}function x(C){return M(C)===a}function D(C){return M(C)===i}function N(C){return typeof C=="object"&&C!==null&&C.$$typeof===t}function $(C){return M(C)===l}function B(C){return M(C)===r}function W(C){return M(C)===h}function z(C){return M(C)===g}function K(C){return M(C)===n}function J(C){return M(C)===s}function H(C){return M(C)===o}function oe(C){return M(C)===m}ee.AsyncMode=E,ee.ConcurrentMode=Z,ee.ContextConsumer=re,ee.ContextProvider=V,ee.Element=Y,ee.ForwardRef=G,ee.Fragment=A,ee.Lazy=L,ee.Memo=te,ee.Portal=_,ee.Profiler=T,ee.StrictMode=w,ee.Suspense=j,ee.isAsyncMode=F,ee.isConcurrentMode=y,ee.isContextConsumer=x,ee.isContextProvider=D,ee.isElement=N,ee.isForwardRef=$,ee.isFragment=B,ee.isLazy=W,ee.isMemo=z,ee.isPortal=K,ee.isProfiler=J,ee.isStrictMode=H,ee.isSuspense=oe,ee.isValidElementType=O,ee.typeOf=M})()),ee}var Gt;function qn(){return Gt||(Gt=1,process.env.NODE_ENV==="production"?Ve.exports=Vo():Ve.exports=Yo()),Ve.exports}var ht,Zt;function Jo(){if(Zt)return ht;Zt=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var i={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var b=Object.getOwnPropertyNames(i).map(function(l){return i[l]});if(b.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(l){c[l]=l}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return ht=o()?Object.assign:function(s,i){for(var a,b=r(s),c,l=1;l<arguments.length;l++){a=Object(arguments[l]);for(var m in a)t.call(a,m)&&(b[m]=a[m]);if(e){c=e(a);for(var S=0;S<c.length;S++)n.call(a,c[S])&&(b[c[S]]=a[c[S]])}}return b},ht}var mt,Qt;function Pt(){if(Qt)return mt;Qt=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return mt=e,mt}var yt,en;function Bn(){return en||(en=1,yt=Function.call.bind(Object.prototype.hasOwnProperty)),yt}var bt,tn;function Ko(){if(tn)return bt;tn=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Pt(),n={},r=Bn();e=function(s){var i="Warning: "+s;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function o(s,i,a,b,c){if(process.env.NODE_ENV!=="production"){for(var l in s)if(r(s,l)){var m;try{if(typeof s[l]!="function"){var S=Error((b||"React class")+": "+a+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw S.name="Invariant Violation",S}m=s[l](i,l,b,a,null,t)}catch(h){m=h}if(m&&!(m instanceof Error)&&e((b||"React class")+": type specification of "+a+" `"+l+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof m+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),m instanceof Error&&!(m.message in n)){n[m.message]=!0;var g=c?c():"";e("Failed "+a+" type: "+m.message+(g??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},bt=o,bt}var gt,nn;function Xo(){if(nn)return gt;nn=1;var e=qn(),t=Jo(),n=Pt(),r=Bn(),o=Ko(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var b="Warning: "+a;typeof console<"u"&&console.error(b);try{throw new Error(b)}catch{}});function i(){return null}return gt=function(a,b){var c=typeof Symbol=="function"&&Symbol.iterator,l="@@iterator";function m(y){var x=y&&(c&&y[c]||y[l]);if(typeof x=="function")return x}var S="<<anonymous>>",g={array:R("array"),bigint:R("bigint"),bool:R("boolean"),func:R("function"),number:R("number"),object:R("object"),string:R("string"),symbol:R("symbol"),any:P(),arrayOf:O,element:M(),elementType:E(),instanceOf:Z,node:G(),objectOf:V,oneOf:re,oneOfType:Y,shape:L,exact:te};function h(y,x){return y===x?y!==0||1/y===1/x:y!==y&&x!==x}function u(y,x){this.message=y,this.data=x&&typeof x=="object"?x:{},this.stack=""}u.prototype=Error.prototype;function f(y){if(process.env.NODE_ENV!=="production")var x={},D=0;function N(B,W,z,K,J,H,oe){if(K=K||S,H=H||z,oe!==n){if(b){var C=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw C.name="Invariant Violation",C}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var le=K+":"+z;!x[le]&&D<3&&(s("You are manually calling a React.PropTypes validation function for the `"+H+"` prop on `"+K+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),x[le]=!0,D++)}}return W[z]==null?B?W[z]===null?new u("The "+J+" `"+H+"` is marked as required "+("in `"+K+"`, but its value is `null`.")):new u("The "+J+" `"+H+"` is marked as required in "+("`"+K+"`, but its value is `undefined`.")):null:y(W,z,K,J,H)}var $=N.bind(null,!1);return $.isRequired=N.bind(null,!0),$}function R(y){function x(D,N,$,B,W,z){var K=D[N],J=w(K);if(J!==y){var H=j(K);return new u("Invalid "+B+" `"+W+"` of type "+("`"+H+"` supplied to `"+$+"`, expected ")+("`"+y+"`."),{expectedType:y})}return null}return f(x)}function P(){return f(i)}function O(y){function x(D,N,$,B,W){if(typeof y!="function")return new u("Property `"+W+"` of component `"+$+"` has invalid PropType notation inside arrayOf.");var z=D[N];if(!Array.isArray(z)){var K=w(z);return new u("Invalid "+B+" `"+W+"` of type "+("`"+K+"` supplied to `"+$+"`, expected an array."))}for(var J=0;J<z.length;J++){var H=y(z,J,$,B,W+"["+J+"]",n);if(H instanceof Error)return H}return null}return f(x)}function M(){function y(x,D,N,$,B){var W=x[D];if(!a(W)){var z=w(W);return new u("Invalid "+$+" `"+B+"` of type "+("`"+z+"` supplied to `"+N+"`, expected a single ReactElement."))}return null}return f(y)}function E(){function y(x,D,N,$,B){var W=x[D];if(!e.isValidElementType(W)){var z=w(W);return new u("Invalid "+$+" `"+B+"` of type "+("`"+z+"` supplied to `"+N+"`, expected a single ReactElement type."))}return null}return f(y)}function Z(y){function x(D,N,$,B,W){if(!(D[N]instanceof y)){var z=y.name||S,K=F(D[N]);return new u("Invalid "+B+" `"+W+"` of type "+("`"+K+"` supplied to `"+$+"`, expected ")+("instance of `"+z+"`."))}return null}return f(x)}function re(y){if(!Array.isArray(y))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),i;function x(D,N,$,B,W){for(var z=D[N],K=0;K<y.length;K++)if(h(z,y[K]))return null;var J=JSON.stringify(y,function(oe,C){var le=j(C);return le==="symbol"?String(C):C});return new u("Invalid "+B+" `"+W+"` of value `"+String(z)+"` "+("supplied to `"+$+"`, expected one of "+J+"."))}return f(x)}function V(y){function x(D,N,$,B,W){if(typeof y!="function")return new u("Property `"+W+"` of component `"+$+"` has invalid PropType notation inside objectOf.");var z=D[N],K=w(z);if(K!=="object")return new u("Invalid "+B+" `"+W+"` of type "+("`"+K+"` supplied to `"+$+"`, expected an object."));for(var J in z)if(r(z,J)){var H=y(z,J,$,B,W+"."+J,n);if(H instanceof Error)return H}return null}return f(x)}function Y(y){if(!Array.isArray(y))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var x=0;x<y.length;x++){var D=y[x];if(typeof D!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+v(D)+" at index "+x+"."),i}function N($,B,W,z,K){for(var J=[],H=0;H<y.length;H++){var oe=y[H],C=oe($,B,W,z,K,n);if(C==null)return null;C.data&&r(C.data,"expectedType")&&J.push(C.data.expectedType)}var le=J.length>0?", expected one of type ["+J.join(", ")+"]":"";return new u("Invalid "+z+" `"+K+"` supplied to "+("`"+W+"`"+le+"."))}return f(N)}function G(){function y(x,D,N,$,B){return _(x[D])?null:new u("Invalid "+$+" `"+B+"` supplied to "+("`"+N+"`, expected a ReactNode."))}return f(y)}function A(y,x,D,N,$){return new u((y||"React class")+": "+x+" type `"+D+"."+N+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+$+"`.")}function L(y){function x(D,N,$,B,W){var z=D[N],K=w(z);if(K!=="object")return new u("Invalid "+B+" `"+W+"` of type `"+K+"` "+("supplied to `"+$+"`, expected `object`."));for(var J in y){var H=y[J];if(typeof H!="function")return A($,B,W,J,j(H));var oe=H(z,J,$,B,W+"."+J,n);if(oe)return oe}return null}return f(x)}function te(y){function x(D,N,$,B,W){var z=D[N],K=w(z);if(K!=="object")return new u("Invalid "+B+" `"+W+"` of type `"+K+"` "+("supplied to `"+$+"`, expected `object`."));var J=t({},D[N],y);for(var H in J){var oe=y[H];if(r(y,H)&&typeof oe!="function")return A($,B,W,H,j(oe));if(!oe)return new u("Invalid "+B+" `"+W+"` key `"+H+"` supplied to `"+$+"`.\nBad object: "+JSON.stringify(D[N],null," ")+`
10
- Valid keys: `+JSON.stringify(Object.keys(y),null," "));var C=oe(z,H,$,B,W+"."+H,n);if(C)return C}return null}return f(x)}function _(y){switch(typeof y){case"number":case"string":case"undefined":return!0;case"boolean":return!y;case"object":if(Array.isArray(y))return y.every(_);if(y===null||a(y))return!0;var x=m(y);if(x){var D=x.call(y),N;if(x!==y.entries){for(;!(N=D.next()).done;)if(!_(N.value))return!1}else for(;!(N=D.next()).done;){var $=N.value;if($&&!_($[1]))return!1}}else return!1;return!0;default:return!1}}function T(y,x){return y==="symbol"?!0:x?x["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&x instanceof Symbol:!1}function w(y){var x=typeof y;return Array.isArray(y)?"array":y instanceof RegExp?"object":T(x,y)?"symbol":x}function j(y){if(typeof y>"u"||y===null)return""+y;var x=w(y);if(x==="object"){if(y instanceof Date)return"date";if(y instanceof RegExp)return"regexp"}return x}function v(y){var x=j(y);switch(x){case"array":case"object":return"an "+x;case"boolean":case"date":case"regexp":return"a "+x;default:return x}}function F(y){return!y.constructor||!y.constructor.name?S:y.constructor.name}return g.checkPropTypes=o,g.resetWarningCache=o.resetWarningCache,g.PropTypes=g,g},gt}var wt,rn;function Go(){if(rn)return wt;rn=1;var e=Pt();function t(){}function n(){}return n.resetWarningCache=t,wt=function(){function r(i,a,b,c,l,m){if(m!==e){var S=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw S.name="Invariant Violation",S}}r.isRequired=r;function o(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},wt}var on;function Zo(){if(on)return ze.exports;if(on=1,process.env.NODE_ENV!=="production"){var e=qn(),t=!0;ze.exports=Xo()(e.isElement,t)}else ze.exports=Go()();return ze.exports}var sn;function Qo(){if(sn)return ie;sn=1;var e=ie&&ie.__extends||(function(){var g=function(h,u){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,R){f.__proto__=R}||function(f,R){for(var P in R)Object.prototype.hasOwnProperty.call(R,P)&&(f[P]=R[P])},g(h,u)};return function(h,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");g(h,u);function f(){this.constructor=h}h.prototype=u===null?Object.create(u):(f.prototype=u.prototype,new f)}})(),t=ie&&ie.__assign||function(){return t=Object.assign||function(g){for(var h,u=1,f=arguments.length;u<f;u++){h=arguments[u];for(var R in h)Object.prototype.hasOwnProperty.call(h,R)&&(g[R]=h[R])}return g},t.apply(this,arguments)},n=ie&&ie.__createBinding||(Object.create?(function(g,h,u,f){f===void 0&&(f=u);var R=Object.getOwnPropertyDescriptor(h,u);(!R||("get"in R?!h.__esModule:R.writable||R.configurable))&&(R={enumerable:!0,get:function(){return h[u]}}),Object.defineProperty(g,f,R)}):(function(g,h,u,f){f===void 0&&(f=u),g[f]=h[u]})),r=ie&&ie.__setModuleDefault||(Object.create?(function(g,h){Object.defineProperty(g,"default",{enumerable:!0,value:h})}):function(g,h){g.default=h}),o=ie&&ie.__importStar||function(g){if(g&&g.__esModule)return g;var h={};if(g!=null)for(var u in g)u!=="default"&&Object.prototype.hasOwnProperty.call(g,u)&&n(h,g,u);return r(h,g),h},s=ie&&ie.__rest||function(g,h){var u={};for(var f in g)Object.prototype.hasOwnProperty.call(g,f)&&h.indexOf(f)<0&&(u[f]=g[f]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var R=0,f=Object.getOwnPropertySymbols(g);R<f.length;R++)h.indexOf(f[R])<0&&Object.prototype.propertyIsEnumerable.call(g,f[R])&&(u[f[R]]=g[f[R]]);return u},i=ie&&ie.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(ie,"__esModule",{value:!0});var a=o(ne),b=i(zo()),c=o(Zo());function l(g){return g&&g.replace(/&nbsp;|\u202F|\u00A0/g," ").replace(/<br \/>/g,"<br>")}function m(g){var h=document.createTextNode("");g.appendChild(h);var u=document.activeElement===g;if(h!==null&&h.nodeValue!==null&&u){var f=window.getSelection();if(f!==null){var R=document.createRange();R.setStart(h,h.nodeValue.length),R.collapse(!0),f.removeAllRanges(),f.addRange(R)}g instanceof HTMLElement&&g.focus()}}var S=(function(g){e(h,g);function h(){var u=g!==null&&g.apply(this,arguments)||this;return u.lastHtml=u.props.html,u.el=typeof u.props.innerRef=="function"?{current:null}:a.createRef(),u.getEl=function(){return(u.props.innerRef&&typeof u.props.innerRef!="function"?u.props.innerRef:u.el).current},u.emitChange=function(f){var R=u.getEl();if(R){var P=R.innerHTML;if(u.props.onChange&&P!==u.lastHtml){var O=Object.assign({},f,{target:{value:P}});u.props.onChange(O)}u.lastHtml=P}},u}return h.prototype.render=function(){var u=this,f=this.props,R=f.tagName,P=f.html,O=f.innerRef,M=s(f,["tagName","html","innerRef"]);return a.createElement(R||"div",t(t({},M),{ref:typeof O=="function"?function(E){O(E),u.el.current=E}:O||this.el,onInput:this.emitChange,onBlur:this.props.onBlur||this.emitChange,onKeyUp:this.props.onKeyUp||this.emitChange,onKeyDown:this.props.onKeyDown||this.emitChange,contentEditable:!this.props.disabled,dangerouslySetInnerHTML:{__html:P}}),this.props.children)},h.prototype.shouldComponentUpdate=function(u){var f=this.props,R=this.getEl();return!R||l(u.html)!==l(R.innerHTML)?!0:f.disabled!==u.disabled||f.tagName!==u.tagName||f.className!==u.className||f.innerRef!==u.innerRef||f.placeholder!==u.placeholder||!(0,b.default)(f.style,u.style)},h.prototype.componentDidUpdate=function(){var u=this.getEl();u&&(this.props.html!==u.innerHTML&&(u.innerHTML=this.props.html),this.lastHtml=this.props.html,m(u))},h.propTypes={html:c.string.isRequired,onChange:c.func,disabled:c.bool,tagName:c.string,className:c.string,style:c.object,innerRef:c.oneOfType([c.object,c.func])},h})(a.Component);return ie.default=S,ie}var es=Qo();const ts=Wo(es),ns={display:"block",marginBottom:6,fontSize:"14px",fontWeight:500,color:"#222"},rs={width:"100%",minHeight:40,padding:"8px 0",fontSize:"14px",color:"#222",background:"transparent",border:0,borderTop:0,borderLeft:0,borderRight:0,borderBottom:"1px solid #d9d9d9",borderRadius:0,boxShadow:"none",outline:"none",transition:"border-color 0.2s ease"},be=ne.forwardRef(({style:e,onFocus:t,onBlur:n,...r},o)=>{const[s,i]=ne.useState(!1);return d.jsxs("div",{className:"",style:{width:"100%"},children:[r.label&&d.jsx("label",{className:"labelfont",style:ns,children:r.label}),d.jsx("input",{placeholder:r.placeholder||r.label,...r,ref:o,onFocus:a=>{i(!0),t?.(a)},onBlur:a=>{i(!1),n?.(a)},style:{...rs,borderBottom:`1px solid ${s?"#222":"#d9d9d9"}`,...e||{}}})]})});var Xe={exports:{}},os=Xe.exports,an;function ss(){return an||(an=1,(function(e,t){(function(n,r){e.exports=r()})(os,(function(){var n=1e3,r=6e4,o=36e5,s="millisecond",i="second",a="minute",b="hour",c="day",l="week",m="month",S="quarter",g="year",h="date",u="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,R=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,P={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(_){var T=["th","st","nd","rd"],w=_%100;return"["+_+(T[(w-20)%10]||T[w]||T[0])+"]"}},O=function(_,T,w){var j=String(_);return!j||j.length>=T?_:""+Array(T+1-j.length).join(w)+_},M={s:O,z:function(_){var T=-_.utcOffset(),w=Math.abs(T),j=Math.floor(w/60),v=w%60;return(T<=0?"+":"-")+O(j,2,"0")+":"+O(v,2,"0")},m:function _(T,w){if(T.date()<w.date())return-_(w,T);var j=12*(w.year()-T.year())+(w.month()-T.month()),v=T.clone().add(j,m),F=w-v<0,y=T.clone().add(j+(F?-1:1),m);return+(-(j+(w-v)/(F?v-y:y-v))||0)},a:function(_){return _<0?Math.ceil(_)||0:Math.floor(_)},p:function(_){return{M:m,y:g,w:l,d:c,D:h,h:b,m:a,s:i,ms:s,Q:S}[_]||String(_||"").toLowerCase().replace(/s$/,"")},u:function(_){return _===void 0}},E="en",Z={};Z[E]=P;var re="$isDayjsObject",V=function(_){return _ instanceof L||!(!_||!_[re])},Y=function _(T,w,j){var v;if(!T)return E;if(typeof T=="string"){var F=T.toLowerCase();Z[F]&&(v=F),w&&(Z[F]=w,v=F);var y=T.split("-");if(!v&&y.length>1)return _(y[0])}else{var x=T.name;Z[x]=T,v=x}return!j&&v&&(E=v),v||!j&&E},G=function(_,T){if(V(_))return _.clone();var w=typeof T=="object"?T:{};return w.date=_,w.args=arguments,new L(w)},A=M;A.l=Y,A.i=V,A.w=function(_,T){return G(_,{locale:T.$L,utc:T.$u,x:T.$x,$offset:T.$offset})};var L=(function(){function _(w){this.$L=Y(w.locale,null,!0),this.parse(w),this.$x=this.$x||w.x||{},this[re]=!0}var T=_.prototype;return T.parse=function(w){this.$d=(function(j){var v=j.date,F=j.utc;if(v===null)return new Date(NaN);if(A.u(v))return new Date;if(v instanceof Date)return new Date(v);if(typeof v=="string"&&!/Z$/i.test(v)){var y=v.match(f);if(y){var x=y[2]-1||0,D=(y[7]||"0").substring(0,3);return F?new Date(Date.UTC(y[1],x,y[3]||1,y[4]||0,y[5]||0,y[6]||0,D)):new Date(y[1],x,y[3]||1,y[4]||0,y[5]||0,y[6]||0,D)}}return new Date(v)})(w),this.init()},T.init=function(){var w=this.$d;this.$y=w.getFullYear(),this.$M=w.getMonth(),this.$D=w.getDate(),this.$W=w.getDay(),this.$H=w.getHours(),this.$m=w.getMinutes(),this.$s=w.getSeconds(),this.$ms=w.getMilliseconds()},T.$utils=function(){return A},T.isValid=function(){return this.$d.toString()!==u},T.isSame=function(w,j){var v=G(w);return this.startOf(j)<=v&&v<=this.endOf(j)},T.isAfter=function(w,j){return G(w)<this.startOf(j)},T.isBefore=function(w,j){return this.endOf(j)<G(w)},T.$g=function(w,j,v){return A.u(w)?this[j]:this.set(v,w)},T.unix=function(){return Math.floor(this.valueOf()/1e3)},T.valueOf=function(){return this.$d.getTime()},T.startOf=function(w,j){var v=this,F=!!A.u(j)||j,y=A.p(w),x=function(J,H){var oe=A.w(v.$u?Date.UTC(v.$y,H,J):new Date(v.$y,H,J),v);return F?oe:oe.endOf(c)},D=function(J,H){return A.w(v.toDate()[J].apply(v.toDate("s"),(F?[0,0,0,0]:[23,59,59,999]).slice(H)),v)},N=this.$W,$=this.$M,B=this.$D,W="set"+(this.$u?"UTC":"");switch(y){case g:return F?x(1,0):x(31,11);case m:return F?x(1,$):x(0,$+1);case l:var z=this.$locale().weekStart||0,K=(N<z?N+7:N)-z;return x(F?B-K:B+(6-K),$);case c:case h:return D(W+"Hours",0);case b:return D(W+"Minutes",1);case a:return D(W+"Seconds",2);case i:return D(W+"Milliseconds",3);default:return this.clone()}},T.endOf=function(w){return this.startOf(w,!1)},T.$set=function(w,j){var v,F=A.p(w),y="set"+(this.$u?"UTC":""),x=(v={},v[c]=y+"Date",v[h]=y+"Date",v[m]=y+"Month",v[g]=y+"FullYear",v[b]=y+"Hours",v[a]=y+"Minutes",v[i]=y+"Seconds",v[s]=y+"Milliseconds",v)[F],D=F===c?this.$D+(j-this.$W):j;if(F===m||F===g){var N=this.clone().set(h,1);N.$d[x](D),N.init(),this.$d=N.set(h,Math.min(this.$D,N.daysInMonth())).$d}else x&&this.$d[x](D);return this.init(),this},T.set=function(w,j){return this.clone().$set(w,j)},T.get=function(w){return this[A.p(w)]()},T.add=function(w,j){var v,F=this;w=Number(w);var y=A.p(j),x=function($){var B=G(F);return A.w(B.date(B.date()+Math.round($*w)),F)};if(y===m)return this.set(m,this.$M+w);if(y===g)return this.set(g,this.$y+w);if(y===c)return x(1);if(y===l)return x(7);var D=(v={},v[a]=r,v[b]=o,v[i]=n,v)[y]||1,N=this.$d.getTime()+w*D;return A.w(N,this)},T.subtract=function(w,j){return this.add(-1*w,j)},T.format=function(w){var j=this,v=this.$locale();if(!this.isValid())return v.invalidDate||u;var F=w||"YYYY-MM-DDTHH:mm:ssZ",y=A.z(this),x=this.$H,D=this.$m,N=this.$M,$=v.weekdays,B=v.months,W=v.meridiem,z=function(H,oe,C,le){return H&&(H[oe]||H(j,F))||C[oe].slice(0,le)},K=function(H){return A.s(x%12||12,H,"0")},J=W||function(H,oe,C){var le=H<12?"AM":"PM";return C?le.toLowerCase():le};return F.replace(R,(function(H,oe){return oe||(function(C){switch(C){case"YY":return String(j.$y).slice(-2);case"YYYY":return A.s(j.$y,4,"0");case"M":return N+1;case"MM":return A.s(N+1,2,"0");case"MMM":return z(v.monthsShort,N,B,3);case"MMMM":return z(B,N);case"D":return j.$D;case"DD":return A.s(j.$D,2,"0");case"d":return String(j.$W);case"dd":return z(v.weekdaysMin,j.$W,$,2);case"ddd":return z(v.weekdaysShort,j.$W,$,3);case"dddd":return $[j.$W];case"H":return String(x);case"HH":return A.s(x,2,"0");case"h":return K(1);case"hh":return K(2);case"a":return J(x,D,!0);case"A":return J(x,D,!1);case"m":return String(D);case"mm":return A.s(D,2,"0");case"s":return String(j.$s);case"ss":return A.s(j.$s,2,"0");case"SSS":return A.s(j.$ms,3,"0");case"Z":return y}return null})(H)||y.replace(":","")}))},T.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},T.diff=function(w,j,v){var F,y=this,x=A.p(j),D=G(w),N=(D.utcOffset()-this.utcOffset())*r,$=this-D,B=function(){return A.m(y,D)};switch(x){case g:F=B()/12;break;case m:F=B();break;case S:F=B()/3;break;case l:F=($-N)/6048e5;break;case c:F=($-N)/864e5;break;case b:F=$/o;break;case a:F=$/r;break;case i:F=$/n;break;default:F=$}return v?F:A.a(F)},T.daysInMonth=function(){return this.endOf(m).$D},T.$locale=function(){return Z[this.$L]},T.locale=function(w,j){if(!w)return this.$L;var v=this.clone(),F=Y(w,j,!0);return F&&(v.$L=F),v},T.clone=function(){return A.w(this.$d,this)},T.toDate=function(){return new Date(this.valueOf())},T.toJSON=function(){return this.isValid()?this.toISOString():null},T.toISOString=function(){return this.$d.toISOString()},T.toString=function(){return this.$d.toUTCString()},_})(),te=L.prototype;return G.prototype=te,[["$ms",s],["$s",i],["$m",a],["$H",b],["$W",c],["$M",m],["$y",g],["$D",h]].forEach((function(_){te[_[1]]=function(T){return this.$g(T,_[0],_[1])}})),G.extend=function(_,T){return _.$i||(_(T,L,G),_.$i=!0),G},G.locale=Y,G.isDayjs=V,G.unix=function(_){return G(1e3*_)},G.en=Z[E],G.Ls=Z,G.p={},G}))})(Xe)),Xe.exports}ss();function is(){return[{label:"One Time (During Admission)",value:"one_time"},{label:"One Time",value:"one_time_without_admission"},{label:"Monthly",value:"monthly"},{label:"Quarterly",value:"quarterly"},{label:"Half Yearly",value:"half_yearly"},{label:"Yearly",value:"yearly"}]}const as=e=>{const t=JSON.parse(localStorage.getItem("genrall_settings"));return console.log("amount______",e),d.jsxs(d.Fragment,{children:[t?.currency_icon," ",Number(e||0).toLocaleString("en-IN")]})};var $e={},Me={},pe={},Ne={},Oe={},ln;function ls(){if(ln)return Oe;ln=1;var e=Oe&&Oe.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Oe,"__esModule",{value:!0});const t=e(ne),n=er,r=["string","number","boolean"];function o({header:s,body:i}){const a=t.default.createElement("tr",null,s.map(c=>t.default.createElement("th",{key:c},c))),b=i.map((c,l)=>Array.isArray(c)?t.default.createElement("tr",{key:l},c.map((m,S)=>t.default.createElement("th",{key:S}," ",m," "))):c!==null&&typeof c=="object"?t.default.createElement("tr",{key:l},Object.entries(c).map(([m,S],g)=>typeof S=="object"?(console.error(`typeof ${m} is incorrect, only accept ${r.join(", ")} `),t.default.createElement("th",{key:g})):t.default.createElement("th",{key:g},t.default.createElement(t.default.Fragment,null,S)))):(console.error(`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),I=require("antd"),we=require("swr"),K=require("react"),dt=require("swr/mutation"),be=require("@ant-design/icons"),yr=require("react-dom/server"),le=require("react-hot-toast"),Cn=require("react-select"),gr=()=>i.jsxs(I.Card,{style:{borderRadius:16},children:[i.jsx(I.Typography.Title,{level:3,style:{marginTop:0},children:"UBK ERP"}),i.jsx(I.Typography.Paragraph,{style:{marginBottom:0},children:"Welcome to your webpack-powered ERP system."})]}),oe=({width:e,height:t,display:n,justifyContent:r,alignItems:o,flexDirection:s,gap:a,style:l,children:g,...u})=>{const c={width:e,height:t,display:n,justifyContent:r,alignItems:o,flexDirection:s,gap:a,...l};return i.jsx("div",{style:c,...u,children:g})},_e=({variant:e,fontWeight:t,style:n,children:r,...o})=>{const s=t==="bold"?700:t==="light"?300:t;return e==="h1"?i.jsx(I.Typography.Title,{level:1,style:{fontWeight:s,...n},...o,children:r}):e==="h2"?i.jsx(I.Typography.Title,{level:2,style:{fontWeight:s,...n},...o,children:r}):e==="h3"?i.jsx(I.Typography.Title,{level:3,style:{fontWeight:s,...n},...o,children:r}):e==="h4"?i.jsx(I.Typography.Title,{level:4,style:{fontWeight:s,...n},...o,children:r}):e==="h5"?i.jsx(I.Typography.Title,{level:5,style:{fontWeight:s,...n},...o,children:r}):i.jsx(I.Typography.Text,{style:{fontWeight:s,...n},...o,children:r})};function On({title:e="",icon:t="",path:n="",onClick:r}){const o=()=>{if(r){r(n);return}typeof window<"u"&&typeof n=="string"&&n.length>0&&window.location.assign(n)};return i.jsxs(I.Card,{hoverable:!0,onClick:o,style:{borderRadius:12,overflow:"hidden",boxShadow:"0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.10)"},bodyStyle:{padding:0,cursor:"pointer",display:"flex",flexDirection:"column",alignItems:"stretch"},children:[i.jsx(oe,{width:"100%",display:"flex",justifyContent:"center",alignItems:"center",style:{padding:"10px 12px",minHeight:80},children:i.jsx("img",{src:t,alt:"",style:{width:45,height:50,objectFit:"contain"}})}),i.jsx(oe,{style:{padding:"0 12px"},children:i.jsx(I.Divider,{style:{margin:0,minWidth:0}})}),i.jsx(oe,{style:{padding:"10px 10px",display:"flex",justifyContent:"center",alignItems:"center",minHeight:35},children:i.jsx(_e,{variant:"button",fontWeight:"bold",style:{fontSize:12},children:e})})]})}function Pn(e,t){return function(){return e.apply(t,arguments)}}const{toString:br}=Object.prototype,{getPrototypeOf:ot}=Object,{iterator:st,toStringTag:An}=Symbol,at=(e=>t=>{const n=br.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),xe=e=>(e=e.toLowerCase(),t=>at(t)===e),it=e=>t=>typeof t===e,{isArray:$e}=Array,De=it("undefined");function qe(e){return e!==null&&!De(e)&&e.constructor!==null&&!De(e.constructor)&&pe(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Dn=xe("ArrayBuffer");function xr(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Dn(e.buffer),t}const wr=it("string"),pe=it("function"),$n=it("number"),Be=e=>e!==null&&typeof e=="object",vr=e=>e===!0||e===!1,Ze=e=>{if(at(e)!=="object")return!1;const t=ot(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(An in e)&&!(st in e)},Sr=e=>{if(!Be(e)||qe(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Er=xe("Date"),_r=xe("File"),Tr=e=>!!(e&&typeof e.uri<"u"),Rr=e=>e&&typeof e.getParts<"u",jr=xe("Blob"),Cr=xe("FileList"),Or=e=>Be(e)&&pe(e.pipe);function Pr(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const qt=Pr(),Bt=typeof qt.FormData<"u"?qt.FormData:void 0,Ar=e=>{if(!e)return!1;if(Bt&&e instanceof Bt)return!0;const t=ot(e);if(!t||t===Object.prototype||!pe(e.append))return!1;const n=at(e);return n==="formdata"||n==="object"&&pe(e.toString)&&e.toString()==="[object FormData]"},Dr=xe("URLSearchParams"),[$r,Nr,Mr,kr]=["ReadableStream","Request","Response","Headers"].map(xe),Ir=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function He(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),$e(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(qe(e))return;const s=n?Object.getOwnPropertyNames(e):Object.keys(e),a=s.length;let l;for(r=0;r<a;r++)l=s[r],t.call(null,e[l],l,e)}}function Nn(e,t){if(qe(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const ve=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Mn=e=>!De(e)&&e!==ve;function Tt(){const{caseless:e,skipUndefined:t}=Mn(this)&&this||{},n={},r=(o,s)=>{if(s==="__proto__"||s==="constructor"||s==="prototype")return;const a=e&&Nn(n,s)||s;Ze(n[a])&&Ze(o)?n[a]=Tt(n[a],o):Ze(o)?n[a]=Tt({},o):$e(o)?n[a]=o.slice():(!t||!De(o))&&(n[a]=o)};for(let o=0,s=arguments.length;o<s;o++)arguments[o]&&He(arguments[o],r);return n}const Fr=(e,t,n,{allOwnKeys:r}={})=>(He(t,(o,s)=>{n&&pe(o)?Object.defineProperty(e,s,{value:Pn(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),Ur=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Lr=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},qr=(e,t,n,r)=>{let o,s,a;const l={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)a=o[s],(!r||r(a,e,t))&&!l[a]&&(t[a]=e[a],l[a]=!0);e=n!==!1&&ot(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Br=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Hr=e=>{if(!e)return null;if($e(e))return e;let t=e.length;if(!$n(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Wr=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ot(Uint8Array)),zr=(e,t)=>{const r=(e&&e[st]).call(e);let o;for(;(o=r.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},Vr=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Yr=xe("HTMLFormElement"),Kr=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Ht=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Jr=xe("RegExp"),kn=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};He(n,(o,s)=>{let a;(a=t(o,s,e))!==!1&&(r[s]=a||o)}),Object.defineProperties(e,r)},Xr=e=>{kn(e,(t,n)=>{if(pe(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(pe(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Gr=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return $e(e)?r(e):r(String(e).split(t)),n},Zr=()=>{},Qr=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function eo(e){return!!(e&&pe(e.append)&&e[An]==="FormData"&&e[st])}const to=e=>{const t=new Array(10),n=(r,o)=>{if(Be(r)){if(t.indexOf(r)>=0)return;if(qe(r))return r;if(!("toJSON"in r)){t[o]=r;const s=$e(r)?[]:{};return He(r,(a,l)=>{const g=n(a,o+1);!De(g)&&(s[l]=g)}),t[o]=void 0,s}}return r};return n(e,0)},no=xe("AsyncFunction"),ro=e=>e&&(Be(e)||pe(e))&&pe(e.then)&&pe(e.catch),In=((e,t)=>e?setImmediate:t?((n,r)=>(ve.addEventListener("message",({source:o,data:s})=>{o===ve&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),ve.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",pe(ve.postMessage)),oo=typeof queueMicrotask<"u"?queueMicrotask.bind(ve):typeof process<"u"&&process.nextTick||In,so=e=>e!=null&&pe(e[st]),h={isArray:$e,isArrayBuffer:Dn,isBuffer:qe,isFormData:Ar,isArrayBufferView:xr,isString:wr,isNumber:$n,isBoolean:vr,isObject:Be,isPlainObject:Ze,isEmptyObject:Sr,isReadableStream:$r,isRequest:Nr,isResponse:Mr,isHeaders:kr,isUndefined:De,isDate:Er,isFile:_r,isReactNativeBlob:Tr,isReactNative:Rr,isBlob:jr,isRegExp:Jr,isFunction:pe,isStream:Or,isURLSearchParams:Dr,isTypedArray:Wr,isFileList:Cr,forEach:He,merge:Tt,extend:Fr,trim:Ir,stripBOM:Ur,inherits:Lr,toFlatObject:qr,kindOf:at,kindOfTest:xe,endsWith:Br,toArray:Hr,forEachEntry:zr,matchAll:Vr,isHTMLForm:Yr,hasOwnProperty:Ht,hasOwnProp:Ht,reduceDescriptors:kn,freezeMethods:Xr,toObjectSet:Gr,toCamelCase:Kr,noop:Zr,toFiniteNumber:Qr,findKey:Nn,global:ve,isContextDefined:Mn,isSpecCompliantForm:eo,toJSONObject:to,isAsyncFn:no,isThenable:ro,setImmediate:In,asap:oo,isIterable:so};let W=class Fn extends Error{static from(t,n,r,o,s,a){const l=new Fn(t.message,n||t.code,r,o,s);return l.cause=t,l.name=t.name,t.status!=null&&l.status==null&&(l.status=t.status),a&&Object.assign(l,a),l}constructor(t,n,r,o,s){super(t),Object.defineProperty(this,"message",{value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),o&&(this.request=o),s&&(this.response=s,this.status=s.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:h.toJSONObject(this.config),code:this.code,status:this.status}}};W.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";W.ERR_BAD_OPTION="ERR_BAD_OPTION";W.ECONNABORTED="ECONNABORTED";W.ETIMEDOUT="ETIMEDOUT";W.ERR_NETWORK="ERR_NETWORK";W.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";W.ERR_DEPRECATED="ERR_DEPRECATED";W.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";W.ERR_BAD_REQUEST="ERR_BAD_REQUEST";W.ERR_CANCELED="ERR_CANCELED";W.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";W.ERR_INVALID_URL="ERR_INVALID_URL";W.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const ao=null;function Rt(e){return h.isPlainObject(e)||h.isArray(e)}function Un(e){return h.endsWith(e,"[]")?e.slice(0,-2):e}function ft(e,t,n){return e?e.concat(t).map(function(o,s){return o=Un(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function io(e){return h.isArray(e)&&!e.some(Rt)}const lo=h.toFlatObject(h,{},null,function(t){return/^is[A-Z]/.test(t)});function lt(e,t,n){if(!h.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=h.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,R){return!h.isUndefined(R[f])});const r=n.metaTokens,o=n.visitor||y,s=n.dots,a=n.indexes,l=n.Blob||typeof Blob<"u"&&Blob,g=n.maxDepth===void 0?100:n.maxDepth,u=l&&h.isSpecCompliantForm(t);if(!h.isFunction(o))throw new TypeError("visitor must be a function");function c(d){if(d===null)return"";if(h.isDate(d))return d.toISOString();if(h.isBoolean(d))return d.toString();if(!u&&h.isBlob(d))throw new W("Blob is not supported. Use a Buffer instead.");return h.isArrayBuffer(d)||h.isTypedArray(d)?u&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function y(d,f,R){let D=d;if(h.isReactNative(t)&&h.isReactNativeBlob(d))return t.append(ft(R,f,s),c(d)),!1;if(d&&!R&&typeof d=="object"){if(h.endsWith(f,"{}"))f=r?f:f.slice(0,-2),d=JSON.stringify(d);else if(h.isArray(d)&&io(d)||(h.isFileList(d)||h.endsWith(f,"[]"))&&(D=h.toArray(d)))return f=Un(f),D.forEach(function(F,v){!(h.isUndefined(F)||F===null)&&t.append(a===!0?ft([f],v,s):a===null?f:f+"[]",c(F))}),!1}return Rt(d)?!0:(t.append(ft(R,f,s),c(d)),!1)}const T=[],x=Object.assign(lo,{defaultVisitor:y,convertValue:c,isVisitable:Rt});function p(d,f,R=0){if(!h.isUndefined(d)){if(R>g)throw new W("Object is too deeply nested ("+R+" levels). Max depth: "+g,W.ERR_FORM_DATA_DEPTH_EXCEEDED);if(T.indexOf(d)!==-1)throw Error("Circular reference detected in "+f.join("."));T.push(d),h.forEach(d,function(j,F){(!(h.isUndefined(j)||j===null)&&o.call(t,j,h.isString(F)?F.trim():F,f,x))===!0&&p(j,f?f.concat(F):[F],R+1)}),T.pop()}}if(!h.isObject(e))throw new TypeError("data must be an object");return p(e),t}function Wt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Ot(e,t){this._pairs=[],e&&lt(e,this,t)}const Ln=Ot.prototype;Ln.append=function(t,n){this._pairs.push([t,n])};Ln.toString=function(t){const n=t?function(r){return t.call(this,r,Wt)}:Wt;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function co(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function qn(e,t,n){if(!t)return e;const r=n&&n.encode||co,o=h.isFunction(n)?{serialize:n}:n,s=o&&o.serialize;let a;if(s?a=s(t,o):a=h.isURLSearchParams(t)?t.toString():new Ot(t,o).toString(r),a){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class zt{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){h.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Pt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},uo=typeof URLSearchParams<"u"?URLSearchParams:Ot,fo=typeof FormData<"u"?FormData:null,po=typeof Blob<"u"?Blob:null,ho={isBrowser:!0,classes:{URLSearchParams:uo,FormData:fo,Blob:po},protocols:["http","https","file","blob","url","data"]},At=typeof window<"u"&&typeof document<"u",jt=typeof navigator=="object"&&navigator||void 0,mo=At&&(!jt||["ReactNative","NativeScript","NS"].indexOf(jt.product)<0),yo=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",go=At&&window.location.href||"http://localhost",bo=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:At,hasStandardBrowserEnv:mo,hasStandardBrowserWebWorkerEnv:yo,navigator:jt,origin:go},Symbol.toStringTag,{value:"Module"})),de={...bo,...ho};function xo(e,t){return lt(e,new de.classes.URLSearchParams,{visitor:function(n,r,o,s){return de.isNode&&h.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function wo(e){return h.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function vo(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],t[s]=e[s];return t}function Bn(e){function t(n,r,o,s){let a=n[s++];if(a==="__proto__")return!0;const l=Number.isFinite(+a),g=s>=n.length;return a=!a&&h.isArray(o)?o.length:a,g?(h.hasOwnProp(o,a)?o[a]=h.isArray(o[a])?o[a].concat(r):[o[a],r]:o[a]=r,!l):((!o[a]||!h.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],s)&&h.isArray(o[a])&&(o[a]=vo(o[a])),!l)}if(h.isFormData(e)&&h.isFunction(e.entries)){const n={};return h.forEachEntry(e,(r,o)=>{t(wo(r),o,n,0)}),n}return null}const Pe=(e,t)=>e!=null&&h.hasOwnProp(e,t)?e[t]:void 0;function So(e,t,n){if(h.isString(e))try{return(t||JSON.parse)(e),h.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const We={transitional:Pt,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=h.isObject(t);if(s&&h.isHTMLForm(t)&&(t=new FormData(t)),h.isFormData(t))return o?JSON.stringify(Bn(t)):t;if(h.isArrayBuffer(t)||h.isBuffer(t)||h.isStream(t)||h.isFile(t)||h.isBlob(t)||h.isReadableStream(t))return t;if(h.isArrayBufferView(t))return t.buffer;if(h.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(s){const g=Pe(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return xo(t,g).toString();if((l=h.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=Pe(this,"env"),c=u&&u.FormData;return lt(l?{"files[]":t}:t,c&&new c,g)}}return s||o?(n.setContentType("application/json",!1),So(t)):t}],transformResponse:[function(t){const n=Pe(this,"transitional")||We.transitional,r=n&&n.forcedJSONParsing,o=Pe(this,"responseType"),s=o==="json";if(h.isResponse(t)||h.isReadableStream(t))return t;if(t&&h.isString(t)&&(r&&!o||s)){const l=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,Pe(this,"parseReviver"))}catch(g){if(l)throw g.name==="SyntaxError"?W.from(g,W.ERR_BAD_RESPONSE,this,null,Pe(this,"response")):g}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:de.classes.FormData,Blob:de.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};h.forEach(["delete","get","head","post","put","patch"],e=>{We.headers[e]={}});const Eo=h.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),_o=e=>{const t={};let n,r,o;return e&&e.split(`
2
+ `).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),r=a.substring(o+1).trim(),!(!n||t[n]&&Eo[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Vt=Symbol("internals"),To=/[^\x09\x20-\x7E\x80-\xFF]/g;function Ro(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}function ke(e){return e&&String(e).trim().toLowerCase()}function jo(e){return Ro(e.replace(To,""))}function Qe(e){return e===!1||e==null?e:h.isArray(e)?e.map(Qe):jo(String(e))}function Co(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Oo=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function pt(e,t,n,r,o){if(h.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!h.isString(t)){if(h.isString(r))return t.indexOf(r)!==-1;if(h.isRegExp(r))return r.test(t)}}function Po(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Ao(e,t){const n=h.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,s,a){return this[r].call(this,t,o,s,a)},configurable:!0})})}let he=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function s(l,g,u){const c=ke(g);if(!c)throw new Error("header name must be a non-empty string");const y=h.findKey(o,c);(!y||o[y]===void 0||u===!0||u===void 0&&o[y]!==!1)&&(o[y||g]=Qe(l))}const a=(l,g)=>h.forEach(l,(u,c)=>s(u,c,g));if(h.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(h.isString(t)&&(t=t.trim())&&!Oo(t))a(_o(t),n);else if(h.isObject(t)&&h.isIterable(t)){let l={},g,u;for(const c of t){if(!h.isArray(c))throw TypeError("Object iterator must return a key-value pair");l[u=c[0]]=(g=l[u])?h.isArray(g)?[...g,c[1]]:[g,c[1]]:c[1]}a(l,n)}else t!=null&&s(n,t,r);return this}get(t,n){if(t=ke(t),t){const r=h.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return Co(o);if(h.isFunction(n))return n.call(this,o,r);if(h.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ke(t),t){const r=h.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||pt(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function s(a){if(a=ke(a),a){const l=h.findKey(r,a);l&&(!n||pt(r,r[l],l,n))&&(delete r[l],o=!0)}}return h.isArray(t)?t.forEach(s):s(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const s=n[r];(!t||pt(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const n=this,r={};return h.forEach(this,(o,s)=>{const a=h.findKey(r,s);if(a){n[a]=Qe(o),delete n[s];return}const l=t?Po(s):String(s).trim();l!==s&&delete n[s],n[l]=Qe(o),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return h.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&h.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
3
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[Vt]=this[Vt]={accessors:{}}).accessors,o=this.prototype;function s(a){const l=ke(a);r[l]||(Ao(o,a),r[l]=!0)}return h.isArray(t)?t.forEach(s):s(t),this}};he.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);h.reduceDescriptors(he.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});h.freezeMethods(he);function ht(e,t){const n=this||We,r=t||n,o=he.from(r.headers);let s=r.data;return h.forEach(e,function(l){s=l.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function Hn(e){return!!(e&&e.__CANCEL__)}let ze=class extends W{constructor(t,n,r){super(t??"canceled",W.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Wn(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new W("Request failed with status code "+n.status,[W.ERR_BAD_REQUEST,W.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Do(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function $o(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,s=0,a;return t=t!==void 0?t:1e3,function(g){const u=Date.now(),c=r[s];a||(a=u),n[o]=g,r[o]=u;let y=s,T=0;for(;y!==o;)T+=n[y++],y=y%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),u-a<t)return;const x=c&&u-c;return x?Math.round(T*1e3/x):void 0}}function No(e,t){let n=0,r=1e3/t,o,s;const a=(u,c=Date.now())=>{n=c,o=null,s&&(clearTimeout(s),s=null),e(...u)};return[(...u)=>{const c=Date.now(),y=c-n;y>=r?a(u,c):(o=u,s||(s=setTimeout(()=>{s=null,a(o)},r-y)))},()=>o&&a(o)]}const nt=(e,t,n=3)=>{let r=0;const o=$o(50,250);return No(s=>{const a=s.loaded,l=s.lengthComputable?s.total:void 0,g=l!=null?Math.min(a,l):a,u=Math.max(0,g-r),c=o(u);r=Math.max(r,g);const y={loaded:g,total:l,progress:l?g/l:void 0,bytes:u,rate:c||void 0,estimated:c&&l?(l-g)/c:void 0,event:s,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(y)},n)},Yt=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Kt=e=>(...t)=>h.asap(()=>e(...t)),Mo=de.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,de.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(de.origin),de.navigator&&/(msie|trident)/i.test(de.navigator.userAgent)):()=>!0,ko=de.hasStandardBrowserEnv?{write(e,t,n,r,o,s,a){if(typeof document>"u")return;const l=[`${e}=${encodeURIComponent(t)}`];h.isNumber(n)&&l.push(`expires=${new Date(n).toUTCString()}`),h.isString(r)&&l.push(`path=${r}`),h.isString(o)&&l.push(`domain=${o}`),s===!0&&l.push("secure"),h.isString(a)&&l.push(`SameSite=${a}`),document.cookie=l.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Io(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Fo(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function zn(e,t,n){let r=!Io(t);return e&&(r||n===!1)?Fo(e,t):t}const Jt=e=>e instanceof he?{...e}:e;function Te(e,t){t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(u,c,y,T){return h.isPlainObject(u)&&h.isPlainObject(c)?h.merge.call({caseless:T},u,c):h.isPlainObject(c)?h.merge({},c):h.isArray(c)?c.slice():c}function o(u,c,y,T){if(h.isUndefined(c)){if(!h.isUndefined(u))return r(void 0,u,y,T)}else return r(u,c,y,T)}function s(u,c){if(!h.isUndefined(c))return r(void 0,c)}function a(u,c){if(h.isUndefined(c)){if(!h.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function l(u,c,y){if(h.hasOwnProp(t,y))return r(u,c);if(h.hasOwnProp(e,y))return r(void 0,u)}const g={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,allowedSocketPaths:a,responseEncoding:a,validateStatus:l,headers:(u,c,y)=>o(Jt(u),Jt(c),y,!0)};return h.forEach(Object.keys({...e,...t}),function(c){if(c==="__proto__"||c==="constructor"||c==="prototype")return;const y=h.hasOwnProp(g,c)?g[c]:o,T=h.hasOwnProp(e,c)?e[c]:void 0,x=h.hasOwnProp(t,c)?t[c]:void 0,p=y(T,x,c);h.isUndefined(p)&&y!==l||(n[c]=p)}),n}const Vn=e=>{const t=Te({},e),n=T=>h.hasOwnProp(t,T)?t[T]:void 0,r=n("data");let o=n("withXSRFToken");const s=n("xsrfHeaderName"),a=n("xsrfCookieName");let l=n("headers");const g=n("auth"),u=n("baseURL"),c=n("allowAbsoluteUrls"),y=n("url");if(t.headers=l=he.from(l),t.url=qn(zn(u,y,c),e.params,e.paramsSerializer),g&&l.set("Authorization","Basic "+btoa((g.username||"")+":"+(g.password?unescape(encodeURIComponent(g.password)):""))),h.isFormData(r)){if(de.hasStandardBrowserEnv||de.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if(h.isFunction(r.getHeaders)){const T=r.getHeaders(),x=["content-type","content-length"];Object.entries(T).forEach(([p,d])=>{x.includes(p.toLowerCase())&&l.set(p,d)})}}if(de.hasStandardBrowserEnv&&(h.isFunction(o)&&(o=o(t)),o===!0||o==null&&Mo(t.url))){const x=s&&a&&ko.read(a);x&&l.set(s,x)}return t},Uo=typeof XMLHttpRequest<"u",Lo=Uo&&function(e){return new Promise(function(n,r){const o=Vn(e);let s=o.data;const a=he.from(o.headers).normalize();let{responseType:l,onUploadProgress:g,onDownloadProgress:u}=o,c,y,T,x,p;function d(){x&&x(),p&&p(),o.cancelToken&&o.cancelToken.unsubscribe(c),o.signal&&o.signal.removeEventListener("abort",c)}let f=new XMLHttpRequest;f.open(o.method.toUpperCase(),o.url,!0),f.timeout=o.timeout;function R(){if(!f)return;const j=he.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),v={data:!l||l==="text"||l==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:j,config:e,request:f};Wn(function(te){n(te),d()},function(te){r(te),d()},v),f=null}"onloadend"in f?f.onloadend=R:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(R)},f.onabort=function(){f&&(r(new W("Request aborted",W.ECONNABORTED,e,f)),f=null)},f.onerror=function(F){const v=F&&F.message?F.message:"Network Error",Q=new W(v,W.ERR_NETWORK,e,f);Q.event=F||null,r(Q),f=null},f.ontimeout=function(){let F=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const v=o.transitional||Pt;o.timeoutErrorMessage&&(F=o.timeoutErrorMessage),r(new W(F,v.clarifyTimeoutError?W.ETIMEDOUT:W.ECONNABORTED,e,f)),f=null},s===void 0&&a.setContentType(null),"setRequestHeader"in f&&h.forEach(a.toJSON(),function(F,v){f.setRequestHeader(v,F)}),h.isUndefined(o.withCredentials)||(f.withCredentials=!!o.withCredentials),l&&l!=="json"&&(f.responseType=o.responseType),u&&([T,p]=nt(u,!0),f.addEventListener("progress",T)),g&&f.upload&&([y,x]=nt(g),f.upload.addEventListener("progress",y),f.upload.addEventListener("loadend",x)),(o.cancelToken||o.signal)&&(c=j=>{f&&(r(!j||j.type?new ze(null,e,f):j),f.abort(),f=null)},o.cancelToken&&o.cancelToken.subscribe(c),o.signal&&(o.signal.aborted?c():o.signal.addEventListener("abort",c)));const D=Do(o.url);if(D&&de.protocols.indexOf(D)===-1){r(new W("Unsupported protocol "+D+":",W.ERR_BAD_REQUEST,e));return}f.send(s||null)})},qo=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const s=function(u){if(!o){o=!0,l();const c=u instanceof Error?u:this.reason;r.abort(c instanceof W?c:new ze(c instanceof Error?c.message:c))}};let a=t&&setTimeout(()=>{a=null,s(new W(`timeout of ${t}ms exceeded`,W.ETIMEDOUT))},t);const l=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),e=null)};e.forEach(u=>u.addEventListener("abort",s));const{signal:g}=r;return g.unsubscribe=()=>h.asap(l),g}},Bo=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},Ho=async function*(e,t){for await(const n of Wo(e))yield*Bo(n,t)},Wo=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},Xt=(e,t,n,r)=>{const o=Ho(e,t);let s=0,a,l=g=>{a||(a=!0,r&&r(g))};return new ReadableStream({async pull(g){try{const{done:u,value:c}=await o.next();if(u){l(),g.close();return}let y=c.byteLength;if(n){let T=s+=y;n(T)}g.enqueue(new Uint8Array(c))}catch(u){throw l(u),u}},cancel(g){return l(g),o.return()}},{highWaterMark:2})},Gt=64*1024,{isFunction:Je}=h,zo=(({Request:e,Response:t})=>({Request:e,Response:t}))(h.global),{ReadableStream:Zt,TextEncoder:Qt}=h.global,en=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Vo=e=>{e=h.merge.call({skipUndefined:!0},zo,e);const{fetch:t,Request:n,Response:r}=e,o=t?Je(t):typeof fetch=="function",s=Je(n),a=Je(r);if(!o)return!1;const l=o&&Je(Zt),g=o&&(typeof Qt=="function"?(p=>d=>p.encode(d))(new Qt):async p=>new Uint8Array(await new n(p).arrayBuffer())),u=s&&l&&en(()=>{let p=!1;const d=new n(de.origin,{body:new Zt,method:"POST",get duplex(){return p=!0,"half"}}),f=d.headers.has("Content-Type");return d.body!=null&&d.body.cancel(),p&&!f}),c=a&&l&&en(()=>h.isReadableStream(new r("").body)),y={stream:c&&(p=>p.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!y[p]&&(y[p]=(d,f)=>{let R=d&&d[p];if(R)return R.call(d);throw new W(`Response type '${p}' is not supported`,W.ERR_NOT_SUPPORT,f)})});const T=async p=>{if(p==null)return 0;if(h.isBlob(p))return p.size;if(h.isSpecCompliantForm(p))return(await new n(de.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(h.isArrayBufferView(p)||h.isArrayBuffer(p))return p.byteLength;if(h.isURLSearchParams(p)&&(p=p+""),h.isString(p))return(await g(p)).byteLength},x=async(p,d)=>{const f=h.toFiniteNumber(p.getContentLength());return f??T(d)};return async p=>{let{url:d,method:f,data:R,signal:D,cancelToken:j,timeout:F,onDownloadProgress:v,onUploadProgress:Q,responseType:te,headers:A,withCredentials:$="same-origin",fetchOptions:G}=Vn(p),k=t||fetch;te=te?(te+"").toLowerCase():"text";let q=qo([D,j&&j.toAbortSignal()],F),ee=null;const C=q&&q.unsubscribe&&(()=>{q.unsubscribe()});let O;try{if(Q&&u&&f!=="get"&&f!=="head"&&(O=await x(A,R))!==0){let m=new n(d,{method:"POST",body:R,duplex:"half"}),S;if(h.isFormData(R)&&(S=m.headers.get("content-type"))&&A.setContentType(S),m.body){const[E,P]=Yt(O,nt(Kt(Q)));R=Xt(m.body,Gt,E,P)}}h.isString($)||($=$?"include":"omit");const w=s&&"credentials"in n.prototype;if(h.isFormData(R)){const m=A.getContentType();m&&/^multipart\/form-data/i.test(m)&&!/boundary=/i.test(m)&&A.delete("content-type")}const N={...G,signal:q,method:f.toUpperCase(),headers:A.normalize().toJSON(),body:R,duplex:"half",credentials:w?$:void 0};ee=s&&new n(d,N);let _=await(s?k(ee,G):k(d,N));const L=c&&(te==="stream"||te==="response");if(c&&(v||L&&C)){const m={};["status","statusText","headers"].forEach(B=>{m[B]=_[B]});const S=h.toFiniteNumber(_.headers.get("content-length")),[E,P]=v&&Yt(S,nt(Kt(v),!0))||[];_=new r(Xt(_.body,Gt,E,()=>{P&&P(),C&&C()}),m)}te=te||"text";let b=await y[h.findKey(y,te)||"text"](_,p);return!L&&C&&C(),await new Promise((m,S)=>{Wn(m,S,{data:b,headers:he.from(_.headers),status:_.status,statusText:_.statusText,config:p,request:ee})})}catch(w){throw C&&C(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new W("Network Error",W.ERR_NETWORK,p,ee,w&&w.response),{cause:w.cause||w}):W.from(w,w&&w.code,p,ee,w&&w.response)}}},Yo=new Map,Yn=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,s=[r,o,n];let a=s.length,l=a,g,u,c=Yo;for(;l--;)g=s[l],u=c.get(g),u===void 0&&c.set(g,u=l?new Map:Vo(t)),c=u;return u};Yn();const Dt={http:ao,xhr:Lo,fetch:{get:Yn}};h.forEach(Dt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const tn=e=>`- ${e}`,Ko=e=>h.isFunction(e)||e===null||e===!1;function Jo(e,t){e=h.isArray(e)?e:[e];const{length:n}=e;let r,o;const s={};for(let a=0;a<n;a++){r=e[a];let l;if(o=r,!Ko(r)&&(o=Dt[(l=String(r)).toLowerCase()],o===void 0))throw new W(`Unknown adapter '${l}'`);if(o&&(h.isFunction(o)||(o=o.get(t))))break;s[l||"#"+a]=o}if(!o){const a=Object.entries(s).map(([g,u])=>`adapter ${g} `+(u===!1?"is not supported by the environment":"is not available in the build"));let l=n?a.length>1?`since :
4
+ `+a.map(tn).join(`
5
+ `):" "+tn(a[0]):"as no adapter specified";throw new W("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return o}const Kn={getAdapter:Jo,adapters:Dt};function mt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ze(null,e)}function nn(e){return mt(e),e.headers=he.from(e.headers),e.data=ht.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Kn.getAdapter(e.adapter||We.adapter,e)(e).then(function(r){return mt(e),r.data=ht.call(e,e.transformResponse,r),r.headers=he.from(r.headers),r},function(r){return Hn(r)||(mt(e),r&&r.response&&(r.response.data=ht.call(e,e.transformResponse,r.response),r.response.headers=he.from(r.response.headers))),Promise.reject(r)})}const Jn="1.15.2",ct={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ct[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const rn={};ct.transitional=function(t,n,r){function o(s,a){return"[Axios v"+Jn+"] Transitional option '"+s+"'"+a+(r?". "+r:"")}return(s,a,l)=>{if(t===!1)throw new W(o(a," has been removed"+(n?" in "+n:"")),W.ERR_DEPRECATED);return n&&!rn[a]&&(rn[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,a,l):!0}};ct.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Xo(e,t,n){if(typeof e!="object")throw new W("options must be an object",W.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],a=Object.prototype.hasOwnProperty.call(t,s)?t[s]:void 0;if(a){const l=e[s],g=l===void 0||a(l,s,e);if(g!==!0)throw new W("option "+s+" must be "+g,W.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new W("Unknown option "+s,W.ERR_BAD_OPTION)}}const et={assertOptions:Xo,validators:ct},ye=et.validators;let Ee=class{constructor(t){this.defaults=t||{},this.interceptors={request:new zt,response:new zt}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const s=(()=>{if(!o.stack)return"";const a=o.stack.indexOf(`
6
+ `);return a===-1?"":o.stack.slice(a+1)})();try{if(!r.stack)r.stack=s;else if(s){const a=s.indexOf(`
7
+ `),l=a===-1?-1:s.indexOf(`
8
+ `,a+1),g=l===-1?"":s.slice(l+1);String(r.stack).endsWith(g)||(r.stack+=`
9
+ `+s)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Te(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&et.assertOptions(r,{silentJSONParsing:ye.transitional(ye.boolean),forcedJSONParsing:ye.transitional(ye.boolean),clarifyTimeoutError:ye.transitional(ye.boolean),legacyInterceptorReqResOrdering:ye.transitional(ye.boolean)},!1),o!=null&&(h.isFunction(o)?n.paramsSerializer={serialize:o}:et.assertOptions(o,{encode:ye.function,serialize:ye.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),et.assertOptions(n,{baseUrl:ye.spelling("baseURL"),withXsrfToken:ye.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=s&&h.merge(s.common,s[n.method]);s&&h.forEach(["delete","get","head","post","put","patch","common"],p=>{delete s[p]}),n.headers=he.concat(a,s);const l=[];let g=!0;this.interceptors.request.forEach(function(d){if(typeof d.runWhen=="function"&&d.runWhen(n)===!1)return;g=g&&d.synchronous;const f=n.transitional||Pt;f&&f.legacyInterceptorReqResOrdering?l.unshift(d.fulfilled,d.rejected):l.push(d.fulfilled,d.rejected)});const u=[];this.interceptors.response.forEach(function(d){u.push(d.fulfilled,d.rejected)});let c,y=0,T;if(!g){const p=[nn.bind(this),void 0];for(p.unshift(...l),p.push(...u),T=p.length,c=Promise.resolve(n);y<T;)c=c.then(p[y++],p[y++]);return c}T=l.length;let x=n;for(;y<T;){const p=l[y++],d=l[y++];try{x=p(x)}catch(f){d.call(this,f);break}}try{c=nn.call(this,x)}catch(p){return Promise.reject(p)}for(y=0,T=u.length;y<T;)c=c.then(u[y++],u[y++]);return c}getUri(t){t=Te(this.defaults,t);const n=zn(t.baseURL,t.url,t.allowAbsoluteUrls);return qn(n,t.params,t.paramsSerializer)}};h.forEach(["delete","get","head","options"],function(t){Ee.prototype[t]=function(n,r){return this.request(Te(r||{},{method:t,url:n,data:(r||{}).data}))}});h.forEach(["post","put","patch"],function(t){function n(r){return function(s,a,l){return this.request(Te(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}Ee.prototype[t]=n(),Ee.prototype[t+"Form"]=n(!0)});let Go=class Xn{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(o=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](o);r._listeners=null}),this.promise.then=o=>{let s;const a=new Promise(l=>{r.subscribe(l),s=l}).then(o);return a.cancel=function(){r.unsubscribe(s)},a},t(function(s,a,l){r.reason||(r.reason=new ze(s,a,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Xn(function(o){t=o}),cancel:t}}};function Zo(e){return function(n){return e.apply(null,n)}}function Qo(e){return h.isObject(e)&&e.isAxiosError===!0}const Ct={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ct).forEach(([e,t])=>{Ct[t]=e});function Gn(e){const t=new Ee(e),n=Pn(Ee.prototype.request,t);return h.extend(n,Ee.prototype,t,{allOwnKeys:!0}),h.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Gn(Te(e,o))},n}const ie=Gn(We);ie.Axios=Ee;ie.CanceledError=ze;ie.CancelToken=Go;ie.isCancel=Hn;ie.VERSION=Jn;ie.toFormData=lt;ie.AxiosError=W;ie.Cancel=ie.CanceledError;ie.all=function(t){return Promise.all(t)};ie.spread=Zo;ie.isAxiosError=Qo;ie.mergeConfig=Te;ie.AxiosHeaders=he;ie.formToJSON=e=>Bn(h.isHTMLForm(e)?new FormData(e):e);ie.getAdapter=Kn.getAdapter;ie.HttpStatusCode=Ct;ie.default=ie;const{Axios:Gs,AxiosError:Zs,CanceledError:Qs,isCancel:ea,CancelToken:ta,VERSION:na,all:ra,Cancel:oa,isAxiosError:sa,spread:aa,toFormData:ia,AxiosHeaders:la,HttpStatusCode:ca,formToJSON:ua,getAdapter:da,mergeConfig:fa}=ie,es=()=>new Promise(e=>setTimeout(()=>e(),800)),Ne=ie.create({baseURL:"https://npmapi.ubkerp.com/"}),$t=async(e,t,n)=>{const r=await Ne.post(e,t,{headers:{Authorization:n}});if(console.log("ddddfdfdfd",r.data?.Status),r.data?.Status=="Success")return r?.data?.data||r?.data;throw new Error(r.data?.msg)},Se=async(e,t)=>{try{let r=e;if(!e.includes("session_id")){const s=e.includes("?")?"&":"?";r=`${e}${s}session_id=1`}return(await Ne.get(r,{headers:{Authorization:t}})).data}catch(n){throw n.response?.status===401&&console.error("401 Unauthorized"),n}},ts=async(e,t)=>{const n=await Ne.post(e,"",{headers:{Authorization:t}});if(n.data?.Status=="Success")return n?.data?.data||n?.data;throw new Error(n.data?.msg)},yt=async(e,t)=>{const n=localStorage.getItem("authToken"),r=t?.arg;return(await Ne.post(e,r,{headers:{Authorization:n}}))?.data},Zn=async(e,t,n)=>(await es(),(await Ne.post(e,t,{headers:{Authorization:n}}))?.data),Nt=async(e,t,n)=>(await Ne.delete(`${e}/${t}`,{headers:{Authorization:n}})).data,ns=({token:e,menu:t})=>{const{isLoading:n,data:r}=we(e?["api/sdk/Menus",e]:null,([s,a])=>ts(s,a)),o=r?.find(s=>s.path===t)?.sub_menu??[];return console.log("menuData",r),i.jsx(I.Row,{gutter:[16,16],children:o?.map((s,a)=>s.dashboard_show==="YES"?i.jsx(I.Col,{xs:24,md:8,lg:8,children:i.jsx(oe,{children:i.jsx(On,{icon:`https://npmapi.ubkerp.com/icons/frontoffice/${s.icons}`,title:s.submenu_name,path:s.menu_key})})},`${a}office001`):null)})};function Qn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ce={},gt,on;function rs(){return on||(on=1,gt=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,o,s;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(s=Object.keys(t),r=s.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[o]))return!1;for(o=r;o--!==0;){var a=s[o];if(!e(t[a],n[a]))return!1}return!0}return t!==t&&n!==n}),gt}var Xe={exports:{}},Ge={exports:{}},ne={};var sn;function os(){if(sn)return ne;sn=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,g=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,y=e?Symbol.for("react.suspense"):60113,T=e?Symbol.for("react.suspense_list"):60120,x=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,d=e?Symbol.for("react.block"):60121,f=e?Symbol.for("react.fundamental"):60117,R=e?Symbol.for("react.responder"):60118,D=e?Symbol.for("react.scope"):60119;function j(v){if(typeof v=="object"&&v!==null){var Q=v.$$typeof;switch(Q){case t:switch(v=v.type,v){case g:case u:case r:case s:case o:case y:return v;default:switch(v=v&&v.$$typeof,v){case l:case c:case p:case x:case a:return v;default:return Q}}case n:return Q}}}function F(v){return j(v)===u}return ne.AsyncMode=g,ne.ConcurrentMode=u,ne.ContextConsumer=l,ne.ContextProvider=a,ne.Element=t,ne.ForwardRef=c,ne.Fragment=r,ne.Lazy=p,ne.Memo=x,ne.Portal=n,ne.Profiler=s,ne.StrictMode=o,ne.Suspense=y,ne.isAsyncMode=function(v){return F(v)||j(v)===g},ne.isConcurrentMode=F,ne.isContextConsumer=function(v){return j(v)===l},ne.isContextProvider=function(v){return j(v)===a},ne.isElement=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===t},ne.isForwardRef=function(v){return j(v)===c},ne.isFragment=function(v){return j(v)===r},ne.isLazy=function(v){return j(v)===p},ne.isMemo=function(v){return j(v)===x},ne.isPortal=function(v){return j(v)===n},ne.isProfiler=function(v){return j(v)===s},ne.isStrictMode=function(v){return j(v)===o},ne.isSuspense=function(v){return j(v)===y},ne.isValidElementType=function(v){return typeof v=="string"||typeof v=="function"||v===r||v===u||v===s||v===o||v===y||v===T||typeof v=="object"&&v!==null&&(v.$$typeof===p||v.$$typeof===x||v.$$typeof===a||v.$$typeof===l||v.$$typeof===c||v.$$typeof===f||v.$$typeof===R||v.$$typeof===D||v.$$typeof===d)},ne.typeOf=j,ne}var re={};var an;function ss(){return an||(an=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,g=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,y=e?Symbol.for("react.suspense"):60113,T=e?Symbol.for("react.suspense_list"):60120,x=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,d=e?Symbol.for("react.block"):60121,f=e?Symbol.for("react.fundamental"):60117,R=e?Symbol.for("react.responder"):60118,D=e?Symbol.for("react.scope"):60119;function j(M){return typeof M=="string"||typeof M=="function"||M===r||M===u||M===s||M===o||M===y||M===T||typeof M=="object"&&M!==null&&(M.$$typeof===p||M.$$typeof===x||M.$$typeof===a||M.$$typeof===l||M.$$typeof===c||M.$$typeof===f||M.$$typeof===R||M.$$typeof===D||M.$$typeof===d)}function F(M){if(typeof M=="object"&&M!==null){var ue=M.$$typeof;switch(ue){case t:var Re=M.type;switch(Re){case g:case u:case r:case s:case o:case y:return Re;default:var Ve=Re&&Re.$$typeof;switch(Ve){case l:case c:case p:case x:case a:return Ve;default:return ue}}case n:return ue}}}var v=g,Q=u,te=l,A=a,$=t,G=c,k=r,q=p,ee=x,C=n,O=s,w=o,N=y,_=!1;function L(M){return _||(_=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),b(M)||F(M)===g}function b(M){return F(M)===u}function m(M){return F(M)===l}function S(M){return F(M)===a}function E(M){return typeof M=="object"&&M!==null&&M.$$typeof===t}function P(M){return F(M)===c}function B(M){return F(M)===r}function z(M){return F(M)===p}function Y(M){return F(M)===x}function X(M){return F(M)===n}function J(M){return F(M)===s}function V(M){return F(M)===o}function se(M){return F(M)===y}re.AsyncMode=v,re.ConcurrentMode=Q,re.ContextConsumer=te,re.ContextProvider=A,re.Element=$,re.ForwardRef=G,re.Fragment=k,re.Lazy=q,re.Memo=ee,re.Portal=C,re.Profiler=O,re.StrictMode=w,re.Suspense=N,re.isAsyncMode=L,re.isConcurrentMode=b,re.isContextConsumer=m,re.isContextProvider=S,re.isElement=E,re.isForwardRef=P,re.isFragment=B,re.isLazy=z,re.isMemo=Y,re.isPortal=X,re.isProfiler=J,re.isStrictMode=V,re.isSuspense=se,re.isValidElementType=j,re.typeOf=F})()),re}var ln;function er(){return ln||(ln=1,process.env.NODE_ENV==="production"?Ge.exports=os():Ge.exports=ss()),Ge.exports}var bt,cn;function as(){if(cn)return bt;cn=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var a={},l=0;l<10;l++)a["_"+String.fromCharCode(l)]=l;var g=Object.getOwnPropertyNames(a).map(function(c){return a[c]});if(g.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(c){u[c]=c}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return bt=o()?Object.assign:function(s,a){for(var l,g=r(s),u,c=1;c<arguments.length;c++){l=Object(arguments[c]);for(var y in l)t.call(l,y)&&(g[y]=l[y]);if(e){u=e(l);for(var T=0;T<u.length;T++)n.call(l,u[T])&&(g[u[T]]=l[u[T]])}}return g},bt}var xt,un;function Mt(){if(un)return xt;un=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return xt=e,xt}var wt,dn;function tr(){return dn||(dn=1,wt=Function.call.bind(Object.prototype.hasOwnProperty)),wt}var vt,fn;function is(){if(fn)return vt;fn=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Mt(),n={},r=tr();e=function(s){var a="Warning: "+s;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(s,a,l,g,u){if(process.env.NODE_ENV!=="production"){for(var c in s)if(r(s,c)){var y;try{if(typeof s[c]!="function"){var T=Error((g||"React class")+": "+l+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw T.name="Invariant Violation",T}y=s[c](a,c,g,l,null,t)}catch(p){y=p}if(y&&!(y instanceof Error)&&e((g||"React class")+": type specification of "+l+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof y+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),y instanceof Error&&!(y.message in n)){n[y.message]=!0;var x=u?u():"";e("Failed "+l+" type: "+y.message+(x??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},vt=o,vt}var St,pn;function ls(){if(pn)return St;pn=1;var e=er(),t=as(),n=Mt(),r=tr(),o=is(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(l){var g="Warning: "+l;typeof console<"u"&&console.error(g);try{throw new Error(g)}catch{}});function a(){return null}return St=function(l,g){var u=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function y(b){var m=b&&(u&&b[u]||b[c]);if(typeof m=="function")return m}var T="<<anonymous>>",x={array:R("array"),bigint:R("bigint"),bool:R("boolean"),func:R("function"),number:R("number"),object:R("object"),string:R("string"),symbol:R("symbol"),any:D(),arrayOf:j,element:F(),elementType:v(),instanceOf:Q,node:G(),objectOf:A,oneOf:te,oneOfType:$,shape:q,exact:ee};function p(b,m){return b===m?b!==0||1/b===1/m:b!==b&&m!==m}function d(b,m){this.message=b,this.data=m&&typeof m=="object"?m:{},this.stack=""}d.prototype=Error.prototype;function f(b){if(process.env.NODE_ENV!=="production")var m={},S=0;function E(B,z,Y,X,J,V,se){if(X=X||T,V=V||Y,se!==n){if(g){var M=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw M.name="Invariant Violation",M}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ue=X+":"+Y;!m[ue]&&S<3&&(s("You are manually calling a React.PropTypes validation function for the `"+V+"` prop on `"+X+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),m[ue]=!0,S++)}}return z[Y]==null?B?z[Y]===null?new d("The "+J+" `"+V+"` is marked as required "+("in `"+X+"`, but its value is `null`.")):new d("The "+J+" `"+V+"` is marked as required in "+("`"+X+"`, but its value is `undefined`.")):null:b(z,Y,X,J,V)}var P=E.bind(null,!1);return P.isRequired=E.bind(null,!0),P}function R(b){function m(S,E,P,B,z,Y){var X=S[E],J=w(X);if(J!==b){var V=N(X);return new d("Invalid "+B+" `"+z+"` of type "+("`"+V+"` supplied to `"+P+"`, expected ")+("`"+b+"`."),{expectedType:b})}return null}return f(m)}function D(){return f(a)}function j(b){function m(S,E,P,B,z){if(typeof b!="function")return new d("Property `"+z+"` of component `"+P+"` has invalid PropType notation inside arrayOf.");var Y=S[E];if(!Array.isArray(Y)){var X=w(Y);return new d("Invalid "+B+" `"+z+"` of type "+("`"+X+"` supplied to `"+P+"`, expected an array."))}for(var J=0;J<Y.length;J++){var V=b(Y,J,P,B,z+"["+J+"]",n);if(V instanceof Error)return V}return null}return f(m)}function F(){function b(m,S,E,P,B){var z=m[S];if(!l(z)){var Y=w(z);return new d("Invalid "+P+" `"+B+"` of type "+("`"+Y+"` supplied to `"+E+"`, expected a single ReactElement."))}return null}return f(b)}function v(){function b(m,S,E,P,B){var z=m[S];if(!e.isValidElementType(z)){var Y=w(z);return new d("Invalid "+P+" `"+B+"` of type "+("`"+Y+"` supplied to `"+E+"`, expected a single ReactElement type."))}return null}return f(b)}function Q(b){function m(S,E,P,B,z){if(!(S[E]instanceof b)){var Y=b.name||T,X=L(S[E]);return new d("Invalid "+B+" `"+z+"` of type "+("`"+X+"` supplied to `"+P+"`, expected ")+("instance of `"+Y+"`."))}return null}return f(m)}function te(b){if(!Array.isArray(b))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),a;function m(S,E,P,B,z){for(var Y=S[E],X=0;X<b.length;X++)if(p(Y,b[X]))return null;var J=JSON.stringify(b,function(se,M){var ue=N(M);return ue==="symbol"?String(M):M});return new d("Invalid "+B+" `"+z+"` of value `"+String(Y)+"` "+("supplied to `"+P+"`, expected one of "+J+"."))}return f(m)}function A(b){function m(S,E,P,B,z){if(typeof b!="function")return new d("Property `"+z+"` of component `"+P+"` has invalid PropType notation inside objectOf.");var Y=S[E],X=w(Y);if(X!=="object")return new d("Invalid "+B+" `"+z+"` of type "+("`"+X+"` supplied to `"+P+"`, expected an object."));for(var J in Y)if(r(Y,J)){var V=b(Y,J,P,B,z+"."+J,n);if(V instanceof Error)return V}return null}return f(m)}function $(b){if(!Array.isArray(b))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var m=0;m<b.length;m++){var S=b[m];if(typeof S!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+_(S)+" at index "+m+"."),a}function E(P,B,z,Y,X){for(var J=[],V=0;V<b.length;V++){var se=b[V],M=se(P,B,z,Y,X,n);if(M==null)return null;M.data&&r(M.data,"expectedType")&&J.push(M.data.expectedType)}var ue=J.length>0?", expected one of type ["+J.join(", ")+"]":"";return new d("Invalid "+Y+" `"+X+"` supplied to "+("`"+z+"`"+ue+"."))}return f(E)}function G(){function b(m,S,E,P,B){return C(m[S])?null:new d("Invalid "+P+" `"+B+"` supplied to "+("`"+E+"`, expected a ReactNode."))}return f(b)}function k(b,m,S,E,P){return new d((b||"React class")+": "+m+" type `"+S+"."+E+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+P+"`.")}function q(b){function m(S,E,P,B,z){var Y=S[E],X=w(Y);if(X!=="object")return new d("Invalid "+B+" `"+z+"` of type `"+X+"` "+("supplied to `"+P+"`, expected `object`."));for(var J in b){var V=b[J];if(typeof V!="function")return k(P,B,z,J,N(V));var se=V(Y,J,P,B,z+"."+J,n);if(se)return se}return null}return f(m)}function ee(b){function m(S,E,P,B,z){var Y=S[E],X=w(Y);if(X!=="object")return new d("Invalid "+B+" `"+z+"` of type `"+X+"` "+("supplied to `"+P+"`, expected `object`."));var J=t({},S[E],b);for(var V in J){var se=b[V];if(r(b,V)&&typeof se!="function")return k(P,B,z,V,N(se));if(!se)return new d("Invalid "+B+" `"+z+"` key `"+V+"` supplied to `"+P+"`.\nBad object: "+JSON.stringify(S[E],null," ")+`
10
+ Valid keys: `+JSON.stringify(Object.keys(b),null," "));var M=se(Y,V,P,B,z+"."+V,n);if(M)return M}return null}return f(m)}function C(b){switch(typeof b){case"number":case"string":case"undefined":return!0;case"boolean":return!b;case"object":if(Array.isArray(b))return b.every(C);if(b===null||l(b))return!0;var m=y(b);if(m){var S=m.call(b),E;if(m!==b.entries){for(;!(E=S.next()).done;)if(!C(E.value))return!1}else for(;!(E=S.next()).done;){var P=E.value;if(P&&!C(P[1]))return!1}}else return!1;return!0;default:return!1}}function O(b,m){return b==="symbol"?!0:m?m["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&m instanceof Symbol:!1}function w(b){var m=typeof b;return Array.isArray(b)?"array":b instanceof RegExp?"object":O(m,b)?"symbol":m}function N(b){if(typeof b>"u"||b===null)return""+b;var m=w(b);if(m==="object"){if(b instanceof Date)return"date";if(b instanceof RegExp)return"regexp"}return m}function _(b){var m=N(b);switch(m){case"array":case"object":return"an "+m;case"boolean":case"date":case"regexp":return"a "+m;default:return m}}function L(b){return!b.constructor||!b.constructor.name?T:b.constructor.name}return x.checkPropTypes=o,x.resetWarningCache=o.resetWarningCache,x.PropTypes=x,x},St}var Et,hn;function cs(){if(hn)return Et;hn=1;var e=Mt();function t(){}function n(){}return n.resetWarningCache=t,Et=function(){function r(a,l,g,u,c,y){if(y!==e){var T=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw T.name="Invariant Violation",T}}r.isRequired=r;function o(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},Et}var mn;function nr(){if(mn)return Xe.exports;if(mn=1,process.env.NODE_ENV!=="production"){var e=er(),t=!0;Xe.exports=ls()(e.isElement,t)}else Xe.exports=cs()();return Xe.exports}var yn;function us(){if(yn)return ce;yn=1;var e=ce&&ce.__extends||(function(){var x=function(p,d){return x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,R){f.__proto__=R}||function(f,R){for(var D in R)Object.prototype.hasOwnProperty.call(R,D)&&(f[D]=R[D])},x(p,d)};return function(p,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");x(p,d);function f(){this.constructor=p}p.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}})(),t=ce&&ce.__assign||function(){return t=Object.assign||function(x){for(var p,d=1,f=arguments.length;d<f;d++){p=arguments[d];for(var R in p)Object.prototype.hasOwnProperty.call(p,R)&&(x[R]=p[R])}return x},t.apply(this,arguments)},n=ce&&ce.__createBinding||(Object.create?(function(x,p,d,f){f===void 0&&(f=d);var R=Object.getOwnPropertyDescriptor(p,d);(!R||("get"in R?!p.__esModule:R.writable||R.configurable))&&(R={enumerable:!0,get:function(){return p[d]}}),Object.defineProperty(x,f,R)}):(function(x,p,d,f){f===void 0&&(f=d),x[f]=p[d]})),r=ce&&ce.__setModuleDefault||(Object.create?(function(x,p){Object.defineProperty(x,"default",{enumerable:!0,value:p})}):function(x,p){x.default=p}),o=ce&&ce.__importStar||function(x){if(x&&x.__esModule)return x;var p={};if(x!=null)for(var d in x)d!=="default"&&Object.prototype.hasOwnProperty.call(x,d)&&n(p,x,d);return r(p,x),p},s=ce&&ce.__rest||function(x,p){var d={};for(var f in x)Object.prototype.hasOwnProperty.call(x,f)&&p.indexOf(f)<0&&(d[f]=x[f]);if(x!=null&&typeof Object.getOwnPropertySymbols=="function")for(var R=0,f=Object.getOwnPropertySymbols(x);R<f.length;R++)p.indexOf(f[R])<0&&Object.prototype.propertyIsEnumerable.call(x,f[R])&&(d[f[R]]=x[f[R]]);return d},a=ce&&ce.__importDefault||function(x){return x&&x.__esModule?x:{default:x}};Object.defineProperty(ce,"__esModule",{value:!0});var l=o(K),g=a(rs()),u=o(nr());function c(x){return x&&x.replace(/&nbsp;|\u202F|\u00A0/g," ").replace(/<br \/>/g,"<br>")}function y(x){var p=document.createTextNode("");x.appendChild(p);var d=document.activeElement===x;if(p!==null&&p.nodeValue!==null&&d){var f=window.getSelection();if(f!==null){var R=document.createRange();R.setStart(p,p.nodeValue.length),R.collapse(!0),f.removeAllRanges(),f.addRange(R)}x instanceof HTMLElement&&x.focus()}}var T=(function(x){e(p,x);function p(){var d=x!==null&&x.apply(this,arguments)||this;return d.lastHtml=d.props.html,d.el=typeof d.props.innerRef=="function"?{current:null}:l.createRef(),d.getEl=function(){return(d.props.innerRef&&typeof d.props.innerRef!="function"?d.props.innerRef:d.el).current},d.emitChange=function(f){var R=d.getEl();if(R){var D=R.innerHTML;if(d.props.onChange&&D!==d.lastHtml){var j=Object.assign({},f,{target:{value:D}});d.props.onChange(j)}d.lastHtml=D}},d}return p.prototype.render=function(){var d=this,f=this.props,R=f.tagName,D=f.html,j=f.innerRef,F=s(f,["tagName","html","innerRef"]);return l.createElement(R||"div",t(t({},F),{ref:typeof j=="function"?function(v){j(v),d.el.current=v}:j||this.el,onInput:this.emitChange,onBlur:this.props.onBlur||this.emitChange,onKeyUp:this.props.onKeyUp||this.emitChange,onKeyDown:this.props.onKeyDown||this.emitChange,contentEditable:!this.props.disabled,dangerouslySetInnerHTML:{__html:D}}),this.props.children)},p.prototype.shouldComponentUpdate=function(d){var f=this.props,R=this.getEl();return!R||c(d.html)!==c(R.innerHTML)?!0:f.disabled!==d.disabled||f.tagName!==d.tagName||f.className!==d.className||f.innerRef!==d.innerRef||f.placeholder!==d.placeholder||!(0,g.default)(f.style,d.style)},p.prototype.componentDidUpdate=function(){var d=this.getEl();d&&(this.props.html!==d.innerHTML&&(d.innerHTML=this.props.html),this.lastHtml=this.props.html,y(d))},p.propTypes={html:u.string.isRequired,onChange:u.func,disabled:u.bool,tagName:u.string,className:u.string,style:u.object,innerRef:u.oneOfType([u.object,u.func])},p})(l.Component);return ce.default=T,ce}var ds=us();const fs=Qn(ds),ps={display:"block",marginBottom:6,fontSize:"14px",fontWeight:500,color:"#222"},hs={width:"100%",minHeight:40,padding:"8px 0",fontSize:"14px",color:"#222",background:"transparent",border:0,borderTop:0,borderLeft:0,borderRight:0,borderBottom:"1px solid #d9d9d9",borderRadius:0,boxShadow:"none",outline:"none",transition:"border-color 0.2s ease"},ae=K.forwardRef(({style:e,onFocus:t,onBlur:n,...r},o)=>{const[s,a]=K.useState(!1);return i.jsxs("div",{className:"",style:{width:"100%"},children:[r.label&&i.jsx("label",{className:"labelfont",style:ps,children:r.label}),i.jsx("input",{placeholder:r.placeholder||r.label,...r,ref:o,onFocus:l=>{a(!0),t?.(l)},onBlur:l=>{a(!1),n?.(l)},style:{...hs,borderBottom:`1px solid ${s?"#222":"#d9d9d9"}`,...e||{}}})]})});var tt={exports:{}},ms=tt.exports,gn;function ys(){return gn||(gn=1,(function(e,t){(function(n,r){e.exports=r()})(ms,(function(){var n=1e3,r=6e4,o=36e5,s="millisecond",a="second",l="minute",g="hour",u="day",c="week",y="month",T="quarter",x="year",p="date",d="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,R=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,D={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(C){var O=["th","st","nd","rd"],w=C%100;return"["+C+(O[(w-20)%10]||O[w]||O[0])+"]"}},j=function(C,O,w){var N=String(C);return!N||N.length>=O?C:""+Array(O+1-N.length).join(w)+C},F={s:j,z:function(C){var O=-C.utcOffset(),w=Math.abs(O),N=Math.floor(w/60),_=w%60;return(O<=0?"+":"-")+j(N,2,"0")+":"+j(_,2,"0")},m:function C(O,w){if(O.date()<w.date())return-C(w,O);var N=12*(w.year()-O.year())+(w.month()-O.month()),_=O.clone().add(N,y),L=w-_<0,b=O.clone().add(N+(L?-1:1),y);return+(-(N+(w-_)/(L?_-b:b-_))||0)},a:function(C){return C<0?Math.ceil(C)||0:Math.floor(C)},p:function(C){return{M:y,y:x,w:c,d:u,D:p,h:g,m:l,s:a,ms:s,Q:T}[C]||String(C||"").toLowerCase().replace(/s$/,"")},u:function(C){return C===void 0}},v="en",Q={};Q[v]=D;var te="$isDayjsObject",A=function(C){return C instanceof q||!(!C||!C[te])},$=function C(O,w,N){var _;if(!O)return v;if(typeof O=="string"){var L=O.toLowerCase();Q[L]&&(_=L),w&&(Q[L]=w,_=L);var b=O.split("-");if(!_&&b.length>1)return C(b[0])}else{var m=O.name;Q[m]=O,_=m}return!N&&_&&(v=_),_||!N&&v},G=function(C,O){if(A(C))return C.clone();var w=typeof O=="object"?O:{};return w.date=C,w.args=arguments,new q(w)},k=F;k.l=$,k.i=A,k.w=function(C,O){return G(C,{locale:O.$L,utc:O.$u,x:O.$x,$offset:O.$offset})};var q=(function(){function C(w){this.$L=$(w.locale,null,!0),this.parse(w),this.$x=this.$x||w.x||{},this[te]=!0}var O=C.prototype;return O.parse=function(w){this.$d=(function(N){var _=N.date,L=N.utc;if(_===null)return new Date(NaN);if(k.u(_))return new Date;if(_ instanceof Date)return new Date(_);if(typeof _=="string"&&!/Z$/i.test(_)){var b=_.match(f);if(b){var m=b[2]-1||0,S=(b[7]||"0").substring(0,3);return L?new Date(Date.UTC(b[1],m,b[3]||1,b[4]||0,b[5]||0,b[6]||0,S)):new Date(b[1],m,b[3]||1,b[4]||0,b[5]||0,b[6]||0,S)}}return new Date(_)})(w),this.init()},O.init=function(){var w=this.$d;this.$y=w.getFullYear(),this.$M=w.getMonth(),this.$D=w.getDate(),this.$W=w.getDay(),this.$H=w.getHours(),this.$m=w.getMinutes(),this.$s=w.getSeconds(),this.$ms=w.getMilliseconds()},O.$utils=function(){return k},O.isValid=function(){return this.$d.toString()!==d},O.isSame=function(w,N){var _=G(w);return this.startOf(N)<=_&&_<=this.endOf(N)},O.isAfter=function(w,N){return G(w)<this.startOf(N)},O.isBefore=function(w,N){return this.endOf(N)<G(w)},O.$g=function(w,N,_){return k.u(w)?this[N]:this.set(_,w)},O.unix=function(){return Math.floor(this.valueOf()/1e3)},O.valueOf=function(){return this.$d.getTime()},O.startOf=function(w,N){var _=this,L=!!k.u(N)||N,b=k.p(w),m=function(J,V){var se=k.w(_.$u?Date.UTC(_.$y,V,J):new Date(_.$y,V,J),_);return L?se:se.endOf(u)},S=function(J,V){return k.w(_.toDate()[J].apply(_.toDate("s"),(L?[0,0,0,0]:[23,59,59,999]).slice(V)),_)},E=this.$W,P=this.$M,B=this.$D,z="set"+(this.$u?"UTC":"");switch(b){case x:return L?m(1,0):m(31,11);case y:return L?m(1,P):m(0,P+1);case c:var Y=this.$locale().weekStart||0,X=(E<Y?E+7:E)-Y;return m(L?B-X:B+(6-X),P);case u:case p:return S(z+"Hours",0);case g:return S(z+"Minutes",1);case l:return S(z+"Seconds",2);case a:return S(z+"Milliseconds",3);default:return this.clone()}},O.endOf=function(w){return this.startOf(w,!1)},O.$set=function(w,N){var _,L=k.p(w),b="set"+(this.$u?"UTC":""),m=(_={},_[u]=b+"Date",_[p]=b+"Date",_[y]=b+"Month",_[x]=b+"FullYear",_[g]=b+"Hours",_[l]=b+"Minutes",_[a]=b+"Seconds",_[s]=b+"Milliseconds",_)[L],S=L===u?this.$D+(N-this.$W):N;if(L===y||L===x){var E=this.clone().set(p,1);E.$d[m](S),E.init(),this.$d=E.set(p,Math.min(this.$D,E.daysInMonth())).$d}else m&&this.$d[m](S);return this.init(),this},O.set=function(w,N){return this.clone().$set(w,N)},O.get=function(w){return this[k.p(w)]()},O.add=function(w,N){var _,L=this;w=Number(w);var b=k.p(N),m=function(P){var B=G(L);return k.w(B.date(B.date()+Math.round(P*w)),L)};if(b===y)return this.set(y,this.$M+w);if(b===x)return this.set(x,this.$y+w);if(b===u)return m(1);if(b===c)return m(7);var S=(_={},_[l]=r,_[g]=o,_[a]=n,_)[b]||1,E=this.$d.getTime()+w*S;return k.w(E,this)},O.subtract=function(w,N){return this.add(-1*w,N)},O.format=function(w){var N=this,_=this.$locale();if(!this.isValid())return _.invalidDate||d;var L=w||"YYYY-MM-DDTHH:mm:ssZ",b=k.z(this),m=this.$H,S=this.$m,E=this.$M,P=_.weekdays,B=_.months,z=_.meridiem,Y=function(V,se,M,ue){return V&&(V[se]||V(N,L))||M[se].slice(0,ue)},X=function(V){return k.s(m%12||12,V,"0")},J=z||function(V,se,M){var ue=V<12?"AM":"PM";return M?ue.toLowerCase():ue};return L.replace(R,(function(V,se){return se||(function(M){switch(M){case"YY":return String(N.$y).slice(-2);case"YYYY":return k.s(N.$y,4,"0");case"M":return E+1;case"MM":return k.s(E+1,2,"0");case"MMM":return Y(_.monthsShort,E,B,3);case"MMMM":return Y(B,E);case"D":return N.$D;case"DD":return k.s(N.$D,2,"0");case"d":return String(N.$W);case"dd":return Y(_.weekdaysMin,N.$W,P,2);case"ddd":return Y(_.weekdaysShort,N.$W,P,3);case"dddd":return P[N.$W];case"H":return String(m);case"HH":return k.s(m,2,"0");case"h":return X(1);case"hh":return X(2);case"a":return J(m,S,!0);case"A":return J(m,S,!1);case"m":return String(S);case"mm":return k.s(S,2,"0");case"s":return String(N.$s);case"ss":return k.s(N.$s,2,"0");case"SSS":return k.s(N.$ms,3,"0");case"Z":return b}return null})(V)||b.replace(":","")}))},O.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},O.diff=function(w,N,_){var L,b=this,m=k.p(N),S=G(w),E=(S.utcOffset()-this.utcOffset())*r,P=this-S,B=function(){return k.m(b,S)};switch(m){case x:L=B()/12;break;case y:L=B();break;case T:L=B()/3;break;case c:L=(P-E)/6048e5;break;case u:L=(P-E)/864e5;break;case g:L=P/o;break;case l:L=P/r;break;case a:L=P/n;break;default:L=P}return _?L:k.a(L)},O.daysInMonth=function(){return this.endOf(y).$D},O.$locale=function(){return Q[this.$L]},O.locale=function(w,N){if(!w)return this.$L;var _=this.clone(),L=$(w,N,!0);return L&&(_.$L=L),_},O.clone=function(){return k.w(this.$d,this)},O.toDate=function(){return new Date(this.valueOf())},O.toJSON=function(){return this.isValid()?this.toISOString():null},O.toISOString=function(){return this.$d.toISOString()},O.toString=function(){return this.$d.toUTCString()},C})(),ee=q.prototype;return G.prototype=ee,[["$ms",s],["$s",a],["$m",l],["$H",g],["$W",u],["$M",y],["$y",x],["$D",p]].forEach((function(C){ee[C[1]]=function(O){return this.$g(O,C[0],C[1])}})),G.extend=function(C,O){return C.$i||(C(O,q,G),C.$i=!0),G},G.locale=$,G.isDayjs=A,G.unix=function(C){return G(1e3*C)},G.en=Q[v],G.Ls=Q,G.p={},G}))})(tt)),tt.exports}ys();function gs(){return[{label:"One Time (During Admission)",value:"one_time"},{label:"One Time",value:"one_time_without_admission"},{label:"Monthly",value:"monthly"},{label:"Quarterly",value:"quarterly"},{label:"Half Yearly",value:"half_yearly"},{label:"Yearly",value:"yearly"}]}const bs=e=>{const t=JSON.parse(localStorage.getItem("genrall_settings"));return console.log("amount______",e),i.jsxs(i.Fragment,{children:[t?.currency_icon," ",Number(e||0).toLocaleString("en-IN")]})};var Ie={},Fe={},me={},Ue={},Ae={},bn;function xs(){if(bn)return Ae;bn=1;var e=Ae&&Ae.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Ae,"__esModule",{value:!0});const t=e(K),n=yr,r=["string","number","boolean"];function o({header:s,body:a}){const l=t.default.createElement("tr",null,s.map(u=>t.default.createElement("th",{key:u},u))),g=a.map((u,c)=>Array.isArray(u)?t.default.createElement("tr",{key:c},u.map((y,T)=>t.default.createElement("th",{key:T}," ",y," "))):u!==null&&typeof u=="object"?t.default.createElement("tr",{key:c},Object.entries(u).map(([y,T],x)=>typeof T=="object"?(console.error(`typeof ${y} is incorrect, only accept ${r.join(", ")} `),t.default.createElement("th",{key:x})):t.default.createElement("th",{key:x},t.default.createElement(t.default.Fragment,null,T)))):(console.error(`
11
11
  data structure is incorrect,
12
12
  data structure type ->
13
13
  " type data = Array<{ [key: string]: string | number | boolean }>
14
14
  or
15
15
  type data = Array<(string | number | boolean)[]>"
16
- `),null));return(0,n.renderToString)(t.default.createElement("table",null,t.default.createElement("tbody",null,a,b)))}return Oe.default=o,Oe}var cn;function cs(){return cn||(cn=1,(function(e){var t=Ne&&Ne.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(e,"__esModule",{value:!0}),e.createTable=e.template=e.uri=e.format=e.base64=void 0;function n(s){return window.btoa(unescape(encodeURIComponent(s)))}e.base64=n;function r(s,i){return s.replace(/{(\w+)}/g,(a,b)=>i[b])}e.format=r,e.uri="data:application/vnd.ms-excel;base64,",e.template='<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><meta charset="UTF-8"><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--></head><body>{table}</body></html>';var o=ls();Object.defineProperty(e,"createTable",{enumerable:!0,get:function(){return t(o).default}})})(Ne)),Ne}var un;function Hn(){if(un)return pe;un=1;var e=pe&&pe.__createBinding||(Object.create?(function(c,l,m,S){S===void 0&&(S=m);var g=Object.getOwnPropertyDescriptor(l,m);(!g||("get"in g?!l.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return l[m]}}),Object.defineProperty(c,S,g)}):(function(c,l,m,S){S===void 0&&(S=m),c[S]=l[m]})),t=pe&&pe.__setModuleDefault||(Object.create?(function(c,l){Object.defineProperty(c,"default",{enumerable:!0,value:l})}):function(c,l){c.default=l}),n=pe&&pe.__importStar||function(c){if(c&&c.__esModule)return c;var l={};if(c!=null)for(var m in c)m!=="default"&&Object.prototype.hasOwnProperty.call(c,m)&&e(l,c,m);return t(l,c),l};Object.defineProperty(pe,"__esModule",{value:!0}),pe.downloadExcel=pe.excel=void 0;const r=n(cs());function o(){return document?!0:((process==null?void 0:process.env.NODE_ENV)!=="production"&&console.error("Failed to access document object"),!1)}function s(c,l){const m=window.document.createElement("a");return m.href=r.uri+r.base64(r.format(r.template,l)),m.download=c,document.body.appendChild(m),m.click(),document.body.removeChild(m),!0}function i(c,l){if(c)return c.cloneNode(!0).outerHTML;if(l)return r.createTable(l);console.error("currentTableRef or tablePayload does not exist")}function a({fileName:c,sheet:l,tablePayload:m},S){if(!o())return!1;const g=i(S,m);return s(c,{worksheet:l||"Worksheet",table:g})}pe.downloadExcel=a;function b({currentTableRef:c,filename:l,sheet:m}){function S(){if(!o())return!1;const g=i(c),h=`${l}.xls`;return s(h,{worksheet:m||"Worksheet",table:g})}return{onDownload:S}}return pe.excel=b,pe}var dn;function us(){if(dn)return Me;dn=1,Object.defineProperty(Me,"__esModule",{value:!0}),Me.useDownloadExcel=void 0;const e=ne,t=Hn();function n({currentTableRef:r,filename:o,sheet:s}){const[i,a]=(0,e.useState)({});return(0,e.useEffect)(()=>{a({currentTableRef:r,filename:o,sheet:s})},[r,o,s]),(0,e.useMemo)(()=>(0,t.excel)(i),[i])}return Me.useDownloadExcel=n,Me}var fn;function ds(){return fn||(fn=1,(function(e){var t=$e&&$e.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(e,"__esModule",{value:!0}),e.downloadExcel=e.useDownloadExcel=e.DownloadTableExcel=void 0;const n=t(ne),r=us();Object.defineProperty(e,"useDownloadExcel",{enumerable:!0,get:function(){return r.useDownloadExcel}});const o=Hn();Object.defineProperty(e,"downloadExcel",{enumerable:!0,get:function(){return o.downloadExcel}});const s=({currentTableRef:i,filename:a,sheet:b,children:c})=>{const{onDownload:l}=(0,r.useDownloadExcel)({currentTableRef:i,filename:a,sheet:b});return n.default.createElement("span",{onClick:l},c)};e.DownloadTableExcel=s})($e)),$e}var fs=ds();const Wn="printWindow";function ps(e){const t=document.createElement("iframe");return t.width=`${document.documentElement.clientWidth}px`,t.height=`${document.documentElement.clientHeight}px`,t.style.position="absolute",t.style.top=`-${document.documentElement.clientHeight+100}px`,t.style.left=`-${document.documentElement.clientWidth+100}px`,t.id=Wn,t.srcdoc="<!DOCTYPE html>",e&&(e.allow&&(t.allow=e.allow),e.referrerPolicy!==void 0&&(t.referrerPolicy=e.referrerPolicy),e.sandbox!==void 0&&(t.sandbox=e.sandbox)),t}function ue({level:e="error",messages:t,suppressErrors:n=!1}){n||(e==="error"?console.error(t):e==="warning"?console.warn(t):console.debug(t))}function zn(e,t){if(t||!e){const n=document.getElementById(Wn);n&&document.body.removeChild(n)}}function Ze(e){return e instanceof Error?e:new Error("Unknown Error")}function pn(e,t){const{documentTitle:n,onAfterPrint:r,onPrintError:o,preserveAfterPrint:s,print:i,suppressErrors:a}=t;setTimeout(()=>{if(e.contentWindow){let b=function(){r?.(),zn(s)};if(e.contentWindow.focus(),i)i(e).then(b).catch(c=>{o?o("print",Ze(c)):ue({messages:["An error was thrown by the specified `print` function"],suppressErrors:a})});else{if(e.contentWindow.print){const c=e.contentDocument?.title??"",l=e.ownerDocument.title,m=typeof n=="function"?n():n;m&&(e.ownerDocument.title=m,e.contentDocument&&(e.contentDocument.title=m)),e.contentWindow.print(),m&&(e.ownerDocument.title=l,e.contentDocument&&(e.contentDocument.title=c))}else ue({messages:["Printing for this browser is not currently possible: the browser does not have a `print` method available for iframes."],suppressErrors:a});hs()?setTimeout(b,500):b()}}else ue({messages:["Printing failed because the `contentWindow` of the print iframe did not load. This is possibly an error with `react-to-print`. Please file an issue: https://github.com/MatthewHerbst/react-to-print/issues/"],suppressErrors:a})},500)}function hs(){return[/Android/i,/webOS/i,/iPhone/i,/iPad/i,/iPod/i,/BlackBerry/i,/Windows Phone/i].some(e=>(navigator.userAgent??navigator.vendor??("opera"in window&&window.opera)).match(e))}function hn(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,null);let r=n.nextNode();for(;r;)t.push(r),r=n.nextNode();return t}function Vn(e,t,n){const r=hn(e),o=hn(t);if(r.length!==o.length){ue({messages:["When cloning shadow root content, source and target elements have different size. `onBeforePrint` likely resolved too early.",e,t],suppressErrors:n});return}for(let s=0;s<r.length;s++){const i=r[s],a=o[s],b=i.shadowRoot;if(b!==null){const c=a.attachShadow({mode:b.mode});c.innerHTML=b.innerHTML,Vn(b,c,n)}}}const ms=`
16
+ `),null));return(0,n.renderToString)(t.default.createElement("table",null,t.default.createElement("tbody",null,l,g)))}return Ae.default=o,Ae}var xn;function ws(){return xn||(xn=1,(function(e){var t=Ue&&Ue.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(e,"__esModule",{value:!0}),e.createTable=e.template=e.uri=e.format=e.base64=void 0;function n(s){return window.btoa(unescape(encodeURIComponent(s)))}e.base64=n;function r(s,a){return s.replace(/{(\w+)}/g,(l,g)=>a[g])}e.format=r,e.uri="data:application/vnd.ms-excel;base64,",e.template='<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><meta charset="UTF-8"><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--></head><body>{table}</body></html>';var o=xs();Object.defineProperty(e,"createTable",{enumerable:!0,get:function(){return t(o).default}})})(Ue)),Ue}var wn;function rr(){if(wn)return me;wn=1;var e=me&&me.__createBinding||(Object.create?(function(u,c,y,T){T===void 0&&(T=y);var x=Object.getOwnPropertyDescriptor(c,y);(!x||("get"in x?!c.__esModule:x.writable||x.configurable))&&(x={enumerable:!0,get:function(){return c[y]}}),Object.defineProperty(u,T,x)}):(function(u,c,y,T){T===void 0&&(T=y),u[T]=c[y]})),t=me&&me.__setModuleDefault||(Object.create?(function(u,c){Object.defineProperty(u,"default",{enumerable:!0,value:c})}):function(u,c){u.default=c}),n=me&&me.__importStar||function(u){if(u&&u.__esModule)return u;var c={};if(u!=null)for(var y in u)y!=="default"&&Object.prototype.hasOwnProperty.call(u,y)&&e(c,u,y);return t(c,u),c};Object.defineProperty(me,"__esModule",{value:!0}),me.downloadExcel=me.excel=void 0;const r=n(ws());function o(){return document?!0:((process==null?void 0:process.env.NODE_ENV)!=="production"&&console.error("Failed to access document object"),!1)}function s(u,c){const y=window.document.createElement("a");return y.href=r.uri+r.base64(r.format(r.template,c)),y.download=u,document.body.appendChild(y),y.click(),document.body.removeChild(y),!0}function a(u,c){if(u)return u.cloneNode(!0).outerHTML;if(c)return r.createTable(c);console.error("currentTableRef or tablePayload does not exist")}function l({fileName:u,sheet:c,tablePayload:y},T){if(!o())return!1;const x=a(T,y);return s(u,{worksheet:c||"Worksheet",table:x})}me.downloadExcel=l;function g({currentTableRef:u,filename:c,sheet:y}){function T(){if(!o())return!1;const x=a(u),p=`${c}.xls`;return s(p,{worksheet:y||"Worksheet",table:x})}return{onDownload:T}}return me.excel=g,me}var vn;function vs(){if(vn)return Fe;vn=1,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.useDownloadExcel=void 0;const e=K,t=rr();function n({currentTableRef:r,filename:o,sheet:s}){const[a,l]=(0,e.useState)({});return(0,e.useEffect)(()=>{l({currentTableRef:r,filename:o,sheet:s})},[r,o,s]),(0,e.useMemo)(()=>(0,t.excel)(a),[a])}return Fe.useDownloadExcel=n,Fe}var Sn;function Ss(){return Sn||(Sn=1,(function(e){var t=Ie&&Ie.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0}),e.downloadExcel=e.useDownloadExcel=e.DownloadTableExcel=void 0;const n=t(K),r=vs();Object.defineProperty(e,"useDownloadExcel",{enumerable:!0,get:function(){return r.useDownloadExcel}});const o=rr();Object.defineProperty(e,"downloadExcel",{enumerable:!0,get:function(){return o.downloadExcel}});const s=({currentTableRef:a,filename:l,sheet:g,children:u})=>{const{onDownload:c}=(0,r.useDownloadExcel)({currentTableRef:a,filename:l,sheet:g});return n.default.createElement("span",{onClick:c},u)};e.DownloadTableExcel=s})(Ie)),Ie}var Es=Ss();const or="printWindow";function _s(e){const t=document.createElement("iframe");return t.width=`${document.documentElement.clientWidth}px`,t.height=`${document.documentElement.clientHeight}px`,t.style.position="absolute",t.style.top=`-${document.documentElement.clientHeight+100}px`,t.style.left=`-${document.documentElement.clientWidth+100}px`,t.id=or,t.srcdoc="<!DOCTYPE html>",e&&(e.allow&&(t.allow=e.allow),e.referrerPolicy!==void 0&&(t.referrerPolicy=e.referrerPolicy),e.sandbox!==void 0&&(t.sandbox=e.sandbox)),t}function fe({level:e="error",messages:t,suppressErrors:n=!1}){n||(e==="error"?console.error(t):e==="warning"?console.warn(t):console.debug(t))}function sr(e,t){if(t||!e){const n=document.getElementById(or);n&&document.body.removeChild(n)}}function rt(e){return e instanceof Error?e:new Error("Unknown Error")}function En(e,t){const{documentTitle:n,onAfterPrint:r,onPrintError:o,preserveAfterPrint:s,print:a,suppressErrors:l}=t;setTimeout(()=>{if(e.contentWindow){let g=function(){r?.(),sr(s)};if(e.contentWindow.focus(),a)a(e).then(g).catch(u=>{o?o("print",rt(u)):fe({messages:["An error was thrown by the specified `print` function"],suppressErrors:l})});else{if(e.contentWindow.print){const u=e.contentDocument?.title??"",c=e.ownerDocument.title,y=typeof n=="function"?n():n;y&&(e.ownerDocument.title=y,e.contentDocument&&(e.contentDocument.title=y)),e.contentWindow.print(),y&&(e.ownerDocument.title=c,e.contentDocument&&(e.contentDocument.title=u))}else fe({messages:["Printing for this browser is not currently possible: the browser does not have a `print` method available for iframes."],suppressErrors:l});Ts()?setTimeout(g,500):g()}}else fe({messages:["Printing failed because the `contentWindow` of the print iframe did not load. This is possibly an error with `react-to-print`. Please file an issue: https://github.com/MatthewHerbst/react-to-print/issues/"],suppressErrors:l})},500)}function Ts(){return[/Android/i,/webOS/i,/iPhone/i,/iPad/i,/iPod/i,/BlackBerry/i,/Windows Phone/i].some(e=>(navigator.userAgent??navigator.vendor??("opera"in window&&window.opera)).match(e))}function _n(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,null);let r=n.nextNode();for(;r;)t.push(r),r=n.nextNode();return t}function ar(e,t,n){const r=_n(e),o=_n(t);if(r.length!==o.length){fe({messages:["When cloning shadow root content, source and target elements have different size. `onBeforePrint` likely resolved too early.",e,t],suppressErrors:n});return}for(let s=0;s<r.length;s++){const a=r[s],l=o[s],g=a.shadowRoot;if(g!==null){const u=l.attachShadow({mode:g.mode});u.innerHTML=g.innerHTML,ar(g,u,n)}}}const Rs=`
17
17
  @page {
18
18
  /* Remove browser default header (title) and footer (url) */
19
19
  margin: 0;
@@ -26,8 +26,8 @@ Valid keys: `+JSON.stringify(Object.keys(y),null," "));var C=oe(z,H,$,B,W+"."+H
26
26
  -webkit-print-color-adjust: exact; /* Chrome/Safari/Edge/Opera */
27
27
  }
28
28
  }
29
- `;function ys(e,t,n){const{contentNode:r,clonedContentNode:o,clonedImgNodes:s,clonedVideoNodes:i,numResourcesToLoad:a,originalCanvasNodes:b}=t,{bodyClass:c,fonts:l,ignoreGlobalStyles:m,pageStyle:S,nonce:g,suppressErrors:h,copyShadowRoots:u}=n,f=[],R=[];function P(M,E){if(f.includes(M)){ue({level:"debug",messages:["Tried to mark a resource that has already been handled",M],suppressErrors:h});return}E?(ue({messages:['"react-to-print" was unable to load a resource but will continue attempting to print the page',...E],suppressErrors:h}),R.push(M)):f.push(M),f.length+R.length===a&&pn(e,n)}e.onload=null;const O=e.contentDocument??e.contentWindow?.document;if(O){const M=O.body.appendChild(o);u&&Vn(r,M,!!h),l&&(e.contentDocument?.fonts&&e.contentWindow?.FontFace?l.forEach(A=>{const L=new FontFace(A.family,A.source,{weight:A.weight,style:A.style});e.contentDocument.fonts.add(L),L.loaded.then(()=>{P(L)}).catch(te=>{P(L,["Failed loading the font:",L,"Load error:",Ze(te)])})}):(l.forEach(A=>{P(A)}),ue({messages:['"react-to-print" is not able to load custom fonts because the browser does not support the FontFace API but will continue attempting to print the page'],suppressErrors:h})));const E=S??ms,Z=O.createElement("style");g&&(Z.setAttribute("nonce",g),O.head.setAttribute("nonce",g)),Z.appendChild(O.createTextNode(E)),O.head.appendChild(Z),c&&O.body.classList.add(...c.split(" "));const re=O.querySelectorAll("canvas");for(let A=0;A<b.length;++A){const L=b[A],te=re[A];if(te===void 0){ue({messages:["A canvas element could not be copied for printing, has it loaded? `onBeforePrint` likely resolved too early.",L],suppressErrors:h});continue}const _=te.getContext("2d");_&&_.drawImage(L,0,0)}for(let A=0;A<s.length;A++){const L=s[A],te=L.getAttribute("src");if(!te)P(L,['Found an <img> tag with an empty "src" attribute. This prevents pre-loading it.',L]);else{const _=new Image;_.onload=()=>{P(L)},_.onerror=(T,w,j,v,F)=>{P(L,["Error loading <img>",L,"Error",F])},_.src=te}}for(let A=0;A<i.length;A++){const L=i[A];L.preload="auto";const te=L.getAttribute("poster");if(te){const _=new Image;_.onload=()=>{P(L)},_.onerror=(T,w,j,v,F)=>{P(L,["Error loading video poster",te,"for video",L,"Error:",F])},_.src=te}else L.readyState>=2?P(L):L.src?(L.onloadeddata=()=>{P(L)},L.onerror=(_,T,w,j,v)=>{P(L,["Error loading video",L,"Error",v])},L.onstalled=()=>{P(L,["Loading video stalled, skipping",L])}):P(L,["Error loading video, `src` is empty",L])}const V="select",Y=r.querySelectorAll(V),G=O.querySelectorAll(V);for(let A=0;A<Y.length;A++)G[A].value=Y[A].value;if(!m){const A=document.querySelectorAll("style, link[rel~='stylesheet'], link[as='style']");for(let L=0,te=A.length;L<te;++L){const _=A[L];if(_.tagName.toLowerCase()==="style"){const T=O.createElement(_.tagName),w=_.sheet;if(w){let j="";try{const v=w.cssRules.length;for(let F=0;F<v;++F)typeof w.cssRules[F].cssText=="string"&&(j+=`${w.cssRules[F].cssText}\r
30
- `)}catch(v){ue({messages:["A stylesheet could not be accessed. This is likely due to the stylesheet having cross-origin imports, and many browsers block script access to cross-origin stylesheets. See https://github.com/MatthewHerbst/react-to-print/issues/429 for details. You may be able to load the sheet by both marking the stylesheet with the cross `crossorigin` attribute, and setting the `Access-Control-Allow-Origin` header on the server serving the stylesheet. Alternatively, host the stylesheet on your domain to avoid this issue entirely.",_,`Original error: ${Ze(v).message}`],level:"warning"})}T.setAttribute("id",`react-to-print-${L}`),g&&T.setAttribute("nonce",g),T.appendChild(O.createTextNode(j)),O.head.appendChild(T)}}else if(_.getAttribute("href"))if(_.hasAttribute("disabled"))ue({messages:["`react-to-print` encountered a <link> tag with a `disabled` attribute and will ignore it. Note that the `disabled` attribute is deprecated, and some browsers ignore it. You should stop using it. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-disabled. The <link> is:",_],level:"warning"}),P(_);else{const T=O.createElement(_.tagName);for(let w=0,j=_.attributes.length;w<j;++w){const v=_.attributes[w];v&&T.setAttribute(v.nodeName,v.nodeValue??"")}T.onload=()=>{P(T)},T.onerror=(w,j,v,F,y)=>{P(T,["Failed to load",T,"Error:",y])},g&&T.setAttribute("nonce",g),O.head.appendChild(T)}else ue({messages:["`react-to-print` encountered a <link> tag with an empty `href` attribute. In addition to being invalid HTML, this can cause problems in many browsers, and so the <link> was not loaded. The <link> is:",_],level:"warning"}),P(_)}}}a===0&&pn(e,n)}function bs(e,t,n){e.onload=()=>{ys(e,t,n)},document.body.appendChild(e)}function gs({contentRef:e,optionalContent:t,suppressErrors:n}){if(t&&typeof t=="function")return e&&ue({level:"warning",messages:['"react-to-print" received a `contentRef` option and an optional-content param passed to its callback. The `contentRef` option will be ignored.']}),t();if(e)return e.current;ue({messages:['"react-to-print" did not receive a `contentRef` option or a optional-content param pass to its callback.'],suppressErrors:n})}function ws(e,t){const{contentRef:n,fonts:r,ignoreGlobalStyles:o,suppressErrors:s}=t,i=gs({contentRef:n,optionalContent:e,suppressErrors:s});if(!i)return;const a=i.cloneNode(!0),b=document.querySelectorAll("link[rel~='stylesheet'], link[as='style']"),c=a.querySelectorAll("img"),l=a.querySelectorAll("video"),m=r?r.length:0,S=(o?0:b.length)+c.length+l.length+m;return{contentNode:i,clonedContentNode:a,clonedImgNodes:c,clonedVideoNodes:l,numResourcesToLoad:S,originalCanvasNodes:i.querySelectorAll("canvas")}}function xs({bodyClass:e,contentRef:t,copyShadowRoots:n,documentTitle:r,fonts:o,ignoreGlobalStyles:s,nonce:i,onAfterPrint:a,onBeforePrint:b,onPrintError:c,pageStyle:l,preserveAfterPrint:m,print:S,printIframeProps:g,suppressErrors:h}){return ne.useCallback(u=>{zn(m,!0);function f(){const R={bodyClass:e,contentRef:t,copyShadowRoots:n,documentTitle:r,fonts:o,ignoreGlobalStyles:s,nonce:i,onAfterPrint:a,onPrintError:c,pageStyle:l,preserveAfterPrint:m,print:S,suppressErrors:h},P=ps(g),O=ws(u,R);if(!O){ue({messages:["There is nothing to print"],suppressErrors:h});return}bs(P,O,R)}b?b().then(()=>{f()}).catch(R=>{c?.("onBeforePrint",Ze(R))}):f()},[e,t,n,r,o,s,i,a,b,c,l,m,g,S,h])}const Es=e=>{console.log("ExportDataWithHeader______",e);const{tableRef:t}=e.data;e?.tableRef;const n=new Date().getTime(),r=xs({});return d.jsx(d.Fragment,{children:d.jsx(k.Row,{justify:"end",children:d.jsx(k.Col,{children:d.jsxs(k.Row,{gutter:8,children:[d.jsx(k.Col,{children:d.jsx(k.Button,{type:"text",icon:d.jsx(ge.PrinterOutlined,{style:{color:"#5080f8"}}),onClick:r})}),d.jsx(k.Col,{children:d.jsx(fs.DownloadTableExcel,{filename:n,sheet:"users",currentTableRef:t.current,children:d.jsx(k.Button,{type:"text",icon:d.jsx(ge.FileTextOutlined,{style:{color:"#5080f8"}})})})})]})})})})},vs=e=>{const{tableRef:t}=e;return new Date().getTime(),d.jsx(d.Fragment,{children:d.jsx(k.Row,{justify:"center",children:d.jsx(k.Col,{span:24,style:{display:"flex",justifyContent:"center",alignSelf:"center",paddingBottom:"20px",position:"relative"}})})})},Ss=ne.createContext(),_s=()=>({modal:{outline:"none",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundcolor:"red"}},img:{outline:"none"},passwordmodal:{outline:"none",display:"flex",alignItems:"center",justifyContent:"center"}}),Yn=e=>{const{columns:t,action:n,DrawerUpdate:r,editDesign:o,newData:s,Loading:i,error:a,deleteTodoMutation:b,open:c,ActionView:l,viewDetails:m,myType:S,type:g,urlkey:h,columnstype:u,rowSelection:f}=e.data,R=_s(),[P,O]=ne.useState(!1),[M,E]=ne.useState(null),[Z,re]=ne.useState("false"),[V,Y]=ne.useState(!1),[G,A]=ne.useState(!1),[L,te]=ne.useState(),[_,T]=ne.useState(""),w=()=>O(!1),j=I=>{re(I),O(!0)},[v,F]=ne.useState(),[y,x]=ne.useState({page:e?.data?.pageController?e.data?.pageController?.page:1,rowsPerPage:e?.data?.pageController?e.data?.pageController?.rowsPerPage:10}),D=ne.useRef(null),N=(I,U)=>{e.parentCallback?.(I,U),x({rowsPerPage:U,page:I})},$=(I,U)=>{E(U),Y(!0),te(I)},B=(I,U)=>{E(U),A(!0),te(I)},W=e?.data?.onNavigate??e?.onNavigate,z=(I,U)=>{if(typeof W=="function"){W(I,U);return}typeof window<"u"&&typeof I=="string"&&I.length>0&&window.location.assign(I)},K=I=>{if(g==="staff"){z(`/HumanResourceDashboard/StaffFullInformation?id=${I.fk_staffID}`,I);return}z(`/StudentInformation/StudentFullInformation?id=${I.id}`,I)},J=(I,U)=>{F(I),r?.(U)},H=async(I,U,X,me)=>{r?.(!0),X!==""&&((await me({id:I,admission_no:U,ec_no:X}))?.Status==="Success"?k.message.success("Ec No updated successfully"):k.message.error("Failed to Update Ec No."))},oe=()=>d.jsx(Ss.Provider,{value:v,children:o}),{trigger:C}=at("branchapi/staff/updateStaffPassword",ft),{trigger:le}=at("branchapi/Student/updateEcNo",ft),{trigger:Se}=at(h,(I,U)=>ft("student/studentDetails/editStudentLogInCredential",U)),qe=async I=>{I.preventDefault(),Y(!1);try{(await C({staff_id:L,new_passwod:I.target.password.value}))?.Status==="Success"?k.message.success("Password updated successfully"):k.message.error("Failed to update password")}catch{k.message.error("Failed to update password")}},Jn=async I=>{I.preventDefault(),A(!1);try{(await Se({edit_id:M?.edit_id,new_passwod:I.target.password.value,username:I.target.username.value,branch_id:JSON.parse(localStorage.getItem("genrall_settings"))?.fk_branchID}))?.Status==="Success"?k.message.success("Password updated successfully"):k.message.error("Failed to update password")}catch(U){k.message.error(U?.response?.data?.msg??"Failed to update password")}},Kn=[{title:"SR. NO.",key:"serialNumber",width:90,render:(I,U,X)=>(y.page-1)*y.rowsPerPage+X+1},...u==="antd"?t:(Array.isArray(t)?t:[]).map(I=>({title:I.name,dataIndex:I.selector,key:I.selector,sorter:I.sorter||(I.sortable?(U,X)=>{const me=U[I.selector]??"",Te=X[I.selector]??"";return typeof me=="number"&&typeof Te=="number"?me-Te:String(me).localeCompare(String(Te))}:!1),render:(U,X)=>{switch(I.selector){case"my_staff":return X.staff_id!=="0"?X.staff_id:"Admin";case"gallery_cat_logo":return d.jsx(k.Image,{width:50,src:`undefined/branch/gallery/${X.gallery_cat_logo}`});case"file01":return X.documents?d.jsx("div",{onClick:()=>j(`undefined/branch/frontoffice/${X.documents}`),style:{textDecoration:"underline",color:"blue",cursor:"pointer"},children:"view file"}):"Not Uploaded";case"amount":case"fine_amount":case"basic_pay":case"net_amount":return as(U);case"full_name":return d.jsx("span",{onClick:()=>K(X),style:{cursor:"pointer",color:"blue",textDecoration:"underline"},children:U||`${X.firstname} ${X.lastname}`});case"extra_curricular_activity":return U==="Yes"?"Extra Subject":"Fees Master";case"is_active":return U==="yes"?d.jsx("span",{className:"label label-success",children:"Active"}):d.jsx("span",{className:"label label-danger",children:"Inactive"});case"steps":return X?.current_status==="Active"?d.jsx(k.Progress,{percent:X.steps==="1"?30:X.steps==="2"?70:100,steps:3}):d.jsx("span",{className:"label label-success",children:X?.current_status});case"Password":return d.jsx("span",{onClick:()=>$(X.id,X),style:{cursor:"pointer"},className:"label label-danger",children:"Update"});case"Passwordstd":return d.jsx("span",{onClick:()=>B(X.id,X),style:{cursor:"pointer"},className:"label label-danger",children:"Update"});case"payment_status":return d.jsx(k.Tag,{onClick:()=>m?.(X.id),color:U==="paid"?"#66aa18":U==="partially_paid"?"#ff5722":"#DC143C",children:U==="paid"?"Paid":U==="partially_paid"?"Partially Paid":"Due"});case"fees_duration":return is().find(me=>me.value===U)?.label;case"status":return d.jsx("span",{onClick:()=>m?.(X?.fk_staffID,X?.total_leave),className:`label ${U==="due"?"label-danger":"label-success"}`,style:{cursor:"pointer"},children:U==="due"?"Due":"Paid"});case"subject_type_1":return d.jsxs(d.Fragment,{children:[X.is_theory==="yes"&&"Theory, ",X.is_practical==="yes"&&"Practical"]});case"ec_no":return d.jsx(ts,{html:X.ec_no,onBlur:me=>H(X.id,X.admission_no,me.target.innerHTML,le)});case"Assign":case"AssignExtCarriAci":case"Medical":return d.jsx(k.Button,{type:"primary",icon:d.jsx(ge.SendOutlined,{}),size:"small",onClick:()=>J(X.id,!0,I.name),children:I.name});case"Button":return d.jsx(k.Tag,{color:"cyan",onClick:()=>m?.(X),children:I.name});default:return U}}})),...n?[{title:"Action",key:"action",render:(I,U)=>{const X=U?.current_status==="Promoted",me=()=>{if(S=="sameAddUpdate"){J(U,!0);return}if(S?.type==="examEdit"){S.editFunc(U.id);return}J(U.id||U,!0)},Te=()=>{if(S==="student_result"){m?.(U);return}if(S==="student"){m?.(U.id,U.class_id);return}m?.(U.id)},Qn=()=>{b?.(U?.id)};return d.jsxs("div",{style:{display:"flex",gap:"5px"},children:[l?.[0]?.status&&d.jsx(k.Button,{icon:d.jsx(ge.EditOutlined,{}),size:"small",disabled:X,onClick:me}),l?.[1]?.status&&d.jsx(k.Button,{icon:d.jsx(ge.DeleteOutlined,{}),size:"small",danger:!0,disabled:X,onClick:Qn}),l?.[2]?.status&&d.jsx(k.Button,{icon:d.jsx(ge.EyeOutlined,{}),size:"small",onClick:Te})]})}}]:[]],st=ne.useMemo(()=>s?Array.isArray(s?.data)?s.data:Array.isArray(s)?s:[]:[],[s]),Be=ne.useMemo(()=>{const I=_.trim().toLowerCase();return I?st.filter(U=>Object.values(U??{}).some(X=>String(X??"").toLowerCase().includes(I))):st},[st,_]),Xn=!!e.parentCallback,_e=_?Be.length:s?.pagination?.total_rows??Be.length,He=(y.page-1)*y.rowsPerPage,it=Xn?Be:Be.slice(He,He+y.rowsPerPage),Gn=_e===0?0:Math.min(He+1,_e),Zn=_e===0?0:Math.min(He+it.length,_e);let Ae;return i?Ae=d.jsx("p",{children:"Loading..."}):a?Ae=d.jsx("p",{children:a.message}):it.length?Ae=d.jsx(k.Table,{dataSource:it,columns:Kn,size:"small",bordered:!0,pagination:!1,rowSelection:f,rowKey:(I,U)=>I?.id??I?._id??U,scroll:{x:"max-content"}}):Ae=d.jsx(k.Empty,{}),d.jsxs("div",{style:{width:"100%"},children:[d.jsx(k.Drawer,{open:c,placement:"right",onClose:()=>r?.(!1),width:720,children:oe()}),d.jsx(k.Modal,{title:"Update Password",open:V,onCancel:()=>Y(!1),footer:null,children:d.jsx("form",{onSubmit:qe,children:d.jsxs(ae,{children:[d.jsx(ae,{style:{marginBottom:12},children:d.jsx(be,{type:"password",label:"Password",name:"password",required:"required"})}),d.jsx(ae,{style:{marginTop:16},children:d.jsx(k.Button,{type:"primary",htmlType:"submit",children:"Update"})})]})})}),d.jsx(k.Modal,{title:" Update Credential",open:G,onCancel:()=>A(!1),footer:null,children:d.jsx("form",{onSubmit:Jn,children:d.jsxs(ae,{children:[d.jsx(ae,{style:{marginBottom:12},children:d.jsx(be,{type:"text",label:"User Name",name:"username",required:"required",value:M?.username?M?.username:"",onChange:I=>E({...M,username:I.target.value})})}),d.jsx(ae,{style:{marginBottom:12},children:d.jsx(be,{label:"Password",name:"password",required:"required",value:M?.password?M?.password:"",onChange:I=>E({...M,password:I.target.value})})}),d.jsx(ae,{style:{marginTop:16},children:d.jsx(k.Button,{type:"primary",htmlType:"submit",children:"Update"})})]})})}),d.jsx(k.Modal,{open:P,onCancel:w,footer:null,centered:!0,width:"80%",className:R.modal,children:d.jsxs("div",{style:{position:"relative"},className:R.img,children:[d.jsx(k.Image,{src:Z,alt:"",style:{width:"100%"},preview:!1}),d.jsx(k.Button,{type:"text",icon:d.jsx(ge.CloseOutlined,{}),onClick:w,style:{position:"absolute",top:8,right:8,background:"rgba(0,0,0,0.45)",color:"#fff"}})]})}),d.jsxs(k.Card,{bodyStyle:{padding:16,background:"#f7f7fa"},children:[d.jsx("style",{children:`
29
+ `;function js(e,t,n){const{contentNode:r,clonedContentNode:o,clonedImgNodes:s,clonedVideoNodes:a,numResourcesToLoad:l,originalCanvasNodes:g}=t,{bodyClass:u,fonts:c,ignoreGlobalStyles:y,pageStyle:T,nonce:x,suppressErrors:p,copyShadowRoots:d}=n,f=[],R=[];function D(F,v){if(f.includes(F)){fe({level:"debug",messages:["Tried to mark a resource that has already been handled",F],suppressErrors:p});return}v?(fe({messages:['"react-to-print" was unable to load a resource but will continue attempting to print the page',...v],suppressErrors:p}),R.push(F)):f.push(F),f.length+R.length===l&&En(e,n)}e.onload=null;const j=e.contentDocument??e.contentWindow?.document;if(j){const F=j.body.appendChild(o);d&&ar(r,F,!!p),c&&(e.contentDocument?.fonts&&e.contentWindow?.FontFace?c.forEach(k=>{const q=new FontFace(k.family,k.source,{weight:k.weight,style:k.style});e.contentDocument.fonts.add(q),q.loaded.then(()=>{D(q)}).catch(ee=>{D(q,["Failed loading the font:",q,"Load error:",rt(ee)])})}):(c.forEach(k=>{D(k)}),fe({messages:['"react-to-print" is not able to load custom fonts because the browser does not support the FontFace API but will continue attempting to print the page'],suppressErrors:p})));const v=T??Rs,Q=j.createElement("style");x&&(Q.setAttribute("nonce",x),j.head.setAttribute("nonce",x)),Q.appendChild(j.createTextNode(v)),j.head.appendChild(Q),u&&j.body.classList.add(...u.split(" "));const te=j.querySelectorAll("canvas");for(let k=0;k<g.length;++k){const q=g[k],ee=te[k];if(ee===void 0){fe({messages:["A canvas element could not be copied for printing, has it loaded? `onBeforePrint` likely resolved too early.",q],suppressErrors:p});continue}const C=ee.getContext("2d");C&&C.drawImage(q,0,0)}for(let k=0;k<s.length;k++){const q=s[k],ee=q.getAttribute("src");if(!ee)D(q,['Found an <img> tag with an empty "src" attribute. This prevents pre-loading it.',q]);else{const C=new Image;C.onload=()=>{D(q)},C.onerror=(O,w,N,_,L)=>{D(q,["Error loading <img>",q,"Error",L])},C.src=ee}}for(let k=0;k<a.length;k++){const q=a[k];q.preload="auto";const ee=q.getAttribute("poster");if(ee){const C=new Image;C.onload=()=>{D(q)},C.onerror=(O,w,N,_,L)=>{D(q,["Error loading video poster",ee,"for video",q,"Error:",L])},C.src=ee}else q.readyState>=2?D(q):q.src?(q.onloadeddata=()=>{D(q)},q.onerror=(C,O,w,N,_)=>{D(q,["Error loading video",q,"Error",_])},q.onstalled=()=>{D(q,["Loading video stalled, skipping",q])}):D(q,["Error loading video, `src` is empty",q])}const A="select",$=r.querySelectorAll(A),G=j.querySelectorAll(A);for(let k=0;k<$.length;k++)G[k].value=$[k].value;if(!y){const k=document.querySelectorAll("style, link[rel~='stylesheet'], link[as='style']");for(let q=0,ee=k.length;q<ee;++q){const C=k[q];if(C.tagName.toLowerCase()==="style"){const O=j.createElement(C.tagName),w=C.sheet;if(w){let N="";try{const _=w.cssRules.length;for(let L=0;L<_;++L)typeof w.cssRules[L].cssText=="string"&&(N+=`${w.cssRules[L].cssText}\r
30
+ `)}catch(_){fe({messages:["A stylesheet could not be accessed. This is likely due to the stylesheet having cross-origin imports, and many browsers block script access to cross-origin stylesheets. See https://github.com/MatthewHerbst/react-to-print/issues/429 for details. You may be able to load the sheet by both marking the stylesheet with the cross `crossorigin` attribute, and setting the `Access-Control-Allow-Origin` header on the server serving the stylesheet. Alternatively, host the stylesheet on your domain to avoid this issue entirely.",C,`Original error: ${rt(_).message}`],level:"warning"})}O.setAttribute("id",`react-to-print-${q}`),x&&O.setAttribute("nonce",x),O.appendChild(j.createTextNode(N)),j.head.appendChild(O)}}else if(C.getAttribute("href"))if(C.hasAttribute("disabled"))fe({messages:["`react-to-print` encountered a <link> tag with a `disabled` attribute and will ignore it. Note that the `disabled` attribute is deprecated, and some browsers ignore it. You should stop using it. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-disabled. The <link> is:",C],level:"warning"}),D(C);else{const O=j.createElement(C.tagName);for(let w=0,N=C.attributes.length;w<N;++w){const _=C.attributes[w];_&&O.setAttribute(_.nodeName,_.nodeValue??"")}O.onload=()=>{D(O)},O.onerror=(w,N,_,L,b)=>{D(O,["Failed to load",O,"Error:",b])},x&&O.setAttribute("nonce",x),j.head.appendChild(O)}else fe({messages:["`react-to-print` encountered a <link> tag with an empty `href` attribute. In addition to being invalid HTML, this can cause problems in many browsers, and so the <link> was not loaded. The <link> is:",C],level:"warning"}),D(C)}}}l===0&&En(e,n)}function Cs(e,t,n){e.onload=()=>{js(e,t,n)},document.body.appendChild(e)}function Os({contentRef:e,optionalContent:t,suppressErrors:n}){if(t&&typeof t=="function")return e&&fe({level:"warning",messages:['"react-to-print" received a `contentRef` option and an optional-content param passed to its callback. The `contentRef` option will be ignored.']}),t();if(e)return e.current;fe({messages:['"react-to-print" did not receive a `contentRef` option or a optional-content param pass to its callback.'],suppressErrors:n})}function Ps(e,t){const{contentRef:n,fonts:r,ignoreGlobalStyles:o,suppressErrors:s}=t,a=Os({contentRef:n,optionalContent:e,suppressErrors:s});if(!a)return;const l=a.cloneNode(!0),g=document.querySelectorAll("link[rel~='stylesheet'], link[as='style']"),u=l.querySelectorAll("img"),c=l.querySelectorAll("video"),y=r?r.length:0,T=(o?0:g.length)+u.length+c.length+y;return{contentNode:a,clonedContentNode:l,clonedImgNodes:u,clonedVideoNodes:c,numResourcesToLoad:T,originalCanvasNodes:a.querySelectorAll("canvas")}}function As({bodyClass:e,contentRef:t,copyShadowRoots:n,documentTitle:r,fonts:o,ignoreGlobalStyles:s,nonce:a,onAfterPrint:l,onBeforePrint:g,onPrintError:u,pageStyle:c,preserveAfterPrint:y,print:T,printIframeProps:x,suppressErrors:p}){return K.useCallback(d=>{sr(y,!0);function f(){const R={bodyClass:e,contentRef:t,copyShadowRoots:n,documentTitle:r,fonts:o,ignoreGlobalStyles:s,nonce:a,onAfterPrint:l,onPrintError:u,pageStyle:c,preserveAfterPrint:y,print:T,suppressErrors:p},D=_s(x),j=Ps(d,R);if(!j){fe({messages:["There is nothing to print"],suppressErrors:p});return}Cs(D,j,R)}g?g().then(()=>{f()}).catch(R=>{u?.("onBeforePrint",rt(R))}):f()},[e,t,n,r,o,s,a,l,g,u,c,y,x,T,p])}const Ds=e=>{console.log("ExportDataWithHeader______",e);const{tableRef:t}=e.data;e?.tableRef;const n=new Date().getTime(),r=As({});return i.jsx(i.Fragment,{children:i.jsx(I.Row,{justify:"end",children:i.jsx(I.Col,{children:i.jsxs(I.Row,{gutter:8,children:[i.jsx(I.Col,{children:i.jsx(I.Button,{type:"text",icon:i.jsx(be.PrinterOutlined,{style:{color:"#5080f8"}}),onClick:r})}),i.jsx(I.Col,{children:i.jsx(Es.DownloadTableExcel,{filename:n,sheet:"users",currentTableRef:t.current,children:i.jsx(I.Button,{type:"text",icon:i.jsx(be.FileTextOutlined,{style:{color:"#5080f8"}})})})})]})})})})},$s=e=>{const{tableRef:t}=e;return new Date().getTime(),i.jsx(i.Fragment,{children:i.jsx(I.Row,{justify:"center",children:i.jsx(I.Col,{span:24,style:{display:"flex",justifyContent:"center",alignSelf:"center",paddingBottom:"20px",position:"relative"}})})})},Ns=K.createContext(),Ms=()=>({modal:{outline:"none",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundcolor:"red"}},img:{outline:"none"},passwordmodal:{outline:"none",display:"flex",alignItems:"center",justifyContent:"center"}}),kt=e=>{const{columns:t,action:n,DrawerUpdate:r,editDesign:o,newData:s,Loading:a,error:l,deleteTodoMutation:g,open:u,ActionView:c,viewDetails:y,myType:T,type:x,urlkey:p,columnstype:d,rowSelection:f}=e.data,R=Ms(),[D,j]=K.useState(!1),[F,v]=K.useState(null),[Q,te]=K.useState("false"),[A,$]=K.useState(!1),[G,k]=K.useState(!1),[q,ee]=K.useState(),[C,O]=K.useState(""),w=()=>j(!1),N=U=>{te(U),j(!0)},[_,L]=K.useState(),[b,m]=K.useState({page:e?.data?.pageController?e.data?.pageController?.page:1,rowsPerPage:e?.data?.pageController?e.data?.pageController?.rowsPerPage:10}),S=K.useRef(null),E=(U,H)=>{e.parentCallback?.(U,H),m({rowsPerPage:H,page:U})},P=(U,H)=>{v(H),$(!0),ee(U)},B=(U,H)=>{v(H),k(!0),ee(U)},z=e?.data?.onNavigate??e?.onNavigate,Y=(U,H)=>{if(typeof z=="function"){z(U,H);return}typeof window<"u"&&typeof U=="string"&&U.length>0&&window.location.assign(U)},X=U=>{if(x==="staff"){Y(`/HumanResourceDashboard/StaffFullInformation?id=${U.fk_staffID}`,U);return}Y(`/StudentInformation/StudentFullInformation?id=${U.id}`,U)},J=(U,H)=>{L(U),r?.(H)},V=async(U,H,Z,ge)=>{r?.(!0),Z!==""&&((await ge({id:U,admission_no:H,ec_no:Z}))?.Status==="Success"?I.message.success("Ec No updated successfully"):I.message.error("Failed to Update Ec No."))},se=()=>i.jsx(Ns.Provider,{value:_,children:o}),{trigger:M}=dt("branchapi/staff/updateStaffPassword",yt),{trigger:ue}=dt("branchapi/Student/updateEcNo",yt),{trigger:Re}=dt(p,(U,H)=>yt("student/studentDetails/editStudentLogInCredential",H)),Ve=async U=>{U.preventDefault(),$(!1);try{(await M({staff_id:q,new_passwod:U.target.password.value}))?.Status==="Success"?I.message.success("Password updated successfully"):I.message.error("Failed to update password")}catch{I.message.error("Failed to update password")}},cr=async U=>{U.preventDefault(),k(!1);try{(await Re({edit_id:F?.edit_id,new_passwod:U.target.password.value,username:U.target.username.value,branch_id:JSON.parse(localStorage.getItem("genrall_settings"))?.fk_branchID}))?.Status==="Success"?I.message.success("Password updated successfully"):I.message.error("Failed to update password")}catch(H){I.message.error(H?.response?.data?.msg??"Failed to update password")}},ur=[{title:"SR. NO.",dataIndex:"__serialNumber",key:"__serialNumber",width:90,sorter:(U,H)=>(U.__serialNumber??0)-(H.__serialNumber??0),render:U=>U},...d==="antd"?t:(Array.isArray(t)?t:[]).map(U=>({title:U.name,dataIndex:U.selector,key:U.selector,sorter:U.sorter||(U.sortable?(H,Z)=>{const ge=H[U.selector]??"",Oe=Z[U.selector]??"";return typeof ge=="number"&&typeof Oe=="number"?ge-Oe:String(ge).localeCompare(String(Oe))}:!1),render:(H,Z)=>{switch(U.selector){case"my_staff":return Z.staff_id!=="0"?Z.staff_id:"Admin";case"gallery_cat_logo":return i.jsx(I.Image,{width:50,src:`undefined/branch/gallery/${Z.gallery_cat_logo}`});case"file01":return Z.documents?i.jsx("div",{onClick:()=>N(`undefined/branch/frontoffice/${Z.documents}`),style:{textDecoration:"underline",color:"blue",cursor:"pointer"},children:"view file"}):"Not Uploaded";case"amount":case"fine_amount":case"basic_pay":case"net_amount":return bs(H);case"full_name":return i.jsx("span",{onClick:()=>X(Z),style:{cursor:"pointer",color:"blue",textDecoration:"underline"},children:H||`${Z.firstname} ${Z.lastname}`});case"extra_curricular_activity":return H==="Yes"?"Extra Subject":"Fees Master";case"is_active":return H==="yes"?i.jsx("span",{className:"label label-success",children:"Active"}):i.jsx("span",{className:"label label-danger",children:"Inactive"});case"steps":return Z?.current_status==="Active"?i.jsx(I.Progress,{percent:Z.steps==="1"?30:Z.steps==="2"?70:100,steps:3}):i.jsx("span",{className:"label label-success",children:Z?.current_status});case"Password":return i.jsx("span",{onClick:()=>P(Z.id,Z),style:{cursor:"pointer"},className:"label label-danger",children:"Update"});case"Passwordstd":return i.jsx("span",{onClick:()=>B(Z.id,Z),style:{cursor:"pointer"},className:"label label-danger",children:"Update"});case"payment_status":return i.jsx(I.Tag,{onClick:()=>y?.(Z.id),color:H==="paid"?"#66aa18":H==="partially_paid"?"#ff5722":"#DC143C",children:H==="paid"?"Paid":H==="partially_paid"?"Partially Paid":"Due"});case"fees_duration":return gs().find(ge=>ge.value===H)?.label;case"status":return i.jsx("span",{onClick:()=>y?.(Z?.fk_staffID,Z?.total_leave),className:`label ${H==="due"?"label-danger":"label-success"}`,style:{cursor:"pointer"},children:H==="due"?"Due":"Paid"});case"subject_type_1":return i.jsxs(i.Fragment,{children:[Z.is_theory==="yes"&&"Theory, ",Z.is_practical==="yes"&&"Practical"]});case"ec_no":return i.jsx(fs,{html:Z.ec_no,onBlur:ge=>V(Z.id,Z.admission_no,ge.target.innerHTML,ue)});case"Assign":case"AssignExtCarriAci":case"Medical":return i.jsx(I.Button,{type:"primary",icon:i.jsx(be.SendOutlined,{}),size:"small",onClick:()=>J(Z.id,!0,U.name),children:U.name});case"Button":return i.jsx(I.Tag,{color:"cyan",onClick:()=>y?.(Z),children:U.name});default:return H}}})),...n?[{title:"Action",key:"action",render:(U,H)=>{const Z=H?.current_status==="Promoted",ge=()=>{if(T=="sameAddUpdate"){J(H,!0);return}if(T?.type==="examEdit"){T.editFunc(H.id);return}J(H.id||H,!0)},Oe=()=>{if(T==="student_result"){y?.(H);return}if(T==="student"){y?.(H.id,H.class_id);return}y?.(H.id)},mr=()=>{g?.(H?.id)};return i.jsxs("div",{style:{display:"flex",gap:"5px"},children:[c?.[0]?.status&&i.jsx(I.Button,{icon:i.jsx(be.EditOutlined,{}),size:"small",disabled:Z,onClick:ge}),c?.[1]?.status&&i.jsx(I.Button,{icon:i.jsx(be.DeleteOutlined,{}),size:"small",danger:!0,disabled:Z,onClick:mr}),c?.[2]?.status&&i.jsx(I.Button,{icon:i.jsx(be.EyeOutlined,{}),size:"small",onClick:Oe})]})}}]:[]],ut=K.useMemo(()=>s?Array.isArray(s?.data)?s.data:Array.isArray(s)?s:[]:[],[s]),Ye=K.useMemo(()=>{const U=C.trim().toLowerCase();return U?ut.filter(H=>Object.values(H??{}).some(Z=>String(Z??"").toLowerCase().includes(U))):ut},[ut,C]),dr=!!e.parentCallback,je=C?Ye.length:s?.pagination?.total_rows??Ye.length,Ce=(b.page-1)*b.rowsPerPage,Ke=dr?Ye:Ye.slice(Ce,Ce+b.rowsPerPage),fr=K.useMemo(()=>(Ke??[]).map((U,H)=>({...U??{},__serialNumber:Ce+H+1})),[Ce,Ke]),pr=je===0?0:Math.min(Ce+1,je),hr=je===0?0:Math.min(Ce+Ke.length,je);let Me;return a?Me=i.jsx("p",{children:"Loading..."}):l?Me=i.jsx("p",{children:l.message}):Ke.length?Me=i.jsx(I.Table,{dataSource:fr,columns:ur,size:"small",bordered:!0,pagination:!1,rowSelection:f,rowKey:(U,H)=>U?.id??U?._id??H,scroll:{x:"max-content"}}):Me=i.jsx(I.Empty,{}),i.jsxs("div",{style:{width:"100%"},children:[i.jsx(I.Drawer,{open:u,placement:"right",onClose:()=>r?.(!1),width:720,children:se()}),i.jsx(I.Modal,{title:"Update Password",open:A,onCancel:()=>$(!1),footer:null,children:i.jsx("form",{onSubmit:Ve,children:i.jsxs(oe,{children:[i.jsx(oe,{style:{marginBottom:12},children:i.jsx(ae,{type:"password",label:"Password",name:"password",required:"required"})}),i.jsx(oe,{style:{marginTop:16},children:i.jsx(I.Button,{type:"primary",htmlType:"submit",children:"Update"})})]})})}),i.jsx(I.Modal,{title:" Update Credential",open:G,onCancel:()=>k(!1),footer:null,children:i.jsx("form",{onSubmit:cr,children:i.jsxs(oe,{children:[i.jsx(oe,{style:{marginBottom:12},children:i.jsx(ae,{type:"text",label:"User Name",name:"username",required:"required",value:F?.username?F?.username:"",onChange:U=>v({...F,username:U.target.value})})}),i.jsx(oe,{style:{marginBottom:12},children:i.jsx(ae,{label:"Password",name:"password",required:"required",value:F?.password?F?.password:"",onChange:U=>v({...F,password:U.target.value})})}),i.jsx(oe,{style:{marginTop:16},children:i.jsx(I.Button,{type:"primary",htmlType:"submit",children:"Update"})})]})})}),i.jsx(I.Modal,{open:D,onCancel:w,footer:null,centered:!0,width:"80%",className:R.modal,children:i.jsxs("div",{style:{position:"relative"},className:R.img,children:[i.jsx(I.Image,{src:Q,alt:"",style:{width:"100%"},preview:!1}),i.jsx(I.Button,{type:"text",icon:i.jsx(be.CloseOutlined,{}),onClick:w,style:{position:"absolute",top:8,right:8,background:"rgba(0,0,0,0.45)",color:"#fff"}})]})}),i.jsxs(I.Card,{bodyStyle:{padding:16,background:"#f7f7fa"},children:[i.jsx("style",{children:`
31
31
  .ubk-table-shell .ant-table-wrapper {
32
32
  background: #fff;
33
33
  border: 1px solid #e7e8f2;
@@ -70,4 +70,4 @@ Valid keys: `+JSON.stringify(Object.keys(y),null," "));var C=oe(z,H,$,B,W+"."+H
70
70
  .ubk-table-shell .ant-pagination .ant-pagination-next button:hover {
71
71
  color: #8f99ff;
72
72
  }
73
- `}),d.jsx(ae,{children:d.jsx("div",{style:{display:"flex",justifyContent:"space-between"},children:d.jsx(Es,{data:{tableRef:D}})})}),d.jsxs("div",{className:"ubk-table-shell",ref:D,style:{marginTop:12},children:[d.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:16,flexWrap:"wrap",marginBottom:14},children:[d.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontSize:12,color:"#222"},children:[d.jsx("span",{children:"Show"}),d.jsx(k.Select,{size:"small",value:y.rowsPerPage,onChange:I=>N(1,I),options:[10,25,50,100].map(I=>({label:I,value:I})),style:{width:72}}),d.jsx("span",{children:"entries"})]}),d.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[d.jsx("span",{style:{fontSize:12,color:"#222"},children:"Search:"}),d.jsx(k.Input,{size:"small",allowClear:!0,value:_,onChange:I=>{T(I.target.value),x(U=>({...U,page:1}))},placeholder:"Enter search keyword",prefix:d.jsx(ge.SearchOutlined,{style:{color:"#a3a8cf"}}),style:{width:220,borderWidth:"0 0 1px 0",borderRadius:0,background:"transparent"}})]})]}),d.jsx("div",{className:"print-only",children:d.jsx(vs,{})}),Ae]}),s&&d.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:16,marginTop:16,flexWrap:"wrap"},children:[d.jsx("div",{style:{fontSize:12,color:"#222"},children:`Showing ${Gn} to ${Zn} of ${_e} entries`}),d.jsx(k.Pagination,{current:y.page,pageSize:y.rowsPerPage,total:_e||0,showSizeChanger:!1,onChange:N})]})]})]})},Ts=({token:e,type:t})=>{const[n,r]=ne.useState({page:1,rowsPerPage:10}),o="api/branchapi/frontoffice/enquirytablelist",s=o.includes("?")?o.endsWith("?")||o.endsWith("&")?"":"&":"?",i=`${o}${s}page=${n.page}&per_page=${n.rowsPerPage}`,{isLoading:a,data:b,error:c}=Tt(e?[i,e]:null,([P,O])=>Un(P,O)),[l,m]=ne.useState(!1),S=(P,O)=>{r({page:P,rowsPerPage:parseInt(O)})},g=async P=>{},h=P=>{console.log("dsdsdsdsd",P),m(P)},u=()=>{},f=[{key:"Edit",status:!0},{key:"Delete",status:!0},{key:"View",status:!1}],R=ne.useMemo(()=>[{id:"1",name:"Name",selector:"name",sortable:!0,sorter:{compare:(P,O)=>P.name.localeCompare(O.name)}},{id:"2",name:"Phone",selector:"contact",sortable:!0,sorter:(P,O)=>(P.contact||"").localeCompare(O.contact||"")},{id:"6",name:"Description",selector:"description",sortable:!0,sorter:(P,O)=>(P.description||"").localeCompare(O.description||"")},{id:"3",name:"Source",selector:"source_name",sortable:!0,sorter:(P,O)=>(P.source_name||"").localeCompare(O.source_name||"")},{id:"4",name:"Enquiry Date",selector:"date",sortable:!0,sorter:(P,O)=>new Date(P.date)-new Date(O.date)},{id:"5",name:"Next Follow Up Date",selector:"follow_up_date",sortable:!0,sorter:(P,O)=>new Date(P.follow_up_date)-new Date(O.follow_up_date)}]);return d.jsx("div",{children:d.jsx(Yn,{parentCallback:S,data:{newData:b,columns:R,action:!0,Loading:a,error:c,open:l,viewDetails:u,deleteTodoMutation:g,DrawerUpdate:h,ActionView:f}})})},Rs={minWidth:160,height:36,padding:"0 28px",border:"none",borderRadius:999,background:"linear-gradient(90deg, #f59b1c 0%, #ef3e7b 100%)",color:"#fff",fontSize:14,fontWeight:700,textTransform:"uppercase",cursor:"pointer",boxShadow:"none"},mn=ne.forwardRef(({error:e,success:t,disabled:n,style:r,...o},s)=>d.jsx("div",{className:"form-group",style:{marginBottom:0},children:d.jsx("input",{...o,ref:s,disabled:n,style:{...Rs,opacity:n?.7:1,cursor:n?"not-allowed":"pointer",...r||{}}})})),Os=({id:e,funcName:t,disabled:n=!1})=>{const r="Data",[o,s]=ne.useState(!1),i=()=>{s(!0),t(e),k.message.success(`${r} deleted successfully!`)},a=()=>{k.message.info(`Deletion of ${r} cancelled`)};return d.jsx(k.Popconfirm,{title:`Delete ${r}?`,description:`Are you sure you want to delete ${r}?`,onConfirm:i,onCancel:a,okText:"Yes",cancelText:"No",disabled:n||o,children:d.jsx(k.Button,{danger:!0,disabled:n,loading:o,icon:d.jsx(ge.DeleteOutlined,{}),size:"small"})})},Cs=e=>({optimisticData:t=>[...t.data,e],populateCache:(t,n)=>[...n.data,t]}),js=e=>({optimisticData:t=>t.data.filter(n=>n.id!==e),populateCache:(t,n)=>n.data.filter(r=>r.id!==e)}),yn={height:36,padding:"0 14px",border:"none",background:"transparent",color:"#243a9b",fontSize:14,fontWeight:500,textTransform:"uppercase",boxShadow:"none"};function Ps({token:e}){console.log("token__",e);const[t,n]=ne.useState({pagination:{current:1,pageSize:10}}),[r,o]=ne.useState(!1),[s,i]=ne.useState(null),a=`api/branchapi/Transport/routeTableList?page=${t.pagination.current}&per_page=${t.pagination.pageSize}`,b="api/branchapi/Transport/addroute",c="api/branchapi/Transport/editroute",l="api/branchapi/Transport/deleteroute",{isLoading:m,data:S,error:g,mutate:h}=Tt(e?[a,e]:null,([V,Y])=>Un(V,Y)),u=async(V,Y)=>{try{await h(Lo(V,Y,e),Cs(Y)),we.success("Success! Added new item.",{duration:1e3,icon:"🎉"})}catch{we.error("Failed to add the new item.",{duration:1e3})}},f=V=>{V.preventDefault();const Y=new FormData(V.target);u(b,Y),V.target.reset()},R=(V,Y)=>{n(G=>({...G,pagination:{current:V,pageSize:parseInt(Y,10)}}))},P=async V=>{try{await h(Bo(l,V,e),js(V)),we.success("Success! Deleted item.",{duration:1e3})}catch{we.error("Failed to delete the item.",{duration:1e3})}},O=V=>{i(V),o(!0)},M=async V=>{try{await qo(c,V,e),await h(),we.success("Success! Updated item.",{duration:1e3,icon:"🚀"}),o(!1),i(null)}catch{we.error("Failed to update the item.",{duration:1e3})}},E=async V=>{V.preventDefault();const Y=new FormData(V.target);Y.append("id",s?.id),M(Y)},Z=[{title:"Route Title",dataIndex:"route_title",key:"route_title",sorter:{compare:(V,Y)=>V.name.localeCompare(Y.route_title)}},{title:"Fare (Monthly)",dataIndex:"fare",key:"fare",sorter:{compare:(V,Y)=>V.fare-Y.fare}},{title:"Note",dataIndex:"note",key:"note",sorter:{compare:(V,Y)=>V.note.localeCompare(Y.note)}},{title:"Action",key:"action",render:(V,Y)=>d.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[d.jsx(k.Button,{type:"text",size:"small",icon:d.jsx(ge.EditOutlined,{}),onClick:()=>O(Y),style:{padding:2}}),d.jsx(Os,{id:Y?.id,funcName:P})]})}],re=s?.route_title?`Edit ${s.route_title}`:"Edit Route";return d.jsxs("div",{children:[d.jsx(k.Drawer,{open:r,title:re,placement:"right",width:420,onClose:()=>{o(!1),i(null)},children:d.jsx("form",{onSubmit:E,children:d.jsxs("div",{style:{display:"grid",gap:20},children:[d.jsx(be,{type:"text",name:"title",label:"Title",defaultValue:s?.route_title||"",required:"required"}),d.jsx(be,{type:"number",name:"fare",label:"Fare (Monthly)",defaultValue:s?.fare||"",required:"required"}),d.jsx(be,{type:"text",name:"note",label:"Note",defaultValue:s?.note||""}),d.jsx("div",{style:{display:"none"},children:d.jsx(be,{type:"text",name:"no_of_vehicle",label:"Note"})}),d.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[d.jsx(mn,{type:"submit",value:"Update",color:"primary"}),d.jsx(k.Button,{type:"text",onClick:()=>{o(!1),i(null)},style:yn,children:"Cancel"})]})]})})}),d.jsx(we.Toaster,{toastOptions:{position:"top-center"}}),d.jsx(ae,{pt:5,pb:1,children:d.jsxs("div",{children:[d.jsx("div",{children:d.jsxs("div",{children:[d.jsx(ae,{mx:2,mt:-3,py:1,px:1,variant:"gradient",bgColor:"info",borderRadius:"lg",coloredShadow:"info",children:d.jsx(xt,{variant:"h6",color:"white",children:"Add Route"})}),d.jsx(ae,{px:3,pb:2,children:d.jsx("form",{onSubmit:f,children:d.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:20,alignItems:"end"},children:[d.jsx(be,{type:"text",name:"title",label:"Title",placeholder:"Mumbai to Delhi",required:"required"}),d.jsx(be,{type:"number",name:"fare",label:"Fare (Monthly)",required:"required"}),d.jsx(be,{type:"text",name:"note",label:"Note"}),d.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[d.jsx(mn,{type:"submit",value:"Save",color:"primary"}),d.jsx(k.Button,{type:"text",htmlType:"reset",style:yn,children:"Cancel"})]})]})})})]})}),d.jsx("div",{style:{marginTop:24},children:d.jsxs("div",{children:[d.jsx(ae,{mx:2,mt:-3,py:1,px:1,variant:"gradient",bgColor:"info",borderRadius:"lg",coloredShadow:"info",children:d.jsx(xt,{variant:"h6",color:"white",children:"Route List"})}),d.jsx(ae,{children:d.jsx(Yn,{parentCallback:R,data:{newData:S,columns:Z,columnstype:"antd",action:!1,Loading:m,error:g,deleteTodoMutation:P}})})]})})]})})]})}const As=({routes:e=[],onNavigate:t})=>d.jsx(k.Row,{gutter:[16,16],children:e.map((n,r)=>d.jsx(k.Col,{xs:24,md:8,lg:8,children:d.jsx(ae,{children:d.jsx(bn,{icon:n?.icon??"",title:n?.title??"",path:n?.path??"",onClick:t})})},`${r}route001`))});exports.AdmissionEnquiry=Ts;exports.ErpDashboard=tr;exports.MenuSubmenu=Ho;exports.RoutePage=As;exports.TransportRoutes=Ps;
73
+ `}),i.jsx(oe,{children:i.jsx("div",{style:{display:"flex",justifyContent:"space-between"},children:i.jsx(Ds,{data:{tableRef:S}})})}),i.jsxs("div",{className:"ubk-table-shell",ref:S,style:{marginTop:12},children:[i.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:16,flexWrap:"wrap",marginBottom:14},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontSize:12,color:"#222"},children:[i.jsx("span",{children:"Show"}),i.jsx(I.Select,{size:"small",value:b.rowsPerPage,onChange:U=>E(1,U),options:[10,25,50,100].map(U=>({label:U,value:U})),style:{width:72}}),i.jsx("span",{children:"entries"})]}),i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[i.jsx("span",{style:{fontSize:12,color:"#222"},children:"Search:"}),i.jsx(I.Input,{size:"small",allowClear:!0,value:C,onChange:U=>{O(U.target.value),m(H=>({...H,page:1}))},placeholder:"Enter search keyword",prefix:i.jsx(be.SearchOutlined,{style:{color:"#a3a8cf"}}),style:{width:220,borderWidth:"0 0 1px 0",borderRadius:0,background:"transparent"}})]})]}),i.jsx("div",{className:"print-only",children:i.jsx($s,{})}),Me]}),s&&i.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:16,marginTop:16,flexWrap:"wrap"},children:[i.jsx("div",{style:{fontSize:12,color:"#222"},children:`Showing ${pr} to ${hr} of ${je} entries`}),i.jsx(I.Pagination,{current:b.page,pageSize:b.rowsPerPage,total:je||0,showSizeChanger:!1,onChange:E})]})]})]})},ks=({token:e,type:t})=>{const[n,r]=K.useState({page:1,rowsPerPage:10}),o="api/branchapi/frontoffice/enquirytablelist",s=o.includes("?")?o.endsWith("?")||o.endsWith("&")?"":"&":"?",a=`${o}${s}page=${n.page}&per_page=${n.rowsPerPage}`,{isLoading:l,data:g,error:u}=we(e?[a,e]:null,([D,j])=>Se(D,j)),[c,y]=K.useState(!1),T=(D,j)=>{r({page:D,rowsPerPage:parseInt(j)})},x=async D=>{},p=D=>{console.log("dsdsdsdsd",D),y(D)},d=()=>{},f=[{key:"Edit",status:!0},{key:"Delete",status:!0},{key:"View",status:!1}],R=K.useMemo(()=>[{id:"1",name:"Name",selector:"name",sortable:!0,sorter:{compare:(D,j)=>D.name.localeCompare(j.name)}},{id:"2",name:"Phone",selector:"contact",sortable:!0,sorter:(D,j)=>(D.contact||"").localeCompare(j.contact||"")},{id:"6",name:"Description",selector:"description",sortable:!0,sorter:(D,j)=>(D.description||"").localeCompare(j.description||"")},{id:"3",name:"Source",selector:"source_name",sortable:!0,sorter:(D,j)=>(D.source_name||"").localeCompare(j.source_name||"")},{id:"4",name:"Enquiry Date",selector:"date",sortable:!0,sorter:(D,j)=>new Date(D.date)-new Date(j.date)},{id:"5",name:"Next Follow Up Date",selector:"follow_up_date",sortable:!0,sorter:(D,j)=>new Date(D.follow_up_date)-new Date(j.follow_up_date)}]);return i.jsx("div",{children:i.jsx(kt,{parentCallback:T,data:{newData:g,columns:R,action:!0,Loading:l,error:u,open:c,viewDetails:d,deleteTodoMutation:x,DrawerUpdate:p,ActionView:f}})})},Is={minWidth:160,height:36,padding:"0 28px",border:"none",borderRadius:999,background:"linear-gradient(90deg, #f59b1c 0%, #ef3e7b 100%)",color:"#fff",fontSize:14,fontWeight:700,textTransform:"uppercase",cursor:"pointer",boxShadow:"none"},Le=K.forwardRef(({error:e,success:t,disabled:n,style:r,...o},s)=>i.jsx("div",{className:"form-group",style:{marginBottom:0},children:i.jsx("input",{...o,ref:s,disabled:n,style:{...Is,opacity:n?.7:1,cursor:n?"not-allowed":"pointer",...r||{}}})})),It=({id:e,funcName:t,disabled:n=!1})=>{const r="Data",[o,s]=K.useState(!1),a=()=>{s(!0),t(e),I.message.success(`${r} deleted successfully!`)},l=()=>{I.message.info(`Deletion of ${r} cancelled`)};return i.jsx(I.Popconfirm,{title:`Delete ${r}?`,description:`Are you sure you want to delete ${r}?`,onConfirm:a,onCancel:l,okText:"Yes",cancelText:"No",disabled:n||o,children:i.jsx(I.Button,{danger:!0,disabled:n,loading:o,icon:i.jsx(be.DeleteOutlined,{}),size:"small"})})},Ft=e=>({optimisticData:t=>[...t.data,e],populateCache:(t,n)=>[...n.data,t]}),Ut=e=>({optimisticData:t=>t.data.filter(n=>n.id!==e),populateCache:(t,n)=>n.data.filter(r=>r.id!==e)}),Tn={height:36,padding:"0 14px",border:"none",background:"transparent",color:"#243a9b",fontSize:14,fontWeight:500,textTransform:"uppercase",boxShadow:"none"};function Fs({token:e}){const[t,n]=K.useState({pagination:{current:1,pageSize:10}}),[r,o]=K.useState(!1),[s,a]=K.useState(null),l=`api/branchapi/Transport/routeTableList?page=${t.pagination.current}&per_page=${t.pagination.pageSize}`,g="api/branchapi/Transport/addroute",u="api/branchapi/Transport/editroute",c="api/branchapi/Transport/deleteroute",{isLoading:y,data:T,error:x,mutate:p}=we(e?[l,e]:null,([A,$])=>Se(A,$)),d=async(A,$)=>{try{await p($t(A,$,e),Ft($)),le.success("Success! Added new item.",{duration:1e3,icon:"🎉"})}catch{le.error("Failed to add the new item.",{duration:1e3})}},f=A=>{A.preventDefault();const $=new FormData(A.target);d(g,$),A.target.reset()},R=(A,$)=>{n(G=>({...G,pagination:{current:A,pageSize:parseInt($,10)}}))},D=async A=>{try{await p(Nt(c,A,e),Ut(A)),le.success("Success! Deleted item.",{duration:1e3})}catch{le.error("Failed to delete the item.",{duration:1e3})}},j=A=>{a(A),o(!0)},F=async A=>{try{await Zn(u,A,e),await p(),le.success("Success! Updated item.",{duration:1e3,icon:"🚀"}),o(!1),a(null)}catch{le.error("Failed to update the item.",{duration:1e3})}},v=async A=>{A.preventDefault();const $=new FormData(A.target);$.append("id",s?.id),F($)},Q=[{title:"Route Title",dataIndex:"route_title",key:"route_title",sorter:{compare:(A,$)=>A.name.localeCompare($.route_title)}},{title:"Fare (Monthly)",dataIndex:"fare",key:"fare",sorter:{compare:(A,$)=>A.fare-$.fare}},{title:"Note",dataIndex:"note",key:"note",sorter:{compare:(A,$)=>A.note.localeCompare($.note)}},{title:"Action",key:"action",render:(A,$)=>i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[i.jsx(I.Button,{type:"text",size:"small",icon:i.jsx(be.EditOutlined,{}),onClick:()=>j($),style:{padding:2}}),i.jsx(It,{id:$?.id,funcName:D})]})}],te=s?.route_title?`Edit ${s.route_title}`:"Edit Route";return i.jsxs("div",{children:[i.jsx(I.Drawer,{open:r,title:te,placement:"right",width:420,onClose:()=>{o(!1),a(null)},children:i.jsx("form",{onSubmit:v,children:i.jsxs("div",{style:{display:"grid",gap:20},children:[i.jsx(ae,{type:"text",name:"title",label:"Title",defaultValue:s?.route_title||"",required:"required"}),i.jsx(ae,{type:"number",name:"fare",label:"Fare (Monthly)",defaultValue:s?.fare||"",required:"required"}),i.jsx(ae,{type:"text",name:"note",label:"Note",defaultValue:s?.note||""}),i.jsx("div",{style:{display:"none"},children:i.jsx(ae,{type:"text",name:"no_of_vehicle",label:"Note"})}),i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[i.jsx(Le,{type:"submit",value:"Update",color:"primary"}),i.jsx(I.Button,{type:"text",onClick:()=>{o(!1),a(null)},style:Tn,children:"Cancel"})]})]})})}),i.jsx(le.Toaster,{toastOptions:{position:"top-center"}}),i.jsx(oe,{pt:5,pb:1,children:i.jsxs("div",{children:[i.jsx("div",{children:i.jsxs("div",{children:[i.jsx(oe,{mx:2,mt:-3,py:1,px:1,variant:"gradient",bgColor:"info",borderRadius:"lg",coloredShadow:"info",children:i.jsx(_e,{variant:"h6",color:"white",children:"Add Route"})}),i.jsx(oe,{px:3,pb:2,children:i.jsx("form",{onSubmit:f,children:i.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:20,alignItems:"end"},children:[i.jsx(ae,{type:"text",name:"title",label:"Title",placeholder:"Mumbai to Delhi",required:"required"}),i.jsx(ae,{type:"number",name:"fare",label:"Fare (Monthly)",required:"required"}),i.jsx(ae,{type:"text",name:"note",label:"Note"}),i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[i.jsx(Le,{type:"submit",value:"Save",color:"primary"}),i.jsx(I.Button,{type:"text",htmlType:"reset",style:Tn,children:"Cancel"})]})]})})})]})}),i.jsx("div",{style:{marginTop:24},children:i.jsxs("div",{children:[i.jsx(oe,{mx:2,mt:-3,py:1,px:1,variant:"gradient",bgColor:"info",borderRadius:"lg",coloredShadow:"info",children:i.jsx(_e,{variant:"h6",color:"white",children:"Route List"})}),i.jsx(oe,{children:i.jsx(kt,{parentCallback:R,data:{newData:T,columns:Q,columnstype:"antd",action:!1,Loading:y,error:x,deleteTodoMutation:D}})})]})})]})})]})}const Rn={height:36,padding:"0 14px",border:"none",background:"transparent",color:"#243a9b",fontSize:14,fontWeight:500,textTransform:"uppercase",boxShadow:"none"};function Us({token:e}){const[t,n]=K.useState({page:1,rowsPerPage:10}),[r,o]=K.useState(!1),[s,a]=K.useState(null),l=`api/branchapi/Transport/vehiclesTableList?page=${t.page}&per_page=${t.rowsPerPage}`,g="api/branchapi/Transport/addvehicles",u="api/branchapi/Transport/editvehicle",c="api/branchapi/Transport/deletevehicle",{isLoading:y,data:T,error:x,mutate:p}=we(e?[l,e]:null,([A,$])=>Se(A,$)),d=async(A,$)=>{try{await p($t(A,$,e),Ft($)),le.success("Success! Added new item.",{duration:1e3,icon:"🎉"})}catch{le.error("Failed to add the new item.",{duration:1e3})}},f=A=>{A.preventDefault();const $=new FormData(A.target);d(g,$),A.target.reset()},R=async A=>{try{await p(Nt(c,A,e),Ut(A)),le.success("Success! Deleted item.",{duration:1e3})}catch{le.error("Failed to delete the item.",{duration:1e3})}},D=A=>{a(A),o(!0)},j=async A=>{try{await Zn(u,A,e),await p(),le.success("Success! Updated item.",{duration:1e3,icon:"🚀"}),o(!1),a(null)}catch{le.error("Failed to update the item.",{duration:1e3})}},F=async A=>{A.preventDefault();const $=new FormData(A.target);$.append("id",s?.id),j($)},v=(A,$)=>{n({page:A,rowsPerPage:parseInt($,10)})},Q=[{title:"Vehicle Number",dataIndex:"vehicle_no",key:"vehicle_no",sorter:{compare:(A,$)=>A.vehicle_no.localeCompare($.vehicle_no)}},{title:"Vehicle Model",dataIndex:"vehicle_model",key:"vehicle_model",sorter:{compare:(A,$)=>A.vehicle_model.localeCompare($.vehicle_model)}},{title:"Max Seating Capacity",dataIndex:"seating_capacity",key:"seating_capacity",sorter:{compare:(A,$)=>A.seating_capacity-$.seating_capacity}},{title:"Manufacture Year",dataIndex:"manufacture_year",key:"manufacture_year",sorter:{compare:(A,$)=>A.manufacture_year-$.manufacture_year}},{title:"Gps Url",key:"gps_url",sorter:{compare:(A,$)=>A.gps_url.localeCompare($.gps_url)},render:(A,$)=>i.jsx("span",{title:$?.gps_url??"",style:{display:"inline-block",maxWidth:220,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:$?.gps_url})},{title:"Note",dataIndex:"note",key:"note",sorter:{compare:(A,$)=>A.note.localeCompare($.note)}},{title:"Action",key:"action",render:(A,$)=>i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[i.jsx(I.Button,{type:"text",size:"small",icon:i.jsx(be.EditOutlined,{}),onClick:()=>D($),style:{padding:2}}),i.jsx(It,{id:$?.id,funcName:R})]})}],te=s?.vehicle_no?`Edit ${s.vehicle_no}`:"Edit Vehicle";return i.jsxs("div",{children:[i.jsx(I.Drawer,{open:r,title:te,placement:"right",width:420,onClose:()=>{o(!1),a(null)},children:i.jsx("form",{onSubmit:F,children:i.jsxs("div",{style:{display:"grid",gap:20},children:[i.jsx(ae,{type:"text",name:"number",label:"Vehicle Number",defaultValue:s?.vehicle_no||"",required:"required"}),i.jsx(ae,{type:"text",name:"model",label:"Vehicle Model",defaultValue:s?.vehicle_model||""}),i.jsx(ae,{type:"number",name:"manufacture_year",label:"Manufacture Year",defaultValue:s?.manufacture_year||""}),i.jsx(ae,{type:"number",name:"seating_capacity",label:"Max Seating Capacity",defaultValue:s?.seating_capacity||""}),i.jsx(ae,{type:"text",name:"gps_url",label:"Gps Url",defaultValue:s?.gps_url||""}),i.jsx(ae,{type:"text",name:"note",label:"Note",defaultValue:s?.note||""}),i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[i.jsx(Le,{type:"submit",value:"Update",color:"primary"}),i.jsx(I.Button,{type:"text",onClick:()=>{o(!1),a(null)},style:Rn,children:"Cancel"})]})]})})}),i.jsx(le.Toaster,{toastOptions:{position:"top-center"}}),i.jsx(oe,{pt:5,pb:1,children:i.jsxs("div",{children:[i.jsxs("div",{children:[i.jsx(oe,{mx:2,mt:-3,py:1,px:1,variant:"gradient",bgColor:"info",borderRadius:"lg",coloredShadow:"info",children:i.jsx(_e,{variant:"h6",color:"white",children:"Add Vehicle"})}),i.jsx(oe,{px:3,pb:2,children:i.jsx("form",{onSubmit:f,children:i.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:20,alignItems:"end"},children:[i.jsx(ae,{type:"text",name:"number",label:"Vehicle Number",required:"required"}),i.jsx(ae,{type:"text",name:"model",label:"Vehicle Model"}),i.jsx(ae,{type:"number",name:"manufacture_year",label:"Manufacture Year"}),i.jsx(ae,{type:"number",name:"seating_capacity",label:"Max Seating Capacity"}),i.jsx(ae,{type:"text",name:"gps_url",label:"Gps Url"}),i.jsx(ae,{type:"text",name:"note",label:"Note"}),i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[i.jsx(Le,{type:"submit",value:"Save",color:"primary"}),i.jsx(I.Button,{type:"text",htmlType:"reset",style:Rn,children:"Cancel"})]})]})})})]}),i.jsx("div",{style:{marginTop:24},children:i.jsxs("div",{children:[i.jsx(oe,{mx:2,mt:-3,py:1,px:1,variant:"gradient",bgColor:"info",borderRadius:"lg",coloredShadow:"info",children:i.jsx(_e,{variant:"h6",color:"white",children:"Vehicle List"})}),i.jsx(oe,{children:i.jsx(kt,{parentCallback:v,data:{newData:T,columns:Q,columnstype:"antd",action:!1,Loading:y,error:x,deleteTodoMutation:R}})})]})})]})})]})}var Ls=nr();const _t=Qn(Ls),ir=()=>{};class Lt extends K.Component{state={value:this.props.value||this.props.defaultValue||""};selectRef=null;setSelectRef=t=>{this.selectRef=t};componentDidUpdate(t){t.value!==this.props.value&&this.setState({value:this.props.value})}onChange=(t,n)=>{this.props.onChange(t,n),this.setState({value:t})};getValue=()=>{const{value:t}=this.state;return t?Array.isArray(t)?t.length?"valid":"":typeof t=="object"?t.value||"":t:""};render(){const{SelectComponent:t,required:n,...r}=this.props;console.log("sdsdsfsdddddddd",{...r});const{isDisabled:o}=this.props,s=!o;return i.jsxs("div",{children:[i.jsx(t,{...r,ref:this.setSelectRef,onChange:this.onChange}),s&&i.jsx("input",{tabIndex:-1,autoComplete:"off",style:{opacity:0,width:"100%",height:0,display:"block"},value:this.getValue(),onChange:ir,onFocus:()=>this.selectRef.focus(),required:n})]})}}Lt.defaultProps={onChange:ir};Lt.protoTypes={selectComponent:_t.func.isRequired,onChange:_t.func,required:_t.bool};const qs={display:"block",marginBottom:6,fontSize:"14px",fontWeight:500,color:"#222"},Bs={menuPortal:e=>({...e,zIndex:9999}),control:(e,t)=>({...e,minHeight:40,height:40,fontSize:"14px",border:"none",borderBottom:`1px solid ${t.isFocused?"#222":"#d9d9d9"}`,borderRadius:0,boxShadow:"none",backgroundColor:"transparent",transition:"border-color 0.2s ease","&:hover":{border:"none",borderBottom:`1px solid ${t.isFocused?"#222":"#a8a8a8"}`}}),valueContainer:e=>({...e,height:40,padding:"0 0",display:"flex",alignItems:"center"}),input:e=>({...e,margin:0,padding:0}),indicatorSeparator:()=>({display:"none"}),indicatorsContainer:e=>({...e,height:40}),dropdownIndicator:(e,t)=>({...e,padding:"0 0 0 8px",color:t.isFocused?"#222":"#b5b5b5"}),singleValue:e=>({...e,color:"#222",marginLeft:0}),placeholder:e=>({...e,color:"#9f9f9f",marginLeft:0}),option:(e,t)=>({...e,fontSize:"14px",backgroundColor:t.isFocused?"#f8f8f8":"#fff",color:"#222",cursor:"pointer"})},lr=e=>i.jsx(Cn.components.Input,{...e,className:"input-cont",required:!!e?.selectProps?.required,children:e.children}),Hs=e=>i.jsx(Lt,{...e,SelectComponent:Cn,components:{Input:lr},options:e.options}),Ws=K.forwardRef(({...e},t)=>i.jsxs("div",{className:"form-group",style:{height:"auto"},children:[e.label&&i.jsx("label",{className:"labelfont",style:qs,children:e?.label}),i.jsx(Hs,{components:{Input:lr},menuPortalTarget:document.body,styles:Bs,className:"input-cont",...e,ref:t})]})),zs={height:36,padding:"0 14px",border:"none",background:"transparent",color:"#243a9b",fontSize:14,fontWeight:500,textTransform:"uppercase",boxShadow:"none"},jn=({dataIndex:e,title:t,record:n,children:r,isEditable:o,...s})=>i.jsx("td",{...s,children:o?i.jsx("div",{style:{display:"flex",marginLeft:"5%"},children:r}):r});function Vs({token:e}){const[t,n]=K.useState(!1),[r,o]=K.useState({pagination:{current:1,pageSize:50}}),[s,a]=K.useState(null),[l,g]=K.useState([]),u="api/branchapi/Transport/getrouteDropdown",c="api/branchapi/Transport/getvehicleDropdown",y="api/branchapi/Transport/getchechkedVehicleData",T="api/branchapi/Transport/assignedVehicleTable",x="api/branchapi/transport/assignvehicle",p="api/branchapi/Transport/deleteassignvehicle",d=s?`${y}?route_id=${s}`:null,{isLoading:f,data:R,mutate:D}=we(e?[`${T}?page=${r.pagination.current}&per_page=${r.pagination.pageSize}`,e]:null,([m,S])=>Se(m,S)),{data:j}=we(e&&u?[u,e]:null,([m,S])=>Se(m,S)),{data:F}=we(e&&c?[c,e]:null,([m,S])=>Se(m,S)),v=e&&d?[d,e]:null,{isLoading:Q,data:te}=we(v,([m,S])=>Se(m,S)),{Status:A="Failed",pagination:{total_rows:$=0}={}}=R||{},{data:G=[]}=A==="Success"?R:{},k=K.useMemo(()=>{const m=j?.data??j??[];return Array.isArray(m)?m:[]},[j]),q=K.useMemo(()=>{const m=F?.data??F??[];return(Array.isArray(m)?m:[]).map(E=>{if(E==null)return null;if(typeof E=="string"||typeof E=="number")return{label:String(E),value:E};const P=E.value??E.vehicle_id??E.id??E.vehicleID,B=E.label??E.vehicle_name??E.vehicle_no??E.vehicle_number??E.name??String(P??"");return P==null||B===""?null:{label:String(B),value:P}}).filter(Boolean)},[F]),ee=K.useMemo(()=>{const m=te?.data??te??[];return(Array.isArray(m)?m:[]).map(E=>E?.value??E?.vehicle_id??E?.id??E).filter(E=>E!=null)},[te]);K.useEffect(()=>{g(ee)},[ee,t]);const C=async(m,S,E)=>{try{await D($t(m,S,e),Ft(S)),d&&we.mutate(v),n(P=>!P),le.success("Success! Added new item.",{duration:1e3,icon:"🎉"})}catch(P){le.error(P?.response?.data?.msg??"Failed to add the new item.",{duration:1e3})}},O=m=>{m.preventDefault();const S=new FormData;S.append("route_id",s??""),l.length?l.forEach(E=>S.append("vehicle_ids[]",E)):S.append("vehicle_ids[]",""),C(x,S)},w=m=>{o(S=>({...S,pagination:{current:m,pageSize:S.pagination.pageSize}}))},N=async m=>{try{await D(Nt(p,m,e),Ut(m)),d&&we.mutate(v),le.success("Success! Deleted item.",{duration:1e3})}catch{le.error("Failed to delete the item.",{duration:1e3})}},_=[{title:"Route",dataIndex:"route_title"},{title:"Vehicle Numbers",render:(m,S,E)=>i.jsx(i.Fragment,{children:S.children.map((P,B,z)=>i.jsx("span",{children:`${P.vehicle_name} ${B+1===z.length?"":","}`},`${B}vehicle001`))})},{title:"Action",render:(m,S,E)=>i.jsx(i.Fragment,{children:i.jsx(It,{id:S?.route_id,funcName:N})})}],L=m=>{const S=["route_id","index"];for(let E=0;E<S.length;E++)if(m[S[E]])return m[S[E]]},b=m=>{const{children:S=[]}=m||{},E=[{title:"Vehicle Name",dataIndex:"vehicle_name",onCell:P=>({isEditable:!0})},{title:"Driver Name",dataIndex:"driver_name",onCell:P=>({isEditable:!0})},{title:"Driver Contact",dataIndex:"driver_contact_number",onCell:P=>({isEditable:!0})},{title:"Driver Licence",dataIndex:"Driver_licence",onCell:P=>({isEditable:!0})},{title:"Start Time",dataIndex:"start_time",onCell:P=>({isEditable:!0})},{title:"Drop Time",dataIndex:"drop_time",onCell:P=>({isEditable:!0})},{title:"Type",dataIndex:"type",onCell:P=>({isEditable:!0})}];return i.jsx("div",{style:{display:"flex",justifyContent:"center"},children:i.jsx("div",{style:{width:"95%",margin:8},children:i.jsx(I.Table,{components:{body:{cell:jn}},expandable:{childrenColumnName:"changed"},bordered:!0,size:"small",columns:E,rowKey:P=>L(P)+"cell01",dataSource:S,pagination:!1})})})};return i.jsxs("div",{children:[i.jsx(le.Toaster,{toastOptions:{position:"top-center"}}),i.jsx(oe,{pt:5,pb:1,children:i.jsxs("div",{children:[i.jsxs("div",{children:[i.jsx(oe,{mx:2,mt:-3,py:1,px:1,variant:"gradient",bgColor:"info",borderRadius:"lg",coloredShadow:"info",children:i.jsx(_e,{variant:"h6",color:"white",children:"Assign Vehicle"})}),i.jsx(oe,{px:3,pb:2,children:i.jsx("form",{onSubmit:O,children:i.jsxs("div",{style:{display:"grid",gridTemplateColumns:"minmax(220px, 320px) 1fr auto",gap:20,alignItems:"end"},children:[i.jsx("div",{children:i.jsx(Ws,{options:k,closeMenuOnSelect:!0,hideSelectedOptions:!1,label:"Route",name:"route_id",required:!0,allowSelectAll:!1,onChange:m=>{a(m?.value??null),n(S=>!S)}})}),i.jsxs("div",{style:{width:"100%"},children:[i.jsx("label",{className:"labelfont",style:{display:"block",marginBottom:6,fontSize:14,fontWeight:500,color:"#222"},children:"Vehicles"}),i.jsx("div",{style:{borderBottom:"1px solid #d9d9d9",paddingBottom:8,maxHeight:140,overflow:"auto"},children:i.jsx(I.Checkbox.Group,{style:{display:"flex",flexWrap:"wrap",gap:12},options:q,value:l,onChange:m=>g(m),disabled:!s||Q})},`check001${t}`)]}),i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[i.jsx(Le,{type:"submit",value:"Save",color:"primary"}),i.jsx(I.Button,{type:"text",htmlType:"button",onClick:()=>{a(null),g([]),n(m=>!m)},style:zs,children:"Cancel"})]})]})})})]}),i.jsx("div",{style:{marginTop:24},children:i.jsxs("div",{children:[i.jsx(oe,{mx:2,mt:-3,py:1,px:1,variant:"gradient",bgColor:"info",borderRadius:"lg",coloredShadow:"info",children:i.jsx(_e,{variant:"h6",color:"white",children:"Vehicle List"})}),i.jsx(oe,{style:{padding:"10px 16px"},children:i.jsx(I.Table,{components:{body:{cell:jn}},columns:_,bordered:!0,rowKey:m=>L(m),dataSource:Array.isArray(G)?G:[],loading:f,expandable:{expandedRowRender:b,childrenColumnName:"changed"},pagination:{current:r.pagination.current,pageSize:r.pagination.pageSize,total:$,showSizeChanger:!0,onChange:w,onShowSizeChange:(m,S)=>{o(E=>({...E,pagination:{current:1,pageSize:S}}))},showTotal:(m,S)=>`${S[0]}-${S[1]} of ${m} items`}})})]})})]})})]})}const Ys=({routes:e=[],onNavigate:t})=>i.jsx(I.Row,{gutter:[16,16],children:e.map((n,r)=>i.jsx(I.Col,{xs:24,md:8,lg:8,children:i.jsx(oe,{children:i.jsx(On,{icon:n?.icon??"",title:n?.title??"",path:n?.path??"",onClick:t})})},`${r}route001`))});exports.AdmissionEnquiry=ks;exports.AssignVehicles=Vs;exports.ErpDashboard=gr;exports.MenuSubmenu=ns;exports.RoutePage=Ys;exports.TransportRoutes=Fs;exports.TransportVehicles=Us;