kouxiangtang 0.0.48 → 0.0.49

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.
Files changed (48) hide show
  1. package/dist/{AttachmentUploader-BgT8Dsg4.js → AttachmentUploader-DCyshkG0.js} +2 -2
  2. package/dist/{AttachmentUploader-BgT8Dsg4.js.map → AttachmentUploader-DCyshkG0.js.map} +1 -1
  3. package/dist/{ImageUploader-DZKZqGTc.js → ImageUploader-B1_mID5R.js} +2 -2
  4. package/dist/{ImageUploader-DZKZqGTc.js.map → ImageUploader-B1_mID5R.js.map} +1 -1
  5. package/dist/{ImagesUploader-CycFcpN3.js → ImagesUploader-D-XPUBP2.js} +2 -2
  6. package/dist/{ImagesUploader-CycFcpN3.js.map → ImagesUploader-D-XPUBP2.js.map} +1 -1
  7. package/dist/{RichTextEditor-DNrSqtN4.js → RichTextEditor-B_0MIOKx.js} +2 -2
  8. package/dist/{RichTextEditor-DNrSqtN4.js.map → RichTextEditor-B_0MIOKx.js.map} +1 -1
  9. package/dist/{config-BM1AfMda.js → config-B7lceYyH.js} +2 -2
  10. package/dist/{config-BM1AfMda.js.map → config-B7lceYyH.js.map} +1 -1
  11. package/dist/{config-9J2mRcDS.js → config-BCAUAyF7.js} +2 -2
  12. package/dist/{config-9J2mRcDS.js.map → config-BCAUAyF7.js.map} +1 -1
  13. package/dist/{config-Cp3bJwQP.js → config-BLvYyM3T.js} +12 -12
  14. package/dist/config-BLvYyM3T.js.map +1 -0
  15. package/dist/{config-DJoFgNWX.js → config-BRxoZQ52.js} +3 -3
  16. package/dist/{config-DJoFgNWX.js.map → config-BRxoZQ52.js.map} +1 -1
  17. package/dist/{config-BbUXnk8b.js → config-BW9jvuW5.js} +3 -3
  18. package/dist/{config-BbUXnk8b.js.map → config-BW9jvuW5.js.map} +1 -1
  19. package/dist/{config-CaKvcJqE.js → config-B_RLj9Hv.js} +2 -2
  20. package/dist/{config-CaKvcJqE.js.map → config-B_RLj9Hv.js.map} +1 -1
  21. package/dist/{config-CghXUzrf.js → config-BbKfNDqe.js} +2 -2
  22. package/dist/{config-CghXUzrf.js.map → config-BbKfNDqe.js.map} +1 -1
  23. package/dist/{config-zXdfRYQL.js → config-C5JzH89W.js} +2 -2
  24. package/dist/{config-zXdfRYQL.js.map → config-C5JzH89W.js.map} +1 -1
  25. package/dist/{config-DrlFH0Qw.js → config-CAot7p98.js} +2 -2
  26. package/dist/{config-DrlFH0Qw.js.map → config-CAot7p98.js.map} +1 -1
  27. package/dist/{config-m_XywENd.js → config-CNtiXWZ8.js} +2 -2
  28. package/dist/{config-m_XywENd.js.map → config-CNtiXWZ8.js.map} +1 -1
  29. package/dist/{config-Dn3ZFMpR.js → config-CRAIqQDi.js} +3 -3
  30. package/dist/{config-Dn3ZFMpR.js.map → config-CRAIqQDi.js.map} +1 -1
  31. package/dist/{config-DywDspjn.js → config-D43m9_jf.js} +2 -2
  32. package/dist/{config-DywDspjn.js.map → config-D43m9_jf.js.map} +1 -1
  33. package/dist/{config-yhPY0Ijd.js → config-DW9zXh7I.js} +2 -2
  34. package/dist/{config-yhPY0Ijd.js.map → config-DW9zXh7I.js.map} +1 -1
  35. package/dist/{config-DF_wjEZo.js → config-D_6sEq9t.js} +2 -2
  36. package/dist/{config-DF_wjEZo.js.map → config-D_6sEq9t.js.map} +1 -1
  37. package/dist/{config-BXGVvjpB.js → config-Dyr3ggPP.js} +2 -2
  38. package/dist/{config-BXGVvjpB.js.map → config-Dyr3ggPP.js.map} +1 -1
  39. package/dist/{config-I2OcQXDS.js → config-JvrjLObh.js} +2 -2
  40. package/dist/{config-I2OcQXDS.js.map → config-JvrjLObh.js.map} +1 -1
  41. package/dist/{index-DLMQG1Ux.js → index-VhXXlvT7.js} +45 -45
  42. package/dist/{index-DLMQG1Ux.js.map → index-VhXXlvT7.js.map} +1 -1
  43. package/dist/kouxiangtang.js +1 -1
  44. package/dist/kouxiangtang.umd.cjs +7 -7
  45. package/dist/kouxiangtang.umd.cjs.map +1 -1
  46. package/dist/style.css +1 -1
  47. package/package.json +1 -1
  48. package/dist/config-Cp3bJwQP.js.map +0 -1
@@ -1,9 +1,9 @@
1
- (function(q,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("element-plus"),require("vue-router"),require("pinia"),require("quill"),require("quill-image-uploader")):typeof define=="function"&&define.amd?define(["exports","vue","element-plus","vue-router","pinia","quill","quill-image-uploader"],e):(q=typeof globalThis<"u"?globalThis:q||self,e(q.kouxiangtang={},q.Vue,q.ElementPlus,q.VueRouter,q.Pinia,q.Quill,q.QuillImageUploader))})(this,function(q,e,k,G,Ve,cn,Ka){"use strict";function Ya(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const n in r)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>r[n]})}}return t.default=r,Object.freeze(t)}const nr=Ya(cn);function Bo(r,t){return function(){return r.apply(t,arguments)}}const{toString:va}=Object.prototype,{getPrototypeOf:rr}=Object,dn=(r=>t=>{const n=va.call(t);return r[n]||(r[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Oe=r=>(r=r.toLowerCase(),t=>dn(t)===r),un=r=>t=>typeof t===r,{isArray:ht}=Array,Nt=un("undefined");function Xa(r){return r!==null&&!Nt(r)&&r.constructor!==null&&!Nt(r.constructor)&&me(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const So=Oe("ArrayBuffer");function Za(r){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(r):t=r&&r.buffer&&So(r.buffer),t}const es=un("string"),me=un("function"),Co=un("number"),fn=r=>r!==null&&typeof r=="object",ts=r=>r===!0||r===!1,pn=r=>{if(dn(r)!=="object")return!1;const t=rr(r);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in r)&&!(Symbol.iterator in r)},ns=Oe("Date"),rs=Oe("File"),os=Oe("Blob"),as=Oe("FileList"),ss=r=>fn(r)&&me(r.pipe),is=r=>{let t;return r&&(typeof FormData=="function"&&r instanceof FormData||me(r.append)&&((t=dn(r))==="formdata"||t==="object"&&me(r.toString)&&r.toString()==="[object FormData]"))},ls=Oe("URLSearchParams"),cs=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function At(r,t,{allOwnKeys:n=!1}={}){if(r===null||typeof r>"u")return;let o,s;if(typeof r!="object"&&(r=[r]),ht(r))for(o=0,s=r.length;o<s;o++)t.call(null,r[o],o,r);else{const a=n?Object.getOwnPropertyNames(r):Object.keys(r),i=a.length;let c;for(o=0;o<i;o++)c=a[o],t.call(null,r[c],c,r)}}function $o(r,t){t=t.toLowerCase();const n=Object.keys(r);let o=n.length,s;for(;o-- >0;)if(s=n[o],t===s.toLowerCase())return s;return null}const Vo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Oo=r=>!Nt(r)&&r!==Vo;function or(){const{caseless:r}=Oo(this)&&this||{},t={},n=(o,s)=>{const a=r&&$o(t,s)||s;pn(t[a])&&pn(o)?t[a]=or(t[a],o):pn(o)?t[a]=or({},o):ht(o)?t[a]=o.slice():t[a]=o};for(let o=0,s=arguments.length;o<s;o++)arguments[o]&&At(arguments[o],n);return t}const ds=(r,t,n,{allOwnKeys:o}={})=>(At(t,(s,a)=>{n&&me(s)?r[a]=Bo(s,n):r[a]=s},{allOwnKeys:o}),r),us=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),fs=(r,t,n,o)=>{r.prototype=Object.create(t.prototype,o),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:t.prototype}),n&&Object.assign(r.prototype,n)},ps=(r,t,n,o)=>{let s,a,i;const c={};if(t=t||{},r==null)return t;do{for(s=Object.getOwnPropertyNames(r),a=s.length;a-- >0;)i=s[a],(!o||o(i,r,t))&&!c[i]&&(t[i]=r[i],c[i]=!0);r=n!==!1&&rr(r)}while(r&&(!n||n(r,t))&&r!==Object.prototype);return t},hs=(r,t,n)=>{r=String(r),(n===void 0||n>r.length)&&(n=r.length),n-=t.length;const o=r.indexOf(t,n);return o!==-1&&o===n},ms=r=>{if(!r)return null;if(ht(r))return r;let t=r.length;if(!Co(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=r[t];return n},gs=(r=>t=>r&&t instanceof r)(typeof Uint8Array<"u"&&rr(Uint8Array)),_s=(r,t)=>{const o=(r&&r[Symbol.iterator]).call(r);let s;for(;(s=o.next())&&!s.done;){const a=s.value;t.call(r,a[0],a[1])}},ys=(r,t)=>{let n;const o=[];for(;(n=r.exec(t))!==null;)o.push(n);return o},bs=Oe("HTMLFormElement"),ws=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,o,s){return o.toUpperCase()+s}),To=(({hasOwnProperty:r})=>(t,n)=>r.call(t,n))(Object.prototype),ks=Oe("RegExp"),No=(r,t)=>{const n=Object.getOwnPropertyDescriptors(r),o={};At(n,(s,a)=>{let i;(i=t(s,a,r))!==!1&&(o[a]=i||s)}),Object.defineProperties(r,o)},Es=r=>{No(r,(t,n)=>{if(me(r)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const o=r[n];if(me(o)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},xs=(r,t)=>{const n={},o=s=>{s.forEach(a=>{n[a]=!0})};return ht(r)?o(r):o(String(r).split(t)),n},Bs=()=>{},Ss=(r,t)=>(r=+r,Number.isFinite(r)?r:t),ar="abcdefghijklmnopqrstuvwxyz",Ao="0123456789",Do={DIGIT:Ao,ALPHA:ar,ALPHA_DIGIT:ar+ar.toUpperCase()+Ao},Cs=(r=16,t=Do.ALPHA_DIGIT)=>{let n="";const{length:o}=t;for(;r--;)n+=t[Math.random()*o|0];return n};function $s(r){return!!(r&&me(r.append)&&r[Symbol.toStringTag]==="FormData"&&r[Symbol.iterator])}const Vs=r=>{const t=new Array(10),n=(o,s)=>{if(fn(o)){if(t.indexOf(o)>=0)return;if(!("toJSON"in o)){t[s]=o;const a=ht(o)?[]:{};return At(o,(i,c)=>{const d=n(i,s+1);!Nt(d)&&(a[c]=d)}),t[s]=void 0,a}}return o};return n(r,0)},Os=Oe("AsyncFunction"),$={isArray:ht,isArrayBuffer:So,isBuffer:Xa,isFormData:is,isArrayBufferView:Za,isString:es,isNumber:Co,isBoolean:ts,isObject:fn,isPlainObject:pn,isUndefined:Nt,isDate:ns,isFile:rs,isBlob:os,isRegExp:ks,isFunction:me,isStream:ss,isURLSearchParams:ls,isTypedArray:gs,isFileList:as,forEach:At,merge:or,extend:ds,trim:cs,stripBOM:us,inherits:fs,toFlatObject:ps,kindOf:dn,kindOfTest:Oe,endsWith:hs,toArray:ms,forEachEntry:_s,matchAll:ys,isHTMLForm:bs,hasOwnProperty:To,hasOwnProp:To,reduceDescriptors:No,freezeMethods:Es,toObjectSet:xs,toCamelCase:ws,noop:Bs,toFiniteNumber:Ss,findKey:$o,global:Vo,isContextDefined:Oo,ALPHABET:Do,generateString:Cs,isSpecCompliantForm:$s,toJSONObject:Vs,isAsyncFn:Os,isThenable:r=>r&&(fn(r)||me(r))&&me(r.then)&&me(r.catch)};function U(r,t,n,o,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),o&&(this.request=o),s&&(this.response=s)}$.inherits(U,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:$.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Fo=U.prototype,jo={};["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(r=>{jo[r]={value:r}}),Object.defineProperties(U,jo),Object.defineProperty(Fo,"isAxiosError",{value:!0}),U.from=(r,t,n,o,s,a)=>{const i=Object.create(Fo);return $.toFlatObject(r,i,function(d){return d!==Error.prototype},c=>c!=="isAxiosError"),U.call(i,r.message,t,n,o,s),i.cause=r,i.name=r.name,a&&Object.assign(i,a),i};const Ts=null;function sr(r){return $.isPlainObject(r)||$.isArray(r)}function Ro(r){return $.endsWith(r,"[]")?r.slice(0,-2):r}function Io(r,t,n){return r?r.concat(t).map(function(s,a){return s=Ro(s),!n&&a?"["+s+"]":s}).join(n?".":""):t}function Ns(r){return $.isArray(r)&&!r.some(sr)}const As=$.toFlatObject($,{},null,function(t){return/^is[A-Z]/.test(t)});function hn(r,t,n){if(!$.isObject(r))throw new TypeError("target must be an object");t=t||new FormData,n=$.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,b){return!$.isUndefined(b[h])});const o=n.metaTokens,s=n.visitor||p,a=n.dots,i=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&$.isSpecCompliantForm(t);if(!$.isFunction(s))throw new TypeError("visitor must be a function");function f(y){if(y===null)return"";if($.isDate(y))return y.toISOString();if(!d&&$.isBlob(y))throw new U("Blob is not supported. Use a Buffer instead.");return $.isArrayBuffer(y)||$.isTypedArray(y)?d&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function p(y,h,b){let _=y;if(y&&!b&&typeof y=="object"){if($.endsWith(h,"{}"))h=o?h:h.slice(0,-2),y=JSON.stringify(y);else if($.isArray(y)&&Ns(y)||($.isFileList(y)||$.endsWith(h,"[]"))&&(_=$.toArray(y)))return h=Ro(h),_.forEach(function(x,C){!($.isUndefined(x)||x===null)&&t.append(i===!0?Io([h],C,a):i===null?h:h+"[]",f(x))}),!1}return sr(y)?!0:(t.append(Io(b,h,a),f(y)),!1)}const m=[],E=Object.assign(As,{defaultVisitor:p,convertValue:f,isVisitable:sr});function B(y,h){if(!$.isUndefined(y)){if(m.indexOf(y)!==-1)throw Error("Circular reference detected in "+h.join("."));m.push(y),$.forEach(y,function(_,w){(!($.isUndefined(_)||_===null)&&s.call(t,_,$.isString(w)?w.trim():w,h,E))===!0&&B(_,h?h.concat(w):[w])}),m.pop()}}if(!$.isObject(r))throw new TypeError("data must be an object");return B(r),t}function Lo(r){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(o){return t[o]})}function ir(r,t){this._pairs=[],r&&hn(r,this,t)}const Mo=ir.prototype;Mo.append=function(t,n){this._pairs.push([t,n])},Mo.toString=function(t){const n=t?function(o){return t.call(this,o,Lo)}:Lo;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Ds(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Uo(r,t,n){if(!t)return r;const o=n&&n.encode||Ds,s=n&&n.serialize;let a;if(s?a=s(t,n):a=$.isURLSearchParams(t)?t.toString():new ir(t,n).toString(o),a){const i=r.indexOf("#");i!==-1&&(r=r.slice(0,i)),r+=(r.indexOf("?")===-1?"?":"&")+a}return r}class zo{constructor(){this.handlers=[]}use(t,n,o){return this.handlers.push({fulfilled:t,rejected:n,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){$.forEach(this.handlers,function(o){o!==null&&t(o)})}}const Ho={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Fs={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:ir,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},qo=typeof window<"u"&&typeof document<"u",js=(r=>qo&&["ReactNative","NativeScript","NS"].indexOf(r)<0)(typeof navigator<"u"&&navigator.product),Rs=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Te={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:qo,hasStandardBrowserEnv:js,hasStandardBrowserWebWorkerEnv:Rs},Symbol.toStringTag,{value:"Module"})),...Fs};function Is(r,t){return hn(r,new Te.classes.URLSearchParams,Object.assign({visitor:function(n,o,s,a){return Te.isNode&&$.isBuffer(n)?(this.append(o,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function Ls(r){return $.matchAll(/\w+|\[(\w*)]/g,r).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Ms(r){const t={},n=Object.keys(r);let o;const s=n.length;let a;for(o=0;o<s;o++)a=n[o],t[a]=r[a];return t}function Po(r){function t(n,o,s,a){let i=n[a++];if(i==="__proto__")return!0;const c=Number.isFinite(+i),d=a>=n.length;return i=!i&&$.isArray(s)?s.length:i,d?($.hasOwnProp(s,i)?s[i]=[s[i],o]:s[i]=o,!c):((!s[i]||!$.isObject(s[i]))&&(s[i]=[]),t(n,o,s[i],a)&&$.isArray(s[i])&&(s[i]=Ms(s[i])),!c)}if($.isFormData(r)&&$.isFunction(r.entries)){const n={};return $.forEachEntry(r,(o,s)=>{t(Ls(o),s,n,0)}),n}return null}function Us(r,t,n){if($.isString(r))try{return(t||JSON.parse)(r),$.trim(r)}catch(o){if(o.name!=="SyntaxError")throw o}return(n||JSON.stringify)(r)}const Dt={transitional:Ho,adapter:["xhr","http"],transformRequest:[function(t,n){const o=n.getContentType()||"",s=o.indexOf("application/json")>-1,a=$.isObject(t);if(a&&$.isHTMLForm(t)&&(t=new FormData(t)),$.isFormData(t))return s?JSON.stringify(Po(t)):t;if($.isArrayBuffer(t)||$.isBuffer(t)||$.isStream(t)||$.isFile(t)||$.isBlob(t))return t;if($.isArrayBufferView(t))return t.buffer;if($.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(a){if(o.indexOf("application/x-www-form-urlencoded")>-1)return Is(t,this.formSerializer).toString();if((c=$.isFileList(t))||o.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return hn(c?{"files[]":t}:t,d&&new d,this.formSerializer)}}return a||s?(n.setContentType("application/json",!1),Us(t)):t}],transformResponse:[function(t){const n=this.transitional||Dt.transitional,o=n&&n.forcedJSONParsing,s=this.responseType==="json";if(t&&$.isString(t)&&(o&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(c){if(i)throw c.name==="SyntaxError"?U.from(c,U.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:Te.classes.FormData,Blob:Te.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};$.forEach(["delete","get","head","post","put","patch"],r=>{Dt.headers[r]={}});const zs=$.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"]),Hs=r=>{const t={};let n,o,s;return r&&r.split(`
1
+ (function(q,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("element-plus"),require("vue-router"),require("pinia"),require("quill"),require("quill-image-uploader")):typeof define=="function"&&define.amd?define(["exports","vue","element-plus","vue-router","pinia","quill","quill-image-uploader"],e):(q=typeof globalThis<"u"?globalThis:q||self,e(q.kouxiangtang={},q.Vue,q.ElementPlus,q.VueRouter,q.Pinia,q.Quill,q.QuillImageUploader))})(this,function(q,e,k,G,Ve,cn,Ja){"use strict";function Ka(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const n in r)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>r[n]})}}return t.default=r,Object.freeze(t)}const nr=Ka(cn);function Bo(r,t){return function(){return r.apply(t,arguments)}}const{toString:Ya}=Object.prototype,{getPrototypeOf:rr}=Object,dn=(r=>t=>{const n=Ya.call(t);return r[n]||(r[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Oe=r=>(r=r.toLowerCase(),t=>dn(t)===r),un=r=>t=>typeof t===r,{isArray:ht}=Array,Nt=un("undefined");function Xa(r){return r!==null&&!Nt(r)&&r.constructor!==null&&!Nt(r.constructor)&&me(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const So=Oe("ArrayBuffer");function Za(r){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(r):t=r&&r.buffer&&So(r.buffer),t}const es=un("string"),me=un("function"),Co=un("number"),fn=r=>r!==null&&typeof r=="object",ts=r=>r===!0||r===!1,pn=r=>{if(dn(r)!=="object")return!1;const t=rr(r);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in r)&&!(Symbol.iterator in r)},ns=Oe("Date"),rs=Oe("File"),os=Oe("Blob"),as=Oe("FileList"),ss=r=>fn(r)&&me(r.pipe),is=r=>{let t;return r&&(typeof FormData=="function"&&r instanceof FormData||me(r.append)&&((t=dn(r))==="formdata"||t==="object"&&me(r.toString)&&r.toString()==="[object FormData]"))},ls=Oe("URLSearchParams"),cs=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function At(r,t,{allOwnKeys:n=!1}={}){if(r===null||typeof r>"u")return;let o,s;if(typeof r!="object"&&(r=[r]),ht(r))for(o=0,s=r.length;o<s;o++)t.call(null,r[o],o,r);else{const a=n?Object.getOwnPropertyNames(r):Object.keys(r),i=a.length;let c;for(o=0;o<i;o++)c=a[o],t.call(null,r[c],c,r)}}function $o(r,t){t=t.toLowerCase();const n=Object.keys(r);let o=n.length,s;for(;o-- >0;)if(s=n[o],t===s.toLowerCase())return s;return null}const Vo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Oo=r=>!Nt(r)&&r!==Vo;function or(){const{caseless:r}=Oo(this)&&this||{},t={},n=(o,s)=>{const a=r&&$o(t,s)||s;pn(t[a])&&pn(o)?t[a]=or(t[a],o):pn(o)?t[a]=or({},o):ht(o)?t[a]=o.slice():t[a]=o};for(let o=0,s=arguments.length;o<s;o++)arguments[o]&&At(arguments[o],n);return t}const ds=(r,t,n,{allOwnKeys:o}={})=>(At(t,(s,a)=>{n&&me(s)?r[a]=Bo(s,n):r[a]=s},{allOwnKeys:o}),r),us=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),fs=(r,t,n,o)=>{r.prototype=Object.create(t.prototype,o),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:t.prototype}),n&&Object.assign(r.prototype,n)},ps=(r,t,n,o)=>{let s,a,i;const c={};if(t=t||{},r==null)return t;do{for(s=Object.getOwnPropertyNames(r),a=s.length;a-- >0;)i=s[a],(!o||o(i,r,t))&&!c[i]&&(t[i]=r[i],c[i]=!0);r=n!==!1&&rr(r)}while(r&&(!n||n(r,t))&&r!==Object.prototype);return t},hs=(r,t,n)=>{r=String(r),(n===void 0||n>r.length)&&(n=r.length),n-=t.length;const o=r.indexOf(t,n);return o!==-1&&o===n},ms=r=>{if(!r)return null;if(ht(r))return r;let t=r.length;if(!Co(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=r[t];return n},gs=(r=>t=>r&&t instanceof r)(typeof Uint8Array<"u"&&rr(Uint8Array)),_s=(r,t)=>{const o=(r&&r[Symbol.iterator]).call(r);let s;for(;(s=o.next())&&!s.done;){const a=s.value;t.call(r,a[0],a[1])}},ys=(r,t)=>{let n;const o=[];for(;(n=r.exec(t))!==null;)o.push(n);return o},bs=Oe("HTMLFormElement"),ws=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,o,s){return o.toUpperCase()+s}),To=(({hasOwnProperty:r})=>(t,n)=>r.call(t,n))(Object.prototype),ks=Oe("RegExp"),No=(r,t)=>{const n=Object.getOwnPropertyDescriptors(r),o={};At(n,(s,a)=>{let i;(i=t(s,a,r))!==!1&&(o[a]=i||s)}),Object.defineProperties(r,o)},Es=r=>{No(r,(t,n)=>{if(me(r)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const o=r[n];if(me(o)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},xs=(r,t)=>{const n={},o=s=>{s.forEach(a=>{n[a]=!0})};return ht(r)?o(r):o(String(r).split(t)),n},Bs=()=>{},Ss=(r,t)=>(r=+r,Number.isFinite(r)?r:t),ar="abcdefghijklmnopqrstuvwxyz",Ao="0123456789",Do={DIGIT:Ao,ALPHA:ar,ALPHA_DIGIT:ar+ar.toUpperCase()+Ao},Cs=(r=16,t=Do.ALPHA_DIGIT)=>{let n="";const{length:o}=t;for(;r--;)n+=t[Math.random()*o|0];return n};function $s(r){return!!(r&&me(r.append)&&r[Symbol.toStringTag]==="FormData"&&r[Symbol.iterator])}const Vs=r=>{const t=new Array(10),n=(o,s)=>{if(fn(o)){if(t.indexOf(o)>=0)return;if(!("toJSON"in o)){t[s]=o;const a=ht(o)?[]:{};return At(o,(i,c)=>{const d=n(i,s+1);!Nt(d)&&(a[c]=d)}),t[s]=void 0,a}}return o};return n(r,0)},Os=Oe("AsyncFunction"),$={isArray:ht,isArrayBuffer:So,isBuffer:Xa,isFormData:is,isArrayBufferView:Za,isString:es,isNumber:Co,isBoolean:ts,isObject:fn,isPlainObject:pn,isUndefined:Nt,isDate:ns,isFile:rs,isBlob:os,isRegExp:ks,isFunction:me,isStream:ss,isURLSearchParams:ls,isTypedArray:gs,isFileList:as,forEach:At,merge:or,extend:ds,trim:cs,stripBOM:us,inherits:fs,toFlatObject:ps,kindOf:dn,kindOfTest:Oe,endsWith:hs,toArray:ms,forEachEntry:_s,matchAll:ys,isHTMLForm:bs,hasOwnProperty:To,hasOwnProp:To,reduceDescriptors:No,freezeMethods:Es,toObjectSet:xs,toCamelCase:ws,noop:Bs,toFiniteNumber:Ss,findKey:$o,global:Vo,isContextDefined:Oo,ALPHABET:Do,generateString:Cs,isSpecCompliantForm:$s,toJSONObject:Vs,isAsyncFn:Os,isThenable:r=>r&&(fn(r)||me(r))&&me(r.then)&&me(r.catch)};function U(r,t,n,o,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),o&&(this.request=o),s&&(this.response=s)}$.inherits(U,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:$.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Fo=U.prototype,jo={};["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(r=>{jo[r]={value:r}}),Object.defineProperties(U,jo),Object.defineProperty(Fo,"isAxiosError",{value:!0}),U.from=(r,t,n,o,s,a)=>{const i=Object.create(Fo);return $.toFlatObject(r,i,function(d){return d!==Error.prototype},c=>c!=="isAxiosError"),U.call(i,r.message,t,n,o,s),i.cause=r,i.name=r.name,a&&Object.assign(i,a),i};const Ts=null;function sr(r){return $.isPlainObject(r)||$.isArray(r)}function Ro(r){return $.endsWith(r,"[]")?r.slice(0,-2):r}function Io(r,t,n){return r?r.concat(t).map(function(s,a){return s=Ro(s),!n&&a?"["+s+"]":s}).join(n?".":""):t}function Ns(r){return $.isArray(r)&&!r.some(sr)}const As=$.toFlatObject($,{},null,function(t){return/^is[A-Z]/.test(t)});function hn(r,t,n){if(!$.isObject(r))throw new TypeError("target must be an object");t=t||new FormData,n=$.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,b){return!$.isUndefined(b[h])});const o=n.metaTokens,s=n.visitor||p,a=n.dots,i=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&$.isSpecCompliantForm(t);if(!$.isFunction(s))throw new TypeError("visitor must be a function");function f(y){if(y===null)return"";if($.isDate(y))return y.toISOString();if(!d&&$.isBlob(y))throw new U("Blob is not supported. Use a Buffer instead.");return $.isArrayBuffer(y)||$.isTypedArray(y)?d&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function p(y,h,b){let _=y;if(y&&!b&&typeof y=="object"){if($.endsWith(h,"{}"))h=o?h:h.slice(0,-2),y=JSON.stringify(y);else if($.isArray(y)&&Ns(y)||($.isFileList(y)||$.endsWith(h,"[]"))&&(_=$.toArray(y)))return h=Ro(h),_.forEach(function(x,C){!($.isUndefined(x)||x===null)&&t.append(i===!0?Io([h],C,a):i===null?h:h+"[]",f(x))}),!1}return sr(y)?!0:(t.append(Io(b,h,a),f(y)),!1)}const m=[],E=Object.assign(As,{defaultVisitor:p,convertValue:f,isVisitable:sr});function B(y,h){if(!$.isUndefined(y)){if(m.indexOf(y)!==-1)throw Error("Circular reference detected in "+h.join("."));m.push(y),$.forEach(y,function(_,w){(!($.isUndefined(_)||_===null)&&s.call(t,_,$.isString(w)?w.trim():w,h,E))===!0&&B(_,h?h.concat(w):[w])}),m.pop()}}if(!$.isObject(r))throw new TypeError("data must be an object");return B(r),t}function Lo(r){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(o){return t[o]})}function ir(r,t){this._pairs=[],r&&hn(r,this,t)}const Mo=ir.prototype;Mo.append=function(t,n){this._pairs.push([t,n])},Mo.toString=function(t){const n=t?function(o){return t.call(this,o,Lo)}:Lo;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Ds(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Uo(r,t,n){if(!t)return r;const o=n&&n.encode||Ds,s=n&&n.serialize;let a;if(s?a=s(t,n):a=$.isURLSearchParams(t)?t.toString():new ir(t,n).toString(o),a){const i=r.indexOf("#");i!==-1&&(r=r.slice(0,i)),r+=(r.indexOf("?")===-1?"?":"&")+a}return r}class zo{constructor(){this.handlers=[]}use(t,n,o){return this.handlers.push({fulfilled:t,rejected:n,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){$.forEach(this.handlers,function(o){o!==null&&t(o)})}}const Ho={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Fs={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:ir,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},qo=typeof window<"u"&&typeof document<"u",js=(r=>qo&&["ReactNative","NativeScript","NS"].indexOf(r)<0)(typeof navigator<"u"&&navigator.product),Rs=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Te={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:qo,hasStandardBrowserEnv:js,hasStandardBrowserWebWorkerEnv:Rs},Symbol.toStringTag,{value:"Module"})),...Fs};function Is(r,t){return hn(r,new Te.classes.URLSearchParams,Object.assign({visitor:function(n,o,s,a){return Te.isNode&&$.isBuffer(n)?(this.append(o,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function Ls(r){return $.matchAll(/\w+|\[(\w*)]/g,r).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Ms(r){const t={},n=Object.keys(r);let o;const s=n.length;let a;for(o=0;o<s;o++)a=n[o],t[a]=r[a];return t}function Po(r){function t(n,o,s,a){let i=n[a++];if(i==="__proto__")return!0;const c=Number.isFinite(+i),d=a>=n.length;return i=!i&&$.isArray(s)?s.length:i,d?($.hasOwnProp(s,i)?s[i]=[s[i],o]:s[i]=o,!c):((!s[i]||!$.isObject(s[i]))&&(s[i]=[]),t(n,o,s[i],a)&&$.isArray(s[i])&&(s[i]=Ms(s[i])),!c)}if($.isFormData(r)&&$.isFunction(r.entries)){const n={};return $.forEachEntry(r,(o,s)=>{t(Ls(o),s,n,0)}),n}return null}function Us(r,t,n){if($.isString(r))try{return(t||JSON.parse)(r),$.trim(r)}catch(o){if(o.name!=="SyntaxError")throw o}return(n||JSON.stringify)(r)}const Dt={transitional:Ho,adapter:["xhr","http"],transformRequest:[function(t,n){const o=n.getContentType()||"",s=o.indexOf("application/json")>-1,a=$.isObject(t);if(a&&$.isHTMLForm(t)&&(t=new FormData(t)),$.isFormData(t))return s?JSON.stringify(Po(t)):t;if($.isArrayBuffer(t)||$.isBuffer(t)||$.isStream(t)||$.isFile(t)||$.isBlob(t))return t;if($.isArrayBufferView(t))return t.buffer;if($.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(a){if(o.indexOf("application/x-www-form-urlencoded")>-1)return Is(t,this.formSerializer).toString();if((c=$.isFileList(t))||o.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return hn(c?{"files[]":t}:t,d&&new d,this.formSerializer)}}return a||s?(n.setContentType("application/json",!1),Us(t)):t}],transformResponse:[function(t){const n=this.transitional||Dt.transitional,o=n&&n.forcedJSONParsing,s=this.responseType==="json";if(t&&$.isString(t)&&(o&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(c){if(i)throw c.name==="SyntaxError"?U.from(c,U.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:Te.classes.FormData,Blob:Te.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};$.forEach(["delete","get","head","post","put","patch"],r=>{Dt.headers[r]={}});const zs=$.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"]),Hs=r=>{const t={};let n,o,s;return r&&r.split(`
2
2
  `).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),o=i.substring(s+1).trim(),!(!n||t[n]&&zs[n])&&(n==="set-cookie"?t[n]?t[n].push(o):t[n]=[o]:t[n]=t[n]?t[n]+", "+o:o)}),t},Wo=Symbol("internals");function Ft(r){return r&&String(r).trim().toLowerCase()}function mn(r){return r===!1||r==null?r:$.isArray(r)?r.map(mn):String(r)}function qs(r){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=n.exec(r);)t[o[1]]=o[2];return t}const Ps=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());function lr(r,t,n,o,s){if($.isFunction(o))return o.call(this,t,n);if(s&&(t=n),!!$.isString(t)){if($.isString(o))return t.indexOf(o)!==-1;if($.isRegExp(o))return o.test(t)}}function Ws(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,o)=>n.toUpperCase()+o)}function Gs(r,t){const n=$.toCamelCase(" "+t);["get","set","has"].forEach(o=>{Object.defineProperty(r,o+n,{value:function(s,a,i){return this[o].call(this,t,s,a,i)},configurable:!0})})}class ge{constructor(t){t&&this.set(t)}set(t,n,o){const s=this;function a(c,d,f){const p=Ft(d);if(!p)throw new Error("header name must be a non-empty string");const m=$.findKey(s,p);(!m||s[m]===void 0||f===!0||f===void 0&&s[m]!==!1)&&(s[m||d]=mn(c))}const i=(c,d)=>$.forEach(c,(f,p)=>a(f,p,d));return $.isPlainObject(t)||t instanceof this.constructor?i(t,n):$.isString(t)&&(t=t.trim())&&!Ps(t)?i(Hs(t),n):t!=null&&a(n,t,o),this}get(t,n){if(t=Ft(t),t){const o=$.findKey(this,t);if(o){const s=this[o];if(!n)return s;if(n===!0)return qs(s);if($.isFunction(n))return n.call(this,s,o);if($.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Ft(t),t){const o=$.findKey(this,t);return!!(o&&this[o]!==void 0&&(!n||lr(this,this[o],o,n)))}return!1}delete(t,n){const o=this;let s=!1;function a(i){if(i=Ft(i),i){const c=$.findKey(o,i);c&&(!n||lr(o,o[c],c,n))&&(delete o[c],s=!0)}}return $.isArray(t)?t.forEach(a):a(t),s}clear(t){const n=Object.keys(this);let o=n.length,s=!1;for(;o--;){const a=n[o];(!t||lr(this,this[a],a,t,!0))&&(delete this[a],s=!0)}return s}normalize(t){const n=this,o={};return $.forEach(this,(s,a)=>{const i=$.findKey(o,a);if(i){n[i]=mn(s),delete n[a];return}const c=t?Ws(a):String(a).trim();c!==a&&delete n[a],n[c]=mn(s),o[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return $.forEach(this,(o,s)=>{o!=null&&o!==!1&&(n[s]=t&&$.isArray(o)?o.join(", "):o)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
3
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const o=new this(t);return n.forEach(s=>o.set(s)),o}static accessor(t){const o=(this[Wo]=this[Wo]={accessors:{}}).accessors,s=this.prototype;function a(i){const c=Ft(i);o[c]||(Gs(s,i),o[c]=!0)}return $.isArray(t)?t.forEach(a):a(t),this}}ge.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),$.reduceDescriptors(ge.prototype,({value:r},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>r,set(o){this[n]=o}}}),$.freezeMethods(ge);function cr(r,t){const n=this||Dt,o=t||n,s=ge.from(o.headers);let a=o.data;return $.forEach(r,function(c){a=c.call(n,a,s.normalize(),t?t.status:void 0)}),s.normalize(),a}function Go(r){return!!(r&&r.__CANCEL__)}function jt(r,t,n){U.call(this,r??"canceled",U.ERR_CANCELED,t,n),this.name="CanceledError"}$.inherits(jt,U,{__CANCEL__:!0});function Qs(r,t,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?r(n):t(new U("Request failed with status code "+n.status,[U.ERR_BAD_REQUEST,U.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Js=Te.hasStandardBrowserEnv?{write(r,t,n,o,s,a){const i=[r+"="+encodeURIComponent(t)];$.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),$.isString(o)&&i.push("path="+o),$.isString(s)&&i.push("domain="+s),a===!0&&i.push("secure"),document.cookie=i.join("; ")},read(r){const t=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(r){this.write(r,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Ks(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function Ys(r,t){return t?r.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):r}function Qo(r,t){return r&&!Ks(t)?Ys(r,t):t}const vs=Te.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let o;function s(a){let i=a;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 o=s(window.location.href),function(i){const c=$.isString(i)?s(i):i;return c.protocol===o.protocol&&c.host===o.host}}():function(){return function(){return!0}}();function Xs(r){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return t&&t[1]||""}function Zs(r,t){r=r||10;const n=new Array(r),o=new Array(r);let s=0,a=0,i;return t=t!==void 0?t:1e3,function(d){const f=Date.now(),p=o[a];i||(i=f),n[s]=d,o[s]=f;let m=a,E=0;for(;m!==s;)E+=n[m++],m=m%r;if(s=(s+1)%r,s===a&&(a=(a+1)%r),f-i<t)return;const B=p&&f-p;return B?Math.round(E*1e3/B):void 0}}function Jo(r,t){let n=0;const o=Zs(50,250);return s=>{const a=s.loaded,i=s.lengthComputable?s.total:void 0,c=a-n,d=o(c),f=a<=i;n=a;const p={loaded:a,total:i,progress:i?a/i:void 0,bytes:c,rate:d||void 0,estimated:d&&i&&f?(i-a)/d:void 0,event:s};p[t?"download":"upload"]=!0,r(p)}}const dr={http:Ts,xhr:typeof XMLHttpRequest<"u"&&function(r){return new Promise(function(n,o){let s=r.data;const a=ge.from(r.headers).normalize();let{responseType:i,withXSRFToken:c}=r,d;function f(){r.cancelToken&&r.cancelToken.unsubscribe(d),r.signal&&r.signal.removeEventListener("abort",d)}let p;if($.isFormData(s)){if(Te.hasStandardBrowserEnv||Te.hasStandardBrowserWebWorkerEnv)a.setContentType(!1);else if((p=a.getContentType())!==!1){const[h,...b]=p?p.split(";").map(_=>_.trim()).filter(Boolean):[];a.setContentType([h||"multipart/form-data",...b].join("; "))}}let m=new XMLHttpRequest;if(r.auth){const h=r.auth.username||"",b=r.auth.password?unescape(encodeURIComponent(r.auth.password)):"";a.set("Authorization","Basic "+btoa(h+":"+b))}const E=Qo(r.baseURL,r.url);m.open(r.method.toUpperCase(),Uo(E,r.params,r.paramsSerializer),!0),m.timeout=r.timeout;function B(){if(!m)return;const h=ge.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),_={data:!i||i==="text"||i==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:h,config:r,request:m};Qs(function(x){n(x),f()},function(x){o(x),f()},_),m=null}if("onloadend"in m?m.onloadend=B:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(B)},m.onabort=function(){m&&(o(new U("Request aborted",U.ECONNABORTED,r,m)),m=null)},m.onerror=function(){o(new U("Network Error",U.ERR_NETWORK,r,m)),m=null},m.ontimeout=function(){let b=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const _=r.transitional||Ho;r.timeoutErrorMessage&&(b=r.timeoutErrorMessage),o(new U(b,_.clarifyTimeoutError?U.ETIMEDOUT:U.ECONNABORTED,r,m)),m=null},Te.hasStandardBrowserEnv&&(c&&$.isFunction(c)&&(c=c(r)),c||c!==!1&&vs(E))){const h=r.xsrfHeaderName&&r.xsrfCookieName&&Js.read(r.xsrfCookieName);h&&a.set(r.xsrfHeaderName,h)}s===void 0&&a.setContentType(null),"setRequestHeader"in m&&$.forEach(a.toJSON(),function(b,_){m.setRequestHeader(_,b)}),$.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),i&&i!=="json"&&(m.responseType=r.responseType),typeof r.onDownloadProgress=="function"&&m.addEventListener("progress",Jo(r.onDownloadProgress,!0)),typeof r.onUploadProgress=="function"&&m.upload&&m.upload.addEventListener("progress",Jo(r.onUploadProgress)),(r.cancelToken||r.signal)&&(d=h=>{m&&(o(!h||h.type?new jt(null,r,m):h),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(d),r.signal&&(r.signal.aborted?d():r.signal.addEventListener("abort",d)));const y=Xs(E);if(y&&Te.protocols.indexOf(y)===-1){o(new U("Unsupported protocol "+y+":",U.ERR_BAD_REQUEST,r));return}m.send(s||null)})}};$.forEach(dr,(r,t)=>{if(r){try{Object.defineProperty(r,"name",{value:t})}catch{}Object.defineProperty(r,"adapterName",{value:t})}});const Ko=r=>`- ${r}`,ei=r=>$.isFunction(r)||r===null||r===!1,Yo={getAdapter:r=>{r=$.isArray(r)?r:[r];const{length:t}=r;let n,o;const s={};for(let a=0;a<t;a++){n=r[a];let i;if(o=n,!ei(n)&&(o=dr[(i=String(n)).toLowerCase()],o===void 0))throw new U(`Unknown adapter '${i}'`);if(o)break;s[i||"#"+a]=o}if(!o){const a=Object.entries(s).map(([c,d])=>`adapter ${c} `+(d===!1?"is not supported by the environment":"is not available in the build"));let i=t?a.length>1?`since :
4
- `+a.map(Ko).join(`
5
- `):" "+Ko(a[0]):"as no adapter specified";throw new U("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return o},adapters:dr};function ur(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new jt(null,r)}function vo(r){return ur(r),r.headers=ge.from(r.headers),r.data=cr.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),Yo.getAdapter(r.adapter||Dt.adapter)(r).then(function(o){return ur(r),o.data=cr.call(r,r.transformResponse,o),o.headers=ge.from(o.headers),o},function(o){return Go(o)||(ur(r),o&&o.response&&(o.response.data=cr.call(r,r.transformResponse,o.response),o.response.headers=ge.from(o.response.headers))),Promise.reject(o)})}const Xo=r=>r instanceof ge?{...r}:r;function mt(r,t){t=t||{};const n={};function o(f,p,m){return $.isPlainObject(f)&&$.isPlainObject(p)?$.merge.call({caseless:m},f,p):$.isPlainObject(p)?$.merge({},p):$.isArray(p)?p.slice():p}function s(f,p,m){if($.isUndefined(p)){if(!$.isUndefined(f))return o(void 0,f,m)}else return o(f,p,m)}function a(f,p){if(!$.isUndefined(p))return o(void 0,p)}function i(f,p){if($.isUndefined(p)){if(!$.isUndefined(f))return o(void 0,f)}else return o(void 0,p)}function c(f,p,m){if(m in t)return o(f,p);if(m in r)return o(void 0,f)}const d={url:a,method:a,data:a,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,p)=>s(Xo(f),Xo(p),!0)};return $.forEach(Object.keys(Object.assign({},r,t)),function(p){const m=d[p]||s,E=m(r[p],t[p],p);$.isUndefined(E)&&m!==c||(n[p]=E)}),n}const Zo="1.6.8",fr={};["object","boolean","number","function","string","symbol"].forEach((r,t)=>{fr[r]=function(o){return typeof o===r||"a"+(t<1?"n ":" ")+r}});const ea={};fr.transitional=function(t,n,o){function s(a,i){return"[Axios v"+Zo+"] Transitional option '"+a+"'"+i+(o?". "+o:"")}return(a,i,c)=>{if(t===!1)throw new U(s(i," has been removed"+(n?" in "+n:"")),U.ERR_DEPRECATED);return n&&!ea[i]&&(ea[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,i,c):!0}};function ti(r,t,n){if(typeof r!="object")throw new U("options must be an object",U.ERR_BAD_OPTION_VALUE);const o=Object.keys(r);let s=o.length;for(;s-- >0;){const a=o[s],i=t[a];if(i){const c=r[a],d=c===void 0||i(c,a,r);if(d!==!0)throw new U("option "+a+" must be "+d,U.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new U("Unknown option "+a,U.ERR_BAD_OPTION)}}const pr={assertOptions:ti,validators:fr},Ye=pr.validators;class rt{constructor(t){this.defaults=t,this.interceptors={request:new zo,response:new zo}}async request(t,n){try{return await this._request(t,n)}catch(o){if(o instanceof Error){let s;Error.captureStackTrace?Error.captureStackTrace(s={}):s=new Error;const a=s.stack?s.stack.replace(/^.+\n/,""):"";o.stack?a&&!String(o.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(o.stack+=`
6
- `+a):o.stack=a}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=mt(this.defaults,n);const{transitional:o,paramsSerializer:s,headers:a}=n;o!==void 0&&pr.assertOptions(o,{silentJSONParsing:Ye.transitional(Ye.boolean),forcedJSONParsing:Ye.transitional(Ye.boolean),clarifyTimeoutError:Ye.transitional(Ye.boolean)},!1),s!=null&&($.isFunction(s)?n.paramsSerializer={serialize:s}:pr.assertOptions(s,{encode:Ye.function,serialize:Ye.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=a&&$.merge(a.common,a[n.method]);a&&$.forEach(["delete","get","head","post","put","patch","common"],y=>{delete a[y]}),n.headers=ge.concat(i,a);const c=[];let d=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(d=d&&h.synchronous,c.unshift(h.fulfilled,h.rejected))});const f=[];this.interceptors.response.forEach(function(h){f.push(h.fulfilled,h.rejected)});let p,m=0,E;if(!d){const y=[vo.bind(this),void 0];for(y.unshift.apply(y,c),y.push.apply(y,f),E=y.length,p=Promise.resolve(n);m<E;)p=p.then(y[m++],y[m++]);return p}E=c.length;let B=n;for(m=0;m<E;){const y=c[m++],h=c[m++];try{B=y(B)}catch(b){h.call(this,b);break}}try{p=vo.call(this,B)}catch(y){return Promise.reject(y)}for(m=0,E=f.length;m<E;)p=p.then(f[m++],f[m++]);return p}getUri(t){t=mt(this.defaults,t);const n=Qo(t.baseURL,t.url);return Uo(n,t.params,t.paramsSerializer)}}$.forEach(["delete","get","head","options"],function(t){rt.prototype[t]=function(n,o){return this.request(mt(o||{},{method:t,url:n,data:(o||{}).data}))}}),$.forEach(["post","put","patch"],function(t){function n(o){return function(a,i,c){return this.request(mt(c||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:a,data:i}))}}rt.prototype[t]=n(),rt.prototype[t+"Form"]=n(!0)});class hr{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const o=this;this.promise.then(s=>{if(!o._listeners)return;let a=o._listeners.length;for(;a-- >0;)o._listeners[a](s);o._listeners=null}),this.promise.then=s=>{let a;const i=new Promise(c=>{o.subscribe(c),a=c}).then(s);return i.cancel=function(){o.unsubscribe(a)},i},t(function(a,i,c){o.reason||(o.reason=new jt(a,i,c),n(o.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)}static source(){let t;return{token:new hr(function(s){t=s}),cancel:t}}}function ni(r){return function(n){return r.apply(null,n)}}function ri(r){return $.isObject(r)&&r.isAxiosError===!0}const mr={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(mr).forEach(([r,t])=>{mr[t]=r});function ta(r){const t=new rt(r),n=Bo(rt.prototype.request,t);return $.extend(n,rt.prototype,t,{allOwnKeys:!0}),$.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return ta(mt(r,s))},n}const v=ta(Dt);v.Axios=rt,v.CanceledError=jt,v.CancelToken=hr,v.isCancel=Go,v.VERSION=Zo,v.toFormData=hn,v.AxiosError=U,v.Cancel=v.CanceledError,v.all=function(t){return Promise.all(t)},v.spread=ni,v.isAxiosError=ri,v.mergeConfig=mt,v.AxiosHeaders=ge,v.formToJSON=r=>Po($.isHTMLForm(r)?new FormData(r):r),v.getAdapter=Yo.getAdapter,v.HttpStatusCode=mr,v.default=v;let gt=null;function oi(r){gt=v.create(r)}function ai(){return gt}async function si(r,t={},n={}){return new Promise((o,s)=>{gt.get(r,{headers:n,params:t}).then(a=>{o(a.data)}).catch(a=>{s(a)})})}async function ii(r,t,n={}){return new Promise((o,s)=>{gt.post(r,t,{headers:n}).then(a=>{o(a)}).catch(a=>{s(a)})})}async function li(r,t,n={}){return new Promise((o,s)=>{gt.delete(r,{data:t,headers:n}).then(a=>{o(a.data)}).catch(a=>{s(a)})})}async function ci(r,t,n={}){return new Promise((o,s)=>{gt.put(r,t,{headers:n}).then(a=>{o(a)}).catch(a=>{s(a)})})}const _e={get:si,post:ii,put:ci,remove:li,setupAxios:oi,getAxiosInstance:ai};var ne=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function na(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function di(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ra={exports:{}};(function(r,t){(function(n,o){typeof di=="function"?r.exports=o():n.pluralize=o()})(ne,function(){var n=[],o=[],s={},a={},i={};function c(h){return typeof h=="string"?new RegExp("^"+h+"$","i"):h}function d(h,b){return h===b?b:h===h.toLowerCase()?b.toLowerCase():h===h.toUpperCase()?b.toUpperCase():h[0]===h[0].toUpperCase()?b.charAt(0).toUpperCase()+b.substr(1).toLowerCase():b.toLowerCase()}function f(h,b){return h.replace(/\$(\d{1,2})/g,function(_,w){return b[w]||""})}function p(h,b){return h.replace(b[0],function(_,w){var x=f(b[1],arguments);return d(_===""?h[w-1]:_,x)})}function m(h,b,_){if(!h.length||s.hasOwnProperty(h))return b;for(var w=_.length;w--;){var x=_[w];if(x[0].test(b))return p(b,x)}return b}function E(h,b,_){return function(w){var x=w.toLowerCase();return b.hasOwnProperty(x)?d(w,x):h.hasOwnProperty(x)?d(w,h[x]):m(x,w,_)}}function B(h,b,_,w){return function(x){var C=x.toLowerCase();return b.hasOwnProperty(C)?!0:h.hasOwnProperty(C)?!1:m(C,C,_)===C}}function y(h,b,_){var w=b===1?y.singular(h):y.plural(h);return(_?b+" ":"")+w}return y.plural=E(i,a,n),y.isPlural=B(i,a,n),y.singular=E(a,i,o),y.isSingular=B(a,i,o),y.addPluralRule=function(h,b){n.push([c(h),b])},y.addSingularRule=function(h,b){o.push([c(h),b])},y.addUncountableRule=function(h){if(typeof h=="string"){s[h.toLowerCase()]=!0;return}y.addPluralRule(h,"$0"),y.addSingularRule(h,"$0")},y.addIrregularRule=function(h,b){b=b.toLowerCase(),h=h.toLowerCase(),i[h]=b,a[b]=h},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(h){return y.addIrregularRule(h[0],h[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(h){return y.addPluralRule(h[0],h[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(h){return y.addSingularRule(h[0],h[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(y.addUncountableRule),y})})(ra);var ui=ra.exports;const oa=na(ui),gr=r=>r.replace(/([-_][a-z])/gi,t=>t.toUpperCase().replace("-","").replace("_","")),gn="GET_LIST",_n="GET_ONE",yn="CREATE",bn="UPDATE",_t="REMOVE",_r="RESTORE",aa="ENABLE",fi=[gn,_n,yn,bn,_t,aa];class pi{constructor(t,n,o=fi){this.side=t=="platform"?"admin":t,this.domain=n,this.resources=oa(n),this.operations=o,this.operations.forEach(s=>{const a=gr(s.toLowerCase());this[a]=this[`_${a}`]})}_getList(t){if(!this.operations.includes(gn)){console.log(`${this.side}/${this.domain} 不支持 ${gn} 操作`);return}return _e.get(`${this.side}/${this.resources}`,t)}_getOne(t){if(!this.operations.includes(_n)){console.log(`${this.side}/${this.domain} 不支持 ${_n} 操作`);return}return _e.get(`${this.side}/${this.resources}/${t.id}`)}_create(t){if(!this.operations.includes(yn)){console.log(`${this.side}/${this.domain} 不支持 ${yn} 操作`);return}return _e.post(`${this.side}/${this.resources}`,t)}_update(t){if(!this.operations.includes(bn)){console.log(`${this.side}/${this.domain} 不支持 ${bn} 操作`);return}return _e.put(`${this.side}/${this.resources}/${t.id}`,t)}_remove(t){if(!this.operations.includes(_t)){console.log(`${this.side}/${this.domain} 不支持 ${_t} 操作`);return}return _e.remove(`${this.side}/${this.resources}/${t.id}`,t)}_restore(t){if(!this.operations.includes(_r)){console.log(`${this.side}/${this.domain} 不支持 ${_r} 操作`);return}return _e.put(`${this.side}/${this.resources}/${t.id}/restore`,t)}_enable(t){if(!this.operations.includes(_t)){console.log(`${this.side}/${this.domain} 不支持 ${_t} 操作`);return}return _e.put(`${this.side}/${this.resources}/${t.id}/switch`,t)}}class hi{constructor(t,n,o){this.side=t=="platform"?"admin":t,this.domain=n,this.resources=oa(n),this.listQuerys=o}getList(t){let n=t;return this.listQuerys&&(n={...this.listQuerys,...t}),_e.get(`${this.side}/${this.resources}`,n)}getOne(t){return _e.get(`${this.side}/${this.resources}/${t.id}`)}}const mi={Client:pi,ReadOnlyClient:hi,GET_LIST:gn,GET_ONE:_n,CREATE:yn,UPDATE:bn,REMOVE:_t,RESTORE:_r,ENABLE:aa},gi=(r,t,n)=>{const o=r[t];return o?typeof o=="function"?o():Promise.resolve(o):new Promise((s,a)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(a.bind(null,new Error("Unknown variable dynamic import: "+t+(t.split("/").length!==n?". Note that variables only represent file names one level deep.":""))))})},_i=["createdAt","updatedAt","deletedAt"];class re{constructor(t,n){this.domain=n,this.type=t.type||"string",this.code=t.code,this.label=t.label,this.showInList=this._showInList(t),this.showInDetail=this._showInDetail(t),this.rules=t.rules||[],this.editable=this._editable(t),this.visible=this._visible(t),this.width=this.computeWidth(t),this.span=t.span||6,this.fixed=!1}computeWidth(t){return t.width?t.width:_i.includes(t.code)?200:t.code==="id"||t.type==="image"?100:null}defaultBy(t,n){return t??n}checkValidProperties(t){const n=Object.getOwnPropertyNames(t),o=Object.getOwnPropertyNames(this);if(n.every(a=>o.includes(a)))return;const s=n.filter(a=>!o.includes(a));console.error(`invalid field config props: [${s}] for ${this.domain}:${this.code}`)}_showInList(t){const n=t.showInList;if(typeof n=="boolean")return()=>n;if(typeof n=="function")return n;if("showInList"in this.defaultConfig())return()=>this.defaultConfig().showInList;if(typeof n>"u")return()=>!0;throw new Exception(`invalid showInList : ${n}`)}_showInDetail(t){const n=t.showInDetail;if(typeof n=="boolean")return()=>n;if(typeof n=="function")return n;if(typeof n>"u")return()=>!0;throw new Exception(`invalid showInDetail : ${n}`)}_editable(t){const n=t.editable;if(typeof n=="boolean")return()=>n;if(typeof n=="function")return n;if(typeof n>"u")return()=>!1;throw new Exception(`invalid editable : ${n}`)}_visible(t){const n=t.visible;if(typeof n=="boolean")return()=>n;if(typeof n=="function")return n;if(typeof n>"u")return this._editable(t);throw new Exception(`invalid visible : ${n}`)}defaultConfig(){return{}}}function sa(r,t,n){console.warn(`${r}.${t} => ${n}`)}const yr={select:{config:"select"},"belongs-to":{config:"belongs-to"},boolean:{config:"boolean"},switch:{config:"switch",deprecated:"switch 字段类型即将废弃,请使用 boolean"},datetime:{config:"datetime"},editor:{config:"rich-text",deprecated:"editor 字段类型即将废弃,请使用 rich-text"},"rich-text":{config:"rich-text"},image:{config:"image"},images:{config:"images"},attachment:{config:"attachment"},attachments:{config:"attachment",deprecated:"attachments 字段类型即将废弃,请使用 attachment"},json:{config:"json"},"row-id":{config:"row-id"},string:{config:"string"},text:{config:"text"},textarea:{config:"text",deprecated:"textarea 字段类型即将废弃,请使用 text"},tree:{config:"tree-select",deprecated:"tree 字段类型即将废弃,请使用 tree-select"},"tree-select":{config:"tree-select"},cascader:{config:"cascader"},component:{config:"component"}};async function ia(r,t,n){const o=await gi(Object.assign({"./field/attachment/config.js":()=>Promise.resolve().then(()=>od),"./field/belongs-to/config.js":()=>Promise.resolve().then(()=>cd),"./field/boolean/config.js":()=>Promise.resolve().then(()=>hd),"./field/cascader/config.js":()=>Promise.resolve().then(()=>bd),"./field/component/config.js":()=>Promise.resolve().then(()=>kd),"./field/datetime/config.js":()=>Promise.resolve().then(()=>Cd),"./field/image/config.js":()=>Promise.resolve().then(()=>Dd),"./field/images/config.js":()=>Promise.resolve().then(()=>Ud),"./field/json/config.js":()=>Promise.resolve().then(()=>Pd),"./field/rich-text/config.js":()=>Promise.resolve().then(()=>vd),"./field/row-id/config.js":()=>Promise.resolve().then(()=>Zd),"./field/select/config.js":()=>Promise.resolve().then(()=>hu),"./field/string/config.js":()=>Promise.resolve().then(()=>bu),"./field/switch/config.js":()=>Promise.resolve().then(()=>Bu),"./field/text/config.js":()=>Promise.resolve().then(()=>Ou),"./field/tree-select/config.js":()=>Promise.resolve().then(()=>Fu)}),`./field/${r}/config.js`,4);return new o.default(t,n)}function la(r,t="unknown"){return r.map(o=>{if(o instanceof re)return o;if(o.code==="id"?o.type="row-id":o.component&&(o.type="component"),Object.keys(yr).includes(o.type)){const s=yr[o.type];return s.deprecated&&sa(t,o.code,s.deprecated),ia(yr[o.type].config,o,t)}return ia("string",o,t)})}let br={name:"管理后台",logo:"",sideMenus:{},imageUploadUrl:"",fileUploadUrl:"",idempotentUrl:""},Rt={};function yi(r){br={...br,...r},Rt=r.domainConfigs}function bi(r){Object.keys(Rt).forEach(t=>{const n=Rt[t];Object.keys(n).forEach(o=>{const s=n[o];s.load=r(t,o)})})}function ot(){return br}function wr(){return Rt}function wn(r,t){return Rt[r][t].load().then(n=>{const o=n.default;return Promise.all(o.fields).then(s=>(o.fields=s,o))})}class wi{constructor(t,n){this.side=t;const o=n.config?n.config:n;this.code=o.code,this.fields=la(o.fields,o.code),!o.simple&&(this.name=wr()[t][o.code].name,this.filters=o.filters||[],this.coverField=o.coverField,this.nameField=o.nameField||"name",this.showCreate=o.showCreate||!0,this.showSubmit=o.showSubmit||!0,this.removeConfirm=o.removeConfirm,this.showCreate=this.setupShowCreate(o.showCreate),this.hasMany=n.hasMany||[],this.hasOne=n.hasOne||[],this.formatName=this.createFormatName(n.formatName),this.rest=this.createRestClient(n.rest),this.rowActions=this.setupRowActions(n),this.pageActions=this.setupPageActions(n),this.actionsWidth=n.actionsWidth||150,this.formHook=n.form||{},this.filterHook=n.filterForm||{},this.restRepeat=this.restRepeat(n.restRepeat),this.btnVisible=n.btnVisible||{},this.operations=this.setupOperations(),this.formLayout=n.formLayout||[])}wrapFields(t,n){return la(t,n)}createRestClient(t){return t}createFormatName(t){return n=>t?`${t(n)}`:n.name?n.name:n.title?n.title:`#${n.id}`}setupPageActions(t){return n=>{if(typeof t.pageActions>"u")return[];if(Array.isArray(t.pageActions))return t.pageActions;if(typeof t.pageActions=="function"){const o=t.pageActions(n);return Array.isArray(o)?o:(console.warn(`${this.code} --> page actions 必须返回数组`),[])}return console.warn(`${this.code} --> page actions 必须返回数组`),[]}}setupRowActions(t){return n=>{if(typeof t.rowActions>"u")return[];if(Array.isArray(t.rowActions))return t.rowActions;if(typeof t.rowActions=="function"){const o=t.rowActions(n);return Array.isArray(o)?o:(console.warn(`${this.code} --> row actions 必须返回数组`),[])}return console.warn(`${this.code} --> row actions 必须返回数组`),[]}}setupShowCreate(t){return typeof t=="boolean"?()=>t:typeof t=="function"?n=>t(n):()=>!0}restRepeat(t){return typeof t=="function"?n=>t():()=>""}setupOperations(t){const n={creatable:this.rest.create!=null,updatable:this.rest.update!=null,removable:this.rest.remove!=null,restorable:this.rest.restore!=null,showable:this.rest.getOne!=null};return o=>{const s=this.showCreate(o);return{...n,creatable:n.creatable&&s}}}}function ca(r,t){return new wi(r,t)}const M=(r,t)=>{const n=r.__vccOpts||r;for(const[o,s]of t)n[o]=s;return n},ki={class:"card-header"},Ei={class:"title"},da=M({__name:"Widget",props:{title:{type:String}},setup(r){const t=r;return(n,o)=>(e.openBlock(),e.createBlock(e.unref(k.ElCard),{shadow:"never"},e.createSlots({default:e.withCtx(()=>[e.renderSlot(n.$slots,"default",{},void 0,!0)]),_:2},[t.title?{name:"header",fn:e.withCtx(()=>[e.createElementVNode("div",ki,[e.createElementVNode("span",Ei,e.toDisplayString(t.title),1)])]),key:"0"}:void 0]),1024))}},[["__scopeId","data-v-c5513c07"]]),xi={key:0},Bi={key:1},Si={key:0},Ci={key:1},ua=M({__name:"Statistic",props:{title:{type:String},value:{type:Number},background:{type:String},align:{type:String,default:"left"},link:{type:String}},setup(r){const t=r;let n="#f7faff",o="10px";return t.background&&(n=t.background,n=="none"&&(o="0px")),(s,a)=>{const i=e.resolveComponent("RouterLink");return e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"container",style:e.normalizeStyle(`background: ${e.unref(n)}; padding: ${e.unref(o)}`)},[e.createElementVNode("div",{class:"item-box-data mono-data",style:e.normalizeStyle(`text-align: ${t.align};`)},[t.value!=null?(e.openBlock(),e.createElementBlock("span",xi,e.toDisplayString(t.value),1)):(e.openBlock(),e.createElementBlock("span",Bi,"..."))],4),e.createElementVNode("div",{class:"item-box-tip",style:e.normalizeStyle(`text-align: ${t.align};`)},[t.link?(e.openBlock(),e.createElementBlock("span",Si,[e.createVNode(i,{to:t.link},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElLink),{type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:1})]),_:1},8,["to"])])):(e.openBlock(),e.createElementBlock("span",Ci,e.toDisplayString(t.title),1))],4)],4)),[[e.unref(k.vLoading),t.value==null]])}}},[["__scopeId","data-v-73228f1a"]]),$i=M({__name:"StatisticCard",props:{title:{type:String},value:{type:Number},icon:{type:String},background:{type:String},align:{type:String},link:{type:String}},setup(r){const t=r;return(n,o)=>(e.openBlock(),e.createBlock(da,null,{default:e.withCtx(()=>[e.createVNode(ua,{title:t.title,value:t.value,icon:t.icon,background:t.background,align:t.align,link:t.link},null,8,["title","value","icon","background","align","link"])]),_:1}))}},[["__scopeId","data-v-f338c407"]]),Vi={},Oi={style:{padding:"20px 0"}};function Ti(r,t){return e.openBlock(),e.createElementBlock("div",Oi,[e.renderSlot(r.$slots,"default")])}const Ni=M(Vi,[["render",Ti]]),Ai=M({__name:"DashboardRow",setup(r){return(t,n)=>(e.openBlock(),e.createBlock(e.unref(k.ElRow),{style:{"margin-bottom":"20px"},class:"row"},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},void 0,!0)]),_:3}))}},[["__scopeId","data-v-5b091760"]]);function Z(r){const t={...r.query,...r.params};if(r.params.domain&&r.params.id){const n=gr(`${t.domain}-id`);t[n]=t.id}return delete t.domain,delete t.id,delete t.page,delete t.pageSize,t}function Di(r){const t=r.length,n=Math.floor(24/t);return{type:"row",cols:r.map(s=>({type:"col",span:n,field:s}))}}function kr(r){return r.map(t=>Di(t))}const Fi={__name:"FormLayout",props:{layout:Object,fields:Array},setup(r){const t=r,n=e.computed(()=>{if(t.layout.length==0){if(t.fields.length<=6){const i=s(t.fields,1);return kr(i)}const a=s(t.fields,2);return kr(a)}return t.layout});function o(a){return t.fields.find(c=>c.code==a)}function s(a,i=2){const c=a.map(f=>f.code),d=[];for(let f=0;f<c.length;f+=i)d.push(c.slice(f,f+i));return d}return(a,i)=>(e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,c=>(e.openBlock(),e.createBlock(e.unref(k.ElRow),{gutter:20},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.cols,d=>(e.openBlock(),e.createBlock(e.unref(k.ElCol),{span:d.span},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default",{field:o(d.field)})]),_:2},1032,["span"]))),256))]),_:2},1024))),256))]))}},ji={style:{width:"100%"}},Ri={class:"footer"},Ii={key:1},Li=M({__name:"PureForm",props:{config:{type:Object},data:{type:Object},removable:{type:Boolean,default:!1}},emits:["submit","remove"],setup(r,{emit:t}){const n=G.useRoute(),o=Z(n),s=t,a=e.ref(!1),i=r,c=kr(i.config.formLayout||[]),d=e.reactive({...i.data}),f=e.ref(null),p=i.config.fields.filter(w=>w.rules).reduce((w,x)=>(w[x.code]=B(x.rules),w),{}),m=e.computed(_),E=e.computed(()=>i.config.fields.filter(w=>{const x=w.editable(d,o),C=w.visible(d,o);return w.disabled=C&&!x,x||C}));function B(w){return typeof w=="object"?w:typeof w=="function"?w(d):[]}async function y(){await f.value.validate((w,x)=>{var D,R;if(!w)return console.log("error submit!",x),!1;const C=(D=i.config.fields.find(Q=>["images","attachments","attachment"].includes(Q.type)))==null?void 0:D.code,N={...d};C&&(N[C]=(R=N[C])==null?void 0:R.map(Q=>Q.id)),a.value=!0,s("submit",N,()=>{a.value=!1})})}function h(){s("remove",d)}function b(){if(i.config.removeConfirm){i.config.removeConfirm(d,h);return}k.ElMessageBox.confirm("确定要删除该条数据吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",appendTo:"#form"}).then(()=>{h()}).catch(()=>{k.ElMessage({type:"info",message:"取消删除"})})}function _(){const w=i.config.showSubmit;return typeof w=="boolean"?w:typeof w=="function"?w(o,d):!0}return e.watch(()=>({...d}),(w,x)=>{const N=Object.keys(w).filter(R=>x[R]!==w[R]).map(R=>{var Q;return(Q=f.value)==null||Q.clearValidate(R),{field:R,newValue:w[R],oldValue:x[R]}});E.value.filter(R=>!R.disabled).forEach(R=>{R.formChange&&R.formChange(d,N)})}),e.watch(()=>i.data,w=>{Object.keys(w).forEach(x=>{d[x]=w[x]})},{immediate:!0}),(w,x)=>(e.openBlock(),e.createBlock(e.unref(k.ElForm),{id:"form",ref_key:"formRef",ref:f,model:d,"label-width":"100px","label-position":"top",rules:e.unref(p)},{default:e.withCtx(()=>[e.createVNode(Fi,{layout:e.unref(c),fields:E.value},{default:e.withCtx(({field:C})=>[(e.openBlock(),e.createBlock(e.unref(k.ElFormItem),{key:C.code,label:C.label,prop:C.code},{default:e.withCtx(()=>[e.createElementVNode("div",ji,[C!=null&&C.editor?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(C.editor),{key:0,modelValue:d[C.code],"onUpdate:modelValue":N=>d[C.code]=N,field:C,disabled:C.disabled,"form-data":d,"domain-config":i.config},null,8,["modelValue","onUpdate:modelValue","field","disabled","form-data","domain-config"])):(e.openBlock(),e.createBlock(e.unref(k.ElAlert),{key:1,title:`未找到 ${C.code}(${C.type}) 的编辑器`,type:"error",effect:"dark",closable:!1},null,8,["title"]))])]),_:2},1032,["label","prop"]))]),_:1},8,["layout","fields"]),e.createElementVNode("div",Ri,[d.id&&!d.deletedAt&&i.removable?(e.openBlock(),e.createBlock(e.unref(k.ElButton),{key:0,size:"default",type:"danger",onClick:b},{default:e.withCtx(()=>[e.createTextVNode(" 删除 ")]),_:1})):(e.openBlock(),e.createElementBlock("div",Ii)),m.value?(e.openBlock(),e.createBlock(e.unref(k.ElButton),{key:2,size:"default",type:"primary",loading:a.value,onClick:y},{default:e.withCtx(()=>[e.createTextVNode(" 提交 ")]),_:1},8,["loading"])):e.createCommentVNode("",!0)])]),_:1},8,["model","rules"]))}},[["__scopeId","data-v-9950deab"]]);function Mi(){return ot().idempotentUrl?_e.get(ot().idempotentUrl).then(r=>r.data):""}const It={getValue:Mi},kn={__name:"FormEditor",props:{modelValue:{type:Boolean},config:{type:Object},data:{type:Object},title:{type:String},removable:{type:Boolean,default:!1}},emits:["update:modelValue","submit","remove"],setup(r,{emit:t}){const n=G.useRoute(),o=Z(n),s=t,a=r,i=e.ref(a.data),c=e.computed(()=>({...i.value,idempotentToken:f.value})),d=e.computed(()=>a.config.fields.filter(h=>h.visible(c,o)).length>=6?"60%":"40%"),f=e.ref(""),p=e.computed({get(){return a.modelValue},set(y){s("update:modelValue",y)}}),m=e.computed(()=>a.title?a.title:a.data.id?`编辑${a.config.name}`:`添加${a.config.name}`);function E(y,h){i.value=y,s("submit",y,async()=>{f.value=await It.getValue(),h()})}function B(y,h){s("remove",y,async()=>{f.value=await It.getValue(),h()})}return e.watch(()=>p,async()=>{f.value=await It.getValue()},{immediate:!0}),(y,h)=>(e.openBlock(),e.createBlock(e.unref(k.ElDialog),{modelValue:p.value,"onUpdate:modelValue":h[0]||(h[0]=b=>p.value=b),width:d.value,top:"20px",title:m.value,"close-on-click-modal":!1,"append-to-body":!0,"destroy-on-close":"","z-index":1e3},{default:e.withCtx(()=>[e.createVNode(Li,{config:a.config,data:c.value,removable:a.removable,onSubmit:E,onRemove:B},null,8,["config","data","removable"])]),_:1},8,["modelValue","width","title"]))}},Ui={__name:"RowActionFormEditor",props:{row:{type:Object},text:{type:String},code:{type:String},fields:{type:Array},onSubmit:{type:Function},type:{type:String,default:"primary"},restRepeat:{type:Function,default:()=>""},rest:{type:Object}},setup(r){const t=r,n=e.ref(t.row),o=e.ref(!1),s=e.shallowRef(null),a=ca("simple",{simple:!0,code:t.code,fields:t.fields});Promise.all(a.fields).then(d=>{a.fields=d,a.restRepeat=t.restRepeat,a.rest=t.rest,s.value=a});async function i(){o.value=!0}function c(d,f){t.onSubmit(d).then(()=>{o.value=!1,ElMessage({showClose:!0,grouping:!0,message:`${t.text}成功`,type:"success"})}).catch(()=>{console.log("请求失败"),f()})}return(d,f)=>(e.openBlock(),e.createBlock(e.unref(k.ElButton),{type:t.type,onClick:i},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.text)+" ",1),o.value?(e.openBlock(),e.createBlock(kn,{key:0,modelValue:o.value,"onUpdate:modelValue":f[0]||(f[0]=p=>o.value=p),title:t.text,config:s.value,data:n.value,onSubmit:c},null,8,["modelValue","title","config","data"])):e.createCommentVNode("",!0)]),_:1},8,["type"]))}},zi={class:"not-found"},we=M({__name:"EmptyTip",props:{text:{type:String,default:"<无>"}},setup(r){const t=r;return(n,o)=>(e.openBlock(),e.createElementBlock("span",zi,e.toDisplayString(t.text),1))}},[["__scopeId","data-v-c97e855f"]]),fa={__name:"FieldEditor",props:{modelValue:{type:Array,default:()=>[]},field:Object,type:String,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(r,{emit:t}){const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>Ru)),o=ot().fileUploadUrl,s=t,a=r,i=e.reactive({value:a.modelValue}),c=a.field.converter;function d(p){const m=i.value.findIndex(E=>E.id===p.id);i.value.splice(m,1),s("update:modelValue",i.value)}function f(p){k.ElLoading.service({text:"上传中,请稍后",background:"rgba(0,0,0,0.3)"}),_e.post(o,p).then(m=>{k.ElLoading.service().close(),k.ElMessage({message:"上传成功",type:"success"});const E=c(m.data);i.value=i.value?[...i.value,E]:[E],s("update:modelValue",i.value)}).catch(()=>{k.ElLoading.service().close(),k.ElMessage({message:"上传失败",type:"warning"})})}return e.watch(()=>a.modelValue,async()=>{i.value=a.modelValue},{immediate:!0}),(p,m)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(n),{images:i.value,props:a.field.props,onOnUpload:f,onOnRemove:d},null,8,["images","props"])]))}};/*! Element Plus v2.7.2 */var Hi={name:"zh-cn",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"确定",clear:"清空"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!"},upload:{deleteTip:"按 delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计"},tour:{next:"下一步",previous:"上一步",finish:"结束导览"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"},carousel:{leftArrow:"上一张幻灯片",rightArrow:"下一张幻灯片",indicator:"幻灯片切换至索引 {index}"}}};const qi={__name:"TooltipText",props:{content:{type:[Number,String],default:""},lineClamp:{type:[Number,String],default:1},className:{type:String},tipShowLength:{type:[Number,String]},textType:{type:String}},setup(r){const t=r,n=e.computed(()=>t.content?t.content.toString():"");return(o,s)=>(e.openBlock(),e.createElementBlock("div",null,[n.value.length>t.tipShowLength?(e.openBlock(),e.createBlock(e.unref(k.ElTooltip),{key:0,content:n.value,effect:"light"},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElText),{class:e.normalizeClass(t.className),type:t.textType,"line-clamp":t.lineClamp},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.value),1)]),_:1},8,["class","type","line-clamp"])]),_:1},8,["content"])):(e.openBlock(),e.createBlock(e.unref(k.ElText),{key:1,type:t.textType,class:e.normalizeClass(t.className)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.value),1)]),_:1},8,["type","class"]))]))}};/*! Element Plus Icons Vue v2.3.1 */var Pi=e.defineComponent({name:"ArrowDown",__name:"arrow-down",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"})]))}}),Wi=Pi,Gi=e.defineComponent({name:"CircleCloseFilled",__name:"circle-close-filled",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"})]))}}),Qi=Gi,Ji=e.defineComponent({name:"Close",__name:"close",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),pa=Ji,Ki=e.defineComponent({name:"DArrowLeft",__name:"d-arrow-left",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M529.408 149.376a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L259.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L197.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224zm256 0a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L515.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L453.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224z"})]))}}),ha=Ki,Yi=e.defineComponent({name:"DArrowRight",__name:"d-arrow-right",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M452.864 149.312a29.12 29.12 0 0 1 41.728.064L826.24 489.664a32 32 0 0 1 0 44.672L494.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L764.736 512 452.864 192a30.592 30.592 0 0 1 0-42.688m-256 0a29.12 29.12 0 0 1 41.728.064L570.24 489.664a32 32 0 0 1 0 44.672L238.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L508.736 512 196.864 192a30.592 30.592 0 0 1 0-42.688z"})]))}}),vi=Yi,Xi=e.defineComponent({name:"Delete",__name:"delete",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),Zi=Xi,el=e.defineComponent({name:"Document",__name:"document",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h160v64H320zm0 384h384v64H320z"})]))}}),ma=el,tl=e.defineComponent({name:"Download",__name:"download",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-253.696 236.288-236.352 45.248 45.248L508.8 704 192 387.2l45.248-45.248L480 584.704V128h64z"})]))}}),nl=tl,rl=e.defineComponent({name:"Grid",__name:"grid",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M640 384v256H384V384zm64 0h192v256H704zm-64 512H384V704h256zm64 0V704h192v192zm-64-768v192H384V128zm64 0h192v192H704zM320 384v256H128V384zm0 512H128V704h192zm0-768v192H128V128z"})]))}}),ol=rl,al=e.defineComponent({name:"Loading",__name:"loading",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"})]))}}),ga=al,sl=e.defineComponent({name:"Minus",__name:"minus",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64"})]))}}),il=sl,ll=e.defineComponent({name:"Operation",__name:"operation",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M389.44 768a96.064 96.064 0 0 1 181.12 0H896v64H570.56a96.064 96.064 0 0 1-181.12 0H128v-64zm192-288a96.064 96.064 0 0 1 181.12 0H896v64H762.56a96.064 96.064 0 0 1-181.12 0H128v-64zm-320-288a96.064 96.064 0 0 1 181.12 0H896v64H442.56a96.064 96.064 0 0 1-181.12 0H128v-64z"})]))}}),cl=ll,dl=e.defineComponent({name:"Plus",__name:"plus",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"})]))}}),Er=dl,ul=e.defineComponent({name:"PriceTag",__name:"price-tag",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M224 318.336V896h576V318.336L552.512 115.84a64 64 0 0 0-81.024 0zM593.024 66.304l259.2 212.096A32 32 0 0 1 864 303.168V928a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32V303.168a32 32 0 0 1 11.712-24.768l259.2-212.096a128 128 0 0 1 162.112 0z"}),e.createElementVNode("path",{fill:"currentColor",d:"M512 448a64 64 0 1 0 0-128 64 64 0 0 0 0 128m0 64a128 128 0 1 1 0-256 128 128 0 0 1 0 256"})]))}}),_a=ul,fl=e.defineComponent({name:"QuestionFilled",__name:"question-filled",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m23.744 191.488c-52.096 0-92.928 14.784-123.2 44.352-30.976 29.568-45.76 70.4-45.76 122.496h80.256c0-29.568 5.632-52.8 17.6-68.992 13.376-19.712 35.2-28.864 66.176-28.864 23.936 0 42.944 6.336 56.32 19.712 12.672 13.376 19.712 31.68 19.712 54.912 0 17.6-6.336 34.496-19.008 49.984l-8.448 9.856c-45.76 40.832-73.216 70.4-82.368 89.408-9.856 19.008-14.08 42.24-14.08 68.992v9.856h80.96v-9.856c0-16.896 3.52-31.68 10.56-45.76 6.336-12.672 15.488-24.64 28.16-35.2 33.792-29.568 54.208-48.576 60.544-55.616 16.896-22.528 26.048-51.392 26.048-86.592 0-42.944-14.08-76.736-42.24-101.376-28.16-25.344-65.472-37.312-111.232-37.312zm-12.672 406.208a54.272 54.272 0 0 0-38.72 14.784 49.408 49.408 0 0 0-15.488 38.016c0 15.488 4.928 28.16 15.488 38.016A54.848 54.848 0 0 0 523.072 768c15.488 0 28.16-4.928 38.72-14.784a51.52 51.52 0 0 0 16.192-38.72 51.968 51.968 0 0 0-15.488-38.016 55.936 55.936 0 0 0-39.424-14.784z"})]))}}),pl=fl,hl=e.defineComponent({name:"Setting",__name:"setting",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M600.704 64a32 32 0 0 1 30.464 22.208l35.2 109.376c14.784 7.232 28.928 15.36 42.432 24.512l112.384-24.192a32 32 0 0 1 34.432 15.36L944.32 364.8a32 32 0 0 1-4.032 37.504l-77.12 85.12a357.12 357.12 0 0 1 0 49.024l77.12 85.248a32 32 0 0 1 4.032 37.504l-88.704 153.6a32 32 0 0 1-34.432 15.296L708.8 803.904c-13.44 9.088-27.648 17.28-42.368 24.512l-35.264 109.376A32 32 0 0 1 600.704 960H423.296a32 32 0 0 1-30.464-22.208L357.696 828.48a351.616 351.616 0 0 1-42.56-24.64l-112.32 24.256a32 32 0 0 1-34.432-15.36L79.68 659.2a32 32 0 0 1 4.032-37.504l77.12-85.248a357.12 357.12 0 0 1 0-48.896l-77.12-85.248A32 32 0 0 1 79.68 364.8l88.704-153.6a32 32 0 0 1 34.432-15.296l112.32 24.256c13.568-9.152 27.776-17.408 42.56-24.64l35.2-109.312A32 32 0 0 1 423.232 64H600.64zm-23.424 64H446.72l-36.352 113.088-24.512 11.968a294.113 294.113 0 0 0-34.816 20.096l-22.656 15.36-116.224-25.088-65.28 113.152 79.68 88.192-1.92 27.136a293.12 293.12 0 0 0 0 40.192l1.92 27.136-79.808 88.192 65.344 113.152 116.224-25.024 22.656 15.296a294.113 294.113 0 0 0 34.816 20.096l24.512 11.968L446.72 896h130.688l36.48-113.152 24.448-11.904a288.282 288.282 0 0 0 34.752-20.096l22.592-15.296 116.288 25.024 65.28-113.152-79.744-88.192 1.92-27.136a293.12 293.12 0 0 0 0-40.256l-1.92-27.136 79.808-88.128-65.344-113.152-116.288 24.96-22.592-15.232a287.616 287.616 0 0 0-34.752-20.096l-24.448-11.904L577.344 128zM512 320a192 192 0 1 1 0 384 192 192 0 0 1 0-384m0 64a128 128 0 1 0 0 256 128 128 0 0 0 0-256"})]))}}),ml=hl,gl=e.defineComponent({name:"SuccessFilled",__name:"success-filled",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),_l=gl,yl=e.defineComponent({name:"View",__name:"view",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}}),bl=yl;const ya=10,En=Ve.defineStore("route-history",{state:()=>({root:null,history:[]}),actions:{push(r,t,n){this.history.find(s=>s.code==t)||(this.history.length>=ya&&(this.history=this.history.slice(2-ya),this.history.unshift(this.root)),this.history.push({title:r,code:t,path:n}))},setupRootPath(r,t){this.root={title:r,code:t,path:t},this.history=this.history.filter(n=>n.code!=t),this.history.unshift(this.root)},remove(r){this.history=this.history.filter(t=>t.code!=r)},getLast(){return this.history[this.history.length-1]},clear(){this.history=[]},updateTitleByCode(r,t){const n=this.history.find(o=>o.code==r);n&&(n.title=t)}}}),wl={class:"header-box"},kl={class:"header-box-left"},El={class:"page-title"},xl={class:"tabs-container"},Bl={class:"user-profile"},Sl=M({__name:"HeaderMenu",props:{config:{type:Object}},setup(r){const t=G.useRouter(),n=G.useRoute(),o=En(),s=e.ref("首页"),a=r,i=n.fullPath.split("/")[1],c=B();o.setupRootPath("首页",`/${i}/home`);function d(y){var x,C;const h=y.meta.side,b=y.params.domain;let _=(x=y.meta)==null?void 0:x.title,w=(C=y.meta)==null?void 0:C.code;if(h&&b)_=wr()[h][y.params.domain].name,w=y.params.domain,y.params.id&&(_=`${_} - ${y.params.id}`,w=`${y.params.domain}-${y.params.id}`);else{const N=c.find(D=>D.route===y.path);N&&(_=N.title,w=N.route)}_&&w&&(o.push(_,w,y.fullPath),s.value=w)}function f(y){const h=o.history.find(b=>b.code==y.props.name);t.push(h.path)}function p(y){if(o.remove(y),y==s.value){const h=o.getLast();s.value=h.title,t.push(h.path)}}const m=(y,h)=>{const b=o.history.length;return y===0&&h==="self"||y<2&&h==="left"||y===b-1&&h==="right"||b===1&&h==="all"?!1:!(b<2&&h==="other")};function E(y,h){const b=[],_=o.history;switch(h){case"self":b.push(_[y].code);break;case"left":for(let w=0;w<y;w++)w!==0&&b.push(_[w].code);break;case"right":for(let w=y+1;w<_.length;w++)b.push(_[w].code);break;case"all":for(let w=0;w<_.length;w++)w!==0&&b.push(_[w].code);break;case"other":for(let w=1;w<_.length;w++)w!==y&&b.push(_[w].code);break}for(let w=0;w<b.length;w++)p(b[w])}function B(){return a.config.sideMenus[i].map(y=>y.children?y.children:y).flat()}return e.watch(()=>t.currentRoute.value,()=>{d(n)},{immediate:!0}),(y,h)=>(e.openBlock(),e.createElementBlock("div",wl,[e.createElementVNode("div",null,[e.createElementVNode("div",kl,[e.createVNode(e.unref(k.ElImage),{class:"header-img",src:a.config.logo,fit:"scale-down"},null,8,["src"]),e.createElementVNode("div",El,e.toDisplayString(a.config.name),1)])]),e.createElementVNode("div",xl,[e.createVNode(e.unref(k.ElTabs),{modelValue:s.value,"onUpdate:modelValue":h[0]||(h[0]=b=>s.value=b),type:"card",class:"tabs",onTabClick:f,onTabRemove:p},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o).history,(b,_)=>(e.openBlock(),e.createBlock(e.unref(k.ElTabPane),{closable:b.title!="首页",label:b.title,name:b.code},{label:e.withCtx(()=>[e.createVNode(e.unref(k.ElDropdown),{trigger:"contextmenu"},{dropdown:e.withCtx(()=>[e.createVNode(e.unref(k.ElDropdownMenu),null,{default:e.withCtx(()=>[m(_,"self")?(e.openBlock(),e.createBlock(e.unref(k.ElDropdownItem),{key:0,onClick:w=>E(_,"self")},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(pa))]),_:1}),e.createTextVNode(" 关闭当前标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),m(_,"left")?(e.openBlock(),e.createBlock(e.unref(k.ElDropdownItem),{key:1,onClick:w=>E(_,"left")},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(ha))]),_:1}),e.createTextVNode(" 关闭左侧标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),m(_,"right")?(e.openBlock(),e.createBlock(e.unref(k.ElDropdownItem),{key:2,onClick:w=>E(_,"right")},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(vi))]),_:1}),e.createTextVNode(" 关闭右侧标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),m(_,"all")?(e.openBlock(),e.createBlock(e.unref(k.ElDropdownItem),{key:3,onClick:w=>E(_,"all")},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(il))]),_:1}),e.createTextVNode(" 关闭全部标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),m(_,"other")?(e.openBlock(),e.createBlock(e.unref(k.ElDropdownItem),{key:4,onClick:w=>E(_,"other")},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(cl))]),_:1}),e.createTextVNode(" 关闭其他标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)]),_:2},1024)]),default:e.withCtx(()=>[e.createVNode(qi,{content:b.title,"line-clamp":1,"class-name":"tab-pane-label","tip-show-length":"6"},null,8,["content"])]),_:2},1024)]),_:2},1032,["closable","label","name"]))),256))]),_:1},8,["modelValue"]),e.createElementVNode("span",{class:"back-icon",onClick:h[1]||(h[1]=b=>e.unref(t).back())},[e.createVNode(e.unref(k.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(ha))]),_:1})])]),e.createElementVNode("div",Bl,[e.renderSlot(y.$slots,"user-profile",{},void 0,!0)])]))}},[["__scopeId","data-v-ff10d720"]]),Cl=r=>(e.pushScopeId("data-v-22a49b3f"),r=r(),e.popScopeId(),r),$l={key:2,class:"dot-wrapper"},Vl=[Cl(()=>e.createElementVNode("span",{class:"dot"},null,-1))],ba=M({__name:"SideBarItem",props:{data:{type:Object},hasParent:{type:Boolean,default:!1}},setup(r){const t=r;return(n,o)=>r.data.children?(e.openBlock(),e.createBlock(e.unref(k.ElSubMenu),{key:0,index:r.data.title},{title:e.withCtx(()=>[r.data.icon?(e.openBlock(),e.createBlock(e.unref(k.ElIcon),{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.data.icon)))]),_:1})):(e.openBlock(),e.createBlock(e.unref(k.ElIcon),{key:1},{default:e.withCtx(()=>[e.createVNode(e.unref(_a))]),_:1})),e.createElementVNode("span",null,e.toDisplayString(r.data.title),1)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.data.children,s=>(e.openBlock(),e.createBlock(ba,{data:s,"has-parent":!0},null,8,["data"]))),256))]),_:1},8,["index"])):(e.openBlock(),e.createBlock(e.unref(k.ElMenuItem),{key:1,index:r.data.route,route:r.data.route,class:"menu-item"},{default:e.withCtx(()=>[r.data.icon?(e.openBlock(),e.createBlock(e.unref(k.ElIcon),{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.data.icon)))]),_:1})):t.hasParent?(e.openBlock(),e.createElementBlock("span",$l,Vl)):(e.openBlock(),e.createBlock(e.unref(k.ElIcon),{key:1},{default:e.withCtx(()=>[e.createVNode(e.unref(_a))]),_:1})),e.createElementVNode("span",null,e.toDisplayString(r.data.title),1)]),_:1},8,["index","route"]))}},[["__scopeId","data-v-22a49b3f"]]),Ol=M({__name:"SideBar",props:{sideMenus:{type:Object}},setup(r){const t=G.useRouter(),n=G.useRoute(),o=e.ref(n.fullPath),s=r,a=n.fullPath.split("/")[1],i=s.sideMenus[a];return e.watch(()=>t.currentRoute.value,()=>{var c;if((c=n.meta)!=null&&c.side){const d=n.meta.side;o.value=`/${d}/${n.params.domain}/list`}else o.value=n.fullPath},{immediate:!0}),(c,d)=>(e.openBlock(),e.createBlock(e.unref(k.ElScrollbar),null,{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElMenu),{class:"menu",router:!0,"default-active":o.value},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),f=>(e.openBlock(),e.createBlock(ba,{data:f},null,8,["data"]))),256))]),_:1},8,["default-active"])]),_:1}))}},[["__scopeId","data-v-4b892735"]]),Tl=M({__name:"BaseLayout",props:{config:{type:Object,default:()=>({})}},setup(r){const t=G.useRoute(),n=r,o={...ot(),...n.config},s=e.computed(()=>t.params.domain?t.params.domain:t.fullPath);return(a,i)=>{const c=e.resolveComponent("router-view");return e.openBlock(),e.createBlock(e.unref(k.ElConfigProvider),{locale:e.unref(Hi)},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElContainer),{style:{height:"100%"}},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElHeader),{class:"page-header"},{default:e.withCtx(()=>[e.createVNode(Sl,{config:o},{"user-profile":e.withCtx(()=>[e.renderSlot(a.$slots,"user-profile",{},void 0,!0)]),_:3})]),_:3}),e.createVNode(e.unref(k.ElContainer),{class:"page-content-container"},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElAside),{class:"page-content-aside"},{default:e.withCtx(()=>[e.createVNode(Ol,{"side-menus":o.sideMenus},null,8,["side-menus"])]),_:1}),e.createVNode(e.unref(k.ElMain),{class:"page-content-main"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(c,{key:s.value}))]),_:1})]),_:1})]),_:3})]),_:3},8,["locale"])}}},[["__scopeId","data-v-ea73195f"]]),Ne=Ve.defineStore("data-table-mode",{state:()=>({mode:"list",created:-1,updated:-1,removed:-1}),actions:{change(r){r&&(this.mode=r)},fireCreated(){this.created=Date.now()},fireUpdated(){this.updated=Date.now()},fireRemoved(){this.removed=Date.now()}}}),Lt=(r,t,n,o)=>Ve.defineStore(`${t}-${r}-filter`,{state:()=>({filters:{}}),getters:{validFilters(){return Nl(r,t,this.filters,n,o)}},actions:{change(s){this.filters={...this.filters,...s},xr(r,t,this.filters)},$reset(s){this.filters={isDeleted:this.filters.isDeleted,...s},xr(r,t,this.filters)}}});function Nl(r,t,n,o,s){let i={...Al(r,t,o),...n};return s!=null&&s.setupCreate&&(i=s.setupCreate(i)),xr(r,t,i)}function Al(r,t,n){const o=`filters---${t}---${r}`;let s={};return localStorage.getItem(o)&&(s=JSON.parse(localStorage.getItem(o))),Object.keys(s).filter(a=>Object.keys(n).includes(a)).reduce((a,i)=>(a[i]=s[i],a),{})}function xr(r,t,n){const o=`filters---${t}---${r}`,s=Dl(n);return localStorage.setItem(o,JSON.stringify(s)),s}function Dl(r){return Object.keys(r).filter(t=>r[t]!=null&&r[t]!=null&&r[t]!="").reduce((t,n)=>(t[n]=r[n],t),{})}const Fl={class:"sorters-box"},jl=["onClick"],Rl={class:"sorters-label"},Il={class:"sorters-arrow-box"},Ll=["onClick"],Ml=["onClick"],Ul=M({__name:"FiltersSorters",props:{sorters:{type:Object},value:{type:Array,default(){return[]}}},emits:["updateSorters"],setup(r,{emit:t}){const n=t,o=r,s=e.ref([]);async function a(){typeof o.sorters.sortersList=="function"?s.value=await o.sorters.sortersList():s.value=o.sorters.sortersList}a(),e.watch(()=>o.value,()=>{i()}),e.watch(()=>s,()=>{i()},{immediate:!0});function i(){if(o.value.length>0)for(let d=0;d<s.value.length;d++){const f=s.value[d];for(let p=0;p<o.value.length;p++){const m=o.value[p];f.field===m.field&&(f.order=m.order)}}else for(let d=0;d<s.value.length;d++)s.value[d].order=""}function c(d,f){const p=s.value;f?p[d].order=f:p[d].order?p[d].order==="ASC"?p[d].order="DESC":p[d].order==="DESC"&&(p[d].order=""):p[d].order="ASC",n("updateSorters",p.filter(m=>m.order))}return(d,f)=>(e.openBlock(),e.createElementBlock("div",Fl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(p,m)=>(e.openBlock(),e.createElementBlock("div",{class:"sorters-item",onClick:E=>c(m,"")},[e.createElementVNode("div",Rl,e.toDisplayString(p.name),1),e.createElementVNode("div",Il,[e.createElementVNode("i",{class:e.normalizeClass(["sort-caret ascending",p.order==="ASC"?"ascending-active":""]),onClick:e.withModifiers(E=>c(m,"ASC"),["stop"])},null,10,Ll),e.createElementVNode("i",{class:e.normalizeClass(["sort-caret descending",p.order==="DESC"?"descending-active":""]),onClick:e.withModifiers(E=>c(m,"DESC"),["stop"])},null,10,Ml)])],8,jl))),256))]))}},[["__scopeId","data-v-fa20b02a"]]),zl={class:"ranges-box"},Hl={class:"range-item"},ql={class:"range-label"},Pl={class:"range-input-box"},Wl=M({__name:"FiltersRange",props:{ranges:{type:Object},value:{type:Array,default(){return[]}}},emits:["updateRanges"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive(o.ranges.rangesList);e.watch(()=>o.value,()=>{a()});function a(){o.value&&o.value.length>0?s.forEach(c=>{o.value.forEach(d=>{c.field===d.field&&(c.min=d.min?Number(d.min):null,c.max=d.max?Number(d.max):null)})}):s.forEach(c=>{c.min=null,c.max=null})}function i(c,d,f){const p=[...s];p.forEach(m=>{m.field===d&&(m[f]=c)}),n("updateRanges",p.filter(m=>m.min||m.max))}return a(),(c,d)=>(e.openBlock(),e.createElementBlock("div",zl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s,f=>(e.openBlock(),e.createElementBlock("div",Hl,[e.createElementVNode("div",ql,e.toDisplayString(f.name),1),e.createElementVNode("div",Pl,[e.createVNode(e.unref(k.ElInputNumber),{modelValue:f.min,"onUpdate:modelValue":p=>f.min=p,"controls-position":"right",class:"input-box",onChange:p=>{i(p,f.field,"min")}},null,8,["modelValue","onUpdate:modelValue","onChange"]),e.createVNode(e.unref(k.ElInputNumber),{modelValue:f.max,"onUpdate:modelValue":p=>f.max=p,"controls-position":"right",class:"input-box",type:"number",onChange:p=>{i(p,f.field,"max")}},null,8,["modelValue","onUpdate:modelValue","onChange"])])]))),256))]))}},[["__scopeId","data-v-30f46526"]]),Gl={key:0},Ql=M({__name:"FiltersEditor",props:{settings:{type:Object}},setup(r){const t=r,n=G.useRoute(),o=Z(n),s=e.ref([]),a=e.reactive({}),i=e.reactive({}),c=Lt(t.settings.code,n.path,t.settings.filters,t.settings.filterHook)();c.$subscribe((_,w)=>{w.filters.isDeleted!==a.isDeleted&&(Object.keys(a).forEach(x=>{a[x]=void 0}),a.isDeleted=w.filters.isDeleted)});function d(_){return typeof _=="boolean"?_:typeof _=="function"?_(o):!0}async function f(_,w){if(typeof _.options=="function")i[_.code]=await _.options(a,o,w);else if(Array.isArray(_.options))i[_.code]=_.options;else if(typeof _.options=="object"){const x=_.options.getOneUrl?_.options.getOneUrl:_.options.url;if(Array.isArray(a[_.code])&&a[_.code].length>0)i[_.code]=[],a[_.code].forEach(C=>{x.getOne({id:C}).then(N=>{i[_.code].push({code:N.data[_.options.data.value]||N.data.id,name:N.data[_.options.data.label]||N.data.name})})});else if(!Array.isArray(a[_.code])&&a[_.code])x.getOne({id:a[_.code]}).then(C=>{i[_.code]=[{code:C.data[_.options.data.value]||C.data.id,name:C.data[_.options.data.label]||C.data.name}]});else{const C=_.options.query.keyWord.toString();_.options.url.getList({..._.options.query,[C]:w}).then(N=>{i[_.code]=N.data.rows.map(D=>({code:D[_.options.data.value]||D.id,name:D[_.options.data.label]||D.name}))})}}}function p(_){if(_.remote)return w=>{f(_,w)}}function m(_){a.sorters=_,h()}function E(_){a.filters=_}function B(){Object.keys(a).forEach(_=>{a[_]=void 0}),s.value=Object.keys(t.settings.filters).filter(_=>d(t.settings.filters[_].visible)).map(_=>{const w={...t.settings.filters[_],code:_};return a[_]=y(_),(w.type==="select"||w.type==="selectV2"||w.type==="tree")&&f(w),w}).filter(_=>_.code!=="isDeleted")}function y(_){const w=t.settings.filters[_],x=c.validFilters[_];return w.type==="boolean"&&typeof x!="boolean"?w.value:x}function h(){let _=JSON.parse(JSON.stringify(a));const w=t.settings.filterHook;w!=null&&w.preSubmit&&(_=w.preSubmit(_,o)),c.change(_)}function b(){c.$reset({}),B(),h()}return e.watch(()=>t.settings,()=>{B(),h()},{immediate:!0}),(_,w)=>Object.keys(t.settings.filters).length>0?(e.openBlock(),e.createElementBlock("div",Gl,[e.createVNode(e.unref(k.ElForm),{model:a,inline:"",class:"form-editor"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,x=>(e.openBlock(),e.createBlock(e.unref(k.ElFormItem),null,{default:e.withCtx(()=>[x.type==="boolean"?(e.openBlock(),e.createBlock(e.unref(k.ElSelect),{key:0,modelValue:a[x.code],"onUpdate:modelValue":C=>a[x.code]=C,filterable:"",clearable:"",placeholder:`是否${x.name}`,"value-on-clear":null,onChange:h},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElOption),{value:!0,label:`已${x.name}`},null,8,["label"]),e.createVNode(e.unref(k.ElOption),{value:!1,label:`未${x.name}`},null,8,["label"])]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder"])):x.type==="select"?(e.openBlock(),e.createBlock(e.unref(k.ElSelect),{key:1,modelValue:a[x.code],"onUpdate:modelValue":C=>a[x.code]=C,filterable:"",clearable:"",remote:"","reserve-keyword":"","remote-show-suffix":"","fit-input-width":"",placeholder:x.name,multiple:x.multiple,"collapse-tags":"",class:e.normalizeClass(x.multiple?"tags-selects-input":""),"multiple-limit":x.multipleLimit?x.multipleLimit:0,"remote-method":p(x),"value-on-clear":null,onChange:h},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i[x.code],C=>(e.openBlock(),e.createBlock(e.unref(k.ElOption),{key:C.code,label:C.name,value:C.code,title:C.name},null,8,["label","value","title"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder","multiple","class","multiple-limit","remote-method"])):x.type==="selectV2"?(e.openBlock(),e.createBlock(e.unref(k.ElSelectV2),{key:2,modelValue:a[x.code],"onUpdate:modelValue":C=>a[x.code]=C,filterable:"",options:i[x.code]?i[x.code]:[],props:{label:"name",value:"code"},multiple:x.multiple,placeholder:x.name,clearable:"","value-on-clear":null,onChange:h},null,8,["modelValue","onUpdate:modelValue","options","multiple","placeholder"])):x.type==="sorters"?(e.openBlock(),e.createBlock(Ul,{key:3,value:a[x.code],sorters:x,onUpdateSorters:m},null,8,["value","sorters"])):x.type==="range"?(e.openBlock(),e.createBlock(Wl,{key:4,value:a[x.code],ranges:x,onUpdateRanges:E},null,8,["value","ranges"])):x.type==="datetime"?(e.openBlock(),e.createBlock(e.unref(k.ElDatePicker),{key:5,modelValue:a[x.code],"onUpdate:modelValue":C=>a[x.code]=C,type:"datetime",format:"YYYY-MM-DD HH:mm:ss","value-format":"YYYY-MM-DD HH:mm:ss",placeholder:x.name},null,8,["modelValue","onUpdate:modelValue","placeholder"])):x.type==="datetime-range"?(e.openBlock(),e.createBlock(e.unref(k.ElDatePicker),{key:6,modelValue:a[x.code],"onUpdate:modelValue":C=>a[x.code]=C,type:"datetimerange",format:"YYYY-MM-DD HH:mm:ss","value-format":"YYYY-MM-DD HH:mm:ss","start-placeholder":x.name,"end-placeholder":x.name,placeholder:x.name},null,8,["modelValue","onUpdate:modelValue","start-placeholder","end-placeholder","placeholder"])):(e.openBlock(),e.createBlock(e.unref(k.ElInput),{key:7,modelValue:a[x.code],"onUpdate:modelValue":C=>a[x.code]=C,modelModifiers:{trim:!0},placeholder:x.name,type:x.type,clearable:""},null,8,["modelValue","onUpdate:modelValue","placeholder","type"]))]),_:2},1024))),256)),s.value.length>0?(e.openBlock(),e.createBlock(e.unref(k.ElFormItem),{key:0},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElButton),{type:"primary",onClick:h},{default:e.withCtx(()=>[e.createTextVNode(" 查询 ")]),_:1}),e.createVNode(e.unref(k.ElButton),{onClick:b},{default:e.withCtx(()=>[e.createTextVNode(" 重置 ")]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["model"])])):e.createCommentVNode("",!0)}},[["__scopeId","data-v-cadbb5a7"]]),Jl={class:"data-page-title"},Kl={class:"title"},Yl={class:"data-page-toolbar"},vl=M({__name:"DataTableHeader",props:{settings:{type:Object}},setup(r){const t=r,n=t.settings.name,o=G.useRoute(),s=Ne(),a=Lt(t.settings.code,o.path,t.settings.filters,t.settings.filterHook)(),i=e.useSlots(),c=e.computed(()=>a.validFilters.isDeleted||!1);function d(){a.$reset({isDeleted:!c.value})}function f(){const m=`table-view-${o.path}-${t.settings.code}`,E=localStorage.getItem(m);s.change(E)}function p(m){s.change(m);const E=`table-view-${o.path}-${t.settings.code}`;localStorage.setItem(E,s.mode)}return e.onMounted(f),(m,E)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Jl,[e.createElementVNode("div",Kl,e.toDisplayString(c.value?`已删除的${e.unref(n)}`:e.unref(n)),1),e.createElementVNode("div",Yl,[e.unref(i).operations?(e.openBlock(),e.createBlock(e.unref(k.ElButtonGroup),{key:0,class:"button-groups"},{default:e.withCtx(()=>[e.renderSlot(m.$slots,"operations",{},void 0,!0)]),_:3})):e.createCommentVNode("",!0),e.createVNode(e.unref(k.ElButtonGroup),{class:"button-groups"},{default:e.withCtx(()=>[e.renderSlot(m.$slots,"tools",{},void 0,!0)]),_:3}),e.createVNode(e.unref(k.ElDropdown),{trigger:"click",onCommand:p},{dropdown:e.withCtx(()=>[e.createVNode(e.unref(k.ElDropdownMenu),null,{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElDropdownItem),{command:"list"},{default:e.withCtx(()=>[e.createTextVNode(" 列表 ")]),_:1}),e.createVNode(e.unref(k.ElDropdownItem),{command:"grid"},{default:e.withCtx(()=>[e.createTextVNode(" 网格 ")]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(k.ElButton),null,{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(ol))]),_:1}),e.createVNode(e.unref(k.ElIcon),{class:"el-icon--right"},{default:e.withCtx(()=>[e.createVNode(e.unref(Wi))]),_:1})]),_:1})]),_:1}),t.settings.filters.isDeleted?(e.openBlock(),e.createBlock(e.unref(k.ElDropdown),{key:1,trigger:"click"},{dropdown:e.withCtx(()=>[e.createVNode(e.unref(k.ElDropdownMenu),null,{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElDropdownItem),{command:"deleted",onClick:d},{default:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(c.value?"未删除":"已删除"),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(k.ElButton),null,{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(ml))]),_:1})]),_:1})]),_:1})):e.createCommentVNode("",!0)])]),e.createVNode(Ql,{settings:t.settings},null,8,["settings"])],64))}},[["__scopeId","data-v-4bec2921"]]),Xl={class:"kst-field-row-id"},Zl={key:0},ec={key:1,class:"mono-data"},tc={key:1},wa=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object},mode:{type:String}},setup(r){const t=e.useSlots(),n=G.useRoute(),o=r,s=n.meta.side,a=o.row[o.field.code],i=e.computed(()=>({path:`/${s}/${o.field.domain}/${a}`,query:{...Z(n),...o.field.rowQuery(o.row)}}));function c(){return o.field.isRouter(o.row,Z(n))}return(d,f)=>{const p=e.resolveComponent("RouterLink");return e.openBlock(),e.createElementBlock("div",Xl,[e.unref(a)?(e.openBlock(),e.createElementBlock("span",Zl,[c()?(e.openBlock(),e.createBlock(p,{key:0,class:"bld-link mono-data",to:i.value},{default:e.withCtx(()=>[e.unref(t).name?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.renderSlot(d.$slots,"name",{},void 0,!0),e.createTextVNode("(#"+e.toDisplayString(e.unref(a))+") ",1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(" #"+e.toDisplayString(e.unref(a)),1)],64))]),_:3},8,["to"])):(e.openBlock(),e.createElementBlock("span",ec,[e.unref(t).name?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.renderSlot(d.$slots,"name",{},void 0,!0),e.createTextVNode("("+e.toDisplayString(e.unref(a))+") ",1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(e.unref(a)),1)],64))]))])):(e.openBlock(),e.createElementBlock("span",tc," NO ID "))])}}},[["__scopeId","data-v-4defcffa"]]);function nc(r){k.ElMessage(r)}const rc={show:nc},Br={__name:"DomainEdit",props:{row:{type:Object},settings:{type:Object},operations:{type:Object,default:()=>{}},isDetail:{type:Boolean,default:!1}},setup(r){var y;const t=En(),n=Ne(),o=G.useRoute(),s=G.useRouter(),a=Z(o),i=r,c=e.ref({}),d=e.ref(!1),f=e.computed(()=>{var h,b;return i.row.deletedAt?!1:(h=i.operations)!=null&&h.updatable?!0:!!((b=i.operations)!=null&&b.removable)}),p=e.ref((y=i.operations)==null?void 0:y.removable);async function m(){const h=i.settings.formHook,b=i.settings.btnVisible,_=i.settings.rest,{data:w}=await _.getOne({...i.row,...a});c.value=w,h.setupUpdate&&(c.value=h.setupUpdate(c.value)),b.showRemove&&(p.value=b.showRemove(c.value)),d.value=!0}function E(h,b){const _=i.settings.formHook,w=i.settings.rest;Object.keys(a).forEach(x=>{h[x]=a[x]}),_!=null&&_.preUpdateSubmit&&(h=_.preUpdateSubmit(h)),w.update(h).then(()=>{d.value=!1,n.fireUpdated()}).catch(async()=>{b()})}function B(h,b){i.settings.rest.remove(h).then(()=>{rc.show({type:"success",message:"删除成功"}),d.value=!1,i.isDetail&&t.history.forEach(w=>{o.fullPath.includes(w.path)&&(t.remove(w.code),s.back())}),n.fireRemoved()}).catch(()=>{b()})}return(h,b)=>f.value?(e.openBlock(),e.createBlock(e.unref(k.ElButton),{key:0,type:"primary",onClick:m},{default:e.withCtx(()=>[e.createTextVNode(" 编辑 "),d.value?(e.openBlock(),e.createBlock(kn,{key:0,modelValue:d.value,"onUpdate:modelValue":b[0]||(b[0]=_=>d.value=_),config:i.settings,data:c.value,removable:p.value,onSubmit:E,onRemove:B},null,8,["modelValue","config","data","removable"])):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0)}},oc=r=>(e.pushScopeId("data-v-8ddab769"),r=r(),e.popScopeId(),r),ac={class:"data-grid-wrapper"},sc={key:0,class:"cover"},ic=oc(()=>e.createElementVNode("div",{class:"image-slot"},null,-1)),lc={class:"header"},cc={class:"body"},dc={key:0},uc={class:"key"},fc={class:"value"},pc={key:1,class:"footer tools"},hc=M({__name:"DataGrid",props:{settings:{type:Object},data:{type:Array},operations:{type:Object,default:()=>{}}},setup(r){const t=G.useRoute(),n=Z(t),o=e.useSlots(),s=r,a=Lt(s.settings.code,t.path,s.settings.filters,s.settings.filterHook)(),{filters:i}=Ve.storeToRefs(a),c=e.ref(i.value),d=e.shallowRef([]),f=e.shallowRef(null),p=e.computed(()=>{var B,y;return!!((B=s.operations)!=null&&B.updatable||(y=s.operations)!=null&&y.removable)});function m(){f.value=s.settings.fields.find(B=>B.code==="id"),d.value=s.settings.fields.filter(B=>B.code===s.settings.coverField||B.code===s.settings.nameField||B.code==="id"?!1:B.showInList(n,c.value))}function E(B){return s.settings.nameField?B[s.settings.nameField]:B.name?B.name:`${B.id}`}return e.watch(i,B=>{c.value=B,m()}),m(),(B,y)=>(e.openBlock(),e.createElementBlock("div",ac,[r.data.length===0?(e.openBlock(),e.createBlock(e.unref(k.ElEmpty),{key:0,description:"暂无数据"})):(e.openBlock(),e.createBlock(e.unref(k.ElRow),{key:1,gutter:20},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.data,h=>(e.openBlock(),e.createBlock(e.unref(k.ElCol),{style:{"margin-bottom":"20px"},xs:24,sm:12,md:8,lg:6,xl:4},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElCard),{"body-style":{padding:"0px"},shadow:"hover"},{default:e.withCtx(()=>[e.unref(o).cover||s.settings.coverField?(e.openBlock(),e.createElementBlock("div",sc,[e.unref(o).cover?e.renderSlot(B.$slots,"cover",{key:0,row:h},void 0,!0):(e.openBlock(),e.createBlock(e.unref(k.ElImage),{key:1,src:h[s.settings.coverField],fit:"contain"},{error:e.withCtx(()=>[ic]),_:2},1032,["src"]))])):e.createCommentVNode("",!0),e.createElementVNode("div",lc,[e.createVNode(wa,{field:f.value,row:h},e.createSlots({_:2},[h[s.settings.nameField]?{name:"name",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(E(h)),1)]),key:"0"}:void 0]),1032,["field","row"])]),e.createElementVNode("div",cc,[e.unref(o).body?(e.openBlock(),e.createElementBlock("div",dc,[e.renderSlot(B.$slots,"body",{row:h},void 0,!0)])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(d.value,b=>(e.openBlock(),e.createElementBlock("div",{key:b.code,class:"field mono-data"},[e.createElementVNode("div",uc,e.toDisplayString(b.label)+" ",1),e.createElementVNode("div",fc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(b.display),{field:b,row:h,mode:"grid"},null,8,["field","row"]))])]))),128))]),e.unref(o).actions||p.value?(e.openBlock(),e.createElementBlock("div",pc,[e.unref(o).actions?(e.openBlock(),e.createBlock(e.unref(k.ElButtonGroup),{key:0,size:"small"},{default:e.withCtx(()=>[e.renderSlot(B.$slots,"actions",{row:h},void 0,!0)]),_:2},1024)):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createBlock(e.unref(k.ElButtonGroup),{key:1,size:"small"},{default:e.withCtx(()=>[e.createVNode(Br,{row:h,settings:s.settings,operations:s.operations},null,8,["row","settings","operations"])]),_:2},1024)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:2},1024)]),_:2},1024))),256))]),_:3}))]))}},[["__scopeId","data-v-8ddab769"]]);function mc(r,t){const n=r.fields.map(s=>s.code),o=Object.keys(t);n.forEach(s=>{o.includes(s)||console.error(`${r.code}.${s} : 与服务端数据不匹配`)})}const ka=M({__name:"DataList",props:{settings:{type:Object},data:{type:Array,default:()=>[]},operations:{type:Object,default:()=>{}},operationsWidth:{type:Number,default:100},actionsWidth:{type:Number,default:150}},emits:["sort-column","select-change","enable-item"],setup(r,{emit:t}){const n=G.useRoute(),o=Z(n),s=t,a=e.useSlots(),i=r,c=Lt(i.settings.code,n.path,i.settings.filters,i.settings.filterHook)(),{filters:d}=Ve.storeToRefs(c),f=e.ref(d.value),p=e.shallowRef([]),m=e.computed(()=>{var b,_;return!!((b=i.operations)!=null&&b.updatable||(_=i.operations)!=null&&_.removable)});function E(b){s("sort-column",b)}function B(b){s("enable-item",b)}function y(){p.value=i.settings.fields.filter(b=>b.showInList(o,f.value))}function h(b){s("select-change",{routeQuery:o,data:b})}return y(),e.watch(()=>i.data,()=>{i.data.length>0&&mc(i.settings,i.data[0])}),e.watch(d,b=>{f.value=b,y()}),(b,_)=>(e.openBlock(),e.createBlock(e.unref(k.ElTable),{ref:"dataTable",class:"table mono-data",data:i.data,"show-overflow-tooltip":"","highlight-current-row":"","row-key":"id",onSelectionChange:h,onSortChange:E},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElTableColumn),{type:"selection",width:"40"}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,w=>(e.openBlock(),e.createBlock(e.unref(k.ElTableColumn),{key:w.code,label:w.label,width:w.width,prop:w.code,sortable:w.sortable?"custom":!1,fixed:w.fixed},e.createSlots({_:2},[w.type==="switch"?{name:"default",fn:e.withCtx(({row:x})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w.display),{field:w,row:x,mode:"list",onEnable:B},null,40,["field","row"]))]),key:"0"}:{name:"default",fn:e.withCtx(({row:x})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w.display),{key:x.updatedAt,field:w,row:x,mode:"list"},null,8,["field","row"]))]),key:"1"}]),1032,["label","width","prop","sortable","fixed"]))),128)),e.unref(a).actions?(e.openBlock(),e.createBlock(e.unref(k.ElTableColumn),{key:0,label:"管理",fixed:"right",width:i.actionsWidth},{default:e.withCtx(({row:w})=>[e.createVNode(e.unref(k.ElButtonGroup),{size:"small"},{default:e.withCtx(()=>[e.renderSlot(b.$slots,"actions",{row:w},void 0,!0)]),_:2},1024)]),_:3},8,["width"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createBlock(e.unref(k.ElTableColumn),{key:1,fixed:"right",label:"操作",width:i.operationsWidth},{default:e.withCtx(({row:w})=>[e.createVNode(e.unref(k.ElButtonGroup),{size:"small"},{default:e.withCtx(()=>[e.createVNode(Br,{row:w,settings:i.settings,operations:i.operations},null,8,["row","settings","operations"])]),_:2},1024)]),_:1},8,["width"])):e.createCommentVNode("",!0)]),_:3},8,["data"]))}},[["__scopeId","data-v-43048eeb"]]),gc={__name:"DataTable",props:{data:{type:Array},settings:{type:Object},operationsWidth:{type:Number},actionsWidth:{type:Number}},setup(r){const t=Ne();t.$reset();const{mode:n}=Ve.storeToRefs(t),o=e.useSlots(),s=r,a=e.shallowRef(ka);function i(c){c=="grid"?a.value=hc:a.value=ka}return e.watch(n,c=>{i(c)}),(c,d)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.value),e.normalizeProps(e.guardReactiveProps(s)),e.createSlots({_:2},[e.renderList(e.unref(o),(f,p)=>({name:p,fn:e.withCtx(m=>[e.renderSlot(c.$slots,p,e.normalizeProps(e.guardReactiveProps(m||{})))])}))]),1040))}},_c={__name:"DomainNew",props:{settings:{type:Object},operations:{type:Object,default:()=>{}}},setup(r){const t=Ne(),n=G.useRoute(),o=Z(n),s=r,a=e.ref({}),i=e.ref(!1),c=e.computed(()=>{var p;return!!((p=s.operations)!=null&&p.creatable)});async function d(){const p=s.settings.formHook,m=s.settings.fields.reduce((E,B)=>(E[B.code]=B.default,E),{});a.value=m,p.setupCreate&&(a.value=p.setupCreate(a.value)),i.value=!0}function f(p,m){const E=s.settings.formHook,B=s.settings.rest;Object.keys(o).forEach(y=>{p[y]=o[y]}),E!=null&&E.preCreateSubmit&&(p=E.preCreateSubmit(p)),B.create(p).then(()=>{i.value=!1,t.fireCreated()}).catch(async()=>{m()})}return(p,m)=>c.value?(e.openBlock(),e.createBlock(e.unref(k.ElButton),{key:0,type:"success",onClick:d},{default:e.withCtx(()=>[e.createTextVNode(" 添加 "),i.value?(e.openBlock(),e.createBlock(kn,{key:0,modelValue:i.value,"onUpdate:modelValue":m[0]||(m[0]=E=>i.value=E),config:s.settings,data:a.value,removable:!1,onSubmit:f},null,8,["modelValue","config","data"])):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0)}},Ea={__name:"RowActions",props:{row:{type:Object},settings:{type:Object},query:{type:Object}},setup(r){const t=G.useRouter(),n=Ne(),o=r,s=e.shallowRef([]);let a="";async function i(d,f){if(a=k.ElLoading.service({fullscreen:!0}),d.path){a.close(),c(d,f);return}const p=await It.getValue();try{await d.action({...f,...o.query,idempotentToken:p}),a.close(),n.fireUpdated()}catch{a.close(),n.fireUpdated()}}function c(d,f){t.push(d.path(f,o.query))}return e.watch(()=>o.row,()=>{s.value=o.settings.rowActions(o.query)},{immediate:!0}),(d,f)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,p=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[p.isVisible(o.row)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[p.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p.component),{key:0,row:r.row},null,8,["row"])):(e.openBlock(),e.createBlock(e.unref(k.ElButton),{key:1,type:p.type?p.type:"primary",onClick:m=>i(p,o.row)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.name),1)]),_:2},1032,["type","onClick"]))],64)):e.createCommentVNode("",!0)],64))),256))}},yc={__name:"PageActions",props:{settings:{type:Object},tableDataSelect:{type:Object},query:{type:Object}},setup(r){const t=Ne(),n=r,o=e.shallowRef([]),s=e.computed(()=>{var c,d;return((d=(c=n.tableDataSelect)==null?void 0:c.data)==null?void 0:d.length)>0}),a=e.ref(!1);async function i(c){a.value=!0;const d=await It.getValue();try{await c.action({...n.tableDataSelect,idempotentToken:d}),a.value=!1,t.fireUpdated()}catch{a.value=!1,t.fireUpdated()}}return e.watch(()=>n.row,()=>{o.value=n.settings.pageActions(n.query)},{immediate:!0}),(c,d)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,f=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[f.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f.component),{key:0,item:f,settings:r.settings,query:r.query,"table-data-select":r.tableDataSelect},null,8,["item","settings","query","table-data-select"])):(e.openBlock(),e.createBlock(e.unref(k.ElButton),{key:1,type:f.type,loading:a.value,disabled:!f.enable&&!s.value,onClick:p=>i(f)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.name),1)]),_:2},1032,["type","loading","disabled","onClick"]))],64))),256))}},bc={class:"pagination-wrapper"},wc=M({__name:"Pagination",props:{total:{type:Number},page:{type:Number,default:1},size:{type:Number,default:30},pageSizes:{type:Array,default:()=>[30,60,90,120]}},emits:["page-change"],setup(r,{emit:t}){const n=t,o=G.useRouter(),s=G.useRoute(),a=r,i=e.ref(a.page),c=e.ref(a.size),d=e.ref(a.total),f=e.ref(a.pageSizes);e.watch(()=>a.total,E=>{d.value=E}),e.watch(()=>[s.query.page,s.query.pageSize],()=>{!s.query.page||!s.query.pageSize?(i.value=1,c.value=30):(i.value=parseInt(s.query.page),c.value=parseInt(s.query.pageSize)),n("page-change",{page:i.value,size:c.value})});function p(E){i.value=E,o.push({path:s.path,query:{...s.query,page:i.value,pageSize:c.value}})}function m(E){c.value=E,o.push({path:s.path,query:{...s.query,page:i.value,pageSize:c.value}})}return(E,B)=>(e.openBlock(),e.createElementBlock("div",bc,[e.createVNode(e.unref(k.ElPagination),{background:"","page-size":c.value,"page-sizes":f.value,total:d.value,"current-page":r.page,layout:"total,sizes, prev, pager, next",onCurrentChange:p,onSizeChange:m},null,8,["page-size","page-sizes","total","current-page"])]))}},[["__scopeId","data-v-3c65f1a1"]]);var xa;const Ba=typeof window<"u";Ba&&((xa=window==null?void 0:window.navigator)!=null&&xa.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function kc(r){return typeof r=="function"?r():e.unref(r)}function Ec(r){return r}function xc(r){return e.getCurrentScope()?(e.onScopeDispose(r),!0):!1}function Bc(r,t=!0){e.getCurrentInstance()?e.onMounted(r):t?r():e.nextTick(r)}function Sc(r){var t;const n=kc(r);return(t=n==null?void 0:n.$el)!=null?t:n}const Cc=Ba?window:void 0;function $c(r,t=!1){const n=e.ref(),o=()=>n.value=!!r();return o(),Bc(o,t),n}const Sa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ca="__vueuse_ssr_handlers__";Sa[Ca]=Sa[Ca]||{};var $a=Object.getOwnPropertySymbols,Vc=Object.prototype.hasOwnProperty,Oc=Object.prototype.propertyIsEnumerable,Tc=(r,t)=>{var n={};for(var o in r)Vc.call(r,o)&&t.indexOf(o)<0&&(n[o]=r[o]);if(r!=null&&$a)for(var o of $a(r))t.indexOf(o)<0&&Oc.call(r,o)&&(n[o]=r[o]);return n};function Va(r,t,n={}){const o=n,{window:s=Cc}=o,a=Tc(o,["window"]);let i;const c=$c(()=>s&&"ResizeObserver"in s),d=()=>{i&&(i.disconnect(),i=void 0)},f=e.watch(()=>Sc(r),m=>{d(),c.value&&s&&m&&(i=new ResizeObserver(t),i.observe(m,a))},{immediate:!0,flush:"post"}),p=()=>{d(),f()};return xc(p),{isSupported:c,stop:p}}var Oa;(function(r){r.UP="UP",r.RIGHT="RIGHT",r.DOWN="DOWN",r.LEFT="LEFT",r.NONE="NONE"})(Oa||(Oa={}));var Nc=Object.defineProperty,Ta=Object.getOwnPropertySymbols,Ac=Object.prototype.hasOwnProperty,Dc=Object.prototype.propertyIsEnumerable,Na=(r,t,n)=>t in r?Nc(r,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[t]=n,Fc=(r,t)=>{for(var n in t||(t={}))Ac.call(t,n)&&Na(r,n,t[n]);if(Ta)for(var n of Ta(t))Dc.call(t,n)&&Na(r,n,t[n]);return r};Fc({linear:Ec},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});const Aa=M({__name:"DataTablePage",props:{settings:{type:Object},query:{type:Object}},setup(r){e.useCssVars(L=>({71828730:Y.value}));const t=G.useRoute(),n=Z(t),o=r,s=Lt(o.settings.code,t.path,o.settings.filters,o.settings.filterHook)(),{filters:a}=Ve.storeToRefs(s);e.watch(a,L=>{_=L,D()});const i=Ne(),{created:c,updated:d,removed:f}=Ve.storeToRefs(i);e.watch([c,d,f],([L,P,de])=>{(L||P||de)&&D()});const p=e.ref(!0),m=e.ref([]),E=e.ref(0),B=e.ref({}),y=e.ref({}),h=e.ref(null),b=e.ref(null);let _={};const w=e.ref(parseInt(t.query.pageSize)||30),x=e.ref(parseInt(t.query.page)||1);function C(L){let P=null;if(L.order==="ascending"?P="ASC":L.order==="descending"&&(P="DESC"),_.sorters){let de=[];_.sorters.some(ye=>ye.field===L.prop)?_.sorters.forEach(ye=>{ye.field===L.prop&&(ye.order=P,ye.name||de.push(ye)),ye.name&&de.push(ye)}):de=[..._.sorters,{field:L.prop,order:P}],_.sorters=de}else _.sorters=[{field:L.prop,order:P}];D()}function N(){y.value=o.settings.operations(n)}function D(){p.value=!0;const L={..._,...n,...o.query,page:x.value,size:w.value};o.settings.rest.getList(L).then(P=>{B.value.data=[],m.value=P.data.rows,E.value=P.data.count,p.value=!1})}function R(L){x.value=L.page,w.value=L.size,D()}function Q(L){const P={id:L.id,enable:!L.enable};o.settings.rest.enable(P).then(()=>{D()})}function et(L){if(L.enable){const P=L.label==="上架"?"下架":"停用";ElMessageBox.confirm(`确定要${P}该条数据吗?`,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{Q(L)}).catch(()=>{})}else Q(L)}function ze(L){B.value=L}const V=e.ref(0),I=e.ref(0);Va(h,L=>{var P;V.value=((P=L[0])==null?void 0:P.contentRect.height)||0}),Va(b,L=>{var P;I.value=((P=L[0])==null?void 0:P.contentRect.height)||0});const Y=e.computed(()=>`${V.value+I.value}px`);return N(),(L,P)=>(e.openBlock(),e.createElementBlock("div",{key:o.settings.code,style:{height:"100%"}},[e.createElementVNode("div",{ref_key:"pageHeader",ref:h},[e.createVNode(vl,{settings:o.settings},{operations:e.withCtx(()=>[e.createVNode(yc,{settings:o.settings,"table-data-select":B.value,query:e.unref(n)},null,8,["settings","table-data-select","query"]),e.createVNode(_c,{settings:o.settings,operations:y.value},null,8,["settings","operations"])]),_:1},8,["settings"])],512),e.withDirectives((e.openBlock(),e.createBlock(gc,{class:"data-table-box",data:m.value,operations:y.value,settings:o.settings,"actions-width":o.settings.actionsWidth,onSortColumn:C,onEnableItem:et,onSelectChange:ze},e.createSlots({_:2},[o.settings.rowActions(e.unref(n)).length>0?{name:"actions",fn:e.withCtx(({row:de})=>[e.createVNode(Ea,{row:de,settings:o.settings,query:e.unref(n)},null,8,["row","settings","query"])]),key:"0"}:void 0]),1032,["data","operations","settings","actions-width"])),[[e.unref(k.vLoading),p.value]]),e.createElementVNode("div",{ref_key:"pagination",ref:b},[e.createVNode(wc,{page:x.value,size:w.value,total:E.value,onPageChange:R},null,8,["page","size","total"])],512)]))}},[["__scopeId","data-v-9a31cd72"]]),jc={key:1,class:"loading-wrapper"},Rc=M({__name:"List",setup(r){const t=G.useRoute(),n=t.meta.side,o=t.params.domain,s=e.shallowRef(null);return wn(n,o).then(a=>{s.value=a}),(a,i)=>s.value?(e.openBlock(),e.createBlock(Aa,{key:0,settings:s.value},null,8,["settings"])):e.withDirectives((e.openBlock(),e.createElementBlock("div",jc,null,512)),[[e.unref(k.vLoading),!0]])}},[["__scopeId","data-v-49ae0ff6"]]),Ic={key:0},Lc={class:"key"},Mc={class:"value"},Uc={key:1,class:"loading-wrapper"},Da=M({__name:"DomainDescription",props:{settings:{type:Object},query:{type:Object}},emits:["done"],setup(r,{emit:t}){const n=t,o=r,s=Ne(),{updated:a}=Ve.storeToRefs(s),i=e.shallowRef([]),c=e.ref(null),d=["image","images","attachments","attachment","editor","rich-text","textarea","text","json"];i.value=o.settings.fields.filter(y=>y.showInDetail());const f=e.computed(()=>i.value.find(y=>y.code===o.settings.coverField)),p=e.computed(()=>i.value.filter(y=>!d.includes(y.type))),m=e.computed(()=>{var h;const y=(h=f.value)==null?void 0:h.code;return i.value.filter(b=>d.includes(b.type)).filter(b=>b.code!==y)}),E=e.computed({get(){return m.value.map(y=>y.code)},set(y){}});function B(){o.settings.rest.getOne(o.query).then(y=>{y.data.isDeleted=!!y.data.deletedAt,c.value=y.data,n("done",y.data)})}return e.watch(a,()=>{B()},{immediate:!0}),(y,h)=>(e.openBlock(),e.createElementBlock("div",null,[c.value?(e.openBlock(),e.createElementBlock("div",Ic,[e.createVNode(e.unref(k.ElRow),{gutter:20},{default:e.withCtx(()=>[f.value?(e.openBlock(),e.createBlock(e.unref(k.ElCol),{key:0,span:6,style:{"margin-bottom":"20px"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f.value.display),{field:f.value,row:c.value},null,8,["field","row"]))]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(k.ElCol),{span:f.value?18:24},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElRow),{gutter:20},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,b=>(e.openBlock(),e.createBlock(e.unref(k.ElCol),{span:b.span,class:"mono-data",style:{"margin-bottom":"20px"}},{default:e.withCtx(()=>[e.createElementVNode("div",Lc,e.toDisplayString(b.label),1),e.createElementVNode("div",Mc,[b.code==="id"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(c.value.id),1)],64)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(b.display),{key:1,field:b,row:c.value,mode:"description"},null,8,["field","row"]))])]),_:2},1032,["span"]))),256))]),_:1})]),_:1},8,["span"])]),_:1}),m.value.length>0?(e.openBlock(),e.createBlock(e.unref(k.ElCollapse),{key:0,modelValue:E.value,"onUpdate:modelValue":h[0]||(h[0]=b=>E.value=b),class:"extend-fields"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,b=>(e.openBlock(),e.createBlock(e.unref(k.ElCollapseItem),{title:b.label,name:b.code,class:"mono-data"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(b.display),{field:b,row:c.value,mode:"extend"},null,8,["field","row"]))]),_:2},1032,["title","name"]))),256))]),_:1},8,["modelValue"])):e.createCommentVNode("",!0)])):e.withDirectives((e.openBlock(),e.createElementBlock("div",Uc,null,512)),[[e.unref(k.vLoading),!0]])]))}},[["__scopeId","data-v-27106b05"]]),zc={class:"data-page-title"},Hc={class:"title"},qc=M({__name:"DataDetailHeader",props:{data:{type:Object},settings:{type:Object},query:{type:Object}},emits:["get-item"],setup(r,{emit:t}){const n=En(),o=G.useRoute(),s=Z(o),a=r,i=e.ref("加载中..."),c=e.ref({});function d(p,m){const E=`${p}-${m}`;n.updateTitleByCode(E,i.value),document.title=i.value}function f(p){const m=a.settings;i.value=`${m.name}: ${m.formatName(p)}`,d(m.code,p.id)}return e.watch(()=>a.data,p=>{p&&(c.value=a.settings.operations(s),f(p))},{immediate:!0}),(p,m)=>(e.openBlock(),e.createElementBlock("div",zc,[e.createElementVNode("div",Hc,e.toDisplayString(i.value),1),e.createElementVNode("div",null,[a.data?(e.openBlock(),e.createBlock(e.unref(k.ElButtonGroup),{key:0},{default:e.withCtx(()=>[e.createVNode(Ea,{row:a.data,settings:a.settings,query:e.unref(s)},null,8,["row","settings","query"]),e.createVNode(Br,{row:a.data,settings:a.settings,operations:c.value,"is-detail":!0},null,8,["row","settings","operations"])]),_:1})):e.createCommentVNode("",!0)])]))}},[["__scopeId","data-v-b3976736"]]),Pc=M({__name:"DataDetailPage",props:{settings:{type:Object},associations:{type:Array}},setup(r){const t=G.useRouter(),n=G.useRoute(),o=Z(n),s=r,a=e.shallowRef([]),i=e.ref(""),c=e.shallowRef(null),d=e.ref(null),f=Ne();Ve.storeToRefs(f),a.value=s.settings.fields.filter(B=>B.showInDetail!==!1);function p(B){d.value=B}function m(B){i.value=B.props.name,t.push({name:`${n.meta.side}-association`,params:{association:B.props.name},query:o})}function E(B){if(s.associations.length>0)if(n.params.association){i.value=n.params.association;const y=s.associations.find(h=>h.domain===n.params.association);c.value={...y,domainData:d.value}}else i.value=s.associations[0].domain,c.value={...s.associations[0],domainData:d.value},B&&B()}return e.watch(d,()=>{E(()=>{t.replace({name:`${n.meta.side}-association`,params:{association:i.value},query:o})})},{immediate:!0}),e.watch(()=>n.params,()=>{d.value&&E()},{immediate:!0}),(B,y)=>{const h=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",{key:`${e.unref(n).params.domain}-${e.unref(n).params.id}`},[e.createVNode(qc,{data:d.value,settings:s.settings,query:{...e.unref(n).params,...e.unref(o)}},null,8,["data","settings","query"]),e.createVNode(Da,{query:{...e.unref(n).params,...e.unref(o)},settings:s.settings,onDone:p},null,8,["query","settings"]),e.createVNode(e.unref(k.ElTabs),{modelValue:i.value,"onUpdate:modelValue":y[0]||(y[0]=b=>i.value=b),class:"association-tabs",onTabClick:m},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.associations,b=>(e.openBlock(),e.createBlock(e.unref(k.ElTabPane),{label:b.name,name:b.domain},null,8,["label","name"]))),256))]),_:1},8,["modelValue"]),c.value?(e.openBlock(),e.createBlock(h,{key:c.value,association:c.value},null,8,["association"])):e.createCommentVNode("",!0)])}}},[["__scopeId","data-v-4881eb36"]]),Wc={key:1,class:"loading-wrapper"},Gc=M({__name:"Detail",setup(r){const t=G.useRoute(),n=t.meta.side,o=t.params.domain,s=e.shallowRef(null),a=e.shallowRef([]);wn(n,o).then(c=>{const d=c,f=i("has-many",d.hasMany),p=i("has-one",d.hasOne);s.value=d,a.value=f.concat(p)});function i(c,d){return(d||[]).map(f=>typeof f=="object"?{type:c,domain:f.code,name:f.name,query:f.query||(()=>({}))}:{type:c,domain:f,name:wr()[n][f].name,query:()=>({})})}return(c,d)=>s.value?(e.openBlock(),e.createBlock(Pc,{key:0,settings:s.value,associations:a.value},null,8,["settings","associations"])):e.withDirectives((e.openBlock(),e.createElementBlock("div",Wc,null,512)),[[e.unref(k.vLoading),!0]])}},[["__scopeId","data-v-7c232776"]]),Qc={key:0},Jc={key:1,class:"loading-wrapper"},Kc=M({__name:"DetailTab",props:{association:{type:Object}},setup(r){const t=G.useRoute(),n=t.meta.side,o=Z(t),s=r,a=e.shallowRef(null);return e.watch(()=>t.params.association,()=>{wn(n,t.params.association).then(i=>{a.value={...s.association,settings:i}})},{immediate:!0}),(i,c)=>a.value&&s.association.domainData?(e.openBlock(),e.createElementBlock("div",Qc,[a.value.type==="has-many"?(e.openBlock(),e.createBlock(Aa,{key:`has-many-${a.value.domain}`,settings:a.value.settings,query:a.value.query(s.association.domainData)},null,8,["settings","query"])):a.value.type==="has-one"?(e.openBlock(),e.createBlock(Da,{key:`has-one-${a.value.domain}`,style:{"padding-top":"20px"},query:e.unref(o),settings:a.value.settings},null,8,["query","settings"])):e.createCommentVNode("",!0)])):e.withDirectives((e.openBlock(),e.createElementBlock("div",Jc,null,512)),[[e.unref(k.vLoading),!0]])}},[["__scopeId","data-v-bb501ead"]]),Yc={key:0},vc={class:"file-name"},Xc={class:"name"},Zc={class:"file-type"},ed={key:1},td=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref([]);function o(a){fetch(a.url).then(i=>i.blob()).then(i=>{const c=document.createElement("a");i.type=="application/x-rar-compressed"?c.href=a.url:c.href=URL.createObjectURL(i),c.download=a.name,document.body.appendChild(c),c.click()})}function s(a){return["jpg","jpeg","png","gif","webp","bmp","pdf"].includes(a)}return e.watch(()=>t.row,()=>{n.value=t.row[t.field.code].map(a=>{const i=a.url.substring(a.url.lastIndexOf(".")+1);return{...a,fileType:i,isPreview:s(i)}})},{immediate:!0}),(a,i)=>n.value.length>0?(e.openBlock(),e.createElementBlock("div",Yc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,c=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",vc,[e.createVNode(e.unref(k.ElIcon),{color:"#73767a"},{default:e.withCtx(()=>[e.createVNode(e.unref(ma))]),_:1}),e.createElementVNode("span",Xc,e.toDisplayString(c.name),1),e.createElementVNode("span",Zc,"."+e.toDisplayString(c.fileType),1),e.createVNode(e.unref(k.ElIcon),{color:"#409eff",size:"16",onClick:d=>o(c)},{default:e.withCtx(()=>[e.createVNode(e.unref(nl))]),_:2},1032,["onClick"]),c.isPreview?(e.openBlock(),e.createBlock(e.unref(k.ElLink),{key:0,type:"primary",href:c.url,target:"_blank",underline:!1},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElIcon),{size:"16"},{default:e.withCtx(()=>[e.createVNode(e.unref(bl))]),_:1})]),_:2},1032,["href"])):e.createCommentVNode("",!0)])]))),256))])):(e.openBlock(),e.createElementBlock("div",ed,[e.createVNode(we)]))}},[["__scopeId","data-v-196b9bff"]]),nd={__name:"FieldEditor",props:{modelValue:Array,field:Object,domainConfig:Object,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(r,{emit:t}){const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>Mu)),o=t,s=r,a=e.reactive({value:s.modelValue});function i(p){a.value=a.value?[...a.value,p]:[p]}function c(p){const m=a.value.findIndex(E=>E.id===p.id);a.value.splice(m,1)}async function d(p){const m=s.domainConfig.rest;if(!/^[\u4e00-\u9fa5\w-_]+$/.test(p.name)){k.ElMessage({message:"请勿输入特殊字符!",type:"warning"});return}await m.updateFilesName(p).then(()=>{k.ElMessage({message:"附件名称已修改!",type:"success"})})}function f(p,m){if(m=="success"){i(p),o("update:modelValue",a.value);return}if(m=="remove"){c(p),o("update:modelValue",a.value);return}if(m=="change"){d(p);return}}return(p,m)=>(e.openBlock(),e.createBlock(e.unref(n),{pics:a.value,props:s.field.props?s.field.props:{},onOnSuccess:m[0]||(m[0]=E=>f(E,"success")),onOnRemove:m[1]||(m[1]=E=>f(E,"remove")),onOnChange:m[2]||(m[2]=E=>f(E,"change"))},null,8,["pics","props"]))}};class rd extends re{constructor(t,n){super(t,n),this.attachmentType=t.attachmentType,this.props=t.props,this.display=td,this.editor=nd,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const od=Object.freeze(Object.defineProperty({__proto__:null,default:rd},Symbol.toStringTag,{value:"Module"})),ad={key:3},sd=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=G.useRoute(),n=r,o=n.field.belongsTo,s=t.meta.side,a=n.row[n.field.code],i=e.computed(()=>({path:`/${s}/${o}/${a}`,query:{...Z(t),...n.field.rowQuery(n.row)}})),c=e.ref(!0),d=e.ref(!1),f=e.ref("");let p=null;const m=wn(s,o).then(h=>(p=h.formatName,Promise.resolve(h.rest)));function E(h){return n.field.isRouter(n.row,Z(t))&&!Z(t)[n.field.code]}function B(){m.then(h=>{c.value=!0;const b=n.row[n.field.code],_=n.row[gr(`${o}-name`)];if(!b){y(!1),c.value=!1;return}if(b&&_){y({id:b,name:_}),c.value=!1;return}const w={id:b};h.getOne(w).then(x=>{y(x.data),c.value=!1}).catch(x=>{console.log(x)})})}function y(h){if(d.value=!1,n.field.showName){sa(n.field.domain,n.field.code,"showName 即将废弃,请使用 formatter"),f.value=h[n.field.showName];return}if(n.field.formatter){f.value=n.field.formatter(h);return}if(h.id&&h.name){f.value=h.name;return}if(!h){d.value=!0;return}f.value=p(h)}return e.watch(()=>n.row,B,{immediate:!0}),(h,b)=>{const _=e.resolveComponent("RouterLink");return e.openBlock(),e.createElementBlock("span",null,[c.value?(e.openBlock(),e.createBlock(e.unref(k.ElIcon),{key:0,class:"loading"},{default:e.withCtx(()=>[e.createVNode(e.unref(ga))]),_:1})):d.value?(e.openBlock(),e.createBlock(we,{key:1})):E(r.row)?(e.openBlock(),e.createBlock(_,{key:2,class:"bld-link mono-data",to:i.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.value),1)]),_:1},8,["to"])):(e.openBlock(),e.createElementBlock("div",ad,e.toDisplayString(f.value),1))])}}},[["__scopeId","data-v-d0fdf31e"]]),id={__name:"FieldEditor",props:{modelValue:Number,field:Object,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(r,{emit:t}){const n=G.useRoute(),o=Z(n),s=t,a=r,i=e.reactive({value:a.modelValue}),c=e.ref([]);async function d(p){c.value=await a.field.options(a.formData,o,p)}function f(){s("update:modelValue",i.value)}return e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),d(),(p,m)=>(e.openBlock(),e.createBlock(e.unref(k.ElSelect),{modelValue:i.value,"onUpdate:modelValue":m[0]||(m[0]=E=>i.value=E),style:{width:"100%"},filterable:"","reserve-keyword":"","remote-show-suffix":"",clearable:"","fit-input-width":"",multiple:a.field.multiple,disabled:a.disabled,placeholder:"",remote:"","remote-method":d,onChange:f},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,E=>(e.openBlock(),e.createBlock(e.unref(k.ElOption),{key:E.code,label:E.name,value:E.code,title:E.name,disabled:E.disabled},null,8,["label","value","title","disabled"]))),128))]),_:1},8,["modelValue","multiple","disabled"]))}};class ld extends re{constructor(t,n){super(t,n),this.belongsTo=t.belongsTo,this.formChange=t.formChange||(()=>{}),this.isRouter=this.isRouter(t),this.options=t.options||(()=>[{code:0,name:"未实现"}]),this.display=sd,this.editor=id,this.showName=t.showName,this.formatter=t.formatter,this.rowQuery=t.rowQuery||(()=>({})),this.checkValidProperties(t)}isRouter(t){const n=t.isRouter;if(typeof n=="boolean")return()=>n;if(typeof n=="function")return n;if(typeof n>"u")return()=>!0;throw new Exception(`invalid isRouter : ${n}`)}}const cd=Object.freeze(Object.defineProperty({__proto__:null,default:ld},Symbol.toStringTag,{value:"Module"})),dd={style:{display:"flex","align-items":"center"}},ud={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.computed(()=>t.row[t.field.code]);return(o,s)=>(e.openBlock(),e.createElementBlock("span",dd,[n.value==!0?(e.openBlock(),e.createBlock(e.unref(k.ElIcon),{key:0,color:"#529b2e",size:20},{default:e.withCtx(()=>[e.createVNode(e.unref(_l))]),_:1})):n.value==!1?(e.openBlock(),e.createBlock(e.unref(k.ElIcon),{key:1,color:"#F56C6C",size:20},{default:e.withCtx(()=>[e.createVNode(e.unref(Qi))]),_:1})):(e.openBlock(),e.createBlock(e.unref(k.ElIcon),{key:2,color:"#73767a",size:20},{default:e.withCtx(()=>[e.createVNode(e.unref(pl))]),_:1}))]))}},fd={__name:"FieldEditor",props:{modelValue:Boolean,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive({value:o.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>o.modelValue,()=>{s.value=o.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(k.ElSwitch),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),disabled:o.disabled,onChange:a},null,8,["modelValue","disabled"]))}};class pd extends re{constructor(t,n){super(t,n),this.default=t.default||!1,this.display=ud,this.editor=fd,this.checkValidProperties(t)}}const hd=Object.freeze(Object.defineProperty({__proto__:null,default:pd},Symbol.toStringTag,{value:"Module"})),md={key:0},gd={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref(!1),o=e.ref("..."),s=t.row[t.field.code];return s==null||`${s}`.trim()===""?n.value=!0:(o.value=s,n.value=!1),(a,i)=>(e.openBlock(),e.createElementBlock("div",null,[n.value?(e.openBlock(),e.createBlock(we,{key:1})):(e.openBlock(),e.createElementBlock("span",md,e.toDisplayString(o.value),1)),e.createTextVNode(" edit ")]))}},_d={__name:"FieldEditor",props:{modelValue:Array,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive({value:o.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>o.modelValue,()=>{s.value=o.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(k.ElCascader),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),props:o.field.props,clearable:"",style:{width:"100%"},onChange:a},null,8,["modelValue","props"]))}};class yd extends re{constructor(t,n){super(t,n),this.props=t.props||(()=>{}),this.formChange=t.formChange||(()=>{}),this.display=gd,this.editor=_d,this.multiple=this.defaultBy(t.multiple,!1),this.checkValidProperties(t)}}const bd=Object.freeze(Object.defineProperty({__proto__:null,default:yd},Symbol.toStringTag,{value:"Module"}));class wd extends re{constructor(t,n){super(t,n),this.component=t.component,this.display=t.component,this.editor=t.component,this.checkValidProperties(t)}}const kd=Object.freeze(Object.defineProperty({__proto__:null,default:wd},Symbol.toStringTag,{value:"Module"})),Ed={key:0},xd={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref(!1),o=e.ref("..."),s=t.row[t.field.code];return s==null||`${s}`.trim()===""?n.value=!0:(o.value=s,n.value=!1),(a,i)=>n.value?(e.openBlock(),e.createBlock(we,{key:1})):(e.openBlock(),e.createElementBlock("span",Ed,e.toDisplayString(o.value),1))}},Bd={__name:"FieldEditor",props:{modelValue:String,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive({value:o.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>o.modelValue,()=>{s.value=o.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(k.ElDatePicker),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),disabled:o.disabled,type:"datetime",format:"YYYY-MM-DD HH:mm:ss","value-format":"YYYY-MM-DD HH:mm:ss",onChange:a},null,8,["modelValue","disabled"]))}};class Sd extends re{constructor(t,n){super(t,n),this.display=xd,this.editor=Bd,this.width=this.computeWidth(t),this.checkValidProperties(t)}computeWidth(t){return t.width?t.width:200}}const Cd=Object.freeze(Object.defineProperty({__proto__:null,default:Sd},Symbol.toStringTag,{value:"Module"})),$d=r=>(e.pushScopeId("data-v-35bc9ffb"),r=r(),e.popScopeId(),r),Vd={class:"loading-error"},Od=$d(()=>e.createElementVNode("div",null,"加载失败",-1)),Td=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object},mode:{type:String}},setup(r){const t=r,n=e.ref(null),o=e.ref([]);return e.watch(()=>t.row,()=>{n.value=t.row[t.field.code],o.value=[t.row[t.field.code]]},{immediate:!0}),(s,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`image-card ${t.mode}`)},[e.createVNode(e.unref(k.ElImage),{src:n.value,"preview-teleported":"",fit:"contain","preview-src-list":o.value,class:"image"},{error:e.withCtx(()=>[e.createElementVNode("div",Vd,[Od,e.createElementVNode("div",null,e.toDisplayString(n.value),1)])]),_:1},8,["src","preview-src-list"])],2))}},[["__scopeId","data-v-35bc9ffb"]]),Nd={__name:"FieldEditor",props:{modelValue:String,field:Object,type:String,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>zu)),o=t,s=r,a=e.reactive({value:s.modelValue});function i(c){o("update:modelValue",c)}return e.watch(()=>s.modelValue,async()=>{a.value=s.modelValue},{immediate:!0}),(c,d)=>(e.openBlock(),e.createBlock(e.unref(n),{"image-url":a.value,disabled:s.disabled,onOnSuccess:i},null,8,["image-url","disabled"]))}};class Ad extends re{constructor(t,n){super(t,n),this.display=Td,this.editor=Nd,this.checkValidProperties(t)}}const Dd=Object.freeze(Object.defineProperty({__proto__:null,default:Ad},Symbol.toStringTag,{value:"Module"})),Fd=r=>(e.pushScopeId("data-v-4cb2ce7b"),r=r(),e.popScopeId(),r),jd={class:"image-card",style:{"margin-bottom":"20px"}},Rd={class:"loading-error"},Id=Fd(()=>e.createElementVNode("div",null,"图片加载失败",-1)),Ld=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref(null),o=e.ref([]);return e.watch(()=>t.row,()=>{const s=t.row[t.field.code];s&&(o.value=s.map(a=>a.url),n.value=o.value[0])},{immediate:!0}),(s,a)=>t.row[t.field.code].length>0?(e.openBlock(),e.createBlock(e.unref(k.ElSpace),{key:0,wrap:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.row[t.field.code],i=>(e.openBlock(),e.createElementBlock("div",jd,[e.createVNode(e.unref(k.ElImage),{src:i.url,fit:"contain","preview-src-list":o.value,class:"image"},{error:e.withCtx(()=>[e.createElementVNode("div",Rd,[Id,e.createElementVNode("div",null,e.toDisplayString(n.value),1)])]),_:2},1032,["src","preview-src-list"])]))),256))]),_:1})):(e.openBlock(),e.createBlock(we,{key:1}))}},[["__scopeId","data-v-4cb2ce7b"]]);class Md extends re{constructor(t,n){super(t,n),this.props=t.props,this.display=Ld,this.editor=fa,this.converter=this.defaultBy(t.converter,o=>o),this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const Ud=Object.freeze(Object.defineProperty({__proto__:null,default:Md},Symbol.toStringTag,{value:"Module"})),zd={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=e.defineAsyncComponent(()=>import("json-editor-vue")),n=r,o=e.ref(!1),s=e.ref("加载中...");return e.watch(()=>n.row,()=>{o.value=!1;const a=n.row[n.field.code];a!=null&&`${a}`.trim()!==""&&(o.value=!0,s.value=a)},{immediate:!0}),(a,i)=>o.value?(e.openBlock(),e.createBlock(e.unref(t),{key:0,modelValue:s.value,"onUpdate:modelValue":i[0]||(i[0]=c=>s.value=c),mode:"text","main-menu-bar":!1,"navigation-bar":!1,"read-only":!0},null,8,["modelValue"])):(e.openBlock(),e.createBlock(we,{key:1}))}},Hd={__name:"FieldEditor",props:{modelValue:Object,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=e.defineAsyncComponent(()=>import("json-editor-vue")),o=t,s=r,a=e.reactive({value:s.modelValue});function i(){o("update:modelValue",a.value)}return e.watch(()=>s.modelValue,()=>{a.value=s.modelValue},{immediate:!0}),(c,d)=>(e.openBlock(),e.createBlock(e.unref(n),{modelValue:a.value,"onUpdate:modelValue":d[0]||(d[0]=f=>a.value=f),style:{width:"100%",height:"300px"},mode:"text","main-menu-bar":!1,"navigation-bar":!1,onChange:i},null,8,["modelValue"]))}};class qd extends re{constructor(t,n){super(t,n),this.display=zd,this.editor=Hd,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const Pd=Object.freeze(Object.defineProperty({__proto__:null,default:qd},Symbol.toStringTag,{value:"Module"})),Wd={class:"editor-field"},Gd=["innerHTML"],Qd=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r;return(n,o)=>(e.openBlock(),e.createElementBlock("div",Wd,[e.createElementVNode("div",{class:"content",innerHTML:t.row[t.field.code]},null,8,Gd)]))}},[["__scopeId","data-v-02b50564"]]),Jd={style:{width:"100%"}},Kd={__name:"FieldEditor",props:{modelValue:String,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>rf)),o=t,s=r,a=e.reactive({value:s.modelValue});return e.watch(()=>a.value,()=>{o("update:modelValue",a.value)}),(i,c)=>(e.openBlock(),e.createElementBlock("div",Jd,[e.createVNode(e.unref(n),{content:a.value,"onUpdate:content":c[0]||(c[0]=d=>a.value=d)},null,8,["content"])]))}};class Yd extends re{constructor(t,n){super(t,n),this.display=Qd,this.editor=Kd,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const vd=Object.freeze(Object.defineProperty({__proto__:null,default:Yd},Symbol.toStringTag,{value:"Module"}));class Xd extends re{constructor(t,n){super(t,n),this.editable=()=>!1,this.isRouter=this.isRouter(t),this.rowQuery=t.rowQuery||(()=>({})),this.display=wa,this.fixed=!0,this.checkValidProperties(t)}isRouter(t){const n=t.isRouter;if(typeof n=="boolean")return()=>n;if(typeof n=="function")return n;if(typeof n>"u")return()=>!0;throw new Exception(`invalid isRouter : ${n}`)}}const Zd=Object.freeze(Object.defineProperty({__proto__:null,default:Xd},Symbol.toStringTag,{value:"Module"}));var F=function(r,t,n){if(!t.has(r))throw new TypeError("attempted to set private field on non-instance");return t.set(r,n),n},O=function(r,t){if(!t.has(r))throw new TypeError("attempted to get private field on non-instance");return t.get(r)},ve,at,ke,yt,Mt,Ae,De,Fe,je,Re,Ie,Le,Me,st,bt,Xe,xn,Ze;const eu=function(r){var t=131,n=137,o=0;r+="x";var s=Math.floor(9007199254740991/n);for(let a=0;a<r.length;a++)o>s&&(o=Math.floor(o/n)),o=o*t+r.charCodeAt(a);return o},T="0123456789abcdef".split(""),tu=[-2147483648,8388608,32768,128],Ee=[24,16,8,0],Bn=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],te=[];class nu{constructor(t=!1,n=!1){ve.set(this,void 0),at.set(this,void 0),ke.set(this,void 0),yt.set(this,void 0),Mt.set(this,void 0),Ae.set(this,void 0),De.set(this,void 0),Fe.set(this,void 0),je.set(this,void 0),Re.set(this,void 0),Ie.set(this,void 0),Le.set(this,void 0),Me.set(this,void 0),st.set(this,void 0),bt.set(this,void 0),Xe.set(this,void 0),xn.set(this,0),Ze.set(this,void 0),this.init(t,n)}init(t,n){n?(te[0]=te[16]=te[1]=te[2]=te[3]=te[4]=te[5]=te[6]=te[7]=te[8]=te[9]=te[10]=te[11]=te[12]=te[13]=te[14]=te[15]=0,F(this,at,te)):F(this,at,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),t?(F(this,Ae,3238371032),F(this,De,914150663),F(this,Fe,812702999),F(this,je,4144912697),F(this,Re,4290775857),F(this,Ie,1750603025),F(this,Le,1694076839),F(this,Me,3204075428)):(F(this,Ae,1779033703),F(this,De,3144134277),F(this,Fe,1013904242),F(this,je,2773480762),F(this,Re,1359893119),F(this,Ie,2600822924),F(this,Le,528734635),F(this,Me,1541459225)),F(this,ve,F(this,Ze,F(this,ke,F(this,bt,0)))),F(this,yt,F(this,st,!1)),F(this,Mt,!0),F(this,Xe,t)}update(t){if(O(this,yt))return this;let n;t instanceof ArrayBuffer?n=new Uint8Array(t):n=t;let o=0;const s=n.length,a=O(this,at);for(;o<s;){let i;if(O(this,st)&&(F(this,st,!1),a[0]=O(this,ve),a[16]=a[1]=a[2]=a[3]=a[4]=a[5]=a[6]=a[7]=a[8]=a[9]=a[10]=a[11]=a[12]=a[13]=a[14]=a[15]=0),typeof n!="string")for(i=O(this,Ze);o<s&&i<64;++o)a[i>>2]|=n[o]<<Ee[i++&3];else for(i=O(this,Ze);o<s&&i<64;++o){let c=n.charCodeAt(o);c<128?a[i>>2]|=c<<Ee[i++&3]:c<2048?(a[i>>2]|=(192|c>>6)<<Ee[i++&3],a[i>>2]|=(128|c&63)<<Ee[i++&3]):c<55296||c>=57344?(a[i>>2]|=(224|c>>12)<<Ee[i++&3],a[i>>2]|=(128|c>>6&63)<<Ee[i++&3],a[i>>2]|=(128|c&63)<<Ee[i++&3]):(c=65536+((c&1023)<<10|n.charCodeAt(++o)&1023),a[i>>2]|=(240|c>>18)<<Ee[i++&3],a[i>>2]|=(128|c>>12&63)<<Ee[i++&3],a[i>>2]|=(128|c>>6&63)<<Ee[i++&3],a[i>>2]|=(128|c&63)<<Ee[i++&3])}F(this,xn,i),F(this,ke,O(this,ke)+(i-O(this,Ze))),i>=64?(F(this,ve,a[16]),F(this,Ze,i-64),this.hash(),F(this,st,!0)):F(this,Ze,i)}return O(this,ke)>4294967295&&(F(this,bt,O(this,bt)+(O(this,ke)/4294967296<<0)),F(this,ke,O(this,ke)%4294967296)),this}finalize(){if(O(this,yt))return;F(this,yt,!0);const t=O(this,at),n=O(this,xn);t[16]=O(this,ve),t[n>>2]|=tu[n&3],F(this,ve,t[16]),n>=56&&(O(this,st)||this.hash(),t[0]=O(this,ve),t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=O(this,bt)<<3|O(this,ke)>>>29,t[15]=O(this,ke)<<3,this.hash()}hash(){let t=O(this,Ae),n=O(this,De),o=O(this,Fe),s=O(this,je),a=O(this,Re),i=O(this,Ie),c=O(this,Le),d=O(this,Me);const f=O(this,at);let p,m,E,B,y,h,b,_,w,x;for(let C=16;C<64;++C)B=f[C-15],p=(B>>>7|B<<25)^(B>>>18|B<<14)^B>>>3,B=f[C-2],m=(B>>>17|B<<15)^(B>>>19|B<<13)^B>>>10,f[C]=f[C-16]+p+f[C-7]+m<<0;x=n&o;for(let C=0;C<64;C+=4)O(this,Mt)?(O(this,Xe)?(b=300032,B=f[0]-1413257819,d=B-150054599<<0,s=B+24177077<<0):(b=704751109,B=f[0]-210244248,d=B-1521486534<<0,s=B+143694565<<0),F(this,Mt,!1)):(p=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),m=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),b=t&n,E=b^t&o^x,h=a&i^~a&c,B=d+m+h+Bn[C]+f[C],y=p+E,d=s+B<<0,s=B+y<<0),p=(s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10),m=(d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7),_=s&t,E=_^s&n^b,h=d&a^~d&i,B=c+m+h+Bn[C+1]+f[C+1],y=p+E,c=o+B<<0,o=B+y<<0,p=(o>>>2|o<<30)^(o>>>13|o<<19)^(o>>>22|o<<10),m=(c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7),w=o&s,E=w^o&t^_,h=c&d^~c&a,B=i+m+h+Bn[C+2]+f[C+2],y=p+E,i=n+B<<0,n=B+y<<0,p=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),m=(i>>>6|i<<26)^(i>>>11|i<<21)^(i>>>25|i<<7),x=n&o,E=x^n&s^w,h=i&c^~i&d,B=a+m+h+Bn[C+3]+f[C+3],y=p+E,a=t+B<<0,t=B+y<<0;F(this,Ae,O(this,Ae)+t<<0),F(this,De,O(this,De)+n<<0),F(this,Fe,O(this,Fe)+o<<0),F(this,je,O(this,je)+s<<0),F(this,Re,O(this,Re)+a<<0),F(this,Ie,O(this,Ie)+i<<0),F(this,Le,O(this,Le)+c<<0),F(this,Me,O(this,Me)+d<<0)}hex(){this.finalize();const t=O(this,Ae),n=O(this,De),o=O(this,Fe),s=O(this,je),a=O(this,Re),i=O(this,Ie),c=O(this,Le),d=O(this,Me);let f=T[t>>28&15]+T[t>>24&15]+T[t>>20&15]+T[t>>16&15]+T[t>>12&15]+T[t>>8&15]+T[t>>4&15]+T[t&15]+T[n>>28&15]+T[n>>24&15]+T[n>>20&15]+T[n>>16&15]+T[n>>12&15]+T[n>>8&15]+T[n>>4&15]+T[n&15]+T[o>>28&15]+T[o>>24&15]+T[o>>20&15]+T[o>>16&15]+T[o>>12&15]+T[o>>8&15]+T[o>>4&15]+T[o&15]+T[s>>28&15]+T[s>>24&15]+T[s>>20&15]+T[s>>16&15]+T[s>>12&15]+T[s>>8&15]+T[s>>4&15]+T[s&15]+T[a>>28&15]+T[a>>24&15]+T[a>>20&15]+T[a>>16&15]+T[a>>12&15]+T[a>>8&15]+T[a>>4&15]+T[a&15]+T[i>>28&15]+T[i>>24&15]+T[i>>20&15]+T[i>>16&15]+T[i>>12&15]+T[i>>8&15]+T[i>>4&15]+T[i&15]+T[c>>28&15]+T[c>>24&15]+T[c>>20&15]+T[c>>16&15]+T[c>>12&15]+T[c>>8&15]+T[c>>4&15]+T[c&15];return O(this,Xe)||(f+=T[d>>28&15]+T[d>>24&15]+T[d>>20&15]+T[d>>16&15]+T[d>>12&15]+T[d>>8&15]+T[d>>4&15]+T[d&15]),f}toString(){return this.hex()}digest(){this.finalize();const t=O(this,Ae),n=O(this,De),o=O(this,Fe),s=O(this,je),a=O(this,Re),i=O(this,Ie),c=O(this,Le),d=O(this,Me),f=[t>>24&255,t>>16&255,t>>8&255,t&255,n>>24&255,n>>16&255,n>>8&255,n&255,o>>24&255,o>>16&255,o>>8&255,o&255,s>>24&255,s>>16&255,s>>8&255,s&255,a>>24&255,a>>16&255,a>>8&255,a&255,i>>24&255,i>>16&255,i>>8&255,i&255,c>>24&255,c>>16&255,c>>8&255,c&255];return O(this,Xe)||f.push(d>>24&255,d>>16&255,d>>8&255,d&255),f}array(){return this.digest()}arrayBuffer(){this.finalize();const t=new ArrayBuffer(O(this,Xe)?28:32),n=new DataView(t);return n.setUint32(0,O(this,Ae)),n.setUint32(4,O(this,De)),n.setUint32(8,O(this,Fe)),n.setUint32(12,O(this,je)),n.setUint32(16,O(this,Re)),n.setUint32(20,O(this,Ie)),n.setUint32(24,O(this,Le)),O(this,Xe)||n.setUint32(28,O(this,Me)),t}}ve=new WeakMap,at=new WeakMap,ke=new WeakMap,yt=new WeakMap,Mt=new WeakMap,Ae=new WeakMap,De=new WeakMap,Fe=new WeakMap,je=new WeakMap,Re=new WeakMap,Ie=new WeakMap,Le=new WeakMap,Me=new WeakMap,st=new WeakMap,bt=new WeakMap,Xe=new WeakMap,xn=new WeakMap,Ze=new WeakMap;function ru(r){const t=new nu;return t.update(r),parseInt(t.hex().substring(0,8),16)}const ou=function(r){var t="#";return r.forEach(function(n){n<16&&(t+=0),t+=n.toString(16)}),t},au=function(r,t,n){r/=360;var o=n<.5?n*(1+t):n+t-n*t,s=2*n-o;return[r+1/3,r,r-1/3].map(function(a){return a<0&&a++,a>1&&a--,a<1/6?a=s+(o-s)*6*a:a<.5?a=o:a<2/3?a=s+(o-s)*6*(2/3-a):a=s,Math.round(a*255)})};class su{constructor(t={}){const[n,o]=[t.lightness,t.saturation].map(function(s){return s=s!==void 0?s:[.35,.5,.65],Array.isArray(s)?s.concat():[s]});this.L=n,this.S=o,typeof t.hue=="number"&&(t.hue={min:t.hue,max:t.hue}),typeof t.hue=="object"&&!Array.isArray(t.hue)&&(t.hue=[t.hue]),typeof t.hue>"u"&&(t.hue=[]),this.hueRanges=t.hue.map(function(s){return{min:typeof s.min>"u"?0:s.min,max:typeof s.max>"u"?360:s.max}}),this.hash=ru,typeof t.hash=="function"&&(this.hash=t.hash),t.hash==="bkdr"&&(this.hash=eu)}hsl(t){var n,o,s,a=this.hash(t),i=727;if(this.hueRanges.length){const c=this.hueRanges[a%this.hueRanges.length];n=a/this.hueRanges.length%i*(c.max-c.min)/i+c.min}else n=a%359;return a=Math.ceil(a/360),o=this.S[a%this.S.length],a=Math.ceil(a/this.S.length),s=this.L[a%this.L.length],[n,o,s]}rgb(t){var n=this.hsl(t);return au.apply(this,n)}hex(t){var n=this.rgb(t);return ou(n)}}const iu=new su;function lu(r){const t=iu.hex(`abc${r}cba`);return cu(t.replace("#",""),-20)}function cu(r,t){let n=parseInt(r.substring(1,3),16),o=parseInt(r.substring(3,5),16),s=parseInt(r.substring(5,7),16);n=parseInt(n*(100+t)/100),o=parseInt(o*(100+t)/100),s=parseInt(s*(100+t)/100),n=n<255?n:255,o=o<255?o:255,s=s<255?s:255,n=Math.round(n),o=Math.round(o),s=Math.round(s);const a=n.toString(16).length==1?"0"+n.toString(16):n.toString(16),i=o.toString(16).length==1?"0"+o.toString(16):o.toString(16),c=s.toString(16).length==1?"0"+s.toString(16):s.toString(16);return"#"+a+i+c}const Fa={strToHexColor:lu},du={key:0,class:"select-fields"},uu=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref("..."),o=e.ref(!1),s=e.ref([]);async function a(){const i=t.row[t.field.code];if(t.field.label,i==null){n.value="<无>",o.value=!1;return}const c=await t.field.options();if(!c){n.value=`<未知: ${i}>`,o.value=!1;return}let d=[];if(t.field.multiple?d=c.filter(f=>i.includes(f.code)):d=c.filter(f=>i===f.code),d.length===0){n.value=`<未找到: ${i}>`,o.value=!1;return}s.value=d.map(f=>({bgColor:Fa.strToHexColor(`${f.code}-${f.name}`),code:f.code,name:f.name})),o.value=!0}return e.watch(()=>t.row,a,{immediate:!0}),(i,c)=>o.value?(e.openBlock(),e.createElementBlock("div",du,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,d=>(e.openBlock(),e.createBlock(e.unref(k.ElTooltip),{content:`${d.code}`,placement:"top"},{default:e.withCtx(()=>[e.createElementVNode("span",{class:"select-field found",style:e.normalizeStyle(`background: ${d.bgColor}`)},e.toDisplayString(d.name),5)]),_:2},1032,["content"]))),256))])):(e.openBlock(),e.createBlock(we,{key:1,text:n.value},null,8,["text"]))}},[["__scopeId","data-v-0f1a01e9"]]),fu={__name:"FieldEditor",props:{modelValue:[String,Number,Array],field:Object,type:String,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(r,{emit:t}){const n=G.useRoute(),o=Z(n),s=t,a=r,i=e.reactive({value:a.modelValue}),c=e.ref([]);async function d(p){c.value=await a.field.options(a.formData,o,p)}function f(){s("update:modelValue",i.value)}return e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),d(),(p,m)=>(e.openBlock(),e.createBlock(e.unref(k.ElSelect),{modelValue:i.value,"onUpdate:modelValue":m[0]||(m[0]=E=>i.value=E),style:{width:"100%"},filterable:"","reserve-keyword":"","remote-show-suffix":"",clearable:"","fit-input-width":"",multiple:a.field.multiple,disabled:a.disabled,placeholder:"",remote:"","remote-method":d,onChange:f},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,E=>(e.openBlock(),e.createBlock(e.unref(k.ElOption),{key:E.code,label:E.name,value:E.code,title:E.name,disabled:E.disabled},null,8,["label","value","title","disabled"]))),128))]),_:1},8,["modelValue","multiple","disabled"]))}};class pu extends re{constructor(t,n){super(t,n),this.options=t.options||(()=>[{code:0,name:"未实现"}]),this.formChange=t.formChange||(()=>{}),this.display=uu,this.editor=fu,this.multiple=this.defaultBy(t.multiple,!1),this.checkValidProperties(t)}}const hu=Object.freeze(Object.defineProperty({__proto__:null,default:pu},Symbol.toStringTag,{value:"Module"})),mu={key:0},gu={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref(!1),o=e.ref("..."),s=t.row[t.field.code];return s==null||`${s}`.trim()===""?n.value=!0:(o.value=s,n.value=!1),(a,i)=>n.value?(e.openBlock(),e.createBlock(we,{key:1})):(e.openBlock(),e.createElementBlock("span",mu,e.toDisplayString(o.value),1))}},_u={__name:"FieldEditor",props:{modelValue:[Object,String,Number],field:Object,type:String,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive({value:o.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>o.modelValue,()=>{s.value=o.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(k.ElInput),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),type:r.field.type,clearable:"",disabled:o.disabled,onInput:a},null,8,["modelValue","type","disabled"]))}};class yu extends re{constructor(t,n){super(t,n),this.display=gu,this.editor=_u,this.checkValidProperties(t)}}const bu=Object.freeze(Object.defineProperty({__proto__:null,default:yu},Symbol.toStringTag,{value:"Module"})),wu={style:{display:"flex","align-items":"center"}},ku={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},emits:["enable"],setup(r,{emit:t}){const n=t,o=r,s=e.ref(o.row.deletedAt);function a(c,d){return c.label=d,new Promise((f,p)=>{n("enable",c)})}const i=e.computed(()=>o.row[o.field.code]);return(c,d)=>(e.openBlock(),e.createElementBlock("span",wu,[e.createVNode(e.unref(k.ElSwitch),{modelValue:i.value,"onUpdate:modelValue":d[0]||(d[0]=f=>i.value=f),size:"small",disabled:!!s.value,"before-change":f=>a(r.row,r.field.label)},null,8,["modelValue","disabled","before-change"])]))}},Eu={__name:"FieldEditor",props:{modelValue:Boolean,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive({value:o.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>o.modelValue,()=>{s.value=o.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(k.ElSwitch),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),disabled:o.disabled,onChange:a},null,8,["modelValue","disabled"]))}};class xu extends re{constructor(t,n){super(t,n),this.default=t.default||!1,this.display=ku,this.editor=Eu,this.checkValidProperties(t)}}const Bu=Object.freeze(Object.defineProperty({__proto__:null,default:xu},Symbol.toStringTag,{value:"Module"})),Su={key:0},Cu={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref(!1),o=e.ref("..."),s=t.row[t.field.code];return s==null||`${s}`.trim()===""?n.value=!0:(o.value=s,n.value=!1),(a,i)=>n.value?(e.openBlock(),e.createBlock(we,{key:1})):(e.openBlock(),e.createElementBlock("span",Su,e.toDisplayString(o.value),1))}},$u={__name:"FieldEditor",props:{modelValue:String,field:Object,type:String,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive({value:o.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>o.modelValue,()=>{s.value=o.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(k.ElInput),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),type:"textarea",rows:"5",clearable:"",disabled:o.disabled,onInput:a},null,8,["modelValue","disabled"]))}};class Vu extends re{constructor(t,n){super(t,n),this.display=Cu,this.editor=$u,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const Ou=Object.freeze(Object.defineProperty({__proto__:null,default:Vu},Symbol.toStringTag,{value:"Module"})),Tu={key:0,class:"select-fields"},Nu=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref("..."),o=e.ref(!1),s=e.ref([]);async function a(){const i=t.row[t.field.code],c=t.field.label;if(i==null){n.value="<无>",o.value=!1;return}const d=await t.field.options();if(!d){n.value=`<未知: ${c}>`,o.value=!1;return}let f=[];if(t.field.multiple?f=d.filter(p=>i.includes(p.code)):f=d.filter(p=>i===p.code),f.length===0){n.value=`<未找到: ${i}>`,o.value=!1;return}s.value=f.map(p=>({bgColor:Fa.strToHexColor(`${p.code}-${p.name}`),code:p.code,name:p.name})),o.value=!0}return e.watch(()=>t.row,a,{immediate:!0}),(i,c)=>{const d=e.resolveComponent("el-tooltip");return o.value?(e.openBlock(),e.createElementBlock("div",Tu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,f=>(e.openBlock(),e.createBlock(d,{content:`${f.code}`,placement:"top"},{default:e.withCtx(()=>[e.createElementVNode("span",{class:"select-field found",style:e.normalizeStyle(`background: ${f.bgColor}`)},e.toDisplayString(f.name),5)]),_:2},1032,["content"]))),256))])):(e.openBlock(),e.createBlock(we,{key:1,text:n.value},null,8,["text"]))}}},[["__scopeId","data-v-ed986acf"]]),Au={__name:"FieldEditor",props:{modelValue:Number,field:Object,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(r,{emit:t}){const n=G.useRoute(),o=Z(n),s=t,a=r,i=e.reactive({value:a.modelValue}),c=e.ref([]),d={label:"name",children:"children",value:"id"};async function f(m){c.value=await a.field.options(a.formData,o,m)}function p(){s("update:modelValue",i.value)}return e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),f(),(m,E)=>(e.openBlock(),e.createBlock(e.unref(k.ElTreeSelect),{modelValue:i.value,"onUpdate:modelValue":E[0]||(E[0]=B=>i.value=B),style:{width:"100%"},data:c.value,props:d,"node-key":"id",multiple:a.field.multiple,"render-after-expand":!1,"show-checkbox":"","check-on-click-node":"","expand-on-click-node":!1,"default-expand-all":"","highlight-current":"",disabled:a.field.disabled,"check-strictly":!0,remote:"",filterable:"","remote-method":f,onCheck:p},null,8,["modelValue","data","multiple","disabled"]))}};class Du extends re{constructor(t,n){super(t,n),this.options=t.options||(()=>[]),this.formChange=t.formChange||(()=>{}),this.multiple=this.defaultBy(t.multiple,!1),this.display=Nu,this.editor=Au,this.checkValidProperties(t)}}const Fu=Object.freeze(Object.defineProperty({__proto__:null,default:Du},Symbol.toStringTag,{value:"Module"})),ju=["src"],Ru=Object.freeze(Object.defineProperty({__proto__:null,default:M({__name:"ImagesUploader",props:{images:{type:Array,default(){return[]}},limit:{type:Number},props:{type:Object,default(){return{listType:"picture-card",limit:5,accept:"image/*"}}}},emits:["on-remove","on-upload"],setup(r,{emit:t}){const n=t,o=e.ref(""),s=e.ref(!1),a=r,i=e.computed(()=>a.images.map(E=>{if(!(E!=null&&E.url))return{...E,name:"unknown",fileType:"unknown"};const B=E.url.substring(E.url.lastIndexOf(".")+1),y=E.url.split("/");return{...E,name:y[y.length-1],fileType:B}}));function c(E){n("on-remove",E)}function d(){k.ElMessage({message:`最多只能上传 ${a.props.limit} 个文件!`,type:"warning"})}function f(E){o.value=E.url,s.value=!0}function p(E){return E.size>5242880?(k.ElMessage({message:"上传大小不能超过 5MB!",type:"warning"}),!1):!0}function m(E){const B=new FormData;B.append("file",E.file),n("on-upload",B)}return(E,B)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(k.ElUpload),{"file-list":i.value,limit:a.props.limit,accept:a.props.accept,"list-type":a.props.listType,"on-remove":c,"on-exceed":d,"on-preview":f,multiple:!0,"before-upload":p,"http-request":m,"show-file-list":a.props.listType!=="text",class:e.normalizeClass(["upload-main",{"disable-upload":i.value.length>=a.props.limit}]),onClick:B[0]||(B[0]=e.withModifiers(()=>{},["prevent"]))},{default:e.withCtx(()=>[a.props.listType!=="text"?(e.openBlock(),e.createBlock(e.unref(k.ElIcon),{key:0,disabled:!0},{default:e.withCtx(()=>[e.createVNode(e.unref(Er))]),_:1})):(e.openBlock(),e.createBlock(e.unref(k.ElButton),{key:1,class:"upload-button",type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(" 上传附件 ")]),_:1}))]),_:1},8,["file-list","limit","accept","list-type","show-file-list","class"]),e.createVNode(e.unref(k.ElDialog),{modelValue:s.value,"onUpdate:modelValue":B[1]||(B[1]=y=>s.value=y)},{default:e.withCtx(()=>[e.createElementVNode("img",{"w-full":"",src:o.value,alt:"Preview Image"},null,8,ju)]),_:1},8,["modelValue"])]))}},[["__scopeId","data-v-cb22ed8f"]])},Symbol.toStringTag,{value:"Module"})),Iu=["src"],Lu={class:"file-type"},Mu=Object.freeze(Object.defineProperty({__proto__:null,default:M({__name:"AttachmentUploader",props:{pics:{type:Array,default(){return[]}},limit:{type:Number},props:{type:Object,default(){return{listType:"picture-card",limit:5,accept:"image/*"}}}},emits:["on-success","on-remove","on-change"],setup(r,{emit:t}){const n=t,o=r,s=e.computed(()=>o.pics.map(h=>{const b=h.url.substring(h.url.lastIndexOf(".")+1);if(typeof h.name!==void 0)return h.fileType=b,h;if(h.url){const _=h.url.split("/");return{...h,name:_[_.length-1],fileType:b}}return{...h,name:h.id,fileType:b}})),a=e.ref(""),i=e.ref(!1);e.ref(o);const c=ot().fileUploadUrl;`${localStorage.getItem("token")}`;const d=h=>{const b=new FileReader;return b.readAsDataURL(h),new Promise(function(_,w){return h.type.startsWith("image/")?(b.onload=async x=>{const C=new Image;C.src=x.target.result,C.onload=()=>{const N=document.createElement("canvas"),D=N.getContext("2d");N.width=C.width,N.height=C.height,D.drawImage(C,0,0,N.width,N.height),N.toBlob(R=>{const Q=new File([R],h.name,{type:h.type,lastModified:Date.now()});_(Q)},h.type,.5)}},!1):(_(h),!1)})},f=h=>{h.status==="success"&&n("on-remove",h)},p=()=>{k.ElMessage({message:`最多只能上传 ${o.props.limit} 个文件!`,type:"warning"})},m=h=>{a.value=h.url,i.value=!0},E=h=>{const b=h.name.substring(0,h.name.lastIndexOf("."));if(!/^[\u4e00-\u9fa5\w-_]+$/.test(b))return k.ElMessage({message:"请勿输入特殊字符!",type:"warning"}),!1;d(h).then(w=>w.size/1024/1024<5?(y(w),!1):(k.ElMessage({message:"上传大小不能超过 5MB!",type:"warning"}),!1))};function B(h,b){if(!h.name){k.ElMessage({message:"附件名称不能为空!",type:"warning"});return}n("on-change",h)}function y(h){return k.ElLoading.service({text:"上传中,请稍后",background:"rgba(0,0,0,0.3)"}),new Promise((b,_)=>{const w=new FormData;w.append("file",h),v.post(c,w,{}).then(x=>(k.ElLoading.service().close(),k.ElMessage({message:"上传成功",type:"success"}),n("on-success",x.data.data),b(x.data),!1)).catch(()=>{k.ElLoading.service().close(),k.ElMessage({message:"上传失败",type:"warning"}),_("Upload failed")})})}return(h,b)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(k.ElUpload),{"file-list":s.value,action:e.unref(c),limit:o.props.limit,accept:o.props.accept,"list-type":o.props.listType,"on-remove":f,"before-upload":E,"on-exceed":p,"on-preview":m,multiple:!0,"http-request":()=>!1,"show-file-list":o.props.listType!=="text",class:e.normalizeClass(["upload-main",{"disable-upload":s.value.length>=o.props.limit}]),onClick:b[0]||(b[0]=e.withModifiers(()=>{},["prevent"]))},{default:e.withCtx(()=>[o.props.listType!=="text"?(e.openBlock(),e.createBlock(e.unref(k.ElIcon),{key:0,disabled:!0},{default:e.withCtx(()=>[e.createVNode(e.unref(Er))]),_:1})):(e.openBlock(),e.createBlock(e.unref(k.ElButton),{key:1,class:"upload-button",type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(" 上传附件 ")]),_:1}))]),_:1},8,["file-list","action","limit","accept","list-type","show-file-list","class"]),e.createVNode(e.unref(k.ElDialog),{modelValue:i.value,"onUpdate:modelValue":b[1]||(b[1]=_=>i.value=_)},{default:e.withCtx(()=>[e.createElementVNode("img",{"w-full":"",src:a.value,alt:"Preview Image"},null,8,Iu)]),_:1},8,["modelValue"]),o.props.listType=="text"?(e.openBlock(),e.createBlock(e.unref(k.ElForm),{key:0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(_,w)=>(e.openBlock(),e.createBlock(e.unref(k.ElFormItem),{key:w,class:"file-list"},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElIcon),{color:"#73767a",size:14},{default:e.withCtx(()=>[e.createVNode(e.unref(ma))]),_:1}),e.createVNode(e.unref(k.ElInput),{modelValue:_.name,"onUpdate:modelValue":x=>_.name=x,onChange:x=>B(_)},null,8,["modelValue","onUpdate:modelValue","onChange"]),e.createElementVNode("span",Lu,"."+e.toDisplayString(_.fileType),1),e.createVNode(e.unref(k.ElIcon),{color:"#73767a",size:12,onClick:x=>f(_)},{default:e.withCtx(()=>[e.createVNode(e.unref(pa))]),_:2},1032,["onClick"])]),_:2},1024))),128))]),_:1})):e.createCommentVNode("",!0)],64))}},[["__scopeId","data-v-aa2fe0b2"]])},Symbol.toStringTag,{value:"Module"})),Uu={class:"image-slot"},zu=Object.freeze(Object.defineProperty({__proto__:null,default:M({__name:"ImageUploader",props:{imageUrl:{type:String}},emits:["on-success"],setup(r,{emit:t}){const n=t,o=r,s=ot().imageUploadUrl;`${localStorage.getItem("token")}`;const a=f=>{if(!(f.size/1024/1024<5))return k.ElMessage({message:"上传大小不能超过 5MB!",type:"warning"}),!1},i=f=>{n("on-success",f.data.imageUrl)};function c(){n("on-success","")}function d(f){return k.ElLoading.service({text:"上传中,请稍后",background:"rgba(0,0,0,0.3)"}),new Promise((p,m)=>{const E=new FormData;E.append("image",f.file),v.post(s,E,{}).then(B=>{k.ElLoading.service().close(),k.ElMessage({message:"上传成功",type:"success"}),p(B.data)}).catch(()=>{k.ElLoading.service().close(),k.ElMessage({message:"上传失败",type:"warning"}),m("Upload failed")})})}return(f,p)=>(e.openBlock(),e.createBlock(e.unref(k.ElUpload),{class:"image-uploader",action:e.unref(s),name:"image","show-file-list":!1,"on-success":i,"before-upload":a,"http-request":d},{default:e.withCtx(()=>[e.renderSlot(f.$slots,"default",{},void 0,!0),o.imageUrl?(e.openBlock(),e.createBlock(e.unref(k.ElImage),{key:0,class:"image",src:o.imageUrl,fit:"scale-down"},{placeholder:e.withCtx(()=>[e.createElementVNode("div",Uu,[e.createVNode(e.unref(k.ElIcon),{class:"placeholder-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(ga))]),_:1})])]),_:1},8,["src"])):(e.openBlock(),e.createBlock(e.unref(k.ElIcon),{key:1,class:"uploader-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(Er))]),_:1})),o.imageUrl?(e.openBlock(),e.createBlock(e.unref(k.ElIcon),{key:2,class:"delete-icon",onClick:e.withModifiers(c,["stop","prevent"])},{default:e.withCtx(()=>[e.createVNode(e.unref(Zi))]),_:1})):e.createCommentVNode("",!0)]),_:3},8,["action"]))}},[["__scopeId","data-v-ae965bb4"]])},Symbol.toStringTag,{value:"Module"}));var Ue=-1,xe=1,fe=0;function Ut(r,t,n,o){if(r===t)return r?[[fe,r]]:[];if(n!=null){var s=Gu(r,t,n);if(s)return s}var a=Sr(r,t),i=r.substring(0,a);r=r.substring(a),t=t.substring(a),a=Cr(r,t);var c=r.substring(r.length-a);r=r.substring(0,r.length-a),t=t.substring(0,t.length-a);var d=Hu(r,t);return i&&d.unshift([fe,i]),c&&d.push([fe,c]),Ra(d,o),d}function Hu(r,t){var n;if(!r)return[[xe,t]];if(!t)return[[Ue,r]];var o=r.length>t.length?r:t,s=r.length>t.length?t:r,a=o.indexOf(s);if(a!==-1)return n=[[xe,o.substring(0,a)],[fe,s],[xe,o.substring(a+s.length)]],r.length>t.length&&(n[0][0]=n[2][0]=Ue),n;if(s.length===1)return[[Ue,r],[xe,t]];var i=Pu(r,t);if(i){var c=i[0],d=i[1],f=i[2],p=i[3],m=i[4],E=Ut(c,f),B=Ut(d,p);return E.concat([[fe,m]],B)}return qu(r,t)}function qu(r,t){for(var n=r.length,o=t.length,s=Math.ceil((n+o)/2),a=s,i=2*s,c=new Array(i),d=new Array(i),f=0;f<i;f++)c[f]=-1,d[f]=-1;c[a+1]=0,d[a+1]=0;for(var p=n-o,m=p%2!==0,E=0,B=0,y=0,h=0,b=0;b<s;b++){for(var _=-b+E;_<=b-B;_+=2){var w=a+_,x;_===-b||_!==b&&c[w-1]<c[w+1]?x=c[w+1]:x=c[w-1]+1;for(var C=x-_;x<n&&C<o&&r.charAt(x)===t.charAt(C);)x++,C++;if(c[w]=x,x>n)B+=2;else if(C>o)E+=2;else if(m){var N=a+p-_;if(N>=0&&N<i&&d[N]!==-1){var D=n-d[N];if(x>=D)return ja(r,t,x,C)}}}for(var R=-b+y;R<=b-h;R+=2){var N=a+R,D;R===-b||R!==b&&d[N-1]<d[N+1]?D=d[N+1]:D=d[N-1]+1;for(var Q=D-R;D<n&&Q<o&&r.charAt(n-D-1)===t.charAt(o-Q-1);)D++,Q++;if(d[N]=D,D>n)h+=2;else if(Q>o)y+=2;else if(!m){var w=a+p-R;if(w>=0&&w<i&&c[w]!==-1){var x=c[w],C=a+x-w;if(D=n-D,x>=D)return ja(r,t,x,C)}}}}return[[Ue,r],[xe,t]]}function ja(r,t,n,o){var s=r.substring(0,n),a=t.substring(0,o),i=r.substring(n),c=t.substring(o),d=Ut(s,a),f=Ut(i,c);return d.concat(f)}function Sr(r,t){if(!r||!t||r.charAt(0)!==t.charAt(0))return 0;for(var n=0,o=Math.min(r.length,t.length),s=o,a=0;n<s;)r.substring(a,s)==t.substring(a,s)?(n=s,a=n):o=s,s=Math.floor((o-n)/2+n);return Ia(r.charCodeAt(s-1))&&s--,s}function Cr(r,t){if(!r||!t||r.slice(-1)!==t.slice(-1))return 0;for(var n=0,o=Math.min(r.length,t.length),s=o,a=0;n<s;)r.substring(r.length-s,r.length-a)==t.substring(t.length-s,t.length-a)?(n=s,a=n):o=s,s=Math.floor((o-n)/2+n);return La(r.charCodeAt(r.length-s))&&s--,s}function Pu(r,t){var n=r.length>t.length?r:t,o=r.length>t.length?t:r;if(n.length<4||o.length*2<n.length)return null;function s(B,y,h){for(var b=B.substring(h,h+Math.floor(B.length/4)),_=-1,w="",x,C,N,D;(_=y.indexOf(b,_+1))!==-1;){var R=Sr(B.substring(h),y.substring(_)),Q=Cr(B.substring(0,h),y.substring(0,_));w.length<Q+R&&(w=y.substring(_-Q,_)+y.substring(_,_+R),x=B.substring(0,h-Q),C=B.substring(h+R),N=y.substring(0,_-Q),D=y.substring(_+R))}return w.length*2>=B.length?[x,C,N,D,w]:null}var a=s(n,o,Math.ceil(n.length/4)),i=s(n,o,Math.ceil(n.length/2)),c;if(!a&&!i)return null;i?a?c=a[4].length>i[4].length?a:i:c=i:c=a;var d,f,p,m;r.length>t.length?(d=c[0],f=c[1],p=c[2],m=c[3]):(p=c[0],m=c[1],d=c[2],f=c[3]);var E=c[4];return[d,f,p,m,E]}function Ra(r,t){r.push([fe,""]);for(var n=0,o=0,s=0,a="",i="",c;n<r.length;){if(n<r.length-1&&!r[n][1]){r.splice(n,1);continue}switch(r[n][0]){case xe:s++,i+=r[n][1],n++;break;case Ue:o++,a+=r[n][1],n++;break;case fe:var d=n-s-o-1;if(t){if(d>=0&&Ua(r[d][1])){var f=r[d][1].slice(-1);if(r[d][1]=r[d][1].slice(0,-1),a=f+a,i=f+i,!r[d][1]){r.splice(d,1),n--;var p=d-1;r[p]&&r[p][0]===xe&&(s++,i=r[p][1]+i,p--),r[p]&&r[p][0]===Ue&&(o++,a=r[p][1]+a,p--),d=p}}if(Ma(r[n][1])){var f=r[n][1].charAt(0);r[n][1]=r[n][1].slice(1),a+=f,i+=f}}if(n<r.length-1&&!r[n][1]){r.splice(n,1);break}if(a.length>0||i.length>0){a.length>0&&i.length>0&&(c=Sr(i,a),c!==0&&(d>=0?r[d][1]+=i.substring(0,c):(r.splice(0,0,[fe,i.substring(0,c)]),n++),i=i.substring(c),a=a.substring(c)),c=Cr(i,a),c!==0&&(r[n][1]=i.substring(i.length-c)+r[n][1],i=i.substring(0,i.length-c),a=a.substring(0,a.length-c)));var m=s+o;a.length===0&&i.length===0?(r.splice(n-m,m),n=n-m):a.length===0?(r.splice(n-m,m,[xe,i]),n=n-m+1):i.length===0?(r.splice(n-m,m,[Ue,a]),n=n-m+1):(r.splice(n-m,m,[Ue,a],[xe,i]),n=n-m+2)}n!==0&&r[n-1][0]===fe?(r[n-1][1]+=r[n][1],r.splice(n,1)):n++,s=0,o=0,a="",i="";break}}r[r.length-1][1]===""&&r.pop();var E=!1;for(n=1;n<r.length-1;)r[n-1][0]===fe&&r[n+1][0]===fe&&(r[n][1].substring(r[n][1].length-r[n-1][1].length)===r[n-1][1]?(r[n][1]=r[n-1][1]+r[n][1].substring(0,r[n][1].length-r[n-1][1].length),r[n+1][1]=r[n-1][1]+r[n+1][1],r.splice(n-1,1),E=!0):r[n][1].substring(0,r[n+1][1].length)==r[n+1][1]&&(r[n-1][1]+=r[n+1][1],r[n][1]=r[n][1].substring(r[n+1][1].length)+r[n+1][1],r.splice(n+1,1),E=!0)),n++;E&&Ra(r,t)}function Ia(r){return r>=55296&&r<=56319}function La(r){return r>=56320&&r<=57343}function Ma(r){return La(r.charCodeAt(0))}function Ua(r){return Ia(r.charCodeAt(r.length-1))}function Wu(r){for(var t=[],n=0;n<r.length;n++)r[n][1].length>0&&t.push(r[n]);return t}function $r(r,t,n,o){return Ua(r)||Ma(o)?null:Wu([[fe,r],[Ue,t],[xe,n],[fe,o]])}function Gu(r,t,n){var o=typeof n=="number"?{index:n,length:0}:n.oldRange,s=typeof n=="number"?null:n.newRange,a=r.length,i=t.length;if(o.length===0&&(s===null||s.length===0)){var c=o.index,d=r.slice(0,c),f=r.slice(c),p=s?s.index:null;e:{var m=c+i-a;if(p!==null&&p!==m||m<0||m>i)break e;var E=t.slice(0,m),B=t.slice(m);if(B!==f)break e;var y=Math.min(c,m),h=d.slice(0,y),b=E.slice(0,y);if(h!==b)break e;var _=d.slice(y),w=E.slice(y);return $r(h,_,w,f)}e:{if(p!==null&&p!==c)break e;var x=c,E=t.slice(0,x),B=t.slice(x);if(E!==d)break e;var C=Math.min(a-x,i-x),N=f.slice(f.length-C),D=B.slice(B.length-C);if(N!==D)break e;var _=f.slice(0,f.length-C),w=B.slice(0,B.length-C);return $r(d,_,w,N)}}if(o.length>0&&s&&s.length===0)e:{var h=r.slice(0,o.index),N=r.slice(o.index+o.length),y=h.length,C=N.length;if(i<y+C)break e;var b=t.slice(0,y),D=t.slice(i-C);if(h!==b||N!==D)break e;var _=r.slice(y,a-C),w=t.slice(y,i-C);return $r(h,_,w,N)}return null}function Sn(r,t,n){return Ut(r,t,n,!0)}Sn.INSERT=xe,Sn.DELETE=Ue,Sn.EQUAL=fe;var Qu=Sn,Cn={exports:{}};Cn.exports,function(r,t){var n=200,o="__lodash_hash_undefined__",s=9007199254740991,a="[object Arguments]",i="[object Array]",c="[object Boolean]",d="[object Date]",f="[object Error]",p="[object Function]",m="[object GeneratorFunction]",E="[object Map]",B="[object Number]",y="[object Object]",h="[object Promise]",b="[object RegExp]",_="[object Set]",w="[object String]",x="[object Symbol]",C="[object WeakMap]",N="[object ArrayBuffer]",D="[object DataView]",R="[object Float32Array]",Q="[object Float64Array]",et="[object Int8Array]",ze="[object Int16Array]",V="[object Int32Array]",I="[object Uint8Array]",Y="[object Uint8ClampedArray]",L="[object Uint16Array]",P="[object Uint32Array]",de=/[\\^$.*+?()[\]{}|]/g,ye=/\w*$/,Nr=/^\[object .+?Constructor\]$/,Ar=/^(?:0|[1-9]\d*)$/,J={};J[a]=J[i]=J[N]=J[D]=J[c]=J[d]=J[R]=J[Q]=J[et]=J[ze]=J[V]=J[E]=J[B]=J[y]=J[b]=J[_]=J[w]=J[x]=J[I]=J[Y]=J[L]=J[P]=!0,J[f]=J[p]=J[C]=!1;var Dr=typeof ne=="object"&&ne&&ne.Object===Object&&ne,Fr=typeof self=="object"&&self&&self.Object===Object&&self,Be=Dr||Fr||Function("return this")(),Nn=t&&!t.nodeType&&t,K=Nn&&!0&&r&&!r.nodeType&&r,An=K&&K.exports===Nn;function jr(l,u){return l.set(u[0],u[1]),l}function Se(l,u){return l.add(u),l}function Dn(l,u){for(var g=-1,S=l?l.length:0;++g<S&&u(l[g],g,l)!==!1;);return l}function Fn(l,u){for(var g=-1,S=u.length,j=l.length;++g<S;)l[j+g]=u[g];return l}function qt(l,u,g,S){for(var j=-1,A=l?l.length:0;++j<A;)g=u(g,l[j],j,l);return g}function Pt(l,u){for(var g=-1,S=Array(l);++g<l;)S[g]=u(g);return S}function jn(l,u){return l==null?void 0:l[u]}function Wt(l){var u=!1;if(l!=null&&typeof l.toString!="function")try{u=!!(l+"")}catch{}return u}function Rn(l){var u=-1,g=Array(l.size);return l.forEach(function(S,j){g[++u]=[j,S]}),g}function Gt(l,u){return function(g){return l(u(g))}}function In(l){var u=-1,g=Array(l.size);return l.forEach(function(S){g[++u]=S}),g}var Rr=Array.prototype,Ir=Function.prototype,wt=Object.prototype,Qt=Be["__core-js_shared__"],Ln=function(){var l=/[^.]+$/.exec(Qt&&Qt.keys&&Qt.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""}(),Mn=Ir.toString,He=wt.hasOwnProperty,kt=wt.toString,Lr=RegExp("^"+Mn.call(He).replace(de,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),it=An?Be.Buffer:void 0,Et=Be.Symbol,Jt=Be.Uint8Array,be=Gt(Object.getPrototypeOf,Object),Un=Object.create,zn=wt.propertyIsEnumerable,Mr=Rr.splice,Kt=Object.getOwnPropertySymbols,xt=it?it.isBuffer:void 0,Hn=Gt(Object.keys,Object),Bt=$e(Be,"DataView"),lt=$e(Be,"Map"),Ce=$e(Be,"Promise"),St=$e(Be,"Set"),Yt=$e(Be,"WeakMap"),ct=$e(Object,"create"),vt=ue(Bt),dt=ue(lt),Xt=ue(Ce),Zt=ue(St),en=ue(Yt),tt=Et?Et.prototype:void 0,qn=tt?tt.valueOf:void 0;function Ge(l){var u=-1,g=l?l.length:0;for(this.clear();++u<g;){var S=l[u];this.set(S[0],S[1])}}function Ur(){this.__data__=ct?ct(null):{}}function zr(l){return this.has(l)&&delete this.__data__[l]}function Hr(l){var u=this.__data__;if(ct){var g=u[l];return g===o?void 0:g}return He.call(u,l)?u[l]:void 0}function Pn(l){var u=this.__data__;return ct?u[l]!==void 0:He.call(u,l)}function tn(l,u){var g=this.__data__;return g[l]=ct&&u===void 0?o:u,this}Ge.prototype.clear=Ur,Ge.prototype.delete=zr,Ge.prototype.get=Hr,Ge.prototype.has=Pn,Ge.prototype.set=tn;function ae(l){var u=-1,g=l?l.length:0;for(this.clear();++u<g;){var S=l[u];this.set(S[0],S[1])}}function qr(){this.__data__=[]}function Pr(l){var u=this.__data__,g=$t(u,l);if(g<0)return!1;var S=u.length-1;return g==S?u.pop():Mr.call(u,g,1),!0}function Wr(l){var u=this.__data__,g=$t(u,l);return g<0?void 0:u[g][1]}function Gr(l){return $t(this.__data__,l)>-1}function Qr(l,u){var g=this.__data__,S=$t(g,l);return S<0?g.push([l,u]):g[S][1]=u,this}ae.prototype.clear=qr,ae.prototype.delete=Pr,ae.prototype.get=Wr,ae.prototype.has=Gr,ae.prototype.set=Qr;function ie(l){var u=-1,g=l?l.length:0;for(this.clear();++u<g;){var S=l[u];this.set(S[0],S[1])}}function Jr(){this.__data__={hash:new Ge,map:new(lt||ae),string:new Ge}}function Kr(l){return ft(this,l).delete(l)}function Yr(l){return ft(this,l).get(l)}function vr(l){return ft(this,l).has(l)}function Xr(l,u){return ft(this,l).set(l,u),this}ie.prototype.clear=Jr,ie.prototype.delete=Kr,ie.prototype.get=Yr,ie.prototype.has=vr,ie.prototype.set=Xr;function pe(l){this.__data__=new ae(l)}function Zr(){this.__data__=new ae}function eo(l){return this.__data__.delete(l)}function to(l){return this.__data__.get(l)}function no(l){return this.__data__.has(l)}function ro(l,u){var g=this.__data__;if(g instanceof ae){var S=g.__data__;if(!lt||S.length<n-1)return S.push([l,u]),this;g=this.__data__=new ie(S)}return g.set(l,u),this}pe.prototype.clear=Zr,pe.prototype.delete=eo,pe.prototype.get=to,pe.prototype.has=no,pe.prototype.set=ro;function Ct(l,u){var g=an(l)||Ot(l)?Pt(l.length,String):[],S=g.length,j=!!S;for(var A in l)He.call(l,A)&&!(j&&(A=="length"||yo(A,S)))&&g.push(A);return g}function Wn(l,u,g){var S=l[u];(!(He.call(l,u)&&Yn(S,g))||g===void 0&&!(u in l))&&(l[u]=g)}function $t(l,u){for(var g=l.length;g--;)if(Yn(l[g][0],u))return g;return-1}function qe(l,u){return l&&on(u,ln(u),l)}function nn(l,u,g,S,j,A,H){var z;if(S&&(z=A?S(l,j,A,H):S(l)),z!==void 0)return z;if(!We(l))return l;var X=an(l);if(X){if(z=go(l),!u)return po(l,z)}else{var W=Je(l),le=W==p||W==m;if(vn(l))return Vt(l,u);if(W==y||W==a||le&&!A){if(Wt(l))return A?l:{};if(z=Pe(le?{}:l),!u)return ho(l,qe(z,l))}else{if(!J[W])return A?l:{};z=_o(l,W,nn,u)}}H||(H=new pe);var he=H.get(l);if(he)return he;if(H.set(l,z),!X)var ee=g?mo(l):ln(l);return Dn(ee||l,function(ce,se){ee&&(se=ce,ce=l[se]),Wn(z,se,nn(ce,u,g,S,se,l,H))}),z}function oo(l){return We(l)?Un(l):{}}function ao(l,u,g){var S=u(l);return an(l)?S:Fn(S,g(l))}function so(l){return kt.call(l)}function io(l){if(!We(l)||wo(l))return!1;var u=sn(l)||Wt(l)?Lr:Nr;return u.test(ue(l))}function lo(l){if(!Jn(l))return Hn(l);var u=[];for(var g in Object(l))He.call(l,g)&&g!="constructor"&&u.push(g);return u}function Vt(l,u){if(u)return l.slice();var g=new l.constructor(l.length);return l.copy(g),g}function rn(l){var u=new l.constructor(l.byteLength);return new Jt(u).set(new Jt(l)),u}function ut(l,u){var g=u?rn(l.buffer):l.buffer;return new l.constructor(g,l.byteOffset,l.byteLength)}function Gn(l,u,g){var S=u?g(Rn(l),!0):Rn(l);return qt(S,jr,new l.constructor)}function Qn(l){var u=new l.constructor(l.source,ye.exec(l));return u.lastIndex=l.lastIndex,u}function co(l,u,g){var S=u?g(In(l),!0):In(l);return qt(S,Se,new l.constructor)}function uo(l){return qn?Object(qn.call(l)):{}}function fo(l,u){var g=u?rn(l.buffer):l.buffer;return new l.constructor(g,l.byteOffset,l.length)}function po(l,u){var g=-1,S=l.length;for(u||(u=Array(S));++g<S;)u[g]=l[g];return u}function on(l,u,g,S){g||(g={});for(var j=-1,A=u.length;++j<A;){var H=u[j],z=void 0;Wn(g,H,z===void 0?l[H]:z)}return g}function ho(l,u){return on(l,Qe(l),u)}function mo(l){return ao(l,ln,Qe)}function ft(l,u){var g=l.__data__;return bo(u)?g[typeof u=="string"?"string":"hash"]:g.map}function $e(l,u){var g=jn(l,u);return io(g)?g:void 0}var Qe=Kt?Gt(Kt,Object):Eo,Je=so;(Bt&&Je(new Bt(new ArrayBuffer(1)))!=D||lt&&Je(new lt)!=E||Ce&&Je(Ce.resolve())!=h||St&&Je(new St)!=_||Yt&&Je(new Yt)!=C)&&(Je=function(l){var u=kt.call(l),g=u==y?l.constructor:void 0,S=g?ue(g):void 0;if(S)switch(S){case vt:return D;case dt:return E;case Xt:return h;case Zt:return _;case en:return C}return u});function go(l){var u=l.length,g=l.constructor(u);return u&&typeof l[0]=="string"&&He.call(l,"index")&&(g.index=l.index,g.input=l.input),g}function Pe(l){return typeof l.constructor=="function"&&!Jn(l)?oo(be(l)):{}}function _o(l,u,g,S){var j=l.constructor;switch(u){case N:return rn(l);case c:case d:return new j(+l);case D:return ut(l,S);case R:case Q:case et:case ze:case V:case I:case Y:case L:case P:return fo(l,S);case E:return Gn(l,S,g);case B:case w:return new j(l);case b:return Qn(l);case _:return co(l,S,g);case x:return uo(l)}}function yo(l,u){return u=u??s,!!u&&(typeof l=="number"||Ar.test(l))&&l>-1&&l%1==0&&l<u}function bo(l){var u=typeof l;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?l!=="__proto__":l===null}function wo(l){return!!Ln&&Ln in l}function Jn(l){var u=l&&l.constructor,g=typeof u=="function"&&u.prototype||wt;return l===g}function ue(l){if(l!=null){try{return Mn.call(l)}catch{}try{return l+""}catch{}}return""}function Kn(l){return nn(l,!0,!0)}function Yn(l,u){return l===u||l!==l&&u!==u}function Ot(l){return ko(l)&&He.call(l,"callee")&&(!zn.call(l,"callee")||kt.call(l)==a)}var an=Array.isArray;function Tt(l){return l!=null&&Xn(l.length)&&!sn(l)}function ko(l){return Zn(l)&&Tt(l)}var vn=xt||xo;function sn(l){var u=We(l)?kt.call(l):"";return u==p||u==m}function Xn(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=s}function We(l){var u=typeof l;return!!l&&(u=="object"||u=="function")}function Zn(l){return!!l&&typeof l=="object"}function ln(l){return Tt(l)?Ct(l):lo(l)}function Eo(){return[]}function xo(){return!1}r.exports=Kn}(Cn,Cn.exports);var za=Cn.exports,$n={exports:{}};$n.exports,function(r,t){var n=200,o="__lodash_hash_undefined__",s=1,a=2,i=9007199254740991,c="[object Arguments]",d="[object Array]",f="[object AsyncFunction]",p="[object Boolean]",m="[object Date]",E="[object Error]",B="[object Function]",y="[object GeneratorFunction]",h="[object Map]",b="[object Number]",_="[object Null]",w="[object Object]",x="[object Promise]",C="[object Proxy]",N="[object RegExp]",D="[object Set]",R="[object String]",Q="[object Symbol]",et="[object Undefined]",ze="[object WeakMap]",V="[object ArrayBuffer]",I="[object DataView]",Y="[object Float32Array]",L="[object Float64Array]",P="[object Int8Array]",de="[object Int16Array]",ye="[object Int32Array]",Nr="[object Uint8Array]",Ar="[object Uint8ClampedArray]",J="[object Uint16Array]",Dr="[object Uint32Array]",Fr=/[\\^$.*+?()[\]{}|]/g,Be=/^\[object .+?Constructor\]$/,Nn=/^(?:0|[1-9]\d*)$/,K={};K[Y]=K[L]=K[P]=K[de]=K[ye]=K[Nr]=K[Ar]=K[J]=K[Dr]=!0,K[c]=K[d]=K[V]=K[p]=K[I]=K[m]=K[E]=K[B]=K[h]=K[b]=K[w]=K[N]=K[D]=K[R]=K[ze]=!1;var An=typeof ne=="object"&&ne&&ne.Object===Object&&ne,jr=typeof self=="object"&&self&&self.Object===Object&&self,Se=An||jr||Function("return this")(),Dn=t&&!t.nodeType&&t,Fn=Dn&&!0&&r&&!r.nodeType&&r,qt=Fn&&Fn.exports===Dn,Pt=qt&&An.process,jn=function(){try{return Pt&&Pt.binding&&Pt.binding("util")}catch{}}(),Wt=jn&&jn.isTypedArray;function Rn(l,u){for(var g=-1,S=l==null?0:l.length,j=0,A=[];++g<S;){var H=l[g];u(H,g,l)&&(A[j++]=H)}return A}function Gt(l,u){for(var g=-1,S=u.length,j=l.length;++g<S;)l[j+g]=u[g];return l}function In(l,u){for(var g=-1,S=l==null?0:l.length;++g<S;)if(u(l[g],g,l))return!0;return!1}function Rr(l,u){for(var g=-1,S=Array(l);++g<l;)S[g]=u(g);return S}function Ir(l){return function(u){return l(u)}}function wt(l,u){return l.has(u)}function Qt(l,u){return l==null?void 0:l[u]}function Ln(l){var u=-1,g=Array(l.size);return l.forEach(function(S,j){g[++u]=[j,S]}),g}function Mn(l,u){return function(g){return l(u(g))}}function He(l){var u=-1,g=Array(l.size);return l.forEach(function(S){g[++u]=S}),g}var kt=Array.prototype,Lr=Function.prototype,it=Object.prototype,Et=Se["__core-js_shared__"],Jt=Lr.toString,be=it.hasOwnProperty,Un=function(){var l=/[^.]+$/.exec(Et&&Et.keys&&Et.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""}(),zn=it.toString,Mr=RegExp("^"+Jt.call(be).replace(Fr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Kt=qt?Se.Buffer:void 0,xt=Se.Symbol,Hn=Se.Uint8Array,Bt=it.propertyIsEnumerable,lt=kt.splice,Ce=xt?xt.toStringTag:void 0,St=Object.getOwnPropertySymbols,Yt=Kt?Kt.isBuffer:void 0,ct=Mn(Object.keys,Object),vt=Qe(Se,"DataView"),dt=Qe(Se,"Map"),Xt=Qe(Se,"Promise"),Zt=Qe(Se,"Set"),en=Qe(Se,"WeakMap"),tt=Qe(Object,"create"),qn=ue(vt),Ge=ue(dt),Ur=ue(Xt),zr=ue(Zt),Hr=ue(en),Pn=xt?xt.prototype:void 0,tn=Pn?Pn.valueOf:void 0;function ae(l){var u=-1,g=l==null?0:l.length;for(this.clear();++u<g;){var S=l[u];this.set(S[0],S[1])}}function qr(){this.__data__=tt?tt(null):{},this.size=0}function Pr(l){var u=this.has(l)&&delete this.__data__[l];return this.size-=u?1:0,u}function Wr(l){var u=this.__data__;if(tt){var g=u[l];return g===o?void 0:g}return be.call(u,l)?u[l]:void 0}function Gr(l){var u=this.__data__;return tt?u[l]!==void 0:be.call(u,l)}function Qr(l,u){var g=this.__data__;return this.size+=this.has(l)?0:1,g[l]=tt&&u===void 0?o:u,this}ae.prototype.clear=qr,ae.prototype.delete=Pr,ae.prototype.get=Wr,ae.prototype.has=Gr,ae.prototype.set=Qr;function ie(l){var u=-1,g=l==null?0:l.length;for(this.clear();++u<g;){var S=l[u];this.set(S[0],S[1])}}function Jr(){this.__data__=[],this.size=0}function Kr(l){var u=this.__data__,g=Vt(u,l);if(g<0)return!1;var S=u.length-1;return g==S?u.pop():lt.call(u,g,1),--this.size,!0}function Yr(l){var u=this.__data__,g=Vt(u,l);return g<0?void 0:u[g][1]}function vr(l){return Vt(this.__data__,l)>-1}function Xr(l,u){var g=this.__data__,S=Vt(g,l);return S<0?(++this.size,g.push([l,u])):g[S][1]=u,this}ie.prototype.clear=Jr,ie.prototype.delete=Kr,ie.prototype.get=Yr,ie.prototype.has=vr,ie.prototype.set=Xr;function pe(l){var u=-1,g=l==null?0:l.length;for(this.clear();++u<g;){var S=l[u];this.set(S[0],S[1])}}function Zr(){this.size=0,this.__data__={hash:new ae,map:new(dt||ie),string:new ae}}function eo(l){var u=$e(this,l).delete(l);return this.size-=u?1:0,u}function to(l){return $e(this,l).get(l)}function no(l){return $e(this,l).has(l)}function ro(l,u){var g=$e(this,l),S=g.size;return g.set(l,u),this.size+=g.size==S?0:1,this}pe.prototype.clear=Zr,pe.prototype.delete=eo,pe.prototype.get=to,pe.prototype.has=no,pe.prototype.set=ro;function Ct(l){var u=-1,g=l==null?0:l.length;for(this.__data__=new pe;++u<g;)this.add(l[u])}function Wn(l){return this.__data__.set(l,o),this}function $t(l){return this.__data__.has(l)}Ct.prototype.add=Ct.prototype.push=Wn,Ct.prototype.has=$t;function qe(l){var u=this.__data__=new ie(l);this.size=u.size}function nn(){this.__data__=new ie,this.size=0}function oo(l){var u=this.__data__,g=u.delete(l);return this.size=u.size,g}function ao(l){return this.__data__.get(l)}function so(l){return this.__data__.has(l)}function io(l,u){var g=this.__data__;if(g instanceof ie){var S=g.__data__;if(!dt||S.length<n-1)return S.push([l,u]),this.size=++g.size,this;g=this.__data__=new pe(S)}return g.set(l,u),this.size=g.size,this}qe.prototype.clear=nn,qe.prototype.delete=oo,qe.prototype.get=ao,qe.prototype.has=so,qe.prototype.set=io;function lo(l,u){var g=Ot(l),S=!g&&Yn(l),j=!g&&!S&&Tt(l),A=!g&&!S&&!j&&Zn(l),H=g||S||j||A,z=H?Rr(l.length,String):[],X=z.length;for(var W in l)be.call(l,W)&&!(H&&(W=="length"||j&&(W=="offset"||W=="parent")||A&&(W=="buffer"||W=="byteLength"||W=="byteOffset")||_o(W,X)))&&z.push(W);return z}function Vt(l,u){for(var g=l.length;g--;)if(Kn(l[g][0],u))return g;return-1}function rn(l,u,g){var S=u(l);return Ot(l)?S:Gt(S,g(l))}function ut(l){return l==null?l===void 0?et:_:Ce&&Ce in Object(l)?Je(l):Jn(l)}function Gn(l){return We(l)&&ut(l)==c}function Qn(l,u,g,S,j){return l===u?!0:l==null||u==null||!We(l)&&!We(u)?l!==l&&u!==u:co(l,u,g,S,Qn,j)}function co(l,u,g,S,j,A){var H=Ot(l),z=Ot(u),X=H?d:Pe(l),W=z?d:Pe(u);X=X==c?w:X,W=W==c?w:W;var le=X==w,he=W==w,ee=X==W;if(ee&&Tt(l)){if(!Tt(u))return!1;H=!0,le=!1}if(ee&&!le)return A||(A=new qe),H||Zn(l)?on(l,u,g,S,j,A):ho(l,u,X,g,S,j,A);if(!(g&s)){var ce=le&&be.call(l,"__wrapped__"),se=he&&be.call(u,"__wrapped__");if(ce||se){var nt=ce?l.value():l,Ke=se?u.value():u;return A||(A=new qe),j(nt,Ke,g,S,A)}}return ee?(A||(A=new qe),mo(l,u,g,S,j,A)):!1}function uo(l){if(!Xn(l)||bo(l))return!1;var u=vn(l)?Mr:Be;return u.test(ue(l))}function fo(l){return We(l)&&sn(l.length)&&!!K[ut(l)]}function po(l){if(!wo(l))return ct(l);var u=[];for(var g in Object(l))be.call(l,g)&&g!="constructor"&&u.push(g);return u}function on(l,u,g,S,j,A){var H=g&s,z=l.length,X=u.length;if(z!=X&&!(H&&X>z))return!1;var W=A.get(l);if(W&&A.get(u))return W==u;var le=-1,he=!0,ee=g&a?new Ct:void 0;for(A.set(l,u),A.set(u,l);++le<z;){var ce=l[le],se=u[le];if(S)var nt=H?S(se,ce,le,u,l,A):S(ce,se,le,l,u,A);if(nt!==void 0){if(nt)continue;he=!1;break}if(ee){if(!In(u,function(Ke,pt){if(!wt(ee,pt)&&(ce===Ke||j(ce,Ke,g,S,A)))return ee.push(pt)})){he=!1;break}}else if(!(ce===se||j(ce,se,g,S,A))){he=!1;break}}return A.delete(l),A.delete(u),he}function ho(l,u,g,S,j,A,H){switch(g){case I:if(l.byteLength!=u.byteLength||l.byteOffset!=u.byteOffset)return!1;l=l.buffer,u=u.buffer;case V:return!(l.byteLength!=u.byteLength||!A(new Hn(l),new Hn(u)));case p:case m:case b:return Kn(+l,+u);case E:return l.name==u.name&&l.message==u.message;case N:case R:return l==u+"";case h:var z=Ln;case D:var X=S&s;if(z||(z=He),l.size!=u.size&&!X)return!1;var W=H.get(l);if(W)return W==u;S|=a,H.set(l,u);var le=on(z(l),z(u),S,j,A,H);return H.delete(l),le;case Q:if(tn)return tn.call(l)==tn.call(u)}return!1}function mo(l,u,g,S,j,A){var H=g&s,z=ft(l),X=z.length,W=ft(u),le=W.length;if(X!=le&&!H)return!1;for(var he=X;he--;){var ee=z[he];if(!(H?ee in u:be.call(u,ee)))return!1}var ce=A.get(l);if(ce&&A.get(u))return ce==u;var se=!0;A.set(l,u),A.set(u,l);for(var nt=H;++he<X;){ee=z[he];var Ke=l[ee],pt=u[ee];if(S)var Ja=H?S(pt,Ke,ee,u,l,A):S(Ke,pt,ee,l,u,A);if(!(Ja===void 0?Ke===pt||j(Ke,pt,g,S,A):Ja)){se=!1;break}nt||(nt=ee=="constructor")}if(se&&!nt){var er=l.constructor,tr=u.constructor;er!=tr&&"constructor"in l&&"constructor"in u&&!(typeof er=="function"&&er instanceof er&&typeof tr=="function"&&tr instanceof tr)&&(se=!1)}return A.delete(l),A.delete(u),se}function ft(l){return rn(l,ln,go)}function $e(l,u){var g=l.__data__;return yo(u)?g[typeof u=="string"?"string":"hash"]:g.map}function Qe(l,u){var g=Qt(l,u);return uo(g)?g:void 0}function Je(l){var u=be.call(l,Ce),g=l[Ce];try{l[Ce]=void 0;var S=!0}catch{}var j=zn.call(l);return S&&(u?l[Ce]=g:delete l[Ce]),j}var go=St?function(l){return l==null?[]:(l=Object(l),Rn(St(l),function(u){return Bt.call(l,u)}))}:Eo,Pe=ut;(vt&&Pe(new vt(new ArrayBuffer(1)))!=I||dt&&Pe(new dt)!=h||Xt&&Pe(Xt.resolve())!=x||Zt&&Pe(new Zt)!=D||en&&Pe(new en)!=ze)&&(Pe=function(l){var u=ut(l),g=u==w?l.constructor:void 0,S=g?ue(g):"";if(S)switch(S){case qn:return I;case Ge:return h;case Ur:return x;case zr:return D;case Hr:return ze}return u});function _o(l,u){return u=u??i,!!u&&(typeof l=="number"||Nn.test(l))&&l>-1&&l%1==0&&l<u}function yo(l){var u=typeof l;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?l!=="__proto__":l===null}function bo(l){return!!Un&&Un in l}function wo(l){var u=l&&l.constructor,g=typeof u=="function"&&u.prototype||it;return l===g}function Jn(l){return zn.call(l)}function ue(l){if(l!=null){try{return Jt.call(l)}catch{}try{return l+""}catch{}}return""}function Kn(l,u){return l===u||l!==l&&u!==u}var Yn=Gn(function(){return arguments}())?Gn:function(l){return We(l)&&be.call(l,"callee")&&!Bt.call(l,"callee")},Ot=Array.isArray;function an(l){return l!=null&&sn(l.length)&&!vn(l)}var Tt=Yt||xo;function ko(l,u){return Qn(l,u)}function vn(l){if(!Xn(l))return!1;var u=ut(l);return u==B||u==y||u==f||u==C}function sn(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=i}function Xn(l){var u=typeof l;return l!=null&&(u=="object"||u=="function")}function We(l){return l!=null&&typeof l=="object"}var Zn=Wt?Ir(Wt):fo;function ln(l){return an(l)?lo(l):po(l)}function Eo(){return[]}function xo(){return!1}r.exports=ko}($n,$n.exports);var Ha=$n.exports,Vr={},qa=ne&&ne.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Vr,"__esModule",{value:!0});var Ju=qa(za),Ku=qa(Ha),Or;(function(r){function t(a,i,c){a===void 0&&(a={}),i===void 0&&(i={}),typeof a!="object"&&(a={}),typeof i!="object"&&(i={});var d=Ju.default(i);c||(d=Object.keys(d).reduce(function(p,m){return d[m]!=null&&(p[m]=d[m]),p},{}));for(var f in a)a[f]!==void 0&&i[f]===void 0&&(d[f]=a[f]);return Object.keys(d).length>0?d:void 0}r.compose=t;function n(a,i){a===void 0&&(a={}),i===void 0&&(i={}),typeof a!="object"&&(a={}),typeof i!="object"&&(i={});var c=Object.keys(a).concat(Object.keys(i)).reduce(function(d,f){return Ku.default(a[f],i[f])||(d[f]=i[f]===void 0?null:i[f]),d},{});return Object.keys(c).length>0?c:void 0}r.diff=n;function o(a,i){a===void 0&&(a={}),i===void 0&&(i={}),a=a||{};var c=Object.keys(i).reduce(function(d,f){return i[f]!==a[f]&&a[f]!==void 0&&(d[f]=i[f]),d},{});return Object.keys(a).reduce(function(d,f){return a[f]!==i[f]&&i[f]===void 0&&(d[f]=null),d},c)}r.invert=o;function s(a,i,c){if(c===void 0&&(c=!1),typeof a!="object")return i;if(typeof i=="object"){if(!c)return i;var d=Object.keys(i).reduce(function(f,p){return a[p]===void 0&&(f[p]=i[p]),f},{});return Object.keys(d).length>0?d:void 0}}r.transform=s})(Or||(Or={})),Vr.default=Or;var Vn={},On={},Pa;function Yu(){if(Pa)return On;Pa=1;var r=ne&&ne.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(On,"__esModule",{value:!0});var t=r(Ga()),n=function(){function o(s){this.ops=s,this.index=0,this.offset=0}return o.prototype.hasNext=function(){return this.peekLength()<1/0},o.prototype.next=function(s){s||(s=1/0);var a=this.ops[this.index];if(a){var i=this.offset,c=t.default.length(a);if(s>=c-i?(s=c-i,this.index+=1,this.offset=0):this.offset+=s,typeof a.delete=="number")return{delete:s};var d={};return a.attributes&&(d.attributes=a.attributes),typeof a.retain=="number"?d.retain=s:typeof a.insert=="string"?d.insert=a.insert.substr(i,s):d.insert=a.insert,d}else return{retain:1/0}},o.prototype.peek=function(){return this.ops[this.index]},o.prototype.peekLength=function(){return this.ops[this.index]?t.default.length(this.ops[this.index])-this.offset:1/0},o.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},o.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var s=this.offset,a=this.index,i=this.next(),c=this.ops.slice(this.index);return this.offset=s,this.index=a,[i].concat(c)}else return[]},o}();return On.default=n,On}var Wa;function Ga(){if(Wa)return Vn;Wa=1;var r=ne&&ne.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(Vn,"__esModule",{value:!0});var t=r(Yu()),n;return function(o){function s(i){return new t.default(i)}o.iterator=s;function a(i){return typeof i.delete=="number"?i.delete:typeof i.retain=="number"?i.retain:typeof i.insert=="string"?i.insert.length:1}o.length=a}(n||(n={})),Vn.default=n,Vn}var zt=ne&&ne.__importDefault||function(r){return r&&r.__esModule?r:{default:r}},Tn=zt(Qu),vu=zt(za),Tr=zt(Ha),Ht=zt(Vr),oe=zt(Ga()),Xu="\0",Zu=function(){function r(t){Array.isArray(t)?this.ops=t:t!=null&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]}return r.prototype.insert=function(t,n){var o={};return typeof t=="string"&&t.length===0?this:(o.insert=t,n!=null&&typeof n=="object"&&Object.keys(n).length>0&&(o.attributes=n),this.push(o))},r.prototype.delete=function(t){return t<=0?this:this.push({delete:t})},r.prototype.retain=function(t,n){if(t<=0)return this;var o={retain:t};return n!=null&&typeof n=="object"&&Object.keys(n).length>0&&(o.attributes=n),this.push(o)},r.prototype.push=function(t){var n=this.ops.length,o=this.ops[n-1];if(t=vu.default(t),typeof o=="object"){if(typeof t.delete=="number"&&typeof o.delete=="number")return this.ops[n-1]={delete:o.delete+t.delete},this;if(typeof o.delete=="number"&&t.insert!=null&&(n-=1,o=this.ops[n-1],typeof o!="object"))return this.ops.unshift(t),this;if(Tr.default(t.attributes,o.attributes)){if(typeof t.insert=="string"&&typeof o.insert=="string")return this.ops[n-1]={insert:o.insert+t.insert},typeof t.attributes=="object"&&(this.ops[n-1].attributes=t.attributes),this;if(typeof t.retain=="number"&&typeof o.retain=="number")return this.ops[n-1]={retain:o.retain+t.retain},typeof t.attributes=="object"&&(this.ops[n-1].attributes=t.attributes),this}}return n===this.ops.length?this.ops.push(t):this.ops.splice(n,0,t),this},r.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},r.prototype.filter=function(t){return this.ops.filter(t)},r.prototype.forEach=function(t){this.ops.forEach(t)},r.prototype.map=function(t){return this.ops.map(t)},r.prototype.partition=function(t){var n=[],o=[];return this.forEach(function(s){var a=t(s)?n:o;a.push(s)}),[n,o]},r.prototype.reduce=function(t,n){return this.ops.reduce(t,n)},r.prototype.changeLength=function(){return this.reduce(function(t,n){return n.insert?t+oe.default.length(n):n.delete?t-n.delete:t},0)},r.prototype.length=function(){return this.reduce(function(t,n){return t+oe.default.length(n)},0)},r.prototype.slice=function(t,n){t===void 0&&(t=0),n===void 0&&(n=1/0);for(var o=[],s=oe.default.iterator(this.ops),a=0;a<n&&s.hasNext();){var i=void 0;a<t?i=s.next(t-a):(i=s.next(n-a),o.push(i)),a+=oe.default.length(i)}return new r(o)},r.prototype.compose=function(t){var n=oe.default.iterator(this.ops),o=oe.default.iterator(t.ops),s=[],a=o.peek();if(a!=null&&typeof a.retain=="number"&&a.attributes==null){for(var i=a.retain;n.peekType()==="insert"&&n.peekLength()<=i;)i-=n.peekLength(),s.push(n.next());a.retain-i>0&&o.next(a.retain-i)}for(var c=new r(s);n.hasNext()||o.hasNext();)if(o.peekType()==="insert")c.push(o.next());else if(n.peekType()==="delete")c.push(n.next());else{var d=Math.min(n.peekLength(),o.peekLength()),f=n.next(d),p=o.next(d);if(typeof p.retain=="number"){var m={};typeof f.retain=="number"?m.retain=d:m.insert=f.insert;var E=Ht.default.compose(f.attributes,p.attributes,typeof f.retain=="number");if(E&&(m.attributes=E),c.push(m),!o.hasNext()&&Tr.default(c.ops[c.ops.length-1],m)){var B=new r(n.rest());return c.concat(B).chop()}}else typeof p.delete=="number"&&typeof f.retain=="number"&&c.push(p)}return c.chop()},r.prototype.concat=function(t){var n=new r(this.ops.slice());return t.ops.length>0&&(n.push(t.ops[0]),n.ops=n.ops.concat(t.ops.slice(1))),n},r.prototype.diff=function(t,n){if(this.ops===t.ops)return new r;var o=[this,t].map(function(d){return d.map(function(f){if(f.insert!=null)return typeof f.insert=="string"?f.insert:Xu;var p=d===t?"on":"with";throw new Error("diff() called "+p+" non-document")}).join("")}),s=new r,a=Tn.default(o[0],o[1],n),i=oe.default.iterator(this.ops),c=oe.default.iterator(t.ops);return a.forEach(function(d){for(var f=d[1].length;f>0;){var p=0;switch(d[0]){case Tn.default.INSERT:p=Math.min(c.peekLength(),f),s.push(c.next(p));break;case Tn.default.DELETE:p=Math.min(f,i.peekLength()),i.next(p),s.delete(p);break;case Tn.default.EQUAL:p=Math.min(i.peekLength(),c.peekLength(),f);var m=i.next(p),E=c.next(p);Tr.default(m.insert,E.insert)?s.retain(p,Ht.default.diff(m.attributes,E.attributes)):s.push(E).delete(p);break}f-=p}}),s.chop()},r.prototype.eachLine=function(t,n){n===void 0&&(n=`
3
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const o=new this(t);return n.forEach(s=>o.set(s)),o}static accessor(t){const o=(this[Wo]=this[Wo]={accessors:{}}).accessors,s=this.prototype;function a(i){const c=Ft(i);o[c]||(Gs(s,i),o[c]=!0)}return $.isArray(t)?t.forEach(a):a(t),this}}ge.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),$.reduceDescriptors(ge.prototype,({value:r},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>r,set(o){this[n]=o}}}),$.freezeMethods(ge);function cr(r,t){const n=this||Dt,o=t||n,s=ge.from(o.headers);let a=o.data;return $.forEach(r,function(c){a=c.call(n,a,s.normalize(),t?t.status:void 0)}),s.normalize(),a}function Go(r){return!!(r&&r.__CANCEL__)}function jt(r,t,n){U.call(this,r??"canceled",U.ERR_CANCELED,t,n),this.name="CanceledError"}$.inherits(jt,U,{__CANCEL__:!0});function Qs(r,t,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?r(n):t(new U("Request failed with status code "+n.status,[U.ERR_BAD_REQUEST,U.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const vs=Te.hasStandardBrowserEnv?{write(r,t,n,o,s,a){const i=[r+"="+encodeURIComponent(t)];$.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),$.isString(o)&&i.push("path="+o),$.isString(s)&&i.push("domain="+s),a===!0&&i.push("secure"),document.cookie=i.join("; ")},read(r){const t=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(r){this.write(r,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Js(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function Ks(r,t){return t?r.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):r}function Qo(r,t){return r&&!Js(t)?Ks(r,t):t}const Ys=Te.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let o;function s(a){let i=a;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 o=s(window.location.href),function(i){const c=$.isString(i)?s(i):i;return c.protocol===o.protocol&&c.host===o.host}}():function(){return function(){return!0}}();function Xs(r){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return t&&t[1]||""}function Zs(r,t){r=r||10;const n=new Array(r),o=new Array(r);let s=0,a=0,i;return t=t!==void 0?t:1e3,function(d){const f=Date.now(),p=o[a];i||(i=f),n[s]=d,o[s]=f;let m=a,E=0;for(;m!==s;)E+=n[m++],m=m%r;if(s=(s+1)%r,s===a&&(a=(a+1)%r),f-i<t)return;const B=p&&f-p;return B?Math.round(E*1e3/B):void 0}}function vo(r,t){let n=0;const o=Zs(50,250);return s=>{const a=s.loaded,i=s.lengthComputable?s.total:void 0,c=a-n,d=o(c),f=a<=i;n=a;const p={loaded:a,total:i,progress:i?a/i:void 0,bytes:c,rate:d||void 0,estimated:d&&i&&f?(i-a)/d:void 0,event:s};p[t?"download":"upload"]=!0,r(p)}}const dr={http:Ts,xhr:typeof XMLHttpRequest<"u"&&function(r){return new Promise(function(n,o){let s=r.data;const a=ge.from(r.headers).normalize();let{responseType:i,withXSRFToken:c}=r,d;function f(){r.cancelToken&&r.cancelToken.unsubscribe(d),r.signal&&r.signal.removeEventListener("abort",d)}let p;if($.isFormData(s)){if(Te.hasStandardBrowserEnv||Te.hasStandardBrowserWebWorkerEnv)a.setContentType(!1);else if((p=a.getContentType())!==!1){const[h,...b]=p?p.split(";").map(_=>_.trim()).filter(Boolean):[];a.setContentType([h||"multipart/form-data",...b].join("; "))}}let m=new XMLHttpRequest;if(r.auth){const h=r.auth.username||"",b=r.auth.password?unescape(encodeURIComponent(r.auth.password)):"";a.set("Authorization","Basic "+btoa(h+":"+b))}const E=Qo(r.baseURL,r.url);m.open(r.method.toUpperCase(),Uo(E,r.params,r.paramsSerializer),!0),m.timeout=r.timeout;function B(){if(!m)return;const h=ge.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),_={data:!i||i==="text"||i==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:h,config:r,request:m};Qs(function(x){n(x),f()},function(x){o(x),f()},_),m=null}if("onloadend"in m?m.onloadend=B:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(B)},m.onabort=function(){m&&(o(new U("Request aborted",U.ECONNABORTED,r,m)),m=null)},m.onerror=function(){o(new U("Network Error",U.ERR_NETWORK,r,m)),m=null},m.ontimeout=function(){let b=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const _=r.transitional||Ho;r.timeoutErrorMessage&&(b=r.timeoutErrorMessage),o(new U(b,_.clarifyTimeoutError?U.ETIMEDOUT:U.ECONNABORTED,r,m)),m=null},Te.hasStandardBrowserEnv&&(c&&$.isFunction(c)&&(c=c(r)),c||c!==!1&&Ys(E))){const h=r.xsrfHeaderName&&r.xsrfCookieName&&vs.read(r.xsrfCookieName);h&&a.set(r.xsrfHeaderName,h)}s===void 0&&a.setContentType(null),"setRequestHeader"in m&&$.forEach(a.toJSON(),function(b,_){m.setRequestHeader(_,b)}),$.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),i&&i!=="json"&&(m.responseType=r.responseType),typeof r.onDownloadProgress=="function"&&m.addEventListener("progress",vo(r.onDownloadProgress,!0)),typeof r.onUploadProgress=="function"&&m.upload&&m.upload.addEventListener("progress",vo(r.onUploadProgress)),(r.cancelToken||r.signal)&&(d=h=>{m&&(o(!h||h.type?new jt(null,r,m):h),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(d),r.signal&&(r.signal.aborted?d():r.signal.addEventListener("abort",d)));const y=Xs(E);if(y&&Te.protocols.indexOf(y)===-1){o(new U("Unsupported protocol "+y+":",U.ERR_BAD_REQUEST,r));return}m.send(s||null)})}};$.forEach(dr,(r,t)=>{if(r){try{Object.defineProperty(r,"name",{value:t})}catch{}Object.defineProperty(r,"adapterName",{value:t})}});const Jo=r=>`- ${r}`,ei=r=>$.isFunction(r)||r===null||r===!1,Ko={getAdapter:r=>{r=$.isArray(r)?r:[r];const{length:t}=r;let n,o;const s={};for(let a=0;a<t;a++){n=r[a];let i;if(o=n,!ei(n)&&(o=dr[(i=String(n)).toLowerCase()],o===void 0))throw new U(`Unknown adapter '${i}'`);if(o)break;s[i||"#"+a]=o}if(!o){const a=Object.entries(s).map(([c,d])=>`adapter ${c} `+(d===!1?"is not supported by the environment":"is not available in the build"));let i=t?a.length>1?`since :
4
+ `+a.map(Jo).join(`
5
+ `):" "+Jo(a[0]):"as no adapter specified";throw new U("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return o},adapters:dr};function ur(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new jt(null,r)}function Yo(r){return ur(r),r.headers=ge.from(r.headers),r.data=cr.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),Ko.getAdapter(r.adapter||Dt.adapter)(r).then(function(o){return ur(r),o.data=cr.call(r,r.transformResponse,o),o.headers=ge.from(o.headers),o},function(o){return Go(o)||(ur(r),o&&o.response&&(o.response.data=cr.call(r,r.transformResponse,o.response),o.response.headers=ge.from(o.response.headers))),Promise.reject(o)})}const Xo=r=>r instanceof ge?{...r}:r;function mt(r,t){t=t||{};const n={};function o(f,p,m){return $.isPlainObject(f)&&$.isPlainObject(p)?$.merge.call({caseless:m},f,p):$.isPlainObject(p)?$.merge({},p):$.isArray(p)?p.slice():p}function s(f,p,m){if($.isUndefined(p)){if(!$.isUndefined(f))return o(void 0,f,m)}else return o(f,p,m)}function a(f,p){if(!$.isUndefined(p))return o(void 0,p)}function i(f,p){if($.isUndefined(p)){if(!$.isUndefined(f))return o(void 0,f)}else return o(void 0,p)}function c(f,p,m){if(m in t)return o(f,p);if(m in r)return o(void 0,f)}const d={url:a,method:a,data:a,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,p)=>s(Xo(f),Xo(p),!0)};return $.forEach(Object.keys(Object.assign({},r,t)),function(p){const m=d[p]||s,E=m(r[p],t[p],p);$.isUndefined(E)&&m!==c||(n[p]=E)}),n}const Zo="1.6.8",fr={};["object","boolean","number","function","string","symbol"].forEach((r,t)=>{fr[r]=function(o){return typeof o===r||"a"+(t<1?"n ":" ")+r}});const ea={};fr.transitional=function(t,n,o){function s(a,i){return"[Axios v"+Zo+"] Transitional option '"+a+"'"+i+(o?". "+o:"")}return(a,i,c)=>{if(t===!1)throw new U(s(i," has been removed"+(n?" in "+n:"")),U.ERR_DEPRECATED);return n&&!ea[i]&&(ea[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,i,c):!0}};function ti(r,t,n){if(typeof r!="object")throw new U("options must be an object",U.ERR_BAD_OPTION_VALUE);const o=Object.keys(r);let s=o.length;for(;s-- >0;){const a=o[s],i=t[a];if(i){const c=r[a],d=c===void 0||i(c,a,r);if(d!==!0)throw new U("option "+a+" must be "+d,U.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new U("Unknown option "+a,U.ERR_BAD_OPTION)}}const pr={assertOptions:ti,validators:fr},Ke=pr.validators;class rt{constructor(t){this.defaults=t,this.interceptors={request:new zo,response:new zo}}async request(t,n){try{return await this._request(t,n)}catch(o){if(o instanceof Error){let s;Error.captureStackTrace?Error.captureStackTrace(s={}):s=new Error;const a=s.stack?s.stack.replace(/^.+\n/,""):"";o.stack?a&&!String(o.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(o.stack+=`
6
+ `+a):o.stack=a}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=mt(this.defaults,n);const{transitional:o,paramsSerializer:s,headers:a}=n;o!==void 0&&pr.assertOptions(o,{silentJSONParsing:Ke.transitional(Ke.boolean),forcedJSONParsing:Ke.transitional(Ke.boolean),clarifyTimeoutError:Ke.transitional(Ke.boolean)},!1),s!=null&&($.isFunction(s)?n.paramsSerializer={serialize:s}:pr.assertOptions(s,{encode:Ke.function,serialize:Ke.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=a&&$.merge(a.common,a[n.method]);a&&$.forEach(["delete","get","head","post","put","patch","common"],y=>{delete a[y]}),n.headers=ge.concat(i,a);const c=[];let d=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(d=d&&h.synchronous,c.unshift(h.fulfilled,h.rejected))});const f=[];this.interceptors.response.forEach(function(h){f.push(h.fulfilled,h.rejected)});let p,m=0,E;if(!d){const y=[Yo.bind(this),void 0];for(y.unshift.apply(y,c),y.push.apply(y,f),E=y.length,p=Promise.resolve(n);m<E;)p=p.then(y[m++],y[m++]);return p}E=c.length;let B=n;for(m=0;m<E;){const y=c[m++],h=c[m++];try{B=y(B)}catch(b){h.call(this,b);break}}try{p=Yo.call(this,B)}catch(y){return Promise.reject(y)}for(m=0,E=f.length;m<E;)p=p.then(f[m++],f[m++]);return p}getUri(t){t=mt(this.defaults,t);const n=Qo(t.baseURL,t.url);return Uo(n,t.params,t.paramsSerializer)}}$.forEach(["delete","get","head","options"],function(t){rt.prototype[t]=function(n,o){return this.request(mt(o||{},{method:t,url:n,data:(o||{}).data}))}}),$.forEach(["post","put","patch"],function(t){function n(o){return function(a,i,c){return this.request(mt(c||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:a,data:i}))}}rt.prototype[t]=n(),rt.prototype[t+"Form"]=n(!0)});class hr{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const o=this;this.promise.then(s=>{if(!o._listeners)return;let a=o._listeners.length;for(;a-- >0;)o._listeners[a](s);o._listeners=null}),this.promise.then=s=>{let a;const i=new Promise(c=>{o.subscribe(c),a=c}).then(s);return i.cancel=function(){o.unsubscribe(a)},i},t(function(a,i,c){o.reason||(o.reason=new jt(a,i,c),n(o.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)}static source(){let t;return{token:new hr(function(s){t=s}),cancel:t}}}function ni(r){return function(n){return r.apply(null,n)}}function ri(r){return $.isObject(r)&&r.isAxiosError===!0}const mr={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(mr).forEach(([r,t])=>{mr[t]=r});function ta(r){const t=new rt(r),n=Bo(rt.prototype.request,t);return $.extend(n,rt.prototype,t,{allOwnKeys:!0}),$.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return ta(mt(r,s))},n}const Y=ta(Dt);Y.Axios=rt,Y.CanceledError=jt,Y.CancelToken=hr,Y.isCancel=Go,Y.VERSION=Zo,Y.toFormData=hn,Y.AxiosError=U,Y.Cancel=Y.CanceledError,Y.all=function(t){return Promise.all(t)},Y.spread=ni,Y.isAxiosError=ri,Y.mergeConfig=mt,Y.AxiosHeaders=ge,Y.formToJSON=r=>Po($.isHTMLForm(r)?new FormData(r):r),Y.getAdapter=Ko.getAdapter,Y.HttpStatusCode=mr,Y.default=Y;let gt=null;function oi(r){gt=Y.create(r)}function ai(){return gt}async function si(r,t={},n={}){return new Promise((o,s)=>{gt.get(r,{headers:n,params:t}).then(a=>{o(a.data)}).catch(a=>{s(a)})})}async function ii(r,t,n={}){return new Promise((o,s)=>{gt.post(r,t,{headers:n}).then(a=>{o(a)}).catch(a=>{s(a)})})}async function li(r,t,n={}){return new Promise((o,s)=>{gt.delete(r,{data:t,headers:n}).then(a=>{o(a.data)}).catch(a=>{s(a)})})}async function ci(r,t,n={}){return new Promise((o,s)=>{gt.put(r,t,{headers:n}).then(a=>{o(a)}).catch(a=>{s(a)})})}const _e={get:si,post:ii,put:ci,remove:li,setupAxios:oi,getAxiosInstance:ai};var ne=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function na(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function di(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ra={exports:{}};(function(r,t){(function(n,o){typeof di=="function"?r.exports=o():n.pluralize=o()})(ne,function(){var n=[],o=[],s={},a={},i={};function c(h){return typeof h=="string"?new RegExp("^"+h+"$","i"):h}function d(h,b){return h===b?b:h===h.toLowerCase()?b.toLowerCase():h===h.toUpperCase()?b.toUpperCase():h[0]===h[0].toUpperCase()?b.charAt(0).toUpperCase()+b.substr(1).toLowerCase():b.toLowerCase()}function f(h,b){return h.replace(/\$(\d{1,2})/g,function(_,w){return b[w]||""})}function p(h,b){return h.replace(b[0],function(_,w){var x=f(b[1],arguments);return d(_===""?h[w-1]:_,x)})}function m(h,b,_){if(!h.length||s.hasOwnProperty(h))return b;for(var w=_.length;w--;){var x=_[w];if(x[0].test(b))return p(b,x)}return b}function E(h,b,_){return function(w){var x=w.toLowerCase();return b.hasOwnProperty(x)?d(w,x):h.hasOwnProperty(x)?d(w,h[x]):m(x,w,_)}}function B(h,b,_,w){return function(x){var C=x.toLowerCase();return b.hasOwnProperty(C)?!0:h.hasOwnProperty(C)?!1:m(C,C,_)===C}}function y(h,b,_){var w=b===1?y.singular(h):y.plural(h);return(_?b+" ":"")+w}return y.plural=E(i,a,n),y.isPlural=B(i,a,n),y.singular=E(a,i,o),y.isSingular=B(a,i,o),y.addPluralRule=function(h,b){n.push([c(h),b])},y.addSingularRule=function(h,b){o.push([c(h),b])},y.addUncountableRule=function(h){if(typeof h=="string"){s[h.toLowerCase()]=!0;return}y.addPluralRule(h,"$0"),y.addSingularRule(h,"$0")},y.addIrregularRule=function(h,b){b=b.toLowerCase(),h=h.toLowerCase(),i[h]=b,a[b]=h},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(h){return y.addIrregularRule(h[0],h[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(h){return y.addPluralRule(h[0],h[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(h){return y.addSingularRule(h[0],h[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(y.addUncountableRule),y})})(ra);var ui=ra.exports;const oa=na(ui),gr=r=>r.replace(/([-_][a-z])/gi,t=>t.toUpperCase().replace("-","").replace("_","")),gn="GET_LIST",_n="GET_ONE",yn="CREATE",bn="UPDATE",_t="REMOVE",_r="RESTORE",aa="ENABLE",fi=[gn,_n,yn,bn,_t,aa];class pi{constructor(t,n,o=fi){this.side=t=="platform"?"admin":t,this.domain=n,this.resources=oa(n),this.operations=o,this.operations.forEach(s=>{const a=gr(s.toLowerCase());this[a]=this[`_${a}`]})}_getList(t){if(!this.operations.includes(gn)){console.log(`${this.side}/${this.domain} 不支持 ${gn} 操作`);return}return _e.get(`${this.side}/${this.resources}`,t)}_getOne(t){if(!this.operations.includes(_n)){console.log(`${this.side}/${this.domain} 不支持 ${_n} 操作`);return}return _e.get(`${this.side}/${this.resources}/${t.id}`)}_create(t){if(!this.operations.includes(yn)){console.log(`${this.side}/${this.domain} 不支持 ${yn} 操作`);return}return _e.post(`${this.side}/${this.resources}`,t)}_update(t){if(!this.operations.includes(bn)){console.log(`${this.side}/${this.domain} 不支持 ${bn} 操作`);return}return _e.put(`${this.side}/${this.resources}/${t.id}`,t)}_remove(t){if(!this.operations.includes(_t)){console.log(`${this.side}/${this.domain} 不支持 ${_t} 操作`);return}return _e.remove(`${this.side}/${this.resources}/${t.id}`,t)}_restore(t){if(!this.operations.includes(_r)){console.log(`${this.side}/${this.domain} 不支持 ${_r} 操作`);return}return _e.put(`${this.side}/${this.resources}/${t.id}/restore`,t)}_enable(t){if(!this.operations.includes(_t)){console.log(`${this.side}/${this.domain} 不支持 ${_t} 操作`);return}return _e.put(`${this.side}/${this.resources}/${t.id}/switch`,t)}}class hi{constructor(t,n,o){this.side=t=="platform"?"admin":t,this.domain=n,this.resources=oa(n),this.listQuerys=o}getList(t){let n=t;return this.listQuerys&&(n={...this.listQuerys,...t}),_e.get(`${this.side}/${this.resources}`,n)}getOne(t){return _e.get(`${this.side}/${this.resources}/${t.id}`)}}const mi={Client:pi,ReadOnlyClient:hi,GET_LIST:gn,GET_ONE:_n,CREATE:yn,UPDATE:bn,REMOVE:_t,RESTORE:_r,ENABLE:aa},gi=(r,t,n)=>{const o=r[t];return o?typeof o=="function"?o():Promise.resolve(o):new Promise((s,a)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(a.bind(null,new Error("Unknown variable dynamic import: "+t+(t.split("/").length!==n?". Note that variables only represent file names one level deep.":""))))})},_i=["createdAt","updatedAt","deletedAt"];class re{constructor(t,n){this.domain=n,this.type=t.type||"string",this.code=t.code,this.label=t.label,this.showInList=this._showInList(t),this.showInDetail=this._showInDetail(t),this.rules=t.rules||[],this.editable=this._editable(t),this.visible=this._visible(t),this.width=this.computeWidth(t),this.span=t.span||6,this.fixed=!1}computeWidth(t){return t.width?t.width:_i.includes(t.code)?200:t.code==="id"||t.type==="image"?100:null}defaultBy(t,n){return t??n}checkValidProperties(t){const n=Object.getOwnPropertyNames(t),o=Object.getOwnPropertyNames(this);if(n.every(a=>o.includes(a)))return;const s=n.filter(a=>!o.includes(a));console.error(`invalid field config props: [${s}] for ${this.domain}:${this.code}`)}_showInList(t){const n=t.showInList;if(typeof n=="boolean")return()=>n;if(typeof n=="function")return n;if("showInList"in this.defaultConfig())return()=>this.defaultConfig().showInList;if(typeof n>"u")return()=>!0;throw new Exception(`invalid showInList : ${n}`)}_showInDetail(t){const n=t.showInDetail;if(typeof n=="boolean")return()=>n;if(typeof n=="function")return n;if(typeof n>"u")return()=>!0;throw new Exception(`invalid showInDetail : ${n}`)}_editable(t){const n=t.editable;if(typeof n=="boolean")return()=>n;if(typeof n=="function")return n;if(typeof n>"u")return()=>!1;throw new Exception(`invalid editable : ${n}`)}_visible(t){const n=t.visible;if(typeof n=="boolean")return()=>n;if(typeof n=="function")return n;if(typeof n>"u")return this._editable(t);throw new Exception(`invalid visible : ${n}`)}defaultConfig(){return{}}}function sa(r,t,n){console.warn(`${r}.${t} => ${n}`)}const yr={select:{config:"select"},"belongs-to":{config:"belongs-to"},boolean:{config:"boolean"},switch:{config:"switch",deprecated:"switch 字段类型即将废弃,请使用 boolean"},datetime:{config:"datetime"},editor:{config:"rich-text",deprecated:"editor 字段类型即将废弃,请使用 rich-text"},"rich-text":{config:"rich-text"},image:{config:"image"},images:{config:"images"},attachment:{config:"attachment"},attachments:{config:"attachment",deprecated:"attachments 字段类型即将废弃,请使用 attachment"},json:{config:"json"},"row-id":{config:"row-id"},string:{config:"string"},text:{config:"text"},textarea:{config:"text",deprecated:"textarea 字段类型即将废弃,请使用 text"},tree:{config:"tree-select",deprecated:"tree 字段类型即将废弃,请使用 tree-select"},"tree-select":{config:"tree-select"},cascader:{config:"cascader"},component:{config:"component"}};async function ia(r,t,n){const o=await gi(Object.assign({"./field/attachment/config.js":()=>Promise.resolve().then(()=>od),"./field/belongs-to/config.js":()=>Promise.resolve().then(()=>cd),"./field/boolean/config.js":()=>Promise.resolve().then(()=>hd),"./field/cascader/config.js":()=>Promise.resolve().then(()=>bd),"./field/component/config.js":()=>Promise.resolve().then(()=>kd),"./field/datetime/config.js":()=>Promise.resolve().then(()=>Cd),"./field/image/config.js":()=>Promise.resolve().then(()=>Dd),"./field/images/config.js":()=>Promise.resolve().then(()=>Ud),"./field/json/config.js":()=>Promise.resolve().then(()=>Pd),"./field/rich-text/config.js":()=>Promise.resolve().then(()=>Yd),"./field/row-id/config.js":()=>Promise.resolve().then(()=>Zd),"./field/select/config.js":()=>Promise.resolve().then(()=>hu),"./field/string/config.js":()=>Promise.resolve().then(()=>bu),"./field/switch/config.js":()=>Promise.resolve().then(()=>Bu),"./field/text/config.js":()=>Promise.resolve().then(()=>Ou),"./field/tree-select/config.js":()=>Promise.resolve().then(()=>Fu)}),`./field/${r}/config.js`,4);return new o.default(t,n)}function la(r,t="unknown"){return r.map(o=>{if(o instanceof re)return o;if(o.code==="id"?o.type="row-id":o.component&&(o.type="component"),Object.keys(yr).includes(o.type)){const s=yr[o.type];return s.deprecated&&sa(t,o.code,s.deprecated),ia(yr[o.type].config,o,t)}return ia("string",o,t)})}let br={name:"管理后台",logo:"",sideMenus:{},imageUploadUrl:"",fileUploadUrl:"",idempotentUrl:""},Rt={};function yi(r){br={...br,...r},Rt=r.domainConfigs}function bi(r){Object.keys(Rt).forEach(t=>{const n=Rt[t];Object.keys(n).forEach(o=>{const s=n[o];s.load=r(t,o)})})}function ot(){return br}function wr(){return Rt}function wn(r,t){return Rt[r][t].load().then(n=>{const o=n.default;return Promise.all(o.fields).then(s=>(o.fields=s,o))})}class wi{constructor(t,n){this.side=t;const o=n.config?n.config:n;this.code=o.code,this.fields=la(o.fields,o.code),!o.simple&&(this.name=wr()[t][o.code].name,this.filters=o.filters||[],this.coverField=o.coverField,this.nameField=o.nameField||"name",this.showCreate=o.showCreate||!0,this.showSubmit=o.showSubmit||!0,this.removeConfirm=o.removeConfirm,this.showCreate=this.setupShowCreate(o.showCreate),this.hasMany=n.hasMany||[],this.hasOne=n.hasOne||[],this.formatName=this.createFormatName(n.formatName),this.rest=this.createRestClient(n.rest),this.rowActions=this.setupRowActions(n),this.pageActions=this.setupPageActions(n),this.actionsWidth=n.actionsWidth||150,this.formHook=n.form||{},this.filterHook=n.filterForm||{},this.restRepeat=this.restRepeat(n.restRepeat),this.btnVisible=n.btnVisible||{},this.operations=this.setupOperations(),this.formLayout=n.formLayout||[])}wrapFields(t,n){return la(t,n)}createRestClient(t){return t}createFormatName(t){return n=>t?`${t(n)}`:n.name?n.name:n.title?n.title:`#${n.id}`}setupPageActions(t){return n=>{if(typeof t.pageActions>"u")return[];if(Array.isArray(t.pageActions))return t.pageActions;if(typeof t.pageActions=="function"){const o=t.pageActions(n);return Array.isArray(o)?o:(console.warn(`${this.code} --> page actions 必须返回数组`),[])}return console.warn(`${this.code} --> page actions 必须返回数组`),[]}}setupRowActions(t){return n=>{if(typeof t.rowActions>"u")return[];if(Array.isArray(t.rowActions))return t.rowActions;if(typeof t.rowActions=="function"){const o=t.rowActions(n);return Array.isArray(o)?o:(console.warn(`${this.code} --> row actions 必须返回数组`),[])}return console.warn(`${this.code} --> row actions 必须返回数组`),[]}}setupShowCreate(t){return typeof t=="boolean"?()=>t:typeof t=="function"?n=>t(n):()=>!0}restRepeat(t){return typeof t=="function"?n=>t():()=>""}setupOperations(t){const n={creatable:this.rest.create!=null,updatable:this.rest.update!=null,removable:this.rest.remove!=null,restorable:this.rest.restore!=null,showable:this.rest.getOne!=null};return o=>{const s=this.showCreate(o);return{...n,creatable:n.creatable&&s}}}}function ca(r,t){return new wi(r,t)}const M=(r,t)=>{const n=r.__vccOpts||r;for(const[o,s]of t)n[o]=s;return n},ki={class:"card-header"},Ei={class:"title"},da=M({__name:"Widget",props:{title:{type:String}},setup(r){const t=r;return(n,o)=>(e.openBlock(),e.createBlock(e.unref(k.ElCard),{shadow:"never"},e.createSlots({default:e.withCtx(()=>[e.renderSlot(n.$slots,"default",{},void 0,!0)]),_:2},[t.title?{name:"header",fn:e.withCtx(()=>[e.createElementVNode("div",ki,[e.createElementVNode("span",Ei,e.toDisplayString(t.title),1)])]),key:"0"}:void 0]),1024))}},[["__scopeId","data-v-c5513c07"]]),xi={key:0},Bi={key:1},Si={key:0},Ci={key:1},ua=M({__name:"Statistic",props:{title:{type:String},value:{type:Number},background:{type:String},align:{type:String,default:"left"},link:{type:String}},setup(r){const t=r;let n="#f7faff",o="10px";return t.background&&(n=t.background,n=="none"&&(o="0px")),(s,a)=>{const i=e.resolveComponent("RouterLink");return e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"container",style:e.normalizeStyle(`background: ${e.unref(n)}; padding: ${e.unref(o)}`)},[e.createElementVNode("div",{class:"item-box-data mono-data",style:e.normalizeStyle(`text-align: ${t.align};`)},[t.value!=null?(e.openBlock(),e.createElementBlock("span",xi,e.toDisplayString(t.value),1)):(e.openBlock(),e.createElementBlock("span",Bi,"..."))],4),e.createElementVNode("div",{class:"item-box-tip",style:e.normalizeStyle(`text-align: ${t.align};`)},[t.link?(e.openBlock(),e.createElementBlock("span",Si,[e.createVNode(i,{to:t.link},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElLink),{type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:1})]),_:1},8,["to"])])):(e.openBlock(),e.createElementBlock("span",Ci,e.toDisplayString(t.title),1))],4)],4)),[[e.unref(k.vLoading),t.value==null]])}}},[["__scopeId","data-v-73228f1a"]]),$i=M({__name:"StatisticCard",props:{title:{type:String},value:{type:Number},icon:{type:String},background:{type:String},align:{type:String},link:{type:String}},setup(r){const t=r;return(n,o)=>(e.openBlock(),e.createBlock(da,null,{default:e.withCtx(()=>[e.createVNode(ua,{title:t.title,value:t.value,icon:t.icon,background:t.background,align:t.align,link:t.link},null,8,["title","value","icon","background","align","link"])]),_:1}))}},[["__scopeId","data-v-f338c407"]]),Vi={},Oi={style:{padding:"20px 0"}};function Ti(r,t){return e.openBlock(),e.createElementBlock("div",Oi,[e.renderSlot(r.$slots,"default")])}const Ni=M(Vi,[["render",Ti]]),Ai=M({__name:"DashboardRow",setup(r){return(t,n)=>(e.openBlock(),e.createBlock(e.unref(k.ElRow),{style:{"margin-bottom":"20px"},class:"row"},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},void 0,!0)]),_:3}))}},[["__scopeId","data-v-5b091760"]]);function Z(r){const t={...r.query,...r.params};if(r.params.domain&&r.params.id){const n=gr(`${t.domain}-id`);t[n]=t.id}return delete t.domain,delete t.id,delete t.page,delete t.pageSize,t}function Di(r){const t=r.length,n=Math.floor(24/t);return{type:"row",cols:r.map(s=>({type:"col",span:n,field:s}))}}function kr(r){return r.map(t=>Di(t))}const Fi={__name:"FormLayout",props:{layout:Object,fields:Array},setup(r){const t=r,n=e.computed(()=>{if(t.layout.length==0){if(t.fields.length<=6){const i=s(t.fields,1);return kr(i)}const a=s(t.fields,2);return kr(a)}return t.layout});function o(a){return t.fields.find(c=>c.code==a)}function s(a,i=2){const c=a.map(f=>f.code),d=[];for(let f=0;f<c.length;f+=i)d.push(c.slice(f,f+i));return d}return(a,i)=>(e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,c=>(e.openBlock(),e.createBlock(e.unref(k.ElRow),{gutter:20},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.cols,d=>(e.openBlock(),e.createBlock(e.unref(k.ElCol),{span:d.span},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default",{field:o(d.field)})]),_:2},1032,["span"]))),256))]),_:2},1024))),256))]))}},ji={style:{width:"100%"}},Ri={class:"footer"},Ii={key:1},Li=M({__name:"PureForm",props:{config:{type:Object},data:{type:Object},removable:{type:Boolean,default:!1}},emits:["submit","remove"],setup(r,{emit:t}){const n=G.useRoute(),o=Z(n),s=t,a=e.ref(!1),i=r,c=kr(i.config.formLayout||[]),d=e.reactive({...i.data}),f=e.ref(null),p=i.config.fields.filter(w=>w.rules).reduce((w,x)=>(w[x.code]=B(x.rules),w),{}),m=e.computed(_),E=e.computed(()=>i.config.fields.filter(w=>{const x=w.editable(d,o),C=w.visible(d,o);return w.disabled=C&&!x,x||C}));function B(w){return typeof w=="object"?w:typeof w=="function"?w(d):[]}async function y(){await f.value.validate((w,x)=>{var D,R;if(!w)return console.log("error submit!",x),!1;const C=(D=i.config.fields.find(Q=>["images","attachments","attachment"].includes(Q.type)))==null?void 0:D.code,N={...d};C&&(N[C]=(R=N[C])==null?void 0:R.map(Q=>Q.id)),a.value=!0,s("submit",N,()=>{a.value=!1})})}function h(){s("remove",d)}function b(){if(i.config.removeConfirm){i.config.removeConfirm(d,h);return}k.ElMessageBox.confirm("确定要删除该条数据吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",appendTo:"#form"}).then(()=>{h()}).catch(()=>{k.ElMessage({type:"info",message:"取消删除"})})}function _(){const w=i.config.showSubmit;return typeof w=="boolean"?w:typeof w=="function"?w(o,d):!0}return e.watch(()=>({...d}),(w,x)=>{const N=Object.keys(w).filter(R=>x[R]!==w[R]).map(R=>{var Q;return(Q=f.value)==null||Q.clearValidate(R),{field:R,newValue:w[R],oldValue:x[R]}});E.value.filter(R=>!R.disabled).forEach(R=>{R.formChange&&R.formChange(d,N)})}),e.watch(()=>i.data,w=>{Object.keys(w).forEach(x=>{d[x]=w[x]})},{immediate:!0}),(w,x)=>(e.openBlock(),e.createBlock(e.unref(k.ElForm),{id:"form",ref_key:"formRef",ref:f,model:d,"label-width":"100px","label-position":"top",rules:e.unref(p)},{default:e.withCtx(()=>[e.createVNode(Fi,{layout:e.unref(c),fields:E.value},{default:e.withCtx(({field:C})=>[(e.openBlock(),e.createBlock(e.unref(k.ElFormItem),{key:C.code,label:C.label,prop:C.code},{default:e.withCtx(()=>[e.createElementVNode("div",ji,[C!=null&&C.editor?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(C.editor),{key:0,modelValue:d[C.code],"onUpdate:modelValue":N=>d[C.code]=N,field:C,disabled:C.disabled,"form-data":d,"domain-config":i.config},null,8,["modelValue","onUpdate:modelValue","field","disabled","form-data","domain-config"])):(e.openBlock(),e.createBlock(e.unref(k.ElAlert),{key:1,title:`未找到 ${C.code}(${C.type}) 的编辑器`,type:"error",effect:"dark",closable:!1},null,8,["title"]))])]),_:2},1032,["label","prop"]))]),_:1},8,["layout","fields"]),e.createElementVNode("div",Ri,[d.id&&!d.deletedAt&&i.removable?(e.openBlock(),e.createBlock(e.unref(k.ElButton),{key:0,size:"default",type:"danger",onClick:b},{default:e.withCtx(()=>[e.createTextVNode(" 删除 ")]),_:1})):(e.openBlock(),e.createElementBlock("div",Ii)),m.value?(e.openBlock(),e.createBlock(e.unref(k.ElButton),{key:2,size:"default",type:"primary",loading:a.value,onClick:y},{default:e.withCtx(()=>[e.createTextVNode(" 提交 ")]),_:1},8,["loading"])):e.createCommentVNode("",!0)])]),_:1},8,["model","rules"]))}},[["__scopeId","data-v-9950deab"]]);function Mi(){return ot().idempotentUrl?_e.get(ot().idempotentUrl).then(r=>r.data):""}const It={getValue:Mi},kn={__name:"FormEditor",props:{modelValue:{type:Boolean},config:{type:Object},data:{type:Object},title:{type:String},removable:{type:Boolean,default:!1}},emits:["update:modelValue","submit","remove"],setup(r,{emit:t}){const n=G.useRoute(),o=Z(n),s=t,a=r,i=e.ref(a.data),c=e.computed(()=>({...i.value,idempotentToken:f.value})),d=e.computed(()=>a.config.fields.filter(h=>h.visible(c,o)).length>=6?"60%":"40%"),f=e.ref(""),p=e.computed({get(){return a.modelValue},set(y){s("update:modelValue",y)}}),m=e.computed(()=>a.title?a.title:a.data.id?`编辑${a.config.name}`:`添加${a.config.name}`);function E(y,h){i.value=y,s("submit",y,async()=>{f.value=await It.getValue(),h()})}function B(y,h){s("remove",y,async()=>{f.value=await It.getValue(),h()})}return e.watch(()=>p,async()=>{f.value=await It.getValue()},{immediate:!0}),(y,h)=>(e.openBlock(),e.createBlock(e.unref(k.ElDialog),{modelValue:p.value,"onUpdate:modelValue":h[0]||(h[0]=b=>p.value=b),width:d.value,top:"20px",title:m.value,"close-on-click-modal":!1,"append-to-body":!0,"destroy-on-close":"","z-index":1e3},{default:e.withCtx(()=>[e.createVNode(Li,{config:a.config,data:c.value,removable:a.removable,onSubmit:E,onRemove:B},null,8,["config","data","removable"])]),_:1},8,["modelValue","width","title"]))}},Ui={__name:"RowActionFormEditor",props:{row:{type:Object},text:{type:String},code:{type:String},fields:{type:Array},onSubmit:{type:Function},type:{type:String,default:"primary"},restRepeat:{type:Function,default:()=>""},rest:{type:Object}},setup(r){const t=r,n=e.ref(t.row),o=e.ref(!1),s=e.shallowRef(null),a=ca("simple",{simple:!0,code:t.code,fields:t.fields});Promise.all(a.fields).then(d=>{a.fields=d,a.restRepeat=t.restRepeat,a.rest=t.rest,s.value=a});async function i(){o.value=!0}function c(d,f){t.onSubmit(d).then(()=>{o.value=!1,ElMessage({showClose:!0,grouping:!0,message:`${t.text}成功`,type:"success"})}).catch(()=>{console.log("请求失败"),f()})}return(d,f)=>(e.openBlock(),e.createBlock(e.unref(k.ElButton),{type:t.type,onClick:i},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.text)+" ",1),o.value?(e.openBlock(),e.createBlock(kn,{key:0,modelValue:o.value,"onUpdate:modelValue":f[0]||(f[0]=p=>o.value=p),title:t.text,config:s.value,data:n.value,onSubmit:c},null,8,["modelValue","title","config","data"])):e.createCommentVNode("",!0)]),_:1},8,["type"]))}},zi={class:"not-found"},we=M({__name:"EmptyTip",props:{text:{type:String,default:"<无>"}},setup(r){const t=r;return(n,o)=>(e.openBlock(),e.createElementBlock("span",zi,e.toDisplayString(t.text),1))}},[["__scopeId","data-v-c97e855f"]]),fa={__name:"FieldEditor",props:{modelValue:{type:Array,default:()=>[]},field:Object,type:String,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(r,{emit:t}){const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>Ru)),o=ot().fileUploadUrl,s=t,a=r,i=e.reactive({value:a.modelValue}),c=a.field.converter;function d(p){const m=i.value.findIndex(E=>E.id===p.id);i.value.splice(m,1),s("update:modelValue",i.value)}function f(p){k.ElLoading.service({text:"上传中,请稍后",background:"rgba(0,0,0,0.3)"}),_e.post(o,p).then(m=>{k.ElLoading.service().close(),k.ElMessage({message:"上传成功",type:"success"});const E=c(m.data);i.value=i.value?[...i.value,E]:[E],s("update:modelValue",i.value)}).catch(()=>{k.ElLoading.service().close(),k.ElMessage({message:"上传失败",type:"warning"})})}return e.watch(()=>a.modelValue,async()=>{i.value=a.modelValue},{immediate:!0}),(p,m)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(n),{images:i.value,props:a.field.props,onOnUpload:f,onOnRemove:d},null,8,["images","props"])]))}};/*! Element Plus v2.7.2 */var Hi={name:"zh-cn",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"确定",clear:"清空"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!"},upload:{deleteTip:"按 delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计"},tour:{next:"下一步",previous:"上一步",finish:"结束导览"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"},carousel:{leftArrow:"上一张幻灯片",rightArrow:"下一张幻灯片",indicator:"幻灯片切换至索引 {index}"}}};const qi={__name:"TooltipText",props:{content:{type:[Number,String],default:""},lineClamp:{type:[Number,String],default:1},className:{type:String},tipShowLength:{type:[Number,String]},textType:{type:String}},setup(r){const t=r,n=e.computed(()=>t.content?t.content.toString():"");return(o,s)=>(e.openBlock(),e.createElementBlock("div",null,[n.value.length>t.tipShowLength?(e.openBlock(),e.createBlock(e.unref(k.ElTooltip),{key:0,content:n.value,effect:"light"},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElText),{class:e.normalizeClass(t.className),type:t.textType,"line-clamp":t.lineClamp},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.value),1)]),_:1},8,["class","type","line-clamp"])]),_:1},8,["content"])):(e.openBlock(),e.createBlock(e.unref(k.ElText),{key:1,type:t.textType,class:e.normalizeClass(t.className)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.value),1)]),_:1},8,["type","class"]))]))}};/*! Element Plus Icons Vue v2.3.1 */var Pi=e.defineComponent({name:"ArrowDown",__name:"arrow-down",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"})]))}}),Wi=Pi,Gi=e.defineComponent({name:"CircleCloseFilled",__name:"circle-close-filled",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"})]))}}),Qi=Gi,vi=e.defineComponent({name:"Close",__name:"close",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),pa=vi,Ji=e.defineComponent({name:"DArrowLeft",__name:"d-arrow-left",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M529.408 149.376a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L259.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L197.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224zm256 0a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L515.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L453.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224z"})]))}}),ha=Ji,Ki=e.defineComponent({name:"DArrowRight",__name:"d-arrow-right",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M452.864 149.312a29.12 29.12 0 0 1 41.728.064L826.24 489.664a32 32 0 0 1 0 44.672L494.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L764.736 512 452.864 192a30.592 30.592 0 0 1 0-42.688m-256 0a29.12 29.12 0 0 1 41.728.064L570.24 489.664a32 32 0 0 1 0 44.672L238.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L508.736 512 196.864 192a30.592 30.592 0 0 1 0-42.688z"})]))}}),Yi=Ki,Xi=e.defineComponent({name:"Delete",__name:"delete",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),Zi=Xi,el=e.defineComponent({name:"Document",__name:"document",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h160v64H320zm0 384h384v64H320z"})]))}}),ma=el,tl=e.defineComponent({name:"Download",__name:"download",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-253.696 236.288-236.352 45.248 45.248L508.8 704 192 387.2l45.248-45.248L480 584.704V128h64z"})]))}}),nl=tl,rl=e.defineComponent({name:"Grid",__name:"grid",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M640 384v256H384V384zm64 0h192v256H704zm-64 512H384V704h256zm64 0V704h192v192zm-64-768v192H384V128zm64 0h192v192H704zM320 384v256H128V384zm0 512H128V704h192zm0-768v192H128V128z"})]))}}),ol=rl,al=e.defineComponent({name:"Loading",__name:"loading",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"})]))}}),ga=al,sl=e.defineComponent({name:"Minus",__name:"minus",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64"})]))}}),il=sl,ll=e.defineComponent({name:"Operation",__name:"operation",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M389.44 768a96.064 96.064 0 0 1 181.12 0H896v64H570.56a96.064 96.064 0 0 1-181.12 0H128v-64zm192-288a96.064 96.064 0 0 1 181.12 0H896v64H762.56a96.064 96.064 0 0 1-181.12 0H128v-64zm-320-288a96.064 96.064 0 0 1 181.12 0H896v64H442.56a96.064 96.064 0 0 1-181.12 0H128v-64z"})]))}}),cl=ll,dl=e.defineComponent({name:"Plus",__name:"plus",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"})]))}}),Er=dl,ul=e.defineComponent({name:"PriceTag",__name:"price-tag",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M224 318.336V896h576V318.336L552.512 115.84a64 64 0 0 0-81.024 0zM593.024 66.304l259.2 212.096A32 32 0 0 1 864 303.168V928a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32V303.168a32 32 0 0 1 11.712-24.768l259.2-212.096a128 128 0 0 1 162.112 0z"}),e.createElementVNode("path",{fill:"currentColor",d:"M512 448a64 64 0 1 0 0-128 64 64 0 0 0 0 128m0 64a128 128 0 1 1 0-256 128 128 0 0 1 0 256"})]))}}),_a=ul,fl=e.defineComponent({name:"QuestionFilled",__name:"question-filled",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m23.744 191.488c-52.096 0-92.928 14.784-123.2 44.352-30.976 29.568-45.76 70.4-45.76 122.496h80.256c0-29.568 5.632-52.8 17.6-68.992 13.376-19.712 35.2-28.864 66.176-28.864 23.936 0 42.944 6.336 56.32 19.712 12.672 13.376 19.712 31.68 19.712 54.912 0 17.6-6.336 34.496-19.008 49.984l-8.448 9.856c-45.76 40.832-73.216 70.4-82.368 89.408-9.856 19.008-14.08 42.24-14.08 68.992v9.856h80.96v-9.856c0-16.896 3.52-31.68 10.56-45.76 6.336-12.672 15.488-24.64 28.16-35.2 33.792-29.568 54.208-48.576 60.544-55.616 16.896-22.528 26.048-51.392 26.048-86.592 0-42.944-14.08-76.736-42.24-101.376-28.16-25.344-65.472-37.312-111.232-37.312zm-12.672 406.208a54.272 54.272 0 0 0-38.72 14.784 49.408 49.408 0 0 0-15.488 38.016c0 15.488 4.928 28.16 15.488 38.016A54.848 54.848 0 0 0 523.072 768c15.488 0 28.16-4.928 38.72-14.784a51.52 51.52 0 0 0 16.192-38.72 51.968 51.968 0 0 0-15.488-38.016 55.936 55.936 0 0 0-39.424-14.784z"})]))}}),pl=fl,hl=e.defineComponent({name:"Setting",__name:"setting",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M600.704 64a32 32 0 0 1 30.464 22.208l35.2 109.376c14.784 7.232 28.928 15.36 42.432 24.512l112.384-24.192a32 32 0 0 1 34.432 15.36L944.32 364.8a32 32 0 0 1-4.032 37.504l-77.12 85.12a357.12 357.12 0 0 1 0 49.024l77.12 85.248a32 32 0 0 1 4.032 37.504l-88.704 153.6a32 32 0 0 1-34.432 15.296L708.8 803.904c-13.44 9.088-27.648 17.28-42.368 24.512l-35.264 109.376A32 32 0 0 1 600.704 960H423.296a32 32 0 0 1-30.464-22.208L357.696 828.48a351.616 351.616 0 0 1-42.56-24.64l-112.32 24.256a32 32 0 0 1-34.432-15.36L79.68 659.2a32 32 0 0 1 4.032-37.504l77.12-85.248a357.12 357.12 0 0 1 0-48.896l-77.12-85.248A32 32 0 0 1 79.68 364.8l88.704-153.6a32 32 0 0 1 34.432-15.296l112.32 24.256c13.568-9.152 27.776-17.408 42.56-24.64l35.2-109.312A32 32 0 0 1 423.232 64H600.64zm-23.424 64H446.72l-36.352 113.088-24.512 11.968a294.113 294.113 0 0 0-34.816 20.096l-22.656 15.36-116.224-25.088-65.28 113.152 79.68 88.192-1.92 27.136a293.12 293.12 0 0 0 0 40.192l1.92 27.136-79.808 88.192 65.344 113.152 116.224-25.024 22.656 15.296a294.113 294.113 0 0 0 34.816 20.096l24.512 11.968L446.72 896h130.688l36.48-113.152 24.448-11.904a288.282 288.282 0 0 0 34.752-20.096l22.592-15.296 116.288 25.024 65.28-113.152-79.744-88.192 1.92-27.136a293.12 293.12 0 0 0 0-40.256l-1.92-27.136 79.808-88.128-65.344-113.152-116.288 24.96-22.592-15.232a287.616 287.616 0 0 0-34.752-20.096l-24.448-11.904L577.344 128zM512 320a192 192 0 1 1 0 384 192 192 0 0 1 0-384m0 64a128 128 0 1 0 0 256 128 128 0 0 0 0-256"})]))}}),ml=hl,gl=e.defineComponent({name:"SuccessFilled",__name:"success-filled",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),_l=gl,yl=e.defineComponent({name:"View",__name:"view",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}}),bl=yl;const ya=10,En=Ve.defineStore("route-history",{state:()=>({root:null,history:[]}),actions:{push(r,t,n){this.history.find(s=>s.code==t)||(this.history.length>=ya&&(this.history=this.history.slice(2-ya),this.history.unshift(this.root)),this.history.push({title:r,code:t,path:n}))},setupRootPath(r,t){this.root={title:r,code:t,path:t},this.history=this.history.filter(n=>n.code!=t),this.history.unshift(this.root)},remove(r){this.history=this.history.filter(t=>t.code!=r)},getLast(){return this.history[this.history.length-1]},clear(){this.history=[]},updateTitleByCode(r,t){const n=this.history.find(o=>o.code==r);n&&(n.title=t)}}}),wl={class:"header-box"},kl={class:"header-box-left"},El={class:"page-title"},xl={class:"tabs-container"},Bl={class:"user-profile"},Sl=M({__name:"HeaderMenu",props:{config:{type:Object}},setup(r){const t=G.useRouter(),n=G.useRoute(),o=En(),s=e.ref("首页"),a=r,i=n.fullPath.split("/")[1],c=B();o.setupRootPath("首页",`/${i}/home`);function d(y){var x,C;const h=y.meta.side,b=y.params.domain;let _=(x=y.meta)==null?void 0:x.title,w=(C=y.meta)==null?void 0:C.code;if(h&&b)_=wr()[h][y.params.domain].name,w=y.params.domain,y.params.id&&(_=`${_} - ${y.params.id}`,w=`${y.params.domain}-${y.params.id}`);else{const N=c.find(D=>D.route===y.path);N&&(_=N.title,w=N.route)}_&&w&&(o.push(_,w,y.fullPath),s.value=w)}function f(y){const h=o.history.find(b=>b.code==y.props.name);t.push(h.path)}function p(y){if(o.remove(y),y==s.value){const h=o.getLast();s.value=h.title,t.push(h.path)}}const m=(y,h)=>{const b=o.history.length;return y===0&&h==="self"||y<2&&h==="left"||y===b-1&&h==="right"||b===1&&h==="all"?!1:!(b<2&&h==="other")};function E(y,h){const b=[],_=o.history;switch(h){case"self":b.push(_[y].code);break;case"left":for(let w=0;w<y;w++)w!==0&&b.push(_[w].code);break;case"right":for(let w=y+1;w<_.length;w++)b.push(_[w].code);break;case"all":for(let w=0;w<_.length;w++)w!==0&&b.push(_[w].code);break;case"other":for(let w=1;w<_.length;w++)w!==y&&b.push(_[w].code);break}for(let w=0;w<b.length;w++)p(b[w])}function B(){return a.config.sideMenus[i].map(y=>y.children?y.children:y).flat()}return e.watch(()=>t.currentRoute.value,()=>{d(n)},{immediate:!0}),(y,h)=>(e.openBlock(),e.createElementBlock("div",wl,[e.createElementVNode("div",null,[e.createElementVNode("div",kl,[e.createVNode(e.unref(k.ElImage),{class:"header-img",src:a.config.logo,fit:"scale-down"},null,8,["src"]),e.createElementVNode("div",El,e.toDisplayString(a.config.name),1)])]),e.createElementVNode("div",xl,[e.createVNode(e.unref(k.ElTabs),{modelValue:s.value,"onUpdate:modelValue":h[0]||(h[0]=b=>s.value=b),type:"card",class:"tabs",onTabClick:f,onTabRemove:p},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o).history,(b,_)=>(e.openBlock(),e.createBlock(e.unref(k.ElTabPane),{closable:b.title!="首页",label:b.title,name:b.code},{label:e.withCtx(()=>[e.createVNode(e.unref(k.ElDropdown),{trigger:"contextmenu"},{dropdown:e.withCtx(()=>[e.createVNode(e.unref(k.ElDropdownMenu),null,{default:e.withCtx(()=>[m(_,"self")?(e.openBlock(),e.createBlock(e.unref(k.ElDropdownItem),{key:0,onClick:w=>E(_,"self")},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(pa))]),_:1}),e.createTextVNode(" 关闭当前标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),m(_,"left")?(e.openBlock(),e.createBlock(e.unref(k.ElDropdownItem),{key:1,onClick:w=>E(_,"left")},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(ha))]),_:1}),e.createTextVNode(" 关闭左侧标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),m(_,"right")?(e.openBlock(),e.createBlock(e.unref(k.ElDropdownItem),{key:2,onClick:w=>E(_,"right")},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(Yi))]),_:1}),e.createTextVNode(" 关闭右侧标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),m(_,"all")?(e.openBlock(),e.createBlock(e.unref(k.ElDropdownItem),{key:3,onClick:w=>E(_,"all")},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(il))]),_:1}),e.createTextVNode(" 关闭全部标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),m(_,"other")?(e.openBlock(),e.createBlock(e.unref(k.ElDropdownItem),{key:4,onClick:w=>E(_,"other")},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(cl))]),_:1}),e.createTextVNode(" 关闭其他标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)]),_:2},1024)]),default:e.withCtx(()=>[e.createVNode(qi,{content:b.title,"line-clamp":1,"class-name":"tab-pane-label","tip-show-length":"6"},null,8,["content"])]),_:2},1024)]),_:2},1032,["closable","label","name"]))),256))]),_:1},8,["modelValue"]),e.createElementVNode("span",{class:"back-icon",onClick:h[1]||(h[1]=b=>e.unref(t).back())},[e.createVNode(e.unref(k.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(ha))]),_:1})])]),e.createElementVNode("div",Bl,[e.renderSlot(y.$slots,"user-profile",{},void 0,!0)])]))}},[["__scopeId","data-v-ff10d720"]]),Cl=r=>(e.pushScopeId("data-v-22a49b3f"),r=r(),e.popScopeId(),r),$l={key:2,class:"dot-wrapper"},Vl=[Cl(()=>e.createElementVNode("span",{class:"dot"},null,-1))],ba=M({__name:"SideBarItem",props:{data:{type:Object},hasParent:{type:Boolean,default:!1}},setup(r){const t=r;return(n,o)=>r.data.children?(e.openBlock(),e.createBlock(e.unref(k.ElSubMenu),{key:0,index:r.data.title},{title:e.withCtx(()=>[r.data.icon?(e.openBlock(),e.createBlock(e.unref(k.ElIcon),{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.data.icon)))]),_:1})):(e.openBlock(),e.createBlock(e.unref(k.ElIcon),{key:1},{default:e.withCtx(()=>[e.createVNode(e.unref(_a))]),_:1})),e.createElementVNode("span",null,e.toDisplayString(r.data.title),1)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.data.children,s=>(e.openBlock(),e.createBlock(ba,{data:s,"has-parent":!0},null,8,["data"]))),256))]),_:1},8,["index"])):(e.openBlock(),e.createBlock(e.unref(k.ElMenuItem),{key:1,index:r.data.route,route:r.data.route,class:"menu-item"},{default:e.withCtx(()=>[r.data.icon?(e.openBlock(),e.createBlock(e.unref(k.ElIcon),{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.data.icon)))]),_:1})):t.hasParent?(e.openBlock(),e.createElementBlock("span",$l,Vl)):(e.openBlock(),e.createBlock(e.unref(k.ElIcon),{key:1},{default:e.withCtx(()=>[e.createVNode(e.unref(_a))]),_:1})),e.createElementVNode("span",null,e.toDisplayString(r.data.title),1)]),_:1},8,["index","route"]))}},[["__scopeId","data-v-22a49b3f"]]),Ol=M({__name:"SideBar",props:{sideMenus:{type:Object}},setup(r){const t=G.useRouter(),n=G.useRoute(),o=e.ref(n.fullPath),s=r,a=n.fullPath.split("/")[1],i=s.sideMenus[a];return e.watch(()=>t.currentRoute.value,()=>{var c;if((c=n.meta)!=null&&c.side){const d=n.meta.side;o.value=`/${d}/${n.params.domain}/list`}else o.value=n.fullPath},{immediate:!0}),(c,d)=>(e.openBlock(),e.createBlock(e.unref(k.ElScrollbar),null,{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElMenu),{class:"menu",router:!0,"default-active":o.value},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),f=>(e.openBlock(),e.createBlock(ba,{data:f},null,8,["data"]))),256))]),_:1},8,["default-active"])]),_:1}))}},[["__scopeId","data-v-4b892735"]]),Tl=M({__name:"BaseLayout",props:{config:{type:Object,default:()=>({})}},setup(r){const t=G.useRoute(),n=r,o={...ot(),...n.config},s=e.computed(()=>t.params.domain?t.params.domain:t.fullPath);return(a,i)=>{const c=e.resolveComponent("router-view");return e.openBlock(),e.createBlock(e.unref(k.ElConfigProvider),{locale:e.unref(Hi)},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElContainer),{style:{height:"100%"}},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElHeader),{class:"page-header"},{default:e.withCtx(()=>[e.createVNode(Sl,{config:o},{"user-profile":e.withCtx(()=>[e.renderSlot(a.$slots,"user-profile",{},void 0,!0)]),_:3})]),_:3}),e.createVNode(e.unref(k.ElContainer),{class:"page-content-container"},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElAside),{class:"page-content-aside"},{default:e.withCtx(()=>[e.createVNode(Ol,{"side-menus":o.sideMenus},null,8,["side-menus"])]),_:1}),e.createVNode(e.unref(k.ElMain),{class:"page-content-main"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(c,{key:s.value}))]),_:1})]),_:1})]),_:3})]),_:3},8,["locale"])}}},[["__scopeId","data-v-ea73195f"]]),Ne=Ve.defineStore("data-table-mode",{state:()=>({mode:"list",created:-1,updated:-1,removed:-1}),actions:{change(r){r&&(this.mode=r)},fireCreated(){this.created=Date.now()},fireUpdated(){this.updated=Date.now()},fireRemoved(){this.removed=Date.now()}}}),Lt=(r,t,n,o)=>Ve.defineStore(`${t}-${r}-filter`,{state:()=>({filters:{}}),getters:{validFilters(){return Nl(r,t,this.filters,n,o)}},actions:{change(s){this.filters={...this.filters,...s},xr(r,t,this.filters)},$reset(s){this.filters={isDeleted:this.filters.isDeleted,...s},xr(r,t,this.filters)}}});function Nl(r,t,n,o,s){let i={...Al(r,t,o),...n};return s!=null&&s.setupCreate&&(i=s.setupCreate(i)),xr(r,t,i)}function Al(r,t,n){const o=`filters---${t}---${r}`;let s={};return localStorage.getItem(o)&&(s=JSON.parse(localStorage.getItem(o))),Object.keys(s).filter(a=>Object.keys(n).includes(a)).reduce((a,i)=>(a[i]=s[i],a),{})}function xr(r,t,n){const o=`filters---${t}---${r}`,s=Dl(n);return localStorage.setItem(o,JSON.stringify(s)),s}function Dl(r){return Object.keys(r).filter(t=>r[t]!=null&&r[t]!=null&&r[t]!="").reduce((t,n)=>(t[n]=r[n],t),{})}const Fl={class:"sorters-box"},jl=["onClick"],Rl={class:"sorters-label"},Il={class:"sorters-arrow-box"},Ll=["onClick"],Ml=["onClick"],Ul=M({__name:"FiltersSorters",props:{sorters:{type:Object},value:{type:Array,default(){return[]}}},emits:["updateSorters"],setup(r,{emit:t}){const n=t,o=r,s=e.ref([]);async function a(){typeof o.sorters.sortersList=="function"?s.value=await o.sorters.sortersList():s.value=o.sorters.sortersList}a(),e.watch(()=>o.value,()=>{i()}),e.watch(()=>s,()=>{i()},{immediate:!0});function i(){if(o.value.length>0)for(let d=0;d<s.value.length;d++){const f=s.value[d];for(let p=0;p<o.value.length;p++){const m=o.value[p];f.field===m.field&&(f.order=m.order)}}else for(let d=0;d<s.value.length;d++)s.value[d].order=""}function c(d,f){const p=s.value;f?p[d].order=f:p[d].order?p[d].order==="ASC"?p[d].order="DESC":p[d].order==="DESC"&&(p[d].order=""):p[d].order="ASC",n("updateSorters",p.filter(m=>m.order))}return(d,f)=>(e.openBlock(),e.createElementBlock("div",Fl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(p,m)=>(e.openBlock(),e.createElementBlock("div",{class:"sorters-item",onClick:E=>c(m,"")},[e.createElementVNode("div",Rl,e.toDisplayString(p.name),1),e.createElementVNode("div",Il,[e.createElementVNode("i",{class:e.normalizeClass(["sort-caret ascending",p.order==="ASC"?"ascending-active":""]),onClick:e.withModifiers(E=>c(m,"ASC"),["stop"])},null,10,Ll),e.createElementVNode("i",{class:e.normalizeClass(["sort-caret descending",p.order==="DESC"?"descending-active":""]),onClick:e.withModifiers(E=>c(m,"DESC"),["stop"])},null,10,Ml)])],8,jl))),256))]))}},[["__scopeId","data-v-fa20b02a"]]),zl={class:"ranges-box"},Hl={class:"range-item"},ql={class:"range-label"},Pl={class:"range-input-box"},Wl=M({__name:"FiltersRange",props:{ranges:{type:Object},value:{type:Array,default(){return[]}}},emits:["updateRanges"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive(o.ranges.rangesList);e.watch(()=>o.value,()=>{a()});function a(){o.value&&o.value.length>0?s.forEach(c=>{o.value.forEach(d=>{c.field===d.field&&(c.min=d.min?Number(d.min):null,c.max=d.max?Number(d.max):null)})}):s.forEach(c=>{c.min=null,c.max=null})}function i(c,d,f){const p=[...s];p.forEach(m=>{m.field===d&&(m[f]=c)}),n("updateRanges",p.filter(m=>m.min||m.max))}return a(),(c,d)=>(e.openBlock(),e.createElementBlock("div",zl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s,f=>(e.openBlock(),e.createElementBlock("div",Hl,[e.createElementVNode("div",ql,e.toDisplayString(f.name),1),e.createElementVNode("div",Pl,[e.createVNode(e.unref(k.ElInputNumber),{modelValue:f.min,"onUpdate:modelValue":p=>f.min=p,"controls-position":"right",class:"input-box",onChange:p=>{i(p,f.field,"min")}},null,8,["modelValue","onUpdate:modelValue","onChange"]),e.createVNode(e.unref(k.ElInputNumber),{modelValue:f.max,"onUpdate:modelValue":p=>f.max=p,"controls-position":"right",class:"input-box",type:"number",onChange:p=>{i(p,f.field,"max")}},null,8,["modelValue","onUpdate:modelValue","onChange"])])]))),256))]))}},[["__scopeId","data-v-30f46526"]]),Gl={key:0},Ql=M({__name:"FiltersEditor",props:{settings:{type:Object}},setup(r){const t=r,n=G.useRoute(),o=Z(n),s=e.ref([]),a=e.reactive({}),i=e.reactive({}),c=Lt(t.settings.code,n.path,t.settings.filters,t.settings.filterHook)();c.$subscribe((_,w)=>{w.filters.isDeleted!==a.isDeleted&&(Object.keys(a).forEach(x=>{a[x]=void 0}),a.isDeleted=w.filters.isDeleted)});function d(_){return typeof _=="boolean"?_:typeof _=="function"?_(o):!0}async function f(_,w){if(typeof _.options=="function")i[_.code]=await _.options(a,o,w);else if(Array.isArray(_.options))i[_.code]=_.options;else if(typeof _.options=="object"){const x=_.options.getOneUrl?_.options.getOneUrl:_.options.url;if(Array.isArray(a[_.code])&&a[_.code].length>0)i[_.code]=[],a[_.code].forEach(C=>{x.getOne({id:C}).then(N=>{i[_.code].push({code:N.data[_.options.data.value]||N.data.id,name:N.data[_.options.data.label]||N.data.name})})});else if(!Array.isArray(a[_.code])&&a[_.code])x.getOne({id:a[_.code]}).then(C=>{i[_.code]=[{code:C.data[_.options.data.value]||C.data.id,name:C.data[_.options.data.label]||C.data.name}]});else{const C=_.options.query.keyWord.toString();_.options.url.getList({..._.options.query,[C]:w}).then(N=>{i[_.code]=N.data.rows.map(D=>({code:D[_.options.data.value]||D.id,name:D[_.options.data.label]||D.name}))})}}}function p(_){if(_.remote)return w=>{f(_,w)}}function m(_){a.sorters=_,h()}function E(_){a.filters=_}function B(){Object.keys(a).forEach(_=>{a[_]=void 0}),s.value=Object.keys(t.settings.filters).filter(_=>d(t.settings.filters[_].visible)).map(_=>{const w={...t.settings.filters[_],code:_};return a[_]=y(_),(w.type==="select"||w.type==="selectV2"||w.type==="tree")&&f(w),w}).filter(_=>_.code!=="isDeleted")}function y(_){const w=t.settings.filters[_],x=c.validFilters[_];return w.type==="boolean"&&typeof x!="boolean"?w.value:x}function h(){let _=JSON.parse(JSON.stringify(a));const w=t.settings.filterHook;w!=null&&w.preSubmit&&(_=w.preSubmit(_,o)),c.change(_)}function b(){c.$reset({}),B(),h()}return e.watch(()=>t.settings,()=>{B(),h()},{immediate:!0}),(_,w)=>Object.keys(t.settings.filters).length>0?(e.openBlock(),e.createElementBlock("div",Gl,[e.createVNode(e.unref(k.ElForm),{model:a,inline:"",class:"form-editor"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,x=>(e.openBlock(),e.createBlock(e.unref(k.ElFormItem),null,{default:e.withCtx(()=>[x.type==="boolean"?(e.openBlock(),e.createBlock(e.unref(k.ElSelect),{key:0,modelValue:a[x.code],"onUpdate:modelValue":C=>a[x.code]=C,filterable:"",clearable:"",placeholder:`是否${x.name}`,"value-on-clear":null,onChange:h},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElOption),{value:!0,label:`已${x.name}`},null,8,["label"]),e.createVNode(e.unref(k.ElOption),{value:!1,label:`未${x.name}`},null,8,["label"])]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder"])):x.type==="select"?(e.openBlock(),e.createBlock(e.unref(k.ElSelect),{key:1,modelValue:a[x.code],"onUpdate:modelValue":C=>a[x.code]=C,filterable:"",clearable:"",remote:"","reserve-keyword":"","remote-show-suffix":"","fit-input-width":"",placeholder:x.name,multiple:x.multiple,"collapse-tags":"",class:e.normalizeClass(x.multiple?"tags-selects-input":""),"multiple-limit":x.multipleLimit?x.multipleLimit:0,"remote-method":p(x),"value-on-clear":null,onChange:h},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i[x.code],C=>(e.openBlock(),e.createBlock(e.unref(k.ElOption),{key:C.code,label:C.name,value:C.code,title:C.name},null,8,["label","value","title"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder","multiple","class","multiple-limit","remote-method"])):x.type==="selectV2"?(e.openBlock(),e.createBlock(e.unref(k.ElSelectV2),{key:2,modelValue:a[x.code],"onUpdate:modelValue":C=>a[x.code]=C,filterable:"",options:i[x.code]?i[x.code]:[],props:{label:"name",value:"code"},multiple:x.multiple,placeholder:x.name,clearable:"","value-on-clear":null,onChange:h},null,8,["modelValue","onUpdate:modelValue","options","multiple","placeholder"])):x.type==="sorters"?(e.openBlock(),e.createBlock(Ul,{key:3,value:a[x.code],sorters:x,onUpdateSorters:m},null,8,["value","sorters"])):x.type==="range"?(e.openBlock(),e.createBlock(Wl,{key:4,value:a[x.code],ranges:x,onUpdateRanges:E},null,8,["value","ranges"])):x.type==="datetime"?(e.openBlock(),e.createBlock(e.unref(k.ElDatePicker),{key:5,modelValue:a[x.code],"onUpdate:modelValue":C=>a[x.code]=C,type:"datetime",format:"YYYY-MM-DD HH:mm:ss","value-format":"YYYY-MM-DD HH:mm:ss",placeholder:x.name},null,8,["modelValue","onUpdate:modelValue","placeholder"])):x.type==="datetime-range"?(e.openBlock(),e.createBlock(e.unref(k.ElDatePicker),{key:6,modelValue:a[x.code],"onUpdate:modelValue":C=>a[x.code]=C,type:"datetimerange",format:"YYYY-MM-DD HH:mm:ss","value-format":"YYYY-MM-DD HH:mm:ss","start-placeholder":x.name,"end-placeholder":x.name,placeholder:x.name},null,8,["modelValue","onUpdate:modelValue","start-placeholder","end-placeholder","placeholder"])):(e.openBlock(),e.createBlock(e.unref(k.ElInput),{key:7,modelValue:a[x.code],"onUpdate:modelValue":C=>a[x.code]=C,modelModifiers:{trim:!0},placeholder:x.name,type:x.type,clearable:""},null,8,["modelValue","onUpdate:modelValue","placeholder","type"]))]),_:2},1024))),256)),s.value.length>0?(e.openBlock(),e.createBlock(e.unref(k.ElFormItem),{key:0},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElButton),{type:"primary",onClick:h},{default:e.withCtx(()=>[e.createTextVNode(" 查询 ")]),_:1}),e.createVNode(e.unref(k.ElButton),{onClick:b},{default:e.withCtx(()=>[e.createTextVNode(" 重置 ")]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["model"])])):e.createCommentVNode("",!0)}},[["__scopeId","data-v-cadbb5a7"]]),vl={class:"data-page-title"},Jl={class:"title"},Kl={class:"data-page-toolbar"},Yl=M({__name:"DataTableHeader",props:{settings:{type:Object}},setup(r){const t=r,n=t.settings.name,o=G.useRoute(),s=Ne(),a=Lt(t.settings.code,o.path,t.settings.filters,t.settings.filterHook)(),i=e.useSlots(),c=e.computed(()=>a.validFilters.isDeleted||!1);function d(){a.$reset({isDeleted:!c.value})}function f(){const m=`table-view-${o.path}-${t.settings.code}`,E=localStorage.getItem(m);s.change(E)}function p(m){s.change(m);const E=`table-view-${o.path}-${t.settings.code}`;localStorage.setItem(E,s.mode)}return e.onMounted(f),(m,E)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",vl,[e.createElementVNode("div",Jl,e.toDisplayString(c.value?`已删除的${e.unref(n)}`:e.unref(n)),1),e.createElementVNode("div",Kl,[e.unref(i).operations?(e.openBlock(),e.createBlock(e.unref(k.ElButtonGroup),{key:0,class:"button-groups"},{default:e.withCtx(()=>[e.renderSlot(m.$slots,"operations",{},void 0,!0)]),_:3})):e.createCommentVNode("",!0),e.createVNode(e.unref(k.ElButtonGroup),{class:"button-groups"},{default:e.withCtx(()=>[e.renderSlot(m.$slots,"tools",{},void 0,!0)]),_:3}),e.createVNode(e.unref(k.ElDropdown),{trigger:"click",onCommand:p},{dropdown:e.withCtx(()=>[e.createVNode(e.unref(k.ElDropdownMenu),null,{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElDropdownItem),{command:"list"},{default:e.withCtx(()=>[e.createTextVNode(" 列表 ")]),_:1}),e.createVNode(e.unref(k.ElDropdownItem),{command:"grid"},{default:e.withCtx(()=>[e.createTextVNode(" 网格 ")]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(k.ElButton),null,{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(ol))]),_:1}),e.createVNode(e.unref(k.ElIcon),{class:"el-icon--right"},{default:e.withCtx(()=>[e.createVNode(e.unref(Wi))]),_:1})]),_:1})]),_:1}),t.settings.filters.isDeleted?(e.openBlock(),e.createBlock(e.unref(k.ElDropdown),{key:1,trigger:"click"},{dropdown:e.withCtx(()=>[e.createVNode(e.unref(k.ElDropdownMenu),null,{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElDropdownItem),{command:"deleted",onClick:d},{default:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(c.value?"未删除":"已删除"),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(k.ElButton),null,{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(ml))]),_:1})]),_:1})]),_:1})):e.createCommentVNode("",!0)])]),e.createVNode(Ql,{settings:t.settings},null,8,["settings"])],64))}},[["__scopeId","data-v-4bec2921"]]),Xl={class:"kst-field-row-id"},Zl={key:0},ec={key:1,class:"mono-data"},tc={key:1},wa=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object},mode:{type:String}},setup(r){const t=e.useSlots(),n=G.useRoute(),o=r,s=n.meta.side,a=e.computed(()=>o.row[o.field.code]),i=e.computed(()=>({path:`/${s}/${o.field.domain}/${a.value}`,query:{...Z(n),...o.field.rowQuery(o.row)}}));function c(){return o.field.isRouter(o.row,Z(n))}return(d,f)=>{const p=e.resolveComponent("RouterLink");return e.openBlock(),e.createElementBlock("div",Xl,[a.value?(e.openBlock(),e.createElementBlock("span",Zl,[c()?(e.openBlock(),e.createBlock(p,{key:0,class:"bld-link mono-data",to:i.value},{default:e.withCtx(()=>[e.unref(t).name?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.renderSlot(d.$slots,"name",{},void 0,!0),e.createTextVNode("(#"+e.toDisplayString(a.value)+") ",1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(" #"+e.toDisplayString(a.value),1)],64))]),_:3},8,["to"])):(e.openBlock(),e.createElementBlock("span",ec,[e.unref(t).name?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.renderSlot(d.$slots,"name",{},void 0,!0),e.createTextVNode("("+e.toDisplayString(a.value)+") ",1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(a.value),1)],64))]))])):(e.openBlock(),e.createElementBlock("span",tc," NO ID "))])}}},[["__scopeId","data-v-00021e61"]]);function nc(r){k.ElMessage(r)}const rc={show:nc},Br={__name:"DomainEdit",props:{row:{type:Object},settings:{type:Object},operations:{type:Object,default:()=>{}},isDetail:{type:Boolean,default:!1}},setup(r){var y;const t=En(),n=Ne(),o=G.useRoute(),s=G.useRouter(),a=Z(o),i=r,c=e.ref({}),d=e.ref(!1),f=e.computed(()=>{var h,b;return i.row.deletedAt?!1:(h=i.operations)!=null&&h.updatable?!0:!!((b=i.operations)!=null&&b.removable)}),p=e.ref((y=i.operations)==null?void 0:y.removable);async function m(){const h=i.settings.formHook,b=i.settings.btnVisible,_=i.settings.rest,{data:w}=await _.getOne({...i.row,...a});c.value=w,h.setupUpdate&&(c.value=h.setupUpdate(c.value)),b.showRemove&&(p.value=b.showRemove(c.value)),d.value=!0}function E(h,b){const _=i.settings.formHook,w=i.settings.rest;Object.keys(a).forEach(x=>{h[x]=a[x]}),_!=null&&_.preUpdateSubmit&&(h=_.preUpdateSubmit(h)),w.update(h).then(()=>{d.value=!1,n.fireUpdated()}).catch(async()=>{b()})}function B(h,b){i.settings.rest.remove(h).then(()=>{rc.show({type:"success",message:"删除成功"}),d.value=!1,i.isDetail&&t.history.forEach(w=>{o.fullPath.includes(w.path)&&(t.remove(w.code),s.back())}),n.fireRemoved()}).catch(()=>{b()})}return(h,b)=>f.value?(e.openBlock(),e.createBlock(e.unref(k.ElButton),{key:0,type:"primary",onClick:m},{default:e.withCtx(()=>[e.createTextVNode(" 编辑 "),d.value?(e.openBlock(),e.createBlock(kn,{key:0,modelValue:d.value,"onUpdate:modelValue":b[0]||(b[0]=_=>d.value=_),config:i.settings,data:c.value,removable:p.value,onSubmit:E,onRemove:B},null,8,["modelValue","config","data","removable"])):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0)}},oc=r=>(e.pushScopeId("data-v-8ddab769"),r=r(),e.popScopeId(),r),ac={class:"data-grid-wrapper"},sc={key:0,class:"cover"},ic=oc(()=>e.createElementVNode("div",{class:"image-slot"},null,-1)),lc={class:"header"},cc={class:"body"},dc={key:0},uc={class:"key"},fc={class:"value"},pc={key:1,class:"footer tools"},hc=M({__name:"DataGrid",props:{settings:{type:Object},data:{type:Array},operations:{type:Object,default:()=>{}}},setup(r){const t=G.useRoute(),n=Z(t),o=e.useSlots(),s=r,a=Lt(s.settings.code,t.path,s.settings.filters,s.settings.filterHook)(),{filters:i}=Ve.storeToRefs(a),c=e.ref(i.value),d=e.shallowRef([]),f=e.shallowRef(null),p=e.computed(()=>{var B,y;return!!((B=s.operations)!=null&&B.updatable||(y=s.operations)!=null&&y.removable)});function m(){f.value=s.settings.fields.find(B=>B.code==="id"),d.value=s.settings.fields.filter(B=>B.code===s.settings.coverField||B.code===s.settings.nameField||B.code==="id"?!1:B.showInList(n,c.value))}function E(B){return s.settings.nameField?B[s.settings.nameField]:B.name?B.name:`${B.id}`}return e.watch(i,B=>{c.value=B,m()}),m(),(B,y)=>(e.openBlock(),e.createElementBlock("div",ac,[r.data.length===0?(e.openBlock(),e.createBlock(e.unref(k.ElEmpty),{key:0,description:"暂无数据"})):(e.openBlock(),e.createBlock(e.unref(k.ElRow),{key:1,gutter:20},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.data,h=>(e.openBlock(),e.createBlock(e.unref(k.ElCol),{style:{"margin-bottom":"20px"},xs:24,sm:12,md:8,lg:6,xl:4},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElCard),{"body-style":{padding:"0px"},shadow:"hover"},{default:e.withCtx(()=>[e.unref(o).cover||s.settings.coverField?(e.openBlock(),e.createElementBlock("div",sc,[e.unref(o).cover?e.renderSlot(B.$slots,"cover",{key:0,row:h},void 0,!0):(e.openBlock(),e.createBlock(e.unref(k.ElImage),{key:1,src:h[s.settings.coverField],fit:"contain"},{error:e.withCtx(()=>[ic]),_:2},1032,["src"]))])):e.createCommentVNode("",!0),e.createElementVNode("div",lc,[e.createVNode(wa,{field:f.value,row:h},e.createSlots({_:2},[h[s.settings.nameField]?{name:"name",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(E(h)),1)]),key:"0"}:void 0]),1032,["field","row"])]),e.createElementVNode("div",cc,[e.unref(o).body?(e.openBlock(),e.createElementBlock("div",dc,[e.renderSlot(B.$slots,"body",{row:h},void 0,!0)])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(d.value,b=>(e.openBlock(),e.createElementBlock("div",{key:b.code,class:"field mono-data"},[e.createElementVNode("div",uc,e.toDisplayString(b.label)+" ",1),e.createElementVNode("div",fc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(b.display),{field:b,row:h,mode:"grid"},null,8,["field","row"]))])]))),128))]),e.unref(o).actions||p.value?(e.openBlock(),e.createElementBlock("div",pc,[e.unref(o).actions?(e.openBlock(),e.createBlock(e.unref(k.ElButtonGroup),{key:0,size:"small"},{default:e.withCtx(()=>[e.renderSlot(B.$slots,"actions",{row:h},void 0,!0)]),_:2},1024)):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createBlock(e.unref(k.ElButtonGroup),{key:1,size:"small"},{default:e.withCtx(()=>[e.createVNode(Br,{row:h,settings:s.settings,operations:s.operations},null,8,["row","settings","operations"])]),_:2},1024)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:2},1024)]),_:2},1024))),256))]),_:3}))]))}},[["__scopeId","data-v-8ddab769"]]);function mc(r,t){const n=r.fields.map(s=>s.code),o=Object.keys(t);n.forEach(s=>{o.includes(s)||console.error(`${r.code}.${s} : 与服务端数据不匹配`)})}const ka=M({__name:"DataList",props:{settings:{type:Object},data:{type:Array,default:()=>[]},operations:{type:Object,default:()=>{}},operationsWidth:{type:Number,default:100},actionsWidth:{type:Number,default:150}},emits:["sort-column","select-change","enable-item"],setup(r,{emit:t}){const n=G.useRoute(),o=Z(n),s=t,a=e.useSlots(),i=r,c=Lt(i.settings.code,n.path,i.settings.filters,i.settings.filterHook)(),{filters:d}=Ve.storeToRefs(c),f=e.ref(d.value),p=e.shallowRef([]),m=e.computed(()=>{var b,_;return!!((b=i.operations)!=null&&b.updatable||(_=i.operations)!=null&&_.removable)});function E(b){s("sort-column",b)}function B(b){s("enable-item",b)}function y(){p.value=i.settings.fields.filter(b=>b.showInList(o,f.value))}function h(b){s("select-change",{routeQuery:o,data:b})}return y(),e.watch(()=>i.data,()=>{i.data.length>0&&mc(i.settings,i.data[0])}),e.watch(d,b=>{f.value=b,y()}),(b,_)=>(e.openBlock(),e.createBlock(e.unref(k.ElTable),{ref:"dataTable",class:"table mono-data",data:i.data,"show-overflow-tooltip":"","highlight-current-row":"","row-key":"id",onSelectionChange:h,onSortChange:E},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElTableColumn),{type:"selection",width:"40"}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,w=>(e.openBlock(),e.createBlock(e.unref(k.ElTableColumn),{key:w.code,label:w.label,width:w.width,prop:w.code,sortable:w.sortable?"custom":!1,fixed:w.fixed},e.createSlots({_:2},[w.type==="switch"?{name:"default",fn:e.withCtx(({row:x})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w.display),{field:w,row:x,mode:"list",onEnable:B},null,40,["field","row"]))]),key:"0"}:{name:"default",fn:e.withCtx(({row:x})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w.display),{key:x.updatedAt,field:w,row:x,mode:"list"},null,8,["field","row"]))]),key:"1"}]),1032,["label","width","prop","sortable","fixed"]))),128)),e.unref(a).actions?(e.openBlock(),e.createBlock(e.unref(k.ElTableColumn),{key:0,label:"管理",fixed:"right",width:i.actionsWidth},{default:e.withCtx(({row:w})=>[e.createVNode(e.unref(k.ElButtonGroup),{size:"small"},{default:e.withCtx(()=>[e.renderSlot(b.$slots,"actions",{row:w},void 0,!0)]),_:2},1024)]),_:3},8,["width"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createBlock(e.unref(k.ElTableColumn),{key:1,fixed:"right",label:"操作",width:i.operationsWidth},{default:e.withCtx(({row:w})=>[e.createVNode(e.unref(k.ElButtonGroup),{size:"small"},{default:e.withCtx(()=>[e.createVNode(Br,{row:w,settings:i.settings,operations:i.operations},null,8,["row","settings","operations"])]),_:2},1024)]),_:1},8,["width"])):e.createCommentVNode("",!0)]),_:3},8,["data"]))}},[["__scopeId","data-v-43048eeb"]]),gc={__name:"DataTable",props:{data:{type:Array},settings:{type:Object},operationsWidth:{type:Number},actionsWidth:{type:Number}},setup(r){const t=Ne();t.$reset();const{mode:n}=Ve.storeToRefs(t),o=e.useSlots(),s=r,a=e.shallowRef(ka);function i(c){c=="grid"?a.value=hc:a.value=ka}return e.watch(n,c=>{i(c)}),(c,d)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.value),e.normalizeProps(e.guardReactiveProps(s)),e.createSlots({_:2},[e.renderList(e.unref(o),(f,p)=>({name:p,fn:e.withCtx(m=>[e.renderSlot(c.$slots,p,e.normalizeProps(e.guardReactiveProps(m||{})))])}))]),1040))}},_c={__name:"DomainNew",props:{settings:{type:Object},operations:{type:Object,default:()=>{}}},setup(r){const t=Ne(),n=G.useRoute(),o=Z(n),s=r,a=e.ref({}),i=e.ref(!1),c=e.computed(()=>{var p;return!!((p=s.operations)!=null&&p.creatable)});async function d(){const p=s.settings.formHook,m=s.settings.fields.reduce((E,B)=>(E[B.code]=B.default,E),{});a.value=m,p.setupCreate&&(a.value=p.setupCreate(a.value)),i.value=!0}function f(p,m){const E=s.settings.formHook,B=s.settings.rest;Object.keys(o).forEach(y=>{p[y]=o[y]}),E!=null&&E.preCreateSubmit&&(p=E.preCreateSubmit(p)),B.create(p).then(()=>{i.value=!1,t.fireCreated()}).catch(async()=>{m()})}return(p,m)=>c.value?(e.openBlock(),e.createBlock(e.unref(k.ElButton),{key:0,type:"success",onClick:d},{default:e.withCtx(()=>[e.createTextVNode(" 添加 "),i.value?(e.openBlock(),e.createBlock(kn,{key:0,modelValue:i.value,"onUpdate:modelValue":m[0]||(m[0]=E=>i.value=E),config:s.settings,data:a.value,removable:!1,onSubmit:f},null,8,["modelValue","config","data"])):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0)}},Ea={__name:"RowActions",props:{row:{type:Object},settings:{type:Object},query:{type:Object}},setup(r){const t=G.useRouter(),n=Ne(),o=r,s=e.shallowRef([]);let a="";async function i(d,f){if(a=k.ElLoading.service({fullscreen:!0}),d.path){a.close(),c(d,f);return}const p=await It.getValue();try{await d.action({...f,...o.query,idempotentToken:p}),a.close(),n.fireUpdated()}catch{a.close(),n.fireUpdated()}}function c(d,f){t.push(d.path(f,o.query))}return e.watch(()=>o.row,()=>{s.value=o.settings.rowActions(o.query)},{immediate:!0}),(d,f)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,p=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[p.isVisible(o.row)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[p.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p.component),{key:0,row:r.row},null,8,["row"])):(e.openBlock(),e.createBlock(e.unref(k.ElButton),{key:1,type:p.type?p.type:"primary",onClick:m=>i(p,o.row)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.name),1)]),_:2},1032,["type","onClick"]))],64)):e.createCommentVNode("",!0)],64))),256))}},yc={__name:"PageActions",props:{settings:{type:Object},tableDataSelect:{type:Object},query:{type:Object}},setup(r){const t=Ne(),n=r,o=e.shallowRef([]),s=e.computed(()=>{var c,d;return((d=(c=n.tableDataSelect)==null?void 0:c.data)==null?void 0:d.length)>0}),a=e.ref(!1);async function i(c){a.value=!0;const d=await It.getValue();try{await c.action({...n.tableDataSelect,idempotentToken:d}),a.value=!1,t.fireUpdated()}catch{a.value=!1,t.fireUpdated()}}return e.watch(()=>n.row,()=>{o.value=n.settings.pageActions(n.query)},{immediate:!0}),(c,d)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,f=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[f.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f.component),{key:0,item:f,settings:r.settings,query:r.query,"table-data-select":r.tableDataSelect},null,8,["item","settings","query","table-data-select"])):(e.openBlock(),e.createBlock(e.unref(k.ElButton),{key:1,type:f.type,loading:a.value,disabled:!f.enable&&!s.value,onClick:p=>i(f)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.name),1)]),_:2},1032,["type","loading","disabled","onClick"]))],64))),256))}},bc={class:"pagination-wrapper"},wc=M({__name:"Pagination",props:{total:{type:Number},page:{type:Number,default:1},size:{type:Number,default:30},pageSizes:{type:Array,default:()=>[30,60,90,120]}},emits:["page-change"],setup(r,{emit:t}){const n=t,o=G.useRouter(),s=G.useRoute(),a=r,i=e.ref(a.page),c=e.ref(a.size),d=e.ref(a.total),f=e.ref(a.pageSizes);e.watch(()=>a.total,E=>{d.value=E}),e.watch(()=>[s.query.page,s.query.pageSize],()=>{!s.query.page||!s.query.pageSize?(i.value=1,c.value=30):(i.value=parseInt(s.query.page),c.value=parseInt(s.query.pageSize)),n("page-change",{page:i.value,size:c.value})});function p(E){i.value=E,o.push({path:s.path,query:{...s.query,page:i.value,pageSize:c.value}})}function m(E){c.value=E,o.push({path:s.path,query:{...s.query,page:i.value,pageSize:c.value}})}return(E,B)=>(e.openBlock(),e.createElementBlock("div",bc,[e.createVNode(e.unref(k.ElPagination),{background:"","page-size":c.value,"page-sizes":f.value,total:d.value,"current-page":r.page,layout:"total,sizes, prev, pager, next",onCurrentChange:p,onSizeChange:m},null,8,["page-size","page-sizes","total","current-page"])]))}},[["__scopeId","data-v-3c65f1a1"]]);var xa;const Ba=typeof window<"u";Ba&&((xa=window==null?void 0:window.navigator)!=null&&xa.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function kc(r){return typeof r=="function"?r():e.unref(r)}function Ec(r){return r}function xc(r){return e.getCurrentScope()?(e.onScopeDispose(r),!0):!1}function Bc(r,t=!0){e.getCurrentInstance()?e.onMounted(r):t?r():e.nextTick(r)}function Sc(r){var t;const n=kc(r);return(t=n==null?void 0:n.$el)!=null?t:n}const Cc=Ba?window:void 0;function $c(r,t=!1){const n=e.ref(),o=()=>n.value=!!r();return o(),Bc(o,t),n}const Sa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ca="__vueuse_ssr_handlers__";Sa[Ca]=Sa[Ca]||{};var $a=Object.getOwnPropertySymbols,Vc=Object.prototype.hasOwnProperty,Oc=Object.prototype.propertyIsEnumerable,Tc=(r,t)=>{var n={};for(var o in r)Vc.call(r,o)&&t.indexOf(o)<0&&(n[o]=r[o]);if(r!=null&&$a)for(var o of $a(r))t.indexOf(o)<0&&Oc.call(r,o)&&(n[o]=r[o]);return n};function Va(r,t,n={}){const o=n,{window:s=Cc}=o,a=Tc(o,["window"]);let i;const c=$c(()=>s&&"ResizeObserver"in s),d=()=>{i&&(i.disconnect(),i=void 0)},f=e.watch(()=>Sc(r),m=>{d(),c.value&&s&&m&&(i=new ResizeObserver(t),i.observe(m,a))},{immediate:!0,flush:"post"}),p=()=>{d(),f()};return xc(p),{isSupported:c,stop:p}}var Oa;(function(r){r.UP="UP",r.RIGHT="RIGHT",r.DOWN="DOWN",r.LEFT="LEFT",r.NONE="NONE"})(Oa||(Oa={}));var Nc=Object.defineProperty,Ta=Object.getOwnPropertySymbols,Ac=Object.prototype.hasOwnProperty,Dc=Object.prototype.propertyIsEnumerable,Na=(r,t,n)=>t in r?Nc(r,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[t]=n,Fc=(r,t)=>{for(var n in t||(t={}))Ac.call(t,n)&&Na(r,n,t[n]);if(Ta)for(var n of Ta(t))Dc.call(t,n)&&Na(r,n,t[n]);return r};Fc({linear:Ec},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});const Aa=M({__name:"DataTablePage",props:{settings:{type:Object},query:{type:Object}},setup(r){e.useCssVars(L=>({71828730:K.value}));const t=G.useRoute(),n=Z(t),o=r,s=Lt(o.settings.code,t.path,o.settings.filters,o.settings.filterHook)(),{filters:a}=Ve.storeToRefs(s);e.watch(a,L=>{_=L,D()});const i=Ne(),{created:c,updated:d,removed:f}=Ve.storeToRefs(i);e.watch([c,d,f],([L,P,de])=>{(L||P||de)&&D()});const p=e.ref(!0),m=e.ref([]),E=e.ref(0),B=e.ref({}),y=e.ref({}),h=e.ref(null),b=e.ref(null);let _={};const w=e.ref(parseInt(t.query.pageSize)||30),x=e.ref(parseInt(t.query.page)||1);function C(L){let P=null;if(L.order==="ascending"?P="ASC":L.order==="descending"&&(P="DESC"),_.sorters){let de=[];_.sorters.some(ye=>ye.field===L.prop)?_.sorters.forEach(ye=>{ye.field===L.prop&&(ye.order=P,ye.name||de.push(ye)),ye.name&&de.push(ye)}):de=[..._.sorters,{field:L.prop,order:P}],_.sorters=de}else _.sorters=[{field:L.prop,order:P}];D()}function N(){y.value=o.settings.operations(n)}function D(){p.value=!0;const L={..._,...n,...o.query,page:x.value,size:w.value};o.settings.rest.getList(L).then(P=>{B.value.data=[],m.value=P.data.rows,E.value=P.data.count,p.value=!1})}function R(L){x.value=L.page,w.value=L.size,D()}function Q(L){const P={id:L.id,enable:!L.enable};o.settings.rest.enable(P).then(()=>{D()})}function et(L){if(L.enable){const P=L.label==="上架"?"下架":"停用";ElMessageBox.confirm(`确定要${P}该条数据吗?`,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{Q(L)}).catch(()=>{})}else Q(L)}function ze(L){B.value=L}const V=e.ref(0),I=e.ref(0);Va(h,L=>{var P;V.value=((P=L[0])==null?void 0:P.contentRect.height)||0}),Va(b,L=>{var P;I.value=((P=L[0])==null?void 0:P.contentRect.height)||0});const K=e.computed(()=>`${V.value+I.value}px`);return N(),(L,P)=>(e.openBlock(),e.createElementBlock("div",{key:o.settings.code,style:{height:"100%"}},[e.createElementVNode("div",{ref_key:"pageHeader",ref:h},[e.createVNode(Yl,{settings:o.settings},{operations:e.withCtx(()=>[e.createVNode(yc,{settings:o.settings,"table-data-select":B.value,query:e.unref(n)},null,8,["settings","table-data-select","query"]),e.createVNode(_c,{settings:o.settings,operations:y.value},null,8,["settings","operations"])]),_:1},8,["settings"])],512),e.withDirectives((e.openBlock(),e.createBlock(gc,{class:"data-table-box",data:m.value,operations:y.value,settings:o.settings,"actions-width":o.settings.actionsWidth,onSortColumn:C,onEnableItem:et,onSelectChange:ze},e.createSlots({_:2},[o.settings.rowActions(e.unref(n)).length>0?{name:"actions",fn:e.withCtx(({row:de})=>[e.createVNode(Ea,{row:de,settings:o.settings,query:e.unref(n)},null,8,["row","settings","query"])]),key:"0"}:void 0]),1032,["data","operations","settings","actions-width"])),[[e.unref(k.vLoading),p.value]]),e.createElementVNode("div",{ref_key:"pagination",ref:b},[e.createVNode(wc,{page:x.value,size:w.value,total:E.value,onPageChange:R},null,8,["page","size","total"])],512)]))}},[["__scopeId","data-v-9a31cd72"]]),jc={key:1,class:"loading-wrapper"},Rc=M({__name:"List",setup(r){const t=G.useRoute(),n=t.meta.side,o=t.params.domain,s=e.shallowRef(null);return wn(n,o).then(a=>{s.value=a}),(a,i)=>s.value?(e.openBlock(),e.createBlock(Aa,{key:0,settings:s.value},null,8,["settings"])):e.withDirectives((e.openBlock(),e.createElementBlock("div",jc,null,512)),[[e.unref(k.vLoading),!0]])}},[["__scopeId","data-v-49ae0ff6"]]),Ic={key:0},Lc={class:"key"},Mc={class:"value"},Uc={key:1,class:"loading-wrapper"},Da=M({__name:"DomainDescription",props:{settings:{type:Object},query:{type:Object}},emits:["done"],setup(r,{emit:t}){const n=t,o=r,s=Ne(),{updated:a}=Ve.storeToRefs(s),i=e.shallowRef([]),c=e.ref(null),d=["image","images","attachments","attachment","editor","rich-text","textarea","text","json"];i.value=o.settings.fields.filter(y=>y.showInDetail());const f=e.computed(()=>i.value.find(y=>y.code===o.settings.coverField)),p=e.computed(()=>i.value.filter(y=>!d.includes(y.type))),m=e.computed(()=>{var h;const y=(h=f.value)==null?void 0:h.code;return i.value.filter(b=>d.includes(b.type)).filter(b=>b.code!==y)}),E=e.computed({get(){return m.value.map(y=>y.code)},set(y){}});function B(){o.settings.rest.getOne(o.query).then(y=>{y.data.isDeleted=!!y.data.deletedAt,c.value=y.data,n("done",y.data)})}return e.watch(a,()=>{B()},{immediate:!0}),(y,h)=>(e.openBlock(),e.createElementBlock("div",null,[c.value?(e.openBlock(),e.createElementBlock("div",Ic,[e.createVNode(e.unref(k.ElRow),{gutter:20},{default:e.withCtx(()=>[f.value?(e.openBlock(),e.createBlock(e.unref(k.ElCol),{key:0,span:6,style:{"margin-bottom":"20px"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f.value.display),{field:f.value,row:c.value},null,8,["field","row"]))]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(k.ElCol),{span:f.value?18:24},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElRow),{gutter:20},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,b=>(e.openBlock(),e.createBlock(e.unref(k.ElCol),{span:b.span,class:"mono-data",style:{"margin-bottom":"20px"}},{default:e.withCtx(()=>[e.createElementVNode("div",Lc,e.toDisplayString(b.label),1),e.createElementVNode("div",Mc,[b.code==="id"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(c.value.id),1)],64)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(b.display),{key:1,field:b,row:c.value,mode:"description"},null,8,["field","row"]))])]),_:2},1032,["span"]))),256))]),_:1})]),_:1},8,["span"])]),_:1}),m.value.length>0?(e.openBlock(),e.createBlock(e.unref(k.ElCollapse),{key:0,modelValue:E.value,"onUpdate:modelValue":h[0]||(h[0]=b=>E.value=b),class:"extend-fields"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,b=>(e.openBlock(),e.createBlock(e.unref(k.ElCollapseItem),{title:b.label,name:b.code,class:"mono-data"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(b.display),{field:b,row:c.value,mode:"extend"},null,8,["field","row"]))]),_:2},1032,["title","name"]))),256))]),_:1},8,["modelValue"])):e.createCommentVNode("",!0)])):e.withDirectives((e.openBlock(),e.createElementBlock("div",Uc,null,512)),[[e.unref(k.vLoading),!0]])]))}},[["__scopeId","data-v-27106b05"]]),zc={class:"data-page-title"},Hc={class:"title"},qc=M({__name:"DataDetailHeader",props:{data:{type:Object},settings:{type:Object},query:{type:Object}},emits:["get-item"],setup(r,{emit:t}){const n=En(),o=G.useRoute(),s=Z(o),a=r,i=e.ref("加载中..."),c=e.ref({});function d(p,m){const E=`${p}-${m}`;n.updateTitleByCode(E,i.value),document.title=i.value}function f(p){const m=a.settings;i.value=`${m.name}: ${m.formatName(p)}`,d(m.code,p.id)}return e.watch(()=>a.data,p=>{p&&(c.value=a.settings.operations(s),f(p))},{immediate:!0}),(p,m)=>(e.openBlock(),e.createElementBlock("div",zc,[e.createElementVNode("div",Hc,e.toDisplayString(i.value),1),e.createElementVNode("div",null,[a.data?(e.openBlock(),e.createBlock(e.unref(k.ElButtonGroup),{key:0},{default:e.withCtx(()=>[e.createVNode(Ea,{row:a.data,settings:a.settings,query:e.unref(s)},null,8,["row","settings","query"]),e.createVNode(Br,{row:a.data,settings:a.settings,operations:c.value,"is-detail":!0},null,8,["row","settings","operations"])]),_:1})):e.createCommentVNode("",!0)])]))}},[["__scopeId","data-v-b3976736"]]),Pc=M({__name:"DataDetailPage",props:{settings:{type:Object},associations:{type:Array}},setup(r){const t=G.useRouter(),n=G.useRoute(),o=Z(n),s=r,a=e.shallowRef([]),i=e.ref(""),c=e.shallowRef(null),d=e.ref(null),f=Ne();Ve.storeToRefs(f),a.value=s.settings.fields.filter(B=>B.showInDetail!==!1);function p(B){d.value=B}function m(B){i.value=B.props.name,t.push({name:`${n.meta.side}-association`,params:{association:B.props.name},query:o})}function E(B){if(s.associations.length>0)if(n.params.association){i.value=n.params.association;const y=s.associations.find(h=>h.domain===n.params.association);c.value={...y,domainData:d.value}}else i.value=s.associations[0].domain,c.value={...s.associations[0],domainData:d.value},B&&B()}return e.watch(d,()=>{E(()=>{t.replace({name:`${n.meta.side}-association`,params:{association:i.value},query:o})})},{immediate:!0}),e.watch(()=>n.params,()=>{d.value&&E()},{immediate:!0}),(B,y)=>{const h=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",{key:`${e.unref(n).params.domain}-${e.unref(n).params.id}`},[e.createVNode(qc,{data:d.value,settings:s.settings,query:{...e.unref(n).params,...e.unref(o)}},null,8,["data","settings","query"]),e.createVNode(Da,{query:{...e.unref(n).params,...e.unref(o)},settings:s.settings,onDone:p},null,8,["query","settings"]),e.createVNode(e.unref(k.ElTabs),{modelValue:i.value,"onUpdate:modelValue":y[0]||(y[0]=b=>i.value=b),class:"association-tabs",onTabClick:m},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.associations,b=>(e.openBlock(),e.createBlock(e.unref(k.ElTabPane),{label:b.name,name:b.domain},null,8,["label","name"]))),256))]),_:1},8,["modelValue"]),c.value?(e.openBlock(),e.createBlock(h,{key:c.value,association:c.value},null,8,["association"])):e.createCommentVNode("",!0)])}}},[["__scopeId","data-v-4881eb36"]]),Wc={key:1,class:"loading-wrapper"},Gc=M({__name:"Detail",setup(r){const t=G.useRoute(),n=t.meta.side,o=t.params.domain,s=e.shallowRef(null),a=e.shallowRef([]);wn(n,o).then(c=>{const d=c,f=i("has-many",d.hasMany),p=i("has-one",d.hasOne);s.value=d,a.value=f.concat(p)});function i(c,d){return(d||[]).map(f=>typeof f=="object"?{type:c,domain:f.code,name:f.name,query:f.query||(()=>({}))}:{type:c,domain:f,name:wr()[n][f].name,query:()=>({})})}return(c,d)=>s.value?(e.openBlock(),e.createBlock(Pc,{key:0,settings:s.value,associations:a.value},null,8,["settings","associations"])):e.withDirectives((e.openBlock(),e.createElementBlock("div",Wc,null,512)),[[e.unref(k.vLoading),!0]])}},[["__scopeId","data-v-7c232776"]]),Qc={key:0},vc={key:1,class:"loading-wrapper"},Jc=M({__name:"DetailTab",props:{association:{type:Object}},setup(r){const t=G.useRoute(),n=t.meta.side,o=Z(t),s=r,a=e.shallowRef(null);return e.watch(()=>t.params.association,()=>{wn(n,t.params.association).then(i=>{a.value={...s.association,settings:i}})},{immediate:!0}),(i,c)=>a.value&&s.association.domainData?(e.openBlock(),e.createElementBlock("div",Qc,[a.value.type==="has-many"?(e.openBlock(),e.createBlock(Aa,{key:`has-many-${a.value.domain}`,settings:a.value.settings,query:a.value.query(s.association.domainData)},null,8,["settings","query"])):a.value.type==="has-one"?(e.openBlock(),e.createBlock(Da,{key:`has-one-${a.value.domain}`,style:{"padding-top":"20px"},query:e.unref(o),settings:a.value.settings},null,8,["query","settings"])):e.createCommentVNode("",!0)])):e.withDirectives((e.openBlock(),e.createElementBlock("div",vc,null,512)),[[e.unref(k.vLoading),!0]])}},[["__scopeId","data-v-bb501ead"]]),Kc={key:0},Yc={class:"file-name"},Xc={class:"name"},Zc={class:"file-type"},ed={key:1},td=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref([]);function o(a){fetch(a.url).then(i=>i.blob()).then(i=>{const c=document.createElement("a");i.type=="application/x-rar-compressed"?c.href=a.url:c.href=URL.createObjectURL(i),c.download=a.name,document.body.appendChild(c),c.click()})}function s(a){return["jpg","jpeg","png","gif","webp","bmp","pdf"].includes(a)}return e.watch(()=>t.row,()=>{n.value=t.row[t.field.code].map(a=>{const i=a.url.substring(a.url.lastIndexOf(".")+1);return{...a,fileType:i,isPreview:s(i)}})},{immediate:!0}),(a,i)=>n.value.length>0?(e.openBlock(),e.createElementBlock("div",Kc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,c=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",Yc,[e.createVNode(e.unref(k.ElIcon),{color:"#73767a"},{default:e.withCtx(()=>[e.createVNode(e.unref(ma))]),_:1}),e.createElementVNode("span",Xc,e.toDisplayString(c.name),1),e.createElementVNode("span",Zc,"."+e.toDisplayString(c.fileType),1),e.createVNode(e.unref(k.ElIcon),{color:"#409eff",size:"16",onClick:d=>o(c)},{default:e.withCtx(()=>[e.createVNode(e.unref(nl))]),_:2},1032,["onClick"]),c.isPreview?(e.openBlock(),e.createBlock(e.unref(k.ElLink),{key:0,type:"primary",href:c.url,target:"_blank",underline:!1},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElIcon),{size:"16"},{default:e.withCtx(()=>[e.createVNode(e.unref(bl))]),_:1})]),_:2},1032,["href"])):e.createCommentVNode("",!0)])]))),256))])):(e.openBlock(),e.createElementBlock("div",ed,[e.createVNode(we)]))}},[["__scopeId","data-v-196b9bff"]]),nd={__name:"FieldEditor",props:{modelValue:Array,field:Object,domainConfig:Object,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(r,{emit:t}){const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>Mu)),o=t,s=r,a=e.reactive({value:s.modelValue});function i(p){a.value=a.value?[...a.value,p]:[p]}function c(p){const m=a.value.findIndex(E=>E.id===p.id);a.value.splice(m,1)}async function d(p){const m=s.domainConfig.rest;if(!/^[\u4e00-\u9fa5\w-_]+$/.test(p.name)){k.ElMessage({message:"请勿输入特殊字符!",type:"warning"});return}await m.updateFilesName(p).then(()=>{k.ElMessage({message:"附件名称已修改!",type:"success"})})}function f(p,m){if(m=="success"){i(p),o("update:modelValue",a.value);return}if(m=="remove"){c(p),o("update:modelValue",a.value);return}if(m=="change"){d(p);return}}return(p,m)=>(e.openBlock(),e.createBlock(e.unref(n),{pics:a.value,props:s.field.props?s.field.props:{},onOnSuccess:m[0]||(m[0]=E=>f(E,"success")),onOnRemove:m[1]||(m[1]=E=>f(E,"remove")),onOnChange:m[2]||(m[2]=E=>f(E,"change"))},null,8,["pics","props"]))}};class rd extends re{constructor(t,n){super(t,n),this.attachmentType=t.attachmentType,this.props=t.props,this.display=td,this.editor=nd,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const od=Object.freeze(Object.defineProperty({__proto__:null,default:rd},Symbol.toStringTag,{value:"Module"})),ad={key:3},sd=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=G.useRoute(),n=r,o=n.field.belongsTo,s=t.meta.side,a=n.row[n.field.code],i=e.computed(()=>({path:`/${s}/${o}/${a}`,query:{...Z(t),...n.field.rowQuery(n.row)}})),c=e.ref(!0),d=e.ref(!1),f=e.ref("");let p=null;const m=wn(s,o).then(h=>(p=h.formatName,Promise.resolve(h.rest)));function E(h){return n.field.isRouter(n.row,Z(t))&&!Z(t)[n.field.code]}function B(){m.then(h=>{c.value=!0;const b=n.row[n.field.code],_=n.row[gr(`${o}-name`)];if(!b){y(!1),c.value=!1;return}if(b&&_){y({id:b,name:_}),c.value=!1;return}const w={id:b};h.getOne(w).then(x=>{y(x.data),c.value=!1}).catch(x=>{console.log(x)})})}function y(h){if(d.value=!1,n.field.showName){sa(n.field.domain,n.field.code,"showName 即将废弃,请使用 formatter"),f.value=h[n.field.showName];return}if(n.field.formatter){f.value=n.field.formatter(h);return}if(h.id&&h.name){f.value=h.name;return}if(!h){d.value=!0;return}f.value=p(h)}return e.watch(()=>n.row,B,{immediate:!0}),(h,b)=>{const _=e.resolveComponent("RouterLink");return e.openBlock(),e.createElementBlock("span",null,[c.value?(e.openBlock(),e.createBlock(e.unref(k.ElIcon),{key:0,class:"loading"},{default:e.withCtx(()=>[e.createVNode(e.unref(ga))]),_:1})):d.value?(e.openBlock(),e.createBlock(we,{key:1})):E(r.row)?(e.openBlock(),e.createBlock(_,{key:2,class:"bld-link mono-data",to:i.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.value),1)]),_:1},8,["to"])):(e.openBlock(),e.createElementBlock("div",ad,e.toDisplayString(f.value),1))])}}},[["__scopeId","data-v-d0fdf31e"]]),id={__name:"FieldEditor",props:{modelValue:Number,field:Object,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(r,{emit:t}){const n=G.useRoute(),o=Z(n),s=t,a=r,i=e.reactive({value:a.modelValue}),c=e.ref([]);async function d(p){c.value=await a.field.options(a.formData,o,p)}function f(){s("update:modelValue",i.value)}return e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),d(),(p,m)=>(e.openBlock(),e.createBlock(e.unref(k.ElSelect),{modelValue:i.value,"onUpdate:modelValue":m[0]||(m[0]=E=>i.value=E),style:{width:"100%"},filterable:"","reserve-keyword":"","remote-show-suffix":"",clearable:"","fit-input-width":"",multiple:a.field.multiple,disabled:a.disabled,placeholder:"",remote:"","remote-method":d,onChange:f},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,E=>(e.openBlock(),e.createBlock(e.unref(k.ElOption),{key:E.code,label:E.name,value:E.code,title:E.name,disabled:E.disabled},null,8,["label","value","title","disabled"]))),128))]),_:1},8,["modelValue","multiple","disabled"]))}};class ld extends re{constructor(t,n){super(t,n),this.belongsTo=t.belongsTo,this.formChange=t.formChange||(()=>{}),this.isRouter=this.isRouter(t),this.options=t.options||(()=>[{code:0,name:"未实现"}]),this.display=sd,this.editor=id,this.showName=t.showName,this.formatter=t.formatter,this.rowQuery=t.rowQuery||(()=>({})),this.checkValidProperties(t)}isRouter(t){const n=t.isRouter;if(typeof n=="boolean")return()=>n;if(typeof n=="function")return n;if(typeof n>"u")return()=>!0;throw new Exception(`invalid isRouter : ${n}`)}}const cd=Object.freeze(Object.defineProperty({__proto__:null,default:ld},Symbol.toStringTag,{value:"Module"})),dd={style:{display:"flex","align-items":"center"}},ud={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.computed(()=>t.row[t.field.code]);return(o,s)=>(e.openBlock(),e.createElementBlock("span",dd,[n.value==!0?(e.openBlock(),e.createBlock(e.unref(k.ElIcon),{key:0,color:"#529b2e",size:20},{default:e.withCtx(()=>[e.createVNode(e.unref(_l))]),_:1})):n.value==!1?(e.openBlock(),e.createBlock(e.unref(k.ElIcon),{key:1,color:"#F56C6C",size:20},{default:e.withCtx(()=>[e.createVNode(e.unref(Qi))]),_:1})):(e.openBlock(),e.createBlock(e.unref(k.ElIcon),{key:2,color:"#73767a",size:20},{default:e.withCtx(()=>[e.createVNode(e.unref(pl))]),_:1}))]))}},fd={__name:"FieldEditor",props:{modelValue:Boolean,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive({value:o.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>o.modelValue,()=>{s.value=o.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(k.ElSwitch),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),disabled:o.disabled,onChange:a},null,8,["modelValue","disabled"]))}};class pd extends re{constructor(t,n){super(t,n),this.default=t.default||!1,this.display=ud,this.editor=fd,this.checkValidProperties(t)}}const hd=Object.freeze(Object.defineProperty({__proto__:null,default:pd},Symbol.toStringTag,{value:"Module"})),md={key:0},gd={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref(!1),o=e.ref("..."),s=t.row[t.field.code];return s==null||`${s}`.trim()===""?n.value=!0:(o.value=s,n.value=!1),(a,i)=>(e.openBlock(),e.createElementBlock("div",null,[n.value?(e.openBlock(),e.createBlock(we,{key:1})):(e.openBlock(),e.createElementBlock("span",md,e.toDisplayString(o.value),1)),e.createTextVNode(" edit ")]))}},_d={__name:"FieldEditor",props:{modelValue:Array,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive({value:o.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>o.modelValue,()=>{s.value=o.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(k.ElCascader),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),props:o.field.props,clearable:"",style:{width:"100%"},onChange:a},null,8,["modelValue","props"]))}};class yd extends re{constructor(t,n){super(t,n),this.props=t.props||(()=>{}),this.formChange=t.formChange||(()=>{}),this.display=gd,this.editor=_d,this.multiple=this.defaultBy(t.multiple,!1),this.checkValidProperties(t)}}const bd=Object.freeze(Object.defineProperty({__proto__:null,default:yd},Symbol.toStringTag,{value:"Module"}));class wd extends re{constructor(t,n){super(t,n),this.component=t.component,this.display=t.component,this.editor=t.component,this.checkValidProperties(t)}}const kd=Object.freeze(Object.defineProperty({__proto__:null,default:wd},Symbol.toStringTag,{value:"Module"})),Ed={key:0},xd={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref(!1),o=e.ref("..."),s=t.row[t.field.code];return s==null||`${s}`.trim()===""?n.value=!0:(o.value=s,n.value=!1),(a,i)=>n.value?(e.openBlock(),e.createBlock(we,{key:1})):(e.openBlock(),e.createElementBlock("span",Ed,e.toDisplayString(o.value),1))}},Bd={__name:"FieldEditor",props:{modelValue:String,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive({value:o.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>o.modelValue,()=>{s.value=o.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(k.ElDatePicker),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),disabled:o.disabled,type:"datetime",format:"YYYY-MM-DD HH:mm:ss","value-format":"YYYY-MM-DD HH:mm:ss",onChange:a},null,8,["modelValue","disabled"]))}};class Sd extends re{constructor(t,n){super(t,n),this.display=xd,this.editor=Bd,this.width=this.computeWidth(t),this.checkValidProperties(t)}computeWidth(t){return t.width?t.width:200}}const Cd=Object.freeze(Object.defineProperty({__proto__:null,default:Sd},Symbol.toStringTag,{value:"Module"})),$d=r=>(e.pushScopeId("data-v-35bc9ffb"),r=r(),e.popScopeId(),r),Vd={class:"loading-error"},Od=$d(()=>e.createElementVNode("div",null,"加载失败",-1)),Td=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object},mode:{type:String}},setup(r){const t=r,n=e.ref(null),o=e.ref([]);return e.watch(()=>t.row,()=>{n.value=t.row[t.field.code],o.value=[t.row[t.field.code]]},{immediate:!0}),(s,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`image-card ${t.mode}`)},[e.createVNode(e.unref(k.ElImage),{src:n.value,"preview-teleported":"",fit:"contain","preview-src-list":o.value,class:"image"},{error:e.withCtx(()=>[e.createElementVNode("div",Vd,[Od,e.createElementVNode("div",null,e.toDisplayString(n.value),1)])]),_:1},8,["src","preview-src-list"])],2))}},[["__scopeId","data-v-35bc9ffb"]]),Nd={__name:"FieldEditor",props:{modelValue:String,field:Object,type:String,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>zu)),o=t,s=r,a=e.reactive({value:s.modelValue});function i(c){o("update:modelValue",c)}return e.watch(()=>s.modelValue,async()=>{a.value=s.modelValue},{immediate:!0}),(c,d)=>(e.openBlock(),e.createBlock(e.unref(n),{"image-url":a.value,disabled:s.disabled,onOnSuccess:i},null,8,["image-url","disabled"]))}};class Ad extends re{constructor(t,n){super(t,n),this.display=Td,this.editor=Nd,this.checkValidProperties(t)}}const Dd=Object.freeze(Object.defineProperty({__proto__:null,default:Ad},Symbol.toStringTag,{value:"Module"})),Fd=r=>(e.pushScopeId("data-v-4cb2ce7b"),r=r(),e.popScopeId(),r),jd={class:"image-card",style:{"margin-bottom":"20px"}},Rd={class:"loading-error"},Id=Fd(()=>e.createElementVNode("div",null,"图片加载失败",-1)),Ld=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref(null),o=e.ref([]);return e.watch(()=>t.row,()=>{const s=t.row[t.field.code];s&&(o.value=s.map(a=>a.url),n.value=o.value[0])},{immediate:!0}),(s,a)=>t.row[t.field.code].length>0?(e.openBlock(),e.createBlock(e.unref(k.ElSpace),{key:0,wrap:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.row[t.field.code],i=>(e.openBlock(),e.createElementBlock("div",jd,[e.createVNode(e.unref(k.ElImage),{src:i.url,fit:"contain","preview-src-list":o.value,class:"image"},{error:e.withCtx(()=>[e.createElementVNode("div",Rd,[Id,e.createElementVNode("div",null,e.toDisplayString(n.value),1)])]),_:2},1032,["src","preview-src-list"])]))),256))]),_:1})):(e.openBlock(),e.createBlock(we,{key:1}))}},[["__scopeId","data-v-4cb2ce7b"]]);class Md extends re{constructor(t,n){super(t,n),this.props=t.props,this.display=Ld,this.editor=fa,this.converter=this.defaultBy(t.converter,o=>o),this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const Ud=Object.freeze(Object.defineProperty({__proto__:null,default:Md},Symbol.toStringTag,{value:"Module"})),zd={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=e.defineAsyncComponent(()=>import("json-editor-vue")),n=r,o=e.ref(!1),s=e.ref("加载中...");return e.watch(()=>n.row,()=>{o.value=!1;const a=n.row[n.field.code];a!=null&&`${a}`.trim()!==""&&(o.value=!0,s.value=a)},{immediate:!0}),(a,i)=>o.value?(e.openBlock(),e.createBlock(e.unref(t),{key:0,modelValue:s.value,"onUpdate:modelValue":i[0]||(i[0]=c=>s.value=c),mode:"text","main-menu-bar":!1,"navigation-bar":!1,"read-only":!0},null,8,["modelValue"])):(e.openBlock(),e.createBlock(we,{key:1}))}},Hd={__name:"FieldEditor",props:{modelValue:Object,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=e.defineAsyncComponent(()=>import("json-editor-vue")),o=t,s=r,a=e.reactive({value:s.modelValue});function i(c){a.value=c.text,o("update:modelValue",a.value)}return e.watch(()=>s.modelValue,()=>{a.value=s.modelValue},{immediate:!0}),(c,d)=>(e.openBlock(),e.createBlock(e.unref(n),{modelValue:a.value,"onUpdate:modelValue":d[0]||(d[0]=f=>a.value=f),style:{width:"100%",height:"300px"},mode:"text","main-menu-bar":!1,"navigation-bar":!1,onChange:i},null,8,["modelValue"]))}};class qd extends re{constructor(t,n){super(t,n),this.display=zd,this.editor=Hd,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const Pd=Object.freeze(Object.defineProperty({__proto__:null,default:qd},Symbol.toStringTag,{value:"Module"})),Wd={class:"editor-field"},Gd=["innerHTML"],Qd=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r;return(n,o)=>(e.openBlock(),e.createElementBlock("div",Wd,[e.createElementVNode("div",{class:"content",innerHTML:t.row[t.field.code]},null,8,Gd)]))}},[["__scopeId","data-v-02b50564"]]),vd={style:{width:"100%"}},Jd={__name:"FieldEditor",props:{modelValue:String,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>rf)),o=t,s=r,a=e.reactive({value:s.modelValue});return e.watch(()=>a.value,()=>{o("update:modelValue",a.value)}),(i,c)=>(e.openBlock(),e.createElementBlock("div",vd,[e.createVNode(e.unref(n),{content:a.value,"onUpdate:content":c[0]||(c[0]=d=>a.value=d)},null,8,["content"])]))}};class Kd extends re{constructor(t,n){super(t,n),this.display=Qd,this.editor=Jd,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const Yd=Object.freeze(Object.defineProperty({__proto__:null,default:Kd},Symbol.toStringTag,{value:"Module"}));class Xd extends re{constructor(t,n){super(t,n),this.editable=()=>!1,this.isRouter=this.isRouter(t),this.rowQuery=t.rowQuery||(()=>({})),this.display=wa,this.fixed=!0,this.checkValidProperties(t)}isRouter(t){const n=t.isRouter;if(typeof n=="boolean")return()=>n;if(typeof n=="function")return n;if(typeof n>"u")return()=>!0;throw new Exception(`invalid isRouter : ${n}`)}}const Zd=Object.freeze(Object.defineProperty({__proto__:null,default:Xd},Symbol.toStringTag,{value:"Module"}));var F=function(r,t,n){if(!t.has(r))throw new TypeError("attempted to set private field on non-instance");return t.set(r,n),n},O=function(r,t){if(!t.has(r))throw new TypeError("attempted to get private field on non-instance");return t.get(r)},Ye,at,ke,yt,Mt,Ae,De,Fe,je,Re,Ie,Le,Me,st,bt,Xe,xn,Ze;const eu=function(r){var t=131,n=137,o=0;r+="x";var s=Math.floor(9007199254740991/n);for(let a=0;a<r.length;a++)o>s&&(o=Math.floor(o/n)),o=o*t+r.charCodeAt(a);return o},T="0123456789abcdef".split(""),tu=[-2147483648,8388608,32768,128],Ee=[24,16,8,0],Bn=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],te=[];class nu{constructor(t=!1,n=!1){Ye.set(this,void 0),at.set(this,void 0),ke.set(this,void 0),yt.set(this,void 0),Mt.set(this,void 0),Ae.set(this,void 0),De.set(this,void 0),Fe.set(this,void 0),je.set(this,void 0),Re.set(this,void 0),Ie.set(this,void 0),Le.set(this,void 0),Me.set(this,void 0),st.set(this,void 0),bt.set(this,void 0),Xe.set(this,void 0),xn.set(this,0),Ze.set(this,void 0),this.init(t,n)}init(t,n){n?(te[0]=te[16]=te[1]=te[2]=te[3]=te[4]=te[5]=te[6]=te[7]=te[8]=te[9]=te[10]=te[11]=te[12]=te[13]=te[14]=te[15]=0,F(this,at,te)):F(this,at,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),t?(F(this,Ae,3238371032),F(this,De,914150663),F(this,Fe,812702999),F(this,je,4144912697),F(this,Re,4290775857),F(this,Ie,1750603025),F(this,Le,1694076839),F(this,Me,3204075428)):(F(this,Ae,1779033703),F(this,De,3144134277),F(this,Fe,1013904242),F(this,je,2773480762),F(this,Re,1359893119),F(this,Ie,2600822924),F(this,Le,528734635),F(this,Me,1541459225)),F(this,Ye,F(this,Ze,F(this,ke,F(this,bt,0)))),F(this,yt,F(this,st,!1)),F(this,Mt,!0),F(this,Xe,t)}update(t){if(O(this,yt))return this;let n;t instanceof ArrayBuffer?n=new Uint8Array(t):n=t;let o=0;const s=n.length,a=O(this,at);for(;o<s;){let i;if(O(this,st)&&(F(this,st,!1),a[0]=O(this,Ye),a[16]=a[1]=a[2]=a[3]=a[4]=a[5]=a[6]=a[7]=a[8]=a[9]=a[10]=a[11]=a[12]=a[13]=a[14]=a[15]=0),typeof n!="string")for(i=O(this,Ze);o<s&&i<64;++o)a[i>>2]|=n[o]<<Ee[i++&3];else for(i=O(this,Ze);o<s&&i<64;++o){let c=n.charCodeAt(o);c<128?a[i>>2]|=c<<Ee[i++&3]:c<2048?(a[i>>2]|=(192|c>>6)<<Ee[i++&3],a[i>>2]|=(128|c&63)<<Ee[i++&3]):c<55296||c>=57344?(a[i>>2]|=(224|c>>12)<<Ee[i++&3],a[i>>2]|=(128|c>>6&63)<<Ee[i++&3],a[i>>2]|=(128|c&63)<<Ee[i++&3]):(c=65536+((c&1023)<<10|n.charCodeAt(++o)&1023),a[i>>2]|=(240|c>>18)<<Ee[i++&3],a[i>>2]|=(128|c>>12&63)<<Ee[i++&3],a[i>>2]|=(128|c>>6&63)<<Ee[i++&3],a[i>>2]|=(128|c&63)<<Ee[i++&3])}F(this,xn,i),F(this,ke,O(this,ke)+(i-O(this,Ze))),i>=64?(F(this,Ye,a[16]),F(this,Ze,i-64),this.hash(),F(this,st,!0)):F(this,Ze,i)}return O(this,ke)>4294967295&&(F(this,bt,O(this,bt)+(O(this,ke)/4294967296<<0)),F(this,ke,O(this,ke)%4294967296)),this}finalize(){if(O(this,yt))return;F(this,yt,!0);const t=O(this,at),n=O(this,xn);t[16]=O(this,Ye),t[n>>2]|=tu[n&3],F(this,Ye,t[16]),n>=56&&(O(this,st)||this.hash(),t[0]=O(this,Ye),t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=O(this,bt)<<3|O(this,ke)>>>29,t[15]=O(this,ke)<<3,this.hash()}hash(){let t=O(this,Ae),n=O(this,De),o=O(this,Fe),s=O(this,je),a=O(this,Re),i=O(this,Ie),c=O(this,Le),d=O(this,Me);const f=O(this,at);let p,m,E,B,y,h,b,_,w,x;for(let C=16;C<64;++C)B=f[C-15],p=(B>>>7|B<<25)^(B>>>18|B<<14)^B>>>3,B=f[C-2],m=(B>>>17|B<<15)^(B>>>19|B<<13)^B>>>10,f[C]=f[C-16]+p+f[C-7]+m<<0;x=n&o;for(let C=0;C<64;C+=4)O(this,Mt)?(O(this,Xe)?(b=300032,B=f[0]-1413257819,d=B-150054599<<0,s=B+24177077<<0):(b=704751109,B=f[0]-210244248,d=B-1521486534<<0,s=B+143694565<<0),F(this,Mt,!1)):(p=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),m=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),b=t&n,E=b^t&o^x,h=a&i^~a&c,B=d+m+h+Bn[C]+f[C],y=p+E,d=s+B<<0,s=B+y<<0),p=(s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10),m=(d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7),_=s&t,E=_^s&n^b,h=d&a^~d&i,B=c+m+h+Bn[C+1]+f[C+1],y=p+E,c=o+B<<0,o=B+y<<0,p=(o>>>2|o<<30)^(o>>>13|o<<19)^(o>>>22|o<<10),m=(c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7),w=o&s,E=w^o&t^_,h=c&d^~c&a,B=i+m+h+Bn[C+2]+f[C+2],y=p+E,i=n+B<<0,n=B+y<<0,p=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),m=(i>>>6|i<<26)^(i>>>11|i<<21)^(i>>>25|i<<7),x=n&o,E=x^n&s^w,h=i&c^~i&d,B=a+m+h+Bn[C+3]+f[C+3],y=p+E,a=t+B<<0,t=B+y<<0;F(this,Ae,O(this,Ae)+t<<0),F(this,De,O(this,De)+n<<0),F(this,Fe,O(this,Fe)+o<<0),F(this,je,O(this,je)+s<<0),F(this,Re,O(this,Re)+a<<0),F(this,Ie,O(this,Ie)+i<<0),F(this,Le,O(this,Le)+c<<0),F(this,Me,O(this,Me)+d<<0)}hex(){this.finalize();const t=O(this,Ae),n=O(this,De),o=O(this,Fe),s=O(this,je),a=O(this,Re),i=O(this,Ie),c=O(this,Le),d=O(this,Me);let f=T[t>>28&15]+T[t>>24&15]+T[t>>20&15]+T[t>>16&15]+T[t>>12&15]+T[t>>8&15]+T[t>>4&15]+T[t&15]+T[n>>28&15]+T[n>>24&15]+T[n>>20&15]+T[n>>16&15]+T[n>>12&15]+T[n>>8&15]+T[n>>4&15]+T[n&15]+T[o>>28&15]+T[o>>24&15]+T[o>>20&15]+T[o>>16&15]+T[o>>12&15]+T[o>>8&15]+T[o>>4&15]+T[o&15]+T[s>>28&15]+T[s>>24&15]+T[s>>20&15]+T[s>>16&15]+T[s>>12&15]+T[s>>8&15]+T[s>>4&15]+T[s&15]+T[a>>28&15]+T[a>>24&15]+T[a>>20&15]+T[a>>16&15]+T[a>>12&15]+T[a>>8&15]+T[a>>4&15]+T[a&15]+T[i>>28&15]+T[i>>24&15]+T[i>>20&15]+T[i>>16&15]+T[i>>12&15]+T[i>>8&15]+T[i>>4&15]+T[i&15]+T[c>>28&15]+T[c>>24&15]+T[c>>20&15]+T[c>>16&15]+T[c>>12&15]+T[c>>8&15]+T[c>>4&15]+T[c&15];return O(this,Xe)||(f+=T[d>>28&15]+T[d>>24&15]+T[d>>20&15]+T[d>>16&15]+T[d>>12&15]+T[d>>8&15]+T[d>>4&15]+T[d&15]),f}toString(){return this.hex()}digest(){this.finalize();const t=O(this,Ae),n=O(this,De),o=O(this,Fe),s=O(this,je),a=O(this,Re),i=O(this,Ie),c=O(this,Le),d=O(this,Me),f=[t>>24&255,t>>16&255,t>>8&255,t&255,n>>24&255,n>>16&255,n>>8&255,n&255,o>>24&255,o>>16&255,o>>8&255,o&255,s>>24&255,s>>16&255,s>>8&255,s&255,a>>24&255,a>>16&255,a>>8&255,a&255,i>>24&255,i>>16&255,i>>8&255,i&255,c>>24&255,c>>16&255,c>>8&255,c&255];return O(this,Xe)||f.push(d>>24&255,d>>16&255,d>>8&255,d&255),f}array(){return this.digest()}arrayBuffer(){this.finalize();const t=new ArrayBuffer(O(this,Xe)?28:32),n=new DataView(t);return n.setUint32(0,O(this,Ae)),n.setUint32(4,O(this,De)),n.setUint32(8,O(this,Fe)),n.setUint32(12,O(this,je)),n.setUint32(16,O(this,Re)),n.setUint32(20,O(this,Ie)),n.setUint32(24,O(this,Le)),O(this,Xe)||n.setUint32(28,O(this,Me)),t}}Ye=new WeakMap,at=new WeakMap,ke=new WeakMap,yt=new WeakMap,Mt=new WeakMap,Ae=new WeakMap,De=new WeakMap,Fe=new WeakMap,je=new WeakMap,Re=new WeakMap,Ie=new WeakMap,Le=new WeakMap,Me=new WeakMap,st=new WeakMap,bt=new WeakMap,Xe=new WeakMap,xn=new WeakMap,Ze=new WeakMap;function ru(r){const t=new nu;return t.update(r),parseInt(t.hex().substring(0,8),16)}const ou=function(r){var t="#";return r.forEach(function(n){n<16&&(t+=0),t+=n.toString(16)}),t},au=function(r,t,n){r/=360;var o=n<.5?n*(1+t):n+t-n*t,s=2*n-o;return[r+1/3,r,r-1/3].map(function(a){return a<0&&a++,a>1&&a--,a<1/6?a=s+(o-s)*6*a:a<.5?a=o:a<2/3?a=s+(o-s)*6*(2/3-a):a=s,Math.round(a*255)})};class su{constructor(t={}){const[n,o]=[t.lightness,t.saturation].map(function(s){return s=s!==void 0?s:[.35,.5,.65],Array.isArray(s)?s.concat():[s]});this.L=n,this.S=o,typeof t.hue=="number"&&(t.hue={min:t.hue,max:t.hue}),typeof t.hue=="object"&&!Array.isArray(t.hue)&&(t.hue=[t.hue]),typeof t.hue>"u"&&(t.hue=[]),this.hueRanges=t.hue.map(function(s){return{min:typeof s.min>"u"?0:s.min,max:typeof s.max>"u"?360:s.max}}),this.hash=ru,typeof t.hash=="function"&&(this.hash=t.hash),t.hash==="bkdr"&&(this.hash=eu)}hsl(t){var n,o,s,a=this.hash(t),i=727;if(this.hueRanges.length){const c=this.hueRanges[a%this.hueRanges.length];n=a/this.hueRanges.length%i*(c.max-c.min)/i+c.min}else n=a%359;return a=Math.ceil(a/360),o=this.S[a%this.S.length],a=Math.ceil(a/this.S.length),s=this.L[a%this.L.length],[n,o,s]}rgb(t){var n=this.hsl(t);return au.apply(this,n)}hex(t){var n=this.rgb(t);return ou(n)}}const iu=new su;function lu(r){const t=iu.hex(`abc${r}cba`);return cu(t.replace("#",""),-20)}function cu(r,t){let n=parseInt(r.substring(1,3),16),o=parseInt(r.substring(3,5),16),s=parseInt(r.substring(5,7),16);n=parseInt(n*(100+t)/100),o=parseInt(o*(100+t)/100),s=parseInt(s*(100+t)/100),n=n<255?n:255,o=o<255?o:255,s=s<255?s:255,n=Math.round(n),o=Math.round(o),s=Math.round(s);const a=n.toString(16).length==1?"0"+n.toString(16):n.toString(16),i=o.toString(16).length==1?"0"+o.toString(16):o.toString(16),c=s.toString(16).length==1?"0"+s.toString(16):s.toString(16);return"#"+a+i+c}const Fa={strToHexColor:lu},du={key:0,class:"select-fields"},uu=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref("..."),o=e.ref(!1),s=e.ref([]);async function a(){const i=t.row[t.field.code];if(t.field.label,i==null){n.value="<无>",o.value=!1;return}const c=await t.field.options();if(!c){n.value=`<未知: ${i}>`,o.value=!1;return}let d=[];if(t.field.multiple?d=c.filter(f=>i.includes(f.code)):d=c.filter(f=>i===f.code),d.length===0){n.value=`<未找到: ${i}>`,o.value=!1;return}s.value=d.map(f=>({bgColor:Fa.strToHexColor(`${f.code}-${f.name}`),code:f.code,name:f.name})),o.value=!0}return e.watch(()=>t.row,a,{immediate:!0}),(i,c)=>o.value?(e.openBlock(),e.createElementBlock("div",du,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,d=>(e.openBlock(),e.createBlock(e.unref(k.ElTooltip),{content:`${d.code}`,placement:"top"},{default:e.withCtx(()=>[e.createElementVNode("span",{class:"select-field found",style:e.normalizeStyle(`background: ${d.bgColor}`)},e.toDisplayString(d.name),5)]),_:2},1032,["content"]))),256))])):(e.openBlock(),e.createBlock(we,{key:1,text:n.value},null,8,["text"]))}},[["__scopeId","data-v-0f1a01e9"]]),fu={__name:"FieldEditor",props:{modelValue:[String,Number,Array],field:Object,type:String,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(r,{emit:t}){const n=G.useRoute(),o=Z(n),s=t,a=r,i=e.reactive({value:a.modelValue}),c=e.ref([]);async function d(p){c.value=await a.field.options(a.formData,o,p)}function f(){s("update:modelValue",i.value)}return e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),d(),(p,m)=>(e.openBlock(),e.createBlock(e.unref(k.ElSelect),{modelValue:i.value,"onUpdate:modelValue":m[0]||(m[0]=E=>i.value=E),style:{width:"100%"},filterable:"","reserve-keyword":"","remote-show-suffix":"",clearable:"","fit-input-width":"",multiple:a.field.multiple,disabled:a.disabled,placeholder:"",remote:"","remote-method":d,onChange:f},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,E=>(e.openBlock(),e.createBlock(e.unref(k.ElOption),{key:E.code,label:E.name,value:E.code,title:E.name,disabled:E.disabled},null,8,["label","value","title","disabled"]))),128))]),_:1},8,["modelValue","multiple","disabled"]))}};class pu extends re{constructor(t,n){super(t,n),this.options=t.options||(()=>[{code:0,name:"未实现"}]),this.formChange=t.formChange||(()=>{}),this.display=uu,this.editor=fu,this.multiple=this.defaultBy(t.multiple,!1),this.checkValidProperties(t)}}const hu=Object.freeze(Object.defineProperty({__proto__:null,default:pu},Symbol.toStringTag,{value:"Module"})),mu={key:0},gu={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref(!1),o=e.ref("..."),s=t.row[t.field.code];return s==null||`${s}`.trim()===""?n.value=!0:(o.value=s,n.value=!1),(a,i)=>n.value?(e.openBlock(),e.createBlock(we,{key:1})):(e.openBlock(),e.createElementBlock("span",mu,e.toDisplayString(o.value),1))}},_u={__name:"FieldEditor",props:{modelValue:[Object,String,Number],field:Object,type:String,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive({value:o.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>o.modelValue,()=>{s.value=o.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(k.ElInput),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),type:r.field.type,clearable:"",disabled:o.disabled,onInput:a},null,8,["modelValue","type","disabled"]))}};class yu extends re{constructor(t,n){super(t,n),this.display=gu,this.editor=_u,this.checkValidProperties(t)}}const bu=Object.freeze(Object.defineProperty({__proto__:null,default:yu},Symbol.toStringTag,{value:"Module"})),wu={style:{display:"flex","align-items":"center"}},ku={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},emits:["enable"],setup(r,{emit:t}){const n=t,o=r,s=e.ref(o.row.deletedAt);function a(c,d){return c.label=d,new Promise((f,p)=>{n("enable",c)})}const i=e.computed(()=>o.row[o.field.code]);return(c,d)=>(e.openBlock(),e.createElementBlock("span",wu,[e.createVNode(e.unref(k.ElSwitch),{modelValue:i.value,"onUpdate:modelValue":d[0]||(d[0]=f=>i.value=f),size:"small",disabled:!!s.value,"before-change":f=>a(r.row,r.field.label)},null,8,["modelValue","disabled","before-change"])]))}},Eu={__name:"FieldEditor",props:{modelValue:Boolean,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive({value:o.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>o.modelValue,()=>{s.value=o.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(k.ElSwitch),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),disabled:o.disabled,onChange:a},null,8,["modelValue","disabled"]))}};class xu extends re{constructor(t,n){super(t,n),this.default=t.default||!1,this.display=ku,this.editor=Eu,this.checkValidProperties(t)}}const Bu=Object.freeze(Object.defineProperty({__proto__:null,default:xu},Symbol.toStringTag,{value:"Module"})),Su={key:0},Cu={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref(!1),o=e.ref("..."),s=t.row[t.field.code];return s==null||`${s}`.trim()===""?n.value=!0:(o.value=s,n.value=!1),(a,i)=>n.value?(e.openBlock(),e.createBlock(we,{key:1})):(e.openBlock(),e.createElementBlock("span",Su,e.toDisplayString(o.value),1))}},$u={__name:"FieldEditor",props:{modelValue:String,field:Object,type:String,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive({value:o.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>o.modelValue,()=>{s.value=o.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(k.ElInput),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),type:"textarea",rows:"5",clearable:"",disabled:o.disabled,onInput:a},null,8,["modelValue","disabled"]))}};class Vu extends re{constructor(t,n){super(t,n),this.display=Cu,this.editor=$u,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const Ou=Object.freeze(Object.defineProperty({__proto__:null,default:Vu},Symbol.toStringTag,{value:"Module"})),Tu={key:0,class:"select-fields"},Nu=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref("..."),o=e.ref(!1),s=e.ref([]);async function a(){const i=t.row[t.field.code],c=t.field.label;if(i==null){n.value="<无>",o.value=!1;return}const d=await t.field.options();if(!d){n.value=`<未知: ${c}>`,o.value=!1;return}let f=[];if(t.field.multiple?f=d.filter(p=>i.includes(p.code)):f=d.filter(p=>i===p.code),f.length===0){n.value=`<未找到: ${i}>`,o.value=!1;return}s.value=f.map(p=>({bgColor:Fa.strToHexColor(`${p.code}-${p.name}`),code:p.code,name:p.name})),o.value=!0}return e.watch(()=>t.row,a,{immediate:!0}),(i,c)=>{const d=e.resolveComponent("el-tooltip");return o.value?(e.openBlock(),e.createElementBlock("div",Tu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,f=>(e.openBlock(),e.createBlock(d,{content:`${f.code}`,placement:"top"},{default:e.withCtx(()=>[e.createElementVNode("span",{class:"select-field found",style:e.normalizeStyle(`background: ${f.bgColor}`)},e.toDisplayString(f.name),5)]),_:2},1032,["content"]))),256))])):(e.openBlock(),e.createBlock(we,{key:1,text:n.value},null,8,["text"]))}}},[["__scopeId","data-v-ed986acf"]]),Au={__name:"FieldEditor",props:{modelValue:Number,field:Object,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(r,{emit:t}){const n=G.useRoute(),o=Z(n),s=t,a=r,i=e.reactive({value:a.modelValue}),c=e.ref([]),d={label:"name",children:"children",value:"id"};async function f(m){c.value=await a.field.options(a.formData,o,m)}function p(){s("update:modelValue",i.value)}return e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),f(),(m,E)=>(e.openBlock(),e.createBlock(e.unref(k.ElTreeSelect),{modelValue:i.value,"onUpdate:modelValue":E[0]||(E[0]=B=>i.value=B),style:{width:"100%"},data:c.value,props:d,"node-key":"id",multiple:a.field.multiple,"render-after-expand":!1,"show-checkbox":"","check-on-click-node":"","expand-on-click-node":!1,"default-expand-all":"","highlight-current":"",disabled:a.field.disabled,"check-strictly":!0,remote:"",filterable:"","remote-method":f,onCheck:p},null,8,["modelValue","data","multiple","disabled"]))}};class Du extends re{constructor(t,n){super(t,n),this.options=t.options||(()=>[]),this.formChange=t.formChange||(()=>{}),this.multiple=this.defaultBy(t.multiple,!1),this.display=Nu,this.editor=Au,this.checkValidProperties(t)}}const Fu=Object.freeze(Object.defineProperty({__proto__:null,default:Du},Symbol.toStringTag,{value:"Module"})),ju=["src"],Ru=Object.freeze(Object.defineProperty({__proto__:null,default:M({__name:"ImagesUploader",props:{images:{type:Array,default(){return[]}},limit:{type:Number},props:{type:Object,default(){return{listType:"picture-card",limit:5,accept:"image/*"}}}},emits:["on-remove","on-upload"],setup(r,{emit:t}){const n=t,o=e.ref(""),s=e.ref(!1),a=r,i=e.computed(()=>a.images.map(E=>{if(!(E!=null&&E.url))return{...E,name:"unknown",fileType:"unknown"};const B=E.url.substring(E.url.lastIndexOf(".")+1),y=E.url.split("/");return{...E,name:y[y.length-1],fileType:B}}));function c(E){n("on-remove",E)}function d(){k.ElMessage({message:`最多只能上传 ${a.props.limit} 个文件!`,type:"warning"})}function f(E){o.value=E.url,s.value=!0}function p(E){return E.size>5242880?(k.ElMessage({message:"上传大小不能超过 5MB!",type:"warning"}),!1):!0}function m(E){const B=new FormData;B.append("file",E.file),n("on-upload",B)}return(E,B)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(k.ElUpload),{"file-list":i.value,limit:a.props.limit,accept:a.props.accept,"list-type":a.props.listType,"on-remove":c,"on-exceed":d,"on-preview":f,multiple:!0,"before-upload":p,"http-request":m,"show-file-list":a.props.listType!=="text",class:e.normalizeClass(["upload-main",{"disable-upload":i.value.length>=a.props.limit}]),onClick:B[0]||(B[0]=e.withModifiers(()=>{},["prevent"]))},{default:e.withCtx(()=>[a.props.listType!=="text"?(e.openBlock(),e.createBlock(e.unref(k.ElIcon),{key:0,disabled:!0},{default:e.withCtx(()=>[e.createVNode(e.unref(Er))]),_:1})):(e.openBlock(),e.createBlock(e.unref(k.ElButton),{key:1,class:"upload-button",type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(" 上传附件 ")]),_:1}))]),_:1},8,["file-list","limit","accept","list-type","show-file-list","class"]),e.createVNode(e.unref(k.ElDialog),{modelValue:s.value,"onUpdate:modelValue":B[1]||(B[1]=y=>s.value=y)},{default:e.withCtx(()=>[e.createElementVNode("img",{"w-full":"",src:o.value,alt:"Preview Image"},null,8,ju)]),_:1},8,["modelValue"])]))}},[["__scopeId","data-v-cb22ed8f"]])},Symbol.toStringTag,{value:"Module"})),Iu=["src"],Lu={class:"file-type"},Mu=Object.freeze(Object.defineProperty({__proto__:null,default:M({__name:"AttachmentUploader",props:{pics:{type:Array,default(){return[]}},limit:{type:Number},props:{type:Object,default(){return{listType:"picture-card",limit:5,accept:"image/*"}}}},emits:["on-success","on-remove","on-change"],setup(r,{emit:t}){const n=t,o=r,s=e.computed(()=>o.pics.map(h=>{const b=h.url.substring(h.url.lastIndexOf(".")+1);if(typeof h.name!==void 0)return h.fileType=b,h;if(h.url){const _=h.url.split("/");return{...h,name:_[_.length-1],fileType:b}}return{...h,name:h.id,fileType:b}})),a=e.ref(""),i=e.ref(!1);e.ref(o);const c=ot().fileUploadUrl;`${localStorage.getItem("token")}`;const d=h=>{const b=new FileReader;return b.readAsDataURL(h),new Promise(function(_,w){return h.type.startsWith("image/")?(b.onload=async x=>{const C=new Image;C.src=x.target.result,C.onload=()=>{const N=document.createElement("canvas"),D=N.getContext("2d");N.width=C.width,N.height=C.height,D.drawImage(C,0,0,N.width,N.height),N.toBlob(R=>{const Q=new File([R],h.name,{type:h.type,lastModified:Date.now()});_(Q)},h.type,.5)}},!1):(_(h),!1)})},f=h=>{h.status==="success"&&n("on-remove",h)},p=()=>{k.ElMessage({message:`最多只能上传 ${o.props.limit} 个文件!`,type:"warning"})},m=h=>{a.value=h.url,i.value=!0},E=h=>{const b=h.name.substring(0,h.name.lastIndexOf("."));if(!/^[\u4e00-\u9fa5\w-_]+$/.test(b))return k.ElMessage({message:"请勿输入特殊字符!",type:"warning"}),!1;d(h).then(w=>w.size/1024/1024<5?(y(w),!1):(k.ElMessage({message:"上传大小不能超过 5MB!",type:"warning"}),!1))};function B(h,b){if(!h.name){k.ElMessage({message:"附件名称不能为空!",type:"warning"});return}n("on-change",h)}function y(h){return k.ElLoading.service({text:"上传中,请稍后",background:"rgba(0,0,0,0.3)"}),new Promise((b,_)=>{const w=new FormData;w.append("file",h),Y.post(c,w,{}).then(x=>(k.ElLoading.service().close(),k.ElMessage({message:"上传成功",type:"success"}),n("on-success",x.data.data),b(x.data),!1)).catch(()=>{k.ElLoading.service().close(),k.ElMessage({message:"上传失败",type:"warning"}),_("Upload failed")})})}return(h,b)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(k.ElUpload),{"file-list":s.value,action:e.unref(c),limit:o.props.limit,accept:o.props.accept,"list-type":o.props.listType,"on-remove":f,"before-upload":E,"on-exceed":p,"on-preview":m,multiple:!0,"http-request":()=>!1,"show-file-list":o.props.listType!=="text",class:e.normalizeClass(["upload-main",{"disable-upload":s.value.length>=o.props.limit}]),onClick:b[0]||(b[0]=e.withModifiers(()=>{},["prevent"]))},{default:e.withCtx(()=>[o.props.listType!=="text"?(e.openBlock(),e.createBlock(e.unref(k.ElIcon),{key:0,disabled:!0},{default:e.withCtx(()=>[e.createVNode(e.unref(Er))]),_:1})):(e.openBlock(),e.createBlock(e.unref(k.ElButton),{key:1,class:"upload-button",type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(" 上传附件 ")]),_:1}))]),_:1},8,["file-list","action","limit","accept","list-type","show-file-list","class"]),e.createVNode(e.unref(k.ElDialog),{modelValue:i.value,"onUpdate:modelValue":b[1]||(b[1]=_=>i.value=_)},{default:e.withCtx(()=>[e.createElementVNode("img",{"w-full":"",src:a.value,alt:"Preview Image"},null,8,Iu)]),_:1},8,["modelValue"]),o.props.listType=="text"?(e.openBlock(),e.createBlock(e.unref(k.ElForm),{key:0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(_,w)=>(e.openBlock(),e.createBlock(e.unref(k.ElFormItem),{key:w,class:"file-list"},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElIcon),{color:"#73767a",size:14},{default:e.withCtx(()=>[e.createVNode(e.unref(ma))]),_:1}),e.createVNode(e.unref(k.ElInput),{modelValue:_.name,"onUpdate:modelValue":x=>_.name=x,onChange:x=>B(_)},null,8,["modelValue","onUpdate:modelValue","onChange"]),e.createElementVNode("span",Lu,"."+e.toDisplayString(_.fileType),1),e.createVNode(e.unref(k.ElIcon),{color:"#73767a",size:12,onClick:x=>f(_)},{default:e.withCtx(()=>[e.createVNode(e.unref(pa))]),_:2},1032,["onClick"])]),_:2},1024))),128))]),_:1})):e.createCommentVNode("",!0)],64))}},[["__scopeId","data-v-aa2fe0b2"]])},Symbol.toStringTag,{value:"Module"})),Uu={class:"image-slot"},zu=Object.freeze(Object.defineProperty({__proto__:null,default:M({__name:"ImageUploader",props:{imageUrl:{type:String}},emits:["on-success"],setup(r,{emit:t}){const n=t,o=r,s=ot().imageUploadUrl;`${localStorage.getItem("token")}`;const a=f=>{if(!(f.size/1024/1024<5))return k.ElMessage({message:"上传大小不能超过 5MB!",type:"warning"}),!1},i=f=>{n("on-success",f.data.imageUrl)};function c(){n("on-success","")}function d(f){return k.ElLoading.service({text:"上传中,请稍后",background:"rgba(0,0,0,0.3)"}),new Promise((p,m)=>{const E=new FormData;E.append("image",f.file),Y.post(s,E,{}).then(B=>{k.ElLoading.service().close(),k.ElMessage({message:"上传成功",type:"success"}),p(B.data)}).catch(()=>{k.ElLoading.service().close(),k.ElMessage({message:"上传失败",type:"warning"}),m("Upload failed")})})}return(f,p)=>(e.openBlock(),e.createBlock(e.unref(k.ElUpload),{class:"image-uploader",action:e.unref(s),name:"image","show-file-list":!1,"on-success":i,"before-upload":a,"http-request":d},{default:e.withCtx(()=>[e.renderSlot(f.$slots,"default",{},void 0,!0),o.imageUrl?(e.openBlock(),e.createBlock(e.unref(k.ElImage),{key:0,class:"image",src:o.imageUrl,fit:"scale-down"},{placeholder:e.withCtx(()=>[e.createElementVNode("div",Uu,[e.createVNode(e.unref(k.ElIcon),{class:"placeholder-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(ga))]),_:1})])]),_:1},8,["src"])):(e.openBlock(),e.createBlock(e.unref(k.ElIcon),{key:1,class:"uploader-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(Er))]),_:1})),o.imageUrl?(e.openBlock(),e.createBlock(e.unref(k.ElIcon),{key:2,class:"delete-icon",onClick:e.withModifiers(c,["stop","prevent"])},{default:e.withCtx(()=>[e.createVNode(e.unref(Zi))]),_:1})):e.createCommentVNode("",!0)]),_:3},8,["action"]))}},[["__scopeId","data-v-ae965bb4"]])},Symbol.toStringTag,{value:"Module"}));var Ue=-1,xe=1,fe=0;function Ut(r,t,n,o){if(r===t)return r?[[fe,r]]:[];if(n!=null){var s=Gu(r,t,n);if(s)return s}var a=Sr(r,t),i=r.substring(0,a);r=r.substring(a),t=t.substring(a),a=Cr(r,t);var c=r.substring(r.length-a);r=r.substring(0,r.length-a),t=t.substring(0,t.length-a);var d=Hu(r,t);return i&&d.unshift([fe,i]),c&&d.push([fe,c]),Ra(d,o),d}function Hu(r,t){var n;if(!r)return[[xe,t]];if(!t)return[[Ue,r]];var o=r.length>t.length?r:t,s=r.length>t.length?t:r,a=o.indexOf(s);if(a!==-1)return n=[[xe,o.substring(0,a)],[fe,s],[xe,o.substring(a+s.length)]],r.length>t.length&&(n[0][0]=n[2][0]=Ue),n;if(s.length===1)return[[Ue,r],[xe,t]];var i=Pu(r,t);if(i){var c=i[0],d=i[1],f=i[2],p=i[3],m=i[4],E=Ut(c,f),B=Ut(d,p);return E.concat([[fe,m]],B)}return qu(r,t)}function qu(r,t){for(var n=r.length,o=t.length,s=Math.ceil((n+o)/2),a=s,i=2*s,c=new Array(i),d=new Array(i),f=0;f<i;f++)c[f]=-1,d[f]=-1;c[a+1]=0,d[a+1]=0;for(var p=n-o,m=p%2!==0,E=0,B=0,y=0,h=0,b=0;b<s;b++){for(var _=-b+E;_<=b-B;_+=2){var w=a+_,x;_===-b||_!==b&&c[w-1]<c[w+1]?x=c[w+1]:x=c[w-1]+1;for(var C=x-_;x<n&&C<o&&r.charAt(x)===t.charAt(C);)x++,C++;if(c[w]=x,x>n)B+=2;else if(C>o)E+=2;else if(m){var N=a+p-_;if(N>=0&&N<i&&d[N]!==-1){var D=n-d[N];if(x>=D)return ja(r,t,x,C)}}}for(var R=-b+y;R<=b-h;R+=2){var N=a+R,D;R===-b||R!==b&&d[N-1]<d[N+1]?D=d[N+1]:D=d[N-1]+1;for(var Q=D-R;D<n&&Q<o&&r.charAt(n-D-1)===t.charAt(o-Q-1);)D++,Q++;if(d[N]=D,D>n)h+=2;else if(Q>o)y+=2;else if(!m){var w=a+p-R;if(w>=0&&w<i&&c[w]!==-1){var x=c[w],C=a+x-w;if(D=n-D,x>=D)return ja(r,t,x,C)}}}}return[[Ue,r],[xe,t]]}function ja(r,t,n,o){var s=r.substring(0,n),a=t.substring(0,o),i=r.substring(n),c=t.substring(o),d=Ut(s,a),f=Ut(i,c);return d.concat(f)}function Sr(r,t){if(!r||!t||r.charAt(0)!==t.charAt(0))return 0;for(var n=0,o=Math.min(r.length,t.length),s=o,a=0;n<s;)r.substring(a,s)==t.substring(a,s)?(n=s,a=n):o=s,s=Math.floor((o-n)/2+n);return Ia(r.charCodeAt(s-1))&&s--,s}function Cr(r,t){if(!r||!t||r.slice(-1)!==t.slice(-1))return 0;for(var n=0,o=Math.min(r.length,t.length),s=o,a=0;n<s;)r.substring(r.length-s,r.length-a)==t.substring(t.length-s,t.length-a)?(n=s,a=n):o=s,s=Math.floor((o-n)/2+n);return La(r.charCodeAt(r.length-s))&&s--,s}function Pu(r,t){var n=r.length>t.length?r:t,o=r.length>t.length?t:r;if(n.length<4||o.length*2<n.length)return null;function s(B,y,h){for(var b=B.substring(h,h+Math.floor(B.length/4)),_=-1,w="",x,C,N,D;(_=y.indexOf(b,_+1))!==-1;){var R=Sr(B.substring(h),y.substring(_)),Q=Cr(B.substring(0,h),y.substring(0,_));w.length<Q+R&&(w=y.substring(_-Q,_)+y.substring(_,_+R),x=B.substring(0,h-Q),C=B.substring(h+R),N=y.substring(0,_-Q),D=y.substring(_+R))}return w.length*2>=B.length?[x,C,N,D,w]:null}var a=s(n,o,Math.ceil(n.length/4)),i=s(n,o,Math.ceil(n.length/2)),c;if(!a&&!i)return null;i?a?c=a[4].length>i[4].length?a:i:c=i:c=a;var d,f,p,m;r.length>t.length?(d=c[0],f=c[1],p=c[2],m=c[3]):(p=c[0],m=c[1],d=c[2],f=c[3]);var E=c[4];return[d,f,p,m,E]}function Ra(r,t){r.push([fe,""]);for(var n=0,o=0,s=0,a="",i="",c;n<r.length;){if(n<r.length-1&&!r[n][1]){r.splice(n,1);continue}switch(r[n][0]){case xe:s++,i+=r[n][1],n++;break;case Ue:o++,a+=r[n][1],n++;break;case fe:var d=n-s-o-1;if(t){if(d>=0&&Ua(r[d][1])){var f=r[d][1].slice(-1);if(r[d][1]=r[d][1].slice(0,-1),a=f+a,i=f+i,!r[d][1]){r.splice(d,1),n--;var p=d-1;r[p]&&r[p][0]===xe&&(s++,i=r[p][1]+i,p--),r[p]&&r[p][0]===Ue&&(o++,a=r[p][1]+a,p--),d=p}}if(Ma(r[n][1])){var f=r[n][1].charAt(0);r[n][1]=r[n][1].slice(1),a+=f,i+=f}}if(n<r.length-1&&!r[n][1]){r.splice(n,1);break}if(a.length>0||i.length>0){a.length>0&&i.length>0&&(c=Sr(i,a),c!==0&&(d>=0?r[d][1]+=i.substring(0,c):(r.splice(0,0,[fe,i.substring(0,c)]),n++),i=i.substring(c),a=a.substring(c)),c=Cr(i,a),c!==0&&(r[n][1]=i.substring(i.length-c)+r[n][1],i=i.substring(0,i.length-c),a=a.substring(0,a.length-c)));var m=s+o;a.length===0&&i.length===0?(r.splice(n-m,m),n=n-m):a.length===0?(r.splice(n-m,m,[xe,i]),n=n-m+1):i.length===0?(r.splice(n-m,m,[Ue,a]),n=n-m+1):(r.splice(n-m,m,[Ue,a],[xe,i]),n=n-m+2)}n!==0&&r[n-1][0]===fe?(r[n-1][1]+=r[n][1],r.splice(n,1)):n++,s=0,o=0,a="",i="";break}}r[r.length-1][1]===""&&r.pop();var E=!1;for(n=1;n<r.length-1;)r[n-1][0]===fe&&r[n+1][0]===fe&&(r[n][1].substring(r[n][1].length-r[n-1][1].length)===r[n-1][1]?(r[n][1]=r[n-1][1]+r[n][1].substring(0,r[n][1].length-r[n-1][1].length),r[n+1][1]=r[n-1][1]+r[n+1][1],r.splice(n-1,1),E=!0):r[n][1].substring(0,r[n+1][1].length)==r[n+1][1]&&(r[n-1][1]+=r[n+1][1],r[n][1]=r[n][1].substring(r[n+1][1].length)+r[n+1][1],r.splice(n+1,1),E=!0)),n++;E&&Ra(r,t)}function Ia(r){return r>=55296&&r<=56319}function La(r){return r>=56320&&r<=57343}function Ma(r){return La(r.charCodeAt(0))}function Ua(r){return Ia(r.charCodeAt(r.length-1))}function Wu(r){for(var t=[],n=0;n<r.length;n++)r[n][1].length>0&&t.push(r[n]);return t}function $r(r,t,n,o){return Ua(r)||Ma(o)?null:Wu([[fe,r],[Ue,t],[xe,n],[fe,o]])}function Gu(r,t,n){var o=typeof n=="number"?{index:n,length:0}:n.oldRange,s=typeof n=="number"?null:n.newRange,a=r.length,i=t.length;if(o.length===0&&(s===null||s.length===0)){var c=o.index,d=r.slice(0,c),f=r.slice(c),p=s?s.index:null;e:{var m=c+i-a;if(p!==null&&p!==m||m<0||m>i)break e;var E=t.slice(0,m),B=t.slice(m);if(B!==f)break e;var y=Math.min(c,m),h=d.slice(0,y),b=E.slice(0,y);if(h!==b)break e;var _=d.slice(y),w=E.slice(y);return $r(h,_,w,f)}e:{if(p!==null&&p!==c)break e;var x=c,E=t.slice(0,x),B=t.slice(x);if(E!==d)break e;var C=Math.min(a-x,i-x),N=f.slice(f.length-C),D=B.slice(B.length-C);if(N!==D)break e;var _=f.slice(0,f.length-C),w=B.slice(0,B.length-C);return $r(d,_,w,N)}}if(o.length>0&&s&&s.length===0)e:{var h=r.slice(0,o.index),N=r.slice(o.index+o.length),y=h.length,C=N.length;if(i<y+C)break e;var b=t.slice(0,y),D=t.slice(i-C);if(h!==b||N!==D)break e;var _=r.slice(y,a-C),w=t.slice(y,i-C);return $r(h,_,w,N)}return null}function Sn(r,t,n){return Ut(r,t,n,!0)}Sn.INSERT=xe,Sn.DELETE=Ue,Sn.EQUAL=fe;var Qu=Sn,Cn={exports:{}};Cn.exports,function(r,t){var n=200,o="__lodash_hash_undefined__",s=9007199254740991,a="[object Arguments]",i="[object Array]",c="[object Boolean]",d="[object Date]",f="[object Error]",p="[object Function]",m="[object GeneratorFunction]",E="[object Map]",B="[object Number]",y="[object Object]",h="[object Promise]",b="[object RegExp]",_="[object Set]",w="[object String]",x="[object Symbol]",C="[object WeakMap]",N="[object ArrayBuffer]",D="[object DataView]",R="[object Float32Array]",Q="[object Float64Array]",et="[object Int8Array]",ze="[object Int16Array]",V="[object Int32Array]",I="[object Uint8Array]",K="[object Uint8ClampedArray]",L="[object Uint16Array]",P="[object Uint32Array]",de=/[\\^$.*+?()[\]{}|]/g,ye=/\w*$/,Nr=/^\[object .+?Constructor\]$/,Ar=/^(?:0|[1-9]\d*)$/,v={};v[a]=v[i]=v[N]=v[D]=v[c]=v[d]=v[R]=v[Q]=v[et]=v[ze]=v[V]=v[E]=v[B]=v[y]=v[b]=v[_]=v[w]=v[x]=v[I]=v[K]=v[L]=v[P]=!0,v[f]=v[p]=v[C]=!1;var Dr=typeof ne=="object"&&ne&&ne.Object===Object&&ne,Fr=typeof self=="object"&&self&&self.Object===Object&&self,Be=Dr||Fr||Function("return this")(),Nn=t&&!t.nodeType&&t,J=Nn&&!0&&r&&!r.nodeType&&r,An=J&&J.exports===Nn;function jr(l,u){return l.set(u[0],u[1]),l}function Se(l,u){return l.add(u),l}function Dn(l,u){for(var g=-1,S=l?l.length:0;++g<S&&u(l[g],g,l)!==!1;);return l}function Fn(l,u){for(var g=-1,S=u.length,j=l.length;++g<S;)l[j+g]=u[g];return l}function qt(l,u,g,S){for(var j=-1,A=l?l.length:0;++j<A;)g=u(g,l[j],j,l);return g}function Pt(l,u){for(var g=-1,S=Array(l);++g<l;)S[g]=u(g);return S}function jn(l,u){return l==null?void 0:l[u]}function Wt(l){var u=!1;if(l!=null&&typeof l.toString!="function")try{u=!!(l+"")}catch{}return u}function Rn(l){var u=-1,g=Array(l.size);return l.forEach(function(S,j){g[++u]=[j,S]}),g}function Gt(l,u){return function(g){return l(u(g))}}function In(l){var u=-1,g=Array(l.size);return l.forEach(function(S){g[++u]=S}),g}var Rr=Array.prototype,Ir=Function.prototype,wt=Object.prototype,Qt=Be["__core-js_shared__"],Ln=function(){var l=/[^.]+$/.exec(Qt&&Qt.keys&&Qt.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""}(),Mn=Ir.toString,He=wt.hasOwnProperty,kt=wt.toString,Lr=RegExp("^"+Mn.call(He).replace(de,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),it=An?Be.Buffer:void 0,Et=Be.Symbol,vt=Be.Uint8Array,be=Gt(Object.getPrototypeOf,Object),Un=Object.create,zn=wt.propertyIsEnumerable,Mr=Rr.splice,Jt=Object.getOwnPropertySymbols,xt=it?it.isBuffer:void 0,Hn=Gt(Object.keys,Object),Bt=$e(Be,"DataView"),lt=$e(Be,"Map"),Ce=$e(Be,"Promise"),St=$e(Be,"Set"),Kt=$e(Be,"WeakMap"),ct=$e(Object,"create"),Yt=ue(Bt),dt=ue(lt),Xt=ue(Ce),Zt=ue(St),en=ue(Kt),tt=Et?Et.prototype:void 0,qn=tt?tt.valueOf:void 0;function Ge(l){var u=-1,g=l?l.length:0;for(this.clear();++u<g;){var S=l[u];this.set(S[0],S[1])}}function Ur(){this.__data__=ct?ct(null):{}}function zr(l){return this.has(l)&&delete this.__data__[l]}function Hr(l){var u=this.__data__;if(ct){var g=u[l];return g===o?void 0:g}return He.call(u,l)?u[l]:void 0}function Pn(l){var u=this.__data__;return ct?u[l]!==void 0:He.call(u,l)}function tn(l,u){var g=this.__data__;return g[l]=ct&&u===void 0?o:u,this}Ge.prototype.clear=Ur,Ge.prototype.delete=zr,Ge.prototype.get=Hr,Ge.prototype.has=Pn,Ge.prototype.set=tn;function ae(l){var u=-1,g=l?l.length:0;for(this.clear();++u<g;){var S=l[u];this.set(S[0],S[1])}}function qr(){this.__data__=[]}function Pr(l){var u=this.__data__,g=$t(u,l);if(g<0)return!1;var S=u.length-1;return g==S?u.pop():Mr.call(u,g,1),!0}function Wr(l){var u=this.__data__,g=$t(u,l);return g<0?void 0:u[g][1]}function Gr(l){return $t(this.__data__,l)>-1}function Qr(l,u){var g=this.__data__,S=$t(g,l);return S<0?g.push([l,u]):g[S][1]=u,this}ae.prototype.clear=qr,ae.prototype.delete=Pr,ae.prototype.get=Wr,ae.prototype.has=Gr,ae.prototype.set=Qr;function ie(l){var u=-1,g=l?l.length:0;for(this.clear();++u<g;){var S=l[u];this.set(S[0],S[1])}}function vr(){this.__data__={hash:new Ge,map:new(lt||ae),string:new Ge}}function Jr(l){return ft(this,l).delete(l)}function Kr(l){return ft(this,l).get(l)}function Yr(l){return ft(this,l).has(l)}function Xr(l,u){return ft(this,l).set(l,u),this}ie.prototype.clear=vr,ie.prototype.delete=Jr,ie.prototype.get=Kr,ie.prototype.has=Yr,ie.prototype.set=Xr;function pe(l){this.__data__=new ae(l)}function Zr(){this.__data__=new ae}function eo(l){return this.__data__.delete(l)}function to(l){return this.__data__.get(l)}function no(l){return this.__data__.has(l)}function ro(l,u){var g=this.__data__;if(g instanceof ae){var S=g.__data__;if(!lt||S.length<n-1)return S.push([l,u]),this;g=this.__data__=new ie(S)}return g.set(l,u),this}pe.prototype.clear=Zr,pe.prototype.delete=eo,pe.prototype.get=to,pe.prototype.has=no,pe.prototype.set=ro;function Ct(l,u){var g=an(l)||Ot(l)?Pt(l.length,String):[],S=g.length,j=!!S;for(var A in l)He.call(l,A)&&!(j&&(A=="length"||yo(A,S)))&&g.push(A);return g}function Wn(l,u,g){var S=l[u];(!(He.call(l,u)&&Kn(S,g))||g===void 0&&!(u in l))&&(l[u]=g)}function $t(l,u){for(var g=l.length;g--;)if(Kn(l[g][0],u))return g;return-1}function qe(l,u){return l&&on(u,ln(u),l)}function nn(l,u,g,S,j,A,H){var z;if(S&&(z=A?S(l,j,A,H):S(l)),z!==void 0)return z;if(!We(l))return l;var X=an(l);if(X){if(z=go(l),!u)return po(l,z)}else{var W=ve(l),le=W==p||W==m;if(Yn(l))return Vt(l,u);if(W==y||W==a||le&&!A){if(Wt(l))return A?l:{};if(z=Pe(le?{}:l),!u)return ho(l,qe(z,l))}else{if(!v[W])return A?l:{};z=_o(l,W,nn,u)}}H||(H=new pe);var he=H.get(l);if(he)return he;if(H.set(l,z),!X)var ee=g?mo(l):ln(l);return Dn(ee||l,function(ce,se){ee&&(se=ce,ce=l[se]),Wn(z,se,nn(ce,u,g,S,se,l,H))}),z}function oo(l){return We(l)?Un(l):{}}function ao(l,u,g){var S=u(l);return an(l)?S:Fn(S,g(l))}function so(l){return kt.call(l)}function io(l){if(!We(l)||wo(l))return!1;var u=sn(l)||Wt(l)?Lr:Nr;return u.test(ue(l))}function lo(l){if(!vn(l))return Hn(l);var u=[];for(var g in Object(l))He.call(l,g)&&g!="constructor"&&u.push(g);return u}function Vt(l,u){if(u)return l.slice();var g=new l.constructor(l.length);return l.copy(g),g}function rn(l){var u=new l.constructor(l.byteLength);return new vt(u).set(new vt(l)),u}function ut(l,u){var g=u?rn(l.buffer):l.buffer;return new l.constructor(g,l.byteOffset,l.byteLength)}function Gn(l,u,g){var S=u?g(Rn(l),!0):Rn(l);return qt(S,jr,new l.constructor)}function Qn(l){var u=new l.constructor(l.source,ye.exec(l));return u.lastIndex=l.lastIndex,u}function co(l,u,g){var S=u?g(In(l),!0):In(l);return qt(S,Se,new l.constructor)}function uo(l){return qn?Object(qn.call(l)):{}}function fo(l,u){var g=u?rn(l.buffer):l.buffer;return new l.constructor(g,l.byteOffset,l.length)}function po(l,u){var g=-1,S=l.length;for(u||(u=Array(S));++g<S;)u[g]=l[g];return u}function on(l,u,g,S){g||(g={});for(var j=-1,A=u.length;++j<A;){var H=u[j],z=void 0;Wn(g,H,z===void 0?l[H]:z)}return g}function ho(l,u){return on(l,Qe(l),u)}function mo(l){return ao(l,ln,Qe)}function ft(l,u){var g=l.__data__;return bo(u)?g[typeof u=="string"?"string":"hash"]:g.map}function $e(l,u){var g=jn(l,u);return io(g)?g:void 0}var Qe=Jt?Gt(Jt,Object):Eo,ve=so;(Bt&&ve(new Bt(new ArrayBuffer(1)))!=D||lt&&ve(new lt)!=E||Ce&&ve(Ce.resolve())!=h||St&&ve(new St)!=_||Kt&&ve(new Kt)!=C)&&(ve=function(l){var u=kt.call(l),g=u==y?l.constructor:void 0,S=g?ue(g):void 0;if(S)switch(S){case Yt:return D;case dt:return E;case Xt:return h;case Zt:return _;case en:return C}return u});function go(l){var u=l.length,g=l.constructor(u);return u&&typeof l[0]=="string"&&He.call(l,"index")&&(g.index=l.index,g.input=l.input),g}function Pe(l){return typeof l.constructor=="function"&&!vn(l)?oo(be(l)):{}}function _o(l,u,g,S){var j=l.constructor;switch(u){case N:return rn(l);case c:case d:return new j(+l);case D:return ut(l,S);case R:case Q:case et:case ze:case V:case I:case K:case L:case P:return fo(l,S);case E:return Gn(l,S,g);case B:case w:return new j(l);case b:return Qn(l);case _:return co(l,S,g);case x:return uo(l)}}function yo(l,u){return u=u??s,!!u&&(typeof l=="number"||Ar.test(l))&&l>-1&&l%1==0&&l<u}function bo(l){var u=typeof l;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?l!=="__proto__":l===null}function wo(l){return!!Ln&&Ln in l}function vn(l){var u=l&&l.constructor,g=typeof u=="function"&&u.prototype||wt;return l===g}function ue(l){if(l!=null){try{return Mn.call(l)}catch{}try{return l+""}catch{}}return""}function Jn(l){return nn(l,!0,!0)}function Kn(l,u){return l===u||l!==l&&u!==u}function Ot(l){return ko(l)&&He.call(l,"callee")&&(!zn.call(l,"callee")||kt.call(l)==a)}var an=Array.isArray;function Tt(l){return l!=null&&Xn(l.length)&&!sn(l)}function ko(l){return Zn(l)&&Tt(l)}var Yn=xt||xo;function sn(l){var u=We(l)?kt.call(l):"";return u==p||u==m}function Xn(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=s}function We(l){var u=typeof l;return!!l&&(u=="object"||u=="function")}function Zn(l){return!!l&&typeof l=="object"}function ln(l){return Tt(l)?Ct(l):lo(l)}function Eo(){return[]}function xo(){return!1}r.exports=Jn}(Cn,Cn.exports);var za=Cn.exports,$n={exports:{}};$n.exports,function(r,t){var n=200,o="__lodash_hash_undefined__",s=1,a=2,i=9007199254740991,c="[object Arguments]",d="[object Array]",f="[object AsyncFunction]",p="[object Boolean]",m="[object Date]",E="[object Error]",B="[object Function]",y="[object GeneratorFunction]",h="[object Map]",b="[object Number]",_="[object Null]",w="[object Object]",x="[object Promise]",C="[object Proxy]",N="[object RegExp]",D="[object Set]",R="[object String]",Q="[object Symbol]",et="[object Undefined]",ze="[object WeakMap]",V="[object ArrayBuffer]",I="[object DataView]",K="[object Float32Array]",L="[object Float64Array]",P="[object Int8Array]",de="[object Int16Array]",ye="[object Int32Array]",Nr="[object Uint8Array]",Ar="[object Uint8ClampedArray]",v="[object Uint16Array]",Dr="[object Uint32Array]",Fr=/[\\^$.*+?()[\]{}|]/g,Be=/^\[object .+?Constructor\]$/,Nn=/^(?:0|[1-9]\d*)$/,J={};J[K]=J[L]=J[P]=J[de]=J[ye]=J[Nr]=J[Ar]=J[v]=J[Dr]=!0,J[c]=J[d]=J[V]=J[p]=J[I]=J[m]=J[E]=J[B]=J[h]=J[b]=J[w]=J[N]=J[D]=J[R]=J[ze]=!1;var An=typeof ne=="object"&&ne&&ne.Object===Object&&ne,jr=typeof self=="object"&&self&&self.Object===Object&&self,Se=An||jr||Function("return this")(),Dn=t&&!t.nodeType&&t,Fn=Dn&&!0&&r&&!r.nodeType&&r,qt=Fn&&Fn.exports===Dn,Pt=qt&&An.process,jn=function(){try{return Pt&&Pt.binding&&Pt.binding("util")}catch{}}(),Wt=jn&&jn.isTypedArray;function Rn(l,u){for(var g=-1,S=l==null?0:l.length,j=0,A=[];++g<S;){var H=l[g];u(H,g,l)&&(A[j++]=H)}return A}function Gt(l,u){for(var g=-1,S=u.length,j=l.length;++g<S;)l[j+g]=u[g];return l}function In(l,u){for(var g=-1,S=l==null?0:l.length;++g<S;)if(u(l[g],g,l))return!0;return!1}function Rr(l,u){for(var g=-1,S=Array(l);++g<l;)S[g]=u(g);return S}function Ir(l){return function(u){return l(u)}}function wt(l,u){return l.has(u)}function Qt(l,u){return l==null?void 0:l[u]}function Ln(l){var u=-1,g=Array(l.size);return l.forEach(function(S,j){g[++u]=[j,S]}),g}function Mn(l,u){return function(g){return l(u(g))}}function He(l){var u=-1,g=Array(l.size);return l.forEach(function(S){g[++u]=S}),g}var kt=Array.prototype,Lr=Function.prototype,it=Object.prototype,Et=Se["__core-js_shared__"],vt=Lr.toString,be=it.hasOwnProperty,Un=function(){var l=/[^.]+$/.exec(Et&&Et.keys&&Et.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""}(),zn=it.toString,Mr=RegExp("^"+vt.call(be).replace(Fr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Jt=qt?Se.Buffer:void 0,xt=Se.Symbol,Hn=Se.Uint8Array,Bt=it.propertyIsEnumerable,lt=kt.splice,Ce=xt?xt.toStringTag:void 0,St=Object.getOwnPropertySymbols,Kt=Jt?Jt.isBuffer:void 0,ct=Mn(Object.keys,Object),Yt=Qe(Se,"DataView"),dt=Qe(Se,"Map"),Xt=Qe(Se,"Promise"),Zt=Qe(Se,"Set"),en=Qe(Se,"WeakMap"),tt=Qe(Object,"create"),qn=ue(Yt),Ge=ue(dt),Ur=ue(Xt),zr=ue(Zt),Hr=ue(en),Pn=xt?xt.prototype:void 0,tn=Pn?Pn.valueOf:void 0;function ae(l){var u=-1,g=l==null?0:l.length;for(this.clear();++u<g;){var S=l[u];this.set(S[0],S[1])}}function qr(){this.__data__=tt?tt(null):{},this.size=0}function Pr(l){var u=this.has(l)&&delete this.__data__[l];return this.size-=u?1:0,u}function Wr(l){var u=this.__data__;if(tt){var g=u[l];return g===o?void 0:g}return be.call(u,l)?u[l]:void 0}function Gr(l){var u=this.__data__;return tt?u[l]!==void 0:be.call(u,l)}function Qr(l,u){var g=this.__data__;return this.size+=this.has(l)?0:1,g[l]=tt&&u===void 0?o:u,this}ae.prototype.clear=qr,ae.prototype.delete=Pr,ae.prototype.get=Wr,ae.prototype.has=Gr,ae.prototype.set=Qr;function ie(l){var u=-1,g=l==null?0:l.length;for(this.clear();++u<g;){var S=l[u];this.set(S[0],S[1])}}function vr(){this.__data__=[],this.size=0}function Jr(l){var u=this.__data__,g=Vt(u,l);if(g<0)return!1;var S=u.length-1;return g==S?u.pop():lt.call(u,g,1),--this.size,!0}function Kr(l){var u=this.__data__,g=Vt(u,l);return g<0?void 0:u[g][1]}function Yr(l){return Vt(this.__data__,l)>-1}function Xr(l,u){var g=this.__data__,S=Vt(g,l);return S<0?(++this.size,g.push([l,u])):g[S][1]=u,this}ie.prototype.clear=vr,ie.prototype.delete=Jr,ie.prototype.get=Kr,ie.prototype.has=Yr,ie.prototype.set=Xr;function pe(l){var u=-1,g=l==null?0:l.length;for(this.clear();++u<g;){var S=l[u];this.set(S[0],S[1])}}function Zr(){this.size=0,this.__data__={hash:new ae,map:new(dt||ie),string:new ae}}function eo(l){var u=$e(this,l).delete(l);return this.size-=u?1:0,u}function to(l){return $e(this,l).get(l)}function no(l){return $e(this,l).has(l)}function ro(l,u){var g=$e(this,l),S=g.size;return g.set(l,u),this.size+=g.size==S?0:1,this}pe.prototype.clear=Zr,pe.prototype.delete=eo,pe.prototype.get=to,pe.prototype.has=no,pe.prototype.set=ro;function Ct(l){var u=-1,g=l==null?0:l.length;for(this.__data__=new pe;++u<g;)this.add(l[u])}function Wn(l){return this.__data__.set(l,o),this}function $t(l){return this.__data__.has(l)}Ct.prototype.add=Ct.prototype.push=Wn,Ct.prototype.has=$t;function qe(l){var u=this.__data__=new ie(l);this.size=u.size}function nn(){this.__data__=new ie,this.size=0}function oo(l){var u=this.__data__,g=u.delete(l);return this.size=u.size,g}function ao(l){return this.__data__.get(l)}function so(l){return this.__data__.has(l)}function io(l,u){var g=this.__data__;if(g instanceof ie){var S=g.__data__;if(!dt||S.length<n-1)return S.push([l,u]),this.size=++g.size,this;g=this.__data__=new pe(S)}return g.set(l,u),this.size=g.size,this}qe.prototype.clear=nn,qe.prototype.delete=oo,qe.prototype.get=ao,qe.prototype.has=so,qe.prototype.set=io;function lo(l,u){var g=Ot(l),S=!g&&Kn(l),j=!g&&!S&&Tt(l),A=!g&&!S&&!j&&Zn(l),H=g||S||j||A,z=H?Rr(l.length,String):[],X=z.length;for(var W in l)be.call(l,W)&&!(H&&(W=="length"||j&&(W=="offset"||W=="parent")||A&&(W=="buffer"||W=="byteLength"||W=="byteOffset")||_o(W,X)))&&z.push(W);return z}function Vt(l,u){for(var g=l.length;g--;)if(Jn(l[g][0],u))return g;return-1}function rn(l,u,g){var S=u(l);return Ot(l)?S:Gt(S,g(l))}function ut(l){return l==null?l===void 0?et:_:Ce&&Ce in Object(l)?ve(l):vn(l)}function Gn(l){return We(l)&&ut(l)==c}function Qn(l,u,g,S,j){return l===u?!0:l==null||u==null||!We(l)&&!We(u)?l!==l&&u!==u:co(l,u,g,S,Qn,j)}function co(l,u,g,S,j,A){var H=Ot(l),z=Ot(u),X=H?d:Pe(l),W=z?d:Pe(u);X=X==c?w:X,W=W==c?w:W;var le=X==w,he=W==w,ee=X==W;if(ee&&Tt(l)){if(!Tt(u))return!1;H=!0,le=!1}if(ee&&!le)return A||(A=new qe),H||Zn(l)?on(l,u,g,S,j,A):ho(l,u,X,g,S,j,A);if(!(g&s)){var ce=le&&be.call(l,"__wrapped__"),se=he&&be.call(u,"__wrapped__");if(ce||se){var nt=ce?l.value():l,Je=se?u.value():u;return A||(A=new qe),j(nt,Je,g,S,A)}}return ee?(A||(A=new qe),mo(l,u,g,S,j,A)):!1}function uo(l){if(!Xn(l)||bo(l))return!1;var u=Yn(l)?Mr:Be;return u.test(ue(l))}function fo(l){return We(l)&&sn(l.length)&&!!J[ut(l)]}function po(l){if(!wo(l))return ct(l);var u=[];for(var g in Object(l))be.call(l,g)&&g!="constructor"&&u.push(g);return u}function on(l,u,g,S,j,A){var H=g&s,z=l.length,X=u.length;if(z!=X&&!(H&&X>z))return!1;var W=A.get(l);if(W&&A.get(u))return W==u;var le=-1,he=!0,ee=g&a?new Ct:void 0;for(A.set(l,u),A.set(u,l);++le<z;){var ce=l[le],se=u[le];if(S)var nt=H?S(se,ce,le,u,l,A):S(ce,se,le,l,u,A);if(nt!==void 0){if(nt)continue;he=!1;break}if(ee){if(!In(u,function(Je,pt){if(!wt(ee,pt)&&(ce===Je||j(ce,Je,g,S,A)))return ee.push(pt)})){he=!1;break}}else if(!(ce===se||j(ce,se,g,S,A))){he=!1;break}}return A.delete(l),A.delete(u),he}function ho(l,u,g,S,j,A,H){switch(g){case I:if(l.byteLength!=u.byteLength||l.byteOffset!=u.byteOffset)return!1;l=l.buffer,u=u.buffer;case V:return!(l.byteLength!=u.byteLength||!A(new Hn(l),new Hn(u)));case p:case m:case b:return Jn(+l,+u);case E:return l.name==u.name&&l.message==u.message;case N:case R:return l==u+"";case h:var z=Ln;case D:var X=S&s;if(z||(z=He),l.size!=u.size&&!X)return!1;var W=H.get(l);if(W)return W==u;S|=a,H.set(l,u);var le=on(z(l),z(u),S,j,A,H);return H.delete(l),le;case Q:if(tn)return tn.call(l)==tn.call(u)}return!1}function mo(l,u,g,S,j,A){var H=g&s,z=ft(l),X=z.length,W=ft(u),le=W.length;if(X!=le&&!H)return!1;for(var he=X;he--;){var ee=z[he];if(!(H?ee in u:be.call(u,ee)))return!1}var ce=A.get(l);if(ce&&A.get(u))return ce==u;var se=!0;A.set(l,u),A.set(u,l);for(var nt=H;++he<X;){ee=z[he];var Je=l[ee],pt=u[ee];if(S)var va=H?S(pt,Je,ee,u,l,A):S(Je,pt,ee,l,u,A);if(!(va===void 0?Je===pt||j(Je,pt,g,S,A):va)){se=!1;break}nt||(nt=ee=="constructor")}if(se&&!nt){var er=l.constructor,tr=u.constructor;er!=tr&&"constructor"in l&&"constructor"in u&&!(typeof er=="function"&&er instanceof er&&typeof tr=="function"&&tr instanceof tr)&&(se=!1)}return A.delete(l),A.delete(u),se}function ft(l){return rn(l,ln,go)}function $e(l,u){var g=l.__data__;return yo(u)?g[typeof u=="string"?"string":"hash"]:g.map}function Qe(l,u){var g=Qt(l,u);return uo(g)?g:void 0}function ve(l){var u=be.call(l,Ce),g=l[Ce];try{l[Ce]=void 0;var S=!0}catch{}var j=zn.call(l);return S&&(u?l[Ce]=g:delete l[Ce]),j}var go=St?function(l){return l==null?[]:(l=Object(l),Rn(St(l),function(u){return Bt.call(l,u)}))}:Eo,Pe=ut;(Yt&&Pe(new Yt(new ArrayBuffer(1)))!=I||dt&&Pe(new dt)!=h||Xt&&Pe(Xt.resolve())!=x||Zt&&Pe(new Zt)!=D||en&&Pe(new en)!=ze)&&(Pe=function(l){var u=ut(l),g=u==w?l.constructor:void 0,S=g?ue(g):"";if(S)switch(S){case qn:return I;case Ge:return h;case Ur:return x;case zr:return D;case Hr:return ze}return u});function _o(l,u){return u=u??i,!!u&&(typeof l=="number"||Nn.test(l))&&l>-1&&l%1==0&&l<u}function yo(l){var u=typeof l;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?l!=="__proto__":l===null}function bo(l){return!!Un&&Un in l}function wo(l){var u=l&&l.constructor,g=typeof u=="function"&&u.prototype||it;return l===g}function vn(l){return zn.call(l)}function ue(l){if(l!=null){try{return vt.call(l)}catch{}try{return l+""}catch{}}return""}function Jn(l,u){return l===u||l!==l&&u!==u}var Kn=Gn(function(){return arguments}())?Gn:function(l){return We(l)&&be.call(l,"callee")&&!Bt.call(l,"callee")},Ot=Array.isArray;function an(l){return l!=null&&sn(l.length)&&!Yn(l)}var Tt=Kt||xo;function ko(l,u){return Qn(l,u)}function Yn(l){if(!Xn(l))return!1;var u=ut(l);return u==B||u==y||u==f||u==C}function sn(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=i}function Xn(l){var u=typeof l;return l!=null&&(u=="object"||u=="function")}function We(l){return l!=null&&typeof l=="object"}var Zn=Wt?Ir(Wt):fo;function ln(l){return an(l)?lo(l):po(l)}function Eo(){return[]}function xo(){return!1}r.exports=ko}($n,$n.exports);var Ha=$n.exports,Vr={},qa=ne&&ne.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Vr,"__esModule",{value:!0});var vu=qa(za),Ju=qa(Ha),Or;(function(r){function t(a,i,c){a===void 0&&(a={}),i===void 0&&(i={}),typeof a!="object"&&(a={}),typeof i!="object"&&(i={});var d=vu.default(i);c||(d=Object.keys(d).reduce(function(p,m){return d[m]!=null&&(p[m]=d[m]),p},{}));for(var f in a)a[f]!==void 0&&i[f]===void 0&&(d[f]=a[f]);return Object.keys(d).length>0?d:void 0}r.compose=t;function n(a,i){a===void 0&&(a={}),i===void 0&&(i={}),typeof a!="object"&&(a={}),typeof i!="object"&&(i={});var c=Object.keys(a).concat(Object.keys(i)).reduce(function(d,f){return Ju.default(a[f],i[f])||(d[f]=i[f]===void 0?null:i[f]),d},{});return Object.keys(c).length>0?c:void 0}r.diff=n;function o(a,i){a===void 0&&(a={}),i===void 0&&(i={}),a=a||{};var c=Object.keys(i).reduce(function(d,f){return i[f]!==a[f]&&a[f]!==void 0&&(d[f]=i[f]),d},{});return Object.keys(a).reduce(function(d,f){return a[f]!==i[f]&&i[f]===void 0&&(d[f]=null),d},c)}r.invert=o;function s(a,i,c){if(c===void 0&&(c=!1),typeof a!="object")return i;if(typeof i=="object"){if(!c)return i;var d=Object.keys(i).reduce(function(f,p){return a[p]===void 0&&(f[p]=i[p]),f},{});return Object.keys(d).length>0?d:void 0}}r.transform=s})(Or||(Or={})),Vr.default=Or;var Vn={},On={},Pa;function Ku(){if(Pa)return On;Pa=1;var r=ne&&ne.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(On,"__esModule",{value:!0});var t=r(Ga()),n=function(){function o(s){this.ops=s,this.index=0,this.offset=0}return o.prototype.hasNext=function(){return this.peekLength()<1/0},o.prototype.next=function(s){s||(s=1/0);var a=this.ops[this.index];if(a){var i=this.offset,c=t.default.length(a);if(s>=c-i?(s=c-i,this.index+=1,this.offset=0):this.offset+=s,typeof a.delete=="number")return{delete:s};var d={};return a.attributes&&(d.attributes=a.attributes),typeof a.retain=="number"?d.retain=s:typeof a.insert=="string"?d.insert=a.insert.substr(i,s):d.insert=a.insert,d}else return{retain:1/0}},o.prototype.peek=function(){return this.ops[this.index]},o.prototype.peekLength=function(){return this.ops[this.index]?t.default.length(this.ops[this.index])-this.offset:1/0},o.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},o.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var s=this.offset,a=this.index,i=this.next(),c=this.ops.slice(this.index);return this.offset=s,this.index=a,[i].concat(c)}else return[]},o}();return On.default=n,On}var Wa;function Ga(){if(Wa)return Vn;Wa=1;var r=ne&&ne.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(Vn,"__esModule",{value:!0});var t=r(Ku()),n;return function(o){function s(i){return new t.default(i)}o.iterator=s;function a(i){return typeof i.delete=="number"?i.delete:typeof i.retain=="number"?i.retain:typeof i.insert=="string"?i.insert.length:1}o.length=a}(n||(n={})),Vn.default=n,Vn}var zt=ne&&ne.__importDefault||function(r){return r&&r.__esModule?r:{default:r}},Tn=zt(Qu),Yu=zt(za),Tr=zt(Ha),Ht=zt(Vr),oe=zt(Ga()),Xu="\0",Zu=function(){function r(t){Array.isArray(t)?this.ops=t:t!=null&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]}return r.prototype.insert=function(t,n){var o={};return typeof t=="string"&&t.length===0?this:(o.insert=t,n!=null&&typeof n=="object"&&Object.keys(n).length>0&&(o.attributes=n),this.push(o))},r.prototype.delete=function(t){return t<=0?this:this.push({delete:t})},r.prototype.retain=function(t,n){if(t<=0)return this;var o={retain:t};return n!=null&&typeof n=="object"&&Object.keys(n).length>0&&(o.attributes=n),this.push(o)},r.prototype.push=function(t){var n=this.ops.length,o=this.ops[n-1];if(t=Yu.default(t),typeof o=="object"){if(typeof t.delete=="number"&&typeof o.delete=="number")return this.ops[n-1]={delete:o.delete+t.delete},this;if(typeof o.delete=="number"&&t.insert!=null&&(n-=1,o=this.ops[n-1],typeof o!="object"))return this.ops.unshift(t),this;if(Tr.default(t.attributes,o.attributes)){if(typeof t.insert=="string"&&typeof o.insert=="string")return this.ops[n-1]={insert:o.insert+t.insert},typeof t.attributes=="object"&&(this.ops[n-1].attributes=t.attributes),this;if(typeof t.retain=="number"&&typeof o.retain=="number")return this.ops[n-1]={retain:o.retain+t.retain},typeof t.attributes=="object"&&(this.ops[n-1].attributes=t.attributes),this}}return n===this.ops.length?this.ops.push(t):this.ops.splice(n,0,t),this},r.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},r.prototype.filter=function(t){return this.ops.filter(t)},r.prototype.forEach=function(t){this.ops.forEach(t)},r.prototype.map=function(t){return this.ops.map(t)},r.prototype.partition=function(t){var n=[],o=[];return this.forEach(function(s){var a=t(s)?n:o;a.push(s)}),[n,o]},r.prototype.reduce=function(t,n){return this.ops.reduce(t,n)},r.prototype.changeLength=function(){return this.reduce(function(t,n){return n.insert?t+oe.default.length(n):n.delete?t-n.delete:t},0)},r.prototype.length=function(){return this.reduce(function(t,n){return t+oe.default.length(n)},0)},r.prototype.slice=function(t,n){t===void 0&&(t=0),n===void 0&&(n=1/0);for(var o=[],s=oe.default.iterator(this.ops),a=0;a<n&&s.hasNext();){var i=void 0;a<t?i=s.next(t-a):(i=s.next(n-a),o.push(i)),a+=oe.default.length(i)}return new r(o)},r.prototype.compose=function(t){var n=oe.default.iterator(this.ops),o=oe.default.iterator(t.ops),s=[],a=o.peek();if(a!=null&&typeof a.retain=="number"&&a.attributes==null){for(var i=a.retain;n.peekType()==="insert"&&n.peekLength()<=i;)i-=n.peekLength(),s.push(n.next());a.retain-i>0&&o.next(a.retain-i)}for(var c=new r(s);n.hasNext()||o.hasNext();)if(o.peekType()==="insert")c.push(o.next());else if(n.peekType()==="delete")c.push(n.next());else{var d=Math.min(n.peekLength(),o.peekLength()),f=n.next(d),p=o.next(d);if(typeof p.retain=="number"){var m={};typeof f.retain=="number"?m.retain=d:m.insert=f.insert;var E=Ht.default.compose(f.attributes,p.attributes,typeof f.retain=="number");if(E&&(m.attributes=E),c.push(m),!o.hasNext()&&Tr.default(c.ops[c.ops.length-1],m)){var B=new r(n.rest());return c.concat(B).chop()}}else typeof p.delete=="number"&&typeof f.retain=="number"&&c.push(p)}return c.chop()},r.prototype.concat=function(t){var n=new r(this.ops.slice());return t.ops.length>0&&(n.push(t.ops[0]),n.ops=n.ops.concat(t.ops.slice(1))),n},r.prototype.diff=function(t,n){if(this.ops===t.ops)return new r;var o=[this,t].map(function(d){return d.map(function(f){if(f.insert!=null)return typeof f.insert=="string"?f.insert:Xu;var p=d===t?"on":"with";throw new Error("diff() called "+p+" non-document")}).join("")}),s=new r,a=Tn.default(o[0],o[1],n),i=oe.default.iterator(this.ops),c=oe.default.iterator(t.ops);return a.forEach(function(d){for(var f=d[1].length;f>0;){var p=0;switch(d[0]){case Tn.default.INSERT:p=Math.min(c.peekLength(),f),s.push(c.next(p));break;case Tn.default.DELETE:p=Math.min(f,i.peekLength()),i.next(p),s.delete(p);break;case Tn.default.EQUAL:p=Math.min(i.peekLength(),c.peekLength(),f);var m=i.next(p),E=c.next(p);Tr.default(m.insert,E.insert)?s.retain(p,Ht.default.diff(m.attributes,E.attributes)):s.push(E).delete(p);break}f-=p}}),s.chop()},r.prototype.eachLine=function(t,n){n===void 0&&(n=`
7
7
  `);for(var o=oe.default.iterator(this.ops),s=new r,a=0;o.hasNext();){if(o.peekType()!=="insert")return;var i=o.peek(),c=oe.default.length(i)-o.peekLength(),d=typeof i.insert=="string"?i.insert.indexOf(n,c)-c:-1;if(d<0)s.push(o.next());else if(d>0)s.push(o.next(d));else{if(t(s,o.next(1).attributes||{},a)===!1)return;a+=1,s=new r}}s.length()>0&&t(s,{},a)},r.prototype.invert=function(t){var n=new r;return this.reduce(function(o,s){if(s.insert)n.delete(oe.default.length(s));else{if(s.retain&&s.attributes==null)return n.retain(s.retain),o+s.retain;if(s.delete||s.retain&&s.attributes){var a=s.delete||s.retain,i=t.slice(o,o+a);return i.forEach(function(c){s.delete?n.push(c):s.retain&&s.attributes&&n.retain(oe.default.length(c),Ht.default.invert(s.attributes,c.attributes))}),o+a}}return o},0),n.chop()},r.prototype.transform=function(t,n){if(n===void 0&&(n=!1),n=!!n,typeof t=="number")return this.transformPosition(t,n);for(var o=t,s=oe.default.iterator(this.ops),a=oe.default.iterator(o.ops),i=new r;s.hasNext()||a.hasNext();)if(s.peekType()==="insert"&&(n||a.peekType()!=="insert"))i.retain(oe.default.length(s.next()));else if(a.peekType()==="insert")i.push(a.next());else{var c=Math.min(s.peekLength(),a.peekLength()),d=s.next(c),f=a.next(c);if(d.delete)continue;f.delete?i.push(f):i.retain(c,Ht.default.transform(d.attributes,f.attributes,n))}return i.chop()},r.prototype.transformPosition=function(t,n){n===void 0&&(n=!1),n=!!n;for(var o=oe.default.iterator(this.ops),s=0;o.hasNext()&&s<=t;){var a=o.peekLength(),i=o.peekType();if(o.next(),i==="delete"){t-=Math.min(a,t-s);continue}else i==="insert"&&(s<t||!n)&&(t+=a);s+=a}return t},r.Op=oe.default,r.AttributeMap=Ht.default,r}(),ef=Zu;const tf=na(ef);/*!
8
8
  * VueQuill @vueup/vue-quill v1.2.0
9
9
  * https://vueup.github.io/vue-quill/
@@ -14,7 +14,7 @@
14
14
  * Copyright (c) 2023 Ahmad Luthfi Masruri
15
15
  * Released under the MIT license
16
16
  * Date: 2023-05-12T08:44:03.742Z
17
- */const Qa={essential:[[{header:[1,2,3,4,5,6,!1]}],["bold","italic","underline"],[{list:"ordered"},{list:"bullet"},{align:[]}],["blockquote","code-block","link"],[{color:[]},"clean"]],minimal:[[{header:1},{header:2}],["bold","italic","underline"],[{list:"ordered"},{list:"bullet"},{align:[]}]],full:[["bold","italic","underline","strike"],["blockquote","code-block"],[{header:1},{header:2}],[{list:"ordered"},{list:"bullet"}],[{script:"sub"},{script:"super"}],[{indent:"-1"},{indent:"+1"}],[{direction:"rtl"}],[{size:["small",!1,"large","huge"]}],[{header:[1,2,3,4,5,6,!1]}],[{color:[]},{background:[]}],[{font:[]}],[{align:[]}],["link","video","image"],["clean"]]},nf=e.defineComponent({name:"QuillEditor",inheritAttrs:!1,props:{content:{type:[String,Object]},contentType:{type:String,default:"delta",validator:r=>["delta","html","text"].includes(r)},enable:{type:Boolean,default:!0},readOnly:{type:Boolean,default:!1},placeholder:{type:String,required:!1},theme:{type:String,default:"snow",validator:r=>["snow","bubble",""].includes(r)},toolbar:{type:[String,Array,Object],required:!1,validator:r=>typeof r=="string"&&r!==""?r.charAt(0)==="#"?!0:Object.keys(Qa).indexOf(r)!==-1:!0},modules:{type:Object,required:!1},options:{type:Object,required:!1},globalOptions:{type:Object,required:!1}},emits:["textChange","selectionChange","editorChange","update:content","focus","blur","ready"],setup:(r,t)=>{e.onMounted(()=>{a()}),e.onBeforeUnmount(()=>{n=null});let n,o;const s=e.ref(),a=()=>{var V;if(s.value){if(o=i(),r.modules)if(Array.isArray(r.modules))for(const I of r.modules)cn.register(`modules/${I.name}`,I.module);else cn.register(`modules/${r.modules.name}`,r.modules.module);n=new cn(s.value,o),x(r.content),n.on("text-change",m),n.on("selection-change",B),n.on("editor-change",y),r.theme!=="bubble"&&s.value.classList.remove("ql-bubble"),r.theme!=="snow"&&s.value.classList.remove("ql-snow"),(V=n.getModule("toolbar"))===null||V===void 0||V.container.addEventListener("mousedown",I=>{I.preventDefault()}),t.emit("ready",n)}},i=()=>{const V={};if(r.theme!==""&&(V.theme=r.theme),r.readOnly&&(V.readOnly=r.readOnly),r.placeholder&&(V.placeholder=r.placeholder),r.toolbar&&r.toolbar!==""&&(V.modules={toolbar:(()=>{if(typeof r.toolbar=="object")return r.toolbar;if(typeof r.toolbar=="string")return r.toolbar.charAt(0)==="#"?r.toolbar:Qa[r.toolbar]})()}),r.modules){const I=(()=>{var Y,L;const P={};if(Array.isArray(r.modules))for(const de of r.modules)P[de.name]=(Y=de.options)!==null&&Y!==void 0?Y:{};else P[r.modules.name]=(L=r.modules.options)!==null&&L!==void 0?L:{};return P})();V.modules=Object.assign({},V.modules,I)}return Object.assign({},r.globalOptions,r.options,V)},c=V=>typeof V=="object"&&V?V.slice():V,d=V=>Object.values(V.ops).some(I=>!I.retain||Object.keys(I).length!==1);let f;const p=V=>{if(typeof f==typeof V){if(V===f)return!0;if(typeof V=="object"&&V&&typeof f=="object"&&f)return!d(f.diff(V))}return!1},m=(V,I,Y)=>{f=c(w()),p(r.content)||t.emit("update:content",f),t.emit("textChange",{delta:V,oldContents:I,source:Y})},E=e.ref(),B=(V,I,Y)=>{E.value=!!(n!=null&&n.hasFocus()),t.emit("selectionChange",{range:V,oldRange:I,source:Y})};e.watch(E,V=>{V?t.emit("focus",s):t.emit("blur",s)});const y=(...V)=>{V[0]==="text-change"&&t.emit("editorChange",{name:V[0],delta:V[1],oldContents:V[2],source:V[3]}),V[0]==="selection-change"&&t.emit("editorChange",{name:V[0],range:V[1],oldRange:V[2],source:V[3]})},h=()=>s.value,b=()=>{var V;return(V=n==null?void 0:n.getModule("toolbar"))===null||V===void 0?void 0:V.container},_=()=>{if(n)return n;throw`The quill editor hasn't been instantiated yet,
17
+ */const Qa={essential:[[{header:[1,2,3,4,5,6,!1]}],["bold","italic","underline"],[{list:"ordered"},{list:"bullet"},{align:[]}],["blockquote","code-block","link"],[{color:[]},"clean"]],minimal:[[{header:1},{header:2}],["bold","italic","underline"],[{list:"ordered"},{list:"bullet"},{align:[]}]],full:[["bold","italic","underline","strike"],["blockquote","code-block"],[{header:1},{header:2}],[{list:"ordered"},{list:"bullet"}],[{script:"sub"},{script:"super"}],[{indent:"-1"},{indent:"+1"}],[{direction:"rtl"}],[{size:["small",!1,"large","huge"]}],[{header:[1,2,3,4,5,6,!1]}],[{color:[]},{background:[]}],[{font:[]}],[{align:[]}],["link","video","image"],["clean"]]},nf=e.defineComponent({name:"QuillEditor",inheritAttrs:!1,props:{content:{type:[String,Object]},contentType:{type:String,default:"delta",validator:r=>["delta","html","text"].includes(r)},enable:{type:Boolean,default:!0},readOnly:{type:Boolean,default:!1},placeholder:{type:String,required:!1},theme:{type:String,default:"snow",validator:r=>["snow","bubble",""].includes(r)},toolbar:{type:[String,Array,Object],required:!1,validator:r=>typeof r=="string"&&r!==""?r.charAt(0)==="#"?!0:Object.keys(Qa).indexOf(r)!==-1:!0},modules:{type:Object,required:!1},options:{type:Object,required:!1},globalOptions:{type:Object,required:!1}},emits:["textChange","selectionChange","editorChange","update:content","focus","blur","ready"],setup:(r,t)=>{e.onMounted(()=>{a()}),e.onBeforeUnmount(()=>{n=null});let n,o;const s=e.ref(),a=()=>{var V;if(s.value){if(o=i(),r.modules)if(Array.isArray(r.modules))for(const I of r.modules)cn.register(`modules/${I.name}`,I.module);else cn.register(`modules/${r.modules.name}`,r.modules.module);n=new cn(s.value,o),x(r.content),n.on("text-change",m),n.on("selection-change",B),n.on("editor-change",y),r.theme!=="bubble"&&s.value.classList.remove("ql-bubble"),r.theme!=="snow"&&s.value.classList.remove("ql-snow"),(V=n.getModule("toolbar"))===null||V===void 0||V.container.addEventListener("mousedown",I=>{I.preventDefault()}),t.emit("ready",n)}},i=()=>{const V={};if(r.theme!==""&&(V.theme=r.theme),r.readOnly&&(V.readOnly=r.readOnly),r.placeholder&&(V.placeholder=r.placeholder),r.toolbar&&r.toolbar!==""&&(V.modules={toolbar:(()=>{if(typeof r.toolbar=="object")return r.toolbar;if(typeof r.toolbar=="string")return r.toolbar.charAt(0)==="#"?r.toolbar:Qa[r.toolbar]})()}),r.modules){const I=(()=>{var K,L;const P={};if(Array.isArray(r.modules))for(const de of r.modules)P[de.name]=(K=de.options)!==null&&K!==void 0?K:{};else P[r.modules.name]=(L=r.modules.options)!==null&&L!==void 0?L:{};return P})();V.modules=Object.assign({},V.modules,I)}return Object.assign({},r.globalOptions,r.options,V)},c=V=>typeof V=="object"&&V?V.slice():V,d=V=>Object.values(V.ops).some(I=>!I.retain||Object.keys(I).length!==1);let f;const p=V=>{if(typeof f==typeof V){if(V===f)return!0;if(typeof V=="object"&&V&&typeof f=="object"&&f)return!d(f.diff(V))}return!1},m=(V,I,K)=>{f=c(w()),p(r.content)||t.emit("update:content",f),t.emit("textChange",{delta:V,oldContents:I,source:K})},E=e.ref(),B=(V,I,K)=>{E.value=!!(n!=null&&n.hasFocus()),t.emit("selectionChange",{range:V,oldRange:I,source:K})};e.watch(E,V=>{V?t.emit("focus",s):t.emit("blur",s)});const y=(...V)=>{V[0]==="text-change"&&t.emit("editorChange",{name:V[0],delta:V[1],oldContents:V[2],source:V[3]}),V[0]==="selection-change"&&t.emit("editorChange",{name:V[0],range:V[1],oldRange:V[2],source:V[3]})},h=()=>s.value,b=()=>{var V;return(V=n==null?void 0:n.getModule("toolbar"))===null||V===void 0?void 0:V.container},_=()=>{if(n)return n;throw`The quill editor hasn't been instantiated yet,
18
18
  make sure to call this method when the editor ready
19
- or use v-on:ready="onReady(quill)" event instead.`},w=(V,I)=>r.contentType==="html"?D():r.contentType==="text"?C(V,I):n==null?void 0:n.getContents(V,I),x=(V,I="api")=>{const Y=V||(r.contentType==="delta"?new tf:"");r.contentType==="html"?R(Y):r.contentType==="text"?N(Y,I):n==null||n.setContents(Y,I),f=c(Y)},C=(V,I)=>{var Y;return(Y=n==null?void 0:n.getText(V,I))!==null&&Y!==void 0?Y:""},N=(V,I="api")=>{n==null||n.setText(V,I)},D=()=>{var V;return(V=n==null?void 0:n.root.innerHTML)!==null&&V!==void 0?V:""},R=V=>{n&&(n.root.innerHTML=V)},Q=(V,I="api")=>{const Y=n==null?void 0:n.clipboard.convert(V);Y&&(n==null||n.setContents(Y,I))},et=()=>{n==null||n.focus()},ze=()=>{e.nextTick(()=>{var V;!t.slots.toolbar&&n&&((V=n.getModule("toolbar"))===null||V===void 0||V.container.remove()),a()})};return e.watch(()=>r.content,V=>{if(!n||!V||p(V))return;const I=n.getSelection();I&&e.nextTick(()=>n==null?void 0:n.setSelection(I)),x(V)},{deep:!0}),e.watch(()=>r.enable,V=>{n&&n.enable(V)}),{editor:s,getEditor:h,getToolbar:b,getQuill:_,getContents:w,setContents:x,getHTML:D,setHTML:R,pasteHTML:Q,focus:et,getText:C,setText:N,reinit:ze}},render(){var r,t;return[(t=(r=this.$slots).toolbar)===null||t===void 0?void 0:t.call(r),e.h("div",{ref:"editor",...this.$attrs})]}}),rf=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"RichTextEditor",setup(r){var t=["SimSun","SimHei","Microsoft-YaHei","KaiTi","FangSong","Arial","Times-New-Roman","sans-serif"],n=[!1,"16px","18px","20px","22px","26px","28px","30px"],o=nr.default.imports["formats/size"];o.whitelist=n;var s=nr.default.imports["formats/font"];s.whitelist=t,nr.default.register(s,!0);const a=[[{font:t}],[{size:n}],[{header:[1,2,3,4,5,6,!1]}],[{list:"ordered"},{list:"bullet"}],["bold","italic","underline","strike"],[{color:[]},{background:[]}],[{align:[]}],["link","image"]],i={name:"imageUploader",module:Ka,options:{upload:c=>new Promise((d,f)=>{const p=new FormData;p.append("image",c),v.post(ot().imageUploadUrl,p,{}).then(m=>{d(m.data.data.imageUrl)}).catch(()=>{f("Upload failed")})})}};return(c,d)=>(e.openBlock(),e.createBlock(e.unref(nf),{modules:i,toolbar:a,"content-type":"html"}))}}},Symbol.toStringTag,{value:"Module"}));q.BaseLayout=Tl,q.DashboardPage=Ni,q.DashboardRow=Ai,q.Detail=Gc,q.DetailTab=Kc,q.EmptyTip=we,q.FormEditor=kn,q.ImagesUploader=fa,q.List=Rc,q.RowActionFormEditor=Ui,q.Statistic=ua,q.StatisticCard=$i,q.Widget=da,q.defineDomain=ca,q.http=_e,q.rest=mi,q.setupAppConfig=yi,q.setupDomainConfigLoader=bi,q.useDataTableStore=Ne,q.useRouteHistoryStore=En,Object.defineProperty(q,Symbol.toStringTag,{value:"Module"})});
19
+ or use v-on:ready="onReady(quill)" event instead.`},w=(V,I)=>r.contentType==="html"?D():r.contentType==="text"?C(V,I):n==null?void 0:n.getContents(V,I),x=(V,I="api")=>{const K=V||(r.contentType==="delta"?new tf:"");r.contentType==="html"?R(K):r.contentType==="text"?N(K,I):n==null||n.setContents(K,I),f=c(K)},C=(V,I)=>{var K;return(K=n==null?void 0:n.getText(V,I))!==null&&K!==void 0?K:""},N=(V,I="api")=>{n==null||n.setText(V,I)},D=()=>{var V;return(V=n==null?void 0:n.root.innerHTML)!==null&&V!==void 0?V:""},R=V=>{n&&(n.root.innerHTML=V)},Q=(V,I="api")=>{const K=n==null?void 0:n.clipboard.convert(V);K&&(n==null||n.setContents(K,I))},et=()=>{n==null||n.focus()},ze=()=>{e.nextTick(()=>{var V;!t.slots.toolbar&&n&&((V=n.getModule("toolbar"))===null||V===void 0||V.container.remove()),a()})};return e.watch(()=>r.content,V=>{if(!n||!V||p(V))return;const I=n.getSelection();I&&e.nextTick(()=>n==null?void 0:n.setSelection(I)),x(V)},{deep:!0}),e.watch(()=>r.enable,V=>{n&&n.enable(V)}),{editor:s,getEditor:h,getToolbar:b,getQuill:_,getContents:w,setContents:x,getHTML:D,setHTML:R,pasteHTML:Q,focus:et,getText:C,setText:N,reinit:ze}},render(){var r,t;return[(t=(r=this.$slots).toolbar)===null||t===void 0?void 0:t.call(r),e.h("div",{ref:"editor",...this.$attrs})]}}),rf=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"RichTextEditor",setup(r){var t=["SimSun","SimHei","Microsoft-YaHei","KaiTi","FangSong","Arial","Times-New-Roman","sans-serif"],n=[!1,"16px","18px","20px","22px","26px","28px","30px"],o=nr.default.imports["formats/size"];o.whitelist=n;var s=nr.default.imports["formats/font"];s.whitelist=t,nr.default.register(s,!0);const a=[[{font:t}],[{size:n}],[{header:[1,2,3,4,5,6,!1]}],[{list:"ordered"},{list:"bullet"}],["bold","italic","underline","strike"],[{color:[]},{background:[]}],[{align:[]}],["link","image"]],i={name:"imageUploader",module:Ja,options:{upload:c=>new Promise((d,f)=>{const p=new FormData;p.append("image",c),Y.post(ot().imageUploadUrl,p,{}).then(m=>{d(m.data.data.imageUrl)}).catch(()=>{f("Upload failed")})})}};return(c,d)=>(e.openBlock(),e.createBlock(e.unref(nf),{modules:i,toolbar:a,"content-type":"html"}))}}},Symbol.toStringTag,{value:"Module"}));q.BaseLayout=Tl,q.DashboardPage=Ni,q.DashboardRow=Ai,q.Detail=Gc,q.DetailTab=Jc,q.EmptyTip=we,q.FormEditor=kn,q.ImagesUploader=fa,q.List=Rc,q.RowActionFormEditor=Ui,q.Statistic=ua,q.StatisticCard=$i,q.Widget=da,q.defineDomain=ca,q.http=_e,q.rest=mi,q.setupAppConfig=yi,q.setupDomainConfigLoader=bi,q.useDataTableStore=Ne,q.useRouteHistoryStore=En,Object.defineProperty(q,Symbol.toStringTag,{value:"Module"})});
20
20
  //# sourceMappingURL=kouxiangtang.umd.cjs.map