parcepatacore-compliance-review-react 1.0.0
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/README.md +24 -0
- package/dist/compliance-review-react.cjs.js +9 -0
- package/dist/compliance-review-react.es.js +2706 -0
- package/dist/components/CaseStatusBadge.d.ts +6 -0
- package/dist/components/CaseSummaryCard.d.ts +8 -0
- package/dist/components/MakerCheckerApprovalCard.d.ts +8 -0
- package/dist/components/PriorityChip.d.ts +6 -0
- package/dist/components/ReviewProvider.d.ts +14 -0
- package/dist/components/ReviewQueueWidget.d.ts +7 -0
- package/dist/components/SlaMonitorWidget.d.ts +3 -0
- package/dist/index.d.ts +9 -0
- package/dist/services/apiClient.d.ts +4 -0
- package/dist/types/index.d.ts +27 -0
- package/package.json +45 -0
package/README.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# parcepatacore-compliance-review-react
|
|
2
|
+
|
|
3
|
+
React Component SDK for Athena Compliance Review & Maker-Checker Dual Control Engine.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install parcepatacore-compliance-review-react
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import React from 'react';
|
|
15
|
+
import { ComplianceProvider, ReviewQueueWidget, CaseStatusBadge } from 'parcepatacore-compliance-review-react';
|
|
16
|
+
|
|
17
|
+
export function App() {
|
|
18
|
+
return (
|
|
19
|
+
<ComplianceProvider baseUrl="http://localhost:8007/api/v1">
|
|
20
|
+
<ReviewQueueWidget limit={5} />
|
|
21
|
+
</ComplianceProvider>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
```
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react/jsx-runtime"),W=require("react");function Ct(e,t){return function(){return e.apply(t,arguments)}}const{toString:dn}=Object.prototype,{getPrototypeOf:X}=Object,{iterator:ye,toStringTag:Tt}=Symbol,he=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Pt=e=>typeof e=="string"&&(e==="__proto__"||e==="constructor"||e==="prototype"),Ft=(e,t,n)=>e===Object.prototype||!n&&t===null,pn=e=>{if(!Object.isExtensible(e))return!1;const t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&t.push(...Object.getOwnPropertySymbols(e)),t.every(n=>{if(Pt(n))return!1;const r=Object.getOwnPropertyDescriptor(e,n);return!!r&&r.configurable&&r.writable===!0})},me=(e,t)=>{let n=e;const r=[];for(;n!=null;){if(r.indexOf(n)!==-1)return!1;r.push(n);const s=X(n);if(Ft(n,s,n===e))return!1;if(he(n,t))return!0;n=s}return!1},hn=(e,t)=>e!=null&&me(e,t)?e[t]:void 0,mn=e=>{if(e==null||typeof e!="object"&&typeof e!="function")return e;const t=X(e);if(t===null&&pn(e))return e;const n=Object.create(null),r=Object.create(null),s=[];let o=e;for(;o!=null&&s.indexOf(o)===-1;){s.push(o);const i=o===e?t:X(o);if(Ft(o,i,o===e))break;const l=Object.getOwnPropertyNames(o);Object.getOwnPropertySymbols&&l.push(...Object.getOwnPropertySymbols(o));for(const c of l)Pt(c)||he(r,c)||(n[c]=e[c],r[c]=!0);o=i}return n},Je=(e=>t=>{const n=dn.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),I=e=>(e=e.toLowerCase(),t=>Je(t)===e),Fe=e=>t=>typeof t===e,{isArray:te}=Array,ne=Fe("undefined");function ie(e){return e!==null&&!ne(e)&&e.constructor!==null&&!ne(e.constructor)&&B(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Dt=I("ArrayBuffer");function yn(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Dt(e.buffer),t}const gn=Fe("string"),B=Fe("function"),Nt=Fe("number"),ae=e=>e!==null&&typeof e=="object",bn=e=>e===!0||e===!1,Se=e=>{if(!ae(e))return!1;const t=X(e);return(t===null||t===Object.prototype||X(t)===null)&&!me(e,Tt)&&!me(e,ye)},En=e=>{if(!ae(e)||ie(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},wn=I("Date"),Rn=I("File"),xn=e=>!!(e&&typeof e.uri<"u"),On=e=>e&&typeof e.getParts<"u",Sn=I("Blob"),An=I("FileList"),_n=I("Set"),Cn=e=>ae(e)&&B(e.pipe);function Tn(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const at=Tn(),lt=typeof at.FormData<"u"?at.FormData:void 0,Pn=e=>{if(!e)return!1;if(lt&&e instanceof lt)return!0;const t=X(e);if(!t||t===Object.prototype||!B(e.append))return!1;const n=Je(e);return n==="formdata"||n==="object"&&B(e.toString)&&e.toString()==="[object FormData]"},Fn=I("URLSearchParams"),[Dn,Nn,jn,Ln]=["ReadableStream","Request","Response","Headers"].map(I),Bn=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ge(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),te(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(ie(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let l;for(r=0;r<i;r++)l=o[r],t.call(null,e[l],l,e)}}function jt(e,t){if(ie(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const Y=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Lt=e=>!ne(e)&&e!==Y;function We(...e){const{caseless:t,skipUndefined:n}=Lt(this)&&this||{},r={},s=(o,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const l=t&&typeof i=="string"&&jt(r,i)||i,c=he(r,l)?r[l]:void 0;Se(c)&&Se(o)?r[l]=We(c,o):Se(o)?r[l]=We({},o):te(o)?r[l]=o.slice():(!n||!ne(o))&&(r[l]=o)};for(let o=0,i=e.length;o<i;o++){const l=e[o];if(!l||ie(l)||(ge(l,s),typeof l!="object"||te(l)))continue;const c=Object.getOwnPropertySymbols(l);for(let d=0;d<c.length;d++){const f=c[d];Jn.call(l,f)&&s(l[f],f)}}return r}const Un=(e,t,n,{allOwnKeys:r}={})=>(ge(t,(s,o)=>{n&&B(s)?Object.defineProperty(e,o,{__proto__:null,value:Ct(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{__proto__:null,value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),In=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),kn=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},qn=(e,t,n,r)=>{let s,o,i;const l={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!r||r(i,e,t))&&!l[i]&&(t[i]=e[i],l[i]=!0);e=n!==!1&&X(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Mn=(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},Hn=e=>{if(!e)return null;if(te(e))return e;let t=e.length;if(!Nt(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},vn=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&X(Uint8Array)),zn=(e,t)=>{const r=(e&&e[ye]).call(e);let s;for(;(s=r.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},Wn=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},$n=I("HTMLFormElement"),Vn=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),{propertyIsEnumerable:Jn}=Object.prototype,Kn=I("RegExp"),Bt=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ge(n,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(r[o]=i||s)}),Object.defineProperties(e,r)},Xn=e=>{Bt(e,(t,n)=>{if(B(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(B(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+"'")})}})},Gn=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return te(e)?r(e):r(String(e).split(t)),n},Qn=()=>{},Zn=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Yn(e){return!!(e&&B(e.append)&&e[Tt]==="FormData"&&e[ye])}const er=e=>{const t=new WeakSet,n=r=>{if(ae(r)){if(t.has(r))return;if(ie(r))return r;if(!("toJSON"in r)){t.add(r);let s;if(_n(r)){s=[];for(const o of r){const i=n(o);!ne(i)&&s.push(i)}}else s=te(r)?[]:{},ge(r,(o,i)=>{const l=n(o);!ne(l)&&(s[i]=l)});return t.delete(r),s}}return r};return n(e)},tr=I("AsyncFunction"),nr=e=>e&&(ae(e)||B(e))&&B(e.then)&&B(e.catch),Ut=((e,t)=>e?setImmediate:t?((n,r)=>(Y.addEventListener("message",({source:s,data:o})=>{s===Y&&o===n&&r.length&&r.shift()()},!1),s=>{r.push(s),Y.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",B(Y.postMessage)),rr=typeof queueMicrotask<"u"?queueMicrotask.bind(Y):typeof process<"u"&&process.nextTick||Ut,It=e=>e!=null&&B(e[ye]),sr=e=>e!=null&&me(e,ye)&&It(e),a={isArray:te,isArrayBuffer:Dt,isBuffer:ie,isFormData:Pn,isArrayBufferView:yn,isString:gn,isNumber:Nt,isBoolean:bn,isObject:ae,isPlainObject:Se,isEmptyObject:En,isReadableStream:Dn,isRequest:Nn,isResponse:jn,isHeaders:Ln,isUndefined:ne,isDate:wn,isFile:Rn,isReactNativeBlob:xn,isReactNative:On,isBlob:Sn,isRegExp:Kn,isFunction:B,isStream:Cn,isURLSearchParams:Fn,isTypedArray:vn,isFileList:An,forEach:ge,merge:We,extend:Un,trim:Bn,stripBOM:In,inherits:kn,toFlatObject:qn,kindOf:Je,kindOfTest:I,endsWith:Mn,toArray:Hn,forEachEntry:zn,matchAll:Wn,isHTMLForm:$n,hasOwnProperty:he,hasOwnProp:he,hasOwnInPrototypeChain:me,getSafeProp:hn,toSafeFlatObject:mn,reduceDescriptors:Bt,freezeMethods:Xn,toObjectSet:Gn,toCamelCase:Vn,noop:Qn,toFiniteNumber:Zn,findKey:jt,global:Y,isContextDefined:Lt,isSpecCompliantForm:Yn,toJSONObject:er,isAsyncFn:tr,isThenable:nr,setImmediate:Ut,asap:rr,isIterable:It,isSafeIterable:sr},or=a.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"]),ir=e=>{const t={};let n,r,s;return e&&e.split(`
|
|
2
|
+
`).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim();const l=a.hasOwnProp(t,n);!n||l&&a.hasOwnProp(or,n)||(n==="set-cookie"?l?t[n].push(r):t[n]=[r]:t[n]=l?t[n]+", "+r:r)}),t};function ar(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)}const lr=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),cr=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Ke(e,t){return a.isArray(e)?e.map(n=>Ke(n,t)):ar(String(e).replace(t,""))}const ur=e=>Ke(e,lr),fr=e=>Ke(e,cr);function kt(e){const t=Object.create(null);return a.forEach(e.toJSON(),(n,r)=>{t[r]=fr(n)}),t}const ct=Symbol("internals");function fe(e){return e&&String(e).trim().toLowerCase()}function Ae(e){return e===!1||e==null?e:a.isArray(e)?e.map(Ae):ur(String(e))}function dr(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 pr=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function Ie(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 hr(e){const t=e.length-1;if(t<1||e.charCodeAt(0)!==34||e.charCodeAt(t)!==34)return e;let n="";for(let r=1;r<t;r++){const s=e.charCodeAt(r);if(s===34||s===92&&(r+=1,r>=t))return e;n+=e[r]}return n}function mr(e){const t=Object.create(null),n=String(e);let r=0,s=!1,o=!1;function i(l){const c=Ie(n.slice(r,l)),d=c.indexOf("=");if(d<1)return;const f=Ie(c.slice(0,d));if(!pr.test(f))return;const p=f.toLowerCase();if(p==="__proto__"||p==="constructor"||p==="prototype")return;const y=Ie(c.slice(d+1));t[p]=hr(y)}for(let l=0;l<n.length;l++){const c=n.charCodeAt(l);s?o?o=!1:c===92?o=!0:c===34&&(s=!1):c===34?s=!0:(c===44||c===59)&&(i(l),r=l+1)}return i(n.length),t}const yr=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ke(e,t,n,r,s){if(a.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!a.isString(t)){if(a.isString(r))return t.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(t)}}function gr(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function br(e,t){const n=a.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(s,o,i){return this[r].call(this,t,s,o,i)},configurable:!0})})}let L=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function o(l,c,d){const f=fe(c);if(!f)return;const p=a.findKey(s,f);(!p||s[p]===void 0||d===!0||d===void 0&&s[p]!==!1)&&(s[p||c]=Ae(l))}const i=(l,c)=>a.forEach(l,(d,f)=>o(d,f,c));if(a.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(a.isString(t)&&(t=t.trim())&&!yr(t))i(ir(t),n);else if(a.isObject(t)&&a.isSafeIterable(t)){let l=Object.create(null),c,d;for(const f of t){if(!a.isArray(f))throw new TypeError("Object iterator must return a key-value pair");d=f[0],a.hasOwnProp(l,d)?(c=l[d],l[d]=a.isArray(c)?[...c,f[1]]:[c,f[1]]):l[d]=f[1]}i(l,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=fe(t),t){const r=a.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return dr(s);if(a.isFunction(n))return n.call(this,s,r);if(a.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=fe(t),t){const r=a.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ke(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function o(i){if(i=fe(i),i){const l=a.findKey(r,i);l&&(!n||ke(r,r[l],l,n))&&(delete r[l],s=!0)}}return a.isArray(t)?t.forEach(o):o(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const o=n[r];(!t||ke(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const n=this,r={};return a.forEach(this,(s,o)=>{const i=a.findKey(r,o);if(i){n[i]=Ae(s),delete n[o];return}const l=t?gr(o):String(o).trim();l!==o&&delete n[o],n[l]=Ae(s),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return a.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&a.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(){const t=this.get("set-cookie");return a.isArray(t)?t:t==null||t===!1?[]:[t]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static parseParameters(t){return mr(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[ct]=this[ct]={accessors:{}}).accessors,s=this.prototype;function o(i){const l=fe(i);r[l]||(br(s,i),r[l]=!0)}return a.isArray(t)?t.forEach(o):o(t),this}};L.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);a.reduceDescriptors(L.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});a.freezeMethods(L);const Te="[REDACTED ****]";function Er(e){if(a.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(a.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function wr(e,t){const n=new Set(t.map(o=>String(o).toLowerCase())),r=[],s=o=>{if(o===null||typeof o!="object"||a.isBuffer(o))return o;if(r.indexOf(o)!==-1)return;o instanceof L&&(o=o.toJSON()),r.push(o);let i;if(a.isArray(o))i=[],o.forEach((l,c)=>{const d=s(l);a.isUndefined(d)||(i[c]=d)});else{if(!a.isPlainObject(o)&&Er(o))return r.pop(),o;i=Object.create(null);for(const[l,c]of Object.entries(o)){const d=n.has(l.toLowerCase())?Te:s(c);a.isUndefined(d)||(i[l]=d)}}return r.pop(),i};return s(e)}function ut(e){try{return String(e)}catch{return""}}function Rr(e){return e.errors.map(n=>{try{return n&&n.message?ut(n.message):ut(n)}catch{return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}let h=class qt extends Error{static from(t,n,r,s,o,i){let l=t.message;!l&&a.isArray(t.errors)&&t.errors.length&&(l=Rr(t));const c=new qt(l,n||t.code,r,s,o);return Object.defineProperty(c,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),i&&Object.assign(c,i),c}constructor(t,n,r,s,o){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),s&&(this.request=s),o&&(this.response=o,this.status=o.status)}toJSON(){const t=this.config,n=t&&a.hasOwnProp(t,"redact")?t.redact:void 0,r=a.isArray(n)&&n.length>0?wr(t,n):a.toJSONObject(t);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:r,code:this.code,status:this.status}}};h.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";h.ERR_BAD_OPTION="ERR_BAD_OPTION";h.ECONNABORTED="ECONNABORTED";h.ETIMEDOUT="ETIMEDOUT";h.ECONNREFUSED="ECONNREFUSED";h.ERR_NETWORK="ERR_NETWORK";h.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";h.ERR_DEPRECATED="ERR_DEPRECATED";h.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";h.ERR_BAD_REQUEST="ERR_BAD_REQUEST";h.ERR_CANCELED="ERR_CANCELED";h.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";h.ERR_INVALID_URL="ERR_INVALID_URL";h.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const xr=null,Mt=100;function $e(e){return a.isPlainObject(e)||a.isArray(e)}function Ht(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function qe(e,t,n){return e?e.concat(t).map(function(s,o){return s=Ht(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function Or(e){return a.isArray(e)&&!e.some($e)}const Sr=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function De(e,t,n){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(m,E)=>{const g=a.getSafeProp(n,m);return a.isUndefined(g)?E:g},s=r("metaTokens",!0),o=r("visitor")||S,i=r("dots",!1),l=r("indexes",!1),c=r("Blob")||typeof Blob<"u"&&Blob,d=r("maxDepth",Mt),f=c&&a.isSpecCompliantForm(t),p=[];if(!a.isFunction(o))throw new TypeError("visitor must be a function");function y(m){if(m===null)return"";if(a.isDate(m))return m.toISOString();if(a.isBoolean(m))return m.toString();if(!f&&a.isBlob(m))throw new h("Blob is not supported. Use a Buffer instead.");if(a.isArrayBuffer(m)||a.isTypedArray(m)){if(f&&typeof c=="function")return new c([m]);throw new h("Blob is not supported. Use a Buffer instead.",h.ERR_NOT_SUPPORT)}return m}function R(m){if(m>d)throw new h("Object is too deeply nested ("+m+" levels). Max depth: "+d,h.ERR_FORM_DATA_DEPTH_EXCEEDED)}function x(m,E){if(d===1/0)return JSON.stringify(m);const g=[];return JSON.stringify(m,function(D,_){if(!a.isObject(_))return _;for(;g.length&&g[g.length-1]!==this;)g.pop();return g.push(_),R(E+g.length-1),_})}function S(m,E,g){let T=m;if(a.isReactNative(t)&&a.isReactNativeBlob(m))return t.append(qe(g,E,i),y(m)),!1;if(m&&!g&&typeof m=="object"){if(a.endsWith(E,"{}"))E=s?E:E.slice(0,-2),m=x(m,1);else if(a.isArray(m)&&Or(m)||(a.isFileList(m)||a.endsWith(E,"[]"))&&(T=a.toArray(m)))return E=Ht(E),T.forEach(function(_,q){!(a.isUndefined(_)||_===null)&&t.append(l===!0?qe([E],q,i):l===null?E:E+"[]",y(_))}),!1}return $e(m)?!0:(t.append(qe(g,E,i),y(m)),!1)}const C=Object.assign(Sr,{defaultVisitor:S,convertValue:y,isVisitable:$e});function u(m,E,g=0){if(!a.isUndefined(m)){if(R(g),p.indexOf(m)!==-1)throw new Error("Circular reference detected in "+E.join("."));p.push(m),a.forEach(m,function(D,_){(!(a.isUndefined(D)||D===null)&&o.call(t,D,a.isString(_)?_.trim():_,E,C))===!0&&u(D,E?E.concat(_):[_],g+1)}),p.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return u(e),t}function ft(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Xe(e,t){this._pairs=[],e&&De(e,this,t)}const vt=Xe.prototype;vt.append=function(t,n){this._pairs.push([t,n])};vt.toString=function(t){const n=t?r=>t.call(this,r,ft):ft;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Ar(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function zt(e,t,n){if(!t)return e;e=e||"";const r=a.isFunction(n)?{serialize:n}:n,s=a.getSafeProp(r,"encode")||Ar,o=a.getSafeProp(r,"serialize");let i;if(o?i=o(t,r):i=a.isURLSearchParams(t)?t.toString():new Xe(t,r).toString(s),i){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}const de=Symbol("internals");function Wt(e){return e?e.length:0}function dt(e){if(e)for(;e.length&&e[e.length-1]===null;)e.pop()}function pe(e,t){const n=e.handlers,r=Wt(n);n!==t.handlersRef?(t.handlersRef=n,t.handlerEntries.clear()):r!==t.handlersLength&&(r?t.handlerEntries.forEach(function(o,i){n[o.index]!==o.handler&&t.handlerEntries.delete(i)}):t.handlerEntries.clear()),t.handlersLength=r}class pt{constructor(){this.handlers=[],this[de]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(t,n,r){const s={fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null},o=this[de];this.handlers==null&&(this.handlers=[]),pe(this,o);const i=o.nextId++;return this.handlers.push(s),o.handlerEntries.set(i,{handler:s,index:this.handlers.length-1}),o.handlersLength=this.handlers.length,i}eject(t){const n=this[de];pe(this,n);const r=n.handlerEntries.get(t);if(r){if(n.handlerEntries.delete(t),this.handlers[r.index]!==r.handler)return;this.handlers[r.index]=null,n.iterationDepth||(dt(this.handlers),n.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],pe(this,this[de]))}forEach(t){const n=this[de];pe(this,n),n.iterationDepth++;try{a.forEach(this.handlers,function(s){s!==null&&t(s)})}finally{--n.iterationDepth||(pe(this,n),dt(this.handlers),n.handlersLength=Wt(this.handlers))}}}const Ge={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},_r=typeof URLSearchParams<"u"?URLSearchParams:Xe,Cr=typeof FormData<"u"?FormData:null,Tr=typeof Blob<"u"?Blob:null,Pr={isBrowser:!0,classes:{URLSearchParams:_r,FormData:Cr,Blob:Tr},protocols:["http","https","file","blob","url","data"]},Qe=typeof window<"u"&&typeof document<"u",Ve=typeof navigator=="object"&&navigator||void 0,Fr=Qe&&(!Ve||["ReactNative","NativeScript","NS"].indexOf(Ve.product)<0),Dr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Nr=Qe&&window.location.href||"http://localhost",jr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Qe,hasStandardBrowserEnv:Fr,hasStandardBrowserWebWorkerEnv:Dr,navigator:Ve,origin:Nr},Symbol.toStringTag,{value:"Module"})),P={...jr,...Pr};function Lr(e,t){return De(e,new P.classes.URLSearchParams,{visitor:function(n,r,s,o){return P.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}const ht=Mt;function $t(e){if(e>ht)throw new h("FormData field is too deeply nested ("+e+" levels). Max depth: "+ht,h.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Br(e){const t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g;let r;for(;(r=n.exec(e))!==null;)$t(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function Ur(e){const t={},n=Object.keys(e);let r;const s=n.length;let o;for(r=0;r<s;r++)o=n[r],t[o]=e[o];return t}function Vt(e){function t(n,r,s,o){$t(o);let i=n[o++];if(i==="__proto__")return!0;const l=Number.isFinite(+i),c=o>=n.length;return i=!i&&a.isArray(s)?s.length:i,c?(a.hasOwnProp(s,i)?s[i]=a.isArray(s[i])?s[i].concat(r):[s[i],r]:s[i]=r,!l):((!a.hasOwnProp(s,i)||!a.isObject(s[i]))&&(s[i]=[]),t(n,r,s[i],o)&&a.isArray(s[i])&&(s[i]=Ur(s[i])),!l)}if(a.isFormData(e)&&a.isFunction(e.entries)){const n={};return a.forEachEntry(e,(r,s)=>{t(Br(r),s,n,0)}),n}return null}const Jt=Object.freeze(["get","delete","head","options","post","put","patch","purge","link","unlink","query"]),oe=(e,t)=>e!=null&&a.hasOwnProp(e,t)?e[t]:void 0;function Ir(e,t,n){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const be={transitional:Ge,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=a.isObject(t);if(o&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return s?JSON.stringify(Vt(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t)||a.isReadableStream(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(o){const c=oe(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return Lr(t,c).toString();if((l=a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=oe(this,"env"),f=d&&d.FormData;return De(l?{"files[]":t}:t,f&&new f,c)}}return o||s?(n.setContentType("application/json",!1),Ir(t)):t}],transformResponse:[function(t){const n=oe(this,"transitional")||be.transitional,r=n&&n.forcedJSONParsing,s=oe(this,"responseType"),o=s==="json";if(a.isResponse(t)||a.isReadableStream(t))return t;if(t&&a.isString(t)&&(r&&!s||o)){const l=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,oe(this,"parseReviver"))}catch(c){if(l)throw c.name==="SyntaxError"?h.from(c,h.ERR_BAD_RESPONSE,this,null,oe(this,"response")):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:P.classes.FormData,Blob:P.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(Jt,e=>{be.headers[e]={}});function Me(e,t){const n=this||be,r=t||n,s=L.from(r.headers);let o=r.data;return a.forEach(e,function(l){o=l.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function Kt(e){return!!(e&&e.__CANCEL__)}let Ee=class extends h{constructor(t,n,r){super(t??"canceled",h.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Xt(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new h("Request failed with status code "+n.status,n.status>=400&&n.status<500?h.ERR_BAD_REQUEST:h.ERR_BAD_RESPONSE,n.config,n.request,n))}const kr=/[\t\n\r]/g;function Gt(e){if(typeof e!="string")return e;let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t).replace(kr,"")}function He(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function qr(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,o=0,i;return t=t!==void 0?t:1e3,function(c){const d=Date.now(),f=r[o];i||(i=d),n[s]=c,r[s]=d;let p=o,y=0;for(;p!==s;)y+=n[p++],p=p%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),d-i<t)return;const R=f&&d-f;return R?Math.round(y*1e3/R):void 0}}function Mr(e,t){let n=0,r=1e3/t,s,o;const i=(f,p=Date.now())=>{n=p,s=null,o&&(clearTimeout(o),o=null),e(...f)};return[(...f)=>{const p=Date.now(),y=p-n;y>=r?i(f,p):(s=f,o||(o=setTimeout(()=>{o=null,i(s)},r-y)))},()=>s&&i(s),(...f)=>i(f)]}const Pe=(e,t,n=3)=>{let r=0;const s=qr(50,250);return Mr(o=>{if(!o||!a.isNumber(o.loaded))return;const i=o.loaded,l=o.lengthComputable?o.total:void 0,c=Math.max(0,l!=null?Math.min(i,l):i),d=Math.max(0,c-r),f=s(d);r=Math.max(r,c);const p={loaded:c,total:l,progress:l?c/l:void 0,bytes:d,rate:f||void 0,estimated:f&&l?(l-c)/f:void 0,event:o,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(p)},n)},mt=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},yt=(e,t=a.asap)=>(...n)=>t(()=>e(...n)),Hr=P.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,P.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(P.origin),P.navigator&&/(msie|trident)/i.test(P.navigator.userAgent)):()=>!0,vr=P.hasStandardBrowserEnv?{write(e,t,n,r,s,o,i){if(typeof document>"u")return;const l=[`${e}=${encodeURIComponent(t)}`];a.isNumber(n)&&l.push(`expires=${new Date(n).toUTCString()}`),a.isString(r)&&l.push(`path=${r}`),a.isString(s)&&l.push(`domain=${s}`),o===!0&&l.push("secure"),a.isString(i)&&l.push(`SameSite=${i}`),document.cookie=l.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),s=r.indexOf("=");if(s!==-1&&r.slice(0,s)===e)try{return decodeURIComponent(r.slice(s+1))}catch{return r.slice(s+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function zr(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Wr(e,t){if(!t)return e;let n=e.length;for(;n>0&&e.charCodeAt(n-1)===47;)n--;return e.slice(0,n)+"/"+t.replace(/^\/+/,"")}const $r=/^https?:(?!\/\/)/i;function Vr(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(t,n,r="")=>`${n}${r}${Te}`)}function Jr(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${Te}@`),n=t.indexOf("#"),s=(n===-1?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${Te}`);return n===-1?s:`${s}#${Vr(t.slice(n+1))}`}function gt(e,t){if(typeof e=="string"){const n=Gt(e);if($r.test(n))throw new h(`Invalid URL ${JSON.stringify(Jr(n))}: missing "//" after protocol`,h.ERR_INVALID_URL,t)}}function Qt(e,t,n,r){gt(t,r);let s=!zr(t);return e&&(s||n===!1)?(gt(e,r),Wr(e,t)):t}const bt=e=>e instanceof L?{...e}:e,Kr=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function re(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(f,p,y,R){return a.isPlainObject(f)&&a.isPlainObject(p)?a.merge.call({caseless:R},f,p):a.isPlainObject(p)?a.merge({},p):a.isArray(p)?p.slice():p}function s(f,p,y,R){if(a.isUndefined(p)){if(!a.isUndefined(f))return r(void 0,f,y,R)}else return r(f,p,y,R)}function o(f,p){if(!a.isUndefined(p))return r(void 0,p)}function i(f,p){if(a.isUndefined(p)){if(!a.isUndefined(f))return r(void 0,f)}else return r(void 0,p)}function l(f){const p=a.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!a.isUndefined(p))if(a.isPlainObject(p)){if(a.hasOwnProp(p,f))return p[f]}else return;const y=a.hasOwnProp(e,"transitional")?e.transitional:void 0;if(a.isPlainObject(y)&&a.hasOwnProp(y,f))return y[f]}function c(f,p,y){if(a.hasOwnProp(t,y))return r(f,p);if(a.hasOwnProp(e,y))return r(void 0,f)}const d={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutErrorMessage: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:c,headers:(f,p,y)=>s(bt(f),bt(p),y,!0)};return a.forEach(Kr({...e,...t}),function(p){if(p==="__proto__"||p==="constructor"||p==="prototype")return;const y=a.hasOwnProp(d,p)?d[p]:s,R=a.hasOwnProp(e,p)?e[p]:void 0,x=a.hasOwnProp(t,p)?t[p]:void 0,S=y(R,x,p);a.isUndefined(S)&&y!==c||(n[p]=S)}),a.hasOwnProp(t,"validateStatus")&&a.isUndefined(t.validateStatus)&&l("validateStatusUndefinedResolves")===!1&&(a.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const Xr=["content-type","content-length"];function Gr(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,s])=>{Xr.includes(r.toLowerCase())&&e.set(r,s)})}const Qr=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function Zt(e){const t=re({},e),n=y=>a.hasOwnProp(t,y)?t[y]:void 0,r=n("data");let s=n("withXSRFToken");const o=n("xsrfHeaderName"),i=n("xsrfCookieName");let l=n("headers");const c=n("auth"),d=n("baseURL"),f=n("allowAbsoluteUrls"),p=n("url");if(t.headers=l=L.from(l),t.url=zt(Qt(d,p,f,t),n("params"),n("paramsSerializer")),c){const y=a.getSafeProp(c,"username")||"",R=a.getSafeProp(c,"password")||"";try{l.set("Authorization","Basic "+btoa(y+":"+(R?Qr(R):"")))}catch(x){throw h.from(x,h.ERR_BAD_OPTION_VALUE,e)}}if(a.isFormData(r)){const y=a.getSafeProp(r,"getHeaders");P.hasStandardBrowserEnv||P.hasStandardBrowserWebWorkerEnv||a.isReactNative(r)?l.setContentType(void 0):a.isFunction(y)&&Gr(l,y.call(r),n("formDataHeaderPolicy"))}if(P.hasStandardBrowserEnv&&(a.isFunction(s)&&(s=s(t)),s===!0||s==null&&Hr(t.url))){const R=o&&i&&vr.read(i);R&&l.set(o,R)}return t}const Zr=typeof XMLHttpRequest<"u",Yr=Zr&&function(e){return new Promise(function(n,r){const s=Zt(e);let o=s.data;const i=L.from(s.headers).normalize();let{responseType:l,onUploadProgress:c,onDownloadProgress:d}=s,f,p,y,R,x,S;function C(){R&&R(),x&&x(),s.cancelToken&&s.cancelToken.unsubscribe(f),s.signal&&s.signal.removeEventListener("abort",f)}let u=new XMLHttpRequest;u.open(s.method.toUpperCase(),s.url,!0),u.timeout=s.timeout;function m(g){if(!u)return;if(u.status===0&&(He(Gt(s.url))||He(P.origin))!=="file"&&!(u.responseURL&&u.responseURL.startsWith("file:"))){r(new h("Request aborted",h.ECONNABORTED,e,u)),C(),u=null;return}try{g?S&&S(g):x&&x()}catch(q){setTimeout(()=>{throw q})}if(!u)return;const T=L.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),_={data:!l||l==="text"||l==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:T,config:e,request:u};Xt(function(G){n(G),C()},function(G){r(G),C()},_),u=null}"onloadend"in u?u.onloadend=m:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.startsWith("file:"))||setTimeout(m)},u.onabort=function(){u&&(r(new h("Request aborted",h.ECONNABORTED,e,u)),C(),u=null)},u.onerror=function(T){const D=T&&T.message?T.message:"Network Error",_=new h(D,h.ERR_NETWORK,e,u);_.event=T||null,r(_),C(),u=null},u.ontimeout=function(){let T=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const D=s.transitional||Ge;s.timeoutErrorMessage&&(T=s.timeoutErrorMessage),r(new h(T,D.clarifyTimeoutError?h.ETIMEDOUT:h.ECONNABORTED,e,u)),C(),u=null},o===void 0&&i.setContentType(null),"setRequestHeader"in u&&a.forEach(kt(i),function(T,D){u.setRequestHeader(D,T)}),a.isUndefined(s.withCredentials)||(u.withCredentials=!!s.withCredentials),l&&l!=="json"&&(u.responseType=s.responseType),d&&([y,x,S]=Pe(d,!0),u.addEventListener("progress",y)),c&&u.upload&&([p,R]=Pe(c),u.upload.addEventListener("progress",p),u.upload.addEventListener("loadend",R)),(s.cancelToken||s.signal)&&(f=g=>{u&&(r(!g||g.type?new Ee(null,e,u):g),u.abort(),C(),u=null)},s.cancelToken&&s.cancelToken.subscribe(f),s.signal&&(s.signal.aborted?f():s.signal.addEventListener("abort",f)));const E=He(s.url);if(E&&!P.protocols.includes(E)){r(new h("Unsupported protocol "+E+":",h.ERR_BAD_REQUEST,e)),C();return}u.send(o||null)})},es=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const s=function(c){if(!r){r=!0,i();const d=c instanceof Error?c:this.reason;n.abort(d instanceof h?d:new Ee(d instanceof Error?d.message:d))}};let o=t&&setTimeout(()=>{o=null,s(new h(`timeout of ${t}ms exceeded`,h.ETIMEDOUT))},t);const i=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),e=null)};e.forEach(c=>{if(!r){if(c.aborted){s.call(c);return}c.addEventListener("abort",s,{once:!0})}});const{signal:l}=n;return l.unsubscribe=()=>a.asap(i),l},ts=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},ns=async function*(e,t){for await(const n of rs(e))yield*ts(n,t)},rs=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()}},Et=(e,t,n,r)=>{const s=ns(e,t);let o=0,i,l=c=>{i||(i=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:d,value:f}=await s.next();if(d){l(),c.close();return}let p=f.byteLength;if(n){let y=o+=p;n(y)}c.enqueue(new Uint8Array(f))}catch(d){throw l(d),d}},cancel(c){return l(c),s.return()}},{highWaterMark:2})},wt=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,Yt=(e,t,n)=>t+2<n&&wt(e.charCodeAt(t+1))&&wt(e.charCodeAt(t+2)),Rt=e=>e<=57?e-48:(e&223)-55,ss=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,os=e=>e===9||e===10||e===12||e===13||e===32,is=e=>{const t=Math.floor(e/4),n=e%4;return t*3+(n===2?1:n===3?2:0)},as=e=>{const t=e.length;let n=0;return t>0&&e.charCodeAt(t-1)===61&&(n++,t>1&&e.charCodeAt(t-2)===61&&n++),Math.floor((t-n)*3/4)},ls=e=>{const t=e.length;let n=0,r=0,s=!1;for(let o=0;o<t;o++){let i=e.charCodeAt(o);if(i===37&&Yt(e,o,t)&&(i=Rt(e.charCodeAt(o+1))*16+Rt(e.charCodeAt(o+2)),o+=2),!os(i)){if(i===61){r++;continue}if(!ss(i)||r>0){s=!0;continue}n++}}return s||r>2||r>0&&(n+r)%4!==0||n%4===1?as(e):is(n)},cs=(e,t)=>{if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const n=e.indexOf(",");if(n<0)return 0;const r=e.slice(5,n),s=e.slice(n+1);if(/;base64/i.test(r))return t(s);let i=0;for(let l=0,c=s.length;l<c;l++){const d=s.charCodeAt(l);if(d===37&&Yt(s,l,c))i+=1,l+=2;else if(d<128)i+=1;else if(d<2048)i+=2;else if(d>=55296&&d<=56319&&l+1<c){const f=s.charCodeAt(l+1);f>=56320&&f<=57343?(i+=4,l++):i+=3}else i+=3}return i};function us(e){const t=typeof e=="string"?e.indexOf("#"):-1;return cs(t===-1?e:e.slice(0,t),ls)}const Ze="1.20.0",xt=64*1024,fs={cache:"default",redirect:"follow",referrer:"about:client",referrerPolicy:"",mode:"cors",integrity:"",keepalive:!1,priority:"auto",window:null},{isFunction:Oe}=a,ds=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),Ot=e=>{if(!a.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},St=(e,...t)=>{try{return!!e(...t)}catch{return!1}},ps=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},hs=e=>{const t=a.global!==void 0&&a.global!==null?a.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=a.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:s,Request:o,Response:i}=e,l=s?Oe(s):typeof fetch=="function",c=Oe(o),d=Oe(i);if(!l)return!1;const f=l&&Oe(n),p=l&&(typeof r=="function"?(u=>m=>u.encode(m))(new r):async u=>new Uint8Array(await new o(u).arrayBuffer())),y=c&&f&&St(()=>{let u=!1;const m=new o(P.origin,{body:new n,method:"POST",get duplex(){return u=!0,"half"}}),E=m.headers.has("Content-Type");return m.body!=null&&m.body.cancel(),u&&!E}),R=d&&f&&St(()=>a.isReadableStream(new i("").body)),x={stream:R&&(u=>u.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(u=>{!x[u]&&(x[u]=(m,E)=>{let g=m&&m[u];if(g)return g.call(m);throw new h(`Response type '${u}' is not supported`,h.ERR_NOT_SUPPORT,E)})});const S=async u=>{if(u==null)return 0;if(a.isBlob(u))return u.size;if(a.isSpecCompliantForm(u))return(await new o(P.origin,{method:"POST",body:u}).arrayBuffer()).byteLength;if(a.isArrayBufferView(u)||a.isArrayBuffer(u))return u.byteLength;if(a.isURLSearchParams(u)&&(u=u+""),a.isString(u))return(await p(u)).byteLength},C=async(u,m)=>{const E=a.toFiniteNumber(u.getContentLength());return E??S(m)};return async u=>{let{url:m,method:E,data:g,signal:T,cancelToken:D,timeout:_,onDownloadProgress:q,onUploadProgress:G,responseType:$,headers:V,withCredentials:we="same-origin",fetchOptions:Le,maxContentLength:M,maxBodyLength:Re,maxRedirects:ln}=Zt(u);const le=a.isNumber(M)&&M>-1,Be=a.isNumber(Re)&&Re>-1,cn=O=>a.hasOwnProp(u,O)?u[O]:void 0;let nt=s||fetch;$=$?($+"").toLowerCase():"text";let J=es([T,D&&D.toAbortSignal()],_),F=null;const Q=J&&J.unsubscribe&&(()=>{J.unsubscribe()});let se,ce=null;const rt=()=>new h("Request body larger than maxBodyLength limit",h.ERR_BAD_REQUEST,u,F);try{let O;const U=cn("auth");if(U){const b=a.getSafeProp(U,"username")||"",N=a.getSafeProp(U,"password")||"";O={username:b,password:N}}if(ps(m)){const b=new URL(m,P.origin);if(!O&&(b.username||b.password)){const N=Ot(b.username),K=Ot(b.password);O={username:N,password:K}}(b.username||b.password)&&(b.username="",b.password="",m=b.href)}if(O&&(V.delete("authorization"),V.set("Authorization","Basic "+btoa(ds((O.username||"")+":"+(O.password||""))))),le&&typeof m=="string"&&m.startsWith("data:")&&us(m)>M)throw new h("maxContentLength size of "+M+" exceeded",h.ERR_BAD_RESPONSE,u,F);if(Be&&E!=="get"&&E!=="head"){const b=await S(g);if(typeof b=="number"&&isFinite(b)&&(se=b,b>Re))throw rt()}const xe=Be&&(a.isReadableStream(g)||a.isStream(g)),st=(b,N,K)=>Et(b,xt,Z=>{if(Be&&Z>Re)throw ce=rt();N&&N(Z)},K);if(y&&E!=="get"&&E!=="head"&&(G||xe)){if(se=se??await C(V,g),se!==0||xe){let b=new o(m,{method:"POST",body:g,duplex:"half"}),N;if(a.isFormData(g)&&(N=b.headers.get("content-type"))&&V.setContentType(N),b.body){const[K,Z]=G&&mt(se,Pe(yt(G)))||[];g=st(b.body,K,Z)}}}else if(xe&&!c&&f&&E!=="get"&&E!=="head")g=st(g);else if(xe&&c&&!y&&E!=="get"&&E!=="head")throw new h("Stream request bodies are not supported by the current fetch implementation",h.ERR_NOT_SUPPORT,u,F);a.isString(we)||(we=we?"include":"omit");const un=c&&"credentials"in o.prototype;if(a.isFormData(g)){const b=V.getContentType();b&&/^multipart\/form-data/i.test(b)&&!/boundary=/i.test(b)&&V.delete("content-type")}V.set("User-Agent","axios/"+Ze,!1);const k=Le==null?Le:Object.assign(Object.create(null),Le);k&&(delete k.body,delete k.headers,delete k.method,delete k.signal,delete k.duplex,delete k.credentials);const H=Object.assign(Object.create(null),k,{signal:J,method:E.toUpperCase(),headers:kt(V.normalize()),body:g,duplex:"half",credentials:un?we:void 0});c&&(a.forEach(fs,(b,N)=>{H[N]===void 0&&(H[N]=b)}),H.signal===void 0&&(H.signal=null),H.body===void 0&&(H.body=null)),ln===0&&(H.redirect="manual",k&&(k.redirect="manual")),F=c&&new o(m,H);let v=await(c?nt(F,k):nt(m,H));const ot=L.from(v.headers);if(le){const b=a.toFiniteNumber(ot.getContentLength());if(b!=null&&b>M)throw new h("maxContentLength size of "+M+" exceeded",h.ERR_BAD_RESPONSE,u,F)}const Ue=R&&($==="stream"||$==="response");if(R&&v.body&&(q||le||Ue&&Q)){const b={};["status","statusText","headers"].forEach(ue=>{b[ue]=v[ue]});const N=a.toFiniteNumber(ot.getContentLength()),[K,Z]=q&&mt(N,Pe(yt(q),!0))||[];let it=0;const fn=ue=>{if(le&&(it=ue,it>M))throw new h("maxContentLength size of "+M+" exceeded",h.ERR_BAD_RESPONSE,u,F);K&&K(ue)};v=new i(Et(v.body,xt,fn,()=>{Z&&Z(),Q&&Q()}),b)}$=$||"text";let z=await x[a.findKey(x,$)||"text"](v,u);if(le&&!R&&!Ue){let b;if(z!=null&&(typeof z.byteLength=="number"?b=z.byteLength:typeof z.size=="number"?b=z.size:typeof z=="string"&&(b=typeof r=="function"?new r().encode(z).byteLength:z.length)),typeof b=="number"&&b>M)throw new h("maxContentLength size of "+M+" exceeded",h.ERR_BAD_RESPONSE,u,F)}return!Ue&&Q&&Q(),await new Promise((b,N)=>{Xt(b,N,{data:z,headers:L.from(v.headers),status:v.status,statusText:v.statusText,config:u,request:F})})}catch(O){if(Q&&Q(),J&&J.aborted&&J.reason instanceof h){const U=J.reason;throw U.config=u,F&&(U.request=F),O!==U&&Object.defineProperty(U,"cause",{__proto__:null,value:O,writable:!0,enumerable:!1,configurable:!0}),U}if(ce)throw F&&!ce.request&&(ce.request=F),ce;if(O instanceof h)throw F&&!O.request&&(O.request=F),O;if(O&&O.name==="TypeError"&&/Load failed|fetch/i.test(O.message)){const U=new h("Network Error",h.ERR_NETWORK,u,F,O&&O.response);throw Object.defineProperty(U,"cause",{__proto__:null,value:O.cause||O,writable:!0,enumerable:!1,configurable:!0}),U}throw h.from(O,O&&O.code,u,F,O&&O.response)}}},ms=new Map,en=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,o=[r,s,n];let i=o.length,l=i,c,d,f=ms;for(;l--;)c=o[l],d=f.get(c),d===void 0&&f.set(c,d=l?new Map:hs(t)),f=d;return d};en();const Ye={http:xr,xhr:Yr,fetch:{get:en}};a.forEach(Ye,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const At=e=>`- ${e}`,ys=e=>a.isFunction(e)||e===null||e===!1;function gs(e,t){e=a.isArray(e)?e:[e];const{length:n}=e;let r,s;const o={};for(let i=0;i<n;i++){r=e[i];let l;if(s=r,!ys(r)&&(s=Ye[(l=String(r)).toLowerCase()],s===void 0))throw new h(`Unknown adapter '${l}'`);if(s&&(a.isFunction(s)||(s=s.get(t))))break;o[l||"#"+i]=s}if(!s){const i=Object.entries(o).map(([c,d])=>`adapter ${c} `+(d===!1?"is not supported by the environment":"is not available in the build"));let l=n?i.length>1?`since :
|
|
4
|
+
`+i.map(At).join(`
|
|
5
|
+
`):" "+At(i[0]):"as no adapter specified";throw new h("There is no suitable adapter to dispatch the request "+l,h.ERR_NOT_SUPPORT)}return s}const tn={getAdapter:gs,adapters:Ye};function ve(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ee(null,e)}function ze(e){const t=a.toSafeFlatObject(e);return ve(t),t.headers=L.from(a.getSafeProp(t,"headers")),t.data=Me.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),tn.getAdapter(t.adapter||be.adapter,t)(t).then(function(s){ve(t),t.response=s;try{s.data=Me.call(t,t.transformResponse,s)}finally{delete t.response}return s.headers=L.from(s.headers),s},function(s){if(!Kt(s)&&(ve(t),s&&s.response)){t.response=s.response;try{s.response.data=Me.call(t,t.transformResponse,s.response)}finally{delete t.response}s.response.headers=L.from(s.response.headers)}return Promise.reject(s)})}const Ne={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ne[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const _t={};Ne.transitional=function(t,n,r){function s(o,i){return"[Axios v"+Ze+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,l)=>{if(t===!1)throw new h(s(i," has been removed"+(n?" in "+n:"")),h.ERR_DEPRECATED);return n&&!_t[i]&&(_t[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,l):!0}};Ne.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function bs(e,t,n){if(typeof e!="object"||e===null)throw new h("options must be an object",h.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],i=Object.prototype.hasOwnProperty.call(t,o)?t[o]:void 0;if(i){const l=e[o],c=l===void 0||i(l,o,e);if(c!==!0)throw new h("option "+o+" must be "+c,h.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new h("Unknown option "+o,h.ERR_BAD_OPTION)}}const _e={assertOptions:bs,validators:Ne},j=_e.validators;let ee=class{constructor(t){this.defaults=t||{},this.interceptors={request:new pt,response:new pt}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error)try{let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const o=s.stack;let i="";if(typeof o=="string"){const l=o.indexOf(`
|
|
6
|
+
`);i=l===-1?"":o.slice(l+1)}if(!r.stack)r.stack=i;else if(i){const l=i.indexOf(`
|
|
7
|
+
`),c=l===-1?-1:i.indexOf(`
|
|
8
|
+
`,l+1),d=c===-1?"":i.slice(c+1);String(r.stack).endsWith(d)||(r.stack+=`
|
|
9
|
+
`+i)}}catch{}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=re(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&_e.assertOptions(r,{silentJSONParsing:j.transitional(j.boolean),forcedJSONParsing:j.transitional(j.boolean),clarifyTimeoutError:j.transitional(j.boolean),legacyInterceptorReqResOrdering:j.transitional(j.boolean),advertiseZstdAcceptEncoding:j.transitional(j.boolean),validateStatusUndefinedResolves:j.transitional(j.boolean)},!1),s!=null&&(a.isFunction(s)?n.paramsSerializer={serialize:s}:_e.assertOptions(s,{encode:j.function,serialize:j.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),_e.assertOptions(n,{baseUrl:j.spelling("baseURL"),withXsrfToken:j.spelling("withXSRFToken")},!0),n.method=(a.getSafeProp(n,"method")||a.getSafeProp(this.defaults,"method")||"get").toLowerCase();let i=o&&a.merge(o.common,o[n.method]);o&&a.forEach(Jt.concat("common"),x=>{delete o[x]}),n.headers=L.concat(i,o);const l=[];let c=!0;this.interceptors.request.forEach(function(S){if(typeof S.runWhen=="function"&&S.runWhen(n)===!1)return;c=c&&S.synchronous;const C=n.transitional||Ge;C&&C.legacyInterceptorReqResOrdering?l.unshift(S.fulfilled,S.rejected):l.push(S.fulfilled,S.rejected)});const d=[];this.interceptors.response.forEach(function(S){d.push(S.fulfilled,S.rejected)});let f,p=0,y;if(!c){const x=[ze.bind(this),void 0];for(x.unshift(...l),x.push(...d),y=x.length,f=Promise.resolve(n);p<y;)f=f.then(x[p++],x[p++]);return f}y=l.length;let R=n;for(;p<y;){const x=l[p++],S=l[p++];try{R=x?x(R):R}catch(C){if(!S){f=Promise.reject(C);break}try{const u=S.call(this,C);a.isThenable(u)&&(f=Promise.resolve(u).then(()=>ze.call(this,R)))}catch(u){f=Promise.reject(u)}break}}if(!f)try{f=ze.call(this,R)}catch(x){f=Promise.reject(x)}for(p=0,y=d.length;p<y;)f=f.then(d[p++],d[p++]);return f}getUri(t){t=re(this.defaults,t);const n=Qt(t.baseURL,t.url,t.allowAbsoluteUrls,t);return zt(n,t.params,t.paramsSerializer)}};a.forEach(["delete","get","head","options"],function(t){ee.prototype[t]=function(n,r){return this.request(re(r||{},{method:t,url:n,data:r&&a.hasOwnProp(r,"data")?r.data:void 0}))}});a.forEach(["post","put","patch","query"],function(t){function n(r){return function(o,i,l){return this.request(re(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}ee.prototype[t]=n(),t!=="query"&&(ee.prototype[t+"Form"]=n(!0))});let Es=class nn{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(s=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(l=>{r.subscribe(l),o=l}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,l){r.reason||(r.reason=new Ee(o,i,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 nn(function(s){t=s}),cancel:t}}};function ws(e){return function(n){return e.apply(null,n)}}function Rs(e){return a.isObject(e)&&e.isAxiosError===!0}const Ce={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,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent: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,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ce).forEach(([e,t])=>{Ce[t]===void 0&&(Ce[t]=e)});function rn(e){const t=new ee(e),n=Ct(ee.prototype.request,t);return a.extend(n,ee.prototype,t,{allOwnKeys:!0}),a.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return rn(re(e,s))},n}const A=rn(be);A.Axios=ee;A.CanceledError=Ee;A.CancelToken=Es;A.isCancel=Kt;A.VERSION=Ze;A.toFormData=De;A.AxiosError=h;A.Cancel=A.CanceledError;A.all=function(t){return Promise.all(t)};A.spread=ws;A.isAxiosError=Rs;A.mergeConfig=re;A.AxiosHeaders=L;A.formToJSON=e=>Vt(a.isHTMLForm(e)?new FormData(e):e);A.getAdapter=tn.getAdapter;A.HttpStatusCode=Ce;A.default=A;const{Axios:Ds,AxiosError:Ns,CanceledError:js,isCancel:Ls,CancelToken:Bs,VERSION:Us,all:Is,Cancel:ks,isAxiosError:qs,spread:Ms,toFormData:Hs,AxiosHeaders:vs,HttpStatusCode:zs,formToJSON:Ws,getAdapter:$s,mergeConfig:Vs,create:Js}=A;let sn=A.create({baseURL:"http://localhost:8007/api/v1",headers:{"Content-Type":"application/json","X-Tenant-ID":"tenant-default"}});const on=(e,t="tenant-default")=>{sn=A.create({baseURL:e,headers:{"Content-Type":"application/json","X-Tenant-ID":t}})},je=()=>sn,an=W.createContext({baseUrl:"http://localhost:8007/api/v1",tenantId:"tenant-default"}),xs=()=>W.useContext(an),Os=({baseUrl:e="http://localhost:8007/api/v1",tenantId:t="tenant-default",children:n})=>(W.useEffect(()=>{on(e,t)},[e,t]),w.jsx(an.Provider,{value:{baseUrl:e,tenantId:t},children:n})),et=({status:e})=>{const t=(e||"").toUpperCase();let n="#F1F5F9",r="#475569",s="#94A3B8";return["APPROVED","COMPLIANT","VERIFIED"].includes(t)?(n="#ECFDF5",r="#047857",s="#10B981"):["PENDING_DECISION","IN_REVIEW","PENDING"].includes(t)?(n="#FFFBEB",r="#B45309",s="#F59E0B"):["REJECTED","ESCALATED","REMEDIATION_REQUIRED"].includes(t)?(n="#FEF2F2",r="#B91C1C",s="#EF4444"):["NEW"].includes(t)&&(n="#EFF6FF",r="#1D4ED8",s="#3B82F6"),w.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:"6px",padding:"2px 8px",borderRadius:"9999px",fontSize:"11px",fontWeight:600,backgroundColor:n,color:r,border:`1px solid ${n}`},children:[w.jsx("span",{style:{width:"6px",height:"6px",borderRadius:"50%",backgroundColor:s}}),e]})},tt=({priority:e})=>{const t=(e||"").toUpperCase();let n="#F1F5F9",r="#475569";return t==="CRITICAL"?(n="#FEF2F2",r="#B91C1C"):t==="HIGH"?(n="#FFF7ED",r="#C2410C"):t==="MEDIUM"?(n="#FFFBEB",r="#B45309"):t==="LOW"&&(n="#EFF6FF",r="#1D4ED8"),w.jsx("span",{style:{display:"inline-flex",alignItems:"center",padding:"2px 8px",borderRadius:"9999px",fontSize:"11px",fontWeight:700,backgroundColor:n,color:r},children:e})},Ss=({caseData:e,onOpen:t})=>w.jsxs("div",{style:{backgroundColor:"#FFFFFF",border:"1px solid #E2E8F0",borderRadius:"12px",padding:"16px",boxShadow:"0 1px 3px rgba(0,0,0,0.05)",fontFamily:"Inter, system-ui, sans-serif"},children:[w.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"8px"},children:[w.jsx("span",{style:{fontFamily:"monospace",fontWeight:700,color:"#2563EB",fontSize:"12px"},children:e.case_number}),w.jsx(et,{status:e.status})]}),w.jsx("div",{style:{fontWeight:700,color:"#0F172A",fontSize:"14px",marginBottom:"4px"},children:e.customer_name}),w.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:"12px",paddingTop:"8px",borderTop:"1px solid #F1F5F9",fontSize:"12px"},children:[w.jsx(tt,{priority:e.priority}),w.jsxs("span",{style:{fontWeight:600,color:"#64748B"},children:["Risk: ",w.jsxs("strong",{style:{color:e.risk_score>=80?"#EF4444":"#10B981"},children:[e.risk_score,"/100"]})]})]})]}),As=({submission:e,onDecisionSubmitted:t})=>{const[n,r]=W.useState(!1),s=async o=>{try{r(!0),await je().post(`/maker-checker/${e.id}/checker-decision`,{checker_status:o,checker_notes:"Direct decision confirmed via SDK widget.",checker_name:"Supervisor"}),t&&t()}catch(i){console.error("Failed to submit checker decision:",i)}finally{r(!1)}};return w.jsxs("div",{style:{backgroundColor:"#FFFFFF",border:"1px solid #E2E8F0",borderRadius:"12px",padding:"16px",fontFamily:"Inter, system-ui, sans-serif",fontSize:"12px"},children:[w.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"8px"},children:[w.jsx("strong",{style:{color:"#0F172A"},children:e.customer_name}),w.jsx("span",{style:{color:"#2563EB",fontWeight:700},children:e.proposed_decision})]}),w.jsx("p",{style:{color:"#475569",margin:"8px 0",backgroundColor:"#F8FAFC",padding:"8px",borderRadius:"6px"},children:e.maker_rationale}),e.checker_status==="PENDING"&&w.jsxs("div",{style:{display:"flex",gap:"8px",marginTop:"12px"},children:[w.jsx("button",{onClick:()=>s("APPROVED"),disabled:n,style:{flex:1,padding:"6px 12px",backgroundColor:"#10B981",color:"#fff",border:"none",borderRadius:"6px",fontWeight:700,cursor:"pointer"},children:"Approve"}),w.jsx("button",{onClick:()=>s("REJECTED"),disabled:n,style:{flex:1,padding:"6px 12px",backgroundColor:"#EF4444",color:"#fff",border:"none",borderRadius:"6px",fontWeight:700,cursor:"pointer"},children:"Reject"})]})]})},_s=({limit:e=5,onCaseClick:t})=>{const[n,r]=W.useState([]),[s,o]=W.useState(!0);return W.useEffect(()=>{je().get(`/cases?page=1&page_size=${e}`).then(i=>{r(i.data.items),o(!1)}).catch(i=>{console.error(i),o(!1)})},[e]),s?w.jsx("div",{style:{padding:"16px",fontSize:"12px",color:"#64748B"},children:"Loading queue..."}):w.jsxs("div",{style:{backgroundColor:"#FFFFFF",border:"1px solid #E2E8F0",borderRadius:"12px",overflow:"hidden",fontFamily:"Inter, system-ui, sans-serif"},children:[w.jsx("div",{style:{padding:"12px 16px",borderBottom:"1px solid #F1F5F9",fontWeight:700,fontSize:"13px",color:"#0F172A"},children:"Compliance Review Queue"}),w.jsx("div",{style:{display:"flex",flexDirection:"column"},children:n.map(i=>w.jsxs("div",{onClick:()=>t&&t(i.id),style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 16px",borderBottom:"1px solid #F8FAFC",cursor:"pointer",fontSize:"12px"},children:[w.jsxs("div",{children:[w.jsx("div",{style:{fontWeight:600,color:"#0F172A"},children:i.customer_name}),w.jsx("div",{style:{fontFamily:"monospace",fontSize:"11px",color:"#64748B"},children:i.case_number})]}),w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[w.jsx(tt,{priority:i.priority}),w.jsx(et,{status:i.status})]})]},i.id))})]})},Cs=()=>{const[e,t]=W.useState(null);return W.useEffect(()=>{je().get("/sla/breach-monitor").then(n=>t(n.data))},[]),w.jsxs("div",{style:{backgroundColor:"#FFFFFF",border:"1px solid #E2E8F0",borderRadius:"12px",padding:"16px",fontFamily:"Inter, system-ui, sans-serif",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[w.jsxs("div",{children:[w.jsx("div",{style:{fontSize:"11px",fontWeight:700,color:"#64748B",textTransform:"uppercase"},children:"SLA Compliance Rate"}),w.jsxs("div",{style:{fontSize:"20px",fontWeight:800,color:"#0F172A",marginTop:"2px"},children:[(e==null?void 0:e.overall_compliance_rate)||100,"%"]})]}),w.jsx("div",{style:{textAlign:"right"},children:w.jsxs("span",{style:{fontSize:"11px",color:"#EF4444",fontWeight:700},children:[(e==null?void 0:e.breached_count)||0," Breaches"]})})]})};exports.CaseStatusBadge=et;exports.CaseSummaryCard=Ss;exports.ComplianceProvider=Os;exports.MakerCheckerApprovalCard=As;exports.PriorityChip=tt;exports.ReviewQueueWidget=_s;exports.SlaMonitorWidget=Cs;exports.configureComplianceApi=on;exports.getComplianceApiClient=je;exports.useCompliance=xs;
|