@farris/ui-vue
Version:
Farris Vue, a Farris Design based Vue3 component library.
7 lines (6 loc) • 45.3 kB
JavaScript
(function(C,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("vue"),require("lodash-es"),require("../button-edit/index.umd.js"),require("../layout/index.umd.js"),require("../tree-view/index.umd.js"),require("../data-grid/index.umd.js"),require("../loading/index.umd.js"),require("../notify/index.umd.js"),require("../common/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es","../button-edit/index.umd.js","../layout/index.umd.js","../tree-view/index.umd.js","../data-grid/index.umd.js","../loading/index.umd.js","../notify/index.umd.js","../common/index.umd.js"],E):(C=typeof globalThis<"u"?globalThis:C||self,E(C["menu-lookup"]={},C.Vue,C.LodashES,C.buttonEdit,C.FLayout,C.FTreeView,C.FDataGrid,C.loading,C.notify,C.common))})(this,function(C,E,ee,lt,te,ft,dt,pt,ht,mt){"use strict";const yt={},gt={};function we(e){const{properties:t,title:n,ignore:r}=e,o=r&&Array.isArray(r),s=Object.keys(t).reduce((i,u)=>((!o||!r.find(d=>d===u))&&(i[u]=t[u].type==="object"&&t[u].properties?we(t[u]):ee.cloneDeep(t[u].default)),i),{});if(n&&(!o||!r.find(i=>i==="id"))){const i=n.toLowerCase().replace(/-/g,"_");s.id=`${i}_${Math.random().toString().slice(2,6)}`}return s}function bt(e,t){const n=we(t);return Object.keys(n).reduce((r,o)=>(Object.prototype.hasOwnProperty.call(e,o)&&(r[o]&&ee.isPlainObject(r[o])&&ee.isPlainObject(e[o]||!e[o])?Object.assign(r[o],e[o]||{}):r[o]=e[o]),r),n),n}function Ee(e,t){return Object.keys(e).filter(r=>e[r]!=null).reduce((r,o)=>{if(t.has(o)){const s=t.get(o);if(typeof s=="string")r[s]=e[o];else{const i=s(o,e[o],e);Object.assign(r,i)}}else r[o]=e[o];return r},{})}function wt(e,t,n=new Map){const r=bt(e,t);return Ee(r,n)}function Et(e={}){function t(a,l,f,m){if(typeof f=="number")return m[a].length===f;if(typeof f=="object"){const y=Object.keys(f)[0],p=f[y];if(y==="not")return Number(m[a].length)!==Number(p);if(y==="moreThan")return Number(m[a].length)>=Number(p);if(y==="lessThan")return Number(m[a].length)<=Number(p)}return!1}function n(a,l,f,m){return m[a]&&m[a].propertyValue&&String(m[a].propertyValue.value)===String(f)}const r=new Map([["length",t],["getProperty",n]]);Object.keys(e).reduce((a,l)=>(a.set(l,e[l]),a),r);function o(a,l){const f=a;return typeof l=="number"?[{target:f,operator:"length",param:null,value:Number(l)}]:typeof l=="boolean"?[{target:f,operator:"getProperty",param:a,value:!!l}]:typeof l=="object"?Object.keys(l).map(m=>{if(m==="length")return{target:f,operator:"length",param:null,value:l[m]};const y=m,p=l[m];return{target:f,operator:"getProperty",param:y,value:p}}):[]}function s(a){return Object.keys(a).reduce((f,m)=>{const y=o(m,a[m]);return f.push(...y),f},[])}function i(a,l){if(r.has(a.operator)){const f=r.get(a.operator);return f&&f(a.target,a.param,a.value,l)||!1}return!1}function u(a,l){return s(a).reduce((y,p)=>y&&i(p,l),!0)}function d(a,l){const f=Object.keys(a),m=f.includes("allOf"),y=f.includes("anyOf"),p=m||y,R=(p?a[p?m?"allOf":"anyOf":"allOf"]:[a]).map(S=>u(S,l));return m?!R.includes(!1):R.includes(!0)}return{parseValueSchema:d}}const St={},Rt={};Et();function Tt(e,t,n=new Map,r=(i,u,d,a)=>u,o={},s=i=>i){return yt[t.title]=t,gt[t.title]=r,St[t.title]=o,Rt[t.title]=s,(i={},u=!0)=>{if(!u)return Ee(i,n);const d=wt(i,t,n),a=Object.keys(e).reduce((l,f)=>(l[f]=e[f].default,l),{});return Object.assign(a,d)}}const Ot={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/menu-lookup.schema.json",title:"menu-lookup",description:"A Farris Component",type:"object",properties:{type:{description:"The type string of menu-lookup",type:"string",default:"menu-lookup"},targetType:{description:"",type:"string",enum:["menu","app"],default:"menu"},fetchNodeApi:{description:"",type:"function"}},required:["type","fetchNodeApi"],ignore:[]},Nt=new Map([]);function Ct(e,t,n){return t}const ne={targetType:{type:String,default:"menu"},fetchNodeApi:{type:[String,Function],require:!0},modelValue:{type:String,default:""}},Se=Tt(ne,Ot,Nt,Ct),At={targetType:{type:String,default:"menu"},useTreeGridCoordinatorComposition:{type:Object,default:{}}};function Re(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!E.isVNode(e)}const xt=E.defineComponent({name:"FMenuLookupModalContainer",props:At,emits:[],setup(e){const t=E.ref(),n=E.ref(),{treeData:r,gridData:o,onNavTreeExpandNode:s,onNavTreeSelectionChange:i,onDataGridSelectionChange:u,onDataGridUnSelectItem:d,initialize:a}=e.useTreeGridCoordinatorComposition,l={parentIdField:"parentId",collapseField:"collapse",hasChildrenField:"hasChildren"},f={enableSelectRow:!0,clearSelectionOnEmpty:!0,keepSelectingOnClick:!1,keepSelectingOnPaging:!1,multiSelect:!1,showCheckbox:!1},m=[{field:"code",title:"编号",dataType:"string",resizable:!0},{field:"name",title:"名称",dataType:"string",resizable:!0}],y=[{field:"code",title:"编号",dataType:"string",resizable:!0},{field:"name",title:"名称",dataType:"string",resizable:!0},{field:"appEntrance",title:"入口",dataType:"string",resizable:!0}],p=e.targetType==="app"?y:m;function b(){t.value&&t.value.updateDataSource(r.value)}E.watch(r,b);function h(){n.value&&n.value.updateDataSource(o.value)}E.watch(o,h);function R(){return E.createVNode(ft,{ref:t,data:r.value,hierarchy:l,virtualized:!1,onSelectionChange:i,onExpandNode:s},null)}function g({cell:O}){return E.createVNode("span",{title:O.data??""},[O.data])}function S(){return E.createVNode(dt,{ref:n,columns:p,data:o.value,fit:!0,showStripe:!1,columnOption:{fitColumns:!0},rowNumber:{enable:!1},selection:f,virtualized:!0,onSelectionChange:u,onUnSelectItem:d},{cellTemplate:g})}return E.onMounted(()=>{a()}),()=>{let O,T;return E.createVNode(te,null,{default:()=>[E.createVNode(te.FLayoutPane,{position:"left",width:300,"min-width":200},Re(O=R())?O:{default:()=>[O]}),E.createVNode(te.FLayoutPane,{position:"center","min-width":400},Re(T=S())?T:{default:()=>[T]})]})}}});function Te(e,t){return function(){return e.apply(t,arguments)}}const{toString:Pt}=Object.prototype,{getPrototypeOf:re}=Object,z=(e=>t=>{const n=Pt.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),L=e=>(e=e.toLowerCase(),t=>z(t)===e),$=e=>t=>typeof t===e,{isArray:M}=Array,I=$("undefined");function Lt(e){return e!==null&&!I(e)&&e.constructor!==null&&!I(e.constructor)&&P(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Oe=L("ArrayBuffer");function Dt(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Oe(e.buffer),t}const Ft=$("string"),P=$("function"),Ne=$("number"),G=e=>e!==null&&typeof e=="object",_t=e=>e===!0||e===!1,J=e=>{if(z(e)!=="object")return!1;const t=re(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},jt=L("Date"),Bt=L("File"),kt=L("Blob"),Ut=L("FileList"),Mt=e=>G(e)&&P(e.pipe),qt=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||P(e.append)&&((t=z(e))==="formdata"||t==="object"&&P(e.toString)&&e.toString()==="[object FormData]"))},It=L("URLSearchParams"),[Ht,vt,Vt,zt]=["ReadableStream","Request","Response","Headers"].map(L),$t=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function H(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),M(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),i=s.length;let u;for(r=0;r<i;r++)u=s[r],t.call(null,e[u],u,e)}}function Ce(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const B=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ae=e=>!I(e)&&e!==B;function oe(){const{caseless:e}=Ae(this)&&this||{},t={},n=(r,o)=>{const s=e&&Ce(t,o)||o;J(t[s])&&J(r)?t[s]=oe(t[s],r):J(r)?t[s]=oe({},r):M(r)?t[s]=r.slice():t[s]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&H(arguments[r],n);return t}const Gt=(e,t,n,{allOwnKeys:r}={})=>(H(t,(o,s)=>{n&&P(o)?e[s]=Te(o,n):e[s]=o},{allOwnKeys:r}),e),Jt=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Wt=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Xt=(e,t,n,r)=>{let o,s,i;const u={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)i=o[s],(!r||r(i,e,t))&&!u[i]&&(t[i]=e[i],u[i]=!0);e=n!==!1&&re(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},Qt=e=>{if(!e)return null;if(M(e))return e;let t=e.length;if(!Ne(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Zt=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&re(Uint8Array)),Yt=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},en=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},tn=L("HTMLFormElement"),nn=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),xe=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),rn=L("RegExp"),Pe=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};H(n,(o,s)=>{let i;(i=t(o,s,e))!==!1&&(r[s]=i||o)}),Object.defineProperties(e,r)},on=e=>{Pe(e,(t,n)=>{if(P(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(P(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+"'")})}})},sn=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return M(e)?r(e):r(String(e).split(t)),n},an=()=>{},cn=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,se="abcdefghijklmnopqrstuvwxyz",Le="0123456789",De={DIGIT:Le,ALPHA:se,ALPHA_DIGIT:se+se.toUpperCase()+Le},un=(e=16,t=De.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function ln(e){return!!(e&&P(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const fn=e=>{const t=new Array(10),n=(r,o)=>{if(G(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const s=M(r)?[]:{};return H(r,(i,u)=>{const d=n(i,o+1);!I(d)&&(s[u]=d)}),t[o]=void 0,s}}return r};return n(e,0)},dn=L("AsyncFunction"),pn=e=>e&&(G(e)||P(e))&&P(e.then)&&P(e.catch),Fe=((e,t)=>e?setImmediate:t?((n,r)=>(B.addEventListener("message",({source:o,data:s})=>{o===B&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),B.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",P(B.postMessage)),hn=typeof queueMicrotask<"u"?queueMicrotask.bind(B):typeof process<"u"&&process.nextTick||Fe,c={isArray:M,isArrayBuffer:Oe,isBuffer:Lt,isFormData:qt,isArrayBufferView:Dt,isString:Ft,isNumber:Ne,isBoolean:_t,isObject:G,isPlainObject:J,isReadableStream:Ht,isRequest:vt,isResponse:Vt,isHeaders:zt,isUndefined:I,isDate:jt,isFile:Bt,isBlob:kt,isRegExp:rn,isFunction:P,isStream:Mt,isURLSearchParams:It,isTypedArray:Zt,isFileList:Ut,forEach:H,merge:oe,extend:Gt,trim:$t,stripBOM:Jt,inherits:Wt,toFlatObject:Xt,kindOf:z,kindOfTest:L,endsWith:Kt,toArray:Qt,forEachEntry:Yt,matchAll:en,isHTMLForm:tn,hasOwnProperty:xe,hasOwnProp:xe,reduceDescriptors:Pe,freezeMethods:on,toObjectSet:sn,toCamelCase:nn,noop:an,toFiniteNumber:cn,findKey:Ce,global:B,isContextDefined:Ae,ALPHABET:De,generateString:un,isSpecCompliantForm:ln,toJSONObject:fn,isAsyncFn:dn,isThenable:pn,setImmediate:Fe,asap:hn};function w(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}c.inherits(w,Error,{toJSON:function(){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:c.toJSONObject(this.config),code:this.code,status:this.status}}});const _e=w.prototype,je={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{je[e]={value:e}}),Object.defineProperties(w,je),Object.defineProperty(_e,"isAxiosError",{value:!0}),w.from=(e,t,n,r,o,s)=>{const i=Object.create(_e);return c.toFlatObject(e,i,function(d){return d!==Error.prototype},u=>u!=="isAxiosError"),w.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};const mn=null;function ie(e){return c.isPlainObject(e)||c.isArray(e)}function Be(e){return c.endsWith(e,"[]")?e.slice(0,-2):e}function ke(e,t,n){return e?e.concat(t).map(function(o,s){return o=Be(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function yn(e){return c.isArray(e)&&!e.some(ie)}const gn=c.toFlatObject(c,{},null,function(t){return/^is[A-Z]/.test(t)});function W(e,t,n){if(!c.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=c.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,h){return!c.isUndefined(h[b])});const r=n.metaTokens,o=n.visitor||l,s=n.dots,i=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&c.isSpecCompliantForm(t);if(!c.isFunction(o))throw new TypeError("visitor must be a function");function a(p){if(p===null)return"";if(c.isDate(p))return p.toISOString();if(!d&&c.isBlob(p))throw new w("Blob is not supported. Use a Buffer instead.");return c.isArrayBuffer(p)||c.isTypedArray(p)?d&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function l(p,b,h){let R=p;if(p&&!h&&typeof p=="object"){if(c.endsWith(b,"{}"))b=r?b:b.slice(0,-2),p=JSON.stringify(p);else if(c.isArray(p)&&yn(p)||(c.isFileList(p)||c.endsWith(b,"[]"))&&(R=c.toArray(p)))return b=Be(b),R.forEach(function(S,O){!(c.isUndefined(S)||S===null)&&t.append(i===!0?ke([b],O,s):i===null?b:b+"[]",a(S))}),!1}return ie(p)?!0:(t.append(ke(h,b,s),a(p)),!1)}const f=[],m=Object.assign(gn,{defaultVisitor:l,convertValue:a,isVisitable:ie});function y(p,b){if(!c.isUndefined(p)){if(f.indexOf(p)!==-1)throw Error("Circular reference detected in "+b.join("."));f.push(p),c.forEach(p,function(R,g){(!(c.isUndefined(R)||R===null)&&o.call(t,R,c.isString(g)?g.trim():g,b,m))===!0&&y(R,b?b.concat(g):[g])}),f.pop()}}if(!c.isObject(e))throw new TypeError("data must be an object");return y(e),t}function Ue(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function ae(e,t){this._pairs=[],e&&W(e,this,t)}const Me=ae.prototype;Me.append=function(t,n){this._pairs.push([t,n])},Me.toString=function(t){const n=t?function(r){return t.call(this,r,Ue)}:Ue;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function bn(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function qe(e,t,n){if(!t)return e;const r=n&&n.encode||bn,o=n&&n.serialize;let s;if(o?s=o(t,n):s=c.isURLSearchParams(t)?t.toString():new ae(t,n).toString(r),s){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class Ie{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){c.forEach(this.handlers,function(r){r!==null&&t(r)})}}const He={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},wn={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:ae,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},ce=typeof window<"u"&&typeof document<"u",ue=typeof navigator=="object"&&navigator||void 0,En=ce&&(!ue||["ReactNative","NativeScript","NS"].indexOf(ue.product)<0),Sn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Rn=ce&&window.location.href||"http://localhost",A={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ce,hasStandardBrowserEnv:En,hasStandardBrowserWebWorkerEnv:Sn,navigator:ue,origin:Rn},Symbol.toStringTag,{value:"Module"})),...wn};function Tn(e,t){return W(e,new A.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,s){return A.isNode&&c.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function On(e){return c.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Nn(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],t[s]=e[s];return t}function ve(e){function t(n,r,o,s){let i=n[s++];if(i==="__proto__")return!0;const u=Number.isFinite(+i),d=s>=n.length;return i=!i&&c.isArray(o)?o.length:i,d?(c.hasOwnProp(o,i)?o[i]=[o[i],r]:o[i]=r,!u):((!o[i]||!c.isObject(o[i]))&&(o[i]=[]),t(n,r,o[i],s)&&c.isArray(o[i])&&(o[i]=Nn(o[i])),!u)}if(c.isFormData(e)&&c.isFunction(e.entries)){const n={};return c.forEachEntry(e,(r,o)=>{t(On(r),o,n,0)}),n}return null}function Cn(e,t,n){if(c.isString(e))try{return(t||JSON.parse)(e),c.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const v={transitional:He,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=c.isObject(t);if(s&&c.isHTMLForm(t)&&(t=new FormData(t)),c.isFormData(t))return o?JSON.stringify(ve(t)):t;if(c.isArrayBuffer(t)||c.isBuffer(t)||c.isStream(t)||c.isFile(t)||c.isBlob(t)||c.isReadableStream(t))return t;if(c.isArrayBufferView(t))return t.buffer;if(c.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let u;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Tn(t,this.formSerializer).toString();if((u=c.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return W(u?{"files[]":t}:t,d&&new d,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),Cn(t)):t}],transformResponse:[function(t){const n=this.transitional||v.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(c.isResponse(t)||c.isReadableStream(t))return t;if(t&&c.isString(t)&&(r&&!this.responseType||o)){const i=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(u){if(i)throw u.name==="SyntaxError"?w.from(u,w.ERR_BAD_RESPONSE,this,null,this.response):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:A.classes.FormData,Blob:A.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};c.forEach(["delete","get","head","post","put","patch"],e=>{v.headers[e]={}});const An=c.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"]),xn=e=>{const t={};let n,r,o;return e&&e.split(`
`).forEach(function(i){o=i.indexOf(":"),n=i.substring(0,o).trim().toLowerCase(),r=i.substring(o+1).trim(),!(!n||t[n]&&An[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Ve=Symbol("internals");function V(e){return e&&String(e).trim().toLowerCase()}function X(e){return e===!1||e==null?e:c.isArray(e)?e.map(X):String(e)}function Pn(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 Ln=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function le(e,t,n,r,o){if(c.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!c.isString(t)){if(c.isString(r))return t.indexOf(r)!==-1;if(c.isRegExp(r))return r.test(t)}}function Dn(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Fn(e,t){const n=c.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,s,i){return this[r].call(this,t,o,s,i)},configurable:!0})})}class x{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function s(u,d,a){const l=V(d);if(!l)throw new Error("header name must be a non-empty string");const f=c.findKey(o,l);(!f||o[f]===void 0||a===!0||a===void 0&&o[f]!==!1)&&(o[f||d]=X(u))}const i=(u,d)=>c.forEach(u,(a,l)=>s(a,l,d));if(c.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(c.isString(t)&&(t=t.trim())&&!Ln(t))i(xn(t),n);else if(c.isHeaders(t))for(const[u,d]of t.entries())s(d,u,r);else t!=null&&s(n,t,r);return this}get(t,n){if(t=V(t),t){const r=c.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return Pn(o);if(c.isFunction(n))return n.call(this,o,r);if(c.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=V(t),t){const r=c.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||le(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function s(i){if(i=V(i),i){const u=c.findKey(r,i);u&&(!n||le(r,r[u],u,n))&&(delete r[u],o=!0)}}return c.isArray(t)?t.forEach(s):s(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const s=n[r];(!t||le(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const n=this,r={};return c.forEach(this,(o,s)=>{const i=c.findKey(r,s);if(i){n[i]=X(o),delete n[s];return}const u=t?Dn(s):String(s).trim();u!==s&&delete n[s],n[u]=X(o),r[u]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return c.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&c.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(`
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[Ve]=this[Ve]={accessors:{}}).accessors,o=this.prototype;function s(i){const u=V(i);r[u]||(Fn(o,i),r[u]=!0)}return c.isArray(t)?t.forEach(s):s(t),this}}x.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),c.reduceDescriptors(x.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),c.freezeMethods(x);function fe(e,t){const n=this||v,r=t||n,o=x.from(r.headers);let s=r.data;return c.forEach(e,function(u){s=u.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function ze(e){return!!(e&&e.__CANCEL__)}function q(e,t,n){w.call(this,e??"canceled",w.ERR_CANCELED,t,n),this.name="CanceledError"}c.inherits(q,w,{__CANCEL__:!0});function $e(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new w("Request failed with status code "+n.status,[w.ERR_BAD_REQUEST,w.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function _n(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function jn(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,s=0,i;return t=t!==void 0?t:1e3,function(d){const a=Date.now(),l=r[s];i||(i=a),n[o]=d,r[o]=a;let f=s,m=0;for(;f!==o;)m+=n[f++],f=f%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),a-i<t)return;const y=l&&a-l;return y?Math.round(m*1e3/y):void 0}}function Bn(e,t){let n=0,r=1e3/t,o,s;const i=(a,l=Date.now())=>{n=l,o=null,s&&(clearTimeout(s),s=null),e.apply(null,a)};return[(...a)=>{const l=Date.now(),f=l-n;f>=r?i(a,l):(o=a,s||(s=setTimeout(()=>{s=null,i(o)},r-f)))},()=>o&&i(o)]}const K=(e,t,n=3)=>{let r=0;const o=jn(50,250);return Bn(s=>{const i=s.loaded,u=s.lengthComputable?s.total:void 0,d=i-r,a=o(d),l=i<=u;r=i;const f={loaded:i,total:u,progress:u?i/u:void 0,bytes:d,rate:a||void 0,estimated:a&&u&&l?(u-i)/a:void 0,event:s,lengthComputable:u!=null,[t?"download":"upload"]:!0};e(f)},n)},Ge=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Je=e=>(...t)=>c.asap(()=>e(...t)),kn=A.hasStandardBrowserEnv?function(){const t=A.navigator&&/(msie|trident)/i.test(A.navigator.userAgent),n=document.createElement("a");let r;function o(s){let i=s;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(i){const u=c.isString(i)?o(i):i;return u.protocol===r.protocol&&u.host===r.host}}():function(){return function(){return!0}}(),Un=A.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const i=[e+"="+encodeURIComponent(t)];c.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),c.isString(r)&&i.push("path="+r),c.isString(o)&&i.push("domain="+o),s===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Mn(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function qn(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function We(e,t){return e&&!Mn(t)?qn(e,t):t}const Xe=e=>e instanceof x?{...e}:e;function k(e,t){t=t||{};const n={};function r(a,l,f){return c.isPlainObject(a)&&c.isPlainObject(l)?c.merge.call({caseless:f},a,l):c.isPlainObject(l)?c.merge({},l):c.isArray(l)?l.slice():l}function o(a,l,f){if(c.isUndefined(l)){if(!c.isUndefined(a))return r(void 0,a,f)}else return r(a,l,f)}function s(a,l){if(!c.isUndefined(l))return r(void 0,l)}function i(a,l){if(c.isUndefined(l)){if(!c.isUndefined(a))return r(void 0,a)}else return r(void 0,l)}function u(a,l,f){if(f in t)return r(a,l);if(f in e)return r(void 0,a)}const d={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:u,headers:(a,l)=>o(Xe(a),Xe(l),!0)};return c.forEach(Object.keys(Object.assign({},e,t)),function(l){const f=d[l]||o,m=f(e[l],t[l],l);c.isUndefined(m)&&f!==u||(n[l]=m)}),n}const Ke=e=>{const t=k({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:i,auth:u}=t;t.headers=i=x.from(i),t.url=qe(We(t.baseURL,t.url),e.params,e.paramsSerializer),u&&i.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):"")));let d;if(c.isFormData(n)){if(A.hasStandardBrowserEnv||A.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((d=i.getContentType())!==!1){const[a,...l]=d?d.split(";").map(f=>f.trim()).filter(Boolean):[];i.setContentType([a||"multipart/form-data",...l].join("; "))}}if(A.hasStandardBrowserEnv&&(r&&c.isFunction(r)&&(r=r(t)),r||r!==!1&&kn(t.url))){const a=o&&s&&Un.read(s);a&&i.set(o,a)}return t},In=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const o=Ke(e);let s=o.data;const i=x.from(o.headers).normalize();let{responseType:u,onUploadProgress:d,onDownloadProgress:a}=o,l,f,m,y,p;function b(){y&&y(),p&&p(),o.cancelToken&&o.cancelToken.unsubscribe(l),o.signal&&o.signal.removeEventListener("abort",l)}let h=new XMLHttpRequest;h.open(o.method.toUpperCase(),o.url,!0),h.timeout=o.timeout;function R(){if(!h)return;const S=x.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),T={data:!u||u==="text"||u==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:S,config:e,request:h};$e(function(D){n(D),b()},function(D){r(D),b()},T),h=null}"onloadend"in h?h.onloadend=R:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(R)},h.onabort=function(){h&&(r(new w("Request aborted",w.ECONNABORTED,e,h)),h=null)},h.onerror=function(){r(new w("Network Error",w.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let O=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const T=o.transitional||He;o.timeoutErrorMessage&&(O=o.timeoutErrorMessage),r(new w(O,T.clarifyTimeoutError?w.ETIMEDOUT:w.ECONNABORTED,e,h)),h=null},s===void 0&&i.setContentType(null),"setRequestHeader"in h&&c.forEach(i.toJSON(),function(O,T){h.setRequestHeader(T,O)}),c.isUndefined(o.withCredentials)||(h.withCredentials=!!o.withCredentials),u&&u!=="json"&&(h.responseType=o.responseType),a&&([m,p]=K(a,!0),h.addEventListener("progress",m)),d&&h.upload&&([f,y]=K(d),h.upload.addEventListener("progress",f),h.upload.addEventListener("loadend",y)),(o.cancelToken||o.signal)&&(l=S=>{h&&(r(!S||S.type?new q(null,e,h):S),h.abort(),h=null)},o.cancelToken&&o.cancelToken.subscribe(l),o.signal&&(o.signal.aborted?l():o.signal.addEventListener("abort",l)));const g=_n(o.url);if(g&&A.protocols.indexOf(g)===-1){r(new w("Unsupported protocol "+g+":",w.ERR_BAD_REQUEST,e));return}h.send(s||null)})},Hn=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const s=function(a){if(!o){o=!0,u();const l=a instanceof Error?a:this.reason;r.abort(l instanceof w?l:new q(l instanceof Error?l.message:l))}};let i=t&&setTimeout(()=>{i=null,s(new w(`timeout ${t} of ms exceeded`,w.ETIMEDOUT))},t);const u=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(a=>{a.unsubscribe?a.unsubscribe(s):a.removeEventListener("abort",s)}),e=null)};e.forEach(a=>a.addEventListener("abort",s));const{signal:d}=r;return d.unsubscribe=()=>c.asap(u),d}},vn=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},Vn=async function*(e,t){for await(const n of zn(e))yield*vn(n,t)},zn=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()}},Qe=(e,t,n,r)=>{const o=Vn(e,t);let s=0,i,u=d=>{i||(i=!0,r&&r(d))};return new ReadableStream({async pull(d){try{const{done:a,value:l}=await o.next();if(a){u(),d.close();return}let f=l.byteLength;if(n){let m=s+=f;n(m)}d.enqueue(new Uint8Array(l))}catch(a){throw u(a),a}},cancel(d){return u(d),o.return()}},{highWaterMark:2})},Q=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Ze=Q&&typeof ReadableStream=="function",$n=Q&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Ye=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Gn=Ze&&Ye(()=>{let e=!1;const t=new Request(A.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),et=64*1024,de=Ze&&Ye(()=>c.isReadableStream(new Response("").body)),Z={stream:de&&(e=>e.body)};Q&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Z[t]&&(Z[t]=c.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new w(`Response type '${t}' is not supported`,w.ERR_NOT_SUPPORT,r)})})})(new Response);const Jn=async e=>{if(e==null)return 0;if(c.isBlob(e))return e.size;if(c.isSpecCompliantForm(e))return(await new Request(A.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(c.isArrayBufferView(e)||c.isArrayBuffer(e))return e.byteLength;if(c.isURLSearchParams(e)&&(e=e+""),c.isString(e))return(await $n(e)).byteLength},Wn=async(e,t)=>{const n=c.toFiniteNumber(e.getContentLength());return n??Jn(t)},pe={http:mn,xhr:In,fetch:Q&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:s,timeout:i,onDownloadProgress:u,onUploadProgress:d,responseType:a,headers:l,withCredentials:f="same-origin",fetchOptions:m}=Ke(e);a=a?(a+"").toLowerCase():"text";let y=Hn([o,s&&s.toAbortSignal()],i),p;const b=y&&y.unsubscribe&&(()=>{y.unsubscribe()});let h;try{if(d&&Gn&&n!=="get"&&n!=="head"&&(h=await Wn(l,r))!==0){let T=new Request(t,{method:"POST",body:r,duplex:"half"}),F;if(c.isFormData(r)&&(F=T.headers.get("content-type"))&&l.setContentType(F),T.body){const[D,j]=Ge(h,K(Je(d)));r=Qe(T.body,et,D,j)}}c.isString(f)||(f=f?"include":"omit");const R="credentials"in Request.prototype;p=new Request(t,{...m,signal:y,method:n.toUpperCase(),headers:l.normalize().toJSON(),body:r,duplex:"half",credentials:R?f:void 0});let g=await fetch(p);const S=de&&(a==="stream"||a==="response");if(de&&(u||S&&b)){const T={};["status","statusText","headers"].forEach(ut=>{T[ut]=g[ut]});const F=c.toFiniteNumber(g.headers.get("content-length")),[D,j]=u&&Ge(F,K(Je(u),!0))||[];g=new Response(Qe(g.body,et,D,()=>{j&&j(),b&&b()}),T)}a=a||"text";let O=await Z[c.findKey(Z,a)||"text"](g,e);return!S&&b&&b(),await new Promise((T,F)=>{$e(T,F,{data:O,headers:x.from(g.headers),status:g.status,statusText:g.statusText,config:e,request:p})})}catch(R){throw b&&b(),R&&R.name==="TypeError"&&/fetch/i.test(R.message)?Object.assign(new w("Network Error",w.ERR_NETWORK,e,p),{cause:R.cause||R}):w.from(R,R&&R.code,e,p)}})};c.forEach(pe,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const tt=e=>`- ${e}`,Xn=e=>c.isFunction(e)||e===null||e===!1,nt={getAdapter:e=>{e=c.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let s=0;s<t;s++){n=e[s];let i;if(r=n,!Xn(n)&&(r=pe[(i=String(n)).toLowerCase()],r===void 0))throw new w(`Unknown adapter '${i}'`);if(r)break;o[i||"#"+s]=r}if(!r){const s=Object.entries(o).map(([u,d])=>`adapter ${u} `+(d===!1?"is not supported by the environment":"is not available in the build"));let i=t?s.length>1?`since :
`+s.map(tt).join(`
`):" "+tt(s[0]):"as no adapter specified";throw new w("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:pe};function he(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new q(null,e)}function rt(e){return he(e),e.headers=x.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),nt.getAdapter(e.adapter||v.adapter)(e).then(function(r){return he(e),r.data=fe.call(e,e.transformResponse,r),r.headers=x.from(r.headers),r},function(r){return ze(r)||(he(e),r&&r.response&&(r.response.data=fe.call(e,e.transformResponse,r.response),r.response.headers=x.from(r.response.headers))),Promise.reject(r)})}const ot="1.7.7",me={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{me[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const st={};me.transitional=function(t,n,r){function o(s,i){return"[Axios v"+ot+"] Transitional option '"+s+"'"+i+(r?". "+r:"")}return(s,i,u)=>{if(t===!1)throw new w(o(i," has been removed"+(n?" in "+n:"")),w.ERR_DEPRECATED);return n&&!st[i]&&(st[i]=!0,console.warn(o(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,i,u):!0}};function Kn(e,t,n){if(typeof e!="object")throw new w("options must be an object",w.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],i=t[s];if(i){const u=e[s],d=u===void 0||i(u,s,e);if(d!==!0)throw new w("option "+s+" must be "+d,w.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new w("Unknown option "+s,w.ERR_BAD_OPTION)}}const ye={assertOptions:Kn,validators:me},_=ye.validators;class U{constructor(t){this.defaults=t,this.interceptors={request:new Ie,response:new Ie}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o;Error.captureStackTrace?Error.captureStackTrace(o={}):o=new Error;const s=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=`
`+s):r.stack=s}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=k(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&ye.assertOptions(r,{silentJSONParsing:_.transitional(_.boolean),forcedJSONParsing:_.transitional(_.boolean),clarifyTimeoutError:_.transitional(_.boolean)},!1),o!=null&&(c.isFunction(o)?n.paramsSerializer={serialize:o}:ye.assertOptions(o,{encode:_.function,serialize:_.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=s&&c.merge(s.common,s[n.method]);s&&c.forEach(["delete","get","head","post","put","patch","common"],p=>{delete s[p]}),n.headers=x.concat(i,s);const u=[];let d=!0;this.interceptors.request.forEach(function(b){typeof b.runWhen=="function"&&b.runWhen(n)===!1||(d=d&&b.synchronous,u.unshift(b.fulfilled,b.rejected))});const a=[];this.interceptors.response.forEach(function(b){a.push(b.fulfilled,b.rejected)});let l,f=0,m;if(!d){const p=[rt.bind(this),void 0];for(p.unshift.apply(p,u),p.push.apply(p,a),m=p.length,l=Promise.resolve(n);f<m;)l=l.then(p[f++],p[f++]);return l}m=u.length;let y=n;for(f=0;f<m;){const p=u[f++],b=u[f++];try{y=p(y)}catch(h){b.call(this,h);break}}try{l=rt.call(this,y)}catch(p){return Promise.reject(p)}for(f=0,m=a.length;f<m;)l=l.then(a[f++],a[f++]);return l}getUri(t){t=k(this.defaults,t);const n=We(t.baseURL,t.url);return qe(n,t.params,t.paramsSerializer)}}c.forEach(["delete","get","head","options"],function(t){U.prototype[t]=function(n,r){return this.request(k(r||{},{method:t,url:n,data:(r||{}).data}))}}),c.forEach(["post","put","patch"],function(t){function n(r){return function(s,i,u){return this.request(k(u||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}U.prototype[t]=n(),U.prototype[t+"Form"]=n(!0)});class ge{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(o=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](o);r._listeners=null}),this.promise.then=o=>{let s;const i=new Promise(u=>{r.subscribe(u),s=u}).then(o);return i.cancel=function(){r.unsubscribe(s)},i},t(function(s,i,u){r.reason||(r.reason=new q(s,i,u),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 ge(function(o){t=o}),cancel:t}}}function Qn(e){return function(n){return e.apply(null,n)}}function Zn(e){return c.isObject(e)&&e.isAxiosError===!0}const be={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};Object.entries(be).forEach(([e,t])=>{be[t]=e});function it(e){const t=new U(e),n=Te(U.prototype.request,t);return c.extend(n,U.prototype,t,{allOwnKeys:!0}),c.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return it(k(e,o))},n}const N=it(v);N.Axios=U,N.CanceledError=q,N.CancelToken=ge,N.isCancel=ze,N.VERSION=ot,N.toFormData=W,N.AxiosError=w,N.Cancel=N.CanceledError,N.all=function(t){return Promise.all(t)},N.spread=Qn,N.isAxiosError=Zn,N.mergeConfig=k,N.AxiosHeaders=x,N.formToJSON=e=>ve(c.isHTMLForm(e)?new FormData(e):e),N.getAdapter=nt.getAdapter,N.HttpStatusCode=be,N.default=N;var at=(e=>(e.KeyApp="1",e.Module="2",e.MenuGroup="3",e.Menu="4",e))(at||{});function Yn(e){const t=E.computed(()=>{const d=new Map;return e.value.forEach(a=>{d.set(a.id,a)}),d}),n=E.computed(()=>{const d=new Map;return e.value.forEach(a=>{const{parentId:l}=a;l&&(d.has(l)||d.set(l,[]),d.get(l).push(a))}),d}),r=E.computed(()=>e.value.filter(d=>{const{parentId:a}=d;return!a||!t.value.get(a)})),o=E.ref([]);function s(){const d=[],a=[];for([...r.value].reverse().forEach(l=>a.push(l.id));a.length>0;){const l=a.pop(),f=t.value.get(l);d.push(f),[...n.value.get(l)||[]].reverse().forEach(y=>{a.push(y.id)})}return d}E.watch(e,()=>{o.value=s()});function i(d,a){const l=[],f=[d];for(;f.length>0;){const m=f.shift();if(!m)continue;const y=n.value.get(m.id)||[];for(const p of y)a(p)&&l.push(p),f.push(p)}return l}function u(d){return n.value.get(d==null?void 0:d.id)||[]}return{orderedTreeNodes:o,getLeafDescendants:i,getChildNodes:u}}function er(e,t){const n=E.ref([]),r=new Set,o=Yn(n),{orderedTreeNodes:s}=o,i=E.computed(()=>s.value.filter(a));function u(g){return r.has(g)}function d(g){const S=g;return(S==null?void 0:S.funcType)===at.Menu}function a(g){return!d(g)}function l(g){g&&(g.layer=Number(g.layer)-1,g.collapse=typeof g.collapse=="boolean"?g.collapse:!0)}function f(g){return typeof e.fetchNodeApi=="function"?e.fetchNodeApi(g):!g&&typeof e.fetchNodeApi=="string"?e.fetchNodeApi:""}async function m(g){const S=f(g);if(!S)return Promise.resolve([]);const O={headers:{"Content-Type":"application/json"}},T=pt.FLoadingService.show({target:t.value}),D=(await N.get(S,O).then(j=>(T.value.close(),j)).catch(j=>(console.error(j),T.value.close(),{data:[]}))).data||[];return D.forEach(l),D}function y(){n.value.forEach(g=>{const T=!!o.getChildNodes(g).find(a);g.hasChildren=T}),n.value=[...n.value]}function p(g){!g||!g.length||(n.value.push(...g),y())}function b(g){const S=(g==null?void 0:g.id)||"";u(S)||m(g).then(O=>{u(S)||(r.add(S),p(O))})}function h(g){return o.getLeafDescendants(g,d)}function R(){n.value=[],r.clear()}return{treeData:i,loadNodesByLevel:b,getLeafDescendants:h,clearCache:R}}function tr(e,t){const n=E.ref([]);function r(i){}function o(i){return[]}function s(){}return{treeData:n,loadNodesByLevel:r,getLeafDescendants:o,clearCache:s}}function nr(e,t){return ct(er(e,t))}function rr(e,t){return ct(tr())}function ct(e){const{treeData:t,loadNodesByLevel:n,getLeafDescendants:r}=e,o=E.ref([]),s=E.ref();function i(y){const p=y==null?void 0:y[0];if(!p)return;const b=r(p);o.value=[...b]}function u(y){const p=y==null?void 0:y[0];s.value=p}function d(){s.value=void 0}function a(y){var p;return(p=y==null?void 0:y.row)==null?void 0:p.raw}function l(y){const p=a(y);n(p)}function f(){s.value=void 0,o.value=[],e.clearCache()}function m(){f(),n()}return{treeData:t,gridData:o,selectedData:s,onNavTreeSelectionChange:i,onNavTreeExpandNode:l,onDataGridSelectionChange:u,onDataGridUnSelectItem:d,initialize:m,clearCache:f}}function or(e,t,n){const r=E.inject(ht.F_NOTIFY_SERVICE_TOKEN,null),o=e.targetType==="app"?"选择应用":"选择功能菜单",{selectedData:s,clearCache:i}=n;function u(f,m){t.emit("change",f,f,m),t.emit("update:modelValue",f)}function d(){if(!s.value)return r==null||r.warning({message:"请选择数据!",position:"top-center"}),!1;const f=s.value.id,m=s.value;return u(f,m),!0}function a(){u("")}return{modalConfigs:E.reactive({title:o,width:800,height:550,fitContent:!1,showHeader:!0,showCloseButton:!0,showMaxButton:!1,resizeable:!1,draggable:!0,closedCallback:()=>{i()},buttons:[{class:"btn btn-secondary",text:"取消",handle:()=>!0},{class:"btn btn-primary",text:"确定",handle:()=>d()}]}),changeValue:u,onClear:a}}const Y=E.defineComponent({name:"FMenuLookup",props:ne,emits:["change","update:modelValue"],setup(e,t){const n=E.ref(),r=e.targetType==="app"?rr():nr(e,n),{modalConfigs:o,changeValue:s,onClear:i}=or(e,t,r);return()=>E.createVNode(lt.FButtonEdit,{modelValue:e.modelValue,enableClear:!0,buttonBehavior:"Modal",modalOptions:o,onClear:i,"onUpdate:modelValue":s},{default:()=>[E.createVNode("div",{ref:n,class:"fv-menu-lookup-container"},[E.createVNode(xt,{targetType:e.targetType,useTreeGridCoordinatorComposition:r},null)])]})}});Y.register=(e,t,n,r)=>{e["menu-lookup"]=Y,t["menu-lookup"]=Se};const sr=mt.withInstall(Y);C.FMenuLookup=Y,C.default=sr,C.menuLookupProps=ne,C.propsResolver=Se,Object.defineProperties(C,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});