@weconjs/core 1.2.0 → 1.2.2
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/devtools/client/assets/{ModuleDetail-Cv1SUhav.js → ModuleDetail-BoiZYmmO.js} +1 -1
- package/dist/devtools/client/assets/TranslationEditor-Dz2BHJgQ.js +6 -0
- package/dist/devtools/client/assets/{api-DHFLRYt1.js → api-CvtLmLuv.js} +3 -3
- package/dist/devtools/client/assets/{arrow-left-XXd8AsXj.js → arrow-left-C26_8YjI.js} +1 -1
- package/dist/devtools/client/assets/{chevron-right-DN23SEYa.js → chevron-right-ByQ2jwEZ.js} +1 -1
- package/dist/devtools/client/assets/{index-LkCf2mcb.js → index-BI-oiBt-.js} +1 -1
- package/dist/devtools/client/assets/index-BMd21Cuf.js +1 -0
- package/dist/devtools/client/assets/{index-Cwwdi5uz.js → index-BjgISQg5.js} +2 -2
- package/dist/devtools/client/assets/{index-jqJ0mfFs.js → index-D825pKz_.js} +1 -1
- package/dist/devtools/client/assets/{index-DH5TZlGZ.js → index-DS8GcC6h.js} +1 -1
- package/dist/devtools/client/assets/{index-DbBxhrHS.js → index-DaglUNul.js} +1 -1
- package/dist/devtools/client/index.html +2 -2
- package/package.json +1 -1
- package/dist/devtools/client/assets/TranslationEditor-CwBjcmjN.js +0 -6
- package/dist/devtools/client/assets/index-BbARU3f6.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as d,r as a,u as x,j as e,m}from"./index-
|
|
1
|
+
import{a as d,r as a,u as x,j as e,m}from"./index-BjgISQg5.js";import{a as p,L as u}from"./api-CvtLmLuv.js";import{A as f}from"./arrow-left-C26_8YjI.js";function b(){const{name:t}=d(),[s,l]=a.useState(null),[o,n]=a.useState(!0),i=x();return a.useEffect(()=>{t&&p.get(`/modules/${t}`).then(r=>l(r.data)).catch(console.error).finally(()=>n(!1))},[t]),o?e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsx(u,{className:"size-8 animate-spin text-primary"})}):s?e.jsxs(m.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.3},className:"flex size-full flex-col gap-6 overflow-y-auto p-6",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("button",{onClick:()=>i("/modules"),className:"flex size-8 items-center justify-center rounded-secondary border border-primary transition-colors hover:bg-primary",children:e.jsx(f,{className:"size-4 text-primary"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold text-primary",children:s.name}),e.jsxs("p",{className:"text-sm text-secondary",children:["namespace: ",s.namespace," · ",s.routeCount," routes"]})]})]}),s.description&&e.jsx("p",{className:"text-sm text-secondary",children:s.description}),s.hasConfig&&s.configValues&&e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("h2",{className:"text-lg font-semibold text-primary",children:"Config"}),e.jsx("pre",{className:"overflow-auto rounded-secondary border border-primary bg-primary p-4 text-xs text-primary",children:JSON.stringify(s.configValues,null,2)})]}),s.routes&&s.routes.length>0&&e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("h2",{className:"text-lg font-semibold text-primary",children:"Routes"}),e.jsx("div",{className:"overflow-auto rounded-secondary border border-primary",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-primary bg-primary text-left text-xs text-secondary",children:[e.jsx("th",{className:"px-4 py-2",children:"Method"}),e.jsx("th",{className:"px-4 py-2",children:"Path"}),e.jsx("th",{className:"px-4 py-2",children:"RAI"})]})}),e.jsx("tbody",{children:s.routes.map((r,c)=>e.jsxs("tr",{className:"border-b border-primary last:border-0",children:[e.jsx("td",{className:"px-4 py-2",children:e.jsx(h,{method:r.method})}),e.jsx("td",{className:"px-4 py-2 font-mono text-xs text-primary",children:r.path}),e.jsx("td",{className:"px-4 py-2 font-mono text-xs text-secondary",children:r.rai})]},c))})]})})]})]}):e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsx("p",{className:"text-secondary",children:"Module not found"})})}function h({method:t}){const s={GET:"bg-green-100 text-green-700",POST:"bg-blue-100 text-blue-700",PUT:"bg-yellow-100 text-yellow-700",PATCH:"bg-orange-100 text-orange-700",DELETE:"bg-red-100 text-red-700"};return e.jsx("span",{className:`inline-block rounded px-2 py-0.5 text-xs font-semibold ${s[t.toUpperCase()]??"bg-gray-100 text-gray-700"}`,children:t.toUpperCase()})}export{b as default};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c as N,a as S,r as i,u as w,j as e,m as x}from"./index-BjgISQg5.js";import{a as y,L as f}from"./api-CvtLmLuv.js";import{A as z}from"./arrow-left-C26_8YjI.js";/**
|
|
2
|
+
* @license lucide-react v0.460.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const C=N("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);function $(){const{namespace:t,lang:s}=S(),[o,l]=i.useState({}),[u,h]=i.useState(!0),[c,d]=i.useState(!1),[b,m]=i.useState(!1),j=w();i.useEffect(()=>{!t||!s||y.get(`/i18n/${t}/${s}`).then(a=>{var r;return l(((r=a.data)==null?void 0:r.translations)??{})}).catch(console.error).finally(()=>h(!1))},[t,s]);const v=(a,r)=>{l(n=>({...n,[a]:r})),m(!0)},g=async()=>{if(!(!t||!s)){d(!0);try{await y.put(`/i18n/${t}/${s}`,{translations:o}),m(!1)}catch(a){console.error(a)}finally{d(!1)}}};if(u)return e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsx(f,{className:"size-8 animate-spin text-primary"})});const p=Object.entries(o);return e.jsxs(x.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.3},className:"flex size-full flex-col gap-6 overflow-y-auto p-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("button",{onClick:()=>j("/i18n"),className:"flex size-8 items-center justify-center rounded-secondary border border-primary transition-colors hover:bg-primary",children:e.jsx(z,{className:"size-4 text-primary"})}),e.jsxs("div",{children:[e.jsxs("h1",{className:"text-2xl font-bold text-primary",children:[t," / ",s==null?void 0:s.toUpperCase()]}),e.jsxs("p",{className:"text-sm text-secondary",children:[p.length," keys"]})]})]}),b&&e.jsxs(x.button,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},whileTap:{scale:.95},onClick:g,disabled:c,className:"flex items-center gap-2 rounded-secondary bg-btn-primary px-4 py-2 text-sm font-medium text-btn-primary transition-opacity hover:opacity-90 disabled:opacity-50",children:[c?e.jsx(f,{className:"size-4 animate-spin"}):e.jsx(C,{className:"size-4"}),"Save"]})]}),e.jsx("div",{className:"flex flex-col gap-2",children:p.map(([a,r])=>e.jsxs("div",{className:"flex flex-col gap-1 rounded-secondary border border-primary bg-secondary p-3 sm:flex-row sm:items-center sm:gap-4",children:[e.jsx("label",{className:"min-w-[200px] text-xs font-semibold text-primary",children:a}),e.jsx("input",{type:"text",value:r,onChange:n=>v(a,n.target.value),className:"w-full rounded-tertiary border border-primary bg-primary px-3 py-1.5 text-sm text-primary outline-none focus:border-blue-500"})]},a))})]})}export{$ as default};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{c as pt,b as ht}from"./index-
|
|
1
|
+
import{c as pt,b as ht}from"./index-BjgISQg5.js";/**
|
|
2
2
|
* @license lucide-react v0.460.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
5
5
|
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const Wn=pt("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);function Je(e,t){return function(){return e.apply(t,arguments)}}const{toString:mt}=Object.prototype,{getPrototypeOf:be}=Object,{iterator:re,toStringTag:Ve}=Symbol,se=(e=>t=>{const n=mt.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),U=e=>(e=e.toLowerCase(),t=>se(t)===e),oe=e=>t=>typeof t===e,{isArray:M}=Array,H=oe("undefined");function J(e){return e!==null&&!H(e)&&e.constructor!==null&&!H(e.constructor)&&T(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const We=U("ArrayBuffer");function yt(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&We(e.buffer),t}const bt=oe("string"),T=oe("function"),Ke=oe("number"),V=e=>e!==null&&typeof e=="object",wt=e=>e===!0||e===!1,Y=e=>{if(se(e)!=="object")return!1;const t=be(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Ve in e)&&!(re in e)},Et=e=>{if(!V(e)||J(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Rt=U("Date"),gt=U("File"),St=U("Blob"),Ot=U("FileList"),At=e=>V(e)&&T(e.pipe),Tt=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||T(e.append)&&((t=se(e))==="formdata"||t==="object"&&T(e.toString)&&e.toString()==="[object FormData]"))},Ct=U("URLSearchParams"),[xt,_t,Nt,Pt]=["ReadableStream","Request","Response","Headers"].map(U),Ut=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function W(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),M(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(J(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let c;for(r=0;r<i;r++)c=o[r],t.call(null,e[c],c,e)}}function ve(e,t){if(J(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 k=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Xe=e=>!H(e)&&e!==k;function pe(){const{caseless:e,skipUndefined:t}=Xe(this)&&this||{},n={},r=(s,o)=>{if(o==="__proto__"||o==="constructor"||o==="prototype")return;const i=e&&ve(n,o)||o;Y(n[i])&&Y(s)?n[i]=pe(n[i],s):Y(s)?n[i]=pe({},s):M(s)?n[i]=s.slice():(!t||!H(s))&&(n[i]=s)};for(let s=0,o=arguments.length;s<o;s++)arguments[s]&&W(arguments[s],r);return n}const Ft=(e,t,n,{allOwnKeys:r}={})=>(W(t,(s,o)=>{n&&T(s)?Object.defineProperty(e,o,{value:Je(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),Lt=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Dt=(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)},Bt=(e,t,n,r)=>{let s,o,i;const c={};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))&&!c[i]&&(t[i]=e[i],c[i]=!0);e=n!==!1&&be(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kt=(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},jt=e=>{if(!e)return null;if(M(e))return e;let t=e.length;if(!Ke(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},It=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&be(Uint8Array)),qt=(e,t)=>{const r=(e&&e[re]).call(e);let s;for(;(s=r.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},Ht=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Mt=U("HTMLFormElement"),$t=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),_e=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),zt=U("RegExp"),Ge=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};W(n,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(r[o]=i||s)}),Object.defineProperties(e,r)},Jt=e=>{Ge(e,(t,n)=>{if(T(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(T(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+"'")})}})},Vt=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return M(e)?r(e):r(String(e).split(t)),n},Wt=()=>{},Kt=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function vt(e){return!!(e&&T(e.append)&&e[Ve]==="FormData"&&e[re])}const Xt=e=>{const t=new Array(10),n=(r,s)=>{if(V(r)){if(t.indexOf(r)>=0)return;if(J(r))return r;if(!("toJSON"in r)){t[s]=r;const o=M(r)?[]:{};return W(r,(i,c)=>{const d=n(i,s+1);!H(d)&&(o[c]=d)}),t[s]=void 0,o}}return r};return n(e,0)},Gt=U("AsyncFunction"),Qt=e=>e&&(V(e)||T(e))&&T(e.then)&&T(e.catch),Qe=((e,t)=>e?setImmediate:t?((n,r)=>(k.addEventListener("message",({source:s,data:o})=>{s===k&&o===n&&r.length&&r.shift()()},!1),s=>{r.push(s),k.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",T(k.postMessage)),Zt=typeof queueMicrotask<"u"?queueMicrotask.bind(k):typeof process<"u"&&process.nextTick||Qe,Yt=e=>e!=null&&T(e[re]),a={isArray:M,isArrayBuffer:We,isBuffer:J,isFormData:Tt,isArrayBufferView:yt,isString:bt,isNumber:Ke,isBoolean:wt,isObject:V,isPlainObject:Y,isEmptyObject:Et,isReadableStream:xt,isRequest:_t,isResponse:Nt,isHeaders:Pt,isUndefined:H,isDate:Rt,isFile:gt,isBlob:St,isRegExp:zt,isFunction:T,isStream:At,isURLSearchParams:Ct,isTypedArray:It,isFileList:Ot,forEach:W,merge:pe,extend:Ft,trim:Ut,stripBOM:Lt,inherits:Dt,toFlatObject:Bt,kindOf:se,kindOfTest:U,endsWith:kt,toArray:jt,forEachEntry:qt,matchAll:Ht,isHTMLForm:Mt,hasOwnProperty:_e,hasOwnProp:_e,reduceDescriptors:Ge,freezeMethods:Jt,toObjectSet:Vt,toCamelCase:$t,noop:Wt,toFiniteNumber:Kt,findKey:ve,global:k,isContextDefined:Xe,isSpecCompliantForm:vt,toJSONObject:Xt,isAsyncFn:Gt,isThenable:Qt,setImmediate:Qe,asap:Zt,isIterable:Yt};let y=class Ze extends Error{static from(t,n,r,s,o,i){const c=new Ze(t.message,n||t.code,r,s,o);return c.cause=t,c.name=t.name,i&&Object.assign(c,i),c}constructor(t,n,r,s,o){super(t),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(){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:a.toJSONObject(this.config),code:this.code,status:this.status}}};y.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";y.ERR_BAD_OPTION="ERR_BAD_OPTION";y.ECONNABORTED="ECONNABORTED";y.ETIMEDOUT="ETIMEDOUT";y.ERR_NETWORK="ERR_NETWORK";y.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";y.ERR_DEPRECATED="ERR_DEPRECATED";y.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";y.ERR_BAD_REQUEST="ERR_BAD_REQUEST";y.ERR_CANCELED="ERR_CANCELED";y.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";y.ERR_INVALID_URL="ERR_INVALID_URL";const en=null;function he(e){return a.isPlainObject(e)||a.isArray(e)}function Ye(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function Ne(e,t,n){return e?e.concat(t).map(function(s,o){return s=Ye(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function tn(e){return a.isArray(e)&&!e.some(he)}const nn=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function ie(e,t,n){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,p){return!a.isUndefined(p[m])});const r=n.metaTokens,s=n.visitor||l,o=n.dots,i=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(t);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function f(u){if(u===null)return"";if(a.isDate(u))return u.toISOString();if(a.isBoolean(u))return u.toString();if(!d&&a.isBlob(u))throw new y("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(u)||a.isTypedArray(u)?d&&typeof Blob=="function"?new Blob([u]):Buffer.from(u):u}function l(u,m,p){let E=u;if(u&&!p&&typeof u=="object"){if(a.endsWith(m,"{}"))m=r?m:m.slice(0,-2),u=JSON.stringify(u);else if(a.isArray(u)&&tn(u)||(a.isFileList(u)||a.endsWith(m,"[]"))&&(E=a.toArray(u)))return m=Ye(m),E.forEach(function(R,O){!(a.isUndefined(R)||R===null)&&t.append(i===!0?Ne([m],O,o):i===null?m:m+"[]",f(R))}),!1}return he(u)?!0:(t.append(Ne(p,m,o),f(u)),!1)}const h=[],b=Object.assign(nn,{defaultVisitor:l,convertValue:f,isVisitable:he});function g(u,m){if(!a.isUndefined(u)){if(h.indexOf(u)!==-1)throw Error("Circular reference detected in "+m.join("."));h.push(u),a.forEach(u,function(E,x){(!(a.isUndefined(E)||E===null)&&s.call(t,E,a.isString(x)?x.trim():x,m,b))===!0&&g(E,m?m.concat(x):[x])}),h.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return g(e),t}function Pe(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function we(e,t){this._pairs=[],e&&ie(e,this,t)}const et=we.prototype;et.append=function(t,n){this._pairs.push([t,n])};et.toString=function(t){const n=t?function(r){return t.call(this,r,Pe)}:Pe;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function rn(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function tt(e,t,n){if(!t)return e;const r=n&&n.encode||rn,s=a.isFunction(n)?{serialize:n}:n,o=s&&s.serialize;let i;if(o?i=o(t,s):i=a.isURLSearchParams(t)?t.toString():new we(t,s).toString(r),i){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Ue{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){a.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Ee={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},sn=typeof URLSearchParams<"u"?URLSearchParams:we,on=typeof FormData<"u"?FormData:null,an=typeof Blob<"u"?Blob:null,cn={isBrowser:!0,classes:{URLSearchParams:sn,FormData:on,Blob:an},protocols:["http","https","file","blob","url","data"]},Re=typeof window<"u"&&typeof document<"u",me=typeof navigator=="object"&&navigator||void 0,ln=Re&&(!me||["ReactNative","NativeScript","NS"].indexOf(me.product)<0),un=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",fn=Re&&window.location.href||"http://localhost",dn=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Re,hasStandardBrowserEnv:ln,hasStandardBrowserWebWorkerEnv:un,navigator:me,origin:fn},Symbol.toStringTag,{value:"Module"})),S={...dn,...cn};function pn(e,t){return ie(e,new S.classes.URLSearchParams,{visitor:function(n,r,s,o){return S.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function hn(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function mn(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 nt(e){function t(n,r,s,o){let i=n[o++];if(i==="__proto__")return!0;const c=Number.isFinite(+i),d=o>=n.length;return i=!i&&a.isArray(s)?s.length:i,d?(a.hasOwnProp(s,i)?s[i]=[s[i],r]:s[i]=r,!c):((!s[i]||!a.isObject(s[i]))&&(s[i]=[]),t(n,r,s[i],o)&&a.isArray(s[i])&&(s[i]=mn(s[i])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){const n={};return a.forEachEntry(e,(r,s)=>{t(hn(r),s,n,0)}),n}return null}function yn(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 K={transitional:Ee,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(nt(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 c;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return pn(t,this.formSerializer).toString();if((c=a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return ie(c?{"files[]":t}:t,d&&new d,this.formSerializer)}}return o||s?(n.setContentType("application/json",!1),yn(t)):t}],transformResponse:[function(t){const n=this.transitional||K.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(a.isResponse(t)||a.isReadableStream(t))return t;if(t&&a.isString(t)&&(r&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(c){if(i)throw c.name==="SyntaxError"?y.from(c,y.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:S.classes.FormData,Blob:S.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],e=>{K.headers[e]={}});const bn=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"]),wn=e=>{const t={};let n,r,s;return e&&e.split(`
|
|
6
|
+
*/const Kn=pt("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);function Je(e,t){return function(){return e.apply(t,arguments)}}const{toString:mt}=Object.prototype,{getPrototypeOf:be}=Object,{iterator:re,toStringTag:Ve}=Symbol,se=(e=>t=>{const n=mt.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),U=e=>(e=e.toLowerCase(),t=>se(t)===e),oe=e=>t=>typeof t===e,{isArray:M}=Array,H=oe("undefined");function J(e){return e!==null&&!H(e)&&e.constructor!==null&&!H(e.constructor)&&T(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const We=U("ArrayBuffer");function yt(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&We(e.buffer),t}const bt=oe("string"),T=oe("function"),Ke=oe("number"),V=e=>e!==null&&typeof e=="object",wt=e=>e===!0||e===!1,Y=e=>{if(se(e)!=="object")return!1;const t=be(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Ve in e)&&!(re in e)},Et=e=>{if(!V(e)||J(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Rt=U("Date"),gt=U("File"),St=U("Blob"),Ot=U("FileList"),At=e=>V(e)&&T(e.pipe),Tt=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||T(e.append)&&((t=se(e))==="formdata"||t==="object"&&T(e.toString)&&e.toString()==="[object FormData]"))},Ct=U("URLSearchParams"),[xt,_t,Nt,Pt]=["ReadableStream","Request","Response","Headers"].map(U),Ut=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function W(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),M(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(J(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let c;for(r=0;r<i;r++)c=o[r],t.call(null,e[c],c,e)}}function ve(e,t){if(J(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 k=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Xe=e=>!H(e)&&e!==k;function pe(){const{caseless:e,skipUndefined:t}=Xe(this)&&this||{},n={},r=(s,o)=>{if(o==="__proto__"||o==="constructor"||o==="prototype")return;const i=e&&ve(n,o)||o;Y(n[i])&&Y(s)?n[i]=pe(n[i],s):Y(s)?n[i]=pe({},s):M(s)?n[i]=s.slice():(!t||!H(s))&&(n[i]=s)};for(let s=0,o=arguments.length;s<o;s++)arguments[s]&&W(arguments[s],r);return n}const Ft=(e,t,n,{allOwnKeys:r}={})=>(W(t,(s,o)=>{n&&T(s)?Object.defineProperty(e,o,{value:Je(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),Lt=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Dt=(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)},Bt=(e,t,n,r)=>{let s,o,i;const c={};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))&&!c[i]&&(t[i]=e[i],c[i]=!0);e=n!==!1&&be(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kt=(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},jt=e=>{if(!e)return null;if(M(e))return e;let t=e.length;if(!Ke(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},It=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&be(Uint8Array)),qt=(e,t)=>{const r=(e&&e[re]).call(e);let s;for(;(s=r.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},Ht=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Mt=U("HTMLFormElement"),$t=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),_e=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),zt=U("RegExp"),Ge=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};W(n,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(r[o]=i||s)}),Object.defineProperties(e,r)},Jt=e=>{Ge(e,(t,n)=>{if(T(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(T(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+"'")})}})},Vt=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return M(e)?r(e):r(String(e).split(t)),n},Wt=()=>{},Kt=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function vt(e){return!!(e&&T(e.append)&&e[Ve]==="FormData"&&e[re])}const Xt=e=>{const t=new Array(10),n=(r,s)=>{if(V(r)){if(t.indexOf(r)>=0)return;if(J(r))return r;if(!("toJSON"in r)){t[s]=r;const o=M(r)?[]:{};return W(r,(i,c)=>{const d=n(i,s+1);!H(d)&&(o[c]=d)}),t[s]=void 0,o}}return r};return n(e,0)},Gt=U("AsyncFunction"),Qt=e=>e&&(V(e)||T(e))&&T(e.then)&&T(e.catch),Qe=((e,t)=>e?setImmediate:t?((n,r)=>(k.addEventListener("message",({source:s,data:o})=>{s===k&&o===n&&r.length&&r.shift()()},!1),s=>{r.push(s),k.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",T(k.postMessage)),Zt=typeof queueMicrotask<"u"?queueMicrotask.bind(k):typeof process<"u"&&process.nextTick||Qe,Yt=e=>e!=null&&T(e[re]),a={isArray:M,isArrayBuffer:We,isBuffer:J,isFormData:Tt,isArrayBufferView:yt,isString:bt,isNumber:Ke,isBoolean:wt,isObject:V,isPlainObject:Y,isEmptyObject:Et,isReadableStream:xt,isRequest:_t,isResponse:Nt,isHeaders:Pt,isUndefined:H,isDate:Rt,isFile:gt,isBlob:St,isRegExp:zt,isFunction:T,isStream:At,isURLSearchParams:Ct,isTypedArray:It,isFileList:Ot,forEach:W,merge:pe,extend:Ft,trim:Ut,stripBOM:Lt,inherits:Dt,toFlatObject:Bt,kindOf:se,kindOfTest:U,endsWith:kt,toArray:jt,forEachEntry:qt,matchAll:Ht,isHTMLForm:Mt,hasOwnProperty:_e,hasOwnProp:_e,reduceDescriptors:Ge,freezeMethods:Jt,toObjectSet:Vt,toCamelCase:$t,noop:Wt,toFiniteNumber:Kt,findKey:ve,global:k,isContextDefined:Xe,isSpecCompliantForm:vt,toJSONObject:Xt,isAsyncFn:Gt,isThenable:Qt,setImmediate:Qe,asap:Zt,isIterable:Yt};let y=class Ze extends Error{static from(t,n,r,s,o,i){const c=new Ze(t.message,n||t.code,r,s,o);return c.cause=t,c.name=t.name,i&&Object.assign(c,i),c}constructor(t,n,r,s,o){super(t),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(){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:a.toJSONObject(this.config),code:this.code,status:this.status}}};y.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";y.ERR_BAD_OPTION="ERR_BAD_OPTION";y.ECONNABORTED="ECONNABORTED";y.ETIMEDOUT="ETIMEDOUT";y.ERR_NETWORK="ERR_NETWORK";y.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";y.ERR_DEPRECATED="ERR_DEPRECATED";y.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";y.ERR_BAD_REQUEST="ERR_BAD_REQUEST";y.ERR_CANCELED="ERR_CANCELED";y.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";y.ERR_INVALID_URL="ERR_INVALID_URL";const en=null;function he(e){return a.isPlainObject(e)||a.isArray(e)}function Ye(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function Ne(e,t,n){return e?e.concat(t).map(function(s,o){return s=Ye(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function tn(e){return a.isArray(e)&&!e.some(he)}const nn=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function ie(e,t,n){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,p){return!a.isUndefined(p[m])});const r=n.metaTokens,s=n.visitor||l,o=n.dots,i=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(t);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function f(u){if(u===null)return"";if(a.isDate(u))return u.toISOString();if(a.isBoolean(u))return u.toString();if(!d&&a.isBlob(u))throw new y("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(u)||a.isTypedArray(u)?d&&typeof Blob=="function"?new Blob([u]):Buffer.from(u):u}function l(u,m,p){let E=u;if(u&&!p&&typeof u=="object"){if(a.endsWith(m,"{}"))m=r?m:m.slice(0,-2),u=JSON.stringify(u);else if(a.isArray(u)&&tn(u)||(a.isFileList(u)||a.endsWith(m,"[]"))&&(E=a.toArray(u)))return m=Ye(m),E.forEach(function(R,O){!(a.isUndefined(R)||R===null)&&t.append(i===!0?Ne([m],O,o):i===null?m:m+"[]",f(R))}),!1}return he(u)?!0:(t.append(Ne(p,m,o),f(u)),!1)}const h=[],b=Object.assign(nn,{defaultVisitor:l,convertValue:f,isVisitable:he});function g(u,m){if(!a.isUndefined(u)){if(h.indexOf(u)!==-1)throw Error("Circular reference detected in "+m.join("."));h.push(u),a.forEach(u,function(E,x){(!(a.isUndefined(E)||E===null)&&s.call(t,E,a.isString(x)?x.trim():x,m,b))===!0&&g(E,m?m.concat(x):[x])}),h.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return g(e),t}function Pe(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function we(e,t){this._pairs=[],e&&ie(e,this,t)}const et=we.prototype;et.append=function(t,n){this._pairs.push([t,n])};et.toString=function(t){const n=t?function(r){return t.call(this,r,Pe)}:Pe;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function rn(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function tt(e,t,n){if(!t)return e;const r=n&&n.encode||rn,s=a.isFunction(n)?{serialize:n}:n,o=s&&s.serialize;let i;if(o?i=o(t,s):i=a.isURLSearchParams(t)?t.toString():new we(t,s).toString(r),i){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Ue{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){a.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Ee={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},sn=typeof URLSearchParams<"u"?URLSearchParams:we,on=typeof FormData<"u"?FormData:null,an=typeof Blob<"u"?Blob:null,cn={isBrowser:!0,classes:{URLSearchParams:sn,FormData:on,Blob:an},protocols:["http","https","file","blob","url","data"]},Re=typeof window<"u"&&typeof document<"u",me=typeof navigator=="object"&&navigator||void 0,ln=Re&&(!me||["ReactNative","NativeScript","NS"].indexOf(me.product)<0),un=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",fn=Re&&window.location.href||"http://localhost",dn=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Re,hasStandardBrowserEnv:ln,hasStandardBrowserWebWorkerEnv:un,navigator:me,origin:fn},Symbol.toStringTag,{value:"Module"})),S={...dn,...cn};function pn(e,t){return ie(e,new S.classes.URLSearchParams,{visitor:function(n,r,s,o){return S.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function hn(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function mn(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 nt(e){function t(n,r,s,o){let i=n[o++];if(i==="__proto__")return!0;const c=Number.isFinite(+i),d=o>=n.length;return i=!i&&a.isArray(s)?s.length:i,d?(a.hasOwnProp(s,i)?s[i]=[s[i],r]:s[i]=r,!c):((!s[i]||!a.isObject(s[i]))&&(s[i]=[]),t(n,r,s[i],o)&&a.isArray(s[i])&&(s[i]=mn(s[i])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){const n={};return a.forEachEntry(e,(r,s)=>{t(hn(r),s,n,0)}),n}return null}function yn(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 K={transitional:Ee,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(nt(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 c;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return pn(t,this.formSerializer).toString();if((c=a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return ie(c?{"files[]":t}:t,d&&new d,this.formSerializer)}}return o||s?(n.setContentType("application/json",!1),yn(t)):t}],transformResponse:[function(t){const n=this.transitional||K.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(a.isResponse(t)||a.isReadableStream(t))return t;if(t&&a.isString(t)&&(r&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(c){if(i)throw c.name==="SyntaxError"?y.from(c,y.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:S.classes.FormData,Blob:S.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],e=>{K.headers[e]={}});const bn=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"]),wn=e=>{const t={};let n,r,s;return e&&e.split(`
|
|
7
7
|
`).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||t[n]&&bn[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Fe=Symbol("internals");function z(e){return e&&String(e).trim().toLowerCase()}function ee(e){return e===!1||e==null?e:a.isArray(e)?e.map(ee):String(e)}function En(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 Rn=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ue(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 gn(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Sn(e,t){const n=a.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,o,i){return this[r].call(this,t,s,o,i)},configurable:!0})})}let C=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function o(c,d,f){const l=z(d);if(!l)throw new Error("header name must be a non-empty string");const h=a.findKey(s,l);(!h||s[h]===void 0||f===!0||f===void 0&&s[h]!==!1)&&(s[h||d]=ee(c))}const i=(c,d)=>a.forEach(c,(f,l)=>o(f,l,d));if(a.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(a.isString(t)&&(t=t.trim())&&!Rn(t))i(wn(t),n);else if(a.isObject(t)&&a.isIterable(t)){let c={},d,f;for(const l of t){if(!a.isArray(l))throw TypeError("Object iterator must return a key-value pair");c[f=l[0]]=(d=c[f])?a.isArray(d)?[...d,l[1]]:[d,l[1]]:l[1]}i(c,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=z(t),t){const r=a.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return En(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=z(t),t){const r=a.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ue(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function o(i){if(i=z(i),i){const c=a.findKey(r,i);c&&(!n||ue(r,r[c],c,n))&&(delete r[c],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||ue(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]=ee(s),delete n[o];return}const c=t?gn(o):String(o).trim();c!==o&&delete n[o],n[c]=ee(s),r[c]=!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(`
|
|
8
8
|
`)}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(s=>r.set(s)),r}static accessor(t){const r=(this[Fe]=this[Fe]={accessors:{}}).accessors,s=this.prototype;function o(i){const c=z(i);r[c]||(Sn(s,i),r[c]=!0)}return a.isArray(t)?t.forEach(o):o(t),this}};C.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);a.reduceDescriptors(C.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});a.freezeMethods(C);function fe(e,t){const n=this||K,r=t||n,s=C.from(r.headers);let o=r.data;return a.forEach(e,function(c){o=c.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function rt(e){return!!(e&&e.__CANCEL__)}let v=class extends y{constructor(t,n,r){super(t??"canceled",y.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function st(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new y("Request failed with status code "+n.status,[y.ERR_BAD_REQUEST,y.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function On(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function An(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(d){const f=Date.now(),l=r[o];i||(i=f),n[s]=d,r[s]=f;let h=o,b=0;for(;h!==s;)b+=n[h++],h=h%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),f-i<t)return;const g=l&&f-l;return g?Math.round(b*1e3/g):void 0}}function Tn(e,t){let n=0,r=1e3/t,s,o;const i=(f,l=Date.now())=>{n=l,s=null,o&&(clearTimeout(o),o=null),e(...f)};return[(...f)=>{const l=Date.now(),h=l-n;h>=r?i(f,l):(s=f,o||(o=setTimeout(()=>{o=null,i(s)},r-h)))},()=>s&&i(s)]}const ne=(e,t,n=3)=>{let r=0;const s=An(50,250);return Tn(o=>{const i=o.loaded,c=o.lengthComputable?o.total:void 0,d=i-r,f=s(d),l=i<=c;r=i;const h={loaded:i,total:c,progress:c?i/c:void 0,bytes:d,rate:f||void 0,estimated:f&&c&&l?(c-i)/f:void 0,event:o,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(h)},n)},Le=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},De=e=>(...t)=>a.asap(()=>e(...t)),Cn=S.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,S.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(S.origin),S.navigator&&/(msie|trident)/i.test(S.navigator.userAgent)):()=>!0,xn=S.hasStandardBrowserEnv?{write(e,t,n,r,s,o,i){if(typeof document>"u")return;const c=[`${e}=${encodeURIComponent(t)}`];a.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),a.isString(r)&&c.push(`path=${r}`),a.isString(s)&&c.push(`domain=${s}`),o===!0&&c.push("secure"),a.isString(i)&&c.push(`SameSite=${i}`),document.cookie=c.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 _n(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Nn(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function ot(e,t,n){let r=!_n(t);return e&&(r||n==!1)?Nn(e,t):t}const Be=e=>e instanceof C?{...e}:e;function I(e,t){t=t||{};const n={};function r(f,l,h,b){return a.isPlainObject(f)&&a.isPlainObject(l)?a.merge.call({caseless:b},f,l):a.isPlainObject(l)?a.merge({},l):a.isArray(l)?l.slice():l}function s(f,l,h,b){if(a.isUndefined(l)){if(!a.isUndefined(f))return r(void 0,f,h,b)}else return r(f,l,h,b)}function o(f,l){if(!a.isUndefined(l))return r(void 0,l)}function i(f,l){if(a.isUndefined(l)){if(!a.isUndefined(f))return r(void 0,f)}else return r(void 0,l)}function c(f,l,h){if(h in t)return r(f,l);if(h in e)return r(void 0,f)}const d={url:o,method:o,data:o,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,responseEncoding:i,validateStatus:c,headers:(f,l,h)=>s(Be(f),Be(l),h,!0)};return a.forEach(Object.keys({...e,...t}),function(l){if(l==="__proto__"||l==="constructor"||l==="prototype")return;const h=a.hasOwnProp(d,l)?d[l]:s,b=h(e[l],t[l],l);a.isUndefined(b)&&h!==c||(n[l]=b)}),n}const it=e=>{const t=I({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:o,headers:i,auth:c}=t;if(t.headers=i=C.from(i),t.url=tt(ot(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),a.isFormData(n)){if(S.hasStandardBrowserEnv||S.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(a.isFunction(n.getHeaders)){const d=n.getHeaders(),f=["content-type","content-length"];Object.entries(d).forEach(([l,h])=>{f.includes(l.toLowerCase())&&i.set(l,h)})}}if(S.hasStandardBrowserEnv&&(r&&a.isFunction(r)&&(r=r(t)),r||r!==!1&&Cn(t.url))){const d=s&&o&&xn.read(o);d&&i.set(s,d)}return t},Pn=typeof XMLHttpRequest<"u",Un=Pn&&function(e){return new Promise(function(n,r){const s=it(e);let o=s.data;const i=C.from(s.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:f}=s,l,h,b,g,u;function m(){g&&g(),u&&u(),s.cancelToken&&s.cancelToken.unsubscribe(l),s.signal&&s.signal.removeEventListener("abort",l)}let p=new XMLHttpRequest;p.open(s.method.toUpperCase(),s.url,!0),p.timeout=s.timeout;function E(){if(!p)return;const R=C.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),P={data:!c||c==="text"||c==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:R,config:e,request:p};st(function(_){n(_),m()},function(_){r(_),m()},P),p=null}"onloadend"in p?p.onloadend=E:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(E)},p.onabort=function(){p&&(r(new y("Request aborted",y.ECONNABORTED,e,p)),p=null)},p.onerror=function(O){const P=O&&O.message?O.message:"Network Error",D=new y(P,y.ERR_NETWORK,e,p);D.event=O||null,r(D),p=null},p.ontimeout=function(){let O=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const P=s.transitional||Ee;s.timeoutErrorMessage&&(O=s.timeoutErrorMessage),r(new y(O,P.clarifyTimeoutError?y.ETIMEDOUT:y.ECONNABORTED,e,p)),p=null},o===void 0&&i.setContentType(null),"setRequestHeader"in p&&a.forEach(i.toJSON(),function(O,P){p.setRequestHeader(P,O)}),a.isUndefined(s.withCredentials)||(p.withCredentials=!!s.withCredentials),c&&c!=="json"&&(p.responseType=s.responseType),f&&([b,u]=ne(f,!0),p.addEventListener("progress",b)),d&&p.upload&&([h,g]=ne(d),p.upload.addEventListener("progress",h),p.upload.addEventListener("loadend",g)),(s.cancelToken||s.signal)&&(l=R=>{p&&(r(!R||R.type?new v(null,e,p):R),p.abort(),p=null)},s.cancelToken&&s.cancelToken.subscribe(l),s.signal&&(s.signal.aborted?l():s.signal.addEventListener("abort",l)));const x=On(s.url);if(x&&S.protocols.indexOf(x)===-1){r(new y("Unsupported protocol "+x+":",y.ERR_BAD_REQUEST,e));return}p.send(o||null)})},Fn=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const o=function(f){if(!s){s=!0,c();const l=f instanceof Error?f:this.reason;r.abort(l instanceof y?l:new v(l instanceof Error?l.message:l))}};let i=t&&setTimeout(()=>{i=null,o(new y(`timeout of ${t}ms exceeded`,y.ETIMEDOUT))},t);const c=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(f=>{f.unsubscribe?f.unsubscribe(o):f.removeEventListener("abort",o)}),e=null)};e.forEach(f=>f.addEventListener("abort",o));const{signal:d}=r;return d.unsubscribe=()=>a.asap(c),d}},Ln=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},Dn=async function*(e,t){for await(const n of Bn(e))yield*Ln(n,t)},Bn=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()}},ke=(e,t,n,r)=>{const s=Dn(e,t);let o=0,i,c=d=>{i||(i=!0,r&&r(d))};return new ReadableStream({async pull(d){try{const{done:f,value:l}=await s.next();if(f){c(),d.close();return}let h=l.byteLength;if(n){let b=o+=h;n(b)}d.enqueue(new Uint8Array(l))}catch(f){throw c(f),f}},cancel(d){return c(d),s.return()}},{highWaterMark:2})},je=64*1024,{isFunction:Z}=a,kn=(({Request:e,Response:t})=>({Request:e,Response:t}))(a.global),{ReadableStream:Ie,TextEncoder:qe}=a.global,He=(e,...t)=>{try{return!!e(...t)}catch{return!1}},jn=e=>{e=a.merge.call({skipUndefined:!0},kn,e);const{fetch:t,Request:n,Response:r}=e,s=t?Z(t):typeof fetch=="function",o=Z(n),i=Z(r);if(!s)return!1;const c=s&&Z(Ie),d=s&&(typeof qe=="function"?(u=>m=>u.encode(m))(new qe):async u=>new Uint8Array(await new n(u).arrayBuffer())),f=o&&c&&He(()=>{let u=!1;const m=new n(S.origin,{body:new Ie,method:"POST",get duplex(){return u=!0,"half"}}).headers.has("Content-Type");return u&&!m}),l=i&&c&&He(()=>a.isReadableStream(new r("").body)),h={stream:l&&(u=>u.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(u=>{!h[u]&&(h[u]=(m,p)=>{let E=m&&m[u];if(E)return E.call(m);throw new y(`Response type '${u}' is not supported`,y.ERR_NOT_SUPPORT,p)})});const b=async u=>{if(u==null)return 0;if(a.isBlob(u))return u.size;if(a.isSpecCompliantForm(u))return(await new n(S.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 d(u)).byteLength},g=async(u,m)=>{const p=a.toFiniteNumber(u.getContentLength());return p??b(m)};return async u=>{let{url:m,method:p,data:E,signal:x,cancelToken:R,timeout:O,onDownloadProgress:P,onUploadProgress:D,responseType:_,headers:ce,withCredentials:X="same-origin",fetchOptions:Se}=it(u),Oe=t||fetch;_=_?(_+"").toLowerCase():"text";let G=Fn([x,R&&R.toAbortSignal()],O),$=null;const B=G&&G.unsubscribe&&(()=>{G.unsubscribe()});let Ae;try{if(D&&f&&p!=="get"&&p!=="head"&&(Ae=await g(ce,E))!==0){let L=new n(m,{method:"POST",body:E,duplex:"half"}),q;if(a.isFormData(E)&&(q=L.headers.get("content-type"))&&ce.setContentType(q),L.body){const[le,Q]=Le(Ae,ne(De(D)));E=ke(L.body,je,le,Q)}}a.isString(X)||(X=X?"include":"omit");const A=o&&"credentials"in n.prototype,Te={...Se,signal:G,method:p.toUpperCase(),headers:ce.normalize().toJSON(),body:E,duplex:"half",credentials:A?X:void 0};$=o&&new n(m,Te);let F=await(o?Oe($,Se):Oe(m,Te));const Ce=l&&(_==="stream"||_==="response");if(l&&(P||Ce&&B)){const L={};["status","statusText","headers"].forEach(xe=>{L[xe]=F[xe]});const q=a.toFiniteNumber(F.headers.get("content-length")),[le,Q]=P&&Le(q,ne(De(P),!0))||[];F=new r(ke(F.body,je,le,()=>{Q&&Q(),B&&B()}),L)}_=_||"text";let dt=await h[a.findKey(h,_)||"text"](F,u);return!Ce&&B&&B(),await new Promise((L,q)=>{st(L,q,{data:dt,headers:C.from(F.headers),status:F.status,statusText:F.statusText,config:u,request:$})})}catch(A){throw B&&B(),A&&A.name==="TypeError"&&/Load failed|fetch/i.test(A.message)?Object.assign(new y("Network Error",y.ERR_NETWORK,u,$,A&&A.response),{cause:A.cause||A}):y.from(A,A&&A.code,u,$,A&&A.response)}}},In=new Map,at=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,o=[r,s,n];let i=o.length,c=i,d,f,l=In;for(;c--;)d=o[c],f=l.get(d),f===void 0&&l.set(d,f=c?new Map:jn(t)),l=f;return f};at();const ge={http:en,xhr:Un,fetch:{get:at}};a.forEach(ge,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Me=e=>`- ${e}`,qn=e=>a.isFunction(e)||e===null||e===!1;function Hn(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 c;if(s=r,!qn(r)&&(s=ge[(c=String(r)).toLowerCase()],s===void 0))throw new y(`Unknown adapter '${c}'`);if(s&&(a.isFunction(s)||(s=s.get(t))))break;o[c||"#"+i]=s}if(!s){const i=Object.entries(o).map(([d,f])=>`adapter ${d} `+(f===!1?"is not supported by the environment":"is not available in the build"));let c=n?i.length>1?`since :
|
|
9
9
|
`+i.map(Me).join(`
|
|
10
10
|
`):" "+Me(i[0]):"as no adapter specified";throw new y("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return s}const ct={getAdapter:Hn,adapters:ge};function de(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new v(null,e)}function $e(e){return de(e),e.headers=C.from(e.headers),e.data=fe.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ct.getAdapter(e.adapter||K.adapter,e)(e).then(function(r){return de(e),r.data=fe.call(e,e.transformResponse,r),r.headers=C.from(r.headers),r},function(r){return rt(r)||(de(e),r&&r.response&&(r.response.data=fe.call(e,e.transformResponse,r.response),r.response.headers=C.from(r.response.headers))),Promise.reject(r)})}const lt="1.13.5",ae={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ae[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const ze={};ae.transitional=function(t,n,r){function s(o,i){return"[Axios v"+lt+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,c)=>{if(t===!1)throw new y(s(i," has been removed"+(n?" in "+n:"")),y.ERR_DEPRECATED);return n&&!ze[i]&&(ze[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,c):!0}};ae.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Mn(e,t,n){if(typeof e!="object")throw new y("options must be an object",y.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],i=t[o];if(i){const c=e[o],d=c===void 0||i(c,o,e);if(d!==!0)throw new y("option "+o+" must be "+d,y.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new y("Unknown option "+o,y.ERR_BAD_OPTION)}}const te={assertOptions:Mn,validators:ae},N=te.validators;let j=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Ue,response:new Ue}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const o=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
11
|
-
`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=I(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&te.assertOptions(r,{silentJSONParsing:N.transitional(N.boolean),forcedJSONParsing:N.transitional(N.boolean),clarifyTimeoutError:N.transitional(N.boolean),legacyInterceptorReqResOrdering:N.transitional(N.boolean)},!1),s!=null&&(a.isFunction(s)?n.paramsSerializer={serialize:s}:te.assertOptions(s,{encode:N.function,serialize:N.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),te.assertOptions(n,{baseUrl:N.spelling("baseURL"),withXsrfToken:N.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&a.merge(o.common,o[n.method]);o&&a.forEach(["delete","get","head","post","put","patch","common"],u=>{delete o[u]}),n.headers=C.concat(i,o);const c=[];let d=!0;this.interceptors.request.forEach(function(m){if(typeof m.runWhen=="function"&&m.runWhen(n)===!1)return;d=d&&m.synchronous;const p=n.transitional||Ee;p&&p.legacyInterceptorReqResOrdering?c.unshift(m.fulfilled,m.rejected):c.push(m.fulfilled,m.rejected)});const f=[];this.interceptors.response.forEach(function(m){f.push(m.fulfilled,m.rejected)});let l,h=0,b;if(!d){const u=[$e.bind(this),void 0];for(u.unshift(...c),u.push(...f),b=u.length,l=Promise.resolve(n);h<b;)l=l.then(u[h++],u[h++]);return l}b=c.length;let g=n;for(;h<b;){const u=c[h++],m=c[h++];try{g=u(g)}catch(p){m.call(this,p);break}}try{l=$e.call(this,g)}catch(u){return Promise.reject(u)}for(h=0,b=f.length;h<b;)l=l.then(f[h++],f[h++]);return l}getUri(t){t=I(this.defaults,t);const n=ot(t.baseURL,t.url,t.allowAbsoluteUrls);return tt(n,t.params,t.paramsSerializer)}};a.forEach(["delete","get","head","options"],function(t){j.prototype[t]=function(n,r){return this.request(I(r||{},{method:t,url:n,data:(r||{}).data}))}});a.forEach(["post","put","patch"],function(t){function n(r){return function(o,i,c){return this.request(I(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}j.prototype[t]=n(),j.prototype[t+"Form"]=n(!0)});let $n=class ut{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(c=>{r.subscribe(c),o=c}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,c){r.reason||(r.reason=new v(o,i,c),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 ut(function(s){t=s}),cancel:t}}};function zn(e){return function(n){return e.apply(null,n)}}function Jn(e){return a.isObject(e)&&e.isAxiosError===!0}const ye={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(ye).forEach(([e,t])=>{ye[t]=e});function ft(e){const t=new j(e),n=Je(j.prototype.request,t);return a.extend(n,j.prototype,t,{allOwnKeys:!0}),a.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return ft(I(e,s))},n}const w=ft(K);w.Axios=j;w.CanceledError=v;w.CancelToken=$n;w.isCancel=rt;w.VERSION=lt;w.toFormData=ie;w.AxiosError=y;w.Cancel=w.CanceledError;w.all=function(t){return Promise.all(t)};w.spread=zn;w.isAxiosError=Jn;w.mergeConfig=I;w.AxiosHeaders=C;w.formToJSON=e=>nt(a.isHTMLForm(e)?new FormData(e):e);w.getAdapter=ct.getAdapter;w.HttpStatusCode=ye;w.default=w;const{Axios:
|
|
11
|
+
`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=I(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&te.assertOptions(r,{silentJSONParsing:N.transitional(N.boolean),forcedJSONParsing:N.transitional(N.boolean),clarifyTimeoutError:N.transitional(N.boolean),legacyInterceptorReqResOrdering:N.transitional(N.boolean)},!1),s!=null&&(a.isFunction(s)?n.paramsSerializer={serialize:s}:te.assertOptions(s,{encode:N.function,serialize:N.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),te.assertOptions(n,{baseUrl:N.spelling("baseURL"),withXsrfToken:N.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&a.merge(o.common,o[n.method]);o&&a.forEach(["delete","get","head","post","put","patch","common"],u=>{delete o[u]}),n.headers=C.concat(i,o);const c=[];let d=!0;this.interceptors.request.forEach(function(m){if(typeof m.runWhen=="function"&&m.runWhen(n)===!1)return;d=d&&m.synchronous;const p=n.transitional||Ee;p&&p.legacyInterceptorReqResOrdering?c.unshift(m.fulfilled,m.rejected):c.push(m.fulfilled,m.rejected)});const f=[];this.interceptors.response.forEach(function(m){f.push(m.fulfilled,m.rejected)});let l,h=0,b;if(!d){const u=[$e.bind(this),void 0];for(u.unshift(...c),u.push(...f),b=u.length,l=Promise.resolve(n);h<b;)l=l.then(u[h++],u[h++]);return l}b=c.length;let g=n;for(;h<b;){const u=c[h++],m=c[h++];try{g=u(g)}catch(p){m.call(this,p);break}}try{l=$e.call(this,g)}catch(u){return Promise.reject(u)}for(h=0,b=f.length;h<b;)l=l.then(f[h++],f[h++]);return l}getUri(t){t=I(this.defaults,t);const n=ot(t.baseURL,t.url,t.allowAbsoluteUrls);return tt(n,t.params,t.paramsSerializer)}};a.forEach(["delete","get","head","options"],function(t){j.prototype[t]=function(n,r){return this.request(I(r||{},{method:t,url:n,data:(r||{}).data}))}});a.forEach(["post","put","patch"],function(t){function n(r){return function(o,i,c){return this.request(I(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}j.prototype[t]=n(),j.prototype[t+"Form"]=n(!0)});let $n=class ut{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(c=>{r.subscribe(c),o=c}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,c){r.reason||(r.reason=new v(o,i,c),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 ut(function(s){t=s}),cancel:t}}};function zn(e){return function(n){return e.apply(null,n)}}function Jn(e){return a.isObject(e)&&e.isAxiosError===!0}const ye={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(ye).forEach(([e,t])=>{ye[t]=e});function ft(e){const t=new j(e),n=Je(j.prototype.request,t);return a.extend(n,j.prototype,t,{allOwnKeys:!0}),a.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return ft(I(e,s))},n}const w=ft(K);w.Axios=j;w.CanceledError=v;w.CancelToken=$n;w.isCancel=rt;w.VERSION=lt;w.toFormData=ie;w.AxiosError=y;w.Cancel=w.CanceledError;w.all=function(t){return Promise.all(t)};w.spread=zn;w.isAxiosError=Jn;w.mergeConfig=I;w.AxiosHeaders=C;w.formToJSON=e=>nt(a.isHTMLForm(e)?new FormData(e):e);w.getAdapter=ct.getAdapter;w.HttpStatusCode=ye;w.default=w;const{Axios:Qn,AxiosError:Zn,CanceledError:Yn,isCancel:er,CancelToken:tr,VERSION:nr,all:rr,Cancel:sr,isAxiosError:or,spread:ir,toFormData:ar,AxiosHeaders:cr,HttpStatusCode:lr,formToJSON:ur,getAdapter:fr,mergeConfig:dr}=w,Vn=w.create({baseURL:ht.API_BASE,timeout:1e4});Vn.interceptors.response.use(e=>(e.data&&typeof e.data=="object"&&"success"in e.data&&(e.data=e.data.data),e));export{Kn as L,Vn as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,u as g,j as e,B as y,R as v,S as j,G as N,m as l}from"./index-
|
|
1
|
+
import{r as t,u as g,j as e,B as y,R as v,S as j,G as N,m as l}from"./index-BjgISQg5.js";import{L as b,a as c}from"./api-CvtLmLuv.js";function S(){const[i,d]=t.useState({modules:0,routes:0,config:!1}),[m,u]=t.useState(!0),[o,x]=t.useState(null),p=g();if(t.useEffect(()=>{(async()=>{var r,n;try{const[a,h]=await Promise.all([c.get("/modules"),c.get("/routes")]);d({modules:((r=a.data)==null?void 0:r.length)??0,routes:((n=h.data)==null?void 0:n.length)??0,config:!0})}catch(a){x(a.message||"Failed to connect to DevTools API")}finally{u(!1)}})()},[]),m)return e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsx(b,{className:"size-8 animate-spin text-primary"})});if(o)return e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsxs("div",{className:"rounded-primary border border-primary bg-secondary p-8 text-center",children:[e.jsx("div",{className:"mb-3 text-lg font-semibold text-primary",children:"Connection Error"}),e.jsx("p",{className:"text-sm text-secondary",children:o}),e.jsx("p",{className:"mt-2 text-xs text-secondary",children:"Make sure your Wecon app is running with devtools enabled."})]})});const f=[{title:"Modules",value:i.modules,icon:y,description:"Registered application modules",path:"/modules"},{title:"Routes",value:i.routes,icon:v,description:"API route endpoints (RAIs)",path:"/routes"},{title:"Config",value:"View",icon:j,description:"Application configuration",path:"/config"},{title:"I18n",value:"Manage",icon:N,description:"Translation namespaces",path:"/i18n"}];return e.jsxs(l.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.3},className:"flex size-full flex-col gap-6 overflow-y-auto p-6",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold text-primary",children:"Wecon DevTools"}),e.jsx("p",{className:"mt-1 text-sm text-secondary",children:"Inspect and manage your application modules, routes, config, and translations."})]}),e.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",children:f.map(s=>e.jsxs(l.div,{whileHover:{scale:1.02},whileTap:{scale:.98},onClick:()=>p(s.path),className:"flex cursor-pointer flex-col gap-3 rounded-primary border border-primary bg-secondary p-5 shadow-small transition-shadow hover:shadow-medium",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(s.icon,{className:"size-5 text-secondary"}),e.jsx("span",{className:"text-2xl font-bold text-primary",children:s.value})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-semibold text-primary",children:s.title}),e.jsx("div",{className:"text-xs text-secondary",children:s.description})]})]},s.title))})]})}export{S as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,u as c,j as e,m as r,B as d}from"./index-BjgISQg5.js";import{a as x,L as m}from"./api-CvtLmLuv.js";import{C as u}from"./chevron-right-ByQ2jwEZ.js";function y(){const[a,i]=t.useState([]),[n,l]=t.useState(!0),o=c();return t.useEffect(()=>{x.get("/modules").then(s=>{i(s.data)}).catch(console.error).finally(()=>l(!1))},[]),n?e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsx(m,{className:"size-8 animate-spin text-primary"})}):e.jsxs(r.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.3},className:"flex size-full flex-col gap-6 overflow-y-auto p-6",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold text-primary",children:"Modules"}),e.jsxs("p",{className:"mt-1 text-sm text-secondary",children:[a.length," registered module",a.length!==1?"s":""]})]}),e.jsx("div",{className:"flex flex-col gap-3",children:a.map(s=>e.jsxs(r.div,{whileHover:{x:4},onClick:()=>o(`/modules/${s.name}`),className:"flex cursor-pointer items-center gap-4 rounded-primary border border-primary bg-secondary p-4 transition-shadow hover:shadow-small",children:[e.jsx("div",{className:"flex size-10 items-center justify-center rounded-secondary bg-primary",children:e.jsx(d,{className:"size-5 text-secondary"})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"font-semibold text-primary",children:s.name}),e.jsx("div",{className:"text-xs text-secondary",children:s.description||"No description"})]}),e.jsxs("div",{className:"flex items-center gap-4 text-xs text-secondary",children:[e.jsxs("span",{children:[s.routeCount," route",s.routeCount!==1?"s":""]}),s.hasConfig&&e.jsx("span",{className:"rounded-full bg-primary px-2 py-0.5 text-primary",children:"config"})]}),e.jsx(u,{className:"size-4 text-secondary"})]},s.name))})]})}export{y as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-BI-oiBt-.js","./api-CvtLmLuv.js","./index-BMd21Cuf.js","./chevron-right-ByQ2jwEZ.js","./ModuleDetail-BoiZYmmO.js","./arrow-left-C26_8YjI.js","./index-D825pKz_.js","./index-DaglUNul.js","./TranslationEditor-Dz2BHJgQ.js","./index-DS8GcC6h.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
function Pg(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function Eg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vd={exports:{}},Vo={},yd={exports:{}},j={};/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react.production.min.js
|
|
@@ -178,4 +178,4 @@ Error generating stack: `+o.message+`
|
|
|
178
178
|
border-r border-primary
|
|
179
179
|
bg-secondary p-[8px]
|
|
180
180
|
transition-all duration-300 ease-in-out
|
|
181
|
-
`,children:[R.jsx(tE,{}),R.jsx(nE,{}),R.jsx("div",{className:"h-[24px] min-h-[24px] w-full",children:R.jsx(ko,{mode:"wait",children:e?R.jsx(ii.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.3},className:"flex h-[24px] min-h-[24px] w-full items-center justify-start overflow-hidden px-[10px] text-[14px] font-medium text-secondary",children:"Menu"},"menu-title"):R.jsx(ii.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"24px"},exit:{opacity:0,height:0},transition:{duration:.3},className:"mx-auto flex h-[24px] w-[80%] items-center justify-center",children:R.jsx("div",{className:"h-px w-full bg-primary"})},"menu-title-line")})}),R.jsx(oE,{})]})};function lE(){const e=ge(o=>o.isSideBarOpen),t=ge(o=>o.isMobile),n=ge(o=>o.setIsMobile),[r,i]=YP();return S.useEffect(()=>{i.width!==0&&n(i.width<768)},[i.width,n]),R.jsxs("div",{ref:r,className:"flex h-lvh min-h-lvh w-full overflow-hidden bg-primary",children:[R.jsx("div",{className:`h-dvh max-h-dvh ${t?e?"ml-0 min-w-[300px]":"-ml-[300px] min-w-[300px]":e?"min-w-[300px]":"min-w-[68px]"} transition-all duration-300 ease-in-out`,children:R.jsx(sE,{})}),R.jsxs("div",{className:`${e?t?"min-w-full":"w-[calc(100%-300px)]":t?"w-full":"w-[calc(100%-68px)]"} flex max-h-[100dvh] flex-col gap-2 overflow-hidden overflow-y-auto transition-all duration-300 ease-in-out`,children:[R.jsx(ko,{mode:"wait",children:R.jsx(XP,{})}),R.jsx("div",{className:"size-full",children:R.jsx(ko,{mode:"wait",children:R.jsx(S.Suspense,{fallback:R.jsx(na,{}),children:R.jsx(K0,{})})})})]})]})}const aE="modulepreload",uE=function(e,t){return new URL(e,t).href},gd={},gn=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){const s=document.getElementsByTagName("link"),l=document.querySelector("meta[property=csp-nonce]"),a=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));i=Promise.allSettled(n.map(u=>{if(u=uE(u,r),u in gd)return;gd[u]=!0;const c=u.endsWith(".css"),f=c?'[rel="stylesheet"]':"";if(!!r)for(let v=s.length-1;v>=0;v--){const y=s[v];if(y.href===u&&(!c||y.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${f}`))return;const g=document.createElement("link");if(g.rel=c?"stylesheet":aE,c||(g.as="script"),g.crossOrigin="",g.href=u,a&&g.setAttribute("nonce",a),document.head.appendChild(g),c)return new Promise((v,y)=>{g.addEventListener("load",v),g.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${u}`)))})}))}function o(s){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=s,window.dispatchEvent(l),!l.defaultPrevented)throw s}return i.then(s=>{for(const l of s||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})},cE=S.lazy(()=>gn(()=>import("./index-
|
|
181
|
+
`,children:[R.jsx(tE,{}),R.jsx(nE,{}),R.jsx("div",{className:"h-[24px] min-h-[24px] w-full",children:R.jsx(ko,{mode:"wait",children:e?R.jsx(ii.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.3},className:"flex h-[24px] min-h-[24px] w-full items-center justify-start overflow-hidden px-[10px] text-[14px] font-medium text-secondary",children:"Menu"},"menu-title"):R.jsx(ii.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"24px"},exit:{opacity:0,height:0},transition:{duration:.3},className:"mx-auto flex h-[24px] w-[80%] items-center justify-center",children:R.jsx("div",{className:"h-px w-full bg-primary"})},"menu-title-line")})}),R.jsx(oE,{})]})};function lE(){const e=ge(o=>o.isSideBarOpen),t=ge(o=>o.isMobile),n=ge(o=>o.setIsMobile),[r,i]=YP();return S.useEffect(()=>{i.width!==0&&n(i.width<768)},[i.width,n]),R.jsxs("div",{ref:r,className:"flex h-lvh min-h-lvh w-full overflow-hidden bg-primary",children:[R.jsx("div",{className:`h-dvh max-h-dvh ${t?e?"ml-0 min-w-[300px]":"-ml-[300px] min-w-[300px]":e?"min-w-[300px]":"min-w-[68px]"} transition-all duration-300 ease-in-out`,children:R.jsx(sE,{})}),R.jsxs("div",{className:`${e?t?"min-w-full":"w-[calc(100%-300px)]":t?"w-full":"w-[calc(100%-68px)]"} flex max-h-[100dvh] flex-col gap-2 overflow-hidden overflow-y-auto transition-all duration-300 ease-in-out`,children:[R.jsx(ko,{mode:"wait",children:R.jsx(XP,{})}),R.jsx("div",{className:"size-full",children:R.jsx(ko,{mode:"wait",children:R.jsx(S.Suspense,{fallback:R.jsx(na,{}),children:R.jsx(K0,{})})})})]})]})}const aE="modulepreload",uE=function(e,t){return new URL(e,t).href},gd={},gn=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){const s=document.getElementsByTagName("link"),l=document.querySelector("meta[property=csp-nonce]"),a=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));i=Promise.allSettled(n.map(u=>{if(u=uE(u,r),u in gd)return;gd[u]=!0;const c=u.endsWith(".css"),f=c?'[rel="stylesheet"]':"";if(!!r)for(let v=s.length-1;v>=0;v--){const y=s[v];if(y.href===u&&(!c||y.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${f}`))return;const g=document.createElement("link");if(g.rel=c?"stylesheet":aE,c||(g.as="script"),g.crossOrigin="",g.href=u,a&&g.setAttribute("nonce",a),document.head.appendChild(g),c)return new Promise((v,y)=>{g.addEventListener("load",v),g.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${u}`)))})}))}function o(s){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=s,window.dispatchEvent(l),!l.defaultPrevented)throw s}return i.then(s=>{for(const l of s||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})},cE=S.lazy(()=>gn(()=>import("./index-BI-oiBt-.js"),__vite__mapDeps([0,1]),import.meta.url)),fE=S.lazy(()=>gn(()=>import("./index-BMd21Cuf.js"),__vite__mapDeps([2,1,3]),import.meta.url)),dE=S.lazy(()=>gn(()=>import("./ModuleDetail-BoiZYmmO.js"),__vite__mapDeps([4,1,5]),import.meta.url)),hE=S.lazy(()=>gn(()=>import("./index-D825pKz_.js"),__vite__mapDeps([6,1,3]),import.meta.url)),pE=S.lazy(()=>gn(()=>import("./index-DaglUNul.js"),__vite__mapDeps([7,1,3]),import.meta.url)),mE=S.lazy(()=>gn(()=>import("./TranslationEditor-Dz2BHJgQ.js"),__vite__mapDeps([8,1,5]),import.meta.url)),gE=S.lazy(()=>gn(()=>import("./index-DS8GcC6h.js"),__vite__mapDeps([9,1]),import.meta.url)),vE=[{path:"/",name:"Overview",component:cE},{path:"/modules",name:"Modules",component:fE},{path:"/modules/:name",name:"Module Detail",component:dE},{path:"/config",name:"Config",component:hE},{path:"/i18n",name:"I18n",component:pE},{path:"/i18n/:namespace/:lang",name:"Translation Editor",component:mE},{path:"/routes",name:"Routes",component:gE}];function yE(){return R.jsx(GP,{children:R.jsx(Q0,{children:R.jsx(Zi,{element:R.jsx(lE,{}),children:vE.map(e=>e.path==="/"?R.jsx(Zi,{index:!0,element:R.jsx(S.Suspense,{fallback:R.jsx(na,{}),children:R.jsx(e.component,{})})},e.path):R.jsx(Zi,{path:e.path,element:R.jsx(S.Suspense,{fallback:R.jsx(na,{}),children:R.jsx(e.component,{})})},e.path))})})})}function wE(){return R.jsx(Z0,{basename:"/dev/devtools/ui",children:R.jsx(yE,{})})}Ap(document.getElementById("root")).render(R.jsx(S.StrictMode,{children:R.jsx(wE,{})}));export{TP as B,MP as G,_P as R,VP as S,xE as a,KP as b,be as c,R as j,ii as m,S as r,R0 as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as o,r as l,j as e,m as x}from"./index-
|
|
1
|
+
import{c as o,r as l,j as e,m as x}from"./index-BjgISQg5.js";import{a as m,L as f}from"./api-CvtLmLuv.js";import{C as p}from"./chevron-right-ByQ2jwEZ.js";/**
|
|
2
2
|
* @license lucide-react v0.460.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as m,r as a,j as e,m as h}from"./index-
|
|
1
|
+
import{c as m,r as a,j as e,m as h}from"./index-BjgISQg5.js";import{a as y,L as u}from"./api-CvtLmLuv.js";/**
|
|
2
2
|
* @license lucide-react v0.460.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,u as x,j as e,m as r,G as n}from"./index-
|
|
1
|
+
import{r as i,u as x,j as e,m as r,G as n}from"./index-BjgISQg5.js";import{a as d,L as p}from"./api-CvtLmLuv.js";import{C as f}from"./chevron-right-ByQ2jwEZ.js";function j(){const[a,c]=i.useState([]),[l,o]=i.useState(!0),m=x();return i.useEffect(()=>{d.get("/i18n").then(s=>c(s.data)).catch(console.error).finally(()=>o(!1))},[]),l?e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsx(p,{className:"size-8 animate-spin text-primary"})}):a.length===0?e.jsxs(r.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.3},className:"flex size-full flex-col items-center justify-center gap-4 p-6",children:[e.jsx(n,{className:"size-12 text-secondary"}),e.jsx("p",{className:"text-secondary",children:"No i18n namespaces found"}),e.jsx("p",{className:"text-xs text-secondary",children:"Enable i18n in your Wecon config to manage translations."})]}):e.jsxs(r.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.3},className:"flex size-full flex-col gap-6 overflow-y-auto p-6",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold text-primary",children:"Translations"}),e.jsxs("p",{className:"mt-1 text-sm text-secondary",children:[a.length," namespace",a.length!==1?"s":""]})]}),e.jsx("div",{className:"flex flex-col gap-3",children:a.map(s=>e.jsxs("div",{className:"rounded-primary border border-primary bg-secondary p-4",children:[e.jsxs("div",{className:"mb-3 flex items-center gap-3",children:[e.jsx(n,{className:"size-5 text-secondary"}),e.jsx("span",{className:"font-semibold text-primary",children:s.namespace})]}),e.jsx("div",{className:"flex flex-wrap gap-2",children:s.languages.map(t=>e.jsxs(r.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>m(`/i18n/${s.namespace}/${t}`),className:"flex items-center gap-2 rounded-secondary border border-primary px-3 py-1.5 text-xs transition-colors hover:bg-primary",children:[e.jsx("span",{className:"font-semibold text-primary",children:t.toUpperCase()}),e.jsxs("span",{className:"text-secondary",children:[s.keyCount[t]??0," keys"]}),e.jsx(f,{className:"size-3 text-secondary"})]},t))})]},s.namespace))})]})}export{j as default};
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
|
-
<link rel="icon"
|
|
5
|
+
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>🔧</text></svg>" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>Wecon DevTools</title>
|
|
8
|
-
<script type="module" crossorigin src="./assets/index-
|
|
8
|
+
<script type="module" crossorigin src="./assets/index-BjgISQg5.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="./assets/index-BFzJyDrn.css">
|
|
10
10
|
</head>
|
|
11
11
|
|
package/package.json
CHANGED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{c as N,a as S,r as i,u as w,j as e,m as x}from"./index-Cwwdi5uz.js";import{a as y,L as f}from"./api-DHFLRYt1.js";import{A as z}from"./arrow-left-XXd8AsXj.js";/**
|
|
2
|
-
* @license lucide-react v0.460.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const C=N("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);function $(){const{namespace:s,lang:t}=S(),[o,l]=i.useState({}),[u,h]=i.useState(!0),[c,d]=i.useState(!1),[b,m]=i.useState(!1),j=w();i.useEffect(()=>{!s||!t||y.get(`/i18n/${s}/${t}`).then(a=>{var r;return l(((r=a.data)==null?void 0:r.translations)??a.data??{})}).catch(console.error).finally(()=>h(!1))},[s,t]);const v=(a,r)=>{l(n=>({...n,[a]:r})),m(!0)},g=async()=>{if(!(!s||!t)){d(!0);try{await y.put(`/i18n/${s}/${t}`,{translations:o}),m(!1)}catch(a){console.error(a)}finally{d(!1)}}};if(u)return e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsx(f,{className:"size-8 animate-spin text-primary"})});const p=Object.entries(o);return e.jsxs(x.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.3},className:"flex size-full flex-col gap-6 overflow-y-auto p-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("button",{onClick:()=>j("/i18n"),className:"flex size-8 items-center justify-center rounded-secondary border border-primary transition-colors hover:bg-primary",children:e.jsx(z,{className:"size-4 text-primary"})}),e.jsxs("div",{children:[e.jsxs("h1",{className:"text-2xl font-bold text-primary",children:[s," / ",t==null?void 0:t.toUpperCase()]}),e.jsxs("p",{className:"text-sm text-secondary",children:[p.length," keys"]})]})]}),b&&e.jsxs(x.button,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},whileTap:{scale:.95},onClick:g,disabled:c,className:"flex items-center gap-2 rounded-secondary bg-btn-primary px-4 py-2 text-sm font-medium text-btn-primary transition-opacity hover:opacity-90 disabled:opacity-50",children:[c?e.jsx(f,{className:"size-4 animate-spin"}):e.jsx(C,{className:"size-4"}),"Save"]})]}),e.jsx("div",{className:"flex flex-col gap-2",children:p.map(([a,r])=>e.jsxs("div",{className:"flex flex-col gap-1 rounded-secondary border border-primary bg-secondary p-3 sm:flex-row sm:items-center sm:gap-4",children:[e.jsx("label",{className:"min-w-[200px] text-xs font-semibold text-primary",children:a}),e.jsx("input",{type:"text",value:r,onChange:n=>v(a,n.target.value),className:"w-full rounded-tertiary border border-primary bg-primary px-3 py-1.5 text-sm text-primary outline-none focus:border-blue-500"})]},a))})]})}export{$ as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,u as c,j as e,m as r,B as d}from"./index-Cwwdi5uz.js";import{a as x,L as m}from"./api-DHFLRYt1.js";import{C as u}from"./chevron-right-DN23SEYa.js";function y(){const[a,i]=t.useState([]),[n,l]=t.useState(!0),o=c();return t.useEffect(()=>{x.get("/modules").then(s=>i(s.data)).catch(console.error).finally(()=>l(!1))},[]),n?e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsx(m,{className:"size-8 animate-spin text-primary"})}):e.jsxs(r.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.3},className:"flex size-full flex-col gap-6 overflow-y-auto p-6",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold text-primary",children:"Modules"}),e.jsxs("p",{className:"mt-1 text-sm text-secondary",children:[a.length," registered module",a.length!==1?"s":""]})]}),e.jsx("div",{className:"flex flex-col gap-3",children:a.map(s=>e.jsxs(r.div,{whileHover:{x:4},onClick:()=>o(`/modules/${s.name}`),className:"flex cursor-pointer items-center gap-4 rounded-primary border border-primary bg-secondary p-4 transition-shadow hover:shadow-small",children:[e.jsx("div",{className:"flex size-10 items-center justify-center rounded-secondary bg-primary",children:e.jsx(d,{className:"size-5 text-secondary"})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"font-semibold text-primary",children:s.name}),e.jsx("div",{className:"text-xs text-secondary",children:s.description||"No description"})]}),e.jsxs("div",{className:"flex items-center gap-4 text-xs text-secondary",children:[e.jsxs("span",{children:[s.routeCount," route",s.routeCount!==1?"s":""]}),s.hasConfig&&e.jsx("span",{className:"rounded-full bg-primary px-2 py-0.5 text-primary",children:"config"})]}),e.jsx(u,{className:"size-4 text-secondary"})]},s.name))})]})}export{y as default};
|